file-viewer-demo/public/dist/assets/PdfView-3f48c404.js

16 lines
541 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var ii=Object.defineProperty;var si=(N,w,t)=>w in N?ii(N,w,{enumerable:!0,configurable:!0,writable:!0,value:t}):N[w]=t;var tt=(N,w,t)=>(si(N,typeof w!="symbol"?w+"":w,t),t),Jt=(N,w,t)=>{if(!w.has(N))throw TypeError("Cannot "+t)};var l=(N,w,t)=>(Jt(N,w,"read from private field"),t?t.call(N):w.get(N)),$=(N,w,t)=>{if(w.has(N))throw TypeError("Cannot add the same private member more than once");w instanceof WeakSet?w.add(N):w.set(N,t)},le=(N,w,t,p)=>(Jt(N,w,"write to private field"),p?p.call(N,t):w.set(N,t),t);var ut=(N,w,t,p)=>({set _(y){le(N,w,y,t)},get _(){return l(N,w,p)}}),J=(N,w,t)=>(Jt(N,w,"access private method"),t);import{x as require$$6,c as commonjsGlobal,d as defineComponent,r as ref,o as onMounted,a as openBlock,b as createElementBlock,k as createBaseVNode,q as pushScopeId,s as popScopeId,_ as _export_sfc}from"./index-be50c070.js";import{c as commonjsRequire}from"./_commonjs-dynamic-modules-302442b1.js";import{r as refWorker}from"./worker-ref-b3abaee8.js";var pdf$1={exports:{}},path2dPolyfill_esm={},hasRequiredPath2dPolyfill_esm;function requirePath2dPolyfill_esm(){if(hasRequiredPath2dPolyfill_esm)return path2dPolyfill_esm;hasRequiredPath2dPolyfill_esm=1;function N(a,r,o){if(o||arguments.length===2)for(var m=0,v=r.length,A;m<v;m++)(A||!(m in r))&&(A||(A=Array.prototype.slice.call(r,0,m)),A[m]=r[m]);return a.concat(A||Array.prototype.slice.call(r))}var w={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/gi,p=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function y(a){var r=a.match(p);return r?r.map(Number):[]}function k(a){var r=[],o=String(a).trim();return o[0]!=="M"&&o[0]!=="m"||o.replace(t,function(m,v,A){var b=y(A),c=v.toLowerCase(),s=v;if(c==="m"&&b.length>2&&(r.push(N([s],b.splice(0,2),!0)),c="l",s=s==="m"?"l":"L"),b.length<w[c])return"";for(r.push(N([s],b.splice(0,w[c]),!0));b.length>=w[c]&&b.length&&w[c];)r.push(N([s],b.splice(0,w[c]),!0));return""}),r}function u(a,r){var o=a.x*Math.cos(r)-a.y*Math.sin(r),m=a.y*Math.cos(r)+a.x*Math.sin(r);a.x=o,a.y=m}function g(a,r,o){a.x+=r,a.y+=o}function e(a,r){a.x*=r,a.y*=r}var i=function(){function a(r){var o;this.commands=[],r&&r instanceof a?(o=this.commands).push.apply(o,r.commands):r&&(this.commands=k(r))}return a.prototype.addPath=function(r){var o;r&&r instanceof a&&(o=this.commands).push.apply(o,r.commands)},a.prototype.moveTo=function(r,o){this.commands.push(["M",r,o])},a.prototype.lineTo=function(r,o){this.commands.push(["L",r,o])},a.prototype.arc=function(r,o,m,v,A,b){this.commands.push(["AC",r,o,m,v,A,!!b])},a.prototype.arcTo=function(r,o,m,v,A){this.commands.push(["AT",r,o,m,v,A])},a.prototype.ellipse=function(r,o,m,v,A,b,c,s){this.commands.push(["E",r,o,m,v,A,b,c,!!s])},a.prototype.closePath=function(){this.commands.push(["Z"])},a.prototype.bezierCurveTo=function(r,o,m,v,A,b){this.commands.push(["C",r,o,m,v,A,b])},a.prototype.quadraticCurveTo=function(r,o,m,v){this.commands.push(["Q",r,o,m,v])},a.prototype.rect=function(r,o,m,v){this.commands.push(["R",r,o,m,v])},a.prototype.roundRect=function(r,o,m,v,A){typeof A>"u"?this.commands.push(["RR",r,o,m,v,0]):this.commands.push(["RR",r,o,m,v,A])},a}();function n(a,r){var o=0,m=0,v,A,b,c,s,x,T,S,D,I,_,Q,W,j,he,Y,z,ee,oe,ye,Pe,L=null,P=null,M=null,E=null,R=null,O=null;a.beginPath();for(var B=0;B<r.length;++B){ee=r[B][0],ee!=="S"&&ee!=="s"&&ee!=="C"&&ee!=="c"&&(L=null,P=null),ee!=="T"&&ee!=="t"&&ee!=="Q"&&ee!=="q"&&(M=null,E=null);var F=void 0;switch(ee){case"m":case"M":F=r[B],ee==="m"?(o+=F[1],m+=F[2]):(o=F[1],m=F[2]),(ee==="M"||!R)&&(R={x:o,y:m}),a.moveTo(o,m);break;case"l":F=r[B],o+=F[1],m+=F[2],a.lineTo(o,m);break;case"L":F=r[B],o=F[1],m=F[2],a.lineTo(o,m);break;case"H":F=r[B],o=F[1],a.lineTo(o,m);break;case"h":F=r[B],o+=F[1],a.lineTo(o,m);break;case"V":F=r[B],m=F[1],a.lineTo(o,m);break;case"v":F=r[B],m+=F[1],a.lineTo(o,m);break;case"a":case"A":if(F=r[B],O===null)throw new Error("This should never happen");ee==="a"?(o+=F[6],m+=F[7]):(o=F[6],m=F[7]),j=F[1],he=F[2],T=F[3]*Math.PI/180,b=!!F[4],c=!!F[5],s={x:o,y:m},x={x:(O.x-s.x)/2,y:(O.y-s.y)/2},u(x,-T),S=x.x*x.x/(j*j)+x.y*x.y/(he*he),S>1&&(S=Math.sqrt(S),j*=S,he*=S),oe={x:j*x.y/he,y:-(he*x.x)/j},D=j*j*he*he,I=j*j*x.y*x.y+he*he*x.x*x.x,c!==b?e(oe,Math.sqrt((D-I)/I)||0):e(oe,-Math.sqrt((D-I)/I)||0),A=Math.atan2((x.y-oe.y)/he,(x.x-oe.x)/j),v=Math.atan2(-(x.y+oe.y)/he,-(x.x+oe.x)/j),u(oe,T),g(oe,(s.x+O.x)/2,(s.y+O.y)/2),a.save(),a.translate(oe.x,oe.y),a.rotate(T),a.scale(j,he),a.arc(0,0,1,A,v,!c),a.restore();break;case"C":F=r[B],L=F[3],P=F[4],o=F[5],m=F[6],a.bezierCurveTo(F[1],F[2],L,P,o,m);break;case"c":F=r[B],a.bezierCurveTo(F[1]+o,F[2]+m,F[3]+o,F[4]+m,F[5]+o,F[6]+m),L=F[3]+o,P=F[4]+m,o+=F[5],m+=F[6];break;case"S":F=r[B],(L===null||P===null)&&(L=o,P=m),a.bezierCurveTo(2*o-L,2*m-P,F[1],F[2],F[3],F[4]),L=F[1],P=F[2],o=F[3],m=F[4];break;case"s":F=r[B],(L===null||P===null)&&(L=o,P=m),a.bezierCurveTo(2*o-L,2*m-P,F[1]+o,F[2]+m,F[3]+o,F[4]+m),L=F[1]+o,P=F[2]+m,o+=F[3],m+=F[4];break;case"Q":F=r[B],M=F[1],E=F[2],o=F[3],m=F[4],a.quadraticCurveTo(M,E,o,m);break;case"q":F=r[B],M=F[1]+o,E=F[2]+m,o+=F[3],m+=F[4],a.quadraticCurveTo(M,E,o,m);break;case"T":F=r[B],(M===null||E===null)&&(M=o,E=m),M=2*o-M,E=2*m-E,o=F[1],m=F[2],a.quadraticCurveTo(M,E,o,m);break;case"t":F=r[B],(M===null||E===null)&&(M=o,E=m),M=2*o-M,E=2*m-E,o+=F[1],m+=F[2],a.quadraticCurveTo(M,E,o,m);break;case"z":case"Z":R&&(o=R.x,m=R.y),R=null,a.closePath();break;case"AC":F=r[B],o=F[1],m=F[2],W=F[3],A=F[4],v=F[5],ye=F[6],a.arc(o,m,W,A,v,ye);break;case"AT":F=r[B],_=F[1],Q=F[2],o=F[3],m=F[4],W=F[5],a.arcTo(_,Q,o,m,W);break;case"E":F=r[B],o=F[1],m=F[2],j=F[3],he=F[4],T=F[5],A=F[6],v=F[7],ye=F[8],a.save(),a.translate(o,m),a.rotate(T),a.scale(j,he),a.arc(0,0,1,A,v,ye),a.restore();break;case"R":F=r[B],o=F[1],m=F[2],Y=F[3],z=F[4],R={x:o,y:m},a.rect(o,m,Y,z);break;case"RR":F=r[B],o=F[1],m=F[2],Y=F[3],z=F[4],Pe=F[5],R={x:o,y:m},a.roundRect(o,m,Y,z,Pe);break}O?(O.x=o,O.y=m):O={x:o,y:m}}}function d(a){if(!(!a||!a.CanvasRenderingContext2D||a.Path2D)){var r=a.CanvasRenderingContext2D,o=r.prototype.fill,m=r.prototype.stroke,v=r.prototype.isPointInPath;r.prototype.fill=function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];if(b[0]instanceof i){var s=b[0],x=b[1]||"nonzero";n(this,s.commands),o.apply(this,[x])}else{var x=b[0]||"nonzero";return o.apply(this,[x])}},r.prototype.stroke=function(b){b&&n(this,b.commands),m.apply(this)},r.prototype.isPointInPath=function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];if(b[0]instanceof i){var s=b[0],x=b[1],T=b[2],S=b[3]||"nonzero";return n(this,s.commands),v.apply(this,[x,T,S])}else return v.apply(this,b)},a.Path2D=i}}function h(a,r,o,m,v){var A=this;if(v===void 0&&(v=0),typeof v=="number"&&(v=[v]),Array.isArray(v)){if(v.length===0||v.length>4)throw new RangeError("Failed to execute 'roundRect' on '".concat(this.constructor.name,"': ").concat(v.length," radii provided. Between one and four radii are necessary."));v.forEach(function(S){if(S<0)throw new RangeError("Failed to execute 'roundRect' on '".concat(A.constructor.name,"': Radius value ").concat(S," is negative."))})}else return;if(v.length===1&&v[0]===0)return this.rect(a,r,o,m);var b=Math.min(o,m)/2,c,s,x,T=c=s=x=Math.min(b,v[0]);v.length===2&&(c=x=Math.min(b,v[1])),v.length===3&&(c=x=Math.min(b,v[1]),s=Math.min(b,v[2])),v.length===4&&(c=Math.min(b,v[1]),s=Math.min(b,v[2]),x=Math.min(b,v[3])),this.moveTo(a,r+m-x),this.arcTo(a,r,a+T,r,T),this.arcTo(a+o,r,a+o,r+c,c),this.arcTo(a+o,r+m,a+o-s,r+m,s),this.arcTo(a,r+m,a,r+m-x,x),this.moveTo(a,r)}function f(a){if(!(!a||!a.CanvasRenderingContext2D)){var r=a.CanvasRenderingContext2D,o=a.Path2D;r&&!r.prototype.roundRect&&(r.prototype.roundRect=h),o&&!o.prototype.roundRect&&(o.prototype.roundRect=h)}}return d(window),f(window),path2dPolyfill_esm}(function(module,exports){(function(w,t){module.exports=w.pdfjsLib=t()})(globalThis,()=>(()=>{var __webpack_modules__=[,(N,w,t)=>{var Je;Object.defineProperty(w,"__esModule",{value:!0}),w.VerbosityLevel=w.Util=w.UnknownErrorException=w.UnexpectedResponseException=w.TextRenderingMode=w.RenderingIntentFlag=w.PromiseCapability=w.PermissionFlag=w.PasswordResponses=w.PasswordException=w.PageActionEventType=w.OPS=w.MissingPDFException=w.MAX_IMAGE_SIZE_TO_CACHE=w.LINE_FACTOR=w.LINE_DESCENT_FACTOR=w.InvalidPDFException=w.ImageKind=w.IDENTITY_MATRIX=w.FormatError=w.FeatureTest=w.FONT_IDENTITY_MATRIX=w.DocumentActionEventType=w.CMapCompressionType=w.BaseException=w.BASELINE_FACTOR=w.AnnotationType=w.AnnotationReplyType=w.AnnotationPrefix=w.AnnotationMode=w.AnnotationFlag=w.AnnotationFieldFlag=w.AnnotationEditorType=w.AnnotationEditorPrefix=w.AnnotationEditorParamsType=w.AnnotationBorderStyleType=w.AnnotationActionEventType=w.AbortException=void 0,w.assert=oe,w.bytesToString=se,w.createValidAbsoluteUrl=Pe,w.getModificationDate=Ve,w.getUuid=Xe,w.getVerbosityLevel=he,w.info=Y,w.isArrayBuffer=Ce,w.isArrayEqual=Me,w.isNodeJS=void 0,w.normalizeUnicode=Ke,w.objectFromMap=me,w.objectSize=te,w.setVerbosityLevel=j,w.shadow=L,w.string32=pe,w.stringToBytes=q,w.stringToPDFString=ne,w.stringToUTF8String=ce,w.unreachable=ee,w.utf8StringToString=ge,w.warn=z,t(2),t(84),t(86),t(87),t(89),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);const p=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");w.isNodeJS=p;const y=[1,0,0,1,0,0];w.IDENTITY_MATRIX=y;const k=[.001,0,0,.001,0,0];w.FONT_IDENTITY_MATRIX=k;const u=1e7;w.MAX_IMAGE_SIZE_TO_CACHE=u;const g=1.35;w.LINE_FACTOR=g;const e=.35;w.LINE_DESCENT_FACTOR=e;const i=e/g;w.BASELINE_FACTOR=i;const n={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};w.RenderingIntentFlag=n;const d={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};w.AnnotationMode=d;const h="pdfjs_internal_editor_";w.AnnotationEditorPrefix=h;const f={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};w.AnnotationEditorType=f;const a={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};w.AnnotationEditorParamsType=a;const r={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};w.PermissionFlag=r;const o={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};w.TextRenderingMode=o;const m={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};w.ImageKind=m;const v={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};w.AnnotationType=v;const A={GROUP:"Group",REPLY:"R"};w.AnnotationReplyType=A;const b={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};w.AnnotationFlag=b;const c={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};w.AnnotationFieldFlag=c;const s={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};w.AnnotationBorderStyleType=s;const x={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};w.AnnotationActionEventType=x;const T={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};w.DocumentActionEventType=T;const S={O:"PageOpen",C:"PageClose"};w.PageActionEventType=S;const D={ERRORS:0,WARNINGS:1,INFOS:5};w.VerbosityLevel=D;const I={NONE:0,BINARY:1};w.CMapCompressionType=I;const _={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};w.OPS=_;const Q={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};w.PasswordResponses=Q;let W=D.WARNINGS;function j(V){Number.isInteger(V)&&(W=V)}function he(){return W}function Y(V){W>=D.INFOS&&console.log(`Info: ${V}`)}function z(V){W>=D.WARNINGS&&console.log(`Warning: ${V}`)}function ee(V){throw new Error(V)}function oe(V,H){V||ee(H)}function ye(V){switch(V==null?void 0:V.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Pe(V){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!V)return null;try{if(X&&typeof V=="string"){if(X.addDefaultProtocol&&V.startsWith("www.")){const Ee=V.match(/\./g);(Ee==null?void 0:Ee.length)>=2&&(V=`http://${V}`)}if(X.tryConvertEncoding)try{V=ce(V)}catch{}}const de=H?new URL(V,H):new URL(V);if(ye(de))return de}catch{}return null}function L(V,H,X){let de=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Object.defineProperty(V,H,{value:X,enumerable:!de,configurable:!0,writable:!1}),X}const P=function(){function H(X,de){this.constructor===H&&ee("Cannot initialize BaseException."),this.message=X,this.name=de}return H.prototype=new Error,H.constructor=H,H}();w.BaseException=P;class M extends P{constructor(H,X){super(H,"PasswordException"),this.code=X}}w.PasswordException=M;class E extends P{constructor(H,X){super(H,"UnknownErrorException"),this.details=X}}w.UnknownErrorException=E;class R extends P{constructor(H){super(H,"InvalidPDFException")}}w.InvalidPDFException=R;class O extends P{constructor(H){super(H,"MissingPDFException")}}w.MissingPDFException=O;class B extends P{constructor(H,X){super(H,"UnexpectedResponseException"),this.status=X}}w.UnexpectedResponseException=B;class F extends P{constructor(H){super(H,"FormatError")}}w.FormatError=F;class Z extends P{constructor(H){super(H,"AbortException")}}w.AbortException=Z;function se(V){(typeof V!="object"||(V==null?void 0:V.length)===void 0)&&ee("Invalid argument for bytesToString");const H=V.length,X=8192;if(H<X)return String.fromCharCode.apply(null,V);const de=[];for(let Ee=0;Ee<H;Ee+=X){const K=Math.min(Ee+X,H),U=V.subarray(Ee,K);de.push(String.fromCharCode.apply(null,U))}return de.join("")}function q(V){typeof V!="string"&&ee("Invalid argument for stringToBytes");const H=V.length,X=new Uint8Array(H);for(let de=0;de<H;++de)X[de]=V.charCodeAt(de)&255;return X}function pe(V){return String.fromCharCode(V>>24&255,V>>16&255,V>>8&255,V&255)}function te(V){return Object.keys(V).length}function me(V){const H=Object.create(null);for(const[X,de]of V)H[X]=de;return H}function ve(){const V=new Uint8Array(4);return V[0]=1,new Uint32Array(V.buffer,0,1)[0]===1}function Re(){try{return new Function(""),!0}catch{return!1}}class Oe{static get isLittleEndian(){return L(this,"isLittleEndian",ve())}static get isEvalSupported(){return L(this,"isEvalSupported",Re())}static get isOffscreenCanvasSupported(){return L(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?L(this,"platform",{isWin:!1,isMac:!1}):L(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){var H,X;return L(this,"isCSSRoundSupported",(X=(H=globalThis.CSS)==null?void 0:H.supports)==null?void 0:X.call(H,"width: round(1.5px, 1px)"))}}w.FeatureTest=Oe;const Ie=[...Array(256).keys()].map(V=>V.toString(16).padStart(2,"0"));class Le{static makeHexColor(H,X,de){return`#${Ie[H]}${Ie[X]}${Ie[de]}`}static scaleMinMax(H,X){let de;H[0]?(H[0]<0&&(de=X[0],X[0]=X[1],X[1]=de),X[0]*=H[0],X[1]*=H[0],H[3]<0&&(de=X[2],X[2]=X[3],X[3]=de),X[2]*=H[3],X[3]*=H[3]):(de=X[0],X[0]=X[2],X[2]=de,de=X[1],X[1]=X[3],X[3]=de,H[1]<0&&(de=X[2],X[2]=X[3],X[3]=de),X[2]*=H[1],X[3]*=H[1],H[2]<0&&(de=X[0],X[0]=X[1],X[1]=de),X[0]*=H[2],X[1]*=H[2]),X[0]+=H[4],X[1]+=H[4],X[2]+=H[5],X[3]+=H[5]}static transform(H,X){return[H[0]*X[0]+H[2]*X[1],H[1]*X[0]+H[3]*X[1],H[0]*X[2]+H[2]*X[3],H[1]*X[2]+H[3]*X[3],H[0]*X[4]+H[2]*X[5]+H[4],H[1]*X[4]+H[3]*X[5]+H[5]]}static applyTransform(H,X){const de=H[0]*X[0]+H[1]*X[2]+X[4],Ee=H[0]*X[1]+H[1]*X[3]+X[5];return[de,Ee]}static applyInverseTransform(H,X){const de=X[0]*X[3]-X[1]*X[2],Ee=(H[0]*X[3]-H[1]*X[2]+X[2]*X[5]-X[4]*X[3])/de,K=(-H[0]*X[1]+H[1]*X[0]+X[4]*X[1]-X[5]*X[0])/de;return[Ee,K]}static getAxialAlignedBoundingBox(H,X){const de=this.applyTransform(H,X),Ee=this.applyTransform(H.slice(2,4),X),K=this.applyTransform([H[0],H[3]],X),U=this.applyTransform([H[2],H[1]],X);return[Math.min(de[0],Ee[0],K[0],U[0]),Math.min(de[1],Ee[1],K[1],U[1]),Math.max(de[0],Ee[0],K[0],U[0]),Math.max(de[1],Ee[1],K[1],U[1])]}static inverseTransform(H){const X=H[0]*H[3]-H[1]*H[2];return[H[3]/X,-H[1]/X,-H[2]/X,H[0]/X,(H[2]*H[5]-H[4]*H[3])/X,(H[4]*H[1]-H[5]*H[0])/X]}static singularValueDecompose2dScale(H){const X=[H[0],H[2],H[1],H[3]],de=H[0]*X[0]+H[1]*X[2],Ee=H[0]*X[1]+H[1]*X[3],K=H[2]*X[0]+H[3]*X[2],U=H[2]*X[1]+H[3]*X[3],ie=(de+U)/2,Ae=Math.sqrt((de+U)**2-4*(de*U-K*Ee))/2,Se=ie+Ae||1,we=ie-Ae||1;return[Math.sqrt(Se),Math.sqrt(we)]}static normalizeRect(H){const X=H.slice(0);return H[0]>H[2]&&(X[0]=H[2],X[2]=H[0]),H[1]>H[3]&&(X[1]=H[3],X[3]=H[1]),X}static intersect(H,X){const de=Math.max(Math.min(H[0],H[2]),Math.min(X[0],X[2])),Ee=Math.min(Math.max(H[0],H[2]),Math.max(X[0],X[2]));if(de>Ee)return null;const K=Math.max(Math.min(H[1],H[3]),Math.min(X[1],X[3])),U=Math.min(Math.max(H[1],H[3]),Math.max(X[1],X[3]));return K>U?null:[de,K,Ee,U]}static bezierBoundingBox(H,X,de,Ee,K,U,ie,Ae){const Se=[],we=[[],[]];let Te,Ne,ke,Ue,Be,re,C,G;for(let xe=0;xe<2;++xe){if(xe===0?(Ne=6*H-12*de+6*K,Te=-3*H+9*de-9*K+3*ie,ke=3*de-3*H):(Ne=6*X-12*Ee+6*U,Te=-3*X+9*Ee-9*U+3*Ae,ke=3*Ee-3*X),Math.abs(Te)<1e-12){if(Math.abs(Ne)<1e-12)continue;Ue=-ke/Ne,0<Ue&&Ue<1&&Se.push(Ue);continue}C=Ne*Ne-4*ke*Te,G=Math.sqrt(C),!(C<0)&&(Be=(-Ne+G)/(2*Te),0<Be&&Be<1&&Se.push(Be),re=(-Ne-G)/(2*Te),0<re&&re<1&&Se.push(re))}let ae=Se.length,fe;const be=ae;for(;ae--;)Ue=Se[ae],fe=1-Ue,we[0][ae]=fe*fe*fe*H+3*fe*fe*Ue*de+3*fe*Ue*Ue*K+Ue*Ue*Ue*ie,we[1][ae]=fe*fe*fe*X+3*fe*fe*Ue*Ee+3*fe*Ue*Ue*U+Ue*Ue*Ue*Ae;return we[0][be]=H,we[1][be]=X,we[0][be+1]=ie,we[1][be+1]=Ae,we[0].length=we[1].length=be+2,[Math.min(...we[0]),Math.min(...we[1]),Math.max(...we[0]),Math.max(...we[1])]}}w.Util=Le;const ue=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function ne(V){if(V[0]>="ï"){let X;if(V[0]==="þ"&&V[1]==="ÿ"?X="utf-16be":V[0]==="ÿ"&&V[1]==="þ"?X="utf-16le":V[0]==="ï"&&V[1]==="»"&&V[2]==="¿"&&(X="utf-8"),X)try{const de=new TextDecoder(X,{fatal:!0}),Ee=q(V);return de.decode(Ee)}catch(de){z(`stringToPDFString: "${de}".`)}}const H=[];for(let X=0,de=V.length;X<de;X++){const Ee=ue[V.charCodeAt(X)];H.push(Ee?String.fromCharCode(Ee):V.charAt(X))}return H.join("")}function ce(V){return decodeURIComponent(escape(V))}function ge(V){return unescape(encodeURIComponent(V))}function Ce(V){return typeof V=="object"&&(V==null?void 0:V.byteLength)!==void 0}function Me(V,H){if(V.length!==H.length)return!1;for(let X=0,de=V.length;X<de;X++)if(V[X]!==H[X])return!1;return!0}function Ve(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date;return[V.getUTCFullYear().toString(),(V.getUTCMonth()+1).toString().padStart(2,"0"),V.getUTCDate().toString().padStart(2,"0"),V.getUTCHours().toString().padStart(2,"0"),V.getUTCMinutes().toString().padStart(2,"0"),V.getUTCSeconds().toString().padStart(2,"0")].join("")}class ze{constructor(){$(this,Je,!1);this.promise=new Promise((H,X)=>{this.resolve=de=>{le(this,Je,!0),H(de)},this.reject=de=>{le(this,Je,!0),X(de)}})}get settled(){return l(this,Je)}}Je=new WeakMap,w.PromiseCapability=ze;let _e=null,He=null;function Ke(V){return _e||(_e=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,He=new Map([["ſt","ſt"]])),V.replaceAll(_e,(H,X,de)=>X?X.normalize("NFKC"):He.get(de))}function Xe(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const V=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(V);else for(let H=0;H<32;H++)V[H]=Math.floor(Math.random()*255);return se(V)}const je="pdfjs_internal_id_";w.AnnotationPrefix=je},(N,w,t)=>{var p=t(3),y=t(4),k=t(69),u=t(70),g="WebAssembly",e=y[g],i=Error("e",{cause:7}).cause!==7,n=function(h,f){var a={};a[h]=u(h,f,i),p({global:!0,constructor:!0,arity:1,forced:i},a)},d=function(h,f){if(e&&e[h]){var a={};a[h]=u(g+"."+h,f,i),p({target:g,stat:!0,constructor:!0,arity:1,forced:i},a)}};n("Error",function(h){return function(a){return k(h,this,arguments)}}),n("EvalError",function(h){return function(a){return k(h,this,arguments)}}),n("RangeError",function(h){return function(a){return k(h,this,arguments)}}),n("ReferenceError",function(h){return function(a){return k(h,this,arguments)}}),n("SyntaxError",function(h){return function(a){return k(h,this,arguments)}}),n("TypeError",function(h){return function(a){return k(h,this,arguments)}}),n("URIError",function(h){return function(a){return k(h,this,arguments)}}),d("CompileError",function(h){return function(a){return k(h,this,arguments)}}),d("LinkError",function(h){return function(a){return k(h,this,arguments)}}),d("RuntimeError",function(h){return function(a){return k(h,this,arguments)}})},(N,w,t)=>{var p=t(4),y=t(5).f,k=t(44),u=t(48),g=t(38),e=t(56),i=t(68);N.exports=function(n,d){var h=n.target,f=n.global,a=n.stat,r,o,m,v,A,b;if(f?o=p:a?o=p[h]||g(h,{}):o=(p[h]||{}).prototype,o)for(m in d){if(A=d[m],n.dontCallGetSet?(b=y(o,m),v=b&&b.value):v=o[m],r=i(f?m:h+(a?".":"#")+m,n.forced),!r&&v!==void 0){if(typeof A==typeof v)continue;e(A,v)}(n.sham||v&&v.sham)&&k(A,"sham",!0),u(o,m,A,n)}}},function(N){var w=function(t){return t&&t.Math===Math&&t};N.exports=w(typeof globalThis=="object"&&globalThis)||w(typeof window=="object"&&window)||w(typeof self=="object"&&self)||w(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(N,w,t)=>{var p=t(6),y=t(8),k=t(10),u=t(11),g=t(12),e=t(18),i=t(39),n=t(42),d=Object.getOwnPropertyDescriptor;w.f=p?d:function(f,a){if(f=g(f),a=e(a),n)try{return d(f,a)}catch{}if(i(f,a))return u(!y(k.f,f,a),f[a])}},(N,w,t)=>{var p=t(7);N.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},N=>{N.exports=function(w){try{return!!w()}catch{return!0}}},(N,w,t)=>{var p=t(9),y=Function.prototype.call;N.exports=p?y.bind(y):function(){return y.apply(y,arguments)}},(N,w,t)=>{var p=t(7);N.exports=!p(function(){var y=(function(){}).bind();return typeof y!="function"||y.hasOwnProperty("prototype")})},(N,w)=>{var t={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,y=p&&!t.call({1:2},1);w.f=y?function(u){var g=p(this,u);return!!g&&g.enumerable}:t},N=>{N.exports=function(w,t){return{enumerable:!(w&1),configurable:!(w&2),writable:!(w&4),value:t}}},(N,w,t)=>{var p=t(13),y=t(16);N.exports=function(k){return p(y(k))}},(N,w,t)=>{var p=t(14),y=t(7),k=t(15),u=Object,g=p("".split);N.exports=y(function(){return!u("z").propertyIsEnumerable(0)})?function(e){return k(e)==="String"?g(e,""):u(e)}:u},(N,w,t)=>{var p=t(9),y=Function.prototype,k=y.call,u=p&&y.bind.bind(k,k);N.exports=p?u:function(g){return function(){return k.apply(g,arguments)}}},(N,w,t)=>{var p=t(14),y=p({}.toString),k=p("".slice);N.exports=function(u){return k(y(u),8,-1)}},(N,w,t)=>{var p=t(17),y=TypeError;N.exports=function(k){if(p(k))throw y("Can't call method on "+k);return k}},N=>{N.exports=function(w){return w==null}},(N,w,t)=>{var p=t(19),y=t(23);N.exports=function(k){var u=p(k,"string");return y(u)?u:u+""}},(N,w,t)=>{var p=t(8),y=t(20),k=t(23),u=t(30),g=t(33),e=t(34),i=TypeError,n=e("toPrimitive");N.exports=function(d,h){if(!y(d)||k(d))return d;var f=u(d,n),a;if(f){if(h===void 0&&(h="default"),a=p(f,d,h),!y(a)||k(a))return a;throw i("Can't convert object to primitive value")}return h===void 0&&(h="number"),g(d,h)}},(N,w,t)=>{var p=t(21),y=t(22),k=y.all;N.exports=y.IS_HTMLDDA?function(u){return typeof u=="object"?u!==null:p(u)||u===k}:function(u){return typeof u=="object"?u!==null:p(u)}},(N,w,t)=>{var p=t(22),y=p.all;N.exports=p.IS_HTMLDDA?function(k){return typeof k=="function"||k===y}:function(k){return typeof k=="function"}},N=>{var w=typeof document=="object"&&document.all,t=typeof w>"u"&&w!==void 0;N.exports={all:w,IS_HTMLDDA:t}},(N,w,t)=>{var p=t(24),y=t(21),k=t(25),u=t(26),g=Object;N.exports=u?function(e){return typeof e=="symbol"}:function(e){var i=p("Symbol");return y(i)&&k(i.prototype,g(e))}},(N,w,t)=>{var p=t(4),y=t(21),k=function(u){return y(u)?u:void 0};N.exports=function(u,g){return arguments.length<2?k(p[u]):p[u]&&p[u][g]}},(N,w,t)=>{var p=t(14);N.exports=p({}.isPrototypeOf)},(N,w,t)=>{var p=t(27);N.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(N,w,t)=>{var p=t(28),y=t(7),k=t(4),u=k.String;N.exports=!!Object.getOwnPropertySymbols&&!y(function(){var g=Symbol("symbol detection");return!u(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&p&&p<41})},(N,w,t)=>{var p=t(4),y=t(29),k=p.process,u=p.Deno,g=k&&k.versions||u&&u.version,e=g&&g.v8,i,n;e&&(i=e.split("."),n=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!n&&y&&(i=y.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=y.match(/Chrome\/(\d+)/),i&&(n=+i[1]))),N.exports=n},N=>{N.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(N,w,t)=>{var p=t(31),y=t(17);N.exports=function(k,u){var g=k[u];return y(g)?void 0:p(g)}},(N,w,t)=>{var p=t(21),y=t(32),k=TypeError;N.exports=function(u){if(p(u))return u;throw k(y(u)+" is not a function")}},N=>{var w=String;N.exports=function(t){try{return w(t)}catch{return"Object"}}},(N,w,t)=>{var p=t(8),y=t(21),k=t(20),u=TypeError;N.exports=function(g,e){var i,n;if(e==="string"&&y(i=g.toString)&&!k(n=p(i,g))||y(i=g.valueOf)&&!k(n=p(i,g))||e!=="string"&&y(i=g.toString)&&!k(n=p(i,g)))return n;throw u("Can't convert object to primitive value")}},(N,w,t)=>{var p=t(4),y=t(35),k=t(39),u=t(41),g=t(27),e=t(26),i=p.Symbol,n=y("wks"),d=e?i.for||i:i&&i.withoutSetter||u;N.exports=function(h){return k(n,h)||(n[h]=g&&k(i,h)?i[h]:d("Symbol."+h)),n[h]}},(N,w,t)=>{var p=t(36),y=t(37);(N.exports=function(k,u){return y[k]||(y[k]=u!==void 0?u:{})})("versions",[]).push({version:"3.32.2",mode:p?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},N=>{N.exports=!1},(N,w,t)=>{var p=t(4),y=t(38),k="__core-js_shared__",u=p[k]||y(k,{});N.exports=u},(N,w,t)=>{var p=t(4),y=Object.defineProperty;N.exports=function(k,u){try{y(p,k,{value:u,configurable:!0,writable:!0})}catch{p[k]=u}return u}},(N,w,t)=>{var p=t(14),y=t(40),k=p({}.hasOwnProperty);N.exports=Object.hasOwn||function(g,e){return k(y(g),e)}},(N,w,t)=>{var p=t(16),y=Object;N.exports=function(k){return y(p(k))}},(N,w,t)=>{var p=t(14),y=0,k=Math.random(),u=p(1 .toString);N.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+u(++y+k,36)}},(N,w,t)=>{var p=t(6),y=t(7),k=t(43);N.exports=!p&&!y(function(){return Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a!==7})},(N,w,t)=>{var p=t(4),y=t(20),k=p.document,u=y(k)&&y(k.createElement);N.exports=function(g){return u?k.createElement(g):{}}},(N,w,t)=>{var p=t(6),y=t(45),k=t(11);N.exports=p?function(u,g,e){return y.f(u,g,k(1,e))}:function(u,g,e){return u[g]=e,u}},(N,w,t)=>{var p=t(6),y=t(42),k=t(46),u=t(47),g=t(18),e=TypeError,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",f="writable";w.f=p?k?function(r,o,m){if(u(r),o=g(o),u(m),typeof r=="function"&&o==="prototype"&&"value"in m&&f in m&&!m[f]){var v=n(r,o);v&&v[f]&&(r[o]=m.value,m={configurable:h in m?m[h]:v[h],enumerable:d in m?m[d]:v[d],writable:!1})}return i(r,o,m)}:i:function(r,o,m){if(u(r),o=g(o),u(m),y)try{return i(r,o,m)}catch{}if("get"in m||"set"in m)throw e("Accessors not supported");return"value"in m&&(r[o]=m.value),r}},(N,w,t)=>{var p=t(6),y=t(7);N.exports=p&&y(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},(N,w,t)=>{var p=t(20),y=String,k=TypeError;N.exports=function(u){if(p(u))return u;throw k(y(u)+" is not an object")}},(N,w,t)=>{var p=t(21),y=t(45),k=t(49),u=t(38);N.exports=function(g,e,i,n){n||(n={});var d=n.enumerable,h=n.name!==void 0?n.name:e;if(p(i)&&k(i,h,n),n.global)d?g[e]=i:u(e,i);else{try{n.unsafe?g[e]&&(d=!0):delete g[e]}catch{}d?g[e]=i:y.f(g,e,{value:i,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return g}},(N,w,t)=>{var p=t(14),y=t(7),k=t(21),u=t(39),g=t(6),e=t(50).CONFIGURABLE,i=t(51),n=t(52),d=n.enforce,h=n.get,f=String,a=Object.defineProperty,r=p("".slice),o=p("".replace),m=p([].join),v=g&&!y(function(){return a(function(){},"length",{value:8}).length!==8}),A=String(String).split("String"),b=N.exports=function(c,s,x){r(f(s),0,7)==="Symbol("&&(s="["+o(f(s),/^Symbol\(([^)]*)\)/,"$1")+"]"),x&&x.getter&&(s="get "+s),x&&x.setter&&(s="set "+s),(!u(c,"name")||e&&c.name!==s)&&(g?a(c,"name",{value:s,configurable:!0}):c.name=s),v&&x&&u(x,"arity")&&c.length!==x.arity&&a(c,"length",{value:x.arity});try{x&&u(x,"constructor")&&x.constructor?g&&a(c,"prototype",{writable:!1}):c.prototype&&(c.prototype=void 0)}catch{}var T=d(c);return u(T,"source")||(T.source=m(A,typeof s=="string"?s:"")),c};Function.prototype.toString=b(function(){return k(this)&&h(this).source||i(this)},"toString")},(N,w,t)=>{var p=t(6),y=t(39),k=Function.prototype,u=p&&Object.getOwnPropertyDescriptor,g=y(k,"name"),e=g&&(function(){}).name==="something",i=g&&(!p||p&&u(k,"name").configurable);N.exports={EXISTS:g,PROPER:e,CONFIGURABLE:i}},(N,w,t)=>{var p=t(14),y=t(21),k=t(37),u=p(Function.toString);y(k.inspectSource)||(k.inspectSource=function(g){return u(g)}),N.exports=k.inspectSource},(N,w,t)=>{var p=t(53),y=t(4),k=t(20),u=t(44),g=t(39),e=t(37),i=t(54),n=t(55),d="Object already initialized",h=y.TypeError,f=y.WeakMap,a,r,o,m=function(c){return o(c)?r(c):a(c,{})},v=function(c){return function(s){var x;if(!k(s)||(x=r(s)).type!==c)throw h("Incompatible receiver, "+c+" required");return x}};if(p||e.state){var A=e.state||(e.state=new f);A.get=A.get,A.has=A.has,A.set=A.set,a=function(c,s){if(A.has(c))throw h(d);return s.facade=c,A.set(c,s),s},r=function(c){return A.get(c)||{}},o=function(c){return A.has(c)}}else{var b=i("state");n[b]=!0,a=function(c,s){if(g(c,b))throw h(d);return s.facade=c,u(c,b,s),s},r=function(c){return g(c,b)?c[b]:{}},o=function(c){return g(c,b)}}N.exports={set:a,get:r,has:o,enforce:m,getterFor:v}},(N,w,t)=>{var p=t(4),y=t(21),k=p.WeakMap;N.exports=y(k)&&/native code/.test(String(k))},(N,w,t)=>{var p=t(35),y=t(41),k=p("keys");N.exports=function(u){return k[u]||(k[u]=y(u))}},N=>{N.exports={}},(N,w,t)=>{var p=t(39),y=t(57),k=t(5),u=t(45);N.exports=function(g,e,i){for(var n=y(e),d=u.f,h=k.f,f=0;f<n.length;f++){var a=n[f];!p(g,a)&&!(i&&p(i,a))&&d(g,a,h(e,a))}}},(N,w,t)=>{var p=t(24),y=t(14),k=t(58),u=t(67),g=t(47),e=y([].concat);N.exports=p("Reflect","ownKeys")||function(n){var d=k.f(g(n)),h=u.f;return h?e(d,h(n)):d}},(N,w,t)=>{var p=t(59),y=t(66),k=y.concat("length","prototype");w.f=Object.getOwnPropertyNames||function(g){return p(g,k)}},(N,w,t)=>{var p=t(14),y=t(39),k=t(12),u=t(60).indexOf,g=t(55),e=p([].push);N.exports=function(i,n){var d=k(i),h=0,f=[],a;for(a in d)!y(g,a)&&y(d,a)&&e(f,a);for(;n.length>h;)y(d,a=n[h++])&&(~u(f,a)||e(f,a));return f}},(N,w,t)=>{var p=t(12),y=t(61),k=t(64),u=function(g){return function(e,i,n){var d=p(e),h=k(d),f=y(n,h),a;if(g&&i!==i){for(;h>f;)if(a=d[f++],a!==a)return!0}else for(;h>f;f++)if((g||f in d)&&d[f]===i)return g||f||0;return!g&&-1}};N.exports={includes:u(!0),indexOf:u(!1)}},(N,w,t)=>{var p=t(62),y=Math.max,k=Math.min;N.exports=function(u,g){var e=p(u);return e<0?y(e+g,0):k(e,g)}},(N,w,t)=>{var p=t(63);N.exports=function(y){var k=+y;return k!==k||k===0?0:p(k)}},N=>{var w=Math.ceil,t=Math.floor;N.exports=Math.trunc||function(y){var k=+y;return(k>0?t:w)(k)}},(N,w,t)=>{var p=t(65);N.exports=function(y){return p(y.length)}},(N,w,t)=>{var p=t(62),y=Math.min;N.exports=function(k){return k>0?y(p(k),9007199254740991):0}},N=>{N.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(N,w)=>{w.f=Object.getOwnPropertySymbols},(N,w,t)=>{var p=t(7),y=t(21),k=/#|\.prototype\./,u=function(d,h){var f=e[g(d)];return f===n?!0:f===i?!1:y(h)?p(h):!!h},g=u.normalize=function(d){return String(d).replace(k,".").toLowerCase()},e=u.data={},i=u.NATIVE="N",n=u.POLYFILL="P";N.exports=u},(N,w,t)=>{var p=t(9),y=Function.prototype,k=y.apply,u=y.call;N.exports=typeof Reflect=="object"&&Reflect.apply||(p?u.bind(k):function(){return u.apply(k,arguments)})},(N,w,t)=>{var p=t(24),y=t(39),k=t(44),u=t(25),g=t(71),e=t(56),i=t(74),n=t(75),d=t(76),h=t(80),f=t(81),a=t(6),r=t(36);N.exports=function(o,m,v,A){var b="stackTraceLimit",c=A?2:1,s=o.split("."),x=s[s.length-1],T=p.apply(null,s);if(T){var S=T.prototype;if(!r&&y(S,"cause")&&delete S.cause,!v)return T;var D=p("Error"),I=m(function(_,Q){var W=d(A?Q:_,void 0),j=A?new T(_):new T;return W!==void 0&&k(j,"message",W),f(j,I,j.stack,2),this&&u(S,this)&&n(j,this,I),arguments.length>c&&h(j,arguments[c]),j});if(I.prototype=S,x!=="Error"?g?g(I,D):e(I,D,{name:!0}):a&&b in T&&(i(I,T,b),i(I,T,"prepareStackTrace")),e(I,T),!r)try{S.name!==x&&k(S,"name",x),S.constructor=I}catch{}return I}}},(N,w,t)=>{var p=t(72),y=t(47),k=t(73);N.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,g={},e;try{e=p(Object.prototype,"__proto__","set"),e(g,[]),u=g instanceof Array}catch{}return function(n,d){return y(n),k(d),u?e(n,d):n.__proto__=d,n}}():void 0)},(N,w,t)=>{var p=t(14),y=t(31);N.exports=function(k,u,g){try{return p(y(Object.getOwnPropertyDescriptor(k,u)[g]))}catch{}}},(N,w,t)=>{var p=t(21),y=String,k=TypeError;N.exports=function(u){if(typeof u=="object"||p(u))return u;throw k("Can't set "+y(u)+" as a prototype")}},(N,w,t)=>{var p=t(45).f;N.exports=function(y,k,u){u in y||p(y,u,{configurable:!0,get:function(){return k[u]},set:function(g){k[u]=g}})}},(N,w,t)=>{var p=t(21),y=t(20),k=t(71);N.exports=function(u,g,e){var i,n;return k&&p(i=g.constructor)&&i!==e&&y(n=i.prototype)&&n!==e.prototype&&k(u,n),u}},(N,w,t)=>{var p=t(77);N.exports=function(y,k){return y===void 0?arguments.length<2?"":k:p(y)}},(N,w,t)=>{var p=t(78),y=String;N.exports=function(k){if(p(k)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return y(k)}},(N,w,t)=>{var p=t(79),y=t(21),k=t(15),u=t(34),g=u("toStringTag"),e=Object,i=k(function(){return arguments}())==="Arguments",n=function(d,h){try{return d[h]}catch{}};N.exports=p?k:function(d){var h,f,a;return d===void 0?"Undefined":d===null?"Null":typeof(f=n(h=e(d),g))=="string"?f:i?k(h):(a=k(h))==="Object"&&y(h.callee)?"Arguments":a}},(N,w,t)=>{var p=t(34),y=p("toStringTag"),k={};k[y]="z",N.exports=String(k)==="[object z]"},(N,w,t)=>{var p=t(20),y=t(44);N.exports=function(k,u){p(u)&&"cause"in u&&y(k,"cause",u.cause)}},(N,w,t)=>{var p=t(44),y=t(82),k=t(83),u=Error.captureStackTrace;N.exports=function(g,e,i,n){k&&(u?u(g,e):p(g,"stack",y(i,n)))}},(N,w,t)=>{var p=t(14),y=Error,k=p("".replace),u=function(i){return String(y(i).stack)}("zxcasd"),g=/\n\s*at [^:]*:[^\n]*/,e=g.test(u);N.exports=function(i,n){if(e&&typeof i=="string"&&!y.prepareStackTrace)for(;n--;)i=k(i,g,"");return i}},(N,w,t)=>{var p=t(7),y=t(11);N.exports=!p(function(){var k=Error("a");return"stack"in k?(Object.defineProperty(k,"stack",y(1,7)),k.stack!==7):!0})},(N,w,t)=>{var p=t(48),y=t(14),k=t(77),u=t(85),g=URLSearchParams,e=g.prototype,i=y(e.append),n=y(e.delete),d=y(e.forEach),h=y([].push),f=new g("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!="a=2"&&p(e,"delete",function(a){var r=arguments.length,o=r<2?void 0:arguments[1];if(r&&o===void 0)return n(this,a);var m=[];d(this,function(S,D){h(m,{key:D,value:S})}),u(r,1);for(var v=k(a),A=k(o),b=0,c=0,s=!1,x=m.length,T;b<x;)T=m[b++],s||T.key===v?(s=!0,n(this,T.key)):c++;for(;c<x;)T=m[c++],T.key===v&&T.value===A||i(this,T.key,T.value)},{enumerable:!0,unsafe:!0})},N=>{var w=TypeError;N.exports=function(t,p){if(t<p)throw w("Not enough arguments");return t}},(N,w,t)=>{var p=t(48),y=t(14),k=t(77),u=t(85),g=URLSearchParams,e=g.prototype,i=y(e.getAll),n=y(e.has),d=new g("a=1");(d.has("a",2)||!d.has("a",void 0))&&p(e,"has",function(f){var a=arguments.length,r=a<2?void 0:arguments[1];if(a&&r===void 0)return n(this,f);var o=i(this,f);u(a,1);for(var m=k(r),v=0;v<o.length;)if(o[v++]===m)return!0;return!1},{enumerable:!0,unsafe:!0})},(N,w,t)=>{var p=t(6),y=t(14),k=t(88),u=URLSearchParams.prototype,g=y(u.forEach);p&&!("size"in u)&&k(u,"size",{get:function(){var i=0;return g(this,function(){i++}),i},configurable:!0,enumerable:!0})},(N,w,t)=>{var p=t(49),y=t(45);N.exports=function(k,u,g){return g.get&&p(g.get,u,{getter:!0}),g.set&&p(g.set,u,{setter:!0}),y.f(k,u,g)}},(N,w,t)=>{var p=t(3),y=t(40),k=t(64),u=t(90),g=t(92),e=t(7),i=e(function(){return[].push.call({length:4294967296},1)!==4294967297}),n=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(h){return h instanceof TypeError}},d=i||!n();p({target:"Array",proto:!0,arity:1,forced:d},{push:function(f){var a=y(this),r=k(a),o=arguments.length;g(r+o);for(var m=0;m<o;m++)a[r]=arguments[m],r++;return u(a,r),r}})},(N,w,t)=>{var p=t(6),y=t(91),k=TypeError,u=Object.getOwnPropertyDescriptor,g=p&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();N.exports=g?function(e,i){if(y(e)&&!u(e,"length").writable)throw k("Cannot set read only .length");return e.length=i}:function(e,i){return e.length=i}},(N,w,t)=>{var p=t(15);N.exports=Array.isArray||function(k){return p(k)==="Array"}},N=>{var w=TypeError,t=9007199254740991;N.exports=function(p){if(p>t)throw w("Maximum allowed index exceeded");return p}},(N,w,t)=>{var p=t(94),y=t(98).findLast,k=p.aTypedArray,u=p.exportTypedArrayMethod;u("findLast",function(e){return y(k(this),e,arguments.length>1?arguments[1]:void 0)})},(N,w,t)=>{var p=t(95),y=t(6),k=t(4),u=t(21),g=t(20),e=t(39),i=t(78),n=t(32),d=t(44),h=t(48),f=t(88),a=t(25),r=t(96),o=t(71),m=t(34),v=t(41),A=t(52),b=A.enforce,c=A.get,s=k.Int8Array,x=s&&s.prototype,T=k.Uint8ClampedArray,S=T&&T.prototype,D=s&&r(s),I=x&&r(x),_=Object.prototype,Q=k.TypeError,W=m("toStringTag"),j=v("TYPED_ARRAY_TAG"),he="TypedArrayConstructor",Y=p&&!!o&&i(k.opera)!=="Opera",z=!1,ee,oe,ye,Pe={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},P=function(se){if(!g(se))return!1;var q=i(se);return q==="DataView"||e(Pe,q)||e(L,q)},M=function(Z){var se=r(Z);if(g(se)){var q=c(se);return q&&e(q,he)?q[he]:M(se)}},E=function(Z){if(!g(Z))return!1;var se=i(Z);return e(Pe,se)||e(L,se)},R=function(Z){if(E(Z))return Z;throw Q("Target is not a typed array")},O=function(Z){if(u(Z)&&(!o||a(D,Z)))return Z;throw Q(n(Z)+" is not a typed array constructor")},B=function(Z,se,q,pe){if(y){if(q)for(var te in Pe){var me=k[te];if(me&&e(me.prototype,Z))try{delete me.prototype[Z]}catch{try{me.prototype[Z]=se}catch{}}}(!I[Z]||q)&&h(I,Z,q?se:Y&&x[Z]||se,pe)}},F=function(Z,se,q){var pe,te;if(y){if(o){if(q){for(pe in Pe)if(te=k[pe],te&&e(te,Z))try{delete te[Z]}catch{}}if(!D[Z]||q)try{return h(D,Z,q?se:Y&&D[Z]||se)}catch{}else return}for(pe in Pe)te=k[pe],te&&(!te[Z]||q)&&h(te,Z,se)}};for(ee in Pe)oe=k[ee],ye=oe&&oe.prototype,ye?b(ye)[he]=oe:Y=!1;for(ee in L)oe=k[ee],ye=oe&&oe.prototype,ye&&(b(ye)[he]=oe);if((!Y||!u(D)||D===Function.prototype)&&(D=function(){throw Q("Incorrect invocation")},Y))for(ee in Pe)k[ee]&&o(k[ee],D);if((!Y||!I||I===_)&&(I=D.prototype,Y))for(ee in Pe)k[ee]&&o(k[ee].prototype,I);if(Y&&r(S)!==I&&o(S,I),y&&!e(I,W)){z=!0,f(I,W,{configurable:!0,get:function(){return g(this)?this[j]:void 0}});for(ee in Pe)k[ee]&&d(k[ee],j,ee)}N.exports={NATIVE_ARRAY_BUFFER_VIEWS:Y,TYPED_ARRAY_TAG:z&&j,aTypedArray:R,aTypedArrayConstructor:O,exportTypedArrayMethod:B,exportTypedArrayStaticMethod:F,getTypedArrayConstructor:M,isView:P,isTypedArray:E,TypedArray:D,TypedArrayPrototype:I}},N=>{N.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},(N,w,t)=>{var p=t(39),y=t(21),k=t(40),u=t(54),g=t(97),e=u("IE_PROTO"),i=Object,n=i.prototype;N.exports=g?i.getPrototypeOf:function(d){var h=k(d);if(p(h,e))return h[e];var f=h.constructor;return y(f)&&h instanceof f?f.prototype:h instanceof i?n:null}},(N,w,t)=>{var p=t(7);N.exports=!p(function(){function y(){}return y.prototype.constructor=null,Object.getPrototypeOf(new y)!==y.prototype})},(N,w,t)=>{var p=t(99),y=t(13),k=t(40),u=t(64),g=function(e){var i=e===1;return function(n,d,h){for(var f=k(n),a=y(f),r=p(d,h),o=u(a),m,v;o-- >0;)if(m=a[o],v=r(m,o,f),v)switch(e){case 0:return m;case 1:return o}return i?-1:void 0}};N.exports={findLast:g(0),findLastIndex:g(1)}},(N,w,t)=>{var p=t(100),y=t(31),k=t(9),u=p(p.bind);N.exports=function(g,e){return y(g),e===void 0?g:k?u(g,e):function(){return g.apply(e,arguments)}}},(N,w,t)=>{var p=t(15),y=t(14);N.exports=function(k){if(p(k)==="Function")return y(k)}},(N,w,t)=>{var p=t(94),y=t(98).findLastIndex,k=p.aTypedArray,u=p.exportTypedArrayMethod;u("findLastIndex",function(e){return y(k(this),e,arguments.length>1?arguments[1]:void 0)})},(N,w,t)=>{var p=t(4),y=t(8),k=t(94),u=t(64),g=t(103),e=t(40),i=t(7),n=p.RangeError,d=p.Int8Array,h=d&&d.prototype,f=h&&h.set,a=k.aTypedArray,r=k.exportTypedArrayMethod,o=!i(function(){var v=new Uint8ClampedArray(2);return y(f,v,{length:1,0:3},1),v[1]!==3}),m=o&&k.NATIVE_ARRAY_BUFFER_VIEWS&&i(function(){var v=new d(2);return v.set(1),v.set("2",1),v[0]!==0||v[1]!==2});r("set",function(A){a(this);var b=g(arguments.length>1?arguments[1]:void 0,1),c=e(A);if(o)return y(f,this,c,b);var s=this.length,x=u(c),T=0;if(x+b>s)throw n("Wrong length");for(;T<x;)this[b+T]=c[T++]},!o||m)},(N,w,t)=>{var p=t(104),y=RangeError;N.exports=function(k,u){var g=p(k);if(g%u)throw y("Wrong offset");return g}},(N,w,t)=>{var p=t(62),y=RangeError;N.exports=function(k){var u=p(k);if(u<0)throw y("The argument can't be less than 0");return u}},(N,w,t)=>{var p=t(106),y=t(94),k=y.aTypedArray,u=y.exportTypedArrayMethod,g=y.getTypedArrayConstructor;u("toReversed",function(){return p(k(this),g(this))})},(N,w,t)=>{var p=t(64);N.exports=function(y,k){for(var u=p(y),g=new k(u),e=0;e<u;e++)g[e]=y[u-e-1];return g}},(N,w,t)=>{var p=t(94),y=t(14),k=t(31),u=t(108),g=p.aTypedArray,e=p.getTypedArrayConstructor,i=p.exportTypedArrayMethod,n=y(p.TypedArrayPrototype.sort);i("toSorted",function(h){h!==void 0&&k(h);var f=g(this),a=u(e(f),f);return n(a,h)})},(N,w,t)=>{var p=t(64);N.exports=function(y,k){for(var u=0,g=p(k),e=new y(g);g>u;)e[u]=k[u++];return e}},(N,w,t)=>{var p=t(110),y=t(94),k=t(111),u=t(62),g=t(112),e=y.aTypedArray,i=y.getTypedArrayConstructor,n=y.exportTypedArrayMethod,d=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(h){return h===8}}();n("with",function(h,f){var a=e(this),r=u(h),o=k(a)?g(f):+f;return p(a,i(a),r,o)},!d)},(N,w,t)=>{var p=t(64),y=t(62),k=RangeError;N.exports=function(u,g,e,i){var n=p(u),d=y(e),h=d<0?n+d:d;if(h>=n||h<0)throw k("Incorrect index");for(var f=new g(n),a=0;a<n;a++)f[a]=a===h?i:u[a];return f}},(N,w,t)=>{var p=t(78);N.exports=function(y){var k=p(y);return k==="BigInt64Array"||k==="BigUint64Array"}},(N,w,t)=>{var p=t(19),y=TypeError;N.exports=function(k){var u=p(k,"number");if(typeof u=="number")throw y("Can't convert number to bigint");return BigInt(u)}},(N,w,t)=>{var p=t(6),y=t(88),k=t(114),u=ArrayBuffer.prototype;p&&!("detached"in u)&&y(u,"detached",{configurable:!0,get:function(){return k(this)}})},(N,w,t)=>{var p=t(14),y=t(115),k=p(ArrayBuffer.prototype.slice);N.exports=function(u){if(y(u)!==0)return!1;try{return k(u,0,0),!1}catch{return!0}}},(N,w,t)=>{var p=t(72),y=t(15),k=TypeError;N.exports=p(ArrayBuffer.prototype,"byteLength","get")||function(u){if(y(u)!=="ArrayBuffer")throw k("ArrayBuffer expected");return u.byteLength}},(N,w,t)=>{var p=t(3),y=t(117);y&&p({target:"ArrayBuffer",proto:!0},{transfer:function(){return y(this,arguments.length?arguments[0]:void 0,!0)}})},(N,w,t)=>{var p=t(4),y=t(14),k=t(72),u=t(118),g=t(114),e=t(115),i=t(119),n=p.TypeError,d=p.structuredClone,h=p.ArrayBuffer,f=p.DataView,a=Math.min,r=h.prototype,o=f.prototype,m=y(r.slice),v=k(r,"resizable","get"),A=k(r,"maxByteLength","get"),b=y(o.getInt8),c=y(o.setInt8);N.exports=i&&function(s,x,T){var S=e(s),D=x===void 0?S:u(x),I=!v||!v(s);if(g(s))throw n("ArrayBuffer is detached");var _=d(s,{transfer:[s]});if(S===D&&(T||I))return _;if(S>=D&&(!T||I))return m(_,0,D);for(var Q=T&&!I&&A?{maxByteLength:A(_)}:void 0,W=new h(D,Q),j=new f(_),he=new f(W),Y=a(D,S),z=0;z<Y;z++)c(he,z,b(j,z));return W}},(N,w,t)=>{var p=t(62),y=t(65),k=RangeError;N.exports=function(u){if(u===void 0)return 0;var g=p(u),e=y(g);if(g!==e)throw k("Wrong length or index");return e}},(N,w,t)=>{var p=t(4),y=t(7),k=t(28),u=t(120),g=t(121),e=t(122),i=p.structuredClone;N.exports=!!i&&!y(function(){if(g&&k>92||e&&k>94||u&&k>97)return!1;var n=new ArrayBuffer(8),d=i(n,{transfer:[n]});return n.byteLength!==0||d.byteLength!==8})},(N,w,t)=>{var p=t(121),y=t(122);N.exports=!p&&!y&&typeof window=="object"&&typeof document=="object"},N=>{N.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},(N,w,t)=>{var p=t(4),y=t(15);N.exports=y(p.process)==="process"},(N,w,t)=>{var p=t(3),y=t(117);y&&p({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return y(this,arguments.length?arguments[0]:void 0,!1)}})},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var N,t,p,y,dt,u,Rt,e,i,n,d,h,f,a,r,o,Mt,v,A,Qt,c,s;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0,__w_pdfjs_require__(84),__w_pdfjs_require__(86),__w_pdfjs_require__(87),__w_pdfjs_require__(2),__w_pdfjs_require__(93),__w_pdfjs_require__(101),__w_pdfjs_require__(102),__w_pdfjs_require__(105),__w_pdfjs_require__(107),__w_pdfjs_require__(109),__w_pdfjs_require__(113),__w_pdfjs_require__(116),__w_pdfjs_require__(123),__w_pdfjs_require__(89),__w_pdfjs_require__(125),__w_pdfjs_require__(136),__w_pdfjs_require__(138),__w_pdfjs_require__(141),__w_pdfjs_require__(143),__w_pdfjs_require__(145),__w_pdfjs_require__(147),__w_pdfjs_require__(149),__w_pdfjs_require__(152);var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(163),_display_utils=__w_pdfjs_require__(168),_font_loader=__w_pdfjs_require__(171),_displayNode_utils=__w_pdfjs_require__(172),_canvas=__w_pdfjs_require__(173),_worker_options=__w_pdfjs_require__(176),_message_handler=__w_pdfjs_require__(177),_metadata=__w_pdfjs_require__(178),_optional_content_config=__w_pdfjs_require__(179),_transport_stream=__w_pdfjs_require__(180),_displayFetch_stream=__w_pdfjs_require__(181),_displayNetwork=__w_pdfjs_require__(184),_displayNode_stream=__w_pdfjs_require__(185),_displaySvg=__w_pdfjs_require__(186),_xfa_text=__w_pdfjs_require__(194);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(T){if(typeof T=="string"||T instanceof URL?T={url:T}:(0,_util.isArrayBuffer)(T)&&(T={data:T}),typeof T!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!T.url&&!T.data&&!T.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const S=new PDFDocumentLoadingTask,{docId:D}=S,I=T.url?getUrlProp(T.url):null,_=T.data?getDataProp(T.data):null,Q=T.httpHeaders||null,W=T.withCredentials===!0,j=T.password??null,he=T.range instanceof PDFDataRangeTransport?T.range:null,Y=Number.isInteger(T.rangeChunkSize)&&T.rangeChunkSize>0?T.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let z=T.worker instanceof PDFWorker?T.worker:null;const ee=T.verbosity,oe=typeof T.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(T.docBaseUrl)?T.docBaseUrl:null,ye=typeof T.cMapUrl=="string"?T.cMapUrl:null,Pe=T.cMapPacked!==!1,L=T.CMapReaderFactory||DefaultCMapReaderFactory,P=typeof T.standardFontDataUrl=="string"?T.standardFontDataUrl:null,M=T.StandardFontDataFactory||DefaultStandardFontDataFactory,E=T.stopAtErrors!==!0,R=Number.isInteger(T.maxImageSize)&&T.maxImageSize>-1?T.maxImageSize:-1,O=T.isEvalSupported!==!1,B=typeof T.isOffscreenCanvasSupported=="boolean"?T.isOffscreenCanvasSupported:!_util.isNodeJS,F=Number.isInteger(T.canvasMaxAreaInBytes)?T.canvasMaxAreaInBytes:-1,Z=typeof T.disableFontFace=="boolean"?T.disableFontFace:_util.isNodeJS,se=T.fontExtraProperties===!0,q=T.enableXfa===!0,pe=T.ownerDocument||globalThis.document,te=T.disableRange===!0,me=T.disableStream===!0,ve=T.disableAutoFetch===!0,Re=T.pdfBug===!0,Oe=he?he.length:T.length??NaN,Ie=typeof T.useSystemFonts=="boolean"?T.useSystemFonts:!_util.isNodeJS&&!Z,Le=typeof T.useWorkerFetch=="boolean"?T.useWorkerFetch:L===_display_utils.DOMCMapReaderFactory&&M===_display_utils.DOMStandardFontDataFactory&&ye&&P&&(0,_display_utils.isValidFetchUrl)(ye,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(P,document.baseURI),ue=T.canvasFactory||new DefaultCanvasFactory({ownerDocument:pe}),ne=T.filterFactory||new DefaultFilterFactory({docId:D,ownerDocument:pe}),ce=null;(0,_util.setVerbosityLevel)(ee);const ge={canvasFactory:ue,filterFactory:ne};if(Le||(ge.cMapReaderFactory=new L({baseUrl:ye,isCompressed:Pe}),ge.standardFontDataFactory=new M({baseUrl:P})),!z){const Ve={verbosity:ee,port:_worker_options.GlobalWorkerOptions.workerPort};z=Ve.port?PDFWorker.fromPort(Ve):new PDFWorker(Ve),S._worker=z}const Ce={docId:D,apiVersion:"3.11.174",data:_,password:j,disableAutoFetch:ve,rangeChunkSize:Y,length:Oe,docBaseUrl:oe,enableXfa:q,evaluatorOptions:{maxImageSize:R,disableFontFace:Z,ignoreErrors:E,isEvalSupported:O,isOffscreenCanvasSupported:B,canvasMaxAreaInBytes:F,fontExtraProperties:se,useSystemFonts:Ie,cMapUrl:Le?ye:null,standardFontDataUrl:Le?P:null}},Me={ignoreErrors:E,isEvalSupported:O,disableFontFace:Z,fontExtraProperties:se,enableXfa:q,ownerDocument:pe,disableAutoFetch:ve,pdfBug:Re,styleElement:ce};return z.promise.then(function(){if(S.destroyed)throw new Error("Loading aborted");const Ve=_fetchDocument(z,Ce),ze=new Promise(function(_e){let He;he?He=new _transport_stream.PDFDataTransportStream({length:Oe,initialData:he.initialData,progressiveDone:he.progressiveDone,contentDispositionFilename:he.contentDispositionFilename,disableRange:te,disableStream:me},he):_||(He=(Xe=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(Xe):(0,_display_utils.isValidFetchUrl)(Xe.url)?new _displayFetch_stream.PDFFetchStream(Xe):new _displayNetwork.PDFNetworkStream(Xe))({url:I,length:Oe,httpHeaders:Q,withCredentials:W,rangeChunkSize:Y,disableRange:te,disableStream:me})),_e(He)});return Promise.all([Ve,ze]).then(function(_e){let[He,Ke]=_e;if(S.destroyed)throw new Error("Loading aborted");const Xe=new _message_handler.MessageHandler(D,He,z.port),je=new WorkerTransport(Xe,S,Ke,Me,ge);S._transport=je,Xe.send("Ready",null)})}).catch(S._capability.reject),S}async function _fetchDocument(T,S){if(T.destroyed)throw new Error("Worker was destroyed");const D=await T.messageHandler.sendWithPromise("GetDocRequest",S,S.data?[S.data.buffer]:null);if(T.destroyed)throw new Error("Worker was destroyed");return D}function getUrlProp(T){if(T instanceof URL)return T.href;try{return new URL(T,window.location).href}catch{if(_util.isNodeJS&&typeof T=="string")return T}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(T){if(_util.isNodeJS&&typeof Buffer<"u"&&T instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(T instanceof Uint8Array&&T.byteLength===T.buffer.byteLength)return T;if(typeof T=="string")return(0,_util.stringToBytes)(T);if(typeof T=="object"&&!isNaN(T==null?void 0:T.length)||(0,_util.isArrayBuffer)(T))return new Uint8Array(T);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const w=class w{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId=`d${ut(w,N)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var S,D,I;this.destroyed=!0;try{(S=this._worker)!=null&&S.port&&(this._worker._pendingDestroy=!0),await((D=this._transport)==null?void 0:D.destroy())}catch(_){throw(I=this._worker)!=null&&I.port&&delete this._worker._pendingDestroy,_}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};N=new WeakMap,$(w,N,0);let PDFDocumentLoadingTask=w;exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(S,D){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this.length=S,this.initialData=D,this.progressiveDone=I,this.contentDispositionFilename=_,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(S){this._rangeListeners.push(S)}addProgressListener(S){this._progressListeners.push(S)}addProgressiveReadListener(S){this._progressiveReadListeners.push(S)}addProgressiveDoneListener(S){this._progressiveDoneListeners.push(S)}onDataRange(S,D){for(const I of this._rangeListeners)I(S,D)}onDataProgress(S,D){this._readyCapability.promise.then(()=>{for(const I of this._progressListeners)I(S,D)})}onDataProgressiveRead(S){this._readyCapability.promise.then(()=>{for(const D of this._progressiveReadListeners)D(S)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const S of this._progressiveDoneListeners)S()})}transportReady(){this._readyCapability.resolve()}requestDataRange(S,D){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(S,D){this._pdfInfo=S,this._transport=D,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(I=>{if(!I)return I;const _=[];for(const Q in I)_.push(...I[Q]);return _}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(S){return this._transport.getPage(S)}getPageIndex(S){return this._transport.getPageIndex(S)}getDestinations(){return this._transport.getDestinations()}getDestination(S){return this._transport.getDestination(S)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this._transport.startCleanup(S||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(S,D,I){$(this,y);$(this,u);$(this,t,null);$(this,p,!1);let _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;this._pageIndex=S,this._pageInfo=D,this._transport=I,this._stats=_?new _display_utils.StatTimer:null,this._pdfBug=_,this.commonObjs=I.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:S,rotation:D=this.rotate,offsetX:I=0,offsetY:_=0,dontFlip:Q=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:S,rotation:D,offsetX:I,offsetY:_,dontFlip:Q})}getAnnotations(){let{intent:S="display"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const D=this._transport.getRenderingIntent(S);return this._transport.getAnnotations(this._pageIndex,D.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var S;return((S=this._transport._htmlForXfa)==null?void 0:S.children[this._pageIndex])||null}render(S){var E,R;let{canvasContext:D,viewport:I,intent:_="display",annotationMode:Q=_util.AnnotationMode.ENABLE,transform:W=null,background:j=null,optionalContentConfigPromise:he=null,annotationCanvasMap:Y=null,pageColors:z=null,printAnnotationStorage:ee=null}=S;(E=this._stats)==null||E.time("Overall");const oe=this._transport.getRenderingIntent(_,Q,ee);le(this,p,!1),J(this,u,Rt).call(this),he||(he=this._transport.getOptionalContentConfig());let ye=this._intentStates.get(oe.cacheKey);ye||(ye=Object.create(null),this._intentStates.set(oe.cacheKey,ye)),ye.streamReaderCancelTimeout&&(clearTimeout(ye.streamReaderCancelTimeout),ye.streamReaderCancelTimeout=null);const Pe=!!(oe.renderingIntent&_util.RenderingIntentFlag.PRINT);ye.displayReadyCapability||(ye.displayReadyCapability=new _util.PromiseCapability,ye.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(R=this._stats)==null||R.time("Page Request"),this._pumpOperatorList(oe));const L=O=>{var B,F;ye.renderTasks.delete(P),(this._maybeCleanupAfterRender||Pe)&&le(this,p,!0),J(this,y,dt).call(this,!Pe),O?(P.capability.reject(O),this._abortOperatorList({intentState:ye,reason:O instanceof Error?O:new Error(O)})):P.capability.resolve(),(B=this._stats)==null||B.timeEnd("Rendering"),(F=this._stats)==null||F.timeEnd("Overall")},P=new InternalRenderTask({callback:L,params:{canvasContext:D,viewport:I,transform:W,background:j},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:Y,operatorList:ye.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!Pe,pdfBug:this._pdfBug,pageColors:z});(ye.renderTasks||(ye.renderTasks=new Set)).add(P);const M=P.task;return Promise.all([ye.displayReadyCapability.promise,he]).then(O=>{var Z;let[B,F]=O;if(this.destroyed){L();return}(Z=this._stats)==null||Z.time("Rendering"),P.initializeGraphics({transparency:B,optionalContentConfig:F}),P.operatorListChanged()}).catch(L),M}getOperatorList(){var he;let{intent:S="display",annotationMode:D=_util.AnnotationMode.ENABLE,printAnnotationStorage:I=null}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function _(){W.operatorList.lastChunk&&(W.opListReadCapability.resolve(W.operatorList),W.renderTasks.delete(j))}const Q=this._transport.getRenderingIntent(S,D,I,!0);let W=this._intentStates.get(Q.cacheKey);W||(W=Object.create(null),this._intentStates.set(Q.cacheKey,W));let j;return W.opListReadCapability||(j=Object.create(null),j.operatorListChanged=_,W.opListReadCapability=new _util.PromiseCapability,(W.renderTasks||(W.renderTasks=new Set)).add(j),W.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(he=this._stats)==null||he.time("Page Request"),this._pumpOperatorList(Q)),W.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:S=!1,disableNormalization:D=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const I=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:S===!0,disableNormalization:D===!0},{highWaterMark:I,size(_){return _.items.length}})}getTextContent(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(I=>_xfa_text.XfaText.textContent(I));const D=this.streamTextContent(S);return new Promise(function(I,_){function Q(){W.read().then(function(he){let{value:Y,done:z}=he;if(z){I(j);return}Object.assign(j.styles,Y.styles),j.items.push(...Y.items),Q()},_)}const W=D.getReader(),j={items:[],styles:Object.create(null)};Q()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const S=[];for(const D of this._intentStates.values())if(this._abortOperatorList({intentState:D,reason:new Error("Page was destroyed."),force:!0}),!D.opListReadCapability)for(const I of D.renderTasks)S.push(I.completed),I.cancel();return this.objs.clear(),le(this,p,!1),J(this,u,Rt).call(this),Promise.all(S)}cleanup(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;le(this,p,!0);const D=J(this,y,dt).call(this,!1);return S&&D&&this._stats&&(this._stats=new _display_utils.StatTimer),D}_startRenderPage(S,D){var _,Q;const I=this._intentStates.get(D);I&&((_=this._stats)==null||_.timeEnd("Page Request"),(Q=I.displayReadyCapability)==null||Q.resolve(S))}_renderPageChunk(S,D){for(let I=0,_=S.length;I<_;I++)D.operatorList.fnArray.push(S.fnArray[I]),D.operatorList.argsArray.push(S.argsArray[I]);D.operatorList.lastChunk=S.lastChunk,D.operatorList.separateAnnots=S.separateAnnots;for(const I of D.renderTasks)I.operatorListChanged();S.lastChunk&&J(this,y,dt).call(this,!0)}_pumpOperatorList(S){let{renderingIntent:D,cacheKey:I,annotationStorageSerializable:_}=S;const{map:Q,transfers:W}=_,he=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:D,cacheKey:I,annotationStorage:Q},W).getReader(),Y=this._intentStates.get(I);Y.streamReader=he;const z=()=>{he.read().then(ee=>{let{value:oe,done:ye}=ee;if(ye){Y.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(oe,Y),z())},ee=>{if(Y.streamReader=null,!this._transport.destroyed){if(Y.operatorList){Y.operatorList.lastChunk=!0;for(const oe of Y.renderTasks)oe.operatorListChanged();J(this,y,dt).call(this,!0)}if(Y.displayReadyCapability)Y.displayReadyCapability.reject(ee);else if(Y.opListReadCapability)Y.opListReadCapability.reject(ee);else throw ee}})};z()}_abortOperatorList(S){let{intentState:D,reason:I,force:_=!1}=S;if(D.streamReader){if(D.streamReaderCancelTimeout&&(clearTimeout(D.streamReaderCancelTimeout),D.streamReaderCancelTimeout=null),!_){if(D.renderTasks.size>0)return;if(I instanceof _display_utils.RenderingCancelledException){let Q=RENDERING_CANCELLED_TIMEOUT;I.extraDelay>0&&I.extraDelay<1e3&&(Q+=I.extraDelay),D.streamReaderCancelTimeout=setTimeout(()=>{D.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:D,reason:I,force:!0})},Q);return}}if(D.streamReader.cancel(new _util.AbortException(I.message)).catch(()=>{}),D.streamReader=null,!this._transport.destroyed){for(const[Q,W]of this._intentStates)if(W===D){this._intentStates.delete(Q);break}this.cleanup()}}}get stats(){return this._stats}}t=new WeakMap,p=new WeakMap,y=new WeakSet,dt=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(J(this,u,Rt).call(this),!l(this,p)||this.destroyed)return!1;if(S)return le(this,t,setTimeout(()=>{le(this,t,null),J(this,y,dt).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:D,operatorList:I}of this._intentStates.values())if(D.size>0||!I.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),le(this,p,!1),!0},u=new WeakSet,Rt=function(){l(this,t)&&(clearTimeout(l(this,t)),le(this,t,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){$(this,e,new Set);$(this,i,Promise.resolve())}postMessage(S,D){const I={data:structuredClone(S,null)};l(this,i).then(()=>{for(const _ of l(this,e))_.call(this,I)})}addEventListener(S,D){l(this,e).add(D)}removeEventListener(S,D){l(this,e).delete(D)}terminate(){l(this,e).clear()}}e=new WeakMap,i=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){const T=(n=document==null?void 0:document.currentScript)==null?void 0:n.src;T&&(PDFWorkerUtil.fallbackWorkerSrc=T.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(T,S){let D;try{if(D=new URL(T),!D.origin||D.origin==="null")return!1}catch{return!1}const I=new URL(S,D);return D.origin===I.origin},PDFWorkerUtil.createCDNWrapper=function(T){const S=`importScripts("${T}");`;return URL.createObjectURL(new Blob([S]))}}const _PDFWorker=class _PDFWorker{constructor(){var I;let{name:T=null,port:S=null,verbosity:D=(0,_util.getVerbosityLevel)()}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.name=T,this.destroyed=!1,this.verbosity=D,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,S){if((I=l(_PDFWorker,d))!=null&&I.has(S))throw new Error("Cannot use more than one PDFWorker per port.");(l(_PDFWorker,d)||le(_PDFWorker,d,new WeakMap)).set(S,this),this._initializeFromPort(S);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(T){this._port=T,this._messageHandler=new _message_handler.MessageHandler("main","worker",T),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:T}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,T)||(T=PDFWorkerUtil.createCDNWrapper(new URL(T,window.location).href));const S=new Worker(T),D=new _message_handler.MessageHandler("main","worker",S),I=()=>{S.removeEventListener("error",_),D.destroy(),S.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},_=()=>{this._webWorker||I()};S.addEventListener("error",_),D.on("test",W=>{if(S.removeEventListener("error",_),this.destroyed){I();return}W?(this._messageHandler=D,this._port=S,this._webWorker=S,this._readyCapability.resolve(),D.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),D.destroy(),S.terminate())}),D.on("ready",W=>{if(S.removeEventListener("error",_),this.destroyed){I();return}try{Q()}catch{this._setupFakeWorker()}});const Q=()=>{const W=new Uint8Array;D.send("test",W,[W.buffer])};Q();return}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(T=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const S=new LoopbackPort;this._port=S;const D=`fake${PDFWorkerUtil.fakeWorkerId++}`,I=new _message_handler.MessageHandler(D+"_worker",D,S);T.setup(I,S);const _=new _message_handler.MessageHandler(D,D+"_worker",S);this._messageHandler=_,this._readyCapability.resolve(),_.send("configure",{verbosity:this.verbosity})}).catch(T=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${T.message}".`))})}destroy(){var T;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(T=l(_PDFWorker,d))==null||T.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(T){var D;if(!(T!=null&&T.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const S=(D=l(this,d))==null?void 0:D.get(T.port);if(S){if(S._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return S}return new _PDFWorker(T)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var T;try{return((T=globalThis.pdfjsWorker)==null?void 0:T.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&typeof commonjsRequire=="function"){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};d=new WeakMap,$(_PDFWorker,d,void 0);let PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(S,D,I,_,Q){$(this,o);$(this,h,new Map);$(this,f,new Map);$(this,a,new Map);$(this,r,null);this.messageHandler=S,this.loadingTask=D,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:_.ownerDocument,styleElement:_.styleElement}),this._params=_,this.canvasFactory=Q.canvasFactory,this.filterFactory=Q.filterFactory,this.cMapReaderFactory=Q.cMapReaderFactory,this.standardFontDataFactory=Q.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=I,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Q=_util.RenderingIntentFlag.DISPLAY,W=_annotation_storage.SerializableEmpty;switch(S){case"any":Q=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":Q=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${S}`)}switch(D){case _util.AnnotationMode.DISABLE:Q+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:Q+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:Q+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,W=(Q&_util.RenderingIntentFlag.PRINT&&I instanceof _annotation_storage.PrintAnnotationStorage?I:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${D}`)}return _&&(Q+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:Q,cacheKey:`${Q}_${W.hash}`,annotationStorageSerializable:W}}destroy(){var I;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(I=l(this,r))==null||I.reject(new Error("Worker was destroyed during onPassword callback"));const S=[];for(const _ of l(this,f).values())S.push(_._destroy());l(this,f).clear(),l(this,a).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const D=this.messageHandler.sendWithPromise("Terminate",null);return S.push(D),Promise.all(S).then(()=>{var _;this.commonObjs.clear(),this.fontLoader.clear(),l(this,h).clear(),this.filterFactory.destroy(),(_=this._networkStream)==null||_.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:S,loadingTask:D}=this;S.on("GetReader",(I,_)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=Q=>{this._lastProgress={loaded:Q.loaded,total:Q.total}},_.onPull=()=>{this._fullReader.read().then(function(Q){let{value:W,done:j}=Q;if(j){_.close();return}(0,_util.assert)(W instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),_.enqueue(new Uint8Array(W),1,[W])}).catch(Q=>{_.error(Q)})},_.onCancel=Q=>{this._fullReader.cancel(Q),_.ready.catch(W=>{if(!this.destroyed)throw W})}}),S.on("ReaderHeadersReady",I=>{const _=new _util.PromiseCapability,Q=this._fullReader;return Q.headersReady.then(()=>{var W;(!Q.isStreamingSupported||!Q.isRangeSupported)&&(this._lastProgress&&((W=D.onProgress)==null||W.call(D,this._lastProgress)),Q.onProgress=j=>{var he;(he=D.onProgress)==null||he.call(D,{loaded:j.loaded,total:j.total})}),_.resolve({isStreamingSupported:Q.isStreamingSupported,isRangeSupported:Q.isRangeSupported,contentLength:Q.contentLength})},_.reject),_.promise}),S.on("GetRangeReader",(I,_)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const Q=this._networkStream.getRangeReader(I.begin,I.end);if(!Q){_.close();return}_.onPull=()=>{Q.read().then(function(W){let{value:j,done:he}=W;if(he){_.close();return}(0,_util.assert)(j instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),_.enqueue(new Uint8Array(j),1,[j])}).catch(W=>{_.error(W)})},_.onCancel=W=>{Q.cancel(W),_.ready.catch(j=>{if(!this.destroyed)throw j})}}),S.on("GetDoc",I=>{let{pdfInfo:_}=I;this._numPages=_.numPages,this._htmlForXfa=_.htmlForXfa,delete _.htmlForXfa,D._capability.resolve(new PDFDocumentProxy(_,this))}),S.on("DocException",function(I){let _;switch(I.name){case"PasswordException":_=new _util.PasswordException(I.message,I.code);break;case"InvalidPDFException":_=new _util.InvalidPDFException(I.message);break;case"MissingPDFException":_=new _util.MissingPDFException(I.message);break;case"UnexpectedResponseException":_=new _util.UnexpectedResponseException(I.message,I.status);break;case"UnknownErrorException":_=new _util.UnknownErrorException(I.message,I.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}D._capability.reject(_)}),S.on("PasswordRequest",I=>{if(le(this,r,new _util.PromiseCapability),D.onPassword){const _=Q=>{Q instanceof Error?l(this,r).reject(Q):l(this,r).resolve({password:Q})};try{D.onPassword(_,I.code)}catch(Q){l(this,r).reject(Q)}}else l(this,r).reject(new _util.PasswordException(I.message,I.code));return l(this,r).promise}),S.on("DataLoaded",I=>{var _;(_=D.onProgress)==null||_.call(D,{loaded:I.length,total:I.length}),this.downloadInfoCapability.resolve(I)}),S.on("StartRenderPage",I=>{if(this.destroyed)return;l(this,f).get(I.pageIndex)._startRenderPage(I.transparency,I.cacheKey)}),S.on("commonobj",I=>{var j;let[_,Q,W]=I;if(!this.destroyed&&!this.commonObjs.has(_))switch(Q){case"Font":const he=this._params;if("error"in W){const ee=W.error;(0,_util.warn)(`Error during font loading: ${ee}`),this.commonObjs.resolve(_,ee);break}const Y=he.pdfBug&&((j=globalThis.FontInspector)!=null&&j.enabled)?(ee,oe)=>globalThis.FontInspector.fontAdded(ee,oe):null,z=new _font_loader.FontFaceObject(W,{isEvalSupported:he.isEvalSupported,disableFontFace:he.disableFontFace,ignoreErrors:he.ignoreErrors,inspectFont:Y});this.fontLoader.bind(z).catch(ee=>S.sendWithPromise("FontFallback",{id:_})).finally(()=>{!he.fontExtraProperties&&z.data&&(z.data=null),this.commonObjs.resolve(_,z)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(_,W);break;default:throw new Error(`Got unknown common object type ${Q}`)}}),S.on("obj",I=>{var Y;let[_,Q,W,j]=I;if(this.destroyed)return;const he=l(this,f).get(Q);if(!he.objs.has(_))switch(W){case"Image":if(he.objs.resolve(_,j),j){let z;if(j.bitmap){const{width:ee,height:oe}=j;z=ee*oe*4}else z=((Y=j.data)==null?void 0:Y.length)||0;z>_util.MAX_IMAGE_SIZE_TO_CACHE&&(he._maybeCleanupAfterRender=!0)}break;case"Pattern":he.objs.resolve(_,j);break;default:throw new Error(`Got unknown object type ${W}`)}}),S.on("DocProgress",I=>{var _;this.destroyed||(_=D.onProgress)==null||_.call(D,{loaded:I.loaded,total:I.total})}),S.on("FetchBuiltInCMap",I=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(I):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),S.on("FetchStandardFontData",I=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(I):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var I;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:S,transfers:D}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:S,filename:((I=this._fullReader)==null?void 0:I.filename)??null},D).finally(()=>{this.annotationStorage.resetModified()})}getPage(S){if(!Number.isInteger(S)||S<=0||S>this._numPages)return Promise.reject(new Error("Invalid page request."));const D=S-1,I=l(this,a).get(D);if(I)return I;const _=this.messageHandler.sendWithPromise("GetPage",{pageIndex:D}).then(Q=>{if(this.destroyed)throw new Error("Transport destroyed");const W=new PDFPageProxy(D,Q,this,this._params.pdfBug);return l(this,f).set(D,W),W});return l(this,a).set(D,_),_}getPageIndex(S){return typeof S!="object"||S===null||!Number.isInteger(S.num)||S.num<0||!Number.isInteger(S.gen)||S.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:S.num,gen:S.gen})}getAnnotations(S,D){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:S,intent:D})}getFieldObjects(){return J(this,o,Mt).call(this,"GetFieldObjects")}hasJSActions(){return J(this,o,Mt).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(S){return typeof S!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:S})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return J(this,o,Mt).call(this,"GetDocJSActions")}getPageJSActions(S){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:S})}getStructTree(S){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:S})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(S=>new _optional_content_config.OptionalContentConfig(S))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const S="GetMetadata",D=l(this,h).get(S);if(D)return D;const I=this.messageHandler.sendWithPromise(S,null).then(_=>{var Q,W;return{info:_[0],metadata:_[1]?new _metadata.Metadata(_[1]):null,contentDispositionFilename:((Q=this._fullReader)==null?void 0:Q.filename)??null,contentLength:((W=this._fullReader)==null?void 0:W.contentLength)??null}});return l(this,h).set(S,I),I}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const D of l(this,f).values())if(!D.cleanup())throw new Error(`startCleanup: Page ${D.pageNumber} is currently rendering.`);this.commonObjs.clear(),S||this.fontLoader.clear(),l(this,h).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:S,enableXfa:D}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:S,enableXfa:D})}}h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakSet,Mt=function(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const I=l(this,h).get(S);if(I)return I;const _=this.messageHandler.sendWithPromise(S,D);return l(this,h).set(S,_),_};class PDFObjects{constructor(){$(this,A);$(this,v,Object.create(null))}get(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(D){const _=J(this,A,Qt).call(this,S);return _.capability.promise.then(()=>D(_.data)),null}const I=l(this,v)[S];if(!(I!=null&&I.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${S}.`);return I.data}has(S){const D=l(this,v)[S];return(D==null?void 0:D.capability.settled)||!1}resolve(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const I=J(this,A,Qt).call(this,S);I.data=D,I.capability.resolve()}clear(){var S;for(const D in l(this,v)){const{data:I}=l(this,v)[D];(S=I==null?void 0:I.bitmap)==null||S.close()}le(this,v,Object.create(null))}}v=new WeakMap,A=new WeakSet,Qt=function(S){var D;return(D=l(this,v))[S]||(D[S]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(S){$(this,c,null);le(this,c,S),this.onContinue=null}get promise(){return l(this,c).capability.promise}cancel(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;l(this,c).cancel(null,S)}get separateAnnots(){const{separateAnnots:S}=l(this,c).operatorList;if(!S)return!1;const{annotationCanvasMap:D}=l(this,c);return S.form||S.canvas&&(D==null?void 0:D.size)>0}}c=new WeakMap,exports.RenderTask=RenderTask;const x=class x{constructor(S){let{callback:D,params:I,objs:_,commonObjs:Q,annotationCanvasMap:W,operatorList:j,pageIndex:he,canvasFactory:Y,filterFactory:z,useRequestAnimationFrame:ee=!1,pdfBug:oe=!1,pageColors:ye=null}=S;this.callback=D,this.params=I,this.objs=_,this.commonObjs=Q,this.annotationCanvasMap=W,this.operatorListIdx=null,this.operatorList=j,this._pageIndex=he,this.canvasFactory=Y,this.filterFactory=z,this._pdfBug=oe,this.pageColors=ye,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=ee===!0&&typeof window<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=I.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics(S){var he,Y;let{transparency:D=!1,optionalContentConfig:I}=S;if(this.cancelled)return;if(this._canvas){if(l(x,s).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");l(x,s).add(this._canvas)}this._pdfBug&&((he=globalThis.StepperManager)!=null&&he.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:_,viewport:Q,transform:W,background:j}=this.params;this.gfx=new _canvas.CanvasGraphics(_,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:I},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:W,viewport:Q,transparency:D,background:j}),this.operatorListIdx=0,this.graphicsReady=!0,(Y=this.graphicsReadyCallback)==null||Y.call(this)}cancel(){var I;let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.running=!1,this.cancelled=!0,(I=this.gfx)==null||I.endDrawing(),l(x,s).delete(this._canvas),this.callback(S||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,D))}operatorListChanged(){var S;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(S=this.stepper)==null||S.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),l(x,s).delete(this._canvas),this.callback())))}};s=new WeakMap,$(x,s,new WeakSet);let InternalRenderTask=x;const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(N,w,t)=>{var p=t(3),y=t(126),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("difference")},{difference:y})},(N,w,t)=>{var p=t(127),y=t(128),k=t(129),u=t(132),g=t(133),e=t(130),i=t(131),n=y.has,d=y.remove;N.exports=function(f){var a=p(this),r=g(f),o=k(a);return u(a)<=r.size?e(a,function(m){r.includes(m)&&d(o,m)}):i(r.getIterator(),function(m){n(a,m)&&d(o,m)}),o}},(N,w,t)=>{var p=t(128).has;N.exports=function(y){return p(y),y}},(N,w,t)=>{var p=t(14),y=Set.prototype;N.exports={Set,add:p(y.add),has:p(y.has),remove:p(y.delete),proto:y}},(N,w,t)=>{var p=t(128),y=t(130),k=p.Set,u=p.add;N.exports=function(g){var e=new k;return y(g,function(i){u(e,i)}),e}},(N,w,t)=>{var p=t(14),y=t(131),k=t(128),u=k.Set,g=k.proto,e=p(g.forEach),i=p(g.keys),n=i(new u).next;N.exports=function(d,h,f){return f?y({iterator:i(d),next:n},h):e(d,h)}},(N,w,t)=>{var p=t(8);N.exports=function(y,k,u){for(var g=u?y:y.iterator,e=y.next,i,n;!(i=p(e,g)).done;)if(n=k(i.value),n!==void 0)return n}},(N,w,t)=>{var p=t(72),y=t(128);N.exports=p(y.proto,"size","get")||function(k){return k.size}},(N,w,t)=>{var p=t(31),y=t(47),k=t(8),u=t(62),g=t(134),e="Invalid size",i=RangeError,n=TypeError,d=Math.max,h=function(f,a,r,o){this.set=f,this.size=a,this.has=r,this.keys=o};h.prototype={getIterator:function(){return g(y(k(this.keys,this.set)))},includes:function(f){return k(this.has,this.set,f)}},N.exports=function(f){y(f);var a=+f.size;if(a!==a)throw n(e);var r=u(a);if(r<0)throw i(e);return new h(f,d(r,0),p(f.has),p(f.keys))}},N=>{N.exports=function(w){return{iterator:w,next:w.next,done:!1}}},(N,w,t)=>{var p=t(24),y=function(k){return{size:k,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};N.exports=function(k){var u=p("Set");try{new u()[k](y(0));try{return new u()[k](y(-1)),!1}catch{return!0}}catch{return!1}}},(N,w,t)=>{var p=t(3),y=t(7),k=t(137),u=t(135),g=!u("intersection")||y(function(){return Array.from(new Set([1,2,3]).intersection(new Set([3,2])))!=="3,2"});p({target:"Set",proto:!0,real:!0,forced:g},{intersection:k})},(N,w,t)=>{var p=t(127),y=t(128),k=t(132),u=t(133),g=t(130),e=t(131),i=y.Set,n=y.add,d=y.has;N.exports=function(f){var a=p(this),r=u(f),o=new i;return k(a)>r.size?e(r.getIterator(),function(m){d(a,m)&&n(o,m)}):g(a,function(m){r.includes(m)&&n(o,m)}),o}},(N,w,t)=>{var p=t(3),y=t(139),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("isDisjointFrom")},{isDisjointFrom:y})},(N,w,t)=>{var p=t(127),y=t(128).has,k=t(132),u=t(133),g=t(130),e=t(131),i=t(140);N.exports=function(d){var h=p(this),f=u(d);if(k(h)<=f.size)return g(h,function(r){if(f.includes(r))return!1},!0)!==!1;var a=f.getIterator();return e(a,function(r){if(y(h,r))return i(a,"normal",!1)})!==!1}},(N,w,t)=>{var p=t(8),y=t(47),k=t(30);N.exports=function(u,g,e){var i,n;y(u);try{if(i=k(u,"return"),!i){if(g==="throw")throw e;return e}i=p(i,u)}catch(d){n=!0,i=d}if(g==="throw")throw e;if(n)throw i;return y(i),e}},(N,w,t)=>{var p=t(3),y=t(142),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("isSubsetOf")},{isSubsetOf:y})},(N,w,t)=>{var p=t(127),y=t(132),k=t(130),u=t(133);N.exports=function(e){var i=p(this),n=u(e);return y(i)>n.size?!1:k(i,function(d){if(!n.includes(d))return!1},!0)!==!1}},(N,w,t)=>{var p=t(3),y=t(144),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("isSupersetOf")},{isSupersetOf:y})},(N,w,t)=>{var p=t(127),y=t(128).has,k=t(132),u=t(133),g=t(131),e=t(140);N.exports=function(n){var d=p(this),h=u(n);if(k(d)<h.size)return!1;var f=h.getIterator();return g(f,function(a){if(!y(d,a))return e(f,"normal",!1)})!==!1}},(N,w,t)=>{var p=t(3),y=t(146),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("symmetricDifference")},{symmetricDifference:y})},(N,w,t)=>{var p=t(127),y=t(128),k=t(129),u=t(133),g=t(131),e=y.add,i=y.has,n=y.remove;N.exports=function(h){var f=p(this),a=u(h).getIterator(),r=k(f);return g(a,function(o){i(f,o)?n(r,o):e(r,o)}),r}},(N,w,t)=>{var p=t(3),y=t(148),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("union")},{union:y})},(N,w,t)=>{var p=t(127),y=t(128).add,k=t(129),u=t(133),g=t(131);N.exports=function(i){var n=p(this),d=u(i).getIterator(),h=k(n);return g(d,function(f){y(h,f)}),h}},(N,w,t)=>{var p=t(3),y=t(4),k=t(24),u=t(11),g=t(45).f,e=t(39),i=t(150),n=t(75),d=t(76),h=t(151),f=t(82),a=t(6),r=t(36),o="DOMException",m=k("Error"),v=k(o),A=function(){i(this,b);var he=arguments.length,Y=d(he<1?void 0:arguments[0]),z=d(he<2?void 0:arguments[1],"Error"),ee=new v(Y,z),oe=m(Y);return oe.name=o,g(ee,"stack",u(1,f(oe.stack,1))),n(ee,this,A),ee},b=A.prototype=v.prototype,c="stack"in m(o),s="stack"in new v(1,2),x=v&&a&&Object.getOwnPropertyDescriptor(y,o),T=!!x&&!(x.writable&&x.configurable),S=c&&!T&&!s;p({global:!0,constructor:!0,forced:r||S},{DOMException:S?A:v});var D=k(o),I=D.prototype;if(I.constructor!==D){r||g(I,"constructor",u(1,D));for(var _ in h)if(e(h,_)){var Q=h[_],W=Q.s;e(D,W)||g(D,W,u(6,Q.c))}}},(N,w,t)=>{var p=t(25),y=TypeError;N.exports=function(k,u){if(p(u,k))return k;throw y("Incorrect invocation")}},N=>{N.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(N,w,t)=>{var p=t(36),y=t(3),k=t(4),u=t(24),g=t(14),e=t(7),i=t(41),n=t(21),d=t(153),h=t(17),f=t(20),a=t(23),r=t(154),o=t(47),m=t(78),v=t(39),A=t(159),b=t(44),c=t(64),s=t(85),x=t(160),T=t(162),S=t(128),D=t(83),I=t(119),_=k.Object,Q=k.Array,W=k.Date,j=k.Error,he=k.EvalError,Y=k.RangeError,z=k.ReferenceError,ee=k.SyntaxError,oe=k.TypeError,ye=k.URIError,Pe=k.PerformanceMark,L=k.WebAssembly,P=L&&L.CompileError||j,M=L&&L.LinkError||j,E=L&&L.RuntimeError||j,R=u("DOMException"),O=T.Map,B=T.has,F=T.get,Z=T.set,se=S.Set,q=S.add,pe=u("Object","keys"),te=g([].push),me=g((!0).valueOf),ve=g(1 .valueOf),Re=g("".valueOf),Oe=g(W.prototype.getTime),Ie=i("structuredClone"),Le="DataCloneError",ue="Transferring",ne=function(K){return!e(function(){var U=new k.Set([7]),ie=K(U),Ae=K(_(7));return ie===U||!ie.has(7)||typeof Ae!="object"||+Ae!=7})&&K},ce=function(K,U){return!e(function(){var ie=new U,Ae=K({a:ie,b:ie});return!(Ae&&Ae.a===Ae.b&&Ae.a instanceof U&&Ae.a.stack===ie.stack)})},ge=function(K){return!e(function(){var U=K(new k.AggregateError([1],Ie,{cause:3}));return U.name!=="AggregateError"||U.errors[0]!==1||U.message!==Ie||U.cause!==3})},Ce=k.structuredClone,Me=p||!ce(Ce,j)||!ce(Ce,R)||!ge(Ce),Ve=!Ce&&ne(function(K){return new Pe(Ie,{detail:K}).detail}),ze=ne(Ce)||Ve,_e=function(K){throw new R("Uncloneable type: "+K,Le)},He=function(K,U){throw new R((U||"Cloning")+" of "+K+" cannot be properly polyfilled in this engine",Le)},Ke=function(K,U){return ze||He(U),ze(K)},Xe=function(){var K;try{K=new k.DataTransfer}catch{try{K=new k.ClipboardEvent("").clipboardData}catch{}}return K&&K.items&&K.files?K:null},je=function(K,U,ie){if(B(U,K))return F(U,K);var Ae=ie||m(K),Se,we,Te,Ne,ke,Ue;if(Ae==="SharedArrayBuffer")ze?Se=ze(K):Se=K;else{var Be=k.DataView;!Be&&typeof K.slice!="function"&&He("ArrayBuffer");try{if(typeof K.slice=="function"&&!K.resizable)Se=K.slice(0);else for(we=K.byteLength,Te=("maxByteLength"in K)?{maxByteLength:K.maxByteLength}:void 0,Se=new ArrayBuffer(we,Te),Ne=new Be(K),ke=new Be(Se),Ue=0;Ue<we;Ue++)ke.setUint8(Ue,Ne.getUint8(Ue))}catch{throw new R("ArrayBuffer is detached",Le)}}return Z(U,K,Se),Se},Je=function(K,U,ie,Ae,Se){var we=k[U];return f(we)||He(U),new we(je(K.buffer,Se),ie,Ae)},V=function(K,U,ie){this.object=K,this.type=U,this.metadata=ie},H=function(K,U,ie){if(a(K)&&_e("Symbol"),!f(K))return K;if(U){if(B(U,K))return F(U,K)}else U=new O;var Ae=m(K),Se,we,Te,Ne,ke,Ue,Be,re;switch(Ae){case"Array":Te=Q(c(K));break;case"Object":Te={};break;case"Map":Te=new O;break;case"Set":Te=new se;break;case"RegExp":Te=new RegExp(K.source,x(K));break;case"Error":switch(we=K.name,we){case"AggregateError":Te=u("AggregateError")([]);break;case"EvalError":Te=he();break;case"RangeError":Te=Y();break;case"ReferenceError":Te=z();break;case"SyntaxError":Te=ee();break;case"TypeError":Te=oe();break;case"URIError":Te=ye();break;case"CompileError":Te=P();break;case"LinkError":Te=M();break;case"RuntimeError":Te=E();break;default:Te=j()}break;case"DOMException":Te=new R(K.message,K.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Te=ie?new V(K,Ae):je(K,U,Ae);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Ue=Ae==="DataView"?K.byteLength:K.length,Te=ie?new V(K,Ae,{offset:K.byteOffset,length:Ue}):Je(K,Ae,K.byteOffset,Ue,U);break;case"DOMQuad":try{Te=new DOMQuad(H(K.p1,U,ie),H(K.p2,U,ie),H(K.p3,U,ie),H(K.p4,U,ie))}catch{Te=Ke(K,Ae)}break;case"File":if(ze)try{Te=ze(K),m(Te)!==Ae&&(Te=void 0)}catch{}if(!Te)try{Te=new File([K],K.name,K)}catch{}Te||He(Ae);break;case"FileList":if(Ne=Xe(),Ne){for(ke=0,Ue=c(K);ke<Ue;ke++)Ne.items.add(H(K[ke],U,ie));Te=Ne.files}else Te=Ke(K,Ae);break;case"ImageData":try{Te=new ImageData(H(K.data,U,ie),K.width,K.height,{colorSpace:K.colorSpace})}catch{Te=Ke(K,Ae)}break;default:if(ze)Te=ze(K);else switch(Ae){case"BigInt":Te=_(K.valueOf());break;case"Boolean":Te=_(me(K));break;case"Number":Te=_(ve(K));break;case"String":Te=_(Re(K));break;case"Date":Te=new W(Oe(K));break;case"Blob":try{Te=K.slice(0,K.size,K.type)}catch{He(Ae)}break;case"DOMPoint":case"DOMPointReadOnly":Se=k[Ae];try{Te=Se.fromPoint?Se.fromPoint(K):new Se(K.x,K.y,K.z,K.w)}catch{He(Ae)}break;case"DOMRect":case"DOMRectReadOnly":Se=k[Ae];try{Te=Se.fromRect?Se.fromRect(K):new Se(K.x,K.y,K.width,K.height)}catch{He(Ae)}break;case"DOMMatrix":case"DOMMatrixReadOnly":Se=k[Ae];try{Te=Se.fromMatrix?Se.fromMatrix(K):new Se(K)}catch{He(Ae)}break;case"AudioData":case"VideoFrame":n(K.clone)||He(Ae);try{Te=K.clone()}catch{_e(Ae)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":He(Ae);default:_e(Ae)}}switch(Z(U,K,Te),Ae){case"Array":case"Object":for(Be=pe(K),ke=0,Ue=c(Be);ke<Ue;ke++)re=Be[ke],A(Te,re,H(K[re],U,ie));break;case"Map":K.forEach(function(C,G){Z(Te,H(G,U,ie),H(C,U,ie))});break;case"Set":K.forEach(function(C){q(Te,H(C,U,ie))});break;case"Error":b(Te,"message",H(K.message,U,ie)),v(K,"cause")&&b(Te,"cause",H(K.cause,U,ie)),we==="AggregateError"&&(Te.errors=H(K.errors,U,ie));case"DOMException":D&&b(Te,"stack",H(K.stack,U,ie))}return Te},X=function(K,U){if(!f(K))return K;if(B(U,K))return F(U,K);var ie,Ae,Se,we,Te,Ne,ke,Ue;if(K instanceof V)switch(ie=K.type,Ae=K.object,ie){case"ArrayBuffer":case"SharedArrayBuffer":Ue=je(Ae,U,ie);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Se=K.metadata,Ue=Je(Ae,ie,Se.offset,Se.length,U)}else switch(m(K)){case"Array":case"Object":for(Ne=pe(K),we=0,Te=c(Ne);we<Te;we++)ke=Ne[we],K[ke]=X(K[ke],U);break;case"Map":Ue=new O,K.forEach(function(Be,re){Z(Ue,X(re,U),X(Be,U))});break;case"Set":Ue=new se,K.forEach(function(Be){q(Ue,X(Be,U))});break;case"Error":K.message=X(K.message,U),v(K,"cause")&&(K.cause=X(K.cause,U)),K.name==="AggregateError"&&(K.errors=X(K.errors,U));case"DOMException":D&&(K.stack=X(K.stack,U))}return Z(U,K,Ue||K),Ue||K},de=function(K,U){if(!f(K))throw oe("Transfer option cannot be converted to a sequence");var ie=[];r(K,function(C){te(ie,o(C))});for(var Ae=0,Se=c(ie),we=[],Te,Ne,ke,Ue,Be,re;Ae<Se;){if(Te=ie[Ae++],Ne=m(Te),Ne==="ArrayBuffer"){te(we,Te);continue}if(B(U,Te))throw new R("Duplicate transferable",Le);if(I)Ue=Ce(Te,{transfer:[Te]});else switch(Ne){case"ImageBitmap":ke=k.OffscreenCanvas,d(ke)||He(Ne,ue);try{Be=new ke(Te.width,Te.height),re=Be.getContext("bitmaprenderer"),re.transferFromImageBitmap(Te),Ue=Be.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":(!n(Te.clone)||!n(Te.close))&&He(Ne,ue);try{Ue=Te.clone(),Te.close()}catch{}break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":He(Ne,ue)}if(Ue===void 0)throw new R("This object cannot be transferred: "+Ne,Le);Z(U,Te,Ue)}return we},Ee=function(K,U){for(var ie=0,Ae=c(K),Se,we;ie<Ae;){if(Se=K[ie++],B(U,Se))throw new R("Duplicate transferable",Le);I?we=Ce(Se,{transfer:[Se]}):(n(Se.transfer)||He("ArrayBuffer",ue),we=Se.transfer()),Z(U,Se,we)}};y({global:!0,enumerable:!0,sham:!I,forced:Me},{structuredClone:function(U){var ie=s(arguments.length,1)>1&&!h(arguments[1])?o(arguments[1]):void 0,Ae=ie?ie.transfer:void 0,Se=!1,we,Te;Ae!==void 0&&(we=new O,Te=de(Ae,we),Se=!!c(Te));var Ne=H(U,we,Se);return Se&&(we=new O,Ee(Ae,we),Ne=X(Ne,we)),Ne}})},(N,w,t)=>{var p=t(14),y=t(7),k=t(21),u=t(78),g=t(24),e=t(51),i=function(){},n=[],d=g("Reflect","construct"),h=/^\s*(?:class|function)\b/,f=p(h.exec),a=!h.exec(i),r=function(v){if(!k(v))return!1;try{return d(i,n,v),!0}catch{return!1}},o=function(v){if(!k(v))return!1;switch(u(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return a||!!f(h,e(v))}catch{return!0}};o.sham=!0,N.exports=!d||y(function(){var m;return r(r.call)||!r(Object)||!r(function(){m=!0})||m})?o:r},(N,w,t)=>{var p=t(99),y=t(8),k=t(47),u=t(32),g=t(155),e=t(64),i=t(25),n=t(157),d=t(158),h=t(140),f=TypeError,a=function(o,m){this.stopped=o,this.result=m},r=a.prototype;N.exports=function(o,m,v){var A=v&&v.that,b=!!(v&&v.AS_ENTRIES),c=!!(v&&v.IS_RECORD),s=!!(v&&v.IS_ITERATOR),x=!!(v&&v.INTERRUPTED),T=p(m,A),S,D,I,_,Q,W,j,he=function(z){return S&&h(S,"normal",z),new a(!0,z)},Y=function(z){return b?(k(z),x?T(z[0],z[1],he):T(z[0],z[1])):x?T(z,he):T(z)};if(c)S=o.iterator;else if(s)S=o;else{if(D=d(o),!D)throw f(u(o)+" is not iterable");if(g(D)){for(I=0,_=e(o);_>I;I++)if(Q=Y(o[I]),Q&&i(r,Q))return Q;return new a(!1)}S=n(o,D)}for(W=c?o.next:S.next;!(j=y(W,S)).done;){try{Q=Y(j.value)}catch(z){h(S,"throw",z)}if(typeof Q=="object"&&Q&&i(r,Q))return Q}return new a(!1)}},(N,w,t)=>{var p=t(34),y=t(156),k=p("iterator"),u=Array.prototype;N.exports=function(g){return g!==void 0&&(y.Array===g||u[k]===g)}},N=>{N.exports={}},(N,w,t)=>{var p=t(8),y=t(31),k=t(47),u=t(32),g=t(158),e=TypeError;N.exports=function(i,n){var d=arguments.length<2?g(i):n;if(y(d))return k(p(d,i));throw e(u(i)+" is not iterable")}},(N,w,t)=>{var p=t(78),y=t(30),k=t(17),u=t(156),g=t(34),e=g("iterator");N.exports=function(i){if(!k(i))return y(i,e)||y(i,"@@iterator")||u[p(i)]}},(N,w,t)=>{var p=t(18),y=t(45),k=t(11);N.exports=function(u,g,e){var i=p(g);i in u?y.f(u,i,k(0,e)):u[i]=e}},(N,w,t)=>{var p=t(8),y=t(39),k=t(25),u=t(161),g=RegExp.prototype;N.exports=function(e){var i=e.flags;return i===void 0&&!("flags"in g)&&!y(e,"flags")&&k(g,e)?p(u,e):i}},(N,w,t)=>{var p=t(47);N.exports=function(){var y=p(this),k="";return y.hasIndices&&(k+="d"),y.global&&(k+="g"),y.ignoreCase&&(k+="i"),y.multiline&&(k+="m"),y.dotAll&&(k+="s"),y.unicode&&(k+="u"),y.unicodeSets&&(k+="v"),y.sticky&&(k+="y"),k}},(N,w,t)=>{var p=t(14),y=Map.prototype;N.exports={Map,set:p(y.set),get:p(y.get),has:p(y.has),remove:p(y.delete),proto:y}},(N,w,t)=>{var i,n,d,er,f;Object.defineProperty(w,"__esModule",{value:!0}),w.SerializableEmpty=w.PrintAnnotationStorage=w.AnnotationStorage=void 0,t(89),t(149),t(152);var p=t(1),y=t(164),k=t(170);const u=Object.freeze({map:null,hash:"",transfers:void 0});w.SerializableEmpty=u;class g{constructor(){$(this,d);$(this,i,!1);$(this,n,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(r,o){const m=l(this,n).get(r);return m===void 0?o:Object.assign(o,m)}getRawValue(r){return l(this,n).get(r)}remove(r){if(l(this,n).delete(r),l(this,n).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const o of l(this,n).values())if(o instanceof y.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(r,o){const m=l(this,n).get(r);let v=!1;if(m!==void 0)for(const[A,b]of Object.entries(o))m[A]!==b&&(v=!0,m[A]=b);else v=!0,l(this,n).set(r,o);v&&J(this,d,er).call(this),o instanceof y.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(o.constructor._type)}has(r){return l(this,n).has(r)}getAll(){return l(this,n).size>0?(0,p.objectFromMap)(l(this,n)):null}setAll(r){for(const[o,m]of Object.entries(r))this.setValue(o,m)}get size(){return l(this,n).size}resetModified(){l(this,i)&&(le(this,i,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new e(this)}get serializable(){if(l(this,n).size===0)return u;const r=new Map,o=new k.MurmurHash3_64,m=[],v=Object.create(null);let A=!1;for(const[b,c]of l(this,n)){const s=c instanceof y.AnnotationEditor?c.serialize(!1,v):c;s&&(r.set(b,s),o.update(`${b}:${JSON.stringify(s)}`),A||(A=!!s.bitmap))}if(A)for(const b of r.values())b.bitmap&&m.push(b.bitmap);return r.size>0?{map:r,hash:o.hexdigest(),transfers:m}:u}}i=new WeakMap,n=new WeakMap,d=new WeakSet,er=function(){l(this,i)||(le(this,i,!0),typeof this.onSetModified=="function"&&this.onSetModified())},w.AnnotationStorage=g;class e extends g{constructor(o){super();$(this,f,void 0);const{map:m,hash:v,transfers:A}=o.serializable,b=structuredClone(m,null);le(this,f,{map:b,hash:v,transfers:A})}get print(){(0,p.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return l(this,f)}}f=new WeakMap,w.PrintAnnotationStorage=e},(N,w,t)=>{var e,i,n,d,h,f,a,r,o,m,v,A,b,c,s,Zt,T,jt,D,qt,_,en,W,tr,he,nr,z,rr,oe,tn,Pe,ir;Object.defineProperty(w,"__esModule",{value:!0}),w.AnnotationEditor=void 0,t(89),t(2);var p=t(165),y=t(1),k=t(168);const P=class P{constructor(E){$(this,s);$(this,T);$(this,_);$(this,W);$(this,he);$(this,z);$(this,oe);$(this,Pe);$(this,e,"");$(this,i,!1);$(this,n,null);$(this,d,null);$(this,h,null);$(this,f,!1);$(this,a,null);$(this,r,this.focusin.bind(this));$(this,o,this.focusout.bind(this));$(this,m,!1);$(this,v,!1);$(this,A,!1);tt(this,"_initialOptions",Object.create(null));tt(this,"_uiManager",null);tt(this,"_focusEventsAllowed",!0);tt(this,"_l10nPromise",null);$(this,b,!1);$(this,c,P._zIndex++);this.constructor===P&&(0,y.unreachable)("Cannot initialize AnnotationEditor."),this.parent=E.parent,this.id=E.id,this.width=this.height=null,this.pageIndex=E.parent.pageIndex,this.name=E.name,this.div=null,this._uiManager=E.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=E.isCentered,this._structTreeParentId=null;const{rotation:R,rawDims:{pageWidth:O,pageHeight:B,pageX:F,pageY:Z}}=this.parent.viewport;this.rotation=R,this.pageRotation=(360+R-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[O,B],this.pageTranslation=[F,Z];const[se,q]=this.parentDimensions;this.x=E.x/se,this.y=E.y/q,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,y.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(E){const R=new g({id:E.parent.getNextId(),parent:E.parent,uiManager:E._uiManager});R.annotationElementId=E.annotationElementId,R.deleted=!0,R._uiManager.addToAnnotationStorage(R)}static initialize(E){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(P._l10nPromise||(P._l10nPromise=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(B=>[B,E.get(B)]))),R!=null&&R.strings)for(const B of R.strings)P._l10nPromise.set(B,E.get(B));if(P._borderLineWidth!==-1)return;const O=getComputedStyle(document.documentElement);P._borderLineWidth=parseFloat(O.getPropertyValue("--outline-width"))||0}static updateDefaultParams(E,R){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(E){return!1}static paste(E,R){(0,y.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return l(this,b)}set _isDraggable(E){var R;le(this,b,E),(R=this.div)==null||R.classList.toggle("draggable",E)}center(){const[E,R]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*R/(E*2),this.y+=this.width*E/(R*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*R/(E*2),this.y-=this.width*E/(R*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(E){this._uiManager.addCommands(E)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=l(this,c)}setParent(E){E!==null&&(this.pageIndex=E.pageIndex,this.pageDimensions=E.pageDimensions),this.parent=E}focusin(E){this._focusEventsAllowed&&(l(this,m)?le(this,m,!1):this.parent.setSelected(this))}focusout(E){var O;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const R=E.relatedTarget;R!=null&&R.closest(`#${this.id}`)||(E.preventDefault(),(O=this.parent)!=null&&O.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(E,R,O,B){const[F,Z]=this.parentDimensions;[O,B]=this.screenToPageTranslation(O,B),this.x=(E+O)/F,this.y=(R+B)/Z,this.fixAndSetPosition()}translate(E,R){J(this,s,Zt).call(this,this.parentDimensions,E,R)}translateInPage(E,R){J(this,s,Zt).call(this,this.pageDimensions,E,R),this.div.scrollIntoView({block:"nearest"})}drag(E,R){const[O,B]=this.parentDimensions;if(this.x+=E/O,this.y+=R/B,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:pe,y:te}=this.div.getBoundingClientRect();this.parent.findNewParent(this,pe,te)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:F,y:Z}=this;const[se,q]=J(this,T,jt).call(this);F+=se,Z+=q,this.div.style.left=`${(100*F).toFixed(2)}%`,this.div.style.top=`${(100*Z).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}fixAndSetPosition(){const[E,R]=this.pageDimensions;let{x:O,y:B,width:F,height:Z}=this;switch(F*=E,Z*=R,O*=E,B*=R,this.rotation){case 0:O=Math.max(0,Math.min(E-F,O)),B=Math.max(0,Math.min(R-Z,B));break;case 90:O=Math.max(0,Math.min(E-Z,O)),B=Math.min(R,Math.max(F,B));break;case 180:O=Math.min(E,Math.max(F,O)),B=Math.min(R,Math.max(Z,B));break;case 270:O=Math.min(E,Math.max(Z,O)),B=Math.max(0,Math.min(R-F,B));break}this.x=O/=E,this.y=B/=R;const[se,q]=J(this,T,jt).call(this);O+=se,B+=q;const{style:pe}=this.div;pe.left=`${(100*O).toFixed(2)}%`,pe.top=`${(100*B).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(E,R){var O;return J(O=P,D,qt).call(O,E,R,this.parentRotation)}pageTranslationToScreen(E,R){var O;return J(O=P,D,qt).call(O,E,R,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:E,pageDimensions:[R,O]}=this,B=R*E,F=O*E;return y.FeatureTest.isCSSRoundSupported?[Math.round(B),Math.round(F)]:[B,F]}setDims(E,R){var F;const[O,B]=this.parentDimensions;this.div.style.width=`${(100*E/O).toFixed(2)}%`,l(this,f)||(this.div.style.height=`${(100*R/B).toFixed(2)}%`),(F=l(this,n))==null||F.classList.toggle("small",E<P.SMALL_EDITOR_SIZE||R<P.SMALL_EDITOR_SIZE)}fixDims(){const{style:E}=this.div,{height:R,width:O}=E,B=O.endsWith("%"),F=!l(this,f)&&R.endsWith("%");if(B&&F)return;const[Z,se]=this.parentDimensions;B||(E.width=`${(100*parseFloat(O)/Z).toFixed(2)}%`),!l(this,f)&&!F&&(E.height=`${(100*parseFloat(R)/se).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}async addAltTextButton(){if(l(this,n))return;const E=le(this,n,document.createElement("button"));E.className="altText";const R=await P._l10nPromise.get("editor_alt_text_button_label");E.textContent=R,E.setAttribute("aria-label",R),E.tabIndex="0",E.addEventListener("contextmenu",k.noContextMenu),E.addEventListener("pointerdown",O=>O.stopPropagation()),E.addEventListener("click",O=>{O.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),E.addEventListener("keydown",O=>{O.target===E&&O.key==="Enter"&&(O.preventDefault(),this._uiManager.editAltText(this))}),J(this,oe,tn).call(this),this.div.append(E),P.SMALL_EDITOR_SIZE||(P.SMALL_EDITOR_SIZE=Math.min(128,Math.round(E.getBoundingClientRect().width*1.4)))}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:l(this,e),decorative:l(this,i)}}set altTextData(E){let{altText:R,decorative:O}=E;l(this,e)===R&&l(this,i)===O||(le(this,e,R),le(this,i,O),J(this,oe,tn).call(this))}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",l(this,r)),this.div.addEventListener("focusout",l(this,o));const[E,R]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*R/E).toFixed(2)}%`,this.div.style.maxHeight=`${(100*E/R).toFixed(2)}%`);const[O,B]=this.getInitialTranslation();return this.translate(O,B),(0,p.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(E){const{isMac:R}=y.FeatureTest.platform;if(E.button!==0||E.ctrlKey&&R){E.preventDefault();return}le(this,m,!0),J(this,Pe,ir).call(this,E)}moveInDOM(){var E;(E=this.parent)==null||E.moveEditorInDOM(this)}_setParentAndPosition(E,R,O){E.changeParent(this),this.x=R,this.y=O,this.fixAndSetPosition()}getRect(E,R){const O=this.parentScale,[B,F]=this.pageDimensions,[Z,se]=this.pageTranslation,q=E/O,pe=R/O,te=this.x*B,me=this.y*F,ve=this.width*B,Re=this.height*F;switch(this.rotation){case 0:return[te+q+Z,F-me-pe-Re+se,te+q+ve+Z,F-me-pe+se];case 90:return[te+pe+Z,F-me+q+se,te+pe+Re+Z,F-me+q+ve+se];case 180:return[te-q-ve+Z,F-me+pe+se,te-q+Z,F-me+pe+Re+se];case 270:return[te-pe-Re+Z,F-me-q-ve+se,te-pe+Z,F-me-q+se];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(E,R){const[O,B,F,Z]=E,se=F-O,q=Z-B;switch(this.rotation){case 0:return[O,R-Z,se,q];case 90:return[O,R-B,q,se];case 180:return[F,R-B,se,q];case 270:return[F,R-Z,q,se];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){le(this,A,!0)}disableEditMode(){le(this,A,!1)}isInEditMode(){return l(this,A)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var E,R;(E=this.div)==null||E.addEventListener("focusin",l(this,r)),(R=this.div)==null||R.addEventListener("focusout",l(this,o))}serialize(){(0,y.unreachable)("An editor must be serializable")}static deserialize(E,R,O){const B=new this.prototype.constructor({parent:R,id:R.getNextId(),uiManager:O});B.rotation=E.rotation;const[F,Z]=B.pageDimensions,[se,q,pe,te]=B.getRectInCurrentCoords(E.rect,Z);return B.x=se/F,B.y=q/Z,B.width=pe/F,B.height=te/Z,B}remove(){var E;this.div.removeEventListener("focusin",l(this,r)),this.div.removeEventListener("focusout",l(this,o)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(E=l(this,n))==null||E.remove(),le(this,n,null),le(this,d,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(J(this,W,tr).call(this),l(this,a).classList.remove("hidden"))}select(){var E;this.makeResizable(),(E=this.div)==null||E.classList.add("selectedEditor")}unselect(){var E,R,O;(E=l(this,a))==null||E.classList.add("hidden"),(R=this.div)==null||R.classList.remove("selectedEditor"),(O=this.div)!=null&&O.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(E,R){}disableEditing(){l(this,n)&&(l(this,n).hidden=!0)}enableEditing(){l(this,n)&&(l(this,n).hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return l(this,v)}set isEditing(E){le(this,v,E),this.parent&&(E?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(E,R){le(this,f,!0);const O=E/R,{style:B}=this.div;B.aspectRatio=O,B.height="auto"}static get MIN_SIZE(){return 16}};e=new WeakMap,i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakMap,A=new WeakMap,b=new WeakMap,c=new WeakMap,s=new WeakSet,Zt=function(E,R,O){let[B,F]=E;[R,O]=this.screenToPageTranslation(R,O),this.x+=R/B,this.y+=O/F,this.fixAndSetPosition()},T=new WeakSet,jt=function(){const[E,R]=this.parentDimensions,{_borderLineWidth:O}=P,B=O/E,F=O/R;switch(this.rotation){case 90:return[-B,F];case 180:return[B,F];case 270:return[B,-F];default:return[-B,-F]}},D=new WeakSet,qt=function(E,R,O){switch(O){case 90:return[R,-E];case 180:return[-E,-R];case 270:return[-R,E];default:return[E,R]}},_=new WeakSet,en=function(E){switch(E){case 90:{const[R,O]=this.pageDimensions;return[0,-R/O,O/R,0]}case 180:return[-1,0,0,-1];case 270:{const[R,O]=this.pageDimensions;return[0,R/O,-O/R,0]}default:return[1,0,0,1]}},W=new WeakSet,tr=function(){if(l(this,a))return;le(this,a,document.createElement("div")),l(this,a).classList.add("resizers");const E=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||E.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const R of E){const O=document.createElement("div");l(this,a).append(O),O.classList.add("resizer",R),O.addEventListener("pointerdown",J(this,he,nr).bind(this,R)),O.addEventListener("contextmenu",k.noContextMenu)}this.div.prepend(l(this,a))},he=new WeakSet,nr=function(E,R){R.preventDefault();const{isMac:O}=y.FeatureTest.platform;if(R.button!==0||R.ctrlKey&&O)return;const B=J(this,z,rr).bind(this,E),F=this._isDraggable;this._isDraggable=!1;const Z={passive:!0,capture:!0};window.addEventListener("pointermove",B,Z);const se=this.x,q=this.y,pe=this.width,te=this.height,me=this.parent.div.style.cursor,ve=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(R.target).cursor;const Re=()=>{this._isDraggable=F,window.removeEventListener("pointerup",Re),window.removeEventListener("blur",Re),window.removeEventListener("pointermove",B,Z),this.parent.div.style.cursor=me,this.div.style.cursor=ve;const Oe=this.x,Ie=this.y,Le=this.width,ue=this.height;Oe===se&&Ie===q&&Le===pe&&ue===te||this.addCommands({cmd:()=>{this.width=Le,this.height=ue,this.x=Oe,this.y=Ie;const[ne,ce]=this.parentDimensions;this.setDims(ne*Le,ce*ue),this.fixAndSetPosition()},undo:()=>{this.width=pe,this.height=te,this.x=se,this.y=q;const[ne,ce]=this.parentDimensions;this.setDims(ne*pe,ce*te),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",Re),window.addEventListener("blur",Re)},z=new WeakSet,rr=function(E,R){const[O,B]=this.parentDimensions,F=this.x,Z=this.y,se=this.width,q=this.height,pe=P.MIN_SIZE/O,te=P.MIN_SIZE/B,me=X=>Math.round(X*1e4)/1e4,ve=J(this,_,en).call(this,this.rotation),Re=(X,de)=>[ve[0]*X+ve[2]*de,ve[1]*X+ve[3]*de],Oe=J(this,_,en).call(this,360-this.rotation),Ie=(X,de)=>[Oe[0]*X+Oe[2]*de,Oe[1]*X+Oe[3]*de];let Le,ue,ne=!1,ce=!1;switch(E){case"topLeft":ne=!0,Le=(X,de)=>[0,0],ue=(X,de)=>[X,de];break;case"topMiddle":Le=(X,de)=>[X/2,0],ue=(X,de)=>[X/2,de];break;case"topRight":ne=!0,Le=(X,de)=>[X,0],ue=(X,de)=>[0,de];break;case"middleRight":ce=!0,Le=(X,de)=>[X,de/2],ue=(X,de)=>[0,de/2];break;case"bottomRight":ne=!0,Le=(X,de)=>[X,de],ue=(X,de)=>[0,0];break;case"bottomMiddle":Le=(X,de)=>[X/2,de],ue=(X,de)=>[X/2,0];break;case"bottomLeft":ne=!0,Le=(X,de)=>[0,de],ue=(X,de)=>[X,0];break;case"middleLeft":ce=!0,Le=(X,de)=>[0,de/2],ue=(X,de)=>[X,de/2];break}const ge=Le(se,q),Ce=ue(se,q);let Me=Re(...Ce);const Ve=me(F+Me[0]),ze=me(Z+Me[1]);let _e=1,He=1,[Ke,Xe]=this.screenToPageTranslation(R.movementX,R.movementY);if([Ke,Xe]=Ie(Ke/O,Xe/B),ne){const X=Math.hypot(se,q);_e=He=Math.max(Math.min(Math.hypot(Ce[0]-ge[0]-Ke,Ce[1]-ge[1]-Xe)/X,1/se,1/q),pe/se,te/q)}else ce?_e=Math.max(pe,Math.min(1,Math.abs(Ce[0]-ge[0]-Ke)))/se:He=Math.max(te,Math.min(1,Math.abs(Ce[1]-ge[1]-Xe)))/q;const je=me(se*_e),Je=me(q*He);Me=Re(...ue(je,Je));const V=Ve-Me[0],H=ze-Me[1];this.width=je,this.height=Je,this.x=V,this.y=H,this.setDims(O*je,B*Je),this.fixAndSetPosition()},oe=new WeakSet,tn=async function(){var O;const E=l(this,n);if(!E)return;if(!l(this,e)&&!l(this,i)){E.classList.remove("done"),(O=l(this,d))==null||O.remove();return}P._l10nPromise.get("editor_alt_text_edit_button_label").then(B=>{E.setAttribute("aria-label",B)});let R=l(this,d);if(!R){le(this,d,R=document.createElement("span")),R.className="tooltip",R.setAttribute("role","tooltip");const B=R.id=`alt-text-tooltip-${this.id}`;E.setAttribute("aria-describedby",B);const F=100;E.addEventListener("mouseenter",()=>{le(this,h,setTimeout(()=>{le(this,h,null),l(this,d).classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},F))}),E.addEventListener("mouseleave",()=>{var Z;clearTimeout(l(this,h)),le(this,h,null),(Z=l(this,d))==null||Z.classList.remove("show")})}E.classList.add("done"),R.innerText=l(this,i)?await P._l10nPromise.get("editor_alt_text_decorative_tooltip"):l(this,e),R.parentNode||E.append(R)},Pe=new WeakSet,ir=function(E){if(!this._isDraggable)return;const R=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let O,B;R&&(O={passive:!0,capture:!0},B=Z=>{const[se,q]=this.screenToPageTranslation(Z.movementX,Z.movementY);this._uiManager.dragSelectedEditors(se,q)},window.addEventListener("pointermove",B,O));const F=()=>{if(window.removeEventListener("pointerup",F),window.removeEventListener("blur",F),R&&window.removeEventListener("pointermove",B,O),le(this,m,!1),!this._uiManager.endDragSession()){const{isMac:Z}=y.FeatureTest.platform;E.ctrlKey&&!Z||E.shiftKey||E.metaKey&&Z?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",F),window.addEventListener("blur",F)},$(P,D),tt(P,"_borderLineWidth",-1),tt(P,"_colorManager",new p.ColorManager),tt(P,"_zIndex",1),tt(P,"SMALL_EDITOR_SIZE",0);let u=P;w.AnnotationEditor=u;class g extends u{constructor(E){super(E),this.annotationElementId=E.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(N,w,t)=>{var f,a,r,o,m,nn,b,c,s,x,T,sr,I,_,Q,W,j,he,Y,z,ee,oe,ye,Pe,L,P,M,E,R,O,B,F,Z,se,q,pe,te,me,ve,Re,Oe,Ie,Le,ue,ne,ce,ge,ar,Me,rn,ze,sn,He,It,Xe,an,Je,on,H,st,de,bt,K,or,ie,lr,Se,ln,Te,yt,ke,cn;Object.defineProperty(w,"__esModule",{value:!0}),w.KeyboardManager=w.CommandManager=w.ColorManager=w.AnnotationEditorUIManager=void 0,w.bindEvents=k,w.opacityToHex=u,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(2),t(89),t(125),t(136),t(138),t(141),t(143),t(145),t(147),t(166);var p=t(1),y=t(168);function k(re,C,G){for(const ae of G)C.addEventListener(ae,re[ae].bind(re))}function u(re){return Math.round(Math.min(255,Math.max(1,255*re))).toString(16).padStart(2,"0")}class g{constructor(){$(this,f,0)}getId(){return`${p.AnnotationEditorPrefix}${ut(this,f)._++}`}}f=new WeakMap;const A=class A{constructor(){$(this,m);$(this,a,(0,p.getUuid)());$(this,r,0);$(this,o,null)}static get _isSVGFittingCanvas(){const C='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',ae=new OffscreenCanvas(1,3).getContext("2d"),fe=new Image;fe.src=C;const be=fe.decode().then(()=>(ae.drawImage(fe,0,0,1,1,0,0,1,3),new Uint32Array(ae.getImageData(0,0,1,1).data.buffer)[0]===0));return(0,p.shadow)(this,"_isSVGFittingCanvas",be)}async getFromFile(C){const{lastModified:G,name:ae,size:fe,type:be}=C;return J(this,m,nn).call(this,`${G}_${ae}_${fe}_${be}`,C)}async getFromUrl(C){return J(this,m,nn).call(this,C,C)}async getFromId(C){l(this,o)||le(this,o,new Map);const G=l(this,o).get(C);return G?G.bitmap?(G.refCounter+=1,G):G.file?this.getFromFile(G.file):this.getFromUrl(G.url):null}getSvgUrl(C){const G=l(this,o).get(C);return G!=null&&G.isSvg?G.svgUrl:null}deleteId(C){l(this,o)||le(this,o,new Map);const G=l(this,o).get(C);G&&(G.refCounter-=1,G.refCounter===0&&(G.bitmap=null))}isValidId(C){return C.startsWith(`image_${l(this,a)}_`)}};a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakSet,nn=async function(C,G){l(this,o)||le(this,o,new Map);let ae=l(this,o).get(C);if(ae===null)return null;if(ae!=null&&ae.bitmap)return ae.refCounter+=1,ae;try{ae||(ae={bitmap:null,id:`image_${l(this,a)}_${ut(this,r)._++}`,refCounter:0,isSvg:!1});let fe;if(typeof G=="string"){ae.url=G;const be=await fetch(G);if(!be.ok)throw new Error(be.statusText);fe=await be.blob()}else fe=ae.file=G;if(fe.type==="image/svg+xml"){const be=A._isSVGFittingCanvas,xe=new FileReader,De=new Image,We=new Promise((Fe,Ze)=>{De.onload=()=>{ae.bitmap=De,ae.isSvg=!0,Fe()},xe.onload=async()=>{const Ge=ae.svgUrl=xe.result;De.src=await be?`${Ge}#svgView(preserveAspectRatio(none))`:Ge},De.onerror=xe.onerror=Ze});xe.readAsDataURL(fe),await We}else ae.bitmap=await createImageBitmap(fe);ae.refCounter=1}catch(fe){console.error(fe),ae=null}return l(this,o).set(C,ae),ae&&l(this,o).set(ae.id,ae),ae};let e=A;class i{constructor(){$(this,b,[]);$(this,c,!1);$(this,s,void 0);$(this,x,-1);let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:128;le(this,s,C)}add(C){let{cmd:G,undo:ae,mustExec:fe,type:be=NaN,overwriteIfSameType:xe=!1,keepUndo:De=!1}=C;if(fe&&G(),l(this,c))return;const We={cmd:G,undo:ae,type:be};if(l(this,x)===-1){l(this,b).length>0&&(l(this,b).length=0),le(this,x,0),l(this,b).push(We);return}if(xe&&l(this,b)[l(this,x)].type===be){De&&(We.undo=l(this,b)[l(this,x)].undo),l(this,b)[l(this,x)]=We;return}const Fe=l(this,x)+1;Fe===l(this,s)?l(this,b).splice(0,1):(le(this,x,Fe),Fe<l(this,b).length&&l(this,b).splice(Fe)),l(this,b).push(We)}undo(){l(this,x)!==-1&&(le(this,c,!0),l(this,b)[l(this,x)].undo(),le(this,c,!1),le(this,x,l(this,x)-1))}redo(){l(this,x)<l(this,b).length-1&&(le(this,x,l(this,x)+1),le(this,c,!0),l(this,b)[l(this,x)].cmd(),le(this,c,!1))}hasSomethingToUndo(){return l(this,x)!==-1}hasSomethingToRedo(){return l(this,x)<l(this,b).length-1}destroy(){le(this,b,null)}}b=new WeakMap,c=new WeakMap,s=new WeakMap,x=new WeakMap,w.CommandManager=i;class n{constructor(C){$(this,T);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:G}=p.FeatureTest.platform;for(const[ae,fe,be={}]of C)for(const xe of ae){const De=xe.startsWith("mac+");G&&De?(this.callbacks.set(xe.slice(4),{callback:fe,options:be}),this.allKeys.add(xe.split("+").at(-1))):!G&&!De&&(this.callbacks.set(xe,{callback:fe,options:be}),this.allKeys.add(xe.split("+").at(-1)))}}exec(C,G){if(!this.allKeys.has(G.key))return;const ae=this.callbacks.get(J(this,T,sr).call(this,G));if(!ae)return;const{callback:fe,options:{bubbles:be=!1,args:xe=[],checker:De=null}}=ae;De&&!De(C,G)||(fe.bind(C,...xe)(),be||(G.stopPropagation(),G.preventDefault()))}}T=new WeakSet,sr=function(C){C.altKey&&this.buffer.push("alt"),C.ctrlKey&&this.buffer.push("ctrl"),C.metaKey&&this.buffer.push("meta"),C.shiftKey&&this.buffer.push("shift"),this.buffer.push(C.key);const G=this.buffer.join("+");return this.buffer.length=0,G},w.KeyboardManager=n;const D=class D{get _colors(){const C=new Map([["CanvasText",null],["Canvas",null]]);return(0,y.getColorValues)(C),(0,p.shadow)(this,"_colors",C)}convert(C){const G=(0,y.getRGB)(C);if(!window.matchMedia("(forced-colors: active)").matches)return G;for(const[ae,fe]of this._colors)if(fe.every((be,xe)=>be===G[xe]))return D._colorsMapping.get(ae);return G}getHexCode(C){const G=this._colors.get(C);return G?p.Util.makeHexColor(...G):C}};tt(D,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let d=D;w.ColorManager=d;const Be=class Be{constructor(C,G,ae,fe,be,xe){$(this,ge);$(this,Me);$(this,ze);$(this,He);$(this,Xe);$(this,Je);$(this,H);$(this,de);$(this,K);$(this,ie);$(this,Se);$(this,Te);$(this,ke);$(this,I,null);$(this,_,new Map);$(this,Q,new Map);$(this,W,null);$(this,j,null);$(this,he,new i);$(this,Y,0);$(this,z,new Set);$(this,ee,null);$(this,oe,null);$(this,ye,new Set);$(this,Pe,null);$(this,L,new g);$(this,P,!1);$(this,M,!1);$(this,E,null);$(this,R,p.AnnotationEditorType.NONE);$(this,O,new Set);$(this,B,null);$(this,F,this.blur.bind(this));$(this,Z,this.focus.bind(this));$(this,se,this.copy.bind(this));$(this,q,this.cut.bind(this));$(this,pe,this.paste.bind(this));$(this,te,this.keydown.bind(this));$(this,me,this.onEditingAction.bind(this));$(this,ve,this.onPageChanging.bind(this));$(this,Re,this.onScaleChanging.bind(this));$(this,Oe,this.onRotationChanging.bind(this));$(this,Ie,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1});$(this,Le,[0,0]);$(this,ue,null);$(this,ne,null);$(this,ce,null);le(this,ne,C),le(this,ce,G),le(this,W,ae),this._eventBus=fe,this._eventBus._on("editingaction",l(this,me)),this._eventBus._on("pagechanging",l(this,ve)),this._eventBus._on("scalechanging",l(this,Re)),this._eventBus._on("rotationchanging",l(this,Oe)),le(this,j,be.annotationStorage),le(this,Pe,be.filterFactory),le(this,B,xe),this.viewParameters={realScale:y.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}static get _keyboardManager(){const C=Be.prototype,G=be=>{const{activeElement:xe}=document;return xe&&l(be,ne).contains(xe)&&be.hasSomethingToControl()},ae=this.TRANSLATE_SMALL,fe=this.TRANSLATE_BIG;return(0,p.shadow)(this,"_keyboardManager",new n([[["ctrl+a","mac+meta+a"],C.selectAll],[["ctrl+z","mac+meta+z"],C.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],C.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],C.delete],[["Escape","mac+Escape"],C.unselectAll],[["ArrowLeft","mac+ArrowLeft"],C.translateSelectedEditors,{args:[-ae,0],checker:G}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],C.translateSelectedEditors,{args:[-fe,0],checker:G}],[["ArrowRight","mac+ArrowRight"],C.translateSelectedEditors,{args:[ae,0],checker:G}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],C.translateSelectedEditors,{args:[fe,0],checker:G}],[["ArrowUp","mac+ArrowUp"],C.translateSelectedEditors,{args:[0,-ae],checker:G}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],C.translateSelectedEditors,{args:[0,-fe],checker:G}],[["ArrowDown","mac+ArrowDown"],C.translateSelectedEditors,{args:[0,ae],checker:G}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],C.translateSelectedEditors,{args:[0,fe],checker:G}]]))}destroy(){J(this,He,It).call(this),J(this,Me,rn).call(this),this._eventBus._off("editingaction",l(this,me)),this._eventBus._off("pagechanging",l(this,ve)),this._eventBus._off("scalechanging",l(this,Re)),this._eventBus._off("rotationchanging",l(this,Oe));for(const C of l(this,Q).values())C.destroy();l(this,Q).clear(),l(this,_).clear(),l(this,ye).clear(),le(this,I,null),l(this,O).clear(),l(this,he).destroy(),l(this,W).destroy()}get hcmFilter(){return(0,p.shadow)(this,"hcmFilter",l(this,B)?l(this,Pe).addHCMFilter(l(this,B).foreground,l(this,B).background):"none")}get direction(){return(0,p.shadow)(this,"direction",getComputedStyle(l(this,ne)).direction)}editAltText(C){var G;(G=l(this,W))==null||G.editAltText(this,C)}onPageChanging(C){let{pageNumber:G}=C;le(this,Y,G-1)}focusMainContainer(){l(this,ne).focus()}findParent(C,G){for(const ae of l(this,Q).values()){const{x:fe,y:be,width:xe,height:De}=ae.div.getBoundingClientRect();if(C>=fe&&C<=fe+xe&&G>=be&&G<=be+De)return ae}return null}disableUserSelect(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;l(this,ce).classList.toggle("noUserSelect",C)}addShouldRescale(C){l(this,ye).add(C)}removeShouldRescale(C){l(this,ye).delete(C)}onScaleChanging(C){let{scale:G}=C;this.commitOrRemove(),this.viewParameters.realScale=G*y.PixelsPerInch.PDF_TO_CSS_UNITS;for(const ae of l(this,ye))ae.onScaleChanging()}onRotationChanging(C){let{pagesRotation:G}=C;this.commitOrRemove(),this.viewParameters.rotation=G}addToAnnotationStorage(C){!C.isEmpty()&&l(this,j)&&!l(this,j).has(C.id)&&l(this,j).setValue(C.id,C)}blur(){if(!this.hasSelection)return;const{activeElement:C}=document;for(const G of l(this,O))if(G.div.contains(C)){le(this,E,[G,C]),G._focusEventsAllowed=!1;break}}focus(){if(!l(this,E))return;const[C,G]=l(this,E);le(this,E,null),G.addEventListener("focusin",()=>{C._focusEventsAllowed=!0},{once:!0}),G.focus()}addEditListeners(){J(this,ze,sn).call(this),J(this,Xe,an).call(this)}removeEditListeners(){J(this,He,It).call(this),J(this,Je,on).call(this)}copy(C){var ae;if(C.preventDefault(),(ae=l(this,I))==null||ae.commitOrRemove(),!this.hasSelection)return;const G=[];for(const fe of l(this,O)){const be=fe.serialize(!0);be&&G.push(be)}G.length!==0&&C.clipboardData.setData("application/pdfjs",JSON.stringify(G))}cut(C){this.copy(C),this.delete()}paste(C){C.preventDefault();const{clipboardData:G}=C;for(const be of G.items)for(const xe of l(this,oe))if(xe.isHandlingMimeForPasting(be.type)){xe.paste(be,this.currentLayer);return}let ae=G.getData("application/pdfjs");if(!ae)return;try{ae=JSON.parse(ae)}catch(be){(0,p.warn)(`paste: "${be.message}".`);return}if(!Array.isArray(ae))return;this.unselectAll();const fe=this.currentLayer;try{const be=[];for(const We of ae){const Fe=fe.deserialize(We);if(!Fe)return;be.push(Fe)}const xe=()=>{for(const We of be)J(this,Se,ln).call(this,We);J(this,ke,cn).call(this,be)},De=()=>{for(const We of be)We.remove()};this.addCommands({cmd:xe,undo:De,mustExec:!0})}catch(be){(0,p.warn)(`paste: "${be.message}".`)}}keydown(C){var G;(G=this.getActive())!=null&&G.shouldGetKeyboardEvents()||Be._keyboardManager.exec(this,C)}onEditingAction(C){["undo","redo","delete","selectAll"].includes(C.name)&&this[C.name]()}setEditingState(C){C?(J(this,ge,ar).call(this),J(this,ze,sn).call(this),J(this,Xe,an).call(this),J(this,H,st).call(this,{isEditing:l(this,R)!==p.AnnotationEditorType.NONE,isEmpty:J(this,Te,yt).call(this),hasSomethingToUndo:l(this,he).hasSomethingToUndo(),hasSomethingToRedo:l(this,he).hasSomethingToRedo(),hasSelectedEditor:!1})):(J(this,Me,rn).call(this),J(this,He,It).call(this),J(this,Je,on).call(this),J(this,H,st).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(C){if(!l(this,oe)){le(this,oe,C);for(const G of l(this,oe))J(this,de,bt).call(this,G.defaultPropertiesToUpdate)}}getId(){return l(this,L).getId()}get currentLayer(){return l(this,Q).get(l(this,Y))}getLayer(C){return l(this,Q).get(C)}get currentPageIndex(){return l(this,Y)}addLayer(C){l(this,Q).set(C.pageIndex,C),l(this,P)?C.enable():C.disable()}removeLayer(C){l(this,Q).delete(C.pageIndex)}updateMode(C){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(l(this,R)!==C){if(le(this,R,C),C===p.AnnotationEditorType.NONE){this.setEditingState(!1),J(this,ie,lr).call(this);return}this.setEditingState(!0),J(this,K,or).call(this),this.unselectAll();for(const ae of l(this,Q).values())ae.updateMode(C);if(G){for(const ae of l(this,_).values())if(ae.annotationElementId===G){this.setSelected(ae),ae.enterInEditMode();break}}}}updateToolbar(C){C!==l(this,R)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:C})}updateParams(C,G){if(l(this,oe)){if(C===p.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(C);return}for(const ae of l(this,O))ae.updateParams(C,G);for(const ae of l(this,oe))ae.updateDefaultParams(C,G)}}enableWaiting(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(l(this,M)!==C){le(this,M,C);for(const G of l(this,Q).values())C?G.disableClick():G.enableClick(),G.div.classList.toggle("waiting",C)}}getEditors(C){const G=[];for(const ae of l(this,_).values())ae.pageIndex===C&&G.push(ae);return G}getEditor(C){return l(this,_).get(C)}addEditor(C){l(this,_).set(C.id,C)}removeEditor(C){var G;l(this,_).delete(C.id),this.unselect(C),(!C.annotationElementId||!l(this,z).has(C.annotationElementId))&&((G=l(this,j))==null||G.remove(C.id))}addDeletedAnnotationElement(C){l(this,z).add(C.annotationElementId),C.deleted=!0}isDeletedAnnotationElement(C){return l(this,z).has(C)}removeDeletedAnnotationElement(C){l(this,z).delete(C.annotationElementId),C.deleted=!1}setActiveEditor(C){l(this,I)!==C&&(le(this,I,C),C&&J(this,de,bt).call(this,C.propertiesToUpdate))}toggleSelected(C){if(l(this,O).has(C)){l(this,O).delete(C),C.unselect(),J(this,H,st).call(this,{hasSelectedEditor:this.hasSelection});return}l(this,O).add(C),C.select(),J(this,de,bt).call(this,C.propertiesToUpdate),J(this,H,st).call(this,{hasSelectedEditor:!0})}setSelected(C){for(const G of l(this,O))G!==C&&G.unselect();l(this,O).clear(),l(this,O).add(C),C.select(),J(this,de,bt).call(this,C.propertiesToUpdate),J(this,H,st).call(this,{hasSelectedEditor:!0})}isSelected(C){return l(this,O).has(C)}unselect(C){C.unselect(),l(this,O).delete(C),J(this,H,st).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return l(this,O).size!==0}undo(){l(this,he).undo(),J(this,H,st).call(this,{hasSomethingToUndo:l(this,he).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:J(this,Te,yt).call(this)})}redo(){l(this,he).redo(),J(this,H,st).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:l(this,he).hasSomethingToRedo(),isEmpty:J(this,Te,yt).call(this)})}addCommands(C){l(this,he).add(C),J(this,H,st).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:J(this,Te,yt).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const C=[...l(this,O)],G=()=>{for(const fe of C)fe.remove()},ae=()=>{for(const fe of C)J(this,Se,ln).call(this,fe)};this.addCommands({cmd:G,undo:ae,mustExec:!0})}commitOrRemove(){var C;(C=l(this,I))==null||C.commitOrRemove()}hasSomethingToControl(){return l(this,I)||this.hasSelection}selectAll(){for(const C of l(this,O))C.commit();J(this,ke,cn).call(this,l(this,_).values())}unselectAll(){if(l(this,I)){l(this,I).commitOrRemove();return}if(this.hasSelection){for(const C of l(this,O))C.unselect();l(this,O).clear(),J(this,H,st).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(C,G){if((arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1)||this.commitOrRemove(),!this.hasSelection)return;l(this,Le)[0]+=C,l(this,Le)[1]+=G;const[fe,be]=l(this,Le),xe=[...l(this,O)],De=1e3;l(this,ue)&&clearTimeout(l(this,ue)),le(this,ue,setTimeout(()=>{le(this,ue,null),l(this,Le)[0]=l(this,Le)[1]=0,this.addCommands({cmd:()=>{for(const We of xe)l(this,_).has(We.id)&&We.translateInPage(fe,be)},undo:()=>{for(const We of xe)l(this,_).has(We.id)&&We.translateInPage(-fe,-be)},mustExec:!1})},De));for(const We of xe)We.translateInPage(C,G)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),le(this,ee,new Map);for(const C of l(this,O))l(this,ee).set(C,{savedX:C.x,savedY:C.y,savedPageIndex:C.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!l(this,ee))return!1;this.disableUserSelect(!1);const C=l(this,ee);le(this,ee,null);let G=!1;for(const[{x:fe,y:be,pageIndex:xe},De]of C)De.newX=fe,De.newY=be,De.newPageIndex=xe,G||(G=fe!==De.savedX||be!==De.savedY||xe!==De.savedPageIndex);if(!G)return!1;const ae=(fe,be,xe,De)=>{if(l(this,_).has(fe.id)){const We=l(this,Q).get(De);We?fe._setParentAndPosition(We,be,xe):(fe.pageIndex=De,fe.x=be,fe.y=xe)}};return this.addCommands({cmd:()=>{for(const[fe,{newX:be,newY:xe,newPageIndex:De}]of C)ae(fe,be,xe,De)},undo:()=>{for(const[fe,{savedX:be,savedY:xe,savedPageIndex:De}]of C)ae(fe,be,xe,De)},mustExec:!0}),!0}dragSelectedEditors(C,G){if(l(this,ee))for(const ae of l(this,ee).keys())ae.drag(C,G)}rebuild(C){if(C.parent===null){const G=this.getLayer(C.pageIndex);G?(G.changeParent(C),G.addOrRebuild(C)):(this.addEditor(C),this.addToAnnotationStorage(C),C.rebuild())}else C.parent.addOrRebuild(C)}isActive(C){return l(this,I)===C}getActive(){return l(this,I)}getMode(){return l(this,R)}get imageManager(){return(0,p.shadow)(this,"imageManager",new e)}};I=new WeakMap,_=new WeakMap,Q=new WeakMap,W=new WeakMap,j=new WeakMap,he=new WeakMap,Y=new WeakMap,z=new WeakMap,ee=new WeakMap,oe=new WeakMap,ye=new WeakMap,Pe=new WeakMap,L=new WeakMap,P=new WeakMap,M=new WeakMap,E=new WeakMap,R=new WeakMap,O=new WeakMap,B=new WeakMap,F=new WeakMap,Z=new WeakMap,se=new WeakMap,q=new WeakMap,pe=new WeakMap,te=new WeakMap,me=new WeakMap,ve=new WeakMap,Re=new WeakMap,Oe=new WeakMap,Ie=new WeakMap,Le=new WeakMap,ue=new WeakMap,ne=new WeakMap,ce=new WeakMap,ge=new WeakSet,ar=function(){window.addEventListener("focus",l(this,Z)),window.addEventListener("blur",l(this,F))},Me=new WeakSet,rn=function(){window.removeEventListener("focus",l(this,Z)),window.removeEventListener("blur",l(this,F))},ze=new WeakSet,sn=function(){window.addEventListener("keydown",l(this,te),{capture:!0})},He=new WeakSet,It=function(){window.removeEventListener("keydown",l(this,te),{capture:!0})},Xe=new WeakSet,an=function(){document.addEventListener("copy",l(this,se)),document.addEventListener("cut",l(this,q)),document.addEventListener("paste",l(this,pe))},Je=new WeakSet,on=function(){document.removeEventListener("copy",l(this,se)),document.removeEventListener("cut",l(this,q)),document.removeEventListener("paste",l(this,pe))},H=new WeakSet,st=function(C){Object.entries(C).some(ae=>{let[fe,be]=ae;return l(this,Ie)[fe]!==be})&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(l(this,Ie),C)})},de=new WeakSet,bt=function(C){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:C})},K=new WeakSet,or=function(){if(!l(this,P)){le(this,P,!0);for(const C of l(this,Q).values())C.enable()}},ie=new WeakSet,lr=function(){if(this.unselectAll(),l(this,P)){le(this,P,!1);for(const C of l(this,Q).values())C.disable()}},Se=new WeakSet,ln=function(C){const G=l(this,Q).get(C.pageIndex);G?G.addOrRebuild(C):this.addEditor(C)},Te=new WeakSet,yt=function(){if(l(this,_).size===0)return!0;if(l(this,_).size===1)for(const C of l(this,_).values())return C.isEmpty();return!1},ke=new WeakSet,cn=function(C){l(this,O).clear();for(const G of C)G.isEmpty()||(l(this,O).add(G),G.select());J(this,H,st).call(this,{hasSelectedEditor:!0})},tt(Be,"TRANSLATE_SMALL",1),tt(Be,"TRANSLATE_BIG",10);let h=Be;w.AnnotationEditorUIManager=h},(N,w,t)=>{var p=t(3),y=t(6),k=t(4),u=t(24),g=t(14),e=t(8),i=t(21),n=t(20),d=t(91),h=t(39),f=t(77),a=t(64),r=t(159),o=t(7),m=t(167),v=t(27),A=k.JSON,b=k.Number,c=k.SyntaxError,s=A&&A.parse,x=u("Object","keys"),T=Object.getOwnPropertyDescriptor,S=g("".charAt),D=g("".slice),I=g(/./.exec),_=g([].push),Q=/^\d$/,W=/^[1-9]$/,j=/^(?:-|\d)$/,he=/^[\t\n\r ]$/,Y=0,z=1,ee=function(E,R){E=f(E);var O=new L(E,0),B=O.parse(),F=B.value,Z=O.skip(he,B.end);if(Z<E.length)throw c('Unexpected extra character: "'+S(E,Z)+'" after the parsed data at: '+Z);return i(R)?oe({"":F},"",R,B):F},oe=function(E,R,O,B){var F=E[R],Z=B&&F===B.value,se=Z&&typeof B.source=="string"?{source:B.source}:{},q,pe,te,me,ve;if(n(F)){var Re=d(F),Oe=Z?B.nodes:Re?[]:{};if(Re)for(q=Oe.length,te=a(F),me=0;me<te;me++)ye(F,me,oe(F,""+me,O,me<q?Oe[me]:void 0));else for(pe=x(F),te=a(pe),me=0;me<te;me++)ve=pe[me],ye(F,ve,oe(F,ve,O,h(Oe,ve)?Oe[ve]:void 0))}return e(O,E,R,F,se)},ye=function(E,R,O){if(y){var B=T(E,R);if(B&&!B.configurable)return}O===void 0?delete E[R]:r(E,R,O)},Pe=function(E,R,O,B){this.value=E,this.end=R,this.source=O,this.nodes=B},L=function(E,R){this.source=E,this.index=R};L.prototype={fork:function(E){return new L(this.source,E)},parse:function(){var E=this.source,R=this.skip(he,this.index),O=this.fork(R),B=S(E,R);if(I(j,B))return O.number();switch(B){case"{":return O.object();case"[":return O.array();case'"':return O.string();case"t":return O.keyword(!0);case"f":return O.keyword(!1);case"n":return O.keyword(null)}throw c('Unexpected character: "'+B+'" at: '+R)},node:function(E,R,O,B,F){return new Pe(R,B,E?null:D(this.source,O,B),F)},object:function(){for(var E=this.source,R=this.index+1,O=!1,B={},F={};R<E.length;){if(R=this.until(['"',"}"],R),S(E,R)==="}"&&!O){R++;break}var Z=this.fork(R).string(),se=Z.value;R=Z.end,R=this.until([":"],R)+1,R=this.skip(he,R),Z=this.fork(R).parse(),r(F,se,Z),r(B,se,Z.value),R=this.until([",","}"],Z.end);var q=S(E,R);if(q===",")O=!0,R++;else if(q==="}"){R++;break}}return this.node(z,B,this.index,R,F)},array:function(){for(var E=this.source,R=this.index+1,O=!1,B=[],F=[];R<E.length;){if(R=this.skip(he,R),S(E,R)==="]"&&!O){R++;break}var Z=this.fork(R).parse();if(_(F,Z),_(B,Z.value),R=this.until([",","]"],Z.end),S(E,R)===",")O=!0,R++;else if(S(E,R)==="]"){R++;break}}return this.node(z,B,this.index,R,F)},string:function(){var E=this.index,R=m(this.source,this.index+1);return this.node(Y,R.value,E,R.end)},number:function(){var E=this.source,R=this.index,O=R;if(S(E,O)==="-"&&O++,S(E,O)==="0")O++;else if(I(W,S(E,O)))O=this.skip(Q,++O);else throw c("Failed to parse number at: "+O);if(S(E,O)==="."&&(O=this.skip(Q,++O)),S(E,O)==="e"||S(E,O)==="E"){O++,(S(E,O)==="+"||S(E,O)==="-")&&O++;var B=O;if(O=this.skip(Q,O),B===O)throw c("Failed to parse number's exponent value at: "+O)}return this.node(Y,b(D(E,R,O)),R,O)},keyword:function(E){var R=""+E,O=this.index,B=O+R.length;if(D(this.source,O,B)!==R)throw c("Failed to parse value at: "+O);return this.node(Y,E,O,B)},skip:function(E,R){for(var O=this.source;R<O.length&&I(E,S(O,R));R++);return R},until:function(E,R){R=this.skip(he,R);for(var O=S(this.source,R),B=0;B<E.length;B++)if(E[B]===O)return R;throw c('Unexpected character: "'+O+'" at: '+R)}};var P=o(function(){var E="9007199254740993",R;return s(E,function(O,B,F){R=F.source}),R!==E}),M=v&&!o(function(){return 1/s("-0 ")!==-1/0});p({target:"JSON",stat:!0,forced:P},{parse:function(R,O){return M&&!i(O)?s(R):ee(R,O)}})},(N,w,t)=>{var p=t(14),y=t(39),k=SyntaxError,u=parseInt,g=String.fromCharCode,e=p("".charAt),i=p("".slice),n=p(/./.exec),d={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
`,"\\r":"\r","\\t":" "},h=/^[\da-f]{4}$/i,f=/^[\u0000-\u001F]$/;N.exports=function(a,r){for(var o=!0,m="";r<a.length;){var v=e(a,r);if(v==="\\"){var A=i(a,r,r+2);if(y(d,A))m+=d[A],r+=2;else if(A==="\\u"){r+=2;var b=i(a,r,r+4);if(!n(h,b))throw k("Bad Unicode escape at: "+r);m+=g(u(b,16)),r+=4}else throw k('Unknown escape sequence: "'+A+'"')}else if(v==='"'){o=!1,r++;break}else{if(n(f,v))throw k("Bad control character in string literal at: "+r);m+=v,r++}}if(o)throw k("Unterminated string at: "+r);return{value:m,end:r}}},(N,w,t)=>{var Y,z,ee,oe,ye,Pe,L,P,M,E,R,O,ft,F,pt,se,hn,pe,Lt,me,Ot,Re,At,Ie,St;Object.defineProperty(w,"__esModule",{value:!0}),w.StatTimer=w.RenderingCancelledException=w.PixelsPerInch=w.PageViewport=w.PDFDateString=w.DOMStandardFontDataFactory=w.DOMSVGFactory=w.DOMFilterFactory=w.DOMCanvasFactory=w.DOMCMapReaderFactory=void 0,w.deprecated=x,w.getColorValues=_,w.getCurrentTransform=Q,w.getCurrentTransformInverse=W,w.getFilenameFromUrl=m,w.getPdfFilenameFromUrl=v,w.getRGB=I,w.getXfaPageViewport=D,w.isDataScheme=r,w.isPdfFile=o,w.isValidFetchUrl=b,w.loadScript=s,w.noContextMenu=c,w.setLayerDimensions=j,t(2),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89),t(84),t(86),t(87);var p=t(169),y=t(1);const k="http://www.w3.org/2000/svg",he=class he{};tt(he,"CSS",96),tt(he,"PDF",72),tt(he,"PDF_TO_CSS_UNITS",he.CSS/he.PDF);let u=he;w.PixelsPerInch=u;class g extends p.BaseFilterFactory{constructor(){let{docId:ce,ownerDocument:ge=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super();$(this,O);$(this,F);$(this,se);$(this,pe);$(this,me);$(this,Re);$(this,Ie);$(this,Y,void 0);$(this,z,void 0);$(this,ee,void 0);$(this,oe,void 0);$(this,ye,void 0);$(this,Pe,void 0);$(this,L,void 0);$(this,P,void 0);$(this,M,void 0);$(this,E,void 0);$(this,R,0);le(this,ee,ce),le(this,oe,ge)}addFilter(ce){if(!ce)return"none";let ge=l(this,O,ft).get(ce);if(ge)return ge;let Ce,Me,Ve,ze;if(ce.length===1){const Xe=ce[0],je=new Array(256);for(let Je=0;Je<256;Je++)je[Je]=Xe[Je]/255;ze=Ce=Me=Ve=je.join(",")}else{const[Xe,je,Je]=ce,V=new Array(256),H=new Array(256),X=new Array(256);for(let de=0;de<256;de++)V[de]=Xe[de]/255,H[de]=je[de]/255,X[de]=Je[de]/255;Ce=V.join(","),Me=H.join(","),Ve=X.join(","),ze=`${Ce}${Me}${Ve}`}if(ge=l(this,O,ft).get(ze),ge)return l(this,O,ft).set(ce,ge),ge;const _e=`g_${l(this,ee)}_transfer_map_${ut(this,R)._++}`,He=`url(#${_e})`;l(this,O,ft).set(ce,He),l(this,O,ft).set(ze,He);const Ke=J(this,pe,Lt).call(this,_e);return J(this,Re,At).call(this,Ce,Me,Ve,Ke),He}addHCMFilter(ce,ge){var je;const Ce=`${ce}-${ge}`;if(l(this,Pe)===Ce)return l(this,L);if(le(this,Pe,Ce),le(this,L,"none"),(je=l(this,ye))==null||je.remove(),!ce||!ge)return l(this,L);const Me=J(this,Ie,St).call(this,ce);ce=y.Util.makeHexColor(...Me);const Ve=J(this,Ie,St).call(this,ge);if(ge=y.Util.makeHexColor(...Ve),l(this,F,pt).style.color="",ce==="#000000"&&ge==="#ffffff"||ce===ge)return l(this,L);const ze=new Array(256);for(let Je=0;Je<=255;Je++){const V=Je/255;ze[Je]=V<=.03928?V/12.92:((V+.055)/1.055)**2.4}const _e=ze.join(","),He=`g_${l(this,ee)}_hcm_filter`,Ke=le(this,P,J(this,pe,Lt).call(this,He));J(this,Re,At).call(this,_e,_e,_e,Ke),J(this,se,hn).call(this,Ke);const Xe=(Je,V)=>{const H=Me[Je]/255,X=Ve[Je]/255,de=new Array(V+1);for(let Ee=0;Ee<=V;Ee++)de[Ee]=H+Ee/V*(X-H);return de.join(",")};return J(this,Re,At).call(this,Xe(0,5),Xe(1,5),Xe(2,5),Ke),le(this,L,`url(#${He})`),l(this,L)}addHighlightHCMFilter(ce,ge,Ce,Me){var X;const Ve=`${ce}-${ge}-${Ce}-${Me}`;if(l(this,M)===Ve)return l(this,E);if(le(this,M,Ve),le(this,E,"none"),(X=l(this,P))==null||X.remove(),!ce||!ge)return l(this,E);const[ze,_e]=[ce,ge].map(J(this,Ie,St).bind(this));let He=Math.round(.2126*ze[0]+.7152*ze[1]+.0722*ze[2]),Ke=Math.round(.2126*_e[0]+.7152*_e[1]+.0722*_e[2]),[Xe,je]=[Ce,Me].map(J(this,Ie,St).bind(this));Ke<He&&([He,Ke,Xe,je]=[Ke,He,je,Xe]),l(this,F,pt).style.color="";const Je=(de,Ee,K)=>{const U=new Array(256),ie=(Ke-He)/K,Ae=de/255,Se=(Ee-de)/(255*K);let we=0;for(let Te=0;Te<=K;Te++){const Ne=Math.round(He+Te*ie),ke=Ae+Te*Se;for(let Ue=we;Ue<=Ne;Ue++)U[Ue]=ke;we=Ne+1}for(let Te=we;Te<256;Te++)U[Te]=U[we-1];return U.join(",")},V=`g_${l(this,ee)}_hcm_highlight_filter`,H=le(this,P,J(this,pe,Lt).call(this,V));return J(this,se,hn).call(this,H),J(this,Re,At).call(this,Je(Xe[0],je[0],5),Je(Xe[1],je[1],5),Je(Xe[2],je[2],5),H),le(this,E,`url(#${V})`),l(this,E)}destroy(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&(l(this,L)||l(this,E))||(l(this,z)&&(l(this,z).parentNode.parentNode.remove(),le(this,z,null)),l(this,Y)&&(l(this,Y).clear(),le(this,Y,null)),le(this,R,0))}}Y=new WeakMap,z=new WeakMap,ee=new WeakMap,oe=new WeakMap,ye=new WeakMap,Pe=new WeakMap,L=new WeakMap,P=new WeakMap,M=new WeakMap,E=new WeakMap,R=new WeakMap,O=new WeakSet,ft=function(){return l(this,Y)||le(this,Y,new Map)},F=new WeakSet,pt=function(){if(!l(this,z)){const ce=l(this,oe).createElement("div"),{style:ge}=ce;ge.visibility="hidden",ge.contain="strict",ge.width=ge.height=0,ge.position="absolute",ge.top=ge.left=0,ge.zIndex=-1;const Ce=l(this,oe).createElementNS(k,"svg");Ce.setAttribute("width",0),Ce.setAttribute("height",0),le(this,z,l(this,oe).createElementNS(k,"defs")),ce.append(Ce),Ce.append(l(this,z)),l(this,oe).body.append(ce)}return l(this,z)},se=new WeakSet,hn=function(ce){const ge=l(this,oe).createElementNS(k,"feColorMatrix");ge.setAttribute("type","matrix"),ge.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),ce.append(ge)},pe=new WeakSet,Lt=function(ce){const ge=l(this,oe).createElementNS(k,"filter");return ge.setAttribute("color-interpolation-filters","sRGB"),ge.setAttribute("id",ce),l(this,F,pt).append(ge),ge},me=new WeakSet,Ot=function(ce,ge,Ce){const Me=l(this,oe).createElementNS(k,ge);Me.setAttribute("type","discrete"),Me.setAttribute("tableValues",Ce),ce.append(Me)},Re=new WeakSet,At=function(ce,ge,Ce,Me){const Ve=l(this,oe).createElementNS(k,"feComponentTransfer");Me.append(Ve),J(this,me,Ot).call(this,Ve,"feFuncR",ce),J(this,me,Ot).call(this,Ve,"feFuncG",ge),J(this,me,Ot).call(this,Ve,"feFuncB",Ce)},Ie=new WeakSet,St=function(ce){return l(this,F,pt).style.color=ce,I(getComputedStyle(l(this,F,pt)).getPropertyValue("color"))},w.DOMFilterFactory=g;class e extends p.BaseCanvasFactory{constructor(){let{ownerDocument:ne=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this._document=ne}_createCanvas(ne,ce){const ge=this._document.createElement("canvas");return ge.width=ne,ge.height=ce,ge}}w.DOMCanvasFactory=e;async function i(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(b(ue,document.baseURI)){const ce=await fetch(ue);if(!ce.ok)throw new Error(ce.statusText);return ne?new Uint8Array(await ce.arrayBuffer()):(0,y.stringToBytes)(await ce.text())}return new Promise((ce,ge)=>{const Ce=new XMLHttpRequest;Ce.open("GET",ue,!0),ne&&(Ce.responseType="arraybuffer"),Ce.onreadystatechange=()=>{if(Ce.readyState===XMLHttpRequest.DONE){if(Ce.status===200||Ce.status===0){let Me;if(ne&&Ce.response?Me=new Uint8Array(Ce.response):!ne&&Ce.responseText&&(Me=(0,y.stringToBytes)(Ce.responseText)),Me){ce(Me);return}}ge(new Error(Ce.statusText))}},Ce.send(null)})}class n extends p.BaseCMapReaderFactory{_fetchData(ne,ce){return i(ne,this.isCompressed).then(ge=>({cMapData:ge,compressionType:ce}))}}w.DOMCMapReaderFactory=n;class d extends p.BaseStandardFontDataFactory{_fetchData(ne){return i(ne,!0)}}w.DOMStandardFontDataFactory=d;class h extends p.BaseSVGFactory{_createSVG(ne){return document.createElementNS(k,ne)}}w.DOMSVGFactory=h;class f{constructor(ne){let{viewBox:ce,scale:ge,rotation:Ce,offsetX:Me=0,offsetY:Ve=0,dontFlip:ze=!1}=ne;this.viewBox=ce,this.scale=ge,this.rotation=Ce,this.offsetX=Me,this.offsetY=Ve;const _e=(ce[2]+ce[0])/2,He=(ce[3]+ce[1])/2;let Ke,Xe,je,Je;switch(Ce%=360,Ce<0&&(Ce+=360),Ce){case 180:Ke=-1,Xe=0,je=0,Je=1;break;case 90:Ke=0,Xe=1,je=1,Je=0;break;case 270:Ke=0,Xe=-1,je=-1,Je=0;break;case 0:Ke=1,Xe=0,je=0,Je=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ze&&(je=-je,Je=-Je);let V,H,X,de;Ke===0?(V=Math.abs(He-ce[1])*ge+Me,H=Math.abs(_e-ce[0])*ge+Ve,X=(ce[3]-ce[1])*ge,de=(ce[2]-ce[0])*ge):(V=Math.abs(_e-ce[0])*ge+Me,H=Math.abs(He-ce[1])*ge+Ve,X=(ce[2]-ce[0])*ge,de=(ce[3]-ce[1])*ge),this.transform=[Ke*ge,Xe*ge,je*ge,Je*ge,V-Ke*ge*_e-je*ge*He,H-Xe*ge*_e-Je*ge*He],this.width=X,this.height=de}get rawDims(){const{viewBox:ne}=this;return(0,y.shadow)(this,"rawDims",{pageWidth:ne[2]-ne[0],pageHeight:ne[3]-ne[1],pageX:ne[0],pageY:ne[1]})}clone(){let{scale:ne=this.scale,rotation:ce=this.rotation,offsetX:ge=this.offsetX,offsetY:Ce=this.offsetY,dontFlip:Me=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new f({viewBox:this.viewBox.slice(),scale:ne,rotation:ce,offsetX:ge,offsetY:Ce,dontFlip:Me})}convertToViewportPoint(ne,ce){return y.Util.applyTransform([ne,ce],this.transform)}convertToViewportRectangle(ne){const ce=y.Util.applyTransform([ne[0],ne[1]],this.transform),ge=y.Util.applyTransform([ne[2],ne[3]],this.transform);return[ce[0],ce[1],ge[0],ge[1]]}convertToPdfPoint(ne,ce){return y.Util.applyInverseTransform([ne,ce],this.transform)}}w.PageViewport=f;class a extends y.BaseException{constructor(ne){let ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;super(ne,"RenderingCancelledException"),this.extraDelay=ce}}w.RenderingCancelledException=a;function r(ue){const ne=ue.length;let ce=0;for(;ce<ne&&ue[ce].trim()==="";)ce++;return ue.substring(ce,ce+5).toLowerCase()==="data:"}function o(ue){return typeof ue=="string"&&/\.pdf$/i.test(ue)}function m(ue){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)||([ue]=ue.split(/[#?]/,1)),ue.substring(ue.lastIndexOf("/")+1)}function v(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof ue!="string")return ne;if(r(ue))return(0,y.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),ne;const ce=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,ge=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,Ce=ce.exec(ue);let Me=ge.exec(Ce[1])||ge.exec(Ce[2])||ge.exec(Ce[3]);if(Me&&(Me=Me[0],Me.includes("%")))try{Me=ge.exec(decodeURIComponent(Me))[0]}catch{}return Me||ne}class A{constructor(){tt(this,"started",Object.create(null));tt(this,"times",[])}time(ne){ne in this.started&&(0,y.warn)(`Timer is already running for ${ne}`),this.started[ne]=Date.now()}timeEnd(ne){ne in this.started||(0,y.warn)(`Timer has not been started for ${ne}`),this.times.push({name:ne,start:this.started[ne],end:Date.now()}),delete this.started[ne]}toString(){const ne=[];let ce=0;for(const{name:ge}of this.times)ce=Math.max(ge.length,ce);for(const{name:ge,start:Ce,end:Me}of this.times)ne.push(`${ge.padEnd(ce)} ${Me-Ce}ms
`);return ne.join("")}}w.StatTimer=A;function b(ue,ne){try{const{protocol:ce}=ne?new URL(ue,ne):new URL(ue);return ce==="http:"||ce==="https:"}catch{return!1}}function c(ue){ue.preventDefault()}function s(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new Promise((ce,ge)=>{const Ce=document.createElement("script");Ce.src=ue,Ce.onload=function(Me){ne&&Ce.remove(),ce(Me)},Ce.onerror=function(){ge(new Error(`Cannot load script at: ${Ce.src}`))},(document.head||document.documentElement).append(Ce)})}function x(ue){console.log("Deprecated API usage: "+ue)}let T;class S{static toDateObject(ne){if(!ne||typeof ne!="string")return null;T||(T=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const ce=T.exec(ne);if(!ce)return null;const ge=parseInt(ce[1],10);let Ce=parseInt(ce[2],10);Ce=Ce>=1&&Ce<=12?Ce-1:0;let Me=parseInt(ce[3],10);Me=Me>=1&&Me<=31?Me:1;let Ve=parseInt(ce[4],10);Ve=Ve>=0&&Ve<=23?Ve:0;let ze=parseInt(ce[5],10);ze=ze>=0&&ze<=59?ze:0;let _e=parseInt(ce[6],10);_e=_e>=0&&_e<=59?_e:0;const He=ce[7]||"Z";let Ke=parseInt(ce[8],10);Ke=Ke>=0&&Ke<=23?Ke:0;let Xe=parseInt(ce[9],10)||0;return Xe=Xe>=0&&Xe<=59?Xe:0,He==="-"?(Ve+=Ke,ze+=Xe):He==="+"&&(Ve-=Ke,ze-=Xe),new Date(Date.UTC(ge,Ce,Me,Ve,ze,_e))}}w.PDFDateString=S;function D(ue,ne){let{scale:ce=1,rotation:ge=0}=ne;const{width:Ce,height:Me}=ue.attributes.style,Ve=[0,0,parseInt(Ce),parseInt(Me)];return new f({viewBox:Ve,scale:ce,rotation:ge})}function I(ue){if(ue.startsWith("#")){const ne=parseInt(ue.slice(1),16);return[(ne&16711680)>>16,(ne&65280)>>8,ne&255]}return ue.startsWith("rgb(")?ue.slice(4,-1).split(",").map(ne=>parseInt(ne)):ue.startsWith("rgba(")?ue.slice(5,-1).split(",").map(ne=>parseInt(ne)).slice(0,3):((0,y.warn)(`Not a valid color format: "${ue}"`),[0,0,0])}function _(ue){const ne=document.createElement("span");ne.style.visibility="hidden",document.body.append(ne);for(const ce of ue.keys()){ne.style.color=ce;const ge=window.getComputedStyle(ne).color;ue.set(ce,I(ge))}ne.remove()}function Q(ue){const{a:ne,b:ce,c:ge,d:Ce,e:Me,f:Ve}=ue.getTransform();return[ne,ce,ge,Ce,Me,Ve]}function W(ue){const{a:ne,b:ce,c:ge,d:Ce,e:Me,f:Ve}=ue.getTransform().invertSelf();return[ne,ce,ge,Ce,Me,Ve]}function j(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(ne instanceof f){const{pageWidth:Ce,pageHeight:Me}=ne.rawDims,{style:Ve}=ue,ze=y.FeatureTest.isCSSRoundSupported,_e=`var(--scale-factor) * ${Ce}px`,He=`var(--scale-factor) * ${Me}px`,Ke=ze?`round(${_e}, 1px)`:`calc(${_e})`,Xe=ze?`round(${He}, 1px)`:`calc(${He})`;!ce||ne.rotation%180===0?(Ve.width=Ke,Ve.height=Xe):(Ve.width=Xe,Ve.height=Ke)}ge&&ue.setAttribute("data-main-rotation",ne.rotation)}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.BaseStandardFontDataFactory=w.BaseSVGFactory=w.BaseFilterFactory=w.BaseCanvasFactory=w.BaseCMapReaderFactory=void 0,t(2);var p=t(1);class y{constructor(){this.constructor===y&&(0,p.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(n){return"none"}addHCMFilter(n,d){return"none"}addHighlightHCMFilter(n,d,h,f){return"none"}destroy(){}}w.BaseFilterFactory=y;class k{constructor(){this.constructor===k&&(0,p.unreachable)("Cannot initialize BaseCanvasFactory.")}create(n,d){if(n<=0||d<=0)throw new Error("Invalid canvas size");const h=this._createCanvas(n,d);return{canvas:h,context:h.getContext("2d")}}reset(n,d,h){if(!n.canvas)throw new Error("Canvas is not specified");if(d<=0||h<=0)throw new Error("Invalid canvas size");n.canvas.width=d,n.canvas.height=h}destroy(n){if(!n.canvas)throw new Error("Canvas is not specified");n.canvas.width=0,n.canvas.height=0,n.canvas=null,n.context=null}_createCanvas(n,d){(0,p.unreachable)("Abstract method `_createCanvas` called.")}}w.BaseCanvasFactory=k;class u{constructor(n){let{baseUrl:d=null,isCompressed:h=!0}=n;this.constructor===u&&(0,p.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=d,this.isCompressed=h}async fetch(n){let{name:d}=n;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!d)throw new Error("CMap name must be specified.");const h=this.baseUrl+d+(this.isCompressed?".bcmap":""),f=this.isCompressed?p.CMapCompressionType.BINARY:p.CMapCompressionType.NONE;return this._fetchData(h,f).catch(a=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${h}`)})}_fetchData(n,d){(0,p.unreachable)("Abstract method `_fetchData` called.")}}w.BaseCMapReaderFactory=u;class g{constructor(n){let{baseUrl:d=null}=n;this.constructor===g&&(0,p.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=d}async fetch(n){let{filename:d}=n;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!d)throw new Error("Font filename must be specified.");const h=`${this.baseUrl}${d}`;return this._fetchData(h).catch(f=>{throw new Error(`Unable to load font data at: ${h}`)})}_fetchData(n){(0,p.unreachable)("Abstract method `_fetchData` called.")}}w.BaseStandardFontDataFactory=g;class e{constructor(){this.constructor===e&&(0,p.unreachable)("Cannot initialize BaseSVGFactory.")}create(n,d){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(n<=0||d<=0)throw new Error("Invalid SVG dimensions");const f=this._createSVG("svg:svg");return f.setAttribute("version","1.1"),h||(f.setAttribute("width",`${n}px`),f.setAttribute("height",`${d}px`)),f.setAttribute("preserveAspectRatio","none"),f.setAttribute("viewBox",`0 0 ${n} ${d}`),f}createElement(n){if(typeof n!="string")throw new Error("Invalid SVG element type");return this._createSVG(n)}_createSVG(n){(0,p.unreachable)("Abstract method `_createSVG` called.")}}w.BaseSVGFactory=e},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.MurmurHash3_64=void 0,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(2);var p=t(1);const y=3285377520,k=4294901760,u=65535;class g{constructor(i){this.h1=i?i&4294967295:y,this.h2=i?i&4294967295:y}update(i){let n,d;if(typeof i=="string"){n=new Uint8Array(i.length*2),d=0;for(let x=0,T=i.length;x<T;x++){const S=i.charCodeAt(x);S<=255?n[d++]=S:(n[d++]=S>>>8,n[d++]=S&255)}}else if((0,p.isArrayBuffer)(i))n=i.slice(),d=n.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const h=d>>2,f=d-h*4,a=new Uint32Array(n.buffer,0,h);let r=0,o=0,m=this.h1,v=this.h2;const A=3432918353,b=461845907,c=A&u,s=b&u;for(let x=0;x<h;x++)x&1?(r=a[x],r=r*A&k|r*c&u,r=r<<15|r>>>17,r=r*b&k|r*s&u,m^=r,m=m<<13|m>>>19,m=m*5+3864292196):(o=a[x],o=o*A&k|o*c&u,o=o<<15|o>>>17,o=o*b&k|o*s&u,v^=o,v=v<<13|v>>>19,v=v*5+3864292196);switch(r=0,f){case 3:r^=n[h*4+2]<<16;case 2:r^=n[h*4+1]<<8;case 1:r^=n[h*4],r=r*A&k|r*c&u,r=r<<15|r>>>17,r=r*b&k|r*s&u,h&1?m^=r:v^=r}this.h1=m,this.h2=v}hexdigest(){let i=this.h1,n=this.h2;return i^=n>>>1,i=i*3981806797&k|i*36045&u,n=n*4283543511&k|((n<<16|i>>>16)*2950163797&k)>>>16,i^=n>>>1,i=i*444984403&k|i*60499&u,n=n*3301882366&k|((n<<16|i>>>16)*3120437893&k)>>>16,i^=n>>>1,(i>>>0).toString(16).padStart(8,"0")+(n>>>0).toString(16).padStart(8,"0")}}w.MurmurHash3_64=g},(N,w,t)=>{var u;Object.defineProperty(w,"__esModule",{value:!0}),w.FontLoader=w.FontFaceObject=void 0,t(125),t(136),t(138),t(141),t(143),t(145),t(147),t(89),t(149);var p=t(1);class y{constructor(e){$(this,u,new Set);let{ownerDocument:i=globalThis.document,styleElement:n=null}=e;this._document=i,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const i=this.styleElement.sheet;i.insertRule(e,i.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),l(this,u).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(e){if(!(!e||l(this,u).has(e.loadedName))){if((0,p.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:n,style:d}=e,h=new FontFace(i,n,d);this.addNativeFontFace(h);try{await h.load(),l(this,u).add(i)}catch{(0,p.warn)(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(h)}return}(0,p.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e.systemFontInfo);return}if(this.isFontLoadingAPISupported){const n=e.createNativeFontFace();if(n){this.addNativeFontFace(n);try{await n.loaded}catch(d){throw(0,p.warn)(`Failed to load font '${n.family}': '${d}'.`),e.disableFontFace=!0,d}}return}const i=e.createFontFaceRule();if(i){if(this.insertRule(i),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const d=this._queueLoadingCallback(n);this._prepareFontLoadEvent(e,d)})}}get isFontLoadingAPISupported(){var i;const e=!!((i=this._document)!=null&&i.fonts);return(0,p.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){let e=!1;return(p.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,p.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){function i(){for((0,p.assert)(!d.done,"completeRequest() cannot be called twice."),d.done=!0;n.length>0&&n[0].done;){const h=n.shift();setTimeout(h.callback,0)}}const{loadingRequests:n}=this,d={done:!1,complete:i,callback:e};return n.push(d),d}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,p.shadow)(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,i){function n(I,_){return I.charCodeAt(_)<<24|I.charCodeAt(_+1)<<16|I.charCodeAt(_+2)<<8|I.charCodeAt(_+3)&255}function d(I,_,Q,W){const j=I.substring(0,_),he=I.substring(_+Q);return j+W+he}let h,f;const a=this._document.createElement("canvas");a.width=1,a.height=1;const r=a.getContext("2d");let o=0;function m(I,_){if(++o>30){(0,p.warn)("Load test font never loaded."),_();return}if(r.font="30px "+I,r.fillText(".",0,20),r.getImageData(0,0,1,1).data[3]>0){_();return}setTimeout(m.bind(null,I,_))}const v=`lt${Date.now()}${this.loadTestFontId++}`;let A=this._loadTestFont;A=d(A,976,v.length,v);const c=16,s=1482184792;let x=n(A,c);for(h=0,f=v.length-3;h<f;h+=4)x=x-s+n(v,h)|0;h<v.length&&(x=x-s+n(v+"XXX",h)|0),A=d(A,c,4,(0,p.string32)(x));const T=`url(data:font/opentype;base64,${btoa(A)});`,S=`@font-face {font-family:"${v}";src:${T}}`;this.insertRule(S);const D=this._document.createElement("div");D.style.visibility="hidden",D.style.width=D.style.height="10px",D.style.position="absolute",D.style.top=D.style.left="0px";for(const I of[e.loadedName,v]){const _=this._document.createElement("span");_.textContent="Hi",_.style.fontFamily=I,D.append(_)}this._document.body.append(D),m(v,()=>{D.remove(),i.complete()})}}u=new WeakMap,w.FontLoader=y;class k{constructor(e,i){let{isEvalSupported:n=!0,disableFontFace:d=!1,ignoreErrors:h=!1,inspectFont:f=null}=i;this.compiledGlyphs=Object.create(null);for(const a in e)this[a]=e[a];this.isEvalSupported=n!==!1,this.disableFontFace=d===!0,this.ignoreErrors=h===!0,this._inspectFont=f}createNativeFontFace(){var i;if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{const n={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(n.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,n)}return(i=this._inspectFont)==null||i.call(this,this),e}createFontFaceRule(){var d;if(!this.data||this.disableFontFace)return null;const e=(0,p.bytesToString)(this.data),i=`url(data:${this.mimetype};base64,${btoa(e)});`;let n;if(!this.cssFontInfo)n=`@font-face {font-family:"${this.loadedName}";src:${i}}`;else{let h=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(h+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${h}src:${i}}`}return(d=this._inspectFont)==null||d.call(this,this,i),n}getPathGenerator(e,i){if(this.compiledGlyphs[i]!==void 0)return this.compiledGlyphs[i];let n;try{n=e.get(this.loadedName+"_path_"+i)}catch(d){if(!this.ignoreErrors)throw d;return(0,p.warn)(`getPathGenerator - ignoring character: "${d}".`),this.compiledGlyphs[i]=function(h,f){}}if(this.isEvalSupported&&p.FeatureTest.isEvalSupported){const d=[];for(const h of n){const f=h.args!==void 0?h.args.join(","):"";d.push("c.",h.cmd,"(",f,`);
`)}return this.compiledGlyphs[i]=new Function("c","size",d.join(""))}return this.compiledGlyphs[i]=function(d,h){for(const f of n)f.cmd==="scale"&&(f.args=[h,-h]),d[f.cmd].apply(d,f.args)}}}w.FontFaceObject=k},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.NodeStandardFontDataFactory=w.NodeFilterFactory=w.NodeCanvasFactory=w.NodeCMapReaderFactory=void 0,t(2),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);var p=t(169),y=t(1);(function(){if(!(globalThis.DOMMatrix||!y.isNodeJS))try{globalThis.DOMMatrix=require$$6.DOMMatrix}catch(d){(0,y.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${d}".`)}})(),function(){if(!(globalThis.Path2D||!y.isNodeJS))try{const{CanvasRenderingContext2D:d}=require$$6,{polyfillPath2D:h}=requirePath2dPolyfill_esm();globalThis.CanvasRenderingContext2D=d,h(globalThis)}catch(d){(0,y.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${d}".`)}}();const k=function(n){return new Promise((d,h)=>{require$$6.readFile(n,(a,r)=>{if(a||!r){h(new Error(a));return}d(new Uint8Array(r))})})};class u extends p.BaseFilterFactory{}w.NodeFilterFactory=u;class g extends p.BaseCanvasFactory{_createCanvas(d,h){return require$$6.createCanvas(d,h)}}w.NodeCanvasFactory=g;class e extends p.BaseCMapReaderFactory{_fetchData(d,h){return k(d).then(f=>({cMapData:f,compressionType:h}))}}w.NodeCMapReaderFactory=e;class i extends p.BaseStandardFontDataFactory{_fetchData(d){return k(d)}}w.NodeStandardFontDataFactory=i},(N,w,t)=>{var z,un,oe,dn;Object.defineProperty(w,"__esModule",{value:!0}),w.CanvasGraphics=void 0,t(2),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89);var p=t(1),y=t(168),k=t(174),u=t(175);const g=16,e=100,i=4096,n=15,d=10,h=1e3,f=16;function a(L,P){if(L._removeMirroring)throw new Error("Context is already forwarding operations.");L.__originalSave=L.save,L.__originalRestore=L.restore,L.__originalRotate=L.rotate,L.__originalScale=L.scale,L.__originalTranslate=L.translate,L.__originalTransform=L.transform,L.__originalSetTransform=L.setTransform,L.__originalResetTransform=L.resetTransform,L.__originalClip=L.clip,L.__originalMoveTo=L.moveTo,L.__originalLineTo=L.lineTo,L.__originalBezierCurveTo=L.bezierCurveTo,L.__originalRect=L.rect,L.__originalClosePath=L.closePath,L.__originalBeginPath=L.beginPath,L._removeMirroring=()=>{L.save=L.__originalSave,L.restore=L.__originalRestore,L.rotate=L.__originalRotate,L.scale=L.__originalScale,L.translate=L.__originalTranslate,L.transform=L.__originalTransform,L.setTransform=L.__originalSetTransform,L.resetTransform=L.__originalResetTransform,L.clip=L.__originalClip,L.moveTo=L.__originalMoveTo,L.lineTo=L.__originalLineTo,L.bezierCurveTo=L.__originalBezierCurveTo,L.rect=L.__originalRect,L.closePath=L.__originalClosePath,L.beginPath=L.__originalBeginPath,delete L._removeMirroring},L.save=function(){P.save(),this.__originalSave()},L.restore=function(){P.restore(),this.__originalRestore()},L.translate=function(E,R){P.translate(E,R),this.__originalTranslate(E,R)},L.scale=function(E,R){P.scale(E,R),this.__originalScale(E,R)},L.transform=function(E,R,O,B,F,Z){P.transform(E,R,O,B,F,Z),this.__originalTransform(E,R,O,B,F,Z)},L.setTransform=function(E,R,O,B,F,Z){P.setTransform(E,R,O,B,F,Z),this.__originalSetTransform(E,R,O,B,F,Z)},L.resetTransform=function(){P.resetTransform(),this.__originalResetTransform()},L.rotate=function(E){P.rotate(E),this.__originalRotate(E)},L.clip=function(E){P.clip(E),this.__originalClip(E)},L.moveTo=function(M,E){P.moveTo(M,E),this.__originalMoveTo(M,E)},L.lineTo=function(M,E){P.lineTo(M,E),this.__originalLineTo(M,E)},L.bezierCurveTo=function(M,E,R,O,B,F){P.bezierCurveTo(M,E,R,O,B,F),this.__originalBezierCurveTo(M,E,R,O,B,F)},L.rect=function(M,E,R,O){P.rect(M,E,R,O),this.__originalRect(M,E,R,O)},L.closePath=function(){P.closePath(),this.__originalClosePath()},L.beginPath=function(){P.beginPath(),this.__originalBeginPath()}}class r{constructor(P){this.canvasFactory=P,this.cache=Object.create(null)}getCanvas(P,M,E){let R;return this.cache[P]!==void 0?(R=this.cache[P],this.canvasFactory.reset(R,M,E)):(R=this.canvasFactory.create(M,E),this.cache[P]=R),R}delete(P){delete this.cache[P]}clear(){for(const P in this.cache){const M=this.cache[P];this.canvasFactory.destroy(M),delete this.cache[P]}}}function o(L,P,M,E,R,O,B,F,Z,se){const[q,pe,te,me,ve,Re]=(0,y.getCurrentTransform)(L);if(pe===0&&te===0){const Le=B*q+ve,ue=Math.round(Le),ne=F*me+Re,ce=Math.round(ne),ge=(B+Z)*q+ve,Ce=Math.abs(Math.round(ge)-ue)||1,Me=(F+se)*me+Re,Ve=Math.abs(Math.round(Me)-ce)||1;return L.setTransform(Math.sign(q),0,0,Math.sign(me),ue,ce),L.drawImage(P,M,E,R,O,0,0,Ce,Ve),L.setTransform(q,pe,te,me,ve,Re),[Ce,Ve]}if(q===0&&me===0){const Le=F*te+ve,ue=Math.round(Le),ne=B*pe+Re,ce=Math.round(ne),ge=(F+se)*te+ve,Ce=Math.abs(Math.round(ge)-ue)||1,Me=(B+Z)*pe+Re,Ve=Math.abs(Math.round(Me)-ce)||1;return L.setTransform(0,Math.sign(pe),Math.sign(te),0,ue,ce),L.drawImage(P,M,E,R,O,0,0,Ve,Ce),L.setTransform(q,pe,te,me,ve,Re),[Ve,Ce]}L.drawImage(P,M,E,R,O,B,F,Z,se);const Oe=Math.hypot(q,pe),Ie=Math.hypot(te,me);return[Oe*Z,Ie*se]}function m(L){const{width:P,height:M}=L;if(P>h||M>h)return null;const E=1e3,R=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),O=P+1;let B=new Uint8Array(O*(M+1)),F,Z,se;const q=P+7&-8;let pe=new Uint8Array(q*M),te=0;for(const Ie of L.data){let Le=128;for(;Le>0;)pe[te++]=Ie&Le?0:255,Le>>=1}let me=0;for(te=0,pe[te]!==0&&(B[0]=1,++me),Z=1;Z<P;Z++)pe[te]!==pe[te+1]&&(B[Z]=pe[te]?2:1,++me),te++;for(pe[te]!==0&&(B[Z]=2,++me),F=1;F<M;F++){te=F*q,se=F*O,pe[te-q]!==pe[te]&&(B[se]=pe[te]?1:8,++me);let Ie=(pe[te]?4:0)+(pe[te-q]?8:0);for(Z=1;Z<P;Z++)Ie=(Ie>>2)+(pe[te+1]?4:0)+(pe[te-q+1]?8:0),R[Ie]&&(B[se+Z]=R[Ie],++me),te++;if(pe[te-q]!==pe[te]&&(B[se+Z]=pe[te]?2:4,++me),me>E)return null}for(te=q*(M-1),se=F*O,pe[te]!==0&&(B[se]=8,++me),Z=1;Z<P;Z++)pe[te]!==pe[te+1]&&(B[se+Z]=pe[te]?4:8,++me),te++;if(pe[te]!==0&&(B[se+Z]=4,++me),me>E)return null;const ve=new Int32Array([0,O,-1,0,-O,0,0,0,1]),Re=new Path2D;for(F=0;me&&F<=M;F++){let Ie=F*O;const Le=Ie+P;for(;Ie<Le&&!B[Ie];)Ie++;if(Ie===Le)continue;Re.moveTo(Ie%O,F);const ue=Ie;let ne=B[Ie];do{const ce=ve[ne];do Ie+=ce;while(!B[Ie]);const ge=B[Ie];ge!==5&&ge!==10?(ne=ge,B[Ie]=0):(ne=ge&51*ne>>4,B[Ie]&=ne>>2|ne<<2),Re.lineTo(Ie%O,Ie/O|0),B[Ie]||--me}while(ue!==Ie);--F}return pe=null,B=null,function(Ie){Ie.save(),Ie.scale(1/P,-1/M),Ie.translate(0,-M),Ie.fill(Re),Ie.beginPath(),Ie.restore()}}class v{constructor(P,M){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=p.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=p.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=p.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,P,M])}clone(){const P=Object.create(this);return P.clipBox=this.clipBox.slice(),P}setCurrentPoint(P,M){this.x=P,this.y=M}updatePathMinMax(P,M,E){[M,E]=p.Util.applyTransform([M,E],P),this.minX=Math.min(this.minX,M),this.minY=Math.min(this.minY,E),this.maxX=Math.max(this.maxX,M),this.maxY=Math.max(this.maxY,E)}updateRectMinMax(P,M){const E=p.Util.applyTransform(M,P),R=p.Util.applyTransform(M.slice(2),P);this.minX=Math.min(this.minX,E[0],R[0]),this.minY=Math.min(this.minY,E[1],R[1]),this.maxX=Math.max(this.maxX,E[0],R[0]),this.maxY=Math.max(this.maxY,E[1],R[1])}updateScalingPathMinMax(P,M){p.Util.scaleMinMax(P,M),this.minX=Math.min(this.minX,M[0]),this.maxX=Math.max(this.maxX,M[1]),this.minY=Math.min(this.minY,M[2]),this.maxY=Math.max(this.maxY,M[3])}updateCurvePathMinMax(P,M,E,R,O,B,F,Z,se,q){const pe=p.Util.bezierBoundingBox(M,E,R,O,B,F,Z,se);if(q){q[0]=Math.min(q[0],pe[0],pe[2]),q[1]=Math.max(q[1],pe[0],pe[2]),q[2]=Math.min(q[2],pe[1],pe[3]),q[3]=Math.max(q[3],pe[1],pe[3]);return}this.updateRectMinMax(P,pe)}getPathBoundingBox(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k.PathType.FILL,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const E=[this.minX,this.minY,this.maxX,this.maxY];if(P===k.PathType.STROKE){M||(0,p.unreachable)("Stroke bounding box must include transform.");const R=p.Util.singularValueDecompose2dScale(M),O=R[0]*this.lineWidth/2,B=R[1]*this.lineWidth/2;E[0]-=O,E[1]-=B,E[2]+=O,E[3]+=B}return E}updateClipFromPath(){const P=p.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(P||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(P){this.clipBox=P,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k.PathType.FILL,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.Util.intersect(this.clipBox,this.getPathBoundingBox(P,M))}}function A(L,P){if(typeof ImageData<"u"&&P instanceof ImageData){L.putImageData(P,0,0);return}const M=P.height,E=P.width,R=M%f,O=(M-R)/f,B=R===0?O:O+1,F=L.createImageData(E,f);let Z=0,se;const q=P.data,pe=F.data;let te,me,ve,Re;if(P.kind===p.ImageKind.GRAYSCALE_1BPP){const Oe=q.byteLength,Ie=new Uint32Array(pe.buffer,0,pe.byteLength>>2),Le=Ie.length,ue=E+7>>3,ne=4294967295,ce=p.FeatureTest.isLittleEndian?4278190080:255;for(te=0;te<B;te++){for(ve=te<O?f:R,se=0,me=0;me<ve;me++){const ge=Oe-Z;let Ce=0;const Me=ge>ue?E:ge*8-7,Ve=Me&-8;let ze=0,_e=0;for(;Ce<Ve;Ce+=8)_e=q[Z++],Ie[se++]=_e&128?ne:ce,Ie[se++]=_e&64?ne:ce,Ie[se++]=_e&32?ne:ce,Ie[se++]=_e&16?ne:ce,Ie[se++]=_e&8?ne:ce,Ie[se++]=_e&4?ne:ce,Ie[se++]=_e&2?ne:ce,Ie[se++]=_e&1?ne:ce;for(;Ce<Me;Ce++)ze===0&&(_e=q[Z++],ze=128),Ie[se++]=_e&ze?ne:ce,ze>>=1}for(;se<Le;)Ie[se++]=0;L.putImageData(F,0,te*f)}}else if(P.kind===p.ImageKind.RGBA_32BPP){for(me=0,Re=E*f*4,te=0;te<O;te++)pe.set(q.subarray(Z,Z+Re)),Z+=Re,L.putImageData(F,0,me),me+=f;te<B&&(Re=E*R*4,pe.set(q.subarray(Z,Z+Re)),L.putImageData(F,0,me))}else if(P.kind===p.ImageKind.RGB_24BPP)for(ve=f,Re=E*ve,te=0;te<B;te++){for(te>=O&&(ve=R,Re=E*ve),se=0,me=Re;me--;)pe[se++]=q[Z++],pe[se++]=q[Z++],pe[se++]=q[Z++],pe[se++]=255;L.putImageData(F,0,te*f)}else throw new Error(`bad image kind: ${P.kind}`)}function b(L,P){if(P.bitmap){L.drawImage(P.bitmap,0,0);return}const M=P.height,E=P.width,R=M%f,O=(M-R)/f,B=R===0?O:O+1,F=L.createImageData(E,f);let Z=0;const se=P.data,q=F.data;for(let pe=0;pe<B;pe++){const te=pe<O?f:R;({srcPos:Z}=(0,u.convertBlackAndWhiteToRGBA)({src:se,srcPos:Z,dest:q,width:E,height:te,nonBlackColor:0})),L.putImageData(F,0,pe*f)}}function c(L,P){const M=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const E of M)L[E]!==void 0&&(P[E]=L[E]);L.setLineDash!==void 0&&(P.setLineDash(L.getLineDash()),P.lineDashOffset=L.lineDashOffset)}function s(L){if(L.strokeStyle=L.fillStyle="#000000",L.fillRule="nonzero",L.globalAlpha=1,L.lineWidth=1,L.lineCap="butt",L.lineJoin="miter",L.miterLimit=10,L.globalCompositeOperation="source-over",L.font="10px sans-serif",L.setLineDash!==void 0&&(L.setLineDash([]),L.lineDashOffset=0),!p.isNodeJS){const{filter:P}=L;P!=="none"&&P!==""&&(L.filter="none")}}function x(L,P,M,E){const R=L.length;for(let O=3;O<R;O+=4){const B=L[O];if(B===0)L[O-3]=P,L[O-2]=M,L[O-1]=E;else if(B<255){const F=255-B;L[O-3]=L[O-3]*B+P*F>>8,L[O-2]=L[O-2]*B+M*F>>8,L[O-1]=L[O-1]*B+E*F>>8}}}function T(L,P,M){const E=L.length,R=1/255;for(let O=3;O<E;O+=4){const B=M?M[L[O]]:L[O];P[O]=P[O]*B*R|0}}function S(L,P,M){const E=L.length;for(let R=3;R<E;R+=4){const O=L[R-3]*77+L[R-2]*152+L[R-1]*28;P[R]=M?P[R]*M[O>>8]>>8:P[R]*O>>16}}function D(L,P,M,E,R,O,B,F,Z,se,q){const pe=!!O,te=pe?O[0]:0,me=pe?O[1]:0,ve=pe?O[2]:0,Re=R==="Luminosity"?S:T,Ie=Math.min(E,Math.ceil(1048576/M));for(let Le=0;Le<E;Le+=Ie){const ue=Math.min(Ie,E-Le),ne=L.getImageData(F-se,Le+(Z-q),M,ue),ce=P.getImageData(F,Le+Z,M,ue);pe&&x(ne.data,te,me,ve),Re(ne.data,ce.data,B),P.putImageData(ce,F,Le+Z)}}function I(L,P,M,E){const R=E[0],O=E[1],B=E[2]-R,F=E[3]-O;B===0||F===0||(D(P.context,M,B,F,P.subtype,P.backdrop,P.transferMap,R,O,P.offsetX,P.offsetY),L.save(),L.globalAlpha=1,L.globalCompositeOperation="source-over",L.setTransform(1,0,0,1,0,0),L.drawImage(M.canvas,0,0),L.restore())}function _(L,P){const M=p.Util.singularValueDecompose2dScale(L);M[0]=Math.fround(M[0]),M[1]=Math.fround(M[1]);const E=Math.fround((globalThis.devicePixelRatio||1)*y.PixelsPerInch.PDF_TO_CSS_UNITS);return P!==void 0?P:M[0]<=E||M[1]<=E}const Q=["butt","round","square"],W=["miter","round","bevel"],j={},he={},Pe=class Pe{constructor(P,M,E,R,O,B,F,Z){$(this,z);$(this,oe);let{optionalContentConfig:se,markedContentStack:q=null}=B;this.ctx=P,this.current=new v(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=M,this.objs=E,this.canvasFactory=R,this.filterFactory=O,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=q||[],this.optionalContentConfig=se,this.cachedCanvases=new r(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=F,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=Z,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(P){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof P=="string"?P.startsWith("g_")?this.commonObjs.get(P):this.objs.get(P):M}beginDrawing(P){let{transform:M,viewport:E,transparency:R=!1,background:O=null}=P;const B=this.ctx.canvas.width,F=this.ctx.canvas.height,Z=this.ctx.fillStyle;if(this.ctx.fillStyle=O||"#ffffff",this.ctx.fillRect(0,0,B,F),this.ctx.fillStyle=Z,R){const se=this.cachedCanvases.getCanvas("transparent",B,F);this.compositeCtx=this.ctx,this.transparentCanvas=se.canvas,this.ctx=se.context,this.ctx.save(),this.ctx.transform(...(0,y.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),s(this.ctx),M&&(this.ctx.transform(...M),this.outputScaleX=M[0],this.outputScaleY=M[0]),this.ctx.transform(...E.transform),this.viewportScale=E.scale,this.baseTransform=(0,y.getCurrentTransform)(this.ctx)}executeOperatorList(P,M,E,R){const O=P.argsArray,B=P.fnArray;let F=M||0;const Z=O.length;if(Z===F)return F;const se=Z-F>d&&typeof E=="function",q=se?Date.now()+n:0;let pe=0;const te=this.commonObjs,me=this.objs;let ve;for(;;){if(R!==void 0&&F===R.nextBreakPoint)return R.breakIt(F,E),F;if(ve=B[F],ve!==p.OPS.dependency)this[ve].apply(this,O[F]);else for(const Re of O[F]){const Oe=Re.startsWith("g_")?te:me;if(!Oe.has(Re))return Oe.get(Re,E),F}if(F++,F===Z)return F;if(se&&++pe>d){if(Date.now()>q)return E(),F;pe=0}}}endDrawing(){J(this,z,un).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const P of this._cachedBitmapsMap.values()){for(const M of P.values())typeof HTMLCanvasElement<"u"&&M instanceof HTMLCanvasElement&&(M.width=M.height=0);P.clear()}this._cachedBitmapsMap.clear(),J(this,oe,dn).call(this)}_scaleImage(P,M){const E=P.width,R=P.height;let O=Math.max(Math.hypot(M[0],M[1]),1),B=Math.max(Math.hypot(M[2],M[3]),1),F=E,Z=R,se="prescale1",q,pe;for(;O>2&&F>1||B>2&&Z>1;){let te=F,me=Z;O>2&&F>1&&(te=F>=16384?Math.floor(F/2)-1||1:Math.ceil(F/2),O/=F/te),B>2&&Z>1&&(me=Z>=16384?Math.floor(Z/2)-1||1:Math.ceil(Z)/2,B/=Z/me),q=this.cachedCanvases.getCanvas(se,te,me),pe=q.context,pe.clearRect(0,0,te,me),pe.drawImage(P,0,0,F,Z,0,0,te,me),P=q.canvas,F=te,Z=me,se=se==="prescale1"?"prescale2":"prescale1"}return{img:P,paintWidth:F,paintHeight:Z}}_createMaskCanvas(P){const M=this.ctx,{width:E,height:R}=P,O=this.current.fillColor,B=this.current.patternFill,F=(0,y.getCurrentTransform)(M);let Z,se,q,pe;if((P.bitmap||P.data)&&P.count>1){const Ce=P.bitmap||P.data.buffer;se=JSON.stringify(B?F:[F.slice(0,4),O]),Z=this._cachedBitmapsMap.get(Ce),Z||(Z=new Map,this._cachedBitmapsMap.set(Ce,Z));const Me=Z.get(se);if(Me&&!B){const Ve=Math.round(Math.min(F[0],F[2])+F[4]),ze=Math.round(Math.min(F[1],F[3])+F[5]);return{canvas:Me,offsetX:Ve,offsetY:ze}}q=Me}q||(pe=this.cachedCanvases.getCanvas("maskCanvas",E,R),b(pe.context,P));let te=p.Util.transform(F,[1/E,0,0,-1/R,0,0]);te=p.Util.transform(te,[1,0,0,1,0,-R]);const me=p.Util.applyTransform([0,0],te),ve=p.Util.applyTransform([E,R],te),Re=p.Util.normalizeRect([me[0],me[1],ve[0],ve[1]]),Oe=Math.round(Re[2]-Re[0])||1,Ie=Math.round(Re[3]-Re[1])||1,Le=this.cachedCanvases.getCanvas("fillCanvas",Oe,Ie),ue=Le.context,ne=Math.min(me[0],ve[0]),ce=Math.min(me[1],ve[1]);ue.translate(-ne,-ce),ue.transform(...te),q||(q=this._scaleImage(pe.canvas,(0,y.getCurrentTransformInverse)(ue)),q=q.img,Z&&B&&Z.set(se,q)),ue.imageSmoothingEnabled=_((0,y.getCurrentTransform)(ue),P.interpolate),o(ue,q,0,0,q.width,q.height,0,0,E,R),ue.globalCompositeOperation="source-in";const ge=p.Util.transform((0,y.getCurrentTransformInverse)(ue),[1,0,0,1,-ne,-ce]);return ue.fillStyle=B?O.getPattern(M,this,ge,k.PathType.FILL):O,ue.fillRect(0,0,E,R),Z&&!B&&(this.cachedCanvases.delete("fillCanvas"),Z.set(se,Le.canvas)),{canvas:Le.canvas,offsetX:Math.round(ne),offsetY:Math.round(ce)}}setLineWidth(P){P!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=P,this.ctx.lineWidth=P}setLineCap(P){this.ctx.lineCap=Q[P]}setLineJoin(P){this.ctx.lineJoin=W[P]}setMiterLimit(P){this.ctx.miterLimit=P}setDash(P,M){const E=this.ctx;E.setLineDash!==void 0&&(E.setLineDash(P),E.lineDashOffset=M)}setRenderingIntent(P){}setFlatness(P){}setGState(P){for(const[M,E]of P)switch(M){case"LW":this.setLineWidth(E);break;case"LC":this.setLineCap(E);break;case"LJ":this.setLineJoin(E);break;case"ML":this.setMiterLimit(E);break;case"D":this.setDash(E[0],E[1]);break;case"RI":this.setRenderingIntent(E);break;case"FL":this.setFlatness(E);break;case"Font":this.setFont(E[0],E[1]);break;case"CA":this.current.strokeAlpha=E;break;case"ca":this.current.fillAlpha=E,this.ctx.globalAlpha=E;break;case"BM":this.ctx.globalCompositeOperation=E;break;case"SMask":this.current.activeSMask=E?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(E);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const P=this.inSMaskMode;this.current.activeSMask&&!P?this.beginSMaskMode():!this.current.activeSMask&&P&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const P=this.ctx.canvas.width,M=this.ctx.canvas.height,E="smaskGroupAt"+this.groupLevel,R=this.cachedCanvases.getCanvas(E,P,M);this.suspendedCtx=this.ctx,this.ctx=R.context;const O=this.ctx;O.setTransform(...(0,y.getCurrentTransform)(this.suspendedCtx)),c(this.suspendedCtx,O),a(O,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),c(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(P){if(!this.current.activeSMask)return;P?(P[0]=Math.floor(P[0]),P[1]=Math.floor(P[1]),P[2]=Math.ceil(P[2]),P[3]=Math.ceil(P[3])):P=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const M=this.current.activeSMask,E=this.suspendedCtx;I(E,M,this.ctx,P),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(c(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const P=this.current;this.stateStack.push(P),this.current=P.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),c(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(P,M,E,R,O,B){this.ctx.transform(P,M,E,R,O,B),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(P,M,E){const R=this.ctx,O=this.current;let B=O.x,F=O.y,Z,se;const q=(0,y.getCurrentTransform)(R),pe=q[0]===0&&q[3]===0||q[1]===0&&q[2]===0,te=pe?E.slice(0):null;for(let me=0,ve=0,Re=P.length;me<Re;me++)switch(P[me]|0){case p.OPS.rectangle:B=M[ve++],F=M[ve++];const Oe=M[ve++],Ie=M[ve++],Le=B+Oe,ue=F+Ie;R.moveTo(B,F),Oe===0||Ie===0?R.lineTo(Le,ue):(R.lineTo(Le,F),R.lineTo(Le,ue),R.lineTo(B,ue)),pe||O.updateRectMinMax(q,[B,F,Le,ue]),R.closePath();break;case p.OPS.moveTo:B=M[ve++],F=M[ve++],R.moveTo(B,F),pe||O.updatePathMinMax(q,B,F);break;case p.OPS.lineTo:B=M[ve++],F=M[ve++],R.lineTo(B,F),pe||O.updatePathMinMax(q,B,F);break;case p.OPS.curveTo:Z=B,se=F,B=M[ve+4],F=M[ve+5],R.bezierCurveTo(M[ve],M[ve+1],M[ve+2],M[ve+3],B,F),O.updateCurvePathMinMax(q,Z,se,M[ve],M[ve+1],M[ve+2],M[ve+3],B,F,te),ve+=6;break;case p.OPS.curveTo2:Z=B,se=F,R.bezierCurveTo(B,F,M[ve],M[ve+1],M[ve+2],M[ve+3]),O.updateCurvePathMinMax(q,Z,se,B,F,M[ve],M[ve+1],M[ve+2],M[ve+3],te),B=M[ve+2],F=M[ve+3],ve+=4;break;case p.OPS.curveTo3:Z=B,se=F,B=M[ve+2],F=M[ve+3],R.bezierCurveTo(M[ve],M[ve+1],B,F,B,F),O.updateCurvePathMinMax(q,Z,se,M[ve],M[ve+1],B,F,B,F,te),ve+=4;break;case p.OPS.closePath:R.closePath();break}pe&&O.updateScalingPathMinMax(q,te),O.setCurrentPoint(B,F)}closePath(){this.ctx.closePath()}stroke(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const M=this.ctx,E=this.current.strokeColor;M.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof E=="object"&&(E!=null&&E.getPattern)?(M.save(),M.strokeStyle=E.getPattern(M,this,(0,y.getCurrentTransformInverse)(M),k.PathType.STROKE),this.rescaleAndStroke(!1),M.restore()):this.rescaleAndStroke(!0)),P&&this.consumePath(this.current.getClippedPathBoundingBox()),M.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const M=this.ctx,E=this.current.fillColor,R=this.current.patternFill;let O=!1;R&&(M.save(),M.fillStyle=E.getPattern(M,this,(0,y.getCurrentTransformInverse)(M),k.PathType.FILL),O=!0);const B=this.current.getClippedPathBoundingBox();this.contentVisible&&B!==null&&(this.pendingEOFill?(M.fill("evenodd"),this.pendingEOFill=!1):M.fill()),O&&M.restore(),P&&this.consumePath(B)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=j}eoClip(){this.pendingClip=he}beginText(){this.current.textMatrix=p.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const P=this.pendingTextPaths,M=this.ctx;if(P===void 0){M.beginPath();return}M.save(),M.beginPath();for(const E of P)M.setTransform(...E.transform),M.translate(E.x,E.y),E.addToPath(M,E.fontSize);M.restore(),M.clip(),M.beginPath(),delete this.pendingTextPaths}setCharSpacing(P){this.current.charSpacing=P}setWordSpacing(P){this.current.wordSpacing=P}setHScale(P){this.current.textHScale=P/100}setLeading(P){this.current.leading=-P}setFont(P,M){var q;const E=this.commonObjs.get(P),R=this.current;if(!E)throw new Error(`Can't find font for ${P}`);if(R.fontMatrix=E.fontMatrix||p.FONT_IDENTITY_MATRIX,(R.fontMatrix[0]===0||R.fontMatrix[3]===0)&&(0,p.warn)("Invalid font matrix for font "+P),M<0?(M=-M,R.fontDirection=-1):R.fontDirection=1,this.current.font=E,this.current.fontSize=M,E.isType3Font)return;const O=E.loadedName||"sans-serif",B=((q=E.systemFontInfo)==null?void 0:q.css)||`"${O}", ${E.fallbackName}`;let F="normal";E.black?F="900":E.bold&&(F="bold");const Z=E.italic?"italic":"normal";let se=M;M<g?se=g:M>e&&(se=e),this.current.fontSizeScale=M/se,this.ctx.font=`${Z} ${F} ${se}px ${B}`}setTextRenderingMode(P){this.current.textRenderingMode=P}setTextRise(P){this.current.textRise=P}moveText(P,M){this.current.x=this.current.lineX+=P,this.current.y=this.current.lineY+=M}setLeadingMoveText(P,M){this.setLeading(-M),this.moveText(P,M)}setTextMatrix(P,M,E,R,O,B){this.current.textMatrix=[P,M,E,R,O,B],this.current.textMatrixScale=Math.hypot(P,M),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(P,M,E,R){const O=this.ctx,B=this.current,F=B.font,Z=B.textRenderingMode,se=B.fontSize/B.fontSizeScale,q=Z&p.TextRenderingMode.FILL_STROKE_MASK,pe=!!(Z&p.TextRenderingMode.ADD_TO_PATH_FLAG),te=B.patternFill&&!F.missingFile;let me;(F.disableFontFace||pe||te)&&(me=F.getPathGenerator(this.commonObjs,P)),F.disableFontFace||te?(O.save(),O.translate(M,E),O.beginPath(),me(O,se),R&&O.setTransform(...R),(q===p.TextRenderingMode.FILL||q===p.TextRenderingMode.FILL_STROKE)&&O.fill(),(q===p.TextRenderingMode.STROKE||q===p.TextRenderingMode.FILL_STROKE)&&O.stroke(),O.restore()):((q===p.TextRenderingMode.FILL||q===p.TextRenderingMode.FILL_STROKE)&&O.fillText(P,M,E),(q===p.TextRenderingMode.STROKE||q===p.TextRenderingMode.FILL_STROKE)&&O.strokeText(P,M,E)),pe&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,y.getCurrentTransform)(O),x:M,y:E,fontSize:se,addToPath:me})}get isFontSubpixelAAEnabled(){const{context:P}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);P.scale(1.5,1),P.fillText("I",0,10);const M=P.getImageData(0,0,10,10).data;let E=!1;for(let R=3;R<M.length;R+=4)if(M[R]>0&&M[R]<255){E=!0;break}return(0,p.shadow)(this,"isFontSubpixelAAEnabled",E)}showText(P){const M=this.current,E=M.font;if(E.isType3Font)return this.showType3Text(P);const R=M.fontSize;if(R===0)return;const O=this.ctx,B=M.fontSizeScale,F=M.charSpacing,Z=M.wordSpacing,se=M.fontDirection,q=M.textHScale*se,pe=P.length,te=E.vertical,me=te?1:-1,ve=E.defaultVMetrics,Re=R*M.fontMatrix[0],Oe=M.textRenderingMode===p.TextRenderingMode.FILL&&!E.disableFontFace&&!M.patternFill;O.save(),O.transform(...M.textMatrix),O.translate(M.x,M.y+M.textRise),se>0?O.scale(q,-1):O.scale(q,1);let Ie;if(M.patternFill){O.save();const ge=M.fillColor.getPattern(O,this,(0,y.getCurrentTransformInverse)(O),k.PathType.FILL);Ie=(0,y.getCurrentTransform)(O),O.restore(),O.fillStyle=ge}let Le=M.lineWidth;const ue=M.textMatrixScale;if(ue===0||Le===0){const ge=M.textRenderingMode&p.TextRenderingMode.FILL_STROKE_MASK;(ge===p.TextRenderingMode.STROKE||ge===p.TextRenderingMode.FILL_STROKE)&&(Le=this.getSinglePixelWidth())}else Le/=ue;if(B!==1&&(O.scale(B,B),Le/=B),O.lineWidth=Le,E.isInvalidPDFjsFont){const ge=[];let Ce=0;for(const Me of P)ge.push(Me.unicode),Ce+=Me.width;O.fillText(ge.join(""),0,0),M.x+=Ce*Re*q,O.restore(),this.compose();return}let ne=0,ce;for(ce=0;ce<pe;++ce){const ge=P[ce];if(typeof ge=="number"){ne+=me*ge*R/1e3;continue}let Ce=!1;const Me=(ge.isSpace?Z:0)+F,Ve=ge.fontChar,ze=ge.accent;let _e,He,Ke=ge.width;if(te){const je=ge.vmetric||ve,Je=-(ge.vmetric?je[1]:Ke*.5)*Re,V=je[2]*Re;Ke=je?-je[0]:Ke,_e=Je/B,He=(ne+V)/B}else _e=ne/B,He=0;if(E.remeasure&&Ke>0){const je=O.measureText(Ve).width*1e3/R*B;if(Ke<je&&this.isFontSubpixelAAEnabled){const Je=Ke/je;Ce=!0,O.save(),O.scale(Je,1),_e/=Je}else Ke!==je&&(_e+=(Ke-je)/2e3*R/B)}if(this.contentVisible&&(ge.isInFont||E.missingFile)){if(Oe&&!ze)O.fillText(Ve,_e,He);else if(this.paintChar(Ve,_e,He,Ie),ze){const je=_e+R*ze.offset.x/B,Je=He-R*ze.offset.y/B;this.paintChar(ze.fontChar,je,Je,Ie)}}const Xe=te?Ke*Re-Me*se:Ke*Re+Me*se;ne+=Xe,Ce&&O.restore()}te?M.y-=ne:M.x+=ne*q,O.restore(),this.compose()}showType3Text(P){const M=this.ctx,E=this.current,R=E.font,O=E.fontSize,B=E.fontDirection,F=R.vertical?1:-1,Z=E.charSpacing,se=E.wordSpacing,q=E.textHScale*B,pe=E.fontMatrix||p.FONT_IDENTITY_MATRIX,te=P.length,me=E.textRenderingMode===p.TextRenderingMode.INVISIBLE;let ve,Re,Oe,Ie;if(!(me||O===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,M.save(),M.transform(...E.textMatrix),M.translate(E.x,E.y),M.scale(q,B),ve=0;ve<te;++ve){if(Re=P[ve],typeof Re=="number"){Ie=F*Re*O/1e3,this.ctx.translate(Ie,0),E.x+=Ie*q;continue}const Le=(Re.isSpace?se:0)+Z,ue=R.charProcOperatorList[Re.operatorListId];if(!ue){(0,p.warn)(`Type3 character "${Re.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=Re,this.save(),M.scale(O,O),M.transform(...pe),this.executeOperatorList(ue),this.restore()),Oe=p.Util.applyTransform([Re.width,0],pe)[0]*O+Le,M.translate(Oe,0),E.x+=Oe*q}M.restore(),this.processingType3=null}}setCharWidth(P,M){}setCharWidthAndBounds(P,M,E,R,O,B){this.ctx.rect(E,R,O-E,B-R),this.ctx.clip(),this.endPath()}getColorN_Pattern(P){let M;if(P[0]==="TilingPattern"){const E=P[1],R=this.baseTransform||(0,y.getCurrentTransform)(this.ctx),O={createCanvasGraphics:B=>new Pe(B,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};M=new k.TilingPattern(P,E,this.ctx,O,R)}else M=this._getPattern(P[1],P[2]);return M}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(P,M,E){const R=p.Util.makeHexColor(P,M,E);this.ctx.strokeStyle=R,this.current.strokeColor=R}setFillRGBColor(P,M,E){const R=p.Util.makeHexColor(P,M,E);this.ctx.fillStyle=R,this.current.fillColor=R,this.current.patternFill=!1}_getPattern(P){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,E;return this.cachedPatterns.has(P)?E=this.cachedPatterns.get(P):(E=(0,k.getShadingPattern)(this.getObject(P)),this.cachedPatterns.set(P,E)),M&&(E.matrix=M),E}shadingFill(P){if(!this.contentVisible)return;const M=this.ctx;this.save();const E=this._getPattern(P);M.fillStyle=E.getPattern(M,this,(0,y.getCurrentTransformInverse)(M),k.PathType.SHADING);const R=(0,y.getCurrentTransformInverse)(M);if(R){const{width:O,height:B}=M.canvas,[F,Z,se,q]=p.Util.getAxialAlignedBoundingBox([0,0,O,B],R);this.ctx.fillRect(F,Z,se-F,q-Z)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,p.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,p.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(P,M){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(P)&&P.length===6&&this.transform(...P),this.baseTransform=(0,y.getCurrentTransform)(this.ctx),M)){const E=M[2]-M[0],R=M[3]-M[1];this.ctx.rect(M[0],M[1],E,R),this.current.updateRectMinMax((0,y.getCurrentTransform)(this.ctx),M),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(P){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const M=this.ctx;P.isolated||(0,p.info)("TODO: Support non-isolated groups."),P.knockout&&(0,p.warn)("Knockout groups not supported.");const E=(0,y.getCurrentTransform)(M);if(P.matrix&&M.transform(...P.matrix),!P.bbox)throw new Error("Bounding box is required.");let R=p.Util.getAxialAlignedBoundingBox(P.bbox,(0,y.getCurrentTransform)(M));const O=[0,0,M.canvas.width,M.canvas.height];R=p.Util.intersect(R,O)||[0,0,0,0];const B=Math.floor(R[0]),F=Math.floor(R[1]);let Z=Math.max(Math.ceil(R[2])-B,1),se=Math.max(Math.ceil(R[3])-F,1),q=1,pe=1;Z>i&&(q=Z/i,Z=i),se>i&&(pe=se/i,se=i),this.current.startNewPathAndClipBox([0,0,Z,se]);let te="groupAt"+this.groupLevel;P.smask&&(te+="_smask_"+this.smaskCounter++%2);const me=this.cachedCanvases.getCanvas(te,Z,se),ve=me.context;ve.scale(1/q,1/pe),ve.translate(-B,-F),ve.transform(...E),P.smask?this.smaskStack.push({canvas:me.canvas,context:ve,offsetX:B,offsetY:F,scaleX:q,scaleY:pe,subtype:P.smask.subtype,backdrop:P.smask.backdrop,transferMap:P.smask.transferMap||null,startTransformInverse:null}):(M.setTransform(1,0,0,1,0,0),M.translate(B,F),M.scale(q,pe),M.save()),c(M,ve),this.ctx=ve,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(M),this.groupLevel++}endGroup(P){if(!this.contentVisible)return;this.groupLevel--;const M=this.ctx,E=this.groupStack.pop();if(this.ctx=E,this.ctx.imageSmoothingEnabled=!1,P.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const R=(0,y.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...R);const O=p.Util.getAxialAlignedBoundingBox([0,0,M.canvas.width,M.canvas.height],R);this.ctx.drawImage(M.canvas,0,0),this.ctx.restore(),this.compose(O)}}beginAnnotation(P,M,E,R,O){if(J(this,z,un).call(this),s(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(M)&&M.length===4){const B=M[2]-M[0],F=M[3]-M[1];if(O&&this.annotationCanvasMap){E=E.slice(),E[4]-=M[0],E[5]-=M[1],M=M.slice(),M[0]=M[1]=0,M[2]=B,M[3]=F;const[Z,se]=p.Util.singularValueDecompose2dScale((0,y.getCurrentTransform)(this.ctx)),{viewportScale:q}=this,pe=Math.ceil(B*this.outputScaleX*q),te=Math.ceil(F*this.outputScaleY*q);this.annotationCanvas=this.canvasFactory.create(pe,te);const{canvas:me,context:ve}=this.annotationCanvas;this.annotationCanvasMap.set(P,me),this.annotationCanvas.savedCtx=this.ctx,this.ctx=ve,this.ctx.save(),this.ctx.setTransform(Z,0,0,-se,0,F*se),s(this.ctx)}else s(this.ctx),this.ctx.rect(M[0],M[1],B,F),this.ctx.clip(),this.endPath()}this.current=new v(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...E),this.transform(...R)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),J(this,oe,dn).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(P){if(!this.contentVisible)return;const M=P.count;P=this.getObject(P.data,P),P.count=M;const E=this.ctx,R=this.processingType3;if(R&&(R.compiled===void 0&&(R.compiled=m(P)),R.compiled)){R.compiled(E);return}const O=this._createMaskCanvas(P),B=O.canvas;E.save(),E.setTransform(1,0,0,1,0,0),E.drawImage(B,O.offsetX,O.offsetY),E.restore(),this.compose()}paintImageMaskXObjectRepeat(P,M){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,O=arguments.length>4?arguments[4]:void 0,B=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;P=this.getObject(P.data,P);const F=this.ctx;F.save();const Z=(0,y.getCurrentTransform)(F);F.transform(M,E,R,O,0,0);const se=this._createMaskCanvas(P);F.setTransform(1,0,0,1,se.offsetX-Z[4],se.offsetY-Z[5]);for(let q=0,pe=B.length;q<pe;q+=2){const te=p.Util.transform(Z,[M,E,R,O,B[q],B[q+1]]),[me,ve]=p.Util.applyTransform([0,0],te);F.drawImage(se.canvas,me,ve)}F.restore(),this.compose()}paintImageMaskXObjectGroup(P){if(!this.contentVisible)return;const M=this.ctx,E=this.current.fillColor,R=this.current.patternFill;for(const O of P){const{data:B,width:F,height:Z,transform:se}=O,q=this.cachedCanvases.getCanvas("maskCanvas",F,Z),pe=q.context;pe.save();const te=this.getObject(B,O);b(pe,te),pe.globalCompositeOperation="source-in",pe.fillStyle=R?E.getPattern(pe,this,(0,y.getCurrentTransformInverse)(M),k.PathType.FILL):E,pe.fillRect(0,0,F,Z),pe.restore(),M.save(),M.transform(...se),M.scale(1,-1),o(M,q.canvas,0,0,F,Z,0,-1,1,1),M.restore()}this.compose()}paintImageXObject(P){if(!this.contentVisible)return;const M=this.getObject(P);if(!M){(0,p.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject(M)}paintImageXObjectRepeat(P,M,E,R){if(!this.contentVisible)return;const O=this.getObject(P);if(!O){(0,p.warn)("Dependent image isn't ready yet");return}const B=O.width,F=O.height,Z=[];for(let se=0,q=R.length;se<q;se+=2)Z.push({transform:[M,0,0,E,R[se],R[se+1]],x:0,y:0,w:B,h:F});this.paintInlineImageXObjectGroup(O,Z)}applyTransferMapsToCanvas(P){return this.current.transferMaps!=="none"&&(P.filter=this.current.transferMaps,P.drawImage(P.canvas,0,0),P.filter="none"),P.canvas}applyTransferMapsToBitmap(P){if(this.current.transferMaps==="none")return P.bitmap;const{bitmap:M,width:E,height:R}=P,O=this.cachedCanvases.getCanvas("inlineImage",E,R),B=O.context;return B.filter=this.current.transferMaps,B.drawImage(M,0,0),B.filter="none",O.canvas}paintInlineImageXObject(P){if(!this.contentVisible)return;const M=P.width,E=P.height,R=this.ctx;if(this.save(),!p.isNodeJS){const{filter:F}=R;F!=="none"&&F!==""&&(R.filter="none")}R.scale(1/M,-1/E);let O;if(P.bitmap)O=this.applyTransferMapsToBitmap(P);else if(typeof HTMLElement=="function"&&P instanceof HTMLElement||!P.data)O=P;else{const Z=this.cachedCanvases.getCanvas("inlineImage",M,E).context;A(Z,P),O=this.applyTransferMapsToCanvas(Z)}const B=this._scaleImage(O,(0,y.getCurrentTransformInverse)(R));R.imageSmoothingEnabled=_((0,y.getCurrentTransform)(R),P.interpolate),o(R,B.img,0,0,B.paintWidth,B.paintHeight,0,-E,M,E),this.compose(),this.restore()}paintInlineImageXObjectGroup(P,M){if(!this.contentVisible)return;const E=this.ctx;let R;if(P.bitmap)R=P.bitmap;else{const O=P.width,B=P.height,Z=this.cachedCanvases.getCanvas("inlineImage",O,B).context;A(Z,P),R=this.applyTransferMapsToCanvas(Z)}for(const O of M)E.save(),E.transform(...O.transform),E.scale(1,-1),o(E,R,O.x,O.y,O.w,O.h,0,-1,1,1),E.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(P){}markPointProps(P,M){}beginMarkedContent(P){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(P,M){P==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(M)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(P){const M=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(P);const E=this.ctx;this.pendingClip&&(M||(this.pendingClip===he?E.clip("evenodd"):E.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),E.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const P=(0,y.getCurrentTransform)(this.ctx);if(P[1]===0&&P[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(P[0]),Math.abs(P[3]));else{const M=Math.abs(P[0]*P[3]-P[2]*P[1]),E=Math.hypot(P[0],P[2]),R=Math.hypot(P[1],P[3]);this._cachedGetSinglePixelWidth=Math.max(E,R)/M}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:P}=this.current,{a:M,b:E,c:R,d:O}=this.ctx.getTransform();let B,F;if(E===0&&R===0){const Z=Math.abs(M),se=Math.abs(O);if(Z===se)if(P===0)B=F=1/Z;else{const q=Z*P;B=F=q<1?1/q:1}else if(P===0)B=1/Z,F=1/se;else{const q=Z*P,pe=se*P;B=q<1?1/q:1,F=pe<1?1/pe:1}}else{const Z=Math.abs(M*O-E*R),se=Math.hypot(M,E),q=Math.hypot(R,O);if(P===0)B=q/Z,F=se/Z;else{const pe=P*Z;B=q>pe?q/pe:1,F=se>pe?se/pe:1}}this._cachedScaleForStroking[0]=B,this._cachedScaleForStroking[1]=F}return this._cachedScaleForStroking}rescaleAndStroke(P){const{ctx:M}=this,{lineWidth:E}=this.current,[R,O]=this.getScaleForStroking();if(M.lineWidth=E||1,R===1&&O===1){M.stroke();return}const B=M.getLineDash();if(P&&M.save(),M.scale(R,O),B.length>0){const F=Math.max(R,O);M.setLineDash(B.map(Z=>Z/F)),M.lineDashOffset/=F}M.stroke(),P&&M.restore()}isContentVisible(){for(let P=this.markedContentStack.length-1;P>=0;P--)if(!this.markedContentStack[P].visible)return!1;return!0}};z=new WeakSet,un=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},oe=new WeakSet,dn=function(){if(this.pageColors){const P=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(P!=="none"){const M=this.ctx.filter;this.ctx.filter=P,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=M}}};let Y=Pe;w.CanvasGraphics=Y;for(const L in p.OPS)Y.prototype[L]!==void 0&&(Y.prototype[p.OPS[L]]=Y.prototype[L])},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.TilingPattern=w.PathType=void 0,w.getShadingPattern=f,t(2);var p=t(1),y=t(168);const k={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};w.PathType=k;function u(m,v){if(!v)return;const A=v[2]-v[0],b=v[3]-v[1],c=new Path2D;c.rect(v[0],v[1],A,b),m.clip(c)}class g{constructor(){this.constructor===g&&(0,p.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,p.unreachable)("Abstract method `getPattern` called.")}}class e extends g{constructor(v){super(),this._type=v[1],this._bbox=v[2],this._colorStops=v[3],this._p0=v[4],this._p1=v[5],this._r0=v[6],this._r1=v[7],this.matrix=null}_createGradient(v){let A;this._type==="axial"?A=v.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(A=v.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const b of this._colorStops)A.addColorStop(b[0],b[1]);return A}getPattern(v,A,b,c){let s;if(c===k.STROKE||c===k.FILL){const x=A.current.getClippedPathBoundingBox(c,(0,y.getCurrentTransform)(v))||[0,0,0,0],T=Math.ceil(x[2]-x[0])||1,S=Math.ceil(x[3]-x[1])||1,D=A.cachedCanvases.getCanvas("pattern",T,S,!0),I=D.context;I.clearRect(0,0,I.canvas.width,I.canvas.height),I.beginPath(),I.rect(0,0,I.canvas.width,I.canvas.height),I.translate(-x[0],-x[1]),b=p.Util.transform(b,[1,0,0,1,x[0],x[1]]),I.transform(...A.baseTransform),this.matrix&&I.transform(...this.matrix),u(I,this._bbox),I.fillStyle=this._createGradient(I),I.fill(),s=v.createPattern(D.canvas,"no-repeat");const _=new DOMMatrix(b);s.setTransform(_)}else u(v,this._bbox),s=this._createGradient(v);return s}}function i(m,v,A,b,c,s,x,T){const S=v.coords,D=v.colors,I=m.data,_=m.width*4;let Q;S[A+1]>S[b+1]&&(Q=A,A=b,b=Q,Q=s,s=x,x=Q),S[b+1]>S[c+1]&&(Q=b,b=c,c=Q,Q=x,x=T,T=Q),S[A+1]>S[b+1]&&(Q=A,A=b,b=Q,Q=s,s=x,x=Q);const W=(S[A]+v.offsetX)*v.scaleX,j=(S[A+1]+v.offsetY)*v.scaleY,he=(S[b]+v.offsetX)*v.scaleX,Y=(S[b+1]+v.offsetY)*v.scaleY,z=(S[c]+v.offsetX)*v.scaleX,ee=(S[c+1]+v.offsetY)*v.scaleY;if(j>=ee)return;const oe=D[s],ye=D[s+1],Pe=D[s+2],L=D[x],P=D[x+1],M=D[x+2],E=D[T],R=D[T+1],O=D[T+2],B=Math.round(j),F=Math.round(ee);let Z,se,q,pe,te,me,ve,Re;for(let Oe=B;Oe<=F;Oe++){if(Oe<Y){const ce=Oe<j?0:(j-Oe)/(j-Y);Z=W-(W-he)*ce,se=oe-(oe-L)*ce,q=ye-(ye-P)*ce,pe=Pe-(Pe-M)*ce}else{let ce;Oe>ee?ce=1:Y===ee?ce=0:ce=(Y-Oe)/(Y-ee),Z=he-(he-z)*ce,se=L-(L-E)*ce,q=P-(P-R)*ce,pe=M-(M-O)*ce}let Ie;Oe<j?Ie=0:Oe>ee?Ie=1:Ie=(j-Oe)/(j-ee),te=W-(W-z)*Ie,me=oe-(oe-E)*Ie,ve=ye-(ye-R)*Ie,Re=Pe-(Pe-O)*Ie;const Le=Math.round(Math.min(Z,te)),ue=Math.round(Math.max(Z,te));let ne=_*Oe+Le*4;for(let ce=Le;ce<=ue;ce++)Ie=(Z-ce)/(Z-te),Ie<0?Ie=0:Ie>1&&(Ie=1),I[ne++]=se-(se-me)*Ie|0,I[ne++]=q-(q-ve)*Ie|0,I[ne++]=pe-(pe-Re)*Ie|0,I[ne++]=255}}function n(m,v,A){const b=v.coords,c=v.colors;let s,x;switch(v.type){case"lattice":const T=v.verticesPerRow,S=Math.floor(b.length/T)-1,D=T-1;for(s=0;s<S;s++){let I=s*T;for(let _=0;_<D;_++,I++)i(m,A,b[I],b[I+1],b[I+T],c[I],c[I+1],c[I+T]),i(m,A,b[I+T+1],b[I+1],b[I+T],c[I+T+1],c[I+1],c[I+T])}break;case"triangles":for(s=0,x=b.length;s<x;s+=3)i(m,A,b[s],b[s+1],b[s+2],c[s],c[s+1],c[s+2]);break;default:throw new Error("illegal figure")}}class d extends g{constructor(v){super(),this._coords=v[2],this._colors=v[3],this._figures=v[4],this._bounds=v[5],this._bbox=v[7],this._background=v[8],this.matrix=null}_createMeshCanvas(v,A,b){const T=Math.floor(this._bounds[0]),S=Math.floor(this._bounds[1]),D=Math.ceil(this._bounds[2])-T,I=Math.ceil(this._bounds[3])-S,_=Math.min(Math.ceil(Math.abs(D*v[0]*1.1)),3e3),Q=Math.min(Math.ceil(Math.abs(I*v[1]*1.1)),3e3),W=D/_,j=I/Q,he={coords:this._coords,colors:this._colors,offsetX:-T,offsetY:-S,scaleX:1/W,scaleY:1/j},Y=_+2*2,z=Q+2*2,ee=b.getCanvas("mesh",Y,z,!1),oe=ee.context,ye=oe.createImageData(_,Q);if(A){const L=ye.data;for(let P=0,M=L.length;P<M;P+=4)L[P]=A[0],L[P+1]=A[1],L[P+2]=A[2],L[P+3]=255}for(const L of this._figures)n(ye,L,he);return oe.putImageData(ye,2,2),{canvas:ee.canvas,offsetX:T-2*W,offsetY:S-2*j,scaleX:W,scaleY:j}}getPattern(v,A,b,c){u(v,this._bbox);let s;if(c===k.SHADING)s=p.Util.singularValueDecompose2dScale((0,y.getCurrentTransform)(v));else if(s=p.Util.singularValueDecompose2dScale(A.baseTransform),this.matrix){const T=p.Util.singularValueDecompose2dScale(this.matrix);s=[s[0]*T[0],s[1]*T[1]]}const x=this._createMeshCanvas(s,c===k.SHADING?null:this._background,A.cachedCanvases);return c!==k.SHADING&&(v.setTransform(...A.baseTransform),this.matrix&&v.transform(...this.matrix)),v.translate(x.offsetX,x.offsetY),v.scale(x.scaleX,x.scaleY),v.createPattern(x.canvas,"no-repeat")}}class h extends g{getPattern(){return"hotpink"}}function f(m){switch(m[0]){case"RadialAxial":return new e(m);case"Mesh":return new d(m);case"Dummy":return new h}throw new Error(`Unknown IR type: ${m[0]}`)}const a={COLORED:1,UNCOLORED:2},o=class o{constructor(v,A,b,c,s){this.operatorList=v[2],this.matrix=v[3]||[1,0,0,1,0,0],this.bbox=v[4],this.xstep=v[5],this.ystep=v[6],this.paintType=v[7],this.tilingType=v[8],this.color=A,this.ctx=b,this.canvasGraphicsFactory=c,this.baseTransform=s}createPatternCanvas(v){const A=this.operatorList,b=this.bbox,c=this.xstep,s=this.ystep,x=this.paintType,T=this.tilingType,S=this.color,D=this.canvasGraphicsFactory;(0,p.info)("TilingType: "+T);const I=b[0],_=b[1],Q=b[2],W=b[3],j=p.Util.singularValueDecompose2dScale(this.matrix),he=p.Util.singularValueDecompose2dScale(this.baseTransform),Y=[j[0]*he[0],j[1]*he[1]],z=this.getSizeAndScale(c,this.ctx.canvas.width,Y[0]),ee=this.getSizeAndScale(s,this.ctx.canvas.height,Y[1]),oe=v.cachedCanvases.getCanvas("pattern",z.size,ee.size,!0),ye=oe.context,Pe=D.createCanvasGraphics(ye);Pe.groupLevel=v.groupLevel,this.setFillAndStrokeStyleToContext(Pe,x,S);let L=I,P=_,M=Q,E=W;return I<0&&(L=0,M+=Math.abs(I)),_<0&&(P=0,E+=Math.abs(_)),ye.translate(-(z.scale*L),-(ee.scale*P)),Pe.transform(z.scale,0,0,ee.scale,0,0),ye.save(),this.clipBbox(Pe,L,P,M,E),Pe.baseTransform=(0,y.getCurrentTransform)(Pe.ctx),Pe.executeOperatorList(A),Pe.endDrawing(),{canvas:oe.canvas,scaleX:z.scale,scaleY:ee.scale,offsetX:L,offsetY:P}}getSizeAndScale(v,A,b){v=Math.abs(v);const c=Math.max(o.MAX_PATTERN_SIZE,A);let s=Math.ceil(v*b);return s>=c?s=c:b=s/v,{scale:b,size:s}}clipBbox(v,A,b,c,s){const x=c-A,T=s-b;v.ctx.rect(A,b,x,T),v.current.updateRectMinMax((0,y.getCurrentTransform)(v.ctx),[A,b,c,s]),v.clip(),v.endPath()}setFillAndStrokeStyleToContext(v,A,b){const c=v.ctx,s=v.current;switch(A){case a.COLORED:const x=this.ctx;c.fillStyle=x.fillStyle,c.strokeStyle=x.strokeStyle,s.fillColor=x.fillStyle,s.strokeColor=x.strokeStyle;break;case a.UNCOLORED:const T=p.Util.makeHexColor(b[0],b[1],b[2]);c.fillStyle=T,c.strokeStyle=T,s.fillColor=T,s.strokeColor=T;break;default:throw new p.FormatError(`Unsupported paint type: ${A}`)}}getPattern(v,A,b,c){let s=b;c!==k.SHADING&&(s=p.Util.transform(s,A.baseTransform),this.matrix&&(s=p.Util.transform(s,this.matrix)));const x=this.createPatternCanvas(A);let T=new DOMMatrix(s);T=T.translate(x.offsetX,x.offsetY),T=T.scale(1/x.scaleX,1/x.scaleY);const S=v.createPattern(x.canvas,"repeat");return S.setTransform(T),S}};tt(o,"MAX_PATTERN_SIZE",3e3);let r=o;w.TilingPattern=r},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.convertBlackAndWhiteToRGBA=k,w.convertToRGBA=y,w.grayToRGBA=g,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);var p=t(1);function y(e){switch(e.kind){case p.ImageKind.GRAYSCALE_1BPP:return k(e);case p.ImageKind.RGB_24BPP:return u(e)}return null}function k(e){let{src:i,srcPos:n=0,dest:d,width:h,height:f,nonBlackColor:a=4294967295,inverseDecode:r=!1}=e;const o=p.FeatureTest.isLittleEndian?4278190080:255,[m,v]=r?[a,o]:[o,a],A=h>>3,b=h&7,c=i.length;d=new Uint32Array(d.buffer);let s=0;for(let x=0;x<f;x++){for(const S=n+A;n<S;n++){const D=n<c?i[n]:255;d[s++]=D&128?v:m,d[s++]=D&64?v:m,d[s++]=D&32?v:m,d[s++]=D&16?v:m,d[s++]=D&8?v:m,d[s++]=D&4?v:m,d[s++]=D&2?v:m,d[s++]=D&1?v:m}if(b===0)continue;const T=n<c?i[n++]:255;for(let S=0;S<b;S++)d[s++]=T&1<<7-S?v:m}return{srcPos:n,destPos:s}}function u(e){let{src:i,srcPos:n=0,dest:d,destPos:h=0,width:f,height:a}=e,r=0;const o=i.length>>2,m=new Uint32Array(i.buffer,n,o);if(p.FeatureTest.isLittleEndian){for(;r<o-2;r+=3,h+=4){const v=m[r],A=m[r+1],b=m[r+2];d[h]=v|4278190080,d[h+1]=v>>>24|A<<8|4278190080,d[h+2]=A>>>16|b<<16|4278190080,d[h+3]=b>>>8|4278190080}for(let v=r*4,A=i.length;v<A;v+=3)d[h++]=i[v]|i[v+1]<<8|i[v+2]<<16|4278190080}else{for(;r<o-2;r+=3,h+=4){const v=m[r],A=m[r+1],b=m[r+2];d[h]=v|255,d[h+1]=v<<24|A>>>8|255,d[h+2]=A<<16|b>>>16|255,d[h+3]=b<<8|255}for(let v=r*4,A=i.length;v<A;v+=3)d[h++]=i[v]<<24|i[v+1]<<16|i[v+2]<<8|255}return{srcPos:n,destPos:h}}function g(e,i){if(p.FeatureTest.isLittleEndian)for(let n=0,d=e.length;n<d;n++)i[n]=e[n]*65793|4278190080;else for(let n=0,d=e.length;n<d;n++)i[n]=e[n]*16843008|255}},(N,w)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.GlobalWorkerOptions=void 0;const t=Object.create(null);w.GlobalWorkerOptions=t,t.workerPort=null,t.workerSrc=""},(N,w,t)=>{var e,cr,n,hr,h,Dt;Object.defineProperty(w,"__esModule",{value:!0}),w.MessageHandler=void 0,t(2);var p=t(1);const y={UNKNOWN:0,DATA:1,ERROR:2},k={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function u(a){switch(a instanceof Error||typeof a=="object"&&a!==null||(0,p.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),a.name){case"AbortException":return new p.AbortException(a.message);case"MissingPDFException":return new p.MissingPDFException(a.message);case"PasswordException":return new p.PasswordException(a.message,a.code);case"UnexpectedResponseException":return new p.UnexpectedResponseException(a.message,a.status);case"UnknownErrorException":return new p.UnknownErrorException(a.message,a.details);default:return new p.UnknownErrorException(a.message,a.toString())}}class g{constructor(r,o,m){$(this,e);$(this,n);$(this,h);this.sourceName=r,this.targetName=o,this.comObj=m,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=v=>{const A=v.data;if(A.targetName!==this.sourceName)return;if(A.stream){J(this,n,hr).call(this,A);return}if(A.callback){const c=A.callbackId,s=this.callbackCapabilities[c];if(!s)throw new Error(`Cannot resolve callback ${c}`);if(delete this.callbackCapabilities[c],A.callback===y.DATA)s.resolve(A.data);else if(A.callback===y.ERROR)s.reject(u(A.reason));else throw new Error("Unexpected callback case");return}const b=this.actionHandler[A.action];if(!b)throw new Error(`Unknown action from worker: ${A.action}`);if(A.callbackId){const c=this.sourceName,s=A.sourceName;new Promise(function(x){x(b(A.data))}).then(function(x){m.postMessage({sourceName:c,targetName:s,callback:y.DATA,callbackId:A.callbackId,data:x})},function(x){m.postMessage({sourceName:c,targetName:s,callback:y.ERROR,callbackId:A.callbackId,reason:u(x)})});return}if(A.streamId){J(this,e,cr).call(this,A);return}b(A.data)},m.addEventListener("message",this._onComObjOnMessage)}on(r,o){const m=this.actionHandler;if(m[r])throw new Error(`There is already an actionName called "${r}"`);m[r]=o}send(r,o,m){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:r,data:o},m)}sendWithPromise(r,o,m){const v=this.callbackId++,A=new p.PromiseCapability;this.callbackCapabilities[v]=A;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:r,callbackId:v,data:o},m)}catch(b){A.reject(b)}return A.promise}sendWithStream(r,o,m,v){const A=this.streamId++,b=this.sourceName,c=this.targetName,s=this.comObj;return new ReadableStream({start:x=>{const T=new p.PromiseCapability;return this.streamControllers[A]={controller:x,startCall:T,pullCall:null,cancelCall:null,isClosed:!1},s.postMessage({sourceName:b,targetName:c,action:r,streamId:A,data:o,desiredSize:x.desiredSize},v),T.promise},pull:x=>{const T=new p.PromiseCapability;return this.streamControllers[A].pullCall=T,s.postMessage({sourceName:b,targetName:c,stream:k.PULL,streamId:A,desiredSize:x.desiredSize}),T.promise},cancel:x=>{(0,p.assert)(x instanceof Error,"cancel must have a valid reason");const T=new p.PromiseCapability;return this.streamControllers[A].cancelCall=T,this.streamControllers[A].isClosed=!0,s.postMessage({sourceName:b,targetName:c,stream:k.CANCEL,streamId:A,reason:u(x)}),T.promise}},m)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}e=new WeakSet,cr=function(r){const o=r.streamId,m=this.sourceName,v=r.sourceName,A=this.comObj,b=this,c=this.actionHandler[r.action],s={enqueue(x){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,S=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const D=this.desiredSize;this.desiredSize-=T,D>0&&this.desiredSize<=0&&(this.sinkCapability=new p.PromiseCapability,this.ready=this.sinkCapability.promise),A.postMessage({sourceName:m,targetName:v,stream:k.ENQUEUE,streamId:o,chunk:x},S)},close(){this.isCancelled||(this.isCancelled=!0,A.postMessage({sourceName:m,targetName:v,stream:k.CLOSE,streamId:o}),delete b.streamSinks[o])},error(x){(0,p.assert)(x instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,A.postMessage({sourceName:m,targetName:v,stream:k.ERROR,streamId:o,reason:u(x)}))},sinkCapability:new p.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:r.desiredSize,ready:null};s.sinkCapability.resolve(),s.ready=s.sinkCapability.promise,this.streamSinks[o]=s,new Promise(function(x){x(c(r.data,s))}).then(function(){A.postMessage({sourceName:m,targetName:v,stream:k.START_COMPLETE,streamId:o,success:!0})},function(x){A.postMessage({sourceName:m,targetName:v,stream:k.START_COMPLETE,streamId:o,reason:u(x)})})},n=new WeakSet,hr=function(r){const o=r.streamId,m=this.sourceName,v=r.sourceName,A=this.comObj,b=this.streamControllers[o],c=this.streamSinks[o];switch(r.stream){case k.START_COMPLETE:r.success?b.startCall.resolve():b.startCall.reject(u(r.reason));break;case k.PULL_COMPLETE:r.success?b.pullCall.resolve():b.pullCall.reject(u(r.reason));break;case k.PULL:if(!c){A.postMessage({sourceName:m,targetName:v,stream:k.PULL_COMPLETE,streamId:o,success:!0});break}c.desiredSize<=0&&r.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=r.desiredSize,new Promise(function(s){var x;s((x=c.onPull)==null?void 0:x.call(c))}).then(function(){A.postMessage({sourceName:m,targetName:v,stream:k.PULL_COMPLETE,streamId:o,success:!0})},function(s){A.postMessage({sourceName:m,targetName:v,stream:k.PULL_COMPLETE,streamId:o,reason:u(s)})});break;case k.ENQUEUE:if((0,p.assert)(b,"enqueue should have stream controller"),b.isClosed)break;b.controller.enqueue(r.chunk);break;case k.CLOSE:if((0,p.assert)(b,"close should have stream controller"),b.isClosed)break;b.isClosed=!0,b.controller.close(),J(this,h,Dt).call(this,b,o);break;case k.ERROR:(0,p.assert)(b,"error should have stream controller"),b.controller.error(u(r.reason)),J(this,h,Dt).call(this,b,o);break;case k.CANCEL_COMPLETE:r.success?b.cancelCall.resolve():b.cancelCall.reject(u(r.reason)),J(this,h,Dt).call(this,b,o);break;case k.CANCEL:if(!c)break;new Promise(function(s){var x;s((x=c.onCancel)==null?void 0:x.call(c,u(r.reason)))}).then(function(){A.postMessage({sourceName:m,targetName:v,stream:k.CANCEL_COMPLETE,streamId:o,success:!0})},function(s){A.postMessage({sourceName:m,targetName:v,stream:k.CANCEL_COMPLETE,streamId:o,reason:u(s)})}),c.sinkCapability.reject(u(r.reason)),c.isCancelled=!0,delete this.streamSinks[o];break;default:throw new Error("Unexpected stream case")}},h=new WeakSet,Dt=async function(r,o){var m,v,A;await Promise.allSettled([(m=r.startCall)==null?void 0:m.promise,(v=r.pullCall)==null?void 0:v.promise,(A=r.cancelCall)==null?void 0:A.promise]),delete this.streamControllers[o]},w.MessageHandler=g},(N,w,t)=>{var k,u;Object.defineProperty(w,"__esModule",{value:!0}),w.Metadata=void 0;var p=t(1);class y{constructor(e){$(this,k,void 0);$(this,u,void 0);let{parsedData:i,rawData:n}=e;le(this,k,i),le(this,u,n)}getRaw(){return l(this,u)}get(e){return l(this,k).get(e)??null}getAll(){return(0,p.objectFromMap)(l(this,k))}has(e){return l(this,k).has(e)}}k=new WeakMap,u=new WeakMap,w.Metadata=y},(N,w,t)=>{var e,i,n,d,h,f,fn;Object.defineProperty(w,"__esModule",{value:!0}),w.OptionalContentConfig=void 0;var p=t(1),y=t(170);const k=Symbol("INTERNAL");class u{constructor(o,m){$(this,e,!0);this.name=o,this.intent=m}get visible(){return l(this,e)}_setVisible(o,m){o!==k&&(0,p.unreachable)("Internal method `_setVisible` called."),le(this,e,m)}}e=new WeakMap;class g{constructor(o){$(this,f);$(this,i,null);$(this,n,new Map);$(this,d,null);$(this,h,null);if(this.name=null,this.creator=null,o!==null){this.name=o.name,this.creator=o.creator,le(this,h,o.order);for(const m of o.groups)l(this,n).set(m.id,new u(m.name,m.intent));if(o.baseState==="OFF")for(const m of l(this,n).values())m._setVisible(k,!1);for(const m of o.on)l(this,n).get(m)._setVisible(k,!0);for(const m of o.off)l(this,n).get(m)._setVisible(k,!1);le(this,d,this.getHash())}}isVisible(o){if(l(this,n).size===0)return!0;if(!o)return(0,p.warn)("Optional content group not defined."),!0;if(o.type==="OCG")return l(this,n).has(o.id)?l(this,n).get(o.id).visible:((0,p.warn)(`Optional content group not found: ${o.id}`),!0);if(o.type==="OCMD"){if(o.expression)return J(this,f,fn).call(this,o.expression);if(!o.policy||o.policy==="AnyOn"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(l(this,n).get(m).visible)return!0}return!1}else if(o.policy==="AllOn"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(!l(this,n).get(m).visible)return!1}return!0}else if(o.policy==="AnyOff"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(!l(this,n).get(m).visible)return!0}return!1}else if(o.policy==="AllOff"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(l(this,n).get(m).visible)return!1}return!0}return(0,p.warn)(`Unknown optional content policy ${o.policy}.`),!0}return(0,p.warn)(`Unknown group type ${o.type}.`),!0}setVisibility(o){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!l(this,n).has(o)){(0,p.warn)(`Optional content group not found: ${o}`);return}l(this,n).get(o)._setVisible(k,!!m),le(this,i,null)}get hasInitialVisibility(){return l(this,d)===null||this.getHash()===l(this,d)}getOrder(){return l(this,n).size?l(this,h)?l(this,h).slice():[...l(this,n).keys()]:null}getGroups(){return l(this,n).size>0?(0,p.objectFromMap)(l(this,n)):null}getGroup(o){return l(this,n).get(o)||null}getHash(){if(l(this,i)!==null)return l(this,i);const o=new y.MurmurHash3_64;for(const[m,v]of l(this,n))o.update(`${m}:${v.visible}`);return le(this,i,o.hexdigest())}}i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakSet,fn=function(o){const m=o.length;if(m<2)return!0;const v=o[0];for(let A=1;A<m;A++){const b=o[A];let c;if(Array.isArray(b))c=J(this,f,fn).call(this,b);else if(l(this,n).has(b))c=l(this,n).get(b).visible;else return(0,p.warn)(`Optional content group not found: ${b}`),!0;switch(v){case"And":if(!c)return!1;break;case"Or":if(c)return!0;break;case"Not":return!c;default:return!0}}return v==="And"},w.OptionalContentConfig=g},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFDataTransportStream=void 0,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89);var p=t(1),y=t(168);class k{constructor(i,n){let{length:d,initialData:h,progressiveDone:f=!1,contentDispositionFilename:a=null,disableRange:r=!1,disableStream:o=!1}=i;if((0,p.assert)(n,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=f,this._contentDispositionFilename=a,(h==null?void 0:h.length)>0){const m=h instanceof Uint8Array&&h.byteLength===h.buffer.byteLength?h.buffer:new Uint8Array(h).buffer;this._queuedChunks.push(m)}this._pdfDataRangeTransport=n,this._isStreamingSupported=!o,this._isRangeSupported=!r,this._contentLength=d,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((m,v)=>{this._onReceiveData({begin:m,chunk:v})}),this._pdfDataRangeTransport.addProgressListener((m,v)=>{this._onProgress({loaded:m,total:v})}),this._pdfDataRangeTransport.addProgressiveReadListener(m=>{this._onReceiveData({chunk:m})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(i){let{begin:n,chunk:d}=i;const h=d instanceof Uint8Array&&d.byteLength===d.buffer.byteLength?d.buffer:new Uint8Array(d).buffer;if(n===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(h):this._queuedChunks.push(h);else{const f=this._rangeReaders.some(function(a){return a._begin!==n?!1:(a._enqueue(h),!0)});(0,p.assert)(f,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var i;return((i=this._fullRequestReader)==null?void 0:i._loaded)??0}_onProgress(i){var n,d,h,f;i.total===void 0?(d=(n=this._rangeReaders[0])==null?void 0:n.onProgress)==null||d.call(n,{loaded:i.loaded}):(f=(h=this._fullRequestReader)==null?void 0:h.onProgress)==null||f.call(h,{loaded:i.loaded,total:i.total})}_onProgressiveDone(){var i;(i=this._fullRequestReader)==null||i.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(i){const n=this._rangeReaders.indexOf(i);n>=0&&this._rangeReaders.splice(n,1)}getFullReader(){(0,p.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const i=this._queuedChunks;return this._queuedChunks=null,new u(this,i,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(i,n){if(n<=this._progressiveDataLength)return null;const d=new g(this,i,n);return this._pdfDataRangeTransport.requestDataRange(i,n),this._rangeReaders.push(d),d}cancelAllRequests(i){var n;(n=this._fullRequestReader)==null||n.cancel(i);for(const d of this._rangeReaders.slice(0))d.cancel(i);this._pdfDataRangeTransport.abort()}}w.PDFDataTransportStream=k;class u{constructor(i,n){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this._stream=i,this._done=d||!1,this._filename=(0,y.isPdfFile)(h)?h:null,this._queuedChunks=n||[],this._loaded=0;for(const f of this._queuedChunks)this._loaded+=f.byteLength;this._requests=[],this._headersReady=Promise.resolve(),i._fullRequestReader=this,this.onProgress=null}_enqueue(i){this._done||(this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._queuedChunks.push(i),this._loaded+=i.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const i=new p.PromiseCapability;return this._requests.push(i),i.promise}cancel(i){this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class g{constructor(i,n,d){this._stream=i,this._begin=n,this._end=d,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(i){if(!this._done){if(this._requests.length===0)this._queuedChunk=i;else{this._requests.shift().resolve({value:i,done:!1});for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};const i=new p.PromiseCapability;return this._requests.push(i),i.promise}cancel(i){this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFFetchStream=void 0,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89);var p=t(1),y=t(182);function k(d,h,f){return{method:"GET",headers:d,signal:f.signal,mode:"cors",credentials:h?"include":"same-origin",redirect:"follow"}}function u(d){const h=new Headers;for(const f in d){const a=d[f];a!==void 0&&h.append(f,a)}return h}function g(d){return d instanceof Uint8Array?d.buffer:d instanceof ArrayBuffer?d:((0,p.warn)(`getArrayBuffer - unexpected data format: ${d}`),new Uint8Array(d).buffer)}class e{constructor(h){this.source=h,this.isHttp=/^https?:/i.test(h.url),this.httpHeaders=this.isHttp&&h.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var h;return((h=this._fullRequestReader)==null?void 0:h._loaded)??0}getFullReader(){return(0,p.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new i(this),this._fullRequestReader}getRangeReader(h,f){if(f<=this._progressiveDataLength)return null;const a=new n(this,h,f);return this._rangeRequestReaders.push(a),a}cancelAllRequests(h){var f;(f=this._fullRequestReader)==null||f.cancel(h);for(const a of this._rangeRequestReaders.slice(0))a.cancel(h)}}w.PDFFetchStream=e;class i{constructor(h){this._stream=h,this._reader=null,this._loaded=0,this._filename=null;const f=h.source;this._withCredentials=f.withCredentials||!1,this._contentLength=f.length,this._headersCapability=new p.PromiseCapability,this._disableRange=f.disableRange||!1,this._rangeChunkSize=f.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!f.disableStream,this._isRangeSupported=!f.disableRange,this._headers=u(this._stream.httpHeaders);const a=f.url;fetch(a,k(this._headers,this._withCredentials,this._abortController)).then(r=>{if(!(0,y.validateResponseStatus)(r.status))throw(0,y.createResponseStatusError)(r.status,a);this._reader=r.body.getReader(),this._headersCapability.resolve();const o=A=>r.headers.get(A),{allowRangeRequests:m,suggestedLength:v}=(0,y.validateRangeRequestCapabilities)({getResponseHeader:o,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=m,this._contentLength=v||this._contentLength,this._filename=(0,y.extractFilenameFromHeader)(o),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new p.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a;await this._headersCapability.promise;const{value:h,done:f}=await this._reader.read();return f?{value:h,done:f}:(this._loaded+=h.byteLength,(a=this.onProgress)==null||a.call(this,{loaded:this._loaded,total:this._contentLength}),{value:g(h),done:!1})}cancel(h){var f;(f=this._reader)==null||f.cancel(h),this._abortController.abort()}}class n{constructor(h,f,a){this._stream=h,this._reader=null,this._loaded=0;const r=h.source;this._withCredentials=r.withCredentials||!1,this._readCapability=new p.PromiseCapability,this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController,this._headers=u(this._stream.httpHeaders),this._headers.append("Range",`bytes=${f}-${a-1}`);const o=r.url;fetch(o,k(this._headers,this._withCredentials,this._abortController)).then(m=>{if(!(0,y.validateResponseStatus)(m.status))throw(0,y.createResponseStatusError)(m.status,o);this._readCapability.resolve(),this._reader=m.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a;await this._readCapability.promise;const{value:h,done:f}=await this._reader.read();return f?{value:h,done:f}:(this._loaded+=h.byteLength,(a=this.onProgress)==null||a.call(this,{loaded:this._loaded}),{value:g(h),done:!1})}cancel(h){var f;(f=this._reader)==null||f.cancel(h),this._abortController.abort()}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.createResponseStatusError=e,w.extractFilenameFromHeader=g,w.validateRangeRequestCapabilities=u,w.validateResponseStatus=i;var p=t(1),y=t(183),k=t(168);function u(n){let{getResponseHeader:d,isHttp:h,rangeChunkSize:f,disableRange:a}=n;const r={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(d("Content-Length"),10);return!Number.isInteger(o)||(r.suggestedLength=o,o<=2*f)||a||!h||d("Accept-Ranges")!=="bytes"||(d("Content-Encoding")||"identity")!=="identity"||(r.allowRangeRequests=!0),r}function g(n){const d=n("Content-Disposition");if(d){let h=(0,y.getFilenameFromContentDispositionHeader)(d);if(h.includes("%"))try{h=decodeURIComponent(h)}catch{}if((0,k.isPdfFile)(h))return h}return null}function e(n,d){return n===404||n===0&&d.startsWith("file:")?new p.MissingPDFException('Missing PDF "'+d+'".'):new p.UnexpectedResponseException(`Unexpected server response (${n}) while retrieving PDF "${d}".`,n)}function i(n){return n===200||n===206}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.getFilenameFromContentDispositionHeader=y,t(89),t(149);var p=t(1);function y(k){let u=!0,g=e("filename\\*","i").exec(k);if(g){g=g[1];let r=h(g);return r=unescape(r),r=f(r),r=a(r),n(r)}if(g=d(k),g){const r=a(g);return n(r)}if(g=e("filename","i").exec(k),g){g=g[1];let r=h(g);return r=a(r),n(r)}function e(r,o){return new RegExp("(?:^|;)\\s*"+r+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',o)}function i(r,o){if(r){if(!/^[\x00-\xFF]+$/.test(o))return o;try{const m=new TextDecoder(r,{fatal:!0}),v=(0,p.stringToBytes)(o);o=m.decode(v),u=!1}catch{}}return o}function n(r){return u&&/[\x80-\xff]/.test(r)&&(r=i("utf-8",r),u&&(r=i("iso-8859-1",r))),r}function d(r){const o=[];let m;const v=e("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(m=v.exec(r))!==null;){let[,b,c,s]=m;if(b=parseInt(b,10),b in o){if(b===0)break;continue}o[b]=[c,s]}const A=[];for(let b=0;b<o.length&&b in o;++b){let[c,s]=o[b];s=h(s),c&&(s=unescape(s),b===0&&(s=f(s))),A.push(s)}return A.join("")}function h(r){if(r.startsWith('"')){const o=r.slice(1).split('\\"');for(let m=0;m<o.length;++m){const v=o[m].indexOf('"');v!==-1&&(o[m]=o[m].slice(0,v),o.length=m+1),o[m]=o[m].replaceAll(/\\(.)/g,"$1")}r=o.join('"')}return r}function f(r){const o=r.indexOf("'");if(o===-1)return r;const m=r.slice(0,o),A=r.slice(o+1).replace(/^[^']*'/,"");return i(m,A)}function a(r){return!r.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(r)?r:r.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(o,m,v,A){if(v==="q"||v==="Q")return A=A.replaceAll("_"," "),A=A.replaceAll(/=([0-9a-fA-F]{2})/g,function(b,c){return String.fromCharCode(parseInt(c,16))}),i(m,A);try{A=atob(A)}catch{}return i(m,A)})}return""}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFNetworkStream=void 0,t(89);var p=t(1),y=t(182);const k=200,u=206;function g(h){const f=h.response;return typeof f!="string"?f:(0,p.stringToBytes)(f).buffer}class e{constructor(f){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.url=f,this.isHttp=/^https?:/i.test(f),this.httpHeaders=this.isHttp&&a.httpHeaders||Object.create(null),this.withCredentials=a.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(f,a,r){const o={begin:f,end:a};for(const m in r)o[m]=r[m];return this.request(o)}requestFull(f){return this.request(f)}request(f){const a=new XMLHttpRequest,r=this.currXhrId++,o=this.pendingRequests[r]={xhr:a};a.open("GET",this.url),a.withCredentials=this.withCredentials;for(const m in this.httpHeaders){const v=this.httpHeaders[m];v!==void 0&&a.setRequestHeader(m,v)}return this.isHttp&&"begin"in f&&"end"in f?(a.setRequestHeader("Range",`bytes=${f.begin}-${f.end-1}`),o.expectedStatus=u):o.expectedStatus=k,a.responseType="arraybuffer",f.onError&&(a.onerror=function(m){f.onError(a.status)}),a.onreadystatechange=this.onStateChange.bind(this,r),a.onprogress=this.onProgress.bind(this,r),o.onHeadersReceived=f.onHeadersReceived,o.onDone=f.onDone,o.onError=f.onError,o.onProgress=f.onProgress,a.send(null),r}onProgress(f,a){var o;const r=this.pendingRequests[f];r&&((o=r.onProgress)==null||o.call(r,a))}onStateChange(f,a){var b,c,s;const r=this.pendingRequests[f];if(!r)return;const o=r.xhr;if(o.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),o.readyState!==4||!(f in this.pendingRequests))return;if(delete this.pendingRequests[f],o.status===0&&this.isHttp){(b=r.onError)==null||b.call(r,o.status);return}const m=o.status||k;if(!(m===k&&r.expectedStatus===u)&&m!==r.expectedStatus){(c=r.onError)==null||c.call(r,o.status);return}const A=g(o);if(m===u){const x=o.getResponseHeader("Content-Range"),T=/bytes (\d+)-(\d+)\/(\d+)/.exec(x);r.onDone({begin:parseInt(T[1],10),chunk:A})}else A?r.onDone({begin:0,chunk:A}):(s=r.onError)==null||s.call(r,o.status)}getRequestXhr(f){return this.pendingRequests[f].xhr}isPendingRequest(f){return f in this.pendingRequests}abortRequest(f){const a=this.pendingRequests[f].xhr;delete this.pendingRequests[f],a.abort()}}class i{constructor(f){this._source=f,this._manager=new e(f.url,{httpHeaders:f.httpHeaders,withCredentials:f.withCredentials}),this._rangeChunkSize=f.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(f){const a=this._rangeRequestReaders.indexOf(f);a>=0&&this._rangeRequestReaders.splice(a,1)}getFullReader(){return(0,p.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new n(this._manager,this._source),this._fullRequestReader}getRangeReader(f,a){const r=new d(this._manager,f,a);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(f){var a;(a=this._fullRequestReader)==null||a.cancel(f);for(const r of this._rangeRequestReaders.slice(0))r.cancel(f)}}w.PDFNetworkStream=i;class n{constructor(f,a){this._manager=f;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=a.url,this._fullRequestId=f.requestFull(r),this._headersReceivedCapability=new p.PromiseCapability,this._disableRange=a.disableRange||!1,this._contentLength=a.length,this._rangeChunkSize=a.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const f=this._fullRequestId,a=this._manager.getRequestXhr(f),r=v=>a.getResponseHeader(v),{allowRangeRequests:o,suggestedLength:m}=(0,y.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});o&&(this._isRangeSupported=!0),this._contentLength=m||this._contentLength,this._filename=(0,y.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(f),this._headersReceivedCapability.resolve()}_onDone(f){if(f&&(this._requests.length>0?this._requests.shift().resolve({value:f.chunk,done:!1}):this._cachedChunks.push(f.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(f){this._storedError=(0,y.createResponseStatusError)(f,this._url),this._headersReceivedCapability.reject(this._storedError);for(const a of this._requests)a.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(f){var a;(a=this.onProgress)==null||a.call(this,{loaded:f.loaded,total:f.lengthComputable?f.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const f=new p.PromiseCapability;return this._requests.push(f),f.promise}cancel(f){this._done=!0,this._headersReceivedCapability.reject(f);for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class d{constructor(f,a,r){this._manager=f;const o={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=f.url,this._requestId=f.requestRange(a,r,o),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var f;(f=this.onClosed)==null||f.call(this,this)}_onDone(f){const a=f.chunk;this._requests.length>0?this._requests.shift().resolve({value:a,done:!1}):this._queuedChunk=a,this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(f){this._storedError=(0,y.createResponseStatusError)(f,this._url);for(const a of this._requests)a.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(f){var a;this.isStreamingSupported||(a=this.onProgress)==null||a.call(this,{loaded:f.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const a=this._queuedChunk;return this._queuedChunk=null,{value:a,done:!1}}if(this._done)return{value:void 0,done:!0};const f=new p.PromiseCapability;return this._requests.push(f),f.promise}cancel(f){this._done=!0;for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFNodeStream=void 0,t(89),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);var p=t(1),y=t(182);const k=/^file:\/\/\/[a-zA-Z]:\//;function u(r){const o=require$$6,m=o.parse(r);return m.protocol==="file:"||m.host?m:/^[a-z]:[/\\]/i.test(r)?o.parse(`file:///${r}`):(m.host||(m.protocol="file:"),m)}class g{constructor(o){this.source=o,this.url=u(o.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&o.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var o;return((o=this._fullRequestReader)==null?void 0:o._loaded)??0}getFullReader(){return(0,p.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new f(this):new d(this),this._fullRequestReader}getRangeReader(o,m){if(m<=this._progressiveDataLength)return null;const v=this.isFsUrl?new a(this,o,m):new h(this,o,m);return this._rangeRequestReaders.push(v),v}cancelAllRequests(o){var m;(m=this._fullRequestReader)==null||m.cancel(o);for(const v of this._rangeRequestReaders.slice(0))v.cancel(o)}}w.PDFNodeStream=g;class e{constructor(o){this._url=o.url,this._done=!1,this._storedError=null,this.onProgress=null;const m=o.source;this._contentLength=m.length,this._loaded=0,this._filename=null,this._disableRange=m.disableRange||!1,this._rangeChunkSize=m.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!m.disableStream,this._isRangeSupported=!m.disableRange,this._readableStream=null,this._readCapability=new p.PromiseCapability,this._headersCapability=new p.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var v;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const o=this._readableStream.read();return o===null?(this._readCapability=new p.PromiseCapability,this.read()):(this._loaded+=o.length,(v=this.onProgress)==null||v.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(o).buffer,done:!1})}cancel(o){if(!this._readableStream){this._error(o);return}this._readableStream.destroy(o)}_error(o){this._storedError=o,this._readCapability.resolve()}_setReadableStream(o){this._readableStream=o,o.on("readable",()=>{this._readCapability.resolve()}),o.on("end",()=>{o.destroy(),this._done=!0,this._readCapability.resolve()}),o.on("error",m=>{this._error(m)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new p.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class i{constructor(o){this._url=o.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new p.PromiseCapability;const m=o.source;this._isStreamingSupported=!m.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var v;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const o=this._readableStream.read();return o===null?(this._readCapability=new p.PromiseCapability,this.read()):(this._loaded+=o.length,(v=this.onProgress)==null||v.call(this,{loaded:this._loaded}),{value:new Uint8Array(o).buffer,done:!1})}cancel(o){if(!this._readableStream){this._error(o);return}this._readableStream.destroy(o)}_error(o){this._storedError=o,this._readCapability.resolve()}_setReadableStream(o){this._readableStream=o,o.on("readable",()=>{this._readCapability.resolve()}),o.on("end",()=>{o.destroy(),this._done=!0,this._readCapability.resolve()}),o.on("error",m=>{this._error(m)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function n(r,o){return{protocol:r.protocol,auth:r.auth,host:r.hostname,port:r.port,path:r.path,method:"GET",headers:o}}class d extends e{constructor(o){super(o);const m=v=>{if(v.statusCode===404){const s=new p.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=s,this._headersCapability.reject(s);return}this._headersCapability.resolve(),this._setReadableStream(v);const A=s=>this._readableStream.headers[s.toLowerCase()],{allowRangeRequests:b,suggestedLength:c}=(0,y.validateRangeRequestCapabilities)({getResponseHeader:A,isHttp:o.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=b,this._contentLength=c||this._contentLength,this._filename=(0,y.extractFilenameFromHeader)(A)};if(this._request=null,this._url.protocol==="http:"){const v=require$$6;this._request=v.request(n(this._url,o.httpHeaders),m)}else{const v=require$$6;this._request=v.request(n(this._url,o.httpHeaders),m)}this._request.on("error",v=>{this._storedError=v,this._headersCapability.reject(v)}),this._request.end()}}class h extends i{constructor(o,m,v){super(o),this._httpHeaders={};for(const b in o.httpHeaders){const c=o.httpHeaders[b];c!==void 0&&(this._httpHeaders[b]=c)}this._httpHeaders.Range=`bytes=${m}-${v-1}`;const A=b=>{if(b.statusCode===404){const c=new p.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=c;return}this._setReadableStream(b)};if(this._request=null,this._url.protocol==="http:"){const b=require$$6;this._request=b.request(n(this._url,this._httpHeaders),A)}else{const b=require$$6;this._request=b.request(n(this._url,this._httpHeaders),A)}this._request.on("error",b=>{this._storedError=b}),this._request.end()}}class f extends e{constructor(o){super(o);let m=decodeURIComponent(this._url.path);k.test(this._url.href)&&(m=m.replace(/^\//,""));const v=require$$6;v.lstat(m,(A,b)=>{if(A){A.code==="ENOENT"&&(A=new p.MissingPDFException(`Missing PDF "${m}".`)),this._storedError=A,this._headersCapability.reject(A);return}this._contentLength=b.size,this._setReadableStream(v.createReadStream(m)),this._headersCapability.resolve()})}}class a extends i{constructor(o,m,v){super(o);let A=decodeURIComponent(this._url.path);k.test(this._url.href)&&(A=A.replace(/^\//,""));const b=require$$6;this._setReadableStream(b.createReadStream(A,{start:m,end:v-1}))}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.SVGGraphics=void 0,t(84),t(86),t(87),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(2),t(89),t(187);var p=t(168),y=t(1);const k={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},u="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/1999/xlink",e=["butt","round","square"],i=["miter","round","bevel"],n=function(b){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(URL.createObjectURL&&typeof Blob<"u"&&!s)return URL.createObjectURL(new Blob([b],{type:c}));const x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let T=`data:${c};base64,`;for(let S=0,D=b.length;S<D;S+=3){const I=b[S]&255,_=b[S+1]&255,Q=b[S+2]&255,W=I>>2,j=(I&3)<<4|_>>4,he=S+1<D?(_&15)<<2|Q>>6:64,Y=S+2<D?Q&63:64;T+=x[W]+x[j]+x[he]+x[Y]}return T},d=function(){const b=new Uint8Array([137,80,78,71,13,10,26,10]),c=12,s=new Int32Array(256);for(let Q=0;Q<256;Q++){let W=Q;for(let j=0;j<8;j++)W=W&1?3988292384^W>>1&2147483647:W>>1&2147483647;s[Q]=W}function x(Q,W,j){let he=-1;for(let Y=W;Y<j;Y++){const z=(he^Q[Y])&255,ee=s[z];he=he>>>8^ee}return he^-1}function T(Q,W,j,he){let Y=he;const z=W.length;j[Y]=z>>24&255,j[Y+1]=z>>16&255,j[Y+2]=z>>8&255,j[Y+3]=z&255,Y+=4,j[Y]=Q.charCodeAt(0)&255,j[Y+1]=Q.charCodeAt(1)&255,j[Y+2]=Q.charCodeAt(2)&255,j[Y+3]=Q.charCodeAt(3)&255,Y+=4,j.set(W,Y),Y+=W.length;const ee=x(j,he+4,Y);j[Y]=ee>>24&255,j[Y+1]=ee>>16&255,j[Y+2]=ee>>8&255,j[Y+3]=ee&255}function S(Q,W,j){let he=1,Y=0;for(let z=W;z<j;++z)he=(he+(Q[z]&255))%65521,Y=(Y+he)%65521;return Y<<16|he}function D(Q){if(!y.isNodeJS)return I(Q);try{const W=parseInt(process.versions.node)>=8?Q:Buffer.from(Q),j=require$$6.deflateSync(W,{level:9});return j instanceof Uint8Array?j:new Uint8Array(j)}catch(W){(0,y.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+W)}return I(Q)}function I(Q){let W=Q.length;const j=65535,he=Math.ceil(W/j),Y=new Uint8Array(2+W+he*5+4);let z=0;Y[z++]=120,Y[z++]=156;let ee=0;for(;W>j;)Y[z++]=0,Y[z++]=255,Y[z++]=255,Y[z++]=0,Y[z++]=0,Y.set(Q.subarray(ee,ee+j),z),z+=j,ee+=j,W-=j;Y[z++]=1,Y[z++]=W&255,Y[z++]=W>>8&255,Y[z++]=~W&65535&255,Y[z++]=(~W&65535)>>8&255,Y.set(Q.subarray(ee),z),z+=Q.length-ee;const oe=S(Q,0,Q.length);return Y[z++]=oe>>24&255,Y[z++]=oe>>16&255,Y[z++]=oe>>8&255,Y[z++]=oe&255,Y}function _(Q,W,j,he){const Y=Q.width,z=Q.height;let ee,oe,ye;const Pe=Q.data;switch(W){case y.ImageKind.GRAYSCALE_1BPP:oe=0,ee=1,ye=Y+7>>3;break;case y.ImageKind.RGB_24BPP:oe=2,ee=8,ye=Y*3;break;case y.ImageKind.RGBA_32BPP:oe=6,ee=8,ye=Y*4;break;default:throw new Error("invalid format")}const L=new Uint8Array((1+ye)*z);let P=0,M=0;for(let Z=0;Z<z;++Z)L[P++]=0,L.set(Pe.subarray(M,M+ye),P),M+=ye,P+=ye;if(W===y.ImageKind.GRAYSCALE_1BPP&&he){P=0;for(let Z=0;Z<z;Z++){P++;for(let se=0;se<ye;se++)L[P++]^=255}}const E=new Uint8Array([Y>>24&255,Y>>16&255,Y>>8&255,Y&255,z>>24&255,z>>16&255,z>>8&255,z&255,ee,oe,0,0,0]),R=D(L),O=b.length+c*3+E.length+R.length,B=new Uint8Array(O);let F=0;return B.set(b,F),F+=b.length,T("IHDR",E,B,F),F+=c+E.length,T("IDATA",R,B,F),F+=c+R.length,T("IEND",new Uint8Array(0),B,F),n(B,"image/png",j)}return function(W,j,he){const Y=W.kind===void 0?y.ImageKind.GRAYSCALE_1BPP:W.kind;return _(W,Y,j,he)}}();class h{constructor(){this.fontSizeScale=1,this.fontWeight=k.fontWeight,this.fontSize=0,this.textMatrix=y.IDENTITY_MATRIX,this.fontMatrix=y.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=y.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=k.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(c,s){this.x=c,this.y=s}}function f(b){let c=[];const s=[];for(const x of b){if(x.fn==="save"){c.push({fnId:92,fn:"group",items:[]}),s.push(c),c=c.at(-1).items;continue}x.fn==="restore"?c=s.pop():c.push(x)}return c}function a(b){if(Number.isInteger(b))return b.toString();const c=b.toFixed(10);let s=c.length-1;if(c[s]!=="0")return c;do s--;while(c[s]==="0");return c.substring(0,c[s]==="."?s:s+1)}function r(b){if(b[4]===0&&b[5]===0){if(b[1]===0&&b[2]===0)return b[0]===1&&b[3]===1?"":`scale(${a(b[0])} ${a(b[3])})`;if(b[0]===b[3]&&b[1]===-b[2]){const c=Math.acos(b[0])*180/Math.PI;return`rotate(${a(c)})`}}else if(b[0]===1&&b[1]===0&&b[2]===0&&b[3]===1)return`translate(${a(b[4])} ${a(b[5])})`;return`matrix(${a(b[0])} ${a(b[1])} ${a(b[2])} ${a(b[3])} ${a(b[4])} ${a(b[5])})`}let o=0,m=0,v=0;class A{constructor(c,s){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(0,p.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new p.DOMSVGFactory,this.current=new h,this.transformMatrix=y.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=c,this.objs=s,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!x,this._operatorIdMapping=[];for(const T in y.OPS)this._operatorIdMapping[y.OPS[T]]=T}getObject(c){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof c=="string"?c.startsWith("g_")?this.commonObjs.get(c):this.objs.get(c):s}save(){this.transformStack.push(this.transformMatrix);const c=this.current;this.extraStack.push(c),this.current=c.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(c){this.save(),this.executeOpTree(c),this.restore()}loadDependencies(c){const s=c.fnArray,x=c.argsArray;for(let T=0,S=s.length;T<S;T++)if(s[T]===y.OPS.dependency)for(const D of x[T]){const I=D.startsWith("g_")?this.commonObjs:this.objs,_=new Promise(Q=>{I.get(D,Q)});this.current.dependencies.push(_)}return Promise.all(this.current.dependencies)}transform(c,s,x,T,S,D){const I=[c,s,x,T,S,D];this.transformMatrix=y.Util.transform(this.transformMatrix,I),this.tgrp=null}getSVG(c,s){this.viewport=s;const x=this._initialize(s);return this.loadDependencies(c).then(()=>(this.transformMatrix=y.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(c)),x))}convertOpList(c){const s=this._operatorIdMapping,x=c.argsArray,T=c.fnArray,S=[];for(let D=0,I=T.length;D<I;D++){const _=T[D];S.push({fnId:_,fn:s[_],args:x[D]})}return f(S)}executeOpTree(c){for(const s of c){const x=s.fn,T=s.fnId,S=s.args;switch(T|0){case y.OPS.beginText:this.beginText();break;case y.OPS.dependency:break;case y.OPS.setLeading:this.setLeading(S);break;case y.OPS.setLeadingMoveText:this.setLeadingMoveText(S[0],S[1]);break;case y.OPS.setFont:this.setFont(S);break;case y.OPS.showText:this.showText(S[0]);break;case y.OPS.showSpacedText:this.showText(S[0]);break;case y.OPS.endText:this.endText();break;case y.OPS.moveText:this.moveText(S[0],S[1]);break;case y.OPS.setCharSpacing:this.setCharSpacing(S[0]);break;case y.OPS.setWordSpacing:this.setWordSpacing(S[0]);break;case y.OPS.setHScale:this.setHScale(S[0]);break;case y.OPS.setTextMatrix:this.setTextMatrix(S[0],S[1],S[2],S[3],S[4],S[5]);break;case y.OPS.setTextRise:this.setTextRise(S[0]);break;case y.OPS.setTextRenderingMode:this.setTextRenderingMode(S[0]);break;case y.OPS.setLineWidth:this.setLineWidth(S[0]);break;case y.OPS.setLineJoin:this.setLineJoin(S[0]);break;case y.OPS.setLineCap:this.setLineCap(S[0]);break;case y.OPS.setMiterLimit:this.setMiterLimit(S[0]);break;case y.OPS.setFillRGBColor:this.setFillRGBColor(S[0],S[1],S[2]);break;case y.OPS.setStrokeRGBColor:this.setStrokeRGBColor(S[0],S[1],S[2]);break;case y.OPS.setStrokeColorN:this.setStrokeColorN(S);break;case y.OPS.setFillColorN:this.setFillColorN(S);break;case y.OPS.shadingFill:this.shadingFill(S[0]);break;case y.OPS.setDash:this.setDash(S[0],S[1]);break;case y.OPS.setRenderingIntent:this.setRenderingIntent(S[0]);break;case y.OPS.setFlatness:this.setFlatness(S[0]);break;case y.OPS.setGState:this.setGState(S[0]);break;case y.OPS.fill:this.fill();break;case y.OPS.eoFill:this.eoFill();break;case y.OPS.stroke:this.stroke();break;case y.OPS.fillStroke:this.fillStroke();break;case y.OPS.eoFillStroke:this.eoFillStroke();break;case y.OPS.clip:this.clip("nonzero");break;case y.OPS.eoClip:this.clip("evenodd");break;case y.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case y.OPS.paintImageXObject:this.paintImageXObject(S[0]);break;case y.OPS.paintInlineImageXObject:this.paintInlineImageXObject(S[0]);break;case y.OPS.paintImageMaskXObject:this.paintImageMaskXObject(S[0]);break;case y.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(S[0],S[1]);break;case y.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case y.OPS.closePath:this.closePath();break;case y.OPS.closeStroke:this.closeStroke();break;case y.OPS.closeFillStroke:this.closeFillStroke();break;case y.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case y.OPS.nextLine:this.nextLine();break;case y.OPS.transform:this.transform(S[0],S[1],S[2],S[3],S[4],S[5]);break;case y.OPS.constructPath:this.constructPath(S[0],S[1]);break;case y.OPS.endPath:this.endPath();break;case 92:this.group(s.items);break;default:(0,y.warn)(`Unimplemented operator ${x}`);break}}}setWordSpacing(c){this.current.wordSpacing=c}setCharSpacing(c){this.current.charSpacing=c}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(c,s,x,T,S,D){const I=this.current;I.textMatrix=I.lineMatrix=[c,s,x,T,S,D],I.textMatrixScale=Math.hypot(c,s),I.x=I.lineX=0,I.y=I.lineY=0,I.xcoords=[],I.ycoords=[],I.tspan=this.svgFactory.createElement("svg:tspan"),I.tspan.setAttributeNS(null,"font-family",I.fontFamily),I.tspan.setAttributeNS(null,"font-size",`${a(I.fontSize)}px`),I.tspan.setAttributeNS(null,"y",a(-I.y)),I.txtElement=this.svgFactory.createElement("svg:text"),I.txtElement.append(I.tspan)}beginText(){const c=this.current;c.x=c.lineX=0,c.y=c.lineY=0,c.textMatrix=y.IDENTITY_MATRIX,c.lineMatrix=y.IDENTITY_MATRIX,c.textMatrixScale=1,c.tspan=this.svgFactory.createElement("svg:tspan"),c.txtElement=this.svgFactory.createElement("svg:text"),c.txtgrp=this.svgFactory.createElement("svg:g"),c.xcoords=[],c.ycoords=[]}moveText(c,s){const x=this.current;x.x=x.lineX+=c,x.y=x.lineY+=s,x.xcoords=[],x.ycoords=[],x.tspan=this.svgFactory.createElement("svg:tspan"),x.tspan.setAttributeNS(null,"font-family",x.fontFamily),x.tspan.setAttributeNS(null,"font-size",`${a(x.fontSize)}px`),x.tspan.setAttributeNS(null,"y",a(-x.y))}showText(c){const s=this.current,x=s.font,T=s.fontSize;if(T===0)return;const S=s.fontSizeScale,D=s.charSpacing,I=s.wordSpacing,_=s.fontDirection,Q=s.textHScale*_,W=x.vertical,j=W?1:-1,he=x.defaultVMetrics,Y=T*s.fontMatrix[0];let z=0;for(const ye of c){if(ye===null){z+=_*I;continue}else if(typeof ye=="number"){z+=j*ye*T/1e3;continue}const Pe=(ye.isSpace?I:0)+D,L=ye.fontChar;let P,M,E=ye.width;if(W){let O;const B=ye.vmetric||he;O=ye.vmetric?B[1]:E*.5,O=-O*Y;const F=B[2]*Y;E=B?-B[0]:E,P=O/S,M=(z+F)/S}else P=z/S,M=0;(ye.isInFont||x.missingFile)&&(s.xcoords.push(s.x+P),W&&s.ycoords.push(-s.y+M),s.tspan.textContent+=L);const R=W?E*Y-Pe*_:E*Y+Pe*_;z+=R}s.tspan.setAttributeNS(null,"x",s.xcoords.map(a).join(" ")),W?s.tspan.setAttributeNS(null,"y",s.ycoords.map(a).join(" ")):s.tspan.setAttributeNS(null,"y",a(-s.y)),W?s.y-=z:s.x+=z*Q,s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size",`${a(s.fontSize)}px`),s.fontStyle!==k.fontStyle&&s.tspan.setAttributeNS(null,"font-style",s.fontStyle),s.fontWeight!==k.fontWeight&&s.tspan.setAttributeNS(null,"font-weight",s.fontWeight);const ee=s.textRenderingMode&y.TextRenderingMode.FILL_STROKE_MASK;if(ee===y.TextRenderingMode.FILL||ee===y.TextRenderingMode.FILL_STROKE?(s.fillColor!==k.fillColor&&s.tspan.setAttributeNS(null,"fill",s.fillColor),s.fillAlpha<1&&s.tspan.setAttributeNS(null,"fill-opacity",s.fillAlpha)):s.textRenderingMode===y.TextRenderingMode.ADD_TO_PATH?s.tspan.setAttributeNS(null,"fill","transparent"):s.tspan.setAttributeNS(null,"fill","none"),ee===y.TextRenderingMode.STROKE||ee===y.TextRenderingMode.FILL_STROKE){const ye=1/(s.textMatrixScale||1);this._setStrokeAttributes(s.tspan,ye)}let oe=s.textMatrix;s.textRise!==0&&(oe=oe.slice(),oe[5]+=s.textRise),s.txtElement.setAttributeNS(null,"transform",`${r(oe)} scale(${a(Q)}, -1)`),s.txtElement.setAttributeNS(u,"xml:space","preserve"),s.txtElement.append(s.tspan),s.txtgrp.append(s.txtElement),this._ensureTransformGroup().append(s.txtElement)}setLeadingMoveText(c,s){this.setLeading(-s),this.moveText(c,s)}addFontStyle(c){if(!c.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const s=n(c.data,c.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${c.loadedName}"; src: url(${s}); }
`}setFont(c){const s=this.current,x=this.commonObjs.get(c[0]);let T=c[1];s.font=x,this.embedFonts&&!x.missingFile&&!this.embeddedFonts[x.loadedName]&&(this.addFontStyle(x),this.embeddedFonts[x.loadedName]=x),s.fontMatrix=x.fontMatrix||y.FONT_IDENTITY_MATRIX;let S="normal";x.black?S="900":x.bold&&(S="bold");const D=x.italic?"italic":"normal";T<0?(T=-T,s.fontDirection=-1):s.fontDirection=1,s.fontSize=T,s.fontFamily=x.loadedName,s.fontWeight=S,s.fontStyle=D,s.tspan=this.svgFactory.createElement("svg:tspan"),s.tspan.setAttributeNS(null,"y",a(-s.y)),s.xcoords=[],s.ycoords=[]}endText(){var s;const c=this.current;c.textRenderingMode&y.TextRenderingMode.ADD_TO_PATH_FLAG&&((s=c.txtElement)!=null&&s.hasChildNodes())&&(c.element=c.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(c){c>0&&(this.current.lineWidth=c)}setLineCap(c){this.current.lineCap=e[c]}setLineJoin(c){this.current.lineJoin=i[c]}setMiterLimit(c){this.current.miterLimit=c}setStrokeAlpha(c){this.current.strokeAlpha=c}setStrokeRGBColor(c,s,x){this.current.strokeColor=y.Util.makeHexColor(c,s,x)}setFillAlpha(c){this.current.fillAlpha=c}setFillRGBColor(c,s,x){this.current.fillColor=y.Util.makeHexColor(c,s,x),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(c){this.current.strokeColor=this._makeColorN_Pattern(c)}setFillColorN(c){this.current.fillColor=this._makeColorN_Pattern(c)}shadingFill(c){const{width:s,height:x}=this.viewport,T=y.Util.inverseTransform(this.transformMatrix),[S,D,I,_]=y.Util.getAxialAlignedBoundingBox([0,0,s,x],T),Q=this.svgFactory.createElement("svg:rect");Q.setAttributeNS(null,"x",S),Q.setAttributeNS(null,"y",D),Q.setAttributeNS(null,"width",I-S),Q.setAttributeNS(null,"height",_-D),Q.setAttributeNS(null,"fill",this._makeShadingPattern(c)),this.current.fillAlpha<1&&Q.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Q)}_makeColorN_Pattern(c){return c[0]==="TilingPattern"?this._makeTilingPattern(c):this._makeShadingPattern(c)}_makeTilingPattern(c){const s=c[1],x=c[2],T=c[3]||y.IDENTITY_MATRIX,[S,D,I,_]=c[4],Q=c[5],W=c[6],j=c[7],he=`shading${v++}`,[Y,z,ee,oe]=y.Util.normalizeRect([...y.Util.applyTransform([S,D],T),...y.Util.applyTransform([I,_],T)]),[ye,Pe]=y.Util.singularValueDecompose2dScale(T),L=Q*ye,P=W*Pe,M=this.svgFactory.createElement("svg:pattern");M.setAttributeNS(null,"id",he),M.setAttributeNS(null,"patternUnits","userSpaceOnUse"),M.setAttributeNS(null,"width",L),M.setAttributeNS(null,"height",P),M.setAttributeNS(null,"x",`${Y}`),M.setAttributeNS(null,"y",`${z}`);const E=this.svg,R=this.transformMatrix,O=this.current.fillColor,B=this.current.strokeColor,F=this.svgFactory.create(ee-Y,oe-z);if(this.svg=F,this.transformMatrix=T,j===2){const Z=y.Util.makeHexColor(...s);this.current.fillColor=Z,this.current.strokeColor=Z}return this.executeOpTree(this.convertOpList(x)),this.svg=E,this.transformMatrix=R,this.current.fillColor=O,this.current.strokeColor=B,M.append(F.childNodes[0]),this.defs.append(M),`url(#${he})`}_makeShadingPattern(c){switch(typeof c=="string"&&(c=this.objs.get(c)),c[0]){case"RadialAxial":const s=`shading${v++}`,x=c[3];let T;switch(c[1]){case"axial":const S=c[4],D=c[5];T=this.svgFactory.createElement("svg:linearGradient"),T.setAttributeNS(null,"id",s),T.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),T.setAttributeNS(null,"x1",S[0]),T.setAttributeNS(null,"y1",S[1]),T.setAttributeNS(null,"x2",D[0]),T.setAttributeNS(null,"y2",D[1]);break;case"radial":const I=c[4],_=c[5],Q=c[6],W=c[7];T=this.svgFactory.createElement("svg:radialGradient"),T.setAttributeNS(null,"id",s),T.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),T.setAttributeNS(null,"cx",_[0]),T.setAttributeNS(null,"cy",_[1]),T.setAttributeNS(null,"r",W),T.setAttributeNS(null,"fx",I[0]),T.setAttributeNS(null,"fy",I[1]),T.setAttributeNS(null,"fr",Q);break;default:throw new Error(`Unknown RadialAxial type: ${c[1]}`)}for(const S of x){const D=this.svgFactory.createElement("svg:stop");D.setAttributeNS(null,"offset",S[0]),D.setAttributeNS(null,"stop-color",S[1]),T.append(D)}return this.defs.append(T),`url(#${s})`;case"Mesh":return(0,y.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${c[0]}`)}}setDash(c,s){this.current.dashArray=c,this.current.dashPhase=s}constructPath(c,s){const x=this.current;let T=x.x,S=x.y,D=[],I=0;for(const _ of c)switch(_|0){case y.OPS.rectangle:T=s[I++],S=s[I++];const Q=s[I++],W=s[I++],j=T+Q,he=S+W;D.push("M",a(T),a(S),"L",a(j),a(S),"L",a(j),a(he),"L",a(T),a(he),"Z");break;case y.OPS.moveTo:T=s[I++],S=s[I++],D.push("M",a(T),a(S));break;case y.OPS.lineTo:T=s[I++],S=s[I++],D.push("L",a(T),a(S));break;case y.OPS.curveTo:T=s[I+4],S=s[I+5],D.push("C",a(s[I]),a(s[I+1]),a(s[I+2]),a(s[I+3]),a(T),a(S)),I+=6;break;case y.OPS.curveTo2:D.push("C",a(T),a(S),a(s[I]),a(s[I+1]),a(s[I+2]),a(s[I+3])),T=s[I+2],S=s[I+3],I+=4;break;case y.OPS.curveTo3:T=s[I+2],S=s[I+3],D.push("C",a(s[I]),a(s[I+1]),a(T),a(S),a(T),a(S)),I+=4;break;case y.OPS.closePath:D.push("Z");break}D=D.join(" "),x.path&&c.length>0&&c[0]!==y.OPS.rectangle&&c[0]!==y.OPS.moveTo?D=x.path.getAttributeNS(null,"d")+D:(x.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(x.path)),x.path.setAttributeNS(null,"d",D),x.path.setAttributeNS(null,"fill","none"),x.element=x.path,x.setCurrentPoint(T,S)}endPath(){const c=this.current;if(c.path=null,!this.pendingClip)return;if(!c.element){this.pendingClip=null;return}const s=`clippath${o++}`,x=this.svgFactory.createElement("svg:clipPath");x.setAttributeNS(null,"id",s),x.setAttributeNS(null,"transform",r(this.transformMatrix));const T=c.element.cloneNode(!0);if(this.pendingClip==="evenodd"?T.setAttributeNS(null,"clip-rule","evenodd"):T.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,x.append(T),this.defs.append(x),c.activeClipUrl){c.clipGroup=null;for(const S of this.extraStack)S.clipGroup=null;x.setAttributeNS(null,"clip-path",c.activeClipUrl)}c.activeClipUrl=`url(#${s})`,this.tgrp=null}clip(c){this.pendingClip=c}closePath(){const c=this.current;if(c.path){const s=`${c.path.getAttributeNS(null,"d")}Z`;c.path.setAttributeNS(null,"d",s)}}setLeading(c){this.current.leading=-c}setTextRise(c){this.current.textRise=c}setTextRenderingMode(c){this.current.textRenderingMode=c}setHScale(c){this.current.textHScale=c/100}setRenderingIntent(c){}setFlatness(c){}setGState(c){for(const[s,x]of c)switch(s){case"LW":this.setLineWidth(x);break;case"LC":this.setLineCap(x);break;case"LJ":this.setLineJoin(x);break;case"ML":this.setMiterLimit(x);break;case"D":this.setDash(x[0],x[1]);break;case"RI":this.setRenderingIntent(x);break;case"FL":this.setFlatness(x);break;case"Font":this.setFont(x);break;case"CA":this.setStrokeAlpha(x);break;case"ca":this.setFillAlpha(x);break;default:(0,y.warn)(`Unimplemented graphic state operator ${s}`);break}}fill(){const c=this.current;c.element&&(c.element.setAttributeNS(null,"fill",c.fillColor),c.element.setAttributeNS(null,"fill-opacity",c.fillAlpha),this.endPath())}stroke(){const c=this.current;c.element&&(this._setStrokeAttributes(c.element),c.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(c){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const x=this.current;let T=x.dashArray;s!==1&&T.length>0&&(T=T.map(function(S){return s*S})),c.setAttributeNS(null,"stroke",x.strokeColor),c.setAttributeNS(null,"stroke-opacity",x.strokeAlpha),c.setAttributeNS(null,"stroke-miterlimit",a(x.miterLimit)),c.setAttributeNS(null,"stroke-linecap",x.lineCap),c.setAttributeNS(null,"stroke-linejoin",x.lineJoin),c.setAttributeNS(null,"stroke-width",a(s*x.lineWidth)+"px"),c.setAttributeNS(null,"stroke-dasharray",T.map(a).join(" ")),c.setAttributeNS(null,"stroke-dashoffset",a(s*x.dashPhase)+"px")}eoFill(){var c;(c=this.current.element)==null||c.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var c;(c=this.current.element)==null||c.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x","0"),c.setAttributeNS(null,"y","0"),c.setAttributeNS(null,"width","1px"),c.setAttributeNS(null,"height","1px"),c.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(c)}paintImageXObject(c){const s=this.getObject(c);if(!s){(0,y.warn)(`Dependent image with object ID ${c} is not ready yet`);return}this.paintInlineImageXObject(s)}paintInlineImageXObject(c,s){const x=c.width,T=c.height,S=d(c,this.forceDataSchema,!!s),D=this.svgFactory.createElement("svg:rect");D.setAttributeNS(null,"x","0"),D.setAttributeNS(null,"y","0"),D.setAttributeNS(null,"width",a(x)),D.setAttributeNS(null,"height",a(T)),this.current.element=D,this.clip("nonzero");const I=this.svgFactory.createElement("svg:image");I.setAttributeNS(g,"xlink:href",S),I.setAttributeNS(null,"x","0"),I.setAttributeNS(null,"y",a(-T)),I.setAttributeNS(null,"width",a(x)+"px"),I.setAttributeNS(null,"height",a(T)+"px"),I.setAttributeNS(null,"transform",`scale(${a(1/x)} ${a(-1/T)})`),s?s.append(I):this._ensureTransformGroup().append(I)}paintImageMaskXObject(c){const s=this.getObject(c.data,c);if(s.bitmap){(0,y.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const x=this.current,T=s.width,S=s.height,D=x.fillColor;x.maskId=`mask${m++}`;const I=this.svgFactory.createElement("svg:mask");I.setAttributeNS(null,"id",x.maskId);const _=this.svgFactory.createElement("svg:rect");_.setAttributeNS(null,"x","0"),_.setAttributeNS(null,"y","0"),_.setAttributeNS(null,"width",a(T)),_.setAttributeNS(null,"height",a(S)),_.setAttributeNS(null,"fill",D),_.setAttributeNS(null,"mask",`url(#${x.maskId})`),this.defs.append(I),this._ensureTransformGroup().append(_),this.paintInlineImageXObject(s,I)}paintFormXObjectBegin(c,s){if(Array.isArray(c)&&c.length===6&&this.transform(c[0],c[1],c[2],c[3],c[4],c[5]),s){const x=s[2]-s[0],T=s[3]-s[1],S=this.svgFactory.createElement("svg:rect");S.setAttributeNS(null,"x",s[0]),S.setAttributeNS(null,"y",s[1]),S.setAttributeNS(null,"width",a(x)),S.setAttributeNS(null,"height",a(T)),this.current.element=S,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(c){const s=this.svgFactory.create(c.width,c.height),x=this.svgFactory.createElement("svg:defs");s.append(x),this.defs=x;const T=this.svgFactory.createElement("svg:g");return T.setAttributeNS(null,"transform",r(c.transform)),s.append(T),this.svg=T,s}_ensureClipGroup(){if(!this.current.clipGroup){const c=this.svgFactory.createElement("svg:g");c.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(c),this.current.clipGroup=c}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",r(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}w.SVGGraphics=A},(N,w,t)=>{var p=t(3),y=t(188),k=t(193);p({target:"Array",proto:!0},{group:function(g){var e=arguments.length>1?arguments[1]:void 0;return y(this,g,e)}}),k("group")},(N,w,t)=>{var p=t(99),y=t(14),k=t(13),u=t(40),g=t(18),e=t(64),i=t(189),n=t(108),d=Array,h=y([].push);N.exports=function(f,a,r,o){for(var m=u(f),v=k(m),A=p(a,r),b=i(null),c=e(v),s=0,x,T,S;c>s;s++)S=v[s],T=g(A(S,s,m)),T in b?h(b[T],S):b[T]=[S];if(o&&(x=o(m),x!==d))for(T in b)b[T]=n(x,b[T]);return b}},(N,w,t)=>{var p=t(47),y=t(190),k=t(66),u=t(55),g=t(192),e=t(43),i=t(54),n=">",d="<",h="prototype",f="script",a=i("IE_PROTO"),r=function(){},o=function(c){return d+f+n+c+d+"/"+f+n},m=function(c){c.write(o("")),c.close();var s=c.parentWindow.Object;return c=null,s},v=function(){var c=e("iframe"),s="java"+f+":",x;return c.style.display="none",g.appendChild(c),c.src=String(s),x=c.contentWindow.document,x.open(),x.write(o("document.F=Object")),x.close(),x.F},A,b=function(){try{A=new ActiveXObject("htmlfile")}catch{}b=typeof document<"u"?document.domain&&A?m(A):v():m(A);for(var c=k.length;c--;)delete b[h][k[c]];return b()};u[a]=!0,N.exports=Object.create||function(s,x){var T;return s!==null?(r[h]=p(s),T=new r,r[h]=null,T[a]=s):T=b(),x===void 0?T:y.f(T,x)}},(N,w,t)=>{var p=t(6),y=t(46),k=t(45),u=t(47),g=t(12),e=t(191);w.f=p&&!y?Object.defineProperties:function(n,d){u(n);for(var h=g(d),f=e(d),a=f.length,r=0,o;a>r;)k.f(n,o=f[r++],h[o]);return n}},(N,w,t)=>{var p=t(59),y=t(66);N.exports=Object.keys||function(u){return p(u,y)}},(N,w,t)=>{var p=t(24);N.exports=p("document","documentElement")},(N,w,t)=>{var p=t(34),y=t(189),k=t(45).f,u=p("unscopables"),g=Array.prototype;g[u]===void 0&&k(g,u,{configurable:!0,value:y(null)}),N.exports=function(e){g[u][e]=!0}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.XfaText=void 0,t(89);class p{static textContent(k){const u=[],g={items:u,styles:Object.create(null)};function e(i){var h;if(!i)return;let n=null;const d=i.name;if(d==="#text")n=i.value;else if(p.shouldBuildText(d))(h=i==null?void 0:i.attributes)!=null&&h.textContent?n=i.attributes.textContent:i.value&&(n=i.value);else return;if(n!==null&&u.push({str:n}),!!i.children)for(const f of i.children)e(f)}return e(k),g}static shouldBuildText(k){return!(k==="textarea"||k==="input"||k==="option"||k==="select")}}w.XfaText=p},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.TextLayerRenderTask=void 0,w.renderTextLayer=r,w.updateTextLayer=o,t(89),t(2);var p=t(1),y=t(168);const k=1e5,u=30,g=.8,e=new Map;function i(m,v){let A;if(v&&p.FeatureTest.isOffscreenCanvasSupported)A=new OffscreenCanvas(m,m).getContext("2d",{alpha:!1});else{const b=document.createElement("canvas");b.width=b.height=m,A=b.getContext("2d",{alpha:!1})}return A}function n(m,v){const A=e.get(m);if(A)return A;const b=i(u,v);b.font=`${u}px ${m}`;const c=b.measureText("");let s=c.fontBoundingBoxAscent,x=Math.abs(c.fontBoundingBoxDescent);if(s){const S=s/(s+x);return e.set(m,S),b.canvas.width=b.canvas.height=0,S}b.strokeStyle="red",b.clearRect(0,0,u,u),b.strokeText("g",0,0);let T=b.getImageData(0,0,u,u).data;x=0;for(let S=T.length-1-3;S>=0;S-=4)if(T[S]>0){x=Math.ceil(S/4/u);break}b.clearRect(0,0,u,u),b.strokeText("A",0,u),T=b.getImageData(0,0,u,u).data,s=0;for(let S=0,D=T.length;S<D;S+=4)if(T[S]>0){s=u-Math.floor(S/4/u);break}if(b.canvas.width=b.canvas.height=0,s){const S=s/(s+x);return e.set(m,S),S}return e.set(m,g),g}function d(m,v,A){const b=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:v.str!=="",hasEOL:v.hasEOL,fontSize:0};m._textDivs.push(b);const s=p.Util.transform(m._transform,v.transform);let x=Math.atan2(s[1],s[0]);const T=A[v.fontName];T.vertical&&(x+=Math.PI/2);const S=Math.hypot(s[2],s[3]),D=S*n(T.fontFamily,m._isOffscreenCanvasSupported);let I,_;x===0?(I=s[4],_=s[5]-D):(I=s[4]+D*Math.sin(x),_=s[5]-D*Math.cos(x));const Q="calc(var(--scale-factor)*",W=b.style;m._container===m._rootContainer?(W.left=`${(100*I/m._pageWidth).toFixed(2)}%`,W.top=`${(100*_/m._pageHeight).toFixed(2)}%`):(W.left=`${Q}${I.toFixed(2)}px)`,W.top=`${Q}${_.toFixed(2)}px)`),W.fontSize=`${Q}${S.toFixed(2)}px)`,W.fontFamily=T.fontFamily,c.fontSize=S,b.setAttribute("role","presentation"),b.textContent=v.str,b.dir=v.dir,m._fontInspectorEnabled&&(b.dataset.fontName=v.fontName),x!==0&&(c.angle=x*(180/Math.PI));let j=!1;if(v.str.length>1)j=!0;else if(v.str!==" "&&v.transform[0]!==v.transform[3]){const he=Math.abs(v.transform[0]),Y=Math.abs(v.transform[3]);he!==Y&&Math.max(he,Y)/Math.min(he,Y)>1.5&&(j=!0)}j&&(c.canvasWidth=T.vertical?v.height:v.width),m._textDivProperties.set(b,c),m._isReadableStream&&m._layoutText(b)}function h(m){const{div:v,scale:A,properties:b,ctx:c,prevFontSize:s,prevFontFamily:x}=m,{style:T}=v;let S="";if(b.canvasWidth!==0&&b.hasText){const{fontFamily:D}=T,{canvasWidth:I,fontSize:_}=b;(s!==_||x!==D)&&(c.font=`${_*A}px ${D}`,m.prevFontSize=_,m.prevFontFamily=D);const{width:Q}=c.measureText(v.textContent);Q>0&&(S=`scaleX(${I*A/Q})`)}b.angle!==0&&(S=`rotate(${b.angle}deg) ${S}`),S.length>0&&(T.transform=S)}function f(m){if(m._canceled)return;const v=m._textDivs,A=m._capability;if(v.length>k){A.resolve();return}if(!m._isReadableStream)for(const c of v)m._layoutText(c);A.resolve()}class a{constructor(v){var W;let{textContentSource:A,container:b,viewport:c,textDivs:s,textDivProperties:x,textContentItemsStr:T,isOffscreenCanvasSupported:S}=v;this._textContentSource=A,this._isReadableStream=A instanceof ReadableStream,this._container=this._rootContainer=b,this._textDivs=s||[],this._textContentItemsStr=T||[],this._isOffscreenCanvasSupported=S,this._fontInspectorEnabled=!!((W=globalThis.FontInspector)!=null&&W.enabled),this._reader=null,this._textDivProperties=x||new WeakMap,this._canceled=!1,this._capability=new p.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:c.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:i(0,S)};const{pageWidth:D,pageHeight:I,pageX:_,pageY:Q}=c.rawDims;this._transform=[1,0,0,-1,-_,Q+I],this._pageWidth=D,this._pageHeight=I,(0,y.setLayerDimensions)(b,c),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new p.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new p.AbortException("TextLayer task cancelled."))}_processItems(v,A){for(const b of v){if(b.str===void 0){if(b.type==="beginMarkedContentProps"||b.type==="beginMarkedContent"){const c=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),b.id!==null&&this._container.setAttribute("id",`${b.id}`),c.append(this._container)}else b.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(b.str),d(this,b,A)}}_layoutText(v){const A=this._layoutTextParams.properties=this._textDivProperties.get(v);if(this._layoutTextParams.div=v,h(this._layoutTextParams),A.hasText&&this._container.append(v),A.hasEOL){const b=document.createElement("br");b.setAttribute("role","presentation"),this._container.append(b)}}_render(){const v=new p.PromiseCapability;let A=Object.create(null);if(this._isReadableStream){const b=()=>{this._reader.read().then(c=>{let{value:s,done:x}=c;if(x){v.resolve();return}Object.assign(A,s.styles),this._processItems(s.items,A),b()},v.reject)};this._reader=this._textContentSource.getReader(),b()}else if(this._textContentSource){const{items:b,styles:c}=this._textContentSource;this._processItems(b,c),v.resolve()}else throw new Error('No "textContentSource" parameter specified.');v.promise.then(()=>{A=null,f(this)},this._capability.reject)}}w.TextLayerRenderTask=a;function r(m){!m.textContentSource&&(m.textContent||m.textContentStream)&&((0,y.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),m.textContentSource=m.textContent||m.textContentStream);const{container:v,viewport:A}=m,b=getComputedStyle(v),c=b.getPropertyValue("visibility"),s=parseFloat(b.getPropertyValue("--scale-factor"));c==="visible"&&(!s||Math.abs(s-A.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const x=new a(m);return x._render(),x}function o(m){let{container:v,viewport:A,textDivs:b,textDivProperties:c,isOffscreenCanvasSupported:s,mustRotate:x=!0,mustRescale:T=!0}=m;if(x&&(0,y.setLayerDimensions)(v,{rotation:A.rotation}),T){const S=i(0,s),I={prevFontSize:null,prevFontFamily:null,div:null,scale:A.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:S};for(const _ of b)I.properties=c.get(_),I.div=_,h(I)}}},(N,w,t)=>{var n,d,h,f,a,r,o,m,v,A,b,pn,s,Ft,T,gn,D,mn;Object.defineProperty(w,"__esModule",{value:!0}),w.AnnotationEditorLayer=void 0,t(125),t(136),t(138),t(141),t(143),t(145),t(147);var p=t(1),y=t(164),k=t(197),u=t(202),g=t(168),e=t(203);const _=class _{constructor(W){$(this,b);$(this,s);$(this,T);$(this,D);$(this,n,void 0);$(this,d,!1);$(this,h,null);$(this,f,this.pointerup.bind(this));$(this,a,this.pointerdown.bind(this));$(this,r,new Map);$(this,o,!1);$(this,m,!1);$(this,v,!1);$(this,A,void 0);let{uiManager:j,pageIndex:he,div:Y,accessibilityManager:z,annotationLayer:ee,viewport:oe,l10n:ye}=W;const Pe=[k.FreeTextEditor,u.InkEditor,e.StampEditor];if(!_._initialized){_._initialized=!0;for(const L of Pe)L.initialize(ye)}j.registerEditorTypes(Pe),le(this,A,j),this.pageIndex=he,this.div=Y,le(this,n,z),le(this,h,ee),this.viewport=oe,l(this,A).addLayer(this)}get isEmpty(){return l(this,r).size===0}updateToolbar(W){l(this,A).updateToolbar(W)}updateMode(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l(this,A).getMode();J(this,D,mn).call(this),W===p.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),W!==p.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",W===p.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",W===p.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",W===p.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(W){if(!W&&l(this,A).getMode()!==p.AnnotationEditorType.INK)return;if(!W){for(const he of l(this,r).values())if(he.isEmpty()){he.setInBackground();return}}J(this,s,Ft).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(W){l(this,A).setEditingState(W)}addCommands(W){l(this,A).addCommands(W)}enable(){this.div.style.pointerEvents="auto";const W=new Set;for(const he of l(this,r).values())he.enableEditing(),he.annotationElementId&&W.add(he.annotationElementId);if(!l(this,h))return;const j=l(this,h).getEditableAnnotations();for(const he of j){if(he.hide(),l(this,A).isDeletedAnnotationElement(he.data.id)||W.has(he.data.id))continue;const Y=this.deserialize(he);Y&&(this.addOrRebuild(Y),Y.enableEditing())}}disable(){var j;le(this,v,!0),this.div.style.pointerEvents="none";const W=new Set;for(const he of l(this,r).values()){if(he.disableEditing(),!he.annotationElementId||he.serialize()!==null){W.add(he.annotationElementId);continue}(j=this.getEditableAnnotation(he.annotationElementId))==null||j.show(),he.remove()}if(l(this,h)){const he=l(this,h).getEditableAnnotations();for(const Y of he){const{id:z}=Y.data;W.has(z)||l(this,A).isDeletedAnnotationElement(z)||Y.show()}}J(this,D,mn).call(this),this.isEmpty&&(this.div.hidden=!0),le(this,v,!1)}getEditableAnnotation(W){var j;return((j=l(this,h))==null?void 0:j.getEditableAnnotation(W))||null}setActiveEditor(W){l(this,A).getActive()!==W&&l(this,A).setActiveEditor(W)}enableClick(){this.div.addEventListener("pointerdown",l(this,a)),this.div.addEventListener("pointerup",l(this,f))}disableClick(){this.div.removeEventListener("pointerdown",l(this,a)),this.div.removeEventListener("pointerup",l(this,f))}attach(W){l(this,r).set(W.id,W);const{annotationElementId:j}=W;j&&l(this,A).isDeletedAnnotationElement(j)&&l(this,A).removeDeletedAnnotationElement(W)}detach(W){var j;l(this,r).delete(W.id),(j=l(this,n))==null||j.removePointerInTextLayer(W.contentDiv),!l(this,v)&&W.annotationElementId&&l(this,A).addDeletedAnnotationElement(W)}remove(W){this.detach(W),l(this,A).removeEditor(W),W.div.contains(document.activeElement)&&setTimeout(()=>{l(this,A).focusMainContainer()},0),W.div.remove(),W.isAttachedToDOM=!1,l(this,m)||this.addInkEditorIfNeeded(!1)}changeParent(W){var j;W.parent!==this&&(W.annotationElementId&&(l(this,A).addDeletedAnnotationElement(W.annotationElementId),y.AnnotationEditor.deleteAnnotationElement(W),W.annotationElementId=null),this.attach(W),(j=W.parent)==null||j.detach(W),W.setParent(this),W.div&&W.isAttachedToDOM&&(W.div.remove(),this.div.append(W.div)))}add(W){if(this.changeParent(W),l(this,A).addEditor(W),this.attach(W),!W.isAttachedToDOM){const j=W.render();this.div.append(j),W.isAttachedToDOM=!0}W.fixAndSetPosition(),W.onceAdded(),l(this,A).addToAnnotationStorage(W)}moveEditorInDOM(W){var he;if(!W.isAttachedToDOM)return;const{activeElement:j}=document;W.div.contains(j)&&(W._focusEventsAllowed=!1,setTimeout(()=>{W.div.contains(document.activeElement)?W._focusEventsAllowed=!0:(W.div.addEventListener("focusin",()=>{W._focusEventsAllowed=!0},{once:!0}),j.focus())},0)),W._structTreeParentId=(he=l(this,n))==null?void 0:he.moveElementInDOM(this.div,W.div,W.contentDiv,!0)}addOrRebuild(W){W.needsToBeRebuilt()?W.rebuild():this.add(W)}addUndoableEditor(W){const j=()=>W._uiManager.rebuild(W),he=()=>{W.remove()};this.addCommands({cmd:j,undo:he,mustExec:!1})}getNextId(){return l(this,A).getId()}pasteEditor(W,j){l(this,A).updateToolbar(W),l(this,A).updateMode(W);const{offsetX:he,offsetY:Y}=J(this,T,gn).call(this),z=this.getNextId(),ee=J(this,b,pn).call(this,{parent:this,id:z,x:he,y:Y,uiManager:l(this,A),isCentered:!0,...j});ee&&this.add(ee)}deserialize(W){switch(W.annotationType??W.annotationEditorType){case p.AnnotationEditorType.FREETEXT:return k.FreeTextEditor.deserialize(W,this,l(this,A));case p.AnnotationEditorType.INK:return u.InkEditor.deserialize(W,this,l(this,A));case p.AnnotationEditorType.STAMP:return e.StampEditor.deserialize(W,this,l(this,A))}return null}addNewEditor(){J(this,s,Ft).call(this,J(this,T,gn).call(this),!0)}setSelected(W){l(this,A).setSelected(W)}toggleSelected(W){l(this,A).toggleSelected(W)}isSelected(W){return l(this,A).isSelected(W)}unselect(W){l(this,A).unselect(W)}pointerup(W){const{isMac:j}=p.FeatureTest.platform;if(!(W.button!==0||W.ctrlKey&&j)&&W.target===this.div&&l(this,o)){if(le(this,o,!1),!l(this,d)){le(this,d,!0);return}if(l(this,A).getMode()===p.AnnotationEditorType.STAMP){l(this,A).unselectAll();return}J(this,s,Ft).call(this,W,!1)}}pointerdown(W){if(l(this,o)){le(this,o,!1);return}const{isMac:j}=p.FeatureTest.platform;if(W.button!==0||W.ctrlKey&&j||W.target!==this.div)return;le(this,o,!0);const he=l(this,A).getActive();le(this,d,!he||he.isEmpty())}findNewParent(W,j,he){const Y=l(this,A).findParent(j,he);return Y===null||Y===this?!1:(Y.changeParent(W),!0)}destroy(){var W,j;((W=l(this,A).getActive())==null?void 0:W.parent)===this&&(l(this,A).commitOrRemove(),l(this,A).setActiveEditor(null));for(const he of l(this,r).values())(j=l(this,n))==null||j.removePointerInTextLayer(he.contentDiv),he.setParent(null),he.isAttachedToDOM=!1,he.div.remove();this.div=null,l(this,r).clear(),l(this,A).removeLayer(this)}render(W){let{viewport:j}=W;this.viewport=j,(0,g.setLayerDimensions)(this.div,j);for(const he of l(this,A).getEditors(this.pageIndex))this.add(he);this.updateMode()}update(W){let{viewport:j}=W;l(this,A).commitOrRemove(),this.viewport=j,(0,g.setLayerDimensions)(this.div,{rotation:j.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:W,pageHeight:j}=this.viewport.rawDims;return[W,j]}};n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakMap,A=new WeakMap,b=new WeakSet,pn=function(W){switch(l(this,A).getMode()){case p.AnnotationEditorType.FREETEXT:return new k.FreeTextEditor(W);case p.AnnotationEditorType.INK:return new u.InkEditor(W);case p.AnnotationEditorType.STAMP:return new e.StampEditor(W)}return null},s=new WeakSet,Ft=function(W,j){const he=this.getNextId(),Y=J(this,b,pn).call(this,{parent:this,id:he,x:W.offsetX,y:W.offsetY,uiManager:l(this,A),isCentered:j});return Y&&this.add(Y),Y},T=new WeakSet,gn=function(){const{x:W,y:j,width:he,height:Y}=this.div.getBoundingClientRect(),z=Math.max(0,W),ee=Math.max(0,j),oe=Math.min(window.innerWidth,W+he),ye=Math.min(window.innerHeight,j+Y),Pe=(z+oe)/2-W,L=(ee+ye)/2-j,[P,M]=this.viewport.rotation%180===0?[Pe,L]:[L,Pe];return{offsetX:P,offsetY:M}},D=new WeakSet,mn=function(){le(this,m,!0);for(const W of l(this,r).values())W.isEmpty()&&W.remove();le(this,m,!1)},tt(_,"_initialized",!1);let i=_;w.AnnotationEditorLayer=i},(N,w,t)=>{var e,i,n,d,h,f,a,r,o,m,ur,A,dr,c,fr,x,Et,S,vn,I,pr,Q,bn;Object.defineProperty(w,"__esModule",{value:!0}),w.FreeTextEditor=void 0,t(89);var p=t(1),y=t(165),k=t(164),u=t(198);const j=class j extends k.AnnotationEditor{constructor(z){super({...z,name:"freeTextEditor"});$(this,m);$(this,A);$(this,c);$(this,x);$(this,S);$(this,I);$(this,Q);$(this,e,this.editorDivBlur.bind(this));$(this,i,this.editorDivFocus.bind(this));$(this,n,this.editorDivInput.bind(this));$(this,d,this.editorDivKeydown.bind(this));$(this,h,void 0);$(this,f,"");$(this,a,`${this.id}-editor`);$(this,r,void 0);$(this,o,null);le(this,h,z.color||j._defaultColor||k.AnnotationEditor._defaultLineColor),le(this,r,z.fontSize||j._defaultFontSize)}static get _keyboardManager(){const z=j.prototype,ee=Pe=>Pe.isEmpty(),oe=y.AnnotationEditorUIManager.TRANSLATE_SMALL,ye=y.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,p.shadow)(this,"_keyboardManager",new y.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],z.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],z.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],z._translateEmpty,{args:[-oe,0],checker:ee}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],z._translateEmpty,{args:[-ye,0],checker:ee}],[["ArrowRight","mac+ArrowRight"],z._translateEmpty,{args:[oe,0],checker:ee}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],z._translateEmpty,{args:[ye,0],checker:ee}],[["ArrowUp","mac+ArrowUp"],z._translateEmpty,{args:[0,-oe],checker:ee}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],z._translateEmpty,{args:[0,-ye],checker:ee}],[["ArrowDown","mac+ArrowDown"],z._translateEmpty,{args:[0,oe],checker:ee}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],z._translateEmpty,{args:[0,ye],checker:ee}]]))}static initialize(z){k.AnnotationEditor.initialize(z,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const ee=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(ee.getPropertyValue("--freetext-padding"))}static updateDefaultParams(z,ee){switch(z){case p.AnnotationEditorParamsType.FREETEXT_SIZE:j._defaultFontSize=ee;break;case p.AnnotationEditorParamsType.FREETEXT_COLOR:j._defaultColor=ee;break}}updateParams(z,ee){switch(z){case p.AnnotationEditorParamsType.FREETEXT_SIZE:J(this,m,ur).call(this,ee);break;case p.AnnotationEditorParamsType.FREETEXT_COLOR:J(this,A,dr).call(this,ee);break}}static get defaultPropertiesToUpdate(){return[[p.AnnotationEditorParamsType.FREETEXT_SIZE,j._defaultFontSize],[p.AnnotationEditorParamsType.FREETEXT_COLOR,j._defaultColor||k.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[p.AnnotationEditorParamsType.FREETEXT_SIZE,l(this,r)],[p.AnnotationEditorParamsType.FREETEXT_COLOR,l(this,h)]]}_translateEmpty(z,ee){this._uiManager.translateSelectedEditors(z,ee,!0)}getInitialTranslation(){const z=this.parentScale;return[-j._internalPadding*z,-(j._internalPadding+l(this,r))*z]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(p.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",l(this,d)),this.editorDiv.addEventListener("focus",l(this,i)),this.editorDiv.addEventListener("blur",l(this,e)),this.editorDiv.addEventListener("input",l(this,n)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",l(this,a)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",l(this,d)),this.editorDiv.removeEventListener("focus",l(this,i)),this.editorDiv.removeEventListener("blur",l(this,e)),this.editorDiv.removeEventListener("input",l(this,n)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(z){this._focusEventsAllowed&&(super.focusin(z),z.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var z;if(this.width){J(this,Q,bn).call(this);return}this.enableEditMode(),this.editorDiv.focus(),(z=this._initialOptions)!=null&&z.isCentered&&this.center(),this._initialOptions=null}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const z=l(this,f),ee=le(this,f,J(this,c,fr).call(this).trimEnd());if(z===ee)return;const oe=ye=>{if(le(this,f,ye),!ye){this.remove();return}J(this,S,vn).call(this),this._uiManager.rebuild(this),J(this,x,Et).call(this)};this.addCommands({cmd:()=>{oe(ee)},undo:()=>{oe(z)},mustExec:!1}),J(this,x,Et).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(z){this.enterInEditMode()}keydown(z){z.target===this.div&&z.key==="Enter"&&(this.enterInEditMode(),z.preventDefault())}editorDivKeydown(z){j._keyboardManager.exec(this,z)}editorDivFocus(z){this.isEditing=!0}editorDivBlur(z){this.isEditing=!1}editorDivInput(z){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let z,ee;this.width&&(z=this.x,ee=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",l(this,a)),this.enableEditing(),k.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(ye=>{var Pe;return(Pe=this.editorDiv)==null?void 0:Pe.setAttribute("aria-label",ye)}),k.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(ye=>{var Pe;return(Pe=this.editorDiv)==null?void 0:Pe.setAttribute("default-content",ye)}),this.editorDiv.contentEditable=!0;const{style:oe}=this.editorDiv;if(oe.fontSize=`calc(${l(this,r)}px * var(--scale-factor))`,oe.color=l(this,h),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,y.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[ye,Pe]=this.parentDimensions;if(this.annotationElementId){const{position:L}=l(this,o);let[P,M]=this.getInitialTranslation();[P,M]=this.pageTranslationToScreen(P,M);const[E,R]=this.pageDimensions,[O,B]=this.pageTranslation;let F,Z;switch(this.rotation){case 0:F=z+(L[0]-O)/E,Z=ee+this.height-(L[1]-B)/R;break;case 90:F=z+(L[0]-O)/E,Z=ee-(L[1]-B)/R,[P,M]=[M,-P];break;case 180:F=z-this.width+(L[0]-O)/E,Z=ee-(L[1]-B)/R,[P,M]=[-P,-M];break;case 270:F=z+(L[0]-O-this.height*R)/E,Z=ee+(L[1]-B-this.width*E)/R,[P,M]=[-M,P];break}this.setAt(F*ye,Z*Pe,P,M)}else this.setAt(z*ye,ee*Pe,this.width*ye,this.height*Pe);J(this,S,vn).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(z,ee,oe){let ye=null;if(z instanceof u.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:L,fontColor:P},rect:M,rotation:E,id:R},textContent:O,textPosition:B,parent:{page:{pageNumber:F}}}=z;if(!O||O.length===0)return null;ye=z={annotationType:p.AnnotationEditorType.FREETEXT,color:Array.from(P),fontSize:L,value:O.join(`
`),position:B,pageIndex:F-1,rect:M,rotation:E,id:R,deleted:!1}}const Pe=super.deserialize(z,ee,oe);return le(Pe,r,z.fontSize),le(Pe,h,p.Util.makeHexColor(...z.color)),le(Pe,f,z.value),Pe.annotationElementId=z.id||null,le(Pe,o,ye),Pe}serialize(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const ee=j._internalPadding*this.parentScale,oe=this.getRect(ee,ee),ye=k.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:l(this,h)),Pe={annotationType:p.AnnotationEditorType.FREETEXT,color:ye,fontSize:l(this,r),value:l(this,f),pageIndex:this.pageIndex,rect:oe,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return z?Pe:this.annotationElementId&&!J(this,I,pr).call(this,Pe)?null:(Pe.id=this.annotationElementId,Pe)}};e=new WeakMap,i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakSet,ur=function(z){const ee=ye=>{this.editorDiv.style.fontSize=`calc(${ye}px * var(--scale-factor))`,this.translate(0,-(ye-l(this,r))*this.parentScale),le(this,r,ye),J(this,x,Et).call(this)},oe=l(this,r);this.addCommands({cmd:()=>{ee(z)},undo:()=>{ee(oe)},mustExec:!0,type:p.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},A=new WeakSet,dr=function(z){const ee=l(this,h);this.addCommands({cmd:()=>{le(this,h,this.editorDiv.style.color=z)},undo:()=>{le(this,h,this.editorDiv.style.color=ee)},mustExec:!0,type:p.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},c=new WeakSet,fr=function(){const z=this.editorDiv.getElementsByTagName("div");if(z.length===0)return this.editorDiv.innerText;const ee=[];for(const oe of z)ee.push(oe.innerText.replace(/\r\n?|\n/,""));return ee.join(`
`)},x=new WeakSet,Et=function(){const[z,ee]=this.parentDimensions;let oe;if(this.isAttachedToDOM)oe=this.div.getBoundingClientRect();else{const{currentLayer:ye,div:Pe}=this,L=Pe.style.display;Pe.style.display="hidden",ye.div.append(this.div),oe=Pe.getBoundingClientRect(),Pe.remove(),Pe.style.display=L}this.rotation%180===this.parentRotation%180?(this.width=oe.width/z,this.height=oe.height/ee):(this.width=oe.height/z,this.height=oe.width/ee),this.fixAndSetPosition()},S=new WeakSet,vn=function(){if(this.editorDiv.replaceChildren(),!!l(this,f))for(const z of l(this,f).split(`
`)){const ee=document.createElement("div");ee.append(z?document.createTextNode(z):document.createElement("br")),this.editorDiv.append(ee)}},I=new WeakSet,pr=function(z){const{value:ee,fontSize:oe,color:ye,rect:Pe,pageIndex:L}=l(this,o);return z.value!==ee||z.fontSize!==oe||z.rect.some((P,M)=>Math.abs(P-Pe[M])>=1)||z.color.some((P,M)=>P!==ye[M])||z.pageIndex!==L},Q=new WeakSet,bn=function(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.annotationElementId)return;if(J(this,x,Et).call(this),!z&&(this.width===0||this.height===0)){setTimeout(()=>J(this,Q,bn).call(this,!0),0);return}const ee=j._internalPadding*this.parentScale;l(this,o).rect=this.getRect(ee,ee)},tt(j,"_freeTextDefaultContent",""),tt(j,"_internalPadding",0),tt(j,"_defaultColor",null),tt(j,"_defaultFontSize",10),tt(j,"_type","freetext");let g=j;w.FreeTextEditor=g},(N,w,t)=>{var M,R,ht,B,gr,Z,se,q,pe,te,me,ve,Re,Oe,Ie,Le,ue,ne,ce,ge,Ce,Me,Ve,mr,_e,Nt,Ke,yn,je,An,V,H,X,de,Ee,K,U,Sn,Ae,Se,we,Te,vr,ke,En;Object.defineProperty(w,"__esModule",{value:!0}),w.StampAnnotationElement=w.InkAnnotationElement=w.FreeTextAnnotationElement=w.AnnotationLayer=void 0,t(89),t(125),t(136),t(138),t(141),t(143),t(145),t(147);var p=t(1),y=t(168),k=t(163),u=t(199),g=t(200),e=t(201);const i=1e3,n=9,d=new WeakSet;function h(Be){return{width:Be[2]-Be[0],height:Be[3]-Be[1]}}class f{static create(re){switch(re.data.annotationType){case p.AnnotationType.LINK:return new r(re);case p.AnnotationType.TEXT:return new o(re);case p.AnnotationType.WIDGET:switch(re.data.fieldType){case"Tx":return new v(re);case"Btn":return re.data.radioButton?new c(re):re.data.checkBox?new b(re):new s(re);case"Ch":return new x(re);case"Sig":return new A(re)}return new m(re);case p.AnnotationType.POPUP:return new T(re);case p.AnnotationType.FREETEXT:return new D(re);case p.AnnotationType.LINE:return new I(re);case p.AnnotationType.SQUARE:return new _(re);case p.AnnotationType.CIRCLE:return new Q(re);case p.AnnotationType.POLYLINE:return new W(re);case p.AnnotationType.CARET:return new he(re);case p.AnnotationType.INK:return new Y(re);case p.AnnotationType.POLYGON:return new j(re);case p.AnnotationType.HIGHLIGHT:return new z(re);case p.AnnotationType.UNDERLINE:return new ee(re);case p.AnnotationType.SQUIGGLY:return new oe(re);case p.AnnotationType.STRIKEOUT:return new ye(re);case p.AnnotationType.STAMP:return new Pe(re);case p.AnnotationType.FILEATTACHMENT:return new L(re);default:return new a(re)}}}const E=class E{constructor(re){$(this,M,!1);let{isRenderable:C=!1,ignoreBorder:G=!1,createQuadrilaterals:ae=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.isRenderable=C,this.data=re.data,this.layer=re.layer,this.linkService=re.linkService,this.downloadManager=re.downloadManager,this.imageResourcesPath=re.imageResourcesPath,this.renderForms=re.renderForms,this.svgFactory=re.svgFactory,this.annotationStorage=re.annotationStorage,this.enableScripting=re.enableScripting,this.hasJSActions=re.hasJSActions,this._fieldObjects=re.fieldObjects,this.parent=re.parent,C&&(this.container=this._createContainer(G)),ae&&this._createQuadrilaterals()}static _hasPopupData(re){let{titleObj:C,contentsObj:G,richText:ae}=re;return!!(C!=null&&C.str||G!=null&&G.str||ae!=null&&ae.str)}get hasPopupData(){return E._hasPopupData(this.data)}_createContainer(re){const{data:C,parent:{page:G,viewport:ae}}=this,fe=document.createElement("section");fe.setAttribute("data-annotation-id",C.id),this instanceof m||(fe.tabIndex=i),fe.style.zIndex=this.parent.zIndex++,this.data.popupRef&&fe.setAttribute("aria-haspopup","dialog"),C.noRotate&&fe.classList.add("norotate");const{pageWidth:be,pageHeight:xe,pageX:De,pageY:We}=ae.rawDims;if(!C.rect||this instanceof T){const{rotation:Ye}=C;return!C.hasOwnCanvas&&Ye!==0&&this.setRotation(Ye,fe),fe}const{width:Fe,height:Ze}=h(C.rect),Ge=p.Util.normalizeRect([C.rect[0],G.view[3]-C.rect[1]+G.view[1],C.rect[2],G.view[3]-C.rect[3]+G.view[1]]);if(!re&&C.borderStyle.width>0){fe.style.borderWidth=`${C.borderStyle.width}px`;const Ye=C.borderStyle.horizontalCornerRadius,Qe=C.borderStyle.verticalCornerRadius;if(Ye>0||Qe>0){const et=`calc(${Ye}px * var(--scale-factor)) / calc(${Qe}px * var(--scale-factor))`;fe.style.borderRadius=et}else if(this instanceof c){const et=`calc(${Fe}px * var(--scale-factor)) / calc(${Ze}px * var(--scale-factor))`;fe.style.borderRadius=et}switch(C.borderStyle.style){case p.AnnotationBorderStyleType.SOLID:fe.style.borderStyle="solid";break;case p.AnnotationBorderStyleType.DASHED:fe.style.borderStyle="dashed";break;case p.AnnotationBorderStyleType.BEVELED:(0,p.warn)("Unimplemented border style: beveled");break;case p.AnnotationBorderStyleType.INSET:(0,p.warn)("Unimplemented border style: inset");break;case p.AnnotationBorderStyleType.UNDERLINE:fe.style.borderBottomStyle="solid";break}const qe=C.borderColor||null;qe?(le(this,M,!0),fe.style.borderColor=p.Util.makeHexColor(qe[0]|0,qe[1]|0,qe[2]|0)):fe.style.borderWidth=0}fe.style.left=`${100*(Ge[0]-De)/be}%`,fe.style.top=`${100*(Ge[1]-We)/xe}%`;const{rotation:$e}=C;return C.hasOwnCanvas||$e===0?(fe.style.width=`${100*Fe/be}%`,fe.style.height=`${100*Ze/xe}%`):this.setRotation($e,fe),fe}setRotation(re){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.container;if(!this.data.rect)return;const{pageWidth:G,pageHeight:ae}=this.parent.viewport.rawDims,{width:fe,height:be}=h(this.data.rect);let xe,De;re%180===0?(xe=100*fe/G,De=100*be/ae):(xe=100*be/G,De=100*fe/ae),C.style.width=`${xe}%`,C.style.height=`${De}%`,C.setAttribute("data-main-rotation",(360-re)%360)}get _commonActions(){const re=(C,G,ae)=>{const fe=ae.detail[C],be=fe[0],xe=fe.slice(1);ae.target.style[G]=u.ColorConverters[`${be}_HTML`](xe),this.annotationStorage.setValue(this.data.id,{[G]:u.ColorConverters[`${be}_rgb`](xe)})};return(0,p.shadow)(this,"_commonActions",{display:C=>{const{display:G}=C.detail,ae=G%2===1;this.container.style.visibility=ae?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:ae,noPrint:G===1||G===2})},print:C=>{this.annotationStorage.setValue(this.data.id,{noPrint:!C.detail.print})},hidden:C=>{const{hidden:G}=C.detail;this.container.style.visibility=G?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:G,noView:G})},focus:C=>{setTimeout(()=>C.target.focus({preventScroll:!1}),0)},userName:C=>{C.target.title=C.detail.userName},readonly:C=>{C.target.disabled=C.detail.readonly},required:C=>{this._setRequired(C.target,C.detail.required)},bgColor:C=>{re("bgColor","backgroundColor",C)},fillColor:C=>{re("fillColor","backgroundColor",C)},fgColor:C=>{re("fgColor","color",C)},textColor:C=>{re("textColor","color",C)},borderColor:C=>{re("borderColor","borderColor",C)},strokeColor:C=>{re("strokeColor","borderColor",C)},rotation:C=>{const G=C.detail.rotation;this.setRotation(G),this.annotationStorage.setValue(this.data.id,{rotation:G})}})}_dispatchEventFromSandbox(re,C){const G=this._commonActions;for(const ae of Object.keys(C.detail)){const fe=re[ae]||G[ae];fe==null||fe(C)}}_setDefaultPropertiesFromJS(re){if(!this.enableScripting)return;const C=this.annotationStorage.getRawValue(this.data.id);if(!C)return;const G=this._commonActions;for(const[ae,fe]of Object.entries(C)){const be=G[ae];if(be){const xe={detail:{[ae]:fe},target:re};be(xe),delete C[ae]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:re}=this.data;if(!re)return;const[C,G,ae,fe]=this.data.rect;if(re.length===1){const[,{x:Qe,y:qe},{x:et,y:rt}]=re[0];if(ae===Qe&&fe===qe&&C===et&&G===rt)return}const{style:be}=this.container;let xe;if(l(this,M)){const{borderColor:Qe,borderWidth:qe}=be;be.borderWidth=0,xe=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${Qe}" stroke-width="${qe}">`],this.container.classList.add("hasBorder")}const De=ae-C,We=fe-G,{svgFactory:Fe}=this,Ze=Fe.createElement("svg");Ze.classList.add("quadrilateralsContainer"),Ze.setAttribute("width",0),Ze.setAttribute("height",0);const Ge=Fe.createElement("defs");Ze.append(Ge);const $e=Fe.createElement("clipPath"),Ye=`clippath_${this.data.id}`;$e.setAttribute("id",Ye),$e.setAttribute("clipPathUnits","objectBoundingBox"),Ge.append($e);for(const[,{x:Qe,y:qe},{x:et,y:rt}]of re){const nt=Fe.createElement("rect"),it=(et-C)/De,lt=(fe-qe)/We,ct=(Qe-et)/De,qn=(qe-rt)/We;nt.setAttribute("x",it),nt.setAttribute("y",lt),nt.setAttribute("width",ct),nt.setAttribute("height",qn),$e.append(nt),xe==null||xe.push(`<rect vector-effect="non-scaling-stroke" x="${it}" y="${lt}" width="${ct}" height="${qn}"/>`)}l(this,M)&&(xe.push("</g></svg>')"),be.backgroundImage=xe.join("")),this.container.append(Ze),this.container.style.clipPath=`url(#${Ye})`}_createPopup(){const{container:re,data:C}=this;re.setAttribute("aria-haspopup","dialog");const G=new T({data:{color:C.color,titleObj:C.titleObj,modificationDate:C.modificationDate,contentsObj:C.contentsObj,richText:C.richText,parentRect:C.rect,borderStyle:0,id:`popup_${C.id}`,rotation:C.rotation},parent:this.parent,elements:[this]});this.parent.div.append(G.render())}render(){(0,p.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(re){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const G=[];if(this._fieldObjects){const ae=this._fieldObjects[re];if(ae)for(const{page:fe,id:be,exportValues:xe}of ae){if(fe===-1||be===C)continue;const De=typeof xe=="string"?xe:null,We=document.querySelector(`[data-element-id="${be}"]`);if(We&&!d.has(We)){(0,p.warn)(`_getElementsByName - element not allowed: ${be}`);continue}G.push({id:be,exportValue:De,domElement:We})}return G}for(const ae of document.getElementsByName(re)){const{exportValue:fe}=ae,be=ae.getAttribute("data-element-id");be!==C&&d.has(ae)&&G.push({id:be,exportValue:fe,domElement:ae})}return G}show(){var re;this.container&&(this.container.hidden=!1),(re=this.popup)==null||re.maybeShow()}hide(){var re;this.container&&(this.container.hidden=!0),(re=this.popup)==null||re.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const re=this.getElementsToTriggerPopup();if(Array.isArray(re))for(const C of re)C.classList.add("highlightArea");else re.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:re,data:{id:C}}=this;this.container.addEventListener("dblclick",()=>{var G;(G=this.linkService.eventBus)==null||G.dispatch("switchannotationeditormode",{source:this,mode:re,editId:C})})}};M=new WeakMap;let a=E;class r extends a{constructor(C){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;super(C,{isRenderable:!0,ignoreBorder:!!(G!=null&&G.ignoreBorder),createQuadrilaterals:!0});$(this,R);$(this,B);this.isTooltipOnly=C.data.isTooltipOnly}render(){const{data:C,linkService:G}=this,ae=document.createElement("a");ae.setAttribute("data-element-id",C.id);let fe=!1;return C.url?(G.addLinkAttributes(ae,C.url,C.newWindow),fe=!0):C.action?(this._bindNamedAction(ae,C.action),fe=!0):C.attachment?(this._bindAttachment(ae,C.attachment),fe=!0):C.setOCGState?(J(this,B,gr).call(this,ae,C.setOCGState),fe=!0):C.dest?(this._bindLink(ae,C.dest),fe=!0):(C.actions&&(C.actions.Action||C.actions["Mouse Up"]||C.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(ae,C),fe=!0),C.resetForm?(this._bindResetFormAction(ae,C.resetForm),fe=!0):this.isTooltipOnly&&!fe&&(this._bindLink(ae,""),fe=!0)),this.container.classList.add("linkAnnotation"),fe&&this.container.append(ae),this.container}_bindLink(C,G){C.href=this.linkService.getDestinationHash(G),C.onclick=()=>(G&&this.linkService.goToDestination(G),!1),(G||G==="")&&J(this,R,ht).call(this)}_bindNamedAction(C,G){C.href=this.linkService.getAnchorUrl(""),C.onclick=()=>(this.linkService.executeNamedAction(G),!1),J(this,R,ht).call(this)}_bindAttachment(C,G){C.href=this.linkService.getAnchorUrl(""),C.onclick=()=>{var ae;return(ae=this.downloadManager)==null||ae.openOrDownloadData(this.container,G.content,G.filename),!1},J(this,R,ht).call(this)}_bindJSAction(C,G){C.href=this.linkService.getAnchorUrl("");const ae=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const fe of Object.keys(G.actions)){const be=ae.get(fe);be&&(C[be]=()=>{var xe;return(xe=this.linkService.eventBus)==null||xe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:G.id,name:fe}}),!1})}C.onclick||(C.onclick=()=>!1),J(this,R,ht).call(this)}_bindResetFormAction(C,G){const ae=C.onclick;if(ae||(C.href=this.linkService.getAnchorUrl("")),J(this,R,ht).call(this),!this._fieldObjects){(0,p.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),ae||(C.onclick=()=>!1);return}C.onclick=()=>{var Ze;ae==null||ae();const{fields:fe,refs:be,include:xe}=G,De=[];if(fe.length!==0||be.length!==0){const Ge=new Set(be);for(const $e of fe){const Ye=this._fieldObjects[$e]||[];for(const{id:Qe}of Ye)Ge.add(Qe)}for(const $e of Object.values(this._fieldObjects))for(const Ye of $e)Ge.has(Ye.id)===xe&&De.push(Ye)}else for(const Ge of Object.values(this._fieldObjects))De.push(...Ge);const We=this.annotationStorage,Fe=[];for(const Ge of De){const{id:$e}=Ge;switch(Fe.push($e),Ge.type){case"text":{const Qe=Ge.defaultValue||"";We.setValue($e,{value:Qe});break}case"checkbox":case"radiobutton":{const Qe=Ge.defaultValue===Ge.exportValues;We.setValue($e,{value:Qe});break}case"combobox":case"listbox":{const Qe=Ge.defaultValue||"";We.setValue($e,{value:Qe});break}default:continue}const Ye=document.querySelector(`[data-element-id="${$e}"]`);if(Ye){if(!d.has(Ye)){(0,p.warn)(`_bindResetFormAction - element not allowed: ${$e}`);continue}}else continue;Ye.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((Ze=this.linkService.eventBus)==null||Ze.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Fe,name:"ResetForm"}})),!1}}}R=new WeakSet,ht=function(){this.container.setAttribute("data-internal-link","")},B=new WeakSet,gr=function(C,G){C.href=this.linkService.getAnchorUrl(""),C.onclick=()=>(this.linkService.executeSetOCGState(G),!1),J(this,R,ht).call(this)};class o extends a{constructor(re){super(re,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const re=document.createElement("img");return re.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",re.alt="[{{type}} Annotation]",re.dataset.l10nId="text_annotation_type",re.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(re),this.container}}class m extends a{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(re){var C;this.data.hasOwnCanvas&&(((C=re.previousSibling)==null?void 0:C.nodeName)==="CANVAS"&&(re.previousSibling.hidden=!0),re.hidden=!1)}_getKeyModifier(re){const{isWin:C,isMac:G}=p.FeatureTest.platform;return C&&re.ctrlKey||G&&re.metaKey}_setEventListener(re,C,G,ae,fe){G.includes("mouse")?re.addEventListener(G,be=>{var xe;(xe=this.linkService.eventBus)==null||xe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:ae,value:fe(be),shift:be.shiftKey,modifier:this._getKeyModifier(be)}})}):re.addEventListener(G,be=>{var xe;if(G==="blur"){if(!C.focused||!be.relatedTarget)return;C.focused=!1}else if(G==="focus"){if(C.focused)return;C.focused=!0}fe&&((xe=this.linkService.eventBus)==null||xe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:ae,value:fe(be)}}))})}_setEventListeners(re,C,G,ae){var fe,be,xe;for(const[De,We]of G)(We==="Action"||(fe=this.data.actions)!=null&&fe[We])&&((We==="Focus"||We==="Blur")&&(C||(C={focused:!1})),this._setEventListener(re,C,De,We,ae),We==="Focus"&&!((be=this.data.actions)!=null&&be.Blur)?this._setEventListener(re,C,"blur","Blur",null):We==="Blur"&&!((xe=this.data.actions)!=null&&xe.Focus)&&this._setEventListener(re,C,"focus","Focus",null))}_setBackgroundColor(re){const C=this.data.backgroundColor||null;re.style.backgroundColor=C===null?"transparent":p.Util.makeHexColor(C[0],C[1],C[2])}_setTextStyle(re){const C=["left","center","right"],{fontColor:G}=this.data.defaultAppearanceData,ae=this.data.defaultAppearanceData.fontSize||n,fe=re.style;let be;const xe=2,De=We=>Math.round(10*We)/10;if(this.data.multiLine){const We=Math.abs(this.data.rect[3]-this.data.rect[1]-xe),Fe=Math.round(We/(p.LINE_FACTOR*ae))||1,Ze=We/Fe;be=Math.min(ae,De(Ze/p.LINE_FACTOR))}else{const We=Math.abs(this.data.rect[3]-this.data.rect[1]-xe);be=Math.min(ae,De(We/p.LINE_FACTOR))}fe.fontSize=`calc(${be}px * var(--scale-factor))`,fe.color=p.Util.makeHexColor(G[0],G[1],G[2]),this.data.textAlignment!==null&&(fe.textAlign=C[this.data.textAlignment])}_setRequired(re,C){C?re.setAttribute("required",!0):re.removeAttribute("required"),re.setAttribute("aria-required",C)}}class v extends m{constructor(re){const C=re.renderForms||!re.data.hasAppearance&&!!re.data.fieldValue;super(re,{isRenderable:C})}setPropertyOnSiblings(re,C,G,ae){const fe=this.annotationStorage;for(const be of this._getElementsByName(re.name,re.id))be.domElement&&(be.domElement[C]=G),fe.setValue(be.id,{[ae]:G})}render(){var ae,fe;const re=this.annotationStorage,C=this.data.id;this.container.classList.add("textWidgetAnnotation");let G=null;if(this.renderForms){const be=re.getValue(C,{value:this.data.fieldValue});let xe=be.value||"";const De=re.getValue(C,{charLimit:this.data.maxLen}).charLimit;De&&xe.length>De&&(xe=xe.slice(0,De));let We=be.formattedValue||((ae=this.data.textContent)==null?void 0:ae.join(`
`))||null;We&&this.data.comb&&(We=We.replaceAll(/\s+/g,""));const Fe={userValue:xe,formattedValue:We,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(G=document.createElement("textarea"),G.textContent=We??xe,this.data.doNotScroll&&(G.style.overflowY="hidden")):(G=document.createElement("input"),G.type="text",G.setAttribute("value",We??xe),this.data.doNotScroll&&(G.style.overflowX="hidden")),this.data.hasOwnCanvas&&(G.hidden=!0),d.add(G),G.setAttribute("data-element-id",C),G.disabled=this.data.readOnly,G.name=this.data.fieldName,G.tabIndex=i,this._setRequired(G,this.data.required),De&&(G.maxLength=De),G.addEventListener("input",Ge=>{re.setValue(C,{value:Ge.target.value}),this.setPropertyOnSiblings(G,"value",Ge.target.value,"value"),Fe.formattedValue=null}),G.addEventListener("resetform",Ge=>{const $e=this.data.defaultFieldValue??"";G.value=Fe.userValue=$e,Fe.formattedValue=null});let Ze=Ge=>{const{formattedValue:$e}=Fe;$e!=null&&(Ge.target.value=$e),Ge.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){G.addEventListener("focus",$e=>{if(Fe.focused)return;const{target:Ye}=$e;Fe.userValue&&(Ye.value=Fe.userValue),Fe.lastCommittedValue=Ye.value,Fe.commitKey=1,Fe.focused=!0}),G.addEventListener("updatefromsandbox",$e=>{this.showElementAndHideCanvas($e.target);const Ye={value(Qe){Fe.userValue=Qe.detail.value??"",re.setValue(C,{value:Fe.userValue.toString()}),Qe.target.value=Fe.userValue},formattedValue(Qe){const{formattedValue:qe}=Qe.detail;Fe.formattedValue=qe,qe!=null&&Qe.target!==document.activeElement&&(Qe.target.value=qe),re.setValue(C,{formattedValue:qe})},selRange(Qe){Qe.target.setSelectionRange(...Qe.detail.selRange)},charLimit:Qe=>{var nt;const{charLimit:qe}=Qe.detail,{target:et}=Qe;if(qe===0){et.removeAttribute("maxLength");return}et.setAttribute("maxLength",qe);let rt=Fe.userValue;!rt||rt.length<=qe||(rt=rt.slice(0,qe),et.value=Fe.userValue=rt,re.setValue(C,{value:rt}),(nt=this.linkService.eventBus)==null||nt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:rt,willCommit:!0,commitKey:1,selStart:et.selectionStart,selEnd:et.selectionEnd}}))}};this._dispatchEventFromSandbox(Ye,$e)}),G.addEventListener("keydown",$e=>{var qe;Fe.commitKey=1;let Ye=-1;if($e.key==="Escape"?Ye=0:$e.key==="Enter"&&!this.data.multiLine?Ye=2:$e.key==="Tab"&&(Fe.commitKey=3),Ye===-1)return;const{value:Qe}=$e.target;Fe.lastCommittedValue!==Qe&&(Fe.lastCommittedValue=Qe,Fe.userValue=Qe,(qe=this.linkService.eventBus)==null||qe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:Qe,willCommit:!0,commitKey:Ye,selStart:$e.target.selectionStart,selEnd:$e.target.selectionEnd}}))});const Ge=Ze;Ze=null,G.addEventListener("blur",$e=>{var Qe;if(!Fe.focused||!$e.relatedTarget)return;Fe.focused=!1;const{value:Ye}=$e.target;Fe.userValue=Ye,Fe.lastCommittedValue!==Ye&&((Qe=this.linkService.eventBus)==null||Qe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:Ye,willCommit:!0,commitKey:Fe.commitKey,selStart:$e.target.selectionStart,selEnd:$e.target.selectionEnd}})),Ge($e)}),(fe=this.data.actions)!=null&&fe.Keystroke&&G.addEventListener("beforeinput",$e=>{var lt;Fe.lastCommittedValue=null;const{data:Ye,target:Qe}=$e,{value:qe,selectionStart:et,selectionEnd:rt}=Qe;let nt=et,it=rt;switch($e.inputType){case"deleteWordBackward":{const ct=qe.substring(0,et).match(/\w*[^\w]*$/);ct&&(nt-=ct[0].length);break}case"deleteWordForward":{const ct=qe.substring(et).match(/^[^\w]*\w*/);ct&&(it+=ct[0].length);break}case"deleteContentBackward":et===rt&&(nt-=1);break;case"deleteContentForward":et===rt&&(it+=1);break}$e.preventDefault(),(lt=this.linkService.eventBus)==null||lt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:qe,change:Ye||"",willCommit:!1,selStart:nt,selEnd:it}})}),this._setEventListeners(G,Fe,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],$e=>$e.target.value)}if(Ze&&G.addEventListener("blur",Ze),this.data.comb){const $e=(this.data.rect[2]-this.data.rect[0])/De;G.classList.add("comb"),G.style.letterSpacing=`calc(${$e}px * var(--scale-factor) - 1ch)`}}else G=document.createElement("div"),G.textContent=this.data.fieldValue,G.style.verticalAlign="middle",G.style.display="table-cell";return this._setTextStyle(G),this._setBackgroundColor(G),this._setDefaultPropertiesFromJS(G),this.container.append(G),this.container}}class A extends m{constructor(re){super(re,{isRenderable:!!re.data.hasOwnCanvas})}}class b extends m{constructor(re){super(re,{isRenderable:re.renderForms})}render(){const re=this.annotationStorage,C=this.data,G=C.id;let ae=re.getValue(G,{value:C.exportValue===C.fieldValue}).value;typeof ae=="string"&&(ae=ae!=="Off",re.setValue(G,{value:ae})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const fe=document.createElement("input");return d.add(fe),fe.setAttribute("data-element-id",G),fe.disabled=C.readOnly,this._setRequired(fe,this.data.required),fe.type="checkbox",fe.name=C.fieldName,ae&&fe.setAttribute("checked",!0),fe.setAttribute("exportValue",C.exportValue),fe.tabIndex=i,fe.addEventListener("change",be=>{const{name:xe,checked:De}=be.target;for(const We of this._getElementsByName(xe,G)){const Fe=De&&We.exportValue===C.exportValue;We.domElement&&(We.domElement.checked=Fe),re.setValue(We.id,{value:Fe})}re.setValue(G,{value:De})}),fe.addEventListener("resetform",be=>{const xe=C.defaultFieldValue||"Off";be.target.checked=xe===C.exportValue}),this.enableScripting&&this.hasJSActions&&(fe.addEventListener("updatefromsandbox",be=>{const xe={value(De){De.target.checked=De.detail.value!=="Off",re.setValue(G,{value:De.target.checked})}};this._dispatchEventFromSandbox(xe,be)}),this._setEventListeners(fe,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],be=>be.target.checked)),this._setBackgroundColor(fe),this._setDefaultPropertiesFromJS(fe),this.container.append(fe),this.container}}class c extends m{constructor(re){super(re,{isRenderable:re.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const re=this.annotationStorage,C=this.data,G=C.id;let ae=re.getValue(G,{value:C.fieldValue===C.buttonValue}).value;typeof ae=="string"&&(ae=ae!==C.buttonValue,re.setValue(G,{value:ae}));const fe=document.createElement("input");if(d.add(fe),fe.setAttribute("data-element-id",G),fe.disabled=C.readOnly,this._setRequired(fe,this.data.required),fe.type="radio",fe.name=C.fieldName,ae&&fe.setAttribute("checked",!0),fe.tabIndex=i,fe.addEventListener("change",be=>{const{name:xe,checked:De}=be.target;for(const We of this._getElementsByName(xe,G))re.setValue(We.id,{value:!1});re.setValue(G,{value:De})}),fe.addEventListener("resetform",be=>{const xe=C.defaultFieldValue;be.target.checked=xe!=null&&xe===C.buttonValue}),this.enableScripting&&this.hasJSActions){const be=C.buttonValue;fe.addEventListener("updatefromsandbox",xe=>{const De={value:We=>{const Fe=be===We.detail.value;for(const Ze of this._getElementsByName(We.target.name)){const Ge=Fe&&Ze.id===G;Ze.domElement&&(Ze.domElement.checked=Ge),re.setValue(Ze.id,{value:Ge})}}};this._dispatchEventFromSandbox(De,xe)}),this._setEventListeners(fe,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],xe=>xe.target.checked)}return this._setBackgroundColor(fe),this._setDefaultPropertiesFromJS(fe),this.container.append(fe),this.container}}class s extends r{constructor(re){super(re,{ignoreBorder:re.data.hasAppearance})}render(){const re=super.render();re.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(re.title=this.data.alternativeText);const C=re.lastChild;return this.enableScripting&&this.hasJSActions&&C&&(this._setDefaultPropertiesFromJS(C),C.addEventListener("updatefromsandbox",G=>{this._dispatchEventFromSandbox({},G)})),re}}class x extends m{constructor(re){super(re,{isRenderable:re.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const re=this.annotationStorage,C=this.data.id,G=re.getValue(C,{value:this.data.fieldValue}),ae=document.createElement("select");d.add(ae),ae.setAttribute("data-element-id",C),ae.disabled=this.data.readOnly,this._setRequired(ae,this.data.required),ae.name=this.data.fieldName,ae.tabIndex=i;let fe=this.data.combo&&this.data.options.length>0;this.data.combo||(ae.size=this.data.options.length,this.data.multiSelect&&(ae.multiple=!0)),ae.addEventListener("resetform",Fe=>{const Ze=this.data.defaultFieldValue;for(const Ge of ae.options)Ge.selected=Ge.value===Ze});for(const Fe of this.data.options){const Ze=document.createElement("option");Ze.textContent=Fe.displayValue,Ze.value=Fe.exportValue,G.value.includes(Fe.exportValue)&&(Ze.setAttribute("selected",!0),fe=!1),ae.append(Ze)}let be=null;if(fe){const Fe=document.createElement("option");Fe.value=" ",Fe.setAttribute("hidden",!0),Fe.setAttribute("selected",!0),ae.prepend(Fe),be=()=>{Fe.remove(),ae.removeEventListener("input",be),be=null},ae.addEventListener("input",be)}const xe=Fe=>{const Ze=Fe?"value":"textContent",{options:Ge,multiple:$e}=ae;return $e?Array.prototype.filter.call(Ge,Ye=>Ye.selected).map(Ye=>Ye[Ze]):Ge.selectedIndex===-1?null:Ge[Ge.selectedIndex][Ze]};let De=xe(!1);const We=Fe=>{const Ze=Fe.target.options;return Array.prototype.map.call(Ze,Ge=>({displayValue:Ge.textContent,exportValue:Ge.value}))};return this.enableScripting&&this.hasJSActions?(ae.addEventListener("updatefromsandbox",Fe=>{const Ze={value(Ge){be==null||be();const $e=Ge.detail.value,Ye=new Set(Array.isArray($e)?$e:[$e]);for(const Qe of ae.options)Qe.selected=Ye.has(Qe.value);re.setValue(C,{value:xe(!0)}),De=xe(!1)},multipleSelection(Ge){ae.multiple=!0},remove(Ge){const $e=ae.options,Ye=Ge.detail.remove;$e[Ye].selected=!1,ae.remove(Ye),$e.length>0&&Array.prototype.findIndex.call($e,qe=>qe.selected)===-1&&($e[0].selected=!0),re.setValue(C,{value:xe(!0),items:We(Ge)}),De=xe(!1)},clear(Ge){for(;ae.length!==0;)ae.remove(0);re.setValue(C,{value:null,items:[]}),De=xe(!1)},insert(Ge){const{index:$e,displayValue:Ye,exportValue:Qe}=Ge.detail.insert,qe=ae.children[$e],et=document.createElement("option");et.textContent=Ye,et.value=Qe,qe?qe.before(et):ae.append(et),re.setValue(C,{value:xe(!0),items:We(Ge)}),De=xe(!1)},items(Ge){const{items:$e}=Ge.detail;for(;ae.length!==0;)ae.remove(0);for(const Ye of $e){const{displayValue:Qe,exportValue:qe}=Ye,et=document.createElement("option");et.textContent=Qe,et.value=qe,ae.append(et)}ae.options.length>0&&(ae.options[0].selected=!0),re.setValue(C,{value:xe(!0),items:We(Ge)}),De=xe(!1)},indices(Ge){const $e=new Set(Ge.detail.indices);for(const Ye of Ge.target.options)Ye.selected=$e.has(Ye.index);re.setValue(C,{value:xe(!0)}),De=xe(!1)},editable(Ge){Ge.target.disabled=!Ge.detail.editable}};this._dispatchEventFromSandbox(Ze,Fe)}),ae.addEventListener("input",Fe=>{var Ge;const Ze=xe(!0);re.setValue(C,{value:Ze}),Fe.preventDefault(),(Ge=this.linkService.eventBus)==null||Ge.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:De,changeEx:Ze,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(ae,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Fe=>Fe.target.value)):ae.addEventListener("input",function(Fe){re.setValue(C,{value:xe(!0)})}),this.data.combo&&this._setTextStyle(ae),this._setBackgroundColor(ae),this._setDefaultPropertiesFromJS(ae),this.container.append(ae),this.container}}class T extends a{constructor(re){const{data:C,elements:G}=re;super(re,{isRenderable:a._hasPopupData(C)}),this.elements=G}render(){this.container.classList.add("popupAnnotation");const re=new S({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),C=[];for(const G of this.elements)G.popup=re,C.push(G.data.id),G.addHighlightArea();return this.container.setAttribute("aria-controls",C.map(G=>`${p.AnnotationPrefix}${G}`).join(",")),this.container}}class S{constructor(re){$(this,Ve);$(this,_e);$(this,Ke);$(this,je);$(this,Z,null);$(this,se,J(this,Ve,mr).bind(this));$(this,q,J(this,je,An).bind(this));$(this,pe,J(this,Ke,yn).bind(this));$(this,te,J(this,_e,Nt).bind(this));$(this,me,null);$(this,ve,null);$(this,Re,null);$(this,Oe,null);$(this,Ie,null);$(this,Le,null);$(this,ue,!1);$(this,ne,null);$(this,ce,null);$(this,ge,null);$(this,Ce,null);$(this,Me,!1);var Ye;let{container:C,color:G,elements:ae,titleObj:fe,modificationDate:be,contentsObj:xe,richText:De,parent:We,rect:Fe,parentRect:Ze,open:Ge}=re;le(this,ve,C),le(this,Ce,fe),le(this,Re,xe),le(this,ge,De),le(this,Ie,We),le(this,me,G),le(this,ce,Fe),le(this,Le,Ze),le(this,Oe,ae);const $e=y.PDFDateString.toDateObject(be);$e&&le(this,Z,We.l10n.get("annotation_date_string",{date:$e.toLocaleDateString(),time:$e.toLocaleTimeString()})),this.trigger=ae.flatMap(Qe=>Qe.getElementsToTriggerPopup());for(const Qe of this.trigger)Qe.addEventListener("click",l(this,te)),Qe.addEventListener("mouseenter",l(this,pe)),Qe.addEventListener("mouseleave",l(this,q)),Qe.classList.add("popupTriggerArea");for(const Qe of ae)(Ye=Qe.container)==null||Ye.addEventListener("keydown",l(this,se));l(this,ve).hidden=!0,Ge&&J(this,_e,Nt).call(this)}render(){if(l(this,ne))return;const{page:{view:re},viewport:{rawDims:{pageWidth:C,pageHeight:G,pageX:ae,pageY:fe}}}=l(this,Ie),be=le(this,ne,document.createElement("div"));if(be.className="popup",l(this,me)){const nt=be.style.outlineColor=p.Util.makeHexColor(...l(this,me));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?be.style.backgroundColor=`color-mix(in srgb, ${nt} 30%, white)`:be.style.backgroundColor=p.Util.makeHexColor(...l(this,me).map(lt=>Math.floor(.7*(255-lt)+lt)))}const xe=document.createElement("span");xe.className="header";const De=document.createElement("h1");if(xe.append(De),{dir:De.dir,str:De.textContent}=l(this,Ce),be.append(xe),l(this,Z)){const nt=document.createElement("span");nt.classList.add("popupDate"),l(this,Z).then(it=>{nt.textContent=it}),xe.append(nt)}const We=l(this,Re),Fe=l(this,ge);if(Fe!=null&&Fe.str&&(!(We!=null&&We.str)||We.str===Fe.str))e.XfaLayer.render({xfaHtml:Fe.html,intent:"richText",div:be}),be.lastChild.classList.add("richText","popupContent");else{const nt=this._formatContents(We);be.append(nt)}let Ze=!!l(this,Le),Ge=Ze?l(this,Le):l(this,ce);for(const nt of l(this,Oe))if(!Ge||p.Util.intersect(nt.data.rect,Ge)!==null){Ge=nt.data.rect,Ze=!0;break}const $e=p.Util.normalizeRect([Ge[0],re[3]-Ge[1]+re[1],Ge[2],re[3]-Ge[3]+re[1]]),Ye=5,Qe=Ze?Ge[2]-Ge[0]+Ye:0,qe=$e[0]+Qe,et=$e[1],{style:rt}=l(this,ve);rt.left=`${100*(qe-ae)/C}%`,rt.top=`${100*(et-fe)/G}%`,l(this,ve).append(be)}_formatContents(re){let{str:C,dir:G}=re;const ae=document.createElement("p");ae.classList.add("popupContent"),ae.dir=G;const fe=C.split(/(?:\r\n?|\n)/);for(let be=0,xe=fe.length;be<xe;++be){const De=fe[be];ae.append(document.createTextNode(De)),be<xe-1&&ae.append(document.createElement("br"))}return ae}forceHide(){le(this,Me,this.isVisible),l(this,Me)&&(l(this,ve).hidden=!0)}maybeShow(){l(this,Me)&&(le(this,Me,!1),l(this,ve).hidden=!1)}get isVisible(){return l(this,ve).hidden===!1}}Z=new WeakMap,se=new WeakMap,q=new WeakMap,pe=new WeakMap,te=new WeakMap,me=new WeakMap,ve=new WeakMap,Re=new WeakMap,Oe=new WeakMap,Ie=new WeakMap,Le=new WeakMap,ue=new WeakMap,ne=new WeakMap,ce=new WeakMap,ge=new WeakMap,Ce=new WeakMap,Me=new WeakMap,Ve=new WeakSet,mr=function(re){re.altKey||re.shiftKey||re.ctrlKey||re.metaKey||(re.key==="Enter"||re.key==="Escape"&&l(this,ue))&&J(this,_e,Nt).call(this)},_e=new WeakSet,Nt=function(){le(this,ue,!l(this,ue)),l(this,ue)?(J(this,Ke,yn).call(this),l(this,ve).addEventListener("click",l(this,te)),l(this,ve).addEventListener("keydown",l(this,se))):(J(this,je,An).call(this),l(this,ve).removeEventListener("click",l(this,te)),l(this,ve).removeEventListener("keydown",l(this,se)))},Ke=new WeakSet,yn=function(){l(this,ne)||this.render(),this.isVisible?l(this,ue)&&l(this,ve).classList.add("focused"):(l(this,ve).hidden=!1,l(this,ve).style.zIndex=parseInt(l(this,ve).style.zIndex)+1e3)},je=new WeakSet,An=function(){l(this,ve).classList.remove("focused"),!(l(this,ue)||!this.isVisible)&&(l(this,ve).hidden=!0,l(this,ve).style.zIndex=parseInt(l(this,ve).style.zIndex)-1e3)};class D extends a{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0}),this.textContent=re.data.textContent,this.textPosition=re.data.textPosition,this.annotationEditorType=p.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const re=document.createElement("div");re.classList.add("annotationTextContent"),re.setAttribute("role","comment");for(const C of this.textContent){const G=document.createElement("span");G.textContent=C,re.append(G)}this.container.append(re)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}w.FreeTextAnnotationElement=D;class I extends a{constructor(C){super(C,{isRenderable:!0,ignoreBorder:!0});$(this,V,null)}render(){this.container.classList.add("lineAnnotation");const C=this.data,{width:G,height:ae}=h(C.rect),fe=this.svgFactory.create(G,ae,!0),be=le(this,V,this.svgFactory.createElement("svg:line"));return be.setAttribute("x1",C.rect[2]-C.lineCoordinates[0]),be.setAttribute("y1",C.rect[3]-C.lineCoordinates[1]),be.setAttribute("x2",C.rect[2]-C.lineCoordinates[2]),be.setAttribute("y2",C.rect[3]-C.lineCoordinates[3]),be.setAttribute("stroke-width",C.borderStyle.width||1),be.setAttribute("stroke","transparent"),be.setAttribute("fill","transparent"),fe.append(be),this.container.append(fe),!C.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return l(this,V)}addHighlightArea(){this.container.classList.add("highlightArea")}}V=new WeakMap;class _ extends a{constructor(C){super(C,{isRenderable:!0,ignoreBorder:!0});$(this,H,null)}render(){this.container.classList.add("squareAnnotation");const C=this.data,{width:G,height:ae}=h(C.rect),fe=this.svgFactory.create(G,ae,!0),be=C.borderStyle.width,xe=le(this,H,this.svgFactory.createElement("svg:rect"));return xe.setAttribute("x",be/2),xe.setAttribute("y",be/2),xe.setAttribute("width",G-be),xe.setAttribute("height",ae-be),xe.setAttribute("stroke-width",be||1),xe.setAttribute("stroke","transparent"),xe.setAttribute("fill","transparent"),fe.append(xe),this.container.append(fe),!C.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return l(this,H)}addHighlightArea(){this.container.classList.add("highlightArea")}}H=new WeakMap;class Q extends a{constructor(C){super(C,{isRenderable:!0,ignoreBorder:!0});$(this,X,null)}render(){this.container.classList.add("circleAnnotation");const C=this.data,{width:G,height:ae}=h(C.rect),fe=this.svgFactory.create(G,ae,!0),be=C.borderStyle.width,xe=le(this,X,this.svgFactory.createElement("svg:ellipse"));return xe.setAttribute("cx",G/2),xe.setAttribute("cy",ae/2),xe.setAttribute("rx",G/2-be/2),xe.setAttribute("ry",ae/2-be/2),xe.setAttribute("stroke-width",be||1),xe.setAttribute("stroke","transparent"),xe.setAttribute("fill","transparent"),fe.append(xe),this.container.append(fe),!C.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return l(this,X)}addHighlightArea(){this.container.classList.add("highlightArea")}}X=new WeakMap;class W extends a{constructor(C){super(C,{isRenderable:!0,ignoreBorder:!0});$(this,de,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const C=this.data,{width:G,height:ae}=h(C.rect),fe=this.svgFactory.create(G,ae,!0);let be=[];for(const De of C.vertices){const We=De.x-C.rect[0],Fe=C.rect[3]-De.y;be.push(We+","+Fe)}be=be.join(" ");const xe=le(this,de,this.svgFactory.createElement(this.svgElementName));return xe.setAttribute("points",be),xe.setAttribute("stroke-width",C.borderStyle.width||1),xe.setAttribute("stroke","transparent"),xe.setAttribute("fill","transparent"),fe.append(xe),this.container.append(fe),!C.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return l(this,de)}addHighlightArea(){this.container.classList.add("highlightArea")}}de=new WeakMap;class j extends W{constructor(re){super(re),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class he extends a{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class Y extends a{constructor(C){super(C,{isRenderable:!0,ignoreBorder:!0});$(this,Ee,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=p.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const C=this.data,{width:G,height:ae}=h(C.rect),fe=this.svgFactory.create(G,ae,!0);for(const be of C.inkLists){let xe=[];for(const We of be){const Fe=We.x-C.rect[0],Ze=C.rect[3]-We.y;xe.push(`${Fe},${Ze}`)}xe=xe.join(" ");const De=this.svgFactory.createElement(this.svgElementName);l(this,Ee).push(De),De.setAttribute("points",xe),De.setAttribute("stroke-width",C.borderStyle.width||1),De.setAttribute("stroke","transparent"),De.setAttribute("fill","transparent"),!C.popupRef&&this.hasPopupData&&this._createPopup(),fe.append(De)}return this.container.append(fe),this.container}getElementsToTriggerPopup(){return l(this,Ee)}addHighlightArea(){this.container.classList.add("highlightArea")}}Ee=new WeakMap,w.InkAnnotationElement=Y;class z extends a{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class ee extends a{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class oe extends a{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class ye extends a{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class Pe extends a{constructor(re){super(re,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}w.StampAnnotationElement=Pe;class L extends a{constructor(C){var fe;super(C,{isRenderable:!0});$(this,U);$(this,K,null);const{filename:G,content:ae}=this.data.file;this.filename=(0,y.getFilenameFromUrl)(G,!0),this.content=ae,(fe=this.linkService.eventBus)==null||fe.dispatch("fileattachmentannotation",{source:this,filename:G,content:ae})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:C,data:G}=this;let ae;G.hasAppearance||G.fillAlpha===0?ae=document.createElement("div"):(ae=document.createElement("img"),ae.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(G.name)?"paperclip":"pushpin"}.svg`,G.fillAlpha&&G.fillAlpha<1&&(ae.style=`filter: opacity(${Math.round(G.fillAlpha*100)}%);`)),ae.addEventListener("dblclick",J(this,U,Sn).bind(this)),le(this,K,ae);const{isMac:fe}=p.FeatureTest.platform;return C.addEventListener("keydown",be=>{be.key==="Enter"&&(fe?be.metaKey:be.ctrlKey)&&J(this,U,Sn).call(this)}),!G.popupRef&&this.hasPopupData?this._createPopup():ae.classList.add("popupTriggerArea"),C.append(ae),C}getElementsToTriggerPopup(){return l(this,K)}addHighlightArea(){this.container.classList.add("highlightArea")}}K=new WeakMap,U=new WeakSet,Sn=function(){var C;(C=this.downloadManager)==null||C.openOrDownloadData(this.container,this.content,this.filename)};class P{constructor(re){$(this,Te);$(this,ke);$(this,Ae,null);$(this,Se,null);$(this,we,new Map);let{div:C,accessibilityManager:G,annotationCanvasMap:ae,l10n:fe,page:be,viewport:xe}=re;this.div=C,le(this,Ae,G),le(this,Se,ae),this.l10n=fe,this.page=be,this.viewport=xe,this.zIndex=0,this.l10n||(this.l10n=g.NullL10n)}async render(re){const{annotations:C}=re,G=this.div;(0,y.setLayerDimensions)(G,this.viewport);const ae=new Map,fe={data:null,layer:G,linkService:re.linkService,downloadManager:re.downloadManager,imageResourcesPath:re.imageResourcesPath||"",renderForms:re.renderForms!==!1,svgFactory:new y.DOMSVGFactory,annotationStorage:re.annotationStorage||new k.AnnotationStorage,enableScripting:re.enableScripting===!0,hasJSActions:re.hasJSActions,fieldObjects:re.fieldObjects,parent:this,elements:null};for(const be of C){if(be.noHTML)continue;const xe=be.annotationType===p.AnnotationType.POPUP;if(xe){const Fe=ae.get(be.id);if(!Fe)continue;fe.elements=Fe}else{const{width:Fe,height:Ze}=h(be.rect);if(Fe<=0||Ze<=0)continue}fe.data=be;const De=f.create(fe);if(!De.isRenderable)continue;if(!xe&&be.popupRef){const Fe=ae.get(be.popupRef);Fe?Fe.push(De):ae.set(be.popupRef,[De])}De.annotationEditorType>0&&l(this,we).set(De.data.id,De);const We=De.render();be.hidden&&(We.style.visibility="hidden"),J(this,Te,vr).call(this,We,be.id)}J(this,ke,En).call(this),await this.l10n.translate(G)}update(re){let{viewport:C}=re;const G=this.div;this.viewport=C,(0,y.setLayerDimensions)(G,{rotation:C.rotation}),J(this,ke,En).call(this),G.hidden=!1}getEditableAnnotations(){return Array.from(l(this,we).values())}getEditableAnnotation(re){return l(this,we).get(re)}}Ae=new WeakMap,Se=new WeakMap,we=new WeakMap,Te=new WeakSet,vr=function(re,C){var ae;const G=re.firstChild||re;G.id=`${p.AnnotationPrefix}${C}`,this.div.append(re),(ae=l(this,Ae))==null||ae.moveElementInDOM(this.div,re,G,!1)},ke=new WeakSet,En=function(){if(!l(this,Se))return;const re=this.div;for(const[C,G]of l(this,Se)){const ae=re.querySelector(`[data-annotation-id="${C}"]`);if(!ae)continue;const{firstChild:fe}=ae;fe?fe.nodeName==="CANVAS"?fe.replaceWith(G):fe.before(G):ae.append(G)}l(this,Se).clear()},w.AnnotationLayer=P},(N,w)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.ColorConverters=void 0;function t(k){return Math.floor(Math.max(0,Math.min(1,k))*255).toString(16).padStart(2,"0")}function p(k){return Math.max(0,Math.min(255,255*k))}class y{static CMYK_G(u){let[g,e,i,n]=u;return["G",1-Math.min(1,.3*g+.59*i+.11*e+n)]}static G_CMYK(u){let[g]=u;return["CMYK",0,0,0,1-g]}static G_RGB(u){let[g]=u;return["RGB",g,g,g]}static G_rgb(u){let[g]=u;return g=p(g),[g,g,g]}static G_HTML(u){let[g]=u;const e=t(g);return`#${e}${e}${e}`}static RGB_G(u){let[g,e,i]=u;return["G",.3*g+.59*e+.11*i]}static RGB_rgb(u){return u.map(p)}static RGB_HTML(u){return`#${u.map(t).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(u){let[g,e,i,n]=u;return["RGB",1-Math.min(1,g+n),1-Math.min(1,i+n),1-Math.min(1,e+n)]}static CMYK_rgb(u){let[g,e,i,n]=u;return[p(1-Math.min(1,g+n)),p(1-Math.min(1,i+n)),p(1-Math.min(1,e+n))]}static CMYK_HTML(u){const g=this.CMYK_RGB(u).slice(1);return this.RGB_HTML(g)}static RGB_CMYK(u){let[g,e,i]=u;const n=1-g,d=1-e,h=1-i,f=Math.min(n,d,h);return["CMYK",n,d,h,f]}}w.ColorConverters=y},(N,w)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.NullL10n=void 0,w.getL10nFallback=p;const t={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};t.print_progress_percent="{{progress}}%";function p(u,g){switch(u){case"find_match_count":u=`find_match_count[${g.total===1?"one":"other"}]`;break;case"find_match_count_limit":u=`find_match_count_limit[${g.limit===1?"one":"other"}]`;break}return t[u]||""}function y(u,g){return g?u.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(e,i)=>i in g?g[i]:"{{"+i+"}}"):u}const k={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p(u,g);return y(e,g)},async translate(u){}};w.NullL10n=k},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.XfaLayer=void 0,t(89);var p=t(194);class y{static setupStorage(u,g,e,i,n){const d=i.getValue(g,{value:null});switch(e.name){case"textarea":if(d.value!==null&&(u.textContent=d.value),n==="print")break;u.addEventListener("input",h=>{i.setValue(g,{value:h.target.value})});break;case"input":if(e.attributes.type==="radio"||e.attributes.type==="checkbox"){if(d.value===e.attributes.xfaOn?u.setAttribute("checked",!0):d.value===e.attributes.xfaOff&&u.removeAttribute("checked"),n==="print")break;u.addEventListener("change",h=>{i.setValue(g,{value:h.target.checked?h.target.getAttribute("xfaOn"):h.target.getAttribute("xfaOff")})})}else{if(d.value!==null&&u.setAttribute("value",d.value),n==="print")break;u.addEventListener("input",h=>{i.setValue(g,{value:h.target.value})})}break;case"select":if(d.value!==null){u.setAttribute("value",d.value);for(const h of e.children)h.attributes.value===d.value?h.attributes.selected=!0:h.attributes.hasOwnProperty("selected")&&delete h.attributes.selected}u.addEventListener("input",h=>{const f=h.target.options,a=f.selectedIndex===-1?"":f[f.selectedIndex].value;i.setValue(g,{value:a})});break}}static setAttributes(u){let{html:g,element:e,storage:i=null,intent:n,linkService:d}=u;const{attributes:h}=e,f=g instanceof HTMLAnchorElement;h.type==="radio"&&(h.name=`${h.name}-${n}`);for(const[a,r]of Object.entries(h))if(r!=null)switch(a){case"class":r.length&&g.setAttribute(a,r.join(" "));break;case"dataId":break;case"id":g.setAttribute("data-element-id",r);break;case"style":Object.assign(g.style,r);break;case"textContent":g.textContent=r;break;default:(!f||a!=="href"&&a!=="newWindow")&&g.setAttribute(a,r)}f&&d.addLinkAttributes(g,h.href,h.newWindow),i&&h.dataId&&this.setupStorage(g,h.dataId,e,i)}static render(u){var r;const g=u.annotationStorage,e=u.linkService,i=u.xfaHtml,n=u.intent||"display",d=document.createElement(i.name);i.attributes&&this.setAttributes({html:d,element:i,intent:n,linkService:e});const h=[[i,-1,d]],f=u.div;if(f.append(d),u.viewport){const o=`matrix(${u.viewport.transform.join(",")})`;f.style.transform=o}n!=="richText"&&f.setAttribute("class","xfaLayer xfaFont");const a=[];for(;h.length>0;){const[o,m,v]=h.at(-1);if(m+1===o.children.length){h.pop();continue}const A=o.children[++h.at(-1)[1]];if(A===null)continue;const{name:b}=A;if(b==="#text"){const s=document.createTextNode(A.value);a.push(s),v.append(s);continue}const c=(r=A==null?void 0:A.attributes)!=null&&r.xmlns?document.createElementNS(A.attributes.xmlns,b):document.createElement(b);if(v.append(c),A.attributes&&this.setAttributes({html:c,element:A,storage:g,intent:n,linkService:e}),A.children&&A.children.length>0)h.push([A,-1,c]);else if(A.value){const s=document.createTextNode(A.value);p.XfaText.shouldBuildText(b)&&a.push(s),c.append(s)}}for(const o of f.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))o.setAttribute("readOnly",!0);return{textDivs:a}}static update(u){const g=`matrix(${u.viewport.transform.join(",")})`;u.div.style.transform=g,u.div.hidden=!1}}w.XfaLayer=y},(N,w,t)=>{var i,n,d,h,f,a,r,o,m,v,A,b,c,s,x,br,S,yr,I,Ar,Q,Sr,j,Pn,Y,Er,ee,xn,ye,Pr,L,xr,M,Tr,R,Cr,B,wr,Z,at,q,Tn,te,Bt,ve,Ut,Oe,gt,Le,Cn,ne,Vt,ge,kr,Me,wn,ze,Rr,He,Mr,Xe,kn,Je,Ht,H,mt;Object.defineProperty(w,"__esModule",{value:!0}),w.InkEditor=void 0,t(89),t(2);var p=t(1),y=t(164),k=t(198),u=t(168),g=t(165);const de=class de extends y.AnnotationEditor{constructor(U){super({...U,name:"inkEditor"});$(this,x);$(this,S);$(this,I);$(this,Q);$(this,j);$(this,Y);$(this,ee);$(this,ye);$(this,L);$(this,M);$(this,R);$(this,B);$(this,Z);$(this,q);$(this,te);$(this,ve);$(this,Oe);$(this,Le);$(this,ne);$(this,He);$(this,Xe);$(this,Je);$(this,H);$(this,i,0);$(this,n,0);$(this,d,this.canvasPointermove.bind(this));$(this,h,this.canvasPointerleave.bind(this));$(this,f,this.canvasPointerup.bind(this));$(this,a,this.canvasPointerdown.bind(this));$(this,r,new Path2D);$(this,o,!1);$(this,m,!1);$(this,v,!1);$(this,A,null);$(this,b,0);$(this,c,0);$(this,s,null);this.color=U.color||null,this.thickness=U.thickness||null,this.opacity=U.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(U){y.AnnotationEditor.initialize(U,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(U,ie){switch(U){case p.AnnotationEditorParamsType.INK_THICKNESS:de._defaultThickness=ie;break;case p.AnnotationEditorParamsType.INK_COLOR:de._defaultColor=ie;break;case p.AnnotationEditorParamsType.INK_OPACITY:de._defaultOpacity=ie/100;break}}updateParams(U,ie){switch(U){case p.AnnotationEditorParamsType.INK_THICKNESS:J(this,x,br).call(this,ie);break;case p.AnnotationEditorParamsType.INK_COLOR:J(this,S,yr).call(this,ie);break;case p.AnnotationEditorParamsType.INK_OPACITY:J(this,I,Ar).call(this,ie);break}}static get defaultPropertiesToUpdate(){return[[p.AnnotationEditorParamsType.INK_THICKNESS,de._defaultThickness],[p.AnnotationEditorParamsType.INK_COLOR,de._defaultColor||y.AnnotationEditor._defaultLineColor],[p.AnnotationEditorParamsType.INK_OPACITY,Math.round(de._defaultOpacity*100)]]}get propertiesToUpdate(){return[[p.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||de._defaultThickness],[p.AnnotationEditorParamsType.INK_COLOR,this.color||de._defaultColor||y.AnnotationEditor._defaultLineColor],[p.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??de._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(J(this,te,Bt).call(this),J(this,ve,Ut).call(this)),this.isAttachedToDOM||(this.parent.add(this),J(this,Oe,gt).call(this)),J(this,H,mt).call(this)))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,l(this,A).disconnect(),le(this,A,null),super.remove())}setParent(U){!this.parent&&U?this._uiManager.removeShouldRescale(this):this.parent&&U===null&&this._uiManager.addShouldRescale(this),super.setParent(U)}onScaleChanging(){const[U,ie]=this.parentDimensions,Ae=this.width*U,Se=this.height*ie;this.setDimensions(Ae,Se)}enableEditMode(){l(this,o)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",l(this,a)))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",l(this,a)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){l(this,o)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),le(this,o,!0),this.div.classList.add("disabled"),J(this,H,mt).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(U){this._focusEventsAllowed&&(super.focusin(U),this.enableEditMode())}canvasPointerdown(U){U.button!==0||!this.isInEditMode()||l(this,o)||(this.setInForeground(),U.preventDefault(),U.type!=="mouse"&&this.div.focus(),J(this,Y,Er).call(this,U.offsetX,U.offsetY))}canvasPointermove(U){U.preventDefault(),J(this,ee,xn).call(this,U.offsetX,U.offsetY)}canvasPointerup(U){U.preventDefault(),J(this,q,Tn).call(this,U)}canvasPointerleave(U){J(this,q,Tn).call(this,U)}get isResizable(){return!this.isEmpty()&&l(this,o)}render(){if(this.div)return this.div;let U,ie;this.width&&(U=this.x,ie=this.y),super.render(),y.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(Ne=>{var ke;return(ke=this.div)==null?void 0:ke.setAttribute("aria-label",Ne)});const[Ae,Se,we,Te]=J(this,Q,Sr).call(this);if(this.setAt(Ae,Se,0,0),this.setDims(we,Te),J(this,te,Bt).call(this),this.width){const[Ne,ke]=this.parentDimensions;this.setAspectRatio(this.width*Ne,this.height*ke),this.setAt(U*Ne,ie*ke,this.width*Ne,this.height*ke),le(this,v,!0),J(this,Oe,gt).call(this),this.setDims(this.width*Ne,this.height*ke),J(this,Z,at).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return J(this,ve,Ut).call(this),this.div}setDimensions(U,ie){const Ae=Math.round(U),Se=Math.round(ie);if(l(this,b)===Ae&&l(this,c)===Se)return;le(this,b,Ae),le(this,c,Se),this.canvas.style.visibility="hidden";const[we,Te]=this.parentDimensions;this.width=U/we,this.height=ie/Te,this.fixAndSetPosition(),l(this,o)&&J(this,Le,Cn).call(this,U,ie),J(this,Oe,gt).call(this),J(this,Z,at).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(U,ie,Ae){var fe,be,xe;if(U instanceof k.InkAnnotationElement)return null;const Se=super.deserialize(U,ie,Ae);Se.thickness=U.thickness,Se.color=p.Util.makeHexColor(...U.color),Se.opacity=U.opacity;const[we,Te]=Se.pageDimensions,Ne=Se.width*we,ke=Se.height*Te,Ue=Se.parentScale,Be=U.thickness/2;le(Se,o,!0),le(Se,b,Math.round(Ne)),le(Se,c,Math.round(ke));const{paths:re,rect:C,rotation:G}=U;for(let{bezier:De}of re){De=J(fe=de,ze,Rr).call(fe,De,C,G);const We=[];Se.paths.push(We);let Fe=Ue*(De[0]-Be),Ze=Ue*(De[1]-Be);for(let $e=2,Ye=De.length;$e<Ye;$e+=6){const Qe=Ue*(De[$e]-Be),qe=Ue*(De[$e+1]-Be),et=Ue*(De[$e+2]-Be),rt=Ue*(De[$e+3]-Be),nt=Ue*(De[$e+4]-Be),it=Ue*(De[$e+5]-Be);We.push([[Fe,Ze],[Qe,qe],[et,rt],[nt,it]]),Fe=nt,Ze=it}const Ge=J(this,ge,kr).call(this,We);Se.bezierPath2D.push(Ge)}const ae=J(be=Se,Xe,kn).call(be);return le(Se,n,Math.max(y.AnnotationEditor.MIN_SIZE,ae[2]-ae[0])),le(Se,i,Math.max(y.AnnotationEditor.MIN_SIZE,ae[3]-ae[1])),J(xe=Se,Le,Cn).call(xe,Ne,ke),Se}serialize(){if(this.isEmpty())return null;const U=this.getRect(0,0),ie=y.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:p.AnnotationEditorType.INK,color:ie,thickness:this.thickness,opacity:this.opacity,paths:J(this,He,Mr).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,U),pageIndex:this.pageIndex,rect:U,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakMap,A=new WeakMap,b=new WeakMap,c=new WeakMap,s=new WeakMap,x=new WeakSet,br=function(U){const ie=this.thickness;this.addCommands({cmd:()=>{this.thickness=U,J(this,H,mt).call(this)},undo:()=>{this.thickness=ie,J(this,H,mt).call(this)},mustExec:!0,type:p.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},S=new WeakSet,yr=function(U){const ie=this.color;this.addCommands({cmd:()=>{this.color=U,J(this,Z,at).call(this)},undo:()=>{this.color=ie,J(this,Z,at).call(this)},mustExec:!0,type:p.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},I=new WeakSet,Ar=function(U){U/=100;const ie=this.opacity;this.addCommands({cmd:()=>{this.opacity=U,J(this,Z,at).call(this)},undo:()=>{this.opacity=ie,J(this,Z,at).call(this)},mustExec:!0,type:p.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},Q=new WeakSet,Sr=function(){const{parentRotation:U,parentDimensions:[ie,Ae]}=this;switch(U){case 90:return[0,Ae,Ae,ie];case 180:return[ie,Ae,ie,Ae];case 270:return[ie,0,Ae,ie];default:return[0,0,ie,Ae]}},j=new WeakSet,Pn=function(){const{ctx:U,color:ie,opacity:Ae,thickness:Se,parentScale:we,scaleFactor:Te}=this;U.lineWidth=Se*we/Te,U.lineCap="round",U.lineJoin="round",U.miterLimit=10,U.strokeStyle=`${ie}${(0,g.opacityToHex)(Ae)}`},Y=new WeakSet,Er=function(U,ie){this.canvas.addEventListener("contextmenu",u.noContextMenu),this.canvas.addEventListener("pointerleave",l(this,h)),this.canvas.addEventListener("pointermove",l(this,d)),this.canvas.addEventListener("pointerup",l(this,f)),this.canvas.removeEventListener("pointerdown",l(this,a)),this.isEditing=!0,l(this,v)||(le(this,v,!0),J(this,Oe,gt).call(this),this.thickness||(this.thickness=de._defaultThickness),this.color||(this.color=de._defaultColor||y.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=de._defaultOpacity)),this.currentPath.push([U,ie]),le(this,m,!1),J(this,j,Pn).call(this),le(this,s,()=>{J(this,M,Tr).call(this),l(this,s)&&window.requestAnimationFrame(l(this,s))}),window.requestAnimationFrame(l(this,s))},ee=new WeakSet,xn=function(U,ie){const[Ae,Se]=this.currentPath.at(-1);if(this.currentPath.length>1&&U===Ae&&ie===Se)return;const we=this.currentPath;let Te=l(this,r);if(we.push([U,ie]),le(this,m,!0),we.length<=2){Te.moveTo(...we[0]),Te.lineTo(U,ie);return}we.length===3&&(le(this,r,Te=new Path2D),Te.moveTo(...we[0])),J(this,R,Cr).call(this,Te,...we.at(-3),...we.at(-2),U,ie)},ye=new WeakSet,Pr=function(){if(this.currentPath.length===0)return;const U=this.currentPath.at(-1);l(this,r).lineTo(...U)},L=new WeakSet,xr=function(U,ie){le(this,s,null),U=Math.min(Math.max(U,0),this.canvas.width),ie=Math.min(Math.max(ie,0),this.canvas.height),J(this,ee,xn).call(this,U,ie),J(this,ye,Pr).call(this);let Ae;if(this.currentPath.length!==1)Ae=J(this,B,wr).call(this);else{const ke=[U,ie];Ae=[[ke,ke.slice(),ke.slice(),ke]]}const Se=l(this,r),we=this.currentPath;this.currentPath=[],le(this,r,new Path2D);const Te=()=>{this.allRawPaths.push(we),this.paths.push(Ae),this.bezierPath2D.push(Se),this.rebuild()},Ne=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(J(this,te,Bt).call(this),J(this,ve,Ut).call(this)),J(this,H,mt).call(this))};this.addCommands({cmd:Te,undo:Ne,mustExec:!0})},M=new WeakSet,Tr=function(){if(!l(this,m))return;le(this,m,!1);const U=Math.ceil(this.thickness*this.parentScale),ie=this.currentPath.slice(-3),Ae=ie.map(Te=>Te[0]),Se=ie.map(Te=>Te[1]);Math.min(...Ae)-U,Math.max(...Ae)+U,Math.min(...Se)-U,Math.max(...Se)+U;const{ctx:we}=this;we.save(),we.clearRect(0,0,this.canvas.width,this.canvas.height);for(const Te of this.bezierPath2D)we.stroke(Te);we.stroke(l(this,r)),we.restore()},R=new WeakSet,Cr=function(U,ie,Ae,Se,we,Te,Ne){const ke=(ie+Se)/2,Ue=(Ae+we)/2,Be=(Se+Te)/2,re=(we+Ne)/2;U.bezierCurveTo(ke+2*(Se-ke)/3,Ue+2*(we-Ue)/3,Be+2*(Se-Be)/3,re+2*(we-re)/3,Be,re)},B=new WeakSet,wr=function(){const U=this.currentPath;if(U.length<=2)return[[U[0],U[0],U.at(-1),U.at(-1)]];const ie=[];let Ae,[Se,we]=U[0];for(Ae=1;Ae<U.length-2;Ae++){const[C,G]=U[Ae],[ae,fe]=U[Ae+1],be=(C+ae)/2,xe=(G+fe)/2,De=[Se+2*(C-Se)/3,we+2*(G-we)/3],We=[be+2*(C-be)/3,xe+2*(G-xe)/3];ie.push([[Se,we],De,We,[be,xe]]),[Se,we]=[be,xe]}const[Te,Ne]=U[Ae],[ke,Ue]=U[Ae+1],Be=[Se+2*(Te-Se)/3,we+2*(Ne-we)/3],re=[ke+2*(Te-ke)/3,Ue+2*(Ne-Ue)/3];return ie.push([[Se,we],Be,re,[ke,Ue]]),ie},Z=new WeakSet,at=function(){if(this.isEmpty()){J(this,ne,Vt).call(this);return}J(this,j,Pn).call(this);const{canvas:U,ctx:ie}=this;ie.setTransform(1,0,0,1,0,0),ie.clearRect(0,0,U.width,U.height),J(this,ne,Vt).call(this);for(const Ae of this.bezierPath2D)ie.stroke(Ae)},q=new WeakSet,Tn=function(U){this.canvas.removeEventListener("pointerleave",l(this,h)),this.canvas.removeEventListener("pointermove",l(this,d)),this.canvas.removeEventListener("pointerup",l(this,f)),this.canvas.addEventListener("pointerdown",l(this,a)),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",u.noContextMenu)},10),J(this,L,xr).call(this,U.offsetX,U.offsetY),this.addToAnnotationStorage(),this.setInBackground()},te=new WeakSet,Bt=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",y.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(U=>{var ie;return(ie=this.canvas)==null?void 0:ie.setAttribute("aria-label",U)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},ve=new WeakSet,Ut=function(){le(this,A,new ResizeObserver(U=>{const ie=U[0].contentRect;ie.width&&ie.height&&this.setDimensions(ie.width,ie.height)})),l(this,A).observe(this.div)},Oe=new WeakSet,gt=function(){if(!l(this,v))return;const[U,ie]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*U),this.canvas.height=Math.ceil(this.height*ie),J(this,ne,Vt).call(this)},Le=new WeakSet,Cn=function(U,ie){const Ae=J(this,Je,Ht).call(this),Se=(U-Ae)/l(this,n),we=(ie-Ae)/l(this,i);this.scaleFactor=Math.min(Se,we)},ne=new WeakSet,Vt=function(){const U=J(this,Je,Ht).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+U,this.translationY*this.scaleFactor+U)},ge=new WeakSet,kr=function(U){const ie=new Path2D;for(let Ae=0,Se=U.length;Ae<Se;Ae++){const[we,Te,Ne,ke]=U[Ae];Ae===0&&ie.moveTo(...we),ie.bezierCurveTo(Te[0],Te[1],Ne[0],Ne[1],ke[0],ke[1])}return ie},Me=new WeakSet,wn=function(U,ie,Ae){const[Se,we,Te,Ne]=ie;switch(Ae){case 0:for(let ke=0,Ue=U.length;ke<Ue;ke+=2)U[ke]+=Se,U[ke+1]=Ne-U[ke+1];break;case 90:for(let ke=0,Ue=U.length;ke<Ue;ke+=2){const Be=U[ke];U[ke]=U[ke+1]+Se,U[ke+1]=Be+we}break;case 180:for(let ke=0,Ue=U.length;ke<Ue;ke+=2)U[ke]=Te-U[ke],U[ke+1]+=we;break;case 270:for(let ke=0,Ue=U.length;ke<Ue;ke+=2){const Be=U[ke];U[ke]=Te-U[ke+1],U[ke+1]=Ne-Be}break;default:throw new Error("Invalid rotation")}return U},ze=new WeakSet,Rr=function(U,ie,Ae){const[Se,we,Te,Ne]=ie;switch(Ae){case 0:for(let ke=0,Ue=U.length;ke<Ue;ke+=2)U[ke]-=Se,U[ke+1]=Ne-U[ke+1];break;case 90:for(let ke=0,Ue=U.length;ke<Ue;ke+=2){const Be=U[ke];U[ke]=U[ke+1]-we,U[ke+1]=Be-Se}break;case 180:for(let ke=0,Ue=U.length;ke<Ue;ke+=2)U[ke]=Te-U[ke],U[ke+1]-=we;break;case 270:for(let ke=0,Ue=U.length;ke<Ue;ke+=2){const Be=U[ke];U[ke]=Ne-U[ke+1],U[ke+1]=Te-Be}break;default:throw new Error("Invalid rotation")}return U},He=new WeakSet,Mr=function(U,ie,Ae,Se){var Ue,Be;const we=[],Te=this.thickness/2,Ne=U*ie+Te,ke=U*Ae+Te;for(const re of this.paths){const C=[],G=[];for(let ae=0,fe=re.length;ae<fe;ae++){const[be,xe,De,We]=re[ae],Fe=U*be[0]+Ne,Ze=U*be[1]+ke,Ge=U*xe[0]+Ne,$e=U*xe[1]+ke,Ye=U*De[0]+Ne,Qe=U*De[1]+ke,qe=U*We[0]+Ne,et=U*We[1]+ke;ae===0&&(C.push(Fe,Ze),G.push(Fe,Ze)),C.push(Ge,$e,Ye,Qe,qe,et),G.push(Ge,$e),ae===fe-1&&G.push(qe,et)}we.push({bezier:J(Ue=de,Me,wn).call(Ue,C,Se,this.rotation),points:J(Be=de,Me,wn).call(Be,G,Se,this.rotation)})}return we},Xe=new WeakSet,kn=function(){let U=1/0,ie=-1/0,Ae=1/0,Se=-1/0;for(const we of this.paths)for(const[Te,Ne,ke,Ue]of we){const Be=p.Util.bezierBoundingBox(...Te,...Ne,...ke,...Ue);U=Math.min(U,Be[0]),Ae=Math.min(Ae,Be[1]),ie=Math.max(ie,Be[2]),Se=Math.max(Se,Be[3])}return[U,Ae,ie,Se]},Je=new WeakSet,Ht=function(){return l(this,o)?Math.ceil(this.thickness*this.parentScale):0},H=new WeakSet,mt=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.isEmpty())return;if(!l(this,o)){J(this,Z,at).call(this);return}const ie=J(this,Xe,kn).call(this),Ae=J(this,Je,Ht).call(this);le(this,n,Math.max(y.AnnotationEditor.MIN_SIZE,ie[2]-ie[0])),le(this,i,Math.max(y.AnnotationEditor.MIN_SIZE,ie[3]-ie[1]));const Se=Math.ceil(Ae+l(this,n)*this.scaleFactor),we=Math.ceil(Ae+l(this,i)*this.scaleFactor),[Te,Ne]=this.parentDimensions;this.width=Se/Te,this.height=we/Ne,this.setAspectRatio(Se,we);const ke=this.translationX,Ue=this.translationY;this.translationX=-ie[0],this.translationY=-ie[1],J(this,Oe,gt).call(this),J(this,Z,at).call(this),le(this,b,Se),le(this,c,we),this.setDims(Se,we);const Be=U?Ae/this.scaleFactor/2:0;this.translate(ke-this.translationX-Be,Ue-this.translationY-Be)},$(de,ge),$(de,Me),$(de,ze),tt(de,"_defaultColor",null),tt(de,"_defaultOpacity",1),tt(de,"_defaultThickness",1),tt(de,"_type","ink");let e=de;w.InkEditor=e},(N,w,t)=>{var e,i,n,d,h,f,a,r,o,m,v,Pt,b,xt,s,Wt,T,Rn,D,Ir,_,Lr,W,Mn,he,zt,z,Or;Object.defineProperty(w,"__esModule",{value:!0}),w.StampEditor=void 0,t(149),t(152);var p=t(1),y=t(164),k=t(168),u=t(198);const oe=class oe extends y.AnnotationEditor{constructor(L){super({...L,name:"stampEditor"});$(this,v);$(this,b);$(this,s);$(this,T);$(this,D);$(this,_);$(this,W);$(this,he);$(this,z);$(this,e,null);$(this,i,null);$(this,n,null);$(this,d,null);$(this,h,null);$(this,f,null);$(this,a,null);$(this,r,null);$(this,o,!1);$(this,m,!1);le(this,d,L.bitmapUrl),le(this,h,L.bitmapFile)}static initialize(L){y.AnnotationEditor.initialize(L)}static get supportedTypes(){const L=["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"];return(0,p.shadow)(this,"supportedTypes",L.map(P=>`image/${P}`))}static get supportedTypesStr(){return(0,p.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(L){return this.supportedTypes.includes(L)}static paste(L,P){P.pasteEditor(p.AnnotationEditorType.STAMP,{bitmapFile:L.getAsFile()})}remove(){var L,P;l(this,i)&&(le(this,e,null),this._uiManager.imageManager.deleteId(l(this,i)),(L=l(this,f))==null||L.remove(),le(this,f,null),(P=l(this,a))==null||P.disconnect(),le(this,a,null)),super.remove()}rebuild(){if(!this.parent){l(this,i)&&J(this,s,Wt).call(this);return}super.rebuild(),this.div!==null&&(l(this,i)&&J(this,s,Wt).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(l(this,n)||l(this,e)||l(this,d)||l(this,h))}get isResizable(){return!0}render(){if(this.div)return this.div;let L,P;if(this.width&&(L=this.x,P=this.y),super.render(),this.div.hidden=!0,l(this,e)?J(this,T,Rn).call(this):J(this,s,Wt).call(this),this.width){const[M,E]=this.parentDimensions;this.setAt(L*M,P*E,this.width*M,this.height*E)}return this.div}static deserialize(L,P,M){if(L instanceof u.StampAnnotationElement)return null;const E=super.deserialize(L,P,M),{rect:R,bitmapUrl:O,bitmapId:B,isSvg:F,accessibilityData:Z}=L;B&&M.imageManager.isValidId(B)?le(E,i,B):le(E,d,O),le(E,o,F);const[se,q]=E.pageDimensions;return E.width=(R[2]-R[0])/se,E.height=(R[3]-R[1])/q,Z&&(E.altTextData=Z),E}serialize(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.isEmpty())return null;const M={annotationType:p.AnnotationEditorType.STAMP,bitmapId:l(this,i),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:l(this,o),structTreeParentId:this._structTreeParentId};if(L)return M.bitmapUrl=J(this,he,zt).call(this,!0),M.accessibilityData=this.altTextData,M;const{decorative:E,altText:R}=this.altTextData;if(!E&&R&&(M.accessibilityData={type:"Figure",alt:R}),P===null)return M;P.stamps||(P.stamps=new Map);const O=l(this,o)?(M.rect[2]-M.rect[0])*(M.rect[3]-M.rect[1]):null;if(!P.stamps.has(l(this,i)))P.stamps.set(l(this,i),{area:O,serialized:M}),M.bitmap=J(this,he,zt).call(this,!1);else if(l(this,o)){const B=P.stamps.get(l(this,i));O>B.area&&(B.area=O,B.serialized.bitmap.close(),B.serialized.bitmap=J(this,he,zt).call(this,!1))}return M}};e=new WeakMap,i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakSet,Pt=function(L){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!L){this.remove();return}le(this,e,L.bitmap),P||(le(this,i,L.id),le(this,o,L.isSvg)),J(this,T,Rn).call(this)},b=new WeakSet,xt=function(){le(this,n,null),this._uiManager.enableWaiting(!1),l(this,f)&&this.div.focus()},s=new WeakSet,Wt=function(){if(l(this,i)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(l(this,i)).then(P=>J(this,v,Pt).call(this,P,!0)).finally(()=>J(this,b,xt).call(this));return}if(l(this,d)){const P=l(this,d);le(this,d,null),this._uiManager.enableWaiting(!0),le(this,n,this._uiManager.imageManager.getFromUrl(P).then(M=>J(this,v,Pt).call(this,M)).finally(()=>J(this,b,xt).call(this)));return}if(l(this,h)){const P=l(this,h);le(this,h,null),this._uiManager.enableWaiting(!0),le(this,n,this._uiManager.imageManager.getFromFile(P).then(M=>J(this,v,Pt).call(this,M)).finally(()=>J(this,b,xt).call(this)));return}const L=document.createElement("input");L.type="file",L.accept=oe.supportedTypesStr,le(this,n,new Promise(P=>{L.addEventListener("change",async()=>{if(!L.files||L.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const M=await this._uiManager.imageManager.getFromFile(L.files[0]);J(this,v,Pt).call(this,M)}P()}),L.addEventListener("cancel",()=>{this.remove(),P()})}).finally(()=>J(this,b,xt).call(this))),L.click()},T=new WeakSet,Rn=function(){const{div:L}=this;let{width:P,height:M}=l(this,e);const[E,R]=this.pageDimensions,O=.75;if(this.width)P=this.width*E,M=this.height*R;else if(P>O*E||M>O*R){const se=Math.min(O*E/P,O*R/M);P*=se,M*=se}const[B,F]=this.parentDimensions;this.setDims(P*B/E,M*F/R),this._uiManager.enableWaiting(!1);const Z=le(this,f,document.createElement("canvas"));L.append(Z),L.hidden=!1,J(this,W,Mn).call(this,P,M),J(this,z,Or).call(this),l(this,m)||(this.parent.addUndoableEditor(this),le(this,m,!0)),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()},D=new WeakSet,Ir=function(L,P){var O;const[M,E]=this.parentDimensions;this.width=L/M,this.height=P/E,this.setDims(L,P),(O=this._initialOptions)!=null&&O.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,l(this,r)!==null&&clearTimeout(l(this,r)),le(this,r,setTimeout(()=>{le(this,r,null),J(this,W,Mn).call(this,L,P)},200))},_=new WeakSet,Lr=function(L,P){const{width:M,height:E}=l(this,e);let R=M,O=E,B=l(this,e);for(;R>2*L||O>2*P;){const F=R,Z=O;R>2*L&&(R=R>=16384?Math.floor(R/2)-1:Math.ceil(R/2)),O>2*P&&(O=O>=16384?Math.floor(O/2)-1:Math.ceil(O/2));const se=new OffscreenCanvas(R,O);se.getContext("2d").drawImage(B,0,0,F,Z,0,0,R,O),B=se.transferToImageBitmap()}return B},W=new WeakSet,Mn=function(L,P){L=Math.ceil(L),P=Math.ceil(P);const M=l(this,f);if(!M||M.width===L&&M.height===P)return;M.width=L,M.height=P;const E=l(this,o)?l(this,e):J(this,_,Lr).call(this,L,P),R=M.getContext("2d");R.filter=this._uiManager.hcmFilter,R.drawImage(E,0,0,E.width,E.height,0,0,L,P)},he=new WeakSet,zt=function(L){if(L){if(l(this,o)){const E=this._uiManager.imageManager.getSvgUrl(l(this,i));if(E)return E}const P=document.createElement("canvas");return{width:P.width,height:P.height}=l(this,e),P.getContext("2d").drawImage(l(this,e),0,0),P.toDataURL()}if(l(this,o)){const[P,M]=this.pageDimensions,E=Math.round(this.width*P*k.PixelsPerInch.PDF_TO_CSS_UNITS),R=Math.round(this.height*M*k.PixelsPerInch.PDF_TO_CSS_UNITS),O=new OffscreenCanvas(E,R);return O.getContext("2d").drawImage(l(this,e),0,0,l(this,e).width,l(this,e).height,0,0,E,R),O.transferToImageBitmap()}return structuredClone(l(this,e))},z=new WeakSet,Or=function(){le(this,a,new ResizeObserver(L=>{const P=L[0].contentRect;P.width&&P.height&&J(this,D,Ir).call(this,P.width,P.height)})),l(this,a).observe(this.div)},tt(oe,"_type","stamp");let g=oe;w.StampEditor=g}],__webpack_module_cache__={};function __w_pdfjs_require__(N){var w=__webpack_module_cache__[N];if(w!==void 0)return w.exports;var t=__webpack_module_cache__[N]={exports:{}};return __webpack_modules__[N].call(t.exports,t,t.exports,__w_pdfjs_require__),t.exports}var __webpack_exports__={};return(()=>{var N=__webpack_exports__;Object.defineProperty(N,"__esModule",{value:!0}),Object.defineProperty(N,"AbortException",{enumerable:!0,get:function(){return w.AbortException}}),Object.defineProperty(N,"AnnotationEditorLayer",{enumerable:!0,get:function(){return k.AnnotationEditorLayer}}),Object.defineProperty(N,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return w.AnnotationEditorParamsType}}),Object.defineProperty(N,"AnnotationEditorType",{enumerable:!0,get:function(){return w.AnnotationEditorType}}),Object.defineProperty(N,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return u.AnnotationEditorUIManager}}),Object.defineProperty(N,"AnnotationLayer",{enumerable:!0,get:function(){return g.AnnotationLayer}}),Object.defineProperty(N,"AnnotationMode",{enumerable:!0,get:function(){return w.AnnotationMode}}),Object.defineProperty(N,"CMapCompressionType",{enumerable:!0,get:function(){return w.CMapCompressionType}}),Object.defineProperty(N,"DOMSVGFactory",{enumerable:!0,get:function(){return p.DOMSVGFactory}}),Object.defineProperty(N,"FeatureTest",{enumerable:!0,get:function(){return w.FeatureTest}}),Object.defineProperty(N,"GlobalWorkerOptions",{enumerable:!0,get:function(){return e.GlobalWorkerOptions}}),Object.defineProperty(N,"ImageKind",{enumerable:!0,get:function(){return w.ImageKind}}),Object.defineProperty(N,"InvalidPDFException",{enumerable:!0,get:function(){return w.InvalidPDFException}}),Object.defineProperty(N,"MissingPDFException",{enumerable:!0,get:function(){return w.MissingPDFException}}),Object.defineProperty(N,"OPS",{enumerable:!0,get:function(){return w.OPS}}),Object.defineProperty(N,"PDFDataRangeTransport",{enumerable:!0,get:function(){return t.PDFDataRangeTransport}}),Object.defineProperty(N,"PDFDateString",{enumerable:!0,get:function(){return p.PDFDateString}}),Object.defineProperty(N,"PDFWorker",{enumerable:!0,get:function(){return t.PDFWorker}}),Object.defineProperty(N,"PasswordResponses",{enumerable:!0,get:function(){return w.PasswordResponses}}),Object.defineProperty(N,"PermissionFlag",{enumerable:!0,get:function(){return w.PermissionFlag}}),Object.defineProperty(N,"PixelsPerInch",{enumerable:!0,get:function(){return p.PixelsPerInch}}),Object.defineProperty(N,"PromiseCapability",{enumerable:!0,get:function(){return w.PromiseCapability}}),Object.defineProperty(N,"RenderingCancelledException",{enumerable:!0,get:function(){return p.RenderingCancelledException}}),Object.defineProperty(N,"SVGGraphics",{enumerable:!0,get:function(){return t.SVGGraphics}}),Object.defineProperty(N,"UnexpectedResponseException",{enumerable:!0,get:function(){return w.UnexpectedResponseException}}),Object.defineProperty(N,"Util",{enumerable:!0,get:function(){return w.Util}}),Object.defineProperty(N,"VerbosityLevel",{enumerable:!0,get:function(){return w.VerbosityLevel}}),Object.defineProperty(N,"XfaLayer",{enumerable:!0,get:function(){return i.XfaLayer}}),Object.defineProperty(N,"build",{enumerable:!0,get:function(){return t.build}}),Object.defineProperty(N,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return w.createValidAbsoluteUrl}}),Object.defineProperty(N,"getDocument",{enumerable:!0,get:function(){return t.getDocument}}),Object.defineProperty(N,"getFilenameFromUrl",{enumerable:!0,get:function(){return p.getFilenameFromUrl}}),Object.defineProperty(N,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return p.getPdfFilenameFromUrl}}),Object.defineProperty(N,"getXfaPageViewport",{enumerable:!0,get:function(){return p.getXfaPageViewport}}),Object.defineProperty(N,"isDataScheme",{enumerable:!0,get:function(){return p.isDataScheme}}),Object.defineProperty(N,"isPdfFile",{enumerable:!0,get:function(){return p.isPdfFile}}),Object.defineProperty(N,"loadScript",{enumerable:!0,get:function(){return p.loadScript}}),Object.defineProperty(N,"noContextMenu",{enumerable:!0,get:function(){return p.noContextMenu}}),Object.defineProperty(N,"normalizeUnicode",{enumerable:!0,get:function(){return w.normalizeUnicode}}),Object.defineProperty(N,"renderTextLayer",{enumerable:!0,get:function(){return y.renderTextLayer}}),Object.defineProperty(N,"setLayerDimensions",{enumerable:!0,get:function(){return p.setLayerDimensions}}),Object.defineProperty(N,"shadow",{enumerable:!0,get:function(){return w.shadow}}),Object.defineProperty(N,"updateTextLayer",{enumerable:!0,get:function(){return y.updateTextLayer}}),Object.defineProperty(N,"version",{enumerable:!0,get:function(){return t.version}});var w=__w_pdfjs_require__(1),t=__w_pdfjs_require__(124),p=__w_pdfjs_require__(168),y=__w_pdfjs_require__(195),k=__w_pdfjs_require__(196),u=__w_pdfjs_require__(165),g=__w_pdfjs_require__(198),e=__w_pdfjs_require__(176),i=__w_pdfjs_require__(201)})(),__webpack_exports__})())})(pdf$1);var pdfExports=pdf$1.exports,pdf_viewer={exports:{}};(function(N,w){(function(p,y){N.exports=p.pdfjsViewer=y()})(globalThis,()=>(()=>{var t=[,(u,g,e)=>{var he,Y,z,ee,Dr,ye,In,L,Ln,M,Fr,R,Nr,B,Br,Z,On,q,Ur,te,Vr,ve,$t,Oe,Tt,Le,vt,ne,Hr,ge,Dn,Me,Fn,ze,_t,He,Wr,Xe,Nn,Je,Bn,H,Ct;Object.defineProperty(g,"__esModule",{value:!0}),g.PDFFindController=g.FindState=void 0,e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(93);var i=e(97),n=e(106),d=e(107);const h={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};g.FindState=h;const f=250,a=-50,r=-400,o={"":"-","":"'","":"'","":"'","":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"},m=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]);let v;const A=/\p{M}+/gu,b=/([.*+?^${}()|[\]\\])|(\p{P})|(\s+)|(\p{M})|(\p{L})/gu,c=/([^\p{M}])\p{M}*$/u,s=/^\p{M}*([^\p{M}])/u,x=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,T=new Map,S="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",D=new Map;let I=null,_=null;function Q(de){const Ee=[];let K;for(;(K=x.exec(de))!==null;){let{index:re}=K;for(const C of K[0]){let G=T.get(C);G||(G=C.normalize("NFD").length,T.set(C,G)),Ee.push([G,re++])}}let U;if(Ee.length===0&&I)U=I;else if(Ee.length>0&&_)U=_;else{const re=Object.keys(o).join(""),C=(0,n.getNormalizeWithNFKC)(),fe=`([${re}])|([${C}])|((?:゙|゚)\\n)|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|((?:\\p{Ideographic}|[぀-ヿ])\\n)|(\\n)`;Ee.length===0?U=I=new RegExp(fe+"|(\\u0000)","gum"):U=_=new RegExp(fe+`|(${S})`,"gum")}const ie=[];for(;(K=A.exec(de))!==null;)ie.push([K[0].length,K.index]);let Ae=de.normalize("NFD");const Se=[[0,0]];let we=0,Te=0,Ne=0,ke=0,Ue=0,Be=!1;return Ae=Ae.replace(U,(re,C,G,ae,fe,be,xe,De,We,Fe)=>{var Ze,Ge,$e;if(Fe-=ke,C){const Ye=o[C],Qe=Ye.length;for(let qe=1;qe<Qe;qe++)Se.push([Fe-Ne+qe,Ne-qe]);return Ne-=Qe-1,Ye}if(G){let Ye=D.get(G);Ye||(Ye=G.normalize("NFKC"),D.set(G,Ye));const Qe=Ye.length;for(let qe=1;qe<Qe;qe++)Se.push([Fe-Ne+qe,Ne-qe]);return Ne-=Qe-1,Ye}if(ae)return Be=!0,Fe+Ue===((Ze=ie[we])==null?void 0:Ze[1])?++we:(Se.push([Fe-1-Ne+1,Ne-1]),Ne-=1,ke+=1),Se.push([Fe-Ne+1,Ne]),ke+=1,Ue+=1,ae.charAt(0);if(fe){const Ye=fe.endsWith(`
`),Qe=Ye?fe.length-2:fe.length;Be=!0;let qe=Qe;Fe+Ue===((Ge=ie[we])==null?void 0:Ge[1])&&(qe-=ie[we][0],++we);for(let et=1;et<=qe;et++)Se.push([Fe-1-Ne+et,Ne-et]);return Ne-=qe,ke+=qe,Ye?(Fe+=Qe-1,Se.push([Fe-Ne+1,1+Ne]),Ne+=1,ke+=1,Ue+=1,fe.slice(0,Qe)):fe}if(be){const Ye=be.length-2;return Se.push([Fe-Ne+Ye,1+Ne]),Ne+=1,ke+=1,Ue+=1,be.slice(0,-2)}if(xe){const Ye=xe.length-1;return Se.push([Fe-Ne+Ye,Ne]),ke+=1,Ue+=1,xe.slice(0,-1)}if(De)return Se.push([Fe-Ne+1,Ne-1]),Ne-=1,ke+=1,Ue+=1," ";if(Fe+Ue===(($e=Ee[Te])==null?void 0:$e[1])){const Ye=Ee[Te][0]-1;++Te;for(let Qe=1;Qe<=Ye;Qe++)Se.push([Fe-(Ne-Qe),Ne-Qe]);Ne-=Ye,ke+=Ye}return We}),Se.push([Ae.length,Ne]),[Ae,Se,Be]}function W(de,Ee,K){if(!de)return[Ee,K];const U=Ee,ie=Ee+K-1;let Ae=(0,i.binarySearchFirstItem)(de,ke=>ke[0]>=U);de[Ae][0]>U&&--Ae;let Se=(0,i.binarySearchFirstItem)(de,ke=>ke[0]>=ie,Ae);de[Se][0]>ie&&--Se;const we=U+de[Ae][1],Ne=ie+de[Se][1]+1-we;return[we,Ne]}class j{constructor(Ee){$(this,ee);$(this,ye);$(this,L);$(this,M);$(this,R);$(this,B);$(this,Z);$(this,q);$(this,te);$(this,ve);$(this,Oe);$(this,Le);$(this,ne);$(this,ge);$(this,Me);$(this,ze);$(this,He);$(this,Xe);$(this,Je);$(this,H);$(this,he,null);$(this,Y,!0);$(this,z,0);let{linkService:K,eventBus:U,updateMatchesCountOnProgress:ie=!0}=Ee;this._linkService=K,this._eventBus=U,le(this,Y,ie),this.onIsPageVisible=null,J(this,ye,In).call(this),U._on("find",J(this,ee,Dr).bind(this)),U._on("findbarclose",J(this,He,Wr).bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return l(this,he)}setDocument(Ee){this._pdfDocument&&J(this,ye,In).call(this),Ee&&(this._pdfDocument=Ee,this._firstPageCapability.resolve())}scrollMatchIntoView(Ee){let{element:K=null,selectedLeft:U=0,pageIndex:ie=-1,matchIndex:Ae=-1}=Ee;if(!this._scrollMatches||!K)return;if(Ae===-1||Ae!==this._selected.matchIdx)return;if(ie===-1||ie!==this._selected.pageIdx)return;this._scrollMatches=!1;const Se={top:a,left:U+r};(0,i.scrollIntoView)(K,Se,!0)}}he=new WeakMap,Y=new WeakMap,z=new WeakMap,ee=new WeakSet,Dr=function(Ee){if(!Ee)return;Ee.phraseSearch===!1&&(console.error("The `phraseSearch`-parameter was removed, please provide an Array of strings in the `query`-parameter instead."),typeof Ee.query=="string"&&(Ee.query=Ee.query.match(/\S+/g)));const K=this._pdfDocument,{type:U}=Ee;(l(this,he)===null||J(this,M,Fr).call(this,Ee))&&(this._dirtyMatch=!0),le(this,he,Ee),U!=="highlightallchange"&&J(this,H,Ct).call(this,h.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||K&&this._pdfDocument!==K)return;J(this,te,Vr).call(this);const ie=!this._highlightMatches,Ae=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),U?this._dirtyMatch?J(this,Le,vt).call(this):U==="again"?(J(this,Le,vt).call(this),ie&&l(this,he).highlightAll&&J(this,Oe,Tt).call(this)):U==="highlightallchange"?(Ae?J(this,Le,vt).call(this):this._highlightMatches=!0,J(this,Oe,Tt).call(this)):J(this,Le,vt).call(this):this._findTimeout=setTimeout(()=>{J(this,Le,vt).call(this),this._findTimeout=null},f)})},ye=new WeakSet,In=function(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],le(this,z,0),le(this,he,null),this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=new d.PromiseCapability},L=new WeakSet,Ln=function(){const{query:Ee}=l(this,he);return typeof Ee=="string"?(Ee!==this._rawQuery&&(this._rawQuery=Ee,[this._normalizedQuery]=Q(Ee)),this._normalizedQuery):(Ee||[]).filter(K=>!!K).map(K=>Q(K)[0])},M=new WeakSet,Fr=function(Ee){var Se;const K=Ee.query,U=l(this,he).query,ie=typeof K;if(ie!==typeof U)return!0;if(ie==="string"){if(K!==U)return!0}else if(JSON.stringify(K)!==JSON.stringify(U))return!0;switch(Ee.type){case"again":const we=this._selected.pageIdx+1,Te=this._linkService;return we>=1&&we<=Te.pagesCount&&we!==Te.page&&!(((Se=this.onIsPageVisible)==null?void 0:Se.call(this,we))??!0);case"highlightallchange":return!1}return!0},R=new WeakSet,Nr=function(Ee,K,U){let ie=Ee.slice(0,K).match(c);if(ie){const Ae=Ee.charCodeAt(K),Se=ie[1].charCodeAt(0);if((0,n.getCharacterType)(Ae)===(0,n.getCharacterType)(Se))return!1}if(ie=Ee.slice(K+U).match(s),ie){const Ae=Ee.charCodeAt(K+U-1),Se=ie[1].charCodeAt(0);if((0,n.getCharacterType)(Ae)===(0,n.getCharacterType)(Se))return!1}return!0},B=new WeakSet,Br=function(Ee,K,U,ie){const Ae=this._pageMatches[U]=[],Se=this._pageMatchesLength[U]=[];if(!Ee)return;const we=this._pageDiffs[U];let Te;for(;(Te=Ee.exec(ie))!==null;){if(K&&!J(this,R,Nr).call(this,ie,Te.index,Te[0].length))continue;const[Ne,ke]=W(we,Te.index,Te[0].length);ke&&(Ae.push(Ne),Se.push(ke))}},Z=new WeakSet,On=function(Ee,K){const{matchDiacritics:U}=l(this,he);let ie=!1;Ee=Ee.replaceAll(b,(Se,we,Te,Ne,ke,Ue)=>we?`[ ]*\\${we}[ ]*`:Te?`[ ]*${Te}[ ]*`:Ne?"[ ]+":U?ke||Ue:ke?m.has(ke.charCodeAt(0))?ke:"":K?(ie=!0,`${Ue}\\p{M}*`):Ue);const Ae="[ ]*";return Ee.endsWith(Ae)&&(Ee=Ee.slice(0,Ee.length-Ae.length)),U&&K&&(v||(v=String.fromCharCode(...m)),ie=!0,Ee=`${Ee}(?=[${v}]|[^\\p{M}]|$)`),[ie,Ee]},q=new WeakSet,Ur=function(Ee){let K=l(this,L,Ln);if(K.length===0)return;const{caseSensitive:U,entireWord:ie}=l(this,he),Ae=this._pageContents[Ee],Se=this._hasDiacritics[Ee];let we=!1;typeof K=="string"?[we,K]=J(this,Z,On).call(this,K,Se):K=K.sort().reverse().map(ke=>{const[Ue,Be]=J(this,Z,On).call(this,ke,Se);return we||(we=Ue),`(${Be})`}).join("|");const Te=`g${we?"u":""}${U?"":"i"}`;K=K?new RegExp(K,Te):null,J(this,B,Br).call(this,K,ie,Ee,Ae),l(this,he).highlightAll&&J(this,ve,$t).call(this,Ee),this._resumePageIdx===Ee&&(this._resumePageIdx=null,J(this,ge,Dn).call(this));const Ne=this._pageMatches[Ee].length;this._matchesCountTotal+=Ne,l(this,Y)?Ne>0&&J(this,Je,Bn).call(this):++ut(this,z)._===this._linkService.pagesCount&&J(this,Je,Bn).call(this)},te=new WeakSet,Vr=function(){if(this._extractTextPromises.length>0)return;let Ee=Promise.resolve();const K={disableNormalization:!0};for(let U=0,ie=this._linkService.pagesCount;U<ie;U++){const Ae=new d.PromiseCapability;this._extractTextPromises[U]=Ae.promise,Ee=Ee.then(()=>this._pdfDocument.getPage(U+1).then(Se=>Se.getTextContent(K)).then(Se=>{const we=[];for(const Te of Se.items)we.push(Te.str),Te.hasEOL&&we.push(`
`);[this._pageContents[U],this._pageDiffs[U],this._hasDiacritics[U]]=Q(we.join("")),Ae.resolve()},Se=>{console.error(`Unable to get text content for page ${U+1}`,Se),this._pageContents[U]="",this._pageDiffs[U]=null,this._hasDiacritics[U]=!1,Ae.resolve()}))}},ve=new WeakSet,$t=function(Ee){this._scrollMatches&&this._selected.pageIdx===Ee&&(this._linkService.page=Ee+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:Ee})},Oe=new WeakSet,Tt=function(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})},Le=new WeakSet,vt=function(){const Ee=l(this,he).findPrevious,K=this._linkService.page-1,U=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=K,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,le(this,z,0),this._matchesCountTotal=0,J(this,Oe,Tt).call(this);for(let Se=0;Se<U;Se++)this._pendingFindMatches.has(Se)||(this._pendingFindMatches.add(Se),this._extractTextPromises[Se].then(()=>{this._pendingFindMatches.delete(Se),J(this,q,Ur).call(this,Se)}))}if(l(this,L,Ln).length===0){J(this,H,Ct).call(this,h.FOUND);return}if(this._resumePageIdx)return;const Ae=this._offset;if(this._pagesToSearch=U,Ae.matchIdx!==null){const Se=this._pageMatches[Ae.pageIdx].length;if(!Ee&&Ae.matchIdx+1<Se||Ee&&Ae.matchIdx>0){Ae.matchIdx=Ee?Ae.matchIdx-1:Ae.matchIdx+1,J(this,ze,_t).call(this,!0);return}J(this,Me,Fn).call(this,Ee)}J(this,ge,Dn).call(this)},ne=new WeakSet,Hr=function(Ee){const K=this._offset,U=Ee.length,ie=l(this,he).findPrevious;return U?(K.matchIdx=ie?U-1:0,J(this,ze,_t).call(this,!0),!0):(J(this,Me,Fn).call(this,ie),K.wrapped&&(K.matchIdx=null,this._pagesToSearch<0)?(J(this,ze,_t).call(this,!1),!0):!1)},ge=new WeakSet,Dn=function(){this._resumePageIdx!==null&&console.error("There can only be one pending page.");let Ee=null;do{const K=this._offset.pageIdx;if(Ee=this._pageMatches[K],!Ee){this._resumePageIdx=K;break}}while(!J(this,ne,Hr).call(this,Ee))},Me=new WeakSet,Fn=function(Ee){const K=this._offset,U=this._linkService.pagesCount;K.pageIdx=Ee?K.pageIdx-1:K.pageIdx+1,K.matchIdx=null,this._pagesToSearch--,(K.pageIdx>=U||K.pageIdx<0)&&(K.pageIdx=Ee?U-1:0,K.wrapped=!0)},ze=new WeakSet,_t=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,K=h.NOT_FOUND;const U=this._offset.wrapped;if(this._offset.wrapped=!1,Ee){const ie=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,K=U?h.WRAPPED:h.FOUND,ie!==-1&&ie!==this._selected.pageIdx&&J(this,ve,$t).call(this,ie)}J(this,H,Ct).call(this,K,l(this,he).findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,J(this,ve,$t).call(this,this._selected.pageIdx))},He=new WeakSet,Wr=function(Ee){const K=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||K&&this._pdfDocument!==K||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),J(this,H,Ct).call(this,h.FOUND),this._highlightMatches=!1,J(this,Oe,Tt).call(this))})},Xe=new WeakSet,Nn=function(){var Ae;const{pageIdx:Ee,matchIdx:K}=this._selected;let U=0,ie=this._matchesCountTotal;if(K!==-1){for(let Se=0;Se<Ee;Se++)U+=((Ae=this._pageMatches[Se])==null?void 0:Ae.length)||0;U+=K+1}return(U<1||U>ie)&&(U=ie=0),{current:U,total:ie}},Je=new WeakSet,Bn=function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:J(this,Xe,Nn).call(this)})},H=new WeakSet,Ct=function(Ee){var U;let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;!l(this,Y)&&(l(this,z)!==this._linkService.pagesCount||Ee===h.PENDING)||this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:Ee,previous:K,matchesCount:J(this,Xe,Nn).call(this),rawQuery:((U=l(this,he))==null?void 0:U.query)??null})},g.PDFFindController=j},(u,g,e)=>{var i=e(3),n=e(69),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("difference")},{difference:n})},(u,g,e)=>{var i=e(4),n=e(5).f,d=e(44),h=e(48),f=e(38),a=e(56),r=e(68);u.exports=function(o,m){var v=o.target,A=o.global,b=o.stat,c,s,x,T,S,D;if(A?s=i:b?s=i[v]||f(v,{}):s=(i[v]||{}).prototype,s)for(x in m){if(S=m[x],o.dontCallGetSet?(D=n(s,x),T=D&&D.value):T=s[x],c=r(A?x:v+(b?".":"#")+x,o.forced),!c&&T!==void 0){if(typeof S==typeof T)continue;a(S,T)}(o.sham||T&&T.sham)&&d(S,"sham",!0),h(s,x,S,o)}}},function(u){var g=function(e){return e&&e.Math===Math&&e};u.exports=g(typeof globalThis=="object"&&globalThis)||g(typeof window=="object"&&window)||g(typeof self=="object"&&self)||g(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(u,g,e)=>{var i=e(6),n=e(8),d=e(10),h=e(11),f=e(12),a=e(18),r=e(39),o=e(42),m=Object.getOwnPropertyDescriptor;g.f=i?m:function(A,b){if(A=f(A),b=a(b),o)try{return m(A,b)}catch{}if(r(A,b))return h(!n(d.f,A,b),A[b])}},(u,g,e)=>{var i=e(7);u.exports=!i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},u=>{u.exports=function(g){try{return!!g()}catch{return!0}}},(u,g,e)=>{var i=e(9),n=Function.prototype.call;u.exports=i?n.bind(n):function(){return n.apply(n,arguments)}},(u,g,e)=>{var i=e(7);u.exports=!i(function(){var n=(function(){}).bind();return typeof n!="function"||n.hasOwnProperty("prototype")})},(u,g)=>{var e={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,n=i&&!e.call({1:2},1);g.f=n?function(h){var f=i(this,h);return!!f&&f.enumerable}:e},u=>{u.exports=function(g,e){return{enumerable:!(g&1),configurable:!(g&2),writable:!(g&4),value:e}}},(u,g,e)=>{var i=e(13),n=e(16);u.exports=function(d){return i(n(d))}},(u,g,e)=>{var i=e(14),n=e(7),d=e(15),h=Object,f=i("".split);u.exports=n(function(){return!h("z").propertyIsEnumerable(0)})?function(a){return d(a)==="String"?f(a,""):h(a)}:h},(u,g,e)=>{var i=e(9),n=Function.prototype,d=n.call,h=i&&n.bind.bind(d,d);u.exports=i?h:function(f){return function(){return d.apply(f,arguments)}}},(u,g,e)=>{var i=e(14),n=i({}.toString),d=i("".slice);u.exports=function(h){return d(n(h),8,-1)}},(u,g,e)=>{var i=e(17),n=TypeError;u.exports=function(d){if(i(d))throw n("Can't call method on "+d);return d}},u=>{u.exports=function(g){return g==null}},(u,g,e)=>{var i=e(19),n=e(23);u.exports=function(d){var h=i(d,"string");return n(h)?h:h+""}},(u,g,e)=>{var i=e(8),n=e(20),d=e(23),h=e(30),f=e(33),a=e(34),r=TypeError,o=a("toPrimitive");u.exports=function(m,v){if(!n(m)||d(m))return m;var A=h(m,o),b;if(A){if(v===void 0&&(v="default"),b=i(A,m,v),!n(b)||d(b))return b;throw r("Can't convert object to primitive value")}return v===void 0&&(v="number"),f(m,v)}},(u,g,e)=>{var i=e(21),n=e(22),d=n.all;u.exports=n.IS_HTMLDDA?function(h){return typeof h=="object"?h!==null:i(h)||h===d}:function(h){return typeof h=="object"?h!==null:i(h)}},(u,g,e)=>{var i=e(22),n=i.all;u.exports=i.IS_HTMLDDA?function(d){return typeof d=="function"||d===n}:function(d){return typeof d=="function"}},u=>{var g=typeof document=="object"&&document.all,e=typeof g>"u"&&g!==void 0;u.exports={all:g,IS_HTMLDDA:e}},(u,g,e)=>{var i=e(24),n=e(21),d=e(25),h=e(26),f=Object;u.exports=h?function(a){return typeof a=="symbol"}:function(a){var r=i("Symbol");return n(r)&&d(r.prototype,f(a))}},(u,g,e)=>{var i=e(4),n=e(21),d=function(h){return n(h)?h:void 0};u.exports=function(h,f){return arguments.length<2?d(i[h]):i[h]&&i[h][f]}},(u,g,e)=>{var i=e(14);u.exports=i({}.isPrototypeOf)},(u,g,e)=>{var i=e(27);u.exports=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(u,g,e)=>{var i=e(28),n=e(7),d=e(4),h=d.String;u.exports=!!Object.getOwnPropertySymbols&&!n(function(){var f=Symbol("symbol detection");return!h(f)||!(Object(f)instanceof Symbol)||!Symbol.sham&&i&&i<41})},(u,g,e)=>{var i=e(4),n=e(29),d=i.process,h=i.Deno,f=d&&d.versions||h&&h.version,a=f&&f.v8,r,o;a&&(r=a.split("."),o=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&n&&(r=n.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/),r&&(o=+r[1]))),u.exports=o},u=>{u.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(u,g,e)=>{var i=e(31),n=e(17);u.exports=function(d,h){var f=d[h];return n(f)?void 0:i(f)}},(u,g,e)=>{var i=e(21),n=e(32),d=TypeError;u.exports=function(h){if(i(h))return h;throw d(n(h)+" is not a function")}},u=>{var g=String;u.exports=function(e){try{return g(e)}catch{return"Object"}}},(u,g,e)=>{var i=e(8),n=e(21),d=e(20),h=TypeError;u.exports=function(f,a){var r,o;if(a==="string"&&n(r=f.toString)&&!d(o=i(r,f))||n(r=f.valueOf)&&!d(o=i(r,f))||a!=="string"&&n(r=f.toString)&&!d(o=i(r,f)))return o;throw h("Can't convert object to primitive value")}},(u,g,e)=>{var i=e(4),n=e(35),d=e(39),h=e(41),f=e(27),a=e(26),r=i.Symbol,o=n("wks"),m=a?r.for||r:r&&r.withoutSetter||h;u.exports=function(v){return d(o,v)||(o[v]=f&&d(r,v)?r[v]:m("Symbol."+v)),o[v]}},(u,g,e)=>{var i=e(36),n=e(37);(u.exports=function(d,h){return n[d]||(n[d]=h!==void 0?h:{})})("versions",[]).push({version:"3.32.2",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},u=>{u.exports=!1},(u,g,e)=>{var i=e(4),n=e(38),d="__core-js_shared__",h=i[d]||n(d,{});u.exports=h},(u,g,e)=>{var i=e(4),n=Object.defineProperty;u.exports=function(d,h){try{n(i,d,{value:h,configurable:!0,writable:!0})}catch{i[d]=h}return h}},(u,g,e)=>{var i=e(14),n=e(40),d=i({}.hasOwnProperty);u.exports=Object.hasOwn||function(f,a){return d(n(f),a)}},(u,g,e)=>{var i=e(16),n=Object;u.exports=function(d){return n(i(d))}},(u,g,e)=>{var i=e(14),n=0,d=Math.random(),h=i(1 .toString);u.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+h(++n+d,36)}},(u,g,e)=>{var i=e(6),n=e(7),d=e(43);u.exports=!i&&!n(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7})},(u,g,e)=>{var i=e(4),n=e(20),d=i.document,h=n(d)&&n(d.createElement);u.exports=function(f){return h?d.createElement(f):{}}},(u,g,e)=>{var i=e(6),n=e(45),d=e(11);u.exports=i?function(h,f,a){return n.f(h,f,d(1,a))}:function(h,f,a){return h[f]=a,h}},(u,g,e)=>{var i=e(6),n=e(42),d=e(46),h=e(47),f=e(18),a=TypeError,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,m="enumerable",v="configurable",A="writable";g.f=i?d?function(c,s,x){if(h(c),s=f(s),h(x),typeof c=="function"&&s==="prototype"&&"value"in x&&A in x&&!x[A]){var T=o(c,s);T&&T[A]&&(c[s]=x.value,x={configurable:v in x?x[v]:T[v],enumerable:m in x?x[m]:T[m],writable:!1})}return r(c,s,x)}:r:function(c,s,x){if(h(c),s=f(s),h(x),n)try{return r(c,s,x)}catch{}if("get"in x||"set"in x)throw a("Accessors not supported");return"value"in x&&(c[s]=x.value),c}},(u,g,e)=>{var i=e(6),n=e(7);u.exports=i&&n(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},(u,g,e)=>{var i=e(20),n=String,d=TypeError;u.exports=function(h){if(i(h))return h;throw d(n(h)+" is not an object")}},(u,g,e)=>{var i=e(21),n=e(45),d=e(49),h=e(38);u.exports=function(f,a,r,o){o||(o={});var m=o.enumerable,v=o.name!==void 0?o.name:a;if(i(r)&&d(r,v,o),o.global)m?f[a]=r:h(a,r);else{try{o.unsafe?f[a]&&(m=!0):delete f[a]}catch{}m?f[a]=r:n.f(f,a,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return f}},(u,g,e)=>{var i=e(14),n=e(7),d=e(21),h=e(39),f=e(6),a=e(50).CONFIGURABLE,r=e(51),o=e(52),m=o.enforce,v=o.get,A=String,b=Object.defineProperty,c=i("".slice),s=i("".replace),x=i([].join),T=f&&!n(function(){return b(function(){},"length",{value:8}).length!==8}),S=String(String).split("String"),D=u.exports=function(I,_,Q){c(A(_),0,7)==="Symbol("&&(_="["+s(A(_),/^Symbol\(([^)]*)\)/,"$1")+"]"),Q&&Q.getter&&(_="get "+_),Q&&Q.setter&&(_="set "+_),(!h(I,"name")||a&&I.name!==_)&&(f?b(I,"name",{value:_,configurable:!0}):I.name=_),T&&Q&&h(Q,"arity")&&I.length!==Q.arity&&b(I,"length",{value:Q.arity});try{Q&&h(Q,"constructor")&&Q.constructor?f&&b(I,"prototype",{writable:!1}):I.prototype&&(I.prototype=void 0)}catch{}var W=m(I);return h(W,"source")||(W.source=x(S,typeof _=="string"?_:"")),I};Function.prototype.toString=D(function(){return d(this)&&v(this).source||r(this)},"toString")},(u,g,e)=>{var i=e(6),n=e(39),d=Function.prototype,h=i&&Object.getOwnPropertyDescriptor,f=n(d,"name"),a=f&&(function(){}).name==="something",r=f&&(!i||i&&h(d,"name").configurable);u.exports={EXISTS:f,PROPER:a,CONFIGURABLE:r}},(u,g,e)=>{var i=e(14),n=e(21),d=e(37),h=i(Function.toString);n(d.inspectSource)||(d.inspectSource=function(f){return h(f)}),u.exports=d.inspectSource},(u,g,e)=>{var i=e(53),n=e(4),d=e(20),h=e(44),f=e(39),a=e(37),r=e(54),o=e(55),m="Object already initialized",v=n.TypeError,A=n.WeakMap,b,c,s,x=function(I){return s(I)?c(I):b(I,{})},T=function(I){return function(_){var Q;if(!d(_)||(Q=c(_)).type!==I)throw v("Incompatible receiver, "+I+" required");return Q}};if(i||a.state){var S=a.state||(a.state=new A);S.get=S.get,S.has=S.has,S.set=S.set,b=function(I,_){if(S.has(I))throw v(m);return _.facade=I,S.set(I,_),_},c=function(I){return S.get(I)||{}},s=function(I){return S.has(I)}}else{var D=r("state");o[D]=!0,b=function(I,_){if(f(I,D))throw v(m);return _.facade=I,h(I,D,_),_},c=function(I){return f(I,D)?I[D]:{}},s=function(I){return f(I,D)}}u.exports={set:b,get:c,has:s,enforce:x,getterFor:T}},(u,g,e)=>{var i=e(4),n=e(21),d=i.WeakMap;u.exports=n(d)&&/native code/.test(String(d))},(u,g,e)=>{var i=e(35),n=e(41),d=i("keys");u.exports=function(h){return d[h]||(d[h]=n(h))}},u=>{u.exports={}},(u,g,e)=>{var i=e(39),n=e(57),d=e(5),h=e(45);u.exports=function(f,a,r){for(var o=n(a),m=h.f,v=d.f,A=0;A<o.length;A++){var b=o[A];!i(f,b)&&!(r&&i(r,b))&&m(f,b,v(a,b))}}},(u,g,e)=>{var i=e(24),n=e(14),d=e(58),h=e(67),f=e(47),a=n([].concat);u.exports=i("Reflect","ownKeys")||function(o){var m=d.f(f(o)),v=h.f;return v?a(m,v(o)):m}},(u,g,e)=>{var i=e(59),n=e(66),d=n.concat("length","prototype");g.f=Object.getOwnPropertyNames||function(f){return i(f,d)}},(u,g,e)=>{var i=e(14),n=e(39),d=e(12),h=e(60).indexOf,f=e(55),a=i([].push);u.exports=function(r,o){var m=d(r),v=0,A=[],b;for(b in m)!n(f,b)&&n(m,b)&&a(A,b);for(;o.length>v;)n(m,b=o[v++])&&(~h(A,b)||a(A,b));return A}},(u,g,e)=>{var i=e(12),n=e(61),d=e(64),h=function(f){return function(a,r,o){var m=i(a),v=d(m),A=n(o,v),b;if(f&&r!==r){for(;v>A;)if(b=m[A++],b!==b)return!0}else for(;v>A;A++)if((f||A in m)&&m[A]===r)return f||A||0;return!f&&-1}};u.exports={includes:h(!0),indexOf:h(!1)}},(u,g,e)=>{var i=e(62),n=Math.max,d=Math.min;u.exports=function(h,f){var a=i(h);return a<0?n(a+f,0):d(a,f)}},(u,g,e)=>{var i=e(63);u.exports=function(n){var d=+n;return d!==d||d===0?0:i(d)}},u=>{var g=Math.ceil,e=Math.floor;u.exports=Math.trunc||function(n){var d=+n;return(d>0?e:g)(d)}},(u,g,e)=>{var i=e(65);u.exports=function(n){return i(n.length)}},(u,g,e)=>{var i=e(62),n=Math.min;u.exports=function(d){return d>0?n(i(d),9007199254740991):0}},u=>{u.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(u,g)=>{g.f=Object.getOwnPropertySymbols},(u,g,e)=>{var i=e(7),n=e(21),d=/#|\.prototype\./,h=function(m,v){var A=a[f(m)];return A===o?!0:A===r?!1:n(v)?i(v):!!v},f=h.normalize=function(m){return String(m).replace(d,".").toLowerCase()},a=h.data={},r=h.NATIVE="N",o=h.POLYFILL="P";u.exports=h},(u,g,e)=>{var i=e(70),n=e(71),d=e(72),h=e(75),f=e(77),a=e(73),r=e(74),o=n.has,m=n.remove;u.exports=function(A){var b=i(this),c=f(A),s=d(b);return h(b)<=c.size?a(b,function(x){c.includes(x)&&m(s,x)}):r(c.getIterator(),function(x){o(b,x)&&m(s,x)}),s}},(u,g,e)=>{var i=e(71).has;u.exports=function(n){return i(n),n}},(u,g,e)=>{var i=e(14),n=Set.prototype;u.exports={Set,add:i(n.add),has:i(n.has),remove:i(n.delete),proto:n}},(u,g,e)=>{var i=e(71),n=e(73),d=i.Set,h=i.add;u.exports=function(f){var a=new d;return n(f,function(r){h(a,r)}),a}},(u,g,e)=>{var i=e(14),n=e(74),d=e(71),h=d.Set,f=d.proto,a=i(f.forEach),r=i(f.keys),o=r(new h).next;u.exports=function(m,v,A){return A?n({iterator:r(m),next:o},v):a(m,v)}},(u,g,e)=>{var i=e(8);u.exports=function(n,d,h){for(var f=h?n:n.iterator,a=n.next,r,o;!(r=i(a,f)).done;)if(o=d(r.value),o!==void 0)return o}},(u,g,e)=>{var i=e(76),n=e(71);u.exports=i(n.proto,"size","get")||function(d){return d.size}},(u,g,e)=>{var i=e(14),n=e(31);u.exports=function(d,h,f){try{return i(n(Object.getOwnPropertyDescriptor(d,h)[f]))}catch{}}},(u,g,e)=>{var i=e(31),n=e(47),d=e(8),h=e(62),f=e(78),a="Invalid size",r=RangeError,o=TypeError,m=Math.max,v=function(A,b,c,s){this.set=A,this.size=b,this.has=c,this.keys=s};v.prototype={getIterator:function(){return f(n(d(this.keys,this.set)))},includes:function(A){return d(this.has,this.set,A)}},u.exports=function(A){n(A);var b=+A.size;if(b!==b)throw o(a);var c=h(b);if(c<0)throw r(a);return new v(A,m(c,0),i(A.has),i(A.keys))}},u=>{u.exports=function(g){return{iterator:g,next:g.next,done:!1}}},(u,g,e)=>{var i=e(24),n=function(d){return{size:d,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};u.exports=function(d){var h=i("Set");try{new h()[d](n(0));try{return new h()[d](n(-1)),!1}catch{return!0}}catch{return!1}}},(u,g,e)=>{var i=e(3),n=e(7),d=e(81),h=e(79),f=!h("intersection")||n(function(){return Array.from(new Set([1,2,3]).intersection(new Set([3,2])))!=="3,2"});i({target:"Set",proto:!0,real:!0,forced:f},{intersection:d})},(u,g,e)=>{var i=e(70),n=e(71),d=e(75),h=e(77),f=e(73),a=e(74),r=n.Set,o=n.add,m=n.has;u.exports=function(A){var b=i(this),c=h(A),s=new r;return d(b)>c.size?a(c.getIterator(),function(x){m(b,x)&&o(s,x)}):f(b,function(x){c.includes(x)&&o(s,x)}),s}},(u,g,e)=>{var i=e(3),n=e(83),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("isDisjointFrom")},{isDisjointFrom:n})},(u,g,e)=>{var i=e(70),n=e(71).has,d=e(75),h=e(77),f=e(73),a=e(74),r=e(84);u.exports=function(m){var v=i(this),A=h(m);if(d(v)<=A.size)return f(v,function(c){if(A.includes(c))return!1},!0)!==!1;var b=A.getIterator();return a(b,function(c){if(n(v,c))return r(b,"normal",!1)})!==!1}},(u,g,e)=>{var i=e(8),n=e(47),d=e(30);u.exports=function(h,f,a){var r,o;n(h);try{if(r=d(h,"return"),!r){if(f==="throw")throw a;return a}r=i(r,h)}catch(m){o=!0,r=m}if(f==="throw")throw a;if(o)throw r;return n(r),a}},(u,g,e)=>{var i=e(3),n=e(86),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("isSubsetOf")},{isSubsetOf:n})},(u,g,e)=>{var i=e(70),n=e(75),d=e(73),h=e(77);u.exports=function(a){var r=i(this),o=h(a);return n(r)>o.size?!1:d(r,function(m){if(!o.includes(m))return!1},!0)!==!1}},(u,g,e)=>{var i=e(3),n=e(88),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("isSupersetOf")},{isSupersetOf:n})},(u,g,e)=>{var i=e(70),n=e(71).has,d=e(75),h=e(77),f=e(74),a=e(84);u.exports=function(o){var m=i(this),v=h(o);if(d(m)<v.size)return!1;var A=v.getIterator();return f(A,function(b){if(!n(m,b))return a(A,"normal",!1)})!==!1}},(u,g,e)=>{var i=e(3),n=e(90),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("symmetricDifference")},{symmetricDifference:n})},(u,g,e)=>{var i=e(70),n=e(71),d=e(72),h=e(77),f=e(74),a=n.add,r=n.has,o=n.remove;u.exports=function(v){var A=i(this),b=h(v).getIterator(),c=d(A);return f(b,function(s){r(A,s)?o(c,s):a(c,s)}),c}},(u,g,e)=>{var i=e(3),n=e(92),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("union")},{union:n})},(u,g,e)=>{var i=e(70),n=e(71).add,d=e(72),h=e(77),f=e(74);u.exports=function(r){var o=i(this),m=h(r).getIterator(),v=d(o);return f(m,function(A){n(v,A)}),v}},(u,g,e)=>{var i=e(3),n=e(40),d=e(64),h=e(94),f=e(96),a=e(7),r=a(function(){return[].push.call({length:4294967296},1)!==4294967297}),o=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(v){return v instanceof TypeError}},m=r||!o();i({target:"Array",proto:!0,arity:1,forced:m},{push:function(A){var b=n(this),c=d(b),s=arguments.length;f(c+s);for(var x=0;x<s;x++)b[c]=arguments[x],c++;return h(b,c),c}})},(u,g,e)=>{var i=e(6),n=e(95),d=TypeError,h=Object.getOwnPropertyDescriptor,f=i&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(a){return a instanceof TypeError}}();u.exports=f?function(a,r){if(n(a)&&!h(a,"length").writable)throw d("Cannot set read only .length");return a.length=r}:function(a,r){return a.length=r}},(u,g,e)=>{var i=e(15);u.exports=Array.isArray||function(d){return i(d)==="Array"}},u=>{var g=TypeError,e=9007199254740991;u.exports=function(i){if(i>e)throw g("Maximum allowed index exceeded");return i}},(u,g,e)=>{var ve,Re,Oe,Ie,Le;Object.defineProperty(g,"__esModule",{value:!0}),g.animationStarted=g.VERTICAL_PADDING=g.UNKNOWN_SCALE=g.TextLayerMode=g.SpreadMode=g.SidebarView=g.ScrollMode=g.SCROLLBAR_PADDING=g.RenderingStates=g.ProgressBar=g.PresentationModeState=g.OutputScale=g.MIN_SCALE=g.MAX_SCALE=g.MAX_AUTO_SCALE=g.DEFAULT_SCALE_VALUE=g.DEFAULT_SCALE_DELTA=g.DEFAULT_SCALE=g.CursorTool=g.AutoPrintRegExp=void 0,g.apiPageLayoutToViewerModes=q,g.apiPageModeToSidebarView=pe,g.approximateFraction=Y,g.backtrackBeforeAllVisibleElements=oe,g.binarySearchFirstItem=he,g.docStyle=void 0,g.getActiveOrFocusedElement=se,g.getPageSizeInches=ee,g.getVisibleElements=ye,g.isPortraitOrientation=R,g.isValidRotation=P,g.isValidScrollMode=M,g.isValidSpreadMode=E,g.normalizeWheelEventDelta=L,g.normalizeWheelEventDirection=Pe,g.parseQueryString=Q,g.removeNullCharacters=j,g.roundToDivide=z,g.scrollIntoView=I,g.toggleCheckedBtn=te,g.toggleExpandedBtn=me,g.watchScroll=_,e(98),e(103),e(104),e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(93);const i="auto";g.DEFAULT_SCALE_VALUE=i;const n=1;g.DEFAULT_SCALE=n;const d=1.1;g.DEFAULT_SCALE_DELTA=d;const h=.1;g.MIN_SCALE=h;const f=10;g.MAX_SCALE=f;const a=0;g.UNKNOWN_SCALE=a;const r=1.25;g.MAX_AUTO_SCALE=r;const o=40;g.SCROLLBAR_PADDING=o;const m=5;g.VERTICAL_PADDING=m;const v={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};g.RenderingStates=v;const A={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};g.PresentationModeState=A;const b={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4};g.SidebarView=b;const c={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2};g.TextLayerMode=c;const s={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3};g.ScrollMode=s;const x={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};g.SpreadMode=x;const T={SELECT:0,HAND:1,ZOOM:2};g.CursorTool=T;const S=/\bprint\s*\(/;g.AutoPrintRegExp=S;class D{constructor(){const ne=window.devicePixelRatio||1;this.sx=ne,this.sy=ne}get scaled(){return this.sx!==1||this.sy!==1}}g.OutputScale=D;function I(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ge=ue.offsetParent;if(!ge){console.error("offsetParent is not set -- cannot scroll");return}let Ce=ue.offsetTop+ue.clientTop,Me=ue.offsetLeft+ue.clientLeft;for(;ge.clientHeight===ge.scrollHeight&&ge.clientWidth===ge.scrollWidth||ce&&(ge.classList.contains("markedContent")||getComputedStyle(ge).overflow==="hidden");)if(Ce+=ge.offsetTop,Me+=ge.offsetLeft,ge=ge.offsetParent,!ge)return;ne&&(ne.top!==void 0&&(Ce+=ne.top),ne.left!==void 0&&(Me+=ne.left,ge.scrollLeft=Me)),ge.scrollTop=Ce}function _(ue,ne){const ce=function(Me){Ce||(Ce=window.requestAnimationFrame(function(){Ce=null;const ze=ue.scrollLeft,_e=ge.lastX;ze!==_e&&(ge.right=ze>_e),ge.lastX=ze;const He=ue.scrollTop,Ke=ge.lastY;He!==Ke&&(ge.down=He>Ke),ge.lastY=He,ne(ge)}))},ge={right:!0,down:!0,lastX:ue.scrollLeft,lastY:ue.scrollTop,_eventHandler:ce};let Ce=null;return ue.addEventListener("scroll",ce,!0),ge}function Q(ue){const ne=new Map;for(const[ce,ge]of new URLSearchParams(ue))ne.set(ce.toLowerCase(),ge);return ne}const W=/[\x01-\x1F]/g;function j(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return typeof ue!="string"?(console.error("The argument must be a string."),ue):(ne&&(ue=ue.replaceAll(W," ")),ue.replaceAll("\0",""))}function he(ue,ne){let ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,Ce=ue.length-1;if(Ce<0||!ne(ue[Ce]))return ue.length;if(ne(ue[ge]))return ge;for(;ge<Ce;){const Me=ge+Ce>>1,Ve=ue[Me];ne(Ve)?Ce=Me:ge=Me+1}return ge}function Y(ue){if(Math.floor(ue)===ue)return[ue,1];const ne=1/ue,ce=8;if(ne>ce)return[1,ce];if(Math.floor(ne)===ne)return[1,ne];const ge=ue>1?ne:ue;let Ce=0,Me=1,Ve=1,ze=1;for(;;){const He=Ce+Ve,Ke=Me+ze;if(Ke>ce)break;ge<=He/Ke?(Ve=He,ze=Ke):(Ce=He,Me=Ke)}let _e;return ge-Ce/Me<Ve/ze-ge?_e=ge===ue?[Ce,Me]:[Me,Ce]:_e=ge===ue?[Ve,ze]:[ze,Ve],_e}function z(ue,ne){const ce=ue%ne;return ce===0?ue:Math.round(ue-ce+ne)}function ee(ue){let{view:ne,userUnit:ce,rotate:ge}=ue;const[Ce,Me,Ve,ze]=ne,_e=ge%180!==0,He=(Ve-Ce)/72*ce,Ke=(ze-Me)/72*ce;return{width:_e?Ke:He,height:_e?He:Ke}}function oe(ue,ne,ce){if(ue<2)return ue;let ge=ne[ue].div,Ce=ge.offsetTop+ge.clientTop;Ce>=ce&&(ge=ne[ue-1].div,Ce=ge.offsetTop+ge.clientTop);for(let Me=ue-2;Me>=0&&(ge=ne[Me].div,!(ge.offsetTop+ge.clientTop+ge.clientHeight<=Ce));--Me)ue=Me;return ue}function ye(ue){let{scrollEl:ne,views:ce,sortByVisibility:ge=!1,horizontal:Ce=!1,rtl:Me=!1}=ue;const Ve=ne.scrollTop,ze=Ve+ne.clientHeight,_e=ne.scrollLeft,He=_e+ne.clientWidth;function Ke(K){const U=K.div;return U.offsetTop+U.clientTop+U.clientHeight>Ve}function Xe(K){const U=K.div,ie=U.offsetLeft+U.clientLeft,Ae=ie+U.clientWidth;return Me?ie<He:Ae>_e}const je=[],Je=new Set,V=ce.length;let H=he(ce,Ce?Xe:Ke);H>0&&H<V&&!Ce&&(H=oe(H,ce,Ve));let X=Ce?He:-1;for(let K=H;K<V;K++){const U=ce[K],ie=U.div,Ae=ie.offsetLeft+ie.clientLeft,Se=ie.offsetTop+ie.clientTop,we=ie.clientWidth,Te=ie.clientHeight,Ne=Ae+we,ke=Se+Te;if(X===-1)ke>=ze&&(X=ke);else if((Ce?Ae:Se)>X)break;if(ke<=Ve||Se>=ze||Ne<=_e||Ae>=He)continue;const Ue=Math.max(0,Ve-Se)+Math.max(0,ke-ze),Be=Math.max(0,_e-Ae)+Math.max(0,Ne-He),re=(Te-Ue)/Te,C=(we-Be)/we,G=re*C*100|0;je.push({id:U.id,x:Ae,y:Se,view:U,percent:G,widthPercent:C*100|0}),Je.add(U.id)}const de=je[0],Ee=je.at(-1);return ge&&je.sort(function(K,U){const ie=K.percent-U.percent;return Math.abs(ie)>.001?-ie:K.id-U.id}),{first:de,last:Ee,views:je,ids:Je}}function Pe(ue){let ne=Math.hypot(ue.deltaX,ue.deltaY);const ce=Math.atan2(ue.deltaY,ue.deltaX);return-.25*Math.PI<ce&&ce<.75*Math.PI&&(ne=-ne),ne}function L(ue){const ne=ue.deltaMode;let ce=Pe(ue);const ge=30,Ce=30;return ne===WheelEvent.DOM_DELTA_PIXEL?ce/=ge*Ce:ne===WheelEvent.DOM_DELTA_LINE&&(ce/=Ce),ce}function P(ue){return Number.isInteger(ue)&&ue%90===0}function M(ue){return Number.isInteger(ue)&&Object.values(s).includes(ue)&&ue!==s.UNKNOWN}function E(ue){return Number.isInteger(ue)&&Object.values(x).includes(ue)&&ue!==x.UNKNOWN}function R(ue){return ue.width<=ue.height}const O=new Promise(function(ue){window.requestAnimationFrame(ue)});g.animationStarted=O;const B=document.documentElement.style;g.docStyle=B;function F(ue,ne,ce){return Math.min(Math.max(ue,ne),ce)}class Z{constructor(ne){$(this,ve,null);$(this,Re,null);$(this,Oe,0);$(this,Ie,null);$(this,Le,!0);le(this,ve,ne.classList),le(this,Ie,ne.style)}get percent(){return l(this,Oe)}set percent(ne){if(le(this,Oe,F(ne,0,100)),isNaN(ne)){l(this,ve).add("indeterminate");return}l(this,ve).remove("indeterminate"),l(this,Ie).setProperty("--progressBar-percent",`${l(this,Oe)}%`)}setWidth(ne){if(!ne)return;const ge=ne.parentNode.offsetWidth-ne.offsetWidth;ge>0&&l(this,Ie).setProperty("--progressBar-end-offset",`${ge}px`)}setDisableAutoFetch(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5e3;isNaN(l(this,Oe))||(l(this,Re)&&clearTimeout(l(this,Re)),this.show(),le(this,Re,setTimeout(()=>{le(this,Re,null),this.hide()},ne)))}hide(){l(this,Le)&&(le(this,Le,!1),l(this,ve).add("hidden"))}show(){l(this,Le)||(le(this,Le,!0),l(this,ve).remove("hidden"))}}ve=new WeakMap,Re=new WeakMap,Oe=new WeakMap,Ie=new WeakMap,Le=new WeakMap,g.ProgressBar=Z;function se(){let ue=document,ne=ue.activeElement||ue.querySelector(":focus");for(;ne!=null&&ne.shadowRoot;)ue=ne.shadowRoot,ne=ue.activeElement||ue.querySelector(":focus");return ne}function q(ue){let ne=s.VERTICAL,ce=x.NONE;switch(ue){case"SinglePage":ne=s.PAGE;break;case"OneColumn":break;case"TwoPageLeft":ne=s.PAGE;case"TwoColumnLeft":ce=x.ODD;break;case"TwoPageRight":ne=s.PAGE;case"TwoColumnRight":ce=x.EVEN;break}return{scrollMode:ne,spreadMode:ce}}function pe(ue){switch(ue){case"UseNone":return b.NONE;case"UseThumbs":return b.THUMBS;case"UseOutlines":return b.OUTLINE;case"UseAttachments":return b.ATTACHMENTS;case"UseOC":return b.LAYERS}return b.NONE}function te(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;ue.classList.toggle("toggled",ne),ue.setAttribute("aria-checked",ne),ce==null||ce.classList.toggle("hidden",!ne)}function me(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;ue.classList.toggle("toggled",ne),ue.setAttribute("aria-expanded",ne),ce==null||ce.classList.toggle("hidden",!ne)}},(u,g,e)=>{var i=e(48),n=e(14),d=e(99),h=e(102),f=URLSearchParams,a=f.prototype,r=n(a.append),o=n(a.delete),m=n(a.forEach),v=n([].push),A=new f("a=1&a=2&b=3");A.delete("a",1),A.delete("b",void 0),A+""!="a=2"&&i(a,"delete",function(b){var c=arguments.length,s=c<2?void 0:arguments[1];if(c&&s===void 0)return o(this,b);var x=[];m(this,function(j,he){v(x,{key:he,value:j})}),h(c,1);for(var T=d(b),S=d(s),D=0,I=0,_=!1,Q=x.length,W;D<Q;)W=x[D++],_||W.key===T?(_=!0,o(this,W.key)):I++;for(;I<Q;)W=x[I++],W.key===T&&W.value===S||r(this,W.key,W.value)},{enumerable:!0,unsafe:!0})},(u,g,e)=>{var i=e(100),n=String;u.exports=function(d){if(i(d)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return n(d)}},(u,g,e)=>{var i=e(101),n=e(21),d=e(15),h=e(34),f=h("toStringTag"),a=Object,r=d(function(){return arguments}())==="Arguments",o=function(m,v){try{return m[v]}catch{}};u.exports=i?d:function(m){var v,A,b;return m===void 0?"Undefined":m===null?"Null":typeof(A=o(v=a(m),f))=="string"?A:r?d(v):(b=d(v))==="Object"&&n(v.callee)?"Arguments":b}},(u,g,e)=>{var i=e(34),n=i("toStringTag"),d={};d[n]="z",u.exports=String(d)==="[object z]"},u=>{var g=TypeError;u.exports=function(e,i){if(e<i)throw g("Not enough arguments");return e}},(u,g,e)=>{var i=e(48),n=e(14),d=e(99),h=e(102),f=URLSearchParams,a=f.prototype,r=n(a.getAll),o=n(a.has),m=new f("a=1");(m.has("a",2)||!m.has("a",void 0))&&i(a,"has",function(A){var b=arguments.length,c=b<2?void 0:arguments[1];if(b&&c===void 0)return o(this,A);var s=r(this,A);h(b,1);for(var x=d(c),T=0;T<s.length;)if(s[T++]===x)return!0;return!1},{enumerable:!0,unsafe:!0})},(u,g,e)=>{var i=e(6),n=e(14),d=e(105),h=URLSearchParams.prototype,f=n(h.forEach);i&&!("size"in h)&&d(h,"size",{get:function(){var r=0;return f(this,function(){r++}),r},configurable:!0,enumerable:!0})},(u,g,e)=>{var i=e(49),n=e(45);u.exports=function(d,h,f){return f.get&&i(f.get,h,{getter:!0}),f.set&&i(f.set,h,{setter:!0}),n.f(d,h,f)}},(u,g)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.CharacterType=void 0,g.getCharacterType=A,g.getNormalizeWithNFKC=c;const e={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};g.CharacterType=e;function i(s){return s<11904}function n(s){return(s&65408)===0}function d(s){return s>=97&&s<=122||s>=65&&s<=90}function h(s){return s>=48&&s<=57}function f(s){return s===32||s===9||s===13||s===10}function a(s){return s>=13312&&s<=40959||s>=63744&&s<=64255}function r(s){return s>=12448&&s<=12543}function o(s){return s>=12352&&s<=12447}function m(s){return s>=65376&&s<=65439}function v(s){return(s&65408)===3584}function A(s){return i(s)?n(s)?f(s)?e.SPACE:d(s)||h(s)||s===95?e.ALPHA_LETTER:e.PUNCT:v(s)?e.THAI_LETTER:s===160?e.SPACE:e.ALPHA_LETTER:a(s)?e.HAN_LETTER:r(s)?e.KATAKANA_LETTER:o(s)?e.HIRAGANA_LETTER:m(s)?e.HALFWIDTH_KATAKANA_LETTER:e.ALPHA_LETTER}let b;function c(){return b||(b=" ¨ª¯²-µ¸-º¼-¾IJ-ijĿ-ŀʼnſDŽ-njDZ-dzʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´- - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉--№ℙ-ℝ℠-™ℤΩℨK---ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕ 〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰꟲ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ff-stﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ!-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-₩"),b}},u=>{u.exports=globalThis.pdfjsLib},(u,g,e)=>{var r,o,Un,v,zr;Object.defineProperty(g,"__esModule",{value:!0}),g.SimpleLinkService=g.PDFLinkService=g.LinkTarget=void 0,e(109),e(93),e(121);var i=e(97);const n="noopener noreferrer nofollow",d={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};g.LinkTarget=d;function h(c){let{url:s,target:x,rel:T,enabled:S=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!s||typeof s!="string")throw new Error('A valid "url" parameter must provided.');S?c.href=c.title=s:(c.href="",c.title=`Disabled: ${s}`,c.onclick=()=>!1);let D="";switch(x){case d.NONE:break;case d.SELF:D="_self";break;case d.BLANK:D="_blank";break;case d.PARENT:D="_parent";break;case d.TOP:D="_top";break}c.target=D,c.rel=typeof T=="string"?T:n}const b=class b{constructor(){$(this,o);$(this,r,new Map);let{eventBus:s,externalLinkTarget:x=null,externalLinkRel:T=null,ignoreDestinationZoom:S=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.eventBus=s,this.externalLinkTarget=x,this.externalLinkRel=T,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=S,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(s){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.baseUrl=x,this.pdfDocument=s,l(this,r).clear()}setViewer(s){this.pdfViewer=s}setHistory(s){this.pdfHistory=s}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(s){this.pdfViewer.currentPageNumber=s}get rotation(){return this.pdfViewer.pagesRotation}set rotation(s){this.pdfViewer.pagesRotation=s}get isInPresentationMode(){return this.pdfViewer.isInPresentationMode}async goToDestination(s){if(!this.pdfDocument)return;let x,T;if(typeof s=="string"?(x=s,T=await this.pdfDocument.getDestination(s)):(x=null,T=await s),!Array.isArray(T)){console.error(`PDFLinkService.goToDestination: "${T}" is not a valid destination array, for dest="${s}".`);return}J(this,o,Un).call(this,s,x,T)}goToPage(s){if(!this.pdfDocument)return;const x=typeof s=="string"&&this.pdfViewer.pageLabelToPageNumber(s)||s|0;if(!(Number.isInteger(x)&&x>0&&x<=this.pagesCount)){console.error(`PDFLinkService.goToPage: "${s}" is not a valid page.`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(x)),this.pdfViewer.scrollPageIntoView({pageNumber:x})}addLinkAttributes(s,x){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;h(s,{url:x,target:T?d.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}getDestinationHash(s){if(typeof s=="string"){if(s.length>0)return this.getAnchorUrl("#"+escape(s))}else if(Array.isArray(s)){const x=JSON.stringify(s);if(x.length>0)return this.getAnchorUrl("#"+escape(x))}return this.getAnchorUrl("")}getAnchorUrl(s){return this.baseUrl?this.baseUrl+s:s}setHash(s){var S;if(!this.pdfDocument)return;let x,T;if(s.includes("=")){const D=(0,i.parseQueryString)(s);if(D.has("search")){const I=D.get("search").replaceAll('"',""),_=D.get("phrase")==="true";this.eventBus.dispatch("findfromurlhash",{source:this,query:_?I:I.match(/\S+/g)})}if(D.has("page")&&(x=D.get("page")|0||1),D.has("zoom")){const I=D.get("zoom").split(","),_=I[0],Q=parseFloat(_);_.includes("Fit")?_==="Fit"||_==="FitB"?T=[null,{name:_}]:_==="FitH"||_==="FitBH"||_==="FitV"||_==="FitBV"?T=[null,{name:_},I.length>1?I[1]|0:null]:_==="FitR"?I.length!==5?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):T=[null,{name:_},I[1]|0,I[2]|0,I[3]|0,I[4]|0]:console.error(`PDFLinkService.setHash: "${_}" is not a valid zoom value.`):T=[null,{name:"XYZ"},I.length>1?I[1]|0:null,I.length>2?I[2]|0:null,Q?Q/100:_]}T?this.pdfViewer.scrollPageIntoView({pageNumber:x||this.page,destArray:T,allowNegativeOffset:!0}):x&&(this.page=x),D.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:D.get("pagemode")}),D.has("nameddest")&&this.goToDestination(D.get("nameddest"))}else{T=unescape(s);try{T=JSON.parse(T),Array.isArray(T)||(T=T.toString())}catch{}if(typeof T=="string"||J(S=b,v,zr).call(S,T)){this.goToDestination(T);return}console.error(`PDFLinkService.setHash: "${unescape(s)}" is not a valid destination.`)}}executeNamedAction(s){var x,T;switch(s){case"GoBack":(x=this.pdfHistory)==null||x.back();break;case"GoForward":(T=this.pdfHistory)==null||T.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break}this.eventBus.dispatch("namedaction",{source:this,action:s})}async executeSetOCGState(s){const x=this.pdfDocument,T=await this.pdfViewer.optionalContentConfigPromise;if(x!==this.pdfDocument)return;let S;for(const D of s.state){switch(D){case"ON":case"OFF":case"Toggle":S=D;continue}switch(S){case"ON":T.setVisibility(D,!0);break;case"OFF":T.setVisibility(D,!1);break;case"Toggle":const I=T.getGroup(D);I&&T.setVisibility(D,!I.visible);break}}this.pdfViewer.optionalContentConfigPromise=Promise.resolve(T)}cachePageRef(s,x){if(!x)return;const T=x.gen===0?`${x.num}R`:`${x.num}R${x.gen}`;l(this,r).set(T,s)}_cachedPageNumber(s){if(!s)return null;const x=s.gen===0?`${s.num}R`:`${s.num}R${s.gen}`;return l(this,r).get(x)||null}};r=new WeakMap,o=new WeakSet,Un=function(s){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,T=arguments.length>2?arguments[2]:void 0;const S=T[0];let D;if(typeof S=="object"&&S!==null){if(D=this._cachedPageNumber(S),!D){this.pdfDocument.getPageIndex(S).then(I=>{this.cachePageRef(I+1,S),J(this,o,Un).call(this,s,x,T)}).catch(()=>{console.error(`PDFLinkService.#goToDestinationHelper: "${S}" is not a valid page reference, for dest="${s}".`)});return}}else if(Number.isInteger(S))D=S+1;else{console.error(`PDFLinkService.#goToDestinationHelper: "${S}" is not a valid destination reference, for dest="${s}".`);return}if(!D||D<1||D>this.pagesCount){console.error(`PDFLinkService.#goToDestinationHelper: "${D}" is not a valid page number, for dest="${s}".`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:x,explicitDest:T,pageNumber:D})),this.pdfViewer.scrollPageIntoView({pageNumber:D,destArray:T,ignoreDestinationZoom:this._ignoreDestinationZoom})},v=new WeakSet,zr=function(s){if(!Array.isArray(s))return!1;const x=s.length;if(x<2)return!1;const T=s[0];if(!(typeof T=="object"&&Number.isInteger(T.num)&&Number.isInteger(T.gen))&&!(Number.isInteger(T)&&T>=0))return!1;const S=s[1];if(!(typeof S=="object"&&typeof S.name=="string"))return!1;let D=!0;switch(S.name){case"XYZ":if(x!==5)return!1;break;case"Fit":case"FitB":return x===2;case"FitH":case"FitBH":case"FitV":case"FitBV":if(x!==3)return!1;break;case"FitR":if(x!==6)return!1;D=!1;break;default:return!1}for(let I=2;I<x;I++){const _=s[I];if(!(typeof _=="number"||D&&_===null))return!1}return!0},$(b,v);let f=b;g.PDFLinkService=f;class a{constructor(){this.externalLinkEnabled=!0}get pagesCount(){return 0}get page(){return 0}set page(s){}get rotation(){return 0}set rotation(s){}get isInPresentationMode(){return!1}async goToDestination(s){}goToPage(s){}addLinkAttributes(s,x){h(s,{url:x,enabled:this.externalLinkEnabled})}getDestinationHash(s){return"#"}getAnchorUrl(s){return"#"}setHash(s){}executeNamedAction(s){}executeSetOCGState(s){}cachePageRef(s,x){}}g.SimpleLinkService=a},(u,g,e)=>{var i=e(3),n=e(4),d=e(110),h=e(111),f="WebAssembly",a=n[f],r=Error("e",{cause:7}).cause!==7,o=function(v,A){var b={};b[v]=h(v,A,r),i({global:!0,constructor:!0,arity:1,forced:r},b)},m=function(v,A){if(a&&a[v]){var b={};b[v]=h(f+"."+v,A,r),i({target:f,stat:!0,constructor:!0,arity:1,forced:r},b)}};o("Error",function(v){return function(b){return d(v,this,arguments)}}),o("EvalError",function(v){return function(b){return d(v,this,arguments)}}),o("RangeError",function(v){return function(b){return d(v,this,arguments)}}),o("ReferenceError",function(v){return function(b){return d(v,this,arguments)}}),o("SyntaxError",function(v){return function(b){return d(v,this,arguments)}}),o("TypeError",function(v){return function(b){return d(v,this,arguments)}}),o("URIError",function(v){return function(b){return d(v,this,arguments)}}),m("CompileError",function(v){return function(b){return d(v,this,arguments)}}),m("LinkError",function(v){return function(b){return d(v,this,arguments)}}),m("RuntimeError",function(v){return function(b){return d(v,this,arguments)}})},(u,g,e)=>{var i=e(9),n=Function.prototype,d=n.apply,h=n.call;u.exports=typeof Reflect=="object"&&Reflect.apply||(i?h.bind(d):function(){return h.apply(d,arguments)})},(u,g,e)=>{var i=e(24),n=e(39),d=e(44),h=e(25),f=e(112),a=e(56),r=e(114),o=e(115),m=e(116),v=e(117),A=e(118),b=e(6),c=e(36);u.exports=function(s,x,T,S){var D="stackTraceLimit",I=S?2:1,_=s.split("."),Q=_[_.length-1],W=i.apply(null,_);if(W){var j=W.prototype;if(!c&&n(j,"cause")&&delete j.cause,!T)return W;var he=i("Error"),Y=x(function(z,ee){var oe=m(S?ee:z,void 0),ye=S?new W(z):new W;return oe!==void 0&&d(ye,"message",oe),A(ye,Y,ye.stack,2),this&&h(j,this)&&o(ye,this,Y),arguments.length>I&&v(ye,arguments[I]),ye});if(Y.prototype=j,Q!=="Error"?f?f(Y,he):a(Y,he,{name:!0}):b&&D in W&&(r(Y,W,D),r(Y,W,"prepareStackTrace")),a(Y,W),!c)try{j.name!==Q&&d(j,"name",Q),j.constructor=Y}catch{}return Y}}},(u,g,e)=>{var i=e(76),n=e(47),d=e(113);u.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var h=!1,f={},a;try{a=i(Object.prototype,"__proto__","set"),a(f,[]),h=f instanceof Array}catch{}return function(o,m){return n(o),d(m),h?a(o,m):o.__proto__=m,o}}():void 0)},(u,g,e)=>{var i=e(21),n=String,d=TypeError;u.exports=function(h){if(typeof h=="object"||i(h))return h;throw d("Can't set "+n(h)+" as a prototype")}},(u,g,e)=>{var i=e(45).f;u.exports=function(n,d,h){h in n||i(n,h,{configurable:!0,get:function(){return d[h]},set:function(f){d[h]=f}})}},(u,g,e)=>{var i=e(21),n=e(20),d=e(112);u.exports=function(h,f,a){var r,o;return d&&i(r=f.constructor)&&r!==a&&n(o=r.prototype)&&o!==a.prototype&&d(h,o),h}},(u,g,e)=>{var i=e(99);u.exports=function(n,d){return n===void 0?arguments.length<2?"":d:i(n)}},(u,g,e)=>{var i=e(20),n=e(44);u.exports=function(d,h){i(h)&&"cause"in h&&n(d,"cause",h.cause)}},(u,g,e)=>{var i=e(44),n=e(119),d=e(120),h=Error.captureStackTrace;u.exports=function(f,a,r,o){d&&(h?h(f,a):i(f,"stack",n(r,o)))}},(u,g,e)=>{var i=e(14),n=Error,d=i("".replace),h=function(r){return String(n(r).stack)}("zxcasd"),f=/\n\s*at [^:]*:[^\n]*/,a=f.test(h);u.exports=function(r,o){if(a&&typeof r=="string"&&!n.prepareStackTrace)for(;o--;)r=d(r,f,"");return r}},(u,g,e)=>{var i=e(7),n=e(11);u.exports=!i(function(){var d=Error("a");return"stack"in d?(Object.defineProperty(d,"stack",n(1,7)),d.stack!==7):!0})},(u,g,e)=>{var i=e(3),n=e(6),d=e(4),h=e(24),f=e(14),a=e(8),r=e(21),o=e(20),m=e(95),v=e(39),A=e(99),b=e(64),c=e(122),s=e(7),x=e(123),T=e(27),S=d.JSON,D=d.Number,I=d.SyntaxError,_=S&&S.parse,Q=h("Object","keys"),W=Object.getOwnPropertyDescriptor,j=f("".charAt),he=f("".slice),Y=f(/./.exec),z=f([].push),ee=/^\d$/,oe=/^[1-9]$/,ye=/^(?:-|\d)$/,Pe=/^[\t\n\r ]$/,L=0,P=1,M=function(se,q){se=A(se);var pe=new B(se,0),te=pe.parse(),me=te.value,ve=pe.skip(Pe,te.end);if(ve<se.length)throw I('Unexpected extra character: "'+j(se,ve)+'" after the parsed data at: '+ve);return r(q)?E({"":me},"",q,te):me},E=function(se,q,pe,te){var me=se[q],ve=te&&me===te.value,Re=ve&&typeof te.source=="string"?{source:te.source}:{},Oe,Ie,Le,ue,ne;if(o(me)){var ce=m(me),ge=ve?te.nodes:ce?[]:{};if(ce)for(Oe=ge.length,Le=b(me),ue=0;ue<Le;ue++)R(me,ue,E(me,""+ue,pe,ue<Oe?ge[ue]:void 0));else for(Ie=Q(me),Le=b(Ie),ue=0;ue<Le;ue++)ne=Ie[ue],R(me,ne,E(me,ne,pe,v(ge,ne)?ge[ne]:void 0))}return a(pe,se,q,me,Re)},R=function(se,q,pe){if(n){var te=W(se,q);if(te&&!te.configurable)return}pe===void 0?delete se[q]:c(se,q,pe)},O=function(se,q,pe,te){this.value=se,this.end=q,this.source=pe,this.nodes=te},B=function(se,q){this.source=se,this.index=q};B.prototype={fork:function(se){return new B(this.source,se)},parse:function(){var se=this.source,q=this.skip(Pe,this.index),pe=this.fork(q),te=j(se,q);if(Y(ye,te))return pe.number();switch(te){case"{":return pe.object();case"[":return pe.array();case'"':return pe.string();case"t":return pe.keyword(!0);case"f":return pe.keyword(!1);case"n":return pe.keyword(null)}throw I('Unexpected character: "'+te+'" at: '+q)},node:function(se,q,pe,te,me){return new O(q,te,se?null:he(this.source,pe,te),me)},object:function(){for(var se=this.source,q=this.index+1,pe=!1,te={},me={};q<se.length;){if(q=this.until(['"',"}"],q),j(se,q)==="}"&&!pe){q++;break}var ve=this.fork(q).string(),Re=ve.value;q=ve.end,q=this.until([":"],q)+1,q=this.skip(Pe,q),ve=this.fork(q).parse(),c(me,Re,ve),c(te,Re,ve.value),q=this.until([",","}"],ve.end);var Oe=j(se,q);if(Oe===",")pe=!0,q++;else if(Oe==="}"){q++;break}}return this.node(P,te,this.index,q,me)},array:function(){for(var se=this.source,q=this.index+1,pe=!1,te=[],me=[];q<se.length;){if(q=this.skip(Pe,q),j(se,q)==="]"&&!pe){q++;break}var ve=this.fork(q).parse();if(z(me,ve),z(te,ve.value),q=this.until([",","]"],ve.end),j(se,q)===",")pe=!0,q++;else if(j(se,q)==="]"){q++;break}}return this.node(P,te,this.index,q,me)},string:function(){var se=this.index,q=x(this.source,this.index+1);return this.node(L,q.value,se,q.end)},number:function(){var se=this.source,q=this.index,pe=q;if(j(se,pe)==="-"&&pe++,j(se,pe)==="0")pe++;else if(Y(oe,j(se,pe)))pe=this.skip(ee,++pe);else throw I("Failed to parse number at: "+pe);if(j(se,pe)==="."&&(pe=this.skip(ee,++pe)),j(se,pe)==="e"||j(se,pe)==="E"){pe++,(j(se,pe)==="+"||j(se,pe)==="-")&&pe++;var te=pe;if(pe=this.skip(ee,pe),te===pe)throw I("Failed to parse number's exponent value at: "+pe)}return this.node(L,D(he(se,q,pe)),q,pe)},keyword:function(se){var q=""+se,pe=this.index,te=pe+q.length;if(he(this.source,pe,te)!==q)throw I("Failed to parse value at: "+pe);return this.node(L,se,pe,te)},skip:function(se,q){for(var pe=this.source;q<pe.length&&Y(se,j(pe,q));q++);return q},until:function(se,q){q=this.skip(Pe,q);for(var pe=j(this.source,q),te=0;te<se.length;te++)if(se[te]===pe)return q;throw I('Unexpected character: "'+pe+'" at: '+q)}};var F=s(function(){var se="9007199254740993",q;return _(se,function(pe,te,me){q=me.source}),q!==se}),Z=T&&!s(function(){return 1/_("-0 ")!==-1/0});i({target:"JSON",stat:!0,forced:F},{parse:function(q,pe){return Z&&!r(pe)?_(q):M(q,pe)}})},(u,g,e)=>{var i=e(18),n=e(45),d=e(11);u.exports=function(h,f,a){var r=i(f);r in h?n.f(h,r,d(0,a)):h[r]=a}},(u,g,e)=>{var i=e(14),n=e(39),d=SyntaxError,h=parseInt,f=String.fromCharCode,a=i("".charAt),r=i("".slice),o=i(/./.exec),m={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
`,"\\r":"\r","\\t":" "},v=/^[\da-f]{4}$/i,A=/^[\u0000-\u001F]$/;u.exports=function(b,c){for(var s=!0,x="";c<b.length;){var T=a(b,c);if(T==="\\"){var S=r(b,c,c+2);if(n(m,S))x+=m[S],c+=2;else if(S==="\\u"){c+=2;var D=r(b,c,c+4);if(!o(v,D))throw d("Bad Unicode escape at: "+c);x+=f(h(D,16)),c+=4}else throw d('Unknown escape sequence: "'+S+'"')}else if(T==='"'){s=!1,c++;break}else{if(o(A,T))throw d("Bad control character in string literal at: "+c);x+=T,c++}}if(s)throw d("Unterminated string at: "+c);return{value:x,end:c}}},(u,g,e)=>{var f,a,Vn;Object.defineProperty(g,"__esModule",{value:!0}),g.AnnotationLayerBuilder=void 0;var i=e(107),n=e(125),d=e(97);class h{constructor(m){$(this,a);$(this,f,null);let{pageDiv:v,pdfPage:A,linkService:b,downloadManager:c,annotationStorage:s=null,imageResourcesPath:x="",renderForms:T=!0,l10n:S=n.NullL10n,enableScripting:D=!1,hasJSActionsPromise:I=null,fieldObjectsPromise:_=null,annotationCanvasMap:Q=null,accessibilityManager:W=null}=m;this.pageDiv=v,this.pdfPage=A,this.linkService=b,this.downloadManager=c,this.imageResourcesPath=x,this.renderForms=T,this.l10n=S,this.annotationStorage=s,this.enableScripting=D,this._hasJSActionsPromise=I||Promise.resolve(!1),this._fieldObjectsPromise=_||Promise.resolve(null),this._annotationCanvasMap=Q,this._accessibilityManager=W,this.annotationLayer=null,this.div=null,this._cancelled=!1,this._eventBus=b.eventBus}async render(m){var x;let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"display";if(this.div){if(this._cancelled||!this.annotationLayer)return;this.annotationLayer.update({viewport:m.clone({dontFlip:!0})});return}const[A,b,c]=await Promise.all([this.pdfPage.getAnnotations({intent:v}),this._hasJSActionsPromise,this._fieldObjectsPromise]);if(this._cancelled)return;const s=this.div=document.createElement("div");if(s.className="annotationLayer",this.pageDiv.append(s),A.length===0){this.hide();return}this.annotationLayer=new i.AnnotationLayer({div:s,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,l10n:this.l10n,page:this.pdfPage,viewport:m.clone({dontFlip:!0})}),await this.annotationLayer.render({annotations:A,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:b,fieldObjects:c}),this.linkService.isInPresentationMode&&J(this,a,Vn).call(this,d.PresentationModeState.FULLSCREEN),l(this,f)||(le(this,f,T=>{J(this,a,Vn).call(this,T.state)}),(x=this._eventBus)==null||x._on("presentationmodechanged",l(this,f)))}cancel(){var m;this._cancelled=!0,l(this,f)&&((m=this._eventBus)==null||m._off("presentationmodechanged",l(this,f)),le(this,f,null))}hide(){this.div&&(this.div.hidden=!0)}}f=new WeakMap,a=new WeakSet,Vn=function(m){if(!this.div)return;let v=!1;switch(m){case d.PresentationModeState.FULLSCREEN:v=!0;break;case d.PresentationModeState.NORMAL:break;default:return}for(const A of this.div.childNodes)A.hasAttribute("data-internal-link")||(A.inert=v)},g.AnnotationLayerBuilder=h},(u,g)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.NullL10n=void 0,g.getL10nFallback=i;const e={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};e.print_progress_percent="{{progress}}%";function i(h,f){switch(h){case"find_match_count":h=`find_match_count[${f.total===1?"one":"other"}]`;break;case"find_match_count_limit":h=`find_match_count_limit[${f.limit===1?"one":"other"}]`;break}return e[h]||""}function n(h,f){return f?h.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(a,r)=>r in f?f[r]:"{{"+r+"}}"):h}const d={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(h){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i(h,f);return n(a,f)},async translate(h){}};g.NullL10n=d},(u,g,e)=>{var h;Object.defineProperty(g,"__esModule",{value:!0}),g.DownloadManager=void 0,e(109),e(98),e(103),e(104);var i=e(107);function n(f,a){const r=document.createElement("a");if(!r.click)throw new Error('DownloadManager: "a.click()" is not supported.');r.href=f,r.target="_parent","download"in r&&(r.download=a),(document.body||document.documentElement).append(r),r.click(),r.remove()}class d{constructor(){$(this,h,new WeakMap)}downloadUrl(a,r,o){if(!(0,i.createValidAbsoluteUrl)(a,"http://example.com")){console.error(`downloadUrl - not a valid URL: ${a}`);return}n(a+"#pdfjs.action=download",r)}downloadData(a,r,o){const m=URL.createObjectURL(new Blob([a],{type:o}));n(m,r)}openOrDownloadData(a,r,o){const v=(0,i.isPdfFile)(o)?"application/pdf":"";return this.downloadData(r,o,v),!1}download(a,r,o,m){const v=URL.createObjectURL(a);n(v,o)}}h=new WeakMap,g.DownloadManager=d},(u,g,e)=>{var f;Object.defineProperty(g,"__esModule",{value:!0}),g.WaitOnType=g.EventBus=g.AutomationEventBus=void 0,g.waitOnEventOrTimeout=n,e(109),e(93);const i={EVENT:"event",TIMEOUT:"timeout"};g.WaitOnType=i;function n(a){let{target:r,name:o,delay:m=0}=a;return new Promise(function(v,A){if(typeof r!="object"||!(o&&typeof o=="string")||!(Number.isInteger(m)&&m>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function b(T){r instanceof d?r._off(o,c):r.removeEventListener(o,c),x&&clearTimeout(x),v(T)}const c=b.bind(null,i.EVENT);r instanceof d?r._on(o,c):r.addEventListener(o,c);const s=b.bind(null,i.TIMEOUT),x=setTimeout(s,m)})}class d{constructor(){$(this,f,Object.create(null))}on(r,o){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this._on(r,o,{external:!0,once:m==null?void 0:m.once})}off(r,o){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this._off(r,o,{external:!0,once:m==null?void 0:m.once})}dispatch(r,o){const m=l(this,f)[r];if(!m||m.length===0)return;let v;for(const{listener:A,external:b,once:c}of m.slice(0)){if(c&&this._off(r,A),b){(v||(v=[])).push(A);continue}A(o)}if(v){for(const A of v)A(o);v=null}}_on(r,o){var A;let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;((A=l(this,f))[r]||(A[r]=[])).push({listener:o,external:(m==null?void 0:m.external)===!0,once:(m==null?void 0:m.once)===!0})}_off(r,o){const m=l(this,f)[r];if(m){for(let v=0,A=m.length;v<A;v++)if(m[v].listener===o){m.splice(v,1);return}}}}f=new WeakMap,g.EventBus=d;class h extends d{dispatch(r,o){throw new Error("Not implemented: AutomationEventBus.dispatch")}}g.AutomationEventBus=h},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.GenericL10n=void 0,e(129);var i=e(125);const n={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};function d(f){return n[f==null?void 0:f.toLowerCase()]||f}class h{constructor(a){const{webL10n:r}=document;this._lang=a,this._ready=new Promise((o,m)=>{r.setLanguage(d(a),()=>{o(r)})})}async getLanguage(){return(await this._ready).getLanguage()}async getDirection(){return(await this._ready).getDirection()}async get(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:(0,i.getL10nFallback)(a,r);return(await this._ready).get(a,r,o)}async translate(a){return(await this._ready).translate(a)}}g.GenericL10n=h},(u,g,e)=>{e(121),document.webL10n=function(i,n){var d={},h="",f="textContent",a="",r={},o="loading",m=!0;function v(){return n.querySelectorAll('link[type="application/l10n"]')}function A(){var Y=n.querySelector('script[type="application/l10n"]');return Y?JSON.parse(Y.innerHTML):null}function b(Y){return Y?Y.querySelectorAll("*[data-l10n-id]"):[]}function c(Y){if(!Y)return{};var z=Y.getAttribute("data-l10n-id"),ee=Y.getAttribute("data-l10n-args"),oe={};if(ee)try{oe=JSON.parse(ee)}catch{console.warn("could not parse arguments for #"+z)}return{id:z,args:oe}}function s(Y,z,ee){z=z||function(Pe){},ee=ee||function(){};var oe=new XMLHttpRequest;oe.open("GET",Y,m),oe.overrideMimeType&&oe.overrideMimeType("text/plain; charset=utf-8"),oe.onreadystatechange=function(){oe.readyState==4&&(oe.status==200||oe.status===0?z(oe.responseText):ee())},oe.onerror=ee,oe.ontimeout=ee;try{oe.send(null)}catch{ee()}}function x(Y,z,ee,oe){var ye=Y.replace(/[^\/]*$/,"")||"./";function Pe(P){return P.lastIndexOf("\\")<0?P:P.replace(/\\\\/g,"\\").replace(/\\n/g,`
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function L(P,M){var E={},R=/^\s*|\s*$/,O=/^\s*#|^\s*$/,B=/^\s*\[(.*)\]\s*$/,F=/^\s*@import\s+url\((.*)\)\s*$/i,Z=/^([^=\s]*)\s*=\s*(.+)$/;function se(pe,te,me){var ve=pe.replace(R,"").split(/[\r\n]+/),Re="*",Oe=z.split("-",1)[0],Ie=!1,Le="";function ue(){for(;;){if(!ve.length){me();return}var ne=ve.shift();if(!O.test(ne)){if(te){if(Le=B.exec(ne),Le){Re=Le[1].toLowerCase(),Ie=Re!=="*"&&Re!==z&&Re!==Oe;continue}else if(Ie)continue;if(Le=F.exec(ne),Le){q(ye+Le[1],ue);return}}var ce=ne.match(Z);ce&&ce.length==3&&(E[ce[1]]=Pe(ce[2]))}}}ue()}function q(pe,te){s(pe,function(me){se(me,!1,te)},function(){console.warn(pe+" not found."),te()})}se(P,!0,function(){M(E)})}s(Y,function(P){h+=P,L(P,function(M){for(var E in M){var R,O,B=E.lastIndexOf(".");B>0?(R=E.substring(0,B),O=E.substring(B+1)):(R=E,O=f),d[R]||(d[R]={}),d[R][O]=M[E]}ee&&ee()})},oe)}function T(Y,z){Y&&(Y=Y.toLowerCase()),z=z||function(){},S(),a=Y;var ee=v(),oe=ee.length;if(oe===0){var ye=A();if(ye&&ye.locales&&ye.default_locale){if(console.log("using the embedded JSON directory, early way out"),d=ye.locales[Y],!d){var Pe=ye.default_locale.toLowerCase();for(var L in ye.locales)if(L=L.toLowerCase(),L===Y){d=ye.locales[Y];break}else L===Pe&&(d=ye.locales[Pe])}z()}else console.log("no resource to load, early way out");o="complete";return}var P=null,M=0;P=function(){M++,M>=oe&&(z(),o="complete")};function E(B){var F=B.href;this.load=function(Z,se){x(F,Z,se,function(){console.warn(F+" not found."),console.warn('"'+Z+'" resource not found'),a="",se()})}}for(var R=0;R<oe;R++){var O=new E(ee[R]);O.load(Y,P)}}function S(){d={},h="",a=""}function D(Y){var z={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3};function ee(L,P){return P.indexOf(L)!==-1}function oe(L,P,M){return P<=L&&L<=M}var ye={0:function(L){return"other"},1:function(L){return oe(L%100,3,10)?"few":L===0?"zero":oe(L%100,11,99)?"many":L==2?"two":L==1?"one":"other"},2:function(L){return L!==0&&L%10===0?"many":L==2?"two":L==1?"one":"other"},3:function(L){return L==1?"one":"other"},4:function(L){return oe(L,0,1)?"one":"other"},5:function(L){return oe(L,0,2)&&L!=2?"one":"other"},6:function(L){return L===0?"zero":L%10==1&&L%100!=11?"one":"other"},7:function(L){return L==2?"two":L==1?"one":"other"},8:function(L){return oe(L,3,6)?"few":oe(L,7,10)?"many":L==2?"two":L==1?"one":"other"},9:function(L){return L===0||L!=1&&oe(L%100,1,19)?"few":L==1?"one":"other"},10:function(L){return oe(L%10,2,9)&&!oe(L%100,11,19)?"few":L%10==1&&!oe(L%100,11,19)?"one":"other"},11:function(L){return oe(L%10,2,4)&&!oe(L%100,12,14)?"few":L%10===0||oe(L%10,5,9)||oe(L%100,11,14)?"many":L%10==1&&L%100!=11?"one":"other"},12:function(L){return oe(L,2,4)?"few":L==1?"one":"other"},13:function(L){return oe(L%10,2,4)&&!oe(L%100,12,14)?"few":L!=1&&oe(L%10,0,1)||oe(L%10,5,9)||oe(L%100,12,14)?"many":L==1?"one":"other"},14:function(L){return oe(L%100,3,4)?"few":L%100==2?"two":L%100==1?"one":"other"},15:function(L){return L===0||oe(L%100,2,10)?"few":oe(L%100,11,19)?"many":L==1?"one":"other"},16:function(L){return L%10==1&&L!=11?"one":"other"},17:function(L){return L==3?"few":L===0?"zero":L==6?"many":L==2?"two":L==1?"one":"other"},18:function(L){return L===0?"zero":oe(L,0,2)&&L!==0&&L!=2?"one":"other"},19:function(L){return oe(L,2,10)?"few":oe(L,0,1)?"one":"other"},20:function(L){return(oe(L%10,3,4)||L%10==9)&&!(oe(L%100,10,19)||oe(L%100,70,79)||oe(L%100,90,99))?"few":L%1e6===0&&L!==0?"many":L%10==2&&!ee(L%100,[12,72,92])?"two":L%10==1&&!ee(L%100,[11,71,91])?"one":"other"},21:function(L){return L===0?"zero":L==1?"one":"other"},22:function(L){return oe(L,0,1)||oe(L,11,99)?"one":"other"},23:function(L){return oe(L%10,1,2)||L%20===0?"one":"other"},24:function(L){return oe(L,3,10)||oe(L,13,19)?"few":ee(L,[2,12])?"two":ee(L,[1,11])?"one":"other"}},Pe=z[Y.replace(/-.*$/,"")];return Pe in ye?ye[Pe]:(console.warn("plural form unknown for ["+Y+"]"),function(){return"other"})}r.plural=function(Y,z,ee,oe){var ye=parseFloat(z);if(isNaN(ye)||oe!=f)return Y;r._pluralRules||(r._pluralRules=D(a));var Pe="["+r._pluralRules(ye)+"]";return ye===0&&ee+"[zero]"in d?Y=d[ee+"[zero]"][oe]:ye==1&&ee+"[one]"in d?Y=d[ee+"[one]"][oe]:ye==2&&ee+"[two]"in d?Y=d[ee+"[two]"][oe]:ee+Pe in d?Y=d[ee+Pe][oe]:ee+"[other]"in d&&(Y=d[ee+"[other]"][oe]),Y};function I(Y,z,ee){var oe=d[Y];if(!oe){if(console.warn("#"+Y+" is undefined."),!ee)return null;oe=ee}var ye={};for(var Pe in oe){var L=oe[Pe];L=_(L,z,Y,Pe),L=Q(L,z,Y),ye[Pe]=L}return ye}function _(Y,z,ee,oe){var ye=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/,Pe=ye.exec(Y);if(!Pe||!Pe.length)return Y;var L=Pe[1],P=Pe[2],M;if(z&&P in z?M=z[P]:P in d&&(M=d[P]),L in r){var E=r[L];Y=E(Y,M,ee,oe)}return Y}function Q(Y,z,ee){var oe=/\{\{\s*(.+?)\s*\}\}/g;return Y.replace(oe,function(ye,Pe){return z&&Pe in z?z[Pe]:Pe in d?d[Pe]:(console.log("argument {{"+Pe+"}} for #"+ee+" is undefined."),ye)})}function W(Y){var z=c(Y);if(z.id){var ee=I(z.id,z.args);if(!ee){console.warn("#"+z.id+" is undefined.");return}if(ee[f]){if(j(Y)===0)Y[f]=ee[f];else{for(var oe=Y.childNodes,ye=!1,Pe=0,L=oe.length;Pe<L;Pe++)oe[Pe].nodeType===3&&/\S/.test(oe[Pe].nodeValue)&&(ye?oe[Pe].nodeValue="":(oe[Pe].nodeValue=ee[f],ye=!0));if(!ye){var P=n.createTextNode(ee[f]);Y.prepend(P)}}delete ee[f]}for(var M in ee)Y[M]=ee[M]}}function j(Y){if(Y.children)return Y.children.length;if(typeof Y.childElementCount<"u")return Y.childElementCount;for(var z=0,ee=0;ee<Y.childNodes.length;ee++)z+=Y.nodeType===1?1:0;return z}function he(Y){Y=Y||n.documentElement;for(var z=b(Y),ee=z.length,oe=0;oe<ee;oe++)W(z[oe]);W(Y)}return{get:function(Y,z,ee){var oe=Y.lastIndexOf("."),ye=f;oe>0&&(ye=Y.substring(oe+1),Y=Y.substring(0,oe));var Pe;ee&&(Pe={},Pe[ye]=ee);var L=I(Y,z,Pe);return L&&ye in L?L[ye]:"{{"+Y+"}}"},getData:function(){return d},getText:function(){return h},getLanguage:function(){return a},setLanguage:function(Y,z){T(Y,function(){z&&z()})},getDirection:function(){var Y=["ar","he","fa","ps","ur"],z=a.split("-",1)[0];return Y.indexOf(z)>=0?"rtl":"ltr"},translate:he,getReadyState:function(){return o},ready:function(Y){if(Y)o=="complete"||o=="interactive"?i.setTimeout(function(){Y()}):n.addEventListener&&n.addEventListener("localized",function z(){n.removeEventListener("localized",z),Y()});else return}}}(window,document)},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFHistory=void 0,g.isDestArraysEqual=m,g.isDestHashesEqual=o;var i=e(97),n=e(127);const d=1e3,h=50,f=1e3;function a(){return document.location.hash}class r{constructor(A){let{linkService:b,eventBus:c}=A;this.linkService=b,this.eventBus=c,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",s=>{this._isPagesLoaded=!!s.pagesCount},{once:!0})})}initialize(A){let{fingerprint:b,resetHistory:c=!1,updateUrl:s=!1}=A;if(!b||typeof b!="string"){console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');return}this._initialized&&this.reset();const x=this._fingerprint!==""&&this._fingerprint!==b;this._fingerprint=b,this._updateUrl=s===!0,this._initialized=!0,this._bindEvents();const T=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=a(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(T,!0)||c){const{hash:D,page:I,rotation:_}=this._parseCurrentHash(!0);if(!D||x||c){this._pushOrReplaceState(null,!0);return}this._pushOrReplaceState({hash:D,page:I,rotation:_},!0);return}const S=T.destination;this._updateInternalState(S,T.uid,!0),S.rotation!==void 0&&(this._initialRotation=S.rotation),S.dest?(this._initialBookmark=JSON.stringify(S.dest),this._destination.page=null):S.hash?this._initialBookmark=S.hash:S.page&&(this._initialBookmark=`page=${S.page}`)}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push(A){let{namedDest:b=null,explicitDest:c,pageNumber:s}=A;if(!this._initialized)return;if(b&&typeof b!="string"){console.error(`PDFHistory.push: "${b}" is not a valid namedDest parameter.`);return}else if(Array.isArray(c)){if(!this._isValidPage(s)&&(s!==null||this._destination)){console.error(`PDFHistory.push: "${s}" is not a valid pageNumber parameter.`);return}}else{console.error(`PDFHistory.push: "${c}" is not a valid explicitDest parameter.`);return}const x=b||JSON.stringify(c);if(!x)return;let T=!1;if(this._destination&&(o(this._destination.hash,x)||m(this._destination.dest,c))){if(this._destination.page)return;T=!0}this._popStateInProgress&&!T||(this._pushOrReplaceState({dest:c,hash:x,page:s,rotation:this.linkService.rotation},T),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushPage(A){var b;if(this._initialized){if(!this._isValidPage(A)){console.error(`PDFHistory.pushPage: "${A}" is not a valid page number.`);return}((b=this._destination)==null?void 0:b.page)!==A&&(this._popStateInProgress||(this._pushOrReplaceState({dest:null,hash:`page=${A}`,page:A,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))))}}pushCurrentPosition(){!this._initialized||this._popStateInProgress||this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress)return;const A=window.history.state;this._isValidState(A)&&A.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;const A=window.history.state;this._isValidState(A)&&A.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(A){const c=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)||!this._destination,s={fingerprint:this._fingerprint,uid:c?this._uid:this._uid+1,destination:A};this._updateInternalState(A,s.uid);let x;if(this._updateUrl&&(A!=null&&A.hash)){const T=document.location.href.split("#")[0];T.startsWith("file://")||(x=`${T}#${A.hash}`)}c?window.history.replaceState(s,"",x):window.history.pushState(s,"",x)}_tryPushCurrentPosition(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this._position)return;let b=this._position;if(A&&(b=Object.assign(Object.create(null),this._position),b.temporary=!0),!this._destination){this._pushOrReplaceState(b);return}if(this._destination.temporary){this._pushOrReplaceState(b,!0);return}if(this._destination.hash===b.hash||!this._destination.page&&this._numPositionUpdates<=h)return;let c=!1;if(this._destination.page>=b.first&&this._destination.page<=b.page){if(this._destination.dest!==void 0||!this._destination.first)return;c=!0}this._pushOrReplaceState(b,c)}_isValidPage(A){return Number.isInteger(A)&&A>0&&A<=this.linkService.pagesCount}_isValidState(A){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!A)return!1;if(A.fingerprint!==this._fingerprint)if(b){if(typeof A.fingerprint!="string"||A.fingerprint.length!==this._fingerprint.length)return!1;const[c]=performance.getEntriesByType("navigation");if((c==null?void 0:c.type)!=="reload")return!1}else return!1;return!(!Number.isInteger(A.uid)||A.uid<0||A.destination===null||typeof A.destination!="object")}_updateInternalState(A,b){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),c&&(A!=null&&A.temporary)&&delete A.temporary,this._destination=A,this._uid=b,this._maxUid=Math.max(this._maxUid,b),this._numPositionUpdates=0}_parseCurrentHash(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const b=unescape(a()).substring(1),c=(0,i.parseQueryString)(b),s=c.get("nameddest")||"";let x=c.get("page")|0;return(!this._isValidPage(x)||A&&s.length>0)&&(x=null),{hash:b,page:x,rotation:this.linkService.rotation}}_updateViewarea(A){let{location:b}=A;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:b.pdfOpenParams.substring(1),page:this.linkService.page,first:b.pageNumber,rotation:b.rotation},!this._popStateInProgress&&(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null},f))}_popState(A){let{state:b}=A;const c=a(),s=this._currentHash!==c;if(this._currentHash=c,!b){this._uid++;const{hash:T,page:S,rotation:D}=this._parseCurrentHash();this._pushOrReplaceState({hash:T,page:S,rotation:D},!0);return}if(!this._isValidState(b))return;this._popStateInProgress=!0,s&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:d}).then(()=>{this._blockHashChange--}));const x=b.destination;this._updateInternalState(x,b.uid,!0),(0,i.isValidRotation)(x.rotation)&&(this.linkService.rotation=x.rotation),x.dest?this.linkService.goToDestination(x.dest):x.hash?this.linkService.setHash(x.hash):x.page&&(this.linkService.page=x.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})}_pageHide(){(!this._destination||this._destination.temporary)&&this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}g.PDFHistory=r;function o(v,A){return typeof v!="string"||typeof A!="string"?!1:v===A||(0,i.parseQueryString)(v).get("nameddest")===A}function m(v,A){function b(c,s){if(typeof c!=typeof s||Array.isArray(c)||Array.isArray(s))return!1;if(c!==null&&typeof c=="object"&&s!==null){if(Object.keys(c).length!==Object.keys(s).length)return!1;for(const x in c)if(!b(c[x],s[x]))return!1;return!0}return c===s||Number.isNaN(c)&&Number.isNaN(s)}if(!(Array.isArray(v)&&Array.isArray(A))||v.length!==A.length)return!1;for(let c=0,s=v.length;c<s;c++)if(!b(v[c],A[c]))return!1;return!0}},(u,g,e)=>{var T,S,D,I,_,Q,W,j,he,Y,z,Gt,oe,Hn,Pe,Wn,P,zn,E,$n,O,$r,F,_r,se,_n;Object.defineProperty(g,"__esModule",{value:!0}),g.PDFPageView=void 0,e(93),e(109);var i=e(107),n=e(97),d=e(132),h=e(124),f=e(133),a=e(125),r=e(108),o=e(134),m=e(135),v=e(136),A=e(137),b=e(138);const c=f.compatibilityParams.maxCanvasPixels||16777216,s=()=>({annotationEditorUIManager:null,annotationStorage:null,downloadManager:null,enableScripting:!1,fieldObjectsPromise:null,findController:null,hasJSActionsPromise:null,get linkService(){return new r.SimpleLinkService}});class x{constructor(te){$(this,z);$(this,oe);$(this,Pe);$(this,P);$(this,E);$(this,O);$(this,F);$(this,se);$(this,T,i.AnnotationMode.ENABLE_FORMS);$(this,S,!1);$(this,D,null);$(this,I,null);$(this,_,null);$(this,Q,null);$(this,W,n.RenderingStates.INITIAL);$(this,j,n.TextLayerMode.ENABLE);$(this,he,{directDrawing:!0,initialOptionalContent:!0,regularAnnotations:!0});$(this,Y,new WeakMap);var Oe;const me=te.container,ve=te.defaultViewport;this.id=te.id,this.renderingId="page"+this.id,le(this,D,te.layerProperties||s),this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=te.scale||n.DEFAULT_SCALE,this.viewport=ve,this.pdfPageRotate=ve.rotation,this._optionalContentConfigPromise=te.optionalContentConfigPromise||null,le(this,j,te.textLayerMode??n.TextLayerMode.ENABLE),le(this,T,te.annotationMode??i.AnnotationMode.ENABLE_FORMS),this.imageResourcesPath=te.imageResourcesPath||"",this.isOffscreenCanvasSupported=te.isOffscreenCanvasSupported??!0,this.maxCanvasPixels=te.maxCanvasPixels??c,this.pageColors=te.pageColors||null,this.eventBus=te.eventBus,this.renderingQueue=te.renderingQueue,this.l10n=te.l10n||a.NullL10n,this.renderTask=null,this.resume=null,this._isStandalone=!((Oe=this.renderingQueue)!=null&&Oe.hasViewer()),this._container=me,te.useOnlyCssZoom&&(console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead."),this.maxCanvasPixels=0),this._annotationCanvasMap=null,this.annotationLayer=null,this.annotationEditorLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null;const Re=document.createElement("div");if(Re.className="page",Re.setAttribute("data-page-number",this.id),Re.setAttribute("role","region"),this.l10n.get("page_landmark",{page:this.id}).then(Ie=>{Re.setAttribute("aria-label",Ie)}),this.div=Re,J(this,z,Gt).call(this),me==null||me.append(Re),this._isStandalone){me==null||me.style.setProperty("--scale-factor",this.scale*i.PixelsPerInch.PDF_TO_CSS_UNITS);const{optionalContentConfigPromise:Ie}=te;Ie&&Ie.then(Le=>{Ie===this._optionalContentConfigPromise&&(l(this,he).initialOptionalContent=Le.hasInitialVisibility)})}}get renderingState(){return l(this,W)}set renderingState(te){if(te!==l(this,W))switch(le(this,W,te),l(this,I)&&(clearTimeout(l(this,I)),le(this,I,null)),te){case n.RenderingStates.PAUSED:this.div.classList.remove("loading");break;case n.RenderingStates.RUNNING:this.div.classList.add("loadingIcon"),le(this,I,setTimeout(()=>{this.div.classList.add("loading"),le(this,I,null)},0));break;case n.RenderingStates.INITIAL:case n.RenderingStates.FINISHED:this.div.classList.remove("loadingIcon","loading");break}}setPdfPage(te){var ve,Re,Oe;this._isStandalone&&(((ve=this.pageColors)==null?void 0:ve.foreground)==="CanvasText"||((Re=this.pageColors)==null?void 0:Re.background)==="Canvas")&&((Oe=this._container)==null||Oe.style.setProperty("--hcm-highligh-filter",te.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"))),this.pdfPage=te,this.pdfPageRotate=te.rotate;const me=(this.rotation+this.pdfPageRotate)%360;this.viewport=te.getViewport({scale:this.scale*i.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:me}),J(this,z,Gt).call(this),this.reset()}destroy(){var te;this.reset(),(te=this.pdfPage)==null||te.cleanup()}get _textHighlighter(){return(0,i.shadow)(this,"_textHighlighter",new v.TextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus,findController:l(this,D).call(this).findController}))}_resetZoomLayer(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.zoomLayer)return;const me=this.zoomLayer.firstChild;l(this,Y).delete(me),me.width=0,me.height=0,te&&this.zoomLayer.remove(),this.zoomLayer=null}reset(){var Me,Ve,ze,_e,He;let{keepZoomLayer:te=!1,keepAnnotationLayer:me=!1,keepAnnotationEditorLayer:ve=!1,keepXfaLayer:Re=!1,keepTextLayer:Oe=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.cancelRendering({keepAnnotationLayer:me,keepAnnotationEditorLayer:ve,keepXfaLayer:Re,keepTextLayer:Oe}),this.renderingState=n.RenderingStates.INITIAL;const Ie=this.div,Le=Ie.childNodes,ue=te&&this.zoomLayer||null,ne=me&&((Me=this.annotationLayer)==null?void 0:Me.div)||null,ce=ve&&((Ve=this.annotationEditorLayer)==null?void 0:Ve.div)||null,ge=Re&&((ze=this.xfaLayer)==null?void 0:ze.div)||null,Ce=Oe&&((_e=this.textLayer)==null?void 0:_e.div)||null;for(let Ke=Le.length-1;Ke>=0;Ke--){const Xe=Le[Ke];switch(Xe){case ue:case ne:case ce:case ge:case Ce:continue}Xe.remove()}Ie.removeAttribute("data-loaded"),ne&&this.annotationLayer.hide(),ce&&this.annotationEditorLayer.hide(),ge&&this.xfaLayer.hide(),Ce&&this.textLayer.hide(),(He=this.structTreeLayer)==null||He.hide(),ue||(this.canvas&&(l(this,Y).delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer())}update(te){var Le;let{scale:me=0,rotation:ve=null,optionalContentConfigPromise:Re=null,drawingDelay:Oe=-1}=te;this.scale=me||this.scale,typeof ve=="number"&&(this.rotation=ve),Re instanceof Promise&&(this._optionalContentConfigPromise=Re,Re.then(ue=>{Re===this._optionalContentConfigPromise&&(l(this,he).initialOptionalContent=ue.hasInitialVisibility)})),l(this,he).directDrawing=!0;const Ie=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*i.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:Ie}),J(this,z,Gt).call(this),this._isStandalone&&((Le=this._container)==null||Le.style.setProperty("--scale-factor",this.viewport.scale)),this.canvas){let ue=!1;if(l(this,S)){if(this.maxCanvasPixels===0)ue=!0;else if(this.maxCanvasPixels>0){const{width:ce,height:ge}=this.viewport,{sx:Ce,sy:Me}=this.outputScale;ue=(Math.floor(ce)*Ce|0)*(Math.floor(ge)*Me|0)>this.maxCanvasPixels}}const ne=!ue&&Oe>=0&&Oe<1e3;if(ne||ue){if(ne&&this.renderingState!==n.RenderingStates.FINISHED&&(this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:Oe}),this.renderingState=n.RenderingStates.FINISHED,l(this,he).directDrawing=!1),this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!ne,hideTextLayer:ne}),ne)return;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:l(this,Q)});return}!this.zoomLayer&&!this.canvas.hidden&&(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0})}cancelRendering(){var Ie;let{keepAnnotationLayer:te=!1,keepAnnotationEditorLayer:me=!1,keepXfaLayer:ve=!1,keepTextLayer:Re=!1,cancelExtraDelay:Oe=0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.renderTask&&(this.renderTask.cancel(Oe),this.renderTask=null),this.resume=null,this.textLayer&&(!Re||!this.textLayer.div)&&(this.textLayer.cancel(),this.textLayer=null),this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null),this.annotationLayer&&(!te||!this.annotationLayer.div)&&(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),this.annotationEditorLayer&&(!me||!this.annotationEditorLayer.div)&&(this.annotationEditorLayer.cancel(),this.annotationEditorLayer=null),this.xfaLayer&&(!ve||!this.xfaLayer.div)&&(this.xfaLayer.cancel(),this.xfaLayer=null,(Ie=this._textHighlighter)==null||Ie.disable())}cssTransform(te){var ne;let{target:me,redrawAnnotationLayer:ve=!1,redrawAnnotationEditorLayer:Re=!1,redrawXfaLayer:Oe=!1,redrawTextLayer:Ie=!1,hideTextLayer:Le=!1}=te;if(!me.hasAttribute("zooming")){me.setAttribute("zooming",!0);const{style:ce}=me;ce.width=ce.height=""}const ue=l(this,Y).get(me);if(this.viewport!==ue){const ce=this.viewport.rotation-ue.rotation,ge=Math.abs(ce);let Ce=1,Me=1;if(ge===90||ge===270){const{width:Ve,height:ze}=this.viewport;Ce=ze/Ve,Me=Ve/ze}me.style.transform=`rotate(${ce}deg) scale(${Ce}, ${Me})`}ve&&this.annotationLayer&&J(this,oe,Hn).call(this),Re&&this.annotationEditorLayer&&J(this,Pe,Wn).call(this),Oe&&this.xfaLayer&&J(this,P,zn).call(this),this.textLayer&&(Le?(this.textLayer.hide(),(ne=this.structTreeLayer)==null||ne.hide()):Ie&&J(this,E,$n).call(this))}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(te,me){return this.viewport.convertToPdfPoint(te,me)}async draw(){this.renderingState!==n.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:te,l10n:me,pageColors:ve,pdfPage:Re,viewport:Oe}=this;if(!Re)throw this.renderingState=n.RenderingStates.FINISHED,new Error("pdfPage is not loaded");this.renderingState=n.RenderingStates.RUNNING;const Ie=document.createElement("div");if(Ie.classList.add("canvasWrapper"),te.append(Ie),!this.textLayer&&l(this,j)!==n.TextLayerMode.DISABLE&&!Re.isPureXfa&&(this._accessibilityManager||(this._accessibilityManager=new m.TextAccessibilityManager),this.textLayer=new A.TextLayerBuilder({highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,enablePermissions:l(this,j)===n.TextLayerMode.ENABLE_PERMISSIONS}),te.append(this.textLayer.div)),!this.annotationLayer&&l(this,T)!==i.AnnotationMode.DISABLE){const{annotationStorage:V,downloadManager:H,enableScripting:X,fieldObjectsPromise:de,hasJSActionsPromise:Ee,linkService:K}=l(this,D).call(this);this._annotationCanvasMap||(this._annotationCanvasMap=new Map),this.annotationLayer=new h.AnnotationLayerBuilder({pageDiv:te,pdfPage:Re,annotationStorage:V,imageResourcesPath:this.imageResourcesPath,renderForms:l(this,T)===i.AnnotationMode.ENABLE_FORMS,linkService:K,downloadManager:H,l10n:me,enableScripting:X,hasJSActionsPromise:Ee,fieldObjectsPromise:de,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager})}const Le=V=>{if(Ce==null||Ce(!1),this.renderingQueue&&!this.renderingQueue.isHighestPriority(this)){this.renderingState=n.RenderingStates.PAUSED,this.resume=()=>{this.renderingState=n.RenderingStates.RUNNING,V()};return}V()},{width:ue,height:ne}=Oe,ce=document.createElement("canvas");ce.setAttribute("role","presentation"),ce.hidden=!0;const ge=!!(ve!=null&&ve.background&&(ve!=null&&ve.foreground));let Ce=V=>{(!ge||V)&&(ce.hidden=!1,Ce=null)};Ie.append(ce),this.canvas=ce;const Me=ce.getContext("2d",{alpha:!1}),Ve=this.outputScale=new n.OutputScale;if(this.maxCanvasPixels===0){const V=1/this.scale;Ve.sx*=V,Ve.sy*=V,le(this,S,!0)}else if(this.maxCanvasPixels>0){const V=ue*ne,H=Math.sqrt(this.maxCanvasPixels/V);Ve.sx>H||Ve.sy>H?(Ve.sx=H,Ve.sy=H,le(this,S,!0)):le(this,S,!1)}const ze=(0,n.approximateFraction)(Ve.sx),_e=(0,n.approximateFraction)(Ve.sy);ce.width=(0,n.roundToDivide)(ue*Ve.sx,ze[0]),ce.height=(0,n.roundToDivide)(ne*Ve.sy,_e[0]);const{style:He}=ce;He.width=(0,n.roundToDivide)(ue,ze[1])+"px",He.height=(0,n.roundToDivide)(ne,_e[1])+"px",l(this,Y).set(ce,Oe);const Ke=Ve.scaled?[Ve.sx,0,0,Ve.sy,0,0]:null,Xe={canvasContext:Me,transform:Ke,viewport:Oe,annotationMode:l(this,T),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:ve},je=this.renderTask=this.pdfPage.render(Xe);je.onContinue=Le;const Je=je.promise.then(async()=>{var V;if(Ce==null||Ce(!0),await J(this,se,_n).call(this,je),J(this,E,$n).call(this),this.annotationLayer&&await J(this,oe,Hn).call(this),!this.annotationEditorLayer){const{annotationEditorUIManager:H}=l(this,D).call(this);if(!H)return;this.annotationEditorLayer=new d.AnnotationEditorLayerBuilder({uiManager:H,pageDiv:te,pdfPage:Re,l10n:me,accessibilityManager:this._accessibilityManager,annotationLayer:(V=this.annotationLayer)==null?void 0:V.annotationLayer})}J(this,Pe,Wn).call(this)},V=>(V instanceof i.RenderingCancelledException||Ce==null||Ce(!0),J(this,se,_n).call(this,je,V)));if(Re.isPureXfa){if(this.xfaLayer)this.xfaLayer.div&&te.append(this.xfaLayer.div);else{const{annotationStorage:V,linkService:H}=l(this,D).call(this);this.xfaLayer=new b.XfaLayerBuilder({pageDiv:te,pdfPage:Re,annotationStorage:V,linkService:H})}J(this,P,zn).call(this)}return te.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),Je}setPageLabel(te){this.pageLabel=typeof te=="string"?te:null,this.pageLabel!==null?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}get thumbnailCanvas(){const{directDrawing:te,initialOptionalContent:me,regularAnnotations:ve}=l(this,he);return te&&me&&ve?this.canvas:null}}T=new WeakMap,S=new WeakMap,D=new WeakMap,I=new WeakMap,_=new WeakMap,Q=new WeakMap,W=new WeakMap,j=new WeakMap,he=new WeakMap,Y=new WeakMap,z=new WeakSet,Gt=function(){const{viewport:te}=this;if(this.pdfPage){if(l(this,_)===te.rotation)return;le(this,_,te.rotation)}(0,i.setLayerDimensions)(this.div,te,!0,!1)},oe=new WeakSet,Hn=async function(){let te=null;try{await this.annotationLayer.render(this.viewport,"display")}catch(me){console.error(`#renderAnnotationLayer: "${me}".`),te=me}finally{this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:te})}},Pe=new WeakSet,Wn=async function(){let te=null;try{await this.annotationEditorLayer.render(this.viewport,"display")}catch(me){console.error(`#renderAnnotationEditorLayer: "${me}".`),te=me}finally{this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:te})}},P=new WeakSet,zn=async function(){let te=null;try{const me=await this.xfaLayer.render(this.viewport,"display");me!=null&&me.textDivs&&this._textHighlighter&&J(this,F,_r).call(this,me.textDivs)}catch(me){console.error(`#renderXfaLayer: "${me}".`),te=me}finally{this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:te})}},E=new WeakSet,$n=async function(){const{pdfPage:te,textLayer:me,viewport:ve}=this;if(!me)return;let Re=null;try{if(!me.renderingDone){const Oe=te.streamTextContent({includeMarkedContent:!0,disableNormalization:!0});me.setTextContentSource(Oe)}await me.render(ve)}catch(Oe){if(Oe instanceof i.AbortException)return;console.error(`#renderTextLayer: "${Oe}".`),Re=Oe}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.id,numTextDivs:me.numTextDivs,error:Re}),J(this,O,$r).call(this)},O=new WeakSet,$r=async function(){var ve,Re,Oe;if(!this.textLayer)return;this.structTreeLayer||(this.structTreeLayer=new o.StructTreeLayerBuilder);const te=await(this.structTreeLayer.renderingDone?null:this.pdfPage.getStructTree()),me=(ve=this.structTreeLayer)==null?void 0:ve.render(te);me&&((Re=this.canvas)==null||Re.append(me)),(Oe=this.structTreeLayer)==null||Oe.show()},F=new WeakSet,_r=async function(te){const me=await this.pdfPage.getTextContent(),ve=[];for(const Re of me.items)ve.push(Re.str);this._textHighlighter.setTextMapping(te,ve),this._textHighlighter.enable()},se=new WeakSet,_n=async function(te){let me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(te===this.renderTask&&(this.renderTask=null),me instanceof i.RenderingCancelledException){le(this,Q,null);return}if(le(this,Q,me),this.renderingState=n.RenderingStates.FINISHED,this._resetZoomLayer(!0),l(this,he).regularAnnotations=!te.separateAnnots,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:l(this,Q)}),me)throw me},g.PDFPageView=x},(u,g,e)=>{var h,f;Object.defineProperty(g,"__esModule",{value:!0}),g.AnnotationEditorLayerBuilder=void 0;var i=e(107),n=e(125);class d{constructor(r){$(this,h,null);$(this,f,void 0);this.pageDiv=r.pageDiv,this.pdfPage=r.pdfPage,this.accessibilityManager=r.accessibilityManager,this.l10n=r.l10n||n.NullL10n,this.annotationEditorLayer=null,this.div=null,this._cancelled=!1,le(this,f,r.uiManager),le(this,h,r.annotationLayer||null)}async render(r){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"display";if(o!=="display"||this._cancelled)return;const m=r.clone({dontFlip:!0});if(this.div){this.annotationEditorLayer.update({viewport:m}),this.show();return}const v=this.div=document.createElement("div");v.className="annotationEditorLayer",v.tabIndex=0,v.hidden=!0,v.dir=l(this,f).direction,this.pageDiv.append(v),this.annotationEditorLayer=new i.AnnotationEditorLayer({uiManager:l(this,f),div:v,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:m,annotationLayer:l(this,h)});const A={viewport:m,div:v,annotations:null,intent:o};this.annotationEditorLayer.render(A),this.show()}cancel(){this._cancelled=!0,this.div&&(this.pageDiv=null,this.annotationEditorLayer.destroy(),this.div.remove())}hide(){this.div&&(this.div.hidden=!0)}show(){!this.div||this.annotationEditorLayer.isEmpty||(this.div.hidden=!1)}}h=new WeakMap,f=new WeakMap,g.AnnotationEditorLayerBuilder=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.compatibilityParams=g.OptionKind=g.AppOptions=void 0,e(109);const i=Object.create(null);g.compatibilityParams=i;{const a=navigator.userAgent||"",r=navigator.platform||"",o=navigator.maxTouchPoints||1,m=/Android/.test(a),v=/\b(iPad|iPhone|iPod)(?=;)/.test(a)||r==="MacIntel"&&o>1;(function(){(v||m)&&(i.maxCanvasPixels=5242880)})()}const n={VIEWER:2,API:4,WORKER:8,PREFERENCE:128};g.OptionKind=n;const d={annotationEditorMode:{value:0,kind:n.VIEWER+n.PREFERENCE},annotationMode:{value:2,kind:n.VIEWER+n.PREFERENCE},cursorToolOnLoad:{value:0,kind:n.VIEWER+n.PREFERENCE},defaultZoomDelay:{value:400,kind:n.VIEWER+n.PREFERENCE},defaultZoomValue:{value:"",kind:n.VIEWER+n.PREFERENCE},disableHistory:{value:!1,kind:n.VIEWER},disablePageLabels:{value:!1,kind:n.VIEWER+n.PREFERENCE},enablePermissions:{value:!1,kind:n.VIEWER+n.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:n.VIEWER+n.PREFERENCE},enableScripting:{value:!0,kind:n.VIEWER+n.PREFERENCE},enableStampEditor:{value:!0,kind:n.VIEWER+n.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:n.VIEWER},externalLinkTarget:{value:0,kind:n.VIEWER+n.PREFERENCE},historyUpdateUrl:{value:!1,kind:n.VIEWER+n.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:n.VIEWER+n.PREFERENCE},imageResourcesPath:{value:"./images/",kind:n.VIEWER},maxCanvasPixels:{value:16777216,kind:n.VIEWER},forcePageColors:{value:!1,kind:n.VIEWER+n.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:n.VIEWER+n.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:n.VIEWER+n.PREFERENCE},pdfBugEnabled:{value:!1,kind:n.VIEWER+n.PREFERENCE},printResolution:{value:150,kind:n.VIEWER},sidebarViewOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},scrollModeOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},spreadModeOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},textLayerMode:{value:1,kind:n.VIEWER+n.PREFERENCE},viewerCssTheme:{value:0,kind:n.VIEWER+n.PREFERENCE},viewOnLoad:{value:0,kind:n.VIEWER+n.PREFERENCE},cMapPacked:{value:!0,kind:n.API},cMapUrl:{value:"../web/cmaps/",kind:n.API},disableAutoFetch:{value:!1,kind:n.API+n.PREFERENCE},disableFontFace:{value:!1,kind:n.API+n.PREFERENCE},disableRange:{value:!1,kind:n.API+n.PREFERENCE},disableStream:{value:!1,kind:n.API+n.PREFERENCE},docBaseUrl:{value:"",kind:n.API},enableXfa:{value:!0,kind:n.API+n.PREFERENCE},fontExtraProperties:{value:!1,kind:n.API},isEvalSupported:{value:!0,kind:n.API},isOffscreenCanvasSupported:{value:!0,kind:n.API},maxImageSize:{value:-1,kind:n.API},pdfBug:{value:!1,kind:n.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:n.API},verbosity:{value:1,kind:n.API},workerPort:{value:null,kind:n.WORKER},workerSrc:{value:"../build/pdf.worker.js",kind:n.WORKER}};d.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:n.VIEWER},d.disablePreferences={value:!1,kind:n.VIEWER},d.locale={value:navigator.language||"en-US",kind:n.VIEWER},d.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:n.VIEWER};const h=Object.create(null);class f{constructor(){throw new Error("Cannot initialize AppOptions.")}static get(r){const o=h[r];if(o!==void 0)return o;const m=d[r];if(m!==void 0)return i[r]??m.value}static getAll(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;const o=Object.create(null);for(const m in d){const v=d[m];if(r){if(!(r&v.kind))continue;if(r===n.PREFERENCE){const b=v.value,c=typeof b;if(c==="boolean"||c==="string"||c==="number"&&Number.isInteger(b)){o[m]=b;continue}throw new Error(`Invalid type for preference: ${m}`)}}const A=h[m];o[m]=A!==void 0?A:i[m]??v.value}return o}static set(r,o){h[r]=o}static setAll(r){for(const o in r)h[o]=r[o]}static remove(r){delete h[r]}}g.AppOptions=f,f._hasUserOptions=function(){return Object.keys(h).length>0}},(u,g,e)=>{var f,a,Gn,o,Xn;Object.defineProperty(g,"__esModule",{value:!0}),g.StructTreeLayerBuilder=void 0;var i=e(97);const n={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},d=/^H(\d+)$/;class h{constructor(){$(this,a);$(this,o);$(this,f,void 0)}get renderingDone(){return l(this,f)!==void 0}render(A){if(l(this,f)!==void 0)return l(this,f);const b=J(this,o,Xn).call(this,A);return b==null||b.classList.add("structTree"),le(this,f,b)}hide(){l(this,f)&&!l(this,f).hidden&&(l(this,f).hidden=!0)}show(){var A;(A=l(this,f))!=null&&A.hidden&&(l(this,f).hidden=!1)}}f=new WeakMap,a=new WeakSet,Gn=function(A,b){const{alt:c,id:s,lang:x}=A;c!==void 0&&b.setAttribute("aria-label",(0,i.removeNullCharacters)(c)),s!==void 0&&b.setAttribute("aria-owns",s),x!==void 0&&b.setAttribute("lang",(0,i.removeNullCharacters)(x,!0))},o=new WeakSet,Xn=function(A){if(!A)return null;const b=document.createElement("span");if("role"in A){const{role:c}=A,s=c.match(d);s?(b.setAttribute("role","heading"),b.setAttribute("aria-level",s[1])):n[c]&&b.setAttribute("role",n[c])}if(J(this,a,Gn).call(this,A,b),A.children)if(A.children.length===1&&"id"in A.children[0])J(this,a,Gn).call(this,A.children[0],b);else for(const c of A.children)b.append(J(this,o,Xn).call(this,c));return b},g.StructTreeLayerBuilder=h},(u,g,e)=>{var d,h,f,a,r,Xt,m,Kn;Object.defineProperty(g,"__esModule",{value:!0}),g.TextAccessibilityManager=void 0,e(109);var i=e(97);const A=class A{constructor(){$(this,m);$(this,d,!1);$(this,h,null);$(this,f,new Map);$(this,a,new Map)}setTextMapping(c){le(this,h,c)}enable(){if(l(this,d))throw new Error("TextAccessibilityManager is already enabled.");if(!l(this,h))throw new Error("Text divs and strings have not been set.");if(le(this,d,!0),le(this,h,l(this,h).slice()),l(this,h).sort(J(A,r,Xt)),l(this,f).size>0){const c=l(this,h);for(const[s,x]of l(this,f)){if(!document.getElementById(s)){l(this,f).delete(s);continue}J(this,m,Kn).call(this,s,c[x])}}for(const[c,s]of l(this,a))this.addPointerInTextLayer(c,s);l(this,a).clear()}disable(){l(this,d)&&(l(this,a).clear(),le(this,h,null),le(this,d,!1))}removePointerInTextLayer(c){if(!l(this,d)){l(this,a).delete(c);return}const s=l(this,h);if(!s||s.length===0)return;const{id:x}=c,T=l(this,f).get(x);if(T===void 0)return;const S=s[T];l(this,f).delete(x);let D=S.getAttribute("aria-owns");D!=null&&D.includes(x)&&(D=D.split(" ").filter(I=>I!==x).join(" "),D?S.setAttribute("aria-owns",D):(S.removeAttribute("aria-owns"),S.setAttribute("role","presentation")))}addPointerInTextLayer(c,s){const{id:x}=c;if(!x)return null;if(!l(this,d))return l(this,a).set(c,s),null;s&&this.removePointerInTextLayer(c);const T=l(this,h);if(!T||T.length===0)return null;const S=(0,i.binarySearchFirstItem)(T,Q=>{var W;return J(W=A,r,Xt).call(W,c,Q)<0}),D=Math.max(0,S-1),I=T[D];J(this,m,Kn).call(this,x,I),l(this,f).set(x,D);const _=I.parentNode;return _!=null&&_.classList.contains("markedContent")?_.id:null}moveElementInDOM(c,s,x,T){const S=this.addPointerInTextLayer(x,T);if(!c.hasChildNodes())return c.append(s),S;const D=Array.from(c.childNodes).filter(Q=>Q!==s);if(D.length===0)return S;const I=x||s,_=(0,i.binarySearchFirstItem)(D,Q=>{var W;return J(W=A,r,Xt).call(W,I,Q)<0});return _===0?D[0].before(s):D[_-1].after(s),S}};d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakSet,Xt=function(c,s){const x=c.getBoundingClientRect(),T=s.getBoundingClientRect();if(x.width===0&&x.height===0)return 1;if(T.width===0&&T.height===0)return-1;const S=x.y,D=x.y+x.height,I=x.y+x.height/2,_=T.y,Q=T.y+T.height,W=T.y+T.height/2;if(I<=_&&W>=D)return-1;if(W<=S&&I>=Q)return 1;const j=x.x+x.width/2,he=T.x+T.width/2;return j-he},m=new WeakSet,Kn=function(c,s){const x=s.getAttribute("aria-owns");x!=null&&x.includes(c)||s.setAttribute("aria-owns",x?`${x} ${c}`:c),s.removeAttribute("role")},$(A,r);let n=A;g.TextAccessibilityManager=n},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.TextHighlighter=void 0,e(109),e(93);class i{constructor(d){let{findController:h,eventBus:f,pageIndex:a}=d;this.findController=h,this.matches=[],this.eventBus=f,this.pageIdx=a,this._onUpdateTextLayerMatches=null,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(d,h){this.textDivs=d,this.textContentItemsStr=h}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=d=>{(d.pageIndex===this.pageIdx||d.pageIndex===-1)&&this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)),this._updateMatches()}disable(){this.enabled&&(this.enabled=!1,this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null),this._updateMatches(!0))}_convertMatches(d,h){if(!d)return[];const{textContentItemsStr:f}=this;let a=0,r=0;const o=f.length-1,m=[];for(let v=0,A=d.length;v<A;v++){let b=d[v];for(;a!==o&&b>=r+f[a].length;)r+=f[a].length,a++;a===f.length&&console.error("Could not find a matching mapping");const c={begin:{divIdx:a,offset:b-r}};for(b+=h[v];a!==o&&b>r+f[a].length;)r+=f[a].length,a++;c.end={divIdx:a,offset:b-r},m.push(c)}return m}_renderMatches(d){if(d.length===0)return;const{findController:h,pageIdx:f}=this,{textContentItemsStr:a,textDivs:r}=this,o=f===h.selected.pageIdx,m=h.selected.matchIdx,v=h.state.highlightAll;let A=null;const b={divIdx:-1,offset:void 0};function c(I,_){const Q=I.divIdx;return r[Q].textContent="",s(Q,0,I.offset,_)}function s(I,_,Q,W){let j=r[I];if(j.nodeType===Node.TEXT_NODE){const z=document.createElement("span");j.before(z),z.append(j),r[I]=z,j=z}const he=a[I].substring(_,Q),Y=document.createTextNode(he);if(W){const z=document.createElement("span");return z.className=`${W} appended`,z.append(Y),j.append(z),W.includes("selected")?z.offsetLeft:0}return j.append(Y),0}let x=m,T=x+1;if(v)x=0,T=d.length;else if(!o)return;let S=-1,D=-1;for(let I=x;I<T;I++){const _=d[I],Q=_.begin;if(Q.divIdx===S&&Q.offset===D)continue;S=Q.divIdx,D=Q.offset;const W=_.end,j=o&&I===m,he=j?" selected":"";let Y=0;if(!A||Q.divIdx!==A.divIdx?(A!==null&&s(A.divIdx,A.offset,b.offset),c(Q)):s(A.divIdx,A.offset,Q.offset),Q.divIdx===W.divIdx)Y=s(Q.divIdx,Q.offset,W.offset,"highlight"+he);else{Y=s(Q.divIdx,Q.offset,b.offset,"highlight begin"+he);for(let z=Q.divIdx+1,ee=W.divIdx;z<ee;z++)r[z].className="highlight middle"+he;c(W,"highlight end"+he)}A=W,j&&h.scrollMatchIntoView({element:r[Q.divIdx],selectedLeft:Y,pageIndex:f,matchIndex:m})}A&&s(A.divIdx,A.offset,b.offset)}_updateMatches(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.enabled&&!d)return;const{findController:h,matches:f,pageIdx:a}=this,{textContentItemsStr:r,textDivs:o}=this;let m=-1;for(const b of f){const c=Math.max(m,b.begin.divIdx);for(let s=c,x=b.end.divIdx;s<=x;s++){const T=o[s];T.textContent=r[s],T.className=""}m=b.end.divIdx+1}if(!(h!=null&&h.highlightMatches)||d)return;const v=h.pageMatches[a]||null,A=h.pageMatchesLength[a]||null;this.matches=this._convertMatches(v,A),this._renderMatches(this.matches)}}g.TextHighlighter=i},(u,g,e)=>{var h,f,a,r,o,Gr,v,Xr;Object.defineProperty(g,"__esModule",{value:!0}),g.TextLayerBuilder=void 0,e(109);var i=e(107),n=e(97);class d{constructor(c){$(this,o);$(this,v);$(this,h,!1);$(this,f,0);$(this,a,0);$(this,r,null);let{highlighter:s=null,accessibilityManager:x=null,isOffscreenCanvasSupported:T=!0,enablePermissions:S=!1}=c;this.textContentItemsStr=[],this.renderingDone=!1,this.textDivs=[],this.textDivProperties=new WeakMap,this.textLayerRenderTask=null,this.highlighter=s,this.accessibilityManager=x,this.isOffscreenCanvasSupported=T,le(this,h,S===!0),this.div=document.createElement("div"),this.div.className="textLayer",this.hide()}get numTextDivs(){return this.textDivs.length}async render(c){var T,S,D;if(!l(this,r))throw new Error('No "textContentSource" parameter specified.');const s=c.scale*(globalThis.devicePixelRatio||1),{rotation:x}=c;if(this.renderingDone){const I=x!==l(this,f),_=s!==l(this,a);(I||_)&&(this.hide(),(0,i.updateTextLayer)({container:this.div,viewport:c,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:_,mustRotate:I}),le(this,a,s),le(this,f,x)),this.show();return}this.cancel(),(T=this.highlighter)==null||T.setTextMapping(this.textDivs,this.textContentItemsStr),(S=this.accessibilityManager)==null||S.setTextMapping(this.textDivs),this.textLayerRenderTask=(0,i.renderTextLayer)({textContentSource:l(this,r),container:this.div,viewport:c,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported}),await this.textLayerRenderTask.promise,J(this,o,Gr).call(this),le(this,a,s),le(this,f,x),this.show(),(D=this.accessibilityManager)==null||D.enable()}hide(){var c;this.div.hidden||((c=this.highlighter)==null||c.disable(),this.div.hidden=!0)}show(){var c;this.div.hidden&&this.renderingDone&&(this.div.hidden=!1,(c=this.highlighter)==null||c.enable())}cancel(){var c,s;this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),(c=this.highlighter)==null||c.disable(),(s=this.accessibilityManager)==null||s.disable(),this.textContentItemsStr.length=0,this.textDivs.length=0,this.textDivProperties=new WeakMap}setTextContentSource(c){this.cancel(),le(this,r,c)}}h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakSet,Gr=function(){this.renderingDone=!0;const c=document.createElement("div");c.className="endOfContent",this.div.append(c),J(this,v,Xr).call(this)},v=new WeakSet,Xr=function(){const{div:c}=this;c.addEventListener("mousedown",s=>{const x=c.querySelector(".endOfContent");if(!x)return;let T=s.target!==c;if(T&&(T=getComputedStyle(x).getPropertyValue("-moz-user-select")!=="none"),T){const S=c.getBoundingClientRect(),D=Math.max(0,(s.pageY-S.top)/S.height);x.style.top=(D*100).toFixed(2)+"%"}x.classList.add("active")}),c.addEventListener("mouseup",()=>{const s=c.querySelector(".endOfContent");s&&(s.style.top="",s.classList.remove("active"))}),c.addEventListener("copy",s=>{if(!l(this,h)){const x=document.getSelection();s.clipboardData.setData("text/plain",(0,n.removeNullCharacters)((0,i.normalizeUnicode)(x.toString())))}s.preventDefault(),s.stopPropagation()})},g.TextLayerBuilder=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.XfaLayerBuilder=void 0;var i=e(107);class n{constructor(h){let{pageDiv:f,pdfPage:a,annotationStorage:r=null,linkService:o,xfaHtml:m=null}=h;this.pageDiv=f,this.pdfPage=a,this.annotationStorage=r,this.linkService=o,this.xfaHtml=m,this.div=null,this._cancelled=!1}async render(h){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"display";if(f==="print"){const o={viewport:h.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:f},m=document.createElement("div");return this.pageDiv.append(m),o.div=m,i.XfaLayer.render(o)}const a=await this.pdfPage.getXfa();if(this._cancelled||!a)return{textDivs:[]};const r={viewport:h.clone({dontFlip:!0}),div:this.div,xfaHtml:a,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:f};return this.div?i.XfaLayer.update(r):(this.div=document.createElement("div"),this.pageDiv.append(this.div),r.div=this.div,i.XfaLayer.render(r))}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}g.XfaLayerBuilder=n},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFScriptingManager=void 0;var i=e(140),n=e(141);class d extends n.PDFScriptingManager{constructor(f){f.externalServices||window.addEventListener("updatefromsandbox",a=>{f.eventBus.dispatch("updatefromsandbox",{source:window,detail:a.detail})}),f.externalServices||(f.externalServices={createScripting:a=>{let{sandboxBundleSrc:r}=a;return new i.GenericScripting(r)}}),f.docProperties||(f.docProperties=a=>(0,i.docProperties)(a)),super(f)}}g.PDFScriptingManager=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.GenericScripting=void 0,g.docProperties=n;var i=e(107);async function n(h){const f="",a=f.split("#")[0];let{info:r,metadata:o,contentDispositionFilename:m,contentLength:v}=await h.getMetadata();if(!v){const{length:A}=await h.getDownloadInfo();v=A}return{...r,baseURL:a,filesize:v,filename:m||(0,i.getPdfFilenameFromUrl)(f),metadata:o==null?void 0:o.getRaw(),authors:o==null?void 0:o.get("dc:creator"),numPages:h.numPages,URL:f}}class d{constructor(f){this._ready=(0,i.loadScript)(f,!0).then(()=>window.pdfjsSandbox.QuickJSSandbox())}async createSandbox(f){(await this._ready).create(f)}async dispatchEventInSandbox(f){const a=await this._ready;setTimeout(()=>a.dispatchEvent(f),0)}async destroySandbox(){(await this._ready).nukeSandbox()}}g.GenericScripting=d},(u,g,e)=>{var h,f,a,r,o,m,v,A,b,c,s,x,Kr,S,Kt,I,Yn,Q,Yr,j,wt;Object.defineProperty(g,"__esModule",{value:!0}),g.PDFScriptingManager=void 0,e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(109);var i=e(97),n=e(107);class d{constructor(z){$(this,x);$(this,S);$(this,I);$(this,Q);$(this,j);$(this,h,null);$(this,f,null);$(this,a,null);$(this,r,null);$(this,o,null);$(this,m,null);$(this,v,null);$(this,A,!1);$(this,b,null);$(this,c,null);$(this,s,null);let{eventBus:ee,sandboxBundleSrc:oe=null,externalServices:ye=null,docProperties:Pe=null}=z;le(this,r,ee),le(this,b,oe),le(this,o,ye),le(this,a,Pe)}setViewer(z){le(this,v,z)}async setDocument(z){var Pe;if(l(this,m)&&await J(this,j,wt).call(this),le(this,m,z),!z)return;const[ee,oe,ye]=await Promise.all([z.getFieldObjects(),z.getCalculationOrderIds(),z.getJSActions()]);if(!ee&&!ye){await J(this,j,wt).call(this);return}if(z===l(this,m)){try{le(this,c,J(this,Q,Yr).call(this))}catch(L){console.error(`setDocument: "${L.message}".`),await J(this,j,wt).call(this);return}this._internalEvents.set("updatefromsandbox",L=>{(L==null?void 0:L.source)===window&&J(this,x,Kr).call(this,L.detail)}),this._internalEvents.set("dispatcheventinsandbox",L=>{var P;(P=l(this,c))==null||P.dispatchEventInSandbox(L.detail)}),this._internalEvents.set("pagechanging",L=>{let{pageNumber:P,previous:M}=L;P!==M&&(J(this,I,Yn).call(this,M),J(this,S,Kt).call(this,P))}),this._internalEvents.set("pagerendered",L=>{let{pageNumber:P}=L;this._pageOpenPending.has(P)&&P===l(this,v).currentPageNumber&&J(this,S,Kt).call(this,P)}),this._internalEvents.set("pagesdestroy",async()=>{var L,P;await J(this,I,Yn).call(this,l(this,v).currentPageNumber),await((L=l(this,c))==null?void 0:L.dispatchEventInSandbox({id:"doc",name:"WillClose"})),(P=l(this,h))==null||P.resolve()});for(const[L,P]of this._internalEvents)l(this,r)._on(L,P);try{const L=await l(this,a).call(this,z);if(z!==l(this,m))return;await l(this,c).createSandbox({objects:ee,calculationOrder:oe,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:{...L,actions:ye}}),l(this,r).dispatch("sandboxcreated",{source:this})}catch(L){console.error(`setDocument: "${L.message}".`),await J(this,j,wt).call(this);return}await((Pe=l(this,c))==null?void 0:Pe.dispatchEventInSandbox({id:"doc",name:"Open"})),await J(this,S,Kt).call(this,l(this,v).currentPageNumber,!0),Promise.resolve().then(()=>{z===l(this,m)&&le(this,A,!0)})}}async dispatchWillSave(){var z;return(z=l(this,c))==null?void 0:z.dispatchEventInSandbox({id:"doc",name:"WillSave"})}async dispatchDidSave(){var z;return(z=l(this,c))==null?void 0:z.dispatchEventInSandbox({id:"doc",name:"DidSave"})}async dispatchWillPrint(){var z;if(l(this,c)){await((z=l(this,s))==null?void 0:z.promise),le(this,s,new n.PromiseCapability);try{await l(this,c).dispatchEventInSandbox({id:"doc",name:"WillPrint"})}catch(ee){throw l(this,s).resolve(),le(this,s,null),ee}await l(this,s).promise}}async dispatchDidPrint(){var z;return(z=l(this,c))==null?void 0:z.dispatchEventInSandbox({id:"doc",name:"DidPrint"})}get destroyPromise(){var z;return((z=l(this,f))==null?void 0:z.promise)||null}get ready(){return l(this,A)}get _internalEvents(){return(0,n.shadow)(this,"_internalEvents",new Map)}get _pageOpenPending(){return(0,n.shadow)(this,"_pageOpenPending",new Set)}get _visitedPages(){return(0,n.shadow)(this,"_visitedPages",new Map)}}h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakMap,A=new WeakMap,b=new WeakMap,c=new WeakMap,s=new WeakMap,x=new WeakSet,Kr=async function(z){var E,R;const ee=l(this,v),oe=ee.isInPresentationMode||ee.isChangingPresentationMode,{id:ye,siblings:Pe,command:L,value:P}=z;if(!ye){switch(L){case"clear":console.clear();break;case"error":console.error(P);break;case"layout":if(!oe){const O=(0,i.apiPageLayoutToViewerModes)(P);ee.spreadMode=O.spreadMode}break;case"page-num":ee.currentPageNumber=P+1;break;case"print":await ee.pagesPromise,l(this,r).dispatch("print",{source:this});break;case"println":console.log(P);break;case"zoom":oe||(ee.currentScaleValue=P);break;case"SaveAs":l(this,r).dispatch("download",{source:this});break;case"FirstPage":ee.currentPageNumber=1;break;case"LastPage":ee.currentPageNumber=ee.pagesCount;break;case"NextPage":ee.nextPage();break;case"PrevPage":ee.previousPage();break;case"ZoomViewIn":oe||ee.increaseScale();break;case"ZoomViewOut":oe||ee.decreaseScale();break;case"WillPrintFinished":(E=l(this,s))==null||E.resolve(),le(this,s,null);break}return}if(oe&&z.focus)return;delete z.id,delete z.siblings;const M=Pe?[ye,...Pe]:[ye];for(const O of M){const B=document.querySelector(`[data-element-id="${O}"]`);B?B.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:z})):(R=l(this,m))==null||R.annotationStorage.setValue(O,z)}},S=new WeakSet,Kt=async function(z){let ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const oe=l(this,m),ye=this._visitedPages;if(ee&&le(this,h,new n.PromiseCapability),!l(this,h))return;const Pe=l(this,v).getPageView(z-1);if((Pe==null?void 0:Pe.renderingState)!==i.RenderingStates.FINISHED){this._pageOpenPending.add(z);return}this._pageOpenPending.delete(z);const L=(async()=>{var M,E;const P=await(ye.has(z)?null:(M=Pe.pdfPage)==null?void 0:M.getJSActions());oe===l(this,m)&&await((E=l(this,c))==null?void 0:E.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:z,actions:P}))})();ye.set(z,L)},I=new WeakSet,Yn=async function(z){var Pe;const ee=l(this,m),oe=this._visitedPages;if(!l(this,h)||this._pageOpenPending.has(z))return;const ye=oe.get(z);ye&&(oe.set(z,null),await ye,ee===l(this,m)&&await((Pe=l(this,c))==null?void 0:Pe.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:z})))},Q=new WeakSet,Yr=function(){if(le(this,f,new n.PromiseCapability),l(this,c))throw new Error("#initScripting: Scripting already exists.");return l(this,o).createScripting({sandboxBundleSrc:l(this,b)})},j=new WeakSet,wt=async function(){var z,ee,oe;if(!l(this,c)){le(this,m,null),(z=l(this,f))==null||z.resolve();return}l(this,h)&&(await Promise.race([l(this,h).promise,new Promise(ye=>{setTimeout(ye,1e3)})]).catch(()=>{}),le(this,h,null)),le(this,m,null);try{await l(this,c).destroySandbox()}catch{}(ee=l(this,s))==null||ee.reject(new Error("Scripting destroyed.")),le(this,s,null);for(const[ye,Pe]of this._internalEvents)l(this,r)._off(ye,Pe);this._internalEvents.clear(),this._pageOpenPending.clear(),this._visitedPages.clear(),le(this,c,null),le(this,A,!1),(oe=l(this,f))==null||oe.resolve()},g.PDFScriptingManager=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFSinglePageViewer=void 0;var i=e(97),n=e(143);class d extends n.PDFViewer{_resetView(){super._resetView(),this._scrollMode=i.ScrollMode.PAGE,this._spreadMode=i.SpreadMode.NONE}set scrollMode(f){}_updateScrollMode(){}set spreadMode(f){}_updateSpreadMode(){}}g.PDFSinglePageViewer=d},(u,g,e)=>{var b,c,s,Jn,T,S,D,I,_,Q,W,j,he,Y,z,ee,oe,ye,Pe,L,P,M,Jr,R,Qr,B,Zr,Z,jr,q,kt,te,Yt,ve,qr,Oe,Qn,Le,ei,ne,ot,ge,Zn,Me,ti,ze,ni,He,jn,Xe,ri;Object.defineProperty(g,"__esModule",{value:!0}),g.PagesCountLimit=g.PDFViewer=g.PDFPageViewBuffer=void 0,e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(109),e(93);var i=e(107),n=e(97),d=e(125),h=e(131),f=e(144),a=e(108);const r=10,o={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};g.PagesCountLimit=o;function m(Je){return Object.values(i.AnnotationEditorType).includes(Je)&&Je!==i.AnnotationEditorType.DISABLE}class v{constructor(V){$(this,s);$(this,b,new Set);$(this,c,0);le(this,c,V)}push(V){const H=l(this,b);H.has(V)&&H.delete(V),H.add(V),H.size>l(this,c)&&J(this,s,Jn).call(this)}resize(V){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;le(this,c,V);const X=l(this,b);if(H){const de=X.size;let Ee=1;for(const K of X)if(H.has(K.id)&&(X.delete(K),X.add(K)),++Ee>de)break}for(;X.size>l(this,c);)J(this,s,Jn).call(this)}has(V){return l(this,b).has(V)}[Symbol.iterator](){return l(this,b).keys()}}b=new WeakMap,c=new WeakMap,s=new WeakSet,Jn=function(){const V=l(this,b).keys().next().value;V==null||V.destroy(),l(this,b).delete(V)},g.PDFPageViewBuffer=v;class A{constructor(V){$(this,M);$(this,R);$(this,B);$(this,Z);$(this,q);$(this,te);$(this,ve);$(this,Oe);$(this,Le);$(this,ne);$(this,ge);$(this,Me);$(this,ze);$(this,He);$(this,Xe);$(this,T,null);$(this,S,null);$(this,D,i.AnnotationEditorType.NONE);$(this,I,null);$(this,_,i.AnnotationMode.ENABLE_FORMS);$(this,Q,null);$(this,W,null);$(this,j,!1);$(this,he,!1);$(this,Y,null);$(this,z,!1);$(this,ee,0);$(this,oe,new ResizeObserver(J(this,Xe,ri).bind(this)));$(this,ye,null);$(this,Pe,null);$(this,L,null);$(this,P,n.TextLayerMode.ENABLE);var X,de;const H="3.11.174";if(i.version!==H)throw new Error(`The API version "${i.version}" does not match the Viewer version "${H}".`);if(this.container=V.container,this.viewer=V.viewer||V.container.firstElementChild,((X=this.container)==null?void 0:X.tagName)!=="DIV"||((de=this.viewer)==null?void 0:de.tagName)!=="DIV")throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&getComputedStyle(this.container).position!=="absolute")throw new Error("The `container` must be absolutely positioned.");l(this,oe).observe(this.container),this.eventBus=V.eventBus,this.linkService=V.linkService||new a.SimpleLinkService,this.downloadManager=V.downloadManager||null,this.findController=V.findController||null,le(this,S,V.altTextManager||null),this.findController&&(this.findController.onIsPageVisible=Ee=>this._getVisiblePages().ids.has(Ee)),this._scriptingManager=V.scriptingManager||null,le(this,P,V.textLayerMode??n.TextLayerMode.ENABLE),le(this,_,V.annotationMode??i.AnnotationMode.ENABLE_FORMS),le(this,D,V.annotationEditorMode??i.AnnotationEditorType.NONE),this.imageResourcesPath=V.imageResourcesPath||"",this.enablePrintAutoRotate=V.enablePrintAutoRotate||!1,this.removePageBorders=V.removePageBorders||!1,V.useOnlyCssZoom&&(console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead."),V.maxCanvasPixels=0),this.isOffscreenCanvasSupported=V.isOffscreenCanvasSupported??!0,this.maxCanvasPixels=V.maxCanvasPixels,this.l10n=V.l10n||d.NullL10n,le(this,j,V.enablePermissions||!1),this.pageColors=V.pageColors||null,this.defaultRenderingQueue=!V.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new f.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=V.renderingQueue,this.scroll=(0,n.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=n.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),J(this,He,jn).call(this),this.eventBus._on("thumbnailrendered",Ee=>{let{pageNumber:K,pdfPage:U}=Ee;const ie=this._pages[K-1];l(this,T).has(ie)||U==null||U.cleanup()})}get pagesCount(){return this._pages.length}getPageView(V){return this._pages[V]}getCachedPageViews(){return new Set(l(this,T))}get pageViewsReady(){return this._pagesCapability.settled&&this._pages.every(V=>V==null?void 0:V.pdfPage)}get renderForms(){return l(this,_)===i.AnnotationMode.ENABLE_FORMS}get enableScripting(){return!!this._scriptingManager}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(V){if(!Number.isInteger(V))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(V,!0)||console.error(`currentPageNumber: "${V}" is not a valid page.`))}_setCurrentPageNumber(V){var de;let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this._currentPageNumber===V)return H&&J(this,ge,Zn).call(this),!0;if(!(0<V&&V<=this.pagesCount))return!1;const X=this._currentPageNumber;return this._currentPageNumber=V,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:V,pageLabel:((de=this._pageLabels)==null?void 0:de[V-1])??null,previous:X}),H&&J(this,ge,Zn).call(this),!0}get currentPageLabel(){var V;return((V=this._pageLabels)==null?void 0:V[this._currentPageNumber-1])??null}set currentPageLabel(V){if(!this.pdfDocument)return;let H=V|0;if(this._pageLabels){const X=this._pageLabels.indexOf(V);X>=0&&(H=X+1)}this._setCurrentPageNumber(H,!0)||console.error(`currentPageLabel: "${V}" is not a valid page.`)}get currentScale(){return this._currentScale!==n.UNKNOWN_SCALE?this._currentScale:n.DEFAULT_SCALE}set currentScale(V){if(isNaN(V))throw new Error("Invalid numeric scale.");this.pdfDocument&&J(this,ne,ot).call(this,V,{noScroll:!1})}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(V){this.pdfDocument&&J(this,ne,ot).call(this,V,{noScroll:!1})}get pagesRotation(){return this._pagesRotation}set pagesRotation(V){if(!(0,n.isValidRotation)(V))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument||(V%=360,V<0&&(V+=360),this._pagesRotation===V))return;this._pagesRotation=V;const H=this._currentPageNumber;this.refresh(!0,{rotation:V}),this._currentScaleValue&&J(this,ne,ot).call(this,this._currentScaleValue,{noScroll:!0}),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:V,pageNumber:H}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}async getAllText(){const V=[],H=[];for(let X=1,de=this.pdfDocument.numPages;X<=de;++X){if(l(this,z))return null;H.length=0;const Ee=await this.pdfDocument.getPage(X),{items:K}=await Ee.getTextContent();for(const U of K)U.str&&H.push(U.str),U.hasEOL&&H.push(`
`);V.push((0,n.removeNullCharacters)(H.join("")))}return V.join(`
`)}setDocument(V){var K,U;if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),(K=this.findController)==null||K.setDocument(null),(U=this._scriptingManager)==null||U.setDocument(null),l(this,I)&&(l(this,I).destroy(),le(this,I,null))),this.pdfDocument=V,!V)return;const H=V.numPages,X=V.getPage(1),de=V.getOptionalContentConfig(),Ee=l(this,j)?V.getPermissions():Promise.resolve();if(H>o.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");const ie=this._scrollMode=n.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:ie})}this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:H})},()=>{}),this._onBeforeDraw=ie=>{const Ae=this._pages[ie.pageNumber-1];Ae&&l(this,T).push(Ae)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=ie=>{ie.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:ie.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,l(this,Pe)&&(document.removeEventListener("visibilitychange",l(this,Pe)),le(this,Pe,null)))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([X,Ee]).then(ie=>{var G,ae;let[Ae,Se]=ie;if(V!==this.pdfDocument)return;this._firstPageCapability.resolve(Ae),this._optionalContentConfigPromise=de;const{annotationEditorMode:we,annotationMode:Te,textLayerMode:Ne}=J(this,R,Qr).call(this,Se);if(Ne!==n.TextLayerMode.DISABLE){const fe=le(this,Y,document.createElement("div"));fe.id="hiddenCopyElement",this.viewer.before(fe)}if(we!==i.AnnotationEditorType.DISABLE){const fe=we;V.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):m(fe)?(le(this,I,new i.AnnotationEditorUIManager(this.container,this.viewer,l(this,S),this.eventBus,V,this.pageColors)),fe!==i.AnnotationEditorType.NONE&&l(this,I).updateMode(fe)):console.error(`Invalid AnnotationEditor mode: ${fe}`)}const ke=J(this,M,Jr).bind(this),Ue=this._scrollMode===n.ScrollMode.PAGE?null:this.viewer,Be=this.currentScale,re=Ae.getViewport({scale:Be*i.PixelsPerInch.PDF_TO_CSS_UNITS});this.viewer.style.setProperty("--scale-factor",re.scale),(((G=this.pageColors)==null?void 0:G.foreground)==="CanvasText"||((ae=this.pageColors)==null?void 0:ae.background)==="Canvas")&&this.viewer.style.setProperty("--hcm-highligh-filter",V.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(let fe=1;fe<=H;++fe){const be=new h.PDFPageView({container:Ue,eventBus:this.eventBus,id:fe,scale:Be,defaultViewport:re.clone(),optionalContentConfigPromise:de,renderingQueue:this.renderingQueue,textLayerMode:Ne,annotationMode:Te,imageResourcesPath:this.imageResourcesPath,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n,layerProperties:ke});this._pages.push(be)}const C=this._pages[0];C&&(C.setPdfPage(Ae),this.linkService.cachePageRef(1,Ae.ref)),this._scrollMode===n.ScrollMode.PAGE?J(this,q,kt).call(this):this._spreadMode!==n.SpreadMode.NONE&&this._updateSpreadMode(),J(this,B,Zr).call(this).then(async()=>{var be,xe;if((be=this.findController)==null||be.setDocument(V),(xe=this._scriptingManager)==null||xe.setDocument(V),l(this,Y)&&(le(this,W,J(this,Z,jr).bind(this,Ne)),document.addEventListener("copy",l(this,W))),l(this,I)&&this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:l(this,D)}),V.loadingParams.disableAutoFetch||H>o.FORCE_LAZY_PAGE_INIT){this._pagesCapability.resolve();return}let fe=H-1;if(fe<=0){this._pagesCapability.resolve();return}for(let De=2;De<=H;++De){const We=V.getPage(De).then(Fe=>{const Ze=this._pages[De-1];Ze.pdfPage||Ze.setPdfPage(Fe),this.linkService.cachePageRef(De,Fe.ref),--fe===0&&this._pagesCapability.resolve()},Fe=>{console.error(`Unable to get page ${De} to initialize viewer`,Fe),--fe===0&&this._pagesCapability.resolve()});De%o.PAUSE_EAGER_PAGE_INIT===0&&await We}}),this.eventBus.dispatch("pagesinit",{source:this}),V.getMetadata().then(fe=>{let{info:be}=fe;V===this.pdfDocument&&be.Language&&(this.viewer.lang=be.Language)}),this.defaultRenderingQueue&&this.update()}).catch(ie=>{console.error("Unable to initialize viewer",ie),this._pagesCapability.reject(ie)})}setPageLabels(V){var H;if(this.pdfDocument){V?Array.isArray(V)&&this.pdfDocument.numPages===V.length?this._pageLabels=V:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let X=0,de=this._pages.length;X<de;X++)this._pages[X].setPageLabel(((H=this._pageLabels)==null?void 0:H[X])??null)}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=n.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,le(this,T,new v(r)),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromise=null,this._firstPageCapability=new i.PromiseCapability,this._onePageRenderedCapability=new i.PromiseCapability,this._pagesCapability=new i.PromiseCapability,this._scrollMode=n.ScrollMode.VERTICAL,this._previousScrollMode=n.ScrollMode.UNKNOWN,this._spreadMode=n.SpreadMode.NONE,le(this,ye,{previousPageNumber:1,scrollDown:!0,pages:[]}),this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),l(this,Pe)&&(document.removeEventListener("visibilitychange",l(this,Pe)),le(this,Pe,null)),this.viewer.textContent="",this._updateScrollMode(),this.viewer.removeAttribute("lang"),l(this,Y)&&(document.removeEventListener("copy",l(this,W)),le(this,W,null),l(this,Y).remove(),le(this,Y,null))}_scrollUpdate(){this.pagesCount!==0&&this.update()}pageLabelToPageNumber(V){if(!this._pageLabels)return null;const H=this._pageLabels.indexOf(V);return H<0?null:H+1}scrollPageIntoView(V){let{pageNumber:H,destArray:X=null,allowNegativeOffset:de=!1,ignoreDestinationZoom:Ee=!1}=V;if(!this.pdfDocument)return;const K=Number.isInteger(H)&&this._pages[H-1];if(!K){console.error(`scrollPageIntoView: "${H}" is not a valid pageNumber parameter.`);return}if(this.isInPresentationMode||!X){this._setCurrentPageNumber(H,!0);return}let U=0,ie=0,Ae=0,Se=0,we,Te;const Ne=K.rotation%180!==0,ke=(Ne?K.height:K.width)/K.scale/i.PixelsPerInch.PDF_TO_CSS_UNITS,Ue=(Ne?K.width:K.height)/K.scale/i.PixelsPerInch.PDF_TO_CSS_UNITS;let Be=0;switch(X[1].name){case"XYZ":U=X[2],ie=X[3],Be=X[4],U=U!==null?U:0,ie=ie!==null?ie:Ue;break;case"Fit":case"FitB":Be="page-fit";break;case"FitH":case"FitBH":ie=X[2],Be="page-width",ie===null&&this._location?(U=this._location.left,ie=this._location.top):(typeof ie!="number"||ie<0)&&(ie=Ue);break;case"FitV":case"FitBV":U=X[2],Ae=ke,Se=Ue,Be="page-height";break;case"FitR":U=X[2],ie=X[3],Ae=X[4]-U,Se=X[5]-ie;let ae=n.SCROLLBAR_PADDING,fe=n.VERTICAL_PADDING;this.removePageBorders&&(ae=fe=0),we=(this.container.clientWidth-ae)/Ae/i.PixelsPerInch.PDF_TO_CSS_UNITS,Te=(this.container.clientHeight-fe)/Se/i.PixelsPerInch.PDF_TO_CSS_UNITS,Be=Math.min(Math.abs(we),Math.abs(Te));break;default:console.error(`scrollPageIntoView: "${X[1].name}" is not a valid destination type.`);return}if(Ee||(Be&&Be!==this._currentScale?this.currentScaleValue=Be:this._currentScale===n.UNKNOWN_SCALE&&(this.currentScaleValue=n.DEFAULT_SCALE_VALUE)),Be==="page-fit"&&!X[4]){J(this,te,Yt).call(this,K);return}const re=[K.viewport.convertToViewportPoint(U,ie),K.viewport.convertToViewportPoint(U+Ae,ie+Se)];let C=Math.min(re[0][0],re[1][0]),G=Math.min(re[0][1],re[1][1]);de||(C=Math.max(C,0),G=Math.max(G,0)),J(this,te,Yt).call(this,K,{left:C,top:G})}_updateLocation(V){const H=this._currentScale,X=this._currentScaleValue,de=parseFloat(X)===H?Math.round(H*1e4)/100:X,Ee=V.id,K=this._pages[Ee-1],U=this.container,ie=K.getPagePoint(U.scrollLeft-V.x,U.scrollTop-V.y),Ae=Math.round(ie[0]),Se=Math.round(ie[1]);let we=`#page=${Ee}`;this.isInPresentationMode||(we+=`&zoom=${de},${Ae},${Se}`),this._location={pageNumber:Ee,scale:de,top:Se,left:Ae,rotation:this._pagesRotation,pdfOpenParams:we}}update(){const V=this._getVisiblePages(),H=V.views,X=H.length;if(X===0)return;const de=Math.max(r,2*X+1);l(this,T).resize(de,V.ids),this.renderingQueue.renderHighestPriority(V);const Ee=this._spreadMode===n.SpreadMode.NONE&&(this._scrollMode===n.ScrollMode.PAGE||this._scrollMode===n.ScrollMode.VERTICAL),K=this._currentPageNumber;let U=!1;for(const ie of H){if(ie.percent<100)break;if(ie.id===K&&Ee){U=!0;break}}this._setCurrentPageNumber(U?K:H[0].id),this._updateLocation(V.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(V){return this.container.contains(V)}focus(){this.container.focus()}get _isContainerRtl(){return getComputedStyle(this.container).direction==="rtl"}get isInPresentationMode(){return this.presentationModeState===n.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===n.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return this.isInPresentationMode?!1:this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return this.isInPresentationMode?!1:this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){const V=this._scrollMode===n.ScrollMode.PAGE?l(this,ye).pages:this._pages,H=this._scrollMode===n.ScrollMode.HORIZONTAL,X=H&&this._isContainerRtl;return(0,n.getVisibleElements)({scrollEl:this.container,views:V,sortByVisibility:!0,horizontal:H,rtl:X})}cleanup(){for(const V of this._pages)V.renderingState!==n.RenderingStates.FINISHED&&V.reset()}_cancelRendering(){for(const V of this._pages)V.cancelRendering()}forceRendering(V){const H=V||this._getVisiblePages(),X=J(this,ze,ni).call(this,H),de=this._spreadMode!==n.SpreadMode.NONE&&this._scrollMode!==n.ScrollMode.HORIZONTAL,Ee=this.renderingQueue.getHighestPriority(H,this._pages,X,de);return Ee?(J(this,Me,ti).call(this,Ee).then(()=>{this.renderingQueue.renderView(Ee)}),!0):!1}get hasEqualPageSizes(){const V=this._pages[0];for(let H=1,X=this._pages.length;H<X;++H){const de=this._pages[H];if(de.width!==V.width||de.height!==V.height)return!1}return!0}getPagesOverview(){let V;return this._pages.map(H=>{const X=H.pdfPage.getViewport({scale:1}),de=(0,n.isPortraitOrientation)(X);if(V===void 0)V=de;else if(this.enablePrintAutoRotate&&de!==V)return{width:X.height,height:X.width,rotation:(X.rotation-90)%360};return{width:X.width,height:X.height,rotation:X.rotation}})}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise?this._optionalContentConfigPromise:(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig()):Promise.resolve(null)}set optionalContentConfigPromise(V){if(!(V instanceof Promise))throw new Error(`Invalid optionalContentConfigPromise: ${V}`);this.pdfDocument&&this._optionalContentConfigPromise&&(this._optionalContentConfigPromise=V,this.refresh(!1,{optionalContentConfigPromise:V}),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:V}))}get scrollMode(){return this._scrollMode}set scrollMode(V){if(this._scrollMode!==V){if(!(0,n.isValidScrollMode)(V))throw new Error(`Invalid scroll mode: ${V}`);this.pagesCount>o.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=V,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:V}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;const H=this._scrollMode,X=this.viewer;X.classList.toggle("scrollHorizontal",H===n.ScrollMode.HORIZONTAL),X.classList.toggle("scrollWrapped",H===n.ScrollMode.WRAPPED),!(!this.pdfDocument||!V)&&(H===n.ScrollMode.PAGE?J(this,q,kt).call(this):this._previousScrollMode===n.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&J(this,ne,ot).call(this,this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(V,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(V){if(this._spreadMode!==V){if(!(0,n.isValidSpreadMode)(V))throw new Error(`Invalid spread mode: ${V}`);this._spreadMode=V,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:V}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!this.pdfDocument)return;const H=this.viewer,X=this._pages;if(this._scrollMode===n.ScrollMode.PAGE)J(this,q,kt).call(this);else if(H.textContent="",this._spreadMode===n.SpreadMode.NONE)for(const de of this._pages)H.append(de.div);else{const de=this._spreadMode-1;let Ee=null;for(let K=0,U=X.length;K<U;++K)Ee===null?(Ee=document.createElement("div"),Ee.className="spread",H.append(Ee)):K%2===de&&(Ee=Ee.cloneNode(!1),H.append(Ee)),Ee.append(X[K].div)}V&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&J(this,ne,ot).call(this,this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(V,!0),this.update())}_getPageAdvance(V){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;switch(this._scrollMode){case n.ScrollMode.WRAPPED:{const{views:X}=this._getVisiblePages(),de=new Map;for(const{id:Ee,y:K,percent:U,widthPercent:ie}of X){if(U===0||ie<100)continue;let Ae=de.get(K);Ae||de.set(K,Ae||(Ae=[])),Ae.push(Ee)}for(const Ee of de.values()){const K=Ee.indexOf(V);if(K===-1)continue;const U=Ee.length;if(U===1)break;if(H)for(let ie=K-1,Ae=0;ie>=Ae;ie--){const Se=Ee[ie],we=Ee[ie+1]-1;if(Se<we)return V-we}else for(let ie=K+1,Ae=U;ie<Ae;ie++){const Se=Ee[ie],we=Ee[ie-1]+1;if(Se>we)return we-V}if(H){const ie=Ee[0];if(ie<V)return V-ie+1}else{const ie=Ee[U-1];if(ie>V)return ie-V+1}break}break}case n.ScrollMode.HORIZONTAL:break;case n.ScrollMode.PAGE:case n.ScrollMode.VERTICAL:{if(this._spreadMode===n.SpreadMode.NONE)break;const X=this._spreadMode-1;if(H&&V%2!==X)break;if(!H&&V%2===X)break;const{views:de}=this._getVisiblePages(),Ee=H?V-1:V+1;for(const{id:K,percent:U,widthPercent:ie}of de)if(K===Ee){if(U>0&&ie===100)return 2;break}break}}return 1}nextPage(){const V=this._currentPageNumber,H=this.pagesCount;if(V>=H)return!1;const X=this._getPageAdvance(V,!1)||1;return this.currentPageNumber=Math.min(V+X,H),!0}previousPage(){const V=this._currentPageNumber;if(V<=1)return!1;const H=this._getPageAdvance(V,!0)||1;return this.currentPageNumber=Math.max(V-H,1),!0}increaseScale(){let{drawingDelay:V,scaleFactor:H,steps:X}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.pdfDocument)return;let de=this._currentScale;if(H>1)de=Math.round(de*H*100)/100;else{X??(X=1);do de=Math.ceil((de*n.DEFAULT_SCALE_DELTA).toFixed(2)*10)/10;while(--X>0&&de<n.MAX_SCALE)}J(this,ne,ot).call(this,Math.min(n.MAX_SCALE,de),{noScroll:!1,drawingDelay:V})}decreaseScale(){let{drawingDelay:V,scaleFactor:H,steps:X}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.pdfDocument)return;let de=this._currentScale;if(H>0&&H<1)de=Math.round(de*H*100)/100;else{X??(X=1);do de=Math.floor((de/n.DEFAULT_SCALE_DELTA).toFixed(2)*10)/10;while(--X>0&&de>n.MIN_SCALE)}J(this,ne,ot).call(this,Math.max(n.MIN_SCALE,de),{noScroll:!1,drawingDelay:V})}get containerTopLeft(){return l(this,Q)||le(this,Q,[this.container.offsetTop,this.container.offsetLeft])}get annotationEditorMode(){return l(this,I)?l(this,D):i.AnnotationEditorType.DISABLE}set annotationEditorMode(V){let{mode:H,editId:X=null}=V;if(!l(this,I))throw new Error("The AnnotationEditor is not enabled.");if(l(this,D)!==H){if(!m(H))throw new Error(`Invalid AnnotationEditor mode: ${H}`);this.pdfDocument&&(le(this,D,H),this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:H}),l(this,I).updateMode(H,X))}}set annotationEditorParams(V){let{type:H,value:X}=V;if(!l(this,I))throw new Error("The AnnotationEditor is not enabled.");l(this,I).updateParams(H,X)}refresh(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object.create(null);if(this.pdfDocument){for(const X of this._pages)X.update(H);l(this,L)!==null&&(clearTimeout(l(this,L)),le(this,L,null)),V||this.update()}}}T=new WeakMap,S=new WeakMap,D=new WeakMap,I=new WeakMap,_=new WeakMap,Q=new WeakMap,W=new WeakMap,j=new WeakMap,he=new WeakMap,Y=new WeakMap,z=new WeakMap,ee=new WeakMap,oe=new WeakMap,ye=new WeakMap,Pe=new WeakMap,L=new WeakMap,P=new WeakMap,M=new WeakSet,Jr=function(){const V=this;return{get annotationEditorUIManager(){return l(V,I)},get annotationStorage(){var H;return(H=V.pdfDocument)==null?void 0:H.annotationStorage},get downloadManager(){return V.downloadManager},get enableScripting(){return!!V._scriptingManager},get fieldObjectsPromise(){var H;return(H=V.pdfDocument)==null?void 0:H.getFieldObjects()},get findController(){return V.findController},get hasJSActionsPromise(){var H;return(H=V.pdfDocument)==null?void 0:H.hasJSActions()},get linkService(){return V.linkService}}},R=new WeakSet,Qr=function(V){const H={annotationEditorMode:l(this,D),annotationMode:l(this,_),textLayerMode:l(this,P)};return V&&(!V.includes(i.PermissionFlag.COPY)&&l(this,P)===n.TextLayerMode.ENABLE&&(H.textLayerMode=n.TextLayerMode.ENABLE_PERMISSIONS),V.includes(i.PermissionFlag.MODIFY_CONTENTS)||(H.annotationEditorMode=i.AnnotationEditorType.DISABLE),!V.includes(i.PermissionFlag.MODIFY_ANNOTATIONS)&&!V.includes(i.PermissionFlag.FILL_INTERACTIVE_FORMS)&&l(this,_)===i.AnnotationMode.ENABLE_FORMS&&(H.annotationMode=i.AnnotationMode.ENABLE)),H},B=new WeakSet,Zr=function(){if(document.visibilityState==="hidden"||!this.container.offsetParent||this._getVisiblePages().views.length===0)return Promise.resolve();const V=new Promise(H=>{le(this,Pe,()=>{document.visibilityState==="hidden"&&(H(),document.removeEventListener("visibilitychange",l(this,Pe)),le(this,Pe,null))}),document.addEventListener("visibilitychange",l(this,Pe))});return Promise.race([this._onePageRenderedCapability.promise,V])},Z=new WeakSet,jr=function(V,H){const X=document.getSelection(),{focusNode:de,anchorNode:Ee}=X;if(Ee&&de&&X.containsNode(l(this,Y))){if(l(this,he)||V===n.TextLayerMode.ENABLE_PERMISSIONS){H.preventDefault(),H.stopPropagation();return}le(this,he,!0);const K=this.container.style.cursor;this.container.style.cursor="wait";const U=ie=>le(this,z,ie.key==="Escape");window.addEventListener("keydown",U),this.getAllText().then(async ie=>{ie!==null&&await navigator.clipboard.writeText(ie)}).catch(ie=>{console.warn(`Something goes wrong when extracting the text: ${ie.message}`)}).finally(()=>{le(this,he,!1),le(this,z,!1),window.removeEventListener("keydown",U),this.container.style.cursor=K}),H.preventDefault(),H.stopPropagation()}},q=new WeakSet,kt=function(){if(this._scrollMode!==n.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");const V=this._currentPageNumber,H=l(this,ye),X=this.viewer;if(X.textContent="",H.pages.length=0,this._spreadMode===n.SpreadMode.NONE&&!this.isInPresentationMode){const de=this._pages[V-1];X.append(de.div),H.pages.push(de)}else{const de=new Set,Ee=this._spreadMode-1;Ee===-1?de.add(V-1):V%2!==Ee?(de.add(V-1),de.add(V)):(de.add(V-2),de.add(V-1));const K=document.createElement("div");if(K.className="spread",this.isInPresentationMode){const U=document.createElement("div");U.className="dummyPage",K.append(U)}for(const U of de){const ie=this._pages[U];ie&&(K.append(ie.div),H.pages.push(ie))}X.append(K)}H.scrollDown=V>=H.previousPageNumber,H.previousPageNumber=V},te=new WeakSet,Yt=function(V){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const{div:X,id:de}=V;if(this._currentPageNumber!==de&&this._setCurrentPageNumber(de),this._scrollMode===n.ScrollMode.PAGE&&(J(this,q,kt).call(this),this.update()),!H&&!this.isInPresentationMode){const Ee=X.offsetLeft+X.clientLeft,K=Ee+X.clientWidth,{scrollLeft:U,clientWidth:ie}=this.container;(this._scrollMode===n.ScrollMode.HORIZONTAL||Ee<U||K>U+ie)&&(H={left:0,top:0})}(0,n.scrollIntoView)(X,H),!this._currentScaleValue&&this._location&&(this._location=null)},ve=new WeakSet,qr=function(V){return V===this._currentScale||Math.abs(V-this._currentScale)<1e-15},Oe=new WeakSet,Qn=function(V,H,X){let{noScroll:de=!1,preset:Ee=!1,drawingDelay:K=-1}=X;if(this._currentScaleValue=H.toString(),J(this,ve,qr).call(this,V)){Ee&&this.eventBus.dispatch("scalechanging",{source:this,scale:V,presetValue:H});return}this.viewer.style.setProperty("--scale-factor",V*i.PixelsPerInch.PDF_TO_CSS_UNITS);const U=K>=0&&K<1e3;if(this.refresh(!0,{scale:V,drawingDelay:U?K:-1}),U&&le(this,L,setTimeout(()=>{le(this,L,null),this.refresh()},K)),this._currentScale=V,!de){let ie=this._currentPageNumber,Ae;this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)&&(ie=this._location.pageNumber,Ae=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:ie,destArray:Ae,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:V,presetValue:Ee?H:void 0}),this.defaultRenderingQueue&&this.update()},Le=new WeakSet,ei=function(){return this._spreadMode!==n.SpreadMode.NONE&&this._scrollMode!==n.ScrollMode.HORIZONTAL?2:1},ne=new WeakSet,ot=function(V,H){let X=parseFloat(V);if(X>0)H.preset=!1,J(this,Oe,Qn).call(this,X,V,H);else{const de=this._pages[this._currentPageNumber-1];if(!de)return;let Ee=n.SCROLLBAR_PADDING,K=n.VERTICAL_PADDING;this.isInPresentationMode?(Ee=K=4,this._spreadMode!==n.SpreadMode.NONE&&(Ee*=2)):this.removePageBorders?Ee=K=0:this._scrollMode===n.ScrollMode.HORIZONTAL&&([Ee,K]=[K,Ee]);const U=(this.container.clientWidth-Ee)/de.width*de.scale/l(this,Le,ei),ie=(this.container.clientHeight-K)/de.height*de.scale;switch(V){case"page-actual":X=1;break;case"page-width":X=U;break;case"page-height":X=ie;break;case"page-fit":X=Math.min(U,ie);break;case"auto":const Ae=(0,n.isPortraitOrientation)(de)?U:Math.min(ie,U);X=Math.min(n.MAX_AUTO_SCALE,Ae);break;default:console.error(`#setScale: "${V}" is an unknown zoom value.`);return}H.preset=!0,J(this,Oe,Qn).call(this,X,V,H)}},ge=new WeakSet,Zn=function(){const V=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&J(this,ne,ot).call(this,this._currentScaleValue,{noScroll:!0}),J(this,te,Yt).call(this,V)},Me=new WeakSet,ti=async function(V){var H,X;if(V.pdfPage)return V.pdfPage;try{const de=await this.pdfDocument.getPage(V.id);return V.pdfPage||V.setPdfPage(de),(X=(H=this.linkService)._cachedPageNumber)!=null&&X.call(H,de.ref)||this.linkService.cachePageRef(V.id,de.ref),de}catch(de){return console.error("Unable to get page for page view",de),null}},ze=new WeakSet,ni=function(V){var H,X;if(((H=V.first)==null?void 0:H.id)===1)return!0;if(((X=V.last)==null?void 0:X.id)===this.pagesCount)return!1;switch(this._scrollMode){case n.ScrollMode.PAGE:return l(this,ye).scrollDown;case n.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down},He=new WeakSet,jn=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.container.clientHeight;V!==l(this,ee)&&(le(this,ee,V),n.docStyle.setProperty("--viewer-container-height",`${V}px`))},Xe=new WeakSet,ri=function(V){for(const H of V)if(H.target===this.container){J(this,He,jn).call(this,Math.floor(H.borderBoxSize[0].blockSize)),le(this,Q,null);break}},g.PDFViewer=A},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFRenderingQueue=void 0;var i=e(107),n=e(97);const d=3e4;class h{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1,Object.defineProperty(this,"hasViewer",{value:()=>!!this.pdfViewer})}setViewer(a){this.pdfViewer=a}setThumbnailViewer(a){this.pdfThumbnailViewer=a}isHighestPriority(a){return this.highestPriorityPage===a.renderingId}renderHighestPriority(a){var r;this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),!this.pdfViewer.forceRendering(a)&&(this.isThumbnailViewEnabled&&((r=this.pdfThumbnailViewer)!=null&&r.forceRendering())||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),d)))}getHighestPriority(a,r,o){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;const v=a.views,A=v.length;if(A===0)return null;for(let T=0;T<A;T++){const S=v[T].view;if(!this.isViewFinished(S))return S}const b=a.first.id,c=a.last.id;if(c-b+1>A){const T=a.ids;for(let S=1,D=c-b;S<D;S++){const I=o?b+S:c-S;if(T.has(I))continue;const _=r[I-1];if(!this.isViewFinished(_))return _}}let s=o?c:b-2,x=r[s];return x&&!this.isViewFinished(x)||m&&(s+=o?1:-1,x=r[s],x&&!this.isViewFinished(x))?x:null}isViewFinished(a){return a.renderingState===n.RenderingStates.FINISHED}renderView(a){switch(a.renderingState){case n.RenderingStates.FINISHED:return!1;case n.RenderingStates.PAUSED:this.highestPriorityPage=a.renderingId,a.resume();break;case n.RenderingStates.RUNNING:this.highestPriorityPage=a.renderingId;break;case n.RenderingStates.INITIAL:this.highestPriorityPage=a.renderingId,a.draw().finally(()=>{this.renderHighestPriority()}).catch(r=>{r instanceof i.RenderingCancelledException||console.error(`renderView: "${r}"`)});break}return!0}}g.PDFRenderingQueue=h}],p={};function y(u){var g=p[u];if(g!==void 0)return g.exports;var e=p[u]={exports:{}};return t[u].call(e.exports,e,e.exports,y),e.exports}var k={};return(()=>{var u=k;Object.defineProperty(u,"__esModule",{value:!0}),Object.defineProperty(u,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return n.AnnotationLayerBuilder}}),Object.defineProperty(u,"DownloadManager",{enumerable:!0,get:function(){return d.DownloadManager}}),Object.defineProperty(u,"EventBus",{enumerable:!0,get:function(){return h.EventBus}}),Object.defineProperty(u,"FindState",{enumerable:!0,get:function(){return g.FindState}}),Object.defineProperty(u,"GenericL10n",{enumerable:!0,get:function(){return f.GenericL10n}}),Object.defineProperty(u,"LinkTarget",{enumerable:!0,get:function(){return e.LinkTarget}}),Object.defineProperty(u,"NullL10n",{enumerable:!0,get:function(){return a.NullL10n}}),Object.defineProperty(u,"PDFFindController",{enumerable:!0,get:function(){return g.PDFFindController}}),Object.defineProperty(u,"PDFHistory",{enumerable:!0,get:function(){return r.PDFHistory}}),Object.defineProperty(u,"PDFLinkService",{enumerable:!0,get:function(){return e.PDFLinkService}}),Object.defineProperty(u,"PDFPageView",{enumerable:!0,get:function(){return o.PDFPageView}}),Object.defineProperty(u,"PDFScriptingManager",{enumerable:!0,get:function(){return m.PDFScriptingManager}}),Object.defineProperty(u,"PDFSinglePageViewer",{enumerable:!0,get:function(){return v.PDFSinglePageViewer}}),Object.defineProperty(u,"PDFViewer",{enumerable:!0,get:function(){return A.PDFViewer}}),Object.defineProperty(u,"ProgressBar",{enumerable:!0,get:function(){return i.ProgressBar}}),Object.defineProperty(u,"RenderingStates",{enumerable:!0,get:function(){return i.RenderingStates}}),Object.defineProperty(u,"ScrollMode",{enumerable:!0,get:function(){return i.ScrollMode}}),Object.defineProperty(u,"SimpleLinkService",{enumerable:!0,get:function(){return e.SimpleLinkService}}),Object.defineProperty(u,"SpreadMode",{enumerable:!0,get:function(){return i.SpreadMode}}),Object.defineProperty(u,"StructTreeLayerBuilder",{enumerable:!0,get:function(){return b.StructTreeLayerBuilder}}),Object.defineProperty(u,"TextLayerBuilder",{enumerable:!0,get:function(){return c.TextLayerBuilder}}),Object.defineProperty(u,"XfaLayerBuilder",{enumerable:!0,get:function(){return s.XfaLayerBuilder}}),Object.defineProperty(u,"parseQueryString",{enumerable:!0,get:function(){return i.parseQueryString}});var g=y(1),e=y(108),i=y(97),n=y(124),d=y(126),h=y(127),f=y(128),a=y(125),r=y(130),o=y(131),m=y(139),v=y(142),A=y(143),b=y(134),c=y(137),s=y(138)})(),k})())})(pdf_viewer);var pdf_viewerExports=pdf_viewer.exports;const pdf="",PDFWorker={create(){return refWorker("pdf.worker.js").defaults(()=>new Worker(new URL(""+new URL("pdf.worker-2ce04d0b.js",import.meta.url).href,self.location),{type:"module"}))}},_withScopeId=N=>(pushScopeId("data-v-9bad3887"),N=N(),popScopeId(),N),_hoisted_1={class:"container"},_hoisted_2={class:"pdf_down"},_hoisted_3=_withScopeId(()=>createBaseVNode("div",{id:"viewer",class:"pdfViewer"},null,-1)),_hoisted_4=[_hoisted_3],_sfc_main=defineComponent({__name:"PdfView",props:{data:{}},setup(N){const w=N,t=ref(null),p={viewer:null,search:"",pdf_scale:1};!pdfExports.GlobalWorkerOptions.workerPort&&typeof window<"u"&&"Worker"in window&&(pdfExports.GlobalWorkerOptions.workerPort=PDFWorker.create()),(()=>{async function u(){if(!t.value)return;const g=new pdf_viewerExports.EventBus,e=new pdf_viewerExports.PDFLinkService({eventBus:g}),i=new pdf_viewerExports.PDFFindController({eventBus:g,linkService:e,updateMatchesCountOnProgress:!0}),n=new pdf_viewerExports.PDFViewer({container:t.value,eventBus:g,linkService:e,findController:i,l10n:new pdf_viewerExports.GenericL10n("zh-CN")});e.setViewer(n),g.on("pagesinit",()=>{var a;const f=(a=n.getPageView(0))==null?void 0:a.viewport;(f==null?void 0:f.width)>window.innerWidth?n.currentScaleValue="0.5":n.currentScaleValue="1"});const h=await pdfExports.getDocument({data:w.data,cMapUrl:`https://npm.onmicrosoft.cn/pdfjs-dist@${pdfExports.version}/cmaps/`,useWorkerFetch:!0,cMapPacked:!0,enableXfa:!0}).promise;n.setDocument(h),e.setDocument(h,null),p.viewer=n}onMounted(u)})();function y(){if(!p.viewer)return;const u=p.viewer.currentScale;let g=0;window.screen.width>1440?g=1.4:g=1.2,!(u>=g)&&(p.viewer.currentScale=u+.1)}function k(){if(!p.viewer)return;const u=p.viewer.currentScale;u<=.5||(p.viewer.currentScale=u-.1)}return(u,g)=>(openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("div",{class:"pdf_set_left",onClick:g[0]||(g[0]=e=>y())},""),createBaseVNode("div",{class:"pdf_set_middle",onClick:g[1]||(g[1]=e=>k())},"")]),createBaseVNode("div",{ref_key:"container",ref:t,class:"pdf-wrapper"},_hoisted_4,512)]))}}),PdfView_vue_vue_type_style_index_0_scoped_9bad3887_lang="",PdfView=_export_sfc(_sfc_main,[["__scopeId","data-v-9bad3887"]]);export{PdfView as default};