@mlightcad/cad-simple-viewer-cli 1.6.3 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist-runner/assets/cad-html-plugin-CH5xALXb.js +1547 -0
- package/dist-runner/assets/cad-pdf-plugin-DkcMorOI.js +213 -0
- package/dist-runner/assets/cad-svg-plugin-BJNA8aLS.js +17 -0
- package/dist-runner/assets/index-BSoxUnC1.js +7324 -0
- package/dist-runner/index.html +1 -1
- package/dist-runner/viewer-runtime.iife.js +2428 -308
- package/dist-runner/workers/libredwg-parser-worker.js +19 -19
- package/dist-runner/workers/mtext-renderer-worker.js +15359 -15067
- package/examples/batch-export-html-multi-preview.mjs +236 -0
- package/examples/export-html-multi-preview.scr +18 -0
- package/examples/export-html-multi.scr +13 -0
- package/examples/export-html.scr +3 -1
- package/examples/export-pdf.scr +9 -0
- package/examples/index.json +27 -0
- package/package.json +9 -8
- package/dist-runner/assets/cad-html-plugin-zvPRf0De.js +0 -863
- package/dist-runner/assets/cad-pdf-plugin-DCIpBYfq.js +0 -312
- package/dist-runner/assets/cad-svg-plugin-3gvPtroY.js +0 -17
- package/dist-runner/assets/index-BAGroFfI.js +0 -5626
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import{C as nR,z as ZM,d as sR,a8 as AR,a9 as AB,Y as aR,aa as p3,t as oR,ab as lR}from"./index-BAGroFfI.js";import{ac as bZ,ad as BZ}from"./index-BAGroFfI.js";import{AcSvgRenderer as g3}from"./cad-svg-plugin-3gvPtroY.js";var hR=Object.defineProperty,JM=i=>{throw TypeError(i)},cR=(i,t,e)=>t in i?hR(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,ut=(i,t,e)=>cR(i,typeof t!="symbol"?t+"":t,e),FS=(i,t,e)=>t.has(i)||JM("Cannot "+e),c=(i,t,e)=>(FS(i,t,"read from private field"),e?e.call(i):t.get(i)),U=(i,t,e)=>t.has(i)?JM("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),F=(i,t,e,r)=>(FS(i,t,"write to private field"),t.set(i,e),e),_=(i,t,e)=>(FS(i,t,"access private method"),e),$i=(i,t,e,r)=>({set _(n){F(i,t,n)},get _(){return c(i,t,r)}});function Ze(i){"@babel/helpers - typeof";return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(i)}var da=Uint8Array,_A=Uint16Array,SS=Int32Array,ES=new da([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),kS=new da([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),m3=new da([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tT=function(i,t){for(var e=new _A(31),r=0;r<31;++r)e[r]=t+=1<<i[r-1];for(var n=new SS(e[30]),r=1;r<30;++r)for(var s=e[r];s<e[r+1];++s)n[s]=s-e[r]<<5|r;return{b:e,r:n}},eT=tT(ES,2),uR=eT.b,Xx=eT.r;uR[28]=258,Xx[258]=28;var dR=tT(kS,0),w3=dR.r,rT=new _A(32768);for(var Tr=0;Tr<32768;++Tr){var Dl=(Tr&43690)>>1|(Tr&21845)<<1;Dl=(Dl&52428)>>2|(Dl&13107)<<2,Dl=(Dl&61680)>>4|(Dl&3855)<<4,rT[Tr]=((Dl&65280)>>8|(Dl&255)<<8)>>1}var Wm=(function(i,t,e){for(var r=i.length,n=0,s=new _A(t);n<r;++n)i[n]&&++s[i[n]-1];var A=new _A(t);for(n=1;n<t;++n)A[n]=A[n-1]+s[n-1]<<1;var a;for(a=new _A(r),n=0;n<r;++n)i[n]&&(a[n]=rT[A[i[n]-1]++]>>15-i[n]);return a}),_u=new da(288);for(var Tr=0;Tr<144;++Tr)_u[Tr]=8;for(var Tr=144;Tr<256;++Tr)_u[Tr]=9;for(var Tr=256;Tr<280;++Tr)_u[Tr]=7;for(var Tr=280;Tr<288;++Tr)_u[Tr]=8;var bv=new da(32);for(var Tr=0;Tr<32;++Tr)bv[Tr]=5;var fR=Wm(_u,9),pR=Wm(bv,5),iT=function(i){return(i+7)/8|0},gR=function(i,t,e){return(e==null||e>i.length)&&(e=i.length),new da(i.subarray(t,e))},So=function(i,t,e){e<<=t&7;var r=t/8|0;i[r]|=e,i[r+1]|=e>>8},$p=function(i,t,e){e<<=t&7;var r=t/8|0;i[r]|=e,i[r+1]|=e>>8,i[r+2]|=e>>16},aB=function(i,t){for(var e=[],r=0;r<i.length;++r)i[r]&&e.push({s:r,f:i[r]});var n=e.length,s=e.slice();if(!n)return{t:sT,l:0};if(n==1){var A=new da(e[0].s+1);return A[e[0].s]=1,{t:A,l:1}}e.sort(function(k,I){return k.f-I.f}),e.push({s:-1,f:25001});var a=e[0],o=e[1],l=0,h=1,u=2;for(e[0]={s:-1,f:a.f+o.f,l:a,r:o};h!=n-1;)a=e[e[l].f<e[u].f?l++:u++],o=e[l!=h&&e[l].f<e[u].f?l++:u++],e[h++]={s:-1,f:a.f+o.f,l:a,r:o};for(var f=s[0].s,r=1;r<n;++r)s[r].s>f&&(f=s[r].s);var d=new _A(f+1),g=Yx(e[h-1],d,0);if(g>t){var r=0,m=0,y=g-t,w=1<<y;for(s.sort(function(I,N){return d[N.s]-d[I.s]||I.f-N.f});r<n;++r){var b=s[r].s;if(d[b]>t)m+=w-(1<<g-d[b]),d[b]=t;else break}for(m>>=y;m>0;){var C=s[r].s;d[C]<t?m-=1<<t-d[C]++-1:++r}for(;r>=0&&m;--r){var S=s[r].s;d[S]==t&&(--d[S],++m)}g=t}return{t:new da(d),l:g}},Yx=function(i,t,e){return i.s==-1?Math.max(Yx(i.l,t,e+1),Yx(i.r,t,e+1)):t[i.s]=e},v3=function(i){for(var t=i.length;t&&!i[--t];);for(var e=new _A(++t),r=0,n=i[0],s=1,A=function(o){e[r++]=o},a=1;a<=t;++a)if(i[a]==n&&a!=t)++s;else{if(!n&&s>2){for(;s>138;s-=138)A(32754);s>2&&(A(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(A(n),--s;s>6;s-=6)A(8304);s>2&&(A(s-3<<5|8208),s=0)}for(;s--;)A(n);s=1,n=i[a]}return{c:e.subarray(0,r),n:t}},Zp=function(i,t){for(var e=0,r=0;r<t.length;++r)e+=i[r]*t[r];return e},nT=function(i,t,e){var r=e.length,n=iT(t+2);i[n]=r&255,i[n+1]=r>>8,i[n+2]=i[n]^255,i[n+3]=i[n+1]^255;for(var s=0;s<r;++s)i[n+s+4]=e[s];return(n+4+r)*8},y3=function(i,t,e,r,n,s,A,a,o,l,h){So(t,h++,e),++n[256];for(var u=aB(n,15),f=u.t,d=u.l,g=aB(s,15),m=g.t,y=g.l,w=v3(f),b=w.c,C=w.n,S=v3(m),k=S.c,I=S.n,N=new _A(19),D=0;D<b.length;++D)++N[b[D]&31];for(var D=0;D<k.length;++D)++N[k[D]&31];for(var Q=aB(N,7),K=Q.t,L=Q.l,O=19;O>4&&!K[m3[O-1]];--O);var W=l+5<<3,R=Zp(n,_u)+Zp(s,bv)+A,tt=Zp(n,f)+Zp(s,m)+A+14+3*O+Zp(N,K)+2*N[16]+3*N[17]+7*N[18];if(o>=0&&W<=R&&W<=tt)return nT(t,h,i.subarray(o,o+l));var et,st,nt,at;if(So(t,h,1+(tt<R)),h+=2,tt<R){et=Wm(f,d),st=f,nt=Wm(m,y),at=m;var ft=Wm(K,L);So(t,h,C-257),So(t,h+5,I-1),So(t,h+10,O-4),h+=14;for(var D=0;D<O;++D)So(t,h+3*D,K[m3[D]]);h+=3*O;for(var ht=[b,k],M=0;M<2;++M)for(var G=ht[M],D=0;D<G.length;++D){var X=G[D]&31;So(t,h,ft[X]),h+=K[X],X>15&&(So(t,h,G[D]>>5&127),h+=G[D]>>12)}}else et=fR,st=_u,nt=pR,at=bv;for(var D=0;D<a;++D){var rt=r[D];if(rt>255){var X=rt>>18&31;$p(t,h,et[X+257]),h+=st[X+257],X>7&&(So(t,h,rt>>23&31),h+=ES[X]);var it=rt&31;$p(t,h,nt[it]),h+=at[it],it>3&&($p(t,h,rt>>5&8191),h+=kS[it])}else $p(t,h,et[rt]),h+=st[rt]}return $p(t,h,et[256]),h+st[256]},mR=new SS([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sT=new da(0),wR=function(i,t,e,r,n,s){var A=s.z||i.length,a=new da(r+A+5*(1+Math.ceil(A/7e3))+n),o=a.subarray(r,a.length-n),l=s.l,h=(s.r||0)&7;if(t){h&&(o[0]=s.r>>3);for(var u=mR[t-1],f=u>>13,d=u&8191,g=(1<<e)-1,m=s.p||new _A(32768),y=s.h||new _A(g+1),w=Math.ceil(e/3),b=2*w,C=function(jt){return(i[jt]^i[jt+1]<<w^i[jt+2]<<b)&g},S=new SS(25e3),k=new _A(288),I=new _A(32),N=0,D=0,Q=s.i||0,K=0,L=s.w||0,O=0;Q+2<A;++Q){var W=C(Q),R=Q&32767,tt=y[W];if(m[R]=tt,y[W]=R,L<=Q){var et=A-Q;if((N>7e3||K>24576)&&(et>423||!l)){h=y3(i,o,0,S,k,I,D,K,O,Q-O,h),K=N=D=0,O=Q;for(var st=0;st<286;++st)k[st]=0;for(var st=0;st<30;++st)I[st]=0}var nt=2,at=0,ft=d,ht=R-tt&32767;if(et>2&&W==C(Q-ht))for(var M=Math.min(f,et)-1,G=Math.min(32767,Q),X=Math.min(258,et);ht<=G&&--ft&&R!=tt;){if(i[Q+nt]==i[Q+nt-ht]){for(var rt=0;rt<X&&i[Q+rt]==i[Q+rt-ht];++rt);if(rt>nt){if(nt=rt,at=ht,rt>M)break;for(var it=Math.min(ht,rt-2),ot=0,st=0;st<it;++st){var gt=Q-ht+st&32767,vt=m[gt],yt=gt-vt&32767;yt>ot&&(ot=yt,tt=gt)}}}R=tt,tt=m[R],ht+=R-tt&32767}if(at){S[K++]=268435456|Xx[nt]<<18|w3[at];var St=Xx[nt]&31,Dt=w3[at]&31;D+=ES[St]+kS[Dt],++k[257+St],++I[Dt],L=Q+nt,++N}else S[K++]=i[Q],++k[i[Q]]}}for(Q=Math.max(Q,L);Q<A;++Q)S[K++]=i[Q],++k[i[Q]];h=y3(i,o,l,S,k,I,D,K,O,Q-O,h),l||(s.r=h&7|o[h/8|0]<<3,h-=7,s.h=y,s.p=m,s.i=Q,s.w=L)}else{for(var Q=s.w||0;Q<A+l;Q+=65535){var Tt=Q+65535;Tt>=A&&(o[h/8|0]=l,Tt=A),h=nT(o,h+1,i.subarray(Q,Tt))}s.i=A}return gR(a,0,r+iT(h)+n)},AT=function(){var i=1,t=0;return{p:function(e){for(var r=i,n=t,s=e.length|0,A=0;A!=s;){for(var a=Math.min(A+2655,s);A<a;++A)n+=r+=e[A];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}i=r,t=n},d:function(){return i%=65521,t%=65521,(i&255)<<24|(i&65280)<<8|(t&255)<<8|t>>8}}},vR=function(i,t,e,r,n){if(!n&&(n={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),A=new da(s.length+i.length);A.set(s),A.set(i,s.length),i=A,n.w=s.length}return wR(i,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(i.length)))*1.5):20:12+t.mem,e,r,n)},aT=function(i,t,e){for(;e;++t)i[t]=e,e>>>=8},yR=function(i,t){var e=t.level,r=e==0?0:e<6?1:e==9?3:2;if(i[0]=120,i[1]=r<<6|(t.dictionary&&32),i[1]|=31-(i[0]<<8|i[1])%31,t.dictionary){var n=AT();n.p(t.dictionary),aT(i,2,n.d())}};function $x(i,t){t||(t={});var e=AT();e.p(i);var r=vR(i,t,t.dictionary?6:2,4);return yR(r,t),aT(r,r.length-4,e.d()),r}var bR=typeof TextDecoder<"u"&&new TextDecoder,BR=0;try{bR.decode(sT,{stream:!0}),BR=1}catch{}function CR(i){if(Array.isArray(i))return i}function xR(i,t){var e=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(e!=null){var r,n,s,A,a=[],o=!0,l=!1;try{if(s=(e=e.call(i)).next,t!==0)for(;!(o=(r=s.call(e)).done)&&(a.push(r.value),a.length!==t);o=!0);}catch(h){l=!0,n=h}finally{try{if(!o&&e.return!=null&&(A=e.return(),Object(A)!==A))return}finally{if(l)throw n}}return a}}function b3(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,r=Array(t);e<t;e++)r[e]=i[e];return r}function FR(i,t){if(i){if(typeof i=="string")return b3(i,t);var e={}.toString.call(i).slice(8,-1);return e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set"?Array.from(i):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?b3(i,t):void 0}}function SR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B3(i,t){return CR(i)||xR(i,t)||FR(i,t)||SR()}function C3(i,t="utf8"){return new TextDecoder(t).decode(i)}const ER=new TextEncoder;function kR(i){return ER.encode(i)}const UR=1024*8,IR=(()=>{const i=new Uint8Array(4),t=new Uint32Array(i.buffer);return!((t[0]=1)&i[0])})(),oB={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class US{constructor(t=UR,e={}){ut(this,"buffer"),ut(this,"byteLength"),ut(this,"byteOffset"),ut(this,"length"),ut(this,"offset"),ut(this,"lastWrittenByte"),ut(this,"littleEndian"),ut(this,"_data"),ut(this,"_mark"),ut(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const n=e.offset?e.offset>>>0:0,s=t.byteLength-n;let A=n;(ArrayBuffer.isView(t)||t instanceof US)&&(t.byteLength!==t.buffer.byteLength&&(A=t.byteOffset+n),t=t.buffer),r?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=A,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,A,s),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const e=(this.offset+t)*2,r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=e,this.byteLength=e,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=oB[e].BYTES_PER_ELEMENT*t,n=this.byteOffset+this.offset,s=this.buffer.slice(n,n+r);if(this.littleEndian===IR&&e!=="uint8"&&e!=="int8"){const a=new Uint8Array(this.buffer.slice(n,n+r));a.reverse();const o=new oB[e](a.buffer);return this.offset+=r,o.reverse(),o}const A=new oB[e](s);return this.offset+=r,A}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;r<t;r++)e+=this.readChar();return e}readUtf8(t=1){return C3(this.readBytes(t))}decodeText(t=1,e="utf8"){return C3(this.readBytes(t),e)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let e=0;e<t.length;e++)this._data.setUint8(this.offset++,t[e]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let e=0;e<t.length;e++)this.writeUint8(t.charCodeAt(e));return this}writeUtf8(t){return this.writeBytes(kR(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Fp(i){let t=i.length;for(;--t>=0;)i[t]=0}const QR=3,LR=258,oT=29,_R=256,MR=_R+1+oT,lT=30,TR=512,NR=new Array((MR+2)*2);Fp(NR);const PR=new Array(lT*2);Fp(PR);const DR=new Array(TR);Fp(DR);const OR=new Array(LR-QR+1);Fp(OR);const RR=new Array(oT);Fp(RR);const HR=new Array(lT);Fp(HR);const VR=(i,t,e,r)=>{let n=i&65535|0,s=i>>>16&65535|0,A=0;for(;e!==0;){A=e>2e3?2e3:e,e-=A;do n=n+t[r++]|0,s=s+n|0;while(--A);n%=65521,s%=65521}return n|s<<16|0};var Zx=VR;const WR=()=>{let i,t=[];for(var e=0;e<256;e++){i=e;for(var r=0;r<8;r++)i=i&1?3988292384^i>>>1:i>>>1;t[e]=i}return t},jR=new Uint32Array(WR()),KR=(i,t,e,r)=>{const n=jR,s=r+e;i^=-1;for(let A=r;A<s;A++)i=i>>>8^n[(i^t[A])&255];return i^-1};var Ia=KR,Jx={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},hT={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const GR=(i,t)=>Object.prototype.hasOwnProperty.call(i,t);var zR=function(i){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)GR(e,r)&&(i[r]=e[r])}}return i},qR=i=>{let t=0;for(let r=0,n=i.length;r<n;r++)t+=i[r].length;const e=new Uint8Array(t);for(let r=0,n=0,s=i.length;r<s;r++){let A=i[r];e.set(A,n),n+=A.length}return e},cT={assign:zR,flattenChunks:qR};let uT=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{uT=!1}const Q0=new Uint8Array(256);for(let i=0;i<256;i++)Q0[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;Q0[254]=Q0[254]=1;var XR=i=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(i);let t,e,r,n,s,A=i.length,a=0;for(n=0;n<A;n++)e=i.charCodeAt(n),(e&64512)===55296&&n+1<A&&(r=i.charCodeAt(n+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),n++)),a+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(a),s=0,n=0;s<a;n++)e=i.charCodeAt(n),(e&64512)===55296&&n+1<A&&(r=i.charCodeAt(n+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),n++)),e<128?t[s++]=e:e<2048?(t[s++]=192|e>>>6,t[s++]=128|e&63):e<65536?(t[s++]=224|e>>>12,t[s++]=128|e>>>6&63,t[s++]=128|e&63):(t[s++]=240|e>>>18,t[s++]=128|e>>>12&63,t[s++]=128|e>>>6&63,t[s++]=128|e&63);return t};const YR=(i,t)=>{if(t<65534&&i.subarray&&uT)return String.fromCharCode.apply(null,i.length===t?i:i.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(i[r]);return e};var $R=(i,t)=>{const e=t||i.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(i.subarray(0,t));let r,n;const s=new Array(e*2);for(n=0,r=0;r<e;){let A=i[r++];if(A<128){s[n++]=A;continue}let a=Q0[A];if(a>4){s[n++]=65533,r+=a-1;continue}for(A&=a===2?31:a===3?15:7;a>1&&r<e;)A=A<<6|i[r++]&63,a--;if(a>1){s[n++]=65533;continue}A<65536?s[n++]=A:(A-=65536,s[n++]=55296|A>>10&1023,s[n++]=56320|A&1023)}return YR(s,n)},ZR=(i,t)=>{t=t||i.length,t>i.length&&(t=i.length);let e=t-1;for(;e>=0&&(i[e]&192)===128;)e--;return e<0||e===0?t:e+Q0[i[e]]>t?e:t},tF={string2buf:XR,buf2string:$R,utf8border:ZR};function JR(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var tH=JR;const O1=16209,eH=16191;var rH=function(i,t){let e,r,n,s,A,a,o,l,h,u,f,d,g,m,y,w,b,C,S,k,I,N,D,Q;const K=i.state;e=i.next_in,D=i.input,r=e+(i.avail_in-5),n=i.next_out,Q=i.output,s=n-(t-i.avail_out),A=n+(i.avail_out-257),a=K.dmax,o=K.wsize,l=K.whave,h=K.wnext,u=K.window,f=K.hold,d=K.bits,g=K.lencode,m=K.distcode,y=(1<<K.lenbits)-1,w=(1<<K.distbits)-1;t:do{d<15&&(f+=D[e++]<<d,d+=8,f+=D[e++]<<d,d+=8),b=g[f&y];e:for(;;){if(C=b>>>24,f>>>=C,d-=C,C=b>>>16&255,C===0)Q[n++]=b&65535;else if(C&16){S=b&65535,C&=15,C&&(d<C&&(f+=D[e++]<<d,d+=8),S+=f&(1<<C)-1,f>>>=C,d-=C),d<15&&(f+=D[e++]<<d,d+=8,f+=D[e++]<<d,d+=8),b=m[f&w];r:for(;;){if(C=b>>>24,f>>>=C,d-=C,C=b>>>16&255,C&16){if(k=b&65535,C&=15,d<C&&(f+=D[e++]<<d,d+=8,d<C&&(f+=D[e++]<<d,d+=8)),k+=f&(1<<C)-1,k>a){i.msg="invalid distance too far back",K.mode=O1;break t}if(f>>>=C,d-=C,C=n-s,k>C){if(C=k-C,C>l&&K.sane){i.msg="invalid distance too far back",K.mode=O1;break t}if(I=0,N=u,h===0){if(I+=o-C,C<S){S-=C;do Q[n++]=u[I++];while(--C);I=n-k,N=Q}}else if(h<C){if(I+=o+h-C,C-=h,C<S){S-=C;do Q[n++]=u[I++];while(--C);if(I=0,h<S){C=h,S-=C;do Q[n++]=u[I++];while(--C);I=n-k,N=Q}}}else if(I+=h-C,C<S){S-=C;do Q[n++]=u[I++];while(--C);I=n-k,N=Q}for(;S>2;)Q[n++]=N[I++],Q[n++]=N[I++],Q[n++]=N[I++],S-=3;S&&(Q[n++]=N[I++],S>1&&(Q[n++]=N[I++]))}else{I=n-k;do Q[n++]=Q[I++],Q[n++]=Q[I++],Q[n++]=Q[I++],S-=3;while(S>2);S&&(Q[n++]=Q[I++],S>1&&(Q[n++]=Q[I++]))}}else if((C&64)===0){b=m[(b&65535)+(f&(1<<C)-1)];continue r}else{i.msg="invalid distance code",K.mode=O1;break t}break}}else if((C&64)===0){b=g[(b&65535)+(f&(1<<C)-1)];continue e}else if(C&32){K.mode=eH;break t}else{i.msg="invalid literal/length code",K.mode=O1;break t}break}}while(e<r&&n<A);S=d>>3,e-=S,d-=S<<3,f&=(1<<d)-1,i.next_in=e,i.next_out=n,i.avail_in=e<r?5+(r-e):5-(e-r),i.avail_out=n<A?257+(A-n):257-(n-A),K.hold=f,K.bits=d};const dd=15,x3=852,F3=592,S3=0,lB=1,E3=2,iH=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),nH=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),sH=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),AH=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),aH=(i,t,e,r,n,s,A,a)=>{const o=a.bits;let l=0,h=0,u=0,f=0,d=0,g=0,m=0,y=0,w=0,b=0,C,S,k,I,N,D=null,Q;const K=new Uint16Array(dd+1),L=new Uint16Array(dd+1);let O=null,W,R,tt;for(l=0;l<=dd;l++)K[l]=0;for(h=0;h<r;h++)K[t[e+h]]++;for(d=o,f=dd;f>=1&&K[f]===0;f--);if(d>f&&(d=f),f===0)return n[s++]=1<<24|64<<16|0,n[s++]=1<<24|64<<16|0,a.bits=1,0;for(u=1;u<f&&K[u]===0;u++);for(d<u&&(d=u),y=1,l=1;l<=dd;l++)if(y<<=1,y-=K[l],y<0)return-1;if(y>0&&(i===S3||f!==1))return-1;for(L[1]=0,l=1;l<dd;l++)L[l+1]=L[l]+K[l];for(h=0;h<r;h++)t[e+h]!==0&&(A[L[t[e+h]]++]=h);if(i===S3?(D=O=A,Q=20):i===lB?(D=iH,O=nH,Q=257):(D=sH,O=AH,Q=0),b=0,h=0,l=u,N=s,g=d,m=0,k=-1,w=1<<d,I=w-1,i===lB&&w>x3||i===E3&&w>F3)return 1;for(;;){W=l-m,A[h]+1<Q?(R=0,tt=A[h]):A[h]>=Q?(R=O[A[h]-Q],tt=D[A[h]-Q]):(R=96,tt=0),C=1<<l-m,S=1<<g,u=S;do S-=C,n[N+(b>>m)+S]=W<<24|R<<16|tt|0;while(S!==0);for(C=1<<l-1;b&C;)C>>=1;if(C!==0?(b&=C-1,b+=C):b=0,h++,--K[l]===0){if(l===f)break;l=t[e+A[h]]}if(l>d&&(b&I)!==k){for(m===0&&(m=d),N+=u,g=l-m,y=1<<g;g+m<f&&(y-=K[g+m],!(y<=0));)g++,y<<=1;if(w+=1<<g,i===lB&&w>x3||i===E3&&w>F3)return 1;k=b&I,n[k]=d<<24|g<<16|N-s|0}}return b!==0&&(n[N+b]=l-m<<24|64<<16|0),a.bits=d,0};var jm=aH;const oH=0,dT=1,fT=2,{Z_FINISH:k3,Z_BLOCK:lH,Z_TREES:R1,Z_OK:Mu,Z_STREAM_END:hH,Z_NEED_DICT:cH,Z_STREAM_ERROR:fa,Z_DATA_ERROR:pT,Z_MEM_ERROR:gT,Z_BUF_ERROR:uH,Z_DEFLATED:U3}=hT,Iy=16180,I3=16181,Q3=16182,L3=16183,_3=16184,M3=16185,T3=16186,N3=16187,P3=16188,D3=16189,Bv=16190,Eo=16191,hB=16192,O3=16193,cB=16194,R3=16195,H3=16196,V3=16197,W3=16198,H1=16199,V1=16200,j3=16201,K3=16202,G3=16203,z3=16204,q3=16205,uB=16206,X3=16207,Y3=16208,Nr=16209,mT=16210,wT=16211,dH=852,fH=592,pH=15,gH=pH,$3=i=>(i>>>24&255)+(i>>>8&65280)+((i&65280)<<8)+((i&255)<<24);function mH(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ou=i=>{if(!i)return 1;const t=i.state;return!t||t.strm!==i||t.mode<Iy||t.mode>wT?1:0},vT=i=>{if(Ou(i))return fa;const t=i.state;return i.total_in=i.total_out=t.total=0,i.msg="",t.wrap&&(i.adler=t.wrap&1),t.mode=Iy,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(dH),t.distcode=t.distdyn=new Int32Array(fH),t.sane=1,t.back=-1,Mu},yT=i=>{if(Ou(i))return fa;const t=i.state;return t.wsize=0,t.whave=0,t.wnext=0,vT(i)},bT=(i,t)=>{let e;if(Ou(i))return fa;const r=i.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?fa:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,yT(i))},BT=(i,t)=>{if(!i)return fa;const e=new mH;i.state=e,e.strm=i,e.window=null,e.mode=Iy;const r=bT(i,t);return r!==Mu&&(i.state=null),r},wH=i=>BT(i,gH);let Z3=!0,dB,fB;const vH=i=>{if(Z3){dB=new Int32Array(512),fB=new Int32Array(32);let t=0;for(;t<144;)i.lens[t++]=8;for(;t<256;)i.lens[t++]=9;for(;t<280;)i.lens[t++]=7;for(;t<288;)i.lens[t++]=8;for(jm(dT,i.lens,0,288,dB,0,i.work,{bits:9}),t=0;t<32;)i.lens[t++]=5;jm(fT,i.lens,0,32,fB,0,i.work,{bits:5}),Z3=!1}i.lencode=dB,i.lenbits=9,i.distcode=fB,i.distbits=5},CT=(i,t,e,r)=>{let n;const s=i.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(e-s.wsize,e),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>r&&(n=r),s.window.set(t.subarray(e-r,e-r+n),s.wnext),r-=n,r?(s.window.set(t.subarray(e-r,e),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0},yH=(i,t)=>{let e,r,n,s,A,a,o,l,h,u,f,d,g,m,y=0,w,b,C,S,k,I,N,D;const Q=new Uint8Array(4);let K,L;const O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ou(i)||!i.output||!i.input&&i.avail_in!==0)return fa;e=i.state,e.mode===Eo&&(e.mode=hB),A=i.next_out,n=i.output,o=i.avail_out,s=i.next_in,r=i.input,a=i.avail_in,l=e.hold,h=e.bits,u=a,f=o,D=Mu;t:for(;;)switch(e.mode){case Iy:if(e.wrap===0){e.mode=hB;break}for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&2&&l===35615){e.wbits===0&&(e.wbits=15),e.check=0,Q[0]=l&255,Q[1]=l>>>8&255,e.check=Ia(e.check,Q,2,0),l=0,h=0,e.mode=I3;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((l&255)<<8)+(l>>8))%31){i.msg="incorrect header check",e.mode=Nr;break}if((l&15)!==U3){i.msg="unknown compression method",e.mode=Nr;break}if(l>>>=4,h-=4,N=(l&15)+8,e.wbits===0&&(e.wbits=N),N>15||N>e.wbits){i.msg="invalid window size",e.mode=Nr;break}e.dmax=1<<e.wbits,e.flags=0,i.adler=e.check=1,e.mode=l&512?D3:Eo,l=0,h=0;break;case I3:for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.flags=l,(e.flags&255)!==U3){i.msg="unknown compression method",e.mode=Nr;break}if(e.flags&57344){i.msg="unknown header flags set",e.mode=Nr;break}e.head&&(e.head.text=l>>8&1),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=Ia(e.check,Q,2,0)),l=0,h=0,e.mode=Q3;case Q3:for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.head&&(e.head.time=l),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,Q[2]=l>>>16&255,Q[3]=l>>>24&255,e.check=Ia(e.check,Q,4,0)),l=0,h=0,e.mode=L3;case L3:for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.head&&(e.head.xflags=l&255,e.head.os=l>>8),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=Ia(e.check,Q,2,0)),l=0,h=0,e.mode=_3;case _3:if(e.flags&1024){for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.length=l,e.head&&(e.head.extra_len=l),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=Ia(e.check,Q,2,0)),l=0,h=0}else e.head&&(e.head.extra=null);e.mode=M3;case M3:if(e.flags&1024&&(d=e.length,d>a&&(d=a),d&&(e.head&&(N=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(s,s+d),N)),e.flags&512&&e.wrap&4&&(e.check=Ia(e.check,r,d,s)),a-=d,s+=d,e.length-=d),e.length))break t;e.length=0,e.mode=T3;case T3:if(e.flags&2048){if(a===0)break t;d=0;do N=r[s+d++],e.head&&N&&e.length<65536&&(e.head.name+=String.fromCharCode(N));while(N&&d<a);if(e.flags&512&&e.wrap&4&&(e.check=Ia(e.check,r,d,s)),a-=d,s+=d,N)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=N3;case N3:if(e.flags&4096){if(a===0)break t;d=0;do N=r[s+d++],e.head&&N&&e.length<65536&&(e.head.comment+=String.fromCharCode(N));while(N&&d<a);if(e.flags&512&&e.wrap&4&&(e.check=Ia(e.check,r,d,s)),a-=d,s+=d,N)break t}else e.head&&(e.head.comment=null);e.mode=P3;case P3:if(e.flags&512){for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&4&&l!==(e.check&65535)){i.msg="header crc mismatch",e.mode=Nr;break}l=0,h=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),i.adler=e.check=0,e.mode=Eo;break;case D3:for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}i.adler=e.check=$3(l),l=0,h=0,e.mode=Bv;case Bv:if(e.havedict===0)return i.next_out=A,i.avail_out=o,i.next_in=s,i.avail_in=a,e.hold=l,e.bits=h,cH;i.adler=e.check=1,e.mode=Eo;case Eo:if(t===lH||t===R1)break t;case hB:if(e.last){l>>>=h&7,h-=h&7,e.mode=uB;break}for(;h<3;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}switch(e.last=l&1,l>>>=1,h-=1,l&3){case 0:e.mode=O3;break;case 1:if(vH(e),e.mode=H1,t===R1){l>>>=2,h-=2;break t}break;case 2:e.mode=H3;break;case 3:i.msg="invalid block type",e.mode=Nr}l>>>=2,h-=2;break;case O3:for(l>>>=h&7,h-=h&7;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if((l&65535)!==(l>>>16^65535)){i.msg="invalid stored block lengths",e.mode=Nr;break}if(e.length=l&65535,l=0,h=0,e.mode=cB,t===R1)break t;case cB:e.mode=R3;case R3:if(d=e.length,d){if(d>a&&(d=a),d>o&&(d=o),d===0)break t;n.set(r.subarray(s,s+d),A),a-=d,s+=d,o-=d,A+=d,e.length-=d;break}e.mode=Eo;break;case H3:for(;h<14;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.nlen=(l&31)+257,l>>>=5,h-=5,e.ndist=(l&31)+1,l>>>=5,h-=5,e.ncode=(l&15)+4,l>>>=4,h-=4,e.nlen>286||e.ndist>30){i.msg="too many length or distance symbols",e.mode=Nr;break}e.have=0,e.mode=V3;case V3:for(;e.have<e.ncode;){for(;h<3;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.lens[O[e.have++]]=l&7,l>>>=3,h-=3}for(;e.have<19;)e.lens[O[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,K={bits:e.lenbits},D=jm(oH,e.lens,0,19,e.lencode,0,e.work,K),e.lenbits=K.bits,D){i.msg="invalid code lengths set",e.mode=Nr;break}e.have=0,e.mode=W3;case W3:for(;e.have<e.nlen+e.ndist;){for(;y=e.lencode[l&(1<<e.lenbits)-1],w=y>>>24,b=y>>>16&255,C=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(C<16)l>>>=w,h-=w,e.lens[e.have++]=C;else{if(C===16){for(L=w+2;h<L;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(l>>>=w,h-=w,e.have===0){i.msg="invalid bit length repeat",e.mode=Nr;break}N=e.lens[e.have-1],d=3+(l&3),l>>>=2,h-=2}else if(C===17){for(L=w+3;h<L;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=w,h-=w,N=0,d=3+(l&7),l>>>=3,h-=3}else{for(L=w+7;h<L;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=w,h-=w,N=0,d=11+(l&127),l>>>=7,h-=7}if(e.have+d>e.nlen+e.ndist){i.msg="invalid bit length repeat",e.mode=Nr;break}for(;d--;)e.lens[e.have++]=N}}if(e.mode===Nr)break;if(e.lens[256]===0){i.msg="invalid code -- missing end-of-block",e.mode=Nr;break}if(e.lenbits=9,K={bits:e.lenbits},D=jm(dT,e.lens,0,e.nlen,e.lencode,0,e.work,K),e.lenbits=K.bits,D){i.msg="invalid literal/lengths set",e.mode=Nr;break}if(e.distbits=6,e.distcode=e.distdyn,K={bits:e.distbits},D=jm(fT,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,K),e.distbits=K.bits,D){i.msg="invalid distances set",e.mode=Nr;break}if(e.mode=H1,t===R1)break t;case H1:e.mode=V1;case V1:if(a>=6&&o>=258){i.next_out=A,i.avail_out=o,i.next_in=s,i.avail_in=a,e.hold=l,e.bits=h,rH(i,f),A=i.next_out,n=i.output,o=i.avail_out,s=i.next_in,r=i.input,a=i.avail_in,l=e.hold,h=e.bits,e.mode===Eo&&(e.back=-1);break}for(e.back=0;y=e.lencode[l&(1<<e.lenbits)-1],w=y>>>24,b=y>>>16&255,C=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(b&&(b&240)===0){for(S=w,k=b,I=C;y=e.lencode[I+((l&(1<<S+k)-1)>>S)],w=y>>>24,b=y>>>16&255,C=y&65535,!(S+w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=S,h-=S,e.back+=S}if(l>>>=w,h-=w,e.back+=w,e.length=C,b===0){e.mode=q3;break}if(b&32){e.back=-1,e.mode=Eo;break}if(b&64){i.msg="invalid literal/length code",e.mode=Nr;break}e.extra=b&15,e.mode=j3;case j3:if(e.extra){for(L=e.extra;h<L;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.length+=l&(1<<e.extra)-1,l>>>=e.extra,h-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=K3;case K3:for(;y=e.distcode[l&(1<<e.distbits)-1],w=y>>>24,b=y>>>16&255,C=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if((b&240)===0){for(S=w,k=b,I=C;y=e.distcode[I+((l&(1<<S+k)-1)>>S)],w=y>>>24,b=y>>>16&255,C=y&65535,!(S+w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=S,h-=S,e.back+=S}if(l>>>=w,h-=w,e.back+=w,b&64){i.msg="invalid distance code",e.mode=Nr;break}e.offset=C,e.extra=b&15,e.mode=G3;case G3:if(e.extra){for(L=e.extra;h<L;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.offset+=l&(1<<e.extra)-1,l>>>=e.extra,h-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){i.msg="invalid distance too far back",e.mode=Nr;break}e.mode=z3;case z3:if(o===0)break t;if(d=f-o,e.offset>d){if(d=e.offset-d,d>e.whave&&e.sane){i.msg="invalid distance too far back",e.mode=Nr;break}d>e.wnext?(d-=e.wnext,g=e.wsize-d):g=e.wnext-d,d>e.length&&(d=e.length),m=e.window}else m=n,g=A-e.offset,d=e.length;d>o&&(d=o),o-=d,e.length-=d;do n[A++]=m[g++];while(--d);e.length===0&&(e.mode=V1);break;case q3:if(o===0)break t;n[A++]=e.length,o--,e.mode=V1;break;case uB:if(e.wrap){for(;h<32;){if(a===0)break t;a--,l|=r[s++]<<h,h+=8}if(f-=o,i.total_out+=f,e.total+=f,e.wrap&4&&f&&(i.adler=e.check=e.flags?Ia(e.check,n,f,A-f):Zx(e.check,n,f,A-f)),f=o,e.wrap&4&&(e.flags?l:$3(l))!==e.check){i.msg="incorrect data check",e.mode=Nr;break}l=0,h=0}e.mode=X3;case X3:if(e.wrap&&e.flags){for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&4&&l!==(e.total&4294967295)){i.msg="incorrect length check",e.mode=Nr;break}l=0,h=0}e.mode=Y3;case Y3:D=hH;break t;case Nr:D=pT;break t;case mT:return gT;case wT:default:return fa}return i.next_out=A,i.avail_out=o,i.next_in=s,i.avail_in=a,e.hold=l,e.bits=h,(e.wsize||f!==i.avail_out&&e.mode<Nr&&(e.mode<uB||t!==k3))&&CT(i,i.output,i.next_out,f-i.avail_out),u-=i.avail_in,f-=i.avail_out,i.total_in+=u,i.total_out+=f,e.total+=f,e.wrap&4&&f&&(i.adler=e.check=e.flags?Ia(e.check,n,f,i.next_out-f):Zx(e.check,n,f,i.next_out-f)),i.data_type=e.bits+(e.last?64:0)+(e.mode===Eo?128:0)+(e.mode===H1||e.mode===cB?256:0),(u===0&&f===0||t===k3)&&D===Mu&&(D=uH),D},bH=i=>{if(Ou(i))return fa;let t=i.state;return t.window&&(t.window=null),i.state=null,Mu},BH=(i,t)=>{if(Ou(i))return fa;const e=i.state;return(e.wrap&2)===0?fa:(e.head=t,t.done=!1,Mu)},CH=(i,t)=>{const e=t.length;let r,n,s;return Ou(i)||(r=i.state,r.wrap!==0&&r.mode!==Bv)?fa:r.mode===Bv&&(n=1,n=Zx(n,t,e,0),n!==r.check)?pT:(s=CT(i,t,e,e),s?(r.mode=mT,gT):(r.havedict=1,Mu))};var xH=yT,FH=bT,SH=vT,EH=wH,kH=BT,UH=yH,IH=bH,QH=BH,LH=CH,_H="pako inflate (from Nodeca project)",tl={inflateReset:xH,inflateReset2:FH,inflateResetKeep:SH,inflateInit:EH,inflateInit2:kH,inflate:UH,inflateEnd:IH,inflateGetHeader:QH,inflateSetDictionary:LH,inflateInfo:_H};function MH(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var TH=MH;const xT=Object.prototype.toString,{Z_NO_FLUSH:NH,Z_FINISH:PH,Z_OK:L0,Z_STREAM_END:pB,Z_NEED_DICT:gB,Z_STREAM_ERROR:DH,Z_DATA_ERROR:J3,Z_MEM_ERROR:OH}=hT;function V0(i){this.options=cT.assign({chunkSize:1024*64,windowBits:15,to:""},i||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(i&&i.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new tH,this.strm.avail_out=0;let e=tl.inflateInit2(this.strm,t.windowBits);if(e!==L0)throw new Error(Jx[e]);if(this.header=new TH,tl.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=tF.string2buf(t.dictionary):xT.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=tl.inflateSetDictionary(this.strm,t.dictionary),e!==L0)))throw new Error(Jx[e])}V0.prototype.push=function(i,t){const e=this.strm,r=this.options.chunkSize,n=this.options.dictionary;let s,A,a;if(this.ended)return!1;for(t===~~t?A=t:A=t===!0?PH:NH,xT.call(i)==="[object ArrayBuffer]"?e.input=new Uint8Array(i):e.input=i,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),s=tl.inflate(e,A),s===gB&&n&&(s=tl.inflateSetDictionary(e,n),s===L0?s=tl.inflate(e,A):s===J3&&(s=gB));e.avail_in>0&&s===pB&&e.state.wrap>0&&i[e.next_in]!==0;)tl.inflateReset(e),s=tl.inflate(e,A);switch(s){case DH:case J3:case gB:case OH:return this.onEnd(s),this.ended=!0,!1}if(a=e.avail_out,e.next_out&&(e.avail_out===0||s===pB))if(this.options.to==="string"){let o=tF.utf8border(e.output,e.next_out),l=e.next_out-o,h=tF.buf2string(e.output,o);e.next_out=l,e.avail_out=r-l,l&&e.output.set(e.output.subarray(o,o+l),0),this.onData(h)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(s===L0&&a===0)){if(s===pB)return s=tl.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};V0.prototype.onData=function(i){this.chunks.push(i)};V0.prototype.onEnd=function(i){i===L0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=cT.flattenChunks(this.chunks)),this.chunks=[],this.err=i,this.msg=this.strm.msg};function RH(i,t){const e=new V0(t);if(e.push(i),e.err)throw e.msg||Jx[e.err];return e.result}var HH=V0,VH=RH,WH={Inflate:HH,inflate:VH};const{Inflate:jH,inflate:KH}=WH;var tk=jH,GH=KH;const FT=[];for(let i=0;i<256;i++){let t=i;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t=t>>>1;FT[i]=t}const ek=4294967295;function zH(i,t,e){let r=i;for(let n=0;n<e;n++)r=FT[(r^t[n])&255]^r>>>8;return r}function qH(i,t){return(zH(ek,i,t)^ek)>>>0}function rk(i,t,e){const r=i.readUint32(),n=qH(new Uint8Array(i.buffer,i.byteOffset+i.offset-t-4,t),t);if(n!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${n}`)}function ST(i,t,e){for(let r=0;r<e;r++)t[r]=i[r]}function ET(i,t,e,r){let n=0;for(;n<r;n++)t[n]=i[n];for(;n<e;n++)t[n]=i[n]+t[n-r]&255}function kT(i,t,e,r){let n=0;if(e.length===0)for(;n<r;n++)t[n]=i[n];else for(;n<r;n++)t[n]=i[n]+e[n]&255}function UT(i,t,e,r,n){let s=0;if(e.length===0){for(;s<n;s++)t[s]=i[s];for(;s<r;s++)t[s]=i[s]+(t[s-n]>>1)&255}else{for(;s<n;s++)t[s]=i[s]+(e[s]>>1)&255;for(;s<r;s++)t[s]=i[s]+(t[s-n]+e[s]>>1)&255}}function IT(i,t,e,r,n){let s=0;if(e.length===0){for(;s<n;s++)t[s]=i[s];for(;s<r;s++)t[s]=i[s]+t[s-n]&255}else{for(;s<n;s++)t[s]=i[s]+e[s]&255;for(;s<r;s++)t[s]=i[s]+XH(t[s-n],e[s],e[s-n])&255}}function XH(i,t,e){const r=i+t-e,n=Math.abs(r-i),s=Math.abs(r-t),A=Math.abs(r-e);return n<=s&&n<=A?i:s<=A?t:e}function YH(i,t,e,r,n,s){switch(i){case 0:ST(t,e,n);break;case 1:ET(t,e,n,s);break;case 2:kT(t,e,r,n);break;case 3:UT(t,e,r,n,s);break;case 4:IT(t,e,r,n,s);break;default:throw new Error(`Unsupported filter: ${i}`)}}const $H=new Uint16Array([255]),ZH=new Uint8Array($H.buffer),JH=ZH[0]===255;function t7(i){const{data:t,width:e,height:r,channels:n,depth:s}=i,A=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],a=Math.ceil(s/8)*n,o=new Uint8Array(r*e*a);let l=0;for(let h=0;h<7;h++){const u=A[h],f=Math.ceil((e-u.x)/u.xStep),d=Math.ceil((r-u.y)/u.yStep);if(f<=0||d<=0)continue;const g=f*a,m=new Uint8Array(g);for(let y=0;y<d;y++){const w=t[l++],b=t.subarray(l,l+g);l+=g;const C=new Uint8Array(g);YH(w,b,C,m,g,a),m.set(C);for(let S=0;S<f;S++){const k=u.x+S*u.xStep,I=u.y+y*u.yStep;if(!(k>=e||I>=r))for(let N=0;N<a;N++)o[(I*e+k)*a+N]=C[S*a+N]}}}if(s===16){const h=new Uint16Array(o.buffer);if(JH)for(let u=0;u<h.length;u++)h[u]=e7(h[u]);return h}else return o}function e7(i){return(i&255)<<8|i>>8&255}const r7=new Uint16Array([255]),i7=new Uint8Array(r7.buffer),n7=i7[0]===255,s7=new Uint8Array(0);function ik(i){const{data:t,width:e,height:r,channels:n,depth:s}=i,A=Math.ceil(s/8)*n,a=Math.ceil(s/8*n*e),o=new Uint8Array(r*a);let l=s7,h=0,u,f;for(let d=0;d<r;d++){switch(u=t.subarray(h+1,h+1+a),f=o.subarray(d*a,(d+1)*a),t[h]){case 0:ST(u,f,a);break;case 1:ET(u,f,a,A);break;case 2:kT(u,f,l,a);break;case 3:UT(u,f,l,a,A);break;case 4:IT(u,f,l,a,A);break;default:throw new Error(`Unsupported filter: ${t[h]}`)}l=f,h+=a+1}if(s===16){const d=new Uint16Array(o.buffer);if(n7)for(let g=0;g<d.length;g++)d[g]=A7(d[g]);return d}else return o}function A7(i){return(i&255)<<8|i>>8&255}const Nw=Uint8Array.of(137,80,78,71,13,10,26,10);function nk(i){if(!a7(i.readBytes(Nw.length)))throw new Error("wrong PNG signature")}function a7(i){if(i.length<Nw.length)return!1;for(let t=0;t<Nw.length;t++)if(i[t]!==Nw[t])return!1;return!0}const o7="tEXt",l7=0,QT=new TextDecoder("latin1");function h7(i){if(u7(i),i.length===0||i.length>79)throw new Error("keyword length must be between 1 and 79")}const c7=/^[\u0000-\u00FF]*$/;function u7(i){if(!c7.test(i))throw new Error("invalid latin1 text")}function d7(i,t,e){const r=LT(t);i[r]=f7(t,e-r.length-1)}function LT(i){for(i.mark();i.readByte()!==l7;);const t=i.offset;i.reset();const e=QT.decode(i.readBytes(t-i.offset-1));return i.skip(1),h7(e),e}function f7(i,t){return QT.decode(i.readBytes(t))}const Ks={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},mB={UNKNOWN:-1,DEFLATE:0},sk={UNKNOWN:-1,ADAPTIVE:0},wB={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},W1={NONE:0,BACKGROUND:1,PREVIOUS:2},vB={SOURCE:0,OVER:1};class p7 extends US{constructor(t,e={}){super(t),ut(this,"_checkCrc"),ut(this,"_inflator"),ut(this,"_png"),ut(this,"_apng"),ut(this,"_end"),ut(this,"_hasPalette"),ut(this,"_palette"),ut(this,"_hasTransparency"),ut(this,"_transparency"),ut(this,"_compressionMethod"),ut(this,"_filterMethod"),ut(this,"_interlaceMethod"),ut(this,"_colorType"),ut(this,"_isAnimated"),ut(this,"_numberOfFrames"),ut(this,"_numberOfPlays"),ut(this,"_frames"),ut(this,"_writingDataChunks");const{checkCrc:r=!1}=e;this._checkCrc=r,this._inflator=new tk,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=mB.UNKNOWN,this._filterMethod=sk.UNKNOWN,this._interlaceMethod=wB.UNKNOWN,this._colorType=Ks.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(nk(this);!this._end;){const t=this.readUint32(),e=this.readChars(4);this.decodeChunk(t,e)}return this.decodeImage(),this._png}decodeApng(){for(nk(this);!this._end;){const t=this.readUint32(),e=this.readChars(4);this.decodeApngChunk(t,e)}return this.decodeApngImage(),this._apng}decodeChunk(t,e){const r=this.offset;switch(e){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case o7:d7(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-r!==t)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?rk(this,t+4,e):this.skip(4)}decodeApngChunk(t,e){const r=this.offset;switch(e!=="fdAT"&&e!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),e){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,e),this.offset=r+t;break}if(this.offset-r!==t)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?rk(this,t+4,e):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=g7(this.readUint8());const e=this.readUint8();this._colorType=e;let r;switch(e){case Ks.GREYSCALE:r=1;break;case Ks.TRUECOLOUR:r=3;break;case Ks.INDEXED_COLOUR:r=1;break;case Ks.GREYSCALE_ALPHA:r=2;break;case Ks.TRUECOLOUR_ALPHA:r=4;break;case Ks.UNKNOWN:default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=r,this._compressionMethod=this.readUint8(),this._compressionMethod!==mB.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const e=t/3;this._hasPalette=!0;const r=[];this._palette=r;for(let n=0;n<e;n++)r.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const e=t,r=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,r,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let e=t,r=this.offset+this.byteOffset;if(r+=4,e-=4,this._inflator.push(new Uint8Array(this.buffer,r,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case Ks.GREYSCALE:case Ks.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let e=0;e<t/2;e++)this._transparency[e]=this.readUint16();break}case Ks.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let e=0;for(;e<t;e++){const r=this.readByte();this._palette[e].push(r)}for(;e<this._palette.length;e++)this._palette[e].push(255);break}case Ks.UNKNOWN:case Ks.GREYSCALE_ALPHA:case Ks.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const e=LT(this),r=this.readUint8();if(r!==mB.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${r}`);const n=this.readBytes(t-e.length-2);this._png.iccEmbeddedProfile={name:e,profile:GH(n)}}decodepHYs(){const t=this.readUint32(),e=this.readUint32(),r=this.readByte();this._png.resolution={x:t,y:e,unit:r}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const e={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},r=this._frames.at(t);if(r){if(r.data=ik({data:r.data,width:r.width,height:r.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||r.xOffset===0&&r.yOffset===0&&r.width===this._png.width&&r.height===this._png.height)e.data=r.data;else{const n=this._apng.frames.at(t-1);this.disposeFrame(r,n,e),this.addFrameDataToCanvas(e,r)}this._apng.frames.push(e)}}return this._apng}disposeFrame(t,e,r){switch(t.disposeOp){case W1.NONE:break;case W1.BACKGROUND:for(let n=0;n<this._png.height;n++)for(let s=0;s<this._png.width;s++){const A=(n*t.width+s)*this._png.channels;for(let a=0;a<this._png.channels;a++)r.data[A+a]=0}break;case W1.PREVIOUS:r.data.set(e.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,e){const r=1<<this._png.depth,n=(s,A)=>{const a=((s+e.yOffset)*this._png.width+e.xOffset+A)*this._png.channels,o=(s*e.width+A)*this._png.channels;return{index:a,frameIndex:o}};switch(e.blendOp){case vB.SOURCE:for(let s=0;s<e.height;s++)for(let A=0;A<e.width;A++){const{index:a,frameIndex:o}=n(s,A);for(let l=0;l<this._png.channels;l++)t.data[a+l]=e.data[o+l]}break;case vB.OVER:for(let s=0;s<e.height;s++)for(let A=0;A<e.width;A++){const{index:a,frameIndex:o}=n(s,A);for(let l=0;l<this._png.channels;l++){const h=e.data[o+this._png.channels-1]/r,u=l%(this._png.channels-1)===0?1:e.data[o+l],f=Math.floor(h*u+(1-h)*t.data[a+l]);t.data[a+l]+=f}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var t;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?((t=this._frames)==null?void 0:t.at(0)).data:this._inflator.result;if(this._filterMethod!==sk.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===wB.NO_INTERLACE)this._png.data=ik({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===wB.ADAM7)this._png.data=t7({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,e=this._frames.at(-1);e?e.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:W1.NONE,blendOp:vB.SOURCE,data:t}),this._inflator=new tk,this._writingDataChunks=!1}}function g7(i){if(i!==1&&i!==2&&i!==4&&i!==8&&i!==16)throw new Error(`invalid bit depth: ${i}`);return i}var Ak;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.METRE=1]="METRE"})(Ak||(Ak={}));function m7(i,t){return new p7(i,t).decode()}/** @license
|
|
3
|
-
*
|
|
4
|
-
* jsPDF - PDF Document creation from JavaScript
|
|
5
|
-
* Version 4.2.1 Built on 2026-03-17T11:11:27.057Z
|
|
6
|
-
* CommitID 00000000
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) 2010-2025 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
|
9
|
-
* 2015-2025 yWorks GmbH, http://www.yworks.com
|
|
10
|
-
* 2015-2025 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
|
|
11
|
-
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
|
|
12
|
-
* 2010 Aaron Spike, https://github.com/acspike
|
|
13
|
-
* 2012 Willow Systems Corporation, https://github.com/willowsystems
|
|
14
|
-
* 2012 Pablo Hess, https://github.com/pablohess
|
|
15
|
-
* 2012 Florian Jenett, https://github.com/fjenett
|
|
16
|
-
* 2013 Warren Weckesser, https://github.com/warrenweckesser
|
|
17
|
-
* 2013 Youssef Beddad, https://github.com/lifof
|
|
18
|
-
* 2013 Lee Driscoll, https://github.com/lsdriscoll
|
|
19
|
-
* 2013 Stefan Slonevskiy, https://github.com/stefslon
|
|
20
|
-
* 2013 Jeremy Morel, https://github.com/jmorel
|
|
21
|
-
* 2013 Christoph Hartmann, https://github.com/chris-rock
|
|
22
|
-
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
|
|
23
|
-
* 2014 James Makes, https://github.com/dollaruw
|
|
24
|
-
* 2014 Diego Casorran, https://github.com/diegocr
|
|
25
|
-
* 2014 Steven Spungin, https://github.com/Flamenco
|
|
26
|
-
* 2014 Kenneth Glassey, https://github.com/Gavvers
|
|
27
|
-
*
|
|
28
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
29
|
-
* a copy of this software and associated documentation files (the
|
|
30
|
-
* "Software"), to deal in the Software without restriction, including
|
|
31
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
32
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
33
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
34
|
-
* the following conditions:
|
|
35
|
-
*
|
|
36
|
-
* The above copyright notice and this permission notice shall be
|
|
37
|
-
* included in all copies or substantial portions of the Software.
|
|
38
|
-
*
|
|
39
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
40
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
41
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
42
|
-
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
43
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
44
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
45
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
46
|
-
*
|
|
47
|
-
* Contributor(s):
|
|
48
|
-
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
|
|
49
|
-
* kim3er, mfo, alnorth, Flamenco
|
|
50
|
-
*/var xe=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function yB(){xe.console&&typeof xe.console.log=="function"&&xe.console.log.apply(xe.console,arguments)}var vr={log:yB,warn:function(i){xe.console&&(typeof xe.console.warn=="function"?xe.console.warn.apply(xe.console,arguments):yB.call(null,arguments))},error:function(i){xe.console&&(typeof xe.console.error=="function"?xe.console.error.apply(xe.console,arguments):yB(i))}};function bB(i,t,e){var r=new XMLHttpRequest;r.open("GET",i),r.responseType="blob",r.onload=function(){fc(r.response,t,e)},r.onerror=function(){vr.error("could not download file")},r.send()}function ak(i){var t=new XMLHttpRequest;t.open("HEAD",i,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function j1(i){try{i.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),i.dispatchEvent(t)}}var fc=xe.saveAs||((typeof window>"u"?"undefined":Ze(window))!=="object"||window!==xe?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(i,t,e){var r=xe.URL||xe.webkitURL,n=document.createElement("a");t=t||i.name||"download",n.download=t,n.rel="noopener",typeof i=="string"?(n.href=i,n.origin!==location.origin?ak(n.href)?bB(i,t,e):j1(n,n.target="_blank"):j1(n)):(n.href=r.createObjectURL(i),setTimeout(function(){r.revokeObjectURL(n.href)},4e4),setTimeout(function(){j1(n)},0))}:"msSaveOrOpenBlob"in navigator?function(i,t,e){if(t=t||i.name||"download",typeof i=="string")if(ak(i))bB(i,t,e);else{var r=document.createElement("a");r.href=i,r.target="_blank",setTimeout(function(){j1(r)})}else navigator.msSaveOrOpenBlob((function(n,s){return s===void 0?s={autoBom:!1}:Ze(s)!=="object"&&(vr.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n})(i,e),t)}:function(i,t,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof i=="string")return bB(i,t,e);var n=i.type==="application/octet-stream",s=/constructor/i.test(xe.HTMLElement)||xe.safari,A=/CriOS\/[\d]+/.test(navigator.userAgent);if((A||n&&s)&&(typeof FileReader>"u"?"undefined":Ze(FileReader))==="object"){var a=new FileReader;a.onloadend=function(){var h=a.result;h=A?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=h:location=h,r=null},a.readAsDataURL(i)}else{var o=xe.URL||xe.webkitURL,l=o.createObjectURL(i);r?r.location=l:location.href=l,r=null,setTimeout(function(){o.revokeObjectURL(l)},4e4)}});/**
|
|
51
|
-
* A class to parse color values
|
|
52
|
-
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
53
|
-
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
54
|
-
* @license Use it if you like it
|
|
55
|
-
*/function _T(i){var t;i=i||"",this.ok=!1,i.charAt(0)=="#"&&(i=i.substr(1,6)),i={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[i=(i=i.replace(/ /g,"")).toLowerCase()]||i;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],r=0;r<e.length;r++){var n=e[r].re,s=e[r].process,A=n.exec(i);A&&(t=s(A),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),o=this.g.toString(16),l=this.b.toString(16);return a.length==1&&(a="0"+a),o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),"#"+a+o+l}}var Pw=xe.atob.bind(xe),ok=xe.btoa.bind(xe);/**
|
|
56
|
-
* @license
|
|
57
|
-
* Joseph Myers does not specify a particular license for his work.
|
|
58
|
-
*
|
|
59
|
-
* Author: Joseph Myers
|
|
60
|
-
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
61
|
-
*
|
|
62
|
-
* Modified by: Owen Leong
|
|
63
|
-
*/function BB(i,t){var e=i[0],r=i[1],n=i[2],s=i[3];e=Ln(e,r,n,s,t[0],7,-680876936),s=Ln(s,e,r,n,t[1],12,-389564586),n=Ln(n,s,e,r,t[2],17,606105819),r=Ln(r,n,s,e,t[3],22,-1044525330),e=Ln(e,r,n,s,t[4],7,-176418897),s=Ln(s,e,r,n,t[5],12,1200080426),n=Ln(n,s,e,r,t[6],17,-1473231341),r=Ln(r,n,s,e,t[7],22,-45705983),e=Ln(e,r,n,s,t[8],7,1770035416),s=Ln(s,e,r,n,t[9],12,-1958414417),n=Ln(n,s,e,r,t[10],17,-42063),r=Ln(r,n,s,e,t[11],22,-1990404162),e=Ln(e,r,n,s,t[12],7,1804603682),s=Ln(s,e,r,n,t[13],12,-40341101),n=Ln(n,s,e,r,t[14],17,-1502002290),e=_n(e,r=Ln(r,n,s,e,t[15],22,1236535329),n,s,t[1],5,-165796510),s=_n(s,e,r,n,t[6],9,-1069501632),n=_n(n,s,e,r,t[11],14,643717713),r=_n(r,n,s,e,t[0],20,-373897302),e=_n(e,r,n,s,t[5],5,-701558691),s=_n(s,e,r,n,t[10],9,38016083),n=_n(n,s,e,r,t[15],14,-660478335),r=_n(r,n,s,e,t[4],20,-405537848),e=_n(e,r,n,s,t[9],5,568446438),s=_n(s,e,r,n,t[14],9,-1019803690),n=_n(n,s,e,r,t[3],14,-187363961),r=_n(r,n,s,e,t[8],20,1163531501),e=_n(e,r,n,s,t[13],5,-1444681467),s=_n(s,e,r,n,t[2],9,-51403784),n=_n(n,s,e,r,t[7],14,1735328473),e=Mn(e,r=_n(r,n,s,e,t[12],20,-1926607734),n,s,t[5],4,-378558),s=Mn(s,e,r,n,t[8],11,-2022574463),n=Mn(n,s,e,r,t[11],16,1839030562),r=Mn(r,n,s,e,t[14],23,-35309556),e=Mn(e,r,n,s,t[1],4,-1530992060),s=Mn(s,e,r,n,t[4],11,1272893353),n=Mn(n,s,e,r,t[7],16,-155497632),r=Mn(r,n,s,e,t[10],23,-1094730640),e=Mn(e,r,n,s,t[13],4,681279174),s=Mn(s,e,r,n,t[0],11,-358537222),n=Mn(n,s,e,r,t[3],16,-722521979),r=Mn(r,n,s,e,t[6],23,76029189),e=Mn(e,r,n,s,t[9],4,-640364487),s=Mn(s,e,r,n,t[12],11,-421815835),n=Mn(n,s,e,r,t[15],16,530742520),e=Tn(e,r=Mn(r,n,s,e,t[2],23,-995338651),n,s,t[0],6,-198630844),s=Tn(s,e,r,n,t[7],10,1126891415),n=Tn(n,s,e,r,t[14],15,-1416354905),r=Tn(r,n,s,e,t[5],21,-57434055),e=Tn(e,r,n,s,t[12],6,1700485571),s=Tn(s,e,r,n,t[3],10,-1894986606),n=Tn(n,s,e,r,t[10],15,-1051523),r=Tn(r,n,s,e,t[1],21,-2054922799),e=Tn(e,r,n,s,t[8],6,1873313359),s=Tn(s,e,r,n,t[15],10,-30611744),n=Tn(n,s,e,r,t[6],15,-1560198380),r=Tn(r,n,s,e,t[13],21,1309151649),e=Tn(e,r,n,s,t[4],6,-145523070),s=Tn(s,e,r,n,t[11],10,-1120210379),n=Tn(n,s,e,r,t[2],15,718787259),r=Tn(r,n,s,e,t[9],21,-343485551),i[0]=kh(e,i[0]),i[1]=kh(r,i[1]),i[2]=kh(n,i[2]),i[3]=kh(s,i[3])}function Qy(i,t,e,r,n,s){return t=kh(kh(t,i),kh(r,s)),kh(t<<n|t>>>32-n,e)}function Ln(i,t,e,r,n,s,A){return Qy(t&e|~t&r,i,t,n,s,A)}function _n(i,t,e,r,n,s,A){return Qy(t&r|e&~r,i,t,n,s,A)}function Mn(i,t,e,r,n,s,A){return Qy(t^e^r,i,t,n,s,A)}function Tn(i,t,e,r,n,s,A){return Qy(e^(t|~r),i,t,n,s,A)}function MT(i){var t,e=i.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=i.length;t+=64)BB(r,w7(i.substring(t-64,t)));i=i.substring(t-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i.length;t++)n[t>>2]|=i.charCodeAt(t)<<(t%4<<3);if(n[t>>2]|=128<<(t%4<<3),t>55)for(BB(r,n),t=0;t<16;t++)n[t]=0;return n[14]=8*e,BB(r,n),r}function w7(i){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=i.charCodeAt(t)+(i.charCodeAt(t+1)<<8)+(i.charCodeAt(t+2)<<16)+(i.charCodeAt(t+3)<<24);return e}var lk="0123456789abcdef".split("");function v7(i){for(var t="",e=0;e<4;e++)t+=lk[i>>8*e+4&15]+lk[i>>8*e&15];return t}function y7(i){return String.fromCharCode(255&i,(65280&i)>>8,(16711680&i)>>16,(4278190080&i)>>24)}function eF(i){return MT(i).map(y7).join("")}var b7=(function(i){for(var t=0;t<i.length;t++)i[t]=v7(i[t]);return i.join("")})(MT("hello"))!="5d41402abc4b2a76b9719d911017c592";function kh(i,t){if(b7){var e=(65535&i)+(65535&t);return(i>>16)+(t>>16)+(e>>16)<<16|65535&e}return i+t&4294967295}/**
|
|
64
|
-
* @license
|
|
65
|
-
* FPDF is released under a permissive license: there is no usage restriction.
|
|
66
|
-
* You may embed it freely in your application (commercial or not), with or
|
|
67
|
-
* without modifications.
|
|
68
|
-
*
|
|
69
|
-
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
70
|
-
*/function rF(i,t){var e,r,n,s;if(i!==e){for(var A=(n=i,s=1+(256/i.length|0),new Array(s+1).join(n)),a=[],o=0;o<256;o++)a[o]=o;var l=0;for(o=0;o<256;o++){var h=a[o];l=(l+h+A.charCodeAt(o))%256,a[o]=a[l],a[l]=h}e=i,r=a}else a=r;var u=t.length,f=0,d=0,g="";for(o=0;o<u;o++)d=(d+(h=a[f=(f+1)%256]))%256,a[f]=a[d],a[d]=h,A=a[(a[f]+a[d])%256],g+=String.fromCharCode(t.charCodeAt(o)^A);return g}/**
|
|
71
|
-
* @license
|
|
72
|
-
* Licensed under the MIT License.
|
|
73
|
-
* http://opensource.org/licenses/mit-license
|
|
74
|
-
* Author: Owen Leong (@owenl131)
|
|
75
|
-
* Date: 15 Oct 2020
|
|
76
|
-
* References:
|
|
77
|
-
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
78
|
-
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
79
|
-
* http://www.fpdf.org/en/script/script37.php
|
|
80
|
-
*/var hk={print:4,modify:8,copy:16,"annot-forms":32};function kd(i,t,e,r){this.v=1,this.r=2;var n=192;i.forEach(function(a){if(hk.perm!==void 0)throw new Error("Invalid permission: "+a);n+=hk[a]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(t+this.padding).substr(0,32),A=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,A),this.P=-(1+(255^n)),this.encryptionKey=eF(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=rF(this.encryptionKey,this.padding)}function Ud(i){if(/[^\u0000-\u00ff]/.test(i))throw new Error("Invalid PDF Name Object: "+i+", Only accept ASCII characters.");for(var t="",e=i.length,r=0;r<e;r++){var n=i.charCodeAt(r);t+=n<33||n===35||n===37||n===40||n===41||n===47||n===60||n===62||n===91||n===93||n===123||n===125||n>126?"#"+("0"+n.toString(16)).slice(-2):i[r]}return t}function ck(i){if(Ze(i)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,r,n){if(n=n||!1,typeof e!="string"||typeof r!="function"||typeof n!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var s=Math.random().toString(35);return t[e][s]=[r,!!n],s},this.unsubscribe=function(e){for(var r in t)if(t[r][e])return delete t[r][e],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),n=[];for(var s in t[e]){var A=t[e][s];try{A[0].apply(i,r)}catch(a){xe.console&&vr.error("jsPDF PubSub Error",a.message,a)}A[1]&&n.push(s)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function Tu(i){if(!(this instanceof Tu))return new Tu(i);var t="opacity,stroke-opacity".split(",");for(var e in i)i.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=i[e]);this.id="",this.objectNumber=-1}function TT(i,t){this.gState=i,this.matrix=t,this.id="",this.objectNumber=-1}function gh(i,t,e,r,n){if(!(this instanceof gh))return new gh(i,t,e,r,n);this.type=i==="axial"?2:3,this.coords=t,this.colors=e,TT.call(this,r,n)}function fu(i,t,e,r,n){if(!(this instanceof fu))return new fu(i,t,e,r,n);this.boundingBox=i,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,TT.call(this,r,n)}function ue(i){var t,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],n=arguments[2],s=arguments[3],A=[],a=1,o=16,l="S",h=null;Ze(i=i||{})==="object"&&(e=i.orientation,r=i.unit||r,n=i.format||n,s=i.compress||i.compressPdf||s,(h=i.encryption||null)!==null&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),a=typeof i.userUnit=="number"?Math.abs(i.userUnit):1,i.precision!==void 0&&(t=i.precision),i.floatPrecision!==void 0&&(o=i.floatPrecision),l=i.defaultPathOperation||"S"),A=i.filters||(s===!0?["FlateEncode"]:A),r=r||"mm",e=(""+(e||"P")).toLowerCase();var u=i.putOnlyUsedFonts||!1,f={},d={internal:{},__private__:{}};d.__private__.PubSub=ck;var g="1.3",m=d.__private__.getPdfVersion=function(){return g};d.__private__.setPdfVersion=function(B){g=B};var y={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return y};var w=d.__private__.getPageFormat=function(B){return y[B]};n=n||"a4";var b="compat",C="advanced",S=b;function k(){this.saveGraphicsState(),q(new qt(ne,0,0,-ne,0,Zh()*ne).toString()+" cm"),this.setFontSize(this.getFontSize()/ne),l="n",S=C}function I(){this.restoreGraphicsState(),l="S",S=b}var N=d.__private__.combineFontStyleAndFontWeight=function(B,T){if(B=="bold"&&T=="normal"||B=="bold"&&T==400||B=="normal"&&T=="italic"||B=="bold"&&T=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return T&&(B=T==400||T==="normal"?B==="italic"?"italic":"normal":T!=700&&T!=="bold"||B!=="normal"?(T==700?"bold":T)+""+B:"bold"),B};d.advancedAPI=function(B){var T=S===b;return T&&k.call(this),typeof B!="function"||(B(this),T&&I.call(this)),this},d.compatAPI=function(B){var T=S===C;return T&&I.call(this),typeof B!="function"||(B(this),T&&k.call(this)),this},d.isAdvancedAPI=function(){return S===C};var D,Q=function(B){if(S!==C)throw new Error(B+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},K=d.roundToPrecision=d.__private__.roundToPrecision=function(B,T){var Y=t||T;if(isNaN(B)||isNaN(Y))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return B.toFixed(Y).replace(/0+$/,"")};D=d.hpf=d.__private__.hpf=typeof o=="number"?function(B){if(isNaN(B))throw new Error("Invalid argument passed to jsPDF.hpf");return K(B,o)}:o==="smart"?function(B){if(isNaN(B))throw new Error("Invalid argument passed to jsPDF.hpf");return K(B,B>-1&&B<1?16:5)}:function(B){if(isNaN(B))throw new Error("Invalid argument passed to jsPDF.hpf");return K(B,16)};var L=d.f2=d.__private__.f2=function(B){if(isNaN(B))throw new Error("Invalid argument passed to jsPDF.f2");return K(B,2)},O=d.__private__.f3=function(B){if(isNaN(B))throw new Error("Invalid argument passed to jsPDF.f3");return K(B,3)},W=d.scale=d.__private__.scale=function(B){if(isNaN(B))throw new Error("Invalid argument passed to jsPDF.scale");return S===b?B*ne:S===C?B:void 0},R=function(B){return W((function(T){return S===b?Zh()-T:S===C?T:void 0})(B))};d.__private__.setPrecision=d.setPrecision=function(B){typeof parseInt(B,10)=="number"&&(t=parseInt(B,10))};var tt,et="00000000000000000000000000000000",st=d.__private__.getFileId=function(){return et},nt=d.__private__.setFileId=function(B){return et=B!==void 0&&/^[a-fA-F0-9]{32}$/.test(B)?B.toUpperCase():et.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),h!==null&&(sn=new kd(h.userPermissions,h.userPassword,h.ownerPassword,et)),et};d.setFileId=function(B){return nt(B),this},d.getFileId=function(){return st()};var at=d.__private__.convertDateToPDFDate=function(B){var T=B.getTimezoneOffset(),Y=T<0?"+":"-",At=Math.floor(Math.abs(T/60)),dt=Math.abs(T%60),bt=[Y,X(At),"'",X(dt),"'"].join("");return["D:",B.getFullYear(),X(B.getMonth()+1),X(B.getDate()),X(B.getHours()),X(B.getMinutes()),X(B.getSeconds()),bt].join("")},ft=d.__private__.convertPDFDateToDate=function(B){var T=parseInt(B.substr(2,4),10),Y=parseInt(B.substr(6,2),10)-1,At=parseInt(B.substr(8,2),10),dt=parseInt(B.substr(10,2),10),bt=parseInt(B.substr(12,2),10),Ut=parseInt(B.substr(14,2),10);return new Date(T,Y,At,dt,bt,Ut,0)},ht=d.__private__.setCreationDate=function(B){var T;if(B===void 0&&(B=new Date),B instanceof Date)T=at(B);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(B))throw new Error("Invalid argument passed to jsPDF.setCreationDate");T=B}return tt=T},M=d.__private__.getCreationDate=function(B){var T=tt;return B==="jsDate"&&(T=ft(tt)),T};d.setCreationDate=function(B){return ht(B),this},d.getCreationDate=function(B){return M(B)};var G,X=d.__private__.padd2=function(B){return("0"+parseInt(B)).slice(-2)},rt=d.__private__.padd2Hex=function(B){return("00"+(B=B.toString())).substr(B.length)},it=0,ot=[],gt=[],vt=0,yt=[],St=[],Dt=!1,Tt=gt;d.__private__.setCustomOutputDestination=function(B){Dt=!0,Tt=B};var jt=function(B){Dt||(Tt=B)};d.__private__.resetCustomOutputDestination=function(){Dt=!1,Tt=gt};var q=d.__private__.out=function(B){return B=B.toString(),vt+=B.length+1,Tt.push(B),Tt},Mt=d.__private__.write=function(B){return q(arguments.length===1?B.toString():Array.prototype.join.call(arguments," "))},fe=d.__private__.getArrayBuffer=function(B){for(var T=B.length,Y=new ArrayBuffer(T),At=new Uint8Array(Y);T--;)At[T]=B.charCodeAt(T);return Y},Zt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return Zt};var Et=i.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(B){return Et=S===C?B/ne:B,this};var re,Ot=d.__private__.getFontSize=d.getFontSize=function(){return S===b?Et:Et*ne},zt=i.R2L||!1;d.__private__.setR2L=d.setR2L=function(B){return zt=B,this},d.__private__.getR2L=d.getR2L=function(){return zt};var Yt,xt=d.__private__.setZoomMode=function(B){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(B))re=B;else if(isNaN(B)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(B)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+B+'" is not recognized.');re=B}else re=parseInt(B,10)};d.__private__.getZoomMode=function(){return re};var Rt,Ht=d.__private__.setPageMode=function(B){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(B)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+B+'" is not recognized.');Yt=B};d.__private__.getPageMode=function(){return Yt};var Kt=d.__private__.setLayoutMode=function(B){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(B)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+B+'" is not recognized.');Rt=B};d.__private__.getLayoutMode=function(){return Rt},d.__private__.setDisplayMode=d.setDisplayMode=function(B,T,Y){return xt(B),Kt(T),Ht(Y),this};var te={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(B){if(Object.keys(te).indexOf(B)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return te[B]},d.__private__.getDocumentProperties=function(){return te},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(B){for(var T in te)te.hasOwnProperty(T)&&B[T]&&(te[T]=B[T]);return this},d.__private__.setDocumentProperty=function(B,T){if(Object.keys(te).indexOf(B)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return te[B]=T};var Wt,ne,Gt,Ve,Te,be={},Be={},ze=[],Ae={},Ne={},le={},ye={},Ye=null,we=0,ve=[],je=new ck(d),co=i.hotfixes||[],Yr={},OA={},aA=[],qt=function B(T,Y,At,dt,bt,Ut){if(!(this instanceof B))return new B(T,Y,At,dt,bt,Ut);isNaN(T)&&(T=1),isNaN(Y)&&(Y=0),isNaN(At)&&(At=0),isNaN(dt)&&(dt=1),isNaN(bt)&&(bt=0),isNaN(Ut)&&(Ut=0),this._matrix=[T,Y,At,dt,bt,Ut]};Object.defineProperty(qt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(B){this._matrix[0]=B}}),Object.defineProperty(qt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(B){this._matrix[1]=B}}),Object.defineProperty(qt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(B){this._matrix[2]=B}}),Object.defineProperty(qt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(B){this._matrix[3]=B}}),Object.defineProperty(qt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(B){this._matrix[4]=B}}),Object.defineProperty(qt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(B){this._matrix[5]=B}}),Object.defineProperty(qt.prototype,"a",{get:function(){return this._matrix[0]},set:function(B){this._matrix[0]=B}}),Object.defineProperty(qt.prototype,"b",{get:function(){return this._matrix[1]},set:function(B){this._matrix[1]=B}}),Object.defineProperty(qt.prototype,"c",{get:function(){return this._matrix[2]},set:function(B){this._matrix[2]=B}}),Object.defineProperty(qt.prototype,"d",{get:function(){return this._matrix[3]},set:function(B){this._matrix[3]=B}}),Object.defineProperty(qt.prototype,"e",{get:function(){return this._matrix[4]},set:function(B){this._matrix[4]=B}}),Object.defineProperty(qt.prototype,"f",{get:function(){return this._matrix[5]},set:function(B){this._matrix[5]=B}}),Object.defineProperty(qt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(qt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(qt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(qt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),qt.prototype.join=function(B){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(D).join(B)},qt.prototype.multiply=function(B){var T=B.sx*this.sx+B.shy*this.shx,Y=B.sx*this.shy+B.shy*this.sy,At=B.shx*this.sx+B.sy*this.shx,dt=B.shx*this.shy+B.sy*this.sy,bt=B.tx*this.sx+B.ty*this.shx+this.tx,Ut=B.tx*this.shy+B.ty*this.sy+this.ty;return new qt(T,Y,At,dt,bt,Ut)},qt.prototype.decompose=function(){var B=this.sx,T=this.shy,Y=this.shx,At=this.sy,dt=this.tx,bt=this.ty,Ut=Math.sqrt(B*B+T*T),ae=(B/=Ut)*Y+(T/=Ut)*At;Y-=B*ae,At-=T*ae;var se=Math.sqrt(Y*Y+At*At);return ae/=se,B*(At/=se)<T*(Y/=se)&&(B=-B,T=-T,ae=-ae,Ut=-Ut),{scale:new qt(Ut,0,0,se,0,0),translate:new qt(1,0,0,1,dt,bt),rotate:new qt(B,T,-T,B,0,0),skew:new qt(1,0,ae,1,0,0)}},qt.prototype.toString=function(B){return this.join(" ")},qt.prototype.inversed=function(){var B=this.sx,T=this.shy,Y=this.shx,At=this.sy,dt=this.tx,bt=this.ty,Ut=1/(B*At-T*Y),ae=At*Ut,se=-T*Ut,Ee=-Y*Ut,Ie=B*Ut;return new qt(ae,se,Ee,Ie,-ae*dt-Ee*bt,-se*dt-Ie*bt)},qt.prototype.applyToPoint=function(B){var T=B.x*this.sx+B.y*this.shx+this.tx,Y=B.x*this.shy+B.y*this.sy+this.ty;return new $h(T,Y)},qt.prototype.applyToRectangle=function(B){var T=this.applyToPoint(B),Y=this.applyToPoint(new $h(B.x+B.w,B.y+B.h));return new Np(T.x,T.y,Y.x-T.x,Y.y-T.y)},qt.prototype.clone=function(){var B=this.sx,T=this.shy,Y=this.shx,At=this.sy,dt=this.tx,bt=this.ty;return new qt(B,T,Y,At,dt,bt)},d.Matrix=qt;var Fn=d.matrixMult=function(B,T){return T.multiply(B)},RA=new qt(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=RA;var qn=function(B,T){if(!Ne[B]){var Y=(T instanceof gh?"Sh":"P")+(Object.keys(Ae).length+1).toString(10);T.id=Y,Ne[B]=Y,Ae[Y]=T,je.publish("addPattern",T)}};d.ShadingPattern=gh,d.TilingPattern=fu,d.addShadingPattern=function(B,T){return Q("addShadingPattern()"),qn(B,T),this},d.beginTilingPattern=function(B){Q("beginTilingPattern()"),Pp(B.boundingBox[0],B.boundingBox[1],B.boundingBox[2]-B.boundingBox[0],B.boundingBox[3]-B.boundingBox[1],B.matrix)},d.endTilingPattern=function(B,T){Q("endTilingPattern()"),T.stream=St[G].join(`
|
|
81
|
-
`),qn(B,T),je.publish("endTilingPattern",T),aA.pop().restore()};var Sn,Er=d.__private__.newObject=function(){var B=oi();return Hi(B,!0),B},oi=d.__private__.newObjectDeferred=function(){return it++,ot[it]=function(){return vt},it},Hi=function(B,T){return T=typeof T=="boolean"&&T,ot[B]=vt,T&&q(B+" 0 obj"),B},Xn=d.__private__.newAdditionalObject=function(){var B={objId:oi(),content:""};return yt.push(B),B},En=oi(),gs=oi(),Ns=d.__private__.decodeColorString=function(B){var T=B.split(" ");if(T.length!==2||T[1]!=="g"&&T[1]!=="G")T.length!==5||T[4]!=="k"&&T[4]!=="K"||(T=[(1-T[0])*(1-T[3]),(1-T[1])*(1-T[3]),(1-T[2])*(1-T[3]),"r"]);else{var Y=parseFloat(T[0]);T=[Y,Y,Y,"r"]}for(var At="#",dt=0;dt<3;dt++)At+=("0"+Math.floor(255*parseFloat(T[dt])).toString(16)).slice(-2);return At},ms=d.__private__.encodeColorString=function(B){var T;typeof B=="string"&&(B={ch1:B});var Y=B.ch1,At=B.ch2,dt=B.ch3,bt=B.ch4,Ut=B.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Y=="string"&&Y.charAt(0)!=="#"){var ae=new _T(Y);if(ae.ok)Y=ae.toHex();else if(!/^\d*\.?\d*$/.test(Y))throw new Error('Invalid color "'+Y+'" passed to jsPDF.encodeColorString.')}if(typeof Y=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Y)&&(Y="#"+Y[1]+Y[1]+Y[2]+Y[2]+Y[3]+Y[3]),typeof Y=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Y)){var se=parseInt(Y.substr(1),16);Y=se>>16&255,At=se>>8&255,dt=255&se}if(At===void 0||bt===void 0&&Y===At&&At===dt)T=typeof Y=="string"?Y+" "+Ut[0]:B.precision===2?L(Y/255)+" "+Ut[0]:O(Y/255)+" "+Ut[0];else if(bt===void 0||Ze(bt)==="object"){if(bt&&!isNaN(bt.a)&&bt.a===0)return["1.","1.","1.",Ut[1]].join(" ");T=typeof Y=="string"?[Y,At,dt,Ut[1]].join(" "):B.precision===2?[L(Y/255),L(At/255),L(dt/255),Ut[1]].join(" "):[O(Y/255),O(At/255),O(dt/255),Ut[1]].join(" ")}else T=typeof Y=="string"?[Y,At,dt,bt,Ut[2]].join(" "):B.precision===2?[L(Y),L(At),L(dt),L(bt),Ut[2]].join(" "):[O(Y),O(At),O(dt),O(bt),Ut[2]].join(" ");return T},kn=d.__private__.getFilters=function(){return A},Zi=d.__private__.putStream=function(B){var T=(B=B||{}).data||"",Y=B.filters||kn(),At=B.alreadyAppliedFilters||[],dt=B.addLength1||!1,bt=T.length,Ut=B.objectId,ae=function(kr){return kr};if(h!==null&&Ut===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");h!==null&&(ae=sn.encryptor(Ut,0));var se={};Y===!0&&(Y=["FlateEncode"]);var Ee=B.additionalKeyValues||[],Ie=(se=ue.API.processDataByFilters!==void 0?ue.API.processDataByFilters(T,Y):{data:T,reverseChain:[]}).reverseChain+(Array.isArray(At)?At.join(" "):At.toString());if(se.data.length!==0&&(Ee.push({key:"Length",value:se.data.length}),dt===!0&&Ee.push({key:"Length1",value:bt})),Ie.length!=0)if(Ie.split("/").length-1==1)Ee.push({key:"Filter",value:Ie});else{Ee.push({key:"Filter",value:"["+Ie+"]"});for(var Ke=0;Ke<Ee.length;Ke+=1)if(Ee[Ke].key==="DecodeParms"){for(var ki=[],dr=0;dr<se.reverseChain.split("/").length-1;dr+=1)ki.push("null");ki.push(Ee[Ke].value),Ee[Ke].value="["+ki.join(" ")+"]"}}q("<<");for(var Ar=0;Ar<Ee.length;Ar++)q("/"+Ee[Ar].key+" "+Ee[Ar].value);q(">>"),se.data.length!==0&&(q("stream"),q(ae(se.data)),q("endstream"))},oA=d.__private__.putPage=function(B){var T=B.number,Y=B.data,At=B.objId,dt=B.contentsObjId;Hi(At,!0),q("<</Type /Page"),q("/Parent "+B.rootDictionaryObjId+" 0 R"),q("/Resources "+B.resourceDictionaryObjId+" 0 R"),q("/MediaBox ["+parseFloat(D(B.mediaBox.bottomLeftX))+" "+parseFloat(D(B.mediaBox.bottomLeftY))+" "+D(B.mediaBox.topRightX)+" "+D(B.mediaBox.topRightY)+"]"),B.cropBox!==null&&q("/CropBox ["+D(B.cropBox.bottomLeftX)+" "+D(B.cropBox.bottomLeftY)+" "+D(B.cropBox.topRightX)+" "+D(B.cropBox.topRightY)+"]"),B.bleedBox!==null&&q("/BleedBox ["+D(B.bleedBox.bottomLeftX)+" "+D(B.bleedBox.bottomLeftY)+" "+D(B.bleedBox.topRightX)+" "+D(B.bleedBox.topRightY)+"]"),B.trimBox!==null&&q("/TrimBox ["+D(B.trimBox.bottomLeftX)+" "+D(B.trimBox.bottomLeftY)+" "+D(B.trimBox.topRightX)+" "+D(B.trimBox.topRightY)+"]"),B.artBox!==null&&q("/ArtBox ["+D(B.artBox.bottomLeftX)+" "+D(B.artBox.bottomLeftY)+" "+D(B.artBox.topRightX)+" "+D(B.artBox.topRightY)+"]"),typeof B.userUnit=="number"&&B.userUnit!==1&&q("/UserUnit "+B.userUnit),je.publish("putPage",{objId:At,pageContext:ve[T],pageNumber:T,page:Y}),q("/Contents "+dt+" 0 R"),q(">>"),q("endobj");var bt=Y.join(`
|
|
82
|
-
`);return S===C&&(bt+=`
|
|
83
|
-
Q`),Hi(dt,!0),Zi({data:bt,filters:kn(),objectId:dt}),q("endobj"),At},Ei=d.__private__.putPages=function(){var B,T,Y=[];for(B=1;B<=we;B++)ve[B].objId=oi(),ve[B].contentsObjId=oi();for(B=1;B<=we;B++)Y.push(oA({number:B,data:St[B],objId:ve[B].objId,contentsObjId:ve[B].contentsObjId,mediaBox:ve[B].mediaBox,cropBox:ve[B].cropBox,bleedBox:ve[B].bleedBox,trimBox:ve[B].trimBox,artBox:ve[B].artBox,userUnit:ve[B].userUnit,rootDictionaryObjId:En,resourceDictionaryObjId:gs}));Hi(En,!0),q("<</Type /Pages");var At="/Kids [";for(T=0;T<we;T++)At+=Y[T]+" 0 R ";q(At+"]"),q("/Count "+we),q(">>"),q("endobj"),je.publish("postPutPages")},Ba=function(B){je.publish("putFont",{font:B,out:q,newObject:Er,putStream:Zi}),B.isAlreadyPutted!==!0&&(B.objectNumber=Er(),q("<<"),q("/Type /Font"),q("/BaseFont /"+Ud(B.postScriptName)),q("/Subtype /Type1"),typeof B.encoding=="string"&&q("/Encoding /"+B.encoding),q("/FirstChar 32"),q("/LastChar 255"),q(">>"),q("endobj"))},uo=function(B){B.objectNumber=Er();var T=[];T.push({key:"Type",value:"/XObject"}),T.push({key:"Subtype",value:"/Form"}),T.push({key:"BBox",value:"["+[D(B.x),D(B.y),D(B.x+B.width),D(B.y+B.height)].join(" ")+"]"}),T.push({key:"Matrix",value:"["+B.matrix.toString()+"]"});var Y=B.pages[1].join(`
|
|
84
|
-
`);Zi({data:Y,additionalKeyValues:T,objectId:B.objectNumber}),q("endobj")},Cl=function(B,T){T||(T=21);var Y=Er(),At=(function(Ut,ae){var se,Ee=[],Ie=1/(ae-1);for(se=0;se<1;se+=Ie)Ee.push(se);if(Ee.push(1),Ut[0].offset!=0){var Ke={offset:0,color:Ut[0].color};Ut.unshift(Ke)}if(Ut[Ut.length-1].offset!=1){var ki={offset:1,color:Ut[Ut.length-1].color};Ut.push(ki)}for(var dr="",Ar=0,kr=0;kr<Ee.length;kr++){for(se=Ee[kr];se>Ut[Ar+1].offset;)Ar++;var Kr=Ut[Ar].offset,Gr=(se-Kr)/(Ut[Ar+1].offset-Kr),$n=Ut[Ar].color,yo=Ut[Ar+1].color;dr+=rt(Math.round((1-Gr)*$n[0]+Gr*yo[0]).toString(16))+rt(Math.round((1-Gr)*$n[1]+Gr*yo[1]).toString(16))+rt(Math.round((1-Gr)*$n[2]+Gr*yo[2]).toString(16))}return dr.trim()})(B.colors,T),dt=[];dt.push({key:"FunctionType",value:"0"}),dt.push({key:"Domain",value:"[0.0 1.0]"}),dt.push({key:"Size",value:"["+T+"]"}),dt.push({key:"BitsPerSample",value:"8"}),dt.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),dt.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Zi({data:At,additionalKeyValues:dt,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Y}),q("endobj"),B.objectNumber=Er(),q("<< /ShadingType "+B.type),q("/ColorSpace /DeviceRGB");var bt="/Coords ["+D(parseFloat(B.coords[0]))+" "+D(parseFloat(B.coords[1]))+" ";B.type===2?bt+=D(parseFloat(B.coords[2]))+" "+D(parseFloat(B.coords[3])):bt+=D(parseFloat(B.coords[2]))+" "+D(parseFloat(B.coords[3]))+" "+D(parseFloat(B.coords[4]))+" "+D(parseFloat(B.coords[5])),q(bt+="]"),B.matrix&&q("/Matrix ["+B.matrix.toString()+"]"),q("/Function "+Y+" 0 R"),q("/Extend [true true]"),q(">>"),q("endobj")},fo=function(B,T){var Y=oi(),At=Er();T.push({resourcesOid:Y,objectOid:At}),B.objectNumber=At;var dt=[];dt.push({key:"Type",value:"/Pattern"}),dt.push({key:"PatternType",value:"1"}),dt.push({key:"PaintType",value:"1"}),dt.push({key:"TilingType",value:"1"}),dt.push({key:"BBox",value:"["+B.boundingBox.map(D).join(" ")+"]"}),dt.push({key:"XStep",value:D(B.xStep)}),dt.push({key:"YStep",value:D(B.yStep)}),dt.push({key:"Resources",value:Y+" 0 R"}),B.matrix&&dt.push({key:"Matrix",value:"["+B.matrix.toString()+"]"}),Zi({data:B.stream,additionalKeyValues:dt,objectId:B.objectNumber}),q("endobj")},zu=function(B){for(var T in B.objectNumber=Er(),q("<<"),B)switch(T){case"opacity":q("/ca "+L(B[T]));break;case"stroke-opacity":q("/CA "+L(B[T]))}q(">>"),q("endobj")},Ca=function(B){Hi(B.resourcesOid,!0),q("<<"),q("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var T in q("/Font <<"),be)be.hasOwnProperty(T)&&(u===!1||u===!0&&f.hasOwnProperty(T))&&q("/"+T+" "+be[T].objectNumber+" 0 R");q(">>")})(),(function(){if(Object.keys(Ae).length>0){for(var T in q("/Shading <<"),Ae)Ae.hasOwnProperty(T)&&Ae[T]instanceof gh&&Ae[T].objectNumber>=0&&q("/"+T+" "+Ae[T].objectNumber+" 0 R");je.publish("putShadingPatternDict"),q(">>")}})(),(function(T){if(Object.keys(Ae).length>0){for(var Y in q("/Pattern <<"),Ae)Ae.hasOwnProperty(Y)&&Ae[Y]instanceof d.TilingPattern&&Ae[Y].objectNumber>=0&&Ae[Y].objectNumber<T&&q("/"+Y+" "+Ae[Y].objectNumber+" 0 R");je.publish("putTilingPatternDict"),q(">>")}})(B.objectOid),(function(){if(Object.keys(le).length>0){var T;for(T in q("/ExtGState <<"),le)le.hasOwnProperty(T)&&le[T].objectNumber>=0&&q("/"+T+" "+le[T].objectNumber+" 0 R");je.publish("putGStateDict"),q(">>")}})(),(function(){for(var T in q("/XObject <<"),Yr)Yr.hasOwnProperty(T)&&Yr[T].objectNumber>=0&&q("/"+T+" "+Yr[T].objectNumber+" 0 R");je.publish("putXobjectDict"),q(">>")})(),q(">>"),q("endobj")},HA=function(B){Be[B.fontName]=Be[B.fontName]||{},Be[B.fontName][B.fontStyle]=B.id},$=function(B,T,Y,At,dt){var bt={id:"F"+(Object.keys(be).length+1).toString(10),postScriptName:B,fontName:T,fontStyle:Y,encoding:At,isStandardFont:dt||!1,metadata:{}};return je.publish("addFont",{font:bt,instance:this}),be[bt.id]=bt,HA(bt),bt.id},kt=d.__private__.pdfEscape=d.pdfEscape=function(B,T){return(function(Y,At){var dt,bt,Ut,ae,se,Ee,Ie,Ke,ki;if(Ut=(At=At||{}).sourceEncoding||"Unicode",se=At.outputEncoding,(At.autoencode||se)&&be[Wt].metadata&&be[Wt].metadata[Ut]&&be[Wt].metadata[Ut].encoding&&(ae=be[Wt].metadata[Ut].encoding,!se&&be[Wt].encoding&&(se=be[Wt].encoding),!se&&ae.codePages&&(se=ae.codePages[0]),typeof se=="string"&&(se=ae[se]),se)){for(Ie=!1,Ee=[],dt=0,bt=Y.length;dt<bt;dt++)(Ke=se[Y.charCodeAt(dt)])?Ee.push(String.fromCharCode(Ke)):Ee.push(Y[dt]),Ee[dt].charCodeAt(0)>>8&&(Ie=!0);Y=Ee.join("")}for(dt=Y.length;Ie===void 0&&dt!==0;)Y.charCodeAt(dt-1)>>8&&(Ie=!0),dt--;if(!Ie)return Y;for(Ee=At.noBOM?[]:[254,255],dt=0,bt=Y.length;dt<bt;dt++){if((ki=(Ke=Y.charCodeAt(dt))>>8)>>8)throw new Error("Character at position "+dt+" of string '"+Y+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Ee.push(ki),Ee.push(Ke-(ki<<8))}return String.fromCharCode.apply(void 0,Ee)})(B,T).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pt=d.__private__.beginPage=function(B){St[++we]=[],ve[we]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(B[0]),topRightY:Number(B[1])}},Je(we),jt(St[G])},Fe=function(B,T){var Y,At,dt;switch(e=T||e,typeof B=="string"&&(Y=w(B.toLowerCase()),Array.isArray(Y)&&(At=Y[0],dt=Y[1])),Array.isArray(B)&&(At=B[0]*ne,dt=B[1]*ne),isNaN(At)&&(At=n[0],dt=n[1]),(At>14400||dt>14400)&&(vr.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),At=Math.min(14400,At),dt=Math.min(14400,dt)),n=[At,dt],e.substr(0,1)){case"l":dt>At&&(n=[dt,At]);break;case"p":At>dt&&(n=[dt,At])}Pt(n),Tb(Ce),q(Ju),Mp!==0&&q(Mp+" J"),Sl!==0&&q(Sl+" j"),je.publish("addPage",{pageNumber:we})},Re=function(B){B>0&&B<=we&&(St.splice(B,1),ve.splice(B,1),we--,G>we&&(G=we),this.setPage(G))},Je=function(B){B>0&&B<=we&&(G=B)},ws=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return St.length-1},Yn=function(B,T,Y){var At,dt=void 0;return Y=Y||{},B=B!==void 0?B:be[Wt].fontName,T=T!==void 0?T:be[Wt].fontStyle,At=B.toLowerCase(),Be[At]!==void 0&&Be[At][T]!==void 0?dt=Be[At][T]:Be[B]!==void 0&&Be[B][T]!==void 0?dt=Be[B][T]:Y.disableWarning===!1&&vr.warn("Unable to look up font label for font '"+B+"', '"+T+"'. Refer to getFontList() for available fonts."),dt||Y.noFallback||(dt=Be.times[T])==null&&(dt=Be.times.normal),dt},$r=d.__private__.putInfo=function(){var B=Er(),T=function(At){return At};for(var Y in h!==null&&(T=sn.encryptor(B,0)),q("<<"),q("/Producer ("+kt(T("jsPDF "+ue.version))+")"),te)te.hasOwnProperty(Y)&&te[Y]&&q("/"+Y.substr(0,1).toUpperCase()+Y.substr(1)+" ("+kt(T(te[Y]))+")");q("/CreationDate ("+kt(T(tt))+")"),q(">>"),q("endobj")},Ps=d.__private__.putCatalog=function(B){var T=(B=B||{}).rootDictionaryObjId||En;switch(Er(),q("<<"),q("/Type /Catalog"),q("/Pages "+T+" 0 R"),re||(re="fullwidth"),re){case"fullwidth":q("/OpenAction [3 0 R /FitH null]");break;case"fullheight":q("/OpenAction [3 0 R /FitV null]");break;case"fullpage":q("/OpenAction [3 0 R /Fit]");break;case"original":q("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Y=""+re;Y.substr(Y.length-1)==="%"&&(re=parseInt(re)/100),typeof re=="number"&&q("/OpenAction [3 0 R /XYZ null null "+L(re)+"]")}switch(Rt||(Rt="continuous"),Rt){case"continuous":q("/PageLayout /OneColumn");break;case"single":q("/PageLayout /SinglePage");break;case"two":case"twoleft":q("/PageLayout /TwoColumnLeft");break;case"tworight":q("/PageLayout /TwoColumnRight")}Yt&&q("/PageMode /"+Yt),je.publish("putCatalog"),q(">>"),q("endobj")},Zr=d.__private__.putTrailer=function(){q("trailer"),q("<<"),q("/Size "+(it+1)),q("/Root "+it+" 0 R"),q("/Info "+(it-1)+" 0 R"),h!==null&&q("/Encrypt "+sn.oid+" 0 R"),q("/ID [ <"+et+"> <"+et+"> ]"),q(">>")},jr=d.__private__.putHeader=function(){q("%PDF-"+g),q("%ºß¬à")},qu=d.__private__.putXRef=function(){var B="0000000000";q("xref"),q("0 "+(it+1)),q("0000000000 65535 f ");for(var T=1;T<=it;T++)typeof ot[T]=="function"?q((B+ot[T]()).slice(-10)+" 00000 n "):ot[T]!==void 0?q((B+ot[T]).slice(-10)+" 00000 n "):q("0000000000 00000 n ")},xa=d.__private__.buildDocument=function(){var B;it=0,vt=0,gt=[],ot=[],yt=[],En=oi(),gs=oi(),jt(gt),je.publish("buildDocument"),jr(),Ei(),(function(){je.publish("putAdditionalObjects");for(var Y=0;Y<yt.length;Y++){var At=yt[Y];Hi(At.objId,!0),q(At.content),q("endobj")}je.publish("postPutAdditionalObjects")})(),B=[],(function(){for(var Y in be)be.hasOwnProperty(Y)&&(u===!1||u===!0&&f.hasOwnProperty(Y))&&Ba(be[Y])})(),(function(){var Y;for(Y in le)le.hasOwnProperty(Y)&&zu(le[Y])})(),(function(){for(var Y in Yr)Yr.hasOwnProperty(Y)&&uo(Yr[Y])})(),(function(Y){var At;for(At in Ae)Ae.hasOwnProperty(At)&&(Ae[At]instanceof gh?Cl(Ae[At]):Ae[At]instanceof fu&&fo(Ae[At],Y))})(B),je.publish("putResources"),B.forEach(Ca),Ca({resourcesOid:gs,objectOid:Number.MAX_SAFE_INTEGER}),je.publish("postPutResources"),h!==null&&(sn.oid=Er(),q("<<"),q("/Filter /Standard"),q("/V "+sn.v),q("/R "+sn.r),q("/U <"+sn.toHexString(sn.U)+">"),q("/O <"+sn.toHexString(sn.O)+">"),q("/P "+sn.P),q(">>"),q("endobj")),$r(),Ps();var T=vt;return qu(),Zr(),q("startxref"),q(""+T),q("%%EOF"),jt(St[G]),gt.join(`
|
|
85
|
-
`)},Xu=d.__private__.getBlob=function(B){return new Blob([fe(B)],{type:"application/pdf"})},Qp=function(B){for(;B.firstChild;)B.removeChild(B.firstChild)},Ds=function(B){var T,Y=B.document,At=Y.documentElement,dt=Y.head,bt=Y.body;return dt||(dt=Y.createElement("head"),At.appendChild(dt)),bt||(bt=Y.createElement("body"),At.appendChild(bt)),Qp(dt),Qp(bt),(T=Y.createElement("style")).appendChild(Y.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),dt.appendChild(T),{document:Y,body:bt}},Yu=d.output=d.__private__.output=(Sn=function(B,T){switch(typeof(T=T||{})=="string"?T={filename:T}:T.filename=T.filename||"generated.pdf",B){case void 0:return xa();case"save":d.save(T.filename);break;case"arraybuffer":return fe(xa());case"blob":return Xu(xa());case"bloburi":case"bloburl":if(xe.URL!==void 0&&typeof xe.URL.createObjectURL=="function")return xe.URL&&xe.URL.createObjectURL(Xu(xa()))||void 0;vr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Y="",At=xa();try{Y=ok(At)}catch{Y=ok(unescape(encodeURIComponent(At)))}return"data:application/pdf;filename="+encodeURIComponent(T.filename)+";base64,"+Y;case"pdfobjectnewwindow":if(Object.prototype.toString.call(xe)==="[object Window]"){var dt="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",bt=!T.pdfObjectUrl;bt||(dt=T.pdfObjectUrl);var Ut=xe.open();if(Ut!==null){var ae=Ds(Ut),se=ae.document.createElement("script"),Ee=this;se.src=dt,bt&&(se.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",se.crossOrigin="anonymous"),se.onload=function(){Ut.PDFObject.embed(Ee.output("dataurlstring"),T)},ae.body.appendChild(se)}return Ut}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(xe)==="[object Window]"){var Ie=T.pdfJsUrl||"examples/PDF.js/web/viewer.html",Ke=xe.open();if(Ke!==null){var ki=Ds(Ke),dr=ki.document.createElement("iframe"),Ar=Ie.indexOf("?")===-1?"?":"&";Ee=this,dr.id="pdfViewer",dr.width="500px",dr.height="400px",dr.src=Ie+Ar+"file=&downloadName="+encodeURIComponent(T.filename),dr.onload=function(){Ke.document.title=T.filename,dr.contentWindow.PDFViewerApplication.open(Ee.output("bloburl"))},ki.body.appendChild(dr)}return Ke}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(xe)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var kr=xe.open();if(kr!==null){var Kr=Ds(kr),Gr=Kr.document.createElement("iframe");Gr.src=this.output("datauristring",T),Kr.body.appendChild(Gr),kr.document.title=T.filename}if(kr||typeof safari>"u")return kr;break;case"datauri":case"dataurl":return xe.document.location.href=this.output("datauristring",T);default:return null}},Sn.foo=function(){try{return Sn.apply(this,arguments)}catch(Y){var B=Y.stack||"";~B.indexOf(" at ")&&(B=B.split(" at ")[1]);var T="Error in function "+B.split(`
|
|
86
|
-
`)[0].split("<")[0]+": "+Y.message;if(!xe.console)throw new Error(T);xe.console.error(T,Y),xe.alert&&alert(T)}},Sn.foo.bar=Sn,Sn.foo),po=function(B){return Array.isArray(co)===!0&&co.indexOf(B)>-1};switch(r){case"pt":ne=1;break;case"mm":ne=72/25.4;break;case"cm":ne=72/2.54;break;case"in":ne=72;break;case"px":ne=po("px_scaling")==1?.75:96/72;break;case"pc":case"em":ne=12;break;case"ex":ne=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ne=r}var sn=null;ht(),nt();var u1=d.__private__.getPageInfo=d.getPageInfo=function(B){if(isNaN(B)||B%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:ve[B].objId,pageNumber:B,pageContext:ve[B]}},Eb=d.__private__.getPageInfoByObjId=function(B){if(isNaN(B)||B%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var T in ve)if(ve[T].objId===B)break;return u1(T)},kb=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:ve[G].objId,pageNumber:G,pageContext:ve[G]}};d.addPage=function(){return Fe.apply(this,arguments),this},d.setPage=function(){return Je.apply(this,arguments),jt.call(this,St[G]),this},d.insertPage=function(B){return this.addPage(),this.movePage(G,B),this},d.movePage=function(B,T){var Y,At;if(B>T){Y=St[B],At=ve[B];for(var dt=B;dt>T;dt--)St[dt]=St[dt-1],ve[dt]=ve[dt-1];St[T]=Y,ve[T]=At,this.setPage(T)}else if(B<T){Y=St[B],At=ve[B];for(var bt=B;bt<T;bt++)St[bt]=St[bt+1],ve[bt]=ve[bt+1];St[T]=Y,ve[T]=At,this.setPage(T)}return this},d.deletePage=function(){return Re.apply(this,arguments),this},d.__private__.text=d.text=function(B,T,Y,At,dt){var bt,Ut,ae,se,Ee,Ie,Ke,ki,dr,Ar=(At=At||{}).scope||this;if(typeof B=="number"&&typeof T=="number"&&(typeof Y=="string"||Array.isArray(Y))){var kr=Y;Y=T,T=B,B=kr}if(arguments[3]instanceof qt==0?(ae=arguments[4],se=arguments[5],Ze(Ke=arguments[3])==="object"&&Ke!==null||(typeof ae=="string"&&(se=ae,ae=null),typeof Ke=="string"&&(se=Ke,Ke=null),typeof Ke=="number"&&(ae=Ke,Ke=null),At={flags:Ke,angle:ae,align:se})):(Q("The transform parameter of text() with a Matrix value"),dr=dt),isNaN(T)||isNaN(Y)||B==null)throw new Error("Invalid arguments passed to jsPDF.text");if(B.length===0)return Ar;var Kr,Gr="",$n=typeof At.lineHeightFactor=="number"?At.lineHeightFactor:Yh,yo=Ar.internal.scaleFactor;function Dp(Br){return Br=Br.split(" ").join(Array(At.TabLen||9).join(" ")),kt(Br,Ke)}function Jh(Br){for(var Cr,li=Br.concat(),Vi=[],Bo=li.length;Bo--;)typeof(Cr=li.shift())=="string"?Vi.push(Cr):Array.isArray(Br)&&(Cr.length===1||Cr[1]===void 0&&Cr[2]===void 0)?Vi.push(Cr[0]):Vi.push([Cr[0],Cr[1],Cr[2]]);return Vi}function tc(Br,Cr){var li;if(typeof Br=="string")li=Cr(Br)[0];else if(Array.isArray(Br)){for(var Vi,Bo,jp=Br.concat(),cd=[],B1=jp.length;B1--;)typeof(Vi=jp.shift())=="string"?cd.push(Cr(Vi)[0]):Array.isArray(Vi)&&typeof Vi[0]=="string"&&(Bo=Cr(Vi[0],Vi[1],Vi[2]),cd.push([Bo[0],Bo[1],Bo[2]]));li=cd}return li}var El=!1,ec=!0;if(typeof B=="string")El=!0;else if(Array.isArray(B)){var id=B.concat();Ut=[];for(var nd,Un=id.length;Un--;)(typeof(nd=id.shift())!="string"||Array.isArray(nd)&&typeof nd[0]!="string")&&(ec=!1);El=ec}if(El===!1)throw new Error('Type of text must be string or Array. "'+B+'" is not recognized.');typeof B=="string"&&(B=B.match(/[\r?\n]/)?B.split(/\r\n|\r|\n/g):[B]);var rc=Et/Ar.internal.scaleFactor,ic=rc*($n-1);switch(At.baseline){case"bottom":Y-=ic;break;case"top":Y+=rc-ic;break;case"hanging":Y+=rc-2*ic;break;case"middle":Y+=rc/2-ic}if((Ie=At.maxWidth||0)>0&&(typeof B=="string"?B=Ar.splitTextToSize(B,Ie):Object.prototype.toString.call(B)==="[object Array]"&&(B=B.reduce(function(Br,Cr){return Br.concat(Ar.splitTextToSize(Cr,Ie))},[]))),bt={text:B,x:T,y:Y,options:At,mutex:{pdfEscape:kt,activeFontKey:Wt,fonts:be,activeFontSize:Et}},je.publish("preProcessText",bt),B=bt.text,ae=(At=bt.options).angle,dr instanceof qt==0&&ae&&typeof ae=="number"){ae*=Math.PI/180,At.rotationDirection===0&&(ae=-ae),S===C&&(ae=-ae);var Op=Math.cos(ae),Ea=Math.sin(ae);dr=new qt(Op,Ea,-Ea,Op,0,0)}else ae&&ae instanceof qt&&(dr=ae);S!==C||dr||(dr=RA),(Ee=At.charSpace||td)!==void 0&&(Gr+=D(W(Ee))+` Tc
|
|
87
|
-
`,this.setCharSpace(this.getCharSpace()||0)),(ki=At.horizontalScale)!==void 0&&(Gr+=D(100*ki)+` Tz
|
|
88
|
-
`),At.lang;var Zn=-1,y1=At.renderingMode!==void 0?At.renderingMode:At.stroke,sd=Ar.internal.getCurrentPageInfo().pageContext;switch(y1){case 0:case!1:case"fill":Zn=0;break;case 1:case!0:case"stroke":Zn=1;break;case 2:case"fillThenStroke":Zn=2;break;case 3:case"invisible":Zn=3;break;case 4:case"fillAndAddForClipping":Zn=4;break;case 5:case"strokeAndAddPathForClipping":Zn=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Zn=6;break;case 7:case"addToPathForClipping":Zn=7}var b1=sd.usedRenderingMode!==void 0?sd.usedRenderingMode:-1;Zn!==-1?Gr+=Zn+` Tr
|
|
89
|
-
`:b1!==-1&&(Gr+=`0 Tr
|
|
90
|
-
`),Zn!==-1&&(sd.usedRenderingMode=Zn),se=At.align||"left";var lA,nc=Et*$n,Rp=Ar.internal.pageSize.getWidth(),Ad=be[Wt];Ee=At.charSpace||td,Ie=At.maxWidth||0,Ke=Object.assign({autoencode:!0,noBOM:!0},At.flags);var sc=[],Hp=function(Br){return Ar.getStringUnitWidth(Br,{font:Ad,charSpace:Ee,fontSize:Et,doKerning:!1})*Et/yo};if(Object.prototype.toString.call(B)==="[object Array]"){var Jn;Ut=Jh(B),se!=="left"&&(lA=Ut.map(Hp));var vs,ad=0;if(se==="right"){T-=lA[0],B=[],Un=Ut.length;for(var kl=0;kl<Un;kl++)kl===0?(vs=go(T),Jn=mo(Y)):(vs=W(ad-lA[kl]),Jn=-nc),B.push([Ut[kl],vs,Jn]),ad=lA[kl]}else if(se==="center"){T-=lA[0]/2,B=[],Un=Ut.length;for(var Ul=0;Ul<Un;Ul++)Ul===0?(vs=go(T),Jn=mo(Y)):(vs=W((ad-lA[Ul])/2),Jn=-nc),B.push([Ut[Ul],vs,Jn]),ad=lA[Ul]}else if(se==="left"){B=[],Un=Ut.length;for(var od=0;od<Un;od++)B.push(Ut[od])}else if(se==="justify"&&Ad.encoding==="Identity-H"){B=[],Un=Ut.length,Ie=Ie!==0?Ie:Rp;for(var Ac=0,Ui=0;Ui<Un;Ui++)if(Jn=Ui===0?mo(Y):-nc,vs=Ui===0?go(T):Ac,Ui<Un-1){var Wb=W((Ie-lA[Ui])/(Ut[Ui].split(" ").length-1)),ka=Ut[Ui].split(" ");B.push([ka[0]+" ",vs,Jn]),Ac=0;for(var VA=1;VA<ka.length;VA++){var ac=(Hp(ka[VA-1]+" "+ka[VA])-Hp(ka[VA]))*yo+Wb;VA==ka.length-1?B.push([ka[VA],ac,0]):B.push([ka[VA]+" ",ac,0]),Ac-=ac}}else B.push([Ut[Ui],vs,Jn]);B.push(["",Ac,0])}else{if(se!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(B=[],Un=Ut.length,Ie=Ie!==0?Ie:Rp,Ui=0;Ui<Un;Ui++){Jn=Ui===0?mo(Y):-nc,vs=Ui===0?go(T):0;var Vp=Ut[Ui].split(" ").length-1,Wp=Vp>0?(Ie-lA[Ui])/Vp:0;Ui<Un-1?sc.push(D(W(Wp))):sc.push(0),B.push([Ut[Ui],vs,Jn])}}}(typeof At.R2L=="boolean"?At.R2L:zt)===!0&&(B=tc(B,function(Br,Cr,li){return[Br.split("").reverse().join(""),Cr,li]})),bt={text:B,x:T,y:Y,options:At,mutex:{pdfEscape:kt,activeFontKey:Wt,fonts:be,activeFontSize:Et}},je.publish("postProcessText",bt),B=bt.text,Kr=bt.mutex.isHex||!1;var ld=be[Wt].encoding;ld!=="WinAnsiEncoding"&&ld!=="StandardEncoding"||(B=tc(B,function(Br,Cr,li){return[Dp(Br),Cr,li]})),Ut=Jh(B),B=[];for(var oc,lc,Il,bo=Array.isArray(Ut[0])?1:0,Ql="",hd=function(Br,Cr,li){var Vi="";return li instanceof qt?(li=typeof At.angle=="number"?Fn(li,new qt(1,0,0,1,Br,Cr)):Fn(new qt(1,0,0,1,Br,Cr),li),S===C&&(li=Fn(new qt(1,0,0,-1,0,0),li)),Vi=li.join(" ")+` Tm
|
|
91
|
-
`):Vi=D(Br)+" "+D(Cr)+` Td
|
|
92
|
-
`,Vi},In=0;In<Ut.length;In++){switch(Ql="",bo){case 1:Il=(Kr?"<":"(")+Ut[In][0]+(Kr?">":")"),oc=parseFloat(Ut[In][1]),lc=parseFloat(Ut[In][2]);break;case 0:Il=(Kr?"<":"(")+Ut[In]+(Kr?">":")"),oc=go(T),lc=mo(Y)}sc!==void 0&&sc[In]!==void 0&&(Ql=sc[In]+` Tw
|
|
93
|
-
`),In===0?B.push(Ql+hd(oc,lc,dr)+Il):bo===0?B.push(Ql+Il):bo===1&&B.push(Ql+hd(oc,lc,dr)+Il)}B=bo===0?B.join(` Tj
|
|
94
|
-
T* `):B.join(` Tj
|
|
95
|
-
`),B+=` Tj
|
|
96
|
-
`;var Ua=`BT
|
|
97
|
-
/`;return Ua+=Wt+" "+Et+` Tf
|
|
98
|
-
`,Ua+=D(Et*$n)+` TL
|
|
99
|
-
`,Ua+=Sa+`
|
|
100
|
-
`,Ua+=Gr,Ua+=B,q(Ua+="ET"),f[Wt]=!0,Ar};var Ub=d.__private__.clip=d.clip=function(B){return q(B==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return Ub("evenodd")},d.__private__.discardPath=d.discardPath=function(){return q("n"),this};var Fa=d.__private__.isValidStyle=function(B){var T=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(B)!==-1&&(T=!0),T};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(B){return Fa(B)&&(l=B),this};var d1=d.__private__.getStyle=d.getStyle=function(B){var T=l;switch(B){case"D":case"S":T="S";break;case"F":T="f";break;case"FD":case"DF":T="B";break;case"f":case"f*":case"B":case"B*":T=B}return T},$u=d.close=function(){return q("h"),this};d.stroke=function(){return q("S"),this},d.fill=function(B){return Zu("f",B),this},d.fillEvenOdd=function(B){return Zu("f*",B),this},d.fillStroke=function(B){return Zu("B",B),this},d.fillStrokeEvenOdd=function(B){return Zu("B*",B),this};var Zu=function(B,T){Ze(T)==="object"?Qb(T,B):q(B)},Lp=function(B){B===null||S===C&&B===void 0||(B=d1(B),q(B))};function Ib(B,T,Y,At,dt){var bt=new fu(T||this.boundingBox,Y||this.xStep,At||this.yStep,this.gState,dt||this.matrix);bt.stream=this.stream;var Ut=B+"$$"+this.cloneIndex+++"$$";return qn(Ut,bt),bt}var Qb=function(B,T){var Y=Ne[B.key],At=Ae[Y];if(At instanceof gh)q("q"),q(Lb(T)),At.gState&&d.setGState(At.gState),q(B.matrix.toString()+" cm"),q("/"+Y+" sh"),q("Q");else if(At instanceof fu){var dt=new qt(1,0,0,-1,0,Zh());B.matrix&&(dt=dt.multiply(B.matrix||RA),Y=Ib.call(At,B.key,B.boundingBox,B.xStep,B.yStep,dt).id),q("q"),q("/Pattern cs"),q("/"+Y+" scn"),At.gState&&d.setGState(At.gState),q(T),q("Q")}},Lb=function(B){switch(B){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},xl=d.moveTo=function(B,T){return q(D(W(B))+" "+D(R(T))+" m"),this},f1=d.lineTo=function(B,T){return q(D(W(B))+" "+D(R(T))+" l"),this},Fl=d.curveTo=function(B,T,Y,At,dt,bt){return q([D(W(B)),D(R(T)),D(W(Y)),D(R(At)),D(W(dt)),D(R(bt)),"c"].join(" ")),this};d.__private__.line=d.line=function(B,T,Y,At,dt){if(isNaN(B)||isNaN(T)||isNaN(Y)||isNaN(At)||!Fa(dt))throw new Error("Invalid arguments passed to jsPDF.line");return S===b?this.lines([[Y-B,At-T]],B,T,[1,1],dt||"S"):this.lines([[Y-B,At-T]],B,T,[1,1]).stroke()},d.__private__.lines=d.lines=function(B,T,Y,At,dt,bt){var Ut,ae,se,Ee,Ie,Ke,ki,dr,Ar,kr,Kr,Gr;if(typeof B=="number"&&(Gr=Y,Y=T,T=B,B=Gr),At=At||[1,1],bt=bt||!1,isNaN(T)||isNaN(Y)||!Array.isArray(B)||!Array.isArray(At)||!Fa(dt)||typeof bt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(xl(T,Y),Ut=At[0],ae=At[1],Ee=B.length,kr=T,Kr=Y,se=0;se<Ee;se++)(Ie=B[se]).length===2?(kr=Ie[0]*Ut+kr,Kr=Ie[1]*ae+Kr,f1(kr,Kr)):(Ke=Ie[0]*Ut+kr,ki=Ie[1]*ae+Kr,dr=Ie[2]*Ut+kr,Ar=Ie[3]*ae+Kr,kr=Ie[4]*Ut+kr,Kr=Ie[5]*ae+Kr,Fl(Ke,ki,dr,Ar,kr,Kr));return bt&&$u(),Lp(dt),this},d.path=function(B){for(var T=0;T<B.length;T++){var Y=B[T],At=Y.c;switch(Y.op){case"m":xl(At[0],At[1]);break;case"l":f1(At[0],At[1]);break;case"c":Fl.apply(this,At);break;case"h":$u()}}return this},d.__private__.rect=d.rect=function(B,T,Y,At,dt){if(isNaN(B)||isNaN(T)||isNaN(Y)||isNaN(At)||!Fa(dt))throw new Error("Invalid arguments passed to jsPDF.rect");return S===b&&(At=-At),q([D(W(B)),D(R(T)),D(W(Y)),D(W(At)),"re"].join(" ")),Lp(dt),this},d.__private__.triangle=d.triangle=function(B,T,Y,At,dt,bt,Ut){if(isNaN(B)||isNaN(T)||isNaN(Y)||isNaN(At)||isNaN(dt)||isNaN(bt)||!Fa(Ut))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Y-B,At-T],[dt-Y,bt-At],[B-dt,T-bt]],B,T,[1,1],Ut,!0),this},d.__private__.roundedRect=d.roundedRect=function(B,T,Y,At,dt,bt,Ut){if(isNaN(B)||isNaN(T)||isNaN(Y)||isNaN(At)||isNaN(dt)||isNaN(bt)||!Fa(Ut))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ae=4/3*(Math.SQRT2-1);return dt=Math.min(dt,.5*Y),bt=Math.min(bt,.5*At),this.lines([[Y-2*dt,0],[dt*ae,0,dt,bt-bt*ae,dt,bt],[0,At-2*bt],[0,bt*ae,-dt*ae,bt,-dt,bt],[2*dt-Y,0],[-dt*ae,0,-dt,-bt*ae,-dt,-bt],[0,2*bt-At],[0,-bt*ae,dt*ae,-bt,dt,-bt]],B+dt,T,[1,1],Ut,!0),this},d.__private__.ellipse=d.ellipse=function(B,T,Y,At,dt){if(isNaN(B)||isNaN(T)||isNaN(Y)||isNaN(At)||!Fa(dt))throw new Error("Invalid arguments passed to jsPDF.ellipse");var bt=4/3*(Math.SQRT2-1)*Y,Ut=4/3*(Math.SQRT2-1)*At;return xl(B+Y,T),Fl(B+Y,T-Ut,B+bt,T-At,B,T-At),Fl(B-bt,T-At,B-Y,T-Ut,B-Y,T),Fl(B-Y,T+Ut,B-bt,T+At,B,T+At),Fl(B+bt,T+At,B+Y,T+Ut,B+Y,T),Lp(dt),this},d.__private__.circle=d.circle=function(B,T,Y,At){if(isNaN(B)||isNaN(T)||isNaN(Y)||!Fa(At))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(B,T,Y,Y,At)},d.setFont=function(B,T,Y){return Y&&(T=N(T,Y)),Wt=Yn(B,T,{disableWarning:!1}),this};var _b=d.__private__.getFont=d.getFont=function(){return be[Yn.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var B,T,Y={};for(B in Be)if(Be.hasOwnProperty(B))for(T in Y[B]=[],Be[B])Be[B].hasOwnProperty(T)&&Y[B].push(T);return Y},d.addFont=function(B,T,Y,At,dt){var bt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&bt.indexOf(arguments[3])!==-1?dt=arguments[3]:arguments[3]&&bt.indexOf(arguments[3])==-1&&(Y=N(Y,At)),$.call(this,B,T,Y,dt=dt||"Identity-H")};var Yh,Ce=i.lineWidth||.200025,Mb=d.__private__.getLineWidth=d.getLineWidth=function(){return Ce},Tb=d.__private__.setLineWidth=d.setLineWidth=function(B){return Ce=B,q(D(W(B))+" w"),this};d.__private__.setLineDash=ue.API.setLineDash=ue.API.setLineDashPattern=function(B,T){if(B=B||[],T=T||0,isNaN(T)||!Array.isArray(B))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return B=B.map(function(Y){return D(W(Y))}).join(" "),T=D(W(T)),q("["+B+"] "+T+" d"),this};var Nb=d.__private__.getLineHeight=d.getLineHeight=function(){return Et*Yh};d.__private__.getLineHeight=d.getLineHeight=function(){return Et*Yh};var Pb=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(B){return typeof(B=B||1.15)=="number"&&(Yh=B),this},Db=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return Yh};Pb(i.lineHeight);var go=d.__private__.getHorizontalCoordinate=function(B){return W(B)},mo=d.__private__.getVerticalCoordinate=function(B){return S===C?B:ve[G].mediaBox.topRightY-ve[G].mediaBox.bottomLeftY-W(B)},Ob=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(B){return D(go(B))},Rb=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(B){return D(mo(B))},Ju=i.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Ns(Ju)},d.__private__.setStrokeColor=d.setDrawColor=function(B,T,Y,At){return Ju=ms({ch1:B,ch2:T,ch3:Y,ch4:At,pdfColorType:"draw",precision:2}),q(Ju),this};var _p=i.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Ns(_p)},d.__private__.setFillColor=d.setFillColor=function(B,T,Y,At){return _p=ms({ch1:B,ch2:T,ch3:Y,ch4:At,pdfColorType:"fill",precision:2}),q(_p),this};var Sa=i.textColor||"0 g",Hb=d.__private__.getTextColor=d.getTextColor=function(){return Ns(Sa)};d.__private__.setTextColor=d.setTextColor=function(B,T,Y,At){return Sa=ms({ch1:B,ch2:T,ch3:Y,ch4:At,pdfColorType:"text",precision:3}),this};var td=i.charSpace,Vb=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(td||0)};d.__private__.setCharSpace=d.setCharSpace=function(B){if(isNaN(B))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return td=B,this};var Mp=0;d.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},d.__private__.setLineCap=d.setLineCap=function(B){var T=d.CapJoinStyles[B];if(T===void 0)throw new Error("Line cap style of '"+B+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Mp=T,q(T+" J"),this};var Sl=0;d.__private__.setLineJoin=d.setLineJoin=function(B){var T=d.CapJoinStyles[B];if(T===void 0)throw new Error("Line join style of '"+B+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Sl=T,q(T+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(B){if(B=B||0,isNaN(B))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return q(D(W(B))+" M"),this},d.GState=Tu,d.setGState=function(B){(B=typeof B=="string"?le[ye[B]]:Tp(null,B)).equals(Ye)||(q("/"+B.id+" gs"),Ye=B)};var Tp=function(B,T){if(!B||!ye[B]){var Y=!1;for(var At in le)if(le.hasOwnProperty(At)&&le[At].equals(T)){Y=!0;break}if(Y)T=le[At];else{var dt="GS"+(Object.keys(le).length+1).toString(10);le[dt]=T,T.id=dt}return B&&(ye[B]=T.id),je.publish("addGState",T),T}};d.addGState=function(B,T){return Tp(B,T),this},d.saveGraphicsState=function(){return q("q"),ze.push({key:Wt,size:Et,color:Sa}),this},d.restoreGraphicsState=function(){q("Q");var B=ze.pop();return Wt=B.key,Et=B.size,Sa=B.color,Ye=null,this},d.setCurrentTransformationMatrix=function(B){return q(B.toString()+" cm"),this},d.comment=function(B){return q("#"+B),this};var $h=function(B,T){var Y=B||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Y},set:function(bt){isNaN(bt)||(Y=parseFloat(bt))}});var At=T||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return At},set:function(bt){isNaN(bt)||(At=parseFloat(bt))}});var dt="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return dt},set:function(bt){dt=bt.toString()}}),this},Np=function(B,T,Y,At){$h.call(this,B,T),this.type="rect";var dt=Y||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return dt},set:function(Ut){isNaN(Ut)||(dt=parseFloat(Ut))}});var bt=At||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return bt},set:function(Ut){isNaN(Ut)||(bt=parseFloat(Ut))}}),this},ed=function(){this.page=we,this.currentPage=G,this.pages=St.slice(0),this.pagesContext=ve.slice(0),this.x=Gt,this.y=Ve,this.matrix=Te,this.width=p1(G),this.height=vo(G),this.outputDestination=Tt,this.id="",this.objectNumber=-1};ed.prototype.restore=function(){we=this.page,G=this.currentPage,ve=this.pagesContext,St=this.pages,Gt=this.x,Ve=this.y,Te=this.matrix,wo(G,this.width),g1(G,this.height),Tt=this.outputDestination};var Pp=function(B,T,Y,At,dt){aA.push(new ed),we=G=0,St=[],Gt=B,Ve=T,Te=dt,Pt([Y,At])};for(var rd in d.beginFormObject=function(B,T,Y,At,dt){return Pp(B,T,Y,At,dt),this},d.endFormObject=function(B){return(function(T){if(OA[T])aA.pop().restore();else{var Y=new ed,At="Xo"+(Object.keys(Yr).length+1).toString(10);Y.id=At,OA[T]=At,Yr[At]=Y,je.publish("addFormObject",Y),aA.pop().restore()}})(B),this},d.doFormObject=function(B,T){var Y=Yr[OA[B]];return q("q"),q(T.toString()+" cm"),q("/"+Y.id+" Do"),q("Q"),this},d.getFormObject=function(B){var T=Yr[OA[B]];return{x:T.x,y:T.y,width:T.width,height:T.height,matrix:T.matrix}},d.save=function(B,T){return B=B||"generated.pdf",(T=T||{}).returnPromise=T.returnPromise||!1,T.returnPromise===!1?(fc(Xu(xa()),B),typeof fc.unload=="function"&&xe.setTimeout&&setTimeout(fc.unload,911),this):new Promise(function(Y,At){try{var dt=fc(Xu(xa()),B);typeof fc.unload=="function"&&xe.setTimeout&&setTimeout(fc.unload,911),Y(dt)}catch(bt){At(bt.message)}})},ue.API)ue.API.hasOwnProperty(rd)&&(rd==="events"&&ue.API.events.length?(function(B,T){var Y,At,dt;for(dt=T.length-1;dt!==-1;dt--)Y=T[dt][0],At=T[dt][1],B.subscribe.apply(B,[Y].concat(typeof At=="function"?[At]:At))})(je,ue.API.events):d[rd]=ue.API[rd]);function p1(B){return ve[B].mediaBox.topRightX-ve[B].mediaBox.bottomLeftX}function wo(B,T){ve[B].mediaBox.topRightX=T+ve[B].mediaBox.bottomLeftX}function vo(B){return ve[B].mediaBox.topRightY-ve[B].mediaBox.bottomLeftY}function g1(B,T){ve[B].mediaBox.topRightY=T+ve[B].mediaBox.bottomLeftY}var m1=d.getPageWidth=function(B){return p1(B=B||G)/ne},w1=d.setPageWidth=function(B,T){wo(B,T*ne)},Zh=d.getPageHeight=function(B){return vo(B=B||G)/ne},v1=d.setPageHeight=function(B,T){g1(B,T*ne)};return d.internal={pdfEscape:kt,getStyle:d1,getFont:_b,getFontSize:Ot,getCharSpace:Vb,getTextColor:Hb,getLineHeight:Nb,getLineHeightFactor:Db,getLineWidth:Mb,write:Mt,getHorizontalCoordinate:go,getVerticalCoordinate:mo,getCoordinateString:Ob,getVerticalCoordinateString:Rb,collections:{},newObject:Er,newAdditionalObject:Xn,newObjectDeferred:oi,newObjectDeferredBegin:Hi,getFilters:kn,putStream:Zi,events:je,scaleFactor:ne,pageSize:{getWidth:function(){return m1(G)},setWidth:function(B){w1(G,B)},getHeight:function(){return Zh(G)},setHeight:function(B){v1(G,B)}},encryptionOptions:h,encryption:sn,getEncryptor:function(B){return h!==null?sn.encryptor(B,0):function(T){return T}},output:Yu,getNumberOfPages:ws,get pages(){return St},out:q,f2:L,f3:O,getPageInfo:u1,getPageInfoByObjId:Eb,getCurrentPageInfo:kb,getPDFVersion:m,Point:$h,Rectangle:Np,Matrix:qt,hasHotfix:po},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return m1(G)},set:function(B){w1(G,B)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return Zh(G)},set:function(B){v1(G,B)},enumerable:!0,configurable:!0}),(function(B){for(var T=0,Y=Zt.length;T<Y;T++){var At=$.call(this,B[T][0],B[T][1],B[T][2],Zt[T][3],!0);u===!1&&(f[At]=!0);var dt=B[T][0].split("-");HA({id:At,fontName:dt[0],fontStyle:dt[1]||""})}je.publish("addFonts",{fonts:be,dictionary:Be})}).call(d,Zt),Wt="F1",Fe(n,e),je.publish("initialized"),d}kd.prototype.lsbFirstWord=function(i){return String.fromCharCode(255&i,i>>8&255,i>>16&255,i>>24&255)},kd.prototype.toHexString=function(i){return i.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},kd.prototype.hexToBytes=function(i){for(var t=[],e=0;e<i.length;e+=2)t.push(String.fromCharCode(parseInt(i.substr(e,2),16)));return t.join("")},kd.prototype.processOwnerPassword=function(i,t){return rF(eF(t).substr(0,5),i)},kd.prototype.encryptor=function(i,t){var e=eF(this.encryptionKey+String.fromCharCode(255&i,i>>8&255,i>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return rF(e,r)}},Tu.prototype.equals=function(i){var t,e="id,objectNumber,equals";if(!i||Ze(i)!==Ze(this))return!1;var r=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!i.hasOwnProperty(t)||this[t]!==i[t])return!1;r++}for(t in i)i.hasOwnProperty(t)&&e.indexOf(t)<0&&r--;return r===0},ue.API={events:[]},ue.version="4.2.1";var ni=ue.API,IS=1,Ru=function(i){return i.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},fd=function(i){return i.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Nu=function(i){return i.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(e.length===1?"0"+e:e)})},Ue=function(i){return i.toFixed(2)},Ol=function(i){return i.toFixed(5)};ni.__acroform__={};var Ms=function(i,t){i.prototype=Object.create(t.prototype),i.prototype.constructor=i},uk=function(i){return i*IS},Na=function(i){var t=new PT,e=ie.internal.getHeight(i)||0,r=ie.internal.getWidth(i)||0;return t.BBox=[0,0,Number(Ue(r)),Number(Ue(e))],t},B7=ni.__acroform__.setBit=function(i,t){if(i=i||0,t=t||0,isNaN(i)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return i|1<<t},C7=ni.__acroform__.clearBit=function(i,t){if(i=i||0,t=t||0,isNaN(i)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return i&~(1<<t)},x7=ni.__acroform__.getBit=function(i,t){if(isNaN(i)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return i&1<<t?1:0},bi=ni.__acroform__.getBitForPdf=function(i,t){if(isNaN(i)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return x7(i,t-1)},Bi=ni.__acroform__.setBitForPdf=function(i,t){if(isNaN(i)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return B7(i,t-1)},Ci=ni.__acroform__.clearBitForPdf=function(i,t){if(isNaN(i)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return C7(i,t-1)},F7=ni.__acroform__.calculateCoordinates=function(i,t){var e=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,n=i[0],s=i[1],A=i[2],a=i[3],o={};return o.lowerLeft_X=e(n)||0,o.lowerLeft_Y=r(s+a)||0,o.upperRight_X=e(n+A)||0,o.upperRight_Y=r(s)||0,[Number(Ue(o.lowerLeft_X)),Number(Ue(o.lowerLeft_Y)),Number(Ue(o.upperRight_X)),Number(Ue(o.upperRight_Y))]},S7=function(i){if(i.appearanceStreamContent)return i.appearanceStreamContent;if(i.V||i.DV){var t=[],e=i._V||i.DV,r=iF(i,e),n=i.scope.internal.getFont(i.fontName,i.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(i.scope.__private__.encodeColorString(i.color)),t.push("/"+n+" "+Ue(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var s=Na(i);return s.scope=i.scope,s.stream=t.join(`
|
|
101
|
-
`),s}},iF=function(i,t){var e=i.fontSize===0?i.maxFontSize:i.fontSize,r={text:"",fontSize:""},n=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");n=i.multiline?n.map(function(L){return L.split(`
|
|
102
|
-
`)}):n.map(function(L){return[L]});var s=e,A=ie.internal.getHeight(i)||0;A=A<0?-A:A;var a=ie.internal.getWidth(i)||0;a=a<0?-a:a;var o=function(L,O,W){if(L+1<n.length){var R=O+" "+n[L+1][0];return K1(R,i,W).width<=a-4}return!1};s++;t:for(;s>0;){t="",s--;var l,h,u=K1("3",i,s).height,f=i.multiline?A-s:(A-u)/2,d=f+=2,g=0,m=0,y=0;if(s<=0){t=`(...) Tj
|
|
103
|
-
`,t+="% Width of Text: "+K1(t,i,s=12).width+", FieldWidth:"+a+`
|
|
104
|
-
`;break}for(var w="",b=0,C=0;C<n.length;C++)if(n.hasOwnProperty(C)){var S=!1;if(n[C].length!==1&&y!==n[C].length-1){if((u+2)*(b+2)+2>A)continue t;w+=n[C][y],S=!0,m=C,C--}else{w=(w+=n[C][y]+" ").substr(w.length-1)==" "?w.substr(0,w.length-1):w;var k=parseInt(C),I=o(k,w,s),N=C>=n.length-1;if(I&&!N){w+=" ",y=0;continue}if(I||N){if(N)m=k;else if(i.multiline&&(u+2)*(b+2)+2>A)continue t}else{if(!i.multiline||(u+2)*(b+2)+2>A)continue t;m=k}}for(var D="",Q=g;Q<=m;Q++){var K=n[Q];if(i.multiline){if(Q===m){D+=K[y]+" ",y=(y+1)%K.length;continue}if(Q===g){D+=K[K.length-1]+" ";continue}}D+=K[0]+" "}switch(D=D.substr(D.length-1)==" "?D.substr(0,D.length-1):D,h=K1(D,i,s).width,i.textAlign){case"right":l=a-h-2;break;case"center":l=(a-h)/2;break;default:l=2}t+=Ue(l)+" "+Ue(d)+` Td
|
|
105
|
-
`,t+="("+Ru(D)+`) Tj
|
|
106
|
-
`,t+=-Ue(l)+` 0 Td
|
|
107
|
-
`,d=-(s+2),h=0,g=S?m:m+1,b++,w=""}break}return r.text=t,r.fontSize=s,r},K1=function(i,t,e){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),n=t.scope.getStringUnitWidth(i,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:n}},E7={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},k7=function(i,t){var e={type:"reference",object:i};t.internal.getPageInfo(i.page).pageContext.annotations.find(function(r){return r.type===e.type&&r.object===e.object})===void 0&&t.internal.getPageInfo(i.page).pageContext.annotations.push(e)},U7=function(i,t){if(t.scope=i,i.internal!==void 0&&(i.internal.acroformPlugin===void 0||i.internal.acroformPlugin.isInitialized===!1)){if(ga.FieldNum=0,i.internal.acroformPlugin=JSON.parse(JSON.stringify(E7)),i.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");IS=i.internal.scaleFactor,i.internal.acroformPlugin.acroFormDictionaryRoot=new DT,i.internal.acroformPlugin.acroFormDictionaryRoot.scope=i,i.internal.acroformPlugin.acroFormDictionaryRoot._eventID=i.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(i)}),i.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in r)if(r.hasOwnProperty(n)){var s=r[n];s.objId=void 0,s.hasAnnotation&&k7(s,e)}})(i)}),i.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(i)}),i.internal.events.subscribe("postPutPages",function(e){(function(r,n){var s=!r;for(var A in r||(n.internal.newObjectDeferredBegin(n.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),n.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||n.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(A)){var a=r[A],o=[],l=a.Rect;if(a.Rect&&(a.Rect=F7(a.Rect,n)),n.internal.newObjectDeferredBegin(a.objId,!0),a.DA=ie.createDefaultAppearanceStream(a),Ze(a)==="object"&&typeof a.getKeyValueListForStream=="function"&&(o=a.getKeyValueListForStream()),a.Rect=l,a.hasAppearanceStream&&!a.appearanceStreamContent){var h=S7(a);o.push({key:"AP",value:"<</N "+h+">>"}),n.internal.acroformPlugin.xForms.push(h)}if(a.appearanceStreamContent){var u="";for(var f in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(f)){var d=a.appearanceStreamContent[f];if(u+="/"+f+" ",u+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var A in d)if(d.hasOwnProperty(A)){var g=d[A];typeof g=="function"&&(g=g.call(n,a)),u+="/"+A+" "+g+" ",n.internal.acroformPlugin.xForms.indexOf(g)>=0||n.internal.acroformPlugin.xForms.push(g)}}else typeof(g=d)=="function"&&(g=g.call(n,a)),u+="/"+A+" "+g,n.internal.acroformPlugin.xForms.indexOf(g)>=0||n.internal.acroformPlugin.xForms.push(g);u+=">>"}o.push({key:"AP",value:`<<
|
|
108
|
-
`+u+">>"})}n.internal.putStream({additionalKeyValues:o,objectId:a.objId}),n.internal.out("endobj")}s&&(function(m,y){for(var w in m)if(m.hasOwnProperty(w)){var b=w,C=m[w];y.internal.newObjectDeferredBegin(C.objId,!0),Ze(C)==="object"&&typeof C.putStream=="function"&&C.putStream(),delete m[b]}})(n.internal.acroformPlugin.xForms,n)})(e,i)}),i.internal.acroformPlugin.isInitialized=!0}},NT=ni.__acroform__.arrayToPdfArray=function(i,t,e){var r=function(A){return A};if(Array.isArray(i)){for(var n="[",s=0;s<i.length;s++)switch(s!==0&&(n+=" "),Ze(i[s])){case"boolean":case"number":case"object":n+=i[s].toString();break;case"string":i[s].substr(0,1)==="/"?n+="/"+Nu(i[s].substr(1)):(t!==void 0&&e&&(r=e.internal.getEncryptor(t)),n+="("+Ru(r(i[s].toString()))+")")}return n+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},CB=function(i,t,e){var r=function(n){return n};return t!==void 0&&e&&(r=e.internal.getEncryptor(t)),(i=i||"").toString(),"("+Ru(r(i))+")"},no=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(i){this._objId=i}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};no.prototype.toString=function(){return this.objId+" 0 R"},no.prototype.putStream=function(){var i=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:i,objectId:this.objId}),this.scope.internal.out("endobj")},no.prototype.getKeyValueListForStream=function(){var i=[],t=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var e in t)if(Object.getOwnPropertyDescriptor(this,t[e]).configurable===!1){var r=t[e],n=this[r];n&&(Array.isArray(n)?i.push({key:r,value:NT(n,this.objId,this.scope)}):n instanceof no?(n.scope=this.scope,i.push({key:r,value:n.objId+" 0 R"})):typeof n!="function"&&i.push({key:r,value:n}))}return i};var PT=function(){no.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var i,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){i=e.trim()},get:function(){return i||null}})};Ms(PT,no);var DT=function(){no.call(this);var i,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(i){var e=function(r){return r};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Ru(e(i))+")"}},set:function(e){i=e}})};Ms(DT,no);var ga=function i(){no.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute F supplied.');t=w}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!bi(t,3)},set:function(w){w?this.F=Bi(t,3):this.F=Ci(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute Ff supplied.');e=w}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(w){r=w!==void 0?w:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(w){r[0]=w}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(w){r[1]=w}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(w){r[2]=w}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(w){r[3]=w}});var n="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return n},set:function(w){switch(w){case"/Btn":case"/Tx":case"/Ch":case"/Sig":n=w;break;default:throw new Error('Invalid value "'+w+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof Cv)return;s="FieldObject"+i.FieldNum++}var w=function(b){return b};return this.scope&&(w=this.scope.internal.getEncryptor(this.objId)),"("+Ru(w(s))+")"},set:function(w){s=w.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(w){s=w}});var A="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return A},set:function(w){A=w}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(w){a=w}});var o=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return o},set:function(w){o=w}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/IS:l},set:function(w){l=w}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(w){h=w}});var u="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!u||this instanceof Cv||this instanceof Uu))return CB(u,this.objId,this.scope)},set:function(w){w=w.toString(),u=w}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof rn==0?CB(f,this.objId,this.scope):f},set:function(w){w=w.toString(),f=this instanceof rn==0?w.substr(0,1)==="("?fd(w.substr(1,w.length-2)):fd(w):w}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?fd(f.substr(1,f.length-1)):f},set:function(w){w=w.toString(),f=this instanceof rn==1?"/"+Nu(w):w}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(w){this.V=w}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof rn==0?CB(d,this.objId,this.scope):d},set:function(w){w=w.toString(),d=this instanceof rn==0?w.substr(0,1)==="("?fd(w.substr(1,w.length-2)):fd(w):w}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?fd(d.substr(1,d.length-1)):d},set:function(w){w=w.toString(),d=this instanceof rn==1?"/"+Nu(w):w}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var g,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(w){w=!!w,m=w}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(g)return g},set:function(w){g=w}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,1)},set:function(w){w?this.Ff=Bi(this.Ff,1):this.Ff=Ci(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,2)},set:function(w){w?this.Ff=Bi(this.Ff,2):this.Ff=Ci(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,3)},set:function(w){w?this.Ff=Bi(this.Ff,3):this.Ff=Ci(this.Ff,3)}});var y=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(y!==null)return y},set:function(w){if([0,1,2].indexOf(w)===-1)throw new Error('Invalid value "'+w+'" for attribute Q supplied.');y=w}}),Object.defineProperty(this,"textAlign",{get:function(){var w;switch(y){case 0:default:w="left";break;case 1:w="center";break;case 2:w="right"}return w},configurable:!0,enumerable:!0,set:function(w){switch(w){case"right":case 2:y=2;break;case"center":case 1:y=1;break;default:y=0}}})};Ms(ga,no);var tp=function(){ga.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var i=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return i},set:function(e){i=e}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return NT(t,this.objId,this.scope)},set:function(e){var r,n;n=[],typeof(r=e)=="string"&&(n=(function(s,A,a){a||(a=1);for(var o,l=[];o=A.exec(s);)l.push(o[a]);return l})(r,/\((.*?)\)/g)),t=n}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,r){for(r=r||!1,e=(e=e||"").toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,18)},set:function(e){e?this.Ff=Bi(this.Ff,18):this.Ff=Ci(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=Bi(this.Ff,19):this.Ff=Ci(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,20)},set:function(e){e?(this.Ff=Bi(this.Ff,20),t.sort()):this.Ff=Ci(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,22)},set:function(e){e?this.Ff=Bi(this.Ff,22):this.Ff=Ci(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,23)},set:function(e){e?this.Ff=Bi(this.Ff,23):this.Ff=Ci(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,27)},set:function(e){e?this.Ff=Bi(this.Ff,27):this.Ff=Ci(this.Ff,27)}}),this.hasAppearanceStream=!1};Ms(tp,ga);var ep=function(){tp.call(this),this.fontName="helvetica",this.combo=!1};Ms(ep,tp);var rp=function(){ep.call(this),this.combo=!0};Ms(rp,ep);var Dw=function(){rp.call(this),this.edit=!0};Ms(Dw,rp);var rn=function(){ga.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,15)},set:function(e){e?this.Ff=Bi(this.Ff,15):this.Ff=Ci(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,16)},set:function(e){e?this.Ff=Bi(this.Ff,16):this.Ff=Ci(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,17)},set:function(e){e?this.Ff=Bi(this.Ff,17):this.Ff=Ci(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,26)},set:function(e){e?this.Ff=Bi(this.Ff,26):this.Ff=Ci(this.Ff,26)}});var i,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(s){return s};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,n=[];for(r in n.push("<<"),t)n.push("/"+r+" ("+Ru(e(t[r]))+")");return n.push(">>"),n.join(`
|
|
109
|
-
`)}},set:function(e){Ze(e)==="object"&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){typeof e=="string"&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return i},set:function(e){var r=e==null?"":e.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),i="/"+Nu(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(e){i="/"+Nu(e)}})};Ms(rn,ga);var Ow=function(){rn.call(this),this.pushButton=!0};Ms(Ow,rn);var ip=function(){rn.call(this),this.radio=!0,this.pushButton=!1;var i=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return i},set:function(t){i=t!==void 0?t:[]}})};Ms(ip,rn);var Cv=function(){var i,t;ga.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return i},set:function(n){i=n}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(a){return a};this.scope&&(n=this.scope.internal.getEncryptor(this.objId));var s,A=[];for(s in A.push("<<"),r)A.push("/"+s+" ("+Ru(n(r[s]))+")");return A.push(">>"),A.join(`
|
|
110
|
-
`)},set:function(n){Ze(n)==="object"&&(r=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(n){typeof n=="string"&&(r.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(n){var s=n==null?"":n.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),e="/"+Nu(s)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(n){var s=n==null?"":n.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),e="/"+Nu(s)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=ie.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Ms(Cv,ga),ip.prototype.setAppearance=function(i){if(!("createAppearanceStream"in i)||!("getCA"in i))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var e=this.Kids[t];e.appearanceStreamContent=i.createAppearanceStream(e.optionName),e.caption=i.getCA()}},ip.prototype.createOption=function(i){var t=new Cv;return t.Parent=this,t.optionName=i,this.Kids.push(t),I7.call(this.scope,t),t};var Rw=function(){rn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=ie.CheckBox.createAppearanceStream()};Ms(Rw,rn);var Uu=function(){ga.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,13)},set:function(t){t?this.Ff=Bi(this.Ff,13):this.Ff=Ci(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,21)},set:function(t){t?this.Ff=Bi(this.Ff,21):this.Ff=Ci(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,23)},set:function(t){t?this.Ff=Bi(this.Ff,23):this.Ff=Ci(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,24)},set:function(t){t?this.Ff=Bi(this.Ff,24):this.Ff=Ci(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,25)},set:function(t){t?this.Ff=Bi(this.Ff,25):this.Ff=Ci(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,26)},set:function(t){t?this.Ff=Bi(this.Ff,26):this.Ff=Ci(this.Ff,26)}});var i=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return i},set:function(t){Number.isInteger(t)&&(i=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Ms(Uu,ga);var Hw=function(){Uu.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!bi(this.Ff,14)},set:function(i){i?this.Ff=Bi(this.Ff,14):this.Ff=Ci(this.Ff,14)}}),this.password=!0};Ms(Hw,Uu);var ie={CheckBox:{createAppearanceStream:function(){return{N:{On:ie.CheckBox.YesNormal},D:{On:ie.CheckBox.YesPushDown,Off:ie.CheckBox.OffPushDown}}},YesPushDown:function(i){var t=Na(i);t.scope=i.scope;var e=[],r=i.scope.internal.getFont(i.fontName,i.fontStyle).id,n=i.scope.__private__.encodeColorString(i.color),s=iF(i,i.caption);return e.push("0.749023 g"),e.push("0 0 "+Ue(ie.internal.getWidth(i))+" "+Ue(ie.internal.getHeight(i))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+Ue(s.fontSize)+" Tf "+n),e.push("BT"),e.push(s.text),e.push("ET"),e.push("Q"),e.push("EMC"),t.stream=e.join(`
|
|
111
|
-
`),t},YesNormal:function(i){var t=Na(i);t.scope=i.scope;var e=i.scope.internal.getFont(i.fontName,i.fontStyle).id,r=i.scope.__private__.encodeColorString(i.color),n=[],s=ie.internal.getHeight(i),A=ie.internal.getWidth(i),a=iF(i,i.caption);return n.push("1 g"),n.push("0 0 "+Ue(A)+" "+Ue(s)+" re"),n.push("f"),n.push("q"),n.push("0 0 1 rg"),n.push("0 0 "+Ue(A-1)+" "+Ue(s-1)+" re"),n.push("W"),n.push("n"),n.push("0 g"),n.push("BT"),n.push("/"+e+" "+Ue(a.fontSize)+" Tf "+r),n.push(a.text),n.push("ET"),n.push("Q"),t.stream=n.join(`
|
|
112
|
-
`),t},OffPushDown:function(i){var t=Na(i);t.scope=i.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Ue(ie.internal.getWidth(i))+" "+Ue(ie.internal.getHeight(i))+" re"),e.push("f"),t.stream=e.join(`
|
|
113
|
-
`),t}},RadioButton:{Circle:{createAppearanceStream:function(i){var t={D:{Off:ie.RadioButton.Circle.OffPushDown},N:{}};return t.N[i]=ie.RadioButton.Circle.YesNormal,t.D[i]=ie.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(i){var t=Na(i);t.scope=i.scope;var e=[],r=ie.internal.getWidth(i)<=ie.internal.getHeight(i)?ie.internal.getWidth(i)/4:ie.internal.getHeight(i)/4;r=Number((.9*r).toFixed(5));var n=ie.internal.Bezier_C,s=Number((r*n).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+Ol(ie.internal.getWidth(i)/2)+" "+Ol(ie.internal.getHeight(i)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+s+" "+s+" "+r+" 0 "+r+" c"),e.push("-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c"),e.push("-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c"),e.push(s+" -"+r+" "+r+" -"+s+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
114
|
-
`),t},YesPushDown:function(i){var t=Na(i);t.scope=i.scope;var e=[],r=ie.internal.getWidth(i)<=ie.internal.getHeight(i)?ie.internal.getWidth(i)/4:ie.internal.getHeight(i)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),s=Number((n*ie.internal.Bezier_C).toFixed(5)),A=Number((r*ie.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Ol(ie.internal.getWidth(i)/2)+" "+Ol(ie.internal.getHeight(i)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),e.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),e.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),e.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+Ol(ie.internal.getWidth(i)/2)+" "+Ol(ie.internal.getHeight(i)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+A+" "+A+" "+r+" 0 "+r+" c"),e.push("-"+A+" "+r+" -"+r+" "+A+" -"+r+" 0 c"),e.push("-"+r+" -"+A+" -"+A+" -"+r+" 0 -"+r+" c"),e.push(A+" -"+r+" "+r+" -"+A+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
115
|
-
`),t},OffPushDown:function(i){var t=Na(i);t.scope=i.scope;var e=[],r=ie.internal.getWidth(i)<=ie.internal.getHeight(i)?ie.internal.getWidth(i)/4:ie.internal.getHeight(i)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),s=Number((n*ie.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Ol(ie.internal.getWidth(i)/2)+" "+Ol(ie.internal.getHeight(i)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),e.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),e.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),e.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
116
|
-
`),t}},Cross:{createAppearanceStream:function(i){var t={D:{Off:ie.RadioButton.Cross.OffPushDown},N:{}};return t.N[i]=ie.RadioButton.Cross.YesNormal,t.D[i]=ie.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(i){var t=Na(i);t.scope=i.scope;var e=[],r=ie.internal.calculateCross(i);return e.push("q"),e.push("1 1 "+Ue(ie.internal.getWidth(i)-2)+" "+Ue(ie.internal.getHeight(i)-2)+" re"),e.push("W"),e.push("n"),e.push(Ue(r.x1.x)+" "+Ue(r.x1.y)+" m"),e.push(Ue(r.x2.x)+" "+Ue(r.x2.y)+" l"),e.push(Ue(r.x4.x)+" "+Ue(r.x4.y)+" m"),e.push(Ue(r.x3.x)+" "+Ue(r.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(`
|
|
117
|
-
`),t},YesPushDown:function(i){var t=Na(i);t.scope=i.scope;var e=ie.internal.calculateCross(i),r=[];return r.push("0.749023 g"),r.push("0 0 "+Ue(ie.internal.getWidth(i))+" "+Ue(ie.internal.getHeight(i))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Ue(ie.internal.getWidth(i)-2)+" "+Ue(ie.internal.getHeight(i)-2)+" re"),r.push("W"),r.push("n"),r.push(Ue(e.x1.x)+" "+Ue(e.x1.y)+" m"),r.push(Ue(e.x2.x)+" "+Ue(e.x2.y)+" l"),r.push(Ue(e.x4.x)+" "+Ue(e.x4.y)+" m"),r.push(Ue(e.x3.x)+" "+Ue(e.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
|
|
118
|
-
`),t},OffPushDown:function(i){var t=Na(i);t.scope=i.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Ue(ie.internal.getWidth(i))+" "+Ue(ie.internal.getHeight(i))+" re"),e.push("f"),t.stream=e.join(`
|
|
119
|
-
`),t}}},createDefaultAppearanceStream:function(i){var t=i.scope.internal.getFont(i.fontName,i.fontStyle).id,e=i.scope.__private__.encodeColorString(i.color);return"/"+t+" "+i.fontSize+" Tf "+e}};ie.internal={Bezier_C:.551915024494,calculateCross:function(i){var t=ie.internal.getWidth(i),e=ie.internal.getHeight(i),r=Math.min(t,e);return{x1:{x:(t-r)/2,y:(e-r)/2+r},x2:{x:(t-r)/2+r,y:(e-r)/2},x3:{x:(t-r)/2,y:(e-r)/2},x4:{x:(t-r)/2+r,y:(e-r)/2+r}}}},ie.internal.getWidth=function(i){var t=0;return Ze(i)==="object"&&(t=uk(i.Rect[2])),t},ie.internal.getHeight=function(i){var t=0;return Ze(i)==="object"&&(t=uk(i.Rect[3])),t};var I7=ni.addField=function(i){if(U7(this,i),!(i instanceof ga))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=i).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),i.page=i.scope.internal.getCurrentPageInfo().pageNumber,this};ni.AcroFormChoiceField=tp,ni.AcroFormListBox=ep,ni.AcroFormComboBox=rp,ni.AcroFormEditBox=Dw,ni.AcroFormButton=rn,ni.AcroFormPushButton=Ow,ni.AcroFormRadioButton=ip,ni.AcroFormCheckBox=Rw,ni.AcroFormTextField=Uu,ni.AcroFormPasswordField=Hw,ni.AcroFormAppearance=ie,ni.AcroForm={ChoiceField:tp,ListBox:ep,ComboBox:rp,EditBox:Dw,Button:rn,PushButton:Ow,RadioButton:ip,CheckBox:Rw,TextField:Uu,PasswordField:Hw,Appearance:ie},ue.AcroForm={ChoiceField:tp,ListBox:ep,ComboBox:rp,EditBox:Dw,Button:rn,PushButton:Ow,RadioButton:ip,CheckBox:Rw,TextField:Uu,PasswordField:Hw,Appearance:ie};ue.AcroForm;function OT(i){return i.reduce(function(t,e,r){return t[e]=r,t},{})}(function(i){var t="addImage_";i.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=i.__addimage__.getImageFileTypeByImageData=function(L,O){var W,R,tt,et,st,nt=e;if((O=O||e)==="RGBA"||L.data!==void 0&&L.data instanceof Uint8ClampedArray&&"height"in L&&"width"in L)return"RGBA";if(I(L))for(st in r)for(tt=r[st],W=0;W<tt.length;W+=1){for(et=!0,R=0;R<tt[W].length;R+=1)if(tt[W][R]!==void 0&&tt[W][R]!==L[R]){et=!1;break}if(et===!0){nt=st;break}}else for(st in r)for(tt=r[st],W=0;W<tt.length;W+=1){for(et=!0,R=0;R<tt[W].length;R+=1)if(tt[W][R]!==void 0&&tt[W][R]!==L.charCodeAt(R)){et=!1;break}if(et===!0){nt=st;break}}return nt===e&&O!==e&&(nt=O),nt},s=function L(O){for(var W=this.internal.write,R=this.internal.putStream,tt=(0,this.internal.getFilters)();tt.indexOf("FlateEncode")!==-1;)tt.splice(tt.indexOf("FlateEncode"),1);O.objectId=this.internal.newObject();var et=[];if(et.push({key:"Type",value:"/XObject"}),et.push({key:"Subtype",value:"/Image"}),et.push({key:"Width",value:O.width}),et.push({key:"Height",value:O.height}),O.colorSpace===w.INDEXED?et.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(O.palette.length/3-1)+" "+("sMask"in O&&O.sMask!==void 0?O.objectId+2:O.objectId+1)+" 0 R]"}):(et.push({key:"ColorSpace",value:"/"+O.colorSpace}),O.colorSpace===w.DEVICE_CMYK&&et.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),et.push({key:"BitsPerComponent",value:O.bitsPerComponent}),"decodeParameters"in O&&O.decodeParameters!==void 0&&et.push({key:"DecodeParms",value:"<<"+O.decodeParameters+">>"}),"transparency"in O&&Array.isArray(O.transparency)&&O.transparency.length>0){for(var st="",nt=0,at=O.transparency.length;nt<at;nt++)st+=O.transparency[nt]+" "+O.transparency[nt]+" ";et.push({key:"Mask",value:"["+st+"]"})}O.sMask!==void 0&&et.push({key:"SMask",value:O.objectId+1+" 0 R"});var ft=O.filter!==void 0?["/"+O.filter]:void 0;if(R({data:O.data,additionalKeyValues:et,alreadyAppliedFilters:ft,objectId:O.objectId}),W("endobj"),"sMask"in O&&O.sMask!==void 0){var ht,M=(ht=O.sMaskBitsPerComponent)!==null&&ht!==void 0?ht:O.bitsPerComponent,G={width:O.width,height:O.height,colorSpace:"DeviceGray",bitsPerComponent:M,data:O.sMask};"filter"in O&&(G.decodeParameters="/Predictor ".concat(O.predictor," /Colors 1 /BitsPerComponent ").concat(M," /Columns ").concat(O.width),G.filter=O.filter),L.call(this,G)}if(O.colorSpace===w.INDEXED){var X=this.internal.newObject();R({data:D(new Uint8Array(O.palette)),objectId:X}),W("endobj")}},A=function(){var L=this.internal.collections[t+"images"];for(var O in L)s.call(this,L[O])},a=function(){var L,O=this.internal.collections[t+"images"],W=this.internal.write;for(var R in O)W("/I"+(L=O[R]).index,L.objectId,"0","R")},o=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",A),this.internal.events.subscribe("putXobjectDict",a))},l=function(){var L=this.internal.collections[t+"images"];return o.call(this),L},h=function(){return Object.keys(this.internal.collections[t+"images"]).length},u=function(L){return typeof i["process"+L.toUpperCase()]=="function"},f=function(L){return Ze(L)==="object"&&L.nodeType===1},d=function(L,O){if(L.nodeName==="IMG"&&L.hasAttribute("src")){var W=""+L.getAttribute("src");if(W.indexOf("data:image/")===0)return Pw(unescape(W).split("base64,").pop());var R=i.loadFile(W,!0);if(R!==void 0)return R}if(L.nodeName==="CANVAS"){if(L.width===0||L.height===0)throw new Error("Given canvas must have data. Canvas width: "+L.width+", height: "+L.height);var tt;switch(O){case"PNG":tt="image/png";break;case"WEBP":tt="image/webp";break;default:tt="image/jpeg"}return Pw(L.toDataURL(tt,1).split("base64,").pop())}},g=function(L){var O=this.internal.collections[t+"images"];if(O){for(var W in O)if(L===O[W].alias)return O[W]}},m=function(L,O,W){return L||O||(L=-96,O=-96),L<0&&(L=-1*W.width*72/L/this.internal.scaleFactor),O<0&&(O=-1*W.height*72/O/this.internal.scaleFactor),L===0&&(L=O*W.width/W.height),O===0&&(O=L*W.height/W.width),[L,O]},y=function(L,O,W,R,tt,et){var st=m.call(this,W,R,tt),nt=this.internal.getCoordinateString,at=this.internal.getVerticalCoordinateString,ft=l.call(this);if(W=st[0],R=st[1],ft[tt.index]=tt,et){et*=Math.PI/180;var ht=Math.cos(et),M=Math.sin(et),G=function(rt){return rt.toFixed(4)},X=[G(ht),G(M),G(-1*M),G(ht),0,0,"cm"]}this.internal.write("q"),et?(this.internal.write([1,"0","0",1,nt(L),at(O+R),"cm"].join(" ")),this.internal.write(X.join(" ")),this.internal.write([nt(W),"0","0",nt(R),"0","0","cm"].join(" "))):this.internal.write([nt(W),"0","0",nt(R),nt(L),at(O+R),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+tt.index+" Do"),this.internal.write("Q")},w=i.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};i.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var b=i.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},C=i.__addimage__.sHashCode=function(L){var O,W,R=0;if(typeof L=="string")for(W=L.length,O=0;O<W;O++)R=(R<<5)-R+L.charCodeAt(O),R|=0;else if(I(L))for(W=L.byteLength/2,O=0;O<W;O++)R=(R<<5)-R+L[O],R|=0;return R},S=i.__addimage__.validateStringAsBase64=function(L){(L=L||"").toString().trim();var O=!0;return L.length===0&&(O=!1),L.length%4!=0&&(O=!1),/^[A-Za-z0-9+/]+$/.test(L.substr(0,L.length-2))===!1&&(O=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(L.substr(-2))===!1&&(O=!1),O},k=i.__addimage__.extractImageFromDataUrl=function(L){if(L==null||!(L=L.trim()).startsWith("data:"))return null;var O=L.indexOf(",");return O<0?null:L.substring(0,O).trim().endsWith("base64")?L.substring(O+1):null};i.__addimage__.isArrayBuffer=function(L){return L instanceof ArrayBuffer};var I=i.__addimage__.isArrayBufferView=function(L){return L instanceof Int8Array||L instanceof Uint8Array||L instanceof Uint8ClampedArray||L instanceof Int16Array||L instanceof Uint16Array||L instanceof Int32Array||L instanceof Uint32Array||L instanceof Float32Array||L instanceof Float64Array},N=i.__addimage__.binaryStringToUint8Array=function(L){for(var O=L.length,W=new Uint8Array(O),R=0;R<O;R++)W[R]=L.charCodeAt(R);return W},D=i.__addimage__.arrayBufferToBinaryString=function(L){for(var O="",W=I(L)?L:new Uint8Array(L),R=0;R<W.length;R+=8192)O+=String.fromCharCode.apply(null,W.subarray(R,R+8192));return O};i.addImage=function(){var L,O,W,R,tt,et,st,nt,at;if(typeof arguments[1]=="number"?(O=e,W=arguments[1],R=arguments[2],tt=arguments[3],et=arguments[4],st=arguments[5],nt=arguments[6],at=arguments[7]):(O=arguments[1],W=arguments[2],R=arguments[3],tt=arguments[4],et=arguments[5],st=arguments[6],nt=arguments[7],at=arguments[8]),Ze(L=arguments[0])==="object"&&!f(L)&&"imageData"in L){var ft=L;L=ft.imageData,O=ft.format||O||e,W=ft.x||W||0,R=ft.y||R||0,tt=ft.w||ft.width||tt,et=ft.h||ft.height||et,st=ft.alias||st,nt=ft.compression||nt,at=ft.rotation||ft.angle||at}var ht=this.internal.getFilters();if(nt===void 0&&ht.indexOf("FlateEncode")!==-1&&(nt="SLOW"),isNaN(W)||isNaN(R))throw new Error("Invalid coordinates passed to jsPDF.addImage");o.call(this);var M=Q.call(this,L,O,st,nt);return y.call(this,W,R,tt,et,M,at),this};var Q=function(L,O,W,R){var tt,et,st;if(typeof L=="string"&&n(L)===e){L=unescape(L);var nt=K(L,!1);(nt!==""||(nt=i.loadFile(L,!0))!==void 0)&&(L=nt)}if(f(L)&&(L=d(L,O)),O=n(L,O),!u(O))throw new Error("addImage does not support files of type '"+O+"', please ensure that a plugin for '"+O+"' support is added.");if(((st=W)==null||st.length===0)&&(W=(function(at){return typeof at=="string"||I(at)?C(at):I(at.data)?C(at.data):null})(L)),(tt=g.call(this,W))||(L instanceof Uint8Array||O==="RGBA"||(et=L,L=N(L)),tt=this["process"+O.toUpperCase()](L,h.call(this),W,(function(at){return at&&typeof at=="string"&&(at=at.toUpperCase()),at in i.image_compression?at:b.NONE})(R),et)),!tt)throw new Error("An unknown error occurred whilst processing the image.");return tt},K=i.__addimage__.convertBase64ToBinaryString=function(L,O){O=typeof O!="boolean"||O;var W,R="";if(typeof L=="string"){var tt;W=(tt=k(L))!==null&&tt!==void 0?tt:L;try{R=Pw(W)}catch(et){if(O)throw S(W)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+et.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return R};i.getImageProperties=function(L){var O,W,R="";if(f(L)&&(L=d(L)),typeof L=="string"&&n(L)===e&&((R=K(L,!1))===""&&(R=i.loadFile(L)||""),L=R),W=n(L),!u(W))throw new Error("addImage does not support files of type '"+W+"', please ensure that a plugin for '"+W+"' support is added.");if(L instanceof Uint8Array||(L=N(L)),!(O=this["process"+W.toUpperCase()](L)))throw new Error("An unknown error occurred whilst processing the image");return O.fileType=W,O}})(ue.API),(function(i){var t=function(e){if(e!==void 0&&e!="")return!0};ue.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),i.events.push(["putPage",function(e){for(var r,n,s,A=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(e.objId),l=e.pageContext.annotations,h=!1,u=0;u<l.length&&!h;u++)switch((r=l[u]).type){case"link":(t(r.options.url)||t(r.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(h!=0){this.internal.write("/Annots [");for(var f=0;f<l.length;f++){r=l[f];var d=this.internal.pdfEscape,g=this.internal.getEncryptor(e.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var m=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),w=this.internal.getEncryptor(m.objId),b=r.title||"Note";s="<</Type /Annot /Subtype /Text "+(n="/Rect ["+A(r.bounds.x)+" "+a(r.bounds.y+r.bounds.h)+" "+A(r.bounds.x+r.bounds.w)+" "+a(r.bounds.y)+"] ")+"/Contents ("+d(w(r.contents))+")",s+=" /Popup "+y.objId+" 0 R",s+=" /P "+o.objId+" 0 R",s+=" /T ("+d(w(b))+") >>",m.content=s;var C=m.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+A(r.bounds.x+30)+" "+a(r.bounds.y+r.bounds.h)+" "+A(r.bounds.x+r.bounds.w+30)+" "+a(r.bounds.y)+"] ")+" /Parent "+C,r.open&&(s+=" /Open true"),s+=" >>",y.content=s,this.internal.write(m.objId,"0 R",y.objId,"0 R");break;case"freetext":n="/Rect ["+A(r.bounds.x)+" "+a(r.bounds.y)+" "+A(r.bounds.x+r.bounds.w)+" "+a(r.bounds.y+r.bounds.h)+"] ";var S="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");s="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+d(g(r.contents))+")",s+=" /DS("+d(g(S))+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(r.options.name){var k=this.annotations._nameMap[r.options.name];r.options.pageNumber=k.page,r.options.top=k.y}else r.options.top||(r.options.top=0);if(n="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",s="",r.options.url)s="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+d(g(r.options.url))+") >>";else if(r.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,s+=" /FitV "+r.options.left+"]";break;default:var I=a(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),s+=" /XYZ "+r.options.left+" "+I+" "+r.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),i.createAnnotation=function(e){var r=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":r.pageContext.annotations.push(e)}},i.link=function(e,r,n,s,A){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:l(r),w:o(e+n),h:l(r+s)},options:A,type:"link"})},i.textWithLink=function(e,r,n,s){var A,a,o=this.getTextWidth(e),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){a=s.maxWidth;var h=this.splitTextToSize(e,a).length;A=Math.ceil(l*h)}else a=o,A=l;return this.text(e,r,n,s),n+=.2*l,s.align==="center"&&(r-=o/2),s.align==="right"&&(r-=o),this.link(r,n-l,a,A,s),o},i.getTextWidth=function(e){var r=this.internal.getFontSize();return this.getStringUnitWidth(e)*r/this.internal.scaleFactor}})(ue.API),(function(i){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];i.__arabicParser__={};var s=i.__arabicParser__.isInArabicSubstitutionA=function(m){return t[m.charCodeAt(0)]!==void 0},A=i.__arabicParser__.isArabicLetter=function(m){return typeof m=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(m)},a=i.__arabicParser__.isArabicEndLetter=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length<=2},o=i.__arabicParser__.isArabicAlfLetter=function(m){return A(m)&&n.indexOf(m.charCodeAt(0))>=0};i.__arabicParser__.arabicLetterHasIsolatedForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=1};var l=i.__arabicParser__.arabicLetterHasFinalForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=2};i.__arabicParser__.arabicLetterHasInitialForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=3};var h=i.__arabicParser__.arabicLetterHasMedialForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length==4},u=i.__arabicParser__.resolveLigatures=function(m){var y=0,w=e,b="",C=0;for(y=0;y<m.length;y+=1)w[m.charCodeAt(y)]!==void 0?(C++,typeof(w=w[m.charCodeAt(y)])=="number"&&(b+=String.fromCharCode(w),w=e,C=0),y===m.length-1&&(w=e,b+=m.charAt(y-(C-1)),y-=C-1,C=0)):(w=e,b+=m.charAt(y-C),y-=C,C=0);return b};i.__arabicParser__.isArabicDiacritic=function(m){return m!==void 0&&r[m.charCodeAt(0)]!==void 0};var f=i.__arabicParser__.getCorrectForm=function(m,y,w){return A(m)?s(m)===!1?-1:!l(m)||!A(y)&&!A(w)||!A(w)&&a(y)||a(m)&&!A(y)||a(m)&&o(y)||a(m)&&a(y)?0:h(m)&&A(y)&&!a(y)&&A(w)&&l(w)?3:a(m)||!A(w)?1:2:-1},d=function(m){var y=0,w=0,b=0,C="",S="",k="",I=(m=m||"").split("\\s+"),N=[];for(y=0;y<I.length;y+=1){for(N.push(""),w=0;w<I[y].length;w+=1)C=I[y][w],S=I[y][w-1],k=I[y][w+1],A(C)?(b=f(C,S,k),N[y]+=b!==-1?String.fromCharCode(t[C.charCodeAt(0)][b]):C):N[y]+=C;N[y]=u(N[y])}return N.join(" ")},g=i.__arabicParser__.processArabic=i.processArabic=function(){var m,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,w=[];if(Array.isArray(y)){var b=0;for(w=[],b=0;b<y.length;b+=1)Array.isArray(y[b])?w.push([d(y[b][0]),y[b][1],y[b][2]]):w.push([d(y[b])]);m=w}else m=d(y);return typeof arguments[0]=="string"?m:(arguments[0].text=m,arguments[0])};i.events.push(["preProcessText",g])})(ue.API),ue.API.autoPrint=function(i){var t;return(i=i||{}).variant=i.variant||"non-conform",i.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(i){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(a){e=a}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(a){r=isNaN(a)||Number.isInteger(a)===!1||a<0?150:a,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(a){n=isNaN(a)||Number.isInteger(a)===!1||a<0?300:a,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(a){s=a}});var A={};Object.defineProperty(this,"style",{get:function(){return A},set:function(a){A=a}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,r){var n;if((e=e||"2d")!=="2d")return null;for(n in r)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=r[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},i.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(ue.API),(function(i){var t={left:0,top:0,bottom:0,right:0},e=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),n.call(this))},n=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var o=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return o},set:function(m){o=m}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(m){l=m}});var h=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return h},set:function(m){h=m}});var u=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return u},set:function(m){u=m}});var f=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return f},set:function(m){f=m}});var d=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return d},set:function(m){d=m}});var g=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return g},set:function(m){g=m}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},i.setHeaderFunction=function(o){return r.call(this),this.internal.__cell__.headerFunction=typeof o=="function"?o:void 0,this},i.getTextDimensions=function(o,l){r.call(this);var h=(l=l||{}).fontSize||this.getFontSize(),u=l.font||this.getFont(),f=l.scaleFactor||this.internal.scaleFactor,d=0,g=0,m=0,y=this;if(!Array.isArray(o)&&typeof o!="string"){if(typeof o!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");o=String(o)}var w=l.maxWidth;w>0?typeof o=="string"?o=this.splitTextToSize(o,w):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(C,S){return C.concat(y.splitTextToSize(S,w))},[])):o=Array.isArray(o)?o:[o];for(var b=0;b<o.length;b++)d<(m=this.getStringUnitWidth(o[b],{font:u})*h)&&(d=m);return d!==0&&(g=o.length),{w:d/=f,h:Math.max((g*h*this.getLineHeightFactor()-h*(this.getLineHeightFactor()-1))/f,0)}},i.cellAddPage=function(){r.call(this),this.addPage();var o=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new s(o.left,o.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var A=i.cell=function(){var o;o=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var l=this.internal.__cell__.lastCell,h=this.internal.__cell__.padding,u=this.internal.__cell__.margins||t,f=this.internal.__cell__.tableHeaderRow,d=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===o.lineNumber?(o.x=(l.x||0)+(l.width||0),o.y=l.y||0):l.y+l.height+o.height+u.bottom>this.getPageHeight()?(this.cellAddPage(),o.y=u.top,d&&f&&(this.printHeaderRow(o.lineNumber,!0),o.y+=f[0].height)):o.y=l.y+l.height||o.y),o.text[0]!==void 0&&(this.rect(o.x,o.y,o.width,o.height,e===!0?"FD":void 0),o.align==="right"?this.text(o.text,o.x+o.width-h,o.y+h,{align:"right",baseline:"top"}):o.align==="center"?this.text(o.text,o.x+o.width/2,o.y+h,{align:"center",baseline:"top",maxWidth:o.width-h-h}):this.text(o.text,o.x+h,o.y+h,{align:"left",baseline:"top",maxWidth:o.width-h-h})),this.internal.__cell__.lastCell=o,this};i.table=function(o,l,h,u,f){if(r.call(this),!h)throw new Error("No data for PDF table.");var d,g,m,y,w=[],b=[],C=[],S={},k={},I=[],N=[],D=(f=f||{}).autoSize||!1,Q=f.printHeaders!==!1,K=f.css&&f.css["font-size"]!==void 0?16*f.css["font-size"]:f.fontSize||12,L=f.margins||Object.assign({width:this.getPageWidth()},t),O=typeof f.padding=="number"?f.padding:3,W=f.headerBackgroundColor||"#c8c8c8",R=f.headerTextColor||"#000";if(n.call(this),this.internal.__cell__.printHeaders=Q,this.internal.__cell__.margins=L,this.internal.__cell__.table_font_size=K,this.internal.__cell__.padding=O,this.internal.__cell__.headerBackgroundColor=W,this.internal.__cell__.headerTextColor=R,this.setFontSize(K),u==null)b=w=Object.keys(h[0]),C=w.map(function(){return"left"});else if(Array.isArray(u)&&Ze(u[0])==="object")for(w=u.map(function(ft){return ft.name}),b=u.map(function(ft){return ft.prompt||ft.name||""}),C=u.map(function(ft){return ft.align||"left"}),d=0;d<u.length;d+=1)k[u[d].name]=.7499990551181103*u[d].width;else Array.isArray(u)&&typeof u[0]=="string"&&(b=w=u,C=w.map(function(){return"left"}));if(D||Array.isArray(u)&&typeof u[0]=="string")for(d=0;d<w.length;d+=1){for(S[y=w[d]]=h.map(function(ft){return ft[y]}),this.setFont(void 0,"bold"),I.push(this.getTextDimensions(b[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),g=S[y],this.setFont(void 0,"normal"),m=0;m<g.length;m+=1)I.push(this.getTextDimensions(g[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);k[y]=Math.max.apply(null,I)+O+O,I=[]}if(Q){var tt={};for(d=0;d<w.length;d+=1)tt[w[d]]={},tt[w[d]].text=b[d],tt[w[d]].align=C[d];var et=a.call(this,tt,k);N=w.map(function(ft){return new s(o,l,k[ft],et,tt[ft].text,void 0,tt[ft].align)}),this.setTableHeaderRow(N),this.printHeaderRow(1,!1)}var st=u.reduce(function(ft,ht){return ft[ht.name]=ht.align,ft},{});for(d=0;d<h.length;d+=1){"rowStart"in f&&f.rowStart instanceof Function&&f.rowStart({row:d,data:h[d]},this);var nt=a.call(this,h[d],k);for(m=0;m<w.length;m+=1){var at=h[d][w[m]];"cellStart"in f&&f.cellStart instanceof Function&&f.cellStart({row:d,col:m,data:at},this),A.call(this,new s(o,l,k[w[m]],nt,at,d+2,st[w[m]]))}}return this.internal.__cell__.table_x=o,this.internal.__cell__.table_y=l,this};var a=function(o,l){var h=this.internal.__cell__.padding,u=this.internal.__cell__.table_font_size,f=this.internal.scaleFactor;return Object.keys(o).map(function(d){var g=o[d];return this.splitTextToSize(g.hasOwnProperty("text")?g.text:g,l[d]-h-h)},this).map(function(d){return this.getLineHeightFactor()*d.length*u/f+h+h},this).reduce(function(d,g){return Math.max(d,g)},0)};i.setTableHeaderRow=function(o){r.call(this),this.internal.__cell__.tableHeaderRow=o},i.printHeaderRow=function(o,l){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var h;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var u=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(u[0],u[1],u[2],u[3],void 0,-1)}this.setFont(void 0,"bold");for(var f=[],d=0;d<this.internal.__cell__.tableHeaderRow.length;d+=1){h=this.internal.__cell__.tableHeaderRow[d].clone(),l&&(h.y=this.internal.__cell__.margins.top||0,f.push(h)),h.lineNumber=o;var g=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),A.call(this,h),this.setTextColor(g)}f.length>0&&this.setTableHeaderRow(f),this.setFont(void 0,"normal"),e=!1}})(ue.API);var RT={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},HT=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],nF=OT(HT),VT=[100,200,300,400,500,600,700,800,900],Q7=OT(VT);function xB(i){var t=i.family.replace(/"|'/g,"").toLowerCase(),e=(function(s){return RT[s=s||"normal"]?s:"normal"})(i.style),r=(function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400})(i.weight),n=(function(s){return typeof nF[s=s||"normal"]=="number"?s:"normal"})(i.stretch);return{family:t,style:e,weight:r,stretch:n,src:i.src||[],ref:i.ref||{name:t,style:[n,e,r].join(" ")}}}function dk(i,t,e,r){var n;for(n=e;n>=0&&n<t.length;n+=r)if(i[t[n]])return i[t[n]];for(n=e;n>=0&&n<t.length;n-=r)if(i[t[n]])return i[t[n]]}var L7={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},fk={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function pk(i){return[i.stretch,i.style,i.weight,i.family].join(" ")}function gk(i){return i.trimLeft()}function _7(i,t){for(var e=0;e<i.length;){if(i.charAt(e)===t)return[i.substring(0,e),i.substring(e+1)];e+=1}return null}function M7(i){var t=i.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],i.substring(t[0].length)]}var pd,G1,mk,wk,vk,yk=["times"];function bk(i,t,e,r,n){var s=4,A=Ck;switch(n){case ue.API.image_compression.FAST:s=1,A=Bk;break;case ue.API.image_compression.MEDIUM:s=6,A=xk;break;case ue.API.image_compression.SLOW:s=9,A=Fk}i=(function(o,l,h,u){for(var f,d=o.length/l,g=new Uint8Array(o.length+d),m=[T7,Bk,Ck,xk,Fk],y=0;y<d;y+=1){var w=y*l,b=o.subarray(w,w+l);if(u)g.set(u(b,h,f),w+y);else{for(var C=m.length,S=[],k=0;k<C;k+=1)S[k]=m[k](b,h,f);var I=P7(S.concat());g.set(S[I],w+y)}f=b}return g})(i,t,Math.ceil(e*r/8),A);var a=$x(i,{level:s});return ue.API.__addimage__.arrayBufferToBinaryString(a)}function T7(i){var t=Array.apply([],i);return t.unshift(0),t}function Bk(i,t){var e=i.length,r=[];r[0]=1;for(var n=0;n<e;n+=1){var s=i[n-t]||0;r[n+1]=i[n]-s+256&255}return r}function Ck(i,t,e){var r=i.length,n=[];n[0]=2;for(var s=0;s<r;s+=1){var A=e&&e[s]||0;n[s+1]=i[s]-A+256&255}return n}function xk(i,t,e){var r=i.length,n=[];n[0]=3;for(var s=0;s<r;s+=1){var A=i[s-t]||0,a=e&&e[s]||0;n[s+1]=i[s]+256-(A+a>>>1)&255}return n}function Fk(i,t,e){var r=i.length,n=[];n[0]=4;for(var s=0;s<r;s+=1){var A=N7(i[s-t]||0,e&&e[s]||0,e&&e[s-t]||0);n[s+1]=i[s]-A+256&255}return n}function N7(i,t,e){if(i===t&&t===e)return i;var r=Math.abs(t-e),n=Math.abs(i-e),s=Math.abs(i+t-e-e);return r<=n&&r<=s?i:n<=s?t:e}function P7(i){var t=i.map(function(e){return e.reduce(function(r,n){return r+Math.abs(n)},0)});return t.indexOf(Math.min.apply(null,t))}function FB(i,t,e){var r=t*e,n=Math.floor(r/8),s=16-(r-8*n+e),A=(1<<e)-1;return WT(i,n)>>s&A}function Sk(i,t,e,r){var n=e*r,s=Math.floor(n/8),A=16-(n-8*s+r),a=(1<<r)-1,o=(t&a)<<A;(function(l,h,u){if(h+1<l.byteLength)l.setUint16(h,u,!1);else{var f=u>>8&255;l.setUint8(h,f)}})(i,s,WT(i,s)&~(a<<A)&65535|o)}function WT(i,t){return t+1<i.byteLength?i.getUint16(t,!1):i.getUint8(t)<<8}function D7(i){var t=0;if(i[t++]!==71||i[t++]!==73||i[t++]!==70||i[t++]!==56||(i[t++]+1&253)!=56||i[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=i[t++]|i[t++]<<8,r=i[t++]|i[t++]<<8,n=i[t++],s=n>>7,A=1<<1+(7&n);i[t++],i[t++];var a=null,o=null;s&&(a=t,o=A,t+=3*A);var l=!0,h=[],u=0,f=null,d=0,g=null;for(this.width=e,this.height=r;l&&t<i.length;)switch(i[t++]){case 33:switch(i[t++]){case 255:if(i[t]!==11||i[t+1]==78&&i[t+2]==69&&i[t+3]==84&&i[t+4]==83&&i[t+5]==67&&i[t+6]==65&&i[t+7]==80&&i[t+8]==69&&i[t+9]==50&&i[t+10]==46&&i[t+11]==48&&i[t+12]==3&&i[t+13]==1&&i[t+16]==0)t+=14,g=i[t++]|i[t++]<<8,t++;else for(t+=12;;){if(!((L=i[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;case 249:if(i[t++]!==4||i[t+4]!==0)throw new Error("Invalid graphics extension block.");var m=i[t++];u=i[t++]|i[t++]<<8,f=i[t++],1&m||(f=null),d=m>>2&7,t++;break;case 254:for(;;){if(!((L=i[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}break;default:throw new Error("Unknown graphic control label: 0x"+i[t-1].toString(16))}break;case 44:var y=i[t++]|i[t++]<<8,w=i[t++]|i[t++]<<8,b=i[t++]|i[t++]<<8,C=i[t++]|i[t++]<<8,S=i[t++],k=S>>6&1,I=1<<1+(7&S),N=a,D=o,Q=!1;S>>7&&(Q=!0,N=t,D=I,t+=3*I);var K=t;for(t++;;){var L;if(!((L=i[t++])>=0))throw Error("Invalid block size");if(L===0)break;t+=L}h.push({x:y,y:w,width:b,height:C,has_local_palette:Q,palette_offset:N,palette_size:D,data_offset:K,data_length:t-K,transparent_index:f,interlaced:!!k,delay:u,disposal:d});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+i[t-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return g},this.frameInfo=function(O){if(O<0||O>=h.length)throw new Error("Frame index out of range.");return h[O]},this.decodeAndBlitFrameBGRA=function(O,W){var R=this.frameInfo(O),tt=R.width*R.height;if(tt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var et=new Uint8Array(tt);Ek(i,R.data_offset,et,tt);var st=R.palette_offset,nt=R.transparent_index;nt===null&&(nt=256);var at=R.width,ft=e-at,ht=at,M=4*(R.y*e+R.x),G=4*((R.y+R.height)*e+R.x),X=M,rt=4*ft;R.interlaced===!0&&(rt+=4*e*7);for(var it=8,ot=0,gt=et.length;ot<gt;++ot){var vt=et[ot];if(ht===0&&(ht=at,(X+=rt)>=G&&(rt=4*ft+4*e*(it-1),X=M+(at+ft)*(it<<1),it>>=1)),vt===nt)X+=4;else{var yt=i[st+3*vt],St=i[st+3*vt+1],Dt=i[st+3*vt+2];W[X++]=Dt,W[X++]=St,W[X++]=yt,W[X++]=255}--ht}},this.decodeAndBlitFrameRGBA=function(O,W){var R=this.frameInfo(O),tt=R.width*R.height;if(tt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var et=new Uint8Array(tt);Ek(i,R.data_offset,et,tt);var st=R.palette_offset,nt=R.transparent_index;nt===null&&(nt=256);var at=R.width,ft=e-at,ht=at,M=4*(R.y*e+R.x),G=4*((R.y+R.height)*e+R.x),X=M,rt=4*ft;R.interlaced===!0&&(rt+=4*e*7);for(var it=8,ot=0,gt=et.length;ot<gt;++ot){var vt=et[ot];if(ht===0&&(ht=at,(X+=rt)>=G&&(rt=4*ft+4*e*(it-1),X=M+(at+ft)*(it<<1),it>>=1)),vt===nt)X+=4;else{var yt=i[st+3*vt],St=i[st+3*vt+1],Dt=i[st+3*vt+2];W[X++]=yt,W[X++]=St,W[X++]=Dt,W[X++]=255}--ht}}}function Ek(i,t,e,r){for(var n=i[t++],s=1<<n,A=s+1,a=A+1,o=n+1,l=(1<<o)-1,h=0,u=0,f=0,d=i[t++],g=new Int32Array(4096),m=null;;){for(;h<16&&d!==0;)u|=i[t++]<<h,h+=8,d===1?d=i[t++]:--d;if(h<o)break;var y=u&l;if(u>>=o,h-=o,y!==s){if(y===A)break;for(var w=y<a?y:m,b=0,C=w;C>s;)C=g[C]>>8,++b;var S=C;if(f+b+(w!==y?1:0)>r)return void vr.log("Warning, gif stream longer than expected.");e[f++]=S;var k=f+=b;for(w!==y&&(e[f++]=S),C=w;b--;)C=g[C],e[--k]=255&C,C>>=8;m!==null&&a<4096&&(g[a++]=m<<8|S,a>=l+1&&o<12&&(++o,l=l<<1|1)),m=y}else a=A+1,l=(1<<(o=n+1))-1,m=null}return f!==r&&vr.log("Warning, gif stream shorter than expected."),e}/**
|
|
120
|
-
* @license
|
|
121
|
-
Copyright (c) 2008, Adobe Systems Incorporated
|
|
122
|
-
All rights reserved.
|
|
123
|
-
|
|
124
|
-
Redistribution and use in source and binary forms, with or without
|
|
125
|
-
modification, are permitted provided that the following conditions are
|
|
126
|
-
met:
|
|
127
|
-
|
|
128
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
129
|
-
this list of conditions and the following disclaimer.
|
|
130
|
-
|
|
131
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
132
|
-
notice, this list of conditions and the following disclaimer in the
|
|
133
|
-
documentation and/or other materials provided with the distribution.
|
|
134
|
-
|
|
135
|
-
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
136
|
-
contributors may be used to endorse or promote products derived from
|
|
137
|
-
this software without specific prior written permission.
|
|
138
|
-
|
|
139
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
140
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
141
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
142
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
143
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
144
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
145
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
146
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
147
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
148
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
149
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
150
|
-
*/function SB(i){var t,e,r,n,s,A=Math.floor,a=new Array(64),o=new Array(64),l=new Array(64),h=new Array(64),u=new Array(65535),f=new Array(65535),d=new Array(64),g=new Array(64),m=[],y=0,w=7,b=new Array(64),C=new Array(64),S=new Array(64),k=new Array(256),I=new Array(2048),N=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],D=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Q=[0,1,2,3,4,5,6,7,8,9,10,11],K=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],L=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],O=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],tt=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function et(M,G){for(var X=0,rt=0,it=new Array,ot=1;ot<=16;ot++){for(var gt=1;gt<=M[ot];gt++)it[G[rt]]=[],it[G[rt]][0]=X,it[G[rt]][1]=ot,rt++,X++;X*=2}return it}function st(M){for(var G=M[0],X=M[1]-1;X>=0;)G&1<<X&&(y|=1<<w),X--,--w<0&&(y==255?(nt(255),nt(0)):nt(y),w=7,y=0)}function nt(M){m.push(M)}function at(M){nt(M>>8&255),nt(255&M)}function ft(M,G,X,rt,it){for(var ot,gt=it[0],vt=it[240],yt=(function(Et,re){var Ot,zt,Yt,xt,Rt,Ht,Kt,te,Wt,ne,Gt=0;for(Wt=0;Wt<8;++Wt){Ot=Et[Gt],zt=Et[Gt+1],Yt=Et[Gt+2],xt=Et[Gt+3],Rt=Et[Gt+4],Ht=Et[Gt+5],Kt=Et[Gt+6];var Ve=Ot+(te=Et[Gt+7]),Te=Ot-te,be=zt+Kt,Be=zt-Kt,ze=Yt+Ht,Ae=Yt-Ht,Ne=xt+Rt,le=xt-Rt,ye=Ve+Ne,Ye=Ve-Ne,we=be+ze,ve=be-ze;Et[Gt]=ye+we,Et[Gt+4]=ye-we;var je=.707106781*(ve+Ye);Et[Gt+2]=Ye+je,Et[Gt+6]=Ye-je;var co=.382683433*((ye=le+Ae)-(ve=Be+Te)),Yr=.5411961*ye+co,OA=1.306562965*ve+co,aA=.707106781*(we=Ae+Be),qt=Te+aA,Fn=Te-aA;Et[Gt+5]=Fn+Yr,Et[Gt+3]=Fn-Yr,Et[Gt+1]=qt+OA,Et[Gt+7]=qt-OA,Gt+=8}for(Gt=0,Wt=0;Wt<8;++Wt){Ot=Et[Gt],zt=Et[Gt+8],Yt=Et[Gt+16],xt=Et[Gt+24],Rt=Et[Gt+32],Ht=Et[Gt+40],Kt=Et[Gt+48];var RA=Ot+(te=Et[Gt+56]),qn=Ot-te,Sn=zt+Kt,Er=zt-Kt,oi=Yt+Ht,Hi=Yt-Ht,Xn=xt+Rt,En=xt-Rt,gs=RA+Xn,Ns=RA-Xn,ms=Sn+oi,kn=Sn-oi;Et[Gt]=gs+ms,Et[Gt+32]=gs-ms;var Zi=.707106781*(kn+Ns);Et[Gt+16]=Ns+Zi,Et[Gt+48]=Ns-Zi;var oA=.382683433*((gs=En+Hi)-(kn=Er+qn)),Ei=.5411961*gs+oA,Ba=1.306562965*kn+oA,uo=.707106781*(ms=Hi+Er),Cl=qn+uo,fo=qn-uo;Et[Gt+40]=fo+Ei,Et[Gt+24]=fo-Ei,Et[Gt+8]=Cl+Ba,Et[Gt+56]=Cl-Ba,Gt++}for(Wt=0;Wt<64;++Wt)ne=Et[Wt]*re[Wt],d[Wt]=ne>0?ne+.5|0:ne-.5|0;return d})(M,G),St=0;St<64;++St)g[N[St]]=yt[St];var Dt=g[0]-X;X=g[0],Dt==0?st(rt[0]):(st(rt[f[ot=32767+Dt]]),st(u[ot]));for(var Tt=63;Tt>0&&g[Tt]==0;)Tt--;if(Tt==0)return st(gt),X;for(var jt,q=1;q<=Tt;){for(var Mt=q;g[q]==0&&q<=Tt;)++q;var fe=q-Mt;if(fe>=16){jt=fe>>4;for(var Zt=1;Zt<=jt;++Zt)st(vt);fe&=15}ot=32767+g[q],st(it[(fe<<4)+f[ot]]),st(u[ot]),q++}return Tt!=63&&st(gt),X}function ht(M){M=Math.min(Math.max(M,1),100),s!=M&&((function(G){for(var X=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],rt=0;rt<64;rt++){var it=A((X[rt]*G+50)/100);it=Math.min(Math.max(it,1),255),a[N[rt]]=it}for(var ot=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],gt=0;gt<64;gt++){var vt=A((ot[gt]*G+50)/100);vt=Math.min(Math.max(vt,1),255),o[N[gt]]=vt}for(var yt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],St=0,Dt=0;Dt<8;Dt++)for(var Tt=0;Tt<8;Tt++)l[St]=1/(a[N[St]]*yt[Dt]*yt[Tt]*8),h[St]=1/(o[N[St]]*yt[Dt]*yt[Tt]*8),St++})(M<50?Math.floor(5e3/M):Math.floor(200-2*M)),s=M)}this.encode=function(M,G){G&&ht(G),m=new Array,y=0,w=7,at(65496),at(65504),at(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),at(1),at(1),nt(0),nt(0),(function(){at(65499),at(132),nt(0);for(var zt=0;zt<64;zt++)nt(a[zt]);nt(1);for(var Yt=0;Yt<64;Yt++)nt(o[Yt])})(),(function(zt,Yt){at(65472),at(17),nt(8),at(Yt),at(zt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)})(M.width,M.height),(function(){at(65476),at(418),nt(0);for(var zt=0;zt<16;zt++)nt(D[zt+1]);for(var Yt=0;Yt<=11;Yt++)nt(Q[Yt]);nt(16);for(var xt=0;xt<16;xt++)nt(K[xt+1]);for(var Rt=0;Rt<=161;Rt++)nt(L[Rt]);nt(1);for(var Ht=0;Ht<16;Ht++)nt(O[Ht+1]);for(var Kt=0;Kt<=11;Kt++)nt(W[Kt]);nt(17);for(var te=0;te<16;te++)nt(R[te+1]);for(var Wt=0;Wt<=161;Wt++)nt(tt[Wt])})(),at(65498),at(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var X=0,rt=0,it=0;y=0,w=7,this.encode.displayName="_encode_";for(var ot,gt,vt,yt,St,Dt,Tt,jt,q,Mt=M.data,fe=M.width,Zt=M.height,Et=4*fe,re=0;re<Zt;){for(ot=0;ot<Et;){for(St=Et*re+ot,Tt=-1,jt=0,q=0;q<64;q++)Dt=St+(jt=q>>3)*Et+(Tt=4*(7&q)),re+jt>=Zt&&(Dt-=Et*(re+1+jt-Zt)),ot+Tt>=Et&&(Dt-=ot+Tt-Et+4),gt=Mt[Dt++],vt=Mt[Dt++],yt=Mt[Dt++],b[q]=(I[gt]+I[vt+256|0]+I[yt+512|0]>>16)-128,C[q]=(I[gt+768|0]+I[vt+1024|0]+I[yt+1280|0]>>16)-128,S[q]=(I[gt+1280|0]+I[vt+1536|0]+I[yt+1792|0]>>16)-128;X=ft(b,l,X,t,r),rt=ft(C,h,rt,e,n),it=ft(S,h,it,e,n),ot+=32}re+=8}if(w>=0){var Ot=[];Ot[1]=w+1,Ot[0]=(1<<w+1)-1,st(Ot)}return at(65497),new Uint8Array(m)},i=i||50,(function(){for(var M=String.fromCharCode,G=0;G<256;G++)k[G]=M(G)})(),t=et(D,Q),e=et(O,W),r=et(K,L),n=et(R,tt),(function(){for(var M=1,G=2,X=1;X<=15;X++){for(var rt=M;rt<G;rt++)f[32767+rt]=X,u[32767+rt]=[],u[32767+rt][1]=X,u[32767+rt][0]=rt;for(var it=-(G-1);it<=-M;it++)f[32767+it]=X,u[32767+it]=[],u[32767+it][1]=X,u[32767+it][0]=G-1+it;M<<=1,G<<=1}})(),(function(){for(var M=0;M<256;M++)I[M]=19595*M,I[M+256|0]=38470*M,I[M+512|0]=7471*M+32768,I[M+768|0]=-11059*M,I[M+1024|0]=-21709*M,I[M+1280|0]=32768*M+8421375,I[M+1536|0]=-27439*M,I[M+1792|0]=-5329*M})(),ht(i)}/**
|
|
151
|
-
* @license
|
|
152
|
-
* Copyright (c) 2017 Aras Abbasi
|
|
153
|
-
*
|
|
154
|
-
* Licensed under the MIT License.
|
|
155
|
-
* http://opensource.org/licenses/mit-license
|
|
156
|
-
*/function GA(i,t){if(this.pos=0,this.buffer=i,this.datav=new DataView(i.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function kk(i){function t(Q){if(!Q)throw Error("assert :P")}function e(Q,K,L){for(var O=0;4>O;O++)if(Q[K+O]!=L.charCodeAt(O))return!0;return!1}function r(Q,K,L,O,W){for(var R=0;R<W;R++)Q[K+R]=L[O+R]}function n(Q,K,L,O){for(var W=0;W<O;W++)Q[K+W]=L}function s(Q){return new Int32Array(Q)}function A(Q,K){for(var L=[],O=0;O<Q;O++)L.push(new K);return L}function a(Q,K){var L=[];return(function O(W,R,tt){for(var et=tt[R],st=0;st<et&&(W.push(tt.length>R+1?[]:new K),!(tt.length<R+1));st++)O(W[st],R+1,tt)})(L,0,Q),L}var o=function(){var Q=this;function K(p,v){for(var x=1<<v-1>>>0;p&x;)x>>>=1;return x?(p&x-1)+x:p}function L(p,v,x,E,P){t(!(E%x));do p[v+(E-=x)]=P;while(0<E)}function O(p,v,x,E,P){if(t(2328>=P),512>=P)var H=s(512);else if((H=s(P))==null)return 0;return(function(V,j,z,Z,lt,wt){var J,ct,pt=j,Bt=1<<z,mt=s(16),Ct=s(16);for(t(lt!=0),t(Z!=null),t(V!=null),t(0<z),ct=0;ct<lt;++ct){if(15<Z[ct])return 0;++mt[Z[ct]]}if(mt[0]==lt)return 0;for(Ct[1]=0,J=1;15>J;++J){if(mt[J]>1<<J)return 0;Ct[J+1]=Ct[J]+mt[J]}for(ct=0;ct<lt;++ct)J=Z[ct],0<Z[ct]&&(wt[Ct[J]++]=ct);if(Ct[15]==1)return(Z=new W).g=0,Z.value=wt[0],L(V,pt,1,Bt,Z),Bt;var Ft,Lt=-1,It=Bt-1,de=0,ee=1,Pe=1,he=1<<z;for(ct=0,J=1,lt=2;J<=z;++J,lt<<=1){if(ee+=Pe<<=1,0>(Pe-=mt[J]))return 0;for(;0<mt[J];--mt[J])(Z=new W).g=J,Z.value=wt[ct++],L(V,pt+de,lt,he,Z),de=K(de,J)}for(J=z+1,lt=2;15>=J;++J,lt<<=1){if(ee+=Pe<<=1,0>(Pe-=mt[J]))return 0;for(;0<mt[J];--mt[J]){if(Z=new W,(de&It)!=Lt){for(pt+=he,Ft=1<<(Lt=J)-z;15>Lt&&!(0>=(Ft-=mt[Lt]));)++Lt,Ft<<=1;Bt+=he=1<<(Ft=Lt-z),V[j+(Lt=de&It)].g=Ft+z,V[j+Lt].value=pt-j-Lt}Z.g=J-z,Z.value=wt[ct++],L(V,pt+(de>>z),lt,he,Z),de=K(de,J)}}return ee!=2*Ct[15]-1?0:Bt})(p,v,x,E,P,H)}function W(){this.value=this.g=0}function R(){this.value=this.g=0}function tt(){this.G=A(5,W),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=A(Ad,R)}function et(p,v,x,E){t(p!=null),t(v!=null),t(2147483648>E),p.Ca=254,p.I=0,p.b=-8,p.Ka=0,p.oa=v,p.pa=x,p.Jd=v,p.Yc=x+E,p.Zc=4<=E?x+E-4+1:x,gt(p)}function st(p,v){for(var x=0;0<v--;)x|=yt(p,128)<<v;return x}function nt(p,v){var x=st(p,v);return vt(p)?-x:x}function at(p,v,x,E){var P,H=0;for(t(p!=null),t(v!=null),t(4294967288>E),p.Sb=E,p.Ra=0,p.u=0,p.h=0,4<E&&(E=4),P=0;P<E;++P)H+=v[x+P]<<8*P;p.Ra=H,p.bb=E,p.oa=v,p.pa=x}function ft(p){for(;8<=p.u&&p.bb<p.Sb;)p.Ra>>>=8,p.Ra+=p.oa[p.pa+p.bb]<<Jn-8>>>0,++p.bb,p.u-=8;rt(p)&&(p.h=1,p.u=0)}function ht(p,v){if(t(0<=v),!p.h&&v<=Hp){var x=X(p)&sc[v];return p.u+=v,ft(p),x}return p.h=1,p.u=0}function M(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function G(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function X(p){return p.Ra>>>(p.u&Jn-1)>>>0}function rt(p){return t(p.bb<=p.Sb),p.h||p.bb==p.Sb&&p.u>Jn}function it(p,v){p.u=v,p.h=rt(p)}function ot(p){p.u>=vs&&(t(p.u>=vs),ft(p))}function gt(p){t(p!=null&&p.oa!=null),p.pa<p.Zc?(p.I=(p.oa[p.pa++]|p.I<<8)>>>0,p.b+=8):(t(p!=null&&p.oa!=null),p.pa<p.Yc?(p.b+=8,p.I=p.oa[p.pa++]|p.I<<8):p.Ka?p.b=0:(p.I<<=8,p.b+=8,p.Ka=1))}function vt(p){return st(p,1)}function yt(p,v){var x=p.Ca;0>p.b&>(p);var E=p.b,P=x*v>>>8,H=(p.I>>>E>P)+0;for(H?(x-=P,p.I-=P+1<<E>>>0):x=P+1,E=x,P=0;256<=E;)P+=8,E>>=8;return E=7^P+ad[E],p.b-=E,p.Ca=(x<<E)-1,H}function St(p,v,x){p[v+0]=x>>24&255,p[v+1]=x>>16&255,p[v+2]=x>>8&255,p[v+3]=255&x}function Dt(p,v){return p[v+0]|p[v+1]<<8}function Tt(p,v){return Dt(p,v)|p[v+2]<<16}function jt(p,v){return Dt(p,v)|Dt(p,v+2)<<16}function q(p,v){var x=1<<v;return t(p!=null),t(0<v),p.X=s(x),p.X==null?0:(p.Mb=32-v,p.Xa=v,1)}function Mt(p,v){t(p!=null),t(v!=null),t(p.Xa==v.Xa),r(v.X,0,p.X,0,1<<v.Xa)}function fe(){this.X=[],this.Xa=this.Mb=0}function Zt(p,v,x,E){t(x!=null),t(E!=null);var P=x[0],H=E[0];return P==0&&(P=(p*H+v/2)/v),H==0&&(H=(v*P+p/2)/p),0>=P||0>=H?0:(x[0]=P,E[0]=H,1)}function Et(p,v){return p+(1<<v)-1>>>v}function re(p,v){return((4278255360&p)+(4278255360&v)>>>0&4278255360)+((16711935&p)+(16711935&v)>>>0&16711935)>>>0}function Ot(p,v){Q[v]=function(x,E,P,H,V,j,z){var Z;for(Z=0;Z<V;++Z){var lt=Q[p](j[z+Z-1],P,H+Z);j[z+Z]=re(x[E+Z],lt)}}}function zt(){this.ud=this.hd=this.jd=0}function Yt(p,v){return((4278124286&(p^v))>>>1)+(p&v)>>>0}function xt(p){return 0<=p&&256>p?p:0>p?0:255<p?255:void 0}function Rt(p,v){return xt(p+(p-v+.5>>1))}function Ht(p,v,x){return Math.abs(v-x)-Math.abs(p-x)}function Kt(p,v,x,E,P,H,V){for(E=H[V-1],x=0;x<P;++x)H[V+x]=E=re(p[v+x],E)}function te(p,v,x,E,P){var H;for(H=0;H<x;++H){var V=p[v+H],j=V>>8&255,z=16711935&(z=(z=16711935&V)+((j<<16)+j));E[P+H]=(4278255360&V)+z>>>0}}function Wt(p,v){v.jd=255&p,v.hd=p>>8&255,v.ud=p>>16&255}function ne(p,v,x,E,P,H){var V;for(V=0;V<E;++V){var j=v[x+V],z=j>>>8,Z=j,lt=255&(lt=(lt=j>>>16)+((p.jd<<24>>24)*(z<<24>>24)>>>5));Z=255&(Z=(Z+=(p.hd<<24>>24)*(z<<24>>24)>>>5)+((p.ud<<24>>24)*(lt<<24>>24)>>>5)),P[H+V]=(4278255360&j)+(lt<<16)+Z}}function Gt(p,v,x,E,P){Q[v]=function(H,V,j,z,Z,lt,wt,J,ct){for(z=wt;z<J;++z)for(wt=0;wt<ct;++wt)Z[lt++]=P(j[E(H[V++])])},Q[p]=function(H,V,j,z,Z,lt,wt){var J=8>>H.b,ct=H.Ea,pt=H.K[0],Bt=H.w;if(8>J)for(H=(1<<H.b)-1,Bt=(1<<J)-1;V<j;++V){var mt,Ct=0;for(mt=0;mt<ct;++mt)mt&H||(Ct=E(z[Z++])),lt[wt++]=P(pt[Ct&Bt]),Ct>>=J}else Q["VP8LMapColor"+x](z,Z,pt,Bt,lt,wt,V,j,ct)}}function Ve(p,v,x,E,P){for(x=v+x;v<x;){var H=p[v++];E[P++]=H>>16&255,E[P++]=H>>8&255,E[P++]=255&H}}function Te(p,v,x,E,P){for(x=v+x;v<x;){var H=p[v++];E[P++]=H>>16&255,E[P++]=H>>8&255,E[P++]=255&H,E[P++]=H>>24&255}}function be(p,v,x,E,P){for(x=v+x;v<x;){var H=(V=p[v++])>>16&240|V>>12&15,V=240&V|V>>28&15;E[P++]=H,E[P++]=V}}function Be(p,v,x,E,P){for(x=v+x;v<x;){var H=(V=p[v++])>>16&248|V>>13&7,V=V>>5&224|V>>3&31;E[P++]=H,E[P++]=V}}function ze(p,v,x,E,P){for(x=v+x;v<x;){var H=p[v++];E[P++]=255&H,E[P++]=H>>8&255,E[P++]=H>>16&255}}function Ae(p,v,x,E,P,H){if(H==0)for(x=v+x;v<x;)St(E,((H=p[v++])[0]>>24|H[1]>>8&65280|H[2]<<8&16711680|H[3]<<24)>>>0),P+=32;else r(E,P,p,v,x)}function Ne(p,v){Q[v][0]=Q[p+"0"],Q[v][1]=Q[p+"1"],Q[v][2]=Q[p+"2"],Q[v][3]=Q[p+"3"],Q[v][4]=Q[p+"4"],Q[v][5]=Q[p+"5"],Q[v][6]=Q[p+"6"],Q[v][7]=Q[p+"7"],Q[v][8]=Q[p+"8"],Q[v][9]=Q[p+"9"],Q[v][10]=Q[p+"10"],Q[v][11]=Q[p+"11"],Q[v][12]=Q[p+"12"],Q[v][13]=Q[p+"13"],Q[v][14]=Q[p+"0"],Q[v][15]=Q[p+"0"]}function le(p){return p==Gb||p==zb||p==k1||p==qb}function ye(){this.eb=[],this.size=this.A=this.fb=0}function Ye(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function we(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ye,this.f.kb=new Ye,this.sd=null}function ve(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function je(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function co(p){return alert("todo:WebPSamplerProcessPlane"),p.T}function Yr(p,v){var x=p.T,E=v.ba.f.RGBA,P=E.eb,H=E.fb+p.ka*E.A,V=cA[v.ba.S],j=p.y,z=p.O,Z=p.f,lt=p.N,wt=p.ea,J=p.W,ct=v.cc,pt=v.dc,Bt=v.Mc,mt=v.Nc,Ct=p.ka,Ft=p.ka+p.T,Lt=p.U,It=Lt+1>>1;for(Ct==0?V(j,z,null,null,Z,lt,wt,J,Z,lt,wt,J,P,H,null,null,Lt):(V(v.ec,v.fc,j,z,ct,pt,Bt,mt,Z,lt,wt,J,P,H-E.A,P,H,Lt),++x);Ct+2<Ft;Ct+=2)ct=Z,pt=lt,Bt=wt,mt=J,lt+=p.Rc,J+=p.Rc,H+=2*E.A,V(j,(z+=2*p.fa)-p.fa,j,z,ct,pt,Bt,mt,Z,lt,wt,J,P,H-E.A,P,H,Lt);return z+=p.fa,p.j+Ft<p.o?(r(v.ec,v.fc,j,z,Lt),r(v.cc,v.dc,Z,lt,It),r(v.Mc,v.Nc,wt,J,It),x--):1&Ft||V(j,z,null,null,Z,lt,wt,J,Z,lt,wt,J,P,H+E.A,null,null,Lt),x}function OA(p,v,x){var E=p.F,P=[p.J];if(E!=null){var H=p.U,V=v.ba.S,j=V==E1||V==k1;v=v.ba.f.RGBA;var z=[0],Z=p.ka;z[0]=p.T,p.Kb&&(Z==0?--z[0]:(--Z,P[0]-=p.width),p.j+p.ka+p.T==p.o&&(z[0]=p.o-p.j-Z));var lt=v.eb;Z=v.fb+Z*v.A,p=OE(E,P[0],p.width,H,z,lt,Z+(j?0:3),v.A),t(x==z),p&&le(V)&&Kp(lt,Z,j,H,z,v.A)}return 0}function aA(p){var v=p.ma,x=v.ba.S,E=11>x,P=x==F1||x==S1||x==E1||x==Kb||x==12||le(x);if(v.memory=null,v.Ib=null,v.Jb=null,v.Nd=null,!lA(v.Oa,p,P?11:12))return 0;if(P&&le(x)&&yo(),p.da)alert("todo:use_scaling");else{if(E){if(v.Ib=co,p.Kb){if(x=p.U+1>>1,v.memory=s(p.U+2*x),v.memory==null)return 0;v.ec=v.memory,v.fc=0,v.cc=v.ec,v.dc=v.fc+p.U,v.Mc=v.cc,v.Nc=v.dc+x,v.Ib=Yr,yo()}}else alert("todo:EmitYUV");P&&(v.Jb=OA,E&&Gr())}if(E&&!e3){for(p=0;256>p;++p)O8[p]=89858*(p-128)+I1>>U1,V8[p]=-22014*(p-128)+I1,H8[p]=-45773*(p-128),R8[p]=113618*(p-128)+I1>>U1;for(p=zp;p<$b;++p)v=76283*(p-16)+I1>>U1,W8[p-zp]=$r(v,255),j8[p-zp]=$r(v+8>>4,15);e3=1}return 1}function qt(p){var v=p.ma,x=p.U,E=p.T;return t(!(1&p.ka)),0>=x||0>=E?0:(x=v.Ib(p,v),v.Jb!=null&&v.Jb(p,v,x),v.Dc+=x,1)}function Fn(p){p.ma.memory=null}function RA(p,v,x,E){return ht(p,8)!=47?0:(v[0]=ht(p,14)+1,x[0]=ht(p,14)+1,E[0]=ht(p,1),ht(p,3)!=0?0:!p.h)}function qn(p,v){if(4>p)return p+1;var x=p-2>>1;return(2+(1&p)<<x)+ht(v,x)+1}function Sn(p,v){return 120<v?v-120:1<=(x=((x=F8[v-1])>>4)*p+(8-(15&x)))?x:1;var x}function Er(p,v,x){var E=X(x),P=p[v+=255&E].g-8;return 0<P&&(it(x,x.u+8),E=X(x),v+=p[v].value,v+=E&(1<<P)-1),it(x,x.u+p[v].g),p[v].value}function oi(p,v,x){return x.g+=p.g,x.value+=p.value<<v>>>0,t(8>=x.g),p.g}function Hi(p,v,x){var E=p.xc;return t((v=E==0?0:p.vc[p.md*(x>>E)+(v>>E)])<p.Wb),p.Ya[v]}function Xn(p,v,x,E){var P=p.ab,H=p.c*v,V=p.C;v=V+v;var j=x,z=E;for(E=p.Ta,x=p.Ua;0<P--;){var Z=p.gc[P],lt=V,wt=v,J=j,ct=z,pt=(z=E,j=x,Z.Ea);switch(t(lt<wt),t(wt<=Z.nc),Z.hc){case 2:od(J,ct,(wt-lt)*pt,z,j);break;case 0:var Bt=lt,mt=wt,Ct=z,Ft=j,Lt=(he=Z).Ea;Bt==0&&(kl(J,ct,null,null,1,Ct,Ft),Kt(J,ct+1,0,0,Lt-1,Ct,Ft+1),ct+=Lt,Ft+=Lt,++Bt);for(var It=1<<he.b,de=It-1,ee=Et(Lt,he.b),Pe=he.K,he=he.w+(Bt>>he.b)*ee;Bt<mt;){var We=Pe,Wi=he,De=1;for(Ul(J,ct,Ct,Ft-Lt,1,Ct,Ft);De<Lt;){var ce=(De&~de)+It;ce>Lt&&(ce=Lt),(0,VA[We[Wi++]>>8&15])(J,ct+ +De,Ct,Ft+De-Lt,ce-De,Ct,Ft+De),De=ce}ct+=Lt,Ft+=Lt,++Bt&de||(he+=ee)}wt!=Z.nc&&r(z,j-pt,z,j+(wt-lt-1)*pt,pt);break;case 1:for(pt=J,mt=ct,Lt=(J=Z.Ea)-(Ft=J&~(Ct=(ct=1<<Z.b)-1)),Bt=Et(J,Z.b),It=Z.K,Z=Z.w+(lt>>Z.b)*Bt;lt<wt;){for(de=It,ee=Z,Pe=new zt,he=mt+Ft,We=mt+J;mt<he;)Wt(de[ee++],Pe),ac(Pe,pt,mt,ct,z,j),mt+=ct,j+=ct;mt<We&&(Wt(de[ee++],Pe),ac(Pe,pt,mt,Lt,z,j),mt+=Lt,j+=Lt),++lt&Ct||(Z+=Bt)}break;case 3:if(J==z&&ct==j&&0<Z.b){for(mt=z,J=pt=j+(wt-lt)*pt-(Ft=(wt-lt)*Et(Z.Ea,Z.b)),ct=z,Ct=j,Bt=[],Ft=(Lt=Ft)-1;0<=Ft;--Ft)Bt[Ft]=ct[Ct+Ft];for(Ft=Lt-1;0<=Ft;--Ft)mt[J+Ft]=Bt[Ft];Ac(Z,lt,wt,z,pt,z,j)}else Ac(Z,lt,wt,J,ct,z,j)}j=E,z=x}z!=x&&r(E,x,j,z,H)}function En(p,v){var x=p.V,E=p.Ba+p.c*p.C,P=v-p.C;if(t(v<=p.l.o),t(16>=P),0<P){var H=p.l,V=p.Ta,j=p.Ua,z=H.width;if(Xn(p,P,x,E),P=j=[j],t((x=p.C)<(E=v)),t(H.v<H.va),E>H.o&&(E=H.o),x<H.j){var Z=H.j-x;x=H.j,P[0]+=Z*z}if(x>=E?x=0:(P[0]+=4*H.v,H.ka=x-H.j,H.U=H.va-H.v,H.T=E-x,x=1),x){if(j=j[0],11>(x=p.ca).S){var lt=x.f.RGBA,wt=(E=x.S,P=H.U,H=H.T,Z=lt.eb,lt.A),J=H;for(lt=lt.fb+p.Ma*lt.A;0<J--;){var ct=V,pt=j,Bt=P,mt=Z,Ct=lt;switch(E){case x1:Vp(ct,pt,Bt,mt,Ct);break;case F1:Wp(ct,pt,Bt,mt,Ct);break;case Gb:Wp(ct,pt,Bt,mt,Ct),Kp(mt,Ct,0,Bt,1,0);break;case GE:lc(ct,pt,Bt,mt,Ct);break;case S1:Ae(ct,pt,Bt,mt,Ct,1);break;case zb:Ae(ct,pt,Bt,mt,Ct,1),Kp(mt,Ct,0,Bt,1,0);break;case E1:Ae(ct,pt,Bt,mt,Ct,0);break;case k1:Ae(ct,pt,Bt,mt,Ct,0),Kp(mt,Ct,1,Bt,1,0);break;case Kb:ld(ct,pt,Bt,mt,Ct);break;case qb:ld(ct,pt,Bt,mt,Ct),DE(mt,Ct,Bt,1,0);break;case zE:oc(ct,pt,Bt,mt,Ct);break;default:t(0)}j+=z,lt+=wt}p.Ma+=H}else alert("todo:EmitRescaledRowsYUVA");t(p.Ma<=x.height)}}p.C=v,t(p.C<=p.i)}function gs(p){var v;if(0<p.ua)return 0;for(v=0;v<p.Wb;++v){var x=p.Ya[v].G,E=p.Ya[v].H;if(0<x[1][E[1]+0].g||0<x[2][E[2]+0].g||0<x[3][E[3]+0].g)return 0}return 1}function Ns(p,v,x,E,P,H){if(p.Z!=0){var V=p.qd,j=p.rd;for(t(_l[p.Z]!=null);v<x;++v)_l[p.Z](V,j,E,P,E,P,H),V=E,j=P,P+=H;p.qd=V,p.rd=j}}function ms(p,v){var x=p.l.ma,E=x.Z==0||x.Z==1?p.l.j:p.C;if(E=p.C<E?E:p.C,t(v<=p.l.o),v>E){var P=p.l.width,H=x.ca,V=x.tb+P*E,j=p.V,z=p.Ba+p.c*E,Z=p.gc;t(p.ab==1),t(Z[0].hc==3),Wb(Z[0],E,v,j,z,H,V),Ns(x,E,v,H,V,P)}p.C=p.Ma=v}function kn(p,v,x,E,P,H,V){var j=p.$/E,z=p.$%E,Z=p.m,lt=p.s,wt=x+p.$,J=wt;P=x+E*P;var ct=x+E*H,pt=280+lt.ua,Bt=p.Pb?j:16777216,mt=0<lt.ua?lt.Wa:null,Ct=lt.wc,Ft=wt<ct?Hi(lt,z,j):null;t(p.C<H),t(ct<=P);var Lt=!1;t:for(;;){for(;Lt||wt<ct;){var It=0;if(j>=Bt){var de=wt-x;t((Bt=p).Pb),Bt.wd=Bt.m,Bt.xd=de,0<Bt.s.ua&&Mt(Bt.s.Wa,Bt.s.vb),Bt=j+E8}if(z&Ct||(Ft=Hi(lt,z,j)),t(Ft!=null),Ft.Qb&&(v[wt]=Ft.qb,Lt=!0),!Lt)if(ot(Z),Ft.jc){It=Z,de=v;var ee=wt,Pe=Ft.pd[X(It)&Ad-1];t(Ft.jc),256>Pe.g?(it(It,It.u+Pe.g),de[ee]=Pe.value,It=0):(it(It,It.u+Pe.g-256),t(256<=Pe.value),It=Pe.value),It==0&&(Lt=!0)}else It=Er(Ft.G[0],Ft.H[0],Z);if(Z.h)break;if(Lt||256>It){if(!Lt)if(Ft.nd)v[wt]=(Ft.qb|It<<8)>>>0;else{if(ot(Z),Lt=Er(Ft.G[1],Ft.H[1],Z),ot(Z),de=Er(Ft.G[2],Ft.H[2],Z),ee=Er(Ft.G[3],Ft.H[3],Z),Z.h)break;v[wt]=(ee<<24|Lt<<16|It<<8|de)>>>0}if(Lt=!1,++wt,++z>=E&&(z=0,++j,V!=null&&j<=H&&!(j%16)&&V(p,j),mt!=null))for(;J<wt;)It=v[J++],mt.X[(506832829*It&4294967295)>>>mt.Mb]=It}else if(280>It){if(It=qn(It-256,Z),de=Er(Ft.G[4],Ft.H[4],Z),ot(Z),de=Sn(E,de=qn(de,Z)),Z.h)break;if(wt-x<de||P-wt<It)break t;for(ee=0;ee<It;++ee)v[wt+ee]=v[wt+ee-de];for(wt+=It,z+=It;z>=E;)z-=E,++j,V!=null&&j<=H&&!(j%16)&&V(p,j);if(t(wt<=P),z&Ct&&(Ft=Hi(lt,z,j)),mt!=null)for(;J<wt;)It=v[J++],mt.X[(506832829*It&4294967295)>>>mt.Mb]=It}else{if(!(It<pt))break t;for(Lt=It-280,t(mt!=null);J<wt;)It=v[J++],mt.X[(506832829*It&4294967295)>>>mt.Mb]=It;It=wt,t(!(Lt>>>(de=mt).Xa)),v[It]=de.X[Lt],Lt=!0}Lt||t(Z.h==rt(Z))}if(p.Pb&&Z.h&&wt<P)t(p.m.h),p.a=5,p.m=p.wd,p.$=p.xd,0<p.s.ua&&Mt(p.s.vb,p.s.Wa);else{if(Z.h)break t;V!=null&&V(p,j>H?H:j),p.a=0,p.$=wt-x}return 1}return p.a=3,0}function Zi(p){t(p!=null),p.vc=null,p.yc=null,p.Ya=null;var v=p.Wa;v!=null&&(v.X=null),p.vb=null,t(p!=null)}function oA(){var p=new ae;return p==null?null:(p.a=0,p.xb=YE,Ne("Predictor","VP8LPredictors"),Ne("Predictor","VP8LPredictors_C"),Ne("PredictorAdd","VP8LPredictorsAdd"),Ne("PredictorAdd","VP8LPredictorsAdd_C"),od=te,ac=ne,Vp=Ve,Wp=Te,ld=be,oc=Be,lc=ze,Q.VP8LMapColor32b=Ui,Q.VP8LMapColor8b=ka,p)}function Ei(p,v,x,E,P){var H=1,V=[p],j=[v],z=E.m,Z=E.s,lt=null,wt=0;t:for(;;){if(x)for(;H&&ht(z,1);){var J=V,ct=j,pt=E,Bt=1,mt=pt.m,Ct=pt.gc[pt.ab],Ft=ht(mt,2);if(pt.Oc&1<<Ft)H=0;else{switch(pt.Oc|=1<<Ft,Ct.hc=Ft,Ct.Ea=J[0],Ct.nc=ct[0],Ct.K=[null],++pt.ab,t(4>=pt.ab),Ft){case 0:case 1:Ct.b=ht(mt,3)+2,Bt=Ei(Et(Ct.Ea,Ct.b),Et(Ct.nc,Ct.b),0,pt,Ct.K),Ct.K=Ct.K[0];break;case 3:var Lt,It=ht(mt,8)+1,de=16<It?0:4<It?1:2<It?2:3;if(J[0]=Et(Ct.Ea,de),Ct.b=de,Lt=Bt=Ei(It,1,0,pt,Ct.K)){var ee,Pe=It,he=Ct,We=1<<(8>>he.b),Wi=s(We);if(Wi==null)Lt=0;else{var De=he.K[0],ce=he.w;for(Wi[0]=he.K[0][0],ee=1;ee<1*Pe;++ee)Wi[ee]=re(De[ce+ee],Wi[ee-1]);for(;ee<4*We;++ee)Wi[ee]=0;he.K[0]=null,he.K[0]=Wi,Lt=1}}Bt=Lt;break;case 2:break;default:t(0)}H=Bt}}if(V=V[0],j=j[0],H&&ht(z,1)&&!(H=1<=(wt=ht(z,4))&&11>=wt)){E.a=3;break t}var Vt;if(Vt=H)e:{var hi,Qe,Ge,Ur=E,An=V,ts=j,Jr=wt,Qn=x,es=Ur.m,ji=Ur.s,qe=[null],ir=1,ti=0,nr=S8[Jr];r:for(;;){if(Qn&&ht(es,1)){var an=ht(es,3)+2,jA=Et(An,an),ci=Et(ts,an),ys=jA*ci;if(!Ei(jA,ci,0,Ur,qe))break r;for(qe=qe[0],ji.xc=an,hi=0;hi<ys;++hi){var fr=qe[hi]>>8&65535;qe[hi]=fr,fr>=ir&&(ir=fr+1)}}if(es.h)break r;for(Qe=0;5>Qe;++Qe){var Ki=qE[Qe];!Qe&&0<Jr&&(Ki+=1<<Jr),ti<Ki&&(ti=Ki)}var Rs=A(ir*nr,W),rs=ir,Hs=A(rs,tt);if(Hs==null)var Vs=null;else t(65536>=rs),Vs=Hs;var bs=s(ti);if(Vs==null||bs==null||Rs==null){Ur.a=1;break r}var Ws=Rs;for(hi=Ge=0;hi<ir;++hi){var xr=Vs[hi],js=xr.G,KA=xr.H,hc=0,xo=1,on=0;for(Qe=0;5>Qe;++Qe){Ki=qE[Qe],js[Qe]=Ws,KA[Qe]=Ge,!Qe&&0<Jr&&(Ki+=1<<Jr);n:{var L1,Zb=Ki,_1=Ur,qp=bs,z8=Ws,q8=Ge,Jb=0,Ml=_1.m,X8=ht(Ml,1);if(n(qp,0,0,Zb),X8){var Y8=ht(Ml,1)+1,$8=ht(Ml,1),n3=ht(Ml,$8==0?1:8);qp[n3]=1,Y8==2&&(qp[n3=ht(Ml,8)]=1);var M1=1}else{var s3=s(19),A3=ht(Ml,4)+4;if(19<A3){_1.a=3;var T1=0;break n}for(L1=0;L1<A3;++L1)s3[x8[L1]]=ht(Ml,3);var tB=void 0,Xp=void 0,a3=_1,Z8=s3,N1=Zb,o3=qp,eB=0,Tl=a3.m,l3=8,h3=A(128,W);i:for(;O(h3,0,7,Z8,19);){if(ht(Tl,1)){var J8=2+2*ht(Tl,3);if((tB=2+ht(Tl,J8))>N1)break i}else tB=N1;for(Xp=0;Xp<N1&&tB--;){ot(Tl);var c3=h3[0+(127&X(Tl))];it(Tl,Tl.u+c3.g);var ud=c3.value;if(16>ud)o3[Xp++]=ud,ud!=0&&(l3=ud);else{var tR=ud==16,u3=ud-16,eR=B8[u3],d3=ht(Tl,b8[u3])+eR;if(Xp+d3>N1)break i;for(var rR=tR?l3:0;0<d3--;)o3[Xp++]=rR}}eB=1;break i}eB||(a3.a=3),M1=eB}(M1=M1&&!Ml.h)&&(Jb=O(z8,q8,8,qp,Zb)),M1&&Jb!=0?T1=Jb:(_1.a=3,T1=0)}if(T1==0)break r;if(xo&&C8[Qe]==1&&(xo=Ws[Ge].g==0),hc+=Ws[Ge].g,Ge+=T1,3>=Qe){var Yp,rB=bs[0];for(Yp=1;Yp<Ki;++Yp)bs[Yp]>rB&&(rB=bs[Yp]);on+=rB}}if(xr.nd=xo,xr.Qb=0,xo&&(xr.qb=(js[3][KA[3]+0].value<<24|js[1][KA[1]+0].value<<16|js[2][KA[2]+0].value)>>>0,hc==0&&256>js[0][KA[0]+0].value&&(xr.Qb=1,xr.qb+=js[0][KA[0]+0].value<<8)),xr.jc=!xr.Qb&&6>on,xr.jc){var P1,Fo=xr;for(P1=0;P1<Ad;++P1){var Nl=P1,Pl=Fo.pd[Nl],D1=Fo.G[0][Fo.H[0]+Nl];256<=D1.value?(Pl.g=D1.g+256,Pl.value=D1.value):(Pl.g=0,Pl.value=0,Nl>>=oi(D1,8,Pl),Nl>>=oi(Fo.G[1][Fo.H[1]+Nl],16,Pl),Nl>>=oi(Fo.G[2][Fo.H[2]+Nl],0,Pl),oi(Fo.G[3][Fo.H[3]+Nl],24,Pl))}}}ji.vc=qe,ji.Wb=ir,ji.Ya=Vs,ji.yc=Rs,Vt=1;break e}Vt=0}if(!(H=Vt)){E.a=3;break t}if(0<wt){if(Z.ua=1<<wt,!q(Z.Wa,wt)){E.a=1,H=0;break t}}else Z.ua=0;var iB=E,f3=V,iR=j,nB=iB.s,sB=nB.xc;if(iB.c=f3,iB.i=iR,nB.md=Et(f3,sB),nB.wc=sB==0?-1:(1<<sB)-1,x){E.xb=M8;break t}if((lt=s(V*j))==null){E.a=1,H=0;break t}H=(H=kn(E,lt,0,V,j,j,null))&&!z.h;break t}return H?(P!=null?P[0]=lt:(t(lt==null),t(x)),E.$=0,x||Zi(Z)):Zi(Z),H}function Ba(p,v){var x=p.c*p.i,E=x+v+16*v;return t(p.c<=v),p.V=s(E),p.V==null?(p.Ta=null,p.Ua=0,p.a=1,0):(p.Ta=p.V,p.Ua=p.Ba+x+v,1)}function uo(p,v){var x=p.C,E=v-x,P=p.V,H=p.Ba+p.c*x;for(t(v<=p.l.o);0<E;){var V=16<E?16:E,j=p.l.ma,z=p.l.width,Z=z*V,lt=j.ca,wt=j.tb+z*x,J=p.Ta,ct=p.Ua;Xn(p,V,P,H),RE(J,ct,lt,wt,Z),Ns(j,x,x+V,lt,wt,z),E-=V,P+=V*p.c,x+=V}t(x==v),p.C=p.Ma=v}function Cl(){this.ub=this.yd=this.td=this.Rb=0}function fo(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function zu(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Ca(){this.Yb=(function(){var p=[];return(function v(x,E,P){for(var H=P[E],V=0;V<H&&(x.push(P.length>E+1?[]:0),!(P.length<E+1));V++)v(x[V],E+1,P)})(p,0,[3,11]),p})()}function HA(){this.jb=s(3),this.Wc=a([4,8],Ca),this.Xc=a([4,17],Ca)}function $(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function kt(){this.ld=this.La=this.dd=this.tc=0}function Pt(){this.Na=this.la=0}function Fe(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Re(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Je(){this.uc=this.M=this.Nb=0,this.wa=Array(new kt),this.Y=0,this.ya=Array(new Re),this.aa=0,this.l=new Ps}function ws(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Yn(){this.cb=this.a=0,this.sc="",this.m=new M,this.Od=new Cl,this.Kc=new fo,this.ed=new $,this.Qa=new zu,this.Ic=this.$c=this.Aa=0,this.D=new Je,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=A(8,M),this.ia=0,this.pb=A(4,Fe),this.Pa=new HA,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new ws),this.Hd=0,this.rb=Array(new Pt),this.sb=0,this.wa=Array(new kt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Re),this.L=this.aa=0,this.gd=a([4,2],kt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function $r(p,v){return 0>p?0:p>v?v:p}function Ps(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Zr(){var p=new Yn;return p!=null&&(p.a=0,p.sc="OK",p.cb=0,p.Xb=0,Gp||(Gp=Xu)),p}function jr(p,v,x){return p.a==0&&(p.a=v,p.sc=x,p.cb=0),0}function qu(p,v,x){return 3<=x&&p[v+0]==157&&p[v+1]==1&&p[v+2]==42}function xa(p,v){if(p==null)return 0;if(p.a=0,p.sc="OK",v==null)return jr(p,2,"null VP8Io passed to VP8GetHeaders()");var x=v.data,E=v.w,P=v.ha;if(4>P)return jr(p,7,"Truncated header.");var H=x[E+0]|x[E+1]<<8|x[E+2]<<16,V=p.Od;if(V.Rb=!(1&H),V.td=H>>1&7,V.yd=H>>4&1,V.ub=H>>5,3<V.td)return jr(p,3,"Incorrect keyframe parameters.");if(!V.yd)return jr(p,4,"Frame not displayable.");E+=3,P-=3;var j=p.Kc;if(V.Rb){if(7>P)return jr(p,7,"cannot parse picture header");if(!qu(x,E,P))return jr(p,3,"Bad code word");j.c=16383&(x[E+4]<<8|x[E+3]),j.Td=x[E+4]>>6,j.i=16383&(x[E+6]<<8|x[E+5]),j.Ud=x[E+6]>>6,E+=7,P-=7,p.za=j.c+15>>4,p.Ub=j.i+15>>4,v.width=j.c,v.height=j.i,v.Da=0,v.j=0,v.v=0,v.va=v.width,v.o=v.height,v.da=0,v.ib=v.width,v.hb=v.height,v.U=v.width,v.T=v.height,n((H=p.Pa).jb,0,255,H.jb.length),t((H=p.Qa)!=null),H.Cb=0,H.Bb=0,H.Fb=1,n(H.Zb,0,0,H.Zb.length),n(H.Lb,0,0,H.Lb)}if(V.ub>P)return jr(p,7,"bad partition length");et(H=p.m,x,E,V.ub),E+=V.ub,P-=V.ub,V.Rb&&(j.Ld=vt(H),j.Kd=vt(H)),j=p.Qa;var z,Z=p.Pa;if(t(H!=null),t(j!=null),j.Cb=vt(H),j.Cb){if(j.Bb=vt(H),vt(H)){for(j.Fb=vt(H),z=0;4>z;++z)j.Zb[z]=vt(H)?nt(H,7):0;for(z=0;4>z;++z)j.Lb[z]=vt(H)?nt(H,6):0}if(j.Bb)for(z=0;3>z;++z)Z.jb[z]=vt(H)?st(H,8):255}else j.Bb=0;if(H.Ka)return jr(p,3,"cannot parse segment header");if((j=p.ed).zd=vt(H),j.Tb=st(H,6),j.wb=st(H,3),j.Pc=vt(H),j.Pc&&vt(H)){for(Z=0;4>Z;++Z)vt(H)&&(j.vd[Z]=nt(H,6));for(Z=0;4>Z;++Z)vt(H)&&(j.od[Z]=nt(H,6))}if(p.L=j.Tb==0?0:j.zd?1:2,H.Ka)return jr(p,3,"cannot parse filter header");var lt=P;if(P=z=E,E=z+lt,j=lt,p.Xb=(1<<st(p.m,2))-1,lt<3*(Z=p.Xb))x=7;else{for(z+=3*Z,j-=3*Z,lt=0;lt<Z;++lt){var wt=x[P+0]|x[P+1]<<8|x[P+2]<<16;wt>j&&(wt=j),et(p.Jc[+lt],x,z,wt),z+=wt,j-=wt,P+=3}et(p.Jc[+Z],x,z,j),x=z<E?0:5}if(x!=0)return jr(p,x,"cannot parse partitions");for(x=st(z=p.m,7),P=vt(z)?nt(z,4):0,E=vt(z)?nt(z,4):0,j=vt(z)?nt(z,4):0,Z=vt(z)?nt(z,4):0,z=vt(z)?nt(z,4):0,lt=p.Qa,wt=0;4>wt;++wt){if(lt.Cb){var J=lt.Zb[wt];lt.Fb||(J+=x)}else{if(0<wt){p.pb[wt]=p.pb[0];continue}J=x}var ct=p.pb[wt];ct.Sc[0]=Xb[$r(J+P,127)],ct.Sc[1]=Yb[$r(J+0,127)],ct.Eb[0]=2*Xb[$r(J+E,127)],ct.Eb[1]=101581*Yb[$r(J+j,127)]>>16,8>ct.Eb[1]&&(ct.Eb[1]=8),ct.Qc[0]=Xb[$r(J+Z,117)],ct.Qc[1]=Yb[$r(J+z,127)],ct.lc=J+z}if(!V.Rb)return jr(p,4,"Not a key frame.");for(vt(H),V=p.Pa,x=0;4>x;++x){for(P=0;8>P;++P)for(E=0;3>E;++E)for(j=0;11>j;++j)Z=yt(H,L8[x][P][E][j])?st(H,8):I8[x][P][E][j],V.Wc[x][P].Yb[E][j]=Z;for(P=0;17>P;++P)V.Xc[x][P]=V.Wc[x][_8[P]]}return p.kc=vt(H),p.kc&&(p.Bd=st(H,8)),p.cb=1}function Xu(p,v,x,E,P,H,V){var j=v[P].Yb[x];for(x=0;16>P;++P){if(!yt(p,j[x+0]))return P;for(;!yt(p,j[x+1]);)if(j=v[++P].Yb[0],x=0,P==16)return 16;var z=v[P+1].Yb;if(yt(p,j[x+2])){var Z=p,lt=0;if(yt(Z,(J=j)[(wt=x)+3]))if(yt(Z,J[wt+6])){for(j=0,wt=2*(lt=yt(Z,J[wt+8]))+(J=yt(Z,J[wt+9+lt])),lt=0,J=k8[wt];J[j];++j)lt+=lt+yt(Z,J[j]);lt+=3+(8<<wt)}else yt(Z,J[wt+7])?(lt=7+2*yt(Z,165),lt+=yt(Z,145)):lt=5+yt(Z,159);else lt=yt(Z,J[wt+4])?3+yt(Z,J[wt+5]):2;j=z[2]}else lt=1,j=z[1];z=V+U8[P],0>(Z=p).b&>(Z);var wt,J=Z.b,ct=(wt=Z.Ca>>1)-(Z.I>>J)>>31;--Z.b,Z.Ca+=ct,Z.Ca|=1,Z.I-=(wt+1&ct)<<J,H[z]=((lt^ct)-ct)*E[(0<P)+0]}return 16}function Qp(p){var v=p.rb[p.sb-1];v.la=0,v.Na=0,n(p.zc,0,0,p.zc.length),p.ja=0}function Ds(p,v,x,E,P){P=p[v+x+32*E]+(P>>3),p[v+x+32*E]=-256&P?0>P?0:255:P}function Yu(p,v,x,E,P,H){Ds(p,v,0,x,E+P),Ds(p,v,1,x,E+H),Ds(p,v,2,x,E-H),Ds(p,v,3,x,E-P)}function po(p){return(20091*p>>16)+p}function sn(p,v,x,E){var P,H=0,V=s(16);for(P=0;4>P;++P){var j=p[v+0]+p[v+8],z=p[v+0]-p[v+8],Z=(35468*p[v+4]>>16)-po(p[v+12]),lt=po(p[v+4])+(35468*p[v+12]>>16);V[H+0]=j+lt,V[H+1]=z+Z,V[H+2]=z-Z,V[H+3]=j-lt,H+=4,v++}for(P=H=0;4>P;++P)j=(p=V[H+0]+4)+V[H+8],z=p-V[H+8],Z=(35468*V[H+4]>>16)-po(V[H+12]),Ds(x,E,0,0,j+(lt=po(V[H+4])+(35468*V[H+12]>>16))),Ds(x,E,1,0,z+Z),Ds(x,E,2,0,z-Z),Ds(x,E,3,0,j-lt),H++,E+=32}function u1(p,v,x,E){var P=p[v+0]+4,H=35468*p[v+4]>>16,V=po(p[v+4]),j=35468*p[v+1]>>16;Yu(x,E,0,P+V,p=po(p[v+1]),j),Yu(x,E,1,P+H,p,j),Yu(x,E,2,P-H,p,j),Yu(x,E,3,P-V,p,j)}function Eb(p,v,x,E,P){sn(p,v,x,E),P&&sn(p,v+16,x,E+4)}function kb(p,v,x,E){bo(p,v+0,x,E,1),bo(p,v+32,x,E+128,1)}function Ub(p,v,x,E){var P;for(p=p[v+0]+4,P=0;4>P;++P)for(v=0;4>v;++v)Ds(x,E,v,P,p)}function Fa(p,v,x,E){p[v+0]&&In(p,v+0,x,E),p[v+16]&&In(p,v+16,x,E+4),p[v+32]&&In(p,v+32,x,E+128),p[v+48]&&In(p,v+48,x,E+128+4)}function d1(p,v,x,E){var P,H=s(16);for(P=0;4>P;++P){var V=p[v+0+P]+p[v+12+P],j=p[v+4+P]+p[v+8+P],z=p[v+4+P]-p[v+8+P],Z=p[v+0+P]-p[v+12+P];H[0+P]=V+j,H[8+P]=V-j,H[4+P]=Z+z,H[12+P]=Z-z}for(P=0;4>P;++P)V=(p=H[0+4*P]+3)+H[3+4*P],j=H[1+4*P]+H[2+4*P],z=H[1+4*P]-H[2+4*P],Z=p-H[3+4*P],x[E+0]=V+j>>3,x[E+16]=Z+z>>3,x[E+32]=V-j>>3,x[E+48]=Z-z>>3,E+=64}function $u(p,v,x){var E,P=v-32,H=Os,V=255-p[P-1];for(E=0;E<x;++E){var j,z=H,Z=V+p[v-1];for(j=0;j<x;++j)p[v+j]=z[Z+p[P+j]];v+=32}}function Zu(p,v){$u(p,v,4)}function Lp(p,v){$u(p,v,8)}function Ib(p,v){$u(p,v,16)}function Qb(p,v){var x;for(x=0;16>x;++x)r(p,v+32*x,p,v-32,16)}function Lb(p,v){var x;for(x=16;0<x;--x)n(p,v,p[v-1],16),v+=32}function xl(p,v,x){var E;for(E=0;16>E;++E)n(v,x+32*E,p,16)}function f1(p,v){var x,E=16;for(x=0;16>x;++x)E+=p[v-1+32*x]+p[v+x-32];xl(E>>5,p,v)}function Fl(p,v){var x,E=8;for(x=0;16>x;++x)E+=p[v-1+32*x];xl(E>>4,p,v)}function _b(p,v){var x,E=8;for(x=0;16>x;++x)E+=p[v+x-32];xl(E>>4,p,v)}function Yh(p,v){xl(128,p,v)}function Ce(p,v,x){return p+2*v+x+2>>2}function Mb(p,v){var x,E=v-32;for(E=new Uint8Array([Ce(p[E-1],p[E+0],p[E+1]),Ce(p[E+0],p[E+1],p[E+2]),Ce(p[E+1],p[E+2],p[E+3]),Ce(p[E+2],p[E+3],p[E+4])]),x=0;4>x;++x)r(p,v+32*x,E,0,E.length)}function Tb(p,v){var x=p[v-1],E=p[v-1+32],P=p[v-1+64],H=p[v-1+96];St(p,v+0,16843009*Ce(p[v-1-32],x,E)),St(p,v+32,16843009*Ce(x,E,P)),St(p,v+64,16843009*Ce(E,P,H)),St(p,v+96,16843009*Ce(P,H,H))}function Nb(p,v){var x,E=4;for(x=0;4>x;++x)E+=p[v+x-32]+p[v-1+32*x];for(E>>=3,x=0;4>x;++x)n(p,v+32*x,E,4)}function Pb(p,v){var x=p[v-1+0],E=p[v-1+32],P=p[v-1+64],H=p[v-1-32],V=p[v+0-32],j=p[v+1-32],z=p[v+2-32],Z=p[v+3-32];p[v+0+96]=Ce(E,P,p[v-1+96]),p[v+1+96]=p[v+0+64]=Ce(x,E,P),p[v+2+96]=p[v+1+64]=p[v+0+32]=Ce(H,x,E),p[v+3+96]=p[v+2+64]=p[v+1+32]=p[v+0+0]=Ce(V,H,x),p[v+3+64]=p[v+2+32]=p[v+1+0]=Ce(j,V,H),p[v+3+32]=p[v+2+0]=Ce(z,j,V),p[v+3+0]=Ce(Z,z,j)}function Db(p,v){var x=p[v+1-32],E=p[v+2-32],P=p[v+3-32],H=p[v+4-32],V=p[v+5-32],j=p[v+6-32],z=p[v+7-32];p[v+0+0]=Ce(p[v+0-32],x,E),p[v+1+0]=p[v+0+32]=Ce(x,E,P),p[v+2+0]=p[v+1+32]=p[v+0+64]=Ce(E,P,H),p[v+3+0]=p[v+2+32]=p[v+1+64]=p[v+0+96]=Ce(P,H,V),p[v+3+32]=p[v+2+64]=p[v+1+96]=Ce(H,V,j),p[v+3+64]=p[v+2+96]=Ce(V,j,z),p[v+3+96]=Ce(j,z,z)}function go(p,v){var x=p[v-1+0],E=p[v-1+32],P=p[v-1+64],H=p[v-1-32],V=p[v+0-32],j=p[v+1-32],z=p[v+2-32],Z=p[v+3-32];p[v+0+0]=p[v+1+64]=H+V+1>>1,p[v+1+0]=p[v+2+64]=V+j+1>>1,p[v+2+0]=p[v+3+64]=j+z+1>>1,p[v+3+0]=z+Z+1>>1,p[v+0+96]=Ce(P,E,x),p[v+0+64]=Ce(E,x,H),p[v+0+32]=p[v+1+96]=Ce(x,H,V),p[v+1+32]=p[v+2+96]=Ce(H,V,j),p[v+2+32]=p[v+3+96]=Ce(V,j,z),p[v+3+32]=Ce(j,z,Z)}function mo(p,v){var x=p[v+0-32],E=p[v+1-32],P=p[v+2-32],H=p[v+3-32],V=p[v+4-32],j=p[v+5-32],z=p[v+6-32],Z=p[v+7-32];p[v+0+0]=x+E+1>>1,p[v+1+0]=p[v+0+64]=E+P+1>>1,p[v+2+0]=p[v+1+64]=P+H+1>>1,p[v+3+0]=p[v+2+64]=H+V+1>>1,p[v+0+32]=Ce(x,E,P),p[v+1+32]=p[v+0+96]=Ce(E,P,H),p[v+2+32]=p[v+1+96]=Ce(P,H,V),p[v+3+32]=p[v+2+96]=Ce(H,V,j),p[v+3+64]=Ce(V,j,z),p[v+3+96]=Ce(j,z,Z)}function Ob(p,v){var x=p[v-1+0],E=p[v-1+32],P=p[v-1+64],H=p[v-1+96];p[v+0+0]=x+E+1>>1,p[v+2+0]=p[v+0+32]=E+P+1>>1,p[v+2+32]=p[v+0+64]=P+H+1>>1,p[v+1+0]=Ce(x,E,P),p[v+3+0]=p[v+1+32]=Ce(E,P,H),p[v+3+32]=p[v+1+64]=Ce(P,H,H),p[v+3+64]=p[v+2+64]=p[v+0+96]=p[v+1+96]=p[v+2+96]=p[v+3+96]=H}function Rb(p,v){var x=p[v-1+0],E=p[v-1+32],P=p[v-1+64],H=p[v-1+96],V=p[v-1-32],j=p[v+0-32],z=p[v+1-32],Z=p[v+2-32];p[v+0+0]=p[v+2+32]=x+V+1>>1,p[v+0+32]=p[v+2+64]=E+x+1>>1,p[v+0+64]=p[v+2+96]=P+E+1>>1,p[v+0+96]=H+P+1>>1,p[v+3+0]=Ce(j,z,Z),p[v+2+0]=Ce(V,j,z),p[v+1+0]=p[v+3+32]=Ce(x,V,j),p[v+1+32]=p[v+3+64]=Ce(E,x,V),p[v+1+64]=p[v+3+96]=Ce(P,E,x),p[v+1+96]=Ce(H,P,E)}function Ju(p,v){var x;for(x=0;8>x;++x)r(p,v+32*x,p,v-32,8)}function _p(p,v){var x;for(x=0;8>x;++x)n(p,v,p[v-1],8),v+=32}function Sa(p,v,x){var E;for(E=0;8>E;++E)n(v,x+32*E,p,8)}function Hb(p,v){var x,E=8;for(x=0;8>x;++x)E+=p[v+x-32]+p[v-1+32*x];Sa(E>>4,p,v)}function td(p,v){var x,E=4;for(x=0;8>x;++x)E+=p[v+x-32];Sa(E>>3,p,v)}function Vb(p,v){var x,E=4;for(x=0;8>x;++x)E+=p[v-1+32*x];Sa(E>>3,p,v)}function Mp(p,v){Sa(128,p,v)}function Sl(p,v,x){var E=p[v-x],P=p[v+0],H=3*(P-E)+jb[1020+p[v-2*x]-p[v+x]],V=C1[112+(H+4>>3)];p[v-x]=Os[255+E+C1[112+(H+3>>3)]],p[v+0]=Os[255+P-V]}function Tp(p,v,x,E){var P=p[v+0],H=p[v+x];return hA[255+p[v-2*x]-p[v-x]]>E||hA[255+H-P]>E}function $h(p,v,x,E){return 4*hA[255+p[v-x]-p[v+0]]+hA[255+p[v-2*x]-p[v+x]]<=E}function Np(p,v,x,E,P){var H=p[v-3*x],V=p[v-2*x],j=p[v-x],z=p[v+0],Z=p[v+x],lt=p[v+2*x],wt=p[v+3*x];return 4*hA[255+j-z]+hA[255+V-Z]>E?0:hA[255+p[v-4*x]-H]<=P&&hA[255+H-V]<=P&&hA[255+V-j]<=P&&hA[255+wt-lt]<=P&&hA[255+lt-Z]<=P&&hA[255+Z-z]<=P}function ed(p,v,x,E){var P=2*E+1;for(E=0;16>E;++E)$h(p,v+E,x,P)&&Sl(p,v+E,x)}function Pp(p,v,x,E){var P=2*E+1;for(E=0;16>E;++E)$h(p,v+E*x,1,P)&&Sl(p,v+E*x,1)}function rd(p,v,x,E){var P;for(P=3;0<P;--P)ed(p,v+=4*x,x,E)}function p1(p,v,x,E){var P;for(P=3;0<P;--P)Pp(p,v+=4,x,E)}function wo(p,v,x,E,P,H,V,j){for(H=2*H+1;0<P--;){if(Np(p,v,x,H,V))if(Tp(p,v,x,j))Sl(p,v,x);else{var z=p,Z=v,lt=x,wt=z[Z-2*lt],J=z[Z-lt],ct=z[Z+0],pt=z[Z+lt],Bt=z[Z+2*lt],mt=27*(Ft=jb[1020+3*(ct-J)+jb[1020+wt-pt]])+63>>7,Ct=18*Ft+63>>7,Ft=9*Ft+63>>7;z[Z-3*lt]=Os[255+z[Z-3*lt]+Ft],z[Z-2*lt]=Os[255+wt+Ct],z[Z-lt]=Os[255+J+mt],z[Z+0]=Os[255+ct-mt],z[Z+lt]=Os[255+pt-Ct],z[Z+2*lt]=Os[255+Bt-Ft]}v+=E}}function vo(p,v,x,E,P,H,V,j){for(H=2*H+1;0<P--;){if(Np(p,v,x,H,V))if(Tp(p,v,x,j))Sl(p,v,x);else{var z=p,Z=v,lt=x,wt=z[Z-lt],J=z[Z+0],ct=z[Z+lt],pt=C1[112+(4+(Bt=3*(J-wt))>>3)],Bt=C1[112+(Bt+3>>3)],mt=pt+1>>1;z[Z-2*lt]=Os[255+z[Z-2*lt]+mt],z[Z-lt]=Os[255+wt+Bt],z[Z+0]=Os[255+J-pt],z[Z+lt]=Os[255+ct-mt]}v+=E}}function g1(p,v,x,E,P,H){wo(p,v,x,1,16,E,P,H)}function m1(p,v,x,E,P,H){wo(p,v,1,x,16,E,P,H)}function w1(p,v,x,E,P,H){var V;for(V=3;0<V;--V)vo(p,v+=4*x,x,1,16,E,P,H)}function Zh(p,v,x,E,P,H){var V;for(V=3;0<V;--V)vo(p,v+=4,1,x,16,E,P,H)}function v1(p,v,x,E,P,H,V,j){wo(p,v,P,1,8,H,V,j),wo(x,E,P,1,8,H,V,j)}function B(p,v,x,E,P,H,V,j){wo(p,v,1,P,8,H,V,j),wo(x,E,1,P,8,H,V,j)}function T(p,v,x,E,P,H,V,j){vo(p,v+4*P,P,1,8,H,V,j),vo(x,E+4*P,P,1,8,H,V,j)}function Y(p,v,x,E,P,H,V,j){vo(p,v+4,1,P,8,H,V,j),vo(x,E+4,1,P,8,H,V,j)}function At(){this.ba=new we,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new je,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function dt(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function bt(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ut(){this.ua=0,this.Wa=new fe,this.vb=new fe,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new tt,this.yc=new W}function ae(){this.xb=this.a=0,this.l=new Ps,this.ca=new we,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new G,this.Pb=0,this.wd=new G,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ut,this.ab=0,this.gc=A(4,bt),this.Oc=0}function se(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ps,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Ee(p,v,x,E,P,H,V){for(p=p==null?0:p[v+0],v=0;v<V;++v)P[H+v]=p+x[E+v]&255,p=P[H+v]}function Ie(p,v,x,E,P,H,V){var j;if(p==null)Ee(null,null,x,E,P,H,V);else for(j=0;j<V;++j)P[H+j]=p[v+j]+x[E+j]&255}function Ke(p,v,x,E,P,H,V){if(p==null)Ee(null,null,x,E,P,H,V);else{var j,z=p[v+0],Z=z,lt=z;for(j=0;j<V;++j)Z=lt+(z=p[v+j])-Z,lt=x[E+j]+(-256&Z?0>Z?0:255:Z)&255,Z=z,P[H+j]=lt}}function ki(p,v,x,E){var P=v.width,H=v.o;if(t(p!=null&&v!=null),0>x||0>=E||x+E>H)return null;if(!p.Cc){if(p.ga==null){var V;if(p.ga=new se,(V=p.ga==null)||(V=v.width*v.o,t(p.Gb.length==0),p.Gb=s(V),p.Uc=0,p.Gb==null?V=0:(p.mb=p.Gb,p.nb=p.Uc,p.rc=null,V=1),V=!V),!V){V=p.ga;var j=p.Fa,z=p.P,Z=p.qc,lt=p.mb,wt=p.nb,J=z+1,ct=Z-1,pt=V.l;if(t(j!=null&<!=null&&v!=null),_l[0]=null,_l[1]=Ee,_l[2]=Ie,_l[3]=Ke,V.ca=lt,V.tb=wt,V.c=v.width,V.i=v.height,t(0<V.c&&0<V.i),1>=Z)v=0;else if(V.$a=3&j[z+0],V.Z=j[z+0]>>2&3,V.Lc=j[z+0]>>4&3,z=j[z+0]>>6&3,0>V.$a||1<V.$a||4<=V.Z||1<V.Lc||z)v=0;else if(pt.put=qt,pt.ac=aA,pt.bc=Fn,pt.ma=V,pt.width=v.width,pt.height=v.height,pt.Da=v.Da,pt.v=v.v,pt.va=v.va,pt.j=v.j,pt.o=v.o,V.$a)t:{t(V.$a==1),v=oA();e:for(;;){if(v==null){v=0;break t}if(t(V!=null),V.mc=v,v.c=V.c,v.i=V.i,v.l=V.l,v.l.ma=V,v.l.width=V.c,v.l.height=V.i,v.a=0,at(v.m,j,J,ct),!Ei(V.c,V.i,1,v,null)||(v.ab==1&&v.gc[0].hc==3&&gs(v.s)?(V.ic=1,j=v.c*v.i,v.Ta=null,v.Ua=0,v.V=s(j),v.Ba=0,v.V==null?(v.a=1,v=0):v=1):(V.ic=0,v=Ba(v,V.c)),!v))break e;v=1;break t}V.mc=null,v=0}else v=ct>=V.c*V.i;V=!v}if(V)return null;p.ga.Lc!=1?p.Ga=0:E=H-x}t(p.ga!=null),t(x+E<=H);t:{if(v=(j=p.ga).c,H=j.l.o,j.$a==0){if(J=p.rc,ct=p.Vc,pt=p.Fa,z=p.P+1+x*v,Z=p.mb,lt=p.nb+x*v,t(z<=p.P+p.qc),j.Z!=0)for(t(_l[j.Z]!=null),V=0;V<E;++V)_l[j.Z](J,ct,pt,z,Z,lt,v),J=Z,ct=lt,lt+=v,z+=v;else for(V=0;V<E;++V)r(Z,lt,pt,z,v),J=Z,ct=lt,lt+=v,z+=v;p.rc=J,p.Vc=ct}else{if(t(j.mc!=null),v=x+E,t((V=j.mc)!=null),t(v<=V.i),V.C>=v)v=1;else if(j.ic||Gr(),j.ic){j=V.V,J=V.Ba,ct=V.c;var Bt=V.i,mt=(pt=1,z=V.$/ct,Z=V.$%ct,lt=V.m,wt=V.s,V.$),Ct=ct*Bt,Ft=ct*v,Lt=wt.wc,It=mt<Ft?Hi(wt,Z,z):null;t(mt<=Ct),t(v<=Bt),t(gs(wt));e:for(;;){for(;!lt.h&&mt<Ft;){if(Z&Lt||(It=Hi(wt,Z,z)),t(It!=null),ot(lt),256>(Bt=Er(It.G[0],It.H[0],lt)))j[J+mt]=Bt,++mt,++Z>=ct&&(Z=0,++z<=v&&!(z%16)&&ms(V,z));else{if(!(280>Bt)){pt=0;break e}Bt=qn(Bt-256,lt);var de,ee=Er(It.G[4],It.H[4],lt);if(ot(lt),!(mt>=(ee=Sn(ct,ee=qn(ee,lt)))&&Ct-mt>=Bt)){pt=0;break e}for(de=0;de<Bt;++de)j[J+mt+de]=j[J+mt+de-ee];for(mt+=Bt,Z+=Bt;Z>=ct;)Z-=ct,++z<=v&&!(z%16)&&ms(V,z);mt<Ft&&Z&Lt&&(It=Hi(wt,Z,z))}t(lt.h==rt(lt))}ms(V,z>v?v:z);break e}!pt||lt.h&&mt<Ct?(pt=0,V.a=lt.h?5:3):V.$=mt,v=pt}else v=kn(V,V.V,V.Ba,V.c,V.i,v,uo);if(!v){E=0;break t}}x+E>=H&&(p.Cc=1),E=1}if(!E)return null;if(p.Cc&&((E=p.ga)!=null&&(E.mc=null),p.ga=null,0<p.Ga))return alert("todo:WebPDequantizeLevels"),null}return p.nb+x*P}function dr(p,v,x,E,P,H){for(;0<P--;){var V,j=p,z=v+(x?1:0),Z=p,lt=v+(x?0:3);for(V=0;V<E;++V){var wt=Z[lt+4*V];wt!=255&&(wt*=32897,j[z+4*V+0]=j[z+4*V+0]*wt>>23,j[z+4*V+1]=j[z+4*V+1]*wt>>23,j[z+4*V+2]=j[z+4*V+2]*wt>>23)}v+=H}}function Ar(p,v,x,E,P){for(;0<E--;){var H;for(H=0;H<x;++H){var V=p[v+2*H+0],j=15&(Z=p[v+2*H+1]),z=4369*j,Z=(240&Z|Z>>4)*z>>16;p[v+2*H+0]=(240&V|V>>4)*z>>16&240|(15&V|V<<4)*z>>16>>4&15,p[v+2*H+1]=240&Z|j}v+=P}}function kr(p,v,x,E,P,H,V,j){var z,Z,lt=255;for(Z=0;Z<P;++Z){for(z=0;z<E;++z){var wt=p[v+z];H[V+4*z]=wt,lt&=wt}v+=x,V+=j}return lt!=255}function Kr(p,v,x,E,P){var H;for(H=0;H<P;++H)x[E+H]=p[v+H]>>8}function Gr(){Kp=dr,DE=Ar,OE=kr,RE=Kr}function $n(p,v,x){Q[p]=function(E,P,H,V,j,z,Z,lt,wt,J,ct,pt,Bt,mt,Ct,Ft,Lt){var It,de=Lt-1>>1,ee=j[z+0]|Z[lt+0]<<16,Pe=wt[J+0]|ct[pt+0]<<16;t(E!=null);var he=3*ee+Pe+131074>>2;for(v(E[P+0],255&he,he>>16,Bt,mt),H!=null&&(he=3*Pe+ee+131074>>2,v(H[V+0],255&he,he>>16,Ct,Ft)),It=1;It<=de;++It){var We=j[z+It]|Z[lt+It]<<16,Wi=wt[J+It]|ct[pt+It]<<16,De=ee+We+Pe+Wi+524296,ce=De+2*(We+Pe)>>3;he=ce+ee>>1,ee=(De=De+2*(ee+Wi)>>3)+We>>1,v(E[P+2*It-1],255&he,he>>16,Bt,mt+(2*It-1)*x),v(E[P+2*It-0],255&ee,ee>>16,Bt,mt+(2*It-0)*x),H!=null&&(he=De+Pe>>1,ee=ce+Wi>>1,v(H[V+2*It-1],255&he,he>>16,Ct,Ft+(2*It-1)*x),v(H[V+2*It+0],255&ee,ee>>16,Ct,Ft+(2*It+0)*x)),ee=We,Pe=Wi}1&Lt||(he=3*ee+Pe+131074>>2,v(E[P+Lt-1],255&he,he>>16,Bt,mt+(Lt-1)*x),H!=null&&(he=3*Pe+ee+131074>>2,v(H[V+Lt-1],255&he,he>>16,Ct,Ft+(Lt-1)*x)))}}function yo(){cA[x1]=T8,cA[F1]=$E,cA[GE]=N8,cA[S1]=ZE,cA[E1]=JE,cA[Kb]=t3,cA[zE]=P8,cA[Gb]=$E,cA[zb]=ZE,cA[k1]=JE,cA[qb]=t3}function Dp(p){return p&-16384?0>p?0:255:p>>D8}function Jh(p,v){return Dp((19077*p>>8)+(26149*v>>8)-14234)}function tc(p,v,x){return Dp((19077*p>>8)-(6419*v>>8)-(13320*x>>8)+8708)}function El(p,v){return Dp((19077*p>>8)+(33050*v>>8)-17685)}function ec(p,v,x,E,P){E[P+0]=Jh(p,x),E[P+1]=tc(p,v,x),E[P+2]=El(p,v)}function id(p,v,x,E,P){E[P+0]=El(p,v),E[P+1]=tc(p,v,x),E[P+2]=Jh(p,x)}function nd(p,v,x,E,P){var H=tc(p,v,x);v=H<<3&224|El(p,v)>>3,E[P+0]=248&Jh(p,x)|H>>5,E[P+1]=v}function Un(p,v,x,E,P){var H=240&El(p,v)|15;E[P+0]=240&Jh(p,x)|tc(p,v,x)>>4,E[P+1]=H}function rc(p,v,x,E,P){E[P+0]=255,ec(p,v,x,E,P+1)}function ic(p,v,x,E,P){id(p,v,x,E,P),E[P+3]=255}function Op(p,v,x,E,P){ec(p,v,x,E,P),E[P+3]=255}function Ea(p,v,x){Q[p]=function(E,P,H,V,j,z,Z,lt,wt){for(var J=lt+(-2&wt)*x;lt!=J;)v(E[P+0],H[V+0],j[z+0],Z,lt),v(E[P+1],H[V+0],j[z+0],Z,lt+x),P+=2,++V,++z,lt+=2*x;1&wt&&v(E[P+0],H[V+0],j[z+0],Z,lt)}}function Zn(p,v,x){return x==0?p==0?v==0?6:5:v==0?4:0:x}function y1(p,v,x,E,P){switch(p>>>30){case 3:bo(v,x,E,P,0);break;case 2:Ql(v,x,E,P);break;case 1:In(v,x,E,P)}}function sd(p,v){var x,E,P=v.M,H=v.Nb,V=p.oc,j=p.pc+40,z=p.oc,Z=p.pc+584,lt=p.oc,wt=p.pc+600;for(x=0;16>x;++x)V[j+32*x-1]=129;for(x=0;8>x;++x)z[Z+32*x-1]=129,lt[wt+32*x-1]=129;for(0<P?V[j-1-32]=z[Z-1-32]=lt[wt-1-32]=129:(n(V,j-32-1,127,21),n(z,Z-32-1,127,9),n(lt,wt-32-1,127,9)),E=0;E<p.za;++E){var J=v.ya[v.aa+E];if(0<E){for(x=-1;16>x;++x)r(V,j+32*x-4,V,j+32*x+12,4);for(x=-1;8>x;++x)r(z,Z+32*x-4,z,Z+32*x+4,4),r(lt,wt+32*x-4,lt,wt+32*x+4,4)}var ct=p.Gd,pt=p.Hd+E,Bt=J.ad,mt=J.Hc;if(0<P&&(r(V,j-32,ct[pt].y,0,16),r(z,Z-32,ct[pt].f,0,8),r(lt,wt-32,ct[pt].ea,0,8)),J.Za){var Ct=V,Ft=j-32+16;for(0<P&&(E>=p.za-1?n(Ct,Ft,ct[pt].y[15],4):r(Ct,Ft,ct[pt+1].y,0,4)),x=0;4>x;x++)Ct[Ft+128+x]=Ct[Ft+256+x]=Ct[Ft+384+x]=Ct[Ft+0+x];for(x=0;16>x;++x,mt<<=2)Ct=V,Ft=j+r3[x],WA[J.Ob[x]](Ct,Ft),y1(mt,Bt,16*+x,Ct,Ft)}else if(Ct=Zn(E,P,J.Ob[0]),Ll[Ct](V,j),mt!=0)for(x=0;16>x;++x,mt<<=2)y1(mt,Bt,16*+x,V,j+r3[x]);for(x=J.Gc,Ct=Zn(E,P,J.Dd),Co[Ct](z,Z),Co[Ct](lt,wt),mt=Bt,Ct=z,Ft=Z,255&(J=0|x)&&(170&J?hd(mt,256,Ct,Ft):Ua(mt,256,Ct,Ft)),J=lt,mt=wt,255&(x>>=8)&&(170&x?hd(Bt,320,J,mt):Ua(Bt,320,J,mt)),P<p.Ub-1&&(r(ct[pt].y,0,V,j+480,16),r(ct[pt].f,0,z,Z+224,8),r(ct[pt].ea,0,lt,wt+224,8)),x=8*H*p.B,ct=p.sa,pt=p.ta+16*E+16*H*p.R,Bt=p.qa,J=p.ra+8*E+x,mt=p.Ha,Ct=p.Ia+8*E+x,x=0;16>x;++x)r(ct,pt+x*p.R,V,j+32*x,16);for(x=0;8>x;++x)r(Bt,J+x*p.B,z,Z+32*x,8),r(mt,Ct+x*p.B,lt,wt+32*x,8)}}function b1(p,v,x,E,P,H,V,j,z){var Z=[0],lt=[0],wt=0,J=z!=null?z.kd:0,ct=z??new dt;if(p==null||12>x)return 7;ct.data=p,ct.w=v,ct.ha=x,v=[v],x=[x],ct.gb=[ct.gb];t:{var pt=v,Bt=x,mt=ct.gb;if(t(p!=null),t(Bt!=null),t(mt!=null),mt[0]=0,12<=Bt[0]&&!e(p,pt[0],"RIFF")){if(e(p,pt[0]+8,"WEBP")){mt=3;break t}var Ct=jt(p,pt[0]+4);if(12>Ct||4294967286<Ct){mt=3;break t}if(J&&Ct>Bt[0]-8){mt=7;break t}mt[0]=Ct,pt[0]+=12,Bt[0]-=12}mt=0}if(mt!=0)return mt;for(Ct=0<ct.gb[0],x=x[0];;){t:{var Ft=p;Bt=v,mt=x;var Lt=Z,It=lt,de=pt=[0];if((he=wt=[wt])[0]=0,8>mt[0])mt=7;else{if(!e(Ft,Bt[0],"VP8X")){if(jt(Ft,Bt[0]+4)!=10){mt=3;break t}if(18>mt[0]){mt=7;break t}var ee=jt(Ft,Bt[0]+8),Pe=1+Tt(Ft,Bt[0]+12);if(2147483648<=Pe*(Ft=1+Tt(Ft,Bt[0]+15))){mt=3;break t}de!=null&&(de[0]=ee),Lt!=null&&(Lt[0]=Pe),It!=null&&(It[0]=Ft),Bt[0]+=18,mt[0]-=18,he[0]=1}mt=0}}if(wt=wt[0],pt=pt[0],mt!=0)return mt;if(Bt=!!(2&pt),!Ct&&wt)return 3;if(H!=null&&(H[0]=!!(16&pt)),V!=null&&(V[0]=Bt),j!=null&&(j[0]=0),V=Z[0],pt=lt[0],wt&&Bt&&z==null){mt=0;break}if(4>x){mt=7;break}if(Ct&&wt||!Ct&&!wt&&!e(p,v[0],"ALPH")){x=[x],ct.na=[ct.na],ct.P=[ct.P],ct.Sa=[ct.Sa];t:{ee=p,mt=v,Ct=x;var he=ct.gb;Lt=ct.na,It=ct.P,de=ct.Sa,Pe=22,t(ee!=null),t(Ct!=null),Ft=mt[0];var We=Ct[0];for(t(Lt!=null),t(de!=null),Lt[0]=null,It[0]=null,de[0]=0;;){if(mt[0]=Ft,Ct[0]=We,8>We){mt=7;break t}var Wi=jt(ee,Ft+4);if(4294967286<Wi){mt=3;break t}var De=8+Wi+1&-2;if(Pe+=De,0<he&&Pe>he){mt=3;break t}if(!e(ee,Ft,"VP8 ")||!e(ee,Ft,"VP8L")){mt=0;break t}if(We[0]<De){mt=7;break t}e(ee,Ft,"ALPH")||(Lt[0]=ee,It[0]=Ft+8,de[0]=Wi),Ft+=De,We-=De}}if(x=x[0],ct.na=ct.na[0],ct.P=ct.P[0],ct.Sa=ct.Sa[0],mt!=0)break}x=[x],ct.Ja=[ct.Ja],ct.xa=[ct.xa];t:if(he=p,mt=v,Ct=x,Lt=ct.gb[0],It=ct.Ja,de=ct.xa,ee=mt[0],Ft=!e(he,ee,"VP8 "),Pe=!e(he,ee,"VP8L"),t(he!=null),t(Ct!=null),t(It!=null),t(de!=null),8>Ct[0])mt=7;else{if(Ft||Pe){if(he=jt(he,ee+4),12<=Lt&&he>Lt-12){mt=3;break t}if(J&&he>Ct[0]-8){mt=7;break t}It[0]=he,mt[0]+=8,Ct[0]-=8,de[0]=Pe}else de[0]=5<=Ct[0]&&he[ee+0]==47&&!(he[ee+4]>>5),It[0]=Ct[0];mt=0}if(x=x[0],ct.Ja=ct.Ja[0],ct.xa=ct.xa[0],v=v[0],mt!=0)break;if(4294967286<ct.Ja)return 3;if(j==null||Bt||(j[0]=ct.xa?2:1),V=[V],pt=[pt],ct.xa){if(5>x){mt=7;break}j=V,J=pt,Bt=H,p==null||5>x?p=0:5<=x&&p[v+0]==47&&!(p[v+4]>>5)?(Ct=[0],he=[0],Lt=[0],at(It=new G,p,v,x),RA(It,Ct,he,Lt)?(j!=null&&(j[0]=Ct[0]),J!=null&&(J[0]=he[0]),Bt!=null&&(Bt[0]=Lt[0]),p=1):p=0):p=0}else{if(10>x){mt=7;break}j=pt,p==null||10>x||!qu(p,v+3,x-3)?p=0:(J=p[v+0]|p[v+1]<<8|p[v+2]<<16,Bt=16383&(p[v+7]<<8|p[v+6]),p=16383&(p[v+9]<<8|p[v+8]),1&J||3<(J>>1&7)||!(J>>4&1)||J>>5>=ct.Ja||!Bt||!p?p=0:(V&&(V[0]=Bt),j&&(j[0]=p),p=1))}if(!p||(V=V[0],pt=pt[0],wt&&(Z[0]!=V||lt[0]!=pt)))return 3;z!=null&&(z[0]=ct,z.offset=v-z.w,t(4294967286>v-z.w),t(z.offset==z.ha-x));break}return mt==0||mt==7&&wt&&z==null?(H!=null&&(H[0]|=ct.na!=null&&0<ct.na.length),E!=null&&(E[0]=V),P!=null&&(P[0]=pt),0):mt}function lA(p,v,x){var E=v.width,P=v.height,H=0,V=0,j=E,z=P;if(v.Da=p!=null&&0<p.Da,v.Da&&(j=p.cd,z=p.bd,H=p.v,V=p.j,11>x||(H&=-2,V&=-2),0>H||0>V||0>=j||0>=z||H+j>E||V+z>P))return 0;if(v.v=H,v.j=V,v.va=H+j,v.o=V+z,v.U=j,v.T=z,v.da=p!=null&&0<p.da,v.da){if(!Zt(j,z,x=[p.ib],H=[p.hb]))return 0;v.ib=x[0],v.hb=H[0]}return v.ob=p!=null&&p.ob,v.Kb=p==null||!p.Sd,v.da&&(v.ob=v.ib<3*E/4&&v.hb<3*P/4,v.Kb=0),1}function nc(p){if(p==null)return 2;if(11>p.S){var v=p.f.RGBA;v.fb+=(p.height-1)*v.A,v.A=-v.A}else v=p.f.kb,p=p.height,v.O+=(p-1)*v.fa,v.fa=-v.fa,v.N+=(p-1>>1)*v.Ab,v.Ab=-v.Ab,v.W+=(p-1>>1)*v.Db,v.Db=-v.Db,v.F!=null&&(v.J+=(p-1)*v.lb,v.lb=-v.lb);return 0}function Rp(p,v,x,E){if(E==null||0>=p||0>=v)return 2;if(x!=null){if(x.Da){var P=x.cd,H=x.bd,V=-2&x.v,j=-2&x.j;if(0>V||0>j||0>=P||0>=H||V+P>p||j+H>v)return 2;p=P,v=H}if(x.da){if(!Zt(p,v,P=[x.ib],H=[x.hb]))return 2;p=P[0],v=H[0]}}E.width=p,E.height=v;t:{var z=E.width,Z=E.height;if(p=E.S,0>=z||0>=Z||!(p>=x1&&13>p))p=2;else{if(0>=E.Rd&&E.sd==null){V=H=P=v=0;var lt=(j=z*i3[p])*Z;if(11>p||(H=(Z+1)/2*(v=(z+1)/2),p==12&&(V=(P=z)*Z)),(Z=s(lt+2*H+V))==null){p=1;break t}E.sd=Z,11>p?((z=E.f.RGBA).eb=Z,z.fb=0,z.A=j,z.size=lt):((z=E.f.kb).y=Z,z.O=0,z.fa=j,z.Fd=lt,z.f=Z,z.N=0+lt,z.Ab=v,z.Cd=H,z.ea=Z,z.W=0+lt+H,z.Db=v,z.Ed=H,p==12&&(z.F=Z,z.J=0+lt+2*H),z.Tc=V,z.lb=P)}if(v=1,P=E.S,H=E.width,V=E.height,P>=x1&&13>P)if(11>P)p=E.f.RGBA,v&=(j=Math.abs(p.A))*(V-1)+H<=p.size,v&=j>=H*i3[P],v&=p.eb!=null;else{p=E.f.kb,j=(H+1)/2,lt=(V+1)/2,z=Math.abs(p.fa),Z=Math.abs(p.Ab);var wt=Math.abs(p.Db),J=Math.abs(p.lb),ct=J*(V-1)+H;v&=z*(V-1)+H<=p.Fd,v&=Z*(lt-1)+j<=p.Cd,v=(v&=wt*(lt-1)+j<=p.Ed)&z>=H&Z>=j&wt>=j,v&=p.y!=null,v&=p.f!=null,v&=p.ea!=null,P==12&&(v&=J>=H,v&=ct<=p.Tc,v&=p.F!=null)}else v=0;p=v?0:2}}return p!=0||x!=null&&x.fd&&(p=nc(E)),p}var Ad=64,sc=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Hp=24,Jn=32,vs=8,ad=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Ot("Predictor0","PredictorAdd0"),Q.Predictor0=function(){return 4278190080},Q.Predictor1=function(p){return p},Q.Predictor2=function(p,v,x){return v[x+0]},Q.Predictor3=function(p,v,x){return v[x+1]},Q.Predictor4=function(p,v,x){return v[x-1]},Q.Predictor5=function(p,v,x){return Yt(Yt(p,v[x+1]),v[x+0])},Q.Predictor6=function(p,v,x){return Yt(p,v[x-1])},Q.Predictor7=function(p,v,x){return Yt(p,v[x+0])},Q.Predictor8=function(p,v,x){return Yt(v[x-1],v[x+0])},Q.Predictor9=function(p,v,x){return Yt(v[x+0],v[x+1])},Q.Predictor10=function(p,v,x){return Yt(Yt(p,v[x-1]),Yt(v[x+0],v[x+1]))},Q.Predictor11=function(p,v,x){var E=v[x+0];return 0>=Ht(E>>24&255,p>>24&255,(v=v[x-1])>>24&255)+Ht(E>>16&255,p>>16&255,v>>16&255)+Ht(E>>8&255,p>>8&255,v>>8&255)+Ht(255&E,255&p,255&v)?E:p},Q.Predictor12=function(p,v,x){var E=v[x+0];return(xt((p>>24&255)+(E>>24&255)-((v=v[x-1])>>24&255))<<24|xt((p>>16&255)+(E>>16&255)-(v>>16&255))<<16|xt((p>>8&255)+(E>>8&255)-(v>>8&255))<<8|xt((255&p)+(255&E)-(255&v)))>>>0},Q.Predictor13=function(p,v,x){var E=v[x-1];return(Rt((p=Yt(p,v[x+0]))>>24&255,E>>24&255)<<24|Rt(p>>16&255,E>>16&255)<<16|Rt(p>>8&255,E>>8&255)<<8|Rt(255&p,255&E))>>>0};var kl=Q.PredictorAdd0;Q.PredictorAdd1=Kt,Ot("Predictor2","PredictorAdd2"),Ot("Predictor3","PredictorAdd3"),Ot("Predictor4","PredictorAdd4"),Ot("Predictor5","PredictorAdd5"),Ot("Predictor6","PredictorAdd6"),Ot("Predictor7","PredictorAdd7"),Ot("Predictor8","PredictorAdd8"),Ot("Predictor9","PredictorAdd9"),Ot("Predictor10","PredictorAdd10"),Ot("Predictor11","PredictorAdd11"),Ot("Predictor12","PredictorAdd12"),Ot("Predictor13","PredictorAdd13");var Ul=Q.PredictorAdd2;Gt("ColorIndexInverseTransform","MapARGB","32b",function(p){return p>>8&255},function(p){return p}),Gt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(p){return p},function(p){return p>>8&255});var od,Ac=Q.ColorIndexInverseTransform,Ui=Q.MapARGB,Wb=Q.VP8LColorIndexInverseTransformAlpha,ka=Q.MapAlpha,VA=Q.VP8LPredictorsAdd=[];VA.length=16,(Q.VP8LPredictors=[]).length=16,(Q.VP8LPredictorsAdd_C=[]).length=16,(Q.VP8LPredictors_C=[]).length=16;var ac,Vp,Wp,ld,oc,lc,Il,bo,Ql,hd,In,Ua,Br,Cr,li,Vi,Bo,jp,cd,B1,ME,TE,NE,PE,Kp,DE,OE,RE,HE=s(511),VE=s(2041),WE=s(225),jE=s(767),KE=0,jb=VE,C1=WE,Os=jE,hA=HE,x1=0,F1=1,GE=2,S1=3,E1=4,Kb=5,zE=6,Gb=7,zb=8,k1=9,qb=10,b8=[2,3,7],B8=[3,3,11],qE=[280,256,256,256,40],C8=[0,1,1,1,0],x8=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],F8=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],S8=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],E8=8,Xb=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Yb=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Gp=null,k8=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],U8=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],XE=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],I8=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Q8=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],L8=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],_8=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ll=[],WA=[],Co=[],M8=1,YE=2,_l=[],cA=[];$n("UpsampleRgbLinePair",ec,3),$n("UpsampleBgrLinePair",id,3),$n("UpsampleRgbaLinePair",Op,4),$n("UpsampleBgraLinePair",ic,4),$n("UpsampleArgbLinePair",rc,4),$n("UpsampleRgba4444LinePair",Un,2),$n("UpsampleRgb565LinePair",nd,2);var T8=Q.UpsampleRgbLinePair,N8=Q.UpsampleBgrLinePair,$E=Q.UpsampleRgbaLinePair,ZE=Q.UpsampleBgraLinePair,JE=Q.UpsampleArgbLinePair,t3=Q.UpsampleRgba4444LinePair,P8=Q.UpsampleRgb565LinePair,U1=16,I1=1<<U1-1,zp=-227,$b=482,D8=6,e3=0,O8=s(256),R8=s(256),H8=s(256),V8=s(256),W8=s($b-zp),j8=s($b-zp);Ea("YuvToRgbRow",ec,3),Ea("YuvToBgrRow",id,3),Ea("YuvToRgbaRow",Op,4),Ea("YuvToBgraRow",ic,4),Ea("YuvToArgbRow",rc,4),Ea("YuvToRgba4444Row",Un,2),Ea("YuvToRgb565Row",nd,2);var r3=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Q1=[0,2,8],K8=[8,7,6,4,4,2,2,2,1,1,1,1],G8=1;this.WebPDecodeRGBA=function(p,v,x,E,P){var H=F1,V=new At,j=new we;V.ba=j,j.S=H,j.width=[j.width],j.height=[j.height];var z=j.width,Z=j.height,lt=new ve;if(lt==null||p==null)var wt=2;else t(lt!=null),wt=b1(p,v,x,lt.width,lt.height,lt.Pd,lt.Qd,lt.format,null);if(wt!=0?z=0:(z!=null&&(z[0]=lt.width[0]),Z!=null&&(Z[0]=lt.height[0]),z=1),z){j.width=j.width[0],j.height=j.height[0],E!=null&&(E[0]=j.width),P!=null&&(P[0]=j.height);t:{if(E=new Ps,(P=new dt).data=p,P.w=v,P.ha=x,P.kd=1,v=[0],t(P!=null),((p=b1(P.data,P.w,P.ha,null,null,null,v,null,P))==0||p==7)&&v[0]&&(p=4),(v=p)==0){if(t(V!=null),E.data=P.data,E.w=P.w+P.offset,E.ha=P.ha-P.offset,E.put=qt,E.ac=aA,E.bc=Fn,E.ma=V,P.xa){if((p=oA())==null){V=1;break t}if((function(J,ct){var pt=[0],Bt=[0],mt=[0];e:for(;;){if(J==null)return 0;if(ct==null)return J.a=2,0;if(J.l=ct,J.a=0,at(J.m,ct.data,ct.w,ct.ha),!RA(J.m,pt,Bt,mt)){J.a=3;break e}if(J.xb=YE,ct.width=pt[0],ct.height=Bt[0],!Ei(pt[0],Bt[0],1,J,null))break e;return 1}return t(J.a!=0),0})(p,E)){if(E=(v=Rp(E.width,E.height,V.Oa,V.ba))==0){e:{E=p;r:for(;;){if(E==null){E=0;break e}if(t(E.s.yc!=null),t(E.s.Ya!=null),t(0<E.s.Wb),t((x=E.l)!=null),t((P=x.ma)!=null),E.xb!=0){if(E.ca=P.ba,E.tb=P.tb,t(E.ca!=null),!lA(P.Oa,x,S1)){E.a=2;break r}if(!Ba(E,x.width)||x.da)break r;if((x.da||le(E.ca.S))&&Gr(),11>E.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),E.ca.f.kb.F!=null&&Gr()),E.Pb&&0<E.s.ua&&E.s.vb.X==null&&!q(E.s.vb,E.s.Wa.Xa)){E.a=1;break r}E.xb=0}if(!kn(E,E.V,E.Ba,E.c,E.i,x.o,En))break r;P.Dc=E.Ma,E=1;break e}t(E.a!=0),E=0}E=!E}E&&(v=p.a)}else v=p.a}else{if((p=new Zr)==null){V=1;break t}if(p.Fa=P.na,p.P=P.P,p.qc=P.Sa,xa(p,E)){if((v=Rp(E.width,E.height,V.Oa,V.ba))==0){if(p.Aa=0,x=V.Oa,t((P=p)!=null),x!=null){if(0<(z=0>(z=x.Md)?0:100<z?255:255*z/100)){for(Z=lt=0;4>Z;++Z)12>(wt=P.pb[Z]).lc&&(wt.ia=z*K8[0>wt.lc?0:wt.lc]>>3),lt|=wt.ia;lt&&(alert("todo:VP8InitRandom"),P.ia=1)}P.Ga=x.Id,100<P.Ga?P.Ga=100:0>P.Ga&&(P.Ga=0)}(function(J,ct){if(J==null)return 0;if(ct==null)return jr(J,2,"NULL VP8Io parameter in VP8Decode().");if(!J.cb&&!xa(J,ct))return 0;if(t(J.cb),ct.ac==null||ct.ac(ct)){ct.ob&&(J.L=0);var pt=Q1[J.L];if(J.L==2?(J.yb=0,J.zb=0):(J.yb=ct.v-pt>>4,J.zb=ct.j-pt>>4,0>J.yb&&(J.yb=0),0>J.zb&&(J.zb=0)),J.Va=ct.o+15+pt>>4,J.Hb=ct.va+15+pt>>4,J.Hb>J.za&&(J.Hb=J.za),J.Va>J.Ub&&(J.Va=J.Ub),0<J.L){var Bt=J.ed;for(pt=0;4>pt;++pt){var mt;if(J.Qa.Cb){var Ct=J.Qa.Lb[pt];J.Qa.Fb||(Ct+=Bt.Tb)}else Ct=Bt.Tb;for(mt=0;1>=mt;++mt){var Ft=J.gd[pt][mt],Lt=Ct;if(Bt.Pc&&(Lt+=Bt.vd[0],mt&&(Lt+=Bt.od[0])),0<(Lt=0>Lt?0:63<Lt?63:Lt)){var It=Lt;0<Bt.wb&&(It=4<Bt.wb?It>>2:It>>1)>9-Bt.wb&&(It=9-Bt.wb),1>It&&(It=1),Ft.dd=It,Ft.tc=2*Lt+It,Ft.ld=40<=Lt?2:15<=Lt?1:0}else Ft.tc=0;Ft.La=mt}}}pt=0}else jr(J,6,"Frame setup failed"),pt=J.a;if(pt=pt==0){if(pt){J.$c=0,0<J.Aa||(J.Ic=G8);e:{pt=J.Ic,Bt=4*(It=J.za);var de=32*It,ee=It+1,Pe=0<J.L?It*(0<J.Aa?2:1):0,he=(J.Aa==2?2:1)*It;if((Ft=Bt+832+(mt=3*(16*pt+Q1[J.L])/2*de)+(Ct=J.Fa!=null&&0<J.Fa.length?J.Kc.c*J.Kc.i:0))!=Ft)pt=0;else{if(Ft>J.Vb){if(J.Vb=0,J.Ec=s(Ft),J.Fc=0,J.Ec==null){pt=jr(J,1,"no memory during frame initialization.");break e}J.Vb=Ft}Ft=J.Ec,Lt=J.Fc,J.Ac=Ft,J.Bc=Lt,Lt+=Bt,J.Gd=A(de,ws),J.Hd=0,J.rb=A(ee+1,Pt),J.sb=1,J.wa=Pe?A(Pe,kt):null,J.Y=0,J.D.Nb=0,J.D.wa=J.wa,J.D.Y=J.Y,0<J.Aa&&(J.D.Y+=It),t(!0),J.oc=Ft,J.pc=Lt,Lt+=832,J.ya=A(he,Re),J.aa=0,J.D.ya=J.ya,J.D.aa=J.aa,J.Aa==2&&(J.D.aa+=It),J.R=16*It,J.B=8*It,It=(de=Q1[J.L])*J.R,de=de/2*J.B,J.sa=Ft,J.ta=Lt+It,J.qa=J.sa,J.ra=J.ta+16*pt*J.R+de,J.Ha=J.qa,J.Ia=J.ra+8*pt*J.B+de,J.$c=0,Lt+=mt,J.mb=Ct?Ft:null,J.nb=Ct?Lt:null,t(Lt+Ct<=J.Fc+J.Vb),Qp(J),n(J.Ac,J.Bc,0,Bt),pt=1}}if(pt){if(ct.ka=0,ct.y=J.sa,ct.O=J.ta,ct.f=J.qa,ct.N=J.ra,ct.ea=J.Ha,ct.Vd=J.Ia,ct.fa=J.R,ct.Rc=J.B,ct.F=null,ct.J=0,!KE){for(pt=-255;255>=pt;++pt)HE[255+pt]=0>pt?-pt:pt;for(pt=-1020;1020>=pt;++pt)VE[1020+pt]=-128>pt?-128:127<pt?127:pt;for(pt=-112;112>=pt;++pt)WE[112+pt]=-16>pt?-16:15<pt?15:pt;for(pt=-255;510>=pt;++pt)jE[255+pt]=0>pt?0:255<pt?255:pt;KE=1}Il=d1,bo=Eb,hd=kb,In=Ub,Ua=Fa,Ql=u1,Br=g1,Cr=m1,li=v1,Vi=B,Bo=w1,jp=Zh,cd=T,B1=Y,ME=ed,TE=Pp,NE=rd,PE=p1,WA[0]=Nb,WA[1]=Zu,WA[2]=Mb,WA[3]=Tb,WA[4]=Pb,WA[5]=go,WA[6]=Db,WA[7]=mo,WA[8]=Rb,WA[9]=Ob,Ll[0]=f1,Ll[1]=Ib,Ll[2]=Qb,Ll[3]=Lb,Ll[4]=Fl,Ll[5]=_b,Ll[6]=Yh,Co[0]=Hb,Co[1]=Lp,Co[2]=Ju,Co[3]=_p,Co[4]=Vb,Co[5]=td,Co[6]=Mp,pt=1}else pt=0}pt&&(pt=(function(We,Wi){for(We.M=0;We.M<We.Va;++We.M){var De,ce=We.Jc[We.M&We.Xb],Vt=We.m,hi=We;for(De=0;De<hi.za;++De){var Qe=Vt,Ge=hi,Ur=Ge.Ac,An=Ge.Bc+4*De,ts=Ge.zc,Jr=Ge.ya[Ge.aa+De];if(Ge.Qa.Bb?Jr.$b=yt(Qe,Ge.Pa.jb[0])?2+yt(Qe,Ge.Pa.jb[2]):yt(Qe,Ge.Pa.jb[1]):Jr.$b=0,Ge.kc&&(Jr.Ad=yt(Qe,Ge.Bd)),Jr.Za=!yt(Qe,145)+0,Jr.Za){var Qn=Jr.Ob,es=0;for(Ge=0;4>Ge;++Ge){var ji,qe=ts[0+Ge];for(ji=0;4>ji;++ji){qe=Q8[Ur[An+ji]][qe];for(var ir=XE[yt(Qe,qe[0])];0<ir;)ir=XE[2*ir+yt(Qe,qe[ir])];qe=-ir,Ur[An+ji]=qe}r(Qn,es,Ur,An,4),es+=4,ts[0+Ge]=qe}}else qe=yt(Qe,156)?yt(Qe,128)?1:3:yt(Qe,163)?2:0,Jr.Ob[0]=qe,n(Ur,An,qe,4),n(ts,0,qe,4);Jr.Dd=yt(Qe,142)?yt(Qe,114)?yt(Qe,183)?1:3:2:0}if(hi.m.Ka)return jr(We,7,"Premature end-of-partition0 encountered.");for(;We.ja<We.za;++We.ja){if(hi=ce,Qe=(Vt=We).rb[Vt.sb-1],Ur=Vt.rb[Vt.sb+Vt.ja],De=Vt.ya[Vt.aa+Vt.ja],An=Vt.kc?De.Ad:0)Qe.la=Ur.la=0,De.Za||(Qe.Na=Ur.Na=0),De.Hc=0,De.Gc=0,De.ia=0;else{var ti,nr;if(Qe=Ur,Ur=hi,An=Vt.Pa.Xc,ts=Vt.ya[Vt.aa+Vt.ja],Jr=Vt.pb[ts.$b],Ge=ts.ad,Qn=0,es=Vt.rb[Vt.sb-1],qe=ji=0,n(Ge,Qn,0,384),ts.Za)var an=0,jA=An[3];else{ir=s(16);var ci=Qe.Na+es.Na;if(ci=Gp(Ur,An[1],ci,Jr.Eb,0,ir,0),Qe.Na=es.Na=(0<ci)+0,1<ci)Il(ir,0,Ge,Qn);else{var ys=ir[0]+3>>3;for(ir=0;256>ir;ir+=16)Ge[Qn+ir]=ys}an=1,jA=An[0]}var fr=15&Qe.la,Ki=15&es.la;for(ir=0;4>ir;++ir){var Rs=1&Ki;for(ys=nr=0;4>ys;++ys)fr=fr>>1|(Rs=(ci=Gp(Ur,jA,ci=Rs+(1&fr),Jr.Sc,an,Ge,Qn))>an)<<7,nr=nr<<2|(3<ci?3:1<ci?2:Ge[Qn+0]!=0),Qn+=16;fr>>=4,Ki=Ki>>1|Rs<<7,ji=(ji<<8|nr)>>>0}for(jA=fr,an=Ki>>4,ti=0;4>ti;ti+=2){for(nr=0,fr=Qe.la>>4+ti,Ki=es.la>>4+ti,ir=0;2>ir;++ir){for(Rs=1&Ki,ys=0;2>ys;++ys)ci=Rs+(1&fr),fr=fr>>1|(Rs=0<(ci=Gp(Ur,An[2],ci,Jr.Qc,0,Ge,Qn)))<<3,nr=nr<<2|(3<ci?3:1<ci?2:Ge[Qn+0]!=0),Qn+=16;fr>>=2,Ki=Ki>>1|Rs<<5}qe|=nr<<4*ti,jA|=fr<<4<<ti,an|=(240&Ki)<<ti}Qe.la=jA,es.la=an,ts.Hc=ji,ts.Gc=qe,ts.ia=43690&qe?0:Jr.ia,An=!(ji|qe)}if(0<Vt.L&&(Vt.wa[Vt.Y+Vt.ja]=Vt.gd[De.$b][De.Za],Vt.wa[Vt.Y+Vt.ja].La|=!An),hi.Ka)return jr(We,7,"Premature end-of-file encountered.")}if(Qp(We),Vt=Wi,hi=1,De=(ce=We).D,Qe=0<ce.L&&ce.M>=ce.zb&&ce.M<=ce.Va,ce.Aa==0)e:{if(De.M=ce.M,De.uc=Qe,sd(ce,De),hi=1,De=(nr=ce.D).Nb,Qe=(qe=Q1[ce.L])*ce.R,Ur=qe/2*ce.B,ir=16*De*ce.R,ys=8*De*ce.B,An=ce.sa,ts=ce.ta-Qe+ir,Jr=ce.qa,Ge=ce.ra-Ur+ys,Qn=ce.Ha,es=ce.Ia-Ur+ys,Ki=(fr=nr.M)==0,ji=fr>=ce.Va-1,ce.Aa==2&&sd(ce,nr),nr.uc)for(Rs=(ci=ce).D.M,t(ci.D.uc),nr=ci.yb;nr<ci.Hb;++nr){an=nr,jA=Rs;var rs=(Hs=(on=ci).D).Nb;ti=on.R;var Hs=Hs.wa[Hs.Y+an],Vs=on.sa,bs=on.ta+16*rs*ti+16*an,Ws=Hs.dd,xr=Hs.tc;if(xr!=0)if(t(3<=xr),on.L==1)0<an&&TE(Vs,bs,ti,xr+4),Hs.La&&PE(Vs,bs,ti,xr),0<jA&&ME(Vs,bs,ti,xr+4),Hs.La&&NE(Vs,bs,ti,xr);else{var js=on.B,KA=on.qa,hc=on.ra+8*rs*js+8*an,xo=on.Ha,on=on.Ia+8*rs*js+8*an;rs=Hs.ld,0<an&&(Cr(Vs,bs,ti,xr+4,Ws,rs),Vi(KA,hc,xo,on,js,xr+4,Ws,rs)),Hs.La&&(jp(Vs,bs,ti,xr,Ws,rs),B1(KA,hc,xo,on,js,xr,Ws,rs)),0<jA&&(Br(Vs,bs,ti,xr+4,Ws,rs),li(KA,hc,xo,on,js,xr+4,Ws,rs)),Hs.La&&(Bo(Vs,bs,ti,xr,Ws,rs),cd(KA,hc,xo,on,js,xr,Ws,rs))}}if(ce.ia&&alert("todo:DitherRow"),Vt.put!=null){if(nr=16*fr,fr=16*(fr+1),Ki?(Vt.y=ce.sa,Vt.O=ce.ta+ir,Vt.f=ce.qa,Vt.N=ce.ra+ys,Vt.ea=ce.Ha,Vt.W=ce.Ia+ys):(nr-=qe,Vt.y=An,Vt.O=ts,Vt.f=Jr,Vt.N=Ge,Vt.ea=Qn,Vt.W=es),ji||(fr-=qe),fr>Vt.o&&(fr=Vt.o),Vt.F=null,Vt.J=null,ce.Fa!=null&&0<ce.Fa.length&&nr<fr&&(Vt.J=ki(ce,Vt,nr,fr-nr),Vt.F=ce.mb,Vt.F==null&&Vt.F.length==0)){hi=jr(ce,3,"Could not decode alpha data.");break e}nr<Vt.j&&(qe=Vt.j-nr,nr=Vt.j,t(!(1&qe)),Vt.O+=ce.R*qe,Vt.N+=ce.B*(qe>>1),Vt.W+=ce.B*(qe>>1),Vt.F!=null&&(Vt.J+=Vt.width*qe)),nr<fr&&(Vt.O+=Vt.v,Vt.N+=Vt.v>>1,Vt.W+=Vt.v>>1,Vt.F!=null&&(Vt.J+=Vt.v),Vt.ka=nr-Vt.j,Vt.U=Vt.va-Vt.v,Vt.T=fr-nr,hi=Vt.put(Vt))}De+1!=ce.Ic||ji||(r(ce.sa,ce.ta-Qe,An,ts+16*ce.R,Qe),r(ce.qa,ce.ra-Ur,Jr,Ge+8*ce.B,Ur),r(ce.Ha,ce.Ia-Ur,Qn,es+8*ce.B,Ur))}if(!hi)return jr(We,6,"Output aborted.")}return 1})(J,ct)),ct.bc!=null&&ct.bc(ct),pt&=1}return pt?(J.cb=0,pt):0})(p,E)||(v=p.a)}}else v=p.a}v==0&&V.Oa!=null&&V.Oa.fd&&(v=nc(V.ba))}V=v}H=V!=0?null:11>H?j.f.RGBA.eb:j.f.kb.y}else H=null;return H};var i3=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(Q,K){for(var L="",O=0;O<4;O++)L+=String.fromCharCode(Q[K++]);return L}function h(Q,K){return Q[K+0]|Q[K+1]<<8}function u(Q,K){return(Q[K+0]|Q[K+1]<<8|Q[K+2]<<16)>>>0}function f(Q,K){return(Q[K+0]|Q[K+1]<<8|Q[K+2]<<16|Q[K+3]<<24)>>>0}new o;var d=[0],g=[0],m=[],y=new o,w=i,b=(function(Q,K){var L={},O=0,W=!1,R=0,tt=0;if(L.frames=[],!(function(M,G){for(var X=0;X<4;X++)if(M[G+X]!="RIFF".charCodeAt(X))return!0;return!1})(Q,K)){for(f(Q,K+=4),K+=8;K<Q.length;){var et=l(Q,K),st=f(Q,K+=4);K+=4;var nt=st+(1&st);switch(et){case"VP8 ":case"VP8L":L.frames[O]===void 0&&(L.frames[O]={}),(ht=L.frames[O]).src_off=W?tt:K-8,ht.src_size=R+st+8,O++,W&&(W=!1,R=0,tt=0);break;case"VP8X":(ht=L.header={}).feature_flags=Q[K];var at=K+4;ht.canvas_width=1+u(Q,at),at+=3,ht.canvas_height=1+u(Q,at),at+=3;break;case"ALPH":W=!0,R=nt+8,tt=K-8;break;case"ANIM":(ht=L.header).bgcolor=f(Q,K),at=K+4,ht.loop_count=h(Q,at),at+=2;break;case"ANMF":var ft,ht;(ht=L.frames[O]={}).offset_x=2*u(Q,K),K+=3,ht.offset_y=2*u(Q,K),K+=3,ht.width=1+u(Q,K),K+=3,ht.height=1+u(Q,K),K+=3,ht.duration=u(Q,K),K+=3,ft=Q[K++],ht.dispose=1&ft,ht.blend=ft>>1&1}et!="ANMF"&&(K+=nt)}return L}})(w,0);b.response=w,b.rgbaoutput=!0,b.dataurl=!1;var C=b.header?b.header:null,S=b.frames?b.frames:null;if(C){C.loop_counter=C.loop_count,d=[C.canvas_height],g=[C.canvas_width];for(var k=0;k<S.length&&S[k].blend!=0;k++);}var I=S[0],N=y.WebPDecodeRGBA(w,I.src_off,I.src_size,g,d);I.rgba=N,I.imgwidth=g[0],I.imgheight=d[0];for(var D=0;D<g[0]*d[0]*4;D++)m[D]=N[D];return this.width=g,this.height=d,this.data=m,this}/** ====================================================================
|
|
157
|
-
* @license
|
|
158
|
-
* jsPDF XMP metadata plugin
|
|
159
|
-
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
|
160
|
-
*
|
|
161
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
162
|
-
* a copy of this software and associated documentation files (the
|
|
163
|
-
* "Software"), to deal in the Software without restriction, including
|
|
164
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
165
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
166
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
167
|
-
* the following conditions:
|
|
168
|
-
*
|
|
169
|
-
* The above copyright notice and this permission notice shall be
|
|
170
|
-
* included in all copies or substantial portions of the Software.
|
|
171
|
-
*
|
|
172
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
173
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
174
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
175
|
-
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
176
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
177
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
178
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
179
|
-
* ====================================================================
|
|
180
|
-
*/function O7(){var i,t=this.internal.__metadata__.metadata,e=unescape(encodeURIComponent(t));i=this.internal.__metadata__.rawXml?e:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+i.length+" >>"),this.internal.write("stream"),this.internal.write(i),this.internal.write("endstream"),this.internal.write("endobj")}function R7(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(i){var t,e,r,n,s,A,a,o,l,h=function(M){return M=M||{},this.isStrokeTransparent=M.isStrokeTransparent||!1,this.strokeOpacity=M.strokeOpacity||1,this.strokeStyle=M.strokeStyle||"#000000",this.fillStyle=M.fillStyle||"#000000",this.isFillTransparent=M.isFillTransparent||!1,this.fillOpacity=M.fillOpacity||1,this.font=M.font||"10px sans-serif",this.textBaseline=M.textBaseline||"alphabetic",this.textAlign=M.textAlign||"left",this.lineWidth=M.lineWidth||1,this.lineJoin=M.lineJoin||"miter",this.lineCap=M.lineCap||"butt",this.path=M.path||[],this.transform=M.transform!==void 0?M.transform.clone():new o,this.globalCompositeOperation=M.globalCompositeOperation||"normal",this.globalAlpha=M.globalAlpha||1,this.clip_path=M.clip_path||[],this.currentPoint=M.currentPoint||new A,this.miterLimit=M.miterLimit||10,this.lastPoint=M.lastPoint||new A,this.lineDashOffset=M.lineDashOffset||0,this.lineDash=M.lineDash||[],this.margin=M.margin||[0,0,0,0],this.prevPageLastElemOffset=M.prevPageLastElemOffset||0,this.ignoreClearRect=typeof M.ignoreClearRect!="boolean"||M.ignoreClearRect,this};i.events.push(["initialized",function(){this.context2d=new u(this),t=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,A=this.internal.Point,a=this.internal.Rectangle,o=this.internal.Matrix,l=new h}]);var u=function(M){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var G=M;Object.defineProperty(this,"pdf",{get:function(){return G}});var X=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return X},set:function(q){X=!!q}});var rt=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return rt},set:function(q){rt=!!q}});var it=0;Object.defineProperty(this,"posX",{get:function(){return it},set:function(q){isNaN(q)||(it=q)}});var ot=0;Object.defineProperty(this,"posY",{get:function(){return ot},set:function(q){isNaN(q)||(ot=q)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(q){var Mt;typeof q=="number"?Mt=[q,q,q,q]:((Mt=new Array(4))[0]=q[0],Mt[1]=q.length>=2?q[1]:Mt[0],Mt[2]=q.length>=3?q[2]:Mt[0],Mt[3]=q.length>=4?q[3]:Mt[1]),l.margin=Mt}});var gt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return gt},set:function(q){gt=q}});var vt=0;Object.defineProperty(this,"lastBreak",{get:function(){return vt},set:function(q){vt=q}});var yt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return yt},set:function(q){yt=q}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(q){q instanceof h&&(l=q)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(q){l.path=q}});var St=[];Object.defineProperty(this,"ctxStack",{get:function(){return St},set:function(q){St=q}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(q){var Mt;Mt=f(q),this.ctx.fillStyle=Mt.style,this.ctx.isFillTransparent=Mt.a===0,this.ctx.fillOpacity=Mt.a,this.pdf.setFillColor(Mt.r,Mt.g,Mt.b,{a:Mt.a}),this.pdf.setTextColor(Mt.r,Mt.g,Mt.b,{a:Mt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(q){var Mt=f(q);this.ctx.strokeStyle=Mt.style,this.ctx.isStrokeTransparent=Mt.a===0,this.ctx.strokeOpacity=Mt.a,Mt.a===0?this.pdf.setDrawColor(255,255,255):(Mt.a,this.pdf.setDrawColor(Mt.r,Mt.g,Mt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(q){["butt","round","square"].indexOf(q)!==-1&&(this.ctx.lineCap=q,this.pdf.setLineCap(q))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(q){isNaN(q)||(this.ctx.lineWidth=q,this.pdf.setLineWidth(q))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(q){["bevel","round","miter"].indexOf(q)!==-1&&(this.ctx.lineJoin=q,this.pdf.setLineJoin(q))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(q){isNaN(q)||(this.ctx.miterLimit=q,this.pdf.setMiterLimit(q))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(q){this.ctx.textBaseline=q}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(q){["right","end","center","left","start"].indexOf(q)!==-1&&(this.ctx.textAlign=q)}});var Dt=null,Tt=null,jt=null;Object.defineProperty(this,"fontFaces",{get:function(){return jt},set:function(q){Dt=null,Tt=null,jt=q}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(q){var Mt;if(this.ctx.font=q,(Mt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(q))!==null){var fe=Mt[1];Mt[2];var Zt=Mt[3],Et=Mt[4];Mt[5];var re=Mt[6],Ot=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Et)[2];Et=Math.floor(Ot==="px"?parseFloat(Et)*this.pdf.internal.scaleFactor:Ot==="em"?parseFloat(Et)*this.pdf.getFontSize():parseFloat(Et)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Et);var zt=(function(Gt){var Ve,Te,be=[],Be=Gt.trim();if(Be==="")return yk;if(Be in fk)return[fk[Be]];for(;Be!=="";){switch(Te=null,Ve=(Be=gk(Be)).charAt(0)){case'"':case"'":Te=_7(Be.substring(1),Ve);break;default:Te=M7(Be)}if(Te===null||(be.push(Te[0]),(Be=gk(Te[1]))!==""&&Be.charAt(0)!==","))return yk;Be=Be.replace(/^,/,"")}return be})(re);if(this.fontFaces){var Yt=(function(Gt,Ve){var Te=Gt.getFontList(),be=JSON.stringify(Te);if(Dt===null||Tt!==be){var Be=(function(ze){var Ae=[];return Object.keys(ze).forEach(function(Ne){ze[Ne].forEach(function(le){var ye=null;switch(le){case"bold":ye={family:Ne,weight:"bold"};break;case"italic":ye={family:Ne,style:"italic"};break;case"bolditalic":ye={family:Ne,weight:"bold",style:"italic"};break;case"":case"normal":ye={family:Ne}}ye!==null&&(ye.ref={name:Ne,style:le},Ae.push(ye))})}),Ae})(Te);Dt=(function(ze){for(var Ae={},Ne=0;Ne<ze.length;++Ne){var le=xB(ze[Ne]),ye=le.family,Ye=le.stretch,we=le.style,ve=le.weight;Ae[ye]=Ae[ye]||{},Ae[ye][Ye]=Ae[ye][Ye]||{},Ae[ye][Ye][we]=Ae[ye][Ye][we]||{},Ae[ye][Ye][we][ve]=le}return Ae})(Be.concat(Ve)),Tt=be}return Dt})(this.pdf,this.fontFaces),xt=zt.map(function(Gt){return{family:Gt,stretch:"normal",weight:Zt,style:fe}}),Rt=(function(Gt,Ve,Te){for(var be=(Te=Te||{}).defaultFontFamily||"times",Be=Object.assign({},L7,Te.genericFontFamilies||{}),ze=null,Ae=null,Ne=0;Ne<Ve.length;++Ne)if(Be[(ze=xB(Ve[Ne])).family]&&(ze.family=Be[ze.family]),Gt.hasOwnProperty(ze.family)){Ae=Gt[ze.family];break}if(!(Ae=Ae||Gt[be]))throw new Error("Could not find a font-family for the rule '"+pk(ze)+"' and default family '"+be+"'.");if(Ae=(function(le,ye){if(ye[le])return ye[le];var Ye=nF[le],we=Ye<=nF.normal?-1:1,ve=dk(ye,HT,Ye,we);if(!ve)throw new Error("Could not find a matching font-stretch value for "+le);return ve})(ze.stretch,Ae),Ae=(function(le,ye){if(ye[le])return ye[le];for(var Ye=RT[le],we=0;we<Ye.length;++we)if(ye[Ye[we]])return ye[Ye[we]];throw new Error("Could not find a matching font-style for "+le)})(ze.style,Ae),!(Ae=(function(le,ye){if(ye[le])return ye[le];if(le===400&&ye[500])return ye[500];if(le===500&&ye[400])return ye[400];var Ye=Q7[le],we=dk(ye,VT,Ye,le<400?-1:1);if(!we)throw new Error("Could not find a matching font-weight for value "+le);return we})(ze.weight,Ae)))throw new Error("Failed to resolve a font for the rule '"+pk(ze)+"'.");return Ae})(Yt,xt);this.pdf.setFont(Rt.ref.name,Rt.ref.style)}else{var Ht="";(Zt==="bold"||parseInt(Zt,10)>=700||fe==="bold")&&(Ht="bold"),fe==="italic"&&(Ht+="italic"),Ht.length===0&&(Ht="normal");for(var Kt="",te={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Wt=0;Wt<zt.length;Wt++){if(this.pdf.internal.getFont(zt[Wt],Ht,{noFallback:!0,disableWarning:!0})!==void 0){Kt=zt[Wt];break}if(Ht==="bolditalic"&&this.pdf.internal.getFont(zt[Wt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Kt=zt[Wt],Ht="bold";else if(this.pdf.internal.getFont(zt[Wt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Kt=zt[Wt],Ht="normal";break}}if(Kt===""){for(var ne=0;ne<zt.length;ne++)if(te[zt[ne]]){Kt=te[zt[ne]];break}}Kt=Kt===""?"Times":Kt,this.pdf.setFont(Kt,Ht)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(q){this.ctx.globalCompositeOperation=q}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(q){this.ctx.globalAlpha=q}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(q){this.ctx.lineDashOffset=q,ht.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(q){this.ctx.lineDash=q,ht.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(q){this.ctx.ignoreClearRect=!!q}})};u.prototype.setLineDash=function(M){this.lineDash=M},u.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},u.prototype.fill=function(){S.call(this,"fill",!1)},u.prototype.stroke=function(){S.call(this,"stroke",!1)},u.prototype.beginPath=function(){this.path=[{type:"begin"}]},u.prototype.moveTo=function(M,G){if(isNaN(M)||isNaN(G))throw vr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var X=this.ctx.transform.applyToPoint(new A(M,G));this.path.push({type:"mt",x:X.x,y:X.y}),this.ctx.lastPoint=new A(M,G)},u.prototype.closePath=function(){var M=new A(0,0),G=0;for(G=this.path.length-1;G!==-1;G--)if(this.path[G].type==="begin"&&Ze(this.path[G+1])==="object"&&typeof this.path[G+1].x=="number"){M=new A(this.path[G+1].x,this.path[G+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new A(M.x,M.y)},u.prototype.lineTo=function(M,G){if(isNaN(M)||isNaN(G))throw vr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var X=this.ctx.transform.applyToPoint(new A(M,G));this.path.push({type:"lt",x:X.x,y:X.y}),this.ctx.lastPoint=new A(X.x,X.y)},u.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),S.call(this,null,!0)},u.prototype.quadraticCurveTo=function(M,G,X,rt){if(isNaN(X)||isNaN(rt)||isNaN(M)||isNaN(G))throw vr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var it=this.ctx.transform.applyToPoint(new A(X,rt)),ot=this.ctx.transform.applyToPoint(new A(M,G));this.path.push({type:"qct",x1:ot.x,y1:ot.y,x:it.x,y:it.y}),this.ctx.lastPoint=new A(it.x,it.y)},u.prototype.bezierCurveTo=function(M,G,X,rt,it,ot){if(isNaN(it)||isNaN(ot)||isNaN(M)||isNaN(G)||isNaN(X)||isNaN(rt))throw vr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var gt=this.ctx.transform.applyToPoint(new A(it,ot)),vt=this.ctx.transform.applyToPoint(new A(M,G)),yt=this.ctx.transform.applyToPoint(new A(X,rt));this.path.push({type:"bct",x1:vt.x,y1:vt.y,x2:yt.x,y2:yt.y,x:gt.x,y:gt.y}),this.ctx.lastPoint=new A(gt.x,gt.y)},u.prototype.arc=function(M,G,X,rt,it,ot){if(isNaN(M)||isNaN(G)||isNaN(X)||isNaN(rt)||isNaN(it))throw vr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ot=!!ot,!this.ctx.transform.isIdentity){var gt=this.ctx.transform.applyToPoint(new A(M,G));M=gt.x,G=gt.y;var vt=this.ctx.transform.applyToPoint(new A(0,X)),yt=this.ctx.transform.applyToPoint(new A(0,0));X=Math.sqrt(Math.pow(vt.x-yt.x,2)+Math.pow(vt.y-yt.y,2))}Math.abs(it-rt)>=2*Math.PI&&(rt=0,it=2*Math.PI),this.path.push({type:"arc",x:M,y:G,radius:X,startAngle:rt,endAngle:it,counterclockwise:ot})},u.prototype.arcTo=function(M,G,X,rt,it){throw new Error("arcTo not implemented.")},u.prototype.rect=function(M,G,X,rt){if(isNaN(M)||isNaN(G)||isNaN(X)||isNaN(rt))throw vr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(M,G),this.lineTo(M+X,G),this.lineTo(M+X,G+rt),this.lineTo(M,G+rt),this.lineTo(M,G),this.lineTo(M+X,G),this.lineTo(M,G)},u.prototype.fillRect=function(M,G,X,rt){if(isNaN(M)||isNaN(G)||isNaN(X)||isNaN(rt))throw vr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!d.call(this)){var it={};this.lineCap!=="butt"&&(it.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(it.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(M,G,X,rt),this.fill(),it.hasOwnProperty("lineCap")&&(this.lineCap=it.lineCap),it.hasOwnProperty("lineJoin")&&(this.lineJoin=it.lineJoin)}},u.prototype.strokeRect=function(M,G,X,rt){if(isNaN(M)||isNaN(G)||isNaN(X)||isNaN(rt))throw vr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");g.call(this)||(this.beginPath(),this.rect(M,G,X,rt),this.stroke())},u.prototype.clearRect=function(M,G,X,rt){if(isNaN(M)||isNaN(G)||isNaN(X)||isNaN(rt))throw vr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(M,G,X,rt))},u.prototype.save=function(M){M=typeof M!="boolean"||M;for(var G=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("q");if(this.pdf.setPage(G),M){this.ctx.fontSize=this.pdf.internal.getFontSize();var rt=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=rt}},u.prototype.restore=function(M){M=typeof M!="boolean"||M;for(var G=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("Q");this.pdf.setPage(G),M&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},u.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(M){var G,X,rt,it;if(M.isCanvasGradient===!0&&(M=M.getColor()),!M)return{r:0,g:0,b:0,a:0,style:M};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(M))G=0,X=0,rt=0,it=0;else{var ot=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(M);if(ot!==null)G=parseInt(ot[1]),X=parseInt(ot[2]),rt=parseInt(ot[3]),it=1;else if((ot=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(M))!==null)G=parseInt(ot[1]),X=parseInt(ot[2]),rt=parseInt(ot[3]),it=parseFloat(ot[4]);else{if(it=1,typeof M=="string"&&M.charAt(0)!=="#"){var gt=new _T(M);M=gt.ok?gt.toHex():"#000000"}M.length===4?(G=M.substring(1,2),G+=G,X=M.substring(2,3),X+=X,rt=M.substring(3,4),rt+=rt):(G=M.substring(1,3),X=M.substring(3,5),rt=M.substring(5,7)),G=parseInt(G,16),X=parseInt(X,16),rt=parseInt(rt,16)}}return{r:G,g:X,b:rt,a:it,style:M}},d=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},g=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};u.prototype.fillText=function(M,G,X,rt){if(isNaN(G)||isNaN(X)||typeof M!="string")throw vr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(rt=isNaN(rt)?void 0:rt,!d.call(this)){var it=nt(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;O.call(this,{text:M,x:G,y:X,scale:ot,angle:it,align:this.textAlign,maxWidth:rt})}},u.prototype.strokeText=function(M,G,X,rt){if(isNaN(G)||isNaN(X)||typeof M!="string")throw vr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!g.call(this)){rt=isNaN(rt)?void 0:rt;var it=nt(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;O.call(this,{text:M,x:G,y:X,scale:ot,renderingMode:"stroke",angle:it,align:this.textAlign,maxWidth:rt})}},u.prototype.measureText=function(M){if(typeof M!="string")throw vr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var G=this.pdf,X=this.pdf.internal.scaleFactor,rt=G.internal.getFontSize(),it=G.getStringUnitWidth(M)*rt/G.internal.scaleFactor;return new function(ot){var gt=(ot=ot||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return gt}}),this}({width:it*=Math.round(96*X/72*1e4)/1e4})},u.prototype.scale=function(M,G){if(isNaN(M)||isNaN(G))throw vr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var X=new o(M,0,0,G,0,0);this.ctx.transform=this.ctx.transform.multiply(X)},u.prototype.rotate=function(M){if(isNaN(M))throw vr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var G=new o(Math.cos(M),Math.sin(M),-Math.sin(M),Math.cos(M),0,0);this.ctx.transform=this.ctx.transform.multiply(G)},u.prototype.translate=function(M,G){if(isNaN(M)||isNaN(G))throw vr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var X=new o(1,0,0,1,M,G);this.ctx.transform=this.ctx.transform.multiply(X)},u.prototype.transform=function(M,G,X,rt,it,ot){if(isNaN(M)||isNaN(G)||isNaN(X)||isNaN(rt)||isNaN(it)||isNaN(ot))throw vr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var gt=new o(M,G,X,rt,it,ot);this.ctx.transform=this.ctx.transform.multiply(gt)},u.prototype.setTransform=function(M,G,X,rt,it,ot){M=isNaN(M)?1:M,G=isNaN(G)?0:G,X=isNaN(X)?0:X,rt=isNaN(rt)?1:rt,it=isNaN(it)?0:it,ot=isNaN(ot)?0:ot,this.ctx.transform=new o(M,G,X,rt,it,ot)};var m=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};u.prototype.drawImage=function(M,G,X,rt,it,ot,gt,vt,yt){var St=this.pdf.getImageProperties(M),Dt=1,Tt=1,jt=1,q=1;rt!==void 0&&vt!==void 0&&(jt=vt/rt,q=yt/it,Dt=St.width/rt*vt/rt,Tt=St.height/it*yt/it),ot===void 0&&(ot=G,gt=X,G=0,X=0),rt!==void 0&&vt===void 0&&(vt=rt,yt=it),rt===void 0&&vt===void 0&&(vt=St.width,yt=St.height);var Mt=this.ctx.transform.decompose(),fe=nt(Mt.rotate.shx),Zt=new o,Et=(Zt=(Zt=(Zt=Zt.multiply(Mt.translate)).multiply(Mt.skew)).multiply(Mt.scale)).applyToRectangle(new a(ot-G*jt,gt-X*q,rt*Dt,it*Tt));if(this.autoPaging){for(var re,Ot=y.call(this,Et),zt=[],Yt=0;Yt<Ot.length;Yt+=1)zt.indexOf(Ot[Yt])===-1&&zt.push(Ot[Yt]);C(zt);for(var xt=zt[0],Rt=zt[zt.length-1],Ht=xt;Ht<Rt+1;Ht++){this.pdf.setPage(Ht);var Kt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],te=Ht===1?this.posY+this.margin[0]:this.margin[0],Wt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ne=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Gt=Ht===1?0:Wt+(Ht-2)*ne;if(this.ctx.clip_path.length!==0){var Ve=this.path;re=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(re,this.posX+this.margin[3],-Gt+te+this.ctx.prevPageLastElemOffset),k.call(this,"fill",!0),this.path=Ve}var Te=JSON.parse(JSON.stringify(Et));Te=b([Te],this.posX+this.margin[3],-Gt+te+this.ctx.prevPageLastElemOffset)[0];var be=(Ht>xt||Ht<Rt)&&m.call(this);be&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Kt,ne,null).clip().discardPath()),this.pdf.addImage(M,"JPEG",Te.x,Te.y,Te.w,Te.h,null,null,fe),be&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(M,"JPEG",Et.x,Et.y,Et.w,Et.h,null,null,fe)};var y=function(M,G,X){var rt=[];G=G||this.pdf.internal.pageSize.width,X=X||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var it=this.posY+this.ctx.prevPageLastElemOffset;switch(M.type){default:case"mt":case"lt":rt.push(Math.floor((M.y+it)/X)+1);break;case"arc":rt.push(Math.floor((M.y+it-M.radius)/X)+1),rt.push(Math.floor((M.y+it+M.radius)/X)+1);break;case"qct":var ot=at(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x,M.y);rt.push(Math.floor((ot.y+it)/X)+1),rt.push(Math.floor((ot.y+ot.h+it)/X)+1);break;case"bct":var gt=ft(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x2,M.y2,M.x,M.y);rt.push(Math.floor((gt.y+it)/X)+1),rt.push(Math.floor((gt.y+gt.h+it)/X)+1);break;case"rect":rt.push(Math.floor((M.y+it)/X)+1),rt.push(Math.floor((M.y+M.h+it)/X)+1)}for(var vt=0;vt<rt.length;vt+=1)for(;this.pdf.internal.getNumberOfPages()<rt[vt];)w.call(this);return rt},w=function(){var M=this.fillStyle,G=this.strokeStyle,X=this.font,rt=this.lineCap,it=this.lineWidth,ot=this.lineJoin;this.pdf.addPage(),this.fillStyle=M,this.strokeStyle=G,this.font=X,this.lineCap=rt,this.lineWidth=it,this.lineJoin=ot},b=function(M,G,X){for(var rt=0;rt<M.length;rt++)switch(M[rt].type){case"bct":M[rt].x2+=G,M[rt].y2+=X;case"qct":M[rt].x1+=G,M[rt].y1+=X;default:M[rt].x+=G,M[rt].y+=X}return M},C=function(M){return M.sort(function(G,X){return G-X})},S=function(M,G){var X=this.fillStyle,rt=this.strokeStyle,it=this.lineCap,ot=this.lineWidth,gt=Math.abs(ot*this.ctx.transform.scaleX),vt=this.lineJoin;if(this.autoPaging){for(var yt,St,Dt=JSON.parse(JSON.stringify(this.path)),Tt=JSON.parse(JSON.stringify(this.path)),jt=[],q=0;q<Tt.length;q++)if(Tt[q].x!==void 0)for(var Mt=y.call(this,Tt[q]),fe=0;fe<Mt.length;fe+=1)jt.indexOf(Mt[fe])===-1&&jt.push(Mt[fe]);for(var Zt=0;Zt<jt.length;Zt++)for(;this.pdf.internal.getNumberOfPages()<jt[Zt];)w.call(this);C(jt);for(var Et=jt[0],re=jt[jt.length-1],Ot=Et;Ot<re+1;Ot++){this.pdf.setPage(Ot),this.fillStyle=X,this.strokeStyle=rt,this.lineCap=it,this.lineWidth=gt,this.lineJoin=vt;var zt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Yt=Ot===1?this.posY+this.margin[0]:this.margin[0],xt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Rt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ht=Ot===1?0:xt+(Ot-2)*Rt;if(this.ctx.clip_path.length!==0){var Kt=this.path;yt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(yt,this.posX+this.margin[3],-Ht+Yt+this.ctx.prevPageLastElemOffset),k.call(this,M,!0),this.path=Kt}if(St=JSON.parse(JSON.stringify(Dt)),this.path=b(St,this.posX+this.margin[3],-Ht+Yt+this.ctx.prevPageLastElemOffset),G===!1||Ot===0){var te=(Ot>Et||Ot<re)&&m.call(this);te&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],zt,Rt,null).clip().discardPath()),k.call(this,M,G),te&&this.pdf.restoreGraphicsState()}this.lineWidth=ot}this.path=Dt}else this.lineWidth=gt,k.call(this,M,G),this.lineWidth=ot},k=function(M,G){if((M!=="stroke"||G||!g.call(this))&&(M==="stroke"||G||!d.call(this))){for(var X,rt,it=[],ot=this.path,gt=0;gt<ot.length;gt++){var vt=ot[gt];switch(vt.type){case"begin":it.push({begin:!0});break;case"close":it.push({close:!0});break;case"mt":it.push({start:vt,deltas:[],abs:[]});break;case"lt":var yt=it.length;if(ot[gt-1]&&!isNaN(ot[gt-1].x)&&(X=[vt.x-ot[gt-1].x,vt.y-ot[gt-1].y],yt>0)){for(;yt>=0;yt--)if(it[yt-1].close!==!0&&it[yt-1].begin!==!0){it[yt-1].deltas.push(X),it[yt-1].abs.push(vt);break}}break;case"bct":X=[vt.x1-ot[gt-1].x,vt.y1-ot[gt-1].y,vt.x2-ot[gt-1].x,vt.y2-ot[gt-1].y,vt.x-ot[gt-1].x,vt.y-ot[gt-1].y],it[it.length-1].deltas.push(X);break;case"qct":var St=ot[gt-1].x+2/3*(vt.x1-ot[gt-1].x),Dt=ot[gt-1].y+2/3*(vt.y1-ot[gt-1].y),Tt=vt.x+2/3*(vt.x1-vt.x),jt=vt.y+2/3*(vt.y1-vt.y),q=vt.x,Mt=vt.y;X=[St-ot[gt-1].x,Dt-ot[gt-1].y,Tt-ot[gt-1].x,jt-ot[gt-1].y,q-ot[gt-1].x,Mt-ot[gt-1].y],it[it.length-1].deltas.push(X);break;case"arc":it.push({deltas:[],abs:[],arc:!0}),Array.isArray(it[it.length-1].abs)&&it[it.length-1].abs.push(vt)}}rt=G?null:M==="stroke"?"stroke":"fill";for(var fe=!1,Zt=0;Zt<it.length;Zt++)if(it[Zt].arc)for(var Et=it[Zt].abs,re=0;re<Et.length;re++){var Ot=Et[re];Ot.type==="arc"?D.call(this,Ot.x,Ot.y,Ot.radius,Ot.startAngle,Ot.endAngle,Ot.counterclockwise,void 0,G,!fe):W.call(this,Ot.x,Ot.y),fe=!0}else if(it[Zt].close===!0)this.pdf.internal.out("h"),fe=!1;else if(it[Zt].begin!==!0){var zt=it[Zt].start.x,Yt=it[Zt].start.y;R.call(this,it[Zt].deltas,zt,Yt),fe=!0}rt&&Q.call(this,rt),G&&K.call(this)}},I=function(M){var G=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,X=G*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return M-X;case"top":return M+G-X;case"hanging":return M+G-2*X;case"middle":return M+G/2-X;default:return M}},N=function(M){return M+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};u.prototype.createLinearGradient=function(){var M=function(){};return M.colorStops=[],M.addColorStop=function(G,X){this.colorStops.push([G,X])},M.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},M.isCanvasGradient=!0,M},u.prototype.createPattern=function(){return this.createLinearGradient()},u.prototype.createRadialGradient=function(){return this.createLinearGradient()};var D=function(M,G,X,rt,it,ot,gt,vt,yt){for(var St=et.call(this,X,rt,it,ot),Dt=0;Dt<St.length;Dt++){var Tt=St[Dt];Dt===0&&(yt?L.call(this,Tt.x1+M,Tt.y1+G):W.call(this,Tt.x1+M,Tt.y1+G)),tt.call(this,M,G,Tt.x2,Tt.y2,Tt.x3,Tt.y3,Tt.x4,Tt.y4)}vt?K.call(this):Q.call(this,gt)},Q=function(M){switch(M){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},K=function(){this.pdf.clip(),this.pdf.discardPath()},L=function(M,G){this.pdf.internal.out(e(M)+" "+r(G)+" m")},O=function(M){var G;switch(M.align){case"right":case"end":G="right";break;case"center":G="center";break;default:G="left"}var X,rt,it,ot=this.pdf.getTextDimensions(M.text),gt=I.call(this,M.y),vt=N.call(this,gt)-ot.h,yt=this.ctx.transform.applyToPoint(new A(M.x,gt));if(this.autoPaging){var St=this.ctx.transform.decompose(),Dt=new o;Dt=(Dt=(Dt=Dt.multiply(St.translate)).multiply(St.skew)).multiply(St.scale);for(var Tt=this.ctx.transform.applyToRectangle(new a(M.x,gt,ot.w,ot.h)),jt=Dt.applyToRectangle(new a(M.x,vt,ot.w,ot.h)),q=y.call(this,jt),Mt=[],fe=0;fe<q.length;fe+=1)Mt.indexOf(q[fe])===-1&&Mt.push(q[fe]);C(Mt);for(var Zt=Mt[0],Et=Mt[Mt.length-1],re=Zt;re<Et+1;re++){this.pdf.setPage(re);var Ot=re===1?this.posY+this.margin[0]:this.margin[0],zt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Yt=this.pdf.internal.pageSize.height-this.margin[2],xt=Yt-this.margin[0],Rt=this.pdf.internal.pageSize.width-this.margin[1],Ht=Rt-this.margin[3],Kt=re===1?0:zt+(re-2)*xt;if(this.ctx.clip_path.length!==0){var te=this.path;X=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(X,this.posX+this.margin[3],-1*Kt+Ot),k.call(this,"fill",!0),this.path=te}var Wt=b([JSON.parse(JSON.stringify(jt))],this.posX+this.margin[3],-Kt+Ot+this.ctx.prevPageLastElemOffset)[0];M.scale>=.01&&(rt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(rt*M.scale),it=this.lineWidth,this.lineWidth=it*M.scale);var ne=this.autoPaging!=="text";if(ne||Wt.y+Wt.h<=Yt){if(ne||Wt.y>=Ot&&Wt.x<=Rt){var Gt=ne?M.text:this.pdf.splitTextToSize(M.text,M.maxWidth||Rt-Wt.x)[0],Ve=b([JSON.parse(JSON.stringify(Tt))],this.posX+this.margin[3],-Kt+Ot+this.ctx.prevPageLastElemOffset)[0],Te=ne&&(re>Zt||re<Et)&&m.call(this);Te&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ht,xt,null).clip().discardPath()),this.pdf.text(Gt,Ve.x,Ve.y,{angle:M.angle,align:G,renderingMode:M.renderingMode}),Te&&this.pdf.restoreGraphicsState()}}else Wt.y<Yt&&(this.ctx.prevPageLastElemOffset+=Yt-Wt.y);M.scale>=.01&&(this.pdf.setFontSize(rt),this.lineWidth=it)}}else M.scale>=.01&&(rt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(rt*M.scale),it=this.lineWidth,this.lineWidth=it*M.scale),this.pdf.text(M.text,yt.x+this.posX,yt.y+this.posY,{angle:M.angle,align:G,renderingMode:M.renderingMode,maxWidth:M.maxWidth}),M.scale>=.01&&(this.pdf.setFontSize(rt),this.lineWidth=it)},W=function(M,G,X,rt){X=X||0,rt=rt||0,this.pdf.internal.out(e(M+X)+" "+r(G+rt)+" l")},R=function(M,G,X){return this.pdf.lines(M,G,X,null,null)},tt=function(M,G,X,rt,it,ot,gt,vt){this.pdf.internal.out([t(n(X+M)),t(s(rt+G)),t(n(it+M)),t(s(ot+G)),t(n(gt+M)),t(s(vt+G)),"c"].join(" "))},et=function(M,G,X,rt){for(var it=2*Math.PI,ot=Math.PI/2;G>X;)G-=it;var gt=Math.abs(X-G);gt<it&&rt&&(gt=it-gt);for(var vt=[],yt=rt?-1:1,St=G;gt>1e-5;){var Dt=St+yt*Math.min(gt,ot);vt.push(st.call(this,M,St,Dt)),gt-=Math.abs(Dt-St),St=Dt}return vt},st=function(M,G,X){var rt=(X-G)/2,it=M*Math.cos(rt),ot=M*Math.sin(rt),gt=it,vt=-ot,yt=gt*gt+vt*vt,St=yt+gt*it+vt*ot,Dt=4/3*(Math.sqrt(2*yt*St)-St)/(gt*ot-vt*it),Tt=gt-Dt*vt,jt=vt+Dt*gt,q=Tt,Mt=-jt,fe=rt+G,Zt=Math.cos(fe),Et=Math.sin(fe);return{x1:M*Math.cos(G),y1:M*Math.sin(G),x2:Tt*Zt-jt*Et,y2:Tt*Et+jt*Zt,x3:q*Zt-Mt*Et,y3:q*Et+Mt*Zt,x4:M*Math.cos(X),y4:M*Math.sin(X)}},nt=function(M){return 180*M/Math.PI},at=function(M,G,X,rt,it,ot){var gt=M+.5*(X-M),vt=G+.5*(rt-G),yt=it+.5*(X-it),St=ot+.5*(rt-ot),Dt=Math.min(M,it,gt,yt),Tt=Math.max(M,it,gt,yt),jt=Math.min(G,ot,vt,St),q=Math.max(G,ot,vt,St);return new a(Dt,jt,Tt-Dt,q-jt)},ft=function(M,G,X,rt,it,ot,gt,vt){var yt,St,Dt,Tt,jt,q,Mt,fe,Zt,Et,re,Ot,zt,Yt,xt=X-M,Rt=rt-G,Ht=it-X,Kt=ot-rt,te=gt-it,Wt=vt-ot;for(St=0;St<41;St++)Zt=(Mt=(Dt=M+(yt=St/40)*xt)+yt*((jt=X+yt*Ht)-Dt))+yt*(jt+yt*(it+yt*te-jt)-Mt),Et=(fe=(Tt=G+yt*Rt)+yt*((q=rt+yt*Kt)-Tt))+yt*(q+yt*(ot+yt*Wt-q)-fe),St==0?(re=Zt,Ot=Et,zt=Zt,Yt=Et):(re=Math.min(re,Zt),Ot=Math.min(Ot,Et),zt=Math.max(zt,Zt),Yt=Math.max(Yt,Et));return new a(Math.round(re),Math.round(Ot),Math.round(zt-re),Math.round(Yt-Ot))},ht=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var M,G,X=(M=this.ctx.lineDash,G=this.ctx.lineDashOffset,JSON.stringify({lineDash:M,lineDashOffset:G}));this.prevLineDash!==X&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=X)}}})(ue.API),(function(i){var t=function(A){var a,o,l,h,u,f,d,g,m,y;for(o=[],l=0,h=(A+=a="\0\0\0\0".slice(A.length%4||4)).length;h>l;l+=4)(u=(A.charCodeAt(l)<<24)+(A.charCodeAt(l+1)<<16)+(A.charCodeAt(l+2)<<8)+A.charCodeAt(l+3))!==0?(f=(u=((u=((u=((u=(u-(y=u%85))/85)-(m=u%85))/85)-(g=u%85))/85)-(d=u%85))/85)%85,o.push(f+33,d+33,g+33,m+33,y+33)):o.push(122);return(function(w,b){for(var C=b;C>0;C--)w.pop()})(o,a.length),String.fromCharCode.apply(String,o)+"~>"},e=function(A){var a,o,l,h,u,f=String,d="length",g=255,m="charCodeAt",y="slice",w="replace";for(A[y](-2),A=A[y](0,-2)[w](/\s/g,"")[w]("z","!!!!!"),l=[],h=0,u=(A+=a="uuuuu"[y](A[d]%5||5))[d];u>h;h+=5)o=52200625*(A[m](h)-33)+614125*(A[m](h+1)-33)+7225*(A[m](h+2)-33)+85*(A[m](h+3)-33)+(A[m](h+4)-33),l.push(g&o>>24,g&o>>16,g&o>>8,g&o);return(function(b,C){for(var S=C;S>0;S--)b.pop()})(l,a[d]),f.fromCharCode.apply(f,l)},r=function(A){return A.split("").map(function(a){return("0"+a.charCodeAt().toString(16)).slice(-2)}).join("")+">"},n=function(A){var a=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((A=A.replace(/\s/g,"")).indexOf(">")!==-1&&(A=A.substr(0,A.indexOf(">"))),A.length%2&&(A+="0"),a.test(A)===!1)return"";for(var o="",l=0;l<A.length;l+=2)o+=String.fromCharCode("0x"+(A[l]+A[l+1]));return o},s=function(A){for(var a=new Uint8Array(A.length),o=A.length;o--;)a[o]=A.charCodeAt(o);return(a=$x(a)).reduce(function(l,h){return l+String.fromCharCode(h)},"")};i.processDataByFilters=function(A,a){var o=0,l=A||"",h=[];for(typeof(a=a||[])=="string"&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":l=e(l),h.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=t(l),h.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=n(l),h.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=r(l),h.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=s(l),h.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:l,reverseChain:h.reverse().join(" ")}}})(ue.API),(function(i){i.loadFile=function(t,e,r){return(function(n,s,A){s=s!==!1,A=typeof A=="function"?A:function(){};var a=void 0;try{a=(function(o,l,h){var u=new XMLHttpRequest,f=0,d=function(g){var m=g.length,y=[],w=String.fromCharCode;for(f=0;f<m;f+=1)y.push(w(255&g.charCodeAt(f)));return y.join("")};if(u.open("GET",o,!l),u.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(u.onload=function(){u.status===200?h(d(this.responseText)):h(void 0)}),u.send(null),l&&u.status===200)return d(u.responseText)})(n,s,A)}catch{}return a})(t,e,r)},i.allowFsRead=void 0,i.loadImageFile=i.loadFile})(ue.API),(function(i){function t(){return(xe.html2canvas?Promise.resolve(xe.html2canvas):Promise.resolve().then(()=>FX)).catch(function(a){return Promise.reject(new Error("Could not load html2canvas: "+a))}).then(function(a){return a.default?a.default:a})}function e(){return(xe.DOMPurify?Promise.resolve(xe.DOMPurify):Promise.resolve().then(()=>iY)).catch(function(a){return Promise.reject(new Error("Could not load dompurify: "+a))}).then(function(a){return a.default?a.default:a})}var r=function(a){var o=Ze(a);return o==="undefined"?"undefined":o==="string"||a instanceof String?"string":o==="number"||a instanceof Number?"number":o==="function"||a instanceof Function?"function":a&&a.constructor===Array?"array":a&&a.nodeType===1?"element":o==="object"?"object":"unknown"},n=function(a,o){var l=document.createElement(a);for(var h in o.className&&(l.className=o.className),o.innerHTML&&o.dompurify&&(l.innerHTML=o.dompurify.sanitize(o.innerHTML)),o.style)l.style[h]=o.style[h];return l},s=function a(o,l){for(var h=o.nodeType===3?document.createTextNode(o.nodeValue):o.cloneNode(!1),u=o.firstChild;u;u=u.nextSibling)l!==!0&&u.nodeType===1&&u.nodeName==="SCRIPT"||h.appendChild(a(u,l));return o.nodeType===1&&(o.nodeName==="CANVAS"?(h.width=o.width,h.height=o.height,h.getContext("2d").drawImage(o,0,0)):o.nodeName!=="TEXTAREA"&&o.nodeName!=="SELECT"||(h.value=o.value),h.addEventListener("load",function(){h.scrollTop=o.scrollTop,h.scrollLeft=o.scrollLeft},!0)),h},A=function a(o){var l=Object.assign(a.convert(Promise.resolve()),JSON.parse(JSON.stringify(a.template))),h=a.convert(Promise.resolve(),l);return(h=h.setProgress(1,a,1,[a])).set(o)};(A.prototype=Object.create(Promise.prototype)).constructor=A,A.convert=function(a,o){return a.__proto__=o||A.prototype,a},A.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},A.prototype.from=function(a,o){return this.then(function(){switch(o=o||(function(l){switch(r(l)){case"string":return"string";case"element":return l.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(a),o){case"string":return this.then(e).then(function(l){return this.set({src:n("div",{innerHTML:a,dompurify:l})})});case"element":return this.set({src:a});case"canvas":return this.set({canvas:a});case"img":return this.set({img:a});default:return this.error("Unknown source type.")}})},A.prototype.to=function(a){switch(a){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},A.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var a={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},o=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);o.tagName==="BODY"&&(a.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=n("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=n("div",{className:"html2pdf__container",style:a}),this.prop.container.appendChild(o),this.prop.container.firstChild.appendChild(n("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},A.prototype.toCanvas=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(o){var l=Object.assign({},this.opt.html2canvas);return delete l.onrendered,o(this.prop.container,l)}).then(function(o){(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},A.prototype.toContext2d=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(o){var l=this.opt.jsPDF,h=this.opt.fontFaces,u=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,f=Object.assign({async:!0,allowTaint:!0,scale:u,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete f.onrendered,l.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,l.context2d.posX=this.opt.x,l.context2d.posY=this.opt.y,l.context2d.margin=this.opt.margin,l.context2d.fontFaces=h,h)for(var d=0;d<h.length;++d){var g=h[d],m=g.src.find(function(y){return y.format==="truetype"});m&&l.addFont(m.url,g.ref.name,g.ref.style)}return f.windowHeight=f.windowHeight||0,f.windowHeight=f.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):f.windowHeight,l.context2d.save(!0),o(this.prop.container,f)}).then(function(o){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},A.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var a=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=a})},A.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},A.prototype.output=function(a,o,l){return(l=l||"pdf").toLowerCase()==="img"||l.toLowerCase()==="image"?this.outputImg(a,o):this.outputPdf(a,o)},A.prototype.outputPdf=function(a,o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(a,o)})},A.prototype.outputImg=function(a){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(a){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+a+'" is not supported.'}})},A.prototype.save=function(a){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(a?{filename:a}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},A.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},A.prototype.set=function(a){if(r(a)!=="object")return this;var o=Object.keys(a||{}).map(function(l){if(l in A.template.prop)return function(){this.prop[l]=a[l]};switch(l){case"margin":return this.setMargin.bind(this,a.margin);case"jsPDF":return function(){return this.opt.jsPDF=a.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,a.pageSize);default:return function(){this.opt[l]=a[l]}}},this);return this.then(function(){return this.thenList(o)})},A.prototype.get=function(a,o){return this.then(function(){var l=a in A.template.prop?this.prop[a]:this.opt[a];return o?o(l):l})},A.prototype.setMargin=function(a){return this.then(function(){switch(r(a)){case"number":a=[a,a,a,a];case"array":if(a.length===2&&(a=[a[0],a[1],a[0],a[1]]),a.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=a}).then(this.setPageSize)},A.prototype.setPageSize=function(a){function o(l,h){return Math.floor(l*h/72*96)}return this.then(function(){(a=a||ue.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(a.inner={width:a.width-this.opt.margin[1]-this.opt.margin[3],height:a.height-this.opt.margin[0]-this.opt.margin[2]},a.inner.px={width:o(a.inner.width,a.k),height:o(a.inner.height,a.k)},a.inner.ratio=a.inner.height/a.inner.width),this.prop.pageSize=a})},A.prototype.setProgress=function(a,o,l,h){return a!=null&&(this.progress.val=a),o!=null&&(this.progress.state=o),l!=null&&(this.progress.n=l),h!=null&&(this.progress.stack=h),this.progress.ratio=this.progress.val/this.progress.state,this},A.prototype.updateProgress=function(a,o,l,h){return this.setProgress(a?this.progress.val+a:null,o||null,l?this.progress.n+l:null,h?this.progress.stack.concat(h):null)},A.prototype.then=function(a,o){var l=this;return this.thenCore(a,o,function(h,u){return l.updateProgress(null,null,1,[h]),Promise.prototype.then.call(this,function(f){return l.updateProgress(null,h),f}).then(h,u).then(function(f){return l.updateProgress(1),f})})},A.prototype.thenCore=function(a,o,l){l=l||Promise.prototype.then;var h=this;a&&(a=a.bind(h)),o&&(o=o.bind(h));var u=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?h:A.convert(Object.assign({},h),Promise.prototype),f=l.call(u,a,o);return A.convert(f,h.__proto__)},A.prototype.thenExternal=function(a,o){return Promise.prototype.then.call(this,a,o)},A.prototype.thenList=function(a){var o=this;return a.forEach(function(l){o=o.thenCore(l)}),o},A.prototype.catch=function(a){a&&(a=a.bind(this));var o=Promise.prototype.catch.call(this,a);return A.convert(o,this)},A.prototype.catchExternal=function(a){return Promise.prototype.catch.call(this,a)},A.prototype.error=function(a){return this.then(function(){throw new Error(a)})},A.prototype.using=A.prototype.set,A.prototype.saveAs=A.prototype.save,A.prototype.export=A.prototype.output,A.prototype.run=A.prototype.then,ue.getPageSize=function(a,o,l){if(Ze(a)==="object"){var h=a;a=h.orientation,o=h.unit||o,l=h.format||l}o=o||"mm",l=l||"a4",a=(""+(a||"P")).toLowerCase();var u,f=(""+l).toLowerCase(),d={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(o){case"pt":u=1;break;case"mm":u=72/25.4;break;case"cm":u=72/2.54;break;case"in":u=72;break;case"px":u=.75;break;case"pc":case"em":u=12;break;case"ex":u=6;break;default:throw"Invalid unit: "+o}var g,m=0,y=0;if(d.hasOwnProperty(f))m=d[f][1]/u,y=d[f][0]/u;else try{m=l[1],y=l[0]}catch{throw new Error("Invalid format: "+l)}if(a==="p"||a==="portrait")a="p",y>m&&(g=y,y=m,m=g);else{if(a!=="l"&&a!=="landscape")throw"Invalid orientation: "+a;a="l",m>y&&(g=y,y=m,m=g)}return{width:y,height:m,unit:o,k:u,orientation:a}},i.html=function(a,o){(o=o||{}).callback=o.callback||function(){},o.html2canvas=o.html2canvas||{},o.html2canvas.canvas=o.html2canvas.canvas||this.canvas,o.jsPDF=o.jsPDF||this,o.fontFaces=o.fontFaces?o.fontFaces.map(xB):null;var l=new A(o);return o.worker?l:l.from(a).doCallback()}})(ue.API),ue.API.addJS=function(i){var t,e,r=(function(n){for(var s="",A=0;A<n.length;A++){var a=n[A];if(a==="("||a===")"){for(var o=0,l=A-1;l>=0&&n[l]==="\\";l--)o++;s+=o%2==0?"\\"+a:a}else s+=a}return s})(i);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&e!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},(function(i){var t;i.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=e.outline.render().split(/\r\n/),s=0;s<n.length;s++){var A=n[s],a=r.exec(A);if(a!=null){var o=a[1];e.internal.newObjectDeferredBegin(o,!1)}e.internal.write(A)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,h=[];for(s=0;s<l;s++){var u=e.internal.newObject();h.push(u);var f=e.internal.getPageInfo(s+1);e.internal.write("<< /D["+f.objId+" 0 R /XYZ null null null]>> endobj")}var d=e.internal.newObject();for(e.internal.write("<< /Names [ "),s=0;s<h.length;s++)e.internal.write("(page_"+(s+1)+")"+h[s]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+d+" 0 R"),e.internal.write(">>","endobj")}}]),i.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+t+" 0 R"))}]),i.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,n,s){var A={title:n,options:s,children:[]};return r==null&&(r=this.root),r.children.push(A),A},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(r){r.id=e.internal.newObjectDeferred();for(var n=0;n<r.children.length;n++)this.genIds_r(r.children[n])},e.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},e.outline.renderItems=function(r){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<r.children.length;s++){var A=r.children[s];this.objStart(A),this.line("/Title "+this.makeString(A.title)),this.line("/Parent "+this.makeRef(r)),s>0&&this.line("/Prev "+this.makeRef(r.children[s-1])),s<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[s+1])),A.children.length>0&&(this.line("/First "+this.makeRef(A.children[0])),this.line("/Last "+this.makeRef(A.children[A.children.length-1])));var a=this.count=this.count_r({count:0},A);if(a>0&&this.line("/Count "+a),A.options&&A.options.pageNumber){var o=e.internal.getPageInfo(A.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var l=0;l<r.children.length;l++)this.renderItems(r.children[l])},e.outline.line=function(r){this.ctx.val+=r+`\r
|
|
181
|
-
`},e.outline.makeRef=function(r){return r.id+" 0 R"},e.outline.makeString=function(r){return"("+e.internal.pdfEscape(r)+")"},e.outline.objStart=function(r){this.ctx.val+=`\r
|
|
182
|
-
`+r.id+` 0 obj\r
|
|
183
|
-
<<\r
|
|
184
|
-
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
185
|
-
endobj\r
|
|
186
|
-
`},e.outline.count_r=function(r,n){for(var s=0;s<n.children.length;s++)r.count++,this.count_r(r,n.children[s]);return r.count}}])})(ue.API),(function(i){var t=[192,193,194,195,196,197,198,199];i.processJPEG=function(e,r,n,s,A,a){var o,l=this.decode.DCT_DECODE,h=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=A||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,o=(function(u){for(var f,d=256*u.charCodeAt(4)+u.charCodeAt(5),g=u.length,m={width:0,height:0,numcomponents:1},y=4;y<g;y+=2){if(y+=d,t.indexOf(u.charCodeAt(y+1))!==-1){f=256*u.charCodeAt(y+5)+u.charCodeAt(y+6),m={width:256*u.charCodeAt(y+7)+u.charCodeAt(y+8),height:f,numcomponents:u.charCodeAt(y+9)};break}d=256*u.charCodeAt(y+2)+u.charCodeAt(y+3)}return m})(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),o.numcomponents){case 1:a=this.color_spaces.DEVICE_GRAY;break;case 4:a=this.color_spaces.DEVICE_CMYK;break;case 3:a=this.color_spaces.DEVICE_RGB}h={data:e,width:o.width,height:o.height,colorSpace:a,bitsPerComponent:8,filter:l,index:r,alias:n}}return h}})(ue.API),ue.API.processPNG=function(i,t,e,r){if(this.__addimage__.isArrayBuffer(i)&&(i=new Uint8Array(i)),this.__addimage__.isArrayBufferView(i)){var n,s=m7(i,{checkCrc:!0}),A=s.width,a=s.height,o=s.channels,l=s.palette,h=s.depth;n=l&&o===1?(function(D){for(var Q=D.width,K=D.height,L=D.data,O=D.palette,W=D.depth,R=!1,tt=[],et=[],st=void 0,nt=!1,at=0,ft=0;ft<O.length;ft++){var ht=B3(O[ft],4),M=ht[0],G=ht[1],X=ht[2],rt=ht[3];tt.push(M,G,X),rt!=null&&(rt===0?(at++,et.length<1&&et.push(ft)):rt<255&&(nt=!0))}if(nt||at>1){R=!0,et=void 0;var it=Q*K;st=new Uint8Array(it);for(var ot=new DataView(L.buffer),gt=0;gt<it;gt++){var vt=FB(ot,gt,W),yt=B3(O[vt],4)[3];st[gt]=yt}}else at===0&&(et=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:R?8:void 0,colorBytes:L,alphaBytes:st,needSMask:R,palette:tt,mask:et}})(s):o===2||o===4?(function(D){for(var Q=D.data,K=D.width,L=D.height,O=D.channels,W=D.depth,R=O===2?"DeviceGray":"DeviceRGB",tt=O-1,et=K*L,st=tt,nt=et*st,at=1*et,ft=Math.ceil(nt*W/8),ht=Math.ceil(at*W/8),M=new Uint8Array(ft),G=new Uint8Array(ht),X=new DataView(Q.buffer),rt=new DataView(M.buffer),it=new DataView(G.buffer),ot=!1,gt=0;gt<et;gt++){for(var vt=gt*O,yt=0;yt<st;yt++)Sk(rt,FB(X,vt+yt,W),gt*st+yt,W);var St=FB(X,vt+st,W);St<(1<<W)-1&&(ot=!0),Sk(it,St,1*gt,W)}return{colorSpace:R,colorsPerPixel:tt,sMaskBitsPerComponent:ot?W:void 0,colorBytes:M,alphaBytes:G,needSMask:ot}})(s):(function(D){var Q=D.data,K=D.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:K,colorsPerPixel:K==="DeviceGray"?1:3,colorBytes:Q instanceof Uint16Array?(function(L){for(var O=L.length,W=new Uint8Array(2*O),R=new DataView(W.buffer,W.byteOffset,W.byteLength),tt=0;tt<O;tt++)R.setUint16(2*tt,L[tt],!1);return W})(Q):Q,needSMask:!1}})(s);var u,f,d,g=n,m=g.colorSpace,y=g.colorsPerPixel,w=g.sMaskBitsPerComponent,b=g.colorBytes,C=g.alphaBytes,S=g.needSMask,k=g.palette,I=g.mask,N=null;return r!==ue.API.image_compression.NONE&&typeof $x=="function"?(N=(function(D){var Q;switch(D){case ue.API.image_compression.FAST:Q=11;break;case ue.API.image_compression.MEDIUM:Q=13;break;case ue.API.image_compression.SLOW:Q=14;break;default:Q=12}return Q})(r),u=this.decode.FLATE_DECODE,f="/Predictor ".concat(N," /Colors ").concat(y," /BitsPerComponent ").concat(h," /Columns ").concat(A),i=bk(b,Math.ceil(A*y*h/8),y,h,r),S&&(d=bk(C,Math.ceil(A*w/8),1,w,r))):(u=void 0,f=void 0,i=b,S&&(d=C)),(this.__addimage__.isArrayBuffer(i)||this.__addimage__.isArrayBufferView(i))&&(i=this.__addimage__.arrayBufferToBinaryString(i)),(d&&this.__addimage__.isArrayBuffer(d)||this.__addimage__.isArrayBufferView(d))&&(d=this.__addimage__.arrayBufferToBinaryString(d)),{alias:e,data:i,index:t,filter:u,decodeParameters:f,transparency:I,palette:k,sMask:d,predictor:N,width:A,height:a,bitsPerComponent:h,sMaskBitsPerComponent:w,colorSpace:m}}},(function(i){i.processGIF89A=function(t,e,r,n){var s=new D7(t),A=s.width,a=s.height,o=[];s.decodeAndBlitFrameRGBA(0,o);var l={data:o,width:A,height:a},h=new SB(100).encode(l,100);return i.processJPEG.call(this,h,e,r,n)},i.processGIF87A=i.processGIF89A})(ue.API),GA.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var i=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(i);for(var t=0;t<i;t++){var e=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:n,green:r,blue:e,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},GA.prototype.parseBGR=function(){this.pos=this.offset;var i="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[i]()}catch(e){vr.log("bit decode error:"+e)}},GA.prototype.bit1=function(){var i,t=Math.ceil(this.width/8),e=t%4;for(i=this.height-1;i>=0;i--){for(var r=this.bottom_up?i:this.height-1-i,n=0;n<t;n++)for(var s=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+8*n*4,a=0;a<8&&8*n+a<this.width;a++){var o=this.palette[s>>7-a&1];this.data[A+4*a]=o.blue,this.data[A+4*a+1]=o.green,this.data[A+4*a+2]=o.red,this.data[A+4*a+3]=255}e!==0&&(this.pos+=4-e)}},GA.prototype.bit4=function(){for(var i=Math.ceil(this.width/2),t=i%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<i;n++){var s=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+2*n*4,a=s>>4,o=15&s,l=this.palette[a];if(this.data[A]=l.blue,this.data[A+1]=l.green,this.data[A+2]=l.red,this.data[A+3]=255,2*n+1>=this.width)break;l=this.palette[o],this.data[A+4]=l.blue,this.data[A+4+1]=l.green,this.data[A+4+2]=l.red,this.data[A+4+3]=255}t!==0&&(this.pos+=4-t)}},GA.prototype.bit8=function(){for(var i=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;if(n<this.palette.length){var A=this.palette[n];this.data[s]=A.red,this.data[s+1]=A.green,this.data[s+2]=A.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}i!==0&&(this.pos+=4-i)}},GA.prototype.bit15=function(){for(var i=this.width%3,t=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var A=(s&t)/t*255|0,a=(s>>5&t)/t*255|0,o=(s>>10&t)/t*255|0,l=s>>15?255:0,h=r*this.width*4+4*n;this.data[h]=o,this.data[h+1]=a,this.data[h+2]=A,this.data[h+3]=l}this.pos+=i}},GA.prototype.bit16=function(){for(var i=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var A=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(A&t)/t*255|0,o=(A>>5&e)/e*255|0,l=(A>>11)/t*255|0,h=n*this.width*4+4*s;this.data[h]=l,this.data[h+1]=o,this.data[h+2]=a,this.data[h+3]=255}this.pos+=i}},GA.prototype.bit24=function(){for(var i=this.height-1;i>=0;i--){for(var t=this.bottom_up?i:this.height-1-i,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),A=t*this.width*4+4*e;this.data[A]=s,this.data[A+1]=n,this.data[A+2]=r,this.data[A+3]=255}this.pos+=this.width%4}},GA.prototype.bit32=function(){for(var i=this.height-1;i>=0;i--)for(var t=this.bottom_up?i:this.height-1-i,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*e;this.data[a]=s,this.data[a+1]=n,this.data[a+2]=r,this.data[a+3]=A}},GA.prototype.getData=function(){return this.data},(function(i){i.processBMP=function(t,e,r,n){var s=new GA(t,!1),A=s.width,a=s.height,o={data:s.getData(),width:A,height:a},l=new SB(100).encode(o,100);return i.processJPEG.call(this,l,e,r,n)}})(ue.API),kk.prototype.getData=function(){return this.data},(function(i){i.processWEBP=function(t,e,r,n){var s=new kk(t),A=s.width,a=s.height,o={data:s.getData(),width:A,height:a},l=new SB(100).encode(o,100);return i.processJPEG.call(this,l,e,r,n)}})(ue.API),ue.API.processRGBA=function(i,t,e){for(var r=i.data,n=r.length,s=new Uint8Array(n/4*3),A=new Uint8Array(n/4),a=0,o=0,l=0;l<n;l+=4){var h=r[l],u=r[l+1],f=r[l+2],d=r[l+3];s[a++]=h,s[a++]=u,s[a++]=f,A[o++]=d}var g=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(A),data:g,index:t,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:i.width,height:i.height}},ue.API.setLanguage=function(i){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[i]!==void 0&&(this.internal.languageSettings.languageCode=i,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},pd=ue.API,G1=pd.getCharWidthsArray=function(i,t){var e,r,n=(t=t||{}).font||this.internal.getFont(),s=t.fontSize||this.internal.getFontSize(),A=t.charSpace||this.internal.getCharSpace(),a=t.widths?t.widths:n.metadata.Unicode.widths,o=a.fof?a.fof:1,l=t.kerning?t.kerning:n.metadata.Unicode.kerning,h=l.fof?l.fof:1,u=t.doKerning!==!1,f=0,d=i.length,g=0,m=a[0]||o,y=[];for(e=0;e<d;e++)r=i.charCodeAt(e),typeof n.metadata.widthOfString=="function"?y.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(r))+A*(1e3/s)||0)/1e3):(f=u&&Ze(l[r])==="object"&&!isNaN(parseInt(l[r][g],10))?l[r][g]/h:0,y.push((a[r]||m)/o+f)),g=r;return y},mk=pd.getStringUnitWidth=function(i,t){var e=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),n=t.charSpace||this.internal.getCharSpace();return pd.processArabic&&(i=pd.processArabic(i)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(i,e,n)/e:G1.apply(this,arguments).reduce(function(s,A){return s+A},0)},wk=function(i,t,e,r){for(var n=[],s=0,A=i.length,a=0;s!==A&&a+t[s]<e;)a+=t[s],s++;n.push(i.slice(0,s));var o=s;for(a=0;s!==A;)a+t[s]>r&&(n.push(i.slice(o,s)),a=0,o=s),a+=t[s],s++;return o!==s&&n.push(i.slice(o,s)),n},vk=function(i,t,e){e||(e={});var r,n,s,A,a,o,l,h=[],u=[h],f=e.textIndent||0,d=0,g=0,m=i.split(" "),y=G1.apply(this,[" ",e])[0];if(o=e.lineIndent===-1?m[0].length+2:e.lineIndent||0){var w=Array(o).join(" "),b=[];m.map(function(S){(S=S.split(/\s*\n/)).length>1?b=b.concat(S.map(function(k,I){return(I&&k.length?`
|
|
187
|
-
`:"")+k})):b.push(S[0])}),m=b,o=mk.apply(this,[w,e])}for(s=0,A=m.length;s<A;s++){var C=0;if(r=m[s],o&&r[0]==`
|
|
188
|
-
`&&(r=r.substr(1),C=1),f+d+(g=(n=G1.apply(this,[r,e])).reduce(function(S,k){return S+k},0))>t||C){if(g>t){for(a=wk.apply(this,[r,n,t-(f+d),t]),h.push(a.shift()),h=[a.pop()];a.length;)u.push([a.shift()]);g=n.slice(r.length-(h[0]?h[0].length:0)).reduce(function(S,k){return S+k},0)}else h=[r];u.push(h),f=g+o,d=y}else h.push(r),f+=d+g,d=y}return l=o?function(S,k){return(k?w:"")+S.join(" ")}:function(S){return S.join(" ")},u.map(l)},pd.splitTextToSize=function(i,t,e){var r,n=(e=e||{}).fontSize||this.internal.getFontSize(),s=(function(h){if(h.widths&&h.kerning)return{widths:h.widths,kerning:h.kerning};var u=this.internal.getFont(h.fontName,h.fontStyle),f="Unicode";return u.metadata[f]?{widths:u.metadata[f].widths||{0:1},kerning:u.metadata[f].kerning||{}}:{font:u.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);r=Array.isArray(i)?i:String(i).split(/\r?\n/);var A=1*this.internal.scaleFactor*t/n;s.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/n:0,s.lineIndent=e.lineIndent;var a,o,l=[];for(a=0,o=r.length;a<o;a++)l=l.concat(vk.apply(this,[r[a],A,s]));return l},(function(i){i.__fontmetrics__=i.__fontmetrics__||{};for(var t="0123456789abcdef",e="klmnopqrstuvwxyz",r={},n={},s=0;s<16;s++)r[e[s]]=t[s],n[t[s]]=e[s];var A=function(f){return"0x"+parseInt(f,10).toString(16)},a=i.__fontmetrics__.compress=function(f){var d,g,m,y,w=["{"];for(var b in f){if(d=f[b],isNaN(parseInt(b,10))?g="'"+b+"'":(b=parseInt(b,10),g=(g=A(b).slice(2)).slice(0,-1)+n[g.slice(-1)]),typeof d=="number")d<0?(m=A(d).slice(3),y="-"):(m=A(d).slice(2),y=""),m=y+m.slice(0,-1)+n[m.slice(-1)];else{if(Ze(d)!=="object")throw new Error("Don't know what to do with value type "+Ze(d)+".");m=a(d)}w.push(g+m)}return w.push("}"),w.join("")},o=i.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var d,g,m,y,w={},b=1,C=w,S=[],k="",I="",N=f.length-1,D=1;D<N;D+=1)(y=f[D])=="'"?d?(m=d.join(""),d=void 0):d=[]:d?d.push(y):y=="{"?(S.push([C,m]),C={},m=void 0):y=="}"?((g=S.pop())[0][g[1]]=C,m=void 0,C=g[0]):y=="-"?b=-1:m===void 0?r.hasOwnProperty(y)?(k+=r[y],m=parseInt(k,16)*b,b=1,k=""):k+=y:r.hasOwnProperty(y)?(I+=r[y],C[m]=parseInt(I,16)*b,b=1,m=void 0,I=""):I+=y;return w},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:o("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},h={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},u={Unicode:{"Courier-Oblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":o("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":o("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:o("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:o("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":o("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":o("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};i.events.push(["addFont",function(f){var d=f.font,g=u.Unicode[d.postScriptName];g&&(d.metadata.Unicode={},d.metadata.Unicode.widths=g.widths,d.metadata.Unicode.kerning=g.kerning);var m=h.Unicode[d.postScriptName];m&&(d.metadata.Unicode.encoding=m,d.encoding=m.codePages[0])}])})(ue.API),(function(i){var t=function(e){for(var r=e.length,n=new Uint8Array(r),s=0;s<r;s++)n[s]=e.charCodeAt(s);return n};i.API.events.push(["addFont",function(e){var r=void 0,n=e.font,s=e.instance;if(!n.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if(typeof(r=s.existsFileInVFS(n.postScriptName)===!1?s.loadFile(n.postScriptName):s.getFileFromVFS(n.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");(function(A,a){a=/^\x00\x01\x00\x00/.test(a)?t(a):t(Pw(a)),A.metadata=i.API.TTFFont.open(a),A.metadata.Unicode=A.metadata.Unicode||{encoding:{},kerning:{},widths:[]},A.metadata.glyIdsUsed=[0]})(n,r)}}])})(ue),ue.API.addSvgAsImage=function(i,t,e,r,n,s,A,a){if(isNaN(t)||isNaN(e))throw vr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(n))throw vr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var o=document.createElement("canvas");o.width=r,o.height=n;var l=o.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,o.width,o.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},u=this;return(xe.canvg?Promise.resolve(xe.canvg):Promise.resolve().then(()=>cZ)).catch(function(f){return Promise.reject(new Error("Could not load canvg: "+f))}).then(function(f){return f.default?f.default:f}).then(function(f){return f.fromString(l,i,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(f){return f.render(h)}).then(function(){u.addImage(o.toDataURL("image/jpeg",1),t,e,r,n,A,a)})},ue.API.putTotalPages=function(i){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(i,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(i,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var n=0;n<this.internal.pages[r].length;n++)this.internal.pages[r][n]=this.internal.pages[r][n].replace(t,e);return this},ue.API.viewerPreferences=function(i,t){var e;i=i||{},t=t||!1;var r,n,s,A={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(A),o=[],l=0,h=0,u=0;function f(g,m){var y,w=!1;for(y=0;y<g.length;y+=1)g[y]===m&&(w=!0);return w}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(A)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,i==="reset"||t===!0){var d=a.length;for(u=0;u<d;u+=1)e[a[u]].value=e[a[u]].defaultValue,e[a[u]].explicitSet=!1}if(Ze(i)==="object"){for(n in i)if(s=i[n],f(a,n)&&s!==void 0){if(e[n].type==="boolean"&&typeof s=="boolean")e[n].value=s;else if(e[n].type==="name"&&f(e[n].valueSet,s))e[n].value=s;else if(e[n].type==="integer"&&Number.isInteger(s))e[n].value=s;else if(e[n].type==="array"){for(l=0;l<s.length;l+=1)if(r=!0,s[l].length===1&&typeof s[l][0]=="number")o.push(String(s[l]-1));else if(s[l].length>1){for(h=0;h<s[l].length;h+=1)typeof s[l][h]!="number"&&(r=!1);r===!0&&o.push([s[l][0]-1,s[l][1]-1].join(" "))}e[n].value="["+o.join(" ")+"]"}else e[n].value=e[n].defaultValue;e[n].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var g,m=[];for(g in e)e[g].explicitSet===!0&&(e[g].type==="name"?m.push("/"+g+" /"+e[g].value):m.push("/"+g+" "+e[g].value));m.length!==0&&this.internal.write(`/ViewerPreferences
|
|
189
|
-
<<
|
|
190
|
-
`+m.join(`
|
|
191
|
-
`)+`
|
|
192
|
-
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},ue.API.addMetadata=function(i,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:i,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",R7),this.internal.events.subscribe("postPutResources",O7)),this},(function(i){var t=i.API,e=t.pdfEscape16=function(s,A){for(var a,o=A.metadata.Unicode.widths,l=["","0","00","000","0000"],h=[""],u=0,f=s.length;u<f;++u){if(a=A.metadata.characterToGlyph(s.charCodeAt(u)),A.metadata.glyIdsUsed.push(a),A.metadata.toUnicode[a]=s.charCodeAt(u),o.indexOf(a)==-1&&(o.push(a),o.push([parseInt(A.metadata.widthOfGlyph(a),10)])),a=="0")return h.join("");a=a.toString(16),h.push(l[4-a.length],a)}return h.join("")},r=function(s){var A,a,o,l,h,u,f;for(h=`/CIDInit /ProcSet findresource begin
|
|
193
|
-
12 dict begin
|
|
194
|
-
begincmap
|
|
195
|
-
/CIDSystemInfo <<
|
|
196
|
-
/Registry (Adobe)
|
|
197
|
-
/Ordering (UCS)
|
|
198
|
-
/Supplement 0
|
|
199
|
-
>> def
|
|
200
|
-
/CMapName /Adobe-Identity-UCS def
|
|
201
|
-
/CMapType 2 def
|
|
202
|
-
1 begincodespacerange
|
|
203
|
-
<0000><ffff>
|
|
204
|
-
endcodespacerange`,o=[],u=0,f=(a=Object.keys(s).sort(function(d,g){return d-g})).length;u<f;u++)A=a[u],o.length>=100&&(h+=`
|
|
205
|
-
`+o.length+` beginbfchar
|
|
206
|
-
`+o.join(`
|
|
207
|
-
`)+`
|
|
208
|
-
endbfchar`,o=[]),s[A]!==void 0&&s[A]!==null&&typeof s[A].toString=="function"&&(l=("0000"+s[A].toString(16)).slice(-4),A=("0000"+(+A).toString(16)).slice(-4),o.push("<"+A+"><"+l+">"));return o.length&&(h+=`
|
|
209
|
-
`+o.length+` beginbfchar
|
|
210
|
-
`+o.join(`
|
|
211
|
-
`)+`
|
|
212
|
-
endbfchar
|
|
213
|
-
`),h+`endcmap
|
|
214
|
-
CMapName currentdict /CMap defineresource pop
|
|
215
|
-
end
|
|
216
|
-
end`};t.events.push(["putFont",function(s){(function(A){var a=A.font,o=A.out,l=A.newObject,h=A.putStream;if(a.metadata instanceof i.API.TTFFont&&a.encoding==="Identity-H"){for(var u=a.metadata.Unicode.widths,f=a.metadata.subset.encode(a.metadata.glyIdsUsed,1),d="",g=0;g<f.length;g++)d+=String.fromCharCode(f[g]);var m=l();h({data:d,addLength1:!0,objectId:m}),o("endobj");var y=l();h({data:r(a.metadata.toUnicode),addLength1:!0,objectId:y}),o("endobj");var w=l();o("<<"),o("/Type /FontDescriptor"),o("/FontName /"+Ud(a.fontName)),o("/FontFile2 "+m+" 0 R"),o("/FontBBox "+i.API.PDFObject.convert(a.metadata.bbox)),o("/Flags "+a.metadata.flags),o("/StemV "+a.metadata.stemV),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o(">>"),o("endobj");var b=l();o("<<"),o("/Type /Font"),o("/BaseFont /"+Ud(a.fontName)),o("/FontDescriptor "+w+" 0 R"),o("/W "+i.API.PDFObject.convert(u)),o("/CIDToGIDMap /Identity"),o("/DW 1000"),o("/Subtype /CIDFontType2"),o("/CIDSystemInfo"),o("<<"),o("/Supplement 0"),o("/Registry (Adobe)"),o("/Ordering ("+a.encoding+")"),o(">>"),o(">>"),o("endobj"),a.objectNumber=l(),o("<<"),o("/Type /Font"),o("/Subtype /Type0"),o("/ToUnicode "+y+" 0 R"),o("/BaseFont /"+Ud(a.fontName)),o("/Encoding /"+a.encoding),o("/DescendantFonts ["+b+" 0 R]"),o(">>"),o("endobj"),a.isAlreadyPutted=!0}})(s)}]),t.events.push(["putFont",function(s){(function(A){var a=A.font,o=A.out,l=A.newObject,h=A.putStream;if(a.metadata instanceof i.API.TTFFont&&a.encoding==="WinAnsiEncoding"){for(var u=a.metadata.rawData,f="",d=0;d<u.length;d++)f+=String.fromCharCode(u[d]);var g=l();h({data:f,addLength1:!0,objectId:g}),o("endobj");var m=l();h({data:r(a.metadata.toUnicode),addLength1:!0,objectId:m}),o("endobj");var y=l();o("<<"),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o("/StemV "+a.metadata.stemV),o("/Type /FontDescriptor"),o("/FontFile2 "+g+" 0 R"),o("/Flags 96"),o("/FontBBox "+i.API.PDFObject.convert(a.metadata.bbox)),o("/FontName /"+Ud(a.fontName)),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o(">>"),o("endobj"),a.objectNumber=l();for(var w=0;w<a.metadata.hmtx.widths.length;w++)a.metadata.hmtx.widths[w]=parseInt(a.metadata.hmtx.widths[w]*(1e3/a.metadata.head.unitsPerEm));o("<</Subtype/TrueType/Type/Font/ToUnicode "+m+" 0 R/BaseFont/"+Ud(a.fontName)+"/FontDescriptor "+y+" 0 R/Encoding/"+a.encoding+" /FirstChar 29 /LastChar 255 /Widths "+i.API.PDFObject.convert(a.metadata.hmtx.widths)+">>"),o("endobj"),a.isAlreadyPutted=!0}})(s)}]);var n=function(s){var A,a=s.text||"",o=s.x,l=s.y,h=s.options||{},u=s.mutex||{},f=u.pdfEscape,d=u.activeFontKey,g=u.fonts,m=d,y="",w=0,b="",C=g[m].encoding;if(g[m].encoding!=="Identity-H")return{text:a,x:o,y:l,options:h,mutex:u};for(b=a,m=d,Array.isArray(a)&&(b=a[0]),w=0;w<b.length;w+=1)g[m].metadata.hasOwnProperty("cmap")&&(A=g[m].metadata.cmap.unicode.codeMap[b[w].charCodeAt(0)]),A||b[w].charCodeAt(0)<256&&g[m].metadata.hasOwnProperty("Unicode")?y+=b[w]:y+="";var S="";return parseInt(m.slice(1))<14||C==="WinAnsiEncoding"?S=f(y,m).split("").map(function(k){return k.charCodeAt(0).toString(16)}).join(""):C==="Identity-H"&&(S=e(y,g[m])),u.isHex=!0,{text:S,x:o,y:l,options:h,mutex:u}};t.events.push(["postProcessText",function(s){var A=s.text||"",a=[],o={text:A,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(A)){var l=0;for(l=0;l<A.length;l+=1)Array.isArray(A[l])&&A[l].length===3?a.push([n(Object.assign({},o,{text:A[l][0]})).text,A[l][1],A[l][2]]):a.push(n(Object.assign({},o,{text:A[l]})).text);s.text=a}else s.text=n(Object.assign({},o,{text:A})).text}])})(ue),(function(i){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};i.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},i.addFileToVFS=function(e,r){return t.call(this),this.internal.vFS[e]=r,this},i.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}})(ue.API),(function(i){i.__bidiEngine__=i.prototype.__bidiEngine__=function(r){var n,s,A,a,o,l,h,u=t,f=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],g={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},y=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],w=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),b=!1,C=0;this.__bidiEngine__={};var S=function(L){var O=L.charCodeAt(),W=O>>8,R=m[W];return R!==void 0?u[256*R+(255&O)]:W===252||W===253?"AL":w.test(W)?"L":W===8?"R":"N"},k=function(L){for(var O,W=0;W<L.length;W++){if((O=S(L.charAt(W)))==="L")return!1;if(O==="R")return!0}return!1},I=function(L,O,W,R){var tt,et,st,nt,at=O[R];switch(at){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":b=!1;break;case"N":case"AN":break;case"EN":b&&(at="AN");break;case"AL":b=!0,at="R";break;case"WS":case"BN":at="N";break;case"CS":R<1||R+1>=O.length||(tt=W[R-1])!=="EN"&&tt!=="AN"||(et=O[R+1])!=="EN"&&et!=="AN"?at="N":b&&(et="AN"),at=et===tt?et:"N";break;case"ES":at=(tt=R>0?W[R-1]:"B")==="EN"&&R+1<O.length&&O[R+1]==="EN"?"EN":"N";break;case"ET":if(R>0&&W[R-1]==="EN"){at="EN";break}if(b){at="N";break}for(st=R+1,nt=O.length;st<nt&&O[st]==="ET";)st++;at=st<nt&&O[st]==="EN"?"EN":"N";break;case"NSM":if(A&&!a){for(nt=O.length,st=R+1;st<nt&&O[st]==="NSM";)st++;if(st<nt){var ft=L[R],ht=ft>=1425&&ft<=2303||ft===64286;if(tt=O[st],ht&&(tt==="R"||tt==="AL")){at="R";break}}}at=R<1||(tt=O[R-1])==="B"?"N":W[R-1];break;case"B":b=!1,n=!0,at=C;break;case"S":s=!0,at="N"}return at},N=function(L,O,W){var R=L.split("");return W&&D(R,W,{hiLevel:C}),R.reverse(),O&&O.reverse(),R.join("")},D=function(L,O,W){var R,tt,et,st,nt,at=-1,ft=L.length,ht=0,M=[],G=C?d:f,X=[];for(b=!1,n=!1,s=!1,tt=0;tt<ft;tt++)X[tt]=S(L[tt]);for(et=0;et<ft;et++){if(nt=ht,M[et]=I(L,X,M,et),R=240&(ht=G[nt][g[M[et]]]),ht&=15,O[et]=st=G[ht][5],R>0)if(R===16){for(tt=at;tt<et;tt++)O[tt]=1;at=-1}else at=-1;if(G[ht][6])at===-1&&(at=et);else if(at>-1){for(tt=at;tt<et;tt++)O[tt]=st;at=-1}X[et]==="B"&&(O[et]=0),W.hiLevel|=st}s&&(function(rt,it,ot){for(var gt=0;gt<ot;gt++)if(rt[gt]==="S"){it[gt]=C;for(var vt=gt-1;vt>=0&&rt[vt]==="WS";vt--)it[vt]=C}})(X,O,ft)},Q=function(L,O,W,R,tt){if(!(tt.hiLevel<L)){if(L===1&&C===1&&!n)return O.reverse(),void(W&&W.reverse());for(var et,st,nt,at,ft=O.length,ht=0;ht<ft;){if(R[ht]>=L){for(nt=ht+1;nt<ft&&R[nt]>=L;)nt++;for(at=ht,st=nt-1;at<st;at++,st--)et=O[at],O[at]=O[st],O[st]=et,W&&(et=W[at],W[at]=W[st],W[st]=et);ht=nt}ht++}}},K=function(L,O,W){var R=L.split(""),tt={hiLevel:C};return W||(W=[]),D(R,W,tt),(function(et,st,nt){if(nt.hiLevel!==0&&h)for(var at,ft=0;ft<et.length;ft++)st[ft]===1&&(at=y.indexOf(et[ft]))>=0&&(et[ft]=y[at+1])})(R,W,tt),Q(2,R,O,W,tt),Q(1,R,O,W,tt),R.join("")};return this.__bidiEngine__.doBidiReorder=function(L,O,W){if((function(tt,et){if(et)for(var st=0;st<tt.length;st++)et[st]=st;a===void 0&&(a=k(tt)),l===void 0&&(l=k(tt))})(L,O),A||!o||l)if(A&&o&&a^l)C=a?1:0,L=N(L,O,W);else if(!A&&o&&l)C=a?1:0,L=K(L,O,W),L=N(L,O);else if(!A||a||o||l){if(A&&!o&&a^l)L=N(L,O),a?(C=0,L=K(L,O,W)):(C=1,L=K(L,O,W),L=N(L,O));else if(A&&a&&!o&&l)C=1,L=K(L,O,W),L=N(L,O);else if(!A&&!o&&a^l){var R=h;a?(C=1,L=K(L,O,W),C=0,h=!1,L=K(L,O,W),h=R):(C=0,L=K(L,O,W),L=N(L,O),C=1,h=!1,L=K(L,O,W),h=R,L=N(L,O))}}else C=0,L=K(L,O,W);else C=a?1:0,L=K(L,O,W);return L},this.__bidiEngine__.setOptions=function(L){L&&(A=L.isInputVisual,o=L.isOutputVisual,a=L.isInputRtl,l=L.isOutputRtl,h=L.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new i.__bidiEngine__({isInputVisual:!0});i.API.events.push(["postProcessText",function(r){var n=r.text;r.x,r.y;var s=r.options||{};r.mutex,s.lang;var A=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,e.setOptions(s),Object.prototype.toString.call(n)==="[object Array]"){var a=0;for(A=[],a=0;a<n.length;a+=1)Object.prototype.toString.call(n[a])==="[object Array]"?A.push([e.doBidiReorder(n[a][0]),n[a][1],n[a][2]]):A.push([e.doBidiReorder(n[a])]);r.text=A}else r.text=e.doBidiReorder(n);e.setOptions({isInputVisual:!0})}])})(ue),ue.API.TTFFont=(function(){function i(t){var e;if(this.rawData=t,e=this.contents=new Hh(t),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new e9(this),this.registerTTF()}return i.open=function(t){return new i(t)},i.prototype.parse=function(){return this.directory=new H7(this.contents),this.head=new W7(this),this.name=new q7(this),this.cmap=new jT(this),this.toUnicode={},this.hhea=new j7(this),this.maxp=new X7(this),this.hmtx=new Y7(this),this.post=new G7(this),this.os2=new K7(this),this.loca=new t9(this),this.glyf=new $7(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},i.prototype.registerTTF=function(){var t,e,r,n,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var A,a,o,l;for(l=[],A=0,a=(o=this.bbox).length;A<a;A++)t=o[A],l.push(Math.round(t*this.scaleFactor));return l}).call(this),this.stemV=0,this.post.exists?(r=255&(n=this.post.italic_angle),32768&(e=n>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},i.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},i.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},i.prototype.widthOfString=function(t,e,r){var n,s,A,a;for(A=0,s=0,a=(t=""+t).length;0<=a?s<a:s>a;s=0<=a?++s:--s)n=t.charCodeAt(s),A+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/e)||0;return A*(e/1e3)},i.prototype.lineHeight=function(t,e){var r;return e==null&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},i})();var ma,Hh=(function(){function i(t){this.data=t??[],this.pos=0,this.length=this.data.length}return i.prototype.readByte=function(){return this.data[this.pos++]},i.prototype.writeByte=function(t){return this.data[this.pos++]=t},i.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},i.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},i.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},i.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},i.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},i.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},i.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},i.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},i.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},i.prototype.writeString=function(t){var e,r,n;for(n=[],e=0,r=t.length;0<=r?e<r:e>r;e=0<=r?++e:--e)n.push(this.writeByte(t.charCodeAt(e)));return n},i.prototype.readShort=function(){return this.readInt16()},i.prototype.writeShort=function(t){return this.writeInt16(t)},i.prototype.readLongLong=function(){var t,e,r,n,s,A,a,o;return t=this.readByte(),e=this.readByte(),r=this.readByte(),n=this.readByte(),s=this.readByte(),A=this.readByte(),a=this.readByte(),o=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^s)+65536*(255^A)+256*(255^a)+(255^o)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*n+16777216*s+65536*A+256*a+o},i.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},i.prototype.readInt=function(){return this.readInt32()},i.prototype.writeInt=function(t){return this.writeInt32(t)},i.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e.push(this.readByte());return e},i.prototype.write=function(t){var e,r,n,s;for(s=[],r=0,n=t.length;r<n;r++)e=t[r],s.push(this.writeByte(e));return s},i})(),H7=(function(){var i;function t(e){var r,n,s;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,s=this.tableCount;0<=s?n<s:n>s;n=0<=s?++n:--n)r={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(e){var r,n,s,A,a,o,l,h,u,f,d,g,m;for(m in d=Object.keys(e).length,o=Math.log(2),u=16*Math.floor(Math.log(d)/o),A=Math.floor(u/o),h=16*d-u,(n=new Hh).writeInt(this.scalarType),n.writeShort(d),n.writeShort(u),n.writeShort(A),n.writeShort(h),s=16*d,l=n.pos+s,a=null,g=[],e)for(f=e[m],n.writeString(m),n.writeInt(i(f)),n.writeInt(l),n.writeInt(f.length),g=g.concat(f),m==="head"&&(a=l),l+=f.length;l%4;)g.push(0),l++;return n.write(g),r=2981146554-i(n.data),n.pos=a+8,n.writeUInt32(r),n.data},i=function(e){var r,n,s,A;for(e=KT.call(e);e.length%4;)e.push(0);for(s=new Hh(e),n=0,r=0,A=e.length;r<A;r=r+=4)n+=s.readUInt32();return 4294967295&n},t})(),V7={}.hasOwnProperty,Ao=function(i,t){for(var e in t)V7.call(t,e)&&(i[e]=t[e]);function r(){this.constructor=i}return r.prototype=t.prototype,i.prototype=new r,i.__super__=t.prototype,i};ma=(function(){function i(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return i.prototype.parse=function(){},i.prototype.encode=function(){},i.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},i})();var W7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="head",i.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},i.prototype.encode=function(t){var e;return(e=new Hh).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},i})(),Uk=(function(){function i(t,e){var r,n,s,A,a,o,l,h,u,f,d,g,m,y,w,b,C;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),u=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(o=0;o<256;++o)this.codeMap[o]=t.readByte();break;case 4:for(d=t.readUInt16(),f=d/2,t.pos+=6,s=(function(){var S,k;for(k=[],o=S=0;0<=f?S<f:S>f;o=0<=f?++S:--S)k.push(t.readUInt16());return k})(),t.pos+=2,m=(function(){var S,k;for(k=[],o=S=0;0<=f?S<f:S>f;o=0<=f?++S:--S)k.push(t.readUInt16());return k})(),l=(function(){var S,k;for(k=[],o=S=0;0<=f?S<f:S>f;o=0<=f?++S:--S)k.push(t.readUInt16());return k})(),h=(function(){var S,k;for(k=[],o=S=0;0<=f?S<f:S>f;o=0<=f?++S:--S)k.push(t.readUInt16());return k})(),n=(this.length-t.pos+this.offset)/2,a=(function(){var S,k;for(k=[],o=S=0;0<=n?S<n:S>n;o=0<=n?++S:--S)k.push(t.readUInt16());return k})(),o=w=0,C=s.length;w<C;o=++w)for(y=s[o],r=b=g=m[o];g<=y?b<=y:b>=y;r=g<=y?++b:--b)h[o]===0?A=r+l[o]:(A=a[h[o]/2+(r-g)-(f-o)]||0)!==0&&(A+=l[o]),this.codeMap[r]=65535&A}t.pos=u}return i.encode=function(t,e){var r,n,s,A,a,o,l,h,u,f,d,g,m,y,w,b,C,S,k,I,N,D,Q,K,L,O,W,R,tt,et,st,nt,at,ft,ht,M,G,X,rt,it,ot,gt,vt,yt,St,Dt;switch(R=new Hh,A=Object.keys(t).sort(function(Tt,jt){return Tt-jt}),e){case"macroman":for(m=0,y=(function(){var Tt=[];for(g=0;g<256;++g)Tt.push(0);return Tt})(),b={0:0},s={},tt=0,at=A.length;tt<at;tt++)b[vt=t[n=A[tt]]]==null&&(b[vt]=++m),s[n]={old:t[n],new:b[t[n]]},y[n]=b[t[n]];return R.writeUInt16(1),R.writeUInt16(0),R.writeUInt32(12),R.writeUInt16(0),R.writeUInt16(262),R.writeUInt16(0),R.write(y),{charMap:s,subtable:R.data,maxGlyphID:m+1};case"unicode":for(O=[],u=[],C=0,b={},r={},w=l=null,et=0,ft=A.length;et<ft;et++)b[k=t[n=A[et]]]==null&&(b[k]=++C),r[n]={old:k,new:b[k]},a=b[k]-n,w!=null&&a===l||(w&&u.push(w),O.push(n),l=a),w=n;for(w&&u.push(w),u.push(65535),O.push(65535),K=2*(Q=O.length),D=2*Math.pow(Math.log(Q)/Math.LN2,2),f=Math.log(D/2)/Math.LN2,N=2*Q-D,o=[],I=[],d=[],g=st=0,ht=O.length;st<ht;g=++st){if(L=O[g],h=u[g],L===65535){o.push(0),I.push(0);break}if(L-(W=r[L].new)>=32768)for(o.push(0),I.push(2*(d.length+Q-g)),n=nt=L;L<=h?nt<=h:nt>=h;n=L<=h?++nt:--nt)d.push(r[n].new);else o.push(W-L),I.push(0)}for(R.writeUInt16(3),R.writeUInt16(1),R.writeUInt32(12),R.writeUInt16(4),R.writeUInt16(16+8*Q+2*d.length),R.writeUInt16(0),R.writeUInt16(K),R.writeUInt16(D),R.writeUInt16(f),R.writeUInt16(N),ot=0,M=u.length;ot<M;ot++)n=u[ot],R.writeUInt16(n);for(R.writeUInt16(0),gt=0,G=O.length;gt<G;gt++)n=O[gt],R.writeUInt16(n);for(yt=0,X=o.length;yt<X;yt++)a=o[yt],R.writeUInt16(a);for(St=0,rt=I.length;St<rt;St++)S=I[St],R.writeUInt16(S);for(Dt=0,it=d.length;Dt<it;Dt++)m=d[Dt],R.writeUInt16(m);return{charMap:r,subtable:R.data,maxGlyphID:C+1}}},i})(),jT=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="cmap",i.prototype.parse=function(t){var e,r,n;for(t.pos=this.offset,this.version=t.readUInt16(),n=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=n?r<n:r>n;r=0<=n?++r:--r)e=new Uk(t,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},i.encode=function(t,e){var r,n;return e==null&&(e="macroman"),r=Uk.encode(t,e),(n=new Hh).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},i})(),j7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="hhea",i.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},i})(),K7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="OS/2",i.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r})(),this.charRange=(function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},i})(),G7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="post",i.prototype.parse=function(t){var e,r,n;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(r=t.readUInt16(),this.glyphNameIndex=[],s=0;0<=r?s<r:s>r;s=0<=r?++s:--s)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)e=t.readByte(),n.push(this.names.push(t.readString(e)));return n;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var A,a,o;for(o=[],s=A=0,a=this.file.maxp.numGlyphs;0<=a?A<a:A>a;s=0<=a?++A:--A)o.push(t.readUInt32());return o}).call(this)}},i})(),z7=function(i,t){this.raw=i,this.length=i.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},q7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="name",i.prototype.parse=function(t){var e,r,n,s,A,a,o,l,h,u,f;for(t.pos=this.offset,t.readShort(),e=t.readShort(),a=t.readShort(),r=[],s=0;0<=e?s<e:s>e;s=0<=e?++s:--s)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+a+t.readShort()});for(o={},s=h=0,u=r.length;h<u;s=++h)n=r[s],t.pos=n.offset,l=t.readString(n.length),A=new z7(l,n),o[f=n.nameID]==null&&(o[f]=[]),o[n.nameID].push(A);this.strings=o,this.copyright=o[0],this.fontFamily=o[1],this.fontSubfamily=o[2],this.uniqueSubfamily=o[3],this.fontName=o[4],this.version=o[5];try{this.postscriptName=o[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=o[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=o[7],this.manufacturer=o[8],this.designer=o[9],this.description=o[10],this.vendorUrl=o[11],this.designerUrl=o[12],this.license=o[13],this.licenseUrl=o[14],this.preferredFamily=o[15],this.preferredSubfamily=o[17],this.compatibleFull=o[18],this.sampleText=o[19]},i})(),X7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="maxp",i.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},i})(),Y7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="hmtx",i.prototype.parse=function(t){var e,r,n,s,A,a,o;for(t.pos=this.offset,this.metrics=[],e=0,a=this.file.hhea.numberOfMetrics;0<=a?e<a:e>a;e=0<=a?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var l,h;for(h=[],e=l=0;0<=n?l<n:l>n;e=0<=n?++l:--l)h.push(t.readInt16());return h})(),this.widths=(function(){var l,h,u,f;for(f=[],l=0,h=(u=this.metrics).length;l<h;l++)s=u[l],f.push(s.advance);return f}).call(this),r=this.widths[this.widths.length-1],o=[],e=A=0;0<=n?A<n:A>n;e=0<=n?++A:--A)o.push(this.widths.push(r));return o},i.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},i})(),KT=[].slice,$7=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="glyf",i.prototype.parse=function(){return this.cache={}},i.prototype.glyphFor=function(t){var e,r,n,s,A,a,o,l,h,u;return t in this.cache?this.cache[t]:(s=this.file.loca,e=this.file.contents,r=s.indexOf(t),(n=s.lengthOf(t))===0?this.cache[t]=null:(e.pos=this.offset+r,A=(a=new Hh(e.read(n))).readShort(),l=a.readShort(),u=a.readShort(),o=a.readShort(),h=a.readShort(),this.cache[t]=A===-1?new J7(a,l,u,o,h):new Z7(a,A,l,u,o,h),this.cache[t]))},i.prototype.encode=function(t,e,r){var n,s,A,a,o;for(A=[],s=[],a=0,o=e.length;a<o;a++)n=t[e[a]],s.push(A.length),n&&(A=A.concat(n.encode(r)));return s.push(A.length),{table:A,offsets:s}},i})(),Z7=(function(){function i(t,e,r,n,s,A){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=n,this.xMax=s,this.yMax=A,this.compound=!1}return i.prototype.encode=function(){return this.raw.data},i})(),J7=(function(){function i(t,e,r,n,s){var A,a;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=n,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],A=this.raw;a=A.readShort(),this.glyphOffsets.push(A.pos),this.glyphIDs.push(A.readUInt16()),32&a;)A.pos+=1&a?4:2,128&a?A.pos+=8:64&a?A.pos+=4:8&a&&(A.pos+=2)}return i.prototype.encode=function(){var t,e,r;for(e=new Hh(KT.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},i})(),t9=(function(){function i(){return i.__super__.constructor.apply(this,arguments)}return Ao(i,ma),i.prototype.tag="loca",i.prototype.parse=function(t){var e,r;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=e===0?(function(){var n,s;for(s=[],r=0,n=this.length;r<n;r+=2)s.push(2*t.readUInt16());return s}).call(this):(function(){var n,s;for(s=[],r=0,n=this.length;r<n;r+=4)s.push(t.readUInt32());return s}).call(this)},i.prototype.indexOf=function(t){return this.offsets[t]},i.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},i.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),n=0,s=0,A=0;A<r.length;++A)if(r[A]=n,s<e.length&&e[s]==A){++s,r[A]=n;var a=this.offsets[A],o=this.offsets[A+1]-a;o>0&&(n+=o)}for(var l=new Array(4*r.length),h=0;h<r.length;++h)l[4*h+3]=255&r[h],l[4*h+2]=(65280&r[h])>>8,l[4*h+1]=(16711680&r[h])>>16,l[4*h]=(4278190080&r[h])>>24;return l},i})(),e9=(function(){function i(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return i.prototype.generateCmap=function(){var t,e,r,n,s;for(e in n=this.font.cmap.tables[0].codeMap,t={},s=this.subset)r=s[e],t[e]=n[r];return t},i.prototype.glyphsFor=function(t){var e,r,n,s,A,a,o;for(n={},A=0,a=t.length;A<a;A++)n[s=t[A]]=this.font.glyf.glyphFor(s);for(s in e=[],n)(r=n[s])!=null&&r.compound&&e.push.apply(e,r.glyphIDs);if(e.length>0)for(s in o=this.glyphsFor(e))r=o[s],n[s]=r;return n},i.prototype.encode=function(t,e){var r,n,s,A,a,o,l,h,u,f,d,g,m,y,w;for(n in r=jT.encode(this.generateCmap(),"unicode"),A=this.glyphsFor(t),d={0:0},w=r.charMap)d[(o=w[n]).old]=o.new;for(g in f=r.maxGlyphID,A)g in d||(d[g]=f++);return h=(function(b){var C,S;for(C in S={},b)S[b[C]]=C;return S})(d),u=Object.keys(h).sort(function(b,C){return b-C}),m=(function(){var b,C,S;for(S=[],b=0,C=u.length;b<C;b++)a=u[b],S.push(h[a]);return S})(),s=this.font.glyf.encode(A,m,d),l=this.font.loca.encode(s.offsets,m),y={cmap:this.font.cmap.raw(),glyf:s.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(y["OS/2"]=this.font.os2.raw()),this.font.directory.encode(y)},i})();ue.API.PDFObject=(function(){var i;function t(){}return i=function(e,r){return(Array(r+1).join("0")+e).slice(-r)},t.convert=function(e){var r,n,s,A;if(Array.isArray(e))return"["+(function(){var a,o,l;for(l=[],a=0,o=e.length;a<o;a++)r=e[a],l.push(t.convert(r));return l})().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+i(e.getUTCFullYear(),4)+i(e.getUTCMonth(),2)+i(e.getUTCDate(),2)+i(e.getUTCHours(),2)+i(e.getUTCMinutes(),2)+i(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(n in s=["<<"],e)A=e[n],s.push("/"+n+" "+t.convert(A));return s.push(">>"),s.join(`
|
|
217
|
-
`)}return""+e},t})();var sF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function W0(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}/*! https://mths.be/cssesc v3.0.0 by @mathias */var EB,Ik;function r9(){if(Ik)return EB;Ik=1;var i={},t=i.hasOwnProperty,e=function(a,o){if(!a)return o;var l={};for(var h in o)l[h]=t.call(a,h)?a[h]:o[h];return l},r=/[ -,\.\/:-@\[-\^`\{-~]/,n=/[ -,\.\/:-@\[\]\^`\{-~]/,s=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,A=function a(o,l){l=e(l,a.options),l.quotes!="single"&&l.quotes!="double"&&(l.quotes="single");for(var h=l.quotes=="double"?'"':"'",u=l.isIdentifier,f=o.charAt(0),d="",g=0,m=o.length;g<m;){var y=o.charAt(g++),w=y.charCodeAt(),b=void 0;if(w<32||w>126){if(w>=55296&&w<=56319&&g<m){var C=o.charCodeAt(g++);(C&64512)==56320?w=((w&1023)<<10)+(C&1023)+65536:g--}b="\\"+w.toString(16).toUpperCase()+" "}else l.escapeEverything?r.test(y)?b="\\"+y:b="\\"+w.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(y)?b="\\"+w.toString(16).toUpperCase()+" ":y=="\\"||!u&&(y=='"'&&h==y||y=="'"&&h==y)||u&&n.test(y)?b="\\"+y:b=y;d+=b}return u&&(/^-[-\d]/.test(d)?d="\\-"+d.slice(1):/\d/.test(f)&&(d="\\3"+f+" "+d.slice(1))),d=d.replace(s,function(S,k,I){return k&&k.length%2?S:(k||"")+I}),!u&&l.wrap?h+d+h:d};return A.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},A.version="3.0.0",EB=A,EB}var i9=r9();const GT=W0(i9);var kB,Qk;function n9(){if(Qk)return kB;Qk=1;var i=0,t=1,e=2,r=3,n=4,s=5,A=6,a=/[a-z0-9_-]/i,o=/[\s\t]/,l=function(f){for(var d=!0,g=i,m="",y=0,w,b,C=[];;){if(b=f[y],g===i){if(!b&&d)break;if(!b&&!d)throw new Error("Parse error");if(b==='"'||b==="'")w=b,g=t,d=!1;else if(!o.test(b))if(a.test(b))g=r,d=!1,y--;else throw new Error("Parse error")}else if(g===t)if(b)b==="\\"?g=e:b===w?(C.push(m),m="",g=n):m+=b;else throw new Error("Parse Error");else if(g===e)if(b===w||b==="\\")m+=b,g=t;else throw new Error("Parse error");else if(g===r)if(b)a.test(b)?m+=b:b===","?(C.push(m),m="",g=i):o.test(b)?g=s:b==="\\"&&(g=A);else{C.push(m);break}else if(g===A){if(/[0-9a-f]/i.test(b))throw new Error("Parse error");m+=b,g=r}else if(g===s)if(b){if(a.test(b))m+=" "+b,g=r;else if(b===",")C.push(m),m="",g=i;else if(!o.test(b))throw new Error("Parse error")}else{C.push(m);break}else if(g===n)if(b){if(b===",")g=i;else if(!o.test(b))throw new Error("Parse error")}else break;y++}return C},h=/[^a-z0-9_-]/i,u=function(f,d){var g=d&&d.quote||'"';if(g!=='"'&&g!=="'")throw new Error("Quote must be `'` or `\"`");for(var m=new RegExp(g,"g"),y=[],w=0;w<f.length;++w){var b=f[w];h.test(b)&&(b=b.replace(/\\/g,"\\\\").replace(m,"\\"+g),b=g+b+g),y.push(b)}return y.join(", ")};return kB={parse:l,stringify:u},kB}var s9=n9();const A9=W0(s9);var UB,Lk;function a9(){if(Lk)return UB;Lk=1;var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},t=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function e(d){return d===10||d===13||d===8232||d===8233||d===32||d===9||d===11||d===12||d===160||d>=5760&&t.indexOf(d)>=0}function r(d){switch(d|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function n(d){return(d|32)===97}function s(d){return d>=48&&d<=57}function A(d){return d>=48&&d<=57||d===43||d===45||d===46}function a(d){this.index=0,this.path=d,this.max=d.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function o(d){for(;d.index<d.max&&e(d.path.charCodeAt(d.index));)d.index++}function l(d){var g=d.path.charCodeAt(d.index);if(g===48){d.param=0,d.index++;return}if(g===49){d.param=1,d.index++;return}d.err="SvgPath: arc flag can be 0 or 1 only (at pos "+d.index+")"}function h(d){var g=d.index,m=g,y=d.max,w=!1,b=!1,C=!1,S=!1,k;if(m>=y){d.err="SvgPath: missed param (at pos "+m+")";return}if(k=d.path.charCodeAt(m),(k===43||k===45)&&(m++,k=m<y?d.path.charCodeAt(m):0),!s(k)&&k!==46){d.err="SvgPath: param should start with 0..9 or `.` (at pos "+m+")";return}if(k!==46){if(w=k===48,m++,k=m<y?d.path.charCodeAt(m):0,w&&m<y&&k&&s(k)){d.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+g+")";return}for(;m<y&&s(d.path.charCodeAt(m));)m++,b=!0;k=m<y?d.path.charCodeAt(m):0}if(k===46){for(S=!0,m++;s(d.path.charCodeAt(m));)m++,C=!0;k=m<y?d.path.charCodeAt(m):0}if(k===101||k===69){if(S&&!b&&!C){d.err="SvgPath: invalid float exponent (at pos "+m+")";return}if(m++,k=m<y?d.path.charCodeAt(m):0,(k===43||k===45)&&m++,m<y&&s(d.path.charCodeAt(m)))for(;m<y&&s(d.path.charCodeAt(m));)m++;else{d.err="SvgPath: invalid float exponent (at pos "+m+")";return}}d.index=m,d.param=parseFloat(d.path.slice(g,m))+0}function u(d){var g,m;g=d.path[d.segmentStart],m=g.toLowerCase();var y=d.data;if(m==="m"&&y.length>2&&(d.result.push([g,y[0],y[1]]),y=y.slice(2),m="l",g=g==="m"?"l":"L"),m==="r")d.result.push([g].concat(y));else for(;y.length>=i[m]&&(d.result.push([g].concat(y.splice(0,i[m]))),!!i[m]););}function f(d){var g=d.max,m,y,w,b,C;if(d.segmentStart=d.index,m=d.path.charCodeAt(d.index),y=n(m),!r(m)){d.err="SvgPath: bad command "+d.path[d.index]+" (at pos "+d.index+")";return}if(b=i[d.path[d.index].toLowerCase()],d.index++,o(d),d.data=[],!b){u(d);return}for(w=!1;;){for(C=b;C>0;C--){if(y&&(C===3||C===4)?l(d):h(d),d.err.length){u(d);return}d.data.push(d.param),o(d),w=!1,d.index<g&&d.path.charCodeAt(d.index)===44&&(d.index++,o(d),w=!0)}if(!w&&(d.index>=d.max||!A(d.path.charCodeAt(d.index))))break}u(d)}return UB=function(d){var g=new a(d),m=g.max;for(o(g);g.index<m&&!g.err.length;)f(g);return g.result.length&&("mM".indexOf(g.result[0][0])<0?(g.err="SvgPath: string should start with `M` or `m`",g.result=[]):g.result[0][0]="M"),{err:g.err,segments:g.result}},UB}var IB,_k;function zT(){if(_k)return IB;_k=1;function i(e,r){return[e[0]*r[0]+e[2]*r[1],e[1]*r[0]+e[3]*r[1],e[0]*r[2]+e[2]*r[3],e[1]*r[2]+e[3]*r[3],e[0]*r[4]+e[2]*r[5]+e[4],e[1]*r[4]+e[3]*r[5]+e[5]]}function t(){if(!(this instanceof t))return new t;this.queue=[],this.cache=null}return t.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},t.prototype.translate=function(e,r){return(e!==0||r!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,r])),this},t.prototype.scale=function(e,r){return(e!==1||r!==1)&&(this.cache=null,this.queue.push([e,0,0,r,0,0])),this},t.prototype.rotate=function(e,r,n){var s,A,a;return e!==0&&(this.translate(r,n),s=e*Math.PI/180,A=Math.cos(s),a=Math.sin(s),this.queue.push([A,a,-a,A,0,0]),this.cache=null,this.translate(-r,-n)),this},t.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},t.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},t.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=i(this.cache,this.queue[e]);return this.cache},t.prototype.calc=function(e,r,n){var s;return this.queue.length?(this.cache||(this.cache=this.toArray()),s=this.cache,[e*s[0]+r*s[2]+(n?0:s[4]),e*s[1]+r*s[3]+(n?0:s[5])]):[e,r]},IB=t,IB}var QB,Mk;function o9(){if(Mk)return QB;Mk=1;var i=zT(),t={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},e=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,r=/[\s,]+/;return QB=function(n){var s=new i,A,a;return n.split(e).forEach(function(o){if(o.length){if(typeof t[o]<"u"){A=o;return}switch(a=o.split(r).map(function(l){return+l||0}),A){case"matrix":a.length===6&&s.matrix(a);return;case"scale":a.length===1?s.scale(a[0],a[0]):a.length===2&&s.scale(a[0],a[1]);return;case"rotate":a.length===1?s.rotate(a[0],0,0):a.length===3&&s.rotate(a[0],a[1],a[2]);return;case"translate":a.length===1?s.translate(a[0],0):a.length===2&&s.translate(a[0],a[1]);return;case"skewX":a.length===1&&s.skewX(a[0]);return;case"skewY":a.length===1&&s.skewY(a[0]);return}}}),s},QB}var LB,Tk;function l9(){if(Tk)return LB;Tk=1;var i=Math.PI*2;function t(n,s,A,a){var o=n*a-s*A<0?-1:1,l=n*A+s*a;return l>1&&(l=1),l<-1&&(l=-1),o*Math.acos(l)}function e(n,s,A,a,o,l,h,u,f,d){var g=d*(n-A)/2+f*(s-a)/2,m=-f*(n-A)/2+d*(s-a)/2,y=h*h,w=u*u,b=g*g,C=m*m,S=y*w-y*C-w*b;S<0&&(S=0),S/=y*C+w*b,S=Math.sqrt(S)*(o===l?-1:1);var k=S*h/u*m,I=S*-u/h*g,N=d*k-f*I+(n+A)/2,D=f*k+d*I+(s+a)/2,Q=(g-k)/h,K=(m-I)/u,L=(-g-k)/h,O=(-m-I)/u,W=t(1,0,Q,K),R=t(Q,K,L,O);return l===0&&R>0&&(R-=i),l===1&&R<0&&(R+=i),[N,D,W,R]}function r(n,s){var A=1.3333333333333333*Math.tan(s/4),a=Math.cos(n),o=Math.sin(n),l=Math.cos(n+s),h=Math.sin(n+s);return[a,o,a-o*A,o+a*A,l+h*A,h-l*A,l,h]}return LB=function(n,s,A,a,o,l,h,u,f){var d=Math.sin(f*i/360),g=Math.cos(f*i/360),m=g*(n-A)/2+d*(s-a)/2,y=-d*(n-A)/2+g*(s-a)/2;if(m===0&&y===0)return[];if(h===0||u===0)return[];h=Math.abs(h),u=Math.abs(u);var w=m*m/(h*h)+y*y/(u*u);w>1&&(h*=Math.sqrt(w),u*=Math.sqrt(w));var b=e(n,s,A,a,o,l,h,u,d,g),C=[],S=b[2],k=b[3],I=Math.max(Math.ceil(Math.abs(k)/(i/4)),1);k/=I;for(var N=0;N<I;N++)C.push(r(S,k)),S+=k;return C.map(function(D){for(var Q=0;Q<D.length;Q+=2){var K=D[Q+0],L=D[Q+1];K*=h,L*=u;var O=g*K-d*L,W=d*K+g*L;D[Q+0]=O+b[0],D[Q+1]=W+b[1]}return D})},LB}var _B,Nk;function h9(){if(Nk)return _B;Nk=1;var i=1e-10,t=Math.PI/180;function e(r,n,s){if(!(this instanceof e))return new e(r,n,s);this.rx=r,this.ry=n,this.ax=s}return e.prototype.transform=function(r){var n=Math.cos(this.ax*t),s=Math.sin(this.ax*t),A=[this.rx*(r[0]*n+r[2]*s),this.rx*(r[1]*n+r[3]*s),this.ry*(-r[0]*s+r[2]*n),this.ry*(-r[1]*s+r[3]*n)],a=A[0]*A[0]+A[2]*A[2],o=A[1]*A[1]+A[3]*A[3],l=((A[0]-A[3])*(A[0]-A[3])+(A[2]+A[1])*(A[2]+A[1]))*((A[0]+A[3])*(A[0]+A[3])+(A[2]-A[1])*(A[2]-A[1])),h=(a+o)/2;if(l<i*h)return this.rx=this.ry=Math.sqrt(h),this.ax=0,this;var u=A[0]*A[1]+A[2]*A[3];l=Math.sqrt(l);var f=h+l/2,d=h-l/2;return this.ax=Math.abs(u)<i&&Math.abs(f-o)<i?90:Math.atan(Math.abs(u)>Math.abs(f-o)?(f-a)/u:u/(f-o))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(f),this.ry=Math.sqrt(d)):(this.ax+=90,this.rx=Math.sqrt(d),this.ry=Math.sqrt(f)),this},e.prototype.isDegenerate=function(){return this.rx<i*this.ry||this.ry<i*this.rx},_B=e,_B}var MB,Pk;function c9(){if(Pk)return MB;Pk=1;var i=a9(),t=o9(),e=zT(),r=l9(),n=h9();function s(A){if(!(this instanceof s))return new s(A);var a=i(A);this.segments=a.segments,this.err=a.err,this.__stack=[]}return s.from=function(A){if(typeof A=="string")return new s(A);if(A instanceof s){var a=new s("");return a.err=A.err,a.segments=A.segments.map(function(o){return o.slice()}),a.__stack=A.__stack.map(function(o){return e().matrix(o.toArray())}),a}throw new Error("SvgPath.from: invalid param type "+A)},s.prototype.__matrix=function(A){var a=this,o;A.queue.length&&this.iterate(function(l,h,u,f){var d,g,m,y;switch(l[0]){case"v":d=A.calc(0,l[1],!0),g=d[0]===0?["v",d[1]]:["l",d[0],d[1]];break;case"V":d=A.calc(u,l[1],!1),g=d[0]===A.calc(u,f,!1)[0]?["V",d[1]]:["L",d[0],d[1]];break;case"h":d=A.calc(l[1],0,!0),g=d[1]===0?["h",d[0]]:["l",d[0],d[1]];break;case"H":d=A.calc(l[1],f,!1),g=d[1]===A.calc(u,f,!1)[1]?["H",d[0]]:["L",d[0],d[1]];break;case"a":case"A":var w=A.toArray(),b=n(l[1],l[2],l[3]).transform(w);if(w[0]*w[3]-w[1]*w[2]<0&&(l[5]=l[5]?"0":"1"),d=A.calc(l[6],l[7],l[0]==="a"),l[0]==="A"&&l[6]===u&&l[7]===f||l[0]==="a"&&l[6]===0&&l[7]===0){g=[l[0]==="a"?"l":"L",d[0],d[1]];break}b.isDegenerate()?g=[l[0]==="a"?"l":"L",d[0],d[1]]:g=[l[0],b.rx,b.ry,b.ax,l[4],l[5],d[0],d[1]];break;case"m":y=h>0,d=A.calc(l[1],l[2],y),g=["m",d[0],d[1]];break;default:for(m=l[0],g=[m],y=m.toLowerCase()===m,o=1;o<l.length;o+=2)d=A.calc(l[o],l[o+1],y),g.push(d[0],d[1])}a.segments[h]=g},!0)},s.prototype.__evaluateStack=function(){var A,a;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(A=e(),a=this.__stack.length;--a>=0;)A.matrix(this.__stack[a].toArray());this.__matrix(A),this.__stack=[]}},s.prototype.toString=function(){var A="",a="",o=!1;this.__evaluateStack();for(var l=0,h=this.segments.length;l<h;l++){var u=this.segments[l],f=u[0];f!==a||f==="m"||f==="M"?(f==="m"&&a==="z"&&(A+=" "),A+=f,o=!1):o=!0;for(var d=1;d<u.length;d++){var g=u[d];d===1?o&&g>=0&&(A+=" "):g>=0&&(A+=" "),A+=g}a=f}return A},s.prototype.translate=function(A,a){return this.__stack.push(e().translate(A,a||0)),this},s.prototype.scale=function(A,a){return this.__stack.push(e().scale(A,!a&&a!==0?A:a)),this},s.prototype.rotate=function(A,a,o){return this.__stack.push(e().rotate(A,a||0,o||0)),this},s.prototype.skewX=function(A){return this.__stack.push(e().skewX(A)),this},s.prototype.skewY=function(A){return this.__stack.push(e().skewY(A)),this},s.prototype.matrix=function(A){return this.__stack.push(e().matrix(A)),this},s.prototype.transform=function(A){return A.trim()?(this.__stack.push(t(A)),this):this},s.prototype.round=function(A){var a=0,o=0,l=0,h=0,u;return A=A||0,this.__evaluateStack(),this.segments.forEach(function(f){var d=f[0].toLowerCase()===f[0];switch(f[0]){case"H":case"h":d&&(f[1]+=l),l=f[1]-f[1].toFixed(A),f[1]=+f[1].toFixed(A);return;case"V":case"v":d&&(f[1]+=h),h=f[1]-f[1].toFixed(A),f[1]=+f[1].toFixed(A);return;case"Z":case"z":l=a,h=o;return;case"M":case"m":d&&(f[1]+=l,f[2]+=h),l=f[1]-f[1].toFixed(A),h=f[2]-f[2].toFixed(A),a=l,o=h,f[1]=+f[1].toFixed(A),f[2]=+f[2].toFixed(A);return;case"A":case"a":d&&(f[6]+=l,f[7]+=h),l=f[6]-f[6].toFixed(A),h=f[7]-f[7].toFixed(A),f[1]=+f[1].toFixed(A),f[2]=+f[2].toFixed(A),f[3]=+f[3].toFixed(A+2),f[6]=+f[6].toFixed(A),f[7]=+f[7].toFixed(A);return;default:u=f.length,d&&(f[u-2]+=l,f[u-1]+=h),l=f[u-2]-f[u-2].toFixed(A),h=f[u-1]-f[u-1].toFixed(A),f.forEach(function(g,m){m&&(f[m]=+f[m].toFixed(A))});return}}),this},s.prototype.iterate=function(A,a){var o=this.segments,l={},h=!1,u=0,f=0,d=0,g=0,m,y,w;if(a||this.__evaluateStack(),o.forEach(function(b,C){var S=A(b,C,u,f);Array.isArray(S)&&(l[C]=S,h=!0);var k=b[0]===b[0].toLowerCase();switch(b[0]){case"m":case"M":u=b[1]+(k?u:0),f=b[2]+(k?f:0),d=u,g=f;return;case"h":case"H":u=b[1]+(k?u:0);return;case"v":case"V":f=b[1]+(k?f:0);return;case"z":case"Z":u=d,f=g;return;default:u=b[b.length-2]+(k?u:0),f=b[b.length-1]+(k?f:0)}}),!h)return this;for(w=[],m=0;m<o.length;m++)if(typeof l[m]<"u")for(y=0;y<l[m].length;y++)w.push(l[m][y]);else w.push(o[m]);return this.segments=w,this},s.prototype.abs=function(){return this.iterate(function(A,a,o,l){var h=A[0],u=h.toUpperCase(),f;if(h!==u)switch(A[0]=u,h){case"v":A[1]+=l;return;case"a":A[6]+=o,A[7]+=l;return;default:for(f=1;f<A.length;f++)A[f]+=f%2?o:l}},!0),this},s.prototype.rel=function(){return this.iterate(function(A,a,o,l){var h=A[0],u=h.toLowerCase(),f;if(h!==u&&!(a===0&&h==="M"))switch(A[0]=u,h){case"V":A[1]-=l;return;case"A":A[6]-=o,A[7]-=l;return;default:for(f=1;f<A.length;f++)A[f]-=f%2?o:l}},!0),this},s.prototype.unarc=function(){return this.iterate(function(A,a,o,l){var h,u,f,d=[],g=A[0];return g!=="A"&&g!=="a"?null:(g==="a"?(u=o+A[6],f=l+A[7]):(u=A[6],f=A[7]),h=r(o,l,u,f,A[4],A[5],A[1],A[2],A[3]),h.length===0?[[A[0]==="a"?"l":"L",A[6],A[7]]]:(h.forEach(function(m){d.push(["C",m[2],m[3],m[4],m[5],m[6],m[7]])}),d))}),this},s.prototype.unshort=function(){var A=this.segments,a,o,l,h,u;return this.iterate(function(f,d,g,m){var y=f[0],w=y.toUpperCase(),b;d&&(w==="T"?(b=y==="t",l=A[d-1],l[0]==="Q"?(a=l[1]-g,o=l[2]-m):l[0]==="q"?(a=l[1]-l[3],o=l[2]-l[4]):(a=0,o=0),h=-a,u=-o,b||(h+=g,u+=m),A[d]=[b?"q":"Q",h,u,f[1],f[2]]):w==="S"&&(b=y==="s",l=A[d-1],l[0]==="C"?(a=l[3]-g,o=l[4]-m):l[0]==="c"?(a=l[3]-l[5],o=l[4]-l[6]):(a=0,o=0),h=-a,u=-o,b||(h+=g,u+=m),A[d]=[b?"c":"C",h,u,f[1],f[2],f[3],f[4]]))}),this},MB=s,MB}var Dk,Ok;function u9(){return Ok||(Ok=1,Dk=c9()),Dk}var d9=u9();const f9=W0(d9);var Rk=function(i){var t=i,e,r={a:0,b:0,c:0},n=[],s=/(\[[^\]]+\])/g,A=/(#[^\#\s\+>~\.\[:\)]+)/g,a=/(\.[^\s\+>~\.\[:\)]+)/g,o=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:(?!not|global|local)[\w-]+\([^\)]*\))/gi,h=/(:(?!not|global|local)[^\s\+>~\.\[:]+)/g,u=/([^\s\+>~\.\[:]+)/g;return e=function(f,d){var g,m,y,w,b,C;if(f.test(t))for(g=t.match(f),m=0,y=g.length;m<y;m+=1)r[d]+=1,w=g[m],b=t.indexOf(w),C=w.length,n.push({selector:i.substr(b,C),type:d,index:b,length:C}),t=t.replace(w,Array(C+1).join(" "))},(function(){var f=function(y){var w,b,C,S;if(y.test(t))for(w=t.match(y),b=0,C=w.length;b<C;b+=1)S=w[b],t=t.replace(S,Array(S.length+1).join("A"))},d=/\\[0-9A-Fa-f]{6}\s?/g,g=/\\[0-9A-Fa-f]{1,5}\s/g,m=/\\./g;f(d),f(g),f(m)})(),(function(){var f=/{[^]*/gm,d,g,m,y;if(f.test(t))for(d=t.match(f),g=0,m=d.length;g<m;g+=1)y=d[g],t=t.replace(y,Array(y.length+1).join(" "))})(),e(s,"b"),e(A,"a"),e(a,"b"),e(o,"c"),e(l,"b"),e(h,"b"),t=t.replace(/[\*\s\+>~]/g," "),t=t.replace(/[#\.]/g," "),t=t.replace(/:not/g," "),t=t.replace(/:local/g," "),t=t.replace(/:global/g," "),t=t.replace(/[\(\)]/g," "),e(u,"c"),n.sort(function(f,d){return f.index-d.index}),{selector:i,specificity:"0,"+r.a.toString()+","+r.b.toString()+","+r.c.toString(),specificityArray:[0,r.a,r.b,r.c],parts:n}},p9=function(i,t){var e,r,n;if(typeof i=="string"){if(i.indexOf(",")!==-1)throw"Invalid CSS selector";e=Rk(i).specificityArray}else if(Array.isArray(i)){if(i.filter(function(s){return typeof s=="number"}).length!==4)throw"Invalid specificity array";e=i}else throw"Invalid CSS selector or specificity array";if(typeof t=="string"){if(t.indexOf(",")!==-1)throw"Invalid CSS selector";r=Rk(t).specificityArray}else if(Array.isArray(t)){if(t.filter(function(s){return typeof s=="number"}).length!==4)throw"Invalid specificity array";r=t}else throw"Invalid CSS selector or specificity array";for(n=0;n<4;n+=1){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1}return 0},AF=function(i,t){return AF=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])},AF(i,t)};function ur(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=i}AF(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var xv=function(){return xv=Object.assign||function(i){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i},xv.apply(this,arguments)};function yr(i,t,e,r){return new(e||(e=Promise))((function(n,s){function A(l){try{o(r.next(l))}catch(h){s(h)}}function a(l){try{o(r.throw(l))}catch(h){s(h)}}function o(l){var h;l.done?n(l.value):(h=l.value,h instanceof e?h:new e((function(u){u(h)}))).then(A,a)}o((r=r.apply(i,t||[])).next())}))}function br(i,t){var e,r,n,s,A={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(l){return(function(h){if(e)throw new TypeError("Generator is already executing.");for(;A;)try{if(e=1,r&&(n=2&h[0]?r.return:h[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,h[1])).done)return n;switch(r=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return A.label++,{value:h[1],done:!1};case 5:A.label++,r=h[1],h=[0];continue;case 7:h=A.ops.pop(),A.trys.pop();continue;default:if(n=A.trys,!((n=n.length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){A=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){A.label=h[1];break}if(h[0]===6&&A.label<n[1]){A.label=n[1],n=h;break}if(n&&A.label<n[2]){A.label=n[2],A.ops.push(h);break}n[2]&&A.ops.pop(),A.trys.pop();continue}h=t.call(i,A)}catch(u){h=[6,u],r=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}})([o,l])}}}var ca=(function(){function i(t){if(this.a=void 0,this.r=0,this.g=0,this.b=0,this.simpleColors={},this.colorDefs=[],this.ok=!1,t){for(var e in t.charAt(0)=="#"&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase(),this.simpleColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},this.simpleColors)t==e&&(t=this.simpleColors[e]);this.colorDefs=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^rgb\(([0-9.]+)%,\s*([0-9.]+)%,\s*([0-9.]+)%\)$/,example:["rgb(50.5%, 25.75%, 75.5%)","rgb(100%,0%,0%)"],process:function(o){return[Math.round(2.55*parseFloat(o[1])),Math.round(2.55*parseFloat(o[2])),Math.round(2.55*parseFloat(o[3]))]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}];for(var r=0;r<this.colorDefs.length;r++){var n=this.colorDefs[r].re,s=this.colorDefs[r].process,A=n.exec(t);if(A){var a=s(A);this.r=a[0],this.g=a[1],this.b=a[2],this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b}}return i.prototype.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},i.prototype.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+(this.a||"1")+")"},i.prototype.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return t.length==1&&(t="0"+t),e.length==1&&(e="0"+e),r.length==1&&(r="0"+r),"#"+t+e+r},i.prototype.getHelpXML=function(){for(var t=[],e=0;e<this.colorDefs.length;e++)for(var r=this.colorDefs[e].example,n=0;n<r.length;n++)t[t.length]=r[n];for(var s in this.simpleColors)t[t.length]=s;var A=document.createElement("ul");for(A.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var a=document.createElement("li"),o=new i(t[e]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex(),l.appendChild(document.createTextNode("test"));var h=document.createTextNode(" "+t[e]+" -> "+o.toRGB()+" -> "+o.toHex());a.appendChild(l),a.appendChild(h),A.appendChild(a)}catch{}return A},i})(),Bn=(function(){function i(t){this.color=t}return i.prototype.getFillData=function(t,e){return yr(this,void 0,void 0,(function(){return br(this,(function(r){return[2,void 0]}))}))},i})(),bp=(function(){function i(){this.xmlSpace="",this.whiteSpace="",this.fill=null,this.fillOpacity=1,this.fontFamily="",this.fontSize=16,this.fontStyle="",this.fontWeight="",this.opacity=1,this.stroke=null,this.strokeDasharray=null,this.strokeDashoffset=0,this.strokeLinecap="",this.strokeLinejoin="",this.strokeMiterlimit=4,this.strokeOpacity=1,this.strokeWidth=1,this.alignmentBaseline="",this.textAnchor="",this.visibility="",this.color=null,this.contextFill=null,this.contextStroke=null,this.fillRule=null}return i.prototype.clone=function(){var t=new i;return t.xmlSpace=this.xmlSpace,t.whiteSpace=this.whiteSpace,t.fill=this.fill,t.fillOpacity=this.fillOpacity,t.fontFamily=this.fontFamily,t.fontSize=this.fontSize,t.fontStyle=this.fontStyle,t.fontWeight=this.fontWeight,t.opacity=this.opacity,t.stroke=this.stroke,t.strokeDasharray=this.strokeDasharray,t.strokeDashoffset=this.strokeDashoffset,t.strokeLinecap=this.strokeLinecap,t.strokeLinejoin=this.strokeLinejoin,t.strokeMiterlimit=this.strokeMiterlimit,t.strokeOpacity=this.strokeOpacity,t.strokeWidth=this.strokeWidth,t.textAnchor=this.textAnchor,t.alignmentBaseline=this.alignmentBaseline,t.visibility=this.visibility,t.color=this.color,t.fillRule=this.fillRule,t.contextFill=this.contextFill,t.contextStroke=this.contextStroke,t},i.default=function(){var t=new i;return t.xmlSpace="default",t.whiteSpace="normal",t.fill=new Bn(new ca("rgb(0, 0, 0)")),t.fillOpacity=1,t.fontFamily="times",t.fontSize=16,t.fontStyle="normal",t.fontWeight="normal",t.opacity=1,t.stroke=null,t.strokeDasharray=null,t.strokeDashoffset=0,t.strokeLinecap="butt",t.strokeLinejoin="miter",t.strokeMiterlimit=4,t.strokeOpacity=1,t.strokeWidth=1,t.alignmentBaseline="baseline",t.textAnchor="start",t.visibility="visible",t.color=new ca("rgb(0, 0, 0)"),t.fillRule="nonzero",t.contextFill=null,t.contextStroke=null,t},i.getContextColors=function(t,e){e===void 0&&(e=!1);var r={};return t.attributeState.contextFill&&(r.contextFill=t.attributeState.contextFill),t.attributeState.contextStroke&&(r.contextStroke=t.attributeState.contextStroke),e&&t.attributeState.color&&(r.color=t.attributeState.color),r},i})(),Gh=(function(){function i(t,e){var r,n,s;this.pdf=t,this.svg2pdfParameters=e.svg2pdfParameters,this.attributeState=e.attributeState?e.attributeState.clone():bp.default(),this.viewport=e.viewport,this.refsHandler=e.refsHandler,this.styleSheets=e.styleSheets,this.textMeasure=e.textMeasure,this.transform=(r=e.transform)!==null&&r!==void 0?r:this.pdf.unitMatrix,this.withinClipPath=(n=e.withinClipPath)!==null&&n!==void 0&&n,this.withinUse=(s=e.withinUse)!==null&&s!==void 0&&s}return i.prototype.clone=function(t){var e,r,n,s;return t===void 0&&(t={}),new i(this.pdf,{svg2pdfParameters:this.svg2pdfParameters,attributeState:t.attributeState?t.attributeState.clone():this.attributeState.clone(),viewport:(e=t.viewport)!==null&&e!==void 0?e:this.viewport,refsHandler:this.refsHandler,styleSheets:this.styleSheets,textMeasure:this.textMeasure,transform:(r=t.transform)!==null&&r!==void 0?r:this.transform,withinClipPath:(n=t.withinClipPath)!==null&&n!==void 0?n:this.withinClipPath,withinUse:(s=t.withinUse)!==null&&s!==void 0?s:this.withinUse})},i})(),qT=(function(){function i(t){this.renderedElements={},this.idMap=t,this.idPrefix=String(i.instanceCounter++)}return i.prototype.getRendered=function(t,e,r){return yr(this,void 0,void 0,(function(){var n,s;return br(this,(function(A){switch(A.label){case 0:return n=this.generateKey(t,e),this.renderedElements.hasOwnProperty(n)?[2,this.renderedElements[t]]:(s=this.get(t),this.renderedElements[n]=s,[4,r(s)]);case 1:return A.sent(),[2,s]}}))}))},i.prototype.get=function(t){return this.idMap[GT(t,{isIdentifier:!0})]},i.prototype.generateKey=function(t,e){var r="";return e&&(r=["color","contextFill","contextStroke"].map((function(n){var s,A;return(A=(s=e[n])===null||s===void 0?void 0:s.toRGBA())!==null&&A!==void 0?A:""})).join("|")),this.idPrefix+"|"+t+"|"+r},i.instanceCounter=0,i})();function Hk(i,t){return Math.atan2(t[1]-i[1],t[0]-i[0])}var Vk=2/3;function Wk(i,t){return[Vk*(t[0]-i[0])+i[0],Vk*(t[1]-i[1])+i[1]]}function gg(i){var t=Math.sqrt(i[0]*i[0]+i[1]*i[1]);return[i[0]/t,i[1]/t]}function gd(i,t){return gg([t[0]-i[0],t[1]-i[1]])}function z1(i,t){return[i[0]+t[0],i[1]+t[1]]}function TB(i,t){var e=i[0],r=i[1];return[t.a*e+t.c*r+t.e,t.b*e+t.d*r+t.f]}var Bp=(function(){function i(){this.segments=[]}return i.prototype.moveTo=function(t,e){return this.segments.push(new tn(t,e)),this},i.prototype.lineTo=function(t,e){return this.segments.push(new mh(t,e)),this},i.prototype.curveTo=function(t,e,r,n,s,A){return this.segments.push(new Za(t,e,r,n,s,A)),this},i.prototype.close=function(){return this.segments.push(new aF),this},i.prototype.transform=function(t){this.segments.forEach((function(e){if(e instanceof tn||e instanceof mh||e instanceof Za){var r=TB([e.x,e.y],t);e.x=r[0],e.y=r[1]}if(e instanceof Za){var n=TB([e.x1,e.y1],t),s=TB([e.x2,e.y2],t);e.x1=n[0],e.y1=n[1],e.x2=s[0],e.y2=s[1]}}))},i.prototype.draw=function(t){var e=t.pdf;this.segments.forEach((function(r){r instanceof tn?e.moveTo(r.x,r.y):r instanceof mh?e.lineTo(r.x,r.y):r instanceof Za?e.curveTo(r.x1,r.y1,r.x2,r.y2,r.x,r.y):e.close()}))},i})(),tn=function(i,t){this.x=i,this.y=t},mh=function(i,t){this.x=i,this.y=t},Za=function(i,t,e,r,n,s){this.x1=i,this.y1=t,this.x2=e,this.y2=r,this.x=n,this.y=s},aF=function(){};function Vh(i,t){return t.split(",").indexOf((i.nodeName||i.tagName).toLowerCase())>=0}function _t(i,t,e,r){var n;r===void 0&&(r=e);var s=(n=i.style)===null||n===void 0?void 0:n.getPropertyValue(r);if(s)return s;var A=t.getPropertyValue(i,r);return A||i.hasAttribute(e)&&i.getAttribute(e)||void 0}function bl(i,t,e){if(_t(i.element,e.styleSheets,"display")==="none")return!1;var r=t,n=_t(i.element,e.styleSheets,"visibility");return n&&(r=n!=="hidden"),r}function zh(i,t,e){var r=bl(i,t,e);return i.element.childNodes.length!==0&&(i.children.forEach((function(n){n.isVisible(r,e)&&(r=!0)})),r)}var g9=(function(){function i(){this.markers=[]}return i.prototype.addMarker=function(t){this.markers.push(t)},i.prototype.draw=function(t){return yr(this,void 0,void 0,(function(){var e,r,n,s,A,a,o,l;return br(this,(function(h){switch(h.label){case 0:e=0,h.label=1;case 1:return e<this.markers.length?(r=this.markers[e],n=void 0,s=r.angle,A=r.anchor,a=Math.cos(s),o=Math.sin(s),n=t.pdf.Matrix(a,o,-o,a,A[0],A[1]),n=t.pdf.matrixMult(t.pdf.Matrix(t.attributeState.strokeWidth,0,0,t.attributeState.strokeWidth,0,0),n),n=t.pdf.matrixMult(n,t.transform),t.pdf.saveGraphicsState(),l=bp.getContextColors(t),[4,t.refsHandler.getRendered(r.id,l,(function(u){return u.apply(t)}))]):[3,4];case 2:h.sent(),t.pdf.doFormObject(t.refsHandler.generateKey(r.id,l),n),t.pdf.restoreGraphicsState(),h.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},i})(),Rl=function(i,t,e,r){r===void 0&&(r=!1),this.id=i,this.anchor=t,this.angle=e,this.isStartMarker=r},QS=/url\(["']?#([^"']+)["']?\)/,m9={bottom:"bottom","text-bottom":"bottom",top:"top","text-top":"top",hanging:"hanging",middle:"middle",central:"middle",center:"middle",mathematical:"middle",ideographic:"ideographic",alphabetic:"alphabetic",baseline:"alphabetic"},jk="http://www.w3.org/2000/svg";function el(i,t){var e;return(e=i&&i.toString().match(/^([\-0-9.]+)em$/))?parseFloat(e[1])*t:(e=i&&i.toString().match(/^([\-0-9.]+)(px|)$/))?parseFloat(e[1]):0}function XT(i){return m9[i]||"alphabetic"}function MA(i){for(var t,e=[],r=/[+-]?(?:(?:\d+\.?\d*)|(?:\d*\.?\d+))(?:[eE][+-]?\d+)?/g;t=r.exec(i);)e.push(parseFloat(t[0]));return e}function np(i,t){if(i==="transparent"){var e=new ca("rgb(0,0,0)");return e.a=0,e}if(t&&i.toLowerCase()==="currentcolor")return t.color||new ca("rgb(0,0,0)");if(t&&i.toLowerCase()==="context-stroke")return t.contextStroke||new ca("rgb(0,0,0)");if(t&&i.toLowerCase()==="context-fill")return t.contextFill||new ca("rgb(0,0,0)");var r=/\s*rgba\(((?:[^,\)]*,){3}[^,\)]*)\)\s*/.exec(i);if(r){var n=MA(r[1]),s=new ca("rgb("+n.slice(0,3).join(",")+")");return s.a=n[3],s}return new ca(i)}var dl={"sans-serif":"helvetica",verdana:"helvetica",arial:"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",serif:"times",cursive:"times",fantasy:"times"},NB,w9=(NB=ue.version.split("."),parseFloat(NB[0])===2&&parseFloat(NB[1])===3);function YT(i,t){return w9?t==400?i=="italic"?"italic":"normal":t==700&&i!=="italic"?"bold":i+""+t:t==400||t==="normal"?i==="italic"?"italic":"normal":t!=700&&t!=="bold"||i!=="normal"?(t==700?"bold":t)+""+i:"bold"}function LS(i,t){if(_t(t.element,i.styleSheets,"display")==="none")return[0,0,0,0];var e=[];return t.children.forEach((function(r){var n=r.getBoundingBox(i);if(n[0]!==0||n[1]!==0||n[2]!==0||n[3]!==0){var s=r.computeNodeTransform(i);n[0]=n[0]*s.sx+s.tx,n[1]=n[1]*s.sy+s.ty,n[2]=n[2]*s.sx,n[3]=n[3]*s.sy,e=e.length===0?n:[Math.min(e[0],n[0]),Math.min(e[1],n[1]),Math.max(e[0]+e[2],n[0]+n[2])-Math.min(e[0],n[0]),Math.max(e[1]+e[3],n[1]+n[3])-Math.min(e[1],n[1])]}})),e.length===0?[0,0,0,0]:e}function j0(i,t){var e=parseFloat,r=e(i.getAttribute("x1"))||e(_t(i,t.styleSheets,"x"))||e(_t(i,t.styleSheets,"cx"))-e(_t(i,t.styleSheets,"r"))||0,n=e(i.getAttribute("x2"))||r+e(_t(i,t.styleSheets,"width"))||e(_t(i,t.styleSheets,"cx"))+e(_t(i,t.styleSheets,"r"))||0,s=e(i.getAttribute("y1"))||e(_t(i,t.styleSheets,"y"))||e(_t(i,t.styleSheets,"cy"))-e(_t(i,t.styleSheets,"r"))||0,A=e(i.getAttribute("y2"))||s+e(_t(i,t.styleSheets,"height"))||e(_t(i,t.styleSheets,"cy"))+e(_t(i,t.styleSheets,"r"))||0;return[Math.min(r,n),Math.min(s,A),Math.max(r,n)-Math.min(r,n),Math.max(s,A)-Math.min(s,A)]}function K0(i,t,e,r,n,s,A,a){a===void 0&&(a=!1);var o,l,h=t[0],u=t[1],f=t[2],d=t[3],g=n/f,m=s/d,y=i.getAttribute("preserveAspectRatio");if(y){var w=y.split(" ");w[0]==="defer"&&(w=w.slice(1)),o=w[0],l=w[1]||"meet"}else o="xMidYMid",l="meet";if(o!=="none"&&(l==="meet"?g=m=Math.min(g,m):l==="slice"&&(g=m=Math.max(g,m))),a)return A.pdf.Matrix(g,0,0,m,0,0);var b=e-h*g,C=r-u*m;o.indexOf("xMid")>=0?b+=(n-f*g)/2:o.indexOf("xMax")>=0&&(b+=n-f*g),o.indexOf("YMid")>=0?C+=(s-d*m)/2:o.indexOf("YMax")>=0&&(C+=s-d*m);var S=A.pdf.Matrix(1,0,0,1,b,C),k=A.pdf.Matrix(g,0,0,m,0,0);return A.pdf.matrixMult(k,S)}function Ly(i,t){if(!i||i==="none")return t.pdf.unitMatrix;for(var e,r,n=/^[\s,]*matrix\(([^)]+)\)\s*/,s=/^[\s,]*translate\(([^)]+)\)\s*/,A=/^[\s,]*rotate\(([^)]+)\)\s*/,a=/^[\s,]*scale\(([^)]+)\)\s*/,o=/^[\s,]*skewX\(([^)]+)\)\s*/,l=/^[\s,]*skewY\(([^)]+)\)\s*/,h=t.pdf.unitMatrix;i.length>0&&i.length!==r;){r=i.length;var u=n.exec(i);if(u&&(e=MA(u[1]),h=t.pdf.matrixMult(t.pdf.Matrix(e[0],e[1],e[2],e[3],e[4],e[5]),h),i=i.substr(u[0].length)),u=A.exec(i)){e=MA(u[1]);var f=Math.PI*e[0]/180;if(h=t.pdf.matrixMult(t.pdf.Matrix(Math.cos(f),Math.sin(f),-Math.sin(f),Math.cos(f),0,0),h),e[1]||e[2]){var d=t.pdf.Matrix(1,0,0,1,e[1],e[2]),g=t.pdf.Matrix(1,0,0,1,-e[1],-e[2]);h=t.pdf.matrixMult(g,t.pdf.matrixMult(h,d))}i=i.substr(u[0].length)}(u=s.exec(i))&&(e=MA(u[1]),h=t.pdf.matrixMult(t.pdf.Matrix(1,0,0,1,e[0],e[1]||0),h),i=i.substr(u[0].length)),(u=a.exec(i))&&((e=MA(u[1]))[1]||(e[1]=e[0]),h=t.pdf.matrixMult(t.pdf.Matrix(e[0],0,0,e[1],0,0),h),i=i.substr(u[0].length)),(u=o.exec(i))&&(e=parseFloat(u[1]),e*=Math.PI/180,h=t.pdf.matrixMult(t.pdf.Matrix(1,0,Math.tan(e),1,0,0),h),i=i.substr(u[0].length)),(u=l.exec(i))&&(e=parseFloat(u[1]),e*=Math.PI/180,h=t.pdf.matrixMult(t.pdf.Matrix(1,Math.tan(e),0,1,0,0),h),i=i.substr(u[0].length))}return h}var _S=(function(){function i(t,e){this.element=t,this.children=e,this.parent=null}return i.prototype.setParent=function(t){this.parent=t},i.prototype.getParent=function(){return this.parent},i.prototype.getBoundingBox=function(t){return _t(this.element,t.styleSheets,"display")==="none"?[0,0,0,0]:this.getBoundingBoxCore(t)},i.prototype.computeNodeTransform=function(t){var e=this.computeNodeTransformCore(t),r=_t(this.element,t.styleSheets,"transform");return r?t.pdf.matrixMult(e,Ly(r,t)):e},i})(),G0=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.render=function(e){return Promise.resolve()},t.prototype.getBoundingBoxCore=function(e){return[]},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t})(_S),$T=(function(i){function t(e,r,n){var s=i.call(this,r,n)||this;return s.pdfGradientType=e,s.contextColor=void 0,s}return ur(t,i),t.prototype.apply=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a,o;return br(this,(function(l){return(r=this.element.getAttribute("id"))?(n=this.getStops(e.styleSheets),s=0,A=!1,n.forEach((function(h){var u=h.opacity;u&&u!==1&&(s+=u,A=!0)})),A&&(a=new Tu({opacity:s/n.length})),o=new gh(this.pdfGradientType,this.getCoordinates(),n,a),e.pdf.addShadingPattern(r,o),[2]):[2]}))}))},t.prototype.getStops=function(e){var r=this;if(this.stops)return this.stops;if(this.contextColor===void 0){this.contextColor=null;for(var n=this;n;){var s=_t(n.element,e,"color");if(s){this.contextColor=np(s,null);break}n=n.getParent()}}var A=[];return this.children.forEach((function(a){if(a.element.tagName.toLowerCase()==="stop"){var o=_t(a.element,e,"color"),l=np(_t(a.element,e,"stop-color")||"",o?{color:np(o,null)}:{color:r.contextColor}),h=parseFloat(_t(a.element,e,"stop-opacity")||"1");A.push({offset:t.parseGradientOffset(a.element.getAttribute("offset")||"0"),color:[l.r,l.g,l.b],opacity:h})}})),this.stops=A},t.prototype.getBoundingBoxCore=function(e){return j0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return zh(this,e,r)},t.parseGradientOffset=function(e){var r=parseFloat(e);return!isNaN(r)&&e.indexOf("%")>=0?r/100:r},t})(G0),ZT=(function(i){function t(e,r){return i.call(this,"axial",e,r)||this}return ur(t,i),t.prototype.getCoordinates=function(){return[parseFloat(this.element.getAttribute("x1")||"0"),parseFloat(this.element.getAttribute("y1")||"0"),parseFloat(this.element.getAttribute("x2")||"1"),parseFloat(this.element.getAttribute("y2")||"0")]},t})($T),JT=(function(i){function t(e,r){return i.call(this,"radial",e,r)||this}return ur(t,i),t.prototype.getCoordinates=function(){var e=this.element.getAttribute("cx"),r=this.element.getAttribute("cy"),n=this.element.getAttribute("fx"),s=this.element.getAttribute("fy");return[parseFloat(n||e||"0.5"),parseFloat(s||r||"0.5"),0,parseFloat(e||"0.5"),parseFloat(r||"0.5"),parseFloat(this.element.getAttribute("r")||"0.5")]},t})($T),v9=(function(){function i(t,e){this.key=t,this.gradient=e}return i.prototype.getFillData=function(t,e){return yr(this,void 0,void 0,(function(){var r,n,s;return br(this,(function(A){switch(A.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,(function(a){return a.apply(new Gh(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))}))];case 1:return A.sent(),this.gradient.element.hasAttribute("gradientUnits")&&this.gradient.element.getAttribute("gradientUnits").toLowerCase()!=="objectboundingbox"?r=e.pdf.unitMatrix:(n=t.getBoundingBox(e),r=e.pdf.Matrix(n[2],0,0,n[3],n[0],n[1])),s=Ly(_t(this.gradient.element,e.styleSheets,"gradientTransform","transform"),e),[2,{key:this.key,matrix:e.pdf.matrixMult(s,r)}]}}))}))},i})(),tN=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.apply=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a;return br(this,(function(o){switch(o.label){case 0:if(!(r=this.element.getAttribute("id")))return[2];n=this.getBoundingBox(e),s=new fu([n[0],n[1],n[0]+n[2],n[1]+n[3]],n[2],n[3]),e.pdf.beginTilingPattern(s),A=0,a=this.children,o.label=1;case 1:return A<a.length?[4,a[A].render(new Gh(e.pdf,{attributeState:e.attributeState,refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return A++,[3,1];case 4:return e.pdf.endTilingPattern(r,s),[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){return j0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return zh(this,e,r)},t})(G0),y9=(function(){function i(t,e){this.key=t,this.pattern=e}return i.prototype.getFillData=function(t,e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a,o,l,h,u,f,d,g;return br(this,(function(m){switch(m.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,(function(y){return y.apply(new Gh(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))}))];case 1:return m.sent(),r={key:this.key,boundingBox:void 0,xStep:0,yStep:0,matrix:void 0},s=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternUnits")&&this.pattern.element.getAttribute("patternUnits").toLowerCase()!=="objectboundingbox"||(n=t.getBoundingBox(e),s=e.pdf.Matrix(1,0,0,1,n[0],n[1]),a=this.pattern.getBoundingBox(e),o=a[0]*n[0]||0,l=a[1]*n[1]||0,h=a[2]*n[2]||0,u=a[3]*n[3]||0,r.boundingBox=[o,l,o+h,l+u],r.xStep=h,r.yStep=u),A=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternContentUnits")&&this.pattern.element.getAttribute("patternContentUnits").toLowerCase()==="objectboundingbox"&&(n||(n=t.getBoundingBox(e)),A=e.pdf.Matrix(n[2],0,0,n[3],0,0),a=r.boundingBox||this.pattern.getBoundingBox(e),o=a[0]/n[0]||0,l=a[1]/n[1]||0,h=a[2]/n[2]||0,u=a[3]/n[3]||0,r.boundingBox=[o,l,o+h,l+u],r.xStep=h,r.yStep=u),f=e.pdf.unitMatrix,(d=_t(this.pattern.element,e.styleSheets,"patternTransform","transform"))&&(f=Ly(d,e)),g=A,g=e.pdf.matrixMult(g,s),g=e.pdf.matrixMult(g,f),g=e.pdf.matrixMult(g,e.transform),r.matrix=g,[2,r]}}))}))},i})();function b9(i,t){var e=QS.exec(i);if(e){var r=e[1],n=t.refsHandler.get(r);return n&&(n instanceof ZT||n instanceof JT)?(function(A,a,o){var l=a.getStops(o.styleSheets);if(l.length===0)return null;if(l.length===1){var h=l[0].color,u=new ca;return u.ok=!0,u.r=h[0],u.g=h[1],u.b=h[2],u.a=l[0].opacity,new Bn(u)}return new v9(A,a)})(r,n,t):n&&n instanceof tN?new y9(r,n):new Bn(new ca("rgb(0, 0, 0)"))}var s=np(i,t.attributeState);return s.ok?new Bn(s):null}function MS(i,t,e){var r=e||t.element,n=_t(r,i.styleSheets,"color");if(n){var s=np(n,i.attributeState);s.ok?i.attributeState.color=s:i.attributeState.color=new ca("rgb(0,0,0)")}var A=_t(r,i.styleSheets,"visibility");A&&(i.attributeState.visibility=A);var a=_t(r,i.styleSheets,"fill");a&&(i.attributeState.fill=b9(a,i));var o=_t(r,i.styleSheets,"fill-opacity");o&&(i.attributeState.fillOpacity=parseFloat(o));var l=_t(r,i.styleSheets,"stroke-opacity");l&&(i.attributeState.strokeOpacity=parseFloat(l));var h=_t(r,i.styleSheets,"opacity");h&&(i.attributeState.opacity=parseFloat(h));var u=_t(r,i.styleSheets,"stroke-width");u!==void 0&&u!==""&&(i.attributeState.strokeWidth=Math.abs(parseFloat(u)));var f=_t(r,i.styleSheets,"stroke");if(f)if(f==="none")i.attributeState.stroke=null;else{var d=np(f,i.attributeState);d.ok&&(i.attributeState.stroke=new Bn(d))}f&&i.attributeState.stroke instanceof Bn&&(i.attributeState.contextStroke=i.attributeState.stroke.color),a&&i.attributeState.fill instanceof Bn&&(i.attributeState.contextFill=i.attributeState.fill.color);var g=_t(r,i.styleSheets,"stroke-linecap");g&&(i.attributeState.strokeLinecap=g);var m=_t(r,i.styleSheets,"stroke-linejoin");m&&(i.attributeState.strokeLinejoin=m);var y=_t(r,i.styleSheets,"stroke-dasharray");if(y){var w=parseInt(_t(r,i.styleSheets,"stroke-dashoffset")||"0");i.attributeState.strokeDasharray=MA(y),i.attributeState.strokeDashoffset=w}var b=_t(r,i.styleSheets,"stroke-miterlimit");b!==void 0&&b!==""&&(i.attributeState.strokeMiterlimit=parseFloat(b));var C=r.getAttribute("xml:space");C&&(i.attributeState.xmlSpace=C);var S=_t(r,i.styleSheets,"white-space");S&&(i.attributeState.whiteSpace=S);var k=_t(r,i.styleSheets,"font-weight");k&&(i.attributeState.fontWeight=k);var I=_t(r,i.styleSheets,"font-style");I&&(i.attributeState.fontStyle=I);var N=_t(r,i.styleSheets,"font-family");if(N){var D=A9.parse(N);i.attributeState.fontFamily=(function(tt,et,st){var nt=YT(tt.fontStyle,tt.fontWeight),at=st.pdf.getFontList(),ft="";return et.some((function(ht){var M=at[ht];return M&&M.indexOf(nt)>=0?(ft=ht,!0):(ht=ht.toLowerCase(),!!dl.hasOwnProperty(ht)&&(ft=ht,!0))}))||(ft="times"),ft})(i.attributeState,D,i)}var Q=_t(r,i.styleSheets,"font-size");if(Q){var K=i.pdf.getFontSize();i.attributeState.fontSize=el(Q,K)}var L=_t(r,i.styleSheets,"vertical-align")||_t(r,i.styleSheets,"alignment-baseline");if(L){var O=L.match(/(baseline|text-bottom|alphabetic|ideographic|middle|central|mathematical|text-top|bottom|center|top|hanging)/);O&&(i.attributeState.alignmentBaseline=O[0])}var W=_t(r,i.styleSheets,"text-anchor");W&&(i.attributeState.textAnchor=W);var R=_t(r,i.styleSheets,"fill-rule");R&&(i.attributeState.fillRule=R)}function TS(i,t,e){var r=1,n=1;r*=i.attributeState.fillOpacity,r*=i.attributeState.opacity,i.attributeState.fill instanceof Bn&&i.attributeState.fill.color.a!==void 0&&(r*=i.attributeState.fill.color.a),n*=i.attributeState.strokeOpacity,n*=i.attributeState.opacity,i.attributeState.stroke instanceof Bn&&i.attributeState.stroke.color.a!==void 0&&(n*=i.attributeState.stroke.color.a);var s,A,a=r<1,o=n<1;if(Vh(e,"use")?(a=!0,o=!0,r*=i.attributeState.fill?1:0,n*=i.attributeState.stroke?1:0):i.withinUse&&(i.attributeState.fill!==t.attributeState.fill?(a=!0,r*=i.attributeState.fill?1:0):a&&!i.attributeState.fill&&(r=0),i.attributeState.stroke!==t.attributeState.stroke?(o=!0,n*=i.attributeState.stroke?1:0):o&&!i.attributeState.stroke&&(n=0)),a||o){var l={};a&&(l.opacity=r),o&&(l["stroke-opacity"]=n),i.pdf.setGState(new Tu(l))}if(i.attributeState.fill&&i.attributeState.fill!==t.attributeState.fill&&i.attributeState.fill instanceof Bn&&i.attributeState.fill.color.ok&&!Vh(e,"text")&&i.pdf.setFillColor(i.attributeState.fill.color.r,i.attributeState.fill.color.g,i.attributeState.fill.color.b),i.attributeState.strokeWidth!==t.attributeState.strokeWidth&&i.pdf.setLineWidth(i.attributeState.strokeWidth),i.attributeState.stroke!==t.attributeState.stroke&&i.attributeState.stroke instanceof Bn&&i.pdf.setDrawColor(i.attributeState.stroke.color.r,i.attributeState.stroke.color.g,i.attributeState.stroke.color.b),i.attributeState.strokeLinecap!==t.attributeState.strokeLinecap&&i.pdf.setLineCap(i.attributeState.strokeLinecap),i.attributeState.strokeLinejoin!==t.attributeState.strokeLinejoin&&i.pdf.setLineJoin(i.attributeState.strokeLinejoin),i.attributeState.strokeDasharray===t.attributeState.strokeDasharray&&i.attributeState.strokeDashoffset===t.attributeState.strokeDashoffset||!i.attributeState.strokeDasharray||i.pdf.setLineDashPattern(i.attributeState.strokeDasharray,i.attributeState.strokeDashoffset),i.attributeState.strokeMiterlimit!==t.attributeState.strokeMiterlimit&&i.pdf.setLineMiterLimit(i.attributeState.strokeMiterlimit),i.attributeState.fontFamily!==t.attributeState.fontFamily&&(s=dl.hasOwnProperty(i.attributeState.fontFamily)?dl[i.attributeState.fontFamily]:i.attributeState.fontFamily),i.attributeState.fill&&i.attributeState.fill!==t.attributeState.fill&&i.attributeState.fill instanceof Bn&&i.attributeState.fill.color.ok){var h=i.attributeState.fill.color;i.pdf.setTextColor(h.r,h.g,h.b)}i.attributeState.fontWeight===t.attributeState.fontWeight&&i.attributeState.fontStyle===t.attributeState.fontStyle||(A=YT(i.attributeState.fontStyle,i.attributeState.fontWeight)),s===void 0&&A===void 0||(s===void 0&&(s=dl.hasOwnProperty(i.attributeState.fontFamily)?dl[i.attributeState.fontFamily]:i.attributeState.fontFamily),i.pdf.setFont(s,A)),i.attributeState.fontSize!==t.attributeState.fontSize&&i.pdf.setFontSize(i.attributeState.fontSize*i.pdf.internal.scaleFactor)}function eN(i,t,e){var r=QS.exec(i);if(r){var n=r[1];return e.refsHandler.get(n)||void 0}}function rN(i,t,e){return yr(this,void 0,void 0,(function(){var r,n;return br(this,(function(s){switch(s.label){case 0:return r=e.clone(),t.element.hasAttribute("clipPathUnits")&&t.element.getAttribute("clipPathUnits").toLowerCase()==="objectboundingbox"&&(n=i.getBoundingBox(e),r.transform=e.pdf.matrixMult(e.pdf.Matrix(n[2],0,0,n[3],n[0],n[1]),e.transform)),[4,t.apply(r)];case 1:return s.sent(),[2]}}))}))}var iN=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.render=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A;return br(this,(function(a){switch(a.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?((r=e.clone()).transform=r.pdf.matrixMult(this.computeNodeTransform(r),e.transform),MS(r,this),n=_t(this.element,r.styleSheets,"clip-path"),(s=n&&n!=="none")?(A=eN(n,0,r))?A.isVisible(!0,r)?(r.pdf.saveGraphicsState(),[4,rN(this,A,r)]):[3,2]:[3,4]:[3,5]):[2];case 1:return a.sent(),[3,3];case 2:return[2];case 3:return[3,5];case 4:s=!1,a.label=5;case 5:return r.withinClipPath||r.pdf.saveGraphicsState(),TS(r,e,this.element),[4,this.renderCore(r)];case 6:return a.sent(),r.withinClipPath||r.pdf.restoreGraphicsState(),s&&r.pdf.restoreGraphicsState(),[2]}}))}))},t})(_S),_y=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t})(iN),z0=(function(i){function t(e,r,n){var s=i.call(this,r,n)||this;return s.cachedPath=null,s.hasMarkers=e,s}return ur(t,i),t.prototype.renderCore=function(e){return yr(this,void 0,void 0,(function(){var r;return br(this,(function(n){switch(n.label){case 0:return(r=this.getCachedPath(e))===null||r.segments.length===0?[2]:(e.withinClipPath?r.transform(e.transform):e.pdf.setCurrentTransformationMatrix(e.transform),r.draw(e),[4,this.fillOrStroke(e)]);case 1:return n.sent(),this.hasMarkers?[4,this.drawMarkers(e,r)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))},t.prototype.getCachedPath=function(e){return this.cachedPath||(this.cachedPath=this.getPath(e))},t.prototype.drawMarkers=function(e,r){return yr(this,void 0,void 0,(function(){return br(this,(function(n){switch(n.label){case 0:return[4,this.getMarkers(r,e).draw(e.clone({transform:e.pdf.unitMatrix}))];case 1:return n.sent(),[2]}}))}))},t.prototype.fillOrStroke=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a;return br(this,(function(o){switch(o.label){case 0:return e.withinClipPath?[2]:(r=e.attributeState.fill,n=e.attributeState.stroke&&e.attributeState.strokeWidth!==0,r?[4,r.getFillData(this,e)]:[3,2]);case 1:return A=o.sent(),[3,3];case 2:A=void 0,o.label=3;case 3:return s=A,a=e.attributeState.fillRule==="evenodd",r&&n||e.withinUse?a?e.pdf.fillStrokeEvenOdd(s):e.pdf.fillStroke(s):r?a?e.pdf.fillEvenOdd(s):e.pdf.fill(s):n?e.pdf.stroke():e.pdf.discardPath(),[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){var r=this.getCachedPath(e);if(!r||!r.segments.length)return[0,0,0,0];for(var n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=0,l=0,h=0;h<r.segments.length;h++){var u=r.segments[h];(u instanceof tn||u instanceof mh||u instanceof Za)&&(o=u.x,l=u.y),u instanceof Za?(n=Math.min(n,o,u.x1,u.x2,u.x),A=Math.max(A,o,u.x1,u.x2,u.x),s=Math.min(s,l,u.y1,u.y2,u.y),a=Math.max(a,l,u.y1,u.y2,u.y)):(n=Math.min(n,o),A=Math.max(A,o),s=Math.min(s,l),a=Math.max(a,l))}return[n,s,A-n,a-s]},t.prototype.getMarkers=function(e,r){var n=_t(this.element,r.styleSheets,"marker-start"),s=_t(this.element,r.styleSheets,"marker-mid"),A=_t(this.element,r.styleSheets,"marker-end"),a=new g9;if(n||s||A){A&&(A=PB(A)),n&&(n=PB(n)),s&&(s=PB(s));for(var o=e.segments,l=[1,0],h=void 0,u=!1,f=[1,0],d=!1,g=function(y){var w=o[y],b=n&&(y===1||!(o[y]instanceof tn)&&o[y-1]instanceof tn);b&&o.forEach((function(D,Q){if(!d&&D instanceof aF&&Q>y){var K=o[Q-1];d=(K instanceof tn||K instanceof mh||K instanceof Za)&&K}}));var C=A&&(y===o.length-1||!(o[y]instanceof tn)&&o[y+1]instanceof tn),S=s&&y>0&&!(y===1&&o[y-1]instanceof tn),k=o[y-1]||null;if(k instanceof tn||k instanceof mh||k instanceof Za)if(w instanceof Za)b&&a.addMarker(new Rl(n,[k.x,k.y],Hk(d?[d.x,d.y]:[k.x,k.y],[w.x1,w.y1]),!0)),C&&a.addMarker(new Rl(A,[w.x,w.y],Hk([w.x2,w.y2],[w.x,w.y]))),S&&(h=gd([k.x,k.y],[w.x1,w.y1]),h=k instanceof tn?h:gg(z1(l,h)),a.addMarker(new Rl(s,[k.x,k.y],Math.atan2(h[1],h[0])))),l=gd([w.x2,w.y2],[w.x,w.y]);else if(w instanceof tn||w instanceof mh){if(h=gd([k.x,k.y],[w.x,w.y]),b){var I=d?gd([d.x,d.y],[w.x,w.y]):h;a.addMarker(new Rl(n,[k.x,k.y],Math.atan2(I[1],I[0]),!0))}C&&a.addMarker(new Rl(A,[w.x,w.y],Math.atan2(h[1],h[0]))),S&&(I=w instanceof tn?l:k instanceof tn?h:gg(z1(l,h)),a.addMarker(new Rl(s,[k.x,k.y],Math.atan2(I[1],I[0])))),l=h}else w instanceof aF&&(h=gd([k.x,k.y],[u.x,u.y]),S&&(I=k instanceof tn?h:gg(z1(l,h)),a.addMarker(new Rl(s,[k.x,k.y],Math.atan2(I[1],I[0])))),C&&(I=gg(z1(h,f)),a.addMarker(new Rl(A,[u.x,u.y],Math.atan2(I[1],I[0])))),l=h);else{u=w instanceof tn&&w;var N=o[y+1];(N instanceof tn||N instanceof mh||N instanceof Za)&&(f=gd([u.x,u.y],[N.x,N.y]))}},m=0;m<o.length;m++)g(m)}return a.markers.forEach((function(y){var w=r.refsHandler.get(y.id);if(w){var b=_t(w.element,r.styleSheets,"orient");b!=null&&(y.isStartMarker&&b==="auto-start-reverse"&&(y.angle+=Math.PI),isNaN(Number(b))||(y.angle=parseFloat(b)/180*Math.PI))}})),a},t})(_y);function PB(i){var t=QS.exec(i);return t&&t[1]||void 0}var B9=(function(i){function t(e,r){return i.call(this,!0,e,r)||this}return ur(t,i),t.prototype.getPath=function(e){if(e.withinClipPath||e.attributeState.stroke===null)return null;var r=parseFloat(this.element.getAttribute("x1")||"0"),n=parseFloat(this.element.getAttribute("y1")||"0"),s=parseFloat(this.element.getAttribute("x2")||"0"),A=parseFloat(this.element.getAttribute("y2")||"0");return r||s||n||A?new Bp().moveTo(r,n).lineTo(s,A):null},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t.prototype.fillOrStroke=function(e){return yr(this,void 0,void 0,(function(){return br(this,(function(r){switch(r.label){case 0:return e.attributeState.fill=null,[4,i.prototype.fillOrStroke.call(this,e)];case 1:return r.sent(),[2]}}))}))},t})(z0),nN=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.apply=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a;return br(this,(function(o){switch(o.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?((r=e.clone()).transform=r.pdf.unitMatrix,MS(r,this),n=_t(this.element,r.styleSheets,"clip-path"),n&&n!=="none"&&(s=eN(n,0,r))?s.isVisible(!0,r)?[4,rN(this,s,r)]:[3,2]:[3,3]):[2];case 1:return o.sent(),[3,3];case 2:return[2];case 3:TS(r,e,this.element),A=0,a=this.children,o.label=4;case 4:return A<a.length?[4,a[A].render(r)]:[3,7];case 5:o.sent(),o.label=6;case 6:return A++,[3,4];case 7:return[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){return LS(e,this)},t.prototype.isVisible=function(e,r){return zh(this,e,r)},t.prototype.computeNodeTransformCore=function(e){var r=parseFloat(_t(this.element,e.styleSheets,"x")||"0"),n=parseFloat(_t(this.element,e.styleSheets,"y")||"0"),s=this.element.getAttribute("viewBox");if(s){var A=MA(s),a=parseFloat(_t(this.element,e.styleSheets,"width")||_t(this.element.ownerSVGElement,e.styleSheets,"width")||s[2]),o=parseFloat(_t(this.element,e.styleSheets,"height")||_t(this.element.ownerSVGElement,e.styleSheets,"height")||s[3]);return K0(this.element,A,r,n,a,o,e)}return e.pdf.Matrix(1,0,0,1,r,n)},t})(G0),My=function(i,t){this.width=i,this.height=t},C9=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.renderCore=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a,o,l,h,u,f,d,g,m;return br(this,(function(y){switch(y.label){case 0:return r=parseFloat,(n=this.element.getAttribute("href")||this.element.getAttribute("xlink:href"))?(s=n.substring(1),A=e.refsHandler.get(s),a=Vh(A.element,"symbol,svg")&&A.element.hasAttribute("viewBox"),o=r(_t(this.element,e.styleSheets,"x")||"0"),l=r(_t(this.element,e.styleSheets,"y")||"0"),h=void 0,u=void 0,a?(h=r(_t(this.element,e.styleSheets,"width")||_t(A.element,e.styleSheets,"width")||"0"),u=r(_t(this.element,e.styleSheets,"height")||_t(A.element,e.styleSheets,"height")||"0"),o+=r(_t(A.element,e.styleSheets,"x")||"0"),l+=r(_t(A.element,e.styleSheets,"y")||"0"),d=MA(A.element.getAttribute("viewBox")),f=K0(A.element,d,o,l,h,u,e)):f=e.pdf.Matrix(1,0,0,1,o,l),g=bp.getContextColors(e,!0),m=new Gh(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,withinUse:!0,viewport:a?new My(h,u):e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure,attributeState:Object.assign(bp.default(),g)}),[4,e.refsHandler.getRendered(s,g,(function(w){return t.renderReferencedNode(w,s,m)}))]):[2];case 1:return y.sent(),e.pdf.saveGraphicsState(),e.pdf.setCurrentTransformationMatrix(e.transform),a&&_t(A.element,e.styleSheets,"overflow")!=="visible"&&(e.pdf.rect(o,l,h,u),e.pdf.clip().discardPath()),e.pdf.doFormObject(e.refsHandler.generateKey(s,g),f),e.pdf.restoreGraphicsState(),[2]}}))}))},t.renderReferencedNode=function(e,r,n){return yr(this,void 0,void 0,(function(){var s;return br(this,(function(A){switch(A.label){case 0:return s=[(s=e.getBoundingBox(n))[0]-.5*s[2],s[1]-.5*s[3],2*s[2],2*s[3]],n.pdf.beginFormObject(s[0],s[1],s[2],s[3],n.pdf.unitMatrix),e instanceof nN?[4,e.apply(n)]:[3,2];case 1:return A.sent(),[3,4];case 2:return[4,e.render(n)];case 3:A.sent(),A.label=4;case 4:return n.pdf.endFormObject(n.refsHandler.generateKey(r,n.attributeState)),[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){return j0(this.element,e)},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t})(_y),x9=(function(i){function t(e,r){return i.call(this,!1,e,r)||this}return ur(t,i),t.prototype.getPath=function(e){var r=parseFloat(_t(this.element,e.styleSheets,"width")||"0"),n=parseFloat(_t(this.element,e.styleSheets,"height")||"0");if(!isFinite(r)||r<=0||!isFinite(n)||n<=0)return null;var s=_t(this.element,e.styleSheets,"rx"),A=_t(this.element,e.styleSheets,"ry"),a=Math.min(parseFloat(s||A||"0"),.5*r),o=Math.min(parseFloat(A||s||"0"),.5*n),l=parseFloat(_t(this.element,e.styleSheets,"x")||"0"),h=parseFloat(_t(this.element,e.styleSheets,"y")||"0"),u=4/3*(Math.SQRT2-1);return a===0&&o===0?new Bp().moveTo(l,h).lineTo(l+r,h).lineTo(l+r,h+n).lineTo(l,h+n).close():new Bp().moveTo(l+=a,h).lineTo(l+=r-2*a,h).curveTo(l+a*u,h,l+a,h+(o-o*u),l+=a,h+=o).lineTo(l,h+=n-2*o).curveTo(l,h+o*u,l-a*u,h+o,l-=a,h+=o).lineTo(l+=2*a-r,h).curveTo(l-a*u,h,l-a,h-o*u,l-=a,h-=o).lineTo(l,h+=2*o-n).curveTo(l,h-o*u,l+a*u,h-o,l+=a,h-=o).close()},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t})(z0),sN=(function(i){function t(e,r){return i.call(this,!1,e,r)||this}return ur(t,i),t.prototype.getPath=function(e){var r=this.getRx(e),n=this.getRy(e);if(!isFinite(r)||n<=0||!isFinite(n)||n<=0)return null;var s=parseFloat(_t(this.element,e.styleSheets,"cx")||"0"),A=parseFloat(_t(this.element,e.styleSheets,"cy")||"0"),a=4/3*(Math.SQRT2-1)*r,o=4/3*(Math.SQRT2-1)*n;return new Bp().moveTo(s+r,A).curveTo(s+r,A-o,s+a,A-n,s,A-n).curveTo(s-a,A-n,s-r,A-o,s-r,A).curveTo(s-r,A+o,s-a,A+n,s,A+n).curveTo(s+a,A+n,s+r,A+o,s+r,A)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t})(z0),F9=(function(i){function t(e,r){return i.call(this,e,r)||this}return ur(t,i),t.prototype.getRx=function(e){return parseFloat(_t(this.element,e.styleSheets,"rx")||"0")},t.prototype.getRy=function(e){return parseFloat(_t(this.element,e.styleSheets,"ry")||"0")},t})(sN);function AN(i){var t="invisible",e=i.stroke&&i.strokeWidth!==0,r=i.fill;return r&&e?t="fillThenStroke":r?t="fill":e&&(t="stroke"),t}function Kk(i){return i.replace(/[\n\r]/g,"")}function Gk(i){return i.replace(/[\t]/g," ")}function zk(i){return i.replace(/ +/g," ")}function qk(i,t,e){switch(_t(i,e.styleSheets,"text-transform")){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();default:return t}}var DB=(function(){function i(t,e,r,n){this.textNode=t,this.texts=[],this.textNodes=[],this.contexts=[],this.textAnchor=e,this.originX=r,this.originY=n,this.textMeasures=[]}return i.prototype.setX=function(t){this.originX=t},i.prototype.setY=function(t){this.originY=t},i.prototype.add=function(t,e,r){this.texts.push(e),this.textNodes.push(t),this.contexts.push(r)},i.prototype.rightTrimText=function(){for(var t=this.texts.length-1;t>=0;t--)if(this.contexts[t].attributeState.xmlSpace==="preserve"||this.contexts[t].attributeState.whiteSpace==="pre"||(this.texts[t]=this.texts[t].replace(/\s+$/,"")),this.texts[t].match(/[^\s]/))return!1;return!0},i.prototype.measureText=function(t){for(var e=0;e<this.texts.length;e++)this.textMeasures.push({width:t.textMeasure.measureTextWidth(this.texts[e],this.contexts[e].attributeState),length:this.texts[e].length})},i.prototype.put=function(t,e){var r,n,s,A,a=[],o=[],l=[],h=this.originX,u=this.originY,f=h,d=h;for(r=0;r<this.textNodes.length;r++){n=this.textNodes[r],s=this.contexts[r],A=this.textMeasures[r]||{width:t.textMeasure.measureTextWidth(this.texts[r],this.contexts[r].attributeState),length:this.texts[r].length};var g=h,m=u;if(n.nodeName!=="#text"&&!a.includes(n)){a.push(n);var y=i.resolveRelativePositionAttribute(n,"dx");y!==null&&(g+=el(y,s.attributeState.fontSize));var w=i.resolveRelativePositionAttribute(n,"dy");w!==null&&(m+=el(w,s.attributeState.fontSize))}o[r]=g,l[r]=m,h=g+A.width+A.length*e,u=m,f=Math.min(f,g),d=Math.max(d,h)}var b=0;switch(this.textAnchor){case"start":b=0;break;case"middle":b=(d-f)/2;break;case"end":b=d-f}for(r=0;r<this.textNodes.length;r++)if(n=this.textNodes[r],s=this.contexts[r],n.nodeName==="#text"||s.attributeState.visibility!=="hidden"){t.pdf.saveGraphicsState(),TS(s,t,n);var C=s.attributeState.alignmentBaseline,S=AN(s.attributeState);t.pdf.text(this.texts[r],o[r]-b,l[r],{baseline:XT(C),angle:t.transform,renderingMode:S==="fill"?void 0:S,charSpace:e===0?void 0:e}),t.pdf.restoreGraphicsState()}return[h,u]},i.resolveRelativePositionAttribute=function(t,e){for(var r,n=t;n&&Vh(n,"tspan");){if(n.hasAttribute(e))return n.getAttribute(e);if(((r=t.parentElement)===null||r===void 0?void 0:r.firstChild)!==t)break;n=n.parentElement}return null},i})(),S9=(function(i){function t(){var e=i!==null&&i.apply(this,arguments)||this;return e.boundingBox=[],e}return ur(t,i),t.prototype.processTSpans=function(e,r,n,s,A,a){for(var o=n.pdf.getFontSize(),l=n.attributeState.xmlSpace==="preserve"||n.attributeState.whiteSpace==="pre",h=!0,u=!1,f=0;f<r.childNodes.length;f++){var d=r.childNodes[f];if(d.textContent){var g=d.textContent;if(d.nodeName==="#text"){var m=Kk(g);m=Gk(m),l||(m=zk(m),h&&m.match(/^\s/)&&(u=!0),m.match(/[^\s]/)&&(h=!1),a.prevText.match(/\s$/)&&(m=m.replace(/^\s+/,"")));var y=qk(r,m,n);A.add(r,y,n),a.prevText=g,a.prevContext=n}else if(!Vh(d,"title")&&Vh(d,"tspan")){var w=d,b=w.getAttribute("x");if(b!==null){var C=el(b,o);A=new DB(this,_t(w,n.styleSheets,"text-anchor")||n.attributeState.textAnchor,C,0),s.push({type:"y",chunk:A})}var S=w.getAttribute("y");if(S!==null){var k=el(S,o);A=new DB(this,_t(w,n.styleSheets,"text-anchor")||n.attributeState.textAnchor,0,k),s.push({type:"x",chunk:A})}var I=n.clone();MS(I,e,w),this.processTSpans(e,w,I,s,A,a)}}}return u},t.prototype.renderCore=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a,o,l,h,u,f,d,g,m,y,w,b,C,S,k,I,N,D,Q;return br(this,(function(K){if(e.pdf.saveGraphicsState(),r=0,n=0,s=1,A=e.pdf.getFontSize(),a=el(this.element.getAttribute("x"),A),o=el(this.element.getAttribute("y"),A),l=el(this.element.getAttribute("dx"),A),h=el(this.element.getAttribute("dy"),A),u=parseFloat(this.element.getAttribute("textLength")||"0"),f=e.attributeState.visibility,this.element.childElementCount===0)d=this.element.textContent||"",g=(function(L,O){return L=Gk(L=Kk(L)),O.xmlSpace==="preserve"||O.whiteSpace==="pre"||(L=zk(L=L.trim())),L})(d,e.attributeState),m=qk(this.element,g,e),r=e.textMeasure.getTextOffset(m,e.attributeState),u>0&&(y=e.textMeasure.measureTextWidth(m,e.attributeState),!(e.attributeState.xmlSpace==="preserve"||e.attributeState.whiteSpace==="pre")&&d.match(/^\s/)&&(s=0),n=(u-y)/(m.length-s)||0),f==="visible"&&(w=e.attributeState.alignmentBaseline,b=AN(e.attributeState),e.pdf.text(m,a+l-r,o+h,{baseline:XT(w),angle:e.transform,renderingMode:b==="fill"?void 0:b,charSpace:n===0?void 0:n}),this.boundingBox=[a+l-r,o+h+.1*A,e.textMeasure.measureTextWidth(m,e.attributeState),A]);else{for(C=[],S=new DB(this,e.attributeState.textAnchor,a+l,o+h),C.push({type:"",chunk:S}),k=this.processTSpans(this,this.element,e,C,S,{prevText:" ",prevContext:e}),s=k?0:1,I=!0,N=C.length-1;N>=0;N--)I&&(I=C[N].chunk.rightTrimText());u>0&&(D=0,Q=0,C.forEach((function(L){var O=L.chunk;O.measureText(e),O.textMeasures.forEach((function(W){var R=W.width,tt=W.length;D+=R,Q+=tt}))})),n=(u-D)/(Q-s)),C.reduce((function(L,O){var W=O.type,R=O.chunk;return W==="x"?R.setX(L[0]):W==="y"&&R.setY(L[1]),R.put(e,n)}),[0,0])}return e.pdf.restoreGraphicsState(),[2]}))}))},t.prototype.isVisible=function(e,r){return zh(this,e,r)},t.prototype.getBoundingBoxCore=function(e){return this.boundingBox.length>0?this.boundingBox:j0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t})(_y),E9=(function(i){function t(e,r){return i.call(this,!0,e,r)||this}return ur(t,i),t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t.prototype.getPath=function(e){var r,n,s=new f9(_t(this.element,e.styleSheets,"d")||"").unshort().unarc().abs(),A=new Bp;return s.iterate((function(a){switch(a[0]){case"M":A.moveTo(a[1],a[2]);break;case"L":A.lineTo(a[1],a[2]);break;case"H":A.lineTo(a[1],n);break;case"V":A.lineTo(r,a[1]);break;case"C":A.curveTo(a[1],a[2],a[3],a[4],a[5],a[6]);break;case"Q":var o=Wk([r,n],[a[1],a[2]]),l=Wk([a[3],a[4]],[a[1],a[2]]);A.curveTo(o[0],o[1],l[0],l[1],a[3],a[4]);break;case"Z":A.close()}switch(a[0]){case"M":case"L":r=a[1],n=a[2];break;case"H":r=a[1];break;case"V":n=a[1];break;case"C":r=a[5],n=a[6];break;case"Q":r=a[3],n=a[4]}})),A},t})(z0),k9=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,((?:.|\s)*)$/i,U9=(function(i){function t(e,r){var n=i.call(this,e,r)||this;return n.imageLoadingPromise=null,n.imageUrl=n.element.getAttribute("xlink:href")||n.element.getAttribute("href"),n.imageUrl&&(n.imageLoadingPromise=t.fetchImageData(n.imageUrl)),n}return ur(t,i),t.prototype.renderCore=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a,o,l,h,u,f,d,g,m,y,w,b,C,S;return br(this,(function(k){switch(k.label){case 0:return this.imageLoadingPromise?(e.pdf.setCurrentTransformationMatrix(e.transform),r=parseFloat(_t(this.element,e.styleSheets,"width")||"0"),n=parseFloat(_t(this.element,e.styleSheets,"height")||"0"),s=parseFloat(_t(this.element,e.styleSheets,"x")||"0"),A=parseFloat(_t(this.element,e.styleSheets,"y")||"0"),!isFinite(r)||r<=0||!isFinite(n)||n<=0?[2]:[4,this.imageLoadingPromise]):[2];case 1:return a=k.sent(),o=a.data,(l=a.format).indexOf("svg")!==0?[3,3]:(h=new DOMParser,u=h.parseFromString(o,"image/svg+xml").firstElementChild,(!(f=this.element.getAttribute("preserveAspectRatio"))||f.indexOf("defer")<0||!u.getAttribute("preserveAspectRatio"))&&u.setAttribute("preserveAspectRatio",f||""),u.setAttribute("x",String(s)),u.setAttribute("y",String(A)),u.setAttribute("width",String(r)),u.setAttribute("height",String(n)),[4,NS(u,d={}).render(new Gh(e.pdf,{refsHandler:new qT(d),styleSheets:e.styleSheets,viewport:new My(r,n),svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]);case 2:return k.sent(),[2];case 3:g="data:image/".concat(l,";base64,").concat(btoa(o)),k.label=4;case 4:return k.trys.push([4,6,,7]),[4,t.getImageDimensions(g)];case 5:return m=k.sent(),y=m[0],w=m[1],b=[0,0,y,w],C=K0(this.element,b,s,A,r,n,e),e.pdf.setCurrentTransformationMatrix(C),e.pdf.addImage(g,"",0,0,y,w),[3,7];case 6:return S=k.sent(),typeof console=="object"&&console.warn&&console.warn("Could not load image ".concat(this.imageUrl,`.
|
|
218
|
-
`).concat(S)),[3,7];case 7:return[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){return j0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t.fetchImageData=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a;return br(this,(function(o){switch(o.label){case 0:if(!(s=e.match(k9)))return[3,1];if(A=s[2],(a=A.split("/"))[0]!=="image")throw new Error("Unsupported image URL: ".concat(e));return n=a[1],r=s[5],s[4]==="base64"?(r=r.replace(/\s/g,""),r=atob(r)):r=decodeURIComponent(r),[3,3];case 1:return[4,t.fetchImage(e)];case 2:r=o.sent(),n=e.substring(e.lastIndexOf(".")+1),o.label=3;case 3:return[2,{data:r,format:n}]}}))}))},t.fetchImage=function(e){return new Promise((function(r,n){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(){if(s.status!==200)throw new Error("Error ".concat(s.status,": Failed to load image '").concat(e,"'"));for(var A=new Uint8Array(s.response),a="",o=0;o<A.length;o++)a+=String.fromCharCode(A[o]);r(a)},s.onerror=n,s.onabort=n,s.send(null)}))},t.getMimeType=function(e){switch(e=e.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";default:return"image/".concat(e)}},t.getImageDimensions=function(e){return new Promise((function(r,n){var s=new Image;s.onload=function(){r([s.width,s.height])},s.onerror=n,s.src=e}))},t})(_y),aN=(function(i){function t(e,r,n){var s=i.call(this,!0,r,n)||this;return s.closed=e,s}return ur(t,i),t.prototype.getPath=function(e){if(!this.element.hasAttribute("points")||this.element.getAttribute("points")==="")return null;var r=t.parsePointsString(this.element.getAttribute("points")),n=new Bp;if(r.length<1)return n;n.moveTo(r[0][0],r[0][1]);for(var s=1;s<r.length;s++)n.lineTo(r[s][0],r[s][1]);return this.closed&&n.close(),n},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.parsePointsString=function(e){for(var r=MA(e),n=[],s=0;s<r.length-1;s+=2){var A=r[s],a=r[s+1];n.push([A,a])}return n},t})(z0),I9=(function(i){function t(e,r){return i.call(this,!0,e,r)||this}return ur(t,i),t})(aN),Q9=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.render=function(e){return Promise.resolve()},t.prototype.getBoundingBoxCore=function(e){return[0,0,0,0]},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return bl(this,e,r)},t})(_S),L9=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.apply=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a,o;return br(this,(function(l){switch(l.label){case 0:r=this.computeNodeTransform(e),n=this.getBoundingBox(e),e.pdf.beginFormObject(n[0],n[1],n[2],n[3],r),s=bp.getContextColors(e),(function(h){var u=h.attributeState,f=h.pdf,d=1,g=1;d*=u.fillOpacity,d*=u.opacity,u.fill instanceof Bn&&u.fill.color.a!==void 0&&(d*=u.fill.color.a),g*=u.strokeOpacity,g*=u.opacity,u.stroke instanceof Bn&&u.stroke.color.a!==void 0&&(g*=u.stroke.color.a);var m,y={};if(y.opacity=d,y["stroke-opacity"]=g,f.setGState(new Tu(y)),u.fill&&u.fill instanceof Bn&&u.fill.color.ok?f.setFillColor(u.fill.color.r,u.fill.color.g,u.fill.color.b):f.setFillColor(0,0,0),f.setLineWidth(u.strokeWidth),u.stroke instanceof Bn?f.setDrawColor(u.stroke.color.r,u.stroke.color.g,u.stroke.color.b):f.setDrawColor(0,0,0),f.setLineCap(u.strokeLinecap),f.setLineJoin(u.strokeLinejoin),u.strokeDasharray?f.setLineDashPattern(u.strokeDasharray,u.strokeDashoffset):f.setLineDashPattern([],0),f.setLineMiterLimit(u.strokeMiterlimit),m=dl.hasOwnProperty(u.fontFamily)?dl[u.fontFamily]:u.fontFamily,u.fill&&u.fill instanceof Bn&&u.fill.color.ok){var w=u.fill.color;f.setTextColor(w.r,w.g,w.b)}else f.setTextColor(0,0,0);var b="";u.fontWeight==="bold"&&(b="bold"),u.fontStyle==="italic"&&(b+="italic"),b===""&&(b="normal"),m!==void 0||b!==void 0?(m===void 0&&(m=dl.hasOwnProperty(u.fontFamily)?dl[u.fontFamily]:u.fontFamily),f.setFont(m,b)):f.setFont("helvetica",b),f.setFontSize(u.fontSize*f.internal.scaleFactor)})(A=new Gh(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure,attributeState:Object.assign(bp.default(),s)})),a=0,o=this.children,l.label=1;case 1:return a<o.length?[4,o[a].render(A)]:[3,4];case 2:l.sent(),l.label=3;case 3:return a++,[3,1];case 4:return e.pdf.endFormObject(A.refsHandler.generateKey(this.element.getAttribute("id"),s)),[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){var r,n=this.element.getAttribute("viewBox");return n&&(r=MA(n)),[r&&r[0]||0,r&&r[1]||0,r&&r[2]||parseFloat(this.element.getAttribute("markerWidth")||"3"),r&&r[3]||parseFloat(this.element.getAttribute("markerHeight")||"3")]},t.prototype.computeNodeTransformCore=function(e){var r,n=parseFloat(this.element.getAttribute("refX")||"0"),s=parseFloat(this.element.getAttribute("refY")||"0"),A=this.element.getAttribute("viewBox");if(A){var a=MA(A);r=K0(this.element,a,0,0,parseFloat(this.element.getAttribute("markerWidth")||"3"),parseFloat(this.element.getAttribute("markerHeight")||"3"),e,!0),r=e.pdf.matrixMult(e.pdf.Matrix(1,0,0,1,-n,-s),r)}else r=e.pdf.Matrix(1,0,0,1,-n,-s);return r},t.prototype.isVisible=function(e,r){return zh(this,e,r)},t})(G0),_9=(function(i){function t(e,r){return i.call(this,e,r)||this}return ur(t,i),t.prototype.getR=function(e){var r;return(r=this.r)!==null&&r!==void 0?r:this.r=parseFloat(_t(this.element,e.styleSheets,"r")||"0")},t.prototype.getRx=function(e){return this.getR(e)},t.prototype.getRy=function(e){return this.getR(e)},t})(sN),M9=(function(i){function t(e,r){return i.call(this,!1,e,r)||this}return ur(t,i),t})(aN),oN=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.renderCore=function(e){return yr(this,void 0,void 0,(function(){var r,n;return br(this,(function(s){switch(s.label){case 0:r=0,n=this.children,s.label=1;case 1:return r<n.length?[4,n[r].render(e)]:[3,4];case 2:s.sent(),s.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){return LS(e,this)},t})(iN),T9=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.isVisible=function(e,r){return zh(this,e,r)},t.prototype.render=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a;return br(this,(function(o){switch(o.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?(r=this.getX(e),n=this.getY(e),s=this.getWidth(e),A=this.getHeight(e),e.pdf.saveGraphicsState(),a=e.transform,this.element.hasAttribute("transform")&&(a=e.pdf.matrixMult(Ly(this.element.getAttribute("transform"),e),a)),e.pdf.setCurrentTransformationMatrix(a),e.withinUse||_t(this.element,e.styleSheets,"overflow")==="visible"||e.pdf.rect(r,n,s,A).clip().discardPath(),[4,i.prototype.render.call(this,e.clone({transform:e.pdf.unitMatrix,viewport:e.withinUse?e.viewport:new My(s,A)}))]):[2];case 1:return o.sent(),e.pdf.restoreGraphicsState(),[2]}}))}))},t.prototype.computeNodeTransform=function(e){return this.computeNodeTransformCore(e)},t.prototype.computeNodeTransformCore=function(e){if(e.withinUse)return e.pdf.unitMatrix;var r,n=this.getX(e),s=this.getY(e),A=this.getViewBox();if(A){var a=this.getWidth(e),o=this.getHeight(e);r=K0(this.element,A,n,s,a,o,e)}else r=e.pdf.Matrix(1,0,0,1,n,s);return r},t.prototype.getWidth=function(e){if(this.width!==void 0)return this.width;var r,n,s=e.svg2pdfParameters;if(this.isOutermostSvg(e))if(s.width!=null)r=s.width;else if(n=_t(this.element,e.styleSheets,"width"))r=parseFloat(n);else{var A=this.getViewBox();if(A&&(s.height!=null||_t(this.element,e.styleSheets,"height"))){var a=A[2]/A[3];r=this.getHeight(e)*a}else r=Math.min(300,e.viewport.width,2*e.viewport.height)}else r=(n=_t(this.element,e.styleSheets,"width"))?parseFloat(n):e.viewport.width;return this.width=r},t.prototype.getHeight=function(e){if(this.height!==void 0)return this.height;var r,n,s=e.svg2pdfParameters;if(this.isOutermostSvg(e))if(s.height!=null)r=s.height;else if(n=_t(this.element,e.styleSheets,"height"))r=parseFloat(n);else{var A=this.getViewBox();if(A){var a=A[2]/A[3];r=this.getWidth(e)/a}else r=Math.min(150,e.viewport.width/2,e.viewport.height)}else r=(n=_t(this.element,e.styleSheets,"height"))?parseFloat(n):e.viewport.height;return this.height=r},t.prototype.getX=function(e){if(this.x!==void 0)return this.x;if(this.isOutermostSvg(e))return this.x=0;var r=_t(this.element,e.styleSheets,"x");return this.x=r?parseFloat(r):0},t.prototype.getY=function(e){if(this.y!==void 0)return this.y;if(this.isOutermostSvg(e))return this.y=0;var r=_t(this.element,e.styleSheets,"y");return this.y=r?parseFloat(r):0},t.prototype.getViewBox=function(){if(this.viewBox!==void 0)return this.viewBox;var e=this.element.getAttribute("viewBox");return this.viewBox=e?MA(e):void 0},t.prototype.isOutermostSvg=function(e){return e.svg2pdfParameters.element===this.element},t})(oN),lN=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.isVisible=function(e,r){return zh(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t})(oN),N9=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.renderCore=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A;return br(this,(function(a){switch(a.label){case 0:return[4,i.prototype.renderCore.call(this,e)];case 1:return a.sent(),(r=_t(this.element,e.styleSheets,"href"))&&(n=this.getBoundingBox(e),s=e.pdf.internal.scaleFactor,A=e.pdf.internal.pageSize.getHeight(),e.pdf.link(s*(n[0]*e.transform.sx+e.transform.tx),A-s*(n[1]*e.transform.sy+e.transform.ty),s*n[2],s*n[3],{url:r})),[2]}}))}))},t})(lN),P9=(function(i){function t(){return i!==null&&i.apply(this,arguments)||this}return ur(t,i),t.prototype.apply=function(e){return yr(this,void 0,void 0,(function(){var r,n,s,A,a;return br(this,(function(o){switch(o.label){case 0:if(!this.isVisible(!0,e))return[2];r=e.pdf.matrixMult(this.computeNodeTransform(e),e.transform),e.pdf.setCurrentTransformationMatrix(r),n=0,s=this.children,o.label=1;case 1:return n<s.length?[4,s[n].render(new Gh(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,withinClipPath:!0,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return A=this.children.length>0&&!!_t(this.children[0].element,e.styleSheets,"clip-rule"),a=A?this.getClipRuleAttr(this.children[0].element,e.styleSheets):this.getClipRuleAttr(this.element,e.styleSheets),e.pdf.clip(a).discardPath(),e.pdf.setCurrentTransformationMatrix(r.inversed()),[2]}}))}))},t.prototype.getBoundingBoxCore=function(e){return LS(e,this)},t.prototype.isVisible=function(e,r){return zh(this,e,r)},t.prototype.getClipRuleAttr=function(e,r){return _t(e,r,"clip-rule")==="evenodd"?"evenodd":void 0},t})(G0);function NS(i,t){var e,r=[];switch((function(s,A){for(var a=[],o=0;o<s.childNodes.length;o++){var l=s.childNodes[o];l.nodeName.charAt(0)!=="#"&&a.push(l)}for(o=0;o<a.length;o++)A(o,a[o])})(i,(function(s,A){return r.push(NS(A,t))})),i.tagName.toLowerCase()){case"a":e=new N9(i,r);break;case"g":e=new lN(i,r);break;case"circle":e=new _9(i,r);break;case"clippath":e=new P9(i,r);break;case"ellipse":e=new F9(i,r);break;case"lineargradient":e=new ZT(i,r);break;case"image":e=new U9(i,r);break;case"line":e=new B9(i,r);break;case"marker":e=new L9(i,r);break;case"path":e=new E9(i,r);break;case"pattern":e=new tN(i,r);break;case"polygon":e=new I9(i,r);break;case"polyline":e=new M9(i,r);break;case"radialgradient":e=new JT(i,r);break;case"rect":e=new x9(i,r);break;case"svg":e=new T9(i,r);break;case"symbol":e=new nN(i,r);break;case"text":e=new S9(i,r);break;case"use":e=new C9(i,r);break;default:e=new Q9(i,r)}if(t!=null&&e.element.hasAttribute("id")){var n=GT(e.element.id,{isIdentifier:!0});t[n]=t[n]||e}return e.children.forEach((function(s){return s.setParent(e)})),e}var D9=(function(){function i(t,e){this.rootSvg=t,this.loadExternalSheets=e,this.styleSheets=[]}return i.prototype.load=function(){return yr(this,void 0,void 0,(function(){var t;return br(this,(function(e){switch(e.label){case 0:return[4,this.collectStyleSheetTexts()];case 1:return t=e.sent(),this.parseCssSheets(t),[2]}}))}))},i.prototype.collectStyleSheetTexts=function(){return yr(this,void 0,void 0,(function(){var t,e,r,n,s;return br(this,(function(A){switch(A.label){case 0:if(t=[],this.loadExternalSheets&&this.rootSvg.ownerDocument)for(n=0;n<this.rootSvg.ownerDocument.childNodes.length;n++)(e=this.rootSvg.ownerDocument.childNodes[n]).nodeName==="xml-stylesheet"&&typeof e.data=="string"&&t.push(i.loadSheet(e.data.match(/href=["'].*?["']/)[0].split("=")[1].slice(1,-1)));for(r=this.rootSvg.querySelectorAll("style,link"),n=0;n<r.length;n++)Vh(s=r[n],"style")?t.push(s.textContent):this.loadExternalSheets&&Vh(s,"link")&&s.getAttribute("rel")==="stylesheet"&&s.hasAttribute("href")&&t.push(i.loadSheet(s.getAttribute("href")));return[4,Promise.all(t)];case 1:return[2,A.sent().filter((function(a){return a!==null}))]}}))}))},i.prototype.parseCssSheets=function(t){for(var e=document.implementation.createHTMLDocument(""),r=0,n=t;r<n.length;r++){var s=n[r],A=e.createElement("style");A.textContent=s,e.body.appendChild(A);var a=A.sheet;if(a instanceof CSSStyleSheet){for(var o=a.cssRules.length-1;o>=0;o--){var l=a.cssRules[o];if(l instanceof CSSStyleRule){var h=l;if(h.selectorText.indexOf(",")>=0){a.deleteRule(o);for(var u=h.cssText.substring(h.selectorText.length),f=i.splitSelectorAtCommas(h.selectorText),d=0;d<f.length;d++)a.insertRule(f[d]+u,o+d)}}else a.deleteRule(o)}this.styleSheets.push(a)}}},i.splitSelectorAtCommas=function(t){for(var e,r=/,|["']/g,n=/[^\\]["]/g,s=/[^\\][']/g,A=[],a="initial",o=-1,l=n,h=0;h<t.length;)switch(a){case"initial":r.lastIndex=h,(e=r.exec(t))?(e[0]===","?(A.push(t.substring(o+1,r.lastIndex-1).trim()),o=r.lastIndex-1):(a="withinQuotes",l=e[0]==='"'?n:s),h=r.lastIndex):(A.push(t.substring(o+1).trim()),h=t.length);break;case"withinQuotes":l.lastIndex=h,(e=l.exec(t))&&(h=l.lastIndex,a="initial")}return A},i.loadSheet=function(t){return new Promise((function(e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="text",n.onload=function(){n.status!==200&&r(new Error("Error ".concat(n.status,": Failed to load '").concat(t,"'"))),e(n.responseText)},n.onerror=r,n.onabort=r,n.send(null)})).catch((function(){return null}))},i.prototype.getPropertyValue=function(t,e){for(var r=[],n=0,s=this.styleSheets;n<s.length;n++)for(var A=s[n],a=0;a<A.cssRules.length;a++){var o=A.cssRules[a];o.style.getPropertyValue(e)&&t.matches(o.selectorText)&&r.push(o)}if(r.length!==0)return r.reduce((function(l,h){return f=h,((d=(u=l).style.getPropertyPriority(e))!==f.style.getPropertyPriority(e)?d==="important"?1:-1:p9(u.selectorText,f.selectorText))===1?l:h;var u,f,d})).style.getPropertyValue(e)||void 0},i})(),O9=(function(){function i(){this.measureMethods={}}return i.prototype.getTextOffset=function(t,e){var r=e.textAnchor;if(r==="start")return 0;var n=this.measureTextWidth(t,e),s=0;switch(r){case"end":s=n;break;case"middle":s=n/2}return s},i.prototype.measureTextWidth=function(t,e){if(t.length===0)return 0;var r=e.fontFamily;return this.getMeasureFunction(r).call(this,t,e.fontFamily,e.fontSize+"px",e.fontStyle,e.fontWeight)},i.prototype.getMeasurementTextNode=function(){if(!this.textMeasuringTextElement){this.textMeasuringTextElement=document.createElementNS(jk,"text");var t=document.createElementNS(jk,"svg");t.appendChild(this.textMeasuringTextElement),t.style.setProperty("position","absolute"),t.style.setProperty("visibility","hidden"),document.body.appendChild(t)}return this.textMeasuringTextElement},i.prototype.canvasTextMeasure=function(t,e,r,n,s){var A=document.createElement("canvas").getContext("2d");return A!=null?(A.font=[n,s,r,e].join(" "),A.measureText(t).width):0},i.prototype.svgTextMeasure=function(t,e,r,n,s,A){A===void 0&&(A=this.getMeasurementTextNode());var a=A;return a.setAttribute("font-family",e),a.setAttribute("font-size",r),a.setAttribute("font-style",n),a.setAttribute("font-weight",s),a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.textContent=t,a.getBBox().width},i.prototype.getMeasureFunction=function(t){var e=this.measureMethods[t];if(!e){var r="16px",n="normal",s="normal",A=this.canvasTextMeasure(i.testString,t,r,n,s),a=this.svgTextMeasure(i.testString,t,r,n,s);e=Math.abs(A-a)<i.epsilon?this.canvasTextMeasure:this.svgTextMeasure,this.measureMethods[t]=e}return e},i.prototype.cleanupTextMeasuring=function(){if(this.textMeasuringTextElement){var t=this.textMeasuringTextElement.parentNode;t&&document.body.removeChild(t),this.textMeasuringTextElement=void 0}},i.testString=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!"$%&/()=?'\\+*-_.:,;^}][{#~|<>`,i.epsilon=.1,i})();function hN(i,t){return yr(this,arguments,void 0,(function(e,r,n){var s,A,a,o,l,h,u,f,d,g,m,y,w,b;return n===void 0&&(n={}),br(this,(function(C){switch(C.label){case 0:return s=(y=n.x)!==null&&y!==void 0?y:0,A=(w=n.y)!==null&&w!==void 0?w:0,a=(b=n.loadExternalStyleSheets)!==null&&b!==void 0&&b,l=new qT(o={}),[4,(h=new D9(e,a)).load()];case 1:return C.sent(),u=new My(r.internal.pageSize.getWidth(),r.internal.pageSize.getHeight()),f=xv(xv({},n),{element:e}),d=new O9,g=new Gh(r,{refsHandler:l,styleSheets:h,viewport:u,svg2pdfParameters:f,textMeasure:d}),r.advancedAPI(),r.saveGraphicsState(),r.setCurrentTransformationMatrix(r.Matrix(1,0,0,1,s,A)),r.setLineWidth(g.attributeState.strokeWidth),m=g.attributeState.fill.color,r.setFillColor(m.r,m.g,m.b),r.setFont(g.attributeState.fontFamily),r.setFontSize(g.attributeState.fontSize*r.internal.scaleFactor),[4,NS(e,o).render(g)];case 2:return C.sent(),r.restoreGraphicsState(),r.compatAPI(),g.textMeasure.cleanupTextMeasuring(),[2,r]}}))}))}ue.API.svg=function(i,t){return t===void 0&&(t={}),hN(i,this,t)};class R9{async convert(t){const e=await this.buildSvg(t),r=sR(t.doc.fileName||t.doc.docTitle,"pdf");await this.downloadAsPdf(e,r)}async buildSvg(t){g3.prepareExport();const e=t.doc.database.tables.blockTable.modelSpace.newIterator(),r=new g3;this.configureRenderer(r,t);for(const n of e)n.worldDraw(r);return r.exportAsync()}configureRenderer(t,e){const r=e.doc.database;t.ltscale=r.ltscale,t.celtscale=r.celtscale,t.showLineWeight=!!r.lwdisplay,t.setFontMapping(AR.instance.fontMapping);const n=e.view,s=(n==null?void 0:n.backgroundColor)??16777215;t.currentBackgroundColor=s,t.changeForeground(s===0?16777215:0)}async downloadAsPdf(t,e){var r;const n=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,s=(r=n.getAttribute("viewBox"))==null?void 0:r.split(" ").map(Number),A=s&&s.length===4?Math.abs(s[2]):297,a=s&&s.length===4?Math.abs(s[3]):210,o=A>=a?"landscape":"portrait",l=new ue({orientation:o,unit:"mm",format:[A,a]});await hN(n,l,{x:0,y:0,width:A,height:a}),l.save(e)}}class H9 extends ZM{async execute(t){await new R9().convert(t)}}const nA=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),fl=[1/0,1/0,-1/0,-1/0],pu=new Float32Array(fl),oF=[.001,0,0,.001,0,0],OB=1.35,tA={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ll={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},_0="pdfjs_internal_editor_",Se={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},_e={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,INK_COLOR_AND_OPACITY:24,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},cN={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Gi={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},Km={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},gi={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},Id={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},q0={ERRORS:0,WARNINGS:1,INFOS:5},Ja={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},Jp={moveTo:0,lineTo:1,curveTo:2,quadraticCurveTo:3,closePath:4},uN={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let Ty=q0.WARNINGS;function V9(i){Number.isInteger(i)&&(Ty=i)}function W9(){return Ty}function Ny(i){Ty>=q0.INFOS&&console.info(`Info: ${i}`)}function Me(i){Ty>=q0.WARNINGS&&console.warn(`Warning: ${i}`)}function rr(i){throw new Error(i)}function Xr(i,t){i||rr(t)}function j9(i){switch(i==null?void 0:i.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function PS(i,t=null,e=null){if(!i)return null;if(e&&typeof i=="string"){if(e.addDefaultProtocol&&i.startsWith("www.")){const n=i.match(/\./g);(n==null?void 0:n.length)>=2&&(i=`http://${i}`)}if(e.tryConvertEncoding)try{i=q9(i)}catch{}}const r=t?URL.parse(i,t):URL.parse(i);return j9(r)?r:null}function DS(i,t,e=!1){const r=URL.parse(i);return r?(r.hash=t,r.href):e&&PS(i,"http://example.com")?i.split("#",1)[0]+`${t?`#${t}`:""}`:""}function lF(i){return i.substring(i.lastIndexOf("/")+1)}function ke(i,t,e,r=!1){return Object.defineProperty(i,t,{value:e,enumerable:!r,configurable:!0,writable:!1}),e}const Hu=(function(){function i(t,e){this.message=t,this.name=e}return i.prototype=new Error,i.constructor=i,i})();class Xk extends Hu{constructor(t,e){super(t,"PasswordException"),this.code=e}}class RB extends Hu{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class Fv extends Hu{constructor(t){super(t,"InvalidPDFException")}}class M0 extends Hu{constructor(t,e,r){super(t,"ResponseException"),this.status=e,this.missing=r}}class K9 extends Hu{constructor(t){super(t,"FormatError")}}class ml extends Hu{constructor(t){super(t,"AbortException")}}function G9(i){(typeof i!="object"||(i==null?void 0:i.length)===void 0)&&rr("Invalid argument for bytesToString");const t=i.length,e=8192;if(t<e)return String.fromCharCode.apply(null,i);const r=[];for(let n=0;n<t;n+=e){const s=Math.min(n+e,t),A=i.subarray(n,s);r.push(String.fromCharCode.apply(null,A))}return r.join("")}function Py(i){typeof i!="string"&&rr("Invalid argument for stringToBytes");const t=i.length,e=new Uint8Array(t);for(let r=0;r<t;++r)e[r]=i.charCodeAt(r)&255;return e}function z9(){const i=new Uint8Array(4);return i[0]=1,new Uint32Array(i.buffer,0,1)[0]===1}class Fi{static get isLittleEndian(){return ke(this,"isLittleEndian",z9())}static get isOffscreenCanvasSupported(){return ke(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return ke(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get isFloat16ArraySupported(){return ke(this,"isFloat16ArraySupported",typeof Float16Array<"u")}static get isSanitizerSupported(){return ke(this,"isSanitizerSupported",typeof Sanitizer<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return ke(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return ke(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}static get isAlphaColorInputSupported(){return ke(this,"isAlphaColorInputSupported",(()=>{if(typeof document>"u")return!1;const t=document.createElement("input");return t.type="color",t.setAttribute("alpha",""),t.value="#ff000080",t.value!=="#ff0000"})())}}var nu,q1,hF;class Nt{static get hexNums(){return ke(this,"hexNums",Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0")))}static makeHexColor(t,e,r){return`#${this.hexNums[t]}${this.hexNums[e]}${this.hexNums[r]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let r;t[0]?(t[0]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[3],e[3]*=t[3]):(r=e[0],e[0]=e[1],e[1]=r,r=e[2],e[2]=e[3],e[3]=r,t[1]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,r=0){const n=t[r],s=t[r+1];t[r]=n*e[0]+s*e[2]+e[4],t[r+1]=n*e[1]+s*e[3]+e[5]}static applyTransformToBezier(t,e,r=0){const n=e[0],s=e[1],A=e[2],a=e[3],o=e[4],l=e[5];for(let h=0;h<6;h+=2){const u=t[r+h],f=t[r+h+1];t[r+h]=u*n+f*A+o,t[r+h+1]=u*s+f*a+l}}static applyInverseTransform(t,e){const r=t[0],n=t[1],s=e[0]*e[3]-e[1]*e[2];t[0]=(r*e[3]-n*e[2]+e[2]*e[5]-e[4]*e[3])/s,t[1]=(-r*e[1]+n*e[0]+e[4]*e[1]-e[5]*e[0])/s}static axialAlignedBoundingBox(t,e,r){const n=e[0],s=e[1],A=e[2],a=e[3],o=e[4],l=e[5],h=t[0],u=t[1],f=t[2],d=t[3];let g=n*h+o,m=g,y=n*f+o,w=y,b=a*u+l,C=b,S=a*d+l,k=S;if(s!==0||A!==0){const I=s*h,N=s*f,D=A*u,Q=A*d;g+=D,w+=D,y+=Q,m+=Q,b+=I,k+=I,S+=N,C+=N}r[0]=Math.min(r[0],g,y,m,w),r[1]=Math.min(r[1],b,S,C,k),r[2]=Math.max(r[2],g,y,m,w),r[3]=Math.max(r[3],b,S,C,k)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const r=t[0],n=t[1],s=t[2],A=t[3],a=r**2+n**2,o=r*s+n*A,l=s**2+A**2,h=(a+l)/2,u=Math.sqrt(h**2-(a*l-o**2));e[0]=Math.sqrt(h+u||1),e[1]=Math.sqrt(h-u||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const r=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),n=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(r>n)return null;const s=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),A=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return s>A?null:[r,s,n,A]}static pointBoundingBox(t,e,r){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}static rectBoundingBox(t,e,r,n,s){s[0]=Math.min(s[0],t,r),s[1]=Math.min(s[1],e,n),s[2]=Math.max(s[2],t,r),s[3]=Math.max(s[3],e,n)}static bezierBoundingBox(t,e,r,n,s,A,a,o,l){l[0]=Math.min(l[0],t,a),l[1]=Math.min(l[1],e,o),l[2]=Math.max(l[2],t,a),l[3]=Math.max(l[3],e,o),_(this,nu,hF).call(this,t,r,s,a,e,n,A,o,3*(-t+3*(r-s)+a),6*(t-2*r+s),3*(r-t),l),_(this,nu,hF).call(this,t,r,s,a,e,n,A,o,3*(-e+3*(n-A)+o),6*(e-2*n+A),3*(n-e),l)}}nu=new WeakSet,q1=function(i,t,e,r,n,s,A,a,o,l){if(o<=0||o>=1)return;const h=1-o,u=o*o,f=u*o,d=h*(h*(h*i+3*o*t)+3*u*e)+f*r,g=h*(h*(h*n+3*o*s)+3*u*A)+f*a;l[0]=Math.min(l[0],d),l[1]=Math.min(l[1],g),l[2]=Math.max(l[2],d),l[3]=Math.max(l[3],g)},hF=function(i,t,e,r,n,s,A,a,o,l,h,u){if(Math.abs(o)<1e-12){Math.abs(l)>=1e-12&&_(this,nu,q1).call(this,i,t,e,r,n,s,A,a,-h/l,u);return}const f=l**2-4*h*o;if(f<0)return;const d=Math.sqrt(f),g=2*o;_(this,nu,q1).call(this,i,t,e,r,n,s,A,a,(-l+d)/g,u),_(this,nu,q1).call(this,i,t,e,r,n,s,A,a,(-l-d)/g,u)},U(Nt,nu);function q9(i){return decodeURIComponent(escape(i))}let HB=null,Yk=null;function dN(i){return HB||(HB=/([\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,Yk=new Map([["ſt","ſt"]])),i.replaceAll(HB,(t,e,r)=>e?e.normalize("NFKC"):Yk.get(r))}function OS(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const i=new Uint8Array(32);return crypto.getRandomValues(i),G9(i)}const sp="pdfjs_internal_id_";function X9(i,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[r,n,...s]=e;if(!i(r)&&!Number.isInteger(r)||!t(n))return!1;const A=s.length;let a=!0;switch(n.name){case"XYZ":if(A<2||A>3)return!1;break;case"Fit":case"FitB":return A===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(A>1)return!1;break;case"FitR":if(A!==4)return!1;a=!1;break;default:return!1}for(const o of s)if(!(typeof o=="number"||a&&o===null))return!1;return!0}const Dy=()=>[],Oy=()=>new Map,Sv=()=>Object.create(null);function Mr(i,t,e){return Math.min(Math.max(i,t),e)}class T0{static textContent(t){const e=[],r={items:e,styles:Object.create(null)};function n(s){var A;if(!s)return;let a=null;const o=s.name;if(o==="#text")a=s.value;else if(T0.shouldBuildText(o))(A=s==null?void 0:s.attributes)!=null&&A.textContent?a=s.attributes.textContent:s.value&&(a=s.value);else return;if(a!==null&&e.push({str:a}),!!s.children)for(const l of s.children)n(l)}return n(t),r}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}class RS{static setupStorage(t,e,r,n,s){const A=n.getValue(e,{value:null});switch(r.name){case"textarea":if(A.value!==null&&(t.textContent=A.value),s==="print")break;t.addEventListener("input",a=>{n.setValue(e,{value:a.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(A.value===r.attributes.xfaOn?t.setAttribute("checked",!0):A.value===r.attributes.xfaOff&&t.removeAttribute("checked"),s==="print")break;t.addEventListener("change",a=>{n.setValue(e,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})})}else{if(A.value!==null&&t.setAttribute("value",A.value),s==="print")break;t.addEventListener("input",a=>{n.setValue(e,{value:a.target.value})})}break;case"select":if(A.value!==null){t.setAttribute("value",A.value);for(const a of r.children)a.attributes.value===A.value?a.attributes.selected=!0:Object.hasOwn(a.attributes,"selected")&&delete a.attributes.selected}t.addEventListener("input",a=>{const o=a.target.options,l=o.selectedIndex===-1?"":o[o.selectedIndex].value;n.setValue(e,{value:l})});break}}static setAttributes({html:t,element:e,storage:r=null,intent:n,linkService:s}){const{attributes:A}=e,a=t instanceof HTMLAnchorElement;A.type==="radio"&&(A.name=`${A.name}-${n}`);for(const[o,l]of Object.entries(A))if(l!=null)switch(o){case"class":l.length&&t.setAttribute(o,l.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",l);break;case"style":Object.assign(t.style,l);break;case"textContent":t.textContent=l;break;default:(!a||o!=="href"&&o!=="newWindow")&&t.setAttribute(o,l)}a&&s.addLinkAttributes(t,A.href,A.newWindow),r&&A.dataId&&this.setupStorage(t,A.dataId,e,r)}static render(t){var e,r;const n=t.annotationStorage,s=t.linkService,A=t.xfaHtml,a=t.intent||"display",o=document.createElement(A.name);A.attributes&&this.setAttributes({html:o,element:A,intent:a,linkService:s});const l=a!=="richText",h=t.div;if(h.append(o),t.viewport){const d=`matrix(${t.viewport.transform.join(",")})`;h.style.transform=d}l&&h.setAttribute("class","xfaLayer xfaFont");const u=[];if(A.children.length===0){if(A.value){const d=document.createTextNode(A.value);o.append(d),l&&T0.shouldBuildText(A.name)&&u.push(d)}return{textDivs:u}}const f=[[A,-1,o]];for(;f.length>0;){const[d,g,m]=f.at(-1);if(g+1===d.children.length){f.pop();continue}const y=d.children[++f.at(-1)[1]];if(y===null)continue;const{name:w}=y;if(w==="#text"){const C=document.createTextNode(y.value);u.push(C),m.append(C);continue}const b=(e=y==null?void 0:y.attributes)!=null&&e.xmlns?document.createElementNS(y.attributes.xmlns,w):document.createElement(w);if(m.append(b),y.attributes&&this.setAttributes({html:b,element:y,storage:n,intent:a,linkService:s}),((r=y.children)==null?void 0:r.length)>0)f.push([y,-1,b]);else if(y.value){const C=document.createTextNode(y.value);l&&T0.shouldBuildText(w)&&u.push(C),b.append(C)}}for(const d of h.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))d.setAttribute("readOnly",!0);return{textDivs:u}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const Lo="http://www.w3.org/2000/svg",Qd=class{};ut(Qd,"CSS",96),ut(Qd,"PDF",72),ut(Qd,"PDF_TO_CSS_UNITS",Qd.CSS/Qd.PDF);let Pu=Qd;async function Ry(i,t="text"){if(Gm(i,document.baseURI)){const e=await fetch(i);if(!e.ok)throw new Error(e.statusText);switch(t){case"blob":return e.blob();case"bytes":return e.bytes();case"json":return e.json()}return e.text()}return new Promise((e,r)=>{const n=new XMLHttpRequest;n.open("GET",i,!0),n.responseType=t==="bytes"?"arraybuffer":t,n.onreadystatechange=()=>{if(n.readyState===XMLHttpRequest.DONE){if(n.status===200||n.status===0){switch(t){case"bytes":e(new Uint8Array(n.response));return;case"blob":case"json":e(n.response);return}e(n.responseText);return}r(new Error(n.statusText))}},n.send(null)})}class X0{constructor({viewBox:t,userUnit:e,scale:r,rotation:n,offsetX:s=0,offsetY:A=0,dontFlip:a=!1}){this.viewBox=t,this.userUnit=e,this.scale=r,this.rotation=n,this.offsetX=s,this.offsetY=A,r*=e;const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2;let h,u,f,d;switch(n%=360,n<0&&(n+=360),n){case 180:h=-1,u=0,f=0,d=1;break;case 90:h=0,u=1,f=1,d=0;break;case 270:h=0,u=-1,f=-1,d=0;break;case 0:h=1,u=0,f=0,d=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(f=-f,d=-d);let g,m,y,w;h===0?(g=Math.abs(l-t[1])*r+s,m=Math.abs(o-t[0])*r+A,y=(t[3]-t[1])*r,w=(t[2]-t[0])*r):(g=Math.abs(o-t[0])*r+s,m=Math.abs(l-t[1])*r+A,y=(t[2]-t[0])*r,w=(t[3]-t[1])*r),this.transform=[h*r,u*r,f*r,d*r,g-h*r*o-f*r*l,m-u*r*o-d*r*l],this.width=y,this.height=w}get rawDims(){const t=this.viewBox;return ke(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:r=this.offsetX,offsetY:n=this.offsetY,dontFlip:s=!1}={}){return new X0({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:r,offsetY:n,dontFlip:s})}convertToViewportPoint(t,e){const r=[t,e];return Nt.applyTransform(r,this.transform),r}convertToViewportRectangle(t){const e=[t[0],t[1]];Nt.applyTransform(e,this.transform);const r=[t[2],t[3]];return Nt.applyTransform(r,this.transform),[e[0],e[1],r[0],r[1]]}convertToPdfPoint(t,e){const r=[t,e];return Nt.applyInverseTransform(r,this.transform),r}}class Hy extends Hu{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function Y0(i){const t=i.length;let e=0;for(;e<t&&i[e].trim()==="";)e++;return i.substring(e,e+5).toLowerCase()==="data:"}function Vy(i){return typeof i=="string"&&/\.pdf$/i.test(i)}function fN(i){return[i]=i.split(/[#?]/,1),lF(i)}function pN(i,t="document.pdf"){if(typeof i!="string")return t;if(Y0(i))return Me('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const e=(A=>{try{return new URL(A)}catch{try{return new URL(decodeURIComponent(A))}catch{try{return new URL(A,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(A),"https://foo.bar")}catch{return null}}}}})(i);if(!e)return t;const r=A=>{try{let a=decodeURIComponent(A);return a.includes("/")&&(a=lF(a),/^\.pdf$/i.test(a))?A:a}catch{return A}},n=/\.pdf$/i,s=lF(e.pathname);if(n.test(s))return r(s);if(e.searchParams.size>0){const A=o=>[...o].findLast(l=>n.test(l)),a=A(e.searchParams.values())??A(e.searchParams.keys());if(a)return r(a)}if(e.hash){const A=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(e.hash);if(A)return r(A[0])}return t}var pc;class $k{constructor(){U(this,pc,new Map),ut(this,"times",[])}time(t){c(this,pc).has(t)&&Me(`Timer is already running for ${t}`),c(this,pc).set(t,Date.now())}timeEnd(t){c(this,pc).has(t)||Me(`Timer has not been started for ${t}`),this.times.push({name:t,start:c(this,pc).get(t),end:Date.now()}),c(this,pc).delete(t)}toString(){const t=Math.max(...this.times.map(e=>e.name.length));return this.times.map(e=>`${e.name.padEnd(t)} ${e.end-e.start}ms
|
|
219
|
-
`).join("")}}pc=new WeakMap;function Gm(i,t){const e=t?URL.parse(i,t):URL.parse(i);return/https?:/.test((e==null?void 0:e.protocol)??"")}function AA(i){i.preventDefault()}function Hr(i){i.preventDefault(),i.stopPropagation()}function Y9(i){console.log("Deprecated API usage: "+i)}var zm;class N0{static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;c(this,zm)||F(this,zm,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=c(this,zm).exec(t);if(!e)return null;const r=parseInt(e[1],10);let n=parseInt(e[2],10);n=n>=1&&n<=12?n-1:0;let s=parseInt(e[3],10);s=s>=1&&s<=31?s:1;let A=parseInt(e[4],10);A=A>=0&&A<=23?A:0;let a=parseInt(e[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(e[6],10);o=o>=0&&o<=59?o:0;const l=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let u=parseInt(e[9],10)||0;return u=u>=0&&u<=59?u:0,l==="-"?(A+=h,a+=u):l==="+"&&(A-=h,a-=u),new Date(Date.UTC(r,n,s,A,a,o))}}zm=new WeakMap,U(N0,zm);function gN(i,{scale:t=1,rotation:e=0}){const{width:r,height:n}=i.attributes.style,s=[0,0,parseInt(r,10),parseInt(n,10)];return new X0({viewBox:s,userUnit:1,scale:t,rotation:e})}function Wy(i){if(i.startsWith("#")){const e=i.slice(1);return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),e.length>=8?parseInt(e.slice(6,8),16)/255:1]}if(i.startsWith("rgb(")){const[e,r,n]=i.slice(4,-1).split(",").map(s=>parseInt(s,10));return[e,r,n,1]}if(i.startsWith("rgba(")){const e=i.slice(5,-1).split(",");return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseFloat(e[3])]}const t=i.match(/^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+|none))?\)$/);return t?[Math.round(parseFloat(t[1])*255),Math.round(parseFloat(t[2])*255),Math.round(parseFloat(t[3])*255),t[4]!==void 0&&t[4]!=="none"?parseFloat(t[4]):1]:null}function Sp(i){const t=Wy(i);return t?t.slice(0,3):(Me(`Not a valid color format: "${i}"`),[0,0,0])}function $9(i){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const e of i.keys()){t.style.color=e;const r=window.getComputedStyle(t).color;i.set(e,Sp(r))}t.remove()}function Qr(i){const{a:t,b:e,c:r,d:n,e:s,f:A}=i.getTransform();return[t,e,r,n,s,A]}function Qa(i){const{a:t,b:e,c:r,d:n,e:s,f:A}=i.getTransform().invertSelf();return[t,e,r,n,s,A]}function Wh(i,t,e=!1,r=!0){if(t instanceof X0){const{pageWidth:n,pageHeight:s}=t.rawDims,{style:A}=i,a=Fi.isCSSRoundSupported,o=`var(--total-scale-factor) * ${n}px`,l=`var(--total-scale-factor) * ${s}px`,h=a?`round(down, ${o}, var(--scale-round-x))`:`calc(${o})`,u=a?`round(down, ${l}, var(--scale-round-y))`:`calc(${l})`;!e||t.rotation%180===0?(A.width=h,A.height=u):(A.width=u,A.height=h)}r&&i.setAttribute("data-main-rotation",t.rotation)}class pa{constructor(){const{pixelRatio:t}=pa;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,e,r,n,s=-1){let A=1/0,a=1/0,o=1/0;r=pa.capPixels(r,s),r>0&&(A=Math.sqrt(r/(t*e))),n!==-1&&(a=n/t,o=n/e);const l=Math.min(A,a,o);return this.sx>l||this.sy>l?(this.sx=l,this.sy=l,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,e){if(e>=0){const r=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+e/100));return t>0?Math.min(t,r):r}return t}}const jy=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class Z9{static get isDarkMode(){var t;return ke(this,"isDarkMode",!!((t=window==null?void 0:window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches))}}class mN{static get commentForegroundColor(){const t=document.createElement("span");t.classList.add("comment","sidebar");const{style:e}=t;e.width=e.height="0",e.display="none",e.color="var(--comment-fg-color)",document.body.append(t);const{color:r}=window.getComputedStyle(t);return t.remove(),ke(this,"commentForegroundColor",Sp(r))}}function wN(i,t){t=Mr(t??1,0,1);const e=255*(1-t);return i.map(r=>Math.round(r*t+e))}function Zk(i,t){const e=i[0]/255,r=i[1]/255,n=i[2]/255,s=Math.max(e,r,n),A=Math.min(e,r,n),a=(s+A)/2;if(s===A)t[0]=t[1]=0;else{const o=s-A;switch(t[1]=a<.5?o/(s+A):o/(2-s-A),s){case e:t[0]=((r-n)/o+(r<n?6:0))*60;break;case r:t[0]=((n-e)/o+2)*60;break;case n:t[0]=((e-r)/o+4)*60;break}}t[2]=a}function cF(i,t){const e=i[0],r=i[1],n=i[2],s=(1-Math.abs(2*n-1))*r,A=s*(1-Math.abs(e/60%2-1)),a=n-s/2;switch(Math.floor(e/60)){case 0:t[0]=s+a,t[1]=A+a,t[2]=a;break;case 1:t[0]=A+a,t[1]=s+a,t[2]=a;break;case 2:t[0]=a,t[1]=s+a,t[2]=A+a;break;case 3:t[0]=a,t[1]=A+a,t[2]=s+a;break;case 4:t[0]=A+a,t[1]=a,t[2]=s+a;break;case 5:case 6:t[0]=s+a,t[1]=a,t[2]=A+a;break}}function Jk(i){return i<=.03928?i/12.92:((i+.055)/1.055)**2.4}function tU(i,t,e){cF(i,e),e.map(Jk);const r=.2126*e[0]+.7152*e[1]+.0722*e[2];cF(t,e),e.map(Jk);const n=.2126*e[0]+.7152*e[1]+.0722*e[2];return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)}const eU=new Map;function vN(i,t){const e=i[0]+i[1]*256+i[2]*65536+t[0]*16777216+t[1]*4294967296+t[2]*1099511627776;let r=eU.get(e);if(r)return r;const n=new Float32Array(9),s=n.subarray(0,3),A=n.subarray(3,6);Zk(i,A);const a=n.subarray(6,9);Zk(t,a);const o=a[2]<.5,l=o?12:4.5;if(A[2]=o?Math.sqrt(A[2]):1-Math.sqrt(1-A[2]),tU(A,a,s)<l){let h,u;o?(h=A[2],u=1):(h=0,u=A[2]);const f=.005;for(;u-h>f;){const d=A[2]=(h+u)/2;o===tU(A,a,s)<l?h=d:u=d}A[2]=o?u:h}return cF(A,s),r=Nt.makeHexColor(Math.round(s[0]*255),Math.round(s[1]*255),Math.round(s[2]*255)),eU.set(e,r),r}function HS({html:i,dir:t,className:e},r){const n=document.createDocumentFragment();if(typeof i=="string"){const s=document.createElement("p");s.dir=t||"auto";const A=i.split(/(?:\r\n?|\n)/);for(let a=0,o=A.length;a<o;++a){const l=A[a];s.append(document.createTextNode(l)),a<o-1&&s.append(document.createElement("br"))}n.append(s)}else RS.render({xfaHtml:i,div:n,intent:"richText"});n.firstElementChild.classList.add("richText",e),r.append(n)}function yN(i){const t=new Path2D;if(!i)return t;for(let e=0,r=i.length;e<r;)switch(i[e++]){case Jp.moveTo:t.moveTo(i[e++],i[e++]);break;case Jp.lineTo:t.lineTo(i[e++],i[e++]);break;case Jp.curveTo:t.bezierCurveTo(i[e++],i[e++],i[e++],i[e++],i[e++],i[e++]);break;case Jp.quadraticCurveTo:t.quadraticCurveTo(i[e++],i[e++],i[e++],i[e++]);break;case Jp.closePath:t.closePath();break;default:Me(`Unrecognized drawing path operator: ${i[e-1]}`);break}return t}var gc,mc,la,qA,Vw,wc,mg,wg,qm,uF,bN,Js,rU,iU,Ld,vg;const dF=class yg{constructor(t){U(this,Js),U(this,gc,null),U(this,mc,null),U(this,la),U(this,qA,null),U(this,Vw,null),U(this,wc,null),U(this,mg,null),U(this,wg,null),F(this,la,t),c(yg,qm)||F(yg,qm,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const t=F(this,gc,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=c(this,la)._uiManager._signal;e instanceof AbortSignal&&!e.aborted&&(t.addEventListener("contextmenu",AA,{signal:e}),t.addEventListener("pointerdown",_(yg,uF,bN),{signal:e}));const r=F(this,qA,document.createElement("div"));r.className="buttons",t.append(r);const n=c(this,la).toolbarPosition;if(n){const{style:s}=t,A=c(this,la)._uiManager.direction==="ltr"?1-n[0]:n[0];s.insetInlineEnd=`${100*A}%`,s.top=`calc(${100*n[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return c(this,gc)}hide(){var t;c(this,gc).classList.add("hidden"),(t=c(this,mc))==null||t.hideDropdown()}show(){var t,e;c(this,gc).classList.remove("hidden"),(t=c(this,Vw))==null||t.shown(),(e=c(this,wc))==null||e.shown()}addDeleteButton(){const{editorType:t,_uiManager:e}=c(this,la),r=document.createElement("button");r.classList.add("basic","deleteButton"),r.tabIndex=0,r.setAttribute("data-l10n-id",c(yg,qm)[t]),_(this,Js,Ld).call(this,r)&&r.addEventListener("click",n=>{e.delete()},{signal:e._signal}),c(this,qA).append(r)}async addAltText(t){const e=await t.render();_(this,Js,Ld).call(this,e),c(this,qA).append(e,c(this,Js,vg)),F(this,Vw,t)}addComment(t,e=null){if(c(this,wc))return;const r=t.renderForToolbar();if(!r)return;_(this,Js,Ld).call(this,r);const n=F(this,mg,c(this,Js,vg));e?(c(this,qA).insertBefore(r,e),c(this,qA).insertBefore(n,e)):c(this,qA).append(r,n),F(this,wc,t),t.toolbar=this}addColorPicker(t){if(c(this,mc))return;F(this,mc,t);const e=t.renderButton();_(this,Js,Ld).call(this,e),c(this,qA).append(e,c(this,Js,vg))}async addEditSignatureButton(t){const e=F(this,wg,await t.renderEditButton(c(this,la)));_(this,Js,Ld).call(this,e),c(this,qA).append(e,c(this,Js,vg))}removeButton(t){var e,r;switch(t){case"comment":(e=c(this,wc))==null||e.removeToolbarCommentButton(),F(this,wc,null),(r=c(this,mg))==null||r.remove(),F(this,mg,null);break}}async addButton(t,e){switch(t){case"colorPicker":e&&this.addColorPicker(e);break;case"altText":e&&await this.addAltText(e);break;case"editSignature":e&&await this.addEditSignatureButton(e);break;case"delete":this.addDeleteButton();break;case"comment":e&&this.addComment(e);break}}async addButtonBefore(t,e,r){if(!e&&t==="comment")return;const n=c(this,qA).querySelector(r);n&&t==="comment"&&this.addComment(e,n)}updateEditSignatureButton(t){c(this,wg)&&(c(this,wg).title=t)}remove(){var t;c(this,gc).remove(),(t=c(this,mc))==null||t.destroy(),F(this,mc,null)}};gc=new WeakMap,mc=new WeakMap,la=new WeakMap,qA=new WeakMap,Vw=new WeakMap,wc=new WeakMap,mg=new WeakMap,wg=new WeakMap,qm=new WeakMap,uF=new WeakSet,bN=function(i){i.stopPropagation()},Js=new WeakSet,rU=function(i){c(this,la)._focusEventsAllowed=!1,Hr(i)},iU=function(i){c(this,la)._focusEventsAllowed=!0,Hr(i)},Ld=function(i){const t=c(this,la)._uiManager._signal;return!(t instanceof AbortSignal)||t.aborted?!1:(i.addEventListener("focusin",_(this,Js,rU).bind(this),{capture:!0,signal:t}),i.addEventListener("focusout",_(this,Js,iU).bind(this),{capture:!0,signal:t}),i.addEventListener("contextmenu",AA,{signal:t}),!0)},vg=function(){const i=document.createElement("div");return i.className="divider",i},U(dF,uF),U(dF,qm,null);let J9=dF;var Ww,su,lh,Ap,BN,CN,VB;class tV{constructor(t){U(this,Ap),U(this,Ww,null),U(this,su,null),U(this,lh),F(this,lh,t)}show(t,e,r){const[n,s]=_(this,Ap,CN).call(this,e,r),{style:A}=c(this,su)||F(this,su,_(this,Ap,BN).call(this));t.append(c(this,su)),A.insetInlineEnd=`${100*n}%`,A.top=`calc(${100*s}% + var(--editor-toolbar-vert-offset))`}hide(){c(this,su).remove()}}Ww=new WeakMap,su=new WeakMap,lh=new WeakMap,Ap=new WeakSet,BN=function(){const i=F(this,su,document.createElement("div"));i.className="editToolbar",i.setAttribute("role","toolbar");const t=c(this,lh)._signal;t instanceof AbortSignal&&!t.aborted&&i.addEventListener("contextmenu",AA,{signal:t});const e=F(this,Ww,document.createElement("div"));return e.className="buttons",i.append(e),c(this,lh).hasCommentManager()&&_(this,Ap,VB).call(this,"commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{c(this,lh).commentSelection("floating_button")}),_(this,Ap,VB).call(this,"highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{c(this,lh).highlightSelection("floating_button")}),i},CN=function(i,t){let e=0,r=0;for(const n of i){const s=n.y+n.height;if(s<e)continue;const A=n.x+(t?n.width:0);if(s>e){r=A,e=s;continue}t?A>r&&(r=A):A<r&&(r=A)}return[t?1-r:r,e]},VB=function(i,t,e,r){const n=document.createElement("button");n.classList.add("basic",i),n.tabIndex=0,n.setAttribute("data-l10n-id",t);const s=document.createElement("span");n.append(s),s.className="visuallyHidden",s.setAttribute("data-l10n-id",e);const A=c(this,lh)._signal;A instanceof AbortSignal&&!A.aborted&&(n.addEventListener("contextmenu",AA,{signal:A}),n.addEventListener("click",r,{signal:A})),c(this,Ww).append(n)};function xN(i,t,e){for(const r of e)t.addEventListener(r,i[r].bind(i))}var Au,au,Xm,ou;const bg=class Qi{static initializeAndAddPointerId(t){(c(Qi,au)||F(Qi,au,new Set)).add(t)}static setPointer(t,e){c(Qi,Au)||F(Qi,Au,e),c(Qi,ou)??F(Qi,ou,t)}static setTimeStamp(t){F(Qi,Xm,t)}static isSamePointerId(t){return c(Qi,Au)===t}static isSamePointerIdOrRemove(t){var e;return c(Qi,Au)===t?!0:((e=c(Qi,au))==null||e.delete(t),!1)}static isSamePointerType(t){return c(Qi,ou)===t}static isInitializedAndDifferentPointerType(t){return c(Qi,ou)!==null&&!Qi.isSamePointerType(t)}static isSameTimeStamp(t){return c(Qi,Xm)===t}static isUsingMultiplePointers(){var t;return((t=c(Qi,au))==null?void 0:t.size)>=1}static clearPointerType(){F(Qi,ou,null)}static clearPointerIds(){F(Qi,Au,NaN),F(Qi,au,null)}static clearTimeStamp(){F(Qi,Xm,NaN)}};Au=new WeakMap,au=new WeakMap,Xm=new WeakMap,ou=new WeakMap,U(bg,Au,NaN),U(bg,au,null),U(bg,Xm,NaN),U(bg,ou,null);let Bs=bg;var fF;class eV{constructor(){U(this,fF,0)}get id(){return`${_0}${$i(this,fF)._++}`}}fF=new WeakMap;var Ym,Ev,zi,Bg,jw;const FN=class{constructor(){U(this,Bg),U(this,Ym,OS()),U(this,Ev,0),U(this,zi,null)}static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),r=new Image;r.src=t;const n=r.decode().then(()=>(e.drawImage(r,0,0,1,1,0,0,1,3),new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]===0));return ke(this,"_isSVGFittingCanvas",n)}async getFromFile(t){const{lastModified:e,name:r,size:n,type:s}=t;return _(this,Bg,jw).call(this,`${e}_${r}_${n}_${s}`,t)}async getFromUrl(t){return _(this,Bg,jw).call(this,t,t)}async getFromBlob(t,e){const r=await e;return _(this,Bg,jw).call(this,t,r)}async getFromId(t){c(this,zi)||F(this,zi,new Map);const e=c(this,zi).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:r}=e;return delete e.blobPromise,this.getFromBlob(e.id,r)}return this.getFromUrl(e.url)}getFromCanvas(t,e){c(this,zi)||F(this,zi,new Map);let r=c(this,zi).get(t);if(r!=null&&r.bitmap)return r.refCounter+=1,r;const n=new OffscreenCanvas(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),r={bitmap:n.transferToImageBitmap(),id:`image_${c(this,Ym)}_${$i(this,Ev)._++}`,refCounter:1,isSvg:!1},c(this,zi).set(t,r),c(this,zi).set(r.id,r),r}getSvgUrl(t){const e=c(this,zi).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var e;c(this,zi)||F(this,zi,new Map);const r=c(this,zi).get(t);if(!r||(r.refCounter-=1,r.refCounter!==0))return;const{bitmap:n}=r;if(!r.url&&!r.file){const s=new OffscreenCanvas(n.width,n.height);s.getContext("bitmaprenderer").transferFromImageBitmap(n),r.blobPromise=s.convertToBlob()}(e=n.close)==null||e.call(n),r.bitmap=null}isValidId(t){return t.startsWith(`image_${c(this,Ym)}_`)}};Ym=new WeakMap,Ev=new WeakMap,zi=new WeakMap,Bg=new WeakSet,jw=async function(i,t){c(this,zi)||F(this,zi,new Map);let e=c(this,zi).get(i);if(e===null)return null;if(e!=null&&e.bitmap)return e.refCounter+=1,e;try{e||(e={bitmap:null,id:`image_${c(this,Ym)}_${$i(this,Ev)._++}`,refCounter:0,isSvg:!1});let r;if(typeof t=="string"?(e.url=t,r=await Ry(t,"blob")):t instanceof File?r=e.file=t:t instanceof Blob&&(r=t),r.type==="image/svg+xml"){const n=FN._isSVGFittingCanvas,s=new FileReader,A=new Image,a=new Promise((o,l)=>{A.onload=()=>{e.bitmap=A,e.isSvg=!0,o()},s.onload=async()=>{const h=e.svgUrl=s.result;A.src=await n?`${h}#svgView(preserveAspectRatio(none))`:h},A.onerror=s.onerror=l});s.readAsDataURL(r),await a}else e.bitmap=await createImageBitmap(r);e.refCounter=1}catch(r){Me(r),e=null}return c(this,zi).set(i,e),e&&c(this,zi).set(e.id,e),e};let rV=FN;var Li,vc,Kw,Dr;class iV{constructor(t=128){U(this,Li,[]),U(this,vc,!1),U(this,Kw),U(this,Dr,-1),F(this,Kw,t)}add({cmd:t,undo:e,post:r,mustExec:n,type:s=NaN,overwriteIfSameType:A=!1,keepUndo:a=!1}){if(n&&t(),c(this,vc))return;const o={cmd:t,undo:e,post:r,type:s};if(c(this,Dr)===-1){c(this,Li).length>0&&(c(this,Li).length=0),F(this,Dr,0),c(this,Li).push(o);return}if(A&&c(this,Li)[c(this,Dr)].type===s){a&&(o.undo=c(this,Li)[c(this,Dr)].undo),c(this,Li)[c(this,Dr)]=o;return}const l=c(this,Dr)+1;l===c(this,Kw)?c(this,Li).splice(0,1):(F(this,Dr,l),l<c(this,Li).length&&c(this,Li).splice(l)),c(this,Li).push(o)}undo(){if(c(this,Dr)===-1)return;F(this,vc,!0);const{undo:t,post:e}=c(this,Li)[c(this,Dr)];t(),e==null||e(),F(this,vc,!1),F(this,Dr,c(this,Dr)-1)}redo(){if(c(this,Dr)<c(this,Li).length-1){F(this,Dr,c(this,Dr)+1),F(this,vc,!0);const{cmd:t,post:e}=c(this,Li)[c(this,Dr)];t(),e==null||e(),F(this,vc,!1)}}hasSomethingToUndo(){return c(this,Dr)!==-1}hasSomethingToRedo(){return c(this,Dr)<c(this,Li).length-1}cleanType(t){if(c(this,Dr)!==-1){for(let e=c(this,Dr);e>=0;e--)if(c(this,Li)[e].type!==t){c(this,Li).splice(e+1,c(this,Dr)-e),F(this,Dr,e);return}c(this,Li).length=0,F(this,Dr,-1)}}destroy(){F(this,Li,null)}}Li=new WeakMap,vc=new WeakMap,Kw=new WeakMap,Dr=new WeakMap;var pF,SN;class $0{constructor(t){U(this,pF),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=Fi.platform;for(const[r,n,s={}]of t)for(const A of r){const a=A.startsWith("mac+");e&&a?(this.callbacks.set(A.slice(4),{callback:n,options:s}),this.allKeys.add(A.split("+").at(-1))):!e&&!a&&(this.callbacks.set(A,{callback:n,options:s}),this.allKeys.add(A.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;const r=this.callbacks.get(_(this,pF,SN).call(this,e));if(!r)return;const{callback:n,options:{bubbles:s=!1,args:A=[],checker:a=null}}=r;a&&!a(t,e)||(n.bind(t,...A,e)(),s||Hr(e))}}pF=new WeakSet,SN=function(i){i.altKey&&this.buffer.push("alt"),i.ctrlKey&&this.buffer.push("ctrl"),i.metaKey&&this.buffer.push("meta"),i.shiftKey&&this.buffer.push("shift"),this.buffer.push(i.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const EN=class kN{get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return $9(t),ke(this,"_colors",t)}convert(t){const e=Sp(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[r,n]of this._colors)if(n.every((s,A)=>s===e[A]))return kN._colorsMapping.get(r);return e}getHexCode(t){const e=this._colors.get(t);return e?Nt.makeHexColor(...e):t}};ut(EN,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let nV=EN;var Cg,fA,_d,wi,ri,xg,Fg,Cs,Md,XA,ln,yc,bc,Bc,Cc,_o,YA,Td,kv,Gw,Sg,zw,Mo,xc,Eg,lu,za,gF,wh,$m,qw,Fc,Nd,kg,Hl,Xw,qi,lr,Vl,Sc,Ec,Ug,Ig,Yw,kc,To,Wl,$w,Zw,$A,ge,Jw,mF,UN,nU,sU,Zm,IN,QN,LN,wF,_N,MN,TN,NN,os,qo,PN,DN,vF,ON,Qg,yF;const bF=class BF{constructor(t,e,r,n,s,A,a,o,l,h,u,f,d,g,m,y){U(this,ge),U(this,Cg,new AbortController),U(this,fA,null),U(this,_d,null),U(this,wi,new Map),U(this,ri,new Map),U(this,xg,null),U(this,Fg,null),U(this,Cs,null),U(this,Md,null),U(this,XA,new iV),U(this,ln,null),U(this,yc,null),U(this,bc,null),U(this,Bc,0),U(this,Cc,new Set),U(this,_o,null),U(this,YA,null),U(this,Td,new Set),ut(this,"_editorUndoBar",null),U(this,kv,!1),U(this,Gw,!1),U(this,Sg,!1),U(this,zw,null),U(this,Mo,null),U(this,xc,null),U(this,Eg,null),U(this,lu,!1),U(this,za,null),U(this,gF,new eV),U(this,wh,!1),U(this,$m,!1),U(this,qw,!1),U(this,Fc,null),U(this,Nd,null),U(this,kg,null),U(this,Hl,null),U(this,Xw,null),U(this,qi,Se.NONE),U(this,lr,new Set),U(this,Vl,null),U(this,Sc,null),U(this,Ec,null),U(this,Ug,null),U(this,Ig,null),U(this,Yw,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1}),U(this,kc,[0,0]),U(this,To,null),U(this,Wl,null),U(this,$w,null),U(this,Zw,null),U(this,$A,null);const w=this._signal=c(this,Cg).signal;F(this,Wl,t),F(this,$w,e),F(this,Zw,r),F(this,Fg,n),F(this,ln,s),F(this,Sc,A),F(this,Ig,o),this._eventBus=a,a._on("editingaction",this.onEditingAction.bind(this),{signal:w}),a._on("pagechanging",this.onPageChanging.bind(this),{signal:w}),a._on("scalechanging",this.onScaleChanging.bind(this),{signal:w}),a._on("rotationchanging",this.onRotationChanging.bind(this),{signal:w}),a._on("setpreference",this.onSetPreference.bind(this),{signal:w}),a._on("switchannotationeditorparams",b=>this.updateParams(b.type,b.value),{signal:w}),window.addEventListener("pointerdown",()=>{F(this,$m,!0)},{capture:!0,signal:w}),window.addEventListener("pointerup",()=>{F(this,$m,!1)},{capture:!0,signal:w}),window.addEventListener("beforeunload",_(this,ge,UN).bind(this),{capture:!0,signal:w}),_(this,ge,IN).call(this),_(this,ge,NN).call(this),_(this,ge,wF).call(this),F(this,Cs,o.annotationStorage),F(this,zw,o.filterFactory),F(this,Ec,l),F(this,Eg,h||null),F(this,kv,u),F(this,Gw,f),F(this,Sg,d),F(this,Xw,g||null),this.viewParameters={realScale:Pu.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=m||null,this._supportsPinchToZoom=y!==!1,s==null||s.setSidebarUiManager(this)}static get _keyboardManager(){const t=BF.prototype,e=A=>c(A,Wl).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&A.hasSomethingToControl(),r=(A,{target:a})=>{if(a instanceof HTMLInputElement){const{type:o}=a;return o!=="text"&&o!=="number"}return!0},n=this.TRANSLATE_SMALL,s=this.TRANSLATE_BIG;return ke(this,"_keyboardManager",new $0([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],t.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:r}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(A,{target:a})=>!(a instanceof HTMLButtonElement)&&c(A,Wl).contains(a)&&!A.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(A,{target:a})=>!(a instanceof HTMLButtonElement)&&c(A,Wl).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-n,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[n,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-n],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,n],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:e}]]))}destroy(){var t,e,r,n,s,A,a,o,l;(t=c(this,$A))==null||t.resolve(),F(this,$A,null),(e=c(this,Cg))==null||e.abort(),F(this,Cg,null),this._signal=null;for(const h of c(this,ri).values())h.destroy();c(this,ri).clear(),c(this,wi).clear(),c(this,Td).clear(),(r=c(this,Hl))==null||r.clear(),F(this,fA,null),c(this,lr).clear(),c(this,XA).destroy(),(n=c(this,Fg))==null||n.destroy(),(s=c(this,ln))==null||s.destroy(),(A=c(this,Sc))==null||A.destroy(),(a=c(this,za))==null||a.hide(),F(this,za,null),(o=c(this,kg))==null||o.destroy(),F(this,kg,null),F(this,_d,null),c(this,Mo)&&(clearTimeout(c(this,Mo)),F(this,Mo,null)),c(this,To)&&(clearTimeout(c(this,To)),F(this,To,null)),(l=this._editorUndoBar)==null||l.destroy(),F(this,Ig,null)}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return c(this,Xw)}get useNewAltTextFlow(){return c(this,Gw)}get useNewAltTextWhenAddingImage(){return c(this,Sg)}get hcmFilter(){return ke(this,"hcmFilter",c(this,Ec)?c(this,zw).addHCMFilter(c(this,Ec).foreground,c(this,Ec).background):"none")}get direction(){return ke(this,"direction",getComputedStyle(c(this,Wl)).direction)}get _highlightColors(){return ke(this,"_highlightColors",c(this,Eg)?new Map(c(this,Eg).split(",").map(t=>(t=t.split("=").map(e=>e.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return ke(this,"highlightColors",null);const e=new Map,r=!!c(this,Ec);for(const[n,s]of t){const A=n.endsWith("_HCM");if(r&&A){e.set(n.replace("_HCM",""),s);continue}!r&&!A&&e.set(n,s)}return ke(this,"highlightColors",e)}get highlightColorNames(){return ke(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const e=this.highlightColorNames.get(t);return this._highlightColors.get(e)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),F(this,bc,t)}setMainHighlightColorPicker(t){F(this,kg,t)}editAltText(t,e=!1){var r;(r=c(this,Fg))==null||r.editAltText(this,t,e)}hasCommentManager(){return!!c(this,ln)}editComment(t,e,r,n){var s;(s=c(this,ln))==null||s.showDialog(this,t,e,r,n)}selectComment(t,e){const r=c(this,ri).get(t),n=r==null?void 0:r.getEditorByUID(e);n==null||n.toggleComment(!0,!0)}updateComment(t){var e;(e=c(this,ln))==null||e.updateComment(t.getData())}updatePopupColor(t){var e;(e=c(this,ln))==null||e.updatePopupColor(t)}removeComment(t){var e;(e=c(this,ln))==null||e.removeComments([t.uid])}deleteComment(t,e){const r=()=>{t.comment=e},n=()=>{var s;(s=this._editorUndoBar)==null||s.show(r,"comment"),this.toggleComment(null),t.comment=null};this.addCommands({cmd:n,undo:r,mustExec:!0})}toggleComment(t,e,r=void 0){var n;(n=c(this,ln))==null||n.toggleCommentPopup(t,e,r)}makeCommentColor(t,e){var r;return t&&((r=c(this,ln))==null?void 0:r.makeCommentColor(t,e))||null}getCommentDialogElement(){var t;return((t=c(this,ln))==null?void 0:t.dialogElement)||null}async waitForEditorsRendered(t){if(c(this,ri).has(t-1))return;const{resolve:e,promise:r}=Promise.withResolvers(),n=s=>{s.pageNumber===t&&(this._eventBus._off("editorsrendered",n),e())};this._eventBus.on("editorsrendered",n),await r}getSignature(t){var e;(e=c(this,Sc))==null||e.getSignature({uiManager:this,editor:t})}get signatureManager(){return c(this,Sc)}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference({name:t,value:e}){switch(t){case"enableNewAltTextWhenAddingImage":F(this,Sg,e);break}}onPageChanging({pageNumber:t}){F(this,Bc,t-1)}deletePage(t){for(const e of this.getEditors(t))e.remove();c(this,ri).delete(t),c(this,Bc)===t&&F(this,Bc,0)}focusMainContainer(){c(this,Wl).focus()}findParent(t,e){for(const r of c(this,ri).values()){const{x:n,y:s,width:A,height:a}=r.div.getBoundingClientRect();if(t>=n&&t<=n+A&&e>=s&&e<=s+a)return r}return null}disableUserSelect(t=!1){c(this,$w).classList.toggle("noUserSelect",t)}addShouldRescale(t){c(this,Td).add(t)}removeShouldRescale(t){c(this,Td).delete(t)}onScaleChanging({scale:t}){var e;this.commitOrRemove(),this.viewParameters.realScale=t*Pu.PDF_TO_CSS_UNITS;for(const r of c(this,Td))r.onScaleChanging();(e=c(this,bc))==null||e.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(t="",e=!1){const r=document.getSelection();if(!r||r.isCollapsed)return;const{anchorNode:n,anchorOffset:s,focusNode:A,focusOffset:a}=r,o=r.toString(),l=_(this,ge,Jw).call(this,r).closest(".textLayer"),h=this.getSelectionBoxes(l);if(!h)return;r.empty();const u=_(this,ge,mF).call(this,l),f=c(this,qi)===Se.NONE,d=()=>{const g=u==null?void 0:u.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:h,anchorNode:n,anchorOffset:s,focusNode:A,focusOffset:a,text:o});f&&this.showAllEditors("highlight",!0,!0),e&&(g==null||g.editComment())};if(f){this.switchToMode(Se.HIGHLIGHT,d);return}d()}commentSelection(t=""){this.highlightSelection(t,!0)}getAndRemoveDataFromAnnotationStorage(t){if(!c(this,Cs))return null;const e=`${_0}${t}`,r=c(this,Cs).getRawValue(e);return r&&c(this,Cs).remove(e),r}addToAnnotationStorage(t){!t.isEmpty()&&c(this,Cs)&&!c(this,Cs).has(t.id)&&c(this,Cs).setValue(t.id,t)}a11yAlert(t,e=null){const r=c(this,Zw);r&&(r.setAttribute("data-l10n-id",t),e?r.setAttribute("data-l10n-args",JSON.stringify(e)):r.removeAttribute("data-l10n-args"))}blur(){if(this.isShiftKeyDown=!1,c(this,lu)&&(F(this,lu,!1),_(this,ge,Zm).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of c(this,lr))if(e.div.contains(t)){F(this,Nd,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!c(this,Nd))return;const[t,e]=c(this,Nd);F(this,Nd,null),e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}addEditListeners(){_(this,ge,wF).call(this),this.setEditingState(!0)}removeEditListeners(){_(this,ge,_N).call(this),this.setEditingState(!1)}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const r of c(this,YA))if(r.isHandlingMimeForPasting(e)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const e of t.dataTransfer.items)for(const r of c(this,YA))if(r.isHandlingMimeForPasting(e.type)){r.paste(e,this.currentLayer),t.preventDefault();return}}copy(t){var e;if(t.preventDefault(),(e=c(this,fA))==null||e.commitOrRemove(),!this.hasSelection)return;const r=[];for(const n of c(this,lr)){const s=n.serialize(!0);s&&r.push(s)}r.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(r))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:e}=t;for(const s of e.items)for(const A of c(this,YA))if(A.isHandlingMimeForPasting(s.type)){A.paste(s,this.currentLayer);return}let r=e.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(s){Me(`paste: "${s.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const n=this.currentLayer;try{const s=[];for(const o of r){const l=await n.deserialize(o);if(!l)return;s.push(l)}const A=()=>{for(const o of s)_(this,ge,vF).call(this,o);_(this,ge,yF).call(this,s)},a=()=>{for(const o of s)o.remove()};this.addCommands({cmd:A,undo:a,mustExec:!0})}catch(s){Me(`paste: "${s.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),c(this,qi)!==Se.NONE&&!this.isEditorHandlingKeyboard&&BF._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,c(this,lu)&&(F(this,lu,!1),_(this,ge,Zm).call(this,"main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}updatePageIndex(t,e){for(const n of this.getEditors(t))n.pageIndex=e;const r=c(this,xg).get(t);r&&(r.pageIndex=e,c(this,ri).set(e,r),c(this,wh)?r.enable():r.disable())}startUpdatePages(){F(this,xg,new Map(c(this,ri))),c(this,ri).clear()}endUpdatePages(){F(this,xg,null)}clonePage(t,e){for(const r of this.getEditors(t)){const n=r.serialize(r.mode!==Se.HIGHLIGHT);n&&(n.pageIndex=e,n.id=this.getId(),n.isClone=!0,delete n.popupRef,c(this,Cs).setValue(n.id,n))}}findClonesForPage(t){const e=[],{pageIndex:r}=t;for(const[n,s]of c(this,Cs))s.pageIndex===r&&s.isClone&&(c(this,Cs).remove(n),e.push(t.deserialize(s).then(A=>{A&&(A.isClone=!0,t.addOrRebuild(A))})));return Promise.all(e)}setEditingState(t){t?(_(this,ge,QN).call(this),_(this,ge,MN).call(this),_(this,ge,os).call(this,{isEditing:c(this,qi)!==Se.NONE,isEmpty:_(this,ge,Qg).call(this),hasSomethingToUndo:c(this,XA).hasSomethingToUndo(),hasSomethingToRedo:c(this,XA).hasSomethingToRedo(),hasSelectedEditor:!1})):(_(this,ge,LN).call(this),_(this,ge,TN).call(this),_(this,ge,os).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!c(this,YA)){F(this,YA,t);for(const e of c(this,YA))_(this,ge,qo).call(this,e.defaultPropertiesToUpdate)}}getId(){return c(this,gF).id}get currentLayer(){return c(this,ri).get(c(this,Bc))}getLayer(t){return c(this,ri).get(t)}get currentPageIndex(){return c(this,Bc)}addLayer(t){c(this,ri).set(t.pageIndex,t),c(this,wh)?t.enable():t.disable()}removeLayer(t){c(this,ri).delete(t.pageIndex)}async updateMode(t,e=null,r=!1,n=!1,s=!1,A=!1){var a,o,l,h,u,f;if(c(this,qi)!==t&&!(c(this,$A)&&(await c(this,$A).promise,!c(this,$A)))){if(F(this,$A,Promise.withResolvers()),(a=c(this,bc))==null||a.commitOrRemove(),c(this,qi)===Se.POPUP&&((o=c(this,ln))==null||o.hideSidebar()),(l=c(this,ln))==null||l.destroyPopup(),F(this,qi,t),t===Se.NONE){this.setEditingState(!1),_(this,ge,DN).call(this);for(const d of c(this,wi).values())d.hideStandaloneCommentButton();(h=this._editorUndoBar)==null||h.hide(),this.toggleComment(null),c(this,$A).resolve();return}for(const d of c(this,wi).values())d.addStandaloneCommentButton();t===Se.SIGNATURE&&await((u=c(this,Sc))==null?void 0:u.loadSignatures()),r&&Bs.clearPointerType(),this.setEditingState(!0),await _(this,ge,PN).call(this),this.unselectAll();for(const d of c(this,ri).values())d.updateMode(t);if(t===Se.POPUP){c(this,_d)||F(this,_d,await c(this,Ig).getAnnotationsByType(new Set(c(this,YA).map(m=>m._editorType))));const d=new Set,g=[];for(const m of c(this,wi).values()){const{annotationElementId:y,hasComment:w,deleted:b}=m;y&&d.add(y),w&&!b&&g.push(m.getData())}for(const m of c(this,_d)){const{id:y,popupRef:w,contentsObj:b}=m;w&&b!=null&&b.str&&!d.has(y)&&!c(this,Cc).has(y)&&g.push(m)}(f=c(this,ln))==null||f.showSidebar(g)}if(!e){n&&this.addNewEditorFromKeyboard(),c(this,$A).resolve();return}for(const d of c(this,wi).values())d.uid===e?(this.setSelected(d),A?d.editComment():s?d.enterInEditMode():d.focus()):d.unselect();c(this,$A).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==c(this,qi)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,e){if(c(this,YA)){switch(t){case _e.CREATE:this.currentLayer.addNewEditor(e);return;case _e.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(c(this,Ug)||F(this,Ug,new Map)).set(t,e),this.showAllEditors("highlight",e);break}if(this.hasSelection)for(const r of c(this,lr))r.updateParams(t,e);else for(const r of c(this,YA))r.updateDefaultParams(t,e)}}showAllEditors(t,e,r=!1){var n;for(const s of c(this,wi).values())s.editorType===t&&s.show(e);(((n=c(this,Ug))==null?void 0:n.get(_e.HIGHLIGHT_SHOW_ALL))??!0)!==e&&_(this,ge,qo).call(this,[[_e.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(t=!1){if(c(this,qw)!==t){F(this,qw,t);for(const e of c(this,ri).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}*getEditors(t){for(const e of c(this,wi).values())e.pageIndex===t&&(yield e)}getEditor(t){return c(this,wi).get(t)}addEditor(t){c(this,wi).set(t.id,t)}removeEditor(t){var e,r;t.div.contains(document.activeElement)&&(c(this,Mo)&&clearTimeout(c(this,Mo)),F(this,Mo,setTimeout(()=>{this.focusMainContainer(),F(this,Mo,null)},0))),c(this,wi).delete(t.id),t.annotationElementId&&((e=c(this,Hl))==null||e.delete(t.annotationElementId)),this.unselect(t),(!t.annotationElementId||!c(this,Cc).has(t.annotationElementId))&&((r=c(this,Cs))==null||r.remove(t.id))}addDeletedAnnotationElement(t){c(this,Cc).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return c(this,Cc).has(t)}removeDeletedAnnotationElement(t){c(this,Cc).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){c(this,fA)!==t&&(F(this,fA,t),t&&_(this,ge,qo).call(this,t.propertiesToUpdate))}updateUI(t){c(this,ge,ON)===t&&_(this,ge,qo).call(this,t.propertiesToUpdate)}updateUIForDefaultProperties(t){_(this,ge,qo).call(this,t.defaultPropertiesToUpdate)}toggleSelected(t){if(c(this,lr).has(t)){c(this,lr).delete(t),t.unselect(),_(this,ge,os).call(this,{hasSelectedEditor:this.hasSelection});return}c(this,lr).add(t),t.select(),_(this,ge,qo).call(this,t.propertiesToUpdate),_(this,ge,os).call(this,{hasSelectedEditor:!0})}setSelected(t){var e,r;this.updateToolbar({mode:t.mode,editId:t.uid}),(e=c(this,bc))==null||e.commitOrRemove();for(const n of c(this,lr))n!==t&&n.unselect();(r=c(this,ln))==null||r.destroyPopup(),c(this,lr).clear(),c(this,lr).add(t),t.select(),_(this,ge,qo).call(this,t.propertiesToUpdate),_(this,ge,os).call(this,{hasSelectedEditor:!0})}isSelected(t){return c(this,lr).has(t)}get firstSelectedEditor(){return c(this,lr).values().next().value}unselect(t){t.unselect(),c(this,lr).delete(t),_(this,ge,os).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return c(this,lr).size!==0}get isEnterHandled(){return c(this,lr).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var t;c(this,XA).undo(),_(this,ge,os).call(this,{hasSomethingToUndo:c(this,XA).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:_(this,ge,Qg).call(this)}),(t=this._editorUndoBar)==null||t.hide()}redo(){c(this,XA).redo(),_(this,ge,os).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:c(this,XA).hasSomethingToRedo(),isEmpty:_(this,ge,Qg).call(this)})}addCommands(t){c(this,XA).add(t),_(this,ge,os).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:_(this,ge,Qg).call(this)})}cleanUndoStack(t){c(this,XA).cleanType(t)}delete(){var t;this.commitOrRemove();const e=(t=this.currentLayer)==null?void 0:t.endDrawingSession(!0);if(!this.hasSelection&&!e)return;const r=e?[e]:[...c(this,lr)],n=()=>{var A;(A=this._editorUndoBar)==null||A.show(s,r.length===1?r[0].editorType:r.length);for(const a of r)a.remove()},s=()=>{for(const A of r)_(this,ge,vF).call(this,A)};this.addCommands({cmd:n,undo:s,mustExec:!0})}commitOrRemove(){var t;(t=c(this,fA))==null||t.commitOrRemove()}hasSomethingToControl(){return c(this,fA)||this.hasSelection}selectAll(){for(const t of c(this,lr))t.commit();_(this,ge,yF).call(this,c(this,wi).values())}unselectAll(){var t,e;if(!(c(this,fA)&&(c(this,fA).commitOrRemove(),c(this,qi)!==Se.NONE))&&!((t=c(this,bc))!=null&&t.commitOrRemove())&&((e=c(this,ln))==null||e.destroyPopup(),!!this.hasSelection)){for(const r of c(this,lr))r.unselect();c(this,lr).clear(),_(this,ge,os).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;c(this,kc)[0]+=t,c(this,kc)[1]+=e;const[n,s]=c(this,kc),A=[...c(this,lr)];c(this,To)&&clearTimeout(c(this,To)),F(this,To,setTimeout(()=>{F(this,To,null),c(this,kc)[0]=c(this,kc)[1]=0,this.addCommands({cmd:()=>{for(const o of A)c(this,wi).has(o.id)&&(o.translateInPage(n,s),o.translationDone())},undo:()=>{for(const o of A)c(this,wi).has(o.id)&&(o.translateInPage(-n,-s),o.translationDone())},mustExec:!1})},1e3));for(const o of A)o.translateInPage(t,e),o.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),F(this,_o,new Map);for(const t of c(this,lr))c(this,_o).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!c(this,_o))return!1;this.disableUserSelect(!1);const t=c(this,_o);F(this,_o,null);let e=!1;for(const[{x:n,y:s,pageIndex:A},a]of t)a.newX=n,a.newY=s,a.newPageIndex=A,e||(e=n!==a.savedX||s!==a.savedY||A!==a.savedPageIndex);if(!e)return!1;const r=(n,s,A,a)=>{if(c(this,wi).has(n.id)){const o=c(this,ri).get(a);o?n._setParentAndPosition(o,s,A):(n.pageIndex=a,n.x=s,n.y=A)}};return this.addCommands({cmd:()=>{for(const[n,{newX:s,newY:A,newPageIndex:a}]of t)r(n,s,A,a)},undo:()=>{for(const[n,{savedX:s,savedY:A,savedPageIndex:a}]of t)r(n,s,A,a)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(c(this,_o))for(const r of c(this,_o).keys())r.drag(t,e)}rebuild(t){if(t.parent===null){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return((t=this.getActive())==null?void 0:t.shouldGetKeyboardEvents())||c(this,lr).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return c(this,fA)===t}getActive(){return c(this,fA)}getMode(){return c(this,qi)}isEditingMode(){return c(this,qi)!==Se.NONE}get imageManager(){return ke(this,"imageManager",new rV)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let l=0,h=e.rangeCount;l<h;l++)if(!t.contains(e.getRangeAt(l).commonAncestorContainer))return null;const{x:r,y:n,width:s,height:A}=t.getBoundingClientRect();let a;switch(t.getAttribute("data-main-rotation")){case"90":a=(l,h,u,f)=>({x:(h-n)/A,y:1-(l+u-r)/s,width:f/A,height:u/s});break;case"180":a=(l,h,u,f)=>({x:1-(l+u-r)/s,y:1-(h+f-n)/A,width:u/s,height:f/A});break;case"270":a=(l,h,u,f)=>({x:1-(h+f-n)/A,y:(l-r)/s,width:f/A,height:u/s});break;default:a=(l,h,u,f)=>({x:(l-r)/s,y:(h-n)/A,width:u/s,height:f/A});break}const o=[];for(let l=0,h=e.rangeCount;l<h;l++){const u=e.getRangeAt(l);if(!u.collapsed)for(const{x:f,y:d,width:g,height:m}of u.getClientRects())g===0||m===0||o.push(a(f,d,g,m))}return o.length===0?null:o}addChangedExistingAnnotation({annotationElementId:t,id:e}){(c(this,Md)||F(this,Md,new Map)).set(t,e)}removeChangedExistingAnnotation({annotationElementId:t}){var e;(e=c(this,Md))==null||e.delete(t)}renderAnnotationElement(t){var e;const r=(e=c(this,Md))==null?void 0:e.get(t.data.id);if(!r)return;const n=c(this,Cs).getRawValue(r);n&&(c(this,qi)===Se.NONE&&!n.hasBeenModified||n.renderAnnotationElement(t))}setMissingCanvas(t,e,r){var n;const s=(n=c(this,Hl))==null?void 0:n.get(t);s&&(s.setCanvas(e,r),c(this,Hl).delete(t))}addMissingCanvas(t,e){(c(this,Hl)||F(this,Hl,new Map)).set(t,e)}};Cg=new WeakMap,fA=new WeakMap,_d=new WeakMap,wi=new WeakMap,ri=new WeakMap,xg=new WeakMap,Fg=new WeakMap,Cs=new WeakMap,Md=new WeakMap,XA=new WeakMap,ln=new WeakMap,yc=new WeakMap,bc=new WeakMap,Bc=new WeakMap,Cc=new WeakMap,_o=new WeakMap,YA=new WeakMap,Td=new WeakMap,kv=new WeakMap,Gw=new WeakMap,Sg=new WeakMap,zw=new WeakMap,Mo=new WeakMap,xc=new WeakMap,Eg=new WeakMap,lu=new WeakMap,za=new WeakMap,gF=new WeakMap,wh=new WeakMap,$m=new WeakMap,qw=new WeakMap,Fc=new WeakMap,Nd=new WeakMap,kg=new WeakMap,Hl=new WeakMap,Xw=new WeakMap,qi=new WeakMap,lr=new WeakMap,Vl=new WeakMap,Sc=new WeakMap,Ec=new WeakMap,Ug=new WeakMap,Ig=new WeakMap,Yw=new WeakMap,kc=new WeakMap,To=new WeakMap,Wl=new WeakMap,$w=new WeakMap,Zw=new WeakMap,$A=new WeakMap,ge=new WeakSet,Jw=function({anchorNode:i}){return i.nodeType===Node.TEXT_NODE?i.parentElement:i},mF=function(i){const{currentLayer:t}=this;if(t.hasTextLayer(i))return t;for(const e of c(this,ri).values())if(e.hasTextLayer(i))return e;return null},UN=function(i){var t;this.commitOrRemove(),(t=this.currentLayer)==null||t.endDrawingSession(!1)},nU=function(){const i=document.getSelection();if(!i||i.isCollapsed)return;const t=_(this,ge,Jw).call(this,i).closest(".textLayer"),e=this.getSelectionBoxes(t);e&&(c(this,za)||F(this,za,new tV(this)),c(this,za).show(t,e,this.direction==="ltr"))},sU=function(){var i,t,e;const r=document.getSelection();if(!r||r.isCollapsed){c(this,Vl)&&((i=c(this,za))==null||i.hide(),F(this,Vl,null),_(this,ge,os).call(this,{hasSelectedText:!1}));return}const{anchorNode:n}=r;if(n===c(this,Vl))return;const s=_(this,ge,Jw).call(this,r).closest(".textLayer");if(!s){c(this,Vl)&&((t=c(this,za))==null||t.hide(),F(this,Vl,null),_(this,ge,os).call(this,{hasSelectedText:!1}));return}if((e=c(this,za))==null||e.hide(),F(this,Vl,n),_(this,ge,os).call(this,{hasSelectedText:!0}),!(c(this,qi)!==Se.HIGHLIGHT&&c(this,qi)!==Se.NONE)&&(c(this,qi)===Se.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),F(this,lu,this.isShiftKeyDown),!this.isShiftKeyDown)){const A=c(this,qi)===Se.HIGHLIGHT?_(this,ge,mF).call(this,s):null;if(A==null||A.toggleDrawing(),c(this,$m)){const a=new AbortController,o=this.combinedSignal(a),l=h=>{h.type==="pointerup"&&h.button!==0||(a.abort(),A==null||A.toggleDrawing(!0),h.type==="pointerup"&&_(this,ge,Zm).call(this,"main_toolbar"))};window.addEventListener("pointerup",l,{signal:o}),window.addEventListener("blur",l,{signal:o})}else A==null||A.toggleDrawing(!0),_(this,ge,Zm).call(this,"main_toolbar")}},Zm=function(i=""){c(this,qi)===Se.HIGHLIGHT?this.highlightSelection(i):c(this,kv)&&_(this,ge,nU).call(this)},IN=function(){document.addEventListener("selectionchange",_(this,ge,sU).bind(this),{signal:this._signal})},QN=function(){if(c(this,xc))return;F(this,xc,new AbortController);const i=this.combinedSignal(c(this,xc));window.addEventListener("focus",this.focus.bind(this),{signal:i}),window.addEventListener("blur",this.blur.bind(this),{signal:i})},LN=function(){var i;(i=c(this,xc))==null||i.abort(),F(this,xc,null)},wF=function(){if(c(this,Fc))return;F(this,Fc,new AbortController);const i=this.combinedSignal(c(this,Fc));window.addEventListener("keydown",this.keydown.bind(this),{signal:i}),window.addEventListener("keyup",this.keyup.bind(this),{signal:i})},_N=function(){var i;(i=c(this,Fc))==null||i.abort(),F(this,Fc,null)},MN=function(){if(c(this,yc))return;F(this,yc,new AbortController);const i=this.combinedSignal(c(this,yc));document.addEventListener("copy",this.copy.bind(this),{signal:i}),document.addEventListener("cut",this.cut.bind(this),{signal:i}),document.addEventListener("paste",this.paste.bind(this),{signal:i})},TN=function(){var i;(i=c(this,yc))==null||i.abort(),F(this,yc,null)},NN=function(){const i=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:i}),document.addEventListener("drop",this.drop.bind(this),{signal:i})},os=function(i){Object.entries(i).some(([t,e])=>c(this,Yw)[t]!==e)&&(this._eventBus.dispatch("editingstateschanged",{source:this,details:Object.assign(c(this,Yw),i)}),c(this,qi)===Se.HIGHLIGHT&&i.hasSelectedEditor===!1&&_(this,ge,qo).call(this,[[_e.HIGHLIGHT_FREE,!0]]))},qo=function(i){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:i})},PN=async function(){if(!c(this,wh)){F(this,wh,!0);const i=[];for(const t of c(this,ri).values())i.push(t.enable());await Promise.all(i);for(const t of c(this,wi).values())t.enable()}},DN=function(){if(this.unselectAll(),c(this,wh)){F(this,wh,!1);for(const i of c(this,ri).values())i.disable();for(const i of c(this,wi).values())i.disable()}},vF=function(i){const t=c(this,ri).get(i.pageIndex);t?t.addOrRebuild(i):(this.addEditor(i),this.addToAnnotationStorage(i))},ON=function(){let i=null;for(i of c(this,lr));return i},Qg=function(){if(c(this,wi).size===0)return!0;if(c(this,wi).size===1)for(const i of c(this,wi).values())return i.isEmpty();return!1},yF=function(i){for(const t of c(this,lr))t.unselect();c(this,lr).clear();for(const t of i)t.isEmpty()||(c(this,lr).add(t),t.select());_(this,ge,os).call(this,{hasSelectedEditor:this.hasSelection})},ut(bF,"TRANSLATE_SMALL",1),ut(bF,"TRANSLATE_BIG",10);let Cp=bF;var wn,rl,Wa,Jm,Xo,xA,Lg,No,rA,jl,Pd,Yo,Uh,il,t0,t2;const _g=class Kl{constructor(t){U(this,il),U(this,wn,null),U(this,rl,!1),U(this,Wa,null),U(this,Jm,null),U(this,Xo,null),U(this,xA,null),U(this,Lg,!1),U(this,No,null),U(this,rA,null),U(this,jl,null),U(this,Pd,null),U(this,Yo,!1),F(this,rA,t),F(this,Yo,t._uiManager.useNewAltTextFlow),c(Kl,Uh)||F(Kl,Uh,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){Kl._l10n??(Kl._l10n=t)}async render(){const t=F(this,Wa,document.createElement("button"));t.className="altText",t.tabIndex="0";const e=F(this,Jm,document.createElement("span"));t.append(e),c(this,Yo)?(t.classList.add("new"),t.setAttribute("data-l10n-id",c(Kl,Uh).missing),e.setAttribute("data-l10n-id",c(Kl,Uh)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const r=c(this,rA)._uiManager._signal;t.addEventListener("contextmenu",AA,{signal:r}),t.addEventListener("pointerdown",s=>s.stopPropagation(),{signal:r});const n=s=>{s.preventDefault(),c(this,rA)._uiManager.editAltText(c(this,rA)),c(this,Yo)&&c(this,rA)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:c(this,il,t0)}})};return t.addEventListener("click",n,{capture:!0,signal:r}),t.addEventListener("keydown",s=>{s.target===t&&s.key==="Enter"&&(F(this,Lg,!0),n(s))},{signal:r}),await _(this,il,t2).call(this),t}finish(){c(this,Wa)&&(c(this,Wa).focus({focusVisible:c(this,Lg)}),F(this,Lg,!1))}isEmpty(){return c(this,Yo)?c(this,wn)===null:!c(this,wn)&&!c(this,rl)}hasData(){return c(this,Yo)?c(this,wn)!==null||!!c(this,jl):this.isEmpty()}get guessedText(){return c(this,jl)}async setGuessedText(t){c(this,wn)===null&&(F(this,jl,t),F(this,Pd,await Kl._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),_(this,il,t2).call(this))}toggleAltTextBadge(t=!1){var e;if(!c(this,Yo)||c(this,wn)){(e=c(this,No))==null||e.remove(),F(this,No,null);return}if(!c(this,No)){const r=F(this,No,document.createElement("div"));r.className="noAltTextBadge",c(this,rA).div.append(r)}c(this,No).classList.toggle("hidden",!t)}serialize(t){let e=c(this,wn);return!t&&c(this,jl)===e&&(e=c(this,Pd)),{altText:e,decorative:c(this,rl),guessedText:c(this,jl),textWithDisclaimer:c(this,Pd)}}get data(){return{altText:c(this,wn),decorative:c(this,rl)}}set data({altText:t,decorative:e,guessedText:r,textWithDisclaimer:n,cancel:s=!1}){r&&(F(this,jl,r),F(this,Pd,n)),!(c(this,wn)===t&&c(this,rl)===e)&&(s||(F(this,wn,t),F(this,rl,e)),_(this,il,t2).call(this))}toggle(t=!1){c(this,Wa)&&(!t&&c(this,xA)&&(clearTimeout(c(this,xA)),F(this,xA,null)),c(this,Wa).disabled=!t)}shown(){c(this,rA)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:c(this,il,t0)}})}destroy(){var t,e;(t=c(this,Wa))==null||t.remove(),F(this,Wa,null),F(this,Jm,null),F(this,Xo,null),(e=c(this,No))==null||e.remove(),F(this,No,null)}};wn=new WeakMap,rl=new WeakMap,Wa=new WeakMap,Jm=new WeakMap,Xo=new WeakMap,xA=new WeakMap,Lg=new WeakMap,No=new WeakMap,rA=new WeakMap,jl=new WeakMap,Pd=new WeakMap,Yo=new WeakMap,Uh=new WeakMap,il=new WeakSet,t0=function(){return c(this,wn)&&"added"||c(this,wn)===null&&this.guessedText&&"review"||"missing"},t2=async function(){var i,t,e;const r=c(this,Wa);if(!r)return;if(c(this,Yo)){if(r.classList.toggle("done",!!c(this,wn)),r.setAttribute("data-l10n-id",c(_g,Uh)[c(this,il,t0)]),(i=c(this,Jm))==null||i.setAttribute("data-l10n-id",c(_g,Uh)[`${c(this,il,t0)}-label`]),!c(this,wn)){(t=c(this,Xo))==null||t.remove();return}}else{if(!c(this,wn)&&!c(this,rl)){r.classList.remove("done"),(e=c(this,Xo))==null||e.remove();return}r.classList.add("done"),r.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let n=c(this,Xo);if(!n){F(this,Xo,n=document.createElement("span")),n.className="tooltip",n.setAttribute("role","tooltip"),n.id=`alt-text-tooltip-${c(this,rA).id}`;const A=100,a=c(this,rA)._uiManager._signal;a.addEventListener("abort",()=>{clearTimeout(c(this,xA)),F(this,xA,null)},{once:!0}),r.addEventListener("mouseenter",()=>{F(this,xA,setTimeout(()=>{F(this,xA,null),c(this,Xo).classList.add("show"),c(this,rA)._reportTelemetry({action:"alt_text_tooltip"})},A))},{signal:a}),r.addEventListener("mouseleave",()=>{var o;c(this,xA)&&(clearTimeout(c(this,xA)),F(this,xA,null)),(o=c(this,Xo))==null||o.classList.remove("show")},{signal:a})}c(this,rl)?n.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(n.removeAttribute("data-l10n-id"),n.textContent=c(this,wn)),n.parentNode||r.append(n);const s=c(this,rA).getElementForAltText();s==null||s.setAttribute("aria-describedby",n.id)},U(_g,Uh,null),ut(_g,"_l10n",null);let AU=_g;var Nn,aa,_f,Lr,e2,Uc,ZA,Ic,Qc,Dd,r2,CF;class X1{constructor(t){U(this,r2),U(this,Nn,null),U(this,aa,null),U(this,_f,!1),U(this,Lr,null),U(this,e2,null),U(this,Uc,null),U(this,ZA,null),U(this,Ic,null),U(this,Qc,!1),U(this,Dd,null),F(this,Lr,t)}renderForToolbar(){const t=F(this,aa,document.createElement("button"));return t.className="comment",_(this,r2,CF).call(this,t,!1)}renderForStandalone(){const t=F(this,Nn,document.createElement("button"));t.className="annotationCommentButton";const e=c(this,Lr).commentButtonPosition;if(e){const{style:r}=t;r.insetInlineEnd=`calc(${100*(c(this,Lr)._uiManager.direction==="ltr"?1-e[0]:e[0])}% - var(--comment-button-dim))`,r.top=`calc(${100*e[1]}% - var(--comment-button-dim))`;const n=c(this,Lr).commentButtonColor;n&&(r.backgroundColor=n)}return _(this,r2,CF).call(this,t,!0)}focusButton(){setTimeout(()=>{var t;(t=c(this,Nn)??c(this,aa))==null||t.focus()},0)}onUpdatedColor(){if(!c(this,Nn))return;const t=c(this,Lr).commentButtonColor;t&&(c(this,Nn).style.backgroundColor=t),c(this,Lr)._uiManager.updatePopupColor(c(this,Lr))}get commentButtonWidth(){var t;return(((t=c(this,Nn))==null?void 0:t.getBoundingClientRect().width)??0)/c(this,Lr).parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(c(this,Dd))return c(this,Dd);if(!c(this,Nn))return null;const{x:t,y:e,height:r}=c(this,Nn).getBoundingClientRect(),{x:n,y:s,width:A,height:a}=c(this,Lr).parent.boundingClientRect;return[(t-n)/A,(e+r-s)/a]}set commentPopupPositionInLayer(t){F(this,Dd,t)}hasDefaultPopupPosition(){return c(this,Dd)===null}removeStandaloneCommentButton(){var t;(t=c(this,Nn))==null||t.remove(),F(this,Nn,null)}removeToolbarCommentButton(){var t;(t=c(this,aa))==null||t.remove(),F(this,aa,null)}setCommentButtonStates({selected:t,hasPopup:e}){c(this,Nn)&&(c(this,Nn).classList.toggle("selected",t),c(this,Nn).ariaExpanded=e)}edit(t){const e=this.commentPopupPositionInLayer;let r,n;if(e)[r,n]=e;else{[r,n]=c(this,Lr).commentButtonPosition;const{width:h,height:u,x:f,y:d}=c(this,Lr);r=f+r*h,n=d+n*u}const s=c(this,Lr).parent.boundingClientRect,{x:A,y:a,width:o,height:l}=s;c(this,Lr)._uiManager.editComment(c(this,Lr),A+r*o,a+n*l,{...t,parentDimensions:s})}finish(){c(this,aa)&&(c(this,aa).focus({focusVisible:c(this,_f)}),F(this,_f,!1))}isDeleted(){return c(this,Qc)||c(this,ZA)===""}isEmpty(){return c(this,ZA)===null}hasBeenEdited(){return this.isDeleted()||c(this,ZA)!==c(this,e2)}serialize(){return this.data}get data(){return{text:c(this,ZA),richText:c(this,Uc),date:c(this,Ic),deleted:this.isDeleted()}}set data(t){if(t!==c(this,ZA)&&F(this,Uc,null),t===null){F(this,ZA,""),F(this,Qc,!0);return}F(this,ZA,t),F(this,Ic,new Date),F(this,Qc,!1)}restoreData({text:t,richText:e,date:r}){F(this,ZA,t),F(this,Uc,e),F(this,Ic,r),F(this,Qc,!1)}setInitialText(t,e=null){F(this,e2,t),this.data=t,F(this,Ic,null),F(this,Uc,e)}shown(){}destroy(){var t,e;(t=c(this,aa))==null||t.remove(),F(this,aa,null),(e=c(this,Nn))==null||e.remove(),F(this,Nn,null),F(this,ZA,""),F(this,Uc,null),F(this,Ic,null),F(this,Lr,null),F(this,_f,!1),F(this,Qc,!1)}}Nn=new WeakMap,aa=new WeakMap,_f=new WeakMap,Lr=new WeakMap,e2=new WeakMap,Uc=new WeakMap,ZA=new WeakMap,Ic=new WeakMap,Qc=new WeakMap,Dd=new WeakMap,r2=new WeakSet,CF=function(i,t){if(!c(this,Lr)._uiManager.hasCommentManager())return null;i.tabIndex="0",i.ariaHasPopup="dialog",t?(i.ariaControls="commentPopup",i.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(i.ariaControlsElements=[c(this,Lr)._uiManager.getCommentDialogElement()],i.setAttribute("data-l10n-id","pdfjs-editor-add-comment-button"));const e=c(this,Lr)._uiManager._signal;if(!(e instanceof AbortSignal)||e.aborted)return i;i.addEventListener("contextmenu",AA,{signal:e}),t&&(i.addEventListener("focusin",n=>{c(this,Lr)._focusEventsAllowed=!1,Hr(n)},{capture:!0,signal:e}),i.addEventListener("focusout",n=>{c(this,Lr)._focusEventsAllowed=!0,Hr(n)},{capture:!0,signal:e})),i.addEventListener("pointerdown",n=>n.stopPropagation(),{signal:e});const r=n=>{n.preventDefault(),i===c(this,aa)?this.edit():c(this,Lr).toggleComment(!0)};return i.addEventListener("click",r,{capture:!0,signal:e}),i.addEventListener("keydown",n=>{n.target===i&&n.key==="Enter"&&(F(this,_f,!0),r(n))},{signal:e}),i.addEventListener("pointerenter",()=>{c(this,Lr).toggleComment(!1,!0)},{signal:e}),i.addEventListener("pointerleave",()=>{c(this,Lr).toggleComment(!1,!1)},{signal:e}),i};var e0,Od,Uv,Iv,Qv,Lv,_v,vh,ap,Gl,Rd,zl,r0,RN,aU,oU;const HN=class{constructor({container:t,isPinchingDisabled:e=null,isPinchingStopped:r=null,onPinchStart:n=null,onPinching:s=null,onPinchEnd:A=null,signal:a}){U(this,r0),U(this,e0),U(this,Od,!1),U(this,Uv,null),U(this,Iv),U(this,Qv),U(this,Lv),U(this,_v),U(this,vh,null),U(this,ap),U(this,Gl,null),U(this,Rd),U(this,zl,null),F(this,e0,t),F(this,Uv,r),F(this,Iv,e),F(this,Qv,n),F(this,Lv,s),F(this,_v,A),F(this,Rd,new AbortController),F(this,ap,AbortSignal.any([a,c(this,Rd).signal])),t.addEventListener("touchstart",_(this,r0,RN).bind(this),{passive:!1,signal:c(this,ap)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/pa.pixelRatio}destroy(){var t,e;(t=c(this,Rd))==null||t.abort(),F(this,Rd,null),(e=c(this,vh))==null||e.abort(),F(this,vh,null)}};e0=new WeakMap,Od=new WeakMap,Uv=new WeakMap,Iv=new WeakMap,Qv=new WeakMap,Lv=new WeakMap,_v=new WeakMap,vh=new WeakMap,ap=new WeakMap,Gl=new WeakMap,Rd=new WeakMap,zl=new WeakMap,r0=new WeakSet,RN=function(i){var t,e,r;if((t=c(this,Iv))!=null&&t.call(this))return;if(i.touches.length===1){if(c(this,vh))return;const A=F(this,vh,new AbortController),a=AbortSignal.any([c(this,ap),A.signal]),o=c(this,e0),l={capture:!0,signal:a,passive:!1},h=u=>{var f;u.pointerType==="touch"&&((f=c(this,vh))==null||f.abort(),F(this,vh,null))};o.addEventListener("pointerdown",u=>{u.pointerType==="touch"&&(Hr(u),h(u))},l),o.addEventListener("pointerup",h,l),o.addEventListener("pointercancel",h,l);return}if(!c(this,zl)){F(this,zl,new AbortController);const A=AbortSignal.any([c(this,ap),c(this,zl).signal]),a=c(this,e0),o={signal:A,capture:!1,passive:!1};a.addEventListener("touchmove",_(this,r0,aU).bind(this),o);const l=_(this,r0,oU).bind(this);a.addEventListener("touchend",l,o),a.addEventListener("touchcancel",l,o),o.capture=!0,a.addEventListener("pointerdown",Hr,o),a.addEventListener("pointermove",Hr,o),a.addEventListener("pointercancel",Hr,o),a.addEventListener("pointerup",Hr,o),(e=c(this,Qv))==null||e.call(this)}if(Hr(i),i.touches.length!==2||(r=c(this,Uv))!=null&&r.call(this)){F(this,Gl,null);return}let[n,s]=i.touches;n.identifier>s.identifier&&([n,s]=[s,n]),F(this,Gl,{touch0X:n.screenX,touch0Y:n.screenY,touch1X:s.screenX,touch1Y:s.screenY})},aU=function(i){var t;if(!c(this,Gl)||i.touches.length!==2)return;Hr(i);let[e,r]=i.touches;e.identifier>r.identifier&&([e,r]=[r,e]);const{screenX:n,screenY:s}=e,{screenX:A,screenY:a}=r,o=c(this,Gl),{touch0X:l,touch0Y:h,touch1X:u,touch1Y:f}=o,d=u-l,g=f-h,m=A-n,y=a-s,w=Math.hypot(m,y)||1,b=Math.hypot(d,g)||1;if(!c(this,Od)&&Math.abs(b-w)<=HN.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(o.touch0X=n,o.touch0Y=s,o.touch1X=A,o.touch1Y=a,!c(this,Od)){F(this,Od,!0);return}const C=[(n+A)/2,(s+a)/2];(t=c(this,Lv))==null||t.call(this,C,b,w)},oU=function(i){var t;i.touches.length>=2||(c(this,zl)&&(c(this,zl).abort(),F(this,zl,null),(t=c(this,_v))==null||t.call(this)),c(this,Gl)&&(Hr(i),F(this,Gl,null),F(this,Od,!1)))};let VS=HN;var Hd,qa,zr,$e,ql,Mg,Lc,i2,Kn,Vd,hh,JA,gu,Mv,Mf,jn,n2,Wd,Ih,Po,Tg,Ng,pA,hu,s2,xF,Xe,FF,Tv,SF,Y1,VN,lU,WB,$1,EF,WN,jN,KN,kF,GN,UF,zN,qN,XN,IF,i0;const di=class _i{constructor(t){U(this,Xe),U(this,Hd,null),U(this,qa,null),U(this,zr,null),U(this,$e,null),U(this,ql,null),U(this,Mg,!1),U(this,Lc,null),U(this,i2,""),U(this,Kn,null),U(this,Vd,null),U(this,hh,null),U(this,JA,null),U(this,gu,null),U(this,Mv,""),U(this,Mf,!1),U(this,jn,null),U(this,n2,!1),U(this,Wd,!1),U(this,Ih,!1),U(this,Po,null),U(this,Tg,0),U(this,Ng,0),U(this,pA,null),U(this,hu,null),ut(this,"isSelected",!1),ut(this,"_isCopy",!1),ut(this,"_editToolbar",null),ut(this,"_initialOptions",Object.create(null)),ut(this,"_initialData",null),ut(this,"_isVisible",!0),ut(this,"_uiManager",null),ut(this,"_focusEventsAllowed",!0),U(this,s2,!1),U(this,xF,_i._zIndex++),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null,this.creationDate=t.creationDate||new Date,this.modificationDate=t.modificationDate||null,this.canAddComment=!0;const{rotation:e,rawDims:{pageWidth:r,pageHeight:n,pageX:s,pageY:A}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,n],this.pageTranslation=[s,A];const[a,o]=this.parentDimensions;this.x=t.x/a,this.y=t.y/o,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=_i.prototype._resizeWithKeyboard,e=Cp.TRANSLATE_SMALL,r=Cp.TRANSLATE_BIG;return ke(this,"_resizerKeyboardManager",new $0([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,r]}],[["Escape","mac+Escape"],_i.prototype._stopResizingWithKeyboard]]))}updatePageIndex(t){this.pageIndex=t}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return ke(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new sV({id:t._uiManager.getId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){if(_i._l10n??(_i._l10n=t),_i._l10nResizer||(_i._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),_i._borderLineWidth!==-1)return;const r=getComputedStyle(document.documentElement);_i._borderLineWidth=parseFloat(r.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){rr("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return c(this,s2)}set _isDraggable(t){var e;F(this,s2,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=c(this,xF)}setParent(t){var e;t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):(_(this,Xe,i0).call(this),(e=c(this,JA))==null||e.remove(),F(this,JA,null)),this.parent=t}focusin(t){this._focusEventsAllowed&&(c(this,Mf)?F(this,Mf,!1):this.parent.setSelected(this))}focusout(t){var e;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const r=t.relatedTarget;r!=null&&r.closest(`#${this.id}`)||(t.preventDefault(),(e=this.parent)!=null&&e.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,r,n){const[s,A]=this.parentDimensions;[r,n]=this.screenToPageTranslation(r,n),this.x=(t+r)/s,this.y=(e+n)/A,this.fixAndSetPosition()}_moveAfterPaste(t,e){if(this.isClone){delete this.isClone;return}const[r,n]=this.parentDimensions;this.setAt(t*r,e*n,this.width*r,this.height*n),this._onTranslated()}translate(t,e){_(this,Xe,FF).call(this,this.parentDimensions,t,e)}translateInPage(t,e){c(this,jn)||F(this,jn,[this.x,this.y,this.width,this.height]),_(this,Xe,FF).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,e){c(this,jn)||F(this,jn,[this.x,this.y,this.width,this.height]);const{div:r,parentDimensions:[n,s]}=this;if(this.x+=t/n,this.y+=e/s,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:u,y:f}=this.div.getBoundingClientRect();this.parent.findNewParent(this,u,f)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:A,y:a}=this;const[o,l]=this.getBaseTranslation();A+=o,a+=l;const{style:h}=r;h.left=`${(100*A).toFixed(2)}%`,h.top=`${(100*a).toFixed(2)}%`,this._onTranslating(A,a),r.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!c(this,jn)&&(c(this,jn)[0]!==this.x||c(this,jn)[1]!==this.y)}get _hasBeenResized(){return!!c(this,jn)&&(c(this,jn)[2]!==this.width||c(this,jn)[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:r}=_i,n=r/t,s=r/e;switch(this.rotation){case 90:return[-n,s];case 180:return[n,s];case 270:return[n,-s];default:return[-n,-s]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:e},pageDimensions:[r,n]}=this;let{x:s,y:A,width:a,height:o}=this;if(a*=r,o*=n,s*=r,A*=n,this._mustFixPosition)switch(t){case 0:s=Mr(s,0,r-a),A=Mr(A,0,n-o);break;case 90:s=Mr(s,0,r-o),A=Mr(A,a,n);break;case 180:s=Mr(s,a,r),A=Mr(A,o,n);break;case 270:s=Mr(s,o,r),A=Mr(A,0,n-a);break}this.x=s/=r,this.y=A/=n;const[l,h]=this.getBaseTranslation();s+=l,A+=h,e.left=`${(100*s).toFixed(2)}%`,e.top=`${(100*A).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var r;return _(r=_i,Tv,SF).call(r,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var r;return _(r=_i,Tv,SF).call(r,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,r]}=this;return[e*t,r*t]}setDims(){const{div:{style:t},width:e,height:r}=this;t.width=`${(100*e).toFixed(2)}%`,t.height=`${(100*r).toFixed(2)}%`}getInitialTranslation(){return[0,0]}_onResized(){}static _round(t){return Math.round(t*1e4)/1e4}_onResizing(){}altTextFinish(){var t;(t=c(this,zr))==null||t.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||c(this,Wd))return this._editToolbar;this._editToolbar=new J9(this),this.div.append(this._editToolbar.render());const{toolbarButtons:t}=this;if(t)for(const[e,r]of t)await this._editToolbar.addButton(e,r);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){var t;(t=this._editToolbar)==null||t.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){var t;(t=this._editToolbar)==null||t.removeButton("comment")}removeEditToolbar(){var t,e;(t=this._editToolbar)==null||t.remove(),this._editToolbar=null,(e=c(this,zr))==null||e.destroy()}addContainer(t){var e;const r=(e=this._editToolbar)==null?void 0:e.div;r?r.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return c(this,zr)||(AU.initialize(_i._l10n),F(this,zr,new AU(this)),c(this,Hd)&&(c(this,zr).data=c(this,Hd),F(this,Hd,null))),c(this,zr)}get altTextData(){var t;return(t=c(this,zr))==null?void 0:t.data}set altTextData(t){c(this,zr)&&(c(this,zr).data=t)}get guessedAltText(){var t;return(t=c(this,zr))==null?void 0:t.guessedText}async setGuessedAltText(t){var e;await((e=c(this,zr))==null?void 0:e.setGuessedText(t))}serializeAltText(t){var e;return(e=c(this,zr))==null?void 0:e.serialize(t)}hasAltText(){return!!c(this,zr)&&!c(this,zr).isEmpty()}hasAltTextData(){var t;return((t=c(this,zr))==null?void 0:t.hasData())??!1}focusCommentButton(){var t;(t=c(this,$e))==null||t.focusButton()}addCommentButton(){return this.canAddComment?c(this,$e)||F(this,$e,new X1(this)):null}addStandaloneCommentButton(){if(this._uiManager.hasCommentManager()){if(c(this,ql)){this._uiManager.isEditingMode()&&c(this,ql).classList.remove("hidden");return}this.hasComment&&(F(this,ql,c(this,$e).renderForStandalone()),this.div.append(c(this,ql)))}}removeStandaloneCommentButton(){c(this,$e).removeStandaloneCommentButton(),F(this,ql,null)}hideStandaloneCommentButton(){var t;(t=c(this,ql))==null||t.classList.add("hidden")}get comment(){if(!c(this,$e))return null;const{data:{richText:t,text:e,date:r,deleted:n}}=c(this,$e);return{text:e,richText:t,date:r,deleted:n,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(t){c(this,$e)||F(this,$e,new X1(this)),typeof t=="object"&&t!==null?c(this,$e).restoreData(t):c(this,$e).data=t,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:t,popupRef:e,richText:r}){if(!e||(c(this,$e)||F(this,$e,new X1(this)),c(this,$e).setInitialText(t,r),!this.annotationElementId))return;const n=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);n&&this.updateFromAnnotationLayer(n)}get hasEditedComment(){var t;return(t=c(this,$e))==null?void 0:t.hasBeenEdited()}get hasDeletedComment(){var t;return(t=c(this,$e))==null?void 0:t.isDeleted()}get hasComment(){return!!c(this,$e)&&!c(this,$e).isEmpty()&&!c(this,$e).isDeleted()}async editComment(t){c(this,$e)||F(this,$e,new X1(this)),c(this,$e).edit(t)}toggleComment(t,e=void 0){this.hasComment&&this._uiManager.toggleComment(this,t,e)}setSelectedCommentButton(t){c(this,$e).setSelectedButton(t)}addComment(t){if(this.hasEditedComment){const[,,,e]=t.rect,[r]=this.pageDimensions,[n]=this.pageTranslation,s=n+r+1,A=e-100,a=s+180;t.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[s,A,a,e]}}}updateFromAnnotationLayer({popup:{contents:t,deleted:e}}){c(this,$e).data=e?null:t}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){var t;const e=this.div=document.createElement("div");e.setAttribute("data-editor-rotation",(360-this.rotation)%360),e.className=this.name,e.setAttribute("id",this.id),e.tabIndex=c(this,Mg)?-1:0,e.setAttribute("role","application"),this.defaultL10nId&&e.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||e.classList.add("hidden"),this.setInForeground(),_(this,Xe,UF).call(this);const[r,n]=this.parentDimensions;this.parentRotation%180!==0&&(e.style.maxWidth=`${(100*n/r).toFixed(2)}%`,e.style.maxHeight=`${(100*r/n).toFixed(2)}%`);const[s,A]=this.getInitialTranslation();return this.translate(s,A),xN(this,e,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(c(this,hu)||F(this,hu,new VS({container:e,isPinchingDisabled:()=>!this.isSelected,onPinchStart:_(this,Xe,WN).bind(this),onPinching:_(this,Xe,jN).bind(this),onPinchEnd:_(this,Xe,KN).bind(this),signal:this._uiManager._signal}))),this.addStandaloneCommentButton(),(t=this._uiManager._editorUndoBar)==null||t.hide(),e}pointerdown(t){const{isMac:e}=Fi.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}if(F(this,Mf,!0),this._isDraggable){_(this,Xe,GN).call(this,t);return}_(this,Xe,kF).call(this,t)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){c(this,Po)&&clearTimeout(c(this,Po)),F(this,Po,setTimeout(()=>{var t;F(this,Po,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,r){t.changeParent(this),this.x=e,this.y=r,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e,r=this.rotation){const n=this.parentScale,[s,A]=this.pageDimensions,[a,o]=this.pageTranslation,l=t/n,h=e/n,u=this.x*s,f=this.y*A,d=this.width*s,g=this.height*A;switch(r){case 0:return[u+l+a,A-f-h-g+o,u+l+d+a,A-f-h+o];case 90:return[u+h+a,A-f+l+o,u+h+g+a,A-f+l+d+o];case 180:return[u-l-d+a,A-f+h+o,u-l+a,A-f+h+g+o];case 270:return[u-h-g+a,A-f-l-d+o,u-h+a,A-f-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[r,n,s,A]=t,a=s-r,o=A-n;switch(this.rotation){case 0:return[r,e-A,a,o];case 90:return[r,e-n,o,a];case 180:return[s,e-n,a,o];case 270:return[s,e-A,o,a];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&_i._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){var t;(t=c(this,$e))==null||t.onUpdatedColor()}getData(){const{comment:{text:t,color:e,date:r,opacity:n,deleted:s,richText:A},uid:a,pageIndex:o,creationDate:l,modificationDate:h}=this;return{id:a,pageIndex:o,rect:this.getPDFRect(),richText:A,contentsObj:{str:t},creationDate:l,modificationDate:r||h,popupRef:!s,color:e,opacity:n}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),F(this,Wd,!0),!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),F(this,Wd,!1),!0):!1}isInEditMode(){return c(this,Wd)}shouldGetKeyboardEvents(){return c(this,Ih)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:r,right:n}=this.getClientDimensions(),{innerHeight:s,innerWidth:A}=window;return e<A&&n>0&&t<s&&r>0}rebuild(){_(this,Xe,UF).call(this)}rotate(t){}resize(){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){var r;return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:((r=this._initialData)==null?void 0:r.popupRef)||""}}static async deserialize(t,e,r){const n=new this.prototype.constructor({parent:e,id:r.getId(),uiManager:r,annotationElementId:t.annotationElementId,creationDate:t.creationDate,modificationDate:t.modificationDate});n.rotation=t.rotation,F(n,Hd,t.accessibilityData),n._isCopy=t.isCopy||!1;const[s,A]=n.pageDimensions,[a,o,l,h]=n.getRectInCurrentCoords(t.rect,A);return n.x=a/s,n.y=o/A,n.width=l/s,n.height=h/A,n}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t,e,r;if((t=c(this,gu))==null||t.abort(),F(this,gu,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.hideCommentPopup(),c(this,Po)&&(clearTimeout(c(this,Po)),F(this,Po,null)),_(this,Xe,i0).call(this),this.removeEditToolbar(),c(this,pA)){for(const n of c(this,pA).values())clearTimeout(n);F(this,pA,null)}this.parent=null,(e=c(this,hu))==null||e.destroy(),F(this,hu,null),(r=c(this,JA))==null||r.remove(),F(this,JA,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(_(this,Xe,VN).call(this),c(this,Kn).classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){const{commentButtonPosition:[t,e]}=this,[r,n,s,A]=this.getPDFRect();return[_i._round(r+(s-r)*t),_i._round(n+(A-n)*(1-e))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return c(this,$e).commentPopupPositionInLayer}set commentPopupPosition(t){c(this,$e).commentPopupPositionInLayer=t}hasDefaultPopupPosition(){return c(this,$e).hasDefaultPopupPosition()}get commentButtonWidth(){return c(this,$e).commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(t){var e;(e=c(this,$e))==null||e.setCommentButtonStates(t)}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),F(this,hh,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=c(this,Kn).children;if(!c(this,qa)){F(this,qa,Array.from(e));const A=_(this,Xe,zN).bind(this),a=_(this,Xe,qN).bind(this),o=this._uiManager._signal;for(const l of c(this,qa)){const h=l.getAttribute("data-resizer-name");l.setAttribute("role","spinbutton"),l.addEventListener("keydown",A,{signal:o}),l.addEventListener("blur",a,{signal:o}),l.addEventListener("focus",_(this,Xe,XN).bind(this,h),{signal:o}),l.setAttribute("data-l10n-id",_i._l10nResizer[h])}}const r=c(this,qa)[0];let n=0;for(const A of e){if(A===r)break;n++}const s=(360-this.rotation+this.parentRotation)%360/90*(c(this,qa).length/4);if(s!==n){if(s<n)for(let a=0;a<n-s;a++)c(this,Kn).append(c(this,Kn).firstElementChild);else if(s>n)for(let a=0;a<s-n;a++)c(this,Kn).firstElementChild.before(c(this,Kn).lastElementChild);let A=0;for(const a of e){const o=c(this,qa)[A++].getAttribute("data-resizer-name");a.setAttribute("data-l10n-id",_i._l10nResizer[o])}}_(this,Xe,IF).call(this,0),F(this,Ih,!0),c(this,Kn).firstElementChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(t,e){c(this,Ih)&&_(this,Xe,EF).call(this,c(this,Mv),{deltaX:t,deltaY:e,fromKeyboard:!0})}_stopResizingWithKeyboard(){_(this,Xe,i0).call(this),this.div.focus()}select(){var t,e,r;if(this.isSelected&&this._editToolbar){this._editToolbar.show();return}if(this.isSelected=!0,this.makeResizable(),(t=this.div)==null||t.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var n,s;(n=this.div)!=null&&n.classList.contains("selectedEditor")&&((s=this._editToolbar)==null||s.show())});return}(e=this._editToolbar)==null||e.show(),(r=c(this,zr))==null||r.toggleAltTextBadge(!1)}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>{var t;return(t=this.div)==null?void 0:t.focus({preventScroll:!0})},0)}unselect(){var t,e,r,n,s;this.isSelected&&(this.isSelected=!1,(t=c(this,Kn))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(r=this.div)!=null&&r.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(n=this._editToolbar)==null||n.hide(),(s=c(this,zr))==null||s.toggleAltTextBadge(!0),this.hideCommentPopup())}hideCommentPopup(){this.hasComment&&this._uiManager.toggleComment(null)}updateParams(t,e){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){t.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.uid}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return c(this,n2)}set isEditing(t){F(this,n2,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){c(this,pA)||F(this,pA,new Map);const{action:r}=t;let n=c(this,pA).get(r);n&&clearTimeout(n),n=setTimeout(()=>{this._reportTelemetry(t),c(this,pA).delete(r),c(this,pA).size===0&&F(this,pA,null)},_i._telemetryTimeout),c(this,pA).set(r,n);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),F(this,Mg,!1)}disable(){this.div&&(this.div.tabIndex=-1),F(this,Mg,!0)}updateFakeAnnotationElement(t){if(!c(this,JA)&&!this.deleted){F(this,JA,t.addFakeAnnotation(this));return}if(this.deleted){c(this,JA).remove(),F(this,JA,null);return}(this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&c(this,JA).updateEdited({rect:this.getPDFRect(),popup:this.comment})}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){const r=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),r.before(e)}return e}resetAnnotationElement(t){const{firstElementChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};Hd=new WeakMap,qa=new WeakMap,zr=new WeakMap,$e=new WeakMap,ql=new WeakMap,Mg=new WeakMap,Lc=new WeakMap,i2=new WeakMap,Kn=new WeakMap,Vd=new WeakMap,hh=new WeakMap,JA=new WeakMap,gu=new WeakMap,Mv=new WeakMap,Mf=new WeakMap,jn=new WeakMap,n2=new WeakMap,Wd=new WeakMap,Ih=new WeakMap,Po=new WeakMap,Tg=new WeakMap,Ng=new WeakMap,pA=new WeakMap,hu=new WeakMap,s2=new WeakMap,xF=new WeakMap,Xe=new WeakSet,FF=function([i,t],e,r){[e,r]=this.screenToPageTranslation(e,r),this.x+=e/i,this.y+=r/t,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},Tv=new WeakSet,SF=function(i,t,e){switch(e){case 90:return[t,-i];case 180:return[-i,-t];case 270:return[-t,i];default:return[i,t]}},Y1=function(i){switch(i){case 90:{const[t,e]=this.pageDimensions;return[0,-t/e,e/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,e]=this.pageDimensions;return[0,t/e,-e/t,0]}default:return[1,0,0,1]}},VN=function(){if(c(this,Kn))return;F(this,Kn,document.createElement("div")),c(this,Kn).classList.add("resizers");const i=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const e of i){const r=document.createElement("div");c(this,Kn).append(r),r.classList.add("resizer",e),r.setAttribute("data-resizer-name",e),r.addEventListener("pointerdown",_(this,Xe,lU).bind(this,e),{signal:t}),r.addEventListener("contextmenu",AA,{signal:t}),r.tabIndex=-1}this.div.prepend(c(this,Kn))},lU=function(i,t){var e;t.preventDefault();const{isMac:r}=Fi.platform;if(t.button!==0||t.ctrlKey&&r)return;(e=c(this,zr))==null||e.toggle(!1);const n=this._isDraggable;this._isDraggable=!1,F(this,Vd,[t.screenX,t.screenY]);const s=new AbortController,A=this._uiManager.combinedSignal(s);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",_(this,Xe,EF).bind(this,i),{passive:!0,capture:!0,signal:A}),window.addEventListener("touchmove",Hr,{passive:!1,signal:A}),window.addEventListener("contextmenu",AA,{signal:A}),F(this,hh,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const a=this.parent.div.style.cursor,o=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const l=()=>{var h;s.abort(),this.parent.togglePointerEvents(!0),(h=c(this,zr))==null||h.toggle(!0),this._isDraggable=n,this.parent.div.style.cursor=a,this.div.style.cursor=o,_(this,Xe,$1).call(this)};window.addEventListener("pointerup",l,{signal:A}),window.addEventListener("blur",l,{signal:A})},WB=function(i,t,e,r){this.width=e,this.height=r,this.x=i,this.y=t,this.setDims(),this.fixAndSetPosition(),this._onResized()},$1=function(){if(!c(this,hh))return;const{savedX:i,savedY:t,savedWidth:e,savedHeight:r}=c(this,hh);F(this,hh,null);const n=this.x,s=this.y,A=this.width,a=this.height;n===i&&s===t&&A===e&&a===r||this.addCommands({cmd:_(this,Xe,WB).bind(this,n,s,A,a),undo:_(this,Xe,WB).bind(this,i,t,e,r),mustExec:!0})},EF=function(i,t){const[e,r]=this.parentDimensions,n=this.x,s=this.y,A=this.width,a=this.height,o=di.MIN_SIZE/e,l=di.MIN_SIZE/r,h=_(this,Xe,Y1).call(this,this.rotation),u=(tt,et)=>[h[0]*tt+h[2]*et,h[1]*tt+h[3]*et],f=_(this,Xe,Y1).call(this,360-this.rotation),d=(tt,et)=>[f[0]*tt+f[2]*et,f[1]*tt+f[3]*et];let g,m,y=!1,w=!1;switch(i){case"topLeft":y=!0,g=(tt,et)=>[0,0],m=(tt,et)=>[tt,et];break;case"topMiddle":g=(tt,et)=>[tt/2,0],m=(tt,et)=>[tt/2,et];break;case"topRight":y=!0,g=(tt,et)=>[tt,0],m=(tt,et)=>[0,et];break;case"middleRight":w=!0,g=(tt,et)=>[tt,et/2],m=(tt,et)=>[0,et/2];break;case"bottomRight":y=!0,g=(tt,et)=>[tt,et],m=(tt,et)=>[0,0];break;case"bottomMiddle":g=(tt,et)=>[tt/2,et],m=(tt,et)=>[tt/2,0];break;case"bottomLeft":y=!0,g=(tt,et)=>[0,et],m=(tt,et)=>[tt,0];break;case"middleLeft":w=!0,g=(tt,et)=>[0,et/2],m=(tt,et)=>[tt,et/2];break}const b=g(A,a),C=m(A,a);let S=u(...C);const k=di._round(n+S[0]),I=di._round(s+S[1]);let N=1,D=1,Q,K;if(t.fromKeyboard)({deltaX:Q,deltaY:K}=t);else{const{screenX:tt,screenY:et}=t,[st,nt]=c(this,Vd);[Q,K]=this.screenToPageTranslation(tt-st,et-nt),c(this,Vd)[0]=tt,c(this,Vd)[1]=et}if([Q,K]=d(Q/e,K/r),y){const tt=Math.hypot(A,a);N=D=Math.max(Math.min(Math.hypot(C[0]-b[0]-Q,C[1]-b[1]-K)/tt,1/A,1/a),o/A,l/a)}else w?N=Mr(Math.abs(C[0]-b[0]-Q),o,1)/A:D=Mr(Math.abs(C[1]-b[1]-K),l,1)/a;const L=di._round(A*N),O=di._round(a*D);S=u(...m(L,O));const W=k-S[0],R=I-S[1];c(this,jn)||F(this,jn,[this.x,this.y,this.width,this.height]),this.width=L,this.height=O,this.x=W,this.y=R,this.setDims(),this.fixAndSetPosition(),this._onResizing()},WN=function(){var i;F(this,hh,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(i=c(this,zr))==null||i.toggle(!1),this.parent.togglePointerEvents(!1)},jN=function(i,t,e){let r=.7*(e/t)+1-.7;if(r===1)return;const n=_(this,Xe,Y1).call(this,this.rotation),s=(S,k)=>[n[0]*S+n[2]*k,n[1]*S+n[3]*k],[A,a]=this.parentDimensions,o=this.x,l=this.y,h=this.width,u=this.height,f=di.MIN_SIZE/A,d=di.MIN_SIZE/a;r=Math.max(Math.min(r,1/h,1/u),f/h,d/u);const g=di._round(h*r),m=di._round(u*r);if(g===h&&m===u)return;c(this,jn)||F(this,jn,[o,l,h,u]);const y=s(h/2,u/2),w=di._round(o+y[0]),b=di._round(l+y[1]),C=s(g/2,m/2);this.x=w-C[0],this.y=b-C[1],this.width=g,this.height=m,this.setDims(),this.fixAndSetPosition(),this._onResizing()},KN=function(){var i;(i=c(this,zr))==null||i.toggle(!0),this.parent.togglePointerEvents(!0),_(this,Xe,$1).call(this)},kF=function(i){const{isMac:t}=Fi.platform;i.ctrlKey&&!t||i.shiftKey||i.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},GN=function(i){const{isSelected:t}=this;this._uiManager.setUpDragSession();let e=!1;const r=new AbortController,n=this._uiManager.combinedSignal(r),s={capture:!0,passive:!1,signal:n},A=o=>{r.abort(),F(this,Lc,null),F(this,Mf,!1),this._uiManager.endDragSession()||_(this,Xe,kF).call(this,o),e&&this._onStopDragging()};t&&(F(this,Tg,i.clientX),F(this,Ng,i.clientY),F(this,Lc,i.pointerId),F(this,i2,i.pointerType),window.addEventListener("pointermove",o=>{e||(e=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());const{clientX:l,clientY:h,pointerId:u}=o;if(u!==c(this,Lc)){Hr(o);return}const[f,d]=this.screenToPageTranslation(l-c(this,Tg),h-c(this,Ng));F(this,Tg,l),F(this,Ng,h),this._uiManager.dragSelectedEditors(f,d)},s),window.addEventListener("touchmove",Hr,s),window.addEventListener("pointerdown",o=>{o.pointerType===c(this,i2)&&(c(this,hu)||o.isPrimary)&&A(o),Hr(o)},s));const a=o=>{if(!c(this,Lc)||c(this,Lc)===o.pointerId){A(o);return}Hr(o)};window.addEventListener("pointerup",a,{signal:n}),window.addEventListener("blur",a,{signal:n})},UF=function(){if(c(this,gu)||!this.div)return;F(this,gu,new AbortController);const i=this._uiManager.combinedSignal(c(this,gu));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:i}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:i})},zN=function(i){di._resizerKeyboardManager.exec(this,i)},qN=function(i){var t;c(this,Ih)&&((t=i.relatedTarget)==null?void 0:t.parentNode)!==c(this,Kn)&&_(this,Xe,i0).call(this)},XN=function(i){F(this,Mv,c(this,Ih)?i:"")},IF=function(i){if(c(this,qa))for(const t of c(this,qa))t.tabIndex=i},i0=function(){F(this,Ih,!1),_(this,Xe,IF).call(this,-1),_(this,Xe,$1).call(this)},U(di,Tv),ut(di,"_l10n",null),ut(di,"_l10nResizer",null),ut(di,"_borderLineWidth",-1),ut(di,"_colorManager",new nV),ut(di,"_zIndex",1),ut(di,"_telemetryTimeout",1e3);let Vr=di;class sV extends Vr{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const hU=3285377520,uA=4294901760,La=65535;class QF{constructor(t){this.h1=t?t&4294967295:hU,this.h2=t?t&4294967295:hU}update(t){let e,r;if(typeof t=="string"){e=new Uint8Array(t.length*2),r=0;for(let m=0,y=t.length;m<y;m++){const w=t.charCodeAt(m);w<=255?e[r++]=w:(e[r++]=w>>>8,e[r++]=w&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),r=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const n=r>>2,s=r-n*4,A=new Uint32Array(e.buffer,0,n);let a=0,o=0,l=this.h1,h=this.h2;const u=3432918353,f=461845907,d=u&La,g=f&La;for(let m=0;m<n;m++)m&1?(a=A[m],a=a*u&uA|a*d&La,a=a<<15|a>>>17,a=a*f&uA|a*g&La,l^=a,l=l<<13|l>>>19,l=l*5+3864292196):(o=A[m],o=o*u&uA|o*d&La,o=o<<15|o>>>17,o=o*f&uA|o*g&La,h^=o,h=h<<13|h>>>19,h=h*5+3864292196);switch(a=0,s){case 3:a^=e[n*4+2]<<16;case 2:a^=e[n*4+1]<<8;case 1:a^=e[n*4],a=a*u&uA|a*d&La,a=a<<15|a>>>17,a=a*f&uA|a*g&La,n&1?l^=a:h^=a}this.h1=l,this.h2=h}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&uA|t*36045&La,e=e*4283543511&uA|((e<<16|t>>>16)*2950163797&uA)>>>16,t^=e>>>1,t=t*444984403&uA|t*60499&La,e=e*3301882366&uA|((e<<16|t>>>16)*3120437893&uA)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const P0=Object.freeze({map:null,hash:"",transfer:void 0});var op,jd,Do,Pn,LF,YN;class WS{constructor(){U(this,LF),U(this,op,!1),U(this,jd,null),U(this,Do,null),U(this,Pn,new Map),ut(this,"onSetModified",null),ut(this,"onResetModified",null),ut(this,"onAnnotationEditor",null)}getValue(t,e){const r=c(this,Pn).get(t);return r===void 0?e:Object.assign(e,r)}getRawValue(t){return c(this,Pn).get(t)}remove(t){var e;const r=c(this,Pn).get(t);r!==void 0&&(r instanceof Vr&&c(this,Do).delete(r.annotationElementId),c(this,Pn).delete(t),c(this,Pn).size===0&&this.resetModified(),!c(this,Pn).values().some(n=>n instanceof Vr)&&((e=this.onAnnotationEditor)==null||e.call(this,null)))}setValue(t,e){var r;const n=c(this,Pn).get(t);let s=!1;if(n!==void 0)for(const[A,a]of Object.entries(e))n[A]!==a&&(s=!0,n[A]=a);else s=!0,c(this,Pn).set(t,e);s&&_(this,LF,YN).call(this),e instanceof Vr&&((c(this,Do)||F(this,Do,new Map)).set(e.annotationElementId,e),(r=this.onAnnotationEditor)==null||r.call(this,e.constructor._type))}has(t){return c(this,Pn).has(t)}get size(){return c(this,Pn).size}resetModified(){var t;c(this,op)&&(F(this,op,!1),(t=this.onResetModified)==null||t.call(this))}get print(){return new $N(this)}get serializable(){if(c(this,Pn).size===0)return P0;const t=new Map,e=new QF,r=[],n=Object.create(null);let s=!1;for(const[A,a]of c(this,Pn)){const o=a instanceof Vr?a.serialize(!1,n):a;a.page&&(a.pageIndex=a.page._pageIndex,delete a.page),o&&(t.set(A,o),e.update(`${A}:${JSON.stringify(o)}`),s||(s=!!o.bitmap))}if(s)for(const A of t.values())A.bitmap&&r.push(A.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:r}:P0}get editorStats(){let t=null;const e=new Map;let r=0,n=0;for(const s of c(this,Pn).values()){if(!(s instanceof Vr)){s.popup&&(s.popup.deleted?n+=1:r+=1);continue}s.isCommentDeleted?n+=1:s.hasEditedComment&&(r+=1);const A=s.telemetryFinalData;if(!A)continue;const{type:a}=A;e.has(a)||e.set(a,Object.getPrototypeOf(s).constructor),t||(t=Object.create(null));const o=t[a]||(t[a]=new Map);for(const[l,h]of Object.entries(A)){if(l==="type")continue;const u=o.getOrInsertComputed(l,Oy);u.set(h,(u.get(h)??0)+1)}}if((n>0||r>0)&&(t||(t=Object.create(null)),t.comments={deleted:n,edited:r}),!t)return null;for(const[s,A]of e)t[s]=A.computeTelemetryFinalData(t[s]);return t}resetModifiedIds(){F(this,jd,null)}updateEditor(t,e){var r;const n=(r=c(this,Do))==null?void 0:r.get(t);return n?(n.updateFromAnnotationLayer(e),!0):!1}getEditor(t){var e;return((e=c(this,Do))==null?void 0:e.get(t))||null}get modifiedIds(){if(c(this,jd))return c(this,jd);const t=[];if(c(this,Do))for(const r of c(this,Do).values())r.serialize()&&t.push(r.annotationElementId);let e="";if(t.length){const r=new QF;r.update(t.join(",")),e=r.hexdigest()}return F(this,jd,{ids:new Set(t),hash:e})}[Symbol.iterator](){return c(this,Pn).entries()}}op=new WeakMap,jd=new WeakMap,Do=new WeakMap,Pn=new WeakMap,LF=new WeakSet,YN=function(){var i;c(this,op)||(F(this,op,!0),(i=this.onSetModified)==null||i.call(this))};var A2;class $N extends WS{constructor(t){super(),U(this,A2,P0);const{serializable:e}=t;if(e===P0)return;const{map:r,hash:n,transfer:s}=e,A=structuredClone(r,s?{transfer:s}:null);F(this,A2,{map:A,hash:n,transfer:[]})}get print(){rr("Should not call PrintAnnotationStorage.print")}get serializable(){return c(this,A2)}get modifiedIds(){return ke(this,"modifiedIds",{ids:new Set,hash:""})}}A2=new WeakMap;const md="__forcedDependency",{floor:cU,ceil:uU}=Math;function dU(i,t,e,r,n,s){i[t*4+0]=Math.min(i[t*4+0],e),i[t*4+1]=Math.min(i[t*4+1],r),i[t*4+2]=Math.max(i[t*4+2],n),i[t*4+3]=Math.max(i[t*4+3],s)}const _F=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];var Pg,_c;class AV{constructor(t,e){U(this,Pg),U(this,_c),F(this,Pg,t),F(this,_c,e)}get length(){return c(this,Pg).length}isEmpty(t){return c(this,Pg)[t]===_F}minX(t){return c(this,_c)[t*4+0]/256}minY(t){return c(this,_c)[t*4+1]/256}maxX(t){return(c(this,_c)[t*4+2]+1)/256}maxY(t){return(c(this,_c)[t*4+3]+1)/256}}Pg=new WeakMap,_c=new WeakMap;const fU=(i,t)=>i==null?void 0:i.getOrInsertComputed(t,()=>({dependencies:new Set,isRenderingOperation:!1}));var Xl,sr,Or,Kd,Gd,Tf,ls,a2,MF;class aV{constructor(t,e){U(this,a2),U(this,Xl,[[1,0,0,1,0,0]]),U(this,sr,[-1/0,-1/0,1/0,1/0]),U(this,Or,new Float64Array(fl)),ut(this,"_pendingBBoxIdx",-1),U(this,Kd),U(this,Gd),U(this,Tf),U(this,ls),ut(this,"_savesStack",[]),ut(this,"_markedContentStack",[]),F(this,Kd,t.width),F(this,Gd,t.height),_(this,a2,MF).call(this,e)}growOperationsCount(t){t>=c(this,ls).length&&_(this,a2,MF).call(this,t,c(this,ls))}get clipBox(){return c(this,sr)}save(t){return F(this,sr,{__proto__:c(this,sr)}),this._savesStack.push(t),this}restore(t,e){const r=Object.getPrototypeOf(c(this,sr));if(r===null)return this;F(this,sr,r);const n=this._savesStack.pop();return n!==void 0&&(e==null||e(n,t),c(this,ls)[t]=c(this,ls)[n]),this}recordOpenMarker(t){return this._savesStack.push(t),this}getOpenMarker(){return this._savesStack.length===0?null:this._savesStack.at(-1)}recordCloseMarker(t,e){const r=this._savesStack.pop();return r!==void 0&&(e==null||e(r,t),c(this,ls)[t]=c(this,ls)[r]),this}beginMarkedContent(t){return this._markedContentStack.push(t),this}endMarkedContent(t,e){const r=this._markedContentStack.pop();return r!==void 0&&(e==null||e(r,t),c(this,ls)[t]=c(this,ls)[r]),this}pushBaseTransform(t){return c(this,Xl).push(Nt.multiplyByDOMMatrix(c(this,Xl).at(-1),t.getTransform())),this}popBaseTransform(){return c(this,Xl).length>1&&c(this,Xl).pop(),this}resetBBox(t){return this._pendingBBoxIdx!==t&&(this._pendingBBoxIdx=t,c(this,Or).set(fl,0)),this}recordClipBox(t,e,r,n,s,A){const a=Nt.multiplyByDOMMatrix(c(this,Xl).at(-1),e.getTransform()),o=fl.slice();Nt.axialAlignedBoundingBox([r,s,n,A],a,o);const l=Nt.intersect(c(this,sr),o);return l?(c(this,sr)[0]=l[0],c(this,sr)[1]=l[1],c(this,sr)[2]=l[2],c(this,sr)[3]=l[3]):(c(this,sr)[0]=c(this,sr)[1]=1/0,c(this,sr)[2]=c(this,sr)[3]=-1/0),this}recordBBox(t,e,r,n,s,A){const a=c(this,sr);if(a[0]===1/0)return this;const o=Nt.multiplyByDOMMatrix(c(this,Xl).at(-1),e.getTransform());if(a[0]===-1/0)return Nt.axialAlignedBoundingBox([r,s,n,A],o,c(this,Or)),this;const l=fl.slice();return Nt.axialAlignedBoundingBox([r,s,n,A],o,l),c(this,Or)[0]=Mr(l[0],a[0],c(this,Or)[0]),c(this,Or)[1]=Mr(l[1],a[1],c(this,Or)[1]),c(this,Or)[2]=Mr(l[2],c(this,Or)[2],a[2]),c(this,Or)[3]=Mr(l[3],c(this,Or)[3],a[3]),this}recordFullPageBBox(t){return c(this,Or)[0]=Math.max(0,c(this,sr)[0]),c(this,Or)[1]=Math.max(0,c(this,sr)[1]),c(this,Or)[2]=Math.min(c(this,Kd),c(this,sr)[2]),c(this,Or)[3]=Math.min(c(this,Gd),c(this,sr)[3]),this}recordOperation(t,e=!1,r){if(this._pendingBBoxIdx!==t)return this;const n=cU(c(this,Or)[0]*256/c(this,Kd)),s=cU(c(this,Or)[1]*256/c(this,Gd)),A=uU(c(this,Or)[2]*256/c(this,Kd)),a=uU(c(this,Or)[3]*256/c(this,Gd));if(dU(c(this,Tf),t,n,s,A,a),r)for(const o of r)for(const l of o)l!==t&&dU(c(this,Tf),l,n,s,A,a);return e||(this._pendingBBoxIdx=-1),this}bboxToClipBoxDropOperation(t){return this._pendingBBoxIdx===t&&(this._pendingBBoxIdx=-1,c(this,sr)[0]=Math.max(c(this,sr)[0],c(this,Or)[0]),c(this,sr)[1]=Math.max(c(this,sr)[1],c(this,Or)[1]),c(this,sr)[2]=Math.min(c(this,sr)[2],c(this,Or)[2]),c(this,sr)[3]=Math.min(c(this,sr)[3],c(this,Or)[3])),this}take(){return new AV(c(this,ls),c(this,Tf))}takeDebugMetadata(){throw new Error("Unreachable")}recordSimpleData(t,e){return this}recordIncrementalData(t,e){return this}resetIncrementalData(t,e){return this}recordNamedData(t,e){return this}recordSimpleDataFromNamed(t,e,r){return this}recordFutureForcedDependency(t,e){return this}inheritSimpleDataAsFutureForcedDependencies(t){return this}inheritPendingDependenciesAsFutureForcedDependencies(){return this}recordCharacterBBox(t,e,r,n=1,s=0,A=0,a){return this}getSimpleIndex(t){}recordDependencies(t,e){return this}recordNamedDependency(t,e){return this}recordShowTextOperation(t,e=!1){return this}}Xl=new WeakMap,sr=new WeakMap,Or=new WeakMap,Kd=new WeakMap,Gd=new WeakMap,Tf=new WeakMap,ls=new WeakMap,a2=new WeakSet,MF=function(i,t){const e=new ArrayBuffer(i*4);F(this,Tf,new Uint8ClampedArray(e)),F(this,ls,new Uint32Array(e)),t&&t.length>0?(c(this,ls).set(t),c(this,ls).fill(_F,t.length)):c(this,ls).fill(_F)};var Gs,zs,zd,Pa,Dg,Mc,Tc,pr;class oV{constructor(t,e=!1){U(this,Gs,{__proto__:null}),U(this,zs,{__proto__:null,transform:[],moveText:[],sameLineText:[],[md]:[]}),U(this,zd,new Map),U(this,Pa,new Set),U(this,Dg,new Map),U(this,Mc),U(this,Tc),U(this,pr),F(this,pr,t),e&&(F(this,Mc,new Map),F(this,Tc,(r,n)=>{fU(c(this,Mc),n).dependencies.add(r)}))}get clipBox(){return c(this,pr).clipBox}growOperationsCount(t){c(this,pr).growOperationsCount(t)}save(t){return F(this,Gs,{__proto__:c(this,Gs)}),F(this,zs,{__proto__:c(this,zs),transform:{__proto__:c(this,zs).transform},moveText:{__proto__:c(this,zs).moveText},sameLineText:{__proto__:c(this,zs).sameLineText},[md]:{__proto__:c(this,zs)[md]}}),c(this,pr).save(t),this}restore(t){c(this,pr).restore(t,c(this,Tc));const e=Object.getPrototypeOf(c(this,Gs));return e===null?this:(F(this,Gs,e),F(this,zs,Object.getPrototypeOf(c(this,zs))),this)}recordOpenMarker(t){return c(this,pr).recordOpenMarker(t,c(this,Tc)),this}getOpenMarker(){return c(this,pr).getOpenMarker()}recordCloseMarker(t){return c(this,pr).recordCloseMarker(t,c(this,Tc)),this}beginMarkedContent(t){return c(this,pr).beginMarkedContent(t),this}endMarkedContent(t){return c(this,pr).endMarkedContent(t,c(this,Tc)),this}pushBaseTransform(t){return c(this,pr).pushBaseTransform(t),this}popBaseTransform(){return c(this,pr).popBaseTransform(),this}recordSimpleData(t,e){return c(this,Gs)[t]=e,this}recordIncrementalData(t,e){return c(this,zs)[t].push(e),this}resetIncrementalData(t,e){return c(this,zs)[t].length=0,this}recordNamedData(t,e){return c(this,zd).set(t,e),this}recordSimpleDataFromNamed(t,e,r){c(this,Gs)[t]=c(this,zd).get(e)??r}recordFutureForcedDependency(t,e){return this.recordIncrementalData(md,e),this}inheritSimpleDataAsFutureForcedDependencies(t){for(const e of t)e in c(this,Gs)&&this.recordFutureForcedDependency(e,c(this,Gs)[e]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const t of c(this,Pa))this.recordFutureForcedDependency(md,t);return this}resetBBox(t){return c(this,pr).resetBBox(t),this}recordClipBox(t,e,r,n,s,A){return c(this,pr).recordClipBox(t,e,r,n,s,A),this}recordBBox(t,e,r,n,s,A){return c(this,pr).recordBBox(t,e,r,n,s,A),this}recordCharacterBBox(t,e,r,n=1,s=0,A=0,a){const o=r.bbox;let l,h;if(o&&(l=o[2]!==o[0]&&o[3]!==o[1]&&c(this,Dg).get(r),l!==!1&&(h=[0,0,0,0],Nt.axialAlignedBoundingBox(o,r.fontMatrix,h),(n!==1||s!==0||A!==0)&&Nt.scaleMinMax([n,0,0,-n,s,A],h),l)))return this.recordBBox(t,e,h[0],h[2],h[1],h[3]);if(!a)return this.recordFullPageBBox(t);const u=a();return o&&h&&l===void 0&&(l=h[0]<=s-u.actualBoundingBoxLeft&&h[2]>=s+u.actualBoundingBoxRight&&h[1]<=A-u.actualBoundingBoxAscent&&h[3]>=A+u.actualBoundingBoxDescent,c(this,Dg).set(r,l),l)?this.recordBBox(t,e,h[0],h[2],h[1],h[3]):this.recordBBox(t,e,s-u.actualBoundingBoxLeft,s+u.actualBoundingBoxRight,A-u.actualBoundingBoxAscent,A+u.actualBoundingBoxDescent)}recordFullPageBBox(t){return c(this,pr).recordFullPageBBox(t),this}getSimpleIndex(t){return c(this,Gs)[t]}recordDependencies(t,e){const r=c(this,Pa),n=c(this,Gs),s=c(this,zs);for(const A of e)A in c(this,Gs)?r.add(n[A]):A in s&&s[A].forEach(r.add,r);return this}recordNamedDependency(t,e){return c(this,zd).has(e)&&c(this,Pa).add(c(this,zd).get(e)),this}recordOperation(t,e=!1){if(this.recordDependencies(t,[md]),c(this,Mc)){const n=fU(c(this,Mc),t),{dependencies:s}=n;c(this,Pa).forEach(s.add,s),c(this,pr)._savesStack.forEach(s.add,s),c(this,pr)._markedContentStack.forEach(s.add,s),s.delete(t),n.isRenderingOperation=!0}const r=!e&&t===c(this,pr)._pendingBBoxIdx;return c(this,pr).recordOperation(t,e,[c(this,Pa),c(this,pr)._savesStack,c(this,pr)._markedContentStack]),r&&c(this,Pa).clear(),this}recordShowTextOperation(t,e=!1){const r=Array.from(c(this,Pa));this.recordOperation(t,e),this.recordIncrementalData("sameLineText",t);for(const n of r)this.recordIncrementalData("sameLineText",n);return this}bboxToClipBoxDropOperation(t,e=!1){const r=!e&&t===c(this,pr)._pendingBBoxIdx;return c(this,pr).bboxToClipBoxDropOperation(t),r&&c(this,Pa).clear(),this}take(){return c(this,Dg).clear(),c(this,pr).take()}takeDebugMetadata(){return c(this,Mc)}}Gs=new WeakMap,zs=new WeakMap,zd=new WeakMap,Pa=new WeakMap,Dg=new WeakMap,Mc=new WeakMap,Tc=new WeakMap,pr=new WeakMap;var gr,fi,Da,Og,Rg;const lV=class ZN{constructor(t,e,r){if(U(this,gr),U(this,fi),U(this,Da),U(this,Og,0),U(this,Rg,0),t instanceof ZN&&c(t,Da)===!!r)return t;F(this,gr,t),F(this,fi,e),F(this,Da,!!r)}get clipBox(){return c(this,gr).clipBox}growOperationsCount(){throw new Error("Unreachable")}save(t){return $i(this,Rg)._++,c(this,gr).save(c(this,fi)),this}restore(t){return c(this,Rg)>0&&(c(this,gr).restore(c(this,fi)),$i(this,Rg)._--),this}recordOpenMarker(t){return $i(this,Og)._++,this}getOpenMarker(){return c(this,Og)>0?c(this,fi):c(this,gr).getOpenMarker()}recordCloseMarker(t){return $i(this,Og)._--,this}beginMarkedContent(t){return this}endMarkedContent(t){return this}pushBaseTransform(t){return c(this,gr).pushBaseTransform(t),this}popBaseTransform(){return c(this,gr).popBaseTransform(),this}recordSimpleData(t,e){return c(this,gr).recordSimpleData(t,c(this,fi)),this}recordIncrementalData(t,e){return c(this,gr).recordIncrementalData(t,c(this,fi)),this}resetIncrementalData(t,e){return c(this,gr).resetIncrementalData(t,c(this,fi)),this}recordNamedData(t,e){return this}recordSimpleDataFromNamed(t,e,r){return c(this,gr).recordSimpleDataFromNamed(t,e,c(this,fi)),this}recordFutureForcedDependency(t,e){return c(this,gr).recordFutureForcedDependency(t,c(this,fi)),this}inheritSimpleDataAsFutureForcedDependencies(t){return c(this,gr).inheritSimpleDataAsFutureForcedDependencies(t),this}inheritPendingDependenciesAsFutureForcedDependencies(){return c(this,gr).inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(t){return c(this,Da)||c(this,gr).resetBBox(c(this,fi)),this}recordClipBox(t,e,r,n,s,A){return c(this,Da)||c(this,gr).recordClipBox(c(this,fi),e,r,n,s,A),this}recordBBox(t,e,r,n,s,A){return c(this,Da)||c(this,gr).recordBBox(c(this,fi),e,r,n,s,A),this}recordCharacterBBox(t,e,r,n,s,A,a){return c(this,Da)||c(this,gr).recordCharacterBBox(c(this,fi),e,r,n,s,A,a),this}recordFullPageBBox(t){return c(this,Da)||c(this,gr).recordFullPageBBox(c(this,fi)),this}getSimpleIndex(t){return c(this,gr).getSimpleIndex(t)}recordDependencies(t,e){return c(this,gr).recordDependencies(c(this,fi),e),this}recordNamedDependency(t,e){return c(this,gr).recordNamedDependency(c(this,fi),e),this}recordOperation(t){return c(this,gr).recordOperation(c(this,fi),!0),this}recordShowTextOperation(t){return c(this,gr).recordShowTextOperation(c(this,fi),!0),this}bboxToClipBoxDropOperation(t){return c(this,Da)||c(this,gr).bboxToClipBoxDropOperation(c(this,fi),!0),this}take(){throw new Error("Unreachable")}takeDebugMetadata(){throw new Error("Unreachable")}};gr=new WeakMap,fi=new WeakMap,Da=new WeakMap,Og=new WeakMap,Rg=new WeakMap;let TF=lV;const dA={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["filter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],transform:["transform"],transformAndFill:["transform","fillColor"]};var qd,Xd,Nc,Yd,$d,Nv;const JN=class NF{constructor(t){U(this,qd),U(this,Xd),U(this,Nc,4),U(this,Yd,0),U(this,$d,new(c(NF,Nv))(c(this,Nc)*6)),F(this,qd,t.width),F(this,Xd,t.height)}record(t,e,r,n){if(c(this,Yd)===c(this,Nc)){F(this,Nc,c(this,Nc)*2);const a=new(c(NF,Nv))(c(this,Nc)*6);a.set(c(this,$d)),F(this,$d,a)}const s=Nt.domMatrixToTransform(t.getTransform());let A;if(n[0]!==1/0){const a=fl.slice();Nt.axialAlignedBoundingBox([0,-r,e,0],s,a);const o=Nt.intersect(n,a);if(!o)return;const[l,h,u,f]=o;if(l!==a[0]||h!==a[1]||u!==a[2]||f!==a[3]){const d=Math.atan2(s[1],s[0]),g=Math.abs(Math.sin(d)),m=Math.abs(Math.cos(d));if(g<1e-6||m<1e-6||Math.abs(g-m)<1e-6)A=[l,h,l,f,u,h];else{const y=u-l,w=f-h,b=g*g,C=m*m,S=m*g,k=C-b,I=(w*C-y*S)/k,N=(w*S-y*b)/k;A=[l+N,h,l,h+I,u,f-I]}}}A||(A=[0,-r,0,0,e,-r],Nt.applyTransform(A,s,0),Nt.applyTransform(A,s,2),Nt.applyTransform(A,s,4)),A[0]/=c(this,qd),A[1]/=c(this,Xd),A[2]/=c(this,qd),A[3]/=c(this,Xd),A[4]/=c(this,qd),A[5]/=c(this,Xd),c(this,$d).set(A,c(this,Yd)*6),$i(this,Yd)._++}take(){return c(this,$d).subarray(0,c(this,Yd)*6)}};qd=new WeakMap,Xd=new WeakMap,Nc=new WeakMap,Yd=new WeakMap,$d=new WeakMap,Nv=new WeakMap,U(JN,Nv,Fi.isFloat16ArraySupported?Float16Array:Float32Array);let hV=JN;var Hg;class cV{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){U(this,Hg,new Set),this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),c(this,Hg).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:e,_inspectFont:r}){if(!(!t||c(this,Hg).has(t.loadedName))){if(Xr(!e,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:n,src:s,style:A}=t,a=new FontFace(n,s,A);this.addNativeFontFace(a);try{await a.load(),c(this,Hg).add(n),r==null||r(t)}catch{Me(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(a)}return}rr("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const r=t.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(n){throw Me(`Failed to load font '${r.family}': '${n}'.`),t.disableFontFace=!0,n}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const n=this._queueLoadingCallback(r);this._prepareFontLoadEvent(t,n)})}}get isFontLoadingAPISupported(){var t;const e=!!((t=this._document)!=null&&t.fonts);return ke(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){return ke(this,"isSyncFontLoadingSupported",nA||Fi.platform.isFirefox)}_queueLoadingCallback(t){function e(){for(Xr(!n.done,"completeRequest() cannot be called twice."),n.done=!0;r.length>0&&r[0].done;){const s=r.shift();setTimeout(s.callback,0)}}const{loadingRequests:r}=this,n={done:!1,complete:e,callback:t};return r.push(n),n}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return ke(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function r(S,k){return S.charCodeAt(k)<<24|S.charCodeAt(k+1)<<16|S.charCodeAt(k+2)<<8|S.charCodeAt(k+3)&255}function n(S){return String.fromCharCode(S>>24&255,S>>16&255,S>>8&255,S&255)}function s(S,k,I,N){const D=S.substring(0,k),Q=S.substring(k+I);return D+N+Q}let A,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let h=0;function u(S,k){if(++h>30){Me("Load test font never loaded."),k();return}if(l.font="30px "+S,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){k();return}setTimeout(u.bind(null,S,k))}const f=`lt${Date.now()}${this.loadTestFontId++}`;let d=this._loadTestFont;d=s(d,976,f.length,f);const g=16,m=1482184792;let y=r(d,g);for(A=0,a=f.length-3;A<a;A+=4)y=y-m+r(f,A)|0;A<f.length&&(y=y-m+r(f+"XXX",A)|0),d=s(d,g,4,n(y));const w=`url(data:font/opentype;base64,${btoa(d)});`,b=`@font-face {font-family:"${f}";src:${w}}`;this.insertRule(b);const C=this._document.createElement("div");C.style.visibility="hidden",C.style.width=C.style.height="10px",C.style.position="absolute",C.style.top=C.style.left="0px";for(const S of[t.loadedName,f]){const k=this._document.createElement("span");k.textContent="Hi",k.style.fontFamily=S,C.append(k)}this._document.body.append(C),u(f,()=>{C.remove(),e.complete()})}}Hg=new WeakMap;var mr;class uV{constructor(t,e=null,r,n){ut(this,"compiledGlyphs",Object.create(null)),U(this,mr),F(this,mr,t),this._inspectFont=e,r&&(this.charProcOperatorList=r),n&&Object.assign(this,n)}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}return(t=this._inspectFont)==null||t.call(this,this),e}createFontFaceRule(){var t;if(!this.data||this.disableFontFace)return null;const e=`url(data:${this.mimetype};base64,${this.data.toBase64()});`;let r;if(!this.cssFontInfo)r=`@font-face {font-family:"${this.loadedName}";src:${e}}`;else{let n=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(n+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${n}src:${e}}`}return(t=this._inspectFont)==null||t.call(this,this,e),r}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];const r=this.loadedName+"_path_"+e;let n;try{n=t.get(r)}catch(A){Me(`getPathGenerator - ignoring character: "${A}".`)}const s=yN(n==null?void 0:n.path);return this.fontExtraProperties||t.delete(r),this.compiledGlyphs[e]=s}get black(){return c(this,mr).black}get bold(){return c(this,mr).bold}get disableFontFace(){return c(this,mr).disableFontFace}set disableFontFace(t){ke(this,"disableFontFace",!!t)}get fontExtraProperties(){return c(this,mr).fontExtraProperties}get isInvalidPDFjsFont(){return c(this,mr).isInvalidPDFjsFont}get isType3Font(){return c(this,mr).isType3Font}get italic(){return c(this,mr).italic}get missingFile(){return c(this,mr).missingFile}get remeasure(){return c(this,mr).remeasure}get vertical(){return c(this,mr).vertical}get ascent(){return c(this,mr).ascent}get defaultWidth(){return c(this,mr).defaultWidth}get descent(){return c(this,mr).descent}get bbox(){return c(this,mr).bbox}get fontMatrix(){return c(this,mr).fontMatrix}get fallbackName(){return c(this,mr).fallbackName}get loadedName(){return c(this,mr).loadedName}get mimetype(){return c(this,mr).mimetype}get name(){return c(this,mr).name}get data(){return c(this,mr).data}clearData(){c(this,mr).clearData()}get cssFontInfo(){return c(this,mr).cssFontInfo}get systemFontInfo(){return c(this,mr).systemFontInfo}get defaultVMetrics(){return c(this,mr).defaultVMetrics}}mr=new WeakMap;class tP{}ut(tP,"strings",["fontFamily","fontWeight","italicAngle"]);class eP{}ut(eP,"strings",["css","loadedName","baseFontName","src"]);const is=class{};ut(is,"bools",["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"]),ut(is,"numbers",["ascent","defaultWidth","descent"]),ut(is,"strings",["fallbackName","loadedName","mimetype","name"]),ut(is,"OFFSET_NUMBERS",Math.ceil(is.bools.length*2/8)),ut(is,"OFFSET_BBOX",is.OFFSET_NUMBERS+is.numbers.length*8),ut(is,"OFFSET_FONT_MATRIX",is.OFFSET_BBOX+1+8),ut(is,"OFFSET_DEFAULT_VMETRICS",is.OFFSET_FONT_MATRIX+1+48),ut(is,"OFFSET_STRINGS",is.OFFSET_DEFAULT_VMETRICS+1+6);let ua=is;class cs{}ut(cs,"KIND",0),ut(cs,"HAS_BBOX",1),ut(cs,"HAS_BACKGROUND",2),ut(cs,"SHADING_TYPE",3),ut(cs,"N_COORD",4),ut(cs,"N_COLOR",8),ut(cs,"N_STOP",12),ut(cs,"N_FIGURES",16);var Pv,PF,n0,Vg,o2;class dV{constructor(t){U(this,Vg),U(this,Pv),U(this,PF,new TextDecoder),U(this,n0),F(this,Pv,t),F(this,n0,new DataView(t))}get fontFamily(){return _(this,Vg,o2).call(this,0)}get fontWeight(){return _(this,Vg,o2).call(this,1)}get italicAngle(){return _(this,Vg,o2).call(this,2)}}Pv=new WeakMap,PF=new WeakMap,n0=new WeakMap,Vg=new WeakSet,o2=function(i){Xr(i<tP.strings.length,"Invalid string index");let t=0;for(let r=0;r<i;r++)t+=c(this,n0).getUint32(t)+4;const e=c(this,n0).getUint32(t);return c(this,PF).decode(new Uint8Array(c(this,Pv),t+4,e))};var Nf,s0,nl,Zd,Wg;class fV{constructor(t){U(this,Zd),U(this,Nf),U(this,s0,new TextDecoder),U(this,nl),F(this,Nf,t),F(this,nl,new DataView(t))}get guessFallback(){return c(this,nl).getUint8(0)!==0}get css(){return _(this,Zd,Wg).call(this,0)}get loadedName(){return _(this,Zd,Wg).call(this,1)}get baseFontName(){return _(this,Zd,Wg).call(this,2)}get src(){return _(this,Zd,Wg).call(this,3)}get style(){let t=1;t+=4+c(this,nl).getUint32(t);const e=c(this,nl).getUint32(t),r=c(this,s0).decode(new Uint8Array(c(this,Nf),t+4,e));t+=4+e;const n=c(this,nl).getUint32(t),s=c(this,s0).decode(new Uint8Array(c(this,Nf),t+4,n));return{style:r,weight:s}}}Nf=new WeakMap,s0=new WeakMap,nl=new WeakMap,Zd=new WeakSet,Wg=function(i){Xr(i<eP.strings.length,"Invalid string index");let t=5;for(let r=0;r<i;r++)t+=c(this,nl).getUint32(t)+4;const e=c(this,nl).getUint32(t);return c(this,s0).decode(new Uint8Array(c(this,Nf),t+4,e))};var ja,DF,Di,Rr,ta,l2,h2,jg,OF;class pV{constructor({buffer:t,extra:e}){U(this,Rr),U(this,ja),U(this,DF,new TextDecoder),U(this,Di),F(this,ja,t),F(this,Di,new DataView(t)),e&&Object.assign(this,e)}get black(){return _(this,Rr,ta).call(this,0)}get bold(){return _(this,Rr,ta).call(this,1)}get disableFontFace(){return _(this,Rr,ta).call(this,2)}get fontExtraProperties(){return _(this,Rr,ta).call(this,3)}get isInvalidPDFjsFont(){return _(this,Rr,ta).call(this,4)}get isType3Font(){return _(this,Rr,ta).call(this,5)}get italic(){return _(this,Rr,ta).call(this,6)}get missingFile(){return _(this,Rr,ta).call(this,7)}get remeasure(){return _(this,Rr,ta).call(this,8)}get vertical(){return _(this,Rr,ta).call(this,9)}get ascent(){return _(this,Rr,l2).call(this,0)}get defaultWidth(){return _(this,Rr,l2).call(this,1)}get descent(){return _(this,Rr,l2).call(this,2)}get bbox(){return _(this,Rr,h2).call(this,ua.OFFSET_BBOX,4,"getInt16",2)}get fontMatrix(){return _(this,Rr,h2).call(this,ua.OFFSET_FONT_MATRIX,6,"getFloat64",8)}get defaultVMetrics(){return _(this,Rr,h2).call(this,ua.OFFSET_DEFAULT_VMETRICS,3,"getInt16",2)}get fallbackName(){return _(this,Rr,jg).call(this,0)}get loadedName(){return _(this,Rr,jg).call(this,1)}get mimetype(){return _(this,Rr,jg).call(this,2)}get name(){return _(this,Rr,jg).call(this,3)}get data(){const{offset:t,length:e}=_(this,Rr,OF).call(this);return e===0?void 0:new Uint8Array(c(this,ja),t+4,e)}clearData(){const{offset:t,length:e}=_(this,Rr,OF).call(this);e!==0&&(c(this,Di).setUint32(t,0),F(this,ja,new Uint8Array(c(this,ja),0,t+4).slice().buffer),F(this,Di,new DataView(c(this,ja))))}get cssFontInfo(){let t=ua.OFFSET_STRINGS;const e=c(this,Di).getUint32(t);t+=4+e;const r=c(this,Di).getUint32(t);t+=4+r;const n=c(this,Di).getUint32(t);if(n===0)return null;const s=new Uint8Array(n);return s.set(new Uint8Array(c(this,ja),t+4,n)),new dV(s.buffer)}get systemFontInfo(){let t=ua.OFFSET_STRINGS;const e=c(this,Di).getUint32(t);t+=4+e;const r=c(this,Di).getUint32(t);if(r===0)return null;const n=new Uint8Array(r);return n.set(new Uint8Array(c(this,ja),t+4,r)),new fV(n.buffer)}}ja=new WeakMap,DF=new WeakMap,Di=new WeakMap,Rr=new WeakSet,ta=function(i){Xr(i<ua.bools.length,"Invalid boolean index");const t=Math.floor(i/4),e=i*2%8,r=c(this,Di).getUint8(t)>>e&3;return r===0?void 0:r===2},l2=function(i){return Xr(i<ua.numbers.length,"Invalid number index"),c(this,Di).getFloat64(ua.OFFSET_NUMBERS+i*8)},h2=function(i,t,e,r){const n=c(this,Di).getUint8(i);if(n===0)return;Xr(n===t,"Invalid array length."),i+=1;const s=new Array(n);for(let A=0;A<n;A++)s[A]=c(this,Di)[e](i,!0),i+=r;return s},jg=function(i){Xr(i<ua.strings.length,"Invalid string index");let t=ua.OFFSET_STRINGS+4;for(let r=0;r<i;r++)t+=c(this,Di).getUint32(t)+4;const e=c(this,Di).getUint32(t);return c(this,DF).decode(new Uint8Array(c(this,ja),t+4,e))},OF=function(){let i=ua.OFFSET_STRINGS;const t=c(this,Di).getUint32(i);i+=4+t;const e=c(this,Di).getUint32(i);i+=4+e;const r=c(this,Di).getUint32(i);i+=4+r;const n=c(this,Di).getUint32(i);return{offset:i,length:n}};class gV{constructor(t){this.buffer=t,this.view=new DataView(t),this.data=new Uint8Array(t)}getIR(){const t=this.view,e=this.data[cs.KIND],r=!!this.data[cs.HAS_BBOX],n=!!this.data[cs.HAS_BACKGROUND],s=t.getUint32(cs.N_COORD,!0),A=t.getUint32(cs.N_COLOR,!0),a=t.getUint32(cs.N_STOP,!0);let o=20;const l=new Float32Array(this.buffer,o,s*2);o+=s*8;const h=new Uint8Array(this.buffer,o,A*4);o+=A*4;const u=[];for(let g=0;g<a;++g){const m=t.getFloat32(o,!0);o+=4;const y=t.getUint32(o,!0);o+=4,u.push([m,`#${y.toString(16).padStart(6,"0")}`])}let f=null;if(r){f=[];for(let g=0;g<4;++g)f.push(t.getFloat32(o,!0)),o+=4}let d=null;if(n&&(d=new Uint8Array(this.buffer,o,3),o+=3),e===1)return["RadialAxial","axial",f,u,Array.from(l.slice(0,2)),Array.from(l.slice(2,4)),null,null];if(e===2)return["RadialAxial","radial",f,u,[l[0],l[1]],[l[3],l[4]],l[2],l[5]];if(e===3){const g=this.data[cs.SHADING_TYPE];let m=null;if(l.length>0){m=fl.slice();for(let y=0,w=l.length;y<w;y+=2)Nt.pointBoundingBox(l[y],l[y+1],m)}return["Mesh",g,l,h,s,m,f,d]}throw new Error(`Unsupported pattern kind: ${e}`)}}var Kg;class mV{constructor(t){U(this,Kg),F(this,Kg,t)}get path(){return Fi.isFloat16ArraySupported?new Float16Array(c(this,Kg)):new Float32Array(c(this,Kg))}}Kg=new WeakMap;function wV(i){if(i instanceof URL)return i;if(typeof i=="string"){if(nA){if(/^[a-z][a-z0-9\-+.]+:/i.test(i))return new URL(i);const e=process.getBuiltinModule("url");return new URL(e.pathToFileURL(i))}const t=URL.parse(i,window.location);if(t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function vV(i){if(nA&&typeof Buffer<"u"&&i instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength)return i;if(typeof i=="string")return Py(i);if(i instanceof ArrayBuffer||ArrayBuffer.isView(i)||typeof i=="object"&&!isNaN(i==null?void 0:i.length))return new Uint8Array(i);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function Z1(i){if(typeof i!="string")return null;if(i.endsWith("/"))return i;throw new Error(`Invalid factory url: "${i}" must include trailing slash.`)}const RF=i=>typeof i=="object"&&Number.isInteger(i==null?void 0:i.num)&&i.num>=0&&Number.isInteger(i==null?void 0:i.gen)&&i.gen>=0,yV=i=>typeof i=="object"&&typeof(i==null?void 0:i.name)=="string",rP=X9.bind(null,RF,yV);var Yl,HF;class bV{constructor(){U(this,Yl,new Map),U(this,HF,Promise.resolve())}postMessage(t,e){const r={data:structuredClone(t,e?{transfer:e}:null)};c(this,HF).then(()=>{for(const[n]of c(this,Yl))n.call(this,r)})}addEventListener(t,e,r=null){let n=null;if((r==null?void 0:r.signal)instanceof AbortSignal){const{signal:s}=r;if(s.aborted){Me("LoopbackPort - cannot use an `aborted` signal.");return}const A=()=>this.removeEventListener(t,e);n=()=>s.removeEventListener("abort",A),s.addEventListener("abort",A)}c(this,Yl).set(e,n)}removeEventListener(t,e){const r=c(this,Yl).get(e);r==null||r(),c(this,Yl).delete(e)}terminate(){for(const[,t]of c(this,Yl))t==null||t();c(this,Yl).clear()}}Yl=new WeakMap,HF=new WeakMap;const J1={DATA:1,ERROR:2},Mi={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function pU(){}function Es(i){if(i instanceof ml||i instanceof Fv||i instanceof Xk||i instanceof M0||i instanceof RB)return i;switch(i instanceof Error||typeof i=="object"&&i!==null||rr('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),i.name){case"AbortException":return new ml(i.message);case"InvalidPDFException":return new Fv(i.message);case"PasswordException":return new Xk(i.message,i.code);case"ResponseException":return new M0(i.message,i.status,i.missing);case"UnknownErrorException":return new RB(i.message,i.details)}return new RB(i.message,i.toString())}var Gg,ch,iP,gU,mU,tw;class zg{constructor(t,e,r){U(this,ch),U(this,Gg,new AbortController),this.sourceName=t,this.targetName=e,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),r.addEventListener("message",_(this,ch,iP).bind(this),{signal:c(this,Gg).signal})}on(t,e){const r=this.actionHandler;if(r[t])throw new Error(`There is already an actionName called "${t}"`);r[t]=e}send(t,e,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},r)}sendWithPromise(t,e,r){const n=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[n]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:n,data:e},r)}catch(A){s.reject(A)}return s.promise}sendWithStream(t,e,r,n){const s=this.streamId++,A=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:l=>{const h=Promise.withResolvers();return this.streamControllers[s]={controller:l,startCall:h,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:A,targetName:a,action:t,streamId:s,data:e,desiredSize:l.desiredSize},n),h.promise},pull:l=>{const h=Promise.withResolvers();return this.streamControllers[s].pullCall=h,o.postMessage({sourceName:A,targetName:a,stream:Mi.PULL,streamId:s,desiredSize:l.desiredSize}),h.promise},cancel:l=>{Xr(l instanceof Error,"cancel must have a valid reason");const h=Promise.withResolvers();return this.streamControllers[s].cancelCall=h,this.streamControllers[s].isClosed=!0,o.postMessage({sourceName:A,targetName:a,stream:Mi.CANCEL,streamId:s,reason:Es(l)}),h.promise}},r)}destroy(){var t;(t=c(this,Gg))==null||t.abort(),F(this,Gg,null)}}Gg=new WeakMap,ch=new WeakSet,iP=function({data:i}){if(i.targetName!==this.sourceName)return;if(i.stream){_(this,ch,mU).call(this,i);return}if(i.callback){const e=i.callbackId,r=this.callbackCapabilities[e];if(!r)throw new Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],i.callback===J1.DATA)r.resolve(i.data);else if(i.callback===J1.ERROR)r.reject(Es(i.reason));else throw new Error("Unexpected callback case");return}const t=this.actionHandler[i.action];if(!t)throw new Error(`Unknown action from worker: ${i.action}`);if(i.callbackId){const e=this.sourceName,r=i.sourceName,n=this.comObj;Promise.try(t,i.data).then(function(s){n.postMessage({sourceName:e,targetName:r,callback:J1.DATA,callbackId:i.callbackId,data:s})},function(s){n.postMessage({sourceName:e,targetName:r,callback:J1.ERROR,callbackId:i.callbackId,reason:Es(s)})});return}if(i.streamId){_(this,ch,gU).call(this,i);return}t(i.data)},gU=function(i){const t=i.streamId,e=this.sourceName,r=i.sourceName,n=this.comObj,s=this,A=this.actionHandler[i.action],a={enqueue(o,l=1,h){if(this.isCancelled)return;const u=this.desiredSize;this.desiredSize-=l,u>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),n.postMessage({sourceName:e,targetName:r,stream:Mi.ENQUEUE,streamId:t,chunk:o},h)},close(){this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:e,targetName:r,stream:Mi.CLOSE,streamId:t}),delete s.streamSinks[t])},error(o){Xr(o instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,n.postMessage({sourceName:e,targetName:r,stream:Mi.ERROR,streamId:t,reason:Es(o)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:i.desiredSize,ready:null};a.sinkCapability.resolve(),a.ready=a.sinkCapability.promise,this.streamSinks[t]=a,Promise.try(A,i.data,a).then(function(){n.postMessage({sourceName:e,targetName:r,stream:Mi.START_COMPLETE,streamId:t,success:!0})},function(o){n.postMessage({sourceName:e,targetName:r,stream:Mi.START_COMPLETE,streamId:t,reason:Es(o)})})},mU=function(i){const t=i.streamId,e=this.sourceName,r=i.sourceName,n=this.comObj,s=this.streamControllers[t],A=this.streamSinks[t];switch(i.stream){case Mi.START_COMPLETE:i.success?s.startCall.resolve():s.startCall.reject(Es(i.reason));break;case Mi.PULL_COMPLETE:i.success?s.pullCall.resolve():s.pullCall.reject(Es(i.reason));break;case Mi.PULL:if(!A){n.postMessage({sourceName:e,targetName:r,stream:Mi.PULL_COMPLETE,streamId:t,success:!0});break}A.desiredSize<=0&&i.desiredSize>0&&A.sinkCapability.resolve(),A.desiredSize=i.desiredSize,Promise.try(A.onPull||pU).then(function(){n.postMessage({sourceName:e,targetName:r,stream:Mi.PULL_COMPLETE,streamId:t,success:!0})},function(o){n.postMessage({sourceName:e,targetName:r,stream:Mi.PULL_COMPLETE,streamId:t,reason:Es(o)})});break;case Mi.ENQUEUE:if(Xr(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(i.chunk);break;case Mi.CLOSE:if(Xr(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),_(this,ch,tw).call(this,s,t);break;case Mi.ERROR:Xr(s,"error should have stream controller"),s.controller.error(Es(i.reason)),_(this,ch,tw).call(this,s,t);break;case Mi.CANCEL_COMPLETE:i.success?s.cancelCall.resolve():s.cancelCall.reject(Es(i.reason)),_(this,ch,tw).call(this,s,t);break;case Mi.CANCEL:if(!A)break;const a=Es(i.reason);Promise.try(A.onCancel||pU,a).then(function(){n.postMessage({sourceName:e,targetName:r,stream:Mi.CANCEL_COMPLETE,streamId:t,success:!0})},function(o){n.postMessage({sourceName:e,targetName:r,stream:Mi.CANCEL_COMPLETE,streamId:t,reason:Es(o)})}),A.sinkCapability.reject(a),A.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},tw=async function(i,t){var e,r,n;await Promise.allSettled([(e=i.startCall)==null?void 0:e.promise,(r=i.pullCall)==null?void 0:r.promise,(n=i.cancelCall)==null?void 0:n.promise]),delete this.streamControllers[t]};var VF;class nP{constructor({cMapUrl:t=null,standardFontDataUrl:e=null,wasmUrl:r=null}){U(this,VF,Object.freeze({cMapUrl:"CMap",standardFontDataUrl:"font",wasmUrl:"wasm"})),this.cMapUrl=t,this.standardFontDataUrl=e,this.wasmUrl=r}async fetch({kind:t,filename:e}){switch(t){case"cMapUrl":case"standardFontDataUrl":case"wasmUrl":break;default:rr(`Not implemented: ${t}`)}const r=this[t];if(!r)throw new Error(`Ensure that the \`${t}\` API parameter is provided.`);const n=`${r}${e}`;return this._fetch(n,t).catch(s=>{throw new Error(`Unable to load ${c(this,VF)[t]} data at: ${n}`)})}async _fetch(t,e){rr("Abstract method `_fetch` called.")}}VF=new WeakMap;class wU extends nP{async _fetch(t,e){const r=e==="cMapUrl"&&!t.endsWith(".bcmap")?"text":"bytes",n=await Ry(t,r);return n instanceof Uint8Array?n:Py(n)}}var c2;class sP{constructor({enableHWA:t=!1}){U(this,c2,!1),F(this,c2,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const r=this._createCanvas(t,e);return{canvas:r,context:r.getContext("2d",{willReadFrequently:!c(this,c2)})}}reset({canvas:t},e,r){if(!t)throw new Error("Canvas is not specified");if(e<=0||r<=0)throw new Error("Invalid canvas size");t.width=e,t.height=r}destroy(t){const{canvas:e}=t;if(!e)throw new Error("Canvas is not specified");e.width=e.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){rr("Abstract method `_createCanvas` called.")}}c2=new WeakMap;class BV extends sP{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){const r=this._document.createElement("canvas");return r.width=t,r.height=e,r}}class AP{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,r,n,s){return"none"}destroy(t=!1){}}var Jd,lp,yh,$l,ns,mu,tf,pe,Dn,qg,Pf,u2,ef,aP,WF,rf,tg,Xg,jF,Yg;class CV extends AP{constructor({docId:t,ownerDocument:e=globalThis.document}){super(),U(this,pe),U(this,Jd),U(this,lp),U(this,yh),U(this,$l),U(this,ns),U(this,mu),U(this,tf,0),F(this,$l,t),F(this,ns,e)}addFilter(t){if(!t)return"none";let e=c(this,pe,Dn).get(t);if(e)return e;const[r,n,s]=_(this,pe,u2).call(this,t),A=t.length===1?r:`${r}${n}${s}`;if(e=c(this,pe,Dn).get(A),e)return c(this,pe,Dn).set(t,e),e;const a=`g_${c(this,$l)}_transfer_map_${$i(this,tf)._++}`,o=_(this,pe,ef).call(this,a);c(this,pe,Dn).set(t,o),c(this,pe,Dn).set(A,o);const l=_(this,pe,rf).call(this,a);return _(this,pe,Xg).call(this,r,n,s,l),o}addHCMFilter(t,e){var r;const n=`${t}-${e}`,s="base";let A=c(this,pe,qg).get(s);if((A==null?void 0:A.key)===n||(A?((r=A.filter)==null||r.remove(),A.key=n,A.url="none",A.filter=null):(A={key:n,url:"none",filter:null},c(this,pe,qg).set(s,A)),!t||!e))return A.url;const a=_(this,pe,Yg).call(this,t);t=Nt.makeHexColor(...a);const o=_(this,pe,Yg).call(this,e);if(e=Nt.makeHexColor(...o),c(this,pe,Pf).style.color="",t==="#000000"&&e==="#ffffff"||t===e)return A.url;const l=new Array(256);for(let g=0;g<=255;g++){const m=g/255;l[g]=m<=.03928?m/12.92:((m+.055)/1.055)**2.4}const h=l.join(","),u=`g_${c(this,$l)}_hcm_filter`,f=A.filter=_(this,pe,rf).call(this,u);_(this,pe,Xg).call(this,h,h,h,f),_(this,pe,WF).call(this,f);const d=(g,m)=>{const y=a[g]/255,w=o[g]/255,b=new Array(m+1);for(let C=0;C<=m;C++)b[C]=y+C/m*(w-y);return b.join(",")};return _(this,pe,Xg).call(this,d(0,5),d(1,5),d(2,5),f),A.url=_(this,pe,ef).call(this,u),A.url}addAlphaFilter(t){let e=c(this,pe,Dn).get(t);if(e)return e;const[r]=_(this,pe,u2).call(this,[t]),n=`alpha_${r}`;if(e=c(this,pe,Dn).get(n),e)return c(this,pe,Dn).set(t,e),e;const s=`g_${c(this,$l)}_alpha_map_${$i(this,tf)._++}`,A=_(this,pe,ef).call(this,s);c(this,pe,Dn).set(t,A),c(this,pe,Dn).set(n,A);const a=_(this,pe,rf).call(this,s);return _(this,pe,jF).call(this,r,a),A}addLuminosityFilter(t){let e=c(this,pe,Dn).get(t||"luminosity");if(e)return e;let r,n;if(t?([r]=_(this,pe,u2).call(this,[t]),n=`luminosity_${r}`):n="luminosity",e=c(this,pe,Dn).get(n),e)return c(this,pe,Dn).set(t,e),e;const s=`g_${c(this,$l)}_luminosity_map_${$i(this,tf)._++}`,A=_(this,pe,ef).call(this,s);c(this,pe,Dn).set(t,A),c(this,pe,Dn).set(n,A);const a=_(this,pe,rf).call(this,s);return _(this,pe,aP).call(this,a),t&&_(this,pe,jF).call(this,r,a),A}addHighlightHCMFilter(t,e,r,n,s){var A;const a=`${e}-${r}-${n}-${s}`;let o=c(this,pe,qg).get(t);if((o==null?void 0:o.key)===a||(o?((A=o.filter)==null||A.remove(),o.key=a,o.url="none",o.filter=null):(o={key:a,url:"none",filter:null},c(this,pe,qg).set(t,o)),!e||!r))return o.url;const[l,h]=[e,r].map(_(this,pe,Yg).bind(this));let u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),f=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),[d,g]=[n,s].map(_(this,pe,Yg).bind(this));f<u&&([u,f,d,g]=[f,u,g,d]),c(this,pe,Pf).style.color="";const m=(b,C,S)=>{const k=new Array(256),I=(f-u)/S,N=b/255,D=(C-b)/(255*S);let Q=0;for(let K=0;K<=S;K++){const L=Math.round(u+K*I),O=N+K*D;for(let W=Q;W<=L;W++)k[W]=O;Q=L+1}for(let K=Q;K<256;K++)k[K]=k[Q-1];return k.join(",")},y=`g_${c(this,$l)}_hcm_${t}_filter`,w=o.filter=_(this,pe,rf).call(this,y);return _(this,pe,WF).call(this,w),_(this,pe,Xg).call(this,m(d[0],g[0],5),m(d[1],g[1],5),m(d[2],g[2],5),w),o.url=_(this,pe,ef).call(this,y),o.url}destroy(t=!1){var e,r,n,s;t&&(e=c(this,mu))!=null&&e.size||((r=c(this,yh))==null||r.parentNode.parentNode.remove(),F(this,yh,null),(n=c(this,lp))==null||n.clear(),F(this,lp,null),(s=c(this,mu))==null||s.clear(),F(this,mu,null),F(this,tf,0))}}Jd=new WeakMap,lp=new WeakMap,yh=new WeakMap,$l=new WeakMap,ns=new WeakMap,mu=new WeakMap,tf=new WeakMap,pe=new WeakSet,Dn=function(){return c(this,lp)||F(this,lp,new Map)},qg=function(){return c(this,mu)||F(this,mu,new Map)},Pf=function(){if(!c(this,yh)){const i=c(this,ns).createElement("div"),{style:t}=i;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;const e=c(this,ns).createElementNS(Lo,"svg");e.setAttribute("width",0),e.setAttribute("height",0),F(this,yh,c(this,ns).createElementNS(Lo,"defs")),i.append(e),e.append(c(this,yh)),c(this,ns).body.append(i)}return c(this,yh)},u2=function(i){if(i.length===1){const a=i[0],o=new Array(256);for(let h=0;h<256;h++)o[h]=a[h]/255;const l=o.join(",");return[l,l,l]}const[t,e,r]=i,n=new Array(256),s=new Array(256),A=new Array(256);for(let a=0;a<256;a++)n[a]=t[a]/255,s[a]=e[a]/255,A[a]=r[a]/255;return[n.join(","),s.join(","),A.join(",")]},ef=function(i){if(c(this,Jd)===void 0){F(this,Jd,"");const t=c(this,ns).URL;t!==c(this,ns).baseURI&&(Y0(t)?Me('#createUrl: ignore "data:"-URL for performance reasons.'):F(this,Jd,DS(t,"")))}return`url(${c(this,Jd)}#${i})`},aP=function(i){const t=c(this,ns).createElementNS(Lo,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),i.append(t)},WF=function(i){const t=c(this,ns).createElementNS(Lo,"feColorMatrix");t.setAttribute("type","matrix"),t.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"),i.append(t)},rf=function(i){const t=c(this,ns).createElementNS(Lo,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",i),c(this,pe,Pf).append(t),t},tg=function(i,t,e){const r=c(this,ns).createElementNS(Lo,t);r.setAttribute("type","discrete"),r.setAttribute("tableValues",e),i.append(r)},Xg=function(i,t,e,r){const n=c(this,ns).createElementNS(Lo,"feComponentTransfer");r.append(n),_(this,pe,tg).call(this,n,"feFuncR",i),_(this,pe,tg).call(this,n,"feFuncG",t),_(this,pe,tg).call(this,n,"feFuncB",e)},jF=function(i,t){const e=c(this,ns).createElementNS(Lo,"feComponentTransfer");t.append(e),_(this,pe,tg).call(this,e,"feFuncA",i)},Yg=function(i){return c(this,pe,Pf).style.color=i,Sp(getComputedStyle(c(this,pe,Pf)).getPropertyValue("color"))};nA&&Me("Please use the `legacy` build in Node.js environments.");async function xV(i){const t=await process.getBuiltinModule("fs/promises").readFile(i);return new Uint8Array(t)}class FV extends AP{}class SV extends sP{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t,e)}}class EV extends nP{async _fetch(t,e){return xV(t)}}const kV=`
|
|
220
|
-
struct Uniforms {
|
|
221
|
-
offsetX : f32,
|
|
222
|
-
offsetY : f32,
|
|
223
|
-
scaleX : f32,
|
|
224
|
-
scaleY : f32,
|
|
225
|
-
paddedWidth : f32,
|
|
226
|
-
paddedHeight : f32,
|
|
227
|
-
borderSize : f32,
|
|
228
|
-
_pad : f32,
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
@group(0) @binding(0) var<uniform> u : Uniforms;
|
|
232
|
-
|
|
233
|
-
struct VertexInput {
|
|
234
|
-
@location(0) position : vec2<f32>,
|
|
235
|
-
@location(1) color : vec4<f32>,
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
struct VertexOutput {
|
|
239
|
-
@builtin(position) position : vec4<f32>,
|
|
240
|
-
@location(0) color : vec3<f32>,
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
@vertex
|
|
244
|
-
fn vs_main(in : VertexInput) -> VertexOutput {
|
|
245
|
-
var out : VertexOutput;
|
|
246
|
-
let cx = (in.position.x + u.offsetX) * u.scaleX;
|
|
247
|
-
let cy = (in.position.y + u.offsetY) * u.scaleY;
|
|
248
|
-
out.position = vec4<f32>(
|
|
249
|
-
((cx + u.borderSize) / u.paddedWidth) * 2.0 - 1.0,
|
|
250
|
-
1.0 - ((cy + u.borderSize) / u.paddedHeight) * 2.0,
|
|
251
|
-
0.0,
|
|
252
|
-
1.0
|
|
253
|
-
);
|
|
254
|
-
out.color = in.color.rgb;
|
|
255
|
-
return out;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
@fragment
|
|
259
|
-
fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
260
|
-
return vec4<f32>(in.color, 1.0);
|
|
261
|
-
}
|
|
262
|
-
`;var d2,uh,nf,A0,KF,oP;class UV{constructor(){U(this,KF),U(this,d2,null),U(this,uh,null),U(this,nf,null),U(this,A0,null)}init(){return c(this,d2)||F(this,d2,_(this,KF,oP).call(this))}get isReady(){return c(this,uh)!==null}loadMeshShader(){if(!c(this,uh)||c(this,nf))return;const t=c(this,uh).createShaderModule({code:kV});F(this,nf,c(this,uh).createRenderPipeline({layout:"auto",vertex:{module:t,entryPoint:"vs_main",buffers:[{arrayStride:8,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]},{arrayStride:4,attributes:[{shaderLocation:1,offset:0,format:"unorm8x4"}]}]},fragment:{module:t,entryPoint:"fs_main",targets:[{format:c(this,A0)}]},primitive:{topology:"triangle-list"}}))}draw(t,e,r,n,s,A,a,o){this.loadMeshShader();const l=c(this,uh),{offsetX:h,offsetY:u,scaleX:f,scaleY:d}=n,g=l.createBuffer({size:Math.max(t.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});t.byteLength>0&&l.queue.writeBuffer(g,0,t);const m=l.createBuffer({size:Math.max(e.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});e.byteLength>0&&l.queue.writeBuffer(m,0,e);const y=l.createBuffer({size:32,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST});l.queue.writeBuffer(y,0,new Float32Array([h,u,f,d,A,a,o,0]));const w=l.createBindGroup({layout:c(this,nf).getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:y}}]}),b=new OffscreenCanvas(A,a),C=b.getContext("webgpu");C.configure({device:l,format:c(this,A0),alphaMode:s?"opaque":"premultiplied"});const S=s?{r:s[0]/255,g:s[1]/255,b:s[2]/255,a:1}:{r:0,g:0,b:0,a:0},k=l.createCommandEncoder(),I=k.beginRenderPass({colorAttachments:[{view:C.getCurrentTexture().createView(),clearValue:S,loadOp:"clear",storeOp:"store"}]});return r>0&&(I.setPipeline(c(this,nf)),I.setBindGroup(0,w),I.setVertexBuffer(0,g),I.setVertexBuffer(1,m),I.draw(r)),I.end(),l.queue.submit([k.finish()]),g.destroy(),m.destroy(),y.destroy(),b.transferToImageBitmap()}}d2=new WeakMap,uh=new WeakMap,nf=new WeakMap,A0=new WeakMap,KF=new WeakSet,oP=async function(){var i;if(!((i=globalThis.navigator)!=null&&i.gpu))return!1;try{const t=await navigator.gpu.requestAdapter();return t?(F(this,A0,navigator.gpu.getPreferredCanvasFormat()),F(this,uh,await t.requestDevice()),!0):!1}catch{return!1}};const Ky=new UV;function IV(){return Ky.init()}function QV(){return Ky.isReady}function LV(){Ky.loadMeshShader()}function _V(i,t,e,r,n,s,A,a){return Ky.draw(i,t,e,r,n,s,A,a)}const bn={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function f2(i,t){if(!t)return;const e=t[2]-t[0],r=t[3]-t[1],n=new Path2D;n.rect(t[0],t[1],e,r),i.clip(n)}class jS{isModifyingCurrentTransform(){return!1}getPattern(){rr("Abstract method `getPattern` called.")}}class MV extends jS{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}isOriginBased(){return this._p0[0]===0&&this._p0[1]===0&&(!this.isRadial()||this._p1[0]===0&&this._p1[1]===0)}isRadial(){return this._type==="radial"}areConic(){if(!this.isRadial())return!1;const t=Math.hypot(this._p0[0]-this._p1[0],this._p0[1]-this._p1[1]);return t+this._r1>this._r0&&t+this._r0>this._r1}_createGradient(t,e=null){let r,n=this._p0,s=this._p1;if(e&&(n=n.slice(),s=s.slice(),Nt.applyTransform(n,e),Nt.applyTransform(s,e)),this._type==="axial")r=t.createLinearGradient(n[0],n[1],s[0],s[1]);else if(this._type==="radial"){let A=this._r0,a=this._r1;if(e){const o=new Float32Array(2);Nt.singularValueDecompose2dScale(e,o),A*=o[0],a*=o[0]}r=t.createRadialGradient(n[0],n[1],A,s[0],s[1],a)}for(const A of this._colorStops)r.addColorStop(A[0],A[1]);return r}_createReversedGradient(t,e=null){let r=this._p1,n=this._p0;e&&(r=r.slice(),n=n.slice(),Nt.applyTransform(r,e),Nt.applyTransform(n,e));let s=this._r1,A=this._r0;if(e){const l=new Float32Array(2);Nt.singularValueDecompose2dScale(e,l),s*=l[0],A*=l[0]}const a=t.createRadialGradient(r[0],r[1],s,n[0],n[1],A),o=this._colorStops.map(([l,h])=>[1-l,h]).reverse();for(const[l,h]of o)a.addColorStop(l,h);return a}getPattern(t,e,r,n){let s;if(n===bn.STROKE||n===bn.FILL){if(this.isOriginBased()){let f=Nt.transform(r,e.baseTransform);this.matrix&&(f=Nt.transform(f,this.matrix));const d=.001,g=Math.hypot(f[0],f[1]),m=Math.hypot(f[2],f[3]),y=(f[0]*f[2]+f[1]*f[3])/(g*m);if(Math.abs(y)<d)if(this.isRadial()){if(Math.abs(g-m)<d)return this._createGradient(t,f)}else return this._createGradient(t,f)}const A=e.current.getClippedPathBoundingBox(n,Qr(t))||[0,0,0,0],a=Math.ceil(A[2]-A[0])||1,o=Math.ceil(A[3]-A[1])||1,l=e.canvasFactory.create(a,o),h=l.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-A[0],-A[1]),r=Nt.transform(r,[1,0,0,1,A[0],A[1]]),h.transform(...e.baseTransform),this.matrix&&h.transform(...this.matrix),f2(h,this._bbox),this.areConic()&&(h.fillStyle=this._createReversedGradient(h),h.fill()),h.fillStyle=this._createGradient(h),h.fill(),s=t.createPattern(l.canvas,"no-repeat"),e.canvasFactory.destroy(l);const u=new DOMMatrix(r);s.setTransform(u)}else this.areConic()&&(t.save(),f2(t,this._bbox),t.fillStyle=this._createReversedGradient(t),t.fillRect(-1e10,-1e10,2e10,2e10),t.restore()),f2(t,this._bbox),s=this._createGradient(t);return s}}function TV(i,t,e,r,n,s,A,a){const o=t.coords,l=t.colors,h=i.data,u=i.width*4;let f;o[e*2+1]>o[r*2+1]&&(f=e,e=r,r=f,f=s,s=A,A=f),o[r*2+1]>o[n*2+1]&&(f=r,r=n,n=f,f=A,A=a,a=f),o[e*2+1]>o[r*2+1]&&(f=e,e=r,r=f,f=s,s=A,A=f);const d=(o[e*2]+t.offsetX)*t.scaleX,g=(o[e*2+1]+t.offsetY)*t.scaleY,m=(o[r*2]+t.offsetX)*t.scaleX,y=(o[r*2+1]+t.offsetY)*t.scaleY,w=(o[n*2]+t.offsetX)*t.scaleX,b=(o[n*2+1]+t.offsetY)*t.scaleY;if(g>=b)return;const C=l[s*4],S=l[s*4+1],k=l[s*4+2],I=l[A*4],N=l[A*4+1],D=l[A*4+2],Q=l[a*4],K=l[a*4+1],L=l[a*4+2],O=Math.round(g),W=Math.round(b);let R,tt,et,st,nt,at,ft,ht;for(let M=O;M<=W;M++){if(M<y){const ot=M<g?0:(g-M)/(g-y);R=d-(d-m)*ot,tt=C-(C-I)*ot,et=S-(S-N)*ot,st=k-(k-D)*ot}else{let ot;M>b?ot=1:y===b?ot=0:ot=(y-M)/(y-b),R=m-(m-w)*ot,tt=I-(I-Q)*ot,et=N-(N-K)*ot,st=D-(D-L)*ot}let G;M<g?G=0:M>b?G=1:G=(g-M)/(g-b),nt=d-(d-w)*G,at=C-(C-Q)*G,ft=S-(S-K)*G,ht=k-(k-L)*G;const X=Math.round(Math.min(R,nt)),rt=Math.round(Math.max(R,nt));let it=u*M+X*4;for(let ot=X;ot<=rt;ot++)G=(R-ot)/(R-nt),G<0?G=0:G>1&&(G=1),h[it++]=tt-(tt-at)*G|0,h[it++]=et-(et-ft)*G|0,h[it++]=st-(st-ht)*G|0,h[it++]=255}}class NV extends jS{constructor(t){super(),this._posData=t[2],this._colData=t[3],this._vertexCount=t[4],this._bounds=t[5],this._bbox=t[6],this._background=t[7],this.matrix=null,LV()}_createMeshCanvas(t,e,r){const n=Math.floor(this._bounds[0]),s=Math.floor(this._bounds[1]),A=Math.ceil(this._bounds[2])-n,a=Math.ceil(this._bounds[3])-s,o=Math.min(Math.ceil(Math.abs(A*t[0]*1.1)),3e3)||1,l=Math.min(Math.ceil(Math.abs(a*t[1]*1.1)),3e3)||1,h=A?A/o:1,u=a?a/l:1,f={coords:this._posData,colors:this._colData,offsetX:-n,offsetY:-s,scaleX:1/h,scaleY:1/u},d=o+4,g=l+4,m=r.create(d,g);if(QV()&&this._vertexCount>48)m.context.drawImage(_V(this._posData,this._colData,this._vertexCount,f,e,d,g,2),0,0);else{const y=m.context.createImageData(o,l);if(e){const w=y.data;for(let b=0,C=w.length;b<C;b+=4)w[b]=e[0],w[b+1]=e[1],w[b+2]=e[2],w[b+3]=255}for(let w=0,b=this._vertexCount;w<b;w+=3)TV(y,f,w,w+1,w+2,w,w+1,w+2);m.context.putImageData(y,2,2)}return{canvas:m.canvas,offsetX:n-2*h,offsetY:s-2*u,scaleX:h,scaleY:u}}isModifyingCurrentTransform(){return!0}getPattern(t,e,r,n){f2(t,this._bbox);const s=new Float32Array(2);if(n===bn.SHADING)Nt.singularValueDecompose2dScale(Qr(t),s);else if(this.matrix){Nt.singularValueDecompose2dScale(this.matrix,s);const[o,l]=s;Nt.singularValueDecompose2dScale(e.baseTransform,s),s[0]*=o,s[1]*=l}else Nt.singularValueDecompose2dScale(e.baseTransform,s);const A=this._createMeshCanvas(s,n===bn.SHADING?null:this._background,e.canvasFactory);n!==bn.SHADING&&(t.setTransform(...e.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(A.offsetX,A.offsetY),t.scale(A.scaleX,A.scaleY);const a=t.createPattern(A.canvas,"no-repeat");return e.canvasFactory.destroy(A),a}}class PV extends jS{getPattern(){return"hotpink"}}function DV(i){switch(i[0]){case"RadialAxial":return new MV(i);case"Mesh":return new NV(i);case"Dummy":return new PV}throw new Error(`Unknown IR type: ${i[0]}`)}const vU={COLORED:1,UNCOLORED:2},lP=class hP{constructor(t,e,r,n){this.color=t[1],this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.needsIsolation=t[9]??!0,this.ctx=e,this.canvasGraphicsFactory=r,this.baseTransform=n,this.patternBaseMatrix=this.matrix?Nt.transform(n,this.matrix):n}canSkipPatternCanvas([t,e,r,n]){const[s,A,a,o]=this.bbox,l=Math.abs(this.xstep),h=Math.abs(this.ystep);if(t>l+1e-6||e>h+1e-6)return null;const u=Math.floor((r-a)/l)+1,f=Math.ceil((r+t-s)/l)-1,d=Math.floor((n-o)/h)+1,g=Math.ceil((n+e-A)/h)-1;return f<=u&&g<=d?[u,d]:null}updatePatternDims(t,e){const r=Nt.inverseTransform(this.patternBaseMatrix),n=[t[0],t[1]],s=[t[2],t[3]];Nt.applyTransform(n,r),Nt.applyTransform(s,r),e[0]=Math.abs(s[0]-n[0]),e[1]=Math.abs(s[1]-n[1]),e[2]=Math.min(n[0],s[0]),e[3]=Math.min(n[1],s[1])}_renderTileCanvas(t,e,r,n){var s,A;const[a,o,l,h]=this.bbox,u=t.canvasFactory.create(r.size,n.size),f=u.context,d=this.canvasGraphicsFactory.createCanvasGraphics(f,e);return d.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(d,this.paintType,this.color),f.translate(-r.scale*a,-n.scale*o),d.transform(0,r.scale,0,0,n.scale,0,0),f.save(),(s=d.dependencyTracker)==null||s.save(),this.clipBbox(d,a,o,l,h),d.baseTransform=Qr(d.ctx),d.executeOperatorList(this.operatorList),d.endDrawing(),(A=d.dependencyTracker)==null||A.restore(),f.restore(),u}_getCombinedScales(){const t=new Float32Array(2);Nt.singularValueDecompose2dScale(this.matrix,t);const[e,r]=t;return Nt.singularValueDecompose2dScale(this.baseTransform,t),[e*t[0],r*t[1]]}drawPattern(t,e,r=!1,[n,s],A){const[a,o,l,h]=this.bbox,u=t.dependencyTracker;if(u&&(t.dependencyTracker=new TF(u,A)),t.save(),r?t.ctx.clip(e,"evenodd"):t.ctx.clip(e),t.ctx.setTransform(...this.patternBaseMatrix),t.ctx.translate(n*this.xstep,s*this.ystep),this.needsIsolation||t.ctx.globalAlpha!==1||t.ctx.globalCompositeOperation!=="source-over"||t.inSMaskMode){const f=l-a,d=h-o,[g,m]=this._getCombinedScales(),y=this.getSizeAndScale(f,this.ctx.canvas.width,g),w=this.getSizeAndScale(d,this.ctx.canvas.height,m),b=this._renderTileCanvas(t,A,y,w);t.ctx.drawImage(b.canvas,a,o,f,d),t.canvasFactory.destroy(b)}else this.setFillAndStrokeStyleToContext(t,this.paintType,this.color),this.clipBbox(t,a,o,l,h),t.baseTransformStack.push(t.baseTransform),t.baseTransform=Qr(t.ctx),t.executeOperatorList(this.operatorList),t.baseTransform=t.baseTransformStack.pop();t.restore(),u&&(t.dependencyTracker=u)}createPatternCanvas(t,e){const[r,n,s,A]=this.bbox,a=s-r,o=A-n;let{xstep:l,ystep:h}=this;l=Math.abs(l),h=Math.abs(h),Ny("TilingType: "+this.tilingType);const[u,f]=this._getCombinedScales();let d=a,g=o,m=!1,y=!1;Math.ceil(l*u)>=Math.ceil(a*u)?d=l:m=!0,Math.ceil(h*f)>=Math.ceil(o*f)?g=h:y=!0;const w=this.getSizeAndScale(d,this.ctx.canvas.width,u),b=this.getSizeAndScale(g,this.ctx.canvas.height,f),C=this._renderTileCanvas(t,e,w,b);if(m||y){const S=C.canvas;m&&(d=l),y&&(g=h);const k=this.getSizeAndScale(d,this.ctx.canvas.width,u),I=this.getSizeAndScale(g,this.ctx.canvas.height,f),N=k.size,D=I.size,Q=t.canvasFactory.create(N,D),K=Q.context,L=m?Math.floor(a/l):0,O=y?Math.floor(o/h):0;for(let W=0;W<=L;W++)for(let R=0;R<=O;R++)K.drawImage(S,N*W,D*R,N,D,0,0,N,D);return t.canvasFactory.destroy(C),{canvas:Q.canvas,canvasEntry:Q,scaleX:k.scale,scaleY:I.scale,offsetX:r,offsetY:n}}return{canvas:C.canvas,canvasEntry:C,scaleX:w.scale,scaleY:b.scale,offsetX:r,offsetY:n}}getSizeAndScale(t,e,r){const n=Math.max(hP.MAX_PATTERN_SIZE,e);let s=Math.ceil(t*r);return s>=n?s=n:r=s/t,{scale:r,size:s}}clipBbox(t,e,r,n,s){const A=n-e,a=s-r,o=new Path2D;o.rect(e,r,A,a),Nt.axialAlignedBoundingBox([e,r,n,s],Qr(t.ctx),t.current.minMax),t.ctx.clip(o),t.current.updateClipFromPath()}setFillAndStrokeStyleToContext(t,e,r){const n=t.ctx,s=t.current;switch(s.patternFill=s.patternStroke=!1,e){case vU.COLORED:const{fillStyle:A,strokeStyle:a}=this.ctx;n.fillStyle=s.fillColor=A,n.strokeStyle=s.strokeColor=a;break;case vU.UNCOLORED:n.fillStyle=n.strokeStyle=r,s.fillColor=s.strokeColor=r;break;default:throw new K9(`Unsupported paint type: ${e}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,e,r,n,s){const A=n!==bn.SHADING?Nt.transform(r,this.patternBaseMatrix):r,a=this.createPatternCanvas(e,s);let o=new DOMMatrix(A);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return e.canvasFactory.destroy(a.canvasEntry),l.setTransform(o),l}};ut(lP,"MAX_PATTERN_SIZE",3e3);let jB=lP;function OV({src:i,srcPos:t=0,dest:e,width:r,height:n,nonBlackColor:s=4294967295,inverseDecode:A=!1}){const a=Fi.isLittleEndian?4278190080:255,[o,l]=A?[s,a]:[a,s],h=r>>3,u=r&7,f=o^l,d=i.length;e=new Uint32Array(e.buffer);let g=0;for(let m=0;m<n;++m){for(const w=t+h;t<w;++t,g+=8){const b=i[t];e[g]=o^-(b>>7&1)&f,e[g+1]=o^-(b>>6&1)&f,e[g+2]=o^-(b>>5&1)&f,e[g+3]=o^-(b>>4&1)&f,e[g+4]=o^-(b>>3&1)&f,e[g+5]=o^-(b>>2&1)&f,e[g+6]=o^-(b>>1&1)&f,e[g+7]=o^-(b&1)&f}if(u===0)continue;const y=t<d?i[t++]:255;for(let w=0;w<u;++w,++g)e[g]=o^-(y>>7-w&1)&f}return{srcPos:t,destPos:g}}const yU=16,bU=100,RV=15,BU=10,Qs=16,KB=new DOMMatrix,sA=new Float32Array(2);function HV(i,t){if(i._removeMirroring)throw new Error("Context is already forwarding operations.");i.__originalSave=i.save,i.__originalRestore=i.restore,i.__originalRotate=i.rotate,i.__originalScale=i.scale,i.__originalTranslate=i.translate,i.__originalTransform=i.transform,i.__originalSetTransform=i.setTransform,i.__originalResetTransform=i.resetTransform,i.__originalClip=i.clip,i.__originalMoveTo=i.moveTo,i.__originalLineTo=i.lineTo,i.__originalBezierCurveTo=i.bezierCurveTo,i.__originalRect=i.rect,i.__originalClosePath=i.closePath,i.__originalBeginPath=i.beginPath,i._removeMirroring=()=>{i.save=i.__originalSave,i.restore=i.__originalRestore,i.rotate=i.__originalRotate,i.scale=i.__originalScale,i.translate=i.__originalTranslate,i.transform=i.__originalTransform,i.setTransform=i.__originalSetTransform,i.resetTransform=i.__originalResetTransform,i.clip=i.__originalClip,i.moveTo=i.__originalMoveTo,i.lineTo=i.__originalLineTo,i.bezierCurveTo=i.__originalBezierCurveTo,i.rect=i.__originalRect,i.closePath=i.__originalClosePath,i.beginPath=i.__originalBeginPath,delete i._removeMirroring},i.save=function(){t.save(),this.__originalSave()},i.restore=function(){t.restore(),this.__originalRestore()},i.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},i.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},i.transform=function(e,r,n,s,A,a){t.transform(e,r,n,s,A,a),this.__originalTransform(e,r,n,s,A,a)},i.setTransform=function(e,r,n,s,A,a){r===void 0?(t.setTransform(e),this.__originalSetTransform(e)):(t.setTransform(e,r,n,s,A,a),this.__originalSetTransform(e,r,n,s,A,a))},i.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},i.rotate=function(e){t.rotate(e),this.__originalRotate(e)},i.clip=function(e){t.clip(e),this.__originalClip(e)},i.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},i.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},i.bezierCurveTo=function(e,r,n,s,A,a){t.bezierCurveTo(e,r,n,s,A,a),this.__originalBezierCurveTo(e,r,n,s,A,a)},i.rect=function(e,r,n,s){t.rect(e,r,n,s),this.__originalRect(e,r,n,s)},i.closePath=function(){t.closePath(),this.__originalClosePath()},i.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}function ew(i,t,e,r,n,s,A,a,o,l){const[h,u,f,d,g,m]=Qr(i);if(u===0&&f===0){const b=A*h+g,C=Math.round(b),S=a*d+m,k=Math.round(S),I=(A+o)*h+g,N=Math.abs(Math.round(I)-C)||1,D=(a+l)*d+m,Q=Math.abs(Math.round(D)-k)||1;return i.setTransform(Math.sign(h),0,0,Math.sign(d),C,k),i.drawImage(t,e,r,n,s,0,0,N,Q),i.setTransform(h,u,f,d,g,m),[N,Q]}if(h===0&&d===0){const b=a*f+g,C=Math.round(b),S=A*u+m,k=Math.round(S),I=(a+l)*f+g,N=Math.abs(Math.round(I)-C)||1,D=(A+o)*u+m,Q=Math.abs(Math.round(D)-k)||1;return i.setTransform(0,Math.sign(u),Math.sign(f),0,C,k),i.drawImage(t,e,r,n,s,0,0,Q,N),i.setTransform(h,u,f,d,g,m),[Q,N]}i.drawImage(t,e,r,n,s,A,a,o,l);const y=Math.hypot(h,u),w=Math.hypot(f,d);return[y*o,w*l]}class CU{constructor(t,e){ut(this,"alphaIsShape",!1),ut(this,"fontSize",0),ut(this,"fontSizeScale",1),ut(this,"textMatrix",null),ut(this,"textMatrixScale",1),ut(this,"fontMatrix",oF),ut(this,"leading",0),ut(this,"x",0),ut(this,"y",0),ut(this,"lineX",0),ut(this,"lineY",0),ut(this,"charSpacing",0),ut(this,"wordSpacing",0),ut(this,"textHScale",1),ut(this,"textRenderingMode",Gi.FILL),ut(this,"textRise",0),ut(this,"fillColor","#000000"),ut(this,"strokeColor","#000000"),ut(this,"tilingPatternDims",null),ut(this,"patternFill",!1),ut(this,"patternStroke",!1),ut(this,"fillAlpha",1),ut(this,"strokeAlpha",1),ut(this,"lineWidth",1),ut(this,"activeSMask",null),ut(this,"transferMaps","none"),ut(this,"minMax",pu.slice()),this.clipBox=new Float32Array([0,0,t,e])}clone(){var t;const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e.minMax=this.minMax.slice(),e.tilingPatternDims=(t=this.tilingPatternDims)==null?void 0:t.slice(),e}getPathBoundingBox(t=bn.FILL,e=null){const r=this.minMax.slice();if(t===bn.STROKE){e||rr("Stroke bounding box must include transform."),Nt.singularValueDecompose2dScale(e,sA);const n=sA[0]*this.lineWidth/2,s=sA[1]*this.lineWidth/2;r[0]-=n,r[1]-=s,r[2]+=n,r[3]+=s}return r}updateClipFromPath(){const t=Nt.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(pu,0)}getClippedPathBoundingBox(t=bn.FILL,e=null){return Nt.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function xU(i,t){if(t instanceof ImageData){i.putImageData(t,0,0);return}const e=t.height,r=t.width,n=e%Qs,s=(e-n)/Qs,A=n===0?s:s+1,a=i.createImageData(r,Qs);let o=0,l;const h=t.data,u=a.data;let f,d,g,m;if(t.kind===Km.GRAYSCALE_1BPP){const y=h.byteLength,w=new Uint32Array(u.buffer,0,u.byteLength>>2),b=w.length,C=r+7>>3,S=4294967295,k=Fi.isLittleEndian?4278190080:255;for(f=0;f<A;f++){for(g=f<s?Qs:n,l=0,d=0;d<g;d++){const I=y-o;let N=0;const D=I>C?r:I*8-7,Q=D&-8;let K=0,L=0;for(;N<Q;N+=8)L=h[o++],w[l++]=L&128?S:k,w[l++]=L&64?S:k,w[l++]=L&32?S:k,w[l++]=L&16?S:k,w[l++]=L&8?S:k,w[l++]=L&4?S:k,w[l++]=L&2?S:k,w[l++]=L&1?S:k;for(;N<D;N++)K===0&&(L=h[o++],K=128),w[l++]=L&K?S:k,K>>=1}for(;l<b;)w[l++]=0;i.putImageData(a,0,f*Qs)}}else if(t.kind===Km.RGBA_32BPP){for(d=0,m=r*Qs*4,f=0;f<s;f++)u.set(h.subarray(o,o+m)),o+=m,i.putImageData(a,0,d),d+=Qs;f<A&&(m=r*n*4,u.set(h.subarray(o,o+m)),i.putImageData(a,0,d))}else if(t.kind===Km.RGB_24BPP)for(g=Qs,m=r*g,f=0;f<A;f++){for(f>=s&&(g=n,m=r*g),l=0,d=m;d--;)u[l++]=h[o++],u[l++]=h[o++],u[l++]=h[o++],u[l++]=255;i.putImageData(a,0,f*Qs)}else throw new Error(`bad image kind: ${t.kind}`)}function FU(i,t){if(t.bitmap){i.drawImage(t.bitmap,0,0);return}const e=t.height,r=t.width,n=e%Qs,s=(e-n)/Qs,A=n===0?s:s+1,a=i.createImageData(r,Qs);let o=0;const l=t.data,h=a.data;for(let u=0;u<A;u++){const f=u<s?Qs:n;({srcPos:o}=OV({src:l,srcPos:o,dest:h,width:r,height:f,nonBlackColor:0})),i.putImageData(a,0,u*Qs)}}function eg(i,t){const e=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of e)i[r]!==void 0&&(t[r]=i[r]);i.setLineDash!==void 0&&(t.setLineDash(i.getLineDash()),t.lineDashOffset=i.lineDashOffset)}function rw(i){i.strokeStyle=i.fillStyle="#000000",i.fillRule="nonzero",i.globalAlpha=1,i.lineWidth=1,i.lineCap="butt",i.lineJoin="miter",i.miterLimit=10,i.globalCompositeOperation="source-over",i.font="10px sans-serif",i.setLineDash!==void 0&&(i.setLineDash([]),i.lineDashOffset=0);const{filter:t}=i;t!=="none"&&t!==""&&(i.filter="none")}function SU(i,t){if(t)return!0;Nt.singularValueDecompose2dScale(i,sA);const e=Math.fround(pa.pixelRatio*Pu.PDF_TO_CSS_UNITS);return sA[0]<=e&&sA[1]<=e}const VV=["butt","round","square"],WV=["miter","round","bevel"],jV={},EU={};var Zl,GF,zF,qF;const KV=class cP{constructor(t,e,r,n,s,{optionalContentConfig:A,markedContentStack:a=null},o,l,h,u){U(this,Zl),this.ctx=t,this.current=new CU(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.commonObjs=e,this.objs=r,this.canvasFactory=n,this.filterFactory=s,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.tempSMask=null,this.smaskGroupCanvases=[],this.smaskPreparedEntry=null,this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=A,this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=l,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=h??null,this.imagesTracker=u??null}getObject(t,e,r=null){var n;return typeof e=="string"?((n=this.dependencyTracker)==null||n.recordNamedDependency(t,e),e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e)):r}beginDrawing({transform:t,viewport:e,transparency:r=!1,background:n=null}){const s=this.ctx.canvas.width,A=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=n||"#ffffff",this.ctx.fillRect(0,0,s,A),this.ctx.fillStyle=a,r){const o=this.transparentCanvasEntry=this.canvasFactory.create(s,A);this.compositeCtx=this.ctx,{canvas:this.transparentCanvas,context:this.ctx}=o,this.ctx.save(),this.ctx.transform(...Qr(this.compositeCtx))}this.ctx.save(),rw(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[3]),this.ctx.transform(...e.transform),this.viewportScale=e.scale,this.baseTransform=Qr(this.ctx)}executeOperatorList(t,e,r,n,s){var A;const a=t.argsArray,o=t.fnArray;let l=e||0;const h=a.length;if(h===l)return l;const u=h-l>BU&&typeof r=="function",f=u?Date.now()+RV:0;let d=0;const g=this.commonObjs,m=this.objs;let y,w;for(;;){if(n!==void 0){if(l===n.nextBreakPoint)return n.breakIt(l,r),l;if(n.shouldSkip(l)){if(++l===h)return l;continue}}if(!s||s(l))if(y=o[l],w=a[l]??null,y!==Ja.dependency)w===null?this[y](l):this[y](l,...w);else for(const b of w){(A=this.dependencyTracker)==null||A.recordNamedData(b,l);const C=b.startsWith("g_")?g:m;if(!C.has(b))return C.get(b,r),l}if(l++,l===h)return l;if(u&&++d>BU){if(Date.now()>f)return r(),l;d=0}}}endDrawing(){_(this,Zl,GF).call(this);for(const t of this.smaskGroupCanvases)this.canvasFactory.destroy(t);this.smaskGroupCanvases.length=0,this._clearPreparedSMask(),this.tempSMask=null,this.smaskStack.length=0,this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),_(this,Zl,zF).call(this)}_scaleImage(t,e){const r=t.width??t.displayWidth,n=t.height??t.displayHeight,s=Math.max(Math.hypot(e[0],e[1]),1),A=Math.max(Math.hypot(e[2],e[3]),1),a=[];let o=s,l=A,h=r,u=n;for(;o>2&&h>1||l>2&&u>1;){let w=h,b=u;o>2&&h>1&&(w=Math.ceil(h/2),o/=h/w),l>2&&u>1&&(b=Math.ceil(u/2),l/=u/b),a.push({newWidth:w,newHeight:b}),h=w,u=b}if(a.length===0)return{img:t,paintWidth:r,paintHeight:n,tmpCanvas:null};if(a.length===1){const{newWidth:w,newHeight:b}=a[0],C=this.canvasFactory.create(w,b);return C.context.drawImage(t,0,0,r,n,0,0,w,b),{img:C.canvas,paintWidth:w,paintHeight:b,tmpCanvas:C}}let f=this.canvasFactory.create(1,1),d=this.canvasFactory.create(1,1),g=r,m=n,y=t;for(const{newWidth:w,newHeight:b}of a)this.canvasFactory.reset(d,w,b),d.context.drawImage(y,0,0,g,m,0,0,w,b),[f,d]=[d,f],y=f.canvas,g=w,m=b;return this.canvasFactory.destroy(d),{img:f.canvas,paintWidth:g,paintHeight:m,tmpCanvas:f}}_createMaskCanvas(t,e){var r,n;const s=this.ctx,{width:A,height:a}=e,o=this.current.fillColor,l=this.current.patternFill,h=Qr(s);let u,f,d,g;if((e.bitmap||e.data)&&e.count>1){const W=e.bitmap||e.data.buffer;f=JSON.stringify(l?h:[h.slice(0,4),o]),u=this._cachedBitmapsMap.getOrInsertComputed(W,Oy);const R=u.get(f);if(R&&!l){const tt=Math.round(Math.min(h[0],h[2])+h[4]),et=Math.round(Math.min(h[1],h[3])+h[5]);return(r=this.dependencyTracker)==null||r.recordDependencies(t,dA.transformAndFill),{canvas:R,offsetX:tt,offsetY:et}}d=R}d||(g=this.canvasFactory.create(A,a),FU(g.context,e));let m=Nt.transform(h,[1/A,0,0,-1/a,0,0]);m=Nt.transform(m,[1,0,0,1,0,-a]);const y=pu.slice();Nt.axialAlignedBoundingBox([0,0,A,a],m,y);const[w,b,C,S]=y,k=Math.round(C-w)||1,I=Math.round(S-b)||1,N=this.canvasFactory.create(k,I),D=N.context,Q=w,K=b;D.translate(-Q,-K),D.transform(...m);let L=null;if(!d){const W=this._scaleImage(g.canvas,Qa(D));d=W.img,L=W.tmpCanvas,d!==g.canvas&&(this.canvasFactory.destroy(g),g=null),u&&l&&(u.set(f,d),L=null,g=null)}D.imageSmoothingEnabled=SU(Qr(D),e.interpolate),ew(D,d,0,0,d.width,d.height,0,0,A,a),L&&this.canvasFactory.destroy(L),g&&this.canvasFactory.destroy(g),D.globalCompositeOperation="source-in";const O=Nt.transform(Qa(D),[1,0,0,1,-Q,-K]);return D.fillStyle=l?o.getPattern(s,this,O,bn.FILL,t):o,D.fillRect(0,0,A,a),u&&!l&&u.set(f,N.canvas),(n=this.dependencyTracker)==null||n.recordDependencies(t,dA.transformAndFill),{canvas:N.canvas,canvasEntry:u&&!l?null:N,offsetX:Math.round(Q),offsetY:Math.round(K)}}setLineWidth(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineWidth",t),e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineCap",t),this.ctx.lineCap=VV[e]}setLineJoin(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineJoin",t),this.ctx.lineJoin=WV[e]}setMiterLimit(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("miterLimit",t),this.ctx.miterLimit=e}setDash(t,e,r){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("dash",t);const s=this.ctx;s.setLineDash!==void 0&&(s.setLineDash(e),s.lineDashOffset=r)}setRenderingIntent(t,e){}setFlatness(t,e){}setGState(t,e){var r,n,s,A,a;for(const[o,l]of e)switch(o){case"LW":this.setLineWidth(t,l);break;case"LC":this.setLineCap(t,l);break;case"LJ":this.setLineJoin(t,l);break;case"ML":this.setMiterLimit(t,l);break;case"D":this.setDash(t,l[0],l[1]);break;case"RI":this.setRenderingIntent(t,l);break;case"FL":this.setFlatness(t,l);break;case"Font":this.setFont(t,l[0],l[1]);break;case"CA":(r=this.dependencyTracker)==null||r.recordSimpleData("strokeAlpha",t),this.current.strokeAlpha=l;break;case"ca":(n=this.dependencyTracker)==null||n.recordSimpleData("fillAlpha",t),this.ctx.globalAlpha=this.current.fillAlpha=l;break;case"BM":(s=this.dependencyTracker)==null||s.recordSimpleData("globalCompositeOperation",t),this.ctx.globalCompositeOperation=l;break;case"SMask":(A=this.dependencyTracker)==null||A.recordSimpleData("SMask",t),this.current.activeSMask=l?this.tempSMask:null,this.current.activeSMask&&(this.current.activeSMask.blendMode=this.ctx.globalCompositeOperation),this.tempSMask=null,this.checkSMaskState(t);break;case"TR":(a=this.dependencyTracker)==null||a.recordSimpleData("filter",t),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(l);break}}get inSMaskMode(){return!!this.suspendedCtx}_clearPreparedSMask(){this.smaskPreparedEntry&&(this.canvasFactory.destroy(this.smaskPreparedEntry),this.smaskPreparedEntry=null),this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0}_ensurePreparedSMask(t,e,r){t!==this.smaskPreparedFor&&(this._clearPreparedSMask(),this._prepareSMaskCanvas(t,e,r))}checkSMaskState(t){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode(t):!this.current.activeSMask&&e?this.endSMaskMode():this.current.activeSMask&&e&&this._ensurePreparedSMask(this.current.activeSMask,this.ctx.canvas.width,this.ctx.canvas.height)}_prepareSMaskCanvas(t,e,r){const{canvas:n,subtype:s,backdrop:A,transferMap:a}=t,o=s==="Luminosity"||s==="Alpha"&&a;if(!A&&!o){this.smaskPreparedFor=t;return}let l,h,u;if(A&&o){const f=this.canvasFactory.create(e,r),d=f.context;d.drawImage(n,t.offsetX,t.offsetY),d.globalCompositeOperation="destination-atop",d.fillStyle=A,d.fillRect(0,0,e,r),d.globalCompositeOperation="source-over",l=this.canvasFactory.create(e,r);const g=l.context;g.filter=s==="Alpha"?this.filterFactory.addAlphaFilter(a):this.filterFactory.addLuminosityFilter(a),g.drawImage(f.canvas,0,0),g.filter="none",this.canvasFactory.destroy(f),h=u=0}else if(o){l=this.canvasFactory.create(n.width,n.height);const f=l.context;f.filter=s==="Alpha"?this.filterFactory.addAlphaFilter(a):this.filterFactory.addLuminosityFilter(a),f.drawImage(n,0,0),f.filter="none",{offsetX:h,offsetY:u}=t}else{l=this.canvasFactory.create(e,r);const f=l.context;f.drawImage(n,t.offsetX,t.offsetY),f.globalCompositeOperation="destination-atop",f.fillStyle=A,f.fillRect(0,0,e,r),f.globalCompositeOperation="source-over",h=u=0}this.smaskPreparedEntry=l,this.smaskPreparedFor=t,this.smaskPreparedOffsetX=h,this.smaskPreparedOffsetY=u}beginSMaskMode(t){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const{width:e,height:r}=this.ctx.canvas,n=this.canvasFactory.create(e,r);this.smaskScratchCanvas=n,this.suspendedCtx=this.ctx;const s=this.ctx=n.context;s.setTransform(this.suspendedCtx.getTransform()),eg(this.suspendedCtx,s),HV(s,this.suspendedCtx),this._ensurePreparedSMask(this.current.activeSMask,e,r),this.setGState(t,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),eg(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null,this.canvasFactory.destroy(this.smaskScratchCanvas),this.smaskScratchCanvas=null,this._clearPreparedSMask()}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.ctx.restore()}composeSMask(t,e,r,n){const s=n[0],A=n[1],a=n[2]-s,o=n[3]-A;if(a===0||o===0)return;const l=this.smaskPreparedEntry;if(l){const h=s-this.smaskPreparedOffsetX,u=A-this.smaskPreparedOffsetY;r.save(),r.globalAlpha=1,r.setTransform(1,0,0,1,0,0);const f=new Path2D;f.rect(s,A,a,o),r.clip(f),r.globalCompositeOperation="destination-in",r.drawImage(l.canvas,h,u,a,o,s,A,a,o),r.restore()}else this.genericComposeSMask(e.context,r,a,o,s,A,e.offsetX,e.offsetY);t.save(),t.globalAlpha=1,t.globalCompositeOperation=e.blendMode||"source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(r.canvas,s,A,a,o,s,A,a,o),t.restore()}genericComposeSMask(t,e,r,n,s,A,a,o){const l=t.canvas,h=s-a,u=A-o;e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const f=new Path2D;f.rect(s,A,r,n),e.clip(f),e.globalCompositeOperation="destination-in",e.drawImage(l,h,u,r,n,s,A,r,n),e.restore()}save(t){var e;this.inSMaskMode&&eg(this.ctx,this.suspendedCtx),this.ctx.save();const r=this.current;this.stateStack.push(r),this.current=r.clone(),(e=this.dependencyTracker)==null||e.save(t)}restore(t){var e;if((e=this.dependencyTracker)==null||e.restore(t),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&(eg(this.suspendedCtx,this.ctx),this.ctx.setTransform(this.suspendedCtx.getTransform())),this.checkSMaskState(t),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,e,r,n,s,A,a){var o;(o=this.dependencyTracker)==null||o.recordIncrementalData("transform",t),this.ctx.transform(e,r,n,s,A,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,r,n){let[s]=r;if(!n){s||(s=r[0]=new Path2D),e!==Ja.stroke&&e!==Ja.closeStroke&&(this.current.tilingPatternDims=null),this[e](t,s);return}if(this.dependencyTracker!==null){const a=e===Ja.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(t).recordBBox(t,this.ctx,n[0]-a,n[2]+a,n[1]-a,n[3]+a).recordDependencies(t,["transform"])}s instanceof Path2D||(s=r[0]=yN(s)),Nt.axialAlignedBoundingBox(n,Qr(this.ctx),this.current.minMax);const A=this.current.tilingPatternDims;if(A&&e!==Ja.stroke&&e!==Ja.closeStroke&&this.current.fillColor instanceof jB){const a=Nt.intersect(this.current.clipBox,this.current.minMax);a?this.current.fillColor.updatePatternDims(a,A):this.current.tilingPatternDims=null}this[e](t,s),this._pathStartIdx=t}closePath(t){this.ctx.closePath()}stroke(t,e,r=!0){var n;const s=this.ctx,A=this.current.strokeColor;if(s.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof A=="object"&&A!=null&&A.getPattern){const a=A.isModifyingCurrentTransform()?s.getTransform():null;if(s.save(),s.strokeStyle=A.getPattern(s,this,Qa(s),bn.STROKE,t),a){const o=new Path2D;o.addPath(e,s.getTransform().invertSelf().multiplySelf(a)),e=o}this.rescaleAndStroke(e,!1),s.restore()}else this.rescaleAndStroke(e,!0);(n=this.dependencyTracker)==null||n.recordDependencies(t,dA.stroke),r&&this.consumePath(t,e,this.current.getClippedPathBoundingBox(bn.STROKE,Qr(this.ctx))),s.globalAlpha=this.current.fillAlpha}closeStroke(t,e){this.stroke(t,e)}fill(t,e,r=!0){var n,s,A;const a=this.ctx,o=this.current.fillColor,l=this.current.patternFill;let h=!1;const u=this.current.getClippedPathBoundingBox();if((n=this.dependencyTracker)==null||n.recordDependencies(t,dA.fill),l){const f=this.current.tilingPatternDims,d=f&&o.canSkipPatternCanvas(f);if(d){o.drawPattern(this,e,this.pendingEOFill,d,t),this.pendingEOFill=!1,r&&this.consumePath(t,e,u),this.current.tilingPatternDims=null;return}const g=o.isModifyingCurrentTransform()?a.getTransform():null;if((s=this.dependencyTracker)==null||s.save(t),a.save(),a.fillStyle=o.getPattern(a,this,Qa(a),bn.FILL,t),g){const m=new Path2D;m.addPath(e,a.getTransform().invertSelf().multiplySelf(g)),e=m}h=!0}this.contentVisible&&u!==null&&(this.pendingEOFill?(a.fill(e,"evenodd"),this.pendingEOFill=!1):a.fill(e)),h&&(a.restore(),(A=this.dependencyTracker)==null||A.restore(t)),r&&this.consumePath(t,e,u)}eoFill(t,e){this.pendingEOFill=!0,this.fill(t,e)}fillStroke(t,e){this.fill(t,e,!1),this.stroke(t,e,!1),this.consumePath(t,e)}eoFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}closeFillStroke(t,e){this.fillStroke(t,e)}closeEOFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}endPath(t,e){this.consumePath(t,e)}rawFillPath(t,e){var r;this.ctx.fill(e),(r=this.dependencyTracker)==null||r.recordDependencies(t,dA.rawFillPath).recordOperation(t)}clip(t){var e;(e=this.dependencyTracker)==null||e.recordFutureForcedDependency("clipMode",t),this.pendingClip=jV}eoClip(t){var e;(e=this.dependencyTracker)==null||e.recordFutureForcedDependency("clipMode",t),this.pendingClip=EU}beginText(t){var e;this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,(e=this.dependencyTracker)==null||e.recordOpenMarker(t).resetIncrementalData("sameLineText").resetIncrementalData("moveText",t)}endText(t){const e=this.pendingTextPaths,r=this.ctx;if(this.dependencyTracker){const{dependencyTracker:n}=this;e!==void 0&&n.recordFutureForcedDependency("textClip",n.getOpenMarker()).recordFutureForcedDependency("textClip",t),n.recordCloseMarker(t)}if(e!==void 0){const n=new Path2D,s=r.getTransform().invertSelf();for(const{transform:A,x:a,y:o,fontSize:l,path:h}of e)h&&n.addPath(h,new DOMMatrix(A).preMultiplySelf(s).translate(a,o).scale(l,-l));r.clip(n)}delete this.pendingTextPaths}setCharSpacing(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("charSpacing",t),this.current.charSpacing=e}setWordSpacing(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("wordSpacing",t),this.current.wordSpacing=e}setHScale(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("hScale",t),this.current.textHScale=e/100}setLeading(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("leading",t),this.current.leading=-e}setFont(t,e,r){var n,s;(n=this.dependencyTracker)==null||n.recordSimpleData("font",t).recordSimpleDataFromNamed("fontObj",e,t);const A=this.commonObjs.get(e),a=this.current;if(!A)throw new Error(`Can't find font for ${e}`);if(a.fontMatrix=A.fontMatrix||oF,(a.fontMatrix[0]===0||a.fontMatrix[3]===0)&&Me("Invalid font matrix for font "+e),r<0?(r=-r,a.fontDirection=-1):a.fontDirection=1,this.current.font=A,this.current.fontSize=r,A.isType3Font)return;const o=A.loadedName||"sans-serif",l=((s=A.systemFontInfo)==null?void 0:s.css)||`"${o}", ${A.fallbackName}`;let h="normal";A.black?h="900":A.bold&&(h="bold");const u=A.italic?"italic":"normal";let f=r;r<yU?f=yU:r>bU&&(f=bU),this.current.fontSizeScale=r/f,this.ctx.font=`${u} ${h} ${f}px ${l}`}setTextRenderingMode(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("textRenderingMode",t),this.current.textRenderingMode=e}setTextRise(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("textRise",t),this.current.textRise=e}moveText(t,e,r){var n;(n=this.dependencyTracker)==null||n.resetIncrementalData("sameLineText").recordIncrementalData("moveText",t),this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=r}setLeadingMoveText(t,e,r){this.setLeading(t,-r),this.moveText(t,e,r)}setTextMatrix(t,e){var r;(r=this.dependencyTracker)==null||r.resetIncrementalData("sameLineText").recordSimpleData("textMatrix",t);const{current:n}=this;n.textMatrix=e,n.textMatrixScale=Math.hypot(e[0],e[1]),n.x=n.lineX=0,n.y=n.lineY=0}nextLine(t){var e;this.moveText(t,0,this.current.leading),(e=this.dependencyTracker)==null||e.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??t)}paintChar(t,e,r,n,s,A){var a,o,l,h;const u=this.ctx,f=this.current,d=f.font,g=f.textRenderingMode,m=f.fontSize/f.fontSizeScale,y=g&Gi.FILL_STROKE_MASK,w=!!(g&Gi.ADD_TO_PATH_FLAG),b=f.patternFill&&!d.missingFile,C=f.patternStroke&&!d.missingFile;let S;if((d.disableFontFace||w||b||C)&&!d.missingFile&&(S=d.getPathGenerator(this.commonObjs,e)),S&&(d.disableFontFace||b||C)){u.save(),u.translate(r,n),u.scale(m,-m),(a=this.dependencyTracker)==null||a.recordCharacterBBox(t,u,d);let k;if(y===Gi.FILL||y===Gi.FILL_STROKE)if(s){k=u.getTransform(),u.setTransform(...s);const I=_(this,Zl,qF).call(this,S,k,s);u.fill(I)}else u.fill(S);if(y===Gi.STROKE||y===Gi.FILL_STROKE)if(A){k||(k=u.getTransform()),u.setTransform(...A);const{a:I,b:N,c:D,d:Q}=k,K=Nt.inverseTransform(A),L=Nt.transform([I,N,D,Q,0,0],K);Nt.singularValueDecompose2dScale(L,sA),u.lineWidth*=Math.max(sA[0],sA[1])/m,u.stroke(_(this,Zl,qF).call(this,S,k,A))}else u.lineWidth/=m,u.stroke(S);u.restore()}else(y===Gi.FILL||y===Gi.FILL_STROKE)&&(u.fillText(e,r,n),(o=this.dependencyTracker)==null||o.recordCharacterBBox(t,u,d,m,r,n,()=>u.measureText(e))),(y===Gi.STROKE||y===Gi.FILL_STROKE)&&(this.dependencyTracker&&((l=this.dependencyTracker)==null||l.recordCharacterBBox(t,u,d,m,r,n,()=>u.measureText(e)).recordDependencies(t,dA.stroke)),u.strokeText(e,r,n));w&&((this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:Qr(u),x:r,y:n,fontSize:m,path:S}),(h=this.dependencyTracker)==null||h.recordCharacterBBox(t,u,d,m,r,n))}get isFontSubpixelAAEnabled(){const t=this.canvasFactory.create(10,10),e=t.context;e.scale(1.5,1),e.fillText("I",0,10);const r=e.getImageData(0,0,10,10).data;this.canvasFactory.destroy(t);let n=!1;for(let s=3;s<r.length;s+=4)if(r[s]>0&&r[s]<255){n=!0;break}return ke(this,"isFontSubpixelAAEnabled",n)}showText(t,e){var r,n,s,A;this.dependencyTracker&&(this.dependencyTracker.recordDependencies(t,dA.showText).resetBBox(t),this.current.textRenderingMode&Gi.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",t).inheritPendingDependenciesAsFutureForcedDependencies());const a=this.current,o=a.font;if(o.isType3Font){this.showType3Text(t,e),(r=this.dependencyTracker)==null||r.recordShowTextOperation(t);return}const l=a.fontSize;if(l===0){(n=this.dependencyTracker)==null||n.recordOperation(t);return}const h=this.ctx,u=a.fontSizeScale,f=a.charSpacing,d=a.wordSpacing,g=a.fontDirection,m=a.textHScale*g,y=e.length,w=o.vertical,b=w?1:-1,C=o.defaultVMetrics,S=l*a.fontMatrix[0],k=a.textRenderingMode===Gi.FILL&&!o.disableFontFace&&!a.patternFill;h.save(),a.textMatrix&&h.transform(...a.textMatrix),h.translate(a.x,a.y+a.textRise),g>0?h.scale(m,-1):h.scale(m,1);let I,N;const D=a.textRenderingMode&Gi.FILL_STROKE_MASK,Q=D===Gi.FILL||D===Gi.FILL_STROKE,K=D===Gi.STROKE||D===Gi.FILL_STROKE;let L=a.lineWidth;const O=a.textMatrixScale;if(O===0||L===0?K&&(L=this.getSinglePixelWidth()):L/=O,u!==1&&(h.scale(u,u),L/=u),h.lineWidth=L,Q&&a.patternFill){h.save();const tt=a.fillColor.getPattern(h,this,Qa(h),bn.FILL,t);I=Qr(h),h.restore(),h.fillStyle=tt}if(K&&a.patternStroke){h.save();const tt=a.strokeColor.getPattern(h,this,Qa(h),bn.STROKE,t);N=Qr(h),h.restore(),h.strokeStyle=tt}if(o.isInvalidPDFjsFont){const tt=[];let et=0;for(const nt of e)tt.push(nt.unicode),et+=nt.width;const st=tt.join("");if(h.fillText(st,0,0),this.dependencyTracker!==null){const nt=h.measureText(st);this.dependencyTracker.recordBBox(t,this.ctx,-nt.actualBoundingBoxLeft,nt.actualBoundingBoxRight,-nt.actualBoundingBoxAscent,nt.actualBoundingBoxDescent).recordShowTextOperation(t)}a.x+=et*S*m,h.restore(),this.compose();return}let W=0,R;for(R=0;R<y;++R){const tt=e[R];if(typeof tt=="number"){W+=b*tt*l/1e3;continue}let et=!1;const st=(tt.isSpace?d:0)+f,nt=tt.fontChar,at=tt.accent;let ft,ht,M=tt.width;if(w){const rt=tt.vmetric||C,it=-(tt.vmetric?rt[1]:M*.5)*S,ot=rt[2]*S;M=rt?-rt[0]:M,ft=it/u,ht=(W+ot)/u}else ft=W/u,ht=0;let G;if(o.remeasure&&M>0){G=h.measureText(nt);const rt=G.width*1e3/l*u;if(M<rt&&this.isFontSubpixelAAEnabled){const it=M/rt;et=!0,h.save(),h.scale(it,1),ft/=it}else M!==rt&&(ft+=(M-rt)/2e3*l/u)}if(this.contentVisible&&(tt.isInFont||o.missingFile)){if(k&&!at)h.fillText(nt,ft,ht),(s=this.dependencyTracker)==null||s.recordCharacterBBox(t,h,G?{bbox:null}:o,l/u,ft,ht,()=>G??h.measureText(nt));else if(this.paintChar(t,nt,ft,ht,I,N),at){const rt=ft+l*at.offset.x/u,it=ht-l*at.offset.y/u;this.paintChar(t,at.fontChar,rt,it,I,N)}}const X=w?M*S-st*g:M*S+st*g;W+=X,et&&h.restore()}w?a.y-=W:a.x+=W*m,h.restore(),this.compose(),(A=this.dependencyTracker)==null||A.recordShowTextOperation(t)}showType3Text(t,e){const r=this.ctx,n=this.current,s=n.font,A=n.fontSize,a=n.fontDirection,o=s.vertical?1:-1,l=n.charSpacing,h=n.wordSpacing,u=n.textHScale*a,f=n.fontMatrix||oF,d=e.length,g=n.textRenderingMode===Gi.INVISIBLE;let m,y,w,b;if(g||A===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,r.save(),n.textMatrix&&r.transform(...n.textMatrix),r.translate(n.x,n.y+n.textRise),r.scale(u,a);const C=this.dependencyTracker;for(this.dependencyTracker=C?new TF(C,t):null,m=0;m<d;++m){if(y=e[m],typeof y=="number"){b=o*y*A/1e3,this.ctx.translate(b,0),n.x+=b*u;continue}const S=(y.isSpace?h:0)+l,k=s.charProcOperatorList[y.operatorListId];k?this.contentVisible&&(this.save(),r.scale(A,A),r.transform(...f),this.executeOperatorList(k),this.restore()):Me(`Type3 character "${y.operatorListId}" is not available.`);const I=[y.width,0];Nt.applyTransform(I,f),w=I[0]*A+S,r.translate(w,0),n.x+=w*u}r.restore(),C&&(this.dependencyTracker=C)}setCharWidth(t,e,r){}setCharWidthAndBounds(t,e,r,n,s,A,a){var o;const l=new Path2D;l.rect(n,s,A-n,a-s),this.ctx.clip(l),(o=this.dependencyTracker)==null||o.recordBBox(t,this.ctx,n,A,s,a).recordClipBox(t,this.ctx,n,A,s,a),this.endPath(t)}getColorN_Pattern(t,e){let r;if(e[0]==="TilingPattern"){const n=this.baseTransform||Qr(this.ctx),s={createCanvasGraphics:(A,a)=>new cP(A,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new TF(this.dependencyTracker,a,!0):null)};r=new jB(e,this.ctx,s,n)}else r=this._getPattern(t,e[1],e[2]);return r}setStrokeColorN(t,...e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("strokeColor",t),this.current.strokeColor=this.getColorN_Pattern(t,e),this.current.patternStroke=!0}setFillColorN(t,...e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("fillColor",t);const n=this.current.fillColor=this.getColorN_Pattern(t,e);this.current.patternFill=!0,this.current.tilingPatternDims=n instanceof jB?[0,0,0,0]:null}setStrokeRGBColor(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor=e,this.current.patternStroke=!1}setStrokeTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor=e,this.current.patternFill=!1,this.current.tilingPatternDims=null}setFillTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1,this.current.tilingPatternDims=null}_getPattern(t,e,r=null){let n;return this.cachedPatterns.has(e)?n=this.cachedPatterns.get(e):(n=DV(this.getObject(t,e)),this.cachedPatterns.set(e,n)),r&&(n.matrix=r),n}shadingFill(t,e){var r;if(!this.contentVisible)return;const n=this.ctx;this.save(t);const s=this._getPattern(t,e);n.fillStyle=s.getPattern(n,this,Qa(n),bn.SHADING,t);const A=Qa(n);if(A){const{width:a,height:o}=n.canvas,l=pu.slice();Nt.axialAlignedBoundingBox([0,0,a,o],A,l);const[h,u,f,d]=l;this.ctx.fillRect(h,u,f-h,d-u)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);(r=this.dependencyTracker)==null||r.resetBBox(t).recordFullPageBBox(t).recordDependencies(t,dA.transform).recordDependencies(t,dA.fill).recordOperation(t),this.compose(this.current.getClippedPathBoundingBox()),this.restore(t)}beginInlineImage(){rr("Should not call beginInlineImage")}beginImageData(){rr("Should not call beginImageData")}paintFormXObjectBegin(t,e,r){var n;if(this.contentVisible&&(this.save(t),this.baseTransformStack.push(this.baseTransform),e&&this.transform(t,...e),this.baseTransform=Qr(this.ctx),r)){Nt.axialAlignedBoundingBox(r,this.baseTransform,this.current.minMax);const[s,A,a,o]=r,l=new Path2D;l.rect(s,A,a-s,o-A),this.ctx.clip(l),(n=this.dependencyTracker)==null||n.recordClipBox(t,this.ctx,s,a,A,o),this.endPath(t)}}paintFormXObjectEnd(t){this.contentVisible&&(this.restore(t),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t,e){var r;if(!this.contentVisible)return;this.save(t);const{inSMaskMode:n}=this;n&&(this.endSMaskMode(),this.current.activeSMask=null);const s=this.ctx;if(e.isolated||Ny("TODO: Support non-isolated groups."),e.knockout&&Me("Knockout groups not supported."),!e.needsIsolation&&s.globalAlpha===1&&s.globalCompositeOperation==="source-over"&&!n){if(e.bbox){let m=new Path2D;const[y,w,b,C]=e.bbox;if(m.rect(y,w,b-y,C-w),e.matrix){const S=new Path2D;S.addPath(m,new DOMMatrix(e.matrix)),m=S}s.clip(m)}this.groupStack.push(null),this.groupLevel++;return}const A=Qr(s);e.matrix&&s.transform(...e.matrix);const a=[0,0,s.canvas.width,s.canvas.height];let o;e.bbox?(o=pu.slice(),Nt.axialAlignedBoundingBox(e.bbox,Qr(s),o),o=Nt.intersect(o,a)||[0,0,0,0]):o=a;const l=Math.floor(o[0]),h=Math.floor(o[1]),u=Math.max(Math.ceil(o[2])-l,1),f=Math.max(Math.ceil(o[3])-h,1);this.current.startNewPathAndClipBox([0,0,u,f]);const d=this.canvasFactory.create(u,f);e.smask&&this.smaskGroupCanvases.push(d);const g=d.context;if(g.translate(-l,-h),g.transform(...A),!e.isolated&&!e.smask&&n&&e.needsIsolation&&(g.save(),g.setTransform(1,0,0,1,0,0),g.drawImage(s.canvas,-l,-h),g.restore()),e.bbox){let m=new Path2D;const[y,w,b,C]=e.bbox;if(m.rect(y,w,b-y,C-w),e.matrix){const S=new Path2D;S.addPath(m,new DOMMatrix(e.matrix)),m=S}g.clip(m)}e.smask&&this.smaskStack.push({canvas:d.canvas,context:g,offsetX:l,offsetY:h,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null}),(!e.smask||this.dependencyTracker)&&(s.setTransform(1,0,0,1,0,0),s.translate(l,h),s.save()),eg(s,g),this.ctx=g,(r=this.dependencyTracker)==null||r.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(s),this.setGState(t,[["BM","source-over"],["ca",1],["CA",1],["TR",null]]),this.groupStack.push(s),this.groupLevel++}endGroup(t,e){var r;if(!this.contentVisible)return;this.groupLevel--;const n=this.ctx,s=this.groupStack.pop();if(s===null){this.restore(t);return}if(this.ctx=s,this.ctx.imageSmoothingEnabled=!1,(r=this.dependencyTracker)==null||r.popBaseTransform(),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore(t),this.dependencyTracker&&(this.ctx.restore(),this.inSMaskMode&&this.ctx.setTransform(this.suspendedCtx.getTransform()));else{this.ctx.restore();const A=Qr(this.ctx);this.restore(t),this.ctx.save(),this.ctx.setTransform(...A);const a=pu.slice();Nt.axialAlignedBoundingBox([0,0,n.canvas.width,n.canvas.height],A,a),this.ctx.drawImage(n.canvas,0,0),this.ctx.restore(),this.canvasFactory.destroy({canvas:n.canvas,context:n}),this.compose(a)}}beginAnnotation(t,e,r,n,s,A){if(_(this,Zl,GF).call(this),rw(this.ctx),this.ctx.save(),this.save(t),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),r){const a=r[2]-r[0],o=r[3]-r[1];if(A&&this.annotationCanvasMap){n=n.slice(),n[4]-=r[0],n[5]-=r[1],r=r.slice(),r[0]=r[1]=0,r[2]=a,r[3]=o,Nt.singularValueDecompose2dScale(Qr(this.ctx),sA);const{viewportScale:l}=this,h=Math.ceil(a*this.outputScaleX*l),u=Math.ceil(o*this.outputScaleY*l);this.annotationCanvas=this.canvasFactory.create(h,u);const{canvas:f,context:d}=this.annotationCanvas;this.annotationCanvasMap.set(e,f),this.annotationCanvas.savedCtx=this.ctx,this.ctx=d,this.ctx.save(),this.ctx.setTransform(sA[0],0,0,-sA[1],0,o*sA[1]),rw(this.ctx)}else{rw(this.ctx),this.endPath(t);const l=new Path2D;l.rect(r[0],r[1],a,o),this.ctx.clip(l)}}this.current=new CU(this.ctx.canvas.width,this.ctx.canvas.height),this.baseTransformStack.push(this.baseTransform),this.transform(t,...n),this.transform(t,...s),this.baseTransform=Qr(this.ctx)}endAnnotation(t){this.annotationCanvas&&(this.ctx.restore(),_(this,Zl,zF).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.baseTransform=this.baseTransformStack.pop()}paintImageMaskXObject(t,e){var r;if(!this.contentVisible)return;const n=e.count;e=this.getObject(t,e.data,e),e.count=n;const s=this.ctx,A=this._createMaskCanvas(t,e),a=A.canvas;s.save(),s.setTransform(1,0,0,1,0,0),s.drawImage(a,A.offsetX,A.offsetY),(r=this.dependencyTracker)==null||r.resetBBox(t).recordBBox(t,this.ctx,A.offsetX,A.offsetX+a.width,A.offsetY,A.offsetY+a.height).recordOperation(t),s.restore(),A.canvasEntry&&this.canvasFactory.destroy(A.canvasEntry),this.compose()}paintImageMaskXObjectRepeat(t,e,r,n=0,s=0,A,a){var o,l,h;if(!this.contentVisible)return;e=this.getObject(t,e.data,e);const u=this.ctx;u.save();const f=Qr(u);u.transform(r,n,s,A,0,0);const d=this._createMaskCanvas(t,e);u.setTransform(1,0,0,1,d.offsetX-f[4],d.offsetY-f[5]),(o=this.dependencyTracker)==null||o.resetBBox(t);for(let g=0,m=a.length;g<m;g+=2){const y=Nt.transform(f,[r,n,s,A,a[g],a[g+1]]);u.drawImage(d.canvas,y[4],y[5]),(l=this.dependencyTracker)==null||l.recordBBox(t,this.ctx,y[4],y[4]+d.canvas.width,y[5],y[5]+d.canvas.height)}u.restore(),d.canvasEntry&&this.canvasFactory.destroy(d.canvasEntry),this.compose(),(h=this.dependencyTracker)==null||h.recordOperation(t)}paintImageMaskXObjectGroup(t,e){var r,n,s;if(!this.contentVisible)return;const A=this.ctx,a=this.current.fillColor,o=this.current.patternFill;(r=this.dependencyTracker)==null||r.resetBBox(t).recordDependencies(t,dA.transformAndFill);for(const l of e){const{data:h,width:u,height:f,transform:d}=l,g=this.canvasFactory.create(u,f),m=g.context;m.save();const y=this.getObject(t,h,l);FU(m,y),m.globalCompositeOperation="source-in",m.fillStyle=o?a.getPattern(m,this,Qa(A),bn.FILL,t):a,m.fillRect(0,0,u,f),m.restore(),A.save(),A.transform(...d),A.scale(1,-1),ew(A,g.canvas,0,0,u,f,0,-1,1,1),this.canvasFactory.destroy(g),(n=this.dependencyTracker)==null||n.recordBBox(t,A,0,u,0,f),A.restore()}this.compose(),(s=this.dependencyTracker)==null||s.recordOperation(t)}paintImageXObject(t,e){if(!this.contentVisible)return;const r=this.getObject(t,e);if(!r){Me("Dependent image isn't ready yet");return}this.paintInlineImageXObject(t,r)}paintImageXObjectRepeat(t,e,r,n,s){if(!this.contentVisible)return;const A=this.getObject(t,e);if(!A){Me("Dependent image isn't ready yet");return}const a=A.width,o=A.height,l=[];for(let h=0,u=s.length;h<u;h+=2)l.push({transform:[r,0,0,n,s[h],s[h+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(t,A,l)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return{img:t.bitmap,canvasEntry:null};const{bitmap:e,width:r,height:n}=t,s=this.canvasFactory.create(r,n),A=s.context;return A.filter=this.current.transferMaps,A.drawImage(e,0,0),A.filter="none",{img:s.canvas,canvasEntry:s}}paintInlineImageXObject(t,e){var r;if(!this.contentVisible)return;const n=e.width,s=e.height,A=this.ctx;this.save(t);const{filter:a}=A;a!=="none"&&a!==""&&(A.filter="none"),A.scale(1/n,-1/s);let o,l=null;if(e.bitmap){const u=this.applyTransferMapsToBitmap(e);o=u.img,l=u.canvasEntry}else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)o=e;else{const u=this.canvasFactory.create(n,s);xU(u.context,e),o=this.applyTransferMapsToCanvas(u.context),l=u}const h=this._scaleImage(o,Qa(A));A.imageSmoothingEnabled=SU(Qr(A),e.interpolate),this.dependencyTracker&&(this.dependencyTracker.resetBBox(t).recordBBox(t,A,0,n,-s,0).recordDependencies(t,dA.imageXObject).recordOperation(t),(r=this.imagesTracker)==null||r.record(A,n,s,this.dependencyTracker.clipBox)),ew(A,h.img,0,0,h.paintWidth,h.paintHeight,0,-s,n,s),h.tmpCanvas&&this.canvasFactory.destroy(h.tmpCanvas),l&&this.canvasFactory.destroy(l),this.compose(),this.restore(t)}paintInlineImageXObjectGroup(t,e,r){var n,s,A;if(!this.contentVisible)return;const a=this.ctx;let o,l=null;if(e.bitmap)o=e.bitmap;else{const h=e.width,u=e.height,f=this.canvasFactory.create(h,u);xU(f.context,e),o=this.applyTransferMapsToCanvas(f.context),l=f}(n=this.dependencyTracker)==null||n.resetBBox(t);for(const h of r)a.save(),a.transform(...h.transform),a.scale(1,-1),ew(a,o,h.x,h.y,h.w,h.h,0,-1,1,1),(s=this.dependencyTracker)==null||s.recordBBox(t,a,0,1,-1,0),a.restore();l&&this.canvasFactory.destroy(l),(A=this.dependencyTracker)==null||A.recordOperation(t),this.compose()}paintSolidColorImageMask(t){var e;this.contentVisible&&((e=this.dependencyTracker)==null||e.resetBBox(t).recordBBox(t,this.ctx,0,1,0,1).recordDependencies(t,dA.fill).recordOperation(t),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t,e){}markPointProps(t,e,r){}beginMarkedContent(t,e){var r;(r=this.dependencyTracker)==null||r.beginMarkedContent(t),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,e,r){var n;(n=this.dependencyTracker)==null||n.beginMarkedContent(t),e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(t){var e;(e=this.dependencyTracker)==null||e.endMarkedContent(t),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(t){}endCompat(t){}consumePath(t,e,r){var n,s;const A=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(r);const a=this.ctx;this.pendingClip?(A||(this.pendingClip===EU?a.clip(e,"evenodd"):a.clip(e)),this.pendingClip=null,(n=this.dependencyTracker)==null||n.bboxToClipBoxDropOperation(t).recordFutureForcedDependency("clipPath",t)):(s=this.dependencyTracker)==null||s.recordOperation(t),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=Qr(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const e=Math.abs(t[0]*t[3]-t[2]*t[1]),r=Math.hypot(t[0],t[2]),n=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(r,n)/e}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:e,b:r,c:n,d:s}=this.ctx.getTransform();let A,a;if(r===0&&n===0){const o=Math.abs(e),l=Math.abs(s);if(o===l)if(t===0)A=a=1/o;else{const h=o*t;A=a=h<1?1/h:1}else if(t===0)A=1/o,a=1/l;else{const h=o*t,u=l*t;A=h<1?1/h:1,a=u<1?1/u:1}}else{const o=Math.abs(e*s-r*n),l=Math.hypot(e,r),h=Math.hypot(n,s);if(t===0)A=h/o,a=l/o;else{const u=t*o;A=h>u?h/u:1,a=l>u?l/u:1}}this._cachedScaleForStroking[0]=A,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(t,e){const{ctx:r,current:{lineWidth:n}}=this,[s,A]=this.getScaleForStroking();if(s===A){r.lineWidth=(n||1)*s,r.stroke(t);return}const a=r.getLineDash();e&&r.save(),r.scale(s,A),KB.a=1/s,KB.d=1/A;const o=new Path2D;if(o.addPath(t,KB),a.length>0){const l=Math.max(s,A);r.setLineDash(a.map(h=>h/l)),r.lineDashOffset/=l}r.lineWidth=n||1,r.stroke(o),e&&r.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};Zl=new WeakSet,GF=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.canvasFactory.destroy(this.transparentCanvasEntry),this.transparentCanvas=null,this.transparentCanvasEntry=null)},zF=function(){if(this.pageColors){const i=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(i!=="none"){const t=this.ctx.filter;this.ctx.filter=i,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}},qF=function(i,t,e){const r=new Path2D;return r.addPath(i,new DOMMatrix(e).invertSelf().multiplySelf(t)),r};let p2=KV;for(const i in Ja)p2.prototype[i]!==void 0&&(p2.prototype[Ja[i]]=p2.prototype[i]);var g2,m2;class Gy{constructor(t,e,r){U(this,g2,null),U(this,m2,null),ut(this,"_fullReader",null),ut(this,"_rangeReaders",new Set),ut(this,"_source",null),this._source=t,F(this,g2,e),F(this,m2,r)}get _progressiveDataLength(){var t;return((t=this._fullReader)==null?void 0:t._loaded)??0}getFullReader(){return Xr(!this._fullReader,"BasePDFStream.getFullReader can only be called once."),this._fullReader=new(c(this,g2))(this)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const r=new(c(this,m2))(this,t,e);return this._rangeReaders.add(r),r}cancelAllRequests(t){var e;(e=this._fullReader)==null||e.cancel(t);for(const r of new Set(this._rangeReaders))r.cancel(t)}}g2=new WeakMap,m2=new WeakMap;class zy{constructor(t){ut(this,"onProgress",null),ut(this,"_contentLength",0),ut(this,"_filename",null),ut(this,"_headersCapability",Promise.withResolvers()),ut(this,"_isRangeSupported",!1),ut(this,"_isStreamingSupported",!1),ut(this,"_loaded",0),ut(this,"_stream",null),this._stream=t}_callOnProgress(){var t;(t=this.onProgress)==null||t.call(this,{loaded:this._loaded,total:this._contentLength})}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(){rr("Abstract method `read` called")}cancel(t){rr("Abstract method `cancel` called")}}class qy{constructor(t,e,r){ut(this,"_stream",null),this._stream=t}async read(){rr("Abstract method `read` called")}cancel(t){rr("Abstract method `cancel` called")}}function GV(i){let t=!0,e=r("filename\\*","i").exec(i);if(e){e=e[1];let h=a(e);return h=unescape(h),h=o(h),h=l(h),s(h)}if(e=A(i),e){const h=l(e);return s(h)}if(e=r("filename","i").exec(i),e){e=e[1];let h=a(e);return h=l(h),s(h)}function r(h,u){return new RegExp("(?:^|;)\\s*"+h+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',u)}function n(h,u){if(h){if(!/^[\x00-\xFF]+$/.test(u))return u;try{const f=new TextDecoder(h,{fatal:!0}),d=Py(u);u=f.decode(d),t=!1}catch{}}return u}function s(h){return t&&/[\x80-\xff]/.test(h)&&(h=n("utf-8",h),t&&(h=n("iso-8859-1",h))),h}function A(h){const u=[];let f;const d=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(f=d.exec(h))!==null;){let[,m,y,w]=f;if(m=parseInt(m,10),m in u){if(m===0)break;continue}u[m]=[y,w]}const g=[];for(let m=0;m<u.length&&m in u;++m){let[y,w]=u[m];w=a(w),y&&(w=unescape(w),m===0&&(w=o(w))),g.push(w)}return g.join("")}function a(h){if(h.startsWith('"')){const u=h.slice(1).split('\\"');for(let f=0;f<u.length;++f){const d=u[f].indexOf('"');d!==-1&&(u[f]=u[f].slice(0,d),u.length=f+1),u[f]=u[f].replaceAll(/\\(.)/g,"$1")}h=u.join('"')}return h}function o(h){const u=h.indexOf("'");if(u===-1)return h;const f=h.slice(0,u),d=h.slice(u+1).replace(/^[^']*'/,"");return n(f,d)}function l(h){return!h.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(h)?h:h.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(u,f,d,g){if(d==="q"||d==="Q")return g=g.replaceAll("_"," "),g=g.replaceAll(/=([0-9a-fA-F]{2})/g,function(m,y){return String.fromCharCode(parseInt(y,16))}),n(f,g);try{g=atob(g)}catch{}return n(f,g)})}return""}function uP(i,t){const e=new Headers;if(!i||!t||typeof t!="object")return e;for(const r in t){const n=t[r];n!==void 0&&e.append(r,n)}return e}function Xy(i){var t;return((t=URL.parse(i))==null?void 0:t.origin)??null}function dP({responseHeaders:i,isHttp:t,rangeChunkSize:e,disableRange:r}){const n={contentLength:0,isRangeSupported:!1},s=parseInt(i.get("Content-Length"),10);return!Number.isInteger(s)||(n.contentLength=s,s<=2*e)||r||!t||i.get("Accept-Ranges")!=="bytes"||(i.get("Content-Encoding")||"identity")==="identity"&&(n.isRangeSupported=!0),n}function fP(i){const t=i.get("Content-Disposition");if(t){let e=GV(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(Vy(e))return e}return null}function Yy(i,t){return new M0(`Unexpected server response (${i}) while retrieving PDF "${t.href}".`,i,i===404||i===0&&t.protocol==="file:")}function pP(i,t){if(i!==t)throw new Error(`Expected range response-origin "${i}" to match "${t}".`)}function gP(i,t,e,r){return fetch(i,{method:"GET",headers:t,signal:r.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"})}function mP(i,t){if(i!==200&&i!==206)throw Yy(i,t)}function $y(i){if(i instanceof Uint8Array)return i.buffer;if(i instanceof ArrayBuffer)return i;throw new Error(`getArrayBuffer - unexpected data: ${i}`)}class zV extends Gy{constructor(t){super(t,qV,XV),ut(this,"_responseOrigin",null);const{httpHeaders:e,url:r}=t;Xr(/https?:/.test(r.protocol),"PDFFetchStream only supports http(s):// URLs."),this.headers=uP(!0,e)}}class qV extends zy{constructor(t){super(t),ut(this,"_abortController",new AbortController),ut(this,"_reader",null);const{disableRange:e,disableStream:r,rangeChunkSize:n,url:s,withCredentials:A}=t._source;this._isStreamingSupported=!r;const a=new Headers(t.headers);gP(s,a,A,this._abortController).then(o=>{t._responseOrigin=Xy(o.url),mP(o.status,s),this._reader=o.body.getReader();const l=o.headers,{contentLength:h,isRangeSupported:u}=dP({responseHeaders:l,isHttp:!0,rangeChunkSize:n,disableRange:e});this._contentLength=h,this._isRangeSupported=u,this._filename=fP(l),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new ml("Streaming is disabled.")),this._headersCapability.resolve()}).catch(this._headersCapability.reject)}async read(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this._callOnProgress(),{value:$y(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}class XV extends qy{constructor(t,e,r){super(t,e,r),ut(this,"_abortController",new AbortController),ut(this,"_readCapability",Promise.withResolvers()),ut(this,"_reader",null);const{url:n,withCredentials:s}=t._source,A=new Headers(t.headers);A.append("Range",`bytes=${e}-${r-1}`),gP(n,A,s,this._abortController).then(a=>{const o=Xy(a.url);pP(o,t._responseOrigin),mP(a.status,n),this._reader=a.body.getReader(),this._readCapability.resolve()}).catch(this._readCapability.reject)}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:{value:$y(t),done:!1}}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}function wP(i){return i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer}function Zy(){for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}var XF,vP;class YV extends Gy{constructor(t){super(t,$V,ZV),U(this,XF),ut(this,"_progressiveDone",!1),ut(this,"_queuedChunks",[]);const{pdfDataRangeTransport:e}=t,{initialData:r,progressiveDone:n}=e;if((r==null?void 0:r.length)>0){const A=wP(r);this._queuedChunks.push(A)}this._progressiveDone=n;const s=A=>{var a;switch(A.type){case"range":case"progressiveRead":_(this,XF,vP).call(this,A.begin,A.chunk);break;case"progressiveDone":(a=this._fullReader)==null||a.progressiveDone(),this._progressiveDone=!0;break}};e.transportReady(s)}getFullReader(){const t=super.getFullReader();return this._queuedChunks=null,t}getRangeReader(t,e){const r=super.getRangeReader(t,e);return r&&(r.onDone=()=>this._rangeReaders.delete(r),this._source.pdfDataRangeTransport.requestDataRange(t,e)),r}cancelAllRequests(t){super.cancelAllRequests(t),this._source.pdfDataRangeTransport.abort()}}XF=new WeakSet,vP=function(i,t){const e=wP(t);if(i===void 0)this._fullReader?this._fullReader._enqueue(e):this._queuedChunks.push(e);else{const r=this._rangeReaders.keys().find(n=>n._begin===i);Xr(r,"#onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."),r._enqueue(e)}};var w2;class $V extends zy{constructor(t){super(t),U(this,w2,Zy.bind(this)),ut(this,"_done",!1),ut(this,"_queuedChunks",null),ut(this,"_requests",[]);const{pdfDataRangeTransport:e,disableRange:r,disableStream:n}=t._source,{length:s,contentDispositionFilename:A}=e;this._queuedChunks=t._queuedChunks||[];for(const o of this._queuedChunks)this._loaded+=o.byteLength;this._done=t._progressiveDone,this._contentLength=s,this._isStreamingSupported=!n,this._isRangeSupported=!r,Vy(A)&&(this._filename=A),this._headersCapability.resolve();const a=this._loaded;Promise.resolve().then(()=>{a>0&&this._loaded===a&&this._callOnProgress()})}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength,this._callOnProgress())}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,c(this,w2).call(this)}progressiveDone(){this._done||(this._done=!0),this._queuedChunks.length===0&&c(this,w2).call(this)}}w2=new WeakMap;var v2;class ZV extends qy{constructor(t,e,r){super(t,e,r),U(this,v2,Zy.bind(this)),ut(this,"onDone",null),ut(this,"_begin",-1),ut(this,"_done",!1),ut(this,"_queuedChunk",null),ut(this,"_requests",[]),this._begin=e}_enqueue(t){var e;this._done||(this._requests.length===0?this._queuedChunk=t:(this._requests.shift().resolve({value:t,done:!1}),c(this,v2).call(this)),this._done=!0,(e=this.onDone)==null||e.call(this))}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){var e;this._done=!0,c(this,v2).call(this),(e=this.onDone)==null||e.call(this)}}v2=new WeakMap;const YF=200,yP=206;function JV(i){return typeof i!="string"?i:Py(i).buffer}var hl,y2,bP,BP;class tW extends Gy{constructor(t){super(t,eW,rW),U(this,y2),U(this,hl,new WeakMap),ut(this,"_responseOrigin",null);const{httpHeaders:e,url:r}=t;this.url=r,this.isHttp=/https?:/.test(r.protocol),this.headers=uP(this.isHttp,e)}_request(t){const e=new XMLHttpRequest,r={validateStatus:null,onHeadersReceived:t.onHeadersReceived,onDone:t.onDone,onError:t.onError,onProgress:t.onProgress};c(this,hl).set(e,r),e.open("GET",this.url),e.withCredentials=this._source.withCredentials;for(const[n,s]of this.headers)e.setRequestHeader(n,s);return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),r.validateStatus=n=>n===yP||n===YF):r.validateStatus=n=>n===YF,e.responseType="arraybuffer",Xr(t.onError,"Expected `onError` callback to be provided."),e.onerror=()=>t.onError(e.status),e.onreadystatechange=_(this,y2,BP).bind(this,e),e.onprogress=_(this,y2,bP).bind(this,e),e.send(null),e}_abortRequest(t){c(this,hl).has(t)&&(c(this,hl).delete(t),t.abort())}getRangeReader(t,e){const r=super.getRangeReader(t,e);return r&&(r.onClosed=()=>this._rangeReaders.delete(r)),r}}hl=new WeakMap,y2=new WeakSet,bP=function(i,t){var e;const r=c(this,hl).get(i);(e=r==null?void 0:r.onProgress)==null||e.call(r,t)},BP=function(i,t){const e=c(this,hl).get(i);if(!e||(i.readyState>=2&&e.onHeadersReceived&&(e.onHeadersReceived(),delete e.onHeadersReceived),i.readyState!==4)||!c(this,hl).has(i))return;if(c(this,hl).delete(i),i.status===0&&this.isHttp){e.onError(i.status);return}const r=i.status||YF;if(!e.validateStatus(r)){e.onError(i.status);return}const n=JV(i.response);if(r===yP){const s=i.getResponseHeader("Content-Range");/bytes (\d+)-(\d+)\/(\d+)/.test(s)?e.onDone(n):(Me('Missing or invalid "Content-Range" header.'),e.onError(0))}else n?e.onDone(n):e.onError(i.status)};var Dv,sf,CP,xP,FP,SP;class eW extends zy{constructor(t){super(t),U(this,sf),U(this,Dv,Zy.bind(this)),ut(this,"_cachedChunks",[]),ut(this,"_done",!1),ut(this,"_requests",[]),ut(this,"_storedError",null),this._fullRequestXhr=t._request({onHeadersReceived:_(this,sf,CP).bind(this),onDone:_(this,sf,xP).bind(this),onError:_(this,sf,FP).bind(this),onProgress:_(this,sf,SP).bind(this)})}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t),c(this,Dv).call(this),this._stream._abortRequest(this._fullRequestXhr),this._fullRequestXhr=null}}Dv=new WeakMap,sf=new WeakSet,CP=function(){const i=this._stream,{disableRange:t,rangeChunkSize:e}=i._source,r=this._fullRequestXhr;i._responseOrigin=Xy(r.responseURL);const n=r.getAllResponseHeaders(),s=new Headers(n?n.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(o=>{const[l,...h]=o.split(": ");return[l,h.join(": ")]}):[]),{contentLength:A,isRangeSupported:a}=dP({responseHeaders:s,isHttp:i.isHttp,rangeChunkSize:e,disableRange:t});this._contentLength=A,this._isRangeSupported=a,this._filename=fP(s),this._isRangeSupported&&i._abortRequest(r),this._headersCapability.resolve()},xP=function(i){this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._cachedChunks.push(i),this._done=!0,this._cachedChunks.length===0&&c(this,Dv).call(this)},FP=function(i){this._storedError=Yy(i,this._stream.url),this._headersCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0},SP=function(i){var t;(t=this.onProgress)==null||t.call(this,{loaded:i.loaded,total:i.lengthComputable?i.total:this._contentLength})};var Ov,Df,EP,kP,$F;class rW extends qy{constructor(t,e,r){super(t,e,r),U(this,Df),U(this,Ov,Zy.bind(this)),ut(this,"onClosed",null),ut(this,"_done",!1),ut(this,"_queuedChunk",null),ut(this,"_requests",[]),ut(this,"_storedError",null),this._requestXhr=t._request({begin:e,end:r,onHeadersReceived:_(this,Df,EP).bind(this),onDone:_(this,Df,kP).bind(this),onError:_(this,Df,$F).bind(this),onProgress:null})}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){var e;this._done=!0,c(this,Ov).call(this),this._stream._abortRequest(this._requestXhr),(e=this.onClosed)==null||e.call(this)}}Ov=new WeakMap,Df=new WeakSet,EP=function(){var i;const t=Xy((i=this._requestXhr)==null?void 0:i.responseURL);try{pP(t,this._stream._responseOrigin)}catch(e){this._storedError=e,_(this,Df,$F).call(this,0)}},kP=function(i){var t;this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._queuedChunk=i,this._done=!0,c(this,Ov).call(this),(t=this.onClosed)==null||t.call(this)},$F=function(i){this._storedError??(this._storedError=Yy(i,this._stream.url));for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null};function UP(i,t=null){const e=process.getBuiltinModule("fs"),{Readable:r}=process.getBuiltinModule("stream"),n=e.createReadStream(i,t);return r.toWeb(n)}class iW extends Gy{constructor(t){super(t,nW,sW);const{url:e}=t;Xr(e.protocol==="file:","PDFNodeStream only supports file:// URLs.")}}class nW extends zy{constructor(t){super(t),ut(this,"_reader",null);const{disableRange:e,disableStream:r,rangeChunkSize:n,url:s}=t._source;this._isStreamingSupported=!r,process.getBuiltinModule("fs/promises").lstat(s).then(A=>{const a=UP(s);this._reader=a.getReader();const{size:o}=A;this._contentLength=o,this._isRangeSupported=!e&&o>2*n,!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new ml("Streaming is disabled.")),this._headersCapability.resolve()}).catch(A=>{A.code==="ENOENT"&&(A=Yy(0,s)),this._headersCapability.reject(A)})}async read(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this._callOnProgress(),{value:$y(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t)}}class sW extends qy{constructor(t,e,r){super(t,e,r),ut(this,"_readCapability",Promise.withResolvers()),ut(this,"_reader",null);const{url:n}=t._source;try{const s=UP(n,{start:e,end:r-1});this._reader=s.getReader(),this._readCapability.resolve()}catch(s){this._readCapability.reject(s)}}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:{value:$y(t),done:!1}}cancel(t){var e;(e=this._reader)==null||e.cancel(t)}}function AW(i){return Gm(i)?zV:nA?iW:tW}var Rv,Hv;class so{static get workerPort(){return c(this,Rv)}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");F(this,Rv,t)}static get workerSrc(){return c(this,Hv)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");F(this,Hv,t)}}Rv=new WeakMap,Hv=new WeakMap,U(so,Rv,null),U(so,Hv,"");var $g,b2;class aW{constructor({parsedData:t,rawData:e}){U(this,$g),U(this,b2),F(this,$g,t),F(this,b2,e)}getRaw(){return c(this,b2)}get(t){return c(this,$g).get(t)??null}[Symbol.iterator](){return c(this,$g).entries()}}$g=new WeakMap,b2=new WeakMap;const Af=Symbol("INTERNAL");var B2,C2,x2,Zg;class oW{constructor(t,{name:e,intent:r,usage:n,rbGroups:s}){U(this,B2,!1),U(this,C2,!1),U(this,x2,!1),U(this,Zg,!0),F(this,B2,!!(t&tA.DISPLAY)),F(this,C2,!!(t&tA.PRINT)),this.name=e,this.intent=r,this.usage=n,this.rbGroups=s}get visible(){if(c(this,x2))return c(this,Zg);if(!c(this,Zg))return!1;const{print:t,view:e}=this.usage;return c(this,B2)?(e==null?void 0:e.viewState)!=="OFF":c(this,C2)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,r=!1){t!==Af&&rr("Internal method `_setVisible` called."),F(this,x2,r),F(this,Zg,e)}}B2=new WeakMap,C2=new WeakMap,x2=new WeakMap,Zg=new WeakMap;var Pc,wr,Jg,tm,Vv,ZF;class lW{constructor(t,e=tA.DISPLAY){if(U(this,Vv),U(this,Pc,null),U(this,wr,new Map),U(this,Jg,null),U(this,tm,null),this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,F(this,tm,t.order);for(const r of t.groups)c(this,wr).set(r.id,new oW(e,r));if(t.baseState==="OFF")for(const r of c(this,wr).values())r._setVisible(Af,!1);for(const r of t.on)c(this,wr).get(r)._setVisible(Af,!0);for(const r of t.off)c(this,wr).get(r)._setVisible(Af,!1);F(this,Jg,this.getHash())}}isVisible(t){if(c(this,wr).size===0)return!0;if(!t)return Ny("Optional content group not defined."),!0;if(t.type==="OCG")return c(this,wr).has(t.id)?c(this,wr).get(t.id).visible:(Me(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return _(this,Vv,ZF).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(const e of t.ids){if(!c(this,wr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(c(this,wr).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const e of t.ids){if(!c(this,wr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(!c(this,wr).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const e of t.ids){if(!c(this,wr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(!c(this,wr).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const e of t.ids){if(!c(this,wr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(c(this,wr).get(e).visible)return!1}return!0}return Me(`Unknown optional content policy ${t.policy}.`),!0}return Me(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,r=!0){var n;const s=c(this,wr).get(t);if(!s){Me(`Optional content group not found: ${t}`);return}if(r&&e&&s.rbGroups.length)for(const A of s.rbGroups)for(const a of A)a!==t&&((n=c(this,wr).get(a))==null||n._setVisible(Af,!1,!0));s._setVisible(Af,!!e,!0),F(this,Pc,null)}setOCGState({state:t,preserveRB:e}){let r;for(const n of t){switch(n){case"ON":case"OFF":case"Toggle":r=n;continue}const s=c(this,wr).get(n);if(s)switch(r){case"ON":this.setVisibility(n,!0,e);break;case"OFF":this.setVisibility(n,!1,e);break;case"Toggle":this.setVisibility(n,!s.visible,e);break}}F(this,Pc,null)}get hasInitialVisibility(){return c(this,Jg)===null||this.getHash()===c(this,Jg)}getOrder(){return c(this,wr).size?c(this,tm)?c(this,tm).slice():[...c(this,wr).keys()]:null}getGroup(t){return c(this,wr).get(t)||null}getHash(){if(c(this,Pc)!==null)return c(this,Pc);const t=new QF;for(const[e,r]of c(this,wr))t.update(`${e}:${r.visible}`);return F(this,Pc,t.hexdigest())}[Symbol.iterator](){return c(this,wr).entries()}}Pc=new WeakMap,wr=new WeakMap,Jg=new WeakMap,tm=new WeakMap,Vv=new WeakSet,ZF=function(i){const t=i.length;if(t<2)return!0;const e=i[0];for(let r=1;r<t;r++){const n=i[r];let s;if(Array.isArray(n))s=_(this,Vv,ZF).call(this,n);else if(c(this,wr).has(n))s=c(this,wr).get(n).visible;else return Me(`Optional content group not found: ${n}`),!0;switch(e){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return e==="And"};var Pi,Xa,Vn,af,Oo,qs,em,rm,F2;class hW{constructor(){U(this,qs),U(this,Pi,null),U(this,Xa,null),U(this,Vn,0),U(this,af,null),U(this,Oo,null)}get pagesNumber(){return c(this,Vn)}set pagesNumber(t){c(this,Vn)!==t&&(F(this,Vn,t),F(this,Pi,null),F(this,Xa,null))}movePages(t,e,r){_(this,qs,em).call(this);const n=c(this,Pi),s=_(this,qs,rm).call(this),A=e.length,a=new Uint32Array(A);let o=0;for(let f=0;f<A;f++){const d=e[f]-1;a[f]=n[d],d<r&&o++}const l=c(this,Vn),h=l-A,u=Mr(r-o,0,h);for(let f=0,d=0;f<l;f++)t.has(f+1)||(n[d++]=n[f]);n.copyWithin(u+A,u,h),n.set(a,u),_(this,qs,F2).call(this,s),n.every((f,d)=>f===d+1)&&F(this,Pi,null)}deletePages(t){_(this,qs,em).call(this);const e=c(this,Pi),r=_(this,qs,rm).call(this);F(this,Oo,{pageNumberToId:e.slice(),pagesNumber:c(this,Vn),prevPageNumbers:c(this,Xa).slice()});const n=c(this,Vn)-t.length;F(this,Vn,n);const s=F(this,Pi,new Uint32Array(n));F(this,Xa,new Int32Array(n));let A=0,a=0;for(const o of t){const l=o-1;l!==A&&(s.set(e.subarray(A,l),a),a+=l-A),A=l+1}A<e.length&&s.set(e.subarray(A),a),_(this,qs,F2).call(this,r,new Set(t))}cancelDelete(){c(this,Oo)&&(F(this,Pi,c(this,Oo).pageNumberToId),F(this,Vn,c(this,Oo).pagesNumber),F(this,Xa,c(this,Oo).prevPageNumbers),F(this,Oo,null))}cleanSavedData(){F(this,Oo,null)}copyPages(t){_(this,qs,em).call(this),F(this,af,{pageNumbers:t,pageIds:t.map(e=>c(this,Pi)[e-1])})}cancelCopy(){F(this,af,null)}pastePages(t){_(this,qs,em).call(this);const e=c(this,Pi),r=_(this,qs,rm).call(this),{pageNumbers:n,pageIds:s}=c(this,af),A=c(this,Vn)+n.length;F(this,Vn,A);const a=F(this,Pi,new Uint32Array(A));F(this,Xa,new Int32Array(A)),a.set(e.subarray(0,t),0),a.set(s,t),a.set(e.subarray(t),t+n.length),_(this,qs,F2).call(this,r,null,t,n),F(this,af,null)}hasBeenAltered(){return c(this,Pi)!==null}getPageMappingForSaving(t=null){t??(t=_(this,qs,rm).call(this));let e=0;for(const n of t.values())e=Math.max(e,n.length);const r=new Array(e);for(let n=0;n<e;n++)r[n]={document:null,pageIndices:[],includePages:[]};for(const[n,s]of t)for(let A=0,a=s.length;A<a;A++)r[A].includePages.push([n-1,s[A]-1]);for(const{includePages:n,pageIndices:s}of r){n.sort((A,a)=>A[0]-a[0]);for(let A=0,a=n.length;A<a;A++)s.push(n[A][1]),n[A]=n[A][0]}return r}extractPages(t){t=Array.from(t).sort((r,n)=>r-n);const e=new Map;for(let r=0,n=t.length;r<n;r++){const s=this.getPageId(t[r]);e.getOrInsertComputed(s,Dy).push(r+1)}return this.getPageMappingForSaving(e)}getPrevPageNumber(t){var e;return((e=c(this,Xa))==null?void 0:e[t-1])??0}getPageNumber(t){if(!c(this,Pi))return t;const e=c(this,Pi);for(let r=0,n=c(this,Vn);r<n;r++)if(e[r]===t)return r+1;return 0}getPageId(t){var e;return((e=c(this,Pi))==null?void 0:e[t-1])??t}getMapping(){var t;return(t=c(this,Pi))==null?void 0:t.subarray(0,this.pagesNumber)}}Pi=new WeakMap,Xa=new WeakMap,Vn=new WeakMap,af=new WeakMap,Oo=new WeakMap,qs=new WeakSet,em=function(){if(c(this,Pi))return;const i=c(this,Vn),t=F(this,Pi,new Uint32Array(i));for(let e=0;e<i;e++)t[e]=e+1;F(this,Xa,new Int32Array(t))},rm=function(){const i=new Map,t=c(this,Pi);for(let e=0,r=c(this,Vn);e<r;e++){const n=t[e],s=i.get(n);s?s.push(e+1):i.set(n,[e+1])}return i},F2=function(i,t=null,e=-1,r=null){const n=c(this,Xa),s=c(this,Pi),A=e+((r==null?void 0:r.length)??0),a=new Map;for(let o=0,l=c(this,Vn);o<l;o++){if(o>=e&&o<A){n[o]=-r[o-e];continue}const h=s[o],u=i.get(h);let f=a.get(h)||0;if(t&&u)for(;f<u.length&&t.has(u[f]);)f++;n[o]=u==null?void 0:u[f],a.set(h,f+1)}};const of=Symbol("INITIAL_DATA"),kU=()=>({...Promise.withResolvers(),data:of});var ea;class IP{constructor(){U(this,ea,new Map)}get(t,e=null){if(e){const n=c(this,ea).getOrInsertComputed(t,kU);return n.promise.then(()=>e(n.data)),null}const r=c(this,ea).get(t);if(!r||r.data===of)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return r.data}has(t){const e=c(this,ea).get(t);return!!e&&e.data!==of}delete(t){const e=c(this,ea).get(t);return!e||e.data===of?!1:(c(this,ea).delete(t),!0)}resolve(t,e=null){const r=c(this,ea).getOrInsertComputed(t,kU);if(r.data!==of)throw new Error(`Object already resolved ${t}.`);r.data=e,r.resolve()}clear(){var t;for(const{data:e}of c(this,ea).values())(t=e==null?void 0:e.bitmap)==null||t.close();c(this,ea).clear()}*[Symbol.iterator](){for(const[t,{data:e}]of c(this,ea))e!==of&&(yield[t,e])}}ea=new WeakMap;const cW=1e5,UU=30;var IU,Dc,ks,S2,E2,im,wu,bh,Wv,jv,lf,k2,nm,vu,a0,Kv,sm,hp,Gv,zv,Am,Of,iw,am,o0,cp,QP,QU,JF,$o,U2,GB,LP,LU;const ra=class hf{constructor({textContentSource:t,images:e,container:r,viewport:n}){U(this,cp),U(this,Dc,Promise.withResolvers()),U(this,ks,null),U(this,S2,!1),U(this,E2,!!((IU=globalThis.FontInspector)!=null&&IU.enabled)),U(this,im,null),U(this,wu,null),U(this,bh,null),U(this,Wv,0),U(this,jv,0),U(this,lf,null),U(this,k2,null),U(this,nm,0),U(this,vu,0),U(this,a0,Object.create(null)),U(this,Kv,[]),U(this,sm,null),U(this,hp,[]),U(this,Gv,new WeakMap),U(this,zv,null);var s;if(t instanceof ReadableStream)F(this,sm,t);else if(typeof t=="object")F(this,sm,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');F(this,ks,F(this,k2,r)),F(this,im,e),F(this,vu,n.scale*pa.pixelRatio),F(this,nm,n.rotation),F(this,bh,{div:null,properties:null,ctx:null});const{pageWidth:A,pageHeight:a,pageX:o,pageY:l}=n.rawDims;F(this,zv,[1,0,0,-1,-o,l+a]),F(this,jv,A),F(this,Wv,a),_(s=hf,$o,LP).call(s),r.style.setProperty("--min-font-size",c(hf,am)),Wh(r,n),c(this,Dc).promise.finally(()=>{c(hf,o0).delete(this),F(this,bh,null),F(this,a0,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=Fi.platform;return ke(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){c(this,im)&&c(this,ks).append(c(this,im).render());const t=()=>{c(this,lf).read().then(({value:e,done:r})=>{if(r){c(this,Dc).resolve();return}c(this,wu)??F(this,wu,e.lang),Object.assign(c(this,a0),e.styles),_(this,cp,QP).call(this,e.items),t()},c(this,Dc).reject)};return F(this,lf,c(this,sm).getReader()),c(hf,o0).add(this),t(),c(this,Dc).promise}update({viewport:t,onBefore:e=null}){var r;const n=t.scale*pa.pixelRatio,s=t.rotation;if(s!==c(this,nm)&&(e==null||e(),F(this,nm,s),Wh(c(this,k2),{rotation:s})),n!==c(this,vu)){e==null||e(),F(this,vu,n);const A={div:null,properties:null,ctx:_(r=hf,$o,U2).call(r,c(this,wu))};for(const a of c(this,hp))A.properties=c(this,Gv).get(a),A.div=a,_(this,cp,JF).call(this,A)}}cancel(){var t;const e=new ml("TextLayer task cancelled.");(t=c(this,lf))==null||t.cancel(e).catch(()=>{}),F(this,lf,null),c(this,Dc).reject(e)}get textDivs(){return c(this,hp)}get textContentItemsStr(){return c(this,Kv)}static cleanup(){if(!(c(this,o0).size>0)){c(this,Am).clear();for(const{canvas:t}of c(this,Of).values())t.remove();c(this,Of).clear()}}};Dc=new WeakMap,ks=new WeakMap,S2=new WeakMap,E2=new WeakMap,im=new WeakMap,wu=new WeakMap,bh=new WeakMap,Wv=new WeakMap,jv=new WeakMap,lf=new WeakMap,k2=new WeakMap,nm=new WeakMap,vu=new WeakMap,a0=new WeakMap,Kv=new WeakMap,sm=new WeakMap,hp=new WeakMap,Gv=new WeakMap,zv=new WeakMap,Am=new WeakMap,Of=new WeakMap,iw=new WeakMap,am=new WeakMap,o0=new WeakMap,cp=new WeakSet,QP=function(i){var t,e;if(c(this,S2))return;(e=c(this,bh)).ctx??(e.ctx=_(t=ra,$o,U2).call(t,c(this,wu)));const r=c(this,hp),n=c(this,Kv);for(const s of i){if(r.length>cW){Me("Ignoring additional textDivs for performance reasons."),F(this,S2,!0);return}if(s.str===void 0){if(s.type==="beginMarkedContentProps"||s.type==="beginMarkedContent"){const A=c(this,ks);F(this,ks,document.createElement("span")),c(this,ks).classList.add("markedContent"),s.id&&c(this,ks).setAttribute("id",`${s.id}`),s.tag==="Artifact"&&(c(this,ks).ariaHidden=!0),A.append(c(this,ks))}else s.type==="endMarkedContent"&&F(this,ks,c(this,ks).parentNode);continue}n.push(s.str),_(this,cp,QU).call(this,s)}},QU=function(i){var t;const e=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:i.str!=="",hasEOL:i.hasEOL,fontSize:0};c(this,hp).push(e);const n=Nt.transform(c(this,zv),i.transform);let s=Math.atan2(n[1],n[0]);const A=c(this,a0)[i.fontName];A.vertical&&(s+=Math.PI/2);let a=c(this,E2)&&A.fontSubstitution||A.fontFamily;a=ra.fontFamilyMap.get(a)||a;const o=Math.hypot(n[2],n[3]),l=o*_(t=ra,$o,LU).call(t,a,A,c(this,wu));let h,u;s===0?(h=n[4],u=n[5]-l):(h=n[4]+l*Math.sin(s),u=n[5]-l*Math.cos(s));const f=e.style;f.left=`${(100*h/c(this,jv)).toFixed(2)}%`,f.top=`${(100*u/c(this,Wv)).toFixed(2)}%`,f.setProperty("--font-height",`${o.toFixed(2)}px`),f.fontFamily=a,r.fontSize=o,e.setAttribute("role","presentation"),e.textContent=i.str,e.dir=i.dir,c(this,E2)&&(e.dataset.fontName=A.fontSubstitutionLoadedName||i.fontName),s!==0&&(r.angle=s*(180/Math.PI));let d=!1;if(i.str.length>1)d=!0;else if(i.str!==" "&&i.transform[0]!==i.transform[3]){const g=Math.abs(i.transform[0]),m=Math.abs(i.transform[3]);g!==m&&Math.max(g,m)/Math.min(g,m)>1.5&&(d=!0)}if(d&&(r.canvasWidth=A.vertical?i.height:i.width),c(this,Gv).set(e,r),c(this,bh).div=e,c(this,bh).properties=r,_(this,cp,JF).call(this,c(this,bh)),r.hasText&&c(this,ks).append(e),r.hasEOL){const g=document.createElement("br");g.setAttribute("role","presentation"),c(this,ks).append(g)}},JF=function(i){var t;const{div:e,properties:r,ctx:n}=i,{style:s}=e;if(r.canvasWidth!==0&&r.hasText){const{fontFamily:A}=s,{canvasWidth:a,fontSize:o}=r;_(t=ra,$o,GB).call(t,n,o*c(this,vu),A);const{width:l}=n.measureText(e.textContent);l>0&&s.setProperty("--scale-x",a*c(this,vu)/l)}r.angle!==0&&s.setProperty("--rotate",`${r.angle}deg`)},$o=new WeakSet,U2=function(i=null){let t=c(this,Of).get(i||(i=""));if(!t){const e=document.createElement("canvas");e.className="hiddenCanvasElement",e.lang=i,document.body.append(e),t=e.getContext("2d",{alpha:!1,willReadFrequently:!0}),c(this,Of).set(i,t),c(this,iw).set(t,{size:0,family:""})}return t},GB=function(i,t,e){const r=c(this,iw).get(i);t===r.size&&e===r.family||(i.font=`${t}px ${e}`,r.size=t,r.family=e)},LP=function(){if(c(this,am)!==null)return;const i=document.createElement("div");i.style.opacity=0,i.style.lineHeight=1,i.style.fontSize="1px",i.style.position="absolute",i.textContent="X",document.body.append(i),F(this,am,i.getBoundingClientRect().height),i.remove()},LU=function(i,t,e){const r=c(this,Am).get(i);if(r)return r;const n=_(this,$o,U2).call(this,e);n.canvas.width=n.canvas.height=UU,_(this,$o,GB).call(this,n,UU,i);const s=n.measureText(""),A=s.fontBoundingBoxAscent,a=Math.abs(s.fontBoundingBoxDescent);n.canvas.width=n.canvas.height=0;let o=.8;return A?o=A/(A+a):(Fi.platform.isFirefox&&Me("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),t.ascent?o=t.ascent:t.descent&&(o=1+t.descent)),c(this,Am).set(i,o),o},U(ra,$o),U(ra,Am,new Map),U(ra,Of,new Map),U(ra,iw,new WeakMap),U(ra,am,null),U(ra,o0,new Set);let qv=ra;const uW=100;function KS(i={}){typeof i=="string"||i instanceof URL?i={url:i}:(i instanceof ArrayBuffer||ArrayBuffer.isView(i))&&(i={data:i});const t=new dW,{docId:e}=t,r=i.url?wV(i.url):null,n=i.data?vV(i.data):null,s=i.httpHeaders||null,A=i.withCredentials===!0,a=i.password??null,o=i.range instanceof GS?i.range:null,l=Number.isInteger(i.rangeChunkSize)&&i.rangeChunkSize>0?i.rangeChunkSize:2**16;let h=i.worker instanceof Yv?i.worker:null;const u=i.verbosity,f=typeof i.docBaseUrl=="string"&&!Y0(i.docBaseUrl)?i.docBaseUrl:null,d=Z1(i.cMapUrl),g=i.cMapPacked!==!1,m=Z1(i.iccUrl),y=Z1(i.standardFontDataUrl),w=Z1(i.wasmUrl),b=i.stopAtErrors!==!0,C=Number.isInteger(i.maxImageSize)&&i.maxImageSize>-1?i.maxImageSize:-1,S=typeof i.isOffscreenCanvasSupported=="boolean"?i.isOffscreenCanvasSupported:!nA,k=typeof i.isImageDecoderSupported=="boolean"?i.isImageDecoderSupported:!nA&&(Fi.platform.isFirefox||!globalThis.chrome),I=Number.isInteger(i.canvasMaxAreaInBytes)?i.canvasMaxAreaInBytes:-1,N=typeof i.disableFontFace=="boolean"?i.disableFontFace:nA,D=i.fontExtraProperties===!0,Q=i.enableXfa===!0,K=i.ownerDocument||globalThis.document,L=i.disableRange===!0,O=i.disableStream===!0,W=i.disableAutoFetch===!0,R=i.pdfBug===!0,tt=i.CanvasFactory||(nA?SV:BV),et=i.FilterFactory||(nA?FV:CV),st=i.BinaryDataFactory||(nA?EV:wU),nt=i.enableHWA===!0,at=i.enableWebGPU===!0?IV():Promise.resolve(!1),ft=i.useWasm!==!1,ht=i.pagesMapper||new hW,M=typeof i.useSystemFonts=="boolean"?i.useSystemFonts:!nA&&!N,G=typeof i.useWorkerFetch=="boolean"?i.useWorkerFetch:!!(st===wU&&d&&g&&y&&w&&Gm(d,document.baseURI)&&Gm(y,document.baseURI)&&Gm(w,document.baseURI)),X=null;V9(u);const rt={canvasFactory:new tt({ownerDocument:K,enableHWA:nt}),filterFactory:new et({docId:e,ownerDocument:K}),binaryDataFactory:G?null:new st({cMapUrl:d,standardFontDataUrl:y,wasmUrl:w})};h||(h=Yv.create({verbosity:u,port:so.workerPort}),t._worker=h);const it={docId:e,apiVersion:"5.7.284",data:n,password:a,disableAutoFetch:W,rangeChunkSize:l,docBaseUrl:f,enableXfa:Q,evaluatorOptions:{maxImageSize:C,disableFontFace:N,ignoreErrors:b,isOffscreenCanvasSupported:S,isImageDecoderSupported:k,canvasMaxAreaInBytes:I,fontExtraProperties:D,useSystemFonts:M,useWasm:ft,useWorkerFetch:G,cMapUrl:d,cMapPacked:g,iccUrl:m,standardFontDataUrl:y,wasmUrl:w,hasGPU:!1}},ot={ownerDocument:K,pdfBug:R,styleElement:X,enableHWA:nt,loadingParams:{disableAutoFetch:W,enableXfa:Q}};return Promise.all([h.promise,at]).then(function([,gt]){if(t.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");it.evaluatorOptions.hasGPU=gt;const vt=h.messageHandler.sendWithPromise("GetDocRequest",it,n?[n.buffer]:null);let yt;if(!n)if(o)yt=new YV({pdfDataRangeTransport:o,disableRange:L,disableStream:O});else if(r){const St=AW(r);yt=new St({url:r,httpHeaders:s,withCredentials:A,rangeChunkSize:l,disableRange:L,disableStream:O})}else throw new Error("getDocument - expected either `data`, `range`, or `url` parameter.");return vt.then(St=>{if(t.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");const Dt=new zg(e,St,h.port),Tt=new mW(Dt,t,yt,ot,rt,ht);t._transport=Tt,Dt.send("Ready",null)})}).catch(t._capability.reject),t}var t4;const _P=class MP{constructor(){ut(this,"_capability",Promise.withResolvers()),ut(this,"_transport",null),ut(this,"_worker",null),ut(this,"docId",`d${$i(MP,t4)._++}`),ut(this,"destroyed",!1),ut(this,"onPassword",null),ut(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var t,e,r,n;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),await((e=this._transport)==null?void 0:e.destroy())}catch(s){throw(r=this._worker)!=null&&r.port&&delete this._worker._pendingDestroy,s}this._transport=null,(n=this._worker)==null||n.destroy(),this._worker=null}async getData(){return this._transport.getData()}};t4=new WeakMap,U(_P,t4,0);let dW=_P;var om,cf;class GS{constructor(t,e,r=!1,n=null){U(this,om,Promise.withResolvers()),U(this,cf,null),this.length=t,this.initialData=e,this.progressiveDone=r,this.contentDispositionFilename=n,Object.defineProperty(this,"onDataProgress",{value:()=>{Y9("`PDFDataRangeTransport.prototype.onDataProgress` - method was removed, since loading progress is now reported automatically through the `PDFDataTransportStream` class (and related code).")}})}onDataRange(t,e){c(this,cf).call(this,{type:"range",begin:t,chunk:e})}onDataProgressiveRead(t){c(this,om).promise.then(()=>{c(this,cf).call(this,{type:"progressiveRead",chunk:t})})}onDataProgressiveDone(){c(this,om).promise.then(()=>{c(this,cf).call(this,{type:"progressiveDone"})})}transportReady(t){F(this,cf,t),c(this,om).resolve()}requestDataRange(t,e){rr("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}om=new WeakMap,cf=new WeakMap;class fW{constructor(t,e){this._pdfInfo=t,this._transport=e}get pagesMapper(){return this._transport.pagesMapper}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return ke(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(t,e){return this._transport.getAnnotationsByType(t,e)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}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()}extractPages(t){return this._transport.extractPages(t)}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getRawData(t){return this._transport.getRawData(t)}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}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()}}var Bh,uf,df,lm;const pW=class TP{constructor(t,e,r,n,s=!1){U(this,df),U(this,Bh,!1),U(this,uf,null),this._pageIndex=t,this._pageInfo=e,this._transport=r,this._stats=s?new $k:null,this._pdfBug=s,this.commonObjs=r.commonObjs,this.objs=new IP,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null,F(this,uf,n),this.imageCoordinates=null}clone(t){const e=new TP(t,this._pageInfo,this._transport,c(this,uf),this._pdfBug);return e.clonedFromIndex=this.clonedFromIndex??this._pageIndex,this._transport.updatePage(e),e}get pageNumber(){return this._pageIndex+1}set pageNumber(t){this._pageIndex=t-1,this._transport.updatePage(this)}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:r=0,offsetY:n=0,dontFlip:s=!1}={}){return new X0({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:r,offsetY:n,dontFlip:s})}getAnnotations({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return ke(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null}render({canvasContext:t,canvas:e=t.canvas,viewport:r,intent:n="display",annotationMode:s=ll.ENABLE,transform:A=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:h=null,printAnnotationStorage:u=null,isEditing:f=!1,recordImages:d=!1,recordOperations:g=!1,operationsFilter:m=null}){var y,w,b;(y=this._stats)==null||y.time("Overall");const C=this._transport.getRenderingIntent(n,s,u,f),{renderingIntent:S,cacheKey:k}=C;F(this,Bh,!1),o||(o=this._transport.getOptionalContentConfig(S));const I=this._intentStates.getOrInsertComputed(k,Sv);I.streamReaderCancelTimeout&&(clearTimeout(I.streamReaderCancelTimeout),I.streamReaderCancelTimeout=null);const N=!!(S&tA.PRINT);I.displayReadyCapability||(I.displayReadyCapability=Promise.withResolvers(),I.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(w=this._stats)==null||w.time("Page Request"),this._pumpOperatorList(C));const D=!!(this._pdfBug&&(b=globalThis.StepperManager)!=null&&b.enabled),Q=!!e&&!this.recordedBBoxes&&(g||D),K=!!e&&!this.imageCoordinates&&d,L=et=>{var st,nt,at,ft;if(I.renderTasks.delete(R),Q){const ht=(st=R.gfx)==null?void 0:st.dependencyTracker.take();ht&&((nt=R.stepper)==null||nt.setOperatorBBoxes(ht,R.gfx.dependencyTracker.takeDebugMetadata()),g&&(this.recordedBBoxes=ht))}K&&!et&&(this.imageCoordinates=(at=R.gfx)==null?void 0:at.imagesTracker.take()),N&&F(this,Bh,!0),_(this,df,lm).call(this),et?(R.capability.reject(et),this._abortOperatorList({intentState:I,reason:et instanceof Error?et:new Error(et)})):R.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(ft=globalThis.Stats)!=null&&ft.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))};let O=null,W=null;(Q||K)&&(W=new aV(e,I.operatorList.length)),Q&&(O=new oV(W,D));const R=new vW({callback:L,params:{canvas:e,canvasContext:t,dependencyTracker:O??W,imagesTracker:K?new hV(e):null,viewport:r,transform:A,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:I.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!N,pdfBug:this._pdfBug,pageColors:h,enableHWA:this._transport.enableHWA,operationsFilter:m});(I.renderTasks||(I.renderTasks=new Set)).add(R);const tt=R.task;return Promise.all([I.displayReadyCapability.promise,o]).then(([et,st])=>{var nt;if(this.destroyed){L();return}if((nt=this._stats)==null||nt.time("Rendering"),!(st.renderingIntent&S))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");R.initializeGraphics({transparency:et,optionalContentConfig:st}),R.operatorListChanged()}).catch(L),tt}getOperatorList({intent:t="display",annotationMode:e=ll.ENABLE,printAnnotationStorage:r=null,isEditing:n=!1}={}){var s;function A(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(l))}const a=this._transport.getRenderingIntent(t,e,r,n,!0),o=this._intentStates.getOrInsertComputed(a.cacheKey,Sv);let l;return o.opListReadCapability||(l=Object.create(null),l.operatorListChanged=A,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||(o.renderTasks=new Set)).add(l),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(s=this._stats)==null||s.time("Page Request"),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageId:c(this,uf).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(r){return r.items.length}})}async getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(n=>T0.textContent(n));const e=this.streamTextContent(t),r={items:[],styles:Object.create(null),lang:null};for await(const n of e)r.lang??(r.lang=n.lang),Object.assign(r.styles,n.styles),r.items.push(...n.items);return r}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const r of e.renderTasks)t.push(r.completed),r.cancel();return this.objs.clear(),F(this,Bh,!1),Promise.all(t)}cleanup(t=!1){F(this,Bh,!0);const e=_(this,df,lm).call(this);return t&&e&&this._stats&&(this._stats=new $k),e}_startRenderPage(t,e){var r,n;const s=this._intentStates.get(e);s&&((r=this._stats)==null||r.timeEnd("Page Request"),(n=s.displayReadyCapability)==null||n.resolve(t))}_renderPageChunk(t,e){for(let r=0,n=t.length;r<n;r++)e.operatorList.fnArray.push(t.fnArray[r]),e.operatorList.argsArray.push(t.argsArray[r]);e.operatorList.lastChunk=t.lastChunk,e.operatorList.separateAnnots=t.separateAnnots;for(const r of e.renderTasks)r.operatorListChanged();t.lastChunk&&_(this,df,lm).call(this)}_pumpOperatorList({renderingIntent:t,cacheKey:e,annotationStorageSerializable:r,modifiedIds:n}){const{map:s,transfer:A}=r,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageId:c(this,uf).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,intent:t,cacheKey:e,annotationStorage:s,modifiedIds:n},void 0,A).getReader(),o=this._intentStates.get(e);o.streamReader=a;const l=()=>{a.read().then(({value:h,done:u})=>{if(u){o.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(h,o),l())},h=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const u of o.renderTasks)u.operatorListChanged();_(this,df,lm).call(this)}if(o.displayReadyCapability)o.displayReadyCapability.reject(h);else if(o.opListReadCapability)o.opListReadCapability.reject(h);else throw h}})};l()}_abortOperatorList({intentState:t,reason:e,force:r=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!r){if(t.renderTasks.size>0)return;if(e instanceof Hy){let n=uW;e.extraDelay>0&&e.extraDelay<1e3&&(n+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},n);return}}if(t.streamReader.cancel(new ml(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[n,s]of this._intentStates)if(s===t){this._intentStates.delete(n);break}this.cleanup()}}}get stats(){return this._stats}};Bh=new WeakMap,uf=new WeakMap,df=new WeakSet,lm=function(){if(!c(this,Bh)||this.destroyed)return!1;for(const{renderTasks:i,operatorList:t}of this._intentStates.values())if(i.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),F(this,Bh,!1),!0};let gW=pW;var cu,to,Qh,up,zB,wd,Rf,oa,nw,NP,PP,rg,l0,Xv;const hn=class hm{constructor({name:t=null,port:e=null,verbosity:r=W9()}={}){if(U(this,oa),U(this,cu,Promise.withResolvers()),U(this,to,null),U(this,Qh,null),U(this,up,null),this.name=t,this.destroyed=!1,this.verbosity=r,e){if(c(hm,Rf).has(e))throw new Error("Cannot use more than one PDFWorker per port.");c(hm,Rf).set(e,this),_(this,oa,NP).call(this,e)}else _(this,oa,PP).call(this)}get promise(){return c(this,cu).promise}get port(){return c(this,Qh)}get messageHandler(){return c(this,to)}destroy(){var t,e;this.destroyed=!0,(t=c(this,up))==null||t.terminate(),F(this,up,null),c(hm,Rf).delete(c(this,Qh)),F(this,Qh,null),(e=c(this,to))==null||e.destroy(),F(this,to,null)}static create(t){const e=c(this,Rf).get(t==null?void 0:t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new hm(t)}static get workerSrc(){if(so.workerSrc)return so.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return ke(this,"_setupFakeWorkerGlobal",(async()=>c(this,l0,Xv)?c(this,l0,Xv):(await import(this.workerSrc)).WorkerMessageHandler)())}};cu=new WeakMap,to=new WeakMap,Qh=new WeakMap,up=new WeakMap,zB=new WeakMap,wd=new WeakMap,Rf=new WeakMap,oa=new WeakSet,nw=function(){c(this,cu).resolve(),c(this,to).send("configure",{verbosity:this.verbosity})},NP=function(i){F(this,Qh,i),F(this,to,new zg("main","worker",i)),c(this,to).on("ready",()=>{}),_(this,oa,nw).call(this)},PP=function(){if(c(hn,wd)||c(hn,l0,Xv)){_(this,oa,rg).call(this);return}let{workerSrc:i}=hn;try{hn._isSameOrigin(window.location,i)||(i=hn._createCDNWrapper(new URL(i,window.location).href));const t=new Worker(i,{type:"module"}),e=new zg("main","worker",t),r=()=>{n.abort(),e.destroy(),t.terminate(),this.destroyed?c(this,cu).reject(new Error("Worker was destroyed")):_(this,oa,rg).call(this)},n=new AbortController;t.addEventListener("error",()=>{c(this,up)||r()},{signal:n.signal}),e.on("test",A=>{if(n.abort(),this.destroyed||!A){r();return}F(this,to,e),F(this,Qh,t),F(this,up,t),_(this,oa,nw).call(this)}),e.on("ready",A=>{if(n.abort(),this.destroyed){r();return}try{s()}catch{_(this,oa,rg).call(this)}});const s=()=>{const A=new Uint8Array;e.send("test",A,[A.buffer])};s();return}catch{Ny("The worker has been disabled.")}_(this,oa,rg).call(this)},rg=function(){c(hn,wd)||(Me("Setting up fake worker."),F(hn,wd,!0)),hn._setupFakeWorkerGlobal.then(i=>{if(this.destroyed){c(this,cu).reject(new Error("Worker was destroyed"));return}const t=new bV;F(this,Qh,t);const e=`fake${$i(hn,zB)._++}`,r=new zg(e+"_worker",e,t);i.setup(r,t),F(this,to,new zg(e,e+"_worker",t)),_(this,oa,nw).call(this)}).catch(i=>{c(this,cu).reject(new Error(`Setting up fake worker failed: "${i.message}".`))})},l0=new WeakSet,Xv=function(){var i;try{return((i=globalThis.pdfjsWorker)==null?void 0:i.WorkerMessageHandler)||null}catch{return null}},U(hn,l0),U(hn,zB,0),U(hn,wd,!1),U(hn,Rf,new WeakMap),nA&&(F(hn,wd,!0),so.workerSrc||(so.workerSrc="./pdf.worker.mjs")),hn._isSameOrigin=(i,t)=>{const e=URL.parse(i);if(!(e!=null&&e.origin)||e.origin==="null")return!1;const r=new URL(t,e);return e.origin===r.origin},hn._createCDNWrapper=i=>{const t=`await import("${i}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let Yv=hn;var gA,Hf,Jl,Oa,ff,cm,th,Ro,um,I2;class mW{constructor(t,e,r,n,s,A){U(this,Ro),ut(this,"downloadInfoCapability",Promise.withResolvers()),U(this,gA,null),U(this,Hf,new Map),U(this,Jl,null),U(this,Oa,new Map),U(this,ff,new Map),U(this,cm,new Map),U(this,th,null),this.messageHandler=t,this.loadingTask=e,F(this,Jl,r),this.commonObjs=new IP,this.fontLoader=new cV({ownerDocument:n.ownerDocument,styleElement:n.styleElement}),this.enableHWA=n.enableHWA,this.loadingParams=n.loadingParams,this._params=n,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.binaryDataFactory=s.binaryDataFactory,this.pagesMapper=A,this.destroyed=!1,this.destroyCapability=null,this.setupMessageHandler()}updatePage(t){const{_pageIndex:e}=t;c(this,Oa).set(e,t),c(this,ff).set(e,Promise.resolve(t))}get annotationStorage(){return ke(this,"annotationStorage",new WS)}getRenderingIntent(t,e=ll.ENABLE,r=null,n=!1,s=!1){let A=tA.DISPLAY,a=P0;switch(t){case"any":A=tA.ANY;break;case"display":break;case"print":A=tA.PRINT;break;default:Me(`getRenderingIntent - invalid intent: ${t}`)}const o=A&tA.PRINT&&r instanceof $N?r:this.annotationStorage;switch(e){case ll.DISABLE:A+=tA.ANNOTATIONS_DISABLE;break;case ll.ENABLE:break;case ll.ENABLE_FORMS:A+=tA.ANNOTATIONS_FORMS;break;case ll.ENABLE_STORAGE:A+=tA.ANNOTATIONS_STORAGE,a=o.serializable;break;default:Me(`getRenderingIntent - invalid annotationMode: ${e}`)}n&&(A+=tA.IS_EDITING),s&&(A+=tA.OPLIST);const{ids:l,hash:h}=o.modifiedIds,u=[A,a.hash,h];return{renderingIntent:A,cacheKey:u.join("_"),annotationStorageSerializable:a,modifiedIds:l}}destroy(){var t;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(t=c(this,th))==null||t.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const n of c(this,Oa).values())e.push(n._destroy());c(this,Oa).clear(),c(this,ff).clear(),c(this,cm).clear(),Object.hasOwn(this,"annotationStorage")&&this.annotationStorage.resetModified();const r=this.messageHandler.sendWithPromise("Terminate",null);return e.push(r),Promise.all(e).then(()=>{var n,s;this.commonObjs.clear(),this.fontLoader.clear(),c(this,Hf).clear(),this.filterFactory.destroy(),qv.cleanup(),(n=c(this,Jl))==null||n.cancelAllRequests(new ml("Worker was terminated.")),(s=this.messageHandler)==null||s.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(r,n)=>{Xr(c(this,Jl),"GetReader - no `BasePDFStream` instance available."),F(this,gA,c(this,Jl).getFullReader()),c(this,gA).onProgress=s=>_(this,Ro,I2).call(this,s),n.onPull=()=>{c(this,gA).read().then(function({value:s,done:A}){if(A){n.close();return}Xr(s instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(s),1,[s])}).catch(s=>{n.error(s)})},n.onCancel=s=>{c(this,gA).cancel(s),n.ready.catch(A=>{if(!this.destroyed)throw A})}}),t.on("ReaderHeadersReady",async r=>{await c(this,gA).headersReady;const{isStreamingSupported:n,isRangeSupported:s,contentLength:A}=c(this,gA);return n&&s&&(c(this,gA).onProgress=null),{isStreamingSupported:n,isRangeSupported:s,contentLength:A}}),t.on("GetRangeReader",(r,n)=>{Xr(c(this,Jl),"GetRangeReader - no `BasePDFStream` instance available.");const s=c(this,Jl).getRangeReader(r.begin,r.end);if(!s){n.close();return}n.onPull=()=>{s.read().then(function({value:A,done:a}){if(a){n.close();return}Xr(A instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(A),1,[A])}).catch(A=>{n.error(A)})},n.onCancel=A=>{s.cancel(A),n.ready.catch(a=>{if(!this.destroyed)throw a})}}),t.on("GetDoc",({pdfInfo:r})=>{this.pagesMapper.pagesNumber=r.numPages,this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,e._capability.resolve(new fW(r,this))}),t.on("DocException",r=>{e._capability.reject(Es(r))}),t.on("PasswordRequest",r=>{F(this,th,Promise.withResolvers());try{if(!e.onPassword)throw Es(r);const n=s=>{s instanceof Error?c(this,th).reject(s):c(this,th).resolve({password:s})};e.onPassword(n,r.code)}catch(n){c(this,th).reject(n)}return c(this,th).promise}),t.on("DataLoaded",r=>{_(this,Ro,I2).call(this,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),t.on("StartRenderPage",r=>{this.destroyed||c(this,Oa).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),t.on("commonobj",([r,n,s])=>{var A;if(this.destroyed||this.commonObjs.has(r))return null;switch(n){case"Font":if("error"in s){const f=s.error;Me(`Error during font loading: ${f}`),this.commonObjs.resolve(r,f);break}const a=new pV(s),o=this._params.pdfBug&&(A=globalThis.FontInspector)!=null&&A.enabled?(f,d)=>globalThis.FontInspector.fontAdded(f,d):null,l=new uV(a,o,s.charProcOperatorList,s.extra);this.fontLoader.bind(l).catch(()=>t.sendWithPromise("FontFallback",{id:r})).finally(()=>{l.fontExtraProperties||l.clearData(),this.commonObjs.resolve(r,l)});break;case"CopyLocalImage":const{imageRef:h}=s;Xr(h,"The imageRef must be defined.");for(const f of c(this,Oa).values())for(const[,d]of f.objs){if((d==null?void 0:d.ref)!==h)continue;if(!d.dataLen)return null;const g=structuredClone(d);return this.commonObjs.resolve(r,g),d.dataLen}break;case"FontPath":this.commonObjs.resolve(r,new mV(s));break;case"Image":this.commonObjs.resolve(r,s);break;case"Pattern":const u=new gV(s);this.commonObjs.resolve(r,u.getIR());break;default:throw new Error(`Got unknown common object type ${n}`)}return null}),t.on("obj",([r,n,s,A])=>{var a;if(this.destroyed)return;const o=c(this,Oa).get(n);if(!o.objs.has(r)){if(o._intentStates.size===0){(a=A==null?void 0:A.bitmap)==null||a.close();return}switch(s){case"Image":case"Pattern":o.objs.resolve(r,A);break;default:throw new Error(`Got unknown object type ${s}`)}}}),t.on("DocProgress",r=>{this.destroyed||_(this,Ro,I2).call(this,r)}),t.on("FetchBinaryData",async r=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.binaryDataFactory)throw new Error("`BinaryDataFactory` not initialized, see the `useWorkerFetch` parameter.");return this.binaryDataFactory.fetch(r)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var t;this.annotationStorage.size<=0&&Me("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:r}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:((t=c(this,gA))==null?void 0:t.filename)??null},r).finally(()=>{this.annotationStorage.resetModified()})}extractPages(t){const e={pageInfos:t};let r;if(this.annotationStorage.size>0){const{map:n,transfer:s}=this.annotationStorage.serializable;e.annotationStorage=n,r=s}return this.messageHandler.sendWithPromise("ExtractPages",e,r).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this.pagesMapper.pagesNumber)return Promise.reject(new Error("Invalid page request."));const e=t-1,r=this.pagesMapper.getPageId(t)-1,n=c(this,ff).get(e);if(n)return n;const s=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(A=>{if(this.destroyed)throw new Error("Transport destroyed");A.refStr&&c(this,cm).set(A.refStr,r);const a=new gW(e,A,this,this.pagesMapper,this._params.pdfBug);return c(this,Oa).set(e,a),a});return c(this,ff).set(e,s),s}async getPageIndex(t){if(!RF(t))throw new Error("Invalid pageIndex request.");const e=await this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}),r=this.pagesMapper.getPageNumber(e+1);if(r===0)throw new Error("GetPageIndex: page has been removed.");return r-1}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:this.pagesMapper.getPageId(t+1)-1,intent:e})}getFieldObjects(){return _(this,Ro,um).call(this,"GetFieldObjects")}hasJSActions(){return _(this,Ro,um).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(t,e){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:t,pageIndexesToSkip:e})}getDocJSActions(){return _(this,Ro,um).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:this.pagesMapper.getPageId(t+1)-1})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:this.pagesMapper.getPageId(t+1)-1})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return _(this,Ro,um).call(this,"GetOptionalContentConfig").then(e=>new lW(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata";return c(this,Hf).getOrInsertComputed(t,()=>this.messageHandler.sendWithPromise(t,null).then(e=>{var r,n;return{info:e[0],metadata:e[1]?new aW(e[1]):null,contentDispositionFilename:((r=c(this,gA))==null?void 0:r.filename)??null,contentLength:((n=c(this,gA))==null?void 0:n.contentLength)??null,hasStructTree:e[2]}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}getRawData(t){return this.messageHandler.sendWithPromise("GetRawData",t)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of c(this,Oa).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),c(this,Hf).clear(),this.filterFactory.destroy(!0),qv.cleanup()}}cachedPageNumber(t){if(!RF(t))return null;const e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`,r=c(this,cm).get(e);if(r>=0){const n=this.pagesMapper.getPageNumber(r+1);if(n!==0)return n}return null}}gA=new WeakMap,Hf=new WeakMap,Jl=new WeakMap,Oa=new WeakMap,ff=new WeakMap,cm=new WeakMap,th=new WeakMap,Ro=new WeakSet,um=function(i,t=null){return c(this,Hf).getOrInsertComputed(i,()=>this.messageHandler.sendWithPromise(i,t))},I2=function({loaded:i,total:t}){var e,r;(r=(e=this.loadingTask).onProgress)==null||r.call(e,{loaded:i,total:t,percent:t?Mr(Math.round(i/t*100),0,100):NaN})};class wW{constructor(t){ut(this,"_internalRenderTask",null),ut(this,"onContinue",null),ut(this,"onError",null),this._internalRenderTask=t}get promise(){return this._internalRenderTask.capability.promise}cancel(t=0){this._internalRenderTask.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this._internalRenderTask.operatorList;if(!t)return!1;const{annotationCanvasMap:e}=this._internalRenderTask;return t.form||t.canvas&&(e==null?void 0:e.size)>0}get imageCoordinates(){return this._internalRenderTask.imageCoordinates||null}}var Oc,Vf;const DP=class dm{constructor({callback:t,params:e,objs:r,commonObjs:n,annotationCanvasMap:s,operatorList:A,pageIndex:a,canvasFactory:o,filterFactory:l,useRequestAnimationFrame:h=!1,pdfBug:u=!1,pageColors:f=null,enableHWA:d=!1,operationsFilter:g=null}){U(this,Oc,null),this.callback=t,this.params=e,this.objs=r,this.commonObjs=n,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=A,this._pageIndex=a,this.canvasFactory=o,this.filterFactory=l,this._pdfBug=u,this.pageColors=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=h===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new wW(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=e.canvas,this._canvasContext=e.canvas?null:e.canvasContext,this._enableHWA=d,this._dependencyTracker=e.dependencyTracker,this._imagesTracker=e.imagesTracker,this._operationsFilter=g}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var r,n;if(this.cancelled)return;if(this._canvas){if(c(dm,Vf).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.");c(dm,Vf).add(this._canvas)}this._pdfBug&&(r=globalThis.StepperManager)!=null&&r.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:s,transform:A,background:a,dependencyTracker:o,imagesTracker:l}=this.params,h=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new p2(h,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors,o,l),this.gfx.beginDrawing({transform:A,viewport:s,transparency:t,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,(n=this.graphicsReadyCallback)==null||n.call(this)}cancel(t=null,e=0){var r,n,s;this.running=!1,this.cancelled=!0,(r=this.gfx)==null||r.endDrawing(),c(this,Oc)&&(window.cancelAnimationFrame(c(this,Oc)),F(this,Oc,null)),c(dm,Vf).delete(this._canvas),t||(t=new Hy(`Rendering cancelled, page ${this._pageIndex+1}`,e)),this.callback(t),(s=(n=this.task).onError)==null||s.call(n,t)}operatorListChanged(){var t,e;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.gfx.dependencyTracker)==null||t.growOperationsCount(this.operatorList.fnArray.length),(e=this.stepper)==null||e.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?F(this,Oc,window.requestAnimationFrame(()=>{F(this,Oc,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),c(dm,Vf).delete(this._canvas),this.callback())))}};Oc=new WeakMap,Vf=new WeakMap,U(DP,Vf,new WeakSet);let vW=DP;const OP="5.7.284",RP="7e5b36c2d";var BA,pf,h0,en,$v,fm,Ch,Zv,yu,eo,c0,ii,e4,r4,i4,Rc,_U,dh;const Q2=class Ho{constructor({editor:t=null,uiManager:e=null}){U(this,ii),U(this,BA,null),U(this,pf,null),U(this,h0),U(this,en,null),U(this,$v,!1),U(this,fm,!1),U(this,Ch,null),U(this,Zv),U(this,yu,null),U(this,eo,null);var r,n;t?(F(this,fm,!1),F(this,Ch,t)):F(this,fm,!0),F(this,eo,(t==null?void 0:t._uiManager)||e),F(this,Zv,c(this,eo)._eventBus),F(this,h0,((r=t==null?void 0:t.color)==null?void 0:r.toUpperCase())||((n=c(this,eo))==null?void 0:n.highlightColors.values().next().value)||"#FFFF98"),c(Ho,c0)||F(Ho,c0,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return ke(this,"_keyboardManager",new $0([[["Escape","mac+Escape"],Ho.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Ho.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Ho.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Ho.prototype._moveToPrevious],[["Home","mac+Home"],Ho.prototype._moveToBeginning],[["End","mac+End"],Ho.prototype._moveToEnd]]))}renderButton(){const t=F(this,BA,document.createElement("button"));t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",c(this,Ch)&&(t.ariaControls=`${c(this,Ch).id}_colorpicker_dropdown`);const e=c(this,eo)._signal;t.addEventListener("click",_(this,ii,Rc).bind(this),{signal:e}),t.addEventListener("keydown",_(this,ii,i4).bind(this),{signal:e});const r=F(this,pf,document.createElement("span"));return r.className="swatch",r.ariaHidden="true",r.style.backgroundColor=c(this,h0),t.append(r),t}renderMainDropdown(){const t=F(this,en,_(this,ii,e4).call(this));return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}_colorSelectFromKeyboard(t){if(t.target===c(this,BA)){_(this,ii,Rc).call(this,t);return}const e=t.target.getAttribute("data-color");e&&_(this,ii,r4).call(this,e,t)}_moveToNext(t){var e,r;if(!c(this,ii,dh)){_(this,ii,Rc).call(this,t);return}if(t.target===c(this,BA)){(e=c(this,en).firstElementChild)==null||e.focus();return}(r=t.target.nextSibling)==null||r.focus()}_moveToPrevious(t){var e,r;if(t.target===((e=c(this,en))==null?void 0:e.firstElementChild)||t.target===c(this,BA)){c(this,ii,dh)&&this._hideDropdownFromKeyboard();return}c(this,ii,dh)||_(this,ii,Rc).call(this,t),(r=t.target.previousSibling)==null||r.focus()}_moveToBeginning(t){var e;if(!c(this,ii,dh)){_(this,ii,Rc).call(this,t);return}(e=c(this,en).firstElementChild)==null||e.focus()}_moveToEnd(t){var e;if(!c(this,ii,dh)){_(this,ii,Rc).call(this,t);return}(e=c(this,en).lastElementChild)==null||e.focus()}hideDropdown(){var t,e;(t=c(this,en))==null||t.classList.add("hidden"),c(this,BA).ariaExpanded="false",(e=c(this,yu))==null||e.abort(),F(this,yu,null)}_hideDropdownFromKeyboard(){var t;if(!c(this,fm)){if(!c(this,ii,dh)){(t=c(this,Ch))==null||t.unselect();return}this.hideDropdown(),c(this,BA).focus({preventScroll:!0,focusVisible:c(this,$v)})}}updateColor(t){if(c(this,pf)&&(c(this,pf).style.backgroundColor=t),!c(this,en))return;const e=c(this,eo).highlightColors.values();for(const r of c(this,en).children)r.ariaSelected=e.next().value===t.toUpperCase()}destroy(){var t,e;(t=c(this,BA))==null||t.remove(),F(this,BA,null),F(this,pf,null),(e=c(this,en))==null||e.remove(),F(this,en,null)}};BA=new WeakMap,pf=new WeakMap,h0=new WeakMap,en=new WeakMap,$v=new WeakMap,fm=new WeakMap,Ch=new WeakMap,Zv=new WeakMap,yu=new WeakMap,eo=new WeakMap,c0=new WeakMap,ii=new WeakSet,e4=function(){const i=document.createElement("div"),t=c(this,eo)._signal;i.addEventListener("contextmenu",AA,{signal:t}),i.className="dropdown",i.role="listbox",i.ariaMultiSelectable="false",i.ariaOrientation="vertical",i.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),c(this,Ch)&&(i.id=`${c(this,Ch).id}_colorpicker_dropdown`);for(const[e,r]of c(this,eo).highlightColors){const n=document.createElement("button");n.tabIndex="0",n.role="option",n.setAttribute("data-color",r),n.title=e,n.setAttribute("data-l10n-id",c(Q2,c0)[e]);const s=document.createElement("span");n.append(s),s.className="swatch",s.style.backgroundColor=r,n.ariaSelected=r===c(this,h0),n.addEventListener("click",_(this,ii,r4).bind(this,r),{signal:t}),i.append(n)}return i.addEventListener("keydown",_(this,ii,i4).bind(this),{signal:t}),i},r4=function(i,t){t.stopPropagation(),c(this,Zv).dispatch("switchannotationeditorparams",{source:this,type:_e.HIGHLIGHT_COLOR,value:i}),this.updateColor(i)},i4=function(i){Q2._keyboardManager.exec(this,i)},Rc=function(i){if(c(this,ii,dh)){this.hideDropdown();return}if(F(this,$v,i.detail===0),c(this,yu)||(F(this,yu,new AbortController),window.addEventListener("pointerdown",_(this,ii,_U).bind(this),{signal:c(this,eo).combinedSignal(c(this,yu))})),c(this,BA).ariaExpanded="true",c(this,en)){c(this,en).classList.remove("hidden");return}const t=F(this,en,_(this,ii,e4).call(this));c(this,BA).append(t)},_U=function(i){var t;(t=c(this,en))!=null&&t.contains(i.target)||this.hideDropdown()},dh=function(){return c(this,en)&&!c(this,en).classList.contains("hidden")},U(Q2,c0,null);let zS=Q2;var mA,pm,gf,eh,u0;const HP=class L2{constructor(t){U(this,mA,null),U(this,pm,!1),U(this,gf,null),U(this,eh,null),F(this,gf,t),F(this,eh,t._uiManager),c(L2,u0)||F(L2,u0,Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"}))}renderButton(){if(c(this,mA))return c(this,mA);const{editorType:t,colorType:e,colorAndOpacityType:r,opacityType:n,color:s,opacity:A}=c(this,gf),a=F(this,pm,Fi.isAlphaColorInputSupported&&n!==void 0),o=F(this,mA,document.createElement("input"));if(o.type="color",a){o.setAttribute("alpha","");const l=Nt.hexNums[Math.round((A??1)*255)];o.value=(s||"#000000")+l}else o.value=s||"#000000";return o.className="basicColorPicker",o.tabIndex=0,o.setAttribute("data-l10n-id",c(L2,u0)[t]),o.addEventListener("input",()=>{if(a){const l=Wy(o.value);if(!l)return;const[h,u,f,d]=l,g=Nt.makeHexColor(h,u,f);r!==void 0?c(this,eh).updateParams(r,{color:g,opacity:d}):(c(this,eh).updateParams(e,g),c(this,eh).updateParams(n,d))}else c(this,eh).updateParams(e,o.value)},{signal:c(this,eh)._signal}),o}update(t){if(c(this,mA))if(c(this,pm)){const e=Nt.hexNums[Math.round(c(this,gf).opacity*255)];c(this,mA).value=t+e}else c(this,mA).value=t}updateOpacity(t){if(!c(this,mA)||!c(this,pm))return;const e=Nt.hexNums[Math.round(t*255)];c(this,mA).value=c(this,gf).color+e}destroy(){var t;(t=c(this,mA))==null||t.remove(),F(this,mA,null)}hideDropdown(){}};mA=new WeakMap,pm=new WeakMap,gf=new WeakMap,eh=new WeakMap,u0=new WeakMap,U(HP,u0,null);let VP=HP;function MU(i){return Math.floor(Mr(i,0,1)*255).toString(16).padStart(2,"0")}function ig(i){return Mr(i,0,1)*255}class TU{static CMYK_G([t,e,r,n]){return["G",1-Math.min(1,.3*t+.59*r+.11*e+n)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=ig(t),[t,t,t]}static G_HTML([t]){const e=MU(t);return`#${e}${e}${e}`}static RGB_G([t,e,r]){return["G",.3*t+.59*e+.11*r]}static RGB_rgb(t){return t.map(ig)}static RGB_HTML(t){return`#${t.map(MU).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,r,n]){return["RGB",1-Math.min(1,t+n),1-Math.min(1,r+n),1-Math.min(1,e+n)]}static CMYK_rgb([t,e,r,n]){return[ig(1-Math.min(1,t+n)),ig(1-Math.min(1,r+n)),ig(1-Math.min(1,e+n))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,r]){const n=1-t,s=1-e,A=1-r,a=Math.min(n,s,A);return["CMYK",n,s,A,a]}}class yW{create(t,e,r=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),r||(n.setAttribute("width",`${t}px`),n.setAttribute("height",`${e}px`)),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox",`0 0 ${t} ${e}`),n}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){rr("Abstract method `_createSVG` called.")}}class D0 extends yW{_createSVG(t){return document.createElementNS(Lo,t)}}const bW=9,Du=new WeakSet,BW=new Date().getTimezoneOffset()*60*1e3;class qB{static create(t){switch(t.data.annotationType){case gi.LINK:return new qS(t);case gi.TEXT:return new FW(t);case gi.WIDGET:switch(t.data.fieldType){case"Tx":return new SW(t);case"Btn":return t.data.radioButton?new GP(t):t.data.checkBox?new kW(t):new UW(t);case"Ch":return new IW(t);case"Sig":return new EW(t)}return new Vu(t);case gi.POPUP:return new A4(t);case gi.FREETEXT:return new XP(t);case gi.LINE:return new LW(t);case gi.SQUARE:return new _W(t);case gi.CIRCLE:return new MW(t);case gi.POLYLINE:return new YP(t);case gi.CARET:return new NW(t);case gi.INK:return new XS(t);case gi.POLYGON:return new TW(t);case gi.HIGHLIGHT:return new $P(t);case gi.UNDERLINE:return new PW(t);case gi.SQUIGGLY:return new DW(t);case gi.STRIKEOUT:return new OW(t);case gi.STAMP:return new ZP(t);case gi.FILEATTACHMENT:return new RW(t);default:return new xi(t)}}}var Hc,gm,ia,_2,n4;const CW=class WP{constructor(t,{isRenderable:e=!1,ignoreBorder:r=!1,createQuadrilaterals:n=!1}={}){U(this,_2),U(this,Hc,null),U(this,gm,!1),U(this,ia,null),this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableComment=t.enableComment,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,this.hasOwnCommentButton=!1,e&&(this.contentElement=this.container=this._createContainer(r)),n&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:e}){return!!(t!=null&&t.str||e!=null&&e.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return WP._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){var t;const{data:e}=this,r=(t=this.annotationStorage)==null?void 0:t.getEditor(e.id);return r?r.getData():e}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}get commentButtonPosition(){var t;const e=(t=this.annotationStorage)==null?void 0:t.getEditor(this.data.id);if(e)return e.commentButtonPositionInPage;const{quadPoints:r,inkLists:n,rect:s}=this.data;let A=-1/0,a=-1/0;if((r==null?void 0:r.length)>=8){for(let o=0;o<r.length;o+=8)r[o+1]>a?(a=r[o+1],A=r[o+2]):r[o+1]===a&&(A=Math.max(A,r[o+2]));return[A,a]}if((n==null?void 0:n.length)>=1){for(const o of n)for(let l=0,h=o.length;l<h;l+=2)o[l+1]>a?(a=o[l+1],A=o[l]):o[l+1]===a&&(A=Math.max(A,o[l]));if(A!==1/0)return[A,a]}return s?[s[2],s[3]]:null}_normalizePoint(t){const{page:{view:e},viewport:{rawDims:{pageWidth:r,pageHeight:n,pageX:s,pageY:A}}}=this.parent;return t[1]=e[3]-t[1]+e[1],t[0]=100*(t[0]-s)/r,t[1]=100*(t[1]-A)/n,t}get commentText(){var t,e,r;const{data:n}=this;return((e=(t=this.annotationStorage.getRawValue(`${_0}${n.id}`))==null?void 0:t.popup)==null?void 0:e.contents)||((r=n.contentsObj)==null?void 0:r.str)||""}set commentText(t){const{data:e}=this,r={deleted:!t,contents:t||""};this.annotationStorage.updateEditor(e.id,{popup:r})||this.annotationStorage.setValue(`${_0}${e.id}`,{id:e.id,annotationType:e.annotationType,page:this.parent.page,popup:r,popupRef:e.popupRef,modificationDate:new Date}),t||this.removePopup()}removePopup(){var t,e;(e=((t=c(this,ia))==null?void 0:t.popup)||this.popup)==null||e.remove(),F(this,ia,this.popup=null)}updateEdited(t){var e;if(!this.container)return;t.rect&&(c(this,Hc)||F(this,Hc,{rect:this.data.rect.slice(0)}));const{rect:r,popup:n}=t;r&&_(this,_2,n4).call(this,r);let s=((e=c(this,ia))==null?void 0:e.popup)||this.popup;!s&&n!=null&&n.text&&(this._createPopup(n),s=c(this,ia).popup),s&&(s.updateEdited(t),n!=null&&n.deleted&&(s.remove(),F(this,ia,null),this.popup=null))}resetEdited(){var t;c(this,Hc)&&(_(this,_2,n4).call(this,c(this,Hc).rect),(t=c(this,ia))==null||t.popup.resetEdited(),F(this,Hc,null))}_createContainer(t){const{data:e,parent:{page:r,viewport:n}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",e.id),!(this instanceof Vu)&&!(this instanceof qS)&&(s.tabIndex=0);const{style:A}=s;if(A.zIndex=this.parent.zIndex,this.parent.zIndex+=2,e.alternativeText&&(s.title=e.alternativeText),e.noRotate&&s.classList.add("norotate"),!e.rect||this instanceof A4){const{rotation:m}=e;return!e.hasOwnCanvas&&m!==0&&this.setRotation(m,s),s}const{width:a,height:o}=this;if(!t&&e.borderStyle.width>0){A.borderWidth=`${e.borderStyle.width}px`;const m=e.borderStyle.horizontalCornerRadius,y=e.borderStyle.verticalCornerRadius;if(m>0||y>0){const b=`calc(${m}px * var(--total-scale-factor)) / calc(${y}px * var(--total-scale-factor))`;A.borderRadius=b}else if(this instanceof GP){const b=`calc(${a}px * var(--total-scale-factor)) / calc(${o}px * var(--total-scale-factor))`;A.borderRadius=b}switch(e.borderStyle.style){case Id.SOLID:A.borderStyle="solid";break;case Id.DASHED:A.borderStyle="dashed";break;case Id.BEVELED:Me("Unimplemented border style: beveled");break;case Id.INSET:Me("Unimplemented border style: inset");break;case Id.UNDERLINE:A.borderBottomStyle="solid";break}const w=e.borderColor||null;w?(F(this,gm,!0),A.borderColor=Nt.makeHexColor(...w)):A.borderWidth=0}const l=Nt.normalizeRect([e.rect[0],r.view[3]-e.rect[1]+r.view[1],e.rect[2],r.view[3]-e.rect[3]+r.view[1]]),{pageWidth:h,pageHeight:u,pageX:f,pageY:d}=n.rawDims;A.left=`${100*(l[0]-f)/h}%`,A.top=`${100*(l[1]-d)/u}%`;const{rotation:g}=e;return e.hasOwnCanvas||g===0?(A.width=`${100*a/h}%`,A.height=`${100*o/u}%`):this.setRotation(g,s),s}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:n}=this.parent.viewport.rawDims;let{width:s,height:A}=this;t%180!==0&&([s,A]=[A,s]),e.style.width=`${100*s/r}%`,e.style.height=`${100*A/n}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(e,r,n)=>{const s=n.detail[e],A=s[0],a=s.slice(1);n.target.style[r]=TU[`${A}_HTML`](a),this.annotationStorage.setValue(this.data.id,{[r]:TU[`${A}_rgb`](a)})};return ke(this,"_commonActions",{display:e=>{const{display:r}=e.detail,n=r%2===1;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:n,noPrint:r===1||r===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:r}=e.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{const r=e.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(t,e){const r=this._commonActions;for(const n of Object.keys(e.detail)){const s=t[n]||r[n];s==null||s(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const r=this._commonActions;for(const[n,s]of Object.entries(e)){const A=r[n];if(A){const a={detail:{[n]:s},target:t};A(a),delete e[n]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,r,n,s]=this.data.rect.map(m=>Math.fround(m));if(t.length===8){const[m,y,w,b]=t.subarray(2,6);if(n===m&&s===y&&e===w&&r===b)return}const{style:A}=this.container;let a;if(c(this,gm)){const{borderColor:m,borderWidth:y}=A;A.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${m}" stroke-width="${y}">`],this.container.classList.add("hasBorder")}const o=n-e,l=s-r,{svgFactory:h}=this,u=h.createElement("svg");u.classList.add("quadrilateralsContainer"),u.setAttribute("width",0),u.setAttribute("height",0),u.role="none";const f=h.createElement("defs");u.append(f);const d=h.createElement("clipPath"),g=`clippath_${this.data.id}`;d.setAttribute("id",g),d.setAttribute("clipPathUnits","objectBoundingBox"),f.append(d);for(let m=2,y=t.length;m<y;m+=8){const w=t[m],b=t[m+1],C=t[m+2],S=t[m+3],k=h.createElement("rect"),I=(C-e)/o,N=(s-b)/l,D=(w-C)/o,Q=(b-S)/l;k.setAttribute("x",I),k.setAttribute("y",N),k.setAttribute("width",D),k.setAttribute("height",Q),d.append(k),a==null||a.push(`<rect vector-effect="non-scaling-stroke" x="${I}" y="${N}" width="${D}" height="${Q}"/>`)}c(this,gm)&&(a.push("</g></svg>')"),A.backgroundImage=a.join("")),this.container.append(u),this.container.style.clipPath=`url(#${g})`}_createPopup(t=null){const{data:e}=this;let r,n;t?(r={str:t.text},n=t.date):(r=e.contentsObj,n=e.modificationDate),F(this,ia,new A4({data:{color:e.color,titleObj:e.titleObj,modificationDate:n,contentsObj:r,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]}))}get hasPopupElement(){return!!(c(this,ia)||this.popup||this.data.popupRef)}get extraPopupElement(){return c(this,ia)}render(){rr("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const r=[];if(this._fieldObjects){const n=this._fieldObjects[t];if(n)for(const{page:s,id:A,exportValues:a}of n){if(s===-1||A===e)continue;const o=typeof a=="string"?a:null,l=document.querySelector(`[data-element-id="${A}"]`);if(l&&!Du.has(l)){Me(`_getElementsByName - element not allowed: ${A}`);continue}r.push({id:A,exportValue:o,domElement:l})}return r}for(const n of document.getElementsByName(t)){const{exportValue:s}=n,A=n.getAttribute("data-element-id");A!==e&&Du.has(n)&&r.push({id:A,exportValue:s,domElement:n})}return r}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var r;(r=this.linkService.eventBus)==null||r.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};Hc=new WeakMap,gm=new WeakMap,ia=new WeakMap,_2=new WeakSet,n4=function(i){const{container:{style:t},data:{rect:e,rotation:r},parent:{viewport:{rawDims:{pageWidth:n,pageHeight:s,pageX:A,pageY:a}}}}=this;e==null||e.splice(0,4,...i),t.left=`${100*(i[0]-A)/n}%`,t.top=`${100*(s-i[3]+a)/s}%`,r===0?(t.width=`${100*(i[2]-i[0])/n}%`,t.height=`${100*(i[3]-i[1])/s}%`):this.setRotation(r)};let xi=CW;class xW extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.editor=t.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){const{editor:t}=this;t.hasComment&&this._createPopup(t.comment)}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(t){this.editor.comment=t,t||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.parent.removeAnnotation(this.data.id),this.container.remove(),this.container=null,this.removePopup()}}var Ya,bu,jP,KP;class qS extends xi{constructor(t,e=null){super(t,{isRenderable:!0,ignoreBorder:!!(e!=null&&e.ignoreBorder),createQuadrilaterals:!0}),U(this,Ya),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:e}=this,r=document.createElement("a");r.setAttribute("data-element-id",t.id);let n=!1;return t.url?(e.addLinkAttributes(r,t.url,t.newWindow),n=!0):t.action?(this._bindNamedAction(r,t.action,t.overlaidText),n=!0):t.attachment?(_(this,Ya,jP).call(this,r,t.attachment,t.overlaidText,t.attachmentDest),n=!0):t.setOCGState?(_(this,Ya,KP).call(this,r,t.setOCGState,t.overlaidText),n=!0):t.dest?(this._bindLink(r,t.dest,t.overlaidText),n=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,t),n=!0),t.resetForm?(this._bindResetFormAction(r,t.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(r,""),n=!0)),this.container.classList.add("linkAnnotation"),n&&(this.contentElement=r,this.container.append(r)),this.container}_bindLink(t,e,r=""){t.href=this.linkService.getDestinationHash(e),t.onclick=()=>(e&&this.linkService.goToDestination(e),!1),(e||e==="")&&_(this,Ya,bu).call(this),r&&(t.title=r)}_bindNamedAction(t,e,r=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),r&&(t.title=r),_(this,Ya,bu).call(this)}_bindJSAction(t,e){t.href=this.linkService.getAnchorUrl("");const r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const n of Object.keys(e.actions)){const s=r.get(n);s&&(t[s]=()=>{var A;return(A=this.linkService.eventBus)==null||A.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e.id,name:n}}),!1})}e.overlaidText&&(t.title=e.overlaidText),t.onclick||(t.onclick=()=>!1),_(this,Ya,bu).call(this)}_bindResetFormAction(t,e){const r=t.onclick;if(r||(t.href=this.linkService.getAnchorUrl("")),_(this,Ya,bu).call(this),!this._fieldObjects){Me('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),r||(t.onclick=()=>!1);return}t.onclick=()=>{var n;r==null||r();const{fields:s,refs:A,include:a}=e,o=[];if(s.length!==0||A.length!==0){const u=new Set(A);for(const f of s){const d=this._fieldObjects[f]||[];for(const{id:g}of d)u.add(g)}for(const f of Object.values(this._fieldObjects))for(const d of f)u.has(d.id)===a&&o.push(d)}else for(const u of Object.values(this._fieldObjects))o.push(...u);const l=this.annotationStorage,h=[];for(const u of o){const{id:f}=u;switch(h.push(f),u.type){case"text":{const g=u.defaultValue||"";l.setValue(f,{value:g});break}case"checkbox":case"radiobutton":{const g=u.defaultValue===u.exportValues;l.setValue(f,{value:g});break}case"combobox":case"listbox":{const g=u.defaultValue||"";l.setValue(f,{value:g});break}default:continue}const d=document.querySelector(`[data-element-id="${f}"]`);if(d){if(!Du.has(d)){Me(`_bindResetFormAction - element not allowed: ${f}`);continue}}else continue;d.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((n=this.linkService.eventBus)==null||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:h,name:"ResetForm"}})),!1}}}Ya=new WeakSet,bu=function(){this.container.setAttribute("data-internal-link","")},jP=function(i,t,e="",r=null){i.href=this.linkService.getAnchorUrl(""),t.description?i.title=t.description:e&&(i.title=e),i.onclick=()=>{var n;return(n=this.downloadManager)==null||n.openOrDownloadData(t.content,t.filename,r),!1},_(this,Ya,bu).call(this)},KP=function(i,t,e=""){i.href=this.linkService.getAnchorUrl(""),i.onclick=()=>(this.linkService.executeSetOCGState(t),!1),e&&(i.title=e),_(this,Ya,bu).call(this)};class FW extends xi{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(t),this.container}}class Vu extends xi{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Fi.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,r,n,s){r.includes("mouse")?t.addEventListener(r,A=>{var a;(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(A),shift:A.shiftKey,modifier:this._getKeyModifier(A)}})}):t.addEventListener(r,A=>{var a;if(r==="blur"){if(!e.focused||!A.relatedTarget)return;e.focused=!1}else if(r==="focus"){if(e.focused)return;e.focused=!0}s&&((a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(A)}}))})}_setEventListeners(t,e,r,n){var s,A,a;for(const[o,l]of r)(l==="Action"||(s=this.data.actions)!=null&&s[l])&&((l==="Focus"||l==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,o,l,n),l==="Focus"&&!((A=this.data.actions)!=null&&A.Blur)?this._setEventListener(t,e,"blur","Blur",null):l==="Blur"&&!((a=this.data.actions)!=null&&a.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":Nt.makeHexColor(...e)}_setTextStyle(t){const e=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,n=this.data.defaultAppearanceData.fontSize||bW,s=t.style;let A;const a=2,o=l=>Math.round(10*l)/10;if(this.data.multiLine){const l=Math.abs(this.data.rect[3]-this.data.rect[1]-a),h=Math.round(l/(OB*n))||1,u=l/h;A=Math.min(n,o(u/OB))}else{const l=Math.abs(this.data.rect[3]-this.data.rect[1]-a);A=Math.min(n,o(l/OB))}s.fontSize=`calc(${A}px * var(--total-scale-factor))`,s.color=Nt.makeHexColor(...r),this.data.textAlignment!==null&&(s.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class SW extends Vu{constructor(t){const e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,r,n){const s=this.annotationStorage;for(const A of this._getElementsByName(t.name,t.id))A.domElement&&(A.domElement[e]=r),s.setValue(A.id,{[n]:r})}render(){var t,e;const r=this.annotationStorage,n=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const A=r.getValue(n,{value:this.data.fieldValue});let a=A.value||"";const o=r.getValue(n,{charLimit:this.data.maxLen}).charLimit;o&&a.length>o&&(a=a.slice(0,o));let l=A.formattedValue||((t=this.data.textContent)==null?void 0:t.join(`
|
|
263
|
-
`))||null;l&&this.data.comb&&(l=l.replaceAll(/\s+/g,""));const h={userValue:a,formattedValue:l,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=l??a,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type=this.data.password?"password":"text",s.setAttribute("value",l??a),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),Du.add(s),this.contentElement=s,s.setAttribute("data-element-id",n),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=0;const{datetimeFormat:u,datetimeType:f,timeStep:d}=this.data,g=!!f&&this.enableScripting;u&&(s.title=u),this._setRequired(s,this.data.required),o&&(s.maxLength=o),s.addEventListener("input",y=>{r.setValue(n,{value:y.target.value}),this.setPropertyOnSiblings(s,"value",y.target.value,"value"),h.formattedValue=null}),s.addEventListener("resetform",y=>{const w=this.data.defaultFieldValue??"";s.value=h.userValue=w,h.formattedValue=null});let m=y=>{const{formattedValue:w}=h;w!=null&&(y.target.value=w),y.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",w=>{var b;if(h.focused)return;const{target:C}=w;if(g&&(C.type=f,d&&(C.step=d)),h.userValue){const S=h.userValue;if(g)if(f==="time"){const k=new Date(S),I=[k.getHours(),k.getMinutes(),k.getSeconds()];C.value=I.map(N=>N.toString().padStart(2,"0")).join(":")}else C.value=new Date(S-BW).toISOString().split(f==="date"?"T":".",1)[0];else C.value=S}h.lastCommittedValue=C.value,h.commitKey=1,(b=this.data.actions)!=null&&b.Focus||(h.focused=!0)}),s.addEventListener("updatefromsandbox",w=>{this.showElementAndHideCanvas(w.target);const b={value(C){h.userValue=C.detail.value??"",g||r.setValue(n,{value:h.userValue.toString()}),C.target.value=h.userValue},formattedValue(C){const{formattedValue:S}=C.detail;h.formattedValue=S,S!=null&&C.target!==document.activeElement&&(C.target.value=S);const k={formattedValue:S};g&&(k.value=S),r.setValue(n,k)},selRange(C){C.target.setSelectionRange(...C.detail.selRange)},charLimit:C=>{var S;const{charLimit:k}=C.detail,{target:I}=C;if(k===0){I.removeAttribute("maxLength");return}I.setAttribute("maxLength",k);let N=h.userValue;!N||N.length<=k||(N=N.slice(0,k),I.value=h.userValue=N,r.setValue(n,{value:N}),(S=this.linkService.eventBus)==null||S.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:N,willCommit:!0,commitKey:1,selStart:I.selectionStart,selEnd:I.selectionEnd}}))}};this._dispatchEventFromSandbox(b,w)}),s.addEventListener("keydown",w=>{var b;h.commitKey=1;let C=-1;if(w.key==="Escape"?C=0:w.key==="Enter"&&!this.data.multiLine?C=2:w.key==="Tab"&&(h.commitKey=3),C===-1)return;const{value:S}=w.target;h.lastCommittedValue!==S&&(h.lastCommittedValue=S,h.userValue=S,(b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:S,willCommit:!0,commitKey:C,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}}))});const y=m;m=null,s.addEventListener("blur",w=>{var b,C;if(!h.focused||!w.relatedTarget)return;(b=this.data.actions)!=null&&b.Blur||(h.focused=!1);const{target:S}=w;let{value:k}=S;if(g){if(k&&f==="time"){const I=k.split(":").map(N=>parseInt(N,10));k=new Date(2e3,0,1,I[0],I[1],I[2]||0).valueOf(),S.step=""}else k.includes("T")||(k=`${k}T00:00`),k=new Date(k).valueOf();S.type="text"}h.userValue=k,h.lastCommittedValue!==k&&((C=this.linkService.eventBus)==null||C.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:k,willCommit:!0,commitKey:h.commitKey,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}})),y(w)}),(e=this.data.actions)!=null&&e.Keystroke&&s.addEventListener("beforeinput",w=>{var b;h.lastCommittedValue=null;const{data:C,target:S}=w,{value:k,selectionStart:I,selectionEnd:N}=S;let D=I,Q=N;switch(w.inputType){case"deleteWordBackward":{const K=k.substring(0,I).match(/\w*[^\w]*$/);K&&(D-=K[0].length);break}case"deleteWordForward":{const K=k.substring(I).match(/^[^\w]*\w*/);K&&(Q+=K[0].length);break}case"deleteContentBackward":I===N&&(D-=1);break;case"deleteContentForward":I===N&&(Q+=1);break}w.preventDefault(),(b=this.linkService.eventBus)==null||b.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:k,change:C||"",willCommit:!1,selStart:D,selEnd:Q}})}),this._setEventListeners(s,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],w=>w.target.value)}if(m&&s.addEventListener("blur",m),this.data.comb){const y=(this.data.rect[2]-this.data.rect[0])/o;s.classList.add("comb"),s.style.letterSpacing=`calc(${y}px * var(--total-scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell",this.data.hasOwnCanvas&&(s.hidden=!0);return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class EW extends Vu{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class kW extends Vu{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,r=e.id;let n=t.getValue(r,{value:e.exportValue===e.fieldValue}).value;typeof n=="string"&&(n=n!=="Off",t.setValue(r,{value:n})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const s=document.createElement("input");return Du.add(s),s.setAttribute("data-element-id",r),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="checkbox",s.name=e.fieldName,n&&s.setAttribute("checked",!0),s.setAttribute("exportValue",e.exportValue),s.tabIndex=0,s.addEventListener("change",A=>{const{name:a,checked:o}=A.target;for(const l of this._getElementsByName(a,r)){const h=o&&l.exportValue===e.exportValue;l.domElement&&(l.domElement.checked=h),t.setValue(l.id,{value:h})}t.setValue(r,{value:o})}),s.addEventListener("resetform",A=>{const a=e.defaultFieldValue||"Off";A.target.checked=a===e.exportValue}),this.enableScripting&&this.hasJSActions&&(s.addEventListener("updatefromsandbox",A=>{const a={value(o){o.target.checked=o.detail.value!=="Off",t.setValue(r,{value:o.target.checked})}};this._dispatchEventFromSandbox(a,A)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],A=>A.target.checked)),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class GP extends Vu{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,r=e.id;let n=t.getValue(r,{value:e.fieldValue===e.buttonValue}).value;if(typeof n=="string"&&(n=n!==e.buttonValue,t.setValue(r,{value:n})),n)for(const A of this._getElementsByName(e.fieldName,r))t.setValue(A.id,{value:!1});const s=document.createElement("input");if(Du.add(s),s.setAttribute("data-element-id",r),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="radio",s.name=e.fieldName,n&&s.setAttribute("checked",!0),s.tabIndex=0,s.addEventListener("change",A=>{const{name:a,checked:o}=A.target;for(const l of this._getElementsByName(a,r))t.setValue(l.id,{value:!1});t.setValue(r,{value:o})}),s.addEventListener("resetform",A=>{const a=e.defaultFieldValue;A.target.checked=a!=null&&a===e.buttonValue}),this.enableScripting&&this.hasJSActions){const A=e.buttonValue;s.addEventListener("updatefromsandbox",a=>{const o={value:l=>{const h=A===l.detail.value;for(const u of this._getElementsByName(l.target.name)){const f=h&&u.id===r;u.domElement&&(u.domElement.checked=f),t.setValue(u.id,{value:f})}}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)}return this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class UW extends qS{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",r=>{this._dispatchEventFromSandbox({},r)})),t}}class IW extends Vu{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,r=t.getValue(e,{value:this.data.fieldValue}),n=document.createElement("select");Du.add(n),n.setAttribute("data-element-id",e),n.disabled=this.data.readOnly,this._setRequired(n,this.data.required),n.name=this.data.fieldName,n.tabIndex=0;let s=this.data.combo&&this.data.options.length>0;this.data.combo||(n.size=this.data.options.length,this.data.multiSelect&&(n.multiple=!0)),n.addEventListener("resetform",u=>{const f=this.data.defaultFieldValue;for(const d of n.options)d.selected=d.value===f});const A=(u,f)=>{const d=f.replaceAll(" "," ");u.textContent=d,d!==f&&u.setAttribute("display-value",f)};for(const u of this.data.options){const f=document.createElement("option");A(f,u.displayValue),f.value=u.exportValue,r.value.includes(u.exportValue)&&(f.setAttribute("selected",!0),s=!1),n.append(f)}let a=null;if(s){const u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),n.prepend(u),a=()=>{u.remove(),n.removeEventListener("input",a),a=null},n.addEventListener("input",a)}const o=u=>{const f=u?"value":"textContent",{options:d,multiple:g}=n;return g?Array.prototype.filter.call(d,m=>m.selected).map(m=>m[f]):d.selectedIndex===-1?null:d[d.selectedIndex][f]};let l=o(!1);const h=u=>{const f=u.target.options;return Array.prototype.map.call(f,d=>({displayValue:d.getAttribute("display-value")||d.textContent,exportValue:d.value}))};return this.enableScripting&&this.hasJSActions?(n.addEventListener("updatefromsandbox",u=>{const f={value(d){a==null||a();const g=d.detail.value,m=new Set(Array.isArray(g)?g:[g]);for(const y of n.options)y.selected=m.has(y.value);t.setValue(e,{value:o(!0)}),l=o(!1)},multipleSelection(d){n.multiple=!0},remove(d){const g=n.options,m=d.detail.remove;g[m].selected=!1,n.remove(m),g.length>0&&Array.prototype.findIndex.call(g,y=>y.selected)===-1&&(g[0].selected=!0),t.setValue(e,{value:o(!0),items:h(d)}),l=o(!1)},clear(d){for(;n.length!==0;)n.remove(0);t.setValue(e,{value:null,items:[]}),l=o(!1)},insert(d){const{index:g,displayValue:m,exportValue:y}=d.detail.insert,w=n.children[g],b=document.createElement("option");A(b,m),b.value=y,w?w.before(b):n.append(b),t.setValue(e,{value:o(!0),items:h(d)}),l=o(!1)},items(d){const{items:g}=d.detail;for(;n.length!==0;)n.remove(0);for(const m of g){const{displayValue:y,exportValue:w}=m,b=document.createElement("option");A(b,y),b.value=w,n.append(b)}n.options.length>0&&(n.options[0].selected=!0),t.setValue(e,{value:o(!0),items:h(d)}),l=o(!1)},indices(d){const g=new Set(d.detail.indices);for(const m of d.target.options)m.selected=g.has(m.index);t.setValue(e,{value:o(!0)}),l=o(!1)},editable(d){d.target.disabled=!d.detail.editable}};this._dispatchEventFromSandbox(f,u)}),n.addEventListener("input",u=>{var f;const d=o(!0),g=o(!1);t.setValue(e,{value:d}),u.preventDefault(),(f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:l,change:g,changeEx:d,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(n,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],u=>u.target.value)):n.addEventListener("input",function(u){t.setValue(e,{value:o(!0)})}),this.data.combo&&this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}var M2,s4;class A4 extends xi{constructor(t){const{data:e,elements:r,parent:n}=t,s=!!n._commentManager;if(super(t,{isRenderable:!s&&xi._hasPopupData(e)}),U(this,M2),this.elements=r,s&&xi._hasPopupData(e)){const A=this.popup=_(this,M2,s4).call(this);for(const a of r)a.popup=A}else this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const e=this.popup=_(this,M2,s4).call(this),r=[];for(const n of this.elements)n.popup=e,n.container.ariaHasPopup="dialog",r.push(n.data.id),n.addHighlightArea();return this.container.setAttribute("aria-controls",r.map(n=>`${sp}${n}`).join(",")),this.container}}M2=new WeakSet,s4=function(){return new QW({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,commentManager:this.parent._commentManager})};var CA,Bu,a4,o4,mm,wm,vi,Zo,Vc,Wf,d0,f0,Jo,vA,Lh,xh,mi,Fh,Wc,Jv,Sh,vm,jc,Kc,gn,rh,hr,T2,l4,h4,c4,N2,XB,NU,zP,qP,PU,ty,ey,u4;class QW{constructor({container:t,color:e,elements:r,titleObj:n,modificationDate:s,contentsObj:A,richText:a,parent:o,rect:l,parentRect:h,open:u,commentManager:f=null}){U(this,hr),U(this,CA,null),U(this,Bu,_(this,hr,qP).bind(this)),U(this,a4,_(this,hr,u4).bind(this)),U(this,o4,_(this,hr,ey).bind(this)),U(this,mm,_(this,hr,ty).bind(this)),U(this,wm,null),U(this,vi,null),U(this,Zo,null),U(this,Vc,null),U(this,Wf,null),U(this,d0,null),U(this,f0,null),U(this,Jo,!1),U(this,vA,null),U(this,Lh,null),U(this,xh,null),U(this,mi,null),U(this,Fh,null),U(this,Wc,null),U(this,Jv,null),U(this,Sh,null),U(this,vm,null),U(this,jc,null),U(this,Kc,!1),U(this,gn,null),U(this,rh,null),F(this,vi,t),F(this,vm,n),F(this,Zo,A),F(this,Sh,a),F(this,d0,o),F(this,wm,e),F(this,Jv,l),F(this,f0,h),F(this,Wf,r),F(this,CA,f),F(this,gn,r[0]),F(this,Vc,N0.toDateObject(s)),this.trigger=r.flatMap(d=>d.getElementsToTriggerPopup()),f||(_(this,hr,T2).call(this),c(this,vi).hidden=!0,u&&_(this,hr,ty).call(this))}renderCommentButton(){if(c(this,mi)){c(this,mi).parentNode||c(this,gn).container.after(c(this,mi));return}if(c(this,Fh)||_(this,hr,l4).call(this),!c(this,Fh))return;const{signal:t}=F(this,Lh,new AbortController),e=c(this,gn).hasOwnCommentButton,r=()=>{c(this,CA).toggleCommentPopup(this,!0,void 0,!e)},n=()=>{c(this,CA).toggleCommentPopup(this,!1,!0,!e)},s=()=>{c(this,CA).toggleCommentPopup(this,!1,!1)};if(e){F(this,mi,c(this,gn).container);for(const A of this.trigger)A.ariaHasPopup="dialog",A.ariaControls="commentPopup",A.addEventListener("keydown",c(this,Bu),{signal:t}),A.addEventListener("click",r,{signal:t}),A.addEventListener("pointerenter",n,{signal:t}),A.addEventListener("pointerleave",s,{signal:t}),A.classList.add("popupTriggerArea")}else{const A=F(this,mi,document.createElement("button"));A.className="annotationCommentButton";const a=c(this,gn).container;A.style.zIndex=parseInt(a.style.zIndex,10)+1,A.tabIndex=0,A.ariaHasPopup="dialog",A.ariaControls="commentPopup",A.setAttribute("data-l10n-id","pdfjs-show-comment-button"),_(this,hr,c4).call(this),_(this,hr,h4).call(this),A.addEventListener("keydown",c(this,Bu),{signal:t}),A.addEventListener("click",r,{signal:t}),A.addEventListener("pointerenter",n,{signal:t}),A.addEventListener("pointerleave",s,{signal:t}),a.after(A)}}get commentButtonColor(){const{color:t,opacity:e}=c(this,gn).commentData;return t?c(this,d0)._commentManager.makeCommentColor(t,e):null}focusCommentButton(){setTimeout(()=>{var t;(t=c(this,mi))==null||t.focus()},0)}getData(){const{richText:t,color:e,opacity:r,creationDate:n,modificationDate:s}=c(this,gn).commentData;return{contentsObj:{str:this.comment},richText:t,color:e,opacity:r,creationDate:n,modificationDate:s}}get elementBeforePopup(){return c(this,mi)}get comment(){return c(this,rh)||F(this,rh,c(this,gn).commentText),c(this,rh)}set comment(t){t!==this.comment&&(c(this,gn).commentText=F(this,rh,t))}focus(){var t;(t=c(this,gn).container)==null||t.focus()}get parentBoundingClientRect(){return c(this,gn).layer.getBoundingClientRect()}setCommentButtonStates({selected:t,hasPopup:e}){c(this,mi)&&(c(this,mi).classList.toggle("selected",t),c(this,mi).ariaExpanded=e)}setSelectedCommentButton(t){c(this,mi).classList.toggle("selected",t)}get commentPopupPosition(){if(c(this,Wc))return c(this,Wc);const{x:t,y:e,height:r}=c(this,mi).getBoundingClientRect(),{x:n,y:s,width:A,height:a}=c(this,gn).layer.getBoundingClientRect();return[(t-n)/A,(e+r-s)/a]}set commentPopupPosition(t){F(this,Wc,t)}hasDefaultPopupPosition(){return c(this,Wc)===null}get commentButtonPosition(){return c(this,Fh)}get commentButtonWidth(){return c(this,mi).getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(t){const[e,r]=c(this,Wc)||this.commentButtonPosition.map(l=>l/100),n=this.parentBoundingClientRect,{x:s,y:A,width:a,height:o}=n;c(this,CA).showDialog(null,this,s+e*a,A+r*o,{...t,parentDimensions:n})}render(){var t,e;if(c(this,vA))return;const r=F(this,vA,document.createElement("div"));if(r.className="popup",c(this,wm)){const s=r.style.outlineColor=Nt.makeHexColor(...c(this,wm));r.style.backgroundColor=`color-mix(in srgb, ${s} 30%, white)`}const n=document.createElement("span");if(n.className="header",(t=c(this,vm))!=null&&t.str){const s=document.createElement("span");s.className="title",n.append(s),{dir:s.dir,str:s.textContent}=c(this,vm)}if(r.append(n),c(this,Vc)){const s=document.createElement("time");s.className="popupDate",s.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),s.setAttribute("data-l10n-args",JSON.stringify({dateObj:c(this,Vc).valueOf()})),s.dateTime=c(this,Vc).toISOString(),n.append(s)}HS({html:c(this,hr,N2)||c(this,Zo).str,dir:(e=c(this,Zo))==null?void 0:e.dir,className:"popupContent"},r),c(this,vi).append(r)}updateEdited({rect:t,popup:e,deleted:r}){var n;if(c(this,CA)){r?(this.remove(),F(this,rh,null)):e&&(e.deleted?this.remove():(_(this,hr,c4).call(this),F(this,rh,e.text))),t&&(F(this,Fh,null),_(this,hr,l4).call(this),_(this,hr,h4).call(this));return}if(r||e!=null&&e.deleted){this.remove();return}_(this,hr,T2).call(this),c(this,jc)||F(this,jc,{contentsObj:c(this,Zo),richText:c(this,Sh)}),t&&F(this,xh,null),e&&e.text&&(F(this,Sh,_(this,hr,zP).call(this,e.text)),F(this,Vc,N0.toDateObject(e.date)),F(this,Zo,null)),(n=c(this,vA))==null||n.remove(),F(this,vA,null)}resetEdited(){var t;c(this,jc)&&({contentsObj:$i(this,Zo)._,richText:$i(this,Sh)._}=c(this,jc),F(this,jc,null),(t=c(this,vA))==null||t.remove(),F(this,vA,null),F(this,xh,null))}remove(){var t,e,r;if((t=c(this,Lh))==null||t.abort(),F(this,Lh,null),(e=c(this,vA))==null||e.remove(),F(this,vA,null),F(this,Kc,!1),F(this,Jo,!1),(r=c(this,mi))==null||r.remove(),F(this,mi,null),this.trigger)for(const n of this.trigger)n.classList.remove("popupTriggerArea")}forceHide(){F(this,Kc,this.isVisible),c(this,Kc)&&(c(this,vi).hidden=!0)}maybeShow(){c(this,CA)||(_(this,hr,T2).call(this),c(this,Kc)&&(c(this,vA)||_(this,hr,ey).call(this),F(this,Kc,!1),c(this,vi).hidden=!1))}get isVisible(){return c(this,CA)?!1:c(this,vi).hidden===!1}}CA=new WeakMap,Bu=new WeakMap,a4=new WeakMap,o4=new WeakMap,mm=new WeakMap,wm=new WeakMap,vi=new WeakMap,Zo=new WeakMap,Vc=new WeakMap,Wf=new WeakMap,d0=new WeakMap,f0=new WeakMap,Jo=new WeakMap,vA=new WeakMap,Lh=new WeakMap,xh=new WeakMap,mi=new WeakMap,Fh=new WeakMap,Wc=new WeakMap,Jv=new WeakMap,Sh=new WeakMap,vm=new WeakMap,jc=new WeakMap,Kc=new WeakMap,gn=new WeakMap,rh=new WeakMap,hr=new WeakSet,T2=function(){var i;if(c(this,Lh))return;F(this,Lh,new AbortController);const{signal:t}=c(this,Lh);for(const e of this.trigger)e.addEventListener("click",c(this,mm),{signal:t}),e.addEventListener("pointerenter",c(this,o4),{signal:t}),e.addEventListener("pointerleave",c(this,a4),{signal:t}),e.classList.add("popupTriggerArea");for(const e of c(this,Wf))(i=e.container)==null||i.addEventListener("keydown",c(this,Bu),{signal:t})},l4=function(){const i=c(this,Wf).find(t=>t.hasCommentButton);i&&F(this,Fh,i._normalizePoint(i.commentButtonPosition))},h4=function(){if(c(this,gn).extraPopupElement&&!c(this,gn).editor)return;c(this,mi)||this.renderCommentButton();const[i,t]=c(this,Fh),{style:e}=c(this,mi);e.left=`calc(${i}%)`,e.top=`calc(${t}% - var(--comment-button-dim))`},c4=function(){c(this,gn).extraPopupElement||(c(this,mi)||this.renderCommentButton(),c(this,mi).style.backgroundColor=this.commentButtonColor||"")},N2=function(){const i=c(this,Sh),t=c(this,Zo);return i!=null&&i.str&&(!(t!=null&&t.str)||t.str===i.str)&&c(this,Sh).html||null},XB=function(){var i,t,e;return((e=(t=(i=c(this,hr,N2))==null?void 0:i.attributes)==null?void 0:t.style)==null?void 0:e.fontSize)||0},NU=function(){var i,t,e;return((e=(t=(i=c(this,hr,N2))==null?void 0:i.attributes)==null?void 0:t.style)==null?void 0:e.color)||null},zP=function(i){const t=[],e={str:i,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},r={style:{color:c(this,hr,NU),fontSize:c(this,hr,XB)?`calc(${c(this,hr,XB)}px * var(--total-scale-factor))`:""}};for(const n of i.split(`
|
|
264
|
-
`))t.push({name:"span",value:n,attributes:r});return e},qP=function(i){i.altKey||i.shiftKey||i.ctrlKey||i.metaKey||(i.key==="Enter"||i.key==="Escape"&&c(this,Jo))&&_(this,hr,ty).call(this)},PU=function(){if(c(this,xh)!==null)return;const{page:{view:i},viewport:{rawDims:{pageWidth:t,pageHeight:e,pageX:r,pageY:n}}}=c(this,d0);let s=!!c(this,f0),A=s?c(this,f0):c(this,Jv);for(const f of c(this,Wf))if(!A||Nt.intersect(f.data.rect,A)!==null){A=f.data.rect,s=!0;break}const a=Nt.normalizeRect([A[0],i[3]-A[1]+i[1],A[2],i[3]-A[3]+i[1]]),o=s?A[2]-A[0]+5:0,l=a[0]+o,h=a[1];F(this,xh,[100*(l-r)/t,100*(h-n)/e]);const{style:u}=c(this,vi);u.left=`${c(this,xh)[0]}%`,u.top=`${c(this,xh)[1]}%`},ty=function(){if(c(this,CA)){c(this,CA).toggleCommentPopup(this,!1);return}F(this,Jo,!c(this,Jo)),c(this,Jo)?(_(this,hr,ey).call(this),c(this,vi).addEventListener("click",c(this,mm)),c(this,vi).addEventListener("keydown",c(this,Bu))):(_(this,hr,u4).call(this),c(this,vi).removeEventListener("click",c(this,mm)),c(this,vi).removeEventListener("keydown",c(this,Bu)))},ey=function(){c(this,vA)||this.render(),this.isVisible?c(this,Jo)&&c(this,vi).classList.add("focused"):(_(this,hr,PU).call(this),c(this,vi).hidden=!1,c(this,vi).style.zIndex=parseInt(c(this,vi).style.zIndex,10)+1e3)},u4=function(){c(this,vi).classList.remove("focused"),!(c(this,Jo)||!this.isVisible)&&(c(this,vi).hidden=!0,c(this,vi).style.zIndex=parseInt(c(this,vi).style.zIndex,10)-1e3)};class XP extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=Se.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=this.contentElement=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const r=document.createElement("span");r.textContent=e,t.append(r)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}var P2;class LW extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),U(this,P2,null)}render(){this.container.classList.add("lineAnnotation");const{data:t,width:e,height:r}=this,n=this.svgFactory.create(e,r,!0),s=F(this,P2,this.svgFactory.createElement("svg:line"));return s.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),s.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),s.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),s.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),s.setAttribute("stroke-width",t.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,P2)}addHighlightArea(){this.container.classList.add("highlightArea")}}P2=new WeakMap;var D2;class _W extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),U(this,D2,null)}render(){this.container.classList.add("squareAnnotation");const{data:t,width:e,height:r}=this,n=this.svgFactory.create(e,r,!0),s=t.borderStyle.width,A=F(this,D2,this.svgFactory.createElement("svg:rect"));return A.setAttribute("x",s/2),A.setAttribute("y",s/2),A.setAttribute("width",e-s),A.setAttribute("height",r-s),A.setAttribute("stroke-width",s||1),A.setAttribute("stroke","transparent"),A.setAttribute("fill","transparent"),n.append(A),this.container.append(n),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,D2)}addHighlightArea(){this.container.classList.add("highlightArea")}}D2=new WeakMap;var O2;class MW extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),U(this,O2,null)}render(){this.container.classList.add("circleAnnotation");const{data:t,width:e,height:r}=this,n=this.svgFactory.create(e,r,!0),s=t.borderStyle.width,A=F(this,O2,this.svgFactory.createElement("svg:ellipse"));return A.setAttribute("cx",e/2),A.setAttribute("cy",r/2),A.setAttribute("rx",e/2-s/2),A.setAttribute("ry",r/2-s/2),A.setAttribute("stroke-width",s||1),A.setAttribute("stroke","transparent"),A.setAttribute("fill","transparent"),n.append(A),this.container.append(n),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,O2)}addHighlightArea(){this.container.classList.add("highlightArea")}}O2=new WeakMap;var R2;class YP extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),U(this,R2,null),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:e,borderStyle:r,popupRef:n},width:s,height:A}=this;if(!e)return this.container;const a=this.svgFactory.create(s,A,!0);let o=[];for(let h=0,u=e.length;h<u;h+=2){const f=e[h]-t[0],d=t[3]-e[h+1];o.push(`${f},${d}`)}o=o.join(" ");const l=F(this,R2,this.svgFactory.createElement(this.svgElementName));return l.setAttribute("points",o),l.setAttribute("stroke-width",r.width||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),a.append(l),this.container.append(a),!n&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,R2)}addHighlightArea(){this.container.classList.add("highlightArea")}}R2=new WeakMap;class TW extends YP{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class NW extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}}var H2,mf,V2,d4;class XS extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),U(this,V2),U(this,H2,null),U(this,mf,[]),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?Se.HIGHLIGHT:Se.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,rotation:e,inkLists:r,borderStyle:n,popupRef:s}}=this,{transform:A,width:a,height:o}=_(this,V2,d4).call(this,e,t),l=this.svgFactory.create(a,o,!0),h=F(this,H2,this.svgFactory.createElement("svg:g"));l.append(h),h.setAttribute("stroke-width",n.width||1),h.setAttribute("stroke-linecap","round"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit",10),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),h.setAttribute("transform",A);for(let u=0,f=r.length;u<f;u++){const d=this.svgFactory.createElement(this.svgElementName);c(this,mf).push(d),d.setAttribute("points",r[u].join(",")),h.append(d)}return!s&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(l),this._editOnDoubleClick(),this.container}updateEdited(t){super.updateEdited(t);const{thickness:e,points:r,rect:n}=t,s=c(this,H2);if(e>=0&&s.setAttribute("stroke-width",e||1),r)for(let A=0,a=c(this,mf).length;A<a;A++)c(this,mf)[A].setAttribute("points",r[A].join(","));if(n){const{transform:A,width:a,height:o}=_(this,V2,d4).call(this,this.data.rotation,n);s.parentElement.setAttribute("viewBox",`0 0 ${a} ${o}`),s.setAttribute("transform",A)}}getElementsToTriggerPopup(){return c(this,mf)}addHighlightArea(){this.container.classList.add("highlightArea")}}H2=new WeakMap,mf=new WeakMap,V2=new WeakSet,d4=function(i,t){switch(i){case 90:return{transform:`rotate(90) translate(${-t[0]},${t[1]}) scale(1,-1)`,width:t[3]-t[1],height:t[2]-t[0]};case 180:return{transform:`rotate(180) translate(${-t[2]},${t[1]}) scale(1,-1)`,width:t[2]-t[0],height:t[3]-t[1]};case 270:return{transform:`rotate(270) translate(${-t[2]},${t[3]}) scale(1,-1)`,width:t[3]-t[1],height:t[2]-t[0]};default:return{transform:`translate(${-t[0]},${t[3]}) scale(1,-1)`,width:t[2]-t[0],height:t[3]-t[1]}}};class $P extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=Se.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const r=document.createElement("mark");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class PW extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("underlineAnnotation"),t){const r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class DW extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("squigglyAnnotation"),t){const r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class OW extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("strikeoutAnnotation"),t){const r=document.createElement("s");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class ZP extends xi{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=Se.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}var W2,j2,f4;class RW extends xi{constructor(t){var e;super(t,{isRenderable:!0}),U(this,j2),U(this,W2,null);const{file:r}=this.data;this.filename=r.filename,this.content=r.content,(e=this.linkService.eventBus)==null||e.dispatch("fileattachmentannotation",{source:this,...r})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:e}=this;let r;e.hasAppearance||e.fillAlpha===0?r=document.createElement("div"):(r=document.createElement("img"),r.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(e.name)?"paperclip":"pushpin"}.svg`,e.fillAlpha&&e.fillAlpha<1&&(r.style=`filter: opacity(${Math.round(e.fillAlpha*100)}%);`)),r.addEventListener("dblclick",_(this,j2,f4).bind(this)),F(this,W2,r);const{isMac:n}=Fi.platform;return t.addEventListener("keydown",s=>{s.key==="Enter"&&(n?s.metaKey:s.ctrlKey)&&_(this,j2,f4).call(this)}),!e.popupRef&&this.hasPopupData?(this.hasOwnCommentButton=!0,this._createPopup()):r.classList.add("popupTriggerArea"),t.append(r),t}getElementsToTriggerPopup(){return c(this,W2)}addHighlightArea(){this.container.classList.add("highlightArea")}}W2=new WeakMap,j2=new WeakSet,f4=function(){var i;(i=this.downloadManager)==null||i.openOrDownloadData(this.content,this.filename)};var dp,jf,ym,uu,ry,wf,QA,K2,Gc,G2,p4;const HW=class JP{constructor({div:t,accessibilityManager:e,annotationCanvasMap:r,annotationEditorUIManager:n,page:s,viewport:A,structTreeLayer:a,commentManager:o,linkService:l,annotationStorage:h}){U(this,Gc),U(this,dp,null),U(this,jf,null),U(this,ym,null),U(this,uu,new Map),U(this,ry,null),U(this,wf,null),U(this,QA,[]),U(this,K2,!1),ut(this,"zIndex",0),this.div=t,F(this,dp,e),F(this,jf,r),F(this,ry,a||null),F(this,wf,l||null),F(this,ym,h||new WS),this.page=s,this.viewport=A,this._annotationEditorUIManager=n,this._commentManager=o||null}hasEditableAnnotations(){return c(this,uu).size>0}async render(t){var e;const{annotations:r}=t,n=this.div;Wh(n,this.viewport);const s=new Map,A=[],a={data:null,layer:n,linkService:c(this,wf),downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new D0,annotationStorage:c(this,ym),enableComment:t.enableComment===!0,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const o of r){if(o.noHTML)continue;const l=o.annotationType===gi.POPUP;if(l){const f=s.get(o.id);if(!f)continue;if(!this._commentManager){A.push(o);continue}a.elements=f}else if(o.rect[2]===o.rect[0]||o.rect[3]===o.rect[1])continue;a.data=o;const h=qB.create(a);if(!h.isRenderable)continue;l||(c(this,QA).push(h),o.popupRef&&s.getOrInsertComputed(o.popupRef,Dy).push(h));const u=h.render();o.hidden&&(u.style.visibility="hidden"),h._isEditable&&(c(this,uu).set(h.data.id,h),(e=this._annotationEditorUIManager)==null||e.renderAnnotationElement(h))}await _(this,Gc,G2).call(this);for(const o of A){const l=a.elements=s.get(o.id);a.data=o;const h=qB.create(a);if(!h.isRenderable)continue;const u=h.render();h.contentElement.id=`${sp}${o.id}`,o.hidden&&(u.style.visibility="hidden"),l.at(-1).container.after(u)}_(this,Gc,p4).call(this)}async addLinkAnnotations(t){const e={data:null,layer:this.div,linkService:c(this,wf),svgFactory:new D0,parent:this};for(const r of t){r.borderStyle||(r.borderStyle=JP._defaultBorderStyle),e.data=r;const n=qB.create(e);n.isRenderable&&(n.render(),n.contentElement.id=`${sp}${r.id}`,c(this,QA).push(n))}await _(this,Gc,G2).call(this)}update({viewport:t}){const e=this.div;this.viewport=t,Wh(e,{rotation:t.rotation}),_(this,Gc,p4).call(this),e.hidden=!1}getEditableAnnotations(){return c(this,uu).values()}getEditableAnnotation(t){return c(this,uu).get(t)}addFakeAnnotation(t){const{div:e}=this,{id:r,rotation:n}=t,s=new xW({data:{id:r,rect:t.getPDFRect(),rotation:n},editor:t,layer:e,parent:this,enableComment:!!this._commentManager,linkService:c(this,wf),annotationStorage:c(this,ym)});return s.render(),s.contentElement.id=`${sp}${r}`,s.createOrUpdatePopup(),c(this,QA).push(s),s}removeAnnotation(t){var e;const r=c(this,QA).findIndex(s=>s.data.id===t);if(r<0)return;const[n]=c(this,QA).splice(r,1);(e=c(this,dp))==null||e.removePointerInTextLayer(n.contentElement)}updateFakeAnnotations(t){if(t.length!==0){for(const e of t)e.updateFakeAnnotationElement(this);_(this,Gc,G2).call(this)}}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}static get _defaultBorderStyle(){return ke(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:Id.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};dp=new WeakMap,jf=new WeakMap,ym=new WeakMap,uu=new WeakMap,ry=new WeakMap,wf=new WeakMap,QA=new WeakMap,K2=new WeakMap,Gc=new WeakSet,G2=async function(){var i,t,e;if(c(this,QA).length===0)return;this.div.replaceChildren();const r=[];if(!c(this,K2)){F(this,K2,!0);for(const{contentElement:s,data:{id:A}}of c(this,QA)){const a=s.id=`${sp}${A}`;r.push((i=c(this,ry))==null?void 0:i.getAriaAttributes(a).then(o=>{if(o)for(const[l,h]of o)s.setAttribute(l,h)}))}}c(this,QA).sort(({data:{rect:[s,A,a,o]}},{data:{rect:[l,h,u,f]}})=>{if(s===a&&A===o)return 1;if(l===u&&h===f)return-1;const d=o,g=A,m=(A+o)/2,y=f,w=h,b=(h+f)/2;if(m>=y&&b<=g)return-1;if(b>=d&&m<=w)return 1;const C=(s+a)/2,S=(l+u)/2;return C-S});const n=document.createDocumentFragment();for(const s of c(this,QA))n.append(s.container),this._commentManager?(e=((t=s.extraPopupElement)==null?void 0:t.popup)||s.popup)==null||e.renderCommentButton():s.extraPopupElement&&n.append(s.extraPopupElement.render());if(this.div.append(n),await Promise.all(r),c(this,dp))for(const s of c(this,QA))c(this,dp).addPointerInTextLayer(s.contentElement,!1)},p4=function(){var i;if(!c(this,jf))return;const t=this.div;for(const[e,r]of c(this,jf)){const n=t.querySelector(`[data-annotation-id="${e}"]`);if(!n)continue;r.className="annotationContent";const{firstChild:s}=n;s?s.nodeName==="CANVAS"?s.replaceWith(r):s.classList.contains("annotationContent")?s.after(r):s.before(r):n.append(r);const A=c(this,uu).get(e);A&&(A._hasNoCanvas?((i=this._annotationEditorUIManager)==null||i.setMissingCanvas(e,n.id,r),A._hasNoCanvas=!1):A.canvas=r)}c(this,jf).clear()};let t6=HW;const z2=/\r\n?|\n/g;var FA,q2,vf,SA,$s,e6,r6,i6,iy,Cu,ny,X2,n6,g4,s6;const Vo=class On extends Vr{constructor(t){super({...t,name:"freeTextEditor"}),U(this,$s),U(this,FA,""),U(this,q2,`${this.id}-editor`),U(this,vf,null),U(this,SA),ut(this,"_colorPicker",null),this.color=t.color||On._defaultColor||Vr._defaultLineColor,F(this,SA,t.fontSize||On._defaultFontSize),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert"),this.canAddComment=!1}static get _keyboardManager(){const t=On.prototype,e=s=>s.isEmpty(),r=Cp.TRANSLATE_SMALL,n=Cp.TRANSLATE_BIG;return ke(this,"_keyboardManager",new $0([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[r,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[n,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:e}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,r],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,n],checker:e}]]))}static initialize(t,e){Vr.initialize(t,e);const r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,e){switch(t){case _e.FREETEXT_SIZE:On._defaultFontSize=e;break;case _e.FREETEXT_COLOR:On._defaultColor=e;break}}updateParams(t,e){switch(t){case _e.FREETEXT_SIZE:_(this,$s,e6).call(this,e);break;case _e.FREETEXT_COLOR:_(this,$s,r6).call(this,e);break}}static get defaultPropertiesToUpdate(){return[[_e.FREETEXT_SIZE,On._defaultFontSize],[_e.FREETEXT_COLOR,On._defaultColor||Vr._defaultLineColor]]}get propertiesToUpdate(){return[[_e.FREETEXT_SIZE,c(this,SA)],[_e.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new VP(this)),[["colorPicker",this._colorPicker]]}get colorType(){return _e.FREETEXT_COLOR}onUpdatedColor(){var t;this.editorDiv.style.color=this.color,(t=this._colorPicker)==null||t.update(this.color),super.onUpdatedColor()}_translateEmpty(t,e){this._uiManager.translateSelectedEditors(t,e,!0)}getInitialTranslation(){const t=this.parentScale;return[-On._internalPadding*t,-(On._internalPadding+c(this,SA))*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),F(this,vf,new AbortController);const t=this._uiManager.combinedSignal(c(this,vf));return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t}),!0}disableEditMode(){var t;return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",c(this,q2)),this._isDraggable=!0,(t=c(this,vf))==null||t.abort(),F(this,vf,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(t){var e;this.width||(this.enableEditMode(),t&&this.editorDiv.focus(),(e=this._initialOptions)!=null&&e.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=c(this,FA),e=F(this,FA,_(this,$s,i6).call(this).trimEnd());if(t===e)return;const r=n=>{if(F(this,FA,n),!n){this.remove();return}_(this,$s,X2).call(this),this._uiManager.rebuild(this),_(this,$s,iy).call(this)};this.addCommands({cmd:()=>{r(e)},undo:()=>{r(t)},mustExec:!1}),_(this,$s,iy).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){On._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let t,e;(this._isCopy||this.annotationElementId)&&(t=this.x,e=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",c(this,q2)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:r}=this.editorDiv;if(r.fontSize=`calc(${c(this,SA)}px * var(--total-scale-factor))`,r.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[n,s]=this.parentDimensions;if(this.annotationElementId){const{position:A}=this._initialData;let[a,o]=this.getInitialTranslation();[a,o]=this.pageTranslationToScreen(a,o);const[l,h]=this.pageDimensions,[u,f]=this.pageTranslation;let d,g;switch(this.rotation){case 0:d=t+(A[0]-u)/l,g=e+this.height-(A[1]-f)/h;break;case 90:d=t+(A[0]-u)/l,g=e-(A[1]-f)/h,[a,o]=[o,-a];break;case 180:d=t-this.width+(A[0]-u)/l,g=e-(A[1]-f)/h,[a,o]=[-a,-o];break;case 270:d=t+(A[0]-u-this.height*h)/l,g=e+(A[1]-f-this.width*l)/h,[a,o]=[-o,a];break}this.setAt(d*n,g*s,a,o)}else this._moveAfterPaste(t,e);_(this,$s,X2).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){var e,r,n;const s=t.clipboardData||window.clipboardData,{types:A}=s;if(A.length===1&&A[0]==="text/plain")return;t.preventDefault();const a=_(e=On,Cu,g4).call(e,s.getData("text")||"").replaceAll(z2,`
|
|
265
|
-
`);if(!a)return;const o=window.getSelection();if(!o.rangeCount)return;this.editorDiv.normalize(),o.deleteFromDocument();const l=o.getRangeAt(0);if(!a.includes(`
|
|
266
|
-
`)){l.insertNode(document.createTextNode(a)),this.editorDiv.normalize(),o.collapseToStart();return}const{startContainer:h,startOffset:u}=l,f=[],d=[];if(h.nodeType===Node.TEXT_NODE){const y=h.parentElement;if(d.push(h.nodeValue.slice(u).replaceAll(z2,"")),y!==this.editorDiv){let w=f;for(const b of this.editorDiv.childNodes){if(b===y){w=d;continue}w.push(_(r=On,Cu,ny).call(r,b))}}f.push(h.nodeValue.slice(0,u).replaceAll(z2,""))}else if(h===this.editorDiv){let y=f,w=0;for(const b of this.editorDiv.childNodes)w++===u&&(y=d),y.push(_(n=On,Cu,ny).call(n,b))}F(this,FA,`${f.join(`
|
|
267
|
-
`)}${a}${d.join(`
|
|
268
|
-
`)}`),_(this,$s,X2).call(this);const g=new Range;let m=Math.sumPrecise(f.map(y=>y.length));for(const{firstChild:y}of this.editorDiv.childNodes)if(y.nodeType===Node.TEXT_NODE){const w=y.nodeValue.length;if(m<=w){g.setStart(y,m),g.setEnd(y,m);break}m-=w}o.removeAllRanges(),o.addRange(g)}get contentDiv(){return this.editorDiv}getPDFRect(){const t=On._internalPadding*this.parentScale;return this.getRect(t,t)}static async deserialize(t,e,r){var n;let s=null;if(t instanceof XP){const{data:{defaultAppearanceData:{fontSize:a,fontColor:o},rect:l,rotation:h,id:u,popupRef:f,richText:d,contentsObj:g,creationDate:m,modificationDate:y},textContent:w,textPosition:b,parent:{page:{pageNumber:C}}}=t;if(!w||w.length===0)return null;s=t={annotationType:Se.FREETEXT,color:Array.from(o),fontSize:a,value:w.join(`
|
|
269
|
-
`),position:b,pageIndex:C-1,rect:l.slice(0),rotation:h,annotationElementId:u,id:u,deleted:!1,popupRef:f,comment:(g==null?void 0:g.str)||null,richText:d,creationDate:m,modificationDate:y}}const A=await super.deserialize(t,e,r);return F(A,SA,t.fontSize),A.color=Nt.makeHexColor(...t.color),F(A,FA,_(n=On,Cu,g4).call(n,t.value)),A._initialData=s,t.comment&&A.setCommentData(t),A}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const e=Vr._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),r=Object.assign(super.serialize(t),{color:e,fontSize:c(this,SA),value:_(this,$s,n6).call(this)});return this.addComment(r),t?(r.isCopy=!0,r):this.annotationElementId&&!_(this,$s,s6).call(this,r)?null:(r.id=this.annotationElementId,r)}renderAnnotationElement(t){const e=super.renderAnnotationElement(t);if(!e)return null;const{style:r}=e;r.fontSize=`calc(${c(this,SA)}px * var(--total-scale-factor))`,r.color=this.color,e.replaceChildren();for(const n of c(this,FA).split(`
|
|
270
|
-
`)){const s=document.createElement("div");s.append(n?document.createTextNode(n):document.createElement("br")),e.append(s)}return t.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:c(this,FA)}}),e}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}};FA=new WeakMap,q2=new WeakMap,vf=new WeakMap,SA=new WeakMap,$s=new WeakSet,e6=function(i){const t=r=>{this.editorDiv.style.fontSize=`calc(${r}px * var(--total-scale-factor))`,this.translate(0,-(r-c(this,SA))*this.parentScale),F(this,SA,r),_(this,$s,iy).call(this)},e=c(this,SA);this.addCommands({cmd:t.bind(this,i),undo:t.bind(this,e),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_e.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},r6=function(i){const t=r=>{this.color=r,this.onUpdatedColor()},e=this.color;this.addCommands({cmd:t.bind(this,i),undo:t.bind(this,e),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_e.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},i6=function(){var i;const t=[];this.editorDiv.normalize();let e=null;for(const r of this.editorDiv.childNodes)(e==null?void 0:e.nodeType)===Node.TEXT_NODE&&r.nodeName==="BR"||(t.push(_(i=Vo,Cu,ny).call(i,r)),e=r);return t.join(`
|
|
271
|
-
`)},iy=function(){const[i,t]=this.parentDimensions;let e;if(this.isAttachedToDOM)e=this.div.getBoundingClientRect();else{const{currentLayer:r,div:n}=this,s=n.style.display,A=n.classList.contains("hidden");n.classList.remove("hidden"),n.style.display="hidden",r.div.append(this.div),e=n.getBoundingClientRect(),n.remove(),n.style.display=s,n.classList.toggle("hidden",A)}this.rotation%180===this.parentRotation%180?(this.width=e.width/i,this.height=e.height/t):(this.width=e.height/i,this.height=e.width/t),this.fixAndSetPosition()},Cu=new WeakSet,ny=function(i){return(i.nodeType===Node.TEXT_NODE?i.nodeValue:i.innerText).replaceAll(z2,"")},X2=function(){if(this.editorDiv.replaceChildren(),!!c(this,FA))for(const i of c(this,FA).split(`
|
|
272
|
-
`)){const t=document.createElement("div");t.append(i?document.createTextNode(i):document.createElement("br")),this.editorDiv.append(t)}},n6=function(){return c(this,FA).replaceAll(" "," ")},g4=function(i){return i.replaceAll(" "," ")},s6=function(i){const{value:t,fontSize:e,color:r,pageIndex:n}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||i.value!==t||i.fontSize!==e||i.color.some((s,A)=>s!==r[A])||i.pageIndex!==n},U(Vo,Cu),ut(Vo,"_freeTextDefaultContent",""),ut(Vo,"_internalPadding",0),ut(Vo,"_defaultColor",null),ut(Vo,"_defaultFontSize",10),ut(Vo,"_type","freetext"),ut(Vo,"_editorType",Se.FREETEXT);let VW=Vo;class Jt{toSVGPath(){rr("Abstract method `toSVGPath` must be implemented.")}get box(){rr("Abstract getter `box` must be implemented.")}serialize(t,e){rr("Abstract method `serialize` must be implemented.")}static _rescale(t,e,r,n,s,A){A||(A=new Float32Array(t.length));for(let a=0,o=t.length;a<o;a+=2)A[a]=e+t[a]*n,A[a+1]=r+t[a+1]*s;return A}static _rescaleAndSwap(t,e,r,n,s,A){A||(A=new Float32Array(t.length));for(let a=0,o=t.length;a<o;a+=2)A[a]=e+t[a+1]*n,A[a+1]=r+t[a]*s;return A}static _translate(t,e,r,n){n||(n=new Float32Array(t.length));for(let s=0,A=t.length;s<A;s+=2)n[s]=e+t[s],n[s+1]=r+t[s+1];return n}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,e,r,n,s){switch(s){case 90:return[1-e/r,t/n];case 180:return[1-t/r,1-e/n];case 270:return[e/r,1-t/n];default:return[t/r,e/n]}}static _normalizePagePoint(t,e,r){switch(r){case 90:return[1-e,t];case 180:return[1-t,1-e];case 270:return[e,1-t];default:return[t,e]}}static createBezierPoints(t,e,r,n,s,A){return[(t+5*r)/6,(e+5*n)/6,(5*r+s)/6,(5*n+A)/6,(r+s)/2,(n+A)/2]}}ut(Jt,"PRECISION",1e-4);var kA,$a,p0,g0,Wo,He,fp,pp,Y2,$2,m0,bm,zc,Z2,YB,m4,UA,ng,A6,a6,o6,l6,h6,c6;const yf=class w4{constructor({x:t,y:e},r,n,s,A,a=0){U(this,UA),U(this,kA),U(this,$a,[]),U(this,p0),U(this,g0),U(this,Wo,[]),U(this,He,new Float32Array(18)),U(this,fp),U(this,pp),U(this,Y2),U(this,$2),U(this,m0),U(this,bm),U(this,zc,[]),F(this,kA,r),F(this,bm,s*n),F(this,g0,A),c(this,He).set([NaN,NaN,NaN,NaN,t,e],6),F(this,p0,a),F(this,$2,c(w4,Z2)*n),F(this,Y2,c(w4,m4)*n),F(this,m0,n),c(this,zc).push(t,e)}isEmpty(){return isNaN(c(this,He)[8])}add({x:t,y:e}){var r;F(this,fp,t),F(this,pp,e);const[n,s,A,a]=c(this,kA);let[o,l,h,u]=c(this,He).subarray(8,12);const f=t-h,d=e-u,g=Math.hypot(f,d);if(g<c(this,Y2))return!1;const m=g-c(this,$2),y=m/g,w=y*f,b=y*d;let C=o,S=l;o=h,l=u,h+=w,u+=b,(r=c(this,zc))==null||r.push(t,e);const k=-b/m,I=w/m,N=k*c(this,bm),D=I*c(this,bm);return c(this,He).set(c(this,He).subarray(2,8),0),c(this,He).set([h+N,u+D],4),c(this,He).set(c(this,He).subarray(14,18),12),c(this,He).set([h-N,u-D],16),isNaN(c(this,He)[6])?(c(this,Wo).length===0&&(c(this,He).set([o+N,l+D],2),c(this,Wo).push(NaN,NaN,NaN,NaN,(o+N-n)/A,(l+D-s)/a),c(this,He).set([o-N,l-D],14),c(this,$a).push(NaN,NaN,NaN,NaN,(o-N-n)/A,(l-D-s)/a)),c(this,He).set([C,S,o,l,h,u],6),!this.isEmpty()):(c(this,He).set([C,S,o,l,h,u],6),Math.abs(Math.atan2(S-l,C-o)-Math.atan2(b,w))<Math.PI/2?([o,l,h,u]=c(this,He).subarray(2,6),c(this,Wo).push(NaN,NaN,NaN,NaN,((o+h)/2-n)/A,((l+u)/2-s)/a),[o,l,C,S]=c(this,He).subarray(14,18),c(this,$a).push(NaN,NaN,NaN,NaN,((C+o)/2-n)/A,((S+l)/2-s)/a),!0):([C,S,o,l,h,u]=c(this,He).subarray(0,6),c(this,Wo).push(((C+5*o)/6-n)/A,((S+5*l)/6-s)/a,((5*o+h)/6-n)/A,((5*l+u)/6-s)/a,((o+h)/2-n)/A,((l+u)/2-s)/a),[h,u,o,l,C,S]=c(this,He).subarray(12,18),c(this,$a).push(((C+5*o)/6-n)/A,((S+5*l)/6-s)/a,((5*o+h)/6-n)/A,((5*l+u)/6-s)/a,((o+h)/2-n)/A,((l+u)/2-s)/a),!0))}toSVGPath(){if(this.isEmpty())return"";const t=c(this,Wo),e=c(this,$a);if(isNaN(c(this,He)[6])&&!this.isEmpty())return _(this,UA,A6).call(this);const r=[];r.push(`M${t[4]} ${t[5]}`);for(let n=6;n<t.length;n+=6)isNaN(t[n])?r.push(`L${t[n+4]} ${t[n+5]}`):r.push(`C${t[n]} ${t[n+1]} ${t[n+2]} ${t[n+3]} ${t[n+4]} ${t[n+5]}`);_(this,UA,o6).call(this,r);for(let n=e.length-6;n>=6;n-=6)isNaN(e[n])?r.push(`L${e[n+4]} ${e[n+5]}`):r.push(`C${e[n]} ${e[n+1]} ${e[n+2]} ${e[n+3]} ${e[n+4]} ${e[n+5]}`);return _(this,UA,a6).call(this,r),r.join(" ")}newFreeDrawOutline(t,e,r,n,s,A){return new f6(t,e,r,n,s,A)}getOutlines(){var t;const e=c(this,Wo),r=c(this,$a),n=c(this,He),[s,A,a,o]=c(this,kA),l=new Float32Array((((t=c(this,zc))==null?void 0:t.length)??0)+2);for(let f=0,d=l.length-2;f<d;f+=2)l[f]=(c(this,zc)[f]-s)/a,l[f+1]=(c(this,zc)[f+1]-A)/o;if(l[l.length-2]=(c(this,fp)-s)/a,l[l.length-1]=(c(this,pp)-A)/o,isNaN(n[6])&&!this.isEmpty())return _(this,UA,l6).call(this,l);const h=new Float32Array(c(this,Wo).length+24+c(this,$a).length);let u=e.length;for(let f=0;f<u;f+=2){if(isNaN(e[f])){h[f]=h[f+1]=NaN;continue}h[f]=e[f],h[f+1]=e[f+1]}u=_(this,UA,c6).call(this,h,u);for(let f=r.length-6;f>=6;f-=6)for(let d=0;d<6;d+=2){if(isNaN(r[f+d])){h[u]=h[u+1]=NaN,u+=2;continue}h[u]=r[f+d],h[u+1]=r[f+d+1],u+=2}return _(this,UA,h6).call(this,h,u),this.newFreeDrawOutline(h,l,c(this,kA),c(this,m0),c(this,p0),c(this,g0))}};kA=new WeakMap,$a=new WeakMap,p0=new WeakMap,g0=new WeakMap,Wo=new WeakMap,He=new WeakMap,fp=new WeakMap,pp=new WeakMap,Y2=new WeakMap,$2=new WeakMap,m0=new WeakMap,bm=new WeakMap,zc=new WeakMap,Z2=new WeakMap,YB=new WeakMap,m4=new WeakMap,UA=new WeakSet,ng=function(){const i=c(this,He).subarray(4,6),t=c(this,He).subarray(16,18),[e,r,n,s]=c(this,kA);return[(c(this,fp)+(i[0]-t[0])/2-e)/n,(c(this,pp)+(i[1]-t[1])/2-r)/s,(c(this,fp)+(t[0]-i[0])/2-e)/n,(c(this,pp)+(t[1]-i[1])/2-r)/s]},A6=function(){const[i,t,e,r]=c(this,kA),[n,s,A,a]=_(this,UA,ng).call(this);return`M${(c(this,He)[2]-i)/e} ${(c(this,He)[3]-t)/r} L${(c(this,He)[4]-i)/e} ${(c(this,He)[5]-t)/r} L${n} ${s} L${A} ${a} L${(c(this,He)[16]-i)/e} ${(c(this,He)[17]-t)/r} L${(c(this,He)[14]-i)/e} ${(c(this,He)[15]-t)/r} Z`},a6=function(i){const t=c(this,$a);i.push(`L${t[4]} ${t[5]} Z`)},o6=function(i){const[t,e,r,n]=c(this,kA),s=c(this,He).subarray(4,6),A=c(this,He).subarray(16,18),[a,o,l,h]=_(this,UA,ng).call(this);i.push(`L${(s[0]-t)/r} ${(s[1]-e)/n} L${a} ${o} L${l} ${h} L${(A[0]-t)/r} ${(A[1]-e)/n}`)},l6=function(i){const t=c(this,He),[e,r,n,s]=c(this,kA),[A,a,o,l]=_(this,UA,ng).call(this),h=new Float32Array(36);return h.set([NaN,NaN,NaN,NaN,(t[2]-e)/n,(t[3]-r)/s,NaN,NaN,NaN,NaN,(t[4]-e)/n,(t[5]-r)/s,NaN,NaN,NaN,NaN,A,a,NaN,NaN,NaN,NaN,o,l,NaN,NaN,NaN,NaN,(t[16]-e)/n,(t[17]-r)/s,NaN,NaN,NaN,NaN,(t[14]-e)/n,(t[15]-r)/s],0),this.newFreeDrawOutline(h,i,c(this,kA),c(this,m0),c(this,p0),c(this,g0))},h6=function(i,t){const e=c(this,$a);return i.set([NaN,NaN,NaN,NaN,e[4],e[5]],t),t+=6},c6=function(i,t){const e=c(this,He).subarray(4,6),r=c(this,He).subarray(16,18),[n,s,A,a]=c(this,kA),[o,l,h,u]=_(this,UA,ng).call(this);return i.set([NaN,NaN,NaN,NaN,(e[0]-n)/A,(e[1]-s)/a,NaN,NaN,NaN,NaN,o,l,NaN,NaN,NaN,NaN,h,u,NaN,NaN,NaN,NaN,(r[0]-n)/A,(r[1]-s)/a],t),t+=24},U(yf,Z2,8),U(yf,YB,2),U(yf,m4,c(yf,Z2)+c(yf,YB));let u6=yf;var Bm,Kf,Eh,J2,wA,tv,Ti,v4,d6;class f6 extends Jt{constructor(t,e,r,n,s,A){super(),U(this,v4),U(this,Bm),U(this,Kf,new Float32Array(4)),U(this,Eh),U(this,J2),U(this,wA),U(this,tv),U(this,Ti),F(this,Ti,t),F(this,wA,e),F(this,Bm,r),F(this,tv,n),F(this,Eh,s),F(this,J2,A),this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],_(this,v4,d6).call(this,A);const[a,o,l,h]=c(this,Kf);for(let u=0,f=t.length;u<f;u+=2)t[u]=(t[u]-a)/l,t[u+1]=(t[u+1]-o)/h;for(let u=0,f=e.length;u<f;u+=2)e[u]=(e[u]-a)/l,e[u+1]=(e[u+1]-o)/h}toSVGPath(){const t=[`M${c(this,Ti)[4]} ${c(this,Ti)[5]}`];for(let e=6,r=c(this,Ti).length;e<r;e+=6){if(isNaN(c(this,Ti)[e])){t.push(`L${c(this,Ti)[e+4]} ${c(this,Ti)[e+5]}`);continue}t.push(`C${c(this,Ti)[e]} ${c(this,Ti)[e+1]} ${c(this,Ti)[e+2]} ${c(this,Ti)[e+3]} ${c(this,Ti)[e+4]} ${c(this,Ti)[e+5]}`)}return t.push("Z"),t.join(" ")}serialize([t,e,r,n],s){const A=r-t,a=n-e;let o,l;switch(s){case 0:o=Jt._rescale(c(this,Ti),t,n,A,-a),l=Jt._rescale(c(this,wA),t,n,A,-a);break;case 90:o=Jt._rescaleAndSwap(c(this,Ti),t,e,A,a),l=Jt._rescaleAndSwap(c(this,wA),t,e,A,a);break;case 180:o=Jt._rescale(c(this,Ti),r,e,-A,a),l=Jt._rescale(c(this,wA),r,e,-A,a);break;case 270:o=Jt._rescaleAndSwap(c(this,Ti),r,n,-A,-a),l=Jt._rescaleAndSwap(c(this,wA),r,n,-A,-a);break}return{outline:Array.from(o),points:[Array.from(l)]}}get box(){return c(this,Kf)}newOutliner(t,e,r,n,s,A=0){return new u6(t,e,r,n,s,A)}getNewOutline(t,e){const[r,n,s,A]=c(this,Kf),[a,o,l,h]=c(this,Bm),u=s*l,f=A*h,d=r*l+a,g=n*h+o,m=this.newOutliner({x:c(this,wA)[0]*u+d,y:c(this,wA)[1]*f+g},c(this,Bm),c(this,tv),t,c(this,J2),e??c(this,Eh));for(let y=2;y<c(this,wA).length;y+=2)m.add({x:c(this,wA)[y]*u+d,y:c(this,wA)[y+1]*f+g});return m.getOutlines()}}Bm=new WeakMap,Kf=new WeakMap,Eh=new WeakMap,J2=new WeakMap,wA=new WeakMap,tv=new WeakMap,Ti=new WeakMap,v4=new WeakSet,d6=function(i){const t=c(this,Ti);let e=t[4],r=t[5];const n=[e,r,e,r];let s=e,A=r,a=e,o=r;const l=i?Math.max:Math.min,h=new Float32Array(4);for(let f=6,d=t.length;f<d;f+=6){const g=t[f+4],m=t[f+5];isNaN(t[f])?(Nt.pointBoundingBox(g,m,n),A>m?(s=g,A=m):A===m&&(s=l(s,g)),o<m?(a=g,o=m):o===m&&(a=l(a,g))):(h.set(fl,0),Nt.bezierBoundingBox(e,r,...t.slice(f,f+6),h),Nt.rectBoundingBox(...h,n),A>h[1]?(s=h[0],A=h[1]):A===h[1]&&(s=l(s,h[0])),o<h[3]?(a=h[2],o=h[3]):o===h[3]&&(a=l(a,h[2]))),e=g,r=m}const u=c(this,Kf);u[0]=n[0]-c(this,Eh),u[1]=n[1]-c(this,Eh),u[2]=n[2]-n[0]+2*c(this,Eh),u[3]=n[3]-n[1]+2*c(this,Eh),this.firstPoint=[s,A],this.lastPoint=[a,o]};var sy,Ay,ay,qc,Ra,ro,p6,sw,g6,m6,y4;class b4{constructor(t,e=0,r=0,n=!0){U(this,ro),U(this,sy),U(this,Ay),U(this,ay),U(this,qc,[]),U(this,Ra,[]);const s=fl.slice(),A=10**-4;for(const{x:m,y,width:w,height:b}of t){const C=Math.floor((m-e)/A)*A,S=Math.ceil((m+w+e)/A)*A,k=Math.floor((y-e)/A)*A,I=Math.ceil((y+b+e)/A)*A,N=[C,k,I,!0],D=[S,k,I,!1];c(this,qc).push(N,D),Nt.rectBoundingBox(C,k,S,I,s)}const a=s[2]-s[0]+2*r,o=s[3]-s[1]+2*r,l=s[0]-r,h=s[1]-r;let u=n?-1/0:1/0,f=1/0;const d=c(this,qc).at(n?-1:-2),g=[d[0],d[2]];for(const m of c(this,qc)){const[y,w,b,C]=m;!C&&n?w<f?(f=w,u=y):w===f&&(u=Math.max(u,y)):C&&!n&&(w<f?(f=w,u=y):w===f&&(u=Math.min(u,y))),m[0]=(y-l)/a,m[1]=(w-h)/o,m[2]=(b-h)/o}F(this,sy,new Float32Array([l,h,a,o])),F(this,Ay,[u,f]),F(this,ay,g)}getOutlines(){c(this,qc).sort((e,r)=>e[0]-r[0]||e[1]-r[1]||e[2]-r[2]);const t=[];for(const e of c(this,qc))e[3]?(t.push(..._(this,ro,y4).call(this,e)),_(this,ro,g6).call(this,e)):(_(this,ro,m6).call(this,e),t.push(..._(this,ro,y4).call(this,e)));return _(this,ro,p6).call(this,t)}}sy=new WeakMap,Ay=new WeakMap,ay=new WeakMap,qc=new WeakMap,Ra=new WeakMap,ro=new WeakSet,p6=function(i){const t=[],e=new Set;for(const s of i){const[A,a,o]=s;t.push([A,a,s],[A,o,s])}t.sort((s,A)=>s[1]-A[1]||s[0]-A[0]);for(let s=0,A=t.length;s<A;s+=2){const a=t[s][2],o=t[s+1][2];a.push(o),o.push(a),e.add(a),e.add(o)}const r=[];let n;for(;e.size>0;){const s=e.values().next().value;let[A,a,o,l,h]=s;e.delete(s);let u=A,f=a;for(n=[A,o],r.push(n);;){let d;if(e.has(l))d=l;else if(e.has(h))d=h;else break;e.delete(d),[A,a,o,l,h]=d,u!==A&&(n.push(u,f,A,f===a?a:o),u=A),f=f===a?o:a}n.push(u,f)}return new WW(r,c(this,sy),c(this,Ay),c(this,ay))},sw=function(i){const t=c(this,Ra);let e=0,r=t.length-1;for(;e<=r;){const n=e+r>>1,s=t[n][0];if(s===i)return n;s<i?e=n+1:r=n-1}return r+1},g6=function([,i,t]){const e=_(this,ro,sw).call(this,i);c(this,Ra).splice(e,0,[i,t])},m6=function([,i,t]){const e=_(this,ro,sw).call(this,i);for(let r=e;r<c(this,Ra).length;r++){const[n,s]=c(this,Ra)[r];if(n!==i)break;if(n===i&&s===t){c(this,Ra).splice(r,1);return}}for(let r=e-1;r>=0;r--){const[n,s]=c(this,Ra)[r];if(n!==i)break;if(n===i&&s===t){c(this,Ra).splice(r,1);return}}},y4=function(i){const[t,e,r]=i,n=[[t,e,r]],s=_(this,ro,sw).call(this,r);for(let A=0;A<s;A++){const[a,o]=c(this,Ra)[A];for(let l=0,h=n.length;l<h;l++){const[,u,f]=n[l];if(!(o<=u||f<=a)){if(u>=a){if(f>o)n[l][1]=o;else{if(h===1)return[];n.splice(l,1),l--,h--}continue}n[l][2]=a,f>o&&n.push([t,o,f])}}}return n};var ev,Cm;class WW extends Jt{constructor(t,e,r,n){super(),U(this,ev),U(this,Cm),F(this,Cm,t),F(this,ev,e),this.firstPoint=r,this.lastPoint=n}toSVGPath(){const t=[];for(const e of c(this,Cm)){let[r,n]=e;t.push(`M${r} ${n}`);for(let s=2;s<e.length;s+=2){const A=e[s],a=e[s+1];A===r?(t.push(`V${a}`),n=a):a===n&&(t.push(`H${A}`),r=A)}t.push("Z")}return t.join(" ")}serialize([t,e,r,n],s){const A=[],a=r-t,o=n-e;for(const l of c(this,Cm)){const h=new Array(l.length);for(let u=0;u<l.length;u+=2)h[u]=t+l[u]*a,h[u+1]=n-l[u+1]*o;A.push(h)}return A}get box(){return c(this,ev)}get classNamesForOutlining(){return["highlightOutline"]}}ev=new WeakMap,Cm=new WeakMap;class B4 extends u6{newFreeDrawOutline(t,e,r,n,s,A){return new jW(t,e,r,n,s,A)}}class jW extends f6{newOutliner(t,e,r,n,s,A=0){return new B4(t,e,r,n,s,A)}}var w0,oy,_h,Gf,rv,Zs,ly,hy,gp,yA,EA,Gn,v0,y0,hs,xm,ha,iv,or,C4,cy,w6,v6,DU,x4,Xc,cl,mp,y6,nv,uy,b6,B6,C6,x6,F6;const xs=class Rn extends Vr{constructor(t){super({...t,name:"highlightEditor"}),U(this,or),U(this,w0,null),U(this,oy,0),U(this,_h),U(this,Gf,null),U(this,rv,null),U(this,Zs,null),U(this,ly,null),U(this,hy,0),U(this,gp,null),U(this,yA,null),U(this,EA,null),U(this,Gn,!1),U(this,v0,null),U(this,y0,null),U(this,hs,null),U(this,xm,""),U(this,ha),U(this,iv,""),this.color=t.color||Rn._defaultColor,F(this,ha,t.thickness||Rn._defaultThickness),this.opacity=t.opacity||Rn._defaultOpacity,F(this,_h,t.boxes||null),F(this,iv,t.methodOfCreation||""),F(this,xm,t.text||""),this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",t.highlightId>-1?(F(this,Gn,!0),_(this,or,cy).call(this,t),_(this,or,Xc).call(this)):c(this,_h)&&(F(this,w0,t.anchorNode),F(this,oy,t.anchorOffset),F(this,ly,t.focusNode),F(this,hy,t.focusOffset),_(this,or,C4).call(this),_(this,or,Xc).call(this),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}static get _keyboardManager(){const t=Rn.prototype;return ke(this,"_keyboardManager",new $0([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:c(this,Gn)?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:c(this,ha),methodOfCreation:c(this,iv)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}static initialize(t,e){var r;Vr.initialize(t,e),Rn._defaultColor||(Rn._defaultColor=((r=e.highlightColors)==null?void 0:r.values().next().value)||"#fff066")}static updateDefaultParams(t,e){switch(t){case _e.HIGHLIGHT_COLOR:Rn._defaultColor=e;break;case _e.HIGHLIGHT_THICKNESS:Rn._defaultThickness=e;break}}translateInPage(t,e){}get toolbarPosition(){return c(this,y0)}get commentButtonPosition(){return c(this,v0)}updateParams(t,e){switch(t){case _e.HIGHLIGHT_COLOR:_(this,or,w6).call(this,e);break;case _e.HIGHLIGHT_THICKNESS:_(this,or,v6).call(this,e);break}}static get defaultPropertiesToUpdate(){return[[_e.HIGHLIGHT_COLOR,Rn._defaultColor],[_e.HIGHLIGHT_THICKNESS,Rn._defaultThickness]]}get propertiesToUpdate(){return[[_e.HIGHLIGHT_COLOR,this.color||Rn._defaultColor],[_e.HIGHLIGHT_THICKNESS,c(this,ha)||Rn._defaultThickness],[_e.HIGHLIGHT_FREE,c(this,Gn)]]}onUpdatedColor(){var t,e;(t=this.parent)==null||t.drawLayer.updateProperties(c(this,EA),{root:{fill:this.color,"fill-opacity":this.opacity}}),(e=c(this,rv))==null||e.updateColor(this.color),super.onUpdatedColor()}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",F(this,rv,new zS({editor:this}))]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(_(this,or,uy).call(this))}getBaseTranslation(){return[0,0]}getRect(t,e){return super.getRect(t,e,_(this,or,uy).call(this))}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),t&&this.div.focus()}remove(){_(this,or,x4).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(_(this,or,Xc).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){var e;let r=!1;this.parent&&!t?_(this,or,x4).call(this):t&&(_(this,or,Xc).call(this,t),r=!this.parent&&((e=this.div)==null?void 0:e.classList.contains("selectedEditor"))),super.setParent(t),this.show(this._isVisible),r&&this.select()}rotate(t){var e,r,n;const{drawLayer:s}=this.parent;let A;c(this,Gn)?(t=(t-this.rotation+360)%360,A=_(e=Rn,cl,mp).call(e,c(this,yA).box,t)):A=_(r=Rn,cl,mp).call(r,[this.x,this.y,this.width,this.height],t),s.updateProperties(c(this,EA),{bbox:A,root:{"data-main-rotation":t}}),s.updateProperties(c(this,hs),{bbox:_(n=Rn,cl,mp).call(n,c(this,Zs).box,t),root:{"data-main-rotation":t}})}render(){if(this.div)return this.div;const t=super.render();c(this,xm)&&(t.setAttribute("aria-label",c(this,xm)),t.setAttribute("role","mark")),c(this,Gn)?t.classList.add("free"):this.div.addEventListener("keydown",_(this,or,y6).bind(this),{signal:this._uiManager._signal});const e=F(this,gp,document.createElement("div"));return t.append(e),e.setAttribute("aria-hidden","true"),e.className="internal",e.style.clipPath=c(this,Gf),this.setDims(),xN(this,c(this,gp),["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){var t;this.isSelected||(t=this.parent)==null||t.drawLayer.updateProperties(c(this,hs),{rootClass:{hovered:!0}})}pointerleave(){var t;this.isSelected||(t=this.parent)==null||t.drawLayer.updateProperties(c(this,hs),{rootClass:{hovered:!1}})}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:_(this,or,nv).call(this,!0);break;case 1:case 3:_(this,or,nv).call(this,!1);break}}select(){var t;super.select(),c(this,hs)&&((t=this.parent)==null||t.drawLayer.updateProperties(c(this,hs),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var t;super.unselect(),c(this,hs)&&((t=this.parent)==null||t.drawLayer.updateProperties(c(this,hs),{rootClass:{selected:!1}}),c(this,Gn)||_(this,or,nv).call(this,!1))}get _mustFixPosition(){return!c(this,Gn)}show(t=this._isVisible){super.show(t),this.parent&&(this.parent.drawLayer.updateProperties(c(this,EA),{rootClass:{hidden:!t}}),this.parent.drawLayer.updateProperties(c(this,hs),{rootClass:{hidden:!t}}))}static startHighlighting(t,e,{target:r,x:n,y:s}){const{x:A,y:a,width:o,height:l}=r.getBoundingClientRect(),h=new AbortController,u=t.combinedSignal(h),f=d=>{h.abort(),_(this,cl,x6).call(this,t,d)};window.addEventListener("blur",f,{signal:u}),window.addEventListener("pointerup",f,{signal:u}),window.addEventListener("pointerdown",Hr,{capture:!0,passive:!1,signal:u}),window.addEventListener("contextmenu",AA,{signal:u}),r.addEventListener("pointermove",_(this,cl,C6).bind(this,t),{signal:u}),this._freeHighlight=new B4({x:n,y:s},[A,a,o,l],t.scale,this._defaultThickness/2,e,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static async deserialize(t,e,r){var n,s,A,a;let o=null;if(t instanceof $P){const{data:{quadPoints:C,rect:S,rotation:k,id:I,color:N,opacity:D,popupRef:Q,richText:K,contentsObj:L,creationDate:O,modificationDate:W},parent:{page:{pageNumber:R}}}=t;o=t={annotationType:Se.HIGHLIGHT,color:Array.from(N),opacity:D,quadPoints:C,boxes:null,pageIndex:R-1,rect:S.slice(0),rotation:k,annotationElementId:I,id:I,deleted:!1,popupRef:Q,richText:K,comment:(L==null?void 0:L.str)||null,creationDate:O,modificationDate:W}}else if(t instanceof XS){const{data:{inkLists:C,rect:S,rotation:k,id:I,color:N,borderStyle:{rawWidth:D},popupRef:Q,richText:K,contentsObj:L,creationDate:O,modificationDate:W},parent:{page:{pageNumber:R}}}=t;o=t={annotationType:Se.HIGHLIGHT,color:Array.from(N),thickness:D,inkLists:C,boxes:null,pageIndex:R-1,rect:S.slice(0),rotation:k,annotationElementId:I,id:I,deleted:!1,popupRef:Q,richText:K,comment:(L==null?void 0:L.str)||null,creationDate:O,modificationDate:W}}const{color:l,quadPoints:h,inkLists:u,outlines:f,opacity:d}=t,g=await super.deserialize(t,e,r);g.color=Nt.makeHexColor(...l),g.opacity=d||1,u&&F(g,ha,t.thickness),g._initialData=o,t.comment&&g.setCommentData(t);const[m,y]=g.pageDimensions,[w,b]=g.pageTranslation;if(h){const C=F(g,_h,[]);for(let S=0;S<h.length;S+=8)C.push({x:(h[S]-w)/m,y:1-(h[S+1]-b)/y,width:(h[S+2]-h[S])/m,height:(h[S+1]-h[S+5])/y});_(n=g,or,C4).call(n),_(s=g,or,Xc).call(s),g.rotate(g.rotation)}else if(u||f){F(g,Gn,!0);const C=(u||f.points)[0],S={x:C[0]-w,y:y-(C[1]-b)},k=new B4(S,[0,0,m,y],1,c(g,ha)/2,!0,.001);for(let D=0,Q=C.length;D<Q;D+=2)S.x=C[D]-w,S.y=y-(C[D+1]-b),k.add(S);const{id:I,clipPathId:N}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:g.color,"fill-opacity":g._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:k.toSVGPath()}},!0,!0);_(A=g,or,cy).call(A,{highlightOutlines:k.getOutlines(),highlightId:I,clipPathId:N}),_(a=g,or,Xc).call(a),g.rotate(g.parentRotation)}return g}serialize(t=!1){if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();const e=Vr._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),r=super.serialize(t);return Object.assign(r,{color:e,opacity:this.opacity,thickness:c(this,ha),quadPoints:_(this,or,b6).call(this),outlines:_(this,or,B6).call(this,r.rect)}),this.addComment(r),this.annotationElementId&&!_(this,or,F6).call(this,r)?null:(r.id=this.annotationElementId,r)}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}};w0=new WeakMap,oy=new WeakMap,_h=new WeakMap,Gf=new WeakMap,rv=new WeakMap,Zs=new WeakMap,ly=new WeakMap,hy=new WeakMap,gp=new WeakMap,yA=new WeakMap,EA=new WeakMap,Gn=new WeakMap,v0=new WeakMap,y0=new WeakMap,hs=new WeakMap,xm=new WeakMap,ha=new WeakMap,iv=new WeakMap,or=new WeakSet,C4=function(){const i=new b4(c(this,_h),.001);F(this,yA,i.getOutlines()),[this.x,this.y,this.width,this.height]=c(this,yA).box;const t=new b4(c(this,_h),.0025,.001,this._uiManager.direction==="ltr");F(this,Zs,t.getOutlines());const{firstPoint:e}=c(this,yA);F(this,v0,[(e[0]-this.x)/this.width,(e[1]-this.y)/this.height]);const{lastPoint:r}=c(this,Zs);F(this,y0,[(r[0]-this.x)/this.width,(r[1]-this.y)/this.height])},cy=function({highlightOutlines:i,highlightId:t,clipPathId:e}){var r,n;if(F(this,yA,i),F(this,Zs,i.getNewOutline(c(this,ha)/2+1.5,.0025)),t>=0)F(this,EA,t),F(this,Gf,e),this.parent.drawLayer.finalizeDraw(t,{bbox:i.box,path:{d:i.toSVGPath()}}),F(this,hs,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:c(this,Zs).box,path:{d:c(this,Zs).toSVGPath()}},!0));else if(this.parent){const u=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(c(this,EA),{bbox:_(r=xs,cl,mp).call(r,c(this,yA).box,(u-this.rotation+360)%360),path:{d:i.toSVGPath()}}),this.parent.drawLayer.updateProperties(c(this,hs),{bbox:_(n=xs,cl,mp).call(n,c(this,Zs).box,u),path:{d:c(this,Zs).toSVGPath()}})}const[s,A,a,o]=i.box;switch(this.rotation){case 0:this.x=s,this.y=A,this.width=a,this.height=o;break;case 90:{const[u,f]=this.parentDimensions;this.x=A,this.y=1-s,this.width=a*f/u,this.height=o*u/f;break}case 180:this.x=1-s,this.y=1-A,this.width=a,this.height=o;break;case 270:{const[u,f]=this.parentDimensions;this.x=1-A,this.y=s,this.width=a*f/u,this.height=o*u/f;break}}const{firstPoint:l}=i;F(this,v0,[(l[0]-s)/a,(l[1]-A)/o]);const{lastPoint:h}=c(this,Zs);F(this,y0,[(h[0]-s)/a,(h[1]-A)/o])},w6=function(i){const t=(n,s)=>{this.color=n,this.opacity=s,this.onUpdatedColor()},e=this.color,r=this.opacity;this.addCommands({cmd:t.bind(this,i,xs._defaultOpacity),undo:t.bind(this,e,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_e.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(i)},!0)},v6=function(i){const t=c(this,ha),e=r=>{F(this,ha,r),_(this,or,DU).call(this,r)};this.addCommands({cmd:e.bind(this,i),undo:e.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_e.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:i},!0)},DU=function(i){c(this,Gn)&&(_(this,or,cy).call(this,{highlightOutlines:c(this,yA).getNewOutline(i/2)}),this.fixAndSetPosition(),this.setDims())},x4=function(){c(this,EA)===null||!this.parent||(this.parent.drawLayer.remove(c(this,EA)),F(this,EA,null),this.parent.drawLayer.remove(c(this,hs)),F(this,hs,null))},Xc=function(i=this.parent){c(this,EA)===null&&({id:$i(this,EA)._,clipPathId:$i(this,Gf)._}=i.drawLayer.draw({bbox:c(this,yA).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:c(this,Gn)},path:{d:c(this,yA).toSVGPath()}},!1,!0),F(this,hs,i.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:c(this,Gn)},bbox:c(this,Zs).box,path:{d:c(this,Zs).toSVGPath()}},c(this,Gn))),c(this,gp)&&(c(this,gp).style.clipPath=c(this,Gf)))},cl=new WeakSet,mp=function([i,t,e,r],n){switch(n){case 90:return[1-t-r,i,r,e];case 180:return[1-i-e,1-t-r,e,r];case 270:return[t,1-i-e,r,e]}return[i,t,e,r]},y6=function(i){xs._keyboardManager.exec(this,i)},nv=function(i){if(!c(this,w0))return;const t=window.getSelection();i?t.setPosition(c(this,w0),c(this,oy)):t.setPosition(c(this,ly),c(this,hy))},uy=function(){return c(this,Gn)?this.rotation:0},b6=function(){if(c(this,Gn))return null;const[i,t]=this.pageDimensions,[e,r]=this.pageTranslation,n=c(this,_h),s=new Float32Array(n.length*8);let A=0;for(const{x:a,y:o,width:l,height:h}of n){const u=a*i+e,f=(1-o)*t+r;s[A]=s[A+4]=u,s[A+1]=s[A+3]=f,s[A+2]=s[A+6]=u+l*i,s[A+5]=s[A+7]=f-h*t,A+=8}return s},B6=function(i){return c(this,yA).serialize(i,_(this,or,uy).call(this))},C6=function(i,t){this._freeHighlight.add(t)&&i.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},x6=function(i,t){this._freeHighlight.isEmpty()?i.drawLayer.remove(this._freeHighlightId):i.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},F6=function(i){const{color:t}=this._initialData;return this.hasEditedComment||i.color.some((e,r)=>e!==t[r])},U(xs,cl),ut(xs,"_defaultColor",null),ut(xs,"_defaultOpacity",1),ut(xs,"_defaultThickness",12),ut(xs,"_type","highlight"),ut(xs,"_editorType",Se.HIGHLIGHT),ut(xs,"_freeHighlightId",-1),ut(xs,"_freeHighlight",null),ut(xs,"_freeHighlightClipId","");let OU=xs;var bf;class S6{constructor(){U(this,bf,Object.create(null))}updateProperty(t,e){this[t]=e,this.updateSVGProperty(t,e)}updateProperties(t){if(t)for(const[e,r]of Object.entries(t))e.startsWith("_")||this.updateProperty(e,r)}updateSVGProperty(t,e){c(this,bf)[t]=e}toSVGProperties(){const t=c(this,bf);return F(this,bf,Object.create(null)),{root:t}}reset(){F(this,bf,Object.create(null))}updateAll(t=this){this.updateProperties(t)}clone(){rr("Not implemented")}}bf=new WeakMap;var Us,Fm,pn,zf,qf,Ir,F4,$B,S4,Sm,RU,sv,b0,Bf;const ih=class ar extends Vr{constructor(t){super(t),U(this,Ir),U(this,Us,null),U(this,Fm),ut(this,"_colorPicker",null),ut(this,"_drawId",null),F(this,Fm,t.mustBeCommitted||!1),this._addOutlines(t)}onUpdatedColor(){var t;(t=this._colorPicker)==null||t.update(this.color),super.onUpdatedColor()}onUpdatedOpacity(){var t,e;(e=(t=this._colorPicker)==null?void 0:t.updateOpacity)==null||e.call(t,this.opacity)}_addOutlines(t){t.drawOutlines&&(_(this,Ir,F4).call(this,t),_(this,Ir,Sm).call(this))}static _mergeSVGProperties(t,e){const r=new Set(Object.keys(t));for(const[n,s]of Object.entries(e))r.has(n)?Object.assign(t[n],s):t[n]=s;return t}static getDefaultDrawingOptions(t){rr("Not implemented")}static get typesMap(){rr("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(t,e){const r=this.typesMap.get(t);r&&this._defaultDrawingOptions.updateProperty(r,e),this._currentParent&&(c(ar,pn).updateProperty(r,e),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(t,e){const r=this.constructor.typesMap.get(t);r&&this._updateProperty(t,r,e)}static get defaultPropertiesToUpdate(){const t=[],e=this._defaultDrawingOptions;for(const[r,n]of this.typesMap)t.push([r,e[n]]);return t}get propertiesToUpdate(){const t=[],{_drawingOptions:e}=this;for(const[r,n]of this.constructor.typesMap)t.push([r,e[n]]);return t}_updateProperty(t,e,r){const n=this._drawingOptions,s=n[e],A=a=>{var o;n.updateProperty(e,a);const l=c(this,Us).updateProperty(e,a);l&&_(this,Ir,b0).call(this,l),(o=this.parent)==null||o.drawLayer.updateProperties(this._drawId,n.toSVGProperties()),t===this.colorType?this.onUpdatedColor():t===this.opacityType&&this.onUpdatedOpacity()};this.addCommands({cmd:A.bind(this,r),undo:A.bind(this,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:t,overwriteIfSameType:!0,keepUndo:!0})}_updateColorAndOpacity(t,e){const r=this.constructor.typesMap.get(this.colorType),n=this.constructor.typesMap.get(this.opacityType),s=this._drawingOptions,A=s[r],a=s[n],o=(l,h)=>{var u;s.updateProperty(r,l),s.updateProperty(n,h),c(this,Us).updateProperty(r,l),c(this,Us).updateProperty(n,h),(u=this.parent)==null||u.drawLayer.updateProperties(this._drawId,s.toSVGProperties()),this.onUpdatedColor(),this.onUpdatedOpacity()};this.addCommands({cmd:o.bind(this,t,e),undo:o.bind(this,A,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_e.INK_COLOR_AND_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,ar._mergeSVGProperties(c(this,Us).getPathResizingSVGProperties(_(this,Ir,sv).call(this)),{bbox:_(this,Ir,Bf).call(this)}))}_onResized(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,ar._mergeSVGProperties(c(this,Us).getPathResizedSVGProperties(_(this,Ir,sv).call(this)),{bbox:_(this,Ir,Bf).call(this)}))}_onTranslating(t,e){var r;(r=this.parent)==null||r.drawLayer.updateProperties(this._drawId,{bbox:_(this,Ir,Bf).call(this)})}_onTranslated(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,ar._mergeSVGProperties(c(this,Us).getPathTranslatedSVGProperties(_(this,Ir,sv).call(this),this.parentDimensions),{bbox:_(this,Ir,Bf).call(this)}))}_onStartDragging(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,c(this,Fm)&&(F(this,Fm,!1),this.commit(),this.parent.setSelected(this),t&&this.isOnScreen&&this.div.focus())}remove(){_(this,Ir,S4).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(_(this,Ir,Sm).call(this),_(this,Ir,b0).call(this,c(this,Us).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){var e;let r=!1;this.parent&&!t?(this._uiManager.removeShouldRescale(this),_(this,Ir,S4).call(this)):t&&(this._uiManager.addShouldRescale(this),_(this,Ir,Sm).call(this,t),r=!this.parent&&((e=this.div)==null?void 0:e.classList.contains("selectedEditor"))),super.setParent(t),r&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,ar._mergeSVGProperties({bbox:_(this,Ir,Bf).call(this)},c(this,Us).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&_(this,Ir,b0).call(this,c(this,Us).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let t,e;this._isCopy&&(t=this.x,e=this.y);const r=super.render();r.classList.add("draw");const n=document.createElement("div");return r.append(n),n.setAttribute("aria-hidden","true"),n.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(t,e),r}static createDrawerInstance(t,e,r,n,s){rr("Not implemented")}static startDrawing(t,e,r,n){var s;const{target:A,offsetX:a,offsetY:o,pointerId:l,pointerType:h}=n;if(Bs.isInitializedAndDifferentPointerType(h))return;const{viewport:{rotation:u}}=t,{width:f,height:d}=A.getBoundingClientRect(),g=F(ar,zf,new AbortController),m=t.combinedSignal(g);if(Bs.setPointer(h,l),window.addEventListener("pointerup",y=>{Bs.isSamePointerIdOrRemove(y.pointerId)&&this._endDraw(y)},{signal:m}),window.addEventListener("pointercancel",y=>{Bs.isSamePointerIdOrRemove(y.pointerId)&&this._currentParent.endDrawingSession()},{signal:m}),window.addEventListener("pointerdown",y=>{Bs.isSamePointerType(y.pointerType)&&(Bs.initializeAndAddPointerId(y.pointerId),c(ar,pn).isCancellable()&&(c(ar,pn).removeLastElement(),c(ar,pn).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:m}),window.addEventListener("contextmenu",AA,{signal:m}),A.addEventListener("pointermove",this._drawMove.bind(this),{signal:m}),A.addEventListener("touchmove",y=>{Bs.isSameTimeStamp(y.timeStamp)&&Hr(y)},{signal:m}),t.toggleDrawing(),(s=e._editorUndoBar)==null||s.hide(),c(ar,pn)){t.drawLayer.updateProperties(this._currentDrawId,c(ar,pn).startNew(a,o,f,d,u));return}e.updateUIForDefaultProperties(this),F(ar,pn,this.createDrawerInstance(a,o,f,d,u)),F(ar,qf,this.getDefaultDrawingOptions()),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(c(ar,qf).toSVGProperties(),c(ar,pn).defaultSVGProperties),!0,!1)}static _drawMove(t){if(Bs.isSameTimeStamp(t.timeStamp),!c(ar,pn))return;const{offsetX:e,offsetY:r,pointerId:n}=t;if(Bs.isSamePointerId(n)){if(Bs.isUsingMultiplePointers()){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,c(ar,pn).add(e,r)),Bs.setTimeStamp(t.timeStamp),Hr(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,F(ar,pn,null),F(ar,qf,null),Bs.clearTimeStamp()),c(ar,zf)&&(c(ar,zf).abort(),F(ar,zf,null),Bs.clearPointerIds())}static _endDraw(t){const e=this._currentParent;if(e){if(e.toggleDrawing(!0),this._cleanup(!1),(t==null?void 0:t.target)===e.div&&e.drawLayer.updateProperties(this._currentDrawId,c(ar,pn).end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const r=c(ar,pn),n=this._currentDrawId,s=r.getLastElement();e.addCommands({cmd:()=>{e.drawLayer.updateProperties(n,r.setLastElement(s))},undo:()=>{e.drawLayer.updateProperties(n,r.removeLastElement())},mustExec:!1,type:_e.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(t){const e=this._currentParent;if(!e)return null;if(e.toggleDrawing(!0),e.cleanUndoStack(_e.DRAW_STEP),!c(ar,pn).isEmpty()){const{pageDimensions:[r,n],scale:s}=e,A=e.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:c(ar,pn).getOutlines(r*s,n*s,s,this._INNER_MARGIN),drawingOptions:c(ar,qf),mustBeCommitted:!t});return this._cleanup(!0),A}return e.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(t){}static deserializeDraw(t,e,r,n,s,A){rr("Not implemented")}static async deserialize(t,e,r){var n,s;const{rawDims:{pageWidth:A,pageHeight:a,pageX:o,pageY:l}}=e.viewport,h=this.deserializeDraw(o,l,A,a,this._INNER_MARGIN,t),u=await super.deserialize(t,e,r);return u.createDrawingOptions(t),_(n=u,Ir,F4).call(n,{drawOutlines:h}),_(s=u,Ir,Sm).call(s),u.onScaleChanging(),u.rotate(),u}serializeDraw(t){const[e,r]=this.pageTranslation,[n,s]=this.pageDimensions;return c(this,Us).serialize([e,r,n,s],t)}renderAnnotationElement(t){return t.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}};Us=new WeakMap,Fm=new WeakMap,pn=new WeakMap,zf=new WeakMap,qf=new WeakMap,Ir=new WeakSet,F4=function({drawOutlines:i,drawId:t,drawingOptions:e}){F(this,Us,i),this._drawingOptions||(this._drawingOptions=e),this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),t>=0?(this._drawId=t,this.parent.drawLayer.finalizeDraw(t,i.defaultProperties)):this._drawId=_(this,Ir,$B).call(this,i,this.parent),_(this,Ir,b0).call(this,i.box)},$B=function(i,t){const{id:e}=t.drawLayer.draw(ih._mergeSVGProperties(this._drawingOptions.toSVGProperties(),i.defaultSVGProperties),!1,!1);return e},S4=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},Sm=function(i=this.parent){if(!(this._drawId!==null&&this.parent===i)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,i.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=_(this,Ir,$B).call(this,c(this,Us),i)}},RU=function([i,t,e,r]){const{parentDimensions:[n,s],rotation:A}=this;switch(A){case 90:return[t,1-i,e*(s/n),r*(n/s)];case 180:return[1-i,1-t,e,r];case 270:return[1-t,i,e*(s/n),r*(n/s)];default:return[i,t,e,r]}},sv=function(){const{x:i,y:t,width:e,height:r,parentDimensions:[n,s],rotation:A}=this;switch(A){case 90:return[1-t,i,e*(n/s),r*(s/n)];case 180:return[1-i,1-t,e,r];case 270:return[t,1-i,e*(n/s),r*(s/n)];default:return[i,t,e,r]}},b0=function(i){[this.x,this.y,this.width,this.height]=_(this,Ir,RU).call(this,i),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()},Bf=function(){const{x:i,y:t,width:e,height:r,rotation:n,parentRotation:s,parentDimensions:[A,a]}=this;switch((n*4+s)/90){case 1:return[1-t-r,i,r,e];case 2:return[1-i-e,1-t-r,e,r];case 3:return[t,1-i-e,r,e];case 4:return[i,t-e*(A/a),r*(a/A),e*(A/a)];case 5:return[1-t,i,e*(A/a),r*(a/A)];case 6:return[1-i-r*(a/A),1-t,r*(a/A),e*(A/a)];case 7:return[t-e*(A/a),1-i-r*(a/A),e*(A/a),r*(a/A)];case 8:return[i-e,t-r,e,r];case 9:return[1-t,i-e,r,e];case 10:return[1-i,1-t,e,r];case 11:return[t-r,1-i,r,e];case 12:return[i-r*(a/A),t,r*(a/A),e*(A/a)];case 13:return[1-t-e*(A/a),i-r*(a/A),e*(A/a),r*(a/A)];case 14:return[1-i,1-t-e*(A/a),r*(a/A),e*(A/a)];case 15:return[t,1-i,e*(A/a),r*(a/A)];default:return[i,t,e,r]}},ut(ih,"_currentDrawId",-1),ut(ih,"_currentParent",null),U(ih,pn,null),U(ih,zf,null),U(ih,qf,null),ut(ih,"_INNER_MARGIN",3);let E6=ih;var jo,cn,un,Xf,Em,Fs,dn,na,Cf,Yf,$f,km,Av;class KW{constructor(t,e,r,n,s,A){U(this,km),U(this,jo,new Float64Array(6)),U(this,cn),U(this,un),U(this,Xf),U(this,Em),U(this,Fs),U(this,dn,""),U(this,na,0),U(this,Cf,new Z0),U(this,Yf),U(this,$f),F(this,Yf,r),F(this,$f,n),F(this,Xf,s),F(this,Em,A),[t,e]=_(this,km,Av).call(this,t,e);const a=F(this,cn,[NaN,NaN,NaN,NaN,t,e]);F(this,Fs,[t,e]),F(this,un,[{line:a,points:c(this,Fs)}]),c(this,jo).set(a,0)}updateProperty(t,e){t==="stroke-width"&&F(this,Em,e)}isEmpty(){return!c(this,un)||c(this,un).length===0}isCancellable(){return c(this,Fs).length<=10}add(t,e){[t,e]=_(this,km,Av).call(this,t,e);const[r,n,s,A]=c(this,jo).subarray(2,6),a=t-s,o=e-A;return Math.hypot(c(this,Yf)*a,c(this,$f)*o)<=2?null:(c(this,Fs).push(t,e),isNaN(r)?(c(this,jo).set([s,A,t,e],2),c(this,cn).push(NaN,NaN,NaN,NaN,t,e),{path:{d:this.toSVGPath()}}):(isNaN(c(this,jo)[0])&&c(this,cn).splice(6,6),c(this,jo).set([r,n,s,A,t,e],0),c(this,cn).push(...Jt.createBezierPoints(r,n,s,A,t,e)),{path:{d:this.toSVGPath()}}))}end(t,e){return this.add(t,e)||(c(this,Fs).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,e,r,n,s){F(this,Yf,r),F(this,$f,n),F(this,Xf,s),[t,e]=_(this,km,Av).call(this,t,e);const A=F(this,cn,[NaN,NaN,NaN,NaN,t,e]);F(this,Fs,[t,e]);const a=c(this,un).at(-1);return a&&(a.line=new Float32Array(a.line),a.points=new Float32Array(a.points)),c(this,un).push({line:A,points:c(this,Fs)}),c(this,jo).set(A,0),F(this,na,0),this.toSVGPath(),null}getLastElement(){return c(this,un).at(-1)}setLastElement(t){return c(this,un)?(c(this,un).push(t),F(this,cn,t.line),F(this,Fs,t.points),F(this,na,0),{path:{d:this.toSVGPath()}}):c(this,Cf).setLastElement(t)}removeLastElement(){if(!c(this,un))return c(this,Cf).removeLastElement();c(this,un).pop(),F(this,dn,"");for(let t=0,e=c(this,un).length;t<e;t++){const{line:r,points:n}=c(this,un)[t];F(this,cn,r),F(this,Fs,n),F(this,na,0),this.toSVGPath()}return{path:{d:c(this,dn)}}}toSVGPath(){const t=Jt.svgRound(c(this,cn)[4]),e=Jt.svgRound(c(this,cn)[5]);if(c(this,Fs).length===2)return F(this,dn,`${c(this,dn)} M ${t} ${e} Z`),c(this,dn);if(c(this,Fs).length<=6){const n=c(this,dn).lastIndexOf("M");F(this,dn,`${c(this,dn).slice(0,n)} M ${t} ${e}`),F(this,na,6)}if(c(this,Fs).length===4){const n=Jt.svgRound(c(this,cn)[10]),s=Jt.svgRound(c(this,cn)[11]);return F(this,dn,`${c(this,dn)} L ${n} ${s}`),F(this,na,12),c(this,dn)}const r=[];c(this,na)===0&&(r.push(`M ${t} ${e}`),F(this,na,6));for(let n=c(this,na),s=c(this,cn).length;n<s;n+=6){const[A,a,o,l,h,u]=c(this,cn).slice(n,n+6).map(Jt.svgRound);r.push(`C${A} ${a} ${o} ${l} ${h} ${u}`)}return F(this,dn,c(this,dn)+r.join(" ")),F(this,na,c(this,cn).length),c(this,dn)}getOutlines(t,e,r,n){const s=c(this,un).at(-1);return s.line=new Float32Array(s.line),s.points=new Float32Array(s.points),c(this,Cf).build(c(this,un),t,e,r,c(this,Xf),c(this,Em),n),F(this,jo,null),F(this,cn,null),F(this,un,null),F(this,dn,null),c(this,Cf)}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}jo=new WeakMap,cn=new WeakMap,un=new WeakMap,Xf=new WeakMap,Em=new WeakMap,Fs=new WeakMap,dn=new WeakMap,na=new WeakMap,Cf=new WeakMap,Yf=new WeakMap,$f=new WeakMap,km=new WeakSet,Av=function(i,t){return Jt._normalizePoint(i,t,c(this,Yf),c(this,$f),c(this,Xf))};var Is,av,dy,bA,sl,Al,B0,C0,wp,iA,ul,k6,U6,I6;class Z0 extends Jt{constructor(){super(...arguments),U(this,iA),U(this,Is),U(this,av,0),U(this,dy),U(this,bA),U(this,sl),U(this,Al),U(this,B0),U(this,C0),U(this,wp)}build(t,e,r,n,s,A,a){F(this,sl,e),F(this,Al,r),F(this,B0,n),F(this,C0,s),F(this,wp,A),F(this,dy,a??0),F(this,bA,t),_(this,iA,U6).call(this)}get thickness(){return c(this,wp)}setLastElement(t){return c(this,bA).push(t),{path:{d:this.toSVGPath()}}}removeLastElement(){return c(this,bA).pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const t=[];for(const{line:e}of c(this,bA)){if(t.push(`M${Jt.svgRound(e[4])} ${Jt.svgRound(e[5])}`),e.length===6){t.push("Z");continue}if(e.length===12&&isNaN(e[6])){t.push(`L${Jt.svgRound(e[10])} ${Jt.svgRound(e[11])}`);continue}for(let r=6,n=e.length;r<n;r+=6){const[s,A,a,o,l,h]=e.subarray(r,r+6).map(Jt.svgRound);t.push(`C${s} ${A} ${a} ${o} ${l} ${h}`)}}return t.join("")}serialize([t,e,r,n],s){const A=[],a=[],[o,l,h,u]=_(this,iA,k6).call(this);let f,d,g,m,y,w,b,C,S;switch(c(this,C0)){case 0:S=Jt._rescale,f=t,d=e+n,g=r,m=-n,y=t+o*r,w=e+(1-l-u)*n,b=t+(o+h)*r,C=e+(1-l)*n;break;case 90:S=Jt._rescaleAndSwap,f=t,d=e,g=r,m=n,y=t+l*r,w=e+o*n,b=t+(l+u)*r,C=e+(o+h)*n;break;case 180:S=Jt._rescale,f=t+r,d=e,g=-r,m=n,y=t+(1-o-h)*r,w=e+l*n,b=t+(1-o)*r,C=e+(l+u)*n;break;case 270:S=Jt._rescaleAndSwap,f=t+r,d=e+n,g=-r,m=-n,y=t+(1-l-u)*r,w=e+(1-o-h)*n,b=t+(1-l)*r,C=e+(1-o)*n;break}for(const{line:k,points:I}of c(this,bA))A.push(S(k,f,d,g,m,s?new Array(k.length):null)),a.push(S(I,f,d,g,m,s?new Array(I.length):null));return{lines:A,points:a,rect:[y,w,b,C]}}static deserialize(t,e,r,n,s,{paths:{lines:A,points:a},rotation:o,thickness:l}){const h=[];let u,f,d,g,m;switch(o){case 0:m=Jt._rescale,u=-t/r,f=e/n+1,d=1/r,g=-1/n;break;case 90:m=Jt._rescaleAndSwap,u=-e/n,f=-t/r,d=1/n,g=1/r;break;case 180:m=Jt._rescale,u=t/r+1,f=-e/n,d=-1/r,g=1/n;break;case 270:m=Jt._rescaleAndSwap,u=e/n+1,f=t/r+1,d=-1/n,g=-1/r;break}if(!A){A=[];for(const w of a){const b=w.length;if(b===2){A.push(new Float32Array([NaN,NaN,NaN,NaN,w[0],w[1]]));continue}if(b===4){A.push(new Float32Array([NaN,NaN,NaN,NaN,w[0],w[1],NaN,NaN,NaN,NaN,w[2],w[3]]));continue}const C=new Float32Array(3*(b-2));A.push(C);let[S,k,I,N]=w.subarray(0,4);C.set([NaN,NaN,NaN,NaN,S,k],0);for(let D=4;D<b;D+=2){const Q=w[D],K=w[D+1];C.set(Jt.createBezierPoints(S,k,I,N,Q,K),(D-2)*3),[S,k,I,N]=[I,N,Q,K]}}}for(let w=0,b=A.length;w<b;w++)h.push({line:m(A[w].map(C=>C??NaN),u,f,d,g),points:m(a[w].map(C=>C??NaN),u,f,d,g)});const y=new this.prototype.constructor;return y.build(h,r,n,1,o,l,s),y}get box(){return c(this,Is)}updateProperty(t,e){return t==="stroke-width"?_(this,iA,I6).call(this,e):null}updateParentDimensions([t,e],r){const[n,s]=_(this,iA,ul).call(this);F(this,sl,t),F(this,Al,e),F(this,B0,r);const[A,a]=_(this,iA,ul).call(this),o=A-n,l=a-s,h=c(this,Is);return h[0]-=o,h[1]-=l,h[2]+=2*o,h[3]+=2*l,h}updateRotation(t){return F(this,av,t),{path:{transform:this.rotationTransform}}}get viewBox(){return c(this,Is).map(Jt.svgRound).join(" ")}get defaultProperties(){const[t,e]=c(this,Is);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Jt.svgRound(t)} ${Jt.svgRound(e)}`}}}get rotationTransform(){const[,,t,e]=c(this,Is);let r=0,n=0,s=0,A=0,a=0,o=0;switch(c(this,av)){case 90:n=e/t,s=-t/e,a=t;break;case 180:r=-1,A=-1,a=t,o=e;break;case 270:n=-e/t,s=t/e,o=e;break;default:return""}return`matrix(${r} ${n} ${s} ${A} ${Jt.svgRound(a)} ${Jt.svgRound(o)})`}getPathResizingSVGProperties([t,e,r,n]){const[s,A]=_(this,iA,ul).call(this),[a,o,l,h]=c(this,Is);if(Math.abs(l-s)<=Jt.PRECISION||Math.abs(h-A)<=Jt.PRECISION){const m=t+r/2-(a+l/2),y=e+n/2-(o+h/2);return{path:{"transform-origin":`${Jt.svgRound(t)} ${Jt.svgRound(e)}`,transform:`${this.rotationTransform} translate(${m} ${y})`}}}const u=(r-2*s)/(l-2*s),f=(n-2*A)/(h-2*A),d=l/r,g=h/n;return{path:{"transform-origin":`${Jt.svgRound(a)} ${Jt.svgRound(o)}`,transform:`${this.rotationTransform} scale(${d} ${g}) translate(${Jt.svgRound(s)} ${Jt.svgRound(A)}) scale(${u} ${f}) translate(${Jt.svgRound(-s)} ${Jt.svgRound(-A)})`}}}getPathResizedSVGProperties([t,e,r,n]){const[s,A]=_(this,iA,ul).call(this),a=c(this,Is),[o,l,h,u]=a;if(a[0]=t,a[1]=e,a[2]=r,a[3]=n,Math.abs(h-s)<=Jt.PRECISION||Math.abs(u-A)<=Jt.PRECISION){const y=t+r/2-(o+h/2),w=e+n/2-(l+u/2);for(const{line:b,points:C}of c(this,bA))Jt._translate(b,y,w,b),Jt._translate(C,y,w,C);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Jt.svgRound(t)} ${Jt.svgRound(e)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const f=(r-2*s)/(h-2*s),d=(n-2*A)/(u-2*A),g=-f*(o+s)+t+s,m=-d*(l+A)+e+A;if(f!==1||d!==1||g!==0||m!==0)for(const{line:y,points:w}of c(this,bA))Jt._rescale(y,g,m,f,d,y),Jt._rescale(w,g,m,f,d,w);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Jt.svgRound(t)} ${Jt.svgRound(e)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([t,e],r){const[n,s]=r,A=c(this,Is),a=t-A[0],o=e-A[1];if(c(this,sl)===n&&c(this,Al)===s)for(const{line:l,points:h}of c(this,bA))Jt._translate(l,a,o,l),Jt._translate(h,a,o,h);else{const l=c(this,sl)/n,h=c(this,Al)/s;F(this,sl,n),F(this,Al,s);for(const{line:u,points:f}of c(this,bA))Jt._rescale(u,a,o,l,h,u),Jt._rescale(f,a,o,l,h,f);A[2]*=l,A[3]*=h}return A[0]=t,A[1]=e,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${Jt.svgRound(t)} ${Jt.svgRound(e)}`}}}get defaultSVGProperties(){const t=c(this,Is);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${Jt.svgRound(t[0])} ${Jt.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}Is=new WeakMap,av=new WeakMap,dy=new WeakMap,bA=new WeakMap,sl=new WeakMap,Al=new WeakMap,B0=new WeakMap,C0=new WeakMap,wp=new WeakMap,iA=new WeakSet,ul=function(i=c(this,wp)){const t=c(this,dy)+i/2*c(this,B0);return c(this,C0)%180===0?[t/c(this,sl),t/c(this,Al)]:[t/c(this,Al),t/c(this,sl)]},k6=function(){const[i,t,e,r]=c(this,Is),[n,s]=_(this,iA,ul).call(this,0);return[i+n,t+s,e-2*n,r-2*s]},U6=function(){const i=F(this,Is,pu.slice());for(const{line:r}of c(this,bA)){if(r.length<=12){for(let A=4,a=r.length;A<a;A+=6)Nt.pointBoundingBox(r[A],r[A+1],i);continue}let n=r[4],s=r[5];for(let A=6,a=r.length;A<a;A+=6){const[o,l,h,u,f,d]=r.subarray(A,A+6);Nt.bezierBoundingBox(n,s,o,l,h,u,f,d,i),n=f,s=d}}const[t,e]=_(this,iA,ul).call(this);i[0]=Mr(i[0]-t,0,1),i[1]=Mr(i[1]-e,0,1),i[2]=Mr(i[2]+t,0,1),i[3]=Mr(i[3]+e,0,1),i[2]-=i[0],i[3]-=i[1]},I6=function(i){const[t,e]=_(this,iA,ul).call(this);F(this,wp,i);const[r,n]=_(this,iA,ul).call(this),[s,A]=[r-t,n-e],a=c(this,Is);return a[0]-=s,a[1]-=A,a[2]+=2*s,a[3]+=2*A,a};class Jy extends S6{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:Vr._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(t,e){t==="stroke-width"&&(e??(e=this["stroke-width"]),e*=this._viewParameters.realScale),super.updateSVGProperty(t,e)}clone(){const t=new Jy(this._viewParameters);return t.updateAll(this),t}}var E4,Q6;const ov=class L6 extends E6{constructor(t){super({...t,name:"inkEditor"}),U(this,E4),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,e){Vr.initialize(t,e),this._defaultDrawingOptions=new Jy(e.viewParameters)}static getDefaultDrawingOptions(t){const e=this._defaultDrawingOptions.clone();return e.updateProperties(t),e}static get supportMultipleDrawings(){return!0}static get typesMap(){return ke(this,"typesMap",new Map([[_e.INK_THICKNESS,"stroke-width"],[_e.INK_COLOR,"stroke"],[_e.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(t,e,r,n,s){return new KW(t,e,r,n,s,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(t,e,r,n,s,A){return Z0.deserialize(t,e,r,n,s,A)}static async deserialize(t,e,r){let n=null;if(t instanceof XS){const{data:{inkLists:A,rect:a,rotation:o,id:l,color:h,opacity:u,borderStyle:{rawWidth:f},popupRef:d,richText:g,contentsObj:m,creationDate:y,modificationDate:w},parent:{page:{pageNumber:b}}}=t;n=t={annotationType:Se.INK,color:Array.from(h),thickness:f,opacity:u,paths:{points:A},boxes:null,pageIndex:b-1,rect:a.slice(0),rotation:o,annotationElementId:l,id:l,deleted:!1,popupRef:d,richText:g,comment:(m==null?void 0:m.str)||null,creationDate:y,modificationDate:w}}const s=await super.deserialize(t,e,r);return s._initialData=n,t.comment&&s.setCommentData(t),s}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new VP(this)),[["colorPicker",this._colorPicker]]}get colorType(){return _e.INK_COLOR}get colorAndOpacityType(){return _e.INK_COLOR_AND_OPACITY}get opacityType(){return _e.INK_OPACITY}updateParams(t,e){if(t===_e.INK_COLOR_AND_OPACITY){this._updateColorAndOpacity(e.color,e.opacity);return}super.updateParams(t,e)}static updateDefaultParams(t,e){if(t===_e.INK_COLOR_AND_OPACITY){super.updateDefaultParams(_e.INK_COLOR,e.color),super.updateDefaultParams(_e.INK_OPACITY,e.opacity);return}super.updateDefaultParams(t,e)}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:t,_drawingOptions:e,parent:r}=this;e.updateSVGProperty("stroke-width"),r.drawLayer.updateProperties(t,e.toSVGProperties())}static onScaleChangingWhenDrawing(){const t=this._currentParent;t&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),t.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:t,thickness:e,opacity:r}){this._drawingOptions=L6.getDefaultDrawingOptions({stroke:Nt.makeHexColor(...t),"stroke-width":e,"stroke-opacity":r})}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:e,points:r}=this.serializeDraw(t),{_drawingOptions:{stroke:n,"stroke-opacity":s,"stroke-width":A}}=this,a=Object.assign(super.serialize(t),{color:Vr._colorManager.convert(n),opacity:s,thickness:A,paths:{lines:e,points:r}});return this.addComment(a),t?(a.isCopy=!0,a):this.annotationElementId&&!_(this,E4,Q6).call(this,a)?null:(a.id=this.annotationElementId,a)}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;const{points:e,rect:r}=this.serializeDraw(!1);return t.updateEdited({rect:r,thickness:this._drawingOptions["stroke-width"],points:e,popup:this.comment}),null}};E4=new WeakSet,Q6=function(i){const{color:t,thickness:e,opacity:r,pageIndex:n}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||i.color.some((s,A)=>s!==t[A])||i.thickness!==e||i.opacity!==r||i.pageIndex!==n},ut(ov,"_type","ink"),ut(ov,"_editorType",Se.INK),ut(ov,"_defaultDrawingOptions",null);let GW=ov;class k4 extends Z0{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const Aw=8,sg=3;var vp,Xi,ZB,_a,HU,VU,U4,aw,_6,M6,T6,I4,Q4,N6;class io{static extractContoursFromText(t,{fontFamily:e,fontStyle:r,fontWeight:n},s,A,a,o){let l=new OffscreenCanvas(1,1),h=l.getContext("2d",{alpha:!1});const u=200,f=h.font=`${r} ${n} ${u}px ${e}`,{actualBoundingBoxLeft:d,actualBoundingBoxRight:g,actualBoundingBoxAscent:m,actualBoundingBoxDescent:y,fontBoundingBoxAscent:w,fontBoundingBoxDescent:b,width:C}=h.measureText(t),S=1.5,k=Math.ceil(Math.max(Math.abs(d)+Math.abs(g)||0,C)*S),I=Math.ceil(Math.max(Math.abs(m)+Math.abs(y)||u,Math.abs(w)+Math.abs(b)||u)*S);l=new OffscreenCanvas(k,I),h=l.getContext("2d",{alpha:!0,willReadFrequently:!0}),h.font=f,h.filter="grayscale(1)",h.fillStyle="white",h.fillRect(0,0,k,I),h.fillStyle="black",h.fillText(t,k*(S-1)/2,I*(3-S)/2);const N=_(this,Xi,I4).call(this,h.getImageData(0,0,k,I).data),D=_(this,Xi,T6).call(this,N),Q=_(this,Xi,Q4).call(this,D),K=_(this,Xi,U4).call(this,N,k,I,Q);return this.processDrawnLines({lines:{curves:K,width:k,height:I},pageWidth:s,pageHeight:A,rotation:a,innerMargin:o,mustSmooth:!0,areContours:!0})}static process(t,e,r,n,s){const[A,a,o]=_(this,Xi,N6).call(this,t),[l,h]=_(this,Xi,M6).call(this,A,a,o,Math.hypot(a,o)*c(this,vp).sigmaSFactor,c(this,vp).sigmaR,c(this,vp).kernelSize),u=_(this,Xi,Q4).call(this,h),f=_(this,Xi,U4).call(this,l,a,o,u);return this.processDrawnLines({lines:{curves:f,width:a,height:o},pageWidth:e,pageHeight:r,rotation:n,innerMargin:s,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:t,pageWidth:e,pageHeight:r,rotation:n,innerMargin:s,mustSmooth:A,areContours:a}){n%180!==0&&([e,r]=[r,e]);const{curves:o,width:l,height:h}=t,u=t.thickness??0,f=[],d=Math.min(e/l,r/h),g=d/e,m=d/r,y=[];for(const{points:b}of o){const C=A?_(this,Xi,_6).call(this,b):b;if(!C)continue;y.push(C);const S=C.length,k=new Float32Array(S),I=new Float32Array(3*(S===2?2:S-2));if(f.push({line:I,points:k}),S===2){k[0]=C[0]*g,k[1]=C[1]*m,I.set([NaN,NaN,NaN,NaN,k[0],k[1]],0);continue}let[N,D,Q,K]=C;N*=g,D*=m,Q*=g,K*=m,k.set([N,D,Q,K],0),I.set([NaN,NaN,NaN,NaN,N,D],0);for(let L=4;L<S;L+=2){const O=k[L]=C[L]*g,W=k[L+1]=C[L+1]*m;I.set(Jt.createBezierPoints(N,D,Q,K,O,W),(L-2)*3),[N,D,Q,K]=[Q,K,O,W]}}if(f.length===0)return null;const w=a?new k4:new Z0;return w.build(f,e,r,1,n,a?0:u,s),{outline:w,newCurves:y,areContours:a,thickness:u,width:l,height:h}}static async compressSignature({outlines:t,areContours:e,thickness:r,width:n,height:s}){let A=1/0,a=-1/0,o=0;for(const w of t){o+=w.length;for(let b=2,C=w.length;b<C;b++){const S=w[b]-w[b-2];A=Math.min(A,S),a=Math.max(a,S)}}let l;A>=-128&&a<=127?l=Int8Array:A>=-32768&&a<=32767?l=Int16Array:l=Int32Array;const h=t.length,u=Aw+sg*h,f=new Uint32Array(u);let d=0;f[d++]=u*Uint32Array.BYTES_PER_ELEMENT+(o-2*h)*l.BYTES_PER_ELEMENT,f[d++]=0,f[d++]=n,f[d++]=s,f[d++]=e?0:1,f[d++]=Math.max(0,Math.floor(r??0)),f[d++]=h,f[d++]=l.BYTES_PER_ELEMENT;for(const w of t)f[d++]=w.length-2,f[d++]=w[0],f[d++]=w[1];const g=new CompressionStream("deflate-raw"),m=g.writable.getWriter();await m.ready,m.write(f);const y=l.prototype.constructor;for(const w of t){const b=new y(w.length-2);for(let C=2,S=w.length;C<S;C++)b[C-2]=w[C]-w[C-2];m.write(b)}return m.close(),(await new Response(g.readable).bytes()).toBase64()}static async decompressSignature(t){try{const e=Uint8Array.fromBase64(t),{readable:r,writable:n}=new DecompressionStream("deflate-raw"),s=n.getWriter();await s.ready,s.write(e).then(async()=>{await s.ready,await s.close()}).catch(()=>{});let A=null,a=0;for await(const C of r)A||(A=new Uint8Array(new Uint32Array(C.buffer,0,4)[0])),A.set(C,a),a+=C.length;const o=new Uint32Array(A.buffer,0,A.length>>2),l=o[1];if(l!==0)throw new Error(`Invalid version: ${l}`);const h=o[2],u=o[3],f=o[4]===0,d=o[5],g=o[6],m=o[7],y=[],w=(Aw+sg*g)*Uint32Array.BYTES_PER_ELEMENT;let b;switch(m){case Int8Array.BYTES_PER_ELEMENT:b=new Int8Array(A.buffer,w);break;case Int16Array.BYTES_PER_ELEMENT:b=new Int16Array(A.buffer,w);break;case Int32Array.BYTES_PER_ELEMENT:b=new Int32Array(A.buffer,w);break}a=0;for(let C=0;C<g;C++){const S=o[sg*C+Aw],k=new Float32Array(S+2);y.push(k);for(let I=0;I<sg-1;I++)k[I]=o[sg*C+Aw+I+1];for(let I=0;I<S;I++)k[I+2]=k[I]+b[a++]}return{areContours:f,thickness:d,outlines:y,width:h,height:u}}catch(e){return Me(`decompressSignature: ${e}`),null}}}vp=new WeakMap,Xi=new WeakSet,ZB=function(i,t,e,r){return e-=i,r-=t,e===0?r>0?0:4:e===1?r+6:2-r},_a=new WeakMap,HU=function(i,t,e,r,n,s,A){const a=_(this,Xi,ZB).call(this,e,r,n,s);for(let o=0;o<8;o++){const l=(-o+a-A+16)%8,h=c(this,_a)[2*l],u=c(this,_a)[2*l+1];if(i[(e+h)*t+(r+u)]!==0)return l}return-1},VU=function(i,t,e,r,n,s,A){const a=_(this,Xi,ZB).call(this,e,r,n,s);for(let o=0;o<8;o++){const l=(o+a+A+16)%8,h=c(this,_a)[2*l],u=c(this,_a)[2*l+1];if(i[(e+h)*t+(r+u)]!==0)return l}return-1},U4=function(i,t,e,r){const n=i.length,s=new Int32Array(n);for(let l=0;l<n;l++)s[l]=i[l]<=r?1:0;for(let l=1;l<e-1;l++)s[l*t]=s[l*t+t-1]=0;for(let l=0;l<t;l++)s[l]=s[t*e-1-l]=0;let A=1,a;const o=[];for(let l=1;l<e-1;l++){a=1;for(let h=1;h<t-1;h++){const u=l*t+h,f=s[u];if(f===0)continue;let d=l,g=h;if(f===1&&s[u-1]===0)A+=1,g-=1;else if(f>=1&&s[u+1]===0)A+=1,g+=1,f>1&&(a=f);else{f!==1&&(a=Math.abs(f));continue}const m=[h,l],y=g===h+1,w={isHole:y,points:m,id:A,parent:0};o.push(w);let b;for(const K of o)if(K.id===a){b=K;break}b?b.isHole?w.parent=y?b.parent:a:w.parent=y?a:b.parent:w.parent=y?a:0;const C=_(this,Xi,HU).call(this,s,t,l,h,d,g,0);if(C===-1){s[u]=-A,s[u]!==1&&(a=Math.abs(s[u]));continue}let S=c(this,_a)[2*C],k=c(this,_a)[2*C+1];const I=l+S,N=h+k;d=I,g=N;let D=l,Q=h;for(;;){const K=_(this,Xi,VU).call(this,s,t,D,Q,d,g,1);S=c(this,_a)[2*K],k=c(this,_a)[2*K+1];const L=D+S,O=Q+k;m.push(O,L);const W=D*t+Q;if(s[W+1]===0?s[W]=-A:s[W]===1&&(s[W]=A),L===l&&O===h&&D===I&&Q===N){s[u]!==1&&(a=Math.abs(s[u]));break}else d=D,g=Q,D=L,Q=O}}}return o},aw=function(i,t,e,r){if(e-t<=4){for(let I=t;I<e-2;I+=2)r.push(i[I],i[I+1]);return}const n=i[t],s=i[t+1],A=i[e-4]-n,a=i[e-3]-s,o=Math.hypot(A,a),l=A/o,h=a/o,u=l*s-h*n,f=a/A,d=1/o,g=Math.atan(f),m=Math.cos(g),y=Math.sin(g),w=d*(Math.abs(m)+Math.abs(y)),b=d*(1-w+w**2),C=Math.max(Math.atan(Math.abs(y+m)*b),Math.atan(Math.abs(y-m)*b));let S=0,k=t;for(let I=t+2;I<e-2;I+=2){const N=Math.abs(u-l*i[I+1]+h*i[I]);N>S&&(k=I,S=N)}S>(o*C)**2?(_(this,Xi,aw).call(this,i,t,k+2,r),_(this,Xi,aw).call(this,i,k,e,r)):r.push(n,s)},_6=function(i){const t=[],e=i.length;return _(this,Xi,aw).call(this,i,0,e,t),t.push(i[e-2],i[e-1]),t.length<=4?null:t},M6=function(i,t,e,r,n,s){const A=new Float32Array(s**2),a=-2*r**2,o=s>>1;for(let g=0;g<s;g++){const m=(g-o)**2;for(let y=0;y<s;y++)A[g*s+y]=Math.exp((m+(y-o)**2)/a)}const l=new Float32Array(256),h=-2*n**2;for(let g=0;g<256;g++)l[g]=Math.exp(g**2/h);const u=i.length,f=new Uint8Array(u),d=new Uint32Array(256);for(let g=0;g<e;g++)for(let m=0;m<t;m++){const y=g*t+m,w=i[y];let b=0,C=0;for(let k=0;k<s;k++){const I=g+k-o;if(!(I<0||I>=e))for(let N=0;N<s;N++){const D=m+N-o;if(D<0||D>=t)continue;const Q=i[I*t+D],K=A[k*s+N]*l[Math.abs(Q-w)];b+=Q*K,C+=K}}const S=f[y]=Math.round(b/C);d[S]++}return[f,d]},T6=function(i){const t=new Uint32Array(256);for(const e of i)t[e]++;return t},I4=function(i){const t=i.length,e=new Uint8ClampedArray(t>>2);let r=-1/0,n=1/0;for(let A=0,a=e.length;A<a;A++){const o=e[A]=i[A<<2];r=Math.max(r,o),n=Math.min(n,o)}const s=255/(r-n);for(let A=0,a=e.length;A<a;A++)e[A]=(e[A]-n)*s;return e},Q4=function(i){let t,e=-1/0,r=-1/0;const n=i.findIndex(a=>a!==0);let s=n,A=n;for(t=n;t<256;t++){const a=i[t];a>e&&(t-s>r&&(r=t-s,A=t-1),e=a,s=t)}for(t=A-1;t>=0&&!(i[t]>i[t+1]);t--);return t},N6=function(i){const t=i,{width:e,height:r}=i,{maxDim:n}=c(this,vp);let s=e,A=r;if(e>n||r>n){let l=e,h=r,u=Math.log2(Math.max(e,r)/n);const f=Math.floor(u);u=u===f?f-1:f;for(let g=0;g<u;g++){s=Math.ceil(l/2),A=Math.ceil(h/2);const m=new OffscreenCanvas(s,A);m.getContext("2d").drawImage(i,0,0,l,h,0,0,s,A),l=s,h=A,i!==t&&i.close(),i=m.transferToImageBitmap()}const d=Math.min(n/s,n/A);s=Math.round(s*d),A=Math.round(A*d)}const a=new OffscreenCanvas(s,A).getContext("2d",{willReadFrequently:!0});a.fillStyle="white",a.fillRect(0,0,s,A),a.filter="grayscale(1)",a.drawImage(i,0,0,i.width,i.height,0,0,s,A);const o=a.getImageData(0,0,s,A).data;return[_(this,Xi,I4).call(this,o),s,A]},U(io,Xi),U(io,vp,{maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16}),U(io,_a,new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]));class YS extends S6{constructor(){super(),super.updateProperties({fill:Vr._defaultLineColor,"stroke-width":0})}clone(){const t=new YS;return t.updateAll(this),t}}class $S extends Jy{constructor(t){super(t),super.updateProperties({stroke:Vr._defaultLineColor,"stroke-width":1})}clone(){const t=new $S(this._viewParameters);return t.updateAll(this),t}}var Yc,Ko,$c,xf;const lv=class Go extends E6{constructor(t){super({...t,mustBeCommitted:!0,name:"signatureEditor"}),U(this,Yc,!1),U(this,Ko,null),U(this,$c,null),U(this,xf,null),this._willKeepAspectRatio=!0,F(this,$c,t.signatureData||null),F(this,Ko,null),this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(t,e){Vr.initialize(t,e),this._defaultDrawingOptions=new YS,this._defaultDrawnSignatureOptions=new $S(e.viewParameters)}static getDefaultDrawingOptions(t){const e=this._defaultDrawingOptions.clone();return e.updateProperties(t),e}static get supportMultipleDrawings(){return!1}static get typesMap(){return ke(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!c(this,Ko)}}static computeTelemetryFinalData(t){const e=t.get("hasDescription");return{hasAltText:e.get(!0)??0,hasNoAltText:e.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let t,e;const{_isCopy:r}=this;if(r&&(this._isCopy=!1,t=this.x,e=this.y),super.render(),this._drawId===null)if(c(this,$c)){const{lines:n,mustSmooth:s,areContours:A,description:a,uuid:o,heightInPage:l}=c(this,$c),{rawDims:{pageWidth:h,pageHeight:u},rotation:f}=this.parent.viewport,d=io.processDrawnLines({lines:n,pageWidth:h,pageHeight:u,rotation:f,innerMargin:Go._INNER_MARGIN,mustSmooth:s,areContours:A});this.addSignature(d,l,a,o)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:c(this,Ko)||""}));return r&&(this._isCopy=!0,this._moveAfterPaste(t,e)),this.div}setUuid(t){F(this,xf,t),this.addEditToolbar()}getUuid(){return c(this,xf)}get description(){return c(this,Ko)}set description(t){F(this,Ko,t),this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:t})),super.addEditToolbar().then(e=>{e==null||e.updateEditSignatureButton(t)}))}getSignaturePreview(){const{newCurves:t,areContours:e,thickness:r,width:n,height:s}=c(this,$c),A=Math.max(n,s),a=io.processDrawnLines({lines:{curves:t.map(o=>({points:o})),thickness:r,width:n,height:s},pageWidth:A,pageHeight:A,rotation:0,innerMargin:0,mustSmooth:!1,areContours:e});return{areContours:e,outline:a.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(t,e,r,n){const{x:s,y:A}=this,{outline:a}=F(this,$c,t);F(this,Yc,a instanceof k4),this.description=r;let o;c(this,Yc)?o=Go.getDefaultDrawingOptions():(o=Go._defaultDrawnSignatureOptions.clone(),o.updateProperties({"stroke-width":a.thickness})),this._addOutlines({drawOutlines:a,drawingOptions:o});const[,l]=this.pageDimensions;let h=e/l;h=h>=1?.5:h,this.width*=h/this.height,this.width>=1&&(h*=.9/this.width,this.width=.9),this.height=h,this.setDims(),this.x=s,this.y=A,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(n),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!n,hasDescription:!!r}}),this.div.hidden=!1}getFromImage(t){const{rawDims:{pageWidth:e,pageHeight:r},rotation:n}=this.parent.viewport;return io.process(t,e,r,n,Go._INNER_MARGIN)}getFromText(t,e){const{rawDims:{pageWidth:r,pageHeight:n},rotation:s}=this.parent.viewport;return io.extractContoursFromText(t,e,r,n,s,Go._INNER_MARGIN)}getDrawnSignature(t){const{rawDims:{pageWidth:e,pageHeight:r},rotation:n}=this.parent.viewport;return io.processDrawnLines({lines:t,pageWidth:e,pageHeight:r,rotation:n,innerMargin:Go._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:t,thickness:e}){t?this._drawingOptions=Go.getDefaultDrawingOptions():(this._drawingOptions=Go._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":e}))}serialize(t=!1){if(this.isEmpty())return null;const{lines:e,points:r}=this.serializeDraw(t),{_drawingOptions:{"stroke-width":n}}=this,s=Object.assign(super.serialize(t),{isSignature:!0,areContours:c(this,Yc),color:[0,0,0],thickness:c(this,Yc)?0:n});return this.addComment(s),t?(s.paths={lines:e,points:r},s.uuid=c(this,xf),s.isCopy=!0):s.lines=e,c(this,Ko)&&(s.accessibilityData={type:"Figure",alt:c(this,Ko)}),s}static deserializeDraw(t,e,r,n,s,A){return A.areContours?k4.deserialize(t,e,r,n,s,A):Z0.deserialize(t,e,r,n,s,A)}static async deserialize(t,e,r){var n;const s=await super.deserialize(t,e,r);return F(s,Yc,t.areContours),s.description=((n=t.accessibilityData)==null?void 0:n.alt)||"",F(s,xf,t.uuid),s}};Yc=new WeakMap,Ko=new WeakMap,$c=new WeakMap,xf=new WeakMap,ut(lv,"_type","signature"),ut(lv,"_editorType",Se.SIGNATURE),ut(lv,"_defaultDrawingOptions",null);let zW=lv;var qr,mn,du,Mh,xu,Um,Th,Ff,zo,IA,x0,_r,Ag,ag,hv,fy,py,L4,cv,P6;class _4 extends Vr{constructor(t){super({...t,name:"stampEditor"}),U(this,_r),U(this,qr,null),U(this,mn,null),U(this,du,null),U(this,Mh,null),U(this,xu,null),U(this,Um,""),U(this,Th,null),U(this,Ff,!1),U(this,zo,null),U(this,IA,!1),U(this,x0,!1),F(this,Mh,t.bitmapUrl),F(this,xu,t.bitmapFile),this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(t,e){Vr.initialize(t,e)}static isHandlingMimeForPasting(t){return jy.includes(t)}static paste(t,e){e.pasteEditor({mode:Se.STAMP},{bitmapFile:t.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var t;return{type:"stamp",hasAltText:!!((t=this.altTextData)!=null&&t.altText)}}static computeTelemetryFinalData(t){const e=t.get("hasAltText");return{hasAltText:e.get(!0)??0,hasNoAltText:e.get(!1)??0}}async mlGuessAltText(t=null,e=!0){if(this.hasAltTextData())return null;const{mlManager:r}=this._uiManager;if(!r)throw new Error("No ML.");if(!await r.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:n,width:s,height:A}=t||this.copyCanvas(null,null,!0).imageData,a=await r.guess({name:"altText",request:{data:n,width:s,height:A,channels:n.length/(s*A)}});if(!a)throw new Error("No response from the AI service.");if(a.error)throw new Error("Error from the AI service.");if(a.cancel)return null;if(!a.output)throw new Error("No valid response from the AI service.");const o=a.output;return await this.setGuessedAltText(o),e&&!this.hasAltTextData()&&(this.altTextData={alt:o,decorative:!1}),o}remove(){var t;c(this,mn)&&(F(this,qr,null),this._uiManager.imageManager.deleteId(c(this,mn)),(t=c(this,Th))==null||t.remove(),F(this,Th,null),c(this,zo)&&(clearTimeout(c(this,zo)),F(this,zo,null))),super.remove()}rebuild(){if(!this.parent){c(this,mn)&&_(this,_r,hv).call(this);return}super.rebuild(),this.div!==null&&(c(this,mn)&&c(this,Th)===null&&_(this,_r,hv).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(t){this._isDraggable=!0,t&&this.div.focus()}isEmpty(){return!(c(this,du)||c(this,qr)||c(this,Mh)||c(this,xu)||c(this,mn)||c(this,Ff))}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let t,e;return this._isCopy&&(t=this.x,e=this.y),super.render(),this.div.hidden=!0,this.createAltText(),c(this,Ff)||(c(this,qr)?_(this,_r,fy).call(this):_(this,_r,hv).call(this)),this._isCopy&&this._moveAfterPaste(t,e),this._uiManager.addShouldRescale(this),this.div}setCanvas(t,e){const{id:r,bitmap:n}=this._uiManager.imageManager.getFromCanvas(t,e);e.remove(),r&&this._uiManager.imageManager.isValidId(r)&&(F(this,mn,r),n&&F(this,qr,n),F(this,Ff,!1),_(this,_r,fy).call(this))}_onResized(){this.onScaleChanging()}onScaleChanging(){this.parent&&(c(this,zo)!==null&&clearTimeout(c(this,zo)),F(this,zo,setTimeout(()=>{F(this,zo,null),_(this,_r,L4).call(this)},200)))}copyCanvas(t,e,r=!1){t||(t=224);const{width:n,height:s}=c(this,qr),A=new pa;let a=c(this,qr),o=n,l=s,h=null;if(e){if(n>e||s>e){const I=Math.min(e/n,e/s);o=Math.floor(n*I),l=Math.floor(s*I)}h=document.createElement("canvas");const f=h.width=Math.ceil(o*A.sx),d=h.height=Math.ceil(l*A.sy);c(this,IA)||(a=_(this,_r,py).call(this,f,d));const g=h.getContext("2d");g.filter=this._uiManager.hcmFilter;let m="white",y="#cfcfd8";this._uiManager.hcmFilter!=="none"?y="black":Z9.isDarkMode&&(m="#8f8f9d",y="#42414d");const w=15,b=w*A.sx,C=w*A.sy,S=new OffscreenCanvas(b*2,C*2),k=S.getContext("2d");k.fillStyle=m,k.fillRect(0,0,b*2,C*2),k.fillStyle=y,k.fillRect(0,0,b,C),k.fillRect(b,C,b,C),g.fillStyle=g.createPattern(S,"repeat"),g.fillRect(0,0,f,d),g.drawImage(a,0,0,a.width,a.height,0,0,f,d)}let u=null;if(r){let f,d;if(A.symmetric&&a.width<t&&a.height<t)f=a.width,d=a.height;else if(a=c(this,qr),n>t||s>t){const m=Math.min(t/n,t/s);f=Math.floor(n*m),d=Math.floor(s*m),c(this,IA)||(a=_(this,_r,py).call(this,f,d))}const g=new OffscreenCanvas(f,d).getContext("2d",{willReadFrequently:!0});g.drawImage(a,0,0,a.width,a.height,0,0,f,d),u={width:f,height:d,data:g.getImageData(0,0,f,d).data}}return{canvas:h,width:o,height:l,imageData:u}}static async deserialize(t,e,r){var n;let s=null,A=!1;if(t instanceof ZP){const{data:{rect:y,rotation:w,id:b,structParent:C,popupRef:S,richText:k,contentsObj:I,creationDate:N,modificationDate:D},container:Q,parent:{page:{pageNumber:K}},canvas:L}=t;let O,W;L?(delete t.canvas,{id:O,bitmap:W}=r.imageManager.getFromCanvas(Q.id,L),L.remove()):(A=!0,t._hasNoCanvas=!0);const R=((n=await e._structTree.getAriaAttributes(`${sp}${b}`))==null?void 0:n.get("aria-label"))||"";s=t={annotationType:Se.STAMP,bitmapId:O,bitmap:W,pageIndex:K-1,rect:y.slice(0),rotation:w,annotationElementId:b,id:b,deleted:!1,accessibilityData:{decorative:!1,altText:R},isSvg:!1,structParent:C,popupRef:S,richText:k,comment:(I==null?void 0:I.str)||null,creationDate:N,modificationDate:D}}const a=await super.deserialize(t,e,r),{rect:o,bitmap:l,bitmapUrl:h,bitmapId:u,isSvg:f,accessibilityData:d}=t;A?(r.addMissingCanvas(t.id,a),F(a,Ff,!0)):u&&r.imageManager.isValidId(u)?(F(a,mn,u),l&&F(a,qr,l)):F(a,Mh,h),F(a,IA,f);const[g,m]=a.pageDimensions;return a.width=(o[2]-o[0])/g,a.height=(o[3]-o[1])/m,d&&(a.altTextData=d),a._initialData=s,t.comment&&a.setCommentData(t),F(a,x0,!!s),a}serialize(t=!1,e=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const r=Object.assign(super.serialize(t),{bitmapId:c(this,mn),isSvg:c(this,IA)});if(this.addComment(r),t)return r.bitmapUrl=_(this,_r,cv).call(this,!0),r.accessibilityData=this.serializeAltText(!0),r.isCopy=!0,r;const{decorative:n,altText:s}=this.serializeAltText(!1);if(!n&&s&&(r.accessibilityData={type:"Figure",alt:s}),this.annotationElementId){const a=_(this,_r,P6).call(this,r);return a.isSame?null:(a.isSameAltText?delete r.accessibilityData:r.accessibilityData.structParent=this._initialData.structParent??-1,r.id=this.annotationElementId,delete r.bitmapId,r)}if(e===null)return r;e.stamps||(e.stamps=new Map);const A=c(this,IA)?(r.rect[2]-r.rect[0])*(r.rect[3]-r.rect[1]):null;if(!e.stamps.has(c(this,mn)))e.stamps.set(c(this,mn),{area:A,serialized:r}),r.bitmap=_(this,_r,cv).call(this,!1);else if(c(this,IA)){const a=e.stamps.get(c(this,mn));A>a.area&&(a.area=A,a.serialized.bitmap.close(),a.serialized.bitmap=_(this,_r,cv).call(this,!1))}return r}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}}qr=new WeakMap,mn=new WeakMap,du=new WeakMap,Mh=new WeakMap,xu=new WeakMap,Um=new WeakMap,Th=new WeakMap,Ff=new WeakMap,zo=new WeakMap,IA=new WeakMap,x0=new WeakMap,_r=new WeakSet,Ag=function(i,t=!1){if(!i){this.remove();return}F(this,qr,i.bitmap),t||(F(this,mn,i.id),F(this,IA,i.isSvg)),i.file&&F(this,Um,i.file.name),_(this,_r,fy).call(this)},ag=function(){if(F(this,du,null),this._uiManager.enableWaiting(!1),!!c(this,Th)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&c(this,qr)){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&c(this,qr)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},hv=function(){if(c(this,mn)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(c(this,mn)).then(e=>_(this,_r,Ag).call(this,e,!0)).finally(()=>_(this,_r,ag).call(this));return}if(c(this,Mh)){const e=c(this,Mh);F(this,Mh,null),this._uiManager.enableWaiting(!0),F(this,du,this._uiManager.imageManager.getFromUrl(e).then(r=>_(this,_r,Ag).call(this,r)).finally(()=>_(this,_r,ag).call(this)));return}if(c(this,xu)){const e=c(this,xu);F(this,xu,null),this._uiManager.enableWaiting(!0),F(this,du,this._uiManager.imageManager.getFromFile(e).then(r=>_(this,_r,Ag).call(this,r)).finally(()=>_(this,_r,ag).call(this)));return}const i=document.createElement("input");i.type="file",i.accept=jy.join(",");const t=this._uiManager._signal;F(this,du,new Promise(e=>{i.addEventListener("change",async()=>{if(!i.files||i.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const r=await this._uiManager.imageManager.getFromFile(i.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),_(this,_r,Ag).call(this,r)}e()},{signal:t}),i.addEventListener("cancel",()=>{this.remove(),e()},{signal:t})}).finally(()=>_(this,_r,ag).call(this))),i.click()},fy=function(){var i;const{div:t}=this;let{width:e,height:r}=c(this,qr);const[n,s]=this.pageDimensions,A=.75;if(this.width)e=this.width*n,r=this.height*s;else if(e>A*n||r>A*s){const o=Math.min(A*n/e,A*s/r);e*=o,r*=o}this._uiManager.enableWaiting(!1);const a=F(this,Th,document.createElement("canvas"));a.setAttribute("role","img"),this.addContainer(a),this.width=e/n,this.height=r/s,this.setDims(),(i=this._initialOptions)!=null&&i.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(t.hidden=!1),_(this,_r,L4).call(this),c(this,x0)||(this.parent.addUndoableEditor(this),F(this,x0,!0)),this._reportTelemetry({action:"inserted_image"}),c(this,Um)&&this.div.setAttribute("aria-description",c(this,Um)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")},py=function(i,t){const{width:e,height:r}=c(this,qr);let n=e,s=r,A=c(this,qr);for(;n>2*i||s>2*t;){const a=n,o=s;n>2*i&&(n=Math.ceil(n/2)),s>2*t&&(s=Math.ceil(s/2));const l=new OffscreenCanvas(n,s);l.getContext("2d").drawImage(A,0,0,a,o,0,0,n,s),A=l.transferToImageBitmap()}return A},L4=function(){const[i,t]=this.parentDimensions,{width:e,height:r}=this,n=new pa,s=Math.ceil(e*i*n.sx),A=Math.ceil(r*t*n.sy),a=c(this,Th);if(!a||a.width===s&&a.height===A)return;a.width=s,a.height=A;const o=c(this,IA)?c(this,qr):_(this,_r,py).call(this,s,A),l=a.getContext("2d");l.filter=this._uiManager.hcmFilter,l.drawImage(o,0,0,o.width,o.height,0,0,s,A)},cv=function(i){if(i){if(c(this,IA)){const e=this._uiManager.imageManager.getSvgUrl(c(this,mn));if(e)return e}const t=document.createElement("canvas");return{width:t.width,height:t.height}=c(this,qr),t.getContext("2d").drawImage(c(this,qr),0,0),t.toDataURL()}if(c(this,IA)){const[t,e]=this.pageDimensions,r=Math.round(this.width*t*Pu.PDF_TO_CSS_UNITS),n=Math.round(this.height*e*Pu.PDF_TO_CSS_UNITS),s=new OffscreenCanvas(r,n);return s.getContext("2d").drawImage(c(this,qr),0,0,c(this,qr).width,c(this,qr).height,0,0,r,n),s.transferToImageBitmap()}return structuredClone(c(this,qr))},P6=function(i){var t;const{pageIndex:e,accessibilityData:{altText:r}}=this._initialData,n=i.pageIndex===e,s=(((t=i.accessibilityData)==null?void 0:t.alt)||"")===r;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&n&&s,isSameAltText:s}},ut(_4,"_type","stamp"),ut(_4,"_editorType",Se.STAMP);var Sf,Im,Zc,Jc,nh,eA,tu,Qm,Lm,Ha,sh,vn,Ah,eu,_m,oe,Fu,pi,M4,D6,Ka,T4,N4,uv;const dv=class ru{constructor({uiManager:t,pageIndex:e,div:r,structTreeLayer:n,accessibilityManager:s,annotationLayer:A,drawLayer:a,textLayer:o,viewport:l,l10n:h}){U(this,pi),U(this,Sf),U(this,Im,!1),U(this,Zc,null),U(this,Jc,null),U(this,nh,null),U(this,eA,new Map),U(this,tu,!1),U(this,Qm,!1),U(this,Lm,!1),U(this,Ha,null),U(this,sh,null),U(this,vn,null),U(this,Ah,null),U(this,eu,null),U(this,_m,-1),U(this,oe);const u=[...c(ru,Fu).values()];if(!ru._initialized){ru._initialized=!0;for(const f of u)f.initialize(h,t)}t.registerEditorTypes(u),F(this,oe,t),this.pageIndex=e,this.div=r,F(this,Sf,s),F(this,Zc,A),this.viewport=l,F(this,vn,o),this.drawLayer=a,this._structTree=n,c(this,oe).addLayer(this)}get isEmpty(){return c(this,eA).size===0}get isInvisible(){return this.isEmpty&&c(this,oe).getMode()===Se.NONE}updateToolbar(t){c(this,oe).updateToolbar(t)}updateMode(t=c(this,oe).getMode()){switch(_(this,pi,uv).call(this),t){case Se.NONE:this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case Se.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case Se.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:e}=this.div;if(e.toggle("nonEditing",!1),t===Se.POPUP)e.toggle("commentEditing",!0);else{e.toggle("commentEditing",!1);for(const r of c(ru,Fu).values())e.toggle(`${r._type}Editing`,t===r._editorType)}this.div.hidden=!1}hasTextLayer(t){var e;return t===((e=c(this,vn))==null?void 0:e.div)}setEditingState(t){c(this,oe).setEditingState(t)}addCommands(t){c(this,oe).addCommands(t)}cleanUndoStack(t){c(this,oe).cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){var e;(e=c(this,Zc))==null||e.togglePointerEvents(t)}async enable(){var t;F(this,Lm,!0),this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),(t=c(this,eu))==null||t.abort(),F(this,eu,null);const e=new Set;for(const n of c(this,pi,M4))n.enableEditing(),n.show(!0),n.annotationElementId&&(c(this,oe).removeChangedExistingAnnotation(n),e.add(n.annotationElementId));const r=c(this,Zc);if(r)for(const n of r.getEditableAnnotations()){if(n.hide(),c(this,oe).isDeletedAnnotationElement(n.data.id)||e.has(n.data.id))continue;const s=await this.deserialize(n);s&&(this.addOrRebuild(s),s.enableEditing())}F(this,Lm,!1),c(this,oe)._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){var t;if(F(this,Qm,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),c(this,vn)&&!c(this,eu)){F(this,eu,new AbortController);const s=c(this,oe).combinedSignal(c(this,eu));c(this,vn).div.addEventListener("pointerdown",A=>{const{clientX:a,clientY:o,timeStamp:l}=A,h=c(this,_m);if(l-h>500){F(this,_m,l);return}F(this,_m,-1);const{classList:u}=this.div;u.toggle("getElements",!0);const f=document.elementsFromPoint(a,o);if(u.toggle("getElements",!1),!this.div.contains(f[0]))return;let d;const g=new RegExp(`^${_0}[0-9]+$`);for(const y of f)if(g.test(y.id)){d=y.id;break}if(!d)return;const m=c(this,eA).get(d);(m==null?void 0:m.annotationElementId)===null&&(Hr(A),m.dblclick(A))},{signal:s,capture:!0})}const e=c(this,Zc),r=[];if(e){const s=new Map,A=new Map;for(const a of c(this,pi,M4)){if(a.disableEditing(),!a.annotationElementId){r.push(a);continue}if(a.serialize()!==null){s.set(a.annotationElementId,a);continue}else A.set(a.annotationElementId,a);(t=this.getEditableAnnotation(a.annotationElementId))==null||t.show(),a.remove()}for(const a of e.getEditableAnnotations()){const{id:o}=a.data;if(c(this,oe).isDeletedAnnotationElement(o)){a.updateEdited({deleted:!0});continue}let l=A.get(o);if(l){l.resetAnnotationElement(a),l.show(!1),a.show();continue}l=s.get(o),l&&(c(this,oe).addChangedExistingAnnotation(l),l.renderAnnotationElement(a)&&l.show(!1)),a.show()}}_(this,pi,uv).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:n}=this.div;for(const s of c(ru,Fu).values())n.remove(`${s._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),e==null||e.updateFakeAnnotations(r),F(this,Qm,!1)}getEditableAnnotation(t){var e;return((e=c(this,Zc))==null?void 0:e.getEditableAnnotation(t))||null}setActiveEditor(t){c(this,oe).getActive()!==t&&c(this,oe).setActiveEditor(t)}enableTextSelection(){var t;if(this.div.tabIndex=-1,(t=c(this,vn))!=null&&t.div&&!c(this,Ah)){F(this,Ah,new AbortController);const e=c(this,oe).combinedSignal(c(this,Ah));c(this,vn).div.addEventListener("pointerdown",_(this,pi,D6).bind(this),{signal:e}),c(this,vn).div.classList.add("highlighting")}}disableTextSelection(){var t;this.div.tabIndex=0,(t=c(this,vn))!=null&&t.div&&c(this,Ah)&&(c(this,Ah).abort(),F(this,Ah,null),c(this,vn).div.classList.remove("highlighting"))}enableClick(){if(c(this,Jc))return;F(this,Jc,new AbortController);const t=c(this,oe).combinedSignal(c(this,Jc));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const e=this.pointerup.bind(this);this.div.addEventListener("pointerup",e,{signal:t}),this.div.addEventListener("pointercancel",e,{signal:t})}disableClick(){var t;(t=c(this,Jc))==null||t.abort(),F(this,Jc,null)}attach(t){c(this,eA).set(t.id,t);const{annotationElementId:e}=t;e&&c(this,oe).isDeletedAnnotationElement(e)&&c(this,oe).removeDeletedAnnotationElement(t)}detach(t){var e;c(this,eA).delete(t.id),(e=c(this,Sf))==null||e.removePointerInTextLayer(t.contentDiv),!c(this,Qm)&&t.annotationElementId&&c(this,oe).addDeletedAnnotationElement(t)}remove(t){this.detach(t),c(this,oe).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(c(this,oe).addDeletedAnnotationElement(t),Vr.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),(e=t.parent)==null||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),c(this,oe).addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!c(this,Lm)),c(this,oe).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){var e;if(!t.isAttachedToDOM)return;const{activeElement:r}=document;t.div.contains(r)&&!c(this,nh)&&(t._focusEventsAllowed=!1,F(this,nh,setTimeout(()=>{F(this,nh,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:c(this,oe)._signal}),r.focus())},0))),t._structTreeParentId=(e=c(this,Sf))==null?void 0:e.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const e=()=>t._uiManager.rebuild(t),r=()=>{t.remove()};this.addCommands({cmd:e,undo:r,mustExec:!1})}getEditorByUID(t){for(const e of c(this,eA).values())if(e.uid===t)return e;return null}combinedSignal(t){return c(this,oe).combinedSignal(t)}canCreateNewEmptyEditor(){var t;return(t=c(this,pi,Ka))==null?void 0:t.canCreateNewEmptyEditor()}async pasteEditor(t,e){this.updateToolbar(t),await c(this,oe).updateMode(t.mode);const{offsetX:r,offsetY:n}=_(this,pi,N4).call(this),s=c(this,oe).getId(),A=_(this,pi,T4).call(this,{parent:this,id:s,x:r,y:n,uiManager:c(this,oe),isCentered:!0,...e});A&&this.add(A)}async deserialize(t){var e;return await((e=c(ru,Fu).get(t.annotationType??t.annotationEditorType))==null?void 0:e.deserialize(t,this,c(this,oe)))||null}createAndAddNewEditor(t,e,r={}){const n=c(this,oe).getId(),s=_(this,pi,T4).call(this,{parent:this,id:n,x:t.offsetX,y:t.offsetY,uiManager:c(this,oe),isCentered:e,...r});return s&&this.add(s),s}get boundingClientRect(){return this.div.getBoundingClientRect()}addNewEditor(t={}){this.createAndAddNewEditor(_(this,pi,N4).call(this),!0,t)}setSelected(t){c(this,oe).setSelected(t)}toggleSelected(t){c(this,oe).toggleSelected(t)}unselect(t){c(this,oe).unselect(t)}pointerup(t){var e;const{isMac:r}=Fi.platform;if(t.button!==0||t.ctrlKey&&r||t.target!==this.div||!c(this,tu)||(F(this,tu,!1),(e=c(this,pi,Ka))!=null&&e.isDrawer&&c(this,pi,Ka).supportMultipleDrawings))return;if(!c(this,Im)){F(this,Im,!0);return}const n=c(this,oe).getMode();if(n===Se.STAMP||n===Se.POPUP||n===Se.SIGNATURE){c(this,oe).unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){var e;if(c(this,oe).getMode()===Se.HIGHLIGHT&&this.enableTextSelection(),c(this,tu)){F(this,tu,!1);return}const{isMac:r}=Fi.platform;if(t.button!==0||t.ctrlKey&&r||t.target!==this.div)return;if(F(this,tu,!0),(e=c(this,pi,Ka))!=null&&e.isDrawer){this.startDrawingSession(t);return}const n=c(this,oe).getActive();F(this,Im,!n||n.isEmpty())}startDrawingSession(t){if(this.div.focus({preventScroll:!0}),c(this,Ha)){c(this,pi,Ka).startDrawing(this,c(this,oe),!1,t);return}c(this,oe).setCurrentDrawingSession(this),F(this,Ha,new AbortController);const e=c(this,oe).combinedSignal(c(this,Ha));this.div.addEventListener("blur",({relatedTarget:r})=>{r&&!this.div.contains(r)&&(F(this,sh,null),this.commitOrRemove())},{signal:e}),c(this,pi,Ka).startDrawing(this,c(this,oe),!1,t)}pause(t){if(t){const{activeElement:e}=document;this.div.contains(e)&&F(this,sh,e);return}c(this,sh)&&setTimeout(()=>{var e;(e=c(this,sh))==null||e.focus(),F(this,sh,null)},0)}endDrawingSession(t=!1){return c(this,Ha)?(c(this,oe).setCurrentDrawingSession(null),c(this,Ha).abort(),F(this,Ha,null),F(this,sh,null),c(this,pi,Ka).endDrawing(t)):null}findNewParent(t,e,r){const n=c(this,oe).findParent(e,r);return n===null||n===this?!1:(n.changeParent(t),!0)}commitOrRemove(){return c(this,Ha)?(this.endDrawingSession(),!0):!1}onScaleChanging(){c(this,Ha)&&c(this,pi,Ka).onScaleChangingWhenDrawing(this)}destroy(){var t,e;this.commitOrRemove(),((t=c(this,oe).getActive())==null?void 0:t.parent)===this&&(c(this,oe).commitOrRemove(),c(this,oe).setActiveEditor(null)),c(this,nh)&&(clearTimeout(c(this,nh)),F(this,nh,null));for(const r of c(this,eA).values())(e=c(this,Sf))==null||e.removePointerInTextLayer(r.contentDiv),r.setParent(null),r.isAttachedToDOM=!1,r.div.remove();this.div=null,c(this,eA).clear(),c(this,oe).removeLayer(this)}async render({viewport:t}){this.viewport=t,Wh(this.div,t);for(const e of c(this,oe).getEditors(this.pageIndex))this.add(e),e.rebuild();await c(this,oe).findClonesForPage(this),this.div.hidden=this.isEmpty,this.updateMode()}update({viewport:t}){c(this,oe).commitOrRemove(),_(this,pi,uv).call(this);const e=this.viewport.rotation,r=t.rotation;if(this.viewport=t,Wh(this.div,{rotation:r}),e!==r)for(const n of c(this,eA).values())n.rotate(r)}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}get scale(){return c(this,oe).viewParameters.realScale}};Sf=new WeakMap,Im=new WeakMap,Zc=new WeakMap,Jc=new WeakMap,nh=new WeakMap,eA=new WeakMap,tu=new WeakMap,Qm=new WeakMap,Lm=new WeakMap,Ha=new WeakMap,sh=new WeakMap,vn=new WeakMap,Ah=new WeakMap,eu=new WeakMap,_m=new WeakMap,oe=new WeakMap,Fu=new WeakMap,pi=new WeakSet,M4=function(){return c(this,eA).size!==0?c(this,eA).values():c(this,oe).getEditors(this.pageIndex)},D6=function(i){c(this,oe).unselectAll();const{target:t}=i;if(t===c(this,vn).div||(t.getAttribute("role")==="img"||t.classList.contains("endOfContent")||t.classList.contains("textLayerImagePlaceholder"))&&c(this,vn).div.contains(t)){const{isMac:e}=Fi.platform;if(i.button!==0||i.ctrlKey&&e)return;c(this,oe).showAllEditors("highlight",!0,!0),c(this,vn).div.classList.add("free"),this.toggleDrawing(),OU.startHighlighting(this,c(this,oe).direction==="ltr",{target:c(this,vn).div,x:i.x,y:i.y}),c(this,vn).div.addEventListener("pointerup",()=>{c(this,vn).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:c(this,oe)._signal}),i.preventDefault()}},Ka=function(){return c(dv,Fu).get(c(this,oe).getMode())},T4=function(i){const t=c(this,pi,Ka);return t?new t.prototype.constructor(i):null},N4=function(){const{x:i,y:t,width:e,height:r}=this.boundingClientRect,n=Math.max(0,i),s=Math.max(0,t),A=Math.min(window.innerWidth,i+e),a=Math.min(window.innerHeight,t+r),o=(n+A)/2-i,l=(s+a)/2-t,[h,u]=this.viewport.rotation%180===0?[o,l]:[l,o];return{offsetX:h,offsetY:u}},uv=function(){for(const i of c(this,eA).values())i.isEmpty()&&i.remove()},ut(dv,"_initialized",!1),U(dv,Fu,new Map([VW,GW,_4,OU,zW].map(i=>[i._editorType,i])));let O6=dv;var Ga,Ss,Ef,gy,P4,R6,iu,D4,H6,O4;const kf=class Xs{constructor(){U(this,iu),U(this,Ga,null),U(this,Ss,new Map),U(this,Ef,new Map)}setParent(t){if(!c(this,Ga)){F(this,Ga,t);return}if(c(this,Ga)!==t){if(c(this,Ss).size>0)for(const e of c(this,Ss).values())e.remove(),t.append(e);F(this,Ga,t)}}static get _svgFactory(){return ke(this,"_svgFactory",new D0)}draw(t,e=!1,r=!1){const n=$i(Xs,gy)._++,s=_(this,iu,D4).call(this),A=Xs._svgFactory.createElement("defs");s.append(A);const a=Xs._svgFactory.createElement("path");A.append(a);const o=`path_${n}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke"),e&&c(this,Ef).set(n,a);const l=r?_(this,iu,H6).call(this,A,o):null,h=Xs._svgFactory.createElement("use");return s.append(h),h.setAttribute("href",`#${o}`),this.updateProperties(s,t),c(this,Ss).set(n,s),{id:n,clipPathId:`url(#${l})`}}drawOutline(t,e){const r=$i(Xs,gy)._++,n=_(this,iu,D4).call(this),s=Xs._svgFactory.createElement("defs");n.append(s);const A=Xs._svgFactory.createElement("path");s.append(A);const a=`path_${r}`;A.setAttribute("id",a),A.setAttribute("vector-effect","non-scaling-stroke");let o;if(e){const u=Xs._svgFactory.createElement("mask");s.append(u),o=`mask_${r}`,u.setAttribute("id",o),u.setAttribute("maskUnits","objectBoundingBox");const f=Xs._svgFactory.createElement("rect");u.append(f),f.setAttribute("width","1"),f.setAttribute("height","1"),f.setAttribute("fill","white");const d=Xs._svgFactory.createElement("use");u.append(d),d.setAttribute("href",`#${a}`),d.setAttribute("stroke","none"),d.setAttribute("fill","black"),d.setAttribute("fill-rule","nonzero"),d.classList.add("mask")}const l=Xs._svgFactory.createElement("use");n.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);const h=l.cloneNode();return n.append(h),l.classList.add("mainOutline"),h.classList.add("secondaryOutline"),this.updateProperties(n,t),c(this,Ss).set(r,n),r}finalizeDraw(t,e){c(this,Ef).delete(t),this.updateProperties(t,e)}updateProperties(t,e){var r;if(!e)return;const{root:n,bbox:s,rootClass:A,path:a}=e,o=typeof t=="number"?c(this,Ss).get(t):t;if(o){if(n&&_(this,iu,O4).call(this,o,n),s&&_(r=Xs,P4,R6).call(r,o,s),A){const{classList:l}=o;for(const[h,u]of Object.entries(A))l.toggle(h,u)}if(a){const l=o.firstElementChild.firstElementChild;_(this,iu,O4).call(this,l,a)}}}updateParent(t,e){if(e===this)return;const r=c(this,Ss).get(t);r&&(c(e,Ga).append(r),c(this,Ss).delete(t),c(e,Ss).set(t,r))}remove(t){c(this,Ef).delete(t),c(this,Ga)!==null&&(c(this,Ss).get(t).remove(),c(this,Ss).delete(t))}destroy(){F(this,Ga,null);for(const t of c(this,Ss).values())t.remove();c(this,Ss).clear(),c(this,Ef).clear()}};Ga=new WeakMap,Ss=new WeakMap,Ef=new WeakMap,gy=new WeakMap,P4=new WeakSet,R6=function(i,[t,e,r,n]){const{style:s}=i;s.top=`${100*e}%`,s.left=`${100*t}%`,s.width=`${100*r}%`,s.height=`${100*n}%`},iu=new WeakSet,D4=function(){const i=kf._svgFactory.create(1,1,!0);return c(this,Ga).append(i),i.setAttribute("aria-hidden",!0),i},H6=function(i,t){const e=kf._svgFactory.createElement("clipPath");i.append(e);const r=`clip_${t}`;e.setAttribute("id",r),e.setAttribute("clipPathUnits","objectBoundingBox");const n=kf._svgFactory.createElement("use");return e.append(n),n.setAttribute("href",`#${t}`),n.classList.add("clip"),r},O4=function(i,t){for(const[e,r]of Object.entries(t))r===null?i.removeAttribute(e):i.setAttribute(e,r)},U(kf,P4),U(kf,gy,0);let V6=kf;function ow(i){return`${(i*100).toFixed(2)}%`}var Mm,my,fv,F0,al,ol,wy,R4,W6;const j6=class H4{constructor(t,e,r,n){U(this,R4),U(this,Mm,[]),U(this,my,new Map),U(this,fv,null),U(this,F0,0),U(this,al,0),U(this,ol,0),F(this,F0,t),F(this,Mm,e),F(this,al,r.rawDims.pageWidth),F(this,ol,r.rawDims.pageHeight),F(this,fv,n)}render(){const t=document.createElement("div");t.className="textLayerImages";for(let e=0;e<c(this,Mm).length;e+=6){const r=_(this,R4,W6).call(this,c(this,Mm).subarray(e,e+6));r&&t.append(r)}return t.addEventListener("contextmenu",e=>{var r;if(!(e.target instanceof HTMLCanvasElement))return;const n=e.target,s=c(this,my).get(n);if(!s)return;const A=(r=c(H4,wy))==null?void 0:r.deref();if(A===n)return;A&&(A.width=0,A.height=0),F(H4,wy,new WeakRef(n));const{inverseTransform:a,x1:o,y1:l,width:h,height:u}=s,f=c(this,fv).call(this),d=Math.ceil(o*f.width),g=Math.ceil(l*f.height),m=Math.floor((o+h/c(this,al))*f.width),y=Math.floor((l+u/c(this,ol))*f.height);n.width=m-d,n.height=y-g;const w=n.getContext("2d");w.setTransform(...a),w.translate(-d,-g),w.drawImage(f,0,0)}),t}};Mm=new WeakMap,my=new WeakMap,fv=new WeakMap,F0=new WeakMap,al=new WeakMap,ol=new WeakMap,wy=new WeakMap,R4=new WeakSet,W6=function([i,t,e,r,n,s]){const A=Math.hypot((n-i)*c(this,al),(s-t)*c(this,ol)),a=Math.hypot((e-i)*c(this,al),(r-t)*c(this,ol));if(A<c(this,F0)||a<c(this,F0))return null;const o=[(n-i)*c(this,al)/A,(s-t)*c(this,ol)/A,(e-i)*c(this,al)/a,(r-t)*c(this,ol)/a,0,0],l=Nt.inverseTransform(o),h=document.createElement("canvas");return h.className="textLayerImagePlaceholder",h.width=0,h.height=0,Object.assign(h.style,{opacity:0,position:"absolute",left:ow(i),top:ow(t),width:ow(A/c(this,al)),height:ow(a/c(this,ol)),transformOrigin:"0% 0%",transform:`matrix(${o.join(",")})`}),c(this,my).set(h,{inverseTransform:l,width:A,height:a,x1:i,y1:t}),h},U(j6,wy,null);let K6=j6;globalThis._pdfjsTestingUtils={HighlightOutliner:b4};globalThis.pdfjsLib={AbortException:ml,AnnotationEditorLayer:O6,AnnotationEditorParamsType:_e,AnnotationEditorType:Se,AnnotationEditorUIManager:Cp,AnnotationLayer:t6,AnnotationMode:ll,AnnotationType:gi,applyOpacity:wN,build:RP,ColorPicker:zS,createValidAbsoluteUrl:PS,CSSConstants:mN,DOMSVGFactory:D0,DrawLayer:V6,FeatureTest:Fi,fetchData:Ry,findContrastColor:vN,getDocument:KS,getFilenameFromUrl:fN,getPdfFilenameFromUrl:pN,getRGB:Sp,getRGBA:Wy,getUuid:OS,getXfaPageViewport:gN,GlobalWorkerOptions:so,ImageKind:Km,InvalidPDFException:Fv,isDataScheme:Y0,isPdfFile:Vy,isValidExplicitDest:rP,makeArr:Dy,makeMap:Oy,makeObj:Sv,MathClamp:Mr,noContextMenu:AA,normalizeUnicode:dN,OPS:Ja,OutputScale:pa,PasswordResponses:uN,PDFDataRangeTransport:GS,PDFDateString:N0,PDFWorker:Yv,PermissionFlag:cN,PixelsPerInch:Pu,RenderingCancelledException:Hy,renderRichText:HS,ResponseException:M0,setLayerDimensions:Wh,shadow:ke,SignatureExtractor:io,stopEvent:Hr,SupportedImageMimeTypes:jy,TextLayer:qv,TextLayerImages:K6,TouchManager:VS,updateUrlHash:DS,Util:Nt,VerbosityLevel:q0,version:OP,XfaLayer:RS};const qW=Object.freeze(Object.defineProperty({__proto__:null,AbortException:ml,AnnotationEditorLayer:O6,AnnotationEditorParamsType:_e,AnnotationEditorType:Se,AnnotationEditorUIManager:Cp,AnnotationLayer:t6,AnnotationMode:ll,AnnotationType:gi,CSSConstants:mN,ColorPicker:zS,DOMSVGFactory:D0,DrawLayer:V6,FeatureTest:Fi,GlobalWorkerOptions:so,ImageKind:Km,InvalidPDFException:Fv,MathClamp:Mr,OPS:Ja,OutputScale:pa,PDFDataRangeTransport:GS,PDFDateString:N0,PDFWorker:Yv,PasswordResponses:uN,PermissionFlag:cN,PixelsPerInch:Pu,RenderingCancelledException:Hy,ResponseException:M0,SignatureExtractor:io,SupportedImageMimeTypes:jy,TextLayer:qv,TextLayerImages:K6,TouchManager:VS,Util:Nt,VerbosityLevel:q0,XfaLayer:RS,applyOpacity:wN,build:RP,createValidAbsoluteUrl:PS,fetchData:Ry,findContrastColor:vN,getDocument:KS,getFilenameFromUrl:fN,getPdfFilenameFromUrl:pN,getRGB:Sp,getRGBA:Wy,getUuid:OS,getXfaPageViewport:gN,isDataScheme:Y0,isPdfFile:Vy,isValidExplicitDest:rP,makeArr:Dy,makeMap:Oy,makeObj:Sv,noContextMenu:AA,normalizeUnicode:dN,renderRichText:HS,setLayerDimensions:Wh,shadow:ke,stopEvent:Hr,updateUrlHash:DS,version:OP},Symbol.toStringTag,{value:"Module"}));so.workerSrc="";const WU=25.4/72,JB=8;class XW{importFromFilePicker(t){const e=document.createElement("input");e.type="file",e.accept=".pdf",e.style.display="none",document.body.appendChild(e),e.addEventListener("change",async()=>{var r;const n=(r=e.files)==null?void 0:r[0];if(document.body.removeChild(e),!n)return;const s=await n.arrayBuffer();await this.convert(t,s)}),e.click()}async convert(t,e,r=1){try{const n=await(await KS({data:e}).promise).getPage(r),s=n.getViewport({scale:1}).height,A=await n.getOperatorList(),a=this.extractEntities(A,s);if(a.length===0){AB.warn("[PdfImport] No vector paths found in PDF page.");return}const o=t.doc.database.tables.blockTable.modelSpace;for(const l of a)o.appendEntity(l);AB.info(`[PdfImport] Imported ${a.length} entities from PDF.`)}catch(n){AB.error("[PdfImport] Failed to import PDF:",n)}}extractEntities(t,e){const{OPS:r}=qW,{fnArray:n,argsArray:s}=t,A=[];let a=[],o=[],l=0,h=0;const u=()=>{o.length>1&&a.push(o),o=[]},f=()=>{u();for(const m of a){const y=this.subpathToEntity(m);y&&A.push(y)}a=[]},d=(m,y)=>m*WU,g=(m,y)=>(e-y)*WU;for(let m=0;m<n.length;m++){const y=n[m],w=s[m];switch(y){case r.moveTo:{u(),l=w[0],h=w[1],o=[{x:d(l),y:g(l,h)}];break}case r.lineTo:{l=w[0],h=w[1],o.push({x:d(l),y:g(l,h)});break}case r.curveTo:{const[b,C,S,k,I,N]=w,D=t5({x:l,y:h},{x:b,y:C},{x:S,y:k},{x:I,y:N},JB);for(const Q of D)o.push({x:d(Q.x,Q.y),y:g(Q.x,Q.y)});l=I,h=N;break}case r.curveTo2:{const[b,C,S,k]=w,I=t5({x:l,y:h},{x:l,y:h},{x:b,y:C},{x:S,y:k},JB);for(const N of I)o.push({x:d(N.x,N.y),y:g(N.x,N.y)});l=S,h=k;break}case r.curveTo3:{const[b,C,S,k]=w,I=t5({x:l,y:h},{x:b,y:C},{x:S,y:k},{x:S,y:k},JB);for(const N of I)o.push({x:d(N.x,N.y),y:g(N.x,N.y)});l=S,h=k;break}case r.closePath:{o.length>0&&a.length===0&&o.push({...o[0]}),u();break}case r.stroke:case r.fill:case r.eoFill:case r.fillStroke:case r.eoFillStroke:case r.endPath:{f();break}}}return f(),A}subpathToEntity(t){if(t.length<2)return null;if(t.length===2)return new aR(new p3(t[0].x,t[0].y,0),new p3(t[1].x,t[1].y,0));const e=new oR;for(let a=0;a<t.length;a++)e.addVertexAt(a,new lR(t[a].x,t[a].y));const r=t[0],n=t[t.length-1],s=r.x-n.x,A=r.y-n.y;return Math.sqrt(s*s+A*A)<1e-6&&(e.closed=!0),e}}function t5(i,t,e,r,n){const s=[];for(let A=1;A<=n;A++){const a=A/n,o=1-a,l=o*o*o*i.x+3*o*o*a*t.x+3*o*a*a*e.x+a*a*a*r.x,h=o*o*o*i.y+3*o*o*a*t.y+3*o*a*a*e.y+a*a*a*r.y;s.push({x:l,y:h})}return s}class YW extends ZM{async execute(t){new XW().importFromFilePicker(t)}}const $W="1.6.3",ZW={version:$W};class JW{constructor(){this.name="PdfPlugin",this.version=ZW.version,this.description="PDF export (cpdf) and import (ipdf) commands",this.registeredCommands=[]}onLoad(t,e){const r=nR.SYSTEMT_COMMAND_GROUP_NAME;e.addCommand(r,"cpdf","cpdf",new H9),e.addCommand(r,"ipdf","ipdf",new YW),this.registeredCommands.push({group:r,name:"cpdf"},{group:r,name:"ipdf"})}onUnload(t,e){for(const r of this.registeredCommands)e.removeCmd(r.group,r.name);this.registeredCommands=[]}}async function wZ(){return new JW}/*!
|
|
273
|
-
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
274
|
-
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
275
|
-
* Released under MIT License
|
|
276
|
-
*//*! *****************************************************************************
|
|
277
|
-
Copyright (c) Microsoft Corporation.
|
|
278
|
-
|
|
279
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
280
|
-
purpose with or without fee is hereby granted.
|
|
281
|
-
|
|
282
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
283
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
284
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
285
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
286
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
287
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
288
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
289
|
-
***************************************************************************** */var V4=function(i,t){return V4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])},V4(i,t)};function wa(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");V4(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var W4=function(){return W4=Object.assign||function(i){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},W4.apply(this,arguments)};function as(i,t,e,r){function n(s){return s instanceof e?s:new e(function(A){A(s)})}return new(e||(e=Promise))(function(s,A){function a(h){try{l(r.next(h))}catch(u){A(u)}}function o(h){try{l(r.throw(h))}catch(u){A(u)}}function l(h){h.done?s(h.value):n(h.value).then(a,o)}l((r=r.apply(i,[])).next())})}function Wn(i,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,A;return A={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(A[Symbol.iterator]=function(){return this}),A;function a(l){return function(h){return o([l,h])}}function o(l){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,n&&(s=l[0]&2?n.return:l[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;switch(n=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,n=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(i,e)}catch(h){l=[6,h],n=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function lw(i,t,e){if(arguments.length===2)for(var r=0,n=t.length,s;r<n;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return i.concat(s||t)}var wl=(function(){function i(t,e,r,n){this.left=t,this.top=e,this.width=r,this.height=n}return i.prototype.add=function(t,e,r,n){return new i(this.left+t,this.top+e,this.width+r,this.height+n)},i.fromClientRect=function(t,e){return new i(e.left+t.windowBounds.left,e.top+t.windowBounds.top,e.width,e.height)},i.fromDOMRectList=function(t,e){var r=Array.from(e).find(function(n){return n.width!==0});return r?new i(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):i.EMPTY},i.EMPTY=new i(0,0,0,0),i})(),tb=function(i,t){return wl.fromClientRect(i,t.getBoundingClientRect())},tj=function(i){var t=i.body,e=i.documentElement;if(!t||!e)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,e.scrollWidth),Math.max(t.offsetWidth,e.offsetWidth),Math.max(t.clientWidth,e.clientWidth)),n=Math.max(Math.max(t.scrollHeight,e.scrollHeight),Math.max(t.offsetHeight,e.offsetHeight),Math.max(t.clientHeight,e.clientHeight));return new wl(0,0,r,n)},eb=function(i){for(var t=[],e=0,r=i.length;e<r;){var n=i.charCodeAt(e++);if(n>=55296&&n<=56319&&e<r){var s=i.charCodeAt(e++);(s&64512)===56320?t.push(((n&1023)<<10)+(s&1023)+65536):(t.push(n),e--)}else t.push(n)}return t},yi=function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,i);var e=i.length;if(!e)return"";for(var r=[],n=-1,s="";++n<e;){var A=i[n];A<=65535?r.push(A):(A-=65536,r.push((A>>10)+55296,A%1024+56320)),(n+1===e||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},jU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ej=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var hw=0;hw<jU.length;hw++)ej[jU.charCodeAt(hw)]=hw;var KU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var cw=0;cw<KU.length;cw++)Tm[KU.charCodeAt(cw)]=cw;var rj=function(i){var t=i.length*.75,e=i.length,r,n=0,s,A,a,o;i[i.length-1]==="="&&(t--,i[i.length-2]==="="&&t--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),h=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<e;r+=4)s=Tm[i.charCodeAt(r)],A=Tm[i.charCodeAt(r+1)],a=Tm[i.charCodeAt(r+2)],o=Tm[i.charCodeAt(r+3)],h[n++]=s<<2|A>>4,h[n++]=(A&15)<<4|a>>2,h[n++]=(a&3)<<6|o&63;return l},ij=function(i){for(var t=i.length,e=[],r=0;r<t;r+=2)e.push(i[r+1]<<8|i[r]);return e},nj=function(i){for(var t=i.length,e=[],r=0;r<t;r+=4)e.push(i[r+3]<<24|i[r+2]<<16|i[r+1]<<8|i[r]);return e},Iu=5,ZS=11,e5=2,sj=ZS-Iu,G6=65536>>Iu,Aj=1<<Iu,r5=Aj-1,aj=1024>>Iu,oj=G6+aj,lj=oj,hj=32,cj=lj+hj,uj=65536>>ZS,dj=1<<sj,fj=dj-1,GU=function(i,t,e){return i.slice?i.slice(t,e):new Uint16Array(Array.prototype.slice.call(i,t,e))},pj=function(i,t,e){return i.slice?i.slice(t,e):new Uint32Array(Array.prototype.slice.call(i,t,e))},gj=function(i,t){var e=rj(i),r=Array.isArray(e)?nj(e):new Uint32Array(e),n=Array.isArray(e)?ij(e):new Uint16Array(e),s=24,A=GU(n,s/2,r[4]/2),a=r[5]===2?GU(n,(s+r[4])/2):pj(r,Math.ceil((s+r[4])/4));return new mj(r[0],r[1],r[2],r[3],A,a)},mj=(function(){function i(t,e,r,n,s,A){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=n,this.index=s,this.data=A}return i.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>Iu],e=(e<<e5)+(t&r5),this.data[e];if(t<=65535)return e=this.index[G6+(t-55296>>Iu)],e=(e<<e5)+(t&r5),this.data[e];if(t<this.highStart)return e=cj-uj+(t>>ZS),e=this.index[e],e+=t>>Iu&fj,e=this.index[e],e=(e<<e5)+(t&r5),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},i})(),zU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wj=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var uw=0;uw<zU.length;uw++)wj[zU.charCodeAt(uw)]=uw;var vj="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",qU=50,yj=1,z6=2,q6=3,bj=4,Bj=5,XU=7,X6=8,YU=9,Nh=10,j4=11,$U=12,K4=13,Cj=14,Nm=15,G4=16,dw=17,og=18,xj=19,ZU=20,z4=21,lg=22,i5=23,vd=24,Ys=25,Pm=26,Dm=27,yd=28,Fj=29,Zf=30,Sj=31,fw=32,pw=33,q4=34,X4=35,Y4=36,O0=37,$4=38,pv=39,gv=40,n5=41,Y6=42,Ej=43,kj=[9001,65288],$6="!",As="×",gw="÷",Z4=gj(vj),ko=[Zf,Y4],J4=[yj,z6,q6,Bj],Z6=[Nh,X6],JU=[Dm,Pm],Uj=J4.concat(Z6),tI=[$4,pv,gv,q4,X4],Ij=[Nm,K4],Qj=function(i,t){t===void 0&&(t="strict");var e=[],r=[],n=[];return i.forEach(function(s,A){var a=Z4.get(s);if(a>qU?(n.push(!0),a-=qU):n.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(s)!==-1)return r.push(A),e.push(G4);if(a===bj||a===j4){if(A===0)return r.push(A),e.push(Zf);var o=e[A-1];return Uj.indexOf(o)===-1?(r.push(r[A-1]),e.push(o)):(r.push(A),e.push(Zf))}if(r.push(A),a===Sj)return e.push(t==="strict"?z4:O0);if(a===Y6||a===Fj)return e.push(Zf);if(a===Ej)return s>=131072&&s<=196605||s>=196608&&s<=262141?e.push(O0):e.push(Zf);e.push(a)}),[r,e,n]},s5=function(i,t,e,r){var n=r[e];if(Array.isArray(i)?i.indexOf(n)!==-1:i===n)for(var s=e;s<=r.length;){s++;var A=r[s];if(A===t)return!0;if(A!==Nh)break}if(n===Nh)for(var s=e;s>0;){s--;var a=r[s];if(Array.isArray(i)?i.indexOf(a)!==-1:i===a)for(var o=e;o<=r.length;){o++;var A=r[o];if(A===t)return!0;if(A!==Nh)break}if(a!==Nh)break}return!1},eI=function(i,t){for(var e=i;e>=0;){var r=t[e];if(r===Nh)e--;else return r}return 0},Lj=function(i,t,e,r,n){if(e[r]===0)return As;var s=r-1;if(Array.isArray(n)&&n[s]===!0)return As;var A=s-1,a=s+1,o=t[s],l=A>=0?t[A]:0,h=t[a];if(o===z6&&h===q6)return As;if(J4.indexOf(o)!==-1)return $6;if(J4.indexOf(h)!==-1||Z6.indexOf(h)!==-1)return As;if(eI(s,t)===X6)return gw;if(Z4.get(i[s])===j4||(o===fw||o===pw)&&Z4.get(i[a])===j4||o===XU||h===XU||o===YU||[Nh,K4,Nm].indexOf(o)===-1&&h===YU||[dw,og,xj,vd,yd].indexOf(h)!==-1||eI(s,t)===lg||s5(i5,lg,s,t)||s5([dw,og],z4,s,t)||s5($U,$U,s,t))return As;if(o===Nh)return gw;if(o===i5||h===i5)return As;if(h===G4||o===G4)return gw;if([K4,Nm,z4].indexOf(h)!==-1||o===Cj||l===Y4&&Ij.indexOf(o)!==-1||o===yd&&h===Y4||h===ZU||ko.indexOf(h)!==-1&&o===Ys||ko.indexOf(o)!==-1&&h===Ys||o===Dm&&[O0,fw,pw].indexOf(h)!==-1||[O0,fw,pw].indexOf(o)!==-1&&h===Pm||ko.indexOf(o)!==-1&&JU.indexOf(h)!==-1||JU.indexOf(o)!==-1&&ko.indexOf(h)!==-1||[Dm,Pm].indexOf(o)!==-1&&(h===Ys||[lg,Nm].indexOf(h)!==-1&&t[a+1]===Ys)||[lg,Nm].indexOf(o)!==-1&&h===Ys||o===Ys&&[Ys,yd,vd].indexOf(h)!==-1)return As;if([Ys,yd,vd,dw,og].indexOf(h)!==-1)for(var u=s;u>=0;){var f=t[u];if(f===Ys)return As;if([yd,vd].indexOf(f)!==-1)u--;else break}if([Dm,Pm].indexOf(h)!==-1)for(var u=[dw,og].indexOf(o)!==-1?A:s;u>=0;){var f=t[u];if(f===Ys)return As;if([yd,vd].indexOf(f)!==-1)u--;else break}if($4===o&&[$4,pv,q4,X4].indexOf(h)!==-1||[pv,q4].indexOf(o)!==-1&&[pv,gv].indexOf(h)!==-1||[gv,X4].indexOf(o)!==-1&&h===gv||tI.indexOf(o)!==-1&&[ZU,Pm].indexOf(h)!==-1||tI.indexOf(h)!==-1&&o===Dm||ko.indexOf(o)!==-1&&ko.indexOf(h)!==-1||o===vd&&ko.indexOf(h)!==-1||ko.concat(Ys).indexOf(o)!==-1&&h===lg&&kj.indexOf(i[a])===-1||ko.concat(Ys).indexOf(h)!==-1&&o===og)return As;if(o===n5&&h===n5){for(var d=e[s],g=1;d>0&&(d--,t[d]===n5);)g++;if(g%2!==0)return As}return o===fw&&h===pw?As:gw},_j=function(i,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var e=Qj(i,t.lineBreak),r=e[0],n=e[1],s=e[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(n=n.map(function(a){return[Ys,Zf,Y6].indexOf(a)!==-1?O0:a}));var A=t.wordBreak==="keep-all"?s.map(function(a,o){return a&&i[o]>=19968&&i[o]<=40959}):void 0;return[r,n,A]},Mj=(function(){function i(t,e,r,n){this.codePoints=t,this.required=e===$6,this.start=r,this.end=n}return i.prototype.slice=function(){return yi.apply(void 0,this.codePoints.slice(this.start,this.end))},i})(),Tj=function(i,t){var e=eb(i),r=_j(e,t),n=r[0],s=r[1],A=r[2],a=e.length,o=0,l=0;return{next:function(){if(l>=a)return{done:!0,value:null};for(var h=As;l<a&&(h=Lj(e,s,n,++l,A))===As;);if(h!==As||l===a){var u=new Mj(e,h,o,l);return o=l,{value:u,done:!1}}return{done:!0,value:null}}}},Nj=1,Pj=2,J0=4,rI=8,vy=10,iI=47,S0=92,Dj=9,Oj=32,mw=34,hg=61,Rj=35,Hj=36,Vj=37,ww=39,vw=40,cg=41,Wj=95,Ls=45,jj=33,Kj=60,Gj=62,zj=64,qj=91,Xj=93,Yj=61,$j=123,yw=63,Zj=125,nI=124,Jj=126,tK=128,sI=65533,A5=42,Su=43,eK=44,rK=58,iK=59,R0=46,nK=0,sK=8,AK=11,aK=14,oK=31,lK=127,Ma=-1,J6=48,tD=97,eD=101,hK=102,cK=117,uK=122,rD=65,iD=69,nD=70,dK=85,fK=90,us=function(i){return i>=J6&&i<=57},pK=function(i){return i>=55296&&i<=57343},bd=function(i){return us(i)||i>=rD&&i<=nD||i>=tD&&i<=hK},gK=function(i){return i>=tD&&i<=uK},mK=function(i){return i>=rD&&i<=fK},wK=function(i){return gK(i)||mK(i)},vK=function(i){return i>=tK},bw=function(i){return i===vy||i===Dj||i===Oj},yy=function(i){return wK(i)||vK(i)||i===Wj},AI=function(i){return yy(i)||us(i)||i===Ls},yK=function(i){return i>=nK&&i<=sK||i===AK||i>=aK&&i<=oK||i===lK},fh=function(i,t){return i!==S0?!1:t!==vy},Bw=function(i,t,e){return i===Ls?yy(t)||fh(t,e):yy(i)?!0:!!(i===S0&&fh(i,t))},a5=function(i,t,e){return i===Su||i===Ls?us(t)?!0:t===R0&&us(e):us(i===R0?t:i)},bK=function(i){var t=0,e=1;(i[t]===Su||i[t]===Ls)&&(i[t]===Ls&&(e=-1),t++);for(var r=[];us(i[t]);)r.push(i[t++]);var n=r.length?parseInt(yi.apply(void 0,r),10):0;i[t]===R0&&t++;for(var s=[];us(i[t]);)s.push(i[t++]);var A=s.length,a=A?parseInt(yi.apply(void 0,s),10):0;(i[t]===iD||i[t]===eD)&&t++;var o=1;(i[t]===Su||i[t]===Ls)&&(i[t]===Ls&&(o=-1),t++);for(var l=[];us(i[t]);)l.push(i[t++]);var h=l.length?parseInt(yi.apply(void 0,l),10):0;return e*(n+a*Math.pow(10,-A))*Math.pow(10,o*h)},BK={type:2},CK={type:3},xK={type:4},FK={type:13},SK={type:8},EK={type:21},kK={type:9},UK={type:10},IK={type:11},QK={type:12},LK={type:14},Cw={type:23},_K={type:1},MK={type:25},TK={type:24},NK={type:26},PK={type:27},DK={type:28},OK={type:29},RK={type:31},tS={type:32},sD=(function(){function i(){this._value=[]}return i.prototype.write=function(t){this._value=this._value.concat(eb(t))},i.prototype.read=function(){for(var t=[],e=this.consumeToken();e!==tS;)t.push(e),e=this.consumeToken();return t},i.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case mw:return this.consumeStringToken(mw);case Rj:var e=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);if(AI(e)||fh(r,n)){var s=Bw(e,r,n)?Pj:Nj,A=this.consumeName();return{type:5,value:A,flags:s}}break;case Hj:if(this.peekCodePoint(0)===hg)return this.consumeCodePoint(),FK;break;case ww:return this.consumeStringToken(ww);case vw:return BK;case cg:return CK;case A5:if(this.peekCodePoint(0)===hg)return this.consumeCodePoint(),LK;break;case Su:if(a5(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case eK:return xK;case Ls:var a=t,o=this.peekCodePoint(0),l=this.peekCodePoint(1);if(a5(a,o,l))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(Bw(a,o,l))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(o===Ls&&l===Gj)return this.consumeCodePoint(),this.consumeCodePoint(),TK;break;case R0:if(a5(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case iI:if(this.peekCodePoint(0)===A5)for(this.consumeCodePoint();;){var h=this.consumeCodePoint();if(h===A5&&(h=this.consumeCodePoint(),h===iI))return this.consumeToken();if(h===Ma)return this.consumeToken()}break;case rK:return NK;case iK:return PK;case Kj:if(this.peekCodePoint(0)===jj&&this.peekCodePoint(1)===Ls&&this.peekCodePoint(2)===Ls)return this.consumeCodePoint(),this.consumeCodePoint(),MK;break;case zj:var u=this.peekCodePoint(0),f=this.peekCodePoint(1),d=this.peekCodePoint(2);if(Bw(u,f,d)){var A=this.consumeName();return{type:7,value:A}}break;case qj:return DK;case S0:if(fh(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case Xj:return OK;case Yj:if(this.peekCodePoint(0)===hg)return this.consumeCodePoint(),SK;break;case $j:return IK;case Zj:return QK;case cK:case dK:var g=this.peekCodePoint(0),m=this.peekCodePoint(1);return g===Su&&(bd(m)||m===yw)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case nI:if(this.peekCodePoint(0)===hg)return this.consumeCodePoint(),kK;if(this.peekCodePoint(0)===nI)return this.consumeCodePoint(),EK;break;case Jj:if(this.peekCodePoint(0)===hg)return this.consumeCodePoint(),UK;break;case Ma:return tS}return bw(t)?(this.consumeWhiteSpace(),RK):us(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):yy(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:yi(t)}},i.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},i.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},i.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},i.prototype.consumeUnicodeRangeToken=function(){for(var t=[],e=this.consumeCodePoint();bd(e)&&t.length<6;)t.push(e),e=this.consumeCodePoint();for(var r=!1;e===yw&&t.length<6;)t.push(e),e=this.consumeCodePoint(),r=!0;if(r){var n=parseInt(yi.apply(void 0,t.map(function(o){return o===yw?J6:o})),16),s=parseInt(yi.apply(void 0,t.map(function(o){return o===yw?nD:o})),16);return{type:30,start:n,end:s}}var A=parseInt(yi.apply(void 0,t),16);if(this.peekCodePoint(0)===Ls&&bd(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var a=[];bd(e)&&a.length<6;)a.push(e),e=this.consumeCodePoint();var s=parseInt(yi.apply(void 0,a),16);return{type:30,start:A,end:s}}else return{type:30,start:A,end:A}},i.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===vw?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===vw?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},i.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ma)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===ww||e===mw){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ma||this.peekCodePoint(0)===cg)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),Cw)}for(;;){var n=this.consumeCodePoint();if(n===Ma||n===cg)return{type:22,value:yi.apply(void 0,t)};if(bw(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ma||this.peekCodePoint(0)===cg?(this.consumeCodePoint(),{type:22,value:yi.apply(void 0,t)}):(this.consumeBadUrlRemnants(),Cw);if(n===mw||n===ww||n===vw||yK(n))return this.consumeBadUrlRemnants(),Cw;if(n===S0)if(fh(n,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Cw;else t.push(n)}},i.prototype.consumeWhiteSpace=function(){for(;bw(this.peekCodePoint(0));)this.consumeCodePoint()},i.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===cg||t===Ma)return;fh(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},i.prototype.consumeStringSlice=function(t){for(var e=5e4,r="";t>0;){var n=Math.min(e,t);r+=yi.apply(void 0,this._value.splice(0,n)),t-=n}return this._value.shift(),r},i.prototype.consumeStringToken=function(t){var e="",r=0;do{var n=this._value[r];if(n===Ma||n===void 0||n===t)return e+=this.consumeStringSlice(r),{type:0,value:e};if(n===vy)return this._value.splice(0,r),_K;if(n===S0){var s=this._value[r+1];s!==Ma&&s!==void 0&&(s===vy?(e+=this.consumeStringSlice(r),r=-1,this._value.shift()):fh(n,s)&&(e+=this.consumeStringSlice(r),e+=yi(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},i.prototype.consumeNumber=function(){var t=[],e=J0,r=this.peekCodePoint(0);for((r===Su||r===Ls)&&t.push(this.consumeCodePoint());us(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(r===R0&&us(n))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=rI;us(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0),n=this.peekCodePoint(1);var s=this.peekCodePoint(2);if((r===iD||r===eD)&&((n===Su||n===Ls)&&us(s)||us(n)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=rI;us(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[bK(t),e]},i.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),e=t[0],r=t[1],n=this.peekCodePoint(0),s=this.peekCodePoint(1),A=this.peekCodePoint(2);if(Bw(n,s,A)){var a=this.consumeName();return{type:15,number:e,flags:r,unit:a}}return n===Vj?(this.consumeCodePoint(),{type:16,number:e,flags:r}):{type:17,number:e,flags:r}},i.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(bd(t)){for(var e=yi(t);bd(this.peekCodePoint(0))&&e.length<6;)e+=yi(this.consumeCodePoint());bw(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(e,16);return r===0||pK(r)||r>1114111?sI:r}return t===Ma?sI:t},i.prototype.consumeName=function(){for(var t="";;){var e=this.consumeCodePoint();if(AI(e))t+=yi(e);else if(fh(e,this.peekCodePoint(0)))t+=yi(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(e),t}},i})(),AD=(function(){function i(t){this._tokens=t}return i.create=function(t){var e=new sD;return e.write(t),new i(e.read())},i.parseValue=function(t){return i.create(t).parseComponentValue()},i.parseValues=function(t){return i.create(t).parseComponentValues()},i.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var e=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},i.prototype.parseComponentValues=function(){for(var t=[];;){var e=this.consumeComponentValue();if(e.type===32)return t;t.push(e),t.push()}},i.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},i.prototype.consumeSimpleBlock=function(t){for(var e={type:t,values:[]},r=this.consumeToken();;){if(r.type===32||VK(r,t))return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue()),r=this.consumeToken()}},i.prototype.consumeFunction=function(t){for(var e={name:t.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue())}},i.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?tS:t},i.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},i})(),t1=function(i){return i.type===15},Ep=function(i){return i.type===17},cr=function(i){return i.type===20},HK=function(i){return i.type===0},eS=function(i,t){return cr(i)&&i.value===t},aD=function(i){return i.type!==31},xp=function(i){return i.type!==31&&i.type!==4},ao=function(i){var t=[],e=[];return i.forEach(function(r){if(r.type===4){if(e.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(e),e=[];return}r.type!==31&&e.push(r)}),e.length&&t.push(e),t},VK=function(i,t){return t===11&&i.type===12||t===28&&i.type===29?!0:t===2&&i.type===3},jh=function(i){return i.type===17||i.type===15},Oi=function(i){return i.type===16||jh(i)},oD=function(i){return i.length>1?[i[0],i[1]]:[i[0]]},Cn={type:17,number:0,flags:J0},JS={type:16,number:50,flags:J0},Ph={type:16,number:100,flags:J0},Om=function(i,t,e){var r=i[0],n=i[1];return[Fr(r,t),Fr(typeof n<"u"?n:r,e)]},Fr=function(i,t){if(i.type===16)return i.number/100*t;if(t1(i))switch(i.unit){case"rem":case"em":return 16*i.number;case"px":default:return i.number}return i.number},lD="deg",hD="grad",cD="rad",uD="turn",rb={name:"angle",parse:function(i,t){if(t.type===15)switch(t.unit){case lD:return Math.PI*t.number/180;case hD:return Math.PI/200*t.number;case cD:return t.number;case uD:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},dD=function(i){return i.type===15&&(i.unit===lD||i.unit===hD||i.unit===cD||i.unit===uD)},fD=function(i){var t=i.filter(cr).map(function(e){return e.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Cn,Cn];case"to top":case"bottom":return TA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Cn,Ph];case"to right":case"left":return TA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ph,Ph];case"to bottom":case"top":return TA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ph,Cn];case"to left":case"right":return TA(270)}return 0},TA=function(i){return Math.PI*i/180},Oh={name:"color",parse:function(i,t){if(t.type===18){var e=WK[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return e(i,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),n=t.value.substring(1,2),s=t.value.substring(2,3);return Dh(parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),n=t.value.substring(1,2),s=t.value.substring(2,3),A=t.value.substring(3,4);return Dh(parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16),parseInt(A+A,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),n=t.value.substring(2,4),s=t.value.substring(4,6);return Dh(parseInt(r,16),parseInt(n,16),parseInt(s,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),n=t.value.substring(2,4),s=t.value.substring(4,6),A=t.value.substring(6,8);return Dh(parseInt(r,16),parseInt(n,16),parseInt(s,16),parseInt(A,16)/255)}}if(t.type===20){var a=pl[t.value.toUpperCase()];if(typeof a<"u")return a}return pl.TRANSPARENT}},Rh=function(i){return(255&i)===0},Ji=function(i){var t=255&i,e=255&i>>8,r=255&i>>16,n=255&i>>24;return t<255?"rgba("+n+","+r+","+e+","+t/255+")":"rgb("+n+","+r+","+e+")"},Dh=function(i,t,e,r){return(i<<24|t<<16|e<<8|Math.round(r*255)<<0)>>>0},aI=function(i,t){if(i.type===17)return i.number;if(i.type===16){var e=t===3?1:255;return t===3?i.number/100*e:Math.round(i.number/100*e)}return 0},oI=function(i,t){var e=t.filter(xp);if(e.length===3){var r=e.map(aI),n=r[0],s=r[1],A=r[2];return Dh(n,s,A,1)}if(e.length===4){var a=e.map(aI),n=a[0],s=a[1],A=a[2],o=a[3];return Dh(n,s,A,o)}return 0};function o5(i,t,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(t-i)*e*6+i:e<1/2?t:e<2/3?(t-i)*6*(2/3-e)+i:i}var lI=function(i,t){var e=t.filter(xp),r=e[0],n=e[1],s=e[2],A=e[3],a=(r.type===17?TA(r.number):rb.parse(i,r))/(Math.PI*2),o=Oi(n)?n.number/100:0,l=Oi(s)?s.number/100:0,h=typeof A<"u"&&Oi(A)?Fr(A,1):1;if(o===0)return Dh(l*255,l*255,l*255,1);var u=l<=.5?l*(o+1):l+o-l*o,f=l*2-u,d=o5(f,u,a+1/3),g=o5(f,u,a),m=o5(f,u,a-1/3);return Dh(d*255,g*255,m*255,h)},WK={hsl:lI,hsla:lI,rgb:oI,rgba:oI},E0=function(i,t){return Oh.parse(i,AD.create(t).parseComponentValue())},pl={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},jK={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(i,t){return t.map(function(e){if(cr(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},KK={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ib=function(i,t){var e=Oh.parse(i,t[0]),r=t[1];return r&&Oi(r)?{color:e,stop:r}:{color:e,stop:null}},hI=function(i,t){var e=i[0],r=i[i.length-1];e.stop===null&&(e.stop=Cn),r.stop===null&&(r.stop=Ph);for(var n=[],s=0,A=0;A<i.length;A++){var a=i[A].stop;if(a!==null){var o=Fr(a,t);o>s?n.push(o):n.push(s),s=o}else n.push(null)}for(var l=null,A=0;A<n.length;A++){var h=n[A];if(h===null)l===null&&(l=A);else if(l!==null){for(var u=A-l,f=n[l-1],d=(h-f)/(u+1),g=1;g<=u;g++)n[l+g-1]=d*g;l=null}}return i.map(function(m,y){var w=m.color;return{color:w,stop:Math.max(Math.min(1,n[y]/t),0)}})},GK=function(i,t,e){var r=t/2,n=e/2,s=Fr(i[0],t)-r,A=n-Fr(i[1],e);return(Math.atan2(A,s)+Math.PI*2)%(Math.PI*2)},zK=function(i,t,e){var r=typeof i=="number"?i:GK(i,t,e),n=Math.abs(t*Math.sin(r))+Math.abs(e*Math.cos(r)),s=t/2,A=e/2,a=n/2,o=Math.sin(r-Math.PI/2)*a,l=Math.cos(r-Math.PI/2)*a;return[n,s-l,s+l,A-o,A+o]},sa=function(i,t){return Math.sqrt(i*i+t*t)},cI=function(i,t,e,r,n){var s=[[0,0],[0,t],[i,0],[i,t]];return s.reduce(function(A,a){var o=a[0],l=a[1],h=sa(e-o,r-l);return(n?h<A.optimumDistance:h>A.optimumDistance)?{optimumCorner:a,optimumDistance:h}:A},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},qK=function(i,t,e,r,n){var s=0,A=0;switch(i.size){case 0:i.shape===0?s=A=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-n)):i.shape===1&&(s=Math.min(Math.abs(t),Math.abs(t-r)),A=Math.min(Math.abs(e),Math.abs(e-n)));break;case 2:if(i.shape===0)s=A=Math.min(sa(t,e),sa(t,e-n),sa(t-r,e),sa(t-r,e-n));else if(i.shape===1){var a=Math.min(Math.abs(e),Math.abs(e-n))/Math.min(Math.abs(t),Math.abs(t-r)),o=cI(r,n,t,e,!0),l=o[0],h=o[1];s=sa(l-t,(h-e)/a),A=a*s}break;case 1:i.shape===0?s=A=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-n)):i.shape===1&&(s=Math.max(Math.abs(t),Math.abs(t-r)),A=Math.max(Math.abs(e),Math.abs(e-n)));break;case 3:if(i.shape===0)s=A=Math.max(sa(t,e),sa(t,e-n),sa(t-r,e),sa(t-r,e-n));else if(i.shape===1){var a=Math.max(Math.abs(e),Math.abs(e-n))/Math.max(Math.abs(t),Math.abs(t-r)),u=cI(r,n,t,e,!1),l=u[0],h=u[1];s=sa(l-t,(h-e)/a),A=a*s}break}return Array.isArray(i.size)&&(s=Fr(i.size[0],r),A=i.size.length===2?Fr(i.size[1],n):s),[s,A]},XK=function(i,t){var e=TA(180),r=[];return ao(t).forEach(function(n,s){if(s===0){var A=n[0];if(A.type===20&&A.value==="to"){e=fD(n);return}else if(dD(A)){e=rb.parse(i,A);return}}var a=ib(i,n);r.push(a)}),{angle:e,stops:r,type:1}},xw=function(i,t){var e=TA(180),r=[];return ao(t).forEach(function(n,s){if(s===0){var A=n[0];if(A.type===20&&["top","left","right","bottom"].indexOf(A.value)!==-1){e=fD(n);return}else if(dD(A)){e=(rb.parse(i,A)+TA(270))%TA(360);return}}var a=ib(i,n);r.push(a)}),{angle:e,stops:r,type:1}},YK=function(i,t){var e=TA(180),r=[],n=1,s=0,A=3,a=[];return ao(t).forEach(function(o,l){var h=o[0];if(l===0){if(cr(h)&&h.value==="linear"){n=1;return}else if(cr(h)&&h.value==="radial"){n=2;return}}if(h.type===18){if(h.name==="from"){var u=Oh.parse(i,h.values[0]);r.push({stop:Cn,color:u})}else if(h.name==="to"){var u=Oh.parse(i,h.values[0]);r.push({stop:Ph,color:u})}else if(h.name==="color-stop"){var f=h.values.filter(xp);if(f.length===2){var u=Oh.parse(i,f[1]),d=f[0];Ep(d)&&r.push({stop:{type:16,number:d.number*100,flags:d.flags},color:u})}}}}),n===1?{angle:(e+TA(180))%TA(360),stops:r,type:n}:{size:A,shape:s,stops:r,position:a,type:n}},pD="closest-side",gD="farthest-side",mD="closest-corner",wD="farthest-corner",vD="circle",yD="ellipse",bD="cover",BD="contain",$K=function(i,t){var e=0,r=3,n=[],s=[];return ao(t).forEach(function(A,a){var o=!0;if(a===0){var l=!1;o=A.reduce(function(u,f){if(l)if(cr(f))switch(f.value){case"center":return s.push(JS),u;case"top":case"left":return s.push(Cn),u;case"right":case"bottom":return s.push(Ph),u}else(Oi(f)||jh(f))&&s.push(f);else if(cr(f))switch(f.value){case vD:return e=0,!1;case yD:return e=1,!1;case"at":return l=!0,!1;case pD:return r=0,!1;case bD:case gD:return r=1,!1;case BD:case mD:return r=2,!1;case wD:return r=3,!1}else if(jh(f)||Oi(f))return Array.isArray(r)||(r=[]),r.push(f),!1;return u},o)}if(o){var h=ib(i,A);n.push(h)}}),{size:r,shape:e,stops:n,position:s,type:2}},Fw=function(i,t){var e=0,r=3,n=[],s=[];return ao(t).forEach(function(A,a){var o=!0;if(a===0?o=A.reduce(function(h,u){if(cr(u))switch(u.value){case"center":return s.push(JS),!1;case"top":case"left":return s.push(Cn),!1;case"right":case"bottom":return s.push(Ph),!1}else if(Oi(u)||jh(u))return s.push(u),!1;return h},o):a===1&&(o=A.reduce(function(h,u){if(cr(u))switch(u.value){case vD:return e=0,!1;case yD:return e=1,!1;case BD:case pD:return r=0,!1;case gD:return r=1,!1;case mD:return r=2,!1;case bD:case wD:return r=3,!1}else if(jh(u)||Oi(u))return Array.isArray(r)||(r=[]),r.push(u),!1;return h},o)),o){var l=ib(i,A);n.push(l)}}),{size:r,shape:e,stops:n,position:s,type:2}},ZK=function(i){return i.type===1},JK=function(i){return i.type===2},tE={name:"image",parse:function(i,t){if(t.type===22){var e={url:t.value,type:0};return i.cache.addImage(t.value),e}if(t.type===18){var r=CD[t.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(i,t.values)}throw new Error("Unsupported image type "+t.type)}};function tG(i){return!(i.type===20&&i.value==="none")&&(i.type!==18||!!CD[i.name])}var CD={"linear-gradient":XK,"-moz-linear-gradient":xw,"-ms-linear-gradient":xw,"-o-linear-gradient":xw,"-webkit-linear-gradient":xw,"radial-gradient":$K,"-moz-radial-gradient":Fw,"-ms-radial-gradient":Fw,"-o-radial-gradient":Fw,"-webkit-radial-gradient":Fw,"-webkit-gradient":YK},eG={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(i,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t.filter(function(r){return xp(r)&&tG(r)}).map(function(r){return tE.parse(i,r)})}},rG={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(i,t){return t.map(function(e){if(cr(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},iG={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(i,t){return ao(t).map(function(e){return e.filter(Oi)}).map(oD)}},nG={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(i,t){return ao(t).map(function(e){return e.filter(cr).map(function(r){return r.value}).join(" ")}).map(sG)}},sG=function(i){switch(i){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},yp;(function(i){i.AUTO="auto",i.CONTAIN="contain",i.COVER="cover"})(yp||(yp={}));var AG={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(i,t){return ao(t).map(function(e){return e.filter(aG)})}},aG=function(i){return cr(i)||Oi(i)},nb=function(i){return{name:"border-"+i+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},oG=nb("top"),lG=nb("right"),hG=nb("bottom"),cG=nb("left"),sb=function(i){return{name:"border-radius-"+i,initialValue:"0 0",prefix:!1,type:1,parse:function(t,e){return oD(e.filter(Oi))}}},uG=sb("top-left"),dG=sb("top-right"),fG=sb("bottom-right"),pG=sb("bottom-left"),Ab=function(i){return{name:"border-"+i+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},gG=Ab("top"),mG=Ab("right"),wG=Ab("bottom"),vG=Ab("left"),ab=function(i){return{name:"border-"+i+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return t1(e)?e.number:0}}},yG=ab("top"),bG=ab("right"),BG=ab("bottom"),CG=ab("left"),xG={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},FG={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(i,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},SG={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(i,t){return t.filter(cr).reduce(function(e,r){return e|EG(r.value)},0)}},EG=function(i){switch(i){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},kG={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(i,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},UG={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(i,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},by;(function(i){i.NORMAL="normal",i.STRICT="strict"})(by||(by={}));var IG={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(i,t){switch(t){case"strict":return by.STRICT;case"normal":default:return by.NORMAL}}},QG={name:"line-height",initialValue:"normal",prefix:!1,type:4},uI=function(i,t){return cr(i)&&i.value==="normal"?1.2*t:i.type===17?t*i.number:Oi(i)?Fr(i,t):t},LG={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(i,t){return t.type===20&&t.value==="none"?null:tE.parse(i,t)}},_G={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(i,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},rS={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(i,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},ob=function(i){return{name:"margin-"+i,initialValue:"0",prefix:!1,type:4}},MG=ob("top"),TG=ob("right"),NG=ob("bottom"),PG=ob("left"),DG={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(i,t){return t.filter(cr).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},OG={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(i,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},lb=function(i){return{name:"padding-"+i,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},RG=lb("top"),HG=lb("right"),VG=lb("bottom"),WG=lb("left"),jG={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(i,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},KG={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(i,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},GG={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(i,t){return t.length===1&&eS(t[0],"none")?[]:ao(t).map(function(e){for(var r={color:pl.TRANSPARENT,offsetX:Cn,offsetY:Cn,blur:Cn},n=0,s=0;s<e.length;s++){var A=e[s];jh(A)?(n===0?r.offsetX=A:n===1?r.offsetY=A:r.blur=A,n++):r.color=Oh.parse(i,A)}return r})}},zG={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(i,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},qG={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(i,t){if(t.type===20&&t.value==="none")return null;if(t.type===18){var e=$G[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return e(t.values)}return null}},XG=function(i){var t=i.filter(function(e){return e.type===17}).map(function(e){return e.number});return t.length===6?t:null},YG=function(i){var t=i.filter(function(o){return o.type===17}).map(function(o){return o.number}),e=t[0],r=t[1];t[2],t[3];var n=t[4],s=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var A=t[12],a=t[13];return t[14],t[15],t.length===16?[e,r,n,s,A,a]:null},$G={matrix:XG,matrix3d:YG},dI={type:16,number:50,flags:J0},ZG=[dI,dI],JG={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(i,t){var e=t.filter(Oi);return e.length!==2?ZG:[e[0],e[1]]}},tz={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(i,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},k0;(function(i){i.NORMAL="normal",i.BREAK_ALL="break-all",i.KEEP_ALL="keep-all"})(k0||(k0={}));var ez={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(i,t){switch(t){case"break-all":return k0.BREAK_ALL;case"keep-all":return k0.KEEP_ALL;case"normal":default:return k0.NORMAL}}},rz={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(i,t){if(t.type===20)return{auto:!0,order:0};if(Ep(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},xD={name:"time",parse:function(i,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},iz={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(i,t){return Ep(t)?t.number:1}},nz={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},sz={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(i,t){return t.filter(cr).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return e!==0})}},Az={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(i,t){var e=[],r=[];return t.forEach(function(n){switch(n.type){case 20:case 0:e.push(n.value);break;case 17:e.push(n.number.toString());break;case 4:r.push(e.join(" ")),e.length=0;break}}),e.length&&r.push(e.join(" ")),r.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},az={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},oz={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(i,t){if(Ep(t))return t.number;if(cr(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},lz={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(i,t){return t.filter(cr).map(function(e){return e.value})}},hz={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(i,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Yi=function(i,t){return(i&t)!==0},cz={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(i,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t}},uz={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(i,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;for(var r=[],n=t.filter(aD),s=0;s<n.length;s++){var A=n[s],a=n[s+1];if(A.type===20){var o=a&&Ep(a)?a.number:1;r.push({counter:A.value,increment:o})}}return r}},dz={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(i,t){if(t.length===0)return[];for(var e=[],r=t.filter(aD),n=0;n<r.length;n++){var s=r[n],A=r[n+1];if(cr(s)&&s.value!=="none"){var a=A&&Ep(A)?A.number:0;e.push({counter:s.value,reset:a})}}return e}},fz={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(i,t){return t.filter(t1).map(function(e){return xD.parse(i,e)})}},pz={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(i,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;var r=[],n=t.filter(HK);if(n.length%2!==0)return null;for(var s=0;s<n.length;s+=2){var A=n[s].value,a=n[s+1].value;r.push({open:A,close:a})}return r}},fI=function(i,t,e){if(!i)return"";var r=i[Math.min(t,i.length-1)];return r?e?r.open:r.close:""},gz={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(i,t){return t.length===1&&eS(t[0],"none")?[]:ao(t).map(function(e){for(var r={color:255,offsetX:Cn,offsetY:Cn,blur:Cn,spread:Cn,inset:!1},n=0,s=0;s<e.length;s++){var A=e[s];eS(A,"inset")?r.inset=!0:jh(A)?(n===0?r.offsetX=A:n===1?r.offsetY=A:n===2?r.blur=A:r.spread=A,n++):r.color=Oh.parse(i,A)}return r})}},mz={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(i,t){var e=[0,1,2],r=[];return t.filter(cr).forEach(function(n){switch(n.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),e.forEach(function(n){r.indexOf(n)===-1&&r.push(n)}),r}},wz={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},vz={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(i,t){return t1(t)?t.number:0}},yz=(function(){function i(t,e){var r,n;this.animationDuration=$t(t,fz,e.animationDuration),this.backgroundClip=$t(t,jK,e.backgroundClip),this.backgroundColor=$t(t,KK,e.backgroundColor),this.backgroundImage=$t(t,eG,e.backgroundImage),this.backgroundOrigin=$t(t,rG,e.backgroundOrigin),this.backgroundPosition=$t(t,iG,e.backgroundPosition),this.backgroundRepeat=$t(t,nG,e.backgroundRepeat),this.backgroundSize=$t(t,AG,e.backgroundSize),this.borderTopColor=$t(t,oG,e.borderTopColor),this.borderRightColor=$t(t,lG,e.borderRightColor),this.borderBottomColor=$t(t,hG,e.borderBottomColor),this.borderLeftColor=$t(t,cG,e.borderLeftColor),this.borderTopLeftRadius=$t(t,uG,e.borderTopLeftRadius),this.borderTopRightRadius=$t(t,dG,e.borderTopRightRadius),this.borderBottomRightRadius=$t(t,fG,e.borderBottomRightRadius),this.borderBottomLeftRadius=$t(t,pG,e.borderBottomLeftRadius),this.borderTopStyle=$t(t,gG,e.borderTopStyle),this.borderRightStyle=$t(t,mG,e.borderRightStyle),this.borderBottomStyle=$t(t,wG,e.borderBottomStyle),this.borderLeftStyle=$t(t,vG,e.borderLeftStyle),this.borderTopWidth=$t(t,yG,e.borderTopWidth),this.borderRightWidth=$t(t,bG,e.borderRightWidth),this.borderBottomWidth=$t(t,BG,e.borderBottomWidth),this.borderLeftWidth=$t(t,CG,e.borderLeftWidth),this.boxShadow=$t(t,gz,e.boxShadow),this.color=$t(t,xG,e.color),this.direction=$t(t,FG,e.direction),this.display=$t(t,SG,e.display),this.float=$t(t,kG,e.cssFloat),this.fontFamily=$t(t,Az,e.fontFamily),this.fontSize=$t(t,az,e.fontSize),this.fontStyle=$t(t,hz,e.fontStyle),this.fontVariant=$t(t,lz,e.fontVariant),this.fontWeight=$t(t,oz,e.fontWeight),this.letterSpacing=$t(t,UG,e.letterSpacing),this.lineBreak=$t(t,IG,e.lineBreak),this.lineHeight=$t(t,QG,e.lineHeight),this.listStyleImage=$t(t,LG,e.listStyleImage),this.listStylePosition=$t(t,_G,e.listStylePosition),this.listStyleType=$t(t,rS,e.listStyleType),this.marginTop=$t(t,MG,e.marginTop),this.marginRight=$t(t,TG,e.marginRight),this.marginBottom=$t(t,NG,e.marginBottom),this.marginLeft=$t(t,PG,e.marginLeft),this.opacity=$t(t,iz,e.opacity);var s=$t(t,DG,e.overflow);this.overflowX=s[0],this.overflowY=s[s.length>1?1:0],this.overflowWrap=$t(t,OG,e.overflowWrap),this.paddingTop=$t(t,RG,e.paddingTop),this.paddingRight=$t(t,HG,e.paddingRight),this.paddingBottom=$t(t,VG,e.paddingBottom),this.paddingLeft=$t(t,WG,e.paddingLeft),this.paintOrder=$t(t,mz,e.paintOrder),this.position=$t(t,KG,e.position),this.textAlign=$t(t,jG,e.textAlign),this.textDecorationColor=$t(t,nz,(r=e.textDecorationColor)!==null&&r!==void 0?r:e.color),this.textDecorationLine=$t(t,sz,(n=e.textDecorationLine)!==null&&n!==void 0?n:e.textDecoration),this.textShadow=$t(t,GG,e.textShadow),this.textTransform=$t(t,zG,e.textTransform),this.transform=$t(t,qG,e.transform),this.transformOrigin=$t(t,JG,e.transformOrigin),this.visibility=$t(t,tz,e.visibility),this.webkitTextStrokeColor=$t(t,wz,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=$t(t,vz,e.webkitTextStrokeWidth),this.wordBreak=$t(t,ez,e.wordBreak),this.zIndex=$t(t,rz,e.zIndex)}return i.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},i.prototype.isTransparent=function(){return Rh(this.backgroundColor)},i.prototype.isTransformed=function(){return this.transform!==null},i.prototype.isPositioned=function(){return this.position!==0},i.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},i.prototype.isFloating=function(){return this.float!==0},i.prototype.isInlineLevel=function(){return Yi(this.display,4)||Yi(this.display,33554432)||Yi(this.display,268435456)||Yi(this.display,536870912)||Yi(this.display,67108864)||Yi(this.display,134217728)},i})(),bz=(function(){function i(t,e){this.content=$t(t,cz,e.content),this.quotes=$t(t,pz,e.quotes)}return i})(),pI=(function(){function i(t,e){this.counterIncrement=$t(t,uz,e.counterIncrement),this.counterReset=$t(t,dz,e.counterReset)}return i})(),$t=function(i,t,e){var r=new sD,n=e!==null&&typeof e<"u"?e.toString():t.initialValue;r.write(n);var s=new AD(r.read());switch(t.type){case 2:var A=s.parseComponentValue();return t.parse(i,cr(A)?A.value:t.initialValue);case 0:return t.parse(i,s.parseComponentValue());case 1:return t.parse(i,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(t.format){case"angle":return rb.parse(i,s.parseComponentValue());case"color":return Oh.parse(i,s.parseComponentValue());case"image":return tE.parse(i,s.parseComponentValue());case"length":var a=s.parseComponentValue();return jh(a)?a:Cn;case"length-percentage":var o=s.parseComponentValue();return Oi(o)?o:Cn;case"time":return xD.parse(i,s.parseComponentValue())}break}},Bz="data-html2canvas-debug",Cz=function(i){var t=i.getAttribute(Bz);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},iS=function(i,t){var e=Cz(i);return e===1||t===e},oo=(function(){function i(t,e){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,iS(e,3))debugger;this.styles=new yz(t,window.getComputedStyle(e,null)),AS(e)&&(this.styles.animationDuration.some(function(r){return r>0})&&(e.style.animationDuration="0s"),this.styles.transform!==null&&(e.style.transform="none")),this.bounds=tb(this.context,e),iS(e,4)&&(this.flags|=16)}return i})(),xz="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",gI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Sw=0;Sw<gI.length;Sw++)Rm[gI.charCodeAt(Sw)]=Sw;var Fz=function(i){var t=i.length*.75,e=i.length,r,n=0,s,A,a,o;i[i.length-1]==="="&&(t--,i[i.length-2]==="="&&t--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),h=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<e;r+=4)s=Rm[i.charCodeAt(r)],A=Rm[i.charCodeAt(r+1)],a=Rm[i.charCodeAt(r+2)],o=Rm[i.charCodeAt(r+3)],h[n++]=s<<2|A>>4,h[n++]=(A&15)<<4|a>>2,h[n++]=(a&3)<<6|o&63;return l},Sz=function(i){for(var t=i.length,e=[],r=0;r<t;r+=2)e.push(i[r+1]<<8|i[r]);return e},Ez=function(i){for(var t=i.length,e=[],r=0;r<t;r+=4)e.push(i[r+3]<<24|i[r+2]<<16|i[r+1]<<8|i[r]);return e},Qu=5,eE=11,l5=2,kz=eE-Qu,FD=65536>>Qu,Uz=1<<Qu,h5=Uz-1,Iz=1024>>Qu,Qz=FD+Iz,Lz=Qz,_z=32,Mz=Lz+_z,Tz=65536>>eE,Nz=1<<kz,Pz=Nz-1,mI=function(i,t,e){return i.slice?i.slice(t,e):new Uint16Array(Array.prototype.slice.call(i,t,e))},Dz=function(i,t,e){return i.slice?i.slice(t,e):new Uint32Array(Array.prototype.slice.call(i,t,e))},Oz=function(i,t){var e=Fz(i),r=Array.isArray(e)?Ez(e):new Uint32Array(e),n=Array.isArray(e)?Sz(e):new Uint16Array(e),s=24,A=mI(n,s/2,r[4]/2),a=r[5]===2?mI(n,(s+r[4])/2):Dz(r,Math.ceil((s+r[4])/4));return new Rz(r[0],r[1],r[2],r[3],A,a)},Rz=(function(){function i(t,e,r,n,s,A){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=n,this.index=s,this.data=A}return i.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>Qu],e=(e<<l5)+(t&h5),this.data[e];if(t<=65535)return e=this.index[FD+(t-55296>>Qu)],e=(e<<l5)+(t&h5),this.data[e];if(t<this.highStart)return e=Mz-Tz+(t>>eE),e=this.index[e],e+=t>>Qu&Pz,e=this.index[e],e=(e<<l5)+(t&h5),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},i})(),wI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Hz=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ew=0;Ew<wI.length;Ew++)Hz[wI.charCodeAt(Ew)]=Ew;var Vz=1,c5=2,u5=3,vI=4,yI=5,Wz=7,bI=8,d5=9,f5=10,BI=11,CI=12,xI=13,FI=14,p5=15,jz=function(i){for(var t=[],e=0,r=i.length;e<r;){var n=i.charCodeAt(e++);if(n>=55296&&n<=56319&&e<r){var s=i.charCodeAt(e++);(s&64512)===56320?t.push(((n&1023)<<10)+(s&1023)+65536):(t.push(n),e--)}else t.push(n)}return t},Kz=function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,i);var e=i.length;if(!e)return"";for(var r=[],n=-1,s="";++n<e;){var A=i[n];A<=65535?r.push(A):(A-=65536,r.push((A>>10)+55296,A%1024+56320)),(n+1===e||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},Gz=Oz(xz),Eu="×",SI="÷",zz=function(i){return Gz.get(i)},qz=function(i,t,e){var r=e-2,n=t[r],s=t[e-1],A=t[e];if(s===c5&&A===u5)return Eu;if(s===c5||s===u5||s===vI||A===c5||A===u5||A===vI)return SI;if(s===bI&&[bI,d5,BI,CI].indexOf(A)!==-1||(s===BI||s===d5)&&(A===d5||A===f5)||(s===CI||s===f5)&&A===f5||A===xI||A===yI||A===Wz||s===Vz)return Eu;if(s===xI&&A===FI){for(;n===yI;)n=t[--r];if(n===FI)return Eu}if(s===p5&&A===p5){for(var a=0;n===p5;)a++,n=t[--r];if(a%2===0)return Eu}return SI},Xz=function(i){var t=jz(i),e=t.length,r=0,n=0,s=t.map(zz);return{next:function(){if(r>=e)return{done:!0,value:null};for(var A=Eu;r<e&&(A=qz(t,s,++r))===Eu;);if(A!==Eu||r===e){var a=Kz.apply(null,t.slice(n,r));return n=r,{value:a,done:!1}}return{done:!0,value:null}}}},Yz=function(i){for(var t=Xz(i),e=[],r;!(r=t.next()).done;)r.value&&e.push(r.value.slice());return e},$z=function(i){var t=123;if(i.createRange){var e=i.createRange();if(e.getBoundingClientRect){var r=i.createElement("boundtest");r.style.height=t+"px",r.style.display="block",i.body.appendChild(r),e.selectNode(r);var n=e.getBoundingClientRect(),s=Math.round(n.height);if(i.body.removeChild(r),s===t)return!0}}return!1},Zz=function(i){var t=i.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",i.body.appendChild(t);var e=i.createRange();t.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var r=t.firstChild,n=eb(r.data).map(function(o){return yi(o)}),s=0,A={},a=n.every(function(o,l){e.setStart(r,s),e.setEnd(r,s+o.length);var h=e.getBoundingClientRect();s+=o.length;var u=h.x>A.x||h.y>A.y;return A=h,l===0?!0:u});return i.body.removeChild(t),a},Jz=function(){return typeof new Image().crossOrigin<"u"},tq=function(){return typeof new XMLHttpRequest().responseType=="string"},eq=function(i){var t=new Image,e=i.createElement("canvas"),r=e.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),e.toDataURL()}catch{return!1}return!0},EI=function(i){return i[0]===0&&i[1]===255&&i[2]===0&&i[3]===255},rq=function(i){var t=i.createElement("canvas"),e=100;t.width=e,t.height=e;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,e,e);var n=new Image,s=t.toDataURL();n.src=s;var A=nS(e,e,0,0,n);return r.fillStyle="red",r.fillRect(0,0,e,e),kI(A).then(function(a){r.drawImage(a,0,0);var o=r.getImageData(0,0,e,e).data;r.fillStyle="red",r.fillRect(0,0,e,e);var l=i.createElement("div");return l.style.backgroundImage="url("+s+")",l.style.height=e+"px",EI(o)?kI(nS(e,e,0,0,l)):Promise.reject(!1)}).then(function(a){return r.drawImage(a,0,0),EI(r.getImageData(0,0,e,e).data)}).catch(function(){return!1})},nS=function(i,t,e,r,n){var s="http://www.w3.org/2000/svg",A=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return A.setAttributeNS(null,"width",i.toString()),A.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",e.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),A.appendChild(a),a.appendChild(n),A},kI=function(i){return new Promise(function(t,e){var r=new Image;r.onload=function(){return t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(i))})},yn={get SUPPORT_RANGE_BOUNDS(){var i=$z(document);return Object.defineProperty(yn,"SUPPORT_RANGE_BOUNDS",{value:i}),i},get SUPPORT_WORD_BREAKING(){var i=yn.SUPPORT_RANGE_BOUNDS&&Zz(document);return Object.defineProperty(yn,"SUPPORT_WORD_BREAKING",{value:i}),i},get SUPPORT_SVG_DRAWING(){var i=eq(document);return Object.defineProperty(yn,"SUPPORT_SVG_DRAWING",{value:i}),i},get SUPPORT_FOREIGNOBJECT_DRAWING(){var i=typeof Array.from=="function"&&typeof window.fetch=="function"?rq(document):Promise.resolve(!1);return Object.defineProperty(yn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:i}),i},get SUPPORT_CORS_IMAGES(){var i=Jz();return Object.defineProperty(yn,"SUPPORT_CORS_IMAGES",{value:i}),i},get SUPPORT_RESPONSE_TYPE(){var i=tq();return Object.defineProperty(yn,"SUPPORT_RESPONSE_TYPE",{value:i}),i},get SUPPORT_CORS_XHR(){var i="withCredentials"in new XMLHttpRequest;return Object.defineProperty(yn,"SUPPORT_CORS_XHR",{value:i}),i},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var i=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(yn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:i}),i}},U0=(function(){function i(t,e){this.text=t,this.bounds=e}return i})(),iq=function(i,t,e,r){var n=Aq(t,e),s=[],A=0;return n.forEach(function(a){if(e.textDecorationLine.length||a.trim().length>0)if(yn.SUPPORT_RANGE_BOUNDS){var o=UI(r,A,a.length).getClientRects();if(o.length>1){var l=rE(a),h=0;l.forEach(function(f){s.push(new U0(f,wl.fromDOMRectList(i,UI(r,h+A,f.length).getClientRects()))),h+=f.length})}else s.push(new U0(a,wl.fromDOMRectList(i,o)))}else{var u=r.splitText(a.length);s.push(new U0(a,nq(i,r))),r=u}else yn.SUPPORT_RANGE_BOUNDS||(r=r.splitText(a.length));A+=a.length}),s},nq=function(i,t){var e=t.ownerDocument;if(e){var r=e.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var n=t.parentNode;if(n){n.replaceChild(r,t);var s=tb(i,r);return r.firstChild&&n.replaceChild(r.firstChild,r),s}}return wl.EMPTY},UI=function(i,t,e){var r=i.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(i,t),n.setEnd(i,t+e),n},rE=function(i){if(yn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(i)).map(function(e){return e.segment})}return Yz(i)},sq=function(i,t){if(yn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(e.segment(i)).map(function(r){return r.segment})}return oq(i,t)},Aq=function(i,t){return t.letterSpacing!==0?rE(i):sq(i,t)},aq=[32,160,4961,65792,65793,4153,4241],oq=function(i,t){for(var e=Tj(i,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),r=[],n,s=function(){if(n.value){var A=n.value.slice(),a=eb(A),o="";a.forEach(function(l){aq.indexOf(l)===-1?o+=yi(l):(o.length&&r.push(o),r.push(yi(l)),o="")}),o.length&&r.push(o)}};!(n=e.next()).done;)s();return r},lq=(function(){function i(t,e,r){this.text=hq(e.data,r.textTransform),this.textBounds=iq(t,this.text,r,e)}return i})(),hq=function(i,t){switch(t){case 1:return i.toLowerCase();case 3:return i.replace(cq,uq);case 2:return i.toUpperCase();default:return i}},cq=/(^|\s|:|-|\(|\))([a-z])/g,uq=function(i,t,e){return i.length>0?t+e.toUpperCase():i},SD=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.src=r.currentSrc||r.src,n.intrinsicWidth=r.naturalWidth,n.intrinsicHeight=r.naturalHeight,n.context.cache.addImage(n.src),n}return t})(oo),ED=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.canvas=r,n.intrinsicWidth=r.width,n.intrinsicHeight=r.height,n}return t})(oo),kD=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this,s=new XMLSerializer,A=tb(e,r);return r.setAttribute("width",A.width+"px"),r.setAttribute("height",A.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(r)),n.intrinsicWidth=r.width.baseVal.value,n.intrinsicHeight=r.height.baseVal.value,n.context.cache.addImage(n.svg),n}return t})(oo),UD=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.value=r.value,n}return t})(oo),sS=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.start=r.start,n.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,n}return t})(oo),dq=[{type:15,flags:0,unit:"px",number:3}],fq=[{type:16,flags:0,number:50}],pq=function(i){return i.width>i.height?new wl(i.left+(i.width-i.height)/2,i.top,i.height,i.height):i.width<i.height?new wl(i.left,i.top+(i.height-i.width)/2,i.width,i.width):i},gq=function(i){var t=i.type===mq?new Array(i.value.length+1).join("•"):i.value;return t.length===0?i.placeholder||"":t},By="checkbox",Cy="radio",mq="password",II=707406591,iE=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;switch(n.type=r.type.toLowerCase(),n.checked=r.checked,n.value=gq(r),(n.type===By||n.type===Cy)&&(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=pq(n.bounds)),n.type){case By:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=dq;break;case Cy:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=fq;break}return n}return t})(oo),ID=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this,s=r.options[r.selectedIndex||0];return n.value=s&&s.text||"",n}return t})(oo),QD=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.value=r.value,n}return t})(oo),LD=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;n.src=r.src,n.width=parseInt(r.width,10)||0,n.height=parseInt(r.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){n.tree=MD(e,r.contentWindow.document.documentElement);var s=r.contentWindow.document.documentElement?E0(e,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):pl.TRANSPARENT,A=r.contentWindow.document.body?E0(e,getComputedStyle(r.contentWindow.document.body).backgroundColor):pl.TRANSPARENT;n.backgroundColor=Rh(s)?Rh(A)?n.styles.backgroundColor:A:s}}catch{}return n}return t})(oo),wq=["OL","UL","MENU"],mv=function(i,t,e,r){for(var n=t.firstChild,s=void 0;n;n=s)if(s=n.nextSibling,TD(n)&&n.data.trim().length>0)e.textNodes.push(new lq(i,n,e.styles));else if(Jf(n))if(OD(n)&&n.assignedNodes)n.assignedNodes().forEach(function(a){return mv(i,a,e,r)});else{var A=_D(i,n);A.styles.isVisible()&&(vq(n,A,r)?A.flags|=4:yq(A.styles)&&(A.flags|=2),wq.indexOf(n.tagName)!==-1&&(A.flags|=8),e.elements.push(A),n.slot,n.shadowRoot?mv(i,n.shadowRoot,A,r):!xy(n)&&!ND(n)&&!Fy(n)&&mv(i,n,A,r))}},_D=function(i,t){return aS(t)?new SD(i,t):PD(t)?new ED(i,t):ND(t)?new kD(i,t):bq(t)?new UD(i,t):Bq(t)?new sS(i,t):Cq(t)?new iE(i,t):Fy(t)?new ID(i,t):xy(t)?new QD(i,t):DD(t)?new LD(i,t):new oo(i,t)},MD=function(i,t){var e=_D(i,t);return e.flags|=4,mv(i,t,e,e),e},vq=function(i,t,e){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||nE(i)&&e.styles.isTransparent()},yq=function(i){return i.isPositioned()||i.isFloating()},TD=function(i){return i.nodeType===Node.TEXT_NODE},Jf=function(i){return i.nodeType===Node.ELEMENT_NODE},AS=function(i){return Jf(i)&&typeof i.style<"u"&&!wv(i)},wv=function(i){return typeof i.className=="object"},bq=function(i){return i.tagName==="LI"},Bq=function(i){return i.tagName==="OL"},Cq=function(i){return i.tagName==="INPUT"},xq=function(i){return i.tagName==="HTML"},ND=function(i){return i.tagName==="svg"},nE=function(i){return i.tagName==="BODY"},PD=function(i){return i.tagName==="CANVAS"},QI=function(i){return i.tagName==="VIDEO"},aS=function(i){return i.tagName==="IMG"},DD=function(i){return i.tagName==="IFRAME"},LI=function(i){return i.tagName==="STYLE"},Fq=function(i){return i.tagName==="SCRIPT"},xy=function(i){return i.tagName==="TEXTAREA"},Fy=function(i){return i.tagName==="SELECT"},OD=function(i){return i.tagName==="SLOT"},_I=function(i){return i.tagName.indexOf("-")>0},Sq=(function(){function i(){this.counters={}}return i.prototype.getCounterValue=function(t){var e=this.counters[t];return e&&e.length?e[e.length-1]:1},i.prototype.getCounterValues=function(t){var e=this.counters[t];return e||[]},i.prototype.pop=function(t){var e=this;t.forEach(function(r){return e.counters[r].pop()})},i.prototype.parse=function(t){var e=this,r=t.counterIncrement,n=t.counterReset,s=!0;r!==null&&r.forEach(function(a){var o=e.counters[a.counter];o&&a.increment!==0&&(s=!1,o.length||o.push(1),o[Math.max(0,o.length-1)]+=a.increment)});var A=[];return s&&n.forEach(function(a){var o=e.counters[a.counter];A.push(a.counter),o||(o=e.counters[a.counter]=[]),o.push(a.reset)}),A},i})(),MI={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},TI={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Eq={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},kq={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Bd=function(i,t,e,r,n,s){return i<t||i>e?H0(i,n,s.length>0):r.integers.reduce(function(A,a,o){for(;i>=a;)i-=a,A+=r.values[o];return A},"")+s},RD=function(i,t,e,r){var n="";do e||i--,n=r(i)+n,i/=t;while(i*t>=t);return n},ui=function(i,t,e,r,n){var s=e-t+1;return(i<0?"-":"")+(RD(Math.abs(i),s,r,function(A){return yi(Math.floor(A%s)+t)})+n)},cc=function(i,t,e){e===void 0&&(e=". ");var r=t.length;return RD(Math.abs(i),r,!1,function(n){return t[Math.floor(n%r)]})+e},Uf=1,ah=2,oh=4,Hm=8,Uo=function(i,t,e,r,n,s){if(i<-9999||i>9999)return H0(i,4,n.length>0);var A=Math.abs(i),a=n;if(A===0)return t[0]+a;for(var o=0;A>0&&o<=4;o++){var l=A%10;l===0&&Yi(s,Uf)&&a!==""?a=t[l]+a:l>1||l===1&&o===0||l===1&&o===1&&Yi(s,ah)||l===1&&o===1&&Yi(s,oh)&&i>100||l===1&&o>1&&Yi(s,Hm)?a=t[l]+(o>0?e[o-1]:"")+a:l===1&&o>0&&(a=e[o-1]+a),A=Math.floor(A/10)}return(i<0?r:"")+a},NI="十百千萬",PI="拾佰仟萬",DI="マイナス",g5="마이너스",H0=function(i,t,e){var r=e?". ":"",n=e?"、":"",s=e?", ":"",A=e?" ":"";switch(t){case 0:return"•"+A;case 1:return"◦"+A;case 2:return"◾"+A;case 5:var a=ui(i,48,57,!0,r);return a.length<4?"0"+a:a;case 4:return cc(i,"〇一二三四五六七八九",n);case 6:return Bd(i,1,3999,MI,3,r).toLowerCase();case 7:return Bd(i,1,3999,MI,3,r);case 8:return ui(i,945,969,!1,r);case 9:return ui(i,97,122,!1,r);case 10:return ui(i,65,90,!1,r);case 11:return ui(i,1632,1641,!0,r);case 12:case 49:return Bd(i,1,9999,TI,3,r);case 35:return Bd(i,1,9999,TI,3,r).toLowerCase();case 13:return ui(i,2534,2543,!0,r);case 14:case 30:return ui(i,6112,6121,!0,r);case 15:return cc(i,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return cc(i,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return Uo(i,"零一二三四五六七八九",NI,"負",n,ah|oh|Hm);case 47:return Uo(i,"零壹貳參肆伍陸柒捌玖",PI,"負",n,Uf|ah|oh|Hm);case 42:return Uo(i,"零一二三四五六七八九",NI,"负",n,ah|oh|Hm);case 41:return Uo(i,"零壹贰叁肆伍陆柒捌玖",PI,"负",n,Uf|ah|oh|Hm);case 26:return Uo(i,"〇一二三四五六七八九","十百千万",DI,n,0);case 25:return Uo(i,"零壱弐参四伍六七八九","拾百千万",DI,n,Uf|ah|oh);case 31:return Uo(i,"영일이삼사오육칠팔구","십백천만",g5,s,Uf|ah|oh);case 33:return Uo(i,"零一二三四五六七八九","十百千萬",g5,s,0);case 32:return Uo(i,"零壹貳參四五六七八九","拾百千",g5,s,Uf|ah|oh);case 18:return ui(i,2406,2415,!0,r);case 20:return Bd(i,1,19999,kq,3,r);case 21:return ui(i,2790,2799,!0,r);case 22:return ui(i,2662,2671,!0,r);case 22:return Bd(i,1,10999,Eq,3,r);case 23:return cc(i,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return cc(i,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return ui(i,3302,3311,!0,r);case 28:return cc(i,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return cc(i,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return ui(i,3792,3801,!0,r);case 37:return ui(i,6160,6169,!0,r);case 38:return ui(i,4160,4169,!0,r);case 39:return ui(i,2918,2927,!0,r);case 40:return ui(i,1776,1785,!0,r);case 43:return ui(i,3046,3055,!0,r);case 44:return ui(i,3174,3183,!0,r);case 45:return ui(i,3664,3673,!0,r);case 46:return ui(i,3872,3881,!0,r);case 3:default:return ui(i,48,57,!0,r)}},HD="data-html2canvas-ignore",OI=(function(){function i(t,e,r){if(this.context=t,this.options=r,this.scrolledElements=[],this.referenceElement=e,this.counters=new Sq,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return i.prototype.toIFrame=function(t,e){var r=this,n=Uq(t,e);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var s=t.defaultView.pageXOffset,A=t.defaultView.pageYOffset,a=n.contentWindow,o=a.document,l=Lq(n).then(function(){return as(r,void 0,void 0,function(){var h,u;return Wn(this,function(f){switch(f.label){case 0:return this.scrolledElements.forEach(Nq),a&&(a.scrollTo(e.left,e.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==e.top||a.scrollX!==e.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-e.left,a.scrollY-e.top,0,0))),h=this.options.onclone,u=this.clonedReferenceElement,typeof u>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:f.sent(),f.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Qq(o)]:[3,4];case 3:f.sent(),f.label=4;case 4:return typeof h=="function"?[2,Promise.resolve().then(function(){return h(o,u)}).then(function(){return n})]:[2,n]}})})});return o.open(),o.write(Mq(document.doctype)+"<html></html>"),Tq(this.referenceElement.ownerDocument,s,A),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),l},i.prototype.createElementClone=function(t){if(iS(t,2))debugger;if(PD(t))return this.createCanvasClone(t);if(QI(t))return this.createVideoClone(t);if(LI(t))return this.createStyleClone(t);var e=t.cloneNode(!1);return aS(e)&&(aS(t)&&t.currentSrc&&t.currentSrc!==t.src&&(e.src=t.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),_I(e)?this.createCustomElementClone(e):e},i.prototype.createCustomElementClone=function(t){var e=document.createElement("html2canvascustomelement");return m5(t.style,e),e},i.prototype.createStyleClone=function(t){try{var e=t.sheet;if(e&&e.cssRules){var r=[].slice.call(e.cssRules,0).reduce(function(s,A){return A&&typeof A.cssText=="string"?s+A.cssText:s},""),n=t.cloneNode(!1);return n.textContent=r,n}}catch(s){if(this.context.logger.error("Unable to access cssRules property",s),s.name!=="SecurityError")throw s}return t.cloneNode(!1)},i.prototype.createCanvasClone=function(t){var e;if(this.options.inlineImages&&t.ownerDocument){var r=t.ownerDocument.createElement("img");try{return r.src=t.toDataURL(),r}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var n=t.cloneNode(!1);try{n.width=t.width,n.height=t.height;var s=t.getContext("2d"),A=n.getContext("2d");if(A)if(!this.options.allowTaint&&s)A.putImageData(s.getImageData(0,0,t.width,t.height),0,0);else{var a=(e=t.getContext("webgl2"))!==null&&e!==void 0?e:t.getContext("webgl");if(a){var o=a.getContextAttributes();(o==null?void 0:o.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}A.drawImage(t,0,0)}return n}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return n},i.prototype.createVideoClone=function(t){var e=t.ownerDocument.createElement("canvas");e.width=t.offsetWidth,e.height=t.offsetHeight;var r=e.getContext("2d");try{return r&&(r.drawImage(t,0,0,e.width,e.height),this.options.allowTaint||r.getImageData(0,0,e.width,e.height)),e}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var n=t.ownerDocument.createElement("canvas");return n.width=t.offsetWidth,n.height=t.offsetHeight,n},i.prototype.appendChildNode=function(t,e,r){(!Jf(e)||!Fq(e)&&!e.hasAttribute(HD)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(e)))&&(!this.options.copyStyles||!Jf(e)||!LI(e))&&t.appendChild(this.cloneNode(e,r))},i.prototype.cloneChildNodes=function(t,e,r){for(var n=this,s=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;s;s=s.nextSibling)if(Jf(s)&&OD(s)&&typeof s.assignedNodes=="function"){var A=s.assignedNodes();A.length&&A.forEach(function(a){return n.appendChildNode(e,a,r)})}else this.appendChildNode(e,s,r)},i.prototype.cloneNode=function(t,e){if(TD(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var r=t.ownerDocument.defaultView;if(r&&Jf(t)&&(AS(t)||wv(t))){var n=this.createElementClone(t);n.style.transitionProperty="none";var s=r.getComputedStyle(t),A=r.getComputedStyle(t,":before"),a=r.getComputedStyle(t,":after");this.referenceElement===t&&AS(n)&&(this.clonedReferenceElement=n),nE(n)&&Oq(n);var o=this.counters.parse(new pI(this.context,s)),l=this.resolvePseudoContent(t,n,A,I0.BEFORE);_I(t)&&(e=!0),QI(t)||this.cloneChildNodes(t,n,e),l&&n.insertBefore(l,n.firstChild);var h=this.resolvePseudoContent(t,n,a,I0.AFTER);return h&&n.appendChild(h),this.counters.pop(o),(s&&(this.options.copyStyles||wv(t))&&!DD(t)||e)&&m5(s,n),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([n,t.scrollLeft,t.scrollTop]),(xy(t)||Fy(t))&&(xy(n)||Fy(n))&&(n.value=t.value),n}return t.cloneNode(!1)},i.prototype.resolvePseudoContent=function(t,e,r,n){var s=this;if(r){var A=r.content,a=e.ownerDocument;if(!(!a||!A||A==="none"||A==="-moz-alt-content"||r.display==="none")){this.counters.parse(new pI(this.context,r));var o=new bz(this.context,r),l=a.createElement("html2canvaspseudoelement");m5(r,l),o.content.forEach(function(u){if(u.type===0)l.appendChild(a.createTextNode(u.value));else if(u.type===22){var f=a.createElement("img");f.src=u.value,f.style.opacity="1",l.appendChild(f)}else if(u.type===18){if(u.name==="attr"){var d=u.values.filter(cr);d.length&&l.appendChild(a.createTextNode(t.getAttribute(d[0].value)||""))}else if(u.name==="counter"){var g=u.values.filter(xp),m=g[0],y=g[1];if(m&&cr(m)){var w=s.counters.getCounterValue(m.value),b=y&&cr(y)?rS.parse(s.context,y.value):3;l.appendChild(a.createTextNode(H0(w,b,!1)))}}else if(u.name==="counters"){var C=u.values.filter(xp),m=C[0],S=C[1],y=C[2];if(m&&cr(m)){var k=s.counters.getCounterValues(m.value),I=y&&cr(y)?rS.parse(s.context,y.value):3,N=S&&S.type===0?S.value:"",D=k.map(function(L){return H0(L,I,!1)}).join(N);l.appendChild(a.createTextNode(D))}}}else if(u.type===20)switch(u.value){case"open-quote":l.appendChild(a.createTextNode(fI(o.quotes,s.quoteDepth++,!0)));break;case"close-quote":l.appendChild(a.createTextNode(fI(o.quotes,--s.quoteDepth,!1)));break;default:l.appendChild(a.createTextNode(u.value))}}),l.className=oS+" "+lS;var h=n===I0.BEFORE?" "+oS:" "+lS;return wv(e)?e.className.baseValue+=h:e.className+=h,l}}},i.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},i})(),I0;(function(i){i[i.BEFORE=0]="BEFORE",i[i.AFTER=1]="AFTER"})(I0||(I0={}));var Uq=function(i,t){var e=i.createElement("iframe");return e.className="html2canvas-container",e.style.visibility="hidden",e.style.position="fixed",e.style.left="-10000px",e.style.top="0px",e.style.border="0",e.width=t.width.toString(),e.height=t.height.toString(),e.scrolling="no",e.setAttribute(HD,"true"),i.body.appendChild(e),e},Iq=function(i){return new Promise(function(t){if(i.complete){t();return}if(!i.src){t();return}i.onload=t,i.onerror=t})},Qq=function(i){return Promise.all([].slice.call(i.images,0).map(Iq))},Lq=function(i){return new Promise(function(t,e){var r=i.contentWindow;if(!r)return e("No window assigned for iframe");var n=r.document;r.onload=i.onload=function(){r.onload=i.onload=null;var s=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(s),t(i))},50)}})},_q=["all","d","content"],m5=function(i,t){for(var e=i.length-1;e>=0;e--){var r=i.item(e);_q.indexOf(r)===-1&&t.style.setProperty(r,i.getPropertyValue(r))}return t},Mq=function(i){var t="";return i&&(t+="<!DOCTYPE ",i.name&&(t+=i.name),i.internalSubset&&(t+=i.internalSubset),i.publicId&&(t+='"'+i.publicId+'"'),i.systemId&&(t+='"'+i.systemId+'"'),t+=">"),t},Tq=function(i,t,e){i&&i.defaultView&&(t!==i.defaultView.pageXOffset||e!==i.defaultView.pageYOffset)&&i.defaultView.scrollTo(t,e)},Nq=function(i){var t=i[0],e=i[1],r=i[2];t.scrollLeft=e,t.scrollTop=r},Pq=":before",Dq=":after",oS="___html2canvas___pseudoelement_before",lS="___html2canvas___pseudoelement_after",RI=`{
|
|
290
|
-
content: "" !important;
|
|
291
|
-
display: none !important;
|
|
292
|
-
}`,Oq=function(i){Rq(i,"."+oS+Pq+RI+`
|
|
293
|
-
.`+lS+Dq+RI)},Rq=function(i,t){var e=i.ownerDocument;if(e){var r=e.createElement("style");r.textContent=t,i.appendChild(r)}},VD=(function(){function i(){}return i.getOrigin=function(t){var e=i._link;return e?(e.href=t,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},i.isSameOrigin=function(t){return i.getOrigin(t)===i._origin},i.setContext=function(t){i._link=t.document.createElement("a"),i._origin=i.getOrigin(t.location.href)},i._origin="about:blank",i})(),Hq=(function(){function i(t,e){this.context=t,this._options=e,this._cache={}}return i.prototype.addImage=function(t){var e=Promise.resolve();return this.has(t)||(v5(t)||Kq(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),e},i.prototype.match=function(t){return this._cache[t]},i.prototype.loadImage=function(t){return as(this,void 0,void 0,function(){var e,r,n,s,A=this;return Wn(this,function(a){switch(a.label){case 0:return e=VD.isSameOrigin(t),r=!w5(t)&&this._options.useCORS===!0&&yn.SUPPORT_CORS_IMAGES&&!e,n=!w5(t)&&!e&&!v5(t)&&typeof this._options.proxy=="string"&&yn.SUPPORT_CORS_XHR&&!r,!e&&this._options.allowTaint===!1&&!w5(t)&&!v5(t)&&!n&&!r?[2]:(s=t,n?[4,this.proxy(s)]:[3,2]);case 1:s=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(o,l){var h=new Image;h.onload=function(){return o(h)},h.onerror=l,(Gq(s)||r)&&(h.crossOrigin="anonymous"),h.src=s,h.complete===!0&&setTimeout(function(){return o(h)},500),A._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},i.prototype.has=function(t){return typeof this._cache[t]<"u"},i.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},i.prototype.proxy=function(t){var e=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=t.substring(0,256);return new Promise(function(s,A){var a=yn.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(a==="text")s(o.response);else{var u=new FileReader;u.addEventListener("load",function(){return s(u.result)},!1),u.addEventListener("error",function(f){return A(f)},!1),u.readAsDataURL(o.response)}else A("Failed to proxy resource "+n+" with status code "+o.status)},o.onerror=A;var l=r.indexOf("?")>-1?"&":"?";if(o.open("GET",""+r+l+"url="+encodeURIComponent(t)+"&responseType="+a),a!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=a),e._options.imageTimeout){var h=e._options.imageTimeout;o.timeout=h,o.ontimeout=function(){return A("Timed out ("+h+"ms) proxying "+n)}}o.send()})},i})(),Vq=/^data:image\/svg\+xml/i,Wq=/^data:image\/.*;base64,/i,jq=/^data:image\/.*/i,Kq=function(i){return yn.SUPPORT_SVG_DRAWING||!zq(i)},w5=function(i){return jq.test(i)},Gq=function(i){return Wq.test(i)},v5=function(i){return i.substr(0,4)==="blob"},zq=function(i){return i.substr(-3).toLowerCase()==="svg"||Vq.test(i)},Xt=(function(){function i(t,e){this.type=0,this.x=t,this.y=e}return i.prototype.add=function(t,e){return new i(this.x+t,this.y+e)},i})(),Cd=function(i,t,e){return new Xt(i.x+(t.x-i.x)*e,i.y+(t.y-i.y)*e)},kw=(function(){function i(t,e,r,n){this.type=1,this.start=t,this.startControl=e,this.endControl=r,this.end=n}return i.prototype.subdivide=function(t,e){var r=Cd(this.start,this.startControl,t),n=Cd(this.startControl,this.endControl,t),s=Cd(this.endControl,this.end,t),A=Cd(r,n,t),a=Cd(n,s,t),o=Cd(A,a,t);return e?new i(this.start,r,A,o):new i(o,a,s,this.end)},i.prototype.add=function(t,e){return new i(this.start.add(t,e),this.startControl.add(t,e),this.endControl.add(t,e),this.end.add(t,e))},i.prototype.reverse=function(){return new i(this.end,this.endControl,this.startControl,this.start)},i})(),LA=function(i){return i.type===1},qq=(function(){function i(t){var e=t.styles,r=t.bounds,n=Om(e.borderTopLeftRadius,r.width,r.height),s=n[0],A=n[1],a=Om(e.borderTopRightRadius,r.width,r.height),o=a[0],l=a[1],h=Om(e.borderBottomRightRadius,r.width,r.height),u=h[0],f=h[1],d=Om(e.borderBottomLeftRadius,r.width,r.height),g=d[0],m=d[1],y=[];y.push((s+o)/r.width),y.push((g+u)/r.width),y.push((A+m)/r.height),y.push((l+f)/r.height);var w=Math.max.apply(Math,y);w>1&&(s/=w,A/=w,o/=w,l/=w,u/=w,f/=w,g/=w,m/=w);var b=r.width-o,C=r.height-f,S=r.width-u,k=r.height-m,I=e.borderTopWidth,N=e.borderRightWidth,D=e.borderBottomWidth,Q=e.borderLeftWidth,K=Fr(e.paddingTop,t.bounds.width),L=Fr(e.paddingRight,t.bounds.width),O=Fr(e.paddingBottom,t.bounds.width),W=Fr(e.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||A>0?Pr(r.left+Q/3,r.top+I/3,s-Q/3,A-I/3,tr.TOP_LEFT):new Xt(r.left+Q/3,r.top+I/3),this.topRightBorderDoubleOuterBox=s>0||A>0?Pr(r.left+b,r.top+I/3,o-N/3,l-I/3,tr.TOP_RIGHT):new Xt(r.left+r.width-N/3,r.top+I/3),this.bottomRightBorderDoubleOuterBox=u>0||f>0?Pr(r.left+S,r.top+C,u-N/3,f-D/3,tr.BOTTOM_RIGHT):new Xt(r.left+r.width-N/3,r.top+r.height-D/3),this.bottomLeftBorderDoubleOuterBox=g>0||m>0?Pr(r.left+Q/3,r.top+k,g-Q/3,m-D/3,tr.BOTTOM_LEFT):new Xt(r.left+Q/3,r.top+r.height-D/3),this.topLeftBorderDoubleInnerBox=s>0||A>0?Pr(r.left+Q*2/3,r.top+I*2/3,s-Q*2/3,A-I*2/3,tr.TOP_LEFT):new Xt(r.left+Q*2/3,r.top+I*2/3),this.topRightBorderDoubleInnerBox=s>0||A>0?Pr(r.left+b,r.top+I*2/3,o-N*2/3,l-I*2/3,tr.TOP_RIGHT):new Xt(r.left+r.width-N*2/3,r.top+I*2/3),this.bottomRightBorderDoubleInnerBox=u>0||f>0?Pr(r.left+S,r.top+C,u-N*2/3,f-D*2/3,tr.BOTTOM_RIGHT):new Xt(r.left+r.width-N*2/3,r.top+r.height-D*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||m>0?Pr(r.left+Q*2/3,r.top+k,g-Q*2/3,m-D*2/3,tr.BOTTOM_LEFT):new Xt(r.left+Q*2/3,r.top+r.height-D*2/3),this.topLeftBorderStroke=s>0||A>0?Pr(r.left+Q/2,r.top+I/2,s-Q/2,A-I/2,tr.TOP_LEFT):new Xt(r.left+Q/2,r.top+I/2),this.topRightBorderStroke=s>0||A>0?Pr(r.left+b,r.top+I/2,o-N/2,l-I/2,tr.TOP_RIGHT):new Xt(r.left+r.width-N/2,r.top+I/2),this.bottomRightBorderStroke=u>0||f>0?Pr(r.left+S,r.top+C,u-N/2,f-D/2,tr.BOTTOM_RIGHT):new Xt(r.left+r.width-N/2,r.top+r.height-D/2),this.bottomLeftBorderStroke=g>0||m>0?Pr(r.left+Q/2,r.top+k,g-Q/2,m-D/2,tr.BOTTOM_LEFT):new Xt(r.left+Q/2,r.top+r.height-D/2),this.topLeftBorderBox=s>0||A>0?Pr(r.left,r.top,s,A,tr.TOP_LEFT):new Xt(r.left,r.top),this.topRightBorderBox=o>0||l>0?Pr(r.left+b,r.top,o,l,tr.TOP_RIGHT):new Xt(r.left+r.width,r.top),this.bottomRightBorderBox=u>0||f>0?Pr(r.left+S,r.top+C,u,f,tr.BOTTOM_RIGHT):new Xt(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=g>0||m>0?Pr(r.left,r.top+k,g,m,tr.BOTTOM_LEFT):new Xt(r.left,r.top+r.height),this.topLeftPaddingBox=s>0||A>0?Pr(r.left+Q,r.top+I,Math.max(0,s-Q),Math.max(0,A-I),tr.TOP_LEFT):new Xt(r.left+Q,r.top+I),this.topRightPaddingBox=o>0||l>0?Pr(r.left+Math.min(b,r.width-N),r.top+I,b>r.width+N?0:Math.max(0,o-N),Math.max(0,l-I),tr.TOP_RIGHT):new Xt(r.left+r.width-N,r.top+I),this.bottomRightPaddingBox=u>0||f>0?Pr(r.left+Math.min(S,r.width-Q),r.top+Math.min(C,r.height-D),Math.max(0,u-N),Math.max(0,f-D),tr.BOTTOM_RIGHT):new Xt(r.left+r.width-N,r.top+r.height-D),this.bottomLeftPaddingBox=g>0||m>0?Pr(r.left+Q,r.top+Math.min(k,r.height-D),Math.max(0,g-Q),Math.max(0,m-D),tr.BOTTOM_LEFT):new Xt(r.left+Q,r.top+r.height-D),this.topLeftContentBox=s>0||A>0?Pr(r.left+Q+W,r.top+I+K,Math.max(0,s-(Q+W)),Math.max(0,A-(I+K)),tr.TOP_LEFT):new Xt(r.left+Q+W,r.top+I+K),this.topRightContentBox=o>0||l>0?Pr(r.left+Math.min(b,r.width+Q+W),r.top+I+K,b>r.width+Q+W?0:o-Q+W,l-(I+K),tr.TOP_RIGHT):new Xt(r.left+r.width-(N+L),r.top+I+K),this.bottomRightContentBox=u>0||f>0?Pr(r.left+Math.min(S,r.width-(Q+W)),r.top+Math.min(C,r.height+I+K),Math.max(0,u-(N+L)),f-(D+O),tr.BOTTOM_RIGHT):new Xt(r.left+r.width-(N+L),r.top+r.height-(D+O)),this.bottomLeftContentBox=g>0||m>0?Pr(r.left+Q+W,r.top+k,Math.max(0,g-(Q+W)),m-(D+O),tr.BOTTOM_LEFT):new Xt(r.left+Q+W,r.top+r.height-(D+O))}return i})(),tr;(function(i){i[i.TOP_LEFT=0]="TOP_LEFT",i[i.TOP_RIGHT=1]="TOP_RIGHT",i[i.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",i[i.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(tr||(tr={}));var Pr=function(i,t,e,r,n){var s=4*((Math.sqrt(2)-1)/3),A=e*s,a=r*s,o=i+e,l=t+r;switch(n){case tr.TOP_LEFT:return new kw(new Xt(i,l),new Xt(i,l-a),new Xt(o-A,t),new Xt(o,t));case tr.TOP_RIGHT:return new kw(new Xt(i,t),new Xt(i+A,t),new Xt(o,l-a),new Xt(o,l));case tr.BOTTOM_RIGHT:return new kw(new Xt(o,t),new Xt(o,t+a),new Xt(i+A,l),new Xt(i,l));case tr.BOTTOM_LEFT:default:return new kw(new Xt(o,l),new Xt(o-A,l),new Xt(i,t+a),new Xt(i,t))}},Sy=function(i){return[i.topLeftBorderBox,i.topRightBorderBox,i.bottomRightBorderBox,i.bottomLeftBorderBox]},Xq=function(i){return[i.topLeftContentBox,i.topRightContentBox,i.bottomRightContentBox,i.bottomLeftContentBox]},Ey=function(i){return[i.topLeftPaddingBox,i.topRightPaddingBox,i.bottomRightPaddingBox,i.bottomLeftPaddingBox]},Yq=(function(){function i(t,e,r){this.offsetX=t,this.offsetY=e,this.matrix=r,this.type=0,this.target=6}return i})(),Uw=(function(){function i(t,e){this.path=t,this.target=e,this.type=1}return i})(),$q=(function(){function i(t){this.opacity=t,this.type=2,this.target=6}return i})(),Zq=function(i){return i.type===0},WD=function(i){return i.type===1},Jq=function(i){return i.type===2},HI=function(i,t){return i.length===t.length?i.some(function(e,r){return e===t[r]}):!1},tX=function(i,t,e,r,n){return i.map(function(s,A){switch(A){case 0:return s.add(t,e);case 1:return s.add(t+r,e);case 2:return s.add(t+r,e+n);case 3:return s.add(t,e+n)}return s})},jD=(function(){function i(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return i})(),KD=(function(){function i(t,e){if(this.container=t,this.parent=e,this.effects=[],this.curves=new qq(this.container),this.container.styles.opacity<1&&this.effects.push(new $q(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new Yq(r,n,s))}if(this.container.styles.overflowX!==0){var A=Sy(this.curves),a=Ey(this.curves);HI(A,a)?this.effects.push(new Uw(A,6)):(this.effects.push(new Uw(A,2)),this.effects.push(new Uw(a,4)))}}return i.prototype.getEffects=function(t){for(var e=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var s=r.effects.filter(function(o){return!WD(o)});if(e||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,s),e=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var A=Sy(r.curves),a=Ey(r.curves);HI(A,a)||n.unshift(new Uw(a,6))}}else n.unshift.apply(n,s);r=r.parent}return n.filter(function(o){return Yi(o.target,t)})},i})(),hS=function(i,t,e,r){i.container.elements.forEach(function(n){var s=Yi(n.flags,4),A=Yi(n.flags,2),a=new KD(n,i);Yi(n.styles.display,2048)&&r.push(a);var o=Yi(n.flags,8)?[]:r;if(s||A){var l=s||n.styles.isPositioned()?e:t,h=new jD(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var u=n.styles.zIndex.order;if(u<0){var f=0;l.negativeZIndex.some(function(g,m){return u>g.element.container.styles.zIndex.order?(f=m,!1):f>0}),l.negativeZIndex.splice(f,0,h)}else if(u>0){var d=0;l.positiveZIndex.some(function(g,m){return u>=g.element.container.styles.zIndex.order?(d=m+1,!1):d>0}),l.positiveZIndex.splice(d,0,h)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(h)}else n.styles.isFloating()?l.nonPositionedFloats.push(h):l.nonPositionedInlineLevel.push(h);hS(a,h,s?h:e,o)}else n.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),hS(a,t,e,o);Yi(n.flags,8)&&GD(n,o)})},GD=function(i,t){for(var e=i instanceof sS?i.start:1,r=i instanceof sS?i.reversed:!1,n=0;n<t.length;n++){var s=t[n];s.container instanceof UD&&typeof s.container.value=="number"&&s.container.value!==0&&(e=s.container.value),s.listValue=H0(e,s.container.styles.listStyleType,!0),e+=r?-1:1}},eX=function(i){var t=new KD(i,null),e=new jD(t),r=[];return hS(t,e,e,r),GD(t.container,r),e},VI=function(i,t){switch(t){case 0:return NA(i.topLeftBorderBox,i.topLeftPaddingBox,i.topRightBorderBox,i.topRightPaddingBox);case 1:return NA(i.topRightBorderBox,i.topRightPaddingBox,i.bottomRightBorderBox,i.bottomRightPaddingBox);case 2:return NA(i.bottomRightBorderBox,i.bottomRightPaddingBox,i.bottomLeftBorderBox,i.bottomLeftPaddingBox);case 3:default:return NA(i.bottomLeftBorderBox,i.bottomLeftPaddingBox,i.topLeftBorderBox,i.topLeftPaddingBox)}},rX=function(i,t){switch(t){case 0:return NA(i.topLeftBorderBox,i.topLeftBorderDoubleOuterBox,i.topRightBorderBox,i.topRightBorderDoubleOuterBox);case 1:return NA(i.topRightBorderBox,i.topRightBorderDoubleOuterBox,i.bottomRightBorderBox,i.bottomRightBorderDoubleOuterBox);case 2:return NA(i.bottomRightBorderBox,i.bottomRightBorderDoubleOuterBox,i.bottomLeftBorderBox,i.bottomLeftBorderDoubleOuterBox);case 3:default:return NA(i.bottomLeftBorderBox,i.bottomLeftBorderDoubleOuterBox,i.topLeftBorderBox,i.topLeftBorderDoubleOuterBox)}},iX=function(i,t){switch(t){case 0:return NA(i.topLeftBorderDoubleInnerBox,i.topLeftPaddingBox,i.topRightBorderDoubleInnerBox,i.topRightPaddingBox);case 1:return NA(i.topRightBorderDoubleInnerBox,i.topRightPaddingBox,i.bottomRightBorderDoubleInnerBox,i.bottomRightPaddingBox);case 2:return NA(i.bottomRightBorderDoubleInnerBox,i.bottomRightPaddingBox,i.bottomLeftBorderDoubleInnerBox,i.bottomLeftPaddingBox);case 3:default:return NA(i.bottomLeftBorderDoubleInnerBox,i.bottomLeftPaddingBox,i.topLeftBorderDoubleInnerBox,i.topLeftPaddingBox)}},nX=function(i,t){switch(t){case 0:return Iw(i.topLeftBorderStroke,i.topRightBorderStroke);case 1:return Iw(i.topRightBorderStroke,i.bottomRightBorderStroke);case 2:return Iw(i.bottomRightBorderStroke,i.bottomLeftBorderStroke);case 3:default:return Iw(i.bottomLeftBorderStroke,i.topLeftBorderStroke)}},Iw=function(i,t){var e=[];return LA(i)?e.push(i.subdivide(.5,!1)):e.push(i),LA(t)?e.push(t.subdivide(.5,!0)):e.push(t),e},NA=function(i,t,e,r){var n=[];return LA(i)?n.push(i.subdivide(.5,!1)):n.push(i),LA(e)?n.push(e.subdivide(.5,!0)):n.push(e),LA(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),LA(t)?n.push(t.subdivide(.5,!1).reverse()):n.push(t),n},zD=function(i){var t=i.bounds,e=i.styles;return t.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},ky=function(i){var t=i.styles,e=i.bounds,r=Fr(t.paddingLeft,e.width),n=Fr(t.paddingRight,e.width),s=Fr(t.paddingTop,e.width),A=Fr(t.paddingBottom,e.width);return e.add(r+t.borderLeftWidth,s+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+n),-(t.borderTopWidth+t.borderBottomWidth+s+A))},sX=function(i,t){return i===0?t.bounds:i===2?ky(t):zD(t)},AX=function(i,t){return i===0?t.bounds:i===2?ky(t):zD(t)},y5=function(i,t,e){var r=sX(If(i.styles.backgroundOrigin,t),i),n=AX(If(i.styles.backgroundClip,t),i),s=aX(If(i.styles.backgroundSize,t),e,r),A=s[0],a=s[1],o=Om(If(i.styles.backgroundPosition,t),r.width-A,r.height-a),l=oX(If(i.styles.backgroundRepeat,t),o,s,r,n),h=Math.round(r.left+o[0]),u=Math.round(r.top+o[1]);return[l,h,u,A,a]},xd=function(i){return cr(i)&&i.value===yp.AUTO},Qw=function(i){return typeof i=="number"},aX=function(i,t,e){var r=t[0],n=t[1],s=t[2],A=i[0],a=i[1];if(!A)return[0,0];if(Oi(A)&&a&&Oi(a))return[Fr(A,e.width),Fr(a,e.height)];var o=Qw(s);if(cr(A)&&(A.value===yp.CONTAIN||A.value===yp.COVER)){if(Qw(s)){var l=e.width/e.height;return l<s!=(A.value===yp.COVER)?[e.width,e.width/s]:[e.height*s,e.height]}return[e.width,e.height]}var h=Qw(r),u=Qw(n),f=h||u;if(xd(A)&&(!a||xd(a))){if(h&&u)return[r,n];if(!o&&!f)return[e.width,e.height];if(f&&o){var d=h?r:n*s,g=u?n:r/s;return[d,g]}var m=h?r:e.width,y=u?n:e.height;return[m,y]}if(o){var w=0,b=0;return Oi(A)?w=Fr(A,e.width):Oi(a)&&(b=Fr(a,e.height)),xd(A)?w=b*s:(!a||xd(a))&&(b=w/s),[w,b]}var C=null,S=null;if(Oi(A)?C=Fr(A,e.width):a&&Oi(a)&&(S=Fr(a,e.height)),C!==null&&(!a||xd(a))&&(S=h&&u?C/r*n:e.height),S!==null&&xd(A)&&(C=h&&u?S/n*r:e.width),C!==null&&S!==null)return[C,S];throw new Error("Unable to calculate background-size for element")},If=function(i,t){var e=i[t];return typeof e>"u"?i[0]:e},oX=function(i,t,e,r,n){var s=t[0],A=t[1],a=e[0],o=e[1];switch(i){case 2:return[new Xt(Math.round(r.left),Math.round(r.top+A)),new Xt(Math.round(r.left+r.width),Math.round(r.top+A)),new Xt(Math.round(r.left+r.width),Math.round(o+r.top+A)),new Xt(Math.round(r.left),Math.round(o+r.top+A))];case 3:return[new Xt(Math.round(r.left+s),Math.round(r.top)),new Xt(Math.round(r.left+s+a),Math.round(r.top)),new Xt(Math.round(r.left+s+a),Math.round(r.height+r.top)),new Xt(Math.round(r.left+s),Math.round(r.height+r.top))];case 1:return[new Xt(Math.round(r.left+s),Math.round(r.top+A)),new Xt(Math.round(r.left+s+a),Math.round(r.top+A)),new Xt(Math.round(r.left+s+a),Math.round(r.top+A+o)),new Xt(Math.round(r.left+s),Math.round(r.top+A+o))];default:return[new Xt(Math.round(n.left),Math.round(n.top)),new Xt(Math.round(n.left+n.width),Math.round(n.top)),new Xt(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Xt(Math.round(n.left),Math.round(n.height+n.top))]}},lX="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",WI="Hidden Text",hX=(function(){function i(t){this._data={},this._document=t}return i.prototype.parseMetrics=function(t,e){var r=this._document.createElement("div"),n=this._document.createElement("img"),s=this._document.createElement("span"),A=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=e,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",A.appendChild(r),n.src=lX,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",s.style.fontFamily=t,s.style.fontSize=e,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(WI)),r.appendChild(s),r.appendChild(n);var a=n.offsetTop-s.offsetTop+2;r.removeChild(s),r.appendChild(this._document.createTextNode(WI)),r.style.lineHeight="normal",n.style.verticalAlign="super";var o=n.offsetTop-r.offsetTop+2;return A.removeChild(r),{baseline:a,middle:o}},i.prototype.getMetrics=function(t,e){var r=t+" "+e;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,e)),this._data[r]},i})(),qD=(function(){function i(t,e){this.context=t,this.options=e}return i})(),cX=1e4,uX=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new hX(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return t.prototype.applyEffects=function(e){for(var r=this;this._activeEffects.length;)this.popEffect();e.forEach(function(n){return r.applyEffect(n)})},t.prototype.applyEffect=function(e){this.ctx.save(),Jq(e)&&(this.ctx.globalAlpha=e.opacity),Zq(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),WD(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return as(this,void 0,void 0,function(){var r;return Wn(this,function(n){switch(n.label){case 0:return r=e.element.container.styles,r.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return as(this,void 0,void 0,function(){return Wn(this,function(r){switch(r.label){case 0:if(Yi(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(e)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,r,n){var s=this;if(r===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var A=rE(e.text);A.reduce(function(a,o){return s.ctx.fillText(o,a,e.bounds.top+n),a+s.ctx.measureText(o).width},e.bounds.left)}},t.prototype.createFontStyle=function(e){var r=e.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),n=mX(e.fontFamily).join(", "),s=t1(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,r,e.fontWeight,s,n].join(" "),n,s]},t.prototype.renderTextNode=function(e,r){return as(this,void 0,void 0,function(){var n,s,A,a,o,l,h,u,f=this;return Wn(this,function(d){return n=this.createFontStyle(r),s=n[0],A=n[1],a=n[2],this.ctx.font=s,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(A,a),l=o.baseline,h=o.middle,u=r.paintOrder,e.textBounds.forEach(function(g){u.forEach(function(m){switch(m){case 0:f.ctx.fillStyle=Ji(r.color),f.renderTextWithLetterSpacing(g,r.letterSpacing,l);var y=r.textShadow;y.length&&g.text.trim().length&&(y.slice(0).reverse().forEach(function(w){f.ctx.shadowColor=Ji(w.color),f.ctx.shadowOffsetX=w.offsetX.number*f.options.scale,f.ctx.shadowOffsetY=w.offsetY.number*f.options.scale,f.ctx.shadowBlur=w.blur.number,f.renderTextWithLetterSpacing(g,r.letterSpacing,l)}),f.ctx.shadowColor="",f.ctx.shadowOffsetX=0,f.ctx.shadowOffsetY=0,f.ctx.shadowBlur=0),r.textDecorationLine.length&&(f.ctx.fillStyle=Ji(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:f.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+l),g.bounds.width,1);break;case 2:f.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:f.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+h),g.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&g.text.trim().length&&(f.ctx.strokeStyle=Ji(r.webkitTextStrokeColor),f.ctx.lineWidth=r.webkitTextStrokeWidth,f.ctx.lineJoin=window.chrome?"miter":"round",f.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+l)),f.ctx.strokeStyle="",f.ctx.lineWidth=0,f.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(e,r,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var s=ky(e),A=Ey(r);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return as(this,void 0,void 0,function(){var r,n,s,A,a,o,b,b,l,h,u,f,S,d,g,k,m,y,w,b,C,S,k;return Wn(this,function(I){switch(I.label){case 0:this.applyEffects(e.getEffects(4)),r=e.container,n=e.curves,s=r.styles,A=0,a=r.textNodes,I.label=1;case 1:return A<a.length?(o=a[A],[4,this.renderTextNode(o,s)]):[3,4];case 2:I.sent(),I.label=3;case 3:return A++,[3,1];case 4:if(!(r instanceof SD))return[3,8];I.label=5;case 5:return I.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return b=I.sent(),this.renderReplacedElement(r,n,b),[3,8];case 7:return I.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof ED&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof kD))return[3,12];I.label=9;case 9:return I.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return b=I.sent(),this.renderReplacedElement(r,n,b),[3,12];case 11:return I.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof LD&&r.tree?(l=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:h=I.sent(),r.width&&r.height&&this.ctx.drawImage(h,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),I.label=14;case 14:if(r instanceof iE&&(u=Math.min(r.bounds.width,r.bounds.height),r.type===By?r.checked&&(this.ctx.save(),this.path([new Xt(r.bounds.left+u*.39363,r.bounds.top+u*.79),new Xt(r.bounds.left+u*.16,r.bounds.top+u*.5549),new Xt(r.bounds.left+u*.27347,r.bounds.top+u*.44071),new Xt(r.bounds.left+u*.39694,r.bounds.top+u*.5649),new Xt(r.bounds.left+u*.72983,r.bounds.top+u*.23),new Xt(r.bounds.left+u*.84,r.bounds.top+u*.34085),new Xt(r.bounds.left+u*.39363,r.bounds.top+u*.79)]),this.ctx.fillStyle=Ji(II),this.ctx.fill(),this.ctx.restore()):r.type===Cy&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+u/2,r.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=Ji(II),this.ctx.fill(),this.ctx.restore())),dX(r)&&r.value.length){switch(f=this.createFontStyle(s),S=f[0],d=f[1],g=this.fontMetrics.getMetrics(S,d).baseline,this.ctx.font=S,this.ctx.fillStyle=Ji(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=pX(r.styles.textAlign),k=ky(r),m=0,r.styles.textAlign){case 1:m+=k.width/2;break;case 2:m+=k.width;break}y=k.add(m,0,0,-k.height/2+1),this.ctx.save(),this.path([new Xt(k.left,k.top),new Xt(k.left+k.width,k.top),new Xt(k.left+k.width,k.top+k.height),new Xt(k.left,k.top+k.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new U0(r.value,y),s.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Yi(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];b=void 0,C=w.url,I.label=15;case 15:return I.trys.push([15,17,,18]),[4,this.context.cache.match(C)];case 16:return b=I.sent(),this.ctx.drawImage(b,r.bounds.left-(b.width+10),r.bounds.top),[3,18];case 17:return I.sent(),this.context.logger.error("Error loading list-style-image "+C),[3,18];case 18:return[3,20];case 19:e.listValue&&r.styles.listStyleType!==-1&&(S=this.createFontStyle(s)[0],this.ctx.font=S,this.ctx.fillStyle=Ji(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",k=new wl(r.bounds.left,r.bounds.top+Fr(r.styles.paddingTop,r.bounds.width),r.bounds.width,uI(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new U0(e.listValue,k),s.letterSpacing,uI(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),I.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return as(this,void 0,void 0,function(){var r,n,w,s,A,w,a,o,w,l,h,w,u,f,w,d,g,w,m,y,w;return Wn(this,function(b){switch(b.label){case 0:if(Yi(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:b.sent(),r=0,n=e.negativeZIndex,b.label=2;case 2:return r<n.length?(w=n[r],[4,this.renderStack(w)]):[3,5];case 3:b.sent(),b.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:b.sent(),s=0,A=e.nonInlineLevel,b.label=7;case 7:return s<A.length?(w=A[s],[4,this.renderNode(w)]):[3,10];case 8:b.sent(),b.label=9;case 9:return s++,[3,7];case 10:a=0,o=e.nonPositionedFloats,b.label=11;case 11:return a<o.length?(w=o[a],[4,this.renderStack(w)]):[3,14];case 12:b.sent(),b.label=13;case 13:return a++,[3,11];case 14:l=0,h=e.nonPositionedInlineLevel,b.label=15;case 15:return l<h.length?(w=h[l],[4,this.renderStack(w)]):[3,18];case 16:b.sent(),b.label=17;case 17:return l++,[3,15];case 18:u=0,f=e.inlineLevel,b.label=19;case 19:return u<f.length?(w=f[u],[4,this.renderNode(w)]):[3,22];case 20:b.sent(),b.label=21;case 21:return u++,[3,19];case 22:d=0,g=e.zeroOrAutoZIndexOrTransformedOrOpacity,b.label=23;case 23:return d<g.length?(w=g[d],[4,this.renderStack(w)]):[3,26];case 24:b.sent(),b.label=25;case 25:return d++,[3,23];case 26:m=0,y=e.positiveZIndex,b.label=27;case 27:return m<y.length?(w=y[m],[4,this.renderStack(w)]):[3,30];case 28:b.sent(),b.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var r=this;e.forEach(function(n,s){var A=LA(n)?n.start:n;s===0?r.ctx.moveTo(A.x,A.y):r.ctx.lineTo(A.x,A.y),LA(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},t.prototype.renderRepeat=function(e,r,n,s){this.path(e),this.ctx.fillStyle=r,this.ctx.translate(n,s),this.ctx.fill(),this.ctx.translate(-n,-s)},t.prototype.resizeImage=function(e,r,n){var s;if(e.width===r&&e.height===n)return e;var A=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,a=A.createElement("canvas");a.width=Math.max(1,r),a.height=Math.max(1,n);var o=a.getContext("2d");return o.drawImage(e,0,0,e.width,e.height,0,0,r,n),a},t.prototype.renderBackgroundImage=function(e){return as(this,void 0,void 0,function(){var r,n,s,A,a,o;return Wn(this,function(l){switch(l.label){case 0:r=e.styles.backgroundImage.length-1,n=function(h){var u,f,d,K,et,st,W,R,D,g,K,et,st,W,R,m,y,w,b,C,S,k,I,N,D,Q,K,L,O,W,R,tt,et,st,nt,at,ft,ht,M,G,X,rt;return Wn(this,function(it){switch(it.label){case 0:if(h.type!==0)return[3,5];u=void 0,f=h.url,it.label=1;case 1:return it.trys.push([1,3,,4]),[4,s.context.cache.match(f)];case 2:return u=it.sent(),[3,4];case 3:return it.sent(),s.context.logger.error("Error loading background-image "+f),[3,4];case 4:return u&&(d=y5(e,r,[u.width,u.height,u.width/u.height]),K=d[0],et=d[1],st=d[2],W=d[3],R=d[4],D=s.ctx.createPattern(s.resizeImage(u,W,R),"repeat"),s.renderRepeat(K,D,et,st)),[3,6];case 5:ZK(h)?(g=y5(e,r,[null,null,null]),K=g[0],et=g[1],st=g[2],W=g[3],R=g[4],m=zK(h.angle,W,R),y=m[0],w=m[1],b=m[2],C=m[3],S=m[4],k=document.createElement("canvas"),k.width=W,k.height=R,I=k.getContext("2d"),N=I.createLinearGradient(w,C,b,S),hI(h.stops,y).forEach(function(ot){return N.addColorStop(ot.stop,Ji(ot.color))}),I.fillStyle=N,I.fillRect(0,0,W,R),W>0&&R>0&&(D=s.ctx.createPattern(k,"repeat"),s.renderRepeat(K,D,et,st))):JK(h)&&(Q=y5(e,r,[null,null,null]),K=Q[0],L=Q[1],O=Q[2],W=Q[3],R=Q[4],tt=h.position.length===0?[JS]:h.position,et=Fr(tt[0],W),st=Fr(tt[tt.length-1],R),nt=qK(h,et,st,W,R),at=nt[0],ft=nt[1],at>0&&ft>0&&(ht=s.ctx.createRadialGradient(L+et,O+st,0,L+et,O+st,at),hI(h.stops,at*2).forEach(function(ot){return ht.addColorStop(ot.stop,Ji(ot.color))}),s.path(K),s.ctx.fillStyle=ht,at!==ft?(M=e.bounds.left+.5*e.bounds.width,G=e.bounds.top+.5*e.bounds.height,X=ft/at,rt=1/X,s.ctx.save(),s.ctx.translate(M,G),s.ctx.transform(1,0,0,X,0,0),s.ctx.translate(-M,-G),s.ctx.fillRect(L,rt*(O-G)+G,W,R*rt),s.ctx.restore()):s.ctx.fill())),it.label=6;case 6:return r--,[2]}})},s=this,A=0,a=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return A<a.length?(o=a[A],[5,n(o)]):[3,4];case 2:l.sent(),l.label=3;case 3:return A++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,r,n){return as(this,void 0,void 0,function(){return Wn(this,function(s){return this.path(VI(n,r)),this.ctx.fillStyle=Ji(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,r,n,s){return as(this,void 0,void 0,function(){var A,a;return Wn(this,function(o){switch(o.label){case 0:return r<3?[4,this.renderSolidBorder(e,n,s)]:[3,2];case 1:return o.sent(),[2];case 2:return A=rX(s,n),this.path(A),this.ctx.fillStyle=Ji(e),this.ctx.fill(),a=iX(s,n),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return as(this,void 0,void 0,function(){var r,n,s,A,a,o,l,h,u=this;return Wn(this,function(f){switch(f.label){case 0:return this.applyEffects(e.getEffects(2)),r=e.container.styles,n=!Rh(r.backgroundColor)||r.backgroundImage.length,s=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],A=fX(If(r.backgroundClip,0),e.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),Rh(r.backgroundColor)||(this.ctx.fillStyle=Ji(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:f.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(d){u.ctx.save();var g=Sy(e.curves),m=d.inset?0:cX,y=tX(g,-m+(d.inset?1:-1)*d.spread.number,(d.inset?1:-1)*d.spread.number,d.spread.number*(d.inset?-2:2),d.spread.number*(d.inset?-2:2));d.inset?(u.path(g),u.ctx.clip(),u.mask(y)):(u.mask(g),u.ctx.clip(),u.path(y)),u.ctx.shadowOffsetX=d.offsetX.number+m,u.ctx.shadowOffsetY=d.offsetY.number,u.ctx.shadowColor=Ji(d.color),u.ctx.shadowBlur=d.blur.number,u.ctx.fillStyle=d.inset?Ji(d.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),f.label=2;case 2:a=0,o=0,l=s,f.label=3;case 3:return o<l.length?(h=l[o],h.style!==0&&!Rh(h.color)&&h.width>0?h.style!==2?[3,5]:[4,this.renderDashedDottedBorder(h.color,h.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return f.sent(),[3,11];case 5:return h.style!==3?[3,7]:[4,this.renderDashedDottedBorder(h.color,h.width,a,e.curves,3)];case 6:return f.sent(),[3,11];case 7:return h.style!==4?[3,9]:[4,this.renderDoubleBorder(h.color,h.width,a,e.curves)];case 8:return f.sent(),[3,11];case 9:return[4,this.renderSolidBorder(h.color,a,e.curves)];case 10:f.sent(),f.label=11;case 11:a++,f.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,r,n,s,A){return as(this,void 0,void 0,function(){var a,o,l,h,u,f,d,g,m,y,w,b,C,S,k,I,k,I;return Wn(this,function(N){return this.ctx.save(),a=nX(s,n),o=VI(s,n),A===2&&(this.path(o),this.ctx.clip()),LA(o[0])?(l=o[0].start.x,h=o[0].start.y):(l=o[0].x,h=o[0].y),LA(o[1])?(u=o[1].end.x,f=o[1].end.y):(u=o[1].x,f=o[1].y),n===0||n===2?d=Math.abs(l-u):d=Math.abs(h-f),this.ctx.beginPath(),A===3?this.formatPath(a):this.formatPath(o.slice(0,2)),g=r<3?r*3:r*2,m=r<3?r*2:r,A===3&&(g=r,m=r),y=!0,d<=g*2?y=!1:d<=g*2+m?(w=d/(2*g+m),g*=w,m*=w):(b=Math.floor((d+m)/(g+m)),C=(d-b*g)/(b-1),S=(d-(b+1)*g)/b,m=S<=0||Math.abs(m-C)<Math.abs(m-S)?C:S),y&&(A===3?this.ctx.setLineDash([0,g+m]):this.ctx.setLineDash([g,m])),A===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=Ji(e),this.ctx.stroke(),this.ctx.setLineDash([]),A===2&&(LA(o[0])&&(k=o[3],I=o[0],this.ctx.beginPath(),this.formatPath([new Xt(k.end.x,k.end.y),new Xt(I.start.x,I.start.y)]),this.ctx.stroke()),LA(o[1])&&(k=o[1],I=o[2],this.ctx.beginPath(),this.formatPath([new Xt(k.end.x,k.end.y),new Xt(I.start.x,I.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return as(this,void 0,void 0,function(){var r;return Wn(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Ji(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=eX(e),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},t})(qD),dX=function(i){return i instanceof QD||i instanceof ID?!0:i instanceof iE&&i.type!==Cy&&i.type!==By},fX=function(i,t){switch(i){case 0:return Sy(t);case 2:return Xq(t);case 1:default:return Ey(t)}},pX=function(i){switch(i){case 1:return"center";case 2:return"right";case 0:default:return"left"}},gX=["-apple-system","system-ui"],mX=function(i){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?i.filter(function(t){return gX.indexOf(t)===-1}):i},wX=(function(i){wa(t,i);function t(e,r){var n=i.call(this,e,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return t.prototype.render=function(e){return as(this,void 0,void 0,function(){var r,n;return Wn(this,function(s){switch(s.label){case 0:return r=nS(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,vX(r)];case 1:return n=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Ji(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t})(qD),vX=function(i){return new Promise(function(t,e){var r=new Image;r.onload=function(){t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(i))})},yX=(function(){function i(t){var e=t.id,r=t.enabled;this.id=e,this.enabled=r,this.start=Date.now()}return i.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,lw([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},i.prototype.getTime=function(){return Date.now()-this.start},i.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,lw([this.id,this.getTime()+"ms"],t))},i.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,lw([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},i.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,lw([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},i.instances={},i})(),bX=(function(){function i(t,e){var r;this.windowBounds=e,this.instanceName="#"+i.instanceCount++,this.logger=new yX({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new Hq(this,t)}return i.instanceCount=1,i})(),BX=function(i,t){return t===void 0&&(t={}),CX(i,t)};typeof window<"u"&&VD.setContext(window);var CX=function(i,t){return as(void 0,void 0,void 0,function(){var e,r,n,s,A,a,o,l,h,u,f,d,g,m,y,w,b,C,S,k,N,I,N,D,Q,K,L,O,W,R,tt,et,st,nt,at,ft,ht,M,G,X;return Wn(this,function(rt){switch(rt.label){case 0:if(!i||typeof i!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=i.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(r=e.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(D=t.allowTaint)!==null&&D!==void 0?D:!1,imageTimeout:(Q=t.imageTimeout)!==null&&Q!==void 0?Q:15e3,proxy:t.proxy,useCORS:(K=t.useCORS)!==null&&K!==void 0?K:!1},s=W4({logging:(L=t.logging)!==null&&L!==void 0?L:!0,cache:t.cache},n),A={windowWidth:(O=t.windowWidth)!==null&&O!==void 0?O:r.innerWidth,windowHeight:(W=t.windowHeight)!==null&&W!==void 0?W:r.innerHeight,scrollX:(R=t.scrollX)!==null&&R!==void 0?R:r.pageXOffset,scrollY:(tt=t.scrollY)!==null&&tt!==void 0?tt:r.pageYOffset},a=new wl(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),o=new bX(s,a),l=(et=t.foreignObjectRendering)!==null&&et!==void 0?et:!1,h={allowTaint:(st=t.allowTaint)!==null&&st!==void 0?st:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),u=new OI(o,i,h),f=u.clonedReferenceElement,f?[4,u.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=rt.sent(),g=nE(f)||xq(f)?tj(f.ownerDocument):tb(o,f),m=g.width,y=g.height,w=g.left,b=g.top,C=xX(o,f,t.backgroundColor),S={canvas:t.canvas,backgroundColor:C,scale:(at=(nt=t.scale)!==null&&nt!==void 0?nt:r.devicePixelRatio)!==null&&at!==void 0?at:1,x:((ft=t.x)!==null&&ft!==void 0?ft:0)+w,y:((ht=t.y)!==null&&ht!==void 0?ht:0)+b,width:(M=t.width)!==null&&M!==void 0?M:Math.ceil(m),height:(G=t.height)!==null&&G!==void 0?G:Math.ceil(y)},l?(o.logger.debug("Document cloned, using foreign object rendering"),N=new wX(o,S),[4,N.render(f)]):[3,3];case 2:return k=rt.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+w+","+b+" with size "+m+"x"+y+" using computed rendering"),o.logger.debug("Starting DOM parsing"),I=MD(o,f),C===I.styles.backgroundColor&&(I.styles.backgroundColor=pl.TRANSPARENT),o.logger.debug("Starting renderer for element at "+S.x+","+S.y+" with size "+S.width+"x"+S.height),N=new uX(o,S),[4,N.render(I)];case 4:k=rt.sent(),rt.label=5;case 5:return(!((X=t.removeContainer)!==null&&X!==void 0)||X)&&(OI.destroy(d)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,k]}})})},xX=function(i,t,e){var r=t.ownerDocument,n=r.documentElement?E0(i,getComputedStyle(r.documentElement).backgroundColor):pl.TRANSPARENT,s=r.body?E0(i,getComputedStyle(r.body).backgroundColor):pl.TRANSPARENT,A=typeof e=="string"?E0(i,e):e===null?pl.TRANSPARENT:4294967295;return t===r.documentElement?Rh(n)?Rh(s)?A:s:n:A};const FX=Object.freeze(Object.defineProperty({__proto__:null,default:BX},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function jI(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,r=Array(t);e<t;e++)r[e]=i[e];return r}function SX(i){if(Array.isArray(i))return i}function EX(i,t){var e=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(e!=null){var r,n,s,A,a=[],o=!0,l=!1;try{if(s=(e=e.call(i)).next,t!==0)for(;!(o=(r=s.call(e)).done)&&(a.push(r.value),a.length!==t);o=!0);}catch(h){l=!0,n=h}finally{try{if(!o&&e.return!=null&&(A=e.return(),Object(A)!==A))return}finally{if(l)throw n}}return a}}function kX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
294
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UX(i,t){return SX(i)||EX(i,t)||IX(i,t)||kX()}function IX(i,t){if(i){if(typeof i=="string")return jI(i,t);var e={}.toString.call(i).slice(8,-1);return e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set"?Array.from(i):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?jI(i,t):void 0}}const XD=Object.entries,KI=Object.setPrototypeOf,QX=Object.isFrozen,LX=Object.getPrototypeOf,_X=Object.getOwnPropertyDescriptor;let ds=Object.freeze,PA=Object.seal,Qf=Object.create,YD=typeof Reflect<"u"&&Reflect,cS=YD.apply,uS=YD.construct;ds||(ds=function(i){return i});PA||(PA=function(i){return i});cS||(cS=function(i,t){for(var e=arguments.length,r=new Array(e>2?e-2:0),n=2;n<e;n++)r[n-2]=arguments[n];return i.apply(t,r)});uS||(uS=function(i){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return new i(...e)});const Fd=Ri(Array.prototype.forEach),MX=Ri(Array.prototype.lastIndexOf),GI=Ri(Array.prototype.pop),Sd=Ri(Array.prototype.push),TX=Ri(Array.prototype.splice),ss=Array.isArray,Vm=Ri(String.prototype.toLowerCase),b5=Ri(String.prototype.toString),zI=Ri(String.prototype.match),Ed=Ri(String.prototype.replace),qI=Ri(String.prototype.indexOf),NX=Ri(String.prototype.trim),PX=Ri(Number.prototype.toString),DX=Ri(Boolean.prototype.toString),XI=typeof BigInt>"u"?null:Ri(BigInt.prototype.toString),YI=typeof Symbol>"u"?null:Ri(Symbol.prototype.toString),ei=Ri(Object.prototype.hasOwnProperty),ug=Ri(Object.prototype.toString),fn=Ri(RegExp.prototype.test),dg=OX(TypeError);function Ri(i){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return cS(i,t,r)}}function OX(i){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return uS(i,e)}}function Oe(i,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vm;if(KI&&KI(i,null),!ss(t))return i;let r=t.length;for(;r--;){let n=t[r];if(typeof n=="string"){const s=e(n);s!==n&&(QX(t)||(t[r]=s),n=s)}i[n]=!0}return i}function RX(i){for(let t=0;t<i.length;t++)ei(i,t)||(i[t]=null);return i}function Hn(i){const t=Qf(null);for(const r of XD(i)){var e=UX(r,2);const n=e[0],s=e[1];ei(i,n)&&(ss(s)?t[n]=RX(s):s&&typeof s=="object"&&s.constructor===Object?t[n]=Hn(s):t[n]=s)}return t}function HX(i){switch(typeof i){case"string":return i;case"number":return PX(i);case"boolean":return DX(i);case"bigint":return XI?XI(i):"0";case"symbol":return YI?YI(i):"Symbol()";case"undefined":return ug(i);case"function":case"object":{if(i===null)return ug(i);const t=i,e=Va(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:ug(r)}return ug(i)}default:return ug(i)}}function Va(i,t){for(;i!==null;){const r=_X(i,t);if(r){if(r.get)return Ri(r.get);if(typeof r.value=="function")return Ri(r.value)}i=LX(i)}function e(){return null}return e}function VX(i){try{return fn(i,""),!0}catch{return!1}}const $I=ds(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),B5=ds(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C5=ds(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),WX=ds(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x5=ds(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),jX=ds(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ZI=ds(["#text"]),JI=ds(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),F5=ds(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),tQ=ds(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lw=ds(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),KX=PA(/{{[\w\W]*|^[\w\W]*}}/g),GX=PA(/<%[\w\W]*|^[\w\W]*%>/g),zX=PA(/\${[\w\W]*/g),qX=PA(/^data-[\-\w.\u00B7-\uFFFF]+$/),XX=PA(/^aria-[\-\w]+$/),eQ=PA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),YX=PA(/^(?:\w+script|data):/i),$X=PA(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ZX=PA(/^html$/i),JX=PA(/^[a-z][.\w]*(-[.\w]+)+$/i),Ta={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},tY=function(){return typeof window>"u"?null:window},eY=function(i,t){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(e=t.getAttribute(r));const n="dompurify"+(e?"#"+e:"");try{return i.createPolicy(n,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},rQ=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $D(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tY();const t=$=>$D($);if(t.version="3.4.7",t.removed=[],!i||!i.document||i.document.nodeType!==Ta.document||!i.Element)return t.isSupported=!1,t;let e=i.document;const r=e,n=r.currentScript;i.DocumentFragment;const s=i.HTMLTemplateElement,A=i.Node,a=i.Element,o=i.NodeFilter;i.NamedNodeMap===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const h=i.DOMParser,u=i.trustedTypes,f=a.prototype,d=Va(f,"cloneNode"),g=Va(f,"remove"),m=Va(f,"nextSibling"),y=Va(f,"childNodes"),w=Va(f,"parentNode"),b=Va(f,"shadowRoot"),C=Va(f,"attributes"),S=A&&A.prototype?Va(A.prototype,"nodeType"):null,k=A&&A.prototype?Va(A.prototype,"nodeName"):null;if(typeof s=="function"){const $=e.createElement("template");$.content&&$.content.ownerDocument&&(e=$.content.ownerDocument)}let I,N="";const D=e,Q=D.implementation,K=D.createNodeIterator,L=D.createDocumentFragment,O=D.getElementsByTagName,W=r.importNode;let R=rQ();t.isSupported=typeof XD=="function"&&typeof w=="function"&&Q&&Q.createHTMLDocument!==void 0;const tt=KX,et=GX,st=zX,nt=qX,at=XX,ft=YX,ht=$X,M=JX;let G=eQ,X=null;const rt=Oe({},[...$I,...B5,...C5,...x5,...ZI]);let it=null;const ot=Oe({},[...JI,...F5,...tQ,...Lw]);let gt=Object.seal(Qf(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),vt=null,yt=null;const St=Object.seal(Qf(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Dt=!0,Tt=!0,jt=!1,q=!0,Mt=!1,fe=!0,Zt=!1,Et=!1,re=!1,Ot=!1,zt=!1,Yt=!1,xt=!0,Rt=!1;const Ht="user-content-";let Kt=!0,te=!1,Wt={},ne=null;const Gt=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Te=Oe({},["audio","video","img","source","image","track"]);let be=null;const Be=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ze="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml";let le=Ne,ye=!1,Ye=null;const we=Oe({},[ze,Ae,Ne],b5);let ve=Oe({},["mi","mo","mn","ms","mtext"]),je=Oe({},["annotation-xml"]);const co=Oe({},["title","style","font","a","script"]);let Yr=null;const OA=["application/xhtml+xml","text/html"],aA="text/html";let qt=null,Fn=null;const RA=e.createElement("form"),qn=function($){return $ instanceof RegExp||$ instanceof Function},Sn=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fn&&Fn===$)return;(!$||typeof $!="object")&&($={}),$=Hn($),Yr=OA.indexOf($.PARSER_MEDIA_TYPE)===-1?aA:$.PARSER_MEDIA_TYPE,qt=Yr==="application/xhtml+xml"?b5:Vm,X=ei($,"ALLOWED_TAGS")&&ss($.ALLOWED_TAGS)?Oe({},$.ALLOWED_TAGS,qt):rt,it=ei($,"ALLOWED_ATTR")&&ss($.ALLOWED_ATTR)?Oe({},$.ALLOWED_ATTR,qt):ot,Ye=ei($,"ALLOWED_NAMESPACES")&&ss($.ALLOWED_NAMESPACES)?Oe({},$.ALLOWED_NAMESPACES,b5):we,be=ei($,"ADD_URI_SAFE_ATTR")&&ss($.ADD_URI_SAFE_ATTR)?Oe(Hn(Be),$.ADD_URI_SAFE_ATTR,qt):Be,Ve=ei($,"ADD_DATA_URI_TAGS")&&ss($.ADD_DATA_URI_TAGS)?Oe(Hn(Te),$.ADD_DATA_URI_TAGS,qt):Te,ne=ei($,"FORBID_CONTENTS")&&ss($.FORBID_CONTENTS)?Oe({},$.FORBID_CONTENTS,qt):Gt,vt=ei($,"FORBID_TAGS")&&ss($.FORBID_TAGS)?Oe({},$.FORBID_TAGS,qt):Hn({}),yt=ei($,"FORBID_ATTR")&&ss($.FORBID_ATTR)?Oe({},$.FORBID_ATTR,qt):Hn({}),Wt=ei($,"USE_PROFILES")?$.USE_PROFILES&&typeof $.USE_PROFILES=="object"?Hn($.USE_PROFILES):$.USE_PROFILES:!1,Dt=$.ALLOW_ARIA_ATTR!==!1,Tt=$.ALLOW_DATA_ATTR!==!1,jt=$.ALLOW_UNKNOWN_PROTOCOLS||!1,q=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Mt=$.SAFE_FOR_TEMPLATES||!1,fe=$.SAFE_FOR_XML!==!1,Zt=$.WHOLE_DOCUMENT||!1,Ot=$.RETURN_DOM||!1,zt=$.RETURN_DOM_FRAGMENT||!1,Yt=$.RETURN_TRUSTED_TYPE||!1,re=$.FORCE_BODY||!1,xt=$.SANITIZE_DOM!==!1,Rt=$.SANITIZE_NAMED_PROPS||!1,Kt=$.KEEP_CONTENT!==!1,te=$.IN_PLACE||!1,G=VX($.ALLOWED_URI_REGEXP)?$.ALLOWED_URI_REGEXP:eQ,le=typeof $.NAMESPACE=="string"?$.NAMESPACE:Ne,ve=ei($,"MATHML_TEXT_INTEGRATION_POINTS")&&$.MATHML_TEXT_INTEGRATION_POINTS&&typeof $.MATHML_TEXT_INTEGRATION_POINTS=="object"?Hn($.MATHML_TEXT_INTEGRATION_POINTS):Oe({},["mi","mo","mn","ms","mtext"]),je=ei($,"HTML_INTEGRATION_POINTS")&&$.HTML_INTEGRATION_POINTS&&typeof $.HTML_INTEGRATION_POINTS=="object"?Hn($.HTML_INTEGRATION_POINTS):Oe({},["annotation-xml"]);const kt=ei($,"CUSTOM_ELEMENT_HANDLING")&&$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING=="object"?Hn($.CUSTOM_ELEMENT_HANDLING):Qf(null);if(gt=Qf(null),ei(kt,"tagNameCheck")&&qn(kt.tagNameCheck)&&(gt.tagNameCheck=kt.tagNameCheck),ei(kt,"attributeNameCheck")&&qn(kt.attributeNameCheck)&&(gt.attributeNameCheck=kt.attributeNameCheck),ei(kt,"allowCustomizedBuiltInElements")&&typeof kt.allowCustomizedBuiltInElements=="boolean"&&(gt.allowCustomizedBuiltInElements=kt.allowCustomizedBuiltInElements),Mt&&(Tt=!1),zt&&(Ot=!0),Wt&&(X=Oe({},ZI),it=Qf(null),Wt.html===!0&&(Oe(X,$I),Oe(it,JI)),Wt.svg===!0&&(Oe(X,B5),Oe(it,F5),Oe(it,Lw)),Wt.svgFilters===!0&&(Oe(X,C5),Oe(it,F5),Oe(it,Lw)),Wt.mathMl===!0&&(Oe(X,x5),Oe(it,tQ),Oe(it,Lw))),St.tagCheck=null,St.attributeCheck=null,ei($,"ADD_TAGS")&&(typeof $.ADD_TAGS=="function"?St.tagCheck=$.ADD_TAGS:ss($.ADD_TAGS)&&(X===rt&&(X=Hn(X)),Oe(X,$.ADD_TAGS,qt))),ei($,"ADD_ATTR")&&(typeof $.ADD_ATTR=="function"?St.attributeCheck=$.ADD_ATTR:ss($.ADD_ATTR)&&(it===ot&&(it=Hn(it)),Oe(it,$.ADD_ATTR,qt))),ei($,"ADD_URI_SAFE_ATTR")&&ss($.ADD_URI_SAFE_ATTR)&&Oe(be,$.ADD_URI_SAFE_ATTR,qt),ei($,"FORBID_CONTENTS")&&ss($.FORBID_CONTENTS)&&(ne===Gt&&(ne=Hn(ne)),Oe(ne,$.FORBID_CONTENTS,qt)),ei($,"ADD_FORBID_CONTENTS")&&ss($.ADD_FORBID_CONTENTS)&&(ne===Gt&&(ne=Hn(ne)),Oe(ne,$.ADD_FORBID_CONTENTS,qt)),Kt&&(X["#text"]=!0),Zt&&Oe(X,["html","head","body"]),X.table&&(Oe(X,["tbody"]),delete vt.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw dg('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dg('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');I=$.TRUSTED_TYPES_POLICY,N=I.createHTML("")}else I===void 0&&(I=eY(u,n)),I!==null&&typeof N=="string"&&(N=I.createHTML(""));(R.uponSanitizeElement.length>0||R.uponSanitizeAttribute.length>0)&&X===rt&&(X=Hn(X)),R.uponSanitizeAttribute.length>0&&it===ot&&(it=Hn(it)),ds&&ds($),Fn=$},Er=Oe({},[...B5,...C5,...WX]),oi=Oe({},[...x5,...jX]),Hi=function($){let kt=w($);(!kt||!kt.tagName)&&(kt={namespaceURI:le,tagName:"template"});const Pt=Vm($.tagName),Fe=Vm(kt.tagName);return Ye[$.namespaceURI]?$.namespaceURI===Ae?kt.namespaceURI===Ne?Pt==="svg":kt.namespaceURI===ze?Pt==="svg"&&(Fe==="annotation-xml"||ve[Fe]):!!Er[Pt]:$.namespaceURI===ze?kt.namespaceURI===Ne?Pt==="math":kt.namespaceURI===Ae?Pt==="math"&&je[Fe]:!!oi[Pt]:$.namespaceURI===Ne?kt.namespaceURI===Ae&&!je[Fe]||kt.namespaceURI===ze&&!ve[Fe]?!1:!oi[Pt]&&(co[Pt]||!Er[Pt]):!!(Yr==="application/xhtml+xml"&&Ye[$.namespaceURI]):!1},Xn=function($){Sd(t.removed,{element:$});try{w($).removeChild($)}catch{g($)}},En=function($,kt){try{Sd(t.removed,{attribute:kt.getAttributeNode($),from:kt})}catch{Sd(t.removed,{attribute:null,from:kt})}if(kt.removeAttribute($),$==="is")if(Ot||zt)try{Xn(kt)}catch{}else try{kt.setAttribute($,"")}catch{}},gs=function($){let kt=null,Pt=null;if(re)$="<remove></remove>"+$;else{const Je=zI($,/^[\r\n\t ]+/);Pt=Je&&Je[0]}Yr==="application/xhtml+xml"&&le===Ne&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const Fe=I?I.createHTML($):$;if(le===Ne)try{kt=new h().parseFromString(Fe,Yr)}catch{}if(!kt||!kt.documentElement){kt=Q.createDocument(le,"template",null);try{kt.documentElement.innerHTML=ye?N:Fe}catch{}}const Re=kt.body||kt.documentElement;return $&&Pt&&Re.insertBefore(e.createTextNode(Pt),Re.childNodes[0]||null),le===Ne?O.call(kt,Zt?"html":"body")[0]:Zt?kt.documentElement:Re},Ns=function($){return K.call($.ownerDocument||$,$,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},ms=function($){$.normalize();const kt=K.call($.ownerDocument||$,$,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let Pt=kt.nextNode();for(;Pt;){let Fe=Pt.data;Fd([tt,et,st],Re=>{Fe=Ed(Fe,Re," ")}),Pt.data=Fe,Pt=kt.nextNode()}},kn=function($){const kt=k?k($):null;return typeof kt!="string"||qt(kt)!=="form"?!1:typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||$.attributes!==C($)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function"||$.nodeType!==S($)||$.childNodes!==y($)},Zi=function($){if(!S||typeof $!="object"||$===null)return!1;try{return S($)===Ta.documentFragment}catch{return!1}},oA=function($){if(!S||typeof $!="object"||$===null)return!1;try{return typeof S($)=="number"}catch{return!1}};function Ei($,kt,Pt){Fd($,Fe=>{Fe.call(t,kt,Pt,Fn)})}const Ba=function($){let kt=null;if(Ei(R.beforeSanitizeElements,$,null),kn($))return Xn($),!0;const Pt=qt($.nodeName);if(Ei(R.uponSanitizeElement,$,{tagName:Pt,allowedTags:X}),fe&&$.hasChildNodes()&&!oA($.firstElementChild)&&fn(/<[/\w!]/g,$.innerHTML)&&fn(/<[/\w!]/g,$.textContent)||fe&&$.namespaceURI===Ne&&Pt==="style"&&oA($.firstElementChild)||$.nodeType===Ta.progressingInstruction||fe&&$.nodeType===Ta.comment&&fn(/<[/\w]/g,$.data))return Xn($),!0;if(vt[Pt]||!(St.tagCheck instanceof Function&&St.tagCheck(Pt))&&!X[Pt]){if(!vt[Pt]&&fo(Pt)&&(gt.tagNameCheck instanceof RegExp&&fn(gt.tagNameCheck,Pt)||gt.tagNameCheck instanceof Function&>.tagNameCheck(Pt)))return!1;if(Kt&&!ne[Pt]){const Fe=w($),Re=y($);if(Re&&Fe){const Je=Re.length;for(let ws=Je-1;ws>=0;--ws){const Yn=d(Re[ws],!0);Fe.insertBefore(Yn,m($))}}}return Xn($),!0}return(S?S($):$.nodeType)===Ta.element&&!Hi($)||(Pt==="noscript"||Pt==="noembed"||Pt==="noframes")&&fn(/<\/no(script|embed|frames)/i,$.innerHTML)?(Xn($),!0):(Mt&&$.nodeType===Ta.text&&(kt=$.textContent,Fd([tt,et,st],Fe=>{kt=Ed(kt,Fe," ")}),$.textContent!==kt&&(Sd(t.removed,{element:$.cloneNode()}),$.textContent=kt)),Ei(R.afterSanitizeElements,$,null),!1)},uo=function($,kt,Pt){if(yt[kt]||xt&&(kt==="id"||kt==="name")&&(Pt in e||Pt in RA))return!1;const Fe=it[kt]||St.attributeCheck instanceof Function&&St.attributeCheck(kt,$);if(!(Tt&&!yt[kt]&&fn(nt,kt))&&!(Dt&&fn(at,kt))){if(!Fe||yt[kt]){if(!(fo($)&&(gt.tagNameCheck instanceof RegExp&&fn(gt.tagNameCheck,$)||gt.tagNameCheck instanceof Function&>.tagNameCheck($))&&(gt.attributeNameCheck instanceof RegExp&&fn(gt.attributeNameCheck,kt)||gt.attributeNameCheck instanceof Function&>.attributeNameCheck(kt,$))||kt==="is"&>.allowCustomizedBuiltInElements&&(gt.tagNameCheck instanceof RegExp&&fn(gt.tagNameCheck,Pt)||gt.tagNameCheck instanceof Function&>.tagNameCheck(Pt))))return!1}else if(!be[kt]&&!fn(G,Ed(Pt,ht,""))&&!((kt==="src"||kt==="xlink:href"||kt==="href")&&$!=="script"&&qI(Pt,"data:")===0&&Ve[$])&&!(jt&&!fn(ft,Ed(Pt,ht,"")))&&Pt)return!1}return!0},Cl=Oe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),fo=function($){return!Cl[Vm($)]&&fn(M,$)},zu=function($){Ei(R.beforeSanitizeAttributes,$,null);const kt=$.attributes;if(!kt||kn($))return;const Pt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:it,forceKeepAttr:void 0};let Fe=kt.length;for(;Fe--;){const Re=kt[Fe],Je=Re.name,ws=Re.namespaceURI,Yn=Re.value,$r=qt(Je),Ps=Yn;let Zr=Je==="value"?Ps:NX(Ps);if(Pt.attrName=$r,Pt.attrValue=Zr,Pt.keepAttr=!0,Pt.forceKeepAttr=void 0,Ei(R.uponSanitizeAttribute,$,Pt),Zr=Pt.attrValue,Rt&&($r==="id"||$r==="name")&&qI(Zr,Ht)!==0&&(En(Je,$),Zr=Ht+Zr),fe&&fn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zr)){En(Je,$);continue}if($r==="attributename"&&zI(Zr,"href")){En(Je,$);continue}if(Pt.forceKeepAttr)continue;if(!Pt.keepAttr){En(Je,$);continue}if(!q&&fn(/\/>/i,Zr)){En(Je,$);continue}Mt&&Fd([tt,et,st],qu=>{Zr=Ed(Zr,qu," ")});const jr=qt($.nodeName);if(!uo(jr,$r,Zr)){En(Je,$);continue}if(I&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!ws)switch(u.getAttributeType(jr,$r)){case"TrustedHTML":{Zr=I.createHTML(Zr);break}case"TrustedScriptURL":{Zr=I.createScriptURL(Zr);break}}if(Zr!==Ps)try{ws?$.setAttributeNS(ws,Je,Zr):$.setAttribute(Je,Zr),kn($)?Xn($):GI(t.removed)}catch{En(Je,$)}}Ei(R.afterSanitizeAttributes,$,null)},Ca=function($){let kt=null;const Pt=Ns($);for(Ei(R.beforeSanitizeShadowDOM,$,null);kt=Pt.nextNode();)if(Ei(R.uponSanitizeShadowNode,kt,null),Ba(kt),zu(kt),Zi(kt.content)&&Ca(kt.content),(S?S(kt):kt.nodeType)===Ta.element){const Fe=b?b(kt):kt.shadowRoot;Zi(Fe)&&(HA(Fe),Ca(Fe))}Ei(R.afterSanitizeShadowDOM,$,null)},HA=function($){const kt=S?S($):$.nodeType;if(kt===Ta.element){const Re=b?b($):$.shadowRoot;Zi(Re)&&(HA(Re),Ca(Re))}const Pt=y?y($):$.childNodes;if(!Pt)return;const Fe=[];Fd(Pt,Re=>{Sd(Fe,Re)});for(const Re of Fe)HA(Re);if(kt===Ta.element){const Re=k?k($):null;if(typeof Re=="string"&&qt(Re)==="template"){const Je=$.content;Zi(Je)&&HA(Je)}}};return t.sanitize=function($){let kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=null,Fe=null,Re=null,Je=null;if(ye=!$,ye&&($="<!-->"),typeof $!="string"&&!oA($)&&($=HX($),typeof $!="string"))throw dg("dirty is not a string, aborting");if(!t.isSupported)return $;if(Et||Sn(kt),t.removed=[],typeof $=="string"&&(te=!1),te){const $r=k?k($):$.nodeName;if(typeof $r=="string"){const Ps=qt($r);if(!X[Ps]||vt[Ps])throw dg("root node is forbidden and cannot be sanitized in-place")}if(kn($))throw dg("root node is clobbered and cannot be sanitized in-place");HA($)}else if(oA($))Pt=gs("<!---->"),Fe=Pt.ownerDocument.importNode($,!0),Fe.nodeType===Ta.element&&Fe.nodeName==="BODY"||Fe.nodeName==="HTML"?Pt=Fe:Pt.appendChild(Fe),HA(Fe);else{if(!Ot&&!Mt&&!Zt&&$.indexOf("<")===-1)return I&&Yt?I.createHTML($):$;if(Pt=gs($),!Pt)return Ot?null:Yt?N:""}Pt&&re&&Xn(Pt.firstChild);const ws=Ns(te?$:Pt);for(;Re=ws.nextNode();)Ba(Re),zu(Re),Zi(Re.content)&&Ca(Re.content);if(te)return Mt&&ms($),$;if(Ot){if(Mt&&ms(Pt),zt)for(Je=L.call(Pt.ownerDocument);Pt.firstChild;)Je.appendChild(Pt.firstChild);else Je=Pt;return(it.shadowroot||it.shadowrootmode)&&(Je=W.call(r,Je,!0)),Je}let Yn=Zt?Pt.outerHTML:Pt.innerHTML;return Zt&&X["!doctype"]&&Pt.ownerDocument&&Pt.ownerDocument.doctype&&Pt.ownerDocument.doctype.name&&fn(ZX,Pt.ownerDocument.doctype.name)&&(Yn="<!DOCTYPE "+Pt.ownerDocument.doctype.name+`>
|
|
295
|
-
`+Yn),Mt&&Fd([tt,et,st],$r=>{Yn=Ed(Yn,$r," ")}),I&&Yt?I.createHTML(Yn):Yn},t.setConfig=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sn($),Et=!0},t.clearConfig=function(){Fn=null,Et=!1},t.isValidAttribute=function($,kt,Pt){Fn||Sn({});const Fe=qt($),Re=qt(kt);return uo(Fe,Re,Pt)},t.addHook=function($,kt){typeof kt=="function"&&Sd(R[$],kt)},t.removeHook=function($,kt){if(kt!==void 0){const Pt=MX(R[$],kt);return Pt===-1?void 0:TX(R[$],Pt,1)[0]}return GI(R[$])},t.removeHooks=function($){R[$]=[]},t.removeAllHooks=function(){R=rQ()},t}var rY=$D();const iY=Object.freeze(Object.defineProperty({__proto__:null,default:rY},Symbol.toStringTag,{value:"Module"}));var nY={},iQ={},fg,nQ;function Wr(){if(nQ)return fg;nQ=1;var i=function(t){return t&&t.Math===Math&&t};return fg=i(typeof globalThis=="object"&&globalThis)||i(typeof window=="object"&&window)||i(typeof self=="object"&&self)||i(typeof sF=="object"&&sF)||i(typeof fg=="object"&&fg)||(function(){return this})()||Function("return this")(),fg}var S5={},sQ,AQ;function Ai(){return AQ||(AQ=1,sQ=function(i){try{return!!i()}catch{return!0}}),sQ}var E5,aQ;function va(){if(aQ)return E5;aQ=1;var i=Ai();return E5=!i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),E5}var k5,oQ;function hb(){if(oQ)return k5;oQ=1;var i=Ai();return k5=!i(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),k5}var U5,lQ;function xn(){if(lQ)return U5;lQ=1;var i=hb(),t=Function.prototype.call;return U5=i?t.bind(t):function(){return t.apply(t,arguments)},U5}var I5={},hQ;function sY(){if(hQ)return I5;hQ=1;var i={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,e=t&&!i.call({1:2},1);return I5.f=e?function(r){var n=t(this,r);return!!n&&n.enumerable}:i,I5}var cQ,uQ;function sE(){return uQ||(uQ=1,cQ=function(i,t){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:t}}),cQ}var Q5,dQ;function ai(){if(dQ)return Q5;dQ=1;var i=hb(),t=Function.prototype,e=t.call,r=i&&t.bind.bind(e,e);return Q5=i?r:function(n){return function(){return e.apply(n,arguments)}},Q5}var L5,fQ;function Wu(){if(fQ)return L5;fQ=1;var i=ai(),t=i({}.toString),e=i("".slice);return L5=function(r){return e(t(r),8,-1)},L5}var _5,pQ;function ZD(){if(pQ)return _5;pQ=1;var i=ai(),t=Ai(),e=Wu(),r=Object,n=i("".split);return _5=t(function(){return!r("z").propertyIsEnumerable(0)})?function(s){return e(s)==="String"?n(s,""):r(s)}:r,_5}var gQ,mQ;function cb(){return mQ||(mQ=1,gQ=function(i){return i==null}),gQ}var M5,wQ;function ya(){if(wQ)return M5;wQ=1;var i=cb(),t=TypeError;return M5=function(e){if(i(e))throw new t("Can't call method on "+e);return e},M5}var T5,vQ;function e1(){if(vQ)return T5;vQ=1;var i=ZD(),t=ya();return T5=function(e){return i(t(e))},T5}var N5,yQ;function Si(){if(yQ)return N5;yQ=1;var i=typeof document=="object"&&document.all;return N5=typeof i>"u"&&i!==void 0?function(t){return typeof t=="function"||t===i}:function(t){return typeof t=="function"},N5}var P5,bQ;function Ts(){if(bQ)return P5;bQ=1;var i=Si();return P5=function(t){return typeof t=="object"?t!==null:i(t)},P5}var D5,BQ;function ju(){if(BQ)return D5;BQ=1;var i=Wr(),t=Si(),e=function(r){return t(r)?r:void 0};return D5=function(r,n){return arguments.length<2?e(i[r]):i[r]&&i[r][n]},D5}var O5,CQ;function ub(){if(CQ)return O5;CQ=1;var i=ai();return O5=i({}.isPrototypeOf),O5}var R5,xQ;function r1(){if(xQ)return R5;xQ=1;var i=Wr(),t=i.navigator,e=t&&t.userAgent;return R5=e?String(e):"",R5}var H5,FQ;function AE(){if(FQ)return H5;FQ=1;var i=Wr(),t=r1(),e=i.process,r=i.Deno,n=e&&e.versions||r&&r.version,s=n&&n.v8,A,a;return s&&(A=s.split("."),a=A[0]>0&&A[0]<4?1:+(A[0]+A[1])),!a&&t&&(A=t.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=t.match(/Chrome\/(\d+)/),A&&(a=+A[1]))),H5=a,H5}var V5,SQ;function JD(){if(SQ)return V5;SQ=1;var i=AE(),t=Ai(),e=Wr(),r=e.String;return V5=!!Object.getOwnPropertySymbols&&!t(function(){var n=Symbol("symbol detection");return!r(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&i&&i<41}),V5}var W5,EQ;function tO(){if(EQ)return W5;EQ=1;var i=JD();return W5=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol",W5}var j5,kQ;function eO(){if(kQ)return j5;kQ=1;var i=ju(),t=Si(),e=ub(),r=tO(),n=Object;return j5=r?function(s){return typeof s=="symbol"}:function(s){var A=i("Symbol");return t(A)&&e(A.prototype,n(s))},j5}var K5,UQ;function db(){if(UQ)return K5;UQ=1;var i=String;return K5=function(t){try{return i(t)}catch{return"Object"}},K5}var G5,IQ;function Bl(){if(IQ)return G5;IQ=1;var i=Si(),t=db(),e=TypeError;return G5=function(r){if(i(r))return r;throw new e(t(r)+" is not a function")},G5}var z5,QQ;function kp(){if(QQ)return z5;QQ=1;var i=Bl(),t=cb();return z5=function(e,r){var n=e[r];return t(n)?void 0:i(n)},z5}var q5,LQ;function AY(){if(LQ)return q5;LQ=1;var i=xn(),t=Si(),e=Ts(),r=TypeError;return q5=function(n,s){var A,a;if(s==="string"&&t(A=n.toString)&&!e(a=i(A,n))||t(A=n.valueOf)&&!e(a=i(A,n))||s!=="string"&&t(A=n.toString)&&!e(a=i(A,n)))return a;throw new r("Can't convert object to primitive value")},q5}var X5={exports:{}},_Q,MQ;function lo(){return MQ||(MQ=1,_Q=!1),_Q}var Y5,TQ;function aE(){if(TQ)return Y5;TQ=1;var i=Wr(),t=Object.defineProperty;return Y5=function(e,r){try{t(i,e,{value:r,configurable:!0,writable:!0})}catch{i[e]=r}return r},Y5}var NQ;function oE(){if(NQ)return X5.exports;NQ=1;var i=lo(),t=Wr(),e=aE(),r="__core-js_shared__",n=X5.exports=t[r]||e(r,{});return(n.versions||(n.versions=[])).push({version:"3.49.0",mode:i?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),X5.exports}var $5,PQ;function lE(){if(PQ)return $5;PQ=1;var i=oE();return $5=function(t,e){return i[t]||(i[t]=e||{})},$5}var Z5,DQ;function fb(){if(DQ)return Z5;DQ=1;var i=ya(),t=Object;return Z5=function(e){return t(i(e))},Z5}var J5,OQ;function ba(){if(OQ)return J5;OQ=1;var i=ai(),t=fb(),e=i({}.hasOwnProperty);return J5=Object.hasOwn||function(r,n){return e(t(r),n)},J5}var tC,RQ;function rO(){if(RQ)return tC;RQ=1;var i=ai(),t=0,e=Math.random(),r=i(1.1.toString);return tC=function(n){return"Symbol("+(n===void 0?"":n)+")_"+r(++t+e,36)},tC}var eC,HQ;function nn(){if(HQ)return eC;HQ=1;var i=Wr(),t=lE(),e=ba(),r=rO(),n=JD(),s=tO(),A=i.Symbol,a=t("wks"),o=s?A.for||A:A&&A.withoutSetter||r;return eC=function(l){return e(a,l)||(a[l]=n&&e(A,l)?A[l]:o("Symbol."+l)),a[l]},eC}var rC,VQ;function aY(){if(VQ)return rC;VQ=1;var i=xn(),t=Ts(),e=eO(),r=kp(),n=AY(),s=nn(),A=TypeError,a=s("toPrimitive");return rC=function(o,l){if(!t(o)||e(o))return o;var h=r(o,a),u;if(h){if(l===void 0&&(l="default"),u=i(h,o,l),!t(u)||e(u))return u;throw new A("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(o,l)},rC}var iC,WQ;function iO(){if(WQ)return iC;WQ=1;var i=aY(),t=eO();return iC=function(e){var r=i(e,"string");return t(r)?r:r+""},iC}var nC,jQ;function pb(){if(jQ)return nC;jQ=1;var i=Wr(),t=Ts(),e=i.document,r=t(e)&&t(e.createElement);return nC=function(n){return r?e.createElement(n):{}},nC}var sC,KQ;function nO(){if(KQ)return sC;KQ=1;var i=va(),t=Ai(),e=pb();return sC=!i&&!t(function(){return Object.defineProperty(e("div"),"a",{get:function(){return 7}}).a!==7}),sC}var GQ;function gb(){if(GQ)return S5;GQ=1;var i=va(),t=xn(),e=sY(),r=sE(),n=e1(),s=iO(),A=ba(),a=nO(),o=Object.getOwnPropertyDescriptor;return S5.f=i?o:function(l,h){if(l=n(l),h=s(h),a)try{return o(l,h)}catch{}if(A(l,h))return r(!t(e.f,l,h),l[h])},S5}var AC={},aC,zQ;function sO(){if(zQ)return aC;zQ=1;var i=va(),t=Ai();return aC=i&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),aC}var oC,qQ;function fs(){if(qQ)return oC;qQ=1;var i=Ts(),t=String,e=TypeError;return oC=function(r){if(i(r))return r;throw new e(t(r)+" is not an object")},oC}var XQ;function qh(){if(XQ)return AC;XQ=1;var i=va(),t=nO(),e=sO(),r=fs(),n=iO(),s=TypeError,A=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o="enumerable",l="configurable",h="writable";return AC.f=i?e?function(u,f,d){if(r(u),f=n(f),r(d),typeof u=="function"&&f==="prototype"&&"value"in d&&h in d&&!d[h]){var g=a(u,f);g&&g[h]&&(u[f]=d.value,d={configurable:l in d?d[l]:g[l],enumerable:o in d?d[o]:g[o],writable:!1})}return A(u,f,d)}:A:function(u,f,d){if(r(u),f=n(f),r(d),t)try{return A(u,f,d)}catch{}if("get"in d||"set"in d)throw new s("Accessors not supported");return"value"in d&&(u[f]=d.value),u},AC}var lC,YQ;function i1(){if(YQ)return lC;YQ=1;var i=va(),t=qh(),e=sE();return lC=i?function(r,n,s){return t.f(r,n,e(1,s))}:function(r,n,s){return r[n]=s,r},lC}var hC={exports:{}},cC,$Q;function mb(){if($Q)return cC;$Q=1;var i=va(),t=ba(),e=Function.prototype,r=i&&Object.getOwnPropertyDescriptor,n=t(e,"name"),s=n&&(function(){}).name==="something",A=n&&(!i||i&&r(e,"name").configurable);return cC={EXISTS:n,PROPER:s,CONFIGURABLE:A},cC}var uC,ZQ;function hE(){if(ZQ)return uC;ZQ=1;var i=ai(),t=Si(),e=oE(),r=i(Function.toString);return t(e.inspectSource)||(e.inspectSource=function(n){return r(n)}),uC=e.inspectSource,uC}var dC,JQ;function oY(){if(JQ)return dC;JQ=1;var i=Wr(),t=Si(),e=i.WeakMap;return dC=t(e)&&/native code/.test(String(e)),dC}var fC,tL;function cE(){if(tL)return fC;tL=1;var i=lE(),t=rO(),e=i("keys");return fC=function(r){return e[r]||(e[r]=t(r))},fC}var eL,rL;function uE(){return rL||(rL=1,eL={}),eL}var pC,iL;function wb(){if(iL)return pC;iL=1;var i=oY(),t=Wr(),e=Ts(),r=i1(),n=ba(),s=oE(),A=cE(),a=uE(),o="Object already initialized",l=t.TypeError,h=t.WeakMap,u,f,d,g=function(b){return d(b)?f(b):u(b,{})},m=function(b){return function(C){var S;if(!e(C)||(S=f(C)).type!==b)throw new l("Incompatible receiver, "+b+" required");return S}};if(i||s.state){var y=s.state||(s.state=new h);y.get=y.get,y.has=y.has,y.set=y.set,u=function(b,C){if(y.has(b))throw new l(o);return C.facade=b,y.set(b,C),C},f=function(b){return y.get(b)||{}},d=function(b){return y.has(b)}}else{var w=A("state");a[w]=!0,u=function(b,C){if(n(b,w))throw new l(o);return C.facade=b,r(b,w,C),C},f=function(b){return n(b,w)?b[w]:{}},d=function(b){return n(b,w)}}return pC={set:u,get:f,has:d,enforce:g,getterFor:m},pC}var nL;function AO(){if(nL)return hC.exports;nL=1;var i=ai(),t=Ai(),e=Si(),r=ba(),n=va(),s=mb().CONFIGURABLE,A=hE(),a=wb(),o=a.enforce,l=a.get,h=String,u=Object.defineProperty,f=i("".slice),d=i("".replace),g=i([].join),m=n&&!t(function(){return u(function(){},"length",{value:8}).length!==8}),y=String(String).split("String"),w=hC.exports=function(b,C,S){f(h(C),0,7)==="Symbol("&&(C="["+d(h(C),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(C="get "+C),S&&S.setter&&(C="set "+C),(!r(b,"name")||s&&b.name!==C)&&(n?u(b,"name",{value:C,configurable:!0}):b.name=C),m&&S&&r(S,"arity")&&b.length!==S.arity&&u(b,"length",{value:S.arity});try{S&&r(S,"constructor")&&S.constructor?n&&u(b,"prototype",{writable:!1}):b.prototype&&(b.prototype=void 0)}catch{}var k=o(b);return r(k,"source")||(k.source=g(y,typeof C=="string"?C:"")),b};return Function.prototype.toString=w(function(){return e(this)&&l(this).source||A(this)},"toString"),hC.exports}var gC,sL;function Ku(){if(sL)return gC;sL=1;var i=Si(),t=qh(),e=AO(),r=aE();return gC=function(n,s,A,a){a||(a={});var o=a.enumerable,l=a.name!==void 0?a.name:s;if(i(A)&&e(A,l,a),a.global)o?n[s]=A:r(s,A);else{try{a.unsafe?n[s]&&(o=!0):delete n[s]}catch{}o?n[s]=A:t.f(n,s,{value:A,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return n},gC}var mC={},wC,AL;function lY(){if(AL)return wC;AL=1;var i=Math.ceil,t=Math.floor;return wC=Math.trunc||function(e){var r=+e;return(r>0?t:i)(r)},wC}var vC,aL;function vb(){if(aL)return vC;aL=1;var i=lY();return vC=function(t){var e=+t;return e!==e||e===0?0:i(e)},vC}var yC,oL;function hY(){if(oL)return yC;oL=1;var i=vb(),t=Math.max,e=Math.min;return yC=function(r,n){var s=i(r);return s<0?t(s+n,0):e(s,n)},yC}var bC,lL;function Up(){if(lL)return bC;lL=1;var i=vb(),t=Math.min;return bC=function(e){var r=i(e);return r>0?t(r,9007199254740991):0},bC}var BC,hL;function dE(){if(hL)return BC;hL=1;var i=Up();return BC=function(t){return i(t.length)},BC}var CC,cL;function aO(){if(cL)return CC;cL=1;var i=e1(),t=hY(),e=dE(),r=function(n){return function(s,A,a){var o=i(s),l=e(o);if(l===0)return!n&&-1;var h=t(a,l),u;if(n&&A!==A){for(;l>h;)if(u=o[h++],u!==u)return!0}else for(;l>h;h++)if((n||h in o)&&o[h]===A)return n||h||0;return!n&&-1}};return CC={includes:r(!0),indexOf:r(!1)},CC}var xC,uL;function oO(){if(uL)return xC;uL=1;var i=ai(),t=ba(),e=e1(),r=aO().indexOf,n=uE(),s=i([].push);return xC=function(A,a){var o=e(A),l=0,h=[],u;for(u in o)!t(n,u)&&t(o,u)&&s(h,u);for(;a.length>l;)t(o,u=a[l++])&&(~r(h,u)||s(h,u));return h},xC}var dL,fL;function fE(){return fL||(fL=1,dL=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),dL}var pL;function cY(){if(pL)return mC;pL=1;var i=oO(),t=fE(),e=t.concat("length","prototype");return mC.f=Object.getOwnPropertyNames||function(r){return i(r,e)},mC}var gL={},mL;function uY(){return mL||(mL=1,gL.f=Object.getOwnPropertySymbols),gL}var FC,wL;function dY(){if(wL)return FC;wL=1;var i=ju(),t=ai(),e=cY(),r=uY(),n=fs(),s=t([].concat);return FC=i("Reflect","ownKeys")||function(A){var a=e.f(n(A)),o=r.f;return o?s(a,o(A)):a},FC}var SC,vL;function fY(){if(vL)return SC;vL=1;var i=ba(),t=dY(),e=gb(),r=qh();return SC=function(n,s,A){for(var a=t(s),o=r.f,l=e.f,h=0;h<a.length;h++){var u=a[h];!i(n,u)&&!(A&&i(A,u))&&o(n,u,l(s,u))}},SC}var EC,yL;function lO(){if(yL)return EC;yL=1;var i=Ai(),t=Si(),e=/#|\.prototype\./,r=function(o,l){var h=s[n(o)];return h===a?!0:h===A?!1:t(l)?i(l):!!l},n=r.normalize=function(o){return String(o).replace(e,".").toLowerCase()},s=r.data={},A=r.NATIVE="N",a=r.POLYFILL="P";return EC=r,EC}var kC,bL;function ps(){if(bL)return kC;bL=1;var i=Wr(),t=gb().f,e=i1(),r=Ku(),n=aE(),s=fY(),A=lO();return kC=function(a,o){var l=a.target,h=a.global,u=a.stat,f,d,g,m,y,w;if(h?d=i:u?d=i[l]||n(l,{}):d=i[l]&&i[l].prototype,d)for(g in o){if(y=o[g],a.dontCallGetSet?(w=t(d,g),m=w&&w.value):m=d[g],f=A(h?g:l+(u?".":"#")+g,a.forced),!f&&m!==void 0){if(typeof y==typeof m)continue;s(y,m)}(a.sham||m&&m.sham)&&e(y,"sham",!0),r(d,g,y,a)}},kC}var UC,BL;function hO(){if(BL)return UC;BL=1;var i=Wr(),t=r1(),e=Wu(),r=function(n){return t.slice(0,n.length)===n};return UC=(function(){return r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":i.Bun&&typeof Bun.version=="string"?"BUN":i.Deno&&typeof Deno.version=="object"?"DENO":e(i.process)==="process"?"NODE":i.window&&i.document?"BROWSER":"REST"})(),UC}var IC,CL;function yb(){if(CL)return IC;CL=1;var i=hO();return IC=i==="NODE",IC}var QC,xL;function pY(){if(xL)return QC;xL=1;var i=Wr();return QC=i,QC}var LC,FL;function gY(){if(FL)return LC;FL=1;var i=ai(),t=Bl();return LC=function(e,r,n){try{return i(t(Object.getOwnPropertyDescriptor(e,r)[n]))}catch{}},LC}var _C,SL;function mY(){if(SL)return _C;SL=1;var i=Ts();return _C=function(t){return i(t)||t===null},_C}var MC,EL;function wY(){if(EL)return MC;EL=1;var i=mY(),t=String,e=TypeError;return MC=function(r){if(i(r))return r;throw new e("Can't set "+t(r)+" as a prototype")},MC}var TC,kL;function cO(){if(kL)return TC;kL=1;var i=gY(),t=Ts(),e=ya(),r=wY();return TC=Object.setPrototypeOf||("__proto__"in{}?(function(){var n=!1,s={},A;try{A=i(Object.prototype,"__proto__","set"),A(s,[]),n=s instanceof Array}catch{}return function(a,o){return e(a),r(o),t(a)&&(n?A(a,o):a.__proto__=o),a}})():void 0),TC}var NC,UL;function bb(){if(UL)return NC;UL=1;var i=qh().f,t=ba(),e=nn(),r=e("toStringTag");return NC=function(n,s,A){n&&!A&&(n=n.prototype),n&&!t(n,r)&&i(n,r,{configurable:!0,value:s})},NC}var PC,IL;function vY(){if(IL)return PC;IL=1;var i=AO(),t=qh();return PC=function(e,r,n){return n.get&&i(n.get,r,{getter:!0}),n.set&&i(n.set,r,{setter:!0}),t.f(e,r,n)},PC}var DC,QL;function yY(){if(QL)return DC;QL=1;var i=ju(),t=vY(),e=nn(),r=va(),n=e("species");return DC=function(s){var A=i(s);r&&A&&!A[n]&&t(A,n,{configurable:!0,get:function(){return this}})},DC}var OC,LL;function bY(){if(LL)return OC;LL=1;var i=ub(),t=TypeError;return OC=function(e,r){if(i(r,e))return e;throw new t("Incorrect invocation")},OC}var RC,_L;function BY(){if(_L)return RC;_L=1;var i=nn(),t=i("toStringTag"),e={};return e[t]="z",RC=String(e)==="[object z]",RC}var HC,ML;function pE(){if(ML)return HC;ML=1;var i=BY(),t=Si(),e=Wu(),r=nn(),n=r("toStringTag"),s=Object,A=e((function(){return arguments})())==="Arguments",a=function(o,l){try{return o[l]}catch{}};return HC=i?e:function(o){var l,h,u;return o===void 0?"Undefined":o===null?"Null":typeof(h=a(l=s(o),n))=="string"?h:A?e(l):(u=e(l))==="Object"&&t(l.callee)?"Arguments":u},HC}var VC,TL;function CY(){if(TL)return VC;TL=1;var i=ai(),t=Ai(),e=Si(),r=pE(),n=ju(),s=hE(),A=function(){},a=n("Reflect","construct"),o=/^\s*(?:class|function)\b/,l=i(o.exec),h=!o.test(A),u=function(d){if(!e(d))return!1;try{return a(A,[],d),!0}catch{return!1}},f=function(d){if(!e(d))return!1;switch(r(d)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!l(o,s(d))}catch{return!0}};return f.sham=!0,VC=!a||t(function(){var d;return u(u.call)||!u(Object)||!u(function(){d=!0})||d})?f:u,VC}var WC,NL;function xY(){if(NL)return WC;NL=1;var i=CY(),t=db(),e=TypeError;return WC=function(r){if(i(r))return r;throw new e(t(r)+" is not a constructor")},WC}var jC,PL;function uO(){if(PL)return jC;PL=1;var i=fs(),t=xY(),e=cb(),r=nn(),n=r("species");return jC=function(s,A){var a=i(s).constructor,o;return a===void 0||e(o=i(a)[n])?A:t(o)},jC}var KC,DL;function dO(){if(DL)return KC;DL=1;var i=hb(),t=Function.prototype,e=t.apply,r=t.call;return KC=typeof Reflect=="object"&&Reflect.apply||(i?r.bind(e):function(){return r.apply(e,arguments)}),KC}var GC,OL;function Bb(){if(OL)return GC;OL=1;var i=Wu(),t=ai();return GC=function(e){if(i(e)==="Function")return t(e)},GC}var zC,RL;function gE(){if(RL)return zC;RL=1;var i=Bb(),t=Bl(),e=hb(),r=i(i.bind);return zC=function(n,s){return t(n),s===void 0?n:e?r(n,s):function(){return n.apply(s,arguments)}},zC}var qC,HL;function fO(){if(HL)return qC;HL=1;var i=ju();return qC=i("document","documentElement"),qC}var XC,VL;function FY(){if(VL)return XC;VL=1;var i=ai();return XC=i([].slice),XC}var YC,WL;function SY(){if(WL)return YC;WL=1;var i=TypeError;return YC=function(t,e){if(t<e)throw new i("Not enough arguments");return t},YC}var $C,jL;function pO(){if(jL)return $C;jL=1;var i=r1();return $C=/ipad|iphone|ipod/i.test(i)&&/applewebkit/i.test(i),$C}var ZC,KL;function gO(){if(KL)return ZC;KL=1;var i=Wr(),t=dO(),e=gE(),r=Si(),n=ba(),s=Ai(),A=fO(),a=FY(),o=pb(),l=SY(),h=pO(),u=yb(),f=i.setImmediate,d=i.clearImmediate,g=i.process,m=i.Dispatch,y=i.Function,w=i.MessageChannel,b=i.String,C=0,S={},k="onreadystatechange",I,N,D,Q;s(function(){I=i.location});var K=function(R){if(n(S,R)){var tt=S[R];delete S[R],tt()}},L=function(R){return function(){K(R)}},O=function(R){K(R.data)},W=function(R){i.postMessage(b(R),I.protocol+"//"+I.host)};return(!f||!d)&&(f=function(R){l(arguments.length,1);var tt=r(R)?R:y(R),et=a(arguments,1);return S[++C]=function(){t(tt,void 0,et)},N(C),C},d=function(R){delete S[R]},u?N=function(R){g.nextTick(L(R))}:m&&m.now?N=function(R){m.now(L(R))}:w&&!h?(D=new w,Q=D.port2,D.port1.onmessage=O,N=e(Q.postMessage,Q)):i.addEventListener&&r(i.postMessage)&&!i.importScripts&&I&&I.protocol!=="file:"&&!s(W)?(N=W,i.addEventListener("message",O,!1)):k in o("script")?N=function(R){A.appendChild(o("script"))[k]=function(){A.removeChild(this),K(R)}}:N=function(R){setTimeout(L(R),0)}),ZC={set:f,clear:d},ZC}var JC,GL;function EY(){if(GL)return JC;GL=1;var i=Wr(),t=va(),e=Object.getOwnPropertyDescriptor;return JC=function(r){if(!t)return i[r];var n=e(i,r);return n&&n.value},JC}var tx,zL;function mO(){if(zL)return tx;zL=1;var i=function(){this.head=null,this.tail=null};return i.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}},tx=i,tx}var ex,qL;function kY(){if(qL)return ex;qL=1;var i=r1();return ex=/ipad|iphone|ipod/i.test(i)&&typeof Pebble<"u",ex}var rx,XL;function UY(){if(XL)return rx;XL=1;var i=r1();return rx=/web0s(?!.*chrome)/i.test(i),rx}var ix,YL;function IY(){if(YL)return ix;YL=1;var i=Wr(),t=EY(),e=gE(),r=gO().set,n=mO(),s=pO(),A=kY(),a=UY(),o=yb(),l=i.MutationObserver||i.WebKitMutationObserver,h=i.document,u=i.process,f=i.Promise,d=t("queueMicrotask"),g,m,y,w,b;if(!d){var C=new n,S=function(){var k,I;for(o&&(k=u.domain)&&k.exit();I=C.get();)try{I()}catch(N){throw C.head&&g(),N}k&&k.enter()};!s&&!o&&!a&&l&&h?(m=!0,y=h.createTextNode(""),new l(S).observe(y,{characterData:!0}),g=function(){y.data=m=!m}):!A&&f&&f.resolve?(w=f.resolve(void 0),w.constructor=f,b=e(w.then,w),g=function(){b(S)}):o?g=function(){u.nextTick(S)}:(r=e(r,i),g=function(){r(S)}),d=function(k){C.head||g(),C.add(k)}}return ix=d,ix}var $L,ZL;function QY(){return ZL||(ZL=1,$L=function(i,t){try{arguments.length===1?console.error(i):console.error(i,t)}catch{}}),$L}var JL,t_;function mE(){return t_||(t_=1,JL=function(i){try{return{error:!1,value:i()}}catch(t){return{error:!0,value:t}}}),JL}var nx,e_;function n1(){if(e_)return nx;e_=1;var i=Wr();return nx=i.Promise,nx}var sx,r_;function s1(){if(r_)return sx;r_=1;var i=Wr(),t=n1(),e=Si(),r=lO(),n=hE(),s=nn(),A=hO(),a=lo(),o=AE(),l=t&&t.prototype,h=s("species"),u=!1,f=e(i.PromiseRejectionEvent),d=r("Promise",function(){var g=n(t),m=g!==String(t);if(!m&&o===66||a&&!(l.catch&&l.finally))return!0;if(!o||o<51||!/native code/.test(g)){var y=new t(function(C){C(1)}),w=function(C){C(function(){},function(){})},b=y.constructor={};if(b[h]=w,u=y.then(function(){})instanceof w,!u)return!0}return!m&&(A==="BROWSER"||A==="DENO")&&!f});return sx={CONSTRUCTOR:d,REJECTION_EVENT:f,SUBCLASSING:u},sx}var Ax={},i_;function A1(){if(i_)return Ax;i_=1;var i=Bl(),t=TypeError,e=function(r){var n,s;this.promise=new r(function(A,a){if(n!==void 0||s!==void 0)throw new t("Bad Promise constructor");n=A,s=a}),this.resolve=i(n),this.reject=i(s)};return Ax.f=function(r){return new e(r)},Ax}var n_;function LY(){if(n_)return iQ;n_=1;var i=ps(),t=lo(),e=yb(),r=Wr(),n=pY(),s=xn(),A=Ku(),a=cO(),o=bb(),l=yY(),h=Bl(),u=Si(),f=Ts(),d=bY(),g=uO(),m=gO().set,y=IY(),w=QY(),b=mE(),C=mO(),S=wb(),k=n1(),I=s1(),N=A1(),D="Promise",Q=I.CONSTRUCTOR,K=I.REJECTION_EVENT,L=I.SUBCLASSING,O=S.getterFor(D),W=S.set,R=k&&k.prototype,tt=k,et=R,st=r.TypeError,nt=r.document,at=r.process,ft=N.f,ht=ft,M=!!(nt&&nt.createEvent&&r.dispatchEvent),G="unhandledrejection",X="rejectionhandled",rt=0,it=1,ot=2,gt=1,vt=2,yt,St,Dt,Tt,jt=function(xt){var Rt;return f(xt)&&u(Rt=xt.then)?Rt:!1},q=function(xt,Rt){var Ht=Rt.value,Kt=Rt.state===it,te=Kt?xt.ok:xt.fail,Wt=xt.resolve,ne=xt.reject,Gt=xt.domain,Ve,Te,be;try{te?(Kt||(Rt.rejection===vt&&re(Rt),Rt.rejection=gt),te===!0?Ve=Ht:(Gt&&Gt.enter(),Ve=te(Ht),Gt&&(Gt.exit(),be=!0)),Ve===xt.promise?ne(new st("Promise-chain cycle")):(Te=jt(Ve))?s(Te,Ve,Wt,ne):Wt(Ve)):ne(Ht)}catch(Be){Gt&&!be&&Gt.exit(),ne(Be)}},Mt=function(xt,Rt){xt.notified||(xt.notified=!0,y(function(){for(var Ht=xt.reactions,Kt;Kt=Ht.get();)q(Kt,xt);xt.notified=!1,Rt&&!xt.rejection&&Zt(xt)}))},fe=function(xt,Rt,Ht){var Kt,te;M?(Kt=nt.createEvent("Event"),Kt.promise=Rt,Kt.reason=Ht,Kt.initEvent(xt,!1,!0),r.dispatchEvent(Kt)):Kt={promise:Rt,reason:Ht},!K&&(te=r["on"+xt])?te(Kt):xt===G&&w("Unhandled promise rejection",Ht)},Zt=function(xt){s(m,r,function(){var Rt=xt.facade,Ht=xt.value,Kt=Et(xt),te;if(Kt&&(te=b(function(){e?at.emit("unhandledRejection",Ht,Rt):fe(G,Rt,Ht)}),xt.rejection=e||Et(xt)?vt:gt,te.error))throw te.value})},Et=function(xt){return xt.rejection!==gt&&!xt.parent},re=function(xt){s(m,r,function(){var Rt=xt.facade;e?at.emit("rejectionHandled",Rt):fe(X,Rt,xt.value)})},Ot=function(xt,Rt,Ht){return function(Kt){xt(Rt,Kt,Ht)}},zt=function(xt,Rt,Ht){xt.done||(xt.done=!0,Ht&&(xt=Ht),xt.value=Rt,xt.state=ot,Mt(xt,!0))},Yt=function(xt,Rt,Ht){if(!xt.done){xt.done=!0,Ht&&(xt=Ht);try{if(xt.facade===Rt)throw new st("Promise can't be resolved itself");var Kt=jt(Rt);Kt?y(function(){var te={done:!1};try{s(Kt,Rt,Ot(Yt,te,xt),Ot(zt,te,xt))}catch(Wt){zt(te,Wt,xt)}}):(xt.value=Rt,xt.state=it,Mt(xt,!1))}catch(te){zt({done:!1},te,xt)}}};if(Q&&(tt=function(xt){d(this,et),h(xt),s(yt,this);var Rt=O(this);try{xt(Ot(Yt,Rt),Ot(zt,Rt))}catch(Ht){zt(Rt,Ht)}},et=tt.prototype,yt=function(xt){W(this,{type:D,done:!1,notified:!1,parent:!1,reactions:new C,rejection:!1,state:rt,value:null})},yt.prototype=A(et,"then",function(xt,Rt){var Ht=O(this),Kt=ft(g(this,tt));return Ht.parent=!0,Kt.ok=u(xt)?xt:!0,Kt.fail=u(Rt)&&Rt,Kt.domain=e?at.domain:void 0,Ht.state===rt?Ht.reactions.add(Kt):y(function(){q(Kt,Ht)}),Kt.promise}),St=function(){var xt=new yt,Rt=O(xt);this.promise=xt,this.resolve=Ot(Yt,Rt),this.reject=Ot(zt,Rt)},N.f=ft=function(xt){return xt===tt||xt===Dt?new St(xt):ht(xt)},!t&&u(k)&&R!==Object.prototype)){Tt=R.then,L||A(R,"then",function(xt,Rt){var Ht=this;return new tt(function(Kt,te){s(Tt,Ht,Kt,te)}).then(xt,Rt)},{unsafe:!0});try{delete R.constructor}catch{}a&&a(R,et)}return i({global:!0,constructor:!0,wrap:!0,forced:Q},{Promise:tt}),Dt=n.Promise,o(tt,D,!1,!0),l(D),iQ}var s_={},A_,a_;function a1(){return a_||(a_=1,A_={}),A_}var ax,o_;function _Y(){if(o_)return ax;o_=1;var i=nn(),t=a1(),e=i("iterator"),r=Array.prototype;return ax=function(n){return n!==void 0&&(t.Array===n||r[e]===n)},ax}var ox,l_;function wO(){if(l_)return ox;l_=1;var i=pE(),t=kp(),e=cb(),r=a1(),n=nn(),s=n("iterator");return ox=function(A){if(!e(A))return t(A,s)||t(A,"@@iterator")||r[i(A)]},ox}var lx,h_;function MY(){if(h_)return lx;h_=1;var i=xn(),t=Bl(),e=fs(),r=db(),n=wO(),s=TypeError;return lx=function(A,a){var o=arguments.length<2?n(A):a;if(t(o))return e(i(o,A));throw new s(r(A)+" is not iterable")},lx}var hx,c_;function TY(){if(c_)return hx;c_=1;var i=xn(),t=fs(),e=kp();return hx=function(r,n,s){var A,a;t(r);try{if(A=e(r,"return"),!A){if(n==="throw")throw s;return s}A=i(A,r)}catch(o){a=!0,A=o}if(n==="throw")throw s;if(a)throw A;return t(A),s},hx}var cx,u_;function vO(){if(u_)return cx;u_=1;var i=gE(),t=xn(),e=fs(),r=db(),n=_Y(),s=dE(),A=ub(),a=MY(),o=wO(),l=TY(),h=TypeError,u=function(d,g){this.stopped=d,this.result=g},f=u.prototype;return cx=function(d,g,m){var y=m&&m.that,w=!!(m&&m.AS_ENTRIES),b=!!(m&&m.IS_RECORD),C=!!(m&&m.IS_ITERATOR),S=!!(m&&m.INTERRUPTED),k=i(g,y),I,N,D,Q,K,L,O,W=function(et){var st=I;return I=void 0,st&&l(st,"normal"),new u(!0,et)},R=function(et){return w?(e(et),S?k(et[0],et[1],W):k(et[0],et[1])):S?k(et,W):k(et)};if(b)I=d.iterator;else if(C)I=d;else{if(N=o(d),!N)throw new h(r(d)+" is not iterable");if(n(N)){for(D=0,Q=s(d);Q>D;D++)if(K=R(d[D]),K&&A(f,K))return K;return new u(!1)}I=a(d,N)}for(L=b?d.next:I.next;!(O=t(L,I)).done;){var tt=O.value;try{K=R(tt)}catch(et){if(I)l(I,"throw",et);else throw et}if(typeof K=="object"&&K&&A(f,K))return K}return new u(!1)},cx}var ux,d_;function NY(){if(d_)return ux;d_=1;var i=nn(),t=i("iterator"),e=!1;try{var r=0,n={next:function(){return{done:!!r++}},return:function(){e=!0}};n[t]=function(){return this},Array.from(n,function(){throw 2})}catch{}return ux=function(s,A){try{if(!A&&!e)return!1}catch{return!1}var a=!1;try{var o={};o[t]=function(){return{next:function(){return{done:a=!0}}}},s(o)}catch{}return a},ux}var dx,f_;function yO(){if(f_)return dx;f_=1;var i=n1(),t=NY(),e=s1().CONSTRUCTOR;return dx=e||!t(function(r){i.all(r).then(void 0,function(){})}),dx}var p_;function PY(){if(p_)return s_;p_=1;var i=ps(),t=xn(),e=Bl(),r=A1(),n=mE(),s=vO(),A=yO();return i({target:"Promise",stat:!0,forced:A},{all:function(a){var o=this,l=r.f(o),h=l.resolve,u=l.reject,f=n(function(){var d=e(o.resolve),g=[],m=0,y=1;s(a,function(w){var b=m++,C=!1;y++,t(d,o,w).then(function(S){C||(C=!0,g[b]=S,--y||h(g))},u)}),--y||h(g)});return f.error&&u(f.value),l.promise}}),s_}var g_={},m_;function DY(){if(m_)return g_;m_=1;var i=ps(),t=lo(),e=s1().CONSTRUCTOR,r=n1(),n=ju(),s=Si(),A=Ku(),a=r&&r.prototype;if(i({target:"Promise",proto:!0,forced:e,real:!0},{catch:function(l){return this.then(void 0,l)}}),!t&&s(r)){var o=n("Promise").prototype.catch;a.catch!==o&&A(a,"catch",o,{unsafe:!0})}return g_}var w_={},v_;function OY(){if(v_)return w_;v_=1;var i=ps(),t=xn(),e=Bl(),r=A1(),n=mE(),s=vO(),A=yO();return i({target:"Promise",stat:!0,forced:A},{race:function(a){var o=this,l=r.f(o),h=l.reject,u=n(function(){var f=e(o.resolve);s(a,function(d){t(f,o,d).then(l.resolve,h)})});return u.error&&h(u.value),l.promise}}),w_}var y_={},b_;function RY(){if(b_)return y_;b_=1;var i=ps(),t=A1(),e=s1().CONSTRUCTOR;return i({target:"Promise",stat:!0,forced:e},{reject:function(r){var n=t.f(this),s=n.reject;return s(r),n.promise}}),y_}var B_={},fx,C_;function HY(){if(C_)return fx;C_=1;var i=fs(),t=Ts(),e=A1();return fx=function(r,n){if(i(r),t(n)&&n.constructor===r)return n;var s=e.f(r),A=s.resolve;return A(n),s.promise},fx}var x_;function VY(){if(x_)return B_;x_=1;var i=ps(),t=ju(),e=lo(),r=n1(),n=s1().CONSTRUCTOR,s=HY(),A=t("Promise"),a=e&&!n;return i({target:"Promise",stat:!0,forced:e||n},{resolve:function(o){return s(a&&this===A?r:this,o)}}),B_}var F_;function WY(){return F_||(F_=1,LY(),PY(),DY(),OY(),RY(),VY()),nY}WY();function S_(i,t,e,r,n,s,A){try{var a=i[s](A),o=a.value}catch(l){return void e(l)}a.done?t(o):Promise.resolve(o).then(r,n)}function vl(i){return function(){var t=this,e=arguments;return new Promise(function(r,n){var s=i.apply(t,e);function A(o){S_(s,r,n,A,a,"next",o)}function a(o){S_(s,r,n,A,a,"throw",o)}A(void 0)})}}var E_={},k_={},px,U_;function ho(){if(U_)return px;U_=1;var i=pE(),t=String;return px=function(e){if(i(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(e)},px}var gx,I_;function bO(){if(I_)return gx;I_=1;var i=fs();return gx=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},gx}var mx,Q_;function BO(){if(Q_)return mx;Q_=1;var i=Ai(),t=Wr(),e=t.RegExp,r=i(function(){var A=e("a","y");return A.lastIndex=2,A.exec("abcd")!==null}),n=r||i(function(){return!e("a","y").sticky}),s=r||i(function(){var A=e("^r","gy");return A.lastIndex=2,A.exec("str")!==null});return mx={BROKEN_CARET:s,MISSED_STICKY:n,UNSUPPORTED_Y:r},mx}var wx={},vx,L_;function jY(){if(L_)return vx;L_=1;var i=oO(),t=fE();return vx=Object.keys||function(e){return i(e,t)},vx}var __;function KY(){if(__)return wx;__=1;var i=va(),t=sO(),e=qh(),r=fs(),n=e1(),s=jY();return wx.f=i&&!t?Object.defineProperties:function(A,a){r(A);for(var o=n(a),l=s(a),h=l.length,u=0,f;h>u;)e.f(A,f=l[u++],o[f]);return A},wx}var yx,M_;function Cb(){if(M_)return yx;M_=1;var i=fs(),t=KY(),e=fE(),r=uE(),n=fO(),s=pb(),A=cE(),a=">",o="<",l="prototype",h="script",u=A("IE_PROTO"),f=function(){},d=function(b){return o+h+a+b+o+"/"+h+a},g=function(b){b.write(d("")),b.close();var C=b.parentWindow.Object;return b=null,C},m=function(){var b=s("iframe"),C="java"+h+":",S;return b.style.display="none",n.appendChild(b),b.src=String(C),S=b.contentWindow.document,S.open(),S.write(d("document.F=Object")),S.close(),S.F},y,w=function(){try{y=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&y?g(y):m():g(y);for(var b=e.length;b--;)delete w[l][e[b]];return w()};return r[u]=!0,yx=Object.create||function(b,C){var S;return b!==null?(f[l]=i(b),S=new f,f[l]=null,S[u]=b):S=w(),C===void 0?S:t.f(S,C)},yx}var bx,T_;function GY(){if(T_)return bx;T_=1;var i=Ai(),t=Wr(),e=t.RegExp;return bx=i(function(){var r=e(".","s");return!(r.dotAll&&r.test(`
|
|
296
|
-
`)&&r.flags==="s")}),bx}var Bx,N_;function zY(){if(N_)return Bx;N_=1;var i=Ai(),t=Wr(),e=t.RegExp;return Bx=i(function(){var r=e("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),Bx}var Cx,P_;function wE(){if(P_)return Cx;P_=1;var i=xn(),t=ai(),e=ho(),r=bO(),n=BO(),s=lE(),A=Cb(),a=wb().get,o=GY(),l=zY(),h=s("native-string-replace",String.prototype.replace),u=RegExp.prototype.exec,f=u,d=t("".charAt),g=t("".indexOf),m=t("".replace),y=t("".slice),w=(function(){var I=/a/,N=/b*/g;return i(u,I,"a"),i(u,N,"a"),I.lastIndex!==0||N.lastIndex!==0})(),b=n.BROKEN_CARET,C=/()??/.exec("")[1]!==void 0,S=w||C||b||o||l,k=function(I,N){for(var D=I.groups=A(null),Q=0;Q<N.length;Q++){var K=N[Q];D[K[0]]=I[K[1]]}};return S&&(f=function(I){var N=this,D=a(N),Q=e(I),K=D.raw,L,O,W;if(K)return K.lastIndex=N.lastIndex,L=i(f,K,Q),N.lastIndex=K.lastIndex,L&&D.groups&&k(L,D.groups),L;var R=D.groups,tt=b&&N.sticky,et=i(r,N),st=N.source,nt=0,at=Q;if(tt){et=m(et,"y",""),g(et,"g")===-1&&(et+="g"),at=y(Q,N.lastIndex);var ft=N.lastIndex>0&&d(Q,N.lastIndex-1);N.lastIndex>0&&(!N.multiline||N.multiline&&ft!==`
|
|
297
|
-
`&&ft!=="\r"&&ft!=="\u2028"&&ft!=="\u2029")&&(st="(?: (?:"+st+"))",at=" "+at,nt++),O=new RegExp("^(?:"+st+")",et)}C&&(O=new RegExp("^"+st+"$(?!\\s)",et)),w&&(W=N.lastIndex);var ht=i(u,tt?O:N,at);return tt?ht?(ht.input=Q,ht[0]=y(ht[0],nt),ht.index=N.lastIndex,N.lastIndex+=ht[0].length):N.lastIndex=0:w&&ht&&(N.lastIndex=N.global?ht.index+ht[0].length:W),C&&ht&&ht.length>1&&i(h,ht[0],O,function(){for(var M=1;M<arguments.length-2;M++)arguments[M]===void 0&&(ht[M]=void 0)}),ht&&R&&k(ht,R),ht}),Cx=f,Cx}var D_;function qY(){if(D_)return k_;D_=1;var i=ps(),t=wE();return i({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),k_}var xx,O_;function vE(){if(O_)return xx;O_=1,qY();var i=xn(),t=Ku(),e=wE(),r=Ai(),n=nn(),s=i1(),A=n("species"),a=RegExp.prototype;return xx=function(o,l,h,u){var f=n(o),d=!r(function(){var w={};return w[f]=function(){return 7},""[o](w)!==7}),g=d&&!r(function(){var w=!1,b=/a/;if(o==="split"){var C={};C[A]=function(){return b},b={constructor:C,flags:""},b[f]=/./[f]}return b.exec=function(){return w=!0,null},b[f](""),!w});if(!d||!g||h){var m=/./[f],y=l(f,""[o],function(w,b,C,S,k){var I=b.exec;return I===e||I===a.exec?d&&!k?{done:!0,value:i(m,b,C,S)}:{done:!0,value:i(w,C,b,S)}:{done:!1}});t(String.prototype,o,y[0]),t(a,f,y[1])}u&&s(a[f],"sham",!0)},xx}var Fx,R_;function XY(){if(R_)return Fx;R_=1;var i=ai(),t=vb(),e=ho(),r=ya(),n=i("".charAt),s=i("".charCodeAt),A=i("".slice),a=function(o){return function(l,h){var u=e(r(l)),f=t(h),d=u.length,g,m;return f<0||f>=d?o?"":void 0:(g=s(u,f),g<55296||g>56319||f+1===d||(m=s(u,f+1))<56320||m>57343?o?n(u,f):g:o?A(u,f,f+2):(g-55296<<10)+(m-56320)+65536)}};return Fx={codeAt:a(!1),charAt:a(!0)},Fx}var Sx,H_;function yE(){if(H_)return Sx;H_=1;var i=XY().charAt;return Sx=function(t,e,r){return e+(r&&i(t,e).length||1)},Sx}var Ex,V_;function YY(){if(V_)return Ex;V_=1;var i=Wr(),t=Ai(),e=i.RegExp,r=!t(function(){var n=!0;try{e(".","d")}catch{n=!1}var s={},A="",a=n?"dgimsy":"gimsy",o=function(f,d){Object.defineProperty(s,f,{get:function(){return A+=d,!0}})},l={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};n&&(l.hasIndices="d");for(var h in l)o(h,l[h]);var u=Object.getOwnPropertyDescriptor(e.prototype,"flags").get.call(s);return u!==a||A!==a});return Ex={correct:r},Ex}var kx,W_;function xb(){if(W_)return kx;W_=1;var i=xn(),t=ba(),e=ub(),r=YY(),n=bO(),s=RegExp.prototype;return kx=r.correct?function(A){return A.flags}:function(A){return!r.correct&&e(s,A)&&!t(A,"flags")?i(n,A):A.flags},kx}var Ux,j_;function bE(){if(j_)return Ux;j_=1;var i=xn(),t=fs(),e=Si(),r=Wu(),n=wE(),s=TypeError;return Ux=function(A,a){var o=A.exec;if(e(o)){var l=i(o,A,a);return l!==null&&t(l),l}if(r(A)==="RegExp")return i(n,A,a);throw new s("RegExp#exec called on incompatible receiver")},Ux}var K_;function $Y(){if(K_)return E_;K_=1;var i=xn(),t=ai(),e=vE(),r=fs(),n=Ts(),s=Up(),A=ho(),a=ya(),o=kp(),l=yE(),h=xb(),u=bE(),f=t("".indexOf);return e("match",function(d,g,m){return[function(y){var w=a(this),b=n(y)?o(y,d):void 0;return b?i(b,y,w):new RegExp(y)[d](A(w))},function(y){var w=r(this),b=A(y),C=m(g,w,b);if(C.done)return C.value;var S=A(h(w));if(!~f(S,"g"))return u(w,b);var k=!!~f(S,"u")||!!~f(S,"v");w.lastIndex=0;for(var I=[],N=0,D;(D=u(w,b))!==null;){var Q=A(D[0]);I[N]=Q,Q===""&&(w.lastIndex=l(b,s(w.lastIndex),k)),N++}return N===0?null:I}]}),E_}$Y();var G_={},Ix,z_;function ZY(){if(z_)return Ix;z_=1;var i=ai(),t=fb(),e=Math.floor,r=i("".charAt),n=i("".replace),s=i("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return Ix=function(o,l,h,u,f,d){var g=h+o.length,m=u.length,y=a;return f!==void 0&&(f=t(f),y=A),n(d,y,function(w,b){var C;switch(r(b,0)){case"$":return"$";case"&":return o;case"`":return s(l,0,h);case"'":return s(l,g);case"<":C=f[s(b,1,-1)];break;default:var S=+b;if(S===0)return w;if(S>m){var k=e(S/10);return k===0?w:k<=m?u[k-1]===void 0?r(b,1):u[k-1]+r(b,1):w}C=u[S-1]}return C===void 0?"":C})},Ix}var q_;function JY(){if(q_)return G_;q_=1;var i=dO(),t=xn(),e=ai(),r=vE(),n=Ai(),s=fs(),A=Si(),a=Ts(),o=vb(),l=Up(),h=ho(),u=ya(),f=yE(),d=kp(),g=ZY(),m=xb(),y=bE(),w=nn(),b=w("replace"),C=Math.max,S=Math.min,k=e([].concat),I=e([].push),N=e("".indexOf),D=e("".slice),Q=function(W){return W===void 0?W:String(W)},K=(function(){return"a".replace(/./,"$0")==="$0"})(),L=(function(){return/./[b]?/./[b]("a","$0")==="":!1})(),O=!n(function(){var W=/./;return W.exec=function(){var R=[];return R.groups={a:"7"},R},"".replace(W,"$<a>")!=="7"});return r("replace",function(W,R,tt){var et=L?"$":"$0";return[function(st,nt){var at=u(this),ft=a(st)?d(st,b):void 0;return ft?t(ft,st,at,nt):t(R,h(at),st,nt)},function(st,nt){var at=s(this),ft=h(st),ht=A(nt);ht||(nt=h(nt));var M=h(m(at));if(typeof nt=="string"&&!~N(nt,et)&&!~N(nt,"$<")&&!~N(M,"y")){var G=tt(R,at,ft,nt);if(G.done)return G.value}var X=!!~N(M,"g"),rt;X&&(rt=!!~N(M,"u")||!!~N(M,"v"),at.lastIndex=0);for(var it=[],ot;ot=y(at,ft),!(ot===null||(I(it,ot),!X));){var gt=h(ot[0]);gt===""&&(at.lastIndex=f(ft,l(at.lastIndex),rt))}for(var vt="",yt=0,St=0;St<it.length;St++){ot=it[St];for(var Dt=h(ot[0]),Tt=C(S(o(ot.index),ft.length),0),jt=[],q,Mt=1;Mt<ot.length;Mt++)I(jt,Q(ot[Mt]));var fe=ot.groups;if(ht){var Zt=k([Dt],jt,Tt,ft);fe!==void 0&&I(Zt,fe),q=h(i(nt,void 0,Zt))}else q=g(Dt,ft,Tt,jt,fe,nt);Tt>=yt&&(vt+=D(ft,yt,Tt)+q,yt=Tt+Dt.length)}return vt+D(ft,yt)}]},!O||!K||L),G_}JY();var X_={},Qx,Y_;function t$(){if(Y_)return Qx;Y_=1;var i=Ts(),t=Wu(),e=nn(),r=e("match");return Qx=function(n){var s;return i(n)&&((s=n[r])!==void 0?!!s:t(n)==="RegExp")},Qx}var Lx,$_;function BE(){if($_)return Lx;$_=1;var i=t$(),t=TypeError;return Lx=function(e){if(i(e))throw new t("The method doesn't accept regular expressions");return e},Lx}var _x,Z_;function CE(){if(Z_)return _x;Z_=1;var i=nn(),t=i("match");return _x=function(e){var r=/./;try{"/./"[e](r)}catch{try{return r[t]=!1,"/./"[e](r)}catch{}}return!1},_x}var J_;function e$(){if(J_)return X_;J_=1;var i=ps(),t=Bb(),e=gb().f,r=Up(),n=ho(),s=BE(),A=ya(),a=CE(),o=lo(),l=t("".slice),h=Math.min,u=a("startsWith"),f=!o&&!u&&!!(function(){var d=e(String.prototype,"startsWith");return d&&!d.writable})();return i({target:"String",proto:!0,forced:!f&&!u},{startsWith:function(d){var g=n(A(this));s(d);var m=n(d),y=r(h(arguments.length>1?arguments[1]:void 0,g.length));return l(g,y,y+m.length)===m}}),X_}e$();var Mx,tM;function r$(){if(tM)return Mx;tM=1;var i=nn(),t=Cb(),e=qh().f,r=i("unscopables"),n=Array.prototype;return n[r]===void 0&&e(n,r,{configurable:!0,value:t(null)}),Mx=function(s){n[r][s]=!0},Mx}var Tx,eM;function i$(){if(eM)return Tx;eM=1;var i=Ai();return Tx=!i(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Tx}var Nx,rM;function CO(){if(rM)return Nx;rM=1;var i=ba(),t=Si(),e=fb(),r=cE(),n=i$(),s=r("IE_PROTO"),A=Object,a=A.prototype;return Nx=n?A.getPrototypeOf:function(o){var l=e(o);if(i(l,s))return l[s];var h=l.constructor;return t(h)&&l instanceof h?h.prototype:l instanceof A?a:null},Nx}var Px,iM;function xO(){if(iM)return Px;iM=1;var i=Ai(),t=Si(),e=Ts(),r=Cb(),n=CO(),s=Ku(),A=nn(),a=lo(),o=A("iterator"),l=!1,h,u,f;[].keys&&(f=[].keys(),"next"in f?(u=n(n(f)),u!==Object.prototype&&(h=u)):l=!0);var d=!e(h)||i(function(){var g={};return h[o].call(g)!==g});return d?h={}:a&&(h=r(h)),t(h[o])||s(h,o,function(){return this}),Px={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:l},Px}var Dx,nM;function n$(){if(nM)return Dx;nM=1;var i=xO().IteratorPrototype,t=Cb(),e=sE(),r=bb(),n=a1(),s=function(){return this};return Dx=function(A,a,o,l){var h=a+" Iterator";return A.prototype=t(i,{next:e(+!l,o)}),r(A,h,!1,!0),n[h]=s,A},Dx}var Ox,sM;function s$(){if(sM)return Ox;sM=1;var i=ps(),t=xn(),e=lo(),r=mb(),n=Si(),s=n$(),A=CO(),a=cO(),o=bb(),l=i1(),h=Ku(),u=nn(),f=a1(),d=xO(),g=r.PROPER,m=r.CONFIGURABLE,y=d.IteratorPrototype,w=d.BUGGY_SAFARI_ITERATORS,b=u("iterator"),C="keys",S="values",k="entries",I=function(){return this};return Ox=function(N,D,Q,K,L,O,W){s(Q,D,K);var R=function(X){if(X===L&&at)return at;if(!w&&X&&X in st)return st[X];switch(X){case C:return function(){return new Q(this,X)};case S:return function(){return new Q(this,X)};case k:return function(){return new Q(this,X)}}return function(){return new Q(this)}},tt=D+" Iterator",et=!1,st=N.prototype,nt=st[b]||st["@@iterator"]||L&&st[L],at=!w&&nt||R(L),ft=D==="Array"&&st.entries||nt,ht,M,G;if(ft&&(ht=A(ft.call(new N)),ht!==Object.prototype&&ht.next&&(!e&&A(ht)!==y&&(a?a(ht,y):n(ht[b])||h(ht,b,I)),o(ht,tt,!0,!0),e&&(f[tt]=I))),g&&L===S&&nt&&nt.name!==S&&(!e&&m?l(st,"name",S):(et=!0,at=function(){return t(nt,this)})),L)if(M={values:R(S),keys:O?at:R(C),entries:R(k)},W)for(G in M)(w||et||!(G in st))&&h(st,G,M[G]);else i({target:D,proto:!0,forced:w||et},M);return(!e||W)&&st[b]!==at&&h(st,b,at,{name:L}),f[D]=at,M},Ox}var AM,aM;function A$(){return aM||(aM=1,AM=function(i,t){return{value:i,done:t}}),AM}var Rx,oM;function FO(){if(oM)return Rx;oM=1;var i=e1(),t=r$(),e=a1(),r=wb(),n=qh().f,s=s$(),A=A$(),a=lo(),o=va(),l="Array Iterator",h=r.set,u=r.getterFor(l);Rx=s(Array,"Array",function(d,g){h(this,{type:l,target:i(d),index:0,kind:g})},function(){var d=u(this),g=d.target,m=d.index++;if(!g||m>=g.length)return d.target=null,A(void 0,!0);switch(d.kind){case"keys":return A(m,!1);case"values":return A(g[m],!1)}return A([m,g[m]],!1)},"values");var f=e.Arguments=e.Array;if(t("keys"),t("values"),t("entries"),!a&&o&&f.name!=="values")try{n(f,"name",{value:"values"})}catch{}return Rx}FO();var lM={},hM,cM;function a$(){return cM||(cM=1,hM={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),hM}var Hx,uM;function o$(){if(uM)return Hx;uM=1;var i=pb(),t=i("span").classList,e=t&&t.constructor&&t.constructor.prototype;return Hx=e===Object.prototype?void 0:e,Hx}var dM;function l$(){if(dM)return lM;dM=1;var i=Wr(),t=a$(),e=o$(),r=FO(),n=i1(),s=bb(),A=nn(),a=A("iterator"),o=r.values,l=function(u,f){if(u){if(u[a]!==o)try{n(u,a,o)}catch{u[a]=o}if(s(u,f,!0),t[f]){for(var d in r)if(u[d]!==r[d])try{n(u,d,r[d])}catch{u[d]=r[d]}}}};for(var h in t)l(i[h]&&i[h].prototype,h);return l(e,"DOMTokenList"),lM}l$();function h$(i,t){if(Ze(i)!="object"||!i)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var r=e.call(i,t);if(Ze(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}function c$(i){var t=h$(i,"string");return Ze(t)=="symbol"?t:t+""}function xE(i,t,e){return(t=c$(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var fM={},Vx,pM;function u$(){if(pM)return Vx;pM=1;var i=Bl(),t=fb(),e=ZD(),r=dE(),n=TypeError,s="Reduce of empty array with no initial value",A=function(a){return function(o,l,h,u){var f=t(o),d=e(f),g=r(f);if(i(l),g===0&&h<2)throw new n(s);var m=a?g-1:0,y=a?-1:1;if(h<2)for(;;){if(m in d){u=d[m],m+=y;break}if(m+=y,a?m<0:g<=m)throw new n(s)}for(;a?m>=0:g>m;m+=y)m in d&&(u=l(u,d[m],m,f));return u}};return Vx={left:A(!1),right:A(!0)},Vx}var Wx,gM;function SO(){if(gM)return Wx;gM=1;var i=Ai();return Wx=function(t,e){var r=[][t];return!!r&&i(function(){r.call(null,e||function(){return 1},1)})},Wx}var mM;function d$(){if(mM)return fM;mM=1;var i=ps(),t=u$().left,e=SO(),r=AE(),n=yb(),s=!n&&r>79&&r<83,A=s||!e("reduce");return i({target:"Array",proto:!0,forced:A},{reduce:function(a){var o=arguments.length;return t(this,a,o,o>1?arguments[1]:void 0)}}),fM}d$();var wM={},vM;function f$(){if(vM)return wM;vM=1;var i=ps(),t=Bb(),e=gb().f,r=Up(),n=ho(),s=BE(),A=ya(),a=CE(),o=lo(),l=t("".slice),h=Math.min,u=a("endsWith"),f=!o&&!u&&!!(function(){var d=e(String.prototype,"endsWith");return d&&!d.writable})();return i({target:"String",proto:!0,forced:!f&&!u},{endsWith:function(d){var g=n(A(this));s(d);var m=n(d),y=arguments.length>1?arguments[1]:void 0,w=g.length,b=y===void 0?w:h(r(y),w);return l(g,b-m.length,b)===m}}),wM}f$();var yM={},bM;function p$(){if(bM)return yM;bM=1;var i=xn(),t=ai(),e=vE(),r=fs(),n=Ts(),s=ya(),A=uO(),a=yE(),o=Up(),l=ho(),h=kp(),u=xb(),f=bE(),d=BO(),g=Ai(),m=d.UNSUPPORTED_Y,y=4294967295,w=Math.min,b=t([].push),C=t("".slice),S=t("".indexOf),k=!g(function(){var N=/(?:)/,D=N.exec;N.exec=function(){return D.apply(this,arguments)};var Q="ab".split(N);return Q.length!==2||Q[0]!=="a"||Q[1]!=="b"}),I="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;return e("split",function(N,D,Q){var K="0".split(void 0,0).length?function(L,O){return L===void 0&&O===0?[]:i(D,this,L,O)}:D;return[function(L,O){var W=s(this),R=n(L)?h(L,N):void 0;return R?i(R,L,W,O):i(K,l(W),L,O)},function(L,O){var W=r(this),R=l(L);if(!I){var tt=Q(K,W,R,O,K!==D);if(tt.done)return tt.value}var et=A(W,RegExp),st=l(u(W)),nt=!!~S(st,"u")||!!~S(st,"v");m?~S(st,"g")||(st+="g"):~S(st,"y")||(st+="y");var at=new et(m?"^(?:"+W.source+")":W,st),ft=O===void 0?y:O>>>0;if(ft===0)return[];if(R.length===0)return f(at,R)===null?[R]:[];for(var ht=0,M=0,G=[];M<R.length;){at.lastIndex=m?0:M;var X=f(at,m?C(R,M):R),rt;if(X===null||(rt=w(o(at.lastIndex+(m?M:0)),R.length))===ht)M=a(R,M,nt);else{if(b(G,C(R,ht,M)),G.length===ft)return G;for(var it=1;it<=X.length-1;it++)if(b(G,X[it]),G.length===ft)return G;M=ht=rt}}return b(G,C(R,ht)),G}]},I||!k,m),yM}p$();var pg={exports:{}},Lf={exports:{}},g$=Lf.exports,BM;function m$(){return BM||(BM=1,(function(){var i,t,e,r,n,s;typeof performance<"u"&&performance!==null&&performance.now?Lf.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Lf.exports=function(){return(i()-n)/1e6},t=process.hrtime,i=function(){var A;return A=t(),A[0]*1e9+A[1]},r=i(),s=process.uptime()*1e9,n=r-s):Date.now?(Lf.exports=function(){return Date.now()-e},e=Date.now()):(Lf.exports=function(){return new Date().getTime()-e},e=new Date().getTime())}).call(g$)),Lf.exports}var CM;function w$(){if(CM)return pg.exports;CM=1;for(var i=m$(),t=typeof window>"u"?sF:window,e=["moz","webkit"],r="AnimationFrame",n=t["request"+r],s=t["cancel"+r]||t["cancelRequest"+r],A=0;!n&&A<e.length;A++)n=t[e[A]+"Request"+r],s=t[e[A]+"Cancel"+r]||t[e[A]+"CancelRequest"+r];if(!n||!s){var a=0,o=0,l=[],h=1e3/60;n=function(u){if(l.length===0){var f=i(),d=Math.max(0,h-(f-a));a=d+f,setTimeout(function(){var g=l.slice(0);l.length=0;for(var m=0;m<g.length;m++)if(!g[m].cancelled)try{g[m].callback(a)}catch(y){setTimeout(function(){throw y},0)}},Math.round(d))}return l.push({handle:++o,callback:u,cancelled:!1}),o},s=function(u){for(var f=0;f<l.length;f++)l[f].handle===u&&(l[f].cancelled=!0)}}return pg.exports=function(u){return n.call(t,u)},pg.exports.cancel=function(){s.apply(t,arguments)},pg.exports.polyfill=function(u){u||(u=t),u.requestAnimationFrame=n,u.cancelAnimationFrame=s},pg.exports}var v$=w$();const jx=W0(v$);var xM={},FM,SM;function EO(){return SM||(SM=1,FM=`
|
|
298
|
-
\v\f\r \u2028\u2029\uFEFF`),FM}var Kx,EM;function y$(){if(EM)return Kx;EM=1;var i=ai(),t=ya(),e=ho(),r=EO(),n=i("".replace),s=RegExp("^["+r+"]+"),A=RegExp("(^|[^"+r+"])["+r+"]+$"),a=function(o){return function(l){var h=e(t(l));return o&1&&(h=n(h,s,"")),o&2&&(h=n(h,A,"$1")),h}};return Kx={start:a(1),end:a(2),trim:a(3)},Kx}var Gx,kM;function b$(){if(kM)return Gx;kM=1;var i=mb().PROPER,t=Ai(),e=EO(),r="
";return Gx=function(n){return t(function(){return!!e[n]()||r[n]()!==r||i&&e[n].name!==n})},Gx}var UM;function B$(){if(UM)return xM;UM=1;var i=ps(),t=y$().trim,e=b$();return i({target:"String",proto:!0,forced:e("trim")},{trim:function(){return t(this)}}),xM}B$();var IM,QM;function C$(){return QM||(QM=1,IM=function(i){this.ok=!1,this.alpha=1,i.charAt(0)=="#"&&(i=i.substr(1,6)),i=i.replace(/ /g,""),i=i.toLowerCase();var t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};i=t[i]||i;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),parseFloat(o[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],r=0;r<e.length;r++){var n=e[r].re,s=e[r].process,A=n.exec(i);if(A){var a=s(A);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+o+l+h},this.getHelpXML=function(){for(var o=new Array,l=0;l<e.length;l++)for(var h=e[l].example,u=0;u<h.length;u++)o[o.length]=h[u];for(var f in t)o[o.length]=f;var d=document.createElement("ul");d.setAttribute("id","rgbcolor-examples");for(var l=0;l<o.length;l++)try{var g=document.createElement("li"),m=new RGBColor(o[l]),y=document.createElement("div");y.style.cssText="margin: 3px; border: 1px solid black; background:"+m.toHex()+"; color:"+m.toHex(),y.appendChild(document.createTextNode("test"));var w=document.createTextNode(" "+o[l]+" -> "+m.toRGB()+" -> "+m.toHex());g.appendChild(y),g.appendChild(w),d.appendChild(g)}catch{}return d}}),IM}var x$=C$();const dS=W0(x$);var LM={},_M;function F$(){if(_M)return LM;_M=1;var i=ps(),t=Bb(),e=aO().indexOf,r=SO(),n=t([].indexOf),s=!!n&&1/n([1],1,-0)<0,A=s||!r("indexOf");return i({target:"Array",proto:!0,forced:A},{indexOf:function(a){var o=arguments.length>1?arguments[1]:void 0;return s?n(this,a,o)||0:e(this,a,o)}}),LM}F$();var MM={},TM;function S$(){if(TM)return MM;TM=1;var i=ps(),t=ai(),e=BE(),r=ya(),n=ho(),s=CE(),A=t("".indexOf);return i({target:"String",proto:!0,forced:!s("includes")},{includes:function(a){return!!~A(n(r(this)),n(e(a)),arguments.length>1?arguments[1]:void 0)}}),MM}S$();var NM={},zx,PM;function E$(){if(PM)return zx;PM=1;var i=Wu();return zx=Array.isArray||function(t){return i(t)==="Array"},zx}var DM;function k$(){if(DM)return NM;DM=1;var i=ps(),t=ai(),e=E$(),r=t([].reverse),n=[1,2];return i({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return e(this)&&(this.length=this.length),r(this)}}),NM}k$();/*! *****************************************************************************
|
|
299
|
-
Copyright (c) Microsoft Corporation.
|
|
300
|
-
|
|
301
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
302
|
-
purpose with or without fee is hereby granted.
|
|
303
|
-
|
|
304
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
305
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
306
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
307
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
308
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
309
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
310
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
311
|
-
***************************************************************************** */var kO=function(i,t){return(kO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])})(i,t)};function UO(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=i}kO(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function U$(i){var t="";Array.isArray(i)||(i=[i]);for(var e=0;e<i.length;e++){var r=i[e];if(r.type===Qt.CLOSE_PATH)t+="z";else if(r.type===Qt.HORIZ_LINE_TO)t+=(r.relative?"h":"H")+r.x;else if(r.type===Qt.VERT_LINE_TO)t+=(r.relative?"v":"V")+r.y;else if(r.type===Qt.MOVE_TO)t+=(r.relative?"m":"M")+r.x+" "+r.y;else if(r.type===Qt.LINE_TO)t+=(r.relative?"l":"L")+r.x+" "+r.y;else if(r.type===Qt.CURVE_TO)t+=(r.relative?"c":"C")+r.x1+" "+r.y1+" "+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===Qt.SMOOTH_CURVE_TO)t+=(r.relative?"s":"S")+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===Qt.QUAD_TO)t+=(r.relative?"q":"Q")+r.x1+" "+r.y1+" "+r.x+" "+r.y;else if(r.type===Qt.SMOOTH_QUAD_TO)t+=(r.relative?"t":"T")+r.x+" "+r.y;else{if(r.type!==Qt.ARC)throw new Error('Unexpected command type "'+r.type+'" at index '+e+".");t+=(r.relative?"a":"A")+r.rX+" "+r.rY+" "+r.xRot+" "+ +r.lArcFlag+" "+ +r.sweepFlag+" "+r.x+" "+r.y}}return t}function fS(i,t){var e=i[0],r=i[1];return[e*Math.cos(t)-r*Math.sin(t),e*Math.sin(t)+r*Math.cos(t)]}function Aa(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];for(var e=0;e<i.length;e++)if(typeof i[e]!="number")throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof i[e]+" == typeof "+i[e]);return!0}var ph=Math.PI;function qx(i,t,e){i.lArcFlag=i.lArcFlag===0?0:1,i.sweepFlag=i.sweepFlag===0?0:1;var r=i.rX,n=i.rY,s=i.x,A=i.y;r=Math.abs(i.rX),n=Math.abs(i.rY);var a=fS([(t-s)/2,(e-A)/2],-i.xRot/180*ph),o=a[0],l=a[1],h=Math.pow(o,2)/Math.pow(r,2)+Math.pow(l,2)/Math.pow(n,2);1<h&&(r*=Math.sqrt(h),n*=Math.sqrt(h)),i.rX=r,i.rY=n;var u=Math.pow(r,2)*Math.pow(l,2)+Math.pow(n,2)*Math.pow(o,2),f=(i.lArcFlag!==i.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(n,2)-u)/u)),d=r*l/n*f,g=-n*o/r*f,m=fS([d,g],i.xRot/180*ph);i.cX=m[0]+(t+s)/2,i.cY=m[1]+(e+A)/2,i.phi1=Math.atan2((l-g)/n,(o-d)/r),i.phi2=Math.atan2((-l-g)/n,(-o-d)/r),i.sweepFlag===0&&i.phi2>i.phi1&&(i.phi2-=2*ph),i.sweepFlag===1&&i.phi2<i.phi1&&(i.phi2+=2*ph),i.phi1*=180/ph,i.phi2*=180/ph}function OM(i,t,e){Aa(i,t,e);var r=i*i+t*t-e*e;if(0>r)return[];if(r===0)return[[i*e/(i*i+t*t),t*e/(i*i+t*t)]];var n=Math.sqrt(r);return[[(i*e+t*n)/(i*i+t*t),(t*e-i*n)/(i*i+t*t)],[(i*e-t*n)/(i*i+t*t),(t*e+i*n)/(i*i+t*t)]]}var Ni,Io=Math.PI/180;function RM(i,t,e){return(1-e)*i+e*t}function HM(i,t,e,r){return i+Math.cos(r/180*ph)*t+Math.sin(r/180*ph)*e}function VM(i,t,e,r){var n=1e-6,s=t-i,A=e-t,a=3*s+3*(r-e)-6*A,o=6*(A-s),l=3*s;return Math.abs(a)<n?[-l/o]:(function(h,u,f){var d=h*h/4-u;if(d<-f)return[];if(d<=f)return[-h/2];var g=Math.sqrt(d);return[-h/2-g,-h/2+g]})(o/a,l/a,n)}function WM(i,t,e,r,n){var s=1-n;return i*(s*s*s)+t*(3*s*s*n)+e*(3*s*n*n)+r*(n*n*n)}(function(i){function t(){return n((function(a,o,l){return a.relative&&(a.x1!==void 0&&(a.x1+=o),a.y1!==void 0&&(a.y1+=l),a.x2!==void 0&&(a.x2+=o),a.y2!==void 0&&(a.y2+=l),a.x!==void 0&&(a.x+=o),a.y!==void 0&&(a.y+=l),a.relative=!1),a}))}function e(){var a=NaN,o=NaN,l=NaN,h=NaN;return n((function(u,f,d){return u.type&Qt.SMOOTH_CURVE_TO&&(u.type=Qt.CURVE_TO,a=isNaN(a)?f:a,o=isNaN(o)?d:o,u.x1=u.relative?f-a:2*f-a,u.y1=u.relative?d-o:2*d-o),u.type&Qt.CURVE_TO?(a=u.relative?f+u.x2:u.x2,o=u.relative?d+u.y2:u.y2):(a=NaN,o=NaN),u.type&Qt.SMOOTH_QUAD_TO&&(u.type=Qt.QUAD_TO,l=isNaN(l)?f:l,h=isNaN(h)?d:h,u.x1=u.relative?f-l:2*f-l,u.y1=u.relative?d-h:2*d-h),u.type&Qt.QUAD_TO?(l=u.relative?f+u.x1:u.x1,h=u.relative?d+u.y1:u.y1):(l=NaN,h=NaN),u}))}function r(){var a=NaN,o=NaN;return n((function(l,h,u){if(l.type&Qt.SMOOTH_QUAD_TO&&(l.type=Qt.QUAD_TO,a=isNaN(a)?h:a,o=isNaN(o)?u:o,l.x1=l.relative?h-a:2*h-a,l.y1=l.relative?u-o:2*u-o),l.type&Qt.QUAD_TO){a=l.relative?h+l.x1:l.x1,o=l.relative?u+l.y1:l.y1;var f=l.x1,d=l.y1;l.type=Qt.CURVE_TO,l.x1=((l.relative?0:h)+2*f)/3,l.y1=((l.relative?0:u)+2*d)/3,l.x2=(l.x+2*f)/3,l.y2=(l.y+2*d)/3}else a=NaN,o=NaN;return l}))}function n(a){var o=0,l=0,h=NaN,u=NaN;return function(f){if(isNaN(h)&&!(f.type&Qt.MOVE_TO))throw new Error("path must start with moveto");var d=a(f,o,l,h,u);return f.type&Qt.CLOSE_PATH&&(o=h,l=u),f.x!==void 0&&(o=f.relative?o+f.x:f.x),f.y!==void 0&&(l=f.relative?l+f.y:f.y),f.type&Qt.MOVE_TO&&(h=o,u=l),d}}function s(a,o,l,h,u,f){return Aa(a,o,l,h,u,f),n((function(d,g,m,y){var w=d.x1,b=d.x2,C=d.relative&&!isNaN(y),S=d.x!==void 0?d.x:C?0:g,k=d.y!==void 0?d.y:C?0:m;function I(M){return M*M}d.type&Qt.HORIZ_LINE_TO&&o!==0&&(d.type=Qt.LINE_TO,d.y=d.relative?0:m),d.type&Qt.VERT_LINE_TO&&l!==0&&(d.type=Qt.LINE_TO,d.x=d.relative?0:g),d.x!==void 0&&(d.x=d.x*a+k*l+(C?0:u)),d.y!==void 0&&(d.y=S*o+d.y*h+(C?0:f)),d.x1!==void 0&&(d.x1=d.x1*a+d.y1*l+(C?0:u)),d.y1!==void 0&&(d.y1=w*o+d.y1*h+(C?0:f)),d.x2!==void 0&&(d.x2=d.x2*a+d.y2*l+(C?0:u)),d.y2!==void 0&&(d.y2=b*o+d.y2*h+(C?0:f));var N=a*h-o*l;if(d.xRot!==void 0&&(a!==1||o!==0||l!==0||h!==1))if(N===0)delete d.rX,delete d.rY,delete d.xRot,delete d.lArcFlag,delete d.sweepFlag,d.type=Qt.LINE_TO;else{var D=d.xRot*Math.PI/180,Q=Math.sin(D),K=Math.cos(D),L=1/I(d.rX),O=1/I(d.rY),W=I(K)*L+I(Q)*O,R=2*Q*K*(L-O),tt=I(Q)*L+I(K)*O,et=W*h*h-R*o*h+tt*o*o,st=R*(a*h+o*l)-2*(W*l*h+tt*a*o),nt=W*l*l-R*a*l+tt*a*a,at=(Math.atan2(st,et-nt)+Math.PI)%Math.PI/2,ft=Math.sin(at),ht=Math.cos(at);d.rX=Math.abs(N)/Math.sqrt(et*I(ht)+st*ft*ht+nt*I(ft)),d.rY=Math.abs(N)/Math.sqrt(et*I(ft)-st*ft*ht+nt*I(ht)),d.xRot=180*at/Math.PI}return d.sweepFlag!==void 0&&0>N&&(d.sweepFlag=+!d.sweepFlag),d}))}function A(){return function(a){var o={};for(var l in a)o[l]=a[l];return o}}i.ROUND=function(a){function o(l){return Math.round(l*a)/a}return a===void 0&&(a=1e13),Aa(a),function(l){return l.x1!==void 0&&(l.x1=o(l.x1)),l.y1!==void 0&&(l.y1=o(l.y1)),l.x2!==void 0&&(l.x2=o(l.x2)),l.y2!==void 0&&(l.y2=o(l.y2)),l.x!==void 0&&(l.x=o(l.x)),l.y!==void 0&&(l.y=o(l.y)),l.rX!==void 0&&(l.rX=o(l.rX)),l.rY!==void 0&&(l.rY=o(l.rY)),l}},i.TO_ABS=t,i.TO_REL=function(){return n((function(a,o,l){return a.relative||(a.x1!==void 0&&(a.x1-=o),a.y1!==void 0&&(a.y1-=l),a.x2!==void 0&&(a.x2-=o),a.y2!==void 0&&(a.y2-=l),a.x!==void 0&&(a.x-=o),a.y!==void 0&&(a.y-=l),a.relative=!0),a}))},i.NORMALIZE_HVZ=function(a,o,l){return a===void 0&&(a=!0),o===void 0&&(o=!0),l===void 0&&(l=!0),n((function(h,u,f,d,g){if(isNaN(d)&&!(h.type&Qt.MOVE_TO))throw new Error("path must start with moveto");return o&&h.type&Qt.HORIZ_LINE_TO&&(h.type=Qt.LINE_TO,h.y=h.relative?0:f),l&&h.type&Qt.VERT_LINE_TO&&(h.type=Qt.LINE_TO,h.x=h.relative?0:u),a&&h.type&Qt.CLOSE_PATH&&(h.type=Qt.LINE_TO,h.x=h.relative?d-u:d,h.y=h.relative?g-f:g),h.type&Qt.ARC&&(h.rX===0||h.rY===0)&&(h.type=Qt.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h}))},i.NORMALIZE_ST=e,i.QT_TO_C=r,i.INFO=n,i.SANITIZE=function(a){a===void 0&&(a=0),Aa(a);var o=NaN,l=NaN,h=NaN,u=NaN;return n((function(f,d,g,m,y){var w=Math.abs,b=!1,C=0,S=0;if(f.type&Qt.SMOOTH_CURVE_TO&&(C=isNaN(o)?0:d-o,S=isNaN(l)?0:g-l),f.type&(Qt.CURVE_TO|Qt.SMOOTH_CURVE_TO)?(o=f.relative?d+f.x2:f.x2,l=f.relative?g+f.y2:f.y2):(o=NaN,l=NaN),f.type&Qt.SMOOTH_QUAD_TO?(h=isNaN(h)?d:2*d-h,u=isNaN(u)?g:2*g-u):f.type&Qt.QUAD_TO?(h=f.relative?d+f.x1:f.x1,u=f.relative?g+f.y1:f.y2):(h=NaN,u=NaN),f.type&Qt.LINE_COMMANDS||f.type&Qt.ARC&&(f.rX===0||f.rY===0||!f.lArcFlag)||f.type&Qt.CURVE_TO||f.type&Qt.SMOOTH_CURVE_TO||f.type&Qt.QUAD_TO||f.type&Qt.SMOOTH_QUAD_TO){var k=f.x===void 0?0:f.relative?f.x:f.x-d,I=f.y===void 0?0:f.relative?f.y:f.y-g;C=isNaN(h)?f.x1===void 0?C:f.relative?f.x:f.x1-d:h-d,S=isNaN(u)?f.y1===void 0?S:f.relative?f.y:f.y1-g:u-g;var N=f.x2===void 0?0:f.relative?f.x:f.x2-d,D=f.y2===void 0?0:f.relative?f.y:f.y2-g;w(k)<=a&&w(I)<=a&&w(C)<=a&&w(S)<=a&&w(N)<=a&&w(D)<=a&&(b=!0)}return f.type&Qt.CLOSE_PATH&&w(d-m)<=a&&w(g-y)<=a&&(b=!0),b?[]:f}))},i.MATRIX=s,i.ROTATE=function(a,o,l){o===void 0&&(o=0),l===void 0&&(l=0),Aa(a,o,l);var h=Math.sin(a),u=Math.cos(a);return s(u,h,-h,u,o-o*u+l*h,l-o*h-l*u)},i.TRANSLATE=function(a,o){return o===void 0&&(o=0),Aa(a,o),s(1,0,0,1,a,o)},i.SCALE=function(a,o){return o===void 0&&(o=a),Aa(a,o),s(a,0,0,o,0,0)},i.SKEW_X=function(a){return Aa(a),s(1,0,Math.atan(a),1,0,0)},i.SKEW_Y=function(a){return Aa(a),s(1,Math.atan(a),0,1,0,0)},i.X_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),Aa(a),s(-1,0,0,1,a,0)},i.Y_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),Aa(a),s(1,0,0,-1,0,a)},i.A_TO_C=function(){return n((function(a,o,l){return Qt.ARC===a.type?(function(h,u,f){var d,g,m,y;h.cX||qx(h,u,f);for(var w=Math.min(h.phi1,h.phi2),b=Math.max(h.phi1,h.phi2)-w,C=Math.ceil(b/90),S=new Array(C),k=u,I=f,N=0;N<C;N++){var D=RM(h.phi1,h.phi2,N/C),Q=RM(h.phi1,h.phi2,(N+1)/C),K=Q-D,L=4/3*Math.tan(K*Io/4),O=[Math.cos(D*Io)-L*Math.sin(D*Io),Math.sin(D*Io)+L*Math.cos(D*Io)],W=O[0],R=O[1],tt=[Math.cos(Q*Io),Math.sin(Q*Io)],et=tt[0],st=tt[1],nt=[et+L*Math.sin(Q*Io),st-L*Math.cos(Q*Io)],at=nt[0],ft=nt[1];S[N]={relative:h.relative,type:Qt.CURVE_TO};var ht=function(M,G){var X=fS([M*h.rX,G*h.rY],h.xRot),rt=X[0],it=X[1];return[h.cX+rt,h.cY+it]};d=ht(W,R),S[N].x1=d[0],S[N].y1=d[1],g=ht(at,ft),S[N].x2=g[0],S[N].y2=g[1],m=ht(et,st),S[N].x=m[0],S[N].y=m[1],h.relative&&(S[N].x1-=k,S[N].y1-=I,S[N].x2-=k,S[N].y2-=I,S[N].x-=k,S[N].y-=I),k=(y=[S[N].x,S[N].y])[0],I=y[1]}return S})(a,a.relative?0:o,a.relative?0:l):a}))},i.ANNOTATE_ARCS=function(){return n((function(a,o,l){return a.relative&&(o=0,l=0),Qt.ARC===a.type&&qx(a,o,l),a}))},i.CLONE=A,i.CALCULATE_BOUNDS=function(){var a=function(f){var d={};for(var g in f)d[g]=f[g];return d},o=t(),l=r(),h=e(),u=n((function(f,d,g){var m=h(l(o(a(f))));function y(ft){ft>u.maxX&&(u.maxX=ft),ft<u.minX&&(u.minX=ft)}function w(ft){ft>u.maxY&&(u.maxY=ft),ft<u.minY&&(u.minY=ft)}if(m.type&Qt.DRAWING_COMMANDS&&(y(d),w(g)),m.type&Qt.HORIZ_LINE_TO&&y(m.x),m.type&Qt.VERT_LINE_TO&&w(m.y),m.type&Qt.LINE_TO&&(y(m.x),w(m.y)),m.type&Qt.CURVE_TO){y(m.x),w(m.y);for(var b=0,C=VM(d,m.x1,m.x2,m.x);b<C.length;b++)0<(at=C[b])&&1>at&&y(WM(d,m.x1,m.x2,m.x,at));for(var S=0,k=VM(g,m.y1,m.y2,m.y);S<k.length;S++)0<(at=k[S])&&1>at&&w(WM(g,m.y1,m.y2,m.y,at))}if(m.type&Qt.ARC){y(m.x),w(m.y),qx(m,d,g);for(var I=m.xRot/180*Math.PI,N=Math.cos(I)*m.rX,D=Math.sin(I)*m.rX,Q=-Math.sin(I)*m.rY,K=Math.cos(I)*m.rY,L=m.phi1<m.phi2?[m.phi1,m.phi2]:-180>m.phi2?[m.phi2+360,m.phi1+360]:[m.phi2,m.phi1],O=L[0],W=L[1],R=function(ft){var ht=ft[0],M=ft[1],G=180*Math.atan2(M,ht)/Math.PI;return G<O?G+360:G},tt=0,et=OM(Q,-N,0).map(R);tt<et.length;tt++)(at=et[tt])>O&&at<W&&y(HM(m.cX,N,Q,at));for(var st=0,nt=OM(K,-D,0).map(R);st<nt.length;st++){var at;(at=nt[st])>O&&at<W&&w(HM(m.cY,D,K,at))}}return f}));return u.minX=1/0,u.maxX=-1/0,u.minY=1/0,u.maxY=-1/0,u}})(Ni||(Ni={}));var zA,IO=(function(){function i(){}return i.prototype.round=function(t){return this.transform(Ni.ROUND(t))},i.prototype.toAbs=function(){return this.transform(Ni.TO_ABS())},i.prototype.toRel=function(){return this.transform(Ni.TO_REL())},i.prototype.normalizeHVZ=function(t,e,r){return this.transform(Ni.NORMALIZE_HVZ(t,e,r))},i.prototype.normalizeST=function(){return this.transform(Ni.NORMALIZE_ST())},i.prototype.qtToC=function(){return this.transform(Ni.QT_TO_C())},i.prototype.aToC=function(){return this.transform(Ni.A_TO_C())},i.prototype.sanitize=function(t){return this.transform(Ni.SANITIZE(t))},i.prototype.translate=function(t,e){return this.transform(Ni.TRANSLATE(t,e))},i.prototype.scale=function(t,e){return this.transform(Ni.SCALE(t,e))},i.prototype.rotate=function(t,e,r){return this.transform(Ni.ROTATE(t,e,r))},i.prototype.matrix=function(t,e,r,n,s,A){return this.transform(Ni.MATRIX(t,e,r,n,s,A))},i.prototype.skewX=function(t){return this.transform(Ni.SKEW_X(t))},i.prototype.skewY=function(t){return this.transform(Ni.SKEW_Y(t))},i.prototype.xSymmetry=function(t){return this.transform(Ni.X_AXIS_SYMMETRY(t))},i.prototype.ySymmetry=function(t){return this.transform(Ni.Y_AXIS_SYMMETRY(t))},i.prototype.annotateArcs=function(){return this.transform(Ni.ANNOTATE_ARCS())},i})(),I$=function(i){return i===" "||i===" "||i==="\r"||i===`
|
|
312
|
-
`},jM=function(i){return 48<=i.charCodeAt(0)&&i.charCodeAt(0)<=57},Q$=(function(i){function t(){var e=i.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return UO(t,i),t.prototype.finish=function(e){if(e===void 0&&(e=[]),this.parse(" ",e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,r){var n=this;r===void 0&&(r=[]);for(var s=function(u){r.push(u),n.curArgs.length=0,n.canParseCommandOrComma=!0},A=0;A<e.length;A++){var a=e[A],o=!(this.curCommandType!==Qt.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=jM(a)&&(this.curNumber==="0"&&a==="0"||o);if(!jM(a)||l)if(a!=="e"&&a!=="E")if(a!=="-"&&a!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(a!=="."||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&this.curCommandType!==-1){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+A);if(this.curCommandType===Qt.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+A+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+A+'"')}this.curArgs.push(h),this.curArgs.length===L$[this.curCommandType]&&(Qt.HORIZ_LINE_TO===this.curCommandType?s({type:Qt.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):Qt.VERT_LINE_TO===this.curCommandType?s({type:Qt.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===Qt.MOVE_TO||this.curCommandType===Qt.LINE_TO||this.curCommandType===Qt.SMOOTH_QUAD_TO?(s({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Qt.MOVE_TO===this.curCommandType&&(this.curCommandType=Qt.LINE_TO)):this.curCommandType===Qt.CURVE_TO?s({type:Qt.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===Qt.SMOOTH_CURVE_TO?s({type:Qt.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Qt.QUAD_TO?s({type:Qt.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Qt.ARC&&s({type:Qt.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!I$(a))if(a===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(a!=="+"&&a!=="-"&&a!==".")if(l)this.curNumber=a,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+A+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+a+'" at index '+A+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,a!=="z"&&a!=="Z")if(a==="h"||a==="H")this.curCommandType=Qt.HORIZ_LINE_TO,this.curCommandRelative=a==="h";else if(a==="v"||a==="V")this.curCommandType=Qt.VERT_LINE_TO,this.curCommandRelative=a==="v";else if(a==="m"||a==="M")this.curCommandType=Qt.MOVE_TO,this.curCommandRelative=a==="m";else if(a==="l"||a==="L")this.curCommandType=Qt.LINE_TO,this.curCommandRelative=a==="l";else if(a==="c"||a==="C")this.curCommandType=Qt.CURVE_TO,this.curCommandRelative=a==="c";else if(a==="s"||a==="S")this.curCommandType=Qt.SMOOTH_CURVE_TO,this.curCommandRelative=a==="s";else if(a==="q"||a==="Q")this.curCommandType=Qt.QUAD_TO,this.curCommandRelative=a==="q";else if(a==="t"||a==="T")this.curCommandType=Qt.SMOOTH_QUAD_TO,this.curCommandRelative=a==="t";else{if(a!=="a"&&a!=="A")throw new SyntaxError('Unexpected character "'+a+'" at index '+A+".");this.curCommandType=Qt.ARC,this.curCommandRelative=a==="a"}else r.push({type:Qt.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=a,this.curNumberHasDecimal=a==="."}else this.curNumber+=a,this.curNumberHasDecimal=!0;else this.curNumber+=a;else this.curNumber+=a,this.curNumberHasExp=!0;else this.curNumber+=a,this.curNumberHasExpDigits=this.curNumberHasExp}return r},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(r,n){n===void 0&&(n=[]);for(var s=0,A=Object.getPrototypeOf(this).parse.call(this,r);s<A.length;s++){var a=A[s],o=e(a);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return n}}})},t})(IO),Qt=(function(i){function t(e){var r=i.call(this)||this;return r.commands=typeof e=="string"?t.parse(e):e,r}return UO(t,i),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=Ni.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var r=[],n=0,s=this.commands;n<s.length;n++){var A=e(s[n]);Array.isArray(A)?r.push.apply(r,A):r.push(A)}return this.commands=r,this},t.encode=function(e){return U$(e)},t.parse=function(e){var r=new Q$,n=[];return r.parse(e,n),r.finish(n),n},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t})(IO),L$=((zA={})[Qt.MOVE_TO]=2,zA[Qt.LINE_TO]=2,zA[Qt.HORIZ_LINE_TO]=1,zA[Qt.VERT_LINE_TO]=1,zA[Qt.CLOSE_PATH]=0,zA[Qt.QUAD_TO]=4,zA[Qt.SMOOTH_QUAD_TO]=2,zA[Qt.CURVE_TO]=6,zA[Qt.SMOOTH_CURVE_TO]=4,zA[Qt.ARC]=7,zA),KM={},GM;function _$(){if(GM)return KM;GM=1;var i=mb().PROPER,t=Ku(),e=fs(),r=ho(),n=Ai(),s=xb(),A="toString",a=RegExp.prototype,o=a[A],l=n(function(){return o.call({source:"a",flags:"b"})!=="/a/b"}),h=i&&o.name!==A;return(l||h)&&t(a,A,function(){var u=e(this),f=r(u.source),d=r(s(u));return"/"+f+"/"+d},{unsafe:!0}),KM}_$();function vv(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vv=function(t){return typeof t}:vv=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vv(i)}function M$(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}var T$=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],N$=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function P$(i,t,e,r,n){if(typeof i=="string"&&(i=document.getElementById(i)),!i||vv(i)!=="object"||!("getContext"in i))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=i.getContext("2d");try{return s.getImageData(t,e,r,n)}catch(A){throw new Error("unable to access image data: "+A)}}function D$(i,t,e,r,n,s){if(!(isNaN(s)||s<1)){s|=0;var A=P$(i,t,e,r,n);A=O$(A,t,e,r,n,s),i.getContext("2d").putImageData(A,t,e)}}function O$(i,t,e,r,n,s){for(var A=i.data,a=2*s+1,o=r-1,l=n-1,h=s+1,u=h*(h+1)/2,f=new zM,d=f,g,m=1;m<a;m++)d=d.next=new zM,m===h&&(g=d);d.next=f;for(var y=null,w=null,b=0,C=0,S=T$[s],k=N$[s],I=0;I<n;I++){d=f;for(var N=A[C],D=A[C+1],Q=A[C+2],K=A[C+3],L=0;L<h;L++)d.r=N,d.g=D,d.b=Q,d.a=K,d=d.next;for(var O=0,W=0,R=0,tt=0,et=h*N,st=h*D,nt=h*Q,at=h*K,ft=u*N,ht=u*D,M=u*Q,G=u*K,X=1;X<h;X++){var rt=C+((o<X?o:X)<<2),it=A[rt],ot=A[rt+1],gt=A[rt+2],vt=A[rt+3],yt=h-X;ft+=(d.r=it)*yt,ht+=(d.g=ot)*yt,M+=(d.b=gt)*yt,G+=(d.a=vt)*yt,O+=it,W+=ot,R+=gt,tt+=vt,d=d.next}y=f,w=g;for(var St=0;St<r;St++){var Dt=G*S>>>k;if(A[C+3]=Dt,Dt!==0){var Tt=255/Dt;A[C]=(ft*S>>>k)*Tt,A[C+1]=(ht*S>>>k)*Tt,A[C+2]=(M*S>>>k)*Tt}else A[C]=A[C+1]=A[C+2]=0;ft-=et,ht-=st,M-=nt,G-=at,et-=y.r,st-=y.g,nt-=y.b,at-=y.a;var jt=St+s+1;jt=b+(jt<o?jt:o)<<2,O+=y.r=A[jt],W+=y.g=A[jt+1],R+=y.b=A[jt+2],tt+=y.a=A[jt+3],ft+=O,ht+=W,M+=R,G+=tt,y=y.next;var q=w,Mt=q.r,fe=q.g,Zt=q.b,Et=q.a;et+=Mt,st+=fe,nt+=Zt,at+=Et,O-=Mt,W-=fe,R-=Zt,tt-=Et,w=w.next,C+=4}b+=r}for(var re=0;re<r;re++){C=re<<2;var Ot=A[C],zt=A[C+1],Yt=A[C+2],xt=A[C+3],Rt=h*Ot,Ht=h*zt,Kt=h*Yt,te=h*xt,Wt=u*Ot,ne=u*zt,Gt=u*Yt,Ve=u*xt;d=f;for(var Te=0;Te<h;Te++)d.r=Ot,d.g=zt,d.b=Yt,d.a=xt,d=d.next;for(var be=r,Be=0,ze=0,Ae=0,Ne=0,le=1;le<=s;le++){C=be+re<<2;var ye=h-le;Wt+=(d.r=Ot=A[C])*ye,ne+=(d.g=zt=A[C+1])*ye,Gt+=(d.b=Yt=A[C+2])*ye,Ve+=(d.a=xt=A[C+3])*ye,Ne+=Ot,Be+=zt,ze+=Yt,Ae+=xt,d=d.next,le<l&&(be+=r)}C=re,y=f,w=g;for(var Ye=0;Ye<n;Ye++){var we=C<<2;A[we+3]=xt=Ve*S>>>k,xt>0?(xt=255/xt,A[we]=(Wt*S>>>k)*xt,A[we+1]=(ne*S>>>k)*xt,A[we+2]=(Gt*S>>>k)*xt):A[we]=A[we+1]=A[we+2]=0,Wt-=Rt,ne-=Ht,Gt-=Kt,Ve-=te,Rt-=y.r,Ht-=y.g,Kt-=y.b,te-=y.a,we=re+((we=Ye+h)<l?we:l)*r<<2,Wt+=Ne+=y.r=A[we],ne+=Be+=y.g=A[we+1],Gt+=ze+=y.b=A[we+2],Ve+=Ae+=y.a=A[we+3],y=y.next,Rt+=Ot=w.r,Ht+=zt=w.g,Kt+=Yt=w.b,te+=xt=w.a,Ne-=Ot,Be-=zt,ze-=Yt,Ae-=xt,w=w.next,C+=r}}return i}var zM=(function i(){M$(this,i),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null});function R$(){var{DOMParser:i}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:i,createCanvas(e,r){return new OffscreenCanvas(e,r)},createImage(e){return vl(function*(){var r=yield fetch(e),n=yield r.blob(),s=yield createImageBitmap(n);return s})()}};return(typeof DOMParser<"u"||typeof i>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function H$(i){var{DOMParser:t,canvas:e,fetch:r}=i;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:r,createCanvas:e.createCanvas,createImage:e.loadImage}}var V$=Object.freeze({__proto__:null,offscreen:R$,node:H$});function Gu(i){return i.replace(/(?!\u3000)\s+/gm," ")}function QO(i){return i.replace(/^[\n \t]+/,"")}function LO(i){return i.replace(/[\n \t]+$/,"")}function _s(i){var t=(i||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return t.map(parseFloat)}var W$=/^[A-Z-]+$/;function _O(i){return W$.test(i)?i.toLowerCase():i}function FE(i){var t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(i)||[];return t[2]||t[3]||t[4]}function MO(i){if(!i.startsWith("rgb"))return i;var t=3,e=i.replace(/\d+(\.\d+)?/g,(r,n)=>t--&&n?String(Math.round(parseFloat(r))):r);return e}var j$=/(\[[^\]]+\])/g,K$=/(#[^\s+>~.[:]+)/g,G$=/(\.[^\s+>~.[:]+)/g,z$=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,q$=/(:[\w-]+\([^)]*\))/gi,X$=/(:[^\s+>~.[:]+)/g,Y$=/([^\s+>~.[:]+)/g;function uc(i,t){var e=t.exec(i);return e?[i.replace(t," "),e.length]:[i,0]}function TO(i){var t=[0,0,0],e=i.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[e,r]=uc(e,j$),t[1]+=r,[e,r]=uc(e,K$),t[0]+=r,[e,r]=uc(e,G$),t[1]+=r,[e,r]=uc(e,z$),t[2]+=r,[e,r]=uc(e,q$),t[1]+=r,[e,r]=uc(e,X$),t[1]+=r,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,r]=uc(e,Y$),t[2]+=r,t.join("")}var Lu=1e-8;function pS(i){return Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2))}function Uy(i,t){return(i[0]*t[0]+i[1]*t[1])/(pS(i)*pS(t))}function gS(i,t){return(i[0]*t[1]<i[1]*t[0]?-1:1)*Math.acos(Uy(i,t))}function mS(i){return i*i*i}function wS(i){return 3*i*i*(1-i)}function vS(i){return 3*i*(1-i)*(1-i)}function yS(i){return(1-i)*(1-i)*(1-i)}function bS(i){return i*i}function BS(i){return 2*i*(1-i)}function CS(i){return(1-i)*(1-i)}class me{constructor(t,e,r){this.document=t,this.name=e,this.value=r,this.isNormalizedColor=!1}static empty(t){return new me(t,"EMPTY","")}split(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:e,name:r}=this;return Gu(this.getString()).trim().split(t).map(n=>new me(e,r,n))}hasValue(t){var{value:e}=this;return e!==null&&e!==""&&(t||e!==0)&&typeof e<"u"}isString(t){var{value:e}=this,r=typeof e=="string";return!r||!t?r:t.test(e)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return typeof t>"u"||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);var{value:e}=this,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}getString(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=MO(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[r,n]=typeof t=="boolean"?[void 0,t]:[t],{viewPort:s}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&n):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(r);default:{var A=this.getNumber();return e&&A<1?A*s.computeSize(r):A}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var r=this.getDefinition();if(!r)return null;if(typeof r.createGradient=="function")return r.createGradient(this.document.ctx,t,e);if(typeof r.createPattern=="function"){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value)}return r.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?me.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),r=e.length,n=0,s=0;s<r&&(e[s]===","&&n++,n!==3);s++);if(t.hasValue()&&this.isString()&&n!==3){var A=new dS(e);A.ok&&(A.alpha=t.getNumber(),e=A.toRGBA())}return new me(this.document,this.name,e)}}me.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class NO{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return typeof t=="number"?t:t==="x"?this.width:t==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class si{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[r=e,n=e]=_s(t);return new si(r,n)}static parseScale(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=e,n=r]=_s(t);return new si(r,n)}static parsePath(t){for(var e=_s(t),r=e.length,n=[],s=0;s<r;s+=2)n.push(new si(e[s],e[s+1]));return n}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:r}=this,n=e*t[0]+r*t[2]+t[4],s=e*t[1]+r*t[3]+t[5];this.x=n,this.y=s}}class PO{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:r}=this,n=t.ctx.canvas;n.onclick=e,n.onmousemove=r,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:r}=this,{style:n}=t.ctx.canvas;n&&(n.cursor=""),e.forEach((s,A)=>{for(var{run:a}=s,o=r[A];o;)a(o),o=o.parent}),this.events=[],this.eventElements=[]}}checkPath(t,e){if(!(!this.working||!e)){var{events:r,eventElements:n}=this;r.forEach((s,A)=>{var{x:a,y:o}=s;!n[A]&&e.isPointInPath&&e.isPointInPath(a,o)&&(n[A]=t)})}}checkBoundingBox(t,e){if(!(!this.working||!e)){var{events:r,eventElements:n}=this;r.forEach((s,A)=>{var{x:a,y:o}=s;!n[A]&&e.isPointInBox(a,o)&&(n[A]=t)})}}mapXY(t,e){for(var{window:r,ctx:n}=this.screen,s=new si(t,e),A=n.canvas;A;)s.x-=A.offsetLeft,s.y-=A.offsetTop,A=A.offsetParent;return r.scrollX&&(s.x+=r.scrollX),r.scrollY&&(s.y+=r.scrollY),s}onClick(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:r,run(n){n.onClick&&n.onClick()}})}onMouseMove(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:r,run(n){n.onMouseMove&&n.onMouseMove()}})}}var DO=typeof window<"u"?window:null,OO=typeof fetch<"u"?fetch.bind(void 0):null;class o1{constructor(t){var{fetch:e=OO,window:r=DO}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new NO,this.mouse=new PO(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every(e=>e());return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:r,aspectRatio:n,width:s,desiredWidth:A,height:a,desiredHeight:o,minX:l=0,minY:h=0,refX:u,refY:f,clip:d=!1,clipX:g=0,clipY:m=0}=t,y=Gu(n).replace(/^defer\s/,""),[w,b]=y.split(" "),C=w||"xMidYMid",S=b||"meet",k=s/A,I=a/o,N=Math.min(k,I),D=Math.max(k,I),Q=A,K=o;S==="meet"&&(Q*=N,K*=N),S==="slice"&&(Q*=D,K*=D);var L=new me(e,"refX",u),O=new me(e,"refY",f),W=L.hasValue()&&O.hasValue();if(W&&r.translate(-N*L.getPixels("x"),-N*O.getPixels("y")),d){var R=N*g,tt=N*m;r.beginPath(),r.moveTo(R,tt),r.lineTo(s,tt),r.lineTo(s,a),r.lineTo(R,a),r.closePath(),r.clip()}if(!W){var et=S==="meet"&&N===I,st=S==="slice"&&D===I,nt=S==="meet"&&N===k,at=S==="slice"&&D===k;C.startsWith("xMid")&&(et||st)&&r.translate(s/2-Q/2,0),C.endsWith("YMid")&&(nt||at)&&r.translate(0,a/2-K/2),C.startsWith("xMax")&&(et||st)&&r.translate(s-Q,0),C.endsWith("YMax")&&(nt||at)&&r.translate(0,a-K)}switch(!0){case C==="none":r.scale(k,I);break;case S==="meet":r.scale(N,N);break;case S==="slice":r.scale(D,D);break}r.translate(-l,-h)}start(t){var{enableRedraw:e=!1,ignoreMouse:r=!1,ignoreAnimation:n=!1,ignoreDimensions:s=!1,ignoreClear:A=!1,forceRedraw:a,scaleWidth:o,scaleHeight:l,offsetX:h,offsetY:u}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:f,mouse:d}=this,g=1e3/f;if(this.frameDuration=g,this.readyPromise=new Promise(C=>{this.resolveReady=C}),this.isReady()&&this.render(t,s,A,o,l,h,u),!!e){var m=Date.now(),y=m,w=0,b=()=>{m=Date.now(),w=m-y,w>=g&&(y=m-w%g,this.shouldUpdate(n,a)&&(this.render(t,s,A,o,l,h,u),d.runEvents())),this.intervalId=jx(b)};r||d.start(),this.intervalId=jx(b)}}stop(){this.intervalId&&(jx.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:r}=this,n=this.animations.reduce((s,A)=>A.update(r)||s,!1);if(n)return!0}return!!(typeof e=="function"&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(t,e,r,n,s,A,a){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:l,viewPort:h,ctx:u,isFirstRender:f}=this,d=u.canvas;h.clear(),d.width&&d.height?h.setCurrent(d.width,d.height):h.setCurrent(o,l);var g=t.getStyle("width"),m=t.getStyle("height");!e&&(f||typeof n!="number"&&typeof s!="number")&&(g.hasValue()&&(d.width=g.getPixels("x"),d.style&&(d.style.width="".concat(d.width,"px"))),m.hasValue()&&(d.height=m.getPixels("y"),d.style&&(d.style.height="".concat(d.height,"px"))));var y=d.clientWidth||d.width,w=d.clientHeight||d.height;if(e&&g.hasValue()&&m.hasValue()&&(y=g.getPixels("x"),w=m.getPixels("y")),h.setCurrent(y,w),typeof A=="number"&&t.getAttribute("x",!0).setValue(A),typeof a=="number"&&t.getAttribute("y",!0).setValue(a),typeof n=="number"||typeof s=="number"){var b=_s(t.getAttribute("viewBox").getString()),C=0,S=0;if(typeof n=="number"){var k=t.getStyle("width");k.hasValue()?C=k.getPixels("x")/n:isNaN(b[2])||(C=b[2]/n)}if(typeof s=="number"){var I=t.getStyle("height");I.hasValue()?S=I.getPixels("y")/s:isNaN(b[3])||(S=b[3]/s)}C||(C=S),S||(S=C),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(s);var N=t.getStyle("transform",!0,!0);N.setValue("".concat(N.getString()," scale(").concat(1/C,", ").concat(1/S,")"))}r||u.clearRect(0,0,y,w),t.render(u),f&&(this.isFirstRender=!1)}}o1.defaultWindow=DO;o1.defaultFetch=OO;var{defaultFetch:$$}=o1,Z$=typeof DOMParser<"u"?DOMParser:null;class yv{constructor(){var{fetch:t=$$,DOMParser:e=Z$}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return vl(function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)})()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return vl(function*(){var r=yield e.fetch(t),n=yield r.text();return e.parseFromString(n)})()}}class RO{constructor(t,e){this.type="translate",this.point=null,this.point=si.parse(e)}apply(t){var{x:e,y:r}=this.point;t.translate(e||0,r||0)}unapply(t){var{x:e,y:r}=this.point;t.translate(-1*e||0,-1*r||0)}applyToPoint(t){var{x:e,y:r}=this.point;t.applyTransform([1,0,0,1,e||0,r||0])}}class HO{constructor(t,e,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var n=_s(e);this.angle=new me(t,"angle",n[0]),this.originX=r[0],this.originY=r[1],this.cx=n[1]||0,this.cy=n[2]||0}apply(t){var{cx:e,cy:r,originX:n,originY:s,angle:A}=this,a=e+n.getPixels("x"),o=r+s.getPixels("y");t.translate(a,o),t.rotate(A.getRadians()),t.translate(-a,-o)}unapply(t){var{cx:e,cy:r,originX:n,originY:s,angle:A}=this,a=e+n.getPixels("x"),o=r+s.getPixels("y");t.translate(a,o),t.rotate(-1*A.getRadians()),t.translate(-a,-o)}applyToPoint(t){var{cx:e,cy:r,angle:n}=this,s=n.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(s),Math.sin(s),-Math.sin(s),Math.cos(s),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}class VO{constructor(t,e,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var n=si.parseScale(e);(n.x===0||n.y===0)&&(n.x=Lu,n.y=Lu),this.scale=n,this.originX=r[0],this.originY=r[1]}apply(t){var{scale:{x:e,y:r},originX:n,originY:s}=this,A=n.getPixels("x"),a=s.getPixels("y");t.translate(A,a),t.scale(e,r||e),t.translate(-A,-a)}unapply(t){var{scale:{x:e,y:r},originX:n,originY:s}=this,A=n.getPixels("x"),a=s.getPixels("y");t.translate(A,a),t.scale(1/e,1/r||e),t.translate(-A,-a)}applyToPoint(t){var{x:e,y:r}=this.scale;t.applyTransform([e||0,0,0,r||0,0,0])}}class SE{constructor(t,e,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=_s(e),this.originX=r[0],this.originY=r[1]}apply(t){var{originX:e,originY:r,matrix:n}=this,s=e.getPixels("x"),A=r.getPixels("y");t.translate(s,A),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),t.translate(-s,-A)}unapply(t){var{originX:e,originY:r,matrix:n}=this,s=n[0],A=n[2],a=n[4],o=n[1],l=n[3],h=n[5],u=0,f=0,d=1,g=1/(s*(l*d-h*f)-A*(o*d-h*u)+a*(o*f-l*u)),m=e.getPixels("x"),y=r.getPixels("y");t.translate(m,y),t.transform(g*(l*d-h*f),g*(h*u-o*d),g*(a*f-A*d),g*(s*d-a*u),g*(A*h-a*l),g*(a*o-s*h)),t.translate(-m,-y)}applyToPoint(t){t.applyTransform(this.matrix)}}class EE extends SE{constructor(t,e,r){super(t,e,r),this.type="skew",this.angle=null,this.angle=new me(t,"angle",e)}}class WO extends EE{constructor(t,e,r){super(t,e,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class jO extends EE{constructor(t,e,r){super(t,e,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function J$(i){return Gu(i).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function tZ(i){var[t,e]=i.split("(");return[t.trim(),e.trim().replace(")","")]}class Kh{constructor(t,e,r){this.document=t,this.transforms=[];var n=J$(e);n.forEach(s=>{if(s!=="none"){var[A,a]=tZ(s),o=Kh.transformTypes[A];typeof o<"u"&&this.transforms.push(new o(this.document,a,r))}})}static fromElement(t,e){var r=e.getStyle("transform",!1,!0),[n,s=n]=e.getStyle("transform-origin",!1,!0).split(),A=[n,s];return r.hasValue()?new Kh(t,r.getString(),A):null}apply(t){for(var{transforms:e}=this,r=e.length,n=0;n<r;n++)e[n].apply(t)}unapply(t){for(var{transforms:e}=this,r=e.length,n=r-1;n>=0;n--)e[n].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,r=e.length,n=0;n<r;n++)e[n].applyToPoint(t)}}Kh.transformTypes={translate:RO,rotate:HO,scale:VO,matrix:SE,skewX:WO,skewY:jO};class Sr{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=t,this.node=e,this.captureTextNodes=r,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!e||e.nodeType!==1)){if(Array.from(e.attributes).forEach(a=>{var o=_O(a.nodeName);this.attributes[o]=new me(t,o,a.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var n=this.getAttribute("style").getString().split(";").map(a=>a.trim());n.forEach(a=>{if(a){var[o,l]=a.split(":").map(h=>h.trim());this.styles[o]=new me(t,o,l)}})}var{definitions:s}=t,A=this.getAttribute("id");A.hasValue()&&(s[A.getString()]||(s[A.getString()]=this)),Array.from(e.childNodes).forEach(a=>{if(a.nodeType===1)this.addChild(a);else if(r&&(a.nodeType===3||a.nodeType===4)){var o=t.createTextNode(a);o.getText().length>0&&this.addChild(o)}})}}getAttribute(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[t];if(!r&&e){var n=new me(this.document,t,"");return this.attributes[t]=n,n}return r||me.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if(t==="href"||t.endsWith(":href"))return this.attributes[t];return me.empty(this.document)}getStyle(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.styles[t];if(n)return n;var s=this.getAttribute(t);if(s!=null&&s.hasValue())return this.styles[t]=s,s;if(!r){var{parent:A}=this;if(A){var a=A.getStyle(t);if(a!=null&&a.hasValue())return a}}if(e){var o=new me(this.document,t,"");return this.styles[t]=o,o}return n||me.empty(this.document)}render(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=Kh.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var n=r.getDefinition();n&&n.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach(e=>{e.render(t)})}addChild(t){var e=t instanceof Sr?t:this.document.createElement(t);e.parent=this,Sr.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e,{node:r}=this;if(typeof r.matches=="function")return r.matches(t);var n=(e=r.getAttribute)===null||e===void 0?void 0:e.call(r,"class");return!n||n===""?!1:n.split(" ").some(s=>".".concat(s)===t)}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:e}=this.document;for(var r in t)if(!r.startsWith("@")&&this.matchesSelector(r)){var n=t[r],s=e[r];if(n)for(var A in n){var a=this.stylesSpecificity[A];typeof a>"u"&&(a="000"),s>=a&&(this.styles[A]=n[A],this.stylesSpecificity[A]=s)}}}removeStyles(t,e){var r=e.reduce((n,s)=>{var A=t.getStyle(s);if(!A.hasValue())return n;var a=A.getString();return A.setValue(""),[...n,[s,a]]},[]);return r}restoreStyles(t,e){e.forEach(r=>{var[n,s]=r;t.getStyle(n,!0).setValue(s)})}isFirstChild(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}}Sr.ignoreChildTypes=["title"];class KO extends Sr{constructor(t,e,r){super(t,e,r)}}function eZ(i){var t=i.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function rZ(i){return typeof process>"u"?i:i.trim().split(",").map(eZ).join(",")}function iZ(i){if(!i)return"";var t=i.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function nZ(i){if(!i)return"";var t=i.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}class zn{constructor(t,e,r,n,s,A){var a=A?typeof A=="string"?zn.parse(A):A:{};this.fontFamily=s||a.fontFamily,this.fontSize=n||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=r||a.fontWeight,this.fontVariant=e||a.fontVariant}static parse(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,r="",n="",s="",A="",a="",o=Gu(t).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(h=>{switch(!0){case(!l.fontStyle&&zn.styles.includes(h)):h!=="inherit"&&(r=h),l.fontStyle=!0;break;case(!l.fontVariant&&zn.variants.includes(h)):h!=="inherit"&&(n=h),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&zn.weights.includes(h)):h!=="inherit"&&(s=h),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:h!=="inherit"&&([A]=h.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:h!=="inherit"&&(a+=h)}}),new zn(r,n,s,A,a,e)}toString(){return[iZ(this.fontStyle),this.fontVariant,nZ(this.fontWeight),this.fontSize,rZ(this.fontFamily)].join(" ").trim()}}zn.styles="normal|italic|oblique|inherit";zn.variants="normal|small-caps|inherit";zn.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class DA{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=t,this.y1=e,this.x2=r,this.y2=n,this.addPoint(t,e),this.addPoint(r,n)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:e,y1:r,x2:n,y2:s}=t;this.addPoint(e,r),this.addPoint(n,s)}}sumCubic(t,e,r,n,s){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*s}bezierCurveAdd(t,e,r,n,s){var A=6*e-12*r+6*n,a=-3*e+9*r-9*n+3*s,o=3*r-3*e;if(a===0){if(A===0)return;var l=-o/A;0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,n,s)):this.addY(this.sumCubic(l,e,r,n,s)));return}var h=Math.pow(A,2)-4*o*a;if(!(h<0)){var u=(-A+Math.sqrt(h))/(2*a);0<u&&u<1&&(t?this.addX(this.sumCubic(u,e,r,n,s)):this.addY(this.sumCubic(u,e,r,n,s)));var f=(-A-Math.sqrt(h))/(2*a);0<f&&f<1&&(t?this.addX(this.sumCubic(f,e,r,n,s)):this.addY(this.sumCubic(f,e,r,n,s)))}}addBezierCurve(t,e,r,n,s,A,a,o){this.addPoint(t,e),this.addPoint(a,o),this.bezierCurveAdd(!0,t,r,s,a),this.bezierCurveAdd(!1,e,n,A,o)}addQuadraticCurve(t,e,r,n,s,A){var a=t+.6666666666666666*(r-t),o=e+2/3*(n-e),l=a+1/3*(s-t),h=o+1/3*(A-e);this.addBezierCurve(t,e,a,l,o,h,s,A)}isPointInBox(t,e){var{x1:r,y1:n,x2:s,y2:A}=this;return r<=t&&t<=s&&n<=e&&e<=A}}class Le extends Qt{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new si(0,0),this.control=new si(0,0),this.current=new si(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:e}=this;return t>=e.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",r=new si(this.command[t],this.command[e]);return this.makeAbsolute(r)}getAsControlPoint(t,e){var r=this.getPoint(t,e);return this.control=r,r}getAsCurrentPoint(t,e){var r=this.getPoint(t,e);return this.current=r,r}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==Qt.CURVE_TO&&t!==Qt.SMOOTH_CURVE_TO&&t!==Qt.QUAD_TO&&t!==Qt.SMOOTH_QUAD_TO)return this.current;var{current:{x:e,y:r},control:{x:n,y:s}}=this,A=new si(2*e-n,2*r-s);return A}makeAbsolute(t){if(this.command.relative){var{x:e,y:r}=this.current;t.x+=e,t.y+=r}return t}addMarker(t,e,r){var{points:n,angles:s}=this;r&&s.length>0&&!s[s.length-1]&&(s[s.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,e=t.length,r=0;r<e;r++)if(!t[r]){for(var n=r+1;n<e;n++)if(t[n]){t[r]=t[n];break}}return t}}class Xh extends Sr{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),e=e.parent}return t}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e){var r=this.getStyle("fill"),n=this.getStyle("fill-opacity"),s=this.getStyle("stroke"),A=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var a=r.getFillStyleDefinition(this,n);a&&(t.fillStyle=a)}else if(r.hasValue()){r.getString()==="currentColor"&&r.setValue(this.getStyle("color").getColor());var o=r.getColor();o!=="inherit"&&(t.fillStyle=o==="none"?"rgba(0,0,0,0)":o)}if(n.hasValue()){var l=new me(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=l}if(s.isUrlDefinition()){var h=s.getFillStyleDefinition(this,A);h&&(t.strokeStyle=h)}else if(s.hasValue()){s.getString()==="currentColor"&&s.setValue(this.getStyle("color").getColor());var u=s.getString();u!=="inherit"&&(t.strokeStyle=u==="none"?"rgba(0,0,0,0)":u)}if(A.hasValue()){var f=new me(this.document,"stroke",t.strokeStyle).addOpacity(A).getString();t.strokeStyle=f}var d=this.getStyle("stroke-width");if(d.hasValue()){var g=d.getPixels();t.lineWidth=g||Lu}var m=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),w=this.getStyle("stroke-miterlimit"),b=this.getStyle("stroke-dasharray"),C=this.getStyle("stroke-dashoffset");if(m.hasValue()&&(t.lineCap=m.getString()),y.hasValue()&&(t.lineJoin=y.getString()),w.hasValue()&&(t.miterLimit=w.getNumber()),b.hasValue()&&b.getString()!=="none"){var S=_s(b.getString());typeof t.setLineDash<"u"?t.setLineDash(S):typeof t.webkitLineDash<"u"?t.webkitLineDash=S:typeof t.mozDash<"u"&&!(S.length===1&&S[0]===0)&&(t.mozDash=S);var k=C.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=k:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=k:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=k)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){var I=this.getStyle("font"),N=this.getStyle("font-style"),D=this.getStyle("font-variant"),Q=this.getStyle("font-weight"),K=this.getStyle("font-size"),L=this.getStyle("font-family"),O=new zn(N.getString(),D.getString(),Q.getString(),K.hasValue()?"".concat(K.getPixels(!0),"px"):"",L.getString(),zn.parse(I.getString(),t.font));N.setValue(O.fontStyle),D.setValue(O.fontVariant),Q.setValue(O.fontWeight),K.setValue(O.fontSize),L.setValue(O.fontFamily),t.font=O.toString(),K.isPixels()&&(this.document.emSize=K.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}}class er extends Xh{constructor(t,e,r){super(t,e,r),this.type="path",this.pathParser=null,this.pathParser=new Le(this.getAttribute("d").getString())}path(t){var{pathParser:e}=this,r=new DA;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case Le.MOVE_TO:this.pathM(t,r);break;case Le.LINE_TO:this.pathL(t,r);break;case Le.HORIZ_LINE_TO:this.pathH(t,r);break;case Le.VERT_LINE_TO:this.pathV(t,r);break;case Le.CURVE_TO:this.pathC(t,r);break;case Le.SMOOTH_CURVE_TO:this.pathS(t,r);break;case Le.QUAD_TO:this.pathQ(t,r);break;case Le.SMOOTH_QUAD_TO:this.pathT(t,r);break;case Le.ARC:this.pathA(t,r);break;case Le.CLOSE_PATH:this.pathZ(t,r);break}return r}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,e=t.getMarkerPoints(),r=t.getMarkerAngles(),n=e.map((s,A)=>[s,r[A]]);return n}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");t.fillStyle!==""&&(e.getString("inherit")!=="inherit"?t.fill(e.getString()):t.fill()),t.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var n=r.length-1,s=this.getStyle("marker-start"),A=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(s.isUrlDefinition()){var o=s.getDefinition(),[l,h]=r[0];o.render(t,l,h)}if(A.isUrlDefinition())for(var u=A.getDefinition(),f=1;f<n;f++){var[d,g]=r[f];u.render(t,d,g)}if(a.isUrlDefinition()){var m=a.getDefinition(),[y,w]=r[n];m.render(t,y,w)}}}static pathM(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){var{pathParser:r}=this,{point:n}=er.pathM(r),{x:s,y:A}=n;r.addMarker(n),e.addPoint(s,A),t&&t.moveTo(s,A)}static pathL(t){var{current:e}=t,r=t.getAsCurrentPoint();return{current:e,point:r}}pathL(t,e){var{pathParser:r}=this,{current:n,point:s}=er.pathL(r),{x:A,y:a}=s;r.addMarker(s,n),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathH(t){var{current:e,command:r}=t,n=new si((r.relative?e.x:0)+r.x,e.y);return t.current=n,{current:e,point:n}}pathH(t,e){var{pathParser:r}=this,{current:n,point:s}=er.pathH(r),{x:A,y:a}=s;r.addMarker(s,n),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathV(t){var{current:e,command:r}=t,n=new si(e.x,(r.relative?e.y:0)+r.y);return t.current=n,{current:e,point:n}}pathV(t,e){var{pathParser:r}=this,{current:n,point:s}=er.pathV(r),{x:A,y:a}=s;r.addMarker(s,n),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathC(t){var{current:e}=t,r=t.getPoint("x1","y1"),n=t.getAsControlPoint("x2","y2"),s=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:n,currentPoint:s}}pathC(t,e){var{pathParser:r}=this,{current:n,point:s,controlPoint:A,currentPoint:a}=er.pathC(r);r.addMarker(a,A,s),e.addBezierCurve(n.x,n.y,s.x,s.y,A.x,A.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,A.x,A.y,a.x,a.y)}static pathS(t){var{current:e}=t,r=t.getReflectedControlPoint(),n=t.getAsControlPoint("x2","y2"),s=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:n,currentPoint:s}}pathS(t,e){var{pathParser:r}=this,{current:n,point:s,controlPoint:A,currentPoint:a}=er.pathS(r);r.addMarker(a,A,s),e.addBezierCurve(n.x,n.y,s.x,s.y,A.x,A.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,A.x,A.y,a.x,a.y)}static pathQ(t){var{current:e}=t,r=t.getAsControlPoint("x1","y1"),n=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:n}}pathQ(t,e){var{pathParser:r}=this,{current:n,controlPoint:s,currentPoint:A}=er.pathQ(r);r.addMarker(A,s,s),e.addQuadraticCurve(n.x,n.y,s.x,s.y,A.x,A.y),t&&t.quadraticCurveTo(s.x,s.y,A.x,A.y)}static pathT(t){var{current:e}=t,r=t.getReflectedControlPoint();t.control=r;var n=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:n}}pathT(t,e){var{pathParser:r}=this,{current:n,controlPoint:s,currentPoint:A}=er.pathT(r);r.addMarker(A,s,s),e.addQuadraticCurve(n.x,n.y,s.x,s.y,A.x,A.y),t&&t.quadraticCurveTo(s.x,s.y,A.x,A.y)}static pathA(t){var{current:e,command:r}=t,{rX:n,rY:s,xRot:A,lArcFlag:a,sweepFlag:o}=r,l=A*(Math.PI/180),h=t.getAsCurrentPoint(),u=new si(Math.cos(l)*(e.x-h.x)/2+Math.sin(l)*(e.y-h.y)/2,-Math.sin(l)*(e.x-h.x)/2+Math.cos(l)*(e.y-h.y)/2),f=Math.pow(u.x,2)/Math.pow(n,2)+Math.pow(u.y,2)/Math.pow(s,2);f>1&&(n*=Math.sqrt(f),s*=Math.sqrt(f));var d=(a===o?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(s,2)-Math.pow(n,2)*Math.pow(u.y,2)-Math.pow(s,2)*Math.pow(u.x,2))/(Math.pow(n,2)*Math.pow(u.y,2)+Math.pow(s,2)*Math.pow(u.x,2)));isNaN(d)&&(d=0);var g=new si(d*n*u.y/s,d*-s*u.x/n),m=new si((e.x+h.x)/2+Math.cos(l)*g.x-Math.sin(l)*g.y,(e.y+h.y)/2+Math.sin(l)*g.x+Math.cos(l)*g.y),y=gS([1,0],[(u.x-g.x)/n,(u.y-g.y)/s]),w=[(u.x-g.x)/n,(u.y-g.y)/s],b=[(-u.x-g.x)/n,(-u.y-g.y)/s],C=gS(w,b);return Uy(w,b)<=-1&&(C=Math.PI),Uy(w,b)>=1&&(C=0),{currentPoint:h,rX:n,rY:s,sweepFlag:o,xAxisRotation:l,centp:m,a1:y,ad:C}}pathA(t,e){var{pathParser:r}=this,{currentPoint:n,rX:s,rY:A,sweepFlag:a,xAxisRotation:o,centp:l,a1:h,ad:u}=er.pathA(r),f=1-a?1:-1,d=h+f*(u/2),g=new si(l.x+s*Math.cos(d),l.y+A*Math.sin(d));if(r.addMarkerAngle(g,d-f*Math.PI/2),r.addMarkerAngle(n,d-f*Math.PI),e.addPoint(n.x,n.y),t&&!isNaN(h)&&!isNaN(u)){var m=s>A?s:A,y=s>A?1:s/A,w=s>A?A/s:1;t.translate(l.x,l.y),t.rotate(o),t.scale(y,w),t.arc(0,0,m,h,h+u,!!(1-a)),t.scale(1/y,1/w),t.rotate(-o),t.translate(-l.x,-l.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){er.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}}class kE extends er{constructor(t,e,r){super(t,e,r),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class yl extends Xh{constructor(t,e,r){super(t,e,new.target===yl?!0:r),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(t,e);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(t.textBaseline=r)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if(this.type!=="text")return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var e=null;return this.children.forEach((r,n)=>{var s=this.getChildBoundingBox(t,this,this,n);e?e.addBoundingBox(s):e=s}),e}getFontSize(){var{document:t,parent:e}=this,r=zn.parse(t.ctx.font).fontSize,n=e.getStyle("font-size").getNumber(r);return n}getTElementBoundingBox(t){var e=this.getFontSize();return new DA(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,r){var n=e[r],s=null;if(t.isArabic){var A=e.length,a=e[r-1],o=e[r+1],l="isolated";if((r===0||a===" ")&&r<A-1&&o!==" "&&(l="terminal"),r>0&&a!==" "&&r<A-1&&o!==" "&&(l="medial"),r>0&&a!==" "&&(r===A-1||o===" ")&&(l="initial"),typeof t.glyphs[n]<"u"){var h=t.glyphs[n];s=h instanceof kE?h:h[l]}}else s=t.glyphs[n];return s||(s=t.missingGlyph),s}getText(){return""}getTextFromNode(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),n=r.indexOf(e),s=r.length-1,A=Gu(e.textContent||"");return n===0&&(A=QO(A)),n===s&&(A=LO(A)),A}renderChildren(t){if(this.type!=="text"){this.renderTElementChildren(t);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((r,n)=>{this.renderChild(t,this,this,n)});var{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){var{document:e,parent:r}=this,n=this.getText(),s=r.getStyle("font-family").getDefinition();if(s){for(var{unitsPerEm:A}=s.fontFace,a=zn.parse(e.ctx.font),o=r.getStyle("font-size").getNumber(a.fontSize),l=r.getStyle("font-style").getString(a.fontStyle),h=o/A,u=s.isRTL?n.split("").reverse().join(""):n,f=_s(r.getAttribute("dx").getString()),d=u.length,g=0;g<d;g++){var m=this.getGlyph(s,u,g);t.translate(this.x,this.y),t.scale(h,-h);var y=t.lineWidth;t.lineWidth=t.lineWidth*A/o,l==="italic"&&t.transform(1,0,.4,1,0,0),m.render(t),l==="italic"&&t.transform(1,0,-.4,1,0,0),t.lineWidth=y,t.scale(1/h,-1/h),t.translate(-this.x,-this.y),this.x+=o*(m.horizAdvX||s.horizAdvX)/A,typeof f[g]<"u"&&!isNaN(f[g])&&(this.x+=f[g])}return}var{x:w,y:b}=this;t.fillStyle&&t.fillText(n,w,b),t.strokeStyle&&t.strokeText(n,w,b)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),r=!1,n=0;e==="start"&&!r||e==="end"&&r?n=t.x-this.minX:e==="end"&&!r||e==="start"&&r?n=t.x-this.maxX:n=t.x-(this.minX+this.maxX)/2;for(var s=this.textChunkStart;s<this.leafTexts.length;s++)this.leafTexts[s].x+=n;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach((e,r)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,r,n){var s=r.children[n];s.children.length>0?s.children.forEach((A,a)=>{e.adjustChildCoordinatesRecursiveCore(t,e,s,a)}):this.adjustChildCoordinates(t,e,r,n)}adjustChildCoordinates(t,e,r,n){var s=r.children[n];if(typeof s.measureText!="function")return s;t.save(),s.setContext(t,!0);var A=s.getAttribute("x"),a=s.getAttribute("y"),o=s.getAttribute("dx"),l=s.getAttribute("dy"),h=s.getStyle("font-family").getDefinition(),u=!!h&&h.isRTL;n===0&&(A.hasValue()||A.setValue(s.getInheritedAttribute("x")),a.hasValue()||a.setValue(s.getInheritedAttribute("y")),o.hasValue()||o.setValue(s.getInheritedAttribute("dx")),l.hasValue()||l.setValue(s.getInheritedAttribute("dy")));var f=s.measureText(t);return u&&(e.x-=f),A.hasValue()?(e.applyAnchoring(),s.x=A.getPixels("x"),o.hasValue()&&(s.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),s.x=e.x),e.x=s.x,u||(e.x+=f),a.hasValue()?(s.y=a.getPixels("y"),l.hasValue()&&(s.y+=l.getPixels("y"))):(l.hasValue()&&(e.y+=l.getPixels("y")),s.y=e.y),e.y=s.y,e.leafTexts.push(s),e.minX=Math.min(e.minX,s.x,s.x+f),e.maxX=Math.max(e.maxX,s.x,s.x+f),s.clearContext(t),t.restore(),s}getChildBoundingBox(t,e,r,n){var s=r.children[n];if(typeof s.getBoundingBox!="function")return null;var A=s.getBoundingBox(t);return A?(s.children.forEach((a,o)=>{var l=e.getChildBoundingBox(t,e,s,o);A.addBoundingBox(l)}),A):null}renderChild(t,e,r,n){var s=r.children[n];s.render(t),s.children.forEach((A,a)=>{e.renderChild(t,e,s,a)})}measureText(t){var{measureCache:e}=this;if(~e)return e;var r=this.getText(),n=this.measureTargetText(t,r);return this.measureCache=n,n}measureTargetText(t,e){if(!e.length)return 0;var{parent:r}=this,n=r.getStyle("font-family").getDefinition();if(n){for(var s=this.getFontSize(),A=n.isRTL?e.split("").reverse().join(""):e,a=_s(r.getAttribute("dx").getString()),o=A.length,l=0,h=0;h<o;h++){var u=this.getGlyph(n,A,h);l+=(u.horizAdvX||n.horizAdvX)*s/n.fontFace.unitsPerEm,typeof a[h]<"u"&&!isNaN(a[h])&&(l+=a[h])}return l}if(!t.measureText)return e.length*10;t.save(),this.setContext(t,!0);var{width:f}=t.measureText(e);return this.clearContext(t),t.restore(),f}getInheritedAttribute(t){for(var e=this;e instanceof yl&&e.isFirstChild();){var r=e.parent.getAttribute(t);if(r.hasValue(!0))return r.getValue("0");e=e.parent}return null}}class l1 extends yl{constructor(t,e,r){super(t,e,new.target===l1?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class sZ extends l1{constructor(){super(...arguments),this.type="textNode"}}class Ip extends Xh{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var e,{document:r}=this,{screen:n,window:s}=r,A=t.canvas;if(n.setDefaults(t),A.style&&typeof t.font<"u"&&s&&typeof s.getComputedStyle<"u"){t.font=s.getComputedStyle(A).getPropertyValue("font");var a=new me(r,"fontSize",zn.parse(t.font).fontSize);a.hasValue()&&(r.rootEmSize=a.getPixels("y"),r.emSize=r.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:o,height:l}=n.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var h=this.getAttribute("refX"),u=this.getAttribute("refY"),f=this.getAttribute("viewBox"),d=f.hasValue()?_s(f.getString()):null,g=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",m=0,y=0,w=0,b=0;d&&(m=d[0],y=d[1]),this.root||(o=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(w=m,b=y,m=0,y=0)),n.viewPort.setCurrent(o,l),this.node&&(!this.parent||((e=this.node.parentNode)===null||e===void 0?void 0:e.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),d&&(o=d[2],l=d[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:o,height:n.viewPort.height,desiredHeight:l,minX:m,minY:y,refX:h.getValue(),refY:u.getValue(),clip:g,clipX:w,clipY:b}),d&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(o,l))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.getAttribute("width",!0),s=this.getAttribute("height",!0),A=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=n.getNumber(0),l=s.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(t),s.setValue(e),A.hasValue()||A.setValue("0 0 ".concat(o||t," ").concat(l||e)),a.hasValue()){var u=this.getStyle("width"),f=this.getStyle("height");u.hasValue()&&u.setValue("".concat(t,"px")),f.hasValue()&&f.setValue("".concat(e,"px"))}}}class UE extends er{constructor(){super(...arguments),this.type="rect"}path(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),s=this.getStyle("height",!1,!0).getPixels("y"),A=this.getAttribute("rx"),a=this.getAttribute("ry"),o=A.getPixels("x"),l=a.getPixels("y");if(A.hasValue()&&!a.hasValue()&&(l=o),a.hasValue()&&!A.hasValue()&&(o=l),o=Math.min(o,n/2),l=Math.min(l,s/2),t){var h=4*((Math.sqrt(2)-1)/3);t.beginPath(),s>0&&n>0&&(t.moveTo(e+o,r),t.lineTo(e+n-o,r),t.bezierCurveTo(e+n-o+h*o,r,e+n,r+l-h*l,e+n,r+l),t.lineTo(e+n,r+s-l),t.bezierCurveTo(e+n,r+s-l+h*l,e+n-o+h*o,r+s,e+n-o,r+s),t.lineTo(e+o,r+s),t.bezierCurveTo(e+o-h*o,r+s,e,r+s-l+h*l,e,r+s-l),t.lineTo(e,r+l),t.bezierCurveTo(e,r+l-h*l,e+o-h*o,r,e+o,r),t.closePath())}return new DA(e,r,e+n,r+s)}getMarkers(){return null}}class GO extends er{constructor(){super(...arguments),this.type="circle"}path(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,r,n,0,Math.PI*2,!1),t.closePath()),new DA(e-n,r-n,e+n,r+n)}getMarkers(){return null}}class zO extends er{constructor(){super(...arguments),this.type="ellipse"}path(t){var e=4*((Math.sqrt(2)-1)/3),r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),s=this.getAttribute("cx").getPixels("x"),A=this.getAttribute("cy").getPixels("y");return t&&r>0&&n>0&&(t.beginPath(),t.moveTo(s+r,A),t.bezierCurveTo(s+r,A+e*n,s+e*r,A+n,s,A+n),t.bezierCurveTo(s-e*r,A+n,s-r,A+e*n,s-r,A),t.bezierCurveTo(s-r,A-e*n,s-e*r,A-n,s,A-n),t.bezierCurveTo(s+e*r,A-n,s+r,A-e*n,s+r,A),t.closePath()),new DA(s-r,A-n,s+r,A+n)}getMarkers(){return null}}class qO extends er{constructor(){super(...arguments),this.type="line"}getPoints(){return[new si(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new si(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:e,y:r},{x:n,y:s}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,r),t.lineTo(n,s)),new DA(e,r,n,s)}getMarkers(){var[t,e]=this.getPoints(),r=t.angleTo(e);return[[t,r],[e,r]]}}class IE extends er{constructor(t,e,r){super(t,e,r),this.type="polyline",this.points=[],this.points=si.parsePath(this.getAttribute("points").getString())}path(t){var{points:e}=this,[{x:r,y:n}]=e,s=new DA(r,n);return t&&(t.beginPath(),t.moveTo(r,n)),e.forEach(A=>{var{x:a,y:o}=A;s.addPoint(a,o),t&&t.lineTo(a,o)}),s}getMarkers(){var{points:t}=this,e=t.length-1,r=[];return t.forEach((n,s)=>{s!==e&&r.push([n,n.angleTo(t[s+1])])}),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}class XO extends IE{constructor(){super(...arguments),this.type="polygon"}path(t){var e=super.path(t),[{x:r,y:n}]=this.points;return t&&(t.lineTo(r,n),t.closePath()),e}}class YO extends Sr{constructor(){super(...arguments),this.type="pattern"}createPattern(t,e,r){var n=this.getStyle("width").getPixels("x",!0),s=this.getStyle("height").getPixels("y",!0),A=new Ip(this.document,null);A.attributes.viewBox=new me(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.width=new me(this.document,"width","".concat(n,"px")),A.attributes.height=new me(this.document,"height","".concat(s,"px")),A.attributes.transform=new me(this.document,"transform",this.getAttribute("patternTransform").getValue()),A.children=this.children;var a=this.document.createCanvas(n,s),o=a.getContext("2d"),l=this.getAttribute("x"),h=this.getAttribute("y");l.hasValue()&&h.hasValue()&&o.translate(l.getPixels("x",!0),h.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var u=-1;u<=1;u++)for(var f=-1;f<=1;f++)o.save(),A.attributes.x=new me(this.document,"x",u*a.width),A.attributes.y=new me(this.document,"y",f*a.height),A.render(o),o.restore();var d=t.createPattern(a,"repeat");return d}}class $O extends Sr{constructor(){super(...arguments),this.type="marker"}render(t,e,r){if(e){var{x:n,y:s}=e,A=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(n,s),A==="auto"&&t.rotate(r),a==="strokeWidth"&&t.scale(t.lineWidth,t.lineWidth),t.save();var o=new Ip(this.document,null);o.type=this.type,o.attributes.viewBox=new me(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new me(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new me(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new me(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new me(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new me(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new me(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new me(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),a==="strokeWidth"&&t.scale(1/t.lineWidth,1/t.lineWidth),A==="auto"&&t.rotate(-r),t.translate(-n,-s)}}}class ZO extends Sr{constructor(){super(...arguments),this.type="defs"}render(){}}class Fb extends Xh{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var e=new DA;return this.children.forEach(r=>{e.addBoundingBox(r.getBoundingBox(t))}),e}}class QE extends Sr{constructor(t,e,r){super(t,e,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:n,children:s}=this;s.forEach(A=>{A.type==="stop"&&n.push(A)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,r){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));var{stops:s}=n,A=this.getGradient(t,e);if(!A)return this.addParentOpacity(r,s[s.length-1].color);if(s.forEach(y=>{A.addColorStop(y.offset,this.addParentOpacity(r,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:a}=this,{MAX_VIRTUAL_PIXELS:o,viewPort:l}=a.screen,[h]=l.viewPorts,u=new UE(a,null);u.attributes.x=new me(a,"x",-o/3),u.attributes.y=new me(a,"y",-o/3),u.attributes.width=new me(a,"width",o),u.attributes.height=new me(a,"height",o);var f=new Fb(a,null);f.attributes.transform=new me(a,"transform",this.getAttribute("gradientTransform").getValue()),f.children=[u];var d=new Ip(a,null);d.attributes.x=new me(a,"x",0),d.attributes.y=new me(a,"y",0),d.attributes.width=new me(a,"width",h.width),d.attributes.height=new me(a,"height",h.height),d.children=[f];var g=a.createCanvas(h.width,h.height),m=g.getContext("2d");return m.fillStyle=A,d.render(m),m.createPattern(g,"no-repeat")}return A}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){if(t.hasValue()){var r=new me(this.document,"color",e);return r.addOpacity(t).getColor()}return e}}class JO extends QE{constructor(t,e,r){super(t,e,r),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",n=r?e.getBoundingBox(t):null;if(r&&!n)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var s=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),A=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return s===a&&A===o?null:t.createLinearGradient(s,A,a,o)}}class t8 extends QE{constructor(t,e,r){super(t,e,r),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",n=e.getBoundingBox(t);if(r&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var s=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),A=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=s,o=A;this.getAttribute("fx").hasValue()&&(a=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,o,h,s,A,l)}}class e8 extends Sr{constructor(t,e,r){super(t,e,r),this.type="stop";var n=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),s=this.getStyle("stop-opacity"),A=this.getStyle("stop-color",!0);A.getString()===""&&A.setValue("#000"),s.hasValue()&&(A=A.addOpacity(s)),this.offset=n,this.color=A.getColor()}}class Sb extends Sr{constructor(t,e,r){super(t,e,r),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new me(t,"values",null);var n=this.getAttribute("values");n.hasValue()&&this.values.setValue(n.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return t==="CSS"?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){var{initialUnits:t}=this,{progress:e,from:r,to:n}=this.getProgress(),s=r.getNumber()+(n.getNumber()-r.getNumber())*e;return t==="%"&&(s*=100),"".concat(s).concat(t)}update(t){var{parent:e}=this,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(n==="freeze"&&!this.frozen)this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();else if(n==="remove"&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=t;var s=!1;if(this.begin<this.duration){var A=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var o=a.getString();A="".concat(o,"(").concat(A,")")}r.setValue(A),s=!0}return s}getProgress(){var{document:t,values:e}=this,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var n=r.progress*(e.getValue().length-1),s=Math.floor(n),A=Math.ceil(n);r.from=new me(t,"from",parseFloat(e.getValue()[s])),r.to=new me(t,"to",parseFloat(e.getValue()[A])),r.progress=(n-s)/(A-s)}else r.from=this.from,r.to=this.to;return r}}class r8 extends Sb{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),n=new dS(e.getColor()),s=new dS(r.getColor());if(n.ok&&s.ok){var A=n.r+(s.r-n.r)*t,a=n.g+(s.g-n.g)*t,o=n.b+(s.b-n.b)*t;return"rgb(".concat(Math.floor(A),", ").concat(Math.floor(a),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}class i8 extends Sb{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),n=_s(e.getString()),s=_s(r.getString()),A=n.map((a,o)=>{var l=s[o];return a+(l-a)*t}).join(" ");return A}}class n8 extends Sr{constructor(t,e,r){super(t,e,r),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:n}=t,{children:s}=this;for(var A of s)switch(A.type){case"font-face":{this.fontFace=A;var a=A.getStyle("font-family");a.hasValue()&&(n[a.getString()]=this);break}case"missing-glyph":this.missingGlyph=A;break;case"glyph":{var o=A;o.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[o.unicode]>"u"&&(this.glyphs[o.unicode]=Object.create(null)),this.glyphs[o.unicode][o.arabicForm]=o):this.glyphs[o.unicode]=o;break}}}render(){}}class s8 extends Sr{constructor(t,e,r){super(t,e,r),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class A8 extends er{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class a8 extends yl{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}class o8 extends yl{constructor(t,e,r){super(t,e,r),this.type="a";var{childNodes:n}=e,s=n[0],A=n.length>0&&Array.from(n).every(a=>a.nodeType===3);this.hasText=A,this.text=A?this.getTextFromNode(s):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:e,x:r,y:n}=this,{mouse:s}=e.screen,A=new me(e,"fontSize",zn.parse(e.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new DA(r,n-A.getPixels("y"),r+this.measureText(t),n))}else if(this.children.length>0){var a=new Fb(this.document,null);a.children=this.children,a.parent=this,a.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){var t=this.document.ctx;t.canvas.style.cursor="pointer"}}function qM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),e.push.apply(e,r)}return e}function _w(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(e),!0).forEach(function(r){xE(i,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):qM(Object(e)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(e,r))})}return i}class l8 extends yl{constructor(t,e,r){super(t,e,r),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var n=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(n)}getText(){return this.text}path(t){var{dataArray:e}=this;t&&t.beginPath(),e.forEach(r=>{var{type:n,points:s}=r;switch(n){case Le.LINE_TO:t&&t.lineTo(s[0],s[1]);break;case Le.MOVE_TO:t&&t.moveTo(s[0],s[1]);break;case Le.CURVE_TO:t&&t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case Le.QUAD_TO:t&&t.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case Le.ARC:{var[A,a,o,l,h,u,f,d]=s,g=o>l?o:l,m=o>l?1:o/l,y=o>l?l/o:1;t&&(t.translate(A,a),t.rotate(f),t.scale(m,y),t.arc(0,0,g,h,h+u,!!(1-d)),t.scale(1/m,1/y),t.rotate(-f),t.translate(-A,-a));break}case Le.CLOSE_PATH:t&&t.closePath();break}})}renderChildren(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),{glyphInfo:n}=this,s=t.fillStyle;e==="underline"&&t.beginPath(),n.forEach((A,a)=>{var{p0:o,p1:l,rotation:h,text:u}=A;t.save(),t.translate(o.x,o.y),t.rotate(h),t.fillStyle&&t.fillText(u,0,0),t.strokeStyle&&t.strokeText(u,0,0),t.restore(),e==="underline"&&(a===0&&t.moveTo(o.x,o.y+r/8),t.lineTo(l.x,l.y+r/5))}),e==="underline"&&(t.lineWidth=r/20,t.strokeStyle=s,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,r,n,s,A,a,o,l){var h=A,u=this.measureText(t,o);o===" "&&e==="justify"&&r<n&&(u+=(n-r)/s),l>-1&&(h+=this.getLetterSpacingAt(l));var f=this.textHeight/20,d=this.getEquidistantPointOnPath(h,f,0),g=this.getEquidistantPointOnPath(h+u,f,0),m={p0:d,p1:g},y=d&&g?Math.atan2(g.y-d.y,g.x-d.x):0;if(a){var w=Math.cos(Math.PI/2+y)*a,b=Math.cos(-y)*a;m.p0=_w(_w({},d),{},{x:d.x+w,y:d.y+b}),m.p1=_w(_w({},g),{},{x:g.x+w,y:g.y+b})}return h+=u,{offset:h,segment:m,rotation:y}}measureText(t,e){var{measuresCache:r}=this,n=e||this.getText();if(r.has(n))return r.get(n);var s=this.measureTargetText(t,n);return r.set(n,s),s}setTextData(t){if(!this.glyphInfo){var e=this.getText(),r=e.split(""),n=e.split(" ").length-1,s=this.parent.getAttribute("dx").split().map(S=>S.getPixels("x")),A=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),h=0;!o.hasValue()||o.getValue()==="inherit"?h=l.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(h=o.getPixels());var u=[],f=e.length;this.letterSpacingCache=u;for(var d=0;d<f;d++)u.push(typeof s[d]<"u"?s[d]:h);var g=u.reduce((S,k,I)=>I===0?0:S+k||0,0),m=this.measureText(t),y=Math.max(m+g,0);this.textWidth=m,this.textHeight=this.getFontSize(),this.glyphInfo=[];var w=this.getPathLength(),b=this.getStyle("startOffset").getNumber(0)*w,C=0;(a==="middle"||a==="center")&&(C=-y/2),(a==="end"||a==="right")&&(C=-y),C+=b,r.forEach((S,k)=>{var{offset:I,segment:N,rotation:D}=this.findSegmentToFitChar(t,a,y,w,n,C,A,S,k);C=I,!(!N.p0||!N.p1)&&this.glyphInfo.push({text:r[k],p0:N.p0,p1:N.p1,rotation:D})})}}parsePathData(t){if(this.pathLength=-1,!t)return[];var e=[],{pathParser:r}=t;for(r.reset();!r.isEnd();){var{current:n}=r,s=n?n.x:0,A=n?n.y:0,a=r.next(),o=a.type,l=[];switch(a.type){case Le.MOVE_TO:this.pathM(r,l);break;case Le.LINE_TO:o=this.pathL(r,l);break;case Le.HORIZ_LINE_TO:o=this.pathH(r,l);break;case Le.VERT_LINE_TO:o=this.pathV(r,l);break;case Le.CURVE_TO:this.pathC(r,l);break;case Le.SMOOTH_CURVE_TO:o=this.pathS(r,l);break;case Le.QUAD_TO:this.pathQ(r,l);break;case Le.SMOOTH_QUAD_TO:o=this.pathT(r,l);break;case Le.ARC:l=this.pathA(r);break;case Le.CLOSE_PATH:er.pathZ(r);break}a.type!==Le.CLOSE_PATH?e.push({type:o,points:l,start:{x:s,y:A},pathLength:this.calcLength(s,A,o,l)}):e.push({type:Le.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){var{x:r,y:n}=er.pathM(t).point;e.push(r,n)}pathL(t,e){var{x:r,y:n}=er.pathL(t).point;return e.push(r,n),Le.LINE_TO}pathH(t,e){var{x:r,y:n}=er.pathH(t).point;return e.push(r,n),Le.LINE_TO}pathV(t,e){var{x:r,y:n}=er.pathV(t).point;return e.push(r,n),Le.LINE_TO}pathC(t,e){var{point:r,controlPoint:n,currentPoint:s}=er.pathC(t);e.push(r.x,r.y,n.x,n.y,s.x,s.y)}pathS(t,e){var{point:r,controlPoint:n,currentPoint:s}=er.pathS(t);return e.push(r.x,r.y,n.x,n.y,s.x,s.y),Le.CURVE_TO}pathQ(t,e){var{controlPoint:r,currentPoint:n}=er.pathQ(t);e.push(r.x,r.y,n.x,n.y)}pathT(t,e){var{controlPoint:r,currentPoint:n}=er.pathT(t);return e.push(r.x,r.y,n.x,n.y),Le.QUAD_TO}pathA(t){var{rX:e,rY:r,sweepFlag:n,xAxisRotation:s,centp:A,a1:a,ad:o}=er.pathA(t);return n===0&&o>0&&(o-=2*Math.PI),n===1&&o<0&&(o+=2*Math.PI),[A.x,A.y,e,r,a,o,s,n]}calcLength(t,e,r,n){var s=0,A=null,a=null,o=0;switch(r){case Le.LINE_TO:return this.getLineLength(t,e,n[0],n[1]);case Le.CURVE_TO:for(s=0,A=this.getPointOnCubicBezier(0,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return s;case Le.QUAD_TO:for(s=0,A=this.getPointOnQuadraticBezier(0,t,e,n[0],n[1],n[2],n[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,t,e,n[0],n[1],n[2],n[3]),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return s;case Le.ARC:{s=0;var l=n[4],h=n[5],u=n[4]+h,f=Math.PI/180;if(Math.abs(l-u)<f&&(f=Math.abs(l-u)),A=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),h<0)for(o=l-f;o>u;o-=f)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;else for(o=l+f;o<u;o+=f)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),s}}return 0}getPointOnLine(t,e,r,n,s){var A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,o=(s-r)/(n-e+Lu),l=Math.sqrt(t*t/(1+o*o));n<e&&(l*=-1);var h=o*l,u=null;if(n===e)u={x:A,y:a+h};else if((a-r)/(A-e+Lu)===o)u={x:A+l,y:a+h};else{var f=0,d=0,g=this.getLineLength(e,r,n,s);if(g<Lu)return null;var m=(A-e)*(n-e)+(a-r)*(s-r);m/=g*g,f=e+m*(n-e),d=r+m*(s-r);var y=this.getLineLength(A,a,f,d),w=Math.sqrt(t*t-y*y);l=Math.sqrt(w*w/(1+o*o)),n<e&&(l*=-1),h=o*l,u={x:f+l,y:d+h}}return u}getPointOnPath(t){var e=this.getPathLength(),r=0,n=null;if(t<-5e-5||t-5e-5>e)return null;var{dataArray:s}=this;for(var A of s){if(A&&(A.pathLength<5e-5||r+A.pathLength+5e-5<t)){r+=A.pathLength;continue}var a=t-r,o=0;switch(A.type){case Le.LINE_TO:n=this.getPointOnLine(a,A.start.x,A.start.y,A.points[0],A.points[1],A.start.x,A.start.y);break;case Le.ARC:{var l=A.points[4],h=A.points[5],u=A.points[4]+h;if(o=l+a/A.pathLength*h,h<0&&o<u||h>=0&&o>u)break;n=this.getPointOnEllipticalArc(A.points[0],A.points[1],A.points[2],A.points[3],o,A.points[6]);break}case Le.CURVE_TO:o=a/A.pathLength,o>1&&(o=1),n=this.getPointOnCubicBezier(o,A.start.x,A.start.y,A.points[0],A.points[1],A.points[2],A.points[3],A.points[4],A.points[5]);break;case Le.QUAD_TO:o=a/A.pathLength,o>1&&(o=1),n=this.getPointOnQuadraticBezier(o,A.start.x,A.start.y,A.points[0],A.points[1],A.points[2],A.points[3]);break}if(n)return n;break}return null}getLineLength(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,r,n,s,A,a,o,l){var h=o*mS(t)+A*wS(t)+n*vS(t)+e*yS(t),u=l*mS(t)+a*wS(t)+s*vS(t)+r*yS(t);return{x:h,y:u}}getPointOnQuadraticBezier(t,e,r,n,s,A,a){var o=A*bS(t)+n*BS(t)+e*CS(t),l=a*bS(t)+s*BS(t)+r*CS(t);return{x:o,y:l}}getPointOnEllipticalArc(t,e,r,n,s,A){var a=Math.cos(A),o=Math.sin(A),l={x:r*Math.cos(s),y:n*Math.sin(s)};return{x:t+(l.x*a-l.y*o),y:e+(l.x*o+l.y*a)}}buildEquidistantCache(t,e){var r=this.getPathLength(),n=e||.25,s=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==s||this.equidistantCache.precision!==n){this.equidistantCache={step:s,precision:n,points:[]};for(var A=0,a=0;a<=r;a+=n){var o=this.getPointOnPath(a),l=this.getPointOnPath(a+n);!o||!l||(A+=this.getLineLength(o.x,o.y,l.x,l.y),A>=s&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:a}),A-=s))}}}getEquidistantPointOnPath(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var n=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}var AZ=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class h8 extends Xh{constructor(t,e,r){super(t,e,r),this.type="image",this.loaded=!1;var n=this.getHrefAttribute().getString();if(n){var s=n.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(n);t.images.push(this),s?this.loadSvg(n):this.loadImage(n),this.isSvg=s}}loadImage(t){var e=this;return vl(function*(){try{var r=yield e.document.createImage(t);e.image=r}catch(n){console.error('Error while loading image "'.concat(t,'":'),n)}e.loaded=!0})()}loadSvg(t){var e=this;return vl(function*(){var r=AZ.exec(t);if(r){var n=r[5];r[4]==="base64"?e.image=atob(n):e.image=decodeURIComponent(n)}else try{var s=yield e.document.fetch(t),A=yield s.text();e.image=A}catch(a){console.error('Error while loading image "'.concat(t,'":'),a)}e.loaded=!0})()}renderChildren(t){var{document:e,image:r,loaded:n}=this,s=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!n||!r||!a||!o)){if(t.save(),t.translate(s,A),this.isSvg){var l=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o});l.document.documentElement.parent=this,l.render()}else{var h=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:h.width,height:o,desiredHeight:h.height}),this.loaded&&(typeof h.complete>"u"||h.complete)&&t.drawImage(h,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new DA(t,e,t+r,e+n)}}class c8 extends Xh{constructor(){super(...arguments),this.type="symbol"}render(t){}}class u8{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,e){var r=this;return vl(function*(){try{var{document:n}=r,s=yield n.canvg.parser.load(e),A=s.getElementsByTagName("font");Array.from(A).forEach(a=>{var o=n.createElement(a);n.definitions[t]=o})}catch(a){console.error('Error while loading font "'.concat(e,'":'),a)}r.loaded=!0})()}}class LE extends Sr{constructor(t,e,r){super(t,e,r),this.type="style";var n=Gu(Array.from(e.childNodes).map(A=>A.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),s=n.split("}");s.forEach(A=>{var a=A.trim();if(a){var o=a.split("{"),l=o[0].split(","),h=o[1].split(";");l.forEach(u=>{var f=u.trim();if(f){var d=t.styles[f]||{};if(h.forEach(y=>{var w=y.indexOf(":"),b=y.substr(0,w).trim(),C=y.substr(w+1,y.length-w).trim();b&&C&&(d[b]=new me(t,b,C))}),t.styles[f]=d,t.stylesSpecificity[f]=TO(f),f==="@font-face"){var g=d["font-family"].getString().replace(/"|'/g,""),m=d.src.getString().split(",");m.forEach(y=>{if(y.indexOf('format("svg")')>0){var w=FE(y);w&&new u8(t).load(g,w)}})}}})}})}}LE.parseExternalUrl=FE;class d8 extends Xh{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var e=this.getAttribute("x"),r=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),r.hasValue()&&t.translate(0,r.getPixels("y"))}path(t){var{element:e}=this;e&&e.path(t)}renderChildren(t){var{document:e,element:r}=this;if(r){var n=r;if(r.type==="symbol"&&(n=new Ip(e,null),n.attributes.viewBox=new me(e,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new me(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new me(e,"overflow",r.getAttribute("overflow").getString()),n.children=r.children,r.styles.opacity=new me(e,"opacity",this.calculateOpacity())),n.type==="svg"){var s=this.getStyle("width",!1,!0),A=this.getStyle("height",!1,!0);s.hasValue()&&(n.attributes.width=new me(e,"width",s.getString())),A.hasValue()&&(n.attributes.height=new me(e,"height",A.getString()))}var a=n.parent;n.parent=this,n.render(t),n.parent=a}}getBoundingBox(t){var{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){var{document:t,element:e}=this;return Kh.fromElement(t,e)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function Mw(i,t,e,r,n,s){return i[e*r*4+t*4+s]}function Tw(i,t,e,r,n,s,A){i[e*r*4+t*4+s]=A}function Ii(i,t,e){var r=i[t];return r*e}function Qo(i,t,e,r){return t+Math.cos(i)*e+Math.sin(i)*r}class _E extends Sr{constructor(t,e,r){super(t,e,r),this.type="feColorMatrix";var n=_s(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var s=n[0];n=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var A=n[0]*Math.PI/180;n=[Qo(A,.213,.787,-.213),Qo(A,.715,-.715,-.715),Qo(A,.072,-.072,.928),0,0,Qo(A,.213,-.213,.143),Qo(A,.715,.285,.14),Qo(A,.072,-.072,-.283),0,0,Qo(A,.213,-.213,-.787),Qo(A,.715,-.715,.715),Qo(A,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=n,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,e,r,n,s){for(var{includeOpacity:A,matrix:a}=this,o=t.getImageData(0,0,n,s),l=0;l<s;l++)for(var h=0;h<n;h++){var u=Mw(o.data,h,l,n,s,0),f=Mw(o.data,h,l,n,s,1),d=Mw(o.data,h,l,n,s,2),g=Mw(o.data,h,l,n,s,3),m=Ii(a,0,u)+Ii(a,1,f)+Ii(a,2,d)+Ii(a,3,g)+Ii(a,4,1),y=Ii(a,5,u)+Ii(a,6,f)+Ii(a,7,d)+Ii(a,8,g)+Ii(a,9,1),w=Ii(a,10,u)+Ii(a,11,f)+Ii(a,12,d)+Ii(a,13,g)+Ii(a,14,1),b=Ii(a,15,u)+Ii(a,16,f)+Ii(a,17,d)+Ii(a,18,g)+Ii(a,19,1);A&&(m=0,y=0,w=0,b*=g/255),Tw(o.data,h,l,n,s,0,m),Tw(o.data,h,l,n,s,1,y),Tw(o.data,h,l,n,s,2,w),Tw(o.data,h,l,n,s,3,b)}t.clearRect(0,0,n,s),t.putImageData(o,0,0)}}class h1 extends Sr{constructor(){super(...arguments),this.type="mask"}apply(t,e){var{document:r}=this,n=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!A&&!a){var o=new DA;this.children.forEach(g=>{o.addBoundingBox(g.getBoundingBox(t))}),n=Math.floor(o.x1),s=Math.floor(o.y1),A=Math.floor(o.width),a=Math.floor(o.height)}var l=this.removeStyles(e,h1.ignoreStyles),h=r.createCanvas(n+A,s+a),u=h.getContext("2d");r.screen.setDefaults(u),this.renderChildren(u),new _E(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(u,0,0,n+A,s+a);var f=r.createCanvas(n+A,s+a),d=f.getContext("2d");r.screen.setDefaults(d),e.render(d),d.globalCompositeOperation="destination-in",d.fillStyle=u.createPattern(h,"no-repeat"),d.fillRect(0,0,n+A,s+a),t.fillStyle=d.createPattern(f,"no-repeat"),t.fillRect(0,0,n+A,s+a),this.restoreStyles(e,l)}render(t){}}h1.ignoreStyles=["mask","transform","clip-path"];var XM=()=>{};class f8 extends Sr{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:e}=this,r=Reflect.getPrototypeOf(t),{beginPath:n,closePath:s}=t;r&&(r.beginPath=XM,r.closePath=XM),Reflect.apply(n,t,[]),this.children.forEach(A=>{if(!(typeof A.path>"u")){var a=typeof A.elementTransform<"u"?A.elementTransform():null;a||(a=Kh.fromElement(e,A)),a&&a.apply(t),A.path(t),r&&(r.closePath=s),a&&a.unapply(t)}}),Reflect.apply(s,t,[]),t.clip(),r&&(r.beginPath=n,r.closePath=s)}render(t){}}class c1 extends Sr{constructor(){super(...arguments),this.type="filter"}apply(t,e){var{document:r,children:n}=this,s=e.getBoundingBox(t);if(s){var A=0,a=0;n.forEach(w=>{var b=w.extraFilterDistance||0;A=Math.max(A,b),a=Math.max(a,b)});var o=Math.floor(s.width),l=Math.floor(s.height),h=o+2*A,u=l+2*a;if(!(h<1||u<1)){var f=Math.floor(s.x),d=Math.floor(s.y),g=this.removeStyles(e,c1.ignoreStyles),m=r.createCanvas(h,u),y=m.getContext("2d");r.screen.setDefaults(y),y.translate(-f+A,-d+a),e.render(y),n.forEach(w=>{typeof w.apply=="function"&&w.apply(y,0,0,h,u)}),t.drawImage(m,0,0,h,u,f-A,d-a,h,u),this.restoreStyles(e,g)}}}render(t){}}c1.ignoreStyles=["filter","transform","clip-path"];class p8 extends Sr{constructor(t,e,r){super(t,e,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,e,r,n,s){}}class g8 extends Sr{constructor(){super(...arguments),this.type="feMorphology"}apply(t,e,r,n,s){}}class m8 extends Sr{constructor(){super(...arguments),this.type="feComposite"}apply(t,e,r,n,s){}}class w8 extends Sr{constructor(t,e,r){super(t,e,r),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,e,r,n,s){var{document:A,blurRadius:a}=this,o=A.window?A.window.document.body:null,l=t.canvas;l.id=A.getUniqueId(),o&&(l.style.display="none",o.appendChild(l)),D$(l,e,r,n,s,a),o&&o.removeChild(l)}}class v8 extends Sr{constructor(){super(...arguments),this.type="title"}}class y8 extends Sr{constructor(){super(...arguments),this.type="desc"}}var aZ={svg:Ip,rect:UE,circle:GO,ellipse:zO,line:qO,polyline:IE,polygon:XO,path:er,pattern:YO,marker:$O,defs:ZO,linearGradient:JO,radialGradient:t8,stop:e8,animate:Sb,animateColor:r8,animateTransform:i8,font:n8,"font-face":s8,"missing-glyph":A8,glyph:kE,text:yl,tspan:l1,tref:a8,a:o8,textPath:l8,image:h8,g:Fb,symbol:c8,style:LE,use:d8,mask:h1,clipPath:f8,filter:c1,feDropShadow:p8,feMorphology:g8,feComposite:m8,feColorMatrix:_E,feGaussianBlur:w8,title:v8,desc:y8};function YM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),e.push.apply(e,r)}return e}function oZ(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?YM(Object(e),!0).forEach(function(r){xE(i,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):YM(Object(e)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(e,r))})}return i}function lZ(i,t){var e=document.createElement("canvas");return e.width=i,e.height=t,e}function hZ(i){return xS.apply(this,arguments)}function xS(){return xS=vl(function*(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((r,n)=>{e.onload=()=>{r(e)},e.onerror=(s,A,a,o,l)=>{n(l)},e.src=i})}),xS.apply(this,arguments)}class gl{constructor(t){var{rootEmSize:e=12,emSize:r=12,createCanvas:n=gl.createCanvas,createImage:s=gl.createImage,anonymousCrossOrigin:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=t,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=r,this.createCanvas=n,this.createImage=this.bindCreateImage(s,A),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,e){return typeof e=="boolean"?(r,n)=>t(r,typeof n=="boolean"?n:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:e}=this;e.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(t=>t.loaded)}isFontsLoaded(){return this.fonts.every(t=>t.loaded)}createDocumentElement(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){var e=t.nodeName.replace(/^[^:]+:/,""),r=gl.elementTypes[e];return typeof r<"u"?new r(this,t):new KO(this,t)}createTextNode(t){return new sZ(this,t)}setViewBox(t){this.screen.setViewBox(oZ({document:this},t))}}gl.createCanvas=lZ;gl.createImage=hZ;gl.elementTypes=aZ;function $M(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),e.push.apply(e,r)}return e}function dc(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?$M(Object(e),!0).forEach(function(r){xE(i,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):$M(Object(e)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(e,r))})}return i}class ku{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new yv(r),this.screen=new o1(t,r),this.options=r;var n=new gl(this,r),s=n.createDocumentElement(e);this.document=n,this.documentElement=s}static from(t,e){var r=arguments;return vl(function*(){var n=r.length>2&&r[2]!==void 0?r[2]:{},s=new yv(n),A=yield s.parse(e);return new ku(t,A,n)})()}static fromString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=new yv(r),s=n.parseFromString(e);return new ku(t,s,r)}fork(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ku.from(t,e,dc(dc({},this.options),r))}forkString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ku.fromString(t,e,dc(dc({},this.options),r))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return vl(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:{};e.start(dc({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},r)),yield e.ready(),e.stop()})()}start(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:e,screen:r,options:n}=this;r.start(e,dc(dc({enableRedraw:!0},n),t))}stop(){this.screen.stop()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,e,r)}}const cZ=Object.freeze(Object.defineProperty({__proto__:null,AElement:o8,AnimateColorElement:r8,AnimateElement:Sb,AnimateTransformElement:i8,BoundingBox:DA,CB1:mS,CB2:wS,CB3:vS,CB4:yS,Canvg:ku,CircleElement:GO,ClipPathElement:f8,DefsElement:ZO,DescElement:y8,Document:gl,Element:Sr,EllipseElement:zO,FeColorMatrixElement:_E,FeCompositeElement:m8,FeDropShadowElement:p8,FeGaussianBlurElement:w8,FeMorphologyElement:g8,FilterElement:c1,Font:zn,FontElement:n8,FontFaceElement:s8,GElement:Fb,GlyphElement:kE,GradientElement:QE,ImageElement:h8,LineElement:qO,LinearGradientElement:JO,MarkerElement:$O,MaskElement:h1,Matrix:SE,MissingGlyphElement:A8,Mouse:PO,PSEUDO_ZERO:Lu,Parser:yv,PathElement:er,PathParser:Le,PatternElement:YO,Point:si,PolygonElement:XO,PolylineElement:IE,Property:me,QB1:bS,QB2:BS,QB3:CS,RadialGradientElement:t8,RectElement:UE,RenderedElement:Xh,Rotate:HO,SVGElement:Ip,SVGFontLoader:u8,Scale:VO,Screen:o1,Skew:EE,SkewX:WO,SkewY:jO,StopElement:e8,StyleElement:LE,SymbolElement:c8,TRefElement:a8,TSpanElement:l1,TextElement:yl,TextPathElement:l8,TitleElement:v8,Transform:Kh,Translate:RO,UnknownElement:KO,UseElement:d8,ViewPort:NO,compressSpaces:Gu,default:ku,getSelectorSpecificity:TO,normalizeAttributeName:_O,normalizeColor:MO,parseExternalUrl:FE,presets:V$,toNumbers:_s,trimLeft:QO,trimRight:LO,vectorMagnitude:pS,vectorsAngle:gS,vectorsRatio:Uy},Symbol.toStringTag,{value:"Module"}));export{H9 as AcApConvertToPdfCmd,YW as AcApImportPdfCmd,R9 as AcApPdfConvertor,XW as AcApPdfImportConvertor,bZ as PDF_PLUGIN_NAME,BZ as PDF_PLUGIN_TRIGGERS,wZ as createPdfPlugin};
|