PageSourceSearch

https://cdn.production.dochub.com/assets/chunk.20260930T195149833Z.fa1b47cec49361506c0a.js

js dochub.com collected 2026-10-01 10:13:17 UTC 418,673 bytes, 3,241 lines download raw bytes

1(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[97],{34014:()=>{function e(e,t,r){if(r||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i])
2return e.concat(n||Array.prototype.slice.call(t))}var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi,n=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi
3function i(e,t){var r=e.x*Math.cos(t)-e.y*Math.sin(t),n=e.y*Math.cos(t)+e.x*Math.sin(t)
4e.x=r,e.y=n}function a(e,t){e.x*=t,e.y*=t}var s=function(){function i(a){var s
5this.commands=[],a&&a instanceof i?(s=this.commands).push.apply(s,a.commands):a&&(this.commands=function(i){var a=[],s=String(i).trim()
6return"M"!==s[0]&&"m"!==s[0]||s.replace(r,(function(r,i,s){var o=function(e){var t=e.match(n)
7return t?t.map(Number):[]}(s),l=i.toLowerCase(),c=i
8if("m"===l&&o.length>2&&(a.push(e([c],o.splice(0,2),!0)),l="l",c="m"===c?"l":"L"),o.length<t[l])return""
9for(a.push(e([c],o.splice(0,t[l]),!0));o.length>=t[l]&&o.length&&t[l];)a.push(e([c],o.splice(0,t[l]),!0))
10return""})),a}(a))}return i.prototype.addPath=function(e){var t
11e&&e instanceof i&&(t=this.commands).push.apply(t,e.commands)},i.prototype.moveTo=function(e,t){this.commands.push(["M",e,t])},i.prototype.lineTo=function(e,t){this.commands.push(["L",e,t])},i.prototype.arc=function(e,t,r,n,i,a){this.commands.push(["AC",e,t,r,n,i,!!a])},i.prototype.arcTo=function(e,t,r,n,i){this.commands.push(["AT",e,t,r,n,i])},i.prototype.ellipse=function(e,t,r,n,i,a,s,o){this.commands.push(["E",e,t,r,n,i,a,s,!!o])},i.prototype.closePath=function(){this.commands.push(["Z"])},i.prototype.bezierCurveTo=function(e,t,r,n,i,a){this.commands.push(["C",e,t,r,n,i,a])},i.prototype.quadraticCurveTo=function(e,t,r,n){this.commands.push(["Q",e,t,r,n])},i.prototype.rect=function(e,t,r,n){this.commands.push(["R",e,t,r,n])},i.prototype.roundRect=function(e,t,r,n,i){void 0===i?this.commands.push(["RR",e,t,r,n,0]):this.commands.push(["RR",e,t,r,n,i])},i}()
12function o(e,t){var r,n,s,o,l,c,u,h,d,p,f,m,g,v,b,_,y,A,S,w,x,P,C,T,E=0,k=0,R=null,F=null,M=null,O=null,I=null,D=null
13e.beginPath()
14for(var L=0;L<t.length;++L){"S"!==(A=t[L][0])&&"s"!==A&&"C"!==A&&"c"!==A&&(R=null,F=null),"T"!==A&&"t"!==A&&"Q"!==A&&"q"!==A&&(M=null,O=null)
15var j=void 0
16switch(A){case"m":case"M":j=t[L],"m"===A?(E+=j[1],k+=j[2]):(E=j[1],k=j[2]),"M"!==A&&I||(I={x:E,y:k}),e.moveTo(E,k)
17break
18case"l":E+=(j=t[L])[1],k+=j[2],e.lineTo(E,k)
19break
20case"L":E=(j=t[L])[1],k=j[2],e.lineTo(E,k)
21break
22case"H":E=(j=t[L])[1],e.lineTo(E,k)
23break
24case"h":E+=(j=t[L])[1],e.lineTo(E,k)
25break
26case"V":k=(j=t[L])[1],e.lineTo(E,k)
27break
28case"v":k+=(j=t[L])[1],e.lineTo(E,k)
29break
30case"a":case"A":if(j=t[L],null===D)throw new Error("This should never happen")
31"a"===A?(E+=j[6],k+=j[7]):(E=j[6],k=j[7]),v=j[1],b=j[2],u=j[3]*Math.PI/180,s=!!j[4],o=!!j[5],l={x:E,y:k},i(c={x:(D.x-l.x)/2,y:(D.y-l.y)/2},-u),(h=c.x*c.x/(v*v)+c.y*c.y/(b*b))>1&&(v*=h=Math.sqrt(h),b*=h),d=v*v*b*b,p=v*v*c.y*c.y+b*b*c.x*c.x,a(S={x:v*c.y/b,y:-b*c.x/v},o!==s?Math.sqrt((d-p)/p)||0:-Math.sqrt((d-p)/p)||0),n=Math.atan2((c.y-S.y)/b,(c.x-S.x)/v),r=Math.atan2(-(c.y+S.y)/b,-(c.x+S.x)/v),i(S,u),P=S,C=(l.x+D.x)/2,T=(l.y+D.y)/2,P.x+=C,P.y+=T,e.save(),e.translate(S.x,S.y),e.rotate(u),e.scale(v,b),e.arc(0,0,1,n,r,!o),e.restore()
32break
33case"C":R=(j=t[L])[3],F=j[4],E=j[5],k=j[6],e.bezierCurveTo(j[1],j[2],R,F,E,k)
34break
35case"c":j=t[L],e.bezierCurveTo(j[1]+E,j[2]+k,j[3]+E,j[4]+k,j[5]+E,j[6]+k),R=j[3]+E,F=j[4]+k,E+=j[5],k+=j[6]
36break
37case"S":j=t[L],null!==R&&null!==F||(R=E,F=k),e.bezierCurveTo(2*E-R,2*k-F,j[1],j[2],j[3],j[4]),R=j[1],F=j[2],E=j[3],k=j[4]
38break
39case"s":j=t[L],null!==R&&null!==F||(R=E,F=k),e.bezierCurveTo(2*E-R,2*k-F,j[1]+E,j[2]+k,j[3]+E,j[4]+k),R=j[1]+E,F=j[2]+k,E+=j[3],k+=j[4]
40break
41case"Q":M=(j=t[L])[1],O=j[2],E=j[3],k=j[4],e.quadraticCurveTo(M,O,E,k)
42break
43case"q":M=(j=t[L])[1]+E,O=j[2]+k,E+=j[3],k+=j[4],e.quadraticCurveTo(M,O,E,k)
44break
45case"T":null!==M&&null!==O||(M=E,O=k),M=2*E-M,O=2*k-O,E=(j=t[L])[1],k=j[2],e.quadraticCurveTo(M,O,E,k)
46break
47case"t":null!==M&&null!==O||(M=E,O=k),M=2*E-M,O=2*k-O,E+=(j=t[L])[1],k+=j[2],e.quadraticCurveTo(M,O,E,k)
48break
49case"z":case"Z":I&&(E=I.x,k=I.y),I=null,e.closePath()
50break
51case"AC":E=(j=t[L])[1],k=j[2],g=j[3],n=j[4],r=j[5],w=j[6],e.arc(E,k,g,n,r,w)
52break
53case"AT":f=(j=t[L])[1],m=j[2],E=j[3],k=j[4],g=j[5],e.arcTo(f,m,E,k,g)
54break
55case"E":E=(j=t[L])[1],k=j[2],v=j[3],b=j[4],u=j[5],n=j[6],r=j[7],w=j[8],e.save(),e.translate(E,k),e.rotate(u),e.scale(v,b),e.arc(0,0,1,n,r,w),e.restore(
55)
56break
57case"R":E=(j=t[L])[1],k=j[2],_=j[3],y=j[4],I={x:E,y:k},e.rect(E,k,_,y)
58break
59case"RR":E=(j=t[L])[1],k=j[2],_=j[3],y=j[4],x=j[5],I={x:E,y:k},e.roundRect(E,k,_,y,x)}D?(D.x=E,D.y=k):D={x:E,y:k}}}function l(e,t,r,n,i){var a=this
60if(void 0===i&&(i=0),"number"==typeof i&&(i=[i]),Array.isArray(i)){if(0===i.length||i.length>4)throw new RangeError("Failed to execute 'roundRect' on '".concat(this.constructor.name,"': ").concat(i.length," radii provided. Between one and four radii are necessary."))
61if(i.forEach((function(e){if(e<0)throw new RangeError("Failed to execute 'roundRect' on '".concat(a.constructor.name,"': Radius value ").concat(e," is negative."))})),1===i.length&&0===i[0])return this.rect(e,t,r,n)
62var s,o,l,c=Math.min(r,n)/2,u=s=o=l=Math.min(c,i[0])
632===i.length&&(s=l=Math.min(c,i[1])),3===i.length&&(s=l=Math.min(c,i[1]),o=Math.min(c,i[2])),4===i.length&&(s=Math.min(c,i[1]),o=Math.min(c,i[2]),l=Math.min(c,i[3])),this.moveTo(e,t+n-l),this.arcTo(e,t,e+u,t,u),this.arcTo(e+r,t,e+r,t+s,s),this.arcTo(e+r,t+n,e+r-o,t+n,o),this.arcTo(e,t+n,e,t+n-l,l),this.moveTo(e,t)}}!function(e){if(e&&e.CanvasRenderingContext2D&&!e.Path2D){var t=e.CanvasRenderingContext2D,r=t.prototype.fill,n=t.prototype.stroke,i=t.prototype.isPointInPath
64t.prototype.fill=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]
65if(!(e[0]instanceof s))return i=e[0]||"nonzero",r.apply(this,[i])
66var n=e[0],i=e[1]||"nonzero"
67o(this,n.commands),r.apply(this,[i])},t.prototype.stroke=function(e){e&&o(this,e.commands),n.apply(this)},t.prototype.isPointInPath=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]
68if(e[0]instanceof s){var r=e[0],n=e[1],a=e[2],l=e[3]||"nonzero"
69return o(this,r.commands),i.apply(this,[n,a,l])}return i.apply(this,e)},e.Path2D=s}}(window),function(e){if(e&&e.CanvasRenderingContext2D){var t=e.CanvasRenderingContext2D,r=e.Path2D
70t&&!t.prototype.roundRect&&(t.prototype.roundRect=l),r&&!r.prototype.roundRect&&(r.prototype.roundRect=l)}}(window)},42097:(module,__unused_webpack_exports,__webpack_require__)=>{function _defineProperty2(e,t,r){return(t=_toPropertyKey2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey2(e){var t=_toPrimitive2(e,"string")
71return"symbol"==typeof t?t:t+""}function _toPrimitive2(e,t){if("object"!=typeof e||!e)return e
72var r=e[Symbol.toPrimitive]
73if(void 0!==r){var n=r.call(e,t||"default")
74if("object"!=typeof n)return n
75throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _classStaticPrivateFieldSpecSet(e,t,r,n){return _assertClassBrand(t,e),_classCheckPrivateStaticFieldDescriptor(r,"set"),_classApplyDescriptorSet2(e,r,n),n}function _classStaticPrivateFieldSpecGet(e,t,r){return _assertClassBrand(t,e),_classCheckPrivateStaticFieldDescriptor(r,"get"),_classApplyDescriptorGet2(e,r)}function _classCheckPrivateStaticFieldDescriptor(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function _classPrivateFieldInitSpec2(e,t,r){_checkPrivateRedeclaration2(e,t),t.set(e,r)}function _checkPrivateRedeclaration2(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet3(e,t){return _classApplyDescriptorGet2(e,_classPrivateFieldGet2(t,e))}function _classApplyDescriptorGet2(e,t){return t.get?t.get.call(e):t.value}function _classPrivateFieldSet2(e,t,r){return _classApplyDescriptorSet2(e,_classPrivateFieldGet2(t,e),r),r}function _classPrivateFieldGet2(e,t){return e.get(_assertClassBrand(e,t))}function _assertClassBrand(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r
76throw new TypeError("Private element is not present on this object")}function _classApplyDescriptorSet2(e,t,r){if(t.set)t.set.call(e,r)
77else{if(!t.writable)throw new TypeError("attempted to set read only private field")
78t.value=r}}var e
79globalThis,e=()=>(()=>{var __webpack_modules__=[,(e,t,r)=>{"use strict"
80var n
81Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.RenderingIntentFlag=t.PromiseCapability=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.MAX_IMAGE_SIZE_TO_CACHE=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=function(e,t){e||o(t)},t.bytesToString=function(e){"object"==typeof e&&void 0!==(null==e?void 0:e.length)||o("Invalid argument for bytesToString")
82const t=e.length,r=8192
83if(t<r)return String.fromCharCode.apply(null,e)
84const n=[]
85for(let i=0;i<t;i+=r){const a=Math.min(i+r,t),s=e.subarray(i,a)
86n.push(String.fromCharCode.apply(null,s))}return n.join("")},t.createValidAbsoluteUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null
87if(!e)return null
88try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);(null==t?void 0:t.length)>=2&&(e=`http://${e}`)}if(r.tryConvertEncoding)try{e=f(e)}catch(e){}}const n=t?new URL(e,t):new URL(e)
89if(function(e){switch(null==e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0
90default:return!1}}(n))return n}catch(e){}return null},t.getModificationDate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date
91return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return a},t.info=function(e){a>=i.INFOS&&console.log(`Info: ${e}`)},t.isArrayBuffer=function(e){return"object"==typeof e&&void 0!==(null==e?void 0:e.byteLength)},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1
92for(let r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1
93return!0},t.normalizeUnicode=function(e){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,g=new Map([["ſt","ſt"]])),e.replaceAll(m,((e,t,r)=>t?t.normalize("NFKC"):g.get(r)))},t.objectFromMap=function(e){const t=Object.create(null)
94for(const[r,n]of e)t[r]=n
95return t},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(a=e)},t.shadow=l,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=u,t.stringToPDFString=function(e){if(e[0]>="ï"){let t
96if("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t)try{const r=new TextDecoder(t,{fatal:!0}),n=u(e)
97return r.decode(n)}catch(e){s(`stringToPDFString: "${e}".`)}}const t=[]
98for(let r=0,n=e.length;r<n;r++){const n=p[e.charCodeAt(r)]
99t.push(n?String.fromCharCode(n):e.charAt(r))}return t.join("")},t.stringToUTF8String=f,t.unreachable=o,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=s,globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,r(2)),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.MAX_IMAGE_SIZE_TO_CACHE=1e7,t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35,t.BASELINE_FACTOR=.25925925925925924,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},t.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},t.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},t.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},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.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},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.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},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.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"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"}
100const i={ERRORS:0,WARNINGS:1,INFOS:5}
101t.VerbosityLevel=i,t.CMapCompressionType={NONE:0,BINARY:1}
101,t.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},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2}
102let a=i.WARNINGS
103function s(e){a>=i.WARNINGS&&console.log(`Warning: ${e}`)}function o(e){throw new Error(e)}function l(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]
104return Object.defineProperty(e,t,{value:r,enumerable:!n,configurable:!0,writable:!1}),r}const c=function(){function e(t,r){this.constructor===e&&o("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}()
105function u(e){"string"!=typeof e&&o("Invalid argument for stringToBytes")
106const t=e.length,r=new Uint8Array(t)
107for(let n=0;n<t;++n)r[n]=255&e.charCodeAt(n)
108return r}t.BaseException=c,t.PasswordException=class extends c{constructor(e,t){super(e,"PasswordException"),this.code=t}},t.UnknownErrorException=class extends c{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},t.InvalidPDFException=class extends c{constructor(e){super(e,"InvalidPDFException")}},t.MissingPDFException=class extends c{constructor(e){super(e,"MissingPDFException")}},t.UnexpectedResponseException=class extends c{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},t.FormatError=class extends c{constructor(e){super(e,"FormatError")}},t.AbortException=class extends c{constructor(e){super(e,"AbortException")}},t.FeatureTest=class{static get isLittleEndian(){return l(this,"isLittleEndian",function(){const e=new Uint8Array(4)
109return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return l(this,"isEvalSupported",function(){try{return new Function(""),!0}catch(e){return!1}}())}static get isOffscreenCanvasSupported(){return l(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"==typeof navigator?l(this,"platform",{isWin:!1,isMac:!1}):l(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}}
110const h=[...Array(256).keys()].map((e=>e.toString(16).padStart(2,"0")))
111class d{static makeHexColor(e,t,r){return`#${h[e]}${h[t]}${h[r]}`}static scaleMinMax(e,t){let r
112e[0]?(e[0]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[2],t[2]=r,r=t[1],t[1]=t[3],t[3]=r,e[1]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const r=t[0]*t[3]-t[1]*t[2]
113return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}static getAxialAlignedBoundingBox(e,t){const r=d.applyTransform(e,t),n=d.applyTransform(e.slice(2,4),t),i=d.applyTransform([e[0],e[3]],t),a=d.applyTransform([e[2],e[1]],t)
114return[Math.min(r[0],n[0],i[0],a[0]),Math.min(r[1],n[1],i[1],a[1]),Math.max(r[0],n[0],i[0],a[0]),Math.max(r[1],n[1],i[1],a[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2]
115return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],s=(r+a)/2,o=Math.sqrt((r+a)**2-4*(r*a-i*n))/2,l=s+o||1,c=s-o||1
116return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0)
117return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]))
118if(r>n)return null
119const i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),a=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]))
120return i>a?null:[r,i,n,a]}static bezierBoundingBox(e,t,r,n,i,a,s,o){const l=[],c=[[],[]]
121let u,h,d,p,f,m,g,v
122for(let c=0;c<2;++c)if(0===c?(h=6*e-12*r+6*i,u=-3*e+9*r-9*i+3*s,d=3*r-3*e):(h=6*t-12*n+6*a,u=-3*t+9*n-9*a+3*o,d=3*n-3*t),Math.abs(u)<1e-12){if(Math.abs(h)<1e-12)continue
123p=-d/h,0<p&&p<1&&l.push(p)}else g=h*h-4*d*u,v=Math.sqrt(g),g<0||(f=(-h+v)/(2*u),0<f&&f<1&&l.push(f),m=(-h-v)/(2*u),0<m&&m<1&&l.push(m))
124let b,_=l.length
125const y=_
126for(;_--;)p=l[_],b=1-p,c[0][_]=b*b*b*e+3*b*b*p*r+3*b*p*p*i+p*p*p*s,c[1][_]=b*b*b*t+3*b*b*p*n+3*b*p*p*a+p*p
126*p*o
127return c[0][y]=e,c[1][y]=t,c[0][y+1]=s,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])]}}t.Util=d
128const p=[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]
129function f(e){return decodeURIComponent(escape(e))}t.PromiseCapability=(n=new WeakMap,class{constructor(){_classPrivateFieldInitSpec2(this,n,{writable:!0,value:!1}),this.promise=new Promise(((e,t)=>{this.resolve=t=>{_classPrivateFieldSet2(this,n,!0),e(t)},this.reject=e=>{_classPrivateFieldSet2(this,n,!0),t(e)}}))}get settled(){return _classPrivateFieldGet3(this,n)}})
130let m=null,g=null},(e,t,r)=>{"use strict"
131var n=r(3)
132!globalThis.DOMMatrix&&n.isNodeJS&&(globalThis.DOMMatrix=__webpack_require__(25352).DOMMatrix),function(){if(globalThis.Path2D||!n.isNodeJS)return
133const{CanvasRenderingContext2D:e}=__webpack_require__(25352),{polyfillPath2D:t}=__webpack_require__(34014)
134globalThis.CanvasRenderingContext2D=e,t(globalThis)}(),!globalThis.ReadableStream&&n.isNodeJS&&(globalThis.ReadableStream=__webpack_require__(96802).ReadableStream),Array.prototype.at||r(4),Uint8Array.prototype.at||r(78),globalThis.structuredClone||r(90)},(e,t)=>{"use strict"
135Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0
136const r=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type)
137t.isNodeJS=r},(e,t,r)=>{r(5)
138var n=r(77)
139e.exports=n("Array","at")},(e,t,r)=>{"use strict"
140var n=r(6),i=r(43),a=r(67),s=r(65),o=r(72)
141n({target:"Array",proto:!0},{at:function(e){var t=i(this),r=a(t),n=s(e),o=n>=0?n:r+n
142return o<0||o>=r?void 0:t[o]}}),o("at")},(e,t,r)=>{var n=r(7),i=r(8).f,a=r(47),s=r(51),o=r(41),l=r(59),c=r(71)
143e.exports=function(e,t){var r,u,h,d,p,f=e.target,m=e.global,g=e.stat
144if(r=m?n:g?n[f]||o(f,{}):(n[f]||{}).prototype)for(u in t){if(d=t[u],h=e.dontCallGetSet?(p=i(r,u))&&p.value:r[u],!c(m?u:f+(g?".":"#")+u,e.forced)&&void 0!==h){if(typeof d==typeof h)continue
145l(d,h)}(e.sham||h&&h.sham)&&a(d,"sham",!0),s(r,u,d,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e}
146e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(9),i=r(11),a=r(13),s=r(14),o=r(15),l=r(21),c=r(42),u=r(45),h=Object.getOwnPropertyDescriptor
147t.f=n?h:function(e,t){if(e=o(e),t=l(t),u)try{return h(e,t)}catch(e){}if(c(e,t))return s(!i(a.f,e,t),e[t])}},(e,t,r)=>{var n=r(10)
148e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,r)=>{var n=r(12),i=Function.prototype.call
149e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},(e,t,r)=>{var n=r(10)
150e.exports=!n((function(){var e=function(){}.bind()
151return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(e,t)=>{"use strict"
152var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1)
153t.f=i?function(e){var t=n(this,e)
154return!!t&&t.enumerable}:r},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(16),i=r(19)
155e.exports=function(e){return n(i(e))}},(e,t,r)=>{var n=r(17),i=r(10),a=r(18),s=Object,o=n("".split)
156e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?o(e,""):s(e)}:s},(e,t,r)=>{var n=r(12),i=Function.prototype,a=i.call,s=n&&i.bind.bind(a,a)
157e.exports=n?s:function(e){return function(){return a.apply(e,arguments)}}},(e,t,r)=>{var n=r(17),i=n({}.toString),a=n("".slice)
158e.exports=function(e){return a(i(e),8,-1)}},(e,t,r)=>{var n=r(20),i=TypeError
159e.exports=function(e){if(n(e))throw i("Can't call method on "+e)
160return e}},e=>{e.exports=function(e){return null==e}},(e,t,r)=>{var n=r(22),i=r(26)
161e.exports=function(e){var t=n(e,"string")
162return i(t)?t:t+""}},(e,t,r)=>{var n=r(11),i=r(23),a=r(26),s=r(33),o=r(36),l=r(37),c=TypeError,u=l("toPrimitive")
163e.exports=function(e,t){if(!i(e)||a(e))return e
164var r,l=s(e,u)
165if(l){if(void 0===t&&(t="default"),r=n(l,e,t),!i(r)||a(r))return r
166throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},(e,t,r)=>{var n=r(24),i=r(25),a=i.all
167e.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===a}:function(e){return"object"==typeof e?null!==e:n(e)}},(e,t,r)=>{var n=r(25),i=n.all
168e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},e=>{var t="object"==typeof document&&document.all,r=void 0===t&&void 0!==t
169e.exports={all:t,IS_HTMLDDA:r}},(e,t,r)=>{var n=r(27),i=r(24),a=r(28),s=r(29),o=Object
170e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol")
171return i(t)&&a(t.prototype,o(e))}},(e,t,r)=>{var n=r(7),i=r(24)
172e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t]
173var r}},(e,t,r)=>{var n=r(17)
174e.exports=n({}.isPrototypeOf)},(e,t,r)=>{var n=r(30)
175e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n=r(31),i=r(10)
176e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol()
177return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},(e,t,r)=>{var n,i,a=r(7),s=r(32),o=a.process,l=a.Deno,c=o&&o.versions||l&&l.version,u=c&&c.v8
178u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>
178=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(e,t,r)=>{var n=r(34),i=r(20)
179e.exports=function(e,t){var r=e[t]
180return i(r)?void 0:n(r)}},(e,t,r)=>{var n=r(24),i=r(35),a=TypeError
181e.exports=function(e){if(n(e))return e
182throw a(i(e)+" is not a function")}},e=>{var t=String
183e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},(e,t,r)=>{var n=r(11),i=r(24),a=r(23),s=TypeError
184e.exports=function(e,t){var r,o
185if("string"===t&&i(r=e.toString)&&!a(o=n(r,e)))return o
186if(i(r=e.valueOf)&&!a(o=n(r,e)))return o
187if("string"!==t&&i(r=e.toString)&&!a(o=n(r,e)))return o
188throw s("Can't convert object to primitive value")}},(e,t,r)=>{var n=r(7),i=r(38),a=r(42),s=r(44),o=r(30),l=r(29),c=n.Symbol,u=i("wks"),h=l?c.for||c:c&&c.withoutSetter||s
189e.exports=function(e){return a(u,e)||(u[e]=o&&a(c,e)?c[e]:h("Symbol."+e)),u[e]}},(e,t,r)=>{var n=r(39),i=r(40);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,r)=>{var n=r(7),i=r(41),a="__core-js_shared__",s=n[a]||i(a,{})
190e.exports=s},(e,t,r)=>{var n=r(7),i=Object.defineProperty
191e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(17),i=r(43),a=n({}.hasOwnProperty)
192e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},(e,t,r)=>{var n=r(19),i=Object
193e.exports=function(e){return i(n(e))}},(e,t,r)=>{var n=r(17),i=0,a=Math.random(),s=n(1..toString)
194e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++i+a,36)}},(e,t,r)=>{var n=r(9),i=r(10),a=r(46)
195e.exports=!n&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},(e,t,r)=>{var n=r(7),i=r(23),a=n.document,s=i(a)&&i(a.createElement)
196e.exports=function(e){return s?a.createElement(e):{}}},(e,t,r)=>{var n=r(9),i=r(48),a=r(14)
197e.exports=n?function(e,t,r){return i.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(9),i=r(45),a=r(49),s=r(50),o=r(21),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable"
198t.f=n?a?function(e,t,r){if(s(e),t=o(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var n=u(e,t)
199n&&n[p]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:h in r?r[h]:n[h],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(s(e),t=o(t),s(r),i)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw l("Accessors not supported")
200return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(9),i=r(10)
201e.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,r)=>{var n=r(23),i=String,a=TypeError
202e.exports=function(e){if(n(e))return e
203throw a(i(e)+" is not an object")}},(e,t,r)=>{var n=r(24),i=r(48),a=r(52),s=r(41)
204e.exports=function(e,t,r,o){o||(o={})
205var l=o.enumerable,c=void 0!==o.name?o.name:t
206if(n(r)&&a(r,c,o),o.global)l?e[t]=r:s(t,r)
207else{try{o.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},(e,t,r)=>{var n=r(17),i=r(10),a=r(24),s=r(42),o=r(9),l=r(53).CONFIGURABLE,c=r(54),u=r(55),h=u.enforce,d=u.get,p=String,f=Object.defineProperty,m=n("".slice),g=n("".replace),v=n([].join),b=o&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),_=String(String).split("String"),y=e.exports=function(e,t,r){"Symbol("===m(p(t),0,7)&&(t="["+g(p(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!s(e,"name")||l&&e.name!==t)&&(o?f(e,"name",{value:t,configurable:!0}):e.name=t),b&&r&&s(r,"arity")&&e.length!==r.arity&&f(e,"length",{value:r.arity})
208try{r&&s(r,"constructor")&&r.constructor?o&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=h(e)
209return s(n,"source")||(n.source=v(_,"string"==typeof t?t:"")),e}
210Function.prototype.toString=y((function(){return a(this)&&d(this).source||c(this)}),"toString")},(e,t,r)=>{var n=r(9),i=r(42),a=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,o=i(a,"name"),l=o&&"something"===function(){}.name,c=o&&(!n||n&&s(a,"name").configurable)
211e.exports={EXISTS:o,PROPER:l,CONFIGURABLE:c}},(e,t,r)=>{var n=r(17),i=r(24),a=r(40),s=n(Function.toString)
212i(a.inspectSource)||(a.inspectSource=function(e){return s(e)}),e.exports=a.inspectSource},(e,t,r)=>{var n,i,a,s=r(56),o=r(7),l=r(23),c=r(47),u=r(42),h=r(40),d=r(57),p=r(58),f="Object already initialized",m=o.TypeError,g=o.WeakMap
213if(s||h.state){var v=h.state||(h.state=new g)
214v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw m(f)
215return t.facade=e,v.set(e,t),t},i=function(e){return v.get(e)||{}},a=function(e){return v.has(e)}}else{var b=d("state")
216p[b]=!0,n=function(e,t){if(u(e,b))throw m(f)
217return t.facade=e,c(e,b,t),t},i=function(e){return u(e,b)?e[b]:{}},a=function(e){return u(e,b)}}
217e.exports={set:n,get:i,has:a,enforce:function(e){return a(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r
218if(!l(t)||(r=i(t)).type!==e)throw m("Incompatible receiver, "+e+" required")
219return r}}}},(e,t,r)=>{var n=r(7),i=r(24),a=n.WeakMap
220e.exports=i(a)&&/native code/.test(String(a))},(e,t,r)=>{var n=r(38),i=r(44),a=n("keys")
221e.exports=function(e){return a[e]||(a[e]=i(e))}},e=>{e.exports={}},(e,t,r)=>{var n=r(42),i=r(60),a=r(8),s=r(48)
222e.exports=function(e,t,r){for(var o=i(t),l=s.f,c=a.f,u=0;u<o.length;u++){var h=o[u]
223n(e,h)||r&&n(r,h)||l(e,h,c(t,h))}}},(e,t,r)=>{var n=r(27),i=r(17),a=r(61),s=r(70),o=r(50),l=i([].concat)
224e.exports=n("Reflect","ownKeys")||function(e){var t=a.f(o(e)),r=s.f
225return r?l(t,r(e)):t}},(e,t,r)=>{var n=r(62),i=r(69).concat("length","prototype")
226t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},(e,t,r)=>{var n=r(17),i=r(42),a=r(15),s=r(63).indexOf,o=r(58),l=n([].push)
227e.exports=function(e,t){var r,n=a(e),c=0,u=[]
228for(r in n)!i(o,r)&&i(n,r)&&l(u,r)
229for(;t.length>c;)i(n,r=t[c++])&&(~s(u,r)||l(u,r))
230return u}},(e,t,r)=>{var n=r(15),i=r(64),a=r(67),s=function(e){return function(t,r,s){var o,l=n(t),c=a(l),u=i(s,c)
231if(e&&r!=r){for(;c>u;)if((o=l[u++])!=o)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===r)return e||u||0
232return!e&&-1}}
233e.exports={includes:s(!0),indexOf:s(!1)}},(e,t,r)=>{var n=r(65),i=Math.max,a=Math.min
234e.exports=function(e,t){var r=n(e)
235return r<0?i(r+t,0):a(r,t)}},(e,t,r)=>{var n=r(66)
236e.exports=function(e){var t=+e
237return t!=t||0===t?0:n(t)}},e=>{var t=Math.ceil,r=Math.floor
238e.exports=Math.trunc||function(e){var n=+e
239return(n>0?r:t)(n)}},(e,t,r)=>{var n=r(68)
240e.exports=function(e){return n(e.length)}},(e,t,r)=>{var n=r(65),i=Math.min
241e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var n=r(10),i=r(24),a=/#|\.prototype\./,s=function(e,t){var r=l[o(e)]
242return r==u||r!=c&&(i(t)?n(t):!!t)},o=s.normalize=function(e){return String(e).replace(a,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P"
243e.exports=s},(e,t,r)=>{var n=r(37),i=r(73),a=r(48).f,s=n("unscopables"),o=Array.prototype
244null==o[s]&&a(o,s,{configurable:!0,value:i(null)}),e.exports=function(e){o[s][e]=!0}},(e,t,r)=>{var n,i=r(50),a=r(74),s=r(69),o=r(58),l=r(76),c=r(46),u=r(57),h="prototype",d="script",p=u("IE_PROTO"),f=function(){},m=function(e){return"<"+d+">"+e+"</"+d+">"},g=function(e){e.write(m("")),e.close()
245var t=e.parentWindow.Object
246return e=null,t},v=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}v="undefined"!=typeof document?document.domain&&n?g(n):function(){var e,t=c("iframe"),r="java"+d+":"
247return t.style.display="none",l.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F}():g(n)
248for(var e=s.length;e--;)delete v[h][s[e]]
249return v()}
250o[p]=!0,e.exports=Object.create||function(e,t){var r
251return null!==e?(f[h]=i(e),r=new f,f[h]=null,r[p]=e):r=v(),void 0===t?r:a.f(r,t)}},(e,t,r)=>{var n=r(9),i=r(49),a=r(48),s=r(50),o=r(15),l=r(75)
252t.f=n&&!i?Object.defineProperties:function(e,t){s(e)
253for(var r,n=o(t),i=l(t),c=i.length,u=0;c>u;)a.f(e,r=i[u++],n[r])
254return e}},(e,t,r)=>{var n=r(62),i=r(69)
255e.exports=Object.keys||function(e){return n(e,i)}},(e,t,r)=>{var n=r(27)
256e.exports=n("document","documentElement")},(e,t,r)=>{var n=r(7),i=r(17)
257e.exports=function(e,t){return i(n[e].prototype[t])}},(e,t,r)=>{r(79)},(e,t,r)=>{"use strict"
258var n=r(80),i=r(67),a=r(65),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(e){var t=s(this),r=i(t),n=a(e),o=n>=0?n:r+n
259return o<0||o>=r?void 0:t[o]}))},(e,t,r)=>{"use strict"
260var n,i,a,s=r(81),o=r(9),l=r(7),c=r(24),u=r(23),h=r(42),d=r(82),p=r(35),f=r(47),m=r(51),g=r(84),v=r(28),b=r(85),_=r(87),y=r(37),A=r(44),S=r(55),w=S.enforce,x=S.get,P=l.Int8Array,C=P&&P.prototype,T=l.Uint8ClampedArray,E=T&&T.prototype,k=P&&b(P),R=C&&b(C),F=Object.prototype,M=l.TypeError,O=y("toStringTag"),I=A("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",L=s&&!!_&&"Opera"!==d(l.opera),j=!1,N={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},B=function(e){var t=b(e)
261if(u(t)){var r=x(t)
262return r&&h(r,D)?r[D]:B(t)}},q=function(e){if(!u(e))return!1
263var t=d(e)
264return h(N,t)||h(W,t)}
265for(n in N)(a=(i=l[n])&&i.prototype)?w(a)[D]=i:L=!1
266for(n in W)(a=(i=l[n])&&i.prototype)&&(w(a)[D]=i)
267if((!L||!c(k)||k===Function.prototype)&&(k=function(){throw M("Incorrect invocation")},L))for(n in N)l[n]&&_(l[n],k)
268if((!L||!R||R===F)&&(R=k.prototype,L))for(n in N)l[n]&&_(l[n].prototype,R)
269if(L&&b(E)!==R&&_(E,R),o&&!h(R,O))for(n in j=!0,g(R,O,{configurable:!0,get:function(){return u(this)?this[I]:void 0}}),N)l[n]&&f(l[n],I,n)
270e.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:j&&I,aTypedArray:function(e){if(q(e))return e
271throw M("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!_||v(k,e)))return e
272throw M(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(o){if(r)for(var i in N){var a=l[i]
273if(a&&h(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}R[e]&&!r||m(R,e,r?t:L&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i
274if(o){if(_){if(r)for(n in N)if((i=l[n])&&h(i,e))try{delete i[e]}catch(e){}if(k[e]&&!r)return
275try{return m(k,e,r?t:L&&k[e]||t)}catch(e){}}for(n in N)!(i=l[n])||i[e]&&!r||m(i,e,t)}},getTypedArrayConstructor:B,isView:function(e){if(!u(e))return!1
276var t=d(e)
277return"DataView"===t||h(N,t)||h(W,t)},isTypedArray:q,TypedArray:k,TypedArrayPrototype:R}},e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(e,t,r)=>{var n=r(83),i=r(24),a=r(18),s=r(37)("toStringTag"),o=Object,l="Arguments"==a(function(){return arguments}())
278e.exports=n?a:function(e){var t,r,n
279return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?r:l?a(t):"Object"==(n=a(t))&&i(t.callee)?"Arguments":n}},(e,t,r)=>{var n={}
280n[r(37)("toStringTag")]="z",e.exports="[object z]"===String(n)},(e,t,r)=>{var n=r(52),i=r(48)
281e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},(e,t,r)=>{var n=r(42),i=r(24),a=r(43),s=r(57),o=r(86),l=s("IE_PROTO"),c=Object,u=c.prototype
282e.exports=o?c.getPrototypeOf:function(e){var t=a(e)
283if(n(t,l))return t[l]
284var r=t.constructor
285return i(r)&&t instanceof r?r.prototype:t instanceof c?u:null}},(e,t,r)=>{var n=r(10)
286e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},(e,t,r)=>{var n=r(88),i=r(50),a=r(89)
287e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={}
288try{(e=n(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return i(r),a(n),t?e(r,n):r.__proto__=n,r}}():void 0)},(e,t,r)=>{var n=r(17),i=r(34)
289e.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},(e,t,r)=>{var n=r(24),i=String,a=TypeError
290e.exports=function(e){if("object"==typeof e||n(e))return e
291throw a("Can't set "+i(e)+" as a prototype")}},(e,t,r)=>{r(91),r(98),r(100),r(123),r(125)
292var n=r(137)
293e.exports=n.structuredClone},(e,t,r)=>{"use strict"
294var n=r(15),i=r(72),a=r(92),s=r(55),o=r(48).f,l=r(93),c=r(97),u=r(39),h=r(9),d="Array Iterator",p=s.set,f=s.getterFor(d)
295e.exports=l(Array,"Array",(function(e,t){p(this,{type:d,target:n(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.kind,n=e.index++
296return!t||n>=t.length?(e.target=void 0,c(void 0,!0)):c("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values")
297var m=a.Arguments=a.Array
298if(i("keys"),i("values"),i("entries"),!u&&h&&"values"!==m.name)try{o(m,"name",{value:"values"})}catch(e){}},e=>{e.exports={}},(e,t,r)=>{"use strict"
299var n=r(6),i=r(11),a=r(39),s=r(53),o=r(24),l=r(94),c=r(85),u=r(87),h=r(96),d=r(47),p=r(51),f=r(37),m=r(92),g=r(95),v=s.PROPER,b=s.CONFIGURABLE,_=g.IteratorPrototype,y=g.BUGGY_SAFARI_ITERATORS,A=f("iterator"),S="keys",w="values",x="entries",P=function(){return this}
300e.exports=function(e,t,r,s,f,g,C){l(r,t,s)
301var T,E,k,R=function(e){if(e===f&&D)return D
302if(!y&&e in O)return O[e]
303switch(e){case S:case w:case x:return function(){return new r(this,e)}}return function(){return new r(this)}},F=t+" Iterator",M=!1,O=e.prototype,I=O[A]||O["@@iterator"]||f&&O[f],D=!y&&I||R(f),L="Array"==t&&O.entries||I
304if(L&&(T=c(L.call(new e)))!==Object.prototype&&T.next&&(a||c(T)===_||(u?u(T,_):o(T[A])||p(T,A,P)),h(T,F,!0,!0),a&&(m[F]=P)),v&&f==w&&I&&I.name!==w&&(!a&&b?d(O,"name",w):(M=!0,D=function(){return i(I,this)})),f)if(E={values:R(w),keys:g?D:R(S),entries:R(x)},C)for(k in E)(y||M||!(k in O))&&p(O,k,E[k])
305else n({target:t,proto:!0,forced:y||M},E)
306return a&&!C||O[A]===D||p(O,A,D,{name:f}),m[t]=D,E}},(e,t,r)=>{"use strict"
307var n=r(95).IteratorPrototype,i=r(73),a=r(14),s=r(96),o=r(92),l=function(){return this}
308e.exports=function(e,t,r,c){var u=t+" Iterator"
309return e.prototype=i(n,{next:a(+!c,r)}),s(e,u,!1,!0),o[u]=l,e}},(e,t,r)=>{"use strict"
310var n,i,a,s=r(10),o=r(24),l=r(23),c=r(73),u=r(85),h=r(51),d=r(37),p=r(39),f=d("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(i=u(u(a)))!==Object.prototype&&(n=i):m=!0),!l(n)||s((function(){var e={}
311return n[f].call(e)!==e}))?n={}:p&&(n=c(n)),o(n[f])||h(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},(e,t,r)=>{var n=r(48).f,i=r(42),a=r(37)("toStringTag")
312e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,a)&&n(e,a,{configurable:!0,value:t})}},e=>{e.exports=function(e,t){return{value:e,done:t}}},(e,t,r)=>{var n=r(83),i=r(51),a=r(99)
313n||i(Object.prototype,"toString",a,{unsafe:!0})},(e,t,r)=>{"use strict"
314var n=r(83),i=r(82)
315e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},(e,t,r)=>{r(101)},(e,t,r)=>{"use strict"
316r(102)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(120))},(e,t,r)=>{"use strict"
317var n=r(6),i=r(7),a=r(17),s=r(71),o=r(51),l=r(103),c=r(110),u=r(117),h=r(24),d=r(20),p=r(23),f=r(10),m=r(118),g=r(96),v=r(119)
318e.exports=function(e,t,r){var b=-1!==e.indexOf("Map"),_=-1!==e.indexOf("Weak"),y=b?"set":"add",A=i[e],S=A&&A.prototype,w=A,x={},P=function(e){var t=a(S[e])
319o(S,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(_&&!p(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return _&&!p(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(_&&!p(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})}
320if(s(e,!h(A)||!(_||S.forEach&&!f((function(){(new A).entries().next()})))))w=r.getConstructor(t,e,b,y),l.enable()
321else if(s(e,!0)){var C=new w,T=C[y](_?{}:-0,1)!=C,E=f((function(){C.has(1)})),k=m((function(e){new A(e)})),R=!_&&f((function(){for(var e=new A,t=5;t--;)e[y](t,t)
322return!e.has(-0)}))
323k||((w=t((function(e,t){u(e,S)
324var r=v(new A,e,w)
325return d(t)||c(t,r[y],{that:r,AS_ENTRIES:b}),r}))).prototype=S,S.constructor=w),(E||R)&&(P("delete"),P("has"),b&&P("get")),(R||T)&&P(y),_&&S.clear&&delete S.clear}return x[e]=w,n({global:!0,constructor:!0,forced:w!=A},x),g(w,e),_||r.setStrong(w,e,b),w}},(e,t,r)=>{var n=r(6),i=r(17),a=r(58),s=r(23),o=r(42),l=r(48).f,c=r(61),u=r(104),h=r(107),d=r(44),p=r(109),f=!1,m=d("meta"),g=0,v=function(e){l(e,m,{value:{objectID:"O"+g++,weakData:{}}})},b=e.exports={enable:function(){b.enable=function(){},f=!0
326var e=c.f,t=i([].splice),r={}
327r[m]=1,e(r).length&&(c.f=function(r){for(var n=e(r),i=0,a=n.length;i<a;i++)if(n[i]===m){t(n,i,1)
328break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},fastKey:function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e
329if(!o(e,m)){if(!h(e))return"F"
330if(!t)return"E"
331v(e)}return e[m].objectID},getWeakData:function(e,t){if(!o(e,m)){if(!h(e))return!0
332if(!t)return!1
333v(e)}return e[m].weakData},onFreeze:function(e){return p&&f&&h(e)&&!o(e,m)&&v(e),e}}
334a[m]=!0},(e,t,r)=>{var n=r(18),i=r(15),a=r(61).f,s=r(105),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[]
335e.exports.f=function(e){return o&&"Window"==n(e)?function(e){try{return a(e)}catch(e){return s(o)}}(e):a(i(e))}},(e,t,r)=>{var n=r(64),i=r(67),a=r(106),s=Array,o=Math.max
336e.exports=function(e,t,r){for(var l=i(e),c=n(t,l),u=n(void 0===r?l:r,l),h=s(o(u-c,0)),d=0;c<u;c++,d++)a(h,d,e[c])
337return h.length=d,h}},(e,t,r)=>{"use strict"
338var n=r(21),i=r(48),a=r(14)
339e.exports=function(e,t,r){var s=n(t)
340s in e?i.f(e,s,a(0,r)):e[s]=r}},(e,t,r)=>{var n=r(10),i=r(23),a=r(18),s=r(108),o=Object.isExtensible,l=n((function(){o(1)}))
341e.exports=l||s?function(e){return!!i(e)&&(!s||"ArrayBuffer"!=a(e))&&(!o||o(e))}:o},(e,t,r)=>{var n=r(10)
342e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8)
343Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},(e,t,r)=>{var n=r(10)
344e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(e,t,r)=>{var n=r(111),i=r(11),a=r(50),s=r(35),o=r(113),l=r(67),c=r(28),u=r(114),h=r(115),d=r(116),p=TypeError,f=function(e,t){this.stopped=e,this.result=t},m=f.prototype
345e.exports=function(e,t,r){var g,v,b,_,y,A,S,w=r&&r.that,x=!(!r||!r.AS_ENTRIES),P=!(!r||!r.IS_RECORD),C=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),E=n(t,w),k=function(e){return g&&d(g,"normal",e),new f(!0,e)},R=function(e){return x?(a(e),T?E(e[0],e[1],k):E(e[0],e[1])):T?E(e,k):E(e)}
346if(P)g=e.iterator
347else if(C)g=e
348else{if(!(v=h(e)))throw p(s(e)+" is not iterable")
349if(o(v)){for(b=0,_=l(e);_>b;b++)if((y=R(e[b]))&&c(m,y))return y
350return new f(!1)}g=u(e,v)}for(A=P?e.next:g.next;!(S=i(A,g)).done;){try{y=R(S.value)}catch(e){d(g,"throw",e)}if("object"==typeof y&&y&&c(m,y))return y}return new f(!1)}},(e,t,r)=>{var n=r(112),i=r(34),a=r(12),s=n(n.bind)
351e.exports=function(e,t){return i(e),void 0===t?e:a?s(e,t):function(){return e.apply(t,arguments)}}},(e,t,r)=>{var n=r(18),i=r(17)
352e.exports=function(e){if("Function"===n(e))return i(e)}},(e,t,r)=>{var n=r(37),i=r(92),a=n("iterator"),s=Array.prototype
353e.exports=function(e){return void 0!==e&&(i.Array===e||s[a]===e)}},(e,t,r)=>{var n=r(11),i=r(34),a=r(50),s=r(35),o=r(115),l=TypeError
354e.exports=function(e,t){var r=arguments.length<2?o(e):t
355if(i(r))return a(n(r,e))
356throw l(s(e)+" is not iterable")}},(e,t,r)=>
356{var n=r(82),i=r(33),a=r(20),s=r(92),o=r(37)("iterator")
357e.exports=function(e){if(!a(e))return i(e,o)||i(e,"@@iterator")||s[n(e)]}},(e,t,r)=>{var n=r(11),i=r(50),a=r(33)
358e.exports=function(e,t,r){var s,o
359i(e)
360try{if(!(s=a(e,"return"))){if("throw"===t)throw r
361return r}s=n(s,e)}catch(e){o=!0,s=e}if("throw"===t)throw r
362if(o)throw s
363return i(s),r}},(e,t,r)=>{var n=r(28),i=TypeError
364e.exports=function(e,t){if(n(t,e))return e
365throw i("Incorrect invocation")}},(e,t,r)=>{var n=r(37)("iterator"),i=!1
366try{var a=0,s={next:function(){return{done:!!a++}},return:function(){i=!0}}
367s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1
368var r=!1
369try{var a={}
370a[n]=function(){return{next:function(){return{done:r=!0}}}},e(a)}catch(e){}return r}},(e,t,r)=>{var n=r(24),i=r(23),a=r(87)
371e.exports=function(e,t,r){var s,o
372return a&&n(s=t.constructor)&&s!==r&&i(o=s.prototype)&&o!==r.prototype&&a(e,o),e}},(e,t,r)=>{"use strict"
373var n=r(73),i=r(84),a=r(121),s=r(111),o=r(117),l=r(20),c=r(110),u=r(93),h=r(97),d=r(122),p=r(9),f=r(103).fastKey,m=r(55),g=m.set,v=m.getterFor
374e.exports={getConstructor:function(e,t,r,u){var h=e((function(e,i){o(e,d),g(e,{type:t,index:n(null),first:void 0,last:void 0,size:0}),p||(e.size=0),l(i)||c(i,e[u],{that:e,AS_ENTRIES:r})})),d=h.prototype,m=v(t),b=function(e,t,r){var n,i,a=m(e),s=_(e,t)
375return s?s.value=r:(a.last=s={index:i=f(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),p?a.size++:e.size++,"F"!==i&&(a.index[i]=s)),e},_=function(e,t){var r,n=m(e),i=f(t)
376if("F"!==i)return n.index[i]
377for(r=n.first;r;r=r.next)if(r.key==t)return r}
378return a(d,{clear:function(){for(var e=m(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next
379e.first=e.last=void 0,p?e.size=0:this.size=0},delete:function(e){var t=this,r=m(t),n=_(t,e)
380if(n){var i=n.next,a=n.previous
381delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),p?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=m(this),n=s(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!_(this,e)}}),a(d,r?{get:function(e){var t=_(this,e)
382return t&&t.value},set:function(e,t){return b(this,0===e?0:e,t)}}:{add:function(e){return b(this,e=0===e?0:e,e)}}),p&&i(d,"size",{configurable:!0,get:function(){return m(this).size}}),h},setStrong:function(e,t,r){var n=t+" Iterator",i=v(t),a=v(n)
383u(e,t,(function(e,t){g(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous
384return e.target&&(e.last=r=r?r.next:e.state.first)?h("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,h(void 0,!0))}),r?"entries":"values",!r,!0),d(t)}}},(e,t,r)=>{var n=r(51)
385e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r)
386return e}},(e,t,r)=>{"use strict"
387var n=r(27),i=r(84),a=r(37),s=r(9),o=a("species")
388e.exports=function(e){var t=n(e)
389s&&t&&!t[o]&&i(t,o,{configurable:!0,get:function(){return this}})}},(e,t,r)=>{r(124)},(e,t,r)=>{"use strict"
390r(102)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(120))},(e,t,r)=>{var n,i=r(39),a=r(6),s=r(7),o=r(27),l=r(17),c=r(10),u=r(44),h=r(24),d=r(126),p=r(20),f=r(23),m=r(26),g=r(110),v=r(50),b=r(82),_=r(42),y=r(106),A=r(47),S=r(67),w=r(127),x=r(128),P=r(130),C=r(131),T=r(132),E=r(133),k=s.Object,R=s.Array,F=s.Date,M=s.Error,O=s.EvalError,I=s.RangeError,D=s.ReferenceError,L=s.SyntaxError,j=s.TypeError,N=s.URIError,W=s.PerformanceMark,B=s.WebAssembly,q=B&&B.CompileError||M,G=B&&B.LinkError||M,U=B&&B.RuntimeError||M,z=o("DOMException"),H=P.Map,V=P.has,X=P.get,$=P.set,Y=C.Set,K=C.add,Q=o("Object","keys"),J=l([].push),Z=l((!0).valueOf),ee=l(1..valueOf),te=l("".valueOf),re=l(F.prototype.getTime),ne=u("structuredClone"),ie="DataCloneError",ae="Transferring",se=function(e){return!c((function(){var t=new s.Set([7]),r=e(t),n=e(k(7))
391return r==t||!r.has(7)||"object"!=typeof n||7!=n}))&&e},oe=function(e,t){return!c((function(){var r=new t,n=e({a:r,b:r})
392return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===r.stack)}))},le=s.structuredClone,ce=i||!oe(le,M)||!oe(le,z)||(n=le,!!c((function(){var e=n(new s.AggregateError([1],ne,{cause:3}))
393return"AggregateError"!=e.name||1!=e.errors[0]||e.message!=ne||3!=e.cause}))),ue=!le&&se((function(e){return new W(ne,{detail:e}).detail})),he=se(le)||ue,de=function(e){throw new z("Uncloneable type: "+e,ie)},pe=function(e,t){throw new z((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",ie)},fe=function(e,t){if(m(e)&&de("Symbol"),!f(e))return e
394if(t){if(V(t,e))return X(t,e)}else t=new H
395var r,n,i,a,l,c,u,d,p,g,v,w=b(e),P=!1
396switch(w){case"Array":i=R(S(e)),P=!0
397break
398case"Object":i={},P=!0
399break
400case"Map":i=new H,P=!0
401break
402case"Set":i=new Y,P=!0
403break
404case"RegExp":i=new RegExp(e.source,x(e))
405break
406case"Error":switch(n=e.name){case"AggregateError":i=o("AggregateError")([])
407break
408case"EvalError":i=O()
409break
410case"RangeError":i=I()
411break
412case"ReferenceError":i=D()
413break
414case"SyntaxError":i=L()
415break
416case"TypeError":i=j()
417break
418case"URIError":i=N()
419break
420case"CompileError":i=q()
421break
422case"LinkError":i=G()
423break
424case"RuntimeError":i=U()
425break
426default:i=M()}P=!0
427break
428case"DOMException":i=new z(e.message,e.name),P=!0
429break
430case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":r=s[w],f(r)||pe(w),i=new r(fe(e.buffer,t),e.byteOffset,"DataView"===w?e.byteLength:e.length)
431break
432case"DOMQuad":try{i=new DOMQuad(fe(e.p1,t),fe(e.p2,t),fe(e.p3,t),fe(e.p4,t))}catch(t){he?i=he(e):pe(w)}break
433case"FileList":if(a=function(){var e
434try{e=new s.DataTransfer}catch(t){try{e=new s.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null}()){for(l=0,c=S(e);l<c;l++)a.items.add(fe(e[l],t))
435i=a.files}else he?i=he(e):pe(w)
436break
437case"ImageData":try{i=new ImageData(fe(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch(t){he?i=he(e):pe(w)}break
438default:if(he)i=he(e)
439else switch(w){case"BigInt":i=k(e.valueOf())
440break
441case"Boolean":i=k(Z(e))
442break
443case"Number":i=k(ee(e))
444break
445case"String":i=k(te(e))
446break
447case"Date":i=new F(re(e))
448break
449case"ArrayBuffer":(r=s.DataView)||"function"==typeof e.slice||pe(w)
450try{if("function"!=typeof e.slice||e.resizable){c=e.byteLength,v="maxByteLength"in e?{maxByteLength:e.maxByteLength}:void 0,i=new ArrayBuffer(c,v),p=new r(e),g=new r(i)
451for(l=0;l<c;l++)g.setUint8(l,p.getUint8(l))}else i=e.slice(0)}catch(e){throw new z("ArrayBuffer is detached",ie)}break
452case"SharedArrayBuffer":i=e
453break
454case"Blob":try{i=e.slice(0,e.size,e.type)}catch(e){pe(w)}break
455case"DOMPoint":case"DOMPointReadOnly":r=s[w]
456try{i=r.fromPoint?r.fromPoint(e):new r(e.x,e.y,e.z,e.w)}catch(e){pe(w)}break
457case"DOMRect":case"DOMRectReadOnly":r=s[w]
458try{i=r.fromRect?r.fromRect(e):new r(e.x,e.y,e.width,e.height)}catch(e){pe(w)}break
459case"DOMMatrix":case"DOMMatrixReadOnly":r=s[w]
460try{i=r.fromMatrix?r.fromMatrix(e):new r(e)}catch(e){pe(w)}break
461case"AudioData":case"VideoFrame":h(e.clone)||pe(w)
462try{i=e.clone()}catch(e){de(w)}break
463case"File":try{i=new File([e],e.name,e)}catch(e){pe(w)}break
464case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":pe(w)
465default:de(w)}}if($(t,e,i),P)switch(w){case"Array":case"Object":for(u=Q(e),l=0,c=S(u);l<c;l++)d=u[l],y(i,d,fe(e[d],t))
466break
467case"Map":e.forEach((function(e,r){$(i,fe(r,t),fe(e,t))}))
468break
469case"Set":e.forEach((function(e){K(i,fe(e,t))}))
470break
471case"Error":A(i,"message",fe(e.message,t)),_(e,"cause")&&A(i,"cause",fe(e.cause,t)),"AggregateError"==n&&(i.errors=fe(e.errors,t))
472case"DOMException":T&&A(i,"stack",fe(e.stack,t))}return i}
473a({global:!0,enumerable:!0,sham:!E,forced:ce},{structuredClone:function(e){var t,r=w(arguments.length,1)>1&&!p(arguments[1])?v(arguments[1]):void 0,n=r?r.transfer:void 0
474return void 0!==n&&function(e,t){if(!f(e))throw j("Transfer option cannot be converted to a sequence")
475var r=[]
476g(e,(function(e){J(r,v(e))}))
477var n,i,a,o,l,c,u=0,p=S(r)
478if(E)for(o=le(r,{transfer:r});u<p;)$(t,r[u],o[u++])
479else for(;u<p;){if(n=r[u++],V(t,n))throw new z("Duplicate transferable",ie)
480switch(i=b(n)){case"ImageBitmap":a=s.OffscreenCanvas,d(a)||pe(i,ae)
481try{(c=new a(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),l=c.transferToImageBitmap()}catch(e){}break
482case"AudioData":case"VideoFrame":h(n.clone)&&h(n.close)||pe(i,ae)
483try{l=n.clone(),n.close()}catch(e){}break
484case"ArrayBuffer":h(n.transfer)||pe(i,ae),l=n.transfer()
485break
486case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":pe(i,ae)}if(void 0===l)throw new z("This object cannot be transferred: "+i,ie)
487$(t,n,l)}}(n,t=new H),fe(e,t)}})},(e,t,r)=>{var n=r(17),i=r(10),a=r(24),s=r(82),o=r(27),l=r(54),c=function(){},u=[],h=o("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=n(d.exec),f=!d.exec(c),m=function(e){if(!a(e))return!1
488try{return h(c,u,e),!0}catch(e){return!1}},g=function(e){if(!a(e))return!1
489switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!p(d,l(e))}catch(e){return!0}}
490g.sham=!0,e.exports=!h||i((function(){var e
491return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?g:m},e=>{var t=TypeError
492e.exports=function(e,r){if(e<r)throw t("Not enough arguments")
493return e}},(e,t,r)=>{var n=r(11),i=r(42),a=r(28),s=r(129),o=RegExp.prototype
494e.exports=function(e){var t=e.flags
495return void 0!==t||"flags"in o||i(e,"flags")||!a(o,e)?t:n(s,e)}},(e,t,r)=>{"use strict"
496var n=r(50)
497e.exports=function(){var e=n(this),t=""
498return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},(e,t,r)=>{var n=r(17),i=Map.prototype
499e.exports={Map:Map,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete),proto:i}},(e,t,r)=>{var n=r(17),i=Set.prototype
500e.exports={Set:Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},(e,t,r)=>{var n=r(10),i=r(14)
501e.exports=!n((function(){var e=Error("a")
502return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},(e,t,r)=>{var n=r(7),i=r(10),a=r(31),s=r(134),o=r(135),l=r(136),c=n.structuredClone
503e.exports=!!c&&!i((function(){if(o&&a>92||l&&a>94||s&&a>97)return!1
504var e=new ArrayBuffer(8),t=c(e,{transfer:[e]})
505return 0!=e.byteLength||8!=t.byteLength}))},(e,t,r)=>{var n=r(135),i=r(136)
506e.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(e,t,r)=>{var n=r(18)
507e.exports="undefined"!=typeof process&&"process"==n(process)},(e,t,r)=>{var n=r(7)
508e.exports=n},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{"use strict"
509Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=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,exports.getDocument=getDocument,exports.version=void 0
510var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(139),_display_utils=__w_pdfjs_require__(142),_font_loader=__w_pdfjs_require__(145),_canvas=__w_pdfjs_require__(146),_worker_options=__w_pdfjs_require__(149),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(150),_metadata=__w_pdfjs_require__(151),_optional_content_config=__w_pdfjs_require__(152),_transport_stream=__w_pdfjs_require__(153),_xfa_text=__w_pdfjs_require__(154)
511function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _classPrivateMethodGet(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
512return r}function _classPrivateFieldSet(e,t,r){return _classApplyDescriptorSet(e,_classExtractFieldDescriptor(e,t,"set"),r),r}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
513return t.get(e)}function _classApplyDescriptorSet(e,t,r){if(t.set)t.set.call(e,r)
514else{if(!t.writable)throw new TypeError("attempted to set read only private field")
515t.value=r}}const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3
516let DefaultCanvasFactory=_display_utils.DOMCanvasFactory
517exports.DefaultCanvasFactory=DefaultCanvasFactory
518let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory
519exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory
520let DefaultFilterFactory=_display_utils.DOMFilterFactory
521exports.DefaultFilterFactory=DefaultFilterFactory
522let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream
523if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:e,No
523deCMapReaderFactory:t,NodeFilterFactory:r,NodeStandardFontDataFactory:n}=__w_pdfjs_require__(155)
524exports.DefaultCanvasFactory=DefaultCanvasFactory=e,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=t,exports.DefaultFilterFactory=DefaultFilterFactory=r,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=n}if(_is_node.isNodeJS){const{PDFNodeStream:e}=__w_pdfjs_require__(156)
525createPDFNetworkStream=t=>new e(t)}else{const{PDFNetworkStream:e}=__w_pdfjs_require__(159),{PDFFetchStream:t}=__w_pdfjs_require__(160)
526createPDFNetworkStream=r=>(0,_display_utils.isValidFetchUrl)(r.url)?new t(r):new e(r)}function getDocument(e){if("string"==typeof e||e instanceof URL?e={url:e}:(0,_util.isArrayBuffer)(e)&&(e={data:e}),"object"!=typeof e)throw new Error("Invalid parameter in getDocument, need parameter object.")
527if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url")
528const t=new PDFDocumentLoadingTask,{docId:r}=t,n=e.url?getUrlProp(e.url):null,i=e.data?getDataProp(e.data):null,a=e.httpHeaders||null,s=!0===e.withCredentials,o=e.password??null,l=e.range instanceof PDFDataRangeTransport?e.range:null,c=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE
529let u=e.worker instanceof PDFWorker?e.worker:null
530const h=e.verbosity,d="string"!=typeof e.docBaseUrl||(0,_display_utils.isDataScheme)(e.docBaseUrl)?null:e.docBaseUrl,p="string"==typeof e.cMapUrl?e.cMapUrl:null,f=!1!==e.cMapPacked,m=e.CMapReaderFactory||DefaultCMapReaderFactory,g="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,v=e.StandardFontDataFactory||DefaultStandardFontDataFactory,b=!0!==e.stopAtErrors,_=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,y=!1!==e.isEvalSupported,A="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!_is_node.isNodeJS,S=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,w="boolean"==typeof e.disableFontFace?e.disableFontFace:_is_node.isNodeJS,x=!0===e.fontExtraProperties,P=!0===e.enableXfa,C=e.ownerDocument||globalThis.document,T=!0===e.disableRange,E=!0===e.disableStream,k=!0===e.disableAutoFetch,R=!0===e.pdfBug,F=l?l.length:e.length??NaN,M="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!_is_node.isNodeJS&&!w,O="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:m===_display_utils.DOMCMapReaderFactory&&v===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(p,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(g,document.baseURI),I=e.canvasFactory||new DefaultCanvasFactory({ownerDocument:C}),D=e.filterFactory||new DefaultFilterFactory({docId:r,ownerDocument:C});(0,_util.setVerbosityLevel)(h)
531const L={canvasFactory:I,filterFactory:D}
532if(O||(L.cMapReaderFactory=new m({baseUrl:p,isCompressed:f}),L.standardFontDataFactory=new v({baseUrl:g})),!u){const e={verbosity:h,port:_worker_options.GlobalWorkerOptions.workerPort}
533u=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=u}const j={docId:r,apiVersion:"3.6.172",data:i,password:o,disableAutoFetch:k,rangeChunkSize:c,length:F,docBaseUrl:d,enableXfa:P,evaluatorOptions:{maxImageSize:_,disableFontFace:w,ignoreErrors:b,isEvalSupported:y,isOffscreenCanvasSupported:A,canvasMaxAreaInBytes:S,fontExtraProperties:x,useSystemFonts:M,cMapUrl:O?p:null,standardFontDataUrl:O?g:null}},N={ignoreErrors:b,isEvalSupported:y,disableFontFace:w,fontExtraProperties:x,enableXfa:P,ownerDocument:C,disableAutoFetch:k,pdfBug:R,styleElement:null}
534return u.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted")
535const e=_fetchDocument(u,j),o=new Promise((function(e){let t
536l?t=new _transport_stream.PDFDataTransportStream({length:F,initialData:l.initialData,progressiveDone:l.progressiveDone,contentDispositionFilename:l.contentDispositionFilename,disableRange:T,disableStream:E},l):i||(t=createPDFNetworkStream({url:n,length:F,httpHeaders:a,withCredentials:s,rangeChunkSize:c,disableRange:T,disableStream:E})),e(t)}))
537return Promise.all([e,o]).then((function(e){let[n,i]=e
538if(t.destroyed)throw new Error("Loading aborted")
539const a=new _message_handler.MessageHandler(r,n,u.port),s=new WorkerTransport(a,t,i,N,L)
540t._transport=s,a.send("Ready",null)}))})).catch(t._capability.reject),t}async function _fetchDocument(e,t){if(e.destroyed)throw new Error("Worker was destroyed")
541const r=await e.messageHandler.sendWithPromise("GetDocRequest",t,t.data?[t.data.buffer]:null)
542if(e.destroyed)throw new Error("Worker was destroyed")
543return r}function getUrlProp(e){if(e instanceof URL)return e.href
544try{return new URL(e,window.location).href}catch(t){if(_is_node.isNodeJS&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(e){if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&e instanceof Buffer)return(0,_display_utils.deprecated)("Please provide binary data as `Uint8Array`, rather than `Buffer`."),new Uint8Array(e)
545if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e
546if("string"==typeof e)return(0,_util.stringToBytes)(e)
547if("object"==typeof e&&!isNaN(null==e?void 0:e.length)||(0,_util.isArrayBuffer)(e))return new Uint8Array(e)
548throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}class PDFDocumentLoadingTask{constructor(){var e,t
549this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d"+(_classStaticPrivateFieldSpecSet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_e,(e=_classStaticPrivateFieldSpecGet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_e),t=e++,e)),t),this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e
550this.destroyed=!0,await(null===(e=this._transport)||void 0===e?void 0:e.destroy()),this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}var _e={writable:!0,value:0}
551exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask
552class PDFDataRangeTransport{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null
553this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const r of this._progressListeners)r(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport
554class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t}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(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}
554getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}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()}getJavaScript(){return this._transport.getJavaScript()}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 e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
555return this._transport.startCleanup(e||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
556var _delayedCleanupTimeout=new WeakMap,_pendingCleanup=new WeakMap,_tryCleanup=new WeakSet,_abortDelayedCleanup=new WeakSet
557class PDFPageProxy{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]
558_classPrivateMethodInitSpec(this,_abortDelayedCleanup),_classPrivateMethodInitSpec(this,_tryCleanup),_classPrivateFieldInitSpec(this,_delayedCleanupTimeout,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_pendingCleanup,{writable:!0,value:!1}),this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=n?new _display_utils.StatTimer:null,this._pdfBug=n,this.commonObjs=r.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:e,rotation:t=this.rotate,offsetX:r=0,offsetY:n=0,dontFlip:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
559return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:n,dontFlip:i})}getAnnotations(){let{intent:e="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
560const t=this._transport.getRenderingIntent(e)
561return this._transport.getAnnotations(this._pageIndex,t.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e
562return(null===(e=this._transport._htmlForXfa)||void 0===e?void 0:e.children[this._pageIndex])||null}render(e){var t,r
563let{canvasContext:n,viewport:i,intent:a="display",annotationMode:s=_util.AnnotationMode.ENABLE,transform:o=null,background:l=null,optionalContentConfigPromise:c=null,annotationCanvasMap:u=null,pageColors:h=null,printAnnotationStorage:d=null}=e
564if(null!==(t=arguments[0])&&void 0!==t&&t.canvasFactory)throw new Error("render no longer accepts the `canvasFactory`-option, please pass it to the `getDocument`-function instead.")
565null===(r=this._stats)||void 0===r||r.time("Overall")
566const p=this._transport.getRenderingIntent(a,s,d)
567_classPrivateFieldSet(this,_pendingCleanup,!1),_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),c||(c=this._transport.getOptionalContentConfig())
568let f=this._intentStates.get(p.cacheKey)
569f||(f=Object.create(null),this._intentStates.set(p.cacheKey,f)),f.streamReaderCancelTimeout&&(clearTimeout(f.streamReaderCancelTimeout),f.streamReaderCancelTimeout=null)
570const m=!!(p.renderingIntent&_util.RenderingIntentFlag.PRINT)
571var g
572f.displayReadyCapability||(f.displayReadyCapability=new _util.PromiseCapability,f.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(g=this._stats)||void 0===g||g.time("Page Request"),this._pumpOperatorList(p))
573const v=e=>{var t,r
574f.renderTasks.delete(b),(this._maybeCleanupAfterRender||m)&&_classPrivateFieldSet(this,_pendingCleanup,!0),_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!m),e?(b.capability.reject(e),this._abortOperatorList({intentState:f,reason:e instanceof Error?e:new Error(e)})):b.capability.resolve(),null===(t=this._stats)||void 0===t||t.timeEnd("Rendering"),null===(r=this._stats)||void 0===r||r.timeEnd("Overall")},b=new InternalRenderTask({callback:v,params:{canvasContext:n,viewport:i,transform:o,background:l},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:u,operatorList:f.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!m,pdfBug:this._pdfBug,page
574Colors:h});(f.renderTasks||=new Set).add(b)
575const _=b.task
576return Promise.all([f.displayReadyCapability.promise,c]).then((e=>{var t
577let[r,n]=e
578_classPrivateFieldGet(this,_pendingCleanup)?v():(null===(t=this._stats)||void 0===t||t.time("Rendering"),b.initializeGraphics({transparency:r,optionalContentConfig:n}),b.operatorListChanged())})).catch(v),_}getOperatorList(){let{intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE,printAnnotationStorage:r=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
579const n=this._transport.getRenderingIntent(e,t,r,!0)
580let i,a=this._intentStates.get(n.cacheKey)
581var s
582return a||(a=Object.create(null),this._intentStates.set(n.cacheKey,a)),a.opListReadCapability||(i=Object.create(null),i.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(i))},a.opListReadCapability=new _util.PromiseCapability,(a.renderTasks||=new Set).add(i),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(s=this._stats)||void 0===s||s.time("Page Request"),this._pumpOperatorList(n)),a.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:e=!1,disableNormalization:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
583return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
584if(this._transport._htmlForXfa)return this.getXfa().then((e=>_xfa_text.XfaText.textContent(e)))
585const t=this.streamTextContent(e)
586return new Promise((function(e,r){const n=t.getReader(),i={items:[],styles:Object.create(null)}
587!function t(){n.read().then((function(r){let{value:n,done:a}=r
588a?e(i):(Object.assign(i.styles,n.styles),i.items.push(...n.items),t())}),r)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0
589const e=[]
590for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const r of t.renderTasks)e.push(r.completed),r.cancel()
591return this.objs.clear(),_classPrivateFieldSet(this,_pendingCleanup,!1),_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),Promise.all(e)}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
592_classPrivateFieldSet(this,_pendingCleanup,!0)
593const t=_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!1)
594return e&&t&&(this._stats&&=new _display_utils.StatTimer),t}_startRenderPage(e,t){var r,n
595const i=this._intentStates.get(t)
596i&&(null===(r=this._stats)||void 0===r||r.timeEnd("Page Request"),null===(n=i.displayReadyCapability)||void 0===n||n.resolve(e))}_renderPageChunk(e,t){for(let r=0,n=e.length;r<n;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r])
597t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots
598for(const e of t.renderTasks)e.operatorListChanged()
599e.lastChunk&&_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!0)}_pumpOperatorList(e){let{renderingIntent:t,cacheKey:r,annotationStorageMap:n}=e
600const i=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:r,annotationStorage:n}).getReader(),a=this._intentStates.get(r)
601a.streamReader=i
602const s=()=>{i.read().then((e=>{let{value:t,done:r}=e
603r?a.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,a),s())}),(e=>{if(a.streamReader=null,!this._transport.destroyed){if(a.operatorList){a.operatorList.lastChunk=!0
604for(const e of a.renderTasks)e.operatorListChanged()
605_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!0)}if(a.displayReadyCapability)a.displayReadyCapability.reject(e)
606else{if(!a.opListReadCapability)throw e
607a.opListReadCapability.reject(e)}}}))}
608s()}_abortOperatorList(e){let{intentState:t,reason:r,force:n=!1}=e
609if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!n){if(t.renderTasks.size>0)return
610if(r instanceof _display_utils.RenderingCancelledException){let e=RENDERING_CANCELLED_TIMEOUT
611return r.extraDelay>0&&r.extraDelay<1e3&&(e+=r.extraDelay),void(t.streamReaderCancelTimeout=setTimeout((()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:r,force:!0})}),e))}}if(t.streamReader.cancel(new _util.AbortException(r.message)).catch((()=>{})),t.streamReader=null,!this._transport.destroyed){for(const[e,r]of this._intentStates)if(r===t){this._intentStates.delete(e)
612break}this.cleanup()}}}get stats(){return this._stats}}function _tryCleanup2(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
613if(_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),!_classPrivateFieldGet(this,_pendingCleanup))return!1
614if(e)return _classPrivateFieldSet(this,_delayedCleanupTimeout,setTimeout((()=>{_classPrivateFieldSet(this,_delayedCleanupTimeout,null),_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!1)}),DELAYED_CLEANUP_TIMEOUT)),!1
615for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1
616return this._intentStates.clear(),this.objs.clear(),_classPrivateFieldSet(this,_pendingCleanup,!1),!0}function _abortDelayedCleanup2(){_classPrivateFieldGet(this,_delayedCleanupTimeout)&&(clearTimeout(_classPrivateFieldGet(this,_delayedCleanupTimeout)),_classPrivateFieldSet(this,_delayedCleanupTimeout,null))}exports.PDFPageProxy=PDFPageProxy
617var _i=new WeakMap,_s=new WeakMap
618class LoopbackPort{constructor(){_classPrivateFieldInitSpec2(this,_i,{writable:!0,value:new Set}),_classPrivateFieldInitSpec2(this,_s,{writable:!0,value:Promise.resolve()})}postMessage(e,t){const r={data:structuredClone(e,null)}
619_classPrivateFieldGet3(this,_s).then((()=>
619{for(const e of _classPrivateFieldGet3(this,_i))e.call(this,r)}))}addEventListener(e,t){_classPrivateFieldGet3(this,_i).add(t)}removeEventListener(e,t){_classPrivateFieldGet3(this,_i).delete(t)}terminate(){_classPrivateFieldGet3(this,_i).clear()}}exports.LoopbackPort=LoopbackPort
620const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0}
621if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="https://cdn.production.dochub.com/assets/pdf.worker-55cbc2e84ad9263451dc3203ca504ae8.js"
622else if("object"==typeof document){var _document,_document$currentScri
623const e=null===(_document=document)||void 0===_document||null===(_document$currentScri=_document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src
624e&&(PDFWorkerUtil.fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(e,t){let r
625try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch(e){return!1}const n=new URL(t,r)
626return r.origin===n.origin},PDFWorkerUtil.createCDNWrapper=function(e){const t=`importScripts("${e}");`
627return URL.createObjectURL(new Blob([t]))}
628class PDFWorker{constructor(){let{name:e=null,port:t=null,verbosity:r=(0,_util.getVerbosityLevel)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
629if(t&&_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_a).has(t))throw new Error("Cannot use more than one PDFWorker per port.")
630this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,t?(_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_a).set(t,this),this._initializeFromPort(t)):this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:e}=PDFWorker
631try{PDFWorkerUtil.isSameOrigin(window.location.href,e)||(e=PDFWorkerUtil.createCDNWrapper(new URL(e,window.location).href))
632const t=new Worker(e),r=new _message_handler.MessageHandler("main","worker",t),n=()=>{t.removeEventListener("error",i),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},i=()=>{this._webWorker||n()}
633t.addEventListener("error",i),r.on("test",(e=>{t.removeEventListener("error",i),this.destroyed?n():e?(this._messageHandler=r,this._port=t,this._webWorker=t,this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),t.terminate())})),r.on("ready",(e=>{if(t.removeEventListener("error",i),this.destroyed)n()
634else try{a()}catch(e){this._setupFakeWorker()}}))
635const a=()=>{const e=new Uint8Array
636r.send("test",e,[e.buffer])}
637return void a()}catch(e){(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((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"))
638const t=new LoopbackPort
639this._port=t
640const r="fake"+PDFWorkerUtil.fakeWorkerId++,n=new _message_handler.MessageHandler(r+"_worker",r,t)
641e.setup(n,t)
642const i=new _message_handler.MessageHandler(r,r+"_worker",t)
643this._messageHandler=i,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_a).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(null==e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.")
644return _classStaticPrivateFieldSpecGet(this,PDFWorker,_a).has(e.port)?_classStaticPrivateFieldSpecGet(this,PDFWorker,_a).get(e.port):new PDFWorker(e)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc
645if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc
646throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{var e
647return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(e){return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler
648if(mainWorkerMessageHandler)return mainWorkerMessageHandler
649if(_is_node.isNodeJS){const worker=eval("require")(this.workerSrc)
650return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler}
651return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}var _a={writable:!0,value:new WeakMap}
652exports.PDFWorker=PDFWorker
653var _methodPromises=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_cacheSimpleMethod=new WeakSet
654class WorkerTransport{constructor(e,t,r,n,i){_classPrivateMethodInitSpec(this,_cacheSimpleMethod),_classPrivateFieldInitSpec(this,_methodPromises,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map}),this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:n.ownerDocument,styleElement:n.styleElement}
654),this._params=n,this.canvasFactory=i.canvasFactory,this.filterFactory=i.filterFactory,this.cMapReaderFactory=i.cMapReaderFactory,this.standardFontDataFactory=i.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=_util.RenderingIntentFlag.DISPLAY,a=null
655switch(e){case"any":i=_util.RenderingIntentFlag.ANY
656break
657case"display":break
658case"print":i=_util.RenderingIntentFlag.PRINT
659break
660default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${e}`)}switch(t){case _util.AnnotationMode.DISABLE:i+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE
661break
662case _util.AnnotationMode.ENABLE:break
663case _util.AnnotationMode.ENABLE_FORMS:i+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS
664break
665case _util.AnnotationMode.ENABLE_STORAGE:i+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,a=(i&_util.RenderingIntentFlag.PRINT&&r instanceof _annotation_storage.PrintAnnotationStorage?r:this.annotationStorage).serializable
666break
667default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${t}`)}return n&&(i+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:i,cacheKey:`${i}_${_annotation_storage.AnnotationStorage.getHash(a)}`,annotationStorageMap:a}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise
668this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"))
669const e=[]
670for(const t of _classPrivateFieldGet(this,_pageCache).values())e.push(t._destroy())
671_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified()
672const t=this.messageHandler.sendWithPromise("Terminate",null)
673return e.push(t),Promise.all(e).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),_classPrivateFieldGet(this,_methodPromises).clear(),this.filterFactory.destroy(),this._networkStream&&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:e,loadingTask:t}=this
674e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function(e){let{value:r,done:n}=e
675n?t.close():((0,_util.assert)(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(r),1,[r]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(e=>{const r=new _util.PromiseCapability,n=this._fullReader
676return n.headersReady.then((()=>{var e
677n.isStreamingSupported&&n.isRangeSupported||(this._lastProgress&&(null===(e=t.onProgress)||void 0===e||e.call(t,this._lastProgress)),n.onProgress=e=>{var r
678null===(r=t.onProgress)||void 0===r||r.call(t,{loaded:e.loaded,total:e.total})}),r.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})}),r.reject),r.promise})),e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.")
679const r=this._networkStream.getRangeReader(e.begin,e.end)
680r?(t.onPull=()=>{r.read().then((function(e){let{value:r,done:n}=e
681n?t.close():((0,_util.assert)(r instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(r),1,[r]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{r.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(e=>{let{pdfInfo:r}=e
682this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,t._capability.resolve(new PDFDocumentProxy(r,this))})),e.on("DocException",(function(e){let r
683switch(e.name){case"PasswordException":r=new _util.PasswordException(e.message,e.code)
684break
685case"InvalidPDFException":r=new _util.InvalidPDFException(e.message)
686break
687case"MissingPDFException":r=new _util.MissingPDFException(e.message)
688break
689case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(e.message,e.status)
690break
691case"UnknownErrorException":r=new _util.UnknownErrorException(e.message,e.details)
692break
693default:(0,_util.unreachable)("DocException - expected a valid Error.")}t._capability.reject(r)})),e.on("PasswordRequest",(e=>{if(this._passwordCapability=new _util.PromiseCapability,t.onPassword){const r=e=>{e instanceof Error?this._passwordCapability.reject(e):this._passwordCapability.resolve({password:e})}
694try{t.onPassword(r,e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code))
695return this._passwordCapability.promise})),e.on("DataLoaded",(e=>{var r
696null===(r=t.onProgress)||void 0===r||r.call(t,{loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{this.destroyed||_classPrivateFieldGet(this,_pageCache).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(t=>{var r
697let[n,i,a]=t
698if(!this.destroyed&&!this.commonObjs.has(n))switch(i){case"Font":const t=this._params
699if("error"in a){const e=a.error;(0,_util.warn)(`Error during font loading: ${e}`),this.commonObjs.resolve(n,e)
700break}const s=t.pdfBug&&null!==(r=globalThis.FontInspector)&&void 0!==r&&r.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,o=new _font_loader.FontFaceObject(a,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,inspectFont:s})
701this.fontLoader.bind(o).catch((t=>
701e.sendWithPromise("FontFallback",{id:n}))).finally((()=>{!t.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(n,o)}))
702break
703case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,a)
704break
705default:throw new Error(`Got unknown common object type ${i}`)}})),e.on("obj",(e=>{let[t,r,n,i]=e
706if(this.destroyed)return
707const a=_classPrivateFieldGet(this,_pageCache).get(r)
708if(!a.objs.has(t))switch(n){case"Image":if(a.objs.resolve(t,i),i){let e
709if(i.bitmap){const{width:t,height:r}=i
710e=t*r*4}else{var s
711e=(null===(s=i.data)||void 0===s?void 0:s.length)||0}e>_util.MAX_IMAGE_SIZE_TO_CACHE&&(a._maybeCleanupAfterRender=!0)}break
712case"Pattern":a.objs.resolve(t,i)
713break
714default:throw new Error(`Got unknown object type ${n}`)}})),e.on("DocProgress",(e=>{var r
715this.destroyed||null===(r=t.onProgress)||void 0===r||r.call(t,{loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),e.on("FetchStandardFontData",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var e
716return this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:(null===(e=this._fullReader)||void 0===e?void 0:e.filename)??null}).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."))
717const t=e-1,r=_classPrivateFieldGet(this,_pagePromises).get(t)
718if(r)return r
719const n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw new Error("Transport destroyed")
720const r=new PDFPageProxy(t,e,this,this._params.pdfBug)
721return _classPrivateFieldGet(this,_pageCache).set(t,r),r}))
722return _classPrivateFieldGet(this,_pagePromises).set(t,n),n}getPageIndex(e){return"object"!=typeof e||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"GetFieldObjects")}hasJSActions(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}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)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}
722getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((e=>new _optional_content_config.OptionalContentConfig(e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=_classPrivateFieldGet(this,_methodPromises).get(e)
723if(t)return t
724const r=this.messageHandler.sendWithPromise(e,null).then((e=>{var t,r
725return{info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:(null===(t=this._fullReader)||void 0===t?void 0:t.filename)??null,contentLength:(null===(r=this._fullReader)||void 0===r?void 0:r.contentLength)??null}}))
726return _classPrivateFieldGet(this,_methodPromises).set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
727if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null)
728for(const e of _classPrivateFieldGet(this,_pageCache).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`)
729this.commonObjs.clear(),e||this.fontLoader.clear(),_classPrivateFieldGet(this,_methodPromises).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:e,enableXfa:t}=this._params
730return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e,enableXfa:t})}}function _cacheSimpleMethod2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
731const r=_classPrivateFieldGet(this,_methodPromises).get(e)
732if(r)return r
733const n=this.messageHandler.sendWithPromise(e,t)
734return _classPrivateFieldGet(this,_methodPromises).set(e,n),n}var _objs=new WeakMap,_ensureObj=new WeakSet
735class PDFObjects{constructor(){_classPrivateMethodInitSpec(this,_ensureObj),_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
736if(t){const r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e)
737return r.capability.promise.then((()=>t(r.data))),null}const r=_classPrivateFieldGet(this,_objs)[e]
738if(null==r||!r.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${e}.`)
739return r.data}has(e){const t=_classPrivateFieldGet(this,_objs)[e]
740return(null==t?void 0:t.capability.settled)||!1}resolve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
741const r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e)
742r.data=t,r.capability.resolve()}clear(){for(const t in _classPrivateFieldGet(this,_objs)){var e
743const{data:r}=_classPrivateFieldGet(this,_objs)[t]
744null==r||null===(e=r.bitmap)||void 0===e||e.close()}_classPrivateFieldSet(this,_objs,Object.create(null))}}function _ensureObj2(e){return _classPrivateFieldGet(this,_objs)[e]||(_classPrivateFieldGet(this,_objs)[e]={capability:new _util.PromiseCapability,data:null})}var _r=new WeakMap
745class RenderTask{constructor(e){_classPrivateFieldInitSpec2(this,_r,{writable:!0,value:null}),_classPrivateFieldSet2(this,_r,e),this.onContinue=null}get promise(){return _classPrivateFieldGet3(this,_r).capability.promise}cancel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0
746_classPrivateFieldGet3(this,_r).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=_classPrivateFieldGet3(this,_r).operatorList
747if(!e)return!1
748const{annotationCanvasMap:t}=_classPrivateFieldGet3(this,_r)
749return e.form||e.canvas&&(null==t?void 0:t.size)>0}}exports.RenderTask=RenderTask
750class InternalRenderTask{constructor(e){let{callback:t,params:r,objs:n,commonObjs:i,annotationCanvasMap:a,operatorList:s,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:u=!1,pdfBug:h=!1,pageColors:d=null}=e
751this.callback=t,this.params=r,this.objs=n,this.commonObjs=i,this.annotationCanvasMap=a,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=h,this.pageColors=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===u&&"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=r.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics(e){var t,r
752let{transparency:n=!1,optionalContentConfig:i}=e
753if(this.cancelled)return
754if(this._canvas){if(_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_n).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.")
755_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_n).add(this._canvas)}this._pdfBug&&null!==(t=globalThis.StepperManager)&&void 0!==t&&t.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint())
756const{canvasContext:a,viewport:s,transform:o,background:l}=this.params
757this.gfx=new _canvas.CanvasGraphics(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:s,transparency:n,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,null===(r=this.graphicsReadyCallback)||void 0===r||r.call(this)}cancel(){var e
758let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0
759this.running=!1,this.cancelled=!0,null===(e=this.gfx)||void 0===e||e.endDrawing(),this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_n).delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas",r))}operatorListChanged(){var e
760this.graphicsReady?(null===(e=this.stepper)||void 0===e||e.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(this.pageColors),this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_n).delete(this._canvas),this.callback())))}}var _n={writable:!0,value:new WeakSet}
761const version="3.6.172"
762exports.version=version
763const build="4d3dfe254"
764exports.build=build},(e,t,r)=>{"use strict"
765Object.defineProperty(t,"__esModule",{value:!0}),t.PrintAnnotationStorage=t.AnnotationStorage=void 0
766var n=r(1),i=r(140),a=r(144)
767function s(e,t,r){o(e,t),t.set(e,r)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r)
768else{if(!t.writable)throw new TypeError("attempted to set read only private field")
769t.value=r}}(e,u(e,t,"set"),r),r}function c(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,u(e,t,"get"))}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
770return t.get(e)}var h=new WeakMap,d=new WeakMap,p=new WeakSet
771class f{constructor(){!function(e,t){o(e,t),t.add(e)}(this,p),s(this,h,{writable:!0,value:!1}),s(this,d,{writable:!0,value:new Map}),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const r=c(this,d).get(e)
772return void 0===r?t:Object.assign(t,r)}getRawValue(e){return c(this,d).get(e)}remove(e){if(c(this,d).delete(e),0===c(this,d).size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of c(this,d).values())if(e instanceof i.AnnotationEditor)return
773this.onAnnotationEditor(null)}}setValue(e,t){const r=c(this,d).get(e)
774let n=!1
775if(void 0!==r)for(const[e,i]of Object.entries(t))r[e]!==i&&(n=!0,r[e]=i)
776else n=!0,c(this,d).set(e,t)
777n&&function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
778return r}(this,p,m).call(this),t instanceof i.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return c(this,d).has(e)}getAll(){return c(this,d).size>0?(0,n.objectFromMap)(c(this,d)):null}setAll(e){for(const[t,r]of Object.entries(e))this.setValue(t,r)}get size(){return c(this,d).size}resetModified(){c(this,h)&&(l(this,h,!1),"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new v(this)}get serializable(){if(0===c(this,d).size)return null
779const e=new Map
780for(const[t,r]of c(this,d)){const n=r instanceof i.AnnotationEditor?r.serialize():r
781n&&e.set(t,n)}return e}static getHash(e){if(!e)return""
782const t=new a.MurmurHash3_64
783for(const[r,n]of e)t.update(`${r}:${JSON.stringify(n)}`)
784return t.hexdigest()}}function m(){c(this,h)||(l(this,h,!0),"function"==typeof this.onSetModified&&this.onSetModified())}t.AnnotationStorage=f
785var g=new WeakMap
786class v extends f{constructor(e){super(),_classPrivateFieldInitSpec2(this,g,{writable:!0,value:null}),_classPrivateFieldSet2(this,g,structuredClone(e.serializable))}get print(){(0,n.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return _classPrivateFieldGet3(this,g)}}t.PrintAnnotationStorage=v},(e,t,r)=>{"use strict"
787Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0
788var n=r(141),i=r(1),a=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap
789class h{constructor(e){_classPrivateFieldInitSpec2(this,a,{writable:!0,value:this.focusin.bind(this)}),_classPrivateFieldInitSpec2(this,s,{writable:!0,value:this.focusout.bind(this)}),_classPrivateFieldInitSpec2(this,o,{writable:!0,value:!1}),_classPrivateFieldInitSpec2(this,l,{writable:!0,value:!1}),_classPrivateFieldInitSpec2(this,c,{writable:!0,value:!1}),_defineProperty2(this,"_uiManager",null),_classPrivateFieldInitSpec2(this,u,{writable:!0,value:h._zIndex++}),this.constructor===h&&(0,i.unreachable)("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager
790const{rotation:t,rawDims:{pageWidth:r,pageHeight:n,pageX:d,pageY:p}}=this.parent.viewport
791this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,n],this.pageTranslation=[d,p]
792const[f,m]=this.parentDimensions
793this.x=e.x/f,this.y=e.y/m,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,i.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=_classPrivateFieldGet3(this,u)}setParent(e){null!==e&&(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions),this.parent=e}focusin(e){_classPrivateFieldGet3(this,o)?_classPrivateFieldSet2(this,o,!1):this.parent.setSelected(this)}focusout(e){var t
794if(!this.isAttachedToDOM)return
795const r=e.relatedTarget
796null!=r&&r.closest(`#${this.id}`)||(e.preventDefault(),null!==(t=this.parent)&&void 0!==t&&t.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}dragstart(e){const t=this.parent.div.getBoundingClientRect()
797this.startX=e.clientX-t.x,this.startY=e.clientY-t.y,e.dataTransfer.setData("text/plain",this.id),e.dataTransfer.effectAllowed="move"}setAt(e,t,r,n){const[i,a]=this.parentDimensions;[r,n]=this.screenToPageTranslation(r,n),this.x=(e+r)/i,this.y=(t+n)/a,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(e,t){const[r,n]=this.parentDimensions;[e,t]=this.screenToPageTranslation(e,t),this.x+=e/r,this.y+=t/n,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(e,t){switch(this.parentRotation){case 90:return[t,-e]
798case 180:return[-e,-t]
799case 270:return[-t,e]
800default:return[e,t]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{realScale:e}=this._uiManager.viewParameters,[t,r]=this.pageDimensions
801return[t*e,r*e]}setDims(e,t){const[r,n]=this.parentDimensions
802this.div.style.width=100*e/r+"%",this.div.style.height=100*t/n+"%"}fixDims(){const{style:e}=this.div,{height:t,width:r}=e,n=r.endsWith("%"),i=t.endsWith("%")
803if(n&&i)return
804const[a,s]=this.parentDimensions
805n||(e.width=100*parseFloat(r)/a+"%"),i||(e.height=100*parseFloat(t)/s+"%")}getInitialTranslation(){return[0,0]}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",_classPrivateFieldGet3(this,a)),this.div.addEventListener("focusout",_classPrivateFieldGet3(this,s))
806const[e,t]=this.getInitialTranslation()
807return this.translate(e,t),(0,n.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(e){const{isMac:t}=i.FeatureTest.platform
8080!==e.button||e.ctrlKey&&t?e.preventDefault():(e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this),_classPrivateFieldSet2(this,o,!0))}getRect(e,t){const r=this.parentScale,[n,i]=this.pageDimensions,[a,s]=this.pageTranslation,o=e/r,l=t/r,c=this.x*n,u=this.y*i,h=this.width*n,d=this.height*i
809switch(this.rotation){case 0:return[c+o+a,i-u-l-d+s,c+o+h+a,i-u-l+s]
810case 90:return[c+l+a,i-u+o+s,c+l+d+a,i-u+o+h+s]
811case 180:return[c-o-h+a,i-u+l+s,c-o+a,i-u+l+d+s]
812case 270:return[c-l-d+a,i-u-o-h+s,c-l+a,i-u-o+s]
813default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[r,n,i,a]=e,s=i-r,o=a-n
814switch(this.rotation){case 0:return[r,t-a,s,o]
815case 90:return[r,t-n,o,s]
816case 180:return[i,t-n,s,o]
817case 270:return[i,t-a,o,s]
818default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){_classPrivateFieldSet2(this,c,!0)}disableEditMode(){_classPrivateFieldSet2(this,c,!1)}isInEditMode(){return _classPrivateFieldGet3(this,c)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var e
819null===(e=this.div)||void 0===e||e.addEventListener("focusin",_classPrivateFieldGet3(this,a))}serialize(){(0,i.unreachable)("An editor must be serializable")}static deserialize(e,t,r){const n=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:r})
820n.rotation=e.rotation
821const[i,a]=n.pageDimensions,[s,o,l,c]=n.getRectInCurrentCoords(e.rect,a)
822return n.x=s/i,n.y=o/a,n.width=l/i,n.height=c/a,n}remove(){this.div.removeEventListener("focusin",_classPrivateFieldGet3(this,a)),this.div.removeEventListener("focusout",_classPrivateFieldGet3(this,s)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var e
823null===(e=this.div)||void 0===e||e.classList.add("selectedEditor")}unselect(){var e
824null===(e=this.div)||void 0===e||e.classList.remove("selectedEditor")}updateParams(e,t){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return _classPrivateFieldGet3(this,l)}set isEditing(e){_classPrivateFieldSet2(this,l,e),e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}}_defineProperty2(h,"_colorManager",new n.ColorManager),_defineProperty2(h,"_zIndex",1),t.AnnotationEditor=h},(e,t,r)=>{"use strict"
825Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=function(e,t,r){for(const n of r)t.addEventListener(n,e[n].bind(e))},t.opacityToHex=function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")}
826var n=r(1),i=r(142)
827function a(e,t,r){u(e,t),t.set(e,r)}function s(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r)
828else{if(!t.writable)throw new TypeError("attempted to set read only private field")
829t.value=r}}(e,l(e,t,"set"),r),r}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
830return t.get(e)}function c(e,t){u(e,t),t.add(e)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
831return r}var d=new WeakMap
832class p{constructor(){_classPrivateFieldInitSpec2(this,d,{writable:!0,value:0})}getId(){var e,t
833return`${n.AnnotationEditorPrefix}${_classPrivateFieldSet2(this,d,(e=_classPrivateFieldGet3(this,d),t=e++,e)),t}`}}var f=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap
834class b{constructor(){_classPrivateFieldInitSpec2(this,f,{writable:!0,value:[]}),_classPrivateFieldInitSpec2(this,m,{writable:!0,value:!1}),_classPrivateFieldInitSpec2(this,g,{writable:!0,value:void 0}),_classPrivateFieldInitSpec2(this,v,{writable:!0,value:-1}),_classPrivateFieldSet2(this,g,arguments.length>0&&void 0!==arguments[0]?arguments[0]:128)}add(e){let{cmd:t,undo:r,mustExec:n,type:i=NaN,overwriteIfSameType:a=!1,keepUndo:s=!1}=e
835if(n&&t(),_classPrivateFieldGet3(this,m))return
836const o={cmd:t,undo:r,type:i}
837if(-1===_classPrivateFieldGet3(this,v))return _classPrivateFieldGet3(this,f).length>0&&(_classPrivateFieldGet3(this,f).length=0),_classPrivateFieldSet2(this,v,0),void _classPrivateFieldGet3(this,f).push(o)
838if(a&&_classPrivateFieldGet3(this,f)[_classPrivateFieldGet3(this,v)].type===i)return s&&(o.undo=_classPrivateFieldGet3(this,f)[_classPrivateFieldGet3(this,v)].undo),void(_classPrivateFieldGet3(this,f)[_classPrivateFieldGet3(this,v)]=o)
839const l=_classPrivateFieldGet3(this,v)+1
840l===_classPrivateFieldGet3(this,g)?_classPrivateFieldGet3(this,f).splice(0,1):(_classPrivateFieldSet2(this,v,l),l<_classPrivateFieldGet3(this,f).length&&_classPrivateFieldGet3(this,f).splice(l)),_classPrivateFieldGet3(this,f).push(o)}undo(){-1!==_classPrivateFieldGet3(this,v)&&(_classPrivateFieldSet2(this,m,!0),_classPrivateFieldGet3(this,f)[_classPrivateFieldGet3(this,v)].undo(),_classPrivateFieldSet2(this,m,!1),_classPrivateFieldSet2(this,v,_classPrivateFieldGet3(this,v)-1))}redo(){_classPrivateFieldGet3(this,v)<_classPrivateFieldGet3(this,f).length-1&&(_classPrivateFieldSet2(this,v,_classPrivateFieldGet3(this,v)+1),_classPrivateFieldSet2(this,m,!0),_classPrivateFieldGet3(this,f)[_classPrivateFieldGet3(this,v)].cmd(),_classPrivateFieldSet2(this,m,!1))}hasSomethingToUndo(){return-1!==_classPrivateFieldGet3(this,v)}hasSomethingToRedo(){return _classPrivateFieldGet3(this,v)<_classPrivateFieldGet3(this,f).length-1}destroy(){_classPrivateFieldSet2(this,f,null)}}t.CommandManager=b
841var _=new WeakSet
842class y{constructor(e){c(this,_),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set
843const{isMac:t}=n.FeatureTest.platform
844for(const[r,n]of e)for(const e of r){const r=e.startsWith("mac+")
845t&&r?(this.callbacks.set(e.slice(4),n),this.allKeys.add(e.split("+").at(-1))):t||r||(this.callbacks.set(e,n),this.allKeys.add(e.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return
846const r=this.callbacks.get(h(this,_,A).call(this,t))
847r&&(r.bind(e)(),t.stopPropagation(),t.preventDefault())}}function A(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key)
848const t=this.buffer.join("+")
849return this.buffer.length=0,t}t.KeyboardManager=y
850class S{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]])
851return(0,i.getColorValues)(e),(0,n.shadow)(this,"_colors",e)}convert(e){const t=(0,i.getRGB)(e)
852if(!window.matchMedia("(forced-colors: active)").matches)return t
853for(const[e,r]of this._colors)if(r.every(((e,r)=>e===t[r])))return S._colorsMapping.get(e)
854return t}getHexCode(e){const t=this._colors.get(e)
855return t?n.Util.makeHexColor(...t):e}}_defineProperty2(S,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),t.ColorManager=S
856var w=new WeakMap,x=new WeakMap,P=new WeakMap,C=new WeakMap,T=new WeakMap,E=new WeakMap,k=new WeakMap,R=new WeakMap,F=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,D=new WeakMap,L=new WeakMap,j=new WeakMap,N=new WeakMap,W=new WeakMap,B=new WeakMap,q=new WeakMap,G=new WeakMap,U=new WeakMap,z=new WeakMap,H=new WeakMap,V=new WeakSet,X=new WeakSet,$=new WeakSet,Y=new WeakSet,K=new WeakSet,Q=new WeakSet,J=new WeakSet,Z=new WeakSet,ee=new WeakSet,te=new WeakSet,re=new WeakSet
857class ne{constructor(e,t,r){c(this,re),c(this,te),c(this,ee),c(this,Z),c(this,J),c(this,Q),c(this,K),c(this,Y),c(this,$),c(this,X),c(this,V),a(this,w,{writable:!0,value:null}),a(this,x,{writable:!0,value:new Map}),a(this,P,{writable:!0,value:new Map}),a(this,C,{writable:!0,value:null}),a(this,T,{writable:!0,value:new b}),a(this,E,{writable:!0,value:0}),a(this,k,{writable:!0,value:null}),a(this,R,{writable:!0,value:new Set}),a(this,F,{writable:!0,value:null}),a(this,M,{writable:!0,value:new p}),a(this,O,{writable:!0,value:!1}),a(this,I,{writable:!0,value:n.AnnotationEditorType.NONE}),a(this,D,{writable:!0,value:new Set}),a(this,L,{writable:!0,value:this.copy.bind(this)}),a(this,j,{writable:!0,value:this.cut.bind(this)}),a(this,N,{writable:!0,value:this.paste.bind(this)}),a(this,W,{writable:!0,value:this.keydown.bind(this)}),a(this,B,{writable:!0,value:this.onEditingAction.bind(this)}),a(this,q,{writable:!0,value:this.onPageChanging.bind(this)}),a(this,G,{writable:!0,value:this.onScaleChanging.bind(this)}),a(this,U,{writable:!0,value:this.onRotationChanging.bind(this)}),a(this,z,{writable:!0,value:{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}}),a(this,H,{writable:!0,value:null}),o(this,H,e),o(this,F,t),s(this,F)._on("editingaction",s(this,B)),s(this,F)._on("pagechanging",s(this,q)),s(this,F)._on("scalechanging",s(this,G)),s(this,F)._on("rotationchanging",s(this,U)),o(this,C,r),this.viewParameters={realScale:i.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){h(this,X,ae).call(this),s(this,F)._off("editingaction",s(this,B)),s(this,F)._off("pagechanging",s(this,q)),s(this,F)._off("scalechanging",s(this,G)),s(this,F)._off("rotationchanging",s(this,U))
858for(const e of s(this,P).values())e.destroy()
859s(this,P).clear(),s(this,x).clear(),s(this,R).clear(),o(this,w,null),s(this,D).clear(),s(this,T).destroy()}onPageChanging(e){let{pageNumber:t}=e
860o(this,E,t-1)}focusMainContainer(){s(this,H).focus()}addShouldRescale(e){s(this,R).add(e)}removeShouldRescale(e){s(this,R).delete(e)}onScaleChanging(e){let{scale:t}=e
861this.commitOrRemove(),this.viewParameters.realScale=t*i.PixelsPerInch.PDF_TO_CSS_UNITS
862for(const e of s(this,R))e.onScaleChanging()}onRotationChanging(e){let{pagesRotation:t}=e
863this.commitOrRemove(),this.viewParameters.rotation=t}addToAnnotationStorage(e){e.isEmpty()||!s(this,C)||s(this,C).has(e.id)||s(this,C).setValue(e.id,e)}copy(e){if(e.preventDefault(),s(this,w)&&s(this,w).commitOrRemove(),!this.hasSelection)return
864const t=[]
865for(const e of s(this,D))e.isEmpty()||t.push(e.serialize())
8660!==t.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault()
867let t=e.clipboardData.getData("application/pdfjs")
868if(!t)return
869try{t=JSON.parse(t)}catch(e){return void(0,n.warn)(`paste: "${e.message}".`)}if(!Array.isArray(t))return
870this.unselectAll()
871const r=s(this,P).get(s(this,E))
872try{const e=[]
873for(const n of t){const t=r.deserialize(n)
874if(!t)return
875e.push(t)}const n=()=>{for(const t of e)h(this,ee,de).call(this,t)
876h(this,re,fe).call(this,e)},i=()=>{for(const t of e)t.remove()}
877this.addCommands({cmd:n,undo:i,mustExec:!0})}catch(e){(0,n.warn)(`paste: "${e.message}".`)}}keydown(e){var t
878null!==(t=this.getActive())&&void 0!==t&&t.shouldGetKeyboardEvents()||ne._keyboardManager.exec(this,e)}onEditingAction(e){["undo","redo","delete","selectAll"].includes(e.name)&&this[e.name]()}setEditingState(e){e?(h(this,V,ie).call(this),h(this,$,se).call(this),h(this,K,le).call(this,{isEditing:s(this,I)!==n.AnnotationEditorType.NONE,isEmpty:h(this,te,pe).call(this),hasSomethingToUndo:s(this,T).hasSomethingToUndo(),hasSomethingToRedo:s(this,T).hasSomethingToRedo(),hasSelectedEditor:!1})):(h(this,X,ae).call(this),h(this,Y,oe).call(this),h(this,K,le).call(this,{isEditing:!1}))}
878registerEditorTypes(e){if(!s(this,k)){o(this,k,e)
879for(const e of s(this,k))h(this,Q,ce).call(this,e.defaultPropertiesToUpdate)}}getId(){return s(this,M).getId()}get currentLayer(){return s(this,P).get(s(this,E))}get currentPageIndex(){return s(this,E)}addLayer(e){s(this,P).set(e.pageIndex,e),s(this,O)?e.enable():e.disable()}removeLayer(e){s(this,P).delete(e.pageIndex)}updateMode(e){if(o(this,I,e),e===n.AnnotationEditorType.NONE)this.setEditingState(!1),h(this,Z,he).call(this)
880else{this.setEditingState(!0),h(this,J,ue).call(this)
881for(const t of s(this,P).values())t.updateMode(e)}}updateToolbar(e){e!==s(this,I)&&s(this,F).dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(s(this,k)){for(const r of s(this,D))r.updateParams(e,t)
882for(const r of s(this,k))r.updateDefaultParams(e,t)}}getEditors(e){const t=[]
883for(const r of s(this,x).values())r.pageIndex===e&&t.push(r)
884return t}getEditor(e){return s(this,x).get(e)}addEditor(e){s(this,x).set(e.id,e)}removeEditor(e){var t
885s(this,x).delete(e.id),this.unselect(e),null===(t=s(this,C))||void 0===t||t.remove(e.id)}setActiveEditor(e){s(this,w)!==e&&(o(this,w,e),e&&h(this,Q,ce).call(this,e.propertiesToUpdate))}toggleSelected(e){s(this,D).has(e)?(s(this,D).delete(e),e.unselect(),h(this,K,le).call(this,{hasSelectedEditor:this.hasSelection})):(s(this,D).add(e),e.select(),h(this,Q,ce).call(this,e.propertiesToUpdate),h(this,K,le).call(this,{hasSelectedEditor:!0}))}setSelected(e){for(const t of s(this,D))t!==e&&t.unselect()
886s(this,D).clear(),s(this,D).add(e),e.select(),h(this,Q,ce).call(this,e.propertiesToUpdate),h(this,K,le).call(this,{hasSelectedEditor:!0})}isSelected(e){return s(this,D).has(e)}unselect(e){e.unselect(),s(this,D).delete(e),h(this,K,le).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==s(this,D).size}undo(){s(this,T).undo(),h(this,K,le).call(this,{hasSomethingToUndo:s(this,T).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:h(this,te,pe).call(this)})}redo(){s(this,T).redo(),h(this,K,le).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:s(this,T).hasSomethingToRedo(),isEmpty:h(this,te,pe).call(this)})}addCommands(e){s(this,T).add(e),h(this,K,le).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:h(this,te,pe).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return
887const e=[...s(this,D)]
888this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)h(this,ee,de).call(this,t)},mustExec:!0})}commitOrRemove(){var e
889null===(e=s(this,w))||void 0===e||e.commitOrRemove()}selectAll(){for(const e of s(this,D))e.commit()
890h(this,re,fe).call(this,s(this,x).values())}unselectAll(){if(s(this,w))s(this,w).commitOrRemove()
891else if(0!==s(this,D).size){for(const e of s(this,D))e.unselect()
892s(this,D).clear(),h(this,K,le).call(this,{hasSelectedEditor:!1})}}isActive(e){return s(this,w)===e}getActive(){return s(this,w)}getMode(){return s(this,I)}}function ie(){s(this,H).addEventListener("keydown",s(this,W))}function ae(){s(this,H).removeEventListener("keydown",s(this,W))}function se(){document.addEventListener("copy",s(this,L)),document.addEventListener("cut",s(this,j)),document.addEventListener("paste",s(this,N))}function oe(){document.removeEventListener("copy",s(this,L)),document.removeEventListener("cut",s(this,j)),document.removeEventListener("paste",s(this,N))}function le(e){Object.entries(e).some((e=>{let[t,r]=e
893return s(this,z)[t]!==r}))&&s(this,F).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(s(this,z),e)})}function ce(e){s(this,F).dispatch("annotationeditorparamschanged",{source:this,details:e})}function ue(){if(!s(this,O)){o(this,O,!0)
894for(const e of s(this,P).values())e.enable()}}function he(){if(this.unselectAll(),s(this,O)){o(this,O,!1)
895for(const e of s(this,P).values())e.disable()}}function de(e){const t=s(this,P).get(e.pageIndex)
896t?t.addOrRebuild(e):this.addEditor(e)}function pe(){if(0===s(this,x).size)return!0
897if(1===s(this,x).size)for(const e of s(this,x).values())return e.isEmpty()
898return!1}function fe(e){s(this,D).clear()
899for(const t of e)t.isEmpty()||(s(this,D).add(t),t.select())
900h(this,K,le).call(this,{hasSelectedEditor:!0})}t.AnnotationEditorUIManager=ne,function(e,t,r){(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e
901var t=e[Symbol.toPrimitive]
902if(void 0!==t){var r=t.call(e,"string")
903if("object"!=typeof r)return r
904throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
905return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(ne,"_keyboardManager",new y([[["ctrl+a","mac+meta+a"],ne.prototype.selectAll],[["ctrl+z","mac+meta+z"],ne.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],ne.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],ne.prototype.delete],[["Escape","mac+Escape"],ne.prototype.unselectAll]]))},(e,t,r)=>{"use strict"
906Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMFilterFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=t.AnnotationPrefix=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getColorValues=function(e){const t=document.createElement("span")
907t.style.visibility="hidden",document.body.append(t)
908for(const r of e.keys()){t.style.color=r
909const n=window.getComputedStyle(t).color
910e.set(r,N(n))}t.remove()},t.getCurrentTransform=function(e){const{a:t,b:r,c:n,d:i,e:a,f:s}=e.getTransform()
911return[t,r,n,i,a,s]},t.getCurrentTransformInverse=function(e){const{a:t,b:r,c:n,d:i,e:a,f:s}=e.getTransform().invertSelf()
912return[t,r,n,i,a,s]},t.getFilenameFromUrl=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||([e]=e.split(/[#?]/,1)),e.substring(e.lastIndexOf("/")+1)},t.getPdfFilenameFromUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf"
913if("string"!=typeof e)return t
914if(D(e))return(0,i.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t
915const r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e)
916let a=r.exec(n[1])||r.exec(n[2])||r.exec(n[3])
917if(a&&(a=a[0],a.includes("%")))try{a=r.exec(decodeURIComponent(a))[0]}catch(e){}return a||t},t.getRGB=N,t.getXfaPageViewport=function(e,t){let{scale:r=1,rotation:n=0}=t
918const{width:i,height:a}=e.attributes.style,s=[0,0,parseInt(i),parseInt(a)]
919return new O({viewBox:s,scale:r,rotation:n})},t.isDataScheme=D,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=L,t.loadScript=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
920return new Promise(((r,n)=>{const i=document.createElement("script")
921i.src=e,i.onload=function(e){t&&i.remove(),r(e)},i.onerror=function(){n(new Error(`Cannot load script at: ${i.src}`))},(document.head||document.documentElement).append(i)}))},t.setLayerDimensions=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]
922if(t instanceof O){const{pageWidth:n,pageHeight:i}=t.rawDims,{style:a}=e,s=`calc(var(--scale-factor) * ${n}px)`,o=`calc(var(--scale-factor) * ${i}px)`
923r&&t.rotation%180!=0?(a.width=o,a.height=s):(a.width=s,a.height=o)}n&&e.setAttribute("data-main-rotation",t.rotation)}
924var n=r(143),i=r(1)
925function a(e,t,r){s(e,t),t.set(e,r)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
926return r}function l(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,u(e,t,"get"))}function c(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r)
927else{if(!t.writable)throw new TypeError("attempted to set read only private field")
928t.value=r}}(e,u(e,t,"set"),r),r}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
929return t.get(e)}const h="http://www.w3.org/2000/svg"
930t.AnnotationPrefix="pdfjs_internal_id_"
931class d{}_defineProperty2(d,"CSS",96),_defineProperty2(d,"PDF",72),_defineProperty2(d,"PDF_TO_CSS_UNITS",d.CSS/d.PDF),t.PixelsPerInch=d
932var p=new WeakMap,f=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,b=new WeakMap,_=new WeakMap,y=new WeakMap,A=new WeakMap,S=new WeakMap,w=new WeakSet
933class x extends n.BaseFilterFactory{constructor(){let{docId:e,ownerDocument:t=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
934super(),function(e,t){s(e,t),t.add(e)}(this,w),a(this,S,{get:C,set:void 0}),a(this,A,{get:P,set:void 0}),a(this,p,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:void 0}),a(this,m,{writable:!0,value:void 0}),a(this,g,{writable:!0,value:void 0}),a(this,v,{writable:!0,value:void 0}),a(this,b,{writable:!0,value:void 0}),a(this,_,{writable:!0,value:void 0}),a(this,y,{writable:!0,value:0}),c(this,m,e),c(this,g,t)}addFilter(e){var t,r
935if(!e)return"none"
936let n,i,a,s,u=l(this,A).get(e)
937if(u)return u
938if(1===e.length){const t=e[0],r=new Array(256)
939for(let e=0;e<256;e++)r[e]=t[e]/255
940s=n=i=a=r.join(",")}else{const[t,r,o]=e,l=new Array(256),c=new Array(256),u=new Array(256)
941for(let e=0;e<256;e++)l[e]=t[e]/255,c[e]=r[e]/255,u[e]=o[e]/255
942n=l.join(","),i=c.join(","),a=u.join(","),s=`${n}${i}${a}`}if(u=l(this,A).get(s),u)return l(this,A).set(e,u),u
943const d=`g_${l(this,m)}_transfer_map_${c(this,y,(t=l(this,y),r=t++,t)),r}`,p=`url(#${d})`
944l(this,A).set(e,p),l(this,A).set(s,p)
945const f=l(this,g).createElementNS(h,"filter",h)
946f.setAttribute("id",d),f.setAttribute("color-interpolation-filters","sRGB")
947const v=l(this,g).createElementNS(h,"feComponentTransfer")
948return f.append(v),o(this,w,T).call(this,v,"feFuncR",n),o(this,w,T).call(this,v,"feFuncG",i),o(this,w,T).call(this,v,"feFuncB",a),l(this,S).append(f),p}addHCMFilter(e,t){var r
949const n=`${e}-${t}`
950if(l(this,b)===n)return l(this,_)
951if(c(this,b,n),c(this,_,"none"),null===(r=l(this,v))||void 0===r||r.remove(),!e||!t)return l(this,_)
952l(this,S).style.color=e
953const a=N(e=getComputedStyle(l(this,S)).getPropertyValue("color"))
954e=i.Util.makeHexColor(...a),l(this,S).style.color=t
955const s=N(t=getComputedStyle(l(this,S)).getPropertyValue("color"))
956if(t=i.Util.makeHexColor(...s),l(this,S).style.color="","#000000"===e&&"#ffffff"===t||e===t)return l(this,_)
957const u=new Array(256)
958for(let e=0;e<=255;e++){const t=e/255
959u[e]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}const d=u.join(","),p=`g_${l(this,m)}_hcm_filter`,f=c(this,v,l(this,g).createElementNS(h,"filter",h))
960f.setAttribute("id",p),f.setAttribute("color-interpolation-filters","sRGB")
961let y=l(this,g).createElementNS(h,"feComponentTransfer")
962f.append(y),o(this,w,T).call(this,y,"feFuncR",d),o(this,w,T).call(this,y,"feFuncG",d),o(this,w,T).call(this,y,"feFuncB",d)
963const A=l(this,g).createElementNS(h,"feColorMatrix")
964A.setAttribute("type","matrix"),A.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"),f.append(A),y=l(this,g).createElementNS(h,"feComponentTransfer"),f.append(y)
965const x=(e,t)=>{const r=a[e]/255,n=s[e]/255,i=new Array(t+1)
966for(let e=0;e<=t;e++)i[e]=r+e/t*(n-r)
967return i.join(",")}
968return o(this,w,T).call(this,y,"feFuncR",x(0,5)),o(this,w,T).call(this,y,"feFuncG",x(1,5)),o(this,w,T).call(this,y,"feFuncB",x(2,5)),l(this,S).append(f),c(this,_,`url(#${p})`),l(this,_)}destroy(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&l(this,_)||(l(this,f)&&(l(this,f).parentNode.parentNode.remove(),c(this,f,null)),l(this,p)&&(l(this,p).clear(),c(this,p,null)),c(this,y,0))}}function P(){return l(this,p)||c(this,p,new Map)}function C(){if(!l(this,f)){const e=l(this,g).createElement("div"),{style:t}=e
969t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1
970const r=l(this,g).createElementNS(h,"svg")
971r.setAttribute("width",0),r.setAttribute("height",0),c(this,f,l(this,g).createElementNS(h,"defs")),e.append(r),r.append(l(this,f)),l(this,g).body.append(e)}return l(this,f)}function T(e,t,r){const n=l(this,g).createElementNS(h,t)
972n.setAttribute("type","discrete"),n.setAttribute("tableValues",r),e.append(n)}t.DOMFilterFactory=x
973class E extends n.BaseCanvasFactory{constructor(){let{ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
974super(),this._document=e}_createCanvas(e,t){const r=this._document.createElement("canvas")
975return r.width=e,r.height=t,r}}async function k(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
976if(L(e,document.baseURI)){const r=await fetch(e)
977if(!r.ok)throw new Error(r.statusText)
978return t?new Uint8Array(await r.arrayBuffer()):(0,i.stringToBytes)(await r.text())}return new Promise(((r,n)=>{const a=new XMLHttpRequest
979a.open("GET",e,!0),t&&(a.responseType="arraybuffer"),a.onreadystatechange=()=>{if(a.readyState===XMLHttpRequest.DONE){if(200===a.status||0===a.status){let e
980if(t&&a.response?e=new Uint8Array(a.response):!t&&a.responseText&&(e=(0,i.stringToBytes)(a.responseText)),e)return void r(e)}n(new Error(a.statusText))}},a.send(null)}))}t.DOMCanvasFactory=E
981class R extends n.BaseCMapReaderFactory{_fetchData(e,t){return k(e,this.isCompressed).then((e=>({cMapData:e,compressionType:t})))}}t.DOMCMapReaderFactory=R
982class F extends n.BaseStandardFontDataFactory{_fetchData(e){return k(e,!0)}}t.DOMStandardFontDataFactory=F
983class M extends n.BaseSVGFactory{_createSVG(e){return document.createElementNS(h,e)}}t.DOMSVGFactory=M
984class O{constructor(e){let{viewBox:t,scale:r,rotation:n,offsetX:i=0,offsetY:a=0,dontFlip:s=!1}=e
985this.viewBox=t,this.scale=r,this.rotation=n,this.offsetX=i,this.offsetY=a
986const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2
987let c,u,h,d,p,f,m,g
988switch(n%=360,n<0&&(n+=360),n){case 180:c=-1,u=0,h=0,d=1
989break
990case 90:c=0,u=1,h=1,d=0
991break
992case 270:c=0,u=-1,h=-1,d=0
993break
994case 0:c=1,u=0,h=0,d=-1
995break
996default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(h=-h,d=-d),0===c?(p=Math.abs(l-t[1])*r+i,f=Math.abs(o-t[0])*r+a,m=(t[3]-t[1])*r,g=(t[2]-t[0])*r):(p=Math.abs(o-t[0])*r+i,f=Math.abs(l-t[1])*r+a,m=(t[2]-t[0])*r,g=(t[3]-t[1])*r),this.transform=[c*r,u*r,h*r,d*r,p-c*r*o-h*r*l,f-u*r*o-d*r*l],this.width=m,this.height=g}get rawDims(){const{viewBox:e}=this
997return(0,i.shadow)(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone(){let{scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:n=this.offsetY,dontFlip:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
998return new O({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:n,dontFlip:i})}convertToViewportPoint(e,t){return i.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=i.Util.applyTransform([e[0],e[1]],this.transform),r=i.Util.applyTransform([e[2],e[3]],this.transform)
999return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=O
1000class I extends i.BaseException{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0
1001super(e,"RenderingCancelledException"),this.type=t,this.extraDelay=r}}function D(e){const t=e.length
1002let r=0
1003for(;r<t&&""===e[r].trim();)r++
1004return"data:"===e.substring(r,r+5).toLowerCase()}function L(e,t){try{const{protocol:r}=t?new URL(e,t):new URL(e)
1005return"http:"===r||"https:"===r}catch(e){return!1}}let j
1006function N(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16)
1007return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):((0,i.warn)(`Not a valid color format: "${e}"`),[0,0,0])}t.RenderingCancelledException=I,t.StatTimer=class{constructor(){_defineProperty2(this,"started",Object.create(null)),_defineProperty2(this,"times",[])}time(e){e in this.started&&(0,i.warn)(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,i.warn)(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[]
1008let t=0
1009for(const{name:e}of this.times)t=Math.max(e.length,t)
1010for(const{name:r,start:n,end:i}of this.times)e.push(`${r.padEnd(t)} ${i-n}ms\n`)
1011return e.join("")}}
1011,t.PDFDateString=class{static toDateObject(e){if(!e||"string"!=typeof e)return null
1012j||(j=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"))
1013const t=j.exec(e)
1014if(!t)return null
1015const r=parseInt(t[1],10)
1016let n=parseInt(t[2],10)
1017n=n>=1&&n<=12?n-1:0
1018let i=parseInt(t[3],10)
1019i=i>=1&&i<=31?i:1
1020let a=parseInt(t[4],10)
1021a=a>=0&&a<=23?a:0
1022let s=parseInt(t[5],10)
1023s=s>=0&&s<=59?s:0
1024let o=parseInt(t[6],10)
1025o=o>=0&&o<=59?o:0
1026const l=t[7]||"Z"
1027let c=parseInt(t[8],10)
1028c=c>=0&&c<=23?c:0
1029let u=parseInt(t[9],10)||0
1030return u=u>=0&&u<=59?u:0,"-"===l?(a+=c,s+=u):"+"===l&&(a-=c,s-=u),new Date(Date.UTC(r,n,i,a,s,o))}}},(e,t,r)=>{"use strict"
1031Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseFilterFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0
1032var n=r(1)
1033class i{constructor(){this.constructor===i&&(0,n.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(e){return"none"}addHCMFilter(e,t){return"none"}destroy(){}}t.BaseFilterFactory=i
1034class a{constructor(){this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size")
1035const r=this._createCanvas(e,t)
1036return{canvas:r,context:r.getContext("2d")}}reset(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified")
1037if(t<=0||r<=0)throw new Error("Invalid canvas size")
1038e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified")
1039e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){(0,n.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=a
1040class s{constructor(e){let{baseUrl:t=null,isCompressed:r=!0}=e
1041this.constructor===s&&(0,n.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=r}async fetch(e){let{name:t}=e
1042if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.')
1043if(!t)throw new Error("CMap name must be specified.")
1044const r=this.baseUrl+t+(this.isCompressed?".bcmap":""),i=this.isCompressed?n.CMapCompressionType.BINARY:n.CMapCompressionType.NONE
1045return this._fetchData(r,i).catch((e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${r}`)}))}_fetchData(e,t){(0,n.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=s
1046class o{constructor(e){let{baseUrl:t=null}=e
1047this.constructor===o&&(0,n.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch(e){let{filename:t}=e
1048if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.')
1049if(!t)throw new Error("Font filename must be specified.")
1050const r=`${this.baseUrl}${t}`
1051return this._fetchData(r).catch((e=>{throw new Error(`Unable to load font data at: ${r}`)}))}_fetchData(e){(0,n.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=o
1052class l{constructor(){this.constructor===l&&(0,n.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]
1053if(e<=0||t<=0)throw new Error("Invalid SVG dimensions")
1054const n=this._createSVG("svg:svg")
1055return n.setAttribute("version","1.1"),r||(n.setAttribute("width",`${e}px`),n.setAttribute("height",`${t}px`)),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox",`0 0 ${e} ${t}`),n}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type")
1056return this._createSVG(e)}_createSVG(e){(0,n.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=l},(e,t,r)=>{"use strict"
1057Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0
1058var n=r(1)
1059const i=3285377520,a=4294901760,s=65535
1060t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:i,this.h2=e?4294967295&e:i}update(e){let t,r
1061if("string"==typeof e){t=new Uint8Array(2*e.length),r=0
1062for(let n=0,i=e.length;n<i;n++){const i=e.charCodeAt(n)
1063i<=255?t[r++]=i:(t[r++]=i>>>8,t[r++]=255&i)}}else{if(!(0,n.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.")
1064t=e.slice(),r=t.byteLength}const i=r>>2,o=r-4*i,l=new Uint32Array(t.buffer,0,i)
1065let c=0,u=0,h=this.h1,d=this.h2
1066const p=3432918353,f=461845907,m=11601,g=13715
1067for(let e=0;e<i;e++)1&e?(c=l[e],c=c*p&a|c*m&s,c=c<<15|c>>>17,c=c*f&a|c*g&s,h^=c,h=h<<13|h>>>19,h=5*h+3864292196):(u=l[e],u=u*p&a|u*m&s,u=u<<15|u>>>17,u=u*f&a|u*g&s,d^=u,d=d<<13|d>>>19,d=5*d+3864292196)
1068switch(c=0,o){case 3:c^=t[4*i+2]<<16
1069case 2:c^=t[4*i+1]<<8
1070case 1:c^=t[4*i],c=c*p&a|c*m&s,c=c<<15|c>>>17,c=c*f&a|c*g&s,1&i?h^=c:d^=c}this.h1=h,this.h2=d}hexdigest(){let e=this.h1,t=this.h2
1071return e^=t>>>1,e=3981806797*e&a|36045*e&s,t=4283543511*t&a|(2950163797*(t<<16|e>>>16)&a)>>>16,e^=t>>>1,e=444984403*e&a|60499*e&s,t=3301882366*t&a|(3120437893*(t<<16|e>>>16)&a)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}},(e,t,r)=>{"use strict"
1072Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0
1073var n=r(1),i=r(3)
1074t.FontLoader=class{constructor(e){let{ownerDocument:t=globalThis.document,styleElement:r=null}=e
1075this._document=t,this.nativeFontFaces=[],this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement))
1076const t=this.styleElement.sheet
1077t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e)
1078this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return
1079if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace()
1080if(t){this.addNativeFontFace(t)
1081try{await t.loaded}catch(r){throw(0,n.warn)(`Failed to load font '${t.family}': '${r}'.`),e.disableFontFace=!0,r}}return}const t=e.createFontFaceRule()
1082if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return
1083await new Promise((t=>{const r=this._queueLoadingCallback(t)
1084this._prepareFontLoadEvent(e,r)}))}}get isFontLoadingAPISupported(){var e
1085const t=!(null===(e=this._document)||void 0===e||!e.fonts)
1086return(0,n.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let e=!1
1087return(i.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,n.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,r={done:!1,complete:function(){for((0,n.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.length>0&&t[0].done;){const e=t.shift()
1088setTimeout(e.callback,0)}},callback:e}
1089return t.push(r),r}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")
1090return(0,n.shadow)(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,t){function r(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function i(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}let a,s
1091const o=this._document.createElement("canvas")
1092o.width=1,o.height=1
1093const l=o.getContext("2d")
1094let c=0
1095const u=`lt${Date.now()}${this.loadTestFontId++}`
1096let h=this._loadTestFont
1097h=i(h,976,u.length,u)
1098const d=1482184792
1099let p=r(h,16)
1100for(a=0,s=u.length-3;a<s;a+=4)p=p-d+r(u,a)|0
1101a<u.length&&(p=p-d+r(u+"XXX",a)|0),h=i(h,16,4,(0,n.string32)(p))
1102const f=`@font-face {font-family:"${u}";src:url(data:font/opentype;base64,${btoa(h)});}`
1103this.insertRule(f)
1104const m=this._document.createElement("div")
1105m.style.visibility="hidden",m.style.width=m.style.height="10px",m.style.position="absolute",m.style.top=m.style.left="0px"
1106for(const t of[e.loadedName,u]){const e=this._document.createElement("span")
1107e.textContent="Hi",e.style.fontFamily=t,m.append(e)}this._document.body.append(m),function e(t,r){if(++c>30)return(0,n.warn)("Load test font never loaded."),void r()
1108l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(u,(()=>{m.remove(),t.complete()}
1108))}},t.FontFaceObject=class{constructor(e,t){let{isEvalSupported:r=!0,disableFontFace:n=!1,ignoreErrors:i=!1,inspectFont:a=null}=t
1109this.compiledGlyphs=Object.create(null)
1110for(const t in e)this[t]=e[t]
1111this.isEvalSupported=!1!==r,this.disableFontFace=!0===n,this.ignoreErrors=!0===i,this._inspectFont=a}createNativeFontFace(){var e
1112if(!this.data||this.disableFontFace)return null
1113let t
1114if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight}
1115this.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,{})
1116return null===(e=this._inspectFont)||void 0===e||e.call(this,this),t}createFontFaceRule(){var e
1117if(!this.data||this.disableFontFace)return null
1118const t=(0,n.bytesToString)(this.data),r=`url(data:${this.mimetype};base64,${btoa(t)});`
1119let i
1120if(this.cssFontInfo){let e=`font-weight: ${this.cssFontInfo.fontWeight};`
1121this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),i=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${r}}`}else i=`@font-face {font-family:"${this.loadedName}";src:${r}}`
1122return null===(e=this._inspectFont)||void 0===e||e.call(this,this,r),i}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t]
1123let r
1124try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e
1125return(0,n.warn)(`getPathGenerator - ignoring character: "${e}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&n.FeatureTest.isEvalSupported){const e=[]
1126for(const t of r){const r=void 0!==t.args?t.args.join(","):""
1127e.push("c.",t.cmd,"(",r,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const n of r)"scale"===n.cmd&&(n.args=[t,-t]),e[n.cmd].apply(e,n.args)}}}},(e,t,r)=>{"use strict"
1128Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0
1129var n=r(1),i=r(142),a=r(147),s=r(148),o=r(3)
1130function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
1131return r}const u=4096,h=16
1132class d{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,r){let n
1133return void 0!==this.cache[e]?(n=this.cache[e],this.canvasFactory.reset(n,t,r)):(n=this.canvasFactory.create(t,r),this.cache[e]=n),n}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e]
1134this.canvasFactory.destroy(t),delete this.cache[e]}}}function p(e,t,r,n,a,s,o,l,c,u){const[h,d,p,f,m,g]=(0,i.getCurrentTransform)(e)
1135if(0===d&&0===p){const i=o*h+m,v=Math.round(i),b=l*f+g,_=Math.round(b),y=(o+c)*h+m,A=Math.abs(Math.round(y)-v)||1,S=(l+u)*f+g,w=Math.abs(Math.round(S)-_)||1
1136return e.setTransform(Math.sign(h),0,0,Math.sign(f),v,_),e.drawImage(t,r,n,a,s,0,0,A,w),e.setTransform(h,d,p,f,m,g),[A,w]}if(0===h&&0===f){const i=l*p+m,v=Math.round(i),b=o*d+g,_=Math.round(b),y=(l+u)*p+m,A=Math.abs(Math.round(y)-v)||1,S=(o+c)*d+g,w=Math.abs(Math.round(S)-_)||1
1137return e.setTransform(0,Math.sign(d),Math.sign(p),0,v,_),e.drawImage(t,r,n,a,s,0,0,w,A),e.setTransform(h,d,p,f,m,g),[w,A]}return e.drawImage(t,r,n,a,s,o,l,c,u),[Math.hypot(h,d)*c,Math.hypot(p,f)*u]}class f{constructor(e,t){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,e,t])}clone(){const e=Object.create(this)
1138return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,r){[t,r]=n.Util.applyTransform([t,r],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(e,t){const r=n.Util.applyTransform(t,e),i=n.Util.applyTransform(t.slice(2),e)
1139this.minX=Math.min(this.minX,r[0],i[0]),this.minY=Math.min(this.minY,r[1],i[1]),this.maxX=Math.max(this.maxX,r[0],i[0]),this.maxY=Math.max(this.maxY,r[1],i[1])}updateScalingPathMinMax(e,t){n.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,r,i,a,s,o,l,c,u){const h=n.Util.bezierBoundingBox(t,r,i,a,s,o,l,c)
1140u?(u[0]=Math.min(u[0],h[0],h[2]),u[1]=Math.max(u[1],h[0],h[2]),u[2]=Math.min(u[2],h[1],h[3]),u[3]=Math.max(u[3],h[1],h[3])):this.updateRectMinMax(e,h)}getPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
1141const r=[this.minX,this.minY,this.maxX,this.maxY]
1142if(e===a.PathType.STROKE){t||(0,n.unreachable)("Stroke bounding box must include transform.")
1143const e=n.Util.singularValueDecompose2dScale(t),i=e[0]*this.lineWidth/2,a=e[1]*this.lineWidth/2
1144r[0]-=i,r[1]-=a,r[2]+=i,r[3]+=a}return r}updateClipFromPath(){const e=n.Util.intersect(this.clipBox,this.getPathBoundingBox())
1145this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
1146return n.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function m(e,t){if("undefined"!=typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0)
1147const r=t.height,i=t.width,a=r%h,s=(r-a)/h,o=0===a?s:s+1,l=e.createImageData(i,h)
1148let c,u=0
1149const d=t.data,p=l.data
1150let f,m,g,v
1151if(t.kind===n.ImageKind.GRAYSCALE_1BPP){const t=d.byteLength,r=new Uint32Array(p.buffer,0,p.byteLength>>2),v=r.length,b=i+7>>3,_=4294967295,y=n.FeatureTest.isLittleEndian?4278190080:255
1152for(f=0;f<o;f++){for(g=f<s?h:a,c=0,m=0;m<g;m++){const e=t-u
1153let n=0
1154const a=e>b?i:8*e-7,s=-8&a
1155let o=0,l=0
1156for(;n<s;n+=8)l=d[u++],r[c++]=128&l?_:y,r[c++]=64&l?_:y,r[c++]=32&l?_:y,r[c++]=16&l?_:y,r[c++]=8&l?_:y,r[c++]=4&l?_:y,r[c++]=2&l?_:y,r[c++]=1&l?_:y
1157for(;n<a;n++)0===o&&(l=d[u++],o=128),r[c++]=l&o?_:y,o>>=1}for(;c<v;)r[c++]=0
1158e.putImageData(l,0,f*h)}}else if(t.kind===n.ImageKind.RGBA_32BPP){for(m=0,v=i*h*4,f=0;f<s;f++)p.set(d.subarray(u,u+v)),u+=v,e.putImageData(l,0,m),m+=h
1159f<o&&(v=i*a*4,p.set(d.subarray(u,u+v)),e.putImageData(l,0,m))}else{if(t.kind!==n.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`)
1160for(g=h,v=i*g,f=0;f<o;f++){for(f>=s&&(g=a,v=i*g),c=0,m=v;m--;)p[c++]=d[u++],p[c++]=d[u++],p[c++]=d[u++],p[c++]=255
1161e.putImageData(l,0,f*h)}}}function g(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0)
1162const r=t.height,n=t.width,i=r%h,a=(r-i)/h,o=0===i?a:a+1,l=e.createImageData(n,h)
1163let c=0
1164const u=t.data,d=l.data
1165for(let t=0;t<o;t++){const r=t<a?h:i;({srcPos:c}=(0,s.convertBlackAndWhiteToRGBA)({src:u,srcPos:c,dest:d,width:n,height:r,nonBlackColor:0})),e.putImageData(l,0,t*h)}}function v(e,t){const r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"]
1166for(const n of r)void 0!==e[n]&&(t[n]=e[n])
1167void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function b(e){e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),o.isNodeJS||(e.filter="none")}function _(e,t,r,n){const i=e.length
1168for(let a=3;a<i;a+=4){const i=e[a]
1169if(0===i)e[a-3]=t,e[a-2]=r,e[a-1]=n
1170else if(i<255){const s=255-i
1171e[a-3]=e[a-3]*i+t*s>>8,e[a-2]=e[a-2]*i+r*s>>8,e[a-1]=e[a-1]*i+n*s>>8}}}function y(e,t,r){const n=e.length
1172for(let i=3;i<n;i+=4){const n=r?r[e[i]]:e[i]
1173t[i]=t[i]*n*.00392156862745098|0}}function A(e,t,r){const n=e.length
1174for(let i=3;i<n;i+=4){const n=77*e[i-3]+152*e[i-2]+28*e[i-1]
1175t[i]=r?t[i]*r[n>>8]>>8:t[i]*n>>16}}function S(e,t){const r=n.Util.singularValueDecompose2dScale(e)
1176r[0]=Math.fround(r[0]),r[1]=Math.fround(r[1])
1177const a=Math.fround((globalThis.devicePixelRatio||1)*i.PixelsPerInch.PDF_TO_CSS_UNITS)
1178return void 0!==t?t:r[0]<=a||r[1]<=a}const w=["butt","round","square"],x=["miter","round","bevel"],P={},C={}
1179var T=new WeakSet,E=new WeakSet
1180class k{constructor(e,t,r,n,i,a,s,o){let{optionalContentConfig:c,markedContentStack:u=null}=a
1181l(this,E),l(this,T),this.ctx=e,this.current=new f(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=n,this.filterFactory=i,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=u||[],this.optionalContentConfig=c,this.cachedCanvases=new d(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=s,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=o,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
1182return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing(e){let{transform:t,viewport:r,transparency:n=!1,background:a=null}=e
1183const s=this.ctx.canvas.width,o=this.ctx.canvas.height,l=this.ctx.fillStyle
1184if(this.ctx.fillStyle=a||"#ffffff",this.ctx.fillRect(0,0,s,o),this.ctx.fillStyle=l,n){const e=this.cachedCanvases.getCanvas("transparent",s,o)
1185this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...(0,i.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),b(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...r.transform),this.viewportScale=r.scale,this.baseTransform=(0,i.getCurrentTransform)(this.ctx)}executeOperatorList(e,t,r,i){const a=e.argsArray,s=e.fnArray
1186let o=t||0
1187const l=a.length
1188if(l===o)return o
1189const c=l-o>10&&"function"==typeof r,u=c?Date.now()+15:0
1190let h=0
1191const d=this.commonObjs,p=this.objs
1192let f
1193for(;;){if(void 0!==i&&o===i.nextBreakPoint)return i.breakIt(o,r),o
1194if(f=s[o],f!==n.OPS.dependency)this[f].apply(this,a[o])
1195else for(const e of a[o]){const t=e.startsWith("g_")?d:p
1196if(!t.has(e))return t.get(e,r),o}if(o++,o===l)return o
1197if(c&&++h>10){if(Date.now()>u)return r(),o
1198h=0}}}endDrawing(){c(this,T,R).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear()
1199for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0)
1200e.clear()}this._cachedBitmapsMap.clear(),c(this,E,F).call(this)}_scaleImage(e,t){const r=e.width,n=e.height
1201let i,a,s=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=r,c=n,u="prescale1"
1202for(;s>2&&l>1||o>2&&c>1;){let t=l,r=c
1203s>2&&l>1&&(t=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),s/=l/t),o>2&&c>1&&(r=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2,o/=c/r),i=this.cachedCanvases.getCanvas(u,t,r),a=i.context,a.clearRect(0,0,t,r),a.drawImage(e,0,0,l,c,0,0,t,r),e=i.canvas,l=t,c=r,u="prescale1"===u?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:c}}_createMaskCanvas(e){const t=this.ctx,{width:r,height:s}=e,o=this.current.fillColor,l=this.current.patternFill,c=(0,i.getCurrentTransform)(t)
1204let u,h,d,f
1205if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer
1206h=JSON.stringify(l?c:[c.slice(0,4),o]),u=this._cachedBitmapsMap.get(t),u||(u=new Map,this._cachedBitmapsMap.set(t,u))
1207const r=u.get(h)
1208if(r&&!l)return{canvas:r,offsetX:Math.round(Math.min(c[0],c[2])+c[4]),offsetY:Math.round(Math.min(c[1],c[3])+c[5])}
1209d=r}d||(f=this.cachedCanvases.getCanvas("maskCanvas",r,s),g(f.context,e))
1210let m=n.Util.transform(c,[1/r,0,0,-1/s,0,0])
1211m=n.Util.transform(m,[1,0,0,1,0,-s])
1212const v=n.Util.applyTransform([0,0],m),b=n.Util.applyTransform([r,s],m),_=n.Util.normalizeRect([v[0],v[1],b[0],b[1]]),y=Math.round(_[2]-_[0])||1,A=Math.round(_[3]-_[1])||1,w=this.cachedCanvases.getCanvas("fillCanvas",y,A),x=w.context,P=Math.min(v[0],b[0]),C=Math.min(v[1],b[1])
1213x.translate(-P,-C),x.transform(...m),d||(d=this._scaleImage(f.canvas,(0,i.getCurrentTransformInverse)(x)),d=d.img,u&&l&&u.set(h,d)),x.imageSmoothingEnabled=S((0,i.getCurrentTransform)(x),e.interpolate),p(x,d,0,0,d.width,d.height,0,0,r,s
1213),x.globalCompositeOperation="source-in"
1214const T=n.Util.transform((0,i.getCurrentTransformInverse)(x),[1,0,0,1,-P,-C])
1215return x.fillStyle=l?o.getPattern(t,this,T,a.PathType.FILL):o,x.fillRect(0,0,r,s),u&&!l&&(this.cachedCanvases.delete("fillCanvas"),u.set(h,w.canvas)),{canvas:w.canvas,offsetX:Math.round(P),offsetY:Math.round(C)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=w[e]}setLineJoin(e){this.ctx.lineJoin=x[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const r=this.ctx
1216void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r)
1217break
1218case"LC":this.setLineCap(r)
1219break
1220case"LJ":this.setLineJoin(r)
1221break
1222case"ML":this.setMiterLimit(r)
1223break
1224case"D":this.setDash(r[0],r[1])
1225break
1226case"RI":this.setRenderingIntent(r)
1227break
1228case"FL":this.setFlatness(r)
1229break
1230case"Font":this.setFont(r[0],r[1])
1231break
1232case"CA":this.current.strokeAlpha=r
1233break
1234case"ca":this.current.fillAlpha=r,this.ctx.globalAlpha=r
1235break
1236case"BM":this.ctx.globalCompositeOperation=r
1237break
1238case"SMask":this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState()
1239break
1240case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode
1241this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode")
1242const e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,e,t)
1243this.suspendedCtx=this.ctx,this.ctx=n.context
1244const a=this.ctx
1245a.setTransform(...(0,i.getCurrentTransform)(this.suspendedCtx)),v(this.suspendedCtx,a),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.")
1246e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},e.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},e.transform=function(e,r,n,i,a,s){t.transform(e,r,n,i,a,s),this.__originalTransform(e,r,n,i,a,s)},e.setTransform=function(e,r,n,i,a,s){t.setTransform(e,r,n,i,a,s),this.__originalSetTransform(e,r,n,i,a,s)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},e.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},e.bezierCurveTo=function(e,r,n,i,a,s){t.bezierCurveTo(e,r,n,i,a,s),this.__originalBezierCurveTo(e,r,n,i,a,s)},e.rect=function(e,r,n,i){t.rect(e,r,n,i),this.__originalRect(e,r,n,i)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(a,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")
1247this.ctx._removeMirroring(),v(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return
1248e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height]
1249const t=this.current.activeSMask
1250!function(e,t,r,n){const i=n[0],a=n[1],s=n[2]-i,o=n[3]-a
12510!==s&&0!==o&&(function(e,t,r,n,i,a,s,o,l,c,u){const h=!!a,d=h?a[0]:0,p=h?a[1]:0,f=h?a[2]:0
1252let m
1253m="Luminosity"===i?A:y
1254const g=Math.min(n,Math.ceil(1048576/r))
1255for(let i=0;i<n;i+=g){const a=Math.min(g,n-i),v=e.getImageData(o-c,i+(l-u),r,a),b=t.getImageData(o,i+l,r,a)
1256h&&_(v.data,d,p,f),m(v.data,b.data,s),t.putImageData(b,o,i+l)}}(t.context,r,s,o,t.subtype,t.backdrop,t.transferMap,i,a,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore(
1256))}(this.suspendedCtx,t,this.ctx,e),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?(v(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save()
1257const e=this.current
1258this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),v(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}transform(e,t,r,n,i,a){this.ctx.transform(e,t,r,n,i,a),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}constructPath(e,t,r){const a=this.ctx,s=this.current
1259let o,l,c=s.x,u=s.y
1260const h=(0,i.getCurrentTransform)(a),d=0===h[0]&&0===h[3]||0===h[1]&&0===h[2],p=d?r.slice(0):null
1261for(let r=0,i=0,f=e.length;r<f;r++)switch(0|e[r]){case n.OPS.rectangle:c=t[i++],u=t[i++]
1262const e=t[i++],r=t[i++],f=c+e,m=u+r
1263a.moveTo(c,u),0===e||0===r?a.lineTo(f,m):(a.lineTo(f,u),a.lineTo(f,m),a.lineTo(c,m)),d||s.updateRectMinMax(h,[c,u,f,m]),a.closePath()
1264break
1265case n.OPS.moveTo:c=t[i++],u=t[i++],a.moveTo(c,u),d||s.updatePathMinMax(h,c,u)
1266break
1267case n.OPS.lineTo:c=t[i++],u=t[i++],a.lineTo(c,u),d||s.updatePathMinMax(h,c,u)
1268break
1269case n.OPS.curveTo:o=c,l=u,c=t[i+4],u=t[i+5],a.bezierCurveTo(t[i],t[i+1],t[i+2],t[i+3],c,u),s.updateCurvePathMinMax(h,o,l,t[i],t[i+1],t[i+2],t[i+3],c,u,p),i+=6
1270break
1271case n.OPS.curveTo2:o=c,l=u,a.bezierCurveTo(c,u,t[i],t[i+1],t[i+2],t[i+3]),s.updateCurvePathMinMax(h,o,l,c,u,t[i],t[i+1],t[i+2],t[i+3],p),c=t[i+2],u=t[i+3],i+=4
1272break
1273case n.OPS.curveTo3:o=c,l=u,c=t[i+2],u=t[i+3],a.bezierCurveTo(t[i],t[i+1],c,u,c,u),s.updateCurvePathMinMax(h,o,l,t[i],t[i+1],c,u,c,u,p),i+=4
1274break
1275case n.OPS.closePath:a.closePath()}d&&s.updateScalingPathMinMax(h,p),s.setCurrentPoint(c,u)}closePath(){this.ctx.closePath()}stroke(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]
1276const t=this.ctx,r=this.current.strokeColor
1277t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof r&&null!=r&&r.getPattern?(t.save(),t.strokeStyle=r.getPattern(t,this,(0,i.getCurrentTransformInverse)(t),a.PathType.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]
1278const t=this.ctx,r=this.current.fillColor
1279let n=!1
1280this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,(0,i.getCurrentTransformInverse)(t),a.PathType.FILL),n=!0)
1281const s=this.current.getClippedPathBoundingBox()
1282this.contentVisible&&null!==s&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),n&&t.restore(),e&&this.consumePath(s)}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=P}eoClip(){this.pendingClip=C}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 e=this.pendingTextPaths,t=this.ctx
1283if(void 0!==e){t.save(),t.beginPath()
1284for(const r of e)t.setTransform(...r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize)
1285t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){const r=this.commonObjs.get(e),i=this.current
1286if(!r)throw new Error(`Can't find font for ${e}`)
1287if(i.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX,0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return
1288const a=r.loadedName||"sans-serif"
1289let s="normal"
1290r.black?s="900":r.bold&&(s="bold")
1291const o=r.italic?"italic":"normal",l=`"${a}", ${r.fallbackName}`
1292let c=t
1293t<16?c=16:t>100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font=`${o} ${s} ${c}px ${l}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,r,n,i,a){this.current.textMatrix=[e,t,r,n,i,a],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,r,a){const s=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,u=o.fontSize/o.fontSizeScale,h=c&n.TextRenderingMode.FILL_STROKE_MASK,d=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile
1294let f;(l.disableFontFace||d||p)&&(f=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||p?(s.save(),s.translate(t,r),s.beginPath(),f(s,u),a&&s.setTransform(...a),h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||s.fill(),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||s.stroke(),s.restore(
1294)):(h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||s.strokeText(e,t,r)),d&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,i.getCurrentTransform)(s),x:t,y:r,fontSize:u,addToPath:f})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10)
1295e.scale(1.5,1),e.fillText("I",0,10)
1296const t=e.getImageData(0,0,10,10).data
1297let r=!1
1298for(let e=3;e<t.length;e+=4)if(t[e]>0&&t[e]<255){r=!0
1299break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)}showText(e){const t=this.current,r=t.font
1300if(r.isType3Font)return this.showType3Text(e)
1301const s=t.fontSize
1302if(0===s)return
1303const o=this.ctx,l=t.fontSizeScale,c=t.charSpacing,u=t.wordSpacing,h=t.fontDirection,d=t.textHScale*h,p=e.length,f=r.vertical,m=f?1:-1,g=r.defaultVMetrics,v=s*t.fontMatrix[0],b=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill
1304let _
1305if(o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),h>0?o.scale(d,-1):o.scale(d,1),t.patternFill){o.save()
1306const e=t.fillColor.getPattern(o,this,(0,i.getCurrentTransformInverse)(o),a.PathType.FILL)
1307_=(0,i.getCurrentTransform)(o),o.restore(),o.fillStyle=e}let y=t.lineWidth
1308const A=t.textMatrixScale
1309if(0===A||0===y){const e=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK
1310e!==n.TextRenderingMode.STROKE&&e!==n.TextRenderingMode.FILL_STROKE||(y=this.getSinglePixelWidth())}else y/=A
1311if(1!==l&&(o.scale(l,l),y/=l),o.lineWidth=y,r.isInvalidPDFjsFont){const r=[]
1312let n=0
1313for(const t of e)r.push(t.unicode),n+=t.width
1314return o.fillText(r.join(""),0,0),t.x+=n*v*d,o.restore(),void this.compose()}let S,w=0
1315for(S=0;S<p;++S){const t=e[S]
1316if("number"==typeof t){w+=m*t*s/1e3
1317continue}let n=!1
1318const i=(t.isSpace?u:0)+c,a=t.fontChar,d=t.accent
1319let p,y,A,x=t.width
1320if(f){const e=t.vmetric||g,r=-(t.vmetric?e[1]:.5*x)*v,n=e[2]*v
1321x=e?-e[0]:x,p=r/l,y=(w+n)/l}else p=w/l,y=0
1322if(r.remeasure&&x>0){const e=1e3*o.measureText(a).width/s*l
1323if(x<e&&this.isFontSubpixelAAEnabled){const t=x/e
1324n=!0,o.save(),o.scale(t,1),p/=t}else x!==e&&(p+=(x-e)/2e3*s/l)}if(this.contentVisible&&(t.isInFont||r.missingFile))if(b&&!d)o.fillText(a,p,y)
1325else if(this.paintChar(a,p,y,_),d){const e=p+s*d.offset.x/l,t=y-s*d.offset.y/l
1326this.paintChar(d.fontChar,e,t,_)}A=f?x*v-i*h:x*v+i*h,w+=A,n&&o.restore()}f?t.y-=w:t.x+=w*d,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,r=this.current,i=r.font,a=r.fontSize,s=r.fontDirection,o=i.vertical?1:-1,l=r.charSpacing,c=r.wordSpacing,u=r.textHScale*s,h=r.fontMatrix||n.FONT_IDENTITY_MATRIX,d=e.length
1327let p,f,m,g
1328if(r.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==a){for(this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...r.textMatrix),t.translate(r.x,r.y),t.scale(u,s),p=0;p<d;++p){if(f=e[p],"number"==typeof f){g=o*f*a/1e3,this.ctx.translate(g,0),r.x+=g*u
1329continue}const s=(f.isSpace?c:0)+l,d=i.charProcOperatorList[f.operatorListId]
1330d?(this.contentVisible&&(this.processingType3=f,this.save(),t.scale(a,a),t.transform(...h),this.executeOperatorList(d),this.restore()),m=n.Util.applyTransform([f.width,0],h)[0]*a+s,t.translate(m,0),r.x+=m*u):(0,n.warn)(`Type3 character "${f.operatorListId}" is not available.`)}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,r,n,i,a){this.ctx.rect(r,n,i-r,a-n),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t
1331if("TilingPattern"===e[0]){const r=e[1],n=this.baseTransform||(0,i.getCurrentTransform)(this.ctx),s={createCanvasGraphics:e=>new k(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})}
1332t=new a.TilingPattern(e,r,this.ctx,s,n)}else t=this._getPattern(e[1],e[2])
1333return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,r){const i=n.Util.makeHexColor(e,t,r)
1334this.ctx.strokeStyle=i,this.current.strokeColor=i}setFillRGBColor(e,t,r){const i=n.Util.makeHexColor(e,t,r)
1335this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1}_getPattern(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
1336return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,a.getShadingPattern)(this.getObject(e)),this.cachedPatterns.set(e,t)),r&&(t.matrix=r),t}shadingFill(e){if(!this.contentVisible)return
1337const t=this.ctx
1338this.save()
1339const r=this._getPattern(e)
1340t.fillStyle=r.getPattern(t,this,(0,i.getCurrentTransformInverse)(t),a.PathType.SHADING)
1341const s=(0,i.getCurrentTransformInverse)(t)
1342if(s){const e=t.canvas,r=e.width,i=e.height,a=n.Util.applyTransform([0,0],s),o=n.Util.applyTransform([0,i],s),l=n.Util.applyTransform([r,0],s),c=n.Util.applyTransform([r,i],s),u=Math.min(a[0],o[0],l[0],c[0]),h=Math.min(a[1],o[1],l[1],c[1]),d=Math.max(a[0],o[0],l[0],c[0]),p=Math.max(a[1],o[1],l[1],c[1])
1343this.ctx.fillRect(u,h,d-u,p-h)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10)
1344this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,n.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,n.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform(...e),this.baseTransform=(0,i.getCurrentTransform)(this.ctx),t)){const e=t[2]-t[0],r=t[3]-t[1]
1345this.ctx.rect(t[0],t[1],e,r),this.current.updateRectMinMax((0,i.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return
1346this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null)
1347const t=this.ctx
1348e.isolated||(0,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.warn)("Knockout groups not supported.")
1349const r=(0,i.getCurrentTransform)(t)
1350if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.")
1351let a=n.Util.getAxialAlignedBoundingBox(e.bbox,(0,i.getCurrentTransform)(t))
1352const s=[0,0,t.canvas.width,t.canvas.height]
1353a=n.Util.intersect(a,s)||[0,0,0,0]
1354const o=Math.floor(a[0]),l=Math.floor(a[1])
1355let c=Math.max(Math.ceil(a[2])-o,1),h=Math.max(Math.ceil(a[3])-l,1),d=1,p=1
1356c>u&&(d=c/u,c=u),h>u&&(p=h/u,h=u),this.current.startNewPathAndClipBox([0,0,c,h])
1357let f="groupAt"+this.groupLevel
1358e.smask&&(f+="_smask_"+this.smaskCounter++%2)
1359const m=this.cachedCanvases.getCanvas(f,c,h),g=m.context
1360g.scale(1/d,1/p),g.translate(-o,-l),g.transform(...r),e.smask?this.smaskStack.push({canvas:m.canvas,context:g,offsetX:o,offsetY:l,scaleX:d,scaleY:p,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,l),t.scale(d,p),t.save()),v(t,g),this.ctx=g,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return
1361this.groupLevel--
1362const t=this.ctx,r=this.groupStack.pop()
1363if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore()
1364else{this.ctx.restore()
1365const e=(0,i.getCurrentTransform)(this.ctx)
1366this.restore(),this.ctx.save(),this.ctx.setTransform(...e)
1367const r=n.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e)
1368this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(r)}}beginAnnotation(e,t,r,a,s){if(c(this,T,R).call(this),b(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(t)&&4===t.length){const a=t[2]-t[0],o=t[3]-t[1]
1369if(s&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=a,t[3]=o
1370const[s,l]=n.Util.singularValueDecompose2dScale((0,i.getCurrentTransform)(this.ctx)),{viewportScale:c}=this,u=Math.ceil(a*this.outputScaleX*c),h=Math.ceil(o*this.outputScaleY*c)
1371this.annotationCanvas=this.canvasFactory.create(u,h)
1372const{canvas:d,context:p}=this.annotationCanvas
1373this.annotationCanvasMap.set(e,d),this.annotationCanvas.savedCtx=this.ctx,this.ctx=p,this.ctx.save(),this.ctx.setTransform(s,0,0,-l,0,o*l),b(this.ctx)}else b(this.ctx),this.ctx.rect(t[0],t[1],a,o),this.ctx.clip(),this.endPath()}this.current=new f(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...a)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),c(this,E,F).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return
1374const t=e.count;(e=this.getObject(e.data,e)).count=t
1375const r=this.ctx,n=this.processingType3
1376if(n&&(void 0===n.compiled&&(n.compiled=function(e){const{width:t,height:r}=e
1377if(t>1e3||r>1e3)return null
1378const n=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=t+1
1379let a,s,o,l=new Uint8Array(i*(r+1))
1380const c=t+7&-8
1381let u=new Uint8Array(c*r),h=0
1382for(const t of e.data){let e=128
1383for(;e>0;)u[h++]=t&e?0:255,e>>=1}let d=0
1384for(h=0,0!==u[h]&&(l[0]=1,++d),s=1;s<t;s++)u[h]!==u[h+1]&&(l[s]=u[h]?2:1,++d),h++
1385for(0!==u[h]&&(l[s]=2,++d),a=1;a<r;a++){h=a*c,o=a*i,u[h-c]!==u[h]&&(l[o]=u[h]?1:8,++d)
1386let e=(u[h]?4:0)+(u[h-c]?8:0)
1387for(s=1;s<t;s++)e=(e>>2)+(u[h+1]?4:0)+(u[h-c+1]?8:0),n[e]&&(l[o+s]=n[e],++d),h++
1388if(u[h-c]!==u[h]&&(l[o+s]=u[h]?2:4,++d),d>1e3)return null}for(h=c*(r-1),o=a*i,0!==u[h]&&(l[o]=8,++d),s=1;s<t;s++)u[h]!==u[h+1]&&(l[o+s]=u[h]?4:8,++d),h++
1389if(0!==u[h]&&(l[o+s]=4,++d),d>1e3)return null
1390const p=new Int32Array([0,i,-1,0,-i,0,0,0,1]),f=new Path2D
1391for(a=0;d&&a<=r;a++){let e=a*i
1392const r=e+t
1393for(;e<r&&!l[e];)e++
1394if(e===r)continue
1395f.moveTo(e%i,a)
1396const n=e
1397let s=l[e]
1398do{const t=p[s]
1399do{e+=t}while(!l[e])
1400const r=l[e]
14015!==r&&10!==r?(s=r,l[e]=0):(s=r&51*s>>4,l[e]&=s>>2|s<<2),f.lineTo(e%i,e/i|0),l[e]||--d}while(n!==e);--a}return u=null,l=null,function(e){e.save(),e.scale(1/t,-1/r),e.translate(0,-r),e.fill(f),e.beginPath(),e.restore(
1401)}}(e)),n.compiled))return void n.compiled(r)
1402const i=this._createMaskCanvas(e),a=i.canvas
1403r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(a,i.offsetX,i.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0
1404if(!this.contentVisible)return
1405e=this.getObject(e.data,e)
1406const l=this.ctx
1407l.save()
1408const c=(0,i.getCurrentTransform)(l)
1409l.transform(t,r,a,s,0,0)
1410const u=this._createMaskCanvas(e)
1411l.setTransform(1,0,0,1,u.offsetX-c[4],u.offsetY-c[5])
1412for(let e=0,i=o.length;e<i;e+=2){const i=n.Util.transform(c,[t,r,a,s,o[e],o[e+1]]),[h,d]=n.Util.applyTransform([0,0],i)
1413l.drawImage(u.canvas,h,d)}l.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return
1414const t=this.ctx,r=this.current.fillColor,n=this.current.patternFill
1415for(const s of e){const{data:e,width:o,height:l,transform:c}=s,u=this.cachedCanvases.getCanvas("maskCanvas",o,l),h=u.context
1416h.save(),g(h,this.getObject(e,s)),h.globalCompositeOperation="source-in",h.fillStyle=n?r.getPattern(h,this,(0,i.getCurrentTransformInverse)(t),a.PathType.FILL):r,h.fillRect(0,0,o,l),h.restore(
1416),t.save(),t.transform(...c),t.scale(1,-1),p(t,u.canvas,0,0,o,l,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return
1417const t=this.getObject(e)
1418t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,r,i){if(!this.contentVisible)return
1419const a=this.getObject(e)
1420if(!a)return void(0,n.warn)("Dependent image isn't ready yet")
1421const s=a.width,o=a.height,l=[]
1422for(let e=0,n=i.length;e<n;e+=2)l.push({transform:[t,0,0,r,i[e],i[e+1]],x:0,y:0,w:s,h:o})
1423this.paintInlineImageXObjectGroup(a,l)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap
1424const{bitmap:t,width:r,height:n}=e,i=this.cachedCanvases.getCanvas("inlineImage",r,n),a=i.context
1425return a.filter=this.current.transferMaps,a.drawImage(t,0,0),a.filter="none",i.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return
1426const t=e.width,r=e.height,n=this.ctx
1427let a
1428if(this.save(),o.isNodeJS||(n.filter="none"),n.scale(1/t,-1/r),e.bitmap)a=this.applyTransferMapsToBitmap(e)
1429else if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)a=e
1430else{const n=this.cachedCanvases.getCanvas("inlineImage",t,r).context
1431m(n,e),a=this.applyTransferMapsToCanvas(n)}const s=this._scaleImage(a,(0,i.getCurrentTransformInverse)(n))
1432n.imageSmoothingEnabled=S((0,i.getCurrentTransform)(n),e.interpolate),p(n,s.img,0,0,s.paintWidth,s.paintHeight,0,-r,t,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return
1433const r=this.ctx
1434let n
1435if(e.bitmap)n=e.bitmap
1436else{const t=e.width,r=e.height,i=this.cachedCanvases.getCanvas("inlineImage",t,r).context
1437m(i,e),n=this.applyTransferMapsToCanvas(i)}for(const e of t)r.save(),r.transform(...e.transform),r.scale(1,-1),p(r,n,e.x,e.y,e.w,e.h,0,-1,1,1),r.restore()
1438this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip()
1439this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e)
1440const r=this.ctx
1441this.pendingClip&&(t||(this.pendingClip===C?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=(0,i.getCurrentTransform)(this.ctx)
1442if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]))
1443else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),n=Math.hypot(e[1],e[3])
1444this._cachedGetSinglePixelWidth=Math.max(r,n)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(!this._cachedScaleForStroking){const{lineWidth:e}=this.current,t=(0,i.getCurrentTransform)(this.ctx)
1445let r,n
1446if(0===t[1]&&0===t[2]){const i=Math.abs(t[0]),a=Math.abs(t[3])
1447if(0===e)r=1/i,n=1/a
1448else{const t=i*e,s=a*e
1449r=t<1?1/t:1,n=s<1?1/s:1}}else{const i=Math.abs(t[0]*t[3]-t[2]*t[1]),a=Math.hypot(t[0],t[1]),s=Math.hypot(t[2],t[3])
1450if(0===e)r=s/i,n=a/i
1451else{const t=e*i
1452r=s>t?s/t:1,n=a>t?a/t:1}}this._cachedScaleForStroking=[r,n]}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:r}=this.current,[n,a]=this.getScaleForStroking()
1453if(t.lineWidth=r||1,1===n&&1===a)return void t.stroke()
1454let s,o,l
1455e&&(s=(0,i.getCurrentTransform)(t),o=t.getLineDash().slice(),l=t.lineDashOffset),t.scale(n,a)
1456const c=Math.max(n,a)
1457t.setLineDash(t.getLineDash().map((e=>e/c))),t.lineDashOffset/=c,t.stroke(),e&&(t.setTransform(...s),t.setLineDash(o),t.lineDashOffset=l)}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1
1458return!0}}function R(){for(;this.stateStack.length||this.inSMaskMode;
1458)this.restore()
1459this.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)}function F(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background)
1460if("none"!==e){const t=this.ctx.filter
1461this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}t.CanvasGraphics=k
1462for(const e in n.OPS)void 0!==k.prototype[e]&&(k.prototype[n.OPS[e]]=k.prototype[e])},(e,t,r)=>{"use strict"
1463Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new l(e)
1464case"Mesh":return new h(e)
1465case"Dummy":return new d}throw new Error(`Unknown IR type: ${e[0]}`)}
1466var n=r(1),i=r(142)
1467const a={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"}
1468function s(e,t){if(!t)return
1469const r=t[2]-t[0],n=t[3]-t[1],i=new Path2D
1470i.rect(t[0],t[1],r,n),e.clip(i)}t.PathType=a
1471class o{constructor(){this.constructor===o&&(0,n.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,n.unreachable)("Abstract method `getPattern` called.")}}class l extends o{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t
1472"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1))
1473for(const e of this._colorStops)t.addColorStop(e[0],e[1])
1474return t}getPattern(e,t,r,o){let l
1475if(o===a.STROKE||o===a.FILL){const a=t.current.getClippedPathBoundingBox(o,(0,i.getCurrentTransform)(e))||[0,0,0,0],c=Math.ceil(a[2]-a[0])||1,u=Math.ceil(a[3]-a[1])||1,h=t.cachedCanvases.getCanvas("pattern",c,u,!0),d=h.context
1476d.clearRect(0,0,d.canvas.width,d.canvas.height),d.beginPath(),d.rect(0,0,d.canvas.width,d.canvas.height),d.translate(-a[0],-a[1]),r=n.Util.transform(r,[1,0,0,1,a[0],a[1]]),d.transform(...t.baseTransform),this.matrix&&d.transform(...this.matrix),s(d,this._bbox),d.fillStyle=this._createGradient(d),d.fill(),l=e.createPattern(h.canvas,"no-repeat")
1477const p=new DOMMatrix(r)
1478l.setTransform(p)}else s(e,this._bbox),l=this._createGradient(e)
1479return l}}function c(e,t,r,n,i,a,s,o){const l=t.coords,c=t.colors,u=e.data,h=4*e.width
1480let d
1481l[r+1]>l[n+1]&&(d=r,r=n,n=d,d=a,a=s,s=d),l[n+1]>l[i+1]&&(d=n,n=i,i=d,d=s,s=o,o=d),l[r+1]>l[n+1]&&(d=r,r=n,n=d,d=a,a=s,s=d)
1482const p=(l[r]+t.offsetX)*t.scaleX,f=(l[r+1]+t.offsetY)*t.scaleY,m=(l[n]+t.offsetX)*t.scaleX,g=(l[n+1]+t.offsetY)*t.scaleY,v=(l[i]+t.offsetX)*t.scaleX,b=(l[i+1]+t.offsetY)*t.scaleY
1483if(f>=b)return
1484const _=c[a],y=c[a+1],A=c[a+2],S=c[s],w=c[s+1],x=c[s+2],P=c[o],C=c[o+1],T=c[o+2],E=Math.round(f),k=Math.round(b)
1485let R,F,M,O,I,D,L,j
1486for(let e=E;e<=k;e++){if(e<g){let t
1487t=e<f?0:(f-e)/(f-g),R=p-(p-m)*t,F=_-(_-S)*t,M=y-(y-w)*t,O=A-(A-x)*t}else{let t
1488t=e>b?1:g===b?0:(g-e)/(g-b),R=m-(m-v)*t,F=S-(S-P)*t,M=w-(w-C)*t,O=x-(x-T)*t}let t
1489t=e<f?0:e>b?1:(f-e)/(f-b),I=p-(p-v)*t,D=_-(_-P)*t,L=y-(y-C)*t,j=A-(A-T)*t
1490const r=Math.round(Math.min(R,I)),n=Math.round(Math.max(R,I))
1491let i=h*e+4*r
1492for(let e=r;e<=n;e++)t=(R-e)/(R-I),t<0?t=0:t>1&&(t=1),u[i++]=F-(F-D)*t|0,u[i++]=M-(M-L)*t|0,u[i++]=O-(O-j)*t|0,u[i++]=255}}function u(e,t,r){const n=t.coords,i=t.colors
1493let a,s
1494switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(n.length/o)-1,u=o-1
1495for(a=0;a<l;a++){let t=a*o
1496for(let a=0;a<u;a++,t++)c(e,r,n[t],n[t+1],n[t+o],i[t],i[t+1],i[t+o]),c(e,r,n[t+o+1],n[t+1],n[t+o],i[t+o+1],i[t+1],i[t+o])}break
1497case"triangles":for(a=0,s=n.length;a<s;a+=3)c(e,r,n[a],n[a+1],n[a+2],i[a],i[a+1],i[a+2])
1498break
1499default:throw new Error("illegal figure")}}class h extends o{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,r){const n=Math.floor(this._bounds[0]),i=Math.floor(this._bounds[1]),a=Math.ceil(this._bounds[2])-n,s=Math.ceil(this._bounds[3])-i,o=Math.min(Math.ceil(Math.abs(a*e[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(s*e[1]*1.1)),3e3),c=a/o,h=s/l,d={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-i,scaleX:1/c,scaleY:1/h},p=o+4,f=l+4,m=r.getCanvas("mesh",p,f,!1),g=m.context,v=g.createImageData(o,l)
1500if(t){const e=v.data
1501for(let r=0,n=e.length;r<n;r+=4)e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=255}for(const e of this._figures)u(v,e,d)
1502return g.putImageData(v,2,2),{canvas:m.canvas,offsetX:n-2*c,offsetY:i-2*h,scaleX:c,scaleY:h}}getPattern(e,t,r,o){let l
1503if(s(e,this._bbox),o===a.SHADING)l=n.Util.singularValueDecompose2dScale((0,i.getCurrentTransform)(e))
1504else if(l=n.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix
1504){const e=n.Util.singularValueDecompose2dScale(this.matrix)
1505l=[l[0]*e[0],l[1]*e[1]]}const c=this._createMeshCanvas(l,o===a.SHADING?null:this._background,t.cachedCanvases)
1506return o!==a.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(c.offsetX,c.offsetY),e.scale(c.scaleX,c.scaleY),e.createPattern(c.canvas,"no-repeat")}}class d extends o{getPattern(){return"hotpink"}}class p{constructor(e,t,r,n,i){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=r,this.canvasGraphicsFactory=n,this.baseTransform=i}createPatternCanvas(e){const t=this.operatorList,r=this.bbox,a=this.xstep,s=this.ystep,o=this.paintType,l=this.tilingType,c=this.color,u=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+l)
1507const h=r[0],d=r[1],p=r[2],f=r[3],m=n.Util.singularValueDecompose2dScale(this.matrix),g=n.Util.singularValueDecompose2dScale(this.baseTransform),v=[m[0]*g[0],m[1]*g[1]],b=this.getSizeAndScale(a,this.ctx.canvas.width,v[0]),_=this.getSizeAndScale(s,this.ctx.canvas.height,v[1]),y=e.cachedCanvases.getCanvas("pattern",b.size,_.size,!0),A=y.context,S=u.createCanvasGraphics(A)
1508S.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(S,o,c)
1509let w=h,x=d,P=p,C=f
1510return h<0&&(w=0,P+=Math.abs(h)),d<0&&(x=0,C+=Math.abs(d)),A.translate(-b.scale*w,-_.scale*x),S.transform(b.scale,0,0,_.scale,0,0),A.save(),this.clipBbox(S,w,x,P,C),S.baseTransform=(0,i.getCurrentTransform)(S.ctx),S.executeOperatorList(t),S.endDrawing(),{canvas:y.canvas,scaleX:b.scale,scaleY:_.scale,offsetX:w,offsetY:x}}getSizeAndScale(e,t,r){e=Math.abs(e)
1511const n=Math.max(p.MAX_PATTERN_SIZE,t)
1512let i=Math.ceil(e*r)
1513return i>=n?i=n:r=i/e,{scale:r,size:i}}clipBbox(e,t,r,n,a){const s=n-t,o=a-r
1514e.ctx.rect(t,r,s,o),e.current.updateRectMinMax((0,i.getCurrentTransform)(e.ctx),[t,r,n,a]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,r){const i=e.ctx,a=e.current
1515switch(t){case 1:const e=this.ctx
1516i.fillStyle=e.fillStyle,i.strokeStyle=e.strokeStyle,a.fillColor=e.fillStyle,a.strokeColor=e.strokeStyle
1517break
1518case 2:const s=n.Util.makeHexColor(r[0],r[1],r[2])
1519i.fillStyle=s,i.strokeStyle=s,a.fillColor=s,a.strokeColor=s
1520break
1521default:throw new n.FormatError(`Unsupported paint type: ${t}`)}}getPattern(e,t,r,i){let s=r
1522i!==a.SHADING&&(s=n.Util.transform(s,t.baseTransform),this.matrix&&(s=n.Util.transform(s,this.matrix)))
1523const o=this.createPatternCanvas(t)
1524let l=new DOMMatrix(s)
1525l=l.translate(o.offsetX,o.offsetY),l=l.scale(1/o.scaleX,1/o.scaleY)
1526const c=e.createPattern(o.canvas,"repeat")
1527return c.setTransform(l),c}}_defineProperty2(p,"MAX_PATTERN_SIZE",3e3),t.TilingPattern=p},(e,t,r)=>{"use strict"
1528Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=i,t.convertToRGBA=function(e){switch(e.kind){case n.ImageKind.GRAYSCALE_1BPP:return i(e)
1529case n.ImageKind.RGB_24BPP:return function(e){let{src:t,srcPos:r=0,dest:i,destPos:a=0,width:s,height:o}=e,l=0
1530const c=t.length>>2,u=new Uint32Array(t.buffer,r,c)
1531if(n.FeatureTest.isLittleEndian){for(;l<c-2;l+=3,a+=4){const e=u[l],t=u[l+1],r=u[l+2]
1532i[a]=4278190080|e,i[a+1]=e>>>24|t<<8|4278190080,i[a+2]=t>>>16|r<<16|4278190080,i[a+3]=r>>>8|4278190080}for(let e=4*l,r=t.length;e<r;e+=3)i[a++]=t[e]|t[e+1]<<8|t[e+2]<<16|4278190080}else{for(;l<c-2;l+=3,a+=4){const e=u[l],t=u[l+1],r=u[l+2]
1533i[a]=255|e,i[a+1]=e<<24|t>>>8|255,i[a+2]=t<<16|r>>>16|255,i[a+3]=r<<8|255}for(let e=4*l,r=t.length;e<r;e+=3)i[a++]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|255}return{srcPos:r,destPos:a}}(e)}return null},t.grayToRGBA=function(e,t){if(n.FeatureTest.isLittleEndian)for(let r=0,n=e.length;r<n;r++)t[r]=65793*e[r]|4278190080
1534else for(let r=0,n=e.length;r<n;r++)t[r]=16843008*e[r]|255}
1535var n=r(1)
1536function i(e){let{src:t,srcPos:r=0,dest:i,width:a,height:s,nonBlackColor:o=4294967295,inverseDecode:l=!1}=e
1537const c=n.FeatureTest.isLittleEndian?4278190080:255,[u,h]=l?[o,c]:[c,o],d=a>>3,p=7&a,f=t.length
1538i=new Uint32Array(i.buffer)
1539let m=0
1540for(let e=0;e<s;e++){for(const e=r+d;r<e;r++){const e=r<f?t[r]:255
1541i[m++]=128&e?h:u,i[m++]=64&e?h:u,i[m++]=32&e?h:u,i[m++]=16&e?h:u,i[m++]=8&e?h:u,i[m++]=4&e?h:u,i[m++]=2&e?h:u,i[m++]=1&e?h:u}if(0===p)continue
1542const e=r<f?t[r++]:255
1543for(let t=0;t<p;t++)i[m++]=e&1<<7-t?h:u}return{srcPos:r,destPos:m}}},(e,t)=>{"use strict"
1544Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0
1545const r=Object.create(null)
1546t.GlobalWorkerOptions=r,r.workerPort=null,r.workerSrc=""},(e,t,r)=>{"use strict"
1547Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0
1548var n=r(1)
1549function i(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
1550return r}function s(e){switch(e instanceof Error||"object"==typeof e&&null!==e||(0,n.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new n.AbortException(e.message)
1551case"MissingPDFException":return new n.MissingPDFException(e.message)
1552case"PasswordException":return new n.PasswordException(e.message,e.code)
1553case"UnexpectedResponseException":return new n.UnexpectedResponseException(e.message,e.status)
1554case"UnknownErrorException":return new n.UnknownErrorException(e.message,e.details)
1555default:return new n.UnknownErrorException(e.message,e.toString())}}var o=new WeakSet,l=new WeakSet,c=new WeakSet
1556function u(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,a=this.comObj,o=this,l=this.actionHandler[e.action],c={enqueue(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0
1557if(this.isCancelled)return
1558const l=this.desiredSize
1559this.desiredSize-=s,l>0&&this.desiredSize<=0&&(this.sinkCapability=new n.PromiseCapability,this.ready=this.sinkCapability.promise),a.postMessage({sourceName:r,targetName:i,stream:4,streamId:t,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:i,stream:3,streamId:t}),delete o.streamSinks[t])},error(e){(0,n.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:i,stream:5,streamId:t,reason:s(e)}))},sinkCapability:new n.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null}
1560c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,new Promise((function(t){t(l(e.data,c))})).then((function(){a.postMessage({sourceName:r,targetName:i,stream:8,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:i,stream:8,streamId:t,reason:s(e)})}))}function h(e){const t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,l=this.streamControllers[t],u=this.streamSinks[t]
1561switch(e.stream){case 8:e.success?l.startCall.resolve():l.startCall.reject(s(e.reason))
1562break
1563case 7:e.success?l.pullCall.resolve():l.pullCall.reject(s(e.reason))
1564break
1565case 6:if(!u){o.postMessage({sourceName:r,targetName:i,stream:7,streamId:t,success:!0})
1566break}u.desiredSize<=0&&e.desiredSize>0&&u.sinkCapability.resolve(),u.desiredSize=e.desiredSize,new Promise((function(e){var t
1567e(null===(t=u.onPull)||void 0===t?void 0:t.call(u))})).then((function(){o.postMessage({sourceName:r,targetName:i,stream:7,streamId:t,success:!0})}),(function(e){o.postMessage({sourceName:r,targetName:i,stream:7,streamId:t,reason:s(e)})}))
1568break
1569case 4:if((0,n.assert)(l,"enqueue should have stream controller"),l.isClosed)break
1570l.controller.enqueue(e.chunk)
1571break
1572case 3:if((0,n.assert)(l,"close should have stream controller"),l.isClosed)break
1573l.isClosed=!0,l.controller.close(),a(this,c,d).call(this,l,t)
1574break
1575case 5:(0,n.assert)(l,"error should have stream controller"),l.controller.error(s(e.reason)),a(this,c,d).call(this,l,t)
1576break
1577case 2:e.success?l.cancelCall.resolve():l.cancelCall.reject(s(e.reason)),a(this,c,d).call(this,l,t)
1578break
1579case 1:if(!u)break
1580new Promise((function(t){var r
1581t(null===(r=u.onCancel)||void 0===r?void 0:r.call(u,s(e.reason)))})).then((function(){o.postMessage({sourceName:r,targetName:i,stream:2,streamId:t,success:!0})}),(function(e){o.postMessage({sourceName:r,targetName:i,stream:2,streamId:t,reason:s(e)})})),u.sinkCapability.reject(s(e.reason)),u.isCancelled=!0,delete this.streamSinks[t]
1582break
1583default:throw new Error("Unexpected stream case")}}async function d(e,t){var r,n,i
1584await Promise.allSettled([null===(r=e.startCall)||void 0===r?void 0:r.promise,null===(n=e.pullCall)||void 0===n?void 0:n.promise,null===(i=e.cancelCall)||void 0===i?void 0:i.promise]),delete this.streamControllers[t]}t.MessageHandler=class{constructor(e,t,r){i(this,c),i(this,l),i(this,o),this.sourceName=e,this.targetName=t,this.comObj=r,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=e=>{const t=e.data
1585if(t.targetName!==this.sourceName)return
1586if(t.stream)return void a(this,l,h).call(this,t)
1587if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e]
1588if(!r)throw new Error(`Cannot resolve callback ${e}`)
1589if(delete this.callbackCapabilities[e],1===t.callback)r.resolve(t.data)
1590else{if(2!==t.callback)throw new Error("Unexpected callback case")
1591r.reject(s(t.reason))}return}const n=this.actionHandler[t.action]
1592if(!n)throw new Error(`Unknown action from worker: ${t.action}`)
1593if(t.callbackId){const e=this.sourceName,i=t.sourceName
1594new Promise((function(e){e(n(t.data))})).then((function(n){r.postMessage({sourceName:e,targetName:i,callback:1,callbackId:t.callbackId,data:n})}),(function(n){r.postMessage({sourceName:e,targetName:i,callback:2,callbackId:t.callbackId,reason:s(n)})}))}else t.streamId?a(this,o,u).call(this,t):n(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler
1595if(r[e])throw new Error(`There is already an actionName called "${e}"`)
1596r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}
1596sendWithPromise(e,t,r){const i=this.callbackId++,a=new n.PromiseCapability
1597this.callbackCapabilities[i]=a
1598try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},r)}catch(e){a.reject(e)}return a.promise}sendWithStream(e,t,r,i){const a=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj
1599return new ReadableStream({start:r=>{const s=new n.PromiseCapability
1600return this.streamControllers[a]={controller:r,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:o,targetName:l,action:e,streamId:a,data:t,desiredSize:r.desiredSize},i),s.promise},pull:e=>{const t=new n.PromiseCapability
1601return this.streamControllers[a].pullCall=t,c.postMessage({sourceName:o,targetName:l,stream:6,streamId:a,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,n.assert)(e instanceof Error,"cancel must have a valid reason")
1602const t=new n.PromiseCapability
1603return this.streamControllers[a].cancelCall=t,this.streamControllers[a].isClosed=!0,c.postMessage({sourceName:o,targetName:l,stream:1,streamId:a,reason:s(e)}),t.promise}},r)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,r)=>{"use strict"
1604var n,i
1605Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0
1606var a=r(1)
1607t.Metadata=(n=new WeakMap,i=new WeakMap,class{constructor(e){_classPrivateFieldInitSpec2(this,n,{writable:!0,value:void 0}),_classPrivateFieldInitSpec2(this,i,{writable:!0,value:void 0})
1608let{parsedData:t,rawData:r}=e
1609_classPrivateFieldSet2(this,n,t),_classPrivateFieldSet2(this,i,r)}getRaw(){return _classPrivateFieldGet3(this,i)}get(e){return _classPrivateFieldGet3(this,n).get(e)??null}getAll(){return(0,a.objectFromMap)(_classPrivateFieldGet3(this,n))}has(e){return _classPrivateFieldGet3(this,n).has(e)}})},(e,t,r)=>{"use strict"
1610Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0
1611var n=r(1),i=r(144)
1612function a(e,t,r){s(e,t),t.set(e,r)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
1613return r}function l(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,u(e,t,"get"))}function c(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r)
1614else{if(!t.writable)throw new TypeError("attempted to set read only private field")
1615t.value=r}}(e,u(e,t,"set"),r),r}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
1616return t.get(e)}const h=Symbol("INTERNAL")
1617var d=new WeakMap
1618class p{constructor(e,t){_classPrivateFieldInitSpec2(this,d,{writable:!0,value:!0}),this.name=e,this.intent=t}get visible(){return _classPrivateFieldGet3(this,d)}_setVisible(e,t){e!==h&&(0,n.unreachable)("Internal method `_setVisible` called."),_classPrivateFieldSet2(this,d,t)}}var f=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,b=new WeakSet
1619function _(e){const t=e.length
1620if(t<2)return!0
1621const r=e[0]
1622for(let i=1;i<t;i++){const t=e[i]
1623let a
1624if(Array.isArray(t))a=o(this,b,_).call(this,t)
1625else{if(!l(this,m).has(t))return(0,n.warn)(`Optional content group not found: ${t}`),!0
1626a=l(this,m).get(t).visible}switch(r){case"And":if(!a)return!1
1627break
1628case"Or":if(a)return!0
1629break
1630case"Not":return!a
1631default:return!0}}return"And"===r}t.OptionalContentConfig=class{constructor(e){if(function(e,t){s(e,t),t.add(e)}(this,b),a(this,f,{writable:!0,value:null}),a(this,m,{writable:!0,value:new Map}),a(this,g,{writable:!0,value:null}),a(this,v,{writable:!0,value:null}),this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,c(this,v,e.order)
1632for(const t of e.groups)l(this,m).set(t.id,new p(t.name,t.intent))
1633if("OFF"===e.baseState)for(const e of l(this,m).values())e._setVisible(h,!1)
1634for(const t of e.on)l(this,m).get(t)._setVisible(h,!0)
1635for(const t of e.off)l(this,m).get(t)._setVisible(h,!1)
1636c(this,g,this.getHash())}}isVisible(e){if(0===l(this,m).size)return!0
1637if(!e)return(0,n.warn)("Optional content group not defined."),!0
1638if("OCG"===e.type)return l(this,m).has(e.id)?l(this,m).get(e.id).visible:((0,n.warn)(`Optional content group not found: ${e.id}`),!0)
1639if("OCMD"===e.type){if(e.expression)return o(this,b,_).call(this,e.expression)
1640if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!l(this,m).has(t))return(0,n.warn)(`Optional content group not found: ${t}`),!0
1641if(l(this,m).get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!l(this,m).has(t))return(0,n.warn)(`Optional content group not found: ${t}`),!0
1642if(!l(this,m).get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!l(this,m).has(t))return(0,n.warn)(`Optional content group not found: ${t}`),!0
1643if(!l(this,m).get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!l(this,m).has(t))return(0,n.warn)(`Optional content group not found: ${t}`),!0
1644if(l(this,m).get(t).visible)return!1}return!0}return(0,n.warn)(`Unknown optional content policy ${e.policy}.`),!0}return(0,n.warn)(`Unknown group type ${e.type}.`),!0}setVisibility(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]
1645l(this,m).has(e)?(l(this,m).get(e)._setVisible(h,!!t),c(this,f,null)):(0,n.warn)(`Optional content group not found: ${e}`)}get hasInitialVisibility(){return this.getHash()===l(this,g)}getOrder(){return l(this,m).size?l(this,v)?l(this,v).slice():[...l(this,m).keys()]:null}getGroups(){return l(this,m).size>0?(0,n.objectFromMap)(l(this,m)):null}getGroup(e){return l(this,m).get(e)||null}getHash(){if(null!==l(this,f))return l(this,f)
1646const e=new i.MurmurHash3_64
1647for(const[t,r]of l(this,m))e.update(`${t}:${r.visible}`)
1648return c(this,f,e.hexdigest())}}},(e,t,r)=>{"use strict"
1649Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0
1650var n=r(1),i=r(142)
1651t.PDFDataTransportStream=class{constructor(e,t){let{length:r,initialData:i,progressiveDone:a=!1,contentDispositionFilename:s=null,disableRange:o=!1,disableStream:l=!1}=e
1652if((0,n.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=a,this._contentDispositionFilename=s,(null==i?void 0:i.length)>0){const e=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer
1653this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!l,this._isRangeSupported=!o,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){let{begin:t,chunk:r}=e
1654const i=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer
1655if(void 0===t)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i)
1656else{const e=this._rangeReaders.some((function(e){return e._begin===t&&(e._enqueue(i),!0)}));(0,n.assert)(e,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var e
1657return(null===(e=this._fullRequestReader)||void 0===e?void 0:e._loaded)??0}_onProgress(e){var t,r,n,i
1658void 0===e.total?null===(t=this._rangeReaders[0])||void 0===t||null===(r=t.onProgress)||void 0===r||r.call(t,{loaded:e.loaded}):null===(n=this._fullRequestReader)||void 0===n||null===(i=n.onProgress)||void 0===i||i.call(n,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e
1659null===(e=this._fullRequestReader)||void 0===e||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e)
1660t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,n.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.")
1661const e=this._queuedChunks
1662return this._queuedChunks=null,new a(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null
1663const r=new s(this,e,t)
1664return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){var t
1665null===(t=this._fullRequestReader)||void 0===t||t.cancel(e)
1666for(const t of this._rangeReaders.slice(0))t.cancel(e)
1667this._pdfDataRangeTransport.abort()}}
1668class a{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null
1669this._stream=e,this._done=r||!1,this._filename=(0,i.isPdfFile)(n)?n:null,this._queuedChunks=t||[],this._loaded=0
1670for(const e of this._queuedChunks)this._loaded+=e.byteLength
1671this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.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}
1672if(this._done)return{value:void 0,done:!0}
1673const e=new n.PromiseCapability
1674return this._requests.push(e),e.promise}cancel(e){this._done=!0
1675for(const e of this._requests)e.resolve({value:void 0,done:!0})
1676this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class s{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e
1677else{this._requests.shift().resolve({value:e,done:!1})
1678for(const e of this._requests)e.resolve({value:void 0,done:!0})
1679this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk
1680return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0}
1681const e=new n.PromiseCapability
1682return this._requests.push(e),e.promise}cancel(e){this._done=!0
1683for(const e of this._requests)e.resolve({value:void 0,done:!0})
1684this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t)=>{"use strict"
1685Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0
1686class r{static textContent(e){const t=[],n={items:t,styles:Object.create(null)}
1687return function e(n){var i
1688if(!n)return
1689let a=null
1690const s=n.name
1691if("#text"===s)a=n.value
1692else{if(!r.shouldBuildText(s))return
1693null!=n&&null!==(i=n.attributes)&&void 0!==i&&i.textContent?a=n.attributes.textContent:n.value&&(a=n.value)}if(null!==a&&t.push({str:a}),n.children)for(const t of n.children)e(t)}(e),n}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=r},(e,t,r)=>{"use strict"
1694Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0
1695var n=r(143)
1696const i=function(e){return new Promise(((t,r)=>{__webpack_require__(15365).readFile(e,((e,n)=>{!e&&n?t(new Uint8Array(n)):r(new Error(e))}))}))}
1697class a extends n.BaseFilterFactory{}t.NodeFilterFactory=a
1698class s extends n.BaseCanvasFactory{_createCanvas(e,t){return __webpack_require__(25352).createCanvas(e,t)}}t.NodeCanvasFactory=s
1699class o extends n.BaseCMapReaderFactory{_fetchData(e,t){return i(e).then((e=>({cMapData:e,compressionType:t})))}}t.NodeCMapReaderFactory=o
1700class l extends n.BaseStandardFontDataFactory{_fetchData(e){return i(e)}}t.NodeStandardFontDataFactory=l},(e,t,r)=>{"use strict"
1701Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0
1702var n=r(1),i=r(157)
1703const a=__webpack_require__(15365),s=__webpack_require__(98196),o=__webpack_require__(1671),l=__webpack_require__(26959),c=/^file:\/\/\/[a-zA-Z]:\//
1704t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=l.parse(e)
1705return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse(`file:///${e}`):(t.host||(t.protocol="file:"),t)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e
1706return(null===(e=this._fullRequestReader)||void 0===e?void 0:e._loaded)??0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new m(this):new p(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null
1707const r=this.isFsUrl?new g(this,e,t):new f(this,e,t)
1708return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t
1709null===(t=this._fullRequestReader)||void 0===t||t.cancel(e)
1710for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}
1711class u{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null
1712const t=e.source
1713this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.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(){var e
1714if(await this._readCapability.promise,this._done)return{value:void 0,done:!0}
1715if(this._storedError)throw this._storedError
1716const t=this._readableStream.read()
1717return null===t?(this._readCapability=new n.PromiseCapability,this.read()):(this._loaded+=t.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new n.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class h{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new n.PromiseCapability
1718const t=e.source
1719this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e
1720if(await this._readCapability.promise,this._done)return{value:void 0,done:!0}
1721if(this._storedError)throw this._storedError
1722const t=this._readableStream.read()
1723return null===t?(this._readCapability=new n.PromiseCapability,this.read()):(this._loaded+=t.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function d(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class p extends u{constructor(e){super(e)
1724const t=t=>
1724{if(404===t.statusCode){const e=new n.MissingPDFException(`Missing PDF "${this._url}".`)
1725return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t)
1726const r=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:a,suggestedLength:s}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange})
1727this._isRangeSupported=a,this._contentLength=s||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r)}
1728this._request=null,"http:"===this._url.protocol?this._request=s.request(d(this._url,e.httpHeaders),t):this._request=o.request(d(this._url,e.httpHeaders),t),this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class f extends h{constructor(e,t,r){super(e),this._httpHeaders={}
1729for(const t in e.httpHeaders){const r=e.httpHeaders[t]
1730void 0!==r&&(this._httpHeaders[t]=r)}this._httpHeaders.Range=`bytes=${t}-${r-1}`
1731const i=e=>{if(404!==e.statusCode)this._setReadableStream(e)
1732else{const e=new n.MissingPDFException(`Missing PDF "${this._url}".`)
1733this._storedError=e}}
1734this._request=null,"http:"===this._url.protocol?this._request=s.request(d(this._url,this._httpHeaders),i):this._request=o.request(d(this._url,this._httpHeaders),i),this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class m extends u{constructor(e){super(e)
1735let t=decodeURIComponent(this._url.path)
1736c.test(this._url.href)&&(t=t.replace(/^\//,"")),a.lstat(t,((e,r)=>{e?("ENOENT"===e.code&&(e=new n.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,this._headersCapability.reject(e)):(this._contentLength=r.size,this._setReadableStream(a.createReadStream(t)),this._headersCapability.resolve())}))}}class g extends h{constructor(e,t,r){super(e)
1737let n=decodeURIComponent(this._url.path)
1738c.test(this._url.href)&&(n=n.replace(/^\//,"")),this._setReadableStream(a.createReadStream(n,{start:t,end:r-1}))}}},(e,t,r)=>{"use strict"
1739Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition")
1740if(t){let r=(0,i.getFilenameFromContentDispositionHeader)(t)
1741if(r.includes("%"))try{r=decodeURIComponent(r)}catch(e){}if((0,a.isPdfFile)(r))return r}return null},t.validateRangeRequestCapabilities=function(e){let{getResponseHeader:t,isHttp:r,rangeChunkSize:n,disableRange:i}=e
1742const a={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10)
1743return Number.isInteger(s)?(a.suggestedLength=s,s<=2*n||i||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(a.allowRangeRequests=!0),a):a},t.validateResponseStatus=function(e){return 200===e||206===e}
1744var n=r(1),i=r(158),a=r(142)},(e,t,r)=>{"use strict"
1745Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,r=i("filename\\*","i").exec(e)
1746if(r){r=r[1]
1747let e=o(r)
1748return e=unescape(e),e=l(e),e=c(e),s(e)}if(r=function(e){const t=[]
1749let r
1750const n=i("filename\\*((?!0\\d)\\d+)(\\*?)","ig")
1751for(;null!==(r=n.exec(e));){let[,e,n,i]=r
1752if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[n,i]}const a=[]
1753for(let e=0;e<t.length&&e in t;++e){let[r,n]=t[e]
1754n=o(n),r&&(n=unescape(n),0===e&&(n=l(n))),a.push(n)}return a.join("")}(e),r)return s(c(r))
1755if(r=i("filename","i").exec(e),r){r=r[1]
1756let e=o(r)
1757return e=c(e),s(e)}function i(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function a(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r
1758try{const i=new TextDecoder(e,{fatal:!0}),a=(0,n.stringToBytes)(r)
1759r=i.decode(a),t=!1}catch(e){}}return r}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=a("utf-8",e),t&&(e=a("iso-8859-1",e))),e}function o(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"')
1760for(let e=0;e<t.length;++e){const r=t[e].indexOf('"');-1!==r&&(t[e]=t[e].slice(0,r),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function l(e){const t=e.indexOf("'")
1761return-1===t?e:a(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function c(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,r,n){if("q"===r||"Q"===r)return a(t,n=(n=n.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})))
1762try{n=atob(n)}catch(e){}return a(t,n)}))}return""}
1763var n=r(1)},(e,t,r)=>{"use strict"
1764Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0
1765var n=r(1),i=r(157)
1766class a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
1767this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const n={begin:e,end:t}
1768for(const e in r)n[e]=r[e]
1769return this.request(n)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t}
1770t.open("GET",this.url),t.withCredentials=this.withCredentials
1771for(const e in this.httpHeaders){const r=this.httpHeaders[e]
1772void 0!==r&&t.setRequestHeader(e,r)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),n.expectedStatus=206):n.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){var r
1773const n=this.pendingRequests[e]
1774n&&(null===(r=n.onProgress)||void 0===r||r.call(n,t))}onStateChange(e,t){const r=this.pendingRequests[e]
1775if(!r)return
1776const i=r.xhr
1777if(i.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4!==i.readyState)return
1778if(!(e in this.pendingRequests))return
1779var a
1780if(delete this.pendingRequests[e],0===i.status&&this.isHttp)return void(null===(a=r.onError)||void 0===a||a.call(r,i.status))
1781const s=i.status||200
1782var o
1783if((200!==s||206!==r.expectedStatus)&&s!==r.expectedStatus)return void(null===(o=r.onError)||void 0===o||o.call(r,i.status))
1784const l=function(e){const t=e.response
1785return"string"!=typeof t?t:(0,n.stringToBytes)(t).buffer}(i)
1786if(206===s){const e=i.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e)
1787r.onDone({begin:parseInt(t[1],10),chunk:l})}else if(l)r.onDone({begin:0,chunk:l})
1788else{var c
1789null===(c=r.onError)||void 0===c||c.call(r,i.status)}}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr
1790delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new a(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e)
1791t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new s(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new o(this._manager,e,t)
1792return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t
1793null===(t=this._fullRequestReader)||void 0===t||t.cancel(e)
1794for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}
1795class s{constructor(e,t){this._manager=e
1796const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}
1797this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=new n.PromiseCapability,this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.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 e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=e=>t.getResponseHeader(e),{allowRangeRequests:n,suggestedLength:a}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange})
1798n&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest
1798(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0})
1799this._requests.length=0}}_onError(e){this._storedError=(0,i.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError)
1800for(const e of this._requests)e.reject(this._storedError)
1801this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t
1802null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.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
1803if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1}
1804if(this._done)return{value:void 0,done:!0}
1805const e=new n.PromiseCapability
1806return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e)
1807for(const e of this._requests)e.resolve({value:void 0,done:!0})
1808this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class o{constructor(e,t,r){this._manager=e
1809const n={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}
1810this._url=e.url,this._requestId=e.requestRange(t,r,n),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e
1811null===(e=this.onClosed)||void 0===e||e.call(this,this)}_onDone(e){const t=e.chunk
1812this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0
1813for(const e of this._requests)e.resolve({value:void 0,done:!0})
1814this._requests.length=0,this._close()}_onError(e){this._storedError=(0,i.createResponseStatusError)(e,this._url)
1815for(const e of this._requests)e.reject(this._storedError)
1816this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t
1817this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError
1818if(null!==this._queuedChunk){const e=this._queuedChunk
1819return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0}
1820const e=new n.PromiseCapability
1821return this._requests.push(e),e.promise}cancel(e){this._done=!0
1822for(const e of this._requests)e.resolve({value:void 0,done:!0})
1823this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,r)=>{"use strict"
1824Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0
1825var n=r(1),i=r(157)
1826function a(e,t,r){return{method:"GET",headers:e,signal:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function s(e){const t=new Headers
1827for(const r in e){const n=e[r]
1828void 0!==n&&t.append(r,n)}return t}function o(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:((0,n.warn)(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e
1829return(null===(e=this._fullRequestReader)||void 0===e?void 0:e._loaded)??0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new l(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null
1830const r=new c(this,e,t)
1831return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){var t
1832null===(t=this._fullRequestReader)||void 0===t||t.cancel(e)
1833for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}
1834class l{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null
1835const t=e.source
1836this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=new n.PromiseCapability,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=s(this._stream.httpHeaders)
1837const r=t.url
1838fetch(r,a(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,r)
1839this._reader=e.body.getReader(),this._headersCapability.resolve()
1840const t=t=>e.headers.get(t),{allowRangeRequests:a,suggestedLength:s}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange})
1841this._isRangeSupported=a,this._contentLength=s||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(t),!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(){var e
1842await this._headersCapability.promise
1843const{value:t,done:r}=await this._reader.read()
1844return r?{value:t,done:r}:(this._loaded+=t.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),{value:o(t),done:!1})}cancel(e){var t
1845null===(t=this._reader)||void 0===t||t.cancel(e),this._abortController.abort()}}class c{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0
1846const o=e.source
1847this._withCredentials=o.withCredentials||!1,this._readCapability=new n.PromiseCapability,this._isStreamingSupported=!o.disableStream,this._abortController=new AbortController,this._headers=s(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`)
1848const l=o.url
1849fetch(l,a(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l)
1850this._readCapability.resolve(),this._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e
1851await this._readCapability.promise
1852const{value:t,done:r}=await this._reader.read()
1853return r?{value:t,done:r}:(this._loaded+=t.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),{value:o(t),done:!1})}cancel(e){var t
1854null===(t=this._reader)||void 0===t||t.cancel(e),this._abortController.abort()}}},(e,t,r)=>{"use strict"
1855Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,i.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream)
1856const{container:t,viewport:r}=e,n=getComputedStyle(t),a=n.getPropertyValue("visibility"),s=parseFloat(n.getPropertyValue("--scale-factor"))
1857"visible"===a&&(!s||Math.abs(s-r.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.")
1858const o=new u(e)
1859return o._render(),o},t.updateTextLayer=function(e){let{container:t,viewport:r,textDivs:n,textDivProperties:a,isOffscreenCanvasSupported:s,mustRotate:l=!0,mustRescale:u=!0}=e
1860if(l&&(0,i.setLayerDimensions)(t,{rotation:r.rotation}),u){const e=o(0,s),t={prevFontSize:null,prevFontFamily:null,div:null,scale:r.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:e}
1861for(const e of n)t.properties=a.get(e),t.div=e,c(t)}}
1862var n=r(1),i=r(142)
1863const a=30,s=new Map
1864function o(e,t){let r
1865if(t&&n.FeatureTest.isOffscreenCanvasSupported)r=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1})
1866else{const t=document.createElement("canvas")
1867t.width=t.height=e,r=t.getContext("2d",{alpha:!1})}return r}function l(e,t,r){const i=document.createElement("span"),l={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0}
1868e._textDivs.push(i)
1869const c=n.Util.transform(e._transform,t.transform)
1870let u=Math.atan2(c[1],c[0])
1871const h=r[t.fontName]
1872h.vertical&&(u+=Math.PI/2)
1873const d=Math.hypot(c[2],c[3]),p=d*function(e,t){const r=s.get(e)
1874if(r)return r
1875const n=o(a,t)
1876n.font=`30px ${e}`
1877const i=n.measureText("")
1878let l=i.fontBoundingBoxAscent,c=Math.abs(i.fontBoundingBoxDescent)
1879if(l){const t=l/(l+c)
1880return s.set(e,t),n.canvas.width=n.canvas.height=0,t}n.strokeStyle="red",n.clearRect(0,0,a,a),n.strokeText("g",0,0)
1881let u=n.getImageData(0,0,a,a).data
1882c=0
1883for(let e=u.length-1-3;e>=0;e-=4)if(u[e]>0){c=Math.ceil(e/4/a)
1884break}n.clearRect(0,0,a,a),n.strokeText("A",0,a),u=n.getImageData(0,0,a,a).data,l=0
1885for(let e=0,t=u.length;e<t;e+=4)if(u[e]>0){l=a-Math.floor(e/4/a)
1886break}if(n.canvas.width=n.canvas.height=0,l){const t=l/(l+c)
1887return s.set(e,t),t}return s.set(e,.8),.8}(h.fontFamily,e._isOffscreenCanvasSupported)
1888let f,m
18890===u?(f=c[4],m=c[5]-p):(f=c[4]+p*Math.sin(u),m=c[5]-p*Math.cos(u))
1890const g="calc(var(--scale-factor)*",v=i.style
1891e._container===e._rootContainer?(v.left=`${(100*f/e._pageWidth).toFixed(2)}%`,v.top=`${(100*m/e._pageHeight).toFixed(2)}%`):(v.left=`${g}${f.toFixed(2)}px)`,v.top=`${g}${m.toFixed(2)}px)`),v.fontSize=`${g}${d.toFixed(2)}px)`,v.fontFamily=h.fontFamily,l.fontSize=d,i.setAttribute("role","presentation"),i.textContent=t.str,i.dir=t.dir,e._fontInspectorEnabled&&(i.dataset.fontName=t.fontName),0!==u&&(l.angle=u*(180/Math.PI))
1892let b=!1
1893if(t.str.length>1)b=!0
1894else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),r=Math.abs(t.transform[3])
1895e!==r&&Math.max(e,r)/Math.min(e,r)>1.5&&(b=!0)}b&&(l.canvasWidth=h.vertical?t.height:t.width),e._textDivProperties.set(i,l),e._isReadableStream&&e._layoutText(i)}function c(e){const{div:t,scale:r,properties:n,ctx:i,prevFontSize:a,prevFontFamily:s}=e,{style:o}=t
1896let l=""
1897if(0!==n.canvasWidth&&n.hasText){const{fontFamily:c}=o,{canvasWidth:u,fontSize:h}=n
1898a===h&&s===c||(i.font=`${h*r}px ${c}`,e.prevFontSize=h,e.prevFontFamily=c)
1899const{width:d}=i.measureText(t.textContent)
1900d>0&&(l=`scaleX(${u*r/d})`)}0!==n.angle&&(l=`rotate(${n.angle}deg) ${l}`),l.length>0&&(o.transform=l)}class u{constructor(e){var t
1901let{textContentSource:r,container:a,viewport:s,textDivs:l,textDivProperties:c,textContentItemsStr:u,isOffscreenCanvasSupported:h}=e
1902this._textContentSource=r,this._isReadableStream=r instanceof ReadableStream,this._container=this._rootContainer=a,this._textDivs=l||[],this._textContentItemsStr=u||[],this._isOffscreenCanvasSupported=h,this._fontInspectorEnabled=!(null===(t=globalThis.FontInspector)||void 0===t||!t.enabled),this._reader=null,this._textDivProperties=c||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)}
1903const{pageWidth:d,pageHeight:p,pageX:f,pageY:m}=s.rawDims
1904this._transform=[1,0,0,-1,-f,m+p],this._pageWidth=d,this._pageHeight=p,(0,i.setLayerDimensions)(a,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(e,t){for(const r of e)if(void 0!==r.str)this._textContentItemsStr.push(r.str),l(this,r,t)
1905else if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){const e=this._container
1906this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==r.id&&this._container.setAttribute("id",`${r.id}`),e.append(this._container)}else"endMarkedContent"===r.type&&(this._container=this._container.parentNode)}_layoutText(e){const t=this._layoutTextParams.properties=this._textDivProperties.get(e)
1907if(this._layoutTextParams.div=e,c(this._layoutTextParams),t.hasText&&this._container.append(e),t.hasEOL){const e=document.createElement("br")
1908e.setAttribute("role","presentation"),this._container.append(e)}}_render(){const e=new n.PromiseCapability
1909let t=Object.create(null)
1910if(this._isReadableStream){const r=()=>{this._reader.read().then((n=>{let{value:i,done:a}=n
1911a?e.resolve():(Object.assign(t,i.styles),this._processItems(i.items,t),r())}),e.reject)}
1912this._reader=this._textContentSource.getReader(),r()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.')
1913{const{items:t,styles:r}=this._textContentSource
1914this._processItems(t,r),e.resolve()}}e.promise.then((()=>{t=null,function(e){if(e._canceled)return
1915const t=e._textDivs,r=e._capability
1916if(t.length>1e5)r.resolve()
1917else{if(!e._isReadableStream)for(const r of t)e._layoutText(r)
1918r.resolve()}}(this)}),this._capability.reject)}}t.TextLayerRenderTask=u},(e,t,r)=>{"use strict"
1919Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0
1920var n=r(1),i=r(141),a=r(163),s=r(164),o=r(142)
1921function l(e,t){u(e,t),t.add(e)}function c(e,t,r){u(e,t),t.set(e,r)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
1922return r}function d(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,f(e,t,"get"))}function p(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r)
1923else{if(!t.writable)throw new TypeError("attempted to set read only private field")
1924t.value=r}}(e,f(e,t,"set"),r),r}function f(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
1925return t.get(e)}var m=new WeakMap,g=new WeakMap,v=new WeakMap,b=new WeakMap,_=new WeakMap,y=new WeakMap,A=new WeakMap,S=new WeakMap,w=new WeakSet,x=new WeakSet,P=new WeakSet,C=new WeakSet
1926class T{constructor(e){l(this,C),l(this,P),l(this,x),l(this,w),c(this,m,{writable:!0,value:void 0}),c(this,g,{writable:!0,value:!1}),c(this,v,{writable:!0,value:this.pointerup.bind(this)}),c(this,b,{writable:!0,value:this.pointerdown.bind(this)}),c(this,_,{writable:!0,value:new Map}),c(this,y,{writable:!0,value:!1}),c(this,A,{writable:!0,value:!1}),c(this,S,{writable:!0,value:void 0}),T._initialized||(T._initialized=!0,a.FreeTextEditor.initialize(e.l10n),s.InkEditor.initialize(e.l10n)),e.uiManager.registerEditorTypes([a.FreeTextEditor,s.InkEditor]),p(this,S,e.uiManager),this.pageIndex=e.pageIndex,this.div=e.div,p(this,m,e.accessibilityManager),d(this,S).addLayer(this)}get isEmpty(){return 0===d(this,_).size}updateToolbar(e){d(this,S).updateToolbar(e)}updateMode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d(this,S).getMode()
1927h(this,C,F).call(this),e===n.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),d(this,S).unselectAll(),e!==n.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",e===n.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",e===n.AnnotationEditorType.INK),this.div.hidden=!1)}addInkEditorIfNeeded(e){if(e||d(this,S).getMode()===n.AnnotationEditorType.INK){if(!e)for(const e of d(this,_).values())if(e.isEmpty())return void e.setInBackground()
1928h(this,P,R).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(e){d(this,S).setEditingState(e)}addCommands(e){d(this,S).addCommands(e)}enable(){this.div.style.pointerEvents="auto"
1929for(const e of d(this,_).values())e.enableEditing()}disable(){this.div.style.pointerEvents="none"
1930for(const e of d(this,_).values())e.disableEditing()
1931h(this,C,F).call(this),this.isEmpty&&(this.div.hidden=!0)}setActiveEditor(e){d(this,S).getActive()!==e&&d(this,S).setActiveEditor(e)}enableClick(){this.div.addEventListener("pointerdown",d(this,b)),this.div.addEventListener("pointerup",d(this,v))}disableClick(){this.div.removeEventListener("pointerdown",d(this,b)),this.div.removeEventListener("pointerup",d(this,v))}attach(e){d(this,_).set(e.id,e)}detach(e){var t
1932d(this,_).delete(e.id),null===(t=d(this,m))||void 0===t||t.removePointerInTextLayer(e.contentDiv)}remove(e){d(this,S).removeEditor(e),this.detach(e),e.div.style.display="none",setTimeout((()=>{e.div.style.display="",e.div.remove(),e.isAttachedToDOM=!1,document.activeElement===document.body&&d(this,S).focusMainContainer()}),0),d(this,A)||this.addInkEditorIfNeeded(!1)}add(e){if(h(this,w,E).call(this,e),d(this,S).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render()
1933this.div.append(t),e.isAttachedToDOM=!0}this.moveEditorInDOM(e),e.onceAdded(),d(this,S).addToAnnotationStorage(e)}moveEditorInDOM(e){var t
1934null===(t=d(this,m))||void 0===t||t.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addANewEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!0})}addUndoableEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!1})}getNextId(){return d(this,S).getId()}deserialize(e){switch(e.annotationType){case n.AnnotationEditorType.FREETEXT:return a.FreeTextEditor.deserialize(e,this,d(this,S))
1935case n.AnnotationEditorType.INK:return s.InkEditor.deserialize(e,this,d(this,S))}return null}setSelected(e){d(this,S).setSelected(e)}toggleSelected(e){d(this,S).toggleSelected(e)}isSelected(e){return d(this,S).isSelected(e)}unselect(e){d(this,S).unselect(e)}pointerup(e){const{isMac:t}=n.FeatureTest.platform
19360!==e.button||e.ctrlKey&&t||e.target!==this.div||!d(this,y)||(p(this,y,!1),d(this,g)?h(this,P,R).call(this,e):p(this,g,!0))}pointerdown(e){const{isMac:t}=n.FeatureTest.platform
1937if(0!==e.button||e.ctrlKey&&t)return
1938if(e.target!==this.div)return
1939p(this,y,!0)
1940const r=d(this,S).getActive()
1941p(this,g,!r||r.isEmpty())}drop(e){const t=e.dataTransfer.getData("text/plain"),r=d(this,S).getEditor(t)
1942if(!r)return
1943e.preventDefault(),e.dataTransfer.dropEffect="move",h(this,w,E).call(this,r)
1944const n=this.div.getBoundingClientRect(),i=e.clientX-n.x,a=e.clientY-n.y
1945r.translate(i-r.startX,a-r.startY),this.moveEditorInDOM(r),r.div.focus()}dragover(e){e.preventDefault()}destroy(){var e;(null===(e=d(this,S).getActive())||void 0===e?void 0:e.parent)===this&&d(this,S).setActiveEditor(null)
1946for(const e of d(this,_).values()){var t
1947null===(t=d(this,m))||void 0===t||t.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove()}this.div=null,d(this,_).clear(),d(this,S).removeLayer(this)}render(e){let{viewport:t}=e
1948this.viewport=t,(0,o.setLayerDimensions)(this.div,t),(0,i.bindEvents)(this,this.div,["dragover","drop"])
1949for(const e of d(this,S).getEditors(this.pageIndex))this.add(e)
1950this.updateMode()}update(e){let{viewport:t}=e
1951d(this,S).commitOrRemove(),this.viewport=t,(0,o.setLayerDimensions)(this.div,{rotation:t.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims
1952return[e,t]}}function E(e){var t
1953e.parent!==this&&(this.attach(e),null===(t=e.parent)||void 0===t||t.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}function k(e){switch(d(this,S).getMode()){case n.AnnotationEditorType.FREETEXT:return new a.FreeTextEditor(e)
1954case n.AnnotationEditorType.INK:return new s.InkEditor(e)}return null}function R(e){const t=this.getNextId(),r=h(this,x,k).call(this,{parent:this,id:t,x:e.offsetX,y:e.offsetY,uiManager:d(this,S)})
1955return r&&this.add(r),r}function F(){p(this,A,!0)
1956for(const e of d(this,_).values())e.isEmpty()&&e.remove()
1957p(this,A,!1)}t.AnnotationEditorLayer=T,function(e,t,r){(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e
1958var t=e[Symbol.toPrimitive]
1959if(void 0!==t){var r=t.call(e,"string")
1960if("object"!=typeof r)return r
1961throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
1962return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(T,"_initialized",!1)},(e,t,r)=>{"use strict"
1963Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0
1964var n=r(1),i=r(141),a=r(140)
1965function s(e,t){c(e,t),t.add(e)}function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e
1966var t=e[Symbol.toPrimitive]
1967if(void 0!==t){var r=t.call(e,"string")
1968if("object"!=typeof r)return r
1969throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
1970return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t,r){c(e,t),t.set(e,r)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,p(e,t,"get"))}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
1971return r}function d(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r)
1972else{if(!t.writable)throw new TypeError("attempted to set read only private field")
1973t.value=r}}(e,p(e,t,"set"),r),r}function p(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
1974return t.get(e)}var f=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,b=new WeakMap,_=new WeakMap,y=new WeakMap,A=new WeakMap,S=new WeakMap,w=new WeakSet,x=new WeakSet,P=new WeakSet,C=new WeakSet
1975class T extends a.AnnotationEditor{constructor(e){super({...e,name:"freeTextEditor"}),s(this,C),s(this,P),s(this,x),s(this,w),l(this,f,{writable:!0,value:this.editorDivBlur.bind(this)}),l(this,m,{writable:!0,value:this.editorDivFocus.bind(this)}),l(this,g,{writable:!0,value:this.editorDivInput.bind(this)}),l(this,v,{writable:!0,value:this.editorDivKeydown.bind(this)}),l(this,b,{writable:!0,value:void 0}),l(this,_,{writable:!0,value:""}),l(this,y,{writable:!0,value:`${this.id}-editor`}),l(this,A,{writable:!0,value:!1}),l(this,S,{writable:!0,value:void 0}),d(this,b,e.color||T._defaultColor||a.AnnotationEditor._defaultLineColor),d(this,S,e.fontSize||T._defaultFontSize)}static initialize(e){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map((t=>[t,e.get(t)])))
1976const t=getComputedStyle(document.documentElement)
1977this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case n.AnnotationEditorParamsType.FREETEXT_SIZE:T._defaultFontSize=t
1978break
1979case n.AnnotationEditorParamsType.FREETEXT_COLOR:T._defaultColor=t}}updateParams(e,t){switch(e){case n.AnnotationEditorParamsType.FREETEXT_SIZE:h(this,w,E).call(this,t)
1980break
1981case n.AnnotationEditorParamsType.FREETEXT_COLOR:h(this,x,k).call(this,t)}}static get defaultPropertiesToUpdate(){return[[n.AnnotationEditorParamsType.FREETEXT_SIZE,T._defaultFontSize],[n.AnnotationEditorParamsType.FREETEXT_COLOR,T._defaultColor||a.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[n.AnnotationEditorParamsType.FREETEXT_SIZE,u(this,S)],[n.AnnotationEditorParamsType.FREETEXT_COLOR,u(this,b)]]}getInitialTranslation(){const e=this.parentScale
1982return[-T._internalPadding*e,-(T._internalPadding+u(this,S))*e]}rebuild(){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.div.draggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",u(this,v)),this.editorDiv.addEventListener("focus",u(this,m)),this.editorDiv.addEventListener("blur",u(this,f)),this.editorDiv.addEventListener("input",u(this,g)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",u(this,y)),this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",u(this,v)),this.editorDiv.removeEventListener("focus",u(this,m)),this.editorDiv.removeEventListener("blur",u(this,f)),this.editorDiv.removeEventListener("input",u(this,g)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(e){super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing"),super.remove()}commit(){this.isInEditMode()&&(super.commit(),u(this,A)||(d(this,A,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),d(this,_,h(this,P,R).call(this).trimEnd()),h(this,C,F).call(this))}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(e){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(e){T._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){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)}
1982render(){if(this.div)return this.div
1983let e,t
1984this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",u(this,y)),this.enableEditing(),T._l10nPromise.get("editor_free_text2_aria_label").then((e=>{var t
1985return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("aria-label",e)})),T._l10nPromise.get("free_text2_default_content").then((e=>{var t
1986return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("default-content",e)})),this.editorDiv.contentEditable=!0
1987const{style:r}=this.editorDiv
1988if(r.fontSize=`calc(${u(this,S)}px * var(--scale-factor))`,r.color=u(this,b),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,i.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[r,n]=this.parentDimensions
1989this.setAt(e*r,t*n,this.width*r,this.height*n)
1990for(const e of u(this,_).split("\n")){const t=document.createElement("div")
1991t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0
1992return this.div}get contentDiv(){return this.editorDiv}static deserialize(e,t,r){const i=super.deserialize(e,t,r)
1993return d(i,S,e.fontSize),d(i,b,n.Util.makeHexColor(...e.color)),d(i,_,e.value),i}serialize(){if(this.isEmpty())return null
1994const e=T._internalPadding*this.parentScale,t=this.getRect(e,e),r=a.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:u(this,b))
1995return{annotationType:n.AnnotationEditorType.FREETEXT,color:r,fontSize:u(this,S),value:u(this,_),pageIndex:this.pageIndex,rect:t,rotation:this.rotation}}}function E(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-u(this,S))*this.parentScale),d(this,S,e),h(this,C,F).call(this)},r=u(this,S)
1996this.addCommands({cmd:()=>{t(e)},undo:()=>{t(r)},mustExec:!0,type:n.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function k(e){const t=u(this,b)
1997this.addCommands({cmd:()=>{d(this,b,this.editorDiv.style.color=e)},undo:()=>{d(this,b,this.editorDiv.style.color=t)},mustExec:!0,type:n.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function R(){const e=this.editorDiv.getElementsByTagName("div")
1998if(0===e.length)return this.editorDiv.innerText
1999const t=[]
2000for(const r of e)t.push(r.innerText.replace(/\r\n?|\n/,""))
2001return t.join("\n")}function F(){const[e,t]=this.parentDimensions
2002let r
2003if(this.isAttachedToDOM)r=this.div.getBoundingClientRect()
2004else{const{currentLayer:e,div:t}=this,n=t.style.display
2005t.style.display="hidden",e.div.append(this.div),r=t.getBoundingClientRect(),t.remove(),t.style.display=n}this.width=r.width/e,this.height=r.height/t}t.FreeTextEditor=T,o(T,"_freeTextDefaultContent",""),o(T,"_l10nPromise",void 0),o(T,"_internalPadding",0),o(T,"_defaultColor",null),o(T,"_defaultFontSize",10),o(T,"_keyboardManager",new i.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],T.prototype.commitOrRemove]])),o(T,"_type","freetext")},(e,t,r)=>{"use strict"
2006Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,Object.defineProperty(t,"fitCurve",{enumerable:!0,get:function(){return a.fitCurve}})
2007var n=r(1),i=r(140),a=r(165),s=r(141)
2008function o(e,t){u(e,t),t.add(e)}function l(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e
2009var t=e[Symbol.toPrimitive]
2010if(void 0!==t){var r=t.call(e,"string")
2011if("object"!=typeof r)return r
2012throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e)
2013return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t,r){u(e,t),t.set(e,r)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,r){return function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}(e,t),r}function d(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r)
2014else{if(!t.writable)throw new TypeError("attempted to set read only private field")
2015t.value=r}}(e,f(e,t,"set"),r),r}function p(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,f(e,t,"get"))}function f(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance")
2016return t.get(e)}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
2017return r}const g=16
2018var v=new WeakMap,b=new WeakMap,_=new WeakMap,y=new WeakMap,A=new WeakMap,S=new WeakMap,w=new WeakMap,x=new WeakMap,P=new WeakMap,C=new WeakMap,T=new WeakMap,E=new WeakMap,k=new WeakMap,R=new WeakMap,F=new WeakSet,M=new WeakSet,O=new WeakSet,I=new WeakSet,D=new WeakSet,L=new WeakSet,j=new WeakSet,N=new WeakSet,W=new WeakSet,B=new WeakSet,q=new WeakSet,G=new WeakSet,U=new WeakSet,z=new WeakSet,H=new WeakSet,V=new WeakSet,X=new WeakSet,$=new WeakSet,Y=new WeakSet,K=new WeakSet,Q=new WeakSet,J=new WeakSet
2019class Z extends i.AnnotationEditor{constructor(e){super({...e,name:"inkEditor"}),o(this,J),o(this,Q),o(this,K),o(this,Y),o(this,$),o(this,X),o(this,V),o(this,H),o(this,z),o(this,U),o(this,G),o(this,q),o(this,B),o(this,W),o(this,N),o(this,j),o(this,L),o(this,D),o(this,I),o(this,O),o(this,M),o(this,F),c(this,v,{writable:!0,value:0}),c(this,b,{writable:!0,value:0}),c(this,_,{writable:!0,value:0}),c(this,y,{writable:!0,value:this.canvasPointermove.bind(this)}),c(this,A,{writable:!0,value:this.canvasPointerleave.bind(this)}),c(this,S,{writable:!0,value:this.canvasPointerup.bind(this)}),c(this,w,{writable:!0,value:this.canvasPointerdown.bind(this)}),c(this,x,{writable:!0,value:!1}),c(this,P,{writable:!0,value:!1}),c(this,C,{writable:!0,value:null}),c(this,T,{writable:!0,value:null}),c(this,E,{writable:!0,value:0}),c(this,k,{writable:!0,value:0}),c(this,R,{writable:!0,value:null}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(e){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map((t=>[t,e.get(t)])))}static updateDefaultParams(e,t){switch(e){case n.AnnotationEditorParamsType.INK_THICKNESS:Z._defaultThickness=t
2020break
2021case n.AnnotationEditorParamsType.INK_COLOR:Z._defaultColor=t
2022break
2023case n.AnnotationEditorParamsType.INK_OPACITY:Z._defaultOpacity=t/100}}updateParams(e,t){switch(e){case n.AnnotationEditorParamsType.INK_THICKNESS:m(this,F,ee).call(this,t)
2024break
2025case n.AnnotationEditorParamsType.INK_COLOR:m(this,M,te).call(this,t)
2026break
2027case n.AnnotationEditorParamsType.INK_OPACITY:m(this,O,re).call(this,t)}}static get defaultPropertiesToUpdate(){return[[n.AnnotationEditorParamsType.INK_THICKNESS,Z._defaultThickness],[n.AnnotationEditorParamsType.INK_COLOR,Z._defaultColor||i.AnnotationEditor._defaultLineColor],[n.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*Z._defaultOpacity)]]}get propertiesToUpdate(){return[[n.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||Z._defaultThickness],[n.AnnotationEditorParamsType.INK_COLOR,this.color||Z._defaultColor||i.AnnotationEditor._defaultLineColor],[n.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??Z._defaultOpacity))]]}rebuild(){super.rebuild(),null!==this.div&&(this.canvas||(m(this,q,ue).call(this),m(this,G,he).call(this)),this.isAttachedToDOM||(this.parent.add(this),m(this,U,de).call(this)),m(this,Q,Ae).call(this))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,p(this,T).disconnect(),d(this,T,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,r=this.width*e,n=this.height*t
2028this.setDimensions(r,n)}enableEditMode(){p(this,x)||null===this.canvas||(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",p(this,w)),this.canvas.addEventListener("pointerup",p(this,S)))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",p(this,w)),this.canvas.removeEventListener("pointerup",p(this,S)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){p(this,x)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),d(this,x,!0),this.div.classList.add("disabled"),m(this,Q,Ae).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus({preventScroll:!0}))}focusin(e){super.focusin(e),this.enableEditMode()}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!p(this,x)&&(this.setInForeground(),"mouse"!==e.type&&this.div.focus(),e.stopPropagation(),this.canvas.addEventListener("pointerleave",p(this,A)),this.canvas.addEventListener("pointermove",p(this,y)),m(this,L,ae).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.stopPropagation(),m(this,j,se).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){0===e.button&&this.isInEditMode()&&0!==this.currentPath.length&&(e.stopPropagation(),m(this,B,ce).call(this,e),this.setInBackgroun
2028d())}canvasPointerleave(e){m(this,B,ce).call(this,e),this.setInBackground()}render(){if(this.div)return this.div
2029let e,t
2030this.width&&(e=this.x,t=this.y),super.render(),Z._l10nPromise.get("editor_ink2_aria_label").then((e=>{var t
2031return null===(t=this.div)||void 0===t?void 0:t.setAttribute("aria-label",e)}))
2032const[r,n,i,a]=m(this,I,ne).call(this)
2033if(this.setAt(r,n,0,0),this.setDims(i,a),m(this,q,ue).call(this),this.width){const[r,n]=this.parentDimensions
2034this.setAt(e*r,t*n,this.width*r,this.height*n),d(this,P,!0),m(this,U,de).call(this),this.setDims(this.width*r,this.height*n),m(this,W,le).call(this),m(this,J,Se).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode()
2035return m(this,G,he).call(this),this.div}setDimensions(e,t){const r=Math.round(e),n=Math.round(t)
2036if(p(this,E)===r&&p(this,k)===n)return
2037d(this,E,r),d(this,k,n),this.canvas.style.visibility="hidden",p(this,v)&&Math.abs(p(this,v)-e/t)>.01&&(t=Math.ceil(e/p(this,v)),this.setDims(e,t))
2038const[i,a]=this.parentDimensions
2039this.width=e/i,this.height=t/a,p(this,x)&&m(this,z,pe).call(this,e,t),m(this,U,de).call(this),m(this,W,le).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(e,t,r){const i=super.deserialize(e,t,r)
2040i.thickness=e.thickness,i.color=n.Util.makeHexColor(...e.color),i.opacity=e.opacity
2041const[a,s]=i.pageDimensions,o=i.width*a,l=i.height*s,c=i.parentScale,u=e.thickness/2
2042d(i,v,o/l),d(i,x,!0),d(i,E,Math.round(o)),d(i,k,Math.round(l))
2043for(const{bezier:t}of e.paths){const e=[]
2044i.paths.push(e)
2045let r=c*(t[0]-u),n=c*(l-t[1]-u)
2046for(let i=2,a=t.length;i<a;i+=6){const a=c*(t[i]-u),s=c*(l-t[i+1]-u),o=c*(t[i+2]-u),h=c*(l-t[i+3]-u),d=c*(t[i+4]-u),p=c*(l-t[i+5]-u)
2047e.push([[r,n],[a,s],[o,h],[d,p]]),r=d,n=p}const a=h(this,Z,me).call(this,e)
2048i.bezierPath2D.push(a)}const p=m(i,Y,_e).call(i)
2049return d(i,_,Math.max(g,p[2]-p[0])),d(i,b,Math.max(g,p[3]-p[1])),m(i,z,pe).call(i,o,l),i}serialize(){if(this.isEmpty())return null
2050const e=this.getRect(0,0),t=this.rotation%180==0?e[3]-e[1]:e[2]-e[0],r=i.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle)
2051return{annotationType:n.AnnotationEditorType.INK,color:r,thickness:this.thickness,opacity:this.opacity,paths:m(this,V,ge).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:e,rotation:this.rotation}}}function ee(e){const t=this.thickness
2052this.addCommands({cmd:()=>{this.thickness=e,m(this,Q,Ae).call(this)},undo:()=>{this.thickness=t,m(this,Q,Ae).call(this)},mustExec:!0,type:n.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function te(e){const t=this.color
2053this.addCommands({cmd:()=>{this.color=e,m(this,W,le).call(this)},undo:()=>{this.color=t,m(this,W,le).call(this)},mustExec:!0,type:n.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function re(e){e/=100
2054const t=this.opacity
2055this.addCommands({cmd:()=>{this.opacity=e,m(this,W,le).call(this)},undo:()=>{this.opacity=t,m(this,W,le).call(this)},mustExec:!0,type:n.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function ne(){const{parentRotation:e,parentDimensions:[t,r]}=this
2056switch(e){case 90:return[0,r,r,t]
2057case 180:return[t,r,t,r]
2058case 270:return[t,0,r,t]
2059default:return[0,0,t,r]}}function ie(){const{ctx:e,color:t,opacity:r,thickness:n,parentScale:i,scaleFactor:a}=this
2060e.lineWidth=n*i/a,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${t}${(0,s.opacityToHex)(r)}`}function ae(e,t){this.isEditing=!0,p(this,P)||(d(this,P,!0),m(this,U,de).call(this),this.thickness||=Z._defaultThickness,this.color||=Z._defaultColor||i.AnnotationEditor._defaultLineColor,this.opacity??=Z._defaultOpacity),this.currentPath.push([e,t]),d(this,C,null),m(this,D,ie).call(this),this.ctx.beginPath(),this.ctx.moveTo(e,t),d(this,R,(()=>{p(this,R)&&(p(this,C)&&(this.isEmpty()?(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)):m(this,W,le).call(this),this.ctx.lineTo(...p(this,C)),d(this,C,null),this.ctx.stroke()),window.requestAnimationFrame(p(this,R)))})),window.requestAnimationFrame(p(this,R))}function se(e,t){const[r,n]=this.currentPath.at(-1)
2061e===r&&t===n||(this.currentPath.push([e,t]),d(this,C,[e,t]))}function oe(e,t){this.ctx.closePath(),d(this,R,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height)
2062const[r,n]=this.currentPath.at(-1)
2063let i
2064if(e===r&&t===n||this.currentPath.push([e,t]),1!==this.currentPath.length)i=(0,a.fitCurve)(this.currentPath,30,null)
2065else{const r=[e,t]
2066i=[[r,r.slice(),r.slice(),r]]}const s=h(Z,Z,me).call(Z,i)
2067this.currentPath.length=0,this.addCommands({cmd:()=>{this.paths.push(i),this.bezierPath2D.push(s),this.rebuild()},undo:()=>{this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(m(this,q,ue).call(this),m(this,G,he).call(this)),m(this,Q,Ae).call(this))},mustExec:!0})}function le(){if(this.isEmpty())return void m(this,H,fe).call(this)
2068m(this,D,ie).call(this)
2069const{canvas:e,ctx:t}=this
2070t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),m(this,H,fe).call(this)
2071for(const e of this.bezierPath2D)t.stroke(e)}function ce(e){m(this,N,oe).call(this,e.offsetX,e.offsetY),this.canvas.removeEventListener("pointerleave",p(this,A)),this.canvas.removeEventListener("pointermove",p(this,y)),this.addToAnnotationStorage()}function ue(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",Z._l10nPromise.get("editor_ink_canvas_aria_label").then((e=>{var t
2072return null===(t=this.canvas)||void 0===t?void 0:t.setAttribute("aria-label",e)})),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}function he(){d(this,T,new ResizeObserver((e=>{const t=e[0].contentRect
2073t.width&&t.height&&this.setDimensions(t.width,t.height)}))),p(this,T).observe(this.div)}function de(){if(!p(this,P))return
2074const[e,t]=this.parentDimensions
2075this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),m(this,H,fe).call(this)}function pe(e,t){const r=m(this,K,ye).call(this),n=(e-r)/p(this,_),i=(t-r)/p(this,b)
2076this.scaleFactor=Math.min(n,i)}function fe(){const e=m(this,K,ye).call(this)/2
2077this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}function me(e){const t=new Path2D
2078for(let r=0,n=e.length;r<n;r++){const[n,i,a,s]=e[r]
20790===r&&t.moveTo(...n),t.bezierCurveTo(i[0],i[1],a[0],a[1],s[0],s[1])}return t}function ge(e,t,r,n){const i=[],a=this.thickness/2
2080let s,o
2081for(const l of this.paths){s=[],o=[]
2082for(let i=0,c=l.length;i<c;i++){const[c,u,h,d]=l[i],p=e*(c[0]+t)+a,f=n-e*(c[1]+r)-a,g=e*(u[0]+t)+a,v=n-e*(u[1]+r)-a,b=e*(h[0]+t)+a,_=n-e*(h[1]+r)-a,y=e*(d[0]+t)+a,A=n-e*(d[1]+r)-a
20830===i&&(s.push(p,f),o.push(p,f)),s.push(g,v,b,_,y,A),m(this,X,ve).call(this,p,f,g,v,b,_,y,A,4,o)}i.push({bezier:s,points:o})}return i}function ve(e,t,r,n,i,a,s,o,l,c){if(m(this,$,be).call(this,e,t,r,n,i,a,s,o))c.push(s,o)
2084else{for(let u=1;u<l-1;u++){const h=u/l,d=1-h
2085let p=h*e+d*r,f=h*t+d*n,m=h*r+d*i,g=h*n+d*a
2086p=h*p+d*m,f=h*f+d*g,m=h*m+d*(h*i+d*s),g=h*g+d*(h*a+d*o),p=h*p+d*m,f=h*f+d*g,c.push(p,f)}c.push(s,o)}}function be(e,t,r,n,i,a,s,o){const l=(3*r-2*e-s)**2,c=(3*n-2*t-o)**2,u=(3*i-e-2*s)**2,h=(3*a-t-2*o)**2
2087return Math.max(l,u)+Math.max(c,h)<=10}function _e(){let e=1/0,t=-1/0,r=1/0,i=-1/0
2088for(const a of this.paths)for(const[s,o,l,c]of a){const a=n.Util.bezierBoundingBox(...s,...o,...l,...c)
2089e=Math.min(e,a[0]),r=Math.min(r,a[1]),t=Math.max(t,a[2]),i=Math.max(i,a[3])}return[e,r,t,i]}function ye(){return p(this,x)?Math.ceil(this.thickness*this.parentScale):0}function Ae(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
2090if(this.isEmpty())return
2091if(!p(this,x))return void m(this,W,le).call(this)
2092const t=m(this,Y,_e).call(this),r=m(this,K,ye).call(this)
2093d(this,_,Math.max(g,t[2]-t[0])),d(this,b,Math.max(g,t[3]-t[1]))
2094const n=Math.ceil(r+p(this,_)*this.scaleFactor),i=Math.ceil(r+p(this,b)*this.scaleFactor),[a,s]=this.parentDimensions
2095this.width=n/a,this.height=i/s,d(this,v,n/i),m(this,J,Se).call(this)
2096const o=this.translationX,l=this.translationY
2097this.translationX=-t[0],this.translationY=-t[1],m(this,U,de).call(this),m(this,W,le).call(this),d(this,E,n),d(this,k,i),this.setDims(n,i)
2098const c=e?r/this.scaleFactor/2:0
2099this.translate(o-this.translationX-c,l-this.translationY-c)}function Se(){const{style:e}=this.div
2100p(this,v)>=1?(e.minHeight="16px",e.minWidth=`${Math.round(p(this,v)*g)}px`):(e.minWidth="16px",e.minHeight=`${Math.round(g/p(this,v))}px`)}t.InkEditor=Z,l(Z,"_defaultColor",null),l(Z,"_defaultOpacity",1),l(Z,"_defaultThickness",1),l(Z,"_l10nPromise",void 0),l(Z,"_type","ink")},(e,t,r)=>{"use strict"
2101Object.defineProperty(t,"__esModule",{value:!0}),t.fitCurve=void 0
2102const n=r(166)
2103t.fitCurve=n},e=>{"use strict"
2104function t(e,i,a,s,l){var c,u,h,d,p,f,m,g,v,b,_,y,A
2105if(2===e.length)return y=o.vectorLen(o.subtract(e[0],e[1]))/3,[c=[e[0],o.addArrays(e[0],o.mulItems(i,y)),o.addArrays(e[1],o.mulItems(a,y)),e[1]]]
2106if(u=function(e){var t,r,n,i=[]
2107return e.forEach(((e,a)=>{t=a?r+o.vectorLen(o.subtract(e,n)):0,i.push(t),r=t,n=e})),i=i.map((e=>e/r)),i}(e),[c,d,f]=r(e,u,u,i,a,l),0===d||d<s)return[c]
2108if(d<s*s)for(h=u,p=d,m=f,A=0;A<20;A++){if(h=n(c,e,h),[c,d,f]=r(e,u,h,i,a,l),d<s)return[c]
2109if(f===m){let e=d/p
2110if(e>.9999&&e<1.0001)break}p=d,m=f}return _=[],(g=o.subtract(e[f-1],e[f+1])).every((e=>0===e))&&(g=o.subtract(e[f-1],e[f]),[g[0],g[1]]=[-g[1],g[0]]),v=o.normalize(g),b=o.mulItems(v,-1),(_=_.concat(t(e.slice(0,f+1),i,v,s,l))).concat(t(e.slice(f),b,a,s,l))}function r(e,t,r,n,s,c){var u,h,d
2111return u=function(e,t,r,n){var i,a,s,c,u,h,d,p,f,m,g,v,b,_,y,A,S,w=e[0],x=e[e.length-1]
2112for(i=[w,null,null,x],a=o.zeros_Xx2x2(t.length),b=0,_=t.length;b<_;b++)S=1-(A=t[b]),(s=a[b])[0]=o.mulItems(r,3*A*(S*S)),s[1]=o.mulItems(n,3*S*(A*A))
2113for(c=[[0,0],[0,0]],u=[0,0],b=0,_=e.length;b<_;b++)A=t[b],s=a[b],c[0][0]+=o.dot(s[0],s[0]),c[0][1]+=o.dot(s[0],s[1]),c[1][0]+=o.dot(s[0],s[1]),c[1][1]+=o.dot(s[1],s[1]),y=o.subtract(e[b],l.q([w,w,x,x],A)),u[0]+=o.dot(s[0],y),u[1]+=o.dot(s[1],y)
2114return h=c[0][0]*c[1][1]-c[1][0]*c[0][1],d=c[0][0]*u[1]-c[1][0]*u[0],p=u[0]*c[1][1]-u[1]*c[0][1],m=0===h?0:d/h,(f=0===h?0:p/h)<(g=1e-6*(v=o.vectorLen(o.subtract(w,x))))||m<g?(i[1]=o.addArrays(w,o.mulItems(r,v/3)),i[2]=o.addArrays(x,o.mulItems(n,v/3))):(i[1]=o.addArrays(w,o.mulItems(r,f)),i[2]=o.addArrays(x,o.mulItems(n,m))),i}(e,r,n,s),[h,d]=function(e,t,r){var n,s,c,u,h,d,p,f
2115s=0,c=Math.floor(e.length/2)
2116const m=i(t,10)
2117for(h=0,d=e.length;h<d;h++)p=e[h],f=a(0,r[h],m,10),(n=(u=o.subtract(l.q(t,f),p))[0]*u[0]+u[1]*u[1])>s&&(s=n,c=h)
2118return[s,c]}(e,u,t),c&&c({bez:u,points:e,params:t,maxErr:h,maxPoint:d}),[u,h,d]}function n(e,t,r){return r.map(((r,n)=>function(e,t,r){var n=o.subtract(l.q(e,r),t),i=l.qprime(e,r),a=o.mulMatrix(n,i),s=o.sum(o.squareItems(i))+2*o.mulMatrix(n,l.qprimeprime(e,r))
2119return 0===s?r:r-a/s}(e,t[n],r)))}var i=function(e,t){for(var r,n=[0],i=e[0],a=0,s=1;s<=t;s++)r=l.q(e,s/t),a+=o.vectorLen(o.subtract(r,i)),n.push(a),i=r
2120return n.map((e=>e/a))}
2121function a(e,t,r,n){if(t<0)return 0
2122if(t>1)return 1
2123for(var i,a,s,o,l=1;l<=n;l++)if(t<=r[l]){s=(l-1)/n,a=l/n,o=(t-(i=r[l-1]))/(r[l]-i)*(a-s)+s
2124break}return o}function s(e,t){return o.normalize(o.subtract(e,t))}class o{static zeros_Xx2x2(e){for(var t=[];e--;)t.push([0,0])
2125return t}static mulItems(e,t){return e.map((e=>e*t))}static mulMatrix(e,t){return e.reduce(((e,r,n)=>e+r*t[n]),0)}static subtract(e,t){return e.map(((e,r)=>e-t[r]))}static addArrays(e,t){return e.map(((e,r)=>e+t[r]))}static addItems(e,t){return e.map((e=>e+t))}static sum(e){return e.reduce(((e,t)=>e+t))}static dot(e,t){return o.mulMatrix(e,t)}static vectorLen(e){return Math.hypot(...e)}static divItems(e,t){return e.map((e=>e/t))}static squareItems(e){return e.map((e=>e*e))}static normalize(e){return this.divItems(e,this.vectorLen(e))}}class l{static q(e,t){var r=1-t,n=o.mulItems(e[0],r*r*r),i=o.mulItems(e[1],3*r*r*t),a=o.mulItems(e[2],3*r*t*t),s=o.mulItems(e[3],t*t*t)
2126return o.addArrays(o.addArrays(n,i),o.addArrays(a,s))}static qprime(e,t){var r=1-t,n=o.mulItems(o.subtract(e[1],e[0]),3*r*r),i=o.mulItems(o.subtract(e[2],e[1]),6*r*t),a=o.mulItems(o.subtract(e[3],e[2]),3*t*t)
2127return o.addArrays(o.addArrays(n,i),a)}static qprimeprime(e,t){return o.addArrays(o.mulItems(o.addArrays(o.subtract(e[2],o.mulItems(e[1],2)),e[0]),6*(1-t)),o.mulItems(o.addArrays(o.subtract(e[3],o.mulItems(e[2],2)),e[1]),6*t))}}e.exports=function(e,r,n){if(!Array.isArray(e))throw new TypeError("First argument should be an array")
2128if(e.forEach((t=>{if(!Array.isArray(t)||t.some((e=>
2128"number"!=typeof e))||t.length!==e[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")})),(e=e.filter(((t,r)=>0===r||!t.every(((t,n)=>t===e[r-1][n]))))).length<2)return[]
2129const i=e.length,a=s(e[1],e[0]),o=s(e[i-2],e[i-1])
2130return t(e,a,o,r,n)},e.exports.fitCubic=t,e.exports.createTangent=s},(e,t,r)=>{"use strict"
2131Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0
2132var n=r(1),i=r(142),a=r(139),s=r(168),o=r(169)
2133function l(e,t,r){return function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}(e,t),r}function c(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance")
2134return r}const h=1e3,d=new WeakSet
2135function p(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class f{static create(e){switch(e.data.annotationType){case n.AnnotationType.LINK:return new b(e)
2136case n.AnnotationType.TEXT:return new A(e)
2137case n.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new w(e)
2138case"Btn":return e.data.radioButton?new P(e):e.data.checkBox?new x(e):new C(e)
2139case"Ch":return new T(e)}return new S(e)
2140case n.AnnotationType.POPUP:return new E(e)
2141case n.AnnotationType.FREETEXT:return new R(e)
2142case n.AnnotationType.LINE:return new F(e)
2143case n.AnnotationType.SQUARE:return new M(e)
2144case n.AnnotationType.CIRCLE:return new O(e)
2145case n.AnnotationType.POLYLINE:return new I(e)
2146case n.AnnotationType.CARET:return new L(e)
2147case n.AnnotationType.INK:return new j(e)
2148case n.AnnotationType.POLYGON:return new D(e)
2149case n.AnnotationType.HIGHLIGHT:return new N(e)
2150case n.AnnotationType.UNDERLINE:return new W(e)
2151case n.AnnotationType.SQUIGGLY:return new B(e)
2152case n.AnnotationType.STRIKEOUT:return new q(e)
2153case n.AnnotationType.STAMP:return new G(e)
2154case n.AnnotationType.FILEATTACHMENT:return new U(e)
2155default:return new m(e)}}}class m{constructor(e){let{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
2156this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,t&&(this.container=this._createContainer(r)),n&&(this.quadrilaterals=this._createQuadrilaterals(r))}_createContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
2157const{data:t,page:r,viewport:i}=this,a=document.createElement("section")
2158a.setAttribute("data-annotation-id",t.id),t.noRotate&&a.classList.add("norotate")
2159const{pageWidth:s,pageHeight:o,pageX:l,pageY:c}=i.rawDims,{width:u,height:h}=p(t.rect),d=n.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]])
2160if(!e&&t.borderStyle.width>0){a.style.borderWidth=`${t.borderStyle.width}px`
2161const e=t.borderStyle.horizontalCornerRadius,r=t.borderStyle.verticalCornerRadius
2162if(e>0||r>0){const t=`calc(${e}px * var(--scale-factor)) / calc(${r}px * var(--scale-factor))`
2163a.style.borderRadius=t}else if(this instanceof P){const e=`calc(${u}px * var(--scale-factor)) / calc(${h}px * var(--scale-factor))`
2164a.style.borderRadius=e}switch(t.borderStyle.style){case n.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid"
2165break
2166case n.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed"
2167break
2168case n.AnnotationBorderStyleType.BEVELED:(0,n.warn)("Unimplemented border style: beveled")
2169break
2170case n.AnnotationBorderStyleType.INSET:(0,n.warn)("Unimplemented border style: inset")
2171break
2172case n.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}const i=t.borderColor||null
2173i?a.style.borderColor=n.Util.makeHexColor(0|i[0],0|i[1],0|i[2]):a.style.borderWidth=0}a.style.left=100*(d[0]-l)/s+"%",a.style.top=100*(d[1]-c)/o+"%"
2174const{rotation:f}=t
2175return t.hasOwnCanvas||0===f?(a.style.width=100*u/s+"%",a.style.height=100*h/o+"%"):this.setRotation(f,a),a}setRotation(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container
2176const{pageWidth:r,pageHeight:n}=this.viewport.rawDims,{width:i,height:a}=p(this.data.rect)
2177let s,o
2178e%180==0?(s=100*i/r,o=100*a/n):(s=100*a/r,o=100*i/n),t.style.width=`${s}%`,t.style.height=`${o}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,r)=>{const n=r.detail[e]
2179r.target.style[t]=s.ColorConverters[`${n[0]}_HTML`](n.slice(1))}
2180return(0,n.shadow)(this,"_commonActions",{display:e=>{const t=e.detail.display%2==1
2181this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:e=>{this.annotationStorage.setValue(this.data.id,{print:e.detail.print})},hidden:e=>{this.container.style.visibility=e.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:e.detail.hidden})},focus:e=>{setTimeout((()=>
2181e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation
2182this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const r=this._commonActions
2183for(const n of Object.keys(t.detail)){const i=e[n]||r[n]
2184null==i||i(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return
2185const t=this.annotationStorage.getRawValue(this.data.id)
2186if(!t)return
2187const r=this._commonActions
2188for(const[n,i]of Object.entries(t)){const a=r[n]
2189a&&(a({detail:{[n]:i},target:e}),delete t[n])}}_createQuadrilaterals(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
2190if(!this.data.quadPoints)return null
2191const t=[],r=this.data.rect
2192for(const r of this.data.quadPoints)this.data.rect=[r[2].x,r[2].y,r[1].x,r[1].y],t.push(this._createContainer(e))
2193return this.data.rect=r,t}_createPopup(e,t){let r=this.container
2194this.quadrilaterals&&(e||=this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).classList.add("popupTriggerArea"),r.append(e))
2195const n=new k({container:r,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render()
2196n.style.left="100%",r.append(n)}_renderQuadrilaterals(e){for(const t of this.quadrilaterals)t.classList.add(e)
2197return this.quadrilaterals}render(){(0,n.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
2198const r=[]
2199if(this._fieldObjects){const i=this._fieldObjects[e]
2200if(i)for(const{page:e,id:a,exportValues:s}of i){if(-1===e)continue
2201if(a===t)continue
2202const i="string"==typeof s?s:null,o=document.querySelector(`[data-element-id="${a}"]`)
2203!o||d.has(o)?r.push({id:a,exportValue:i,domElement:o}):(0,n.warn)(`_getElementsByName - element not allowed: ${a}`)}return r}for(const n of document.getElementsByName(e)){const{exportValue:e}=n,i=n.getAttribute("data-element-id")
2204i!==t&&d.has(n)&&r.push({id:i,exportValue:e,domElement:n})}return r}}var g=new WeakSet,v=new WeakSet
2205class b extends m{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
2206super(e,{isRenderable:!0,ignoreBorder:!(null==t||!t.ignoreBorder),createQuadrilaterals:!0}),c(this,v),c(this,g),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,r=document.createElement("a")
2207r.setAttribute("data-element-id",e.id)
2208let n=!1
2209return e.url?(t.addLinkAttributes(r,e.url,e.newWindow),n=!0):e.action?(this._bindNamedAction(r,e.action),n=!0):e.attachment?(this._bindAttachment(r,e.attachment),n=!0):e.setOCGState?(u(this,v,y).call(this,r,e.setOCGState),n=!0):e.dest?(this._bindLink(r,e.dest),n=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,e),n=!0),e.resetForm?(this._bindResetFormAction(r,e.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(r,""),n=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(((e,t)=>{const n=0===t?r:r.cloneNode()
2210return e.append(n),e})):(this.container.classList.add("linkAnnotation"),n&&this.container.append(r),this.container)}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&u(this,g,_).call(this)}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),u(this,g,_).call(this)}_bindAttachment(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>{var e
2211return null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,t.content,t.filename),!1},u(this,g,_).call(this)}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("")
2212const r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]])
2213for(const n of Object.keys(t.actions)){const i=r.get(n)
2214i&&(e[i]=()=>{var e
2215return null===(e=this.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:n}}),!1})}e.onclick||(e.onclick=()=>!1),u(this,g,_).call(this)}_bindResetFormAction(e,t){const r=e.onclick
2216r||(e.href=this.linkService.getAnchorUrl("")),u(this,g,_).call(this),this._fieldObjects?e.onclick=()=>{null==r||r()
2217const{fields:e,refs:i,include:a}=t,s=[]
2218if(0!==e.length||0!==i.length){const t=new Set(i)
2219for(const r of e){const e=this._fieldObjects[r]||[]
2220for(const{id:r}of e)t.add(r)}for(const e of Object.values(this._fieldObjects))for(const r of e)t.has(r.id)===a&&s.push(r)}else for(const e of Object.values(this._fieldObjects))s.push(...e)
2221const o=this.annotationStorage,l=[]
2222for(const e of s){const{id:t}=e
2223switch(l.push(t),e.type){case"text":{const r=e.defaultValue||""
2224o.setValue(t,{value:r})
2225break}case"checkbox":case"radiobutton":{const r=e.defaultValue===e.exportValues
2226o.setValue(t,{value:r})
2227break}case"combobox":case"listbox":{const r=e.defaultValue||""
2228o.setValue(t,{value:r})
2229break}default:continue}const r=document.querySelector(`[data-element-id="${t}"]`)
2230r&&(d.has(r)?r.dispatchEvent(new Event("resetform")):(0,n.warn)(`_bindResetFormAction - element not allowed: ${t}`))}var c
2231return this.enableScripting&&(null===(c=this.linkService.eventBus)||void 0===c||c.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}})),!1}:((0,n.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),r||(e.onclick=()=>!1))}}function _(){this.container.setAttribute("data-internal-link","")}function y(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),u(this,g,_).call(this)}class A extends m{constructor(e){var t,r,n
2232super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str)})}render(){this.container.classList.add("textAnnotation")
2233const e=document.createElement("img")
2234return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.append(e),this.container}}
2234class S extends m{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(e){var t
2235this.data.hasOwnCanvas&&("CANVAS"===(null===(t=e.previousSibling)||void 0===t?void 0:t.nodeName)&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){const{isWin:t,isMac:r}=n.FeatureTest.platform
2236return t&&e.ctrlKey||r&&e.metaKey}_setEventListener(e,t,r,n){t.includes("mouse")?e.addEventListener(t,(e=>{var t
2237null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(t,(e=>{var t
2238null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:n(e)}})}))}_setEventListeners(e,t,r){for(const[i,a]of t){var n;("Action"===a||null!==(n=this.data.actions)&&void 0!==n&&n[a])&&this._setEventListener(e,i,a,r)}}_setBackgroundColor(e){const t=this.data.backgroundColor||null
2239e.style.backgroundColor=null===t?"transparent":n.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const{fontColor:t}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||9,i=e.style
2240let a
2241const s=e=>Math.round(10*e)/10
2242if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(n.LINE_FACTOR*r))||1)
2243a=Math.min(r,s(t/n.LINE_FACTOR))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2)
2244a=Math.min(r,s(e/n.LINE_FACTOR))}i.fontSize=`calc(${a}px * var(--scale-factor))`,i.color=n.Util.makeHexColor(t[0],t[1],t[2]),null!==this.data.textAlignment&&(i.textAlign=["left","center","right"][this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class w extends S{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,r,n){const i=this.annotationStorage
2245for(const a of this._getElementsByName(e.name,e.id))a.domElement&&(a.domElement[t]=r),i.setValue(a.id,{[n]:r})}render(){const e=this.annotationStorage,t=this.data.id
2246this.container.classList.add("textWidgetAnnotation")
2247let r=null
2248if(this.renderForms){const i=e.getValue(t,{value:this.data.fieldValue})
2249let a=i.formattedValue||i.value||""
2250const s=e.getValue(t,{charLimit:this.data.maxLen}).charLimit
2251s&&a.length>s&&(a=a.slice(0,s))
2252const o={userValue:a,formattedValue:null,lastCommittedValue:null,commitKey:1}
2253this.data.multiLine?(r=document.createElement("textarea"),r.textContent=a,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type="text",r.setAttribute("value",a),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),d.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=h,this._setRequired(r,this.data.required),s&&(r.maxLength=s),r.addEventListener("input",(n=>{e.setValue(t,{value:n.target.value}),this.setPropertyOnSiblings(r,"value",n.target.value,"value")})),r.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue??""
2254r.value=o.userValue=t,o.formattedValue=null}))
2255let l=e=>{const{formattedValue:t}=o
2256null!=t&&(e.target.value=t),e.target.scrollLeft=0}
2257if(this.enableScripting&&this.hasJSActions){var n
2258r.addEventListener("focus",(e=>{const{target:t}=e
2259o.userValue&&(t.value=o.userValue),o.lastCommittedValue=t.value,o.commitKey=1})),r.addEventListener("updatefromsandbox",(r=>{this.showElementAndHideCanvas(r.target)
2260const n={value(r){o.userValue=r.detail.value??"",e.setValue(t,{value:o.userValue.toString()}),r.target.value=o.userValue},formattedValue(r){const{formattedValue:n}=r.detail
2261o.formattedValue=n,null!=n&&r.target!==document.activeElement&&(r.target.value=n),e.setValue(t,{formattedValue:n})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:r=>{var n
2262const{charLimit:i}=r.detail,{target:a}=r
2263if(0===i)return void a.removeAttribute("maxLength")
2264a.setAttribute("maxLength",i)
2265let s=o.userValue
2266!s||s.length<=i||(s=s.slice(0,i),a.value=o.userValue=s,e.setValue(t,{value:s}),null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:s,willCommit:!0,
2266commitKey:1,selStart:a.selectionStart,selEnd:a.selectionEnd}}))}}
2267this._dispatchEventFromSandbox(n,r)})),r.addEventListener("keydown",(e=>{var r
2268o.commitKey=1
2269let n=-1
2270if("Escape"===e.key?n=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(o.commitKey=3):n=2,-1===n)return
2271const{value:i}=e.target
2272o.lastCommittedValue!==i&&(o.lastCommittedValue=i,o.userValue=i,null===(r=this.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,willCommit:!0,commitKey:n,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}))
2273const i=l
2274l=null,r.addEventListener("blur",(e=>{if(!e.relatedTarget)return
2275const{value:r}=e.target
2276var n
2277o.userValue=r,o.lastCommittedValue!==r&&(null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:o.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})),i(e)})),null!==(n=this.data.actions)&&void 0!==n&&n.Keystroke&&r.addEventListener("beforeinput",(e=>{var r
2278o.lastCommittedValue=null
2279const{data:n,target:i}=e,{value:a,selectionStart:s,selectionEnd:l}=i
2280let c=s,u=l
2281switch(e.inputType){case"deleteWordBackward":{const e=a.substring(0,s).match(/\w*[^\w]*$/)
2282e&&(c-=e[0].length)
2283break}
2283case"deleteWordForward":{const e=a.substring(s).match(/^[^\w]*\w*/)
2284e&&(u+=e[0].length)
2285break}case"deleteContentBackward":s===l&&(c-=1)
2286break
2287case"deleteContentForward":s===l&&(u+=1)}e.preventDefault(),null===(r=this.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:a,change:n||"",willCommit:!1,selStart:c,selEnd:u}})})),this._setEventListeners(r,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(l&&r.addEventListener("blur",l),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/s
2288r.classList.add("comb"),r.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell"
2289return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class x extends S{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,r=t.id
2290let n=e.getValue(r,{value:t.exportValue===t.fieldValue}).value
2291"string"==typeof n&&(n="Off"!==n,e.setValue(r,{value:n})),this.container.classList.add("buttonWidgetAnnotation","checkBox")
2292const i=document.createElement("input")
2293return d.add(i),i.setAttribute("data-element-id",r),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=t.fieldName,n&&i.setAttribute("checked",!0),i.setAttribute("exportValue",t.exportValue),i.tabIndex=h,i.addEventListener("change",(n=>{const{name:i,checked:a}=n.target
2294for(const n of this._getElementsByName(i,r)){const r=a&&n.exportValue===t.exportValue
2295n.domElement&&(n.domElement.checked=r),e.setValue(n.id,{value:r})}e.setValue(r,{value:a})})),i.addEventListener("resetform",(e=>{const r=t.defaultFieldValue||"Off"
2296e.target.checked=r===t.exportValue})),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",(t=>{const n={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(r,{value:t.target.checked})}}
2297this._dispatchEventFromSandbox(n,t)})),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class P extends S{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton")
2298const e=this.annotationStorage,t=this.data,r=t.id
2299let n=e.getValue(r,{value:t.fieldValue===t.buttonValue}).value
2300"string"==typeof n&&(n=n!==t.buttonValue,e.setValue(r,{value:n}))
2301const i=document.createElement("input")
2302if(d.add(i),i.setAttribute("data-element-id",r),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=t.fieldName,n&&i.setAttribute("checked",!0),i.tabIndex=h,i.addEventListener("change",(t=>{const{name:n,checked:i}=t.target
2303for(const t of this._getElementsByName(n,r))e.setValue(t.id,{value:!1})
2304e.setValue(r,{value:i})})),i.addEventListener("resetform",(e=>{const r=t.defaultFieldValue
2305e.target.checked=null!=r&&r===t.buttonValue})),this.enableScripting&&this.hasJSActions){const n=t.buttonValue
2306i.addEventListener("updatefromsandbox",(t=>{const i={value:t=>{const i=n===t.detail.value
2307for(const n of this._getElementsByName(t.target.name)){const t=i&&n.id===r
2308n.domElement&&(n.domElement.checked=t),e.setValue(n.id,{value:t})}}}
2309this._dispatchEventFromSandbox(i,t)})),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class C extends b{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render()
2310e.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(e.title=this.data.alternativeText)
2311const t=e.lastChild
2312return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class T extends S{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation")
2313const e=this.annotationStorage,t=this.data.id,r=e.getValue(t,{value:this.data.fieldValue}),n=document.createElement("select")
2314d.add(n),n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,this._setRequired(n,this.data.required),n.name=this.data.fieldName,n.tabIndex=h
2315let i=this.data.combo&&this.data.options.length>0
2316this.data.combo||(n.size=this.data.options.length,this.data.multiSelect&&(n.multiple=!0)),n.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue
2317for(const e of n.options)e.selected=e.value===t}))
2318for(const e of this.data.options){const t=document.createElement("option")
2319t.textContent=e.displayValue,t.value=e.exportValue,r.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),i=!1),n.append(t)}let a=null
2320if(i){const e=document.createElement("option")
2321e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),n.prepend(e),a=()=>{e.remove(),n.removeEventListener("input",a),a=null},n.addEventListener("input",a)}const s=e=>{const t=e?"value":"textContent",{options:r,multiple:i}=n
2322return i?Array.prototype.filter.call(r,(e=>e.selected)).map((e=>e[t])):-1===r.selectedIndex?null:r[r.selectedIndex][t]}
2323let o=s(!1)
2324const l=e=>{const t=e.target.options
2325return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))}
2326return this.enableScripting&&this.hasJSActions?(n.addEventListener("updatefromsandbox",(r=>{const i={value(r){var i
2327null===(i=a)||void 0===i||i()
2328const l=r.detail.value,c=new Set(Array.isArray(l)?l:[l])
2329for(const e of n.options)e.selected=c.has(e.value)
2330e.setValue(t,{value:s(!0)}),o=s(!1)},multipleSelection(e){n.multiple=!0},remove(r){const i=n.options,a=r.detail.remove
2331i[a].selected=!1,n.remove(a),i.length>0&&-1===Array.prototype.findIndex.call(i,(e=>e.selected))&&(i[0].selected=!0),e.setValue(t,{value:s(!0),items:l(r)}),o=s(!1)},clear(r){for(;0!==n.length;)n.remove(0)
2332e.setValue(t,{value:null,items:[]}),o=s(!1)},insert(r){const{index:i,displayValue:a,exportValue:c}=r.detail.insert,u=n.children[i],h=document.createElement("option")
2333h.textContent=a,h.value=c,u?u.before(h):n.append(h),e.setValue(t,{value:s(!0),items:l(r)}),o=s(!1)},items(r){const{items:i}=r.detail
2334for(;0!==n.length;)n.remove(0)
2335for(const e of i){const{displayValue:t,exportValue:r}=e,i=document.createElement("option")
2336i.textContent=t,i.value=r,n.append(i)}n.options.length>0&&(n.options[0].selected=!0),e.setValue(t,{value:s(!0),items:l(r)}),o=s(!1)},indices(r){const n=new Set(r.detail.indices)
2337for(const e of r.target.options)e.selected=n.has(e.index)
2338e.setValue(t,{value:s(!0)}),o=s(!1)},editable(e){e.target.disabled=!e.detail.editable}}
2339this._dispatchEventFromSandbox(i,r)})),n.addEventListener("input",(r=>{var n
2340const i=s(!0)
2341e.setValue(t,{value:i}),r.preventDefault(),null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,changeEx:i,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):n.addEventListener("input",(function(r){e.setValue(t,{value:s(!0)})})),this.data.combo&&this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class E extends m{constructor(e){var t,r,n
2342const{data:i}=e
2343super(e,{isRenderable:!E.IGNORE_TYPES.has(i.parentType)&&!!(null!==(t=i.titleObj)&&void 0!==t&&t.str||null!==(r=i.contentsObj)&&void 0!==r&&r.str||null!==(n=i.richText)&&void 0!==n&&n.str)})}render(){this.container.classList.add("popupAnnotation")
2344const e=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`)
2345if(0===e.length)return this.container
2346const t=new k({container:this.container,trigger:Array.from(e),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),r=this.page,i=n.Util.normalizeRect([this.data.parentRect[0],r.view[3]-this.data.parentRect[1]+r.view[1],this.data.parentRect[2],r.view[3]-this.data.parentRect[3]+r.view[1]]),a=i[0]+this.data.parentRect[2]-this.data.parentRect[0],s=i[1],{pageWidth:o,pageHeight:l,pageX:c,pageY:u}=this.viewport.rawDims
2347return this.container.style.left=100*(a-c)/o+"%",this.container.style.top=100*(s-u)/l+"%",this.container.append(t.render()),this.container}}_defineProperty2(E,"IGNORE_TYPES",new Set(["Line","Square","Circle","PolyLine","Polygon","Ink"]))
2348class k{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.titleObj=e.titleObj,this.modificationDate=e.modificationDate,this.contentsObj=e.contentsObj,this.richText=e.richText,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}
2348render(){var e,t
2349const r=document.createElement("div")
2350r.classList.add("popupWrapper"),this.hideElement=this.hideWrapper?r:this.container,this.hideElement.hidden=!0
2351const a=document.createElement("div")
2352a.classList.add("popup")
2353const s=this.color
2354if(s){const e=.7*(255-s[0])+s[0],t=.7*(255-s[1])+s[1],r=.7*(255-s[2])+s[2]
2355a.style.backgroundColor=n.Util.makeHexColor(0|e,0|t,0|r)}const l=document.createElement("h1")
2356l.dir=this.titleObj.dir,l.textContent=this.titleObj.str,a.append(l)
2357const c=i.PDFDateString.toDateObject(this.modificationDate)
2358if(c){const e=document.createElement("span")
2359e.classList.add("popupDate"),e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:c.toLocaleDateString(),time:c.toLocaleTimeString()}),a.append(e)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){const e=this._formatContents(this.contentsObj)
2360a.append(e)}else o.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:a}),a.lastChild.classList.add("richText","popupContent")
2361Array.isArray(this.trigger)||(this.trigger=[this.trigger])
2362for(const e of this.trigger)e.addEventListener("click",this._toggle.bind(this)),e.addEventListener("mouseover",this._show.bind(this,!1)),e.addEventListener("mouseout",this._hide.bind(this,!1))
2363return a.addEventListener("click",this._hide.bind(this,!0)),r.append(a),r}_formatContents(e){let{str:t,dir:r}=e
2364const n=document.createElement("p")
2365n.classList.add("popupContent"),n.dir=r
2366const i=t.split(/(?:\r\n?|\n)/)
2367for(let e=0,t=i.length;e<t;++e){const r=i[e]
2368n.append(document.createTextNode(r)),e<t-1&&n.append(document.createElement("br"))}return n}
2368_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class R extends m{constructor(e){var t,r,n
2369super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0}),this.textContent=e.data.textContent}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div")
2370e.classList.add("annotationTextContent"),e.setAttribute("role","comment")
2371for(const t of this.textContent){const r=document.createElement("span")
2372r.textContent=t,e.append(r)}this.container.append(e)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class F extends m{constructor(e){var t,r,n
2373super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation")
2374const e=this.data,{width:t,height:r}=p(e.rect),n=this.svgFactory.create(t,r,!0),i=this.svgFactory.createElement("svg:line")
2375return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),n.append(i),this.container.append(n),this._createPopup(i,e),this.container}}class M extends m{constructor(e){var t,r,n
2376super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation")
2377const e=this.data,{width:t,height:r}=p(e.rect),n=this.svgFactory.create(t,r,!0),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect")
2378return a.setAttribute("x",i/2),a.setAttribute("y",i/2),a.setAttribute("width",t-i),a.setAttribute("height",r-i),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),n.append(a),this.container.append(n),this._createPopup(a,e),this.container}}class O extends m{constructor(e){var t,r,n
2379super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation")
2380const e=this.data,{width:t,height:r}=p(e.rect),n=this.svgFactory.create(t,r,!0),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse")
2381return a.setAttribute("cx",t/2),a.setAttribute("cy",r/2),a.setAttribute("rx",t/2-i/2),a.setAttribute("ry",r/2-i/2),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),n.append(a),this.container.append(n),this._createPopup(a,e),this.container}}class I extends m{constructor(e){var t,r,n
2382super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName)
2383const e=this.data,{width:t,height:r}=p(e.rect),n=this.svgFactory.create(t,r,!0)
2384let i=[]
2385for(const t of e.vertices){const r=t.x-e.rect[0],n=e.rect[3]-t.y
2386i.push(r+","+n)}i=i.join(" ")
2387const a=this.svgFactory.createElement(this.svgElementName)
2388return a.setAttribute("points",i),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),n.append(a),this.container.append(n),this._createPopup(a,e),this.container}}
2388class D extends I{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class L extends m{constructor(e){var t,r,n
2389super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class j extends m{constructor(e){var t,r,n
2390super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName)
2391const e=this.data,{width:t,height:r}=p(e.rect),n=this.svgFactory.create(t,r,!0)
2392for(const t of e.inkLists){let r=[]
2393for(const n of t){const t=n.x-e.rect[0],i=e.rect[3]-n.y
2394r.push(`${t},${i}`)}r=r.join(" ")
2395const i=this.svgFactory.createElement(this.svgElementName)
2396i.setAttribute("points",r),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),this._createPopup(i,e),n.append(i)}return this.container.append(n),this.container}}class N extends m{constructor(e){var t,r,n
2397super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.classList.add("highlightAnnotation"),this.container)}}class W extends m{constructor(e){var t,r,n
2398super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.classList.add("underlineAnnotation"),this.container)}}class B extends m{constructor(e){var t,r,n
2399super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.classList.add("squigglyAnnotation"),this.container)}}class q extends m{constructor(e){var t,r,n
2400super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.classList.add("strikeoutAnnotation"),this.container)}}class G extends m{constructor(e){var t,r,n
2401super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(r=e.data.contentsObj)&&void 0!==r&&r.str||null!==(n=e.data.richText)&&void 0!==n&&n.str),ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class U extends m{constructor(e){var t
2402super(e,{isRenderable:!0})
2403const{filename:r,content:n}=this.data.file
2404this.filename=(0,i.getFilenameFromUrl)(r,!0),this.content=n,null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("fileattachmentannotation",{source:this,filename:r,content:n})}render(){var e,t
2405let r
2406return this.container.classList.add("fileAttachmentAnnotation"),this.data.hasAppearance?r=document.createElement("div"):(r=document.createElement("img"),r.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(this.data.name)?"paperclip":"pushpin"}.svg`),r.classList.add("popupTriggerArea"),r.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(r,this.data),this.container.append(r),this.container}_download(){var e
2407null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}class z{static render(e){const{annotations:t,div:r,viewport:s,accessibilityManager:o}=e;(0,i.setLayerDimensions)(r,s)
2408const c={data:null,layer:r,page:e.page,viewport:s,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new i.DOMSVGFactory,annotationStorage:e.annotationStorage||new a.AnnotationStorage,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects}
2409let u=0
2410for(const e of t){if(e.noHTML)continue
2411if(e.annotationType!==n.AnnotationType.POPUP){const{width:t,height:r}=p(e.rect)
2412if(t<=0||r<=0)continue}c.data=e
2413const t=f.create(c)
2414if(!t.isRenderable)continue
2415const i=t.render()
2416if(e.hidden&&(i.style.visibility="hidden"),Array.isArray(i))for(const t of i)t.style.zIndex=u++,l(z,z,H).call(z,t,e.id,r,o)
2417else i.style.zIndex=u++,t instanceof E?r.prepend(i):l(z,z,H).call(z,i,e.id,r,o)}l(this,z,V).call(this,r,e.annotationCanvasMap)}static update(e){const{annotationCanvasMap:t,div:r,viewport:n}=e;(0,i.setLayerDimensions)(r,{rotation:n.rotation}),l(this,z,V).call(this,r,t),r.hidden=!1}}function H(e,t,r,n){const a=e.firstChild||e
2418a.id=`${i.AnnotationPrefix}${t}`,r.append(e),null==n||n.moveElementInDOM(r,e,a,!1)}function V(e,t){if(t){for(const[r,n]of t){const t=e.querySelector(`[data-annotation-id="${r}"]`)
2419if(!t)continue
2420const{firstChild:i}=t
2421i?"CANVAS"===i.nodeName?i.replaceWith(n):i.before(n):t.append(n)}t.clear()}}t.AnnotationLayer=z},(e,t)=>{"use strict"
2422function r(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}
2422Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G(e){let[t,r,n,i]=e
2423return["G",1-Math.min(1,.3*t+.59*n+.11*r+i)]}static G_CMYK(e){let[t]=e
2424return["CMYK",0,0,0,1-t]}static G_RGB(e){let[t]=e
2425return["RGB",t,t,t]}static G_HTML(e){let[t]=e
2426const n=r(t)
2427return`#${n}${n}${n}`}static RGB_G(e){let[t,r,n]=e
2428return["G",.3*t+.59*r+.11*n]}static RGB_HTML(e){let[t,n,i]=e
2429return`#${r(t)}${r(n)}${r(i)}`}static T_HTML(){return"#00000000"}static CMYK_RGB(e){let[t,r,n,i]=e
2430return["RGB",1-Math.min(1,t+i),1-Math.min(1,n+i),1-Math.min(1,r+i)]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1)
2431return this.RGB_HTML(t)}static RGB_CMYK(e){let[t,r,n]=e
2432const i=1-t,a=1-r,s=1-n
2433return["CMYK",i,a,s,Math.min(i,a,s)]}}},(e,t,r)=>{"use strict"
2434Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0
2435var n=r(154)
2436t.XfaLayer=class{static setupStorage(e,t,r,n,i){const a=n.getValue(t,{value:null})
2437switch(r.name){case"textarea":if(null!==a.value&&(e.textContent=a.value),"print"===i)break
2438e.addEventListener("input",(e=>{n.setValue(t,{value:e.target.value})}))
2439break
2440case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(a.value===r.attributes.xfaOn?e.setAttribute("checked",!0):a.value===r.attributes.xfaOff&&e.removeAttribute("checked"),"print"===i)break
2441e.addEventListener("change",(e=>{n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==a.value&&e.setAttribute("value",a.value),"print"===i)break
2442e.addEventListener("input",(e=>{n.setValue(t,{value:e.target.value})}))}break
2443case"select":if(null!==a.value)for(const e of r.children)e.attributes.value===a.value&&(e.attributes.selected=!0)
2444e.addEventListener("input",(e=>{const r=e.target.options,i=-1===r.selectedIndex?"":r[r.selectedIndex].value
2445n.setValue(t,{value:i})}))}}static setAttributes(e){let{html:t,element:r,storage:n=null,intent:i,linkService:a}=e
2446const{attributes:s}=r,o=t instanceof HTMLAnchorElement
2447"radio"===s.type&&(s.name=`${s.name}-${i}`)
2448for(const[e,r]of Object.entries(s))if(null!=r)switch(e){case"class":r.length&&t.setAttribute(e,r.join(" "))
2449break
2450case"dataId":break
2451case"id":t.setAttribute("data-element-id",r)
2452break
2453case"style":Object.assign(t.style,r)
2454break
2455case"textContent":t.textContent=r
2456break
2457default:(!o||"href"!==e&&"newWindow"!==e)&&t.setAttribute(e,r)}o&&a.addLinkAttributes(t,s.href,s.newWindow),n&&s.dataId&&this.setupStorage(t,s.dataId,r,n)}static render(e){const t=e.annotationStorage,r=e.linkService,i=e.xfaHtml,a=e.intent||"display",s=document.createElement(i.name)
2458i.attributes&&this.setAttributes({html:s,element:i,intent:a,linkService:r})
2459const o=[[i,-1,s]],l=e.div
2460if(l.append(s),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`
2461l.style.transform=t}"richText"!==a&&l.setAttribute("class","xfaLayer xfaFont")
2462const c=[]
2463for(;o.length>0;){var u
2464const[e,i,s]=o.at(-1)
2465if(i+1===e.children.length){o.pop()
2466continue}const l=e.children[++o.at(-1)[1]]
2467if(null===l)continue
2468const{name:h}=l
2469if("#text"===h){const e=document.createTextNode(l.value)
2470c.push(e),s.append(e)
2471continue}let d
2472if(d=null!=l&&null!==(u=l.attributes)&&void 0!==u&&u.xmlns?document.createElementNS(l.attributes.xmlns,h):document.createElement(h),s.append(d),l.attributes&&this.setAttributes({html:d,element:l,storage:t,intent:a,linkService:r}),l.children&&l.children.length>0)o.push([l,-1,d])
2473else if(l.value){const e=document.createTextNode(l.value)
2474n.XfaText.shouldBuildText(h)&&c.push(e),d.append(e)}}for(const e of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0)
2475return{textDivs:c}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`
2476e.div.style.transform=t,e.div.hidden=!1}}},(e,t,r)=>{"use strict"
2477Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0
2478var n=r(142),i=r(1),a=r(3)
2479let s=class{constructor(){(0,i.unreachable)("Not implemented: SVGGraphics")}}
2480t.SVGGraphics=s
2481{const o={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},l="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",u=["butt","round","square"],h=["miter","round","bevel"],d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]
2482if(URL.createObjectURL&&"undefined"!=typeof Blob&&!r)return URL.createObjectURL(new Blob([e],{type:t}))
2483const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2483+/="
2484let i=`data:${t};base64,`
2485for(let t=0,r=e.length;t<r;t+=3){const a=255&e[t],s=255&e[t+1],o=255&e[t+2]
2486i+=n[a>>2]+n[(3&a)<<4|s>>4]+n[t+1<r?(15&s)<<2|o>>6:64]+n[t+2<r?63&o:64]}return i},p=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256)
2487for(let e=0;e<256;e++){let r=e
2488for(let e=0;e<8;e++)r=1&r?3988292384^r>>1&2147483647:r>>1&2147483647
2489t[e]=r}function r(e,r,n,i){let a=i
2490const s=r.length
2491n[a]=s>>24&255,n[a+1]=s>>16&255,n[a+2]=s>>8&255,n[a+3]=255&s,a+=4,n[a]=255&e.charCodeAt(0),n[a+1]=255&e.charCodeAt(1),n[a+2]=255&e.charCodeAt(2),n[a+3]=255&e.charCodeAt(3),a+=4,n.set(r,a),a+=r.length
2492const o=function(e,r,n){let i=-1
2493for(let a=r;a<n;a++){const r=255&(i^e[a])
2494i=i>>>8^t[r]}return~i}(n,i+4,a)
2495n[a]=o>>24&255,n[a+1]=o>>16&255,n[a+2]=o>>8&255,n[a+3]=255&o}function n(e){let t=e.length
2496const r=65535,n=Math.ceil(t/r),i=new Uint8Array(2+t+5*n+4)
2497let a=0
2498i[a++]=120,i[a++]=156
2499let s=0
2500for(;t>r;)i[a++]=0,i[a++]=255,i[a++]=255,i[a++]=0,i[a++]=0,i.set(e.subarray(s,s+r),a),a+=r,s+=r,t-=r
2501i[a++]=1,i[a++]=255&t,i[a++]=t>>8&255,i[a++]=255&~t,i[a++]=(65535&~t)>>8&255,i.set(e.subarray(s),a),a+=e.length-s
2502const o=function(e,t,r){let n=1,i=0
2503for(let t=0;t<r;++t)n=(n+(255&e[t]))%65521,i=(i+n)%65521
2504return i<<16|n}(e,0,e.length)
2505return i[a++]=o>>24&255,i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=255&o,i}function s(t,s,o,l){const c=t.width,u=t.height
2506let h,p,f
2507const m=t.data
2508switch(s){case i.ImageKind.GRAYSCALE_1BPP:p=0,h=1,f=c+7>>3
2509break
2510case i.ImageKind.RGB_24BPP:p=2,h=8,f=3*c
2511break
2512case i.ImageKind.RGBA_32BPP:p=6,h=8,f=4*c
2513break
2514default:throw new Error("invalid format")}const g=new Uint8Array((1+f)*u)
2515let v=0,b=0
2516for(let e=0;e<u;++e)g[v++]=0,g.set(m.subarray(b,b+f),v),b+=f,v+=f
2517if(s===i.ImageKind.GRAYSCALE_1BPP&&l){v=0
2518for(let e=0;e<u;e++){v++
2519for(let e=0;e<f;e++)g[v++]^=255}}const _=new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,h,p,0,0,0]),y=function(e){if(!a.isNodeJS)return n(e)
2520try{let t
2521t=parseInt(process.versions.node)>=8?e:Buffer.from(e)
2522const r=__webpack_require__(60195).deflateSync(t,{level:9})
2523return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return n(e)}(g),A=e.length+36+_.length+y.length,S=new Uint8Array(A)
2524let w=0
2525return S.set(e,w),w+=e.length,r("IHDR",_,S,w),w+=12+_.length,r("IDATA",y,S,w),w+=12+y.length,r("IEND",new Uint8Array(0),S,w),d(S,"image/png",o)}return function(e,t,r){return s(e,void 0===e.kind?i.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}()
2526class f{constructor(){this.fontSizeScale=1,this.fontWeight=o.fontWeight,this.fontSize=0,this.textMatrix=i.IDENTITY_MATRIX,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=i.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.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function m(e){let t=[]
2527const r=[]
2528for(const n of e)"save"!==n.fn?"restore"===n.fn?t=r.pop():t.push(n):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t.at(-1).items)
2529return t}function g(e){if(Number.isInteger(e))return e.toString()
2530const t=e.toFixed(10)
2531let r=t.length-1
2532if("0"!==t[r])return t
2533do{r--}while("0"===t[r])
2534return t.substring(0,"."===t[r]?r:r+1)}function v(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${g(e[0])} ${g(e[3])})`
2535if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${g(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${g(e[4])} ${g(e[5])})`
2536return`matrix(${g(e[0])} ${g(e[1])} ${g(e[2])} ${g(e[3])} ${g(e[4])} ${g(e[5])})`}let b=0,_=0,y=0
2537t.SVGGraphics=s=class{constructor(e,t){let r=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=ne
2537w f,this.transformMatrix=i.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!r,this._operatorIdMapping=[]
2538for(const e in i.OPS)this._operatorIdMapping[i.OPS[e]]=e}getObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
2539return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}save(){this.transformStack.push(this.transformMatrix)
2540const e=this.current
2541this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,r=e.argsArray
2542for(let e=0,n=t.length;e<n;e++)if(t[e]===i.OPS.dependency)for(const t of r[e]){const e=t.startsWith("g_")?this.commonObjs:this.objs,r=new Promise((r=>{e.get(t,r)}))
2543this.current.dependencies.push(r)}return Promise.all(this.current.dependencies)}transform(e,t,r,n,a,s){const o=[e,t,r,n,a,s]
2544this.transformMatrix=i.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(e,t){this.viewport=t
2545const r=this._initialize(t)
2546return this.loadDependencies(e).then((()=>(this.transformMatrix=i.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),r)))}convertOpList(e){const t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,i=[]
2547for(let e=0,a=n.length;e<a;e++){const a=n[e]
2548i.push({fnId:a,fn:t[a],args:r[e]})}return m(i)}executeOpTree(e){for(const t of e){const e=t.fn,r=t.fnId,n=t.args
2549switch(0|r){case i.OPS.beginText:this.beginText()
2550break
2551case i.OPS.dependency:break
2552case i.OPS.setLeading:this.setLeading(n)
2553break
2554case i.OPS.setLeadingMoveText:this.setLeadingMoveText(n[0],n[1])
2555break
2556case i.OPS.setFont:this.setFont(n)
2557break
2558case i.OPS.showText:case i.OPS.showSpacedText:this.showText(n[0])
2559break
2560case i.OPS.endText:this.endText()
2561break
2562case i.OPS.moveText:this.moveText(n[0],n[1])
2563break
2564case i.OPS.setCharSpacing:this.setCharSpacing(n[0])
2565break
2566case i.OPS.setWordSpacing:this.setWordSpacing(n[0])
2567break
2568case i.OPS.setHScale:this.setHScale(n[0])
2569break
2570case i.OPS.setTextMatrix:this.setTextMatrix(n[0],n[1],n[2],n[3],n[4],n[5])
2571break
2572case i.OPS.setTextRise:this.setTextRise(n[0])
2573break
2574case i.OPS.setTextRenderingMode:this.setTextRenderingMode(n[0])
2575break
2576case i.OPS.setLineWidth:this.setLineWidth(n[0])
2577break
2578case i.OPS.setLineJoin:this.setLineJoin(n[0])
2579break
2580case i.OPS.setLineCap:this.setLineCap(n[0])
2581break
2582case i.OPS.setMiterLimit:this.setMiterLimit(n[0])
2583break
2584case i.OPS.setFillRGBColor:this.setFillRGBColor(n[0],n[1],n[2])
2585break
2586case i.OPS.setStrokeRGBColor:this.setStrokeRGBColor(n[0],n[1],n[2])
2587break
2588case i.OPS.setStrokeColorN:this.setStrokeColorN(n)
2589break
2590case i.OPS.setFillColorN:this.setFillColorN(n)
2591break
2592case i.OPS.shadingFill:this.shadingFill(n[0])
2593break
2594case i.OPS.setDash:this.setDash(n[0],n[1])
2595break
2596case i.OPS.setRenderingIntent:this.setRenderingIntent(n[0])
2597break
2598case i.OPS.setFlatness:this.setFlatness(n[0])
2599break
2600case i.OPS.setGState:this.setGState(n[0])
2601break
2602case i.OPS.fill:this.fill()
2603break
2604case i.OPS.eoFill:this.eoFill()
2605break
2606case i.OPS.stroke:this.stroke()
2607break
2608case i.OPS.fillStroke:this.fillStroke()
2609break
2610case i.OPS.eoFillStroke:this.eoFillStroke()
2611break
2612case i.OPS.clip:this.clip("nonzero")
2613break
2614case i.OPS.eoClip:this.clip("evenodd")
2615break
2616case i.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask()
2617break
2618case i.OPS.paintImageXObject:this.paintImageXObject(n[0])
2619break
2620case i.OPS.paintInlineImageXObject:this.paintInlineImageXObject(n[0])
2621break
2622case i.OPS.paintImageMaskXObject:this.paintImageMaskXObject(n[0])
2623break
2624case i.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(n[0],n[1])
2625break
2626case i.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd()
2627break
2628case i.OPS.closePath:this.closePath()
2629break
2630case i.OPS.closeStroke:this.closeStroke()
2631break
2632case i.OPS.closeFillStroke:this.closeFillStroke()
2633break
2634case i.OPS.closeEOFillStroke:this.closeEOFillStroke()
2635break
2636case i.OPS.nextLine:this.nextLine()
2637break
2638case i.OPS.transform:this.transform(n[0],n[1],n[2],n[3],n[4],n[5])
2639break
2640case i.OPS.constructPath:this.constructPath(n[0],n[1])
2641break
2642case i.OPS.endPath:this.endPath()
2643break
2644case 92:this.group(t.items)
2645break
2646default:(0,i.warn)(`Unimplemented operator ${e}`)}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,r,n,i,a){const s=this.current
2647s.textMatrix=s.lineMatrix=[e,t,r,n,i,a],s.textMatrixScale=Math.hypot(e,t),s.x=s.lineX=0,s.y=s.lineY=0,s.xcoords=[],s.ycoords=[],s.tspan=this.svgFactory.createElement("svg:tspan"),s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size",`${g(s.fontSize)}px`),s.tspan.setAttributeNS(null,"y",g(-s.y)),s.txtElement=this.svgFactory.createElement("svg:text"),s.txtElement.append(s.tspan)}beginText(){const e=this.current
2648e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=i.IDENTITY_MATRIX,e.lineMatrix=i.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){const r=this.current
2649r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size",`${g(r.fontSize)}px`),r.tspan.setAttributeNS(null,"y",g(-r.y))}showText(e){const t=this.current,r=t.font,n=t.fontSize
2650if(0===n)return
2651const a=t.fontSizeScale,s=t.charSpacing,c=t.wordSpacing,u=t.fontDirection,h=t.textHScale*u,d=r.vertical,p=d?1:-1,f=r.defaultVMetrics,m=n*t.fontMatrix[0]
2652let b=0
2653for(const i of e){if(null===i){b+=u*c
2654continue}if("number"==typeof i){b+=p*i*n/1e3
2655continue}const e=(i.isSpace?c:0)+s,o=i.fontChar
2656let l,h,g,v=i.width
2657if(d){let e
2658const t=i.vmetric||f
2659e=i.vmetric?t[1]:.5*v,e=-e*m
2660const r=t[2]*m
2661v=t?-t[0]:v,l=e/a,h=(b+r)/a}else l=b/a,h=0;(i.isInFont||r.missingFile)&&(t.xcoords.push(t.x+l),d&&t.ycoords.push(-t.y+h),t.tspan.textContent+=o),g=d?v*m-e*u:v*m+e*u,b+=g}t.tspan.setAttributeNS(null,"x",t.xcoords.map(g).join(" ")),d?t.tspan.setAttributeNS(null,"y",t.ycoords.map(g).join(" ")):t.tspan.setAttributeNS(null,"y",g(-t.y)),d?t.y-=b:t.x+=b*h,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size",`${g(t.fontSize)}px`),t.fontStyle!==o.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==o.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight)
2662const _=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK
2663if(_===i.TextRenderingMode.FILL||_===i.TextRenderingMode.FILL_STROKE?(t.fillColor!==o.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===i.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),_===i.TextRenderingMode.STROKE||_===i.TextRenderingMode.FILL_STROKE){const e=1/(t.textMatrixScale||1)
2664this._setStrokeAttributes(t.tspan,e)}let y=t.textMatrix
26650!==t.textRise&&(y=y.slice(),y[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform",`${v(y)} scale(${g(h)}, -1)`),t.txtElement.setAttributeNS(l,"xml:space","preserve"),t.txtElement.append(t.tspan),t.txtgrp.append(t.txtElement),this._ensureTransformGroup().append(t.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.')
2666this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle))
2667const t=d(e.data,e.mimetype,this.forceDataSchema)
2668this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}"; src: url(${t}); }\n`}setFont(e){const t=this.current,r=this.commonObjs.get(e[0])
2669let n=e[1]
2670t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||i.FONT_IDENTITY_MATRIX
2671let a="normal"
2672r.black?a="900":r.bold&&(a="bold")
2673const s=r.italic?"italic":"normal"
2674n<0?(n=-n,t.fontDirection=-1):t.fontDirection=1,t.fontSize=n,t.fontFamily=r.loadedName,t.fontWeight=a,t.fontStyle=s,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",g(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){var e
2675const t=this.current
2676t.textRenderingMode&i.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=u[e]}
2676setLineJoin(e){this.current.lineJoin=h[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,r){this.current.strokeColor=i.Util.makeHexColor(e,t,r)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,r){this.current.fillColor=i.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,r=this.viewport.height,n=i.Util.inverseTransform(this.transformMatrix),a=i.Util.applyTransform([0,0],n),s=i.Util.applyTransform([0,r],n),o=i.Util.applyTransform([t,0],n),l=i.Util.applyTransform([t,r],n),c=Math.min(a[0],s[0],o[0],l[0]),u=Math.min(a[1],s[1],o[1],l[1]),h=Math.max(a[0],s[0],o[0],l[0]),d=Math.max(a[1],s[1],o[1],l[1]),p=this.svgFactory.createElement("svg:rect")
2677p.setAttributeNS(null,"x",c),p.setAttributeNS(null,"y",u),p.setAttributeNS(null,"width",h-c),p.setAttributeNS(null,"height",d-u),p.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(p)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],r=e[2],n=e[3]||i.IDENTITY_MATRIX,[a,s,o,l]=e[4],c=e[5],u=e[6],h=e[7],d="shading"+y++,[p,f,m,g]=i.Util.normalizeRect([...i.Util.applyTransform([a,s],n),...i.Util.applyTransform([o,l],n)]),[v,b]=i.Util.singularValueDecompose2dScale(n),_=c*v,A=u*b,S=this.svgFactory.createElement("svg:pattern")
2678S.setAttributeNS(null,"id",d),S.setAttributeNS(null,"patternUnits","userSpaceOnUse"),S.setAttributeNS(null,"width",_),S.setAttributeNS(null,"height",A),S.setAttributeNS(null,"x",`${p}`),S.setAttributeNS(null,"y",`${f}`)
2679const w=this.svg,x=this.transformMatrix,P=this.current.fillColor,C=this.current.strokeColor,T=this.svgFactory.create(m-p,g-f)
2680if(this.svg=T,this.transformMatrix=n,2===h){const e=i.Util.makeHexColor(...t)
2681this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(r)),this.svg=w,this.transformMatrix=x,this.current.fillColor=P,this.current.strokeColor=C,S.append(T.childNodes[0]),this.defs.append(S),`url(#${d})`}_makeShadingPattern(e){switch("string"==typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading"+y++,r=e[3]
2682let n
2683switch(e[1]){case"axial":const r=e[4],i=e[5]
2684n=this.svgFactory.createElement("svg:linearGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"x1",r[0]),n.setAttributeNS(null,"y1",r[1]),n.setAttributeNS(null,"x2",i[0]),n.setAttributeNS(null,"y2",i[1])
2685break
2686case"radial":const a=e[4],s=e[5],o=e[6],l=e[7]
2687n=this.svgFactory.createElement("svg:radialGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"cx",s[0]),n.setAttributeNS(null,"cy",s[1]),n.setAttributeNS(null,"r",l),n.setAttributeNS(null,"fx",a[0]),n.setAttributeNS(null,"fy",a[1]),n.setAttributeNS(null,"fr",o)
2688break
2689default:throw new Error(`Unknown RadialAxial type: ${e[1]}`)}for(const e of r){const t=this.svgFactory.createElement("svg:stop")
2690t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),n.append(t)}return this.defs.append(n),`url(#${t})`
2691case"Mesh":return(0,i.warn)("Unimplemented pattern Mesh"),null
2692case"Dummy":return"hotpink"
2693default:throw new Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const r=this.current
2694let n=r.x,a=r.y,s=[],o=0
2695for(const r of e)switch(0|r){case i.OPS.rectangle:n=t[o++],a=t[o++]
2696const e=n+t[o++],r=a+t[o++]
2697s.push("M",g(n),g(a),"L",g(e),g(a),"L",g(e),g(r),"L",g(n),g(r),"Z")
2698break
2699case i.OPS.moveTo:n=t[o++],a=t[o++],s.push("M",g(n),g(a))
2700break
2701case i.OPS.lineTo:n=t[o++],a=t[o++],s.push("L",g(n),g(a))
2702break
2703case i.OPS.curveTo:n=t[o+4],a=t[o+5],s.push("C",g(t[o]),g(t[o+1]),g(t[o+2]),g(t[o+3]),g(n),g(a)),o+=6
2704break
2705case i.OPS.curveTo2:s.push("C",g(n),g(a),g(t[o]),g(t[o+1]),g(t[o+2]),g(t[o+3])),n=t[o+2],a=t[o+3],o+=4
2706break
2707case i.OPS.curveTo3:n=t[o+2],a=t[o+3],s.push("C",g(t[o]),g(t[o+1]),g(n),g(a),g(n),g(a)),o+=4
2708break
2709case i.OPS.closePath:s.push("Z")}s=s.join(" "),r.path&&e.length>0&&e[0]!==i.OPS.rectangle&&e[0]!==i.OPS.moveTo?s=r.path.getAttributeNS(null,"d")+s:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(r.path)),r.path.setAttributeNS(null,"d",s),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(n,a)}endPath(){const e=this.current
2710if(e.path=null,!this.pendingClip)return
2711if(!e.element)return void(this.pendingClip=null)
2712const t="clippath"+b++,r=this.svgFactory.createElement("svg:clipPath")
2713r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",v(this.transformMatrix))
2714const n=e.element.cloneNode(!0)
2715if("evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.append(n),this.defs.append(r),e.activeClipUrl){e.clipGroup=null
2716for(const e of this.extraStack)e.clipGroup=null
2717r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current
2718if(e.path){const t=`${e.path.getAttributeNS(null,"d")}Z`
2719e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}
2719setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r)
2720break
2721case"LC":this.setLineCap(r)
2722break
2723case"LJ":this.setLineJoin(r)
2724break
2725case"ML":this.setMiterLimit(r)
2726break
2727case"D":this.setDash(r[0],r[1])
2728break
2729case"RI":this.setRenderingIntent(r)
2730break
2731case"FL":this.setFlatness(r)
2732break
2733case"Font":this.setFont(r)
2734break
2735case"CA":this.setStrokeAlpha(r)
2736break
2737case"ca":this.setFillAlpha(r)
2738break
2739default:(0,i.warn)(`Unimplemented graphic state operator ${t}`)}}fill(){const e=this.current
2740e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current
2741e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1
2742const r=this.current
2743let n=r.dashArray
27441!==t&&n.length>0&&(n=n.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",g(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",g(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(g).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",g(t*r.dashPhase)+"px")}eoFill(){var e
2745null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var e
2746null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect")
2747e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){const t=this.getObject(e)
2748t?this.paintInlineImageXObject(t):(0,i.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const r=e.width,n=e.height,i=p(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect")
2749a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",g(r)),a.setAttributeNS(null,"height",g(n)),this.current.element=a,this.clip("nonzero")
2750const s=this.svgFactory.createElement("svg:image")
2751s.setAttributeNS(c,"xlink:href",i),s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y",g(-n)),s.setAttributeNS(null,"width",g(r)+"px"),s.setAttributeNS(null,"height",g(n)+"px"),s.setAttributeNS(null,"transform",`scale(${g(1/r)} ${g(-1/n)})`),t?t.append(s):this._ensureTransformGroup().append(s)}paintImageMaskXObject(e){const t=this.getObject(e.data,e)
2752if(t.bitmap)return void(0,i.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.")
2753const r=this.current,n=t.width,a=t.height,s=r.fillColor
2754r.maskId="mask"+_++
2755const o=this.svgFactory.createElement("svg:mask")
2756o.setAttributeNS(null,"id",r.maskId)
2757const l=this.svgFactory.createElement("svg:rect")
2758l.setAttributeNS(null,"x","0"),l.setAttributeNS(null,"y","0"),l.setAttributeNS(null,"width",g(n)),l.setAttributeNS(null,"height",g(a)),l.setAttributeNS(null,"fill",s),l.setAttributeNS(null,"mask",`url(#${r.maskId})`),this.defs.append(o),this._ensureTransformGroup().append(l),this.paintInlineImageXObject(t,o)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],r=t[3]-t[1],n=this.svgFactory.createElement("svg:rect")
2759n.setAttributeNS(null,"x",t[0]),n.setAttributeNS(null,"y",t[1]),n.setAttributeNS(null,"width",g(e)),n.setAttributeNS(null,"height",g(r)),this.current.element=n,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs")
2760t.append(r),this.defs=r
2761const n=this.svgFactory.createElement("svg:g")
2762return n.setAttributeNS(null,"transform",v(e.transform)),t.append(n),this.svg=n,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g")
2763e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",v(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}}],__webpack_module_cache__={}
2764function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e]
2765if(void 0!==t)return t.exports
2766var r=__webpack_module_cache__[e]={exports:{}}
2767return __webpack_modules__[e](r,r.exports,__w_pdfjs_require__),r.exports}var __nested_webpack_exports__={}
2768return(()=>{"use strict"
2769var e=__nested_webpack_exports__
2770Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return a.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return s.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return n.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return c.SVGGraphics}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return n.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return n.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return n.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return n.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return i.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return n.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return i.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return r.version}})
2771var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(138),n=__w_pdfjs_require__(142),i=__w_pdfjs_require__(161),a=__w_pdfjs_require__(162),s=__w_pdfjs_require__(141),o=__w_pdfjs_require__(167),l=__w_pdfjs_require__(149),c=__w_pdfjs_require__(170),u=__w_pdfjs_require__(169),h=__w_pdfjs_require__(146)
2772Object.defineProperty(__nested_webpack_exports__,"CanvasGraphics",{enumerable:!0,get:function(){return h.CanvasGraphics}})})(),__nested_webpack_exports__})(),module.exports=e()},96802:function(e,t){var r
2773r=function(e){"use strict"
2774var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol(".concat(e,")")}
2775function r(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0
2776if(r)return r.call(e)
2777if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}
2778throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(e){return this instanceof n?(this.v=e,this):new n(e)}function i(e){var t,r
2779return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t
2780function i(i,a){t[i]=e[i]?function(t){return(r=!r)?{value:n(e[i](t)),done:!1}:a?a(t):t}:a}}function a(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.")
2781var t,n=e[Symbol.asyncIterator]
2782return n?n.call(e):(e=r(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t)
2783function i(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function s(){}function o(e){return"object"==typeof e&&null!==e||"function"==typeof e}"function"==typeof SuppressedError&&SuppressedError
2784var l=s
2785function c(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}var u=Promise,h=Promise.prototype.then,d=Promise.reject.bind(u)
2786function p(e){return new u(e)}function f(e){return p((function(t){return t(e)}))}function m(e){return d(e)}function g(e,t,r){return h.call(e,t,r)}function v(e,t,r){g(g(e,t,r),void 0,l)}function b(e,t){v(e,t)}function _(e,t){v(e,void 0,t)}function y(e,t,r){return g(e,t,r)}function A(e){g(e,void 0,l)}var S=function(e){if("function"==typeof queueMicrotask)S=queueMicrotask
2787else{var t=f(void 0)
2788S=function(e){return g(t,e)}}return S(e)}
2789function w(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function")
2790return Function.prototype.apply.call(e,t,r)}function x(e,t,r){try{return f(w(e,t,r))}catch(e){return m(e)}}var P=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size}
2790,enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t
279116383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,i=e._elements,a=i[r]
2792return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,a},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor
2793return e._elements[t]},e}(),C=t("[[AbortSteps]]"),T=t("[[ErrorSteps]]"),E=t("[[CancelSteps]]"),k=t("[[PullSteps]]"),R=t("[[ReleaseSteps]]")
2794function F(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?D(e):"closed"===t._state?function(e){D(e),N(e)}(e):L(e,t._storedError)}function M(e,t){return Br(e._ownerReadableStream,t)}function O(e){var t=e._ownerReadableStream
2795"readable"===t._state?j(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e){L(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),t._readableStreamController[R](),t._reader=void 0,e._ownerReadableStream=void 0}function I(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function D(e){e._closedPromise=p((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function L(e,t){D(e),j(e,t)}function j(e,t){void 0!==e._closedPromise_reject&&(A(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function N(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var W=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},B=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)}
2796function q(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError("".concat(t," is not an object."))
2797var r}function G(e,t){if("function"!=typeof e)throw new TypeError("".concat(t," is not a function."))}function U(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError("".concat(t," is not an object."))}function z(e,t,r){if(void 0===e)throw new TypeError("Parameter ".concat(t," is required in '").concat(r,"'."))}function H(e,t,r){if(void 0===e)throw new TypeError("".concat(t," is required in '").concat(r,"'."))}function V(e){return Number(e)}function X(e){return 0===e?0:e}function $(e,t){var r=Number.MAX_SAFE_INTEGER,n=Number(e)
2798if(n=X(n),!W(n))throw new TypeError("".concat(t," is not a finite number"))
2799if((n=function(e){return X(B(e))}(n))<0||n>r)throw new TypeError("".concat(t," is outside the accepted range of ").concat(0," to ").concat(r,", inclusive"))
2800return W(n)&&0!==n?n:0}function Y(e,t){if(!Nr(e))throw new TypeError("".concat(t," is not a ReadableStream."))}function K(e){return new ie(e)}function Q(e,t){e._reader._readRequests.push(t)}function J(e,t,r){var n=e._reader._readRequests.shift()
2801r?n._closeSteps():n._chunkSteps(t)}function Z(e){return e._reader._readRequests.length}function ee(e){var t=e._reader
2802return void 0!==t&&!!ae(t)}var te,re,ne,ie=function(){function e(e){if(z(e,1,"ReadableStreamDefaultReader"),Y(e,"First parameter"),Wr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader")
2803F(this,e),this._readRequests=new P}return Object.defineProperty(e.prototype,"closed",{get:function(){return ae(this)?this._closedPromise:m(le("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),ae(this)?void 0===this._ownerReadableStream?m(I("cancel")):M(this,e):m(le("cancel"))},e.prototype.read=function(){if(!ae(this))return m(le("read"))
2804if(void 0===this._ownerReadableStream)return m(I("read from"))
2805var e,t,r=p((function(r,n){e=r,t=n}))
2806return se(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!ae(this))throw le("releaseLock")
2807var e
2808void 0!==this._ownerReadableStream&&(O(e=this),oe(e,new TypeError("Reader was released")))},e}()
2809function ae(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof ie}function se(e,t){var r=e._ownerReadableStream
2810r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[k](t)}function oe(e,t){var r=e._readRequests
2811e._readRequests=new P,r.forEach((function(e){e._errorSteps(t)}))}function le(e){return new TypeError("ReadableStreamDefaultReader.prototype.".concat(e," can only be used on a ReadableStreamDefaultReader"))}function ce(e){return e.slice()}function ue(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}Object.defineProperties(ie.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),c(ie.prototype.cancel,"cancel"),c(ie.prototype.read,"read"),c(ie.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(ie.prototype,t.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0})
2812var he=function(e){return(he="function"==typeof e.transfer?function(e){return e.transfer()}:"function"==typeof structuredClone?function(e){return structuredClone(e,{transfer:[e]})}:function(e){return e})(e)},de=function(e){return(de="boolean"==typeof e.detached?function(e){return e.detached}:function(e){return 0===e.byteLength})(e)}
2813function pe(e,t,r){if(e.slice)return e.slice(t,r)
2814var n=r-t,i=new ArrayBuffer(n)
2815return ue(i,0,e,t,n),i}function fe(e,t){var r=e[t]
2816if(null!=r){if("function"!=typeof r)throw new TypeError("".concat(String(t)," is not a function"))
2817return r}}var me,ge=null!==(ne=null!==(te=t.asyncIterator)&&void 0!==te?te:null===(re=t.for)||void 0===re?void 0:re.call(t,"Symbol.asyncIterator"))&&void 0!==ne?ne:"@@asyncIterator"
2818function ve(e,s,l){if(void 0===s&&(s="sync"),void 0===l)if("async"===s){if(void 0===(l=fe(e,ge)))return function(e){var s,o=((s={})[t.iterator]=function(){return e.iterator},s),l=function(){return function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.")
2819var i,a=r.apply(e,t||[]),s=[]
2820return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i
2821function o(e){a[e]&&(i[e]=function(t){return new Promise((function(r,n){
2821s.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{(r=a[e](t)).value instanceof n?Promise.resolve(r.value.v).then(c,u):h(s[0][2],r)}catch(e){h(s[0][3],e)}var r}function c(e){l("next",e)}function u(e){l("throw",e)}function h(e,t){e(t),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,(function(){return function(e,t){var r,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1]
2822return i[1]},trys:[],ops:[]}
2823return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a
2824function o(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.")
2825for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i
2826switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o
2827break
2828case 4:return s.label++,{value:o[1],done:!1}
2829case 5:s.label++,n=o[1],o=[0]
2830continue
2831case 7:o=s.ops.pop(),s.trys.pop()
2832continue
2833default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0
2834continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1]
2835break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o
2836break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o)
2837break}i[2]&&s.ops.pop(),s.trys.pop()
2838continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1]
2839return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(e){switch(e.label){case 0:return[5,r(i(a(o)))]
2840case 1:case 2:return[4,n.apply(void 0,[e.sent()])]
2841case 3:return[2,e.sent()]}}))}))}()
2842return{iterator:l,nextMethod:l.next,done:!1}}(ve(e,"sync",fe(e,t.iterator)))}else l=fe(e,t.iterator)
2843if(void 0===l)throw new TypeError("The object is not iterable")
2844var c=w(l,e,[])
2845if(!o(c))throw new TypeError("The iterator method must return an object")
2846return{iterator:c,nextMethod:c.next,done:!1}}var be=((me={})[ge]=function(){return this},me)
2847Object.defineProperty(be,ge,{enumerable:!1})
2848var _e=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()}
2849return this._ongoingPromise=this._ongoingPromise?y(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)}
2850return this._ongoingPromise?y(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this
2851if(this._isFinished)return Promise.resolve({value:void 0,done:!0})
2852var t,r,n=this._reader,i=p((function(e,n){t=e,r=n}))
2853return se(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,S((function(){return t({value:r,done:!1})}))},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,O(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,O(n),r(t)}}),i},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0})
2854this._isFinished=!0
2855var t=this._reader
2856if(!this._preventCancel){var r=M(t,e)
2857return O(t),y(r,(function(){return{value:e,done:!0}}))}return O(t),f({value:e,done:!0})},e}(),ye={next:function(){return Ae(this)?this._asyncIteratorImpl.next():m(Se("next"))},return:function(e){return Ae(this)?this._asyncIteratorImpl.return(e):m(Se("return"))}}
2858function Ae(e){if(!o(e))return!1
2859if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1
2860try{return e._asyncIteratorImpl instanceof _e}catch(e){return!1}}function Se(e){return new TypeError("ReadableStreamAsyncIterator.".concat(e," can only be used on a ReadableSteamAsyncIterator"))}Object.setPrototypeOf(ye,be)
2861var we=Number.isNaN||function(e){return e!=e}
2862function xe(e){var t=pe(e.buffer,e.byteOffset,e.byteOffset+e.byteLength)
2863return new Uint8Array(t)}function Pe(e){var t=e._queue.shift()
2864return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Ce(e,t,r){if("number"!=typeof(n=r)||we(n)||n<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.")
2865var n
2866e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Te(e){e._queue=new P,e._queueTotalSize=0}function Ee(e){return e===DataView}var ke=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!Me(this))throw nt("view")
2867return this._view}
2867,enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!Me(this))throw nt("respond")
2868if(z(e,1,"respond"),e=$(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated")
2869if(de(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response")
2870et(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!Me(this))throw nt("respondWithNewView")
2871if(z(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views")
2872if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated")
2873if(de(e.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response")
2874tt(this._associatedReadableByteStreamController,e)},e}()
2875Object.defineProperties(ke.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),c(ke.prototype.respond,"respond"),c(ke.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof t.toStringTag&&Object.defineProperty(ke.prototype,t.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0})
2876var Re=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!Fe(this))throw it("byobRequest")
2877return Je(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Fe(this))throw it("desiredSize")
2878return Ze(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Fe(this))throw it("close")
2879if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!")
2880var e=this._controlledReadableByteStream._state
2881if("readable"!==e)throw new TypeError("The stream (in ".concat(e," state) is not in the readable state and cannot be closed"))
2882$e(this)},e.prototype.enqueue=function(e){if(!Fe(this))throw it("enqueue")
2883if(z(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view")
2884if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength")
2885if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength")
2886if(this._closeRequested)throw new TypeError("stream is closed or draining")
2887var t=this._controlledReadableByteStream._state
2888if("readable"!==t)throw new TypeError("The stream (in ".concat(t," state) is not in the readable state and cannot be enqueued to"))
2889Ye(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Fe(this))throw it("error")
2890Ke(this,e)},e.prototype[E]=function(e){Ie(this),Te(this)
2891var t=this._cancelAlgorithm(e)
2892return Xe(this),t},e.prototype[k]=function(e){var t=this._controlledReadableByteStream
2893if(this._queueTotalSize>0)Qe(this,e)
2894else{var r=this._autoAllocateChunkSize
2895if(void 0!==r){var n=void 0
2896try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}var i={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"}
2897this._pendingPullIntos.push(i)}Q(t,e),Oe(this)}},e.prototype[R]=function(){if(this._pendingPullIntos.length>
28970){var e=this._pendingPullIntos.peek()
2898e.readerType="none",this._pendingPullIntos=new P,this._pendingPullIntos.push(e)}},e}()
2899function Fe(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Re}function Me(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof ke}function Oe(e){var t=function(e){var t=e._controlledReadableByteStream
2900return"readable"===t._state&&!e._closeRequested&&!!e._started&&(!!(ee(t)&&Z(t)>0)||!!(ct(t)&&lt(t)>0)||Ze(e)>0)}(e)
2901t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,v(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Oe(e)),null}),(function(t){return Ke(e,t),null}))))}function Ie(e){Ue(e),e._pendingPullIntos=new P}function De(e,t){var r=!1
2902"closed"===e._state&&(r=!0)
2903var n=Le(t)
2904"default"===t.readerType?J(e,n,r):function(e,t,r){var n=e._reader._readIntoRequests.shift()
2905r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function Le(e){var t=e.bytesFilled,r=e.elementSize
2906return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function je(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Ne(e,t,r,n){var i
2907try{i=pe(t,r,r+n)}catch(t){throw Ke(e,t),t}je(e,i,0,n)}function We(e,t){t.bytesFilled>0&&Ne(e,t.buffer,t.byteOffset,t.bytesFilled),Ve(e)}function Be(e,t){var r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+r,i=r,a=!1,s=n-n%t.elementSize
2908s>=t.minimumFill&&(i=s-t.bytesFilled,a=!0)
2909for(var o=e._queue;i>0;){var l=o.peek(),c=Math.min(i,l.byteLength),u=t.byteOffset+t.bytesFilled
2910ue(t.buffer,u,l.buffer,l.byteOffset,c),l.byteLength===c?o.shift():(l.byteOffset+=c,l.byteLength-=c),e._queueTotalSize-=c,qe(0,c,t),i-=c}return a}function qe(e,t,r){r.bytesFilled+=t}function Ge(e){0===e._queueTotalSize&&e._closeRequested?(Xe(e),qr(e._controlledReadableByteStream)):Oe(e)}function Ue(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function ze(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return
2911var t=e._pendingPullIntos.peek()
2912Be(e,t)&&(Ve(e),De(e._controlledReadableByteStream,t))}}function He(e,t){var r=e._pendingPullIntos.peek()
2913Ue(e),"closed"===e._controlledReadableByteStream._state?function(e,t){"none"===t.readerType&&Ve(e)
2914var r=e._controlledReadableByteStream
2915if(ct(r))for(;lt(r)>0;)De(r,Ve(e))}(e,r):function(e,t,r){if(qe(0,t,r),"none"===r.readerType)return We(e,r),void ze(e)
2916if(!(r.bytesFilled<r.minimumFill)){Ve(e)
2917var n=r.bytesFilled%r.elementSize
2918if(n>0){var i=r.byteOffset+r.bytesFilled
2919Ne(e,r.buffer,i-n,n)}r.bytesFilled-=n,De(e._controlledReadableByteStream,r),ze(e)}}(e,t,r),Oe(e)}function Ve(e){return e._pendingPullIntos.shift()}function Xe(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function $e(e){var t=e._controlledReadableByteStream
2920if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0
2921else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek()
2922if(r.bytesFilled%r.elementSize!=0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer")
2923throw Ke(e,n),n}}Xe(e),qr(t)}}function Ye(e,t){var r=e._controlledReadableByteStream
2924if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,i=t.byteOffset,a=t.byteLength
2925if(de(n))throw new TypeError("chunk's buffer is detached and so cannot be enqueued")
2926var s=he(n)
2927if(e._pendingPullIntos.length>0){var o=e._pendingPullIntos.peek()
2928if(de(o.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk")
2929Ue(e),o.buffer=he(o.buffer),"none"===o.readerType&&We(e,o)}ee(r)?(function(e){for(var t=e._controlledReadableByteStream._reader;t._readRequests.length>0;){if(0===e._queueTotalSize)return
2930Qe(e,t._readRequests.shift())}}(e),0===Z(r)?je(e,s,i,a):(e._pendingPullIntos.length>0&&Ve(e),J(r,new Uint8Array(s,i,a),!1))):ct(r)?(je(e,s,i,a),ze(e)):je(e,s,i,a),Oe(e)}}function Ke(e,t){var r=e._controlledReadableByteStream
2931"readable"===r._state&&(Ie(e),Te(e),Xe(e),Gr(r,t))}function Qe(e,t){var r=e._queue.shift()
2932e._queueTotalSize-=r.byteLength,Ge(e)
2933var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength)
2934t._chunkSteps(n)}function Je(e){if(null===e._byobRequest&&e._pendingPullIntos.length>
29340){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(ke.prototype)
2935!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(n,e,r),e._byobRequest=n}return e._byobRequest}function Ze(e){var t=e._controlledReadableByteStream._state
2936return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function et(e,t){var r=e._pendingPullIntos.peek()
2937if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream")
2938if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=he(r.buffer),He(e,t)}function tt(e,t){var r=e._pendingPullIntos.peek()
2939if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream")
2940if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest")
2941if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest")
2942if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest")
2943var n=t.byteLength
2944r.buffer=he(t.buffer),He(e,n)}function rt(e,t,r,n,i,a,s){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Te(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=s,t._pendingPullIntos=new P,e._readableStreamController=t,v(f(r()),(function(){return t._started=!0,Oe(t),null}),(function(e){return Ke(t,e),null}))}function nt(e){return new TypeError("ReadableStreamBYOBRequest.prototype.".concat(e," can only be used on a ReadableStreamBYOBRequest"))}function it(e){return new TypeError("ReadableByteStreamController.prototype.".concat(e," can only be used on a ReadableByteStreamController"))}function at(e,t){if("byob"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamReaderMode"))
2945return e}function st(e){return new ut(e)}function ot(e,t){e._reader._readIntoRequests.push(t)}function lt(e){return e._reader._readIntoRequests.length}function ct(e){var t=e._reader
2946return void 0!==t&&!!ht(t)}Object.defineProperties(Re.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),c(Re.prototype.close,"close"),c(Re.prototype.enqueue,"enqueue"),c(Re.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Re.prototype,t.toStringTag,{value:"ReadableByteStreamController",configurable:!0})
2947var ut=function(){function e(e){if(z(e,1,"ReadableStreamBYOBReader"),Y(e,"First parameter"),Wr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader")
2948if(!Fe(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source")
2949F(this,e),this._readIntoRequests=new P}return Object.defineProperty(e.prototype,"closed",{get:function(){return ht(this)?this._closedPromise:m(ft("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),ht(this)?void 0===this._ownerReadableStream?m(I("cancel")):M(this,e):m(ft("cancel"))},e.prototype.read=function(e,t){if(void 0===t&&(t={}),!ht(this))return m(ft("read"))
2950if(!ArrayBuffer.isView(e))return m(new TypeError("view must be an array buffer view"))
2951if(0===e.byteLength)return m(new TypeError("view must have non-zero byteLength"))
2952if(0===e.buffer.byteLength)return m(new TypeError("view's buffer must have non-zero byteLength"))
2953if(de(e.buffer))return m(new TypeError("view's buffer has been detached"))
2954var r
2955try{r=function(e,t){var r
2956return q(e,t),{min:$(null!==(r=null==e?void 0:e.min)&&void 0!==r?r:1,"".concat(t," has member 'min' that"))}}(t,"options")}catch(e){return m(e)}var n,i,a=r.min
2957if(0===a)return m(new TypeError("options.min must be greater than 0"))
2958if(function(e){return Ee(e.constructor)}(e)){if(a>e.byteLength)return m(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(a>e.length)return m(new RangeError("options.min must be less than or equal to view's length"))
2959if(void 0===this._ownerReadableStream)return m(I("read from"))
2960var s=p((function(e,t){n=e,i=t}))
2961return dt(this,e,a,{_chunkSteps:function(e){return n({value:e,done:!1})},_closeSteps:function(e){return n({value:e,done:!0})},_errorSteps:function(e){return i(e)}}),s},e.prototype.releaseLock=function(){if(!ht(this))throw ft("releaseLock")
2962var e
2963void 0!==this._ownerReadableStream&&(O(e=this),pt(e,new TypeError("Reader was released")))},e}()
2964function ht(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof ut}function dt(e,t,r,n){var i=e._ownerReadableStream
2965i._disturbed=!0,"errored"===i._state?n._errorSteps(i._storedError):function(e,t,r,n){var i,a=e._controlledReadableByteStream,s=t.constructor,o=function(e){return Ee(e)?1:e.BYTES_PER_ELEMENT}(s),l=t.byteOffset,c=t.byteLength,u=r*o
2966try{i=he(t.buffer)}catch(p){return void n._errorSteps(p)}var h={buffer:i,bufferByteLength:i.byteLength,byteOffset:l,byteLength:c,bytesFilled:0,minimumFill:u,elementSize:o,viewConstructor:s,readerType:"byob"}
2967if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(h),void ot(a,n)
2968if("closed"!==a._state){if(e._queueTotalSize>0){if(Be(e,h)){var d=Le(h)
2969return Ge(e),void n._chunkSteps(d)}if(e._closeRequested){var p=new TypeError("Insufficient bytes to fill elements in the given buffer")
2970return Ke(e,p),void n._errorSteps(p)}}e._pendingPullIntos.push(h),ot(a,n),Oe(e)}else{var f=new s(h.buffer,h.byteOffset,0)
2971n._closeSteps(f)}}(i._readableStreamController,t,r,n)}function pt(e,t){var r=e._readIntoRequests
2972e._readIntoRequests=new P,r.forEach((function(e){e._errorSteps(t)}))}function ft(e){return new TypeError("ReadableStreamBYOBReader.prototype.".concat(e," can only be used on a ReadableStreamBYOBReader"))}function mt(e,t){var r=e.highWaterMark
2973if(void 0===r)return t
2974if(we(r)||r<0)throw new RangeError("Invalid highWaterMark")
2975return r}function gt(e){return e.size||function(){return 1}}function vt(e,t){q(e,t)
2976var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size
2977return{highWaterMark:void 0===r?void 0:V(r),size:void 0===n?void 0:bt(n,"".concat(t," has member 'size' that"))}}function bt(e,t){return G(e,t),function(t){return V(e(t))}}function _t(e,t,r){return G(e,r),function(r){return x(e,t,[r])}}function yt(e,t,r){return G(e,r),function(){return x(e,t,[])}}function At(e,t,r){return G(e,r),function(r){return w(e,t,[r])}}function St(e,t,r){return G(e,r),function(r,n){return x(e,t,[r,n])}}function wt(e,t){if(!Et(e))throw new TypeError("".concat(t," is not a WritableStream."))}Object.defineProperties(ut.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),c(ut.prototype.cancel,"cancel"),c(ut.prototype.read,"read"),c(ut.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(ut.prototype,t.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0})
2978var xt="function"==typeof AbortController,Pt=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:U(e,"First parameter")
2979var r=vt(t,"Second parameter"),n=function(e,t){q(e,t)
2980var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,a=null==e?void 0:e.type,s=null==e?void 0:e.write
2981return{abort:void 0===r?void 0:_t(r,e,"".concat(t," has member 'abort' that")),close:void 0===n?void 0:yt(n,e,"".concat(t," has member 'close' that")),start:void 0===i?void 0:At(i,e,"".concat(t," has member 'start' that")),write:void 0===s?void 0:St(s,e,"".concat(t," has member 'write' that")),type:a}}(e,"First parameter")
2982if(Tt(this),void 0!==n.type)throw new RangeError("Invalid type is specified")
2983var i=gt(r)
2984!function(e,t,r,n){var i,a,s,o,l=Object.create(Ht.prototype)
2985i=void 0!==t.start?function(){return t.start(l)}:function(){},a=void 0!==t.write?function(e){return t.write(e,l)}:function(){return f(void 0)},s=void 0!==t.close?function(){return t.close()}:function(){return f(void 0)},o=void 0!==t.abort?function(e){return t.abort(e)}:function(){return f(void 0)},Xt(e,l,i,a,s,o,r,n)}(this,n,mt(r,1),i)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Et(this))throw er("locked")
2986return kt(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Et(this)?kt(this)?m(new TypeError("Cannot abort a stream that already has a writer")):Rt(this,e):m(er("abort"))},e.prototype.close=function(){return Et(this)?kt(this)?m(new TypeError("Cannot close a stream that already has a writer")):Dt(this)?m(new TypeError("Cannot close an already-closing stream")):Ft(this):m(er("close"))},e.prototype.getWriter=function(){if(!Et(this))throw er("getWriter")
2987return Ct(this)},e}()
2988function Ct(e){return new Nt(e)}function Tt(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new P,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Et(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof Pt}function kt(e){return void 0!==e._writer}function Rt(e,t){var r
2989if("closed"===e._state||"errored"===e._state)return f(void 0)
2990e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t)
2991var n=e._state
2992if("closed"===n||"errored"===n)return f(void 0)
2993if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise
2994var i=!1
2995"erroring"===n&&(i=!0,t=void 0)
2996var a=p((function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}))
2997return e._pendingAbortRequest._promise=a,i||Ot(e,t),a}function Ft(e){var t=e._state
2998if("closed"===t||"errored"===t)return m(new TypeError("The stream (in ".concat(t," state) is not in the writable state and cannot be closed")))
2999var r,n=p((function(t,r){var n={_resolve:t,_reject:r}
3000e._closeRequest=n})),i=e._writer
3001return void 0!==i&&e._backpressure&&"writable"===t&&dr(i),Ce(r=e._writableStreamController,zt,0),Kt(r),n}function Mt(e,t){"writable"!==e._state?It(e):Ot(e,t)}function Ot(e,t){var r=e._writableStreamController
3002e._state="erroring",e._storedError=t
3003var n=e._writer
3004void 0!==n&&qt(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&It(e)}function It(e){e._state="errored",e._writableStreamController[T]()
3005var t=e._storedError
3006if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new P,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest
3007if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void Lt(e)
3008v(e._writableStreamController[C](r._reason),(function(){return r._resolve(),Lt(e),null}),(function(t){return r._reject(t),Lt(e),null}))}else Lt(e)}function Dt(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Lt(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0)
3009var t=e._writer
3010void 0!==t&&sr(t,e._storedError)}function jt(e,t){var r=e._writer
3011void 0!==r&&t!==e._backpressure&&(t?function(e){lr(e)}(r):dr(r)),e._backpressure=t}Object.defineProperties(Pt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),c(Pt.prototype.abort,"abort"),c(Pt.prototype.close,"close"),c(Pt.prototype.getWriter,"getWriter"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Pt.prototype,t.toStringTag,{value:"WritableStream",configurable:!0})
3012var Nt=function(){function e(e){if(z(e,1,"WritableStreamDefaultWriter"),wt(e,"First parameter"),kt(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer")
3013this._ownerWritableStream=e,e._writer=this
3014var t=e._state
3015if("writable"===t)!Dt(e)&&e._backpressure?lr(this):ur(this),ir(this)
3016else if("erroring"===t)cr(this,e._storedError),ir(this)
3017else if("closed"===t)ur(this),ir(this),or(this)
3018else{var r=e._storedError
3019cr(this,r),ar(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return Wt(this)?this._closedPromise:m(rr("closed"))}
3019,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Wt(this))throw rr("desiredSize")
3020if(void 0===this._ownerWritableStream)throw nr("desiredSize")
3021return"errored"===(t=(e=this._ownerWritableStream)._state)||"erroring"===t?null:"closed"===t?0:Yt(e._writableStreamController)
3022var e,t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return Wt(this)?this._readyPromise:m(rr("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Wt(this)?void 0===this._ownerWritableStream?m(nr("abort")):function(e,t){return Rt(e._ownerWritableStream,t)}(this,e):m(rr("abort"))},e.prototype.close=function(){if(!Wt(this))return m(rr("close"))
3023var e=this._ownerWritableStream
3024return void 0===e?m(nr("close")):Dt(e)?m(new TypeError("Cannot close an already-closing stream")):Bt(this)},e.prototype.releaseLock=function(){if(!Wt(this))throw rr("releaseLock")
3025void 0!==this._ownerWritableStream&&Gt(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),Wt(this)?void 0===this._ownerWritableStream?m(nr("write to")):Ut(this,e):m(rr("write"))},e}()
3026function Wt(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof Nt}function Bt(e){return Ft(e._ownerWritableStream)}function qt(e,t){"pending"===e._readyPromiseState?hr(e,t):function(e,t){cr(e,t)}(e,t)}function Gt(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness")
3027qt(e,r),function(e,t){"pending"===e._closedPromiseState?sr(e,t):function(e,t){ar(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Ut(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return Qt(e,t),1}}(n,t)
3028if(r!==e._ownerWritableStream)return m(nr("write to"))
3029var a=r._state
3030if("errored"===a)return m(r._storedError)
3031if(Dt(r)||"closed"===a)return m(new TypeError("The stream is closing or closed and cannot be written to"))
3032if("erroring"===a)return m(r._storedError)
3033var s=function(e){return p((function(t,r){var n={_resolve:t,_reject:r}
3034e._writeRequests.push(n)}))}(r)
3035return function(e,t,r){try{Ce(e,t,r)}catch(t){return void Qt(e,t)}var n=e._controlledWritableStream
3036Dt(n)||"writable"!==n._state||jt(n,Jt(e)),Kt(e)}(n,t,i),s}Object.defineProperties(Nt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),c(Nt.prototype.abort,"abort"),c(Nt.prototype.close,"close"),c(Nt.prototype.releaseLock,"releaseLock"),c(Nt.prototype.write,"write"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Nt.prototype,t.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0})
3037var zt={},Ht=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Vt(this))throw tr("abortReason")
3038return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Vt(this))throw tr("signal")
3039if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported")
3040return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Vt(this))throw tr("error")
3041"writable"===this._controlledWritableStream._state&&Zt(this,e)},e.prototype[C]=function(e){var t=this._abortAlgorithm(e)
3042return $t(this),t},e.prototype[T]=function(){Te(this)},e}()
3043function Vt(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Ht}function Xt(e,t,r,n,i,a,s,o){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Te(t),t._abortReason=void 0,t._abortController=function(){if(xt)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=o,t._strategyHWM=s,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a
3044var l=Jt(t)
3045jt(e,l),v(f(r()),(function(){return t._started=!0,Kt(t),null}),(function(r){return t._started=!0,Mt(e,r),null}))}function $t(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Yt(e){return e._strategyHWM-e._queueTotalSize}function Kt(e){var t=e._controlledWritableStream
3046if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=e._queue.peek().value
3047r===zt?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Pe(e)
3048var r=e._closeAlgorithm()
3049$t(e),v(r,(function(){return function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed"
3050var t=e._writer
3051void 0!==t&&or(t)}(t),null}),(function(e){return function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Mt(e,t)}(t,e),null}))}(e):function(e,t){var r=e._controlledWritableStream
3052!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r),v(e._writeAlgorithm(t),(function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r)
3053var t=r._state
3054if(Pe(e),!Dt(r)&&"writable"===t){var n=Jt(e)
3055jt(r,n)}return Kt(e),null}),(function(t){return"writable"===r._state&&$t(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Mt(e,t)}(r,t),null}))}(e,r)}}else It(t)}function Qt(e,t){"writable"===e._controlledWritableStream._state&&Zt(e,t)}function Jt(e){return Yt(e)<=0}function Zt(e,t){var r=e._controlledWritableStream
3056$t(e),Ot(r,t)}function er(e){return new TypeError("WritableStream.prototype.".concat(e," can only be used on a WritableStream"))}function tr(e){return new TypeError("WritableStreamDefaultController.prototype.".concat(e," can only be used on a WritableStreamDefaultController"))}function rr(e){return new TypeError("WritableStreamDefaultWriter.prototype.".concat(e," can only be used on a WritableStreamDefaultWriter"))}function nr(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function ir(e){e._closedPromise=p((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function ar(e,t){ir(e),sr(e,t)}function sr(e,t){void 0!==e._closedPromise_reject&&(A(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function or(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function lr(e){e._readyPromise=p((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function cr(e,t){lr(e),hr(e,t)}function ur(e){lr(e),dr(e)}function hr(e,t){void 0!==e._readyPromise_reject&&(A(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function dr(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(Ht.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ht.prototype,t.toStringTag,{value:"WritableStreamDefaultController",configurable:!0})
3057var pr,fr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0,mr=(function(e){if("function"!=typeof e&&"object"!=typeof e)return!1
3058if("DOMException"!==e.name)return!1
3059try{return new e,!0}catch(e){return!1}}(pr=null==fr?void 0:fr.DOMException)?pr:void 0)||function(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}
3060return c(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}()
3061function gr(e,t,r,n,i,a){var o=K(e),l=Ct(t)
3062e._disturbed=!0
3063var c=!1,u=f(void 0)
3064return p((function(h,d){var y,S,w,x
3065if(void 0!==a){if(y=function(){var r=void 0!==a.reason?a.reason:new mr("Aborted","AbortError"),s=[]
3066n||s.push((function(){return"writable"===t._state?Rt(t,r):f(void 0)})),i||s.push((function(){return"readable"===e._state?Br(e,r):f(void 0)})),E((function(){return Promise.all(s.map((function(e){return e()})))}),!0,r)},a.aborted)return void y()
3067a.addEventListener("abort",y)}if(T(e,o._closedPromise,(function(e){return n?k(!0,e):E((function(){return Rt(t,e)}),!0,e),null})),T(t,l._closedPromise,(function(t){return i?k(!0,t):E((function(){return Br(e,t)}),!0,t),null})),S=e,w=o._closedPromise,x=function(){return r?k():E((function(){return function(e){var t=e._ownerWritableStream,r=t._state
3068return Dt(t)||"closed"===r?f(void 0):"errored"===r?m(t._storedError):Bt(e)}(l)})),null},"closed"===S._state?x():b(w,x),Dt(t)||"closed"===t._state){var P=new TypeError("the destination writable stream closed before all data could be piped to it")
3069i?k(!0,P):E((function(){return Br(e,P)}),!0,P)}function C(){var e=u
3070return g(u,(function(){return e!==u?C():void 0}))}function T(e,t,r){"errored"===e._state?r(e._storedError):_(t,r)}function E(e,r,n){function i(){return v(e(),(function(){return R(r,n)}),(function(e){return R(!0,e)})),null}c||(c=!0,"writable"!==t._state||Dt(t)?i():b(C(),i))}function k(e,r){c||(c=!0,"writable"!==t._state||Dt(t)?R(e,r):b(C(),(function(){return R(e,r)})))}function R(e,t){return Gt(l),O(o),void 0!==a&&a.removeEventListener("abort",y),e?d(t):h(void 0),null}A(p((function(e,t){!function r(n){n?e():g(c?f(!0):g(l._readyPromise,(function(){return p((function(e,t){se(o,{_chunkSteps:function(t){u=g(Ut(l,t),void 0,s),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})}))})),r,t)}(!1)})))}))}var vr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!br(this))throw Er("desiredSize")
3071return Pr(this)}
3071,enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!br(this))throw Er("close")
3072if(!Cr(this))throw new TypeError("The stream is not in a state that permits close")
3073Sr(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!br(this))throw Er("enqueue")
3074if(!Cr(this))throw new TypeError("The stream is not in a state that permits enqueue")
3075return wr(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!br(this))throw Er("error")
3076xr(this,e)},e.prototype[E]=function(e){Te(this)
3077var t=this._cancelAlgorithm(e)
3078return Ar(this),t},e.prototype[k]=function(e){var t=this._controlledReadableStream
3079if(this._queue.length>0){var r=Pe(this)
3080this._closeRequested&&0===this._queue.length?(Ar(this),qr(t)):_r(this),e._chunkSteps(r)}else Q(t,e),_r(this)},e.prototype[R]=function(){},e}()
3081function br(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof vr}function _r(e){yr(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,v(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,_r(e)),null}),(function(t){return xr(e,t),null}))))}function yr(e){var t=e._controlledReadableStream
3082return!!Cr(e)&&!!e._started&&(!!(Wr(t)&&Z(t)>0)||Pr(e)>0)}function Ar(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Sr(e){if(Cr(e)){var t=e._controlledReadableStream
3083e._closeRequested=!0,0===e._queue.length&&(Ar(e),qr(t))}}function wr(e,t){if(Cr(e)){var r=e._controlledReadableStream
3084if(Wr(r)&&Z(r)>0)J(r,t,!1)
3085else{var n=void 0
3086try{n=e._strategySizeAlgorithm(t)}catch(t){throw xr(e,t),t}try{Ce(e,t,n)}catch(t){throw xr(e,t),t}}_r(e)}}function xr(e,t){var r=e._controlledReadableStream
3087"readable"===r._state&&(Te(e),Ar(e),Gr(r,t))}function Pr(e){var t=e._controlledReadableStream._state
3088return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Cr(e){var t=e._controlledReadableStream._state
3089return!e._closeRequested&&"readable"===t}function Tr(e,t,r,n,i,a,s){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Te(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,v(f(r()),(function(){return t._started=!0,_r(t),null}),(function(e){return xr(t,e),null}))}function Er(e){return new TypeError("ReadableStreamDefaultController.prototype.".concat(e," can only be used on a ReadableStreamDefaultController"))}function kr(e,t,r){return G(e,r),function(r){return x(e,t,[r])}}function Rr(e,t,r){return G(e,r),function(r){return x(e,t,[r])}}function Fr(e,t,r){return G(e,r),function(r){return w(e,t,[r])}}function Mr(e,t){if("bytes"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamType"))
3090return e}function Or(e,t){q(e,t)
3091var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,a=null==e?void 0:e.signal
3092return void 0!==a&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1
3093try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError("".concat(t," is not an AbortSignal."))}(a,"".concat(t," has member 'signal' that")),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(i),signal:a}}Object.defineProperties(vr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),c(vr.prototype.close,"close"),c(vr.prototype.enqueue,"enqueue"),c(vr.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(vr.prototype,t.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0})
3094var Ir=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:U(e,"First parameter")
3095var r=vt(t,"Second parameter"),n=function(e,t){q(e,t)
3096var r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,a=null==r?void 0:r.pull,s=null==r?void 0:r.start,o=null==r?void 0:r.type
3097return{autoAllocateChunkSize:void 0===n?void 0:$(n,"".concat(t," has member 'autoAllocateChunkSize' that")),cancel:void 0===i?void 0:kr(i,r,"".concat(t," has member 'cancel' that")),pull:void 0===a?void 0:Rr(a,r,"".concat(t," has member 'pull' that")),start:void 0===s?void 0:Fr(s,r,"".concat(t," has member 'start' that")),type:void 0===o?void 0:Mr(o,"".concat(t," has member 'type' that"))}}(e,"First parameter")
3098if(jr(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function")
3099!function(e,t,r){var n,i,a,s=Object.create(Re.prototype)
3100n=void 0!==t.start?function(){return t.start(s)}:function(){},i=void 0!==t.pull?function(){return t.pull(s)}:function(){return f(void 0)},a=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return f(void 0)}
3101var o=t.autoAllocateChunkSize
3102if(0===o)throw new TypeError("autoAllocateChunkSize must be greater than 0")
3103rt(e,s,n,i,a,r,o)}(this,n,mt(r,0))}else{var i=gt(r)
3104!function(e,t,r,n){var i,a,s,o=Object.create(vr.prototype)
3105i=void 0!==t.start?function(){return t.start(o)}:function(){},a=void 0!==t.pull?function(){return t.pull(o)}:function(){return f(void 0)},s=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return f(void 0)},Tr(e,o,i,a,s,r,n)}(this,n,mt(r,1),i)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Nr(this))throw Ur("locked")
3106return Wr(this)}
3106,enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Nr(this)?Wr(this)?m(new TypeError("Cannot cancel a stream that already has a reader")):Br(this,e):m(Ur("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!Nr(this))throw Ur("getReader")
3107return void 0===function(e,t){q(e,t)
3108var r=null==e?void 0:e.mode
3109return{mode:void 0===r?void 0:at(r,"".concat(t," has member 'mode' that"))}}(e,"First parameter").mode?K(this):st(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!Nr(this))throw Ur("pipeThrough")
3110z(e,1,"pipeThrough")
3111var r=function(e,t){q(e,t)
3112var r=null==e?void 0:e.readable
3113H(r,"readable","ReadableWritablePair"),Y(r,"".concat(t," has member 'readable' that"))
3114var n=null==e?void 0:e.writable
3115return H(n,"writable","ReadableWritablePair"),wt(n,"".concat(t," has member 'writable' that")),{readable:r,writable:n}}(e,"First parameter"),n=Or(t,"Second parameter")
3116if(Wr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream")
3117if(kt(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream")
3118return A(gr(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!Nr(this))return m(Ur("pipeTo"))
3119if(void 0===e)return m("Parameter 1 is required in 'pipeTo'.")
3120if(!Et(e))return m(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"))
3121var r
3122try{r=Or(t,"Second parameter")}catch(e){return m(e)}return Wr(this)?m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):kt(e)?m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):gr(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!Nr(this))throw Ur("tee")
3123return ce(Fe((e=this)._readableStreamController)?function(e){var t,r,n,i,a,s=K(e),o=!1,l=!1,c=!1,u=!1,h=!1,d=p((function(e){a=e}))
3124function m(e){_(e._closedPromise,(function(t){return e!==s||(Ke(n._readableStreamController,t),Ke(i._readableStreamController,t),u&&h||a(void 0)),null}))}function g(){ht(s)&&(O(s),m(s=K(e))),se(s,{_chunkSteps:function(t){S((function(){l=!1,c=!1
3125var r=t,s=t
3126if(!u&&!h)try{s=xe(t)}catch(t){return Ke(n._readableStreamController,t),Ke(i._readableStreamController,t),void a(Br(e,t))}u||Ye(n._readableStreamController,r),h||Ye(i._readableStreamController,s),o=!1,l?b():c&&y()}))},_closeSteps:function(){o=!1,u||$e(n._readableStreamController),h||$e(i._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&et(n._readableStreamController,0),i._readableStreamController._pendingPullIntos.length>0&&et(i._readableStreamController,0),u&&h||a(void 0)},_errorSteps:function(){o=!1}})}function v(t,r){ae(s)&&(O(s),m(s=st(e)))
3127var d=r?i:n,p=r?n:i
3128dt(s,t,1,{_chunkSteps:function(t){S((function(){l=!1,c=!1
3129var n=r?h:u
3130if(r?u:h)n||tt(d._readableStreamController,t)
3131else{var i=void 0
3132try{i=xe(t)}catch(t){return Ke(d._readableStreamController,t),Ke(p._readableStreamController,t),void a(Br(e,t))}n||tt(d._readableStreamController,t),Ye(p._readableStreamController,i)}o=!1,l?b():c&&y()}))},_closeSteps:function(e){o=!1
3133var t=r?h:u,n=r?u:h
3134t||$e(d._readableStreamController),n||$e(p._readableStreamController),void 0!==e&&(t||tt(d._readableStreamController,e),!n&&p._readableStreamController._pendingPullIntos.length>0&&et(p._readableStreamController,0)),t&&n||a(void 0)},_errorSteps:function(){o=!1}})}function b(){if(o)return l=!0,f(void 0)
3135o=!0
3136var e=Je(n._readableStreamController)
3137return null===e?g():v(e._view,!1),f(void 0)}function y(){if(o)return c=!0,f(void 0)
3138o=!0
3139var e=Je(i._readableStreamController)
3140return null===e?g():v(e._view,!0),f(void 0)}function A(){}return n=Lr(A,b,(function(n){if(u=!0,t=n,h){var i=ce([t,r]),s=Br(e,i)
3141a(s)}return d})),i=Lr(A,y,(function(n){if(h=!0,r=n,u){var i=ce([t,r]),s=Br(e,i)
3142a(s)}return d})),m(s),[n,i]}(e):function(e){var t,r,n,i,a,s=K(e),o=!1,l=!1,c=!1,u=!1,h=p((function(e){a=e}))
3143function d(){return o?(l=!0,f(void 0)):(o=!0,se(s,{_chunkSteps:function(e){
3143S((function(){l=!1
3144var t=e,r=e
3145c||wr(n._readableStreamController,t),u||wr(i._readableStreamController,r),o=!1,l&&d()}))},_closeSteps:function(){o=!1,c||Sr(n._readableStreamController),u||Sr(i._readableStreamController),c&&u||a(void 0)},_errorSteps:function(){o=!1}}),f(void 0))}function m(){}return n=Dr(m,d,(function(n){if(c=!0,t=n,u){var i=ce([t,r]),s=Br(e,i)
3146a(s)}return h})),i=Dr(m,d,(function(n){if(u=!0,r=n,c){var i=ce([t,r]),s=Br(e,i)
3147a(s)}return h})),_(s._closedPromise,(function(e){return xr(n._readableStreamController,e),xr(i._readableStreamController,e),c&&u||a(void 0),null})),[n,i]}(e))
3148var e},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!Nr(this))throw Ur("values")
3149var t,r,n,i,a=function(e){q(e,"First parameter")
3150var t=null==e?void 0:e.preventCancel
3151return{preventCancel:Boolean(t)}}(e)
3152return t=a.preventCancel,r=K(this),n=new _e(r,t),(i=Object.create(ye))._asyncIteratorImpl=n,i},e.prototype[ge]=function(e){return this.values(e)},e.from=function(e){return o(r=t=e)&&void 0!==r.getReader?function(e){var t
3153return t=Dr(s,(function(){var r
3154try{r=e.read()}catch(e){return m(e)}return y(r,(function(e){if(!o(e))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object")
3155if(e.done)Sr(t._readableStreamController)
3156else{var r=e.value
3157wr(t._readableStreamController,r)}}))}),(function(t){try{return f(e.cancel(t))}catch(e){return m(e)}}),0)}(t.getReader()):function(e){var t,r=ve(e,"async")
3158return t=Dr(s,(function(){var e
3159try{e=function(e){var t=w(e.nextMethod,e.iterator,[])
3160if(!o(t))throw new TypeError("The iterator.next() method must return an object")
3161return t}(r)}catch(e){return m(e)}return y(f(e),(function(e){if(!o(e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object")
3162var r=function(e){return Boolean(e.done)}(e)
3163if(r)Sr(t._readableStreamController)
3164else{var n=function(e){return e.value}(e)
3165wr(t._readableStreamController,n)}}))}),(function(e){var t,n,i=r.iterator
3166try{t=fe(i,"return")}catch(e){return m(e)}if(void 0===t)return f(void 0)
3167try{n=w(t,i,[e])}catch(e){return m(e)}return y(f(n),(function(e){if(!o(e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")}))}),0)}(t)
3168var t,r},e}()
3169function Dr(e,t,r,n,i){void 0===n&&(n=1),void 0===i&&(i=function(){return 1})
3170var a=Object.create(Ir.prototype)
3171return jr(a),Tr(a,Object.create(vr.prototype),e,t,r,n,i),a}function Lr(e,t,r){var n=Object.create(Ir.prototype)
3172return jr(n),rt(n,Object.create(Re.prototype),e,t,r,0,void 0),n}function jr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Nr(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof Ir}function Wr(e){return void 0!==e._reader}function Br(e,t){if(e._disturbed=!0,"closed"===e._state)return f(void 0)
3173if("errored"===e._state)return m(e._storedError)
3174qr(e)
3175var r=e._reader
3176if(void 0!==r&&ht(r)){var n=r._readIntoRequests
3177r._readIntoRequests=new P,n.forEach((function(e){e._closeSteps(void 0)}))}return y(e._readableStreamController[E](t),s)}function qr(e){e._state="closed"
3178var t=e._reader
3179if(void 0!==t&&(N(t),ae(t))){var r=t._readRequests
3180t._readRequests=new P,r.forEach((function(e){e._closeSteps()}))}}function Gr(e,t){e._state="errored",e._storedError=t
3181var r=e._reader
3182void 0!==r&&(j(r,t),ae(r)?oe(r,t):pt(r,t))}function Ur(e){return new TypeError("ReadableStream.prototype.".concat(e," can only be used on a ReadableStream"))}function zr(e,t){q(e,t)
3183var r=null==e?void 0:e.highWaterMark
3184return H(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:V(r)}}Object.defineProperties(Ir,{from:{enumerable:!0}}),Object.defineProperties(Ir.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),c(Ir.from,"from"),c(Ir.prototype.cancel,"cancel"),c(Ir.prototype.getReader,"getReader"),c(Ir.prototype.pipeThrough,"pipeThrough"),c(Ir.prototype.pipeTo,"pipeTo"),c(Ir.prototype.tee,"tee"),c(Ir.prototype.values,"values"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ir.prototype,t.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Ir.prototype,ge,{value:Ir.prototype.values,writable:!0,configurable:!0})
3185var Hr=function(e){return e.byteLength}
3186c(Hr,"size")
3187var Vr=function(){function e(e){z(e,1,"ByteLengthQueuingStrategy"),e=zr(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!$r(this))throw Xr("highWaterMark")
3188return this._byteLengthQueuingStrategyHighWaterMark}
3188,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!$r(this))throw Xr("size")
3189return Hr},enumerable:!1,configurable:!0}),e}()
3190function Xr(e){return new TypeError("ByteLengthQueuingStrategy.prototype.".concat(e," can only be used on a ByteLengthQueuingStrategy"))}function $r(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof Vr}Object.defineProperties(Vr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Vr.prototype,t.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0})
3191var Yr=function(){return 1}
3192c(Yr,"size")
3193var Kr=function(){function e(e){z(e,1,"CountQueuingStrategy"),e=zr(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Jr(this))throw Qr("highWaterMark")
3194return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Jr(this))throw Qr("size")
3195return Yr},enumerable:!1,configurable:!0}),e}()
3196function Qr(e){return new TypeError("CountQueuingStrategy.prototype.".concat(e," can only be used on a CountQueuingStrategy"))}function Jr(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof Kr}function Zr(e,t,r){return G(e,r),function(r){return x(e,t,[r])}}function en(e,t,r){return G(e,r),function(r){return w(e,t,[r])}}function tn(e,t,r){return G(e,r),function(r,n){return x(e,t,[r,n])}}function rn(e,t,r){return G(e,r),function(r){return x(e,t,[r])}}Object.defineProperties(Kr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Kr.prototype,t.toStringTag,{value:"CountQueuingStrategy",configurable:!0})
3197var nn=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null)
3198var n=vt(t,"Second parameter"),i=vt(r,"Third parameter"),a=function(e,t){q(e,t)
3199var r=null==e?void 0:e.cancel,n=null==e?void 0:e.flush,i=null==e?void 0:e.readableType,a=null==e?void 0:e.start,s=null==e?void 0:e.transform,o=null==e?void 0:e.writableType
3200return{cancel:void 0===r?void 0:rn(r,e,"".concat(t," has member 'cancel' that")),flush:void 0===n?void 0:Zr(n,e,"".concat(t," has member 'flush' that")),readableType:i,start:void 0===a?void 0:en(a,e,"".concat(t," has member 'start' that")),transform:void 0===s?void 0:tn(s,e,"".concat(t," has member 'transform' that")),writableType:o}}(e,"First parameter")
3201if(void 0!==a.readableType)throw new RangeError("Invalid readableType specified")
3202if(void 0!==a.writableType)throw new RangeError("Invalid writableType specified")
3203var s,o=mt(i,0),l=gt(i),c=mt(n,1),u=gt(n)
3204!function(e,t,r,n,i,a){function s(){return t}e._writable=function(e,t,r,n,i,a){void 0===i&&(i=1),void 0===a&&(a=function(){return 1})
3205var s=Object.create(Pt.prototype)
3206return Tt(s),Xt(s,Object.create(Ht.prototype),e,t,r,n,i,a),s}(s,(function(t){return function(e,t){var r=e._transformStreamController
3207return e._backpressure?y(e._backpressureChangePromise,(function(){var n=e._writable
3208if("erroring"===n._state)throw n._storedError
3209return fn(r,t)})):fn(r,t)}(e,t)}),(function(){return function(e){var t=e._transformStreamController
3210if(void 0!==t._finishPromise)return t._finishPromise
3211var r=e._readable
3212t._finishPromise=p((function(e,r){t._finishPromise_resolve=e,t._finishPromise_reject=r}))
3213var n=t._flushAlgorithm()
3214return dn(t),v(n,(function(){return"errored"===r._state?vn(t,r._storedError):(Sr(r._readableStreamController),gn(t)),null}),(function(e){return xr(r._readableStreamController,e),vn(t,e),null})),t._finishPromise}(e)}),(function(t){return function(e,t){var r=e._transformStreamController
3215if(void 0!==r._finishPromise)return r._finishPromise
3216var n=e._readable
3217r._finishPromise=p((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}))
3218var i=r._cancelAlgorithm(t)
3219return dn(r),v(i,(function(){return"errored"===n._state?vn(r,n._storedError):(xr(n._readableStreamController,t),gn(r)),null}),(function(e){return xr(n._readableStreamController,e),vn(r,e),null})),r._finishPromise}(e,t)}),r,n),e._readable=Dr(s,(function(){return function(e){return cn(e,!1),e._backpressureChangePromise}(e)}),(function(t){return function(e,t){var r=e._transformStreamController
3220if(void 0!==r._finishPromise)return r._finishPromise
3221var n=e._writable
3222r._finishPromise=p((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}))
3223var i=r._cancelAlgorithm(t)
3224return dn(r),v(i,(function(){return"errored"===n._state?vn(r,n._storedError):(Qt(n._writableStreamController,t),ln(e),gn(r)),null}),(function(t){return Qt(n._writableStreamController,t),ln(e),vn(r,t),null})),r._finishPromise}(e,t)}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,cn(e,!0),e._transformStreamController=void 0}(this,p((function(e){s=e})),c,u,o,l),function(e,t){var r,n,i,a=Object.create(un.prototype)
3225r=void 0!==t.transform?function(e){return t.transform(e,a)}:function(e){try{return pn(a,e),f(void 0)}catch(e){return m(e)}},n=void 0!==t.flush?function(){return t.flush(a)}:function(){return f(void 0)},i=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return f(void 0)},function(e,t,r,n,i){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n,t._cancelAlgorithm=i,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}(e,a,r,n,i)}(this,a),void 0!==a.start?s(a.start(this._transformStreamController)):s(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!an(this))throw bn("readable")
3226return this._readable}
3226,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!an(this))throw bn("writable")
3227return this._writable},enumerable:!1,configurable:!0}),e}()
3228function an(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof nn}function sn(e,t){xr(e._readable._readableStreamController,t),on(e,t)}function on(e,t){dn(e._transformStreamController),Qt(e._writable._writableStreamController,t),ln(e)}function ln(e){e._backpressure&&cn(e,!1)}function cn(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=p((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(nn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(nn.prototype,t.toStringTag,{value:"TransformStream",configurable:!0})
3229var un=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!hn(this))throw mn("desiredSize")
3230return Pr(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!hn(this))throw mn("enqueue")
3231pn(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!hn(this))throw mn("error")
3232var t
3233t=e,sn(this._controlledTransformStream,t)},e.prototype.terminate=function(){if(!hn(this))throw mn("terminate")
3234var e
3235Sr((e=this._controlledTransformStream)._readable._readableStreamController),on(e,new TypeError("TransformStream terminated"))},e}()
3236function hn(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof un}function dn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function pn(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController
3237if(!Cr(n))throw new TypeError("Readable side is not in a state that permits enqueue")
3238try{wr(n,t)}catch(e){throw on(r,e),r._readable._storedError}var i=function(e){return!yr(e)}(n)
3239i!==r._backpressure&&cn(r,!0)}function fn(e,t){return y(e._transformAlgorithm(t),void 0,(function(t){throw sn(e._controlledTransformStream,t),t}))}function mn(e){return new TypeError("TransformStreamDefaultController.prototype.".concat(e," can only be used on a TransformStreamDefaultController"))}function gn(e){void 0!==e._finishPromise_resolve&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function vn(e,t){void 0!==e._finishPromise_reject&&(A(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function bn(e){return new TypeError("TransformStream.prototype.".concat(e," can only be used on a TransformStream"))}Object.defineProperties(un.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),c(un.prototype.enqueue,"enqueue"),c(un.prototype.error,"error"),c(un.prototype.terminate,"terminate"),"symbol"==typeof t.toStringTag&&Object.defineProperty(un.prototype,t.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=Vr,e.CountQueuingStrategy=Kr,e.ReadableByteStreamController=Re,e.ReadableStream=Ir,e.ReadableStreamBYOBReader=ut,e.ReadableStreamBYOBRequest=ke,e.ReadableStreamDefaultController=vr,e.ReadableStreamDefaultReader=ie,e.TransformStream=nn,e.TransformStreamDefaultController=un,e.WritableStream=Pt,e.WritableStreamDefaultController=Ht,e.WritableStreamDefaultWriter=Nt},r(t)}}])
3240
3241//# sourceMappingURL=https://cdn.production.dochub.com/assets/chunk.20260930T195149833Z.fa1b47cec49361506c0a-2e01046c07bcc44d3b0bbd77eec866ea.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.