var _ColorSpaceUtils,_OperatorList,_GlobalImageCache,_StructTreeRoot,_WorkerMessageHandler;function ownKeys(e,r){var o,t=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)),t}function _objectSpread(e){for(var r=1;r=VerbosityLevel.INFOS&&console.log("Info: ".concat(msg))}function warn(msg){verbosity>=VerbosityLevel.WARNINGS&&console.log("Warning: ".concat(msg))}function unreachable(msg){throw new Error(msg)}function assert(cond,msg){cond||unreachable(msg)}function _isValidProtocol(url){switch(null==url?void 0:url.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(url){var baseUrl=1>24&255,value>>16&255,value>>8&255,255&value)}function objectSize(obj){return Object.keys(obj).length}function isLittleEndian(){var buffer8=new Uint8Array(4);return(buffer8[0]=1)===new Uint32Array(buffer8.buffer,0,1)[0]}function isEvalSupported(){try{return new Function(""),!0}catch(_unused2){return!1}}class FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return shadow(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get platform(){var{platform,userAgent}=navigator;return shadow(this,"platform",{isAndroid:userAgent.includes("Android"),isLinux:platform.includes("Linux"),isMac:platform.includes("Mac"),isWindows:platform.includes("Win"),isFirefox:userAgent.includes("Firefox")})}static get isCSSRoundSupported(){var _globalThis$CSS;return shadow(this,"isCSSRoundSupported",null==(_globalThis$CSS=globalThis.CSS)||null==_globalThis$CSS.supports?void 0:_globalThis$CSS.supports("width: round(1.5px, 1px)"))}}var hexNumbers=Array.from(Array(256).keys(),n=>n.toString(16).padStart(2,"0"));class Util{static makeHexColor(r,g,b){return"#".concat(hexNumbers[r]).concat(hexNumbers[g]).concat(hexNumbers[b])}static scaleMinMax(transform,minMax){var temp;transform[0]?(transform[0]<0&&(temp=minMax[0],minMax[0]=minMax[2],minMax[2]=temp),minMax[0]*=transform[0],minMax[2]*=transform[0],transform[3]<0&&(temp=minMax[1],minMax[1]=minMax[3],minMax[3]=temp),minMax[1]*=transform[3],minMax[3]*=transform[3]):(temp=minMax[0],minMax[0]=minMax[1],minMax[1]=temp,temp=minMax[2],minMax[2]=minMax[3],minMax[3]=temp,transform[1]<0&&(temp=minMax[1],minMax[1]=minMax[3],minMax[3]=temp),minMax[1]*=transform[1],minMax[3]*=transform[1],transform[2]<0&&(temp=minMax[0],minMax[0]=minMax[2],minMax[2]=temp),minMax[0]*=transform[2],minMax[2]*=transform[2]),minMax[0]+=transform[4],minMax[1]+=transform[5],minMax[2]+=transform[4],minMax[3]+=transform[5]}static transform(m1,m2){return[m1[0]*m2[0]+m1[2]*m2[1],m1[1]*m2[0]+m1[3]*m2[1],m1[0]*m2[2]+m1[2]*m2[3],m1[1]*m2[2]+m1[3]*m2[3],m1[0]*m2[4]+m1[2]*m2[5]+m1[4],m1[1]*m2[4]+m1[3]*m2[5]+m1[5]]}static applyTransform(p,m){var pos=2rect[2]&&(r[0]=rect[2],r[2]=rect[0]),rect[1]>rect[3]&&(r[1]=rect[3],r[3]=rect[1]),r}static intersect(rect1,rect2){var yLow,xLow=Math.max(Math.min(rect1[0],rect1[2]),Math.min(rect2[0],rect2[2])),xHigh=Math.min(Math.max(rect1[0],rect1[2]),Math.max(rect2[0],rect2[2]));return xHighp1?p1.normalize("NFKC"):NormalizationMap.get(p2))}function getUuid(){var buf;return"function"==typeof crypto.randomUUID?crypto.randomUUID():(buf=new Uint8Array(32),crypto.getRandomValues(buf),bytesToString(buf))}var AnnotationPrefix="pdfjs_internal_id_";function _isValidExplicitDest(validRef,validName,dest){if(!Array.isArray(dest)||dest.length<2)return!1;var[dest,zoom,...args]=dest;if(!validRef(dest)&&!Number.isInteger(dest))return!1;if(!validName(zoom))return!1;var arg,argsLen=args.length,allowNull=!0;switch(zoom.name){case"XYZ":if(argsLen<2||3hexNumbers[num]).join("")}function toBase64Util(arr){return Uint8Array.prototype.toBase64?arr.toBase64():btoa(bytesToString(arr))}function fromBase64Util(str){return Uint8Array.fromBase64?Uint8Array.fromBase64(str):stringToBytes(atob(str))}"function"!=typeof Promise.try&&(Promise.try=function(fn){for(var _len=arguments.length,args=new Array(1<_len?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];return new Promise(resolve=>{resolve(fn(...args))})}),"function"!=typeof Math.sumPrecise&&(Math.sumPrecise=function(numbers){return numbers.reduce((a,b)=>a+b,0)});var CIRCULAR_REF=Symbol("CIRCULAR_REF"),EOF=Symbol("EOF"),CmdCache=Object.create(null),NameCache=Object.create(null),RefCache=Object.create(null);function clearPrimitiveCaches(){CmdCache=Object.create(null),NameCache=Object.create(null),RefCache=Object.create(null)}class Name{constructor(name){this.name=name}static get(name){return NameCache[name]||(NameCache[name]=new Name(name))}}class Cmd{constructor(cmd){this.cmd=cmd}static get(cmd){return CmdCache[cmd]||(CmdCache[cmd]=new Cmd(cmd))}}var nonSerializable=function(){return nonSerializable};class Dict{constructor(){var xref=0{unreachable("Should not call `set` on the empty dictionary.")},shadow(this,"empty",emptyDict)}static merge(_ref){var dict,name,values,{xref,dictArray:_ref,mergeSubDicts=!1}=_ref,mergedDict=new Dict(xref),properties=new Map;for(dict of _ref)if(dict instanceof Dict)for(var[key,value]of dict._map){var property=properties.get(key);if(void 0===property)properties.set(key,property=[]);else if(!(mergeSubDicts&&value instanceof Dict))continue;property.push(value)}for([name,values]of properties)if(1!==values.length&&values[0]instanceof Dict){var _dict,subDict=new Dict(xref);for(_dict of values)for(var[_key2,_value]of _dict._map)subDict._map.has(_key2)||subDict._map.set(_key2,_value);0>24}function readInt16(data,offset){return(data[offset]<<24|data[offset+1]<<16)>>16}function readUint16(data,offset){return data[offset]<<8|data[offset+1]}function readUint32(data,offset){return(data[offset]<<24|data[offset+1]<<16|data[offset+2]<<8|data[offset+3])>>>0}function isWhiteSpace(ch){return 32===ch||9===ch||13===ch||10===ch}function isBooleanArray(arr,len){return Array.isArray(arr)&&(null===len||arr.length===len)&&arr.every(x=>"boolean"==typeof x)}function isNumberArray(arr,len){return Array.isArray(arr)?(null===len||arr.length===len)&&arr.every(x=>"number"==typeof x):ArrayBuffer.isView(arr)&&!(arr instanceof BigInt64Array||arr instanceof BigUint64Array)&&(null===len||arr.length===len)}function lookupMatrix(arr,fallback){return isNumberArray(arr,6)?arr:fallback}function lookupRect(arr,fallback){return isNumberArray(arr,4)?arr:fallback}function lookupNormalRect(arr,fallback){return isNumberArray(arr,4)?Util.normalizeRect(arr):fallback}function parseXFAPath(path){var positionPattern=/(.+)\[(\d+)\]$/;return path.split(".").map(component=>{var m=component.match(positionPattern);return m?{name:m[1],pos:parseInt(m[2],10)}:{name:component,pos:0}})}function escapePDFName(str){for(var buffer=[],start=0,i=0,ii=str.length;i"\n"===match?"\\n":"\r"===match?"\\r":"\\".concat(match))}function _collectJS(entry,xref,list,parents){if(entry){var js,code,parent=null;if(entry instanceof Ref){if(parents.has(entry))return;parent=entry,parents.put(parent),entry=xref.fetch(entry)}if(Array.isArray(entry))for(var element of entry)_collectJS(element,xref,list,parents);else entry instanceof Dict&&(isName(entry.get("S"),"JavaScript")&&((js=entry.get("JS"))instanceof BaseStream?code=js.getString():"string"==typeof js&&(code=js),code=code&&stringToPDFString(code,!0).replaceAll("\0",""))&&list.push(code),_collectJS(entry.getRaw("Next"),xref,list,parents));parent&&parents.remove(parent)}}function collectActions(xref,dict,eventType){var _list,actions=Object.create(null),additionalActionsDicts=getInheritableProperty({dict:dict,key:"AA",stopWhenFound:!1});if(additionalActionsDicts)for(var i=additionalActionsDicts.length-1;0<=i;i--){var additionalActions=additionalActionsDicts[i];if(additionalActions instanceof Dict)for(var key of additionalActions.getKeys()){var list,action=eventType[key];action&&(list=[],_collectJS(additionalActions.getRaw(key),xref,list,new RefSet),0: ".concat(fontFamily,".")),!1;return!0}function validateCSSFont(cssFontInfo){var CSS_FONT_WEIGHT_VALUES=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily,fontWeight,italicAngle}=cssFontInfo;return!!validateFontName(fontFamily,!0)&&(fontFamily=fontWeight?fontWeight.toString():"",cssFontInfo.fontWeight=CSS_FONT_WEIGHT_VALUES.has(fontFamily)?fontFamily:"400",fontWeight=parseFloat(italicAngle),cssFontInfo.italicAngle=isNaN(fontWeight)||fontWeight<-90||90>8&255],hexNumbers[255&char])}return buf.join("")}function stringToUTF16String(str){var buf=[];1>8&255),String.fromCharCode(255&char))}return buf.join("")}function getRotationMatrix(rotation,width,height){switch(rotation){case 90:return[0,1,-1,0,width,0];case 180:return[-1,0,0,-1,width,height];case 270:return[0,-1,1,0,0,height];default:throw new Error("Invalid rotation")}}function getSizeInBytes(x){return Math.ceil(Math.ceil(Math.log2(1+x))/8)}class QCMS{static get _memoryArray(){var array=_assertClassBrand(QCMS,this,_memoryArray2)._;return null!=array&&array.byteLength?array:_memoryArray2._=_assertClassBrand(QCMS,this,new Uint8Array(this._memory.buffer))}}var wasm,_memoryArray2={_:null};function copy_result(ptr,len){var{_mustAddAlpha,_destBuffer,_destOffset,_destLength,_memoryArray}=QCMS;if(len===_destLength)_destBuffer.set(_memoryArray.subarray(ptr,ptr+len),_destOffset);else if(_mustAddAlpha)for(var i=ptr,ii=ptr+len,j=_destOffset;i{throw Error("TextDecoder not available")}},cachedUint8ArrayMemory0=("undefined"!=typeof TextDecoder&&cachedTextDecoder.decode(),null);function getUint8ArrayMemory0(){return cachedUint8ArrayMemory0=null!==cachedUint8ArrayMemory0&&0!==cachedUint8ArrayMemory0.byteLength?cachedUint8ArrayMemory0:new Uint8Array(wasm.memory.buffer)}function getStringFromWasm0(ptr,len){return ptr>>>=0,cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr,ptr+len))}var WASM_VECTOR_LEN=0;function passArray8ToWasm0(arg,malloc){malloc=malloc(+arg.length,1)>>>0;return getUint8ArrayMemory0().set(arg,malloc),WASM_VECTOR_LEN=arg.length,malloc}function qcms_convert_array(transformer,src){var src=passArray8ToWasm0(src,wasm.__wbindgen_malloc),len0=WASM_VECTOR_LEN;wasm.qcms_convert_array(transformer,src,len0)}function qcms_convert_one(transformer,src,css){wasm.qcms_convert_one(transformer,src,css)}function qcms_convert_three(transformer,src1,src2,src3,css){wasm.qcms_convert_three(transformer,src1,src2,src3,css)}function qcms_convert_four(transformer,src1,src2,src3,src4,css){wasm.qcms_convert_four(transformer,src1,src2,src3,src4,css)}function qcms_transformer_from_memory(mem,in_type,intent){var mem=passArray8ToWasm0(mem,wasm.__wbindgen_malloc),len0=WASM_VECTOR_LEN;return wasm.qcms_transformer_from_memory(mem,len0,in_type,intent)>>>0}function qcms_drop_transformer(transformer){wasm.qcms_drop_transformer(transformer)}var DataType=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"}),Intent=Object.freeze({Perceptual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});async function __wbg_load(module,imports){if("function"==typeof Response&&module instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){if("application/wasm"==module.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}var bytes=await module.arrayBuffer();return WebAssembly.instantiate(bytes,imports)}return(bytes=await WebAssembly.instantiate(module,imports))instanceof WebAssembly.Instance?{instance:bytes,module:module}:bytes}function __wbg_get_imports(){var imports={wbg:{}};return imports.wbg.__wbg_copyresult_b08ee7d273f295dd=function(arg0,arg1){copy_result(arg0>>>0,arg1>>>0)},imports.wbg.__wbg_copyrgb_d60ce17bb05d9b67=function(arg0){copy_rgb(arg0>>>0)},imports.wbg.__wbg_makecssRGB_893bf0cd9fdb302d=function(arg0){make_cssRGB(arg0>>>0)},imports.wbg.__wbindgen_init_externref_table=function(){var table=wasm.__wbindgen_export_0,offset=table.grow(4);table.set(0,void 0),table.set(offset+0,void 0),table.set(offset+1,null),table.set(offset+2,!0),table.set(offset+3,!1)},imports.wbg.__wbindgen_throw=function(arg0,arg1){throw new Error(getStringFromWasm0(arg0,arg1))},imports}function __wbg_init_memory(imports,memory){}function __wbg_finalize_init(instance,module){return wasm=instance.exports,__wbg_init.__wbindgen_wasm_module=module,cachedUint8ArrayMemory0=null,wasm.__wbindgen_start(),wasm}function initSync(module){if(void 0!==wasm)return wasm;void 0!==module&&(Object.getPrototypeOf(module)===Object.prototype?module=module["module"]:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));var imports=__wbg_get_imports();return __wbg_init_memory(imports),module instanceof WebAssembly.Module||(module=new WebAssembly.Module(module)),__wbg_finalize_init(new WebAssembly.Instance(module,imports),module)}async function __wbg_init(module_or_path){if(void 0!==wasm)return wasm;void 0!==module_or_path&&(Object.getPrototypeOf(module_or_path)===Object.prototype?module_or_path=module_or_path["module_or_path"]:console.warn("using deprecated parameters for the initialization function; pass a single object instead"));var imports=__wbg_get_imports(),{instance:module_or_path,module:imports}=(("string"==typeof module_or_path||"function"==typeof Request&&module_or_path instanceof Request||"function"==typeof URL&&module_or_path instanceof URL)&&(module_or_path=fetch(module_or_path)),__wbg_init_memory(imports),await __wbg_load(await module_or_path,imports));return __wbg_finalize_init(module_or_path,imports)}var qcms=null;function resizeRgbImage(src,dest,w1,h1,w2,h2,alpha01){alpha01=1!==alpha01?0:alpha01;for(var oldIndex,xRatio=w1/w2,yRatio=h1/h2,newIndex=0,xScaled=new Uint16Array(w2),w1Scanline=3*w1,i=0;ithis.amax||this.bmin>this.bmax)&&(info("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}getRgbItem(src,srcOffset,dest,destOffset){_assertClassBrand(_LabCS_brand,this,_toRgb4).call(this,src,srcOffset,!1,dest,destOffset)}getRgbBuffer(src,srcOffset,count,dest,destOffset,bits,alpha01){for(var maxVal=(1<this.amax?as=this.amax:asthis.bmax?src=this.bmax:srcqcms_convert_one(_classPrivateFieldGet(_transformer,this),255*src[srcOffset],css));break;case 3:inType=DataType.RGB8,_classPrivateFieldSet(_convertPixel,this,(src,srcOffset,css)=>qcms_convert_three(_classPrivateFieldGet(_transformer,this),255*src[srcOffset],255*src[srcOffset+1],255*src[srcOffset+2],css));break;case 4:inType=DataType.CMYK,_classPrivateFieldSet(_convertPixel,this,(src,srcOffset,css)=>qcms_convert_four(_classPrivateFieldGet(_transformer,this),255*src[srcOffset],255*src[srcOffset+1],255*src[srcOffset+2],255*src[srcOffset+3],css));break;default:throw new Error("Unsupported number of components: ".concat(numComps))}if(_classPrivateFieldSet(_transformer,this,qcms_transformer_from_memory(iccProfile,inType,Intent.Perceptual)),!_classPrivateFieldGet(_transformer,this))throw new Error("Failed to create ICC color space");_finalizer._.register(this,_classPrivateFieldGet(_transformer,this))}getRgbHex(src,srcOffset){return _classPrivateFieldGet(_convertPixel,this).call(this,src,srcOffset,!0),QCMS._cssColor}getRgbItem(src,srcOffset,dest,destOffset){QCMS._destBuffer=dest,QCMS._destOffset=destOffset,QCMS._destLength=3,_classPrivateFieldGet(_convertPixel,this).call(this,src,srcOffset,!1),QCMS._destBuffer=null}getRgbBuffer(src,srcOffset,count,dest,destOffset,bits,alpha01){if(src=src.subarray(srcOffset,srcOffset+count*this.numComps),8!==bits)for(var scale=255/((1<{qcms_drop_transformer(transformer)})};class CmykICCBasedCS extends IccColorSpace{constructor(){super(new Uint8Array(fetchSync("".concat(_iccUrl._,"CGATS001Compat-v2-micro.icc"))),"DeviceCMYK",4)}static setOptions(_ref4){_ref4=_ref4.iccUrl;_iccUrl._=_assertClassBrand(CmykICCBasedCS,this,_ref4)}static get isUsable(){var isUsable=!1;return IccColorSpace.isUsable&&(_assertClassBrand(CmykICCBasedCS,this,_iccUrl)._?isUsable=!0:warn("No CMYK ICC profile support due to missing `iccUrl` API option")),shadow(this,"isUsable",isUsable)}}var _iccUrl={_:void 0};class Stream extends BaseStream{constructor(arrayBuffer,start,length,dict){super(),this.bytes=arrayBuffer instanceof Uint8Array?arrayBuffer:new Uint8Array(arrayBuffer),this.start=start||0,this.pos=this.start,this.end=start+length||this.bytes.length,this.dict=dict}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(length){var bytes=this.bytes,pos=this.pos,strEnd=this.end;return length?(this.pos=length=strEnd<(length=pos+length)?strEnd:length,bytes.subarray(pos,length)):bytes.subarray(pos,strEnd)}getByteRange(begin,end){return end>this.end&&(end=this.end),this.bytes.subarray(begin=begin<0?0:begin,end)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(start,length){var dict=2=this.end?this.numChunks:Math.floor(position/this.chunkSize)),curChunk=beginChunk;curChunkthis.numChunks)&&chunk!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(chunk))throw new MissingDataException(pos,pos+1);this.lastSuccessfulEnsureByteChunk=chunk}}}ensureRange(begin,end){if(!(end<=begin||end<=this.progressiveDataLength)){var beginChunk=Math.floor(begin/this.chunkSize);if(!(beginChunk>this.numChunks))for(var endChunk=Math.min(Math.floor((end-1)/this.chunkSize)+1,this.numChunks),chunk=beginChunk;chunk=this.end?-1:(pos>=this.progressiveDataLength&&this.ensureByte(pos),this.bytes[this.pos++])}getBytes(length){var bytes=this.bytes,pos=this.pos,strEnd=this.end;return length?((length=strEnd<(length=pos+length)?strEnd:length)>this.progressiveDataLength&&this.ensureRange(pos,length),this.pos=length,bytes.subarray(pos,length)):(strEnd>this.progressiveDataLength&&this.ensureRange(pos,strEnd),bytes.subarray(pos,strEnd))}getByteRange(begin,end){return begin<0&&(begin=0),(end=end>this.end?this.end:end)>this.progressiveDataLength&&this.ensureRange(begin,end),this.bytes.subarray(begin,end)}makeSubStream(start,length){var dict=2this.progressiveDataLength&&this.ensureRange(start,start+length):start>=this.progressiveDataLength&&this.ensureByte(start),(ChunkedStreamSubstream.prototype=Object.create(this)).getMissingChunks=function(){for(var chunkSize=this.chunkSize,beginChunk=Math.floor(this.start/chunkSize),endChunk=Math.floor((this.end-1)/chunkSize)+1,missingChunks=[],chunk=beginChunk;chunk{var readChunk=_ref5=>{var chunkData,{value:_ref5,done}=_ref5;try{done?(chunkData=arrayBuffersToBytes(chunks),chunks=null,resolve(chunkData)):(loaded+=_ref5.byteLength,rangeReader.isStreamingSupported&&this.onProgress({loaded:loaded}),chunks.push(_ref5),rangeReader.read().then(readChunk,reject))}catch(e){reject(e)}};rangeReader.read().then(readChunk,reject)}).then(data=>{this.aborted||this.onReceiveData({chunk:data,begin:begin})})}requestAllChunks(){var missingChunks;return 0{if(!this.aborted)throw reason})}getStream(){return this.stream}requestRange(begin,end){end=Math.min(end,this.length);for(var begin=this.getBeginChunk(begin),endChunk=this.getEndChunk(end),chunks=[],chunk=begin;chunka-b),this._requestChunks(chunksToRequest)}groupChunks(chunks){for(var groupedChunks=[],beginChunk=-1,prevChunk=-1,i=0,ii=chunks.length;i>3,widthRemainder=7&_ref6,srcLength=src.length,dest=new Uint32Array(dest.buffer),destPos=0,i=0;i>2,src32=new Uint32Array(src.buffer,_ref7,len32);if(FeatureTest.isLittleEndian){for(;i>>24|s2<<8|4278190080,dest[destPos+2]=s2>>>16|s3<<16|4278190080,dest[destPos+3]=s3>>>8|4278190080}for(var j=4*i,jj=_ref7+width;j>>8|255,dest[destPos+2]=_s2<<16|_s3>>>16|255,dest[destPos+3]=_s3<<8|255}for(var _j3=4*i,_jj=_ref7+width;_j3<_jj;_j3+=3)dest[destPos++]=src[_j3]<<24|src[_j3+1]<<16|src[_j3+2]<<8|255}return{srcPos:_ref7+width,destPos:destPos}}function grayToRGBA(src,dest){if(FeatureTest.isLittleEndian)for(var i=0,ii=src.length;ithis.MAX_AREA:!(area<_assertClassBrand(ImageResizer,this,_goodSquareLength)._**2)&&(this._areGoodDims(width,height)?(_goodSquareLength._=_assertClassBrand(ImageResizer,this,Math.max(_assertClassBrand(ImageResizer,this,_goodSquareLength)._,Math.floor(Math.sqrt(width*height)))),!1):(_goodSquareLength._=_assertClassBrand(ImageResizer,this,this._guessMax(_assertClassBrand(ImageResizer,this,_goodSquareLength)._,MAX_DIM,MAX_ERROR,0)),(this.MAX_AREA=_assertClassBrand(ImageResizer,this,_goodSquareLength)._**2)>2),_isImageDecoderSupported._=_assertClassBrand(ImageResizer,this,isImageDecoderSupported)}static _areGoodDims(width,height){try{var canvas=new OffscreenCanvas(width,height),ctx=canvas.getContext("2d"),opacity=(ctx.fillRect(0,0,1,1),ctx.getImageData(0,0,1,1).data[3]);return canvas.width=canvas.height=1,0!==opacity}catch(_unused3){return!1}}static _guessMax(start,end,tolerance,defaultHeight){for(;start+tolerance+1(warn("BMP image decoding failed: ".concat(reason)),createImageBitmap(new Blob([this._encodeBMP().buffer],{type:"image/bmp"})))).finally(()=>{decoder.close()}):createImageBitmap(new Blob([_result.buffer],{type:"image/bmp"})),{MAX_AREA,MAX_DIM}=ImageResizer,MAX_DIM=Math.max(width/MAX_DIM,height/MAX_DIM,Math.sqrt(width*height/MAX_AREA)),MAX_AREA=Math.max(MAX_DIM,2),MAX_DIM=Math.round(10*(MAX_DIM+1.25))/10/MAX_AREA,N=Math.floor(Math.log2(MAX_DIM)),steps=new Array(N+2).fill(2),newWidth=(steps[0]=MAX_AREA,steps.splice(-1,1,MAX_DIM/(1<>3,rowSize=3+rowLen&-4;if(rowLen!=rowSize){for(var newData=new Uint8Array(rowSize*height),k=0,_i10=0,ii=height*rowLen;_i10>K,newHeight=height>>K,maxHeight=height;try{rgbaData=new Uint8Array(rgbaSize)}catch(_unused16){for(var n=Math.floor(Math.log2(1+rgbaSize));;)try{rgbaData=new Uint8Array(2**n-1);break}catch(_unused17){--n}rgbaSize=width*(maxHeight=Math.floor((2**n-1)/(4*width)))*4;rgbaSize>K;is instanceof BaseStream))maybeLength+=stream instanceof DecodeStream?stream._rawMinBufferLength:stream.length;super(maybeLength),this.streams=streams,this._onError=onError}readBlock(){var streams=this.streams;if(0===streams.length)this.eof=!0;else{var chunk,streams=streams.shift();try{chunk=streams.getBytes()}catch(reason){if(this._onError)return void this._onError(reason,null==(streams=streams.dict)?void 0:streams.objId);throw reason}var streams=this.bufferLength,newLength=streams+chunk.length;this.ensureBuffer(newLength).set(chunk,streams),this.bufferLength=newLength}}getBaseStreams(){var stream,baseStreamsBuf=[];for(stream of this.streams){var baseStreams=stream.getBaseStreams();baseStreams&&baseStreamsBuf.push(...baseStreams)}return 0>--bitsCount&1;if(255===(bitsData=data[offset++])){var nextByte=data[offset++];if(nextByte){if(220===nextByte&&parseDNLMarker){var scanLines=readUint16(data,offset+=2);if(offset+=2,0>>(bitsCount=7)}function decodeHuffman(tree){for(var node=tree;;){switch(typeof(node=node[readBit()])){case"number":return node;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(length){for(var n=0;0>4;if(0==s){if(rs<15){eobrun=receive(rs)+(1<>4,0==(rs=15&rs))successiveACState=r<15?(eobrun=receive(r)+(1<>4;if(0==s){if(rs<15)break;k+=16}else{rs=dctZigZag[k+=rs];component.blockData[blockOffset+rs]=receiveAndExtend(s),k++}}},mcu=0,mcuExpected=1===componentsLength?components[0].blocksPerLine*components[0].blocksPerColumn:mcusPerLine*frame.mcusPerColumn;mcu<=mcuExpected;){var mcuToRead=resetInterval?Math.min(mcuExpected-mcu,resetInterval):mcuExpected;if(0>10,p[row+1]=t,p[row+2]=t,p[row+3]=t,p[row+4]=t,p[row+5]=t,p[row+6]=t,p[row+7]=t):(p1*=qt[row+1],p2*=qt[row+2],p3*=qt[row+3],p4*=qt[row+4],p5*=qt[row+5],p6*=qt[row+6],p7*=qt[row+7],v1=(v0=(v0=dctSqrt2*p0+128>>8)+(v1=dctSqrt2*p4+128>>8)+1>>1)-v1,t=(v2=p2)*dctSin6+(v3=p6)*dctCos6+128>>8,v2=v2*dctCos6-v3*dctSin6+128>>8,v6=(v4=(v4=dctSqrt1d2*(p1-p7)+128>>8)+(v6=p5<<4)+1>>1)-v6,v5=(v7=(v7=dctSqrt1d2*(p1+p7)+128>>8)+(v5=p3<<4)+1>>1)-v5,v3=(v0=v0+(v3=t)+1>>1)-v3,v2=(v1=v1+v2+1>>1)-v2,t=v4*dctSin3+v7*dctCos3+2048>>12,v4=v4*dctCos3-v7*dctSin3+2048>>12,v7=t,t=v5*dctSin1+v6*dctCos1+2048>>12,v5=v5*dctCos1-v6*dctSin1+2048>>12,v6=t,p[row]=v0+v7,p[row+7]=v0-v7,p[row+1]=v1+v6,p[row+6]=v1-v6,p[row+2]=v2+v5,p[row+5]=v2-v5,p[row+3]=v3+v4,p[row+4]=v3-v4);for(var col=0;col<8;++col)p0=p[col],0==((p1=p[col+8])|(p2=p[col+16])|(p3=p[col+24])|(p4=p[col+32])|(p5=p[col+40])|(p6=p[col+48])|(p7=p[col+56]))?(blockData[blockBufferOffset+col]=t=(t=dctSqrt2*p0+8192>>14)<-2040?0:2024<=t?255:t+2056>>4,blockData[blockBufferOffset+col+8]=t,blockData[blockBufferOffset+col+16]=t,blockData[blockBufferOffset+col+24]=t,blockData[blockBufferOffset+col+32]=t,blockData[blockBufferOffset+col+40]=t,blockData[blockBufferOffset+col+48]=t,blockData[blockBufferOffset+col+56]=t):(v1=(v0=4112+((v0=dctSqrt2*p0+2048>>12)+(v1=dctSqrt2*p4+2048>>12)+1>>1))-v1,t=(v2=p2)*dctSin6+(v3=p6)*dctCos6+2048>>12,v2=v2*dctCos6-v3*dctSin6+2048>>12,v3=t,v6=(v4=(v4=dctSqrt1d2*(p1-p7)+2048>>12)+(v6=p5)+1>>1)-v6,v5=(v7=(v7=dctSqrt1d2*(p1+p7)+2048>>12)+(v5=p3)+1>>1)-v5,t=v4*dctSin3+v7*dctCos3+2048>>12,v4=v4*dctCos3-v7*dctSin3+2048>>12,v7=t,t=v5*dctSin1+v6*dctCos1+2048>>12,v5=v5*dctCos1-v6*dctSin1+2048>>12,(p0=(v0=v0+v3+1>>1)+v7)<16?p0=0:4080<=p0?p0=255:p0>>=4,(p1=(v1=v1+v2+1>>1)+(v6=t))<16?p1=0:4080<=p1?p1=255:p1>>=4,(p2=(v2=v1-v2)+v5)<16?p2=0:4080<=p2?p2=255:p2>>=4,(p3=(v3=v0-v3)+v4)<16?p3=0:4080<=p3?p3=255:p3>>=4,(p4=v3-v4)<16?p4=0:4080<=p4?p4=255:p4>>=4,(p5=v2-v5)<16?p5=0:4080<=p5?p5=255:p5>>=4,(p6=v1-v6)<16?p6=0:4080<=p6?p6=255:p6>>=4,(p7=v0-v7)<16?p7=0:4080<=p7?p7=255:p7>>=4,blockData[blockBufferOffset+col]=p0,blockData[blockBufferOffset+col+8]=p1,blockData[blockBufferOffset+col+16]=p2,blockData[blockBufferOffset+col+24]=p3,blockData[blockBufferOffset+col+32]=p4,blockData[blockBufferOffset+col+40]=p5,blockData[blockBufferOffset+col+48]=p6,blockData[blockBufferOffset+col+56]=p7)}function buildComponentData(frame,component){for(var blocksPerLine=component.blocksPerLine,blocksPerColumn=component.blocksPerColumn,computationBuffer=new Int16Array(64),blockRow=0;blockRow=maxPos)return null;newMarker=readUint16(data,newPos)}return{invalid:startPos.toString(16),marker:newMarker,offset:newPos}}function prepareComponents(frame){var component,mcusPerLine=Math.ceil(frame.samplesPerLine/8/frame.maxH),mcusPerColumn=Math.ceil(frame.scanLines/8/frame.maxV);for(component of frame.components){var blocksPerLine=Math.ceil(Math.ceil(frame.samplesPerLine/8)*component.h/frame.maxH),blocksPerColumn=Math.ceil(Math.ceil(frame.scanLines/8)*component.v/frame.maxV),blocksPerLineForMcu=mcusPerLine*component.h,blocksPerColumnForMcu=mcusPerColumn*component.v;component.blockData=new Int16Array(64*blocksPerColumnForMcu*(1+blocksPerLineForMcu)),component.blocksPerLine=blocksPerLine,component.blocksPerColumn=blocksPerColumn}frame.mcusPerLine=mcusPerLine,frame.mcusPerColumn=mcusPerColumn}function readDataBlock(data,offset){var length=readUint16(data,offset),length=(offset+=2)+length-2,fileMarker=findNextFileMarker(data,length,offset),fileMarker=(null!=fileMarker&&fileMarker.invalid&&(warn("readDataBlock - incorrect length, current marker is: "+fileMarker.invalid),length=fileMarker.offset),data.subarray(offset,length));return{appData:fileMarker,oldOffset:offset,newOffset:offset+fileMarker.length}}function skipData(data,offset){var length=readUint16(data,offset),length=(offset+=2)+length-2,data=findNextFileMarker(data,length,offset);return null!=data&&data.invalid?data.offset:length}class JpegImage{constructor(){var{decodeTransform=null,colorTransform=-1}=0>4==0)for(j=0;j<64;j++)tableData[dctZigZag[j]]=data[offset++];else{if(quantizationTableSpec>>4!=1)throw new JpegError("DQT - invalid table spec");for(j=0;j<64;j++)tableData[dctZigZag[j]]=readUint16(data,offset),offset+=2}quantizationTables[15&quantizationTableSpec]=tableData}break;case 65472:case 65473:case 65474:if(frame)throw new JpegError("Only single frame JPEGs supported");offset+=2,(frame={}).extended=65473===fileMarker,frame.progressive=65474===fileMarker,frame.precision=data[offset++];for(var newOffset=readUint16(data,offset),componentsCount=(offset+=2,frame.scanLines=dnlScanLines||newOffset,frame.samplesPerLine=readUint16(data,offset),offset+=2,frame.components=[],frame.componentIds={},data[offset++]),maxH=0,maxV=0,i=0;i>4,v=15&data[offset+1],qId=(maxH>4==0?huffmanTablesDC:huffmanTablesAC)[15&huffmanTableSpec]=buildHuffmanTable(codeLengths,huffmanValues)}break;case 65501:resetInterval=readUint16(data,offset+=2),offset+=2;break;case 65498:var appData=1==++numSOSMarkers&&!dnlScanLines,selectorsCount=(offset+=2,data[offset++]),components=[];for(i=0;i>4],componentIndex.huffmanTableAC=huffmanTablesAC[15&index],components.push(componentIndex)}var spectralStart=data[offset++],spectralEnd=data[offset++],successiveApproximation=data[offset++];try{offset+=decodeScan(data,offset,frame,components,resetInterval,spectralStart,spectralEnd,successiveApproximation>>4,15&successiveApproximation,appData)}catch(ex){if(ex instanceof DNLMarkerError)return warn("".concat(ex.message," -- attempting to re-parse the JPEG image.")),this.parse(data,{dnlScanLines:ex.scanLines});if(ex instanceof EOIMarkerError){warn("".concat(ex.message," -- ignoring the rest of the image data."));break markerLoop}throw ex}break;case 65500:offset+=4;break;case 65535:255!==data[offset]&&offset--;break;default:spectralStart=findNextFileMarker(data,offset-2,offset-3);if(null!=spectralStart&&spectralStart.invalid){warn("JpegImage.parse - unexpected data, current marker is: "+spectralStart.invalid),offset=spectralStart.offset;break}if(!spectralStart||offset>=data.length-1){warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break markerLoop}throw new JpegError("JpegImage.parse - unknown marker: "+fileMarker.toString(16))}fileMarker=readUint16(data,offset),offset+=2}if(!frame)throw new JpegError("JpegImage.parse - no frame data found.");this.width=frame.samplesPerLine,this.height=frame.scanLines,this.jfif=jfif,this.adobe=adobe,this.components=[];for(_component of frame.components){var quantizationTable=quantizationTables[_component.quantizationId];quantizationTable&&(_component.quantizationTable=quantizationTable),this.components.push({index:_component.index,output:buildComponentData(frame,_component),scaleX:_component.h/frame.maxH,scaleY:_component.v/frame.maxV,blocksPerLine:_component.blocksPerLine,blocksPerColumn:_component.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(width,height){for(var component,componentScaleX,componentScaleY,blocksPerScanline,x,y,j,k,index,output,lastComponentScaleX,isSourcePDF=2>8)+transform[k+1];return data}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(data){for(var Y,Cb,Cr,i=0,length=data.length;i{readyPromiseResolve=resolve,readyPromiseReject=reject}),thisProgram="./this.program",quit_=(status,toThrow)=>{throw toThrow};try{new URL(".",import1.meta.url).href}catch(_unused5){}var wasmMemory,EXITSTATUS,HEAP8,HEAPU8,HEAP32,HEAPU32,out=console.log.bind(console),err=console.error.bind(console),ABORT=!1;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b),new Int16Array(b),HEAPU8=new Uint8Array(b),new Uint16Array(b),HEAP32=new Int32Array(b),HEAPU32=new Uint32Array(b),new Float32Array(b),new Float64Array(b),new BigInt64Array(b),new BigUint64Array(b)}var runDependencies=0,dependenciesFulfilled=null;class ExitStatus{constructor(status){_defineProperty(this,"name","ExitStatus"),this.message="Program terminated with exit(".concat(status,")"),this.status=status}}var callRuntimeCallbacks=callbacks=>{for(;0onPostRuns.push(cb),onPreRuns=[],addOnPreRun=cb=>onPreRuns.push(cb),noExitRuntime=!0,runtimeKeepaliveCounter=0,timers={},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return EXITSTATUS;quit_(1,e)},keepRuntimeAlive=()=>noExitRuntime||0{var _Module$onExit;EXITSTATUS=code,keepRuntimeAlive()||(null!=(_Module$onExit=Module.onExit)&&_Module$onExit.call(Module,code),ABORT=!0),quit_(code,new ExitStatus(code))},_exit=(status,implicit)=>{_proc_exit(EXITSTATUS=status)},maybeExit=()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}};var ENV={},getExecutableName=()=>thisProgram||"./this.program",getEnvStrings=()=>{if(!getEnvStrings.strings){var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:getExecutableName()};for(x in ENV)void 0===ENV[x]?delete env[x]:env[x]=ENV[x];var x,strings=[];for(x in env)strings.push("".concat(x,"=").concat(env[x]));getEnvStrings.strings=strings}return getEnvStrings.strings},stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(0>6}else{if(u<=65535){if(endIdx<=outIdx+2)break;heap[outIdx++]=224|u>>12}else{if(endIdx<=outIdx+3)break;heap[outIdx++]=240|u>>18,heap[outIdx++]=128|u>>12&63}heap[outIdx++]=128|u>>6&63}heap[outIdx++]=128|63&u}}return heap[outIdx]=0,outIdx-startIdx},INT53_MAX=9007199254740992,INT53_MIN=-9007199254740992;var printCharBuffers=[null,[],[]],UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder:void 0,UTF8ArrayToString=function(heapOrArray){for(var idx=1>10,56320|1023&u1)))):str+=String.fromCharCode(u0)}return str},UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Module.print&&(out=Module.print),Module.printErr&&(err=Module.printErr),Module.wasmBinary&&Module.wasmBinary,Module.arguments&&Module.arguments,Module.thisProgram&&(thisProgram=Module.thisProgram),Module.writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var _Module$monitorRunDep,info,wasmImports={l:()=>{var what="",_Module$onAbort=(null!=(_Module$onAbort=Module.onAbort)&&_Module$onAbort.call(Module,what),err(what="Aborted("+what+")"),ABORT=!0,what+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(what));throw readyPromiseReject(_Module$onAbort),_Module$onAbort},k:()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0},m:(which,timeout_ms)=>{var id;return timers[which]&&(clearTimeout(timers[which].id),delete timers[which]),timeout_ms&&(id=setTimeout(()=>{delete timers[which];var func=()=>__emscripten_timeout(which,performance.now());if(!ABORT)try{func(),maybeExit()}catch(e){handleException(e)}},timeout_ms),timers[which]={id:id,timeout_ms:timeout_ms}),0},g:function(compG_ptr,nb_pixels){compG_ptr>>=2;var imageData=Module.imageData=new Uint8ClampedArray(nb_pixels),compG_ptr=HEAP32.subarray(compG_ptr,compG_ptr+nb_pixels);imageData.set(compG_ptr)},f:function(compR_ptr,compG_ptr,compB_ptr,nb_pixels){compR_ptr>>=2,compG_ptr>>=2,compB_ptr>>=2;for(var imageData=Module.imageData=new Uint8ClampedArray(3*nb_pixels),compR=HEAP32.subarray(compR_ptr,compR_ptr+nb_pixels),compG=HEAP32.subarray(compG_ptr,compG_ptr+nb_pixels),compB=HEAP32.subarray(compB_ptr,compB_ptr+nb_pixels),i=0;i>=2,compG_ptr>>=2,compB_ptr>>=2,compA_ptr>>=2;for(var imageData=Module.imageData=new Uint8ClampedArray(4*nb_pixels),compR=HEAP32.subarray(compR_ptr,compR_ptr+nb_pixels),compG=HEAP32.subarray(compG_ptr,compG_ptr+nb_pixels),compB=HEAP32.subarray(compB_ptr,compB_ptr+nb_pixels),compA=HEAP32.subarray(compA_ptr,compA_ptr+nb_pixels),i=0;i{var oldSize=HEAPU8.length;requestedSize>>>=0;if(!(2147483648{size=(size-wasmMemory.buffer.byteLength+65535)/65536|0;try{return wasmMemory.grow(size),updateMemoryViews(),1}catch(e){}})(Math.min(2147483648,(overGrownHeapSize=Math.max(requestedSize,overGrownHeapSize),alignment=65536,Math.ceil(overGrownHeapSize/alignment)*alignment))))return!0}return!1},p:(__environ,environ_buf)=>{var string,bufSize=0,envp=0;for(string of getEnvStrings()){var ptr=environ_buf+bufSize;HEAPU32[__environ+envp>>2]=ptr,bufSize+=stringToUTF8Array(string,HEAPU8,ptr,1/0)+1,envp+=4}return 0},q:(penviron_count,penviron_buf_size)=>{var string,strings=getEnvStrings(),bufSize=(HEAPU32[penviron_count>>2]=strings.length,0);for(string of strings)bufSize+=(str=>{for(var len=0,i=0;i>2]=bufSize,0},b:fd=>52,o:function(fd,offset,whence,newOffset){var num;return offset=(num=offset){for(var stream,curr,buffer,num=0,i=0;i>2],len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j>2]=num,0},r:function(compG_ptr,nb_pixels){compG_ptr>>=2;for(var imageData=Module.imageData=new Uint8ClampedArray(4*nb_pixels),compG=HEAP32.subarray(compG_ptr,compG_ptr+nb_pixels),i=0;i>=2,compA_ptr>>=2;for(var imageData=Module.imageData=new Uint8ClampedArray(4*nb_pixels),compG=HEAP32.subarray(compG_ptr,compG_ptr+nb_pixels),compA=HEAP32.subarray(compA_ptr,compA_ptr+nb_pixels),i=0;i>=2,compG_ptr>>=2,compB_ptr>>=2;for(var imageData=Module.imageData=new Uint8ClampedArray(4*nb_pixels),compR=HEAP32.subarray(compR_ptr,compR_ptr+nb_pixels),compG=HEAP32.subarray(compG_ptr,compG_ptr+nb_pixels),compB=HEAP32.subarray(compB_ptr,compB_ptr+nb_pixels),i=0;i{Module.instantiateWasm(info,(mod,inst)=>{resolve(receiveInstance(mod))})}));function receiveInstance(instance){return wasmExports=instance.exports,wasmMemory=wasmExports.s,updateMemoryViews(),runDependencies--,null!=(instance=Module.monitorRunDependencies)&&instance.call(Module,runDependencies),0==runDependencies&&dependenciesFulfilled&&(instance=dependenciesFulfilled,dependenciesFulfilled=null,instance()),wasmExports}wasmExports.t,Module._malloc=wasmExports.u,Module._free=wasmExports.v,Module._jp2_decode=wasmExports.w;var __emscripten_timeout=wasmExports.x;if(Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);0{setTimeout(()=>Module.setStatus(""),1),doRun()},1)):doRun()}function doRun(){var _Module$onRuntimeInit;if(Module.calledRun=!0,!ABORT){if(wasmExports.t(),readyPromiseResolve(Module),null!=(_Module$onRuntimeInit=Module.onRuntimeInitialized)&&_Module$onRuntimeInit.call(Module),Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}}}(),readyPromise},openjpeg=OpenJPEG;class JpxError extends BaseException{constructor(msg){super(msg,"JpxError")}}class JpxImage{static setOptions(_ref10){var{handler:_ref10,useWasm,useWorkerFetch,wasmUrl}=_ref10;_useWasm2._=_assertClassBrand(JpxImage,this,useWasm),_useWorkerFetch._=_assertClassBrand(JpxImage,this,useWorkerFetch),_wasmUrl2._=_assertClassBrand(JpxImage,this,wasmUrl),useWorkerFetch||(_handler._=_assertClassBrand(JpxImage,this,_ref10))}static async decode(bytes){var promise,{numComponents=4,isIndexedColormap=!1,smaskInData=!1,reducePower=0}=1>>0,Ysiz=stream.getInt32()>>>0,XOsiz=stream.getInt32()>>>0,YOsiz=stream.getInt32()>>>0,stream.skip(16),{width:Xsiz-XOsiz,height:Ysiz-YOsiz,bitsPerComponent:8,componentsCount:stream.getUint16()};throw new JpxError("No size marker found in JPX stream")}}async function _getJsModule(fallbackCallback){var path="".concat(_assertClassBrand(_JpxImage,this,_wasmUrl2)._,"openjpeg_nowasm_fallback.js"),instance=null;try{instance=(await import(path)).default()}catch(e){warn("JpxImage#getJsModule: ".concat(e))}fallbackCallback(instance)}async function _instantiateWasm(fallbackCallback,imports,successCallback){try{return _assertClassBrand(_JpxImage,this,_buffer)._||(_assertClassBrand(_JpxImage,this,_useWorkerFetch)._?_buffer._=_assertClassBrand(_JpxImage,this,await fetchBinaryData("".concat(_assertClassBrand(_JpxImage,this,_wasmUrl2)._).concat("openjpeg.wasm"))):_buffer._=_assertClassBrand(_JpxImage,this,await _assertClassBrand(_JpxImage,this,_handler)._.sendWithPromise("FetchBinaryData",{type:"wasmFactory",filename:"openjpeg.wasm"}))),successCallback((await WebAssembly.instantiate(_assertClassBrand(_JpxImage,this,_buffer)._,imports)).instance)}catch(reason){return warn("JpxImage#instantiateWasm: ".concat(reason)),_assertClassBrand(_JpxImage,this,_getJsModule).call(this,fallbackCallback),null}finally{_handler._=_assertClassBrand(_JpxImage,this,null)}}var _JpxImage=JpxImage,_buffer={_:null},_handler={_:null},_modulePromise={_:null},_useWasm2={_:!0},_useWorkerFetch={_:!0},_wasmUrl2={_:null};function addState(parentState,pattern,checkFn,iterateFn,processFn){for(var state=parentState,i=0,ii=pattern.length-1;i{var argsArray=context.argsArray,op=argsArray[context.iCurr-1][0];return op!==OPS.stroke&&op!==OPS.closeStroke&&op!==OPS.fillStroke&&op!==OPS.eoFillStroke&&op!==OPS.closeFillStroke&&op!==OPS.closeEOFillStroke||1===(op=argsArray[context.iCurr-2])[0]&&0===op[1]&&0===op[2]&&1===op[3]},()=>!1,(context,i)=>{var{fnArray,argsArray}=context,context=context.iCurr,iFirstSave=context-3,args=argsArray[context-1],transform=argsArray[context-2],[,[buffer],context]=args;if(context){Util.scaleMinMax(transform,context);for(var k=0,kk=buffer.length;k=OperatorList.CHUNK_SIZE||this.weight>=OperatorList.CHUNK_SIZE_ABOUT&&(fn===OPS.restore||fn===OPS.endText))&&this.flush()}addImageOps(fn,args,optionalContent){var hasMask=3>>0}function hexToStr(a,size){return 1===size?String.fromCharCode(a[0],a[1]):3===size?String.fromCharCode(a[0],a[1],a[2],a[3]):String.fromCharCode(...a.subarray(0,size+1))}function addHex(a,b,size){for(var c=0,i=size;0<=i;i--)c+=a[i]+b[i],a[i]=255&c,c>>=8}function incHex(a,size){for(var c=1,i=size;0<=i&&0>=8}_defineProperty(_OperatorList=OperatorList,"CHUNK_SIZE",1e3),_defineProperty(OperatorList,"CHUNK_SIZE_ABOUT",_OperatorList.CHUNK_SIZE-5),_defineProperty(OperatorList,"isOffscreenCanvasSupported",!1);var MAX_NUM_SIZE=16,MAX_ENCODED_NUM_SIZE=19;class BinaryCMapStream{constructor(data){this.buffer=data,this.pos=0,this.end=data.length,this.tmpBuf=new Uint8Array(MAX_ENCODED_NUM_SIZE)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){var n=0;do{var b=this.readByte();if(b<0)throw new FormatError("unexpected EOF in bcmap")}while(n=n<<7|127&b,!!(128&b));return n}readSigned(){var n=this.readNumber();return 1&n?~(n>>>1):n>>>1}readHex(num,size){num.set(this.buffer.subarray(this.pos,this.pos+size+1)),this.pos+=size+1}readHexNumber(num,size){var last,stack=this.tmpBuf,sp=0;do{var b=this.readByte();if(b<0)throw new FormatError("unexpected EOF in bcmap")}while(last=!(128&b),stack[sp++]=127&b,!last);for(var i=size,buffer=0,bufferSize=0;0<=i;){for(;bufferSize<8&&0>=8,bufferSize-=8}}readHexSigned(num,size){this.readHexNumber(num,size);for(var sign=1&num[size]?255:0,c=0,i=0;i<=size;i++)c=(1&c)<<8|num[i],num[i]=c>>1^sign}readString(){for(var len=this.readNumber(),buf=new Array(len),i=0;i>5;if(7==type)switch(31&b){case 0:stream.readString();break;case 1:useCMap=stream.readString()}else{var sequence=!!(16&b),dataSize=15&b;if(MAX_NUM_SIZE<1+dataSize)throw new Error("BinaryCMapReader.process: Invalid dataSize.");var subitemsCount=stream.readNumber();switch(type){case 0:stream.readHex(start,dataSize),stream.readHexNumber(end,dataSize),addHex(end,start,dataSize),cMap.addCodespaceRange(1+dataSize,hexToInt(start,dataSize),hexToInt(end,dataSize));for(var i=1;i>=8}}}}class AsciiHexStream extends DecodeStream{constructor(str,maybeLength){maybeLength&&(maybeLength*=.5),super(maybeLength),this.str=str,this.dict=str.dict,this.firstDigit=-1}readBlock(){var bytes=this.str.getBytes(8e3);if(bytes.length){var _ch,maxDecodeLength=bytes.length+1>>1,buffer=this.ensureBuffer(this.bufferLength+maxDecodeLength),bufferLength=this.bufferLength,firstDigit=this.firstDigit;for(_ch of bytes){var digit=void 0;if(48<=_ch&&_ch<=57)digit=15&_ch;else{if(!(65<=_ch&&_ch<=70||97<=_ch&&_ch<=102)){if(62!==_ch)continue;this.eof=!0;break}digit=9+(15&_ch)}firstDigit=firstDigit<0?digit:(buffer[bufferLength++]=firstDigit<<4|digit,-1)}0<=firstDigit&&this.eof&&(buffer[bufferLength++]=firstDigit<<4,firstDigit=-1),this.firstDigit=firstDigit,this.bufferLength=bufferLength}else this.eof=!0}}var ccittEOL=-2,ccittEOF=-1,twoDimPass=0,twoDimHoriz=1,twoDimVert0=2,twoDimVertR1=3,twoDimVertL1=4,twoDimVertR2=5,twoDimVertL2=6,twoDimVertR3=7,twoDimVertL3=8,twoDimTable=[[-1,-1],[-1,-1],[7,twoDimVertL3],[7,twoDimVertR3],[6,twoDimVertL2],[6,twoDimVertL2],[6,twoDimVertR2],[6,twoDimVertR2],[4,twoDimPass],[4,twoDimPass],[4,twoDimPass],[4,twoDimPass],[4,twoDimPass],[4,twoDimPass],[4,twoDimPass],[4,twoDimPass],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimHoriz],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertL1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[3,twoDimVertR1],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0],[1,twoDimVert0]],whiteTable1=[[-1,-1],[12,ccittEOL],[-1,-1],[-1,-1],[-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]],whiteTable2=[[-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]],blackTable1=[[-1,-1],[-1,-1],[12,ccittEOL],[12,ccittEOL],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-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]],blackTable2=[[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]],blackTable3=[[-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]];class CCITTFaxDecoder{constructor(source){var code1,options=1>1==1)break;this._eatBits(1)}this._eatBits(12),0bits?(c<<=bits,1&this.codingPos||(c|=255>>8-bits),this.outputBits-=bits,bits=0):(c<<=this.outputBits,1&this.codingPos||(c|=255>>8-this.outputBits),bits-=this.outputBits,this.outputBits=0,codingLine[this.codingPos]codingLine[codingPos]&&(a1>this.columns&&(info("row is wrong length"),this.err=!0,a1=this.columns),1&codingPos^blackPixels&&++codingPos,codingLine[codingPos]=a1),this.codingPos=codingPos}_addPixelsNeg(a1,blackPixels){var codingLine=this.codingLine,codingPos=this.codingPos;if(a1>codingLine[codingPos])a1>this.columns&&(info("row is wrong length"),this.err=!0,a1=this.columns),1&codingPos^blackPixels&&++codingPos,codingLine[codingPos]=a1;else if(a1>5==0?whiteTable1[code]:whiteTable2[code>>3])[0])return this._eatBits(code[0]),code[1]}else{var code=this._findTableCode(1,9,whiteTable2);if(code[0])return code[1];if((code=this._findTableCode(11,12,whiteTable1))[0])return code[1]}return info("bad white code"),this._eatBits(1),1}_getBlackCode(){if(this.eoblock){if((code=this._lookBits(13))===ccittEOF)return 1;if(0<(code=code>>7==0?blackTable1[code]:code>>9==0&&code>>7!=0?blackTable2[(code>>1)-64]:blackTable3[code>>7])[0])return this._eatBits(code[0]),code[1]}else{var code=this._findTableCode(2,6,blackTable3);if(code[0])return code[1];if((code=this._findTableCode(7,12,blackTable2,64))[0])return code[1];if((code=this._findTableCode(10,13,blackTable1))[0])return code[1]}return info("bad black code"),this._eatBits(1),1}_lookBits(n){for(var c;this.inputBits>16-n;this.inputBuf=this.inputBuf<<8|c,this.inputBits+=8}return this.inputBuf>>this.inputBits-n&65535>>16-n}_eatBits(n){(this.inputBits-=n)<0&&(this.inputBits=0)}}class CCITTFaxStream extends DecodeStream{constructor(str,maybeLength,params){super(maybeLength),this.str=str,this.dict=str.dict,params instanceof Dict||(params=Dict.empty);maybeLength={next(){return str.getByte()}};this.ccittFaxDecoder=new CCITTFaxDecoder(maybeLength,{K:params.get("K"),EndOfLine:params.get("EndOfLine"),EncodedByteAlign:params.get("EncodedByteAlign"),Columns:params.get("Columns"),Rows:params.get("Rows"),EndOfBlock:params.get("EndOfBlock"),BlackIs1:params.get("BlackIs1")})}readBlock(){for(;!this.eof;){var c=this.ccittFaxDecoder.readNextChar();if(-1===c)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=c}}}var codeLenCodeMap=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lengthDecode=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]),distDecode=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]),fixedLitCodeTab=[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,59e4,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],fixedDistCodeTab=[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],_FlateStream_brand=new WeakSet;class FlateStream extends DecodeStream{constructor(str,maybeLength){super(maybeLength),_classPrivateMethodInitSpec(this,_FlateStream_brand),this.str=str,this.dict=str.dict;maybeLength=str.getByte(),str=str.getByte();if(-1===maybeLength||-1===str)throw new FormatError("Invalid header in flate stream: ".concat(maybeLength,", ").concat(str));if(8!=(15&maybeLength))throw new FormatError("Unknown compression method in flate stream: ".concat(maybeLength,", ").concat(str));if(((maybeLength<<8)+str)%31!=0)throw new FormatError("Bad FCHECK in flate stream: ".concat(maybeLength,", ").concat(str));if(32&str)throw new FormatError("FDICT bit set in flate stream: ".concat(maybeLength,", ").concat(str));this.codeSize=0,this.codeBuf=0}async getImageData(length,_decoderOptions){var data=await this.asyncGetBytes();return data?data.length<=length?data:data.subarray(0,length):this.getBytes(length)}async asyncGetBytes(){this.str.reset();var bytes=this.str.getBytes();try{var chunk,{readable,writable}=new DecompressionStream("deflate"),writer=writable.getWriter(),chunks=(await writer.ready,writer.write(bytes).then(async()=>{await writer.ready,await writer.close()}).catch(()=>{}),[]),totalLength=0;for await(chunk of readable)chunks.push(chunk),totalLength+=chunk.byteLength;var _chunk2,data=new Uint8Array(totalLength),offset=0;for(_chunk2 of chunks)data.set(_chunk2,offset),offset+=_chunk2.byteLength;return data}catch(_unused6){return this.str=new Stream(bytes,2,bytes.length,this.str.dict),this.reset(),null}}get isAsync(){return!0}getBits(bits){for(var b,str=this.str,codeSize=this.codeSize,codeBuf=this.codeBuf;codeSize>bits,this.codeSize=codeSize-=bits,b}getCode(table){for(var b,str=this.str,codes=table[0],maxLen=table[1],codeSize=this.codeSize,codeBuf=this.codeBuf;codeSize>16,table&=65535;if(codes<1||codeSize>codes,this.codeSize=codeSize-codes,table}generateHuffmanTable(lengths){var n=lengths.length,maxLen=0;for(i=0;imaxLen&&(maxLen=lengths[i]);for(var size=1<>=1;for(i=code2;i>=1))if(-1===(b=str.getByte()))_assertClassBrand(_FlateStream_brand,this,_endsStreamOnError).call(this,"Bad block header in flate stream");else{var blockLen=b;if(-1===(b=str.getByte()))_assertClassBrand(_FlateStream_brand,this,_endsStreamOnError).call(this,"Bad block header in flate stream");else if(blockLen|=b<<8,-1===(b=str.getByte()))_assertClassBrand(_FlateStream_brand,this,_endsStreamOnError).call(this,"Bad block header in flate stream");else{var check=b;if(-1===(b=str.getByte()))_assertClassBrand(_FlateStream_brand,this,_endsStreamOnError).call(this,"Bad block header in flate stream");else{if((check|=b<<8)!=(65535&~blockLen)&&(0!=blockLen||0!=check))throw new FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;var b=this.bufferLength,check=b+blockLen,buffer=this.ensureBuffer(check);this.bufferLength=check,0==blockLen?-1===str.peekByte()&&(this.eof=!0):(check=str.getBytes(blockLen),buffer.set(check,b),check.length>16,dist=(len=(65535&code1)+(code2=0>16)?this.getBits(code2):code2));limit<=pos+len&&(limit=(buffer=this.ensureBuffer(pos+len)).length);for(var k=0;k>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){var data=this.data,bp=this.bp;255===data[bp]?143>16,this.clow&=65535)}readBit(contexts,pos){var d,cx_index=contexts[pos]>>1,cx_mps=1&contexts[pos],qeTableIcx=QeTable[cx_index],qeIcx=qeTableIcx.qe,a=this.a-qeIcx;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--,0==(32768&a););return this.a=a,contexts[pos]=cx_index<<1|cx_mps,d}}class Jbig2Error extends BaseException{constructor(msg){super(msg,"Jbig2Error")}}class ContextCache{getContexts(id){return id in this?this[id]:this[id]=new Int8Array(65536)}}class DecodingContext{constructor(data,start,end){this.data=data,this.start=start,this.end=end}get decoder(){return shadow(this,"decoder",new ArithmeticDecoder(this.data,this.start,this.end))}get contextCache(){return shadow(this,"contextCache",new ContextCache)}}function decodeInteger(contextCache,procedure,decoder){var contexts=contextCache.getContexts(procedure),prev=1;function readBits(length){for(var v=0,i=0;i>>0}var signedValue,contextCache=readBits(1),procedure=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);return 0===contextCache?signedValue=procedure:0a.y-b.y||a.x-b.x),template.length),templateX=new Int8Array(templateLength),templateY=new Int8Array(templateLength),changingTemplateEntries=[],reuseMask=0,minX=0,maxX=0,minY=0,k=0;k>1)+decodeInteger(contextCache,"IARDX",decoder),(applyRefinement>>1)+decodeInteger(contextCache,"IARDY",decoder),!1,refinementAt,decodingContext)),0),offsetT=(transposed?1&referenceCorner?symbolId=symbolHeight-1:currentS+=symbolHeight-1:1>8,0<=(x=gridOffsetX+mg*gridVectorY+ng*gridVectorX>>8)&&x+patternWidth<=regionWidth&&0<=y&&y+patternHeight<=regionHeight)for(i=0;i>5&7,retainBits=[31&referredFlags],position=start+6;if(7===referredFlags){referredToCount=536870911&readUint32(data,position-1),position+=3;var bytes=referredToCount+7>>3;for(retainBits[0]=data[position++];0<--bytes;)retainBits.push(data[position++])}else if(5===referredFlags||6===referredFlags)throw new Jbig2Error("invalid referred-to flags");segmentHeader.retainBits=retainBits;for(var ii,referredToSegmentNumberSize=4,referredTo=(segmentHeader.number<=256?referredToSegmentNumberSize=1:segmentHeader.number<=65536&&(referredToSegmentNumberSize=2),[]),i=0;i>>24&255,searchPattern[3]=start.height>>16&255,searchPattern[4]=start.height>>8&255,searchPattern[5]=255&start.height,i=position,ii=data.length;i>2&3,dictionary.huffmanDWSelector=dictionaryFlags>>4&3,dictionary.bitmapSizeSelector=dictionaryFlags>>6&1,dictionary.aggregationInstancesSelector=dictionaryFlags>>7&1,dictionary.bitmapCodingContextUsed=!!(256&dictionaryFlags),dictionary.bitmapCodingContextRetained=!!(512&dictionaryFlags),dictionary.template=dictionaryFlags>>10&3,dictionary.refinementTemplate=dictionaryFlags>>12&1,position+=2,!dictionary.huffman){for(atLength=0===dictionary.template?4:1,at=[],i=0;i>2&3,dictionaryFlags.stripSize=1<>4&3,dictionaryFlags.transposed=!!(64&dictionary),dictionaryFlags.combinationOperator=dictionary>>7&3,dictionaryFlags.defaultPixelValue=dictionary>>9&1,dictionaryFlags.dsOffset=dictionary<<17>>27,dictionaryFlags.refinementTemplate=dictionary>>15&1,dictionaryFlags.huffman&&(dictionary=readUint16(data,position),position+=2,dictionaryFlags.huffmanFS=3&dictionary,dictionaryFlags.huffmanDS=dictionary>>2&3,dictionaryFlags.huffmanDT=dictionary>>4&3,dictionaryFlags.huffmanRefinementDW=dictionary>>6&3,dictionaryFlags.huffmanRefinementDH=dictionary>>8&3,dictionaryFlags.huffmanRefinementDX=dictionary>>10&3,dictionaryFlags.huffmanRefinementDY=dictionary>>12&3,dictionaryFlags.huffmanRefinementSizeSelector=!!(16384&dictionary)),dictionaryFlags.refinement&&!dictionaryFlags.refinementTemplate){for(at=[],i=0;i<2;i++)at.push({x:readInt8(data,position),y:readInt8(data,position+1)}),position+=2;dictionaryFlags.refinementAt=at}dictionaryFlags.numberOfSymbolInstances=readUint32(data,position),args=[dictionaryFlags,header.referredTo,data,position+=4,end];break;case 16:dictionary={},dictionaryFlags=data[position++];dictionary.mmr=!!(1&dictionaryFlags),dictionary.template=dictionaryFlags>>1&3,dictionary.patternWidth=data[position++],dictionary.patternHeight=data[position++],dictionary.maxPatternIndex=readUint32(data,position),args=[dictionary,header.number,data,position+=4,end];break;case 22:case 23:dictionaryFlags={},dictionary=(dictionaryFlags.info=readRegionSegmentInformation(data,position),position+=RegionSegmentInformationFieldLength,data[position++]);dictionaryFlags.mmr=!!(1&dictionary),dictionaryFlags.template=dictionary>>1&3,dictionaryFlags.enableSkip=!!(8&dictionary),dictionaryFlags.combinationOperator=dictionary>>4&7,dictionaryFlags.defaultPixelValue=dictionary>>7&1,dictionaryFlags.gridWidth=readUint32(data,position),dictionaryFlags.gridHeight=readUint32(data,position+=4),dictionaryFlags.gridOffsetX=4294967295&readUint32(data,position+=4),dictionaryFlags.gridOffsetY=4294967295&readUint32(data,position+=4),dictionaryFlags.gridVectorX=readUint16(data,position+=4),dictionaryFlags.gridVectorY=readUint16(data,position+=2),args=[dictionaryFlags,header.referredTo,data,position+=2,end];break;case 38:case 39:dictionary={},dictionaryFlags=(dictionary.info=readRegionSegmentInformation(data,position),position+=RegionSegmentInformationFieldLength,data[position++]);if(dictionary.mmr=!!(1&dictionaryFlags),dictionary.template=dictionaryFlags>>1&3,dictionary.prediction=!!(8&dictionaryFlags),!dictionary.mmr){for(atLength=0===dictionary.template?4:1,at=[],i=0;i>2&1,dictionaryFlags.combinationOperator=dictionary>>3&3,dictionaryFlags.requiresBuffer=!!(32&dictionary),dictionaryFlags.combinationOperatorOverride=!!(64&dictionary),args=[dictionaryFlags];break;case 49:case 50:case 51:break;case 53:args=[header.number,data,position,end];break;case 62:break;default:throw new Jbig2Error("segment type ".concat(header.typeName,"(").concat(header.type,") is not implemented"))}segment="on"+header.typeName;segment in visitor&&visitor[segment].apply(visitor,args)}function processSegments(segments,visitor){for(var i=0,ii=segments.length;i>3,rowSize=new Uint8ClampedArray(rowSize*info.height);info.defaultPixelValue&&rowSize.fill(255),this.buffer=rowSize}drawBitmap(regionInfo,bitmap){var i,j,mask,offset,pageInfo=this.currentPageInfo,width=regionInfo.width,height=regionInfo.height,rowSize=pageInfo.width+7>>3,combinationOperator=(pageInfo.combinationOperatorOverride?regionInfo:pageInfo).combinationOperator,buffer=this.buffer,mask0=128>>(7®ionInfo.x),offset0=regionInfo.y*rowSize+(regionInfo.x>>3);switch(combinationOperator){case 0:for(i=0;i>=1)||(mask=128,offset++);offset0+=rowSize}break;case 2:for(i=0;i>=1)||(mask=128,offset++);offset0+=rowSize}break;default:throw new Jbig2Error("operator ".concat(combinationOperator," is not supported"))}}onImmediateGenericRegion(region,data,start,end){var regionInfo=region.info,data=new DecodingContext(data,start,end),start=decodeBitmap(region.mmr,regionInfo.width,regionInfo.height,region.template,region.prediction,null,region.at,data);this.drawBitmap(regionInfo,start)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(dictionary,currentSegment,referredSegments,data,start,end){dictionary.huffman&&(huffmanTables=getSymbolDictionaryHuffmanTables(dictionary,referredSegments,this.customTables),huffmanInput=new Reader(data,start,end));var huffmanTables,huffmanInput,referredSegment,symbols=this.symbols,inputSymbols=(symbols||(this.symbols=symbols={}),[]);for(referredSegment of referredSegments){var referredSymbols=symbols[referredSegment];referredSymbols&&inputSymbols.push(...referredSymbols)}referredSegments=new DecodingContext(data,start,end);symbols[currentSegment]=decodeSymbolDictionary(dictionary.huffman,dictionary.refinement,inputSymbols,dictionary.numberOfNewSymbols,dictionary.numberOfExportedSymbols,huffmanTables,dictionary.template,dictionary.at,dictionary.refinementTemplate,dictionary.refinementAt,referredSegments,huffmanInput)}onImmediateTextRegion(region,referredSegments,data,start,end){var huffmanTables,huffmanInput,referredSegment,regionInfo=region.info,symbols=this.symbols,inputSymbols=[];for(referredSegment of referredSegments){var referredSymbols=symbols[referredSegment];referredSymbols&&inputSymbols.push(...referredSymbols)}var symbolCodeLength=log2(inputSymbols.length),referredSegments=(region.huffman&&(huffmanInput=new Reader(data,start,end),huffmanTables=getTextRegionHuffmanTables(region,referredSegments,this.customTables,inputSymbols.length,huffmanInput)),new DecodingContext(data,start,end)),data=decodeTextRegion(region.huffman,region.refinement,regionInfo.width,regionInfo.height,region.defaultPixelValue,region.numberOfSymbolInstances,region.stripSize,inputSymbols,symbolCodeLength,region.transposed,region.dsOffset,region.referenceCorner,region.combinationOperator,huffmanTables,region.refinementTemplate,region.refinementAt,referredSegments,region.logStripSize,huffmanInput);this.drawBitmap(regionInfo,data)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(dictionary,currentSegment,data,start,end){var patterns=this.patterns,data=(patterns||(this.patterns=patterns={}),new DecodingContext(data,start,end));patterns[currentSegment]=decodePatternDictionary(dictionary.mmr,dictionary.patternWidth,dictionary.patternHeight,dictionary.maxPatternIndex,dictionary.template,data)}onImmediateHalftoneRegion(region,referredSegments,data,start,end){var referredSegments=this.patterns[referredSegments[0]],regionInfo=region.info,data=new DecodingContext(data,start,end),start=decodeHalftoneRegion(region.mmr,referredSegments,region.template,regionInfo.width,regionInfo.height,region.defaultPixelValue,region.enableSkip,region.combinationOperator,region.gridWidth,region.gridHeight,region.gridOffsetX,region.gridOffsetY,region.gridVectorX,region.gridVectorY,data);this.drawBitmap(regionInfo,start)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(currentSegment,data,start,end){var customTables=this.customTables;customTables||(this.customTables=customTables={}),customTables[currentSegment]=decodeTablesSegment(data,start,end)}}class HuffmanLine{constructor(lineData){2===lineData.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=lineData[0],this.rangeLength=0,this.prefixCode=lineData[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=lineData[0],this.prefixLength=lineData[1],this.rangeLength=lineData[2],this.prefixCode=lineData[3],this.isLowerRange="lower"===lineData[4])}}class HuffmanTreeNode{constructor(line){this.children=[],line?(this.isLeaf=!0,this.rangeLength=line.rangeLength,this.rangeLow=line.rangeLow,this.isLowerRange=line.isLowerRange,this.isOOB=line.isOOB):this.isLeaf=!1}buildTree(line,shift){var node,bit=line.prefixCode>>shift&1;shift<=0?this.children[bit]=new HuffmanTreeNode(line):((node=this.children[bit])||(this.children[bit]=node=new HuffmanTreeNode(null)),node.buildTree(line,shift-1))}decodeNode(reader){if(this.isLeaf)return this.isOOB?null:(htOffset=reader.readBits(this.rangeLength),this.rangeLow+(this.isLowerRange?-htOffset:htOffset));var htOffset=this.children[reader.readBit()];if(htOffset)return htOffset.decodeNode(reader);throw new Jbig2Error("invalid Huffman data")}}class HuffmanTable{constructor(lines,prefixCodesDone){prefixCodesDone||this.assignPrefixCodes(lines),this.rootNode=new HuffmanTreeNode(null);for(var i=0,ii=lines.length;i>1&7),rangeSizeBits=1+(flags>>4&7),lines=[],currentRangeLow=lowestValue;prefixLength=reader.readBits(prefixSizeBits),rangeLength=reader.readBits(rangeSizeBits),lines.push(new HuffmanLine([currentRangeLow,prefixLength,rangeLength,0])),(currentRangeLow+=1<=this.end)throw new Jbig2Error("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var bit=this.currentByte>>this.shift&1;return this.shift--,bit}readBits(numBits){for(var result=0,i=numBits-1;0<=i;i--)result|=this.readBit()<=this.end?-1:this.data[this.position++]}}function getCustomHuffmanTable(index,referredTo,customTables){for(var currentIndex=0,i=0,ii=referredTo.length;i>shift&1,shift--;if(endOfBlock&&!eof)for(var i=0;i<5&&-1!==decoder.readNextChar();i++);return bitmap}class Jbig2Image{parseChunks(chunks){return parseJbig2Chunks(chunks)}parse(data){throw new Error("Not implemented: Jbig2Image.parse")}}class Jbig2Stream extends DecodeStream{constructor(stream,maybeLength,params){super(maybeLength),this.stream=stream,this.dict=stream.dict,this.maybeLength=maybeLength,this.params=params}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(requested){}readBlock(){this.decodeImage()}decodeImage(bytes){if(!this.eof){bytes=bytes||this.bytes;for(var globalsStream,jbig2Image=new Jbig2Image,chunks=[],data=(this.params instanceof Dict&&(globalsStream=this.params.get("JBIG2Globals"))instanceof BaseStream&&(globalsStream=globalsStream.getBytes(),chunks.push({data:globalsStream,start:0,end:globalsStream.length})),chunks.push({data:bytes,start:0,end:bytes.length}),jbig2Image.parseChunks(chunks)),dataLength=data.length,i=0;i>>bitsCached&(1<>3,this.rowBytes=params*maybeLength*str+7>>3,this}readBlockTiff(){var rowBytes=this.rowBytes,bufferLength=this.bufferLength,buffer=this.ensureBuffer(bufferLength+rowBytes),bits=this.bits,colors=this.colors,rawBytes=this.str.getBytes(rowBytes);if(this.eof=!rawBytes.length,!this.eof){var inbuf=0,outbuf=0,inbits=0,outbits=0,pos=bufferLength;if(1===bits&&1===colors)for(i=0;i>1)^c>>2)^c>>4))<<7;buffer[pos++]=c}else if(8===bits){for(i=0;i>8&255,buffer[pos++]=255&sum}}else{var compArray=new Uint8Array(colors+1),bitMask=(1<>inbits-bits)&bitMask,inbits-=bits,outbuf=outbuf<>outbits-8&255,outbits-=8);0>1)+rawBytes[i];for(;i>1)+rawBytes[i]&255,j++;break;case 4:for(i=0;i>")&&this.buf1!==EOF;)if(this.buf1 instanceof Name){var key=this.buf1.name;if(this.shift(),this.buf1===EOF)break;dict.set(key,this.getObj(cipherTransform))}else info("Malformed dictionary: key must be a name object"),this.shift();if(this.buf1!==EOF)return isCmd(this.buf2,"stream")?this.allowStreams?this.makeStream(dict,cipherTransform):dict:(this.shift(),dict);if(this.recoveryMode)return dict;throw new ParserEOFException("End of file inside dictionary.");default:return buf1}return Number.isInteger(buf1)?Number.isInteger(this.buf1)&&isCmd(this.buf2,"R")?(ref=Ref.get(buf1,this.buf1),this.shift(),this.shift(),ref):buf1:"string"==typeof buf1&&cipherTransform?cipherTransform.decryptString(buf1):buf1}findDefaultInlineStreamEnd(stream){for(var ch,knownCommands=this.lexer["knownCommands"],startPos=stream.pos,state=0;-1!==(ch=stream.getByte());)if(0===state)state=69===ch?1:0;else if(1===state)state=73===ch?2:0;else if(32===ch||10===ch||13===ch){var maybeEIPos=stream.pos,followingBytes=stream.peekBytes(15),ii=followingBytes.length;if(0===ii)break;for(var i=0;i{},0);;){var nextObj=tmpLexer.getObj();if(nextObj===EOF){state=0;break}if(nextObj instanceof Cmd){nextObj=knownCommands[nextObj.cmd];if(!nextObj){state=0;break}if(nextObj.variableArgs?numArgs<=nextObj.numArgs:numArgs===nextObj.numArgs)break;numArgs=0}else numArgs++}if(2===state)break}else warn("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.")}else state=0;-1===ch&&(warn("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),maybeEIPos)&&(warn('... trying to recover by using the last "EI" occurrence.'),stream.skip(-(stream.pos-maybeEIPos)));var endOffset=4;return stream.skip(-endOffset),ch=stream.peekByte(),stream.skip(endOffset),isWhiteSpace(ch)||endOffset--,stream.pos-endOffset-startPos}findDCTDecodeInlineStreamEnd(stream){for(var b,markerLength,startPos=stream.pos,foundEOI=!1;-1!==(b=stream.getByte());)if(255===b){switch(stream.getByte()){case 0:break;case 255:stream.skip(-1);break;case 217:foundEOI=!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:2<(markerLength=stream.getUint16())?stream.skip(markerLength-2):stream.skip(-2)}if(foundEOI)break}startPos=stream.pos-startPos;return-1===b?(warn("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),stream.skip(-startPos),this.findDefaultInlineStreamEnd(stream)):(this.inlineStreamSkipEI(stream),startPos)}findASCII85DecodeInlineStreamEnd(stream){for(var startPos=stream.pos;-1!==(ch=stream.getByte());)if(126===ch){for(var tildePos=stream.pos,ch=stream.peekByte();isWhiteSpace(ch);)stream.skip(),ch=stream.peekByte();if(62===ch){stream.skip();break}if(stream.pos>tildePos){tildePos=stream.peekBytes(2);if(69===tildePos[0]&&73===tildePos[1])break}}startPos=stream.pos-startPos;return-1===ch?(warn("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),stream.skip(-startPos),this.findDefaultInlineStreamEnd(stream)):(this.inlineStreamSkipEI(stream),startPos)}findASCIIHexDecodeInlineStreamEnd(stream){for(var ch,startPos=stream.pos;-1!==(ch=stream.getByte())&&62!==ch;);startPos=stream.pos-startPos;return-1===ch?(warn("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),stream.skip(-startPos),this.findDefaultInlineStreamEnd(stream)):(this.inlineStreamSkipEI(stream),startPos)}inlineStreamSkipEI(stream){for(var ch,state=0;-1!==(ch=stream.getByte());)if(0===state)state=69===ch?1:0;else if(1===state)state=73===ch?2:0;else if(2===state)break}makeInlineImage(cipherTransform){for(var lexer=this.lexer,stream=lexer.stream,dictMap=Object.create(null);!isCmd(this.buf1,"ID")&&this.buf1!==EOF;){if(!(this.buf1 instanceof Name))throw new FormatError("Dictionary key must be a name object");var key=this.buf1.name;if(this.shift(),this.buf1===EOF)break;dictMap[key]=this.getObj(cipherTransform)}-1!==lexer.beginInlineImagePos&&(dictLength=stream.pos-lexer.beginInlineImagePos);var length,cacheKey,filter=this.xref.fetchIfRef(dictMap.F||dictMap.Filter),filter=(filter instanceof Name?filterName=filter.name:Array.isArray(filter)&&(filter=this.xref.fetchIfRef(filter[0]))instanceof Name&&(filterName=filter.name),stream.pos);switch(filterName){case"DCT":case"DCTDecode":length=this.findDCTDecodeInlineStreamEnd(stream);break;case"A85":case"ASCII85Decode":length=this.findASCII85DecodeInlineStreamEnd(stream);break;case"AHx":case"ASCIIHexDecode":length=this.findASCIIHexDecodeInlineStreamEnd(stream);break;default:length=this.findDefaultInlineStreamEnd(stream)}if(length>")):Cmd.get(">");case 123:return this.nextChar(),Cmd.get("{");case 125:return this.nextChar(),Cmd.get("}");case 41:throw this.nextChar(),new FormatError("Illegal character: ".concat(ch))}var str=String.fromCharCode(ch);if(ch<32||127>>0,codespaceRange=codespaceRanges[n],k=0,kk=codespaceRange.length;k>>0}function expectString(obj){if("string"!=typeof obj)throw new FormatError("Malformed CMap: expected string.")}function expectInt(obj){if(!Number.isInteger(obj))throw new FormatError("Malformed CMap: expected int.")}function parseBfChar(cMap,lexer){for(;;){var obj=lexer.getObj();if(obj===EOF)break;if(isCmd(obj,"endbfchar"))return;expectString(obj);var src=strToInt(obj);expectString(obj=lexer.getObj()),cMap.mapOne(src,obj)}}function parseBfRange(cMap,lexer){for(;;){if((obj=lexer.getObj())===EOF)break;if(isCmd(obj,"endbfrange"))return;expectString(obj);var low=strToInt(obj),high=(expectString(obj=lexer.getObj()),strToInt(obj));if(obj=lexer.getObj(),Number.isInteger(obj)||"string"==typeof obj){var dstLow=Number.isInteger(obj)?String.fromCharCode(obj):obj;cMap.mapBfRange(low,high,dstLow)}else{if(!isCmd(obj,"["))break;for(var obj=lexer.getObj(),array=[];!isCmd(obj,"]")&&obj!==EOF;)array.push(obj),obj=lexer.getObj();cMap.mapBfRangeToArray(low,high,array)}}throw new FormatError("Invalid bf range.")}function parseCidChar(cMap,lexer){for(;;){var obj=lexer.getObj();if(obj===EOF)break;if(isCmd(obj,"endcidchar"))return;expectString(obj);var src=strToInt(obj);expectInt(obj=lexer.getObj()),cMap.mapOne(src,obj)}}function parseCidRange(cMap,lexer){for(;;){var obj=lexer.getObj();if(obj===EOF)break;if(isCmd(obj,"endcidrange"))return;expectString(obj);var low=strToInt(obj),high=(expectString(obj=lexer.getObj()),strToInt(obj));expectInt(obj=lexer.getObj()),cMap.mapCidRange(low,high,obj)}}function parseCodespaceRange(cMap,lexer){for(;;){var obj=lexer.getObj();if(obj===EOF)break;if(isCmd(obj,"endcodespacerange"))return;if("string"!=typeof obj)break;var low=strToInt(obj);if("string"!=typeof(obj=lexer.getObj()))break;var high=strToInt(obj);cMap.addCodespaceRange(obj.length,low,high)}throw new FormatError("Invalid codespace range.")}function parseWMode(cMap,lexer){lexer=lexer.getObj();Number.isInteger(lexer)&&(cMap.vertical=!!lexer)}function parseCMapName(cMap,lexer){lexer=lexer.getObj();lexer instanceof Name&&(cMap.name=lexer.name)}async function parseCMap(cMap,lexer,fetchBuiltInCMap,useCMap){var previous,embeddedUseCMap;objLoop:for(;;)try{var obj=lexer.getObj();if(obj===EOF)break;if(obj instanceof Name)"WMode"===obj.name?parseWMode(cMap,lexer):"CMapName"===obj.name&&parseCMapName(cMap,lexer),previous=obj;else if(obj instanceof Cmd)switch(obj.cmd){case"endcmap":break objLoop;case"usecmap":previous instanceof Name&&(embeddedUseCMap=previous.name);break;case"begincodespacerange":parseCodespaceRange(cMap,lexer);break;case"beginbfchar":parseBfChar(cMap,lexer);break;case"begincidchar":parseCidChar(cMap,lexer);break;case"beginbfrange":parseBfRange(cMap,lexer);break;case"begincidrange":parseCidRange(cMap,lexer)}}catch(ex){if(ex instanceof MissingDataException)throw ex;warn("Invalid cMap data: "+ex);continue}return(useCMap=!useCMap&&embeddedUseCMap?embeddedUseCMap:useCMap)?extendCMap(cMap,fetchBuiltInCMap,useCMap):cMap}async function extendCMap(cMap,fetchBuiltInCMap,useCMap){if(cMap.useCMap=await createBuiltInCMap(useCMap,fetchBuiltInCMap),0===cMap.numCodespaceRanges){for(var useCodespaceRanges=cMap.useCMap.codespaceRanges,i=0;iextendCMap(cMap,fetchBuiltInCMap,useCMap)):(isCompressed=new Lexer(new Stream(name)),parseCMap(cMap,isCompressed,fetchBuiltInCMap,null));throw new Error("Built-in CMap parameters are not provided.")}class CMapFactory{static async create(_ref13){var{encoding:_ref13,fetchBuiltInCMap,useCMap}=_ref13;if(_ref13 instanceof Name)return createBuiltInCMap(_ref13.name,fetchBuiltInCMap);if(_ref13 instanceof BaseStream)return(_ref13=await parseCMap(new CMap,new Lexer(_ref13),fetchBuiltInCMap,useCMap)).isIdentityCMap?createBuiltInCMap(_ref13.name,fetchBuiltInCMap):_ref13;throw new Error("Encoding required.")}}var ExpertEncoding=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],MacExpertEncoding=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","","",""],MacRomanEncoding=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],StandardEncoding=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","","",""],WinAnsiEncoding=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],SymbolSetEncoding=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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",""],ZapfDingbatsEncoding=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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",""];function getEncoding(encodingName){switch(encodingName){case"WinAnsiEncoding":return WinAnsiEncoding;case"StandardEncoding":return StandardEncoding;case"MacRomanEncoding":return MacRomanEncoding;case"SymbolSetEncoding":return SymbolSetEncoding;case"ZapfDingbatsEncoding":return ZapfDingbatsEncoding;case"ExpertEncoding":return ExpertEncoding;case"MacExpertEncoding":return MacExpertEncoding;default:return null}}var getGlyphsUnicode=getLookupTableFactory(function(t){t.A=65,t.AE=198,t.AEacute=508,t.AEmacron=482,t.AEsmall=63462,t.Aacute=193,t.Aacutesmall=63457,t.Abreve=258,t.Abreveacute=7854,t.Abrevecyrillic=1232,t.Abrevedotbelow=7862,t.Abrevegrave=7856,t.Abrevehookabove=7858,t.Abrevetilde=7860,t.Acaron=461,t.Acircle=9398,t.Acircumflex=194,t.Acircumflexacute=7844,t.Acircumflexdotbelow=7852,t.Acircumflexgrave=7846,t.Acircumflexhookabove=7848,t.Acircumflexsmall=63458,t.Acircumflextilde=7850,t.Acute=63177,t.Acutesmall=63412,t.Acyrillic=1040,t.Adblgrave=512,t.Adieresis=196,t.Adieresiscyrillic=1234,t.Adieresismacron=478,t.Adieresissmall=63460,t.Adotbelow=7840,t.Adotmacron=480,t.Agrave=192,t.Agravesmall=63456,t.Ahookabove=7842,t.Aiecyrillic=1236,t.Ainvertedbreve=514,t.Alpha=913,t.Alphatonos=902,t.Amacron=256,t.Amonospace=65313,t.Aogonek=260,t.Aring=197,t.Aringacute=506,t.Aringbelow=7680,t.Aringsmall=63461,t.Asmall=63329,t.Atilde=195,t.Atildesmall=63459,t.Aybarmenian=1329,t.B=66,t.Bcircle=9399,t.Bdotaccent=7682,t.Bdotbelow=7684,t.Becyrillic=1041,t.Benarmenian=1330,t.Beta=914,t.Bhook=385,t.Blinebelow=7686,t.Bmonospace=65314,t.Brevesmall=63220,t.Bsmall=63330,t.Btopbar=386,t.C=67,t.Caarmenian=1342,t.Cacute=262,t.Caron=63178,t.Caronsmall=63221,t.Ccaron=268,t.Ccedilla=199,t.Ccedillaacute=7688,t.Ccedillasmall=63463,t.Ccircle=9400,t.Ccircumflex=264,t.Cdot=266,t.Cdotaccent=266,t.Cedillasmall=63416,t.Chaarmenian=1353,t.Cheabkhasiancyrillic=1212,t.Checyrillic=1063,t.Chedescenderabkhasiancyrillic=1214,t.Chedescendercyrillic=1206,t.Chedieresiscyrillic=1268,t.Cheharmenian=1347,t.Chekhakassiancyrillic=1227,t.Cheverticalstrokecyrillic=1208,t.Chi=935,t.Chook=391,t.Circumflexsmall=63222,t.Cmonospace=65315,t.Coarmenian=1361,t.Csmall=63331,t.D=68,t.DZ=497,t.DZcaron=452,t.Daarmenian=1332,t.Dafrican=393,t.Dcaron=270,t.Dcedilla=7696,t.Dcircle=9401,t.Dcircumflexbelow=7698,t.Dcroat=272,t.Ddotaccent=7690,t.Ddotbelow=7692,t.Decyrillic=1044,t.Deicoptic=1006,t.Delta=8710,t.Deltagreek=916,t.Dhook=394,t.Dieresis=63179,t.DieresisAcute=63180,t.DieresisGrave=63181,t.Dieresissmall=63400,t.Digammagreek=988,t.Djecyrillic=1026,t.Dlinebelow=7694,t.Dmonospace=65316,t.Dotaccentsmall=63223,t.Dslash=272,t.Dsmall=63332,t.Dtopbar=395,t.Dz=498,t.Dzcaron=453,t.Dzeabkhasiancyrillic=1248,t.Dzecyrillic=1029,t.Dzhecyrillic=1039,t.E=69,t.Eacute=201,t.Eacutesmall=63465,t.Ebreve=276,t.Ecaron=282,t.Ecedillabreve=7708,t.Echarmenian=1333,t.Ecircle=9402,t.Ecircumflex=202,t.Ecircumflexacute=7870,t.Ecircumflexbelow=7704,t.Ecircumflexdotbelow=7878,t.Ecircumflexgrave=7872,t.Ecircumflexhookabove=7874,t.Ecircumflexsmall=63466,t.Ecircumflextilde=7876,t.Ecyrillic=1028,t.Edblgrave=516,t.Edieresis=203,t.Edieresissmall=63467,t.Edot=278,t.Edotaccent=278,t.Edotbelow=7864,t.Efcyrillic=1060,t.Egrave=200,t.Egravesmall=63464,t.Eharmenian=1335,t.Ehookabove=7866,t.Eightroman=8551,t.Einvertedbreve=518,t.Eiotifiedcyrillic=1124,t.Elcyrillic=1051,t.Elevenroman=8554,t.Emacron=274,t.Emacronacute=7702,t.Emacrongrave=7700,t.Emcyrillic=1052,t.Emonospace=65317,t.Encyrillic=1053,t.Endescendercyrillic=1186,t.Eng=330,t.Enghecyrillic=1188,t.Enhookcyrillic=1223,t.Eogonek=280,t.Eopen=400,t.Epsilon=917,t.Epsilontonos=904,t.Ercyrillic=1056,t.Ereversed=398,t.Ereversedcyrillic=1069,t.Escyrillic=1057,t.Esdescendercyrillic=1194,t.Esh=425,t.Esmall=63333,t.Eta=919,t.Etarmenian=1336,t.Etatonos=905,t.Eth=208,t.Ethsmall=63472,t.Etilde=7868,t.Etildebelow=7706,t.Euro=8364,t.Ezh=439,t.Ezhcaron=494,t.Ezhreversed=440,t.F=70,t.Fcircle=9403,t.Fdotaccent=7710,t.Feharmenian=1366,t.Feicoptic=996,t.Fhook=401,t.Fitacyrillic=1138,t.Fiveroman=8548,t.Fmonospace=65318,t.Fourroman=8547,t.Fsmall=63334,t.G=71,t.GBsquare=13191,t.Gacute=500,t.Gamma=915,t.Gammaafrican=404,t.Gangiacoptic=1002,t.Gbreve=286,t.Gcaron=486,t.Gcedilla=290,t.Gcircle=9404,t.Gcircumflex=284,t.Gcommaaccent=290,t.Gdot=288,t.Gdotaccent=288,t.Gecyrillic=1043,t.Ghadarmenian=1346,t.Ghemiddlehookcyrillic=1172,t.Ghestrokecyrillic=1170,t.Gheupturncyrillic=1168,t.Ghook=403,t.Gimarmenian=1331,t.Gjecyrillic=1027,t.Gmacron=7712,t.Gmonospace=65319,t.Grave=63182,t.Gravesmall=63328,t.Gsmall=63335,t.Gsmallhook=667,t.Gstroke=484,t.H=72,t.H18533=9679,t.H18543=9642,t.H18551=9643,t.H22073=9633,t.HPsquare=13259,t.Haabkhasiancyrillic=1192,t.Hadescendercyrillic=1202,t.Hardsigncyrillic=1066,t.Hbar=294,t.Hbrevebelow=7722,t.Hcedilla=7720,t.Hcircle=9405,t.Hcircumflex=292,t.Hdieresis=7718,t.Hdotaccent=7714,t.Hdotbelow=7716,t.Hmonospace=65320,t.Hoarmenian=1344,t.Horicoptic=1e3,t.Hsmall=63336,t.Hungarumlaut=63183,t.Hungarumlautsmall=63224,t.Hzsquare=13200,t.I=73,t.IAcyrillic=1071,t.IJ=306,t.IUcyrillic=1070,t.Iacute=205,t.Iacutesmall=63469,t.Ibreve=300,t.Icaron=463,t.Icircle=9406,t.Icircumflex=206,t.Icircumflexsmall=63470,t.Icyrillic=1030,t.Idblgrave=520,t.Idieresis=207,t.Idieresisacute=7726,t.Idieresiscyrillic=1252,t.Idieresissmall=63471,t.Idot=304,t.Idotaccent=304,t.Idotbelow=7882,t.Iebrevecyrillic=1238,t.Iecyrillic=1045,t.Ifraktur=8465,t.Igrave=204,t.Igravesmall=63468,t.Ihookabove=7880,t.Iicyrillic=1048,t.Iinvertedbreve=522,t.Iishortcyrillic=1049,t.Imacron=298,t.Imacroncyrillic=1250,t.Imonospace=65321,t.Iniarmenian=1339,t.Iocyrillic=1025,t.Iogonek=302,t.Iota=921,t.Iotaafrican=406,t.Iotadieresis=938,t.Iotatonos=906,t.Ismall=63337,t.Istroke=407,t.Itilde=296,t.Itildebelow=7724,t.Izhitsacyrillic=1140,t.Izhitsadblgravecyrillic=1142,t.J=74,t.Jaarmenian=1345,t.Jcircle=9407,t.Jcircumflex=308,t.Jecyrillic=1032,t.Jheharmenian=1355,t.Jmonospace=65322,t.Jsmall=63338,t.K=75,t.KBsquare=13189,t.KKsquare=13261,t.Kabashkircyrillic=1184,t.Kacute=7728,t.Kacyrillic=1050,t.Kadescendercyrillic=1178,t.Kahookcyrillic=1219,t.Kappa=922,t.Kastrokecyrillic=1182,t.Kaverticalstrokecyrillic=1180,t.Kcaron=488,t.Kcedilla=310,t.Kcircle=9408,t.Kcommaaccent=310,t.Kdotbelow=7730,t.Keharmenian=1364,t.Kenarmenian=1343,t.Khacyrillic=1061,t.Kheicoptic=998,t.Khook=408,t.Kjecyrillic=1036,t.Klinebelow=7732,t.Kmonospace=65323,t.Koppacyrillic=1152,t.Koppagreek=990,t.Ksicyrillic=1134,t.Ksmall=63339,t.L=76,t.LJ=455,t.LL=63167,t.Lacute=313,t.Lambda=923,t.Lcaron=317,t.Lcedilla=315,t.Lcircle=9409,t.Lcircumflexbelow=7740,t.Lcommaaccent=315,t.Ldot=319,t.Ldotaccent=319,t.Ldotbelow=7734,t.Ldotbelowmacron=7736,t.Liwnarmenian=1340,t.Lj=456,t.Ljecyrillic=1033,t.Llinebelow=7738,t.Lmonospace=65324,t.Lslash=321,t.Lslashsmall=63225,t.Lsmall=63340,t.M=77,t.MBsquare=13190,t.Macron=63184,t.Macronsmall=63407,t.Macute=7742,t.Mcircle=9410,t.Mdotaccent=7744,t.Mdotbelow=7746,t.Menarmenian=1348,t.Mmonospace=65325,t.Msmall=63341,t.Mturned=412,t.Mu=924,t.N=78,t.NJ=458,t.Nacute=323,t.Ncaron=327,t.Ncedilla=325,t.Ncircle=9411,t.Ncircumflexbelow=7754,t.Ncommaaccent=325,t.Ndotaccent=7748,t.Ndotbelow=7750,t.Nhookleft=413,t.Nineroman=8552,t.Nj=459,t.Njecyrillic=1034,t.Nlinebelow=7752,t.Nmonospace=65326,t.Nowarmenian=1350,t.Nsmall=63342,t.Ntilde=209,t.Ntildesmall=63473,t.Nu=925,t.O=79,t.OE=338,t.OEsmall=63226,t.Oacute=211,t.Oacutesmall=63475,t.Obarredcyrillic=1256,t.Obarreddieresiscyrillic=1258,t.Obreve=334,t.Ocaron=465,t.Ocenteredtilde=415,t.Ocircle=9412,t.Ocircumflex=212,t.Ocircumflexacute=7888,t.Ocircumflexdotbelow=7896,t.Ocircumflexgrave=7890,t.Ocircumflexhookabove=7892,t.Ocircumflexsmall=63476,t.Ocircumflextilde=7894,t.Ocyrillic=1054,t.Odblacute=336,t.Odblgrave=524,t.Odieresis=214,t.Odieresiscyrillic=1254,t.Odieresissmall=63478,t.Odotbelow=7884,t.Ogoneksmall=63227,t.Ograve=210,t.Ogravesmall=63474,t.Oharmenian=1365,t.Ohm=8486,t.Ohookabove=7886,t.Ohorn=416,t.Ohornacute=7898,t.Ohorndotbelow=7906,t.Ohorngrave=7900,t.Ohornhookabove=7902,t.Ohorntilde=7904,t.Ohungarumlaut=336,t.Oi=418,t.Oinvertedbreve=526,t.Omacron=332,t.Omacronacute=7762,t.Omacrongrave=7760,t.Omega=8486,t.Omegacyrillic=1120,t.Omegagreek=937,t.Omegaroundcyrillic=1146,t.Omegatitlocyrillic=1148,t.Omegatonos=911,t.Omicron=927,t.Omicrontonos=908,t.Omonospace=65327,t.Oneroman=8544,t.Oogonek=490,t.Oogonekmacron=492,t.Oopen=390,t.Oslash=216,t.Oslashacute=510,t.Oslashsmall=63480,t.Osmall=63343,t.Ostrokeacute=510,t.Otcyrillic=1150,t.Otilde=213,t.Otildeacute=7756,t.Otildedieresis=7758,t.Otildesmall=63477,t.P=80,t.Pacute=7764,t.Pcircle=9413,t.Pdotaccent=7766,t.Pecyrillic=1055,t.Peharmenian=1354,t.Pemiddlehookcyrillic=1190,t.Phi=934,t.Phook=420,t.Pi=928,t.Piwrarmenian=1363,t.Pmonospace=65328,t.Psi=936,t.Psicyrillic=1136,t.Psmall=63344,t.Q=81,t.Qcircle=9414,t.Qmonospace=65329,t.Qsmall=63345,t.R=82,t.Raarmenian=1356,t.Racute=340,t.Rcaron=344,t.Rcedilla=342,t.Rcircle=9415,t.Rcommaaccent=342,t.Rdblgrave=528,t.Rdotaccent=7768,t.Rdotbelow=7770,t.Rdotbelowmacron=7772,t.Reharmenian=1360,t.Rfraktur=8476,t.Rho=929,t.Ringsmall=63228,t.Rinvertedbreve=530,t.Rlinebelow=7774,t.Rmonospace=65330,t.Rsmall=63346,t.Rsmallinverted=641,t.Rsmallinvertedsuperior=694,t.S=83,t.SF010000=9484,t.SF020000=9492,t.SF030000=9488,t.SF040000=9496,t.SF050000=9532,t.SF060000=9516,t.SF070000=9524,t.SF080000=9500,t.SF090000=9508,t.SF100000=9472,t.SF110000=9474,t.SF190000=9569,t.SF200000=9570,t.SF210000=9558,t.SF220000=9557,t.SF230000=9571,t.SF240000=9553,t.SF250000=9559,t.SF260000=9565,t.SF270000=9564,t.SF280000=9563,t.SF360000=9566,t.SF370000=9567,t.SF380000=9562,t.SF390000=9556,t.SF400000=9577,t.SF410000=9574,t.SF420000=9568,t.SF430000=9552,t.SF440000=9580,t.SF450000=9575,t.SF460000=9576,t.SF470000=9572,t.SF480000=9573,t.SF490000=9561,t.SF500000=9560,t.SF510000=9554,t.SF520000=9555,t.SF530000=9579,t.SF540000=9578,t.Sacute=346,t.Sacutedotaccent=7780,t.Sampigreek=992,t.Scaron=352,t.Scarondotaccent=7782,t.Scaronsmall=63229,t.Scedilla=350,t.Schwa=399,t.Schwacyrillic=1240,t.Schwadieresiscyrillic=1242,t.Scircle=9416,t.Scircumflex=348,t.Scommaaccent=536,t.Sdotaccent=7776,t.Sdotbelow=7778,t.Sdotbelowdotaccent=7784,t.Seharmenian=1357,t.Sevenroman=8550,t.Shaarmenian=1351,t.Shacyrillic=1064,t.Shchacyrillic=1065,t.Sheicoptic=994,t.Shhacyrillic=1210,t.Shimacoptic=1004,t.Sigma=931,t.Sixroman=8549,t.Smonospace=65331,t.Softsigncyrillic=1068,t.Ssmall=63347,t.Stigmagreek=986,t.T=84,t.Tau=932,t.Tbar=358,t.Tcaron=356,t.Tcedilla=354,t.Tcircle=9417,t.Tcircumflexbelow=7792,t.Tcommaaccent=354,t.Tdotaccent=7786,t.Tdotbelow=7788,t.Tecyrillic=1058,t.Tedescendercyrillic=1196,t.Tenroman=8553,t.Tetsecyrillic=1204,t.Theta=920,t.Thook=428,t.Thorn=222,t.Thornsmall=63486,t.Threeroman=8546,t.Tildesmall=63230,t.Tiwnarmenian=1359,t.Tlinebelow=7790,t.Tmonospace=65332,t.Toarmenian=1337,t.Tonefive=444,t.Tonesix=388,t.Tonetwo=423,t.Tretroflexhook=430,t.Tsecyrillic=1062,t.Tshecyrillic=1035,t.Tsmall=63348,t.Twelveroman=8555,t.Tworoman=8545,t.U=85,t.Uacute=218,t.Uacutesmall=63482,t.Ubreve=364,t.Ucaron=467,t.Ucircle=9418,t.Ucircumflex=219,t.Ucircumflexbelow=7798,t.Ucircumflexsmall=63483,t.Ucyrillic=1059,t.Udblacute=368,t.Udblgrave=532,t.Udieresis=220,t.Udieresisacute=471,t.Udieresisbelow=7794,t.Udieresiscaron=473,t.Udieresiscyrillic=1264,t.Udieresisgrave=475,t.Udieresismacron=469,t.Udieresissmall=63484,t.Udotbelow=7908,t.Ugrave=217,t.Ugravesmall=63481,t.Uhookabove=7910,t.Uhorn=431,t.Uhornacute=7912,t.Uhorndotbelow=7920,t.Uhorngrave=7914,t.Uhornhookabove=7916,t.Uhorntilde=7918,t.Uhungarumlaut=368,t.Uhungarumlautcyrillic=1266,t.Uinvertedbreve=534,t.Ukcyrillic=1144,t.Umacron=362,t.Umacroncyrillic=1262,t.Umacrondieresis=7802,t.Umonospace=65333,t.Uogonek=370,t.Upsilon=933,t.Upsilon1=978,t.Upsilonacutehooksymbolgreek=979,t.Upsilonafrican=433,t.Upsilondieresis=939,t.Upsilondieresishooksymbolgreek=980,t.Upsilonhooksymbol=978,t.Upsilontonos=910,t.Uring=366,t.Ushortcyrillic=1038,t.Usmall=63349,t.Ustraightcyrillic=1198,t.Ustraightstrokecyrillic=1200,t.Utilde=360,t.Utildeacute=7800,t.Utildebelow=7796,t.V=86,t.Vcircle=9419,t.Vdotbelow=7806,t.Vecyrillic=1042,t.Vewarmenian=1358,t.Vhook=434,t.Vmonospace=65334,t.Voarmenian=1352,t.Vsmall=63350,t.Vtilde=7804,t.W=87,t.Wacute=7810,t.Wcircle=9420,t.Wcircumflex=372,t.Wdieresis=7812,t.Wdotaccent=7814,t.Wdotbelow=7816,t.Wgrave=7808,t.Wmonospace=65335,t.Wsmall=63351,t.X=88,t.Xcircle=9421,t.Xdieresis=7820,t.Xdotaccent=7818,t.Xeharmenian=1341,t.Xi=926,t.Xmonospace=65336,t.Xsmall=63352,t.Y=89,t.Yacute=221,t.Yacutesmall=63485,t.Yatcyrillic=1122,t.Ycircle=9422,t.Ycircumflex=374,t.Ydieresis=376,t.Ydieresissmall=63487,t.Ydotaccent=7822,t.Ydotbelow=7924,t.Yericyrillic=1067,t.Yerudieresiscyrillic=1272,t.Ygrave=7922,t.Yhook=435,t.Yhookabove=7926,t.Yiarmenian=1349,t.Yicyrillic=1031,t.Yiwnarmenian=1362,t.Ymonospace=65337,t.Ysmall=63353,t.Ytilde=7928,t.Yusbigcyrillic=1130,t.Yusbigiotifiedcyrillic=1132,t.Yuslittlecyrillic=1126,t.Yuslittleiotifiedcyrillic=1128,t.Z=90,t.Zaarmenian=1334,t.Zacute=377,t.Zcaron=381,t.Zcaronsmall=63231,t.Zcircle=9423,t.Zcircumflex=7824,t.Zdot=379,t.Zdotaccent=379,t.Zdotbelow=7826,t.Zecyrillic=1047,t.Zedescendercyrillic=1176,t.Zedieresiscyrillic=1246,t.Zeta=918,t.Zhearmenian=1338,t.Zhebrevecyrillic=1217,t.Zhecyrillic=1046,t.Zhedescendercyrillic=1174,t.Zhedieresiscyrillic=1244,t.Zlinebelow=7828,t.Zmonospace=65338,t.Zsmall=63354,t.Zstroke=437,t.a=97,t.aabengali=2438,t.aacute=225,t.aadeva=2310,t.aagujarati=2694,t.aagurmukhi=2566,t.aamatragurmukhi=2622,t.aarusquare=13059,t.aavowelsignbengali=2494,t.aavowelsigndeva=2366,t.aavowelsigngujarati=2750,t.abbreviationmarkarmenian=1375,t.abbreviationsigndeva=2416,t.abengali=2437,t.abopomofo=12570,t.abreve=259,t.abreveacute=7855,t.abrevecyrillic=1233,t.abrevedotbelow=7863,t.abrevegrave=7857,t.abrevehookabove=7859,t.abrevetilde=7861,t.acaron=462,t.acircle=9424,t.acircumflex=226,t.acircumflexacute=7845,t.acircumflexdotbelow=7853,t.acircumflexgrave=7847,t.acircumflexhookabove=7849,t.acircumflextilde=7851,t.acute=180,t.acutebelowcmb=791,t.acutecmb=769,t.acutecomb=769,t.acutedeva=2388,t.acutelowmod=719,t.acutetonecmb=833,t.acyrillic=1072,t.adblgrave=513,t.addakgurmukhi=2673,t.adeva=2309,t.adieresis=228,t.adieresiscyrillic=1235,t.adieresismacron=479,t.adotbelow=7841,t.adotmacron=481,t.ae=230,t.aeacute=509,t.aekorean=12624,t.aemacron=483,t.afii00208=8213,t.afii08941=8356,t.afii10017=1040,t.afii10018=1041,t.afii10019=1042,t.afii10020=1043,t.afii10021=1044,t.afii10022=1045,t.afii10023=1025,t.afii10024=1046,t.afii10025=1047,t.afii10026=1048,t.afii10027=1049,t.afii10028=1050,t.afii10029=1051,t.afii10030=1052;t.afii10031=1053,t.afii10032=1054,t.afii10033=1055,t.afii10034=1056,t.afii10035=1057,t.afii10036=1058,t.afii10037=1059,t.afii10038=1060,t.afii10039=1061,t.afii10040=1062,t.afii10041=1063,t.afii10042=1064,t.afii10043=1065,t.afii10044=1066,t.afii10045=1067,t.afii10046=1068,t.afii10047=1069,t.afii10048=1070,t.afii10049=1071,t.afii10050=1168,t.afii10051=1026,t.afii10052=1027,t.afii10053=1028,t.afii10054=1029,t.afii10055=1030,t.afii10056=1031,t.afii10057=1032,t.afii10058=1033,t.afii10059=1034,t.afii10060=1035,t.afii10061=1036,t.afii10062=1038,t.afii10063=63172,t.afii10064=63173,t.afii10065=1072,t.afii10066=1073,t.afii10067=1074,t.afii10068=1075,t.afii10069=1076,t.afii10070=1077,t.afii10071=1105,t.afii10072=1078,t.afii10073=1079,t.afii10074=1080,t.afii10075=1081,t.afii10076=1082,t.afii10077=1083,t.afii10078=1084,t.afii10079=1085,t.afii10080=1086,t.afii10081=1087,t.afii10082=1088,t.afii10083=1089,t.afii10084=1090,t.afii10085=1091,t.afii10086=1092,t.afii10087=1093,t.afii10088=1094,t.afii10089=1095,t.afii10090=1096,t.afii10091=1097,t.afii10092=1098,t.afii10093=1099,t.afii10094=1100,t.afii10095=1101,t.afii10096=1102,t.afii10097=1103,t.afii10098=1169,t.afii10099=1106,t.afii10100=1107,t.afii10101=1108,t.afii10102=1109,t.afii10103=1110,t.afii10104=1111,t.afii10105=1112,t.afii10106=1113,t.afii10107=1114,t.afii10108=1115,t.afii10109=1116,t.afii10110=1118,t.afii10145=1039,t.afii10146=1122,t.afii10147=1138,t.afii10148=1140,t.afii10192=63174,t.afii10193=1119,t.afii10194=1123,t.afii10195=1139,t.afii10196=1141,t.afii10831=63175,t.afii10832=63176,t.afii10846=1241,t.afii299=8206,t.afii300=8207,t.afii301=8205,t.afii57381=1642,t.afii57388=1548,t.afii57392=1632,t.afii57393=1633,t.afii57394=1634,t.afii57395=1635,t.afii57396=1636,t.afii57397=1637,t.afii57398=1638,t.afii57399=1639,t.afii57400=1640,t.afii57401=1641,t.afii57403=1563,t.afii57407=1567,t.afii57409=1569,t.afii57410=1570,t.afii57411=1571,t.afii57412=1572,t.afii57413=1573,t.afii57414=1574,t.afii57415=1575,t.afii57416=1576,t.afii57417=1577,t.afii57418=1578,t.afii57419=1579,t.afii57420=1580,t.afii57421=1581,t.afii57422=1582,t.afii57423=1583,t.afii57424=1584,t.afii57425=1585,t.afii57426=1586,t.afii57427=1587,t.afii57428=1588,t.afii57429=1589,t.afii57430=1590,t.afii57431=1591,t.afii57432=1592,t.afii57433=1593,t.afii57434=1594,t.afii57440=1600,t.afii57441=1601,t.afii57442=1602,t.afii57443=1603,t.afii57444=1604,t.afii57445=1605,t.afii57446=1606,t.afii57448=1608,t.afii57449=1609,t.afii57450=1610,t.afii57451=1611,t.afii57452=1612,t.afii57453=1613,t.afii57454=1614,t.afii57455=1615,t.afii57456=1616,t.afii57457=1617,t.afii57458=1618,t.afii57470=1607,t.afii57505=1700,t.afii57506=1662,t.afii57507=1670,t.afii57508=1688,t.afii57509=1711,t.afii57511=1657,t.afii57512=1672,t.afii57513=1681,t.afii57514=1722,t.afii57519=1746,t.afii57534=1749,t.afii57636=8362,t.afii57645=1470,t.afii57658=1475,t.afii57664=1488,t.afii57665=1489,t.afii57666=1490,t.afii57667=1491,t.afii57668=1492,t.afii57669=1493,t.afii57670=1494,t.afii57671=1495,t.afii57672=1496,t.afii57673=1497,t.afii57674=1498,t.afii57675=1499,t.afii57676=1500,t.afii57677=1501,t.afii57678=1502,t.afii57679=1503,t.afii57680=1504,t.afii57681=1505,t.afii57682=1506,t.afii57683=1507,t.afii57684=1508,t.afii57685=1509,t.afii57686=1510,t.afii57687=1511,t.afii57688=1512,t.afii57689=1513,t.afii57690=1514,t.afii57694=64298,t.afii57695=64299,t.afii57700=64331,t.afii57705=64287,t.afii57716=1520,t.afii57717=1521,t.afii57718=1522,t.afii57723=64309,t.afii57793=1460,t.afii57794=1461,t.afii57795=1462,t.afii57796=1467,t.afii57797=1464,t.afii57798=1463,t.afii57799=1456,t.afii57800=1458,t.afii57801=1457,t.afii57802=1459,t.afii57803=1474,t.afii57804=1473,t.afii57806=1465,t.afii57807=1468,t.afii57839=1469,t.afii57841=1471,t.afii57842=1472,t.afii57929=700,t.afii61248=8453,t.afii61289=8467,t.afii61352=8470,t.afii61573=8236,t.afii61574=8237,t.afii61575=8238,t.afii61664=8204,t.afii63167=1645,t.afii64937=701,t.agrave=224,t.agujarati=2693,t.agurmukhi=2565,t.ahiragana=12354,t.ahookabove=7843,t.aibengali=2448,t.aibopomofo=12574,t.aideva=2320,t.aiecyrillic=1237,t.aigujarati=2704,t.aigurmukhi=2576,t.aimatragurmukhi=2632,t.ainarabic=1593,t.ainfinalarabic=65226,t.aininitialarabic=65227,t.ainmedialarabic=65228,t.ainvertedbreve=515,t.aivowelsignbengali=2504,t.aivowelsigndeva=2376,t.aivowelsigngujarati=2760,t.akatakana=12450,t.akatakanahalfwidth=65393,t.akorean=12623,t.alef=1488,t.alefarabic=1575,t.alefdageshhebrew=64304,t.aleffinalarabic=65166,t.alefhamzaabovearabic=1571,t.alefhamzaabovefinalarabic=65156,t.alefhamzabelowarabic=1573,t.alefhamzabelowfinalarabic=65160,t.alefhebrew=1488,t.aleflamedhebrew=64335,t.alefmaddaabovearabic=1570,t.alefmaddaabovefinalarabic=65154,t.alefmaksuraarabic=1609,t.alefmaksurafinalarabic=65264,t.alefmaksurainitialarabic=65267,t.alefmaksuramedialarabic=65268,t.alefpatahhebrew=64302,t.alefqamatshebrew=64303,t.aleph=8501,t.allequal=8780,t.alpha=945,t.alphatonos=940,t.amacron=257,t.amonospace=65345,t.ampersand=38,t.ampersandmonospace=65286,t.ampersandsmall=63270,t.amsquare=13250,t.anbopomofo=12578,t.angbopomofo=12580,t.angbracketleft=12296,t.angbracketright=12297,t.angkhankhuthai=3674,t.angle=8736,t.anglebracketleft=12296,t.anglebracketleftvertical=65087,t.anglebracketright=12297,t.anglebracketrightvertical=65088,t.angleleft=9001,t.angleright=9002,t.angstrom=8491,t.anoteleia=903,t.anudattadeva=2386,t.anusvarabengali=2434,t.anusvaradeva=2306,t.anusvaragujarati=2690,t.aogonek=261,t.apaatosquare=13056,t.aparen=9372,t.apostrophearmenian=1370,t.apostrophemod=700,t.apple=63743,t.approaches=8784,t.approxequal=8776,t.approxequalorimage=8786,t.approximatelyequal=8773,t.araeaekorean=12686,t.araeakorean=12685,t.arc=8978,t.arighthalfring=7834,t.aring=229,t.aringacute=507,t.aringbelow=7681,t.arrowboth=8596,t.arrowdashdown=8675,t.arrowdashleft=8672,t.arrowdashright=8674,t.arrowdashup=8673,t.arrowdblboth=8660,t.arrowdbldown=8659,t.arrowdblleft=8656,t.arrowdblright=8658,t.arrowdblup=8657,t.arrowdown=8595,t.arrowdownleft=8601,t.arrowdownright=8600,t.arrowdownwhite=8681,t.arrowheaddownmod=709,t.arrowheadleftmod=706,t.arrowheadrightmod=707,t.arrowheadupmod=708,t.arrowhorizex=63719,t.arrowleft=8592,t.arrowleftdbl=8656,t.arrowleftdblstroke=8653,t.arrowleftoverright=8646,t.arrowleftwhite=8678,t.arrowright=8594,t.arrowrightdblstroke=8655,t.arrowrightheavy=10142,t.arrowrightoverleft=8644,t.arrowrightwhite=8680,t.arrowtableft=8676,t.arrowtabright=8677,t.arrowup=8593,t.arrowupdn=8597,t.arrowupdnbse=8616,t.arrowupdownbase=8616,t.arrowupleft=8598,t.arrowupleftofdown=8645,t.arrowupright=8599,t.arrowupwhite=8679,t.arrowvertex=63718,t.asciicircum=94,t.asciicircummonospace=65342,t.asciitilde=126,t.asciitildemonospace=65374,t.ascript=593,t.ascriptturned=594,t.asmallhiragana=12353,t.asmallkatakana=12449,t.asmallkatakanahalfwidth=65383,t.asterisk=42,t.asteriskaltonearabic=1645,t.asteriskarabic=1645,t.asteriskmath=8727,t.asteriskmonospace=65290,t.asterisksmall=65121,t.asterism=8258,t.asuperior=63209,t.asymptoticallyequal=8771,t.at=64,t.atilde=227,t.atmonospace=65312,t.atsmall=65131,t.aturned=592,t.aubengali=2452,t.aubopomofo=12576,t.audeva=2324,t.augujarati=2708,t.augurmukhi=2580,t.aulengthmarkbengali=2519,t.aumatragurmukhi=2636,t.auvowelsignbengali=2508,t.auvowelsigndeva=2380,t.auvowelsigngujarati=2764,t.avagrahadeva=2365,t.aybarmenian=1377,t.ayin=1506,t.ayinaltonehebrew=64288,t.ayinhebrew=1506,t.b=98,t.babengali=2476,t.backslash=92,t.backslashmonospace=65340,t.badeva=2348,t.bagujarati=2732,t.bagurmukhi=2604,t.bahiragana=12400,t.bahtthai=3647,t.bakatakana=12496,t.bar=124,t.barmonospace=65372,t.bbopomofo=12549,t.bcircle=9425,t.bdotaccent=7683,t.bdotbelow=7685,t.beamedsixteenthnotes=9836,t.because=8757,t.becyrillic=1073,t.beharabic=1576,t.behfinalarabic=65168,t.behinitialarabic=65169,t.behiragana=12409,t.behmedialarabic=65170,t.behmeeminitialarabic=64671,t.behmeemisolatedarabic=64520,t.behnoonfinalarabic=64621,t.bekatakana=12505,t.benarmenian=1378,t.bet=1489,t.beta=946,t.betasymbolgreek=976,t.betdagesh=64305,t.betdageshhebrew=64305,t.bethebrew=1489,t.betrafehebrew=64332,t.bhabengali=2477,t.bhadeva=2349,t.bhagujarati=2733,t.bhagurmukhi=2605,t.bhook=595,t.bihiragana=12403,t.bikatakana=12499,t.bilabialclick=664,t.bindigurmukhi=2562,t.birusquare=13105,t.blackcircle=9679,t.blackdiamond=9670,t.blackdownpointingtriangle=9660,t.blackleftpointingpointer=9668,t.blackleftpointingtriangle=9664,t.blacklenticularbracketleft=12304,t.blacklenticularbracketleftvertical=65083,t.blacklenticularbracketright=12305,t.blacklenticularbracketrightvertical=65084,t.blacklowerlefttriangle=9699,t.blacklowerrighttriangle=9698,t.blackrectangle=9644,t.blackrightpointingpointer=9658,t.blackrightpointingtriangle=9654,t.blacksmallsquare=9642,t.blacksmilingface=9787,t.blacksquare=9632,t.blackstar=9733,t.blackupperlefttriangle=9700,t.blackupperrighttriangle=9701,t.blackuppointingsmalltriangle=9652,t.blackuppointingtriangle=9650,t.blank=9251,t.blinebelow=7687,t.block=9608,t.bmonospace=65346,t.bobaimaithai=3610,t.bohiragana=12412,t.bokatakana=12508,t.bparen=9373,t.bqsquare=13251,t.braceex=63732,t.braceleft=123,t.braceleftbt=63731,t.braceleftmid=63730,t.braceleftmonospace=65371,t.braceleftsmall=65115,t.bracelefttp=63729,t.braceleftvertical=65079,t.braceright=125,t.bracerightbt=63742,t.bracerightmid=63741,t.bracerightmonospace=65373,t.bracerightsmall=65116,t.bracerighttp=63740,t.bracerightvertical=65080,t.bracketleft=91,t.bracketleftbt=63728,t.bracketleftex=63727,t.bracketleftmonospace=65339,t.bracketlefttp=63726,t.bracketright=93,t.bracketrightbt=63739,t.bracketrightex=63738,t.bracketrightmonospace=65341,t.bracketrighttp=63737,t.breve=728,t.brevebelowcmb=814,t.brevecmb=774,t.breveinvertedbelowcmb=815,t.breveinvertedcmb=785,t.breveinverteddoublecmb=865,t.bridgebelowcmb=810,t.bridgeinvertedbelowcmb=826,t.brokenbar=166,t.bstroke=384,t.bsuperior=63210,t.btopbar=387,t.buhiragana=12406,t.bukatakana=12502,t.bullet=8226,t.bulletinverse=9688,t.bulletoperator=8729,t.bullseye=9678,t.c=99,t.caarmenian=1390,t.cabengali=2458,t.cacute=263,t.cadeva=2330,t.cagujarati=2714,t.cagurmukhi=2586,t.calsquare=13192,t.candrabindubengali=2433,t.candrabinducmb=784,t.candrabindudeva=2305,t.candrabindugujarati=2689,t.capslock=8682,t.careof=8453,t.caron=711,t.caronbelowcmb=812,t.caroncmb=780,t.carriagereturn=8629,t.cbopomofo=12568,t.ccaron=269,t.ccedilla=231,t.ccedillaacute=7689,t.ccircle=9426,t.ccircumflex=265,t.ccurl=597,t.cdot=267,t.cdotaccent=267,t.cdsquare=13253,t.cedilla=184,t.cedillacmb=807,t.cent=162,t.centigrade=8451,t.centinferior=63199,t.centmonospace=65504,t.centoldstyle=63394,t.centsuperior=63200,t.chaarmenian=1401,t.chabengali=2459,t.chadeva=2331,t.chagujarati=2715,t.chagurmukhi=2587,t.chbopomofo=12564,t.cheabkhasiancyrillic=1213,t.checkmark=10003,t.checyrillic=1095,t.chedescenderabkhasiancyrillic=1215,t.chedescendercyrillic=1207,t.chedieresiscyrillic=1269,t.cheharmenian=1395,t.chekhakassiancyrillic=1228,t.cheverticalstrokecyrillic=1209,t.chi=967,t.chieuchacirclekorean=12919,t.chieuchaparenkorean=12823,t.chieuchcirclekorean=12905,t.chieuchkorean=12618,t.chieuchparenkorean=12809,t.chochangthai=3594,t.chochanthai=3592,t.chochingthai=3593,t.chochoethai=3596,t.chook=392,t.cieucacirclekorean=12918,t.cieucaparenkorean=12822,t.cieuccirclekorean=12904,t.cieuckorean=12616,t.cieucparenkorean=12808,t.cieucuparenkorean=12828,t.circle=9675,t.circlecopyrt=169,t.circlemultiply=8855,t.circleot=8857,t.circleplus=8853,t.circlepostalmark=12342,t.circlewithlefthalfblack=9680,t.circlewithrighthalfblack=9681,t.circumflex=710,t.circumflexbelowcmb=813,t.circumflexcmb=770,t.clear=8999,t.clickalveolar=450,t.clickdental=448,t.clicklateral=449,t.clickretroflex=451,t.club=9827,t.clubsuitblack=9827,t.clubsuitwhite=9831,t.cmcubedsquare=13220,t.cmonospace=65347,t.cmsquaredsquare=13216,t.coarmenian=1409,t.colon=58,t.colonmonetary=8353,t.colonmonospace=65306,t.colonsign=8353,t.colonsmall=65109,t.colontriangularhalfmod=721,t.colontriangularmod=720,t.comma=44,t.commaabovecmb=787,t.commaaboverightcmb=789,t.commaaccent=63171,t.commaarabic=1548,t.commaarmenian=1373,t.commainferior=63201,t.commamonospace=65292,t.commareversedabovecmb=788,t.commareversedmod=701,t.commasmall=65104,t.commasuperior=63202,t.commaturnedabovecmb=786,t.commaturnedmod=699,t.compass=9788,t.congruent=8773,t.contourintegral=8750,t.control=8963,t.controlACK=6,t.controlBEL=7,t.controlBS=8,t.controlCAN=24,t.controlCR=13,t.controlDC1=17,t.controlDC2=18,t.controlDC3=19,t.controlDC4=20,t.controlDEL=127,t.controlDLE=16,t.controlEM=25,t.controlENQ=5,t.controlEOT=4,t.controlESC=27,t.controlETB=23,t.controlETX=3,t.controlFF=12,t.controlFS=28,t.controlGS=29,t.controlHT=9,t.controlLF=10,t.controlNAK=21,t.controlNULL=0,t.controlRS=30,t.controlSI=15,t.controlSO=14,t.controlSOT=2,t.controlSTX=1,t.controlSUB=26,t.controlSYN=22,t.controlUS=31,t.controlVT=11,t.copyright=169,t.copyrightsans=63721,t.copyrightserif=63193,t.cornerbracketleft=12300,t.cornerbracketlefthalfwidth=65378,t.cornerbracketleftvertical=65089,t.cornerbracketright=12301,t.cornerbracketrighthalfwidth=65379,t.cornerbracketrightvertical=65090,t.corporationsquare=13183,t.cosquare=13255,t.coverkgsquare=13254,t.cparen=9374,t.cruzeiro=8354,t.cstretched=663,t.curlyand=8911,t.curlyor=8910,t.currency=164,t.cyrBreve=63185,t.cyrFlex=63186,t.cyrbreve=63188,t.cyrflex=63189,t.d=100,t.daarmenian=1380,t.dabengali=2470,t.dadarabic=1590,t.dadeva=2342,t.dadfinalarabic=65214,t.dadinitialarabic=65215,t.dadmedialarabic=65216,t.dagesh=1468,t.dageshhebrew=1468,t.dagger=8224,t.daggerdbl=8225,t.dagujarati=2726,t.dagurmukhi=2598,t.dahiragana=12384,t.dakatakana=12480,t.dalarabic=1583,t.dalet=1491,t.daletdagesh=64307,t.daletdageshhebrew=64307,t.dalethebrew=1491,t.dalfinalarabic=65194,t.dammaarabic=1615,t.dammalowarabic=1615,t.dammatanaltonearabic=1612,t.dammatanarabic=1612,t.danda=2404,t.dargahebrew=1447,t.dargalefthebrew=1447,t.dasiapneumatacyrilliccmb=1157,t.dblGrave=63187,t.dblanglebracketleft=12298,t.dblanglebracketleftvertical=65085,t.dblanglebracketright=12299,t.dblanglebracketrightvertical=65086,t.dblarchinvertedbelowcmb=811,t.dblarrowleft=8660,t.dblarrowright=8658,t.dbldanda=2405,t.dblgrave=63190,t.dblgravecmb=783,t.dblintegral=8748,t.dbllowline=8215,t.dbllowlinecmb=819,t.dbloverlinecmb=831,t.dblprimemod=698,t.dblverticalbar=8214,t.dblverticallineabovecmb=782,t.dbopomofo=12553,t.dbsquare=13256,t.dcaron=271,t.dcedilla=7697,t.dcircle=9427,t.dcircumflexbelow=7699,t.dcroat=273,t.ddabengali=2465,t.ddadeva=2337,t.ddagujarati=2721,t.ddagurmukhi=2593,t.ddalarabic=1672,t.ddalfinalarabic=64393,t.dddhadeva=2396,t.ddhabengali=2466,t.ddhadeva=2338,t.ddhagujarati=2722,t.ddhagurmukhi=2594,t.ddotaccent=7691,t.ddotbelow=7693,t.decimalseparatorarabic=1643,t.decimalseparatorpersian=1643,t.decyrillic=1076,t.degree=176,t.dehihebrew=1453,t.dehiragana=12391,t.deicoptic=1007,t.dekatakana=12487,t.deleteleft=9003,t.deleteright=8998,t.delta=948,t.deltaturned=397,t.denominatorminusonenumeratorbengali=2552,t.dezh=676,t.dhabengali=2471,t.dhadeva=2343,t.dhagujarati=2727,t.dhagurmukhi=2599,t.dhook=599,t.dialytikatonos=901,t.dialytikatonoscmb=836,t.diamond=9830,t.diamondsuitwhite=9826,t.dieresis=168,t.dieresisacute=63191,t.dieresisbelowcmb=804,t.dieresiscmb=776,t.dieresisgrave=63192,t.dieresistonos=901,t.dihiragana=12386,t.dikatakana=12482,t.dittomark=12291,t.divide=247,t.divides=8739,t.divisionslash=8725,t.djecyrillic=1106,t.dkshade=9619,t.dlinebelow=7695,t.dlsquare=13207,t.dmacron=273,t.dmonospace=65348,t.dnblock=9604,t.dochadathai=3598,t.dodekthai=3604,t.dohiragana=12393,t.dokatakana=12489,t.dollar=36;t.dollarinferior=63203,t.dollarmonospace=65284,t.dollaroldstyle=63268,t.dollarsmall=65129,t.dollarsuperior=63204,t.dong=8363,t.dorusquare=13094,t.dotaccent=729,t.dotaccentcmb=775,t.dotbelowcmb=803,t.dotbelowcomb=803,t.dotkatakana=12539,t.dotlessi=305,t.dotlessj=63166,t.dotlessjstrokehook=644,t.dotmath=8901,t.dottedcircle=9676,t.doubleyodpatah=64287,t.doubleyodpatahhebrew=64287,t.downtackbelowcmb=798,t.downtackmod=725,t.dparen=9375,t.dsuperior=63211,t.dtail=598,t.dtopbar=396,t.duhiragana=12389,t.dukatakana=12485,t.dz=499,t.dzaltone=675,t.dzcaron=454,t.dzcurl=677,t.dzeabkhasiancyrillic=1249,t.dzecyrillic=1109,t.dzhecyrillic=1119,t.e=101,t.eacute=233,t.earth=9793,t.ebengali=2447,t.ebopomofo=12572,t.ebreve=277,t.ecandradeva=2317,t.ecandragujarati=2701,t.ecandravowelsigndeva=2373,t.ecandravowelsigngujarati=2757,t.ecaron=283,t.ecedillabreve=7709,t.echarmenian=1381,t.echyiwnarmenian=1415,t.ecircle=9428,t.ecircumflex=234,t.ecircumflexacute=7871,t.ecircumflexbelow=7705,t.ecircumflexdotbelow=7879,t.ecircumflexgrave=7873,t.ecircumflexhookabove=7875,t.ecircumflextilde=7877,t.ecyrillic=1108,t.edblgrave=517,t.edeva=2319,t.edieresis=235,t.edot=279,t.edotaccent=279,t.edotbelow=7865,t.eegurmukhi=2575,t.eematragurmukhi=2631,t.efcyrillic=1092,t.egrave=232,t.egujarati=2703,t.eharmenian=1383,t.ehbopomofo=12573,t.ehiragana=12360,t.ehookabove=7867,t.eibopomofo=12575,t.eight=56,t.eightarabic=1640,t.eightbengali=2542,t.eightcircle=9319,t.eightcircleinversesansserif=10129,t.eightdeva=2414,t.eighteencircle=9329,t.eighteenparen=9349,t.eighteenperiod=9369,t.eightgujarati=2798,t.eightgurmukhi=2670,t.eighthackarabic=1640,t.eighthangzhou=12328,t.eighthnotebeamed=9835,t.eightideographicparen=12839,t.eightinferior=8328,t.eightmonospace=65304,t.eightoldstyle=63288,t.eightparen=9339,t.eightperiod=9359,t.eightpersian=1784,t.eightroman=8567,t.eightsuperior=8312,t.eightthai=3672,t.einvertedbreve=519,t.eiotifiedcyrillic=1125,t.ekatakana=12456,t.ekatakanahalfwidth=65396,t.ekonkargurmukhi=2676,t.ekorean=12628,t.elcyrillic=1083,t.element=8712,t.elevencircle=9322,t.elevenparen=9342,t.elevenperiod=9362,t.elevenroman=8570,t.ellipsis=8230,t.ellipsisvertical=8942,t.emacron=275,t.emacronacute=7703,t.emacrongrave=7701,t.emcyrillic=1084,t.emdash=8212,t.emdashvertical=65073,t.emonospace=65349,t.emphasismarkarmenian=1371,t.emptyset=8709,t.enbopomofo=12579,t.encyrillic=1085,t.endash=8211,t.endashvertical=65074,t.endescendercyrillic=1187,t.eng=331,t.engbopomofo=12581,t.enghecyrillic=1189,t.enhookcyrillic=1224,t.enspace=8194,t.eogonek=281,t.eokorean=12627,t.eopen=603,t.eopenclosed=666,t.eopenreversed=604,t.eopenreversedclosed=606,t.eopenreversedhook=605,t.eparen=9376,t.epsilon=949,t.epsilontonos=941,t.equal=61,t.equalmonospace=65309,t.equalsmall=65126,t.equalsuperior=8316,t.equivalence=8801,t.erbopomofo=12582,t.ercyrillic=1088,t.ereversed=600,t.ereversedcyrillic=1101,t.escyrillic=1089,t.esdescendercyrillic=1195,t.esh=643,t.eshcurl=646,t.eshortdeva=2318,t.eshortvowelsigndeva=2374,t.eshreversedloop=426,t.eshsquatreversed=645,t.esmallhiragana=12359,t.esmallkatakana=12455,t.esmallkatakanahalfwidth=65386,t.estimated=8494,t.esuperior=63212,t.eta=951,t.etarmenian=1384,t.etatonos=942,t.eth=240,t.etilde=7869,t.etildebelow=7707,t.etnahtafoukhhebrew=1425,t.etnahtafoukhlefthebrew=1425,t.etnahtahebrew=1425,t.etnahtalefthebrew=1425,t.eturned=477,t.eukorean=12641,t.euro=8364,t.evowelsignbengali=2503,t.evowelsigndeva=2375,t.evowelsigngujarati=2759,t.exclam=33,t.exclamarmenian=1372,t.exclamdbl=8252,t.exclamdown=161,t.exclamdownsmall=63393,t.exclammonospace=65281,t.exclamsmall=63265,t.existential=8707,t.ezh=658,t.ezhcaron=495,t.ezhcurl=659,t.ezhreversed=441,t.ezhtail=442,t.f=102,t.fadeva=2398,t.fagurmukhi=2654,t.fahrenheit=8457,t.fathaarabic=1614,t.fathalowarabic=1614,t.fathatanarabic=1611,t.fbopomofo=12552,t.fcircle=9429,t.fdotaccent=7711,t.feharabic=1601,t.feharmenian=1414,t.fehfinalarabic=65234,t.fehinitialarabic=65235,t.fehmedialarabic=65236,t.feicoptic=997,t.female=9792,t.ff=64256,t.f_f=64256,t.ffi=64259,t.f_f_i=64259,t.ffl=64260,t.f_f_l=64260,t.fi=64257,t.f_i=64257,t.fifteencircle=9326,t.fifteenparen=9346,t.fifteenperiod=9366,t.figuredash=8210,t.filledbox=9632,t.filledrect=9644,t.finalkaf=1498,t.finalkafdagesh=64314,t.finalkafdageshhebrew=64314,t.finalkafhebrew=1498,t.finalmem=1501,t.finalmemhebrew=1501,t.finalnun=1503,t.finalnunhebrew=1503,t.finalpe=1507,t.finalpehebrew=1507,t.finaltsadi=1509,t.finaltsadihebrew=1509,t.firsttonechinese=713,t.fisheye=9673,t.fitacyrillic=1139,t.five=53,t.fivearabic=1637,t.fivebengali=2539,t.fivecircle=9316,t.fivecircleinversesansserif=10126,t.fivedeva=2411,t.fiveeighths=8541,t.fivegujarati=2795,t.fivegurmukhi=2667,t.fivehackarabic=1637,t.fivehangzhou=12325,t.fiveideographicparen=12836,t.fiveinferior=8325,t.fivemonospace=65301,t.fiveoldstyle=63285,t.fiveparen=9336,t.fiveperiod=9356,t.fivepersian=1781,t.fiveroman=8564,t.fivesuperior=8309,t.fivethai=3669,t.fl=64258,t.f_l=64258,t.florin=402,t.fmonospace=65350,t.fmsquare=13209,t.fofanthai=3615,t.fofathai=3613,t.fongmanthai=3663,t.forall=8704,t.four=52,t.fourarabic=1636,t.fourbengali=2538,t.fourcircle=9315,t.fourcircleinversesansserif=10125,t.fourdeva=2410,t.fourgujarati=2794,t.fourgurmukhi=2666,t.fourhackarabic=1636,t.fourhangzhou=12324,t.fourideographicparen=12835,t.fourinferior=8324,t.fourmonospace=65300,t.fournumeratorbengali=2551,t.fouroldstyle=63284,t.fourparen=9335,t.fourperiod=9355,t.fourpersian=1780,t.fourroman=8563,t.foursuperior=8308,t.fourteencircle=9325,t.fourteenparen=9345,t.fourteenperiod=9365,t.fourthai=3668,t.fourthtonechinese=715,t.fparen=9377,t.fraction=8260,t.franc=8355,t.g=103,t.gabengali=2455,t.gacute=501,t.gadeva=2327,t.gafarabic=1711,t.gaffinalarabic=64403,t.gafinitialarabic=64404,t.gafmedialarabic=64405,t.gagujarati=2711,t.gagurmukhi=2583,t.gahiragana=12364,t.gakatakana=12460,t.gamma=947,t.gammalatinsmall=611,t.gammasuperior=736,t.gangiacoptic=1003,t.gbopomofo=12557,t.gbreve=287,t.gcaron=487,t.gcedilla=291,t.gcircle=9430,t.gcircumflex=285,t.gcommaaccent=291,t.gdot=289,t.gdotaccent=289,t.gecyrillic=1075,t.gehiragana=12370,t.gekatakana=12466,t.geometricallyequal=8785,t.gereshaccenthebrew=1436,t.gereshhebrew=1523,t.gereshmuqdamhebrew=1437,t.germandbls=223,t.gershayimaccenthebrew=1438,t.gershayimhebrew=1524,t.getamark=12307,t.ghabengali=2456,t.ghadarmenian=1394,t.ghadeva=2328,t.ghagujarati=2712,t.ghagurmukhi=2584,t.ghainarabic=1594,t.ghainfinalarabic=65230,t.ghaininitialarabic=65231,t.ghainmedialarabic=65232,t.ghemiddlehookcyrillic=1173,t.ghestrokecyrillic=1171,t.gheupturncyrillic=1169,t.ghhadeva=2394,t.ghhagurmukhi=2650,t.ghook=608,t.ghzsquare=13203,t.gihiragana=12366,t.gikatakana=12462,t.gimarmenian=1379,t.gimel=1490,t.gimeldagesh=64306,t.gimeldageshhebrew=64306,t.gimelhebrew=1490,t.gjecyrillic=1107,t.glottalinvertedstroke=446,t.glottalstop=660,t.glottalstopinverted=662,t.glottalstopmod=704,t.glottalstopreversed=661,t.glottalstopreversedmod=705,t.glottalstopreversedsuperior=740,t.glottalstopstroke=673,t.glottalstopstrokereversed=674,t.gmacron=7713,t.gmonospace=65351,t.gohiragana=12372,t.gokatakana=12468,t.gparen=9378,t.gpasquare=13228,t.gradient=8711,t.grave=96,t.gravebelowcmb=790,t.gravecmb=768,t.gravecomb=768,t.gravedeva=2387,t.gravelowmod=718,t.gravemonospace=65344,t.gravetonecmb=832,t.greater=62,t.greaterequal=8805,t.greaterequalorless=8923,t.greatermonospace=65310,t.greaterorequivalent=8819,t.greaterorless=8823,t.greateroverequal=8807,t.greatersmall=65125,t.gscript=609,t.gstroke=485,t.guhiragana=12368,t.guillemotleft=171,t.guillemotright=187,t.guilsinglleft=8249,t.guilsinglright=8250,t.gukatakana=12464,t.guramusquare=13080,t.gysquare=13257,t.h=104,t.haabkhasiancyrillic=1193,t.haaltonearabic=1729,t.habengali=2489,t.hadescendercyrillic=1203,t.hadeva=2361,t.hagujarati=2745,t.hagurmukhi=2617,t.haharabic=1581,t.hahfinalarabic=65186,t.hahinitialarabic=65187,t.hahiragana=12399,t.hahmedialarabic=65188,t.haitusquare=13098,t.hakatakana=12495,t.hakatakanahalfwidth=65418,t.halantgurmukhi=2637,t.hamzaarabic=1569,t.hamzalowarabic=1569,t.hangulfiller=12644,t.hardsigncyrillic=1098,t.harpoonleftbarbup=8636,t.harpoonrightbarbup=8640,t.hasquare=13258,t.hatafpatah=1458,t.hatafpatah16=1458,t.hatafpatah23=1458,t.hatafpatah2f=1458,t.hatafpatahhebrew=1458,t.hatafpatahnarrowhebrew=1458,t.hatafpatahquarterhebrew=1458,t.hatafpatahwidehebrew=1458,t.hatafqamats=1459,t.hatafqamats1b=1459,t.hatafqamats28=1459,t.hatafqamats34=1459,t.hatafqamatshebrew=1459,t.hatafqamatsnarrowhebrew=1459,t.hatafqamatsquarterhebrew=1459,t.hatafqamatswidehebrew=1459,t.hatafsegol=1457,t.hatafsegol17=1457,t.hatafsegol24=1457,t.hatafsegol30=1457,t.hatafsegolhebrew=1457,t.hatafsegolnarrowhebrew=1457,t.hatafsegolquarterhebrew=1457,t.hatafsegolwidehebrew=1457,t.hbar=295,t.hbopomofo=12559,t.hbrevebelow=7723,t.hcedilla=7721,t.hcircle=9431,t.hcircumflex=293,t.hdieresis=7719,t.hdotaccent=7715,t.hdotbelow=7717,t.he=1492,t.heart=9829,t.heartsuitblack=9829,t.heartsuitwhite=9825,t.hedagesh=64308,t.hedageshhebrew=64308,t.hehaltonearabic=1729,t.heharabic=1607,t.hehebrew=1492,t.hehfinalaltonearabic=64423,t.hehfinalalttwoarabic=65258,t.hehfinalarabic=65258,t.hehhamzaabovefinalarabic=64421,t.hehhamzaaboveisolatedarabic=64420,t.hehinitialaltonearabic=64424,t.hehinitialarabic=65259,t.hehiragana=12408,t.hehmedialaltonearabic=64425,t.hehmedialarabic=65260,t.heiseierasquare=13179,t.hekatakana=12504,t.hekatakanahalfwidth=65421,t.hekutaarusquare=13110,t.henghook=615,t.herutusquare=13113,t.het=1495,t.hethebrew=1495,t.hhook=614,t.hhooksuperior=689,t.hieuhacirclekorean=12923,t.hieuhaparenkorean=12827,t.hieuhcirclekorean=12909,t.hieuhkorean=12622,t.hieuhparenkorean=12813,t.hihiragana=12402,t.hikatakana=12498,t.hikatakanahalfwidth=65419,t.hiriq=1460,t.hiriq14=1460,t.hiriq21=1460,t.hiriq2d=1460,t.hiriqhebrew=1460,t.hiriqnarrowhebrew=1460,t.hiriqquarterhebrew=1460,t.hiriqwidehebrew=1460,t.hlinebelow=7830,t.hmonospace=65352,t.hoarmenian=1392,t.hohipthai=3627,t.hohiragana=12411,t.hokatakana=12507,t.hokatakanahalfwidth=65422,t.holam=1465,t.holam19=1465,t.holam26=1465,t.holam32=1465,t.holamhebrew=1465,t.holamnarrowhebrew=1465,t.holamquarterhebrew=1465,t.holamwidehebrew=1465,t.honokhukthai=3630,t.hookabovecomb=777,t.hookcmb=777,t.hookpalatalizedbelowcmb=801,t.hookretroflexbelowcmb=802,t.hoonsquare=13122,t.horicoptic=1001,t.horizontalbar=8213,t.horncmb=795,t.hotsprings=9832,t.house=8962,t.hparen=9379,t.hsuperior=688,t.hturned=613,t.huhiragana=12405,t.huiitosquare=13107,t.hukatakana=12501,t.hukatakanahalfwidth=65420,t.hungarumlaut=733,t.hungarumlautcmb=779,t.hv=405,t.hyphen=45,t.hypheninferior=63205,t.hyphenmonospace=65293,t.hyphensmall=65123,t.hyphensuperior=63206,t.hyphentwo=8208,t.i=105,t.iacute=237,t.iacyrillic=1103,t.ibengali=2439,t.ibopomofo=12583,t.ibreve=301,t.icaron=464,t.icircle=9432,t.icircumflex=238,t.icyrillic=1110,t.idblgrave=521,t.ideographearthcircle=12943,t.ideographfirecircle=12939,t.ideographicallianceparen=12863,t.ideographiccallparen=12858,t.ideographiccentrecircle=12965,t.ideographicclose=12294,t.ideographiccomma=12289,t.ideographiccommaleft=65380,t.ideographiccongratulationparen=12855,t.ideographiccorrectcircle=12963,t.ideographicearthparen=12847,t.ideographicenterpriseparen=12861,t.ideographicexcellentcircle=12957,t.ideographicfestivalparen=12864,t.ideographicfinancialcircle=12950,t.ideographicfinancialparen=12854,t.ideographicfireparen=12843,t.ideographichaveparen=12850,t.ideographichighcircle=12964,t.ideographiciterationmark=12293,t.ideographiclaborcircle=12952,t.ideographiclaborparen=12856,t.ideographicleftcircle=12967,t.ideographiclowcircle=12966,t.ideographicmedicinecircle=12969,t.ideographicmetalparen=12846,t.ideographicmoonparen=12842,t.ideographicnameparen=12852,t.ideographicperiod=12290,t.ideographicprintcircle=12958,t.ideographicreachparen=12867,t.ideographicrepresentparen=12857,t.ideographicresourceparen=12862,t.ideographicrightcircle=12968,t.ideographicsecretcircle=12953,t.ideographicselfparen=12866,t.ideographicsocietyparen=12851,t.ideographicspace=12288,t.ideographicspecialparen=12853,t.ideographicstockparen=12849,t.ideographicstudyparen=12859,t.ideographicsunparen=12848,t.ideographicsuperviseparen=12860,t.ideographicwaterparen=12844,t.ideographicwoodparen=12845,t.ideographiczero=12295,t.ideographmetalcircle=12942,t.ideographmooncircle=12938,t.ideographnamecircle=12948,t.ideographsuncircle=12944,t.ideographwatercircle=12940,t.ideographwoodcircle=12941,t.ideva=2311,t.idieresis=239,t.idieresisacute=7727,t.idieresiscyrillic=1253,t.idotbelow=7883,t.iebrevecyrillic=1239,t.iecyrillic=1077,t.ieungacirclekorean=12917,t.ieungaparenkorean=12821,t.ieungcirclekorean=12903,t.ieungkorean=12615,t.ieungparenkorean=12807,t.igrave=236,t.igujarati=2695,t.igurmukhi=2567,t.ihiragana=12356,t.ihookabove=7881,t.iibengali=2440,t.iicyrillic=1080,t.iideva=2312,t.iigujarati=2696,t.iigurmukhi=2568,t.iimatragurmukhi=2624,t.iinvertedbreve=523,t.iishortcyrillic=1081,t.iivowelsignbengali=2496,t.iivowelsigndeva=2368,t.iivowelsigngujarati=2752,t.ij=307,t.ikatakana=12452,t.ikatakanahalfwidth=65394,t.ikorean=12643,t.ilde=732,t.iluyhebrew=1452,t.imacron=299,t.imacroncyrillic=1251,t.imageorapproximatelyequal=8787,t.imatragurmukhi=2623,t.imonospace=65353,t.increment=8710,t.infinity=8734,t.iniarmenian=1387,t.integral=8747,t.integralbottom=8993,t.integralbt=8993,t.integralex=63733,t.integraltop=8992,t.integraltp=8992,t.intersection=8745,t.intisquare=13061,t.invbullet=9688,t.invcircle=9689,t.invsmileface=9787,t.iocyrillic=1105,t.iogonek=303,t.iota=953,t.iotadieresis=970,t.iotadieresistonos=912,t.iotalatin=617,t.iotatonos=943,t.iparen=9380,t.irigurmukhi=2674,t.ismallhiragana=12355,t.ismallkatakana=12451,t.ismallkatakanahalfwidth=65384,t.issharbengali=2554,t.istroke=616,t.isuperior=63213,t.iterationhiragana=12445,t.iterationkatakana=12541,t.itilde=297,t.itildebelow=7725,t.iubopomofo=12585,t.iucyrillic=1102,t.ivowelsignbengali=2495,t.ivowelsigndeva=2367,t.ivowelsigngujarati=2751,t.izhitsacyrillic=1141,t.izhitsadblgravecyrillic=1143,t.j=106,t.jaarmenian=1393,t.jabengali=2460,t.jadeva=2332,t.jagujarati=2716,t.jagurmukhi=2588,t.jbopomofo=12560,t.jcaron=496,t.jcircle=9433,t.jcircumflex=309,t.jcrossedtail=669,t.jdotlessstroke=607,t.jecyrillic=1112,t.jeemarabic=1580,t.jeemfinalarabic=65182,t.jeeminitialarabic=65183,t.jeemmedialarabic=65184,t.jeharabic=1688,t.jehfinalarabic=64395,t.jhabengali=2461,t.jhadeva=2333,t.jhagujarati=2717,t.jhagurmukhi=2589,t.jheharmenian=1403,t.jis=12292,t.jmonospace=65354,t.jparen=9381,t.jsuperior=690,t.k=107,t.kabashkircyrillic=1185,t.kabengali=2453,t.kacute=7729,t.kacyrillic=1082,t.kadescendercyrillic=1179,t.kadeva=2325,t.kaf=1499,t.kafarabic=1603,t.kafdagesh=64315,t.kafdageshhebrew=64315,t.kaffinalarabic=65242,t.kafhebrew=1499,t.kafinitialarabic=65243,t.kafmedialarabic=65244,t.kafrafehebrew=64333,t.kagujarati=2709,t.kagurmukhi=2581,t.kahiragana=12363,t.kahookcyrillic=1220,t.kakatakana=12459,t.kakatakanahalfwidth=65398,t.kappa=954,t.kappasymbolgreek=1008,t.kapyeounmieumkorean=12657,t.kapyeounphieuphkorean=12676,t.kapyeounpieupkorean=12664,t.kapyeounssangpieupkorean=12665,t.karoriisquare=13069,t.kashidaautoarabic=1600,t.kashidaautonosidebearingarabic=1600,t.kasmallkatakana=12533,t.kasquare=13188,t.kasraarabic=1616,t.kasratanarabic=1613,t.kastrokecyrillic=1183,t.katahiraprolongmarkhalfwidth=65392,t.kaverticalstrokecyrillic=1181,t.kbopomofo=12558,t.kcalsquare=13193,t.kcaron=489,t.kcedilla=311,t.kcircle=9434,t.kcommaaccent=311,t.kdotbelow=7731,t.keharmenian=1412,t.kehiragana=12369,t.kekatakana=12465,t.kekatakanahalfwidth=65401,t.kenarmenian=1391,t.kesmallkatakana=12534,t.kgreenlandic=312,t.khabengali=2454,t.khacyrillic=1093,t.khadeva=2326,t.khagujarati=2710,t.khagurmukhi=2582,t.khaharabic=1582,t.khahfinalarabic=65190,t.khahinitialarabic=65191,t.khahmedialarabic=65192,t.kheicoptic=999,t.khhadeva=2393,t.khhagurmukhi=2649,t.khieukhacirclekorean=12920,t.khieukhaparenkorean=12824,t.khieukhcirclekorean=12906,t.khieukhkorean=12619,t.khieukhparenkorean=12810,t.khokhaithai=3586,t.khokhonthai=3589,t.khokhuatthai=3587,t.khokhwaithai=3588,t.khomutthai=3675,t.khook=409,t.khorakhangthai=3590,t.khzsquare=13201,t.kihiragana=12365,t.kikatakana=12461,t.kikatakanahalfwidth=65399,t.kiroguramusquare=13077,t.kiromeetorusquare=13078,t.kirosquare=13076,t.kiyeokacirclekorean=12910,t.kiyeokaparenkorean=12814,t.kiyeokcirclekorean=12896,t.kiyeokkorean=12593,t.kiyeokparenkorean=12800,t.kiyeoksioskorean=12595;t.kjecyrillic=1116,t.klinebelow=7733,t.klsquare=13208,t.kmcubedsquare=13222,t.kmonospace=65355,t.kmsquaredsquare=13218,t.kohiragana=12371,t.kohmsquare=13248,t.kokaithai=3585,t.kokatakana=12467,t.kokatakanahalfwidth=65402,t.kooposquare=13086,t.koppacyrillic=1153,t.koreanstandardsymbol=12927,t.koroniscmb=835,t.kparen=9382,t.kpasquare=13226,t.ksicyrillic=1135,t.ktsquare=13263,t.kturned=670,t.kuhiragana=12367,t.kukatakana=12463,t.kukatakanahalfwidth=65400,t.kvsquare=13240,t.kwsquare=13246,t.l=108,t.labengali=2482,t.lacute=314,t.ladeva=2354,t.lagujarati=2738,t.lagurmukhi=2610,t.lakkhangyaothai=3653,t.lamaleffinalarabic=65276,t.lamalefhamzaabovefinalarabic=65272,t.lamalefhamzaaboveisolatedarabic=65271,t.lamalefhamzabelowfinalarabic=65274,t.lamalefhamzabelowisolatedarabic=65273,t.lamalefisolatedarabic=65275,t.lamalefmaddaabovefinalarabic=65270,t.lamalefmaddaaboveisolatedarabic=65269,t.lamarabic=1604,t.lambda=955,t.lambdastroke=411,t.lamed=1500,t.lameddagesh=64316,t.lameddageshhebrew=64316,t.lamedhebrew=1500,t.lamfinalarabic=65246,t.lamhahinitialarabic=64714,t.laminitialarabic=65247,t.lamjeeminitialarabic=64713,t.lamkhahinitialarabic=64715,t.lamlamhehisolatedarabic=65010,t.lammedialarabic=65248,t.lammeemhahinitialarabic=64904,t.lammeeminitialarabic=64716,t.largecircle=9711,t.lbar=410,t.lbelt=620,t.lbopomofo=12556,t.lcaron=318,t.lcedilla=316,t.lcircle=9435,t.lcircumflexbelow=7741,t.lcommaaccent=316,t.ldot=320,t.ldotaccent=320,t.ldotbelow=7735,t.ldotbelowmacron=7737,t.leftangleabovecmb=794,t.lefttackbelowcmb=792,t.less=60,t.lessequal=8804,t.lessequalorgreater=8922,t.lessmonospace=65308,t.lessorequivalent=8818,t.lessorgreater=8822,t.lessoverequal=8806,t.lesssmall=65124,t.lezh=622,t.lfblock=9612,t.lhookretroflex=621,t.lira=8356,t.liwnarmenian=1388,t.lj=457,t.ljecyrillic=1113,t.ll=63168,t.lladeva=2355,t.llagujarati=2739,t.llinebelow=7739,t.llladeva=2356,t.llvocalicbengali=2529,t.llvocalicdeva=2401,t.llvocalicvowelsignbengali=2531,t.llvocalicvowelsigndeva=2403,t.lmiddletilde=619,t.lmonospace=65356,t.lmsquare=13264,t.lochulathai=3628,t.logicaland=8743,t.logicalnot=172,t.logicalnotreversed=8976,t.logicalor=8744,t.lolingthai=3621,t.longs=383,t.lowlinecenterline=65102,t.lowlinecmb=818,t.lowlinedashed=65101,t.lozenge=9674,t.lparen=9383,t.lslash=322,t.lsquare=8467,t.lsuperior=63214,t.ltshade=9617,t.luthai=3622,t.lvocalicbengali=2444,t.lvocalicdeva=2316,t.lvocalicvowelsignbengali=2530,t.lvocalicvowelsigndeva=2402,t.lxsquare=13267,t.m=109,t.mabengali=2478,t.macron=175,t.macronbelowcmb=817,t.macroncmb=772,t.macronlowmod=717,t.macronmonospace=65507,t.macute=7743,t.madeva=2350,t.magujarati=2734,t.magurmukhi=2606,t.mahapakhhebrew=1444,t.mahapakhlefthebrew=1444,t.mahiragana=12414,t.maichattawalowleftthai=63637,t.maichattawalowrightthai=63636,t.maichattawathai=3659,t.maichattawaupperleftthai=63635,t.maieklowleftthai=63628,t.maieklowrightthai=63627,t.maiekthai=3656,t.maiekupperleftthai=63626,t.maihanakatleftthai=63620,t.maihanakatthai=3633,t.maitaikhuleftthai=63625,t.maitaikhuthai=3655,t.maitholowleftthai=63631,t.maitholowrightthai=63630,t.maithothai=3657,t.maithoupperleftthai=63629,t.maitrilowleftthai=63634,t.maitrilowrightthai=63633,t.maitrithai=3658,t.maitriupperleftthai=63632,t.maiyamokthai=3654,t.makatakana=12510,t.makatakanahalfwidth=65423,t.male=9794,t.mansyonsquare=13127,t.maqafhebrew=1470,t.mars=9794,t.masoracirclehebrew=1455,t.masquare=13187,t.mbopomofo=12551,t.mbsquare=13268,t.mcircle=9436,t.mcubedsquare=13221,t.mdotaccent=7745,t.mdotbelow=7747,t.meemarabic=1605,t.meemfinalarabic=65250,t.meeminitialarabic=65251,t.meemmedialarabic=65252,t.meemmeeminitialarabic=64721,t.meemmeemisolatedarabic=64584,t.meetorusquare=13133,t.mehiragana=12417,t.meizierasquare=13182,t.mekatakana=12513,t.mekatakanahalfwidth=65426,t.mem=1502,t.memdagesh=64318,t.memdageshhebrew=64318,t.memhebrew=1502,t.menarmenian=1396,t.merkhahebrew=1445,t.merkhakefulahebrew=1446,t.merkhakefulalefthebrew=1446,t.merkhalefthebrew=1445,t.mhook=625,t.mhzsquare=13202,t.middledotkatakanahalfwidth=65381,t.middot=183,t.mieumacirclekorean=12914,t.mieumaparenkorean=12818,t.mieumcirclekorean=12900,t.mieumkorean=12609,t.mieumpansioskorean=12656,t.mieumparenkorean=12804,t.mieumpieupkorean=12654,t.mieumsioskorean=12655,t.mihiragana=12415,t.mikatakana=12511,t.mikatakanahalfwidth=65424,t.minus=8722,t.minusbelowcmb=800,t.minuscircle=8854,t.minusmod=727,t.minusplus=8723,t.minute=8242,t.miribaarusquare=13130,t.mirisquare=13129,t.mlonglegturned=624,t.mlsquare=13206,t.mmcubedsquare=13219,t.mmonospace=65357,t.mmsquaredsquare=13215,t.mohiragana=12418,t.mohmsquare=13249,t.mokatakana=12514,t.mokatakanahalfwidth=65427,t.molsquare=13270,t.momathai=3617,t.moverssquare=13223,t.moverssquaredsquare=13224,t.mparen=9384,t.mpasquare=13227,t.mssquare=13235,t.msuperior=63215,t.mturned=623,t.mu=181,t.mu1=181,t.muasquare=13186,t.muchgreater=8811,t.muchless=8810,t.mufsquare=13196,t.mugreek=956,t.mugsquare=13197,t.muhiragana=12416,t.mukatakana=12512,t.mukatakanahalfwidth=65425,t.mulsquare=13205,t.multiply=215,t.mumsquare=13211,t.munahhebrew=1443,t.munahlefthebrew=1443,t.musicalnote=9834,t.musicalnotedbl=9835,t.musicflatsign=9837,t.musicsharpsign=9839,t.mussquare=13234,t.muvsquare=13238,t.muwsquare=13244,t.mvmegasquare=13241,t.mvsquare=13239,t.mwmegasquare=13247,t.mwsquare=13245,t.n=110,t.nabengali=2472,t.nabla=8711,t.nacute=324,t.nadeva=2344,t.nagujarati=2728,t.nagurmukhi=2600,t.nahiragana=12394,t.nakatakana=12490,t.nakatakanahalfwidth=65413,t.napostrophe=329,t.nasquare=13185,t.nbopomofo=12555,t.nbspace=160,t.ncaron=328,t.ncedilla=326,t.ncircle=9437,t.ncircumflexbelow=7755,t.ncommaaccent=326,t.ndotaccent=7749,t.ndotbelow=7751,t.nehiragana=12397,t.nekatakana=12493,t.nekatakanahalfwidth=65416,t.newsheqelsign=8362,t.nfsquare=13195,t.ngabengali=2457,t.ngadeva=2329,t.ngagujarati=2713,t.ngagurmukhi=2585,t.ngonguthai=3591,t.nhiragana=12435,t.nhookleft=626,t.nhookretroflex=627,t.nieunacirclekorean=12911,t.nieunaparenkorean=12815,t.nieuncieuckorean=12597,t.nieuncirclekorean=12897,t.nieunhieuhkorean=12598,t.nieunkorean=12596,t.nieunpansioskorean=12648,t.nieunparenkorean=12801,t.nieunsioskorean=12647,t.nieuntikeutkorean=12646,t.nihiragana=12395,t.nikatakana=12491,t.nikatakanahalfwidth=65414,t.nikhahitleftthai=63641,t.nikhahitthai=3661,t.nine=57,t.ninearabic=1641,t.ninebengali=2543,t.ninecircle=9320,t.ninecircleinversesansserif=10130,t.ninedeva=2415,t.ninegujarati=2799,t.ninegurmukhi=2671,t.ninehackarabic=1641,t.ninehangzhou=12329,t.nineideographicparen=12840,t.nineinferior=8329,t.ninemonospace=65305,t.nineoldstyle=63289,t.nineparen=9340,t.nineperiod=9360,t.ninepersian=1785,t.nineroman=8568,t.ninesuperior=8313,t.nineteencircle=9330,t.nineteenparen=9350,t.nineteenperiod=9370,t.ninethai=3673,t.nj=460,t.njecyrillic=1114,t.nkatakana=12531,t.nkatakanahalfwidth=65437,t.nlegrightlong=414,t.nlinebelow=7753,t.nmonospace=65358,t.nmsquare=13210,t.nnabengali=2467,t.nnadeva=2339,t.nnagujarati=2723,t.nnagurmukhi=2595,t.nnnadeva=2345,t.nohiragana=12398,t.nokatakana=12494,t.nokatakanahalfwidth=65417,t.nonbreakingspace=160,t.nonenthai=3603,t.nonuthai=3609,t.noonarabic=1606,t.noonfinalarabic=65254,t.noonghunnaarabic=1722,t.noonghunnafinalarabic=64415,t.nooninitialarabic=65255,t.noonjeeminitialarabic=64722,t.noonjeemisolatedarabic=64587,t.noonmedialarabic=65256,t.noonmeeminitialarabic=64725,t.noonmeemisolatedarabic=64590,t.noonnoonfinalarabic=64653,t.notcontains=8716,t.notelement=8713,t.notelementof=8713,t.notequal=8800,t.notgreater=8815,t.notgreaternorequal=8817,t.notgreaternorless=8825,t.notidentical=8802,t.notless=8814,t.notlessnorequal=8816,t.notparallel=8742,t.notprecedes=8832,t.notsubset=8836,t.notsucceeds=8833,t.notsuperset=8837,t.nowarmenian=1398,t.nparen=9385,t.nssquare=13233,t.nsuperior=8319,t.ntilde=241,t.nu=957,t.nuhiragana=12396,t.nukatakana=12492,t.nukatakanahalfwidth=65415,t.nuktabengali=2492,t.nuktadeva=2364,t.nuktagujarati=2748,t.nuktagurmukhi=2620,t.numbersign=35,t.numbersignmonospace=65283,t.numbersignsmall=65119,t.numeralsigngreek=884,t.numeralsignlowergreek=885,t.numero=8470,t.nun=1504,t.nundagesh=64320,t.nundageshhebrew=64320,t.nunhebrew=1504,t.nvsquare=13237,t.nwsquare=13243,t.nyabengali=2462,t.nyadeva=2334,t.nyagujarati=2718,t.nyagurmukhi=2590,t.o=111,t.oacute=243,t.oangthai=3629,t.obarred=629,t.obarredcyrillic=1257,t.obarreddieresiscyrillic=1259,t.obengali=2451,t.obopomofo=12571,t.obreve=335,t.ocandradeva=2321,t.ocandragujarati=2705,t.ocandravowelsigndeva=2377,t.ocandravowelsigngujarati=2761,t.ocaron=466,t.ocircle=9438,t.ocircumflex=244,t.ocircumflexacute=7889,t.ocircumflexdotbelow=7897,t.ocircumflexgrave=7891,t.ocircumflexhookabove=7893,t.ocircumflextilde=7895,t.ocyrillic=1086,t.odblacute=337,t.odblgrave=525,t.odeva=2323,t.odieresis=246,t.odieresiscyrillic=1255,t.odotbelow=7885,t.oe=339,t.oekorean=12634,t.ogonek=731,t.ogonekcmb=808,t.ograve=242,t.ogujarati=2707,t.oharmenian=1413,t.ohiragana=12362,t.ohookabove=7887,t.ohorn=417,t.ohornacute=7899,t.ohorndotbelow=7907,t.ohorngrave=7901,t.ohornhookabove=7903,t.ohorntilde=7905,t.ohungarumlaut=337,t.oi=419,t.oinvertedbreve=527,t.okatakana=12458,t.okatakanahalfwidth=65397,t.okorean=12631,t.olehebrew=1451,t.omacron=333,t.omacronacute=7763,t.omacrongrave=7761,t.omdeva=2384,t.omega=969,t.omega1=982,t.omegacyrillic=1121,t.omegalatinclosed=631,t.omegaroundcyrillic=1147,t.omegatitlocyrillic=1149,t.omegatonos=974,t.omgujarati=2768,t.omicron=959,t.omicrontonos=972,t.omonospace=65359,t.one=49,t.onearabic=1633,t.onebengali=2535,t.onecircle=9312,t.onecircleinversesansserif=10122,t.onedeva=2407,t.onedotenleader=8228,t.oneeighth=8539,t.onefitted=63196,t.onegujarati=2791,t.onegurmukhi=2663,t.onehackarabic=1633,t.onehalf=189,t.onehangzhou=12321,t.oneideographicparen=12832,t.oneinferior=8321,t.onemonospace=65297,t.onenumeratorbengali=2548,t.oneoldstyle=63281,t.oneparen=9332,t.oneperiod=9352,t.onepersian=1777,t.onequarter=188,t.oneroman=8560,t.onesuperior=185,t.onethai=3665,t.onethird=8531,t.oogonek=491,t.oogonekmacron=493,t.oogurmukhi=2579,t.oomatragurmukhi=2635,t.oopen=596,t.oparen=9386,t.openbullet=9702,t.option=8997,t.ordfeminine=170,t.ordmasculine=186,t.orthogonal=8735,t.oshortdeva=2322,t.oshortvowelsigndeva=2378,t.oslash=248,t.oslashacute=511,t.osmallhiragana=12361,t.osmallkatakana=12457,t.osmallkatakanahalfwidth=65387,t.ostrokeacute=511,t.osuperior=63216,t.otcyrillic=1151,t.otilde=245,t.otildeacute=7757,t.otildedieresis=7759,t.oubopomofo=12577,t.overline=8254,t.overlinecenterline=65098,t.overlinecmb=773,t.overlinedashed=65097,t.overlinedblwavy=65100,t.overlinewavy=65099,t.overscore=175,t.ovowelsignbengali=2507,t.ovowelsigndeva=2379,t.ovowelsigngujarati=2763,t.p=112,t.paampssquare=13184,t.paasentosquare=13099,t.pabengali=2474,t.pacute=7765,t.padeva=2346,t.pagedown=8671,t.pageup=8670,t.pagujarati=2730,t.pagurmukhi=2602,t.pahiragana=12401,t.paiyannoithai=3631,t.pakatakana=12497,t.palatalizationcyrilliccmb=1156,t.palochkacyrillic=1216,t.pansioskorean=12671,t.paragraph=182,t.parallel=8741,t.parenleft=40,t.parenleftaltonearabic=64830,t.parenleftbt=63725,t.parenleftex=63724,t.parenleftinferior=8333,t.parenleftmonospace=65288,t.parenleftsmall=65113,t.parenleftsuperior=8317,t.parenlefttp=63723,t.parenleftvertical=65077,t.parenright=41,t.parenrightaltonearabic=64831,t.parenrightbt=63736,t.parenrightex=63735,t.parenrightinferior=8334,t.parenrightmonospace=65289,t.parenrightsmall=65114,t.parenrightsuperior=8318,t.parenrighttp=63734,t.parenrightvertical=65078,t.partialdiff=8706,t.paseqhebrew=1472,t.pashtahebrew=1433,t.pasquare=13225,t.patah=1463,t.patah11=1463,t.patah1d=1463,t.patah2a=1463,t.patahhebrew=1463,t.patahnarrowhebrew=1463,t.patahquarterhebrew=1463,t.patahwidehebrew=1463,t.pazerhebrew=1441,t.pbopomofo=12550,t.pcircle=9439,t.pdotaccent=7767,t.pe=1508,t.pecyrillic=1087,t.pedagesh=64324,t.pedageshhebrew=64324,t.peezisquare=13115,t.pefinaldageshhebrew=64323,t.peharabic=1662,t.peharmenian=1402,t.pehebrew=1508,t.pehfinalarabic=64343,t.pehinitialarabic=64344,t.pehiragana=12410,t.pehmedialarabic=64345,t.pekatakana=12506,t.pemiddlehookcyrillic=1191,t.perafehebrew=64334,t.percent=37,t.percentarabic=1642,t.percentmonospace=65285,t.percentsmall=65130,t.period=46,t.periodarmenian=1417,t.periodcentered=183,t.periodhalfwidth=65377,t.periodinferior=63207,t.periodmonospace=65294,t.periodsmall=65106,t.periodsuperior=63208,t.perispomenigreekcmb=834,t.perpendicular=8869,t.perthousand=8240,t.peseta=8359,t.pfsquare=13194,t.phabengali=2475,t.phadeva=2347,t.phagujarati=2731,t.phagurmukhi=2603,t.phi=966,t.phi1=981,t.phieuphacirclekorean=12922,t.phieuphaparenkorean=12826,t.phieuphcirclekorean=12908,t.phieuphkorean=12621,t.phieuphparenkorean=12812,t.philatin=632,t.phinthuthai=3642,t.phisymbolgreek=981,t.phook=421,t.phophanthai=3614,t.phophungthai=3612,t.phosamphaothai=3616,t.pi=960,t.pieupacirclekorean=12915,t.pieupaparenkorean=12819,t.pieupcieuckorean=12662,t.pieupcirclekorean=12901,t.pieupkiyeokkorean=12658,t.pieupkorean=12610,t.pieupparenkorean=12805,t.pieupsioskiyeokkorean=12660,t.pieupsioskorean=12612,t.pieupsiostikeutkorean=12661,t.pieupthieuthkorean=12663,t.pieuptikeutkorean=12659,t.pihiragana=12404,t.pikatakana=12500,t.pisymbolgreek=982,t.piwrarmenian=1411,t.planckover2pi=8463,t.planckover2pi1=8463,t.plus=43,t.plusbelowcmb=799,t.pluscircle=8853,t.plusminus=177,t.plusmod=726,t.plusmonospace=65291,t.plussmall=65122,t.plussuperior=8314,t.pmonospace=65360,t.pmsquare=13272,t.pohiragana=12413,t.pointingindexdownwhite=9759,t.pointingindexleftwhite=9756,t.pointingindexrightwhite=9758,t.pointingindexupwhite=9757,t.pokatakana=12509,t.poplathai=3611,t.postalmark=12306,t.postalmarkface=12320,t.pparen=9387,t.precedes=8826,t.prescription=8478,t.primemod=697,t.primereversed=8245,t.product=8719,t.projective=8965,t.prolongedkana=12540,t.propellor=8984,t.propersubset=8834,t.propersuperset=8835,t.proportion=8759,t.proportional=8733,t.psi=968,t.psicyrillic=1137,t.psilipneumatacyrilliccmb=1158,t.pssquare=13232,t.puhiragana=12407,t.pukatakana=12503,t.pvsquare=13236,t.pwsquare=13242,t.q=113,t.qadeva=2392,t.qadmahebrew=1448,t.qafarabic=1602,t.qaffinalarabic=65238,t.qafinitialarabic=65239,t.qafmedialarabic=65240,t.qamats=1464,t.qamats10=1464,t.qamats1a=1464,t.qamats1c=1464,t.qamats27=1464,t.qamats29=1464,t.qamats33=1464,t.qamatsde=1464,t.qamatshebrew=1464,t.qamatsnarrowhebrew=1464,t.qamatsqatanhebrew=1464,t.qamatsqatannarrowhebrew=1464,t.qamatsqatanquarterhebrew=1464,t.qamatsqatanwidehebrew=1464,t.qamatsquarterhebrew=1464,t.qamatswidehebrew=1464,t.qarneyparahebrew=1439,t.qbopomofo=12561,t.qcircle=9440,t.qhook=672,t.qmonospace=65361,t.qof=1511,t.qofdagesh=64327,t.qofdageshhebrew=64327,t.qofhebrew=1511,t.qparen=9388,t.quarternote=9833,t.qubuts=1467,t.qubuts18=1467,t.qubuts25=1467,t.qubuts31=1467,t.qubutshebrew=1467,t.qubutsnarrowhebrew=1467,t.qubutsquarterhebrew=1467,t.qubutswidehebrew=1467,t.question=63,t.questionarabic=1567,t.questionarmenian=1374,t.questiondown=191,t.questiondownsmall=63423,t.questiongreek=894,t.questionmonospace=65311,t.questionsmall=63295,t.quotedbl=34,t.quotedblbase=8222,t.quotedblleft=8220,t.quotedblmonospace=65282,t.quotedblprime=12318,t.quotedblprimereversed=12317,t.quotedblright=8221,t.quoteleft=8216,t.quoteleftreversed=8219,t.quotereversed=8219,t.quoteright=8217,t.quoterightn=329,t.quotesinglbase=8218,t.quotesingle=39,t.quotesinglemonospace=65287,t.r=114,t.raarmenian=1404,t.rabengali=2480,t.racute=341,t.radeva=2352,t.radical=8730,t.radicalex=63717,t.radoverssquare=13230,t.radoverssquaredsquare=13231,t.radsquare=13229,t.rafe=1471,t.rafehebrew=1471,t.ragujarati=2736,t.ragurmukhi=2608,t.rahiragana=12425,t.rakatakana=12521,t.rakatakanahalfwidth=65431,t.ralowerdiagonalbengali=2545,t.ramiddlediagonalbengali=2544,t.ramshorn=612,t.ratio=8758,t.rbopomofo=12566,t.rcaron=345,t.rcedilla=343,t.rcircle=9441,t.rcommaaccent=343,t.rdblgrave=529,t.rdotaccent=7769,t.rdotbelow=7771,t.rdotbelowmacron=7773,t.referencemark=8251,t.reflexsubset=8838,t.reflexsuperset=8839,t.registered=174,t.registersans=63720,t.registerserif=63194,t.reharabic=1585,t.reharmenian=1408,t.rehfinalarabic=65198,t.rehiragana=12428,t.rekatakana=12524;t.rekatakanahalfwidth=65434,t.resh=1512,t.reshdageshhebrew=64328,t.reshhebrew=1512,t.reversedtilde=8765,t.reviahebrew=1431,t.reviamugrashhebrew=1431,t.revlogicalnot=8976,t.rfishhook=638,t.rfishhookreversed=639,t.rhabengali=2525,t.rhadeva=2397,t.rho=961,t.rhook=637,t.rhookturned=635,t.rhookturnedsuperior=693,t.rhosymbolgreek=1009,t.rhotichookmod=734,t.rieulacirclekorean=12913,t.rieulaparenkorean=12817,t.rieulcirclekorean=12899,t.rieulhieuhkorean=12608,t.rieulkiyeokkorean=12602,t.rieulkiyeoksioskorean=12649,t.rieulkorean=12601,t.rieulmieumkorean=12603,t.rieulpansioskorean=12652,t.rieulparenkorean=12803,t.rieulphieuphkorean=12607,t.rieulpieupkorean=12604,t.rieulpieupsioskorean=12651,t.rieulsioskorean=12605,t.rieulthieuthkorean=12606,t.rieultikeutkorean=12650,t.rieulyeorinhieuhkorean=12653,t.rightangle=8735,t.righttackbelowcmb=793,t.righttriangle=8895,t.rihiragana=12426,t.rikatakana=12522,t.rikatakanahalfwidth=65432,t.ring=730,t.ringbelowcmb=805,t.ringcmb=778,t.ringhalfleft=703,t.ringhalfleftarmenian=1369,t.ringhalfleftbelowcmb=796,t.ringhalfleftcentered=723,t.ringhalfright=702,t.ringhalfrightbelowcmb=825,t.ringhalfrightcentered=722,t.rinvertedbreve=531,t.rittorusquare=13137,t.rlinebelow=7775,t.rlongleg=636,t.rlonglegturned=634,t.rmonospace=65362,t.rohiragana=12429,t.rokatakana=12525,t.rokatakanahalfwidth=65435,t.roruathai=3619,t.rparen=9389,t.rrabengali=2524,t.rradeva=2353,t.rragurmukhi=2652,t.rreharabic=1681,t.rrehfinalarabic=64397,t.rrvocalicbengali=2528,t.rrvocalicdeva=2400,t.rrvocalicgujarati=2784,t.rrvocalicvowelsignbengali=2500,t.rrvocalicvowelsigndeva=2372,t.rrvocalicvowelsigngujarati=2756,t.rsuperior=63217,t.rtblock=9616,t.rturned=633,t.rturnedsuperior=692,t.ruhiragana=12427,t.rukatakana=12523,t.rukatakanahalfwidth=65433,t.rupeemarkbengali=2546,t.rupeesignbengali=2547,t.rupiah=63197,t.ruthai=3620,t.rvocalicbengali=2443,t.rvocalicdeva=2315,t.rvocalicgujarati=2699,t.rvocalicvowelsignbengali=2499,t.rvocalicvowelsigndeva=2371,t.rvocalicvowelsigngujarati=2755,t.s=115,t.sabengali=2488,t.sacute=347,t.sacutedotaccent=7781,t.sadarabic=1589,t.sadeva=2360,t.sadfinalarabic=65210,t.sadinitialarabic=65211,t.sadmedialarabic=65212,t.sagujarati=2744,t.sagurmukhi=2616,t.sahiragana=12373,t.sakatakana=12469,t.sakatakanahalfwidth=65403,t.sallallahoualayhewasallamarabic=65018,t.samekh=1505,t.samekhdagesh=64321,t.samekhdageshhebrew=64321,t.samekhhebrew=1505,t.saraaathai=3634,t.saraaethai=3649,t.saraaimaimalaithai=3652,t.saraaimaimuanthai=3651,t.saraamthai=3635,t.saraathai=3632,t.saraethai=3648,t.saraiileftthai=63622,t.saraiithai=3637,t.saraileftthai=63621,t.saraithai=3636,t.saraothai=3650,t.saraueeleftthai=63624,t.saraueethai=3639,t.saraueleftthai=63623,t.sarauethai=3638,t.sarauthai=3640,t.sarauuthai=3641,t.sbopomofo=12569,t.scaron=353,t.scarondotaccent=7783,t.scedilla=351,t.schwa=601,t.schwacyrillic=1241,t.schwadieresiscyrillic=1243,t.schwahook=602,t.scircle=9442,t.scircumflex=349,t.scommaaccent=537,t.sdotaccent=7777,t.sdotbelow=7779,t.sdotbelowdotaccent=7785,t.seagullbelowcmb=828,t.second=8243,t.secondtonechinese=714,t.section=167,t.seenarabic=1587,t.seenfinalarabic=65202,t.seeninitialarabic=65203,t.seenmedialarabic=65204,t.segol=1462,t.segol13=1462,t.segol1f=1462,t.segol2c=1462,t.segolhebrew=1462,t.segolnarrowhebrew=1462,t.segolquarterhebrew=1462,t.segoltahebrew=1426,t.segolwidehebrew=1462,t.seharmenian=1405,t.sehiragana=12379,t.sekatakana=12475,t.sekatakanahalfwidth=65406,t.semicolon=59,t.semicolonarabic=1563,t.semicolonmonospace=65307,t.semicolonsmall=65108,t.semivoicedmarkkana=12444,t.semivoicedmarkkanahalfwidth=65439,t.sentisquare=13090,t.sentosquare=13091,t.seven=55,t.sevenarabic=1639,t.sevenbengali=2541,t.sevencircle=9318,t.sevencircleinversesansserif=10128,t.sevendeva=2413,t.seveneighths=8542,t.sevengujarati=2797,t.sevengurmukhi=2669,t.sevenhackarabic=1639,t.sevenhangzhou=12327,t.sevenideographicparen=12838,t.seveninferior=8327,t.sevenmonospace=65303,t.sevenoldstyle=63287,t.sevenparen=9338,t.sevenperiod=9358,t.sevenpersian=1783,t.sevenroman=8566,t.sevensuperior=8311,t.seventeencircle=9328,t.seventeenparen=9348,t.seventeenperiod=9368,t.seventhai=3671,t.sfthyphen=173,t.shaarmenian=1399,t.shabengali=2486,t.shacyrillic=1096,t.shaddaarabic=1617,t.shaddadammaarabic=64609,t.shaddadammatanarabic=64606,t.shaddafathaarabic=64608,t.shaddakasraarabic=64610,t.shaddakasratanarabic=64607,t.shade=9618,t.shadedark=9619,t.shadelight=9617,t.shademedium=9618,t.shadeva=2358,t.shagujarati=2742,t.shagurmukhi=2614,t.shalshelethebrew=1427,t.shbopomofo=12565,t.shchacyrillic=1097,t.sheenarabic=1588,t.sheenfinalarabic=65206,t.sheeninitialarabic=65207,t.sheenmedialarabic=65208,t.sheicoptic=995,t.sheqel=8362,t.sheqelhebrew=8362,t.sheva=1456,t.sheva115=1456,t.sheva15=1456,t.sheva22=1456,t.sheva2e=1456,t.shevahebrew=1456,t.shevanarrowhebrew=1456,t.shevaquarterhebrew=1456,t.shevawidehebrew=1456,t.shhacyrillic=1211,t.shimacoptic=1005,t.shin=1513,t.shindagesh=64329,t.shindageshhebrew=64329,t.shindageshshindot=64300,t.shindageshshindothebrew=64300,t.shindageshsindot=64301,t.shindageshsindothebrew=64301,t.shindothebrew=1473,t.shinhebrew=1513,t.shinshindot=64298,t.shinshindothebrew=64298,t.shinsindot=64299,t.shinsindothebrew=64299,t.shook=642,t.sigma=963,t.sigma1=962,t.sigmafinal=962,t.sigmalunatesymbolgreek=1010,t.sihiragana=12375,t.sikatakana=12471,t.sikatakanahalfwidth=65404,t.siluqhebrew=1469,t.siluqlefthebrew=1469,t.similar=8764,t.sindothebrew=1474,t.siosacirclekorean=12916,t.siosaparenkorean=12820,t.sioscieuckorean=12670,t.sioscirclekorean=12902,t.sioskiyeokkorean=12666,t.sioskorean=12613,t.siosnieunkorean=12667,t.siosparenkorean=12806,t.siospieupkorean=12669,t.siostikeutkorean=12668,t.six=54,t.sixarabic=1638,t.sixbengali=2540,t.sixcircle=9317,t.sixcircleinversesansserif=10127,t.sixdeva=2412,t.sixgujarati=2796,t.sixgurmukhi=2668,t.sixhackarabic=1638,t.sixhangzhou=12326,t.sixideographicparen=12837,t.sixinferior=8326,t.sixmonospace=65302,t.sixoldstyle=63286,t.sixparen=9337,t.sixperiod=9357,t.sixpersian=1782,t.sixroman=8565,t.sixsuperior=8310,t.sixteencircle=9327,t.sixteencurrencydenominatorbengali=2553,t.sixteenparen=9347,t.sixteenperiod=9367,t.sixthai=3670,t.slash=47,t.slashmonospace=65295,t.slong=383,t.slongdotaccent=7835,t.smileface=9786,t.smonospace=65363,t.sofpasuqhebrew=1475,t.softhyphen=173,t.softsigncyrillic=1100,t.sohiragana=12381,t.sokatakana=12477,t.sokatakanahalfwidth=65407,t.soliduslongoverlaycmb=824,t.solidusshortoverlaycmb=823,t.sorusithai=3625,t.sosalathai=3624,t.sosothai=3595,t.sosuathai=3626,t.space=32,t.spacehackarabic=32,t.spade=9824,t.spadesuitblack=9824,t.spadesuitwhite=9828,t.sparen=9390,t.squarebelowcmb=827,t.squarecc=13252,t.squarecm=13213,t.squarediagonalcrosshatchfill=9641,t.squarehorizontalfill=9636,t.squarekg=13199,t.squarekm=13214,t.squarekmcapital=13262,t.squareln=13265,t.squarelog=13266,t.squaremg=13198,t.squaremil=13269,t.squaremm=13212,t.squaremsquared=13217,t.squareorthogonalcrosshatchfill=9638,t.squareupperlefttolowerrightfill=9639,t.squareupperrighttolowerleftfill=9640,t.squareverticalfill=9637,t.squarewhitewithsmallblack=9635,t.srsquare=13275,t.ssabengali=2487,t.ssadeva=2359,t.ssagujarati=2743,t.ssangcieuckorean=12617,t.ssanghieuhkorean=12677,t.ssangieungkorean=12672,t.ssangkiyeokkorean=12594,t.ssangnieunkorean=12645,t.ssangpieupkorean=12611,t.ssangsioskorean=12614,t.ssangtikeutkorean=12600,t.ssuperior=63218,t.sterling=163,t.sterlingmonospace=65505,t.strokelongoverlaycmb=822,t.strokeshortoverlaycmb=821,t.subset=8834,t.subsetnotequal=8842,t.subsetorequal=8838,t.succeeds=8827,t.suchthat=8715,t.suhiragana=12377,t.sukatakana=12473,t.sukatakanahalfwidth=65405,t.sukunarabic=1618,t.summation=8721,t.sun=9788,t.superset=8835,t.supersetnotequal=8843,t.supersetorequal=8839,t.svsquare=13276,t.syouwaerasquare=13180,t.t=116,t.tabengali=2468,t.tackdown=8868,t.tackleft=8867,t.tadeva=2340,t.tagujarati=2724,t.tagurmukhi=2596,t.taharabic=1591,t.tahfinalarabic=65218,t.tahinitialarabic=65219,t.tahiragana=12383,t.tahmedialarabic=65220,t.taisyouerasquare=13181,t.takatakana=12479,t.takatakanahalfwidth=65408,t.tatweelarabic=1600,t.tau=964,t.tav=1514,t.tavdages=64330,t.tavdagesh=64330,t.tavdageshhebrew=64330,t.tavhebrew=1514,t.tbar=359,t.tbopomofo=12554,t.tcaron=357,t.tccurl=680,t.tcedilla=355,t.tcheharabic=1670,t.tchehfinalarabic=64379,t.tchehinitialarabic=64380,t.tchehmedialarabic=64381,t.tcircle=9443,t.tcircumflexbelow=7793,t.tcommaaccent=355,t.tdieresis=7831,t.tdotaccent=7787,t.tdotbelow=7789,t.tecyrillic=1090,t.tedescendercyrillic=1197,t.teharabic=1578,t.tehfinalarabic=65174,t.tehhahinitialarabic=64674,t.tehhahisolatedarabic=64524,t.tehinitialarabic=65175,t.tehiragana=12390,t.tehjeeminitialarabic=64673,t.tehjeemisolatedarabic=64523,t.tehmarbutaarabic=1577,t.tehmarbutafinalarabic=65172,t.tehmedialarabic=65176,t.tehmeeminitialarabic=64676,t.tehmeemisolatedarabic=64526,t.tehnoonfinalarabic=64627,t.tekatakana=12486,t.tekatakanahalfwidth=65411,t.telephone=8481,t.telephoneblack=9742,t.telishagedolahebrew=1440,t.telishaqetanahebrew=1449,t.tencircle=9321,t.tenideographicparen=12841,t.tenparen=9341,t.tenperiod=9361,t.tenroman=8569,t.tesh=679,t.tet=1496,t.tetdagesh=64312,t.tetdageshhebrew=64312,t.tethebrew=1496,t.tetsecyrillic=1205,t.tevirhebrew=1435,t.tevirlefthebrew=1435,t.thabengali=2469,t.thadeva=2341,t.thagujarati=2725,t.thagurmukhi=2597,t.thalarabic=1584,t.thalfinalarabic=65196,t.thanthakhatlowleftthai=63640,t.thanthakhatlowrightthai=63639,t.thanthakhatthai=3660,t.thanthakhatupperleftthai=63638,t.theharabic=1579,t.thehfinalarabic=65178,t.thehinitialarabic=65179,t.thehmedialarabic=65180,t.thereexists=8707,t.therefore=8756,t.theta=952,t.theta1=977,t.thetasymbolgreek=977,t.thieuthacirclekorean=12921,t.thieuthaparenkorean=12825,t.thieuthcirclekorean=12907,t.thieuthkorean=12620,t.thieuthparenkorean=12811,t.thirteencircle=9324,t.thirteenparen=9344,t.thirteenperiod=9364,t.thonangmonthothai=3601,t.thook=429,t.thophuthaothai=3602,t.thorn=254,t.thothahanthai=3607,t.thothanthai=3600,t.thothongthai=3608,t.thothungthai=3606,t.thousandcyrillic=1154,t.thousandsseparatorarabic=1644,t.thousandsseparatorpersian=1644,t.three=51,t.threearabic=1635,t.threebengali=2537,t.threecircle=9314,t.threecircleinversesansserif=10124,t.threedeva=2409,t.threeeighths=8540,t.threegujarati=2793,t.threegurmukhi=2665,t.threehackarabic=1635,t.threehangzhou=12323,t.threeideographicparen=12834,t.threeinferior=8323,t.threemonospace=65299,t.threenumeratorbengali=2550,t.threeoldstyle=63283,t.threeparen=9334,t.threeperiod=9354,t.threepersian=1779,t.threequarters=190,t.threequartersemdash=63198,t.threeroman=8562,t.threesuperior=179,t.threethai=3667,t.thzsquare=13204,t.tihiragana=12385,t.tikatakana=12481,t.tikatakanahalfwidth=65409,t.tikeutacirclekorean=12912,t.tikeutaparenkorean=12816,t.tikeutcirclekorean=12898,t.tikeutkorean=12599,t.tikeutparenkorean=12802,t.tilde=732,t.tildebelowcmb=816,t.tildecmb=771,t.tildecomb=771,t.tildedoublecmb=864,t.tildeoperator=8764,t.tildeoverlaycmb=820,t.tildeverticalcmb=830,t.timescircle=8855,t.tipehahebrew=1430,t.tipehalefthebrew=1430,t.tippigurmukhi=2672,t.titlocyrilliccmb=1155,t.tiwnarmenian=1407,t.tlinebelow=7791,t.tmonospace=65364,t.toarmenian=1385,t.tohiragana=12392,t.tokatakana=12488,t.tokatakanahalfwidth=65412,t.tonebarextrahighmod=741,t.tonebarextralowmod=745,t.tonebarhighmod=742,t.tonebarlowmod=744,t.tonebarmidmod=743,t.tonefive=445,t.tonesix=389,t.tonetwo=424,t.tonos=900,t.tonsquare=13095,t.topatakthai=3599,t.tortoiseshellbracketleft=12308,t.tortoiseshellbracketleftsmall=65117,t.tortoiseshellbracketleftvertical=65081,t.tortoiseshellbracketright=12309,t.tortoiseshellbracketrightsmall=65118,t.tortoiseshellbracketrightvertical=65082,t.totaothai=3605,t.tpalatalhook=427,t.tparen=9391,t.trademark=8482,t.trademarksans=63722,t.trademarkserif=63195,t.tretroflexhook=648,t.triagdn=9660,t.triaglf=9668,t.triagrt=9658,t.triagup=9650,t.ts=678,t.tsadi=1510,t.tsadidagesh=64326,t.tsadidageshhebrew=64326,t.tsadihebrew=1510,t.tsecyrillic=1094,t.tsere=1461,t.tsere12=1461,t.tsere1e=1461,t.tsere2b=1461,t.tserehebrew=1461,t.tserenarrowhebrew=1461,t.tserequarterhebrew=1461,t.tserewidehebrew=1461,t.tshecyrillic=1115,t.tsuperior=63219,t.ttabengali=2463,t.ttadeva=2335,t.ttagujarati=2719,t.ttagurmukhi=2591,t.tteharabic=1657,t.ttehfinalarabic=64359,t.ttehinitialarabic=64360,t.ttehmedialarabic=64361,t.tthabengali=2464,t.tthadeva=2336,t.tthagujarati=2720,t.tthagurmukhi=2592,t.tturned=647,t.tuhiragana=12388,t.tukatakana=12484,t.tukatakanahalfwidth=65410,t.tusmallhiragana=12387,t.tusmallkatakana=12483,t.tusmallkatakanahalfwidth=65391,t.twelvecircle=9323,t.twelveparen=9343,t.twelveperiod=9363,t.twelveroman=8571,t.twentycircle=9331,t.twentyhangzhou=21316,t.twentyparen=9351,t.twentyperiod=9371,t.two=50,t.twoarabic=1634,t.twobengali=2536,t.twocircle=9313,t.twocircleinversesansserif=10123,t.twodeva=2408,t.twodotenleader=8229,t.twodotleader=8229,t.twodotleadervertical=65072,t.twogujarati=2792,t.twogurmukhi=2664,t.twohackarabic=1634,t.twohangzhou=12322,t.twoideographicparen=12833,t.twoinferior=8322,t.twomonospace=65298,t.twonumeratorbengali=2549,t.twooldstyle=63282,t.twoparen=9333,t.twoperiod=9353,t.twopersian=1778,t.tworoman=8561,t.twostroke=443,t.twosuperior=178,t.twothai=3666,t.twothirds=8532,t.u=117,t.uacute=250,t.ubar=649,t.ubengali=2441,t.ubopomofo=12584,t.ubreve=365,t.ucaron=468,t.ucircle=9444,t.ucircumflex=251,t.ucircumflexbelow=7799,t.ucyrillic=1091,t.udattadeva=2385,t.udblacute=369,t.udblgrave=533,t.udeva=2313,t.udieresis=252,t.udieresisacute=472,t.udieresisbelow=7795,t.udieresiscaron=474,t.udieresiscyrillic=1265,t.udieresisgrave=476,t.udieresismacron=470,t.udotbelow=7909,t.ugrave=249,t.ugujarati=2697,t.ugurmukhi=2569,t.uhiragana=12358,t.uhookabove=7911,t.uhorn=432,t.uhornacute=7913,t.uhorndotbelow=7921,t.uhorngrave=7915,t.uhornhookabove=7917,t.uhorntilde=7919,t.uhungarumlaut=369,t.uhungarumlautcyrillic=1267,t.uinvertedbreve=535,t.ukatakana=12454,t.ukatakanahalfwidth=65395,t.ukcyrillic=1145,t.ukorean=12636,t.umacron=363,t.umacroncyrillic=1263,t.umacrondieresis=7803,t.umatragurmukhi=2625,t.umonospace=65365,t.underscore=95,t.underscoredbl=8215,t.underscoremonospace=65343,t.underscorevertical=65075,t.underscorewavy=65103,t.union=8746,t.universal=8704,t.uogonek=371,t.uparen=9392,t.upblock=9600,t.upperdothebrew=1476,t.upsilon=965,t.upsilondieresis=971,t.upsilondieresistonos=944,t.upsilonlatin=650,t.upsilontonos=973,t.uptackbelowcmb=797,t.uptackmod=724,t.uragurmukhi=2675,t.uring=367,t.ushortcyrillic=1118,t.usmallhiragana=12357,t.usmallkatakana=12453,t.usmallkatakanahalfwidth=65385,t.ustraightcyrillic=1199,t.ustraightstrokecyrillic=1201,t.utilde=361,t.utildeacute=7801,t.utildebelow=7797,t.uubengali=2442,t.uudeva=2314,t.uugujarati=2698,t.uugurmukhi=2570,t.uumatragurmukhi=2626,t.uuvowelsignbengali=2498,t.uuvowelsigndeva=2370,t.uuvowelsigngujarati=2754,t.uvowelsignbengali=2497,t.uvowelsigndeva=2369,t.uvowelsigngujarati=2753,t.v=118,t.vadeva=2357,t.vagujarati=2741,t.vagurmukhi=2613,t.vakatakana=12535,t.vav=1493,t.vavdagesh=64309,t.vavdagesh65=64309,t.vavdageshhebrew=64309,t.vavhebrew=1493,t.vavholam=64331,t.vavholamhebrew=64331,t.vavvavhebrew=1520,t.vavyodhebrew=1521,t.vcircle=9445,t.vdotbelow=7807,t.vecyrillic=1074,t.veharabic=1700,t.vehfinalarabic=64363,t.vehinitialarabic=64364,t.vehmedialarabic=64365,t.vekatakana=12537,t.venus=9792,t.verticalbar=124,t.verticallineabovecmb=781,t.verticallinebelowcmb=809,t.verticallinelowmod=716,t.verticallinemod=712,t.vewarmenian=1406,t.vhook=651,t.vikatakana=12536,t.viramabengali=2509,t.viramadeva=2381,t.viramagujarati=2765,t.visargabengali=2435,t.visargadeva=2307,t.visargagujarati=2691,t.vmonospace=65366,t.voarmenian=1400,t.voicediterationhiragana=12446,t.voicediterationkatakana=12542,t.voicedmarkkana=12443,t.voicedmarkkanahalfwidth=65438,t.vokatakana=12538,t.vparen=9393,t.vtilde=7805,t.vturned=652,t.vuhiragana=12436,t.vukatakana=12532,t.w=119,t.wacute=7811,t.waekorean=12633,t.wahiragana=12431,t.wakatakana=12527,t.wakatakanahalfwidth=65436,t.wakorean=12632,t.wasmallhiragana=12430,t.wasmallkatakana=12526,t.wattosquare=13143,t.wavedash=12316,t.wavyunderscorevertical=65076,t.wawarabic=1608,t.wawfinalarabic=65262,t.wawhamzaabovearabic=1572,t.wawhamzaabovefinalarabic=65158,t.wbsquare=13277,t.wcircle=9446,t.wcircumflex=373,t.wdieresis=7813,t.wdotaccent=7815,t.wdotbelow=7817,t.wehiragana=12433,t.weierstrass=8472,t.wekatakana=12529,t.wekorean=12638,t.weokorean=12637,t.wgrave=7809,t.whitebullet=9702,t.whitecircle=9675,t.whitecircleinverse=9689,t.whitecornerbracketleft=12302,t.whitecornerbracketleftvertical=65091,t.whitecornerbracketright=12303,t.whitecornerbracketrightvertical=65092,t.whitediamond=9671,t.whitediamondcontainingblacksmalldiamond=9672,t.whitedownpointingsmalltriangle=9663;t.whitedownpointingtriangle=9661,t.whiteleftpointingsmalltriangle=9667,t.whiteleftpointingtriangle=9665,t.whitelenticularbracketleft=12310,t.whitelenticularbracketright=12311,t.whiterightpointingsmalltriangle=9657,t.whiterightpointingtriangle=9655,t.whitesmallsquare=9643,t.whitesmilingface=9786,t.whitesquare=9633,t.whitestar=9734,t.whitetelephone=9743,t.whitetortoiseshellbracketleft=12312,t.whitetortoiseshellbracketright=12313,t.whiteuppointingsmalltriangle=9653,t.whiteuppointingtriangle=9651,t.wihiragana=12432,t.wikatakana=12528,t.wikorean=12639,t.wmonospace=65367,t.wohiragana=12434,t.wokatakana=12530,t.wokatakanahalfwidth=65382,t.won=8361,t.wonmonospace=65510,t.wowaenthai=3623,t.wparen=9394,t.wring=7832,t.wsuperior=695,t.wturned=653,t.wynn=447,t.x=120,t.xabovecmb=829,t.xbopomofo=12562,t.xcircle=9447,t.xdieresis=7821,t.xdotaccent=7819,t.xeharmenian=1389,t.xi=958,t.xmonospace=65368,t.xparen=9395,t.xsuperior=739,t.y=121,t.yaadosquare=13134,t.yabengali=2479,t.yacute=253,t.yadeva=2351,t.yaekorean=12626,t.yagujarati=2735,t.yagurmukhi=2607,t.yahiragana=12420,t.yakatakana=12516,t.yakatakanahalfwidth=65428,t.yakorean=12625,t.yamakkanthai=3662,t.yasmallhiragana=12419,t.yasmallkatakana=12515,t.yasmallkatakanahalfwidth=65388,t.yatcyrillic=1123,t.ycircle=9448,t.ycircumflex=375,t.ydieresis=255,t.ydotaccent=7823,t.ydotbelow=7925,t.yeharabic=1610,t.yehbarreearabic=1746,t.yehbarreefinalarabic=64431,t.yehfinalarabic=65266,t.yehhamzaabovearabic=1574,t.yehhamzaabovefinalarabic=65162,t.yehhamzaaboveinitialarabic=65163,t.yehhamzaabovemedialarabic=65164,t.yehinitialarabic=65267,t.yehmedialarabic=65268,t.yehmeeminitialarabic=64733,t.yehmeemisolatedarabic=64600,t.yehnoonfinalarabic=64660,t.yehthreedotsbelowarabic=1745,t.yekorean=12630,t.yen=165,t.yenmonospace=65509,t.yeokorean=12629,t.yeorinhieuhkorean=12678,t.yerahbenyomohebrew=1450,t.yerahbenyomolefthebrew=1450,t.yericyrillic=1099,t.yerudieresiscyrillic=1273,t.yesieungkorean=12673,t.yesieungpansioskorean=12675,t.yesieungsioskorean=12674,t.yetivhebrew=1434,t.ygrave=7923,t.yhook=436,t.yhookabove=7927,t.yiarmenian=1397,t.yicyrillic=1111,t.yikorean=12642,t.yinyang=9775,t.yiwnarmenian=1410,t.ymonospace=65369,t.yod=1497,t.yoddagesh=64313,t.yoddageshhebrew=64313,t.yodhebrew=1497,t.yodyodhebrew=1522,t.yodyodpatahhebrew=64287,t.yohiragana=12424,t.yoikorean=12681,t.yokatakana=12520,t.yokatakanahalfwidth=65430,t.yokorean=12635,t.yosmallhiragana=12423,t.yosmallkatakana=12519,t.yosmallkatakanahalfwidth=65390,t.yotgreek=1011,t.yoyaekorean=12680,t.yoyakorean=12679,t.yoyakthai=3618,t.yoyingthai=3597,t.yparen=9396,t.ypogegrammeni=890,t.ypogegrammenigreekcmb=837,t.yr=422,t.yring=7833,t.ysuperior=696,t.ytilde=7929,t.yturned=654,t.yuhiragana=12422,t.yuikorean=12684,t.yukatakana=12518,t.yukatakanahalfwidth=65429,t.yukorean=12640,t.yusbigcyrillic=1131,t.yusbigiotifiedcyrillic=1133,t.yuslittlecyrillic=1127,t.yuslittleiotifiedcyrillic=1129,t.yusmallhiragana=12421,t.yusmallkatakana=12517,t.yusmallkatakanahalfwidth=65389,t.yuyekorean=12683,t.yuyeokorean=12682,t.yyabengali=2527,t.yyadeva=2399,t.z=122,t.zaarmenian=1382,t.zacute=378,t.zadeva=2395,t.zagurmukhi=2651,t.zaharabic=1592,t.zahfinalarabic=65222,t.zahinitialarabic=65223,t.zahiragana=12374,t.zahmedialarabic=65224,t.zainarabic=1586,t.zainfinalarabic=65200,t.zakatakana=12470,t.zaqefgadolhebrew=1429,t.zaqefqatanhebrew=1428,t.zarqahebrew=1432,t.zayin=1494,t.zayindagesh=64310,t.zayindageshhebrew=64310,t.zayinhebrew=1494,t.zbopomofo=12567,t.zcaron=382,t.zcircle=9449,t.zcircumflex=7825,t.zcurl=657,t.zdot=380,t.zdotaccent=380,t.zdotbelow=7827,t.zecyrillic=1079,t.zedescendercyrillic=1177,t.zedieresiscyrillic=1247,t.zehiragana=12380,t.zekatakana=12476,t.zero=48,t.zeroarabic=1632,t.zerobengali=2534,t.zerodeva=2406,t.zerogujarati=2790,t.zerogurmukhi=2662,t.zerohackarabic=1632,t.zeroinferior=8320,t.zeromonospace=65296,t.zerooldstyle=63280,t.zeropersian=1776,t.zerosuperior=8304,t.zerothai=3664,t.zerowidthjoiner=65279,t.zerowidthnonjoiner=8204,t.zerowidthspace=8203,t.zeta=950,t.zhbopomofo=12563,t.zhearmenian=1386,t.zhebrevecyrillic=1218,t.zhecyrillic=1078,t.zhedescendercyrillic=1175,t.zhedieresiscyrillic=1245,t.zihiragana=12376,t.zikatakana=12472,t.zinorhebrew=1454,t.zlinebelow=7829,t.zmonospace=65370,t.zohiragana=12382,t.zokatakana=12478,t.zparen=9397,t.zretroflexhook=656,t.zstroke=438,t.zuhiragana=12378,t.zukatakana=12474,t[".notdef"]=0,t.angbracketleftbig=9001,t.angbracketleftBig=9001,t.angbracketleftbigg=9001,t.angbracketleftBigg=9001,t.angbracketrightBig=9002,t.angbracketrightbig=9002,t.angbracketrightBigg=9002,t.angbracketrightbigg=9002,t.arrowhookleft=8618,t.arrowhookright=8617,t.arrowlefttophalf=8636,t.arrowleftbothalf=8637,t.arrownortheast=8599,t.arrownorthwest=8598,t.arrowrighttophalf=8640,t.arrowrightbothalf=8641,t.arrowsoutheast=8600,t.arrowsouthwest=8601,t.backslashbig=8726,t.backslashBig=8726,t.backslashBigg=8726,t.backslashbigg=8726,t.bardbl=8214,t.bracehtipdownleft=65079,t.bracehtipdownright=65079,t.bracehtipupleft=65080,t.bracehtipupright=65080,t.braceleftBig=123,t.braceleftbig=123,t.braceleftbigg=123,t.braceleftBigg=123,t.bracerightBig=125,t.bracerightbig=125,t.bracerightbigg=125,t.bracerightBigg=125,t.bracketleftbig=91,t.bracketleftBig=91,t.bracketleftbigg=91,t.bracketleftBigg=91,t.bracketrightBig=93,t.bracketrightbig=93,t.bracketrightbigg=93,t.bracketrightBigg=93,t.ceilingleftbig=8968,t.ceilingleftBig=8968,t.ceilingleftBigg=8968,t.ceilingleftbigg=8968,t.ceilingrightbig=8969,t.ceilingrightBig=8969,t.ceilingrightbigg=8969,t.ceilingrightBigg=8969,t.circledotdisplay=8857,t.circledottext=8857,t.circlemultiplydisplay=8855,t.circlemultiplytext=8855,t.circleplusdisplay=8853,t.circleplustext=8853,t.contintegraldisplay=8750,t.contintegraltext=8750,t.coproductdisplay=8720,t.coproducttext=8720,t.floorleftBig=8970,t.floorleftbig=8970,t.floorleftbigg=8970,t.floorleftBigg=8970,t.floorrightbig=8971,t.floorrightBig=8971,t.floorrightBigg=8971,t.floorrightbigg=8971,t.hatwide=770,t.hatwider=770,t.hatwidest=770,t.intercal=7488,t.integraldisplay=8747,t.integraltext=8747,t.intersectiondisplay=8898,t.intersectiontext=8898,t.logicalanddisplay=8743,t.logicalandtext=8743,t.logicalordisplay=8744,t.logicalortext=8744,t.parenleftBig=40,t.parenleftbig=40,t.parenleftBigg=40,t.parenleftbigg=40,t.parenrightBig=41,t.parenrightbig=41,t.parenrightBigg=41,t.parenrightbigg=41,t.prime=8242,t.productdisplay=8719,t.producttext=8719,t.radicalbig=8730,t.radicalBig=8730,t.radicalBigg=8730,t.radicalbigg=8730,t.radicalbt=8730,t.radicaltp=8730,t.radicalvertex=8730,t.slashbig=47,t.slashBig=47,t.slashBigg=47,t.slashbigg=47,t.summationdisplay=8721,t.summationtext=8721,t.tildewide=732,t.tildewider=732,t.tildewidest=732,t.uniondisplay=8899,t.unionmultidisplay=8846,t.unionmultitext=8846,t.unionsqdisplay=8852,t.unionsqtext=8852,t.uniontext=8899,t.vextenddouble=8741,t.vextendsingle=8739}),getDingbatsGlyphsUnicode=getLookupTableFactory(function(t){t.space=32,t.a1=9985,t.a2=9986,t.a202=9987,t.a3=9988,t.a4=9742,t.a5=9990,t.a119=9991,t.a118=9992,t.a117=9993,t.a11=9755,t.a12=9758,t.a13=9996,t.a14=9997,t.a15=9998,t.a16=9999,t.a105=1e4,t.a17=10001,t.a18=10002,t.a19=10003,t.a20=10004,t.a21=10005,t.a22=10006,t.a23=10007,t.a24=10008,t.a25=10009,t.a26=10010,t.a27=10011,t.a28=10012,t.a6=10013,t.a7=10014,t.a8=10015,t.a9=10016,t.a10=10017,t.a29=10018,t.a30=10019,t.a31=10020,t.a32=10021,t.a33=10022,t.a34=10023,t.a35=9733,t.a36=10025,t.a37=10026,t.a38=10027,t.a39=10028,t.a40=10029,t.a41=10030,t.a42=10031,t.a43=10032,t.a44=10033,t.a45=10034,t.a46=10035,t.a47=10036,t.a48=10037,t.a49=10038,t.a50=10039,t.a51=10040,t.a52=10041,t.a53=10042,t.a54=10043,t.a55=10044,t.a56=10045,t.a57=10046,t.a58=10047,t.a59=10048,t.a60=10049,t.a61=10050,t.a62=10051,t.a63=10052,t.a64=10053,t.a65=10054,t.a66=10055,t.a67=10056,t.a68=10057,t.a69=10058,t.a70=10059,t.a71=9679,t.a72=10061,t.a73=9632,t.a74=10063,t.a203=10064,t.a75=10065,t.a204=10066,t.a76=9650,t.a77=9660,t.a78=9670,t.a79=10070,t.a81=9687,t.a82=10072,t.a83=10073,t.a84=10074,t.a97=10075,t.a98=10076,t.a99=10077,t.a100=10078,t.a101=10081,t.a102=10082,t.a103=10083,t.a104=10084,t.a106=10085,t.a107=10086,t.a108=10087,t.a112=9827,t.a111=9830,t.a110=9829,t.a109=9824,t.a120=9312,t.a121=9313,t.a122=9314,t.a123=9315,t.a124=9316,t.a125=9317,t.a126=9318,t.a127=9319,t.a128=9320,t.a129=9321,t.a130=10102,t.a131=10103,t.a132=10104,t.a133=10105,t.a134=10106,t.a135=10107,t.a136=10108,t.a137=10109,t.a138=10110,t.a139=10111,t.a140=10112,t.a141=10113,t.a142=10114,t.a143=10115,t.a144=10116,t.a145=10117,t.a146=10118,t.a147=10119,t.a148=10120,t.a149=10121,t.a150=10122,t.a151=10123,t.a152=10124,t.a153=10125,t.a154=10126,t.a155=10127,t.a156=10128,t.a157=10129,t.a158=10130,t.a159=10131,t.a160=10132,t.a161=8594,t.a163=8596,t.a164=8597,t.a196=10136,t.a165=10137,t.a192=10138,t.a166=10139,t.a167=10140,t.a168=10141,t.a169=10142,t.a170=10143,t.a171=10144,t.a172=10145,t.a173=10146,t.a162=10147,t.a174=10148,t.a175=10149,t.a176=10150,t.a177=10151,t.a178=10152,t.a179=10153,t.a193=10154,t.a180=10155,t.a199=10156,t.a181=10157,t.a200=10158,t.a182=10159,t.a201=10161,t.a183=10162,t.a184=10163,t.a197=10164,t.a185=10165,t.a194=10166,t.a198=10167,t.a186=10168,t.a195=10169,t.a187=10170,t.a188=10171,t.a189=10172,t.a190=10173,t.a191=10174,t.a89=10088,t.a90=10089,t.a93=10090,t.a94=10091,t.a91=10092,t.a92=10093,t.a205=10094,t.a85=10095,t.a206=10096,t.a86=10097,t.a87=10098,t.a88=10099,t.a95=10100,t.a96=10101,t[".notdef"]=0}),getSpecialPUASymbols=getLookupTableFactory(function(t){t[63721]=169,t[63193]=169,t[63720]=174,t[63194]=174,t[63722]=8482,t[63195]=8482,t[63729]=9127,t[63730]=9128,t[63731]=9129,t[63740]=9131,t[63741]=9132,t[63742]=9133,t[63726]=9121,t[63727]=9122,t[63728]=9123,t[63737]=9124,t[63738]=9125,t[63739]=9126,t[63723]=9115,t[63724]=9116,t[63725]=9117,t[63734]=9118,t[63735]=9119,t[63736]=9120});function mapSpecialUnicodeValues(code){return 65520<=code&&code<=65535?0:62976<=code&&code<=63743?getSpecialPUASymbols()[code]||code:173===code?45:code}function getUnicodeForGlyph(name,glyphsUnicodeMap){glyphsUnicodeMap=glyphsUnicodeMap[name];if(void 0!==glyphsUnicodeMap)return glyphsUnicodeMap;if(name&&"u"===name[0]){var hexStr,nameLen=name.length;if(7===nameLen&&"n"===name[1]&&"i"===name[2])hexStr=name.substring(3);else{if(!(5<=nameLen&&nameLen<=7))return-1;hexStr=name.substring(1)}if(hexStr===hexStr.toUpperCase()&&0<=(glyphsUnicodeMap=parseInt(hexStr,16)))return glyphsUnicodeMap}return-1}var UnicodeRanges=[[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],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function getUnicodeRangeFor(value){var lastPosition=1=range[i]&&value<=range[i+1])return lastPosition;for(var _i22=0,_ii6=UnicodeRanges.length;_i22<_ii6;_i22++)for(var _range=UnicodeRanges[_i22],j=0,jj=_range.length;j=_range[j]&&value<=_range[j+1])return _i22;return-1}var SpecialCharRegExp=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),CategoryCache=new Map;function getCharUnicodeCategory(char){var cachedCategory=CategoryCache.get(char);return cachedCategory||(cachedCategory={isWhitespace:!(null==(cachedCategory=char.match(SpecialCharRegExp))||!cachedCategory[1]),isZeroWidthDiacritic:!(null==cachedCategory||!cachedCategory[2]),isInvisibleFormatMark:!(null==cachedCategory||!cachedCategory[3])},CategoryCache.set(char,cachedCategory),cachedCategory)}function clearUnicodeCaches(){CategoryCache.clear()}var SEAC_ANALYSIS_ENABLED=!0,FontFlags={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144},MacStandardGlyphOrdering=[".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"];function recoverGlyphName(name,glyphsUnicodeMap){if(void 0===glyphsUnicodeMap[name]){var unicode=getUnicodeForGlyph(name,glyphsUnicodeMap);if(-1!==unicode)for(var key in glyphsUnicodeMap)if(glyphsUnicodeMap[key]===unicode)return key;info("Unable to recover a standard glyph name for: "+name)}return name}function type1FontGlyphMapping(properties,builtInEncoding,glyphNames){var charCode,baseEncoding,charCodeToGlyphId=Object.create(null),isSymbolicFont=!!(properties.flags&FontFlags.Symbolic);if(properties.isInternalFont)for(baseEncoding=builtInEncoding,charCode=0;charCode{t[8211]=65074,t[8212]=65073,t[8229]=65072,t[8230]=65049,t[12289]=65041,t[12290]=65042,t[12296]=65087,t[12297]=65088,t[12298]=65085,t[12299]=65086,t[12300]=65089,t[12301]=65090,t[12302]=65091,t[12303]=65092,t[12304]=65083,t[12305]=65084,t[12308]=65081,t[12309]=65082,t[12310]=65047,t[12311]=65048,t[65103]=65076,t[65281]=65045,t[65288]=65077,t[65289]=65078,t[65292]=65040,t[65306]=65043,t[65307]=65044,t[65311]=65046,t[65339]=65095,t[65341]=65096,t[65343]=65075,t[65371]=65079,t[65373]=65080}),MAX_SIZE_TO_COMPILE=1e3;function compileType3Glyph(_ref14){var{data:_ref14,width,height}=_ref14;if(MAX_SIZE_TO_COMPILE>=1;var count=0;for(0!==data[pos=0]&&(points[0]=1,++count),j=1;j>2)+(data[pos+1]?4:0)+(data[pos-lineSize+1]?8:0)]&&(points[j0+j]=POINT_TYPES[sum],++count),pos++;if(data[pos-lineSize]!==data[pos]&&(points[j0+j]=data[pos]?2:4,++count),1e3>4)>>2|type<<2,pathBuf.push(DrawOPS.lineTo,a*(x=p%width1)+c*(y=p/width1|0)+e,b*x+d*y+f),points[p]||--count,p0!==p);--i}}return[OPS.rawFillPath,[new Float32Array(pathBuf)],new Float32Array([0,0,width,height])]}var ISOAdobeCharset=[".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"],ExpertCharset=[".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"],ExpertSubsetCharset=[".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"],MAX_SUBR_NESTING=10,CFFStandardStrings=[".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"],NUM_STANDARD_CFF_STRINGS=391,CharstringValidationData=[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}],CharstringValidationData12=[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(stack,index){stack[index-2]=stack[index-2]+stack[index-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(stack,index){stack[index-2]=stack[index-2]-stack[index-1]}},{id:"div",min:2,stackDelta:-1,stackFn(stack,index){stack[index-2]=stack[index-2]/stack[index-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(stack,index){stack[index-1]=-stack[index-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(stack,index){stack[index-2]=stack[index-2]*stack[index-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}];class CFFParser{constructor(file,properties,seacAnalysisEnabled){this.bytes=file.getBytes(),this.properties=properties,this.seacAnalysisEnabled=!!seacAnalysisEnabled}parse(){var charset,encoding,properties=this.properties,cff=new CFF,header=(this.cff=cff,this.parseHeader()),nameIndex=this.parseIndex(header.endPos),topDictIndex=this.parseIndex(nameIndex.endPos),stringIndex=this.parseIndex(topDictIndex.endPos),globalSubrIndex=this.parseIndex(stringIndex.endPos),topDictIndex=this.parseDict(topDictIndex.obj.get(0)),topDictIndex=this.createDict(CFFTopDict,topDictIndex,cff.strings),header=(cff.header=header.obj,cff.names=this.parseNameIndex(nameIndex.obj),cff.strings=this.parseStringIndex(stringIndex.obj),cff.topDict=topDictIndex,cff.globalSubrIndex=globalSubrIndex.obj,this.parsePrivateDict(cff.topDict),cff.isCIDFont=topDictIndex.hasName("ROS"),topDictIndex.getByName("CharStrings")),nameIndex=this.parseIndex(header).obj,stringIndex=topDictIndex.getByName("FontMatrix"),header=(stringIndex&&(properties.fontMatrix=stringIndex),topDictIndex.getByName("FontBBox"));if(header&&(properties.ascent=Math.max(header[3],header[1]),properties.descent=Math.min(header[1],header[3]),properties.ascentScaled=!0),cff.isCIDFont){for(var fdArrayIndex=this.parseIndex(topDictIndex.getByName("FDArray")).obj,i=0,ii=fdArrayIndex.count;i>4,b=15&b;if(15==b1)break;if(str+=lookup[b1],15==b)break;str+=lookup[b]}return parseFloat(str)}for(var operands=[],entries=[],pos=0,end=dict.length;posMAX_SUBR_NESTING)return!1;for(var stackSize=state.stackSize,stack=state.stack,length=data.length,j=0;j>1,0===state.hints){data.copyWithin(j-1,j,-1),--j,--length;continue}j+=state.hints+7>>3,stackSize%=2,validationCommand=CharstringValidationData[value]}else{if(10===value||29===value){q=10===value?localSubrIndex:globalSubrIndex;if(!q)return warn("Missing subrsIndex for "+(validationCommand=CharstringValidationData[value]).id),!1;var bias=32768,bias=(q.count<1240?bias=107:q.count<33900&&(bias=1131),stack[--stackSize]+bias);if(bias<0||bias>=q.count||isNaN(bias))return warn("Out of bounds subrIndex for "+(validationCommand=CharstringValidationData[value]).id),!1;if(state.stackSize=stackSize,state.callDepth++,!this.parseCharString(state,q.get(bias),localSubrIndex,globalSubrIndex))return!1;state.callDepth--,stackSize=state.stackSize;continue}if(11===value)return state.stackSize=stackSize,!0;if(0===value&&j===data.length)data[j-1]=14,validationCommand=CharstringValidationData[14];else{if(9===value){data.copyWithin(j-1,j,-1),--j,--length;continue}validationCommand=CharstringValidationData[value]}}if(validationCommand){if(validationCommand.stem&&(state.hints+=stackSize>>1,3===value||23===value?state.hasVStems=!0:!state.hasVStems||1!==value&&18!==value||(warn("CFF stem hints are in wrong order"),data[j-1]=1===value?3:23)),"min"in validationCommand&&!state.undefStack&&stackSize=fdArray.length&&(warn("Invalid fd index for glyph index."),valid=!1),valid&&(localSubrToUse=(privateDictToUse=fdArray[fdIndex].privateDict).subrsIndex)):localSubrIndex&&(localSubrToUse=localSubrIndex),valid=valid&&this.parseCharString(state,charstring,localSubrToUse,globalSubrIndex),null!==state.width?(fdIndex=privateDictToUse.getByName("nominalWidthX"),widths[i]=fdIndex+state.width):(charstring=privateDictToUse.getByName("defaultWidthX"),widths[i]=charstring),null!==state.seac&&(seacs[i]=state.seac),valid||charStrings.set(i,new Uint8Array([14]))}return{charStrings:charStrings,seacs:seacs,widths:widths}}emptyPrivateDictionary(parentDict){var privateDict=this.createDict(CFFPrivateDict,[],parentDict.strings);parentDict.setByKey(18,[0,0]),parentDict.privateDict=privateDict}parsePrivateDict(parentDict){var size,relativeOffset,privateOffset;parentDict.hasName("Private")?(privateOffset=parentDict.getByName("Private"),Array.isArray(privateOffset)&&2===privateOffset.length?(size=privateOffset[0],privateOffset=privateOffset[1],0===size||privateOffset>=this.bytes.length?this.emptyPrivateDictionary(parentDict):(size=this.bytes.subarray(privateOffset,privateOffset+size),size=this.parseDict(size),size=this.createDict(CFFPrivateDict,size,parentDict.strings),0===(parentDict.privateDict=size).getByName("ExpansionFactor")&&size.setByName("ExpansionFactor",.06),size.getByName("Subrs")&&(relativeOffset=privateOffset+(privateOffset=size.getByName("Subrs")),0===privateOffset||relativeOffset>=this.bytes.length?this.emptyPrivateDictionary(parentDict):(privateOffset=this.parseIndex(relativeOffset),size.subrsIndex=privateOffset.obj)))):parentDict.removeByName("Private")):this.emptyPrivateDictionary(parentDict)}parseCharsets(pos,length,strings,cid){if(0===pos)return new CFFCharset(!0,CFFCharsetPredefinedTypes.ISO_ADOBE,ISOAdobeCharset);if(1===pos)return new CFFCharset(!0,CFFCharsetPredefinedTypes.EXPERT,ExpertCharset);if(2===pos)return new CFFCharset(!0,CFFCharsetPredefinedTypes.EXPERT_SUBSET,ExpertSubsetCharset);var id,count,i,bytes=this.bytes,start=pos,format=bytes[pos++],charset=[cid?0:".notdef"];switch(--length,format){case 0:for(i=0;i=this.charStrings.count)&&0=this.fdSelect.length?-1:this.fdSelect[glyphIndex]}}class CFFOffsetTracker{constructor(){this.offsets=Object.create(null)}isTracking(key){return key in this.offsets}track(key,location){if(key in this.offsets)throw new FormatError("Already tracking location of ".concat(key));this.offsets[key]=location}offset(value){for(var key in this.offsets)this.offsets[key]+=value}setEntryLocation(key,values,output){if(!(key in this.offsets))throw new FormatError("Not tracking location of ".concat(key));for(var data=output.data,dataOffset=this.offsets[key],i=0,ii=values.length;i>24&255,data[offset2]=value>>16&255,data[offset3]=value>>8&255,data[offset4]=255&value}}}class CFFCompiler{constructor(cff){this.cff=cff}compile(){var cff=this.cff,output={data:[],length:0,add(data){try{this.data.push(...data)}catch(_unused7){this.data=this.data.concat(data)}this.length=this.data.length}},header=this.compileHeader(cff.header),header=(output.add(header),this.compileNameIndex(cff.names));if(output.add(header),cff.isCIDFont&&cff.topDict.hasName("FontMatrix")){var subDict,base=cff.topDict.getByName("FontMatrix");cff.topDict.removeByName("FontMatrix");for(subDict of cff.fdArray){var matrix=base.slice(0);subDict.hasName("FontMatrix")&&(matrix=Util.transform(matrix,subDict.getByName("FontMatrix"))),subDict.setByName("FontMatrix",matrix)}}var header=cff.topDict.getByName("XUID"),header=(16<(null==header?void 0:header.length)&&cff.topDict.removeByName("XUID"),cff.topDict.setByName("charset",0),this.compileTopDicts([cff.topDict],output.length,cff.isCIDFont)),topDictTracker=(output.add(header.output),header.trackers[0]),stringIndex=this.compileStringIndex(cff.strings.strings),stringIndex=(output.add(stringIndex),this.compileIndex(cff.globalSubrIndex)),stringIndex=(output.add(stringIndex),cff.encoding&&cff.topDict.hasName("Encoding")&&(cff.encoding.predefined?topDictTracker.setEntryLocation("Encoding",[cff.encoding.format],output):(stringIndex=this.compileEncoding(cff.encoding),topDictTracker.setEntryLocation("Encoding",[output.length],output),output.add(stringIndex))),this.compileCharset(cff.charset,cff.charStrings.count,cff.strings,cff.isCIDFont)),stringIndex=(topDictTracker.setEntryLocation("charset",[output.length],output),output.add(stringIndex),this.compileCharStrings(cff.charStrings));return topDictTracker.setEntryLocation("CharStrings",[output.length],output),output.add(stringIndex),cff.isCIDFont&&(topDictTracker.setEntryLocation("FDSelect",[output.length],output),stringIndex=this.compileFDSelect(cff.fdSelect),output.add(stringIndex),header=this.compileTopDicts(cff.fdArray,output.length,!0),topDictTracker.setEntryLocation("FDArray",[output.length],output),output.add(header.output),stringIndex=header.trackers,this.compilePrivateDicts(cff.fdArray,stringIndex,output)),this.compilePrivateDicts([cff.topDict],[topDictTracker],output),output.add([0]),output.data}encodeNumber(value){return Number.isInteger(value)?this.encodeInteger(value):this.encodeFloat(value)}static get EncodeFloatRegExp(){return shadow(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(num){for(var value=num.toString(),m=CFFCompiler.EncodeFloatRegExp.exec(value),nibbles=(m&&(m=parseFloat("1e"+((m[2]?+m[2]:0)+m[1].length)),value=(Math.round(num*m)/m).toString()),""),i=0,ii=value.length;i>8),255&value]:-1131<=value&&value<=-108?[251+((value=-value-108)>>8),255&value]:-32768<=value&&value<=32767?[28,value>>8&255,255&value]:[29,value>>24&255,value>>16&255,value>>8&255,255&value];return value}compileHeader(header){return[header.major,header.minor,4,header.offSize]}compileNameIndex(names){var name,nameIndex=new CFFIndex;for(name of names){for(var length=Math.min(name.length,127),sanitizedName=new Array(length),j=0;j"===char||"/"===char||"%"===char)&&(char="_"),sanitizedName[j]=char}""===(sanitizedName=sanitizedName.join(""))&&(sanitizedName="Bad_Font_Name"),nameIndex.add(stringToBytes(sanitizedName))}return this.compileIndex(nameIndex)}compileTopDicts(dicts,length,removeCidKeys){var fontDict,fontDictTrackers=[],fdArrayIndex=new CFFIndex;for(fontDict of dicts){removeCidKeys&&(fontDict.removeByName("CIDFontVersion"),fontDict.removeByName("CIDFontRevision"),fontDict.removeByName("CIDFontType"),fontDict.removeByName("CIDCount"),fontDict.removeByName("UIDBase"));var fontDictTracker=new CFFOffsetTracker,fontDictData=this.compileDict(fontDict,fontDictTracker);fontDictTrackers.push(fontDictTracker),fdArrayIndex.add(fontDictData),fontDictTracker.offset(length)}return{trackers:fontDictTrackers,output:fdArrayIndex=this.compileIndex(fdArrayIndex,fontDictTrackers)}}compilePrivateDicts(dicts,trackers,output){for(var i=0,ii=dicts.length;i>8&255,255&isCIDFont]);else for(var charsetIndex=(out=new Uint8Array(1+2*numGlyphs))[0]=0,numCharsets=charset.charset.length,warned=!1,i=1;i>8&255,out[i+1]=255&sid}return this.compileTypedArray(out)}compileEncoding(encoding){return this.compileTypedArray(encoding.raw)}compileFDSelect(fdSelect){var out,format=fdSelect.format;switch(format){case 0:for((out=new Uint8Array(1+fdSelect.fdSelect.length))[0]=format,i=0;i>8&255,255&i,currentFD),lastFD=currentFD)}var numRanges=(ranges.length-3)/3;ranges[1]=numRanges>>8&255,ranges[2]=255&numRanges,ranges.push(i>>8&255,255&i),out=new Uint8Array(ranges)}return this.compileTypedArray(out)}compileTypedArray(data){return Array.from(data)}compileIndex(index){var trackers=1>8&255,255&count],lastOffset=1,i=0;i>8&255,255&relativeOffset):3===offsetSize?data.push(relativeOffset>>16&255,relativeOffset>>8&255,255&relativeOffset):data.push(relativeOffset>>>24&255,relativeOffset>>16&255,relativeOffset>>8&255,255&relativeOffset),objects[i]&&(relativeOffset+=objects[i].length);for(i=0;i=this.firstChar&&v<=this.lastChar?v:-1}amend(map){unreachable("Should not call amend()")}}class CFFFont{constructor(file,properties){this.properties=properties;var parser=new CFFParser(file,properties,SEAC_ANALYSIS_ENABLED),parser=(this.cff=parser.parse(),this.cff.duplicateFirstGlyph(),new CFFCompiler(this.cff));this.seacs=this.cff.seacs;try{this.data=parser.compile()}catch(_unused8){warn("Failed to compile font "+properties.loadedName),this.data=file}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){var glyphId,cff=this.cff,properties=this.properties,{cidToGidMap,cMap}=properties,charsets=cff.charset.charset;if(properties.composite){if(0<(null==cidToGidMap?void 0:cidToGidMap.length))for(var invCidToGidMap=Object.create(null),i=0,ii=cidToGidMap.length;i>1,p=start+offset+14,ranges=[],i=0;i2*readUint16(data,offset)),glyphs=[],startOffset=itemDecode(loca,0),j=itemSize;j>1;code>1,stackClean=!0;break;case 4:y+=stack.pop(),moveTo(x,y),stackClean=!0;break;case 5:for(;0Math.abs(y-y0)?x+=stack.shift():y+=stack.shift(),bezierCurveTo(xa,ya,xb,yb,x,y);break;default:throw new FormatError("unknown operator: 12 ".concat(v))}break;case 14:return void(4<=stack.length&&(_fontDict$privateDict=stack.pop(),fdIndex=stack.pop(),y=stack.pop(),x=stack.pop(),cmds.save(),cmds.translate(x,y),subrs=lookupCmap(font.cmap,String.fromCharCode(font.glyphNameMap[StandardEncoding[_fontDict$privateDict]])),compileCharString(font.glyphs[subrs.glyphId],cmds,font,subrs.glyphId),cmds.restore(),subrs=lookupCmap(font.cmap,String.fromCharCode(font.glyphNameMap[StandardEncoding[fdIndex]])),compileCharString(font.glyphs[subrs.glyphId],cmds,font,subrs.glyphId)));case 18:stems+=stack.length>>1,stackClean=!0;break;case 19:case 20:i+=(stems+=stack.length>>1)+7>>3,stackClean=!0;break;case 21:y+=stack.pop(),moveTo(x+=stack.pop(),y),stackClean=!0;break;case 22:moveTo(x+=stack.pop(),y),stackClean=!0;break;case 23:stems+=stack.length>>1,stackClean=!0;break;case 24:for(;2g.getSize()+3&-4))}write(){var glyph,totalSize=this.getSize(),glyfTable=new DataView(new ArrayBuffer(totalSize)),isLocationLong=131070>1);return{isLocationLong:isLocationLong,loca:new Uint8Array(locaTable.buffer),glyf:new Uint8Array(glyfTable.buffer)}}scale(factors){for(var i=0,ii=this.glyphs.length;ic.getSize())),this.header.getSize()+size):0}write(pos,buf){if(!this.header)return 0;var spos=pos;if(pos+=this.header.write(pos,buf),this.simple)pos+=this.simple.write(pos,buf);else for(var composite of this.composites)pos+=composite.write(pos,buf);return pos-spos}scale(factor){if(this.header){var xMiddle=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(xMiddle,factor),this.simple)this.simple.scale(xMiddle,factor);else for(var composite of this.composites)composite.scale(xMiddle,factor)}}}class GlyphHeader{constructor(_ref18){var{numberOfContours:_ref18,xMin,yMin,xMax,yMax}=_ref18;this.numberOfContours=_ref18,this.xMin=xMin,this.yMin=yMin,this.xMax=xMax,this.yMax=yMax}static parse(pos,glyf){return[10,new GlyphHeader({numberOfContours:glyf.getInt16(pos),xMin:glyf.getInt16(pos+2),yMin:glyf.getInt16(pos+4),xMax:glyf.getInt16(pos+6),yMax:glyf.getInt16(pos+8)})]}getSize(){return 10}write(pos,buf){return buf.setInt16(pos,this.numberOfContours),buf.setInt16(pos+2,this.xMin),buf.setInt16(pos+4,this.yMin),buf.setInt16(pos+6,this.xMax),buf.setInt16(pos+8,this.yMax),10}scale(x,factor){this.xMin=Math.round(x+(this.xMin-x)*factor),this.xMax=Math.round(x+(this.xMax-x)*factor)}}class Contour{constructor(_ref19){var{flags:_ref19,xCoordinates,yCoordinates}=_ref19;this.xCoordinates=xCoordinates,this.yCoordinates=yCoordinates,this.flags=_ref19}}class SimpleGlyph{constructor(_ref20){var{contours:_ref20,instructions}=_ref20;this.contours=_ref20,this.instructions=instructions}static parse(pos,glyf,numberOfContours){for(var endPtsOfContours=[],i=0;i>8&255,dest[offset+1]=255&num}function writeInt32(dest,offset,num){dest[offset]=num>>24&255,dest[offset+1]=num>>16&255,dest[offset+2]=num>>8&255,dest[offset+3]=255&num}function writeData(dest,offset,data){if(data instanceof Uint8Array)dest.set(data,offset);else if("string"==typeof data)for(var i=0,ii=data.length;i>>0;tableOffsets.push(offset+=paddedLength)}var file=new Uint8Array(offset);for(i=0;i>>0;writeInt32(file,offset+4,checksum),writeInt32(file,offset+8,tableOffsets[i]),writeInt32(file,offset+12,tables[tableName].length),offset+=OTF_TABLE_ENTRY_SIZE}return file}addTable(tag,data){if(tag in this.tables)throw new Error("Table "+tag+" already exists");this.tables[tag]=data}}var HINTING_ENABLED=!1,COMMAND_MAP={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};class Type1CharString{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(encoded,subrs,seacAnalysisEnabled){for(var count=encoded.length,error=!1,i=0;i>8&255,255&value):this.output.push(255,(value=65536*value|0)>>24&255,value>>16&255,value>>8&255,255&value)}return this.output.push(...command),keepStack?this.stack.splice(start,howManyArgs):this.stack.length=0,!1}}var EEXEC_ENCRYPT_KEY=55665,CHAR_STRS_ENCRYPT_KEY=4330;function isHexDigit(code){return 48<=code&&code<=57||65<=code&&code<=70||97<=code&&code<=102}function decrypt(data,key,discardNumber){if(discardNumber>=data.length)return new Uint8Array(0);for(var j,r=0|key,i=0;i>8,r=52845*(value+r)+22719&65535}return decrypted}function decryptAscii(data,key,discardNumber){for(var r=0|key,count=data.length,decrypted=new Uint8Array(count>>>1),i=0,j=0;i>8,r=52845*(digit1+r)+22719&65535)}}return decrypted.slice(discardNumber,j)}function isSpecial(c){return 47===c||91===c||93===c||123===c||125===c||40===c||41===c}class Type1Parser{constructor(stream,encrypted,seacAnalysisEnabled){var isBinary;encrypted&&(isBinary=!((isHexDigit((encrypted=stream.getBytes())[0])||isWhiteSpace(encrypted[0]))&&isHexDigit(encrypted[1])&&isHexDigit(encrypted[2])&&isHexDigit(encrypted[3])&&isHexDigit(encrypted[4])&&isHexDigit(encrypted[5])&&isHexDigit(encrypted[6])&&isHexDigit(encrypted[7])),stream=new Stream((isBinary?decrypt:decryptAscii)(encrypted,EEXEC_ENCRYPT_KEY,4))),this.seacAnalysisEnabled=!!seacAnalysisEnabled,this.stream=stream,this.nextChar()}readNumberArray(){this.getToken();for(var array=[];;){var token=this.getToken();if(null===token||"]"===token||"}"===token)break;array.push(parseFloat(token||0))}return array}readNumber(){var token=this.getToken();return parseFloat(token||0)}readInt(){var token=this.getToken();return 0|parseInt(token||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){for(var comment=!1,ch=this.currentChar;;){if(-1===ch)return null;if(comment)10!==ch&&13!==ch||(comment=!1);else if(37===ch)comment=!0;else if(!isWhiteSpace(ch))break;ch=this.nextChar()}if(isSpecial(ch))return this.nextChar(),String.fromCharCode(ch);for(var token="";token+=String.fromCharCode(ch),0<=(ch=this.nextChar())&&!isWhiteSpace(ch)&&!isSpecial(ch););return token}readCharStrings(bytes,lenIV){return-1===lenIV?bytes:decrypt(bytes,CHAR_STRS_ENCRYPT_KEY,lenIV)}extractFontProgram(properties){for(var token,glyph,length,data,lenIV,encoded,_encoded2,_glyph,stream=this.stream,subrs=[],charstrings=[],privateData=Object.create(null),program=(privateData.lenIV=4,{subrs:[],charstrings:[],properties:{privateData:privateData}});null!==(token=this.getToken());)if("/"===token)switch(token=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();;){if(null===(token=this.getToken())||"end"===token)break;"/"===token&&(glyph=this.getToken(),length=this.readInt(),this.getToken(),data=0=properties.firstChar&&output<=properties.lastChar&&(properties.widths[output]=charString.width)}return program}extractFontHeader(properties){for(var token;null!==(token=this.getToken());)if("/"===token)switch(token=this.getToken()){case"FontMatrix":var matrix=this.readNumberArray();properties.fontMatrix=matrix;break;case"Encoding":var matrix=this.getToken(),encoding=void 0;if(/^\d+$/.test(matrix)){var encoding=[],size=0|parseInt(matrix,10);this.getToken();for(var j=0;j=this.numGlyphs)&&(0===id||0>>8}function signedInt16(b0,b1){b0=(b0<<8)+b1;return 32768&b0?b0-65536:b0}function writeUint32(bytes,index,value){bytes[index+3]=255&value,bytes[index+2]=value>>>8,bytes[index+1]=value>>>16,bytes[index]=value>>>24}function int32(b0,b1,b2,b3){return(b0<<24)+(b1<<16)+(b2<<8)+b3}function string16(value){return String.fromCharCode(value>>8&255,255&value)}function safeString16(value){return 32767>8&255,255&value)}function isTrueTypeFile(file){file=file.peekBytes(4);return 65536===readUint32(file,0)||"true"===bytesToString(file)}function isTrueTypeCollectionFile(file){return"ttcf"===bytesToString(file.peekBytes(4))}function isOpenTypeFile(file){return"OTTO"===bytesToString(file.peekBytes(4))}function isType1File(file){file=file.peekBytes(2);return 37===file[0]&&33===file[1]||128===file[0]&&1===file[1]}function isCFFFile(file){file=file.peekBytes(4);return 1<=file[0]&&1<=file[3]&&file[3]<=4}function getFontFileType(file,_ref22){var fileType,fileSubtype,{type:_ref22,subtype,composite}=_ref22;return isTrueTypeFile(file)||isTrueTypeCollectionFile(file)?fileType=composite?"CIDFontType2":"TrueType":isOpenTypeFile(file)?fileType=composite?"CIDFontType2":"OpenType":isType1File(file)?fileType=composite?"CIDFontType0":"MMType1"===_ref22?"MMType1":"Type1":fileSubtype=isCFFFile(file)?composite?(fileType="CIDFontType0","CIDFontType0C"):(fileType="MMType1"===_ref22?"MMType1":"Type1","Type1C"):(warn("getFontFileType: Unable to detect correct font file Type/Subtype."),fileType=_ref22,subtype),[fileType,fileSubtype]}function applyStandardFontGlyphMap(map,glyphMap){for(var charCode in glyphMap)map[+charCode]=glyphMap[charCode]}function buildToFontChar(encoding,glyphsUnicodeMap,differences){for(var unicode,charCode,toFontChar=[],i=0,ii=encoding.length;i=PRIVATE_USE_AREAS.length){warn("Ran out of space in font private use area.");break}nextAvailableFontCharCode=PRIVATE_USE_AREAS[privateUseAreaIndex][0],privateUseOffetEnd=PRIVATE_USE_AREAS[privateUseAreaIndex][1]}var fontCharCode=nextAvailableFontCharCode++,unicode=(0===glyphId&&(glyphId=newGlyphZeroId),toUnicode.get(originalCharCode));if("string"==typeof unicode)if(1===unicode.length)unicode=unicode.codePointAt(0);else{if(!LIGATURE_TO_UNICODE)for(var LIGATURE_TO_UNICODE=new Map,i=64256;i<=64335;i++){var normalized=String.fromCharCode(i).normalize("NFKD");1=numGlyphs||codes.push({fontCharCode:0|charCode,glyphId:glyphs[charCode]});if(toUnicodeExtraMap)for(var[unicode,glyphId]of toUnicodeExtraMap)numGlyphs<=glyphId||codes.push({fontCharCode:unicode,glyphId:glyphId});0===codes.length&&codes.push({fontCharCode:0,glyphId:0}),codes.sort((a,b)=>a.fontCharCode-b.fontCharCode);for(var ranges=[],length=codes.length,n=0;n 123 are reserved for internal usage");ulUnicodeRange4|=1</%]/g,"").slice(0,63)}function createNameTable(name,proto){for(var strings=[(proto=proto||[[],[]])[0][0]||"Original licence",proto[0][1]||name,proto[0][2]||"Unknown",proto[0][3]||"uniqueID",proto[0][4]||name,proto[0][5]||"Version 0.11",proto[0][6]||createPostscriptName(name),proto[0][7]||"Unknown",proto[0][8]||"Unknown",proto[0][9]||"Unknown"],stringsUnicode=[],i=0,ii=strings.length;i{var unicode;this.composite||-1!==(unicode=getUnicodeForGlyph(this.differences[charCode]||this.defaultEncoding[charCode],glyphsUnicodeMap))&&(unicodeCharCode=unicode),_map2[+charCode]=unicodeCharCode}),this.composite&&this.toUnicode instanceof IdentityToUnicodeMap&&/Tahoma|Verdana/i.test(name)&&applyStandardFontGlyphMap(_map2,getGlyphMapForStandardFonts()),this.toFontChar=_map2);amendFallbackToUnicode(properties),this.loadedName=fontName.split("-",1)[0]}checkAndRepair(name,font,properties){var VALID_TABLES=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function readTables(file,numTables){var tables=Object.create(null);tables["OS/2"]=null,tables.cmap=null,tables.head=null,tables.hhea=null,tables.hmtx=null,tables.maxp=null,tables.name=null,tables.post=null;for(var i=0;i>>0,offset=file.getInt32()>>>0,length=file.getInt32()>>>0,previousPosition=file.pos,data=(file.pos=file.start||0,file.skip(offset),file.getBytes(length));file.pos=previousPosition,"head"===tag&&(data[8]=data[9]=data[10]=data[11]=0,data[17]|=32);return{tag:tag,checksum:checksum,length:length,offset:offset,data:data}}(file);VALID_TABLES.includes(table.tag)&&0!==table.length&&(tables[table.tag]=table)}return tables}function readOpenTypeHeader(ttf){return{version:ttf.getString(4),numTables:ttf.getUint16(),searchRange:ttf.getUint16(),entrySelector:ttf.getUint16(),rangeShift:ttf.getUint16()}}function readTrueTypeCollectionData(ttc,fontName){for(var fallbackData,{numFonts,offsetTable}=function(ttc){for(var ttcTag=ttc.getString(4),majorVersion=(assert("ttcf"===ttcTag,"Must be a TrueType Collection font."),ttc.getUint16()),minorVersion=ttc.getUint16(),numFonts=ttc.getInt32()>>>0,offsetTable=[],i=0;i>>0);var header={ttcTag:ttcTag,majorVersion:majorVersion,minorVersion:minorVersion,numFonts:numFonts,offsetTable:offsetTable};switch(majorVersion){case 1:return header;case 2:return header.dsigTag=ttc.getInt32()>>>0,header.dsigLength=ttc.getInt32()>>>0,header.dsigOffset=ttc.getInt32()>>>0,header}throw new FormatError("Invalid TrueType Collection majorVersion: ".concat(majorVersion,"."))}(ttc),fontNameParts=fontName.split("+"),i=0;i>>24&255,data[offset+1]=value>>16&255,data[offset+2]=value>>8&255,data[offset+3]=255&value}):(itemSize=2,itemDecode=function(data,offset){return data[offset]<<9|data[offset+1]<<1},function(data,offset,value){data[offset]=value>>9&255,data[offset+1]=value>>1&255}),numGlyphsOut=dupFirstEntry?numGlyphs+1:numGlyphs,isGlyphLocationsLong=itemSize*(1+numGlyphsOut),locaData=new Uint8Array(isGlyphLocationsLong),oldGlyfData=(locaData.set(loca.data.subarray(0,isGlyphLocationsLong)),loca.data=locaData,glyf.data),oldGlyfDataLength=oldGlyfData.length,newGlyfData=new Uint8Array(oldGlyfDataLength),locaEntries=[];for(j=i=0;ia.offset-b.offset),i=0;ia.index-b.index),i=0;i=source.length||sourceEnd>source.length||sourceEnd-sourceStart<=12)){var glyf=source.subarray(sourceStart,sourceEnd),source=signedInt16(glyf[2],glyf[3]),sourceStart=signedInt16(glyf[4],glyf[5]),sourceEnd=signedInt16(glyf[6],glyf[7]),yMax=signedInt16(glyf[8],glyf[9]),contoursCount=(sourceEndglyf.length||(!hintsValid&&0maxSizeOfInstructions&&(maxSizeOfInstructions=glyphProfile.sizeOfInstructions),itemEncode(locaData,j,writeOffset+=newLength)}if(0===writeOffset){for(var simpleGlyph=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]),i=0,j=itemSize;iisGlyphLocationsLong+writeOffset?glyf.data=newGlyfData.subarray(0,isGlyphLocationsLong+writeOffset):(glyf.data=new Uint8Array(isGlyphLocationsLong+writeOffset),glyf.data.set(newGlyfData.subarray(0,writeOffset))),glyf.data.set(newGlyfData.subarray(0,isGlyphLocationsLong),writeOffset),itemEncode(loca.data,locaData.length-itemSize,writeOffset+isGlyphLocationsLong)):glyf.data=newGlyfData.subarray(0,writeOffset);return{missingGlyphs:missingGlyphs,maxSizeOfInstructions:maxSizeOfInstructions}}function readNameTable(nameTable){var start=(font.start||0)+nameTable.offset,names=(font.pos=start,[[],[]]),records=[],nameTable=nameTable.length,end=start+nameTable,format=font.getUint16();if(!(0!==format||nameTable<6)){for(var ii,numRecords=font.getUint16(),stringsStart=font.getUint16(),i=0;iend)){font.pos=pos;pos=record.name;if(record.encoding){for(var str="",j=0,jj=record.length;jdata.length&&content.push(new Uint8Array(i-data.length)),lastEndf>8&255,metrics[1+j]=255&advanceWidth,Math.round(scaleFactors[i]*signedInt16(metrics[2+j],metrics[3+j])));writeSignedInt16(metrics,2+j,advanceWidth)}var glyphs=numGlyphs+1,loca=!0,_properties$scaleFact=(65535>8,tables.maxp.data[5]=255&glyphs,function(fpgm,prep,cvt,maxFunctionDefs){var ttContext={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};return fpgm&&sanitizeTTProgram(fpgm,ttContext),prep&&sanitizeTTProgram(prep,ttContext),fpgm&&function(ttContext,maxFunctionDefs){if(!ttContext.tooComplexToFollowFunctions)if(ttContext.functionsDefined.length>maxFunctionDefs)warn("TT: more functions defined than expected"),ttContext.hintsValid=!1;else for(var j=0,jj=ttContext.functionsUsed.length;j>8,header.data[35]=255&file),0<(caretOffset=numGlyphs-file-(metrics.length-4*file>>1))&&((headTable=new Uint8Array(metrics.length+2*caretOffset)).set(metrics.data),dupFirstEntry&&(headTable[metrics.length]=metrics.data[2],headTable[metrics.length+1]=metrics.data[3]),metrics.data=headTable)):metrics&&(metrics.data=null)}(font,tables.hhea,tables.hmtx,tables.head,glyphs,loca),!tables.head)throw new FormatError('Required "head" table is not found');!function(head,numGlyphs,locaLength){var version=int32((head=head.data)[0],head[1],head[2],head[3]);if(version>>16!=1&&(info("Attempting to fix invalid version in head table: "+version),head[0]=0,head[1]=1,head[2]=0,head[3]=0),(version=int16(head[50],head[51]))<0||1>8,tables.maxp.data[27]=255&_isGlyphLocationsLong.maxSizeOfInstructions),!tables.hhea)throw new FormatError('Required "hhea" table is not found');0===tables.hhea.data[10]&&0===tables.hhea.data[11]&&(tables.hhea.data[10]=255,tables.hhea.data[11]=255);var _properties$scaleFact={unitsPerEm:int16(tables.head.data[18],tables.head.data[19]),yMax:signedInt16(tables.head.data[42],tables.head.data[43]),yMin:signedInt16(tables.head.data[38],tables.head.data[39]),ascent:signedInt16(tables.hhea.data[4],tables.hhea.data[5]),descent:signedInt16(tables.hhea.data[6],tables.hhea.data[7]),lineGap:signedInt16(tables.hhea.data[8],tables.hhea.data[9])},charCodeToGlyphId=(this.ascent=_properties$scaleFact.ascent/_properties$scaleFact.unitsPerEm,this.descent=_properties$scaleFact.descent/_properties$scaleFact.unitsPerEm,this.lineGap=_properties$scaleFact.lineGap/_properties$scaleFact.unitsPerEm,null!=(isLocationLong=this.cssFontInfo)&&isLocationLong.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,tables.post&&!function(post,propertiesObj,maxpNumGlyphs){var glyphNames,start=(font.start||0)+post.offset,end=(font.pos=start)+post.length,version=font.getInt32(),valid=(font.skip(28),!0);switch(version){case 65536:glyphNames=MacStandardGlyphOrdering;break;case 131072:var _numGlyphs=font.getUint16();if(_numGlyphs!==maxpNumGlyphs)valid=!1;else{for(var glyphNameIndexes=[],i=0;i<_numGlyphs;++i){var index=font.getUint16();if(32768<=index){valid=!1;break}glyphNameIndexes.push(index)}if(valid){for(var customNames=[],strBuf=[];font.pos>>0,useTable=!1;if((null==potentialTable?void 0:potentialTable.platformId)!==platformId||(null==potentialTable?void 0:potentialTable.encodingId)!==encodingId)if(0===platformId&&(0===encodingId||1===encodingId||3===encodingId)||1===platformId&&0===encodingId?useTable=!0:3!==platformId||1!==encodingId||!hasEncoding&&potentialTable?isSymbolicFont&&3===platformId&&0===encodingId&&(correctlySorted=useTable=!0,correctlySorted=!(i>3;subHeaderKeys.push(subHeaderKey),maxSubHeaderKey=Math.max(subHeaderKey,maxSubHeaderKey)}for(var subHeaders=[],_i29=0;_i29<=maxSubHeaderKey;_i29++)subHeaders.push({firstCode:file.getUint16(),entryCount:file.getUint16(),idDelta:signedInt16(file.getByte(),file.getByte()),idRangePos:file.pos+file.getUint16()});for(var _i30=0;_i30<256;_i30++)if(0===subHeaderKeys[_i30])file.pos=subHeaders[0].idRangePos+2*_i30,glyphId=file.getUint16(),mappings.push({charCode:_i30,glyphId:glyphId});else for(var s=subHeaders[subHeaderKeys[_i30]],j=0;j>1,segments=(file.skip(6),[]),segIndex=0;segIndex>1)-(segCount-segIndex),offsetsCount=Math.max(offsetsCount,offsetIndex+segment.end-segment.start+1)):segment.offsetIndex=-1}var offsets=[];for(j=0;j>>0;for(j=0;j>>0,endCharCode=file.getInt32()>>>0,glyphCode=file.getInt32()>>>0,_charCode3=startCharCode;_charCode3<=endCharCode;_charCode3++)mappings.push({charCode:_charCode3,glyphId:glyphCode++})}mappings.sort((a,b)=>a.charCode-b.charCode);var map,finalMappings=[],seenCharCodes=new Set;for(map of mappings){var _charCode4=map["charCode"];seenCharCodes.has(_charCode4)||(seenCharCodes.add(_charCode4),finalMappings.push(map))}return{platformId:potentialTable.platformId,encodingId:potentialTable.encodingId,mappings:finalMappings,hasShortCmap:hasShortCmap}}(tables.cmap,font,this.isSymbolicFont,properties.hasEncoding),cmapPlatformId=_properties$cidToGidM.platformId,cmapEncodingId=_properties$cidToGidM.encodingId,cmapMappings=_properties$cidToGidM.mappings,baseEncoding=[],forcePostTable=!1;if(!properties.hasEncoding||"MacRomanEncoding"!==properties.baseEncodingName&&"WinAnsiEncoding"!==properties.baseEncodingName||(baseEncoding=getEncoding(properties.baseEncodingName)),properties.hasEncoding&&!this.isSymbolicFont&&(3===cmapPlatformId&&1===cmapEncodingId||1===cmapPlatformId&&0===cmapEncodingId))for(var glyphsUnicodeMap=getGlyphsUnicode(),charCode=0;charCode<256;charCode++){var glyphName=void 0;if(glyphName=(void 0!==this.differences[charCode]?this.differences:baseEncoding.length&&""!==baseEncoding[charCode]?baseEncoding:StandardEncoding)[charCode]){var mapping,glyphName=recoverGlyphName(glyphName,glyphsUnicodeMap),unicodeOrCharCode=void 0;if(3===cmapPlatformId&&1===cmapEncodingId?unicodeOrCharCode=glyphsUnicodeMap[glyphName]:1===cmapPlatformId&&0===cmapEncodingId&&(unicodeOrCharCode=MacRomanEncoding.indexOf(glyphName)),void 0===unicodeOrCharCode)if(properties.glyphNames||!properties.hasIncludedToUnicodeMap||this.toUnicode instanceof IdentityToUnicodeMap||(glyphName=this.toUnicode.get(charCode))&&(unicodeOrCharCode=glyphName.codePointAt(0)),void 0===unicodeOrCharCode)continue;for(mapping of cmapMappings)if(mapping.charCode===unicodeOrCharCode){charCodeToGlyphId[charCode]=mapping.glyphId;break}}}else if(0===cmapPlatformId){for(var _mapping of cmapMappings)charCodeToGlyphId[_mapping.charCode]=_mapping.glyphId;forcePostTable=!0}else if(3===cmapPlatformId&&0===cmapEncodingId)for(var _mapping2 of cmapMappings){var _charCode5=_mapping2.charCode;61440<=_charCode5&&_charCode5<=61695&&(_charCode5&=255),charCodeToGlyphId[_charCode5]=_mapping2.glyphId}else for(var _mapping3 of cmapMappings)charCodeToGlyphId[_mapping3.charCode]=_mapping3.glyphId;if(properties.glyphNames&&(baseEncoding.length||this.differences.length))for(var _glyphName,_i31=0;_i31<256;++_i31)(forcePostTable||void 0===charCodeToGlyphId[_i31])&&(_glyphName=this.differences[_i31]||baseEncoding[_i31])&&0<(_glyphName=properties.glyphNames.indexOf(_glyphName))&&hasGlyph(_glyphName)&&(charCodeToGlyphId[_i31]=_glyphName)}0===charCodeToGlyphId.length&&(charCodeToGlyphId[0]=0);var _isGlyphLocationsLong=loca?glyphs-1:0;if(properties.cssFontInfo||(isLocationLong=adjustMapping(charCodeToGlyphId,hasGlyph,_isGlyphLocationsLong,this.toUnicode),this.toFontChar=isLocationLong.toFontChar,tables.cmap={tag:"cmap",data:createCmapTable(isLocationLong.charCodeToGlyphId,isLocationLong.toUnicodeExtraMap,glyphs)},tables["OS/2"]&&validateOS2Table(tables["OS/2"],font))||(tables["OS/2"]={tag:"OS/2",data:createOS2Table(properties,isLocationLong.charCodeToGlyphId,_properties$scaleFact)}),!ttcData)try{var cff,cffFile=new Stream(tables["CFF "].data),compiler=((cff=new CFFParser(cffFile,properties,SEAC_ANALYSIS_ENABLED).parse()).duplicateFirstGlyph(),new CFFCompiler(cff));tables["CFF "].data=compiler.compile()}catch(_unused0){warn("Failed to compile font "+properties.loadedName)}tables.name?([_properties$cidToGidM,loca]=readNameTable(tables.name),tables.name.data=createNameTable(name,_properties$cidToGidM),this.psName=_properties$cidToGidM[0][6]||null,properties.composite||adjustTrueTypeToUnicode(properties,this.isSymbolicFont,loca)):tables.name={tag:"name",data:createNameTable(this.name)};var tableTag,builder=new OpenTypeFileBuilder(header.version);for(tableTag in tables)builder.addTable(tableTag,tables[tableTag].data);return builder.toArray()}convert(fontName,font,properties){properties.fixedPitch=!1,properties.builtInEncoding&&adjustType1ToUnicode(properties,properties.builtInEncoding);var glyphZeroId=1,mapping=(font instanceof CFFFont&&(glyphZeroId=font.numGlyphs-1),font.getGlyphMapping(properties)),newMapping=null,newCharCodeToGlyphId=mapping,toUnicodeExtraMap=null,numGlyphs=(properties.cssFontInfo||(newMapping=adjustMapping(mapping,font.hasGlyphId.bind(font),glyphZeroId,this.toUnicode),this.toFontChar=newMapping.toFontChar,newCharCodeToGlyphId=newMapping.charCodeToGlyphId,toUnicodeExtraMap=newMapping.toUnicodeExtraMap),font.numGlyphs);function createCharCode(charCodeToGlyphId,glyphId){for(var charCode in charCodeToGlyphId)if(glyphId===charCodeToGlyphId[charCode])return 0|charCode;return newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode]=glyphId,newMapping.nextAvailableFontCharCode++}var seacs=font.seacs;if(newMapping&&SEAC_ANALYSIS_ENABLED&&null!=seacs&&seacs.length){var glyphId,matrix=properties.fontMatrix||FONT_IDENTITY_MATRIX,charset=font.getCharset(),seacMap=Object.create(null);for(glyphId in seacs){var seac=seacs[glyphId|=0],baseGlyphName=StandardEncoding[seac[2]],accentGlyphName=StandardEncoding[seac[3]],baseGlyphId=charset.indexOf(baseGlyphName),accentGlyphId=charset.indexOf(accentGlyphName);if(!(baseGlyphId<0||accentGlyphId<0)){var accentOffset={x:seac[0]*matrix[0]+seac[1]*matrix[2]+matrix[4],y:seac[0]*matrix[1]+seac[1]*matrix[3]+matrix[5]},baseGlyphName=function(charCodeToGlyphId,glyphId){var charCode,charCodes=null;for(charCode in charCodeToGlyphId)glyphId===charCodeToGlyphId[charCode]&&(charCodes=charCodes||[]).push(0|charCode);return charCodes}(mapping,glyphId);if(baseGlyphName)for(var charCode of baseGlyphName){var charCodeToGlyphId=newMapping.charCodeToGlyphId,baseFontCharCode=createCharCode(charCodeToGlyphId,baseGlyphId),charCodeToGlyphId=createCharCode(charCodeToGlyphId,accentGlyphId);seacMap[charCode]={baseFontCharCode:baseFontCharCode,accentFontCharCode:charCodeToGlyphId,accentOffset:accentOffset}}}}properties.seacMap=seacMap}var glyphZeroId=properties.fontMatrix?1/Math.max(...properties.fontMatrix.slice(0,4).map(Math.abs)):1e3,builder=new OpenTypeFileBuilder("OTTO");return builder.addTable("CFF ",font.data),builder.addTable("OS/2",createOS2Table(properties,newCharCodeToGlyphId)),builder.addTable("cmap",createCmapTable(newCharCodeToGlyphId,toUnicodeExtraMap,numGlyphs)),builder.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+safeString16(glyphZeroId)+"\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0"+safeString16(properties.descent)+"ÿ"+safeString16(properties.ascent)+string16(properties.italicAngle?2:0)+"\0\0\0\0\0\0\0"),builder.addTable("hhea","\0\0\0"+safeString16(properties.ascent)+safeString16(properties.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+safeString16(properties.capHeight)+safeString16(Math.tan(properties.italicAngle)*properties.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+string16(numGlyphs)),builder.addTable("hmtx",function(){for(var charstrings=font.charstrings,cffWidths=font.cff?font.cff.widths:null,hmtx="\0\0\0\0",i=1,ii=numGlyphs;ithis.toUnicode.charCodeOf(unicode):unicode=>this.toUnicode.charCodeOf(String.fromCodePoint(unicode)),i=0,ii=str.length;i>8*j&255));continue}}buffers.length%2!=1&&(buffers.push(currentBuf.join("")),currentBuf.length=0),currentBuf.push(String.fromCodePoint(unicode))}return buffers.push(currentBuf.join("")),buffers}}class ErrorFont{constructor(error){this.error=error,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(chars){return[chars]}exportData(){return{error:this.error}}}var ShadingType={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7};class Pattern{constructor(){unreachable("Cannot initialize Pattern.")}static parseShading(shading,xref,res,pdfFunctionFactory,globalColorSpaceCache,localColorSpaceCache){var dict=shading instanceof BaseStream?shading.dict:shading,type=dict.get("ShadingType");try{switch(type){case ShadingType.AXIAL:case ShadingType.RADIAL:return new RadialAxialShading(dict,xref,res,pdfFunctionFactory,globalColorSpaceCache,localColorSpaceCache);case ShadingType.FREE_FORM_MESH:case ShadingType.LATTICE_FORM_MESH:case ShadingType.COONS_PATCH_MESH:case ShadingType.TENSOR_PATCH_MESH:return new MeshShading(shading,xref,res,pdfFunctionFactory,globalColorSpaceCache,localColorSpaceCache);default:throw new FormatError("Unsupported ShadingType: "+type)}}catch(ex){if(ex instanceof MissingDataException)throw ex;return warn(ex),new DummyShading}}}class BaseShading{getIR(){unreachable("Abstract method `getIR` called.")}}_defineProperty(BaseShading,"SMALL_NUMBER",1e-6);class RadialAxialShading extends BaseShading{constructor(dict,xref,resources,pdfFunctionFactory,globalColorSpaceCache,localColorSpaceCache){super(),this.shadingType=dict.get("ShadingType");var coordsLen=0;if(this.shadingType===ShadingType.AXIAL?coordsLen=4:this.shadingType===ShadingType.RADIAL&&(coordsLen=6),this.coordsArr=dict.getArray("Coords"),!isNumberArray(this.coordsArr,coordsLen))throw new FormatError("RadialAxialShading: Invalid /Coords array.");var r1,y2,r2,cs=ColorSpaceUtils.parse({cs:dict.getRaw("CS")||dict.getRaw("ColorSpace"),xref:xref,resources:resources,pdfFunctionFactory:pdfFunctionFactory,globalColorSpaceCache:globalColorSpaceCache,localColorSpaceCache:localColorSpaceCache}),t0=(this.bbox=lookupNormalRect(dict.getArray("BBox"),null),0),coordsLen=1,xref=dict.getArray("Domain"),resources=(isNumberArray(xref,2)&&([t0,coordsLen]=xref),!1),globalColorSpaceCache=!1,localColorSpaceCache=dict.getArray("Extend"),x2=(isBooleanArray(localColorSpaceCache,2)&&([resources,globalColorSpaceCache]=localColorSpaceCache),this.shadingType!==ShadingType.RADIAL||resources&&globalColorSpaceCache||([xref,localColorSpaceCache,r1,x2,y2,r2]=this.coordsArr,r1<=r2+(xref=Math.hypot(xref-x2,localColorSpaceCache-y2))&&r2<=r1+xref&&warn("Unsupported radial gradient.")),this.extendStart=resources,this.extendEnd=globalColorSpaceCache,dict.getRaw("Function")),fn=pdfFunctionFactory.create(x2,!0),step=(coordsLen-t0)/840,colorStops=this.colorStops=[];if(coordsLen<=t0||step<=0)info("Bad shading domain.");else{for(var color=new Float32Array(cs.numComps),ratio=new Float32Array(1),iBase=0,rgbBuffer=(ratio[0]=t0,fn(ratio,0,color,0),new Uint8ClampedArray(3)),[rBase,gBase,bBase]=(cs.getRgb(color,0,rgbBuffer),rgbBuffer),iPrev=(colorStops.push([0,Util.makeHexColor(rBase,gBase,bBase)]),1),[rPrev,gPrev,bPrev]=(ratio[0]=t0+step,fn(ratio,0,color,0),cs.getRgb(color,0,rgbBuffer),rgbBuffer),maxSlopeR=rPrev-rBase+1,maxSlopeG=gPrev-gBase+1,maxSlopeB=bPrev-bBase+1,minSlopeR=rPrev-rBase-1,minSlopeG=gPrev-gBase-1,minSlopeB=bPrev-bBase-1,i=2;i<840;i++){ratio[0]=t0+i*step,fn(ratio,0,color,0),cs.getRgb(color,0,rgbBuffer);var[r,g,b]=rgbBuffer,run=i-iBase,maxSlopeR=Math.min(maxSlopeR,(r-rBase+1)/run),maxSlopeG=Math.min(maxSlopeG,(g-gBase+1)/run),maxSlopeB=Math.min(maxSlopeB,(b-bBase+1)/run),minSlopeR=Math.max(minSlopeR,(r-rBase-1)/run),minSlopeG=Math.max(minSlopeG,(g-gBase-1)/run),minSlopeB=Math.max(minSlopeB,(b-bBase-1)/run);minSlopeR<=maxSlopeR&&minSlopeG<=maxSlopeG&&minSlopeB<=maxSlopeB||(run=Util.makeHexColor(rPrev,gPrev,bPrev),colorStops.push([iPrev/840,run]),maxSlopeR=r-rPrev+1,maxSlopeG=g-gPrev+1,maxSlopeB=b-bPrev+1,minSlopeR=r-rPrev-1,minSlopeG=g-gPrev-1,minSlopeB=b-bPrev-1,iBase=iPrev,rBase=rPrev,gBase=gPrev,bBase=bPrev),iPrev=i,rPrev=r,gPrev=g,bPrev=b}colorStops.push([1,Util.makeHexColor(rPrev,gPrev,bPrev)]);localColorSpaceCache="transparent";dict.has("Background")&&(localColorSpaceCache=cs.getRgbHex(dict.get("Background"),0)),resources||(colorStops.unshift([0,localColorSpaceCache]),colorStops[1][0]+=BaseShading.SMALL_NUMBER),globalColorSpaceCache||(colorStops.at(-1)[0]-=BaseShading.SMALL_NUMBER,colorStops.push([1,localColorSpaceCache])),this.colorStops=colorStops}}getIR(){var type,p0,p1,r0,r1,{coordsArr,shadingType}=this;return shadingType===ShadingType.AXIAL?(p0=[coordsArr[0],coordsArr[1]],p1=[coordsArr[2],coordsArr[3]],r1=r0=null,type="axial"):shadingType===ShadingType.RADIAL?(p0=[coordsArr[0],coordsArr[1]],p1=[coordsArr[3],coordsArr[4]],r0=coordsArr[2],r1=coordsArr[5],type="radial"):unreachable("getPattern type unknown: ".concat(shadingType)),["RadialAxial",type,this.bbox,this.colorStops,p0,p1,r0,r1]}}class MeshStreamReader{constructor(stream,context){this.stream=stream,this.context=context,this.buffer=0,this.bufferLength=0;stream=context.numComps,this.tmpCompsBuf=new Float32Array(stream),stream=context.colorSpace.numComps;this.tmpCsCompsBuf=context.colorFn?new Float32Array(stream):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos>>0:(buffer=buffer<<24|stream.getByte()<<16|stream.getByte()<<8|stream.getByte(),nextByte=stream.getByte(),this.buffer=nextByte&(1<>bufferLength)>>>0);if(8===n&&0===bufferLength)return stream.getByte();for(;bufferLength>bufferLength}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){var{bitsPerCoordinate,decode}=this.context,xi=this.readBits(bitsPerCoordinate),yi=this.readBits(bitsPerCoordinate),bitsPerCoordinate=bitsPerCoordinate<32?1/((1<w*factors[i]):name,currentCode=-2,newWidths=[];for([unicode,glyphIndex]of baseMapping.map((charUnicode,index)=>[charUnicode,index]).sort((_ref23,_ref24)=>{var[_ref23]=_ref23,[_ref24]=_ref24;return _ref23-_ref24}))-1!==unicode&&(unicode===currentCode+1?(currentArray.push(rescaledBaseWidths[glyphIndex]),currentCode+=1):(currentCode=unicode,currentArray=[rescaledBaseWidths[glyphIndex]],newWidths.push(unicode,currentArray)));return newWidths}function getXfaFontDict(name){var widths=getXfaFontWidths(name),dict=new Dict(null),name=(dict.set("BaseFont",Name.get(name)),dict.set("Type",Name.get("Font")),dict.set("Subtype",Name.get("CIDFontType2")),dict.set("Encoding",Name.get("Identity-H")),dict.set("CIDToGIDMap",Name.get("Identity")),dict.set("W",widths),dict.set("FirstChar",widths[0]),dict.set("LastChar",widths.at(-2)+widths.at(-1).length-1),new Dict(null)),widths=(dict.set("FontDescriptor",name),new Dict(null));return widths.set("Ordering","Identity"),widths.set("Registry","Adobe"),widths.set("Supplement",0),dict.set("CIDSystemInfo",widths),dict}class PostScriptParser{constructor(lexer){this.lexer=lexer,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(type){return this.token.type===type&&(this.nextToken(),!0)}expect(type){if(this.accept(type))return!0;throw new FormatError("Unexpected symbol: found ".concat(this.token.type," expected ").concat(type,"."))}parse(){return this.nextToken(),this.expect(PostScriptTokenTypes.LBRACE),this.parseBlock(),this.expect(PostScriptTokenTypes.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(PostScriptTokenTypes.NUMBER))this.operators.push(this.prev.value);else if(this.accept(PostScriptTokenTypes.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(PostScriptTokenTypes.LBRACE))return;this.parseCondition()}}parseCondition(){var conditionLocation=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(PostScriptTokenTypes.RBRACE),this.accept(PostScriptTokenTypes.IF))this.operators[conditionLocation]=this.operators.length;else{if(!this.accept(PostScriptTokenTypes.LBRACE))throw new FormatError("PS Function: error parsing conditional.");var jumpLocation=this.operators.length,endOfTrue=(this.operators.push(null,null),this.operators.length);this.parseBlock(),this.expect(PostScriptTokenTypes.RBRACE),this.expect(PostScriptTokenTypes.IFELSE),this.operators[jumpLocation]=this.operators.length,this.operators[jumpLocation+1]="j",this.operators[conditionLocation]=endOfTrue}this.operators[conditionLocation+1]="jz"}}var PostScriptTokenTypes={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class PostScriptToken{static get opCache(){return shadow(this,"opCache",Object.create(null))}constructor(type,value){this.type=type,this.value=value}static getOperator(op){var _PostScriptToken$opCa;return(_PostScriptToken$opCa=PostScriptToken.opCache)[op]||(_PostScriptToken$opCa[op]=new PostScriptToken(PostScriptTokenTypes.OPERATOR,op))}static get LBRACE(){return shadow(this,"LBRACE",new PostScriptToken(PostScriptTokenTypes.LBRACE,"{"))}static get RBRACE(){return shadow(this,"RBRACE",new PostScriptToken(PostScriptTokenTypes.RBRACE,"}"))}static get IF(){return shadow(this,"IF",new PostScriptToken(PostScriptTokenTypes.IF,"IF"))}static get IFELSE(){return shadow(this,"IFELSE",new PostScriptToken(PostScriptTokenTypes.IFELSE,"IFELSE"))}}class PostScriptLexer{constructor(stream){this.stream=stream,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){for(var comment=!1,ch=this.currentChar;;){if(ch<0)return EOF;if(comment)10!==ch&&13!==ch||(comment=!1);else if(37===ch)comment=!0;else if(!isWhiteSpace(ch))break;ch=this.nextChar()}switch(0|ch){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 PostScriptToken(PostScriptTokenTypes.NUMBER,this.getNumber());case 123:return this.nextChar(),PostScriptToken.LBRACE;case 125:return this.nextChar(),PostScriptToken.RBRACE}var strBuf=this.strBuf;for(strBuf.length=0,strBuf[0]=String.fromCharCode(ch);0<=(ch=this.nextChar())&&(65<=ch&&ch<=90||97<=ch&&ch<=122);)strBuf.push(String.fromCharCode(ch));var str=strBuf.join("");switch(str.toLowerCase()){case"if":return PostScriptToken.IF;case"ifelse":return PostScriptToken.IFELSE;default:return PostScriptToken.getOperator(str)}}getNumber(){var ch=this.currentChar,strBuf=this.strBuf;for(strBuf.length=0,strBuf[0]=String.fromCharCode(ch);0<=(ch=this.nextChar())&&(48<=ch&&ch<=57||45===ch||46===ch);)strBuf.push(String.fromCharCode(ch));var value=parseFloat(strBuf.join(""));if(isNaN(value))throw new FormatError("Invalid floating point number: ".concat(value));return value}}class BaseLocalCache{constructor(options){this._onlyRefs=!0===(null==options?void 0:options.onlyRefs),this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new RefSetCache}getByName(name){this._onlyRefs&&unreachable("Should not call `getByName` method.");var ref=this._nameRefMap.get(name);return ref?this.getByRef(ref):this._imageMap.get(name)||null}getByRef(ref){return this._imageCache.get(ref)||null}set(name,ref,data){unreachable("Abstract method `set` called.")}}class LocalImageCache extends BaseLocalCache{set(name){var ref=1+x):null}class PDFFunction{static getSampleArray(size,outputSize,bps,stream){for(var length=1,i=0,ii=size.length;i>codeSize)*sampleMul,codeBuf&=(1<>1,numInputs=domain.length>>1,evaluator=new PostScriptEvaluator(fn),cache=Object.create(null),cache_available=8192,tmpBuf=new Float32Array(numInputs);return function(src,srcOffset,dest,destOffset){var key="",input=tmpBuf;for(i=0;i=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(value)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(n){if(this.stack.length+n>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");for(var stack=this.stack,i=stack.length-n,j=n-1;0<=j;j--,i++)stack.push(stack[i])}index(n){this.push(this.stack[this.stack.length-n-1])}roll(n,p){for(var stack=this.stack,l=stack.length-n,r=stack.length-1,p=l+(p-Math.floor(p/n)*n),i=l,j=r;i>b);break;case"ceiling":a=stack.pop(),stack.push(Math.ceil(a));break;case"copy":a=stack.pop(),stack.copy(a);break;case"cos":a=stack.pop(),stack.push(Math.cos(a%360/180*Math.PI));break;case"cvi":a=0|stack.pop(),stack.push(a);break;case"cvr":break;case"div":b=stack.pop(),a=stack.pop(),stack.push(a/b);break;case"dup":stack.copy(1);break;case"eq":b=stack.pop(),a=stack.pop(),stack.push(a===b);break;case"exch":stack.roll(2,1);break;case"exp":b=stack.pop(),a=stack.pop(),stack.push(a**b);break;case"false":stack.push(!1);break;case"floor":a=stack.pop(),stack.push(Math.floor(a));break;case"ge":b=stack.pop(),a=stack.pop(),stack.push(b<=a);break;case"gt":b=stack.pop(),a=stack.pop(),stack.push(b=max?new AstLiteral(max):num1.max<=max?num1:new AstMin(num1,max)}class PostScriptCompiler{compile(code,domain,range){for(var n,num1,num2,ast1,ast2,tmpVar,item,stack=[],instructions=[],inputSize=domain.length>>1,outputSize=range.length>>1,lastRegister=0,i=0;iexpr.min&&(_statementBuilder.unshift("Math.max(",min,", "),_statementBuilder.push(")")),max"!==_ch2||(chars[i]="")}return createBidiText(chars.join(""),isLTR)}var NORMAL={style:"normal",weight:"normal"},BOLD={style:"normal",weight:"bold"},ITALIC={style:"italic",weight:"normal"},BOLDITALIC={style:"italic",weight:"bold"},substitutionMap=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:NORMAL,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:BOLD,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:ITALIC,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:BOLDITALIC,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:NORMAL,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:BOLD,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:ITALIC,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:BOLDITALIC,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:NORMAL,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:BOLD,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:ITALIC,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:BOLDITALIC,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:NORMAL,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:BOLD,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:ITALIC,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:BOLDITALIC,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:NORMAL,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:BOLD,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:ITALIC,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:BOLDITALIC,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:NORMAL}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),fontAliases=new Map([["Arial-Black","ArialBlack"]]);function getStyleToAppend(style){switch(style){case BOLD:return"Bold";case ITALIC:return"Italic";case BOLDITALIC:return"Bold Italic";default:if("bold"===(null==style?void 0:style.weight))return"Bold";if("italic"===(null==style?void 0:style.style))return"Italic"}return""}function getFamilyName(str){var keywords=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 str.split(/[- ,+]+/g).filter(tok=>!keywords.has(tok.toLowerCase())).join(" ")}function generateFont(_ref26,src,localFontPath){var{alias,local,path,fallback,style,ultimate}=_ref26,useFallback=!(3>>8,data[length++]=255&code)}else{if(!ArrayBuffer.isView(input))throw new Error("Invalid data format, must be a string or TypedArray.");length=(data=input.slice()).byteLength}for(var k2,blockCounts=length>>2,tailLength=length-4*blockCounts,dataUint32=new Uint32Array(data.buffer,0,blockCounts),k1=0,h1=this.h1,h2=this.h2,C1=3432918353,C2=461845907,C1_LOW=C1&MASK_LOW,C2_LOW=C2&MASK_LOW,_i40=0;_i40>>17)*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW)<<13|h1>>>19)+3864292196:h2=5*(h2=(h2^=(k2=(k2=(k2=dataUint32[_i40])*C1&MASK_HIGH|k2*C1_LOW&MASK_LOW)<<15|k2>>>17)*C2&MASK_HIGH|k2*C2_LOW&MASK_LOW)<<13|h2>>>19)+3864292196;switch(k1=0,tailLength){case 3:k1^=data[4*blockCounts+2]<<16;case 2:k1^=data[4*blockCounts+1]<<8;case 1:k1=(k1=(k1=(k1^=data[4*blockCounts])*C1&MASK_HIGH|k1*C1_LOW&MASK_LOW)<<15|k1>>>17)*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW,1&blockCounts?h1^=k1:h2^=k1}this.h1=h1,this.h2=h2}hexdigest(){var h1=this.h1,h2=this.h2,h1=3981806797*(h1^=h2>>>1)&MASK_HIGH|36045*h1&MASK_LOW;return h1=444984403*(h1^=(h2=4283543511*h2&MASK_HIGH|(2950163797*(h2<<16|h1>>>16)&MASK_HIGH)>>>16)>>>1)&MASK_HIGH|60499*h1&MASK_LOW,((h1^=(h2=3301882366*h2&MASK_HIGH|(3120437893*(h2<<16|h1>>>16)&MASK_HIGH)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(h2>>>0).toString(16).padStart(8,"0")}}function resizeImageMask(src,bpc,w1,h1,w2,h2){for(var j,py,oldIndex,length=w2*h2,dest=new(bpc<=8?Uint8Array:bpc<=16?Uint16Array:Uint32Array)(length),xRatio=w1/w2,yRatio=h1/h2,newIndex=0,xScaled=new Uint16Array(w2),w1Scanline=w1,i=0;i>3)*height,imgArray=_ref29.getBytes(computedLength),isSingleOpaquePixel=1===width&&1===height&&dict==(0===imgArray.length||!!(128&imgArray[0]));if(isSingleOpaquePixel)return{isSingleOpaquePixel:isSingleOpaquePixel};if(isOffscreenCanvasSupported)return ImageResizer.needsToBeResized(width,height)?(convertBlackAndWhiteToRGBA({src:imgArray,dest:isSingleOpaquePixel=new Uint8ClampedArray(width*height*4),width:width,height:height,nonBlackColor:0,inverseDecode:dict}),ImageResizer.createImage({kind:ImageKind.RGBA_32BPP,data:isSingleOpaquePixel,width:width,height:height,interpolate:interpolate})):(convertBlackAndWhiteToRGBA({src:imgArray,dest:(imgData=(isSingleOpaquePixel=(isOffscreenCanvasSupported=new OffscreenCanvas(width,height)).getContext("2d")).createImageData(width,height)).data,width:width,height:height,nonBlackColor:0,inverseDecode:dict}),isSingleOpaquePixel.putImageData(imgData,0,0),{data:null,width:width,height:height,interpolate:interpolate,bitmap:isOffscreenCanvasSupported.transferToImageBitmap()});var data,actualLength=imgArray.byteLength,isSingleOpaquePixel=computedLength===actualLength;if(_ref29 instanceof DecodeStream&&(!dict||isSingleOpaquePixel)?data=imgArray:dict?((data=new Uint8Array(computedLength)).set(imgArray),data.fill(255,actualLength)):data=new Uint8Array(imgArray),dict)for(var i=0;i>7&1,output[i+1]=buf>>6&1,output[i+2]=buf>>5&1,output[i+3]=buf>>4&1,output[i+4]=buf>>3&1,output[i+5]=buf>>2&1,output[i+6]=buf>>1&1,output[i+7]=1&buf,i+=8;if(i>=1}else for(var bits=0,buf=0,i=0,ii=length;i>remainingBits;value<0?value=0:maxmask[1+maskOffset]){opacity=255;break}}alphaBuf[i]=opacity}}if(alphaBuf)for(i=0,j=3,ii=width*actualHeight;i>3,mustBeResized=isOffscreenCanvasSupported&&ImageResizer.needsToBeResized(drawWidth,drawHeight);if(!this.smask&&!this.mask&&"DeviceRGBA"===this.colorSpace.name)return imgData.kind=ImageKind.RGBA_32BPP,_imgArray=imgData.data=await this.getImageBytes(originalHeight*originalWidth*4,{}),isOffscreenCanvasSupported?mustBeResized?ImageResizer.createImage(imgData,!1):this.createBitmap(ImageKind.RGBA_32BPP,drawWidth,drawHeight,_imgArray):imgData;if(!forceRGBA){if("DeviceGray"===this.colorSpace.name&&1===bpc?kind=ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==bpc||this.needsDecode||(kind=ImageKind.RGB_24BPP),kind&&!this.smask&&!this.mask&&drawWidth===originalWidth&&drawHeight===originalHeight){var _imgArray=await _assertClassBrand(_PDFImage_brand,this,_getImage).call(this,originalWidth,originalHeight);if(_imgArray)return _imgArray;_imgArray=await this.getImageBytes(originalHeight*numComps,{});if(isOffscreenCanvasSupported)return mustBeResized?ImageResizer.createImage({data:_imgArray,kind:kind,width:drawWidth,height:drawHeight,interpolate:this.interpolate},this.needsDecode):this.createBitmap(kind,originalWidth,originalHeight,_imgArray);if(imgData.kind=kind,imgData.data=_imgArray,this.needsDecode){assert(kind===ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");for(var buffer=imgData.data,i=0,ii=buffer.length;i>3),{internal:!0}),comps=this.getComponents(numComps);if(1===bpc)if(length=width*height,this.needsDecode)for(i=0;i((imgData=await imageObj.createImageData(!1,isOffscreenCanvasSupported)).dataLen=imgData.bitmap?imgData.width*imgData.height*4:imgData.data.length,imgData.ref=imageRef,cacheGlobally&&this.globalImageCache.addByteSize(imageRef,imgData.dataLen),this._sendImgData(objId,imgData,cacheGlobally))).catch(reason=>(warn('Unable to decode image "'.concat(objId,'": "').concat(reason,'".')),imageRef&&this.globalImageCache.addDecodeFailed(imageRef),this._sendImgData(objId,null,cacheGlobally))),cacheKey&&(dict={objId:objId,fn:fn,args:args,optionalContent:optionalContent,hasMask:maxImageSize},localImageCache.set(cacheKey,imageRef,dict),imageRef)&&(this._regionalImageCache.set(null,imageRef,dict),cacheGlobally)&&(assert(imageObj,"The global cache-data must be available."),this.globalImageCache.setData(imageRef,imageObj))}}else warn("Image dimensions are missing, or not numbers.")}handleSMask(smask,resources,operatorList,task,stateManager,localColorSpaceCache,seenRefs){var smaskContent=smask.get("G"),smaskOptions={subtype:smask.get("S").name,backdrop:smask.get("BC")},smask=smask.get("TR");if(isPDFFunction(smask)){for(var transferFn=this._pdfFunctionFactory.create(smask),transferMap=new Uint8Array(256),tmp=new Float32Array(1),i=0;i<256;i++)tmp[0]=i/255,transferFn(tmp,0,tmp,0),transferMap[i]=255*tmp[0]|0;smaskOptions.transferMap=transferMap}return this.buildFormXObject(resources,smaskContent,smaskOptions,operatorList,task,stateManager.state.clone({newPath:!0}),localColorSpaceCache,seenRefs)}handleTransferFunction(tr){var transferArray;if(Array.isArray(tr))transferArray=tr;else{if(!isPDFFunction(tr))return null;transferArray=[tr]}var entry,transferMaps=[],numFns=0,numEffectfulFns=0;for(entry of transferArray){var transferObj=this.xref.fetchIfRef(entry);if(numFns++,isName(transferObj,"Identity"))transferMaps.push(null);else{if(!isPDFFunction(transferObj))return null;for(var transferFn=this._pdfFunctionFactory.create(transferObj),transferMap=new Uint8Array(256),tmp=new Float32Array(1),j=0;j<256;j++)tmp[0]=j/255,transferFn(tmp,0,tmp,0),transferMap[j]=255*tmp[0]|0;transferMaps.push(transferMap),numEffectfulFns++}}return 1!==numFns&&4!==numFns||0===numEffectfulFns?null:transferMaps}handleTilingType(fn,color,resources,pattern,patternDict,operatorList,task,localTilingPatternCache){var tilingOpList=new OperatorList,resources=Dict.merge({xref:this.xref,dictArray:[patternDict.get("Resources"),resources]});return this.getOperatorList({stream:pattern,task:task,resources:resources,operatorList:tilingOpList}).then(function(){var operatorListIR=tilingOpList.getIR(),tilingPatternIR=getTilingPatternIR(operatorListIR,patternDict,color);operatorList.addDependencies(tilingOpList.dependencies),operatorList.addOp(fn,tilingPatternIR),patternDict.objId&&localTilingPatternCache.set(null,patternDict.objId,{operatorListIR:operatorListIR,dict:patternDict})}).catch(reason=>{if(!(reason instanceof AbortException)){if(!this.options.ignoreErrors)throw reason;warn('handleTilingType - ignoring pattern: "'.concat(reason,'".'))}})}async handleSetFont(resources,fontArgs,fontRef,operatorList,task,state){var fallbackFontDict=6_this3.handleSetFont(resources,null,value[0],operatorList,task,stateManager.state).then(function(loadedName){operatorList.addDependency(loadedName),gStateObj.push([key,[loadedName,value[1]]])}));break;case"BM":gStateObj.push([key,normalizeBlendMode(value)]);break;case"SMask":isName(value,"None")?gStateObj.push([key,!1]):value instanceof Dict?(isSimpleGState=!1,promise=promise.then(()=>_this3.handleSMask(value,resources,operatorList,task,stateManager,localColorSpaceCache,seenRefs)),gStateObj.push([key,!0])):warn("Unsupported SMask type");break;case"TR":var transferMaps=_this3.handleTransferFunction(value);gStateObj.push([key,transferMaps]);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":info("graphic state operator "+key);break;default:info("Unknown graphic state operator "+key)}}(key,value);await promise,0new TranslatedFont({loadedName:"g_font_error",font:new ErrorFont('Font "'.concat(fontName,'" is not available.')),dict:font});if(font?font instanceof Ref&&(fontRef=font):(fontRes=resources.get("Font"))&&(fontRef=fontRes.getRaw(fontName)),fontRef){if(null!=(fontRes=this.type3FontRefs)&&fontRes.has(fontRef))return errorFont();if(this.fontCache.has(fontRef))return this.fontCache.get(fontRef);try{font=this.xref.fetchIfRef(fontRef)}catch(ex){warn('loadFont - lookup failed: "'.concat(ex,'".'))}}if(!(font instanceof Dict)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return warn('Font "'.concat(fontName,'" is not available.')),errorFont();warn('Font "'.concat(fontName,'" is not available -- attempting to fallback to a default font.')),font=fallbackFontDict||PartialEvaluator.fallbackFontDict}if(font.cacheKey&&this.fontCache.has(font.cacheKey))return this.fontCache.get(font.cacheKey);var preEvaluatedFont,{promise:fontRes,resolve}=Promise.withResolvers();try{(preEvaluatedFont=this.preEvaluateFont(font)).cssFontInfo=cssFontInfo}catch(reason){return warn('loadFont - preEvaluateFont failed: "'.concat(reason,'".')),errorFont()}var{descriptor:fallbackFontDict,hash:cssFontInfo}=preEvaluatedFont,errorFont=fontRef instanceof Ref;if(cssFontInfo&&fallbackFontDict instanceof Dict){fallbackFontDict=fallbackFontDict.fontAliases||(fallbackFontDict.fontAliases=Object.create(null));if(fallbackFontDict[cssFontInfo]){var aliasFontRef=fallbackFontDict[cssFontInfo].aliasRef;if(errorFont&&aliasFontRef&&this.fontCache.has(aliasFontRef))return this.fontCache.putAlias(fontRef,aliasFontRef),this.fontCache.get(fontRef)}else fallbackFontDict[cssFontInfo]={fontID:this.idFactory.createFontId()};errorFont&&(fallbackFontDict[cssFontInfo].aliasRef=fontRef),aliasFontRef=fallbackFontDict[cssFontInfo].fontID}else aliasFontRef=this.idFactory.createFontId();return assert(null==aliasFontRef?void 0:aliasFontRef.startsWith("f"),'The "fontID" must be (correctly) defined.'),errorFont?this.fontCache.put(fontRef,fontRes):(font.cacheKey="cacheKey_".concat(aliasFontRef),this.fontCache.put(font.cacheKey,fontRes)),font.loadedName="".concat(this.idFactory.getDocId(),"_").concat(aliasFontRef),this.translateFont(preEvaluatedFont).then(async translatedFont=>{var translated=new TranslatedFont({loadedName:font.loadedName,font:translatedFont,dict:font});if(translatedFont.isType3Font)try{await translated.loadType3Data(this,resources,task)}catch(reason){throw new Error("Type3 font load error: ".concat(reason))}resolve(translated)}).catch(reason=>{warn('loadFont - translateFont failed: "'.concat(reason,'".')),resolve(new TranslatedFont({loadedName:font.loadedName,font:new ErrorFont(null==reason?void 0:reason.message),dict:font}))}),fontRes}buildPath(fn,args,state){var{pathMinMax:minMax,pathBuffer}=state;switch(0|fn){case OPS.rectangle:var x=state.currentPointX=args[0],y=state.currentPointY=args[1],width=args[2],height=args[3],xw=x+width,yh=y+height;0===width||0===height?pathBuffer.push(DrawOPS.moveTo,x,y,DrawOPS.lineTo,xw,yh,DrawOPS.closePath):pathBuffer.push(DrawOPS.moveTo,x,y,DrawOPS.lineTo,xw,y,DrawOPS.lineTo,xw,yh,DrawOPS.lineTo,x,yh,DrawOPS.closePath),Util.rectBoundingBox(x,y,xw,yh,minMax);break;case OPS.moveTo:width=state.currentPointX=args[0],height=state.currentPointY=args[1];pathBuffer.push(DrawOPS.moveTo,width,height),Util.pointBoundingBox(width,height,minMax);break;case OPS.lineTo:x=state.currentPointX=args[0],y=state.currentPointY=args[1];pathBuffer.push(DrawOPS.lineTo,x,y),Util.pointBoundingBox(x,y,minMax);break;case OPS.curveTo:var xw=state.currentPointX,yh=state.currentPointY,[width,height,x,y,_x4,_y4]=args;state.currentPointX=_x4,state.currentPointY=_y4,pathBuffer.push(DrawOPS.curveTo,width,height,x,y,_x4,_y4),Util.bezierBoundingBox(xw,yh,width,height,x,y,_x4,_y4,minMax);break;case OPS.curveTo2:var xw=state.currentPointX,yh=state.currentPointY,[width,height,x,y]=args;state.currentPointX=x,state.currentPointY=y,pathBuffer.push(DrawOPS.curveTo,xw,yh,width,height,x,y),Util.bezierBoundingBox(xw,yh,xw,yh,width,height,x,y,minMax);break;case OPS.curveTo3:var _x4=state.currentPointX,_y4=state.currentPointY,[xw,yh,width,height]=args;state.currentPointX=width,state.currentPointY=height,pathBuffer.push(DrawOPS.curveTo,xw,yh,width,height,width,height),Util.bezierBoundingBox(_x4,_y4,xw,yh,width,height,width,height,minMax);break;case OPS.closePath:pathBuffer.push(DrawOPS.closePath)}}_getColorSpace(cs,resources,localColorSpaceCache){return ColorSpaceUtils.parse({cs:cs,xref:this.xref,resources:resources,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:localColorSpaceCache,asyncIfNotCached:!0})}async _handleColorSpace(csPromise){try{return await csPromise}catch(ex){if(ex instanceof AbortException)return null;if(this.options.ignoreErrors)return warn('_handleColorSpace - ignoring ColorSpace: "'.concat(ex,'".')),null;throw ex}}parseShading(_ref35){var{shading:_ref35,resources,localColorSpaceCache,localShadingPatternCache}=_ref35,id=localShadingPatternCache.get(_ref35);if(!id){try{var patternIR=Pattern.parseShading(_ref35,this.xref,resources,this._pdfFunctionFactory,this.globalColorSpaceCache,localColorSpaceCache).getIR()}catch(reason){if(reason instanceof AbortException)return null;if(this.options.ignoreErrors)return warn('parseShading - ignoring shading: "'.concat(reason,'".')),localShadingPatternCache.set(_ref35,null),null;throw reason}id="pattern_".concat(this.idFactory.createObjId()),this.parsingType3Font&&(id="".concat(this.idFactory.getDocId(),"_type3_").concat(id)),localShadingPatternCache.set(_ref35,id),this.parsingType3Font?this.handler.send("commonobj",[id,"Pattern",patternIR]):this.handler.send("obj",[id,this.pageIndex,"Pattern",patternIR])}return id}handleColorN(operatorList,fn,args,cs,patterns,resources,task,localColorSpaceCache,localTilingPatternCache,localShadingPatternCache){var patternName=args.pop();if(patternName instanceof Name){var patterns=patterns.getRaw(patternName.name),localTilingPattern=patterns instanceof Ref&&localTilingPatternCache.getByRef(patterns);if(localTilingPattern)try{var color=cs.base?cs.base.getRgbHex(args,0):null,tilingPatternIR=getTilingPatternIR(localTilingPattern.operatorListIR,localTilingPattern.dict,color);return void operatorList.addOp(fn,tilingPatternIR)}catch(_unused1){}localTilingPattern=this.xref.fetchIfRef(patterns);if(localTilingPattern){color=localTilingPattern instanceof BaseStream?localTilingPattern.dict:localTilingPattern,tilingPatternIR=color.get("PatternType");if(tilingPatternIR===PatternType.TILING)return patterns=cs.base?cs.base.getRgbHex(args,0):null,this.handleTilingType(fn,patterns,resources,localTilingPattern,color,operatorList,task,localTilingPatternCache);if(tilingPatternIR===PatternType.SHADING)return cs=color.get("Shading"),void((args=this.parseShading({shading:cs,resources:resources,localColorSpaceCache:localColorSpaceCache,localShadingPatternCache:localShadingPatternCache}))&&(patterns=lookupMatrix(color.getArray("Matrix"),null),operatorList.addOp(fn,["Shading",args,patterns])));throw new FormatError("Unknown PatternType: ".concat(tilingPatternIR))}}throw new FormatError("Unknown PatternName: ".concat(patternName))}_parseVisibilityExpression(array,nestingCounter,currentResult){if(10<++nestingCounter)warn("Visibility expression is too deeply nested");else{var length=array.length,operator=this.xref.fetchIfRef(array[0]);if(length<2||!(operator instanceof Name))warn("Invalid visibility expression");else{switch(operator.name){case"And":case"Or":case"Not":currentResult.push(operator.name);break;default:return void warn("Invalid operator ".concat(operator.name," in visibility expression"))}for(var i=1;i{stateManager.state.fillColorSpace=colorSpace||ColorSpaceUtils.gray})),{v:void 0});case OPS.setStrokeColorSpace:localImage=self._getColorSpace(args[0],resources,localColorSpaceCache);return localImage instanceof ColorSpace?(stateManager.state.strokeColorSpace=localImage,1):(next(self._handleColorSpace(localImage).then(colorSpace=>{stateManager.state.strokeColorSpace=colorSpace||ColorSpaceUtils.gray})),{v:void 0});case OPS.setFillColor:args=[(cs=stateManager.state.fillColorSpace).getRgbHex(args,0)],fn=OPS.setFillRGBColor;break;case OPS.setStrokeColor:args=[(cs=stateManager.state.strokeColorSpace).getRgbHex(args,0)],fn=OPS.setStrokeRGBColor;break;case OPS.setFillGray:stateManager.state.fillColorSpace=ColorSpaceUtils.gray,args=[ColorSpaceUtils.gray.getRgbHex(args,0)],fn=OPS.setFillRGBColor;break;case OPS.setStrokeGray:stateManager.state.strokeColorSpace=ColorSpaceUtils.gray,args=[ColorSpaceUtils.gray.getRgbHex(args,0)],fn=OPS.setStrokeRGBColor;break;case OPS.setFillCMYKColor:stateManager.state.fillColorSpace=ColorSpaceUtils.cmyk,args=[ColorSpaceUtils.cmyk.getRgbHex(args,0)],fn=OPS.setFillRGBColor;break;case OPS.setStrokeCMYKColor:stateManager.state.strokeColorSpace=ColorSpaceUtils.cmyk,args=[ColorSpaceUtils.cmyk.getRgbHex(args,0)],fn=OPS.setStrokeRGBColor;break;case OPS.setFillRGBColor:stateManager.state.fillColorSpace=ColorSpaceUtils.rgb,args=[ColorSpaceUtils.rgb.getRgbHex(args,0)];break;case OPS.setStrokeRGBColor:stateManager.state.strokeColorSpace=ColorSpaceUtils.rgb,args=[ColorSpaceUtils.rgb.getRgbHex(args,0)];break;case OPS.setFillColorN:if(cs=stateManager.state.patternFillColorSpace){if("Pattern"===cs.name)return next(self.handleColorN(operatorList,OPS.setFillColorN,args,cs,patterns,resources,task,localColorSpaceCache,localTilingPatternCache,localShadingPatternCache)),{v:void 0};args=[cs.getRgbHex(args,0)],fn=OPS.setFillRGBColor}else{if(isNumberArray(args,null)){args=[ColorSpaceUtils.gray.getRgbHex(args,0)],fn=OPS.setFillRGBColor;break}args=[],fn=OPS.setFillTransparent}break;case OPS.setStrokeColorN:if(cs=stateManager.state.patternStrokeColorSpace){if("Pattern"===cs.name)return next(self.handleColorN(operatorList,OPS.setStrokeColorN,args,cs,patterns,resources,task,localColorSpaceCache,localTilingPatternCache,localShadingPatternCache)),{v:void 0};args=[cs.getRgbHex(args,0)],fn=OPS.setStrokeRGBColor}else{if(isNumberArray(args,null)){args=[ColorSpaceUtils.gray.getRgbHex(args,0)],fn=OPS.setStrokeRGBColor;break}args=[],fn=OPS.setStrokeTransparent}break;case OPS.shadingFill:try{var shadingRes=resources.get("Shading");if(!shadingRes)throw new FormatError("No shading resource found");if(!(shading=shadingRes.get(args[0].name)))throw new FormatError("No shading object found")}catch(reason){if(reason instanceof AbortException)return 1;if(self.options.ignoreErrors)return warn('getOperatorList - ignoring Shading: "'.concat(reason,'".')),1;throw reason}_localImage=self.parseShading({shading:shading,resources:resources,localColorSpaceCache:localColorSpaceCache,localShadingPatternCache:localShadingPatternCache});if(!_localImage)return 1;args=[_localImage],fn=OPS.shadingFill;break;case OPS.setGState:if(isValidName=args[0]instanceof Name,name=args[0].name,isValidName){localImage=localGStateCache.getByName(name);if(localImage)return 0{operatorList.addOp(OPS.beginMarkedContentProps,["OC",data])}).catch(reason=>{if(!(reason instanceof AbortException)){if(!self.options.ignoreErrors)throw reason;warn('getOperatorList - ignoring beginMarkedContentProps: "'.concat(reason,'".')),operatorList.addOp(OPS.beginMarkedContentProps,["OC",null])}})),{v:void 0};args=[args[0].name,args[1]instanceof Dict?args[1].get("MCID"):null];break;case OPS.beginMarkedContent:case OPS.endMarkedContent:default:if(null!==args){for(i=0,ii=args.length;i{if(!(reason instanceof AbortException)){if(!this.options.ignoreErrors)throw reason;warn('getOperatorList - ignoring errors during "'.concat(task.name,'" ')+'task: "'.concat(reason,'".')),closePendingRestoreOPS()}});throw new Error('getOperatorList: missing "operatorList" parameter');function closePendingRestoreOPS(){for(var i=0,ii=preprocessor.savedStatesDepth;iviewBox[2]||posY+glyphWidthviewBox[3])return}else if(posX+glyphWidthviewBox[2]||posYviewBox[3])return;if(textState.font&&textContentItem.prevTransform){var lastPosX=textContentItem.prevTransform[4],lastPosY=textContentItem.prevTransform[5];if(lastPosX!==posX||lastPosY!==posY){var _textOrientation,_textState$font=-1;switch(currentTransform[0]&&0===currentTransform[1]&&0===currentTransform[2]?_textState$font=0.5*textContentItem.width?appendEOL:(resetLastChars(),flushTextContentItem))():Math.abs(glyphWidth)>textContentItem.width?appendEOL():(_textState$font<=_textOrientation*textContentItem.notASpace&&resetLastChars(),_textState$font<=_textOrientation*textContentItem.trackingSpaceMin?shouldAddWhitepsace()?(resetLastChars(),flushTextContentItem(),pushWhitespace({height:Math.abs(_textState$font)})):textContentItem.height+=_textState$font:addFakeSpaces(_textState$font,textContentItem.prevTransform,_textOrientation)||(0===textContentItem.str.length?(resetLastChars(),pushWhitespace({height:Math.abs(_textState$font)})):textContentItem.height+=_textState$font),Math.abs(glyphWidth)>textContentItem.width*VERTICAL_SHIFT_RATIO&&flushTextContentItem())):(_textOrientation=posY-lastPosY,(_textState$font=(posX-lastPosX)/textContentItem.textAdvanceScale)<(glyphWidth=Math.sign(textContentItem.width))*textContentItem.negativeSpaceMax?(Math.abs(_textOrientation)>.5*textContentItem.height?appendEOL:(resetLastChars(),flushTextContentItem))():Math.abs(_textOrientation)>textContentItem.height?appendEOL():(_textState$font<=glyphWidth*textContentItem.notASpace&&resetLastChars(),_textState$font<=glyphWidth*textContentItem.trackingSpaceMin?shouldAddWhitepsace()?(resetLastChars(),flushTextContentItem(),pushWhitespace({width:Math.abs(_textState$font)})):textContentItem.width+=_textState$font:addFakeSpaces(_textState$font,textContentItem.prevTransform,glyphWidth)||(0===textContentItem.str.length?(resetLastChars(),pushWhitespace({width:Math.abs(_textState$font)})):textContentItem.width+=_textState$font),Math.abs(_textOrientation)>textContentItem.height*VERTICAL_SHIFT_RATIO&&flushTextContentItem()))}}return 1}function buildTextContentItem(_ref39){var{chars:_ref39,extraSpacing}=_ref39,font=textState.font;if(_ref39)for(var glyphs=font.charsToGlyphs(_ref39),scale=textState.fontMatrix[0]*textState.fontSize,i=0,ii=glyphs.length;i=(null!=(fn=null==sink?void 0:sink.desiredSize)?fn:1)){stop=!0;break}}stop?next(deferred):(flushTextContentItem(),enqueueChunk(),resolve())}).catch(reason=>{if(!(reason instanceof AbortException)){if(!this.options.ignoreErrors)throw reason;warn('getTextContent - ignoring errors during "'.concat(task.name,'" ')+'task: "'.concat(reason,'".')),flushTextContentItem(),enqueueChunk()}})}async extractDataStructures(dict,properties){var cidToGidBytes,xref=this.xref,toUnicodePromise=this.readToUnicode(properties.toUnicode);if(properties.composite){var cidSystemInfo=dict.get("CIDSystemInfo");cidSystemInfo instanceof Dict&&(properties.cidSystemInfo={registry:stringToPDFString(cidSystemInfo.get("Registry")),ordering:stringToPDFString(cidSystemInfo.get("Ordering")),supplement:cidSystemInfo.get("Supplement")});try{var cidToGidMap=dict.get("CIDToGIDMap");cidToGidMap instanceof BaseStream&&(cidToGidBytes=cidToGidMap.getBytes())}catch(ex){if(!this.options.ignoreErrors)throw ex;warn('extractDataStructures - ignoring CIDToGIDMap data: "'.concat(ex,'".'))}}var differences=[],cidSystemInfo=null;if(dict.has("Encoding")){if((encoding=dict.get("Encoding"))instanceof Dict){if(cidSystemInfo=(cidSystemInfo=encoding.get("BaseEncoding"))instanceof Name?cidSystemInfo.name:null,encoding.has("Differences")){var entry,index=0;for(entry of encoding.get("Differences")){var data=xref.fetchIfRef(entry);if("number"==typeof data)index=data;else{if(!(data instanceof Name))throw new FormatError("Invalid entry in 'Differences' array: ".concat(data));differences[index++]=data.name}}}}else if(encoding instanceof Name)cidSystemInfo=encoding.name;else{cidToGidMap="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new FormatError(cidToGidMap);warn(cidToGidMap)}"MacRomanEncoding"!==cidSystemInfo&&"MacExpertEncoding"!==cidSystemInfo&&"WinAnsiEncoding"!==cidSystemInfo&&(cidSystemInfo=null)}var isSymbolicFont,encoding,cidToGidMap=!properties.file||properties.isInternalFont,isSymbolsFontName=getSymbolsFonts()[properties.name],isNonsymbolicFont=((cidSystemInfo=cidSystemInfo&&cidToGidMap&&isSymbolsFontName?null:cidSystemInfo)?properties.defaultEncoding=getEncoding(cidSystemInfo):(isSymbolicFont=!!(properties.flags&FontFlags.Symbolic),isNonsymbolicFont=!!(properties.flags&FontFlags.Nonsymbolic),encoding=StandardEncoding,"TrueType"!==properties.type||isNonsymbolicFont||(encoding=WinAnsiEncoding),(isSymbolicFont||isSymbolsFontName)&&(encoding=MacRomanEncoding,cidToGidMap)&&(/Symbol/i.test(properties.name)?encoding=SymbolSetEncoding:/Dingbats/i.test(properties.name)?encoding=ZapfDingbatsEncoding:/Wingdings/i.test(properties.name)&&(encoding=WinAnsiEncoding)),properties.defaultEncoding=encoding),properties.differences=differences,properties.baseEncodingName=cidSystemInfo,properties.hasEncoding=!!cidSystemInfo||0>1;0==glyphID&&!toUnicode.has(code)||(result[code]=glyphID)}return result}extractWidths(dict,descriptor,properties){var xref=this.xref,glyphsWidths=[],defaultWidth=0,glyphsVMetrics=[];if(properties.composite){var dw=dict.get("DW"),defaultWidth="number"==typeof dw?Math.ceil(dw):1e3,widths=dict.get("W");if(Array.isArray(widths))for(var i=0,ii=widths.length;i{var glyphStream=charProcs.get(key),operatorList=new OperatorList;return type3Evaluator.getOperatorList({stream:glyphStream,task:task,resources:fontResources,operatorList:operatorList}).then(()=>{switch(operatorList.fnArray[0]){case OPS.setCharWidthAndBounds:_assertClassBrand(_TranslatedFont_brand,_this4,_removeType3ColorOperators).call(_this4,operatorList,fontBBoxSize);break;case OPS.setCharWidth:fontBBoxSize||_assertClassBrand(_TranslatedFont_brand,_this4,_guessType3FontBBox).call(_this4,operatorList)}charProcOperatorList[key]=operatorList.getIR();for(var dependency of operatorList.dependencies)type3Dependencies.add(dependency)}).catch(function(reason){warn('Type3 font resource "'.concat(key,'" is not available.'));var dummyOperatorList=new OperatorList;charProcOperatorList[key]=dummyOperatorList.getIR()})})}(key);_classPrivateFieldSet(_type3Loaded,this,loadCharProcsPromise.then(()=>{font.charProcOperatorList=charProcOperatorList,this._bbox&&(font.isCharBBox=!0,font.bbox=this._bbox)}))}return _classPrivateFieldGet(_type3Loaded,this)}}function _removeType3ColorOperators(operatorList){for(var fontBBoxSize=1=OPS.moveTo&&fn<=OPS.endPath,opSpec.variableArgs)numArgsEvaluatorPreprocessor.MAX_INVALID_PATH_OPS)throw new FormatError("Invalid ".concat(opSpec));warn("Skipping ".concat(opSpec)),null!==args&&(args.length=0);continue}}return this.preprocessCommand(fn,args),operation.fn=fn,operation.args=args,!0}if(obj===EOF)return!1;if(null!==obj&&((args=null===args?[]:args).push(obj),33numberToString(c/255)).join(" ")+" ".concat(isFill?"rg":"RG")}function createDefaultAppearance(_ref42){var{fontSize:_ref42,fontName,fontColor}=_ref42;return"/".concat(escapePDFName(fontName)," ").concat(_ref42," Tf ").concat(getPdfColor(fontColor,!0))}class FakeUnicodeFont{constructor(xref,fontFamily){this.xref=xref,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=fontFamily;xref=new OffscreenCanvas(1,1);this.ctxMeasure=xref.getContext("2d",{willReadFrequently:!0}),FakeUnicodeFont._fontNameId||(FakeUnicodeFont._fontNameId=1),this.fontName=Name.get("InvalidPDFjsFont_".concat(fontFamily,"_").concat(FakeUnicodeFont._fontNameId++))}get fontDescriptorRef(){var fontDescriptor;return FakeUnicodeFont._fontDescriptorRef||((fontDescriptor=new Dict(this.xref)).set("Type",Name.get("FontDescriptor")),fontDescriptor.set("FontName",this.fontName),fontDescriptor.set("FontFamily","MyriadPro Regular"),fontDescriptor.set("FontBBox",[0,0,0,0]),fontDescriptor.set("FontStretch",Name.get("Normal")),fontDescriptor.set("FontWeight",400),fontDescriptor.set("ItalicAngle",0),FakeUnicodeFont._fontDescriptorRef=this.xref.getNewPersistentRef(fontDescriptor)),FakeUnicodeFont._fontDescriptorRef}get descendantFontRef(){var char,width,descendantFont=new Dict(this.xref),widths=(descendantFont.set("BaseFont",this.fontName),descendantFont.set("Type",Name.get("Font")),descendantFont.set("Subtype",Name.get("CIDFontType0")),descendantFont.set("CIDToGIDMap",Name.get("Identity")),descendantFont.set("FirstChar",this.firstChar),descendantFont.set("LastChar",this.lastChar),descendantFont.set("FontDescriptor",this.fontDescriptorRef),descendantFont.set("DW",1e3),[]),currentChar=null,currentWidths=null;for([char,width]of[...this.widths.entries()].sort())currentChar?char===currentChar+currentWidths.length?currentWidths.push(width):(widths.push(currentChar,currentWidths),currentChar=char,currentWidths=[width]):(currentChar=char,currentWidths=[width]);currentChar&&widths.push(currentChar,currentWidths),descendantFont.set("W",widths);var cidSystemInfo=new Dict(this.xref);return cidSystemInfo.set("Ordering","Identity"),cidSystemInfo.set("Registry","Adobe"),cidSystemInfo.set("Supplement",0),descendantFont.set("CIDSystemInfo",cidSystemInfo),this.xref.getNewPersistentRef(descendantFont)}get baseFontRef(){var baseFont=new Dict(this.xref);return baseFont.set("BaseFont",this.fontName),baseFont.set("Type",Name.get("Font")),baseFont.set("Subtype",Name.get("Type0")),baseFont.set("Encoding",Name.get("Identity-H")),baseFont.set("DescendantFonts",[this.descendantFontRef]),baseFont.set("ToUnicode",Name.get("Identity-H")),this.xref.getNewPersistentRef(baseFont)}get resources(){var resources=new Dict(this.xref),font=new Dict(this.xref);return font.set(this.fontName.name,this.baseFontRef),resources.set("Font",font),resources}_createContext(){return this.widths=new Map,this.ctxMeasure.font="1000px ".concat(this.fontFamily),this.ctxMeasure}createFontResources(text){var line,ctx=this._createContext();for(line of text.split(/\r\n?|\n/))for(var char of line.split("")){var code=char.charCodeAt(0);this.widths.has(code)||(char=ctx.measureText(char),char=Math.ceil(char.width),this.widths.set(code,char),this.firstChar=Math.min(code,this.firstChar),this.lastChar=Math.max(code,this.lastChar))}return this.resources}static getFirstPositionInfo(rect,rotation,fontSize){var[rect,y1,x2,y2]=rect,x2=x2-rect,rect=y2-y1,y2=(rotation%180!=0&&([x2,rect]=[rect,x2]),LINE_FACTOR*fontSize);return{coords:[0,rect+LINE_DESCENT_FACTOR*fontSize-y2],bbox:[0,0,x2,rect],matrix:0!==rotation?getRotationMatrix(rotation,rect,y2):void 0}}createAppearance(text,rect,rotation,fontSize,bgColor,strokeAlpha){var line,ctx=this._createContext(),lines=[],maxWidth=-1/0;for(line of text.split(/\r\n?|\n/)){lines.push(line);var code,lineWidth=ctx.measureText(line).width,maxWidth=Math.max(maxWidth,lineWidth);for(code of codePointIter(line)){var char=String.fromCodePoint(code),width=this.widths.get(code);void 0===width&&(char=ctx.measureText(char),width=Math.ceil(char.width),this.widths.set(code,width),this.firstChar=Math.min(code,this.firstChar),this.lastChar=Math.max(code,this.lastChar))}}var[text,rect,x2,y2]=rect,x2=x2-text,text=y2-rect,y2=(rotation%180!=0&&([x2,text]=[text,x2]),1),rect=(x2<(maxWidth*=fontSize/1e3)&&(y2=x2/maxWidth),1),lineHeight=LINE_FACTOR*fontSize,lineDescent=LINE_DESCENT_FACTOR*fontSize,maxHeight=lineHeight*lines.length;text Tj"));buffer.push("ET","Q");lineDescent=buffer.join("\n"),bgColor=new Dict(this.xref),bgColor.set("Subtype",Name.get("Form")),bgColor.set("Type",Name.get("XObject")),bgColor.set("BBox",[0,0,x2,text]),bgColor.set("Length",lineDescent.length),bgColor.set("Resources",fontSize),rotation&&(maxHeight=getRotationMatrix(rotation,x2,text),bgColor.set("Matrix",maxHeight)),strokeAlpha=new StringStream(lineDescent);return strokeAlpha.dict=bgColor,strokeAlpha}}function makeColorComp(n){return Math.floor(255*Math.max(0,Math.min(1,n))).toString(16).padStart(2,"0")}function scaleAndClamp(x){return Math.max(0,Math.min(255,255*x))}class ColorConverters{static CMYK_G(_ref43){var[_ref43,y,m,k]=_ref43;return["G",1-Math.min(1,.3*_ref43+.59*m+.11*y+k)]}static G_CMYK(_ref44){var[_ref44]=_ref44;return["CMYK",0,0,0,1-_ref44]}static G_RGB(_ref45){var[_ref45]=_ref45;return["RGB",_ref45,_ref45,_ref45]}static G_rgb(_ref46){var[_ref46]=_ref46;return[_ref46=scaleAndClamp(_ref46),_ref46,_ref46]}static G_HTML(_ref47){var[_ref47]=_ref47,_ref47=makeColorComp(_ref47);return"#".concat(_ref47).concat(_ref47).concat(_ref47)}static RGB_G(_ref48){var[_ref48,g,b]=_ref48;return["G",.3*_ref48+.59*g+.11*b]}static RGB_rgb(color){return color.map(scaleAndClamp)}static RGB_HTML(color){return"#".concat(color.map(makeColorComp).join(""))}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(_ref49){var[_ref49,y,m,k]=_ref49;return["RGB",1-Math.min(1,_ref49+k),1-Math.min(1,m+k),1-Math.min(1,y+k)]}static CMYK_rgb(_ref50){var[_ref50,y,m,k]=_ref50;return[scaleAndClamp(1-Math.min(1,_ref50+k)),scaleAndClamp(1-Math.min(1,m+k)),scaleAndClamp(1-Math.min(1,y+k))]}static CMYK_HTML(components){components=this.CMYK_RGB(components).slice(1);return this.RGB_HTML(components)}static RGB_CMYK(_ref51){var[_ref51,g,b]=_ref51,_ref51=1-_ref51,g=1-g,b=1-b;return["CMYK",_ref51,g,b,Math.min(_ref51,g,b)]}}var DateFormats=["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"],TimeFormats=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];class NameOrNumberTree{constructor(root,xref,type){this.root=root,this.xref=xref,this._type=type}getAll(){var map=new Map;if(this.root)for(var xref=this.xref,processed=new RefSet,queue=(processed.put(this.root),[this.root]);0>1,kid=xref.fetchIfRef(kids[m]),limits=kid.get("Limits");if(keyxref.fetchIfRef(limits[1]))){kidsOrEntries=kid;break}l=1+m}}if(r>1,tmp=tmp+(1&tmp),currentKey=xref.fetchIfRef(entries[tmp]);if(key{if("#x"===entity.substring(0,2))return String.fromCodePoint(parseInt(entity.substring(2),16));if("#"===entity.substring(0,1))return String.fromCodePoint(parseInt(entity.substring(1),10));switch(entity){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(entity)})}_parseContent(s,start){var attributes=[],pos=start;function skipWs(){for(;pos"!==s[pos]&&"/"!==s[pos];)++pos;var name=s.substring(start,pos);for(skipWs();pos"!==s[pos]&&"/"!==s[pos]&&"?"!==s[pos];){skipWs();for(var attrValue,attrName="";pos"!==s[pos]&&"?"!==s[pos]&&"/"!==s[pos];)++pos;for(var name=s.substring(start,pos);pos"!==s[pos+1]);)++pos;return{name:name,value:s.substring(attrStart,pos),parsed:pos-start}}parseXml(s){for(var i=0;i",j))<0)return void this.onError(XMLParserErrorCode.UnterminatedElement);this.onEndElement(s.substring(j,q)),j=q+1;break;case"?":++j;var pi=this._parseProcessingInstruction(s,j);if("?>"!==s.substring(j+pi.parsed,j+pi.parsed+2))return void this.onError(XMLParserErrorCode.UnterminatedXmlDeclaration);this.onPi(pi.name,pi.value),j+=pi.parsed+2;break;case"!":if("--"===s.substring(j+1,j+3)){if((q=s.indexOf("--\x3e",j+3))<0)return void this.onError(XMLParserErrorCode.UnterminatedComment);this.onComment(s.substring(j+3,q)),j=q+3}else if("[CDATA["===s.substring(j+1,j+8)){if((q=s.indexOf("]]>",j+8))<0)return void this.onError(XMLParserErrorCode.UnterminatedCdat);this.onCdata(s.substring(j+8,q)),j=q+3}else{if("DOCTYPE"!==s.substring(j+1,j+8))return void this.onError(XMLParserErrorCode.MalformedElement);var pi=s.indexOf("[",j+8),complexDoctype=!1;if((q=s.indexOf(">",j+8))<0)return void this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration);if(0",j+8))<0)return void this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration);complexDoctype=!0}var doctypeContent=s.substring(j+8,q+(complexDoctype?1:0));this.onDoctype(doctypeContent),j=q+(complexDoctype?2:1)}break;default:doctypeContent=this._parseContent(s,j);if(null===doctypeContent)return void this.onError(XMLParserErrorCode.MalformedElement);complexDoctype=!1;if("/>"===s.substring(j+doctypeContent.parsed,j+doctypeContent.parsed+2))complexDoctype=!0;else if(">"!==s.substring(j+doctypeContent.parsed,j+doctypeContent.parsed+1))return void this.onError(XMLParserErrorCode.UnterminatedElement);this.onBeginElement(doctypeContent.name,doctypeContent.attributes,complexDoctype),j+=doctypeContent.parsed+(complexDoctype?2:1)}}else{for(;jchild.textContent).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){var _this$childNodes2;return 0<(null==(_this$childNodes2=this.childNodes)?void 0:_this$childNodes2.length)}searchNode(paths,pos){if(pos>=paths.length)return this;var component=paths[pos];if(component.name.startsWith("#")&&pos");for(var child of this.childNodes)child.dump(buffer);buffer.push(""))}else this.nodeValue?buffer.push(">".concat(encodeToXmlString(this.nodeValue),"")):buffer.push("/>")}}}class SimpleXMLParser extends XMLParserBase{constructor(_ref52){var{hasAttributes:_ref52=!1,lowerCaseName=!1}=_ref52;super(),this._currentFragment=null,this._stack=null,this._errorCode=XMLParserErrorCode.NoError,this._hasAttributes=_ref52,this._lowerCaseName=lowerCaseName}parseFromString(data){if(this._currentFragment=[],this._stack=[],this._errorCode=XMLParserErrorCode.NoError,this.parseXml(data),this._errorCode===XMLParserErrorCode.NoError){var[data]=this._currentFragment;if(data)return{documentElement:data}}}onText(text){isWhitespaceString(text)||(text=new SimpleDOMNode("#text",text),this._currentFragment.push(text))}onCdata(text){text=new SimpleDOMNode("#text",text);this._currentFragment.push(text)}onBeginElement(name,attributes,isEmpty){this._lowerCaseName&&(name=name.toLowerCase());name=new SimpleDOMNode(name);name.childNodes=[],this._hasAttributes&&(name.attributes=attributes),this._currentFragment.push(name),isEmpty||(this._stack.push(this._currentFragment),this._currentFragment=name.childNodes)}onEndElement(name){this._currentFragment=this._stack.pop()||[];var childNode,lastElement=this._currentFragment.at(-1);if(!lastElement)return null;for(childNode of lastElement.childNodes)childNode.parentNode=lastElement;return lastElement}onError(code){this._errorCode=code}}class MetadataParser{constructor(data){data=this._repair(data);var xmlDocument=new SimpleXMLParser({lowerCaseName:!0}).parseFromString(data);this._metadataMap=new Map,this._data=data,xmlDocument&&this._parse(xmlDocument)}_repair(data){return data.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,function(all,codes){for(var bytes=codes.replaceAll(/\\([0-3])([0-7])([0-7])/g,function(code,d1,d2,d3){return String.fromCharCode(64*d1+8*d2+ +d3)}).replaceAll(/&(amp|apos|gt|lt|quot);/g,function(str,name){switch(name){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(name," isn't defined."))}),charBuf=[">"],i=0,ii=bytes.length;i"rdf:li"===node.nodeName)}_parseArray(entry){var seqNode;entry.hasChildNodes()&&([seqNode]=entry.childNodes,seqNode=this._getSequence(seqNode)||[],this._metadataMap.set(entry.nodeName,seqNode.map(node=>node.textContent.trim())))}_parse(xmlDocument){var rdf=xmlDocument.documentElement;if("rdf:rdf"!==rdf.nodeName)for(rdf=rdf.firstChild;rdf&&"rdf:rdf"!==rdf.nodeName;)rdf=rdf.nextSibling;if(rdf&&"rdf:rdf"===rdf.nodeName&&rdf.hasChildNodes())for(var desc of rdf.childNodes)if("rdf:description"===desc.nodeName)for(var entry of desc.childNodes){var name=entry.nodeName;switch(name){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(entry);continue}this._metadataMap.set(name,entry.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}var MAX_DEPTH=40,StructElementType={PAGE_CONTENT:1,STREAM_CONTENT:2,OBJECT:3,ANNOTATION:4,ELEMENT:5},_StructTreeRoot_brand=new WeakSet;class StructTreeRoot{constructor(xref,rootDict,rootRef){_classPrivateMethodInitSpec(this,_StructTreeRoot_brand),this.xref=xref,this.dict=rootDict,this.ref=rootRef instanceof Ref?rootRef:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}addAnnotationIdToPage(pageRef,id){_assertClassBrand(_StructTreeRoot_brand,this,_addIdToPage).call(this,pageRef,id,StructElementType.ANNOTATION)}readRoleMap(){var roleMapDict=this.dict.get("RoleMap");if(roleMapDict instanceof Dict)for(var[key,value]of roleMapDict)value instanceof Name&&this.roleMap.set(key,value.name)}static async canCreateStructureTree(_ref53){var{catalogRef:_ref53,pdfManager,newAnnotationsByPage}=_ref53;if(!(_ref53 instanceof Ref))return warn("Cannot save the struct tree: no catalog reference."),!1;var pageIndex,elements,nextKey=0,hasNothingToUpdate=!0;for([pageIndex,elements]of newAnnotationsByPage){var element,_element$accessibilit,pageRef=(await pdfManager.getPage(pageIndex))["ref"];if(!(pageRef instanceof Ref)){warn("Cannot save the struct tree: page ".concat(pageIndex," has no ref.")),hasNothingToUpdate=!0;break}for(element of elements)null!=(_element$accessibilit=element.accessibilityData)&&_element$accessibilit.type&&(element.parentTreeId=nextKey++,hasNothingToUpdate=!1)}if(hasNothingToUpdate){for(var _elements of newAnnotationsByPage.values())for(var _element of _elements)delete _element.parentTreeId;return!1}return!0}static async createStructureTree(_ref54){var ref,obj,{newAnnotationsByPage:_ref54,xref,catalogRef,pdfManager,changes}=_ref54,root=await pdfManager.ensureCatalog("cloneDict"),cache=new RefSetCache,catalogRef=(cache.put(catalogRef,root),xref.getNewTemporaryRef()),root=(root.set("StructTreeRoot",catalogRef),new Dict(xref)),parentTreeRef=(root.set("Type",Name.get("StructTreeRoot")),xref.getNewTemporaryRef()),kids=(root.set("ParentTree",parentTreeRef),[]),parentTree=(root.set("K",kids),cache.put(catalogRef,root),new Dict(xref)),nums=[],_ref54=(parentTree.set("Nums",nums),await _assertClassBrand(StructTreeRoot,this,_writeKids).call(this,{newAnnotationsByPage:_ref54,structTreeRootRef:catalogRef,structTreeRoot:null,kids:kids,nums:nums,xref:xref,pdfManager:pdfManager,changes:changes,cache:cache}));root.set("ParentTreeNextKey",_ref54),cache.put(parentTreeRef,parentTree);for([ref,obj]of cache.items())changes.put(ref,{data:obj})}async canUpdateStructTree(_ref55){var{pdfManager,newAnnotationsByPage:_ref55}=_ref55;if(!this.ref)return warn("Cannot update the struct tree: no root reference."),!1;var nextKey=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(nextKey)||nextKey<0)return warn("Cannot update the struct tree: invalid next key."),!1;var parentTree=this.dict.get("ParentTree");if(!(parentTree instanceof Dict))return warn("Cannot update the struct tree: ParentTree isn't a dict."),!1;var nums=parentTree.get("Nums");if(!Array.isArray(nums))return warn("Cannot update the struct tree: nums isn't an array."),!1;var pageIndex,numberTree=new NumberTree(parentTree,this.xref);for(pageIndex of _ref55.keys()){var pageDict=(await pdfManager.getPage(pageIndex))["pageDict"];if(pageDict.has("StructParents")){pageDict=pageDict.get("StructParents");if(!Number.isInteger(pageDict)||!Array.isArray(numberTree.get(pageDict)))return warn("Cannot save the struct tree: page ".concat(pageIndex," has a wrong id.")),!1}}var _pageIndex,elements,hasNothingToUpdate=!0;for([_pageIndex,elements]of _ref55){var element,_element$accessibilit2,_pageDict=(await pdfManager.getPage(_pageIndex))["pageDict"];_collectParents.call(StructTreeRoot,{elements:elements,xref:this.xref,pageDict:_pageDict,numberTree:numberTree});for(element of elements)null!=(_element$accessibilit2=element.accessibilityData)&&_element$accessibilit2.type&&(0<=element.accessibilityData.structParent||(element.parentTreeId=nextKey++),hasNothingToUpdate=!1)}if(hasNothingToUpdate){for(var _elements2 of _ref55.values())for(var _element2 of _elements2)delete _element2.parentTreeId,delete _element2.structTreeParent;return!1}return!0}async updateStructureTree(_ref56){var{newAnnotationsByPage:_ref56,pdfManager,changes}=_ref56,{ref:structTreeRootRef,xref}=this,structTreeRoot=this.dict.clone(),cache=new RefSetCache,parentTreeRef=(cache.put(structTreeRootRef,structTreeRoot),structTreeRoot.getRaw("ParentTree")),parentTreeRef=(parentTreeRef instanceof Ref?parentTree=xref.fetch(parentTreeRef):(parentTree=parentTreeRef,parentTreeRef=xref.getNewTemporaryRef(),structTreeRoot.set("ParentTree",parentTreeRef)),parentTree=parentTree.clone(),cache.put(parentTreeRef,parentTree),parentTree.getRaw("Nums")),numsRef=null,parentTree=(parentTreeRef instanceof Ref&&(numsRef=parentTreeRef,parentTreeRef=xref.fetch(numsRef)),parentTreeRef=parentTreeRef.slice(),numsRef||parentTree.set("Nums",parentTreeRef),await _writeKids.call(StructTreeRoot,{newAnnotationsByPage:_ref56,structTreeRootRef:structTreeRootRef,structTreeRoot:this,kids:null,nums:parentTreeRef,xref:xref,pdfManager:pdfManager,changes:changes,cache:cache}));if(-1!==parentTree){structTreeRoot.set("ParentTreeNextKey",parentTree),numsRef&&cache.put(numsRef,parentTreeRef);for(var[ref,obj]of cache.items())changes.put(ref,{data:obj})}}}function _addIdToPage(pageRef,id,type){var ids;pageRef instanceof Ref&&!(id<0)&&(this.structParentIds||(this.structParentIds=new RefSetCache),(ids=this.structParentIds.get(pageRef))||this.structParentIds.put(pageRef,ids=[]),ids.push([id,type]))}async function _writeKids(_ref93){var structTreePageObjs,pageIndex,elements,{newAnnotationsByPage:_ref93,structTreeRootRef,structTreeRoot,kids,nums,xref,pdfManager,changes,cache}=_ref93,objr=Name.get("OBJR"),nextKey=-1;for([pageIndex,elements]of _ref93){var accessibilityData,ref,parentTreeId,structTreeParent,page=await pdfManager.getPage(pageIndex),pageRef=page["ref"],isPageRef=pageRef instanceof Ref;for({accessibilityData,ref,parentTreeId,structTreeParent}of elements)if(null!=accessibilityData&&accessibilityData.type){var structParent=accessibilityData["structParent"];if(structTreeRoot&&Number.isInteger(structParent)&&0<=structParent){var objs=(structTreePageObjs=structTreePageObjs||new Map).get(pageIndex),objs=(void 0===objs&&(objs=new StructTreePage(structTreeRoot,page.pageDict).collectObjects(pageRef),structTreePageObjs.set(pageIndex,objs)),null==objs?void 0:objs.get(structParent));if(objs){structParent=xref.fetch(objs).clone();_writeProperties.call(_StructTreeRoot,structParent,accessibilityData),changes.put(objs,{data:structParent});continue}}var nextKey=Math.max(nextKey,parentTreeId),objs=xref.getNewTemporaryRef(),structParent=new Dict(xref),objDict=(_writeProperties.call(_StructTreeRoot,structParent,accessibilityData),await _assertClassBrand(_StructTreeRoot,this,_updateParentTag).call(this,{structTreeParent:structTreeParent,tagDict:structParent,newTagRef:objs,structTreeRootRef:structTreeRootRef,fallbackKids:kids,xref:xref,cache:cache}),new Dict(xref));structParent.set("K",objDict),objDict.set("Type",objr),isPageRef&&objDict.set("Pg",pageRef),objDict.set("Obj",ref),cache.put(objs,structParent),nums.push(parentTreeId,objs)}}return nextKey+1}function _writeProperties(tagDict,_ref94){var{type:_ref94,title,lang,alt,expanded,actualText}=_ref94;tagDict.set("S",Name.get(_ref94)),title&&tagDict.set("T",stringToAsciiOrUTF16BE(title)),lang&&tagDict.set("Lang",stringToAsciiOrUTF16BE(lang)),alt&&tagDict.set("Alt",stringToAsciiOrUTF16BE(alt)),expanded&&tagDict.set("E",stringToAsciiOrUTF16BE(expanded)),actualText&&tagDict.set("ActualText",stringToAsciiOrUTF16BE(actualText))}function _collectParents(_ref95){var element,_id,elems,{elements:_ref95,xref,pageDict,numberTree}=_ref95,idToElements=new Map;for(element of _ref95)element.structTreeParentId&&(_id=parseInt(element.structTreeParentId.split("_mc")[1],10),(elems=idToElements.get(_id))||idToElements.set(_id,elems=[]),elems.push(element));_ref95=pageDict.get("StructParents");if(Number.isInteger(_ref95)){var kidRef,updateElement=(kid,pageKid,kidRef)=>{kid=idToElements.get(kid);if(kid){var parentRef=pageKid.getRaw("P"),parentDict=xref.fetchIfRef(parentRef);if(parentRef instanceof Ref&&parentDict instanceof Dict){var _element4,params={ref:kidRef,dict:pageKid};for(_element4 of kid)_element4.structTreeParent=params}return!0}return!1};for(kidRef of numberTree.get(_ref95))if(kidRef instanceof Ref){var pageKid=xref.fetch(kidRef),k=pageKid.get("K");if(Number.isInteger(k))updateElement(k,pageKid,kidRef);else if(Array.isArray(k))for(var kid of k){if(kid=xref.fetchIfRef(kid),Number.isInteger(kid)&&updateElement(kid,pageKid,kidRef))break;if(kid instanceof Dict){if(!isName(kid.get("Type"),"MCR"))break;kid=kid.get("MCID");if(Number.isInteger(kid)&&updateElement(kid,pageKid,kidRef))break}}}}}async function _updateParentTag(_ref96){var{structTreeParent:_ref96,tagDict,newTagRef,structTreeRootRef,fallbackKids,xref,cache}=_ref96,ref=null,_ref96=_ref96&&(ref=_ref96["ref"],_ref96.dict.getRaw("P"))||structTreeRootRef,structTreeRootRef=(tagDict.set("P",_ref96),xref.fetchIfRef(_ref96));structTreeRootRef?((tagDict=cache.get(_ref96))||(tagDict=structTreeRootRef.clone(),cache.put(_ref96,tagDict)),(_ref96=(structTreeRootRef=tagDict.getRaw("K"))instanceof Ref?cache.get(structTreeRootRef):null)||(_ref96=xref.fetchIfRef(structTreeRootRef),_ref96=Array.isArray(_ref96)?_ref96.slice():[structTreeRootRef],structTreeRootRef=xref.getNewTemporaryRef(),tagDict.set("K",structTreeRootRef),cache.put(structTreeRootRef,_ref96)),xref=_ref96.indexOf(ref),_ref96.splice(0<=xref?xref+1:_ref96.length,0,newTagRef)):fallbackKids.push(newTagRef)}_StructTreeRoot=StructTreeRoot;class StructElementNode{constructor(tree,dict){this.tree=tree,this.xref=tree.xref,this.dict=dict,this.kids=[],this.parseKids()}get role(){var nameObj=this.dict.get("S"),nameObj=nameObj instanceof Name?nameObj.name:"",root=this.tree["root"];return null!=(root=root.roleMap.get(nameObj))?root:nameObj}parseKids(){var pageObjId=null,objRef=this.dict.getRaw("Pg"),objRef=(objRef instanceof Ref&&(pageObjId=objRef.toString()),this.dict.get("K"));if(Array.isArray(objRef))for(var kid of objRef){kid=this.parseKid(pageObjId,this.xref.fetchIfRef(kid));kid&&this.kids.push(kid)}else{objRef=this.parseKid(pageObjId,objRef);objRef&&this.kids.push(objRef)}}parseKid(pageObjId,kid){var pageRef,kidRef;return Number.isInteger(kid)?this.tree.pageDict.objId!==pageObjId?null:new StructElement({type:StructElementType.PAGE_CONTENT,mcid:kid,pageObjId:pageObjId}):kid instanceof Dict?((pageRef=kid.getRaw("Pg"))instanceof Ref&&(pageObjId=pageRef.toString()),"MCR"===(pageRef=kid.get("Type")instanceof Name?kid.get("Type").name:null)?this.tree.pageDict.objId!==pageObjId?null:(kidRef=kid.getRaw("Stm"),new StructElement({type:StructElementType.STREAM_CONTENT,refObjId:kidRef instanceof Ref?kidRef.toString():null,pageObjId:pageObjId,mcid:kid.get("MCID")})):"OBJR"===pageRef?this.tree.pageDict.objId!==pageObjId?null:(kidRef=kid.getRaw("Obj"),new StructElement({type:StructElementType.OBJECT,refObjId:kidRef instanceof Ref?kidRef.toString():null,pageObjId:pageObjId})):new StructElement({type:StructElementType.ELEMENT,dict:kid})):null}}class StructElement{constructor(_ref57){var{type:_ref57,dict=null,mcid=null,pageObjId=null,refObjId=null}=_ref57;this.type=_ref57,this.dict=dict,this.mcid=mcid,this.pageObjId=pageObjId,this.refObjId=refObjId,this.parentNode=null}}class StructTreePage{constructor(structTreeRoot,pageDict){var _structTreeRoot$xref;this.root=structTreeRoot,this.xref=null!=(_structTreeRoot$xref=null==structTreeRoot?void 0:structTreeRoot.xref)?_structTreeRoot$xref:null,this.rootDict=null!=(_structTreeRoot$xref=null==structTreeRoot?void 0:structTreeRoot.dict)?_structTreeRoot$xref:null,this.pageDict=pageDict,this.nodes=[]}collectObjects(pageRef){if(!(this.root&&this.rootDict&&pageRef instanceof Ref))return null;var parentTree=this.rootDict.get("ParentTree");if(!parentTree)return null;var _this$root$structPare=null==(_this$root$structPare=this.root.structParentIds)?void 0:_this$root$structPare.get(pageRef);if(!_this$root$structPare)return null;var elemId,map=new Map,numberTree=new NumberTree(parentTree,this.xref);for([elemId]of _this$root$structPare){var obj=numberTree.getRaw(elemId);obj instanceof Ref&&map.set(elemId,obj)}return map}parse(pageRef){if(this.root&&this.rootDict&&pageRef instanceof Ref){var parentTree=this.rootDict.get("ParentTree");if(parentTree){var id=this.pageDict.get("StructParents"),_this$root$structPare2=null==(_this$root$structPare2=this.root.structParentIds)?void 0:_this$root$structPare2.get(pageRef);if(Number.isInteger(id)||_this$root$structPare2){var map=new Map,numberTree=new NumberTree(parentTree,this.xref);if(Number.isInteger(id)){pageRef=numberTree.get(id);if(Array.isArray(pageRef))for(var ref of pageRef)ref instanceof Ref&&this.addNode(this.xref.fetch(ref),map)}if(_this$root$structPare2)for(var[elemId,type]of _this$root$structPare2){var _elem$kids,elemId=numberTree.get(elemId);elemId&&1===(null==(elemId=this.addNode(this.xref.fetchIfRef(elemId),map))||null==(_elem$kids=elemId.kids)?void 0:_elem$kids.length)&&elemId.kids[0].type===StructElementType.OBJECT&&(elemId.kids[0].type=type)}}}}}addNode(dict,map){var level=2v instanceof Ref,isValidExplicitDest=_isValidExplicitDest.bind(null,isRef,isName);function fetchDest(dest){return dest instanceof Dict&&(dest=dest.get("D")),isValidExplicitDest(dest)?dest:null}function fetchRemoteDest(action){action=action.get("D");if(action){if("string"==typeof(action=action instanceof Name?action.name:action))return stringToPDFString(action,!0);if(isValidExplicitDest(action))return JSON.stringify(action)}return null}var _actualNumPages=new WeakMap,_catDict=new WeakMap,_Catalog_brand=new WeakSet;class Catalog{constructor(pdfManager,_xref){if(_classPrivateMethodInitSpec(this,_Catalog_brand),_classPrivateFieldInitSpec(this,_actualNumPages,null),_classPrivateFieldInitSpec(this,_catDict,null),_defineProperty(this,"builtInCMapCache",new Map),_defineProperty(this,"fontCache",new RefSetCache),_defineProperty(this,"globalColorSpaceCache",new GlobalColorSpaceCache),_defineProperty(this,"globalImageCache",new GlobalImageCache),_defineProperty(this,"nonBlendModesSet",new RefSet),_defineProperty(this,"pageDictCache",new RefSetCache),_defineProperty(this,"pageIndexCache",new RefSetCache),_defineProperty(this,"pageKidsCountCache",new RefSetCache),_defineProperty(this,"standardFontDataCache",new Map),_defineProperty(this,"systemFontCache",new Map),this.pdfManager=pdfManager,this.xref=_xref,_classPrivateFieldSet(_catDict,this,_xref.getCatalogObj()),!(_classPrivateFieldGet(_catDict,this)instanceof Dict))throw new FormatError("Catalog object is not a dictionary.");this.toplevelPagesDict}cloneDict(){return _classPrivateFieldGet(_catDict,this).clone()}get version(){var version=_classPrivateFieldGet(_catDict,this).get("Version");if(version instanceof Name){if(PDF_VERSION_REGEXP.test(version.name))return shadow(this,"version",version.name);warn("Invalid PDF catalog version: ".concat(version.name))}return shadow(this,"version",null)}get lang(){var lang=_classPrivateFieldGet(_catDict,this).get("Lang");return shadow(this,"lang",lang&&"string"==typeof lang?stringToPDFString(lang):null)}get needsRendering(){var needsRendering=_classPrivateFieldGet(_catDict,this).get("NeedsRendering");return shadow(this,"needsRendering","boolean"==typeof needsRendering&&needsRendering)}get collection(){var collection=null;try{var obj=_classPrivateFieldGet(_catDict,this).get("Collection");obj instanceof Dict&&0Number.isInteger(page)&&0=arr[i-1])&&page<=this.numPages)&&(prefValue=value);break;case"NumCopies":Number.isInteger(value)&&0=currentNode.length)queue.pop();else{currentNode=currentNode[posInKids],posInKids=void 0;if(currentNode instanceof Ref){if(visitedNodes.has(currentNode)){addPageError(new FormatError("Pages tree contains circular reference."));break}visitedNodes.put(currentNode);try{posInKids=await xref.fetchAsync(currentNode)}catch(ex){addPageError(ex);break}}else posInKids=currentNode;if(!(posInKids instanceof Dict)){addPageError(new FormatError("Page dictionary kid reference points to wrong type of object."));break}var type=posInKids.getRaw("Type");if(type instanceof Ref)try{type=await xref.fetchAsync(type)}catch(ex){addPageError(ex);break}isName(type,"Page")||!posInKids.has("Kids")?(type=posInKids,(currentNode=currentNode instanceof Ref?currentNode:null)&&!pageIndexCache.has(currentNode)&&pageIndexCache.put(currentNode,pageIndex),map.set(pageIndex++,[type,currentNode])):queue.push({currentNode:posInKids,posInKids:0}),queueItem.posInKids++}}return map}getPageIndex(pageRef){var xref,total,next,cachedPageIndex=this.pageIndexCache.get(pageRef);return void 0!==cachedPageIndex?Promise.resolve(cachedPageIndex):(xref=this.xref,total=0,(next=ref=>function(kidRef){var parentRef,total=0;return xref.fetchAsync(kidRef).then(function(node){if(isRefsEqual(kidRef,pageRef)&&!isDict(node,"Page")&&!(node instanceof Dict&&!node.has("Type")&&node.has("Contents")))throw new FormatError("The reference does not point to a /Page dictionary.");if(!node)return null;if(node instanceof Dict)return parentRef=node.getRaw("Parent"),node.getAsync("Parent");throw new FormatError("Node must be a dictionary.")}).then(function(parent){if(!parent)return null;if(parent instanceof Dict)return parent.getAsync("Kids");throw new FormatError("Parent must be a dictionary.")}).then(function(kids){if(!kids)return null;var kid,kidPromises=[],found=!1;for(kid of kids){if(!(kid instanceof Ref))throw new FormatError("Kid must be a reference.");if(isRefsEqual(kid,kidRef)){found=!0;break}kidPromises.push(xref.fetchAsync(kid).then(function(obj){if(!(obj instanceof Dict))throw new FormatError("Kid node must be a dictionary.");obj.has("Count")?total+=obj.get("Count"):total++}))}if(found)return Promise.all(kidPromises).then(()=>[total,parentRef]);throw new FormatError("Kid reference not found in parent's kids.")})}(ref).then(args=>{var parentRef;return args?([args,parentRef]=args,total+=args,next(parentRef)):(this.pageIndexCache.put(pageRef,total),total)}))(pageRef))}get baseUrl(){var uri=_classPrivateFieldGet(_catDict,this).get("URI");if(uri instanceof Dict){uri=uri.get("Base");if("string"==typeof uri){uri=createValidAbsoluteUrl(uri,null,{tryConvertEncoding:!0});if(uri)return shadow(this,"baseUrl",uri.href)}}return shadow(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary(_ref58){var{destDict:_ref58,resultObj,docBaseUrl=null,docAttachments=null}=_ref58;if(_ref58 instanceof Dict){var dest,action=_ref58.get("A");if(action instanceof Dict||(_ref58.has("Dest")?action=_ref58.get("Dest"):(action=_ref58.get("AA"))instanceof Dict&&(action.has("D")?action=action.get("D"):action.has("U")&&(action=action.get("U")))),action instanceof Dict){var actionType=action.get("S");if(!(actionType instanceof Name))return void warn("parseDestDictionary: Invalid type in Action dictionary.");var actionName=actionType.name;switch(actionName){case"ResetForm":var obj,flags=action.get("Flags"),flags=0==(1&("number"==typeof flags?flags:0)),fields=[],refs=[];for(obj of action.get("Fields")||[])obj instanceof Ref?refs.push(obj.toString()):"string"==typeof obj&&fields.push(stringToPDFString(obj));resultObj.resetForm={fields:fields,refs:refs,include:flags};break;case"URI":(url=action.get("URI"))instanceof Name&&(url="/"+url.name);break;case"GoTo":dest=action.get("D");break;case"Launch":case"GoToR":var url,flags=action.get("F"),rawFilename=(flags instanceof Dict?(rawFilename=new FileSpec(flags,null,!0).serializable["rawFilename"],url=rawFilename):"string"==typeof flags&&(url=flags),fetchRemoteDest(action)),flags=(rawFilename&&"string"==typeof url&&(url=url.split("#",1)[0]+"#"+rawFilename),action.get("NewWindow"));"boolean"==typeof flags&&(resultObj.newWindow=flags);break;case"GoToE":var attachment,rawFilename=action.get("T");(attachment=docAttachments&&rawFilename instanceof Dict&&(flags=rawFilename.get("R"),rawFilename=rawFilename.get("N"),isName(flags,"C"))&&"string"==typeof rawFilename?docAttachments[stringToPDFString(rawFilename,!0)]:attachment)?(resultObj.attachment=attachment,(flags=fetchRemoteDest(action))&&(resultObj.attachmentDest=flags)):warn('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":rawFilename=action.get("N");rawFilename instanceof Name&&(resultObj.action=rawFilename.name);break;case"SetOCGState":flags=action.get("State"),rawFilename=action.get("PreserveRB");if(Array.isArray(flags)&&0!==flags.length){var elem,stateArr=[];for(elem of flags)if(elem instanceof Name)switch(elem.name){case"ON":case"OFF":case"Toggle":stateArr.push(elem.name)}else elem instanceof Ref&&stateArr.push(elem.toString());stateArr.length===flags.length&&(resultObj.setOCGState={state:stateArr,preserveRB:"boolean"!=typeof rawFilename||rawFilename})}break;case"JavaScript":var js,flags=action.get("JS"),rawFilename=(flags instanceof BaseStream?js=flags.getString():"string"==typeof flags&&(js=flags),js&&recoverJsURL(stringToPDFString(js,!0)));if(rawFilename){url=rawFilename.url,resultObj.newWindow=rawFilename.newWindow;break}default:"JavaScript"!==actionName&&"SubmitForm"!==actionName&&warn('parseDestDictionary - unsupported action: "'.concat(actionName,'".'))}}else _ref58.has("Dest")&&(dest=_ref58.get("Dest"));"string"==typeof url&&((actionType=createValidAbsoluteUrl(url,docBaseUrl,{addDefaultProtocol:!0,tryConvertEncoding:!0}))&&(resultObj.url=actionType.href),resultObj.unsafeUrl=url),dest&&("string"==typeof(dest=dest instanceof Name?dest.name:dest)?resultObj.dest=stringToPDFString(dest,!0):isValidExplicitDest(dest)&&(resultObj.dest=dest))}else warn("parseDestDictionary: `destDict` must be a dictionary.")}}function _readMarkInfo(){var obj=_classPrivateFieldGet(_catDict,this).get("MarkInfo");if(!(obj instanceof Dict))return null;var key,markInfo={Marked:!1,UserProperties:!1,Suspects:!1};for(key in markInfo){var value=obj.get(key);"boolean"==typeof value&&(markInfo[key]=value)}return markInfo}function _readStructTreeRoot(){var rawObj=_classPrivateFieldGet(_catDict,this).getRaw("StructTreeRoot"),obj=this.xref.fetchIfRef(rawObj);return obj instanceof Dict?((obj=new StructTreeRoot(this.xref,obj,rawObj)).init(),obj):null}function _readDocumentOutline(){var obj=_classPrivateFieldGet(_catDict,this).get("Outlines");if(!(obj instanceof Dict))return null;if(!((obj=obj.getRaw("First"))instanceof Ref))return null;for(var root={items:[]},queue=[{obj:obj,parent:root}],processed=new RefSet,xref=(processed.put(obj),this.xref),blackColor=new Uint8ClampedArray(3);0i instanceof Name)&&(groupRef.intent=name.map(i=>i.name)),group.get("Usage"));if(name instanceof Dict){var usageObj=groupRef.usage,group=name.get("Print");if(group instanceof Dict){var printState=group.get("PrintState");if(printState instanceof Name)switch(printState.name){case"ON":case"OFF":usageObj.print={printState:printState.name}}}group=name.get("View");if(group instanceof Dict){var viewState=group.get("ViewState");if(viewState instanceof Name)switch(viewState.name){case"ON":case"OFF":usageObj.view={viewState:viewState.name}}}}return groupRef}function _readOptionalContentConfig(config,groupRefCache){function parseOnOff(refs){var onParsed=[];if(Array.isArray(refs))for(var value of refs)value instanceof Ref&&groupRefCache.has(value)&&onParsed.push(value.toString());return onParsed}function parseOrder(refs,argument_1){var nestedLevels=1MAX_NESTED_LEVELS)return warn("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;ref=xref.fetchIfRef(ref);if(!Array.isArray(ref))return null;var nestedName=xref.fetchIfRef(ref[0]);if("string"!=typeof nestedName)return null;ref=parseOrder(ref.slice(1),nestedLevels);return null!=ref&&ref.length?{name:stringToPDFString(nestedName),order:ref}:null}(value,nestedLevels))&&order.push(nestedOrder);if(!(0ns.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:ns=>ns.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:ns=>ns.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:ns=>ns.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:ns=>ns.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:ns=>"http://ns.adobe.com/xdp/pdf/"===ns},signature:{id:6,check:ns=>"http://www.w3.org/2000/09/xmldsig#"===ns},sourceSet:{id:7,check:ns=>ns.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:ns=>"http://www.w3.org/1999/XSL/Transform"===ns},template:{id:9,check:ns=>ns.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:ns=>ns.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:ns=>"http://ns.adobe.com/xdp/"===ns},xfdf:{id:12,check:ns=>"http://ns.adobe.com/xfdf/"===ns},xhtml:{id:13,check:ns=>"http://www.w3.org/1999/xhtml"===ns},xmpmeta:{id:14,check:ns=>"http://ns.adobe.com/xmpmeta/"===ns}},dimConverters={pt:x=>x,cm:x=>x/2.54*72,mm:x=>x/25.4*72,in:x=>72*x,px:x=>x},measurementPattern=/([+-]?\d+\.?\d*)(.*)/;function stripQuotes(str){return str.startsWith("'")||str.startsWith('"')?str.slice(1,-1):str}function getInteger(_ref59){var{data:_ref59,defaultValue,validate}=_ref59;return _ref59&&(_ref59=_ref59.trim(),_ref59=parseInt(_ref59,10),!isNaN(_ref59))&&validate(_ref59)?_ref59:defaultValue}function getFloat(_ref60){var{data:_ref60,defaultValue,validate}=_ref60;return _ref60&&(_ref60=_ref60.trim(),_ref60=parseFloat(_ref60),!isNaN(_ref60))&&validate(_ref60)?_ref60:defaultValue}function getKeyword(_ref61){var{data:_ref61,defaultValue,validate}=_ref61;return _ref61&&validate(_ref61=_ref61.trim())?_ref61:defaultValue}function getStringOption(data,options){return getKeyword({data:data,defaultValue:options[0],validate:k=>options.includes(k)})}function getMeasurement(str){var match,unit,def=(def=1parseFloat(x.trim())).filter(x=>!isNaN(x))).length&&data.push(1),0===data.length)?{num:1,den:1}:([data,den]=data,{num:data,den:den})}function getRelevant(data){return data?data.trim().split(/\s+/).map(e=>({excluded:"-"===e[0],viewname:e.substring(1)})):[]}function getColor(data){var color,[r,g,b]=1MathClamp(parseInt(c.trim(),10),0,255)).map(c=>isNaN(c)?0:c)).length<3||([r,g,b]=color),{r:r,g:g,b:b}}function getBBox(data){var y,width,height;return!data||(data=data.split(",",4).map(m=>getMeasurement(m.trim(),"-1"))).length<4||data[2]<0||data[3]<0?{x:-1,y:-1,width:-1,height:-1}:([data,y,width,height]=data,{x:data,y:y,width:width,height:height})}class HTMLResult{static get FAILURE(){return shadow(this,"FAILURE",new HTMLResult(!1,null,null,null))}static get EMPTY(){return shadow(this,"EMPTY",new HTMLResult(!0,null,null,null))}constructor(success,html,bbox,breakNode){this.success=success,this.html=html,this.bbox=bbox,this.breakNode=breakNode}isBreak(){return!!this.breakNode}static breakNode(node){return new HTMLResult(!1,null,null,node)}static success(html){var bbox=1root.datasets?root.datasets.data:root],["$record",(root,current)=>(root.datasets?root.datasets.data:root)[$getChildren]()[0]],["$template",(root,current)=>root.template],["$connectionSet",(root,current)=>root.connectionSet],["$form",(root,current)=>root.form],["$layout",(root,current)=>root.layout],["$host",(root,current)=>root.host],["$dataWindow",(root,current)=>root.dataWindow],["$event",(root,current)=>root.event],["!",(root,current)=>root.datasets],["$xfa",(root,current)=>root],["xfa",(root,current)=>root],["$",(root,current)=>current]]),somCache=new WeakMap;function parseIndex(index){return"*"===(index=index.trim())?1/0:parseInt(index,10)||0}function parseExpression(expr,dotDotAllowed){var noExpr=!(2indexnode[index]):nodes.flat()}())&&_ret2)return _ret2.v;return 0===root.length?null:root}function createDataNode(root,container,expr){var parsed=parseExpression(expr);if(parsed&&!parsed.some(x=>x.operator===operators.dotDot)){var expr=shortcuts.get(parsed[0].name),i=0;expr?(root=expr(root,container),i=1):root=container||root;for(var ii=parsed.length;ic[$text]()).join("")}get[_attributeNames](){var proto=Object.getPrototypeOf(this);if(!proto._attributes){var name,attributes=proto._attributes=new Set;for(name of Object.getOwnPropertyNames(this)){if(null===this[name]||this[name]instanceof XFAObject||this[name]instanceof XFAObjectArray)break;attributes.add(name)}}return shadow(this,_attributeNames,proto._attributes)}[$isDescendent](parent){for(var node=this;node;){if(node===parent)return!0;node=node[$getParent]()}return!1}[$getParent](){return this[_parent]}[$getSubformParent](){return this[$getParent]()}[$getChildren](){var name=0allAttr.has(x)&&!setAttr.has(x))}[$resolvePrototypes](ids){var child,ancestors=1XFAObject[_cloneAttribute](x)):"object"==typeof obj&&null!==obj?Object.assign({},obj):obj}[$clone](){var $symbol,name,value,child,clone=Object.create(Object.getPrototypeOf(this));for($symbol of Object.getOwnPropertySymbols(this))try{clone[$symbol]=this[$symbol]}catch(_unused10){shadow(clone,$symbol,this[$symbol])}clone[$uid]="".concat(clone[$nodeName]).concat(uid++),clone[_children]=[];for(name of Object.getOwnPropertyNames(this))this[_attributeNames].has(name)?clone[name]=XFAObject[_cloneAttribute](this[name]):(value=this[name],clone[name]=value instanceof XFAObjectArray?new XFAObjectArray(value[_max]):null);for(child of this[_children]){var _name2=child[$nodeName],clonedChild=child[$clone]();clone[_children].push(clonedChild),null===(clonedChild[_parent]=clone)[_name2]?clone[_name2]=clonedChild:clone[_name2][_children].push(clonedChild)}return clone}[$getChildren](){var name=0c[$nodeName]===name):this[_children]}[$getChildrenByClass](name){return this[name]}[$getChildrenByName](name,allTransparent){return Array.from(this[$getChildrenByNameIt](name,allTransparent,!(2x[$dump]())}[$clone](){var clone=new XFAObjectArray(this[_max]);return clone[_children]=this[_children].map(c=>c[$clone]()),clone}get children(){return this[_children]}clear(){this[_children].length=0}}class XFAAttribute{constructor(node,name,value){this[_parent]=node,this[$nodeName]=name,this[$content]=value,this[$consumed]=!1,this[$uid]="attribute".concat(uid++)}[$getParent](){return this[_parent]}[$isDataValue](){return!0}[$getDataValue](){return this[$content].trim()}[$setValue](value){value=value.value||"",this[$content]=value.toString()}[$text](){return this[$content]}[$isDescendent](parent){return this[_parent]===parent||this[_parent][$isDescendent](parent)}}class XmlObject extends XFAObject{constructor(nsId,name){var attributes=2"),this[$content])"string"==typeof this[$content]?buf.push(encodeToXmlString(this[$content])):this[$content][$toString](buf);else for(var child of this[_children])child[$toString](buf);buf.push(""))}else buf.push("/>")}}[$onChild](child){var node;return this[$content]&&(node=new XmlObject(this[$namespaceId],"#text"),this[$appendChild](node),node[$content]=this[$content],this[$content]=""),this[$appendChild](child),!0}[$onText](str){this[$content]+=str}[$finalize](){var node;this[$content]&&0c[$nodeName]===name):this[_children]}[$getAttributes](){return this[_attributes]}[$getChildrenByClass](name){var value=this[_attributes].get(name);return void 0!==value?value:this[$getChildren](name)}*[$getChildrenByNameIt](name,allTransparent){var child,value=this[_attributes].get(name);value&&(yield value);for(child of this[_children])child[$nodeName]===name&&(yield child),allTransparent&&(yield*child[$getChildrenByNameIt](name,allTransparent))}*[$getAttributeIt](name,skipConsumed){var child,value=this[_attributes].get(name);!value||skipConsumed&&value[$consumed]||(yield value);for(child of this[_children])yield*child[$getAttributeIt](name,skipConsumed)}*[$getRealChildrenByNameIt](name,allTransparent,skipConsumed){for(var child of this[_children])child[$nodeName]!==name||skipConsumed&&child[$consumed]||(yield child),allTransparent&&(yield*child[$getRealChildrenByNameIt](name,allTransparent,skipConsumed))}[$isDataValue](){return null===this[_dataValue]?0===this[_children].length||this[_children][0][$namespaceId]===NamespaceIds.xhtml.id:this[_dataValue]}[$getDataValue](){return null!==this[_dataValue]||0===this[_children].length?this[$content].trim():this[_children][0][$namespaceId]===NamespaceIds.xhtml.id?this[_children][0][$text]().trim():null}[$setValue](value){value=value.value||"",this[$content]=value.toString()}[$dump](){var child,name,value,hasNS=0this[_options].includes(k)})}[$clean](builder){super[$clean](builder),delete this[_options]}}class StringObject extends ContentObject{[$finalize](){this[$content]=this[$content].trim()}}class IntegerObject extends ContentObject{constructor(nsId,name,defaultValue,validator){super(nsId,name),this[_defaultValue]=defaultValue,this[_validator]=validator}[$finalize](){this[$content]=getInteger({data:this[$content],defaultValue:this[_defaultValue],validate:this[_validator]})}[$clean](builder){super[$clean](builder),delete this[_defaultValue],delete this[_validator]}}class Option01 extends IntegerObject{constructor(nsId,name){super(nsId,name,0,n=>1===n)}}class Option10 extends IntegerObject{constructor(nsId,name){super(nsId,name,1,n=>0===n)}}function measureToString(m){return"string"==typeof m?"0px":Number.isInteger(m)?"".concat(m,"px"):"".concat(m.toFixed(2),"px")}var converters={anchorType(node,style){var parent=node[$getSubformParent]();if(parent&&(!parent.layout||"position"===parent.layout))switch("transform"in style||(style.transform=""),node.anchorType){case"bottomCenter":style.transform+="translate(-50%, -100%)";break;case"bottomLeft":style.transform+="translate(0,-100%)";break;case"bottomRight":style.transform+="translate(-100%,-100%)";break;case"middleCenter":style.transform+="translate(-50%,-50%)";break;case"middleLeft":style.transform+="translate(0,-50%)";break;case"middleRight":style.transform+="translate(-100%,-50%)";break;case"topCenter":style.transform+="translate(-50%,0)";break;case"topRight":style.transform+="translate(-100%,0)"}},dimensions(node,style){var _parent$layout,w,parent=node[$getSubformParent](),width=node.w,height=node.h;null!=(_parent$layout=parent.layout)&&_parent$layout.includes("row")&&(_parent$layout=parent[$extra],-1===(parent=node.colSpan)?(w=Math.sumPrecise(_parent$layout.columnWidths.slice(_parent$layout.currentColumn)),_parent$layout.currentColumn=0):(w=Math.sumPrecise(_parent$layout.columnWidths.slice(_parent$layout.currentColumn,_parent$layout.currentColumn+parent)),_parent$layout.currentColumn=(_parent$layout.currentColumn+node.colSpan)%_parent$layout.columnWidths.length),isNaN(w)||(width=node.w=w)),style.width=""!==width?measureToString(width):"auto",style.height=""!==height?measureToString(height):"auto"},position(node,style){var parent=node[$getSubformParent]();null!=parent&&parent.layout&&"position"!==parent.layout||(style.position="absolute",style.left=measureToString(node.x),style.top=measureToString(node.y))},rotate(node,style){node.rotate&&("transform"in style||(style.transform=""),style.transform+="rotate(-".concat(node.rotate,"deg)"),style.transformOrigin="top left")},presence(node,style){switch(node.presence){case"invisible":style.visibility="hidden";break;case"hidden":case"inactive":style.display="none"}},hAlign(node,style){if("para"===node[$nodeName])switch(node.hAlign){case"justifyAll":style.textAlign="justify-all";break;case"radix":style.textAlign="left";break;default:style.textAlign=node.hAlign}else switch(node.hAlign){case"left":style.alignSelf="start";break;case"center":style.alignSelf="center";break;case"right":style.alignSelf="end"}},margin(node,style){node.margin&&(style.margin=node.margin[$toStyle]().margin)}};function setMinMaxDimensions(node,style){"position"===node[$getSubformParent]().layout&&(0node[$getTemplateRoot]()[$extra].currentContentArea.h;case"rl-row":case"row":return node[$getTemplateRoot]()[$extra].noLayoutFailure?!0:""===node.h||Math.round(h-space.height)<=2;default:return!0}}var TEMPLATE_NS_ID=NamespaceIds.template.id,SVG_NS="http://www.w3.org/2000/svg",MAX_ATTEMPTS_FOR_LRTB_LAYOUT=2,MAX_EMPTY_PAGES=3,DEFAULT_TAB_INDEX=5e3,HEADING_PATTERN=/^H(\d+)$/,MIMES=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"]),IMAGES_HEADERS=[[[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"]];function getBorderDims(node){return node&&node.border&&(node=node.border[$getExtra]())?{w:node.widths[0]+node.widths[2]+node.insets[0]+node.insets[2],h:node.widths[1]+node.widths[3]+node.insets[1]+node.insets[3]}:{w:0,h:0}}function hasMargin(node){return node.margin&&(node.margin.topInset||node.margin.rightInset||node.margin.bottomInset||node.margin.leftInset)}function _setValue(templateNode,value){var nodeValue;templateNode.value||(nodeValue=new Value({}),templateNode[$appendChild](nodeValue),templateNode.value=nodeValue),templateNode.value[$setValue](value)}function*getContainedChildren(node){for(var child of node[$getChildren]())child instanceof SubformSet?yield*child[$getContainedChildren]():yield child}function isRequired(node){return"error"===(null==(node=node.validate)?void 0:node.nullTest)}function setTabIndex(node){for(;node;){if(!node.traversal)return void(node[$tabIndex]=node[$getParent]()[$tabIndex]);if(node[$tabIndex])return;var child,next=null;for(child of node.traversal[$getChildren]())if("next"===child.operation){next=child;break}if(!next||!next.ref)return void(node[$tabIndex]=node[$getParent]()[$tabIndex]);var root=node[$getTemplateRoot](),root=(node[$tabIndex]=++root[$tabIndex],root[$searchNode](next.ref,node));if(!root)return;node=root[0]}}function applyAssist(obj,attributes){var assistTitle,assist=obj.assist;assist&&((assistTitle=assist[$toHTML]())&&(attributes.title=assistTitle),assistTitle=assist.role.match(HEADING_PATTERN))&&(assist=assistTitle[1],attributes.role="heading",attributes["aria-level"]=assist),"table"===obj.layout?attributes.role="table":"row"===obj.layout?attributes.role="row":"row"===(assistTitle=obj[$getParent]()).layout&&(attributes.role="TH"===(null==(assist=assistTitle.assist)?void 0:assist.role)?"columnheader":"cell")}function ariaLabel(obj){return obj.assist?(obj=obj.assist).speak&&""!==obj.speak[$content]?obj.speak[$content]:obj.toolTip?obj.toolTip[$content]:null:null}function valueToHtml(value){return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:value}]})}function setFirstUnsplittable(node){var root=node[$getTemplateRoot]();null===root[$extra].firstUnsplittable&&(root[$extra].firstUnsplittable=node,root[$extra].noLayoutFailure=!0)}function unsetFirstUnsplittable(node){var root=node[$getTemplateRoot]();root[$extra].firstUnsplittable===node&&(root[$extra].noLayoutFailure=!1)}function handleBreak(node){if(node[$extra])return!1;if(node[$extra]=Object.create(null),"auto"===node.targetType)return!1;var root=node[$getTemplateRoot](),target=null;if(node.target){if(!(target=root[$searchNode](node.target,node[$getParent]())))return!1;target=target[0]}var{currentPageArea:root,currentContentArea}=root[$extra];if("pageArea"===node.targetType)return target instanceof PageArea||(target=null),node.startNew?(node[$extra].target=target||root,!0):!(!target||target===root||(node[$extra].target=target,0));var pageArea=(target=target instanceof ContentArea?target:null)&&target[$getParent](),nextPageArea=pageArea;if(node.startNew)var contentAreas,indexForCurrent=target?(indexForCurrent=(contentAreas=pageArea.contentArea.children).indexOf(currentContentArea),contentAreas=contentAreas.indexOf(target),-1!==indexForCurrent&&indexForCurrentnode,root[$extra].noLayoutFailure=!0,extraNode[$toHTML](space));node[$addHTML](space.html,space.bbox),root[$extra].noLayoutFailure=saved,extraNode[$getSubformParent]=savedMethod}class AppearanceFilter extends StringObject{constructor(attributes){super(TEMPLATE_NS_ID,"appearanceFilter"),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Arc extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"arc",!0),this.circular=getInteger({data:attributes.circular,defaultValue:0,validate:x=>1===x}),this.hand=getStringOption(attributes.hand,["even","left","right"]),this.id=attributes.id||"",this.startAngle=getFloat({data:attributes.startAngle,defaultValue:0,validate:x=>!0}),this.sweepAngle=getFloat({data:attributes.sweepAngle,defaultValue:360,validate:x=>!0}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.edge=null,this.fill=null}[$toHTML](){var largeArc,x2,y2,arc,edge=this.edge||new Edge({}),edgeStyle=edge[$toStyle](),style=Object.create(null),_this$fill=("visible"===(null==(_this$fill=this.fill)?void 0:_this$fill.presence)?Object.assign(style,this.fill[$toStyle]()):style.fill="transparent",style.strokeWidth=measureToString("visible"===edge.presence?edge.thickness:0),style.stroke=edgeStyle.color,{xmlns:SVG_NS,style:{width:"100%",height:"100%",overflow:"visible"}}),edge=(360===this.sweepAngle?arc={name:"ellipse",attributes:{xmlns:SVG_NS,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:style}}:(edge=this.startAngle*Math.PI/180,edgeStyle=this.sweepAngle*Math.PI/180,largeArc=1801<=n||-1===n}),this.id=attributes.id||"",this.name=attributes.name||"",this.relevant=getRelevant(attributes.relevant),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.x=getMeasurement(attributes.x,"0pt"),this.y=getMeasurement(attributes.y,"0pt"),this.desc=null,this.extras=null,this.area=new XFAObjectArray,this.draw=new XFAObjectArray,this.exObject=new XFAObjectArray,this.exclGroup=new XFAObjectArray,this.field=new XFAObjectArray,this.subform=new XFAObjectArray,this.subformSet=new XFAObjectArray}*[$getContainedChildren](){yield*getContainedChildren(this)}[$isTransparent](){return!0}[$isBindable](){return!0}[$addHTML](html,bbox){var[bbox,y,w,h]=bbox;this[$extra].width=Math.max(this[$extra].width,bbox+w),this[$extra].height=Math.max(this[$extra].height,y+h),this[$extra].children.push(html)}[$getAvailableSpace](){return this[$extra].availableSpace}[$toHTML](availableSpace){var style=toStyle(this,"position"),attributes={style:style,id:this[$uid],class:["xfaArea"]},children=(isPrintOnly(this)&&attributes.class.push("xfaPrintOnly"),this.name&&(attributes.xfaName=this.name),[]),availableSpace=(this[$extra]={children:children,width:0,height:0,availableSpace:availableSpace},this[$childrenToHTML]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0}));if(!availableSpace.success)return availableSpace.isBreak()?availableSpace:(delete this[$extra],HTMLResult.FAILURE);style.width=measureToString(this[$extra].width),style.height=measureToString(this[$extra].height);availableSpace={name:"div",attributes:attributes,children:children},style=[this.x,this.y,this[$extra].width,this[$extra].height];return delete this[$extra],HTMLResult.success(availableSpace,style)}}class Assist extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"assist",!0),this.id=attributes.id||"",this.role=attributes.role||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.speak=null,this.toolTip=null}[$toHTML](){var _this$toolTip;return(null==(_this$toolTip=this.toolTip)?void 0:_this$toolTip[$content])||null}}class Barcode extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"barcode",!0),this.charEncoding=getKeyword({data:attributes.charEncoding?attributes.charEncoding.toLowerCase():"",defaultValue:"",validate:k=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(k)||k.match(/iso-8859-\d{2}/)}),this.checksum=getStringOption(attributes.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=getInteger({data:attributes.dataColumnCount,defaultValue:-1,validate:x=>0<=x}),this.dataLength=getInteger({data:attributes.dataLength,defaultValue:-1,validate:x=>0<=x}),this.dataPrep=getStringOption(attributes.dataPrep,["none","flateCompress"]),this.dataRowCount=getInteger({data:attributes.dataRowCount,defaultValue:-1,validate:x=>0<=x}),this.endChar=attributes.endChar||"",this.errorCorrectionLevel=getInteger({data:attributes.errorCorrectionLevel,defaultValue:-1,validate:x=>0<=x&&x<=8}),this.id=attributes.id||"",this.moduleHeight=getMeasurement(attributes.moduleHeight,"5mm"),this.moduleWidth=getMeasurement(attributes.moduleWidth,"0.25mm"),this.printCheckDigit=getInteger({data:attributes.printCheckDigit,defaultValue:0,validate:x=>1===x}),this.rowColumnRatio=getRatio(attributes.rowColumnRatio),this.startChar=attributes.startChar||"",this.textLocation=getStringOption(attributes.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=getInteger({data:attributes.truncate,defaultValue:0,validate:x=>1===x}),this.type=getStringOption(attributes.type?attributes.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=getStringOption(attributes.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.wideNarrowRatio=getRatio(attributes.wideNarrowRatio),this.encrypt=null,this.extras=null}}class Bind extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"bind",!0),this.match=getStringOption(attributes.match,["once","dataRef","global","none"]),this.ref=attributes.ref||"",this.picture=null}}class BindItems extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"bindItems"),this.connection=attributes.connection||"",this.labelRef=attributes.labelRef||"",this.ref=attributes.ref||"",this.valueRef=attributes.valueRef||""}}class Bookend extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"bookend"),this.id=attributes.id||"",this.leader=attributes.leader||"",this.trailer=attributes.trailer||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class BooleanElement extends Option01{constructor(attributes){super(TEMPLATE_NS_ID,"boolean"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$toHTML](availableSpace){return valueToHtml(1===this[$content]?"1":"0")}}class Border extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"border",!0),this.break=getStringOption(attributes.break,["close","open"]),this.hand=getStringOption(attributes.hand,["even","left","right"]),this.id=attributes.id||"",this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.relevant=getRelevant(attributes.relevant),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.corner=new XFAObjectArray(4),this.edge=new XFAObjectArray(4),this.extras=null,this.fill=null,this.margin=null}[$getExtra](){if(!this[$extra]){var edges=this.edge.children.slice();if(edges.length<4)for(var defaultEdge=edges.at(-1)||new Edge({}),i=edges.length;i<4;i++)edges.push(defaultEdge);var widths=edges.map(edge=>edge.thickness),insets=[0,0,0,0];this.margin&&(insets[0]=this.margin.topInset,insets[1]=this.margin.rightInset,insets[2]=this.margin.bottomInset,insets[3]=this.margin.leftInset),this[$extra]={widths:widths,insets:insets,edges:edges}}return this[$extra]}[$toStyle](){var edges=this[$getExtra]()["edges"],edgeStyles=edges.map(node=>{node=node[$toStyle]();return node.color||(node.color="#000000"),node}),style=Object.create(null);if(this.margin&&Object.assign(style,this.margin[$toStyle]()),"visible"===(null==(edges=this.fill)?void 0:edges.presence)&&Object.assign(style,this.fill[$toStyle]()),this.corner.children.some(node=>0!==node.radius)){var cornerStyles=this.corner.children.map(node=>node[$toStyle]());if(2===cornerStyles.length||3===cornerStyles.length)for(var last=cornerStyles.at(-1),i=cornerStyles.length;i<4;i++)cornerStyles.push(last);style.borderRadius=cornerStyles.map(s=>s.radius).join(" ")}switch(this.presence){case"invisible":case"hidden":style.borderStyle="";break;case"inactive":style.borderStyle="none";break;default:style.borderStyle=edgeStyles.map(s=>s.style).join(" ")}return style.borderWidth=edgeStyles.map(s=>s.width).join(" "),style.borderColor=edgeStyles.map(s=>s.color).join(" "),style}}class Break extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"break",!0),this.after=getStringOption(attributes.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=attributes.afterTarget||"",this.before=getStringOption(attributes.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=attributes.beforeTarget||"",this.bookendLeader=attributes.bookendLeader||"",this.bookendTrailer=attributes.bookendTrailer||"",this.id=attributes.id||"",this.overflowLeader=attributes.overflowLeader||"",this.overflowTarget=attributes.overflowTarget||"",this.overflowTrailer=attributes.overflowTrailer||"",this.startNew=getInteger({data:attributes.startNew,defaultValue:0,validate:x=>1===x}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null}}class BreakAfter extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"breakAfter",!0),this.id=attributes.id||"",this.leader=attributes.leader||"",this.startNew=getInteger({data:attributes.startNew,defaultValue:0,validate:x=>1===x}),this.target=attributes.target||"",this.targetType=getStringOption(attributes.targetType,["auto","contentArea","pageArea"]),this.trailer=attributes.trailer||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.script=null}}class BreakBefore extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"breakBefore",!0),this.id=attributes.id||"",this.leader=attributes.leader||"",this.startNew=getInteger({data:attributes.startNew,defaultValue:0,validate:x=>1===x}),this.target=attributes.target||"",this.targetType=getStringOption(attributes.targetType,["auto","contentArea","pageArea"]),this.trailer=attributes.trailer||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.script=null}[$toHTML](availableSpace){return this[$extra]={},HTMLResult.FAILURE}}class Button extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"button",!0),this.highlight=getStringOption(attributes.highlight,["inverted","none","outline","push"]),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null}[$toHTML](availableSpace){var event,jsURL,href,grandpa=this[$getParent]()[$getParent](),htmlButton={name:"button",attributes:{id:this[$uid],class:["xfaButton"],style:{}},children:[]};for(event of grandpa.event.children)"click"===event.activity&&event.script&&(jsURL=recoverJsURL(event.script[$content]))&&(href=fixURL(jsURL.url))&&htmlButton.children.push({name:"a",attributes:{id:"link"+this[$uid],href:href,newWindow:jsURL.newWindow,class:["xfaLink"],style:{}},children:[]});return HTMLResult.success(htmlButton)}}class Calculate extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"calculate",!0),this.id=attributes.id||"",this.override=getStringOption(attributes.override,["disabled","error","ignore","warning"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.message=null,this.script=null}}class Caption extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"caption",!0),this.id=attributes.id||"",this.placement=getStringOption(attributes.placement,["left","bottom","inline","right","top"]),this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil(getMeasurement(attributes.reserve)),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[$setValue](value){_setValue(this,value)}[$getExtra](availableSpace){if(!this[$extra]){var{width,height}=availableSpace;switch(this.placement){case"left":case"right":case"inline":width=this.reserve<=0?width:this.reserve;break;case"top":case"bottom":height=this.reserve<=0?height:this.reserve}this[$extra]=layoutNode(this,{width:width,height:height})}return this[$extra]}[$toHTML](availableSpace){if(!this.value)return HTMLResult.EMPTY;this[$pushPara]();var value=this.value[$toHTML](availableSpace).html;if(!value)return this[$popPara](),HTMLResult.EMPTY;var savedReserve=this.reserve;if(this.reserve<=0){var{w,h}=this[$getExtra](availableSpace);switch(this.placement){case"left":case"right":case"inline":this.reserve=w;break;case"top":case"bottom":this.reserve=h}}var availableSpace=[],style=(availableSpace.push("string"==typeof value?{name:"#text",value:value}:value),toStyle(this,"font","margin","visibility"));switch(this.placement){case"left":case"right":01===x}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.border=null,this.extras=null,this.margin=null}[$toHTML](availableSpace){var style=toStyle(this,"border","margin"),field=this[$getParent]()[$getParent](),_field$font=(null==(_field$font=field.font)?void 0:_field$font.size)||10,optionStyle={fontSize:"calc(".concat(_field$font,"px * var(--total-scale-factor))")},children=[];if(00<=x}),this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Connect extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"connect",!0),this.connection=attributes.connection||"",this.id=attributes.id||"",this.ref=attributes.ref||"",this.usage=getStringOption(attributes.usage,["exportAndImport","exportOnly","importOnly"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.picture=null}}class ContentArea extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"contentArea",!0),this.h=getMeasurement(attributes.h),this.id=attributes.id||"",this.name=attributes.name||"",this.relevant=getRelevant(attributes.relevant),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.w=getMeasurement(attributes.w),this.x=getMeasurement(attributes.x,"0pt"),this.y=getMeasurement(attributes.y,"0pt"),this.desc=null,this.extras=null}[$toHTML](availableSpace){var style={left:measureToString(this.x),top:measureToString(this.y),width:measureToString(this.w),height:measureToString(this.h)},classNames=["xfaContentarea"];return isPrintOnly(this)&&classNames.push("xfaPrintOnly"),HTMLResult.success({name:"div",children:[],attributes:{style:style,class:classNames,id:this[$uid]}})}}class Corner extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"corner",!0),this.id=attributes.id||"",this.inverted=getInteger({data:attributes.inverted,defaultValue:0,validate:x=>1===x}),this.join=getStringOption(attributes.join,["square","round"]),this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.radius=getMeasurement(attributes.radius),this.stroke=getStringOption(attributes.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=getMeasurement(attributes.thickness,"0.5pt"),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.color=null,this.extras=null}[$toStyle](){var style=toStyle(this,"visibility");return style.radius=measureToString("square"===this.join?0:this.radius),style}}class DateElement extends ContentObject{constructor(attributes){super(TEMPLATE_NS_ID,"date"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$finalize](){var date=this[$content].trim();this[$content]=date?new Date(date):null}[$toHTML](availableSpace){return valueToHtml(this[$content]?this[$content].toString():"")}}class DateTime extends ContentObject{constructor(attributes){super(TEMPLATE_NS_ID,"dateTime"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$finalize](){var date=this[$content].trim();this[$content]=date?new Date(date):null}[$toHTML](availableSpace){return valueToHtml(this[$content]?this[$content].toString():"")}}class DateTimeEdit extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"dateTimeEdit",!0),this.hScrollPolicy=getStringOption(attributes.hScrollPolicy,["auto","off","on"]),this.id=attributes.id||"",this.picker=getStringOption(attributes.picker,["host","none"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[$toHTML](availableSpace){var style=toStyle(this,"border","font","margin"),field=this[$getParent]()[$getParent](),_field$$data3={name:"input",attributes:{type:"text",fieldId:field[$uid],dataId:(null==(_field$$data3=field[$data])?void 0:_field$$data3[$uid])||field[$uid],class:["xfaTextfield"],style:style,"aria-label":ariaLabel(field),"aria-required":!1}};return isRequired(field)&&(_field$$data3.attributes["aria-required"]=!0,_field$$data3.attributes.required=!0),HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[_field$$data3]})}}class Decimal extends ContentObject{constructor(attributes){super(TEMPLATE_NS_ID,"decimal"),this.fracDigits=getInteger({data:attributes.fracDigits,defaultValue:2,validate:x=>!0}),this.id=attributes.id||"",this.leadDigits=getInteger({data:attributes.leadDigits,defaultValue:-1,validate:x=>!0}),this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$finalize](){var number=parseFloat(this[$content].trim());this[$content]=isNaN(number)?null:number}[$toHTML](availableSpace){return valueToHtml(null!==this[$content]?this[$content].toString():"")}}class DefaultUi extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"defaultUi",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null}}class Desc extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"desc",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.boolean=new XFAObjectArray,this.date=new XFAObjectArray,this.dateTime=new XFAObjectArray,this.decimal=new XFAObjectArray,this.exData=new XFAObjectArray,this.float=new XFAObjectArray,this.image=new XFAObjectArray,this.integer=new XFAObjectArray,this.text=new XFAObjectArray,this.time=new XFAObjectArray}}class DigestMethod extends OptionObject{constructor(attributes){super(TEMPLATE_NS_ID,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class DigestMethods extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"digestMethods",!0),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.digestMethod=new XFAObjectArray}}class Draw extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"draw",!0),this.anchorType=getStringOption(attributes.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=getInteger({data:attributes.colSpan,defaultValue:1,validate:n=>1<=n||-1===n}),this.h=attributes.h?getMeasurement(attributes.h):"",this.hAlign=getStringOption(attributes.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=attributes.id||"",this.locale=attributes.locale||"",this.maxH=getMeasurement(attributes.maxH,"0pt"),this.maxW=getMeasurement(attributes.maxW,"0pt"),this.minH=getMeasurement(attributes.minH,"0pt"),this.minW=getMeasurement(attributes.minW,"0pt"),this.name=attributes.name||"",this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.relevant=getRelevant(attributes.relevant),this.rotate=getInteger({data:attributes.rotate,defaultValue:0,validate:x=>x%90==0}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.w=attributes.w?getMeasurement(attributes.w):"",this.x=getMeasurement(attributes.x,"0pt"),this.y=getMeasurement(attributes.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 XFAObjectArray}[$setValue](value){_setValue(this,value)}[$toHTML](availableSpace){if(setTabIndex(this),"hidden"===this.presence||"inactive"===this.presence)return HTMLResult.EMPTY;fixDimensions(this),this[$pushPara]();var savedW=this.w,savedH=this.h,{w,h,isBroken}=layoutNode(this,availableSpace);if(w&&""===this.w){if(isBroken&&this[$getSubformParent]()[$isThereMoreWidth]())return this[$popPara](),HTMLResult.FAILURE;this.w=w}if(h&&""===this.h&&(this.h=h),setFirstUnsplittable(this),!checkDimensions(this,availableSpace))return this.w=savedW,this.h=savedH,this[$popPara](),HTMLResult.FAILURE;unsetFirstUnsplittable(this);isBroken=toStyle(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin"),setMinMaxDimensions(this,isBroken),isBroken.margin&&(isBroken.padding=isBroken.margin,delete isBroken.margin),w=["xfaDraw"],this.font&&w.push("xfaFont"),isPrintOnly(this)&&w.push("xfaPrintOnly"),h={style:isBroken,id:this[$uid],class:w},this.name&&(h.xfaName=this.name),w={name:"div",attributes:h,children:[]},applyAssist(this,h),h=computeBbox(this,w,availableSpace),availableSpace=this.value?this.value[$toHTML](availableSpace).html:null;return null===availableSpace?(this.w=savedW,this.h=savedH,this[$popPara]()):(w.children.push(availableSpace),setPara(this,isBroken,availableSpace),this.w=savedW,this.h=savedH,this[$popPara]()),HTMLResult.success(createWrapper(this,w),h)}}class Edge extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"edge",!0),this.cap=getStringOption(attributes.cap,["square","butt","round"]),this.id=attributes.id||"",this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.stroke=getStringOption(attributes.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=getMeasurement(attributes.thickness,"0.5pt"),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.color=null,this.extras=null}[$toStyle](){var style=toStyle(this,"visibility");if(Object.assign(style,{linecap:this.cap,width:measureToString(this.thickness),color:this.color?this.color[$toStyle]():"#000000",style:""}),"visible"!==this.presence)style.style="none";else switch(this.stroke){case"solid":style.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":style.style="dashed";break;case"dotted":style.style="dotted";break;case"embossed":style.style="ridge";break;case"etched":style.style="groove";break;case"lowered":style.style="inset";break;case"raised":style.style="outset"}return style}}class Encoding extends OptionObject{constructor(attributes){super(TEMPLATE_NS_ID,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Encodings extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"encodings",!0),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.encoding=new XFAObjectArray}}class Encrypt extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"encrypt",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.certificate=null}}class EncryptData extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"encryptData",!0),this.id=attributes.id||"",this.operation=getStringOption(attributes.operation,["encrypt","decrypt"]),this.target=attributes.target||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.filter=null,this.manifest=null}}class Encryption extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"encryption",!0),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.certificate=new XFAObjectArray}}class EncryptionMethod extends OptionObject{constructor(attributes){super(TEMPLATE_NS_ID,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class EncryptionMethods extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"encryptionMethods",!0),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.encryptionMethod=new XFAObjectArray}}class Event extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"event",!0),this.activity=getStringOption(attributes.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=attributes.id||"",this.listen=getStringOption(attributes.listen,["refOnly","refAndDescendents"]),this.name=attributes.name||"",this.ref=attributes.ref||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}}class ExData extends ContentObject{constructor(attributes){super(TEMPLATE_NS_ID,"exData"),this.contentType=attributes.contentType||"",this.href=attributes.href||"",this.id=attributes.id||"",this.maxLength=getInteger({data:attributes.maxLength,defaultValue:-1,validate:x=>-1<=x}),this.name=attributes.name||"",this.rid=attributes.rid||"",this.transferEncoding=getStringOption(attributes.transferEncoding,["none","base64","package"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$isCDATAXml](){return"text/html"===this.contentType}[$onChild](child){return("text/html"===this.contentType&&child[$namespaceId]===NamespaceIds.xhtml.id||"text/xml"===this.contentType)&&(this[$content]=child,!0)}[$toHTML](availableSpace){return"text/html"===this.contentType&&this[$content]?this[$content][$toHTML](availableSpace):HTMLResult.EMPTY}}class ExObject extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"exObject",!0),this.archive=attributes.archive||"",this.classId=attributes.classId||"",this.codeBase=attributes.codeBase||"",this.codeType=attributes.codeType||"",this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.boolean=new XFAObjectArray,this.date=new XFAObjectArray,this.dateTime=new XFAObjectArray,this.decimal=new XFAObjectArray,this.exData=new XFAObjectArray,this.exObject=new XFAObjectArray,this.float=new XFAObjectArray,this.image=new XFAObjectArray,this.integer=new XFAObjectArray,this.text=new XFAObjectArray,this.time=new XFAObjectArray}}class ExclGroup extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"exclGroup",!0),this.access=getStringOption(attributes.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=attributes.accessKey||"",this.anchorType=getStringOption(attributes.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=getInteger({data:attributes.colSpan,defaultValue:1,validate:n=>1<=n||-1===n}),this.h=attributes.h?getMeasurement(attributes.h):"",this.hAlign=getStringOption(attributes.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=attributes.id||"",this.layout=getStringOption(attributes.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=getMeasurement(attributes.maxH,"0pt"),this.maxW=getMeasurement(attributes.maxW,"0pt"),this.minH=getMeasurement(attributes.minH,"0pt"),this.minW=getMeasurement(attributes.minW,"0pt"),this.name=attributes.name||"",this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.relevant=getRelevant(attributes.relevant),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.w=attributes.w?getMeasurement(attributes.w):"",this.x=getMeasurement(attributes.x,"0pt"),this.y=getMeasurement(attributes.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 XFAObjectArray,this.event=new XFAObjectArray,this.field=new XFAObjectArray,this.setProperty=new XFAObjectArray}[$isBindable](){return!0}[$hasSettableValue](){return!0}[$setValue](value){for(var field of this.field.children){var nodeValue;field.value||(nodeValue=new Value({}),field[$appendChild](nodeValue),field.value=nodeValue),field.value[$setValue](value)}}[$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[$extra].attempt&&01<=n||-1===n}),this.h=attributes.h?getMeasurement(attributes.h):"",this.hAlign=getStringOption(attributes.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=attributes.id||"",this.locale=attributes.locale||"",this.maxH=getMeasurement(attributes.maxH,"0pt"),this.maxW=getMeasurement(attributes.maxW,"0pt"),this.minH=getMeasurement(attributes.minH,"0pt"),this.minW=getMeasurement(attributes.minW,"0pt"),this.name=attributes.name||"",this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.relevant=getRelevant(attributes.relevant),this.rotate=getInteger({data:attributes.rotate,defaultValue:0,validate:x=>x%90==0}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.w=attributes.w?getMeasurement(attributes.w):"",this.x=getMeasurement(attributes.x,"0pt"),this.y=getMeasurement(attributes.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 XFAObjectArray(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 XFAObjectArray,this.connect=new XFAObjectArray,this.event=new XFAObjectArray,this.setProperty=new XFAObjectArray}[$isBindable](){return!0}[$setValue](value){_setValue(this,value)}[$toHTML](availableSpace){var node;if(setTabIndex(this),!this.ui){switch(this.ui=new Ui({}),this.ui[$globalData]=this[$globalData],this[$appendChild](this.ui),this.items.children.length){case 0:node=new TextEdit({}),this.ui.textEdit=node;break;case 1:node=new CheckButton({}),this.ui.checkButton=node;break;case 2:node=new ChoiceList({}),this.ui.choiceList=node}this.ui[$appendChild](node)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return HTMLResult.EMPTY;this.caption&&delete this.caption[$extra],this[$pushPara]();var caption=this.caption?this.caption[$toHTML](availableSpace).html:null,savedW=this.w,savedH=this.h,marginH=0,marginV=0,borderDims=(this.margin&&(marginH=this.margin.leftInset+this.margin.rightInset,marginV=this.margin.topInset+this.margin.bottomInset),null);if(""===this.w||""===this.h){var width=null,height=null,uiW=0,uiH=0;if(this.ui.checkButton?uiW=uiH=this.ui.checkButton.size:({w,h}=layoutNode(this,availableSpace),uiH=null!==w?(uiW=w,h):fonts_getMetrics(this.font,!0).lineNoGap),uiW+=(borderDims=getBorderDims(this.ui[$getExtra]())).w,uiH+=borderDims.h,this.caption){var{w,h,isBroken}=this.caption[$getExtra](availableSpace);if(isBroken&&this[$getSubformParent]()[$isThereMoreWidth]())return this[$popPara](),HTMLResult.FAILURE;switch(width=w,height=h,this.caption.placement){case"left":case"right":case"inline":width+=uiW;break;case"top":case"bottom":height+=uiH}}else width=uiW,height=uiH;width&&""===this.w&&(width+=marginH,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+11<=x&&x<=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}}class Float extends ContentObject{constructor(attributes){super(TEMPLATE_NS_ID,"float"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$finalize](){var number=parseFloat(this[$content].trim());this[$content]=isNaN(number)?null:number}[$toHTML](availableSpace){return valueToHtml(null!==this[$content]?this[$content].toString():"")}}class template_Font extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"font",!0),this.baselineShift=getMeasurement(attributes.baselineShift),this.fontHorizontalScale=getFloat({data:attributes.fontHorizontalScale,defaultValue:100,validate:x=>0<=x}),this.fontVerticalScale=getFloat({data:attributes.fontVerticalScale,defaultValue:100,validate:x=>0<=x}),this.id=attributes.id||"",this.kerningMode=getStringOption(attributes.kerningMode,["none","pair"]),this.letterSpacing=getMeasurement(attributes.letterSpacing,"0"),this.lineThrough=getInteger({data:attributes.lineThrough,defaultValue:0,validate:x=>1===x||2===x}),this.lineThroughPeriod=getStringOption(attributes.lineThroughPeriod,["all","word"]),this.overline=getInteger({data:attributes.overline,defaultValue:0,validate:x=>1===x||2===x}),this.overlinePeriod=getStringOption(attributes.overlinePeriod,["all","word"]),this.posture=getStringOption(attributes.posture,["normal","italic"]),this.size=getMeasurement(attributes.size,"10pt"),this.typeface=attributes.typeface||"Courier",this.underline=getInteger({data:attributes.underline,defaultValue:0,validate:x=>1===x||2===x}),this.underlinePeriod=getStringOption(attributes.underlinePeriod,["all","word"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.weight=getStringOption(attributes.weight,["normal","bold"]),this.extras=null,this.fill=null}[$clean](builder){super[$clean](builder),this[$globalData].usedTypefaces.add(this.typeface)}[$toStyle](){var style=toStyle(this,"fill"),color=style.color;return color&&("#000000"===color?delete style.color:color.startsWith("#")||(style.background=color,style.backgroundClip="text",style.color="transparent")),this.baselineShift&&(style.verticalAlign=measureToString(this.baselineShift)),style.fontKerning="none"===this.kerningMode?"none":"normal",style.letterSpacing=measureToString(this.letterSpacing),0!==this.lineThrough&&(style.textDecoration="line-through",2===this.lineThrough)&&(style.textDecorationStyle="double"),0!==this.overline&&(style.textDecoration="overline",2===this.overline)&&(style.textDecorationStyle="double"),style.fontStyle=this.posture,style.fontSize=measureToString(.99*this.size),setFontFamily(this,this,this[$globalData].fontFinder,style),0!==this.underline&&(style.textDecoration="underline",2===this.underline)&&(style.textDecorationStyle="double"),style.fontWeight=this.weight,style}}class Format extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"format",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.picture=null}}class Handler extends StringObject{constructor(attributes){super(TEMPLATE_NS_ID,"handler"),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Hyphenation extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"hyphenation"),this.excludeAllCaps=getInteger({data:attributes.excludeAllCaps,defaultValue:0,validate:x=>1===x}),this.excludeInitialCap=getInteger({data:attributes.excludeInitialCap,defaultValue:0,validate:x=>1===x}),this.hyphenate=getInteger({data:attributes.hyphenate,defaultValue:0,validate:x=>1===x}),this.id=attributes.id||"",this.pushCharacterCount=getInteger({data:attributes.pushCharacterCount,defaultValue:3,validate:x=>0<=x}),this.remainCharacterCount=getInteger({data:attributes.remainCharacterCount,defaultValue:3,validate:x=>0<=x}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.wordCharacterCount=getInteger({data:attributes.wordCharacterCount,defaultValue:7,validate:x=>0<=x})}}class Image extends StringObject{constructor(attributes){super(TEMPLATE_NS_ID,"image"),this.aspect=getStringOption(attributes.aspect,["fit","actual","height","none","width"]),this.contentType=attributes.contentType||"",this.href=attributes.href||"",this.id=attributes.id||"",this.name=attributes.name||"",this.transferEncoding=getStringOption(attributes.transferEncoding,["base64","none","package"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$toHTML](){if(this.contentType&&!MIMES.has(this.contentType.toLowerCase()))return HTMLResult.EMPTY;var buffer=null==(_this$$globalData$ima=this[$globalData].images)?void 0:_this$$globalData$ima.get(this.href);if(!buffer&&(this.href||!this[$content]))return HTMLResult.EMPTY;if(!(buffer=buffer||"base64"!==this.transferEncoding?buffer:fromBase64Util(this[$content])))return HTMLResult.EMPTY;if(!this.contentType){for(var[header,type]of IMAGES_HEADERS)if(buffer.length>header.length&&header.every((x,i)=>x===buffer[i])){this.contentType=type;break}if(!this.contentType)return HTMLResult.EMPTY}var style,_this$$globalData$ima=new Blob([buffer],{type:this.contentType});switch(this.aspect){case"fit":case"actual":break;case"height":style={height:"100%",objectFit:"fill"};break;case"none":style={width:"100%",height:"100%",objectFit:"fill"};break;case"width":style={width:"100%",objectFit:"fill"}}var parent=this[$getParent]();return HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:style,src:URL.createObjectURL(_this$$globalData$ima),alt:parent?ariaLabel(parent[$getParent]()):null}})}}class ImageEdit extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"imageEdit",!0),this.data=getStringOption(attributes.data,["link","embed"]),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.border=null,this.extras=null,this.margin=null}[$toHTML](availableSpace){return"embed"===this.data?HTMLResult.success({name:"div",children:[],attributes:{}}):HTMLResult.EMPTY}}class Integer extends ContentObject{constructor(attributes){super(TEMPLATE_NS_ID,"integer"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$finalize](){var number=parseInt(this[$content].trim(),10);this[$content]=isNaN(number)?null:number}[$toHTML](availableSpace){return valueToHtml(null!==this[$content]?this[$content].toString():"")}}class Issuers extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"issuers",!0),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.certificate=new XFAObjectArray}}class Items extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"items",!0),this.id=attributes.id||"",this.name=attributes.name||"",this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.ref=attributes.ref||"",this.save=getInteger({data:attributes.save,defaultValue:0,validate:x=>1===x}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.boolean=new XFAObjectArray,this.date=new XFAObjectArray,this.dateTime=new XFAObjectArray,this.decimal=new XFAObjectArray,this.exData=new XFAObjectArray,this.float=new XFAObjectArray,this.image=new XFAObjectArray,this.integer=new XFAObjectArray,this.text=new XFAObjectArray,this.time=new XFAObjectArray}[$toHTML](){var child,output=[];for(child of this[$getChildren]())output.push(child[$text]());return HTMLResult.success(output)}}class Keep extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"keep",!0),this.id=attributes.id||"";var options=["none","contentArea","pageArea"];this.intact=getStringOption(attributes.intact,options),this.next=getStringOption(attributes.next,options),this.previous=getStringOption(attributes.previous,options),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null}}class KeyUsage extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"keyUsage");var options=["","yes","no"];this.crlSign=getStringOption(attributes.crlSign,options),this.dataEncipherment=getStringOption(attributes.dataEncipherment,options),this.decipherOnly=getStringOption(attributes.decipherOnly,options),this.digitalSignature=getStringOption(attributes.digitalSignature,options),this.encipherOnly=getStringOption(attributes.encipherOnly,options),this.id=attributes.id||"",this.keyAgreement=getStringOption(attributes.keyAgreement,options),this.keyCertSign=getStringOption(attributes.keyCertSign,options),this.keyEncipherment=getStringOption(attributes.keyEncipherment,options),this.nonRepudiation=getStringOption(attributes.nonRepudiation,options),this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Line extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"line",!0),this.hand=getStringOption(attributes.hand,["even","left","right"]),this.id=attributes.id||"",this.slope=getStringOption(attributes.slope,["\\","/"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.edge=null}[$toHTML](){var x1,y1,x2,y2,parent=this[$getParent]()[$getParent](),edge=this.edge||new Edge({}),edgeStyle=edge[$toStyle](),style=Object.create(null),edge="visible"===edge.presence?edge.thickness:0,edgeStyle=(style.strokeWidth=measureToString(edge),style.stroke=edgeStyle.color,"100%"),height="100%";parent.w<=edge?([x1,y1,x2,y2]=["50%",0,"50%","100%"],edgeStyle=style.strokeWidth):parent.h<=edge?([x1,y1,x2,y2]=[0,"50%","100%","50%"],height=style.strokeWidth):"\\"===this.slope?[x1,y1,x2,y2]=[0,0,"100%","100%"]:[x1,y1,x2,y2]=[0,"100%","100%",0];edge={name:"svg",children:[{name:"line",attributes:{xmlns:SVG_NS,x1:x1,y1:y1,x2:x2,y2:y2,style:style}}],attributes:{xmlns:SVG_NS,width:edgeStyle,height:height,style:{overflow:"visible"}}};return hasMargin(parent)?HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[edge]}):(edge.attributes.style.position="absolute",HTMLResult.success(edge))}}class Linear extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"linear",!0),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["toRight","toBottom","toLeft","toTop"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.color=null,this.extras=null}[$toStyle](startColor){startColor=startColor?startColor[$toStyle]():"#FFFFFF";var transf=this.type.replace(/([RBLT])/," $1").toLowerCase(),endColor=this.color?this.color[$toStyle]():"#000000";return"linear-gradient(".concat(transf,", ").concat(startColor,", ").concat(endColor,")")}}class LockDocument extends ContentObject{constructor(attributes){super(TEMPLATE_NS_ID,"lockDocument"),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$finalize](){this[$content]=getStringOption(this[$content],["auto","0","1"])}}class Manifest extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"manifest",!0),this.action=getStringOption(attributes.action,["include","all","exclude"]),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.ref=new XFAObjectArray}}class Margin extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"margin",!0),this.bottomInset=getMeasurement(attributes.bottomInset,"0"),this.id=attributes.id||"",this.leftInset=getMeasurement(attributes.leftInset,"0"),this.rightInset=getMeasurement(attributes.rightInset,"0"),this.topInset=getMeasurement(attributes.topInset,"0"),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null}[$toStyle](){return{margin:measureToString(this.topInset)+" "+measureToString(this.rightInset)+" "+measureToString(this.bottomInset)+" "+measureToString(this.leftInset)}}}class Mdp extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"mdp"),this.id=attributes.id||"",this.permissions=getInteger({data:attributes.permissions,defaultValue:2,validate:x=>1===x||3===x}),this.signatureType=getStringOption(attributes.signatureType,["filler","author"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Medium extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"medium"),this.id=attributes.id||"",this.imagingBBox=getBBox(attributes.imagingBBox),this.long=getMeasurement(attributes.long),this.orientation=getStringOption(attributes.orientation,["portrait","landscape"]),this.short=getMeasurement(attributes.short),this.stock=attributes.stock||"",this.trayIn=getStringOption(attributes.trayIn,["auto","delegate","pageFront"]),this.trayOut=getStringOption(attributes.trayOut,["auto","delegate"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Message extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"message",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.text=new XFAObjectArray}}class NumericEdit extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"numericEdit",!0),this.hScrollPolicy=getStringOption(attributes.hScrollPolicy,["auto","off","on"]),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[$toHTML](availableSpace){var style=toStyle(this,"border","font","margin"),field=this[$getParent]()[$getParent](),_field$$data4={name:"input",attributes:{type:"text",fieldId:field[$uid],dataId:(null==(_field$$data4=field[$data])?void 0:_field$$data4[$uid])||field[$uid],class:["xfaTextfield"],style:style,"aria-label":ariaLabel(field),"aria-required":!1}};return isRequired(field)&&(_field$$data4.attributes["aria-required"]=!0,_field$$data4.attributes.required=!0),HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[_field$$data4]})}}class Occur extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"occur",!0),this.id=attributes.id||"",this.initial=""!==attributes.initial?getInteger({data:attributes.initial,defaultValue:"",validate:x=>!0}):"",this.max=""!==attributes.max?getInteger({data:attributes.max,defaultValue:1,validate:x=>!0}):"",this.min=""!==attributes.min?getInteger({data:attributes.min,defaultValue:1,validate:x=>!0}):"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null}[$clean](){var parent=this[$getParent](),originalMin=this.min;""===this.min&&(this.min=parent instanceof PageArea||parent instanceof PageSet?0:1),""===this.max&&(this.max=""===originalMin?parent instanceof PageArea||parent instanceof PageSet?-1:1:this.min),-1!==this.max&&this.max!0}),this.name=attributes.name||"",this.numbered=getInteger({data:attributes.numbered,defaultValue:1,validate:x=>!0}),this.oddOrEven=getStringOption(attributes.oddOrEven,["any","even","odd"]),this.pagePosition=getStringOption(attributes.pagePosition,["any","first","last","only","rest"]),this.relevant=getRelevant(attributes.relevant),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new XFAObjectArray,this.contentArea=new XFAObjectArray,this.draw=new XFAObjectArray,this.exclGroup=new XFAObjectArray,this.field=new XFAObjectArray,this.subform=new XFAObjectArray}[$isUsable](){return this[$extra]?!this.occur||-1===this.occur.max||this[$extra].numberOfUsep.oddOrEven===parity&&p.pagePosition===position);return parent||this.pageArea.children.find(p=>"any"===p.oddOrEven&&p.pagePosition===position)||this.pageArea.children.find(p=>"any"===p.oddOrEven&&"any"===p.pagePosition)||this.pageArea.children[0]}}class Para extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"para",!0),this.hAlign=getStringOption(attributes.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=attributes.id||"",this.lineHeight=attributes.lineHeight?getMeasurement(attributes.lineHeight,"0pt"):"",this.marginLeft=attributes.marginLeft?getMeasurement(attributes.marginLeft,"0pt"):"",this.marginRight=attributes.marginRight?getMeasurement(attributes.marginRight,"0pt"):"",this.orphans=getInteger({data:attributes.orphans,defaultValue:0,validate:x=>0<=x}),this.preserve=attributes.preserve||"",this.radixOffset=attributes.radixOffset?getMeasurement(attributes.radixOffset,"0pt"):"",this.spaceAbove=attributes.spaceAbove?getMeasurement(attributes.spaceAbove,"0pt"):"",this.spaceBelow=attributes.spaceBelow?getMeasurement(attributes.spaceBelow,"0pt"):"",this.tabDefault=attributes.tabDefault?getMeasurement(this.tabDefault):"",this.tabStops=(attributes.tabStops||"").trim().split(/\s+/).map((x,i)=>i%2==1?getMeasurement(x):x),this.textIndent=attributes.textIndent?getMeasurement(attributes.textIndent,"0pt"):"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.vAlign=getStringOption(attributes.vAlign,["top","bottom","middle"]),this.widows=getInteger({data:attributes.widows,defaultValue:0,validate:x=>0<=x}),this.hyphenation=null}[$toStyle](){var style=toStyle(this,"hAlign");return""!==this.marginLeft&&(style.paddingLeft=measureToString(this.marginLeft)),""!==this.marginRight&&(style.paddingRight=measureToString(this.marginRight)),""!==this.spaceAbove&&(style.paddingTop=measureToString(this.spaceAbove)),""!==this.spaceBelow&&(style.paddingBottom=measureToString(this.spaceBelow)),""!==this.textIndent&&(style.textIndent=measureToString(this.textIndent),fixTextIndent(style)),01===x}),this.id=attributes.id||"",this.priority=getStringOption(attributes.priority,["custom","caption","name","toolTip"]),this.rid=attributes.rid||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Stipple extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"stipple",!0),this.id=attributes.id||"",this.rate=getInteger({data:attributes.rate,defaultValue:50,validate:x=>0<=x&&x<=100}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.color=null,this.extras=null}[$toStyle](bgColor){var alpha=this.rate/100;return Util.makeHexColor(Math.round(bgColor.value.r*(1-alpha)+this.value.r*alpha),Math.round(bgColor.value.g*(1-alpha)+this.value.g*alpha),Math.round(bgColor.value.b*(1-alpha)+this.value.b*alpha))}}class Subform extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"subform",!0),this.access=getStringOption(attributes.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=getInteger({data:attributes.allowMacro,defaultValue:0,validate:x=>1===x}),this.anchorType=getStringOption(attributes.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=getInteger({data:attributes.colSpan,defaultValue:1,validate:n=>1<=n||-1===n}),this.columnWidths=(attributes.columnWidths||"").trim().split(/\s+/).map(x=>"-1"===x?-1:getMeasurement(x)),this.h=attributes.h?getMeasurement(attributes.h):"",this.hAlign=getStringOption(attributes.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=attributes.id||"",this.layout=getStringOption(attributes.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=attributes.locale||"",this.maxH=getMeasurement(attributes.maxH,"0pt"),this.maxW=getMeasurement(attributes.maxW,"0pt"),this.mergeMode=getStringOption(attributes.mergeMode,["consumeData","matchTemplate"]),this.minH=getMeasurement(attributes.minH,"0pt"),this.minW=getMeasurement(attributes.minW,"0pt"),this.name=attributes.name||"",this.presence=getStringOption(attributes.presence,["visible","hidden","inactive","invisible"]),this.relevant=getRelevant(attributes.relevant),this.restoreState=getStringOption(attributes.restoreState,["manual","auto"]),this.scope=getStringOption(attributes.scope,["name","none"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.w=attributes.w?getMeasurement(attributes.w):"",this.x=getMeasurement(attributes.x,"0pt"),this.y=getMeasurement(attributes.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 XFAObjectArray,this.breakAfter=new XFAObjectArray,this.breakBefore=new XFAObjectArray,this.connect=new XFAObjectArray,this.draw=new XFAObjectArray,this.event=new XFAObjectArray,this.exObject=new XFAObjectArray,this.exclGroup=new XFAObjectArray,this.field=new XFAObjectArray,this.proto=new XFAObjectArray,this.setProperty=new XFAObjectArray,this.subform=new XFAObjectArray,this.subformSet=new XFAObjectArray}[$getSubformParent](){var parent=this[$getParent]();return parent instanceof SubformSet?parent[$getSubformParent]():parent}[$isBindable](){return!0}[$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[$extra].attempt&&0((kv=kv.split("=",2))[0]=kv[0].trim(),kv)))}}class SubjectDNs extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"subjectDNs",!0),this.id=attributes.id||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.subjectDN=new XFAObjectArray}}class Submit extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"submit",!0),this.embedPDF=getInteger({data:attributes.embedPDF,defaultValue:0,validate:x=>1===x}),this.format=getStringOption(attributes.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=attributes.id||"",this.target=attributes.target||"",this.textEncoding=getKeyword({data:attributes.textEncoding?attributes.textEncoding.toLowerCase():"",defaultValue:"",validate:k=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(k)||k.match(/iso-8859-\d{2}/)}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.xdpContent=attributes.xdpContent||"",this.encrypt=null,this.encryptData=new XFAObjectArray,this.signData=new XFAObjectArray}}class Template extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"template",!0),this.baseProfile=getStringOption(attributes.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new XFAObjectArray}[$finalize](){0===this.subform.children.length&&warn("XFA - No subforms in template node."),2<=this.subform.children.length&&warn("XFA - Several subforms in template node: please file a bug."),this[$tabIndex]=DEFAULT_TAB_INDEX}[$isSplittable](){return!0}[$searchNode](expr,container){return expr.startsWith("#")?[this[$ids].get(expr.slice(1))]:searchNode(this,container,expr,!0,!0)}*[$toPages](){var _this6=this;if(!this.subform.children.length)return HTMLResult.success({name:"div",children:[]});this[$extra]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};for(var _root$break,targetPageArea,_ret3,root=this.subform.children[0],pageAreas=(root.pageSet[$cleanPage](),root.pageSet.pageArea.children),mainHtml={name:"div",children:[]},pageArea=null,breakBefore=null,breakBeforeTarget=null,breakBeforeTarget=(1<=root.breakBefore.children.length?breakBeforeTarget=(breakBefore=root.breakBefore.children[0]).target:1<=root.subform.children.length&&1<=root.subform.children[0].breakBefore.children.length?breakBeforeTarget=(breakBefore=root.subform.children[0].breakBefore.children[0]).target:null!=(_root$break=root.break)&&_root$break.beforeTarget?breakBeforeTarget=(breakBefore=root.break).beforeTarget:1<=root.subform.children.length&&null!=(_root$break=root.subform.children[0].break)&&_root$break.beforeTarget&&(breakBeforeTarget=(breakBefore=root.subform.children[0].break).beforeTarget),breakBefore&&(_root$break=this[$searchNode](breakBeforeTarget,breakBefore[$getParent]()))instanceof PageArea&&(pageArea=_root$break,breakBefore[$extra]={}),(pageArea=pageArea||pageAreas[0])[$extra]={numberOfUse:1},pageArea[$getParent]()),leader=(breakBeforeTarget[$extra]={numberOfUse:1,pageIndex:breakBeforeTarget.pageArea.children.indexOf(pageArea),pageSetIndex:0},null),trailer=null,hasSomething=!0,hasSomethingCounter=0,startIndex=0;;)if(_ret3=yield*function*(){if(hasSomething)hasSomethingCounter=0;else if(mainHtml.children.pop(),++hasSomethingCounter===MAX_EMPTY_PAGES)return warn("XFA - Something goes wrong: please file a bug."),{v:mainHtml};targetPageArea=null;for(var page=(_this6[$extra].currentPageArea=pageArea)[$toHTML]().html,contentAreas=(mainHtml.children.push(page),leader&&(_this6[$extra].noLayoutFailure=!0,page.children.push(leader[$toHTML](pageArea[$extra].space).html),leader=null),trailer&&(_this6[$extra].noLayoutFailure=!0,page.children.push(trailer[$toHTML](pageArea[$extra].space).html),trailer=null),pageArea.contentArea.children),htmlContentAreas=page.children.filter(node=>node.attributes.class.includes("xfaContentarea")),flush=(hasSomething=!1,_this6[$extra].firstUnsplittable=null,_this6[$extra].noLayoutFailure=!1,index=>{var _html$children,html=root[$flushHTML]();html&&(hasSomething=hasSomething||0<(null==(_html$children=html.children)?void 0:_html$children.length),htmlContentAreas[index].children.push(html))}),i=startIndex,ii=contentAreas.length;i0<=x}),this.name=attributes.name||"",this.rid=attributes.rid||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$acceptWhitespace](){return!0}[$onChild](child){return child[$namespaceId]===NamespaceIds.xhtml.id?(this[$content]=child,!0):(warn("XFA - Invalid content in Text: ".concat(child[$nodeName],".")),!1)}[$onText](str){this[$content]instanceof XFAObject||super[$onText](str)}[$finalize](){"string"==typeof this[$content]&&(this[$content]=this[$content].replaceAll("\r\n","\n"))}[$getExtra](){return"string"==typeof this[$content]?this[$content].split(/[\u2029\u2028\n]/).filter(line=>!!line).join("\n"):this[$content][$text]()}[$toHTML](availableSpace){var html;return"string"==typeof this[$content]?(html=valueToHtml(this[$content]).html,this[$content].includes("\u2029")?(html.name="div",html.children=[],this[$content].split("\u2029").map(para=>para.split(/[\u2028\n]/).flatMap(line=>[{name:"span",value:line},{name:"br"}])).forEach(lines=>{html.children.push({name:"p",children:lines})})):/[\u2028\n]/.test(this[$content])&&(html.name="div",html.children=[],this[$content].split(/[\u2028\n]/).forEach(line=>{html.children.push({name:"span",value:line},{name:"br"})})),HTMLResult.success(html)):this[$content][$toHTML](availableSpace)}}class TextEdit extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"textEdit",!0),this.allowRichText=getInteger({data:attributes.allowRichText,defaultValue:0,validate:x=>1===x}),this.hScrollPolicy=getStringOption(attributes.hScrollPolicy,["auto","off","on"]),this.id=attributes.id||"",this.multiLine=getInteger({data:attributes.multiLine,defaultValue:"",validate:x=>0===x||1===x}),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.vScrollPolicy=getStringOption(attributes.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[$toHTML](availableSpace){var _field$$data5,style=toStyle(this,"border","font","margin"),field=this[$getParent]()[$getParent]();return""===this.multiLine&&(this.multiLine=field instanceof Draw?1:0),_field$$data5=1===this.multiLine?{name:"textarea",attributes:{dataId:(null==(_field$$data5=field[$data])?void 0:_field$$data5[$uid])||field[$uid],fieldId:field[$uid],class:["xfaTextfield"],style:style,"aria-label":ariaLabel(field),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:(null==(_field$$data5=field[$data])?void 0:_field$$data5[$uid])||field[$uid],fieldId:field[$uid],class:["xfaTextfield"],style:style,"aria-label":ariaLabel(field),"aria-required":!1}},isRequired(field)&&(_field$$data5.attributes["aria-required"]=!0,_field$$data5.attributes.required=!0),HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[_field$$data5]})}}class Time extends StringObject{constructor(attributes){super(TEMPLATE_NS_ID,"time"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}[$finalize](){var date=this[$content].trim();this[$content]=date?new Date(date):null}[$toHTML](availableSpace){return valueToHtml(this[$content]?this[$content].toString():"")}}class TimeStamp extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"timeStamp"),this.id=attributes.id||"",this.server=attributes.server||"",this.type=getStringOption(attributes.type,["optional","required"]),this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class ToolTip extends StringObject{constructor(attributes){super(TEMPLATE_NS_ID,"toolTip"),this.id=attributes.id||"",this.rid=attributes.rid||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Traversal extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"traversal",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.traverse=new XFAObjectArray}}class Traverse extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"traverse",!0),this.id=attributes.id||"",this.operation=getStringOption(attributes.operation,["next","back","down","first","left","right","up"]),this.ref=attributes.ref||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[$isTransparent](){return!1}}class Ui extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"ui",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.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}[$getExtra](){if(void 0===this[$extra]){for(var name of Object.getOwnPropertyNames(this))if("extras"!==name&&"picture"!==name){name=this[name];if(name instanceof XFAObject)return this[$extra]=name}this[$extra]=null}return this[$extra]}[$toHTML](availableSpace){var obj=this[$getExtra]();return obj?obj[$toHTML](availableSpace):HTMLResult.EMPTY}}class Validate extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"validate",!0),this.formatTest=getStringOption(attributes.formatTest,["warning","disabled","error"]),this.id=attributes.id||"",this.nullTest=getStringOption(attributes.nullTest,["disabled","error","warning"]),this.scriptTest=getStringOption(attributes.scriptTest,["error","disabled","warning"]),this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}}class Value extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"value",!0),this.id=attributes.id||"",this.override=getInteger({data:attributes.override,defaultValue:0,validate:x=>1===x}),this.relevant=getRelevant(attributes.relevant),this.use=attributes.use||"",this.usehref=attributes.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}[$setValue](value){var parent=this[$getParent]();if(parent instanceof Field&&(null!=(parent=parent.ui)&&parent.imageEdit))return this.image||(this.image=new Image({}),this[$appendChild](this.image)),void(this.image[$content]=value[$content]);parent=value[$nodeName];if(null!==this[parent])this[parent][$content]=value[$content];else{for(var name of Object.getOwnPropertyNames(this)){var obj=this[name];obj instanceof XFAObject&&(this[name]=null,this[$removeChild](obj))}this[value[$nodeName]]=value,this[$appendChild](value)}}[$text](){if(this.exData)return("string"==typeof this.exData[$content]?this.exData[$content]:this.exData[$content][$text]()).trim();for(var name of Object.getOwnPropertyNames(this))if("image"!==name){name=this[name];if(name instanceof XFAObject)return(name[$content]||"").toString().trim()}return null}[$toHTML](availableSpace){for(var name of Object.getOwnPropertyNames(this)){name=this[name];if(name instanceof XFAObject)return name[$toHTML](availableSpace)}return HTMLResult.EMPTY}}class Variables extends XFAObject{constructor(attributes){super(TEMPLATE_NS_ID,"variables",!0),this.id=attributes.id||"",this.use=attributes.use||"",this.usehref=attributes.usehref||"",this.boolean=new XFAObjectArray,this.date=new XFAObjectArray,this.dateTime=new XFAObjectArray,this.decimal=new XFAObjectArray,this.exData=new XFAObjectArray,this.float=new XFAObjectArray,this.image=new XFAObjectArray,this.integer=new XFAObjectArray,this.manifest=new XFAObjectArray,this.script=new XFAObjectArray,this.text=new XFAObjectArray,this.time=new XFAObjectArray}[$isTransparent](){return!0}}class TemplateNamespace{static[$buildXFAObject](name,attributes){if(TemplateNamespace.hasOwnProperty(name))return(name=TemplateNamespace[name](attributes))[$setSetAttributes](attributes),name}static appearanceFilter(attrs){return new AppearanceFilter(attrs)}static arc(attrs){return new Arc(attrs)}static area(attrs){return new Area(attrs)}static assist(attrs){return new Assist(attrs)}static barcode(attrs){return new Barcode(attrs)}static bind(attrs){return new Bind(attrs)}static bindItems(attrs){return new BindItems(attrs)}static bookend(attrs){return new Bookend(attrs)}static boolean(attrs){return new BooleanElement(attrs)}static border(attrs){return new Border(attrs)}static break(attrs){return new Break(attrs)}static breakAfter(attrs){return new BreakAfter(attrs)}static breakBefore(attrs){return new BreakBefore(attrs)}static button(attrs){return new Button(attrs)}static calculate(attrs){return new Calculate(attrs)}static caption(attrs){return new Caption(attrs)}static certificate(attrs){return new Certificate(attrs)}static certificates(attrs){return new Certificates(attrs)}static checkButton(attrs){return new CheckButton(attrs)}static choiceList(attrs){return new ChoiceList(attrs)}static color(attrs){return new Color(attrs)}static comb(attrs){return new Comb(attrs)}static connect(attrs){return new Connect(attrs)}static contentArea(attrs){return new ContentArea(attrs)}static corner(attrs){return new Corner(attrs)}static date(attrs){return new DateElement(attrs)}static dateTime(attrs){return new DateTime(attrs)}static dateTimeEdit(attrs){return new DateTimeEdit(attrs)}static decimal(attrs){return new Decimal(attrs)}static defaultUi(attrs){return new DefaultUi(attrs)}static desc(attrs){return new Desc(attrs)}static digestMethod(attrs){return new DigestMethod(attrs)}static digestMethods(attrs){return new DigestMethods(attrs)}static draw(attrs){return new Draw(attrs)}static edge(attrs){return new Edge(attrs)}static encoding(attrs){return new Encoding(attrs)}static encodings(attrs){return new Encodings(attrs)}static encrypt(attrs){return new Encrypt(attrs)}static encryptData(attrs){return new EncryptData(attrs)}static encryption(attrs){return new Encryption(attrs)}static encryptionMethod(attrs){return new EncryptionMethod(attrs)}static encryptionMethods(attrs){return new EncryptionMethods(attrs)}static event(attrs){return new Event(attrs)}static exData(attrs){return new ExData(attrs)}static exObject(attrs){return new ExObject(attrs)}static exclGroup(attrs){return new ExclGroup(attrs)}static execute(attrs){return new Execute(attrs)}static extras(attrs){return new Extras(attrs)}static field(attrs){return new Field(attrs)}static fill(attrs){return new Fill(attrs)}static filter(attrs){return new Filter(attrs)}static float(attrs){return new Float(attrs)}static font(attrs){return new template_Font(attrs)}static format(attrs){return new Format(attrs)}static handler(attrs){return new Handler(attrs)}static hyphenation(attrs){return new Hyphenation(attrs)}static image(attrs){return new Image(attrs)}static imageEdit(attrs){return new ImageEdit(attrs)}static integer(attrs){return new Integer(attrs)}static issuers(attrs){return new Issuers(attrs)}static items(attrs){return new Items(attrs)}static keep(attrs){return new Keep(attrs)}static keyUsage(attrs){return new KeyUsage(attrs)}static line(attrs){return new Line(attrs)}static linear(attrs){return new Linear(attrs)}static lockDocument(attrs){return new LockDocument(attrs)}static manifest(attrs){return new Manifest(attrs)}static margin(attrs){return new Margin(attrs)}static mdp(attrs){return new Mdp(attrs)}static medium(attrs){return new Medium(attrs)}static message(attrs){return new Message(attrs)}static numericEdit(attrs){return new NumericEdit(attrs)}static occur(attrs){return new Occur(attrs)}static oid(attrs){return new Oid(attrs)}static oids(attrs){return new Oids(attrs)}static overflow(attrs){return new Overflow(attrs)}static pageArea(attrs){return new PageArea(attrs)}static pageSet(attrs){return new PageSet(attrs)}static para(attrs){return new Para(attrs)}static passwordEdit(attrs){return new PasswordEdit(attrs)}static pattern(attrs){return new template_Pattern(attrs)}static picture(attrs){return new Picture(attrs)}static proto(attrs){return new Proto(attrs)}static radial(attrs){return new Radial(attrs)}static reason(attrs){return new Reason(attrs)}static reasons(attrs){return new Reasons(attrs)}static rectangle(attrs){return new Rectangle(attrs)}static ref(attrs){return new RefElement(attrs)}static script(attrs){return new Script(attrs)}static setProperty(attrs){return new SetProperty(attrs)}static signData(attrs){return new SignData(attrs)}static signature(attrs){return new Signature(attrs)}static signing(attrs){return new Signing(attrs)}static solid(attrs){return new Solid(attrs)}static speak(attrs){return new Speak(attrs)}static stipple(attrs){return new Stipple(attrs)}static subform(attrs){return new Subform(attrs)}static subformSet(attrs){return new SubformSet(attrs)}static subjectDN(attrs){return new SubjectDN(attrs)}static subjectDNs(attrs){return new SubjectDNs(attrs)}static submit(attrs){return new Submit(attrs)}static template(attrs){return new Template(attrs)}static text(attrs){return new Text(attrs)}static textEdit(attrs){return new TextEdit(attrs)}static time(attrs){return new Time(attrs)}static timeStamp(attrs){return new TimeStamp(attrs)}static toolTip(attrs){return new ToolTip(attrs)}static traversal(attrs){return new Traversal(attrs)}static traverse(attrs){return new Traverse(attrs)}static ui(attrs){return new Ui(attrs)}static validate(attrs){return new Validate(attrs)}static value(attrs){return new Value(attrs)}static variables(attrs){return new Variables(attrs)}}var bind_NS_DATASETS=NamespaceIds.datasets.id;function createText(content){var node=new Text({});return node[$content]=content,node}class Binder{constructor(root){var _root$datasets;this.root=root,this.datasets=root.datasets,this.data=(null==(_root$datasets=root.datasets)?void 0:_root$datasets.data)||new XmlObject(NamespaceIds.datasets.id,"data"),this.emptyMerge=0===this.data[$getChildren]().length,this.root.form=this.form=root.template[$clone]()}_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(formNode,data,picture){var value;formNode[$data]=data,formNode[$hasSettableValue]()?data[$isDataValue]()?(value=data[$getDataValue](),formNode[$setValue](createText(value))):formNode instanceof Field&&"multiSelect"===(null==(value=formNode.ui)||null==(value=value.choiceList)?void 0:value.open)?(value=data[$getChildren]().map(child=>child[$content].trim()).join("\n"),formNode[$setValue](createText(value))):this._isConsumeData()&&warn("XFA - Nodes haven't the same type."):!data[$isDataValue]()||this._isMatchTemplate()?this._bindElement(formNode,data):warn("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(name,isValue,dataNode,global){var generator,match;if(!name)return null;for(var i=0;i<3;i++){for(generator=dataNode[$getRealChildrenByNameIt](name,!1,!0);;){if(!(match=generator.next().value))break;if(isValue===match[$isDataValue]())return match}if(dataNode[$namespaceId]===NamespaceIds.datasets.id&&"data"===dataNode[$nodeName])break;dataNode=dataNode[$getParent]()}return global?(match=(generator=this.data[$getRealChildrenByNameIt](name,!0,!1)).next().value)||(null!=(match=(generator=this.data[$getAttributeIt](name,!0)).next().value)&&match[$isDataValue]()?match:null):null}_setProperties(formNode,dataNode){if(formNode.hasOwnProperty("setProperty"))for(var{ref,target,connection}of formNode.setProperty.children){var targetNodes,targetParent,content,name,attrs;connection||ref&&((connection=searchNode(this.root,dataNode,ref,!1,!1))?([connection]=connection,connection[$isDescendent](this.data)?(targetNodes=searchNode(this.root,formNode,target,!1,!1))?([targetNodes]=targetNodes,targetNodes[$isDescendent](formNode)?(targetParent=targetNodes[$getParent](),targetNodes instanceof SetProperty||targetParent instanceof SetProperty?warn("XFA - Invalid target: cannot be a setProperty or one of its properties."):targetNodes instanceof BindItems||targetParent instanceof BindItems?warn("XFA - Invalid target: cannot be a bindItems or one of its properties."):(content=connection[$text](),name=targetNodes[$nodeName],targetNodes instanceof XFAAttribute?((attrs=Object.create(null))[name]=content,attrs=Reflect.construct(Object.getPrototypeOf(targetParent).constructor,[attrs]),targetParent[name]=attrs[name]):targetNodes.hasOwnProperty($content)?(targetNodes[$data]=connection,targetNodes[$content]=content,targetNodes[$finalize]()):warn("XFA - Invalid node to use in setProperty"))):warn("XFA - Invalid target: must be a property or subproperty.")):warn("XFA - Invalid target: ".concat(target,".")):warn("XFA - Invalid node: must be a data node.")):warn("XFA - Invalid reference: ".concat(ref,".")))}}_bindItems(formNode,dataNode){if(formNode.hasOwnProperty("items")&&formNode.hasOwnProperty("bindItems")&&!formNode.bindItems.isEmpty()){for(var item of formNode.items.children)formNode[$removeChild](item);formNode.items.clear();var ref,labelRef,valueRef,connection,labels=new Items({}),values=new Items({});formNode[$appendChild](labels),formNode.items.push(labels),formNode[$appendChild](values),formNode.items.push(values);for({ref,labelRef,valueRef,connection}of formNode.bindItems.children)if(!connection&&ref){var labelNodes,nodes=searchNode(this.root,dataNode,ref,!1,!1);if(nodes)for(var node of nodes)node[$isDescendent](this.datasets)?(labelNodes=searchNode(this.root,node,labelRef,!0,!1))?([labelNodes]=labelNodes,labelNodes[$isDescendent](this.datasets)?(node=searchNode(this.root,node,valueRef,!0,!1))?([node]=node,node[$isDescendent](this.datasets)?(labelNodes=createText(labelNodes[$text]()),node=createText(node[$text]()),labels[$appendChild](labelNodes),labels.text.push(labelNodes),values[$appendChild](node),values.text.push(node)):warn("XFA - Invalid value: must be a datasets child.")):warn("XFA - Invalid value: ".concat(valueRef,".")):warn("XFA - Invalid label: must be a datasets child.")):warn("XFA - Invalid label: ".concat(labelRef,".")):warn("XFA - Invalid ref (".concat(ref,"): must be a datasets child."));else warn("XFA - Invalid reference: ".concat(ref,"."))}}}_bindOccurrences(formNode,matches,picture){var baseClone;if(1e.name===formNode.name):parent[name].children).length,pos=parent[$indexOf](formNode)+1,ii=occur.initial-currentNumber;if(ii){var nodeClone=formNode[$clone]();nodeClone[$removeChild](nodeClone.occur),nodeClone.occur=null,parent[name].push(nodeClone),parent[$insertAt](pos,nodeClone);for(var i=1;i!node[$consumed]):match).length>max?match=match.slice(0,max):0===match.length&&(match=null),match&&this._isConsumeData()&&match.forEach(node=>{node[$consumed]=!0})}else{if(!child.name){this._setAndBind(child,dataNode);continue}if(this._isConsumeData()){for(var matches=[];matches.lengthnode[$getParent]()[$removeChild](node))}}class DataHandler{constructor(root,data){this.data=data,this.dataset=root.datasets||null}serialize(storage){for(var stack=[[-1,this.data[$getChildren]()]];0'];if(this.dataset)for(var _child3 of this.dataset[$getChildren]())"data"!==_child3[$nodeName]&&_child3[$toString](buf);return this.data[$toString](buf),buf.push(""),buf.join("")}}var CONFIG_NS_ID=NamespaceIds.config.id;class Acrobat extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new XFAObjectArray}}class Acrobat7 extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"acrobat7",!0),this.dynamicRender=null}}class ADBE_JSConsole extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class ADBE_JSDebugger extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class AddSilentPrint extends Option01{constructor(attributes){super(CONFIG_NS_ID,"addSilentPrint")}}class AddViewerPreferences extends Option01{constructor(attributes){super(CONFIG_NS_ID,"addViewerPreferences")}}class AdjustData extends Option10{constructor(attributes){super(CONFIG_NS_ID,"adjustData")}}class AdobeExtensionLevel extends IntegerObject{constructor(attributes){super(CONFIG_NS_ID,"adobeExtensionLevel",0,n=>1<=n&&n<=8)}}class Agent extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"agent",!0),this.name=attributes.name?attributes.name.trim():"",this.common=new XFAObjectArray}}class AlwaysEmbed extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"alwaysEmbed")}}class Amd extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"amd")}}class config_Area extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"area"),this.level=getInteger({data:attributes.level,defaultValue:0,validate:n=>1<=n&&n<=3}),this.name=getStringOption(attributes.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class Attributes extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"attributes",["preserve","delegate","ignore"])}}class AutoSave extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"autoSave",["disabled","enabled"])}}class Base extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"base")}}class BatchOutput extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"batchOutput"),this.format=getStringOption(attributes.format,["none","concat","zip","zipCompress"])}}class BehaviorOverride extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"behaviorOverride")}[$finalize](){this[$content]=new Map(this[$content].trim().split(/\s+/).filter(x=>x.includes(":")).map(x=>x.split(":",2)))}}class Cache extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"cache",!0),this.templateCache=null}}class Change extends Option01{constructor(attributes){super(CONFIG_NS_ID,"change")}}class Common extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"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 XFAObjectArray}}class Compress extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"compress"),this.scope=getStringOption(attributes.scope,["imageOnly","document"])}}class CompressLogicalStructure extends Option01{constructor(attributes){super(CONFIG_NS_ID,"compressLogicalStructure")}}class CompressObjectStream extends Option10{constructor(attributes){super(CONFIG_NS_ID,"compressObjectStream")}}class Compression extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}}class Config extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new XFAObjectArray}}class Conformance extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"conformance",["A","B"])}}class ContentCopy extends Option01{constructor(attributes){super(CONFIG_NS_ID,"contentCopy")}}class Copies extends IntegerObject{constructor(attributes){super(CONFIG_NS_ID,"copies",1,n=>1<=n)}}class Creator extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"creator")}}class CurrentPage extends IntegerObject{constructor(attributes){super(CONFIG_NS_ID,"currentPage",0,n=>0<=n)}}class Data extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"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 XFAObjectArray,this.transform=new XFAObjectArray}}class Debug extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"debug",!0),this.uri=null}}class DefaultTypeface extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"defaultTypeface"),this.writingScript=getStringOption(attributes.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class Destination extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"destination",["pdf","pcl","ps","webClient","zpl"])}}class DocumentAssembly extends Option01{constructor(attributes){super(CONFIG_NS_ID,"documentAssembly")}}class Driver extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"driver",!0),this.name=attributes.name?attributes.name.trim():"",this.fontInfo=null,this.xdc=null}}class DuplexOption extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class DynamicRender extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"dynamicRender",["forbidden","required"])}}class Embed extends Option01{constructor(attributes){super(CONFIG_NS_ID,"embed")}}class config_Encrypt extends Option01{constructor(attributes){super(CONFIG_NS_ID,"encrypt")}}class config_Encryption extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}}class EncryptionLevel extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"encryptionLevel",["40bit","128bit"])}}class Enforce extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"enforce")}}class Equate extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"equate"),this.force=getInteger({data:attributes.force,defaultValue:1,validate:n=>0===n}),this.from=attributes.from||"",this.to=attributes.to||""}}class EquateRange extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"equateRange"),this.from=attributes.from||"",this.to=attributes.to||"",this._unicodeRange=attributes.unicodeRange||""}get unicodeRange(){var range,ranges=[],unicodeRegex=/U\+([0-9a-fA-F]+)/;for(range of this._unicodeRange.split(",").map(x=>x.trim()).filter(x=>!!x))1===(range=range.split("-",2).map(x=>{x=x.match(unicodeRegex);return x?parseInt(x[1],16):0})).length&&range.push(range[0]),ranges.push(range);return shadow(this,"unicodeRange",ranges)}}class Exclude extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"exclude")}[$finalize](){this[$content]=this[$content].trim().split(/\s+/).filter(x=>x&&["calculate","close","enter","exit","initialize","ready","validate"].includes(x))}}class ExcludeNS extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"excludeNS")}}class FlipLabel extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"flipLabel",["usePrinterSetting","on","off"])}}class config_FontInfo extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new XFAObjectArray,this.defaultTypeface=new XFAObjectArray,this.neverEmbed=new XFAObjectArray}}class FormFieldFilling extends Option01{constructor(attributes){super(CONFIG_NS_ID,"formFieldFilling")}}class GroupParent extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"groupParent")}}class IfEmpty extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class IncludeXDPContent extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"includeXDPContent")}}class IncrementalLoad extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"incrementalLoad",["none","forwardOnly"])}}class IncrementalMerge extends Option01{constructor(attributes){super(CONFIG_NS_ID,"incrementalMerge")}}class Interactive extends Option01{constructor(attributes){super(CONFIG_NS_ID,"interactive")}}class Jog extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"jog",["usePrinterSetting","none","pageSet"])}}class LabelPrinter extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"labelPrinter",!0),this.name=getStringOption(attributes.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class Layout extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"layout",["paginate","panel"])}}class Level extends IntegerObject{constructor(attributes){super(CONFIG_NS_ID,"level",0,n=>01<=n)}}class NameAttr extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"nameAttr")}}class NeverEmbed extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"neverEmbed")}}class NumberOfCopies extends IntegerObject{constructor(attributes){super(CONFIG_NS_ID,"numberOfCopies",null,n=>2<=n&&n<=5)}}class OpenAction extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"openAction",!0),this.destination=null}}class Output extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"output",!0),this.to=null,this.type=null,this.uri=null}}class OutputBin extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"outputBin")}}class OutputXSL extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"outputXSL",!0),this.uri=null}}class Overprint extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"overprint",["none","both","draw","field"])}}class Packets extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"packets")}[$finalize](){"*"!==this[$content]&&(this[$content]=this[$content].trim().split(/\s+/).filter(x=>["config","datasets","template","xfdf","xslt"].includes(x)))}}class PageOffset extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"pageOffset"),this.x=getInteger({data:attributes.x,defaultValue:"useXDCSetting",validate:n=>!0}),this.y=getInteger({data:attributes.y,defaultValue:"useXDCSetting",validate:n=>!0})}}class PageRange extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"pageRange")}[$finalize](){for(var numbers=this[$content].trim().split(/\s+/).map(x=>parseInt(x,10)),ranges=[],i=0,ii=numbers.length;i!1)}}class Pcl extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"pcl",!0),this.name=attributes.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}}class Pdf extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"pdf",!0),this.name=attributes.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}}class Pdfa extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}}class Permissions extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"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}}class PickTrayByPDFSize extends Option01{constructor(attributes){super(CONFIG_NS_ID,"pickTrayByPDFSize")}}class config_Picture extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"picture")}}class PlaintextMetadata extends Option01{constructor(attributes){super(CONFIG_NS_ID,"plaintextMetadata")}}class Presence extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class Present extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"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 XFAObjectArray,this.labelPrinter=new XFAObjectArray,this.pcl=new XFAObjectArray,this.pdf=new XFAObjectArray,this.ps=new XFAObjectArray,this.submitUrl=new XFAObjectArray,this.webClient=new XFAObjectArray,this.zpl=new XFAObjectArray}}class Print extends Option01{constructor(attributes){super(CONFIG_NS_ID,"print")}}class PrintHighQuality extends Option01{constructor(attributes){super(CONFIG_NS_ID,"printHighQuality")}}class PrintScaling extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"printScaling",["appdefault","noScaling"])}}class PrinterName extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"printerName")}}class Producer extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"producer")}}class Ps extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"ps",!0),this.name=attributes.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}}class Range extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"range")}[$finalize](){this[$content]=this[$content].split(",",2).map(range=>range.split("-").map(x=>parseInt(x.trim(),10))).filter(range=>range.every(x=>!isNaN(x))).map(range=>(1===range.length&&range.push(range[0]),range))}}class Record extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"record")}[$finalize](){this[$content]=this[$content].trim();var n=parseInt(this[$content],10);!isNaN(n)&&0<=n&&(this[$content]=n)}}class Relevant extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"relevant")}[$finalize](){this[$content]=this[$content].trim().split(/\s+/)}}class Rename extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"rename")}[$finalize](){this[$content]=this[$content].trim(),(this[$content].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[$content]))&&warn("XFA - Rename: invalid XFA name")}}class RenderPolicy extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"renderPolicy",["server","client"])}}class RunScripts extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"runScripts",["both","client","none","server"])}}class config_Script extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}}class ScriptModel extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"scriptModel",["XFA","none"])}}class Severity extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"severity",["ignore","error","information","trace","warning"])}}class SilentPrint extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}}class Staple extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"staple"),this.mode=getStringOption(attributes.mode,["usePrinterSetting","on","off"])}}class StartNode extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"startNode")}}class StartPage extends IntegerObject{constructor(attributes){super(CONFIG_NS_ID,"startPage",0,n=>!0)}}class SubmitFormat extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class SubmitUrl extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"submitUrl")}}class SubsetBelow extends IntegerObject{constructor(attributes){super(CONFIG_NS_ID,"subsetBelow",100,n=>0<=n&&n<=100)}}class SuppressBanner extends Option01{constructor(attributes){super(CONFIG_NS_ID,"suppressBanner")}}class Tagged extends Option01{constructor(attributes){super(CONFIG_NS_ID,"tagged")}}class config_Template extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}}class Threshold extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"threshold",["trace","error","information","warning"])}}class To extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"to",["null","memory","stderr","stdout","system","uri"])}}class TemplateCache extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"templateCache"),this.maxEntries=getInteger({data:attributes.maxEntries,defaultValue:5,validate:n=>0<=n})}}class Trace extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"trace",!0),this.area=new XFAObjectArray}}class Transform extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}}class Type extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class Uri extends StringObject{constructor(attributes){super(CONFIG_NS_ID,"uri")}}class config_Validate extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class ValidateApprovalSignatures extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"validateApprovalSignatures")}[$finalize](){this[$content]=this[$content].trim().split(/\s+/).filter(x=>["docReady","postSign"].includes(x))}}class ValidationMessaging extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class Version extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class VersionControl extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"VersionControl"),this.outputBelow=getStringOption(attributes.outputBelow,["warn","error","update"]),this.sourceAbove=getStringOption(attributes.sourceAbove,["warn","error"]),this.sourceBelow=getStringOption(attributes.sourceBelow,["update","maintain"])}}class ViewerPreferences extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"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}}class WebClient extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"webClient",!0),this.name=attributes.name?attributes.name.trim():"",this.fontInfo=null,this.xdc=null}}class Whitespace extends OptionObject{constructor(attributes){super(CONFIG_NS_ID,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Window extends ContentObject{constructor(attributes){super(CONFIG_NS_ID,"window")}[$finalize](){var pair=this[$content].split(",",2).map(x=>parseInt(x.trim(),10));pair.some(x=>isNaN(x))?this[$content]=[0,0]:(1===pair.length&&pair.push(pair[0]),this[$content]=pair)}}class Xdc extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"xdc",!0),this.uri=new XFAObjectArray,this.xsl=new XFAObjectArray}}class Xdp extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"xdp",!0),this.packets=null}}class Xsl extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"xsl",!0),this.debug=null,this.uri=null}}class Zpl extends XFAObject{constructor(attributes){super(CONFIG_NS_ID,"zpl",!0),this.name=attributes.name?attributes.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class ConfigNamespace{static[$buildXFAObject](name,attributes){if(ConfigNamespace.hasOwnProperty(name))return ConfigNamespace[name](attributes)}static acrobat(attrs){return new Acrobat(attrs)}static acrobat7(attrs){return new Acrobat7(attrs)}static ADBE_JSConsole(attrs){return new ADBE_JSConsole(attrs)}static ADBE_JSDebugger(attrs){return new ADBE_JSDebugger(attrs)}static addSilentPrint(attrs){return new AddSilentPrint(attrs)}static addViewerPreferences(attrs){return new AddViewerPreferences(attrs)}static adjustData(attrs){return new AdjustData(attrs)}static adobeExtensionLevel(attrs){return new AdobeExtensionLevel(attrs)}static agent(attrs){return new Agent(attrs)}static alwaysEmbed(attrs){return new AlwaysEmbed(attrs)}static amd(attrs){return new Amd(attrs)}static area(attrs){return new config_Area(attrs)}static attributes(attrs){return new Attributes(attrs)}static autoSave(attrs){return new AutoSave(attrs)}static base(attrs){return new Base(attrs)}static batchOutput(attrs){return new BatchOutput(attrs)}static behaviorOverride(attrs){return new BehaviorOverride(attrs)}static cache(attrs){return new Cache(attrs)}static change(attrs){return new Change(attrs)}static common(attrs){return new Common(attrs)}static compress(attrs){return new Compress(attrs)}static compressLogicalStructure(attrs){return new CompressLogicalStructure(attrs)}static compressObjectStream(attrs){return new CompressObjectStream(attrs)}static compression(attrs){return new Compression(attrs)}static config(attrs){return new Config(attrs)}static conformance(attrs){return new Conformance(attrs)}static contentCopy(attrs){return new ContentCopy(attrs)}static copies(attrs){return new Copies(attrs)}static creator(attrs){return new Creator(attrs)}static currentPage(attrs){return new CurrentPage(attrs)}static data(attrs){return new Data(attrs)}static debug(attrs){return new Debug(attrs)}static defaultTypeface(attrs){return new DefaultTypeface(attrs)}static destination(attrs){return new Destination(attrs)}static documentAssembly(attrs){return new DocumentAssembly(attrs)}static driver(attrs){return new Driver(attrs)}static duplexOption(attrs){return new DuplexOption(attrs)}static dynamicRender(attrs){return new DynamicRender(attrs)}static embed(attrs){return new Embed(attrs)}static encrypt(attrs){return new config_Encrypt(attrs)}static encryption(attrs){return new config_Encryption(attrs)}static encryptionLevel(attrs){return new EncryptionLevel(attrs)}static enforce(attrs){return new Enforce(attrs)}static equate(attrs){return new Equate(attrs)}static equateRange(attrs){return new EquateRange(attrs)}static exclude(attrs){return new Exclude(attrs)}static excludeNS(attrs){return new ExcludeNS(attrs)}static flipLabel(attrs){return new FlipLabel(attrs)}static fontInfo(attrs){return new config_FontInfo(attrs)}static formFieldFilling(attrs){return new FormFieldFilling(attrs)}static groupParent(attrs){return new GroupParent(attrs)}static ifEmpty(attrs){return new IfEmpty(attrs)}static includeXDPContent(attrs){return new IncludeXDPContent(attrs)}static incrementalLoad(attrs){return new IncrementalLoad(attrs)}static incrementalMerge(attrs){return new IncrementalMerge(attrs)}static interactive(attrs){return new Interactive(attrs)}static jog(attrs){return new Jog(attrs)}static labelPrinter(attrs){return new LabelPrinter(attrs)}static layout(attrs){return new Layout(attrs)}static level(attrs){return new Level(attrs)}static linearized(attrs){return new Linearized(attrs)}static locale(attrs){return new Locale(attrs)}static localeSet(attrs){return new LocaleSet(attrs)}static log(attrs){return new Log(attrs)}static map(attrs){return new MapElement(attrs)}static mediumInfo(attrs){return new MediumInfo(attrs)}static message(attrs){return new config_Message(attrs)}static messaging(attrs){return new Messaging(attrs)}static mode(attrs){return new Mode(attrs)}static modifyAnnots(attrs){return new ModifyAnnots(attrs)}static msgId(attrs){return new MsgId(attrs)}static nameAttr(attrs){return new NameAttr(attrs)}static neverEmbed(attrs){return new NeverEmbed(attrs)}static numberOfCopies(attrs){return new NumberOfCopies(attrs)}static openAction(attrs){return new OpenAction(attrs)}static output(attrs){return new Output(attrs)}static outputBin(attrs){return new OutputBin(attrs)}static outputXSL(attrs){return new OutputXSL(attrs)}static overprint(attrs){return new Overprint(attrs)}static packets(attrs){return new Packets(attrs)}static pageOffset(attrs){return new PageOffset(attrs)}static pageRange(attrs){return new PageRange(attrs)}static pagination(attrs){return new Pagination(attrs)}static paginationOverride(attrs){return new PaginationOverride(attrs)}static part(attrs){return new Part(attrs)}static pcl(attrs){return new Pcl(attrs)}static pdf(attrs){return new Pdf(attrs)}static pdfa(attrs){return new Pdfa(attrs)}static permissions(attrs){return new Permissions(attrs)}static pickTrayByPDFSize(attrs){return new PickTrayByPDFSize(attrs)}static picture(attrs){return new config_Picture(attrs)}static plaintextMetadata(attrs){return new PlaintextMetadata(attrs)}static presence(attrs){return new Presence(attrs)}static present(attrs){return new Present(attrs)}static print(attrs){return new Print(attrs)}static printHighQuality(attrs){return new PrintHighQuality(attrs)}static printScaling(attrs){return new PrintScaling(attrs)}static printerName(attrs){return new PrinterName(attrs)}static producer(attrs){return new Producer(attrs)}static ps(attrs){return new Ps(attrs)}static range(attrs){return new Range(attrs)}static record(attrs){return new Record(attrs)}static relevant(attrs){return new Relevant(attrs)}static rename(attrs){return new Rename(attrs)}static renderPolicy(attrs){return new RenderPolicy(attrs)}static runScripts(attrs){return new RunScripts(attrs)}static script(attrs){return new config_Script(attrs)}static scriptModel(attrs){return new ScriptModel(attrs)}static severity(attrs){return new Severity(attrs)}static silentPrint(attrs){return new SilentPrint(attrs)}static staple(attrs){return new Staple(attrs)}static startNode(attrs){return new StartNode(attrs)}static startPage(attrs){return new StartPage(attrs)}static submitFormat(attrs){return new SubmitFormat(attrs)}static submitUrl(attrs){return new SubmitUrl(attrs)}static subsetBelow(attrs){return new SubsetBelow(attrs)}static suppressBanner(attrs){return new SuppressBanner(attrs)}static tagged(attrs){return new Tagged(attrs)}static template(attrs){return new config_Template(attrs)}static templateCache(attrs){return new TemplateCache(attrs)}static threshold(attrs){return new Threshold(attrs)}static to(attrs){return new To(attrs)}static trace(attrs){return new Trace(attrs)}static transform(attrs){return new Transform(attrs)}static type(attrs){return new Type(attrs)}static uri(attrs){return new Uri(attrs)}static validate(attrs){return new config_Validate(attrs)}static validateApprovalSignatures(attrs){return new ValidateApprovalSignatures(attrs)}static validationMessaging(attrs){return new ValidationMessaging(attrs)}static version(attrs){return new Version(attrs)}static versionControl(attrs){return new VersionControl(attrs)}static viewerPreferences(attrs){return new ViewerPreferences(attrs)}static webClient(attrs){return new WebClient(attrs)}static whitespace(attrs){return new Whitespace(attrs)}static window(attrs){return new Window(attrs)}static xdc(attrs){return new Xdc(attrs)}static xdp(attrs){return new Xdp(attrs)}static xsl(attrs){return new Xsl(attrs)}static zpl(attrs){return new Zpl(attrs)}}var CONNECTION_SET_NS_ID=NamespaceIds.connectionSet.id;class ConnectionSet extends XFAObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"connectionSet",!0),this.wsdlConnection=new XFAObjectArray,this.xmlConnection=new XFAObjectArray,this.xsdConnection=new XFAObjectArray}}class EffectiveInputPolicy extends XFAObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"effectiveInputPolicy"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class EffectiveOutputPolicy extends XFAObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"effectiveOutputPolicy"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class Operation extends StringObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"operation"),this.id=attributes.id||"",this.input=attributes.input||"",this.name=attributes.name||"",this.output=attributes.output||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class RootElement extends StringObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"rootElement"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class SoapAction extends StringObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"soapAction"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class SoapAddress extends StringObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"soapAddress"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class connection_set_Uri extends StringObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"uri"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class WsdlAddress extends StringObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"wsdlAddress"),this.id=attributes.id||"",this.name=attributes.name||"",this.use=attributes.use||"",this.usehref=attributes.usehref||""}}class WsdlConnection extends XFAObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"wsdlConnection",!0),this.dataDescription=attributes.dataDescription||"",this.name=attributes.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}}class XmlConnection extends XFAObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"xmlConnection",!0),this.dataDescription=attributes.dataDescription||"",this.name=attributes.name||"",this.uri=null}}class XsdConnection extends XFAObject{constructor(attributes){super(CONNECTION_SET_NS_ID,"xsdConnection",!0),this.dataDescription=attributes.dataDescription||"",this.name=attributes.name||"",this.rootElement=null,this.uri=null}}class ConnectionSetNamespace{static[$buildXFAObject](name,attributes){if(ConnectionSetNamespace.hasOwnProperty(name))return ConnectionSetNamespace[name](attributes)}static connectionSet(attrs){return new ConnectionSet(attrs)}static effectiveInputPolicy(attrs){return new EffectiveInputPolicy(attrs)}static effectiveOutputPolicy(attrs){return new EffectiveOutputPolicy(attrs)}static operation(attrs){return new Operation(attrs)}static rootElement(attrs){return new RootElement(attrs)}static soapAction(attrs){return new SoapAction(attrs)}static soapAddress(attrs){return new SoapAddress(attrs)}static uri(attrs){return new connection_set_Uri(attrs)}static wsdlAddress(attrs){return new WsdlAddress(attrs)}static wsdlConnection(attrs){return new WsdlConnection(attrs)}static xmlConnection(attrs){return new XmlConnection(attrs)}static xsdConnection(attrs){return new XsdConnection(attrs)}}var DATASETS_NS_ID=NamespaceIds.datasets.id;class datasets_Data extends XmlObject{constructor(attributes){super(DATASETS_NS_ID,"data",attributes)}[$isNsAgnostic](){return!0}}class Datasets extends XFAObject{constructor(attributes){super(DATASETS_NS_ID,"datasets",!0),this.data=null,this.Signature=null}[$onChild](child){var name=child[$nodeName];("data"===name&&child[$namespaceId]===DATASETS_NS_ID||"Signature"===name&&child[$namespaceId]===NamespaceIds.signature.id)&&(this[name]=child),this[$appendChild](child)}}class DatasetsNamespace{static[$buildXFAObject](name,attributes){if(DatasetsNamespace.hasOwnProperty(name))return DatasetsNamespace[name](attributes)}static datasets(attributes){return new Datasets(attributes)}static data(attributes){return new datasets_Data(attributes)}}var LOCALE_SET_NS_ID=NamespaceIds.localeSet.id;class CalendarSymbols extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new XFAObjectArray(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new XFAObjectArray(2)}}class CurrencySymbol extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"currencySymbol"),this.name=getStringOption(attributes.name,["symbol","isoname","decimal"])}}class CurrencySymbols extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"currencySymbols",!0),this.currencySymbol=new XFAObjectArray(3)}}class DatePattern extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"datePattern"),this.name=getStringOption(attributes.name,["full","long","med","short"])}}class DatePatterns extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"datePatterns",!0),this.datePattern=new XFAObjectArray(4)}}class DateTimeSymbols extends ContentObject{constructor(attributes){super(LOCALE_SET_NS_ID,"dateTimeSymbols")}}class Day extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"day")}}class DayNames extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"dayNames",!0),this.abbr=getInteger({data:attributes.abbr,defaultValue:0,validate:x=>1===x}),this.day=new XFAObjectArray(7)}}class Era extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"era")}}class EraNames extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"eraNames",!0),this.era=new XFAObjectArray(2)}}class locale_set_Locale extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"locale",!0),this.desc=attributes.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}}class locale_set_LocaleSet extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"localeSet",!0),this.locale=new XFAObjectArray}}class Meridiem extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"meridiem")}}class MeridiemNames extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"meridiemNames",!0),this.meridiem=new XFAObjectArray(2)}}class Month extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"month")}}class MonthNames extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"monthNames",!0),this.abbr=getInteger({data:attributes.abbr,defaultValue:0,validate:x=>1===x}),this.month=new XFAObjectArray(12)}}class NumberPattern extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"numberPattern"),this.name=getStringOption(attributes.name,["full","long","med","short"])}}class NumberPatterns extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"numberPatterns",!0),this.numberPattern=new XFAObjectArray(4)}}class NumberSymbol extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"numberSymbol"),this.name=getStringOption(attributes.name,["decimal","grouping","percent","minus","zero"])}}class NumberSymbols extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"numberSymbols",!0),this.numberSymbol=new XFAObjectArray(5)}}class TimePattern extends StringObject{constructor(attributes){super(LOCALE_SET_NS_ID,"timePattern"),this.name=getStringOption(attributes.name,["full","long","med","short"])}}class TimePatterns extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"timePatterns",!0),this.timePattern=new XFAObjectArray(4)}}class TypeFace extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"typeFace",!0),this.name=""|attributes.name}}class TypeFaces extends XFAObject{constructor(attributes){super(LOCALE_SET_NS_ID,"typeFaces",!0),this.typeFace=new XFAObjectArray}}class LocaleSetNamespace{static[$buildXFAObject](name,attributes){if(LocaleSetNamespace.hasOwnProperty(name))return LocaleSetNamespace[name](attributes)}static calendarSymbols(attrs){return new CalendarSymbols(attrs)}static currencySymbol(attrs){return new CurrencySymbol(attrs)}static currencySymbols(attrs){return new CurrencySymbols(attrs)}static datePattern(attrs){return new DatePattern(attrs)}static datePatterns(attrs){return new DatePatterns(attrs)}static dateTimeSymbols(attrs){return new DateTimeSymbols(attrs)}static day(attrs){return new Day(attrs)}static dayNames(attrs){return new DayNames(attrs)}static era(attrs){return new Era(attrs)}static eraNames(attrs){return new EraNames(attrs)}static locale(attrs){return new locale_set_Locale(attrs)}static localeSet(attrs){return new locale_set_LocaleSet(attrs)}static meridiem(attrs){return new Meridiem(attrs)}static meridiemNames(attrs){return new MeridiemNames(attrs)}static month(attrs){return new Month(attrs)}static monthNames(attrs){return new MonthNames(attrs)}static numberPattern(attrs){return new NumberPattern(attrs)}static numberPatterns(attrs){return new NumberPatterns(attrs)}static numberSymbol(attrs){return new NumberSymbol(attrs)}static numberSymbols(attrs){return new NumberSymbols(attrs)}static timePattern(attrs){return new TimePattern(attrs)}static timePatterns(attrs){return new TimePatterns(attrs)}static typeFace(attrs){return new TypeFace(attrs)}static typeFaces(attrs){return new TypeFaces(attrs)}}var SIGNATURE_NS_ID=NamespaceIds.signature.id;class signature_Signature extends XFAObject{constructor(attributes){super(SIGNATURE_NS_ID,"signature",!0)}}class SignatureNamespace{static[$buildXFAObject](name,attributes){if(SignatureNamespace.hasOwnProperty(name))return SignatureNamespace[name](attributes)}static signature(attributes){return new signature_Signature(attributes)}}var STYLESHEET_NS_ID=NamespaceIds.stylesheet.id;class Stylesheet extends XFAObject{constructor(attributes){super(STYLESHEET_NS_ID,"stylesheet",!0)}}class StylesheetNamespace{static[$buildXFAObject](name,attributes){if(StylesheetNamespace.hasOwnProperty(name))return StylesheetNamespace[name](attributes)}static stylesheet(attributes){return new Stylesheet(attributes)}}var XDP_NS_ID=NamespaceIds.xdp.id;class xdp_Xdp extends XFAObject{constructor(attributes){super(XDP_NS_ID,"xdp",!0),this.uuid=attributes.uuid||"",this.timeStamp=attributes.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new XFAObjectArray,this.template=null}[$onChildCheck](child){var ns=NamespaceIds[child[$nodeName]];return ns&&child[$namespaceId]===ns.id}}class XdpNamespace{static[$buildXFAObject](name,attributes){if(XdpNamespace.hasOwnProperty(name))return XdpNamespace[name](attributes)}static xdp(attributes){return new xdp_Xdp(attributes)}}var XHTML_NS_ID=NamespaceIds.xhtml.id,$richText=Symbol(),VALID_STYLES=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"]),StyleMapping=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",value=>"none"===value?"none":"normal"],["xfa-font-horizontal-scale",value=>"scaleX(".concat(Math.max(0,parseInt(value)/100).toFixed(2),")")],["xfa-font-vertical-scale",value=>"scaleY(".concat(Math.max(0,parseInt(value)/100).toFixed(2),")")],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(value,original)=>measureToString(.99*(value=original.fontSize=Math.abs(getMeasurement(value))))],["letter-spacing",value=>measureToString(getMeasurement(value))],["line-height",value=>measureToString(getMeasurement(value))],["margin",value=>measureToString(getMeasurement(value))],["margin-bottom",value=>measureToString(getMeasurement(value))],["margin-left",value=>measureToString(getMeasurement(value))],["margin-right",value=>measureToString(getMeasurement(value))],["margin-top",value=>measureToString(getMeasurement(value))],["text-indent",value=>measureToString(getMeasurement(value))],["font-family",value=>value],["vertical-align",value=>measureToString(getMeasurement(value))]]),spacesRegExp=/\s+/g,crlfRegExp=/[\r\n]+/g,crlfForRichTextRegExp=/\r\n?/g;function mapStyle(styleStr,node,richText){var style=Object.create(null);if(styleStr){var key,value,original=Object.create(null);for([key,value]of styleStr.split(";").map(s=>s.split(":",2))){var newValue,mapping=StyleMapping.get(key);""!==mapping&&(newValue=value,mapping&&(newValue="string"==typeof mapping?mapping:mapping(value,original)),key.endsWith("scale")?style.transform=style.transform?"".concat(style[key]," ").concat(newValue):newValue:style[key.replaceAll(/-([a-zA-Z])/g,(_,x)=>x.toUpperCase())]=newValue)}style.fontFamily&&setFontFamily({typeface:style.fontFamily,weight:style.fontWeight||"normal",posture:style.fontStyle||"normal",size:original.fontSize||0},node,node[$globalData].fontFinder,style),richText&&style.verticalAlign&&"0px"!==style.verticalAlign&&style.fontSize&&(styleStr=getMeasurement(style.fontSize),style.fontSize=measureToString(.583*styleStr),style.verticalAlign=measureToString(Math.sign(getMeasurement(style.verticalAlign))*styleStr*.333)),richText&&style.fontSize&&(style.fontSize="calc(".concat(style.fontSize," * var(--total-scale-factor))")),fixTextIndent(style)}return style}function checkStyle(node){return node.style?node.style.split(";").filter(s=>!!s.trim()).map(s=>s.split(":",2).map(t=>t.trim())).filter(_ref63=>{var[_ref63,value]=_ref63;return"font-family"===_ref63&&node[$globalData].usedTypefaces.add(value),VALID_STYLES.has(_ref63)}).map(kv=>kv.join(":")).join(";"):""}var NoWhites=new Set(["body","html"]);class XhtmlObject extends XmlObject{constructor(attributes,name){super(XHTML_NS_ID,name),this[$richText]=!1,this.style=attributes.style||""}[$clean](builder){super[$clean](builder),this.style=checkStyle(this)}[$acceptWhitespace](){return!NoWhites.has(this[$nodeName])}[$onText](str){1s.split(":",2)))switch(key){case"font-family":xfaFont.typeface=stripQuotes(value);break;case"font-size":xfaFont.size=getMeasurement(value);break;case"font-weight":xfaFont.weight=value;break;case"font-style":xfaFont.posture=value;break;case"letter-spacing":xfaFont.letterSpacing=getMeasurement(value);break;case"margin":var values=value.split(/ \t/).map(x=>getMeasurement(x));switch(values.length){case 1:margin.top=margin.bottom=margin.left=margin.right=values[0];break;case 2:margin.top=margin.bottom=values[0],margin.left=margin.right=values[1];break;case 3:margin.top=values[0],margin.bottom=values[2],margin.left=margin.right=values[1];break;case 4:margin.top=values[0],margin.left=values[1],margin.bottom=values[2],margin.right=values[3]}break;case"margin-top":margin.top=getMeasurement(value);break;case"margin-bottom":margin.bottom=getMeasurement(value);break;case"margin-left":margin.left=getMeasurement(value);break;case"margin-right":margin.right=getMeasurement(value);break;case"line-height":lineHeight=getMeasurement(value)}if(measure.pushData(xfaFont,margin,lineHeight),this[$content])measure.addString(this[$content]);else for(var child of this[$getChildren]())"#text"===child[$nodeName]?measure.addString(child[$content]):child[$pushGlyphs](measure);mustPop&&measure.popFont()}[$toHTML](availableSpace){var value,children=[];return this[$extra]={children:children},this[$childrenToHTML]({}),0!==children.length||this[$content]?(value=this[$richText]?this[$content]?this[$content].replaceAll(crlfForRichTextRegExp,"\n"):void 0:this[$content]||void 0,HTMLResult.success({name:this[$nodeName],attributes:{href:this.href,style:mapStyle(this.style,this,this[$richText])},children:children,value:value})):HTMLResult.EMPTY}}class A extends XhtmlObject{constructor(attributes){super(attributes,"a"),this.href=fixURL(attributes.href)||""}}class B extends XhtmlObject{constructor(attributes){super(attributes,"b")}[$pushGlyphs](measure){measure.pushFont({weight:"bold"}),super[$pushGlyphs](measure),measure.popFont()}}class Body extends XhtmlObject{constructor(attributes){super(attributes,"body")}[$toHTML](availableSpace){var availableSpace=super[$toHTML](availableSpace),html=availableSpace["html"];return html?(html.name="div",html.attributes.class=["xfaRich"],availableSpace):HTMLResult.EMPTY}}class Br extends XhtmlObject{constructor(attributes){super(attributes,"br")}[$text](){return"\n"}[$pushGlyphs](measure){measure.addString("\n")}[$toHTML](availableSpace){return HTMLResult.success({name:"br"})}}class Html extends XhtmlObject{constructor(attributes){super(attributes,"html")}[$toHTML](availableSpace){var children=[];if(this[$extra]={children:children},this[$childrenToHTML]({}),0===children.length)return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[$content]||""});if(1===children.length){var _child$attributes,child=children[0];if(null!=(_child$attributes=child.attributes)&&_child$attributes.class.includes("xfaRich"))return HTMLResult.success(child)}return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:children})}}class I extends XhtmlObject{constructor(attributes){super(attributes,"i")}[$pushGlyphs](measure){measure.pushFont({posture:"italic"}),super[$pushGlyphs](measure),measure.popFont()}}class Li extends XhtmlObject{constructor(attributes){super(attributes,"li")}}class Ol extends XhtmlObject{constructor(attributes){super(attributes,"ol")}}class P extends XhtmlObject{constructor(attributes){super(attributes,"p")}[$pushGlyphs](measure){super[$pushGlyphs](measure,!1),measure.addString("\n"),measure.addPara(),measure.popFont()}[$text](){return this[$getParent]()[$getChildren]().at(-1)===this?super[$text]():super[$text]()+"\n"}}class Span extends XhtmlObject{constructor(attributes){super(attributes,"span")}}class Sub extends XhtmlObject{constructor(attributes){super(attributes,"sub")}}class Sup extends XhtmlObject{constructor(attributes){super(attributes,"sup")}}class Ul extends XhtmlObject{constructor(attributes){super(attributes,"ul")}}class XhtmlNamespace{static[$buildXFAObject](name,attributes){if(XhtmlNamespace.hasOwnProperty(name))return XhtmlNamespace[name](attributes)}static a(attributes){return new A(attributes)}static b(attributes){return new B(attributes)}static body(attributes){return new Body(attributes)}static br(attributes){return new Br(attributes)}static html(attributes){return new Html(attributes)}static i(attributes){return new I(attributes)}static li(attributes){return new Li(attributes)}static ol(attributes){return new Ol(attributes)}static p(attributes){return new P(attributes)}static span(attributes){return new Span(attributes)}static sub(attributes){return new Sub(attributes)}static sup(attributes){return new Sup(attributes)}static ul(attributes){return new Ul(attributes)}}var NamespaceSetUp={config:ConfigNamespace,connection:ConnectionSetNamespace,datasets:DatasetsNamespace,localeSet:LocaleSetNamespace,signature:SignatureNamespace,stylesheet:StylesheetNamespace,template:TemplateNamespace,xdp:XdpNamespace,xhtml:XhtmlNamespace};class UnknownNamespace{constructor(nsId){this.namespaceId=nsId}[$buildXFAObject](name,attributes){return new XmlObject(this.namespaceId,name,attributes)}}class Root extends XFAObject{constructor(ids){super(-1,"root",Object.create(null)),this.element=null,this[$ids]=ids}[$onChild](child){return this.element=child,!0}[$finalize](){super[$finalize](),this.element.template instanceof Template&&(this[$ids].set($root,this.element),this.element.template[$resolvePrototypes](this[$ids]),this.element.template[$ids]=this[$ids])}}class Empty extends XFAObject{constructor(){super(-1,"",Object.create(null))}[$onChild](_){return!1}}class Builder{constructor(){var rootNameSpace=0{_ref64=_ref64.id;return _ref64})),this._currentNamespace=rootNameSpace||new UnknownNamespace(++this._nextNsId)}buildRoot(ids){return new Root(ids)}build(_ref65){var{nsPrefix:_ref65,name,attributes,namespace,prefixes}=_ref65,hasNamespaceDef=null!==namespace;if(hasNamespaceDef&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(namespace)),prefixes&&this._addNamespacePrefix(prefixes),attributes.hasOwnProperty($nsAttributes)){var ns,attrs,dataTemplate=NamespaceSetUp.datasets,namespace=attributes[$nsAttributes],xfaAttrs=null;for([ns,attrs]of Object.entries(namespace))if(this._getNamespaceToUse(ns)===dataTemplate){xfaAttrs={xfa:attrs};break}xfaAttrs?attributes[$nsAttributes]=xfaAttrs:delete attributes[$nsAttributes]}namespace=this._getNamespaceToUse(_ref65),_ref65=(null==namespace?void 0:namespace[$buildXFAObject](name,attributes))||new Empty;return _ref65[$isNsAgnostic]()&&this._nsAgnosticLevel++,(hasNamespaceDef||prefixes||_ref65[$isNsAgnostic]())&&(_ref65[$cleanup]={hasNamespace:hasNamespaceDef,prefixes:prefixes,nsAgnostic:_ref65[$isNsAgnostic]()}),_ref65}isNsAgnostic(){return 0{_ref66=_ref66.prefix;this._namespacePrefixes.get(_ref66).pop()}),nsAgnostic&&this._nsAgnosticLevel--}}class XFAParser extends XMLParserBase{constructor(){var rootNameSpace=0match.slice(1)+" "),this._richText||this._current[$acceptWhitespace]()?this._current[$onText](text,this._richText):this._whiteRegex.test(text)||this._current[$onText](text.trim())}onCdata(text){this._current[$onText](text)}_mkAttributes(attributes,tagName){var name,value,prefix,_attributeObj$$nsAttr,ns,attrName,namespace=null,prefixes=null,attributeObj=Object.create({});for({name,value}of attributes)"xmlns"===name?namespace?warn("XFA - multiple namespace definition in <".concat(tagName,">")):namespace=value:name.startsWith("xmlns:")?(prefix=name.substring("xmlns:".length),(prefixes=null!=prefixes?prefixes:[]).push({prefix:prefix,value:value})):-1===(prefix=name.indexOf(":"))?attributeObj[name]=value:(_attributeObj$$nsAttr=null!=(_attributeObj$$nsAttr=attributeObj[$nsAttributes])?_attributeObj$$nsAttr:attributeObj[$nsAttributes]=Object.create(null),[ns,attrName]=[name.slice(0,prefix),name.slice(prefix+1)],(_attributeObj$$nsAttr[ns]||(_attributeObj$$nsAttr[ns]=Object.create(null)))[attrName]=value);return[namespace,prefixes,attributeObj]}_getNameAndPrefix(name,nsAgnostic){var i=name.indexOf(":");return-1===i?[name,null]:[name.substring(i+1),nsAgnostic?"":name.substring(0,i)]}onBeginElement(tagName,attributes,isEmpty){var[attributes,prefixes,attributesObj]=this._mkAttributes(attributes,tagName),[tagName,nsPrefix]=this._getNameAndPrefix(tagName,this._builder.isNsAgnostic()),nsPrefix=this._builder.build({nsPrefix:nsPrefix,name:tagName,attributes:attributesObj,namespace:attributes,prefixes:prefixes});nsPrefix[$globalData]=this._globalData,isEmpty?(nsPrefix[$finalize](),this._current[$onChild](nsPrefix)&&nsPrefix[$setId](this._ids),nsPrefix[$clean](this._builder)):(this._stack.push(this._current),this._current=nsPrefix)}onEndElement(name){var parser,node=this._current;node[$isCDATAXml]()&&"string"==typeof node[$content]&&((parser=new XFAParser)._globalData=this._globalData,parser=parser.parse(node[$content]),node[$content]=null,node[$onChild](parser)),node[$finalize](),this._current=this._stack.pop(),this._current[$onChild](node)&&node[$setId](this._ids),node[$clean](this._builder)}onError(code){this._errorCode=code}}class XFAFactory{constructor(data){try{this.root=(new XFAParser).parse(XFAFactory._createDocument(data));var binder=new Binder(this.root);this.form=binder.bind(),this.dataHandler=new DataHandler(this.root,binder.getData()),this.form[$globalData].template=this.form}catch(e){warn("XFA - an error occurred during parsing and binding: ".concat(e))}}isValid(){return!(!this.root||!this.form)}_createPagesHelper(){var iterator=this.form[$toPages]();return new Promise((resolve,reject)=>{var nextIteration=()=>{try{var value=iterator.next();value.done?resolve(value.value):setTimeout(nextIteration,0)}catch(e){reject(e)}};setTimeout(nextIteration,0)})}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map(c=>{var{width:c,height}=c.attributes.style;return[0,0,parseInt(c),parseInt(height)]})}catch(e){warn("XFA - an error occurred during layout: ".concat(e))}}getBoundingBox(pageIndex){return this.dims[pageIndex]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(images){this.form[$globalData].images=images}setFonts(fonts){this.form[$globalData].fontFinder=new FontFinder(fonts);var missingFonts=[];for(typeface of this.form[$globalData].usedTypefaces){var typeface=stripQuotes(typeface);this.form[$globalData].fontFinder.find(typeface)||missingFonts.push(typeface)}return 0!attr.startsWith("xfa"))),attributes.dir="auto"),{html:html,str:root[$text]()}):null}catch(e){warn("XFA - an error occurred during parsing of rich text: ".concat(e))}return null}}class AnnotationFactory{static createGlobals(pdfManager){return Promise.all([pdfManager.ensureCatalog("acroForm"),pdfManager.ensureDoc("xfaDatasets"),pdfManager.ensureCatalog("structTreeRoot"),pdfManager.ensureCatalog("baseUrl"),pdfManager.ensureCatalog("attachments"),pdfManager.ensureCatalog("globalColorSpaceCache")]).then(_ref67=>{var[_ref67,xfaDatasets,structTreeRoot,baseUrl,attachments,globalColorSpaceCache]=_ref67;return{pdfManager:pdfManager,acroForm:_ref67 instanceof Dict?_ref67:Dict.empty,xfaDatasets:xfaDatasets,structTreeRoot:structTreeRoot,baseUrl:baseUrl,attachments:attachments,globalColorSpaceCache:globalColorSpaceCache}},reason=>(warn('createGlobals: "'.concat(reason,'".')),null))}static async create(xref,ref,annotationGlobals,idFactory,collectFields,orphanFields,pageRef){var pageIndex=collectFields?await this._getPageIndex(xref,ref,annotationGlobals.pdfManager):null;return annotationGlobals.pdfManager.ensure(this,"_create",[xref,ref,annotationGlobals,idFactory,collectFields,orphanFields,pageIndex,pageRef])}static _create(xref,ref,annotationGlobals,idFactory){var collectFields=4c/255)}function getQuadPoints(dict,rect){var quadPoints=dict.getArray("QuadPoints");if(!isNumberArray(quadPoints,null)||0===quadPoints.length||0rect[2]||x2rect[3]))return null;newQuadPoints.set([minX,x3,x1,x3,minX,x2,x1,x2],i)}return newQuadPoints}function getTransformMatrix(rect,bbox,matrix){var minMax=new Float32Array([1/0,1/0,-1/0,-1/0]),[bbox,matrix,minMax,maxY]=(Util.axialAlignedBoundingBox(bbox,matrix,minMax),minMax);return bbox===minMax||matrix===maxY?[1,0,0,1,rect[0],rect[1]]:[minMax=(rect[2]-rect[0])/(minMax-bbox),0,0,maxY=(rect[3]-rect[1])/(maxY-matrix),rect[0]-bbox*minMax,rect[1]-matrix*maxY]}class Annotation{constructor(params){var{dict,xref,annotationGlobals,ref,orphanFields}=params,orphanFields=null==orphanFields?void 0:orphanFields.get(ref),ref=(orphanFields&&dict.set("Parent",orphanFields),this.setTitle(dict.get("T")),this.setContents(dict.get("Contents")),this.setModificationDate(dict.get("M")),this.setFlags(dict.get("F")),this.setRectangle(dict.getArray("Rect")),this.setColor(dict.getArray("C")),this.setBorderStyle(dict),this.setAppearance(dict),this.setOptionalContent(dict),dict.get("MK")),orphanFields=(this.setBorderAndBackgroundColors(ref),this.setRotation(ref,dict),this.ref=params.ref instanceof Ref?params.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance),!!(this.flags&AnnotationFlag.LOCKED)),ref=!!(this.flags&AnnotationFlag.LOCKEDCONTENTS);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:params.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:params.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&AnnotationFlag.NOROTATE),noHTML:orphanFields&&ref,isEditable:!1,structParent:-1},annotationGlobals.structTreeRoot&&(orphanFields=dict.get("StructParent"),this.data.structParent=orphanFields=Number.isInteger(orphanFields)&&0<=orphanFields?orphanFields:-1,annotationGlobals.structTreeRoot.addAnnotationIdToPage(params.pageRef,orphanFields)),params.collectFields){ref=dict.get("Kids");if(Array.isArray(ref)){var kid,kidIds=[];for(kid of ref)kid instanceof Ref&&kidIds.push(kid.toString());0!==kidIds.length&&(this.data.kidIds=kidIds)}this.data.actions=collectActions(xref,dict,AnnotationActionEventType),this.data.fieldName=this._constructFieldName(dict),this.data.pageIndex=params.pageIndex}annotationGlobals=dict.get("IT");annotationGlobals instanceof Name&&(this.data.it=annotationGlobals.name),this._isOffscreenCanvasSupported=params.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(flags,flag){return!!(flags&flag)}_buildFlags(noView,noPrint){var flags=this["flags"];return void 0===noView?void 0===noPrint?void 0:noPrint?flags&~AnnotationFlag.PRINT:flags&~AnnotationFlag.HIDDEN|AnnotationFlag.PRINT:noView?(flags|=AnnotationFlag.PRINT,noPrint?flags&~AnnotationFlag.NOVIEW|AnnotationFlag.HIDDEN:flags&~AnnotationFlag.HIDDEN|AnnotationFlag.NOVIEW):(flags&=~(AnnotationFlag.HIDDEN|AnnotationFlag.NOVIEW),noPrint?flags&~AnnotationFlag.PRINT:flags|AnnotationFlag.PRINT)}_isViewable(flags){return!this._hasFlag(flags,AnnotationFlag.INVISIBLE)&&!this._hasFlag(flags,AnnotationFlag.NOVIEW)}_isPrintable(flags){return this._hasFlag(flags,AnnotationFlag.PRINT)&&!this._hasFlag(flags,AnnotationFlag.HIDDEN)&&!this._hasFlag(flags,AnnotationFlag.INVISIBLE)}mustBeViewed(annotationStorage,_renderForms){annotationStorage=null==annotationStorage||null==(annotationStorage=annotationStorage.get(this.data.id))?void 0:annotationStorage.noView;return void 0!==annotationStorage?!annotationStorage:this.viewable&&!this._hasFlag(this.flags,AnnotationFlag.HIDDEN)}mustBePrinted(annotationStorage){annotationStorage=null==annotationStorage||null==(annotationStorage=annotationStorage.get(this.data.id))?void 0:annotationStorage.noPrint;return void 0!==annotationStorage?!annotationStorage:this.printable}mustBeViewedWhenEditing(isEditing){var modifiedIds=1"string"==typeof item).map(item=>stringToPDFString(item)):formValue instanceof Name?stringToPDFString(formValue.name):"string"==typeof formValue?stringToPDFString(formValue):null}hasFieldFlag(flag){return!!(this.data.fieldFlags&flag)}_isViewable(flags){return!0}mustBeViewed(annotationStorage,renderForms){return renderForms?this.viewable:super.mustBeViewed(annotationStorage,renderForms)&&!this._hasFlag(this.flags,AnnotationFlag.NOVIEW)}getRotationMatrix(annotationStorage){annotationStorage=null==annotationStorage||null==(annotationStorage=annotationStorage.get(this.data.id))?void 0:annotationStorage.rotation;return 0===(annotationStorage=void 0===annotationStorage?this.rotation:annotationStorage)?IDENTITY_MATRIX:getRotationMatrix(annotationStorage,this.width,this.height)}getBorderAndBackgroundAppearances(annotationStorage){var str,borderWidth,annotationStorage=null==annotationStorage||null==(annotationStorage=annotationStorage.get(this.data.id))?void 0:annotationStorage.rotation;return void 0===annotationStorage&&(annotationStorage=this.rotation),this.backgroundColor||this.borderColor?(annotationStorage=0===annotationStorage||180===annotationStorage?"0 0 ".concat(this.width," ").concat(this.height," re"):"0 0 ".concat(this.height," ").concat(this.width," re"),str="",this.backgroundColor&&(str="".concat(getPdfColor(this.backgroundColor,!0)," ").concat(annotationStorage," f ")),this.borderColor&&(borderWidth=this.borderStyle.width||1,str+="".concat(borderWidth," w ").concat(getPdfColor(this.borderColor,!1)," ").concat(annotationStorage," S ")),str):""}async getOperatorList(evaluator,task,intent,annotationStorage){var content,opList,optionalContent,bbox;return!(intent&RenderingIntentFlag.ANNOTATIONS_FORMS)||this instanceof SignatureWidgetAnnotation||this.data.noHTML||this.data.hasOwnCanvas?!this._hasText||(content=await this._getAppearance(evaluator,task,intent,annotationStorage),this.appearance&&null===content)?super.getOperatorList(evaluator,task,intent,annotationStorage):(opList=new OperatorList,this._defaultAppearance&&null!==content?(intent=!!(this.data.hasOwnCanvas&&intent&RenderingIntentFlag.DISPLAY),bbox=[0,0,this.width,this.height],bbox=getTransformMatrix(this.data.rect,bbox,[1,0,0,1,0,0]),void 0!==(optionalContent=this.oc?await evaluator.parseMarkedContentProps(this.oc,null):optionalContent)&&opList.addOp(OPS.beginMarkedContentProps,["OC",optionalContent]),opList.addOp(OPS.beginAnnotation,[this.data.id,this.data.rect,bbox,this.getRotationMatrix(annotationStorage),intent]),bbox=new StringStream(content),await evaluator.getOperatorList({stream:bbox,task:task,resources:this._fieldResources.mergedResources,operatorList:opList}),opList.addOp(OPS.endAnnotation,[]),void 0!==optionalContent&&opList.addOp(OPS.endMarkedContent,[]),{opList:opList,separateForm:!1,separateCanvas:intent}):{opList:opList,separateForm:!1,separateCanvas:!1}):{opList:new OperatorList,separateForm:!0,separateCanvas:!1}}_getMKDict(rotation){var mk=new Dict(null);return rotation&&mk.set("R",rotation),this.borderColor&&mk.set("BC",getPdfColorArray(this.borderColor)),this.backgroundColor&&mk.set("BG",getPdfColorArray(this.backgroundColor)),0{_ref69=_ref69.exportValue;return value===_ref69}),value=(null==option?void 0:option.displayValue)||value),""===value)return"/Tx BMC q ".concat(storageEntry,"Q EMC");void 0===rotation&&(rotation=this.rotation);var lines,defaultAppearance,fontSize,lineHeight,line,option=-1,{width:totalWidth,height:totalHeight}=(this.data.multiLine?option=(lines=value.split(/\r\n?|\n/).map(line=>line.normalize("NFC"))).length:lines=[value.replace(/\r\n?|\n/,"").normalize("NFC")],this),font=(90!==rotation&&270!==rotation||([totalWidth,totalHeight]=[totalHeight,totalWidth]),this._defaultAppearance||(this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance="/Helvetica 0 Tf 0 g")),await WidgetAnnotation._getFontData(evaluator,task,this.data.defaultAppearanceData,this._fieldResources.mergedResources)),encodedLines=[],encodingError=!1;for(line of lines){var encodedString=font.encodeString(line);1g.width))/1e3}_computeFontSize(height,width,text,font,lineCount){var fontSize=this.data.defaultAppearanceData["fontSize"],lineHeight=(fontSize||12)*LINE_FACTOR,numberOfLines=Math.round(height/lineHeight);if(!fontSize){var roundWithTwoDigits=x=>Math.floor(100*x)/100;if(-1===lineCount)lineHeight=this._getTextWidth(text,font),fontSize=roundWithTwoDigits(Math.min(height/LINE_FACTOR,width/lineHeight)),numberOfLines=1;else{var line,lineHeight=text.split(/\r\n?|\n/),cachedLines=[];for(line of lineHeight){var encoded=font.encodeString(line).join(""),glyphs=font.charsToGlyphs(encoded),positions=font.getCharPositions(encoded);cachedLines.push({line:encoded,glyphs:glyphs,positions:positions})}var isTooBig=fsize=>{var cache,totalHeight=0;for(cache of cachedLines)if(totalHeight+=this._splitLine(null,font,fsize,width,cache).length*fsize,heightp1?"\\".concat(p1):"\\s+"),new RegExp("^\\s*".concat(viewBox,"\\s*$")).test(this.data.fieldValue))&&(this.data.textContent=this.data.fieldValue.split("\n"))}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,type:"text"}}}class ButtonWidgetAnnotation extends WidgetAnnotation{constructor(params){super(params),this.checkedAppearance=null,this.uncheckedAppearance=null;var isRadio=this.hasFieldFlag(AnnotationFieldFlag.RADIO),isPushButton=this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON);this.data.checkBox=!isRadio&&!isPushButton,this.data.radioButton=isRadio&&!isPushButton,this.data.pushButton=isPushButton,this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(params):this.data.radioButton?this._processRadioButton(params):this.data.pushButton?(this.data.hasOwnCanvas=!0,this.data.noHTML=!1,this._processPushButton(params)):warn("Invalid field flags for button widget annotation")}async getOperatorList(evaluator,task,intent,annotationStorage){var storageEntry,value,savedMatrix,rotation;return this.data.pushButton?super.getOperatorList(evaluator,task,intent,!1,annotationStorage):(rotation=value=null,annotationStorage&&(value=(storageEntry=annotationStorage.get(this.data.id))?storageEntry.value:null,rotation=storageEntry?storageEntry.rotation:null),null===value&&this.appearance?super.getOperatorList(evaluator,task,intent,annotationStorage):(storageEntry=(value=null==value?this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue:value)?this.checkedAppearance:this.uncheckedAppearance)?(value=this.appearance,savedMatrix=lookupMatrix(storageEntry.dict.getArray("Matrix"),IDENTITY_MATRIX),rotation&&storageEntry.dict.set("Matrix",this.getRotationMatrix(annotationStorage)),this.appearance=storageEntry,rotation=super.getOperatorList(evaluator,task,intent,annotationStorage),this.appearance=value,storageEntry.dict.set("Matrix",savedMatrix),rotation):{opList:new OperatorList,separateForm:!1,separateCanvas:!1})}async save(evaluator,task,annotationStorage,changes){this.data.checkBox?this._saveCheckbox(evaluator,task,annotationStorage,changes):this.data.radioButton&&this._saveRadioButton(evaluator,task,annotationStorage,changes)}async _saveCheckbox(evaluator,task,annotationStorage,changes){if(annotationStorage){var annotationStorage=annotationStorage.get(this.data.id),flags=this._buildFlags(null==annotationStorage?void 0:annotationStorage.noView,null==annotationStorage?void 0:annotationStorage.noPrint),rotation=null==annotationStorage?void 0:annotationStorage.rotation,annotationStorage=null==annotationStorage?void 0:annotationStorage.value;if(void 0===rotation&&void 0===flags){if(void 0===annotationStorage)return;if(this.data.fieldValue===this.data.exportValue===annotationStorage)return}var xfa,dict=evaluator.xref.fetchIfRef(this.ref);dict instanceof Dict&&(dict=dict.clone(),void 0===rotation&&(rotation=this.rotation),void 0===annotationStorage&&(annotationStorage=this.data.fieldValue===this.data.exportValue),xfa={path:this.data.fieldName,value:annotationStorage?this.data.exportValue:""},annotationStorage=Name.get(annotationStorage?this.data.exportValue:"Off"),this.setValue(dict,annotationStorage,evaluator.xref,changes),dict.set("AS",annotationStorage),dict.set("M","D:".concat(getModificationDate())),void 0!==flags&&dict.set("F",flags),(evaluator=this._getMKDict(rotation))&&dict.set("MK",evaluator),changes.put(this.ref,{data:dict,xfa:xfa,needAppearances:!1}))}}async _saveRadioButton(evaluator,task,annotationStorage,changes){if(annotationStorage){var annotationStorage=annotationStorage.get(this.data.id),flags=this._buildFlags(null==annotationStorage?void 0:annotationStorage.noView,null==annotationStorage?void 0:annotationStorage.noPrint),rotation=null==annotationStorage?void 0:annotationStorage.rotation,annotationStorage=null==annotationStorage?void 0:annotationStorage.value;if(void 0===rotation&&void 0===flags){if(void 0===annotationStorage)return;if(this.data.fieldValue===this.data.buttonValue===annotationStorage)return}var xfa,name,dict=evaluator.xref.fetchIfRef(this.ref);dict instanceof Dict&&(dict=dict.clone(),void 0===annotationStorage&&(annotationStorage=this.data.fieldValue===this.data.buttonValue),void 0===rotation&&(rotation=this.rotation),xfa={path:this.data.fieldName,value:annotationStorage?this.data.buttonValue:""},name=Name.get(annotationStorage?this.data.buttonValue:"Off"),annotationStorage&&this.setValue(dict,name,evaluator.xref,changes),dict.set("AS",name),dict.set("M","D:".concat(getModificationDate())),void 0!==flags&&dict.set("F",flags),(annotationStorage=this._getMKDict(rotation))&&dict.set("MK",annotationStorage),changes.put(this.ref,{data:dict,xfa:xfa,needAppearances:!1}))}}_getDefaultCheckedAppearance(params,type){var char,{width,height}=this,bbox=[0,0,width,height],fontSize=.8*Math.min(width,height),type=("check"===type?(metrics={width:.755*fontSize,height:.705*fontSize},char="3"):"disc"===type?(metrics={width:.791*fontSize,height:.705*fontSize},char="l"):unreachable("_getDefaultCheckedAppearance - unsupported type: ".concat(type)),numberToString((width-metrics.width)/2)),width=numberToString((height-metrics.height)/2),height="q BT /PdfJsZaDb ".concat(fontSize," Tf 0 g ").concat(type," ").concat(width," Td (").concat(char,") Tj ET Q"),metrics=new Dict(params.xref),fontSize=(metrics.set("FormType",1),metrics.set("Subtype",Name.get("Form")),metrics.set("Type",Name.get("XObject")),metrics.set("BBox",bbox),metrics.set("Matrix",[1,0,0,1,0,0]),metrics.set("Length",height.length),new Dict(params.xref)),type=new Dict(params.xref);type.set("PdfJsZaDb",this.fallbackFontDict),fontSize.set("Font",type),metrics.set("Resources",fontSize),this.checkedAppearance=new StringStream(height),this.checkedAppearance.dict=metrics,this._streams.push(this.checkedAppearance)}_processCheckBox(params){var asValue,exportValues,customAppearance=params.dict.get("AP");customAppearance instanceof Dict&&(customAppearance=customAppearance.get("N"))instanceof Dict&&("string"==typeof(asValue=this._decodeFormValue(params.dict.get("AS")))&&(this.data.fieldValue=asValue),asValue=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",0===(exportValues=this._decodeFormValue(customAppearance.getKeys())).length?exportValues.push("Off",asValue):1===exportValues.length?"Off"===exportValues[0]?exportValues.push(asValue):exportValues.unshift("Off"):exportValues.includes(asValue)?(exportValues.length=0,exportValues.push("Off",asValue)):(asValue=exportValues.find(v=>"Off"!==v),exportValues.length=0,exportValues.push("Off",asValue)),exportValues.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=exportValues[1],asValue=customAppearance.get(this.data.exportValue),this.checkedAppearance=asValue instanceof BaseStream?asValue:null,exportValues=customAppearance.get("Off"),this.uncheckedAppearance=exportValues instanceof BaseStream?exportValues:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(params,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue)&&(this.data.defaultFieldValue="Off")}_processRadioButton(params){this.data.buttonValue=null;var fieldParent=params.dict.get("Parent"),fieldParent=(fieldParent instanceof Dict&&(this.parent=params.dict.getRaw("Parent"),(fieldParent=fieldParent.get("V"))instanceof Name)&&(this.data.fieldValue=this._decodeFormValue(fieldParent)),params.dict.get("AP"));if(fieldParent instanceof Dict){fieldParent=fieldParent.get("N");if(fieldParent instanceof Dict){for(var key of fieldParent.getKeys())if("Off"!==key){this.data.buttonValue=this._decodeFormValue(key);break}var checkedAppearance=fieldParent.get(this.data.buttonValue),checkedAppearance=(this.checkedAppearance=checkedAppearance instanceof BaseStream?checkedAppearance:null,fieldParent.get("Off"));this.uncheckedAppearance=checkedAppearance instanceof BaseStream?checkedAppearance:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(params,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}}}_processPushButton(params){var{dict:params,annotationGlobals}=params;params.has("A")||params.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!params.has("A")&&!params.has("AA"),Catalog.parseDestDictionary({destDict:params,resultObj:this.data,docBaseUrl:annotationGlobals.baseUrl,docAttachments:annotationGlobals.attachments})):warn("Push buttons without action dictionaries are not supported")}getFieldObject(){var exportValues,type="button";return this.data.checkBox?(type="checkbox",exportValues=this.data.exportValue):this.data.radioButton&&(type="radiobutton",exportValues=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:exportValues,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:type}}get fallbackFontDict(){var dict=new Dict;return dict.set("BaseFont",Name.get("ZapfDingbats")),dict.set("Type",Name.get("FallbackType")),dict.set("Subtype",Name.get("FallbackType")),dict.set("Encoding",Name.get("ZapfDingbatsEncoding")),shadow(this,"fallbackFontDict",dict)}}class ChoiceWidgetAnnotation extends WidgetAnnotation{constructor(params){super(params);var{dict:params,xref}=params,options=(this.indices=params.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&0({exportValue:value,displayValue:value}))),this.data.combo=this.hasFieldFlag(AnnotationFieldFlag.COMBO),this.data.multiSelect=this.hasFieldFlag(AnnotationFieldFlag.MULTISELECT),this._hasText=!0}getFieldObject(){var type=this.data.combo?"combobox":"listbox",value=0line.trimEnd()),{coords,bbox,matrix}=FakeUnicodeFont.getFirstPositionInfo(this.rectangle,this.rotation,evaluatorOptions),this.data.textPosition=this._transformPoint(coords,bbox,matrix)),this._isOffscreenCanvasSupported?(coords=params.dict.get("CA"),bbox=new FakeUnicodeFont(xref,"sans-serif"),this.appearance=bbox.createAppearance(this._contents.str,this.rectangle,this.rotation,evaluatorOptions,annotationGlobals,coords),this._streams.push(this.appearance)):warn("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly."))}get hasTextContent(){return this._hasAppearance}static createNewDict(annotation,xref,_ref70){var{apRef:_ref70,ap}=_ref70,{color:annotation,fontSize,oldAnnotation,rect,rotation,user,value}=annotation,freetext=oldAnnotation||new Dict(xref),oldAnnotation=(freetext.set("Type",Name.get("Annot")),freetext.set("Subtype",Name.get("FreeText")),oldAnnotation?(freetext.set("M","D:".concat(getModificationDate())),freetext.delete("RC")):freetext.set("CreationDate","D:".concat(getModificationDate())),freetext.set("Rect",rect),"/Helv ".concat(fontSize," Tf ").concat(getPdfColor(annotation,!0)));return freetext.set("DA",oldAnnotation),freetext.set("Contents",stringToAsciiOrUTF16BE(value)),freetext.set("F",4),freetext.set("Border",[0,0,0]),freetext.set("Rotate",rotation),user&&freetext.set("T",stringToAsciiOrUTF16BE(user)),(_ref70||ap)&&(rect=new Dict(xref),freetext.set("AP",rect),_ref70?rect.set("N",_ref70):rect.set("N",ap)),freetext}static async createNewAppearanceStream(annotation,xref,params){var line,{baseFontRef:params,evaluator,task}=params,{color:annotation,fontSize,rect,rotation,value}=annotation,resources=new Dict(xref),font=new Dict(xref),helv=(params?font.set("Helv",params):((params=new Dict(xref)).set("BaseFont",Name.get("Helvetica")),params.set("Type",Name.get("Font")),params.set("Subtype",Name.get("Type1")),params.set("Encoding",Name.get("WinAnsiEncoding")),font.set("Helv",params)),resources.set("Font",font),await WidgetAnnotation._getFontData(evaluator,task,{fontName:"Helv",fontSize:fontSize},resources)),[params,font,evaluator,task]=rect,w=evaluator-params,h=task-font,evaluator=(rotation%180!=0&&([w,h]=[h,w]),value.split("\n")),scale=fontSize/1e3,totalWidth=-1/0,encodedLines=[];for(line of evaluator){var encoded=helv.encodeString(line);if(1(buffer.push("".concat(lineCoordinates[0]," ").concat(lineCoordinates[1]," m"),"".concat(lineCoordinates[2]," ").concat(lineCoordinates[3]," l"),"S"),[points[0]-borderWidth,points[7]-borderWidth,points[2]+borderWidth,points[3]+borderWidth])}))}}class SquareAnnotation extends MarkupAnnotation{constructor(params){super(params);var strokeColor,strokeAlpha,fillColor,{dict:params,xref}=params;this.data.annotationType=AnnotationType.SQUARE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,!this.appearance&&(strokeColor=this.color?getPdfColorArray(this.color):[0,0,0],strokeAlpha=params.get("CA"),params=getRgbColor(params.getArray("IC"),null),params=(fillColor=params?getPdfColorArray(params):null)?strokeAlpha:null,0!==this.borderStyle.width||fillColor)&&this._setDefaultAppearance({xref:xref,extra:"".concat(this.borderStyle.width," w"),strokeColor:strokeColor,fillColor:fillColor,strokeAlpha:strokeAlpha,fillAlpha:params,pointsCallback:(buffer,points)=>{var x=points[4]+this.borderStyle.width/2,y=points[5]+this.borderStyle.width/2,width=points[6]-points[4]-this.borderStyle.width,height=points[3]-points[7]-this.borderStyle.width;return buffer.push("".concat(x," ").concat(y," ").concat(width," ").concat(height," re")),fillColor?buffer.push("B"):buffer.push("S"),[points[0],points[7],points[2],points[3]]}})}}class CircleAnnotation extends MarkupAnnotation{constructor(params){super(params);var strokeColor,strokeAlpha,fillColor,controlPointsDistance,{dict:params,xref}=params;this.data.annotationType=AnnotationType.CIRCLE,!this.appearance&&(strokeColor=this.color?getPdfColorArray(this.color):[0,0,0],strokeAlpha=params.get("CA"),params=getRgbColor(params.getArray("IC"),null),params=(fillColor=params?getPdfColorArray(params):null)?strokeAlpha:null,0!==this.borderStyle.width||fillColor)&&(controlPointsDistance=4/3*Math.tan(Math.PI/8),this._setDefaultAppearance({xref:xref,extra:"".concat(this.borderStyle.width," w"),strokeColor:strokeColor,fillColor:fillColor,strokeAlpha:strokeAlpha,fillAlpha:params,pointsCallback:(buffer,points)=>{var x0=points[0]+this.borderStyle.width/2,y0=points[1]-this.borderStyle.width/2,x1=points[6]-this.borderStyle.width/2,y1=points[7]+this.borderStyle.width/2,xMid=x0+(x1-x0)/2,yMid=y0+(y1-y0)/2,xOffset=(x1-x0)/2*controlPointsDistance,yOffset=(y1-y0)/2*controlPointsDistance;return buffer.push("".concat(xMid," ").concat(y1," m"),"".concat(xMid+xOffset," ").concat(y1," ").concat(x1," ").concat(yMid+yOffset," ").concat(x1," ").concat(yMid," c"),"".concat(x1," ").concat(yMid-yOffset," ").concat(xMid+xOffset," ").concat(y0," ").concat(xMid," ").concat(y0," c"),"".concat(xMid-xOffset," ").concat(y0," ").concat(x0," ").concat(yMid-yOffset," ").concat(x0," ").concat(yMid," c"),"".concat(x0," ").concat(yMid+yOffset," ").concat(xMid-xOffset," ").concat(y1," ").concat(xMid," ").concat(y1," c"),"h"),fillColor?buffer.push("B"):buffer.push("S"),[points[0],points[7],points[2],points[3]]}}))}}class PolylineAnnotation extends MarkupAnnotation{constructor(params){super(params);var{dict:params,xref}=params,rawVertices=(this.data.annotationType=AnnotationType.POLYLINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.vertices=null,this instanceof PolygonAnnotation||(this.setLineEndings(params.getArray("LE")),this.data.lineEndings=this.lineEndings),params.getArray("Vertices"));if(isNumberArray(rawVertices,null)){var vertices=this.data.vertices=Float32Array.from(rawVertices);if(!this.appearance){for(var rawVertices=this.color?getPdfColorArray(this.color):[0,0,0],params=params.get("CA"),borderWidth=this.borderStyle.width||1,borderAdjust=2*borderWidth,bbox=[1/0,1/0,-1/0,-1/0],i=0,ii=vertices.length;i{for(var _i44=0,_ii13=vertices.length;_i44<_ii13;_i44+=2)buffer.push("".concat(vertices[_i44]," ").concat(vertices[_i44+1]," ").concat(0===_i44?"m":"l"));return buffer.push("S"),[points[0],points[7],points[2],points[3]]}})}}}}class PolygonAnnotation extends PolylineAnnotation{constructor(params){super(params),this.data.annotationType=AnnotationType.POLYGON}}class CaretAnnotation extends MarkupAnnotation{constructor(params){super(params),this.data.annotationType=AnnotationType.CARET}}class InkAnnotation extends MarkupAnnotation{constructor(params){super(params),this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;var{dict:params,xref}=params,rawInkLists=(this.data.annotationType=AnnotationType.INK,this.data.inkLists=[],this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1,this.data.opacity=params.get("CA")||1,params.getArray("InkList"));if(Array.isArray(rawInkLists)){for(var i=0,ii=rawInkLists.length;i{for(var _inkList2 of this.data.inkLists){for(var _i46=0,_ii15=_inkList2.length;_i46<_ii15;_i46+=2)buffer.push("".concat(_inkList2[_i46]," ").concat(_inkList2[_i46+1]," ").concat(0===_i46?"m":"l"));buffer.push("S")}return[points[0],points[7],points[2],points[3]]}})}}}static createNewDict(annotation,xref,_ref71){var{apRef:_ref71,ap}=_ref71,{oldAnnotation:annotation,color,opacity,paths,outlines,rect,rotation,thickness,user}=annotation,ink=annotation||new Dict(xref),annotation=(ink.set("Type",Name.get("Annot")),ink.set("Subtype",Name.get("Ink")),ink.set(annotation?"M":"CreationDate","D:".concat(getModificationDate())),ink.set("Rect",rect),ink.set("InkList",(null==outlines?void 0:outlines.points)||paths.points),ink.set("F",4),ink.set("Rotate",rotation),user&&ink.set("T",stringToAsciiOrUTF16BE(user)),outlines&&ink.set("IT",Name.get("InkHighlight")),new Dict(xref)),rect=(ink.set("BS",annotation),annotation.set("W",thickness),ink.set("C",getPdfColorArray(color)),ink.set("CA",opacity),new Dict(xref));return ink.set("AP",rect),_ref71?rect.set("N",_ref71):rect.set("N",ap),ink}static async createNewAppearanceStream(annotation,xref,params){if(annotation.outlines)return this.createNewAppearanceStreamForHighlight(annotation,xref,params);var outline,{color:params,rect:annotation,paths,thickness,opacity}=annotation,appearanceBuffer=["".concat(thickness," w 1 J 1 j"),"".concat(getPdfColor(params,!1))];1!==opacity&&appearanceBuffer.push("/R0 gs");for(outline of paths.lines){appearanceBuffer.push("".concat(numberToString(outline[4])," ").concat(numberToString(outline[5])," m"));for(var c1x,c1y,c2x,c2y,x,y,i=6,ii=outline.length;i(buffer.push("".concat(points[0]," ").concat(points[1]," m"),"".concat(points[2]," ").concat(points[3]," l"),"".concat(points[6]," ").concat(points[7]," l"),"".concat(points[4]," ").concat(points[5]," l"),"f"),[points[0],points[7],points[2],points[3]])}))):this.data.popupRef=null}get overlaysTextContent(){return!0}static createNewDict(annotation,xref,_ref72){var{apRef:_ref72,ap}=_ref72,{color:annotation,oldAnnotation,opacity,rect,rotation,user,quadPoints}=annotation,highlight=oldAnnotation||new Dict(xref);return highlight.set("Type",Name.get("Annot")),highlight.set("Subtype",Name.get("Highlight")),highlight.set(oldAnnotation?"M":"CreationDate","D:".concat(getModificationDate())),highlight.set("CreationDate","D:".concat(getModificationDate())),highlight.set("Rect",rect),highlight.set("F",4),highlight.set("Border",[0,0,0]),highlight.set("Rotate",rotation),highlight.set("QuadPoints",quadPoints),highlight.set("C",getPdfColorArray(annotation)),highlight.set("CA",opacity),user&&highlight.set("T",stringToAsciiOrUTF16BE(user)),(_ref72||ap)&&(oldAnnotation=new Dict(xref),highlight.set("AP",oldAnnotation),oldAnnotation.set("N",_ref72||ap)),highlight}static async createNewAppearanceStream(annotation,xref,params){var outline,{color:annotation,rect,outlines,opacity}=annotation,appearanceBuffer=["".concat(getPdfColor(annotation,!0)),"/R0 gs"],buffer=[];for(outline of outlines){buffer.length=0,buffer.push("".concat(numberToString(outline[0])," ").concat(numberToString(outline[1])," m"));for(var i=2,ii=outline.length;i(buffer.push("".concat(points[4]," ").concat(points[5]+1.3," m"),"".concat(points[6]," ").concat(points[7]+1.3," l"),"S"),[points[0],points[7],points[2],points[3]])})):this.data.popupRef=null}get overlaysTextContent(){return!0}}class SquigglyAnnotation extends MarkupAnnotation{constructor(params){super(params);var strokeColor,{dict:params,xref}=params;this.data.annotationType=AnnotationType.SQUIGGLY,(this.data.quadPoints=getQuadPoints(params,null))?this.appearance||(strokeColor=this.color?getPdfColorArray(this.color):[0,0,0],params=params.get("CA"),this._setDefaultAppearance({xref:xref,extra:"[] 0 d 1 w",strokeColor:strokeColor,strokeAlpha:params,pointsCallback:(buffer,points)=>{var dy=(points[1]-points[5])/6,shift=dy,x=points[4],y=points[5],xEnd=points[6];for(buffer.push("".concat(x," ").concat(y+shift," m"));shift=0===shift?dy:0,buffer.push("".concat(x+=2," ").concat(y+shift," l")),x(buffer.push("".concat((points[0]+points[4])/2," ")+"".concat((points[1]+points[5])/2," m"),"".concat((points[2]+points[6])/2," ")+"".concat((points[3]+points[7])/2," l"),"S"),[points[0],points[7],points[2],points[3]])})):this.data.popupRef=null}get overlaysTextContent(){return!0}}var _savedHasOwnCanvas=new WeakMap;class StampAnnotation extends MarkupAnnotation{constructor(params){super(params),_classPrivateFieldInitSpec(this,_savedHasOwnCanvas,null),this.data.annotationType=AnnotationType.STAMP,this.data.hasOwnCanvas=this.data.noRotate,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1}mustBeViewedWhenEditing(isEditing){var modifiedIds=1x>>>24!=255:x=>255!=(255&x)),ctx=(data&&(ctx.fillStyle="white",ctx.fillRect(0,0,width,height),ctx.drawImage(bitmap,0,0)),canvas.convertToBlob({type:"image/jpeg",quality:1}).then(blob=>blob.arrayBuffer())),bitmap=Name.get("XObject"),canvas=Name.get("Image"),image=new Dict(xref),smaskStream=(image.set("Type",bitmap),image.set("Subtype",canvas),image.set("BitsPerComponent",8),image.set("ColorSpace",Name.get("DeviceRGB")),image.set("Filter",Name.get("DCTDecode")),image.set("BBox",[0,0,width,height]),image.set("Width",width),image.set("Height",height),null);if(data){var alphaBuffer=new Uint8Array(buf32.length);if(FeatureTest.isLittleEndian)for(var i=0,ii=buf32.length;i>>24;else for(var _i47=0,_ii16=buf32.length;_i47<_ii16;_i47++)alphaBuffer[_i47]=255&buf32[_i47];data=new Dict(xref);data.set("Type",bitmap),data.set("Subtype",canvas),data.set("BitsPerComponent",8),data.set("ColorSpace",Name.get("DeviceGray")),data.set("Width",width),data.set("Height",height),smaskStream=new Stream(alphaBuffer,0,0,data)}return{imageStream:new Stream(await ctx,0,0,image),smaskStream:smaskStream,width:width,height:height}}static createNewDict(annotation,xref,_ref73){var{apRef:_ref73,ap}=_ref73,{oldAnnotation:annotation,rect,rotation,user}=annotation,stamp=annotation||new Dict(xref);return stamp.set("Type",Name.get("Annot")),stamp.set("Subtype",Name.get("Stamp")),stamp.set(annotation?"M":"CreationDate","D:".concat(getModificationDate())),stamp.set("Rect",rect),stamp.set("F",4),stamp.set("Border",[0,0,0]),stamp.set("Rotate",rotation),user&&stamp.set("T",stringToAsciiOrUTF16BE(user)),(_ref73||ap)&&(annotation=new Dict(xref),stamp.set("AP",annotation),_ref73?annotation.set("N",_ref73):annotation.set("N",ap)),stamp}static async createNewAppearanceStream(annotation,xref,params){var width,height,xobject,resources;return annotation.oldAnnotation?null:annotation.isSignature?_assertClassBrand(StampAnnotation,this,_createNewAppearanceStreamForDrawing).call(this,annotation,xref):(annotation=annotation["rotation"],{imageRef:params,width,height}=params.image,resources=new Dict(xref),xobject=new Dict(xref),resources.set("XObject",xobject),xobject.set("Im0",params),xobject="q ".concat(width," 0 0 ").concat(height," 0 0 cm /Im0 Do Q"),(params=new Dict(xref)).set("FormType",1),params.set("Subtype",Name.get("Form")),params.set("Type",Name.get("XObject")),params.set("BBox",[0,0,width,height]),params.set("Resources",resources),annotation&&(xref=getRotationMatrix(annotation,width,height),params.set("Matrix",xref)),(resources=new StringStream(xobject)).dict=params,resources)}}async function _createNewAppearanceStreamForDrawing(annotation,xref){var line,{areContours:annotation,color,rect,lines,thickness}=annotation,appearanceBuffer=["".concat(thickness," w 1 J 1 j"),"".concat(getPdfColor(color,annotation))];for(line of lines){appearanceBuffer.push("".concat(numberToString(line[4])," ").concat(numberToString(line[5])," m"));for(var c1x,c1y,c2x,c2y,x,y,i=6,ii=line.length;i>5&255,padded[i++]=length>>13&255,padded[i++]=length>>21&255,padded[i++]=length>>>29&255,i+=3,new Int32Array(16)),{k,r}=PARAMS;for(i=0;i>>32-rotate)|0,a=tmp;h0=h0+a|0,h1=h1+b|0,h2=h2+c|0,h3=h3+d|0}return new Uint8Array([255&h0,h0>>8&255,h0>>16&255,h0>>>24&255,255&h1,h1>>8&255,h1>>16&255,h1>>>24&255,255&h2,h2>>8&255,h2>>16&255,h2>>>24&255,255&h3,h3>>8&255,h3>>16&255,h3>>>24&255])}function decodeString(str){try{return stringToUTF8String(str)}catch(ex){return warn('UTF-8 decoding failed: "'.concat(ex,'".')),str}}class DatasetXMLParser extends SimpleXMLParser{constructor(options){super(options),this.node=null}onEndElement(name){var node=super.onEndElement(name);if(node&&"xfa:datasets"===name)throw this.node=node,new Error("Aborting DatasetXMLParser.")}}class DatasetReader{constructor(data){if(data.datasets)this.node=new SimpleXMLParser({hasAttributes:!0}).parseFromString(data.datasets).documentElement;else{var parser=new DatasetXMLParser({hasAttributes:!0});try{parser.parseFromString(data["xdp:xdp"])}catch(_unused11){}this.node=parser.node}}getValue(path){var first;return this.node&&(path=path&&this.node.searchNode(parseXFAPath(path),0))?"value"===(null==(first=path.firstChild)?void 0:first.nodeName)?path.children.map(child=>decodeString(child.textContent)):decodeString(path.textContent):""}}var _annotation=new WeakMap,_minX=new WeakMap,_minY=new WeakMap,_maxX=new WeakMap,_maxY=new WeakMap,_quadPoints=new WeakMap,_text=new WeakMap,_extraChars=new WeakMap,_lastIntersectingQuadIndex=new WeakMap,_canTakeExtraChars=new WeakMap,_SingleIntersector_brand=new WeakSet;class SingleIntersector{constructor(annotation){_classPrivateMethodInitSpec(this,_SingleIntersector_brand),_classPrivateFieldInitSpec(this,_annotation,void 0),_classPrivateFieldInitSpec(this,_minX,1/0),_classPrivateFieldInitSpec(this,_minY,1/0),_classPrivateFieldInitSpec(this,_maxX,-1/0),_classPrivateFieldInitSpec(this,_maxY,-1/0),_classPrivateFieldInitSpec(this,_quadPoints,void 0),_classPrivateFieldInitSpec(this,_text,[]),_classPrivateFieldInitSpec(this,_extraChars,[]),_classPrivateFieldInitSpec(this,_lastIntersectingQuadIndex,-1),_classPrivateFieldInitSpec(this,_canTakeExtraChars,!1),_classPrivateFieldSet(_annotation,this,annotation);for(var _quadPoints2=_classPrivateFieldSet(_quadPoints,this,annotation.data.quadPoints),i=0,ii=_quadPoints2.length;i=_classPrivateFieldGet(_maxX,other)||_classPrivateFieldGet(_maxX,this)<=_classPrivateFieldGet(_minX,other)||_classPrivateFieldGet(_minY,this)>=_classPrivateFieldGet(_maxY,other)||_classPrivateFieldGet(_maxY,this)<=_classPrivateFieldGet(_minY,other))}addGlyph(x,y,glyph){return _assertClassBrand(_SingleIntersector_brand,this,_intersects).call(this,x,y)?(0<_classPrivateFieldGet(_extraChars,this).length&&(_classPrivateFieldGet(_text,this).push(_classPrivateFieldGet(_extraChars,this).join("")),_classPrivateFieldGet(_extraChars,this).length=0),_classPrivateFieldGet(_text,this).push(glyph),_classPrivateFieldSet(_canTakeExtraChars,this,!0),!0):(this.disableExtraChars(),!1)}addExtraChar(char){_classPrivateFieldGet(_canTakeExtraChars,this)&&_classPrivateFieldGet(_extraChars,this).push(char)}disableExtraChars(){_classPrivateFieldGet(_canTakeExtraChars,this)&&(_classPrivateFieldSet(_canTakeExtraChars,this,!1),_classPrivateFieldGet(_extraChars,this).length=0)}setText(){_classPrivateFieldGet(_annotation,this).data.overlaidText=_classPrivateFieldGet(_text,this).join("")}}function _intersects(x,y){if(!(_classPrivateFieldGet(_minX,this)>=x||_classPrivateFieldGet(_maxX,this)<=x||_classPrivateFieldGet(_minY,this)>=y||_classPrivateFieldGet(_maxY,this)<=y)){var quadPoints=_classPrivateFieldGet(_quadPoints,this);if(8===quadPoints.length)return!0;if(0<=_classPrivateFieldGet(_lastIntersectingQuadIndex,this)){var i=_classPrivateFieldGet(_lastIntersectingQuadIndex,this);if(!(quadPoints[i]>=x||quadPoints[i+2]<=x||quadPoints[i+5]>=y||quadPoints[i+1]<=y))return!0;_classPrivateFieldSet(_lastIntersectingQuadIndex,this,-1)}for(var _i54=0,ii=quadPoints.length;_i54=x||quadPoints[_i54+2]<=x||quadPoints[_i54+5]>=y||quadPoints[_i54+1]<=y))return _classPrivateFieldSet(_lastIntersectingQuadIndex,this,_i54),!0}return!1}var _intersectors=new WeakMap;class Intersector{constructor(annotations){_classPrivateFieldInitSpec(this,_intersectors,new Map);for(var annotation of annotations)if(annotation.data.quadPoints){var otherIntersector,overlapping,intersector=new SingleIntersector(annotation);for([otherIntersector,overlapping]of _classPrivateFieldGet(_intersectors,this))otherIntersector.overlaps(intersector)&&(overlapping?overlapping.add(intersector):_classPrivateFieldGet(_intersectors,this).set(otherIntersector,new Set([intersector])));_classPrivateFieldGet(_intersectors,this).set(intersector,null)}}addGlyph(transform,width,height,glyph){var overlappingIntersectors,intersector,overlapping,x=transform[4]+width/2,y=transform[5]+height/2;for([intersector,overlapping]of _classPrivateFieldGet(_intersectors,this))overlappingIntersectors?overlappingIntersectors.has(intersector)?intersector.addGlyph(x,y,glyph):intersector.disableExtraChars():intersector.addGlyph(x,y,glyph)&&(overlappingIntersectors=overlapping)}addExtraChar(char){for(var intersector of _classPrivateFieldGet(_intersectors,this).keys())intersector.addExtraChar(char)}setText(){for(var intersector of _classPrivateFieldGet(_intersectors,this).keys())intersector.setText()}}class Word64{constructor(highInteger,lowInteger){this.high=0|highInteger,this.low=0|lowInteger}and(word){this.high&=word.high,this.low&=word.low}xor(word){this.high^=word.high,this.low^=word.low}shiftRight(places){32<=places?(this.low=this.high>>>places-32|0,this.high=0):(this.low=this.low>>>places|this.high<<32-places,this.high=this.high>>>places|0)}rotateRight(places){var low,high;32&places?(high=this.low,low=this.high):(low=this.low,high=this.high),this.low=low>>>(places&=31)|high<<32-places,this.high=high>>>places|low<<32-places}not(){this.high=~this.high,this.low=~this.low}add(word){var lowAdd=(this.low>>>0)+(word.low>>>0),word=(this.high>>>0)+(word.high>>>0);4294967295>>24&255,bytes[offset+1]=this.high>>16&255,bytes[offset+2]=this.high>>8&255,bytes[offset+3]=255&this.high,bytes[offset+4]=this.low>>>24&255,bytes[offset+5]=this.low>>16&255,bytes[offset+6]=this.low>>8&255,bytes[offset+7]=255&this.low}assign(word){this.high=word.high,this.low=word.low}}var calculate_sha_other_PARAMS={get k(){return shadow(this,"k",[new Word64(1116352408,3609767458),new Word64(1899447441,602891725),new Word64(3049323471,3964484399),new Word64(3921009573,2173295548),new Word64(961987163,4081628472),new Word64(1508970993,3053834265),new Word64(2453635748,2937671579),new Word64(2870763221,3664609560),new Word64(3624381080,2734883394),new Word64(310598401,1164996542),new Word64(607225278,1323610764),new Word64(1426881987,3590304994),new Word64(1925078388,4068182383),new Word64(2162078206,991336113),new Word64(2614888103,633803317),new Word64(3248222580,3479774868),new Word64(3835390401,2666613458),new Word64(4022224774,944711139),new Word64(264347078,2341262773),new Word64(604807628,2007800933),new Word64(770255983,1495990901),new Word64(1249150122,1856431235),new Word64(1555081692,3175218132),new Word64(1996064986,2198950837),new Word64(2554220882,3999719339),new Word64(2821834349,766784016),new Word64(2952996808,2566594879),new Word64(3210313671,3203337956),new Word64(3336571891,1034457026),new Word64(3584528711,2466948901),new Word64(113926993,3758326383),new Word64(338241895,168717936),new Word64(666307205,1188179964),new Word64(773529912,1546045734),new Word64(1294757372,1522805485),new Word64(1396182291,2643833823),new Word64(1695183700,2343527390),new Word64(1986661051,1014477480),new Word64(2177026350,1206759142),new Word64(2456956037,344077627),new Word64(2730485921,1290863460),new Word64(2820302411,3158454273),new Word64(3259730800,3505952657),new Word64(3345764771,106217008),new Word64(3516065817,3606008344),new Word64(3600352804,1432725776),new Word64(4094571909,1467031594),new Word64(275423344,851169720),new Word64(430227734,3100823752),new Word64(506948616,1363258195),new Word64(659060556,3750685593),new Word64(883997877,3785050280),new Word64(958139571,3318307427),new Word64(1322822218,3812723403),new Word64(1537002063,2003034995),new Word64(1747873779,3602036899),new Word64(1955562222,1575990012),new Word64(2024104815,1125592928),new Word64(2227730452,2716904306),new Word64(2361852424,442776044),new Word64(2428436474,593698344),new Word64(2756734187,3733110249),new Word64(3204031479,2999351573),new Word64(3329325298,3815920427),new Word64(3391569614,3928383900),new Word64(3515267271,566280711),new Word64(3940187606,3454069534),new Word64(4118630271,4000239992),new Word64(116418474,1914138554),new Word64(174292421,2731055270),new Word64(289380356,3203993006),new Word64(460393269,320620315),new Word64(685471733,587496836),new Word64(852142971,1086792851),new Word64(1017036298,365543100),new Word64(1126000580,2618297676),new Word64(1288033470,3409855158),new Word64(1501505948,4234509866),new Word64(1607167915,987167468),new Word64(1816402316,1246189591)])}};function ch(result,x,y,z,tmp){result.assign(x),result.and(y),tmp.assign(x),tmp.not(),tmp.and(z),result.xor(tmp)}function maj(result,x,y,z,tmp){result.assign(x),result.and(y),tmp.assign(x),tmp.and(z),result.xor(tmp),tmp.assign(y),tmp.and(z),result.xor(tmp)}function sigma(result,x,tmp){result.assign(x),result.rotateRight(28),tmp.assign(x),tmp.rotateRight(34),result.xor(tmp),tmp.assign(x),tmp.rotateRight(39),result.xor(tmp)}function sigmaPrime(result,x,tmp){result.assign(x),result.rotateRight(14),tmp.assign(x),tmp.rotateRight(18),result.xor(tmp),tmp.assign(x),tmp.rotateRight(41),result.xor(tmp)}function littleSigma(result,x,tmp){result.assign(x),result.rotateRight(1),tmp.assign(x),tmp.rotateRight(8),result.xor(tmp),tmp.assign(x),tmp.shiftRight(7),result.xor(tmp)}function littleSigmaPrime(result,x,tmp){result.assign(x),result.rotateRight(19),tmp.assign(x),tmp.rotateRight(61),result.xor(tmp),tmp.assign(x),tmp.shiftRight(6),result.xor(tmp)}function calculateSHA512(data,offset,length){for(var h0,h1,h2,h3,h4,h5,h6,j,mode384=3>>29&255,padded[i++]=length>>21&255,padded[i++]=length>>13&255,padded[i++]=length>>5&255,padded[i++]=length<<3&255,new Array(80));for(i=0;i<80;i++)w[i]=new Word64(0,0);var tmp3,result,k=calculate_sha_other_PARAMS["k"],a=new Word64(0,0),b=new Word64(0,0),c=new Word64(0,0),d=new Word64(0,0),e=new Word64(0,0),f=new Word64(0,0),g=new Word64(0,0),h=new Word64(0,0),t1=new Word64(0,0),t2=new Word64(0,0),tmp1=new Word64(0,0),tmp2=new Word64(0,0);for(i=0;i>>n|x<<32-n}function calculate_sha256_ch(x,y,z){return x&y^~x&z}function calculate_sha256_maj(x,y,z){return x&y^x&z^y&z}function calculate_sha256_sigma(x){return rotr(x,2)^rotr(x,13)^rotr(x,22)}function calculate_sha256_sigmaPrime(x){return rotr(x,6)^rotr(x,11)^rotr(x,25)}function calculate_sha256_littleSigma(x){return rotr(x,7)^rotr(x,18)^x>>>3}function calculate_sha256_littleSigmaPrime(x){return rotr(x,17)^rotr(x,19)^x>>>10}function calculateSHA256(data,offset,length){for(var h0=1779033703,h1=3144134277,h2=1013904242,h3=2773480762,h4=1359893119,h5=2600822924,h6=528734635,h7=1541459225,paddedLength=64*Math.ceil((length+9)/64),padded=new Uint8Array(paddedLength),i=0;i>>29&255,padded[i++]=length>>21&255,padded[i++]=length>>13&255,padded[i++]=length>>5&255,padded[i++]=length<<3&255,new Uint32Array(64)),k=calculate_sha256_PARAMS["k"];for(i=0;i>24&255,h0>>16&255,h0>>8&255,255&h0,h1>>24&255,h1>>16&255,h1>>8&255,255&h1,h2>>24&255,h2>>16&255,h2>>8&255,255&h2,h3>>24&255,h3>>16&255,h3>>8&255,255&h3,h4>>24&255,h4>>16&255,h4>>8&255,255&h4,h5>>24&255,h5>>16&255,h5>>8&255,255&h5,h6>>24&255,h6>>16&255,h6>>8&255,255&h6,h7>>24&255,h7>>16&255,h7>>8&255,255&h7])}var chunkSize=512;class DecryptStream extends DecodeStream{constructor(str,maybeLength,decrypt){super(maybeLength),this.str=str,this.dict=str.dict,this.decrypt=decrypt,this.nextChunk=null,this.initialized=!1}readBlock(){var chunk,_this$nextChunk,newLength;this.initialized?chunk=this.nextChunk:(chunk=this.str.getBytes(chunkSize),this.initialized=!0),null!=chunk&&chunk.length?(this.nextChunk=this.str.getBytes(chunkSize),_this$nextChunk=0<(null==(_this$nextChunk=this.nextChunk)?void 0:_this$nextChunk.length),chunk=(0,this.decrypt)(chunk,!_this$nextChunk),newLength=(_this$nextChunk=this.bufferLength)+chunk.length,this.ensureBuffer(newLength).set(chunk,_this$nextChunk),this.bufferLength=newLength):this.eof=!0}}class ARCFourCipher{constructor(key){this.a=0,this.b=0;for(var s=new Uint8Array(256),keyLength=key.length,i=0;i<256;++i)s[i]=i;for(var _i48=0,j=0;_i48<256;++_i48){var tmp=s[_i48],j=j+tmp+key[_i48%keyLength]&255;s[_i48]=s[j],s[j]=tmp}this.s=s}encryptBlock(data){for(var a=this.a,b=this.b,s=this.s,n=data.length,output=new Uint8Array(n),i=0;ii<128?i<<1:i<<1^27)),this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(cipherKey){unreachable("Cannot call `_expandKey` on the base class")}_decrypt(input,key){var u,v,state=new Uint8Array(16);state.set(input);for(var j=0,k=this._keySize;j<16;++j,++k)state[j]^=key[k];for(var i=this._cyclesOfRepetition-1;1<=i;--i){t=state[13],state[13]=state[9],state[9]=state[5],state[5]=state[1],state[1]=t,t=state[14],u=state[10],state[14]=state[6],state[10]=state[2],state[6]=t,state[2]=u,t=state[15],u=state[11],v=state[7],state[15]=state[3],state[11]=t,state[7]=u,state[3]=v;for(var _j0=0;_j0<16;++_j0)state[_j0]=this._inv_s[state[_j0]];for(var _j1=0,_k2=16*i;_j1<16;++_j1,++_k2)state[_j1]^=key[_k2];for(var _j10=0;_j10<16;_j10+=4){var s0=this._mix[state[_j10]],s1=this._mix[state[_j10+1]],s2=this._mix[state[_j10+2]],s3=this._mix[state[_j10+3]],t=s0^s1>>>8^s1<<24^s2>>>16^s2<<16^s3>>>24^s3<<8;state[_j10]=t>>>24&255,state[_j10+1]=t>>16&255,state[_j10+2]=t>>8&255,state[_j10+3]=255&t}}t=state[13],state[13]=state[9],state[9]=state[5],state[5]=state[1],state[1]=t,t=state[14],u=state[10],state[14]=state[6],state[10]=state[2],state[6]=t,state[2]=u,t=state[15],u=state[11],v=state[7],state[15]=state[3],state[11]=t,state[7]=u,state[3]=v;for(var _j11=0;_j11<16;++_j11)state[_j11]=this._inv_s[state[_j11]],state[_j11]^=key[_j11];return state}_encrypt(input,key){var u,v,s=this._s,state=new Uint8Array(16);state.set(input);for(var j=0;j<16;++j)state[j]^=key[j];for(var i=1;ii-32;){for(var combinedLength=password.length+k.length+userBytes.length,combinedArray=new Uint8Array(combinedLength),writeOffset=0,k1=(combinedArray.set(password,0),writeOffset+=password.length,combinedArray.set(k,writeOffset),writeOffset+=k.length,combinedArray.set(userBytes,writeOffset),new Uint8Array(64*combinedLength)),j=0,pos=0;j<64;j++,pos+=combinedLength)k1.set(combinedArray,pos);e=new AES128Cipher(k.subarray(0,16)).encrypt(k1,k.subarray(16,32)),writeOffset=Math.sumPrecise(e.slice(0,16))%3;0==writeOffset?k=calculateSHA256(e,0,e.length):1==writeOffset?k=calculateSHA384(e,0,e.length):2==writeOffset&&(k=calculateSHA512(e,0,e.length)),i++}return k.subarray(0,32)}}class CipherTransform{constructor(stringCipherConstructor,streamCipherConstructor){this.StringCipherConstructor=stringCipherConstructor,this.StreamCipherConstructor=streamCipherConstructor}createStream(stream,length){var cipher=new this.StreamCipherConstructor;return new DecryptStream(stream,length,function(data,finalize){return cipher.decryptBlock(data,finalize)})}decryptString(s){var cipher=new this.StringCipherConstructor,s=stringToBytes(s);return bytesToString(cipher.decryptBlock(s,!0))}encryptString(s){var _data4,buf,pad,cipher=new this.StringCipherConstructor;return cipher instanceof AESBaseCipher?(pad=16-s.length%16,s+=String.fromCharCode(pad).repeat(pad),pad=new Uint8Array(16),crypto.getRandomValues(pad),_data4=stringToBytes(s),_data4=cipher.encrypt(_data4,pad),(buf=new Uint8Array(16+_data4.length)).set(pad),buf.set(_data4,16),bytesToString(buf)):(pad=stringToBytes(s),bytesToString(pad=cipher.encrypt(pad)))}}var _CipherTransformFactory_brand=new WeakSet;class CipherTransformFactory{static get _defaultPasswordBytes(){return shadow(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]))}constructor(dict,_fileId,_password){_classPrivateMethodInitSpec(this,_CipherTransformFactory_brand);var filter=dict.get("Filter");if(!isName(filter,"Standard"))throw new FormatError("unknown encryption method");this.filterName=filter.name;filter=(this.dict=dict).get("V");if(!Number.isInteger(filter)||1!==filter&&2!==filter&&4!==filter&&5!==filter)throw new FormatError("unsupported encryption algorithm");this.algorithm=filter;var _keyLength=dict.get("Length");if(_keyLength||(filter<=3?_keyLength=40:(cfDict=dict.get("CF"),streamCryptoName=dict.get("StmF"),cfDict instanceof Dict&&streamCryptoName instanceof Name&&(cfDict.suppressEncryption=!0,(_keyLength=(null==(cfDict=cfDict.get(streamCryptoName.name))?void 0:cfDict.get("Length"))||128)<40)&&(_keyLength<<=3))),!Number.isInteger(_keyLength)||_keyLength<40||_keyLength%8!=0)throw new FormatError("invalid key length");var passwordBytes,userValidationSalt,ownerEncryption,userEncryption,perms,ownerValidationSalt,uBytes,streamCryptoName=stringToBytes(dict.get("O")),cfDict=stringToBytes(dict.get("U")),_ownerPassword=streamCryptoName.subarray(0,32),_userPassword=cfDict.subarray(0,32),_flags2=dict.get("P"),_revision=dict.get("R"),_encryptMetadata=(4===filter||5===filter)&&!1!==dict.get("EncryptMetadata"),_fileId=(this.encryptMetadata=_encryptMetadata,stringToBytes(_fileId));if(_password){if(6===_revision)try{_password=utf8StringToString(_password)}catch(_unused12){warn("CipherTransformFactory: Unable to convert UTF8 encoded password.")}passwordBytes=stringToBytes(_password)}if(!(ownerValidationSalt=5!==filter?_assertClassBrand(_CipherTransformFactory_brand,this,_prepareKeyData).call(this,_fileId,passwordBytes,_ownerPassword,_userPassword,_flags2,_revision,_keyLength,_encryptMetadata):(ownerValidationSalt=streamCryptoName.subarray(32,40),streamCryptoName=streamCryptoName.subarray(40,48),uBytes=cfDict.subarray(0,48),userValidationSalt=cfDict.subarray(32,40),cfDict=cfDict.subarray(40,48),ownerEncryption=stringToBytes(dict.get("OE")),userEncryption=stringToBytes(dict.get("UE")),perms=stringToBytes(dict.get("Perms")),_assertClassBrand(_CipherTransformFactory_brand,this,_createEncryptionKey).call(this,_revision,passwordBytes,_ownerPassword,ownerValidationSalt,streamCryptoName,uBytes,_userPassword,userValidationSalt,cfDict,ownerEncryption,userEncryption,perms)))){if(!_password)throw new PasswordException("No password given",PasswordResponses.NEED_PASSWORD);streamCryptoName=_assertClassBrand(_CipherTransformFactory_brand,this,_decodeUserPassword).call(this,passwordBytes,_ownerPassword,_revision,_keyLength);ownerValidationSalt=_assertClassBrand(_CipherTransformFactory_brand,this,_prepareKeyData).call(this,_fileId,streamCryptoName,_ownerPassword,_userPassword,_flags2,_revision,_keyLength,_encryptMetadata)}if(!ownerValidationSalt)throw new PasswordException("Incorrect Password",PasswordResponses.INCORRECT_PASSWORD);4===filter&&ownerValidationSalt.length<16?(this.encryptionKey=new Uint8Array(16),this.encryptionKey.set(ownerValidationSalt)):this.encryptionKey=ownerValidationSalt,4<=filter&&((uBytes=dict.get("CF"))instanceof Dict&&(uBytes.suppressEncryption=!0),this.cf=uBytes,this.stmf=dict.get("StmF")||Name.get("Identity"),this.strf=dict.get("StrF")||Name.get("Identity"),this.eff=dict.get("EFF")||this.stmf)}createCipherTransform(num,gen){var key;return 4===this.algorithm||5===this.algorithm?new CipherTransform(_assertClassBrand(_CipherTransformFactory_brand,this,_buildCipherConstructor).call(this,this.cf,this.strf,num,gen,this.encryptionKey),_assertClassBrand(_CipherTransformFactory_brand,this,_buildCipherConstructor).call(this,this.cf,this.stmf,num,gen,this.encryptionKey)):(key=_assertClassBrand(_CipherTransformFactory_brand,this,_buildObjectKey).call(this,num,gen,this.encryptionKey,!1),num=function(){return new ARCFourCipher(key)},new CipherTransform(num,num))}}function _createEncryptionKey(revision,password,ownerPassword,ownerValidationSalt,ownerKeySalt,uBytes,userPassword,userValidationSalt,userKeySalt,ownerEncryption,userEncryption,perms){password=password?(passwordLength=Math.min(127,password.length),password.subarray(0,passwordLength)):[];var passwordLength=new(6===revision?PDF20:PDF17);return passwordLength.checkUserPassword(password,userValidationSalt,userPassword)?passwordLength.getUserKey(password,userKeySalt,userEncryption):password.length&&passwordLength.checkOwnerPassword(password,ownerValidationSalt,uBytes,ownerPassword)?passwordLength.getOwnerKey(password,ownerKeySalt,uBytes,ownerEncryption):null}function _prepareKeyData(fileId,password,ownerPassword,userPassword,flags,revision,keyLength,encryptMetadata){var hashDataSize=40+ownerPassword.length+fileId.length,hashData=new Uint8Array(hashDataSize),i=0;if(password)for(n=Math.min(32,password.length);i>8&255,hashData[i++]=flags>>16&255,hashData[i++]=flags>>>24&255,hashData.set(fileId,i),i+=fileId.length,4<=revision&&!encryptMetadata&&(hashData.fill(255,i,i+4),i+=4);var hash=calculateMD5(hashData,0,i),keyLengthInBytes=keyLength>>3;if(3<=revision)for(j=0;j<50;++j)hash=calculateMD5(hash,0,keyLengthInBytes);var encryptionKey=hash.subarray(0,keyLengthInBytes);if(3<=revision){hashData.set(_CipherTransformFactory._defaultPasswordBytes,i=0),hashData.set(fileId,i+=32),i+=fileId.length;for(var checkData=new ARCFourCipher(encryptionKey).encryptBlock(calculateMD5(hashData,0,i)),n=encryptionKey.length,derivedKey=new Uint8Array(n),j=1;j<=19;++j){for(var k=0;kuserPassword[k]===data)?encryptionKey:null}function _decodeUserPassword(password,ownerPassword,revision,keyLength){for(var hashData=new Uint8Array(32),i=0,n=Math.min(32,password.length);i>3;if(3<=revision)for(j=0;j<50;++j)hash=calculateMD5(hash,0,hash.length);if(3<=revision)for(var userPassword=ownerPassword,derivedKey=new Uint8Array(keyLengthInBytes),j=19;0<=j;j--){for(var k=0;k>8&255,key[i++]=num>>16&255,key[i++]=255&gen,key[i++]=gen>>8&255,isAes&&(key[i++]=115,key[i++]=65,key[i++]=108,key[i++]=84),calculateMD5(key,0,i).subarray(0,Math.min(n+5,16))}function _buildCipherConstructor(cf,name,num,gen,key){if(!(name instanceof Name))throw new FormatError("Invalid crypt filter name.");var self=this,cf=cf.get(name.name),name=null==cf?void 0:cf.get("CFM");if(!name||"None"===name.name)return function(){return new NullCipher};if("V2"===name.name)return function(){return new ARCFourCipher(_assertClassBrand(_CipherTransformFactory_brand,self,_buildObjectKey).call(self,num,gen,key,!1))};if("AESV2"===name.name)return function(){return new AES128Cipher(_assertClassBrand(_CipherTransformFactory_brand,self,_buildObjectKey).call(self,num,gen,key,!0))};if("AESV3"===name.name)return function(){return new AES256Cipher(key)};throw new FormatError("Unknown crypto method")}var _CipherTransformFactory=CipherTransformFactory,_firstXRefStmPos=new WeakMap;class XRef{constructor(stream,pdfManager){_classPrivateFieldInitSpec(this,_firstXRefStmPos,null),this.stream=stream,this.pdfManager=pdfManager,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new RefSet,this._newPersistentRefNum=null,this._newTemporaryRefNum=null,this._persistentRefsCache=null}getNewPersistentRef(obj){null===this._newPersistentRefNum&&(this._newPersistentRefNum=this.entries.length||1);var num=this._newPersistentRefNum++;return this._cacheMap.set(num,obj),Ref.get(num,0)}getNewTemporaryRef(){if(null===this._newTemporaryRefNum&&(this._newTemporaryRefNum=this.entries.length||1,this._newPersistentRefNum)){this._persistentRefsCache=new Map;for(var i=this._newTemporaryRefNum;i=data.length);)token+=String.fromCharCode(ch),ch=data[offset];return token}(buffer,position);if(token.startsWith("xref")&&(4===token.length||/\s/.test(token[4])))position+=skipUntil(buffer,position,trailerBytes),trailers.push(position),position+=skipUntil(buffer,position,startxrefBytes);else if(m=objRegExp.exec(token)){var num=0|m[1],m=0|m[2],startPos=position+token.length,contentLength=void 0,updateEntries=!1;if(this.entries[num]){if(this.entries[num].gen===m)try{new Parser({lexer:new Lexer(stream.makeSubStream(startPos))}).getObj(),updateEntries=!0}catch(ex){ex instanceof ParserEOFException?warn("indexObjects -- checking object (".concat(token,'): "').concat(ex,'".')):updateEntries=!0}}else updateEntries=!0;updateEntries&&(this.entries[num]={offset:position-stream.start,gen:m,uncompressed:!0}),gEndobjRegExp.lastIndex=startPos;var updateEntries=gEndobjRegExp.exec(bufferStr),num=(updateEntries?(contentLength=gEndobjRegExp.lastIndex+1-position,"endobj"!==updateEntries[1]&&(warn('indexObjects: Found "'.concat(updateEntries[1],'" inside of another "obj", ')+'caused by missing "endobj" -- trying to recover.'),contentLength-=updateEntries[1].length+1)):contentLength=length-position,buffer.subarray(position,position+contentLength)),m=skipUntil(num,0,xrefBytes);m!(a instanceof Ref&&deletedAnnotations.has(a)));for({ref}of(await AnnotationFactory.saveNewAnnotations(handler,task,annotations,imagePromises,changes)).annotations)ref instanceof Ref&&!existingAnnotations.has(ref)&&annotationsArray.push(ref);var deletedRef,handler=pageDict.clone();handler.set("Annots",annotationsArray),changes.put(this.ref,{data:handler});for(deletedRef of deletedAnnotations)changes.put(deletedRef,{data:null})}async save(handler,task,annotationStorage,changes){var annotation,partialEvaluator=_assertClassBrand(_Page_brand,this,_createPartialEvaluator).call(this,handler),promises=[];for(annotation of await this._parsedAnnotations)promises.push(annotation.save(partialEvaluator,task,annotationStorage,changes).catch(function(reason){return warn("save - ignoring annotation data during "+'"'.concat(task.name,'" task: "').concat(reason,'".')),null}));return Promise.all(promises)}async loadResources(keys){var _classPrivateFieldGet6;await(null!=(_classPrivateFieldGet6=_classPrivateFieldGet(_resourcesPromise,this))?_classPrivateFieldGet6:_classPrivateFieldSet(_resourcesPromise,this,this.pdfManager.ensure(this,"resources"))),await ObjectLoader.load(this.resources,keys,this.xref)}async getOperatorList(_ref76){var{handler,sink,task,intent,cacheKey,annotationStorage=null,modifiedIds=null}=_ref76,_ref76=this.getContentStream(),resourcesPromise=this.loadResources(RESOURCES_KEYS_OPERATOR_LIST),partialEvaluator=_assertClassBrand(_Page_brand,this,_createPartialEvaluator).call(this,handler),newAnnotsByPage=this.xfaFactory?null:getNewAnnotationsMap(annotationStorage),newAnnots=null==newAnnotsByPage?void 0:newAnnotsByPage.get(this.pageIndex),newAnnotsByPage=Promise.resolve(null),deletedAnnotations=null;if(newAnnots){var imagePromises,bitmapId,bitmap,annotationGlobalsPromise=this.pdfManager.ensureDoc("annotationGlobals"),missingBitmaps=new Set;for({bitmapId,bitmap}of newAnnots)!bitmapId||bitmap||missingBitmaps.has(bitmapId)||missingBitmaps.add(bitmapId);var isOffscreenCanvasSupported=this.evaluatorOptions["isOffscreenCanvasSupported"];if(0{var[_ref77]=_ref77;return _ref77?AnnotationFactory.printNewAnnotations(_ref77,partialEvaluator,task,newAnnots,imagePromises):null})}var isOffscreenCanvasSupported=Promise.all([_ref76,resourcesPromise]).then(async _ref78=>{var[_ref78]=_ref78,resources=await _assertClassBrand(_Page_brand,this,_getMergedResources).call(this,_ref78.dict,RESOURCES_KEYS_OPERATOR_LIST),opList=new OperatorList(intent,sink);return handler.send("StartRenderPage",{transparency:partialEvaluator.hasBlendModes(resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:cacheKey}),await partialEvaluator.getOperatorList({stream:_ref78,task:task,resources:resources,operatorList:opList}),opList}),[pageOpList,annotations,newAnnotations]=await Promise.all([isOffscreenCanvasSupported,this._parsedAnnotations,newAnnotsByPage]);if(newAnnotations){for(var annotations=annotations.filter(a=>!(a.ref&&deletedAnnotations.has(a.ref))),i=0,ii=newAnnotations.length;ia.ref&&isRefsEqual(a.ref,newAnnotation.refToReplace)))&&(annotations.splice(j,1,newAnnotation),newAnnotations.splice(_i53--,1),_ii18--),i=_i53,ii=_ii18}(i,ii);annotations=annotations.concat(newAnnotations)}if(0===annotations.length||intent&RenderingIntentFlag.ANNOTATIONS_DISABLE)pageOpList.flush(!0);else{var _annotation2,renderForms=!!(intent&RenderingIntentFlag.ANNOTATIONS_FORMS),isEditing=!!(intent&RenderingIntentFlag.IS_EDITING),intentAny=!!(intent&RenderingIntentFlag.ANY),intentDisplay=!!(intent&RenderingIntentFlag.DISPLAY),intentPrint=!!(intent&RenderingIntentFlag.PRINT),opListPromises=[];for(_annotation2 of annotations)(intentAny||intentDisplay&&_annotation2.mustBeViewed(annotationStorage,renderForms)&&_annotation2.mustBeViewedWhenEditing(isEditing,modifiedIds)||intentPrint&&_annotation2.mustBePrinted(annotationStorage))&&opListPromises.push(_annotation2.getOperatorList(partialEvaluator,task,intent,annotationStorage).catch(function(reason){return warn("getOperatorList - ignoring annotation data during "+'"'.concat(task.name,'" task: "').concat(reason,'".')),{opList:null,separateForm:!1,separateCanvas:!1}}));var opList,separateForm,separateCanvas,form=!1,canvas=!1;for({opList,separateForm,separateCanvas}of await Promise.all(opListPromises))pageOpList.addOpList(opList),form=form||separateForm,canvas=canvas||separateCanvas;pageOpList.flush(!0,{form:form,canvas:canvas})}return{length:pageOpList.totalLength}}async extractTextContent(_ref79){var{handler:_ref79,task,includeMarkedContent,disableNormalization,sink,intersector=null}=_ref79,contentStreamPromise=this.getContentStream(),resourcesPromise=this.loadResources(RESOURCES_KEYS_TEXT_CONTENT),langPromise=this.pdfManager.ensureCatalog("lang"),[contentStreamPromise,,resourcesPromise]=await Promise.all([contentStreamPromise,resourcesPromise,langPromise]),langPromise=await _assertClassBrand(_Page_brand,this,_getMergedResources).call(this,contentStreamPromise.dict,RESOURCES_KEYS_TEXT_CONTENT);return _assertClassBrand(_Page_brand,this,_createPartialEvaluator).call(this,_ref79).getTextContent({stream:contentStreamPromise,task:task,resources:langPromise,includeMarkedContent:includeMarkedContent,disableNormalization:disableNormalization,sink:sink,viewBox:this.view,lang:resourcesPromise,intersector:intersector})}async getStructTree(){var structTreeRoot=await this.pdfManager.ensureCatalog("structTreeRoot");if(!structTreeRoot)return null;await this._parsedAnnotations;try{var structTree=await this.pdfManager.ensure(this,"_parseStructTree",[structTreeRoot]);return await this.pdfManager.ensure(structTree,"serializable")}catch(ex){return warn('getStructTree: "'.concat(ex,'".')),null}}_parseStructTree(structTreeRoot){structTreeRoot=new StructTreePage(structTreeRoot,this.pageDict);return structTreeRoot.parse(this.ref),structTreeRoot}async getAnnotationsData(handler,task,intent){var annotations=await this._parsedAnnotations;if(0===annotations.length)return annotations;var partialEvaluator,annotation,intersector,annotationsData=[],textContentPromises=[],intentAny=!!(intent&RenderingIntentFlag.ANY),intentDisplay=!!(intent&RenderingIntentFlag.DISPLAY),intentPrint=!!(intent&RenderingIntentFlag.PRINT),highlightedAnnotations=[];for(annotation of annotations){var isVisible=intentAny||intentDisplay&&annotation.viewable;(isVisible||intentPrint&&annotation.printable)&&annotationsData.push(annotation.data),annotation.hasTextContent&&isVisible?(null==partialEvaluator&&(partialEvaluator=_assertClassBrand(_Page_brand,this,_createPartialEvaluator).call(this,handler)),textContentPromises.push(annotation.extractTextContent(partialEvaluator,task,[-1/0,-1/0,1/0,1/0]).catch(function(reason){warn('getAnnotationsData - ignoring textContent during "'.concat(task.name,'" task: "').concat(reason,'".'))}))):annotation.overlaysTextContent&&isVisible&&highlightedAnnotations.push(annotation)}return 0{intersector.setText()}))),await Promise.all(textContentPromises),annotationsData}get annotations(){var annots=_assertClassBrand(_Page_brand,this,_getInheritableProperty).call(this,"Annots");return shadow(this,"annotations",Array.isArray(annots)?annots:[])}get _parsedAnnotations(){var promise=this.pdfManager.ensure(this,"annotations").then(async annots=>{if(0===annots.length)return annots;var[annotationGlobals,fieldObjects]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureDoc("fieldObjects")]);if(!annotationGlobals)return[];var annotationRef,orphanFields=null==fieldObjects?void 0:fieldObjects.orphanFields,annotationPromises=[];for(annotationRef of annots)annotationPromises.push(AnnotationFactory.create(this.xref,annotationRef,annotationGlobals,this._localIdFactory,!1,orphanFields,this.ref).catch(function(reason){return warn('_parsedAnnotations: "'.concat(reason,'".')),null}));var popupAnnotations,widgetAnnotations,annotation,sortedAnnotations=[];for(annotation of await Promise.all(annotationPromises))annotation&&(annotation instanceof WidgetAnnotation?widgetAnnotations=widgetAnnotations||[]:annotation instanceof PopupAnnotation?popupAnnotations=popupAnnotations||[]:sortedAnnotations).push(annotation);return widgetAnnotations&&sortedAnnotations.push(...widgetAnnotations),popupAnnotations&&sortedAnnotations.push(...popupAnnotations),sortedAnnotations});return shadow(this,"_parsedAnnotations",promise)}get jsActions(){return shadow(this,"jsActions",collectActions(this.xref,this.pageDict,PageActionEventType))}}function _createPartialEvaluator(handler){return new PartialEvaluator({xref:this.xref,handler:handler,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})}function _getInheritableProperty(key){var value=getInheritableProperty({dict:this.pageDict,key:key,getArray:1{obj instanceof Dict&&(annotation.oldAnnotation=obj.clone())},()=>{warn("Cannot fetch `oldAnnotation` for: ".concat(ref,"."))})),delete annotation.id):warn("A non-linked annotation cannot be modified: ".concat(annotation.id))}(annotation);await Promise.all(promises)}async function _getMergedResources(streamDict,keys){streamDict=null==streamDict?void 0:streamDict.get("Resources");return streamDict instanceof Dict&&streamDict.size?(await ObjectLoader.load(streamDict,keys,this.xref),Dict.merge({xref:this.xref,dictArray:[streamDict,this.resources],mergeSubDicts:!0})):this.resources}var PDF_HEADER_SIGNATURE=new Uint8Array([37,80,68,70,45]),STARTXREF_SIGNATURE=new Uint8Array([115,116,97,114,116,120,114,101,102]),ENDOBJ_SIGNATURE=new Uint8Array([101,110,100,111,98,106]);function find(stream,signature){var limit=2[e,null]));if(xfa instanceof BaseStream&&!xfa.isEmpty)entries.set("xdp:xdp",xfa);else{if(!Array.isArray(xfa)||0===xfa.length)return null;for(var i=0,ii=xfa.length;i{}),_assertClassBrand(_PDFDocument_brand,this,_loadXfaImages).call(this)])}serializeXfaData(annotationStorage){return this.xfaFactory?this.xfaFactory.serializeData(annotationStorage):null}get version(){return this.catalog.version||_classPrivateFieldGet(_version,this)}get formInfo(){var formInfo={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},acroForm=this.catalog["acroForm"];if(acroForm)try{var fields=acroForm.get("Fields"),hasFields=Array.isArray(fields)&&0{var[_ref80,ref]=_ref80;return new Page({pdfManager:this.pdfManager,xref:this.xref,pageIndex:pageIndex,pageDict:_ref80,ref:ref,globalIdFactory:this._globalIdFactory,fontCache:catalog.fontCache,builtInCMapCache:catalog.builtInCMapCache,standardFontDataCache:catalog.standardFontDataCache,globalColorSpaceCache:catalog.globalColorSpaceCache,globalImageCache:catalog.globalImageCache,systemFontCache:catalog.systemFontCache,nonBlendModesSet:catalog.nonBlendModesSet,xfaFactory:xfaFactory})}),_classPrivateFieldGet(_pagePromises,this).set(pageIndex,cachedPromise),cachedPromise)}async checkFirstPage(){var recoveryMode=0{}):promise=Promise.resolve(new Page({pdfManager:pdfManager,xref:this.xref,pageIndex:pageIndex,pageDict:pageDict,ref:ref,globalIdFactory:this._globalIdFactory,fontCache:catalog.fontCache,builtInCMapCache:catalog.builtInCMapCache,standardFontDataCache:catalog.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:catalog.globalImageCache,systemFontCache:catalog.systemFontCache,nonBlendModesSet:catalog.nonBlendModesSet,xfaFactory:null})),_classPrivateFieldGet(_pagePromises,this).set(pageIndex,promise)}catalog.setActualNumPages(pagesTree.size)}}async fontFallback(id,handler){var translatedFont,{catalog,pdfManager}=this;for(translatedFont of await Promise.all(catalog.fontCache))if(translatedFont.loadedName===id)return void translatedFont.fallback(handler,pdfManager.evaluatorOptions)}async cleanup(){return this.catalog?this.catalog.cleanup(0{if(!formInfo.hasFields)return null;var annotationGlobals=await this.annotationGlobals;if(!annotationGlobals)return null;var fieldRef,formInfo=annotationGlobals["acroForm"],visitedRefs=new RefSet,allFields=Object.create(null),fieldPromises=new Map,orphanFields=new RefSetCache;for(fieldRef of formInfo.get("Fields"))await _assertClassBrand(_PDFDocument_brand,this,_collectFieldObjects).call(this,"",null,fieldRef,fieldPromises,annotationGlobals,visitedRefs,orphanFields);var name,promises,allPromises=[];for([name,promises]of fieldPromises)await async function(name){allPromises.push(Promise.all(promises).then(fields=>{0<(fields=fields.filter(field=>!!field)).length&&(allFields[name]=fields)}))}(name);return await Promise.all(allPromises),{allFields:0fieldObject.some(object=>null!==object.actions))}get calculationOrderIds(){var _this$catalog$acroFor=null==(_this$catalog$acroFor=this.catalog.acroForm)?void 0:_this$catalog$acroFor.get("CO");if(!Array.isArray(_this$catalog$acroFor)||0===_this$catalog$acroFor.length)return shadow(this,"calculationOrderIds",null);var id,ids=[];for(id of _this$catalog$acroFor)id instanceof Ref&&ids.push(id.toString());return shadow(this,"calculationOrderIds",ids.length?ids:null)}get annotationGlobals(){return shadow(this,"annotationGlobals",AnnotationFactory.createGlobals(this.pdfManager))}}function _hasOnlyDocumentSignatures(fields){var recursionDepth=1{var isSignature;return(field=this.xref.fetchIfRef(field))instanceof Dict&&(field.has("Kids")?10<++recursionDepth?(warn("#hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):_assertClassBrand(_PDFDocument_brand,this,_hasOnlyDocumentSignatures).call(this,field.get("Kids"),recursionDepth):(isSignature=isName(field.get("FT"),"Sig"),field=field.get("Rect"),field=Array.isArray(field)&&field.every(value=>0===value),isSignature&&field))})}function _collectSignatureCertificates(fields,collectedSignatureCertificates){var visited=2partialEvaluator.handleSetFont(resources,[Name.get(fontName),1],null,operatorList,task,initialState,fallbackFontDict,cssFontInfo).catch(reason=>(warn('loadXfaFonts: "'.concat(reason,'".')),null)),promises=[];for([fontName,font]of acroForm){var descriptor=font.get("FontDescriptor");descriptor instanceof Dict&&validateCSSFont(descriptor={fontFamily:descriptor.get("FontFamily").replaceAll(/[ ]+(\d)/g,"$1"),fontWeight:descriptor.get("FontWeight"),italicAngle:-descriptor.get("ItalicAngle")})&&promises.push(parseFont(fontName,null,descriptor))}await Promise.all(promises);handler=this.xfaFactory.setFonts(pdfFonts);if(handler){options.ignoreErrors=!0,pdfFonts.length=promises.length=0;var missing,_missing,reallyMissingFonts=new Set;for(missing of handler)getXfaFontName("".concat(missing,"-Regular"))||reallyMissingFonts.add(missing);reallyMissingFonts.size&&handler.push("PdfJS-Fallback");for(_missing of handler)if(!reallyMissingFonts.has(_missing))for(var fontInfo 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}]){var name="".concat(_missing,"-").concat(fontInfo.name);promises.push(parseFont(name,getXfaFontDict(name),{fontFamily:_missing,fontWeight:fontInfo.fontWeight,italicAngle:fontInfo.italicAngle}))}await Promise.all(promises),this.xfaFactory.appendFonts(pdfFonts,reallyMissingFonts)}}}}}async function _getLinearizationPage(pageIndex){var{catalog,linearization,xref}=this,linearization=Ref.get(linearization.objectNumberFirst,0);try{var obj=await xref.fetchAsync(linearization);if(obj instanceof Dict){var type=obj.getRaw("Type");if(isName(type=type instanceof Ref?await xref.fetchAsync(type):type,"Page")||!obj.has("Type")&&!obj.has("Kids")&&obj.has("Contents"))return catalog.pageKidsCountCache.has(linearization)||catalog.pageKidsCountCache.put(linearization,1),catalog.pageIndexCache.has(linearization)||catalog.pageIndexCache.put(linearization,0),[obj,linearization]}throw new FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(reason){return warn('_getLinearizationPage: "'.concat(reason.message,'".')),catalog.getPageDict(pageIndex)}}async function _collectFieldObjects(name,parentRef,fieldRef,promises,annotationGlobals,visitedRefs,orphanFields){var xref=this["xref"];if(fieldRef instanceof Ref&&!visitedRefs.has(fieldRef)){visitedRefs.put(fieldRef);var field=await xref.fetchAsync(fieldRef);if(field instanceof Dict){var subtype=(subtype=await field.getAsync("Subtype"))instanceof Name?subtype.name:null;if("Link"!==subtype){if(field.has("T")){subtype=stringToPDFString(await field.getAsync("T"));name=""===name?subtype:"".concat(name,".").concat(subtype)}else for(var obj=field;;){if((obj=obj.getRaw("Parent")||parentRef)instanceof Ref){if(visitedRefs.has(obj))break;obj=await xref.fetchAsync(obj)}if(!(obj instanceof Dict))break;if(obj.has("T")){var _partName=stringToPDFString(await obj.getAsync("T"));name=""===name?_partName:"".concat(name,".").concat(_partName);break}}if(parentRef&&!field.has("Parent")&&isName(field.get("Subtype"),"Widget")&&orphanFields.put(fieldRef,parentRef),promises.has(name)||promises.set(name,[]),promises.get(name).push(AnnotationFactory.create(xref,fieldRef,annotationGlobals,null,!0,orphanFields,null).then(annotation=>null==annotation?void 0:annotation.getFieldObject()).catch(function(reason){return warn('#collectFieldObjects: "'.concat(reason,'".')),null})),field.has("Kids")){subtype=await field.getAsync("Kids");if(Array.isArray(subtype))for(var kid of subtype)await _assertClassBrand(_PDFDocument_brand,this,_collectFieldObjects).call(this,name,fieldRef,kid,promises,annotationGlobals,visitedRefs,orphanFields)}}}}}function parseDocBaseUrl(url){if(url){var absoluteUrl=createValidAbsoluteUrl(url);if(absoluteUrl)return absoluteUrl.href;warn('Invalid absolute docBaseUrl: "'.concat(url,'".'))}return null}class BasePdfManager{constructor(_ref81){var{docBaseUrl:_ref81,docId,enableXfa,evaluatorOptions,handler,password}=_ref81,_ref81=(this._docBaseUrl=parseDocBaseUrl(_ref81),this._docId=docId,this._password=password,this.enableXfa=enableXfa,evaluatorOptions.isOffscreenCanvasSupported&&(evaluatorOptions.isOffscreenCanvasSupported=FeatureTest.isOffscreenCanvasSupported),evaluatorOptions.isImageDecoderSupported&&(evaluatorOptions.isImageDecoderSupported=FeatureTest.isImageDecoderSupported),this.evaluatorOptions=Object.freeze(evaluatorOptions),ImageResizer.setOptions(evaluatorOptions),JpegStream.setOptions(evaluatorOptions),OperatorList.setOptions(evaluatorOptions),_objectSpread({},evaluatorOptions,{handler:handler}));JpxImage.setOptions(_ref81),IccColorSpace.setOptions(_ref81),CmykICCBasedCS.setOptions(_ref81)}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}ensureDoc(prop,args){return this.ensure(this.pdfDocument,prop,args)}ensureXRef(prop,args){return this.ensure(this.pdfDocument.xref,prop,args)}ensureCatalog(prop,args){return this.ensure(this.pdfDocument.catalog,prop,args)}getPage(pageIndex){return this.pdfDocument.getPage(pageIndex)}fontFallback(id,handler){return this.pdfDocument.fontFallback(id,handler)}cleanup(){return this.pdfDocument.cleanup(0{var startCapability=Promise.withResolvers();return this.streamControllers[streamId]={controller:controller,startCall:startCapability,pullCall:null,cancelCall:null,isClosed:!1},comObj.postMessage({sourceName:sourceName,targetName:targetName,action:actionName,streamId:streamId,data:data,desiredSize:controller.desiredSize},transfers),startCapability.promise},pull:controller=>{var pullCapability=Promise.withResolvers();return this.streamControllers[streamId].pullCall=pullCapability,comObj.postMessage({sourceName:sourceName,targetName:targetName,stream:StreamKind.PULL,streamId:streamId,desiredSize:controller.desiredSize}),pullCapability.promise},cancel:reason=>{assert(reason instanceof Error,"cancel must have a valid reason");var cancelCapability=Promise.withResolvers();return this.streamControllers[streamId].cancelCall=cancelCapability,this.streamControllers[streamId].isClosed=!0,comObj.postMessage({sourceName:sourceName,targetName:targetName,stream:StreamKind.CANCEL,streamId:streamId,reason:wrapReason(reason)}),cancelCapability.promise}},queueingStrategy)}destroy(){var _classPrivateFieldGet7;null!=(_classPrivateFieldGet7=_classPrivateFieldGet(_messageAC,this))&&_classPrivateFieldGet7.abort(),_classPrivateFieldSet(_messageAC,this,null)}}function _onMessage(_ref97){var data=_ref97["data"];if(data.targetName===this.sourceName)if(data.stream)_assertClassBrand(_MessageHandler_brand,this,_processStreamMessage).call(this,data);else if(data.callback){var _ref97=data.callbackId,capability=this.callbackCapabilities[_ref97];if(!capability)throw new Error("Cannot resolve callback ".concat(_ref97));if(delete this.callbackCapabilities[_ref97],data.callback===CallbackKind.DATA)capability.resolve(data.data);else{if(data.callback!==CallbackKind.ERROR)throw new Error("Unexpected callback case");capability.reject(wrapReason(data.reason))}}else{var sourceName,targetName,comObj,_ref97=this.actionHandler[data.action];if(!_ref97)throw new Error("Unknown action from worker: ".concat(data.action));data.callbackId?(sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj,Promise.try(_ref97,data.data).then(function(result){comObj.postMessage({sourceName:sourceName,targetName:targetName,callback:CallbackKind.DATA,callbackId:data.callbackId,data:result})},function(reason){comObj.postMessage({sourceName:sourceName,targetName:targetName,callback:CallbackKind.ERROR,callbackId:data.callbackId,reason:wrapReason(reason)})})):data.streamId?_assertClassBrand(_MessageHandler_brand,this,_createStreamSink).call(this,data):_ref97(data.data)}}function _createStreamSink(data){var streamId=data.streamId,sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj,self=this,action=this.actionHandler[data.action],streamSink={enqueue(chunk){var lastDesiredSize,size=1>")}async function writeStream(stream,buffer,transform){var bytes=stream.getBytes(),stream=stream["dict"],[filter,params]=await Promise.all([stream.getAsync("Filter"),stream.getAsync("DecodeParms")]),isFilterZeroFlateDecode=isName(Array.isArray(filter)?await stream.xref.fetchIfRefAsync(filter[0]):filter,"FlateDecode");if(256<=bytes.length||isFilterZeroFlateDecode)try{var newFilter,newParams,cs=new CompressionStream("deflate"),writer=cs.writable.getWriter(),buf=(await writer.ready,writer.write(bytes).then(async()=>{await writer.ready,await writer.close()}).catch(()=>{}),await new Response(cs.readable).arrayBuffer()),bytes=new Uint8Array(buf);filter?isFilterZeroFlateDecode||(newFilter=Array.isArray(filter)?[Name.get("FlateDecode"),...filter]:[Name.get("FlateDecode"),filter],params&&(newParams=Array.isArray(params)?[null,...params]:[null,params])):newFilter=Name.get("FlateDecode"),newFilter&&stream.set("Filter",newFilter),newParams&&stream.set("DecodeParms",newParams)}catch(ex){info('writeStream - cannot compress data: "'.concat(ex,'".'))}cs=bytesToString(bytes);transform&&(cs=transform.encryptString(cs)),stream.set("Length",cs.length),await writeDict(stream,buffer,transform),buffer.push(" stream\n",cs,"\nendstream")}async function writeArray(array,buffer,transform){buffer.push("[");var val,first=!0;for(val of array)first?first=!1:buffer.push(" "),await writeValue(val,buffer,transform);buffer.push("]")}async function writeValue(value,buffer,transform){value instanceof Name?buffer.push("/".concat(escapePDFName(value.name))):value instanceof Ref?buffer.push("".concat(value.num," ").concat(value.gen," R")):Array.isArray(value)||ArrayBuffer.isView(value)?await writeArray(value,buffer,transform):"string"==typeof value?(transform&&(value=transform.encryptString(value)),buffer.push("(".concat(escapeString(value),")"))):"number"==typeof value?buffer.push(numberToString(value)):"boolean"==typeof value?buffer.push(value.toString()):value instanceof Dict?await writeDict(value,buffer,transform):value instanceof BaseStream?await writeStream(value,buffer,transform):null===value?buffer.push("null"):warn("Unhandled value in writer: ".concat(typeof value,", please file a bug."))}function writeInt(number,size,offset,buffer){for(var i=size+offset-1;offset-1>=8;return offset+size}function writeString(string,offset,buffer){for(var ii=string.length,i=0;istr.length)),array=new Uint8Array(filename),offset=0;for(str of time)offset=writeString(str,offset,array);return bytesToString(calculateMD5(array,0,array.length))}function writeXFADataForAcroform(str,changes){var xfa,path,value,nodePath,node,xml=new SimpleXMLParser({hasAttributes:!0}).parseFromString(str);for({xfa}of changes)xfa&&({path,value}=xfa,path)&&(nodePath=parseXFAPath(path),(node=!(node=xml.documentElement.searchNode(nodePath,0))&&1new SimpleDOMNode("value",val)):[new SimpleDOMNode("#text",value)]:warn("Node not found for path: ".concat(path)));str=[];return xml.documentElement.dump(str),str.join("")}async function updateAcroform(_ref83){var dict,{acroForm:_ref83,acroFormRef,hasXfa,hasXfaDatasetsEntry,xfaDatasetsRef,needAppearances,changes}=_ref83;!hasXfa||hasXfaDatasetsEntry||xfaDatasetsRef||warn("XFA - Cannot save it"),(needAppearances||hasXfa&&xfaDatasetsRef&&!hasXfaDatasetsEntry)&&(dict=_ref83.clone(),hasXfa&&!hasXfaDatasetsEntry&&((hasXfa=_ref83.get("XFA").slice()).splice(2,0,"datasets"),hasXfa.splice(3,0,xfaDatasetsRef),dict.set("XFA",hasXfa)),needAppearances&&dict.set("NeedAppearances",!0),changes.put(acroFormRef,{data:dict}))}function updateXFA(_ref84){var{xfaData:_ref84,xfaDatasetsRef,changes,xref}=_ref84,_ref84=(null===_ref84&&(_ref84=writeXFADataForAcroform(xref.fetchIfRef(xfaDatasetsRef).getString(),changes)),new StringStream(_ref84));_ref84.dict=new Dict(xref),_ref84.dict.set("Type",Name.get("EmbeddedFile")),changes.put(xfaDatasetsRef,{data:_ref84})}async function getXRefTable(xrefInfo,baseOffset,newRefs,newXref,buffer){buffer.push("xref\n");var ref,data,indexes=getIndexes(newRefs),indexesPosition=0;for({ref,data}of newRefs)ref.num===indexes[indexesPosition]&&(buffer.push("".concat(indexes[indexesPosition]," ").concat(indexes[indexesPosition+1],"\n")),indexesPosition+=2),null!==data?(buffer.push("".concat(baseOffset.toString().padStart(10,"0")," ").concat(Math.min(ref.gen,65535).toString().padStart(5,"0")," n\r\n")),baseOffset+=data.length):buffer.push("0000000000 ".concat(Math.min(ref.gen+1,65535).toString().padStart(5,"0")," f\r\n"));computeIDs(baseOffset,xrefInfo,newXref),buffer.push("trailer\n"),await writeDict(newXref,buffer),buffer.push("\nstartxref\n",baseOffset.toString(),"\n%%EOF\n")}function getIndexes(newRefs){var ref,indexes=[];for({ref}of newRefs)ref.num===indexes.at(-2)+indexes.at(-1)?indexes[indexes.length-1]+=1:indexes.push(ref.num,1);return indexes}async function getXRefStreamTable(xrefInfo,baseOffset,newRefs,newXref,buffer){var ref,_data5,xrefTableData=[],maxOffset=0,maxGen=0;for({ref,data:_data5}of newRefs){var gen=void 0,maxOffset=Math.max(maxOffset,baseOffset);null!==_data5?(gen=Math.min(ref.gen,65535),xrefTableData.push([1,baseOffset,gen]),baseOffset+=_data5.length):(gen=Math.min(ref.gen+1,65535),xrefTableData.push([0,0,gen])),maxGen=Math.max(maxGen,gen)}newXref.set("Index",getIndexes(newRefs));var type,objOffset,_gen,sizes=[1,getSizeInBytes(maxOffset),getSizeInBytes(maxGen)],newRefs=(newXref.set("W",sizes),computeIDs(baseOffset,xrefInfo,newXref),Math.sumPrecise(sizes)),data=new Uint8Array(newRefs*xrefTableData.length),newRefs=new Stream(data),offset=(newRefs.dict=newXref,0);for([type,objOffset,_gen]of xrefTableData)offset=writeInt(type,sizes[0],offset,data),offset=writeInt(objOffset,sizes[1],offset,data),offset=writeInt(_gen,sizes[2],offset,data);await writeObject(xrefInfo.newRef,newRefs,buffer,{}),buffer.push("startxref\n",baseOffset.toString(),"\n%%EOF\n")}function computeIDs(baseOffset,xrefInfo,newXref){Array.isArray(xrefInfo.fileIds)&&0a.ref.num-b.ref.num)}async function incrementalUpdate(_ref85){var data,{originalData:_ref85,xrefInfo,changes,xref=null,hasXfa=!1,xfaDatasetsRef=null,hasXfaDatasetsEntry=!1,needAppearances,acroFormRef=null,acroForm=null,xfaData=null,useXrefStream=!1}=_ref85,acroForm=(await updateAcroform({xref:xref,acroForm:acroForm,acroFormRef:acroFormRef,hasXfa:hasXfa,hasXfaDatasetsEntry:hasXfaDatasetsEntry,xfaDatasetsRef:xfaDatasetsRef,needAppearances:needAppearances,changes:changes}),hasXfa&&updateXFA({xfaData:xfaData,xfaDatasetsRef:xfaDatasetsRef,changes:changes,xref:xref}),getTrailerDict(xrefInfo,changes,useXrefStream)),buffer=[],acroFormRef=await writeChanges(changes,xref,buffer),hasXfaDatasetsEntry=_ref85.length,needAppearances=_ref85.at(-1);10!==needAppearances&&13!==needAppearances&&(buffer.push("\n"),hasXfaDatasetsEntry+=1);for({data}of acroFormRef)null!==data&&buffer.push(data);await(useXrefStream?getXRefStreamTable:getXRefTable)(xrefInfo,hasXfaDatasetsEntry,acroFormRef,acroForm,buffer);var str,hasXfa=_ref85.length+Math.sumPrecise(buffer.map(str=>str.length)),array=new Uint8Array(hasXfa),offset=(array.set(_ref85),_ref85.length);for(str of buffer)offset=writeString(str,offset,array);return array}class PDFWorkerStream{constructor(msgHandler){this._msgHandler=msgHandler,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return assert(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new PDFWorkerStreamReader(this._msgHandler),this._fullRequestReader}getRangeReader(begin,end){begin=new PDFWorkerStreamRangeReader(begin,end,this._msgHandler);return this._rangeRequestReaders.push(begin),begin}cancelAllRequests(reason){var _this$_fullRequestRea,reader;null!=(_this$_fullRequestRea=this._fullRequestReader)&&_this$_fullRequestRea.cancel(reason);for(reader of this._rangeRequestReaders.slice(0))reader.cancel(reason)}}class PDFWorkerStreamReader{constructor(msgHandler){this._msgHandler=msgHandler,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;msgHandler=this._msgHandler.sendWithStream("GetReader");this._reader=msgHandler.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then(data=>{this._isStreamingSupported=data.isStreamingSupported,this._isRangeSupported=data.isRangeSupported,this._contentLength=data.contentLength})}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){var{value,done}=await this._reader.read();return done?{value:void 0,done:!0}:{value:value.buffer,done:!1}}cancel(reason){this._reader.cancel(reason)}}class PDFWorkerStreamRangeReader{constructor(begin,end,msgHandler){this._msgHandler=msgHandler,this.onProgress=null;msgHandler=this._msgHandler.sendWithStream("GetRangeReader",{begin:begin,end:end});this._reader=msgHandler.getReader()}get isStreamingSupported(){return!1}async read(){var{value,done}=await this._reader.read();return done?{value:void 0,done:!0}:{value:value.buffer,done:!1}}cancel(reason){this._reader.cancel(reason)}}class WorkerTask{constructor(name){this.name=name,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 new Error("Worker task was terminated")}}class WorkerMessageHandler{static setup(handler,port){var testMessageProcessed=!1;handler.on("test",data=>{testMessageProcessed||(testMessageProcessed=!0,handler.send("test",data instanceof Uint8Array))}),handler.on("configure",data=>{setVerbosityLevel(data.verbosity)}),handler.on("GetDocRequest",data=>this.createDocumentHandler(data,port))}static createDocumentHandler(docParams,port){var pdfManager,terminated=!1,cancelXHRs=null,WorkerTasks=new Set,verbosity=getVerbosityLevel(),{docId,apiVersion}=docParams;if("5.3.93"!==apiVersion)throw new Error('The API version "'.concat(apiVersion,'" does not match ')+'the Worker version "'.concat("5.3.93",'".'));var prop,_prop,buildMsg=(type,prop)=>"The `".concat(type,".prototype` contains unexpected enumerable property ")+'"'.concat(prop,'", thus breaking e.g. `for...in` iteration of ').concat(type,"s.");for(prop in{})throw new Error(buildMsg("Object",prop));for(_prop in[])throw new Error(buildMsg("Array",_prop));var apiVersion=docId+"_worker",handler=new MessageHandler(apiVersion,docId,port);function ensureNotTerminated(){if(terminated)throw new Error("Worker was terminated")}function startWorkerTask(task){WorkerTasks.add(task)}function finishWorkerTask(task){task.finish(),WorkerTasks.delete(task)}async function loadDocument(recoveryMode){await pdfManager.ensureDoc("checkHeader"),await pdfManager.ensureDoc("parseStartXRef"),await pdfManager.ensureDoc("parse",[recoveryMode]),await pdfManager.ensureDoc("checkFirstPage",[recoveryMode]),await pdfManager.ensureDoc("checkLastPage",[recoveryMode]);var recoveryMode=await pdfManager.ensureDoc("isPureXfa"),[task,fingerprints]=(recoveryMode&&(startWorkerTask(task=new WorkerTask("loadXfaResources")),await pdfManager.ensureDoc("loadXfaResources",[handler,task]),finishWorkerTask(task)),await Promise.all([pdfManager.ensureDoc("numPages"),pdfManager.ensureDoc("fingerprints")]));return{numPages:task,fingerprints:fingerprints,htmlForXfa:recoveryMode?await pdfManager.ensureDoc("htmlForXfa"):null}}function setupDoc(data){function onSuccess(doc){ensureNotTerminated(),handler.send("GetDoc",{pdfInfo:doc})}function onFailure(ex){var task;ensureNotTerminated(),ex instanceof PasswordException?(startWorkerTask(task=new WorkerTask("PasswordException: response ".concat(ex.code))),handler.sendWithPromise("PasswordRequest",ex).then(function(_ref88){_ref88=_ref88.password;finishWorkerTask(task),pdfManager.updatePassword(_ref88),pdfManagerReady()}).catch(function(){finishWorkerTask(task),handler.send("DocException",ex)})):handler.send("DocException",wrapReason(ex))}function pdfManagerReady(){ensureNotTerminated(),loadDocument(!1).then(onSuccess,function(reason){ensureNotTerminated(),reason instanceof XRefParseException?pdfManager.requestLoadedStream().then(function(){ensureNotTerminated(),loadDocument(!0).then(onSuccess,onFailure)}):onFailure(reason)})}ensureNotTerminated(),async function(_ref86){var pdfStream,fullRequest,pdfManagerCapability,newPdfManager,cachedChunks,loaded,{data:_ref86,password,disableAutoFetch,rangeChunkSize,length,docBaseUrl,enableXfa,evaluatorOptions}=_ref86,pdfManagerArgs={source:null,disableAutoFetch:disableAutoFetch,docBaseUrl:docBaseUrl,docId:docId,enableXfa:enableXfa,evaluatorOptions:evaluatorOptions,handler:handler,length:length,password:password,rangeChunkSize:rangeChunkSize};return _ref86?(pdfManagerArgs.source=_ref86,new LocalPdfManager(pdfManagerArgs)):(pdfStream=new PDFWorkerStream(handler),fullRequest=pdfStream.getFullReader(),pdfManagerCapability=Promise.withResolvers(),cachedChunks=[],loaded=0,fullRequest.headersReady.then(function(){if(fullRequest.isRangeSupported){pdfManagerArgs.source=pdfStream,pdfManagerArgs.length=fullRequest.contentLength,pdfManagerArgs.disableAutoFetch||(pdfManagerArgs.disableAutoFetch=fullRequest.isStreamingSupported),newPdfManager=new NetworkPdfManager(pdfManagerArgs);for(var chunk of cachedChunks)newPdfManager.sendProgressiveData(chunk);cachedChunks=[],pdfManagerCapability.resolve(newPdfManager),cancelXHRs=null}}).catch(function(reason){pdfManagerCapability.reject(reason),cancelXHRs=null}),new Promise(function(resolve,reject){var readChunk=function(_ref87){var pdfFile,{value:_ref87,done}=_ref87;try{ensureNotTerminated(),done?(newPdfManager||(pdfFile=arrayBuffersToBytes(cachedChunks),cachedChunks=[],length&&pdfFile.length!==length&&warn("reported HTTP length is different from actual"),pdfManagerArgs.source=pdfFile,newPdfManager=new LocalPdfManager(pdfManagerArgs),pdfManagerCapability.resolve(newPdfManager)),cancelXHRs=null):(loaded+=_ref87.byteLength,fullRequest.isStreamingSupported||handler.send("DocProgress",{loaded:loaded,total:Math.max(loaded,fullRequest.contentLength||0)}),newPdfManager?newPdfManager.sendProgressiveData(_ref87):cachedChunks.push(_ref87),fullRequest.read().then(readChunk,reject))}catch(e){reject(e)}};fullRequest.read().then(readChunk,reject)}).catch(function(e){pdfManagerCapability.reject(e),cancelXHRs=null}),cancelXHRs=reason=>{pdfStream.cancelAllRequests(reason)},pdfManagerCapability.promise)}(data).then(function(newPdfManager){if(terminated)throw newPdfManager.terminate(new AbortException("Worker was terminated.")),new Error("Worker was terminated");(pdfManager=newPdfManager).requestLoadedStream(!0).then(stream=>{handler.send("DataLoaded",{length:stream.bytes.byteLength})})}).then(pdfManagerReady,onFailure)}return handler.on("GetPage",function(data){return pdfManager.getPage(data.pageIndex).then(function(page){return Promise.all([pdfManager.ensure(page,"rotate"),pdfManager.ensure(page,"ref"),pdfManager.ensure(page,"userUnit"),pdfManager.ensure(page,"view")]).then(function(_ref89){var[_ref89,ref,userUnit,view]=_ref89;return{rotate:_ref89,ref:ref,refStr:null!=(_ref89=null==ref?void 0:ref.toString())?_ref89:null,userUnit:userUnit,view:view}})})}),handler.on("GetPageIndex",function(data){data=Ref.get(data.num,data.gen);return pdfManager.ensureCatalog("getPageIndex",[data])}),handler.on("GetDestinations",function(data){return pdfManager.ensureCatalog("destinations")}),handler.on("GetDestination",function(data){return pdfManager.ensureCatalog("getDestination",[data.id])}),handler.on("GetPageLabels",function(data){return pdfManager.ensureCatalog("pageLabels")}),handler.on("GetPageLayout",function(data){return pdfManager.ensureCatalog("pageLayout")}),handler.on("GetPageMode",function(data){return pdfManager.ensureCatalog("pageMode")}),handler.on("GetViewerPreferences",function(data){return pdfManager.ensureCatalog("viewerPreferences")}),handler.on("GetOpenAction",function(data){return pdfManager.ensureCatalog("openAction")}),handler.on("GetAttachments",function(data){return pdfManager.ensureCatalog("attachments")}),handler.on("GetDocJSActions",function(data){return pdfManager.ensureCatalog("jsActions")}),handler.on("GetPageJSActions",function(_ref90){_ref90=_ref90.pageIndex;return pdfManager.getPage(_ref90).then(page=>pdfManager.ensure(page,"jsActions"))}),handler.on("GetOutline",function(data){return pdfManager.ensureCatalog("documentOutline")}),handler.on("GetOptionalContentConfig",function(data){return pdfManager.ensureCatalog("optionalContentConfig")}),handler.on("GetPermissions",function(data){return pdfManager.ensureCatalog("permissions")}),handler.on("GetMetadata",function(data){return Promise.all([pdfManager.ensureDoc("documentInfo"),pdfManager.ensureCatalog("metadata")])}),handler.on("GetMarkInfo",function(data){return pdfManager.ensureCatalog("markInfo")}),handler.on("GetData",function(data){return pdfManager.requestLoadedStream().then(stream=>stream.bytes)}),handler.on("GetAnnotations",function(_ref91){var{pageIndex,intent}=_ref91;return pdfManager.getPage(pageIndex).then(function(page){var task=new WorkerTask("GetAnnotations: page ".concat(pageIndex));return startWorkerTask(task),page.getAnnotationsData(handler,task,intent).then(data=>(finishWorkerTask(task),data),reason=>{throw finishWorkerTask(task),reason})})}),handler.on("GetFieldObjects",function(data){return pdfManager.ensureDoc("fieldObjects").then(fieldObjects=>(null==fieldObjects?void 0:fieldObjects.allFields)||null)}),handler.on("HasJSActions",function(data){return pdfManager.ensureDoc("hasJSActions")}),handler.on("GetCalculationOrderIds",function(data){return pdfManager.ensureDoc("calculationOrderIds")}),handler.on("SaveDocument",async function(_ref92){var structTreeRoot,{isPureXfa:_ref92,numPages,annotationStorage,filename}=_ref92,globalPromises=[pdfManager.requestLoadedStream(),pdfManager.ensureCatalog("acroForm"),pdfManager.ensureCatalog("acroFormRef"),pdfManager.ensureDoc("startXRef"),pdfManager.ensureDoc("xref"),pdfManager.ensureDoc("linearization"),pdfManager.ensureCatalog("structTreeRoot")],changes=new RefSetCache,promises=[],newAnnotationsByPage=_ref92?null:getNewAnnotationsMap(annotationStorage),[globalPromises,acroForm,acroFormRef,startXRef,xref,linearization,_structTreeRoot]=await Promise.all(globalPromises),catalogRef=xref.trailer.getRaw("Root")||null;if(newAnnotationsByPage){_structTreeRoot?await _structTreeRoot.canUpdateStructTree({pdfManager:pdfManager,newAnnotationsByPage:newAnnotationsByPage})&&(structTreeRoot=_structTreeRoot):await StructTreeRoot.canCreateStructureTree({catalogRef:catalogRef,pdfManager:pdfManager,newAnnotationsByPage:newAnnotationsByPage})&&(structTreeRoot=null);var pageIndex,annotations,imagePromises=AnnotationFactory.generateImages(annotationStorage.values(),xref,pdfManager.evaluatorOptions.isOffscreenCanvasSupported),newAnnotationPromises=void 0===structTreeRoot?promises:[];for([pageIndex,annotations]of newAnnotationsByPage)await async function(pageIndex,annotations){newAnnotationPromises.push(pdfManager.getPage(pageIndex).then(page=>{var task=new WorkerTask("Save (editor): page ".concat(pageIndex));return startWorkerTask(task),page.saveNewAnnotations(handler,task,annotations,imagePromises,changes).finally(function(){finishWorkerTask(task)})}))}(pageIndex,annotations);null===structTreeRoot?promises.push(Promise.all(newAnnotationPromises).then(async()=>{await StructTreeRoot.createStructureTree({newAnnotationsByPage:newAnnotationsByPage,xref:xref,catalogRef:catalogRef,pdfManager:pdfManager,changes:changes})})):structTreeRoot&&promises.push(Promise.all(newAnnotationPromises).then(async()=>{await structTreeRoot.updateStructureTree({newAnnotationsByPage:newAnnotationsByPage,pdfManager:pdfManager,changes:changes})}))}if(_ref92)promises.push(pdfManager.ensureDoc("serializeXfaData",[annotationStorage]));else for(var _pageIndex3=0;_pageIndex3ref.needAppearances),xfa=acroForm instanceof Dict&&acroForm.get("XFA")||null,xfaDatasetsRef=null,hasXfaDatasetsEntry=!1;if(Array.isArray(xfa)){for(var i=0,ii=xfa.length;i{xref.resetNewTemporaryRef()})}),handler.on("GetOperatorList",function(data,sink){var pageIndex=data.pageIndex;pdfManager.getPage(pageIndex).then(function(page){var task=new WorkerTask("GetOperatorList: page ".concat(pageIndex)),start=(startWorkerTask(task),verbosity>=VerbosityLevel.INFOS?Date.now():0);page.getOperatorList({handler:handler,sink:sink,task:task,intent:data.intent,cacheKey:data.cacheKey,annotationStorage:data.annotationStorage,modifiedIds:data.modifiedIds}).then(function(operatorListInfo){finishWorkerTask(task),start&&info("page=".concat(pageIndex+1," - getOperatorList: time=")+"".concat(Date.now()-start,"ms, len=").concat(operatorListInfo.length)),sink.close()},function(reason){finishWorkerTask(task),task.terminated||sink.error(reason)})})}),handler.on("GetTextContent",function(data,sink){var{pageIndex,includeMarkedContent,disableNormalization}=data;pdfManager.getPage(pageIndex).then(function(page){var task=new WorkerTask("GetTextContent: page "+pageIndex),start=(startWorkerTask(task),verbosity>=VerbosityLevel.INFOS?Date.now():0);page.extractTextContent({handler:handler,task:task,sink:sink,includeMarkedContent:includeMarkedContent,disableNormalization:disableNormalization}).then(function(){finishWorkerTask(task),start&&info("page=".concat(pageIndex+1," - getTextContent: time=")+"".concat(Date.now()-start,"ms")),sink.close()},function(reason){finishWorkerTask(task),task.terminated||sink.error(reason)})})}),handler.on("GetStructTree",function(data){return pdfManager.getPage(data.pageIndex).then(page=>pdfManager.ensure(page,"getStructTree"))}),handler.on("FontFallback",function(data){return pdfManager.fontFallback(data.id,handler)}),handler.on("Cleanup",function(data){return pdfManager.cleanup(!0)}),handler.on("Terminate",function(data){terminated=!0;var cleanupPromise,task,waitOn=[];pdfManager?(pdfManager.terminate(new AbortException("Worker was terminated.")),cleanupPromise=pdfManager.cleanup(),waitOn.push(cleanupPromise),pdfManager=null):clearGlobalCaches(),null!=cancelXHRs&&cancelXHRs(new AbortException("Worker was terminated."));for(task of WorkerTasks)waitOn.push(task.finished),task.terminate();return Promise.all(waitOn).then(function(){handler.destroy(),handler=null})}),handler.on("Ready",function(data){setupDoc(docParams),docParams=null}),apiVersion}static initializeFromPort(port){var handler=new MessageHandler("worker","main",port);this.setup(handler,port),handler.send("ready",null)}}_WorkerMessageHandler=WorkerMessageHandler,"undefined"==typeof window&&!isNodeJS&&"undefined"!=typeof self&&"function"==typeof self.postMessage&&"onmessage"in self&&_WorkerMessageHandler.initializeFromPort(self),globalThis.pdfjsWorker={WorkerMessageHandler:WorkerMessageHandler};export{WorkerMessageHandler};