PageSourceSearch

https://www.goperceval.fr/_next/static/chunks/906a09f8.447f88bed3108a6d.js

js goperceval.fr collected 2026-10-04 17:44:36 UTC 362,820 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[824],{178783:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(734155),Buffer=__webpack_require__(348764).lW,root,factory;root=globalThis,factory=()=>(()=>{"use strict";var __webpack_modules__=[,(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VerbosityLevel=e.Util=e.UnknownErrorException=e.UnexpectedResponseException=e.TextRenderingMode=e.RenderingIntentFlag=e.PromiseCapability=e.PermissionFlag=e.PasswordResponses=e.PasswordException=e.PageActionEventType=e.OPS=e.MissingPDFException=e.MAX_IMAGE_SIZE_TO_CACHE=e.LINE_FACTOR=e.LINE_DESCENT_FACTOR=e.InvalidPDFException=e.ImageKind=e.IDENTITY_MATRIX=e.FormatError=e.FeatureTest=e.FONT_IDENTITY_MATRIX=e.DocumentActionEventType=e.CMapCompressionType=e.BaseException=e.BASELINE_FACTOR=e.AnnotationType=e.AnnotationReplyType=e.AnnotationPrefix=e.AnnotationMode=e.AnnotationFlag=e.AnnotationFieldFlag=e.AnnotationEditorType=e.AnnotationEditorPrefix=e.AnnotationEditorParamsType=e.AnnotationBorderStyleType=e.AnnotationActionEventType=e.AbortException=void 0,e.assert=function(t,e){t||o(e)},e.bytesToString=d,e.createValidAbsoluteUrl=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(i&&"string"===typeof t&&(i.addDefaultProtocol&&t.startsWith("www.")&&t.match(/\./g)?.length>=2&&(t=`http://${t}`),i.tryConvertEncoding))try{t=f(t)}catch{}const n=e?new URL(t,e):new URL(t);if(l(n))return n}catch{}return null},e.getModificationDate=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;const e=[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")];return e.join("")},e.getUuid=function(){if("undefined"!==typeof crypto&&"function"===typeof crypto?.randomUUID)return crypto.randomUUID();const t=new Uint8Array(32);if("undefined"!==typeof crypto&&"function"===typeof crypto?.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<32;e++)t[e]=Math.floor(255*Math.random());return d(t)},e.getVerbosityLevel=function(){return s},e.info=function(t){s>=r.INFOS&&console.log(`Info: ${t}`)},e.isArrayBuffer=function(t){return"object"===typeof t&&void 0!==t?.byteLength},e.isArrayEqual=function(t,e){if(t.length!==e.length)return!1;for(let i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0},e.isNodeJS=void 0,e.normalizeUnicode=function(t){return m||(m=/([\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,b=new Map([["\ufb05","\u017ft"]])),t.replaceAll(m,((t,e,i)=>e?e.normalize("NFKC"):b.get(i)))},e.objectFromMap=function(t){const e=Object.create(null);for(const[i,n]of t)e[i]=n;return e},e.objectSize=function(t){return Object.keys(t).length},e.setVerbosityLevel=function(t){Number.isInteger(t)&&(s=t)},e.shadow=c,e.string32=function(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)},e.stringToBytes=u,e.stringToPDFString=function(t){if(t[0]>="\xef"){let e;if("\xfe"===t[0]&&"\xff"===t[1]?e="utf-16be":"\xff"===t[0]&&"\xfe"===t[1]?e="utf-16le":"\xef"===t[0]&&"\xbb"===t[1]&&"\xbf"===t[2]&&(e="utf-8"),e)try{const i=new TextDecoder(e,{fatal:!0}),n=u(t);return i.decode(n)}catch(i){a(`stringToPDFString: "${i}".`)}}const e=[];for(let n=0,r=t.length;n<r;n++){const i=g[t.charCodeAt(n)];e.push(i?String.fromCharCode(i):t.charAt(n))}return e.join("")},e.stringToUTF8String=f,e.unreachable=o,e.utf8StringToString=function(t){return unescape(encodeURIComponent(t))},e.warn=a,i(2),i(84),i(86),i(87),i(89),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);const n="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);e.isNodeJS=n,e.IDENTITY_MATRIX=[1,0,0,1,0,0],e.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],e.MAX_IMAGE_SIZE_TO_CACHE=1e7,e.LINE_FACTOR=1.35,e.LINE_DESCENT_FACTOR=.35,e.BASELINE_FACTOR=.25925925925925924,e.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OP
1LIST:256},e.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},e.AnnotationEditorPrefix="pdfjs_internal_editor_",e.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15},e.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},e.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},e.TextRenderingMode={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},e.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},e.AnnotationType={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},e.AnnotationReplyType={GROUP:"Group",REPLY:"R"},e.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},e.AnnotationFieldFlag={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},e.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},e.AnnotationActionEventType={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"},e.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},e.PageActionEventType={O:"PageOpen",C:"PageClose"};const r={ERRORS:0,WARNINGS:1,INFOS:5};e.VerbosityLevel=r,e.CMapCompressionType={NONE:0,BINARY:1},e.OPS={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},e.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let s=r.WARNINGS;function a(t){s>=r.WARNINGS&&console.log(`Warning: ${t}`)}function o(t){throw new Error(t)}function l(t){switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function c(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(t,e,{value:i,enumerable:!n,configurable:!0,writable:!1}),i}const h=function(){function t(e,i){this.constructor===t&&o("Cannot initialize BaseException."),this.message=e,this.name=i}return t.prototype=new Error,t.constructor=t,t}();function d(t){"object"===typeof t&&void 0!==t?.length||o("Invalid argument for bytesToString");const e=t.length,i=8192;if(e<i)return String.fromCharCode.apply(null,t);const n=[];for(let r=0;r<e;r+=i){const s=Math.min(r+i,e),a=t.subarray(r,s);n.push(String.fromCharCode.apply(null,a))}return n.join("")}function u(t){"string"!==typeof t&&o("Invalid argument for stringToBytes");const e=t.length,i=new Uint8Array(e);for(let n=0;n<e;++n)i[n]=255&t.charCodeAt(n);return i}e.BaseException=h,e.PasswordException=class extends h{constructor(t,e){super(t,"PasswordException"),this.code=e}},e.UnknownErrorException=class extends h{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}},e.InvalidPDFException=class extends h{constructor(t){super(t,"InvalidPDFException")}},e.MissingPDFException=class extends h{constructor(t){super(t,"MissingPDFException")}},e.UnexpectedResponseException=class extends h{constructor(t,e){super(t,"UnexpectedResponseException"),this.status=e}},e.FormatError=class extends h{constructor(t){super(t,"FormatError")}},e.AbortException=class extends h{constructor(t){super(t,"AbortException")}},e.FeatureTest=class{static get isLittleEndian(){return c(this,"isLittleEndian",function(){const t=new Uint8Array(4);return t[0]=1,1===new Uint32Array(t.buffer,0,1)[0]}())}static get isEvalSupported(){return c(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return c(this,"isOffscreenCanvasSupported","undefined"!==typeof OffscreenCanvas)}static get platform(){return"undefined"===typeof navigator?c(this,"platform",{isWin:!1,isMac:!1}):c(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return c(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}};const p=[...Array(256).keys()].map((t=>t.toString(16).padStart(2,"0")));e.Util=class{static makeHexColor(t,e,i){return`#${p[t]}${p[e]}${p[i]}`}static scaleMinMax(t,e){let i;t[0]?(t[0]<0&&(i=e[0],e[0]=e[1],e[1]=i),e[0]*=t[0],e[1]*=t[0],t[3]<0&&(i=e[2],e[2]=e[3],e[3]=i),e[2]*=t[3],e[3]*=t[3]):(i=e[0],e[0]=e[2],e[2]=i,i=e[1],e[1]=e[3],e[3]=i,t[1]<0&&(i=e[2],e[2]=e[3],e[3]=i),e[2]*=t[1],e[3]*=t[1],t[2]<0&&(i=e[0],e[0]=e[1],e[1]=i),e[0]*=t[2],e[1]*=t[2]),e[0]+=t[4],e[1]+=t[4],e[2]+=t[5],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){const i=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/i,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/i]}static getAxialAlignedBoundingBox(t,e){const i=this.applyTransform(t,e),n=this.applyTransform(t.slice(2,4),e),r=this.applyTransform([t[0],t[3]],e),s=this.applyTransform([t[2],t[1]],e);return[Math.min(i[0],n[0],r[0],s[0]),Math.min(i[1],n[1],r[1],s[1]),Math.max(i[0],n[0],r[0],s[0]),Math.max(i[1],n[1],r[1],s[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],i=t[0]*e[0]+t[1]*e[2],n=t[0]*e[1]+t[1]*e[3],r=t[2]*e[0]+t[3]*e[2],s=t[2]*e[1]+t[3]*e[3],a=(i+s)/2,o=Math.sqrt((i+s)**2-4*(i*s-r*n))/2,l=a+o||1,c=a-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const i=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),n=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(i>n)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),s=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>s?null:[i,r,n,s]}static bezierBoundingBox(t,e,i,n,r,s,a,o){const l=[],c=[[],[]];let h,d,u,p,g,f,m,b;for(let A=0;A<2;++A)if(0===A?(d=6*t-12*i+6*r,h=-3*t+9*i-9*r+3*a,u=3*i-3*t):(d=6*e-12*n+6*s,h=-3*e+9*n-9*s+3*o,u=3*n-3*e),Math.abs(h)<1e-12){if(Math.abs(d)<1e-12)continue;p=-u/d,0<p&&p<1&&l.push(p)}else m=d*d-4*u*h,b=Math.sqrt(m),m<0||(g=(-d+b)/(2*h),0<g&&g<1&&l.push(g),f=(-d-b)/(2*h),0<f&&f<1&&l.push(f));let v,_=l.length;const y=_;for(;_--;)p=l[_],v=1-p,c[0][_]=v*v*v*t+3*v*v*p*i+3*v*p*p*r+p*p*p*a,c[1][_]=v*v*v*e+3*v*v*p*n+3*v*p*p*s+p*p*p*o;
1return c[0][y]=t,c[1][y]=e,c[0][y+1]=a,c[1][y+1]=o,c[0].length=c[1].length=y+2,[Math.min(...c[0]),Math.min(...c[1]),Math.max(...c[0]),Math.max(...c[1])]}};const g=[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 f(t){return decodeURIComponent(escape(t))}e.PromiseCapability=class{#t=!1;constructor(){this.promise=new Promise(((t,e)=>{this.resolve=e=>{this.#t=!0,t(e)},this.reject=t=>{this.#t=!0,e(t)}}))}get settled(){return this.#t}};let m=null,b=null;e.AnnotationPrefix="pdfjs_internal_id_"},(t,e,i)=>{var n=i(3),r=i(4),s=i(69),a=i(70),o="WebAssembly",l=r.WebAssembly,c=7!==Error("e",{cause:7}).cause,h=function(t,e){var i={};i[t]=a(t,e,c),n({global:!0,constructor:!0,arity:1,forced:c},i)},d=function(t,e){if(l&&l[t]){var i={};i[t]=a("WebAssembly."+t,e,c),n({target:o,stat:!0,constructor:!0,arity:1,forced:c},i)}};h("Error",(function(t){return function(e){return s(t,this,arguments)}})),h("EvalError",(function(t){return function(e){return s(t,this,arguments)}})),h("RangeError",(function(t){return function(e){return s(t,this,arguments)}})),h("ReferenceError",(function(t){return function(e){return s(t,this,arguments)}})),h("SyntaxError",(function(t){return function(e){return s(t,this,arguments)}})),h("TypeError",(function(t){return function(e){return s(t,this,arguments)}})),h("URIError",(function(t){return function(e){return s(t,this,arguments)}})),d("CompileError",(function(t){return function(e){return s(t,this,arguments)}})),d("LinkError",(function(t){return function(e){return s(t,this,arguments)}})),d("RuntimeError",(function(t){return function(e){return s(t,this,arguments)}}))},(t,e,i)=>{var n=i(4),r=i(5).f,s=i(44),a=i(48),o=i(38),l=i(56),c=i(68);t.exports=function(t,e){var i,h,d,u,p,g=t.target,f=t.global,m=t.stat;if(i=f?n:m?n[g]||o(g,{}):(n[g]||{}).prototype)for(h in e){if(u=e[h],d=t.dontCallGetSet?(p=r(i,h))&&p.value:i[h],!c(f?h:g+(m?".":"#")+h,t.forced)&&void 0!==d){if(typeof u==typeof d)continue;l(u,d)}(t.sham||d&&d.sham)&&s(u,"sham",!0),a(i,h,u,t)}}},function(t){var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof __webpack_require__.g&&__webpack_require__.g)||function(){return this}()||this||Function("return this")()},(t,e,i)=>{var n=i(6),r=i(8),s=i(10),a=i(11),o=i(12),l=i(18),c=i(39),h=i(42),d=Object.getOwnPropertyDescriptor;e.f=n?d:function(t,e){if(t=o(t),e=l(e),h)try{return d(t,e)}catch(i){}if(c(t,e))return a(!r(s.f,t,e),t[e])}},(t,e,i)=>{var n=i(7);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(e){return!0}}},(t,e,i)=>{var n=i(9),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},(t,e,i)=>{var n=i(7);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},(t,e)=>{var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!i.call({1:2},1);e.f=r?function(t){var e=n(this,t);return!!e&&e.enumerable}:i},t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},(t,e,i)=>{var n=i(13),r=i(16);t.exports=function(t){return n(r(t))}},(t,e,i)=>{var n=i(14),r=i(7),s=i(15),a=Object,o=n("".split);t.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?o(t,""):a(t)}:a},(t,e,i)=>{var n=i(9),r=Function.prototype,s=r.call,a=n&&r.bind.bind(s,s);t.exports=n?a:function(t){return function(){return s.apply(t,arguments)}}},(t,e,i)=>{var n=i(14),r=n({}.toString),s=n("".slice);t.exports=function(t){return s(r(t),8,-1)}},(t,e,i)=>{var n=i(17),r=TypeError;t.exports=function(t){if(n(t))throw r("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null===t||void 0===t}},(t,e,i)=>{var n=i(19),r=i(23);t.exports=function(t){var e=n(t,"string");return r(e)?e:e+""}},(t,e,i)=>{var n=i(8),r=i(20),s=i(23),a=i(30),o=i(33),l=i(34),c=TypeError,h=l("toPrimitive");t.exports=function(t,e){if(!r(t)||s(t))return t;var i,l=a(t,h);if(l){if(void 0===e&&(e="default"),i=n(l,t,e),!r(i)||s(i))return i;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),o(t,e)}},(t,e,i)=>{var n=i(21),r=i(22),s=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===s}:function(t){return"object"==typeof t?null!==t:n(t)}},(t,e,i)=>{var n=i(22),r=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},t=>
vendor: 8,643 bytes, line 1
1{var e="object"==typeof document&&document.all,i="undefined"==typeof e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:i}},(t,e,i)=>{var n=i(24),r=i(21),s=i(25),a=i(26),o=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return r(e)&&s(e.prototype,o(t))}},(t,e,i)=>{var n=i(4),r=i(21),s=function(t){return r(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?s(n[t]):n[t]&&n[t][e]}},(t,e,i)=>{var n=i(14);t.exports=n({}.isPrototypeOf)},(t,e,i)=>{var n=i(27);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,e,i)=>{var n=i(28),r=i(7),s=i(4).String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},(t,e,i)=>{var n,r,s=i(4),a=i(29),o=s.process,l=s.Deno,c=o&&o.versions||l&&l.version,h=c&&c.v8;h&&(r=(n=h.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(r=+n[1]),t.exports=r},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,e,i)=>{var n=i(31),r=i(17);t.exports=function(t,e){var i=t[e];return r(i)?void 0:n(i)}},(t,e,i)=>{var n=i(21),r=i(32),s=TypeError;t.exports=function(t){if(n(t))return t;throw s(r(t)+" is not a function")}},t=>{var e=String;t.exports=function(t){try{return e(t)}catch(i){return"Object"}}},(t,e,i)=>{var n=i(8),r=i(21),s=i(20),a=TypeError;t.exports=function(t,e){var i,o;if("string"===e&&r(i=t.toString)&&!s(o=n(i,t)))return o;if(r(i=t.valueOf)&&!s(o=n(i,t)))return o;if("string"!==e&&r(i=t.toString)&&!s(o=n(i,t)))return o;throw a("Can't convert object to primitive value")}},(t,e,i)=>{var n=i(4),r=i(35),s=i(39),a=i(41),o=i(27),l=i(26),c=n.Symbol,h=r("wks"),d=l?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return s(h,t)||(h[t]=o&&s(c,t)?c[t]:d("Symbol."+t)),h[t]}},(t,e,i)=>{var n=i(36),r=i(37);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.2",mode:n?"pure":"global",copyright:"\xa9 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"})},t=>{t.exports=!1},(t,e,i)=>{var n=i(4),r=i(38),s="__core-js_shared__",a=n[s]||r(s,{});t.exports=a},(t,e,i)=>{var n=i(4),r=Object.defineProperty;t.exports=function(t,e){try{r(n,t,{value:e,configurable:!0,writable:!0})}catch(i){n[t]=e}return e}},(t,e,i)=>{var n=i(14),r=i(40),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(r(t),e)}},(t,e,i)=>{var n=i(16),r=Object;t.exports=function(t){return r(n(t))}},(t,e,i)=>{var n=i(14),r=0,s=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++r+s,36)}},(t,e,i)=>{var n=i(6),r=i(7),s=i(43);t.exports=!n&&!r((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},(t,e,i)=>{var n=i(4),r=i(20),s=n.document,a=r(s)&&r(s.createElement);t.exports=function(t){return a?s.createElement(t):{}}},(t,e,i)=>{var n=i(6),r=i(45),s=i(11);t.exports=n?function(t,e,i){return r.f(t,e,s(1,i))}:function(t,e,i){return t[e]=i,t}},(t,e,i)=>{var n=i(6),r=i(42),s=i(46),a=i(47),o=i(18),l=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d="enumerable",u="configurable",p="writable";e.f=n?s?function(t,e,i){if(a(t),e=o(e),a(i),"function"===typeof t&&"prototype"===e&&"value"in i&&p in i&&!i.writable){var n=h(t,e);n&&n.writable&&(t[e]=i.value,i={configurable:u in i?i.configurable:n.configurable,enumerable:d in i?i.enumerable:n.enumerable,writable:!1})}return c(t,e,i)}:c:function(t,e,i){if(a(t),e=o(e),a(i),r)try{return c(t,e,i)}catch(n){}if("get"in i||"set"in i)throw l("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},(t,e,i)=>{var n=i(6),r=i(7);t.exports=n&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,e,i)=>{var n=i(20),r=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw s(r(t)+" is not an object")}},(t,e,i)=>{var n=i(21),r=i(45),s=i(49),a=i(38);t.exports=function(t,e,i,o){o||(o={});var l=o.enumerable,c=void 0!==o.name?o.name:e;if(n(i)&&s(i,c,o),o.global)l?t[e]=i:a(e,i);else{try{o.unsafe?t[e]&&(l=!0):delete t[e]}catch(h){}l?t[e]=i:r.f(t,e,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return t}},(t,e,i)=>{var n=i(14),r=i(7),s=i(21),a=i(39),o=i(6),l=i(50).CONFIGURABLE,c=i(51),h=i(52),d=h.enforce,u=h.get,p=String,g=Object.defineProperty,f=n("".slice),m=n("".replace),b=n([].join),v=o&&!r((function(){return 8!==g((function(){}),"length",{value:8}).length})),_=String(String).split("String"),y=t.exports=function(t,e,i){"Symbol("===f(p(e),0,7)&&(e="["+m(p(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!a(t,"name")||l&&t.name!==e)&&(o?g(t,"name",{value:e,configurable:!0}):t.name=e),v&&i&&a(i,"arity")&&t.length!==i.arity&&g(t,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(r){}var n=d(t);return a(n,"source")||(n.source=b(_,"string"==typeof e?e:"")),t};Function.prototype.toString=y((function(){return s(this)&&u(this).source||c(this)}),"toString")},(t,e,i)=>{var n=i(6),r=i(39),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(s,"name"),l=o&&"something"===function(){}.name,c=o&&(!n||n&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:l,CONFIGURABLE:c}},(t,e,i)=>{var n=i(14),r=i(21),s=i(37),a=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(t){return a(t)}),t.exports=s.inspectSource},(t,e,i)=>{var n,r,s,a=i(53),o=i(4),l=i(20),c=i(44),h=i(39),d=i(37),u=i(54),p=i(55),g="Object already initialized",f=o.TypeError,m=o.WeakMap;if(a||d.state){var b=d.state||(d.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,n=function(t,e){if(b.has(t))throw f(g);return e.facade=t,b.set(t,e),e},r=function(t){return b.get(t)||{}},s=function(t){return b.has(t)}}else{var v=u("state");p[v]=!0,n=function(t,e){if(h(t,v))throw f(g);return e.facade=t,c(t,v,e),e},r=function(t){return h(t,v)?t[v]:{}},s=function(t){return h(t,v)}}t.exports={set:n,get:r,has:s,enforce:function(t){return s(t)?r(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=r(e)).type!==t)throw f("Incompatible receiver, "+t+" required");return i}}}},(t,e,i)=>{var n=i(4),r=i(21),s=n.WeakMap;t.exports=r(s)&&/native code/.test(String(s))},(t,e,i)=>{var n=i(35),r=i(41),s=n("keys");t.exports=function(t){return s[t]||(s[t]=r(t))}},t=>{t.exports={}},(t,e,i)=>{var n=i(39),r=i(57),s=i(5),a=i(45);t.exports=function(t,e,i){for(var o=r(e),l=a.f,c=s.f,h=0;h<o.length;h++){var d=o[h];n(t,d)||i&&n(i,d)||l(t,d,c(e,d))}}},(t,e,i)=>{var n=i(24),r=i(14),s=i(58),a=i(67),o=i(47),l=r([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=s.f(o(t)),i=a.f;return i?l(e,i(t)):e}},(t,e,i)=>{var n=i(59),r=i(66).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},(t,e,i)=>{var n=i(14),r=i(39),s=i(12),a=i(60).indexOf,o=i(55),l=n([].push);t.exports=function(t,e){var i,n=s(t),c=0,h=[];for(i in n)!r(o,i)&&r(n,i)&&l(h,i);for(;e.length>c;)r(n,i=e[c++])&&(~a(h,i)||l(h,i));return h}},(t,e,i)=>{var n=i(12),r=i(61),s=i(64),a=function(t){return function(e,i,a){var o,l=n(e),c=s(l),h=r(a,c);if(t&&i!==i){for(;c>h;)if((o=l[h++])!==o)return!0}else for(;c>h;h++)if((t||h in l)&&l[h]===i)return t||h||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},(t,e,i)=>{var n=i(62),r=Math.max,s=Math.min;t.exports=function(t,e){var i=n(t);return i<0?r(i+e,0):s(i,e)}},(t,e,i)=>{var n=i(63);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},t=>{var e=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?i:e)(n)}},(t,e,i)=>{var n=i(65);t.exports=function(t){return n(t.length)}},(t,e,i)=>{var n=i(62),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,e)=>{e.f=Object.getOwnPropertySymbols},(t,e,i)=>{var n=i(7),r=i(21),s=/#|\.prototype\./,a=function(t,e){var i=l[o(t)];return i===h||i!==c&&(r(e)?n(e):!!e)},o=a.normalize=function(t){return String(t).replace(s,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",h=a.POLYFILL="P";t.exports=a},(t,e,i)=>{var n=i(9),r=Function.prototype,s=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(s):function(){return a.apply(s,arguments)})},(t,e,i)=>{var n=i(24),r=i(39),s=i(44),a=i(25),o=i(71),l=i(56),c=i(74),h=i(75),d=i(76),u=i(80),p=i(81),g=i(6),f=i(36);
vendor: 6,651 bytes, line 1
1t.exports=function(t,e,i,m){var b="stackTraceLimit",v=m?2:1,_=t.split("."),y=_[_.length-1],A=n.apply(null,_);if(A){var S=A.prototype;if(!f&&r(S,"cause")&&delete S.cause,!i)return A;var x=n("Error"),w=e((function(t,e){var i=d(m?e:t,void 0),n=m?new A(t):new A;return void 0!==i&&s(n,"message",i),p(n,w,n.stack,2),this&&a(S,this)&&h(n,this,w),arguments.length>v&&u(n,arguments[v]),n}));if(w.prototype=S,"Error"!==y?o?o(w,x):l(w,x,{name:!0}):g&&b in A&&(c(w,A,b),c(w,A,"prepareStackTrace")),l(w,A),!f)try{S.name!==y&&s(S,"name",y),S.constructor=w}catch(E){}return w}}},(t,e,i)=>{var n=i(72),r=i(47),s=i(73);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=n(Object.prototype,"__proto__","set"))(i,[]),e=i instanceof Array}catch(a){}return function(i,n){return r(i),s(n),e?t(i,n):i.__proto__=n,i}}():void 0)},(t,e,i)=>{var n=i(14),r=i(31);t.exports=function(t,e,i){try{return n(r(Object.getOwnPropertyDescriptor(t,e)[i]))}catch(s){}}},(t,e,i)=>{var n=i(21),r=String,s=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw s("Can't set "+r(t)+" as a prototype")}},(t,e,i)=>{var n=i(45).f;t.exports=function(t,e,i){i in t||n(t,i,{configurable:!0,get:function(){return e[i]},set:function(t){e[i]=t}})}},(t,e,i)=>{var n=i(21),r=i(20),s=i(71);t.exports=function(t,e,i){var a,o;return s&&n(a=e.constructor)&&a!==i&&r(o=a.prototype)&&o!==i.prototype&&s(t,o),t}},(t,e,i)=>{var n=i(77);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},(t,e,i)=>{var n=i(78),r=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},(t,e,i)=>{var n=i(79),r=i(21),s=i(15),a=i(34)("toStringTag"),o=Object,l="Arguments"===s(function(){return arguments}());t.exports=n?s:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(i){}}(e=o(t),a))?i:l?s(e):"Object"===(n=s(e))&&r(e.callee)?"Arguments":n}},(t,e,i)=>{var n={};n[i(34)("toStringTag")]="z",t.exports="[object z]"===String(n)},(t,e,i)=>{var n=i(20),r=i(44);t.exports=function(t,e){n(e)&&"cause"in e&&r(t,"cause",e.cause)}},(t,e,i)=>{var n=i(44),r=i(82),s=i(83),a=Error.captureStackTrace;t.exports=function(t,e,i,o){s&&(a?a(t,e):n(t,"stack",r(i,o)))}},(t,e,i)=>{var n=i(14),r=Error,s=n("".replace),a=String(r("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,l=o.test(a);t.exports=function(t,e){if(l&&"string"==typeof t&&!r.prepareStackTrace)for(;e--;)t=s(t,o,"");return t}},(t,e,i)=>{var n=i(7),r=i(11);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},(t,e,i)=>{var n=i(48),r=i(14),s=i(77),a=i(85),o=URLSearchParams,l=o.prototype,c=r(l.append),h=r(l.delete),d=r(l.forEach),u=r([].push),p=new o("a=1&a=2&b=3");p.delete("a",1),p.delete("b",void 0),p+""!=="a=2"&&n(l,"delete",(function(t){var e=arguments.length,i=e<2?void 0:arguments[1];if(e&&void 0===i)return h(this,t);var n=[];d(this,(function(t,e){u(n,{key:e,value:t})})),a(e,1);for(var r,o=s(t),l=s(i),p=0,g=0,f=!1,m=n.length;p<m;)r=n[p++],f||r.key===o?(f=!0,h(this,r.key)):g++;for(;g<m;)(r=n[g++]).key===o&&r.value===l||c(this,r.key,r.value)}),{enumerable:!0,unsafe:!0})},t=>{var e=TypeError;t.exports=function(t,i){if(t<i)throw e("Not enough arguments");return t}},(t,e,i)=>{var n=i(48),r=i(14),s=i(77),a=i(85),o=URLSearchParams,l=o.prototype,c=r(l.getAll),h=r(l.has),d=new o("a=1");!d.has("a",2)&&d.has("a",void 0)||n(l,"has",(function(t){var e=arguments.length,i=e<2?void 0:arguments[1];if(e&&void 0===i)return h(this,t);var n=c(this,t);a(e,1);for(var r=s(i),o=0;o<n.length;)if(n[o++]===r)return!0;return!1}),{enumerable:!0,unsafe:!0})},(t,e,i)=>{var n=i(6),r=i(14),s=i(88),a=URLSearchParams.prototype,o=r(a.forEach);n&&!("size"in a)&&s(a,"size",{get:function(){var t=0;return o(this,(function(){t++})),t},configurable:!0,enumerable:!0})},(t,e,i)=>{var n=i(49),r=i(45);t.exports=function(t,e,i){return i.get&&n(i.get,e,{getter:!0}),i.set&&n(i.set,e,{setter:!0}),r.f(t,e,i)}},(t,e,i)=>{var n=i(3),r=i(40),s=i(64),a=i(90),o=i(92);n({target:"Array",proto:!0,arity:1,forced:i(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=r(this),i=s(e),n=arguments.length;o(i+n);for(var l=0;l<n;l++)e[i]=arguments[l],i++;return a(e,i),i}})},(t,e,i)=>{var n=i(6),r=i(91),s=TypeError,a=Object.getOwnPropertyDescriptor,o=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=o?function(t,e){if(r(t)&&!a(t,"length").writable)throw s("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},(t,e,i)=>{var n=i(15);t.exports=Array.isArray||function(t){return"Array"===n(t)}},t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},(t,e,i)=>{var n=i(94),r=i(98).findLast,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",(function(t){return r(s(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,e,i)=>{var n,r,s,a=i(95),o=i(6),l=i(4),c=i(21),h=i(20),d=i(39),u=i(78),p=i(32),g=i(44),f=i(48),m=i(88),b=i(25),v=i(96),_=i(71),y=i(34),A=i(41),S=i(52),x=S.enforce,w=S.get,E=l.Int8Array,C=E&&E.prototype,T=l.Uint8ClampedArray,P=T&&T.prototype,k=E&&v(E),M=C&&v(C),R=Object.prototype,F=l.TypeError,D=y("toStringTag"),I=A("TYPED_ARRAY_TAG"),O="TypedArrayConstructor",L=a&&!!_&&"Opera"!==u(l.opera),N=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},U=function(t){var e=v(t);if(h(e)){var i=w(e);return i&&d(i,O)?i.TypedArrayConstructor:U(e)}},z=function(t){if(!h(t))return!1;var e=u(t);return d(B,e)||d(j,e)};for(n in B)(s=(r=l[n])&&r.prototype)?x(s).TypedArrayConstructor=r:L=!1;for(n in j)(s=(r=l[n])&&r.prototype)&&(x(s).TypedArrayConstructor=r);if((!L||!c(k)||k===Function.prototype)&&(k=function(){throw F("Incorrect invocation")},L))for(n in B)l[n]&&_(l[n],k);if((!L||!M||M===R)&&(M=k.prototype,L))for(n in B)l[n]&&_(l[n].prototype,M);if(L&&v(P)!==M&&_(P,M),o&&!d(M,D))for(n in N=!0,m(M,D,{configurable:!0,get:function(){return h(this)?this[I]:void 0}}),B)l[n]&&g(l[n],I,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:N&&I,aTypedArray:function(t){if(z(t))return t;throw F("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!_||b(k,t)))return t;throw F(p(t)+" is not a typed array constructor")}
1,exportTypedArrayMethod:function(t,e,i,n){if(o){if(i)for(var r in B){var s=l[r];if(s&&d(s.prototype,t))try{delete s.prototype[t]}catch(a){try{s.prototype[t]=e}catch(c){}}}M[t]&&!i||f(M,t,i?e:L&&C[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,i){var n,r;if(o){if(_){if(i)for(n in B)if((r=l[n])&&d(r,t))try{delete r[t]}catch(s){}if(k[t]&&!i)return;try{return f(k,t,i?e:L&&k[t]||e)}catch(s){}}for(n in B)!(r=l[n])||r[t]&&!i||f(r,t,e)}},getTypedArrayConstructor:U,isView:function(t){if(!h(t))return!1;var e=u(t);return"DataView"===e||d(B,e)||d(j,e)},isTypedArray:z,TypedArray:k,TypedArrayPrototype:M}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,e,i)=>{var n=i(39),r=i(21),s=i(40),a=i(54),o=i(97),l=a("IE_PROTO"),c=Object,h=c.prototype;t.exports=o?c.getPrototypeOf:function(t){var e=s(t);if(n(e,l))return e[l];var i=e.constructor;return r(i)&&e instanceof i?i.prototype:e instanceof c?h:null}},(t,e,i)=>{var n=i(7);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},(t,e,i)=>{var n=i(99),r=i(13),s=i(40),a=i(64),o=function(t){var e=1===t;return function(i,o,l){for(var c,h=s(i),d=r(h),u=n(o,l),p=a(d);p-- >0;)if(u(c=d[p],p,h))switch(t){case 0:return c;case 1:return p}return e?-1:void 0}};t.exports={findLast:o(0),findLastIndex:o(1)}},(t,e,i)=>{var n=i(100),r=i(31),s=i(9),a=n(n.bind);t.exports=function(t,e){return r(t),void 0===e?t:s?a(t,e):function(){return t.apply(e,arguments)}}},(t,e,i)=>{var n=i(15),r=i(14);t.exports=function(t){if("Function"===n(t))return r(t)}},(t,e,i)=>{var n=i(94),r=i(98).findLastIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",(function(t){return r(s(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,e,i)=>{var n=i(4),r=i(8),s=i(94),a=i(64),o=i(103),l=i(40),c=i(7),h=n.RangeError,d=n.Int8Array,u=d&&d.prototype,p=u&&u.set,g=s.aTypedArray,f=s.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return r(p,t,{length:1,0:3},1),3!==t[1]})),b=m&&s.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new d(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));f("set",(function(t){g(this);var e=o(arguments.length>1?arguments[1]:void 0,1),i=l(t);if(m)return r(p,this,i,e);var n=this.length,s=a(i),c=0;if(s+e>n)throw h("Wrong length");for(;c<s;)this[e+c]=i[c++]}),!m||b)},(t,e,i)=>{var n=i(104),r=RangeError;t.exports=function(t,e){var i=n(t);if(i%e)throw r("Wrong offset");return i}},(t,e,i)=>{var n=i(62),r=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw r("The argument can't be less than 0");return e}},(t,e,i)=>{var n=i(106),r=i(94),s=r.aTypedArray,a=r.exportTypedArrayMethod,o=r.getTypedArrayConstructor;a("toReversed",(function(){return n(s(this),o(this))}))},(t,e,i)=>{var n=i(64);t.exports=function(t,e){for(var i=n(t),r=new e(i),s=0;s<i;s++)r[s]=t[i-s-1];return r}},(t,e,i)=>{var n=i(94),r=i(14),s=i(31),a=i(108),o=n.aTypedArray,l=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,h=r(n.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&s(t);var e=o(this),i=a(l(e),e);return h(i,t)}))},(t,e,i)=>{var n=i(64);t.exports=function(t,e){for(var i=0,r=n(e),s=new t(r);r>i;)s[i]=e[i++];return s}},(t,e,i)=>{var n=i(110),r=i(94),s=i(111),a=i(62),o=i(112),l=r.aTypedArray,c=r.getTypedArrayConstructor,h=r.exportTypedArrayMethod,d=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();h("with",{with:function(t,e){var i=l(this),r=a(t),h=s(i)?o(e):+e;return n(i,c(i),r,h)}}.with,!d)},(t,e,i)=>{var n=i(64),r=i(62),s=RangeError;t.exports=function(t,e,i,a){var o=n(t),l=r(i),c=l<0?o+l:l;if(c>=o||c<0)throw s("Incorrect index");for(var h=new e(o),d=0;d<o;d++)h[d]=d===c?a:t[d];return h}},(t,e,i)=>{var n=i(78);t.exports=function(t){var e=n(t);return"BigInt64Array"===e||"BigUint64Array"===e}},(t,e,i)=>{var n=i(19),r=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},(t,e,i)=>{var n=i(6),r=i(88),s=i(114),a=ArrayBuffer.prototype;n&&!("detached"in a)&&r(a,"detached",{configurable:!0,get:function(){return s(this)}})},(t,e,i)=>{var n=i(14),r=i(115),s=n(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==r(t))return!1;try{return s(t,0,0),!1}catch(e){return!0}}},(t,e,i)=>{var n=i(72),r=i(15),s=TypeError;t.exports=n(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==r(t))throw s("ArrayBuffer expected");return t.byteLength}},(t,e,i)=>{var n=i(3),r=i(117);r&&n({target:"ArrayBuffer",proto:!0},{transfer:function(){return r(this,arguments.length?arguments[0]:void 0,!0)}})},(t,e,i)=>{var n=i(4),r=i(14),s=i(72),a=i(118),o=i(114),l=i(115),c=i(119),h=n.TypeError,d=n.structuredClone,u=n.ArrayBuffer,p=n.DataView,g=Math.min,f=u.prototype,m=p.prototype,b=r(f.slice),v=s(f,"resizable","get"),_=s(f,"maxByteLength","get"),y=r(m.getInt8),A=r(m.setInt8);
1t.exports=c&&function(t,e,i){var n=l(t),r=void 0===e?n:a(e),s=!v||!v(t);if(o(t))throw h("ArrayBuffer is detached");var c=d(t,{transfer:[t]});if(n===r&&(i||s))return c;if(n>=r&&(!i||s))return b(c,0,r);for(var f=i&&!s&&_?{maxByteLength:_(c)}:void 0,m=new u(r,f),S=new p(c),x=new p(m),w=g(r,n),E=0;E<w;E++)A(x,E,y(S,E));return m}},(t,e,i)=>{var n=i(62),r=i(65),s=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=n(t),i=r(e);if(e!==i)throw s("Wrong length or index");return i}},(t,e,i)=>{var n=i(4),r=i(7),s=i(28),a=i(120),o=i(121),l=i(122),c=n.structuredClone;t.exports=!!c&&!r((function(){if(o&&s>92||l&&s>94||a&&s>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},(t,e,i)=>{var n=i(121),r=i(122);t.exports=!n&&!r&&"object"==typeof window&&"object"==typeof document},t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(t,e,i)=>{var n=i(4),r=i(15);t.exports="process"===r(n.process)},(t,e,i)=>{var n=i(3),r=i(117);r&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{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;function getDocument(t){if("string"===typeof t||t instanceof URL?t={url:t}:(0,_util.isArrayBuffer)(t)&&(t={data:t}),"object"!==typeof t)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 e=new PDFDocumentLoadingTask,{docId:i}=e,n=t.url?getUrlProp(t.url):null,r=t.data?getDataProp(t.data):null,s=t.httpHeaders||null,a=!0===t.withCredentials,o=t.password??null,l=t.range instanceof PDFDataRangeTransport?t.range:null,c=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let h=t.worker instanceof PDFWorker?t.worker:null;const d=t.verbosity,u="string"!==typeof t.docBaseUrl||(0,_display_utils.isDataScheme)(t.docBaseUrl)?null:t.docBaseUrl,p="string"===typeof t.cMapUrl?t.cMapUrl:null,g=!1!==t.cMapPacked,f=t.CMapReaderFactory||DefaultCMapReaderFactory,m="string"===typeof t.standardFontDataUrl?t.standardFontDataUrl:null,b=t.StandardFontDataFactory||DefaultStandardFontDataFactory,v=!0!==t.stopAtErrors,_=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,y=!1!==t.isEvalSupported,A="boolean"===typeof t.isOffscreenCanvasSupported?t.isOffscreenCanvasSupported:!_util.isNodeJS,S=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,x="boolean"===typeof t.disableFontFace?t.disableFontFace:_util.isNodeJS,w=!0===t.fontE
1xtraProperties,E=!0===t.enableXfa,C=t.ownerDocument||globalThis.document,T=!0===t.disableRange,P=!0===t.disableStream,k=!0===t.disableAutoFetch,M=!0===t.pdfBug,R=l?l.length:t.length??NaN,F="boolean"===typeof t.useSystemFonts?t.useSystemFonts:!_util.isNodeJS&&!x,D="boolean"===typeof t.useWorkerFetch?t.useWorkerFetch:f===_display_utils.DOMCMapReaderFactory&&b===_display_utils.DOMStandardFontDataFactory&&p&&m&&(0,_display_utils.isValidFetchUrl)(p,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(m,document.baseURI),I=t.canvasFactory||new DefaultCanvasFactory({ownerDocument:C}),O=t.filterFactory||new DefaultFilterFactory({docId:i,ownerDocument:C});(0,_util.setVerbosityLevel)(d);const L={canvasFactory:I,filterFactory:O};if(D||(L.cMapReaderFactory=new f({baseUrl:p,isCompressed:g}),L.standardFontDataFactory=new b({baseUrl:m})),!h){const t={verbosity:d,port:_worker_options.GlobalWorkerOptions.workerPort};h=t.port?PDFWorker.fromPort(t):new PDFWorker(t),e._worker=h}const N={docId:i,apiVersion:"3.11.174",data:r,password:o,disableAutoFetch:k,rangeChunkSize:c,length:R,docBaseUrl:u,enableXfa:E,evaluatorOptions:{maxImageSize:_,disableFontFace:x,ignoreErrors:v,isEvalSupported:y,isOffscreenCanvasSupported:A,canvasMaxAreaInBytes:S,fontExtraProperties:w,useSystemFonts:F,cMapUrl:D?p:null,standardFontDataUrl:D?m:null}},B={ignoreErrors:v,isEvalSupported:y,disableFontFace:x,fontExtraProperties:w,enableXfa:E,ownerDocument:C,disableAutoFetch:k,pdfBug:M,styleElement:null};return h.promise.then((function(){if(e.destroyed)throw new Error("Loading aborted");const t=_fetchDocument(h,N),o=new Promise((function(t){let e;var i;l?e=new _transport_stream.PDFDataTransportStream({length:R,initialData:l.initialData,progressiveDone:l.progressiveDone,contentDispositionFilename:l.contentDispositionFilename,disableRange:T,disableStream:P},l):r||(i={url:n,length:R,httpHeaders:s,withCredentials:a,rangeChunkSize:c,disableRange:T,disableStream:P},e=_util.isNodeJS?new _displayNode_stream.PDFNodeStream(i):(0,_display_utils.isValidFetchUrl)(i.url)?new _displayFetch_stream.PDFFetchStream(i):new _displayNetwork.PDFNetworkStream(i)),t(e)}));return Promise.all([t,o]).then((function(t){let[n,r]=t;if(e.destroyed)throw new Error("Loading aborted");const s=new _message_handler.MessageHandler(i,n,h.port),a=new WorkerTransport(s,e,r,B,L);e._transport=a,s.send("Ready",null)}))})).catch(e._capability.reject),e}async function _fetchDocument(t,e){if(t.destroyed)throw new Error("Worker was destroyed");const i=await t.messageHandler.sendWithPromise("GetDocRequest",e,e.data?[e.data.buffer]:null);if(t.destroyed)throw new Error("Worker was destroyed");return i}function getUrlProp(t){if(t instanceof URL)return t.href;try{return new URL(t,window.location).href}catch{if(_util.isNodeJS&&"string"===typeof t)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&&"undefined"!==typeof Buffer&&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("string"===typeof t)return(0,_util.stringToBytes)(t);if("object"===typeof t&&!isNaN(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.")}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;class PDFDocumentLoadingTask{static#e=0;constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d"+PDFDocumentLoadingTask.#e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await(this._transport?.destroy())}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=t,this.initialData=e,this.progressiveDone=i,this.contentDispositionFilename=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const i of this._rangeListeners)i(t,e)}onDataProgress(t,e){this._readyCapability.promise.then((()=>{for(const i of this._progressListeners)i(t,e)}))}onDataProgressiveRead(t){this._readyCapability.promise.then((()=>{for(const e of this._progressiveReadListeners)e(t)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const t of this._progressiveDoneListeners)t()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(t,e){this._pdfInfo=t,this._transport=e,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then((t=>{if(!t)return t;const e=[];
1for(const i in t)e.push(...t[i]);return e})))})}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(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}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 t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||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{#i=null;#n=!1;constructor(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._pageIndex=t,this._pageInfo=e,this._transport=i,this._stats=n?new _display_utils.StatTimer:null,this._pdfBug=n,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:t,rotation:e=this.rotate,offsetX:i=0,offsetY:n=0,dontFlip:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:r})}getAnnotations(){let{intent:t="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e.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(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render(t){let{canvasContext:e,viewport:i,intent:n="display",annotationMode:r=_util.AnnotationMode.ENABLE,transform:s=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:h=null}=t;this._stats?.time("Overall");const d=this._transport.getRenderingIntent(n,r,h);this.#n=!1,this.#r(),o||(o=this._transport.getOptionalContentConfig());let u=this._intentStates.get(d.cacheKey);u||(u=Object.create(null),this._intentStates.set(d.cacheKey,u)),u.streamReaderCancelTimeout&&(clearTimeout(u.streamReaderCancelTimeout),u.streamReaderCancelTimeout=null);const p=!!(d.renderingIntent&_util.RenderingIntentFlag.PRINT);u.displayReadyCapability||(u.displayReadyCapability=new _util.PromiseCapability,u.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(d));const g=t=>{u.renderTasks.delete(f),(this._maybeCleanupAfterRender||p)&&(this.#n=!0),this.#s(!p),t?(f.capability.reject(t),this._abortOperatorList({intentState:u,reason:t instanceof Error?t:new Error(t)})):f.capability.resolve(),this._stats?.timeEnd("Rendering"),this._stats?.timeEnd("Overall")},f=new InternalRenderTask({callback:g,params:{canvasContext:e,viewport:i,transform:s,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:u.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!p,pdfBug:this._pdfBug,page
1Colors:c});(u.renderTasks||=new Set).add(f);const m=f.task;return Promise.all([u.displayReadyCapability.promise,o]).then((t=>{let[e,i]=t;this.destroyed?g():(this._stats?.time("Rendering"),f.initializeGraphics({transparency:e,optionalContentConfig:i}),f.operatorListChanged())})).catch(g),m}getOperatorList(){let{intent:t="display",annotationMode:e=_util.AnnotationMode.ENABLE,printAnnotationStorage:i=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=this._transport.getRenderingIntent(t,e,i,!0);let r,s=this._intentStates.get(n.cacheKey);return s||(s=Object.create(null),this._intentStates.set(n.cacheKey,s)),s.opListReadCapability||(r=Object.create(null),r.operatorListChanged=function(){s.operatorList.lastChunk&&(s.opListReadCapability.resolve(s.operatorList),s.renderTasks.delete(r))},s.opListReadCapability=new _util.PromiseCapability,(s.renderTasks||=new Set).add(r),s.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(n)),s.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:t=!1,disableNormalization:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===t,disableNormalization:!0===e},{highWaterMark:100,size:t=>t.items.length})}getTextContent(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((t=>_xfa_text.XfaText.textContent(t)));const e=this.streamTextContent(t);return new Promise((function(t,i){const n=e.getReader(),r={items:[],styles:Object.create(null)};!function e(){n.read().then((function(i){let{value:n,done:s}=i;s?t(r):(Object.assign(r.styles,n.styles),r.items.push(...n.items),e())}),i)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const i of e.renderTasks)t.push(i.completed),i.cancel();return this.objs.clear(),this.#n=!1,this.#r(),Promise.all(t)}cleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#n=!0;const e=this.#s(!1);return t&&e&&(this._stats&&=new _display_utils.StatTimer),e}#s(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.#r(),!this.#n||this.destroyed)return!1;if(t)return this.#i=setTimeout((()=>{this.#i=null,this.#s(!1)}),DELAYED_CLEANUP_TIMEOUT),!1;for(const{renderTasks:e,operatorList:i}of this._intentStates.values())if(e.size>0||!i.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#n=!1,!0}#r(){this.#i&&(clearTimeout(this.#i),this.#i=null)}_startRenderPage(t,e){const i=this._intentStates.get(e);i&&(this._stats?.timeEnd("Page Request"),i.displayReadyCapability?.resolve(t))}_renderPageChunk(t,e){for(let i=0,n=t.length;i<n;i++)e.operatorList.fnArray.push(t.fnArray[i]),e.operatorList.argsArray.push(t.argsArray[i]);e.operatorList.lastChunk=t.lastChunk,e.operatorList.separateAnnots=t.separateAnnots;for(const i of e.renderTasks)i.operatorListChanged();t.lastChunk&&this.#s(!0)}_pumpOperatorList(t){let{renderingIntent:e,cacheKey:i,annotationStorageSerializable:n}=t;const{map:r,transfers:s}=n,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:i,annotationStorage:r},s).getReader(),o=this._intentStates.get(i);o.streamReader=a;const l=()=>{a.read().then((t=>{let{value:e,done:i}=t;i?o.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,o),l())}),(t=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const t of o.renderTasks)t.operatorListChanged();this.#s(!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(t);else{if(!o.opListReadCapability)throw t;o.opListReadCapability.reject(t)}}}))};l()}_abortOperatorList(t){let{intentState:e,reason:i,force:n=!1}=t;if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!n){if(e.renderTasks.size>0)return;if(i instanceof _display_utils.RenderingCancelledException){let t=RENDERING_CANCELLED_TIMEOUT;return i.extraDelay>0&&i.extraDelay<1e3&&(t+=i.extraDelay),void(e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:i,force:!0})}),t))}}if(e.streamReader.cancel(new _util.AbortException(i.message)).catch((()=>{})),e.streamReader=null,!this._transport.destroyed){for(const[t,i]of this._intentStates)if(i===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#a=new Set;#o=Promise.resolve();postMessage(t,e){const i={data:structuredClone(t,null)};this.#o.then((()=>{for(const t of this.#a)t.call(this,i)}))}addEventListener(t,e){this.#a.add(e)}removeEventListener(t,e){this.#a.delete(e)}terminate(){this.#a.clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_util.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"===typeof document){const t=document?.currentScript?.src;t&&(PDFWorkerUtil.fallbackWorkerSrc=t.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(t,e){let i;try{if(i=new URL(t),!i.origin||"null"===i.origin)return!1}catch{return!1}const n=new URL(e,i);return i.origin===n.origin},PDFWorkerUtil.createCDNWrapper=function(t){const e=`importScripts("${t}");`;return URL.createObjectURL(new Blob([e]))};class PDFWorker{static#l;constructor(){let{name:t=null,port:e=null,verbosity:i=(0,_util.getVerbosityLevel)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.name=t,this.destroyed=!1,this.verbosity=i,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,e){if(PDFWorker.#l?.has(e))throw new Error("Cannot use more than one PDFWorker per port.");return(PDFWorker.#l||=new WeakMap).set(e,this),void this._initializeFromPort(e)}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 e=new Worker(t),i=new _message_handler.MessageHandler("main","worker",e),n=()=>{e.removeEventListener("error",r),i.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},r=()=>{this._webWorker||n()};e.addEventListener("error",r),i.on("test",(t=>{e.removeEventListener("error",r),this.destroyed?n():t?(this._messageHandler=i,this._port=e,this._webWorker=e,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),i.destroy(),e.terminate())})),i.on("ready",(t=>{if(e.removeEventListener("error",r),this.destroyed)n();else try{s()}catch{this._setupFakeWorker()}}));const s=()=>{const t=new Uint8Array;i.send("test",t,[t.buffer])};return void s()}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)return void this._readyCapability.reject(new Error("Worker was destroyed"));const e=new LoopbackPort;this._port=e;const i="fake"+PDFWorkerUtil.fakeWorkerId++,n=new _message_handler.MessageHandler(i+"_worker",i,e);t.setup(n,e);const r=new _message_handler.MessageHandler(i,i+"_worker",e);this._messageHandler=r,this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})})).catch((t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker.#l?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){if(!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const e=this.#l?.get(t.port);
1if(e){if(e._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new PDFWorker(t)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS){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())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#c=new Map;#h=new Map;#d=new Map;#u=null;constructor(t,e,i,n,r){this.messageHandler=t,this.loadingTask=e,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:n.ownerDocument,styleElement:n.styleElement}),this._params=n,this.canvasFactory=r.canvasFactory,this.filterFactory=r.filterFactory,this.cMapReaderFactory=r.cMapReaderFactory,this.standardFontDataFactory=r.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}#p(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=this.#c.get(t);if(i)return i;const n=this.messageHandler.sendWithPromise(t,e);return this.#c.set(t,n),n}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=_util.RenderingIntentFlag.DISPLAY,s=_annotation_storage.SerializableEmpty;switch(t){case"any":r=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":r=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${t}`)}switch(e){case _util.AnnotationMode.DISABLE:r+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:r+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:r+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,s=(r&_util.RenderingIntentFlag.PRINT&&i instanceof _annotation_storage.PrintAnnotationStorage?i:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${e}`)}return n&&(r+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:r,cacheKey:`${r}_${s.hash}`,annotationStorageSerializable:s}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this.#u?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of this.#h.values())t.push(i._destroy());this.#h.clear(),this.#d.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#c.clear(),this.filterFactory.destroy(),this._networkStream?.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:t,loadingTask:e}=this;t.on("GetReader",((t,e)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}},e.onPull=()=>{this._fullReader.read().then((function(t){let{value:i,done:n}
1=t;n?e.close():((0,_util.assert)(i instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(i),1,[i]))})).catch((t=>{e.error(t)}))},e.onCancel=t=>{this._fullReader.cancel(t),e.ready.catch((t=>{if(!this.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(t=>{const i=new _util.PromiseCapability,n=this._fullReader;return n.headersReady.then((()=>{n.isStreamingSupported&&n.isRangeSupported||(this._lastProgress&&e.onProgress?.(this._lastProgress),n.onProgress=t=>{e.onProgress?.({loaded:t.loaded,total:t.total})}),i.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})}),i.reject),i.promise})),t.on("GetRangeReader",((t,e)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(t.begin,t.end);i?(e.onPull=()=>{i.read().then((function(t){let{value:i,done:n}=t;n?e.close():((0,_util.assert)(i instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(i),1,[i]))})).catch((t=>{e.error(t)}))},e.onCancel=t=>{i.cancel(t),e.ready.catch((t=>{if(!this.destroyed)throw t}))}):e.close()})),t.on("GetDoc",(t=>{let{pdfInfo:i}=t;this._numPages=i.numPages,this._htmlForXfa=i.htmlForXfa,delete i.htmlForXfa,e._capability.resolve(new PDFDocumentProxy(i,this))})),t.on("DocException",(function(t){let i;switch(t.name){case"PasswordException":i=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":i=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":i=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":i=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":i=new _util.UnknownErrorException(t.message,t.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}e._capability.reject(i)})),t.on("PasswordRequest",(t=>{if(this.#u=new _util.PromiseCapability,e.onPassword){const n=t=>{t instanceof Error?this.#u.reject(t):this.#u.resolve({password:t})};try{e.onPassword(n,t.code)}catch(i){this.#u.reject(i)}}else this.#u.reject(new _util.PasswordException(t.message,t.code));return this.#u.promise})),t.on("DataLoaded",(t=>{e.onProgress?.({loaded:t.length,total:t.length}),this.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(t=>{this.destroyed||this.#h.get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)})),t.on("commonobj",(e=>{let[i,n,r]=e;if(!this.destroyed&&!this.commonObjs.has(i))switch(n){case"Font":const e=this._params;if("error"in r){const t=r.error;(0,_util.warn)(`Error during font loading: ${t}`),this.commonObjs.resolve(i,t);break}const s=e.pdfBug&&globalThis.FontInspector?.enabled?(t,e)=>globalThis.FontInspector.fontAdded(t,e):null,a=new _font_loader.FontFaceObject(r,{isEvalSupported:e.isEvalSupported,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,inspectFont:s});this.fontLoader.bind(a).catch((e=>t.sendWithPromise("FontFallback",{id:i}))).finally((()=>{!e.fontExtraProperties&&a.data&&(a.data=null),this.commonObjs.resolve(i,a)}));break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(i,r);break;default:throw new Error(`Got unknown common object type ${n}`)}})),t.on("obj",(t=>{let[e,i,n,r]=t;if(this.destroyed)return;const s=this.#h.get(i);if(!s.objs.has(e))switch(n){case"Image":if(s.objs.resolve(e,r),r){let t;if(r.bitmap){const{width:e,height:i}=r;t=e*i*4}else t=r.data?.length||0;t>_util.MAX_IMAGE_SIZE_TO_CACHE&&(s._maybeCleanupAfterRender=!0)}break;case"Pattern":s.objs.resolve(e,r);break;default:throw new Error(`Got unknown object type ${n}`)}})),t.on("DocProgress",(t=>{this.destroyed||e.onProgress?.({loaded:t.loaded,total:t.total})})),t.on("FetchBuiltInCMap",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),t.on("FetchStandardFontData",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}
1getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfers:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},e).finally((()=>{this.annotationStorage.resetModified()}))}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,i=this.#d.get(e);if(i)return i;const n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then((t=>{if(this.destroyed)throw new Error("Transport destroyed");const i=new PDFPageProxy(e,t,this,this._params.pdfBug);return this.#h.set(e,i),i}));return this.#d.set(e,n),n}getPageIndex(t){return"object"!==typeof t||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return this.#p("GetFieldObjects")}hasJSActions(){return this.#p("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!==typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}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 this.#p("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((t=>new _optional_content_config.OptionalContentConfig(t)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=this.#c.get(t);if(e)return e;const i=this.messageHandler.sendWithPromise(t,null).then((t=>({info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})));return this.#c.set(t,i),i}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of this.#h.values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),this.#c.clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:t,enableXfa:e}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t,enableXfa:e})}}class PDFObjects{#g=Object.create(null);#f(t){return this.#g[t]||={capability:new _util.PromiseCapability,data:null}}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){const i=this.#f(t);return i.capability.promise.then((()=>e(i.data))),null}const i=this.#g[t];if(!i?.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return i.data}has(t){return this.#g[t]?.capability.settled||!1}resolve(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=this.#f(t);i.data=e,i.capability.resolve()}clear(){for(const t in this.#g){const{data:e}=this.#g[t];e?.bitmap?.close()}this.#g=Object.create(null)}}class RenderTask{#m=null;constructor(t){this.#m=t,this.onContinue=null}get promise(){return this.#m.capability.promise}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.#m.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#m.operatorList;if(!t)return!1;const{annotationCanvasMap:e}=this.#m;return t.form||t.canvas&&e?.size>0}}exports.RenderTask=RenderTask;class InternalRenderTask{static#b=new WeakSet;constructor(t){let{callback:e,params:i,objs:n,commonObjs:r,annotationCanvasMap:s,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:h=!1,pdfBug:d=!1,pageColors:u=null}=t;this.callback=e,this.params=i,this.objs=n,this.commonObjs=r,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=d,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!==typeof window,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(t){let{transparency:e=!1,optionalContentConfig:i}=t;if(this.cancelled)return;
1if(this._canvas){if(InternalRenderTask.#b.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.");InternalRenderTask.#b.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:n,viewport:r,transform:s,background:a}=this.params;this.gfx=new _canvas.CanvasGraphics(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:s,viewport:r,transparency:e,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),InternalRenderTask.#b.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,e))}operatorListChanged(){this.graphicsReady?(this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?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(),InternalRenderTask.#b.delete(this._canvas),this.callback())))}}const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(t,e,i)=>{var n=i(3),r=i(126);n({target:"Set",proto:!0,real:!0,forced:!i(135)("difference")},{difference:r})},(t,e,i)=>{var n=i(127),r=i(128),s=i(129),a=i(132),o=i(133),l=i(130),c=i(131),h=r.has,d=r.remove;t.exports=function(t){var e=n(this),i=o(t),r=s(e);return a(e)<=i.size?l(e,(function(t){i.includes(t)&&d(r,t)})):c(i.getIterator(),(function(t){h(e,t)&&d(r,t)})),r}},(t,e,i)=>{var n=i(128).has;t.exports=function(t){return n(t),t}},(t,e,i)=>{var n=i(14),r=Set.prototype;t.exports={Set:Set,add:n(r.add),has:n(r.has),remove:n(r.delete),proto:r}},(t,e,i)=>{var n=i(128),r=i(130),s=n.Set,a=n.add;t.exports=function(t){var e=new s;return r(t,(function(t){a(e,t)})),e}},(t,e,i)=>{var n=i(14),r=i(131),s=i(128),a=s.Set,o=s.proto,l=n(o.forEach),c=n(o.keys),h=c(new a).next;t.exports=function(t,e,i){return i?r({iterator:c(t),next:h},e):l(t,e)}},(t,e,i)=>{var n=i(8);t.exports=function(t,e,i){for(var r,s,a=i?t:t.iterator,o=t.next;!(r=n(o,a)).done;)if(void 0!==(s=e(r.value)))return s}},(t,e,i)=>{var n=i(72),r=i(128);t.exports=n(r.proto,"size","get")||function(t){return t.size}},(t,e,i)=>{var n=i(31),r=i(47),s=i(8),a=i(62),o=i(134),l="Invalid size",c=RangeError,h=TypeError,d=Math.max,u=function(t,e,i,n){this.set=t,this.size=e,this.has=i,this.keys=n};u.prototype={getIterator:function(){return o(r(s(this.keys,this.set)))},includes:function(t){return s(this.has,this.set,t)}},t.exports=function(t){r(t);var e=+t.size;if(e!==e)throw h(l);var i=a(e);if(i<0)throw c(l);return new u(t,d(i,0),n(t.has),n(t.keys))}},t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},(t,e,i)=>{var n=i(24),r=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var e=n("Set");try{(new e)[t](r(0));try{return(new e)[t](r(-1)),!1}catch(i){return!0}}catch(s){return!1}}},(t,e,i)=>{var n=i(3),r=i(7),s=i(137);n({target:"Set",proto:!0,real:!0,forced:!i(135)("intersection")||r((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:s})},(t,e,i)=>{var n=i(127),r=i(128),s=i(132),a=i(133),o=i(130),l=i(131),c=r.Set,h=r.add,d=r.has;t.exports=function(t){var e=n(this),i=a(t),r=new c;return s(e)>i.size?l(i.getIterator(),(function(t){d(e,t)&&h(r,t)})):o(e,(function(t){i.includes(t)&&h(r,t)})),r}},(t,e,i)=>{var n=i(3),r=i(139);n({target:"Set",proto:!0,real:!0,forced:!i(135)("isDisjointFrom")},{isDisjointFrom:r})},(t,e,i)=>{var n=i(127),r=i(128).has,s=i(132),a=i(133),o=i(130),l=i(131),c=i(140);t.exports=function(t){var e=n(this),i=a(t);if(s(e)<=i.size)return!1!==o(e,(function(t){if(i.includes(t))return!1}),!0);var h=i.getIterator();return!1!==l(h,(function(t){if(r(e,t))return c(h,"normal",!1)}))}},(t,e,i)=>{var n=i(8),r=i(47),s=i(30);
vendor: 3,380 bytes, line 1
1t.exports=function(t,e,i){var a,o;r(t);try{if(!(a=s(t,"return"))){if("throw"===e)throw i;return i}a=n(a,t)}catch(l){o=!0,a=l}if("throw"===e)throw i;if(o)throw a;return r(a),i}},(t,e,i)=>{var n=i(3),r=i(142);n({target:"Set",proto:!0,real:!0,forced:!i(135)("isSubsetOf")},{isSubsetOf:r})},(t,e,i)=>{var n=i(127),r=i(132),s=i(130),a=i(133);t.exports=function(t){var e=n(this),i=a(t);return!(r(e)>i.size)&&!1!==s(e,(function(t){if(!i.includes(t))return!1}),!0)}},(t,e,i)=>{var n=i(3),r=i(144);n({target:"Set",proto:!0,real:!0,forced:!i(135)("isSupersetOf")},{isSupersetOf:r})},(t,e,i)=>{var n=i(127),r=i(128).has,s=i(132),a=i(133),o=i(131),l=i(140);t.exports=function(t){var e=n(this),i=a(t);if(s(e)<i.size)return!1;var c=i.getIterator();return!1!==o(c,(function(t){if(!r(e,t))return l(c,"normal",!1)}))}},(t,e,i)=>{var n=i(3),r=i(146);n({target:"Set",proto:!0,real:!0,forced:!i(135)("symmetricDifference")},{symmetricDifference:r})},(t,e,i)=>{var n=i(127),r=i(128),s=i(129),a=i(133),o=i(131),l=r.add,c=r.has,h=r.remove;t.exports=function(t){var e=n(this),i=a(t).getIterator(),r=s(e);return o(i,(function(t){c(e,t)?h(r,t):l(r,t)})),r}},(t,e,i)=>{var n=i(3),r=i(148);n({target:"Set",proto:!0,real:!0,forced:!i(135)("union")},{union:r})},(t,e,i)=>{var n=i(127),r=i(128).add,s=i(129),a=i(133),o=i(131);t.exports=function(t){var e=n(this),i=a(t).getIterator(),l=s(e);return o(i,(function(t){r(l,t)})),l}},(t,e,i)=>{var n=i(3),r=i(4),s=i(24),a=i(11),o=i(45).f,l=i(39),c=i(150),h=i(75),d=i(76),u=i(151),p=i(82),g=i(6),f=i(36),m="DOMException",b=s("Error"),v=s(m),_=function(){c(this,y);var t=arguments.length,e=d(t<1?void 0:arguments[0]),i=d(t<2?void 0:arguments[1],"Error"),n=new v(e,i),r=b(e);return r.name=m,o(n,"stack",a(1,p(r.stack,1))),h(n,this,_),n},y=_.prototype=v.prototype,A="stack"in b(m),S="stack"in new v(1,2),x=v&&g&&Object.getOwnPropertyDescriptor(r,m),w=!!x&&!(x.writable&&x.configurable),E=A&&!w&&!S;n({global:!0,constructor:!0,forced:f||E},{DOMException:E?_:v});var C=s(m),T=C.prototype;if(T.constructor!==C)for(var P in f||o(T,"constructor",a(1,C)),u)if(l(u,P)){var k=u[P],M=k.s;l(C,M)||o(C,M,a(6,k.c))}},(t,e,i)=>{var n=i(25),r=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw r("Incorrect invocation")}},t=>{t.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}
1,InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(t,e,i)=>{var n,r=i(36),s=i(3),a=i(4),o=i(24),l=i(14),c=i(7),h=i(41),d=i(21),u=i(153),p=i(17),g=i(20),f=i(23),m=i(154),b=i(47),v=i(78),_=i(39),y=i(159),A=i(44),S=i(64),x=i(85),w=i(160),E=i(162),C=i(128),T=i(83),P=i(119),k=a.Object,M=a.Array,R=a.Date,F=a.Error,D=a.EvalError,I=a.RangeError,O=a.ReferenceError,L=a.SyntaxError,N=a.TypeError,B=a.URIError,j=a.PerformanceMark,U=a.WebAssembly,z=U&&U.CompileError||F,H=U&&U.LinkError||F,W=U&&U.RuntimeError||F,q=o("DOMException"),G=E.Map,V=E.has,$=E.get,X=E.set,K=C.Set,Y=C.add,J=o("Object","keys"),Q=l([].push),Z=l((!0).valueOf),tt=l(1..valueOf),et=l("".valueOf),it=l(R.prototype.getTime),nt=h("structuredClone"),rt="DataCloneError",st="Transferring",at=function(t){return!c((function(){var e=new a.Set([7]),i=t(e),n=t(k(7));return i===e||!i.has(7)||"object"!=typeof n||7!==+n}))&&t},ot=function(t,e){return!c((function(){var i=new e,n=t({a:i,b:i});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===i.stack)}))},lt=a.structuredClone,ct=r||!ot(lt,F)||!ot(lt,q)||(n=lt,!!c((function(){var t=n(new a.AggregateError([1],nt,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==nt||3!==t.cause}))),ht=!lt&&at((function(t){return new j(nt,{detail:t}).detail})),dt=at(lt)||ht,ut=function(t){throw new q("Uncloneable type: "+t,rt)},pt=function(t,e){throw new q((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",rt)},gt=function(t,e){return dt||pt(e),dt(t)},ft=function(t,e,i){if(V(e,t))return $(e,t);var n,r,s,o,l,c;if("SharedArrayBuffer"===(i||v(t)))n=dt?dt(t):t;else{var h=a.DataView;h||"function"==typeof t.slice||pt("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){r=t.byteLength,s="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,n=new ArrayBuffer(r,s),o=new h(t),l=new h(n);for(c=0;c<r;c++)l.setUint8(c,o.getUint8(c))}else n=t.slice(0)}catch(d){throw new q("ArrayBuffer is detached",rt)}}return X(e,t,n),n},mt=function(t,e,i,n,r){var s=a[e];return g(s)||pt(e),new s(ft(t.buffer,r),i,n)},bt=function(t,e,i){this.object=t,this.type=e,this.metadata=i},vt=function(t,e,i){if(f(t)&&ut("Symbol"),!g(t))return t;if(e){if(V(e,t))return $(e,t)}else e=new G;var n,r,s,l,c,h,u,p,m=v(t);switch(m){case"Array":s=M(S(t));break;case"Object":s={};break;case"Map":s=new G;break;case"Set":s=new K;break;case"RegExp":s=new RegExp(t.source,w(t));break;case"Error":switch(r=t.name){case"AggregateError":s=o("AggregateError")([]);break;case"EvalError":s=D();break;case"RangeError":s=I();break;case"ReferenceError":s=O();break;case"SyntaxError":s=L();break;case"TypeError":s=N();break;case"URIError":s=B();break;case"CompileError":s=z();break;case"LinkError":s=H();break;case"RuntimeError":s=W();break;default:s=F()}break;case"DOMException":s=new q(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":s=i?new bt(t,m):ft(t,e,m);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":h="DataView"===m?t.byteLength:t.length,s=i?new bt(t,m,{offset:t.byteOffset,length:h}):mt(t,m,t.byteOffset,h,e);break;case"DOMQuad":try{s=new DOMQuad(vt(t.p1,e,i),vt(t.p2,e,i),vt(t.p3,e,i),vt(t.p4,e,i))}catch(b){s=gt(t,m)}break;case"File":if(dt)try{s=dt(t),v(s)!==m&&(s=void 0)}catch(b){}if(!s)try{s=new File([t],t.name,t)}catch(b){}s||pt(m);break;case"FileList":if(l=function(){var t;try{t=new a.DataTransfer}catch(b){try{t=new a.ClipboardEvent("").clipboardData}catch(e){}}return t&&t.items&&t.files?t:null}()){for(c=0,h=S(t);c<h;c++)l.items.add(vt(t[c],e,i));s=l.files}else s=gt(t,m);break;case"ImageData":try{s=new ImageData(vt(t.data,e,i),t.width,t.height,{colorSpace:t.colorSpace})}catch(b){s=gt(t,m)}break;default:if(dt)s=dt(t);else switch(m){case"BigInt":s=k(t.valueOf());break;case"Boolean":s=k(Z(t));break;case"Number":s=k(tt(t));break;case"String":s=k(et(t));break;case"Date":s=new R(it(t));break;case"Blob":try{s=t.slice(0,t.size,t.type)}catch(b){pt(m)}break;case"DOMPoint":case"DOMPointReadOnly":n=a[m];try{s=n.fromPoint?n.fromPoint(t):new n(t.x,t.y,t.z,t.w)}catch(b){pt(m)}break;case"DOMRect":case"DOMRectReadOnly":n=a[m];try{s=n.fromRect?n.fromRect(t):new n(t.x,t.y,t.width,t.height)}catch(b){pt(m)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=a[m];try{s=n.fromMatrix?n.fromMatrix(t):new n(t)}catch(b){pt(m)}break;case"AudioData":case"VideoFrame":d(t.clone)||pt(m);try{s=t.clone()}catch(b){ut(m)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":pt(m);default:ut(m)}}switch(X(e,t,s),m){case"Array":case"Object":for(u=J(t),c=0,h=S(u);c<h;c++)p=u[c],y(s,p,vt(t[p],e,i));break;case"Map":t.forEach((function(t,n){X(s,vt(n,e,i),vt(t,e,i))}
1));break;case"Set":t.forEach((function(t){Y(s,vt(t,e,i))}));break;case"Error":A(s,"message",vt(t.message,e,i)),_(t,"cause")&&A(s,"cause",vt(t.cause,e,i)),"AggregateError"===r&&(s.errors=vt(t.errors,e,i));case"DOMException":T&&A(s,"stack",vt(t.stack,e,i))}return s},_t=function(t,e){if(!g(t))return t;if(V(e,t))return $(e,t);var i,n,r,s,a,o,l,c;if(t instanceof bt)switch(i=t.type,n=t.object,i){case"ArrayBuffer":case"SharedArrayBuffer":c=ft(n,e,i);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":r=t.metadata,c=mt(n,i,r.offset,r.length,e)}else switch(v(t)){case"Array":case"Object":for(o=J(t),s=0,a=S(o);s<a;s++)t[l=o[s]]=_t(t[l],e);break;case"Map":c=new G,t.forEach((function(t,i){X(c,_t(i,e),_t(t,e))}));break;case"Set":c=new K,t.forEach((function(t){Y(c,_t(t,e))}));break;case"Error":t.message=_t(t.message,e),_(t,"cause")&&(t.cause=_t(t.cause,e)),"AggregateError"===t.name&&(t.errors=_t(t.errors,e));case"DOMException":T&&(t.stack=_t(t.stack,e))}return X(e,t,c||t),c||t},yt=function(t,e){if(!g(t))throw N("Transfer option cannot be converted to a sequence");var i=[];m(t,(function(t){Q(i,b(t))}));for(var n,r,s,o,l,c=0,h=S(i),p=[];c<h;)if(n=i[c++],"ArrayBuffer"!==(r=v(n))){if(V(e,n))throw new q("Duplicate transferable",rt);if(P)o=lt(n,{transfer:[n]});else switch(r){case"ImageBitmap":s=a.OffscreenCanvas,u(s)||pt(r,st);try{(l=new s(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),o=l.transferToImageBitmap()}catch(f){}break;case"AudioData":case"VideoFrame":d(n.clone)&&d(n.close)||pt(r,st);try{o=n.clone(),n.close()}catch(f){}break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":pt(r,st)}if(void 0===o)throw new q("This object cannot be transferred: "+r,rt);X(e,n,o)}else Q(p,n);return p},At=function(t,e){for(var i,n,r=0,s=S(t);r<s;){if(i=t[r++],V(e,i))throw new q("Duplicate transferable",rt);P?n=lt(i,{transfer:[i]}):(d(i.transfer)||pt("ArrayBuffer",st),n=i.transfer()),X(e,i,n)}};s({global:!0,enumerable:!0,sham:!P,forced:ct},{structuredClone:function(t){var e,i,n=x(arguments.length,1)>1&&!p(arguments[1])?b(arguments[1]):void 0,r=n?n.transfer:void 0,s=!1;void 0!==r&&(e=new G,i=yt(r,e),s=!!S(i));var a=vt(t,e,s);return s&&(e=new G,At(r,e),a=_t(a,e)),a}})},(t,e,i)=>{var n=i(14),r=i(7),s=i(21),a=i(78),o=i(24),l=i(51),c=function(){},h=[],d=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,p=n(u.exec),g=!u.exec(c),f=function(t){if(!s(t))return!1;try{return d(c,h,t),!0}catch(e){return!1}},m=function(t){if(!s(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!p(u,l(t))}catch(e){return!0}};m.sham=!0,t.exports=!d||r((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?m:f},(t,e,i)=>{var n=i(99),r=i(8),s=i(47),a=i(32),o=i(155),l=i(64),c=i(25),h=i(157),d=i(158),u=i(140),p=TypeError,g=function(t,e){this.stopped=t,this.result=e},f=g.prototype;t.exports=function(t,e,i){var m,b,v,_,y,A,S,x=i&&i.that,w=!(!i||!i.AS_ENTRIES),E=!(!i||!i.IS_RECORD),C=!(!i||!i.IS_ITERATOR),T=!(!i||!i.INTERRUPTED),P=n(e,x),k=function(t){return m&&u(m,"normal",t),new g(!0,t)},M=function(t){return w?(s(t),T?P(t[0],t[1],k):P(t[0],t[1])):T?P(t,k):P(t)};if(E)m=t.iterator;else if(C)m=t;else{if(!(b=d(t)))throw p(a(t)+" is not iterable");if(o(b)){for(v=0,_=l(t);_>v;v++)if((y=M(t[v]))&&c(f,y))return y;return new g(!1)}m=h(t,b)}for(A=E?t.next:m.next;!(S=r(A,m)).done;){try{y=M(S.value)}catch(R){u(m,"throw",R)}if("object"==typeof y&&y&&c(f,y))return y}return new g(!1)}},(t,e,i)=>{var n=i(34),r=i(156),s=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[s]===t)}},t=>{t.exports={}},(t,e,i)=>{var n=i(8),r=i(31),s=i(47),a=i(32),o=i(158),l=TypeError;t.exports=function(t,e){var i=arguments.length<2?o(t):e;if(r(i))return s(n(i,t));throw l(a(t)+" is not iterable")}},(t,e,i)=>{var n=i(78),r=i(30),s=i(17),a=i(156),o=i(34)("iterator");t.exports=function(t){if(!s(t))return r(t,o)||r(t,"@@iterator")||a[n(t)]}},(t,e,i)=>{var n=i(18),r=i(45),s=i(11);
1t.exports=function(t,e,i){var a=n(e);a in t?r.f(t,a,s(0,i)):t[a]=i}},(t,e,i)=>{var n=i(8),r=i(39),s=i(25),a=i(161),o=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in o||r(t,"flags")||!s(o,t)?e:n(a,t)}},(t,e,i)=>{var n=i(47);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},(t,e,i)=>{var n=i(14),r=Map.prototype;t.exports={Map:Map,set:n(r.set),get:n(r.get),has:n(r.has),remove:n(r.delete),proto:r}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SerializableEmpty=e.PrintAnnotationStorage=e.AnnotationStorage=void 0,i(89),i(149),i(152);var n=i(1),r=i(164),s=i(170);const a=Object.freeze({map:null,hash:"",transfers:void 0});e.SerializableEmpty=a;class o{#v=!1;#_=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const i=this.#_.get(t);return void 0===i?e:Object.assign(e,i)}getRawValue(t){return this.#_.get(t)}remove(t){if(this.#_.delete(t),0===this.#_.size&&this.resetModified(),"function"===typeof this.onAnnotationEditor){for(const t of this.#_.values())if(t instanceof r.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(t,e){const i=this.#_.get(t);let n=!1;if(void 0!==i)for(const[r,s]of Object.entries(e))i[r]!==s&&(n=!0,i[r]=s);else n=!0,this.#_.set(t,e);n&&this.#y(),e instanceof r.AnnotationEditor&&"function"===typeof this.onAnnotationEditor&&this.onAnnotationEditor(e.constructor._type)}has(t){return this.#_.has(t)}getAll(){return this.#_.size>0?(0,n.objectFromMap)(this.#_):null}setAll(t){for(const[e,i]of Object.entries(t))this.setValue(e,i)}get size(){return this.#_.size}#y(){this.#v||(this.#v=!0,"function"===typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#v&&(this.#v=!1,"function"===typeof this.onResetModified&&this.onResetModified())}get print(){return new l(this)}get serializable(){if(0===this.#_.size)return a;const t=new Map,e=new s.MurmurHash3_64,i=[],n=Object.create(null);let o=!1;for(const[s,a]of this.#_){const i=a instanceof r.AnnotationEditor?a.serialize(!1,n):a;i&&(t.set(s,i),e.update(`${s}:${JSON.stringify(i)}`),o||=!!i.bitmap)}if(o)for(const r of t.values())r.bitmap&&i.push(r.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfers:i}:a}}e.AnnotationStorage=o;class l extends o{#A;constructor(t){super();const{map:e,hash:i,transfers:n}=t.serializable,r=structuredClone(e,null);this.#A={map:r,hash:i,transfers:n}}get print(){(0,n.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#A}}e.PrintAnnotationStorage=l},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationEditor=void 0,i(89),i(2);var n=i(165),r=i(1),s=i(168);class a{#S="";#x=!1;#w=null;#E=null;#C=null;#T=!1;#P=null;#k=this.focusin.bind(this);#M=this.focusout.bind(this);#R=!1;#F=!1;#D=!1;_initialOptions=Object.create(null);_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#I=!1;#O=a._zIndex++;static _borderLineWidth=-1;static _colorManager=new n.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(t){this.constructor===a&&(0,r.unreachable)("Cannot initialize AnnotationEditor."),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:e,rawDims:{pageWidth:i,pageHeight:n,pageX:s,pageY:o}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[i,n],this.pageTranslation=[s,o];const[l,c]=this.parentDimensions;this.x=t.x/l,this.y=t.y/c,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,r.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new o({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(a._l10nPromise||=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map((e=>[e,t.get(e)]))),e?.strings)for(const n of e.strings)a._l10nPromise.set(n,t.get(n));if(-1!==a._borderLineWidth)return;const i=getComputedStyle(document.documentElement);a._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){(0,r.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#I}set _isDraggable(t){this.#I=t,this.div?.classList.toggle("draggable",t)}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(2*t),this.y+=this.width*t/(2*e);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(2*t),this.y-=this.width*t/(2*e);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}
1setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#O}setParent(t){null!==t&&(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#R?this.#R=!1:this.parent.setSelected(this))}focusout(t){this._focusEventsAllowed&&this.isAttachedToDOM&&(t.relatedTarget?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove()))}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,i,n){const[r,s]=this.parentDimensions;[i,n]=this.screenToPageTranslation(i,n),this.x=(t+i)/r,this.y=(e+n)/s,this.fixAndSetPosition()}#L(t,e,i){let[n,r]=t;[e,i]=this.screenToPageTranslation(e,i),this.x+=e/n,this.y+=i/r,this.fixAndSetPosition()}translate(t,e){this.#L(this.parentDimensions,t,e)}translateInPage(t,e){this.#L(this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}drag(t,e){const[i,n]=this.parentDimensions;if(this.x+=t/i,this.y+=e/n,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:t,y:e}=this.div.getBoundingClientRect();this.parent.findNewParent(this,t,e)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:r,y:s}=this;const[a,o]=this.#N();r+=a,s+=o,this.div.style.left=`${(100*r).toFixed(2)}%`,this.div.style.top=`${(100*s).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}#N(){const[t,e]=this.parentDimensions,{_borderLineWidth:i}=a,n=i/t,r=i/e;switch(this.rotation){case 90:return[-n,r];case 180:return[n,r];case 270:return[n,-r];default:return[-n,-r]}}fixAndSetPosition(){const[t,e]=this.pageDimensions;let{x:i,y:n,width:r,height:s}=this;switch(r*=t,s*=e,i*=t,n*=e,this.rotation){case 0:i=Math.max(0,Math.min(t-r,i)),n=Math.max(0,Math.min(e-s,n));break;case 90:i=Math.max(0,Math.min(t-s,i)),n=Math.min(e,Math.max(r,n));break;case 180:i=Math.min(t,Math.max(r,i)),n=Math.min(e,Math.max(s,n));break;case 270:i=Math.min(t,Math.max(s,i)),n=Math.max(0,Math.min(e-r,n))}this.x=i/=t,this.y=n/=e;const[a,o]=this.#N();i+=a,n+=o;const{style:l}=this.div;l.left=`${(100*i).toFixed(2)}%`,l.top=`${(100*n).toFixed(2)}%`,this.moveInDOM()}static#B(t,e,i){switch(i){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}}screenToPageTranslation(t,e){return a.#B(t,e,this.parentRotation)}pageTranslationToScreen(t,e){return a.#B(t,e,360-this.parentRotation)}#j(t){switch(t){case 90:{const[t,e]=this.pageDimensions;return[0,-t/e,e/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,e]=this.pageDimensions;return[0,t/e,-e/t,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,i]}=this,n=e*t,s=i*t;return r.FeatureTest.isCSSRoundSupported?[Math.round(n),Math.round(s)]:[n,s]}setDims(t,e){const[i,n]=this.parentDimensions;this.div.style.width=`${(100*t/i).toFixed(2)}%`,this.#T||(this.div.style.height=`${(100*e/n).toFixed(2)}%`),this.#w?.classList.toggle("small",t<a.SMALL_EDITOR_SIZE||e<a.SMALL_EDITOR_SIZE)}fixDims(){const{style:t}=this.div,{height:e,width:i}=t,n=i.endsWith("%"),r=!this.#T&&e.endsWith("%");if(n&&r)return;const[s,a]=this.parentDimensions;n||(t.width=`${(100*parseFloat(i)/s).toFixed(2)}%`),this.#T||r||(t.height=`${(100*parseFloat(e)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#U(){if(this.#P)return;this.#P=document.createElement("div"),this.#P.classList.add("resizers");const t=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||t.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const e of t){const t=document.createElement("div");this.#P.append(t),t.classList.add("resizer",e),t.addEventListener("pointerdown",this.#z.bind(this,e)),t.addEventListener("contextmenu",s.noContextMenu)}this.div.prepend(this.#P)}#z(t,e){e.preventDefault();const{isMac:i}=r.FeatureTest.platform;if(0!==e.button||e.ctrlKey&&i)return;const n=this.#H.bind(this,t),s=this._isDraggable;this._isDraggable=!1;const a={passive:!0,capture:!0};window.addEventListener("pointermove",n,a);const o=this.x,l=this.y,c=this.width,h=this.height,d=this.parent.div.style.cursor,u=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const p=()=>{this._isDraggable=s,window.removeEventListener("pointerup",p),window.removeEventListener("blur",p),window.removeEventListener("pointermove",n,a),this.parent.div.style.cursor=d,this.div.style.cursor=u;const t=this.x,e=this.y,i=this.width,r=this.height;t===o&&e===l&&i===c&&r===h||this.addCommands({cmd:()=>{this.width=i,this.height=r,this.x=t,this.y=e;const[n,s]=this.parentDimensions;this.setDims(n*i,s*r),this.fixAndSetPosition()},undo:()=>{this.width=c,this.height=h,this.x=o,this.y=l;const[t,e]=this.parentDimensions;this.setDims(t*c,e*h),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",p),window.addEventListener("blur",p)}#H(t,e){const[i,n]=this.parentDimensions,r=this.x,s=this.y,o=this.width,l=this.height,c=a.MIN_SIZE/i,h=a.MIN_SIZE/n,d=t=>Math.round(1e4*t)/1e4,u=this.#j(this.rotation),p=(t,e)=>[u[0]*t+u[2]*e,u[1]*t+u[3]*e],g=this.#j(360-this.rotation);let f,m,b=!1,v=!1;switch(t){case"topLeft":b=!0,f=(t,e)=>
1[0,0],m=(t,e)=>[t,e];break;case"topMiddle":f=(t,e)=>[t/2,0],m=(t,e)=>[t/2,e];break;case"topRight":b=!0,f=(t,e)=>[t,0],m=(t,e)=>[0,e];break;case"middleRight":v=!0,f=(t,e)=>[t,e/2],m=(t,e)=>[0,e/2];break;case"bottomRight":b=!0,f=(t,e)=>[t,e],m=(t,e)=>[0,0];break;case"bottomMiddle":f=(t,e)=>[t/2,e],m=(t,e)=>[t/2,0];break;case"bottomLeft":b=!0,f=(t,e)=>[0,e],m=(t,e)=>[t,0];break;case"middleLeft":v=!0,f=(t,e)=>[0,e/2],m=(t,e)=>[t,e/2]}const _=f(o,l),y=m(o,l);let A=p(...y);const S=d(r+A[0]),x=d(s+A[1]);let w=1,E=1,[C,T]=this.screenToPageTranslation(e.movementX,e.movementY);var P,k;if([C,T]=(P=C/i,k=T/n,[g[0]*P+g[2]*k,g[1]*P+g[3]*k]),b){const t=Math.hypot(o,l);w=E=Math.max(Math.min(Math.hypot(y[0]-_[0]-C,y[1]-_[1]-T)/t,1/o,1/l),c/o,h/l)}else v?w=Math.max(c,Math.min(1,Math.abs(y[0]-_[0]-C)))/o:E=Math.max(h,Math.min(1,Math.abs(y[1]-_[1]-T)))/l;const M=d(o*w),R=d(l*E);A=p(...m(M,R));const F=S-A[0],D=x-A[1];this.width=M,this.height=R,this.x=F,this.y=D,this.setDims(i*M,n*R),this.fixAndSetPosition()}async addAltTextButton(){if(this.#w)return;const t=this.#w=document.createElement("button");t.className="altText";const e=await a._l10nPromise.get("editor_alt_text_button_label");if(t.textContent=e,t.setAttribute("aria-label",e),t.tabIndex="0",t.addEventListener("contextmenu",s.noContextMenu),t.addEventListener("pointerdown",(t=>t.stopPropagation())),t.addEventListener("click",(t=>{t.preventDefault(),this._uiManager.editAltText(this)}),{capture:!0}),t.addEventListener("keydown",(e=>{e.target===t&&"Enter"===e.key&&(e.preventDefault(),this._uiManager.editAltText(this))})),this.#W(),this.div.append(t),!a.SMALL_EDITOR_SIZE){const e=40;a.SMALL_EDITOR_SIZE=Math.min(128,Math.round(t.getBoundingClientRect().width*(1+e/100)))}}async#W(){const t=this.#w;if(!t)return;if(!this.#S&&!this.#x)return t.classList.remove("done"),void this.#E?.remove();a._l10nPromise.get("editor_alt_text_edit_button_label").then((e=>{t.setAttribute("aria-label",e)}));let e=this.#E;if(!e){this.#E=e=document.createElement("span"),e.className="tooltip",e.setAttribute("role","tooltip");const i=e.id=`alt-text-tooltip-${this.id}`;t.setAttribute("aria-describedby",i);const n=100;t.addEventListener("mouseenter",(()=>{this.#C=setTimeout((()=>{this.#C=null,this.#E.classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})}),n)})),t.addEventListener("mouseleave",(()=>{clearTimeout(this.#C),this.#C=null,this.#E?.classList.remove("show")}))}t.classList.add("done"),e.innerText=this.#x?await a._l10nPromise.get("editor_alt_text_decorative_tooltip"):this.#S,e.parentNode||t.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:this.#S,decorative:this.#x}}set altTextData(t){let{altText:e,decorative:i}=t;this.#S===e&&this.#x===i||(this.#S=e,this.#x=i,this.#W())}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",this.#k),this.div.addEventListener("focusout",this.#M);const[t,e]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*e/t).toFixed(2)}%`,this.div.style.maxHeight=`${(100*t/e).toFixed(2)}%`);const[i,r]=this.getInitialTranslation();return this.translate(i,r),(0,n.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(t){const{isMac:e}=r.FeatureTest.platform;0!==t.button||t.ctrlKey&&e?t.preventDefault():(this.#R=!0,this.#q(t))}#q(t){if(!this._isDraggable)return;const e=this._uiManager.isSelected(this);let i,n;this._uiManager.setUpDragSession(),e&&(i={passive:!0,capture:!0},n=t=>{const[e,i]=this.screenToPageTranslation(t.movementX,t.movementY);this._uiManager.dragSelectedEditors(e,i)},window.addEventListener("pointermove",n,i));const s=()=>
1{if(window.removeEventListener("pointerup",s),window.removeEventListener("blur",s),e&&window.removeEventListener("pointermove",n,i),this.#R=!1,!this._uiManager.endDragSession()){const{isMac:e}=r.FeatureTest.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",s),window.addEventListener("blur",s)}moveInDOM(){this.parent?.moveEditorInDOM(this)}_setParentAndPosition(t,e,i){t.changeParent(this),this.x=e,this.y=i,this.fixAndSetPosition()}getRect(t,e){const i=this.parentScale,[n,r]=this.pageDimensions,[s,a]=this.pageTranslation,o=t/i,l=e/i,c=this.x*n,h=this.y*r,d=this.width*n,u=this.height*r;switch(this.rotation){case 0:return[c+o+s,r-h-l-u+a,c+o+d+s,r-h-l+a];case 90:return[c+l+s,r-h+o+a,c+l+u+s,r-h+o+d+a];case 180:return[c-o-d+s,r-h+l+a,c-o+s,r-h+l+u+a];case 270:return[c-l-u+s,r-h-o-d+a,c-l+s,r-h-o+a];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[i,n,r,s]=t,a=r-i,o=s-n;switch(this.rotation){case 0:return[i,e-s,a,o];case 90:return[i,e-n,o,a];case 180:return[r,e-n,a,o];case 270:return[r,e-s,o,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#D=!0}disableEditMode(){this.#D=!1}isInEditMode(){return this.#D}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#k),this.div?.addEventListener("focusout",this.#M)}serialize(){(0,r.unreachable)("An editor must be serializable")}static deserialize(t,e,i){const n=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:i});n.rotation=t.rotation;const[r,s]=n.pageDimensions,[a,o,l,c]=n.getRectInCurrentCoords(t.rect,s);return n.x=a/r,n.y=o/s,n.width=l/r,n.height=c/s,n}remove(){this.div.removeEventListener("focusin",this.#k),this.div.removeEventListener("focusout",this.#M),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#w?.remove(),this.#w=null,this.#E=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#U(),this.#P.classList.remove("hidden"))}select(){this.makeResizable(),this.div?.classList.add("selectedEditor")}unselect(){this.#P?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(t,e){}disableEditing(){this.#w&&(this.#w.hidden=!0)}enableEditing(){this.#w&&(this.#w.hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return this.#F}set isEditing(t){this.#F=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){this.#T=!0;const i=t/e,{style:n}=this.div;n.aspectRatio=i,n.height="auto"}static get MIN_SIZE(){return 16}}e.AnnotationEditor=a;class o extends a{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardManager=e.CommandManager=e.ColorManager=e.AnnotationEditorUIManager=void 0,e.bindEvents=function(t,e,i){for(const n of i)e.addEventListener(n,t[n].bind(t))},e.opacityToHex=function(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")},i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(2),i(89),i(125),i(136),i(138),i(141),i(143),i(145),i(147),i(166);var n=i(1),r=i(168);class s{#G=0;getId(){return`${n.AnnotationEditorPrefix}${this.#G++}`}}class a{#V=(0,n.getUuid)();#G=0;#$=null;static get _isSVGFittingCanvas(){const t=new OffscreenCanvas(1,3).getContext("2d"),e=new Image;e.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';const i=e.decode().then((()=>(t.drawImage(e,0,0,1,1,0,0,1,3),0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0])));return(0,n.shadow)(this,"_isSVGFittingCanvas",i)}async#X(t,e){this.#$||=new Map;let i=this.#$.get(t);if(null===i)return null;if(i?.bitmap)return i.refCounter+=1,i;try{let t;if(i||={bitmap:null,id:`image_${this.#V}_${this.#G++}`,refCounter:0,isSvg:!1},"string"===typeof e){i.url=e;const n=await fetch(e);if(!n.ok)throw new Error(n.statusText);t=await n.blob()}else t=i.file=e;if("image/svg+xml"===t.type){const e=a._isSVGFittingCanvas,n=new FileReader,r=new Image,s=new Promise(((t,s)=>{r.onload=()=>{i.bitmap=r,i.isSvg=!0,t()},n.onload=async()=>{const t=i.svgUrl=n.result;r.src=await e?`${t}#svgView(preserveAspectRatio(none))`:t},r.onerror=n.onerror=s}));n.readAsDataURL(t),await s}else i.bitmap=await createImageBitmap(t);i.refCounter=1}catch(n){console.error(n),i=null}return this.#$.set(t,i),i&&this.#$.set(i.id,i),i}async getFromFile(t){const{lastModified:e,name:i,size:n,type:r}=t;return this.#X(`${e}_${i}_${n}_${r}`,t)}async getFromUrl(t){return this.#X(t,t)}async getFromId(t){this.#$||=new Map;const e=this.#$.get(t);return e?e.bitmap?(e.refCounter+=1,e):e.file?this.getFromFile(e.file):this.getFromUrl(e.url):null}getSvgUrl(t){const e=this.#$.get(t);return e?.isSvg?e.svgUrl:null}deleteId(t){this.#$||=new Map;const e=this.#$.get(t);e&&(e.refCounter-=1,0===e.refCounter&&(e.bitmap=null))}isValidId(t){return t.startsWith(`image_${this.#V}_`)}}class o{#K=[];#Y=!1;#J;#Q=-1;constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;this.#J=t}add(t){let{cmd:e,undo:i,mustExec:n,type:r=NaN,overwriteIfSameType:s=!1,keepUndo:a=!1}=t;if(n&&e(),this.#Y)return;const o={cmd:e,undo:i,type:r};if(-1===this.#Q)return this.#K.length>0&&(this.#K.length=0),this.#Q=0,void this.#K.push(o);if(s&&this.#K[this.#Q].type===r)return a&&(o.undo=this.#K[this.#Q].undo),void(this.#K[this.#Q]=o);const l=this.#Q+1;l===this.#J?this.#K.splice(0,1):(this.#Q=l,l<this.#K.length&&this.#K.splice(l)),this.#K.push(o)}undo(){-1!==this.#Q&&(this.#Y=!0,this.#K[this.#Q].undo(),this.#Y=!1,this.#Q-=1)}redo(){this.#Q<this.#K.length-1&&(this.#Q+=1,this.#Y=!0,this.#K[this.#Q].cmd(),this.#Y=!1)}hasSomethingToUndo(){return-1!==this.#Q}hasSomethingToRedo(){return this.#Q<this.#K.length-1}destroy(){this.#K=null}}e.CommandManager=o;class l{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=n.FeatureTest.platform;for(const[i,n,r={}]of t)for(const t of i){const i=t.startsWith("mac+");e&&i?(this.callbacks.set(t.slice(4),{callback:n,options:r}),this.allKeys.add(t.split("+").at(-1))):e||i||(this.callbacks.set(t,{callback:n,options:r}),this.allKeys.add(t.split("+").at(-1)))}}#Z(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e}exec(t,e){if(!this.allKeys.has(e.key))return;const i=this.callbacks.get(this.#Z(e));if(!i)return;const{callback:n,options:{bubbles:r=!1,args:s=[],checker:a=null}}=i;a&&!a(t,e)||(n.bind(t,...s)(),r||(e.stopPropagation(),e.preventDefault()))}}e.KeyboardManager=l;class c{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return(0,r.getColorValues)(t),(0,n.shadow)(this,"_colors",t)}convert(t){const e=(0,r.getRGB)(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[i,n]of this._colors)if(n.every(((t,i)=>t===e[i])))return c._colorsMapping.get(i);return e}getHexCode(t){const e=this._colors.get(t);return e?n.Util.makeHexColor(...e):t}}e.ColorManager=c;class h{#tt=null;#et=new Map;#it=new Map;#nt=null;#rt=null;#st=new o;#at=0;#ot=new Set;#lt=null;#ct=null;#ht=new Set;#dt=null;#ut=new s;#pt=!1;#gt=!1;#ft=null;#mt=n.AnnotationEditorType.NONE;#bt=new Set;#vt=null;#_t=this.blur.bind(this);#yt=this.focus.bind(this);#At=this.copy.bind(this);#St=this.cut.bind(this);#xt=this.paste.bind(this);#wt=this.keydown.bind(this);#Et=this.onEditingAction.bind(this);#Ct=this.onPageChanging.bind(this);#Tt=this.onScaleChanging.bind(this);#Pt=this.onRotationChanging.bind(this);#kt={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#Mt=[0,0];#Rt=null;#Ft=null;#Dt=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=h.prototype,e=t=>{const{activeElement:e}=document;return e&&t.#Ft.contains(e)&&t.hasSomethingToControl()},i=this.TRANSLATE_SMALL,r=this.TRANSLATE_BIG;return(0,n.shadow)(this,"_keyboardManager",new l([[["ctrl+a","mac+meta+a"],t.selectAll],[["ctrl+z","mac+meta+z"],t.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:e}]]))}constructor(t,e,i,n,s,a){this.#Ft=t,this.#Dt=e,this.#nt=i,this._eventBus=n,this._eventBus._on("editingaction",this.#
1Et),this._eventBus._on("pagechanging",this.#Ct),this._eventBus._on("scalechanging",this.#Tt),this._eventBus._on("rotationchanging",this.#Pt),this.#rt=s.annotationStorage,this.#dt=s.filterFactory,this.#vt=a,this.viewParameters={realScale:r.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#It(),this.#Ot(),this._eventBus._off("editingaction",this.#Et),this._eventBus._off("pagechanging",this.#Ct),this._eventBus._off("scalechanging",this.#Tt),this._eventBus._off("rotationchanging",this.#Pt);for(const t of this.#it.values())t.destroy();this.#it.clear(),this.#et.clear(),this.#ht.clear(),this.#tt=null,this.#bt.clear(),this.#st.destroy(),this.#nt.destroy()}get hcmFilter(){return(0,n.shadow)(this,"hcmFilter",this.#vt?this.#dt.addHCMFilter(this.#vt.foreground,this.#vt.background):"none")}get direction(){return(0,n.shadow)(this,"direction",getComputedStyle(this.#Ft).direction)}editAltText(t){this.#nt?.editAltText(this,t)}onPageChanging(t){let{pageNumber:e}=t;this.#at=e-1}focusMainContainer(){this.#Ft.focus()}findParent(t,e){for(const i of this.#it.values()){const{x:n,y:r,width:s,height:a}=i.div.getBoundingClientRect();if(t>=n&&t<=n+s&&e>=r&&e<=r+a)return i}return null}disableUserSelect(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#Dt.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#ht.add(t)}removeShouldRescale(t){this.#ht.delete(t)}onScaleChanging(t){let{scale:e}=t;this.commitOrRemove(),this.viewParameters.realScale=e*r.PixelsPerInch.PDF_TO_CSS_UNITS;for(const i of this.#ht)i.onScaleChanging()}onRotationChanging(t){let{pagesRotation:e}=t;this.commitOrRemove(),this.viewParameters.rotation=e}addToAnnotationStorage(t){t.isEmpty()||!this.#rt||this.#rt.has(t.id)||this.#rt.setValue(t.id,t)}#Lt(){window.addEventListener("focus",this.#yt),window.addEventListener("blur",this.#_t)}#Ot(){window.removeEventListener("focus",this.#yt),window.removeEventListener("blur",this.#_t)}blur(){if(!this.hasSelection)return;const{activeElement:t}=document;for(const e of this.#bt)if(e.div.contains(t)){this.#ft=[e,t],e._focusEventsAllowed=!1;break}}focus(){if(!this.#ft)return;const[t,e]=this.#ft;this.#ft=null,e.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0}),e.focus()}#Nt(){window.addEventListener("keydown",this.#wt,{capture:!0})}#It(){window.removeEventListener("keydown",this.#wt,{capture:!0})}#Bt(){document.addEventListener("copy",this.#At),document.addEventListener("cut",this.#St),document.addEventListener("paste",this.#xt)}#jt(){document.removeEventListener("copy",this.#At),document.removeEventListener("cut",this.#St),document.removeEventListener("paste",this.#xt)}addEditListeners(){this.#Nt(),this.#Bt()}removeEditListeners(){this.#It(),this.#jt()}copy(t){if(t.preventDefault(),this.#tt?.commitOrRemove(),!this.hasSelection)return;const e=[];for(const i of this.#bt){const t=i.serialize(!0);t&&e.push(t)}0!==e.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}paste(t){t.preventDefault();const{clipboardData:e}=t;for(const n of e.items)for(const t of this.#ct)if(t.isHandlingMimeForPasting(n.type))return void t.paste(n,this.currentLayer);let i=e.getData("application/pdfjs");if(!i)return;try{i=JSON.parse(i)}catch(s){return void(0,n.warn)(`paste: "${s.message}".`)}if(!Array.isArray(i))return;this.unselectAll();const r=this.currentLayer;try{const t=[];for(const s of i){const e=r.deserialize(s);if(!e)return;t.push(e)}const e=()=>{for(const e of t)this.#Ut(e);this.#zt(t)},n=()=>{for(const e of t)e.remove()};this.addCommands({cmd:e,undo:n,mustExec:!0})}catch(s){(0,n.warn)(`paste: "${s.message}".`)}}keydown(t){this.getActive()?.shouldGetKeyboardEvents()||h._keyboardManager.exec(this,t)}onEditingAction(t){["undo","redo","delete","selectAll"].includes(t.name)&&this[t.name]()}#Ht(t){Object.entries(t).some((t=>{let[e,i]=t;return this.#kt[e]!==i}))&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#kt,t)})}#Wt(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#Lt(),this.#Nt(),this.#Bt(),this.#Ht({isEditing:this.#mt!==n.AnnotationEditorType.NONE,isEmpty:this.#qt(),hasSomethingToUndo:this.#st.hasSomethingToUndo(),hasSomethingToRedo:this.#st.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Ot(),this.#It(),this.#jt(),this.#Ht({isEditing:!1}),this.disableUserSelect(!1))}
1registerEditorTypes(t){if(!this.#ct){this.#ct=t;for(const t of this.#ct)this.#Wt(t.defaultPropertiesToUpdate)}}getId(){return this.#ut.getId()}get currentLayer(){return this.#it.get(this.#at)}getLayer(t){return this.#it.get(t)}get currentPageIndex(){return this.#at}addLayer(t){this.#it.set(t.pageIndex,t),this.#pt?t.enable():t.disable()}removeLayer(t){this.#it.delete(t.pageIndex)}updateMode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.#mt!==t){if(this.#mt=t,t===n.AnnotationEditorType.NONE)return this.setEditingState(!1),void this.#Gt();this.setEditingState(!0),this.#Vt(),this.unselectAll();for(const e of this.#it.values())e.updateMode(t);if(e)for(const t of this.#et.values())if(t.annotationElementId===e){this.setSelected(t),t.enterInEditMode();break}}}updateToolbar(t){t!==this.#mt&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,e){if(this.#ct)if(t!==n.AnnotationEditorParamsType.CREATE){for(const i of this.#bt)i.updateParams(t,e);for(const i of this.#ct)i.updateDefaultParams(t,e)}else this.currentLayer.addNewEditor(t)}enableWaiting(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.#gt!==t){this.#gt=t;for(const e of this.#it.values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}#Vt(){if(!this.#pt){this.#pt=!0;for(const t of this.#it.values())t.enable()}}#Gt(){if(this.unselectAll(),this.#pt){this.#pt=!1;for(const t of this.#it.values())t.disable()}}getEditors(t){const e=[];for(const i of this.#et.values())i.pageIndex===t&&e.push(i);return e}getEditor(t){return this.#et.get(t)}addEditor(t){this.#et.set(t.id,t)}removeEditor(t){this.#et.delete(t.id),this.unselect(t),t.annotationElementId&&this.#ot.has(t.annotationElementId)||this.#rt?.remove(t.id)}addDeletedAnnotationElement(t){this.#ot.add(t.annotationElementId),t.deleted=!0}isDeletedAnnotationElement(t){return this.#ot.has(t)}removeDeletedAnnotationElement(t){this.#ot.delete(t.annotationElementId),t.deleted=!1}#Ut(t){const e=this.#it.get(t.pageIndex);e?e.addOrRebuild(t):this.addEditor(t)}setActiveEditor(t){this.#tt!==t&&(this.#tt=t,t&&this.#Wt(t.propertiesToUpdate))}toggleSelected(t){if(this.#bt.has(t))return this.#bt.delete(t),t.unselect(),void this.#Ht({hasSelectedEditor:this.hasSelection});this.#bt.add(t),t.select(),this.#Wt(t.propertiesToUpdate),this.#Ht({hasSelectedEditor:!0})}setSelected(t){for(const e of this.#bt)e!==t&&e.unselect();this.#bt.clear(),this.#bt.add(t),t.select(),this.#Wt(t.propertiesToUpdate),this.#Ht({hasSelectedEditor:!0})}isSelected(t){return this.#bt.has(t)}unselect(t){t.unselect(),this.#bt.delete(t),this.#Ht({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#bt.size}undo(){this.#st.undo(),this.#Ht({hasSomethingToUndo:this.#st.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#qt()})}redo(){this.#st.redo(),this.#Ht({hasSomethingToUndo:!0,hasSomethingToRedo:this.#st.hasSomethingToRedo(),isEmpty:this.#qt()})}addCommands(t){this.#st.add(t),this.#Ht({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#qt()})}
vendor: 5,054 bytes, line 1
1#qt(){if(0===this.#et.size)return!0;if(1===this.#et.size)for(const t of this.#et.values())return t.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const t=[...this.#bt];this.addCommands({cmd:()=>{for(const e of t)e.remove()},undo:()=>{for(const e of t)this.#Ut(e)},mustExec:!0})}commitOrRemove(){this.#tt?.commitOrRemove()}hasSomethingToControl(){return this.#tt||this.hasSelection}#zt(t){this.#bt.clear();for(const e of t)e.isEmpty()||(this.#bt.add(e),e.select());this.#Ht({hasSelectedEditor:!0})}selectAll(){for(const t of this.#bt)t.commit();this.#zt(this.#et.values())}unselectAll(){if(this.#tt)this.#tt.commitOrRemove();else if(this.hasSelection){for(const t of this.#bt)t.unselect();this.#bt.clear(),this.#Ht({hasSelectedEditor:!1})}}translateSelectedEditors(t,e){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove(),!this.hasSelection)return;this.#Mt[0]+=t,this.#Mt[1]+=e;const[i,n]=this.#Mt,r=[...this.#bt];this.#Rt&&clearTimeout(this.#Rt),this.#Rt=setTimeout((()=>{this.#Rt=null,this.#Mt[0]=this.#Mt[1]=0,this.addCommands({cmd:()=>{for(const t of r)this.#et.has(t.id)&&t.translateInPage(i,n)},undo:()=>{for(const t of r)this.#et.has(t.id)&&t.translateInPage(-i,-n)},mustExec:!1})}),1e3);for(const s of r)s.translateInPage(t,e)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#lt=new Map;for(const t of this.#bt)this.#lt.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#lt)return!1;this.disableUserSelect(!1);const t=this.#lt;this.#lt=null;let e=!1;for(const[{x:n,y:r,pageIndex:s},a]of t)a.newX=n,a.newY=r,a.newPageIndex=s,e||=n!==a.savedX||r!==a.savedY||s!==a.savedPageIndex;if(!e)return!1;const i=(t,e,i,n)=>{if(this.#et.has(t.id)){const r=this.#it.get(n);r?t._setParentAndPosition(r,e,i):(t.pageIndex=n,t.x=e,t.y=i)}};return this.addCommands({cmd:()=>{for(const[e,{newX:n,newY:r,newPageIndex:s}]of t)i(e,n,r,s)},undo:()=>{for(const[e,{savedX:n,savedY:r,savedPageIndex:s}]of t)i(e,n,r,s)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(this.#lt)for(const i of this.#lt.keys())i.drag(t,e)}rebuild(t){if(null===t.parent){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}isActive(t){return this.#tt===t}getActive(){return this.#tt}getMode(){return this.#mt}get imageManager(){return(0,n.shadow)(this,"imageManager",new a)}}e.AnnotationEditorUIManager=h},(t,e,i)=>{var n=i(3),r=i(6),s=i(4),a=i(24),o=i(14),l=i(8),c=i(21),h=i(20),d=i(91),u=i(39),p=i(77),g=i(64),f=i(159),m=i(7),b=i(167),v=i(27),_=s.JSON,y=s.Number,A=s.SyntaxError,S=_&&_.parse,x=a("Object","keys"),w=Object.getOwnPropertyDescriptor,E=o("".charAt),C=o("".slice),T=o(/./.exec),P=o([].push),k=/^\d$/,M=/^[1-9]$/,R=/^(?:-|\d)$/,F=/^[\t\n\r ]$/,D=function(t,e,i,n){var r,s,a,o,c,p=t[e],f=n&&p===n.value,m=f&&"string"==typeof n.source?{source:n.source}:{};if(h(p)){var b=d(p),v=f?n.nodes:b?[]:{};if(b)for(r=v.length,a=g(p),o=0;o<a;o++)I(p,o,D(p,""+o,i,o<r?v[o]:void 0));else for(s=x(p),a=g(s),o=0;o<a;o++)c=s[o],I(p,c,D(p,c,i,u(v,c)?v[c]:void 0))}return l(i,t,e,p,m)},I=function(t,e,i){if(r){var n=w(t,e);if(n&&!n.configurable)return}void 0===i?delete t[e]:f(t,e,i)},O=function(t,e,i,n){this.value=t,this.end=e,this.source=i,this.nodes=n},L=function(t,e){this.source=t,this.index=e};L.prototype={fork:function(t){return new L(this.source,t)},parse:function(){var t=this.source,e=this.skip(F,this.index),i=this.fork(e),n=E(t,e);if(T(R,n))return i.number();switch(n){case"{":return i.object();case"[":return i.array();case'"':return i.string();case"t":return i.keyword(!0);case"f":return i.keyword(!1);case"n":return i.keyword(null)}throw A('Unexpected character: "'+n+'" at: '+e)},node:function(t,e,i,n,r){return new O(e,n,t?null:C(this.source,i,n),r)},object:function(){for(var t=this.source,e=this.index+1,i=!1,n={},r={};e<t.length;){if(e=this.until(['"',"}"],e),"}"===E(t,e)&&!i){e++;break}var s=this.fork(e).string(),a=s.value;e=s.end,e=this.until([":"],e)+1,e=this.skip(F,e),s=this.fork(e).parse(),f(r,a,s),f(n,a,s.value),e=this.until([",","}"],s.end);var o=E(t,e);if(","===o)i=!0,e++;else if("}"===o){e++;break}}return this.node(1,n,this.index,e,r)},array:function(){for(var t=this.source,e=this.index+1,i=!1,n=[],r=[];e<t.length;){if(e=this.skip(F,e),"]"===E(t,e)&&!i){e++;break}var s=this.fork(e).parse();if(P(r,s),P(n,s.value),e=this.until([",","]"],s.end),","===E(t,e))i=!0,e++;else if("]"===E(t,e)){e++;break}}return this.node(1,n,this.index,e,r)},string:function(){var t=this.index,e=b(this.source,this.index+1);return this.node(0,e.value,t,e.end)},number:function(){var t=this.source,e=this.index,i=e;if("-"===E(t,i)&&i++,"0"===E(t,i))i++;else{if(!T(M,E(t,i)))throw A("Failed to parse number at: "+i);i=this.skip(k,++i)}if("."===E(t,i)&&(i=this.skip(k,++i)),("e"===E(t,i)||"E"===E(t,i))&&(i++,"+"!==E(t,i)&&"-"!==E(t,i)||i++,i===(i=this.skip(k,i))))throw A("Failed to parse number's exponent value at: "+i);
1return this.node(0,y(C(t,e,i)),e,i)},keyword:function(t){var e=""+t,i=this.index,n=i+e.length;if(C(this.source,i,n)!==e)throw A("Failed to parse value at: "+i);return this.node(0,t,i,n)},skip:function(t,e){for(var i=this.source;e<i.length&&T(t,E(i,e));e++);return e},until:function(t,e){e=this.skip(F,e);for(var i=E(this.source,e),n=0;n<t.length;n++)if(t[n]===i)return e;throw A('Unexpected character: "'+i+'" at: '+e)}};var N=m((function(){var t,e="9007199254740993";return S(e,(function(e,i,n){t=n.source})),t!==e})),B=v&&!m((function(){return 1/S("-0 \t")!==-1/0}));n({target:"JSON",stat:!0,forced:N},{parse:function(t,e){return B&&!c(e)?S(t):function(t,e){t=p(t);var i=new L(t,0,""),n=i.parse(),r=n.value,s=i.skip(F,n.end);if(s<t.length)throw A('Unexpected extra character: "'+E(t,s)+'" after the parsed data at: '+s);return c(e)?D({"":r},"",e,n):r}(t,e)}})},(t,e,i)=>{var n=i(14),r=i(39),s=SyntaxError,a=parseInt,o=String.fromCharCode,l=n("".charAt),c=n("".slice),h=n(/./.exec),d={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},u=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;t.exports=function(t,e){for(var i=!0,n="";e<t.length;){var g=l(t,e);if("\\"===g){var f=c(t,e,e+2);if(r(d,f))n+=d[f],e+=2;else{if("\\u"!==f)throw s('Unknown escape sequence: "'+f+'"');var m=c(t,e+=2,e+4);if(!h(u,m))throw s("Bad Unicode escape at: "+e);n+=o(a(m,16)),e+=4}}else{if('"'===g){i=!1,e++;break}if(h(p,g))throw s("Bad control character in string literal at: "+e);n+=g,e++}}if(i)throw s("Unterminated string at: "+e);return{value:n,end:e}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StatTimer=e.RenderingCancelledException=e.PixelsPerInch=e.PageViewport=e.PDFDateString=e.DOMStandardFontDataFactory=e.DOMSVGFactory=e.DOMFilterFactory=e.DOMCanvasFactory=e.DOMCMapReaderFactory=void 0,e.deprecated=function(t){console.log("Deprecated API usage: "+t)},e.getColorValues=function(t){const e=document.createElement("span");e.style.visibility="hidden",document.body.append(e);for(const i of t.keys()){e.style.color=i;const n=window.getComputedStyle(e).color;t.set(i,v(n))}e.remove()},e.getCurrentTransform=function(t){const{a:e,b:i,c:n,d:r,e:s,f:a}=t.getTransform();return[e,i,n,r,s,a]},e.getCurrentTransformInverse=function(t){const{a:e,b:i,c:n,d:r,e:s,f:a}=t.getTransform().invertSelf();return[e,i,n,r,s,a]},e.getFilenameFromUrl=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e||([t]=t.split(/[#?]/,1)),t.substring(t.lastIndexOf("/")+1)},e.getPdfFilenameFromUrl=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof t)return e;if(f(t))return(0,r.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,s=i.exec(t);let a=n.exec(s[1])||n.exec(s[2])||n.exec(s[3]);if(a&&(a=a[0],a.includes("%")))try{a=n.exec(decodeURIComponent(a))[0]}catch{}return a||e},e.getRGB=v,e.getXfaPageViewport=function(t,e){let{scale:i=1,rotation:n=0}=e;const{width:r,height:s}=t.attributes.style,a=[0,0,parseInt(r),parseInt(s)];return new p({viewBox:a,scale:i,rotation:n})},e.isDataScheme=f,e.isPdfFile=function(t){return"string"===typeof t&&/\.pdf$/i.test(t)},e.isValidFetchUrl=m,e.loadScript=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(((i,n)=>{const r=document.createElement("script");r.src=t,r.onload=function(t){e&&r.remove(),i(t)},r.onerror=function(){n(new Error(`Cannot load script at: ${r.src}`))},(document.head||document.documentElement).append(r)}))},e.noContextMenu=function(t){t.preventDefault()},e.setLayerDimensions=function(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e instanceof p){const{pageWidth:n,pageHeight:s}=e.rawDims,{style:a}=t,o=r.FeatureTest.isCSSRoundSupported,l=`var(--scale-factor) * ${n}px`,c=`var(--scale-factor) * ${s}px`,h=o?`round(${l}, 1px)`:`calc(${l})`,d=o?`round(${c}, 1px)`:`calc(${c})`;i&&e.rotation%180!==0?(a.width=d,a.height=h):(a.width=h,a.height=d)}n&&t.setAttribute("data-main-rotation",e.rotation)},i(2),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89),i(84),i(86),i(87);var n=i(169),r=i(1);const s="http://www.w3.org/2000/svg";class a{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}e.PixelsPerInch=a;class o extends n.BaseFilterFactory{#$t;#Xt;#e;#Kt;#Yt;#Jt;#Qt;#Zt;#te;#ee;#G=0;constructor(){let{docId:t,ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.#e=t,this.#Kt=e}get#$(){return this.#$t||=new Map}get#ie(){if(!this.#Xt){const t=this.#Kt.createElement("div"),{style:e}=t;e.visibility="hidden",e.contain="strict",e.width=e.height=0,e.position="absolute",e.top=e.left=0,e.zIndex=-1;const i=this.#Kt.createElementNS(s,"svg");i.setAttribute("width",0),i.setAttribute("height",0),this.#Xt=this.#Kt.createElementNS(s,"defs"),t.append(i),i.append(this.#Xt),this.#Kt.body.append(t)}return this.#Xt}addFilter(t){if(!t)return"none";let e,i,n,r,s=this.#$.get(t);if(s)return s;if(1===t.length){const s=t[0],a=new Array(256);for(let t=0;t<256;t++)a[t]=s[t]/255;r=e=i=n=a.join(",")}else{const[s,a,o]=t,l=new Array(256),c=new Array(256),h=new Array(256);for(let t=0;t<256;t++)l[t]=s[t]/255,c[t]=a[t]/255,h[t]=o[t]/255;e=l.join(","),i=c.join(","),n=h.join(","),r=`${e}${i}${n}`}if(s=this.#$.get(r),s)return this.#$.set(t,s),s;const a=`g_${this.#e}_transfer_map_${this.#G++}`,o=`url(#${a})`;this.#$.set(t,o),this.#$.set(r,o);const l=this.#ne(a);return this.#re(e,i,n,l),o}addHCMFilter(t,e){const i=`${t}-${e}`;if(this.#Jt===i)return this.#Qt;if(this.#Jt=i,this.#Qt="none",this.#Yt?.remove(),!t||!e)return this.#Qt;const n=this.#se(t);t=r.Util.makeHexColor(...n);const s=this.#se(e);if(e=r.Util.makeHexColor(...s),this.#ie.style.color="","#000000"===t&&"#ffffff"===e||t===e)return this.#Qt;const a=new Array(256);for(let r=0;r<=255;r++){const t=r/255;a[r]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}const o=a.join(","),l=`g_${this.#e}_hcm_filter`,c=this.#Zt=this.#ne(l);this.#re(o,o,o,c),this.#ae(c);const h=(t,e)=>{const i=n[t]/255,r=s[t]/255,a=new Array(e+1);for(let n=0;n<=e;n++)a[n]=i+n/e*(r-i);return a.join(",")};return this.#re(h(0,5),h(1,5),h(2,5),c),this.#Qt=`url(#${l})`,this.#Qt}addHighlightHCMFilter(t,e,i,n){const r=`${t}-${e}-${i}-${n}`;if(this.#te===r)return this.#ee;if(this.#te=r,this.#ee="none",this.#Zt?.remove(),!t||!e)return this.#ee;const[s,a]=[t,e].map(this.#se.bind(this));let o=Math.round(.2126*s[0]+.7152*s[1]+.0722*s[2]),l=Math.round(.2126*a[0]+.7152*a[1]+.0722*a[2]),[c,h]=[i,n].map(this.#se.bind(this));l<o&&([o,l,c,h]=[l,o,h,c]),this.#ie.style.color="";const d=(t,e,i)=>{const n=new Array(256),r=(l-o)/i,s=t/255,a=(e-t)/(255*i);let c=0;for(let l=0;l<=i;l++){const t=Math.round(o+l*r),e=s+l*a;for(let i=c;i<=t;i++)n[i]=e;c=t+1}for(let o=c;o<256;o++)n[o]=n[c-1];return n.join(",")},u=`g_${this.#e}_hcm_highlight_filter`,p=this.#Zt=this.#ne(u);return this.#ae(p),this.#re(d(c[0],h[0],5),d(c[1],h[1],5),d(c[2],h[2],5),p),this.#ee=`url(#${u})`,this.#ee}destroy(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.#Qt||this.#ee)||(this.#Xt&&(this.#Xt.parentNode.parentNode.remove(),this.#Xt=null),this.#$t&&(this.#$t.clear(),this.#$t=null),this.#G=0)}#ae(t){const e=this.#Kt.createElementNS(s,"feColorMatrix");e.setAttribute("type","matrix"),e.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"),t.append(e)}#ne(t){const e=this.#Kt.createElementNS(s,"filter");return e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("id",t),this.#ie.append(e),e}#oe(t,e,i){const n=this.#Kt.createElementNS(s,e);n.setAttribute("type","discrete"),n.setAttribute("tableValues",i),t.append(n)}#re(t,e,i,n){const r=this.#Kt.createElementNS(s,"feComponentTransfer");n.append(r),this.#oe(r,"feFuncR",t),this.#oe(r,"feFuncG",e),this.#oe(r,"feFuncB",i)}#se(t){return this.#ie.style.color=t,v(getComputedStyle(this.#ie).getPropertyValue("color"))}}e.DOMFilterFactory=o;class l extends n.BaseCanvasFactory{constructor(){let{ownerDocument:t=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._document=t}_createCanvas(t,e){const i=this._document.createElement("canvas");return i.width=t,i.height=e,i}}async function c(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(m(t,document.baseURI)){const i=await fetch(t);if(!i.ok)throw new Error(i.statusText);return e?new Uint8Array(await i.arrayBuffer()):(0,r.stringToBytes)(await i.text())}return new Promise(((i,n)=>{const s=new XMLHttpRequest;s.open("GET",t,!0),e&&(s.responseType="arraybuffer"),s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE){if(200===s.status||0===s.status){let t;if(e&&s.response?t=new Uint8Array(s.response):!e&&s.responseText&&(t=(0,r.stringToBytes)(s.responseText)),t)return void i(t)}n(new Error(s.statusText))}},s.send(null)}))}e.DOMCanvasFactory=l;class h extends n.BaseCMapReaderFactory{_fetchData(t,e){return c(t,this.isCompressed).then((t=>({cMapData:t,compressionType:e})))}}e.DOMCMapReaderFactory=h;class d extends n.BaseStandardFontDataFactory{_fetchData(t){return c(t,!0)}}e.DOMStandardFontDataFactory=d;class u extends n.BaseSVGFactory{_createSVG(t){return document.createElementNS(s,t)}}e.DOMSVGFactory=u;class p{constructor(t){let{viewBox:e,scale:i,rotation:n,offsetX:r=0,offsetY:s=0,dontFlip:a=!1}=t;this.viewBox=e,this.scale=i,this.rotation=n,this.offsetX=r,this.offsetY=s;const o=(e[2]+e[0])/2,l=(e[3]+e[1])/2;let c,h,d,u,p,g,f,m;switch(n%=360,n<0&&(n+=360),n){case 180:c=-1,h=0,d=0,u=1;break;case 90:c=0,h=1,d=1,u=0;break;case 270:c=0,h=-1,d=-1,u=0;break;case 0:c=1,h=0,d=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(d=-d,u=-u),0===c?(p=Math.abs(l-e[1])*i+r,g=Math.abs(o-e[0])*i+s,f=(e[3]-e[1])*i,m=(e[2]-e[0])*i):(p=Math.abs(o-e[0])*i+r,g=Math.abs(l-e[1])*i+s,f=(e[2]-e[0])*i,m=(e[3]-e[1])*i),this.transform=[c*i,h*i,d*i,u*i,p-c*i*o-d*i*l,g-h*i*o-u*i*l],this.width=f,this.height=m}get rawDims(){const{viewBox:t}=this;return(0,r.shadow)(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone(){let{scale:t=this.scale,rotation:e=this.rotation,offsetX:i=this.offsetX,offsetY:n=this.offsetY,dontFlip:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new p({viewBox:this.viewBox.slice(),scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:r})}convertToViewportPoint(t,e){return r.Util.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=r.Util.applyTransform([t[0],t[1]],this.transform),i=r.Util.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],i[0],i[1]]}convertToPdfPoint(t,e){return r.Util.applyInverseTransform([t,e],this.transform)}}e.PageViewport=p;class g extends r.BaseException{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;super(t,"RenderingCancelledException"),this.extraDelay=e}}function f(t){const e=t.length;let i=0;for(;i<e&&""===t[i].trim();)i++;return"data:"===t.substring(i,i+5).toLowerCase()}function m(t,e){try{const{protocol:i}=e?new URL(t,e):new URL(t);return"http:"===i||"https:"===i}catch{return!1}}let b;function v(t){if(t.startsWith("#")){const e=parseInt(t.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map((t=>parseInt(t))):t.startsWith("rgba(")?t.slice(5,-1).split(",").map((t=>parseInt(t))).slice(0,3):((0,r.warn)(`Not a valid color format: "${t}"`),[0,0,0])}e.RenderingCancelledException=g,e.StatTimer=class{started=Object.create(null);times=[];time(t){t in this.started&&(0,r.warn)(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||(0,r.warn)(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:i}of this.times)e=Math.max(i.length,e);for(const{name:i,start:n,end:r}of this.times)t.push(`${i.padEnd(e)} ${r-n}ms\n`);return t.join("")}},e.PDFDateString=class{static toDateObject(t){if(!t||"string"!==typeof t)return null;b||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const e=b.exec(t);if(!e)return null;const i=parseInt(e[1],10);let n=parseInt(e[2],10);n=n>=1&&n<=12?n-1:0;let r=parseInt(e[3],10);r=r>=1&&r<=31?r:1;let s=parseInt(e[4],10);s=s>=0&&s<=23?s:0;let a=parseInt(e[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(e[6],10);o=o>=0&&o<=59?o:0;const l=e[7]||"Z";
1let c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;let h=parseInt(e[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===l?(s+=c,a+=h):"+"===l&&(s-=c,a-=h),new Date(Date.UTC(i,n,r,s,a,o))}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseStandardFontDataFactory=e.BaseSVGFactory=e.BaseFilterFactory=e.BaseCanvasFactory=e.BaseCMapReaderFactory=void 0,i(2);var n=i(1);class r{constructor(){this.constructor===r&&(0,n.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addHighlightHCMFilter(t,e,i,n){return"none"}destroy(){}}e.BaseFilterFactory=r;class s{constructor(){this.constructor===s&&(0,n.unreachable)("Cannot initialize BaseCanvasFactory.")}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const i=this._createCanvas(t,e);return{canvas:i,context:i.getContext("2d")}}reset(t,e,i){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||i<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=i}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){(0,n.unreachable)("Abstract method `_createCanvas` called.")}}e.BaseCanvasFactory=s;class a{constructor(t){let{baseUrl:e=null,isCompressed:i=!0}=t;this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=i}async fetch(t){let{name:e}=t;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const i=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?n.CMapCompressionType.BINARY:n.CMapCompressionType.NONE;return this._fetchData(i,r).catch((t=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${i}`)}))}_fetchData(t,e){(0,n.unreachable)("Abstract method `_fetchData` called.")}}e.BaseCMapReaderFactory=a;class o{constructor(t){let{baseUrl:e=null}=t;this.constructor===o&&(0,n.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=e}async fetch(t){let{filename:e}=t;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const i=`${this.baseUrl}${e}`;return this._fetchData(i).catch((t=>{throw new Error(`Unable to load font data at: ${i}`)}))}_fetchData(t){(0,n.unreachable)("Abstract method `_fetchData` called.")}}e.BaseStandardFontDataFactory=o;class l{constructor(){this.constructor===l&&(0,n.unreachable)("Cannot initialize BaseSVGFactory.")}create(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),i||(n.setAttribute("width",`${t}px`),n.setAttribute("height",`${e}px`)),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox",`0 0 ${t} ${e}`),n}createElement(t){if("string"!==typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){(0,n.unreachable)("Abstract method `_createSVG` called.")}}e.BaseSVGFactory=l},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MurmurHash3_64=void 0,i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(2);var n=i(1);const r=3285377520,s=4294901760,a=65535;e.MurmurHash3_64=class{constructor(t){this.h1=t?4294967295&t:r,this.h2=t?4294967295&t:r}update(t){let e,i;if("string"===typeof t){e=new Uint8Array(2*t.length),i=0;for(let n=0,r=t.length;n<r;n++){const r=t.charCodeAt(n);r<=255?e[i++]=r:(e[i++]=r>>>8,e[i++]=255&r)}}else{if(!(0,n.isArrayBuffer)(t))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");e=t.slice(),i=e.byteLength}const r=i>>2,o=i-4*r,l=new Uint32Array(e.buffer,0,r);let c=0,h=0,d=this.h1,u=this.h2;const p=3432918353,g=461845907,f=11601,m=13715;for(let n=0;n<r;n++)1&n?(c=l[n],c=c*p&s|c*f&a,c=c<<15|c>>>17,c=c*g&s|c*m&a,d^=c,d=d<<13|d>>>19,d=5*d+3864292196):(h=l[n],h=h*p&s|h*f&a,h=h<<15|h>>>17,h=h*g&s|h*m&a,u^=h,u=u<<13|u>>>19,u=5*u+3864292196);switch(c=0,o){case 3:c^=e[4*r+2]<<16;case 2:c^=e[4*r+1]<<8;case 1:c^=e[4*r],c=c*p&s|c*f&a,c=c<<15|c>>>17,c=c*g&s|c*m&a,1&r?d^=c:u^=c}this.h1=d,this.h2=u}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=3981806797*t&s|36045*t&a,e=4283543511*e&s|(2950163797*(e<<16|t>>>16)&s)>>>16,t^=e>>>1,t=444984403*t&s|60499*t&a,e=3301882366*e&s|(3120437893*(e<<16|t>>>16)&s)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}},(t,e,i)=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.FontLoader=e.FontFaceObject=void 0,i(125),i(136),i(138),i(141),i(143),i(145),i(147),i(89),i(149);var n=i(1);e.FontLoader=class{#le=new Set;constructor(t){let{ownerDocument:e=globalThis.document,styleElement:i=null}=t;this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#le.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(t){if(t&&!this.#le.has(t.loadedName))if((0,n.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:e,src:i,style:r}=t,s=new FontFace(e,i,r);this.addNativeFontFace(s);try{await s.load(),this.#le.add(e)}catch{(0,n.warn)(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}}else(0,n.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo)return void(await this.loadSystemFont(t.systemFontInfo));if(this.isFontLoadingAPISupported){const e=t.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(i){throw(0,n.warn)(`Failed to load font '${e.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise((e=>{const i=this._queueLoadingCallback(e);this._prepareFontLoadEvent(t,i)}))}}get isFontLoadingAPISupported(){const t=!!this._document?.fonts;return(0,n.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;return(n.isNodeJS||"undefined"!==typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),(0,n.shadow)(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){const{loadingRequests:e}=this,i={done:!1,complete:function(){for((0,n.assert)(!i.done,"completeRequest() cannot be called twice."),i.done=!0;e.length>0&&e[0].done;){const t=e.shift();setTimeout(t.callback,0)}},callback:t};return e.push(i),i}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,n.shadow)(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function i(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function r(t,e,i,n){return t.substring(0,e)+n+t.substring(e+i)}let s,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let c=0;const h=`lt${Date.now()}${this.loadTestFontId++}`;let d=this._loadTestFont;d=r(d,976,h.length,h);const u=1482184792;let p=i(d,16);for(s=0,a=h.length-3;s<a;s+=4)p=p-u+i(h,s)|0;
1s<h.length&&(p=p-u+i(h+"XXX",s)|0),d=r(d,16,4,(0,n.string32)(p));const g=`@font-face {font-family:"${h}";src:url(data:font/opentype;base64,${btoa(d)});}`;this.insertRule(g);const f=this._document.createElement("div");f.style.visibility="hidden",f.style.width=f.style.height="10px",f.style.position="absolute",f.style.top=f.style.left="0px";for(const n of[t.loadedName,h]){const t=this._document.createElement("span");t.textContent="Hi",t.style.fontFamily=n,f.append(t)}this._document.body.append(f),function t(e,i){if(++c>30)return(0,n.warn)("Load test font never loaded."),void i();l.font="30px "+e,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?i():setTimeout(t.bind(null,e,i))}(h,(()=>{f.remove(),e.complete()}))}},e.FontFaceObject=class{constructor(t,e){let{isEvalSupported:i=!0,disableFontFace:n=!1,ignoreErrors:r=!1,inspectFont:s=null}=e;this.compiledGlyphs=Object.create(null);for(const a in t)this[a]=t[a];this.isEvalSupported=!1!==i,this.disableFontFace=!0===n,this.ignoreErrors=!0===r,this._inspectFont=s}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=(0,n.bytesToString)(this.data),e=`url(data:${this.mimetype};base64,${btoa(t)});`;let i;if(this.cssFontInfo){let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),i=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${e}}`}else i=`@font-face {font-family:"${this.loadedName}";src:${e}}`;return this._inspectFont?.(this,e),i}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];let i;try{i=t.get(this.loadedName+"_path_"+e)}catch(r){if(!this.ignoreErrors)throw r;return(0,n.warn)(`getPathGenerator - ignoring character: "${r}".`),this.compiledGlyphs[e]=function(t,e){}}if(this.isEvalSupported&&n.FeatureTest.isEvalSupported){const t=[];for(const e of i){const i=void 0!==e.args?e.args.join(","):"";t.push("c.",e.cmd,"(",i,");\n")}return this.compiledGlyphs[e]=new Function("c","size",t.join(""))}return this.compiledGlyphs[e]=function(t,e){for(const n of i)"scale"===n.cmd&&(n.args=[e,-e]),t[n.cmd].apply(t,n.args)}}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NodeStandardFontDataFactory=e.NodeFilterFactory=e.NodeCanvasFactory=e.NodeCMapReaderFactory=void 0,i(2),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);var n=i(169),r=i(1);!function(){if(!globalThis.DOMMatrix&&r.isNodeJS)try{globalThis.DOMMatrix=__webpack_require__(214601).DOMMatrix}catch(t){(0,r.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${t}".`)}}(),function(){if(!globalThis.Path2D&&r.isNodeJS)try{const{CanvasRenderingContext2D:t}=__webpack_require__(214601),{polyfillPath2D:e}=__webpack_require__(127499);globalThis.CanvasRenderingContext2D=t,e(globalThis)}catch(t){(0,r.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${t}".`)}}();const s=function(t){return new Promise(((e,i)=>{__webpack_require__(32767).readFile(t,((t,n)=>{!t&&n?e(new Uint8Array(n)):i(new Error(t))}))}))};class a extends n.BaseFilterFactory{}e.NodeFilterFactory=a;class o extends n.BaseCanvasFactory{_createCanvas(t,e){return __webpack_require__(214601).createCanvas(t,e)}}e.NodeCanvasFactory=o;class l extends n.BaseCMapReaderFactory{_fetchData(t,e){return s(t).then((t=>({cMapData:t,compressionType:e})))}}e.NodeCMapReaderFactory=l;class c extends n.BaseStandardFontDataFactory{_fetchData(t){return s(t)}}e.NodeStandardFontDataFactory=c},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasGraphics=void 0,i(2),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89);var n=i(1),r=i(168),s=i(174),a=i(175);const o=4096,l=16;class c{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,i){let n;return void 0!==this.cache[t]?(n=this.cache[t],this.canvasFactory.reset(n,e,i)):(n=this.canvasFactory.create(e,i),this.cache[t]=n),n}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}
1function h(t,e,i,n,s,a,o,l,c,h){const[d,u,p,g,f,m]=(0,r.getCurrentTransform)(t);if(0===u&&0===p){const r=o*d+f,b=Math.round(r),v=l*g+m,_=Math.round(v),y=(o+c)*d+f,A=Math.abs(Math.round(y)-b)||1,S=(l+h)*g+m,x=Math.abs(Math.round(S)-_)||1;return t.setTransform(Math.sign(d),0,0,Math.sign(g),b,_),t.drawImage(e,i,n,s,a,0,0,A,x),t.setTransform(d,u,p,g,f,m),[A,x]}if(0===d&&0===g){const r=l*p+f,b=Math.round(r),v=o*u+m,_=Math.round(v),y=(l+h)*p+f,A=Math.abs(Math.round(y)-b)||1,S=(o+c)*u+m,x=Math.abs(Math.round(S)-_)||1;return t.setTransform(0,Math.sign(u),Math.sign(p),0,b,_),t.drawImage(e,i,n,s,a,0,0,x,A),t.setTransform(d,u,p,g,f,m),[x,A]}return t.drawImage(e,i,n,s,a,o,l,c,h),[Math.hypot(d,u)*c,Math.hypot(p,g)*h]}class d{constructor(t,e){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.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=n.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,t,e])}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,e){this.x=t,this.y=e}updatePathMinMax(t,e,i){[e,i]=n.Util.applyTransform([e,i],t),this.minX=Math.min(this.minX,e),this.minY=Math.min(this.minY,i),this.maxX=Math.max(this.maxX,e),this.maxY=Math.max(this.maxY,i)}updateRectMinMax(t,e){const i=n.Util.applyTransform(e,t),r=n.Util.applyTransform(e.slice(2),t);this.minX=Math.min(this.minX,i[0],r[0]),this.minY=Math.min(this.minY,i[1],r[1]),this.maxX=Math.max(this.maxX,i[0],r[0]),this.maxY=Math.max(this.maxY,i[1],r[1])}updateScalingPathMinMax(t,e){n.Util.scaleMinMax(t,e),this.minX=Math.min(this.minX,e[0]),this.maxX=Math.max(this.maxX,e[1]),this.minY=Math.min(this.minY,e[2]),this.maxY=Math.max(this.maxY,e[3])}updateCurvePathMinMax(t,e,i,r,s,a,o,l,c,h){const d=n.Util.bezierBoundingBox(e,i,r,s,a,o,l,c);if(h)return h[0]=Math.min(h[0],d[0],d[2]),h[1]=Math.max(h[1],d[0],d[2]),h[2]=Math.min(h[2],d[1],d[3]),void(h[3]=Math.max(h[3],d[1],d[3]));this.updateRectMinMax(t,d)}getPathBoundingBox(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.PathType.FILL,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=[this.minX,this.minY,this.maxX,this.maxY];if(t===s.PathType.STROKE){e||(0,n.unreachable)("Stroke bounding box must include transform.");const t=n.Util.singularValueDecompose2dScale(e),r=t[0]*this.lineWidth/2,s=t[1]*this.lineWidth/2;i[0]-=r,i[1]-=s,i[2]+=r,i[3]+=s}return i}updateClipFromPath(){const t=n.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.PathType.FILL,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.Util.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function u(t,e){if("undefined"!==typeof ImageData&&e instanceof ImageData)return void t.putImageData(e,0,0);const i=e.height,r=e.width,s=i%l,a=(i-s)/l,o=0===s?a:a+1,c=t.createImageData(r,l);let h,d=0;const u=e.data,p=c.data;let g,f,m,b;if(e.kind===n.ImageKind.GRAYSCALE_1BPP){const e=u.byteLength,i=new Uint32Array(p.buffer,0,p.byteLength>>2),b=i.length,v=r+7>>3,_=4294967295,y=n.FeatureTest.isLittleEndian?4278190080:255;for(g=0;g<o;g++){for(m=g<a?l:s,h=0,f=0;f<m;f++){const t=e-d;let n=0;const s=t>v?r:8*t-7,a=-8&s;let o=0,l=0;for(;n<a;n+=8)l=u[d++],i[h++]=128&l?_:y,i[h++]=64&l?_:y,i[h++]=32&l?_:y,i[h++]=16&l?_:y,i[h++]=8&l?_:y,i[h++]=4&l?_:y,i[h++]=2&l?_:y,i[h++]=1&l?_:y;for(;n<s;n++)0===o&&(l=u[d++],o=128),i[h++]=l&o?_:y,o>>=1}for(;h<b;)i[h++]=0;t.putImageData(c,0,g*l)}}else if(e.kind===n.ImageKind.RGBA_32BPP){for(f=0,b=r*l*4,g=0;g<a;g++)p.set(u.subarray(d,d+b)),d+=b,t.putImageData(c,0,f),f+=l;g<o&&(b=r*s*4,p.set(u.subarray(d,d+b)),t.putImageData(c,0,f))}else{if(e.kind!==n.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);for(m=l,b=r*m,g=0;g<o;g++){for(g>=a&&(m=s,b=r*m),h=0,f=b;f--;)p[h++]=u[d++],p[h++]=u[d++],p[h++]=u[d++],p[h++]=255;t.putImageData(c,0,g*l)}}}function p(t,e){if(e.bitmap)return void t.drawImage(e.bitmap,0,0);const i=e.height,n=e.width,r=i%l,s=(i-r)/l,o=0===r?s:s+1,c=t.createImageData(n,l);let h=0;const d=e.data,u=c.data;for(let p=0;p<o;p++){const e=p<s?l:r;({srcPos:h}=(0,a.convertBlackAndWhiteToRGBA)({src:d,srcPos:h,dest:u,width:n,height:e,nonBlackColor:0})),t.putImageData(c,0,p*l)}}function g(t,e){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const n of i)void 0!==t[n]&&(e[n]=t[n]);void 0!==t.setLineDash&&(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset)}function f(t){if(t.strokeStyle=t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miter
1Limit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",void 0!==t.setLineDash&&(t.setLineDash([]),t.lineDashOffset=0),!n.isNodeJS){const{filter:e}=t;"none"!==e&&""!==e&&(t.filter="none")}}function m(t,e,i,n){const r=t.length;for(let s=3;s<r;s+=4){const r=t[s];if(0===r)t[s-3]=e,t[s-2]=i,t[s-1]=n;else if(r<255){const a=255-r;t[s-3]=t[s-3]*r+e*a>>8,t[s-2]=t[s-2]*r+i*a>>8,t[s-1]=t[s-1]*r+n*a>>8}}}function b(t,e,i){const n=t.length;for(let r=3;r<n;r+=4){const n=i?i[t[r]]:t[r];e[r]=e[r]*n*.00392156862745098|0}}function v(t,e,i){const n=t.length;for(let r=3;r<n;r+=4){const n=77*t[r-3]+152*t[r-2]+28*t[r-1];e[r]=i?e[r]*i[n>>8]>>8:e[r]*n>>16}}function _(t,e,i,n){const r=n[0],s=n[1],a=n[2]-r,o=n[3]-s;0!==a&&0!==o&&(function(t,e,i,n,r,s,a,o,l,c,h){const d=!!s,u=d?s[0]:0,p=d?s[1]:0,g=d?s[2]:0,f="Luminosity"===r?v:b,_=Math.min(n,Math.ceil(1048576/i));for(let b=0;b<n;b+=_){const r=Math.min(_,n-b),s=t.getImageData(o-c,b+(l-h),i,r),v=e.getImageData(o,b+l,i,r);d&&m(s.data,u,p,g),f(s.data,v.data,a),e.putImageData(v,o,b+l)}}(e.context,i,a,o,e.subtype,e.backdrop,e.transferMap,r,s,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(i.canvas,0,0),t.restore())}function y(t,e){const i=n.Util.singularValueDecompose2dScale(t);i[0]=Math.fround(i[0]),i[1]=Math.fround(i[1]);const s=Math.fround((globalThis.devicePixelRatio||1)*r.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==e?e:i[0]<=s||i[1]<=s}const A=["butt","round","square"],S=["miter","round","bevel"],x={},w={};class E{constructor(t,e,i,n,r,s,a,o){let{optionalContentConfig:l,markedContentStack:h=null}=s;this.ctx=t,this.current=new d(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=i,this.canvasFactory=n,this.filterFactory=r,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=h||[],this.optionalContentConfig=l,this.cachedCanvases=new c(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=a,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=o,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}beginDrawing(t){let{transform:e,viewport:i,transparency:n=!1,background:s=null}=t;const a=this.ctx.canvas.width,o=this.ctx.canvas.height,l=this.ctx.fillStyle;if(this.ctx.fillStyle=s||"#ffffff",this.ctx.fillRect(0,0,a,o),this.ctx.fillStyle=l,n){const t=this.cachedCanvases.getCanvas("transparent",a,o);this.compositeCtx=this.ctx,this.transparentCanvas=t.canvas,this.ctx=t.context,this.ctx.save(),this.ctx.transform(...(0,r.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),f(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...i.transform),this.viewportScale=i.scale,this.baseTransform=(0,r.getCurrentTransform)(this.ctx)}executeOperatorList(t,e,i,r){const s=t.argsArray,a=t.fnArray;let o=e||0;const l=s.length;if(l===o)return o;const c=l-o>10&&"function"===typeof i,h=c?Date.now()+15:0;let d=0;const u=this.commonObjs,p=this.objs;let g;for(;;){if(void 0!==r&&o===r.nextBreakPoint)return r.breakIt(o,i),o;if(g=a[o],g!==n.OPS.dependency)this[g].apply(this,s[o]);else for(const t of s[o]){const e=t.startsWith("g_")?u:p;if(!e.has(t))return e.get(t,i),o}if(o++,o===l)return o;if(c&&++d>10){if(Date.now()>h)return i(),o;d=0}}}#ce(){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)}endDrawing(){this.#ce(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#he()}#he(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}}
vendor: 9,279 bytes, line 1
1_scaleImage(t,e){const i=t.width,n=t.height;let r,s,a=Math.max(Math.hypot(e[0],e[1]),1),o=Math.max(Math.hypot(e[2],e[3]),1),l=i,c=n,h="prescale1";for(;a>2&&l>1||o>2&&c>1;){let e=l,i=c;a>2&&l>1&&(e=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),a/=l/e),o>2&&c>1&&(i=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2,o/=c/i),r=this.cachedCanvases.getCanvas(h,e,i),s=r.context,s.clearRect(0,0,e,i),s.drawImage(t,0,0,l,c,0,0,e,i),t=r.canvas,l=e,c=i,h="prescale1"===h?"prescale2":"prescale1"}return{img:t,paintWidth:l,paintHeight:c}}_createMaskCanvas(t){const e=this.ctx,{width:i,height:a}=t,o=this.current.fillColor,l=this.current.patternFill,c=(0,r.getCurrentTransform)(e);let d,u,g,f;if((t.bitmap||t.data)&&t.count>1){const e=t.bitmap||t.data.buffer;u=JSON.stringify(l?c:[c.slice(0,4),o]),d=this._cachedBitmapsMap.get(e),d||(d=new Map,this._cachedBitmapsMap.set(e,d));const i=d.get(u);if(i&&!l)return{canvas:i,offsetX:Math.round(Math.min(c[0],c[2])+c[4]),offsetY:Math.round(Math.min(c[1],c[3])+c[5])};g=i}g||(f=this.cachedCanvases.getCanvas("maskCanvas",i,a),p(f.context,t));let m=n.Util.transform(c,[1/i,0,0,-1/a,0,0]);m=n.Util.transform(m,[1,0,0,1,0,-a]);const b=n.Util.applyTransform([0,0],m),v=n.Util.applyTransform([i,a],m),_=n.Util.normalizeRect([b[0],b[1],v[0],v[1]]),A=Math.round(_[2]-_[0])||1,S=Math.round(_[3]-_[1])||1,x=this.cachedCanvases.getCanvas("fillCanvas",A,S),w=x.context,E=Math.min(b[0],v[0]),C=Math.min(b[1],v[1]);w.translate(-E,-C),w.transform(...m),g||(g=this._scaleImage(f.canvas,(0,r.getCurrentTransformInverse)(w)),g=g.img,d&&l&&d.set(u,g)),w.imageSmoothingEnabled=y((0,r.getCurrentTransform)(w),t.interpolate),h(w,g,0,0,g.width,g.height,0,0,i,a),w.globalCompositeOperation="source-in";const T=n.Util.transform((0,r.getCurrentTransformInverse)(w),[1,0,0,1,-E,-C]);return w.fillStyle=l?o.getPattern(e,this,T,s.PathType.FILL):o,w.fillRect(0,0,i,a),d&&!l&&(this.cachedCanvases.delete("fillCanvas"),d.set(u,x.canvas)),{canvas:x.canvas,offsetX:Math.round(E),offsetY:Math.round(C)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=A[t]}setLineJoin(t){this.ctx.lineJoin=S[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,e){const i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(t),i.lineDashOffset=e)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,i]of t)switch(e){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,e=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(i,t,e);this.suspendedCtx=this.ctx,this.ctx=n.context;const s=this.ctx;s.setTransform(...(0,r.getCurrentTransform)(this.suspendedCtx)),g(this.suspendedCtx,s),function(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=()=>{t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()},t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(t,i){e.translate(t,i),this.__originalTranslate(t,i)},t.scale=function(t,i){e.scale(t,i),this.__originalScale(t,i)},t.transform=function(t,i,n,r,s,a){e.transform(t,i,n,r,s,a),this.__originalTransform(t,i,n,r,s,a)},t.setTransform=function(t,i,n,r,s,a){e.setTransform(t,i,n,r,s,a),this.__originalSetTransform(t,i,n,r,s,a)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(t){e.rotate(t),this.__originalRotate(t)},t.clip=function(t){e.clip(t),this.__originalClip(t)},t.moveTo=function(t,i){e.moveTo(t,i),this.__originalMoveTo(t,i)},t.lineTo=function(t,i){e.lineTo(t,i),this.__originalLineTo(t,i)},t.bezierCurveTo=function(t,i,n,r,s,a){e.bezierCurveTo(t,i,n,r,s,a),this.__originalBezierCurveTo(t,i,n,r,s,a)},t.rect=function(t,i,n,r){e.rect(t,i,n,r),this.__originalRect(t,i,n,r)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}(s,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(),g(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask;_(this.suspendedCtx,e,this.ctx,t),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?(g(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),g(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,e,i,n,r,s){this.ctx.transform(t,e,i,n,r,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,i){const s=this.ctx,a=this.current;let o,l,c=a.x,h=a.y;const d=(0,r.getCurrentTransform)(s),u=0===d[0]&&0===d[3]||0===d[1]&&0===d[2],p=u?i.slice(0):null;for(let r=0,g=0,f=t.length;r<f;r++)switch(0|t[r]){case n.OPS.rectangle:c=e[g++],h=e[g++];const t=e[g++],i=e[g++],r=c+t,f=h+i;s.moveTo(c,h),0===t||0===i?s.lineTo(r,f):(s.lineTo(r,h),s.lineTo(r,f),s.lineTo(c,f)),u||a.updateRectMinMax(d,[c,h,r,f]),s.closePath();break;case n.OPS.moveTo:c=e[g++],h=e[g++],s.moveTo(c,h),u||a.updatePathMinMax(d,c,h);break;case n.OPS.lineTo:c=e[g++],h=e[g++],s.lineTo(c,h),u||a.updatePathMinMax(d,c,h);break;case n.OPS.curveTo:o=c,l=h,c=e[g+4],h=e[g+5],s.bezierCurveTo(e[g],e[g+1],e[g+2],e[g+3],c,h),a.updateCurvePathMinMax(d,o,l,e[g],e[g+1],e[g+2],e[g+3],c,h,p),g+=6;break;case n.OPS.curveTo2:o=c,l=h,s.bezierCurveTo(c,h,e[g],e[g+1],e[g+2],e[g+3]),a.updateCurvePathMinMax(d,o,l,c,h,e[g],e[g+1],e[g+2],e[g+3],p),c=e[g+2],h=e[g+3],g+=4;break;case n.OPS.curveTo3:o=c,l=h,c=e[g+2],h=e[g+3],s.bezierCurveTo(e[g],e[g+1],c,h,c,h),a.updateCurvePathMinMax(d,o,l,e[g],e[g+1],c,h,c,h,p),g+=4;break;case n.OPS.closePath:s.closePath()}u&&a.updateScalingPathMinMax(d,p),a.setCurrentPoint(c,h)}closePath(){this.ctx.closePath()}stroke(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.ctx,i=this.current.strokeColor;e.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"===typeof i&&i?.getPattern?(e.save(),e.strokeStyle=i.getPattern(e,this,(0,r.getCurrentTransformInverse)(e),s.PathType.STROKE),this.rescaleAndStroke(!1),e.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),e.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.ctx,i=this.current.fillColor;let n=!1;this.current.patternFill&&(e.save(),e.fillStyle=i.getPattern(e,this,(0,r.getCurrentTransformInverse)(e),s.PathType.FILL),n=!0);const a=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==a&&(this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill()),n&&e.restore(
1),t&&this.consumePath(a)}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=x}eoClip(){this.pendingClip=w}beginText(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save(),e.beginPath();for(const i of t)e.setTransform(...i.transform),e.translate(i.x,i.y),i.addToPath(e,i.fontSize);e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}else e.beginPath()}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,e){const i=this.commonObjs.get(t),r=this.current;if(!i)throw new Error(`Can't find font for ${t}`);if(r.fontMatrix=i.fontMatrix||n.FONT_IDENTITY_MATRIX,0!==r.fontMatrix[0]&&0!==r.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+t),e<0?(e=-e,r.fontDirection=-1):r.fontDirection=1,this.current.font=i,this.current.fontSize=e,i.isType3Font)return;const s=i.loadedName||"sans-serif",a=i.systemFontInfo?.css||`"${s}", ${i.fallbackName}`;let o="normal";i.black?o="900":i.bold&&(o="bold");const l=i.italic?"italic":"normal";let c=e;e<16?c=16:e>100&&(c=100),this.current.fontSizeScale=e/c,this.ctx.font=`${l} ${o} ${c}px ${a}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}setTextMatrix(t,e,i,n,r,s){this.current.textMatrix=[t,e,i,n,r,s],this.current.textMatrixScale=Math.hypot(t,e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,e,i,s){const a=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,h=o.fontSize/o.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,u=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile;let g;(l.disableFontFace||u||p)&&(g=l.getPathGenerator(this.commonObjs,t)),l.disableFontFace||p?(a.save(),a.translate(e,i),a.beginPath(),g(a,h),s&&a.setTransform(...s),d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||a.fill(),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||a.stroke(),a.restore()):(d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||a.fillText(t,e,i),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||a.strokeText(t,e,i)),u&&(this.pendingTextPaths||=[]).push({transform:(0,r.getCurrentTransform)(a),x:e,y:i,fontSize:h,addToPath:g})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let i=!1;for(let n=3;n<e.length;n+=4)if(e[n]>0&&e[n]<255){i=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",i)}showText(t){const e=this.current,i=e.font;if(i.isType3Font)return this.showType3Text(t);const a=e.fontSize;if(0===a)return;const o=this.ctx,l=e.fontSizeScale,c=e.charSpacing,h=e.wordSpacing,d=e.fontDirection,u=e.textHScale*d,p=t.length,g=i.vertical,f=g?1:-1,m=i.defaultVMetrics,b=a*e.fontMatrix[0],v=e.textRenderingMode===n.TextRenderingMode.FILL&&!i.disableFontFace&&!e.patternFill;let _;if(o.save(),o.transform(...e.textMatrix),o.translate(e.x,e.y+e.textRise),d>0?o.scale(u,-1):o.scale(u,1),e.patternFill){o.save();const t=e.fillColor.getPattern(o,this,(0,r.getCurrentTransformInverse)(o),s.PathType.FILL);_=(0,r.getCurrentTransform)(o),o.restore(),o.fillStyle=t}let y=e.lineWidth;const A=e.textMatrixScale;if(0===A||0===y){const t=e.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;t!==n.TextRenderingMode.STROKE&&t!==n.TextRenderingMode.FILL_STROKE||(y=this.getSinglePixelWidth())}else y/=A;if(1!==l&&(o.scale(l,l),y/=l),o.lineWidth=y,i.isInvalidPDFjsFont){const i=[];let n=0;for(const e of t)i.push(e.unicode),n+=e.width;
1return o.fillText(i.join(""),0,0),e.x+=n*b*u,o.restore(),void this.compose()}let S,x=0;for(S=0;S<p;++S){const e=t[S];if("number"===typeof e){x+=f*e*a/1e3;continue}let n=!1;const r=(e.isSpace?h:0)+c,s=e.fontChar,u=e.accent;let p,y,A=e.width;if(g){const t=e.vmetric||m,i=-(e.vmetric?t[1]:.5*A)*b,n=t[2]*b;A=t?-t[0]:A,p=i/l,y=(x+n)/l}else p=x/l,y=0;if(i.remeasure&&A>0){const t=1e3*o.measureText(s).width/a*l;if(A<t&&this.isFontSubpixelAAEnabled){const e=A/t;n=!0,o.save(),o.scale(e,1),p/=e}else A!==t&&(p+=(A-t)/2e3*a/l)}if(this.contentVisible&&(e.isInFont||i.missingFile))if(v&&!u)o.fillText(s,p,y);else if(this.paintChar(s,p,y,_),u){const t=p+a*u.offset.x/l,e=y-a*u.offset.y/l;this.paintChar(u.fontChar,t,e,_)}x+=g?A*b-r*d:A*b+r*d,n&&o.restore()}g?e.y-=x:e.x+=x*u,o.restore(),this.compose()}showType3Text(t){const e=this.ctx,i=this.current,r=i.font,s=i.fontSize,a=i.fontDirection,o=r.vertical?1:-1,l=i.charSpacing,c=i.wordSpacing,h=i.textHScale*a,d=i.fontMatrix||n.FONT_IDENTITY_MATRIX,u=t.length;let p,g,f,m;if(i.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==s){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,e.save(),e.transform(...i.textMatrix),e.translate(i.x,i.y),e.scale(h,a),p=0;p<u;++p){if(g=t[p],"number"===typeof g){m=o*g*s/1e3,this.ctx.translate(m,0),i.x+=m*h;continue}const a=(g.isSpace?c:0)+l,u=r.charProcOperatorList[g.operatorListId];u?(this.contentVisible&&(this.processingType3=g,this.save(),e.scale(s,s),e.transform(...d),this.executeOperatorList(u),this.restore()),f=n.Util.applyTransform([g.width,0],d)[0]*s+a,e.translate(f,0),i.x+=f*h):(0,n.warn)(`Type3 character "${g.operatorListId}" is not available.`)}e.restore(),this.processingType3=null}}setCharWidth(t,e){}
vendor: 9,529 bytes, line 1
1setCharWidthAndBounds(t,e,i,n,r,s){this.ctx.rect(i,n,r-i,s-n),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let e;if("TilingPattern"===t[0]){const i=t[1],n=this.baseTransform||(0,r.getCurrentTransform)(this.ctx),a={createCanvasGraphics:t=>new E(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};e=new s.TilingPattern(t,i,this.ctx,a,n)}else e=this._getPattern(t[1],t[2]);return e}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,e,i){const r=n.Util.makeHexColor(t,e,i);this.ctx.strokeStyle=r,this.current.strokeColor=r}setFillRGBColor(t,e,i){const r=n.Util.makeHexColor(t,e,i);this.ctx.fillStyle=r,this.current.fillColor=r,this.current.patternFill=!1}_getPattern(t){let e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(t)?e=this.cachedPatterns.get(t):(e=(0,s.getShadingPattern)(this.getObject(t)),this.cachedPatterns.set(t,e)),i&&(e.matrix=i),e}shadingFill(t){if(!this.contentVisible)return;const e=this.ctx;this.save();const i=this._getPattern(t);e.fillStyle=i.getPattern(e,this,(0,r.getCurrentTransformInverse)(e),s.PathType.SHADING);const a=(0,r.getCurrentTransformInverse)(e);if(a){const{width:t,height:i}=e.canvas,[r,s,o,l]=n.Util.getAxialAlignedBoundingBox([0,0,t,i],a);this.ctx.fillRect(r,s,o-r,l-s)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,n.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,n.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(t,e){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(t)&&6===t.length&&this.transform(...t),this.baseTransform=(0,r.getCurrentTransform)(this.ctx),e)){const t=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],t,i),this.current.updateRectMinMax((0,r.getCurrentTransform)(this.ctx),e),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const e=this.ctx;t.isolated||(0,n.info)("TODO: Support non-isolated groups."),t.knockout&&(0,n.warn)("Knockout groups not supported.");const i=(0,r.getCurrentTransform)(e);if(t.matrix&&e.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let s=n.Util.getAxialAlignedBoundingBox(t.bbox,(0,r.getCurrentTransform)(e));const a=[0,0,e.canvas.width,e.canvas.height];s=n.Util.intersect(s,a)||[0,0,0,0];const l=Math.floor(s[0]),c=Math.floor(s[1]);let h=Math.max(Math.ceil(s[2])-l,1),d=Math.max(Math.ceil(s[3])-c,1),u=1,p=1;h>o&&(u=h/o,h=o),d>o&&(p=d/o,d=o),this.current.startNewPathAndClipBox([0,0,h,d]);let f="groupAt"+this.groupLevel;t.smask&&(f+="_smask_"+this.smaskCounter++%2);const m=this.cachedCanvases.getCanvas(f,h,d),b=m.context;b.scale(1/u,1/p),b.translate(-l,-c),b.transform(...i),t.smask?this.smaskStack.push({canvas:m.canvas,context:b,offsetX:l,offsetY:c,scaleX:u,scaleY:p,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(l,c),e.scale(u,p),e.save()),g(e,b),this.ctx=b,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const e=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const t=(0,r.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...t);const i=n.Util.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],t);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(i)}}beginAnnotation(t,e,i,s,a){if(this.#ce(),f(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(e)&&4===e.length){const s=e[2]-e[0],o=e[3]-e[1];if(a&&this.annotationCanvasMap){(i=i.slice())[4]-=e[0],i[5]-=e[1],(e=e.slice())[0]=e[1]=0,e[2]=s,e[3]=o;const[a,l]=n.Util.singularValueDecompose2dScale((0,r.getCurrentTransform)(this.ctx)),{viewportScale:c}=this,h=Math.ceil(s*this.outputScaleX*c),d=Math.ceil(o*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(h,d);const{canvas:u,context:p}=this.annotationCanvas;this.annotationCanvasMap.set(t,u),this.annotationCanvas.savedCtx=this.ctx,this.ctx=p,this.ctx.save(),this.ctx.setTransform(a,0,0,-l,0,o*l),f(this.ctx)}else f(this.ctx),this.ctx.rect(e[0],e[1],s,o),this.ctx.clip(),this.endPath()}this.current=new d(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...i),this.transform(...s)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#he(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const e=t.count;(t=this.getObject(t.data,t)).count=e;const i=this.ctx,n=this.processingType3;if(n&&(void 0===n.compiled&&(n.compiled=function(t){const{width:e,height:i}=t;if(e>1e3||i>1e3)return null;const n=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),r=e+1;let s,a,o,l=new Uint8Array(r*(i+1));const c=e+7&-8;let h=new Uint8Array(c*i),d=0;for(const f of t.data){let t=128;for(;t>0;)h[d++]=f&t?0:255,t>>=1}let u=0;for(d=0,0!==h[d]&&(l[0]=1,++u),a=1;a<e;a++)h[d]!==h[d+1]&&(l[a]=h[d]?2:1,++u),d++;for(0!==h[d]&&(l[a]=2,++u),s=1;s<i;s++){d=s*c,o=s*r,h[d-c]!==h[d]&&(l[o]=h[d]?1:8,++u);let t=(h[d]?4:0)+(h[d-c]?8:0);for(a=1;a<e;a++)t=(t>>2)+(h[d+1]?4:0)+(h[d-c+1]?8:0),n[t]&&(l[o+a]=n[t],++u),d++;if(h[d-c]!==h[d]&&(l[o+a]=h[d]?2:4,++u),u>1e3)return null}for(d=c*(i-1),o=s*r,0!==h[d]&&(l[o]=8,++u),a=1;a<e;a++)h[d]!==h[d+1]&&(l[o+a]=h[d]?4:8,++u),d++;if(0!==h[d]&&(l[o+a]=4,++u),u>1e3)return null;const p=new Int32Array([0,r,-1,0,-r,0,0,0,1]),g=new Path2D;for(s=0;u&&s<=i;s++){let t=s*r;const i=t+e;for(;t<i&&!l[t];)t++;if(t===i)continue;g.moveTo(t%r,s);const n=t;let a=l[t];do{const e=p[a];do{t+=e}while(!l[t]);const i=l[t];5!==i&&10!==i?(a=i,l[t]=0):(a=i&51*a>>4,l[t]&=a>>2|a<<2),g.lineTo(t%r,t/r|0),l[t]||--u}while(n!==t);--s}return h=null,l=null,function(t){t.save(),t.scale(1/e,-1/i),t.translate(0,-i),t.fill(g),t.beginPath(),t.restore()}}(t)),n.compiled))return void n.compiled(i);const r=this._createMaskCanvas(t),s=r.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(s,r.offsetX,r.offsetY),i.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;t=this.getObject(t.data,t);const l=this.ctx;l.save();const c=(0,r.getCurrentTransform)(l);l.transform(e,i,s,a,0,0);const h=this._createMaskCanvas(t);l.setTransform(1,0,0,1,h.offsetX-c[4],h.offsetY-c[5]);for(let r=0,d=o.length;r<d;r+=2){const t=n.Util.transform(c,[e,i,s,a,o[r],o[r+1]]),[d,u]=n.Util.applyTransform([0,0],t);l.drawImage(h.canvas,d,u)}l.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;const e=this.ctx,i=this.current.fillColor,n=this.current.patternFill;for(const a of t){const{data:t,width:o,height:l,transform:c}=a,d=this.cachedCanvases.getCanvas("maskCanvas",o,l),u=d.context;u.save(),p(u,this.getObject(t,a)),u.globalCompositeOperation="source-in",u.fillStyle=n?i.getPattern(u,this,(0,r.getCurrentTransformInverse)(e),s.PathType.FILL):i,u.fillRect(0,0,o,l),u.restore(),e.save(),e.transform(...c),e.scale(1,-1),h(e,d.canvas,0,0,o,l,0,-1,1,1),e.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;const e=this.getObject(t);e?this.paintInlineImageXObject(e):(0,n.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(t,e,i,r){if(!this.contentVisible)return;const s=this.getObject(t);if(!s)return void(0,n.warn)("Dependent image isn't ready yet");const a=s.width,o=s.height,l=[];for(let n=0,c=r.length;n<c;n+=2)l.push({transform:[e,0,0,i,r[n],r[n+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(s,l)}applyTransferMapsToCanvas(t){return"none"!==this.current.transferMaps&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if("none"===this.current.transferMaps)return t.bitmap;const{bitmap:e,width:i,height:n}=t,r=this.cachedCanvases.getCanvas("inlineImage",i,n),s=r.context;return s.filter=this.current.transferMaps,s.drawImage(e,0,0),s.filter="none",r.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;const e=t.width,i=t.height,s=this.ctx;if(this.save(),!n.isNodeJS){const{filter:t}=s;"none"!==t&&""!==t&&(s.filter="none")}let a;if(s.scale(1/e,-1/i),t.bitmap)a=this.applyTransferMapsToBitmap(t);else if("function"===typeof HTMLElement&&t instanceof HTMLElement||!t.data)a=t;else{const n=this.cachedCanvases.getCanvas("inlineImage",e,i).context;u(n,t),a=this.applyTransferMapsToCanvas(n)}const o=this._scaleImage(a,(0,r.getCurrentTransformInverse)(s));s.imageSmoothingEnabled=y((0,r.getCurrentTransform)(s),t.interpolate),h(s,o.img,0,0,o.paintWidth,o.paintHeight,0,-i,e,i),this.compose(),this.restore(
1)}paintInlineImageXObjectGroup(t,e){if(!this.contentVisible)return;const i=this.ctx;let n;if(t.bitmap)n=t.bitmap;else{const e=t.width,i=t.height,r=this.cachedCanvases.getCanvas("inlineImage",e,i).context;u(r,t),n=this.applyTransferMapsToCanvas(r)}for(const r of e)i.save(),i.transform(...r.transform),i.scale(1,-1),h(i,n,r.x,r.y,r.w,r.h,0,-1,1,1),i.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,e){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,e){"OC"===t?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(e)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t){const e=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(t);const i=this.ctx;this.pendingClip&&(e||(this.pendingClip===w?i.clip("evenodd"):i.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),i.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=(0,r.getCurrentTransform)(this.ctx);if(0===t[1]&&0===t[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const e=Math.abs(t[0]*t[3]-t[2]*t[1]),i=Math.hypot(t[0],t[2]),n=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(i,n)/e}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:t}=this.current,{a:e,b:i,c:n,d:r}=this.ctx.getTransform();let s,a;if(0===i&&0===n){const i=Math.abs(e),n=Math.abs(r);if(i===n)if(0===t)s=a=1/i;else{const e=i*t;s=a=e<1?1/e:1}else if(0===t)s=1/i,a=1/n;else{const e=i*t,r=n*t;s=e<1?1/e:1,a=r<1?1/r:1}}else{const o=Math.abs(e*r-i*n),l=Math.hypot(e,i),c=Math.hypot(n,r);if(0===t)s=c/o,a=l/o;else{const e=t*o;s=c>e?c/e:1,a=l>e?l/e:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:e}=this,{lineWidth:i}=this.current,[n,r]=this.getScaleForStroking();if(e.lineWidth=i||1,1===n&&1===r)return void e.stroke();const s=e.getLineDash();if(t&&e.save(),e.scale(n,r),s.length>0){const t=Math.max(n,r);e.setLineDash(s.map((e=>e/t))),e.lineDashOffset/=t}e.stroke(),t&&e.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}e.CanvasGraphics=E;for(const C in n.OPS)void 0!==E.prototype[C]&&(E.prototype[n.OPS[C]]=E.prototype[C])},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TilingPattern=e.PathType=void 0,e.getShadingPattern=function(t){switch(t[0]){case"RadialAxial":return new l(t);case"Mesh":return new d(t);case"Dummy":return new u}throw new Error(`Unknown IR type: ${t[0]}`)},i(2);var n=i(1),r=i(168);const s={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function a(t,e){if(!e)return;const i=e[2]-e[0],n=e[3]-e[1],r=new Path2D;r.rect(e[0],e[1],i,n),t.clip(r)}e.PathType=s;class o{constructor(){this.constructor===o&&(0,n.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,n.unreachable)("Abstract method `getPattern` called.")}}class l extends o{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;"axial"===this._type?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const i of this._colorStops)e.addColorStop(i[0],i[1]);return e}getPattern(t,e,i,o){let l;if(o===s.STROKE||o===s.FILL){const s=e.current.getClippedPathBoundingBox(o,(0,r.getCurrentTransform)(t))||[0,0,0,0],c=Math.ceil(s[2]-s[0])||1,h=Math.ceil(s[3]-s[1])||1,d=e.cachedCanvases.getCanvas("pattern",c,h,!0),u=d.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-s[0],-s[1]),i=n.Util.transform(i,[1,0,0,1,s[0],s[1]]),u.transform(...e.baseTransform),this.matrix&&u.transform(...this.matrix
vendor: 5,158 bytes, line 1
1),a(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),l=t.createPattern(d.canvas,"no-repeat");const p=new DOMMatrix(i);l.setTransform(p)}else a(t,this._bbox),l=this._createGradient(t);return l}}function c(t,e,i,n,r,s,a,o){const l=e.coords,c=e.colors,h=t.data,d=4*t.width;let u;l[i+1]>l[n+1]&&(u=i,i=n,n=u,u=s,s=a,a=u),l[n+1]>l[r+1]&&(u=n,n=r,r=u,u=a,a=o,o=u),l[i+1]>l[n+1]&&(u=i,i=n,n=u,u=s,s=a,a=u);const p=(l[i]+e.offsetX)*e.scaleX,g=(l[i+1]+e.offsetY)*e.scaleY,f=(l[n]+e.offsetX)*e.scaleX,m=(l[n+1]+e.offsetY)*e.scaleY,b=(l[r]+e.offsetX)*e.scaleX,v=(l[r+1]+e.offsetY)*e.scaleY;if(g>=v)return;const _=c[s],y=c[s+1],A=c[s+2],S=c[a],x=c[a+1],w=c[a+2],E=c[o],C=c[o+1],T=c[o+2],P=Math.round(g),k=Math.round(v);let M,R,F,D,I,O,L,N;for(let B=P;B<=k;B++){if(B<m){const t=B<g?0:(g-B)/(g-m);M=p-(p-f)*t,R=_-(_-S)*t,F=y-(y-x)*t,D=A-(A-w)*t}else{let t;t=B>v?1:m===v?0:(m-B)/(m-v),M=f-(f-b)*t,R=S-(S-E)*t,F=x-(x-C)*t,D=w-(w-T)*t}let t;t=B<g?0:B>v?1:(g-B)/(g-v),I=p-(p-b)*t,O=_-(_-E)*t,L=y-(y-C)*t,N=A-(A-T)*t;const e=Math.round(Math.min(M,I)),i=Math.round(Math.max(M,I));let n=d*B+4*e;for(let r=e;r<=i;r++)t=(M-r)/(M-I),t<0?t=0:t>1&&(t=1),h[n++]=R-(R-O)*t|0,h[n++]=F-(F-L)*t|0,h[n++]=D-(D-N)*t|0,h[n++]=255}}function h(t,e,i){const n=e.coords,r=e.colors;let s,a;switch(e.type){case"lattice":const o=e.verticesPerRow,l=Math.floor(n.length/o)-1,h=o-1;for(s=0;s<l;s++){let e=s*o;for(let s=0;s<h;s++,e++)c(t,i,n[e],n[e+1],n[e+o],r[e],r[e+1],r[e+o]),c(t,i,n[e+o+1],n[e+1],n[e+o],r[e+o+1],r[e+1],r[e+o])}break;case"triangles":for(s=0,a=n.length;s<a;s+=3)c(t,i,n[s],n[s+1],n[s+2],r[s],r[s+1],r[s+2]);break;default:throw new Error("illegal figure")}}class d extends o{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[7],this._background=t[8],this.matrix=null}_createMeshCanvas(t,e,i){const n=Math.floor(this._bounds[0]),r=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-n,a=Math.ceil(this._bounds[3])-r,o=Math.min(Math.ceil(Math.abs(s*t[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(a*t[1]*1.1)),3e3),c=s/o,d=a/l,u={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-r,scaleX:1/c,scaleY:1/d},p=o+4,g=l+4,f=i.getCanvas("mesh",p,g,!1),m=f.context,b=m.createImageData(o,l);if(e){const t=b.data;for(let i=0,n=t.length;i<n;i+=4)t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=255}for(const v of this._figures)h(b,v,u);return m.putImageData(b,2,2),{canvas:f.canvas,offsetX:n-2*c,offsetY:r-2*d,scaleX:c,scaleY:d}}getPattern(t,e,i,o){let l;if(a(t,this._bbox),o===s.SHADING)l=n.Util.singularValueDecompose2dScale((0,r.getCurrentTransform)(t));else if(l=n.Util.singularValueDecompose2dScale(e.baseTransform),this.matrix){const t=n.Util.singularValueDecompose2dScale(this.matrix);l=[l[0]*t[0],l[1]*t[1]]}const c=this._createMeshCanvas(l,o===s.SHADING?null:this._background,e.cachedCanvases);return o!==s.SHADING&&(t.setTransform(...e.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(c.offsetX,c.offsetY),t.scale(c.scaleX,c.scaleY),t.createPattern(c.canvas,"no-repeat")}}class u extends o{getPattern(){return"hotpink"}}const p=1,g=2;class f{static MAX_PATTERN_SIZE=3e3;constructor(t,e,i,n,r){this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=e,this.ctx=i,this.canvasGraphicsFactory=n,this.baseTransform=r}createPatternCanvas(t){const e=this.operatorList,i=this.bbox,s=this.xstep,a=this.ystep,o=this.paintType,l=this.tilingType,c=this.color,h=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+l);const d=i[0],u=i[1],p=i[2],g=i[3],f=n.Util.singularValueDecompose2dScale(this.matrix),m=n.Util.singularValueDecompose2dScale(this.baseTransform),b=[f[0]*m[0],f[1]*m[1]],v=this.getSizeAndScale(s,this.ctx.canvas.width,b[0]),_=this.getSizeAndScale(a,this.ctx.canvas.height,b[1]),y=t.cachedCanvases.getCanvas("pattern",v.size,_.size,!0),A=y.context,S=h.createCanvasGraphics(A);S.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(S,o,c);let x=d,w=u,E=p,C=g;return d<0&&(x=0,E+=Math.abs(d)),u<0&&(w=0,C+=Math.abs(u)),A.translate(-v.scale*x,-_.scale*w),S.transform(v.scale,0,0,_.scale,0,0),A.save(),this.clipBbox(S,x,w,E,C),S.baseTransform=(0,r.getCurrentTransform)(S.ctx),S.executeOperatorList(e),S.endDrawing(),{canvas:y.canvas,scaleX:v.scale,scaleY:_.scale,offsetX:x,offsetY:w}}getSizeAndScale(t,e,i){t=Math.abs(t);const n=Math.max(f.MAX_PATTERN_SIZE,e);let r=Math.ceil(t*i);return r>=n?r=n:i=r/t,{scale:i,size:r}}clipBbox(t,e,i,n,s){const a=n-e,o=s-i;t.ctx.rect(e,i,a,o),t.current.updateRectMinMax((0,r.getCurrentTransform)(t.ctx),[e,i,n,s]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,i){const r=t.ctx,s=t.current;switch(e){case p:const t=this.ctx;r.fillStyle=t.fillStyle,r.strokeStyle=t.strokeStyle,s.fillColor=t.fillStyle,s.strokeColor=t.strokeStyle;break;case g:const a=n.Util.makeHexColor(i[0],i[1],i[2]);r.fillStyle=a,r.strokeStyle=a,s.fillColor=a,s.strokeColor=a;break;default:throw new n.FormatError(`Unsupported paint type: ${e}`)}}getPattern(t,e,i,r){let a=i;r!==s.SHADING&&(a=n.Util.transform(a,e.baseTransform),this.matrix&&(a=n.Util.transform(a,this.matrix
1)));const o=this.createPatternCanvas(e);let l=new DOMMatrix(a);l=l.translate(o.offsetX,o.offsetY),l=l.scale(1/o.scaleX,1/o.scaleY);const c=t.createPattern(o.canvas,"repeat");return c.setTransform(l),c}}e.TilingPattern=f},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertBlackAndWhiteToRGBA=r,e.convertToRGBA=function(t){switch(t.kind){case n.ImageKind.GRAYSCALE_1BPP:return r(t);case n.ImageKind.RGB_24BPP:return function(t){let{src:e,srcPos:i=0,dest:r,destPos:s=0,width:a,height:o}=t,l=0;const c=e.length>>2,h=new Uint32Array(e.buffer,i,c);if(n.FeatureTest.isLittleEndian){for(;l<c-2;l+=3,s+=4){const t=h[l],e=h[l+1],i=h[l+2];r[s]=4278190080|t,r[s+1]=t>>>24|e<<8|4278190080,r[s+2]=e>>>16|i<<16|4278190080,r[s+3]=i>>>8|4278190080}for(let t=4*l,i=e.length;t<i;t+=3)r[s++]=e[t]|e[t+1]<<8|e[t+2]<<16|4278190080}else{for(;l<c-2;l+=3,s+=4){const t=h[l],e=h[l+1],i=h[l+2];r[s]=255|t,r[s+1]=t<<24|e>>>8|255,r[s+2]=e<<16|i>>>16|255,r[s+3]=i<<8|255}for(let t=4*l,i=e.length;t<i;t+=3)r[s++]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|255}return{srcPos:i,destPos:s}}(t)}return null},e.grayToRGBA=function(t,e){if(n.FeatureTest.isLittleEndian)for(let i=0,n=t.length;i<n;i++)e[i]=65793*t[i]|4278190080;else for(let i=0,n=t.length;i<n;i++)e[i]=16843008*t[i]|255},i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);var n=i(1);function r(t){let{src:e,srcPos:i=0,dest:r,width:s,height:a,nonBlackColor:o=4294967295,inverseDecode:l=!1}=t;const c=n.FeatureTest.isLittleEndian?4278190080:255,[h,d]=l?[o,c]:[c,o],u=s>>3,p=7&s,g=e.length;r=new Uint32Array(r.buffer);let f=0;for(let n=0;n<a;n++){for(const n=i+u;i<n;i++){const t=i<g?e[i]:255;r[f++]=128&t?d:h,r[f++]=64&t?d:h,r[f++]=32&t?d:h,r[f++]=16&t?d:h,r[f++]=8&t?d:h,r[f++]=4&t?d:h,r[f++]=2&t?d:h,r[f++]=1&t?d:h}if(0===p)continue;const t=i<g?e[i++]:255;for(let e=0;e<p;e++)r[f++]=t&1<<7-e?d:h}return{srcPos:i,destPos:f}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalWorkerOptions=void 0;const i=Object.create(null);e.GlobalWorkerOptions=i,i.workerPort=null,i.workerSrc=""},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0,i(2);var n=i(1);const r=1,s=2,a=1,o=2,l=3,c=4,h=5,d=6,u=7,p=8;function g(t){switch(t instanceof Error||"object"===typeof t&&null!==t||(0,n.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new n.AbortException(t.message);case"MissingPDFException":return new n.MissingPDFException(t.message);case"PasswordException":return new n.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new n.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new n.UnknownErrorException(t.message,t.details);default:return new n.UnknownErrorException(t.message,t.toString())}}e.MessageHandler=class{constructor(t,e,i){this.sourceName=t,this.targetName=e,this.comObj=i,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=t=>{const e=t.data;if(e.targetName!==this.sourceName)return;if(e.stream)return void this.#de(e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],e.callback===r)i.resolve(e.data);else{if(e.callback!==s)throw new Error("Unexpected callback case");i.reject(g(e.reason))}return}const n=this.actionHandler[e.action];if(!n)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const t=this.sourceName,a=e.sourceName;new Promise((function(t){t(n(e.data))})).then((function(n){i.postMessage({sourceName:t,targetName:a,callback:r,callbackId:e.callbackId,data:n})}),(function(n){i.postMessage({sourceName:t,targetName:a,callback:s,callbackId:e.callbackId,reason:g(n)})}))}else e.streamId?this.#ue(e):n(e.data)},i.addEventListener("message",this._onComObjOnMessage)}on(t,e){const i=this.actionHandler;if(i[t])throw new Error(`There is already an actionName called "${t}"`);i[t]=e}send(t,e,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},i)}
1sendWithPromise(t,e,i){const r=this.callbackId++,s=new n.PromiseCapability;this.callbackCapabilities[r]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:r,data:e},i)}catch(a){s.reject(a)}return s.promise}sendWithStream(t,e,i,r){const s=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:i=>{const a=new n.PromiseCapability;return this.streamControllers[s]={controller:i,startCall:a,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:o,targetName:l,action:t,streamId:s,data:e,desiredSize:i.desiredSize},r),a.promise},pull:t=>{const e=new n.PromiseCapability;return this.streamControllers[s].pullCall=e,c.postMessage({sourceName:o,targetName:l,stream:d,streamId:s,desiredSize:t.desiredSize}),e.promise},cancel:t=>{(0,n.assert)(t instanceof Error,"cancel must have a valid reason");const e=new n.PromiseCapability;return this.streamControllers[s].cancelCall=e,this.streamControllers[s].isClosed=!0,c.postMessage({sourceName:o,targetName:l,stream:a,streamId:s,reason:g(t)}),e.promise}},i)}#ue(t){const e=t.streamId,i=this.sourceName,r=t.sourceName,s=this.comObj,a=this,o=this.actionHandler[t.action],d={enqueue(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=a,l>0&&this.desiredSize<=0&&(this.sinkCapability=new n.PromiseCapability,this.ready=this.sinkCapability.promise),s.postMessage({sourceName:i,targetName:r,stream:c,streamId:e,chunk:t},o)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:r,stream:l,streamId:e}),delete a.streamSinks[e])},error(t){(0,n.assert)(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:r,stream:h,streamId:e,reason:g(t)}))},sinkCapability:new n.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};d.sinkCapability.resolve(),d.ready=d.sinkCapability.promise,this.streamSinks[e]=d,new Promise((function(e){e(o(t.data,d))})).then((function(){s.postMessage({sourceName:i,targetName:r,stream:p,streamId:e,success:!0})}),(function(t){s.postMessage({sourceName:i,targetName:r,stream:p,streamId:e,reason:g(t)})}))}#de(t){const e=t.streamId,i=this.sourceName,r=t.sourceName,s=this.comObj,f=this.streamControllers[e],m=this.streamSinks[e];switch(t.stream){case p:t.success?f.startCall.resolve():f.startCall.reject(g(t.reason));break;case u:t.success?f.pullCall.resolve():f.pullCall.reject(g(t.reason));break;case d:if(!m){s.postMessage({sourceName:i,targetName:r,stream:u,streamId:e,success:!0});break}m.desiredSize<=0&&t.desiredSize>0&&m.sinkCapability.resolve(),m.desiredSize=t.desiredSize,new Promise((function(t){t(m.onPull?.())})).then((function(){s.postMessage({sourceName:i,targetName:r,stream:u,streamId:e,success:!0})}),(function(t){s.postMessage({sourceName:i,targetName:r,stream:u,streamId:e,reason:g(t)})}));break;case c:if((0,n.assert)(f,"enqueue should have stream controller"),f.isClosed)break;f.controller.enqueue(t.chunk);break;case l:if((0,n.assert)(f,"close should have stream controller"),f.isClosed)break;f.isClosed=!0,f.controller.close(),this.#pe(f,e);break;case h:(0,n.assert)(f,"error should have stream controller"),f.controller.error(g(t.reason)),this.#pe(f,e);break;case o:t.success?f.cancelCall.resolve():f.cancelCall.reject(g(t.reason)),this.#pe(f,e);break;case a:if(!m)break;new Promise((function(e){e(m.onCancel?.(g(t.reason)))})).then((function(){s.postMessage({sourceName:i,targetName:r,stream:o,streamId:e,success:!0})}),(function(t){s.postMessage({sourceName:i,targetName:r,stream:o,streamId:e,reason:g(t)})})),m.sinkCapability.reject(g(t.reason)),m.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async#pe(t,e){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[e]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(t,e,i)=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=i(1);e.Metadata=class{#ge;#fe;constructor(t){let{parsedData:e,rawData:i}=t;this.#ge=e,this.#fe=i}getRaw(){return this.#fe}get(t){return this.#ge.get(t)??null}getAll(){return(0,n.objectFromMap)(this.#ge)}has(t){return this.#ge.has(t)}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OptionalContentConfig=void 0;var n=i(1),r=i(170);const s=Symbol("INTERNAL");class a{#me=!0;constructor(t,e){this.name=t,this.intent=e}get visible(){return this.#me}_setVisible(t,e){t!==s&&(0,n.unreachable)("Internal method `_setVisible` called."),this.#me=e}}e.OptionalContentConfig=class{#be=null;#ve=new Map;#_e=null;#ye=null;constructor(t){if(this.name=null,this.creator=null,null!==t){this.name=t.name,this.creator=t.creator,this.#ye=t.order;for(const e of t.groups)this.#ve.set(e.id,new a(e.name,e.intent));if("OFF"===t.baseState)for(const t of this.#ve.values())t._setVisible(s,!1);for(const e of t.on)this.#ve.get(e)._setVisible(s,!0);for(const e of t.off)this.#ve.get(e)._setVisible(s,!1);this.#_e=this.getHash()}}#Ae(t){const e=t.length;if(e<2)return!0;const i=t[0];for(let r=1;r<e;r++){const e=t[r];let s;if(Array.isArray(e))s=this.#Ae(e);else{if(!this.#ve.has(e))return(0,n.warn)(`Optional content group not found: ${e}`),!0;s=this.#ve.get(e).visible}switch(i){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return"And"===i}isVisible(t){if(0===this.#ve.size)return!0;if(!t)return(0,n.warn)("Optional content group not defined."),!0;if("OCG"===t.type)return this.#ve.has(t.id)?this.#ve.get(t.id).visible:((0,n.warn)(`Optional content group not found: ${t.id}`),!0);if("OCMD"===t.type){if(t.expression)return this.#Ae(t.expression);if(!t.policy||"AnyOn"===t.policy){for(const e of t.ids){if(!this.#ve.has(e))return(0,n.warn)(`Optional content group not found: ${e}`),!0;if(this.#ve.get(e).visible)return!0}return!1}if("AllOn"===t.policy){for(const e of t.ids){if(!this.#ve.has(e))return(0,n.warn)(`Optional content group not found: ${e}`),!0;if(!this.#ve.get(e).visible)return!1}return!0}if("AnyOff"===t.policy){for(const e of t.ids){if(!this.#ve.has(e))return(0,n.warn)(`Optional content group not found: ${e}`),!0;if(!this.#ve.get(e).visible)return!0}return!1}if("AllOff"===t.policy){for(const e of t.ids){if(!this.#ve.has(e))return(0,n.warn)(`Optional content group not found: ${e}`),!0;if(this.#ve.get(e).visible)return!1}return!0}return(0,n.warn)(`Unknown optional content policy ${t.policy}.`),!0}return(0,n.warn)(`Unknown group type ${t.type}.`),!0}setVisibility(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.#ve.has(t)?(this.#ve.get(t)._setVisible(s,!!e),this.#be=null):(0,n.warn)(`Optional content group not found: ${t}`)}get hasInitialVisibility(){return null===this.#_e||this.getHash()===this.#_e}getOrder(){return this.#ve.size?this.#ye?this.#ye.slice():[...this.#ve.keys()]:null}getGroups(){return this.#ve.size>0?(0,n.objectFromMap)(this.#ve):null}getGroup(t){return this.#ve.get(t)||null}getHash(){if(null!==this.#be)return this.#be;const t=new r.MurmurHash3_64;for(const[e,i]of this.#ve)t.update(`${e}:${i.visible}`);return this.#be=t.hexdigest()}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFDataTransportStream=void 0,i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89);var n=i(1),r=i(168);e.PDFDataTransportStream=class{constructor(t,e){let{length:i,initialData:r,progressiveDone:s=!1,contentDispositionFilename:a=null,disableRange:o=!1,disableStream:l=!1}=t;if((0,n.assert)(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=a,r?.length>0){const t=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;this._queuedChunks.push(t)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!l,this._isRangeSupported=!o,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((t,e)=>{this._onReceiveData({begin:t,chunk:e})})),this._pdfDataRangeTransport.addProgressListener(((t,e)=>{this._onProgress({loaded:t,total:e})})),this._pdfDataRangeTransport.addProgressiveReadListener((t=>{this._onReceiveData({chunk:t})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData(t){let{begin:e,chunk:i}=t;const r=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{const t=this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(r),!0)}));(0,n.assert)(t,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){void 0===t.total?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){(0,n.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new s(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=new a(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeReaders.slice(0))e.cancel(t);this._pdfDataRangeTransport.abort()}};class s{constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=t,this._done=i||!1,this._filename=(0,r.isPdfFile)(n)?n:null,this._queuedChunks=e||[],this._loaded=0;for(const r of this._queuedChunks)this._loaded+=r.byteLength;
1this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.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 t=new n.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class a{constructor(t,e,i){this._stream=t,this._begin=e,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const t of this._requests)t.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 t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=new n.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFetchStream=void 0,i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89);var n=i(1),r=i(182);function s(t,e,i){return{method:"GET",headers:t,signal:i.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function a(t){const e=new Headers;for(const i in t){const n=t[i];void 0!==n&&e.append(i,n)}return e}function o(t){return t instanceof Uint8Array?t.buffer:t instanceof ArrayBuffer?t:((0,n.warn)(`getArrayBuffer - unexpected data format: ${t}`),new Uint8Array(t).buffer)}e.PDFFetchStream=class{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new l(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=new c(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class l{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const e=t.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=new n.PromiseCapability,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._headers=a(this._stream.httpHeaders);const i=e.url;fetch(i,s(this._headers,this._withCredentials,this._abortController)).then((t=>{if(!(0,r.validateResponseStatus)(t.status))throw(0,r.createResponseStatusError)(t.status,i);this._reader=t.body.getReader(),this._headersCapability.resolve();const e=e=>t.headers.get(e),{allowRangeRequests:s,suggestedLength:a}=(0,r.validateRangeRequestCapabilities)({getResponseHeader:e,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=a||this._contentLength,this._filename=(0,r.extractFilenameFromHeader)(e),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new n.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(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:o(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class c{constructor(t,e,i){this._stream=t,this._reader=null,this._loaded=0;const o=t.source;this._withCredentials=o.withCredentials||!1,this._readCapability=new n.PromiseCapability,this._isStreamingSupported=!o.disableStream,this._abortController=new AbortController,this._headers=a(this._stream.httpHeaders),this._headers.append("Range",`bytes=${e}-${i-1}`);const l=o.url;fetch(l,s(this._headers,this._withCredentials,this._abortController)).then((t=>{if(!(0,r.validateResponseStatus)(t.status))throw(0,r.createResponseStatusError)(t.status,l);this._readCapability.resolve(),this._reader=t.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:o(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}},(t,e,i)=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.createResponseStatusError=function(t,e){return 404===t||0===t&&e.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+e+'".'):new n.UnexpectedResponseException(`Unexpected server response (${t}) while retrieving PDF "${e}".`,t)},e.extractFilenameFromHeader=function(t){const e=t("Content-Disposition");if(e){let t=(0,r.getFilenameFromContentDispositionHeader)(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if((0,s.isPdfFile)(t))return t}return null},e.validateRangeRequestCapabilities=function(t){let{getResponseHeader:e,isHttp:i,rangeChunkSize:n,disableRange:r}=t;const s={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(e("Content-Length"),10);return Number.isInteger(a)?(s.suggestedLength=a,a<=2*n||r||!i||"bytes"!==e("Accept-Ranges")||"identity"!==(e("Content-Encoding")||"identity")||(s.allowRangeRequests=!0),s):s},e.validateResponseStatus=function(t){return 200===t||206===t};var n=i(1),r=i(183),s=i(168)},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getFilenameFromContentDispositionHeader=function(t){let e=!0,i=r("filename\\*","i").exec(t);if(i){i=i[1];let t=o(i);return t=unescape(t),t=l(t),t=c(t),a(t)}if(i=function(t){const e=[];let i;const n=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(i=n.exec(t));){let[,t,n,r]=i;if(t=parseInt(t,10),t in e){if(0===t)break}else e[t]=[n,r]}const s=[];for(let r=0;r<e.length&&r in e;++r){let[t,i]=e[r];i=o(i),t&&(i=unescape(i),0===r&&(i=l(i))),s.push(i)}return s.join("")}(t),i)return a(c(i));if(i=r("filename","i").exec(t),i){i=i[1];let t=o(i);return t=c(t),a(t)}function r(t,e){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',e)}function s(t,i){if(t){if(!/^[\x00-\xFF]+$/.test(i))return i;try{const r=new TextDecoder(t,{fatal:!0}),s=(0,n.stringToBytes)(i);i=r.decode(s),e=!1}catch{}}return i}function a(t){return e&&/[\x80-\xff]/.test(t)&&(t=s("utf-8",t),e&&(t=s("iso-8859-1",t))),t}function o(t){if(t.startsWith('"')){const e=t.slice(1).split('\\"');for(let t=0;t<e.length;++t){const i=e[t].indexOf('"');-1!==i&&(e[t]=e[t].slice(0,i),e.length=t+1),e[t]=e[t].replaceAll(/\\(.)/g,"$1")}t=e.join('"')}return t}function l(t){const e=t.indexOf("'");return-1===e?t:s(t.slice(0,e),t.slice(e+1).replace(/^[^']*'/,""))}function c(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,e,i,n){if("q"===i||"Q"===i)return s(e,n=(n=n.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(t,e){return String.fromCharCode(parseInt(e,16))})));try{n=atob(n)}catch{}return s(e,n)}))}return""},i(89),i(149);var n=i(1)},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNetworkStream=void 0,i(89);var n=i(1),r=i(182);class s{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&e.httpHeaders||Object.create(null),this.withCredentials=e.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,e,i){const n={begin:t,end:e};for(const r in i)n[r]=i[r];return this.request(n)}requestFull(t){return this.request(t)}request(t){const e=new XMLHttpRequest,i=this.currXhrId++,n=this.pendingRequests[i]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const r in this.httpHeaders){const t=this.httpHeaders[r];void 0!==t&&e.setRequestHeader(r,t)}return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),n.expectedStatus=206):n.expectedStatus=200,e.responseType="arraybuffer",t.onError&&(e.onerror=function(i){t.onError(e.status)}),e.onreadystatechange=this.onStateChange.bind(this,i),e.onprogress=this.onProgress.bind(this,i),n.onHeadersReceived=t.onHeadersReceived,n.onDone=t.onDone,n.onError=t.onError,n.onProgress=t.onProgress,e.send(null),i}onProgress(t,e){const i=this.pendingRequests[t];i&&i.onProgress?.(e)}onStateChange(t,e){const i=this.pendingRequests[t];if(!i)return;const r=i.xhr;if(r.readyState>
vendor: 4,232 bytes, line 1
1=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),4!==r.readyState)return;if(!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],0===r.status&&this.isHttp)return void i.onError?.(r.status);const s=r.status||200;if((200!==s||206!==i.expectedStatus)&&s!==i.expectedStatus)return void i.onError?.(r.status);const a=function(t){const e=t.response;return"string"!==typeof e?e:(0,n.stringToBytes)(e).buffer}(r);if(206===s){const t=r.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);i.onDone({begin:parseInt(e[1],10),chunk:a})}else a?i.onDone({begin:0,chunk:a}):i.onError?.(r.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}e.PDFNetworkStream=class{constructor(t){this._source=t,this._manager=new s(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new a(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const i=new o(this._manager,t,e);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class a{constructor(t,e){this._manager=t;const i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._fullRequestId=t.requestFull(i),this._headersReceivedCapability=new n.PromiseCapability,this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.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 t=this._fullRequestId,e=this._manager.getRequestXhr(t),i=t=>e.getResponseHeader(t),{allowRangeRequests:n,suggestedLength:s}=(0,r.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=(0,r.extractFilenameFromHeader)(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=(0,r.createResponseStatusError)(t,this._url),this._headersReceivedCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.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 t=new n.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest
1(this._fullRequestId),this._fullRequestReader=null}}class o{constructor(t,e,i){this._manager=t;const n={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(e,i,n),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError=(0,r.createResponseStatusError)(t,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=new n.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNodeStream=void 0,i(89),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);var n=i(1),r=i(182);const s=/^file:\/\/\/[a-zA-Z]:\//;e.PDFNodeStream=class{constructor(t){this.source=t,this.url=function(t){const e=__webpack_require__(611987),i=e.parse(t);return"file:"===i.protocol||i.host?i:/^[a-z]:[/\\]/i.test(t)?e.parse(`file:///${t}`):(i.host||(i.protocol="file:"),i)}(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new d(this):new c(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=this.isFsUrl?new u(this,t,e):new h(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class a{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=new n.PromiseCapability,this._headersCapability=new n.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(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=new n.PromiseCapability,this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",(()=>{this._readCapability.resolve()})),t.on("end",(()=>{t.destroy(),this._done=!0,this._readCapability.resolve()})),t.on("error",(t=>{this._error(t)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new n.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class o{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new n.PromiseCapability;const e=t.source;this._isStreamingSupported=!e.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=new n.PromiseCapability,this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",(()=>{this._readCapability.resolve()})),t.on("end",(()=>{t.destroy(),this._done=!0,this._readCapability.resolve()})),t.on("error",(t=>{this._error(t)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function l(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class c extends a{constructor(t){super(t);const e=e=>{if(404===e.statusCode){const t=new n.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=t,void this._headersCapability.reject(t)}this._headersCapability.resolve(),this._setReadableStream(e);const i=t=>this._readableStream.headers[t.toLowerCase()],{allowRangeRequests:s,suggestedLength:a}=(0,r.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=a||this._contentLength,this._filename=(0,r.extractFilenameFromHeader)(i)};if(this._request=null,"http:"===this._url.protocol){const i=__webpack_require__(128251);this._request=i.request(l(this._url,t.httpHeaders),e)}else{const i=__webpack_require__(857677);this._request=i.request(l(this._url,t.httpHeaders),e)}this._request.on("error",(t=>{this._storedError=t,this._headersCapability.reject(t)})),this._request.end()}}class h extends o{constructor(t,e,i){super(t),this._httpHeaders={};for(const n in t.httpHeaders){const e=t.httpHeaders[n];void 0!==e&&(this._httpHeaders[n]=e)}this._httpHeaders.Range=`bytes=${e}-${i-1}`;const r=t=>{if(404!==t.statusCode)this._setReadableStream(t);else{const t=new n.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t}};if(this._request=null,"http:"===this._url.protocol){const t=__webpack_require__(128251);this._request=t.request(l(this._url,this._httpHeaders),r)}else{const t=__webpack_require__(857677);this._request=t.request(l(this._url,this._httpHeaders),r)}this._request.on("error",(t=>{this._storedError=t})),this._request.end()}}class d extends a{constructor(t){super(t);let e=decodeURIComponent(this._url.path);s.test(this._url.href)&&(e=e.replace(/^\//,""));const i=__webpack_require__(32767);i.lstat(e,((t,r)=>{if(t)return"ENOENT"===t.code&&(t=new n.MissingPDFException(`Missing PDF "${e}".`)),this._storedError=t,void this._headersCapability.reject(t);this._contentLength=r.size,this._setReadableStream(i.createReadStream(e)),this._headersCapability.resolve()}))}}class u extends o{constructor(t,e,i){super(t);let n=decodeURIComponent(this._url.path);s.test(this._url.href)&&(n=n.replace(/^\//,""));const r=__webpack_require__(32767);this._setReadableStream(r.createReadStream(n,{start:e,end:i-1}))}}},(t,e,i)=>
vendor: 4,103 bytes, line 1
1{Object.defineProperty(e,"__esModule",{value:!0}),e.SVGGraphics=void 0,i(84),i(86),i(87),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(2),i(89),i(187);var n=i(168),r=i(1);const s="normal",a="normal",o="#000000",l=["butt","round","square"],c=["miter","round","bevel"],h=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!==typeof Blob&&!i)return URL.createObjectURL(new Blob([t],{type:e}));const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let r=`data:${e};base64,`;for(let s=0,a=t.length;s<a;s+=3){const e=255&t[s],i=255&t[s+1],o=255&t[s+2],l=(3&e)<<4|i>>4,c=s+1<a?(15&i)<<2|o>>6:64,h=s+2<a?63&o:64;r+=n[e>>2]+n[l]+n[c]+n[h]}return r},d=function(){const t=new Uint8Array([137,80,78,71,13,10,26,10]),e=new Int32Array(256);for(let r=0;r<256;r++){let t=r;for(let e=0;e<8;e++)t=1&t?3988292384^t>>1&2147483647:t>>1&2147483647;e[r]=t}function i(t,i,n,r){let s=r;const a=i.length;n[s]=a>>24&255,n[s+1]=a>>16&255,n[s+2]=a>>8&255,n[s+3]=255&a,s+=4,n[s]=255&t.charCodeAt(0),n[s+1]=255&t.charCodeAt(1),n[s+2]=255&t.charCodeAt(2),n[s+3]=255&t.charCodeAt(3),s+=4,n.set(i,s),s+=i.length;const o=function(t,i,n){let r=-1;for(let s=i;s<n;s++){const i=255&(r^t[s]);r=r>>>8^e[i]}return-1^r}(n,r+4,s);n[s]=o>>24&255,n[s+1]=o>>16&255,n[s+2]=o>>8&255,n[s+3]=255&o}function n(t){let e=t.length;const i=65535,n=Math.ceil(e/i),r=new Uint8Array(2+e+5*n+4);let s=0;r[s++]=120,r[s++]=156;let a=0;for(;e>i;)r[s++]=0,r[s++]=255,r[s++]=255,r[s++]=0,r[s++]=0,r.set(t.subarray(a,a+i),s),s+=i,a+=i,e-=i;r[s++]=1,r[s++]=255&e,r[s++]=e>>8&255,r[s++]=255&~e,r[s++]=(65535&~e)>>8&255,r.set(t.subarray(a),s),s+=t.length-a;const o=function(t,e,i){let n=1,r=0;for(let s=e;s<i;++s)n=(n+(255&t[s]))%65521,r=(r+n)%65521;return r<<16|n}(t,0,t.length);return r[s++]=o>>24&255,r[s++]=o>>16&255,r[s++]=o>>8&255,r[s++]=255&o,r}function s(e,s,a,o){const l=e.width,c=e.height;let d,u,p;const g=e.data;switch(s){case r.ImageKind.GRAYSCALE_1BPP:u=0,d=1,p=l+7>>3;break;case r.ImageKind.RGB_24BPP:u=2,d=8,p=3*l;break;case r.ImageKind.RGBA_32BPP:u=6,d=8,p=4*l;break;default:throw new Error("invalid format")}const f=new Uint8Array((1+p)*c);let m=0,b=0;for(let t=0;t<c;++t)f[m++]=0,f.set(g.subarray(b,b+p),m),b+=p,m+=p;if(s===r.ImageKind.GRAYSCALE_1BPP&&o){m=0;for(let t=0;t<c;t++){m++;for(let t=0;t<p;t++)f[m++]^=255}}const v=new Uint8Array([l>>24&255,l>>16&255,l>>8&255,255&l,c>>24&255,c>>16&255,c>>8&255,255&c,d,u,0,0,0]),_=function(t){if(!r.isNodeJS)return n(t);try{const e=parseInt(process.versions.node)>=8?t:Buffer.from(t),i=__webpack_require__(787324).deflateSync(e,{level:9});return i instanceof Uint8Array?i:new Uint8Array(i)}catch(e){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return n(t)}(f),y=t.length+36+v.length+_.length,A=new Uint8Array(y);let S=0;return A.set(t,S),S+=t.length,i("IHDR",v,A,S),S+=12+v.length,i("IDATA",_,A,S),S+=12+_.length,i("IEND",new Uint8Array(0),A,S),h(A,"image/png",a)}return function(t,e,i){return s(t,void 0===t.kind?r.ImageKind.GRAYSCALE_1BPP:t.kind,e,i)}}();class u{constructor(){this.fontSizeScale=1,this.fontWeight=a,this.fontSize=0,this.textMatrix=r.IDENTITY_MATRIX,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=r.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=o,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(t,e){this.x=t,this.y=e}}function p(t){if(Number.isInteger(t))return t.toString();const e=t.toFixed(10);let i=e.length-1;if("0"!==e[i])return e;do{i--}while("0"===e[i]);return e.substring(0,"."===e[i]?i:i+1)}function g(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?""
1:`scale(${p(t[0])} ${p(t[3])})`;if(t[0]===t[3]&&t[1]===-t[2])return`rotate(${p(180*Math.acos(t[0])/Math.PI)})`}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return`translate(${p(t[4])} ${p(t[5])})`;return`matrix(${p(t[0])} ${p(t[1])} ${p(t[2])} ${p(t[3])} ${p(t[4])} ${p(t[5])})`}let f=0,m=0,b=0;e.SVGGraphics=class{constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,n.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new n.DOMSVGFactory,this.current=new u,this.transformMatrix=r.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=e,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!i,this._operatorIdMapping=[];for(const n in r.OPS)this._operatorIdMapping[r.OPS[n]]=n}getObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}save(){this.transformStack.push(this.transformMatrix);const t=this.current;this.extraStack.push(t),this.current=t.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(t){this.save(),this.executeOpTree(t),this.restore()}loadDependencies(t){const e=t.fnArray,i=t.argsArray;for(let n=0,s=e.length;n<s;n++)if(e[n]===r.OPS.dependency)for(const t of i[n]){const e=t.startsWith("g_")?this.commonObjs:this.objs,i=new Promise((i=>{e.get(t,i)}));this.current.dependencies.push(i)}return Promise.all(this.current.dependencies)}transform(t,e,i,n,s,a){const o=[t,e,i,n,s,a];this.transformMatrix=r.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(t,e){this.viewport=e;const i=this._initialize(e);return this.loadDependencies(t).then((()=>(this.transformMatrix=r.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(t)),i)))}convertOpList(t){const e=this._operatorIdMapping,i=t.argsArray,n=t.fnArray,r=[];for(let s=0,a=n.length;s<a;s++){const t=n[s];r.push({fnId:t,fn:e[t],args:i[s]})}return function(t){let e=[];const i=[];for(const n of t)"save"!==n.fn?"restore"===n.fn?e=i.pop():e.push(n):(e.push({fnId:92,fn:"group",items:[]}),i.push(e),e=e.at(-1).items);return e}(r)}executeOpTree(t){for(const e of t){const t=e.fn,i=e.fnId,n=e.args;switch(0|i){case r.OPS.beginText:this.beginText();break;case r.OPS.dependency:break;case r.OPS.setLeading:this.setLeading(n);break;case r.OPS.setLeadingMoveText:this.setLeadingMoveText(n[0],n[1]);break;case r.OPS.setFont:this.setFont(n);break;case r.OPS.showText:case r.OPS.showSpacedText:this.showText(n[0]);break;case r.OPS.endText:this.endText();break;case r.OPS.moveText:this.moveText(n[0],n[1]);break;case r.OPS.setCharSpacing:this.setCharSpacing(n[0]);break;case r.OPS.setWordSpacing:this.setWordSpacing(n[0]);break;case r.OPS.setHScale:this.setHScale(n[0]);break;case r.OPS.setTextMatrix:this.setTextMatrix(n[0],n[1],n[2],n[3],n[4],n[5]);break;case r.OPS.setTextRise:this.setTextRise(n[0]);break;case r.OPS.setTextRenderingMode:this.setTextRenderingMode(n[0]);break;case r.OPS.setLineWidth:this.setLineWidth(n[0]);break;case r.OPS.setLineJoin:this.setLineJoin(n[0]);break;case r.OPS.setLineCap:this.setLineCap(n[0]);break;case r.OPS.setMiterLimit:this.setMiterLimit(n[0]);break;case r.OPS.setFillRGBColor:this.setFillRGBColor(n[0],n[1],n[2]);break;case r.OPS.setStrokeRGBColor:this.setStrokeRGBColor(n[0],n[1],n[2]);break;case r.OPS.setStrokeColorN:this.setStrokeColorN(n);break;case r.OPS.setFillColorN:this.setFillColorN(n);break;case r.OPS.shadingFill:this.shadingFill(n[0]);break;case r.OPS.setDash:this.setDash(n[0],n[1]);break;case r.OPS.setRenderingIntent:this.setRenderingIntent(n[0]);break;case r.OPS.setFlatness:this.setFlatness(n[0]);break;case r.OPS.setGState:this.setGState(n[0]);break;case r.OPS.fill:this.fill();break;case r.OPS.eoFill:this.eoFill();break;case r.OPS.stroke:this.stroke();break;case r.OPS.fillStroke:this.fillStroke();break;case r.OPS.eoFillStroke:this.eoFillStroke();break;case r.OPS.clip:this.clip("nonzero");break;case r.OPS.eoClip:this.clip("evenodd");break;case r.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case r.OPS.paintImageXObject:this.paintImageXObject(n[0]);break;case r.OPS.paintInlineImageXObject:this.paintInlineImageXObject(n[0]);break;case r.OPS.paintImageMaskXObject:this.paintImageMaskXObject(n[0]);break;case r.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(n[0],n[1]);break;case r.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case r.OPS.closePath:this.closePath();break;case r.OPS.closeStroke:this.closeStroke();break;case r.OPS.closeFillStroke:this.closeFillStroke();break;case r.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case r.OPS.nextLine:this.nextLine();break;case r.OPS.transform:this.transform(n[0],n[1],n[2],n[3],n[4],n[5]);break;case r.OPS.constructPath:this.constructPath(n[0],n[1]);break;case r.OPS.endPath:this.endPath();break;case 92:this.group(e.items);break;
vendor: 1,787 bytes, line 1
1default:(0,r.warn)(`Unimplemented operator ${t}`)}}}setWordSpacing(t){this.current.wordSpacing=t}setCharSpacing(t){this.current.charSpacing=t}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(t,e,i,n,r,s){const a=this.current;a.textMatrix=a.lineMatrix=[t,e,i,n,r,s],a.textMatrixScale=Math.hypot(t,e),a.x=a.lineX=0,a.y=a.lineY=0,a.xcoords=[],a.ycoords=[],a.tspan=this.svgFactory.createElement("svg:tspan"),a.tspan.setAttributeNS(null,"font-family",a.fontFamily),a.tspan.setAttributeNS(null,"font-size",`${p(a.fontSize)}px`),a.tspan.setAttributeNS(null,"y",p(-a.y)),a.txtElement=this.svgFactory.createElement("svg:text"),a.txtElement.append(a.tspan)}beginText(){const t=this.current;t.x=t.lineX=0,t.y=t.lineY=0,t.textMatrix=r.IDENTITY_MATRIX,t.lineMatrix=r.IDENTITY_MATRIX,t.textMatrixScale=1,t.tspan=this.svgFactory.createElement("svg:tspan"),t.txtElement=this.svgFactory.createElement("svg:text"),t.txtgrp=this.svgFactory.createElement("svg:g"),t.xcoords=[],t.ycoords=[]}moveText(t,e){const i=this.current;i.x=i.lineX+=t,i.y=i.lineY+=e,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",`${p(i.fontSize)}px`),i.tspan.setAttributeNS(null,"y",p(-i.y))}showText(t){const e=this.current,i=e.font,n=e.fontSize;if(0===n)return;const l=e.fontSizeScale,c=e.charSpacing,h=e.wordSpacing,d=e.fontDirection,u=e.textHScale*d,f=i.vertical,m=f?1:-1,b=i.defaultVMetrics,v=n*e.fontMatrix[0];let _=0;for(const r of t){if(null===r){_+=d*h;continue}if("number"===typeof r){_+=m*r*n/1e3;continue}const t=(r.isSpace?h:0)+c,s=r.fontChar;let a,o,u=r.width;if(f){let t;const e=r.vmetric||b;t=r.vmetric?e[1]:.5*u,t=-t*v;const i=e[2]*v;u=e?-e[0]:u,a=t/l,o=(_+i)/l}else a=_/l,o=0;
1(r.isInFont||i.missingFile)&&(e.xcoords.push(e.x+a),f&&e.ycoords.push(-e.y+o),e.tspan.textContent+=s),_+=f?u*v-t*d:u*v+t*d}e.tspan.setAttributeNS(null,"x",e.xcoords.map(p).join(" ")),f?e.tspan.setAttributeNS(null,"y",e.ycoords.map(p).join(" ")):e.tspan.setAttributeNS(null,"y",p(-e.y)),f?e.y-=_:e.x+=_*u,e.tspan.setAttributeNS(null,"font-family",e.fontFamily),e.tspan.setAttributeNS(null,"font-size",`${p(e.fontSize)}px`),e.fontStyle!==s&&e.tspan.setAttributeNS(null,"font-style",e.fontStyle),e.fontWeight!==a&&e.tspan.setAttributeNS(null,"font-weight",e.fontWeight);const y=e.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;if(y===r.TextRenderingMode.FILL||y===r.TextRenderingMode.FILL_STROKE?(e.fillColor!==o&&e.tspan.setAttributeNS(null,"fill",e.fillColor),e.fillAlpha<1&&e.tspan.setAttributeNS(null,"fill-opacity",e.fillAlpha)):e.textRenderingMode===r.TextRenderingMode.ADD_TO_PATH?e.tspan.setAttributeNS(null,"fill","transparent"):e.tspan.setAttributeNS(null,"fill","none"),y===r.TextRenderingMode.STROKE||y===r.TextRenderingMode.FILL_STROKE){const t=1/(e.textMatrixScale||1);this._setStrokeAttributes(e.tspan,t)}let A=e.textMatrix;0!==e.textRise&&(A=A.slice(),A[5]+=e.textRise),e.txtElement.setAttributeNS(null,"transform",`${g(A)} scale(${p(u)}, -1)`),e.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.txtElement.append(e.tspan),e.txtgrp.append(e.txtElement),this._ensureTransformGroup().append(e.txtElement)}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}addFontStyle(t){if(!t.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 e=h(t.data,t.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${t.loadedName}"; src: url(${e}); }\n`}setFont(t){const e=this.current,i=this.commonObjs.get(t[0]);let n=t[1];e.font=i,!this.embedFonts||i.missingFile||this.embeddedFonts[i.loadedName]||(this.addFontStyle(i),this.embeddedFonts[i.loadedName]=i),e.fontMatrix=i.fontMatrix||r.FONT_IDENTITY_MATRIX;let s="normal";i.black?s="900":i.bold&&(s="bold");const a=i.italic?"italic":"normal";n<0?(n=-n,e.fontDirection=-1):e.fontDirection=1,e.fontSize=n,e.fontFamily=i.loadedName,e.fontWeight=s,e.fontStyle=a,e.tspan=this.svgFactory.createElement("svg:tspan"),e.tspan.setAttributeNS(null,"y",p(-e.y)),e.xcoords=[],e.ycoords=[]}endText(){const t=this.current;t.textRenderingMode&r.TextRenderingMode.ADD_TO_PATH_FLAG&&t.txtElement?.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(t){t>0&&(this.current.lineWidth=t)}setLineCap(t){this.current.lineCap=l[t]}setLineJoin(t){this.current.lineJoin=c[t]}setMiterLimit(t){this.current.miterLimit=t}setStrokeAlpha(t){this.current.strokeAlpha=t}setStrokeRGBColor(t,e,i){this.current.strokeColor=r.Util.makeHexColor(t,e,i)}setFillAlpha(t){this.current.fillAlpha=t}setFillRGBColor(t,e,i){this.current.fillColor=r.Util.makeHexColor(t,e,i),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}shadingFill(t){const{width:e,height:i}=this.viewport,n=r.Util.inverseTransform(this.transformMatrix),[s,a,o,l]=r.Util.getAxialAlignedBoundingBox([0,0,e,i],n),c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x",s),c.setAttributeNS(null,"y",a),c.setAttributeNS(null,"width",o-s),c.setAttributeNS(null,"height",l-a),c.setAttributeNS(null,"fill",this._makeShadingPattern(t)),this.current.fillAlpha<1&&c.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(c)}_makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}_makeTilingPattern(t){const e=t[1],i=t[2],n=t[3]||r.IDENTITY_MATRIX,[s,a,o,l]=t[4],c=t[5],h=t[6],d=t[7],u="shading"+b++,[p,g,f,m]=r.Util.normalizeRect([...r.Util.applyTransform([s,a],n),...r.Util.applyTransform([o,l],n)]),[v,_]=r.Util.singularValueDecompose2dScale(n),y=c*v,A=h*_,S=this.svgFactory.createElement("svg:pattern");S.setAttributeNS(null,"id",u),S.setAttributeNS(null,"patternUnits","userSpaceOnUse"),S.setAttributeNS(null,"width",y),S.setAttributeNS(null,"height",A),S.setAttributeNS(null,"x",`${p}`),S.setAttributeNS(null,"y",`${g}`);const x=this.svg,w=this.transformMatrix,E=this.current.fillColor,C=this.current.strokeColor,T=this.svgFactory.create(f-p,m-g);if(this.svg=T,this.transformMatrix=n,2===d){const t=r.Util.makeHexColor(...e);this.current.fillColor=t,this.current.strokeColor=t}return this.executeOpTree(this.convertOpList(i)),this.svg=x,this.transformMatrix=w,this.current.fillColor=E,this.current.strokeColor=C,S.append(T.childNodes[0]),this.defs.append(S),`url(#${u})`}_makeShadingPattern(t){switch("string"===typeof t&&(t=this.objs.get(t)),t[0]){case"RadialAxial":const e="shading"+b++,i=t[3];let n;switch(t[1]){case"axial":const i=t[4],r=t[5];n=this.svgFactory.createElement("svg:linearGradient"),n.setAttributeNS(null,"id",e),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"x1",i[0]),n.setAttributeNS(null,"y1",i[1]),n.setAttributeNS(null,"x2",r[0]),n.setAttributeNS(null,"y2",r[1]);break;case"radial":const s=t[4],a=t[5],o=t[6],l=t[7];n=this.svgFactory.createElement("svg:radialGradient"),n.setAttributeNS(null,"id",e),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"cx",a[0]),n.setAttributeNS(null,"cy",a[1]),n.setAttributeNS(null,"r",l),n.setAttributeNS(null,"fx",s[0]),n.setAttributeNS(null,"fy",s[1]),n.setAttributeNS(null,"fr",o);break;default:throw new Error(`Unknown RadialAxial type: ${t[1]}`)}for(const t of i){const e=this.svgFactory.createElement("svg:stop");
vendor: 4,643 bytes, line 1
1e.setAttributeNS(null,"offset",t[0]),e.setAttributeNS(null,"stop-color",t[1]),n.append(e)}return this.defs.append(n),`url(#${e})`;case"Mesh":return(0,r.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${t[0]}`)}}setDash(t,e){this.current.dashArray=t,this.current.dashPhase=e}constructPath(t,e){const i=this.current;let n=i.x,s=i.y,a=[],o=0;for(const l of t)switch(0|l){case r.OPS.rectangle:n=e[o++],s=e[o++];const t=n+e[o++],i=s+e[o++];a.push("M",p(n),p(s),"L",p(t),p(s),"L",p(t),p(i),"L",p(n),p(i),"Z");break;case r.OPS.moveTo:n=e[o++],s=e[o++],a.push("M",p(n),p(s));break;case r.OPS.lineTo:n=e[o++],s=e[o++],a.push("L",p(n),p(s));break;case r.OPS.curveTo:n=e[o+4],s=e[o+5],a.push("C",p(e[o]),p(e[o+1]),p(e[o+2]),p(e[o+3]),p(n),p(s)),o+=6;break;case r.OPS.curveTo2:a.push("C",p(n),p(s),p(e[o]),p(e[o+1]),p(e[o+2]),p(e[o+3])),n=e[o+2],s=e[o+3],o+=4;break;case r.OPS.curveTo3:n=e[o+2],s=e[o+3],a.push("C",p(e[o]),p(e[o+1]),p(n),p(s),p(n),p(s)),o+=4;break;case r.OPS.closePath:a.push("Z")}a=a.join(" "),i.path&&t.length>0&&t[0]!==r.OPS.rectangle&&t[0]!==r.OPS.moveTo?a=i.path.getAttributeNS(null,"d")+a:(i.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(i.path)),i.path.setAttributeNS(null,"d",a),i.path.setAttributeNS(null,"fill","none"),i.element=i.path,i.setCurrentPoint(n,s)}endPath(){const t=this.current;if(t.path=null,!this.pendingClip)return;if(!t.element)return void(this.pendingClip=null);const e="clippath"+f++,i=this.svgFactory.createElement("svg:clipPath");i.setAttributeNS(null,"id",e),i.setAttributeNS(null,"transform",g(this.transformMatrix));const n=t.element.cloneNode(!0);if("evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,i.append(n),this.defs.append(i),t.activeClipUrl){t.clipGroup=null;for(const t of this.extraStack)t.clipGroup=null;i.setAttributeNS(null,"clip-path",t.activeClipUrl)}t.activeClipUrl=`url(#${e})`,this.tgrp=null}clip(t){this.pendingClip=t}closePath(){const t=this.current;if(t.path){const e=`${t.path.getAttributeNS(null,"d")}Z`;t.path.setAttributeNS(null,"d",e)}}setLeading(t){this.current.leading=-t}setTextRise(t){this.current.textRise=t}setTextRenderingMode(t){this.current.textRenderingMode=t}setHScale(t){this.current.textHScale=t/100}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,i]of t)switch(e){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,r.warn)(`Unimplemented graphic state operator ${e}`)}}fill(){const t=this.current;t.element&&(t.element.setAttributeNS(null,"fill",t.fillColor),t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha),this.endPath())}stroke(){const t=this.current;t.element&&(this._setStrokeAttributes(t.element),t.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const i=this.current;let n=i.dashArray;1!==e&&n.length>0&&(n=n.map((function(t){return e*t}))),t.setAttributeNS(null,"stroke",i.strokeColor),t.setAttributeNS(null,"stroke-opacity",i.strokeAlpha),t.setAttributeNS(null,"stroke-miterlimit",p(i.miterLimit)),t.setAttributeNS(null,"stroke-linecap",i.lineCap),t.setAttributeNS(null,"stroke-linejoin",i.lineJoin),t.setAttributeNS(null,"stroke-width",p(e*i.lineWidth)+"px"),t.setAttributeNS(null,"stroke-dasharray",n.map(p).join(" ")),t.setAttributeNS(null,"stroke-dashoffset",p(e*i.dashPhase)+"px")}eoFill(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0"),t.setAttributeNS(null,"y","0"),t.setAttributeNS(null,"width","1px"),t.setAttributeNS(null,"height","1px"),t.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(t)}paintImageXObject(t){const e=this.getObject(t);e?this.paintInlineImageXObject(e):(0,r.warn)(`Dependent image with object ID ${t} is not ready yet`)}
1paintInlineImageXObject(t,e){const i=t.width,n=t.height,r=d(t,this.forceDataSchema,!!e),s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",p(i)),s.setAttributeNS(null,"height",p(n)),this.current.element=s,this.clip("nonzero");const a=this.svgFactory.createElement("svg:image");a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y",p(-n)),a.setAttributeNS(null,"width",p(i)+"px"),a.setAttributeNS(null,"height",p(n)+"px"),a.setAttributeNS(null,"transform",`scale(${p(1/i)} ${p(-1/n)})`),e?e.append(a):this._ensureTransformGroup().append(a)}paintImageMaskXObject(t){const e=this.getObject(t.data,t);if(e.bitmap)return void(0,r.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");const i=this.current,n=e.width,s=e.height,a=i.fillColor;i.maskId="mask"+m++;const o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",i.maskId);const l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x","0"),l.setAttributeNS(null,"y","0"),l.setAttributeNS(null,"width",p(n)),l.setAttributeNS(null,"height",p(s)),l.setAttributeNS(null,"fill",a),l.setAttributeNS(null,"mask",`url(#${i.maskId})`),this.defs.append(o),this._ensureTransformGroup().append(l),this.paintInlineImageXObject(e,o)}paintFormXObjectBegin(t,e){if(Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e){const t=e[2]-e[0],i=e[3]-e[1],n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x",e[0]),n.setAttributeNS(null,"y",e[1]),n.setAttributeNS(null,"width",p(t)),n.setAttributeNS(null,"height",p(i)),this.current.element=n,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(t){const e=this.svgFactory.create(t.width,t.height),i=this.svgFactory.createElement("svg:defs");e.append(i),this.defs=i;const n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",g(t.transform)),e.append(n),this.svg=n,e}_ensureClipGroup(){if(!this.current.clipGroup){const t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(t),this.current.clipGroup=t}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",g(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}},(t,e,i)=>{var n=i(3),r=i(188),s=i(193);n({target:"Array",proto:!0},{group:function(t){var e=arguments.length>1?arguments[1]:void 0;return r(this,t,e)}}),s("group")},(t,e,i)=>{var n=i(99),r=i(14),s=i(13),a=i(40),o=i(18),l=i(64),c=i(189),h=i(108),d=Array,u=r([].push);t.exports=function(t,e,i,r){for(var p,g,f,m=a(t),b=s(m),v=n(e,i),_=c(null),y=l(b),A=0;y>A;A++)f=b[A],(g=o(v(f,A,m)))in _?u(_[g],f):_[g]=[f];if(r&&(p=r(m))!==d)for(g in _)_[g]=h(p,_[g]);return _}},(t,e,i)=>{var n,r=i(47),s=i(190),a=i(66),o=i(55),l=i(192),c=i(43),h=i(54),d=h("IE_PROTO"),u=function(){},p=function(t){return"<script>"+t+"<\/script>"},g=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},f=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}f="undefined"!=typeof document?document.domain&&n?g(n):function(){var t,e=c("iframe");return e.style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F}():g(n);for(var t=a.length;t--;)delete f.prototype[a[t]];return f()};
1o[d]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(u.prototype=r(t),i=new u,u.prototype=null,i[d]=t):i=f(),void 0===e?i:s.f(i,e)}},(t,e,i)=>{var n=i(6),r=i(46),s=i(45),a=i(47),o=i(12),l=i(191);e.f=n&&!r?Object.defineProperties:function(t,e){a(t);for(var i,n=o(e),r=l(e),c=r.length,h=0;c>h;)s.f(t,i=r[h++],n[i]);return t}},(t,e,i)=>{var n=i(59),r=i(66);t.exports=Object.keys||function(t){return n(t,r)}},(t,e,i)=>{var n=i(24);t.exports=n("document","documentElement")},(t,e,i)=>{var n=i(34),r=i(189),s=i(45).f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)}),t.exports=function(t){o[a][t]=!0}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XfaText=void 0,i(89);class n{static textContent(t){const e=[],i={items:e,styles:Object.create(null)};return function t(i){if(!i)return;let r=null;const s=i.name;if("#text"===s)r=i.value;else{if(!n.shouldBuildText(s))return;i?.attributes?.textContent?r=i.attributes.textContent:i.value&&(r=i.value)}if(null!==r&&e.push({str:r}),i.children)for(const e of i.children)t(e)}(t),i}static shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}e.XfaText=n},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextLayerRenderTask=void 0,e.renderTextLayer=function(t){t.textContentSource||!t.textContent&&!t.textContentStream||((0,r.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),t.textContentSource=t.textContent||t.textContentStream);const{container:e,viewport:i}=t,n=getComputedStyle(e),s=n.getPropertyValue("visibility"),a=parseFloat(n.getPropertyValue("--scale-factor"));"visible"===s&&(!a||Math.abs(a-i.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 o=new h(t);return o._render(),o},e.updateTextLayer=function(t){let{container:e,viewport:i,textDivs:n,textDivProperties:s,isOffscreenCanvasSupported:a,mustRotate:l=!0,mustRescale:h=!0}=t;if(l&&(0,r.setLayerDimensions)(e,{rotation:i.rotation}),h){const t=o(0,a),e={prevFontSize:null,prevFontFamily:null,div:null,scale:i.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:t};for(const i of n)e.properties=s.get(i),e.div=i,c(e)}},i(89),i(2);var n=i(1),r=i(168);const s=30,a=new Map;function o(t,e){let i;if(e&&n.FeatureTest.isOffscreenCanvasSupported)i=new OffscreenCanvas(t,t).getContext("2d",{alpha:!1});else{const e=document.createElement("canvas");e.width=e.height=t,i=e.getContext("2d",{alpha:!1})}return i}function l(t,e,i){const r=document.createElement("span"),l={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};t._textDivs.push(r);const c=n.Util.transform(t._transform,e.transform);let h=Math.atan2(c[1],c[0]);const d=i[e.fontName];d.vertical&&(h+=Math.PI/2);const u=Math.hypot(c[2],c[3]),p=u*function(t,e){const i=a.get(t);if(i)return i;const n=o(s,e);n.font=`30px ${t}`;const r=n.measureText("");let l=r.fontBoundingBoxAscent,c=Math.abs(r.fontBoundingBoxDescent);if(l){const e=l/(l+c);return a.set(t,e),n.canvas.width=n.canvas.height=0,e}n.strokeStyle="red",n.clearRect(0,0,s,s),n.strokeText("g",0,0);let h=n.getImageData(0,0,s,s).data;c=0;for(let a=h.length-1-3;a>=0;a-=4)if(h[a]>0){c=Math.ceil(a/4/s);break}n.clearRect(0,0,s,s),n.strokeText("A",0,s),h=n.getImageData(0,0,s,s).data,l=0;for(let a=0,o=h.length;a<o;a+=4)if(h[a]>0){l=s-Math.floor(a/4/s);break}if(n.canvas.width=n.canvas.height=0,l){const e=l/(l+c);return a.set(t,e),e}return a.set(t,.8),.8}(d.fontFamily,t._isOffscreenCanvasSupported);let g,f;0===h?(g=c[4],f=c[5]-p):(g=c[4]+p*Math.sin(h),f=c[5]-p*Math.cos(h));const m="calc(var(--scale-factor)*",b=r.style;t._container===t._rootContainer?(b.left=`${(100*g/t._pageWidth).toFixed(2)}%`,b.top=`${(100*f/t._pageHeight).toFixed(2)}%`):(b.left=`${m}${g.toFixed(2)}px)`,b.top=`${m}${f.toFixed(2)}px)`),b.fontSize=`${m}${u.toFixed(2)}px)`,b.fontFamily=d.fontFamily,l.fontSize=u,r.setAttribute("role","presentation"),r.textContent=e.str,r.dir=e.dir,t._fontInspectorEnabled&&(r.dataset.fontName=e.fontName),0!==h&&(l.angle=h*(180/Math.PI));let v=!1;if(e.str.length>1)v=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){const t=Math.abs(e.transform[0]),i=Math.abs(e.transform[3]);t!==i&&Math.max(t,i)/Math.min(t,i)>1.5&&(v=!0)}v&&(l.canvasWidth=d.vertical?e.height:e.width),t._textDivProperties.set(r,l),t._isReadableStream&&t._layoutText(r)}function c(t){const{div:e,scale:i,properties:n,ctx:r,prevFontSize:s,prevFontFamily:a}=t,{style:o}=e;let l="";if(0!==n.canvasWidth&&n.hasText){const{fontFamily:c}=o,{canvasWidth:h,fontSize:d}=n;s===d&&a===c||(r.font=`${d*i}px ${c}`,t.prevFontSize=d,t.prevFontFamily=c);const{width:u}=r.measureText(e.textContent);u>0&&(l=`scaleX(${h*i/u})`)}0!==n.angle&&(l=`rotate(${n.angle}deg) ${l}`),l.length>0&&(o.transform=l)}class h{constructor(t){let{textContentSource:e,container:i,viewport:s,textDivs:a,textDivProperties:l,textContentItemsStr:c,isOffscreenCanvasSupported:h}=t;this._textContentSource=e,this._isReadableStream=e instanceof ReadableStream,this._container=this._rootContainer=i,this._textDivs=a||[],this._textContentItemsStr=c||[],this._isOffscreenCanvasSupported=h,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._textDivProperties=l||new WeakMap,this._canceled=!1,this._capability=new n.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:s.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:o(0,h)};const{pageWidth:d,pageHeight:u,pageX:p,pageY:g}=s.rawDims;this._transform=[1,0,0,-1,-p,g+u],this._pageWidth=d,this._pageHeight=u,(0,r.setLayerDimensions)(i,s),this._capability.promise.finally((()=>{this._layoutTextParams=null})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")).catch((()=>{})),this._reader=null),this._capability.reject(new n.AbortException("TextLayer task cancelled."))}_processItems(t,e){for(const i of t)if(void 0!==i.str)this._textContentItemsStr.push(i.str),l(this,i,e);
1else if("beginMarkedContentProps"===i.type||"beginMarkedContent"===i.type){const t=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==i.id&&this._container.setAttribute("id",`${i.id}`),t.append(this._container)}else"endMarkedContent"===i.type&&(this._container=this._container.parentNode)}_layoutText(t){const e=this._layoutTextParams.properties=this._textDivProperties.get(t);if(this._layoutTextParams.div=t,c(this._layoutTextParams),e.hasText&&this._container.append(t),e.hasEOL){const t=document.createElement("br");t.setAttribute("role","presentation"),this._container.append(t)}}_render(){const t=new n.PromiseCapability;let e=Object.create(null);if(this._isReadableStream){const i=()=>{this._reader.read().then((n=>{let{value:r,done:s}=n;s?t.resolve():(Object.assign(e,r.styles),this._processItems(r.items,e),i())}),t.reject)};this._reader=this._textContentSource.getReader(),i()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:e,styles:i}=this._textContentSource;this._processItems(e,i),t.resolve()}}t.promise.then((()=>{e=null,function(t){if(t._canceled)return;const e=t._textDivs,i=t._capability;if(e.length>1e5)i.resolve();else{if(!t._isReadableStream)for(const i of e)t._layoutText(i);i.resolve()}}(this)}),this._capability.reject)}}e.TextLayerRenderTask=h},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationEditorLayer=void 0,i(125),i(136),i(138),i(141),i(143),i(145),i(147);var n=i(1),r=i(164),s=i(197),a=i(202),o=i(168),l=i(203);class c{#Se;#xe=!1;#we=null;#Ee=this.pointerup.bind(this);#Ce=this.pointerdown.bind(this);#Te=new Map;#Pe=!1;#ke=!1;#Me=!1;#Re;static _initialized=!1;constructor(t){let{uiManager:e,pageIndex:i,div:n,accessibilityManager:r,annotationLayer:o,viewport:h,l10n:d}=t;const u=[s.FreeTextEditor,a.InkEditor,l.StampEditor];if(!c._initialized){c._initialized=!0;for(const t of u)t.initialize(d)}e.registerEditorTypes(u),this.#Re=e,this.pageIndex=i,this.div=n,this.#Se=r,this.#we=o,this.viewport=h,this.#Re.addLayer(this)}get isEmpty(){return 0===this.#Te.size}updateToolbar(t){this.#Re.updateToolbar(t)}updateMode(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.#Re.getMode();this.#Fe(),t===n.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),t!==n.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",t===n.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",t===n.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",t===n.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(t){if(t||this.#Re.getMode()===n.AnnotationEditorType.INK){if(!t)for(const t of this.#Te.values())if(t.isEmpty())return void t.setInBackground();this.#De({offsetX:0,offsetY:0},!1).setInBackground()}}setEditingState(t){this.#Re.setEditingState(t)}addCommands(t){this.#Re.addCommands(t)}enable(){this.div.style.pointerEvents="auto";const t=new Set;for(const i of this.#Te.values())i.enableEditing(),i.annotationElementId&&t.add(i.annotationElementId);if(!this.#we)return;const e=this.#we.getEditableAnnotations();for(const i of e){if(i.hide(),this.#Re.isDeletedAnnotationElement(i.data.id))continue;if(t.has(i.data.id))continue;const e=this.deserialize(i);e&&(this.addOrRebuild(e),e.enableEditing())}}disable(){this.#Me=!0,this.div.style.pointerEvents="none";const t=new Set;for(const e of this.#Te.values())e.disableEditing(),e.annotationElementId&&null===e.serialize()?(this.getEditableAnnotation(e.annotationElementId)?.show(),e.remove()):t.add(e.annotationElementId);if(this.#we){const e=this.#we.getEditableAnnotations();for(const i of e){const{id:e}=i.data;t.has(e)||this.#Re.isDeletedAnnotationElement(e)||i.show()}}this.#Fe(),this.isEmpty&&(this.div.hidden=!0),this.#Me=!1}getEditableAnnotation(t){return this.#we?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#Re.getActive()!==t&&this.#Re.setActiveEditor(t)}enableClick(){this.div.addEventListener("pointerdown",this.#Ce),this.div.addEventListener("pointerup",this.#
1Ee)}disableClick(){this.div.removeEventListener("pointerdown",this.#Ce),this.div.removeEventListener("pointerup",this.#Ee)}attach(t){this.#Te.set(t.id,t);const{annotationElementId:e}=t;e&&this.#Re.isDeletedAnnotationElement(e)&&this.#Re.removeDeletedAnnotationElement(t)}detach(t){this.#Te.delete(t.id),this.#Se?.removePointerInTextLayer(t.contentDiv),!this.#Me&&t.annotationElementId&&this.#Re.addDeletedAnnotationElement(t)}remove(t){this.detach(t),this.#Re.removeEditor(t),t.div.contains(document.activeElement)&&setTimeout((()=>{this.#Re.focusMainContainer()}),0),t.div.remove(),t.isAttachedToDOM=!1,this.#ke||this.addInkEditorIfNeeded(!1)}changeParent(t){t.parent!==this&&(t.annotationElementId&&(this.#Re.addDeletedAnnotationElement(t.annotationElementId),r.AnnotationEditor.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(this.changeParent(t),this.#Re.addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(),this.#Re.addToAnnotationStorage(t)}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;const{activeElement:e}=document;t.div.contains(e)&&(t._focusEventsAllowed=!1,setTimeout((()=>{t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0}),e.focus())}),0)),t._structTreeParentId=this.#Se?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?t.rebuild():this.add(t)}addUndoableEditor(t){this.addCommands({cmd:()=>t._uiManager.rebuild(t),undo:()=>{t.remove()},mustExec:!1})}getNextId(){return this.#Re.getId()}#Ie(t){switch(this.#Re.getMode()){case n.AnnotationEditorType.FREETEXT:return new s.FreeTextEditor(t);case n.AnnotationEditorType.INK:return new a.InkEditor(t);case n.AnnotationEditorType.STAMP:return new l.StampEditor(t)}return null}pasteEditor(t,e){this.#Re.updateToolbar(t),this.#Re.updateMode(t);const{offsetX:i,offsetY:n}=this.#Oe(),r=this.getNextId(),s=this.#Ie({parent:this,id:r,x:i,y:n,uiManager:this.#Re,isCentered:!0,...e});s&&this.add(s)}deserialize(t){switch(t.annotationType??t.annotationEditorType){case n.AnnotationEditorType.FREETEXT:return s.FreeTextEditor.deserialize(t,this,this.#Re);case n.AnnotationEditorType.INK:return a.InkEditor.deserialize(t,this,this.#Re);case n.AnnotationEditorType.STAMP:return l.StampEditor.deserialize(t,this,this.#Re)}return null}#De(t,e){const i=this.getNextId(),n=this.#Ie({parent:this,id:i,x:t.offsetX,y:t.offsetY,uiManager:this.#Re,isCentered:e});return n&&this.add(n),n}#Oe(){const{x:t,y:e,width:i,height:n}=this.div.getBoundingClientRect(),r=Math.max(0,t),s=Math.max(0,e),a=(r+Math.min(window.innerWidth,t+i))/2-t,o=(s+Math.min(window.innerHeight,e+n))/2-e,[l,c]=this.viewport.rotation%180===0?[a,o]:[o,a];return{offsetX:l,offsetY:c}}addNewEditor(){this.#De(this.#Oe(),!0)}setSelected(t){this.#Re.setSelected(t)}toggleSelected(t){this.#Re.toggleSelected(t)}isSelected(t){return this.#Re.isSelected(t)}unselect(t){this.#Re.unselect(t)}pointerup(t){const{isMac:e}=n.FeatureTest.platform;0!==t.button||t.ctrlKey&&e||t.target===this.div&&this.#Pe&&(this.#Pe=!1,this.#xe?this.#Re.getMode()!==n.AnnotationEditorType.STAMP?this.#De(t,!1):this.#Re.unselectAll():this.#xe=!0)}pointerdown(t){if(this.#Pe)return void(this.#Pe=!1);const{isMac:e}=n.FeatureTest.platform;if(0!==t.button||t.ctrlKey&&e)return;if(t.target!==this.div)return;this.#Pe=!0;const i=this.#Re.getActive();this.#xe=!i||i.isEmpty()}findNewParent(t,e,i){const n=this.#Re.findParent(e,i);return null!==n&&n!==this&&(n.changeParent(t),!0)}destroy(){this.#Re.getActive()?.parent===this&&(this.#Re.commitOrRemove(),this.#Re.setActiveEditor(null));for(const t of this.#Te.values())this.#Se?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#Te.clear(),this.#Re.removeLayer(this)}#Fe(){this.#ke=!0;for(const t of this.#Te.values())t.isEmpty()&&t.remove();this.#ke=!1}render(t){let{viewport:e}=t;this.viewport=e,(0,o.setLayerDimensions)(this.div,e);for(const i of this.#Re.getEditors(this.pageIndex))this.add(i);this.updateMode()}update(t){let{viewport:e}=t;this.#Re.commitOrRemove(),this.viewport=e,(0,o.setLayerDimensions)(this.div,{rotation:e.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}}e.AnnotationEditorLayer=c},(t,e,i)=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.FreeTextEditor=void 0,i(89);var n=i(1),r=i(165),s=i(164),a=i(198);class o extends s.AnnotationEditor{#Le=this.editorDivBlur.bind(this);#Ne=this.editorDivFocus.bind(this);#Be=this.editorDivInput.bind(this);#je=this.editorDivKeydown.bind(this);#Ue;#ze="";#He=`${this.id}-editor`;#We;#qe=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=o.prototype,e=t=>t.isEmpty(),i=r.AnnotationEditorUIManager.TRANSLATE_SMALL,s=r.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,n.shadow)(this,"_keyboardManager",new r.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-s,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[s,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-s],checker:e}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,s],checker:e}]]))}static _type="freetext";constructor(t){super({...t,name:"freeTextEditor"}),this.#Ue=t.color||o._defaultColor||s.AnnotationEditor._defaultLineColor,this.#We=t.fontSize||o._defaultFontSize}static initialize(t){s.AnnotationEditor.initialize(t,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const e=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(e.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,e){switch(t){case n.AnnotationEditorParamsType.FREETEXT_SIZE:o._defaultFontSize=e;break;case n.AnnotationEditorParamsType.FREETEXT_COLOR:o._defaultColor=e}}updateParams(t,e){switch(t){case n.AnnotationEditorParamsType.FREETEXT_SIZE:this.#Ge(e);break;case n.AnnotationEditorParamsType.FREETEXT_COLOR:this.#Ve(e)}}static get defaultPropertiesToUpdate(){return[[n.AnnotationEditorParamsType.FREETEXT_SIZE,o._defaultFontSize],[n.AnnotationEditorParamsType.FREETEXT_COLOR,o._defaultColor||s.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[n.AnnotationEditorParamsType.FREETEXT_SIZE,this.#We],[n.AnnotationEditorParamsType.FREETEXT_COLOR,this.#Ue]]}#Ge(t){const e=t=>{this.editorDiv.style.fontSize=`calc(${t}px * var(--scale-factor))`,this.translate(0,-(t-this.#We)*this.parentScale),this.#We=t,this.#$e()},i=this.#We;this.addCommands({cmd:()=>{e(t)},undo:()=>{e(i)},mustExec:!0,type:n.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Ve(t){const e=this.#Ue;this.addCommands({cmd:()=>{this.#Ue=this.editorDiv.style.color=t},undo:()=>{this.#Ue=this.editorDiv.style.color=e},mustExec:!0,type:n.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,e){this._uiManager.translateSelectedEditors(t,e,!0)}getInitialTranslation(){const t=this.parentScale;return[-o._internalPadding*t,-(o._internalPadding+this.#We)*t]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(n.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",this.#je),this.editorDiv.addEventListener("focus",this.#Ne),this.editorDiv.addEventListener("blur",this.#Le),this.editorDiv.addEventListener("input",this.#Be))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#He),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#je),this.editorDiv.removeEventListener("focus",this.#Ne),this.editorDiv.removeEventListener("blur",this.#Le),this.editorDiv.removeEventListener("input",this.#Be),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){this.width?this.#Xe():(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}#Ke(){const t=this.editorDiv.getElementsByTagName("div");if(0===t.length)return this.editorDiv.innerText;const e=[];for(const i of t)e.push(i.innerText.replace(/\r\n?|\n/,""));return e.join("\n")}#$e(){const[t,e]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:t,div:e}=this,n=e.style.display;e.style.display="hidden",t.div.append(this.div),i=e.getBoundingClientRect(),e.remove(),e.style.display=n}this.rotation%180===this.parentRotation%180?(this.width=i.width/t,this.height=i.height/e):(this.width=i.height/t,this.height=i.width/e),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=this.#ze,e=this.#ze=this.#Ke().trimEnd();if(t===e)return;const i=t=>{this.#ze=t,t?(this.#Ye(),this._uiManager.rebuild(this),this.#$e()):this.remove()};this.addCommands({cmd:()=>{i(e)},undo:()=>{i(t)},mustExec:!1}),this.#$e()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){t.target===this.div&&"Enter"===t.key&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){o._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){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)}
1render(){if(this.div)return this.div;let t,e;this.width&&(t=this.x,e=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#He),this.enableEditing(),s.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then((t=>this.editorDiv?.setAttribute("aria-label",t))),s.AnnotationEditor._l10nPromise.get("free_text2_default_content").then((t=>this.editorDiv?.setAttribute("default-content",t))),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${this.#We}px * var(--scale-factor))`,i.color=this.#Ue,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,r.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[i,n]=this.parentDimensions;if(this.annotationElementId){const{position:r}=this.#qe;let[s,a]=this.getInitialTranslation();[s,a]=this.pageTranslationToScreen(s,a);const[o,l]=this.pageDimensions,[c,h]=this.pageTranslation;let d,u;switch(this.rotation){case 0:d=t+(r[0]-c)/o,u=e+this.height-(r[1]-h)/l;break;case 90:d=t+(r[0]-c)/o,u=e-(r[1]-h)/l,[s,a]=[a,-s];break;case 180:d=t-this.width+(r[0]-c)/o,u=e-(r[1]-h)/l,[s,a]=[-s,-a];break;case 270:d=t+(r[0]-c-this.height*l)/o,u=e+(r[1]-h-this.width*o)/l,[s,a]=[-a,s]}this.setAt(d*i,u*n,s,a)}else this.setAt(t*i,e*n,this.width*i,this.height*n);this.#Ye(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}#Ye(){if(this.editorDiv.replaceChildren(),this.#ze)for(const t of this.#ze.split("\n")){const e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(e)}}get contentDiv(){return this.editorDiv}static deserialize(t,e,i){let r=null;if(t instanceof a.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:e,fontColor:i},rect:s,rotation:a,id:o},textContent:l,textPosition:c,parent:{page:{pageNumber:h}}}=t;if(!l||0===l.length)return null;r=t={annotationType:n.AnnotationEditorType.FREETEXT,color:Array.from(i),fontSize:e,value:l.join("\n"),position:c,pageIndex:h-1,rect:s,rotation:a,id:o,deleted:!1}}const s=super.deserialize(t,e,i);return s.#We=t.fontSize,s.#Ue=n.Util.makeHexColor(...t.color),s.#ze=t.value,s.annotationElementId=t.id||null,s.#qe=r,s}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const e=o._internalPadding*this.parentScale,i=this.getRect(e,e),r=s.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#Ue),a={annotationType:n.AnnotationEditorType.FREETEXT,color:r,fontSize:this.#We,value:this.#ze,pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};
1return t?a:this.annotationElementId&&!this.#Je(a)?null:(a.id=this.annotationElementId,a)}#Je(t){const{value:e,fontSize:i,color:n,rect:r,pageIndex:s}=this.#qe;return t.value!==e||t.fontSize!==i||t.rect.some(((t,e)=>Math.abs(t-r[e])>=1))||t.color.some(((t,e)=>t!==n[e]))||t.pageIndex!==s}#Xe(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.annotationElementId)return;if(this.#$e(),!t&&(0===this.width||0===this.height))return void setTimeout((()=>this.#Xe(!0)),0);const e=o._internalPadding*this.parentScale;this.#qe.rect=this.getRect(e,e)}}e.FreeTextEditor=o},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StampAnnotationElement=e.InkAnnotationElement=e.FreeTextAnnotationElement=e.AnnotationLayer=void 0,i(89),i(125),i(136),i(138),i(141),i(143),i(145),i(147);var n=i(1),r=i(168),s=i(163),a=i(199),o=i(200),l=i(201);const c=1e3,h=new WeakSet;function d(t){return{width:t[2]-t[0],height:t[3]-t[1]}}class u{static create(t){switch(t.data.annotationType){case n.AnnotationType.LINK:return new g(t);case n.AnnotationType.TEXT:return new f(t);case n.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new b(t);case"Btn":return t.data.radioButton?new y(t):t.data.checkBox?new _(t):new A(t);case"Ch":return new S(t);case"Sig":return new v(t)}return new m(t);case n.AnnotationType.POPUP:return new x(t);case n.AnnotationType.FREETEXT:return new E(t);case n.AnnotationType.LINE:return new C(t);case n.AnnotationType.SQUARE:return new T(t);case n.AnnotationType.CIRCLE:return new P(t);case n.AnnotationType.POLYLINE:return new k(t);case n.AnnotationType.CARET:return new R(t);case n.AnnotationType.INK:return new F(t);case n.AnnotationType.POLYGON:return new M(t);case n.AnnotationType.HIGHLIGHT:return new D(t);case n.AnnotationType.UNDERLINE:return new I(t);case n.AnnotationType.SQUIGGLY:return new O(t);case n.AnnotationType.STRIKEOUT:return new L(t);case n.AnnotationType.STAMP:return new N(t);case n.AnnotationType.FILEATTACHMENT:return new B(t);default:return new p(t)}}}class p{#Qe=!1;constructor(t){let{isRenderable:e=!1,ignoreBorder:i=!1,createQuadrilaterals:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(i)),n&&this._createQuadrilaterals()}static _hasPopupData(t){let{titleObj:e,contentsObj:i,richText:n}=t;return!!(e?.str||i?.str||n?.str)}get hasPopupData(){return p._hasPopupData(this.data)}_createContainer(t){const{data:e,parent:{page:i,viewport:r}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",e.id),this instanceof m||(s.tabIndex=c),s.style.zIndex=this.parent.zIndex++,this.data.popupRef&&s.setAttribute("aria-haspopup","dialog"),e.noRotate&&s.classList.add("norotate");const{pageWidth:a,pageHeight:o,pageX:l,pageY:h}=r.rawDims;if(!e.rect||this instanceof x){const{rotation:t}=e;return e.hasOwnCanvas||0===t||this.setRotation(t,s),s}const{width:u,height:p}=d(e.rect),g=n.Util.normalizeRect([e.rect[0],i.view[3]-e.rect[1]+i.view[1],e.rect[2],i.view[3]-e.rect[3]+i.view[1]]);if(!t&&e.borderStyle.width>0){s.style.borderWidth=`${e.borderStyle.width}px`;const t=e.borderStyle.horizontalCornerRadius,i=e.borderStyle.verticalCornerRadius;if(t>0||i>0){const e=`calc(${t}px * var(--scale-factor)) / calc(${i}px * var(--scale-factor))`;s.style.borderRadius=e}else if(this instanceof y){const t=`calc(${u}px * var(--scale-factor)) / calc(${p}px * var(--scale-factor))`;s.style.borderRadius=t}switch(e.borderStyle.style){case n.AnnotationBorderStyleType.SOLID:s.style.borderStyle="solid";break;case n.AnnotationBorderStyleType.DASHED:s.style.borderStyle="dashed";break;case n.AnnotationBorderStyleType.BEVELED:(0,n.warn)("Unimplemented border style: beveled");break;case n.AnnotationBorderStyleType.INSET:(0,n.warn)("Unimplemented border style: inset");break;case n.AnnotationBorderStyleType.UNDERLINE:s.style.borderBottomStyle="solid"}const r=e.borderColor||null;r?(this.#Qe=!0,s.style.borderColor=n.Util.makeHexColor(0|r[0],0|r[1],0|r[2])):s.style.borderWidth=0}s.style.left=100*(g[0]-l)/a+"%",s.style.top=100*(g[1]-h)/o+"%";const{rotation:f}=e;return e.hasOwnCanvas||0===f?(s.style.width=100*u/a+"%",s.style.height=100*p/o+"%"):this.setRotation(f,s),s}setRotation(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(!this.data.rect)return;const{pageWidth:i,pageHeight:n}=this.parent.viewport.rawDims,{width:r,height:s}=d(this.data.rect);let a,o;t%180===0?(a=100*r/i,o=100*s/n):(a=100*s/i,o=100*r/n),e.style.width=`${a}%`,e.style.height=`${o}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(t,e,i)=>{const n=i.detail[t],r=n[0],s=n.slice(1);i.target.style[e]=a.ColorConverters[`${r}_HTML`](s),this.annotationStorage.setValue(this.data.id,{[e]:a.ColorConverters[`${r}_rgb`](s)})};return(0,n.shadow)(this,"_commonActions",{display:t=>{const{display:e}=t.detail,i=e%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:1===e||2===e})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:e}=t.detail;this.container.style.visibility=e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:e,noView:e})},focus:t=>{setTimeout((()=>
1t.target.focus({preventScroll:!1})),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:t=>{const e=t.detail.rotation;this.setRotation(e),this.annotationStorage.setValue(this.data.id,{rotation:e})}})}_dispatchEventFromSandbox(t,e){const i=this._commonActions;for(const n of Object.keys(e.detail))(t[n]||i[n])?.(e)}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const i=this._commonActions;for(const[n,r]of Object.entries(e)){const s=i[n];s&&(s({detail:{[n]:r},target:t}),delete e[n])}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,i,n,r]=this.data.rect;if(1===t.length){const[,{x:s,y:a},{x:o,y:l}]=t[0];if(n===s&&r===a&&e===o&&i===l)return}const{style:s}=this.container;let a;if(this.#Qe){const{borderColor:t,borderWidth:e}=s;s.borderWidth=0,a=["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="${t}" stroke-width="${e}">`],this.container.classList.add("hasBorder")}const o=n-e,l=r-i,{svgFactory:c}=this,h=c.createElement("svg");h.classList.add("quadrilateralsContainer"),h.setAttribute("width",0),h.setAttribute("height",0);const d=c.createElement("defs");h.append(d);const u=c.createElement("clipPath"),p=`clippath_${this.data.id}`;u.setAttribute("id",p),u.setAttribute("clipPathUnits","objectBoundingBox"),d.append(u);for(const[,{x:g,y:f},{x:m,y:b}]of t){const t=c.createElement("rect"),i=(m-e)/o,n=(r-f)/l,s=(g-m)/o,h=(f-b)/l;t.setAttribute("x",i),t.setAttribute("y",n),t.setAttribute("width",s),t.setAttribute("height",h),u.append(t),a?.push(`<rect vector-effect="non-scaling-stroke" x="${i}" y="${n}" width="${s}" height="${h}"/>`)}this.#Qe&&(a.push("</g></svg>')"),s.backgroundImage=a.join("")),this.container.append(h),this.container.style.clipPath=`url(#${p})`}_createPopup(){const{container:t,data:e}=this;t.setAttribute("aria-haspopup","dialog");const i=new x({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]});this.parent.div.append(i.render())}render(){(0,n.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=[];if(this._fieldObjects){const r=this._fieldObjects[t];if(r)for(const{page:t,id:s,exportValues:a}of r){if(-1===t)continue;if(s===e)continue;const r="string"===typeof a?a:null,o=document.querySelector(`[data-element-id="${s}"]`);!o||h.has(o)?i.push({id:s,exportValue:r,domElement:o}):(0,n.warn)(`_getElementsByName - element not allowed: ${s}`)}return i}for(const n of document.getElementsByName(t)){const{exportValue:t}=n,r=n.getAttribute("data-element-id");r!==e&&h.has(n)&&i.push({id:r,exportValue:t,domElement:n})}return i}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",(()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})}))}}class g extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:e}=this,i=document.createElement("a");i.setAttribute("data-element-id",t.id);let n=!1;return t.url?(e.addLinkAttributes(i,t.url,t.newWindow),n=!0):t.action?(this._bindNamedAction(i,t.action),n=!0):t.attachment?(this._bindAttachment(i,t.attachment),n=!0):t.setOCGState?(this.#Ze(i,t.setOCGState),n=!0):t.dest?(this._bindLink(i,t.dest),n=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,t),n=!0),t.resetForm?(this._bindResetFormAction(i,t.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(i,""),n=!0)),this.container.classList.add("linkA
1nnotation"),n&&this.container.append(i),this.container}#ti(){this.container.setAttribute("data-internal-link","")}_bindLink(t,e){t.href=this.linkService.getDestinationHash(e),t.onclick=()=>(e&&this.linkService.goToDestination(e),!1),(e||""===e)&&this.#ti()}_bindNamedAction(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),this.#ti()}_bindAttachment(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,e.content,e.filename),!1),this.#ti()}#Ze(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(e),!1),this.#ti()}_bindJSAction(t,e){t.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const n of Object.keys(e.actions)){const r=i.get(n);r&&(t[r]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e.id,name:n}}),!1))}t.onclick||(t.onclick=()=>!1),this.#ti()}_bindResetFormAction(t,e){const i=t.onclick;if(i||(t.href=this.linkService.getAnchorUrl("")),this.#ti(),!this._fieldObjects)return(0,n.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(i||(t.onclick=()=>!1));t.onclick=()=>{i?.();const{fields:t,refs:r,include:s}=e,a=[];if(0!==t.length||0!==r.length){const e=new Set(r);for(const i of t){const t=this._fieldObjects[i]||[];for(const{id:i}of t)e.add(i)}for(const t of Object.values(this._fieldObjects))for(const i of t)e.has(i.id)===s&&a.push(i)}else for(const e of Object.values(this._fieldObjects))a.push(...e);const o=this.annotationStorage,l=[];for(const e of a){const{id:t}=e;switch(l.push(t),e.type){case"text":{const i=e.defaultValue||"";o.setValue(t,{value:i});break}case"checkbox":case"radiobutton":{const i=e.defaultValue===e.exportValues;o.setValue(t,{value:i});break}case"combobox":case"listbox":{const i=e.defaultValue||"";o.setValue(t,{value:i});break}default:continue}const i=document.querySelector(`[data-element-id="${t}"]`);i&&(h.has(i)?i.dispatchEvent(new Event("resetform")):(0,n.warn)(`_bindResetFormAction - element not allowed: ${t}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}}),!1}}}class f extends p{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.alt="[{{type}} Annotation]",t.dataset.l10nId="text_annotation_type",t.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class m extends p{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&("CANVAS"===t.previousSibling?.nodeName&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){const{isWin:e,isMac:i}=n.FeatureTest.platform;return e&&t.ctrlKey||i&&t.metaKey}_setEventListener(t,e,i,n,r){i.includes("mouse")?t.addEventListener(i,(t=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(t),shift:t.shiftKey,modifier:this._getKeyModifier(t)}})})):t.addEventListener(i,(t=>{if("blur"===i){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===i){if(e.focused)return;e.focused=!0}r&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(t)}})}))}_setEventListeners(t,e,i,n){for(const[r,s]of i)("Action"===s||this.data.actions?.[s])&&("Focus"!==s&&"Blur"!==s||(e||={focused:!1}),this._setEventListener(t,e,r,s,n),"Focus"!==s||this.data.actions?.Blur?"Blur"!==s||this.data.actions?.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":n.Util.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:i}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||9,s=t.style;let a;const o=t=>Math.round(10*t)/10;if(this.data.multiLine){const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2),e=t/(Math.round(t/(n.LINE_FACTOR*r))||1);a=Math.min(r,o(e/n.LINE_FACTOR))}else{const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2);a=Math.min(r,o(t/n.LINE_FACTOR))}s.fontSize=`calc(${a}px * var(--scale-factor))`,s.color=n.Util.makeHexColor(i[0],i[1],i[2]),null!==this.data.textAlignment&&(s.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class b extends m{constructor(t){super(t,{isRenderable:t.renderForms||!t.data.hasAppearance&&!!t.data.fieldValue})}setPropertyOnSiblings(t,e,i,n){const r=this.annotationStorage;
1for(const s of this._getElementsByName(t.name,t.id))s.domElement&&(s.domElement[e]=i),r.setValue(s.id,{[n]:i})}render(){const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let i=null;if(this.renderForms){const n=t.getValue(e,{value:this.data.fieldValue});let r=n.value||"";const s=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;s&&r.length>s&&(r=r.slice(0,s));let a=n.formattedValue||this.data.textContent?.join("\n")||null;a&&this.data.comb&&(a=a.replaceAll(/\s+/g,""));const o={userValue:r,formattedValue:a,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(i=document.createElement("textarea"),i.textContent=a??r,this.data.doNotScroll&&(i.style.overflowY="hidden")):(i=document.createElement("input"),i.type="text",i.setAttribute("value",a??r),this.data.doNotScroll&&(i.style.overflowX="hidden")),this.data.hasOwnCanvas&&(i.hidden=!0),h.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,i.name=this.data.fieldName,i.tabIndex=c,this._setRequired(i,this.data.required),s&&(i.maxLength=s),i.addEventListener("input",(n=>{t.setValue(e,{value:n.target.value}),this.setPropertyOnSiblings(i,"value",n.target.value,"value"),o.formattedValue=null})),i.addEventListener("resetform",(t=>{const e=this.data.defaultFieldValue??"";i.value=o.userValue=e,o.formattedValue=null}));let l=t=>{const{formattedValue:e}=o;null!==e&&void 0!==e&&(t.target.value=e),t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){i.addEventListener("focus",(t=>{if(o.focused)return;const{target:e}=t;o.userValue&&(e.value=o.userValue),o.lastCommittedValue=e.value,o.commitKey=1,o.focused=!0})),i.addEventListener("updatefromsandbox",(i=>{this.showElementAndHideCanvas(i.target);const n={value(i){o.userValue=i.detail.value??"",t.setValue(e,{value:o.userValue.toString()}),i.target.value=o.userValue},formattedValue(i){const{formattedValue:n}=i.detail;o.formattedValue=n,null!==n&&void 0!==n&&i.target!==document.activeElement&&(i.target.value=n),t.setValue(e,{formattedValue:n})},selRange(t){t.target.setSelectionRange(...t.detail.selRange)},charLimit:i=>{const{charLimit:n}=i.detail,{target:r}=i;if(0===n)return void r.removeAttribute("maxLength");r.setAttribute("maxLength",n);let s=o.userValue;!s||s.length<=n||(s=s.slice(0,n),r.value=o.userValue=s,t.setValue(e,{value:s}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:r.selectionStart,selEnd:r.selectionEnd}}))}};this._dispatchEventFromSandbox(n,i)})),i.addEventListener("keydown",(t=>{o.commitKey=1;let i=-1;if("Escape"===t.key?i=0:"Enter"!==t.key||this.data.multiLine?"Tab"===t.key&&(o.commitKey=3):i=2,-1===i)return;const{value:n}=t.target;o.lastCommittedValue!==n&&(o.lastCommittedValue=n,o.userValue=n,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:n,willCommit:!0,commitKey:i,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))}));const n=l;l=null,i.addEventListener("blur",(t=>{if(!o.focused||!t.relatedTarget)return;o.focused=!1;const{value:i}=t.target;o.userValue=i,o.lastCommittedValue!==i&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:i,willCommit:!0,commitKey:o.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}),n(t)})),this.data.actions?.Keystroke&&i.addEventListener("beforeinput",(t=>{o.lastCommittedValue=null;const{data:i,target:n}=t,{value:r,selectionStart:s,selectionEnd:a}=n;let l=s,c=a;switch(t.inputType){case"deleteWordBackward":{const t=r.substring(0,s).match(/\w*[^\w]*$/);t&&(l-=t[0].length);break}
1case"deleteWordForward":{const t=r.substring(s).match(/^[^\w]*\w*/);t&&(c+=t[0].length);break}case"deleteContentBackward":s===a&&(l-=1);break;case"deleteContentForward":s===a&&(c+=1)}t.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:r,change:i||"",willCommit:!1,selStart:l,selEnd:c}})})),this._setEventListeners(i,o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.value))}if(l&&i.addEventListener("blur",l),this.data.comb){const t=(this.data.rect[2]-this.data.rect[0])/s;i.classList.add("comb"),i.style.letterSpacing=`calc(${t}px * var(--scale-factor) - 1ch)`}}else i=document.createElement("div"),i.textContent=this.data.fieldValue,i.style.verticalAlign="middle",i.style.display="table-cell";return this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class v extends m{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class _ extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,i=e.id;let n=t.getValue(i,{value:e.exportValue===e.fieldValue}).value;"string"===typeof n&&(n="Off"!==n,t.setValue(i,{value:n})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const r=document.createElement("input");return h.add(r),r.setAttribute("data-element-id",i),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="checkbox",r.name=e.fieldName,n&&r.setAttribute("checked",!0),r.setAttribute("exportValue",e.exportValue),r.tabIndex=c,r.addEventListener("change",(n=>{const{name:r,checked:s}=n.target;for(const a of this._getElementsByName(r,i)){const i=s&&a.exportValue===e.exportValue;a.domElement&&(a.domElement.checked=i),t.setValue(a.id,{value:i})}t.setValue(i,{value:s})})),r.addEventListener("resetform",(t=>{const i=e.defaultFieldValue||"Off";t.target.checked=i===e.exportValue})),this.enableScripting&&this.hasJSActions&&(r.addEventListener("updatefromsandbox",(e=>{const n={value(e){e.target.checked="Off"!==e.detail.value,t.setValue(i,{value:e.target.checked})}};this._dispatchEventFromSandbox(n,e)})),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class y extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,i=e.id;let n=t.getValue(i,{value:e.fieldValue===e.buttonValue}).value;"string"===typeof n&&(n=n!==e.buttonValue,t.setValue(i,{value:n}));const r=document.createElement("input");if(h.add(r),r.setAttribute("data-element-id",i),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="radio",r.name=e.fieldName,n&&r.setAttribute("checked",!0),r.tabIndex=c,r.addEventListener("change",(e=>{const{name:n,checked:r}=e.target;for(const s of this._getElementsByName(n,i))t.setValue(s.id,{value:!1});t.setValue(i,{value:r})})),r.addEventListener("resetform",(t=>{const i=e.defaultFieldValue;t.target.checked=null!==i&&void 0!==i&&i===e.buttonValue})),this.enableScripting&&this.hasJSActions){const n=e.buttonValue;r.addEventListener("updatefromsandbox",(e=>{const r={value:e=>{const r=n===e.detail.value;for(const n of this._getElementsByName(e.target.name)){const e=r&&n.id===i;n.domElement&&(n.domElement.checked=e),t.setValue(n.id,{value:e})}}};this._dispatchEventFromSandbox(r,e)})),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))}return this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}
1class A extends g{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(t.title=this.data.alternativeText);const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",(t=>{this._dispatchEventFromSandbox({},t)}))),t}}class S extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,i=t.getValue(e,{value:this.data.fieldValue}),n=document.createElement("select");h.add(n),n.setAttribute("data-element-id",e),n.disabled=this.data.readOnly,this._setRequired(n,this.data.required),n.name=this.data.fieldName,n.tabIndex=c;let r=this.data.combo&&this.data.options.length>0;this.data.combo||(n.size=this.data.options.length,this.data.multiSelect&&(n.multiple=!0)),n.addEventListener("resetform",(t=>{const e=this.data.defaultFieldValue;for(const i of n.options)i.selected=i.value===e}));for(const c of this.data.options){const t=document.createElement("option");t.textContent=c.displayValue,t.value=c.exportValue,i.value.includes(c.exportValue)&&(t.setAttribute("selected",!0),r=!1),n.append(t)}let s=null;if(r){const t=document.createElement("option");t.value=" ",t.setAttribute("hidden",!0),t.setAttribute("selected",!0),n.prepend(t),s=()=>{t.remove(),n.removeEventListener("input",s),s=null},n.addEventListener("input",s)}const a=t=>{const e=t?"value":"textContent",{options:i,multiple:r}=n;return r?Array.prototype.filter.call(i,(t=>t.selected)).map((t=>t[e])):-1===i.selectedIndex?null:i[i.selectedIndex][e]};let o=a(!1);const l=t=>{const e=t.target.options;return Array.prototype.map.call(e,(t=>({displayValue:t.textContent,exportValue:t.value})))};return this.enableScripting&&this.hasJSActions?(n.addEventListener("updatefromsandbox",(i=>{const r={value(i){s?.();const r=i.detail.value,l=new Set(Array.isArray(r)?r:[r]);for(const t of n.options)t.selected=l.has(t.value);t.setValue(e,{value:a(!0)}),o=a(!1)},multipleSelection(t){n.multiple=!0},remove(i){const r=n.options,s=i.detail.remove;r[s].selected=!1,n.remove(s),r.length>0&&-1===Array.prototype.findIndex.call(r,(t=>t.selected))&&(r[0].selected=!0),t.setValue(e,{value:a(!0),items:l(i)}),o=a(!1)},clear(i){for(;0!==n.length;)n.remove(0);t.setValue(e,{value:null,items:[]}),o=a(!1)},insert(i){const{index:r,displayValue:s,exportValue:c}=i.detail.insert,h=n.children[r],d=document.createElement("option");d.textContent=s,d.value=c,h?h.before(d):n.append(d),t.setValue(e,{value:a(!0),items:l(i)}),o=a(!1)},items(i){const{items:r}=i.detail;for(;0!==n.length;)n.remove(0);for(const t of r){const{displayValue:e,exportValue:i}=t,r=document.createElement("option");r.textContent=e,r.value=i,n.append(r)}n.options.length>0&&(n.options[0].selected=!0),t.setValue(e,{value:a(!0),items:l(i)}),o=a(!1)},indices(i){const n=new Set(i.detail.indices);for(const t of i.target.options)t.selected=n.has(t.index);t.setValue(e,{value:a(!0)}),o=a(!1)},editable(t){t.target.disabled=!t.detail.editable}};this._dispatchEventFromSandbox(r,i)})),n.addEventListener("input",(i=>{const n=a(!0);t.setValue(e,{value:n}),i.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:o,changeEx:n,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(n,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(t=>t.target.value))):n.addEventListener("input",(function(i){t.setValue(e,{value:a(!0)})})),this.data.combo&&this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class x extends p{constructor(t){const{data:e,elements:i}=t;super(t,{isRenderable:p._hasPopupData(e)}),this.elements=i}render(){this.container.classList.add("popupAnnotation");const t=new w({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}),e=[];for(const i of this.elements)i.popup=t,e.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",e.map((t=>`${n.AnnotationPrefix}${t}`)).join(",")),this.container}}
1class w{#ei=null;#ii=this.#ni.bind(this);#ri=this.#si.bind(this);#ai=this.#oi.bind(this);#li=this.#ci.bind(this);#Ue=null;#Ft=null;#hi=null;#di=null;#ui=null;#pi=null;#gi=!1;#fi=null;#mi=null;#bi=null;#vi=null;#_i=!1;constructor(t){let{container:e,color:i,elements:n,titleObj:s,modificationDate:a,contentsObj:o,richText:l,parent:c,rect:h,parentRect:d,open:u}=t;this.#Ft=e,this.#vi=s,this.#hi=o,this.#bi=l,this.#ui=c,this.#Ue=i,this.#mi=h,this.#pi=d,this.#di=n;const p=r.PDFDateString.toDateObject(a);p&&(this.#ei=c.l10n.get("annotation_date_string",{date:p.toLocaleDateString(),time:p.toLocaleTimeString()})),this.trigger=n.flatMap((t=>t.getElementsToTriggerPopup()));for(const r of this.trigger)r.addEventListener("click",this.#li),r.addEventListener("mouseenter",this.#ai),r.addEventListener("mouseleave",this.#ri),r.classList.add("popupTriggerArea");for(const r of n)r.container?.addEventListener("keydown",this.#ii);this.#Ft.hidden=!0,u&&this.#ci()}render(){if(this.#fi)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:i,pageX:r,pageY:s}}}=this.#ui,a=this.#fi=document.createElement("div");if(a.className="popup",this.#Ue){const t=a.style.outlineColor=n.Util.makeHexColor(...this.#Ue);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))a.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else{const t=.7;a.style.backgroundColor=n.Util.makeHexColor(...this.#Ue.map((e=>Math.floor(t*(255-e)+e))))}}const o=document.createElement("span");o.className="header";const c=document.createElement("h1");if(o.append(c),({dir:c.dir,str:c.textContent}=this.#vi),a.append(o),this.#ei){const t=document.createElement("span");t.classList.add("popupDate"),this.#ei.then((e=>{t.textContent=e})),o.append(t)}const h=this.#hi,d=this.#bi;if(!d?.str||h?.str&&h.str!==d.str){const t=this._formatContents(h);a.append(t)}else l.XfaLayer.render({xfaHtml:d.html,intent:"richText",div:a}),a.lastChild.classList.add("richText","popupContent");let u=!!this.#pi,p=u?this.#pi:this.#mi;for(const l of this.#di)if(!p||null!==n.Util.intersect(l.data.rect,p)){p=l.data.rect,u=!0;break}const g=n.Util.normalizeRect([p[0],t[3]-p[1]+t[1],p[2],t[3]-p[3]+t[1]]),f=u?p[2]-p[0]+5:0,m=g[0]+f,b=g[1],{style:v}=this.#Ft;v.left=100*(m-r)/e+"%",v.top=100*(b-s)/i+"%",this.#Ft.append(a)}_formatContents(t){let{str:e,dir:i}=t;const n=document.createElement("p");n.classList.add("popupContent"),n.dir=i;const r=e.split(/(?:\r\n?|\n)/);for(let s=0,a=r.length;s<a;++s){const t=r[s];n.append(document.createTextNode(t)),s<a-1&&n.append(document.createElement("br"))}return n}#ni(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||("Enter"===t.key||"Escape"===t.key&&this.#gi)&&this.#ci()}#ci(){this.#gi=!this.#gi,this.#gi?(this.#oi(),this.#Ft.addEventListener("click",this.#li),this.#Ft.addEventListener("keydown",this.#ii)):(this.#si(),this.#Ft.removeEventListener("click",this.#li),this.#Ft.removeEventListener("keydown",this.#ii))}#oi(){this.#fi||this.render(),this.isVisible?this.#gi&&this.#Ft.classList.add("focused"):(this.#Ft.hidden=!1,this.#Ft.style.zIndex=parseInt(this.#Ft.style.zIndex)+1e3)}#si(){this.#Ft.classList.remove("focused"),!this.#gi&&this.isVisible&&(this.#Ft.hidden=!0,this.#Ft.style.zIndex=parseInt(this.#Ft.style.zIndex)-1e3)}forceHide(){this.#_i=this.isVisible,this.#_i&&(this.#Ft.hidden=!0)}maybeShow(){this.#_i&&(this.#_i=!1,this.#Ft.hidden=!1)}get isVisible(){return!1===this.#Ft.hidden}}class E extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=n.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const i=document.createElement("span");i.textContent=e,t.append(i)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}e.FreeTextAnnotationElement=E;class C extends p{#yi=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const t=this.data,{width:e,height:i}=d(t.rect),n=this.svgFactory.create(e,i,!0),r=this.#yi=this.svgFactory.createElement("svg:line");return r.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),r.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),r.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),r.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),r.setAttribute("stroke-width",t.borderStyle.width||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),n.append(r),this.container.append(n),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#yi}addHighlightArea(){this.container.classList.add("highlightArea")}}class T extends p{#Ai=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const t=this.data,{width:e,height:i}=d(t.rect),n=this.svgFactory.create(e,i,!0),r=t.borderStyle.width,s=this.#Ai=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",r/2),s.setAttribute("y",r/2),s.setAttribute("width",e-r),s.setAttribute("height",i-r),s.setAttribute("stroke-width",r||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Ai}
1addHighlightArea(){this.container.classList.add("highlightArea")}}class P extends p{#Si=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const t=this.data,{width:e,height:i}=d(t.rect),n=this.svgFactory.create(e,i,!0),r=t.borderStyle.width,s=this.#Si=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",e/2),s.setAttribute("cy",i/2),s.setAttribute("rx",e/2-r/2),s.setAttribute("ry",i/2-r/2),s.setAttribute("stroke-width",r||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Si}addHighlightArea(){this.container.classList.add("highlightArea")}}class k extends p{#xi=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const t=this.data,{width:e,height:i}=d(t.rect),n=this.svgFactory.create(e,i,!0);let r=[];for(const a of t.vertices){const e=a.x-t.rect[0],i=t.rect[3]-a.y;r.push(e+","+i)}r=r.join(" ");const s=this.#xi=this.svgFactory.createElement(this.svgElementName);return s.setAttribute("points",r),s.setAttribute("stroke-width",t.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#xi}addHighlightArea(){this.container.classList.add("highlightArea")}}class M extends k{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class R extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class F extends p{#wi=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=n.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const t=this.data,{width:e,height:i}=d(t.rect),n=this.svgFactory.create(e,i,!0);for(const r of t.inkLists){let e=[];for(const n of r){const i=n.x-t.rect[0],r=t.rect[3]-n.y;e.push(`${i},${r}`)}e=e.join(" ");const i=this.svgFactory.createElement(this.svgElementName);this.#wi.push(i),i.setAttribute("points",e),i.setAttribute("stroke-width",t.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),!t.popupRef&&this.hasPopupData&&this._createPopup(),n.append(i)}return this.container.append(n),this.container}getElementsToTriggerPopup(){return this.#wi}addHighlightArea(){this.container.classList.add("highlightArea")}}e.InkAnnotationElement=F;class D extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class I extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class O extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class L extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class N extends p{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}
1e.StampAnnotationElement=N;class B extends p{#Ei=null;constructor(t){super(t,{isRenderable:!0});const{filename:e,content:i}=this.data.file;this.filename=(0,r.getFilenameFromUrl)(e,!0),this.content=i,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,filename:e,content:i})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:e}=this;let i;e.hasAppearance||0===e.fillAlpha?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(e.name)?"paperclip":"pushpin"}.svg`,e.fillAlpha&&e.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(100*e.fillAlpha)}%);`)),i.addEventListener("dblclick",this.#Ci.bind(this)),this.#Ei=i;const{isMac:r}=n.FeatureTest.platform;return t.addEventListener("keydown",(t=>{"Enter"===t.key&&(r?t.metaKey:t.ctrlKey)&&this.#Ci()})),!e.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),t.append(i),t}getElementsToTriggerPopup(){return this.#Ei}addHighlightArea(){this.container.classList.add("highlightArea")}#Ci(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}e.AnnotationLayer=class{#Se=null;#Ti=null;#Pi=new Map;constructor(t){let{div:e,accessibilityManager:i,annotationCanvasMap:n,l10n:r,page:s,viewport:a}=t;this.div=e,this.#Se=i,this.#Ti=n,this.l10n=r,this.page=s,this.viewport=a,this.zIndex=0,this.l10n||=o.NullL10n}#ki(t,e){const i=t.firstChild||t;i.id=`${n.AnnotationPrefix}${e}`,this.div.append(t),this.#Se?.moveElementInDOM(this.div,t,i,!1)}async render(t){const{annotations:e}=t,i=this.div;(0,r.setLayerDimensions)(i,this.viewport);const a=new Map,o={data:null,layer:i,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new r.DOMSVGFactory,annotationStorage:t.annotationStorage||new s.AnnotationStorage,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const r of e){if(r.noHTML)continue;const t=r.annotationType===n.AnnotationType.POPUP;if(t){const t=a.get(r.id);if(!t)continue;o.elements=t}else{const{width:t,height:e}=d(r.rect);if(t<=0||e<=0)continue}o.data=r;const e=u.create(o);if(!e.isRenderable)continue;if(!t&&r.popupRef){const t=a.get(r.popupRef);t?t.push(e):a.set(r.popupRef,[e])}e.annotationEditorType>0&&this.#Pi.set(e.data.id,e);const i=e.render();r.hidden&&(i.style.visibility="hidden"),this.#ki(i,r.id)}this.#Mi(),await this.l10n.translate(i)}update(t){let{viewport:e}=t;const i=this.div;this.viewport=e,(0,r.setLayerDimensions)(i,{rotation:e.rotation}),this.#Mi(),i.hidden=!1}#Mi(){if(!this.#Ti)return;const t=this.div;for(const[e,i]of this.#Ti){const n=t.querySelector(`[data-annotation-id="${e}"]`);if(!n)continue;const{firstChild:r}=n;r?"CANVAS"===r.nodeName?r.replaceWith(i):r.before(i):n.append(i)}this.#Ti.clear()}getEditableAnnotations(){return Array.from(this.#Pi.values())}getEditableAnnotation(t){return this.#Pi.get(t)}}},(t,e)=>{function i(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function n(t){return Math.max(0,Math.min(255,255*t))}Object.defineProperty(e,"__esModule",{value:!0}),e.ColorConverters=void 0,e.ColorConverters=class{static CMYK_G(t){let[e,i,n,r]=t;return["G",1-Math.min(1,.3*e+.59*n+.11*i+r)]}static G_CMYK(t){let[e]=t;return["CMYK",0,0,0,1-e]}static G_RGB(t){let[e]=t;return["RGB",e,e,e]}static G_rgb(t){let[e]=t;return e=n(e),[e,e,e]}static G_HTML(t){let[e]=t;const n=i(e);return`#${n}${n}${n}`}static RGB_G(t){let[e,i,n]=t;return["G",.3*e+.59*i+.11*n]}static RGB_rgb(t){return t.map(n)}static RGB_HTML(t){return`#${t.map(i).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(t){let[e,i,n,r]=t;return["RGB",1-Math.min(1,e+r),1-Math.min(1,n+r),1-Math.min(1,i+r)]}static CMYK_rgb(t){let[e,i,r,s]=t;return[n(1-Math.min(1,e+s)),n(1-Math.min(1,r+s)),n(1-Math.min(1,i+s))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK(t){let[e,i,n]=t;const r=1-e,s=1-i,a=1-n;return["CMYK",r,s,a,Math.min(r,s,a)]}}},(t,e)=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.NullL10n=void 0,e.getL10nFallback=n;const i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} \xd7 {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} \xd7 {{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\u2026",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"};function n(t,e){switch(t){case"find_match_count":t=`find_match_count[${1===e.total?"one":"other"}]`;break;case"find_match_count_limit":t=`find_match_count_limit[${1===e.limit?"one":"other"}]`}return i[t]||""}i.print_progress_percent="{{progress}}%";const r={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",async get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t,e){return e?t.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,((t,i)=>i in e?e[i]:"{{"+i+"}}")):t}(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n(t,e),e)},async translate(t){}};e.NullL10n=r},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XfaLayer=void 0,i(89);var n=i(194);e.XfaLayer=class{static setupStorage(t,e,i,n,r){const s=n.getValue(e,{value:null});switch(i.name){case"textarea":if(null!==s.value&&(t.textContent=s.value),"print"===r)break;t.addEventListener("input",(t=>{n.setValue(e,{value:t.target.value})}));break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){if(s.value===i.attributes.xfaOn?t.setAttribute("checked",!0):s.value===i.attributes.xfaOff&&t.removeAttribute("checked"),"print"===r)break;t.addEventListener("change",(t=>{n.setValue(e,{value:t.target.checked?t.target.getAttribute("xfaOn"):t.target.getAttribute("xfaOff")})}))}else{if(null!==s.value&&t.setAttribute("value",s.value),"print"===r)break;t.addEventListener("input",(t=>{n.setValue(e,{value:t.target.value})}))}break;case"select":if(null!==s.value){t.setAttribute("value",s.value);for(const t of i.children)t.attributes.value===s.value?t.attributes.selected=!0:t.attributes.hasOwnProperty("selected")&&delete t.attributes.selected}t.addEventListener("input",(t=>{const i=t.target.options,r=-1===i.selectedIndex?"":i[i.selectedIndex].value;n.setValue(e,{value:r})}))}}static setAttributes(t){let{html:e,element:i,storage:n=null,intent:r,linkService:s}=t;const{attributes:a}=i,o=e instanceof HTMLAnchorElement;"radio"===a.type&&(a.name=`${a.name}-${r}`);for(const[l,c]of Object.entries(a))if(null!==c&&void 0!==c)switch(l){case"class":c.length&&e.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",c);break;case"style":Object.assign(e.style,c);break;case"textContent":e.textContent=c;break;default:(!o||"href"!==l&&"newWindow"!==l)&&e.setAttribute(l,c)}o&&s.addLinkAttributes(e,a.href,a.newWindow),n&&a.dataId&&this.setupStorage(e,a.dataId,i,n)}static render(t){const e=t.annotationStorage,i=t.linkService,r=t.xfaHtml,s=t.
vendor: 4,170 bytes, line 1
1intent||"display",a=document.createElement(r.name);r.attributes&&this.setAttributes({html:a,element:r,intent:s,linkService:i});const o=[[r,-1,a]],l=t.div;if(l.append(a),t.viewport){const e=`matrix(${t.viewport.transform.join(",")})`;l.style.transform=e}"richText"!==s&&l.setAttribute("class","xfaLayer xfaFont");const c=[];for(;o.length>0;){const[t,r,a]=o.at(-1);if(r+1===t.children.length){o.pop();continue}const l=t.children[++o.at(-1)[1]];if(null===l)continue;const{name:h}=l;if("#text"===h){const t=document.createTextNode(l.value);c.push(t),a.append(t);continue}const d=l?.attributes?.xmlns?document.createElementNS(l.attributes.xmlns,h):document.createElement(h);if(a.append(d),l.attributes&&this.setAttributes({html:d,element:l,storage:e,intent:s,linkService:i}),l.children&&l.children.length>0)o.push([l,-1,d]);else if(l.value){const t=document.createTextNode(l.value);n.XfaText.shouldBuildText(h)&&c.push(t),d.append(t)}}for(const n of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))n.setAttribute("readOnly",!0);return{textDivs:c}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}},(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InkEditor=void 0,i(89),i(2);var n=i(1),r=i(164),s=i(198),a=i(168),o=i(165);class l extends r.AnnotationEditor{#Ri=0;#Fi=0;#Di=this.canvasPointermove.bind(this);#Ii=this.canvasPointerleave.bind(this);#Oi=this.canvasPointerup.bind(this);#Li=this.canvasPointerdown.bind(this);#Ni=new Path2D;#Bi=!1;#ji=!1;#Ui=!1;#zi=null;#Hi=0;#Wi=0;#qi=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(t){super({...t,name:"inkEditor"}),this.color=t.color||null,this.thickness=t.thickness||null,this.opacity=t.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(t){r.AnnotationEditor.initialize(t,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(t,e){switch(t){case n.AnnotationEditorParamsType.INK_THICKNESS:l._defaultThickness=e;break;case n.AnnotationEditorParamsType.INK_COLOR:l._defaultColor=e;break;case n.AnnotationEditorParamsType.INK_OPACITY:l._defaultOpacity=e/100}}updateParams(t,e){switch(t){case n.AnnotationEditorParamsType.INK_THICKNESS:this.#Gi(e);break;case n.AnnotationEditorParamsType.INK_COLOR:this.#Ve(e);break;case n.AnnotationEditorParamsType.INK_OPACITY:this.#Vi(e)}}static get defaultPropertiesToUpdate(){return[[n.AnnotationEditorParamsType.INK_THICKNESS,l._defaultThickness],[n.AnnotationEditorParamsType.INK_COLOR,l._defaultColor||r.AnnotationEditor._defaultLineColor],[n.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*l._defaultOpacity)]]}get propertiesToUpdate(){return[[n.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||l._defaultThickness],[n.AnnotationEditorParamsType.INK_COLOR,this.color||l._defaultColor||r.AnnotationEditor._defaultLineColor],[n.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??l._defaultOpacity))]]}#Gi(t){const e=this.thickness;this.addCommands({cmd:()=>{this.thickness=t,this.#$i()},undo:()=>{this.thickness=e,this.#$i()},mustExec:!0,type:n.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#Ve(t){const e=this.color;this.addCommands({cmd:()=>{this.color=t,this.#Xi()},undo:()=>{this.color=e,this.#Xi()},mustExec:!0,type:n.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#Vi(t){t/=100;const e=this.opacity;this.addCommands({cmd:()=>{this.opacity=t,this.#Xi()},undo:()=>{this.opacity=e,this.#Xi()},mustExec:!0,type:n.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(this.#Ki(),this.#Yi()),this.isAttachedToDOM||(this.parent.add(this),this.#Ji()),this.#$i()))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#zi.disconnect(),this.#zi=null,
1super.remove())}setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this),super.setParent(t)}onScaleChanging(){const[t,e]=this.parentDimensions,i=this.width*t,n=this.height*e;this.setDimensions(i,n)}enableEditMode(){this.#Bi||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#Li))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#Li))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#Qi(){const{parentRotation:t,parentDimensions:[e,i]}=this;switch(t){case 90:return[0,i,i,e];case 180:return[e,i,e,i];case 270:return[e,0,i,e];default:return[0,0,e,i]}}#Zi(){const{ctx:t,color:e,opacity:i,thickness:n,parentScale:r,scaleFactor:s}=this;t.lineWidth=n*r/s,t.lineCap="round",t.lineJoin="round",t.miterLimit=10,t.strokeStyle=`${e}${(0,o.opacityToHex)(i)}`}#tn(t,e){this.canvas.addEventListener("contextmenu",a.noContextMenu),this.canvas.addEventListener("pointerleave",this.#Ii),this.canvas.addEventListener("pointermove",this.#Di),this.canvas.addEventListener("pointerup",this.#Oi),this.canvas.removeEventListener("pointerdown",this.#Li),this.isEditing=!0,this.#Ui||(this.#Ui=!0,this.#Ji(),this.thickness||=l._defaultThickness,this.color||=l._defaultColor||r.AnnotationEditor._defaultLineColor,this.opacity??=l._defaultOpacity),this.currentPath.push([t,e]),this.#ji=!1,this.#Zi(),this.#qi=()=>{this.#en(),this.#qi&&window.requestAnimationFrame(this.#qi)},window.requestAnimationFrame(this.#qi)}#in(t,e){const[i,n]=this.currentPath.at(-1);if(this.currentPath.length>1&&t===i&&e===n)return;const r=this.currentPath;let s=this.#Ni;if(r.push([t,e]),this.#ji=!0,r.length<=2)return s.moveTo(...r[0]),void s.lineTo(t,e);3===r.length&&(this.#Ni=s=new Path2D,s.moveTo(...r[0])),this.#nn(s,...r.at(-3),...r.at(-2),t,e)}#rn(){if(0===this.currentPath.length)return;const t=this.currentPath.at(-1);this.#Ni.lineTo(...t)}#sn(t,e){let i;if(this.#qi=null,t=Math.min(Math.max(t,0),this.canvas.width),e=Math.min(Math.max(e,0),this.canvas.height),this.#in(t,e),this.#rn(),1!==this.currentPath.length)i=this.#an();else{const n=[t,e];i=[[n,n.slice(),n.slice(),n]]}const n=this.#Ni,r=this.currentPath;this.currentPath=[],this.#Ni=new Path2D,this.addCommands({cmd:()=>{this.allRawPaths.push(r),this.paths.push(i),this.bezierPath2D.push(n),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(this.#Ki(),this.#Yi()),this.#$i())},mustExec:!0})}#en(){if(!this.#ji)return;this.#ji=!1;Math.ceil(this.thickness*this.parentScale);const t=this.currentPath.slice(-3),e=t.map((t=>t[0])),i=t.map((t=>t[1])),{ctx:n}=(Math.min(...e),Math.max(...e),Math.min(...i),Math.max(...i),this);n.save(),n.clearRect(0,0,this.canvas.width,this.canvas.height);for(const r of this.bezierPath2D)n.stroke(r);n.stroke(this.#Ni),n.restore()}#nn(t,e,i,n,r,s,a){const o=(e+n)/2,l=(i+r)/2,c=(n+s)/2,h=(r+a)/2;t.bezierCurveTo(o+2*(n-o)/3,l+2*(r-l)/3,c+2*(n-c)/3,h+2*(r-h)/3,c,h)}#an(){const t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];const e=[];let i,[n,r]=t[0];for(i=1;i<t.length-2;i++){const[s,a]=t[i],[o,l]=t[i+1],c=(s+o)/2,h=(a+l)/2,d=[n+2*(s-n)/3,r+2*(a-r)/3],u=[c+2*(s-c)/3,h+2*(a-h)/3];e.push([[n,r],d,u,[c,h]]),[n,r]=[c,h]}const[s,a]=t[i],[o,l]=t[i+1],c=[n+2*(s-n)/3,r+2*(a-r)/3],h=[o+2*(s-o)/3,l+2*(a-l)/3];return e.push([[n,r],c,h,[o,l]]),e}#Xi(){if(this.isEmpty())return void this.#on();this.#Zi();const{canvas:t,ctx:e}=this;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.width,t.height),this.#on();for(const i of this.bezierPath2D)e.stroke(i)}commit(){this.#Bi||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#Bi=!0,this.div.classList.add("disabled"),this.#$i(!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),this.enableEditMode())}canvasPointerdown(t){0===t.button&&this.isInEditMode()&&!this.#Bi&&(this.setInForeground(),t.preventDefault(),"mouse"!==t.type&&this.div.focus(),this.#tn(t.offsetX,t.offsetY))}canvasPointermove(t){t.preventDefault(),this.#in(t.offsetX,t.offsetY)}canvasPointerup(t){t.preventDefault(),this.#ln(t)}canvasPointerleave(t){this.#ln(t)}#ln(t){this.canvas.removeEventListener("pointerleave",this.#Ii),this.canvas.removeEventListener("pointermove",this.#Di),this.canvas.removeEventListener("pointerup",this.#Oi),this.canvas.addEventListener("pointerdown",this.#Li),setTimeout((()=>{this.canvas.removeEventListener("contextmenu",a.noContextMenu)}),10),this.#sn(t.offsetX,t.offsetY),this.addToAnnotationStorage(),this.setInBackgroun
1d()}#Ki(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",r.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then((t=>this.canvas?.setAttribute("aria-label",t))),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#Yi(){this.#zi=new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&this.setDimensions(e.width,e.height)})),this.#zi.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#Bi}render(){if(this.div)return this.div;let t,e;this.width&&(t=this.x,e=this.y),super.render(),r.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then((t=>this.div?.setAttribute("aria-label",t)));const[i,n,s,a]=this.#Qi();if(this.setAt(i,n,0,0),this.setDims(s,a),this.#Ki(),this.width){const[i,n]=this.parentDimensions;this.setAspectRatio(this.width*i,this.height*n),this.setAt(t*i,e*n,this.width*i,this.height*n),this.#Ui=!0,this.#Ji(),this.setDims(this.width*i,this.height*n),this.#Xi(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#Yi(),this.div}#Ji(){if(!this.#Ui)return;const[t,e]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*t),this.canvas.height=Math.ceil(this.height*e),this.#on()}setDimensions(t,e){const i=Math.round(t),n=Math.round(e);if(this.#Hi===i&&this.#Wi===n)return;this.#Hi=i,this.#Wi=n,this.canvas.style.visibility="hidden";const[r,s]=this.parentDimensions;this.width=t/r,this.height=e/s,this.fixAndSetPosition(),this.#Bi&&this.#cn(t,e),this.#Ji(),this.#Xi(),this.canvas.style.visibility="visible",this.fixDims()}#cn(t,e){const i=this.#hn(),n=(t-i)/this.#Fi,r=(e-i)/this.#Ri;this.scaleFactor=Math.min(n,r)}#on(){const t=this.#hn()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}static#dn(t){const e=new Path2D;for(let i=0,n=t.length;i<n;i++){const[n,r,s,a]=t[i];0===i&&e.moveTo(...n),e.bezierCurveTo(r[0],r[1],s[0],s[1],a[0],a[1])}return e}static#un(t,e,i){const[n,r,s,a]=e;switch(i){case 0:for(let e=0,i=t.length;e<i;e+=2)t[e]+=n,t[e+1]=a-t[e+1];break;case 90:for(let e=0,i=t.length;e<i;e+=2){const i=t[e];t[e]=t[e+1]+n,t[e+1]=i+r}break;case 180:for(let e=0,i=t.length;e<i;e+=2)t[e]=s-t[e],t[e+1]+=r;break;case 270:for(let e=0,i=t.length;e<i;e+=2){const i=t[e];t[e]=s-t[e+1],t[e+1]=a-i}break;default:throw new Error("Invalid rotation")}return t}static#pn(t,e,i){const[n,r,s,a]=e;switch(i){case 0:for(let e=0,i=t.length;e<i;e+=2)t[e]-=n,t[e+1]=a-t[e+1];break;case 90:for(let e=0,i=t.length;e<i;e+=2){const i=t[e];t[e]=t[e+1]-r,t[e+1]=i-n}break;case 180:for(let e=0,i=t.length;e<i;e+=2)t[e]=s-t[e],t[e+1]-=r;break;case 270:for(let e=0,i=t.length;e<i;e+=2){const i=t[e];t[e]=a-t[e+1],t[e+1]=s-i}break;default:throw new Error("Invalid rotation")}return t}#gn(t,e,i,n){const r=[],s=this.thickness/2,a=t*e+s,o=t*i+s;for(const c of this.paths){const e=[],i=[];for(let n=0,r=c.length;n<r;n++){const[s,l,h,d]=c[n],u=t*s[0]+a,p=t*s[1]+o,g=t*l[0]+a,f=t*l[1]+o,m=t*h[0]+a,b=t*h[1]+o,v=t*d[0]+a,_=t*d[1]+o;0===n&&(e.push(u,p),i.push(u,p)),e.push(g,f,m,b,v,_),i.push(g,f),n===r-1&&i.push(v,_)}r.push({bezier:l.#un(e,n,this.rotation),points:l.#un(i,n,this.rotation)})}return r}#fn(){let t=1/0,e=-1/0,i=1/0,r=-1/0;for(const s of this.paths)for(const[a,o,l,c]of s){const s=n.Util.bezierBoundingBox(...a,...o,...l,...c);t=Math.min(t,s[0]),i=Math.min(i,s[1]),e=Math.max(e,s[2]),r=Math.max(r,s[3])}return[t,i,e,r]}#hn(){return this.#Bi?Math.ceil(this.thickness*this.parentScale):0}#$i(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return;if(!this.#Bi)return void this.#Xi();const e=this.#fn(),i=this.#hn();this.#Fi=Math.max(r.AnnotationEditor.MIN_SIZE,e[2]-e[0]),this.#Ri=Math.max(r.AnnotationEditor.MIN_SIZE,e[3]-e[1]);const n=Math.ceil(i+this.#Fi*this.scaleFactor),s=Math.ceil(i+this.#Ri*this.scaleFactor),[a,o]=this.parentDimensions;this.width=n/a,this.height=s/o,this.setAspectRatio(n,s);const l=this.translationX,c=this.translationY;this.translationX=-e[0],this.translationY=-e[1],this.#Ji(),this.#Xi(),this.#Hi=n,this.#Wi=s,this.setDims(n,s);const h=t?i/this.scaleFactor/2:0;this.translate(l-this.translationX-h,c-this.translationY-h)}static deserialize(t,e,i){if(t instanceof s.InkAnnotationElement)return null;const a=super.deserialize(t,e,i);a.thickness=t.thickness,a.color=n.Util.makeHexColor(...t.color),a.opacity=t.opacity;const[o,c]=a.pageDimensions,h=a.width*o,d=a.height*c,u=a.parentScale,p=t.thickness/2;a.#Bi=!0,a.#Hi=Math.round(h),a.#Wi=Math.round(d);const{paths:g,rect:f,rotation:m}=t;for(let{bezier:n}of g){n=l.#pn(n,f,m);const t=[];a.paths.push(t);let e=u*(n[0]-p),i=u*(n[1]-p);for(let s=2,a=n.length;s<a;s+=6){const r=u*(n[s]-p),a=u*(n[s+1]-p),o=u*(n[s+2]-p),l=u*(n[s+3]-p),c=u*(n[s+4]-p),h=u*(n[s+5]-p);t.push([[e,i],[r,a],[o,l],[c,h]]),e=c,i=h}const r=this.#dn(t);a.bezierPath2D.push(r)}const b=a.#fn();return a.#Fi=Math.max(r.AnnotationEditor.MIN_SIZE,b[2]-b[0]),a.#Ri=Math.max(r.AnnotationEditor.MIN_SIZE,b[3]-b[1]),a.#cn(h,d),a}serialize(){if(this.isEmpty())return null;const t=this.getRect(0,0),e=r.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:n.AnnotationEditorType.INK,color:e,thickness:this.thickness,opacity:this.opacity,paths:this.#gn(this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:t,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}e.InkEditor=l},(t,e,i)=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.StampEditor=void 0,i(149),i(152);var n=i(1),r=i(164),s=i(168),a=i(198);class o extends r.AnnotationEditor{#mn=null;#bn=null;#vn=null;#_n=null;#yn=null;#An=null;#zi=null;#Sn=null;#xn=!1;#wn=!1;static _type="stamp";constructor(t){super({...t,name:"stampEditor"}),this.#_n=t.bitmapUrl,this.#yn=t.bitmapFile}static initialize(t){r.AnnotationEditor.initialize(t)}static get supportedTypes(){return(0,n.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((t=>`image/${t}`)))}static get supportedTypesStr(){return(0,n.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}static paste(t,e){e.pasteEditor(n.AnnotationEditorType.STAMP,{bitmapFile:t.getAsFile()})}#En(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?(this.#mn=t.bitmap,e||(this.#bn=t.id,this.#xn=t.isSvg),this.#Ki()):this.remove()}#Cn(){this.#vn=null,this._uiManager.enableWaiting(!1),this.#An&&this.div.focus()}#Tn(){if(this.#bn)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#bn).then((t=>this.#En(t,!0))).finally((()=>this.#Cn()));if(this.#_n){const t=this.#_n;return this.#_n=null,this._uiManager.enableWaiting(!0),void(this.#vn=this._uiManager.imageManager.getFromUrl(t).then((t=>this.#En(t))).finally((()=>this.#Cn())))}if(this.#yn){const t=this.#yn;return this.#yn=null,this._uiManager.enableWaiting(!0),void(this.#vn=this._uiManager.imageManager.getFromFile(t).then((t=>this.#En(t))).finally((()=>this.#Cn())))}const t=document.createElement("input");t.type="file",t.accept=o.supportedTypesStr,this.#vn=new Promise((e=>{t.addEventListener("change",(async()=>{if(t.files&&0!==t.files.length){this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(t.files[0]);this.#En(e)}else this.remove();e()})),t.addEventListener("cancel",(()=>{this.remove(),e()}))})).finally((()=>this.#Cn())),t.click()}remove(){this.#bn&&(this.#mn=null,this._uiManager.imageManager.deleteId(this.#bn),this.#An?.remove(),this.#An=null,this.#zi?.disconnect(),this.#zi=null),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#bn&&this.#Tn(),this.isAttachedToDOM||this.parent.add(this))):this.#bn&&this.#Tn()}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#vn||this.#mn||this.#_n||this.#yn)}get isResizable(){return!0}render(){if(this.div)return this.div;let t,e;if(this.width&&(t=this.x,e=this.y),super.render(),this.div.hidden=!0,this.#mn?this.#Ki():this.#Tn(),this.width){const[i,n]=this.parentDimensions;this.setAt(t*i,e*n,this.width*i,this.height*n)}return this.div}#Ki(){const{div:t}=this;let{width:e,height:i}=this.#mn;const[n,r]=this.pageDimensions,s=.75;if(this.width)e=this.width*n,i=this.height*r;else if(e>s*n||i>s*r){const t=Math.min(s*n/e,s*r/i);e*=t,i*=t}const[a,o]=this.parentDimensions;this.setDims(e*a/n,i*o/r),this._uiManager.enableWaiting(!1);const l=this.#An=document.createElement("canvas");t.append(l),t.hidden=!1,this.#Pn(e,i),this.#Yi(),this.#wn||(this.parent.addUndoableEditor(this),this.#wn=!0),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()}#kn(t,e){const[i,n]=this.parentDimensions;this.width=t/i,this.height=e/n,this.setDims(t,e),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==this.#Sn&&clearTimeout(this.#Sn),this.#Sn=setTimeout((()=>{this.#Sn=null,this.#Pn(t,e)}),200)}#Mn(t,e){const{width:i,height:n}=this.#mn;let r=i,s=n,a=this.#mn;for(;r>2*t||s>2*e;){const i=r,n=s;r>2*t&&(r=r>=16384?Math.floor(r/2)-1:Math.ceil(r/2)),s>2*e&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const o=new OffscreenCanvas(r,s);o.getContext("2d").drawImage(a,0,0,i,n,0,0,r,s),a=o.transferToImageBitmap()}return a}#Pn(t,e){t=Math.ceil(t),e=Math.ceil(e);const i=this.#An;if(!i||i.width===t&&i.height===e)return;i.width=t,i.height=e;const n=this.#xn?this.#mn:this.#Mn(t,e),r=i.getContext("2d");
1r.filter=this._uiManager.hcmFilter,r.drawImage(n,0,0,n.width,n.height,0,0,t,e)}#Rn(t){if(t){if(this.#xn){const t=this._uiManager.imageManager.getSvgUrl(this.#bn);if(t)return t}const t=document.createElement("canvas");return({width:t.width,height:t.height}=this.#mn),t.getContext("2d").drawImage(this.#mn,0,0),t.toDataURL()}if(this.#xn){const[t,e]=this.pageDimensions,i=Math.round(this.width*t*s.PixelsPerInch.PDF_TO_CSS_UNITS),n=Math.round(this.height*e*s.PixelsPerInch.PDF_TO_CSS_UNITS),r=new OffscreenCanvas(i,n);return r.getContext("2d").drawImage(this.#mn,0,0,this.#mn.width,this.#mn.height,0,0,i,n),r.transferToImageBitmap()}return structuredClone(this.#mn)}#Yi(){this.#zi=new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&this.#kn(e.width,e.height)})),this.#zi.observe(this.div)}static deserialize(t,e,i){if(t instanceof a.StampAnnotationElement)return null;const n=super.deserialize(t,e,i),{rect:r,bitmapUrl:s,bitmapId:o,isSvg:l,accessibilityData:c}=t;o&&i.imageManager.isValidId(o)?n.#bn=o:n.#_n=s,n.#xn=l;const[h,d]=n.pageDimensions;return n.width=(r[2]-r[0])/h,n.height=(r[3]-r[1])/d,c&&(n.altTextData=c),n}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;const i={annotationType:n.AnnotationEditorType.STAMP,bitmapId:this.#bn,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#xn,structTreeParentId:this._structTreeParentId};if(t)return i.bitmapUrl=this.#Rn(!0),i.accessibilityData=this.altTextData,i;const{decorative:r,altText:s}=this.altTextData;if(!r&&s&&(i.accessibilityData={type:"Figure",alt:s}),null===e)return i;e.stamps||=new Map;const a=this.#xn?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(e.stamps.has(this.#bn)){if(this.#xn){const t=e.stamps.get(this.#bn);a>t.area&&(t.area=a,t.serialized.bitmap.close(),t.serialized.bitmap=this.#Rn(!1))}}else e.stamps.set(this.#bn,{area:a,serialized:i}),i.bitmap=this.#Rn(!1);return i}}e.StampEditor=o}],__webpack_module_cache__={};function __w_pdfjs_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var i=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(i.exports,i,i.exports,__w_pdfjs_require__),i.exports}var __webpack_exports__={};return(()=>{var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AbortException",{enumerable:!0,get:function(){return e.AbortException}}),Object.defineProperty(t,"AnnotationEditorLayer",{enumerable:!0,get:function(){return s.AnnotationEditorLayer}}),Object.defineProperty(t,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return e.AnnotationEditorParamsType}}),Object.defineProperty(t,"AnnotationEditorType",{enumerable:!0,get:function(){return e.AnnotationEditorType}}),Object.defineProperty(t,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return a.AnnotationEditorUIManager}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(t,"AnnotationMode",{enumerable:!0,get:function(){return e.AnnotationMode}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return e.CMapCompressionType}}),Object.defineProperty(t,"DOMSVGFactory",{enumerable:!0,get:function(){return n.DOMSVGFactory}}),Object.defineProperty(t,"FeatureTest",{enumerable:!0,get:function(){return e.FeatureTest}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(t,"ImageKind",{enumerable:!0,get:function(){return e.ImageKind}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return e.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return e.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return e.OPS}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return e.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return e.PermissionFlag}}),Object.defineProperty(t,"PixelsPerInch",{enumerable:!0,get:function(){return n.PixelsPerInch}}),Object.defineProperty(t,"PromiseCapability",{enumerable:!0,get:function(){return e.PromiseCapability}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return i.SVGGraphics}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return e.UnexpectedResponseException}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return e.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return e.VerbosityLevel}}
1),Object.defineProperty(t,"XfaLayer",{enumerable:!0,get:function(){return c.XfaLayer}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return e.createValidAbsoluteUrl}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(t,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return n.getPdfFilenameFromUrl}}),Object.defineProperty(t,"getXfaPageViewport",{enumerable:!0,get:function(){return n.getXfaPageViewport}}),Object.defineProperty(t,"isDataScheme",{enumerable:!0,get:function(){return n.isDataScheme}}),Object.defineProperty(t,"isPdfFile",{enumerable:!0,get:function(){return n.isPdfFile}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(t,"noContextMenu",{enumerable:!0,get:function(){return n.noContextMenu}}),Object.defineProperty(t,"normalizeUnicode",{enumerable:!0,get:function(){return e.normalizeUnicode}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return r.renderTextLayer}}),Object.defineProperty(t,"setLayerDimensions",{enumerable:!0,get:function(){return n.setLayerDimensions}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return e.shadow}}),Object.defineProperty(t,"updateTextLayer",{enumerable:!0,get:function(){return r.updateTextLayer}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return i.version}});var e=__w_pdfjs_require__(1),i=__w_pdfjs_require__(124),n=__w_pdfjs_require__(168),r=__w_pdfjs_require__(195),s=__w_pdfjs_require__(196),a=__w_pdfjs_require__(165),o=__w_pdfjs_require__(198),l=__w_pdfjs_require__(176),c=__w_pdfjs_require__(201)})(),__webpack_exports__})(),module.exports=root.pdfjsLib=factory()}}]);
2//# sourceMappingURL=906a09f8.447f88bed3108a6d.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.