@bitcaster/printkit 0.0.0-stage → 0.1.0

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.
Files changed (56) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +8 -2
  3. package/README.npm.md +9 -0
  4. package/THIRD_PARTY_NOTICES.md +1973 -0
  5. package/dist/assets/fonts/C400.ttf +0 -0
  6. package/dist/assets/fonts/M400.ttf +0 -0
  7. package/dist/assets/fonts/M600.ttf +0 -0
  8. package/dist/assets/fonts/M700.ttf +0 -0
  9. package/dist/assets/fonts/OFL-IBMPlexMono.txt +93 -0
  10. package/dist/assets/fonts/OFL-LibreCaslonText.txt +93 -0
  11. package/dist/assets/fonts/OFL-Manrope.txt +93 -0
  12. package/dist/assets/fonts/P400.ttf +0 -0
  13. package/dist/assets/fonts/P500.ttf +0 -0
  14. package/dist/assets/pdf.worker.min.mjs +29 -0
  15. package/dist/components/index.d.ts +42 -0
  16. package/dist/components/index.js +1 -0
  17. package/dist/components/p-6By_vSL9.js +1 -0
  18. package/dist/components/p-B85ddf5i.js +58 -0
  19. package/dist/components/p-BEuF_WyR.js +15 -0
  20. package/dist/components/p-C06-VTon.js +1 -0
  21. package/dist/components/p-C5up7ejY.js +22 -0
  22. package/dist/components/p-ChB3W-Ln.js +3 -0
  23. package/dist/components/p-DpEO5JlK.js +2 -0
  24. package/dist/components/p-DzTdZECU.js +21 -0
  25. package/dist/components/pk-editor.d.ts +11 -0
  26. package/dist/components/pk-editor.js +277 -0
  27. package/dist/components/pk-help.d.ts +11 -0
  28. package/dist/components/pk-help.js +1 -0
  29. package/dist/components/pk-template-editor.d.ts +11 -0
  30. package/dist/components/pk-template-editor.js +1 -0
  31. package/dist/types/.stencil/components/pk-editor/pk-editor.d.ts +113 -0
  32. package/dist/types/.stencil/components/pk-help/help.content.d.ts +1 -0
  33. package/dist/types/.stencil/components/pk-help/pk-help.d.ts +9 -0
  34. package/dist/types/.stencil/components/pk-template-editor/pk-template-editor.d.ts +203 -0
  35. package/dist/types/.stencil/services/background-load.d.ts +20 -0
  36. package/dist/types/.stencil/services/background.d.ts +70 -0
  37. package/dist/types/.stencil/services/card-engine.d.ts +123 -0
  38. package/dist/types/.stencil/services/card-render.d.ts +5 -0
  39. package/dist/types/.stencil/services/card.config.d.ts +48 -0
  40. package/dist/types/.stencil/services/cmyk-lut.d.ts +4 -0
  41. package/dist/types/.stencil/services/collide.d.ts +19 -0
  42. package/dist/types/.stencil/services/color.d.ts +12 -0
  43. package/dist/types/.stencil/services/design.d.ts +106 -0
  44. package/dist/types/.stencil/services/fonts.d.ts +32 -0
  45. package/dist/types/.stencil/services/layouts.d.ts +15 -0
  46. package/dist/types/.stencil/services/logo.d.ts +19 -0
  47. package/dist/types/.stencil/services/palette.d.ts +31 -0
  48. package/dist/types/.stencil/services/pdf.d.ts +26 -0
  49. package/dist/types/.stencil/services/qr.d.ts +21 -0
  50. package/dist/types/.stencil/services/spot.d.ts +49 -0
  51. package/dist/types/.stencil/services/terms.d.ts +1 -0
  52. package/dist/types/.stencil/types/card.types.d.ts +403 -0
  53. package/dist/types/.stencil/types/editor.types.d.ts +48 -0
  54. package/dist/types/components.d.ts +320 -0
  55. package/dist/types/stencil-public-runtime.d.ts +1879 -0
  56. package/package.json +46 -4
@@ -0,0 +1,277 @@
1
+ import{p as t,t as i,H as r,d as n,g as e,h as s,c as o}from"./p-C06-VTon.js";import{g as a,am as u,an as f,K as c,a2 as h,ao as l,ap as d,$ as v,aq as p,ar as b,as as m,at as w,au as g,av as k,L as y,N,aw as L,ax as A,ay as x,m as S,h as M,az as E,aA as q,l as j,a as F,c as P,aB as I,i as R,C as O,j as C,aC as T,ai as B,aD as D,aE as z,ak as U,B as _,a9 as V,a4 as H,a5 as W}from"./p-DpEO5JlK.js";function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}var $=Uint8Array,J=Uint16Array,K=Int32Array,Z=new $([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]),Y=new $([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]),X=new $([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Q=function(t,i){for(var r=new J(31),n=0;n<31;++n)r[n]=i+=1<<t[n-1];var e=new K(r[30]);for(n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)e[s]=s-r[n]<<5|n;return{b:r,r:e}},tt=Q(Z,2),it=tt.r;tt.b[28]=258,it[258]=28;for(var rt=Q(Y,0).r,nt=new J(32768),et=0;et<32768;++et){var st=(43690&et)>>1|(21845&et)<<1;nt[et]=((65280&(st=(61680&(st=(52428&st)>>2|(13107&st)<<2))>>4|(3855&st)<<4))>>8|(255&st)<<8)>>1}var ot=function(t,i,r){for(var n=t.length,e=0,s=new J(i);e<n;++e)t[e]&&++s[t[e]-1];var o,a=new J(i);for(e=1;e<i;++e)a[e]=a[e-1]+s[e-1]<<1;if(r){o=new J(1<<i);var u=15-i;for(e=0;e<n;++e)if(t[e])for(var f=e<<4|t[e],c=i-t[e],h=a[t[e]-1]++<<c,l=h|(1<<c)-1;h<=l;++h)o[nt[h]>>u]=f}else for(o=new J(n),e=0;e<n;++e)t[e]&&(o[e]=nt[a[t[e]-1]++]>>15-t[e]);return o},at=new $(288);for(et=0;et<144;++et)at[et]=8;for(et=144;et<256;++et)at[et]=9;for(et=256;et<280;++et)at[et]=7;for(et=280;et<288;++et)at[et]=8;var ut=new $(32);for(et=0;et<32;++et)ut[et]=5;var ft=ot(at,9,0),ct=ot(ut,5,0),ht=function(t){return(t+7)/8|0},lt=function(t,i,r){var n=i/8|0;t[n]|=r<<=7&i,t[n+1]|=r>>8},dt=function(t,i,r){var n=i/8|0;t[n]|=r<<=7&i,t[n+1]|=r>>8,t[n+2]|=r>>16},vt=function(t,i){for(var r=[],n=0;n<t.length;++n)t[n]&&r.push({s:n,f:t[n]});var e=r.length,s=r.slice();if(!e)return{t:yt,l:0};if(1==e){var o=new $(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort((function(t,i){return t.f-i.f})),r.push({s:-1,f:25001});var a=r[0],u=r[1],f=0,c=1,h=2;for(r[0]={s:-1,f:a.f+u.f,l:a,r:u};c!=e-1;)a=r[r[f].f<r[h].f?f++:h++],u=r[f!=c&&r[f].f<r[h].f?f++:h++],r[c++]={s:-1,f:a.f+u.f,l:a,r:u};var l=s[0].s;for(n=1;n<e;++n)s[n].s>l&&(l=s[n].s);var d=new J(l+1),v=pt(r[c-1],d,0);if(v>i){n=0;var p=0,b=v-i,m=1<<b;for(s.sort((function(t,i){return d[i.s]-d[t.s]||t.f-i.f}));n<e;++n){var w=s[n].s;if(!(d[w]>i))break;p+=m-(1<<v-d[w]),d[w]=i}for(p>>=b;p>0;){var g=s[n].s;d[g]<i?p-=1<<i-d[g]++-1:++n}for(;n>=0&&p;--n){var k=s[n].s;d[k]==i&&(--d[k],++p)}v=i}return{t:new $(d),l:v}},pt=function(t,i,r){return-1==t.s?Math.max(pt(t.l,i,r+1),pt(t.r,i,r+1)):i[t.s]=r},bt=function(t){for(var i=t.length;i&&!t[--i];);for(var r=new J(++i),n=0,e=t[0],s=1,o=function(t){r[n++]=t},a=1;a<=i;++a)if(t[a]==e&&a!=i)++s;else{if(!e&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(e),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(e);s=1,e=t[a]}return{c:r.subarray(0,n),n:i}},mt=function(t,i){for(var r=0,n=0;n<i.length;++n)r+=t[n]*i[n];return r},wt=function(t,i,r){var n=r.length,e=ht(i+2);t[e]=255&n,t[e+1]=n>>8,t[e+2]=255^t[e],t[e+3]=255^t[e+1];for(var s=0;s<n;++s)t[e+s+4]=r[s];return 8*(e+4+n)},gt=function(t,i,r,n,e,s,o,a,u,f,c){lt(i,c++,r),++e[256];for(var h=vt(e,15),l=h.t,d=h.l,v=vt(s,15),p=v.t,b=v.l,m=bt(l),w=m.c,g=m.n,k=bt(p),y=k.c,N=k.n,L=new J(19),A=0;A<w.length;++A)++L[31&w[A]];for(A=0;A<y.length;++A)++L[31&y[A]];for(var x=vt(L,7),S=x.t,M=x.l,E=19;E>4&&!S[X[E-1]];--E);var q,j,F,P,I=f+5<<3,R=mt(e,at)+mt(s,ut)+o,O=mt(e,l)+mt(s,p)+o+14+3*E+mt(L,S)+2*L[16]+3*L[17]+7*L[18];if(u>=0&&I<=R&&I<=O)return wt(i,c,t.subarray(u,u+f));if(lt(i,c,1+(O<R)),c+=2,O<R){q=ot(l,d,0),j=l,F=ot(p,b,0),P=p;var C=ot(S,M,0);for(lt(i,c,g-257),lt(i,c+5,N-1),lt(i,c+10,E-4),c+=14,A=0;A<E;++A)lt(i,c+3*A,S[X[A]]);c+=3*E;for(var T=[w,y],B=0;B<2;++B){var D=T[B];for(A=0;A<D.length;++A)lt(i,c,C[U=31&D[A]]),c+=S[U],U>15&&(lt(i,c,D[A]>>5&127),c+=D[A]>>12)}}else q=ft,j=at,F=ct,P=ut;for(A=0;A<a;++A){var z=n[A];if(z>255){var U;dt(i,c,q[257+(U=z>>18&31)]),c+=j[U+257],U>7&&(lt(i,c,z>>23&31),c+=Z[U]);var _=31&z;dt(i,c,F[_]),c+=P[_],_>3&&(dt(i,c,z>>5&8191),c+=Y[_])}else dt(i,c,q[z]),c+=j[z]}return dt(i,c,q[256]),c+j[256]},kt=new K([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),yt=new $(0),Nt=function(){var t=1,i=0;return{p:function(r){for(var n=t,e=i,s=0|r.length,o=0;o!=s;){for(var a=Math.min(o+2655,s);o<a;++o)e+=n+=r[o];n=(65535&n)+15*(n>>16),e=(65535&e)+15*(e>>16)}t=n,i=e},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(i%=65521))<<8|i>>8}}},Lt=function(t,i,r){for(;r;++i)t[i]=r,r>>>=8};function At(t,i){i||(i={});var r=Nt();r.p(t);var n=function(t,i,r,n,e){if(!e&&(e={l:1},i.dictionary)){var s=i.dictionary.subarray(-32768),o=new $(s.length+t.length);o.set(s),o.set(t,s.length),t=o,e.w=s.length}return function(t,i,r,n,e,s){var o=s.z||t.length,a=new $(n+o+5*(1+Math.ceil(o/7e3))+e),u=a.subarray(n,a.length-e),f=s.l,c=7&(s.r||0);if(i){c&&(u[0]=s.r>>3);for(var h=kt[i-1],l=h>>13,d=8191&h,v=(1<<r)-1,p=s.p||new J(32768),b=s.h||new J(v+1),m=Math.ceil(r/3),w=2*m,g=function(i){return(t[i]^t[i+1]<<m^t[i+2]<<w)&v},k=new K(25e3),y=new J(288),N=new J(32),L=0,A=0,x=s.i||0,S=0,M=s.w||0,E=0;x+2<o;++x){var q=g(x),j=32767&x,F=b[q];if(p[j]=F,b[q]=j,M<=x){var P=o-x;if((L>7e3||S>24576)&&(P>423||!f)){c=gt(t,u,0,k,y,N,A,S,E,x-E,c),S=L=A=0,E=x;for(var I=0;I<286;++I)y[I]=0;for(I=0;I<30;++I)N[I]=0}var R=2,O=0,C=d,T=j-F&32767;if(P>2&&q==g(x-T))for(var B=Math.min(l,P)-1,D=Math.min(32767,x),z=Math.min(258,P);T<=D&&--C&&j!=F;){if(t[x+R]==t[x+R-T]){for(var U=0;U<z&&t[x+U]==t[x+U-T];++U);if(U>R){if(R=U,O=T,U>B)break;var _=Math.min(T,U-2),V=0;for(I=0;I<_;++I){var H=x-T+I&32767,W=H-p[H]&32767;W>V&&(V=W,F=H)}}}T+=(j=F)-(F=p[j])&32767}if(O){k[S++]=268435456|it[R]<<18|rt[O];var G=31&it[R],X=31&rt[O];A+=Z[G]+Y[X],++y[257+G],++N[X],M=x+R,++L}else k[S++]=t[x],++y[t[x]]}}for(x=Math.max(x,M);x<o;++x)k[S++]=t[x],++y[t[x]];c=gt(t,u,f,k,y,N,A,S,E,x-E,c),f||(s.r=7&c|u[c/8|0]<<3,c-=7,s.h=b,s.p=p,s.i=x,s.w=M)}else{for(x=s.w||0;x<o+f;x+=65535){var Q=x+65535;Q>=o&&(u[c/8|0]=f,Q=o),c=wt(u,c+1,t.subarray(x,Q))}s.i=o}return function(t,i,r){return(null==r||r>t.length)&&(r=t.length),new $(t.subarray(0,r))}(a,0,n+ht(c)+e)}(t,null==i.level?6:i.level,null==i.mem?e.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+i.mem,r,4,e)}(t,i,i.dictionary?6:2);return function(t,i){var r=i.level,n=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=n<<6|(i.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,i.dictionary){var e=Nt();e.p(i.dictionary),Lt(t,2,e.d())}}(n,i),Lt(n,n.length-4,r.d()),n}var xt="undefined"!=typeof TextDecoder&&new TextDecoder;try{xt.decode(yt,{stream:!0})}catch(ks){}function St(t,i){(null==i||i>t.length)&&(i=t.length);for(var r=0,n=Array(i);r<i;r++)n[r]=t[r];return n}function Mt(t,i){if(t){if("string"==typeof t)return St(t,i);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?St(t,i):void 0}}function Et(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,e,s,o,a=[],u=!0,f=!1;try{if(s=(r=r.call(t)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=s.call(r)).done)&&(a.push(n.value),a.length!==i);u=!0);}catch(t){f=!0,e=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw e}}return a}}(t,i)||Mt(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var qt=Object.freeze({__proto__:null,default:Et});function jt(t,i="utf8"){return new TextDecoder(i).decode(t)}const Ft=new TextEncoder,Pt=(()=>{const t=new Uint8Array(4);return!((new Uint32Array(t.buffer)[0]=1)&t[0])})(),It={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 Rt{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=8192,i={}){let r=!1;"number"==typeof t?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const n=i.offset?i.offset>>>0:0,e=t.byteLength-n;let s=n;(ArrayBuffer.isView(t)||t instanceof Rt)&&(t.byteLength!==t.buffer.byteLength&&(s=t.byteOffset+n),t=t.buffer),this.lastWrittenByte=r?e:0,this.buffer=t,this.length=e,this.byteLength=e,this.byteOffset=s,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,s,e),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(void 0===t)throw Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const i=2*(this.offset+t),r=new Uint8Array(i);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}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,i){const r=It[i].BYTES_PER_ELEMENT*t,n=this.byteOffset+this.offset,e=this.buffer.slice(n,n+r);if(this.littleEndian===Pt&&"uint8"!==i&&"int8"!==i){const t=new Uint8Array(this.buffer.slice(n,n+r));t.reverse();const e=new It[i](t.buffer);return this.offset+=r,e.reverse(),e}const s=new It[i](e);return this.offset+=r,s}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 i="";for(let r=0;r<t;r++)i+=this.readChar();return i}readUtf8(t=1){return jt(this.readBytes(t))}decodeText(t=1,i="utf8"){return jt(this.readBytes(t),i)}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 i=0;i<t.length;i++)this._data.setUint8(this.offset++,t[i]);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 i=0;i<t.length;i++)this.writeUint8(t.charCodeAt(i));return this}writeUtf8(t){return this.writeBytes(function(t){return Ft.encode(t)}(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 Ot(t){let i=t.length;for(;--i>=0;)t[i]=0}Ot(Array(576)),Ot(Array(60)),Ot(Array(512)),Ot(Array(256)),Ot(Array(29)),Ot(Array(30));var Ct=(t,i,r,n)=>{let e=65535&t,s=t>>>16&65535,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{e=e+i[n++]|0,s=s+e|0}while(--o);e%=65521,s%=65521}return e|s<<16};const Tt=new Uint32Array((()=>{let t,i=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;i[r]=t}return i})());var Bt=(t,i,r,n)=>{const e=Tt,s=n+r;t^=-1;for(let r=n;r<s;r++)t=t>>>8^e[255&(t^i[r])];return~t},Dt={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"},zt={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 Ut=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);let _t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){_t=!1}const Vt=new Uint8Array(256);for(let t=0;t<256;t++)Vt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Vt[254]=Vt[255]=1;var Ht=(t,i)=>{const r=i||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,i));let n,e;const s=Array(2*r);for(e=0,n=0;n<r;){let i=t[n++];if(i<128){s[e++]=i;continue}let o=Vt[i];if(o>4)s[e++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n<r;)i=i<<6|63&t[n++],o--;o>1?s[e++]=65533:i<65536?s[e++]=i:(i-=65536,s[e++]=55296|i>>10&1023,s[e++]=56320|1023&i)}}return((t,i)=>{if(i<65534&&t.subarray&&_t)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(t[n]);return r})(s,e)},Wt=(t,i)=>{(i=i||t.length)>t.length&&(i=t.length);let r=i-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?i:r+Vt[t[r]]>i?r:i},Gt=function(){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};const $t=16209;var Jt=function(t,i){let r,n,e,s,o,a,u,f,c,h,l,d,v,p,b,m,w,g,k,y,N,L,A,x;const S=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),e=t.next_out,x=t.output,s=e-(i-t.avail_out),o=e+(t.avail_out-257),a=S.dmax,u=S.wsize,f=S.whave,c=S.wnext,h=S.window,l=S.hold,d=S.bits,v=S.lencode,p=S.distcode,b=(1<<S.lenbits)-1,m=(1<<S.distbits)-1;t:do{d<15&&(l+=A[r++]<<d,d+=8,l+=A[r++]<<d,d+=8),w=v[l&b];i:for(;;){if(g=w>>>24,l>>>=g,d-=g,g=w>>>16&255,0===g)x[e++]=65535&w;else{if(!(16&g)){if(64&g){if(32&g){S.mode=16191;break t}t.msg="invalid literal/length code",S.mode=$t;break t}w=v[(65535&w)+(l&(1<<g)-1)];continue i}for(k=65535&w,g&=15,g&&(d<g&&(l+=A[r++]<<d,d+=8),k+=l&(1<<g)-1,l>>>=g,d-=g),d<15&&(l+=A[r++]<<d,d+=8,l+=A[r++]<<d,d+=8),w=p[l&m];;){if(g=w>>>24,l>>>=g,d-=g,g=w>>>16&255,16&g){if(y=65535&w,g&=15,d<g&&(l+=A[r++]<<d,d+=8,d<g&&(l+=A[r++]<<d,d+=8)),y+=l&(1<<g)-1,y>a){t.msg="invalid distance too far back",S.mode=$t;break t}if(l>>>=g,d-=g,g=e-s,y>g){if(g=y-g,g>f&&S.sane){t.msg="invalid distance too far back",S.mode=$t;break t}if(N=0,L=h,0===c){if(N+=u-g,g<k){k-=g;do{x[e++]=h[N++]}while(--g);N=e-y,L=x}}else if(c<g){if(N+=u+c-g,g-=c,g<k){k-=g;do{x[e++]=h[N++]}while(--g);if(N=0,c<k){g=c,k-=g;do{x[e++]=h[N++]}while(--g);N=e-y,L=x}}}else if(N+=c-g,g<k){k-=g;do{x[e++]=h[N++]}while(--g);N=e-y,L=x}for(;k>2;)x[e++]=L[N++],x[e++]=L[N++],x[e++]=L[N++],k-=3;k&&(x[e++]=L[N++],k>1&&(x[e++]=L[N++]))}else{N=e-y;do{x[e++]=x[N++],x[e++]=x[N++],x[e++]=x[N++],k-=3}while(k>2);k&&(x[e++]=x[N++],k>1&&(x[e++]=x[N++]))}break}if(64&g){t.msg="invalid distance code",S.mode=$t;break t}w=p[(65535&w)+(l&(1<<g)-1)]}}break}}while(r<n&&e<o);k=d>>3,r-=k,d-=k<<3,l&=(1<<d)-1,t.next_in=r,t.next_out=e,t.avail_in=r<n?n-r+5:5-(r-n),t.avail_out=e<o?o-e+257:257-(e-o),S.hold=l,S.bits=d};const Kt=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]),Zt=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,199,75]),Yt=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]),Xt=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]);var Qt=(t,i,r,n,e,s,o,a)=>{const u=a.bits;let f,c,h,l,d,v,p=0,b=0,m=0,w=0,g=0,k=0,y=0,N=0,L=0,A=0,x=null;const S=new Uint16Array(16),M=new Uint16Array(16);let E,q,j,F=null;for(p=0;p<=15;p++)S[p]=0;for(b=0;b<n;b++)S[i[r+b]]++;for(g=u,w=15;w>=1&&0===S[w];w--);if(g>w&&(g=w),0===w)return e[s++]=20971520,e[s++]=20971520,a.bits=1,0;for(m=1;m<w&&0===S[m];m++);for(g<m&&(g=m),N=1,p=1;p<=15;p++)if(N<<=1,N-=S[p],N<0)return-1;if(N>0&&(0===t||1!==w))return-1;for(M[1]=0,p=1;p<15;p++)M[p+1]=M[p]+S[p];for(b=0;b<n;b++)0!==i[r+b]&&(o[M[i[r+b]]++]=b);if(0===t?(x=F=o,v=20):1===t?(x=Kt,F=Zt,v=257):(x=Yt,F=Xt,v=0),A=0,b=0,p=m,d=s,k=g,y=0,h=-1,L=1<<g,l=L-1,1===t&&L>852||2===t&&L>592)return 1;for(;;){E=p-y,o[b]+1<v?(q=0,j=o[b]):o[b]>=v?(q=F[o[b]-v],j=x[o[b]-v]):(q=96,j=0),f=1<<p-y,c=1<<k,m=c;do{c-=f,e[d+(A>>y)+c]=E<<24|q<<16|j}while(0!==c);for(f=1<<p-1;A&f;)f>>=1;if(0!==f?(A&=f-1,A+=f):A=0,b++,0==--S[p]){if(p===w)break;p=i[r+o[b]]}if(p>g&&(A&l)!==h){for(0===y&&(y=g),d+=m,k=p-y,N=1<<k;k+y<w&&(N-=S[k+y],!(N<=0));)k++,N<<=1;if(L+=1<<k,1===t&&L>852||2===t&&L>592)return 1;h=A&l,e[h]=g<<24|k<<16|d-s}}return 0!==A&&(e[d+A]=p-y<<24|64<<16),a.bits=g,0};const{Z_FINISH:ti,Z_BLOCK:ii,Z_TREES:ri,Z_OK:ni,Z_STREAM_END:ei,Z_NEED_DICT:si,Z_STREAM_ERROR:oi,Z_DATA_ERROR:ai,Z_MEM_ERROR:ui,Z_BUF_ERROR:fi,Z_DEFLATED:ci}=zt,hi=16180,li=16190,di=16191,vi=16192,pi=16194,bi=16199,mi=16200,wi=16206,gi=16209,ki=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function yi(){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 Ni=t=>{if(!t)return 1;const i=t.state;return!i||i.strm!==t||i.mode<hi||i.mode>16211?1:0},Li=t=>{if(Ni(t))return oi;const i=t.state;return t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=1&i.wrap),i.mode=hi,i.last=0,i.havedict=0,i.flags=-1,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new Int32Array(852),i.distcode=i.distdyn=new Int32Array(592),i.sane=1,i.back=-1,ni},Ai=t=>{if(Ni(t))return oi;const i=t.state;return i.wsize=0,i.whave=0,i.wnext=0,Li(t)},xi=(t,i)=>{let r;if(Ni(t))return oi;const n=t.state;return i<0?(r=0,i=-i):(r=5+(i>>4),i<48&&(i&=15)),i&&(i<8||i>15)?oi:(null!==n.window&&n.wbits!==i&&(n.window=null),n.wrap=r,n.wbits=i,Ai(t))},Si=(t,i)=>{if(!t)return oi;const r=new yi;t.state=r,r.strm=t,r.window=null,r.mode=hi;const n=xi(t,i);return n!==ni&&(t.state=null),n};let Mi,Ei,qi=!0;const ji=t=>{if(qi){Mi=new Int32Array(512),Ei=new Int32Array(32);let i=0;for(;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(Qt(1,t.lens,0,288,Mi,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;Qt(2,t.lens,0,32,Ei,0,t.work,{bits:5}),qi=!1}t.lencode=Mi,t.lenbits=9,t.distcode=Ei,t.distbits=5},Fi=(t,i,r,n)=>{let e;const s=t.state;return null===s.window&&(s.window=new Uint8Array(1<<s.wbits)),0===s.wsize&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0),n>=s.wsize?(s.window.set(i.subarray(r-s.wsize,r),0),s.wnext=0,s.whave=s.wsize):(e=s.wsize-s.wnext,e>n&&(e=n),s.window.set(i.subarray(r-n,r-n+e),s.wnext),(n-=e)?(s.window.set(i.subarray(r-n,r),0),s.wnext=n,s.whave=s.wsize):(s.wnext+=e,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=e))),0};var Pi=Ai,Ii=Si,Ri=(t,i)=>{let r,n,e,s,o,a,u,f,c,h,l,d,v,p,b,m,w,g,k,y,N,L,A=0;const x=new Uint8Array(4);let S,M;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ni(t)||!t.output||!t.input&&0!==t.avail_in)return oi;r=t.state,r.mode===di&&(r.mode=vi),o=t.next_out,e=t.output,u=t.avail_out,s=t.next_in,n=t.input,a=t.avail_in,f=r.hold,c=r.bits,h=a,l=u,L=ni;t:for(;;)switch(r.mode){case hi:if(0===r.wrap){r.mode=vi;break}for(;c<16;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(2&r.wrap&&35615===f){0===r.wbits&&(r.wbits=15),r.check=0,x[0]=255&f,x[1]=f>>>8&255,r.check=Bt(r.check,x,2,0),f=0,c=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&f)<<8)+(f>>8))%31){t.msg="incorrect header check",r.mode=gi;break}if((15&f)!==ci){t.msg="unknown compression method",r.mode=gi;break}if(f>>>=4,c-=4,N=8+(15&f),0===r.wbits&&(r.wbits=N),N>15||N>r.wbits){t.msg="invalid window size",r.mode=gi;break}r.dmax=1<<r.wbits,r.flags=0,t.adler=r.check=1,r.mode=512&f?16189:di,f=0,c=0;break;case 16181:for(;c<16;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(r.flags=f,(255&r.flags)!==ci){t.msg="unknown compression method",r.mode=gi;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=gi;break}r.head&&(r.head.text=f>>8&1),512&r.flags&&4&r.wrap&&(x[0]=255&f,x[1]=f>>>8&255,r.check=Bt(r.check,x,2,0)),f=0,c=0,r.mode=16182;case 16182:for(;c<32;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}r.head&&(r.head.time=f),512&r.flags&&4&r.wrap&&(x[0]=255&f,x[1]=f>>>8&255,x[2]=f>>>16&255,x[3]=f>>>24&255,r.check=Bt(r.check,x,4,0)),f=0,c=0,r.mode=16183;case 16183:for(;c<16;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}r.head&&(r.head.xflags=255&f,r.head.os=f>>8),512&r.flags&&4&r.wrap&&(x[0]=255&f,x[1]=f>>>8&255,r.check=Bt(r.check,x,2,0)),f=0,c=0,r.mode=16184;case 16184:if(1024&r.flags){for(;c<16;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}r.length=f,r.head&&(r.head.extra_len=f),512&r.flags&&4&r.wrap&&(x[0]=255&f,x[1]=f>>>8&255,r.check=Bt(r.check,x,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(d=r.length,d>a&&(d=a),d&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(s,s+d),N)),512&r.flags&&4&r.wrap&&(r.check=Bt(r.check,n,d,s)),a-=d,s+=d,r.length-=d),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===a)break t;d=0;do{N=n[s+d++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N))}while(N&&d<a);if(512&r.flags&&4&r.wrap&&(r.check=Bt(r.check,n,d,s)),a-=d,s+=d,N)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===a)break t;d=0;do{N=n[s+d++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N))}while(N&&d<a);if(512&r.flags&&4&r.wrap&&(r.check=Bt(r.check,n,d,s)),a-=d,s+=d,N)break t}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;c<16;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(4&r.wrap&&f!==(65535&r.check)){t.msg="header crc mismatch",r.mode=gi;break}f=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=di;break;case 16189:for(;c<32;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}t.adler=r.check=ki(f),f=0,c=0,r.mode=li;case li:if(0===r.havedict)return t.next_out=o,t.avail_out=u,t.next_in=s,t.avail_in=a,r.hold=f,r.bits=c,si;t.adler=r.check=1,r.mode=di;case di:if(i===ii||i===ri)break t;case vi:if(r.last){f>>>=7&c,c-=7&c,r.mode=wi;break}for(;c<3;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}switch(r.last=1&f,f>>>=1,c-=1,3&f){case 0:r.mode=16193;break;case 1:if(ji(r),r.mode=bi,i===ri){f>>>=2,c-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=gi}f>>>=2,c-=2;break;case 16193:for(f>>>=7&c,c-=7&c;c<32;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if((65535&f)!=(f>>>16^65535)){t.msg="invalid stored block lengths",r.mode=gi;break}if(r.length=65535&f,f=0,c=0,r.mode=pi,i===ri)break t;case pi:r.mode=16195;case 16195:if(d=r.length,d){if(d>a&&(d=a),d>u&&(d=u),0===d)break t;e.set(n.subarray(s,s+d),o),a-=d,s+=d,u-=d,o+=d,r.length-=d;break}r.mode=di;break;case 16196:for(;c<14;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(r.nlen=257+(31&f),f>>>=5,c-=5,r.ndist=1+(31&f),f>>>=5,c-=5,r.ncode=4+(15&f),f>>>=4,c-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=gi;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;c<3;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}r.lens[E[r.have++]]=7&f,f>>>=3,c-=3}for(;r.have<19;)r.lens[E[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},L=Qt(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,L){t.msg="invalid code lengths set",r.mode=gi;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;A=r.lencode[f&(1<<r.lenbits)-1],b=A>>>24,m=A>>>16&255,w=65535&A,!(b<=c);){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(w<16)f>>>=b,c-=b,r.lens[r.have++]=w;else{if(16===w){for(M=b+2;c<M;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(f>>>=b,c-=b,0===r.have){t.msg="invalid bit length repeat",r.mode=gi;break}N=r.lens[r.have-1],d=3+(3&f),f>>>=2,c-=2}else if(17===w){for(M=b+3;c<M;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}f>>>=b,c-=b,N=0,d=3+(7&f),f>>>=3,c-=3}else{for(M=b+7;c<M;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}f>>>=b,c-=b,N=0,d=11+(127&f),f>>>=7,c-=7}if(r.have+d>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=gi;break}for(;d--;)r.lens[r.have++]=N}}if(r.mode===gi)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=gi;break}if(r.lenbits=9,S={bits:r.lenbits},L=Qt(1,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,L){t.msg="invalid literal/lengths set",r.mode=gi;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},L=Qt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,L){t.msg="invalid distances set",r.mode=gi;break}if(r.mode=bi,i===ri)break t;case bi:r.mode=mi;case mi:if(a>=6&&u>=258){t.next_out=o,t.avail_out=u,t.next_in=s,t.avail_in=a,r.hold=f,r.bits=c,Jt(t,l),o=t.next_out,e=t.output,u=t.avail_out,s=t.next_in,n=t.input,a=t.avail_in,f=r.hold,c=r.bits,r.mode===di&&(r.back=-1);break}for(r.back=0;A=r.lencode[f&(1<<r.lenbits)-1],b=A>>>24,m=A>>>16&255,w=65535&A,!(b<=c);){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(m&&!(240&m)){for(g=b,k=m,y=w;A=r.lencode[y+((f&(1<<g+k)-1)>>g)],b=A>>>24,m=A>>>16&255,w=65535&A,!(g+b<=c);){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}f>>>=g,c-=g,r.back+=g}if(f>>>=b,c-=b,r.back+=b,r.length=w,0===m){r.mode=16205;break}if(32&m){r.back=-1,r.mode=di;break}if(64&m){t.msg="invalid literal/length code",r.mode=gi;break}r.extra=15&m,r.mode=16201;case 16201:if(r.extra){for(M=r.extra;c<M;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;A=r.distcode[f&(1<<r.distbits)-1],b=A>>>24,m=A>>>16&255,w=65535&A,!(b<=c);){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(!(240&m)){for(g=b,k=m,y=w;A=r.distcode[y+((f&(1<<g+k)-1)>>g)],b=A>>>24,m=A>>>16&255,w=65535&A,!(g+b<=c);){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}f>>>=g,c-=g,r.back+=g}if(f>>>=b,c-=b,r.back+=b,64&m){t.msg="invalid distance code",r.mode=gi;break}r.offset=w,r.extra=15&m,r.mode=16203;case 16203:if(r.extra){for(M=r.extra;c<M;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=gi;break}r.mode=16204;case 16204:if(0===u)break t;if(d=l-u,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=gi;break}d>r.wnext?(d-=r.wnext,v=r.wsize-d):v=r.wnext-d,d>r.length&&(d=r.length),p=r.window}else p=e,v=o-r.offset,d=r.length;d>u&&(d=u),u-=d,r.length-=d;do{e[o++]=p[v++]}while(--d);0===r.length&&(r.mode=mi);break;case 16205:if(0===u)break t;e[o++]=r.length,u--,r.mode=mi;break;case wi:if(r.wrap){for(;c<32;){if(0===a)break t;a--,f|=n[s++]<<c,c+=8}if(l-=u,t.total_out+=l,r.total+=l,4&r.wrap&&l&&(t.adler=r.check=r.flags?Bt(r.check,e,l,o-l):Ct(r.check,e,l,o-l)),l=u,4&r.wrap&&(r.flags?f:ki(f))!==r.check){t.msg="incorrect data check",r.mode=gi;break}f=0,c=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;c<32;){if(0===a)break t;a--,f+=n[s++]<<c,c+=8}if(4&r.wrap&&f!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=gi;break}f=0,c=0}r.mode=16208;case 16208:L=ei;break t;case gi:L=ai;break t;case 16210:return ui;default:return oi}return t.next_out=o,t.avail_out=u,t.next_in=s,t.avail_in=a,r.hold=f,r.bits=c,(r.wsize||l!==t.avail_out&&r.mode<gi&&(r.mode<wi||i!==ti))&&Fi(t,t.output,t.next_out,l-t.avail_out),h-=t.avail_in,l-=t.avail_out,t.total_in+=h,t.total_out+=l,r.total+=l,4&r.wrap&&l&&(t.adler=r.check=r.flags?Bt(r.check,e,l,t.next_out-l):Ct(r.check,e,l,t.next_out-l)),t.data_type=r.bits+(r.last?64:0)+(r.mode===di?128:0)+(r.mode===bi||r.mode===pi?256:0),(0===h&&0===l||i===ti)&&L===ni&&(L=fi),L},Oi=t=>{if(Ni(t))return oi;let i=t.state;return i.window&&(i.window=null),t.state=null,ni},Ci=(t,i)=>{if(Ni(t))return oi;const r=t.state;return 2&r.wrap?(r.head=i,i.done=!1,ni):oi},Ti=(t,i)=>{const r=i.length;let n,e,s;return Ni(t)?oi:(n=t.state,0!==n.wrap&&n.mode!==li?oi:n.mode===li&&(e=1,e=Ct(e,i,r,0),e!==n.check)?ai:(s=Fi(t,i,r,r),s?(n.mode=16210,ui):(n.havedict=1,ni)))},Bi=function(){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};const Di=Object.prototype.toString,{Z_NO_FLUSH:zi,Z_FINISH:Ui,Z_OK:_i,Z_STREAM_END:Vi,Z_NEED_DICT:Hi,Z_STREAM_ERROR:Wi,Z_DATA_ERROR:Gi,Z_MEM_ERROR:$i,Z_BUF_ERROR:Ji}=zt,Ki={chunkSize:65536,windowBits:15,to:""};function Zi(t){this.options=function(t){const i=Array.prototype.slice.call(arguments,1);for(;i.length;){const r=i.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const i in r)Ut(r,i)&&(t[i]=r[i])}}return t}({},Ki,t||{});const i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,0===i.windowBits&&(i.windowBits=-15)),!(i.windowBits>=0&&i.windowBits<16)||t&&t.windowBits||(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&(15&i.windowBits||(i.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Gt,this.strm.avail_out=0;let r=Ii(this.strm,i.windowBits);if(r!==_i)throw Error(Dt[r]);if(this.header=new Bi,Ci(this.strm,this.header),i.dictionary&&("string"==typeof i.dictionary?i.dictionary=(t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let i,r,n,e,s,o=t.length,a=0;for(e=0;e<o;e++)r=t.charCodeAt(e),55296==(64512&r)&&e+1<o&&(n=t.charCodeAt(e+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),e++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(i=new Uint8Array(a),s=0,e=0;s<a;e++)r=t.charCodeAt(e),55296==(64512&r)&&e+1<o&&(n=t.charCodeAt(e+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),e++)),r<128?i[s++]=r:r<2048?(i[s++]=192|r>>>6,i[s++]=128|63&r):r<65536?(i[s++]=224|r>>>12,i[s++]=128|r>>>6&63,i[s++]=128|63&r):(i[s++]=240|r>>>18,i[s++]=128|r>>>12&63,i[s++]=128|r>>>6&63,i[s++]=128|63&r);return i})(i.dictionary):"[object ArrayBuffer]"===Di.call(i.dictionary)&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(r=Ti(this.strm,i.dictionary),r!==_i)))throw Error(Dt[r])}Zi.prototype.push=function(t,i){const r=this.strm,n=this.options.chunkSize,e=this.options.dictionary;let s,o,a;if(this.ended)return!1;for(o=i===~~i?i:!0===i?Ui:zi,r.input="[object ArrayBuffer]"===Di.call(t)?new Uint8Array(t):t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),s=Ri(r,o),s===Hi&&e&&(s=Ti(r,e),s===_i?s=Ri(r,o):s===Gi&&(s=Hi));r.avail_in>0&&s===Vi&&2&r.state.wrap&&0!==r.state.flags&&0!==r.input[r.next_in];)Pi(r),s=Ri(r,o);switch(s){case Wi:case Gi:case Hi:case $i:return this.onEnd(s),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||s===Vi||o>0))if("string"===this.options.to){let t=Wt(r.output,r.next_out),i=r.next_out-t,e=Ht(r.output,t);r.next_out=i,r.avail_out=n-i,i&&r.output.set(r.output.subarray(t,t+i),0),this.onData(e)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out)),r.avail_out=0,r.next_out=0;if(s!==_i&&s!==Ji||0!==a){if(s===Vi)return s=Oi(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===r.avail_in){if(o===Ui)return s=Oi(this.strm),this.onEnd(s===_i?Ji:s),this.ended=!0,!1;break}}}return!0},Zi.prototype.onData=function(t){this.chunks.push(t)},Zi.prototype.onEnd=function(t){t===_i&&(this.result="string"===this.options.to?this.chunks.join(""):(t=>{let i=0;for(let r=0,n=t.length;r<n;r++)i+=t[r].length;const r=new Uint8Array(i);for(let i=0,n=0,e=t.length;i<e;i++){let e=t[i];r.set(e,n),n+=e.length}return r})(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Yi={Inflate:Zi,inflate:function(t,i){const r=new Zi(i);if(r.push(t,!0),r.err)throw r.msg||Dt[r.err];return r.result}};const{Inflate:Xi,inflate:Qi}=Yi;var tr=Xi,ir=Qi;const rr=[];for(let t=0;t<256;t++){let i=t;for(let t=0;t<8;t++)1&i?i=3988292384^i>>>1:i>>>=1;rr[t]=i}const nr=4294967295;function er(t,i,r){const n=t.readUint32(),e=function(t,i){return(function(t,i,r){let n=nr;for(let t=0;t<r;t++)n=rr[255&(n^i[t])]^n>>>8;return n}(0,t,i)^nr)>>>0}(new Uint8Array(t.buffer,t.byteOffset+t.offset-i-4,i),i);if(e!==n)throw Error(`CRC mismatch for chunk ${r}. Expected ${n}, found ${e}`)}function sr(t,i,r){for(let n=0;n<r;n++)i[n]=t[n]}function or(t,i,r,n){let e=0;for(;e<n;e++)i[e]=t[e];for(;e<r;e++)i[e]=t[e]+i[e-n]&255}function ar(t,i,r,n){let e=0;if(0===r.length)for(;e<n;e++)i[e]=t[e];else for(;e<n;e++)i[e]=t[e]+r[e]&255}function ur(t,i,r,n,e){let s=0;if(0===r.length){for(;s<e;s++)i[s]=t[s];for(;s<n;s++)i[s]=t[s]+(i[s-e]>>1)&255}else{for(;s<e;s++)i[s]=t[s]+(r[s]>>1)&255;for(;s<n;s++)i[s]=t[s]+(i[s-e]+r[s]>>1)&255}}function fr(t,i,r,n,e){let s=0;if(0===r.length){for(;s<e;s++)i[s]=t[s];for(;s<n;s++)i[s]=t[s]+i[s-e]&255}else{for(;s<e;s++)i[s]=t[s]+r[s]&255;for(;s<n;s++)i[s]=t[s]+cr(i[s-e],r[s],r[s-e])&255}}function cr(t,i,r){const n=t+i-r,e=Math.abs(n-t),s=Math.abs(n-i),o=Math.abs(n-r);return e<=s&&e<=o?t:s<=o?i:r}function hr(t,i,r,n,e,s){switch(t){case 0:sr(i,r,e);break;case 1:or(i,r,e,s);break;case 2:ar(i,r,n,e);break;case 3:ur(i,r,n,e,s);break;case 4:fr(i,r,n,e,s);break;default:throw Error("Unsupported filter: "+t)}}const lr=new Uint16Array([255]),dr=255===new Uint8Array(lr.buffer)[0];function vr(t){return(255&t)<<8|t>>8&255}const pr=new Uint16Array([255]),br=255===new Uint8Array(pr.buffer)[0],mr=new Uint8Array(0);function wr(t){const{data:i,width:r,height:n,channels:e,depth:s}=t,o=Math.ceil(s/8)*e,a=Math.ceil(s/8*e*r),u=new Uint8Array(n*a);let f,c,h=mr,l=0;for(let t=0;t<n;t++){switch(f=i.subarray(l+1,l+1+a),c=u.subarray(t*a,(t+1)*a),i[l]){case 0:sr(f,c,a);break;case 1:or(f,c,a,o);break;case 2:ar(f,c,h,a);break;case 3:ur(f,c,h,a,o);break;case 4:fr(f,c,h,a,o);break;default:throw Error("Unsupported filter: "+i[l])}h=c,l+=a+1}if(16===s){const t=new Uint16Array(u.buffer);if(br)for(let i=0;i<t.length;i++)t[i]=gr(t[i]);return t}return u}function gr(t){return(255&t)<<8|t>>8&255}const kr=Uint8Array.of(137,80,78,71,13,10,26,10);function yr(t){if(!function(t){if(t.length<kr.length)return!1;for(let i=0;i<kr.length;i++)if(t[i]!==kr[i])return!1;return!0}(t.readBytes(kr.length)))throw Error("wrong PNG signature")}const Nr=new TextDecoder("latin1");const Lr=/^[\u0000-\u00FF]*$/;function Ar(t){for(t.mark();0!==t.readByte(););const i=t.offset;t.reset();const r=Nr.decode(t.readBytes(i-t.offset-1));return t.skip(1),function(t){if(function(t){if(!Lr.test(t))throw Error("invalid latin1 text")}(t),0===t.length||t.length>79)throw Error("keyword length must be between 1 and 79")}(r),r}class xr extends Rt{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,i={}){super(t);const{checkCrc:r=!1}=i;this._checkCrc=r,this._inflator=new tr,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=-1,this._filterMethod=-1,this._interlaceMethod=-1,this._colorType=-1,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(yr(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeChunk(t,i)}return this.decodeImage(),this._png}decodeApng(){for(yr(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(t,i)}return this.decodeApngImage(),this._apng}decodeChunk(t,i){const r=this.offset;switch(i){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"tEXt":!function(t,i,r){const n=Ar(i);t[n]=function(t,i){return Nr.decode(t.readBytes(i))}(i,r-n.length-1)}(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t)}if(this.offset-r!==t)throw Error("Length mismatch while decoding chunk "+i);this._checkCrc?er(this,t+4,i):this.skip(4)}decodeApngChunk(t,i){const r=this.offset;switch("fdAT"!==i&&"IDAT"!==i&&this._writingDataChunks&&this.pushDataToFrame(),i){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,i),this.offset=r+t}if(this.offset-r!==t)throw Error("Length mismatch while decoding chunk "+i);this._checkCrc?er(this,t+4,i):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=function(t){if(1!==t&&2!==t&&4!==t&&8!==t&&16!==t)throw Error("invalid bit depth: "+t);return t}(this.readUint8());const i=this.readUint8();let r;switch(this._colorType=i,i){case 0:case 3:r=1;break;case 2:r=3;break;case 4:r=2;break;case 6:r=4;break;default:throw Error("Unknown color type: "+i)}if(this._png.channels=r,this._compressionMethod=this.readUint8(),0!==this._compressionMethod)throw 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 i=t/3;this._hasPalette=!0;const r=[];this._palette=r;for(let t=0;t<i;t++)r.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){if(this._writingDataChunks=!0,this._inflator.push(new Uint8Array(this.buffer,this.offset+this.byteOffset,t)),this._inflator.err)throw Error("Error while decompressing the data: "+this._inflator.err);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let i=t,r=this.offset+this.byteOffset;if(r+=4,i-=4,this._inflator.push(new Uint8Array(this.buffer,r,i)),this._inflator.err)throw Error("Error while decompressing the data: "+this._inflator.err);this.skip(t)}decodetRNS(t){switch(this._colorType){case 0:case 2: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 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 i=0;i<t/2;i++)this._transparency[i]=this.readUint16();break;case 3:{if(t>this._palette.length)throw Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let i=0;for(;i<t;i++){const t=this.readByte();this._palette[i].push(t)}for(;i<this._palette.length;i++)this._palette[i].push(255);break}default:throw Error("tRNS chunk is not supported for color type "+this._colorType)}}decodeiCCP(t){const i=Ar(this),r=this.readUint8();if(0!==r)throw Error("Unsupported iCCP compression method: "+r);const n=this.readBytes(t-i.length-2);this._png.iccEmbeddedProfile={name:i,profile:ir(n)}}decodepHYs(){const t=this.readUint32(),i=this.readUint32(),r=this.readByte();this._png.resolution={x:t,y:i,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 i={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:8===this._apng.depth?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=wr({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),0===t||0===r.xOffset&&0===r.yOffset&&r.width===this._png.width&&r.height===this._png.height)i.data=r.data;else{const n=this._apng.frames.at(t-1);this.disposeFrame(r,n,i),this.addFrameDataToCanvas(i,r)}this._apng.frames.push(i)}}return this._apng}disposeFrame(t,i,r){switch(t.disposeOp){case 0:break;case 1:for(let i=0;i<this._png.height;i++)for(let n=0;n<this._png.width;n++){const e=(i*t.width+n)*this._png.channels;for(let t=0;t<this._png.channels;t++)r.data[e+t]=0}break;case 2:r.data.set(i.data);break;default:throw Error("Unknown disposeOp")}}addFrameDataToCanvas(t,i){const r=1<<this._png.depth,n=(t,r)=>({index:((t+i.yOffset)*this._png.width+i.xOffset+r)*this._png.channels,frameIndex:(t*i.width+r)*this._png.channels});switch(i.blendOp){case 0:for(let r=0;r<i.height;r++)for(let e=0;e<i.width;e++){const{index:s,frameIndex:o}=n(r,e);for(let r=0;r<this._png.channels;r++)t.data[s+r]=i.data[o+r]}break;case 1:for(let e=0;e<i.height;e++)for(let s=0;s<i.width;s++){const{index:o,frameIndex:a}=n(e,s);for(let n=0;n<this._png.channels;n++){const e=i.data[a+this._png.channels-1]/r;t.data[o+n]+=Math.floor(e*(n%(this._png.channels-1)==0?1:i.data[a+n])+(1-e)*t.data[o+n])}}break;default:throw Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw Error("Error while decompressing the data: "+this._inflator.err);const t=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(0!==this._filterMethod)throw Error(`Filter method ${this._filterMethod} not supported`);if(0===this._interlaceMethod)this._png.data=wr({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else{if(1!==this._interlaceMethod)throw Error(`Interlace method ${this._interlaceMethod} not supported`);this._png.data=function(t){const{data:i,width:r,height:n,channels:e,depth:s}=t,o=[{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)*e,u=new Uint8Array(n*r*a);let f=0;for(let t=0;t<7;t++){const e=o[t],s=Math.ceil((r-e.x)/e.xStep),c=Math.ceil((n-e.y)/e.yStep);if(s<=0||c<=0)continue;const h=s*a,l=new Uint8Array(h);for(let t=0;t<c;t++){const o=i[f++],c=i.subarray(f,f+h);f+=h;const d=new Uint8Array(h);hr(o,c,d,l,h,a),l.set(d);for(let i=0;i<s;i++){const s=e.x+i*e.xStep,o=e.y+t*e.yStep;if(!(s>=r||o>=n))for(let t=0;t<a;t++)u[(o*r+s)*a+t]=d[i*a+t]}}}if(16===s){const t=new Uint16Array(u.buffer);if(dr)for(let i=0;i<t.length;i++)t[i]=vr(t[i]);return t}return u}({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,i=this._frames.at(-1);i?i.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:0,blendOp:0,data:t}),this._inflator=new tr,this._writingDataChunks=!1}}var Sr;!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"}(Sr||(Sr={}));
2
+ /** @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
+ */
51
+ var Mr=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function Er(){Mr.console&&"function"==typeof Mr.console.log&&Mr.console.log.apply(Mr.console,arguments)}var qr={log:Er,warn:function(){Mr.console&&("function"==typeof Mr.console.warn?Mr.console.warn.apply(Mr.console,arguments):Er(arguments))},error:function(t){Mr.console&&("function"==typeof Mr.console.error?Mr.console.error.apply(Mr.console,arguments):Er(t))}};function jr(t,i,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){Ir(n.response,i,r)},n.onerror=function(){qr.error("could not download file")},n.send()}function Fr(t){var i=new XMLHttpRequest;i.open("HEAD",t,!1);try{i.send()}catch(t){}return i.status>=200&&i.status<=299}function Pr(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(i)}}var Ir=Mr.saveAs||("object"!==("undefined"==typeof window?"undefined":G(window))||window!==Mr?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,i,r){var n=Mr.URL||Mr.webkitURL,e=document.createElement("a");e.download=i=i||t.name||"download",e.rel="noopener","string"==typeof t?(e.href=t,e.origin!==location.origin?Fr(e.href)?jr(t,i,r):Pr(e,e.target="_blank"):Pr(e)):(e.href=n.createObjectURL(t),setTimeout((function(){n.revokeObjectURL(e.href)}),4e4),setTimeout((function(){Pr(e)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,i,r){if(i=i||t.name||"download","string"==typeof t)if(Fr(t))jr(t,i,r);else{var n=document.createElement("a");n.href=t,n.target="_blank",setTimeout((function(){Pr(n)}))}else navigator.msSaveOrOpenBlob(function(t,i){return void 0===i?i={autoBom:!1}:"object"!==G(i)&&(qr.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,r),i)}:function(t,i,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof t)return jr(t,i,r);var e="application/octet-stream"===t.type,s=/constructor/i.test(Mr.HTMLElement)||Mr.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||e&&s)&&"object"===("undefined"==typeof FileReader?"undefined":G(FileReader))){var a=new FileReader;a.onloadend=function(){var t=a.result;t=o?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=t:location=t,n=null},a.readAsDataURL(t)}else{var u=Mr.URL||Mr.webkitURL,f=u.createObjectURL(t);n?n.location=f:location.href=f,n=null,setTimeout((function(){u.revokeObjectURL(f)}),4e4)}});
52
+ /**
53
+ * A class to parse color values
54
+ * @author Stoyan Stefanov <sstoo@gmail.com>
55
+ * {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
56
+ * @license Use it if you like it
57
+ */function Rr(t){var i;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),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",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"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<r.length;n++){var e=r[n].process,s=r[n].re.exec(t);s&&(i=e(s),this.r=i[0],this.g=i[1],this.b=i[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 t=this.r.toString(16),i=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==i.length&&(i="0"+i),1==r.length&&(r="0"+r),"#"+t+i+r}}var Or=Mr.atob.bind(Mr),Cr=Mr.btoa.bind(Mr);
58
+ /**
59
+ * @license
60
+ * Joseph Myers does not specify a particular license for his work.
61
+ *
62
+ * Author: Joseph Myers
63
+ * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
64
+ *
65
+ * Modified by: Owen Leong
66
+ */function Tr(t,i){var r=t[0],n=t[1],e=t[2],s=t[3];r=Dr(r,n,e,s,i[0],7,-680876936),s=Dr(s,r,n,e,i[1],12,-389564586),e=Dr(e,s,r,n,i[2],17,606105819),n=Dr(n,e,s,r,i[3],22,-1044525330),r=Dr(r,n,e,s,i[4],7,-176418897),s=Dr(s,r,n,e,i[5],12,1200080426),e=Dr(e,s,r,n,i[6],17,-1473231341),n=Dr(n,e,s,r,i[7],22,-45705983),r=Dr(r,n,e,s,i[8],7,1770035416),s=Dr(s,r,n,e,i[9],12,-1958414417),e=Dr(e,s,r,n,i[10],17,-42063),n=Dr(n,e,s,r,i[11],22,-1990404162),r=Dr(r,n,e,s,i[12],7,1804603682),s=Dr(s,r,n,e,i[13],12,-40341101),e=Dr(e,s,r,n,i[14],17,-1502002290),r=zr(r,n=Dr(n,e,s,r,i[15],22,1236535329),e,s,i[1],5,-165796510),s=zr(s,r,n,e,i[6],9,-1069501632),e=zr(e,s,r,n,i[11],14,643717713),n=zr(n,e,s,r,i[0],20,-373897302),r=zr(r,n,e,s,i[5],5,-701558691),s=zr(s,r,n,e,i[10],9,38016083),e=zr(e,s,r,n,i[15],14,-660478335),n=zr(n,e,s,r,i[4],20,-405537848),r=zr(r,n,e,s,i[9],5,568446438),s=zr(s,r,n,e,i[14],9,-1019803690),e=zr(e,s,r,n,i[3],14,-187363961),n=zr(n,e,s,r,i[8],20,1163531501),r=zr(r,n,e,s,i[13],5,-1444681467),s=zr(s,r,n,e,i[2],9,-51403784),e=zr(e,s,r,n,i[7],14,1735328473),r=Ur(r,n=zr(n,e,s,r,i[12],20,-1926607734),e,s,i[5],4,-378558),s=Ur(s,r,n,e,i[8],11,-2022574463),e=Ur(e,s,r,n,i[11],16,1839030562),n=Ur(n,e,s,r,i[14],23,-35309556),r=Ur(r,n,e,s,i[1],4,-1530992060),s=Ur(s,r,n,e,i[4],11,1272893353),e=Ur(e,s,r,n,i[7],16,-155497632),n=Ur(n,e,s,r,i[10],23,-1094730640),r=Ur(r,n,e,s,i[13],4,681279174),s=Ur(s,r,n,e,i[0],11,-358537222),e=Ur(e,s,r,n,i[3],16,-722521979),n=Ur(n,e,s,r,i[6],23,76029189),r=Ur(r,n,e,s,i[9],4,-640364487),s=Ur(s,r,n,e,i[12],11,-421815835),e=Ur(e,s,r,n,i[15],16,530742520),r=_r(r,n=Ur(n,e,s,r,i[2],23,-995338651),e,s,i[0],6,-198630844),s=_r(s,r,n,e,i[7],10,1126891415),e=_r(e,s,r,n,i[14],15,-1416354905),n=_r(n,e,s,r,i[5],21,-57434055),r=_r(r,n,e,s,i[12],6,1700485571),s=_r(s,r,n,e,i[3],10,-1894986606),e=_r(e,s,r,n,i[10],15,-1051523),n=_r(n,e,s,r,i[1],21,-2054922799),r=_r(r,n,e,s,i[8],6,1873313359),s=_r(s,r,n,e,i[15],10,-30611744),e=_r(e,s,r,n,i[6],15,-1560198380),n=_r(n,e,s,r,i[13],21,1309151649),r=_r(r,n,e,s,i[4],6,-145523070),s=_r(s,r,n,e,i[11],10,-1120210379),e=_r(e,s,r,n,i[2],15,718787259),n=_r(n,e,s,r,i[9],21,-343485551),t[0]=Zr(r,t[0]),t[1]=Zr(n,t[1]),t[2]=Zr(e,t[2]),t[3]=Zr(s,t[3])}function Br(t,i,r,n,e,s){return i=Zr(Zr(i,t),Zr(n,s)),Zr(i<<e|i>>>32-e,r)}function Dr(t,i,r,n,e,s,o){return Br(i&r|~i&n,t,i,e,s,o)}function zr(t,i,r,n,e,s,o){return Br(i&n|r&~n,t,i,e,s,o)}function Ur(t,i,r,n,e,s,o){return Br(i^r^n,t,i,e,s,o)}function _r(t,i,r,n,e,s,o){return Br(r^(i|~n),t,i,e,s,o)}function Vr(t){var i,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(i=64;i<=t.length;i+=64)Tr(n,Hr(t.substring(i-64,i)));t=t.substring(i-64);var e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<t.length;i++)e[i>>2]|=t.charCodeAt(i)<<(i%4<<3);if(e[i>>2]|=128<<(i%4<<3),i>55)for(Tr(n,e),i=0;i<16;i++)e[i]=0;return e[14]=8*r,Tr(n,e),n}function Hr(t){var i,r=[];for(i=0;i<64;i+=4)r[i>>2]=t.charCodeAt(i)+(t.charCodeAt(i+1)<<8)+(t.charCodeAt(i+2)<<16)+(t.charCodeAt(i+3)<<24);return r}var Wr="0123456789abcdef".split("");function Gr(t){for(var i="",r=0;r<4;r++)i+=Wr[t>>8*r+4&15]+Wr[t>>8*r&15];return i}function $r(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Jr(t){return Vr(t).map($r).join("")}var Kr="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var i=0;i<t.length;i++)t[i]=Gr(t[i]);return t.join("")}(Vr("hello"));function Zr(t,i){if(Kr){var r=(65535&t)+(65535&i);return(t>>16)+(i>>16)+(r>>16)<<16|65535&r}return t+i&4294967295}
67
+ /**
68
+ * @license
69
+ * FPDF is released under a permissive license: there is no usage restriction.
70
+ * You may embed it freely in your application (commercial or not), with or
71
+ * without modifications.
72
+ *
73
+ * Reference: http://www.fpdf.org/en/script/script37.php
74
+ */function Yr(t,i){var r,n,e;if(t!==r){for(var s=(e=t,Array(1+(256/t.length|0)+1).join(e)),o=[],a=0;a<256;a++)o[a]=a;var u=0;for(a=0;a<256;a++){var f=o[a];u=(u+f+s.charCodeAt(a))%256,o[a]=o[u],o[u]=f}r=t,n=o}else o=n;var c=i.length,h=0,l=0,d="";for(a=0;a<c;a++)l=(l+(f=o[h=(h+1)%256]))%256,o[h]=o[l],o[l]=f,s=o[(o[h]+o[l])%256],d+=String.fromCharCode(i.charCodeAt(a)^s);return d}
75
+ /**
76
+ * @license
77
+ * Licensed under the MIT License.
78
+ * http://opensource.org/licenses/mit-license
79
+ * Author: Owen Leong (@owenl131)
80
+ * Date: 15 Oct 2020
81
+ * References:
82
+ * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
83
+ * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
84
+ * http://www.fpdf.org/en/script/script37.php
85
+ */var Xr={print:4,modify:8,copy:16,"annot-forms":32};function Qr(t,i,r,n){this.v=1,this.r=2;var e=192;t.forEach((function(t){if(void 0!==Xr.perm)throw Error("Invalid permission: "+t);e+=Xr[t]})),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var s=(i+this.padding).substr(0,32),o=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,o),this.P=-(1+(255^e)),this.encryptionKey=Jr(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Yr(this.encryptionKey,this.padding)}function tn(t){if(/[^\u0000-\u00ff]/.test(t))throw Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var i="",r=t.length,n=0;n<r;n++){var e=t.charCodeAt(n);i+=e<33||35===e||37===e||40===e||41===e||47===e||60===e||62===e||91===e||93===e||123===e||125===e||e>126?"#"+("0"+e.toString(16)).slice(-2):t[n]}return i}function rn(t){if("object"!==G(t))throw Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var i={};this.subscribe=function(t,r,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof r||"boolean"!=typeof n)throw Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");i.hasOwnProperty(t)||(i[t]={});var e=Math.random().toString(35);return i[t][e]=[r,!!n],e},this.unsubscribe=function(t){for(var r in i)if(i[r][t])return delete i[r][t],0===Object.keys(i[r]).length&&delete i[r],!0;return!1},this.publish=function(r){if(i.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),e=[];for(var s in i[r]){var o=i[r][s];try{o[0].apply(t,n)}catch(t){Mr.console&&qr.error("jsPDF PubSub Error",t.message,t)}o[1]&&e.push(s)}e.length&&e.forEach(this.unsubscribe)}},this.getTopics=function(){return i}}function nn(t){if(!(this instanceof nn))return new nn(t);var i="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&i.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function en(t,i){this.gState=t,this.matrix=i,this.id="",this.objectNumber=-1}function sn(t,i,r,n,e){if(!(this instanceof sn))return new sn(t,i,r,n,e);this.type="axial"===t?2:3,this.coords=i,this.colors=r,en.call(this,n,e)}function on(t,i,r,n,e){if(!(this instanceof on))return new on(t,i,r,n,e);this.boundingBox=t,this.xStep=i,this.yStep=r,this.stream="",this.cloneIndex=0,en.call(this,n,e)}function an(t){var i,r="string"==typeof arguments[0]?arguments[0]:"p",n=arguments[1],e=arguments[2],s=arguments[3],o=[],a=1,u=16,f="S",c=null;"object"===G(t=t||{})&&(r=t.orientation,n=t.unit||n,e=t.format||e,s=t.compress||t.compressPdf||s,null!==(c=t.encryption||null)&&(c.userPassword=c.userPassword||"",c.ownerPassword=c.ownerPassword||"",c.userPermissions=c.userPermissions||[]),a="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(i=t.precision),void 0!==t.floatPrecision&&(u=t.floatPrecision),f=t.defaultPathOperation||"S"),o=t.filters||(!0===s?["FlateEncode"]:o),n=n||"mm",r=(""+(r||"P")).toLowerCase();var h=t.putOnlyUsedFonts||!1,l={},d={internal:{},__private__:{}};d.__private__.PubSub=rn;var v="1.3",p=d.__private__.getPdfVersion=function(){return v};d.__private__.setPdfVersion=function(t){v=t};var b={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 b};var m=d.__private__.getPageFormat=function(t){return b[t]};e=e||"a4";var w="compat",g="advanced",k=w;function y(){this.saveGraphicsState(),X(new Pt(dt,0,0,-dt,0,pr()*dt)+" cm"),this.setFontSize(this.getFontSize()/dt),f="n",k=g}function N(){this.restoreGraphicsState(),f="S",k=w}var L=d.__private__.combineFontStyleAndFontWeight=function(t,i){if("bold"==t&&"normal"==i||"bold"==t&&400==i||"normal"==t&&"italic"==i||"bold"==t&&"italic"==i)throw Error("Invalid Combination of fontweight and fontstyle");return i&&(t=400==i||"normal"===i?"italic"===t?"italic":"normal":700!=i&&"bold"!==i||"normal"!==t?(700==i?"bold":i)+""+t:"bold"),t};d.advancedAPI=function(t){var i=k===w;return i&&y.call(this),"function"!=typeof t||(t(this),i&&N.call(this)),this},d.compatAPI=function(t){var i=k===g;return i&&N.call(this),"function"!=typeof t||(t(this),i&&y.call(this)),this},d.isAdvancedAPI=function(){return k===g};var A,x=function(t){if(k!==g)throw Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},S=d.roundToPrecision=d.__private__.roundToPrecision=function(t,r){var n=i||r;if(isNaN(t)||isNaN(n))throw Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};A=d.hpf=d.__private__.hpf="number"==typeof u?function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.hpf");return S(t,u)}:"smart"===u?function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.hpf");return S(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.hpf");return S(t,16)};var M=d.f2=d.__private__.f2=function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.f2");return S(t,2)},E=d.__private__.f3=function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.f3");return S(t,3)},q=d.scale=d.__private__.scale=function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.scale");return k===w?t*dt:k===g?t:void 0},j=function(t){return q(function(t){return k===w?pr()-t:k===g?t:void 0}(t))};d.__private__.setPrecision=d.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(i=parseInt(t,10))};var F,P="00000000000000000000000000000000",I=d.__private__.getFileId=function(){return P},R=d.__private__.setFileId=function(t){return P=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():P.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==c&&(yi=new Qr(c.userPermissions,c.userPassword,c.ownerPassword,P)),P};d.setFileId=function(t){return R(t),this},d.getFileId=function(){return I()};var O=d.__private__.convertDateToPDFDate=function(t){var i=t.getTimezoneOffset(),r=i<0?"+":"-",n=Math.floor(Math.abs(i/60)),e=Math.abs(i%60),s=""+r+z(n)+"'"+z(e)+"'";return"D:"+t.getFullYear()+z(t.getMonth()+1)+z(t.getDate())+z(t.getHours())+z(t.getMinutes())+z(t.getSeconds())+s},C=d.__private__.convertPDFDateToDate=function(t){var i=parseInt(t.substr(2,4),10),r=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),e=parseInt(t.substr(10,2),10),s=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(i,r,n,e,s,o,0)},T=d.__private__.setCreationDate=function(t){var i;if(void 0===t&&(t=new Date),t instanceof Date)i=O(t);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(t))throw Error("Invalid argument passed to jsPDF.setCreationDate");i=t}return F=i},B=d.__private__.getCreationDate=function(t){var i=F;return"jsDate"===t&&(i=C(F)),i};d.setCreationDate=function(t){return T(t),this},d.getCreationDate=function(t){return B(t)};var D,z=d.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},U=d.__private__.padd2Hex=function(t){return("00"+(t=""+t)).substr(t.length)},_=0,V=[],H=[],W=0,$=[],J=[],K=!1,Z=H;d.__private__.setCustomOutputDestination=function(t){K=!0,Z=t};var Y=function(t){K||(Z=t)};d.__private__.resetCustomOutputDestination=function(){K=!1,Z=H};var X=d.__private__.out=function(t){return W+=(t=""+t).length+1,Z.push(t),Z},Q=d.__private__.write=function(t){return X(1===arguments.length?""+t:Array.prototype.join.call(arguments," "))},tt=d.__private__.getArrayBuffer=function(t){for(var i=t.length,r=new ArrayBuffer(i),n=new Uint8Array(r);i--;)n[i]=t.charCodeAt(i);return r},it=[["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 it};var rt=t.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(t){return rt=k===g?t/dt:t,this};var nt,et=d.__private__.getFontSize=d.getFontSize=function(){return k===w?rt:rt*dt},st=t.R2L||!1;d.__private__.setR2L=d.setR2L=function(t){return st=t,this},d.__private__.getR2L=d.getR2L=function(){return st};var ot,at=d.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))nt=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');nt=t}else nt=parseInt(t,10)};d.__private__.getZoomMode=function(){return nt};var ut,ft=d.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');ot=t};d.__private__.getPageMode=function(){return ot};var ct=d.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');ut=t};d.__private__.getLayoutMode=function(){return ut},d.__private__.setDisplayMode=d.setDisplayMode=function(t,i,r){return at(t),ct(i),ft(r),this};var ht={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(t){if(-1===Object.keys(ht).indexOf(t))throw Error("Invalid argument passed to jsPDF.getDocumentProperty");return ht[t]},d.__private__.getDocumentProperties=function(){return ht},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(t){for(var i in ht)ht.hasOwnProperty(i)&&t[i]&&(ht[i]=t[i]);return this},d.__private__.setDocumentProperty=function(t,i){if(-1===Object.keys(ht).indexOf(t))throw Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ht[t]=i};var lt,dt,vt,pt,bt,mt={},wt={},gt=[],kt={},yt={},Nt={},Lt={},At=null,xt=0,St=[],Mt=new rn(d),Et=t.hotfixes||[],qt={},jt={},Ft=[],Pt=function t(i,r,n,e,s,o){if(!(this instanceof t))return new t(i,r,n,e,s,o);isNaN(i)&&(i=1),isNaN(r)&&(r=0),isNaN(n)&&(n=0),isNaN(e)&&(e=1),isNaN(s)&&(s=0),isNaN(o)&&(o=0),this._matrix=[i,r,n,e,s,o]};Object.defineProperty(Pt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Pt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Pt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Pt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Pt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Pt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Pt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Pt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Pt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Pt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Pt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Pt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Pt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Pt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Pt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Pt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Pt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(A).join(t)},Pt.prototype.multiply=function(t){return new Pt(t.sx*this.sx+t.shy*this.shx,t.sx*this.shy+t.shy*this.sy,t.shx*this.sx+t.sy*this.shx,t.shx*this.shy+t.sy*this.sy,t.tx*this.sx+t.ty*this.shx+this.tx,t.tx*this.shy+t.ty*this.sy+this.ty)},Pt.prototype.decompose=function(){var t=this.sx,i=this.shy,r=this.shx,n=this.sy,e=this.tx,s=this.ty,o=Math.sqrt(t*t+i*i),a=(t/=o)*r+(i/=o)*n,u=Math.sqrt((r-=t*a)*r+(n-=i*a)*n);return a/=u,t*(n/=u)<i*(r/=u)&&(t=-t,i=-i,a=-a,o=-o),{scale:new Pt(o,0,0,u,0,0),translate:new Pt(1,0,0,1,e,s),rotate:new Pt(t,i,-i,t,0,0),skew:new Pt(1,0,a,1,0,0)}},Pt.prototype.toString=function(){return this.join(" ")},Pt.prototype.inversed=function(){var t=this.sx,i=this.shy,r=this.shx,n=this.sy,e=this.tx,s=this.ty,o=1/(t*n-i*r),a=n*o,u=-i*o,f=-r*o,c=t*o;return new Pt(a,u,f,c,-a*e-f*s,-u*e-c*s)},Pt.prototype.applyToPoint=function(t){return new er(t.x*this.sx+t.y*this.shx+this.tx,t.x*this.shy+t.y*this.sy+this.ty)},Pt.prototype.applyToRectangle=function(t){var i=this.applyToPoint(t),r=this.applyToPoint(new er(t.x+t.w,t.y+t.h));return new sr(i.x,i.y,r.x-i.x,r.y-i.y)},Pt.prototype.clone=function(){return new Pt(this.sx,this.shy,this.shx,this.sy,this.tx,this.ty)},d.Matrix=Pt;var It=d.matrixMult=function(t,i){return i.multiply(t)},Rt=new Pt(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=Rt;var Ot=function(t,i){if(!yt[t]){var r=(i instanceof sn?"Sh":"P")+(Object.keys(kt).length+1).toString(10);i.id=r,yt[t]=r,kt[r]=i,Mt.publish("addPattern",i)}};d.ShadingPattern=sn,d.TilingPattern=on,d.addShadingPattern=function(t,i){return x("addShadingPattern()"),Ot(t,i),this},d.beginTilingPattern=function(t){x("beginTilingPattern()"),ar(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},d.endTilingPattern=function(t,i){x("endTilingPattern()"),i.stream=J[D].join("\n"),Ot(t,i),Mt.publish("endTilingPattern",i),Ft.pop().restore()};var Ct,Tt=d.__private__.newObject=function(){var t=Bt();return Dt(t,!0),t},Bt=d.__private__.newObjectDeferred=function(){return _++,V[_]=function(){return W},_},Dt=function(t,i){return i="boolean"==typeof i&&i,V[t]=W,i&&X(t+" 0 obj"),t},zt=d.__private__.newAdditionalObject=function(){var t={objId:Bt(),content:""};return $.push(t),t},Ut=Bt(),_t=Bt(),Vt=d.__private__.decodeColorString=function(t){var i=t.split(" ");if(2!==i.length||"g"!==i[1]&&"G"!==i[1])5!==i.length||"k"!==i[4]&&"K"!==i[4]||(i=[(1-i[0])*(1-i[3]),(1-i[1])*(1-i[3]),(1-i[2])*(1-i[3]),"r"]);else{var r=parseFloat(i[0]);i=[r,r,r,"r"]}for(var n="#",e=0;e<3;e++)n+=("0"+Math.floor(255*parseFloat(i[e])).toString(16)).slice(-2);return n},Ht=d.__private__.encodeColorString=function(t){var i;"string"==typeof t&&(t={ch1:t});var r=t.ch1,n=t.ch2,e=t.ch3,s=t.ch4,o="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof r&&"#"!==r.charAt(0)){var a=new Rr(r);if(a.ok)r=a.toHex();else if(!/^\d*\.?\d*$/.test(r))throw Error('Invalid color "'+r+'" passed to jsPDF.encodeColorString.')}if("string"==typeof r&&/^#[0-9A-Fa-f]{3}$/.test(r)&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),"string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r)){var u=parseInt(r.substr(1),16);r=u>>16&255,n=u>>8&255,e=255&u}if(void 0===n||void 0===s&&r===n&&n===e)i="string"==typeof r?r+" "+o[0]:2===t.precision?M(r/255)+" "+o[0]:E(r/255)+" "+o[0];else if(void 0===s||"object"===G(s)){if(s&&!isNaN(s.a)&&0===s.a)return["1. 1. 1.",o[1]].join(" ");i="string"==typeof r?[r,n,e,o[1]].join(" "):2===t.precision?[M(r/255),M(n/255),M(e/255),o[1]].join(" "):[E(r/255),E(n/255),E(e/255),o[1]].join(" ")}else i="string"==typeof r?[r,n,e,s,o[2]].join(" "):2===t.precision?[M(r),M(n),M(e),M(s),o[2]].join(" "):[E(r),E(n),E(e),E(s),o[2]].join(" ");return i},Wt=d.__private__.getFilters=function(){return o},Gt=d.__private__.putStream=function(t){var i=(t=t||{}).data||"",r=t.filters||Wt(),n=t.alreadyAppliedFilters||[],e=t.addLength1||!1,s=i.length,o=t.objectId,a=function(t){return t};if(null!==c&&void 0===o)throw Error("ObjectId must be passed to putStream for file encryption");null!==c&&(a=yi.encryptor(o,0));var u={};!0===r&&(r=["FlateEncode"]);var f=t.additionalKeyValues||[],h=(u=void 0!==an.API.processDataByFilters?an.API.processDataByFilters(i,r):{data:i,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):""+n);if(0!==u.data.length&&(f.push({key:"Length",value:u.data.length}),!0===e&&f.push({key:"Length1",value:s})),0!=h.length)if(h.split("/").length-1==1)f.push({key:"Filter",value:h});else{f.push({key:"Filter",value:"["+h+"]"});for(var l=0;l<f.length;l+=1)if("DecodeParms"===f[l].key){for(var d=[],v=0;v<u.reverseChain.split("/").length-1;v+=1)d.push("null");d.push(f[l].value),f[l].value="["+d.join(" ")+"]"}}X("<<");for(var p=0;p<f.length;p++)X("/"+f[p].key+" "+f[p].value);X(">>"),0!==u.data.length&&(X("stream"),X(a(u.data)),X("endstream"))},$t=d.__private__.putPage=function(t){var i=t.number,r=t.data,n=t.objId,e=t.contentsObjId;Dt(n,!0),X("<</Type /Page"),X("/Parent "+t.rootDictionaryObjId+" 0 R"),X("/Resources "+t.resourceDictionaryObjId+" 0 R"),X("/MediaBox ["+parseFloat(A(t.mediaBox.bottomLeftX))+" "+parseFloat(A(t.mediaBox.bottomLeftY))+" "+A(t.mediaBox.topRightX)+" "+A(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&X("/CropBox ["+A(t.cropBox.bottomLeftX)+" "+A(t.cropBox.bottomLeftY)+" "+A(t.cropBox.topRightX)+" "+A(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&X("/BleedBox ["+A(t.bleedBox.bottomLeftX)+" "+A(t.bleedBox.bottomLeftY)+" "+A(t.bleedBox.topRightX)+" "+A(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&X("/TrimBox ["+A(t.trimBox.bottomLeftX)+" "+A(t.trimBox.bottomLeftY)+" "+A(t.trimBox.topRightX)+" "+A(t.trimBox.topRightY)+"]"),null!==t.artBox&&X("/ArtBox ["+A(t.artBox.bottomLeftX)+" "+A(t.artBox.bottomLeftY)+" "+A(t.artBox.topRightX)+" "+A(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&X("/UserUnit "+t.userUnit),Mt.publish("putPage",{objId:n,pageContext:St[i],pageNumber:i,page:r}),X("/Contents "+e+" 0 R"),X(">>"),X("endobj");var s=r.join("\n");return k===g&&(s+="\nQ"),Dt(e,!0),Gt({data:s,filters:Wt(),objectId:e}),X("endobj"),n},Jt=d.__private__.putPages=function(){var t,i,r=[];for(t=1;t<=xt;t++)St[t].objId=Bt(),St[t].contentsObjId=Bt();for(t=1;t<=xt;t++)r.push($t({number:t,data:J[t],objId:St[t].objId,contentsObjId:St[t].contentsObjId,mediaBox:St[t].mediaBox,cropBox:St[t].cropBox,bleedBox:St[t].bleedBox,trimBox:St[t].trimBox,artBox:St[t].artBox,userUnit:St[t].userUnit,rootDictionaryObjId:Ut,resourceDictionaryObjId:_t}));Dt(Ut,!0),X("<</Type /Pages");var n="/Kids [";for(i=0;i<xt;i++)n+=r[i]+" 0 R ";X(n+"]"),X("/Count "+xt),X(">>"),X("endobj"),Mt.publish("postPutPages")},Kt=function(t){Mt.publish("putFont",{font:t,out:X,newObject:Tt,putStream:Gt}),!0!==t.isAlreadyPutted&&(t.objectNumber=Tt(),X("<<"),X("/Type /Font"),X("/BaseFont /"+tn(t.postScriptName)),X("/Subtype /Type1"),"string"==typeof t.encoding&&X("/Encoding /"+t.encoding),X("/FirstChar 32"),X("/LastChar 255"),X(">>"),X("endobj"))},Zt=function(t){t.objectNumber=Tt();var i=[];i.push({key:"Type",value:"/XObject"}),i.push({key:"Subtype",value:"/Form"}),i.push({key:"BBox",value:"["+[A(t.x),A(t.y),A(t.x+t.width),A(t.y+t.height)].join(" ")+"]"}),i.push({key:"Matrix",value:"["+t.matrix+"]"});var r=t.pages[1].join("\n");Gt({data:r,additionalKeyValues:i,objectId:t.objectNumber}),X("endobj")},Yt=function(t,i){i||(i=21);var r=Tt(),n=function(t,i){var r,n=[],e=1/(i-1);for(r=0;r<1;r+=e)n.push(r);n.push(1),0!=t[0].offset&&t.unshift({offset:0,color:t[0].color}),1!=t[t.length-1].offset&&t.push({offset:1,color:t[t.length-1].color});for(var s="",o=0,a=0;a<n.length;a++){for(r=n[a];r>t[o+1].offset;)o++;var u=t[o].offset,f=(r-u)/(t[o+1].offset-u),c=t[o].color,h=t[o+1].color;s+=U(Math.round((1-f)*c[0]+f*h[0]).toString(16))+U(Math.round((1-f)*c[1]+f*h[1]).toString(16))+U(Math.round((1-f)*c[2]+f*h[2]).toString(16))}return s.trim()}(t.colors,i),e=[];e.push({key:"FunctionType",value:"0"}),e.push({key:"Domain",value:"[0.0 1.0]"}),e.push({key:"Size",value:"["+i+"]"}),e.push({key:"BitsPerSample",value:"8"}),e.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),e.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Gt({data:n,additionalKeyValues:e,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),X("endobj"),t.objectNumber=Tt(),X("<< /ShadingType "+t.type),X("/ColorSpace /DeviceRGB");var s="/Coords ["+A(parseFloat(t.coords[0]))+" "+A(parseFloat(t.coords[1]))+" ";s+=2===t.type?A(parseFloat(t.coords[2]))+" "+A(parseFloat(t.coords[3])):A(parseFloat(t.coords[2]))+" "+A(parseFloat(t.coords[3]))+" "+A(parseFloat(t.coords[4]))+" "+A(parseFloat(t.coords[5])),X(s+="]"),t.matrix&&X("/Matrix ["+t.matrix+"]"),X("/Function "+r+" 0 R"),X("/Extend [true true]"),X(">>"),X("endobj")},Xt=function(t,i){var r=Bt(),n=Tt();i.push({resourcesOid:r,objectOid:n}),t.objectNumber=n;var e=[];e.push({key:"Type",value:"/Pattern"}),e.push({key:"PatternType",value:"1"}),e.push({key:"PaintType",value:"1"}),e.push({key:"TilingType",value:"1"}),e.push({key:"BBox",value:"["+t.boundingBox.map(A).join(" ")+"]"}),e.push({key:"XStep",value:A(t.xStep)}),e.push({key:"YStep",value:A(t.yStep)}),e.push({key:"Resources",value:r+" 0 R"}),t.matrix&&e.push({key:"Matrix",value:"["+t.matrix+"]"}),Gt({data:t.stream,additionalKeyValues:e,objectId:t.objectNumber}),X("endobj")},Qt=function(t){for(var i in t.objectNumber=Tt(),X("<<"),t)switch(i){case"opacity":X("/ca "+M(t[i]));break;case"stroke-opacity":X("/CA "+M(t[i]))}X(">>"),X("endobj")},ti=function(t){Dt(t.resourcesOid,!0),X("<<"),X("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in X("/Font <<"),mt)mt.hasOwnProperty(t)&&(!1===h||!0===h&&l.hasOwnProperty(t))&&X("/"+t+" "+mt[t].objectNumber+" 0 R");X(">>")}(),function(){if(Object.keys(kt).length>0){for(var t in X("/Shading <<"),kt)kt.hasOwnProperty(t)&&kt[t]instanceof sn&&kt[t].objectNumber>=0&&X("/"+t+" "+kt[t].objectNumber+" 0 R");Mt.publish("putShadingPatternDict"),X(">>")}}(),function(t){if(Object.keys(kt).length>0){for(var i in X("/Pattern <<"),kt)kt.hasOwnProperty(i)&&kt[i]instanceof d.TilingPattern&&kt[i].objectNumber>=0&&kt[i].objectNumber<t&&X("/"+i+" "+kt[i].objectNumber+" 0 R");Mt.publish("putTilingPatternDict"),X(">>")}}(t.objectOid),function(){if(Object.keys(Nt).length>0){var t;for(t in X("/ExtGState <<"),Nt)Nt.hasOwnProperty(t)&&Nt[t].objectNumber>=0&&X("/"+t+" "+Nt[t].objectNumber+" 0 R");Mt.publish("putGStateDict"),X(">>")}}(),function(){for(var t in X("/XObject <<"),qt)qt.hasOwnProperty(t)&&qt[t].objectNumber>=0&&X("/"+t+" "+qt[t].objectNumber+" 0 R");Mt.publish("putXobjectDict"),X(">>")}(),X(">>"),X("endobj")},ii=function(t){wt[t.fontName]=wt[t.fontName]||{},wt[t.fontName][t.fontStyle]=t.id},ri=function(t,i,r,n,e){var s={id:"F"+(Object.keys(mt).length+1).toString(10),postScriptName:t,fontName:i,fontStyle:r,encoding:n,isStandardFont:e||!1,metadata:{}};return Mt.publish("addFont",{font:s,instance:this}),mt[s.id]=s,ii(s),s.id},ni=d.__private__.pdfEscape=d.pdfEscape=function(t,i){return function(t,i){var r,n,e,s,o,a,u,f,c;if(e=(i=i||{}).sourceEncoding||"Unicode",o=i.outputEncoding,(i.autoencode||o)&&mt[lt].metadata&&mt[lt].metadata[e]&&mt[lt].metadata[e].encoding&&(s=mt[lt].metadata[e].encoding,!o&&mt[lt].encoding&&(o=mt[lt].encoding),!o&&s.codePages&&(o=s.codePages[0]),"string"==typeof o&&(o=s[o]),o)){for(u=!1,a=[],r=0,n=t.length;r<n;r++)(f=o[t.charCodeAt(r)])?a.push(String.fromCharCode(f)):a.push(t[r]),a[r].charCodeAt(0)>>8&&(u=!0);t=a.join("")}for(r=t.length;void 0===u&&0!==r;)t.charCodeAt(r-1)>>8&&(u=!0),r--;if(!u)return t;for(a=i.noBOM?[]:[254,255],r=0,n=t.length;r<n;r++){if((c=(f=t.charCodeAt(r))>>8)>>8)throw Error("Character at position "+r+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(c),a.push(f-(c<<8))}return String.fromCharCode.apply(void 0,a)}(t,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ei=d.__private__.beginPage=function(t){J[++xt]=[],St[xt]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},ai(xt),Y(J[D])},si=function(t,i){var n,s,o;switch(r=i||r,"string"==typeof t&&(n=m(t.toLowerCase()),Array.isArray(n)&&(s=n[0],o=n[1])),Array.isArray(t)&&(s=t[0]*dt,o=t[1]*dt),isNaN(s)&&(s=e[0],o=e[1]),(s>14400||o>14400)&&(qr.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),s=Math.min(14400,s),o=Math.min(14400,o)),e=[s,o],r.substr(0,1)){case"l":o>s&&(e=[o,s]);break;case"p":s>o&&(e=[o,s])}ei(e),Ui(Di),X(Ki),0!==ir&&X(ir+" J"),0!==rr&&X(rr+" j"),Mt.publish("addPage",{pageNumber:xt})},oi=function(t){t>0&&t<=xt&&(J.splice(t,1),St.splice(t,1),xt--,D>xt&&(D=xt),this.setPage(D))},ai=function(t){t>0&&t<=xt&&(D=t)},ui=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return J.length-1},fi=function(t,i,r){var n,e=void 0;return r=r||{},i=void 0!==i?i:mt[lt].fontStyle,n=(t=void 0!==t?t:mt[lt].fontName).toLowerCase(),void 0!==wt[n]&&void 0!==wt[n][i]?e=wt[n][i]:void 0!==wt[t]&&void 0!==wt[t][i]?e=wt[t][i]:!1===r.disableWarning&&qr.warn("Unable to look up font label for font '"+t+"', '"+i+"'. Refer to getFontList() for available fonts."),e||r.noFallback||null==(e=wt.times[i])&&(e=wt.times.normal),e},ci=d.__private__.putInfo=function(){var t=Tt(),i=function(t){return t};for(var r in null!==c&&(i=yi.encryptor(t,0)),X("<<"),X("/Producer ("+ni(i("jsPDF "+an.version))+")"),ht)ht.hasOwnProperty(r)&&ht[r]&&X("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+ni(i(ht[r]))+")");X("/CreationDate ("+ni(i(F))+")"),X(">>"),X("endobj")},hi=d.__private__.putCatalog=function(t){var i=(t=t||{}).rootDictionaryObjId||Ut;switch(Tt(),X("<<"),X("/Type /Catalog"),X("/Pages "+i+" 0 R"),nt||(nt="fullwidth"),nt){case"fullwidth":X("/OpenAction [3 0 R /FitH null]");break;case"fullheight":X("/OpenAction [3 0 R /FitV null]");break;case"fullpage":X("/OpenAction [3 0 R /Fit]");break;case"original":X("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+nt;"%"===r.substr(r.length-1)&&(nt=parseInt(nt)/100),"number"==typeof nt&&X("/OpenAction [3 0 R /XYZ null null "+M(nt)+"]")}switch(ut||(ut="continuous"),ut){case"continuous":X("/PageLayout /OneColumn");break;case"single":X("/PageLayout /SinglePage");break;case"two":case"twoleft":X("/PageLayout /TwoColumnLeft");break;case"tworight":X("/PageLayout /TwoColumnRight")}ot&&X("/PageMode /"+ot),Mt.publish("putCatalog"),X(">>"),X("endobj")},li=d.__private__.putTrailer=function(){X("trailer"),X("<<"),X("/Size "+(_+1)),X("/Root "+_+" 0 R"),X("/Info "+(_-1)+" 0 R"),null!==c&&X("/Encrypt "+yi.oid+" 0 R"),X("/ID [ <"+P+"> <"+P+"> ]"),X(">>")},di=d.__private__.putHeader=function(){X("%PDF-"+v),X("%ºß¬à")},vi=d.__private__.putXRef=function(){var t="0000000000";X("xref"),X("0 "+(_+1)),X("0000000000 65535 f ");for(var i=1;i<=_;i++)X("function"==typeof V[i]?(t+V[i]()).slice(-10)+" 00000 n ":void 0!==V[i]?(t+V[i]).slice(-10)+" 00000 n ":"0000000000 00000 n ")},pi=d.__private__.buildDocument=function(){var t;_=0,W=0,H=[],V=[],$=[],Ut=Bt(),_t=Bt(),Y(H),Mt.publish("buildDocument"),di(),Jt(),function(){Mt.publish("putAdditionalObjects");for(var t=0;t<$.length;t++){var i=$[t];Dt(i.objId,!0),X(i.content),X("endobj")}Mt.publish("postPutAdditionalObjects")}(),t=[],function(){for(var t in mt)mt.hasOwnProperty(t)&&(!1===h||!0===h&&l.hasOwnProperty(t))&&Kt(mt[t])}(),function(){var t;for(t in Nt)Nt.hasOwnProperty(t)&&Qt(Nt[t])}(),function(){for(var t in qt)qt.hasOwnProperty(t)&&Zt(qt[t])}(),function(t){var i;for(i in kt)kt.hasOwnProperty(i)&&(kt[i]instanceof sn?Yt(kt[i]):kt[i]instanceof on&&Xt(kt[i],t))}(t),Mt.publish("putResources"),t.forEach(ti),ti({resourcesOid:_t,objectOid:Number.MAX_SAFE_INTEGER}),Mt.publish("postPutResources"),null!==c&&(yi.oid=Tt(),X("<<"),X("/Filter /Standard"),X("/V "+yi.v),X("/R "+yi.r),X("/U <"+yi.toHexString(yi.U)+">"),X("/O <"+yi.toHexString(yi.O)+">"),X("/P "+yi.P),X(">>"),X("endobj")),ci(),hi();var i=W;return vi(),li(),X("startxref"),X(""+i),X("%%EOF"),Y(J[D]),H.join("\n")},bi=d.__private__.getBlob=function(t){return new Blob([tt(t)],{type:"application/pdf"})},mi=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},wi=function(t){var i,r=t.document,n=r.documentElement,e=r.head,s=r.body;return e||(e=r.createElement("head"),n.appendChild(e)),s||(s=r.createElement("body"),n.appendChild(s)),mi(e),mi(s),(i=r.createElement("style")).appendChild(r.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),e.appendChild(i),{document:r,body:s}},gi=d.output=d.__private__.output=(Ct=function(t,i){switch("string"==typeof(i=i||{})?i={filename:i}:i.filename=i.filename||"generated.pdf",t){case void 0:return pi();case"save":d.save(i.filename);break;case"arraybuffer":return tt(pi());case"blob":return bi(pi());case"bloburi":case"bloburl":if(void 0!==Mr.URL&&"function"==typeof Mr.URL.createObjectURL)return Mr.URL&&Mr.URL.createObjectURL(bi(pi()))||void 0;qr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var r="",n=pi();try{r=Cr(n)}catch(t){r=Cr(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+encodeURIComponent(i.filename)+";base64,"+r;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(Mr)){var e="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",s=!i.pdfObjectUrl;s||(e=i.pdfObjectUrl);var o=Mr.open();if(null!==o){var a=wi(o),u=a.document.createElement("script"),f=this;u.src=e,s&&(u.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",u.crossOrigin="anonymous"),u.onload=function(){o.PDFObject.embed(f.output("dataurlstring"),i)},a.body.appendChild(u)}return o}throw Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(Mr)){var c=i.pdfJsUrl||"examples/PDF.js/web/viewer.html",h=Mr.open();if(null!==h){var l=wi(h),v=l.document.createElement("iframe"),p=-1===c.indexOf("?")?"?":"&";f=this,v.id="pdfViewer",v.width="500px",v.height="400px",v.src=c+p+"file=&downloadName="+encodeURIComponent(i.filename),v.onload=function(){h.document.title=i.filename,v.contentWindow.PDFViewerApplication.open(f.output("bloburl"))},l.body.appendChild(v)}return h}throw Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(Mr))throw Error("The option dataurlnewwindow just works in a browser-environment.");var b=Mr.open();if(null!==b){var m=wi(b),w=m.document.createElement("iframe");w.src=this.output("datauristring",i),m.body.appendChild(w),b.document.title=i.filename}if(b||"undefined"==typeof safari)return b;break;case"datauri":case"dataurl":return Mr.document.location.href=this.output("datauristring",i);default:return null}},Ct.foo=function(){try{return Ct.apply(this,arguments)}catch(r){var t=r.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var i="Error in function "+t.split("\n")[0].split("<")[0]+": "+r.message;if(!Mr.console)throw Error(i);Mr.console.error(i,r),Mr.alert&&alert(i)}},Ct.foo.bar=Ct,Ct.foo),ki=function(t){return!0===Array.isArray(Et)&&Et.indexOf(t)>-1};switch(n){case"pt":dt=1;break;case"mm":dt=72/25.4;break;case"cm":dt=72/2.54;break;case"in":dt=72;break;case"px":dt=1==ki("px_scaling")?.75:96/72;break;case"pc":case"em":dt=12;break;case"ex":dt=6;break;default:if("number"!=typeof n)throw Error("Invalid unit: "+n);dt=n}var yi=null;T(),R();var Ni=d.__private__.getPageInfo=d.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:St[t].objId,pageNumber:t,pageContext:St[t]}},Li=d.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var i in St)if(St[i].objId===t)break;return Ni(i)},Ai=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:St[D].objId,pageNumber:D,pageContext:St[D]}};d.addPage=function(){return si.apply(this,arguments),this},d.setPage=function(){return ai.apply(this,arguments),Y(J[D]),this},d.insertPage=function(t){return this.addPage(),this.movePage(D,t),this},d.movePage=function(t,i){var r,n;if(t>i){r=J[t],n=St[t];for(var e=t;e>i;e--)J[e]=J[e-1],St[e]=St[e-1];J[i]=r,St[i]=n,this.setPage(i)}else if(t<i){r=J[t],n=St[t];for(var s=t;s<i;s++)J[s]=J[s+1],St[s]=St[s+1];J[i]=r,St[i]=n,this.setPage(i)}return this},d.deletePage=function(){return oi.apply(this,arguments),this},d.__private__.text=d.text=function(t,i,r,n,e){var s,o,a,u,f,c,h,d,v,p=(n=n||{}).scope||this;if("number"==typeof t&&"number"==typeof i&&("string"==typeof r||Array.isArray(r))){var b=r;r=i,i=t,t=b}if(arguments[3]instanceof Pt==0?(a=arguments[4],u=arguments[5],"object"===G(h=arguments[3])&&null!==h||("string"==typeof a&&(u=a,a=null),"string"==typeof h&&(u=h,h=null),"number"==typeof h&&(a=h,h=null),n={flags:h,angle:a,align:u})):(x("The transform parameter of text() with a Matrix value"),v=e),isNaN(i)||isNaN(r)||null==t)throw Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return p;var m,w="",y="number"==typeof n.lineHeightFactor?n.lineHeightFactor:Bi,N=p.internal.scaleFactor;function L(t){return t=t.split("\t").join(Array(n.TabLen||9).join(" ")),ni(t,h)}function S(t){for(var i,r=t.concat(),n=[],e=r.length;e--;)"string"==typeof(i=r.shift())?n.push(i):n.push(Array.isArray(t)&&(1===i.length||void 0===i[1]&&void 0===i[2])?i[0]:[i[0],i[1],i[2]]);return n}function M(t,i){var r;if("string"==typeof t)r=i(t)[0];else if(Array.isArray(t)){for(var n,e,s=t.concat(),o=[],a=s.length;a--;)"string"==typeof(n=s.shift())?o.push(i(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(e=i(n[0],n[1],n[2]),o.push([e[0],e[1],e[2]]));r=o}return r}var E=!1,j=!0;if("string"==typeof t)E=!0;else if(Array.isArray(t)){var F=t.concat();o=[];for(var P,I=F.length;I--;)("string"!=typeof(P=F.shift())||Array.isArray(P)&&"string"!=typeof P[0])&&(j=!1);E=j}if(!1===E)throw Error('Type of text must be string or Array. "'+t+'" is not recognized.');"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var R=rt/p.internal.scaleFactor,O=R*(y-1);switch(n.baseline){case"bottom":r-=O;break;case"top":r+=R-O;break;case"hanging":r+=R-2*O;break;case"middle":r+=R/2-O}if((c=n.maxWidth||0)>0&&("string"==typeof t?t=p.splitTextToSize(t,c):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,i){return t.concat(p.splitTextToSize(i,c))}),[]))),Mt.publish("preProcessText",s={text:t,x:i,y:r,options:n,mutex:{pdfEscape:ni,activeFontKey:lt,fonts:mt,activeFontSize:rt}}),t=s.text,a=(n=s.options).angle,v instanceof Pt==0&&a&&"number"==typeof a){a*=Math.PI/180,0===n.rotationDirection&&(a=-a),k===g&&(a=-a);var C=Math.cos(a),T=Math.sin(a);v=new Pt(C,T,-T,C,0,0)}else a&&a instanceof Pt&&(v=a);k!==g||v||(v=Rt),void 0!==(f=n.charSpace||Qi)&&(w+=A(q(f))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(d=n.horizontalScale)&&(w+=A(100*d)+" Tz\n");var B=-1,D=void 0!==n.renderingMode?n.renderingMode:n.stroke,z=p.internal.getCurrentPageInfo().pageContext;switch(D){case 0:case!1:case"fill":B=0;break;case 1:case!0:case"stroke":B=1;break;case 2:case"fillThenStroke":B=2;break;case 3:case"invisible":B=3;break;case 4:case"fillAndAddForClipping":B=4;break;case 5:case"strokeAndAddPathForClipping":B=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":B=6;break;case 7:case"addToPathForClipping":B=7}-1!==B?w+=B+" Tr\n":-1!==(void 0!==z.usedRenderingMode?z.usedRenderingMode:-1)&&(w+="0 Tr\n"),-1!==B&&(z.usedRenderingMode=B),u=n.align||"left";var U,_=rt*y,V=p.internal.pageSize.getWidth(),H=mt[lt];f=n.charSpace||Qi,c=n.maxWidth||0,h=Object.assign({autoencode:!0,noBOM:!0},n.flags);var W=[],$=function(t){return p.getStringUnitWidth(t,{font:H,charSpace:f,fontSize:rt,doKerning:!1})*rt/N};if("[object Array]"===Object.prototype.toString.call(t)){var J;o=S(t),"left"!==u&&(U=o.map($));var K,Z=0;if("right"===u){i-=U[0],t=[],I=o.length;for(var Y=0;Y<I;Y++)0===Y?(K=Wi(i),J=Gi(r)):(K=q(Z-U[Y]),J=-_),t.push([o[Y],K,J]),Z=U[Y]}else if("center"===u){i-=U[0]/2,t=[],I=o.length;for(var Q=0;Q<I;Q++)0===Q?(K=Wi(i),J=Gi(r)):(K=q((Z-U[Q])/2),J=-_),t.push([o[Q],K,J]),Z=U[Q]}else if("left"===u){t=[],I=o.length;for(var tt=0;tt<I;tt++)t.push(o[tt])}else if("justify"===u&&"Identity-H"===H.encoding){t=[],I=o.length,c=0!==c?c:V;for(var it=0,nt=0;nt<I;nt++)if(J=0===nt?Gi(r):-_,K=0===nt?Wi(i):it,nt<I-1){var et=q((c-U[nt])/(o[nt].split(" ").length-1)),ot=o[nt].split(" ");t.push([ot[0]+" ",K,J]),it=0;for(var at=1;at<ot.length;at++){var ut=($(ot[at-1]+" "+ot[at])-$(ot[at]))*N+et;t.push(at==ot.length-1?[ot[at],ut,0]:[ot[at]+" ",ut,0]),it-=ut}}else t.push([o[nt],K,J]);t.push(["",it,0])}else{if("justify"!==u)throw Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(t=[],I=o.length,c=0!==c?c:V,nt=0;nt<I;nt++){J=0===nt?Gi(r):-_,K=0===nt?Wi(i):0;var ft=o[nt].split(" ").length-1;W.push(nt<I-1?A(q(ft>0?(c-U[nt])/ft:0)):0),t.push([o[nt],K,J])}}}!0===("boolean"==typeof n.R2L?n.R2L:st)&&(t=M(t,(function(t,i,r){return[t.split("").reverse().join(""),i,r]}))),Mt.publish("postProcessText",s={text:t,x:i,y:r,options:n,mutex:{pdfEscape:ni,activeFontKey:lt,fonts:mt,activeFontSize:rt}}),t=s.text,m=s.mutex.isHex||!1;var ct=mt[lt].encoding;"WinAnsiEncoding"!==ct&&"StandardEncoding"!==ct||(t=M(t,(function(t,i,r){return[L(t),i,r]}))),o=S(t),t=[];for(var ht,dt,vt,pt=Array.isArray(o[0])?1:0,bt="",wt=function(t,i,r){var e="";return r instanceof Pt?(r="number"==typeof n.angle?It(r,new Pt(1,0,0,1,t,i)):It(new Pt(1,0,0,1,t,i),r),k===g&&(r=It(new Pt(1,0,0,-1,0,0),r)),e=r.join(" ")+" Tm\n"):e=A(t)+" "+A(i)+" Td\n",e},gt=0;gt<o.length;gt++){switch(bt="",pt){case 1:vt=(m?"<":"(")+o[gt][0]+(m?">":")"),ht=parseFloat(o[gt][1]),dt=parseFloat(o[gt][2]);break;case 0:vt=(m?"<":"(")+o[gt]+(m?">":")"),ht=Wi(i),dt=Gi(r)}void 0!==W&&void 0!==W[gt]&&(bt=W[gt]+" Tw\n"),0===gt?t.push(bt+wt(ht,dt,v)+vt):0===pt?t.push(bt+vt):1===pt&&t.push(bt+wt(ht,dt,v)+vt)}t=t.join(0===pt?" Tj\nT* ":" Tj\n"),t+=" Tj\n";var kt="BT\n/";return kt+=lt+" "+rt+" Tf\n",kt+=A(rt*y)+" TL\n",kt+=Yi+"\n",kt+=w,kt+=t,X(kt+="ET"),l[lt]=!0,p};var xi=d.__private__.clip=d.clip=function(t){return X("evenodd"===t?"W*":"W"),this};d.clipEvenOdd=function(){return xi("evenodd")},d.__private__.discardPath=d.discardPath=function(){return X("n"),this};var Si=d.__private__.isValidStyle=function(t){var i=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(i=!0),i};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(t){return Si(t)&&(f=t),this};var Mi=d.__private__.getStyle=d.getStyle=function(t){var i=f;switch(t){case"D":case"S":i="S";break;case"F":i="f";break;case"FD":case"DF":i="B";break;case"f":case"f*":case"B":case"B*":i=t}return i},Ei=d.close=function(){return X("h"),this};d.stroke=function(){return X("S"),this},d.fill=function(t){return qi("f",t),this},d.fillEvenOdd=function(t){return qi("f*",t),this},d.fillStroke=function(t){return qi("B",t),this},d.fillStrokeEvenOdd=function(t){return qi("B*",t),this};var qi=function(t,i){"object"===G(i)?Pi(i,t):X(t)},ji=function(t){null===t||k===g&&void 0===t||(t=Mi(t),X(t))};function Fi(t,i,r,n,e){var s=new on(i||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,e||this.matrix);s.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Ot(o,s),s}var Pi=function(t,i){var r=yt[t.key],n=kt[r];if(n instanceof sn)X("q"),X(Ii(i)),n.gState&&d.setGState(n.gState),X(t.matrix+" cm"),X("/"+r+" sh"),X("Q");else if(n instanceof on){var e=new Pt(1,0,0,-1,0,pr());t.matrix&&(e=e.multiply(t.matrix||Rt),r=Fi.call(n,t.key,t.boundingBox,t.xStep,t.yStep,e).id),X("q"),X("/Pattern cs"),X("/"+r+" scn"),n.gState&&d.setGState(n.gState),X(i),X("Q")}},Ii=function(t){switch(t){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"}},Ri=d.moveTo=function(t,i){return X(A(q(t))+" "+A(j(i))+" m"),this},Oi=d.lineTo=function(t,i){return X(A(q(t))+" "+A(j(i))+" l"),this},Ci=d.curveTo=function(t,i,r,n,e,s){return X([A(q(t)),A(j(i)),A(q(r)),A(j(n)),A(q(e)),A(j(s)),"c"].join(" ")),this};d.__private__.line=d.line=function(t,i,r,n,e){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n)||!Si(e))throw Error("Invalid arguments passed to jsPDF.line");return k===w?this.lines([[r-t,n-i]],t,i,[1,1],e||"S"):this.lines([[r-t,n-i]],t,i,[1,1]).stroke()},d.__private__.lines=d.lines=function(t,i,r,n,e,s){var o,a,u,f,c,h,l,d;if("number"==typeof t&&(d=r,r=i,i=t,t=d),n=n||[1,1],s=s||!1,isNaN(i)||isNaN(r)||!Array.isArray(t)||!Array.isArray(n)||!Si(e)||"boolean"!=typeof s)throw Error("Invalid arguments passed to jsPDF.lines");for(Ri(i,r),o=n[0],a=n[1],f=t.length,h=i,l=r,u=0;u<f;u++)2===(c=t[u]).length?Oi(h=c[0]*o+h,l=c[1]*a+l):Ci(c[0]*o+h,c[1]*a+l,c[2]*o+h,c[3]*a+l,h=c[4]*o+h,l=c[5]*a+l);return s&&Ei(),ji(e),this},d.path=function(t){for(var i=0;i<t.length;i++){var r=t[i],n=r.c;switch(r.op){case"m":Ri(n[0],n[1]);break;case"l":Oi(n[0],n[1]);break;case"c":Ci.apply(this,n);break;case"h":Ei()}}return this},d.__private__.rect=d.rect=function(t,i,r,n,e){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n)||!Si(e))throw Error("Invalid arguments passed to jsPDF.rect");return k===w&&(n=-n),X([A(q(t)),A(j(i)),A(q(r)),A(q(n)),"re"].join(" ")),ji(e),this},d.__private__.triangle=d.triangle=function(t,i,r,n,e,s,o){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n)||isNaN(e)||isNaN(s)||!Si(o))throw Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[r-t,n-i],[e-r,s-n],[t-e,i-s]],t,i,[1,1],o,!0),this},d.__private__.roundedRect=d.roundedRect=function(t,i,r,n,e,s,o){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n)||isNaN(e)||isNaN(s)||!Si(o))throw Error("Invalid arguments passed to jsPDF.roundedRect");var a=.5522847498307935;return this.lines([[r-2*(e=Math.min(e,.5*r)),0],[e*a,0,e,(s=Math.min(s,.5*n))-s*a,e,s],[0,n-2*s],[0,s*a,-e*a,s,-e,s],[2*e-r,0],[-e*a,0,-e,-s*a,-e,-s],[0,2*s-n],[0,-s*a,e*a,-s,e,-s]],t+e,i,[1,1],o,!0),this},d.__private__.ellipse=d.ellipse=function(t,i,r,n,e){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n)||!Si(e))throw Error("Invalid arguments passed to jsPDF.ellipse");var s=.5522847498307935*r,o=.5522847498307935*n;return Ri(t+r,i),Ci(t+r,i-o,t+s,i-n,t,i-n),Ci(t-s,i-n,t-r,i-o,t-r,i),Ci(t-r,i+o,t-s,i+n,t,i+n),Ci(t+s,i+n,t+r,i+o,t+r,i),ji(e),this},d.__private__.circle=d.circle=function(t,i,r,n){if(isNaN(t)||isNaN(i)||isNaN(r)||!Si(n))throw Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,i,r,r,n)},d.setFont=function(t,i,r){return r&&(i=L(i,r)),lt=fi(t,i,{disableWarning:!1}),this};var Ti=d.__private__.getFont=d.getFont=function(){return mt[fi.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var t,i,r={};for(t in wt)if(wt.hasOwnProperty(t))for(i in r[t]=[],wt[t])wt[t].hasOwnProperty(i)&&r[t].push(i);return r},d.addFont=function(t,i,r,n,e){var s=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==s.indexOf(arguments[3])?e=arguments[3]:arguments[3]&&-1==s.indexOf(arguments[3])&&(r=L(r,n)),ri.call(this,t,i,r,e=e||"Identity-H")};var Bi,Di=t.lineWidth||.200025,zi=d.__private__.getLineWidth=d.getLineWidth=function(){return Di},Ui=d.__private__.setLineWidth=d.setLineWidth=function(t){return Di=t,X(A(q(t))+" w"),this};d.__private__.setLineDash=an.API.setLineDash=an.API.setLineDashPattern=function(t,i){if(t=t||[],isNaN(i=i||0)||!Array.isArray(t))throw Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map((function(t){return A(q(t))})).join(" "),i=A(q(i)),X("["+t+"] "+i+" d"),this};var _i=d.__private__.getLineHeight=d.getLineHeight=function(){return rt*Bi};d.__private__.getLineHeight=d.getLineHeight=function(){return rt*Bi};var Vi=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Bi=t),this},Hi=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return Bi};Vi(t.lineHeight);var Wi=d.__private__.getHorizontalCoordinate=function(t){return q(t)},Gi=d.__private__.getVerticalCoordinate=function(t){return k===g?t:St[D].mediaBox.topRightY-St[D].mediaBox.bottomLeftY-q(t)},$i=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(t){return A(Wi(t))},Ji=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(t){return A(Gi(t))},Ki=t.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Vt(Ki)},d.__private__.setStrokeColor=d.setDrawColor=function(t,i,r,n){return Ki=Ht({ch1:t,ch2:i,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),X(Ki),this};var Zi=t.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Vt(Zi)},d.__private__.setFillColor=d.setFillColor=function(t,i,r,n){return Zi=Ht({ch1:t,ch2:i,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),X(Zi),this};var Yi=t.textColor||"0 g",Xi=d.__private__.getTextColor=d.getTextColor=function(){return Vt(Yi)};d.__private__.setTextColor=d.setTextColor=function(t,i,r,n){return Yi=Ht({ch1:t,ch2:i,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this};var Qi=t.charSpace,tr=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(Qi||0)};d.__private__.setCharSpace=d.setCharSpace=function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.setCharSpace");return Qi=t,this};var ir=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(t){var i=d.CapJoinStyles[t];if(void 0===i)throw Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ir=i,X(i+" J"),this};var rr=0;d.__private__.setLineJoin=d.setLineJoin=function(t){var i=d.CapJoinStyles[t];if(void 0===i)throw Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return rr=i,X(i+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(t){if(isNaN(t=t||0))throw Error("Invalid argument passed to jsPDF.setLineMiterLimit");return X(A(q(t))+" M"),this},d.GState=nn,d.setGState=function(t){(t="string"==typeof t?Nt[Lt[t]]:nr(null,t)).equals(At)||(X("/"+t.id+" gs"),At=t)};var nr=function(t,i){if(!t||!Lt[t]){var r=!1;for(var n in Nt)if(Nt.hasOwnProperty(n)&&Nt[n].equals(i)){r=!0;break}if(r)i=Nt[n];else{var e="GS"+(Object.keys(Nt).length+1).toString(10);Nt[e]=i,i.id=e}return t&&(Lt[t]=i.id),Mt.publish("addGState",i),i}};d.addGState=function(t,i){return nr(t,i),this},d.saveGraphicsState=function(){return X("q"),gt.push({key:lt,size:rt,color:Yi}),this},d.restoreGraphicsState=function(){X("Q");var t=gt.pop();return lt=t.key,rt=t.size,Yi=t.color,At=null,this},d.setCurrentTransformationMatrix=function(t){return X(t+" cm"),this},d.comment=function(t){return X("#"+t),this};var er=function(t,i){var r=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}});var n=i||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var e="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return e},set:function(t){e=""+t}}),this},sr=function(t,i,r,n){er.call(this,t,i),this.type="rect";var e=r||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return e},set:function(t){isNaN(t)||(e=parseFloat(t))}});var s=n||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return s},set:function(t){isNaN(t)||(s=parseFloat(t))}}),this},or=function(){this.page=xt,this.currentPage=D,this.pages=J.slice(0),this.pagesContext=St.slice(0),this.x=vt,this.y=pt,this.matrix=bt,this.width=fr(D),this.height=hr(D),this.outputDestination=Z,this.id="",this.objectNumber=-1};or.prototype.restore=function(){xt=this.page,St=this.pagesContext,J=this.pages,vt=this.x,pt=this.y,bt=this.matrix,cr(D=this.currentPage,this.width),lr(D,this.height),Z=this.outputDestination};var ar=function(t,i,r,n,e){Ft.push(new or),xt=D=0,J=[],vt=t,pt=i,bt=e,ei([r,n])};for(var ur in d.beginFormObject=function(t,i,r,n,e){return ar(t,i,r,n,e),this},d.endFormObject=function(t){return function(t){if(jt[t])Ft.pop().restore();else{var i=new or,r="Xo"+(Object.keys(qt).length+1).toString(10);i.id=r,jt[t]=r,qt[r]=i,Mt.publish("addFormObject",i),Ft.pop().restore()}}(t),this},d.doFormObject=function(t,i){var r=qt[jt[t]];return X("q"),X(i+" cm"),X("/"+r.id+" Do"),X("Q"),this},d.getFormObject=function(t){var i=qt[jt[t]];return{x:i.x,y:i.y,width:i.width,height:i.height,matrix:i.matrix}},d.save=function(t,i){return t=t||"generated.pdf",(i=i||{}).returnPromise=i.returnPromise||!1,!1===i.returnPromise?(Ir(bi(pi()),t),"function"==typeof Ir.unload&&Mr.setTimeout&&setTimeout(Ir.unload,911),this):new Promise((function(i,r){try{var n=Ir(bi(pi()),t);"function"==typeof Ir.unload&&Mr.setTimeout&&setTimeout(Ir.unload,911),i(n)}catch(t){r(t.message)}}))},an.API)an.API.hasOwnProperty(ur)&&("events"===ur&&an.API.events.length?function(t,i){var r,n;for(n=i.length-1;-1!==n;n--)t.subscribe.apply(t,[i[n][0]].concat("function"==typeof(r=i[n][1])?[r]:r))}(Mt,an.API.events):d[ur]=an.API[ur]);function fr(t){return St[t].mediaBox.topRightX-St[t].mediaBox.bottomLeftX}function cr(t,i){St[t].mediaBox.topRightX=i+St[t].mediaBox.bottomLeftX}function hr(t){return St[t].mediaBox.topRightY-St[t].mediaBox.bottomLeftY}function lr(t,i){St[t].mediaBox.topRightY=i+St[t].mediaBox.bottomLeftY}var dr=d.getPageWidth=function(t){return fr(t=t||D)/dt},vr=d.setPageWidth=function(t,i){cr(t,i*dt)},pr=d.getPageHeight=function(t){return hr(t=t||D)/dt},br=d.setPageHeight=function(t,i){lr(t,i*dt)};return d.internal={pdfEscape:ni,getStyle:Mi,getFont:Ti,getFontSize:et,getCharSpace:tr,getTextColor:Xi,getLineHeight:_i,getLineHeightFactor:Hi,getLineWidth:zi,write:Q,getHorizontalCoordinate:Wi,getVerticalCoordinate:Gi,getCoordinateString:$i,getVerticalCoordinateString:Ji,collections:{},newObject:Tt,newAdditionalObject:zt,newObjectDeferred:Bt,newObjectDeferredBegin:Dt,getFilters:Wt,putStream:Gt,events:Mt,scaleFactor:dt,pageSize:{getWidth:function(){return dr(D)},setWidth:function(t){vr(D,t)},getHeight:function(){return pr(D)},setHeight:function(t){br(D,t)}},encryptionOptions:c,encryption:yi,getEncryptor:function(t){return null!==c?yi.encryptor(t,0):function(t){return t}},output:gi,getNumberOfPages:ui,get pages(){return J},out:X,f2:M,f3:E,getPageInfo:Ni,getPageInfoByObjId:Li,getCurrentPageInfo:Ai,getPDFVersion:p,Point:er,Rectangle:sr,Matrix:Pt,hasHotfix:ki},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return dr(D)},set:function(t){vr(D,t)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return pr(D)},set:function(t){br(D,t)},enumerable:!0,configurable:!0}),function(t){for(var i=0,r=it.length;i<r;i++){var n=ri.call(this,t[i][0],t[i][1],t[i][2],it[i][3],!0);!1===h&&(l[n]=!0);var e=t[i][0].split("-");ii({id:n,fontName:e[0],fontStyle:e[1]||""})}Mt.publish("addFonts",{fonts:mt,dictionary:wt})}.call(d,it),lt="F1",si(e,r),Mt.publish("initialized"),d}Qr.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},Qr.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},Qr.prototype.hexToBytes=function(t){for(var i=[],r=0;r<t.length;r+=2)i.push(String.fromCharCode(parseInt(t.substr(r,2),16)));return i.join("")},Qr.prototype.processOwnerPassword=function(t,i){return Yr(Jr(i).substr(0,5),t)},Qr.prototype.encryptor=function(t,i){var r=Jr(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&i,i>>8&255)).substr(0,10);return function(t){return Yr(r,t)}},nn.prototype.equals=function(t){var i,r="id,objectNumber,equals";if(!t||G(t)!==G(this))return!1;var n=0;for(i in this)if(!(r.indexOf(i)>=0)){if(this.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;if(this[i]!==t[i])return!1;n++}for(i in t)t.hasOwnProperty(i)&&r.indexOf(i)<0&&n--;return 0===n},an.API={events:[]},an.version="4.2.1";var un=an.API,fn=1,cn=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},hn=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},ln=function(t){return(""+t).replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,(function(t){var i=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(1===i.length?"0"+i:i)}))},dn=function(t){return t.toFixed(2)},vn=function(t){return t.toFixed(5)};un.__acroform__={};var pn=function(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t},bn=function(t){return t*fn},mn=function(t){var i=new In,r=$n.internal.getHeight(t)||0,n=$n.internal.getWidth(t)||0;return i.BBox=[0,0,Number(dn(n)),Number(dn(r))],i},wn=un.__acroform__.setBit=function(t,i){if(i=i||0,isNaN(t=t||0)||isNaN(i))throw Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<i},gn=un.__acroform__.clearBit=function(t,i){if(i=i||0,isNaN(t=t||0)||isNaN(i))throw Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<i)},kn=un.__acroform__.getBit=function(t,i){if(isNaN(t)||isNaN(i))throw Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<i?1:0},yn=un.__acroform__.getBitForPdf=function(t,i){if(isNaN(t)||isNaN(i))throw Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return kn(t,i-1)},Nn=un.__acroform__.setBitForPdf=function(t,i){if(isNaN(t)||isNaN(i))throw Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return wn(t,i-1)},Ln=un.__acroform__.clearBitForPdf=function(t,i){if(isNaN(t)||isNaN(i))throw Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return gn(t,i-1)},An=un.__acroform__.calculateCoordinates=function(t,i){var r=i.internal.getHorizontalCoordinate,n=i.internal.getVerticalCoordinate,e=t[0],s=t[1],o=t[2],a=t[3],u={};return u.lowerLeft_X=r(e)||0,u.lowerLeft_Y=n(s+a)||0,u.upperRight_X=r(e+o)||0,u.upperRight_Y=n(s)||0,[Number(dn(u.lowerLeft_X)),Number(dn(u.lowerLeft_Y)),Number(dn(u.upperRight_X)),Number(dn(u.upperRight_Y))]},xn=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var i=[],r=Sn(t,t._V||t.DV),n=t.scope.internal.getFont(t.fontName,t.fontStyle).id;i.push("/Tx BMC"),i.push("q"),i.push("BT"),i.push(t.scope.__private__.encodeColorString(t.color)),i.push("/"+n+" "+dn(r.fontSize)+" Tf"),i.push("1 0 0 1 0 0 Tm"),i.push(r.text),i.push("ET"),i.push("Q"),i.push("EMC");var e=mn(t);return e.scope=t.scope,e.stream=i.join("\n"),e}},Sn=function(t,i){var r=0===t.fontSize?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},e=(i=")"==(i="("==i.substr(0,1)?i.substr(1):i).substr(i.length-1)?i.substr(0,i.length-1):i).split(" ");e=e.map(t.multiline?function(t){return t.split("\n")}:function(t){return[t]});var s=r,o=$n.internal.getHeight(t)||0;o=o<0?-o:o;var a=$n.internal.getWidth(t)||0;a=a<0?-a:a;var u=function(i,r,n){return i+1<e.length&&Mn(r+" "+e[i+1][0],t,n).width<=a-4};s++;t:for(;s>0;){i="",s--;var f,c,h=Mn("3",t,s).height,l=t.multiline?o-s:(o-h)/2,d=l+=2,v=0,p=0,b=0;if(s<=0){i="(...) Tj\n",i+="% Width of Text: "+Mn(i,t,s=12).width+", FieldWidth:"+a+"\n";break}for(var m="",w=0,g=0;g<e.length;g++)if(e.hasOwnProperty(g)){var k=!1;if(1!==e[g].length&&b!==e[g].length-1){if((h+2)*(w+2)+2>o)continue t;m+=e[g][b],k=!0,p=g,g--}else{m=" "==(m+=e[g][b]+" ").substr(m.length-1)?m.substr(0,m.length-1):m;var y=parseInt(g),N=u(y,m,s),L=g>=e.length-1;if(N&&!L){m+=" ",b=0;continue}if(N||L){if(L)p=y;else if(t.multiline&&(h+2)*(w+2)+2>o)continue t}else{if(!t.multiline)continue t;if((h+2)*(w+2)+2>o)continue t;p=y}}for(var A="",x=v;x<=p;x++){var S=e[x];if(t.multiline){if(x===p){A+=S[b]+" ",b=(b+1)%S.length;continue}if(x===v){A+=S[S.length-1]+" ";continue}}A+=S[0]+" "}switch(A=" "==A.substr(A.length-1)?A.substr(0,A.length-1):A,c=Mn(A,t,s).width,t.textAlign){case"right":f=a-c-2;break;case"center":f=(a-c)/2;break;default:f=2}i+=dn(f)+" "+dn(d)+" Td\n",i+="("+cn(A)+") Tj\n",i+=-dn(f)+" 0 Td\n",d=-(s+2),c=0,v=k?p:p+1,w++,m=""}break}return n.text=i,n.fontSize=s,n},Mn=function(t,i,r){var n=i.scope.internal.getFont(i.fontName,i.fontStyle),e=i.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:i.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:e}},En={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},qn=function(t,i){var r={type:"reference",object:t};void 0===i.internal.getPageInfo(t.page).pageContext.annotations.find((function(t){return t.type===r.type&&t.object===r.object}))&&i.internal.getPageInfo(t.page).pageContext.annotations.push(r)},jn=un.__acroform__.arrayToPdfArray=function(t,i,r){var n=function(t){return t};if(Array.isArray(t)){for(var e="[",s=0;s<t.length;s++)switch(0!==s&&(e+=" "),G(t[s])){case"boolean":case"number":case"object":e+=""+t[s];break;case"string":"/"===t[s].substr(0,1)?e+="/"+ln(t[s].substr(1)):(void 0!==i&&r&&(n=r.internal.getEncryptor(i)),e+="("+cn(n(""+t[s]))+")")}return e+"]"}throw Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Fn=function(t,i,r){var n=function(t){return t};return void 0!==i&&r&&(n=r.internal.getEncryptor(i)),"("+cn(n(t=t||""))+")"},Pn=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Pn.prototype.toString=function(){return this.objId+" 0 R"},Pn.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},Pn.prototype.getKeyValueListForStream=function(){var t=[],i=Object.getOwnPropertyNames(this).filter((function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)}));for(var r in i)if(!1===Object.getOwnPropertyDescriptor(this,i[r]).configurable){var n=i[r],e=this[n];e&&(Array.isArray(e)?t.push({key:n,value:jn(e,this.objId,this.scope)}):e instanceof Pn?(e.scope=this.scope,t.push({key:n,value:e.objId+" 0 R"})):"function"!=typeof e&&t.push({key:n,value:e}))}return t};var In=function(){Pn.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 t,i=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(i){t=i.trim()},get:function(){return t||null}})};pn(In,Pn);var Rn=function(){Pn.call(this);var t,i=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return i.length>0?i:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return i}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var i=function(t){return t};return this.scope&&(i=this.scope.internal.getEncryptor(this.objId)),"("+cn(i(t))+")"}},set:function(i){t=i}})};pn(Rn,Pn);var On=function t(){Pn.call(this);var i=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return i},set:function(t){if(isNaN(t))throw Error('Invalid value "'+t+'" for attribute F supplied.');i=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!yn(i,3)},set:function(t){this.F=1==!!t?Nn(i,3):Ln(i,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){if(isNaN(t))throw Error('Invalid value "'+t+'" for attribute Ff supplied.');r=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var e="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":e=t;break;default:throw Error('Invalid value "'+t+'" 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 Vn)return;s="FieldObject"+t.FieldNum++}var i=function(t){return t};return this.scope&&(i=this.scope.internal.getEncryptor(this.objId)),"("+cn(i(s))+")"},set:function(t){s=""+t}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(t){s=t}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(t){o=t}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(t){u=t}});var f=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===f?50/fn:f},set:function(t){f=t}});var c="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(t){c=t}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof Vn||this instanceof Wn))return Fn(h,this.objId,this.scope)},set:function(t){h=t=""+t}});var l=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(l)return this instanceof zn==0?Fn(l,this.objId,this.scope):l},set:function(t){t=""+t,l=this instanceof zn==0?"("===t.substr(0,1)?hn(t.substr(1,t.length-2)):hn(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof zn==1?hn(l.substr(1,l.length-1)):l},set:function(t){t=""+t,l=this instanceof zn==1?"/"+ln(t):t}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof zn==0?Fn(d,this.objId,this.scope):d},set:function(t){t=""+t,d=this instanceof zn==0?"("===t.substr(0,1)?hn(t.substr(1,t.length-2)):hn(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof zn==1?hn(d.substr(1,d.length-1)):d},set:function(t){t=""+t,d=this instanceof zn==1?"/"+ln(t):t}}),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 v,p=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return p},set:function(t){p=t=!!t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(v)return v},set:function(t){v=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,1)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,1):Ln(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,2)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,2):Ln(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,3)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,3):Ln(this.Ff,3)}});var b=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==b)return b},set:function(t){if(-1===[0,1,2].indexOf(t))throw Error('Invalid value "'+t+'" for attribute Q supplied.');b=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(b){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:b=2;break;case"center":case 1:b=1;break;default:b=0}}})};pn(On,Pn);var Cn=function(){On.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(i){t=i}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(i){t=i}});var i=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return jn(i,this.objId,this.scope)},set:function(t){var r,n;n=[],"string"==typeof(r=t)&&(n=function(t,i,r){r||(r=1);for(var n,e=[];n=i.exec(t);)e.push(n[r]);return e}(r,/\((.*?)\)/g)),i=n}}),this.getOptions=function(){return i},this.setOptions=function(t){i=t,this.sort&&i.sort()},this.addOption=function(t){t=""+(t=t||""),i.push(t),this.sort&&i.sort()},this.removeOption=function(t,r){for(r=r||!1,t=""+(t=t||"");-1!==i.indexOf(t)&&(i.splice(i.indexOf(t),1),!1!==r););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,18)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,18):Ln(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,19)},set:function(t){!0===this.combo&&(this.Ff=1==!!t?Nn(this.Ff,19):Ln(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,20)},set:function(t){1==!!t?(this.Ff=Nn(this.Ff,20),i.sort()):this.Ff=Ln(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,22)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,22):Ln(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,23)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,23):Ln(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,27)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,27):Ln(this.Ff,27)}}),this.hasAppearanceStream=!1};pn(Cn,On);var Tn=function(){Cn.call(this),this.fontName="helvetica",this.combo=!1};pn(Tn,Cn);var Bn=function(){Tn.call(this),this.combo=!0};pn(Bn,Tn);var Dn=function(){Bn.call(this),this.edit=!0};pn(Dn,Bn);var zn=function(){On.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,15)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,15):Ln(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,16)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,16):Ln(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,17)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,17):Ln(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,26)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,26):Ln(this.Ff,26)}});var t,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(i).length){var r,n=[];for(r in n.push("<<"),i)n.push("/"+r+" ("+cn(t(i[r]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"===G(t)&&(i=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){var r=null==i?"":""+i;"/"===r.substr(0,1)&&(r=r.substr(1)),t="/"+ln(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(i){t="/"+ln(i)}})};pn(zn,On);var Un=function(){zn.call(this),this.pushButton=!0};pn(Un,zn);var _n=function(){zn.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(i){t=void 0!==i?i:[]}})};pn(_n,zn);var Vn=function(){var t,i;On.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){t=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return i},set:function(t){i=t}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var i,r=[];for(i in r.push("<<"),n)r.push("/"+i+" ("+cn(t(n[i]))+")");return r.push(">>"),r.join("\n")},set:function(t){"object"===G(t)&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){var i=null==t?"":""+t;"/"===i.substr(0,1)&&(i=i.substr(1)),r="/"+ln(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){var i=null==t?"":""+t;"/"===i.substr(0,1)&&(i=i.substr(1)),r="/"+ln(i)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=$n.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};pn(Vn,On),_n.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var i in this.Kids)if(this.Kids.hasOwnProperty(i)){var r=this.Kids[i];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},_n.prototype.createOption=function(t){var i=new Vn;return i.Parent=this,i.optionName=t,this.Kids.push(i),Jn.call(this.scope,i),i};var Hn=function(){zn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=$n.CheckBox.createAppearanceStream()};pn(Hn,zn);var Wn=function(){On.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,13)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,13):Ln(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,21)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,21):Ln(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,23)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,23):Ln(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,24)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,24):Ln(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,25)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,25):Ln(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,26)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,26):Ln(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(i){t=i}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(i){Number.isInteger(i)&&(t=i)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};pn(Wn,On);var Gn=function(){Wn.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!yn(this.Ff,14)},set:function(t){this.Ff=1==!!t?Nn(this.Ff,14):Ln(this.Ff,14)}}),this.password=!0};pn(Gn,Wn);var $n={CheckBox:{createAppearanceStream:function(){return{N:{On:$n.CheckBox.YesNormal},D:{On:$n.CheckBox.YesPushDown,Off:$n.CheckBox.OffPushDown}}},YesPushDown:function(t){var i=mn(t);i.scope=t.scope;var r=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color),s=Sn(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+dn($n.internal.getWidth(t))+" "+dn($n.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+dn(s.fontSize)+" Tf "+e),r.push("BT"),r.push(s.text),r.push("ET"),r.push("Q"),r.push("EMC"),i.stream=r.join("\n"),i},YesNormal:function(t){var i=mn(t);i.scope=t.scope;var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),e=[],s=$n.internal.getHeight(t),o=$n.internal.getWidth(t),a=Sn(t,t.caption);return e.push("1 g"),e.push("0 0 "+dn(o)+" "+dn(s)+" re"),e.push("f"),e.push("q"),e.push("0 0 1 rg"),e.push("0 0 "+dn(o-1)+" "+dn(s-1)+" re"),e.push("W"),e.push("n"),e.push("0 g"),e.push("BT"),e.push("/"+r+" "+dn(a.fontSize)+" Tf "+n),e.push(a.text),e.push("ET"),e.push("Q"),i.stream=e.join("\n"),i},OffPushDown:function(t){var i=mn(t);i.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+dn($n.internal.getWidth(t))+" "+dn($n.internal.getHeight(t))+" re"),r.push("f"),i.stream=r.join("\n"),i}},RadioButton:{Circle:{createAppearanceStream:function(t){var i={D:{Off:$n.RadioButton.Circle.OffPushDown},N:{}};return i.N[t]=$n.RadioButton.Circle.YesNormal,i.D[t]=$n.RadioButton.Circle.YesPushDown,i},getCA:function(){return"l"},YesNormal:function(t){var i=mn(t);i.scope=t.scope;var r=[],n=$n.internal.getWidth(t)<=$n.internal.getHeight(t)?$n.internal.getWidth(t)/4:$n.internal.getHeight(t)/4,e=Number(((n=Number((.9*n).toFixed(5)))*$n.internal.Bezier_C).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+vn($n.internal.getWidth(t)/2)+" "+vn($n.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+e+" "+e+" "+n+" 0 "+n+" c"),r.push("-"+e+" "+n+" -"+n+" "+e+" -"+n+" 0 c"),r.push("-"+n+" -"+e+" -"+e+" -"+n+" 0 -"+n+" c"),r.push(e+" -"+n+" "+n+" -"+e+" "+n+" 0 c"),r.push("f"),r.push("Q"),i.stream=r.join("\n"),i},YesPushDown:function(t){var i=mn(t);i.scope=t.scope;var r=[],n=$n.internal.getWidth(t)<=$n.internal.getHeight(t)?$n.internal.getWidth(t)/4:$n.internal.getHeight(t)/4,e=Number((2*(n=Number((.9*n).toFixed(5)))).toFixed(5)),s=Number((e*$n.internal.Bezier_C).toFixed(5)),o=Number((n*$n.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+vn($n.internal.getWidth(t)/2)+" "+vn($n.internal.getHeight(t)/2)+" cm"),r.push(e+" 0 m"),r.push(e+" "+s+" "+s+" "+e+" 0 "+e+" c"),r.push("-"+s+" "+e+" -"+e+" "+s+" -"+e+" 0 c"),r.push("-"+e+" -"+s+" -"+s+" -"+e+" 0 -"+e+" c"),r.push(s+" -"+e+" "+e+" -"+s+" "+e+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+vn($n.internal.getWidth(t)/2)+" "+vn($n.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),i.stream=r.join("\n"),i},OffPushDown:function(t){var i=mn(t);i.scope=t.scope;var r=[],n=$n.internal.getWidth(t)<=$n.internal.getHeight(t)?$n.internal.getWidth(t)/4:$n.internal.getHeight(t)/4,e=Number((2*(n=Number((.9*n).toFixed(5)))).toFixed(5)),s=Number((e*$n.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+vn($n.internal.getWidth(t)/2)+" "+vn($n.internal.getHeight(t)/2)+" cm"),r.push(e+" 0 m"),r.push(e+" "+s+" "+s+" "+e+" 0 "+e+" c"),r.push("-"+s+" "+e+" -"+e+" "+s+" -"+e+" 0 c"),r.push("-"+e+" -"+s+" -"+s+" -"+e+" 0 -"+e+" c"),r.push(s+" -"+e+" "+e+" -"+s+" "+e+" 0 c"),r.push("f"),r.push("Q"),i.stream=r.join("\n"),i}},Cross:{createAppearanceStream:function(t){var i={D:{Off:$n.RadioButton.Cross.OffPushDown},N:{}};return i.N[t]=$n.RadioButton.Cross.YesNormal,i.D[t]=$n.RadioButton.Cross.YesPushDown,i},getCA:function(){return"8"},YesNormal:function(t){var i=mn(t);i.scope=t.scope;var r=[],n=$n.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+dn($n.internal.getWidth(t)-2)+" "+dn($n.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(dn(n.x1.x)+" "+dn(n.x1.y)+" m"),r.push(dn(n.x2.x)+" "+dn(n.x2.y)+" l"),r.push(dn(n.x4.x)+" "+dn(n.x4.y)+" m"),r.push(dn(n.x3.x)+" "+dn(n.x3.y)+" l"),r.push("s"),r.push("Q"),i.stream=r.join("\n"),i},YesPushDown:function(t){var i=mn(t);i.scope=t.scope;var r=$n.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+dn($n.internal.getWidth(t))+" "+dn($n.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+dn($n.internal.getWidth(t)-2)+" "+dn($n.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(dn(r.x1.x)+" "+dn(r.x1.y)+" m"),n.push(dn(r.x2.x)+" "+dn(r.x2.y)+" l"),n.push(dn(r.x4.x)+" "+dn(r.x4.y)+" m"),n.push(dn(r.x3.x)+" "+dn(r.x3.y)+" l"),n.push("s"),n.push("Q"),i.stream=n.join("\n"),i},OffPushDown:function(t){var i=mn(t);i.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+dn($n.internal.getWidth(t))+" "+dn($n.internal.getHeight(t))+" re"),r.push("f"),i.stream=r.join("\n"),i}}},createDefaultAppearanceStream:function(t){var i=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+i+" "+t.fontSize+" Tf "+r}};$n.internal={Bezier_C:.551915024494,calculateCross:function(t){var i=$n.internal.getWidth(t),r=$n.internal.getHeight(t),n=Math.min(i,r);return{x1:{x:(i-n)/2,y:(r-n)/2+n},x2:{x:(i-n)/2+n,y:(r-n)/2},x3:{x:(i-n)/2,y:(r-n)/2},x4:{x:(i-n)/2+n,y:(r-n)/2+n}}}},$n.internal.getWidth=function(t){var i=0;return"object"===G(t)&&(i=bn(t.Rect[2])),i},$n.internal.getHeight=function(t){var i=0;return"object"===G(t)&&(i=bn(t.Rect[3])),i};var Jn=un.addField=function(t){if(function(t,i){if(i.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(On.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(En)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw Error("Exception while creating AcroformDictionary");fn=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new Rn,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",(function(){!function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}(t)})),t.internal.events.subscribe("buildDocument",(function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var r in i)if(i.hasOwnProperty(r)){var n=i[r];n.objId=void 0,n.hasAnnotation&&qn(n,t)}}(t)})),t.internal.events.subscribe("putCatalog",(function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(t)})),t.internal.events.subscribe("postPutPages",(function(i){!function(t,i){var r=!t;for(var n in t||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(n)){var e=t[n],s=[],o=e.Rect;if(e.Rect&&(e.Rect=An(e.Rect,i)),i.internal.newObjectDeferredBegin(e.objId,!0),e.DA=$n.createDefaultAppearanceStream(e),"object"===G(e)&&"function"==typeof e.getKeyValueListForStream&&(s=e.getKeyValueListForStream()),e.Rect=o,e.hasAppearanceStream&&!e.appearanceStreamContent){var a=xn(e);s.push({key:"AP",value:"<</N "+a+">>"}),i.internal.acroformPlugin.xForms.push(a)}if(e.appearanceStreamContent){var u="";for(var f in e.appearanceStreamContent)if(e.appearanceStreamContent.hasOwnProperty(f)){var c=e.appearanceStreamContent[f];if(u+="/"+f+" ",u+="<<",Object.keys(c).length>=1||Array.isArray(c)){for(var n in c)if(c.hasOwnProperty(n)){var h=c[n];"function"==typeof h&&(h=h.call(i,e)),u+="/"+n+" "+h+" ",i.internal.acroformPlugin.xForms.indexOf(h)>=0||i.internal.acroformPlugin.xForms.push(h)}}else"function"==typeof(h=c)&&(h=h.call(i,e)),u+="/"+n+" "+h,i.internal.acroformPlugin.xForms.indexOf(h)>=0||i.internal.acroformPlugin.xForms.push(h);u+=">>"}s.push({key:"AP",value:"<<\n"+u+">>"})}i.internal.putStream({additionalKeyValues:s,objectId:e.objId}),i.internal.out("endobj")}r&&function(t,i){for(var r in t)if(t.hasOwnProperty(r)){var n=r,e=t[r];i.internal.newObjectDeferredBegin(e.objId,!0),"object"===G(e)&&"function"==typeof e.putStream&&e.putStream(),delete t[n]}}(i.internal.acroformPlugin.xForms,i)}(i,t)})),t.internal.acroformPlugin.isInitialized=!0}}(this,t),!(t instanceof On))throw Error("Invalid argument passed to jsPDF.addField.");var i;return(i=t).scope.internal.acroformPlugin.printedOut&&(i.scope.internal.acroformPlugin.printedOut=!1,i.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),i.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(i),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};function Kn(t){return t.reduce((function(t,i,r){return t[i]=r,t}),{})}un.AcroFormChoiceField=Cn,un.AcroFormListBox=Tn,un.AcroFormComboBox=Bn,un.AcroFormEditBox=Dn,un.AcroFormButton=zn,un.AcroFormPushButton=Un,un.AcroFormRadioButton=_n,un.AcroFormCheckBox=Hn,un.AcroFormTextField=Wn,un.AcroFormPasswordField=Gn,un.AcroFormAppearance=$n,un.AcroForm={ChoiceField:Cn,ListBox:Tn,ComboBox:Bn,EditBox:Dn,Button:zn,PushButton:Un,RadioButton:_n,CheckBox:Hn,TextField:Wn,PasswordField:Gn,Appearance:$n},an.AcroForm={ChoiceField:Cn,ListBox:Tn,ComboBox:Bn,EditBox:Dn,Button:zn,PushButton:Un,RadioButton:_n,CheckBox:Hn,TextField:Wn,PasswordField:Gn,Appearance:$n},function(t){var i="addImage_";t.__addimage__={};var r="UNKNOWN",n={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]]},e=t.__addimage__.getImageFileTypeByImageData=function(t,i){var e,s,o,a,u,f=r;if("RGBA"===(i=i||r)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(N(t))for(u in n)for(o=n[u],e=0;e<o.length;e+=1){for(a=!0,s=0;s<o[e].length;s+=1)if(void 0!==o[e][s]&&o[e][s]!==t[s]){a=!1;break}if(!0===a){f=u;break}}else for(u in n)for(o=n[u],e=0;e<o.length;e+=1){for(a=!0,s=0;s<o[e].length;s+=1)if(void 0!==o[e][s]&&o[e][s]!==t.charCodeAt(s)){a=!1;break}if(!0===a){f=u;break}}return f===r&&i!==r&&(f=i),f},s=function t(i){for(var r=this.internal.write,n=this.internal.putStream,e=(0,this.internal.getFilters)();-1!==e.indexOf("FlateEncode");)e.splice(e.indexOf("FlateEncode"),1);i.objectId=this.internal.newObject();var s=[];if(s.push({key:"Type",value:"/XObject"}),s.push({key:"Subtype",value:"/Image"}),s.push({key:"Width",value:i.width}),s.push({key:"Height",value:i.height}),i.colorSpace===m.INDEXED?s.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(i.palette.length/3-1)+" "+("sMask"in i&&void 0!==i.sMask?i.objectId+2:i.objectId+1)+" 0 R]"}):(s.push({key:"ColorSpace",value:"/"+i.colorSpace}),i.colorSpace===m.DEVICE_CMYK&&s.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),s.push({key:"BitsPerComponent",value:i.bitsPerComponent}),"decodeParameters"in i&&void 0!==i.decodeParameters&&s.push({key:"DecodeParms",value:"<<"+i.decodeParameters+">>"}),"transparency"in i&&Array.isArray(i.transparency)&&i.transparency.length>0){for(var o="",a=0,u=i.transparency.length;a<u;a++)o+=i.transparency[a]+" "+i.transparency[a]+" ";s.push({key:"Mask",value:"["+o+"]"})}if(void 0!==i.sMask&&s.push({key:"SMask",value:i.objectId+1+" 0 R"}),n({data:i.data,additionalKeyValues:s,alreadyAppliedFilters:void 0!==i.filter?["/"+i.filter]:void 0,objectId:i.objectId}),r("endobj"),"sMask"in i&&void 0!==i.sMask){var f,c=null!==(f=i.sMaskBitsPerComponent)&&void 0!==f?f:i.bitsPerComponent,h={width:i.width,height:i.height,colorSpace:"DeviceGray",bitsPerComponent:c,data:i.sMask};"filter"in i&&(h.decodeParameters="/Predictor ".concat(i.predictor," /Colors 1 /BitsPerComponent ").concat(c," /Columns ").concat(i.width),h.filter=i.filter),t.call(this,h)}if(i.colorSpace===m.INDEXED){var l=this.internal.newObject();n({data:A(new Uint8Array(i.palette)),objectId:l}),r("endobj")}},o=function(){var t=this.internal.collections[i+"images"];for(var r in t)s.call(this,t[r])},a=function(){var t,r=this.internal.collections[i+"images"],n=this.internal.write;for(var e in r)n("/I"+(t=r[e]).index,t.objectId,"0","R")},u=function(){this.internal.collections[i+"images"]||(this.internal.collections[i+"images"]={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",a))},f=function(){var t=this.internal.collections[i+"images"];return u.call(this),t},c=function(){return Object.keys(this.internal.collections[i+"images"]).length},h=function(i){return"function"==typeof t["process"+i.toUpperCase()]},l=function(t){return"object"===G(t)&&1===t.nodeType},d=function(i,r){if("IMG"===i.nodeName&&i.hasAttribute("src")){var n=""+i.getAttribute("src");if(0===n.indexOf("data:image/"))return Or(unescape(n).split("base64,").pop());var e=t.loadFile(n,!0);if(void 0!==e)return e}if("CANVAS"===i.nodeName){if(0===i.width||0===i.height)throw Error("Given canvas must have data. Canvas width: "+i.width+", height: "+i.height);var s;switch(r){case"PNG":s="image/png";break;case"WEBP":s="image/webp";break;default:s="image/jpeg"}return Or(i.toDataURL(s,1).split("base64,").pop())}},v=function(t){var r=this.internal.collections[i+"images"];if(r)for(var n in r)if(t===r[n].alias)return r[n]},p=function(t,i,r){return t||i||(t=-96,i=-96),t<0&&(t=-1*r.width*72/t/this.internal.scaleFactor),i<0&&(i=-1*r.height*72/i/this.internal.scaleFactor),0===t&&(t=i*r.width/r.height),0===i&&(i=t*r.height/r.width),[t,i]},b=function(t,i,r,n,e,s){var o=p.call(this,r,n,e),a=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,c=f.call(this);if(r=o[0],n=o[1],c[e.index]=e,s)var h=Math.cos(s*=Math.PI/180),l=Math.sin(s),d=function(t){return t.toFixed(4)},v=[d(h),d(l),d(-1*l),d(h),0,0,"cm"];this.internal.write("q"),s?(this.internal.write(["1 0 0 1",a(t),u(i+n),"cm"].join(" ")),this.internal.write(v.join(" ")),this.internal.write([a(r),"0 0",a(n),"0 0 cm"].join(" "))):this.internal.write([a(r),"0 0",a(n),a(t),u(i+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write("1 0 0 -1 0 0 cm"),this.internal.write("/I"+e.index+" Do"),this.internal.write("Q")},m=t.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"};t.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 w=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},g=t.__addimage__.sHashCode=function(t){var i,r,n=0;if("string"==typeof t)for(r=t.length,i=0;i<r;i++)n=(n<<5)-n+t.charCodeAt(i),n|=0;else if(N(t))for(r=t.byteLength/2,i=0;i<r;i++)n=(n<<5)-n+t[i],n|=0;return n},k=t.__addimage__.validateStringAsBase64=function(t){var i=!0;return 0===(t=t||"").length&&(i=!1),t.length%4!=0&&(i=!1),!1===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(i=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(i=!1),i},y=t.__addimage__.extractImageFromDataUrl=function(t){if(null==t)return null;if(!(t=t.trim()).startsWith("data:"))return null;var i=t.indexOf(",");return i<0?null:t.substring(0,i).trim().endsWith("base64")?t.substring(i+1):null};t.__addimage__.isArrayBuffer=function(t){return t instanceof ArrayBuffer};var N=t.__addimage__.isArrayBufferView=function(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array},L=t.__addimage__.binaryStringToUint8Array=function(t){for(var i=t.length,r=new Uint8Array(i),n=0;n<i;n++)r[n]=t.charCodeAt(n);return r},A=t.__addimage__.arrayBufferToBinaryString=function(t){for(var i="",r=N(t)?t:new Uint8Array(t),n=0;n<r.length;n+=8192)i+=String.fromCharCode.apply(null,r.subarray(n,n+8192));return i};t.addImage=function(){var t,i,n,e,s,o,a,f,c;if("number"==typeof arguments[1]?(i=r,n=arguments[1],e=arguments[2],s=arguments[3],o=arguments[4],a=arguments[5],f=arguments[6],c=arguments[7]):(i=arguments[1],n=arguments[2],e=arguments[3],s=arguments[4],o=arguments[5],a=arguments[6],f=arguments[7],c=arguments[8]),"object"===G(t=arguments[0])&&!l(t)&&"imageData"in t){var h=t;t=h.imageData,i=h.format||i||r,n=h.x||n||0,e=h.y||e||0,s=h.w||h.width||s,o=h.h||h.height||o,a=h.alias||a,f=h.compression||f,c=h.rotation||h.angle||c}var d=this.internal.getFilters();if(void 0===f&&-1!==d.indexOf("FlateEncode")&&(f="SLOW"),isNaN(n)||isNaN(e))throw Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var v=x.call(this,t,i,a,f);return b.call(this,n,e,s,o,v,c),this};var x=function(i,n,s,o){var a,u,f;if("string"==typeof i&&e(i)===r){var p=S(i=unescape(i),!1);(""!==p||void 0!==(p=t.loadFile(i,!0)))&&(i=p)}if(l(i)&&(i=d(i,n)),n=e(i,n),!h(n))throw Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(f=s)||0===f.length)&&(s=function(t){return"string"==typeof t||N(t)?g(t):N(t.data)?g(t.data):null}(i)),(a=v.call(this,s))||(i instanceof Uint8Array||"RGBA"===n||(u=i,i=L(i)),a=this["process"+n.toUpperCase()](i,c.call(this),s,function(i){return i&&"string"==typeof i&&(i=i.toUpperCase()),i in t.image_compression?i:w.NONE}(o),u)),!a)throw Error("An unknown error occurred whilst processing the image.");return a},S=t.__addimage__.convertBase64ToBinaryString=function(t,i){i="boolean"!=typeof i||i;var r,n="";if("string"==typeof t){var e;r=null!==(e=y(t))&&void 0!==e?e:t;try{n=Or(r)}catch(t){if(i)throw k(r)?Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return n};t.getImageProperties=function(i){var n,s,o="";if(l(i)&&(i=d(i)),"string"==typeof i&&e(i)===r&&(""===(o=S(i,!1))&&(o=t.loadFile(i)||""),i=o),s=e(i),!h(s))throw Error("addImage does not support files of type '"+s+"', please ensure that a plugin for '"+s+"' support is added.");if(i instanceof Uint8Array||(i=L(i)),!(n=this["process"+s.toUpperCase()](i)))throw Error("An unknown error occurred whilst processing the image");return n.fileType=s,n}}(an.API),
86
+ /**
87
+ * @license
88
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
89
+ *
90
+ * Licensed under the MIT License.
91
+ * http://opensource.org/licenses/mit-license
92
+ */
93
+ function(t){var i=function(t){if(void 0!==t&&""!=t)return!0};an.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(t){for(var r,n,e,s=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,a=this.internal.getPageInfoByObjId(t.objId),u=t.pageContext.annotations,f=!1,c=0;c<u.length&&!f;c++)switch((r=u[c]).type){case"link":(i(r.options.url)||i(r.options.pageNumber))&&(f=!0);break;case"reference":case"text":case"freetext":f=!0}if(0!=f){this.internal.write("/Annots [");for(var h=0;h<u.length;h++){r=u[h];var l=this.internal.pdfEscape,d=this.internal.getEncryptor(t.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var v=this.internal.newAdditionalObject(),p=this.internal.newAdditionalObject(),b=this.internal.getEncryptor(v.objId),m=r.title||"Note";e="<</Type /Annot /Subtype /Text "+(n="/Rect ["+s(r.bounds.x)+" "+o(r.bounds.y+r.bounds.h)+" "+s(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y)+"] ")+"/Contents ("+l(b(r.contents))+")",e+=" /Popup "+p.objId+" 0 R",e+=" /P "+a.objId+" 0 R",e+=" /T ("+l(b(m))+") >>",v.content=e;var w=v.objId+" 0 R";e="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+s(r.bounds.x+30)+" "+o(r.bounds.y+r.bounds.h)+" "+s(r.bounds.x+r.bounds.w+30)+" "+o(r.bounds.y)+"] ")+" /Parent "+w,r.open&&(e+=" /Open true"),p.content=e+=" >>",this.internal.write(v.objId,"0 R",p.objId,"0 R");break;case"freetext":n="/Rect ["+s(r.bounds.x)+" "+o(r.bounds.y)+" "+s(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y+r.bounds.h)+"] ";var g="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");e="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+l(d(r.contents))+")",e+=" /DS("+l(d(g))+")",e+=" /Border [0 0 0]",this.internal.write(e+=" >>");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+"] ",e="",r.options.url)e="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+l(d(r.options.url))+") >>";else if(r.options.pageNumber)switch(e="<</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":e+=" /Fit]";break;case"FitH":e+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,e+=" /FitV "+r.options.left+"]";break;default:var y=o(r.options.top);r.options.left=r.options.left||0,void 0===r.options.zoom&&(r.options.zoom=0),e+=" /XYZ "+r.options.left+" "+y+" "+r.options.zoom+"]"}""!=e&&this.internal.write(e+=" >>")}}this.internal.write("]")}}]),t.createAnnotation=function(t){var i=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":i.pageContext.annotations.push(t)}},t.link=function(t,i,r,n,e){var s=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:o(t),y:a(i),w:o(t+r),h:a(i+n)},options:e,type:"link"})},t.textWithLink=function(t,i,r,n){var e,s,o=this.getTextWidth(t),a=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==n.maxWidth){var u=this.splitTextToSize(t,s=n.maxWidth).length;e=Math.ceil(a*u)}else s=o,e=a;return this.text(t,i,r,n),"center"===n.align&&(i-=o/2),"right"===n.align&&(i-=o),this.link(i,(r+=.2*a)-a,s,e,n),o},t.getTextWidth=function(t){var i=this.internal.getFontSize();return this.getStringUnitWidth(t)*i/this.internal.scaleFactor}}(an.API),
94
+ /**
95
+ * @license
96
+ * Copyright (c) 2017 Aras Abbasi
97
+ *
98
+ * Licensed under the MIT License.
99
+ * http://opensource.org/licenses/mit-license
100
+ */
101
+ function(t){var i={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]},r={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}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},e=[1570,1571,1573,1575];t.__arabicParser__={};var s=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==i[t.charCodeAt(0)]},o=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},a=t.__arabicParser__.isArabicEndLetter=function(t){return o(t)&&s(t)&&i[t.charCodeAt(0)].length<=2},u=t.__arabicParser__.isArabicAlfLetter=function(t){return o(t)&&e.indexOf(t.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return o(t)&&s(t)&&i[t.charCodeAt(0)].length>=1};var f=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return o(t)&&s(t)&&i[t.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return o(t)&&s(t)&&i[t.charCodeAt(0)].length>=3};var c=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return o(t)&&s(t)&&4==i[t.charCodeAt(0)].length},h=t.__arabicParser__.resolveLigatures=function(t){var i=0,n=r,e="",s=0;for(i=0;i<t.length;i+=1)void 0!==n[t.charCodeAt(i)]?(s++,"number"==typeof(n=n[t.charCodeAt(i)])&&(e+=String.fromCharCode(n),n=r,s=0),i===t.length-1&&(n=r,e+=t.charAt(i-(s-1)),i-=s-1,s=0)):(n=r,e+=t.charAt(i-s),i-=s,s=0);return e};t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==n[t.charCodeAt(0)]};var l=t.__arabicParser__.getCorrectForm=function(t,i,r){return o(t)?!1===s(t)?-1:!f(t)||!o(i)&&!o(r)||!o(r)&&a(i)||a(t)&&!o(i)||a(t)&&u(i)||a(t)&&a(i)?0:c(t)&&o(i)&&!a(i)&&o(r)&&f(r)?3:a(t)||!o(r)?1:2:-1},d=function(t){var r=0,n=0,e=0,s="",a="",u="",f=(t=t||"").split("\\s+"),c=[];for(r=0;r<f.length;r+=1){for(c.push(""),n=0;n<f[r].length;n+=1)a=f[r][n-1],u=f[r][n+1],o(s=f[r][n])?(e=l(s,a,u),c[r]+=-1!==e?String.fromCharCode(i[s.charCodeAt(0)][e]):s):c[r]+=s;c[r]=h(c[r])}return c.join(" ")},v=t.__arabicParser__.processArabic=t.processArabic=function(){var t,i="string"==typeof arguments[0]?arguments[0]:arguments[0].text,r=[];if(Array.isArray(i)){var n=0;for(r=[],n=0;n<i.length;n+=1)r.push(Array.isArray(i[n])?[d(i[n][0]),i[n][1],i[n][2]]:[d(i[n])]);t=r}else t=d(i);return"string"==typeof arguments[0]?t:(arguments[0].text=t,arguments[0])};t.events.push(["preProcessText",v])}(an.API),an.API.autoPrint=function(t){var i;return(t=t||{}).variant=t.variant||"non-conform","javascript"===t.variant?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",(function(){i=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 "+i+" 0 R")}))),this
102
+ /**
103
+ * @license
104
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
105
+ *
106
+ * Licensed under the MIT License.
107
+ * http://opensource.org/licenses/mit-license
108
+ */},function(t){var i=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(i){t=i}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(t){i=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var r=300;Object.defineProperty(this,"height",{get:function(){return r},set:function(t){r=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=r+1)}});var n=[];Object.defineProperty(this,"childNodes",{get:function(){return n},set:function(t){n=t}});var e={};Object.defineProperty(this,"style",{get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"parentNode",{})};i.prototype.getContext=function(t,i){var r;if("2d"!==(t=t||"2d"))return null;for(r in i)this.pdf.context2d.hasOwnProperty(r)&&(this.pdf.context2d[r]=i[r]);return this.pdf.context2d._canvas=this,this.pdf.context2d},i.prototype.toDataURL=function(){throw Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new i,this.canvas.pdf=this}])}(an.API),function(t){var i={left:0,top:0,bottom:0,right:0},r=!1,n=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},i),this.internal.__cell__.margins.width=this.getPageWidth(),e.call(this))},e=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var t=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return t},set:function(i){t=i}});var i=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return i},set:function(t){i=t}});var r=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var n=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var e=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var s=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return s},set:function(t){s=t}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(t){o=t}}),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]},t.setHeaderFunction=function(t){return n.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},t.getTextDimensions=function(t,i){n.call(this);var r=(i=i||{}).fontSize||this.getFontSize(),e=i.font||this.getFont(),s=i.scaleFactor||this.internal.scaleFactor,o=0,a=0,u=0,f=this;if(!Array.isArray(t)&&"string"!=typeof t){if("number"!=typeof t)throw Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");t+=""}var c=i.maxWidth;c>0?"string"==typeof t?t=this.splitTextToSize(t,c):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,i){return t.concat(f.splitTextToSize(i,c))}),[])):t=Array.isArray(t)?t:[t];for(var h=0;h<t.length;h++)o<(u=this.getStringUnitWidth(t[h],{font:e})*r)&&(o=u);return 0!==o&&(a=t.length),{w:o/=s,h:Math.max((a*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/s,0)}},t.cellAddPage=function(){n.call(this),this.addPage();var t=this.internal.__cell__.margins||i;return this.internal.__cell__.lastCell=new s(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=t.cell=function(){var t;t=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var e=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,a=this.internal.__cell__.margins||i,u=this.internal.__cell__.tableHeaderRow,f=this.internal.__cell__.printHeaders;return void 0!==e.lineNumber&&(e.lineNumber===t.lineNumber?(t.x=(e.x||0)+(e.width||0),t.y=e.y||0):e.y+e.height+t.height+a.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=a.top,f&&u&&(this.printHeaderRow(t.lineNumber,!0),t.y+=u[0].height)):t.y=e.y+e.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===r?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-o,t.y+o,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+o,{align:"center",baseline:"top",maxWidth:t.width-o-o}):this.text(t.text,t.x+o,t.y+o,{align:"left",baseline:"top",maxWidth:t.width-o-o})),this.internal.__cell__.lastCell=t,this};t.table=function(t,r,u,f,c){if(n.call(this),!u)throw Error("No data for PDF table.");var h,l,d,v,p=[],b=[],m=[],w={},g={},k=[],y=[],N=(c=c||{}).autoSize||!1,L=!1!==c.printHeaders,A=c.css&&void 0!==c.css["font-size"]?16*c.css["font-size"]:c.fontSize||12,x=c.margins||Object.assign({width:this.getPageWidth()},i),S="number"==typeof c.padding?c.padding:3,M=c.headerBackgroundColor||"#c8c8c8",E=c.headerTextColor||"#000";if(e.call(this),this.internal.__cell__.printHeaders=L,this.internal.__cell__.margins=x,this.internal.__cell__.table_font_size=A,this.internal.__cell__.padding=S,this.internal.__cell__.headerBackgroundColor=M,this.internal.__cell__.headerTextColor=E,this.setFontSize(A),null==f)b=p=Object.keys(u[0]),m=p.map((function(){return"left"}));else if(Array.isArray(f)&&"object"===G(f[0]))for(p=f.map((function(t){return t.name})),b=f.map((function(t){return t.prompt||t.name||""})),m=f.map((function(t){return t.align||"left"})),h=0;h<f.length;h+=1)g[f[h].name]=.7499990551181103*f[h].width;else Array.isArray(f)&&"string"==typeof f[0]&&(b=p=f,m=p.map((function(){return"left"})));if(N||Array.isArray(f)&&"string"==typeof f[0])for(h=0;h<p.length;h+=1){for(w[v=p[h]]=u.map((function(t){return t[v]})),this.setFont(void 0,"bold"),k.push(this.getTextDimensions(b[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),l=w[v],this.setFont(void 0,"normal"),d=0;d<l.length;d+=1)k.push(this.getTextDimensions(l[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);g[v]=Math.max.apply(null,k)+S+S,k=[]}if(L){var q={};for(h=0;h<p.length;h+=1)q[p[h]]={},q[p[h]].text=b[h],q[p[h]].align=m[h];var j=a.call(this,q,g);y=p.map((function(i){return new s(t,r,g[i],j,q[i].text,void 0,q[i].align)})),this.setTableHeaderRow(y),this.printHeaderRow(1,!1)}var F=f.reduce((function(t,i){return t[i.name]=i.align,t}),{});for(h=0;h<u.length;h+=1){"rowStart"in c&&c.rowStart instanceof Function&&c.rowStart({row:h,data:u[h]},this);var P=a.call(this,u[h],g);for(d=0;d<p.length;d+=1){var I=u[h][p[d]];"cellStart"in c&&c.cellStart instanceof Function&&c.cellStart({row:h,col:d,data:I},this),o.call(this,new s(t,r,g[p[d]],P,I,h+2,F[p[d]]))}}return this.internal.__cell__.table_x=t,this.internal.__cell__.table_y=r,this};var a=function(t,i){var r=this.internal.__cell__.padding,n=this.internal.__cell__.table_font_size,e=this.internal.scaleFactor;return Object.keys(t).map((function(n){var e=t[n];return this.splitTextToSize(e.hasOwnProperty("text")?e.text:e,i[n]-r-r)}),this).map((function(t){return this.getLineHeightFactor()*t.length*n/e+r+r}),this).reduce((function(t,i){return Math.max(t,i)}),0)};t.setTableHeaderRow=function(t){n.call(this),this.internal.__cell__.tableHeaderRow=t},t.printHeaderRow=function(t,i){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw Error("Property tableHeaderRow does not exist.");var e;if(r=!0,"function"==typeof this.internal.__cell__.headerFunction){var a=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(a[0],a[1],a[2],a[3],void 0,-1)}this.setFont(void 0,"bold");for(var u=[],f=0;f<this.internal.__cell__.tableHeaderRow.length;f+=1){e=this.internal.__cell__.tableHeaderRow[f].clone(),i&&(e.y=this.internal.__cell__.margins.top||0,u.push(e)),e.lineNumber=t;var c=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,e),this.setTextColor(c)}u.length>0&&this.setTableHeaderRow(u),this.setFont(void 0,"normal"),r=!1}}(an.API);var Zn={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Yn=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Xn=Kn(Yn),Qn=[100,200,300,400,500,600,700,800,900],te=Kn(Qn);function ie(t){var i=t.family.replace(/"|'/g,"").toLowerCase(),r=function(t){return Zn[t=t||"normal"]?t:"normal"}(t.style),n=function(t){return t?"number"==typeof t?t>=100&&t<=900&&t%100==0?t:400:/^\d00$/.test(t)?parseInt(t):"bold"===t?700:400:400}(t.weight),e=function(t){return"number"==typeof Xn[t=t||"normal"]?t:"normal"}(t.stretch);return{family:i,style:r,weight:n,stretch:e,src:t.src||[],ref:t.ref||{name:i,style:[e,r,n].join(" ")}}}function re(t,i,r,n){var e;for(e=r;e>=0&&e<i.length;e+=n)if(t[i[e]])return t[i[e]];for(e=r;e>=0&&e<i.length;e-=n)if(t[i[e]])return t[i[e]]}var ne={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},ee={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function se(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function oe(t){return t.trimLeft()}function ae(t,i){for(var r=0;r<t.length;){if(t.charAt(r)===i)return[t.substring(0,r),t.substring(r+1)];r+=1}return null}function ue(t){var i=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===i?null:[i[0],t.substring(i[0].length)]}var fe,ce,he,le,de,ve=["times"];function pe(t,i,r,n,e){var s=4,o=we;switch(e){case an.API.image_compression.FAST:s=1,o=me;break;case an.API.image_compression.MEDIUM:s=6,o=ge;break;case an.API.image_compression.SLOW:s=9,o=ke}t=function(t,i,r,n){for(var e,s=t.length/i,o=new Uint8Array(t.length+s),a=[be,me,we,ge,ke],u=0;u<s;u+=1){var f=u*i,c=t.subarray(f,f+i);if(n)o.set(n(c,r,e),f+u);else{for(var h=a.length,l=[],d=0;d<h;d+=1)l[d]=a[d](c,r,e);var v=Ne(l.concat());o.set(l[v],f+u)}e=c}return o}(t,i,Math.ceil(r*n/8),o);var a=At(t,{level:s});return an.API.__addimage__.arrayBufferToBinaryString(a)}function be(t){var i=Array.apply([],t);return i.unshift(0),i}function me(t,i){var r=t.length,n=[];n[0]=1;for(var e=0;e<r;e+=1)n[e+1]=t[e]-(t[e-i]||0)+256&255;return n}function we(t,i,r){var n=t.length,e=[];e[0]=2;for(var s=0;s<n;s+=1)e[s+1]=t[s]-(r&&r[s]||0)+256&255;return e}function ge(t,i,r){var n=t.length,e=[];e[0]=3;for(var s=0;s<n;s+=1)e[s+1]=t[s]+256-((t[s-i]||0)+(r&&r[s]||0)>>>1)&255;return e}function ke(t,i,r){var n=t.length,e=[];e[0]=4;for(var s=0;s<n;s+=1){var o=ye(t[s-i]||0,r&&r[s]||0,r&&r[s-i]||0);e[s+1]=t[s]-o+256&255}return e}function ye(t,i,r){if(t===i&&i===r)return t;var n=Math.abs(i-r),e=Math.abs(t-r),s=Math.abs(t+i-r-r);return n<=e&&n<=s?t:e<=s?i:r}function Ne(t){var i=t.map((function(t){return t.reduce((function(t,i){return t+Math.abs(i)}),0)}));return i.indexOf(Math.min.apply(null,i))}function Le(t,i,r){var n=i*r,e=Math.floor(n/8),s=16-(n-8*e+r),o=(1<<r)-1;return xe(t,e)>>s&o}function Ae(t,i,r,n){var e=r*n,s=Math.floor(e/8),o=16-(e-8*s+n),a=(1<<n)-1,u=(i&a)<<o;!function(t,i,r){i+1<t.byteLength?t.setUint16(i,r,!1):t.setUint8(i,r>>8&255)}
109
+ /**
110
+ * @license
111
+ * (c) Dean McNamee <dean@gmail.com>, 2013.
112
+ *
113
+ * https://github.com/deanm/omggif
114
+ *
115
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
116
+ * of this software and associated documentation files (the "Software"), to
117
+ * deal in the Software without restriction, including without limitation the
118
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
119
+ * sell copies of the Software, and to permit persons to whom the Software is
120
+ * furnished to do so, subject to the following conditions:
121
+ *
122
+ * The above copyright notice and this permission notice shall be included in
123
+ * all copies or substantial portions of the Software.
124
+ *
125
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
126
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
127
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
128
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
129
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
130
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
131
+ * IN THE SOFTWARE.
132
+ *
133
+ * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
134
+ * including animation and compression. It does not rely on any specific
135
+ * underlying system, so should run in the browser, Node, or Plask.
136
+ */(t,s,xe(t,s)&~(a<<o)&65535|u)}function xe(t,i){return i+1<t.byteLength?t.getUint16(i,!1):t.getUint8(i)<<8}function Se(t){var i=0;if(71!==t[i++]||73!==t[i++]||70!==t[i++]||56!==t[i++]||56!=(t[i++]+1&253)||97!==t[i++])throw Error("Invalid GIF 87a/89a header.");var r=t[i++]|t[i++]<<8,n=t[i++]|t[i++]<<8,e=t[i++],s=1<<1+(7&e);i++,i++;var o=null,a=null;e>>7&&(o=i,a=s,i+=3*s);var u=!0,f=[],c=0,h=null,l=0,d=null;for(this.width=r,this.height=n;u&&i<t.length;)switch(t[i++]){case 33:switch(t[i++]){case 255:if(11!==t[i]||78==t[i+1]&&69==t[i+2]&&84==t[i+3]&&83==t[i+4]&&67==t[i+5]&&65==t[i+6]&&80==t[i+7]&&69==t[i+8]&&50==t[i+9]&&46==t[i+10]&&48==t[i+11]&&3==t[i+12]&&1==t[i+13]&&0==t[i+16])i+=14,d=t[i++]|t[i++]<<8,i++;else for(i+=12;;){if(!((S=t[i++])>=0))throw Error("Invalid block size");if(0===S)break;i+=S}break;case 249:if(4!==t[i++]||0!==t[i+4])throw Error("Invalid graphics extension block.");var v=t[i++];c=t[i++]|t[i++]<<8,h=t[i++],1&v||(h=null),l=v>>2&7,i++;break;case 254:for(;;){if(!((S=t[i++])>=0))throw Error("Invalid block size");if(0===S)break;i+=S}break;default:throw Error("Unknown graphic control label: 0x"+t[i-1].toString(16))}break;case 44:var p=t[i++]|t[i++]<<8,b=t[i++]|t[i++]<<8,m=t[i++]|t[i++]<<8,w=t[i++]|t[i++]<<8,g=t[i++],k=g>>6&1,y=1<<1+(7&g),N=o,L=a,A=!1;g>>7&&(A=!0,N=i,L=y,i+=3*y);var x=i;for(i++;;){var S;if(!((S=t[i++])>=0))throw Error("Invalid block size");if(0===S)break;i+=S}f.push({x:p,y:b,width:m,height:w,has_local_palette:A,palette_offset:N,palette_size:L,data_offset:x,data_length:i-x,transparent_index:h,interlaced:!!k,delay:c,disposal:l});break;case 59:u=!1;break;default:throw Error("Unknown gif block: 0x"+t[i-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return d},this.frameInfo=function(t){if(t<0||t>=f.length)throw Error("Frame index out of range.");return f[t]},this.decodeAndBlitFrameBGRA=function(i,n){var e=this.frameInfo(i),s=e.width*e.height;if(s>536870912)throw Error("Image dimensions exceed 512MB, which is too large.");var o=new Uint8Array(s);Me(t,e.data_offset,o,s);var a=e.palette_offset,u=e.transparent_index;null===u&&(u=256);var f=e.width,c=r-f,h=f,l=4*(e.y*r+e.x),d=4*((e.y+e.height)*r+e.x),v=l,p=4*c;!0===e.interlaced&&(p+=4*r*7);for(var b=8,m=0,w=o.length;m<w;++m){var g=o[m];if(0===h&&(h=f,(v+=p)>=d&&(p=4*c+4*r*(b-1),v=l+(f+c)*(b<<1),b>>=1)),g===u)v+=4;else{var k=t[a+3*g],y=t[a+3*g+1];n[v++]=t[a+3*g+2],n[v++]=y,n[v++]=k,n[v++]=255}--h}},this.decodeAndBlitFrameRGBA=function(i,n){var e=this.frameInfo(i),s=e.width*e.height;if(s>536870912)throw Error("Image dimensions exceed 512MB, which is too large.");var o=new Uint8Array(s);Me(t,e.data_offset,o,s);var a=e.palette_offset,u=e.transparent_index;null===u&&(u=256);var f=e.width,c=r-f,h=f,l=4*(e.y*r+e.x),d=4*((e.y+e.height)*r+e.x),v=l,p=4*c;!0===e.interlaced&&(p+=4*r*7);for(var b=8,m=0,w=o.length;m<w;++m){var g=o[m];if(0===h&&(h=f,(v+=p)>=d&&(p=4*c+4*r*(b-1),v=l+(f+c)*(b<<1),b>>=1)),g===u)v+=4;else{var k=t[a+3*g+1],y=t[a+3*g+2];n[v++]=t[a+3*g],n[v++]=k,n[v++]=y,n[v++]=255}--h}}}function Me(t,i,r,n){for(var e=t[i++],s=1<<e,o=s+1,a=o+1,u=e+1,f=(1<<u)-1,c=0,h=0,l=0,d=t[i++],v=new Int32Array(4096),p=null;;){for(;c<16&&0!==d;)h|=t[i++]<<c,c+=8,1===d?d=t[i++]:--d;if(c<u)break;var b=h&f;if(h>>=u,c-=u,b!==s){if(b===o)break;for(var m=b<a?b:p,w=0,g=m;g>s;)g=v[g]>>8,++w;var k=g;if(l+w+(m!==b?1:0)>n)return void qr.log("Warning, gif stream longer than expected.");r[l++]=k;var y=l+=w;for(m!==b&&(r[l++]=k),g=m;w--;)r[--y]=255&(g=v[g]),g>>=8;null!==p&&a<4096&&(v[a++]=p<<8|k,a>=f+1&&u<12&&(++u,f=f<<1|1)),p=b}else a=o+1,f=(1<<(u=e+1))-1,p=null}return l!==n&&qr.log("Warning, gif stream shorter than expected."),r}
137
+ /**
138
+ * @license
139
+ Copyright (c) 2008, Adobe Systems Incorporated
140
+ All rights reserved.
141
+
142
+ Redistribution and use in source and binary forms, with or without
143
+ modification, are permitted provided that the following conditions are
144
+ met:
145
+
146
+ * Redistributions of source code must retain the above copyright notice,
147
+ this list of conditions and the following disclaimer.
148
+
149
+ * Redistributions in binary form must reproduce the above copyright
150
+ notice, this list of conditions and the following disclaimer in the
151
+ documentation and/or other materials provided with the distribution.
152
+
153
+ * Neither the name of Adobe Systems Incorporated nor the names of its
154
+ contributors may be used to endorse or promote products derived from
155
+ this software without specific prior written permission.
156
+
157
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
158
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
159
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
160
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
161
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
162
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
163
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
164
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
165
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
166
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
167
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
168
+ */function Ee(t){var i,r,n,e,s,o=Math.floor,a=Array(64),u=Array(64),f=Array(64),c=Array(64),h=Array(65535),l=Array(65535),d=Array(64),v=Array(64),p=[],b=0,m=7,w=Array(64),g=Array(64),k=Array(64),y=Array(256),N=Array(2048),L=[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],A=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],x=[0,1,2,3,4,5,6,7,8,9,10,11],S=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],M=[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],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],j=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],F=[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 P(t,i){for(var r=0,n=0,e=[],s=1;s<=16;s++){for(var o=1;o<=t[s];o++)e[i[n]]=[],e[i[n]][0]=r,e[i[n]][1]=s,n++,r++;r*=2}return e}function I(t){for(var i=t[0],r=t[1]-1;r>=0;)i&1<<r&&(b|=1<<m),r--,--m<0&&(255==b?(R(255),R(0)):R(b),m=7,b=0)}function R(t){p.push(t)}function O(t){R(t>>8&255),R(255&t)}function C(t,i,r,n,e){for(var s,o=e[0],a=e[240],u=function(t,i){var r,n,e,s,o,a,u,f,c,h,l=0;for(c=0;c<8;++c){var v=(r=t[l])+(f=t[l+7]),p=r-f,b=(n=t[l+1])+(u=t[l+6]),m=n-u,w=(e=t[l+2])+(a=t[l+5]),g=e-a,k=(s=t[l+3])+(o=t[l+4]),y=s-o,N=v+k,L=v-k,A=b+w,x=b-w;t[l]=N+A,t[l+4]=N-A;var S=.707106781*(x+L);t[l+2]=L+S,t[l+6]=L-S;var M=.382683433*((N=y+g)-(x=m+p)),E=.5411961*N+M,q=1.306562965*x+M,j=.707106781*(A=g+m),F=p+j,P=p-j;t[l+5]=P+E,t[l+3]=P-E,t[l+1]=F+q,t[l+7]=F-q,l+=8}for(l=0,c=0;c<8;++c){var I=(r=t[l])+(f=t[l+56]),R=r-f,O=(n=t[l+8])+(u=t[l+48]),C=n-u,T=(e=t[l+16])+(a=t[l+40]),B=e-a,D=(s=t[l+24])+(o=t[l+32]),z=s-o,U=I+D,_=I-D,V=O+T,H=O-T;t[l]=U+V,t[l+32]=U-V;var W=.707106781*(H+_);t[l+16]=_+W,t[l+48]=_-W;var G=.382683433*((U=z+B)-(H=C+R)),$=.5411961*U+G,J=1.306562965*H+G,K=.707106781*(V=B+C),Z=R+K,Y=R-K;t[l+40]=Y+$,t[l+24]=Y-$,t[l+8]=Z+J,t[l+56]=Z-J,l++}for(c=0;c<64;++c)d[c]=(h=t[c]*i[c])>0?h+.5|0:h-.5|0;return d}(t,i),f=0;f<64;++f)v[L[f]]=u[f];var c=v[0]-r;r=v[0],0==c?I(n[0]):(I(n[l[s=32767+c]]),I(h[s]));for(var p=63;p>0&&0==v[p];)p--;if(0==p)return I(o),r;for(var b,m=1;m<=p;){for(var w=m;0==v[m]&&m<=p;)++m;var g=m-w;if(g>=16){b=g>>4;for(var k=1;k<=b;++k)I(a);g&=15}I(e[(g<<4)+l[s=32767+v[m]]]),I(h[s]),m++}return 63!=p&&I(o),r}function T(t){s!=(t=Math.min(Math.max(t,1),100))&&(function(t){for(var i=[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],r=0;r<64;r++){var n=o((i[r]*t+50)/100);a[L[r]]=n=Math.min(Math.max(n,1),255)}for(var e=[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],s=0;s<64;s++){var h=o((e[s]*t+50)/100);u[L[s]]=h=Math.min(Math.max(h,1),255)}for(var l=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d=0,v=0;v<8;v++)for(var p=0;p<8;p++)f[d]=1/(a[L[d]]*l[v]*l[p]*8),c[d]=1/(u[L[d]]*l[v]*l[p]*8),d++}(Math.floor(t<50?5e3/t:200-2*t)),s=t)}this.encode=function(t,s){s&&T(s),p=[],b=0,m=7,O(65496),O(65504),O(16),R(74),R(70),R(73),R(70),R(0),R(1),R(1),R(0),O(1),O(1),R(0),R(0),function(){O(65499),O(132),R(0);for(var t=0;t<64;t++)R(a[t]);R(1);for(var i=0;i<64;i++)R(u[i])}(),function(t,i){O(65472),O(17),R(8),O(i),O(t),R(3),R(1),R(17),R(0),R(2),R(17),R(1),R(3),R(17),R(1)}(t.width,t.height),function(){O(65476),O(418),R(0);for(var t=0;t<16;t++)R(A[t+1]);for(var i=0;i<=11;i++)R(x[i]);R(16);for(var r=0;r<16;r++)R(S[r+1]);for(var n=0;n<=161;n++)R(M[n]);R(1);for(var e=0;e<16;e++)R(E[e+1]);for(var s=0;s<=11;s++)R(q[s]);R(17);for(var o=0;o<16;o++)R(j[o+1]);for(var a=0;a<=161;a++)R(F[a])}(),O(65498),O(12),R(3),R(1),R(0),R(2),R(17),R(3),R(17),R(0),R(63),R(0);var o=0,h=0,l=0;b=0,m=7,this.encode.displayName="_encode_";for(var d,v,y,L,P,B,D,z,U,_=t.data,V=t.height,H=4*t.width,W=0;W<V;){for(d=0;d<H;){for(P=H*W+d,D=-1,z=0,U=0;U<64;U++)B=P+(z=U>>3)*H+(D=4*(7&U)),W+z>=V&&(B-=H*(W+1+z-V)),d+D>=H&&(B-=d+D-H+4),v=_[B++],y=_[B++],L=_[B++],w[U]=(N[v]+N[y+256|0]+N[L+512|0]>>16)-128,g[U]=(N[v+768|0]+N[y+1024|0]+N[L+1280|0]>>16)-128,k[U]=(N[v+1280|0]+N[y+1536|0]+N[L+1792|0]>>16)-128;o=C(w,f,o,i,n),h=C(g,c,h,r,e),l=C(k,c,l,r,e),d+=32}W+=8}if(m>=0){var G=[];G[1]=m+1,G[0]=(1<<m+1)-1,I(G)}return O(65497),new Uint8Array(p)},t=t||50,function(){for(var t=String.fromCharCode,i=0;i<256;i++)y[i]=t(i)}(),i=P(A,x),r=P(E,q),n=P(S,M),e=P(j,F),function(){for(var t=1,i=2,r=1;r<=15;r++){for(var n=t;n<i;n++)l[32767+n]=r,h[32767+n]=[],h[32767+n][1]=r,h[32767+n][0]=n;for(var e=-(i-1);e<=-t;e++)l[32767+e]=r,h[32767+e]=[],h[32767+e][1]=r,h[32767+e][0]=i-1+e;t<<=1,i<<=1}}(),function(){for(var t=0;t<256;t++)N[t]=19595*t,N[t+256|0]=38470*t,N[t+512|0]=7471*t+32768,N[t+768|0]=-11059*t,N[t+1024|0]=-21709*t,N[t+1280|0]=32768*t+8421375,N[t+1536|0]=-27439*t,N[t+1792|0]=-5329*t}(),T(t)}
169
+ /**
170
+ * @license
171
+ * Copyright (c) 2017 Aras Abbasi
172
+ *
173
+ * Licensed under the MIT License.
174
+ * http://opensource.org/licenses/mit-license
175
+ */function qe(t,i){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!i,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function je(t){function i(t){if(!t)throw Error("assert :P")}function r(t,i,r){for(var n=0;4>n;n++)if(t[i+n]!=r.charCodeAt(n))return!0;return!1}function n(t,i,r,n,e){for(var s=0;s<e;s++)t[i+s]=r[n+s]}function e(t,i,r,n){for(var e=0;e<n;e++)t[i+e]=r}function s(t){return new Int32Array(t)}function o(t,i){for(var r=[],n=0;n<t;n++)r.push(new i);return r}function a(t,i){var r=[];return function t(r,n,e){for(var s=e[n],o=0;o<s&&(r.push(e.length>n+1?[]:new i),!(e.length<n+1));o++)t(r[o],n+1,e)}(r,0,t),r}var u=function(){var t=this;function u(t,i){for(var r=1<<i-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function f(t,r,n,e,s){i(!(e%n));do{t[r+(e-=n)]=s}while(0<e)}function c(t,r,n,e,o){if(i(2328>=o),512>=o)var a=s(512);else if(null==(a=s(o)))return 0;return function(t,r,n,e,o,a){var c,l,d=r,v=1<<n,p=s(16),b=s(16);for(i(0!=o),i(null!=e),i(null!=t),i(0<n),l=0;l<o;++l){if(15<e[l])return 0;++p[e[l]]}if(p[0]==o)return 0;for(b[1]=0,c=1;15>c;++c){if(p[c]>1<<c)return 0;b[c+1]=b[c]+p[c]}for(l=0;l<o;++l)c=e[l],0<e[l]&&(a[b[c]++]=l);if(1==b[15])return(e=new h).g=0,e.value=a[0],f(t,d,1,v,e),v;var m,w=-1,g=v-1,k=0,y=1,N=1,L=1<<n;for(l=0,c=1,o=2;c<=n;++c,o<<=1){if(y+=N<<=1,0>(N-=p[c]))return 0;for(;0<p[c];--p[c])(e=new h).g=c,e.value=a[l++],f(t,d+k,o,L,e),k=u(k,c)}for(c=n+1,o=2;15>=c;++c,o<<=1){if(y+=N<<=1,0>(N-=p[c]))return 0;for(;0<p[c];--p[c]){if(e=new h,(k&g)!=w){for(d+=L,m=1<<(w=c)-n;15>w&&!(0>=(m-=p[w]));)++w,m<<=1;v+=L=1<<(m=w-n),t[r+(w=k&g)].g=m+n,t[r+w].value=d-r-w}e.g=c-n,e.value=a[l++],f(t,d+(k>>n),o,L,e),k=u(k,c)}}return y!=2*b[15]-1?0:v}(t,r,n,e,o,a)}function h(){this.value=this.g=0}function l(){this.value=this.g=0}function d(){this.G=o(5,h),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Tr,l)}function v(t,r,n,e){i(null!=t),i(null!=r),i(2147483648>e),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=n,t.Jd=r,t.Yc=n+e,t.Zc=4<=e?n+e-4+1:n,S(t)}function p(t,i){for(var r=0;0<i--;)r|=E(t,128)<<i;return r}function b(t,i){var r=p(t,i);return M(t)?-r:r}function m(t,r,n,e){var s,o=0;for(i(null!=t),i(null!=r),i(4294967288>e),t.Sb=e,t.Ra=0,t.u=0,t.h=0,4<e&&(e=4),s=0;s<e;++s)o+=r[n+s]<<8*s;t.Ra=o,t.bb=e,t.oa=r,t.pa=n}function w(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<zr-8>>>0,++t.bb,t.u-=8;L(t)&&(t.h=1,t.u=0)}function g(t,r){if(i(0<=r),!t.h&&r<=Dr){var n=N(t)&Br[r];return t.u+=r,w(t),n}return t.h=1,t.u=0}function k(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function y(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function N(t){return t.Ra>>>(t.u&zr-1)>>>0}function L(t){return i(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>zr}function A(t,i){t.u=i,t.h=L(t)}function x(t){t.u>=Ur&&(i(t.u>=Ur),w(t))}function S(t){i(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(i(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function M(t){return p(t,1)}function E(t,i){var r=t.Ca;0>t.b&&S(t);var n=t.b,e=r*i>>>8,s=(t.I>>>n>e)+0;for(s?(r-=e,t.I-=e+1<<n>>>0):r=e+1,n=r,e=0;256<=n;)e+=8,n>>=8;return t.b-=n=7^e+_r[n],t.Ca=(r<<n)-1,s}function q(t,i,r){t[i+0]=r>>24&255,t[i+1]=r>>16&255,t[i+2]=r>>8&255,t[i+3]=255&r}function j(t,i){return t[i+0]|t[i+1]<<8}function F(t,i){return j(t,i)|t[i+2]<<16}function P(t,i){return j(t,i)|j(t,i+2)<<16}function I(t,r){var n=1<<r;return i(null!=t),i(0<r),t.X=s(n),null==t.X?0:(t.Mb=32-r,t.Xa=r,1)}function R(t,r){i(null!=t),i(null!=r),i(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function O(){this.X=[],this.Xa=this.Mb=0}function C(t,r,n,e){i(null!=n),i(null!=e);var s=n[0],o=e[0];return 0==s&&(s=(t*o+r/2)/r),0==o&&(o=(r*s+t/2)/t),0>=s||0>=o?0:(n[0]=s,e[0]=o,1)}function T(t,i){return t+(1<<i)-1>>>i}function B(t,i){return((4278255360&t)+(4278255360&i)>>>0&4278255360)+((16711935&t)+(16711935&i)>>>0&16711935)>>>0}function D(i,r){t[r]=function(r,n,e,s,o,a,u){var f;for(f=0;f<o;++f){var c=t[i](a[u+f-1],e,s+f);a[u+f]=B(r[n+f],c)}}}function z(){this.ud=this.hd=this.jd=0}function U(t,i){return((4278124286&(t^i))>>>1)+(t&i)>>>0}function _(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function V(t,i){return _(t+(t-i+.5>>1))}function H(t,i,r){return Math.abs(i-r)-Math.abs(t-r)}function W(t,i,r,n,e,s,o){for(n=s[o-1],r=0;r<e;++r)s[o+r]=n=B(t[i+r],n)}function G(t,i,r,n,e){var s;for(s=0;s<r;++s){var o=t[i+s],a=o>>8&255,u=16711935&(u=(u=16711935&o)+((a<<16)+a));n[e+s]=(4278255360&o)+u>>>0}}function $(t,i){i.jd=255&t,i.hd=t>>8&255,i.ud=t>>16&255}function J(t,i,r,n,e,s){var o;for(o=0;o<n;++o){var a=i[r+o],u=a>>>8,f=a,c=255&(c=(c=a>>>16)+((t.jd<<24>>24)*(u<<24>>24)>>>5));f=255&(f=(f+=(t.hd<<24>>24)*(u<<24>>24)>>>5)+((t.ud<<24>>24)*(c<<24>>24)>>>5)),e[s+o]=(4278255360&a)+(c<<16)+f}}function K(i,r,n,e,s){t[r]=function(t,i,r,n,o,a,u,f,c){for(n=u;n<f;++n)for(u=0;u<c;++u)o[a++]=s(r[e(t[i++])])},t[i]=function(i,r,o,a,u,f,c){var h=8>>i.b,l=i.Ea,d=i.K[0],v=i.w;if(8>h)for(i=(1<<i.b)-1,v=(1<<h)-1;r<o;++r){var p,b=0;for(p=0;p<l;++p)p&i||(b=e(a[u++])),f[c++]=s(d[b&v]),b>>=h}else t["VP8LMapColor"+n](a,u,d,v,f,c,r,o,l)}}function Z(t,i,r,n,e){for(r=i+r;i<r;){var s=t[i++];n[e++]=s>>16&255,n[e++]=s>>8&255,n[e++]=255&s}}function Y(t,i,r,n,e){for(r=i+r;i<r;){var s=t[i++];n[e++]=s>>16&255,n[e++]=s>>8&255,n[e++]=255&s,n[e++]=s>>24&255}}function X(t,i,r,n,e){for(r=i+r;i<r;){var s=(o=t[i++])>>16&240|o>>12&15,o=240&o|o>>28&15;n[e++]=s,n[e++]=o}}function Q(t,i,r,n,e){for(r=i+r;i<r;){var s=(o=t[i++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[e++]=s,n[e++]=o}}function tt(t,i,r,n,e){for(r=i+r;i<r;){var s=t[i++];n[e++]=255&s,n[e++]=s>>8&255,n[e++]=s>>16&255}}function it(t,i,r,e,s,o){if(0==o)for(r=i+r;i<r;)q(e,((o=t[i++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),s+=32;else n(e,s,t,i,r)}function rt(i,r){t[r][0]=t[i+"0"],t[r][1]=t[i+"1"],t[r][2]=t[i+"2"],t[r][3]=t[i+"3"],t[r][4]=t[i+"4"],t[r][5]=t[i+"5"],t[r][6]=t[i+"6"],t[r][7]=t[i+"7"],t[r][8]=t[i+"8"],t[r][9]=t[i+"9"],t[r][10]=t[i+"10"],t[r][11]=t[i+"11"],t[r][12]=t[i+"12"],t[r][13]=t[i+"13"],t[r][14]=t[i+"0"],t[r][15]=t[i+"0"]}function nt(t){return t==_n||t==Vn||t==Hn||t==Wn}function et(){this.eb=[],this.size=this.A=this.fb=0}function st(){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 ot(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new et,this.f.kb=new st,this.sd=null}function at(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ut(){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 ft(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ct(t,i){var r=t.T,e=i.ba.f.RGBA,s=e.eb,o=e.fb+t.ka*e.A,a=be[i.ba.S],u=t.y,f=t.O,c=t.f,h=t.N,l=t.ea,d=t.W,v=i.cc,p=i.dc,b=i.Mc,m=i.Nc,w=t.ka,g=t.ka+t.T,k=t.U,y=k+1>>1;for(0==w?a(u,f,null,null,c,h,l,d,c,h,l,d,s,o,null,null,k):(a(i.ec,i.fc,u,f,v,p,b,m,c,h,l,d,s,o-e.A,s,o,k),++r);w+2<g;w+=2)a(u,(f+=2*t.fa)-t.fa,u,f,v=c,p=h,b=l,m=d,c,h+=t.Rc,l,d+=t.Rc,s,(o+=2*e.A)-e.A,s,o,k);return f+=t.fa,t.j+g<t.o?(n(i.ec,i.fc,u,f,k),n(i.cc,i.dc,c,h,y),n(i.Mc,i.Nc,l,d,y),r--):1&g||a(u,f,null,null,c,h,l,d,c,h,l,d,s,o+e.A,null,null,k),r}function ht(t,r,n){var e=t.F,s=[t.J];if(null!=e){var o=t.U,a=r.ba.S,u=a==Dn||a==Hn;r=r.ba.f.RGBA;var f=[0],c=t.ka;f[0]=t.T,t.Kb&&(0==c?--f[0]:(--c,s[0]-=t.width),t.j+t.ka+t.T==t.o&&(f[0]=t.o-t.j-c));var h=r.eb;t=An(e,s[0],t.width,o,f,h,(c=r.fb+c*r.A)+(u?0:3),r.A),i(n==f),t&&nt(a)&&Nn(h,c,u,o,f,r.A)}return 0}function lt(t){var i=t.ma,r=i.ba.S,n=11>r,e=r==Cn||r==Bn||r==Dn||r==zn||12==r||nt(r);if(i.memory=null,i.Ib=null,i.Jb=null,i.Nd=null,!Rr(i.Oa,t,e?11:12))return 0;if(e&&nt(r)&&mr(),t.da)alert("todo:use_scaling");else{if(n){if(i.Ib=ft,t.Kb){if(i.memory=s(t.U+2*(r=t.U+1>>1)),null==i.memory)return 0;i.ec=i.memory,i.fc=0,i.cc=i.ec,i.dc=i.fc+t.U,i.Mc=i.cc,i.Nc=i.dc+r,i.Ib=ct,mr()}}else alert("todo:EmitYUV");e&&(i.Jb=ht,n&&pr())}if(n&&!qe){for(t=0;256>t;++t)je[t]=89858*(t-128)+xe>>Ae,Ie[t]=-22014*(t-128)+xe,Pe[t]=-45773*(t-128),Fe[t]=113618*(t-128)+xe>>Ae;for(t=Se;t<Me;++t)Re[t-Se]=Wt(i=76283*(t-16)+xe>>Ae,255),Oe[t-Se]=Wt(i+8>>4,15);qe=1}return 1}function dt(t){var r=t.ma,n=t.U,e=t.T;return i(!(1&t.ka)),0>=n||0>=e?0:(n=r.Ib(t,r),null!=r.Jb&&r.Jb(t,r,n),r.Dc+=n,1)}function vt(t){t.ma.memory=null}function pt(t,i,r,n){return 47!=g(t,8)?0:(i[0]=g(t,14)+1,r[0]=g(t,14)+1,n[0]=g(t,1),0!=g(t,3)?0:!t.h)}function bt(t,i){if(4>t)return t+1;var r=t-2>>1;return(2+(1&t)<<r)+g(i,r)+1}function mt(t,i){return 120<i?i-120:1<=(r=((r=Yn[i-1])>>4)*t+(8-(15&r)))?r:1;var r}function wt(t,i,r){var n=N(r),e=t[i+=255&n].g-8;return 0<e&&(A(r,r.u+8),n=N(r),i+=t[i].value,i+=n&(1<<e)-1),A(r,r.u+t[i].g),t[i].value}function gt(t,r,n){return n.g+=t.g,n.value+=t.value<<r>>>0,i(8>=n.g),t.g}function kt(t,r,n){var e=t.xc;return i((r=0==e?0:t.vc[t.md*(n>>e)+(r>>e)])<t.Wb),t.Ya[r]}function yt(t,r,e,s){var o=t.ab,a=t.c*r,u=t.C;r=u+r;var f=e,c=s;for(s=t.Ta,e=t.Ua;0<o--;){var h=t.gc[o],l=u,d=r,v=f,p=c,b=(c=s,f=e,h.Ea);switch(i(l<d),i(d<=h.nc),h.hc){case 2:Wr(v,p,(d-l)*b,c,f);break;case 0:var m=l,w=d,g=c,k=f,y=(S=h).Ea;0==m&&(Vr(v,p,null,null,1,g,k),W(v,p+1,0,0,y-1,g,k+1),p+=y,k+=y,++m);for(var N=1<<S.b,L=N-1,A=T(y,S.b),x=S.K,S=S.w+(m>>S.b)*A;m<w;){var M=x,E=S,q=1;for(Hr(v,p,g,k-y,1,g,k);q<y;){var j=(q&~L)+N;j>y&&(j=y),(0,Zr[M[E++]>>8&15])(v,p+ +q,g,k+q-y,j-q,g,k+q),q=j}p+=y,k+=y,++m&L||(S+=A)}d!=h.nc&&n(c,f-b,c,f+(d-l-1)*b,b);break;case 1:for(b=v,w=p,y=(v=h.Ea)-(k=v&~(g=(p=1<<h.b)-1)),m=T(v,h.b),N=h.K,h=h.w+(l>>h.b)*m;l<d;){for(L=N,A=h,x=new z,S=w+k,M=w+v;w<S;)$(L[A++],x),Yr(x,b,w,p,c,f),w+=p,f+=p;w<M&&($(L[A++],x),Yr(x,b,w,y,c,f),w+=y,f+=y),++l&g||(h+=m)}break;case 3:if(v==c&&p==f&&0<h.b){for(w=c,v=b=f+(d-l)*b-(k=(d-l)*T(h.Ea,h.b)),p=c,g=f,m=[],k=(y=k)-1;0<=k;--k)m[k]=p[g+k];for(k=y-1;0<=k;--k)w[v+k]=m[k];Gr(h,l,d,c,b,c,f)}else Gr(h,l,d,v,p,c,f)}f=s,c=e}c!=e&&n(s,e,f,c,a)}function Nt(t,r){var n=t.V,e=t.Ba+t.c*t.C,s=r-t.C;if(i(r<=t.l.o),i(16>=s),0<s){var o=t.l,a=t.Ta,u=t.Ua,f=o.width;if(yt(t,s,n,e),s=u=[u],i((n=t.C)<(e=r)),i(o.v<o.va),e>o.o&&(e=o.o),n<o.j){var c=o.j-n;n=o.j,s[0]+=c*f}if(n>=e?n=0:(s[0]+=4*o.v,o.ka=n-o.j,o.U=o.va-o.v,o.T=e-n,n=1),n){if(u=u[0],11>(n=t.ca).S){var h=n.f.RGBA,l=(e=n.S,s=o.U,o=o.T,c=h.eb,h.A),d=o;for(h=h.fb+t.Ma*h.A;0<d--;){var v=a,p=u,b=s,m=c,w=h;switch(e){case On:Xr(v,p,b,m,w);break;case Cn:Qr(v,p,b,m,w);break;case _n:Qr(v,p,b,m,w),Nn(m,w,0,b,1,0);break;case Tn:nn(v,p,b,m,w);break;case Bn:it(v,p,b,m,w,1);break;case Vn:it(v,p,b,m,w,1),Nn(m,w,0,b,1,0);break;case Dn:it(v,p,b,m,w,0);break;case Hn:it(v,p,b,m,w,0),Nn(m,w,1,b,1,0);break;case zn:tn(v,p,b,m,w);break;case Wn:tn(v,p,b,m,w),Ln(m,w,b,1,0);break;case Un:rn(v,p,b,m,w);break;default:i(0)}u+=f,h+=l}t.Ma+=o}else alert("todo:EmitRescaledRowsYUVA");i(t.Ma<=n.height)}}t.C=r,i(t.C<=t.i)}function Lt(t){var i;if(0<t.ua)return 0;for(i=0;i<t.Wb;++i){var r=t.Ya[i].G,n=t.Ya[i].H;if(0<r[1][n[1]+0].g||0<r[2][n[2]+0].g||0<r[3][n[3]+0].g)return 0}return 1}function At(t,r,n,e,s,o){if(0!=t.Z){var a=t.qd,u=t.rd;for(i(null!=pe[t.Z]);r<n;++r)pe[t.Z](a,u,e,s,e,s,o),a=e,u=s,s+=o;t.qd=a,t.rd=u}}function xt(t,r){var n=t.l.ma,e=0==n.Z||1==n.Z?t.l.j:t.C;if(e=t.C<e?e:t.C,i(r<=t.l.o),r>e){var s=t.l.width,o=n.ca,a=n.tb+s*e,u=t.V,f=t.Ba+t.c*e,c=t.gc;i(1==t.ab),i(3==c[0].hc),Jr(c[0],e,r,u,f,o,a),At(n,e,r,o,a,s)}t.C=t.Ma=r}function St(t,r,n,e,s,o,a){var u=t.$/e,f=t.$%e,c=t.m,h=t.s,l=n+t.$,d=l;s=n+e*s;var v=n+e*o,p=280+h.ua,b=t.Pb?u:16777216,m=0<h.ua?h.Wa:null,w=h.wc,g=l<v?kt(h,f,u):null;i(t.C<o),i(v<=s);var k=!1;t:for(;;){for(;k||l<v;){var y=0;if(u>=b){var S=l-n;i((b=t).Pb),b.wd=b.m,b.xd=S,0<b.s.ua&&R(b.s.Wa,b.s.vb),b=u+Qn}if(f&w||(g=kt(h,f,u)),i(null!=g),g.Qb&&(r[l]=g.qb,k=!0),!k)if(x(c),g.jc){S=r;var M=l,E=g.pd[N(y=c)&Tr-1];i(g.jc),256>E.g?(A(y,y.u+E.g),S[M]=E.value,y=0):(A(y,y.u+E.g-256),i(256<=E.value),y=E.value),0==y&&(k=!0)}else y=wt(g.G[0],g.H[0],c);if(c.h)break;if(k||256>y){if(!k)if(g.nd)r[l]=(g.qb|y<<8)>>>0;else{if(x(c),k=wt(g.G[1],g.H[1],c),x(c),S=wt(g.G[2],g.H[2],c),M=wt(g.G[3],g.H[3],c),c.h)break;r[l]=(M<<24|k<<16|y<<8|S)>>>0}if(k=!1,++l,++f>=e&&(f=0,++u,null!=a&&u<=o&&!(u%16)&&a(t,u),null!=m))for(;d<l;)y=r[d++],m.X[(506832829*y&4294967295)>>>m.Mb]=y}else if(280>y){if(y=bt(y-256,c),S=wt(g.G[4],g.H[4],c),x(c),S=mt(e,S=bt(S,c)),c.h)break;if(l-n<S||s-l<y)break t;for(M=0;M<y;++M)r[l+M]=r[l+M-S];for(l+=y,f+=y;f>=e;)f-=e,++u,null!=a&&u<=o&&!(u%16)&&a(t,u);if(i(l<=s),f&w&&(g=kt(h,f,u)),null!=m)for(;d<l;)y=r[d++],m.X[(506832829*y&4294967295)>>>m.Mb]=y}else{if(!(y<p))break t;for(k=y-280,i(null!=m);d<l;)y=r[d++],m.X[(506832829*y&4294967295)>>>m.Mb]=y;y=l,i(!(k>>>(S=m).Xa)),r[y]=S.X[k],k=!0}k||i(c.h==L(c))}if(t.Pb&&c.h&&l<s)i(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&R(t.s.vb,t.s.Wa);else{if(c.h)break t;null!=a&&a(t,u>o?o:u),t.a=0,t.$=l-n}return 1}return t.a=3,0}function Mt(t){i(null!=t),t.vc=null,t.yc=null,t.Ya=null;var r=t.Wa;null!=r&&(r.X=null),t.vb=null,i(null!=t)}function Et(){var i=new sr;return null==i?null:(i.a=0,i.xb=ve,rt("Predictor","VP8LPredictors"),rt("Predictor","VP8LPredictors_C"),rt("PredictorAdd","VP8LPredictorsAdd"),rt("PredictorAdd","VP8LPredictorsAdd_C"),Wr=G,Yr=J,Xr=Z,Qr=Y,tn=X,rn=Q,nn=tt,t.VP8LMapColor32b=$r,t.VP8LMapColor8b=Kr,i)}function qt(t,r,n,a,u){var f=1,l=[t],v=[r],p=a.m,b=a.s,m=null,w=0;t:for(;;){if(n)for(;f&&g(p,1);){var k=l,y=v,L=a,S=1,M=L.m,E=L.gc[L.ab],q=g(M,2);if(L.Oc&1<<q)f=0;else{switch(L.Oc|=1<<q,E.hc=q,E.Ea=k[0],E.nc=y[0],E.K=[null],++L.ab,i(4>=L.ab),q){case 0:case 1:E.b=g(M,3)+2,S=qt(T(E.Ea,E.b),T(E.nc,E.b),0,L,E.K),E.K=E.K[0];break;case 3:var j,F=g(M,8)+1,P=16<F?0:4<F?1:2<F?2:3;if(k[0]=T(E.Ea,P),E.b=P,j=S=qt(F,1,0,L,E.K)){var R,O=F,C=E,D=1<<(8>>C.b),z=s(D);if(null==z)j=0;else{var U=C.K[0],_=C.w;for(z[0]=C.K[0][0],R=1;R<1*O;++R)z[R]=B(U[_+R],z[R-1]);for(;R<4*D;++R)z[R]=0;C.K[0]=null,C.K[0]=z,j=1}}S=j;break;case 2:break;default:i(0)}f=S}}if(l=l[0],v=v[0],f&&g(p,1)&&!(f=1<=(w=g(p,4))&&11>=w)){a.a=3;break t}var V;if(V=f)i:{var H,W,G,$=a,J=l,K=v,Z=w,Y=n,X=$.m,Q=$.s,tt=[null],it=1,rt=0,nt=Xn[Z];r:for(;;){if(Y&&g(X,1)){var et=g(X,3)+2,st=T(J,et),ot=T(K,et),at=st*ot;if(!qt(st,ot,0,$,tt))break r;for(tt=tt[0],Q.xc=et,H=0;H<at;++H){var ut=tt[H]>>8&65535;tt[H]=ut,ut>=it&&(it=ut+1)}}if(X.h)break r;for(W=0;5>W;++W){var ft=Jn[W];!W&&0<Z&&(ft+=1<<Z),rt<ft&&(rt=ft)}var ct=o(it*nt,h),ht=it,lt=o(ht,d);if(null==lt)var dt=null;else i(65536>=ht),dt=lt;var vt=s(rt);if(null==dt||null==vt||null==ct){$.a=1;break r}var pt=ct;for(H=G=0;H<it;++H){var bt=dt[H],mt=bt.G,wt=bt.H,kt=0,yt=1,Nt=0;for(W=0;5>W;++W){ft=Jn[W],mt[W]=pt,wt[W]=G,!W&&0<Z&&(ft+=1<<Z);n:{var Lt,At=ft,xt=$,Et=vt,jt=pt,Ft=G,Pt=0,It=xt.m,Rt=g(It,1);if(e(Et,0,0,At),Rt){var Ot=g(It,1)+1,Ct=g(It,1),Tt=g(It,0==Ct?1:8);Et[Tt]=1,2==Ot&&(Et[Tt=g(It,8)]=1);var Bt=1}else{var Dt=s(19),zt=g(It,4)+4;if(19<zt){xt.a=3;var Ut=0;break n}for(Lt=0;Lt<zt;++Lt)Dt[Zn[Lt]]=g(It,3);var _t=void 0,Vt=void 0,Ht=xt,Wt=Dt,Gt=At,$t=Et,Jt=0,Kt=Ht.m,Zt=8,Yt=o(128,h);e:for(;c(Yt,0,7,Wt,19);){if(g(Kt,1)){var Xt=2+2*g(Kt,3);if((_t=2+g(Kt,Xt))>Gt)break e}else _t=Gt;for(Vt=0;Vt<Gt&&_t--;){x(Kt);var Qt=Yt[0+(127&N(Kt))];A(Kt,Kt.u+Qt.g);var ti=Qt.value;if(16>ti)$t[Vt++]=ti,0!=ti&&(Zt=ti);else{var ii=16==ti,ri=ti-16,ni=$n[ri],ei=g(Kt,Gn[ri])+ni;if(Vt+ei>Gt)break e;for(var si=ii?Zt:0;0<ei--;)$t[Vt++]=si}}Jt=1;break e}Jt||(Ht.a=3),Bt=Jt}(Bt=Bt&&!It.h)&&(Pt=c(jt,Ft,8,Et,At)),Bt&&0!=Pt?Ut=Pt:(xt.a=3,Ut=0)}if(0==Ut)break r;if(yt&&1==Kn[W]&&(yt=0==pt[G].g),kt+=pt[G].g,G+=Ut,3>=W){var oi,ai=vt[0];for(oi=1;oi<ft;++oi)vt[oi]>ai&&(ai=vt[oi]);Nt+=ai}}if(bt.nd=yt,bt.Qb=0,yt&&(bt.qb=(mt[3][wt[3]+0].value<<24|mt[1][wt[1]+0].value<<16|mt[2][wt[2]+0].value)>>>0,0==kt&&256>mt[0][wt[0]+0].value&&(bt.Qb=1,bt.qb+=mt[0][wt[0]+0].value<<8)),bt.jc=!bt.Qb&&6>Nt,bt.jc){var ui,fi=bt;for(ui=0;ui<Tr;++ui){var ci=ui,hi=fi.pd[ci],li=fi.G[0][fi.H[0]+ci];256<=li.value?(hi.g=li.g+256,hi.value=li.value):(hi.g=0,hi.value=0,ci>>=gt(li,8,hi),ci>>=gt(fi.G[1][fi.H[1]+ci],16,hi),ci>>=gt(fi.G[2][fi.H[2]+ci],0,hi),gt(fi.G[3][fi.H[3]+ci],24,hi))}}}Q.vc=tt,Q.Wb=it,Q.Ya=dt,Q.yc=ct,V=1;break i}V=0}if(!(f=V)){a.a=3;break t}if(0<w){if(b.ua=1<<w,!I(b.Wa,w)){a.a=1,f=0;break t}}else b.ua=0;var di=a,vi=l,pi=v,bi=di.s,mi=bi.xc;if(di.c=vi,di.i=pi,bi.md=T(vi,mi),bi.wc=0==mi?-1:(1<<mi)-1,n){a.xb=de;break t}if(null==(m=s(l*v))){a.a=1,f=0;break t}f=(f=St(a,m,0,l,v,v,null))&&!p.h;break t}return f?(null!=u?u[0]=m:(i(null==m),i(n)),a.$=0,n||Mt(b)):Mt(b),f}function jt(t,r){var n=t.c*t.i,e=n+r+16*r;return i(t.c<=r),t.V=s(e),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+r,1)}function Ft(t,r){var n=t.C,e=r-n,s=t.V,o=t.Ba+t.c*n;for(i(r<=t.l.o);0<e;){var a=16<e?16:e,u=t.l.ma,f=t.l.width,c=f*a,h=u.ca,l=u.tb+f*n,d=t.Ta,v=t.Ua;yt(t,a,s,o),xn(d,v,h,l,c),At(u,n,n+a,h,l,f),e-=a,s+=a*t.c,n+=a}i(n==r),t.C=t.Ma=r}function Pt(){this.ub=this.yd=this.td=this.Rb=0}function It(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Rt(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Ot(){this.Yb=function(){var t=[];return function t(i,r,n){for(var e=n[r],s=0;s<e&&(i.push(n.length>r+1?[]:0),!(n.length<r+1));s++)t(i[s],r+1,n)}(t,0,[3,11]),t}()}function Ct(){this.jb=s(3),this.Wc=a([4,8],Ot),this.Xc=a([4,17],Ot)}function Tt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Bt(){this.ld=this.La=this.dd=this.tc=0}function Dt(){this.Na=this.la=0}function zt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ut(){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 _t(){this.uc=this.M=this.Nb=0,this.wa=Array(new Bt),this.Y=0,this.ya=Array(new Ut),this.aa=0,this.l=new Gt}function Vt(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Ht(){this.cb=this.a=0,this.sc="",this.m=new k,this.Od=new Pt,this.Kc=new It,this.ed=new Tt,this.Qa=new Rt,this.Ic=this.$c=this.Aa=0,this.D=new _t,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,k),this.ia=0,this.pb=o(4,zt),this.Pa=new Ct,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Vt),this.Hd=0,this.rb=Array(new Dt),this.sb=0,this.wa=Array(new Bt),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 Ut),this.L=this.aa=0,this.gd=a([4,2],Bt),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 Wt(t,i){return 0>t?0:t>i?i:t}function Gt(){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 $t(){var t=new Ht;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,re||(re=Yt)),t}function Jt(t,i,r){return 0==t.a&&(t.a=i,t.sc=r,t.cb=0),0}function Kt(t,i,r){return 3<=r&&157==t[i+0]&&1==t[i+1]&&42==t[i+2]}function Zt(t,r){if(null==t)return 0;if(t.a=0,t.sc="OK",null==r)return Jt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,s=r.w,o=r.ha;if(4>o)return Jt(t,7,"Truncated header.");var a=n[s+0]|n[s+1]<<8|n[s+2]<<16,u=t.Od;if(u.Rb=!(1&a),u.td=a>>1&7,u.yd=a>>4&1,u.ub=a>>5,3<u.td)return Jt(t,3,"Incorrect keyframe parameters.");if(!u.yd)return Jt(t,4,"Frame not displayable.");s+=3,o-=3;var f=t.Kc;if(u.Rb){if(7>o)return Jt(t,7,"cannot parse picture header");if(!Kt(n,s,o))return Jt(t,3,"Bad code word");f.c=16383&(n[s+4]<<8|n[s+3]),f.Td=n[s+4]>>6,f.i=16383&(n[s+6]<<8|n[s+5]),f.Ud=n[s+6]>>6,s+=7,o-=7,t.za=f.c+15>>4,t.Ub=f.i+15>>4,r.width=f.c,r.height=f.i,r.Da=0,r.j=0,r.v=0,r.va=r.width,r.o=r.height,r.da=0,r.ib=r.width,r.hb=r.height,r.U=r.width,r.T=r.height,e((a=t.Pa).jb,0,255,a.jb.length),i(null!=(a=t.Qa)),a.Cb=0,a.Bb=0,a.Fb=1,e(a.Zb,0,0,a.Zb.length),e(a.Lb,0,0,a.Lb)}if(u.ub>o)return Jt(t,7,"bad partition length");v(a=t.m,n,s,u.ub),s+=u.ub,o-=u.ub,u.Rb&&(f.Ld=M(a),f.Kd=M(a)),f=t.Qa;var c,h=t.Pa;if(i(null!=a),i(null!=f),f.Cb=M(a),f.Cb){if(f.Bb=M(a),M(a)){for(f.Fb=M(a),c=0;4>c;++c)f.Zb[c]=M(a)?b(a,7):0;for(c=0;4>c;++c)f.Lb[c]=M(a)?b(a,6):0}if(f.Bb)for(c=0;3>c;++c)h.jb[c]=M(a)?p(a,8):255}else f.Bb=0;if(a.Ka)return Jt(t,3,"cannot parse segment header");if((f=t.ed).zd=M(a),f.Tb=p(a,6),f.wb=p(a,3),f.Pc=M(a),f.Pc&&M(a)){for(h=0;4>h;++h)M(a)&&(f.vd[h]=b(a,6));for(h=0;4>h;++h)M(a)&&(f.od[h]=b(a,6))}if(t.L=0==f.Tb?0:f.zd?1:2,a.Ka)return Jt(t,3,"cannot parse filter header");var l=o;if(o=c=s,s=c+l,f=l,t.Xb=(1<<p(t.m,2))-1,l<3*(h=t.Xb))n=7;else{for(c+=3*h,f-=3*h,l=0;l<h;++l){var d=n[o+0]|n[o+1]<<8|n[o+2]<<16;d>f&&(d=f),v(t.Jc[+l],n,c,d),c+=d,f-=d,o+=3}v(t.Jc[+h],n,c,f),n=c<s?0:5}if(0!=n)return Jt(t,n,"cannot parse partitions");for(n=p(c=t.m,7),o=M(c)?b(c,4):0,s=M(c)?b(c,4):0,f=M(c)?b(c,4):0,h=M(c)?b(c,4):0,c=M(c)?b(c,4):0,l=t.Qa,d=0;4>d;++d){if(l.Cb){var m=l.Zb[d];l.Fb||(m+=n)}else{if(0<d){t.pb[d]=t.pb[0];continue}m=n}var w=t.pb[d];w.Sc[0]=te[Wt(m+o,127)],w.Sc[1]=ie[Wt(m+0,127)],w.Eb[0]=2*te[Wt(m+s,127)],w.Eb[1]=101581*ie[Wt(m+f,127)]>>16,8>w.Eb[1]&&(w.Eb[1]=8),w.Qc[0]=te[Wt(m+h,117)],w.Qc[1]=ie[Wt(m+c,127)],w.lc=m+c}if(!u.Rb)return Jt(t,4,"Not a key frame.");for(M(a),u=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(s=0;3>s;++s)for(f=0;11>f;++f)h=E(a,ue[n][o][s][f])?p(a,8):oe[n][o][s][f],u.Wc[n][o].Yb[s][f]=h;for(o=0;17>o;++o)u.Xc[n][o]=u.Wc[n][fe[o]]}return t.kc=M(a),t.kc&&(t.Bd=p(a,8)),t.cb=1}function Yt(t,i,r,n,e,s,o){var a=i[e].Yb[r];for(r=0;16>e;++e){if(!E(t,a[r+0]))return e;for(;!E(t,a[r+1]);)if(a=i[++e].Yb[0],r=0,16==e)return 16;var u=i[e+1].Yb;if(E(t,a[r+2])){var f=t,c=0;if(E(f,(l=a)[(h=r)+3]))if(E(f,l[h+6])){for(a=0,h=2*(c=E(f,l[h+8]))+(l=E(f,l[h+9+c])),c=0,l=ne[h];l[a];++a)c+=c+E(f,l[a]);c+=3+(8<<h)}else E(f,l[h+7])?(c=7+2*E(f,165),c+=E(f,145)):c=5+E(f,159);else c=E(f,l[h+4])?3+E(f,l[h+5]):2;a=u[2]}else c=1,a=u[1];u=o+ee[e],0>(f=t).b&&S(f);var h,l=f.b,d=(h=f.Ca>>1)-(f.I>>l)>>31;--f.b,f.Ca+=d,f.Ca|=1,f.I-=(h+1&d)<<l,s[u]=((c^d)-d)*n[(0<e)+0]}return 16}function Xt(t){var i=t.rb[t.sb-1];i.la=0,i.Na=0,e(t.zc,0,0,t.zc.length),t.ja=0}function Qt(t,i,r,n,e){t[i+r+32*n]=-256&(e=t[i+r+32*n]+(e>>3))?0>e?0:255:e}function ti(t,i,r,n,e,s){Qt(t,i,0,r,n+e),Qt(t,i,1,r,n+s),Qt(t,i,2,r,n-s),Qt(t,i,3,r,n-e)}function ii(t){return(20091*t>>16)+t}function ri(t,i,r,n){var e,o=0,a=s(16);for(e=0;4>e;++e){var u=t[i+0]+t[i+8],f=t[i+0]-t[i+8],c=(35468*t[i+4]>>16)-ii(t[i+12]),h=ii(t[i+4])+(35468*t[i+12]>>16);a[o+0]=u+h,a[o+1]=f+c,a[o+2]=f-c,a[o+3]=u-h,o+=4,i++}for(e=o=0;4>e;++e)u=(t=a[o+0]+4)+a[o+8],f=t-a[o+8],c=(35468*a[o+4]>>16)-ii(a[o+12]),Qt(r,n,0,0,u+(h=ii(a[o+4])+(35468*a[o+12]>>16))),Qt(r,n,1,0,f+c),Qt(r,n,2,0,f-c),Qt(r,n,3,0,u-h),o++,n+=32}function ni(t,i,r,n){var e=t[i+0]+4,s=35468*t[i+4]>>16,o=ii(t[i+4]),a=35468*t[i+1]>>16;ti(r,n,0,e+o,t=ii(t[i+1]),a),ti(r,n,1,e+s,t,a),ti(r,n,2,e-s,t,a),ti(r,n,3,e-o,t,a)}function ei(t,i,r,n,e){ri(t,i,r,n),e&&ri(t,i+16,r,n+4)}function si(t,i,r,n){sn(t,i+0,r,n,1),sn(t,i+32,r,n+128,1)}function oi(t,i,r,n){var e;for(t=t[i+0]+4,e=0;4>e;++e)for(i=0;4>i;++i)Qt(r,n,i,e,t)}function ai(t,i,r,n){t[i+0]&&un(t,i+0,r,n),t[i+16]&&un(t,i+16,r,n+4),t[i+32]&&un(t,i+32,r,n+128),t[i+48]&&un(t,i+48,r,n+128+4)}function ui(t,i,r,n){var e,o=s(16);for(e=0;4>e;++e){var a=t[i+0+e]+t[i+12+e],u=t[i+4+e]+t[i+8+e],f=t[i+4+e]-t[i+8+e],c=t[i+0+e]-t[i+12+e];o[0+e]=a+u,o[8+e]=a-u,o[4+e]=c+f,o[12+e]=c-f}for(e=0;4>e;++e)a=(t=o[0+4*e]+3)+o[3+4*e],f=o[1+4*e]-o[2+4*e],c=t-o[3+4*e],r[n+0]=a+(u=o[1+4*e]+o[2+4*e])>>3,r[n+16]=c+f>>3,r[n+32]=a-u>>3,r[n+48]=c-f>>3,n+=64}function fi(t,i,r){var n,e=i-32,s=In,o=255-t[e-1];for(n=0;n<r;++n){var a,u=s,f=o+t[i-1];for(a=0;a<r;++a)t[i+a]=u[f+t[e+a]];i+=32}}function ci(t,i){fi(t,i,4)}function hi(t,i){fi(t,i,8)}function li(t,i){fi(t,i,16)}function di(t,i){var r;for(r=0;16>r;++r)n(t,i+32*r,t,i-32,16)}function vi(t,i){var r;for(r=16;0<r;--r)e(t,i,t[i-1],16),i+=32}function pi(t,i,r){var n;for(n=0;16>n;++n)e(i,r+32*n,t,16)}function bi(t,i){var r,n=16;for(r=0;16>r;++r)n+=t[i-1+32*r]+t[i+r-32];pi(n>>5,t,i)}function mi(t,i){var r,n=8;for(r=0;16>r;++r)n+=t[i-1+32*r];pi(n>>4,t,i)}function wi(t,i){var r,n=8;for(r=0;16>r;++r)n+=t[i+r-32];pi(n>>4,t,i)}function gi(t,i){pi(128,t,i)}function ki(t,i,r){return t+2*i+r+2>>2}function yi(t,i){var r,e=i-32;for(e=new Uint8Array([ki(t[e-1],t[e+0],t[e+1]),ki(t[e+0],t[e+1],t[e+2]),ki(t[e+1],t[e+2],t[e+3]),ki(t[e+2],t[e+3],t[e+4])]),r=0;4>r;++r)n(t,i+32*r,e,0,e.length)}function Ni(t,i){var r=t[i-1],n=t[i-1+32],e=t[i-1+64],s=t[i-1+96];q(t,i+0,16843009*ki(t[i-1-32],r,n)),q(t,i+32,16843009*ki(r,n,e)),q(t,i+64,16843009*ki(n,e,s)),q(t,i+96,16843009*ki(e,s,s))}function Li(t,i){var r,n=4;for(r=0;4>r;++r)n+=t[i+r-32]+t[i-1+32*r];for(n>>=3,r=0;4>r;++r)e(t,i+32*r,n,4)}function Ai(t,i){var r=t[i-1+0],n=t[i-1+32],e=t[i-1+64],s=t[i-1-32],o=t[i+0-32],a=t[i+1-32],u=t[i+2-32],f=t[i+3-32];t[i+0+96]=ki(n,e,t[i-1+96]),t[i+1+96]=t[i+0+64]=ki(r,n,e),t[i+2+96]=t[i+1+64]=t[i+0+32]=ki(s,r,n),t[i+3+96]=t[i+2+64]=t[i+1+32]=t[i+0+0]=ki(o,s,r),t[i+3+64]=t[i+2+32]=t[i+1+0]=ki(a,o,s),t[i+3+32]=t[i+2+0]=ki(u,a,o),t[i+3+0]=ki(f,u,a)}function xi(t,i){var r=t[i+1-32],n=t[i+2-32],e=t[i+3-32],s=t[i+4-32],o=t[i+5-32],a=t[i+6-32],u=t[i+7-32];t[i+0+0]=ki(t[i+0-32],r,n),t[i+1+0]=t[i+0+32]=ki(r,n,e),t[i+2+0]=t[i+1+32]=t[i+0+64]=ki(n,e,s),t[i+3+0]=t[i+2+32]=t[i+1+64]=t[i+0+96]=ki(e,s,o),t[i+3+32]=t[i+2+64]=t[i+1+96]=ki(s,o,a),t[i+3+64]=t[i+2+96]=ki(o,a,u),t[i+3+96]=ki(a,u,u)}function Si(t,i){var r=t[i-1+0],n=t[i-1+32],e=t[i-1+64],s=t[i-1-32],o=t[i+0-32],a=t[i+1-32],u=t[i+2-32],f=t[i+3-32];t[i+0+0]=t[i+1+64]=s+o+1>>1,t[i+1+0]=t[i+2+64]=o+a+1>>1,t[i+2+0]=t[i+3+64]=a+u+1>>1,t[i+3+0]=u+f+1>>1,t[i+0+96]=ki(e,n,r),t[i+0+64]=ki(n,r,s),t[i+0+32]=t[i+1+96]=ki(r,s,o),t[i+1+32]=t[i+2+96]=ki(s,o,a),t[i+2+32]=t[i+3+96]=ki(o,a,u),t[i+3+32]=ki(a,u,f)}function Mi(t,i){var r=t[i+0-32],n=t[i+1-32],e=t[i+2-32],s=t[i+3-32],o=t[i+4-32],a=t[i+5-32],u=t[i+6-32],f=t[i+7-32];t[i+0+0]=r+n+1>>1,t[i+1+0]=t[i+0+64]=n+e+1>>1,t[i+2+0]=t[i+1+64]=e+s+1>>1,t[i+3+0]=t[i+2+64]=s+o+1>>1,t[i+0+32]=ki(r,n,e),t[i+1+32]=t[i+0+96]=ki(n,e,s),t[i+2+32]=t[i+1+96]=ki(e,s,o),t[i+3+32]=t[i+2+96]=ki(s,o,a),t[i+3+64]=ki(o,a,u),t[i+3+96]=ki(a,u,f)}function Ei(t,i){var r=t[i-1+0],n=t[i-1+32],e=t[i-1+64],s=t[i-1+96];t[i+0+0]=r+n+1>>1,t[i+2+0]=t[i+0+32]=n+e+1>>1,t[i+2+32]=t[i+0+64]=e+s+1>>1,t[i+1+0]=ki(r,n,e),t[i+3+0]=t[i+1+32]=ki(n,e,s),t[i+3+32]=t[i+1+64]=ki(e,s,s),t[i+3+64]=t[i+2+64]=t[i+0+96]=t[i+1+96]=t[i+2+96]=t[i+3+96]=s}function qi(t,i){var r=t[i-1+0],n=t[i-1+32],e=t[i-1+64],s=t[i-1+96],o=t[i-1-32],a=t[i+0-32],u=t[i+1-32],f=t[i+2-32];t[i+0+0]=t[i+2+32]=r+o+1>>1,t[i+0+32]=t[i+2+64]=n+r+1>>1,t[i+0+64]=t[i+2+96]=e+n+1>>1,t[i+0+96]=s+e+1>>1,t[i+3+0]=ki(a,u,f),t[i+2+0]=ki(o,a,u),t[i+1+0]=t[i+3+32]=ki(r,o,a),t[i+1+32]=t[i+3+64]=ki(n,r,o),t[i+1+64]=t[i+3+96]=ki(e,n,r),t[i+1+96]=ki(s,e,n)}function ji(t,i){var r;for(r=0;8>r;++r)n(t,i+32*r,t,i-32,8)}function Fi(t,i){var r;for(r=0;8>r;++r)e(t,i,t[i-1],8),i+=32}function Pi(t,i,r){var n;for(n=0;8>n;++n)e(i,r+32*n,t,8)}function Ii(t,i){var r,n=8;for(r=0;8>r;++r)n+=t[i+r-32]+t[i-1+32*r];Pi(n>>4,t,i)}function Ri(t,i){var r,n=4;for(r=0;8>r;++r)n+=t[i+r-32];Pi(n>>3,t,i)}function Oi(t,i){var r,n=4;for(r=0;8>r;++r)n+=t[i-1+32*r];Pi(n>>3,t,i)}function Ci(t,i){Pi(128,t,i)}function Ti(t,i,r){var n=t[i-r],e=t[i+0],s=3*(e-n)+Fn[1020+t[i-2*r]-t[i+r]],o=Pn[112+(s+4>>3)];t[i-r]=In[255+n+Pn[112+(s+3>>3)]],t[i+0]=In[255+e-o]}function Bi(t,i,r,n){return Rn[255+t[i-2*r]-t[i-r]]>n||Rn[255+t[i+r]-t[i+0]]>n}function Di(t,i,r,n){return 4*Rn[255+t[i-r]-t[i+0]]+Rn[255+t[i-2*r]-t[i+r]]<=n}function zi(t,i,r,n,e){var s=t[i-3*r],o=t[i-2*r],a=t[i-r],u=t[i+0],f=t[i+r],c=t[i+2*r];return 4*Rn[255+a-u]+Rn[255+o-f]>n?0:Rn[255+t[i-4*r]-s]<=e&&Rn[255+s-o]<=e&&Rn[255+o-a]<=e&&Rn[255+t[i+3*r]-c]<=e&&Rn[255+c-f]<=e&&Rn[255+f-u]<=e}function Ui(t,i,r,n){var e=2*n+1;for(n=0;16>n;++n)Di(t,i+n,r,e)&&Ti(t,i+n,r)}function _i(t,i,r,n){var e=2*n+1;for(n=0;16>n;++n)Di(t,i+n*r,1,e)&&Ti(t,i+n*r,1)}function Vi(t,i,r,n){var e;for(e=3;0<e;--e)Ui(t,i+=4*r,r,n)}function Hi(t,i,r,n){var e;for(e=3;0<e;--e)_i(t,i+=4,r,n)}function Wi(t,i,r,n,e,s,o,a){for(s=2*s+1;0<e--;){if(zi(t,i,r,s,o))if(Bi(t,i,r,a))Ti(t,i,r);else{var u=t,f=i,c=r,h=u[f-2*c],l=u[f-c],d=u[f+0],v=u[f+c],p=u[f+2*c],b=27*(w=Fn[1020+3*(d-l)+Fn[1020+h-v]])+63>>7,m=18*w+63>>7,w=9*w+63>>7;u[f-3*c]=In[255+u[f-3*c]+w],u[f-2*c]=In[255+h+m],u[f-c]=In[255+l+b],u[f+0]=In[255+d-b],u[f+c]=In[255+v-m],u[f+2*c]=In[255+p-w]}i+=n}}function Gi(t,i,r,n,e,s,o,a){for(s=2*s+1;0<e--;){if(zi(t,i,r,s,o))if(Bi(t,i,r,a))Ti(t,i,r);else{var u=t,f=i,c=r,h=u[f-c],l=u[f+0],d=u[f+c],v=Pn[112+(4+(p=3*(l-h))>>3)],p=Pn[112+(p+3>>3)],b=v+1>>1;u[f-2*c]=In[255+u[f-2*c]+b],u[f-c]=In[255+h+p],u[f+0]=In[255+l-v],u[f+c]=In[255+d-b]}i+=n}}function $i(t,i,r,n,e,s){Wi(t,i,r,1,16,n,e,s)}function Ji(t,i,r,n,e,s){Wi(t,i,1,r,16,n,e,s)}function Ki(t,i,r,n,e,s){var o;for(o=3;0<o;--o)Gi(t,i+=4*r,r,1,16,n,e,s)}function Zi(t,i,r,n,e,s){var o;for(o=3;0<o;--o)Gi(t,i+=4,1,r,16,n,e,s)}function Yi(t,i,r,n,e,s,o,a){Wi(t,i,e,1,8,s,o,a),Wi(r,n,e,1,8,s,o,a)}function Xi(t,i,r,n,e,s,o,a){Wi(t,i,1,e,8,s,o,a),Wi(r,n,1,e,8,s,o,a)}function Qi(t,i,r,n,e,s,o,a){Gi(t,i+4*e,e,1,8,s,o,a),Gi(r,n+4*e,e,1,8,s,o,a)}function tr(t,i,r,n,e,s,o,a){Gi(t,i+4,1,e,8,s,o,a),Gi(r,n+4,1,e,8,s,o,a)}function ir(){this.ba=new ot,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ut,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function rr(){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 nr(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function er(){this.ua=0,this.Wa=new O,this.vb=new O,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new d,this.yc=new h}function sr(){this.xb=this.a=0,this.l=new Gt,this.ca=new ot,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new y,this.Pb=0,this.wd=new y,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new er,this.ab=0,this.gc=o(4,nr),this.Oc=0}function or(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ar(t,i,r,n,e,s,o){for(t=null==t?0:t[i+0],i=0;i<o;++i)e[s+i]=t+r[n+i]&255,t=e[s+i]}function ur(t,i,r,n,e,s,o){var a;if(null==t)ar(null,null,r,n,e,s,o);else for(a=0;a<o;++a)e[s+a]=t[i+a]+r[n+a]&255}function fr(t,i,r,n,e,s,o){if(null==t)ar(null,null,r,n,e,s,o);else{var a,u=t[i+0],f=u,c=u;for(a=0;a<o;++a)f=c+(u=t[i+a])-f,c=r[n+a]+(-256&f?0>f?0:255:f)&255,f=u,e[s+a]=c}}function cr(t,r,e,o){var a=r.width,u=r.o;if(i(null!=t&&null!=r),0>e||0>=o||e+o>u)return null;if(!t.Cc){if(null==t.ga){var f;if(t.ga=new or,(f=null==t.ga)||(f=r.width*r.o,i(0==t.Gb.length),t.Gb=s(f),t.Uc=0,null==t.Gb?f=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,f=1),f=!f),!f){var c=t.Fa,h=t.P,l=t.qc,d=t.mb,v=t.nb,p=h+1,b=l-1,w=(f=t.ga).l;if(i(null!=c&&null!=d&&null!=r),pe[0]=null,pe[1]=ar,pe[2]=ur,pe[3]=fr,f.ca=d,f.tb=v,f.c=r.width,f.i=r.height,i(0<f.c&&0<f.i),1>=l)r=0;else if(f.$a=3&c[h+0],f.Z=c[h+0]>>2&3,f.Lc=c[h+0]>>4&3,h=c[h+0]>>6&3,0>f.$a||1<f.$a||4<=f.Z||1<f.Lc||h)r=0;else if(w.put=dt,w.ac=lt,w.bc=vt,w.ma=f,w.width=r.width,w.height=r.height,w.Da=r.Da,w.v=r.v,w.va=r.va,w.j=r.j,w.o=r.o,f.$a)t:{i(1==f.$a),r=Et();i:for(;;){if(null==r){r=0;break t}if(i(null!=f),f.mc=r,r.c=f.c,r.i=f.i,r.l=f.l,r.l.ma=f,r.l.width=f.c,r.l.height=f.i,r.a=0,m(r.m,c,p,b),!qt(f.c,f.i,1,r,null))break i;if(1==r.ab&&3==r.gc[0].hc&&Lt(r.s)?(f.ic=1,c=r.c*r.i,r.Ta=null,r.Ua=0,r.V=s(c),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(f.ic=0,r=jt(r,f.c)),!r)break i;r=1;break t}f.mc=null,r=0}else r=b>=f.c*f.i;f=!r}if(f)return null;1!=t.ga.Lc?t.Ga=0:o=u-e}i(null!=t.ga),i(e+o<=u);t:{if(r=(c=t.ga).c,u=c.l.o,0==c.$a){if(p=t.rc,b=t.Vc,w=t.Fa,l=t.mb,d=t.nb+e*r,i((h=t.P+1+e*r)<=t.P+t.qc),0!=c.Z)for(i(null!=pe[c.Z]),f=0;f<o;++f)pe[c.Z](p,b,w,h,l,d,r),p=l,b=d,d+=r,h+=r;else for(f=0;f<o;++f)n(l,d,w,h,r),p=l,b=d,d+=r,h+=r;t.rc=p,t.Vc=b}else{if(i(null!=c.mc),r=e+o,i(null!=(f=c.mc)),i(r<=f.i),f.C>=r)r=1;else if(c.ic||pr(),c.ic){c=f.V,p=f.Ba;var g=f.i,k=(w=1,h=f.$/(b=f.c),l=f.$%b,d=f.m,v=f.s,f.$),y=b*g,N=b*r,A=v.wc,S=k<N?kt(v,l,h):null;i(k<=y),i(r<=g),i(Lt(v));i:for(;;){for(;!d.h&&k<N;){if(l&A||(S=kt(v,l,h)),i(null!=S),x(d),256>(g=wt(S.G[0],S.H[0],d)))c[p+k]=g,++k,++l>=b&&(l=0,++h<=r&&!(h%16)&&xt(f,h));else{if(!(280>g)){w=0;break i}g=bt(g-256,d);var M,E=wt(S.G[4],S.H[4],d);if(x(d),!(k>=(E=mt(b,E=bt(E,d)))&&y-k>=g)){w=0;break i}for(M=0;M<g;++M)c[p+k+M]=c[p+k+M-E];for(k+=g,l+=g;l>=b;)l-=b,++h<=r&&!(h%16)&&xt(f,h);k<N&&l&A&&(S=kt(v,l,h))}i(d.h==L(d))}xt(f,h>r?r:h);break i}!w||d.h&&k<y?(w=0,f.a=d.h?5:3):f.$=k,r=w}else r=St(f,f.V,f.Ba,f.c,f.i,r,Ft);if(!r){o=0;break t}}e+o>=u&&(t.Cc=1),o=1}if(!o)return null;if(t.Cc&&(null!=(o=t.ga)&&(o.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+e*a}function hr(t,i,r,n,e,s){for(;0<e--;){var o,a=t,u=i+(r?1:0),f=t,c=i+(r?0:3);for(o=0;o<n;++o){var h=f[c+4*o];255!=h&&(a[u+4*o+0]=a[u+4*o+0]*(h*=32897)>>23,a[u+4*o+1]=a[u+4*o+1]*h>>23,a[u+4*o+2]=a[u+4*o+2]*h>>23)}i+=s}}function lr(t,i,r,n,e){for(;0<n--;){var s;for(s=0;s<r;++s){var o=t[i+2*s+0],a=15&(f=t[i+2*s+1]),u=4369*a,f=(240&f|f>>4)*u>>16;t[i+2*s+0]=(240&o|o>>4)*u>>16&240|(15&o|o<<4)*u>>16>>4&15,t[i+2*s+1]=240&f|a}i+=e}}function dr(t,i,r,n,e,s,o,a){var u,f,c=255;for(f=0;f<e;++f){for(u=0;u<n;++u){var h=t[i+u];s[o+4*u]=h,c&=h}i+=r,o+=a}return 255!=c}function vr(t,i,r,n,e){var s;for(s=0;s<e;++s)r[n+s]=t[i+s]>>8}function pr(){Nn=hr,Ln=lr,An=dr,xn=vr}function br(r,n,e){t[r]=function(t,r,s,o,a,u,f,c,h,l,d,v,p,b,m,w,g){var k,y=g-1>>1,N=a[u+0]|f[c+0]<<16,L=h[l+0]|d[v+0]<<16;i(null!=t);var A=3*N+L+131074>>2;for(n(t[r+0],255&A,A>>16,p,b),null!=s&&n(s[o+0],255&(A=3*L+N+131074>>2),A>>16,m,w),k=1;k<=y;++k){var x=a[u+k]|f[c+k]<<16,S=h[l+k]|d[v+k]<<16,M=N+x+L+S+524296,E=M+2*(x+L)>>3;A=E+N>>1,N=(M=M+2*(N+S)>>3)+x>>1,n(t[r+2*k-1],255&A,A>>16,p,b+(2*k-1)*e),n(t[r+2*k-0],255&N,N>>16,p,b+(2*k-0)*e),null!=s&&(N=E+S>>1,n(s[o+2*k-1],255&(A=M+L>>1),A>>16,m,w+(2*k-1)*e),n(s[o+2*k+0],255&N,N>>16,m,w+(2*k+0)*e)),N=x,L=S}1&g||(n(t[r+g-1],255&(A=3*N+L+131074>>2),A>>16,p,b+(g-1)*e),null!=s&&n(s[o+g-1],255&(A=3*L+N+131074>>2),A>>16,m,w+(g-1)*e))}}function mr(){be[On]=me,be[Cn]=ge,be[Tn]=we,be[Bn]=ke,be[Dn]=ye,be[zn]=Ne,be[Un]=Le,be[_n]=ge,be[Vn]=ke,be[Hn]=ye,be[Wn]=Ne}function wr(t){return-16384&t?0>t?0:255:t>>Ee}function gr(t,i){return wr((19077*t>>8)+(26149*i>>8)-14234)}function kr(t,i,r){return wr((19077*t>>8)-(6419*i>>8)-(13320*r>>8)+8708)}function yr(t,i){return wr((19077*t>>8)+(33050*i>>8)-17685)}function Nr(t,i,r,n,e){n[e+0]=gr(t,r),n[e+1]=kr(t,i,r),n[e+2]=yr(t,i)}function Lr(t,i,r,n,e){n[e+0]=yr(t,i),n[e+1]=kr(t,i,r),n[e+2]=gr(t,r)}function Ar(t,i,r,n,e){var s=kr(t,i,r);i=s<<3&224|yr(t,i)>>3,n[e+0]=248&gr(t,r)|s>>5,n[e+1]=i}function xr(t,i,r,n,e){var s=240&yr(t,i)|15;n[e+0]=240&gr(t,r)|kr(t,i,r)>>4,n[e+1]=s}function Sr(t,i,r,n,e){n[e+0]=255,Nr(t,i,r,n,e+1)}function Mr(t,i,r,n,e){Lr(t,i,r,n,e),n[e+3]=255}function Er(t,i,r,n,e){Nr(t,i,r,n,e),n[e+3]=255}function qr(i,r,n){t[i]=function(t,i,e,s,o,a,u,f,c){for(var h=f+(-2&c)*n;f!=h;)r(t[i+0],e[s+0],o[a+0],u,f),r(t[i+1],e[s+0],o[a+0],u,f+n),i+=2,++s,++a,f+=2*n;1&c&&r(t[i+0],e[s+0],o[a+0],u,f)}}function jr(t,i,r){return 0==r?0==t?0==i?6:5:0==i?4:0:r}function Fr(t,i,r,n,e){switch(t>>>30){case 3:sn(i,r,n,e,0);break;case 2:on(i,r,n,e);break;case 1:un(i,r,n,e)}}function Pr(t,i){var r,s,o=i.M,a=i.Nb,u=t.oc,f=t.pc+40,c=t.oc,h=t.pc+584,l=t.oc,d=t.pc+600;for(r=0;16>r;++r)u[f+32*r-1]=129;for(r=0;8>r;++r)c[h+32*r-1]=129,l[d+32*r-1]=129;for(0<o?u[f-1-32]=c[h-1-32]=l[d-1-32]=129:(e(u,f-32-1,127,21),e(c,h-32-1,127,9),e(l,d-32-1,127,9)),s=0;s<t.za;++s){var v=i.ya[i.aa+s];if(0<s){for(r=-1;16>r;++r)n(u,f+32*r-4,u,f+32*r+12,4);for(r=-1;8>r;++r)n(c,h+32*r-4,c,h+32*r+4,4),n(l,d+32*r-4,l,d+32*r+4,4)}var p=t.Gd,b=t.Hd+s,m=v.ad,w=v.Hc;if(0<o&&(n(u,f-32,p[b].y,0,16),n(c,h-32,p[b].f,0,8),n(l,d-32,p[b].ea,0,8)),v.Za){var g=u,k=f-32+16;for(0<o&&(s>=t.za-1?e(g,k,p[b].y[15],4):n(g,k,p[b+1].y,0,4)),r=0;4>r;r++)g[k+128+r]=g[k+256+r]=g[k+384+r]=g[k+0+r];for(r=0;16>r;++r,w<<=2)he[v.Ob[r]](g=u,k=f+Ce[r]),Fr(w,m,16*+r,g,k)}else if(g=jr(s,o,v.Ob[0]),ce[g](u,f),0!=w)for(r=0;16>r;++r,w<<=2)Fr(w,m,16*+r,u,f+Ce[r]);for(r=v.Gc,g=jr(s,o,v.Dd),le[g](c,h),le[g](l,d),w=m,g=c,k=h,255&(v=0|r)&&(170&v?an(w,256,g,k):fn(w,256,g,k)),v=l,w=d,255&(r>>=8)&&(170&r?an(m,320,v,w):fn(m,320,v,w)),o<t.Ub-1&&(n(p[b].y,0,u,f+480,16),n(p[b].f,0,c,h+224,8),n(p[b].ea,0,l,d+224,8)),p=t.sa,b=t.ta+16*s+16*a*t.R,m=t.qa,v=t.ra+8*s+(r=8*a*t.B),w=t.Ha,g=t.Ia+8*s+r,r=0;16>r;++r)n(p,b+r*t.R,u,f+32*r,16);for(r=0;8>r;++r)n(m,v+r*t.B,c,h+32*r,8),n(w,g+r*t.B,l,d+32*r,8)}}function Ir(t,n,e,s,o,a,u,f,c){var h=[0],l=[0],d=0,v=null!=c?c.kd:0,p=null!=c?c:new rr;if(null==t||12>e)return 7;p.data=t,p.w=n,p.ha=e,n=[n],e=[e],p.gb=[p.gb];t:{var b=n,w=e,g=p.gb;if(i(null!=t),i(null!=w),i(null!=g),g[0]=0,12<=w[0]&&!r(t,b[0],"RIFF")){if(r(t,b[0]+8,"WEBP")){g=3;break t}var k=P(t,b[0]+4);if(12>k||4294967286<k){g=3;break t}if(v&&k>w[0]-8){g=7;break t}g[0]=k,b[0]+=12,w[0]-=12}g=0}if(0!=g)return g;for(k=0<p.gb[0],e=e[0];;){t:{var N=t;w=n,g=e;var L=h,A=l,x=b=[0];if((E=d=[d])[0]=0,8>g[0])g=7;else{if(!r(N,w[0],"VP8X")){if(10!=P(N,w[0]+4)){g=3;break t}if(18>g[0]){g=7;break t}var S=P(N,w[0]+8),M=1+F(N,w[0]+12);if(2147483648<=M*(N=1+F(N,w[0]+15))){g=3;break t}null!=x&&(x[0]=S),null!=L&&(L[0]=M),null!=A&&(A[0]=N),w[0]+=18,g[0]-=18,E[0]=1}g=0}}if(d=d[0],0!=g)return g;if(w=!!(2&(b=b[0])),!k&&d)return 3;if(null!=a&&(a[0]=!!(16&b)),null!=u&&(u[0]=w),null!=f&&(f[0]=0),u=h[0],b=l[0],d&&w&&null==c){g=0;break}if(4>e){g=7;break}if(k&&d||!k&&!d&&!r(t,n[0],"ALPH")){e=[e],p.na=[p.na],p.P=[p.P],p.Sa=[p.Sa];t:{g=n,k=e;var E=p.gb;L=p.na,A=p.P,x=p.Sa,M=22,i(null!=(S=t)),i(null!=k),N=g[0];var q=k[0];for(i(null!=L),i(null!=x),L[0]=null,A[0]=null,x[0]=0;;){if(g[0]=N,k[0]=q,8>q){g=7;break t}var j=P(S,N+4);if(4294967286<j){g=3;break t}var I=8+j+1&-2;if(M+=I,0<E&&M>E){g=3;break t}if(!r(S,N,"VP8 ")||!r(S,N,"VP8L")){g=0;break t}if(q[0]<I){g=7;break t}r(S,N,"ALPH")||(L[0]=S,A[0]=N+8,x[0]=j),N+=I,q-=I}}if(e=e[0],p.na=p.na[0],p.P=p.P[0],p.Sa=p.Sa[0],0!=g)break}e=[e],p.Ja=[p.Ja],p.xa=[p.xa];t:if(E=t,g=n,k=e,L=p.gb[0],A=p.Ja,x=p.xa,S=g[0],N=!r(E,S,"VP8 "),M=!r(E,S,"VP8L"),i(null!=E),i(null!=k),i(null!=A),i(null!=x),8>k[0])g=7;else{if(N||M){if(E=P(E,S+4),12<=L&&E>L-12){g=3;break t}if(v&&E>k[0]-8){g=7;break t}A[0]=E,g[0]+=8,k[0]-=8,x[0]=M}else x[0]=5<=k[0]&&47==E[S+0]&&!(E[S+4]>>5),A[0]=k[0];g=0}if(e=e[0],p.Ja=p.Ja[0],p.xa=p.xa[0],n=n[0],0!=g)break;if(4294967286<p.Ja)return 3;if(null==f||w||(f[0]=p.xa?2:1),u=[u],b=[b],p.xa){if(5>e){g=7;break}f=u,v=b,w=a,null==t||5>e?t=0:5<=e&&47==t[n+0]&&!(t[n+4]>>5)?(k=[0],E=[0],L=[0],m(A=new y,t,n,e),pt(A,k,E,L)?(null!=f&&(f[0]=k[0]),null!=v&&(v[0]=E[0]),null!=w&&(w[0]=L[0]),t=1):t=0):t=0}else{if(10>e){g=7;break}f=b,null==t||10>e||!Kt(t,n+3,e-3)?t=0:(v=t[n+0]|t[n+1]<<8|t[n+2]<<16,w=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&v||3<(v>>1&7)||!(v>>4&1)||v>>5>=p.Ja||!w||!t?t=0:(u&&(u[0]=w),f&&(f[0]=t),t=1))}if(!t)return 3;if(u=u[0],b=b[0],d&&(h[0]!=u||l[0]!=b))return 3;null!=c&&(c[0]=p,c.offset=n-c.w,i(4294967286>n-c.w),i(c.offset==c.ha-e));break}return 0==g||7==g&&d&&null==c?(null!=a&&(a[0]|=null!=p.na&&0<p.na.length),null!=s&&(s[0]=u),null!=o&&(o[0]=b),0):g}function Rr(t,i,r){var n=i.width,e=i.height,s=0,o=0,a=n,u=e;if(i.Da=null!=t&&0<t.Da,i.Da&&(a=t.cd,u=t.bd,s=t.v,o=t.j,11>r||(s&=-2,o&=-2),0>s||0>o||0>=a||0>=u||s+a>n||o+u>e))return 0;if(i.v=s,i.j=o,i.va=s+a,i.o=o+u,i.U=a,i.T=u,i.da=null!=t&&0<t.da,i.da){if(!C(a,u,r=[t.ib],s=[t.hb]))return 0;i.ib=r[0],i.hb=s[0]}return i.ob=null!=t&&t.ob,i.Kb=null==t||!t.Sd,i.da&&(i.ob=i.ib<3*n/4&&i.hb<3*e/4,i.Kb=0),1}function Or(t){if(null==t)return 2;if(11>t.S){var i=t.f.RGBA;i.fb+=(t.height-1)*i.A,i.A=-i.A}else(i=t.f.kb).O+=((t=t.height)-1)*i.fa,i.fa=-i.fa,i.N+=(t-1>>1)*i.Ab,i.Ab=-i.Ab,i.W+=(t-1>>1)*i.Db,i.Db=-i.Db,null!=i.F&&(i.J+=(t-1)*i.lb,i.lb=-i.lb);return 0}function Cr(t,i,r,n){if(null==n||0>=t||0>=i)return 2;if(null!=r){if(r.Da){var e=r.cd,o=r.bd,a=-2&r.v,u=-2&r.j;if(0>a||0>u||0>=e||0>=o||a+e>t||u+o>i)return 2;t=e,i=o}if(r.da){if(!C(t,i,e=[r.ib],o=[r.hb]))return 2;t=e[0],i=o[0]}}n.width=t,n.height=i;t:{var f=n.width,c=n.height;if(t=n.S,0>=f||0>=c||!(t>=On&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){a=o=e=i=0;var h=(u=f*De[t])*c;if(11>t||(o=(c+1)/2*(i=(f+1)/2),12==t&&(a=(e=f)*c)),null==(c=s(h+2*o+a))){t=1;break t}n.sd=c,11>t?((f=n.f.RGBA).eb=c,f.fb=0,f.A=u,f.size=h):((f=n.f.kb).y=c,f.O=0,f.fa=u,f.Fd=h,f.f=c,f.N=0+h,f.Ab=i,f.Cd=o,f.ea=c,f.W=0+h+o,f.Db=i,f.Ed=o,12==t&&(f.F=c,f.J=0+h+2*o),f.Tc=a,f.lb=e)}if(i=1,o=n.width,a=n.height,(e=n.S)>=On&&13>e)if(11>e)i&=(u=Math.abs((t=n.f.RGBA).A))*(a-1)+o<=t.size,i&=u>=o*De[e],i&=null!=t.eb;else{u=(o+1)/2,h=(a+1)/2,f=Math.abs((t=n.f.kb).fa),c=Math.abs(t.Ab);var l=Math.abs(t.Db),d=Math.abs(t.lb);i&=f*(a-1)+o<=t.Fd,i&=c*(h-1)+u<=t.Cd,i=(i&=l*(h-1)+u<=t.Ed)&f>=o&c>=u&l>=u,i&=null!=t.y,i&=null!=t.f,i&=null!=t.ea,12==e&&(i&=d>=o,i&=d*(a-1)+o<=t.Tc,i&=null!=t.F)}else i=0;t=i?0:2}}return 0!=t||null!=r&&r.fd&&(t=Or(n)),t}var Tr=64,Br=[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],Dr=24,zr=32,Ur=8,_r=[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];D("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,i,r){return i[r+0]},t.Predictor3=function(t,i,r){return i[r+1]},t.Predictor4=function(t,i,r){return i[r-1]},t.Predictor5=function(t,i,r){return U(U(t,i[r+1]),i[r+0])},t.Predictor6=function(t,i,r){return U(t,i[r-1])},t.Predictor7=function(t,i,r){return U(t,i[r+0])},t.Predictor8=function(t,i,r){return U(i[r-1],i[r+0])},t.Predictor9=function(t,i,r){return U(i[r+0],i[r+1])},t.Predictor10=function(t,i,r){return U(U(t,i[r-1]),U(i[r+0],i[r+1]))},t.Predictor11=function(t,i,r){var n=i[r+0];return 0>=H(n>>24&255,t>>24&255,(i=i[r-1])>>24&255)+H(n>>16&255,t>>16&255,i>>16&255)+H(n>>8&255,t>>8&255,i>>8&255)+H(255&n,255&t,255&i)?n:t},t.Predictor12=function(t,i,r){var n=i[r+0];return(_((t>>24&255)+(n>>24&255)-((i=i[r-1])>>24&255))<<24|_((t>>16&255)+(n>>16&255)-(i>>16&255))<<16|_((t>>8&255)+(n>>8&255)-(i>>8&255))<<8|_((255&t)+(255&n)-(255&i)))>>>0},t.Predictor13=function(t,i,r){var n=i[r-1];return(V((t=U(t,i[r+0]))>>24&255,n>>24&255)<<24|V(t>>16&255,n>>16&255)<<16|V(t>>8&255,n>>8&255)<<8|V(255&t,255&n))>>>0};var Vr=t.PredictorAdd0;t.PredictorAdd1=W,D("Predictor2","PredictorAdd2"),D("Predictor3","PredictorAdd3"),D("Predictor4","PredictorAdd4"),D("Predictor5","PredictorAdd5"),D("Predictor6","PredictorAdd6"),D("Predictor7","PredictorAdd7"),D("Predictor8","PredictorAdd8"),D("Predictor9","PredictorAdd9"),D("Predictor10","PredictorAdd10"),D("Predictor11","PredictorAdd11"),D("Predictor12","PredictorAdd12"),D("Predictor13","PredictorAdd13");var Hr=t.PredictorAdd2;K("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),K("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var Wr,Gr=t.ColorIndexInverseTransform,$r=t.MapARGB,Jr=t.VP8LColorIndexInverseTransformAlpha,Kr=t.MapAlpha,Zr=t.VP8LPredictorsAdd=[];Zr.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var Yr,Xr,Qr,tn,rn,nn,en,sn,on,an,un,fn,cn,hn,ln,dn,vn,pn,bn,mn,wn,gn,kn,yn,Nn,Ln,An,xn,Sn=s(511),Mn=s(2041),En=s(225),qn=s(767),jn=0,Fn=Mn,Pn=En,In=qn,Rn=Sn,On=0,Cn=1,Tn=2,Bn=3,Dn=4,zn=5,Un=6,_n=7,Vn=8,Hn=9,Wn=10,Gn=[2,3,7],$n=[3,3,11],Jn=[280,256,256,256,40],Kn=[0,1,1,1,0],Zn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Yn=[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],Xn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Qn=8,te=[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],ie=[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],re=null,ne=[[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]],ee=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],se=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],oe=[[[[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]]]],ae=[[[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]]],ue=[[[[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]]]],fe=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ce=[],he=[],le=[],de=1,ve=2,pe=[],be=[];br("UpsampleRgbLinePair",Nr,3),br("UpsampleBgrLinePair",Lr,3),br("UpsampleRgbaLinePair",Er,4),br("UpsampleBgraLinePair",Mr,4),br("UpsampleArgbLinePair",Sr,4),br("UpsampleRgba4444LinePair",xr,2),br("UpsampleRgb565LinePair",Ar,2);var me=t.UpsampleRgbLinePair,we=t.UpsampleBgrLinePair,ge=t.UpsampleRgbaLinePair,ke=t.UpsampleBgraLinePair,ye=t.UpsampleArgbLinePair,Ne=t.UpsampleRgba4444LinePair,Le=t.UpsampleRgb565LinePair,Ae=16,xe=1<<Ae-1,Se=-227,Me=482,Ee=6,qe=0,je=s(256),Fe=s(256),Pe=s(256),Ie=s(256),Re=s(Me-Se),Oe=s(Me-Se);qr("YuvToRgbRow",Nr,3),qr("YuvToBgrRow",Lr,3),qr("YuvToRgbaRow",Er,4),qr("YuvToBgraRow",Mr,4),qr("YuvToArgbRow",Sr,4),qr("YuvToRgba4444Row",xr,2),qr("YuvToRgb565Row",Ar,2);var Ce=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Te=[0,2,8],Be=[8,7,6,4,4,2,2,2,1,1,1,1];this.WebPDecodeRGBA=function(t,r,a,u,f){var c=Cn,h=new ir,l=new ot;h.ba=l,l.S=c,l.width=[l.width],l.height=[l.height];var d=l.width,v=l.height,p=new at;if(null==p||null==t)var b=2;else i(null!=p),b=Ir(t,r,a,p.width,p.height,p.Pd,p.Qd,p.format,null);if(0!=b?d=0:(null!=d&&(d[0]=p.width[0]),null!=v&&(v[0]=p.height[0]),d=1),d){l.width=l.width[0],l.height=l.height[0],null!=u&&(u[0]=l.width),null!=f&&(f[0]=l.height);t:{if(u=new Gt,(f=new rr).data=t,f.w=r,f.ha=a,f.kd=1,r=[0],i(null!=f),(0==(t=Ir(f.data,f.w,f.ha,null,null,null,r,null,f))||7==t)&&r[0]&&(t=4),0==(r=t)){if(i(null!=h),u.data=f.data,u.w=f.w+f.offset,u.ha=f.ha-f.offset,u.put=dt,u.ac=lt,u.bc=vt,u.ma=h,f.xa){if(null==(t=Et())){h=1;break t}if(function(t,r){var n=[0],e=[0],s=[0];i:for(;;){if(null==t)return 0;if(null==r)return t.a=2,0;if(t.l=r,t.a=0,m(t.m,r.data,r.w,r.ha),!pt(t.m,n,e,s)){t.a=3;break i}if(t.xb=ve,r.width=n[0],r.height=e[0],!qt(n[0],e[0],1,t,null))break i;return 1}return i(0!=t.a),0}(t,u)){if(u=0==(r=Cr(u.width,u.height,h.Oa,h.ba))){i:{u=t;r:for(;;){if(null==u){u=0;break i}if(i(null!=u.s.yc),i(null!=u.s.Ya),i(0<u.s.Wb),i(null!=(a=u.l)),i(null!=(f=a.ma)),0!=u.xb){if(u.ca=f.ba,u.tb=f.tb,i(null!=u.ca),!Rr(f.Oa,a,Bn)){u.a=2;break r}if(!jt(u,a.width))break r;if(a.da)break r;if((a.da||nt(u.ca.S))&&pr(),11>u.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=u.ca.f.kb.F&&pr()),u.Pb&&0<u.s.ua&&null==u.s.vb.X&&!I(u.s.vb,u.s.Wa.Xa)){u.a=1;break r}u.xb=0}if(!St(u,u.V,u.Ba,u.c,u.i,a.o,Nt))break r;f.Dc=u.Ma,u=1;break i}i(0!=u.a),u=0}u=!u}u&&(r=t.a)}else r=t.a}else{if(null==(t=new $t)){h=1;break t}if(t.Fa=f.na,t.P=f.P,t.qc=f.Sa,Zt(t,u)){if(0==(r=Cr(u.width,u.height,h.Oa,h.ba))){if(t.Aa=0,a=h.Oa,i(null!=(f=t)),null!=a){if(0<(d=0>(d=a.Md)?0:100<d?255:255*d/100)){for(v=p=0;4>v;++v)12>(b=f.pb[v]).lc&&(b.ia=d*Be[0>b.lc?0:b.lc]>>3),p|=b.ia;p&&(alert("todo:VP8InitRandom"),f.ia=1)}f.Ga=a.Id,100<f.Ga?f.Ga=100:0>f.Ga&&(f.Ga=0)}(function(t,r){if(null==t)return 0;if(null==r)return Jt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Zt(t,r))return 0;if(i(t.cb),null==r.ac||r.ac(r)){r.ob&&(t.L=0);var a=Te[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=r.v-a>>4,t.zb=r.j-a>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=r.o+15+a>>4,t.Hb=r.va+15+a>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var u=t.ed;for(a=0;4>a;++a){var f;if(t.Qa.Cb){var c=t.Qa.Lb[a];t.Qa.Fb||(c+=u.Tb)}else c=u.Tb;for(f=0;1>=f;++f){var h=t.gd[a][f],l=c;if(u.Pc&&(l+=u.vd[0],f&&(l+=u.od[0])),0<(l=0>l?0:63<l?63:l)){var d=l;0<u.wb&&(d=4<u.wb?d>>2:d>>1)>9-u.wb&&(d=9-u.wb),1>d&&(d=1),h.dd=d,h.tc=2*l+d,h.ld=40<=l?2:15<=l?1:0}else h.tc=0;h.La=f}}}a=0}else Jt(t,6,"Frame setup failed"),a=t.a;if(a=0==a){if(a){t.$c=0,0<t.Aa||(t.Ic=1);i:{u=4*(d=t.za);var v=32*d,p=d+1,b=0<t.L?d*(0<t.Aa?2:1):0,m=(2==t.Aa?2:1)*d;if((h=u+832+(f=3*(16*(a=t.Ic)+Te[t.L])/2*v)+(c=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=h)a=0;else{if(h>t.Vb){if(t.Vb=0,t.Ec=s(h),t.Fc=0,null==t.Ec){a=Jt(t,1,"no memory during frame initialization.");break i}t.Vb=h}l=t.Fc,t.Ac=h=t.Ec,t.Bc=l,l+=u,t.Gd=o(v,Vt),t.Hd=0,t.rb=o(p+1,Dt),t.sb=1,t.wa=b?o(b,Bt):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=d),i(!0),t.oc=h,t.pc=l,l+=832,t.ya=o(m,Ut),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=d),t.R=16*d,t.B=8*d,d=(v=Te[t.L])*t.R,v=v/2*t.B,t.sa=h,t.ta=l+d,t.qa=t.sa,t.ra=t.ta+16*a*t.R+v,t.Ha=t.qa,t.Ia=t.ra+8*a*t.B+v,t.$c=0,l+=f,t.mb=c?h:null,t.nb=c?l:null,i(l+c<=t.Fc+t.Vb),Xt(t),e(t.Ac,t.Bc,0,u),a=1}}if(a){if(r.ka=0,r.y=t.sa,r.O=t.ta,r.f=t.qa,r.N=t.ra,r.ea=t.Ha,r.Vd=t.Ia,r.fa=t.R,r.Rc=t.B,r.F=null,r.J=0,!jn){for(a=-255;255>=a;++a)Sn[255+a]=0>a?-a:a;for(a=-1020;1020>=a;++a)Mn[1020+a]=-128>a?-128:127<a?127:a;for(a=-112;112>=a;++a)En[112+a]=-16>a?-16:15<a?15:a;for(a=-255;510>=a;++a)qn[255+a]=0>a?0:255<a?255:a;jn=1}en=ui,sn=ei,an=si,un=oi,fn=ai,on=ni,cn=$i,hn=Ji,ln=Yi,dn=Xi,vn=Ki,pn=Zi,bn=Qi,mn=tr,wn=Ui,gn=_i,kn=Vi,yn=Hi,he[0]=Li,he[1]=ci,he[2]=yi,he[3]=Ni,he[4]=Ai,he[5]=Si,he[6]=xi,he[7]=Mi,he[8]=qi,he[9]=Ei,ce[0]=bi,ce[1]=li,ce[2]=di,ce[3]=vi,ce[4]=mi,ce[5]=wi,ce[6]=gi,le[0]=Ii,le[1]=hi,le[2]=ji,le[3]=Fi,le[4]=Oi,le[5]=Ri,le[6]=Ci,a=1}else a=0}a&&(a=function(t,r){for(t.M=0;t.M<t.Va;++t.M){var o,a=t.Jc[t.M&t.Xb],u=t.m,f=t;for(o=0;o<f.za;++o){var c=u,h=f,l=h.Ac,d=h.Bc+4*o,v=h.zc,p=h.ya[h.aa+o];if(p.$b=h.Qa.Bb?E(c,h.Pa.jb[0])?2+E(c,h.Pa.jb[2]):E(c,h.Pa.jb[1]):0,h.kc&&(p.Ad=E(c,h.Bd)),p.Za=!E(c,145)+0,p.Za){var b=p.Ob,m=0;for(h=0;4>h;++h){var w,g=v[0+h];for(w=0;4>w;++w){for(var k=se[E(c,(g=ae[l[d+w]][g])[0])];0<k;)k=se[2*k+E(c,g[k])];l[d+w]=g=-k}n(b,m,l,d,4),m+=4,v[0+h]=g}}else g=E(c,156)?E(c,128)?1:3:E(c,163)?2:0,p.Ob[0]=g,e(l,d,g,4),e(v,0,g,4);p.Dd=E(c,142)?E(c,114)?E(c,183)?1:3:2:0}if(f.m.Ka)return Jt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(f=a,c=(u=t).rb[u.sb-1],l=u.rb[u.sb+u.ja],o=u.ya[u.aa+u.ja],d=u.kc?o.Ad:0)c.la=l.la=0,o.Za||(c.Na=l.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var y,N;if(c=l,l=f,d=u.Pa.Xc,p=u.pb[(v=u.ya[u.aa+u.ja]).$b],m=u.rb[u.sb-1],g=w=0,e(h=v.ad,b=0,0,384),v.Za)var L=0,A=d[3];else{k=s(16);var x=c.Na+m.Na;if(x=re(l,d[1],x,p.Eb,0,k,0),c.Na=m.Na=(0<x)+0,1<x)en(k,0,h,b);else{var S=k[0]+3>>3;for(k=0;256>k;k+=16)h[b+k]=S}L=1,A=d[0]}var M=15&c.la,q=15&m.la;for(k=0;4>k;++k){var j=1&q;for(S=N=0;4>S;++S)M=M>>1|(j=(x=re(l,A,x=j+(1&M),p.Sc,L,h,b))>L)<<7,N=N<<2|(3<x?3:1<x?2:0!=h[b+0]),b+=16;M>>=4,q=q>>1|j<<7,w=(w<<8|N)>>>0}for(A=M,L=q>>4,y=0;4>y;y+=2){for(N=0,M=c.la>>4+y,q=m.la>>4+y,k=0;2>k;++k){for(j=1&q,S=0;2>S;++S)M=M>>1|(j=0<(x=re(l,d[2],x=j+(1&M),p.Qc,0,h,b)))<<3,N=N<<2|(3<x?3:1<x?2:0!=h[b+0]),b+=16;M>>=2,q=q>>1|j<<5}g|=N<<4*y,A|=M<<4<<y,L|=(240&q)<<y}c.la=A,m.la=L,v.Hc=w,v.Gc=g,v.ia=43690&g?0:p.ia,d=!(w|g)}if(0<u.L&&(u.wa[u.Y+u.ja]=u.gd[o.$b][o.Za],u.wa[u.Y+u.ja].La|=!d),f.Ka)return Jt(t,7,"Premature end-of-file encountered.")}if(Xt(t),u=r,f=1,o=(a=t).D,c=0<a.L&&a.M>=a.zb&&a.M<=a.Va,0==a.Aa)i:{if(o.M=a.M,o.uc=c,Pr(a,o),f=1,o=(N=a.D).Nb,c=(g=Te[a.L])*a.R,d=a.sa,v=a.ta-c+(k=16*o*a.R),p=a.qa,h=a.ra-(l=g/2*a.B)+(S=8*o*a.B),b=a.Ha,m=a.Ia-l+S,q=0==(M=N.M),w=M>=a.Va-1,2==a.Aa&&Pr(a,N),N.uc)for(j=(x=a).D.M,i(x.D.uc),N=x.yb;N<x.Hb;++N){A=j;var F=(P=(U=x).D).Nb,P=P.wa[P.Y+(L=N)],I=U.sa,R=U.ta+16*F*(y=U.R)+16*L,O=P.dd,C=P.tc;if(0!=C)if(i(3<=C),1==U.L)0<L&&gn(I,R,y,C+4),P.La&&yn(I,R,y,C),0<A&&wn(I,R,y,C+4),P.La&&kn(I,R,y,C);else{var T=U.B,B=U.qa,D=U.ra+8*F*T+8*L,z=U.Ha,U=U.Ia+8*F*T+8*L;F=P.ld,0<L&&(hn(I,R,y,C+4,O,F),dn(B,D,z,U,T,C+4,O,F)),P.La&&(pn(I,R,y,C,O,F),mn(B,D,z,U,T,C,O,F)),0<A&&(cn(I,R,y,C+4,O,F),ln(B,D,z,U,T,C+4,O,F)),P.La&&(vn(I,R,y,C,O,F),bn(B,D,z,U,T,C,O,F))}}if(a.ia&&alert("todo:DitherRow"),null!=u.put){if(N=16*M,M=16*(M+1),q?(u.y=a.sa,u.O=a.ta+k,u.f=a.qa,u.N=a.ra+S,u.ea=a.Ha,u.W=a.Ia+S):(N-=g,u.y=d,u.O=v,u.f=p,u.N=h,u.ea=b,u.W=m),w||(M-=g),M>u.o&&(M=u.o),u.F=null,u.J=null,null!=a.Fa&&0<a.Fa.length&&N<M&&(u.J=cr(a,u,N,M-N),u.F=a.mb,null==u.F&&0==u.F.length)){f=Jt(a,3,"Could not decode alpha data.");break i}N<u.j&&(g=u.j-N,N=u.j,i(!(1&g)),u.O+=a.R*g,u.N+=a.B*(g>>1),u.W+=a.B*(g>>1),null!=u.F&&(u.J+=u.width*g)),N<M&&(u.O+=u.v,u.N+=u.v>>1,u.W+=u.v>>1,null!=u.F&&(u.J+=u.v),u.ka=N-u.j,u.U=u.va-u.v,u.T=M-N,f=u.put(u))}o+1!=a.Ic||w||(n(a.sa,a.ta-c,d,v+16*a.R,c),n(a.qa,a.ra-l,p,h+8*a.B,l),n(a.Ha,a.Ia-l,b,m+8*a.B,l))}if(!f)return Jt(t,6,"Output aborted.")}return 1}(t,r)),null!=r.bc&&r.bc(r),a&=1}return a?(t.cb=0,a):0})(t,u)||(r=t.a)}}else r=t.a}0==r&&null!=h.Oa&&h.Oa.fd&&(r=Or(h.ba))}h=r}c=0!=h?null:11>c?l.f.RGBA.eb:l.f.kb.y}else c=null;return c};var De=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function f(t,i){for(var r="",n=0;n<4;n++)r+=String.fromCharCode(t[i++]);return r}function c(t,i){return t[i+0]|t[i+1]<<8}function h(t,i){return(t[i+0]|t[i+1]<<8|t[i+2]<<16)>>>0}function l(t,i){return(t[i+0]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}new u;var d=[0],v=[0],p=[],b=new u,m=t,w=function(t,i){var r={},n=0,e=!1,s=0,o=0;if(r.frames=[],!
176
+ /** @license
177
+ * Copyright (c) 2017 Dominik Homberger
178
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
179
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
180
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
181
+ https://webpjs.appspot.com
182
+ WebPRiffParser dominikhlbg@gmail.com
183
+ */
184
+ function(t,i){for(var r=0;r<4;r++)if(t[i+r]!="RIFF".charCodeAt(r))return!0;return!1}(t,i)){for(l(t,i+=4),i+=8;i<t.length;){var a=f(t,i),u=l(t,i+=4);i+=4;var d=u+(1&u);switch(a){case"VP8 ":case"VP8L":void 0===r.frames[n]&&(r.frames[n]={}),(b=r.frames[n]).src_off=e?o:i-8,b.src_size=s+u+8,n++,e&&(e=!1,s=0,o=0);break;case"VP8X":(b=r.header={}).feature_flags=t[i];var v=i+4;b.canvas_width=1+h(t,v),b.canvas_height=1+h(t,v+=3),v+=3;break;case"ALPH":e=!0,s=d+8,o=i-8;break;case"ANIM":(b=r.header).bgcolor=l(t,i),b.loop_count=c(t,v=i+4),v+=2;break;case"ANMF":var p,b;(b=r.frames[n]={}).offset_x=2*h(t,i),b.offset_y=2*h(t,i+=3),b.width=1+h(t,i+=3),b.height=1+h(t,i+=3),b.duration=h(t,i+=3),i+=3,p=t[i++],b.dispose=1&p,b.blend=p>>1&1}"ANMF"!=a&&(i+=d)}return r}}(m,0);w.response=m,w.rgbaoutput=!0,w.dataurl=!1;var g=w.header?w.header:null,k=w.frames?w.frames:null;g&&(g.loop_counter=g.loop_count,d=[g.canvas_height],v=[g.canvas_width]);var y=k[0],N=b.WebPDecodeRGBA(m,y.src_off,y.src_size,v,d);y.rgba=N,y.imgwidth=v[0],y.imgheight=d[0];for(var L=0;L<v[0]*d[0]*4;L++)p[L]=N[L];return this.width=v,this.height=d,this.data=p,this}
185
+ /** ====================================================================
186
+ * @license
187
+ * jsPDF XMP metadata plugin
188
+ * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
189
+ *
190
+ * Permission is hereby granted, free of charge, to any person obtaining
191
+ * a copy of this software and associated documentation files (the
192
+ * "Software"), to deal in the Software without restriction, including
193
+ * without limitation the rights to use, copy, modify, merge, publish,
194
+ * distribute, sublicense, and/or sell copies of the Software, and to
195
+ * permit persons to whom the Software is furnished to do so, subject to
196
+ * the following conditions:
197
+ *
198
+ * The above copyright notice and this permission notice shall be
199
+ * included in all copies or substantial portions of the Software.
200
+ *
201
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
202
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
203
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
204
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
205
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
206
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
207
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
208
+ * ====================================================================
209
+ */function Fe(){var t,i=unescape(encodeURIComponent(this.internal.__metadata__.metadata));t=this.internal.__metadata__.rawXml?i:'<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>'+i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function Pe(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}!function(){var t,i,r,n,e,s,o,a,u,f=function(t){return this.isStrokeTransparent=(t=t||{}).isStrokeTransparent||!1,this.strokeOpacity=t.strokeOpacity||1,this.strokeStyle=t.strokeStyle||"#000000",this.fillStyle=t.fillStyle||"#000000",this.isFillTransparent=t.isFillTransparent||!1,this.fillOpacity=t.fillOpacity||1,this.font=t.font||"10px sans-serif",this.textBaseline=t.textBaseline||"alphabetic",this.textAlign=t.textAlign||"left",this.lineWidth=t.lineWidth||1,this.lineJoin=t.lineJoin||"miter",this.lineCap=t.lineCap||"butt",this.path=t.path||[],this.transform=void 0!==t.transform?t.transform.clone():new a,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new s,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new s,this.lineDashOffset=t.lineDashOffset||0,this.lineDash=t.lineDash||[],this.margin=t.margin||[0,0,0,0],this.prevPageLastElemOffset=t.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this};an.API.events.push(["initialized",function(){this.context2d=new c(this),t=this.internal.f2,i=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,e=this.internal.getVerticalCoordinate,s=this.internal.Point,o=this.internal.Rectangle,a=this.internal.Matrix,u=new f}]);var c=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var i=t;Object.defineProperty(this,"pdf",{get:function(){return i}});var r=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return r},set:function(t){r=!!t}});var n=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return n},set:function(t){n=!!t}});var e=0;Object.defineProperty(this,"posX",{get:function(){return e},set:function(t){isNaN(t)||(e=t)}});var s=0;Object.defineProperty(this,"posY",{get:function(){return s},set:function(t){isNaN(t)||(s=t)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(t){var i;"number"==typeof t?i=[t,t,t,t]:((i=[,,,,])[0]=t[0],i[1]=t.length>=2?t[1]:i[0],i[2]=t.length>=3?t[2]:i[0],i[3]=t.length>=4?t[3]:i[1]),u.margin=i}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(t){o=t}});var a=0;Object.defineProperty(this,"lastBreak",{get:function(){return a},set:function(t){a=t}});var c=[];Object.defineProperty(this,"pageBreaks",{get:function(){return c},set:function(t){c=t}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(t){t instanceof f&&(u=t)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(t){u.path=t}});var l=[];Object.defineProperty(this,"ctxStack",{get:function(){return l},set:function(t){l=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var i;i=h(t),this.ctx.fillStyle=i.style,this.ctx.isFillTransparent=0===i.a,this.ctx.fillOpacity=i.a,this.pdf.setFillColor(i.r,i.g,i.b,{a:i.a}),this.pdf.setTextColor(i.r,i.g,i.b,{a:i.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var i=h(t);this.ctx.strokeStyle=i.style,this.ctx.isStrokeTransparent=0===i.a,this.ctx.strokeOpacity=i.a,0===i.a?this.pdf.setDrawColor(255,255,255):this.pdf.setDrawColor(i.r,i.g,i.b)}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}});var d=null,v=null,p=null;Object.defineProperty(this,"fontFaces",{get:function(){return p},set:function(t){d=null,v=null,p=t}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var i;if(this.ctx.font=t,null!==(i=/^\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(t))){var r=i[1],n=i[3],e=i[4],s=i[6],o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(e)[2];e=Math.floor("px"===o?parseFloat(e)*this.pdf.internal.scaleFactor:"em"===o?parseFloat(e)*this.pdf.getFontSize():parseFloat(e)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(e);var a=function(t){var i,r,n=[],e=t.trim();if(""===e)return ve;if(e in ee)return[ee[e]];for(;""!==e;){switch(r=null,i=(e=oe(e)).charAt(0)){case'"':case"'":r=ae(e.substring(1),i);break;default:r=ue(e)}if(null===r)return ve;if(n.push(r[0]),""!==(e=oe(r[1]))&&","!==e.charAt(0))return ve;e=e.replace(/^,/,"")}return n}(s);if(this.fontFaces){var u=function(t,i){var r=t.getFontList(),n=JSON.stringify(r);if(null===d||v!==n){var e=function(t){var i=[];return Object.keys(t).forEach((function(r){t[r].forEach((function(t){var n=null;switch(t){case"bold":n={family:r,weight:"bold"};break;case"italic":n={family:r,style:"italic"};break;case"bolditalic":n={family:r,weight:"bold",style:"italic"};break;case"":case"normal":n={family:r}}null!==n&&(n.ref={name:r,style:t},i.push(n))}))})),i}(r);d=function(t){for(var i={},r=0;r<t.length;++r){var n=ie(t[r]),e=n.family,s=n.stretch,o=n.style,a=n.weight;i[e]=i[e]||{},i[e][s]=i[e][s]||{},i[e][s][o]=i[e][s][o]||{},i[e][s][o][a]=n}return i}(e.concat(i)),v=n}return d}(this.pdf,this.fontFaces),f=a.map((function(t){return{family:t,stretch:"normal",weight:n,style:r}})),c=function(t,i,r){for(var n=(r=r||{}).defaultFontFamily||"times",e=Object.assign({},ne,r.genericFontFamilies||{}),s=null,o=null,a=0;a<i.length;++a)if(e[(s=ie(i[a])).family]&&(s.family=e[s.family]),t.hasOwnProperty(s.family)){o=t[s.family];break}if(!(o=o||t[n]))throw Error("Could not find a font-family for the rule '"+se(s)+"' and default family '"+n+"'.");if(o=function(t,i){if(i[t])return i[t];var r=Xn[t],n=re(i,Yn,r,r<=Xn.normal?-1:1);if(!n)throw Error("Could not find a matching font-stretch value for "+t);return n}(s.stretch,o),o=function(t,i){if(i[t])return i[t];for(var r=Zn[t],n=0;n<r.length;++n)if(i[r[n]])return i[r[n]];throw Error("Could not find a matching font-style for "+t)}(s.style,o),!(o=function(t,i){if(i[t])return i[t];if(400===t&&i[500])return i[500];if(500===t&&i[400])return i[400];var r=re(i,Qn,te[t],t<400?-1:1);if(!r)throw Error("Could not find a matching font-weight for value "+t);return r}(s.weight,o)))throw Error("Failed to resolve a font for the rule '"+se(s)+"'.");return o}(u,f);this.pdf.setFont(c.ref.name,c.ref.style)}else{var h="";("bold"===n||parseInt(n,10)>=700||"bold"===r)&&(h="bold"),"italic"===r&&(h+="italic"),0===h.length&&(h="normal");for(var l="",p={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"},b=0;b<a.length;b++){if(void 0!==this.pdf.internal.getFont(a[b],h,{noFallback:!0,disableWarning:!0})){l=a[b];break}if("bolditalic"===h&&void 0!==this.pdf.internal.getFont(a[b],"bold",{noFallback:!0,disableWarning:!0}))l=a[b],h="bold";else if(void 0!==this.pdf.internal.getFont(a[b],"normal",{noFallback:!0,disableWarning:!0})){l=a[b],h="normal";break}}if(""===l)for(var m=0;m<a.length;m++)if(p[a[m]]){l=p[a[m]];break}this.pdf.setFont(l=""===l?"Times":l,h)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(t){this.ctx.globalCompositeOperation=t}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(t){this.ctx.globalAlpha=t}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(t){this.ctx.lineDashOffset=t,C.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,C.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=!!t}})};c.prototype.setLineDash=function(t){this.lineDash=t},c.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},c.prototype.fill=function(){g.call(this,"fill",!1)},c.prototype.stroke=function(){g.call(this,"stroke",!1)},c.prototype.beginPath=function(){this.path=[{type:"begin"}]},c.prototype.moveTo=function(t,i){if(isNaN(t)||isNaN(i))throw qr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new s(t,i));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new s(t,i)},c.prototype.closePath=function(){var t=new s(0,0),i=0;for(i=this.path.length-1;-1!==i;i--)if("begin"===this.path[i].type&&"object"===G(this.path[i+1])&&"number"==typeof this.path[i+1].x){t=new s(this.path[i+1].x,this.path[i+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(t.x,t.y)},c.prototype.lineTo=function(t,i){if(isNaN(t)||isNaN(i))throw qr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new s(t,i));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new s(r.x,r.y)},c.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),g.call(this,null,!0)},c.prototype.quadraticCurveTo=function(t,i,r,n){if(isNaN(r)||isNaN(n)||isNaN(t)||isNaN(i))throw qr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var e=this.ctx.transform.applyToPoint(new s(r,n)),o=this.ctx.transform.applyToPoint(new s(t,i));this.path.push({type:"qct",x1:o.x,y1:o.y,x:e.x,y:e.y}),this.ctx.lastPoint=new s(e.x,e.y)},c.prototype.bezierCurveTo=function(t,i,r,n,e,o){if(isNaN(e)||isNaN(o)||isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n))throw qr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var a=this.ctx.transform.applyToPoint(new s(e,o)),u=this.ctx.transform.applyToPoint(new s(t,i)),f=this.ctx.transform.applyToPoint(new s(r,n));this.path.push({type:"bct",x1:u.x,y1:u.y,x2:f.x,y2:f.y,x:a.x,y:a.y}),this.ctx.lastPoint=new s(a.x,a.y)},c.prototype.arc=function(t,i,r,n,e,o){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n)||isNaN(e))throw qr.error("jsPDF.context2d.arc: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.arc");if(o=!!o,!this.ctx.transform.isIdentity){var a=this.ctx.transform.applyToPoint(new s(t,i));t=a.x,i=a.y;var u=this.ctx.transform.applyToPoint(new s(0,r)),f=this.ctx.transform.applyToPoint(new s(0,0));r=Math.sqrt(Math.pow(u.x-f.x,2)+Math.pow(u.y-f.y,2))}Math.abs(e-n)>=2*Math.PI&&(n=0,e=2*Math.PI),this.path.push({type:"arc",x:t,y:i,radius:r,startAngle:n,endAngle:e,counterclockwise:o})},c.prototype.arcTo=function(){throw Error("arcTo not implemented.")},c.prototype.rect=function(t,i,r,n){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n))throw qr.error("jsPDF.context2d.rect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,i),this.lineTo(t+r,i),this.lineTo(t+r,i+n),this.lineTo(t,i+n),this.lineTo(t,i),this.lineTo(t+r,i),this.lineTo(t,i)},c.prototype.fillRect=function(t,i,r,n){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n))throw qr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!l.call(this)){var e={};"butt"!==this.lineCap&&(e.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(e.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,i,r,n),this.fill(),e.hasOwnProperty("lineCap")&&(this.lineCap=e.lineCap),e.hasOwnProperty("lineJoin")&&(this.lineJoin=e.lineJoin)}},c.prototype.strokeRect=function(t,i,r,n){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n))throw qr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.strokeRect");d.call(this)||(this.beginPath(),this.rect(t,i,r,n),this.stroke())},c.prototype.clearRect=function(t,i,r,n){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n))throw qr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,i,r,n))},c.prototype.save=function(t){t="boolean"!=typeof t||t;for(var i=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("q");if(this.pdf.setPage(i),t){this.ctx.fontSize=this.pdf.internal.getFontSize();var n=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},c.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var i=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("Q");this.pdf.setPage(i),t&&0!==this.ctxStack.length&&(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)},c.prototype.toDataURL=function(){throw Error("toDataUrl not implemented.")};var h=function(t){var i,r,n,e;if(!0===t.isCanvasGradient&&(t=t.getColor()),!t)return{r:0,g:0,b:0,a:0,style:t};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t))i=0,r=0,n=0,e=0;else{var s=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==s)i=parseInt(s[1]),r=parseInt(s[2]),n=parseInt(s[3]),e=1;else if(null!==(s=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t)))i=parseInt(s[1]),r=parseInt(s[2]),n=parseInt(s[3]),e=parseFloat(s[4]);else{if(e=1,"string"==typeof t&&"#"!==t.charAt(0)){var o=new Rr(t);t=o.ok?o.toHex():"#000000"}4===t.length?(i=t.substring(1,2),i+=i,r=t.substring(2,3),r+=r,n=t.substring(3,4),n+=n):(i=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7)),i=parseInt(i,16),r=parseInt(r,16),n=parseInt(n,16)}}return{r:i,g:r,b:n,a:e,style:t}},l=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},d=function(){return!(!this.ctx.isStrokeTransparent&&0!=this.globalAlpha)};c.prototype.fillText=function(t,i,r,n){if(isNaN(i)||isNaN(r)||"string"!=typeof t)throw qr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!l.call(this)){var e=I(this.ctx.transform.rotation);M.call(this,{text:t,x:i,y:r,scale:this.ctx.transform.scaleX,angle:e,align:this.textAlign,maxWidth:n})}},c.prototype.strokeText=function(t,i,r,n){if(isNaN(i)||isNaN(r)||"string"!=typeof t)throw qr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!d.call(this)){n=isNaN(n)?void 0:n;var e=I(this.ctx.transform.rotation);M.call(this,{text:t,x:i,y:r,scale:this.ctx.transform.scaleX,renderingMode:"stroke",angle:e,align:this.textAlign,maxWidth:n})}},c.prototype.measureText=function(t){if("string"!=typeof t)throw qr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.measureText");var i=this.pdf,r=this.pdf.internal.scaleFactor,n=i.internal.getFontSize(),e=i.getStringUnitWidth(t)*n/i.internal.scaleFactor;return new function(t){var i=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return i}}),this}({width:e*=Math.round(96*r/72*1e4)/1e4})},c.prototype.scale=function(t,i){if(isNaN(t)||isNaN(i))throw qr.error("jsPDF.context2d.scale: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.scale");var r=new a(t,0,0,i,0,0);this.ctx.transform=this.ctx.transform.multiply(r)},c.prototype.rotate=function(t){if(isNaN(t))throw qr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.rotate");var i=new a(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(i)},c.prototype.translate=function(t,i){if(isNaN(t)||isNaN(i))throw qr.error("jsPDF.context2d.translate: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.translate");var r=new a(1,0,0,1,t,i);this.ctx.transform=this.ctx.transform.multiply(r)},c.prototype.transform=function(t,i,r,n,e,s){if(isNaN(t)||isNaN(i)||isNaN(r)||isNaN(n)||isNaN(e)||isNaN(s))throw qr.error("jsPDF.context2d.transform: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.transform");var o=new a(t,i,r,n,e,s);this.ctx.transform=this.ctx.transform.multiply(o)},c.prototype.setTransform=function(t,i,r,n,e,s){this.ctx.transform=new a(t=isNaN(t)?1:t,i=isNaN(i)?0:i,r=isNaN(r)?0:r,n=isNaN(n)?1:n,e=isNaN(e)?0:e,s=isNaN(s)?0:s)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};c.prototype.drawImage=function(t,i,r,n,e,s,u,f,c){var h=this.pdf.getImageProperties(t),l=1,d=1,b=1,g=1;void 0!==n&&void 0!==f&&(b=f/n,g=c/e,l=h.width/n*f/n,d=h.height/e*c/e),void 0===s&&(s=i,u=r,i=0,r=0),void 0!==n&&void 0===f&&(f=n,c=e),void 0===n&&void 0===f&&(f=h.width,c=h.height);var y=this.ctx.transform.decompose(),N=I(y.rotate.shx),L=new a,A=(L=(L=(L=L.multiply(y.translate)).multiply(y.skew)).multiply(y.scale)).applyToRectangle(new o(s-i*b,u-r*g,n*l,e*d));if(this.autoPaging){for(var x,S=p.call(this,A),M=[],E=0;E<S.length;E+=1)-1===M.indexOf(S[E])&&M.push(S[E]);w(M);for(var q=M[0],j=M[M.length-1],F=q;F<j+1;F++){this.pdf.setPage(F);var P=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],R=1===F?this.posY+this.margin[0]:this.margin[0],O=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],C=1===F?0:this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2]+(F-2)*O;if(0!==this.ctx.clip_path.length){var T=this.path;x=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=m(x,this.posX+this.margin[3],-C+R+this.ctx.prevPageLastElemOffset),k.call(this,"fill",!0),this.path=T}var B=JSON.parse(JSON.stringify(A));B=m([B],this.posX+this.margin[3],-C+R+this.ctx.prevPageLastElemOffset)[0];var D=(F>q||F<j)&&v.call(this);D&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],P,O,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",B.x,B.y,B.w,B.h,null,null,N),D&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(t,"JPEG",A.x,A.y,A.w,A.h,null,null,N)};var p=function(t,i,r){var n=[];r=r||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var e=this.posY+this.ctx.prevPageLastElemOffset;switch(t.type){default:case"mt":case"lt":n.push(Math.floor((t.y+e)/r)+1);break;case"arc":n.push(Math.floor((t.y+e-t.radius)/r)+1),n.push(Math.floor((t.y+e+t.radius)/r)+1);break;case"qct":var s=R(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);n.push(Math.floor((s.y+e)/r)+1),n.push(Math.floor((s.y+s.h+e)/r)+1);break;case"bct":var o=O(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);n.push(Math.floor((o.y+e)/r)+1),n.push(Math.floor((o.y+o.h+e)/r)+1);break;case"rect":n.push(Math.floor((t.y+e)/r)+1),n.push(Math.floor((t.y+t.h+e)/r)+1)}for(var a=0;a<n.length;a+=1)for(;this.pdf.internal.getNumberOfPages()<n[a];)b.call(this);return n},b=function(){var t=this.fillStyle,i=this.strokeStyle,r=this.font,n=this.lineCap,e=this.lineWidth,s=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=i,this.font=r,this.lineCap=n,this.lineWidth=e,this.lineJoin=s},m=function(t,i,r){for(var n=0;n<t.length;n++)switch(t[n].type){case"bct":t[n].x2+=i,t[n].y2+=r;case"qct":t[n].x1+=i,t[n].y1+=r;default:t[n].x+=i,t[n].y+=r}return t},w=function(t){return t.sort((function(t,i){return t-i}))},g=function(t,i){var r=this.fillStyle,n=this.strokeStyle,e=this.lineCap,s=this.lineWidth,o=Math.abs(s*this.ctx.transform.scaleX),a=this.lineJoin;if(this.autoPaging){for(var u,f,c=JSON.parse(JSON.stringify(this.path)),h=JSON.parse(JSON.stringify(this.path)),l=[],d=0;d<h.length;d++)if(void 0!==h[d].x)for(var g=p.call(this,h[d]),y=0;y<g.length;y+=1)-1===l.indexOf(g[y])&&l.push(g[y]);for(var N=0;N<l.length;N++)for(;this.pdf.internal.getNumberOfPages()<l[N];)b.call(this);w(l);for(var L=l[0],A=l[l.length-1],x=L;x<A+1;x++){this.pdf.setPage(x),this.fillStyle=r,this.strokeStyle=n,this.lineCap=e,this.lineWidth=o,this.lineJoin=a;var S=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],M=1===x?this.posY+this.margin[0]:this.margin[0],E=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],q=1===x?0:this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2]+(x-2)*E;if(0!==this.ctx.clip_path.length){var j=this.path;u=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=m(u,this.posX+this.margin[3],-q+M+this.ctx.prevPageLastElemOffset),k.call(this,t,!0),this.path=j}if(f=JSON.parse(JSON.stringify(c)),this.path=m(f,this.posX+this.margin[3],-q+M+this.ctx.prevPageLastElemOffset),!1===i||0===x){var F=(x>L||x<A)&&v.call(this);F&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],S,E,null).clip().discardPath()),k.call(this,t,i),F&&this.pdf.restoreGraphicsState()}this.lineWidth=s}this.path=c}else this.lineWidth=o,k.call(this,t,i),this.lineWidth=s},k=function(t,i){if(("stroke"!==t||i||!d.call(this))&&("stroke"===t||i||!l.call(this))){for(var r,n,e=[],s=this.path,o=0;o<s.length;o++){var a=s[o];switch(a.type){case"begin":e.push({begin:!0});break;case"close":e.push({close:!0});break;case"mt":e.push({start:a,deltas:[],abs:[]});break;case"lt":var u=e.length;if(s[o-1]&&!isNaN(s[o-1].x)&&(r=[a.x-s[o-1].x,a.y-s[o-1].y],u>0))for(;u>=0;u--)if(!0!==e[u-1].close&&!0!==e[u-1].begin){e[u-1].deltas.push(r),e[u-1].abs.push(a);break}break;case"bct":e[e.length-1].deltas.push(r=[a.x1-s[o-1].x,a.y1-s[o-1].y,a.x2-s[o-1].x,a.y2-s[o-1].y,a.x-s[o-1].x,a.y-s[o-1].y]);break;case"qct":e[e.length-1].deltas.push(r=[s[o-1].x+2/3*(a.x1-s[o-1].x)-s[o-1].x,s[o-1].y+2/3*(a.y1-s[o-1].y)-s[o-1].y,a.x+2/3*(a.x1-a.x)-s[o-1].x,a.y+2/3*(a.y1-a.y)-s[o-1].y,a.x-s[o-1].x,a.y-s[o-1].y]);break;case"arc":e.push({deltas:[],abs:[],arc:!0}),Array.isArray(e[e.length-1].abs)&&e[e.length-1].abs.push(a)}}n=i?null:"stroke"===t?"stroke":"fill";for(var f=!1,c=0;c<e.length;c++)if(e[c].arc)for(var h=e[c].abs,v=0;v<h.length;v++){var p=h[v];"arc"===p.type?L.call(this,p.x,p.y,p.radius,p.startAngle,p.endAngle,p.counterclockwise,void 0,i,!f):E.call(this,p.x,p.y),f=!0}else!0===e[c].close?(this.pdf.internal.out("h"),f=!1):!0!==e[c].begin&&(q.call(this,e[c].deltas,e[c].start.x,e[c].start.y),f=!0);n&&A.call(this,n),i&&x.call(this)}},y=function(t){var i=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,r=i*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-r;case"top":return t+i-r;case"hanging":return t+i-2*r;case"middle":return t+i/2-r;default:return t}},N=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};c.prototype.createLinearGradient=function(){var t=function(){};return t.colorStops=[],t.addColorStop=function(t,i){this.colorStops.push([t,i])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},c.prototype.createPattern=function(){return this.createLinearGradient()},c.prototype.createRadialGradient=function(){return this.createLinearGradient()};var L=function(t,i,r,n,e,s,o,a,u){for(var f=F.call(this,r,n,e,s),c=0;c<f.length;c++){var h=f[c];0===c&&(u?S.call(this,h.x1+t,h.y1+i):E.call(this,h.x1+t,h.y1+i)),j.call(this,t,i,h.x2,h.y2,h.x3,h.y3,h.x4,h.y4)}a?x.call(this):A.call(this,o)},A=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},x=function(){this.pdf.clip(),this.pdf.discardPath()},S=function(t,n){this.pdf.internal.out(i(t)+" "+r(n)+" m")},M=function(t){var i;switch(t.align){case"right":case"end":i="right";break;case"center":i="center";break;default:i="left"}var r,n,e,u=this.pdf.getTextDimensions(t.text),f=y.call(this,t.y),c=N.call(this,f)-u.h,h=this.ctx.transform.applyToPoint(new s(t.x,f));if(this.autoPaging){var l=this.ctx.transform.decompose(),d=new a;d=(d=(d=d.multiply(l.translate)).multiply(l.skew)).multiply(l.scale);for(var b=this.ctx.transform.applyToRectangle(new o(t.x,f,u.w,u.h)),g=d.applyToRectangle(new o(t.x,c,u.w,u.h)),L=p.call(this,g),A=[],x=0;x<L.length;x+=1)-1===A.indexOf(L[x])&&A.push(L[x]);w(A);for(var S=A[0],M=A[A.length-1],E=S;E<M+1;E++){this.pdf.setPage(E);var q=1===E?this.posY+this.margin[0]:this.margin[0],j=this.pdf.internal.pageSize.height-this.margin[2],F=j-this.margin[0],P=this.pdf.internal.pageSize.width-this.margin[1],I=P-this.margin[3],R=1===E?0:this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2]+(E-2)*F;if(0!==this.ctx.clip_path.length){var O=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=m(r,this.posX+this.margin[3],-1*R+q),k.call(this,"fill",!0),this.path=O}var C=m([JSON.parse(JSON.stringify(g))],this.posX+this.margin[3],-R+q+this.ctx.prevPageLastElemOffset)[0];t.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),this.lineWidth=(e=this.lineWidth)*t.scale);var T="text"!==this.autoPaging;if(T||C.y+C.h<=j){if(T||C.y>=q&&C.x<=P){var B=T?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||P-C.x)[0],D=m([JSON.parse(JSON.stringify(b))],this.posX+this.margin[3],-R+q+this.ctx.prevPageLastElemOffset)[0],z=T&&(E>S||E<M)&&v.call(this);z&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],I,F,null).clip().discardPath()),this.pdf.text(B,D.x,D.y,{angle:t.angle,align:i,renderingMode:t.renderingMode}),z&&this.pdf.restoreGraphicsState()}}else C.y<j&&(this.ctx.prevPageLastElemOffset+=j-C.y);t.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=e)}}else t.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),this.lineWidth=(e=this.lineWidth)*t.scale),this.pdf.text(t.text,h.x+this.posX,h.y+this.posY,{angle:t.angle,align:i,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=e)},E=function(t,n,e,s){s=s||0,this.pdf.internal.out(i(t+(e=e||0))+" "+r(n+s)+" l")},q=function(t,i,r){return this.pdf.lines(t,i,r,null,null)},j=function(i,r,s,o,a,u,f,c){this.pdf.internal.out([t(n(s+i)),t(e(o+r)),t(n(a+i)),t(e(u+r)),t(n(f+i)),t(e(c+r)),"c"].join(" "))},F=function(t,i,r,n){for(var e=2*Math.PI,s=Math.PI/2;i>r;)i-=e;var o=Math.abs(r-i);o<e&&n&&(o=e-o);for(var a=[],u=n?-1:1,f=i;o>1e-5;){var c=f+u*Math.min(o,s);a.push(P.call(this,t,f,c)),o-=Math.abs(c-f),f=c}return a},P=function(t,i,r){var n=(r-i)/2,e=t*Math.cos(n),s=t*Math.sin(n),o=e,a=-s,u=o*o+a*a,f=u+o*e+a*s,c=4/3*(Math.sqrt(2*u*f)-f)/(o*s-a*e),h=o-c*a,l=a+c*o,d=h,v=-l,p=n+i,b=Math.cos(p),m=Math.sin(p);return{x1:t*Math.cos(i),y1:t*Math.sin(i),x2:h*b-l*m,y2:h*m+l*b,x3:d*b-v*m,y3:d*m+v*b,x4:t*Math.cos(r),y4:t*Math.sin(r)}},I=function(t){return 180*t/Math.PI},R=function(t,i,r,n,e,s){var a=t+.5*(r-t),u=i+.5*(n-i),f=e+.5*(r-e),c=s+.5*(n-s),h=Math.min(t,e,a,f),l=Math.max(t,e,a,f),d=Math.min(i,s,u,c);return new o(h,d,l-h,Math.max(i,s,u,c)-d)},O=function(t,i,r,n,e,s,a,u){var f,c,h,l,d,v,p,b,m,w,g,k,y,N,L=r-t,A=n-i,x=e-r,S=s-n,M=a-e,E=u-s;for(c=0;c<41;c++)m=(p=(h=t+(f=c/40)*L)+f*((d=r+f*x)-h))+f*(d+f*(e+f*M-d)-p),w=(b=(l=i+f*A)+f*((v=n+f*S)-l))+f*(v+f*(s+f*E-v)-b),0==c?(g=m,k=w,y=m,N=w):(g=Math.min(g,m),k=Math.min(k,w),y=Math.max(y,m),N=Math.max(N,w));return new o(Math.round(g),Math.round(k),Math.round(y-g),Math.round(N-k))},C=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var t=JSON.stringify({lineDash:this.ctx.lineDash,lineDashOffset:this.ctx.lineDashOffset});this.prevLineDash!==t&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=t)}}}(),
210
+ /**
211
+ * @license
212
+ * jsPDF filters PlugIn
213
+ * Copyright (c) 2014 Aras Abbasi
214
+ *
215
+ * Licensed under the MIT License.
216
+ * http://opensource.org/licenses/mit-license
217
+ */
218
+ function(){var t=function(t){var i,r,n,e,s,o,a,u,f,c;for(r=[],n=0,e=(t+=i="\0\0\0\0".slice(t.length%4||4)).length;e>n;n+=4)0!==(s=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(o=(s=((s=((s=((s=(s-(c=s%85))/85)-(f=s%85))/85)-(u=s%85))/85)-(a=s%85))/85)%85,r.push(o+33,a+33,u+33,f+33,c+33)):r.push(122);return function(t,i){for(var r=i;r>0;r--)t.pop()}(r,i.length),String.fromCharCode.apply(String,r)+"~>"},i=function(t){var i,r,n,e,s,o=String,a="length",u=255,f="charCodeAt",c="slice",h="replace";for(t[c](-2),t=t[c](0,-2)[h](/\s/g,"")[h]("z","!!!!!"),n=[],e=0,s=(t+=i="uuuuu"[c](t[a]%5||5))[a];s>e;e+=5)r=52200625*(t[f](e)-33)+614125*(t[f](e+1)-33)+7225*(t[f](e+2)-33)+85*(t[f](e+3)-33)+(t[f](e+4)-33),n.push(u&r>>24,u&r>>16,u&r>>8,u&r);return function(t,i){for(var r=i;r>0;r--)t.pop()}(n,i[a]),o.fromCharCode.apply(o,n)},r=function(t){return t.split("").map((function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)})).join("")+">"},n=function(t){var i=RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===i.test(t))return"";for(var r="",n=0;n<t.length;n+=2)r+=String.fromCharCode("0x"+(t[n]+t[n+1]));return r},e=function(t){for(var i=new Uint8Array(t.length),r=t.length;r--;)i[r]=t.charCodeAt(r);return(i=At(i)).reduce((function(t,i){return t+String.fromCharCode(i)}),"")};an.API.processDataByFilters=function(s,o){var a=0,u=s||"",f=[];for("string"==typeof(o=o||[])&&(o=[o]),a=0;a<o.length;a+=1)switch(o[a]){case"ASCII85Decode":case"/ASCII85Decode":u=i(u),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=t(u),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=n(u),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=r(u),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=e(u),f.push("/FlateDecode");break;default:throw Error('The filter: "'+o[a]+'" is not implemented')}return{data:u,reverseChain:f.reverse().join(" ")}}}(),
219
+ /**
220
+ * @license
221
+ * jsPDF fileloading PlugIn
222
+ * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
223
+ *
224
+ * Licensed under the MIT License.
225
+ * http://opensource.org/licenses/mit-license
226
+ */
227
+ function(t){t.loadFile=function(t,i,r){return function(t,i,r){i=!1!==i,r="function"==typeof r?r:function(){};var n=void 0;try{n=function(t,i,r){var n=new XMLHttpRequest,e=0,s=function(t){var i=t.length,r=[],n=String.fromCharCode;for(e=0;e<i;e+=1)r.push(n(255&t.charCodeAt(e)));return r.join("")};if(n.open("GET",t,!i),n.overrideMimeType("text/plain; charset=x-user-defined"),!1===i&&(n.onload=function(){r(200===n.status?s(this.responseText):void 0)}),n.send(null),i&&200===n.status)return s(n.responseText)}(t,i,r)}catch(t){}return n}(t,i,r)},t.allowFsRead=void 0,t.loadImageFile=t.loadFile}(an.API),function(t){function i(){return(Mr.html2canvas?Promise.resolve(Mr.html2canvas):import("./p-DzTdZECU.js").then((function(t){return t.h}))).catch((function(t){return Promise.reject(Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function r(){return(Mr.DOMPurify?Promise.resolve(Mr.DOMPurify):import("./p-ChB3W-Ln.js")).catch((function(t){return Promise.reject(Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var n=function(t){var i=G(t);return"undefined"===i?"undefined":"string"===i||t instanceof String?"string":"number"===i||t instanceof Number?"number":"function"===i||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===i?"object":"unknown"},e=function(t,i){var r=document.createElement(t);for(var n in i.className&&(r.className=i.className),i.innerHTML&&i.dompurify&&(r.innerHTML=i.dompurify.sanitize(i.innerHTML)),i.style)r.style[n]=i.style[n];return r},s=function t(i,r){for(var n=3===i.nodeType?document.createTextNode(i.nodeValue):i.cloneNode(!1),e=i.firstChild;e;e=e.nextSibling)!0!==r&&1===e.nodeType&&"SCRIPT"===e.nodeName||n.appendChild(t(e,r));return 1===i.nodeType&&("CANVAS"===i.nodeName?(n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0)):"TEXTAREA"!==i.nodeName&&"SELECT"!==i.nodeName||(n.value=i.value),n.addEventListener("load",(function(){n.scrollTop=i.scrollTop,n.scrollLeft=i.scrollLeft}),!0)),n},o=function t(i){var r=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),r);return(n=n.setProgress(1,t,1,[t])).set(i)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(t,i){return t.__proto__=i||o.prototype,t},o.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"}},o.prototype.from=function(t,i){return this.then((function(){switch(i=i||function(t){switch(n(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t),i){case"string":return this.then(r).then((function(i){return this.set({src:e("div",{innerHTML:t,dompurify:i})})}));case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}}))},o.prototype.to=function(t){switch(t){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.")}},o.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 t={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||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},i=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===i.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=e("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=e("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(i),this.prop.container.firstChild.appendChild(e("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"}))},o.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(i).then((function(t){var i=Object.assign({},this.opt.html2canvas);return delete i.onrendered,t(this.prop.container,i)})).then((function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},o.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(i).then((function(t){var i=this.opt.jsPDF,r=this.opt.fontFaces,n=Object.assign({async:!0,allowTaint:!0,scale:"number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,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 n.onrendered,i.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,i.context2d.posX=this.opt.x,i.context2d.posY=this.opt.y,i.context2d.margin=this.opt.margin,i.context2d.fontFaces=r,r)for(var e=0;e<r.length;++e){var s=r[e],o=s.src.find((function(t){return"truetype"===t.format}));o&&i.addFont(o.url,s.ref.name,s.ref.style)}return n.windowHeight=n.windowHeight||0,n.windowHeight=0==n.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):n.windowHeight,i.context2d.save(!0),t(this.prop.container,n)})).then((function(t){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},o.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t}))},o.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},o.prototype.output=function(t,i,r){return"img"===(r=r||"pdf").toLowerCase()||"image"===r.toLowerCase()?this.outputImg(t,i):this.outputPdf(t,i)},o.prototype.outputPdf=function(t,i){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(t,i)}))},o.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(t){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 "'+t+'" is not supported.'}}))},o.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then((function(){this.prop.pdf.save(this.opt.filename)}))},o.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},o.prototype.set=function(t){if("object"!==n(t))return this;var i=Object.keys(t||{}).map((function(i){if(i in o.template.prop)return function(){this.prop[i]=t[i]};switch(i){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[i]=t[i]}}}),this);return this.then((function(){return this.thenList(i)}))},o.prototype.get=function(t,i){return this.then((function(){var r=t in o.template.prop?this.prop[t]:this.opt[t];return i?i(r):r}))},o.prototype.setMargin=function(t){return this.then((function(){switch(n(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t})).then(this.setPageSize)},o.prototype.setPageSize=function(t){function i(t,i){return Math.floor(t*i/72*96)}return this.then((function(){(t=t||an.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:i(t.inner.width,t.k),height:i(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t}))},o.prototype.setProgress=function(t,i,r,n){return null!=t&&(this.progress.val=t),null!=i&&(this.progress.state=i),null!=r&&(this.progress.n=r),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},o.prototype.updateProgress=function(t,i,r,n){return this.setProgress(t?this.progress.val+t:null,i||null,r?this.progress.n+r:null,n?this.progress.stack.concat(n):null)},o.prototype.then=function(t,i){var r=this;return this.thenCore(t,i,(function(t,i){return r.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,(function(i){return r.updateProgress(null,t),i})).then(t,i).then((function(t){return r.updateProgress(1),t}))}))},o.prototype.thenCore=function(t,i,r){r=r||Promise.prototype.then;var n=this;t&&(t=t.bind(n)),i&&(i=i.bind(n));var e=-1!==(""+Promise).indexOf("[native code]")&&"Promise"===Promise.name?n:o.convert(Object.assign({},n),Promise.prototype),s=r.call(e,t,i);return o.convert(s,n.__proto__)},o.prototype.thenExternal=function(t,i){return Promise.prototype.then.call(this,t,i)},o.prototype.thenList=function(t){var i=this;return t.forEach((function(t){i=i.thenCore(t)})),i},o.prototype.catch=function(t){t&&(t=t.bind(this));var i=Promise.prototype.catch.call(this,t);return o.convert(i,this)},o.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},o.prototype.error=function(t){return this.then((function(){throw Error(t)}))},o.prototype.using=o.prototype.set,o.prototype.saveAs=o.prototype.save,o.prototype.export=o.prototype.output,o.prototype.run=o.prototype.then,an.getPageSize=function(t,i,r){if("object"===G(t)){var n=t;t=n.orientation,i=n.unit||i,r=n.format||r}i=i||"mm",r=r||"a4",t=(""+(t||"P")).toLowerCase();var e,s=(""+r).toLowerCase(),o={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(i){case"pt":e=1;break;case"mm":e=72/25.4;break;case"cm":e=72/2.54;break;case"in":e=72;break;case"px":e=.75;break;case"pc":case"em":e=12;break;case"ex":e=6;break;default:throw"Invalid unit: "+i}var a,u=0,f=0;if(o.hasOwnProperty(s))u=o[s][1]/e,f=o[s][0]/e;else try{u=r[1],f=r[0]}catch(t){throw Error("Invalid format: "+r)}if("p"===t||"portrait"===t)t="p",f>u&&(a=f,f=u,u=a);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",u>f&&(a=f,f=u,u=a)}return{width:f,height:u,unit:i,k:e,orientation:t}},t.html=function(t,i){(i=i||{}).callback=i.callback||function(){},i.html2canvas=i.html2canvas||{},i.html2canvas.canvas=i.html2canvas.canvas||this.canvas,i.jsPDF=i.jsPDF||this,i.fontFaces=i.fontFaces?i.fontFaces.map(ie):null;var r=new o(i);return i.worker?r:r.from(t).doCallback()}}(an.API),an.API.addJS=function(t){var i,r,n=function(t){for(var i="",r=0;r<t.length;r++){var n=t[r];if("("===n||")"===n){for(var e=0,s=r-1;s>=0&&"\\"===t[s];s--)e++;i+=e%2==0?"\\"+n:n}else i+=n}return i}(t);return this.internal.events.subscribe("postPutResources",(function(){i=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(i+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==i&&void 0!==r&&this.internal.out("/Names <</JavaScript "+i+" 0 R>>")})),this
228
+ /**
229
+ * @license
230
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
231
+ *
232
+ * Licensed under the MIT License.
233
+ * http://opensource.org/licenses/mit-license
234
+ */},function(t){var i;t.events.push(["postPutResources",function(){var t=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=t.outline.render().split(/\r\n/),e=0;e<n.length;e++){var s=n[e],o=r.exec(s);null!=o&&t.internal.newObjectDeferredBegin(o[1],!1),t.internal.write(s)}if(this.outline.createNamedDestinations){var a=this.internal.pages.length,u=[];for(e=0;e<a;e++){var f=t.internal.newObject();u.push(f);var c=t.internal.getPageInfo(e+1);t.internal.write("<< /D["+c.objId+" 0 R /XYZ null null null]>> endobj")}var h=t.internal.newObject();for(t.internal.write("<< /Names [ "),e=0;e<u.length;e++)t.internal.write("(page_"+(e+1)+")"+u[e]+" 0 R");t.internal.write(" ] >>","endobj"),i=t.internal.newObject(),t.internal.write("<< /Dests "+h+" 0 R"),t.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+i+" 0 R"))}]),t.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,i,r){var n={title:i,options:r,children:[]};return null==t&&(t=this.root),t.children.push(n),n},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(i){i.id=t.internal.newObjectDeferred();for(var r=0;r<i.children.length;r++)this.genIds_r(i.children[r])},t.outline.renderRoot=function(t){this.objStart(t),this.line("/Type /Outlines"),t.children.length>0&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},t.outline.renderItems=function(i){for(var r=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n<i.children.length;n++){var e=i.children[n];this.objStart(e),this.line("/Title "+this.makeString(e.title)),this.line("/Parent "+this.makeRef(i)),n>0&&this.line("/Prev "+this.makeRef(i.children[n-1])),n<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[n+1])),e.children.length>0&&(this.line("/First "+this.makeRef(e.children[0])),this.line("/Last "+this.makeRef(e.children[e.children.length-1])));var s=this.count=this.count_r({count:0},e);if(s>0&&this.line("/Count "+s),e.options&&e.options.pageNumber){var o=t.internal.getPageInfo(e.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+r(0)+" 0]")}this.objEnd()}for(var a=0;a<i.children.length;a++)this.renderItems(i.children[a])},t.outline.line=function(t){this.ctx.val+=t+"\r\n"},t.outline.makeRef=function(t){return t.id+" 0 R"},t.outline.makeString=function(i){return"("+t.internal.pdfEscape(i)+")"},t.outline.objStart=function(t){this.ctx.val+="\r\n"+t.id+" 0 obj\r\n<<\r\n"},t.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},t.outline.count_r=function(t,i){for(var r=0;r<i.children.length;r++)t.count++,this.count_r(t,i.children[r]);return t.count}}])}(an.API),
235
+ /**
236
+ * @license
237
+ *
238
+ * Licensed under the MIT License.
239
+ * http://opensource.org/licenses/mit-license
240
+ */
241
+ function(){var t=[192,193,194,195,196,197,198,199];an.API.processJPEG=function(i,r,n,e,s,o){var a,u=this.decode.DCT_DECODE,f=null;if("string"==typeof i||this.__addimage__.isArrayBuffer(i)||this.__addimage__.isArrayBufferView(i)){switch(i=this.__addimage__.isArrayBuffer(i=s||i)?new Uint8Array(i):i,a=function(i){for(var r,n=256*i.charCodeAt(4)+i.charCodeAt(5),e=i.length,s={width:0,height:0,numcomponents:1},o=4;o<e;o+=2){if(-1!==t.indexOf(i.charCodeAt((o+=n)+1))){r=256*i.charCodeAt(o+5)+i.charCodeAt(o+6),s={width:256*i.charCodeAt(o+7)+i.charCodeAt(o+8),height:r,numcomponents:i.charCodeAt(o+9)};break}n=256*i.charCodeAt(o+2)+i.charCodeAt(o+3)}return s}(i=this.__addimage__.isArrayBufferView(i)?this.__addimage__.arrayBufferToBinaryString(i):i),a.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}f={data:i,width:a.width,height:a.height,colorSpace:o,bitsPerComponent:8,filter:u,index:r,alias:n}}return f}}(),an.API.processPNG=function(t,i,r,n){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var e,s=function(t){return new xr(t,{checkCrc:!0}).decode()}(t),o=s.width,a=s.height,u=s.channels,f=s.depth;e=s.palette&&1===u?function(t){for(var i=t.width,r=t.height,n=t.data,e=t.palette,s=t.depth,o=!1,a=[],u=[],f=void 0,c=!1,h=0,l=0;l<e.length;l++){var d=Et(e[l],4),v=d[3];a.push(d[0],d[1],d[2]),null!=v&&(0===v?(h++,u.length<1&&u.push(l)):v<255&&(c=!0))}if(c||h>1){o=!0,u=void 0;var p=i*r;f=new Uint8Array(p);for(var b=new DataView(n.buffer),m=0;m<p;m++){var w=Et(e[Le(b,m,s)],4)[3];f[m]=w}}else 0===h&&(u=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:o?8:void 0,colorBytes:n,alphaBytes:f,needSMask:o,palette:a,mask:u}}(s):2===u||4===u?function(t){for(var i=t.data,r=t.channels,n=t.depth,e=2===r?"DeviceGray":"DeviceRGB",s=r-1,o=t.width*t.height,a=s,u=1*o,f=Math.ceil(o*a*n/8),c=Math.ceil(u*n/8),h=new Uint8Array(f),l=new Uint8Array(c),d=new DataView(i.buffer),v=new DataView(h.buffer),p=new DataView(l.buffer),b=!1,m=0;m<o;m++){for(var w=m*r,g=0;g<a;g++)Ae(v,Le(d,w+g,n),m*a+g,n);var k=Le(d,w+a,n);k<(1<<n)-1&&(b=!0),Ae(p,k,1*m,n)}return{colorSpace:e,colorsPerPixel:s,sMaskBitsPerComponent:b?n:void 0,colorBytes:h,alphaBytes:l,needSMask:b}}(s):function(t){var i=t.data,r=1===t.channels?"DeviceGray":"DeviceRGB";return{colorSpace:r,colorsPerPixel:"DeviceGray"===r?1:3,colorBytes:i instanceof Uint16Array?function(t){for(var i=t.length,r=new Uint8Array(2*i),n=new DataView(r.buffer,r.byteOffset,r.byteLength),e=0;e<i;e++)n.setUint16(2*e,t[e],!1);return r}(i):i,needSMask:!1}}(s);var c,h,l,d=e.colorSpace,v=e.colorsPerPixel,p=e.sMaskBitsPerComponent,b=e.colorBytes,m=e.alphaBytes,w=e.needSMask,g=e.palette,k=e.mask,y=null;return n!==an.API.image_compression.NONE?(y=function(t){var i;switch(t){case an.API.image_compression.FAST:i=11;break;case an.API.image_compression.MEDIUM:i=13;break;case an.API.image_compression.SLOW:i=14;break;default:i=12}return i}(n),c=this.decode.FLATE_DECODE,h="/Predictor ".concat(y," /Colors ").concat(v," /BitsPerComponent ").concat(f," /Columns ").concat(o),t=pe(b,Math.ceil(o*v*f/8),v,f,n),w&&(l=pe(m,Math.ceil(o*p/8),1,p,n))):(c=void 0,h=void 0,t=b,w&&(l=m)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(l&&this.__addimage__.isArrayBuffer(l)||this.__addimage__.isArrayBufferView(l))&&(l=this.__addimage__.arrayBufferToBinaryString(l)),{alias:r,data:t,index:i,filter:c,decodeParameters:h,transparency:k,palette:g,sMask:l,predictor:y,width:o,height:a,bitsPerComponent:f,sMaskBitsPerComponent:p,colorSpace:d}}},function(t){t.processGIF89A=function(i,r,n,e){var s=new Se(i),o=s.width,a=s.height,u=[];s.decodeAndBlitFrameRGBA(0,u);var f={data:u,width:o,height:a},c=new Ee(100).encode(f,100);return t.processJPEG.call(this,c,r,n,e)},t.processGIF87A=t.processGIF89A}(an.API),qe.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,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(t);for(var i=0;i<t;i++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),e=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[i]={red:e,green:n,blue:r,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},qe.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,i=this.width*this.height*4;if(i>536870912)throw Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(i);try{this[t]()}catch(t){qr.log("bit decode error:"+t)}},qe.prototype.bit1=function(){var t,i=Math.ceil(this.width/8),r=i%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,e=0;e<i;e++)for(var s=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*e*4,a=0;a<8&&8*e+a<this.width;a++){var u=this.palette[s>>7-a&1];this.data[o+4*a]=u.blue,this.data[o+4*a+1]=u.green,this.data[o+4*a+2]=u.red,this.data[o+4*a+3]=255}0!==r&&(this.pos+=4-r)}},qe.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),i=t%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,e=0;e<t;e++){var s=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*e*4,a=15&s,u=this.palette[s>>4];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*e+1>=this.width)break;this.data[o+4]=(u=this.palette[a]).blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}0!==i&&(this.pos+=4-i)}},qe.prototype.bit8=function(){for(var t=this.width%4,i=this.height-1;i>=0;i--){for(var r=this.bottom_up?i:this.height-1-i,n=0;n<this.width;n++){var e=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+4*n;if(e<this.palette.length){var o=this.palette[e];this.data[s]=o.red,this.data[s+1]=o.green,this.data[s+2]=o.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}0!==t&&(this.pos+=4-t)}},qe.prototype.bit15=function(){for(var t=this.width%3,i=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,e=0;e<this.width;e++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(s&i)/i*255|0,a=(s>>5&i)/i*255|0,u=s>>15?255:0,f=n*this.width*4+4*e;this.data[f]=(s>>10&i)/i*255|0,this.data[f+1]=a,this.data[f+2]=o,this.data[f+3]=u}this.pos+=t}},qe.prototype.bit16=function(){for(var t=this.width%3,i=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var e=this.bottom_up?n:this.height-1-n,s=0;s<this.width;s++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(o&i)/i*255|0,u=(o>>5&r)/r*255|0,f=e*this.width*4+4*s;this.data[f]=(o>>11)/i*255|0,this.data[f+1]=u,this.data[f+2]=a,this.data[f+3]=255}this.pos+=t}},qe.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),e=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=i*this.width*4+4*r;this.data[o]=s,this.data[o+1]=e,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},qe.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var i=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),e=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=i*this.width*4+4*r;this.data[a]=s,this.data[a+1]=e,this.data[a+2]=n,this.data[a+3]=o}},qe.prototype.getData=function(){return this.data},
242
+ /**
243
+ * @license
244
+ * Copyright (c) 2018 Aras Abbasi
245
+ *
246
+ * Licensed under the MIT License.
247
+ * http://opensource.org/licenses/mit-license
248
+ */
249
+ function(t){t.processBMP=function(i,r,n,e){var s=new qe(i,!1),o=s.width,a=s.height,u={data:s.getData(),width:o,height:a},f=new Ee(100).encode(u,100);return t.processJPEG.call(this,f,r,n,e)}}(an.API),je.prototype.getData=function(){return this.data},
250
+ /**
251
+ * @license
252
+ * Copyright (c) 2019 Aras Abbasi
253
+ *
254
+ * Licensed under the MIT License.
255
+ * http://opensource.org/licenses/mit-license
256
+ */
257
+ function(t){t.processWEBP=function(i,r,n,e){var s=new je(i),o=s.width,a=s.height,u={data:s.getData(),width:o,height:a},f=new Ee(100).encode(u,100);return t.processJPEG.call(this,f,r,n,e)}}(an.API),an.API.processRGBA=function(t,i,r){for(var n=t.data,e=n.length,s=new Uint8Array(e/4*3),o=new Uint8Array(e/4),a=0,u=0,f=0;f<e;f+=4){var c=n[f+1],h=n[f+2],l=n[f+3];s[a++]=n[f],s[a++]=c,s[a++]=h,o[u++]=l}var d=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:d,index:i,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},an.API.setLanguage=function(t){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={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"}[t]&&(this.internal.languageSettings.languageCode=t,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")})),this.internal.languageSettings.isSubscribed=!0)),this},ce=(fe=an.API).getCharWidthsArray=function(t,i){var r,n,e=(i=i||{}).font||this.internal.getFont(),s=i.fontSize||this.internal.getFontSize(),o=i.charSpace||this.internal.getCharSpace(),a=i.widths?i.widths:e.metadata.Unicode.widths,u=a.fof?a.fof:1,f=i.kerning?i.kerning:e.metadata.Unicode.kerning,c=f.fof?f.fof:1,h=!1!==i.doKerning,l=0,d=t.length,v=0,p=a[0]||u,b=[];for(r=0;r<d;r++)n=t.charCodeAt(r),"function"==typeof e.metadata.widthOfString?b.push((e.metadata.widthOfGlyph(e.metadata.characterToGlyph(n))+o*(1e3/s)||0)/1e3):(l=h&&"object"===G(f[n])&&!isNaN(parseInt(f[n][v],10))?f[n][v]/c:0,b.push((a[n]||p)/u+l)),v=n;return b},he=fe.getStringUnitWidth=function(t,i){var r=(i=i||{}).fontSize||this.internal.getFontSize(),n=i.font||this.internal.getFont(),e=i.charSpace||this.internal.getCharSpace();return fe.processArabic&&(t=fe.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,r,e)/r:ce.apply(this,arguments).reduce((function(t,i){return t+i}),0)},le=function(t,i,r,n){for(var e=[],s=0,o=t.length,a=0;s!==o&&a+i[s]<r;)a+=i[s],s++;e.push(t.slice(0,s));var u=s;for(a=0;s!==o;)a+i[s]>n&&(e.push(t.slice(u,s)),a=0,u=s),a+=i[s],s++;return u!==s&&e.push(t.slice(u,s)),e},de=function(t,i,r){r||(r={});var n,e,s,o,a,u,f,c=[],h=[c],l=r.textIndent||0,d=0,v=0,p=t.split(" "),b=ce.call(this," ",r)[0];if(u=-1===r.lineIndent?p[0].length+2:r.lineIndent||0){var m=Array(u).join(" "),w=[];p.map((function(t){(t=t.split(/\s*\n/)).length>1?w=w.concat(t.map((function(t,i){return(i&&t.length?"\n":"")+t}))):w.push(t[0])})),p=w,u=he.call(this,m,r)}for(s=0,o=p.length;s<o;s++){var g=0;if(n=p[s],u&&"\n"==n[0]&&(n=n.substr(1),g=1),l+d+(v=(e=ce.call(this,n,r)).reduce((function(t,i){return t+i}),0))>i||g){if(v>i){for(a=le(n,e,i-(l+d),i),c.push(a.shift()),c=[a.pop()];a.length;)h.push([a.shift()]);v=e.slice(n.length-(c[0]?c[0].length:0)).reduce((function(t,i){return t+i}),0)}else c=[n];h.push(c),l=v+u,d=b}else c.push(n),l+=d+v,d=b}return f=u?function(t,i){return(i?m:"")+t.join(" ")}:function(t){return t.join(" ")},h.map(f)},fe.splitTextToSize=function(t,i,r){var n,e=(r=r||{}).fontSize||this.internal.getFontSize(),s=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var i=this.internal.getFont(t.fontName,t.fontStyle),r="Unicode";return i.metadata[r]?{widths:i.metadata[r].widths||{0:1},kerning:i.metadata[r].kerning||{}}:{font:i.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(t)?t:(t+"").split(/\r?\n/);var o=1*this.internal.scaleFactor*i/e;s.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/e:0,s.lineIndent=r.lineIndent;var a,u,f=[];for(a=0,u=n.length;a<u;a++)f=f.concat(de.call(this,n[a],o,s));return f},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var i="0123456789abcdef",r="klmnopqrstuvwxyz",n={},e={},s=0;s<16;s++)n[r[s]]=i[s],e[i[s]]=r[s];var o=function(t){return"0x"+parseInt(t,10).toString(16)},a=t.__fontmetrics__.compress=function(t){var i,r,n,s,u=["{"];for(var f in t){if(i=t[f],r=isNaN(parseInt(f,10))?"'"+f+"'":(r=o(f=parseInt(f,10)).slice(2)).slice(0,-1)+e[r.slice(-1)],"number"==typeof i)i<0?(n=o(i).slice(3),s="-"):(n=o(i).slice(2),s=""),n=s+n.slice(0,-1)+e[n.slice(-1)];else{if("object"!==G(i))throw Error("Don't know what to do with value type "+G(i)+".");n=a(i)}u.push(r+n)}return u.push("}"),u.join("")},u=t.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw Error("Invalid argument passed to uncompress.");for(var i,r,e,s,o={},a=1,u=o,f=[],c="",h="",l=t.length-1,d=1;d<l;d+=1)"'"==(s=t[d])?i?(e=i.join(""),i=void 0):i=[]:i?i.push(s):"{"==s?(f.push([u,e]),u={},e=void 0):"}"==s?((r=f.pop())[0][r[1]]=u,e=void 0,u=r[0]):"-"==s?a=-1:void 0===e?n.hasOwnProperty(s)?(e=parseInt(c+=n[s],16)*a,a=1,c=""):c+=s:n.hasOwnProperty(s)?(u[e]=parseInt(h+=n[s],16)*a,a=1,e=void 0,h=""):h+=s;return o},f={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:f,"Courier-Bold":f,"Courier-BoldOblique":f,"Courier-Oblique":f,Helvetica:f,"Helvetica-Bold":f,"Helvetica-BoldOblique":f,"Helvetica-Oblique":f,"Times-Roman":f,"Times-Bold":f,"Times-BoldItalic":f,"Times-Italic":f}},h={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'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":u("{'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:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'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:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'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":u("{'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:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'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":u("{'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":u("{'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}}}")}};t.events.push(["addFont",function(t){var i=t.font,r=h.Unicode[i.postScriptName];r&&(i.metadata.Unicode={},i.metadata.Unicode.widths=r.widths,i.metadata.Unicode.kerning=r.kerning);var n=c.Unicode[i.postScriptName];n&&(i.metadata.Unicode.encoding=n,i.encoding=n.codePages[0])}])}(an.API),
258
+ /**
259
+ * @license
260
+ * Licensed under the MIT License.
261
+ * http://opensource.org/licenses/mit-license
262
+ */
263
+ function(t){t.API.events.push(["addFont",function(i){var r=void 0,n=i.font,e=i.instance;if(!n.isStandardFont){if(void 0===e)throw Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if("string"!=typeof(r=!1===e.existsFileInVFS(n.postScriptName)?e.loadFile(n.postScriptName):e.getFileFromVFS(n.postScriptName)))throw Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");!function(i,r){r=function(t){for(var i=t.length,r=new Uint8Array(i),n=0;n<i;n++)r[n]=t.charCodeAt(n);return r}(/^\x00\x01\x00\x00/.test(r)?r:Or(r)),i.metadata=t.API.TTFFont.open(r),i.metadata.Unicode=i.metadata.Unicode||{encoding:{},kerning:{},widths:[]},i.metadata.glyIdsUsed=[0]}(n,r)}}])}(an),an.API.addSvgAsImage=function(t,i,r,n,e,s,o,a){if(isNaN(i)||isNaN(r))throw qr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(e))throw qr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=e;var f=u.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,u.width,u.height);var c={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return(Mr.canvg?Promise.resolve(Mr.canvg):import("./p-B85ddf5i.js").then((function(t){return t.i}))).catch((function(t){return Promise.reject(Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t})).then((function(i){return i.fromString(f,t,c)}),(function(){return Promise.reject(Error("Could not load canvg."))})).then((function(t){return t.render(c)})).then((function(){h.addImage(u.toDataURL("image/jpeg",1),i,r,n,e,o,a)}))},an.API.putTotalPages=function(t){var i,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(i=RegExp(t,"g"),r=this.internal.getNumberOfPages()):(i=RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var e=0;e<this.internal.pages[n].length;e++)this.internal.pages[n][e]=this.internal.pages[n][e].replace(i,r);return this},an.API.viewerPreferences=function(t,i){var r;t=t||{},i=i||!1;var n,e,s,o={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(o),u=[],f=0,c=0,h=0;function l(t,i){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===i&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,"reset"===t||!0===i){var d=a.length;for(h=0;h<d;h+=1)r[a[h]].value=r[a[h]].defaultValue,r[a[h]].explicitSet=!1}if("object"===G(t))for(e in t)if(s=t[e],l(a,e)&&void 0!==s){if("boolean"===r[e].type&&"boolean"==typeof s)r[e].value=s;else if("name"===r[e].type&&l(r[e].valueSet,s))r[e].value=s;else if("integer"===r[e].type&&Number.isInteger(s))r[e].value=s;else if("array"===r[e].type){for(f=0;f<s.length;f+=1)if(n=!0,1===s[f].length&&"number"==typeof s[f][0])u.push(s[f]-1+"");else if(s[f].length>1){for(c=0;c<s[f].length;c+=1)"number"!=typeof s[f][c]&&(n=!1);!0===n&&u.push([s[f][0]-1,s[f][1]-1].join(" "))}r[e].value="["+u.join(" ")+"]"}else r[e].value=r[e].defaultValue;r[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,i=[];for(t in r)!0===r[t].explicitSet&&i.push("name"===r[t].type?"/"+t+" /"+r[t].value:"/"+t+" "+r[t].value);0!==i.length&&this.internal.write("/ViewerPreferences\n<<\n"+i.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},an.API.addMetadata=function(t,i){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceUri:null!=i?i:"http://jspdf.default.namespaceuri/",rawXml:"boolean"==typeof i&&i},this.internal.events.subscribe("putCatalog",Pe),this.internal.events.subscribe("postPutResources",Fe)),this},function(t){var i=t.API,r=i.pdfEscape16=function(t,i){for(var r,n=i.metadata.Unicode.widths,e=["","0","00","000","0000"],s=[""],o=0,a=t.length;o<a;++o){if(r=i.metadata.characterToGlyph(t.charCodeAt(o)),i.metadata.glyIdsUsed.push(r),i.metadata.toUnicode[r]=t.charCodeAt(o),-1==n.indexOf(r)&&(n.push(r),n.push([parseInt(i.metadata.widthOfGlyph(r),10)])),"0"==r)return s.join("");s.push(e[4-(r=r.toString(16)).length],r)}return s.join("")},n=function(t){var i,r,n,e,s,o,a;for(s="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",n=[],o=0,a=(r=Object.keys(t).sort((function(t,i){return t-i}))).length;o<a;o++)i=r[o],n.length>=100&&(s+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),null!=t[i]&&"function"==typeof t[i].toString&&(e=("0000"+t[i].toString(16)).slice(-4),n.push("<"+(i=("0000"+(+i).toString(16)).slice(-4))+"><"+e+">"));return n.length&&(s+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),s+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};i.events.push(["putFont",function(i){!function(i){var r=i.font,e=i.out,s=i.newObject,o=i.putStream;if(r.metadata instanceof t.API.TTFFont&&"Identity-H"===r.encoding){for(var a=r.metadata.Unicode.widths,u=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),f="",c=0;c<u.length;c++)f+=String.fromCharCode(u[c]);var h=s();o({data:f,addLength1:!0,objectId:h}),e("endobj");var l=s();o({data:n(r.metadata.toUnicode),addLength1:!0,objectId:l}),e("endobj");var d=s();e("<<"),e("/Type /FontDescriptor"),e("/FontName /"+tn(r.fontName)),e("/FontFile2 "+h+" 0 R"),e("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),e("/Flags "+r.metadata.flags),e("/StemV "+r.metadata.stemV),e("/ItalicAngle "+r.metadata.italicAngle),e("/Ascent "+r.metadata.ascender),e("/Descent "+r.metadata.decender),e("/CapHeight "+r.metadata.capHeight),e(">>"),e("endobj");var v=s();e("<<"),e("/Type /Font"),e("/BaseFont /"+tn(r.fontName)),e("/FontDescriptor "+d+" 0 R"),e("/W "+t.API.PDFObject.convert(a)),e("/CIDToGIDMap /Identity"),e("/DW 1000"),e("/Subtype /CIDFontType2"),e("/CIDSystemInfo"),e("<<"),e("/Supplement 0"),e("/Registry (Adobe)"),e("/Ordering ("+r.encoding+")"),e(">>"),e(">>"),e("endobj"),r.objectNumber=s(),e("<<"),e("/Type /Font"),e("/Subtype /Type0"),e("/ToUnicode "+l+" 0 R"),e("/BaseFont /"+tn(r.fontName)),e("/Encoding /"+r.encoding),e("/DescendantFonts ["+v+" 0 R]"),e(">>"),e("endobj"),r.isAlreadyPutted=!0}}(i)}]),i.events.push(["putFont",function(i){!function(i){var r=i.font,e=i.out,s=i.newObject,o=i.putStream;if(r.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===r.encoding){for(var a=r.metadata.rawData,u="",f=0;f<a.length;f++)u+=String.fromCharCode(a[f]);var c=s();o({data:u,addLength1:!0,objectId:c}),e("endobj");var h=s();o({data:n(r.metadata.toUnicode),addLength1:!0,objectId:h}),e("endobj");var l=s();e("<<"),e("/Descent "+r.metadata.decender),e("/CapHeight "+r.metadata.capHeight),e("/StemV "+r.metadata.stemV),e("/Type /FontDescriptor"),e("/FontFile2 "+c+" 0 R"),e("/Flags 96"),e("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),e("/FontName /"+tn(r.fontName)),e("/ItalicAngle "+r.metadata.italicAngle),e("/Ascent "+r.metadata.ascender),e(">>"),e("endobj"),r.objectNumber=s();for(var d=0;d<r.metadata.hmtx.widths.length;d++)r.metadata.hmtx.widths[d]=parseInt(r.metadata.hmtx.widths[d]*(1e3/r.metadata.head.unitsPerEm));e("<</Subtype/TrueType/Type/Font/ToUnicode "+h+" 0 R/BaseFont/"+tn(r.fontName)+"/FontDescriptor "+l+" 0 R/Encoding/"+r.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(r.metadata.hmtx.widths)+">>"),e("endobj"),r.isAlreadyPutted=!0}}(i)}]);var e=function(t){var i,n=t.text||"",e=t.x,s=t.y,o=t.options||{},a=t.mutex||{},u=a.pdfEscape,f=a.activeFontKey,c=a.fonts,h=f,l="",d=0,v="",p=c[h].encoding;if("Identity-H"!==c[h].encoding)return{text:n,x:e,y:s,options:o,mutex:a};for(v=n,h=f,Array.isArray(n)&&(v=n[0]),d=0;d<v.length;d+=1)c[h].metadata.hasOwnProperty("cmap")&&(i=c[h].metadata.cmap.unicode.codeMap[v[d].charCodeAt(0)]),i||v[d].charCodeAt(0)<256&&c[h].metadata.hasOwnProperty("Unicode")?l+=v[d]:l+="";var b="";return parseInt(h.slice(1))<14||"WinAnsiEncoding"===p?b=u(l,h).split("").map((function(t){return t.charCodeAt(0).toString(16)})).join(""):"Identity-H"===p&&(b=r(l,c[h])),a.isHex=!0,{text:b,x:e,y:s,options:o,mutex:a}};i.events.push(["postProcessText",function(t){var i=t.text||"",r=[],n={text:i,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(i)){var s=0;for(s=0;s<i.length;s+=1)r.push(Array.isArray(i[s])&&3===i[s].length?[e(Object.assign({},n,{text:i[s][0]})).text,i[s][1],i[s][2]]:e(Object.assign({},n,{text:i[s]})).text);t.text=r}else t.text=e(Object.assign({},n,{text:i})).text}])}(an),
264
+ /**
265
+ * @license
266
+ * jsPDF virtual FileSystem functionality
267
+ *
268
+ * Licensed under the MIT License.
269
+ * http://opensource.org/licenses/mit-license
270
+ */
271
+ function(t){var i=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(t){return i.call(this),void 0!==this.internal.vFS[t]},t.addFileToVFS=function(t,r){return i.call(this),this.internal.vFS[t]=r,this},t.getFileFromVFS=function(t){return i.call(this),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null}}(an.API),
272
+ /**
273
+ * @license
274
+ * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
275
+ * MIT License
276
+ */
277
+ function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,e,s,o,a,u,f=i,c=[[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]],h=[[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]],l={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},d={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},v=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],p=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,m=0;this.__bidiEngine__={};var w=function(t){var i=t.charCodeAt(),r=i>>8,n=d[r];return void 0!==n?f[256*n+(255&i)]:252===r||253===r?"AL":p.test(r)?"L":8===r?"R":"N"},g=function(t){for(var i,r=0;r<t.length;r++){if("L"===(i=w(t.charAt(r))))return!1;if("R"===i)return!0}return!1},k=function(t,i,o,a){var u,f,c,h,l=i[a];switch(l){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&&(l="AN");break;case"AL":b=!0,l="R";break;case"WS":case"BN":l="N";break;case"CS":a<1||a+1>=i.length||"EN"!==(u=o[a-1])&&"AN"!==u||"EN"!==(f=i[a+1])&&"AN"!==f?l="N":b&&(f="AN"),l=f===u?f:"N";break;case"ES":l="EN"===(u=a>0?o[a-1]:"B")&&a+1<i.length&&"EN"===i[a+1]?"EN":"N";break;case"ET":if(a>0&&"EN"===o[a-1]){l="EN";break}if(b){l="N";break}for(c=a+1,h=i.length;c<h&&"ET"===i[c];)c++;l=c<h&&"EN"===i[c]?"EN":"N";break;case"NSM":if(e&&!s){for(h=i.length,c=a+1;c<h&&"NSM"===i[c];)c++;if(c<h){var d=t[a];if(u=i[c],(d>=1425&&d<=2303||64286===d)&&("R"===u||"AL"===u)){l="R";break}}}l=a<1||"B"===(u=i[a-1])?"N":o[a-1];break;case"B":b=!1,r=!0,l=m;break;case"S":n=!0,l="N"}return l},y=function(t,i,r){var n=t.split("");return r&&N(n,r,{hiLevel:m}),n.reverse(),i&&i.reverse(),n.join("")},N=function(t,i,e){var s,o,a,u,f,d=-1,v=t.length,p=0,g=[],y=m?h:c,N=[];for(b=!1,r=!1,n=!1,o=0;o<v;o++)N[o]=w(t[o]);for(a=0;a<v;a++){if(f=p,g[a]=k(t,N,g,a),s=240&(p=y[f][l[g[a]]]),i[a]=u=y[p&=15][5],s>0)if(16===s){for(o=d;o<a;o++)i[o]=1;d=-1}else d=-1;if(y[p][6])-1===d&&(d=a);else if(d>-1){for(o=d;o<a;o++)i[o]=u;d=-1}"B"===N[a]&&(i[a]=0),e.hiLevel|=u}n&&function(t,i,r){for(var n=0;n<r;n++)if("S"===t[n]){i[n]=m;for(var e=n-1;e>=0&&"WS"===t[e];e--)i[e]=m}}(N,i,v)},L=function(t,i,n,e,s){if(!(s.hiLevel<t)){if(1===t&&1===m&&!r)return i.reverse(),void(n&&n.reverse());for(var o,a,u,f,c=i.length,h=0;h<c;){if(e[h]>=t){for(u=h+1;u<c&&e[u]>=t;)u++;for(f=h,a=u-1;f<a;f++,a--)o=i[f],i[f]=i[a],i[a]=o,n&&(o=n[f],n[f]=n[a],n[a]=o);h=u}h++}}},A=function(t,i,r){var n=t.split(""),e={hiLevel:m};return r||(r=[]),N(n,r,e),function(t,i,r){if(0!==r.hiLevel&&u)for(var n,e=0;e<t.length;e++)1===i[e]&&(n=v.indexOf(t[e]))>=0&&(t[e]=v[n+1])}(n,r,e),L(2,n,i,r,e),L(1,n,i,r,e),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,i,r){if(function(t,i){if(i)for(var r=0;r<t.length;r++)i[r]=r;void 0===s&&(s=g(t)),void 0===a&&(a=g(t))}(t,i),e||!o||a)if(e&&o&&s^a)m=s?1:0,t=y(t,i,r);else if(!e&&o&&a)m=s?1:0,t=A(t,i,r),t=y(t,i);else if(!e||s||o||a){if(e&&!o&&s^a)t=y(t,i),s?(m=0,t=A(t,i,r)):(m=1,t=A(t,i,r),t=y(t,i));else if(e&&s&&!o&&a)m=1,t=A(t,i,r),t=y(t,i);else if(!e&&!o&&s^a){var n=u;s?(m=1,t=A(t,i,r),m=0,u=!1,t=A(t,i,r),u=n):(m=0,t=A(t,i,r),t=y(t,i),m=1,u=!1,t=A(t,i,r),u=n,t=y(t,i))}}else m=0,t=A(t,i,r);else m=s?1:0,t=A(t,i,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(e=t.isInputVisual,o=t.isOutputVisual,s=t.isInputRtl,a=t.isOutputRtl,u=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var i=["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"],r=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var i=t.text,n=t.options||{},e=[];if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,r.setOptions(n),"[object Array]"===Object.prototype.toString.call(i)){var s=0;for(e=[],s=0;s<i.length;s+=1)"[object Array]"===Object.prototype.toString.call(i[s])?e.push([r.doBidiReorder(i[s][0]),i[s][1],i[s][2]]):e.push([r.doBidiReorder(i[s])]);t.text=e}else t.text=r.doBidiReorder(i);r.setOptions({isInputVisual:!0})}])}(an),an.API.TTFFont=function(){function t(t){var i;if(this.rawData=t,i=this.contents=new Re(t),this.contents.pos=4,"ttcf"===i.readString(4))throw Error("TTCF not supported.");i.pos=0,this.parse(),this.subset=new is(this),this.registerTTF()}return t.open=function(i){return new t(i)},t.prototype.parse=function(){return this.directory=new Oe(this.contents),this.head=new ze(this),this.name=new $e(this),this.cmap=new _e(this),this.toUnicode={},this.hhea=new Ve(this),this.maxp=new Je(this),this.hmtx=new Ke(this),this.post=new We(this),this.os2=new He(this),this.loca=new ts(this),this.glyf=new Ye(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]},t.prototype.registerTTF=function(){var t,i,r,n;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,i,r,n;for(n=[],t=0,i=(r=this.bbox).length;t<i;t++)n.push(Math.round(r[t]*this.scaleFactor));return n}.call(this),this.stemV=0,this.post.exists?(i=255&(r=this.post.italic_angle),32768&(t=r>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+i)):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=1===(n=this.familyClass)||2===n||3===n||4===n||5===n||7===n,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var i;return(null!=(i=this.cmap.unicode)?i.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var i;return i=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*i},t.prototype.widthOfString=function(t,i,r){var n,e,s,o;for(s=0,e=0,o=(t=""+t).length;0<=o?e<o:e>o;e=0<=o?++e:--e)n=t.charCodeAt(e),s+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/i)||0;return s*(i/1e3)},t.prototype.lineHeight=function(t,i){return null==i&&(i=!1),(this.ascender+(i?this.lineGap:0)-this.decender)/1e3*t},t}();var Ie,Re=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var i,r;for(r=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)r[i]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(t){var i,r,n;for(n=[],i=0,r=t.length;0<=r?i<r:i>r;i=0<=r?++i:--i)n.push(this.writeByte(t.charCodeAt(i)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,i,r,n,e,s,o,a;return t=this.readByte(),i=this.readByte(),r=this.readByte(),n=this.readByte(),e=this.readByte(),s=this.readByte(),o=this.readByte(),a=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^i)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^e)+65536*(255^s)+256*(255^o)+(255^a)+1):72057594037927940*t+281474976710656*i+1099511627776*r+4294967296*n+16777216*e+65536*s+256*o+a},t.prototype.writeLongLong=function(t){var i,r;return r=4294967295&t,this.writeByte((i=Math.floor(t/4294967296))>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var i,r;for(i=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)i.push(this.readByte());return i},t.prototype.write=function(t){var i,r,n;for(n=[],i=0,r=t.length;i<r;i++)n.push(this.writeByte(t[i]));return n},t}(),Oe=function(){var t;function i(t){var i,r,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},r=0,n=this.tableCount;0<=n?r<n:r>n;r=0<=n?++r:--r)i={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[i.tag]=i}return i.prototype.encode=function(i){var r,n,e,s,o,a,u,f,c,h,l,d;for(d in h=Object.keys(i).length,o=Math.log(2),e=Math.floor((f=16*Math.floor(Math.log(h)/o))/o),u=16*h-f,(n=new Re).writeInt(this.scalarType),n.writeShort(h),n.writeShort(f),n.writeShort(e),n.writeShort(u),a=n.pos+16*h,s=null,l=[],i)for(c=i[d],n.writeString(d),n.writeInt(t(c)),n.writeInt(a),n.writeInt(c.length),l=l.concat(c),"head"===d&&(s=a),a+=c.length;a%4;)l.push(0),a++;return n.write(l),r=2981146554-t(n.data),n.pos=s+8,n.writeUInt32(r),n.data},t=function(t){var i,r,n,e;for(t=Ze.call(t);t.length%4;)t.push(0);for(n=new Re(t),r=0,i=0,e=t.length;i<e;i=i+=4)r+=n.readUInt32();return 4294967295&r},i}(),Ce={}.hasOwnProperty,Te=function(t,i){for(var r in i)Ce.call(i,r)&&(t[r]=i[r]);function n(){this.constructor=t}return n.prototype=i.prototype,t.prototype=new n,t.__super__=i.prototype,t};Ie=function(){function t(t){var i;this.file=t,this.exists=!!(i=this.file.directory.tables[this.tag]),i&&(this.offset=i.offset,this.length=i.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var Be,De,ze=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="head",t.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()},t.prototype.encode=function(t){var i;return(i=new Re).writeInt(this.version),i.writeInt(this.revision),i.writeInt(this.checkSumAdjustment),i.writeInt(this.magicNumber),i.writeShort(this.flags),i.writeShort(this.unitsPerEm),i.writeLongLong(this.created),i.writeLongLong(this.modified),i.writeShort(this.xMin),i.writeShort(this.yMin),i.writeShort(this.xMax),i.writeShort(this.yMax),i.writeShort(this.macStyle),i.writeShort(this.lowestRecPPEM),i.writeShort(this.fontDirectionHint),i.writeShort(t),i.writeShort(this.glyphDataFormat),i.data},t}(),Ue=function(){function t(t,i){var r,n,e,s,o,a,u,f,c,h,l,d,v,p,b,m,w;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=i+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(a=0;a<256;++a)this.codeMap[a]=t.readByte();break;case 4:for(l=t.readUInt16(),h=l/2,t.pos+=6,e=function(){var i,r;for(r=[],a=i=0;0<=h?i<h:i>h;a=0<=h?++i:--i)r.push(t.readUInt16());return r}(),t.pos+=2,v=function(){var i,r;for(r=[],a=i=0;0<=h?i<h:i>h;a=0<=h?++i:--i)r.push(t.readUInt16());return r}(),u=function(){var i,r;for(r=[],a=i=0;0<=h?i<h:i>h;a=0<=h?++i:--i)r.push(t.readUInt16());return r}(),f=function(){var i,r;for(r=[],a=i=0;0<=h?i<h:i>h;a=0<=h?++i:--i)r.push(t.readUInt16());return r}(),n=(this.length-t.pos+this.offset)/2,o=function(){var i,r;for(r=[],a=i=0;0<=n?i<n:i>n;a=0<=n?++i:--i)r.push(t.readUInt16());return r}(),a=b=0,w=e.length;b<w;a=++b)for(p=e[a],r=m=d=v[a];d<=p?m<=p:m>=p;r=d<=p?++m:--m)0===f[a]?s=r+u[a]:0!==(s=o[f[a]/2+(r-d)-(h-a)]||0)&&(s+=u[a]),this.codeMap[r]=65535&s}t.pos=c}return t.encode=function(t,i){var r,n,e,s,o,a,u,f,c,h,l,d,v,p,b,m,w,g,k,y,N,L,A,x,S,M,E,q,j,F,P,I,R,O,C,T,B,D,z,U,_,V,H,W,G;switch(E=new Re,s=Object.keys(t).sort((function(t,i){return t-i})),i){case"macroman":for(v=0,p=function(){var t=[];for(d=0;d<256;++d)t.push(0);return t}(),m={0:0},e={},q=0,I=s.length;q<I;q++)null==m[V=t[n=s[q]]]&&(m[V]=++v),e[n]={old:t[n],new:m[t[n]]},p[n]=m[t[n]];return E.writeUInt16(1),E.writeUInt16(0),E.writeUInt32(12),E.writeUInt16(0),E.writeUInt16(262),E.writeUInt16(0),E.write(p),{charMap:e,subtable:E.data,maxGlyphID:v+1};case"unicode":for(S=[],c=[],w=0,m={},r={},b=u=null,j=0,R=s.length;j<R;j++)null==m[g=t[n=s[j]]]&&(m[g]=++w),r[n]={old:g,new:m[g]},o=m[g]-n,null!=b&&o===u||(b&&c.push(b),S.push(n),u=o),b=n;for(b&&c.push(b),c.push(65535),S.push(65535),A=2*(L=S.length),h=Math.log((N=2*Math.pow(Math.log(L)/Math.LN2,2))/2)/Math.LN2,y=2*L-N,a=[],k=[],l=[],d=F=0,O=S.length;F<O;d=++F){if(f=c[d],65535===(x=S[d])){a.push(0),k.push(0);break}if(x-(M=r[x].new)>=32768)for(a.push(0),k.push(2*(l.length+L-d)),n=P=x;x<=f?P<=f:P>=f;n=x<=f?++P:--P)l.push(r[n].new);else a.push(M-x),k.push(0)}for(E.writeUInt16(3),E.writeUInt16(1),E.writeUInt32(12),E.writeUInt16(4),E.writeUInt16(16+8*L+2*l.length),E.writeUInt16(0),E.writeUInt16(A),E.writeUInt16(N),E.writeUInt16(h),E.writeUInt16(y),U=0,C=c.length;U<C;U++)E.writeUInt16(n=c[U]);for(E.writeUInt16(0),_=0,T=S.length;_<T;_++)E.writeUInt16(n=S[_]);for(H=0,B=a.length;H<B;H++)E.writeUInt16(o=a[H]);for(W=0,D=k.length;W<D;W++)E.writeUInt16(k[W]);for(G=0,z=l.length;G<z;G++)E.writeUInt16(v=l[G]);return{charMap:r,subtable:E.data,maxGlyphID:w+1}}},t}(),_e=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="cmap",t.prototype.parse=function(t){var i,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)i=new Ue(t,this.offset),this.tables.push(i),i.isUnicode&&null==this.unicode&&(this.unicode=i);return!0},t.encode=function(t,i){var r,n;return null==i&&(i="macroman"),r=Ue.encode(t,i),(n=new Re).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},t}(),Ve=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="hhea",t.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()},t}(),He=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="OS/2",t.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 i,r;for(r=[],i=0;i<10;++i)r.push(t.readByte());return r}(),this.charRange=function(){var i,r;for(r=[],i=0;i<4;++i)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 i,r;for(r=[],i=0;i<2;i=++i)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()},t}(),We=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="post",t.prototype.parse=function(t){var i,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 e;for(r=t.readUInt16(),this.glyphNameIndex=[],e=0;0<=r?e<r:e>r;e=0<=r?++e:--e)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)i=t.readByte(),n.push(this.names.push(t.readString(i)));return n;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=function(){var i,r,n;for(n=[],e=i=0,r=this.file.maxp.numGlyphs;0<=r?i<r:i>r;e=0<=r?++i:--i)n.push(t.readUInt32());return n}.call(this)}},t}(),Ge=function(t,i){this.raw=t,this.length=t.length,this.platformID=i.platformID,this.encodingID=i.encodingID,this.languageID=i.languageID},$e=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="name",t.prototype.parse=function(t){var i,r,n,e,s,o,a,u,f,c,h;for(t.pos=this.offset,t.readShort(),i=t.readShort(),o=t.readShort(),r=[],e=0;0<=i?e<i:e>i;e=0<=i?++e:--e)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(a={},e=f=0,c=r.length;f<c;e=++f)t.pos=(n=r[e]).offset,u=t.readString(n.length),s=new Ge(u,n),null==a[h=n.nameID]&&(a[h]=[]),a[n.nameID].push(s);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},t}(),Je=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="maxp",t.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()},t}(),Ke=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="hmtx",t.prototype.parse=function(t){var i,r,n,e,s,o;for(t.pos=this.offset,this.metrics=[],i=0,s=this.file.hhea.numberOfMetrics;0<=s?i<s:i>s;i=0<=s?++i:--i)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var r,e;for(e=[],i=r=0;0<=n?r<n:r>n;i=0<=n?++r:--r)e.push(t.readInt16());return e}(),this.widths=function(){var t,i,r,n;for(n=[],t=0,i=(r=this.metrics).length;t<i;t++)n.push(r[t].advance);return n}.call(this),r=this.widths[this.widths.length-1],o=[],i=e=0;0<=n?e<n:e>n;i=0<=n?++e:--e)o.push(this.widths.push(r));return o},t.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]}},t}(),Ze=[].slice,Ye=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var i,r,n,e,s,o,a,u,f,c;return t in this.cache?this.cache[t]:(i=this.file.contents,r=(e=this.file.loca).indexOf(t),0===(n=e.lengthOf(t))?this.cache[t]=null:(i.pos=this.offset+r,s=(o=new Re(i.read(n))).readShort(),u=o.readShort(),c=o.readShort(),a=o.readShort(),f=o.readShort(),this.cache[t]=-1===s?new Qe(o,u,c,a,f):new Xe(o,s,u,c,a,f),this.cache[t]))},t.prototype.encode=function(t,i,r){var n,e,s,o,a;for(s=[],e=[],o=0,a=i.length;o<a;o++)n=t[i[o]],e.push(s.length),n&&(s=s.concat(n.encode(r)));return e.push(s.length),{table:s,offsets:e}},t}(),Xe=function(){function t(t,i,r,n,e,s){this.raw=t,this.numberOfContours=i,this.xMin=r,this.yMin=n,this.xMax=e,this.yMax=s,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),Qe=function(){function t(t,i,r,n,e){var s,o;for(this.raw=t,this.xMin=i,this.yMin=r,this.xMax=n,this.yMax=e,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;o=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&o;)s.pos+=1&o?4:2,128&o?s.pos+=8:64&o?s.pos+=4:8&o&&(s.pos+=2)}return t.prototype.encode=function(){var t,i,r;for(i=new Re(Ze.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)i.pos=this.glyphOffsets[t];return i.data},t}(),ts=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Te(t,Ie),t.prototype.tag="loca",t.prototype.parse=function(t){var i;return t.pos=this.offset,this.offsets=0===this.file.head.indexToLocFormat?function(){var r,n;for(n=[],i=0,r=this.length;i<r;i+=2)n.push(2*t.readUInt16());return n}.call(this):function(){var r,n;for(n=[],i=0,r=this.length;i<r;i+=4)n.push(t.readUInt32());return n}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,i){for(var r=new Uint32Array(this.offsets.length),n=0,e=0,s=0;s<r.length;++s)if(r[s]=n,e<i.length&&i[e]==s){++e,r[s]=n;var o=this.offsets[s+1]-this.offsets[s];o>0&&(n+=o)}for(var a=Array(4*r.length),u=0;u<r.length;++u)a[4*u+3]=255&r[u],a[4*u+2]=(65280&r[u])>>8,a[4*u+1]=(16711680&r[u])>>16,a[4*u]=(4278190080&r[u])>>24;return a},t}(),is=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,i,r,n;for(i in r=this.font.cmap.tables[0].codeMap,t={},n=this.subset)t[i]=r[n[i]];return t},t.prototype.glyphsFor=function(t){var i,r,n,e,s,o,a;for(n={},s=0,o=t.length;s<o;s++)n[e=t[s]]=this.font.glyf.glyphFor(e);for(e in i=[],n)(null!=(r=n[e])?r.compound:void 0)&&i.push.apply(i,r.glyphIDs);if(i.length>0)for(e in a=this.glyphsFor(i))n[e]=r=a[e];return n},t.prototype.encode=function(t,i){var r,n,e,s,o,a,u,f,c,h,l,d,v,p;for(n in r=_e.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(t),h={0:0},p=r.charMap)h[(o=p[n]).old]=o.new;for(l in c=r.maxGlyphID,s)l in h||(h[l]=c++);return u=function(t){var i,r;for(i in r={},t)r[t[i]]=i;return r}(h),f=Object.keys(u).sort((function(t,i){return t-i})),d=function(){var t,i,r;for(r=[],t=0,i=f.length;t<i;t++)r.push(u[f[t]]);return r}(),e=this.font.glyf.encode(s,d,h),a=this.font.loca.encode(e.offsets,d),v={cmap:this.font.cmap.raw(),glyf:e.table,loca:a,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(i)},this.font.os2.exists&&(v["OS/2"]=this.font.os2.raw()),this.font.directory.encode(v)},t}();an.API.PDFObject=function(){var t;function i(){}return t=function(t,i){return(Array(i+1).join("0")+t).slice(-i)},i.convert=function(r){var n,e;if(Array.isArray(r))return"["+function(){var t,n,e;for(e=[],t=0,n=r.length;t<n;t++)e.push(i.convert(r[t]));return e}().join(" ")+"]";if("string"==typeof r)return"/"+r;if(null!=r?r.isString:void 0)return"("+r+")";if(r instanceof Date)return"(D:"+t(r.getUTCFullYear(),4)+t(r.getUTCMonth(),2)+t(r.getUTCDate(),2)+t(r.getUTCHours(),2)+t(r.getUTCMinutes(),2)+t(r.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(r)){for(n in e=["<<"],r)e.push("/"+n+" "+i.convert(r[n]));return e.push(">>"),e.join("\n")}return""+r},i}();var rs,ns,es,ss,os,as,us,fs,cs,hs,ls,ds,vs,ps,bs,ms,ws=a(function(){if(De)return Be;De=1;var t={}.hasOwnProperty,i=/[ -,\.\/:-@\[-\^`\{-~]/,r=/[ -,\.\/:-@\[\]\^`\{-~]/,n=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,e=function e(s,o){"single"!=(o=function(i,r){if(!i)return r;var n={};for(var e in r)n[e]=t.call(i,e)?i[e]:r[e];return n}(o,e.options)).quotes&&"double"!=o.quotes&&(o.quotes="single");for(var a="double"==o.quotes?'"':"'",u=o.isIdentifier,f=s.charAt(0),c="",h=0,l=s.length;h<l;){var d=s.charAt(h++),v=d.charCodeAt(),p=void 0;if(v<32||v>126){if(v>=55296&&v<=56319&&h<l){var b=s.charCodeAt(h++);56320==(64512&b)?v=((1023&v)<<10)+(1023&b)+65536:h--}p="\\"+v.toString(16).toUpperCase()+" "}else p=o.escapeEverything?i.test(d)?"\\"+d:"\\"+v.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(d)?"\\"+v.toString(16).toUpperCase()+" ":"\\"==d||!u&&('"'==d&&a==d||"'"==d&&a==d)||u&&r.test(d)?"\\"+d:d;c+=p}return u&&(/^-[-\d]/.test(c)?c="\\-"+c.slice(1):/\d/.test(f)&&(c="\\3"+f+" "+c.slice(1))),c=c.replace(n,(function(t,i,r){return i&&i.length%2?t:(i||"")+r})),!u&&o.wrap?a+c+a:c};return e.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},e.version="3.0.0",Be=e}()),gs=function(){if(ns)return rs;ns=1;var t=/[a-z0-9_-]/i,i=/[\s\t]/,r=/[^a-z0-9_-]/i;return rs={parse:function(r){for(var n,e,s=!0,o=0,a="",u=0,f=[];;){if(e=r[u],0===o){if(!e&&s)break;if(!e&&!s)throw Error("Parse error");if('"'===e||"'"===e)n=e,o=1,s=!1;else if(i.test(e));else{if(!t.test(e))throw Error("Parse error");o=3,s=!1,u--}}else if(1===o){if(!e)throw Error("Parse Error");"\\"===e?o=2:e===n?(f.push(a),a="",o=4):a+=e}else if(2===o){if(e!==n&&"\\"!==e)throw Error("Parse error");a+=e,o=1}else if(3===o){if(!e){f.push(a);break}t.test(e)?a+=e:","===e?(f.push(a),a="",o=0):i.test(e)?o=5:"\\"===e&&(o=6)}else if(6===o){if(/[0-9a-f]/i.test(e))throw Error("Parse error");a+=e,o=3}else if(5===o){if(!e){f.push(a);break}if(t.test(e))a+=" "+e,o=3;else if(","===e)f.push(a),a="",o=0;else if(!i.test(e))throw Error("Parse error")}else if(4===o){if(!e)break;if(","===e)o=0;else if(!i.test(e))throw Error("Parse error")}u++}return f},stringify:function(t,i){var n=i&&i.quote||'"';if('"'!==n&&"'"!==n)throw Error("Quote must be `'` or `\"`");for(var e=RegExp(n,"g"),s=[],o=0;o<t.length;++o){var a=t[o];r.test(a)&&(a=n+(a=a.replace(/\\/g,"\\\\").replace(e,"\\"+n))+n),s.push(a)}return s.join(", ")}},rs}(),ks=a(gs);function ys(){if(as)return os;function t(t,i){return[t[0]*i[0]+t[2]*i[1],t[1]*i[0]+t[3]*i[1],t[0]*i[2]+t[2]*i[3],t[1]*i[2]+t[3]*i[3],t[0]*i[4]+t[2]*i[5]+t[4],t[1]*i[4]+t[3]*i[5]+t[5]]}function i(){if(!(this instanceof i))return new i;this.queue=[],this.cache=null}return as=1,i.prototype.matrix=function(t){return 1===t[0]&&0===t[1]&&0===t[2]&&1===t[3]&&0===t[4]&&0===t[5]||(this.cache=null,this.queue.push(t)),this},i.prototype.translate=function(t,i){return 0===t&&0===i||(this.cache=null,this.queue.push([1,0,0,1,t,i])),this},i.prototype.scale=function(t,i){return 1===t&&1===i||(this.cache=null,this.queue.push([t,0,0,i,0,0])),this},i.prototype.rotate=function(t,i,r){var n,e,s;return 0!==t&&(this.translate(i,r),this.queue.push([e=Math.cos(n=t*Math.PI/180),s=Math.sin(n),-s,e,0,0]),this.cache=null,this.translate(-i,-r)),this},i.prototype.skewX=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},i.prototype.skewY=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},i.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],1===this.queue.length)return this.cache;for(var i=1;i<this.queue.length;i++)this.cache=t(this.cache,this.queue[i]);return this.cache},i.prototype.calc=function(t,i,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),[t*(n=this.cache)[0]+i*n[2]+(r?0:n[4]),t*n[1]+i*n[3]+(r?0:n[5])]):[t,i]},os=i}function Ns(){if(hs)return cs;hs=1;var t=2*Math.PI;function i(t,i,r,n){var e=t*r+i*n;return e>1&&(e=1),e<-1&&(e=-1),(t*n-i*r<0?-1:1)*Math.acos(e)}function r(t,i){var r=4/3*Math.tan(i/4),n=Math.cos(t),e=Math.sin(t),s=Math.cos(t+i),o=Math.sin(t+i);return[n,e,n-e*r,e+n*r,s+o*r,o-s*r,s,o]}return cs=function(n,e,s,o,a,u,f,c,h){var l=Math.sin(h*t/360),d=Math.cos(h*t/360),v=d*(n-s)/2+l*(e-o)/2,p=-l*(n-s)/2+d*(e-o)/2;if(0===v&&0===p)return[];if(0===f||0===c)return[];var b=v*v/((f=Math.abs(f))*f)+p*p/((c=Math.abs(c))*c);b>1&&(f*=Math.sqrt(b),c*=Math.sqrt(b));var m=function(r,n,e,s,o,a,u,f,c,h){var l=h*(r-e)/2+c*(n-s)/2,d=-c*(r-e)/2+h*(n-s)/2,v=u*u,p=f*f,b=l*l,m=d*d,w=v*p-v*m-p*b;w<0&&(w=0);var g=(w=Math.sqrt(w/=v*m+p*b)*(o===a?-1:1))*u/f*d,k=w*-f/u*l,y=h*g-c*k+(r+e)/2,N=c*g+h*k+(n+s)/2,L=(l-g)/u,A=(d-k)/f,x=(-l-g)/u,S=(-d-k)/f,M=i(1,0,L,A),E=i(L,A,x,S);return 0===a&&E>0&&(E-=t),1===a&&E<0&&(E+=t),[y,N,M,E]}(n,e,s,o,a,u,f,c,l,d),w=[],g=m[2],k=m[3],y=Math.max(Math.ceil(Math.abs(k)/(t/4)),1);k/=y;for(var N=0;N<y;N++)w.push(r(g,k)),g+=k;return w.map((function(t){for(var i=0;i<t.length;i+=2){var r=t[i+0],n=t[i+1],e=l*(r*=f)+d*(n*=c);t[i+0]=d*r-l*n+m[0],t[i+1]=e+m[1]}return t}))},cs}function Ls(){if(ds)return ls;ds=1;var t=1e-10,i=Math.PI/180;function r(t,i,n){if(!(this instanceof r))return new r(t,i,n);this.rx=t,this.ry=i,this.ax=n}return r.prototype.transform=function(r){var n=Math.cos(this.ax*i),e=Math.sin(this.ax*i),s=[this.rx*(r[0]*n+r[2]*e),this.rx*(r[1]*n+r[3]*e),this.ry*(-r[0]*e+r[2]*n),this.ry*(-r[1]*e+r[3]*n)],o=s[0]*s[0]+s[2]*s[2],a=s[1]*s[1]+s[3]*s[3],u=((s[0]-s[3])*(s[0]-s[3])+(s[2]+s[1])*(s[2]+s[1]))*((s[0]+s[3])*(s[0]+s[3])+(s[2]-s[1])*(s[2]-s[1])),f=(o+a)/2;if(u<t*f)return this.rx=this.ry=Math.sqrt(f),this.ax=0,this;var c=s[0]*s[1]+s[2]*s[3],h=f+(u=Math.sqrt(u))/2,l=f-u/2;return this.ax=Math.abs(c)<t&&Math.abs(h-a)<t?90:180*Math.atan(Math.abs(c)>Math.abs(h-a)?(h-o)/c:c/(h-a))/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(l)):(this.ax+=90,this.rx=Math.sqrt(l),this.ry=Math.sqrt(h)),this},r.prototype.isDegenerate=function(){return this.rx<t*this.ry||this.ry<t*this.rx},ls=r}var As=a(ms?bs:(ms=1,bs=function(){if(ps)return vs;ps=1;var t=function(){if(ss)return es;ss=1;var t={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function r(t){return 10===t||13===t||8232===t||8233===t||32===t||9===t||11===t||12===t||160===t||t>=5760&&i.indexOf(t)>=0}function n(t){return t>=48&&t<=57}function e(t){return t>=48&&t<=57||43===t||45===t||46===t}function s(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function o(t){for(;t.index<t.max&&r(t.path.charCodeAt(t.index));)t.index++}function a(t){var i=t.path.charCodeAt(t.index);return 48===i?(t.param=0,void t.index++):49===i?(t.param=1,void t.index++):void(t.err="SvgPath: arc flag can be 0 or 1 only (at pos "+t.index+")")}function u(t){var i,r=t.index,e=r,s=t.max,o=!1,a=!1,u=!1,f=!1;if(e>=s)t.err="SvgPath: missed param (at pos "+e+")";else if(43!==(i=t.path.charCodeAt(e))&&45!==i||(i=++e<s?t.path.charCodeAt(e):0),n(i)||46===i){if(46!==i){if(o=48===i,i=++e<s?t.path.charCodeAt(e):0,o&&e<s&&i&&n(i))return void(t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+r+")");for(;e<s&&n(t.path.charCodeAt(e));)e++,a=!0;i=e<s?t.path.charCodeAt(e):0}if(46===i){for(f=!0,e++;n(t.path.charCodeAt(e));)e++,u=!0;i=e<s?t.path.charCodeAt(e):0}if(101===i||69===i){if(f&&!a&&!u)return void(t.err="SvgPath: invalid float exponent (at pos "+e+")");if(43!==(i=++e<s?t.path.charCodeAt(e):0)&&45!==i||e++,!(e<s&&n(t.path.charCodeAt(e))))return void(t.err="SvgPath: invalid float exponent (at pos "+e+")");for(;e<s&&n(t.path.charCodeAt(e));)e++}t.index=e,t.param=parseFloat(t.path.slice(r,e))+0}else t.err="SvgPath: param should start with 0..9 or `.` (at pos "+e+")"}function f(i){var r,n;n=(r=i.path[i.segmentStart]).toLowerCase();var e=i.data;if("m"===n&&e.length>2&&(i.result.push([r,e[0],e[1]]),e=e.slice(2),n="l",r="m"===r?"l":"L"),"r"===n)i.result.push([r].concat(e));else for(;e.length>=t[n]&&(i.result.push([r].concat(e.splice(0,t[n]))),t[n]););}function c(i){var r,n,s,c,h,l=i.max;if(i.segmentStart=i.index,n=function(t){return 97==(32|t)}(r=i.path.charCodeAt(i.index)),function(t){switch(32|t){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}(r))if(c=t[i.path[i.index].toLowerCase()],i.index++,o(i),i.data=[],c){for(s=!1;;){for(h=c;h>0;h--){if(!n||3!==h&&4!==h?u(i):a(i),i.err.length)return void f(i);i.data.push(i.param),o(i),s=!1,i.index<l&&44===i.path.charCodeAt(i.index)&&(i.index++,o(i),s=!0)}if(!s){if(i.index>=i.max)break;if(!e(i.path.charCodeAt(i.index)))break}}f(i)}else f(i);else i.err="SvgPath: bad command "+i.path[i.index]+" (at pos "+i.index+")"}return es=function(t){var i=new s(t),r=i.max;for(o(i);i.index<r&&!i.err.length;)c(i);return i.result.length&&("mM".indexOf(i.result[0][0])<0?(i.err="SvgPath: string should start with `M` or `m`",i.result=[]):i.result[0][0]="M"),{err:i.err,segments:i.result}}}(),i=function(){if(fs)return us;fs=1;var t=ys(),i={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},r=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,n=/[\s,]+/;return us=function(e){var s,o,a=new t;return e.split(r).forEach((function(t){if(t.length)if(void 0===i[t])switch(o=t.split(n).map((function(t){return+t||0})),s){case"matrix":return void(6===o.length&&a.matrix(o));case"scale":return void(1===o.length?a.scale(o[0],o[0]):2===o.length&&a.scale(o[0],o[1]));case"rotate":return void(1===o.length?a.rotate(o[0],0,0):3===o.length&&a.rotate(o[0],o[1],o[2]));case"translate":return void(1===o.length?a.translate(o[0],0):2===o.length&&a.translate(o[0],o[1]));case"skewX":return void(1===o.length&&a.skewX(o[0]));case"skewY":return void(1===o.length&&a.skewY(o[0]))}else s=t})),a},us}(),r=ys(),n=Ns(),e=Ls();function s(i){if(!(this instanceof s))return new s(i);var r=t(i);this.segments=r.segments,this.err=r.err,this.__stack=[]}return s.from=function(t){if("string"==typeof t)return new s(t);if(t instanceof s){var i=new s("");return i.err=t.err,i.segments=t.segments.map((function(t){return t.slice()})),i.__stack=t.__stack.map((function(t){return r().matrix(t.toArray())})),i}throw Error("SvgPath.from: invalid param type "+t)},s.prototype.__matrix=function(t){var i,r=this;t.queue.length&&this.iterate((function(n,s,o,a){var u,f,c,h;switch(n[0]){case"v":f=0===(u=t.calc(0,n[1],!0))[0]?["v",u[1]]:["l",u[0],u[1]];break;case"V":f=(u=t.calc(o,n[1],!1))[0]===t.calc(o,a,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":f=0===(u=t.calc(n[1],0,!0))[1]?["h",u[0]]:["l",u[0],u[1]];break;case"H":f=(u=t.calc(n[1],a,!1))[1]===t.calc(o,a,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var l=t.toArray(),d=e(n[1],n[2],n[3]).transform(l);if(l[0]*l[3]-l[1]*l[2]<0&&(n[5]=n[5]?"0":"1"),u=t.calc(n[6],n[7],"a"===n[0]),"A"===n[0]&&n[6]===o&&n[7]===a||"a"===n[0]&&0===n[6]&&0===n[7]){f=["a"===n[0]?"l":"L",u[0],u[1]];break}f=d.isDegenerate()?["a"===n[0]?"l":"L",u[0],u[1]]:[n[0],d.rx,d.ry,d.ax,n[4],n[5],u[0],u[1]];break;case"m":f=["m",(u=t.calc(n[1],n[2],h=s>0))[0],u[1]];break;default:for(f=[c=n[0]],h=c.toLowerCase()===c,i=1;i<n.length;i+=2)u=t.calc(n[i],n[i+1],h),f.push(u[0],u[1])}r.segments[s]=f}),!0)},s.prototype.__evaluateStack=function(){var t,i;if(this.__stack.length){if(1===this.__stack.length)return this.__matrix(this.__stack[0]),void(this.__stack=[]);for(t=r(),i=this.__stack.length;--i>=0;)t.matrix(this.__stack[i].toArray());this.__matrix(t),this.__stack=[]}},s.prototype.toString=function(){var t="",i="",r=!1;this.__evaluateStack();for(var n=0,e=this.segments.length;n<e;n++){var s=this.segments[n],o=s[0];o!==i||"m"===o||"M"===o?("m"===o&&"z"===i&&(t+=" "),t+=o,r=!1):r=!0;for(var a=1;a<s.length;a++){var u=s[a];1===a?r&&u>=0&&(t+=" "):u>=0&&(t+=" "),t+=u}i=o}return t},s.prototype.translate=function(t,i){return this.__stack.push(r().translate(t,i||0)),this},s.prototype.scale=function(t,i){return this.__stack.push(r().scale(t,i||0===i?i:t)),this},s.prototype.rotate=function(t,i,n){return this.__stack.push(r().rotate(t,i||0,n||0)),this},s.prototype.skewX=function(t){return this.__stack.push(r().skewX(t)),this},s.prototype.skewY=function(t){return this.__stack.push(r().skewY(t)),this},s.prototype.matrix=function(t){return this.__stack.push(r().matrix(t)),this},s.prototype.transform=function(t){return t.trim()?(this.__stack.push(i(t)),this):this},s.prototype.round=function(t){var i,r=0,n=0,e=0,s=0;return t=t||0,this.__evaluateStack(),this.segments.forEach((function(o){var a=o[0].toLowerCase()===o[0];switch(o[0]){case"H":case"h":return a&&(o[1]+=e),e=o[1]-o[1].toFixed(t),void(o[1]=+o[1].toFixed(t));case"V":case"v":return a&&(o[1]+=s),s=o[1]-o[1].toFixed(t),void(o[1]=+o[1].toFixed(t));case"Z":case"z":return e=r,void(s=n);case"M":case"m":return a&&(o[1]+=e,o[2]+=s),e=o[1]-o[1].toFixed(t),s=o[2]-o[2].toFixed(t),r=e,n=s,o[1]=+o[1].toFixed(t),void(o[2]=+o[2].toFixed(t));case"A":case"a":return a&&(o[6]+=e,o[7]+=s),e=o[6]-o[6].toFixed(t),s=o[7]-o[7].toFixed(t),o[1]=+o[1].toFixed(t),o[2]=+o[2].toFixed(t),o[3]=+o[3].toFixed(t+2),o[6]=+o[6].toFixed(t),void(o[7]=+o[7].toFixed(t));default:return i=o.length,a&&(o[i-2]+=e,o[i-1]+=s),e=o[i-2]-o[i-2].toFixed(t),s=o[i-1]-o[i-1].toFixed(t),void o.forEach((function(i,r){r&&(o[r]=+o[r].toFixed(t))}))}})),this},s.prototype.iterate=function(t,i){var r,n,e,s=this.segments,o={},a=!1,u=0,f=0,c=0,h=0;if(i||this.__evaluateStack(),s.forEach((function(i,r){var n=t(i,r,u,f);Array.isArray(n)&&(o[r]=n,a=!0);var e=i[0]===i[0].toLowerCase();switch(i[0]){case"m":case"M":return c=u=i[1]+(e?u:0),void(h=f=i[2]+(e?f:0));case"h":case"H":return void(u=i[1]+(e?u:0));case"v":case"V":return void(f=i[1]+(e?f:0));case"z":case"Z":return u=c,void(f=h);default:u=i[i.length-2]+(e?u:0),f=i[i.length-1]+(e?f:0)}})),!a)return this;for(e=[],r=0;r<s.length;r++)if(void 0!==o[r])for(n=0;n<o[r].length;n++)e.push(o[r][n]);else e.push(s[r]);return this.segments=e,this},s.prototype.abs=function(){return this.iterate((function(t,i,r,n){var e,s=t[0],o=s.toUpperCase();if(s!==o)switch(t[0]=o,s){case"v":return void(t[1]+=n);case"a":return t[6]+=r,void(t[7]+=n);default:for(e=1;e<t.length;e++)t[e]+=e%2?r:n}}),!0),this},s.prototype.rel=function(){return this.iterate((function(t,i,r,n){var e,s=t[0],o=s.toLowerCase();if(s!==o&&(0!==i||"M"!==s))switch(t[0]=o,s){case"V":return void(t[1]-=n);case"A":return t[6]-=r,void(t[7]-=n);default:for(e=1;e<t.length;e++)t[e]-=e%2?r:n}}),!0),this},s.prototype.unarc=function(){return this.iterate((function(t,i,r,e){var s,o,a,u=[],f=t[0];return"A"!==f&&"a"!==f?null:("a"===f?(o=r+t[6],a=e+t[7]):(o=t[6],a=t[7]),0===(s=n(r,e,o,a,t[4],t[5],t[1],t[2],t[3])).length?[["a"===t[0]?"l":"L",t[6],t[7]]]:(s.forEach((function(t){u.push(["C",t[2],t[3],t[4],t[5],t[6],t[7]])})),u))})),this},s.prototype.unshort=function(){var t,i,r,n,e,s=this.segments;return this.iterate((function(o,a,u,f){var c,h=o[0],l=h.toUpperCase();a&&("T"===l?("Q"===(r=s[a-1])[0]?(t=r[1]-u,i=r[2]-f):"q"===r[0]?(t=r[1]-r[3],i=r[2]-r[4]):(t=0,i=0),n=-t,e=-i,(c="t"===h)||(n+=u,e+=f),s[a]=[c?"q":"Q",n,e,o[1],o[2]]):"S"===l&&("C"===(r=s[a-1])[0]?(t=r[3]-u,i=r[4]-f):"c"===r[0]?(t=r[3]-r[5],i=r[4]-r[6]):(t=0,i=0),n=-t,e=-i,(c="s"===h)||(n+=u,e+=f),s[a]=[c?"c":"C",n,e,o[1],o[2],o[3],o[4]]))})),this},vs=s}())),xs=function(t){var i,r=t,n={a:0,b:0,c:0},e=[];return i=function(i,s){var o,a,u,f,c,h;if(i.test(r))for(a=0,u=(o=r.match(i)).length;a<u;a+=1)n[s]+=1,c=r.indexOf(f=o[a]),e.push({selector:t.substr(c,h=f.length),type:s,index:c,length:h}),r=r.replace(f,Array(h+1).join(" "))},function(){var t=function(t){var i,n,e,s;if(t.test(r))for(n=0,e=(i=r.match(t)).length;n<e;n+=1)r=r.replace(s=i[n],Array(s.length+1).join("A"))};t(/\\[0-9A-Fa-f]{6}\s?/g),t(/\\[0-9A-Fa-f]{1,5}\s/g),t(/\\./g)}(),function(){var t,i,n,e,s=/{[^]*/gm;if(s.test(r))for(i=0,n=(t=r.match(s)).length;i<n;i+=1)r=r.replace(e=t[i],Array(e.length+1).join(" "))}(),i(/(\[[^\]]+\])/g,"b"),i(/(#[^\#\s\+>~\.\[:\)]+)/g,"a"),i(/(\.[^\s\+>~\.\[:\)]+)/g,"b"),i(/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,"c"),i(/(:(?!not|global|local)[\w-]+\([^\)]*\))/gi,"b"),i(/(:(?!not|global|local)[^\s\+>~\.\[:]+)/g,"b"),r=(r=(r=(r=(r=(r=r.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," ")).replace(/:not/g," ")).replace(/:local/g," ")).replace(/:global/g," ")).replace(/[\(\)]/g," "),i(/([^\s\+>~\.\[:]+)/g,"c"),e.sort((function(t,i){return t.index-i.index})),{selector:t,specificity:"0,"+n.a+","+n.b+","+n.c,specificityArray:[0,n.a,n.b,n.c],parts:e}},Ss=function(t,i){return Ss=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},Ss(t,i)};function Ms(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+i+" is not a constructor or null");function r(){this.constructor=t}Ss(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}var Es=function(){return Es=Object.assign||function(t){for(var i,r=1,n=arguments.length;r<n;r++)for(var e in i=arguments[r])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},Es.apply(this,arguments)};function qs(t,i,r,n){return new(r||(r=Promise))((function(e,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))}function js(t,i){var r,n,e,s={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(e=2&a[0]?n.return:a[0]?n.throw||((e=n.return)&&e.call(n),0):n.next)&&!(e=e.call(n,a[1])).done)return e;switch(n=0,e&&(a=[2&a[0],e.value]),a[0]){case 0:case 1:e=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((e=(e=s.trys).length>0&&e[e.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!e||a[1]>e[0]&&a[1]<e[3])){s.label=a[1];break}if(6===a[0]&&s.label<e[1]){s.label=e[1],e=a;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(a);break}e[2]&&s.ops.pop(),s.trys.pop();continue}a=i.call(t,s)}catch(t){a=[6,t],n=0}finally{r=e=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}"function"==typeof SuppressedError&&SuppressedError;var Fs=function(){function t(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 i 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==i&&(t=this.simpleColors[i]);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(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[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(t){return[Math.round(2.55*parseFloat(t[1])),Math.round(2.55*parseFloat(t[2])),Math.round(2.55*parseFloat(t[3]))]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}];for(var r=0;r<this.colorDefs.length;r++){var n=this.colorDefs[r].process,e=this.colorDefs[r].re.exec(t);if(e){var s=n(e);this.r=s[0],this.g=s[1],this.b=s[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 t.prototype.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},t.prototype.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+(this.a||"1")+")"},t.prototype.toHex=function(){var t=this.r.toString(16),i=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==i.length&&(i="0"+i),1==r.length&&(r="0"+r),"#"+t+i+r},t.prototype.getHelpXML=function(){for(var i=[],r=0;r<this.colorDefs.length;r++)for(var n=this.colorDefs[r].example,e=0;e<n.length;e++)i[i.length]=n[e];for(var s in this.simpleColors)i[i.length]=s;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),r=0;r<i.length;r++)try{var a=document.createElement("li"),u=new t(i[r]),f=document.createElement("div");f.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),f.appendChild(document.createTextNode("test"));var c=document.createTextNode(" "+i[r]+" -> "+u.toRGB()+" -> "+u.toHex());a.appendChild(f),a.appendChild(c),o.appendChild(a)}catch(t){}return o},t}(),Ps=function(){function t(t){this.color=t}return t.prototype.getFillData=function(){return qs(this,void 0,void 0,(function(){return js(this,(function(){return[2,void 0]}))}))},t}(),Is=function(){function t(){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 t.prototype.clone=function(){var i=new t;return i.xmlSpace=this.xmlSpace,i.whiteSpace=this.whiteSpace,i.fill=this.fill,i.fillOpacity=this.fillOpacity,i.fontFamily=this.fontFamily,i.fontSize=this.fontSize,i.fontStyle=this.fontStyle,i.fontWeight=this.fontWeight,i.opacity=this.opacity,i.stroke=this.stroke,i.strokeDasharray=this.strokeDasharray,i.strokeDashoffset=this.strokeDashoffset,i.strokeLinecap=this.strokeLinecap,i.strokeLinejoin=this.strokeLinejoin,i.strokeMiterlimit=this.strokeMiterlimit,i.strokeOpacity=this.strokeOpacity,i.strokeWidth=this.strokeWidth,i.textAnchor=this.textAnchor,i.alignmentBaseline=this.alignmentBaseline,i.visibility=this.visibility,i.color=this.color,i.fillRule=this.fillRule,i.contextFill=this.contextFill,i.contextStroke=this.contextStroke,i},t.default=function(){var i=new t;return i.xmlSpace="default",i.whiteSpace="normal",i.fill=new Ps(new Fs("rgb(0, 0, 0)")),i.fillOpacity=1,i.fontFamily="times",i.fontSize=16,i.fontStyle="normal",i.fontWeight="normal",i.opacity=1,i.stroke=null,i.strokeDasharray=null,i.strokeDashoffset=0,i.strokeLinecap="butt",i.strokeLinejoin="miter",i.strokeMiterlimit=4,i.strokeOpacity=1,i.strokeWidth=1,i.alignmentBaseline="baseline",i.textAnchor="start",i.visibility="visible",i.color=new Fs("rgb(0, 0, 0)"),i.fillRule="nonzero",i.contextFill=null,i.contextStroke=null,i},t.getContextColors=function(t,i){void 0===i&&(i=!1);var r={};return t.attributeState.contextFill&&(r.contextFill=t.attributeState.contextFill),t.attributeState.contextStroke&&(r.contextStroke=t.attributeState.contextStroke),i&&t.attributeState.color&&(r.color=t.attributeState.color),r},t}(),Rs=function(){function t(t,i){var r,n,e;this.pdf=t,this.svg2pdfParameters=i.svg2pdfParameters,this.attributeState=i.attributeState?i.attributeState.clone():Is.default(),this.viewport=i.viewport,this.refsHandler=i.refsHandler,this.styleSheets=i.styleSheets,this.textMeasure=i.textMeasure,this.transform=null!==(r=i.transform)&&void 0!==r?r:this.pdf.unitMatrix,this.withinClipPath=null!==(n=i.withinClipPath)&&void 0!==n&&n,this.withinUse=null!==(e=i.withinUse)&&void 0!==e&&e}return t.prototype.clone=function(i){var r,n,e,s;return void 0===i&&(i={}),new t(this.pdf,{svg2pdfParameters:this.svg2pdfParameters,attributeState:i.attributeState?i.attributeState.clone():this.attributeState.clone(),viewport:null!==(r=i.viewport)&&void 0!==r?r:this.viewport,refsHandler:this.refsHandler,styleSheets:this.styleSheets,textMeasure:this.textMeasure,transform:null!==(n=i.transform)&&void 0!==n?n:this.transform,withinClipPath:null!==(e=i.withinClipPath)&&void 0!==e?e:this.withinClipPath,withinUse:null!==(s=i.withinUse)&&void 0!==s?s:this.withinUse})},t}(),Os=function(){function t(i){this.renderedElements={},this.idMap=i,this.idPrefix=t.instanceCounter+++""}return t.prototype.getRendered=function(t,i,r){return qs(this,void 0,void 0,(function(){var n,e;return js(this,(function(s){switch(s.label){case 0:return n=this.generateKey(t,i),this.renderedElements.hasOwnProperty(n)?[2,this.renderedElements[t]]:(e=this.get(t),this.renderedElements[n]=e,[4,r(e)]);case 1:return s.sent(),[2,e]}}))}))},t.prototype.get=function(t){return this.idMap[ws(t,{isIdentifier:!0})]},t.prototype.generateKey=function(t,i){var r="";return i&&(r=["color","contextFill","contextStroke"].map((function(t){var r,n;return null!==(n=null===(r=i[t])||void 0===r?void 0:r.toRGBA())&&void 0!==n?n:""})).join("|")),this.idPrefix+"|"+t+"|"+r},t.instanceCounter=0,t}();function Cs(t,i){return Math.atan2(i[1]-t[1],i[0]-t[0])}var Ts=2/3;function Bs(t,i){return[Ts*(i[0]-t[0])+t[0],Ts*(i[1]-t[1])+t[1]]}function Ds(t){var i=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/i,t[1]/i]}function zs(t,i){return Ds([i[0]-t[0],i[1]-t[1]])}function Us(t,i){return[t[0]+i[0],t[1]+i[1]]}function _s(t,i){var r=t[0],n=t[1];return[i.a*r+i.c*n+i.e,i.b*r+i.d*n+i.f]}var Vs=function(){function t(){this.segments=[]}return t.prototype.moveTo=function(t,i){return this.segments.push(new Hs(t,i)),this},t.prototype.lineTo=function(t,i){return this.segments.push(new Ws(t,i)),this},t.prototype.curveTo=function(t,i,r,n,e,s){return this.segments.push(new Gs(t,i,r,n,e,s)),this},t.prototype.close=function(){return this.segments.push(new $s),this},t.prototype.transform=function(t){this.segments.forEach((function(i){if(i instanceof Hs||i instanceof Ws||i instanceof Gs){var r=_s([i.x,i.y],t);i.x=r[0],i.y=r[1]}if(i instanceof Gs){var n=_s([i.x1,i.y1],t),e=_s([i.x2,i.y2],t);i.x1=n[0],i.y1=n[1],i.x2=e[0],i.y2=e[1]}}))},t.prototype.draw=function(t){var i=t.pdf;this.segments.forEach((function(t){t instanceof Hs?i.moveTo(t.x,t.y):t instanceof Ws?i.lineTo(t.x,t.y):t instanceof Gs?i.curveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y):i.close()}))},t}(),Hs=function(t,i){this.x=t,this.y=i},Ws=function(t,i){this.x=t,this.y=i},Gs=function(t,i,r,n,e,s){this.x1=t,this.y1=i,this.x2=r,this.y2=n,this.x=e,this.y=s},$s=function(){};function Js(t,i){return i.split(",").indexOf((t.nodeName||t.tagName).toLowerCase())>=0}function Ks(t,i,r,n){var e;return void 0===n&&(n=r),(null===(e=t.style)||void 0===e?void 0:e.getPropertyValue(n))||i.getPropertyValue(t,n)||t.hasAttribute(r)&&t.getAttribute(r)||void 0}function Zs(t,i,r){if("none"===Ks(t.element,r.styleSheets,"display"))return!1;var n=i,e=Ks(t.element,r.styleSheets,"visibility");return e&&(n="hidden"!==e),n}function Ys(t,i,r){var n=Zs(t,i,r);return 0!==t.element.childNodes.length&&(t.children.forEach((function(t){t.isVisible(n,r)&&(n=!0)})),n)}var Xs=function(){function t(){this.markers=[]}return t.prototype.addMarker=function(t){this.markers.push(t)},t.prototype.draw=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s,o,a,u;return js(this,(function(f){switch(f.label){case 0:i=0,f.label=1;case 1:return i<this.markers.length?(n=void 0,s=(r=this.markers[i]).anchor,n=t.pdf.Matrix(o=Math.cos(e=r.angle),a=Math.sin(e),-a,o,s[0],s[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(),u=Is.getContextColors(t),[4,t.refsHandler.getRendered(r.id,u,(function(i){return i.apply(t)}))]):[3,4];case 2:f.sent(),t.pdf.doFormObject(t.refsHandler.generateKey(r.id,u),n),t.pdf.restoreGraphicsState(),f.label=3;case 3:return i++,[3,1];case 4:return[2]}}))}))},t}(),Qs=function(t,i,r,n){void 0===n&&(n=!1),this.id=t,this.anchor=i,this.angle=r,this.isStartMarker=n},to=/url\(["']?#([^"']+)["']?\)/,io={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"},ro="http://www.w3.org/2000/svg";function no(t,i){var r;return(r=t&&(""+t).match(/^([-0-9.]+)em$/))?parseFloat(r[1])*i:(r=t&&(""+t).match(/^([-0-9.]+)(px|)$/))?parseFloat(r[1]):0}function eo(t){return io[t]||"alphabetic"}function so(t){for(var i,r=[],n=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g;i=n.exec(t);)r.push(parseFloat(i[0]));return r}function oo(t,i){if("transparent"===t){var r=new Fs("rgb(0,0,0)");return r.a=0,r}if(i&&"currentcolor"===t.toLowerCase())return i.color||new Fs("rgb(0,0,0)");if(i&&"context-stroke"===t.toLowerCase())return i.contextStroke||new Fs("rgb(0,0,0)");if(i&&"context-fill"===t.toLowerCase())return i.contextFill||new Fs("rgb(0,0,0)");var n=/\s*rgba\(((?:[^,)]*,){3}[^,)]*)\)\s*/.exec(t);if(n){var e=so(n[1]),s=new Fs("rgb("+e.slice(0,3).join(",")+")");return s.a=e[3],s}return new Fs(t)}var ao,uo={"sans-serif":"helvetica",verdana:"helvetica",arial:"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",serif:"times",cursive:"times",fantasy:"times"},fo=(ao=an.version.split("."),2===parseFloat(ao[0])&&3===parseFloat(ao[1]));function co(t,i){return fo?400==i?"italic"==t?"italic":"normal":700==i&&"italic"!==t?"bold":t+""+i:400==i||"normal"===i?"italic"===t?"italic":"normal":700!=i&&"bold"!==i||"normal"!==t?(700==i?"bold":i)+""+t:"bold"}function ho(t,i){if("none"===Ks(i.element,t.styleSheets,"display"))return[0,0,0,0];var r=[];return i.children.forEach((function(i){var n=i.getBoundingBox(t);if(0!==n[0]||0!==n[1]||0!==n[2]||0!==n[3]){var e=i.computeNodeTransform(t);n[0]=n[0]*e.sx+e.tx,n[1]=n[1]*e.sy+e.ty,n[2]=n[2]*e.sx,n[3]=n[3]*e.sy,r=0===r.length?n:[Math.min(r[0],n[0]),Math.min(r[1],n[1]),Math.max(r[0]+r[2],n[0]+n[2])-Math.min(r[0],n[0]),Math.max(r[1]+r[3],n[1]+n[3])-Math.min(r[1],n[1])]}})),0===r.length?[0,0,0,0]:r}function lo(t,i){var r=parseFloat,n=r(t.getAttribute("x1"))||r(Ks(t,i.styleSheets,"x"))||r(Ks(t,i.styleSheets,"cx"))-r(Ks(t,i.styleSheets,"r"))||0,e=r(t.getAttribute("x2"))||n+r(Ks(t,i.styleSheets,"width"))||r(Ks(t,i.styleSheets,"cx"))+r(Ks(t,i.styleSheets,"r"))||0,s=r(t.getAttribute("y1"))||r(Ks(t,i.styleSheets,"y"))||r(Ks(t,i.styleSheets,"cy"))-r(Ks(t,i.styleSheets,"r"))||0,o=r(t.getAttribute("y2"))||s+r(Ks(t,i.styleSheets,"height"))||r(Ks(t,i.styleSheets,"cy"))+r(Ks(t,i.styleSheets,"r"))||0;return[Math.min(n,e),Math.min(s,o),Math.max(n,e)-Math.min(n,e),Math.max(s,o)-Math.min(s,o)]}function vo(t,i,r,n,e,s,o,a){void 0===a&&(a=!1);var u,f,c=i[0],h=i[1],l=i[2],d=i[3],v=e/l,p=s/d,b=t.getAttribute("preserveAspectRatio");if(b){var m=b.split(" ");"defer"===m[0]&&(m=m.slice(1)),u=m[0],f=m[1]||"meet"}else u="xMidYMid",f="meet";if("none"!==u&&("meet"===f?v=p=Math.min(v,p):"slice"===f&&(v=p=Math.max(v,p))),a)return o.pdf.Matrix(v,0,0,p,0,0);var w=r-c*v,g=n-h*p;u.indexOf("xMid")>=0?w+=(e-l*v)/2:u.indexOf("xMax")>=0&&(w+=e-l*v),u.indexOf("YMid")>=0?g+=(s-d*p)/2:u.indexOf("YMax")>=0&&(g+=s-d*p);var k=o.pdf.Matrix(1,0,0,1,w,g),y=o.pdf.Matrix(v,0,0,p,0,0);return o.pdf.matrixMult(y,k)}function po(t,i){if(!t||"none"===t)return i.pdf.unitMatrix;for(var r,n,e=/^[\s,]*matrix\(([^)]+)\)\s*/,s=/^[\s,]*translate\(([^)]+)\)\s*/,o=/^[\s,]*rotate\(([^)]+)\)\s*/,a=/^[\s,]*scale\(([^)]+)\)\s*/,u=/^[\s,]*skewX\(([^)]+)\)\s*/,f=/^[\s,]*skewY\(([^)]+)\)\s*/,c=i.pdf.unitMatrix;t.length>0&&t.length!==n;){n=t.length;var h=e.exec(t);if(h&&(r=so(h[1]),c=i.pdf.matrixMult(i.pdf.Matrix(r[0],r[1],r[2],r[3],r[4],r[5]),c),t=t.substr(h[0].length)),h=o.exec(t)){r=so(h[1]);var l=Math.PI*r[0]/180;if(c=i.pdf.matrixMult(i.pdf.Matrix(Math.cos(l),Math.sin(l),-Math.sin(l),Math.cos(l),0,0),c),r[1]||r[2]){var d=i.pdf.Matrix(1,0,0,1,r[1],r[2]),v=i.pdf.Matrix(1,0,0,1,-r[1],-r[2]);c=i.pdf.matrixMult(v,i.pdf.matrixMult(c,d))}t=t.substr(h[0].length)}(h=s.exec(t))&&(r=so(h[1]),c=i.pdf.matrixMult(i.pdf.Matrix(1,0,0,1,r[0],r[1]||0),c),t=t.substr(h[0].length)),(h=a.exec(t))&&((r=so(h[1]))[1]||(r[1]=r[0]),c=i.pdf.matrixMult(i.pdf.Matrix(r[0],0,0,r[1],0,0),c),t=t.substr(h[0].length)),(h=u.exec(t))&&(r=parseFloat(h[1]),c=i.pdf.matrixMult(i.pdf.Matrix(1,0,Math.tan(r*=Math.PI/180),1,0,0),c),t=t.substr(h[0].length)),(h=f.exec(t))&&(r=parseFloat(h[1]),c=i.pdf.matrixMult(i.pdf.Matrix(1,Math.tan(r*=Math.PI/180),0,1,0,0),c),t=t.substr(h[0].length))}return c}var bo=function(){function t(t,i){this.element=t,this.children=i,this.parent=null}return t.prototype.setParent=function(t){this.parent=t},t.prototype.getParent=function(){return this.parent},t.prototype.getBoundingBox=function(t){return"none"===Ks(this.element,t.styleSheets,"display")?[0,0,0,0]:this.getBoundingBoxCore(t)},t.prototype.computeNodeTransform=function(t){var i=this.computeNodeTransformCore(t),r=Ks(this.element,t.styleSheets,"transform");return r?t.pdf.matrixMult(i,po(r,t)):i},t}(),mo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.render=function(){return Promise.resolve()},i.prototype.getBoundingBoxCore=function(){return[]},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i}(bo),wo=function(t){function i(i,r,n){var e=t.call(this,r,n)||this;return e.pdfGradientType=i,e.contextColor=void 0,e}return Ms(i,t),i.prototype.apply=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s,o;return js(this,(function(){return(i=this.element.getAttribute("id"))?(r=this.getStops(t.styleSheets),n=0,e=!1,r.forEach((function(t){var i=t.opacity;i&&1!==i&&(n+=i,e=!0)})),e&&(s=new nn({opacity:n/r.length})),o=new sn(this.pdfGradientType,this.getCoordinates(),r,s),t.pdf.addShadingPattern(i,o),[2]):[2]}))}))},i.prototype.getStops=function(t){var r=this;if(this.stops)return this.stops;if(void 0===this.contextColor){this.contextColor=null;for(var n=this;n;){var e=Ks(n.element,t,"color");if(e){this.contextColor=oo(e,null);break}n=n.getParent()}}var s=[];return this.children.forEach((function(n){if("stop"===n.element.tagName.toLowerCase()){var e=Ks(n.element,t,"color"),o=oo(Ks(n.element,t,"stop-color")||"",e?{color:oo(e,null)}:{color:r.contextColor}),a=parseFloat(Ks(n.element,t,"stop-opacity")||"1");s.push({offset:i.parseGradientOffset(n.element.getAttribute("offset")||"0"),color:[o.r,o.g,o.b],opacity:a})}})),this.stops=s},i.prototype.getBoundingBoxCore=function(t){return lo(this.element,t)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i.parseGradientOffset=function(t){var i=parseFloat(t);return!isNaN(i)&&t.indexOf("%")>=0?i/100:i},i}(mo),go=function(t){function i(i,r){return t.call(this,"axial",i,r)||this}return Ms(i,t),i.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")]},i}(wo),ko=function(t){function i(i,r){return t.call(this,"radial",i,r)||this}return Ms(i,t),i.prototype.getCoordinates=function(){var t=this.element.getAttribute("cx"),i=this.element.getAttribute("cy"),r=this.element.getAttribute("fx"),n=this.element.getAttribute("fy");return[parseFloat(r||t||"0.5"),parseFloat(n||i||"0.5"),0,parseFloat(t||"0.5"),parseFloat(i||"0.5"),parseFloat(this.element.getAttribute("r")||"0.5")]},i}(wo),yo=function(){function t(t,i){this.key=t,this.gradient=i}return t.prototype.getFillData=function(t,i){return qs(this,void 0,void 0,(function(){var r,n,e;return js(this,(function(s){switch(s.label){case 0:return[4,i.refsHandler.getRendered(this.key,null,(function(t){return t.apply(new Rs(i.pdf,{refsHandler:i.refsHandler,textMeasure:i.textMeasure,styleSheets:i.styleSheets,viewport:i.viewport,svg2pdfParameters:i.svg2pdfParameters}))}))];case 1:return s.sent(),this.gradient.element.hasAttribute("gradientUnits")&&"objectboundingbox"!==this.gradient.element.getAttribute("gradientUnits").toLowerCase()?r=i.pdf.unitMatrix:(n=t.getBoundingBox(i),r=i.pdf.Matrix(n[2],0,0,n[3],n[0],n[1])),e=po(Ks(this.gradient.element,i.styleSheets,"gradientTransform","transform"),i),[2,{key:this.key,matrix:i.pdf.matrixMult(e,r)}]}}))}))},t}(),No=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.apply=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s;return js(this,(function(o){switch(o.label){case 0:if(!(i=this.element.getAttribute("id")))return[2];r=this.getBoundingBox(t),n=new on([r[0],r[1],r[0]+r[2],r[1]+r[3]],r[2],r[3]),t.pdf.beginTilingPattern(n),e=0,s=this.children,o.label=1;case 1:return e<s.length?[4,s[e].render(new Rs(t.pdf,{attributeState:t.attributeState,refsHandler:t.refsHandler,styleSheets:t.styleSheets,viewport:t.viewport,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return e++,[3,1];case 4:return t.pdf.endTilingPattern(i,n),[2]}}))}))},i.prototype.getBoundingBoxCore=function(t){return lo(this.element,t)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i}(mo),Lo=function(){function t(t,i){this.key=t,this.pattern=i}return t.prototype.getFillData=function(t,i){return qs(this,void 0,void 0,(function(){var r,n,e,s,o,a,u,f,c,h,l,d;return js(this,(function(v){switch(v.label){case 0:return[4,i.refsHandler.getRendered(this.key,null,(function(t){return t.apply(new Rs(i.pdf,{refsHandler:i.refsHandler,textMeasure:i.textMeasure,styleSheets:i.styleSheets,viewport:i.viewport,svg2pdfParameters:i.svg2pdfParameters}))}))];case 1:return v.sent(),r={key:this.key,boundingBox:void 0,xStep:0,yStep:0,matrix:void 0},e=i.pdf.unitMatrix,this.pattern.element.hasAttribute("patternUnits")&&"objectboundingbox"!==this.pattern.element.getAttribute("patternUnits").toLowerCase()||(n=t.getBoundingBox(i),e=i.pdf.Matrix(1,0,0,1,n[0],n[1]),o=this.pattern.getBoundingBox(i),r.boundingBox=[a=o[0]*n[0]||0,u=o[1]*n[1]||0,a+(f=o[2]*n[2]||0),u+(c=o[3]*n[3]||0)],r.xStep=f,r.yStep=c),s=i.pdf.unitMatrix,this.pattern.element.hasAttribute("patternContentUnits")&&"objectboundingbox"===this.pattern.element.getAttribute("patternContentUnits").toLowerCase()&&(n||(n=t.getBoundingBox(i)),s=i.pdf.Matrix(n[2],0,0,n[3],0,0),o=r.boundingBox||this.pattern.getBoundingBox(i),r.boundingBox=[a=o[0]/n[0]||0,u=o[1]/n[1]||0,a+(f=o[2]/n[2]||0),u+(c=o[3]/n[3]||0)],r.xStep=f,r.yStep=c),h=i.pdf.unitMatrix,(l=Ks(this.pattern.element,i.styleSheets,"patternTransform","transform"))&&(h=po(l,i)),d=i.pdf.matrixMult(d=s,e),d=i.pdf.matrixMult(d,h),d=i.pdf.matrixMult(d,i.transform),r.matrix=d,[2,r]}}))}))},t}();function Ao(t,i,r){var n=r||i.element,e=Ks(n,t.styleSheets,"color");if(e){var s=oo(e,t.attributeState);t.attributeState.color=s.ok?s:new Fs("rgb(0,0,0)")}var o=Ks(n,t.styleSheets,"visibility");o&&(t.attributeState.visibility=o);var a=Ks(n,t.styleSheets,"fill");a&&(t.attributeState.fill=function(t,i){var r=to.exec(t);if(r){var n=r[1],e=i.refsHandler.get(n);return e&&(e instanceof go||e instanceof ko)?function(t,i,r){var n=i.getStops(r.styleSheets);if(0===n.length)return null;if(1===n.length){var e=n[0].color,s=new Fs;return s.ok=!0,s.r=e[0],s.g=e[1],s.b=e[2],s.a=n[0].opacity,new Ps(s)}return new yo(t,i)}(n,e,i):e&&e instanceof No?new Lo(n,e):new Ps(new Fs("rgb(0, 0, 0)"))}var s=oo(t,i.attributeState);return s.ok?new Ps(s):null}(a,t));var u=Ks(n,t.styleSheets,"fill-opacity");u&&(t.attributeState.fillOpacity=parseFloat(u));var f=Ks(n,t.styleSheets,"stroke-opacity");f&&(t.attributeState.strokeOpacity=parseFloat(f));var c=Ks(n,t.styleSheets,"opacity");c&&(t.attributeState.opacity=parseFloat(c));var h=Ks(n,t.styleSheets,"stroke-width");void 0!==h&&""!==h&&(t.attributeState.strokeWidth=Math.abs(parseFloat(h)));var l=Ks(n,t.styleSheets,"stroke");if(l)if("none"===l)t.attributeState.stroke=null;else{var d=oo(l,t.attributeState);d.ok&&(t.attributeState.stroke=new Ps(d))}l&&t.attributeState.stroke instanceof Ps&&(t.attributeState.contextStroke=t.attributeState.stroke.color),a&&t.attributeState.fill instanceof Ps&&(t.attributeState.contextFill=t.attributeState.fill.color);var v=Ks(n,t.styleSheets,"stroke-linecap");v&&(t.attributeState.strokeLinecap=v);var p=Ks(n,t.styleSheets,"stroke-linejoin");p&&(t.attributeState.strokeLinejoin=p);var b=Ks(n,t.styleSheets,"stroke-dasharray");if(b){var m=parseInt(Ks(n,t.styleSheets,"stroke-dashoffset")||"0");t.attributeState.strokeDasharray=so(b),t.attributeState.strokeDashoffset=m}var w=Ks(n,t.styleSheets,"stroke-miterlimit");void 0!==w&&""!==w&&(t.attributeState.strokeMiterlimit=parseFloat(w));var g=n.getAttribute("xml:space");g&&(t.attributeState.xmlSpace=g);var k=Ks(n,t.styleSheets,"white-space");k&&(t.attributeState.whiteSpace=k);var y=Ks(n,t.styleSheets,"font-weight");y&&(t.attributeState.fontWeight=y);var N=Ks(n,t.styleSheets,"font-style");N&&(t.attributeState.fontStyle=N);var L=Ks(n,t.styleSheets,"font-family");if(L){var A=ks.parse(L);t.attributeState.fontFamily=function(t,i,r){var n=co(t.fontStyle,t.fontWeight),e=r.pdf.getFontList(),s="";return i.some((function(t){var i=e[t];return i&&i.indexOf(n)>=0?(s=t,!0):(t=t.toLowerCase(),!!uo.hasOwnProperty(t)&&(s=t,!0))}))||(s="times"),s}(t.attributeState,A,t)}var x=Ks(n,t.styleSheets,"font-size");if(x){var S=t.pdf.getFontSize();t.attributeState.fontSize=no(x,S)}var M=Ks(n,t.styleSheets,"vertical-align")||Ks(n,t.styleSheets,"alignment-baseline");if(M){var E=M.match(/(baseline|text-bottom|alphabetic|ideographic|middle|central|mathematical|text-top|bottom|center|top|hanging)/);E&&(t.attributeState.alignmentBaseline=E[0])}var q=Ks(n,t.styleSheets,"text-anchor");q&&(t.attributeState.textAnchor=q);var j=Ks(n,t.styleSheets,"fill-rule");j&&(t.attributeState.fillRule=j)}function xo(t,i,r){var n=1,e=1;n*=t.attributeState.fillOpacity,n*=t.attributeState.opacity,t.attributeState.fill instanceof Ps&&void 0!==t.attributeState.fill.color.a&&(n*=t.attributeState.fill.color.a),e*=t.attributeState.strokeOpacity,e*=t.attributeState.opacity,t.attributeState.stroke instanceof Ps&&void 0!==t.attributeState.stroke.color.a&&(e*=t.attributeState.stroke.color.a);var s,o,a=n<1,u=e<1;if(Js(r,"use")?(a=!0,u=!0,n*=t.attributeState.fill?1:0,e*=t.attributeState.stroke?1:0):t.withinUse&&(t.attributeState.fill!==i.attributeState.fill?(a=!0,n*=t.attributeState.fill?1:0):a&&!t.attributeState.fill&&(n=0),t.attributeState.stroke!==i.attributeState.stroke?(u=!0,e*=t.attributeState.stroke?1:0):u&&!t.attributeState.stroke&&(e=0)),a||u){var f={};a&&(f.opacity=n),u&&(f["stroke-opacity"]=e),t.pdf.setGState(new nn(f))}if(t.attributeState.fill&&t.attributeState.fill!==i.attributeState.fill&&t.attributeState.fill instanceof Ps&&t.attributeState.fill.color.ok&&!Js(r,"text")&&t.pdf.setFillColor(t.attributeState.fill.color.r,t.attributeState.fill.color.g,t.attributeState.fill.color.b),t.attributeState.strokeWidth!==i.attributeState.strokeWidth&&t.pdf.setLineWidth(t.attributeState.strokeWidth),t.attributeState.stroke!==i.attributeState.stroke&&t.attributeState.stroke instanceof Ps&&t.pdf.setDrawColor(t.attributeState.stroke.color.r,t.attributeState.stroke.color.g,t.attributeState.stroke.color.b),t.attributeState.strokeLinecap!==i.attributeState.strokeLinecap&&t.pdf.setLineCap(t.attributeState.strokeLinecap),t.attributeState.strokeLinejoin!==i.attributeState.strokeLinejoin&&t.pdf.setLineJoin(t.attributeState.strokeLinejoin),t.attributeState.strokeDasharray===i.attributeState.strokeDasharray&&t.attributeState.strokeDashoffset===i.attributeState.strokeDashoffset||!t.attributeState.strokeDasharray||t.pdf.setLineDashPattern(t.attributeState.strokeDasharray,t.attributeState.strokeDashoffset),t.attributeState.strokeMiterlimit!==i.attributeState.strokeMiterlimit&&t.pdf.setLineMiterLimit(t.attributeState.strokeMiterlimit),t.attributeState.fontFamily!==i.attributeState.fontFamily&&(s=uo.hasOwnProperty(t.attributeState.fontFamily)?uo[t.attributeState.fontFamily]:t.attributeState.fontFamily),t.attributeState.fill&&t.attributeState.fill!==i.attributeState.fill&&t.attributeState.fill instanceof Ps&&t.attributeState.fill.color.ok){var c=t.attributeState.fill.color;t.pdf.setTextColor(c.r,c.g,c.b)}t.attributeState.fontWeight===i.attributeState.fontWeight&&t.attributeState.fontStyle===i.attributeState.fontStyle||(o=co(t.attributeState.fontStyle,t.attributeState.fontWeight)),void 0===s&&void 0===o||(void 0===s&&(s=uo.hasOwnProperty(t.attributeState.fontFamily)?uo[t.attributeState.fontFamily]:t.attributeState.fontFamily),t.pdf.setFont(s,o)),t.attributeState.fontSize!==i.attributeState.fontSize&&t.pdf.setFontSize(t.attributeState.fontSize*t.pdf.internal.scaleFactor)}function So(t,i,r){var n=to.exec(t);if(n)return r.refsHandler.get(n[1])||void 0}function Mo(t,i,r){return qs(this,void 0,void 0,(function(){var n,e;return js(this,(function(s){switch(s.label){case 0:return n=r.clone(),i.element.hasAttribute("clipPathUnits")&&"objectboundingbox"===i.element.getAttribute("clipPathUnits").toLowerCase()&&(e=t.getBoundingBox(r),n.transform=r.pdf.matrixMult(r.pdf.Matrix(e[2],0,0,e[3],e[0],e[1]),r.transform)),[4,i.apply(n)];case 1:return s.sent(),[2]}}))}))}var Eo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.render=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e;return js(this,(function(s){switch(s.label){case 0:return this.isVisible("hidden"!==t.attributeState.visibility,t)?((i=t.clone()).transform=i.pdf.matrixMult(this.computeNodeTransform(i),t.transform),Ao(i,this),r=Ks(this.element,i.styleSheets,"clip-path"),(n=r&&"none"!==r)?(e=So(r,0,i))?e.isVisible(!0,i)?(i.pdf.saveGraphicsState(),[4,Mo(this,e,i)]):[3,2]:[3,4]:[3,5]):[2];case 1:return s.sent(),[3,3];case 2:return[2];case 3:return[3,5];case 4:n=!1,s.label=5;case 5:return i.withinClipPath||i.pdf.saveGraphicsState(),xo(i,t,this.element),[4,this.renderCore(i)];case 6:return s.sent(),i.withinClipPath||i.pdf.restoreGraphicsState(),n&&i.pdf.restoreGraphicsState(),[2]}}))}))},i}(bo),qo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i}(Eo),jo=function(t){function i(i,r,n){var e=t.call(this,r,n)||this;return e.cachedPath=null,e.hasMarkers=i,e}return Ms(i,t),i.prototype.renderCore=function(t){return qs(this,void 0,void 0,(function(){var i;return js(this,(function(r){switch(r.label){case 0:return null===(i=this.getCachedPath(t))||0===i.segments.length?[2]:(t.withinClipPath?i.transform(t.transform):t.pdf.setCurrentTransformationMatrix(t.transform),i.draw(t),[4,this.fillOrStroke(t)]);case 1:return r.sent(),this.hasMarkers?[4,this.drawMarkers(t,i)]:[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))},i.prototype.getCachedPath=function(t){return this.cachedPath||(this.cachedPath=this.getPath(t))},i.prototype.drawMarkers=function(t,i){return qs(this,void 0,void 0,(function(){return js(this,(function(r){switch(r.label){case 0:return[4,this.getMarkers(i,t).draw(t.clone({transform:t.pdf.unitMatrix}))];case 1:return r.sent(),[2]}}))}))},i.prototype.fillOrStroke=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s;return js(this,(function(o){switch(o.label){case 0:return t.withinClipPath?[2]:(r=t.attributeState.stroke&&0!==t.attributeState.strokeWidth,(i=t.attributeState.fill)?[4,i.getFillData(this,t)]:[3,2]);case 1:return e=o.sent(),[3,3];case 2:e=void 0,o.label=3;case 3:return n=e,s="evenodd"===t.attributeState.fillRule,i&&r||t.withinUse?s?t.pdf.fillStrokeEvenOdd(n):t.pdf.fillStroke(n):i?s?t.pdf.fillEvenOdd(n):t.pdf.fill(n):r?t.pdf.stroke():t.pdf.discardPath(),[2]}}))}))},i.prototype.getBoundingBoxCore=function(t){var i=this.getCachedPath(t);if(!i||!i.segments.length)return[0,0,0,0];for(var r=1/0,n=1/0,e=-1/0,s=-1/0,o=0,a=0,u=0;u<i.segments.length;u++){var f=i.segments[u];(f instanceof Hs||f instanceof Ws||f instanceof Gs)&&(o=f.x,a=f.y),f instanceof Gs?(r=Math.min(r,o,f.x1,f.x2,f.x),e=Math.max(e,o,f.x1,f.x2,f.x),n=Math.min(n,a,f.y1,f.y2,f.y),s=Math.max(s,a,f.y1,f.y2,f.y)):(r=Math.min(r,o),e=Math.max(e,o),n=Math.min(n,a),s=Math.max(s,a))}return[r,n,e-r,s-n]},i.prototype.getMarkers=function(t,i){var r=Ks(this.element,i.styleSheets,"marker-start"),n=Ks(this.element,i.styleSheets,"marker-mid"),e=Ks(this.element,i.styleSheets,"marker-end"),s=new Xs;if(r||n||e){e&&(e=Fo(e)),r&&(r=Fo(r)),n&&(n=Fo(n));for(var o=t.segments,a=[1,0],u=void 0,f=!1,c=[1,0],h=!1,l=function(t){var i=o[t],l=r&&(1===t||!(o[t]instanceof Hs)&&o[t-1]instanceof Hs);l&&o.forEach((function(i,r){if(!h&&i instanceof $s&&r>t){var n=o[r-1];h=(n instanceof Hs||n instanceof Ws||n instanceof Gs)&&n}}));var d=e&&(t===o.length-1||!(o[t]instanceof Hs)&&o[t+1]instanceof Hs),v=n&&t>0&&!(1===t&&o[t-1]instanceof Hs),p=o[t-1]||null;if(p instanceof Hs||p instanceof Ws||p instanceof Gs)if(i instanceof Gs)l&&s.addMarker(new Qs(r,[p.x,p.y],Cs(h?[h.x,h.y]:[p.x,p.y],[i.x1,i.y1]),!0)),d&&s.addMarker(new Qs(e,[i.x,i.y],Cs([i.x2,i.y2],[i.x,i.y]))),v&&(u=zs([p.x,p.y],[i.x1,i.y1]),u=p instanceof Hs?u:Ds(Us(a,u)),s.addMarker(new Qs(n,[p.x,p.y],Math.atan2(u[1],u[0])))),a=zs([i.x2,i.y2],[i.x,i.y]);else if(i instanceof Hs||i instanceof Ws){if(u=zs([p.x,p.y],[i.x,i.y]),l){var b=h?zs([h.x,h.y],[i.x,i.y]):u;s.addMarker(new Qs(r,[p.x,p.y],Math.atan2(b[1],b[0]),!0))}d&&s.addMarker(new Qs(e,[i.x,i.y],Math.atan2(u[1],u[0]))),v&&(b=i instanceof Hs?a:p instanceof Hs?u:Ds(Us(a,u)),s.addMarker(new Qs(n,[p.x,p.y],Math.atan2(b[1],b[0])))),a=u}else i instanceof $s&&(u=zs([p.x,p.y],[f.x,f.y]),v&&(b=p instanceof Hs?u:Ds(Us(a,u)),s.addMarker(new Qs(n,[p.x,p.y],Math.atan2(b[1],b[0])))),d&&(b=Ds(Us(u,c)),s.addMarker(new Qs(e,[f.x,f.y],Math.atan2(b[1],b[0])))),a=u);else{f=i instanceof Hs&&i;var m=o[t+1];(m instanceof Hs||m instanceof Ws||m instanceof Gs)&&(c=zs([f.x,f.y],[m.x,m.y]))}},d=0;d<o.length;d++)l(d)}return s.markers.forEach((function(t){var r=i.refsHandler.get(t.id);if(r){var n=Ks(r.element,i.styleSheets,"orient");null!=n&&(t.isStartMarker&&"auto-start-reverse"===n&&(t.angle+=Math.PI),isNaN(Number(n))||(t.angle=parseFloat(n)/180*Math.PI))}})),s},i}(qo);function Fo(t){var i=to.exec(t);return i&&i[1]||void 0}var Po=function(t){function i(i,r){return t.call(this,!0,i,r)||this}return Ms(i,t),i.prototype.getPath=function(t){if(t.withinClipPath||null===t.attributeState.stroke)return null;var i=parseFloat(this.element.getAttribute("x1")||"0"),r=parseFloat(this.element.getAttribute("y1")||"0"),n=parseFloat(this.element.getAttribute("x2")||"0"),e=parseFloat(this.element.getAttribute("y2")||"0");return i||n||r||e?(new Vs).moveTo(i,r).lineTo(n,e):null},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i.prototype.fillOrStroke=function(i){return qs(this,void 0,void 0,(function(){return js(this,(function(r){switch(r.label){case 0:return i.attributeState.fill=null,[4,t.prototype.fillOrStroke.call(this,i)];case 1:return r.sent(),[2]}}))}))},i}(jo),Io=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.apply=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s;return js(this,(function(o){switch(o.label){case 0:return this.isVisible("hidden"!==t.attributeState.visibility,t)?((i=t.clone()).transform=i.pdf.unitMatrix,Ao(i,this),(r=Ks(this.element,i.styleSheets,"clip-path"))&&"none"!==r&&(n=So(r,0,i))?n.isVisible(!0,i)?[4,Mo(this,n,i)]:[3,2]:[3,3]):[2];case 1:return o.sent(),[3,3];case 2:return[2];case 3:xo(i,t,this.element),e=0,s=this.children,o.label=4;case 4:return e<s.length?[4,s[e].render(i)]:[3,7];case 5:o.sent(),o.label=6;case 6:return e++,[3,4];case 7:return[2]}}))}))},i.prototype.getBoundingBoxCore=function(t){return ho(t,this)},i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i.prototype.computeNodeTransformCore=function(t){var i=parseFloat(Ks(this.element,t.styleSheets,"x")||"0"),r=parseFloat(Ks(this.element,t.styleSheets,"y")||"0"),n=this.element.getAttribute("viewBox");if(n){var e=so(n),s=parseFloat(Ks(this.element,t.styleSheets,"width")||Ks(this.element.ownerSVGElement,t.styleSheets,"width")||n[2]),o=parseFloat(Ks(this.element,t.styleSheets,"height")||Ks(this.element.ownerSVGElement,t.styleSheets,"height")||n[3]);return vo(this.element,e,i,r,s,o,t)}return t.pdf.Matrix(1,0,0,1,i,r)},i}(mo),Ro=function(t,i){this.width=t,this.height=i},Oo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.renderCore=function(t){return qs(this,void 0,void 0,(function(){var r,n,e,s,o,a,u,f,c,h,l,d,v;return js(this,(function(p){switch(p.label){case 0:return r=parseFloat,(n=this.element.getAttribute("href")||this.element.getAttribute("xlink:href"))?(e=n.substring(1),s=t.refsHandler.get(e),o=Js(s.element,"symbol,svg")&&s.element.hasAttribute("viewBox"),a=r(Ks(this.element,t.styleSheets,"x")||"0"),u=r(Ks(this.element,t.styleSheets,"y")||"0"),f=void 0,c=void 0,o?(f=r(Ks(this.element,t.styleSheets,"width")||Ks(s.element,t.styleSheets,"width")||"0"),c=r(Ks(this.element,t.styleSheets,"height")||Ks(s.element,t.styleSheets,"height")||"0"),a+=r(Ks(s.element,t.styleSheets,"x")||"0"),u+=r(Ks(s.element,t.styleSheets,"y")||"0"),l=so(s.element.getAttribute("viewBox")),h=vo(s.element,l,a,u,f,c,t)):h=t.pdf.Matrix(1,0,0,1,a,u),d=Is.getContextColors(t,!0),v=new Rs(t.pdf,{refsHandler:t.refsHandler,styleSheets:t.styleSheets,withinUse:!0,viewport:o?new Ro(f,c):t.viewport,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure,attributeState:Object.assign(Is.default(),d)}),[4,t.refsHandler.getRendered(e,d,(function(t){return i.renderReferencedNode(t,e,v)}))]):[2];case 1:return p.sent(),t.pdf.saveGraphicsState(),t.pdf.setCurrentTransformationMatrix(t.transform),o&&"visible"!==Ks(s.element,t.styleSheets,"overflow")&&(t.pdf.rect(a,u,f,c),t.pdf.clip().discardPath()),t.pdf.doFormObject(t.refsHandler.generateKey(e,d),h),t.pdf.restoreGraphicsState(),[2]}}))}))},i.renderReferencedNode=function(t,i,r){return qs(this,void 0,void 0,(function(){var n;return js(this,(function(e){switch(e.label){case 0:return n=[(n=t.getBoundingBox(r))[0]-.5*n[2],n[1]-.5*n[3],2*n[2],2*n[3]],r.pdf.beginFormObject(n[0],n[1],n[2],n[3],r.pdf.unitMatrix),t instanceof Io?[4,t.apply(r)]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,t.render(r)];case 3:e.sent(),e.label=4;case 4:return r.pdf.endFormObject(r.refsHandler.generateKey(i,r.attributeState)),[2]}}))}))},i.prototype.getBoundingBoxCore=function(t){return lo(this.element,t)},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i}(qo),Co=function(t){function i(i,r){return t.call(this,!1,i,r)||this}return Ms(i,t),i.prototype.getPath=function(t){var i=parseFloat(Ks(this.element,t.styleSheets,"width")||"0"),r=parseFloat(Ks(this.element,t.styleSheets,"height")||"0");if(!isFinite(i)||i<=0||!isFinite(r)||r<=0)return null;var n=Ks(this.element,t.styleSheets,"rx"),e=Ks(this.element,t.styleSheets,"ry"),s=Math.min(parseFloat(n||e||"0"),.5*i),o=Math.min(parseFloat(e||n||"0"),.5*r),a=parseFloat(Ks(this.element,t.styleSheets,"x")||"0"),u=parseFloat(Ks(this.element,t.styleSheets,"y")||"0"),f=.5522847498307935;return 0===s&&0===o?(new Vs).moveTo(a,u).lineTo(a+i,u).lineTo(a+i,u+r).lineTo(a,u+r).close():(new Vs).moveTo(a+=s,u).lineTo(a+=i-2*s,u).curveTo(a+s*f,u,a+s,u+(o-o*f),a+=s,u+=o).lineTo(a,u+=r-2*o).curveTo(a,u+o*f,a-s*f,u+o,a-=s,u+=o).lineTo(a+=2*s-i,u).curveTo(a-s*f,u,a-s,u-o*f,a-=s,u-=o).lineTo(a,u+=2*o-r).curveTo(a,u-o*f,a+s*f,u-o,a+=s,u-=o).close()},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i}(jo),To=function(t){function i(i,r){return t.call(this,!1,i,r)||this}return Ms(i,t),i.prototype.getPath=function(t){var i=this.getRx(t),r=this.getRy(t);if(!isFinite(i)||r<=0||!isFinite(r)||r<=0)return null;var n=parseFloat(Ks(this.element,t.styleSheets,"cx")||"0"),e=parseFloat(Ks(this.element,t.styleSheets,"cy")||"0"),s=.5522847498307935*i,o=.5522847498307935*r;return(new Vs).moveTo(n+i,e).curveTo(n+i,e-o,n+s,e-r,n,e-r).curveTo(n-s,e-r,n-i,e-o,n-i,e).curveTo(n-i,e+o,n-s,e+r,n,e+r).curveTo(n+s,e+r,n+i,e+o,n+i,e)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i}(jo),Bo=function(t){function i(i,r){return t.call(this,i,r)||this}return Ms(i,t),i.prototype.getRx=function(t){return parseFloat(Ks(this.element,t.styleSheets,"rx")||"0")},i.prototype.getRy=function(t){return parseFloat(Ks(this.element,t.styleSheets,"ry")||"0")},i}(To);function Do(t){var i="invisible",r=t.stroke&&0!==t.strokeWidth,n=t.fill;return n&&r?i="fillThenStroke":n?i="fill":r&&(i="stroke"),i}function zo(t){return t.replace(/[\n\r]/g,"")}function Uo(t){return t.replace(/[\t]/g," ")}function _o(t){return t.replace(/ +/g," ")}function Vo(t,i,r){switch(Ks(t,r.styleSheets,"text-transform")){case"uppercase":return i.toUpperCase();case"lowercase":return i.toLowerCase();default:return i}}var Ho=function(){function t(t,i,r,n){this.textNode=t,this.texts=[],this.textNodes=[],this.contexts=[],this.textAnchor=i,this.originX=r,this.originY=n,this.textMeasures=[]}return t.prototype.setX=function(t){this.originX=t},t.prototype.setY=function(t){this.originY=t},t.prototype.add=function(t,i,r){this.texts.push(i),this.textNodes.push(t),this.contexts.push(r)},t.prototype.rightTrimText=function(){for(var t=this.texts.length-1;t>=0;t--)if("preserve"===this.contexts[t].attributeState.xmlSpace||"pre"===this.contexts[t].attributeState.whiteSpace||(this.texts[t]=this.texts[t].replace(/\s+$/,"")),this.texts[t].match(/[^\s]/))return!1;return!0},t.prototype.measureText=function(t){for(var i=0;i<this.texts.length;i++)this.textMeasures.push({width:t.textMeasure.measureTextWidth(this.texts[i],this.contexts[i].attributeState),length:this.texts[i].length})},t.prototype.put=function(i,r){var n,e,s,o,a=[],u=[],f=[],c=this.originX,h=this.originY,l=c,d=c;for(n=0;n<this.textNodes.length;n++){e=this.textNodes[n],s=this.contexts[n],o=this.textMeasures[n]||{width:i.textMeasure.measureTextWidth(this.texts[n],this.contexts[n].attributeState),length:this.texts[n].length};var v=c,p=h;if("#text"!==e.nodeName&&!a.includes(e)){a.push(e);var b=t.resolveRelativePositionAttribute(e,"dx");null!==b&&(v+=no(b,s.attributeState.fontSize));var m=t.resolveRelativePositionAttribute(e,"dy");null!==m&&(p+=no(m,s.attributeState.fontSize))}u[n]=v,f[n]=p,c=v+o.width+o.length*r,h=p,l=Math.min(l,v),d=Math.max(d,c)}var w=0;switch(this.textAnchor){case"start":w=0;break;case"middle":w=(d-l)/2;break;case"end":w=d-l}for(n=0;n<this.textNodes.length;n++)if(s=this.contexts[n],"#text"===(e=this.textNodes[n]).nodeName||"hidden"!==s.attributeState.visibility){i.pdf.saveGraphicsState(),xo(s,i,e);var g=s.attributeState.alignmentBaseline,k=Do(s.attributeState);i.pdf.text(this.texts[n],u[n]-w,f[n],{baseline:eo(g),angle:i.transform,renderingMode:"fill"===k?void 0:k,charSpace:0===r?void 0:r}),i.pdf.restoreGraphicsState()}return[c,h]},t.resolveRelativePositionAttribute=function(t,i){for(var r,n=t;n&&Js(n,"tspan");){if(n.hasAttribute(i))return n.getAttribute(i);if((null===(r=t.parentElement)||void 0===r?void 0:r.firstChild)!==t)break;n=n.parentElement}return null},t}(),Wo=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.boundingBox=[],i}return Ms(i,t),i.prototype.processTSpans=function(t,i,r,n,e,s){for(var o=r.pdf.getFontSize(),a="preserve"===r.attributeState.xmlSpace||"pre"===r.attributeState.whiteSpace,u=!0,f=!1,c=0;c<i.childNodes.length;c++){var h=i.childNodes[c];if(h.textContent){var l=h.textContent;if("#text"===h.nodeName){var d=zo(l);d=Uo(d),a||(d=_o(d),u&&d.match(/^\s/)&&(f=!0),d.match(/[^\s]/)&&(u=!1),s.prevText.match(/\s$/)&&(d=d.replace(/^\s+/,"")));var v=Vo(i,d,r);e.add(i,v,r),s.prevText=l,s.prevContext=r}else if(Js(h,"title"));else if(Js(h,"tspan")){var p=h,b=p.getAttribute("x");if(null!==b){var m=no(b,o);e=new Ho(this,Ks(p,r.styleSheets,"text-anchor")||r.attributeState.textAnchor,m,0),n.push({type:"y",chunk:e})}var w=p.getAttribute("y");if(null!==w){var g=no(w,o);e=new Ho(this,Ks(p,r.styleSheets,"text-anchor")||r.attributeState.textAnchor,0,g),n.push({type:"x",chunk:e})}var k=r.clone();Ao(k,t,p),this.processTSpans(t,p,k,n,e,s)}}}return f},i.prototype.renderCore=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s,o,a,u,f,c,h,l,d,v,p,b,m,w,g,k,y,N,L;return js(this,(function(){if(t.pdf.saveGraphicsState(),i=0,r=0,n=1,e=t.pdf.getFontSize(),s=no(this.element.getAttribute("x"),e),o=no(this.element.getAttribute("y"),e),a=no(this.element.getAttribute("dx"),e),u=no(this.element.getAttribute("dy"),e),f=parseFloat(this.element.getAttribute("textLength")||"0"),c=t.attributeState.visibility,0===this.element.childElementCount)l=function(t,i){return t=Uo(t=zo(t)),"preserve"===i.xmlSpace||"pre"===i.whiteSpace||(t=_o(t=t.trim())),t}(h=this.element.textContent||"",t.attributeState),d=Vo(this.element,l,t),i=t.textMeasure.getTextOffset(d,t.attributeState),f>0&&(v=t.textMeasure.measureTextWidth(d,t.attributeState),!("preserve"===t.attributeState.xmlSpace||"pre"===t.attributeState.whiteSpace)&&h.match(/^\s/)&&(n=0),r=(f-v)/(d.length-n)||0),"visible"===c&&(p=t.attributeState.alignmentBaseline,b=Do(t.attributeState),t.pdf.text(d,s+a-i,o+u,{baseline:eo(p),angle:t.transform,renderingMode:"fill"===b?void 0:b,charSpace:0===r?void 0:r}),this.boundingBox=[s+a-i,o+u+.1*e-e,t.textMeasure.measureTextWidth(d,t.attributeState),e]);else{for(m=[],w=new Ho(this,t.attributeState.textAnchor,s+a,o+u),m.push({type:"",chunk:w}),g=this.processTSpans(this,this.element,t,m,w,{prevText:" ",prevContext:t}),n=g?0:1,k=!0,y=m.length-1;y>=0;y--)k&&(k=m[y].chunk.rightTrimText());f>0&&(N=0,L=0,m.forEach((function(i){var r=i.chunk;r.measureText(t),r.textMeasures.forEach((function(t){N+=t.width,L+=t.length}))})),r=(f-N)/(L-n)),m.reduce((function(i,n){var e=n.type,s=n.chunk;return"x"===e?s.setX(i[0]):"y"===e&&s.setY(i[1]),s.put(t,r)}),[0,0])}return t.pdf.restoreGraphicsState(),[2]}))}))},i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i.prototype.getBoundingBoxCore=function(t){return this.boundingBox.length>0?this.boundingBox:lo(this.element,t)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i}(qo),Go=function(t){function i(i,r){return t.call(this,!0,i,r)||this}return Ms(i,t),i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i.prototype.getPath=function(t){var i,r,n=new As(Ks(this.element,t.styleSheets,"d")||"").unshort().unarc().abs(),e=new Vs;return n.iterate((function(t){switch(t[0]){case"M":e.moveTo(t[1],t[2]);break;case"L":e.lineTo(t[1],t[2]);break;case"H":e.lineTo(t[1],r);break;case"V":e.lineTo(i,t[1]);break;case"C":e.curveTo(t[1],t[2],t[3],t[4],t[5],t[6]);break;case"Q":var n=Bs([i,r],[t[1],t[2]]),s=Bs([t[3],t[4]],[t[1],t[2]]);e.curveTo(n[0],n[1],s[0],s[1],t[3],t[4]);break;case"Z":e.close()}switch(t[0]){case"M":case"L":i=t[1],r=t[2];break;case"H":i=t[1];break;case"V":r=t[1];break;case"C":i=t[5],r=t[6];break;case"Q":i=t[3],r=t[4]}})),e},i}(jo),$o=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,((?:.|\s)*)$/i,Jo=function(t){function i(r,n,e){var s=t.call(this,r,n)||this;return s.imageLoadingPromise=null,s.imageUrl=s.element.getAttribute("xlink:href")||s.element.getAttribute("href"),s.imageUrl&&i.shouldLoadImage(s.imageUrl,e.svg2pdfParameters.loadImages)&&(s.imageLoadingPromise=i.fetchImageData(s.imageUrl)),s}return Ms(i,t),i.shouldLoadImage=function(t,i){return!1!==i&&(!(i instanceof RegExp)||(i.lastIndex=0,i.test(t)))},i.prototype.renderCore=function(t){return qs(this,void 0,void 0,(function(){var r,n,e,s,o,a,u,f,c,h,l,d,v,p,b,m,w,g;return js(this,(function(k){switch(k.label){case 0:return this.imageLoadingPromise?(t.pdf.setCurrentTransformationMatrix(t.transform),r=parseFloat(Ks(this.element,t.styleSheets,"width")||"0"),n=parseFloat(Ks(this.element,t.styleSheets,"height")||"0"),e=parseFloat(Ks(this.element,t.styleSheets,"x")||"0"),s=parseFloat(Ks(this.element,t.styleSheets,"y")||"0"),!isFinite(r)||r<=0||!isFinite(n)||n<=0?[2]:[4,this.imageLoadingPromise]):[2];case 1:return o=k.sent(),a=o.data,0!==(u=o.format).indexOf("svg")?[3,3]:(f=new DOMParser,c=f.parseFromString(a,"image/svg+xml").firstElementChild,(!(h=this.element.getAttribute("preserveAspectRatio"))||h.indexOf("defer")<0||!c.getAttribute("preserveAspectRatio"))&&c.setAttribute("preserveAspectRatio",h||""),c.setAttribute("x",e+""),c.setAttribute("y",s+""),c.setAttribute("width",r+""),c.setAttribute("height",n+""),d=new Rs(t.pdf,{refsHandler:new Os(l={}),styleSheets:t.styleSheets,viewport:new Ro(r,n),svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure}),[4,oa(c,d,l).render(d)]);case 2:return k.sent(),[2];case 3:v="data:image/".concat(u,";base64,").concat(btoa(a)),k.label=4;case 4:return k.trys.push([4,6,,7]),[4,i.getImageDimensions(v)];case 5:return p=k.sent(),w=vo(this.element,[0,0,b=p[0],m=p[1]],e,s,r,n,t),t.pdf.setCurrentTransformationMatrix(w),t.pdf.addImage(v,"",0,0,b,m),[3,7];case 6:return g=k.sent(),"object"==typeof console&&console.warn&&console.warn("Could not load image ".concat(this.imageUrl,". \n").concat(g)),[3,7];case 7:return[2]}}))}))},i.prototype.getBoundingBoxCore=function(t){return lo(this.element,t)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i.fetchImageData=function(t){return qs(this,void 0,void 0,(function(){var r,n,e,s;return js(this,(function(o){switch(o.label){case 0:if(!(e=t.match($o)))return[3,1];if("image"!==(s=e[2].split("/"))[0])throw Error("Unsupported image URL: ".concat(t));return n=s[1],r=e[5],"base64"===e[4]?(r=r.replace(/\s/g,""),r=atob(r)):r=decodeURIComponent(r),[3,3];case 1:return[4,i.fetchImage(t)];case 2:r=o.sent(),n=t.substring(t.lastIndexOf(".")+1),o.label=3;case 3:return[2,{data:r,format:n}]}}))}))},i.fetchImage=function(t){return new Promise((function(i,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200!==n.status)throw Error("Error ".concat(n.status,": Failed to load image '").concat(t,"'"));for(var r=new Uint8Array(n.response),e="",s=0;s<r.length;s++)e+=String.fromCharCode(r[s]);i(e)},n.onerror=r,n.onabort=r,n.send(null)}))},i.getMimeType=function(t){switch(t=t.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";default:return"image/".concat(t)}},i.getImageDimensions=function(t){return new Promise((function(i,r){var n=new Image;n.onload=function(){i([n.width,n.height])},n.onerror=r,n.src=t}))},i}(qo),Ko=function(t){function i(i,r,n){var e=t.call(this,!0,r,n)||this;return e.closed=i,e}return Ms(i,t),i.prototype.getPath=function(){if(!this.element.hasAttribute("points")||""===this.element.getAttribute("points"))return null;var t=i.parsePointsString(this.element.getAttribute("points")),r=new Vs;if(t.length<1)return r;r.moveTo(t[0][0],t[0][1]);for(var n=1;n<t.length;n++)r.lineTo(t[n][0],t[n][1]);return this.closed&&r.close(),r},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.parsePointsString=function(t){for(var i=so(t),r=[],n=0;n<i.length-1;n+=2)r.push([i[n],i[n+1]]);return r},i}(jo),Zo=function(t){function i(i,r){return t.call(this,!0,i,r)||this}return Ms(i,t),i}(Ko),Yo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.render=function(){return Promise.resolve()},i.prototype.getBoundingBoxCore=function(){return[0,0,0,0]},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i.prototype.isVisible=function(t,i){return Zs(this,t,i)},i}(bo),Xo=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.apply=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s,o;return js(this,(function(a){switch(a.label){case 0:i=this.computeNodeTransform(t),r=this.getBoundingBox(t),t.pdf.beginFormObject(r[0],r[1],r[2],r[3],i),n=Is.getContextColors(t),function(t){var i=t.attributeState,r=t.pdf,n=1,e=1;n*=i.fillOpacity,n*=i.opacity,i.fill instanceof Ps&&void 0!==i.fill.color.a&&(n*=i.fill.color.a),e*=i.strokeOpacity,e*=i.opacity,i.stroke instanceof Ps&&void 0!==i.stroke.color.a&&(e*=i.stroke.color.a);var s,o={};if(o.opacity=n,o["stroke-opacity"]=e,r.setGState(new nn(o)),i.fill&&i.fill instanceof Ps&&i.fill.color.ok?r.setFillColor(i.fill.color.r,i.fill.color.g,i.fill.color.b):r.setFillColor(0,0,0),r.setLineWidth(i.strokeWidth),i.stroke instanceof Ps?r.setDrawColor(i.stroke.color.r,i.stroke.color.g,i.stroke.color.b):r.setDrawColor(0,0,0),r.setLineCap(i.strokeLinecap),r.setLineJoin(i.strokeLinejoin),i.strokeDasharray?r.setLineDashPattern(i.strokeDasharray,i.strokeDashoffset):r.setLineDashPattern([],0),r.setLineMiterLimit(i.strokeMiterlimit),s=uo.hasOwnProperty(i.fontFamily)?uo[i.fontFamily]:i.fontFamily,i.fill&&i.fill instanceof Ps&&i.fill.color.ok){var a=i.fill.color;r.setTextColor(a.r,a.g,a.b)}else r.setTextColor(0,0,0);var u="";"bold"===i.fontWeight&&(u="bold"),"italic"===i.fontStyle&&(u+="italic"),""===u&&(u="normal"),void 0!==s||void 0!==u?(void 0===s&&(s=uo.hasOwnProperty(i.fontFamily)?uo[i.fontFamily]:i.fontFamily),r.setFont(s,u)):r.setFont("helvetica",u),r.setFontSize(i.fontSize*r.internal.scaleFactor)}(e=new Rs(t.pdf,{refsHandler:t.refsHandler,styleSheets:t.styleSheets,viewport:t.viewport,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure,attributeState:Object.assign(Is.default(),n)})),s=0,o=this.children,a.label=1;case 1:return s<o.length?[4,o[s].render(e)]:[3,4];case 2:a.sent(),a.label=3;case 3:return s++,[3,1];case 4:return t.pdf.endFormObject(e.refsHandler.generateKey(this.element.getAttribute("id"),n)),[2]}}))}))},i.prototype.getBoundingBoxCore=function(){var t,i=this.element.getAttribute("viewBox");return i&&(t=so(i)),[t&&t[0]||0,t&&t[1]||0,t&&t[2]||parseFloat(this.element.getAttribute("markerWidth")||"3"),t&&t[3]||parseFloat(this.element.getAttribute("markerHeight")||"3")]},i.prototype.computeNodeTransformCore=function(t){var i,r=parseFloat(this.element.getAttribute("refX")||"0"),n=parseFloat(this.element.getAttribute("refY")||"0"),e=this.element.getAttribute("viewBox");if(e){var s=so(e);i=vo(this.element,s,0,0,parseFloat(this.element.getAttribute("markerWidth")||"3"),parseFloat(this.element.getAttribute("markerHeight")||"3"),t,!0),i=t.pdf.matrixMult(t.pdf.Matrix(1,0,0,1,-r,-n),i)}else i=t.pdf.Matrix(1,0,0,1,-r,-n);return i},i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i}(mo),Qo=function(t){function i(i,r){return t.call(this,i,r)||this}return Ms(i,t),i.prototype.getR=function(t){var i;return null!==(i=this.r)&&void 0!==i?i:this.r=parseFloat(Ks(this.element,t.styleSheets,"r")||"0")},i.prototype.getRx=function(t){return this.getR(t)},i.prototype.getRy=function(t){return this.getR(t)},i}(To),ta=function(t){function i(i,r){return t.call(this,!1,i,r)||this}return Ms(i,t),i}(Ko),ia=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.renderCore=function(t){return qs(this,void 0,void 0,(function(){var i,r;return js(this,(function(n){switch(n.label){case 0:i=0,r=this.children,n.label=1;case 1:return i<r.length?[4,r[i].render(t)]:[3,4];case 2:n.sent(),n.label=3;case 3:return i++,[3,1];case 4:return[2]}}))}))},i.prototype.getBoundingBoxCore=function(t){return ho(t,this)},i}(Eo),ra=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i.prototype.render=function(i){return qs(this,void 0,void 0,(function(){var r,n,e,s,o;return js(this,(function(a){switch(a.label){case 0:return this.isVisible("hidden"!==i.attributeState.visibility,i)?(r=this.getX(i),n=this.getY(i),e=this.getWidth(i),s=this.getHeight(i),i.pdf.saveGraphicsState(),o=i.transform,this.element.hasAttribute("transform")&&(o=i.pdf.matrixMult(po(this.element.getAttribute("transform"),i),o)),i.pdf.setCurrentTransformationMatrix(o),i.withinUse||"visible"===Ks(this.element,i.styleSheets,"overflow")||i.pdf.rect(r,n,e,s).clip().discardPath(),[4,t.prototype.render.call(this,i.clone({transform:i.pdf.unitMatrix,viewport:i.withinUse?i.viewport:new Ro(e,s)}))]):[2];case 1:return a.sent(),i.pdf.restoreGraphicsState(),[2]}}))}))},i.prototype.computeNodeTransform=function(t){return this.computeNodeTransformCore(t)},i.prototype.computeNodeTransformCore=function(t){if(t.withinUse)return t.pdf.unitMatrix;var i,r=this.getX(t),n=this.getY(t),e=this.getViewBox();if(e){var s=this.getWidth(t),o=this.getHeight(t);i=vo(this.element,e,r,n,s,o,t)}else i=t.pdf.Matrix(1,0,0,1,r,n);return i},i.prototype.getWidth=function(t){if(void 0!==this.width)return this.width;var i,r,n=t.svg2pdfParameters;if(this.isOutermostSvg(t))if(null!=n.width)i=n.width;else if(r=Ks(this.element,t.styleSheets,"width"))i=parseFloat(r);else{var e=this.getViewBox();if(e&&(null!=n.height||Ks(this.element,t.styleSheets,"height"))){var s=e[2]/e[3];i=this.getHeight(t)*s}else i=Math.min(300,t.viewport.width,2*t.viewport.height)}else i=(r=Ks(this.element,t.styleSheets,"width"))?parseFloat(r):t.viewport.width;return this.width=i},i.prototype.getHeight=function(t){if(void 0!==this.height)return this.height;var i,r,n=t.svg2pdfParameters;if(this.isOutermostSvg(t))if(null!=n.height)i=n.height;else if(r=Ks(this.element,t.styleSheets,"height"))i=parseFloat(r);else{var e=this.getViewBox();if(e){var s=e[2]/e[3];i=this.getWidth(t)/s}else i=Math.min(150,t.viewport.width/2,t.viewport.height)}else i=(r=Ks(this.element,t.styleSheets,"height"))?parseFloat(r):t.viewport.height;return this.height=i},i.prototype.getX=function(t){if(void 0!==this.x)return this.x;if(this.isOutermostSvg(t))return this.x=0;var i=Ks(this.element,t.styleSheets,"x");return this.x=i?parseFloat(i):0},i.prototype.getY=function(t){if(void 0!==this.y)return this.y;if(this.isOutermostSvg(t))return this.y=0;var i=Ks(this.element,t.styleSheets,"y");return this.y=i?parseFloat(i):0},i.prototype.getViewBox=function(){if(void 0!==this.viewBox)return this.viewBox;var t=this.element.getAttribute("viewBox");return this.viewBox=t?so(t):void 0},i.prototype.isOutermostSvg=function(t){return t.svg2pdfParameters.element===this.element},i}(ia),na=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},i}(ia),ea=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.renderCore=function(i){return qs(this,void 0,void 0,(function(){var r,n,e,s;return js(this,(function(o){switch(o.label){case 0:return[4,t.prototype.renderCore.call(this,i)];case 1:return o.sent(),(r=Ks(this.element,i.styleSheets,"href"))&&(n=this.getBoundingBox(i),e=i.pdf.internal.scaleFactor,s=i.pdf.internal.pageSize.getHeight(),i.pdf.link(e*(n[0]*i.transform.sx+i.transform.tx),s-e*((n[1]+n[3])*i.transform.sy+i.transform.ty),e*n[2],e*n[3],{url:r})),[2]}}))}))},i}(na),sa=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ms(i,t),i.prototype.apply=function(t){return qs(this,void 0,void 0,(function(){var i,r,n,e,s;return js(this,(function(o){switch(o.label){case 0:if(!this.isVisible(!0,t))return[2];i=t.pdf.matrixMult(this.computeNodeTransform(t),t.transform),t.pdf.setCurrentTransformationMatrix(i),r=0,n=this.children,o.label=1;case 1:return r<n.length?[4,n[r].render(new Rs(t.pdf,{refsHandler:t.refsHandler,styleSheets:t.styleSheets,viewport:t.viewport,withinClipPath:!0,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return e=this.children.length>0&&!!Ks(this.children[0].element,t.styleSheets,"clip-rule"),s=this.getClipRuleAttr(e?this.children[0].element:this.element,t.styleSheets),t.pdf.clip(s).discardPath(),t.pdf.setCurrentTransformationMatrix(i.inversed()),[2]}}))}))},i.prototype.getBoundingBoxCore=function(t){return ho(t,this)},i.prototype.isVisible=function(t,i){return Ys(this,t,i)},i.prototype.getClipRuleAttr=function(t,i){return"evenodd"===Ks(t,i,"clip-rule")?"evenodd":void 0},i}(mo);function oa(t,i,r){var n,e=[];switch(function(t,i){for(var r=[],n=0;n<t.childNodes.length;n++){var e=t.childNodes[n];"#"!==e.nodeName.charAt(0)&&r.push(e)}for(n=0;n<r.length;n++)i(0,r[n])}(t,(function(t,n){return e.push(oa(n,i,r))})),t.tagName.toLowerCase()){case"a":n=new ea(t,e);break;case"g":n=new na(t,e);break;case"circle":n=new Qo(t,e);break;case"clippath":n=new sa(t,e);break;case"ellipse":n=new Bo(t,e);break;case"lineargradient":n=new go(t,e);break;case"image":n=new Jo(t,e,i);break;case"line":n=new Po(t,e);break;case"marker":n=new Xo(t,e);break;case"path":n=new Go(t,e);break;case"pattern":n=new No(t,e);break;case"polygon":n=new Zo(t,e);break;case"polyline":n=new ta(t,e);break;case"radialgradient":n=new ko(t,e);break;case"rect":n=new Co(t,e);break;case"svg":n=new ra(t,e);break;case"symbol":n=new Io(t,e);break;case"text":n=new Wo(t,e);break;case"use":n=new Oo(t,e);break;default:n=new Yo(t,e)}if(null!=r&&n.element.hasAttribute("id")){var s=ws(n.element.id,{isIdentifier:!0});r[s]=r[s]||n}return n.children.forEach((function(t){return t.setParent(n)})),n}var aa=function(){function t(t,i){this.rootSvg=t,this.loadExternalSheets=i,this.styleSheets=[]}return t.prototype.load=function(){return qs(this,void 0,void 0,(function(){var t;return js(this,(function(i){switch(i.label){case 0:return[4,this.collectStyleSheetTexts()];case 1:return t=i.sent(),this.parseCssSheets(t),[2]}}))}))},t.prototype.collectStyleSheetTexts=function(){return qs(this,void 0,void 0,(function(){var i,r,n,e,s;return js(this,(function(o){switch(o.label){case 0:if(i=[],this.loadExternalSheets&&this.rootSvg.ownerDocument)for(e=0;e<this.rootSvg.ownerDocument.childNodes.length;e++)"xml-stylesheet"===(r=this.rootSvg.ownerDocument.childNodes[e]).nodeName&&"string"==typeof r.data&&i.push(t.loadSheet(r.data.match(/href=["'].*?["']/)[0].split("=")[1].slice(1,-1)));for(n=this.rootSvg.querySelectorAll("style,link"),e=0;e<n.length;e++)Js(s=n[e],"style")?i.push(s.textContent):this.loadExternalSheets&&Js(s,"link")&&"stylesheet"===s.getAttribute("rel")&&s.hasAttribute("href")&&i.push(t.loadSheet(s.getAttribute("href")));return[4,Promise.all(i)];case 1:return[2,o.sent().filter((function(t){return null!==t}))]}}))}))},t.prototype.parseCssSheets=function(i){for(var r=document.implementation.createHTMLDocument(""),n=0,e=i;n<e.length;n++){var s=e[n],o=r.createElement("style");o.textContent=s,r.body.appendChild(o);var a=o.sheet;if(a instanceof CSSStyleSheet){for(var u=a.cssRules.length-1;u>=0;u--){var f=a.cssRules[u];if(f instanceof CSSStyleRule){var c=f;if(c.selectorText.indexOf(",")>=0){a.deleteRule(u);for(var h=c.cssText.substring(c.selectorText.length),l=t.splitSelectorAtCommas(c.selectorText),d=0;d<l.length;d++)a.insertRule(l[d]+h,u+d)}}else a.deleteRule(u)}this.styleSheets.push(a)}}},t.splitSelectorAtCommas=function(t){if(0===t.trim().length)return[];for(var i,r=/,|["']/g,n=/\\[\s\S]|"/g,e=/\\[\s\S]|'/g,s=[],o="initial",a=-1,u=n,f=0;f<t.length;)switch(o){case"initial":r.lastIndex=f,(i=r.exec(t))?(","===i[0]?(s.push(t.substring(a+1,r.lastIndex-1).trim()),a=r.lastIndex-1):(o="withinQuotes",u='"'===i[0]?n:e),f=r.lastIndex):(s.push(t.substring(a+1).trim()),f=t.length);break;case"withinQuotes":u.lastIndex=f,(i=u.exec(t))?(f=u.lastIndex,1===i[0].length&&(o="initial")):f=t.length}return s},t.loadSheet=function(t){return new Promise((function(i,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="text",n.onload=function(){200!==n.status&&r(Error("Error ".concat(n.status,": Failed to load '").concat(t,"'"))),i(n.responseText)},n.onerror=r,n.onabort=r,n.send(null)})).catch((function(){return null}))},t.prototype.getPropertyValue=function(t,i){for(var r=[],n=0,e=this.styleSheets;n<e.length;n++)for(var s=e[n],o=0;o<s.cssRules.length;o++){var a=s.cssRules[o];a.style.getPropertyValue(i)&&t.matches(a.selectorText)&&r.push(a)}if(0!==r.length)return r.reduce((function(t,r){return 1===(e=r,(s=(n=t).style.getPropertyPriority(i))!==e.style.getPropertyPriority(i)?"important"===s?1:-1:function(t,i){var r,n,e;if("string"==typeof t){if(-1!==t.indexOf(","))throw"Invalid CSS selector";r=xs(t).specificityArray}else{if(!Array.isArray(t))throw"Invalid CSS selector or specificity array";if(4!==t.filter((function(t){return"number"==typeof t})).length)throw"Invalid specificity array";r=t}if("string"==typeof i){if(-1!==i.indexOf(","))throw"Invalid CSS selector";n=xs(i).specificityArray}else{if(!Array.isArray(i))throw"Invalid CSS selector or specificity array";if(4!==i.filter((function(t){return"number"==typeof t})).length)throw"Invalid specificity array";n=i}for(e=0;e<4;e+=1){if(r[e]<n[e])return-1;if(r[e]>n[e])return 1}return 0}(n.selectorText,e.selectorText))?t:r;var n,e,s})).style.getPropertyValue(i)||void 0},t}(),ua=function(){function t(){this.measureMethods={}}return t.prototype.getTextOffset=function(t,i){var r=i.textAnchor;if("start"===r)return 0;var n=this.measureTextWidth(t,i),e=0;switch(r){case"end":e=n;break;case"middle":e=n/2}return e},t.prototype.measureTextWidth=function(t,i){return 0===t.length?0:this.getMeasureFunction(i.fontFamily).call(this,t,i.fontFamily,i.fontSize+"px",i.fontStyle,i.fontWeight)},t.prototype.getMeasurementTextNode=function(){if(!this.textMeasuringTextElement){this.textMeasuringTextElement=document.createElementNS(ro,"text");var t=document.createElementNS(ro,"svg");t.appendChild(this.textMeasuringTextElement),t.style.setProperty("position","absolute"),t.style.setProperty("visibility","hidden"),document.body.appendChild(t)}return this.textMeasuringTextElement},t.prototype.canvasTextMeasure=function(t,i,r,n,e){var s=document.createElement("canvas").getContext("2d");return null!=s?(s.font=[n,e,r,i].join(" "),s.measureText(t).width):0},t.prototype.svgTextMeasure=function(t,i,r,n,e,s){void 0===s&&(s=this.getMeasurementTextNode());var o=s;return o.setAttribute("font-family",i),o.setAttribute("font-size",r),o.setAttribute("font-style",n),o.setAttribute("font-weight",e),o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.textContent=t,o.getBBox().width},t.prototype.getMeasureFunction=function(i){var r=this.measureMethods[i];if(!r){var n="16px",e="normal",s="normal",o=this.canvasTextMeasure(t.testString,i,n,e,s),a=this.svgTextMeasure(t.testString,i,n,e,s);this.measureMethods[i]=r=Math.abs(o-a)<t.epsilon?this.canvasTextMeasure:this.svgTextMeasure}return r},t.prototype.cleanupTextMeasuring=function(){if(this.textMeasuringTextElement){var t=this.textMeasuringTextElement.parentNode;t&&document.body.removeChild(t),this.textMeasuringTextElement=void 0}},t.testString="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!\"$%&/()=?'\\+*-_.:,;^}][{#~|<>",t.epsilon=.1,t}();an.API.svg=function(t,i){return void 0===i&&(i={}),function(t,i){return qs(this,arguments,void 0,(function(t,i,r){var n,e,s,o,a,u,f,c,h,l,d,v,p,b;return void 0===r&&(r={}),js(this,(function(m){switch(m.label){case 0:return n=null!==(v=r.x)&&void 0!==v?v:0,e=null!==(p=r.y)&&void 0!==p?p:0,s=null!==(b=r.loadExternalStyleSheets)&&void 0!==b&&b,a=new Os(o={}),[4,(u=new aa(t,s)).load()];case 1:return m.sent(),f=new Ro(i.internal.pageSize.getWidth(),i.internal.pageSize.getHeight()),c=Es(Es({},r),{element:t}),h=new ua,l=new Rs(i,{refsHandler:a,styleSheets:u,viewport:f,svg2pdfParameters:c,textMeasure:h}),i.advancedAPI(),i.saveGraphicsState(),i.setCurrentTransformationMatrix(i.Matrix(1,0,0,1,n,e)),i.setLineWidth(l.attributeState.strokeWidth),i.setFillColor((d=l.attributeState.fill.color).r,d.g,d.b),i.setFont(l.attributeState.fontFamily),i.setFontSize(l.attributeState.fontSize*i.internal.scaleFactor),[4,oa(t,l,o).render(l)];case 2:return m.sent(),i.restoreGraphicsState(),i.compatAPI(),l.textMeasure.cleanupTextMeasuring(),[2,i]}}))}))}(t,this,i)};const fa={kerning:!0,features:{liga:!1,rlig:!1}},ca=t=>"K"+t;function ha(t,i){let r=!1,n=0,e=0;for(const s of i.commands)"M"===s.type?(t.moveTo(s.x,s.y),n=s.x,e=s.y,r=!0):"L"===s.type?(t.lineTo(s.x,s.y),n=s.x,e=s.y):"C"===s.type?(t.curveTo(s.x1,s.y1,s.x2,s.y2,s.x,s.y),n=s.x,e=s.y):"Q"===s.type?(t.curveTo(n+2/3*(s.x1-n),e+2/3*(s.y1-e),s.x+2/3*(s.x1-s.x),s.y+2/3*(s.y1-s.y),s.x,s.y),n=s.x,e=s.y):"Z"===s.type&&t.close();return r}async function la(t,i,r){if("svg"===i.kind){const n=document.createElement("div");n.style.cssText="position:absolute;left:-9999px;top:0;width:10px;height:10px;overflow:hidden",n.innerHTML=i.data,document.body.appendChild(n);const e=n.querySelector("svg");e.setAttribute("width",r.w+"mm"),e.setAttribute("height",r.h+"mm");try{await t.svg(e,{x:r.x,y:r.y,width:r.w,height:r.h})}finally{n.remove()}}else t.addImage(i.data,"jpeg"===i.kind?"JPEG":"PNG",r.x,r.y,r.w,r.h,void 0,"SLOW")}const da=(t,i)=>t.internal.write(i);function va(t,i,r,n,e=!1){const s=t.plate(r);if(s)return da(i,"q"),s.overprint&&da(i,`/${L} gs`),da(i,e?`/${s.res} CS 1 SCN`:`/${s.res} cs 1 scn`),n(),void da(i,"Q");e?i.setDrawColor(...t.col(r)):i.setFillColor(...t.col(r)),n()}async function pa(t,i,r,n,e,s,o,a){const{W:u,H:f}=t.fmt,{L:c,placed:h}=t.layoutSide(r,!0,s),l=t.tpl.logo;for(const r of c.art)if("rect"===r.t){const s=p(r,e,u,f);va(t,i,r.c,(()=>i.rect(s.x+n,s.y+n,s.w,s.h,"F")))}else if("circle"===r.t)va(t,i,r.c,(()=>i.circle(r.cx+n,r.cy+n,r.r,"F")));else if("line"===r.t)va(t,i,r.c,(()=>{i.setLineWidth(r.w),i.line(r.x1+n,r.y1+n,r.x2+n,r.y2+n)}),!0);else if("image"===r.t){const o=t.imageOf(r,s);if(!o)continue;const a=p(r,e,u,f),c=t.imageFit(r,a,o);i.saveGraphicsState(),i.rect(a.x+n,a.y+n,a.w,a.h,null),i.clip(),i.discardPath(),i.addImage(o.src,o.src.startsWith("data:image/png")?"PNG":"JPEG",c.x+n,c.y+n,c.w,c.h,void 0,"SLOW"),i.restoreGraphicsState()}else if("logo"===r.t&&l){const t=b(l.ar,r),e={x:t.x+n,y:t.y+n,w:t.w,h:t.h};"pdf"===l.kind?a.push({page:o,...e}):await la(i,l,e)}else"qr"===r.t&&(i.setFillColor(...m),i.roundedRect(r.x+n,r.y+n,r.size,r.size,1,1,"F"),va(t,i,t.qrRef(r)??w,(()=>{for(const e of A(r,s,t.fields))i.rect(e.x+n,e.y+n,e.w+.01,e.h+.01,"F")})));for(const r of h){if(!r.text)continue;const e=r.st.size*g,s=t.col(r.st.color);if(t.tpl.outline||t.plate(r.st.color)||r.st.font.startsWith("X")){const s=t.font(r.st.font).ot.getPath(r.text,r.x+n,r.y+n,e,{...fa,letterSpacing:r.st.ls});va(t,i,r.st.color,(()=>{ha(i,s)&&i.fill()}))}else i.setFont(ca(r.st.font),"normal"),i.setFontSize(r.st.size),i.setTextColor(...s),i.text(r.text,r.x+n,r.y+n,{baseline:"alphabetic",charSpace:r.st.ls*e})}}const ba=t=>Math.max(3,t+1);function ma(t,i,r,n,e,s){s?da(t,`/${x} CS 1 SCN`):t.setDrawColor(1,1,1,1),t.setLineWidth(.25*g);const o=ba(e);for(const e of[i,i+r])for(const r of[i,i+n]){const n=e===i?-1:1,s=r===i?-1:1;t.line(e+n*o,r,e+n*(o+5),r),t.line(e,r+s*o,e,r+s*(o+5))}}function wa(t){const{W:i,H:r,b:n,pad:e}=ka(t);return{trim:{x:e*Na,y:e*Na,w:i*Na,h:r*Na},bleed:{x:(e-n)*Na,y:(e-n)*Na,w:(i+2*n)*Na,h:(r+2*n)*Na}}}const ga=t=>({bottomLeftX:t.x,bottomLeftY:t.y,topRightX:t.x+t.w,topRightY:t.y+t.h});function ka(t){const{W:i,H:r}=t.fmt,n=t.tpl.bleed,e=t.tpl.marks?Math.max(n,ba(n)+5+1):n;return{W:i,H:r,b:n,pad:e,pw:i+2*e,ph:r+2*e}}async function ya(t,i,r,n){const{PDFDocument:e,clip:s,endPath:o,popGraphicsState:a,pushGraphicsState:u,rectangle:f}=await import("./p-BEuF_WyR.js"),{W:h,H:l,b:d,pad:v,pw:p,ph:b}=ka(t),m=t.tpl.background,w=c(t.tpl),g=t.tpl.logo,L=await e.create(),A=m?await e.load(k(m.src),{ignoreEncryption:!0}):null,x=g?.box,S=n.length&&g&&x?await L.embedPage((await e.load(k(g.data),{ignoreEncryption:!0})).getPage(0),{left:x.x*Na,bottom:x.y*Na,right:(x.x+x.w)*Na,top:(x.y+x.h)*Na}):null,M=await L.embedPdf(i,w.map(((t,i)=>i)));for(const[i,r]of w.entries()){const e=L.addPage([p*Na,b*Na]),c=m?.[r];if(A&&c){const t=A.getPage(c.page),i=c.media,{box:r}=y(c,h,l),n=await L.embedPage(t,{left:i.x*Na,bottom:i.y*Na,right:(i.x+i.w)*Na,top:(i.y+i.h)*Na}),p=N(c,h,l,d);e.pushOperators(u(),f((v+p.x)*Na,(b-v-p.y-p.h)*Na,p.w*Na,p.h*Na),s(),o()),e.drawPage(n,{x:(v+r.x)*Na,y:(b-v-r.y-r.h)*Na,width:r.w*Na,height:r.h*Na}),e.pushOperators(a())}e.drawPage(M[i],{x:0,y:0});const w=S?n.filter((t=>t.page===i)):[];if(S&&w.length){e.pushOperators(u(),f((v-d)*Na,(v-d)*Na,(h+2*d)*Na,(l+2*d)*Na),s(),o());for(const t of w)e.drawPage(S,{x:t.x*Na,y:(b-t.y-t.h)*Na,width:t.w*Na,height:t.h*Na});e.pushOperators(a())}const{trim:g,bleed:k}=wa(t);e.setTrimBox(g.x,g.y,g.w,g.h),e.setBleedBox(k.x,k.y,k.w,k.h)}return L.setTitle(r),L.setCreator("Kartensatz"),L.save({useObjectStreams:!1})}const Na=72/25.4,La={card:{the:"die Karte",The:"Die Karte",on:"der Karte"},flyer:{the:"der Flyer",The:"Der Flyer",on:"dem Flyer"},poster:{the:"das Poster",The:"Das Poster",on:"dem Poster"}};function Aa(t,i){if("string"!=typeof t)return t;if(t.trim())try{return JSON.parse(t)}catch{throw Error(i+" ist kein gültiges JSON.")}}function xa(t){return(t||"karte").toLowerCase().replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"karte"}const Sa=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.pkChange=n(this,"pkChange"),this.pkPdf=n(this,"pkPdf"),this.pkValidity=n(this,"pkValidity"),this.tpl=S(void 0),this.fieldList=M(this.tpl),this.fonts=null,this.xfonts={},this.xKey="",this.engine=null,this.lastValidity="",this.ready=!1,this.error="",this.draft={},this.side="front",this.printView=!1,this.confirmed=!1,this.active="",this.scale=4,this.busy=!1,this.status={text:"",level:""},this.rev=0,this.touched=[],this.tried=!1,this.download=!0,this.confirm=!1,this.showSpec=!1,this.appearance="auto",this.onCardInput=t=>{const i=this.runOf(t);if(!i||!i.dataset.key)return;const r=i.textContent||"",n=r.replace(/[\r\n]+/g," ");r!==n&&(i.textContent=n,E(i)),n||i.replaceChildren(),this.set(i.dataset.key,i.dataset.seg||null,n)},this.onCardKey=t=>{const i=this.runOf(t);if(i){if("Enter"===t.key){t.preventDefault();const r=[...this.cardEl.querySelectorAll(".pk-run[contenteditable]")],n=r.indexOf(i),e=r[(n+(t.shiftKey?-1:1)+r.length)%r.length];e&&(e.focus(),E(e))}"Escape"===t.key&&i.blur()}},this.onCardPaste=t=>{!q&&this.runOf(t)&&(t.preventDefault(),document.execCommand("insertText",!1,(t.clipboardData?.getData("text/plain")||"").replace(/[\r\n]+/g," ")))},this.onCardFocus=t=>{const i=this.runOf(t);i&&i.dataset.key&&(this.active=i.dataset.key)},this.onCardBlur=t=>{const i=this.runOf(t),r=t.relatedTarget?.dataset?.key;i?.dataset.key&&i.dataset.key!==r&&this.touch(i.dataset.key),i&&i.dataset.key&&i.dataset.seg&&this.normalize(i.dataset.key)},this.onCardClick=t=>{const i=t.target.closest(".pk-run.pk-fld");if(!i||i.isContentEditable||!i.dataset.key||!this.editable(i.dataset.key))return;const r=`input[data-key="${CSS.escape(i.dataset.key)}"]`+(i.dataset.seg?`[data-seg="${i.dataset.seg}"]`:""),n=this.el.shadowRoot,e=n.querySelector(r)||n.querySelector(`.pk-form [data-key="${CSS.escape(i.dataset.key)}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"center",behavior:"smooth"}))}}onPrintView(){this.measure()}onConfigChange(){this.applyConfig()}onValueChange(){this.draft=this.parseValue(),this.confirmed=!1,this.persist()}async componentWillLoad(){this.applyConfig();const t=this.storageKey?this.loadStored():void 0;this.draft={...t||{},...this.parseValue()};try{this.fonts=await j(this.fontBase||e("./assets/fonts/")),this.applyConfig(),this.ready=!0}catch(t){this.error="Editor konnte nicht starten: "+(t instanceof Error?t.message:t+"")}}componentDidLoad(){const t=this.cardEl;t.addEventListener("input",this.onCardInput),t.addEventListener("keydown",this.onCardKey),t.addEventListener("paste",this.onCardPaste),t.addEventListener("focusin",this.onCardFocus),t.addEventListener("focusout",this.onCardBlur),t.addEventListener("click",this.onCardClick),this.ro=new ResizeObserver((()=>this.measure())),this.ro.observe(this.el),this.measure()}disconnectedCallback(){this.ro?.disconnect()}componentDidRender(){if(!this.engine||!this.cardEl)return;const t={d:this.data(),print:this.printView,S:this.scale,b:0,guides:!1,omitLocked:!0,inline:!this.isTouch(),active:this.active,editable:t=>this.editable(t)};this.printView&&2===this.tpl.sides&&this.backEl?(F(this.engine,this.cardEl,"front",t),F(this.engine,this.backEl,"back",t)):F(this.engine,this.cardEl,this.side,t);const i=this.validity(),r=JSON.stringify(i);r!==this.lastValidity&&(this.lastValidity=r,this.pkValidity.emit(i))}async getData(){return this.data()}async validate(){return this.validity()}async createPdf(){if(!this.engine)throw Error("Editor ist noch nicht bereit.");const t=this.validity(),i=t.issues.filter((t=>"error"===t.level));if(i.length)throw this.tried=!0,Error("Bitte zuerst korrigieren: "+i.map((t=>t.text)).join(" "));if(!t.confirmed)throw Error("Bitte zuerst bestätigen, dass die Daten geprüft sind.");const r=this.data(),n=await async function(t,i){const{W:r,H:n,b:e,pad:s,pw:o,ph:a}=ka(t),p=o>a?"landscape":"portrait",b=new an({unit:"mm",format:[o,a],orientation:p,compress:!0,putOnlyUsedFonts:!0});if(!t.tpl.outline)for(const i of u)b.addFileToVFS(i+".ttf",t.fonts[i].b64),b.addFont(i+".ttf",ca(i),"normal");const m=f(t.tpl),w=[];for(const[u,f]of c(t.tpl).entries()){u&&b.addPage([o,a],p);const c=b.getCurrentPageInfo().pageContext,h=wa(t);c.trimBox=ga(h.trim),c.bleedBox=ga(h.bleed),await pa(t,b,f,s,e,i,u,w),t.tpl.marks&&ma(b,s,r,n,e,m)}const g=`${h[t.tpl.product]} ${"string"==typeof i.name?i.name:""}`.trim();if(b.setProperties({title:g,creator:"Kartensatz"}),!m)return b.output("blob");const k=await l(b.output("arraybuffer"),v(t.tpl),d(t.tpl));return new Blob([t.tpl.background||w.length?await ya(t,k,g,w):k],{type:"application/pdf"})}(this.engine,r),e={card:"visitenkarte",flyer:"flyer",poster:"poster"}[this.tpl.product],s="string"==typeof r.name?r.name.trim():"",o={blob:n,filename:`${e}${s?"-"+xa(s):""}.pdf`,data:r};return this.download&&this.saveBlob(n,o.filename),this.pkPdf.emit(o),o}async reset(){this.draft={},this.confirmed=!1,this.touched=[],this.tried=!1,this.persist(),this.pkChange.emit(this.data())}async showErrors(){return this.tried=!0,this.validity()}applyConfig(){try{const t=S(Aa(this.template,"template"));t.logo=P(t.logo),this.tpl=t,this.fieldList=I(t,M(t,Aa(this.fields,"fields")||[]));const i=R(t.font);this.engine=this.fonts?new O(this.tpl,this.fieldList,{...this.fonts,...i===this.xKey?this.xfonts:{}}):null,this.fonts&&i!==this.xKey&&C(t.font).then((t=>{R(this.tpl.font)===i&&(this.xfonts=t,this.xKey=i,this.applyConfig())})),c(t).includes(this.side)||(this.side="front"),this.error=""}catch(t){this.error=t instanceof Error?t.message:t+""}this.rev++,this.measure()}validity(){const t=this.engine,i=this.data(),r=t?[...t.issues(i),...T(B(t,i))]:[];return{valid:!!this.engine&&!r.some((t=>"error"===t.level)),issues:r,confirmed:!this.confirm||this.confirmed}}parseValue(){try{return Aa(this.value,"value")||{}}catch(t){return this.error=t instanceof Error?t.message:t+"",{}}}loadStored(){try{return JSON.parse(localStorage.getItem(this.storageKey)||"null")||void 0}catch{return}}persist(){const t=Object.fromEntries(Object.entries(this.draft).filter((([,t])=>!D(t))));if(this.storageKey)try{localStorage.setItem(this.storageKey,JSON.stringify(t))}catch{}}editable(t){const i=this.fieldList.find((i=>i.key===t));return!!i&&!i.locked&&!i.hidden}data(){const t={};for(const i of this.fieldList)i.hidden||(t[i.key]=z(i,!i.locked&&i.key in this.draft?this.draft[i.key]:i.default));return t}set(t,i,r){if(!this.editable(t))return;const n=JSON.stringify(this.data()[t]);if(i){const n=this.data()[t];this.draft={...this.draft,[t]:{...n,[i]:r}}}else this.draft={...this.draft,[t]:r};JSON.stringify(this.data()[t])!==n&&(this.confirmed=!1),this.status={text:"",level:""},this.persist(),this.pkChange.emit(this.data())}normalize(t){const i=this.data()[t];U(i)&&this.editable(t)&&this.set(t,null,function(t){return{...t,cc:t.cc?t.cc.replace(/\s+/g,"").replace(/^00/,"+").replace(/^(?=\d)/,"+"):t.cc,area:t.area?t.area.replace(/\s+/g,"").replace(/^\(?0+/,"").replace(/\)$/,""):t.area}}(i))}focusField(t){this.active=t,this.engine&&(this.side=this.engine.sideOf(t,this.data()))}isTouch(){return matchMedia("(pointer: coarse)").matches}measure(){if(!this.stageEl||!this.engine)return;const{W:t,H:i}=this.engine.fmt,r=getComputedStyle(this.stageEl),n=this.stageEl.clientWidth-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight);let e=Math.min((this.printView&&2===this.tpl.sides?(n-16)/2:n)/t,7.2);if(this.el.clientWidth>=760){const t=this.stageEl.clientHeight-110;t>100&&(e=Math.min(e,t/i))}else e=Math.min(e,.35*window.innerHeight/i);e=Math.max(.2,e),Math.abs(e-this.scale)>.01&&(this.scale=e)}saveBlob(t,i){const r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=i,document.body.appendChild(r),r.click(),r.remove(),setTimeout((()=>URL.revokeObjectURL(r.href)),5e3)}runOf(t){const i=t.target;return i&&i.classList&&i.classList.contains("pk-fld")?i:null}touch(t){this.touched.includes(t)||(this.touched=[...this.touched,t])}async onImage(t,i){const r=i.target,n=r.files?.[0];if(r.value="",n)try{this.set(t,null,await _(n))}catch(t){this.status={text:t instanceof Error?t.message:t+"",level:"err"}}}renderInput(t,i,r){const n={onFocus:()=>this.focusField(t.key),onKeyDown:t=>{if("Enter"!==t.key)return;t.preventDefault();const i=[...this.el.shadowRoot.querySelectorAll(".pk-form input, .pk-form select, .pk-form textarea")],r=i.indexOf(t.target);i[r+1]?.focus()}},e=r?{"aria-invalid":"true","aria-describedby":"pk-err-"+t.key}:{},o=s("span",{class:"pk-ferr",id:"pk-err-"+t.key,"aria-live":"polite"},r?.text);if("phone"===t.kind){const r=i[t.key],a="nat"===this.tpl.phone,u=["cc","area","num","ext"].filter((i=>!("cc"===i&&a||"ext"===i&&t.mobile))),f={cc:"+49",area:"",num:"",ext:""};return s("div",{class:"pk-field",role:"group","aria-label":t.label},s("span",{class:"pk-flabel",part:"label"},t.label,t.required?" *":""),s("div",{class:{"pk-phone":!0,"pk-mob":!!t.mobile,"pk-nat":a}},u.map((i=>s("label",null,s("span",null,"area"===i&&t.mobile?"Netz":V[i]),s("input",{class:"pk-inp",part:"input","data-key":t.key,"data-seg":i,inputMode:"tel",autoComplete:"off",placeholder:f[i],value:r[i],onInput:r=>this.set(t.key,i,r.target.value),onBlur:()=>this.normalize(t.key),...n,...e}))))),o)}if("image"===t.kind){const r=i[t.key];return s("div",{class:"pk-field",role:"group","aria-label":t.label},s("span",{class:"pk-flabel",part:"label"},t.label,t.required?" *":""),D(r)&&r.src?s("div",{class:"pk-img"},s("img",{src:r.src,alt:""}),s("span",null,r.w," × ",r.h," px"),s("button",{type:"button",class:"pk-link",onClick:()=>this.set(t.key,null,"")},"Entfernen")):null,s("label",{class:"pk-upload"},D(r)&&r.src?"Anderes Bild wählen":"Bild hochladen (JPG oder PNG)",s("input",{type:"file","data-key":t.key,accept:"image/png,image/jpeg",onChange:i=>this.onImage(t.key,i),onFocus:()=>this.focusField(t.key),...e})),o)}if("multiline"===t.kind)return s("label",{class:"pk-field"},s("span",{class:"pk-flabel",part:"label"},t.label,t.required?" *":""),s("textarea",{class:"pk-inp",part:"input","data-key":t.key,rows:4,placeholder:t.placeholder||t.label,value:i[t.key],onInput:i=>this.set(t.key,null,i.target.value),onFocus:()=>this.focusField(t.key),...e}),o);const a=(i[t.key]||"").trim(),u=!!a&&!!t.choices&&!t.choices.includes(a);return s("label",{class:"pk-field"},s("span",{class:"pk-flabel",part:"label"},t.label,t.required?" *":""),t.choices?s("select",{class:"pk-inp",part:"input","data-key":t.key,onChange:i=>this.set(t.key,null,i.target.value),...n,...e},s("option",{value:"",selected:!a},"Bitte wählen"),u&&s("option",{value:a,selected:!0,disabled:!0},a," (nicht mehr wählbar)"),t.choices.map((t=>s("option",{value:t,selected:a===t},t)))):s("input",{class:"pk-inp",part:"input","data-key":t.key,type:"email"===t.inputType?"email":"text",inputMode:"email"===t.inputType?"email":"url"===t.inputType?"url":"text",autoComplete:t.autocomplete||"off",placeholder:t.placeholder||t.label,value:i[t.key],onInput:i=>this.set(t.key,null,i.target.value),...n,...e}),o)}render(){const t=this.engine,i=this.data(),r=this.fieldList.filter((t=>!t.locked&&!t.hidden)).sort(((t,i)=>t.order-i.order)),{issues:n,valid:e,confirmed:a}=this.validity(),u=this.printView&&2===this.tpl.sides,f=new Map;for(const t of n)"error"===t.level&&t.key&&!f.has(t.key)&&f.set(t.key,t);const c=new Map([...f].filter((([t])=>this.tried||this.touched.includes(t)))),h=new Set(r.map((t=>t.key))),l=n.filter((t=>!(t.key&&h.has(t.key)&&f.get(t.key)===t))),d=this.isTouch(),p=La[this.tpl.product];return s(o,{key:"6fd97841f4ea5dbf49c0a9c6830b2310429a172a"},s("div",{key:"178520af04616e96ff466b49743b22ce9ef27bbc",class:"pk-root"},s("div",{key:"d107f7cb1adf8f8043bb3a85d96e7352776aeaee",class:"pk-stage",ref:t=>this.stageEl=t},s("div",{key:"3a3a0d7b8e27a121f88cc7d06a5acd359fdc5eb0",class:"pk-bar"},2===this.tpl.sides&&s("div",{key:"c1908091214e98e73033247fd157283f0563ad83",class:{"pk-seg":!0,"pk-keep":this.printView},role:"group","aria-label":"Seite","aria-hidden":this.printView?"true":null},["front","back"].map((t=>s("button",{type:"button","aria-pressed":(this.side===t)+"",onClick:()=>this.side=t},"front"===t?"Vorderseite":"Rückseite")))),s("div",{key:"bf8bf27f4c6f2d1e1ec44f3ccad61cee1d9e4a1c",class:"pk-seg",role:"group","aria-label":"Ansicht"},s("button",{key:"b88f7b56646e6f2d318195eab35674eba2f44444",type:"button","aria-pressed":!this.printView+"",onClick:()=>this.printView=!1},"Bearbeiten"),s("button",{key:"3ce709553882c47c1b18b60db9fc3d2bc23e7ffa",type:"button","aria-pressed":this.printView+"",onClick:()=>this.printView=!0},"Druckansicht"))),s("div",{key:"b197af15bedce42ed712c49c59b325f872028f55",class:{"pk-cardslot":!0,"pk-both":u}},s("figure",{key:"0dd932e4b86b98d1f3ee1f2f283c9e425f34aab2",class:"pk-side"},s("div",{key:"49e9e20c2a20bfd1a69ff404dbc4b2147f3dd775",class:"pk-card",part:"card",spellcheck:!1,ref:t=>this.cardEl=t}),u&&s("figcaption",{key:"9abfc5c61c68db1c7adf8307f8006b3f85a1ae83"},"Vorderseite")),u&&s("figure",{key:"8ddf8c384e75849899b88b45a266f72ca5be5ba4",class:"pk-side"},s("div",{key:"012447193902fca2e1978d23cea4d700d8559b33",class:"pk-card",part:"card",ref:t=>this.backEl=t}),s("figcaption",{key:"d8ce9f25a603c4ceb77bae851ced8ad151f90dd1"},"Rückseite"))),s("p",{key:"3e8c3e9eab81757421e9304153415a5eab43c0b2",class:"pk-foot"},this.printView?`So wird ${p.the} gedruckt.`:d?"Tippe auf einen Text, um ihn zu ändern.":`Schreibe direkt auf ${p.on} oder in die Felder.`)),s("form",{key:"848940128781e6d597766df3d5be5c5aa0292a27",class:"pk-form",part:"form",onSubmit:t=>t.preventDefault(),novalidate:!0,onFocusout:t=>{const i=t.target.dataset?.key,r=t.relatedTarget?.dataset?.key;i&&i!==r&&this.touch(i)}},H.map((t=>{const n=r.filter((i=>i.group===t));return n.length?s("fieldset",{class:"pk-group"},s("legend",null,W[t]),n.map((t=>this.renderInput(t,i,c.get(t.key))))):null})),s("section",{key:"f7b8430043eb9200f2bff4a8a67ad236812661eb",class:"pk-check","aria-label":"Prüfen und PDF"},s("ul",{key:"b3bc039406371c2703d8c0e1f3141c72e67813b5",class:"pk-issues",part:"issues"},l.length?l.map((t=>s("li",{class:"pk-"+t.level},t.text))):e&&s("li",{class:"pk-good"},"Alles passt. ",p.The," ist druckfertig.")),t&&this.showSpec&&s("div",{key:"e10a2117c540023191afe1955ae44db6d4abbb8b",class:"pk-spec"},function(t){const{W:i,H:r,b:n,pw:e,ph:s}=ka(t),o=t=>(Math.round(10*t)/10+"").replace(".",",");return[`${1===t.tpl.sides?"1 Seite":"2 Seiten"} · Endformat ${o(i)} × ${o(r)} mm`,`Seite ${o(e)} × ${o(s)} mm${n?` · ${n} mm Beschnitt`:""}${t.tpl.marks?" · Schnittmarken":""}`,(t.tpl.outline?"Text als Vektorpfade":"Schrift eingebettet")+" · CMYK",...t.tpl.colors?v(t.tpl).map((t=>`Sonderfarbe ${t.name}, Ersatz CMYK ${t.cmyk.map((t=>Math.round(100*t))).join("/")}`)):"custom"===t.tpl.theme&&t.tpl.accentName?[`Akzent ${t.tpl.accentName} ${v(t.tpl).length?"als Sonderfarbe, Ersatz":"als"} CMYK ${t.tpl.accent.map((t=>Math.round(100*t))).join("/")}`]:[]]}(t).map((t=>s("div",null,t))))),s("div",{key:"08f732be7560e23a256429646a7446d65cba8e42",class:"pk-actions"},this.confirm&&s("label",{key:"4b7db32a0ea43f24b8454b7bd7ccd190dff9e5eb",class:"pk-confirm",part:"confirm"},s("input",{key:"cc4baee9df177dced4fa91ab667160054b494762",type:"checkbox",checked:this.confirmed,disabled:!e,onChange:t=>this.confirmed=t.target.checked}),s("span",{key:"3f10e43dd1e91702862fdfcfb16e6767ace410d1"},"Ich habe alle Angaben",2===this.tpl.sides?", Vorder- und Rückseite,":""," in der Druckansicht geprüft. So soll ",p.the," gedruckt werden.")),s("button",{key:"c131fb08dddcb5603dbf3d66912389e966987e99",type:"button",class:"pk-btn",part:"pdf-button",disabled:e&&!a||this.busy,onClick:()=>e?this.onPdfClick():this.showMissing()},this.busy?"PDF wird erzeugt …":"PDF erzeugen"),t&&!e&&s("p",{key:"da8821dd01824c8290882fbf25c514d945bd1136",class:"pk-hint"},c.size||l.some((t=>"error"===t.level))?"Das PDF lässt sich erzeugen, sobald die rot markierten Punkte erledigt sind.":"Bitte alle Felder mit * ausfüllen."),t&&e&&!a&&s("p",{key:"cc2e31704c91502d7f4205ff04c7ab255b3ffd7f",class:"pk-hint"},"Bitte ",p.the," in der ",s("button",{key:"2800d1842dd2408a7ad225d08480b0f8c518ba0e",type:"button",class:"pk-link",onClick:()=>this.printView=!0},"Druckansicht")," prüfen und bestätigen."),s("div",{key:"5ed8758d595db96736c7781b0b2c02b38b9a6fee",class:{"pk-status":!0,["pk-"+this.status.level]:!!this.status.level},role:"status"},this.status.text)))),(!this.ready||this.error)&&s("div",{key:"d5a773bc67998ca5448ef904c36574a54382109e",class:"pk-loading"},this.error||"Schriften werden geladen …"))}showMissing(){this.tried=!0,this.status={text:"Noch nicht vollständig: bitte die rot markierten Punkte erledigen.",level:"err"},requestAnimationFrame((()=>{const t=this.el.shadowRoot.querySelector('.pk-form [aria-invalid="true"]');t&&(t.focus({preventScroll:!0}),t.scrollIntoView({block:"center",behavior:"smooth"}))}))}async onPdfClick(){this.busy=!0,this.status={text:"",level:""};try{const t=await this.createPdf();this.status={text:`${t.filename} erstellt (${Math.round(t.blob.size/1024)} KB).`,level:"ok"}}catch(t){console.error(t),this.status={text:"PDF konnte nicht erzeugt werden: "+(t instanceof Error?t.message:t+""),level:"err"}}finally{this.busy=!1}}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{printView:[{onPrintView:0}],template:[{onConfigChange:0}],fields:[{onConfigChange:0}],value:[{onValueChange:0}]}}static get style(){return':host([hidden]){display:none}:host{--pk-mat:#d7e2da;--pk-page:#f3f5f3;--pk-panel:#ffffff;--pk-panel-2:#eef2ef;--pk-line:#d3ddd6;--pk-ink:#16201a;--pk-ink-2:#4c5c51;--pk-ink-3:#7d8c82;--pk-accent:#c4136a;--pk-accent-ink:#ffffff;--pk-accent-soft:#c4136a24;--pk-warn:#a35a00;--pk-warn-soft:#f8e8cf;--pk-ok:#2c7a4b;--pk-err:#b42318;--pk-err-soft:#fbe4e1;--pk-shadow:0 1px 2px #16201a26, 0 10px 30px -8px #16201a40;--pk-ui:"pk-ui", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--pk-mono:"pk-P400", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;display:block;position:relative;height:100%;min-height:480px;container-type:inline-size;background:var(--pk-panel);color:var(--pk-ink);font-family:var(--pk-ui);font-size:14px;line-height:1.45;color-scheme:light}:host>*{font-family:var(--pk-ui);font-size:14px;line-height:1.45;color:var(--pk-ink);font-style:normal;font-weight:400;letter-spacing:normal;word-spacing:normal;text-align:left;text-transform:none;text-indent:0;white-space:normal}@media (prefers-color-scheme: dark){:host(:not([appearance="light"])){--pk-mat:#17221b;--pk-page:#121915;--pk-panel:#1b231e;--pk-panel-2:#232d27;--pk-line:#2f3c33;--pk-ink:#e4ebe6;--pk-ink-2:#a7b6ac;--pk-ink-3:#77887d;--pk-accent:#f0619f;--pk-accent-ink:#1b0a12;--pk-accent-soft:#f0619f2e;--pk-warn:#f0b35c;--pk-warn-soft:#3a2a12;--pk-ok:#6fcf97;--pk-err:#ff8a7a;--pk-err-soft:#3d1a16;--pk-shadow:0 1px 2px #0008, 0 12px 34px -8px #000c;color-scheme:dark}}:host([appearance="dark"]){--pk-mat:#17221b;--pk-page:#121915;--pk-panel:#1b231e;--pk-panel-2:#232d27;--pk-line:#2f3c33;--pk-ink:#e4ebe6;--pk-ink-2:#a7b6ac;--pk-ink-3:#77887d;--pk-accent:#f0619f;--pk-accent-ink:#1b0a12;--pk-accent-soft:#f0619f2e;--pk-warn:#f0b35c;--pk-warn-soft:#3a2a12;--pk-ok:#6fcf97;--pk-err:#ff8a7a;--pk-err-soft:#3d1a16;--pk-shadow:0 1px 2px #0008, 0 12px 34px -8px #000c;color-scheme:dark}*,*::before,*::after{box-sizing:border-box}button,input,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--pk-accent);outline-offset:2px}.pk-root{display:grid;grid-template-columns:minmax(0, 1fr) 380px;height:100%;min-height:inherit;background:var(--pk-panel)}.pk-stage{background:var(--pk-mat);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:20px;min-width:0;min-height:0}.pk-bar{display:flex;gap:8px;flex-wrap:nowrap;justify-content:center;max-width:100%}.pk-bar .pk-keep{visibility:hidden}@media (max-width: 420px){.pk-bar{gap:4px}.pk-seg button{padding:4px 8px;font-size:11.5px}}.pk-cardslot{display:flex;justify-content:center;width:100%}.pk-foot{margin:0;font-size:12px;color:var(--pk-ink-2);text-align:center}.pk-form{--pk-pad:20px;border-left:1px solid var(--pk-line);overflow:auto;padding:16px var(--pk-pad) 20px;display:flex;flex-direction:column;gap:18px;min-height:0}@container (max-width: 759px){.pk-root{grid-template-columns:minmax(0, 1fr);height:auto}.pk-stage{position:sticky;top:0;z-index:2;padding:12px;gap:10px;justify-content:flex-start}.pk-form{--pk-pad:16px;border-left:0;overflow:visible;padding-top:14px}.pk-foot{display:none}}.pk-seg{display:inline-flex;background:var(--pk-panel-2);border:1px solid var(--pk-line);border-radius:999px;padding:3px;gap:2px}.pk-seg button{border:0;background:transparent;padding:4px 11px;border-radius:999px;cursor:pointer;color:var(--pk-ink-2);font-weight:600;font-size:12px;white-space:nowrap}.pk-seg button[aria-pressed="true"]{background:var(--pk-ink);color:var(--pk-panel)}.pk-card{position:relative;flex:none;box-shadow:var(--pk-shadow);background:#fff}.pk-card svg{position:absolute;inset:0;width:100%;height:100%;display:block}.pk-card .pk-guides{pointer-events:none}.pk-txt{position:absolute;inset:0}.pk-run{position:absolute;white-space:pre;line-height:1;font-kerning:normal;font-variant-ligatures:none;margin:0;padding:0;outline:none;user-select:none;-webkit-user-select:none}.pk-run.pk-fld{cursor:pointer;min-width:2px}.pk-run[contenteditable]{cursor:text;user-select:text;-webkit-user-select:text}.pk-ghosts .pk-run.pk-fld:empty::before{content:attr(data-ph);opacity:.36}.pk-ghosts .pk-run.pk-fld:empty{box-shadow:inset 0 -1px 0 currentColor}.pk-ghosts .pk-run.pk-fld:not(.pk-lock):hover{box-shadow:0 0 0 2px var(--pk-accent-soft)}.pk-ghosts .pk-run.pk-act{box-shadow:0 0 0 1px var(--pk-accent), 0 0 0 4px var(--pk-accent-soft) !important;border-radius:1px}.pk-ghosts .pk-run.pk-lock{cursor:default}.pk-ghosts .pk-run.pk-lock:empty::before{content:none}.pk-ghosts .pk-run.pk-lock:empty{box-shadow:none}.pk-card .pk-run.pk-over{box-shadow:0 0 0 1px #d4002a !important}.pk-group{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;min-width:0}.pk-group legend{padding:0;margin-bottom:8px;font-family:var(--pk-mono);font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--pk-ink-3)}.pk-field{display:flex;flex-direction:column;gap:4px;min-width:0}.pk-flabel{font-size:12.5px;font-weight:600;color:var(--pk-ink-2)}.pk-inp{width:100%;border:1px solid var(--pk-line);background:var(--pk-panel);border-radius:8px;padding:9px 11px;font-size:16px;min-width:0}.pk-img{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--pk-ink-3)}.pk-inp[aria-invalid="true"]{border-color:var(--pk-err)}.pk-ferr{font-size:12px;line-height:16px;min-height:16px;color:var(--pk-err)}.pk-img img{width:64px;height:48px;object-fit:cover;border-radius:6px;border:1px solid var(--pk-line)}.pk-link{border:0;background:none;padding:0;color:var(--pk-accent);cursor:pointer;font-size:12px;margin-left:auto}.pk-upload{position:relative;overflow:hidden;display:flex;justify-content:center;border:1px dashed var(--pk-line);border-radius:8px;padding:12px;cursor:pointer;font-size:13px;color:var(--pk-ink-2)}.pk-upload:hover,.pk-upload:focus-within{border-color:var(--pk-accent);color:var(--pk-ink)}.pk-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}textarea.pk-inp{resize:vertical;min-height:5.5em;line-height:1.4}.pk-inp:focus{outline:none;border-color:var(--pk-accent);box-shadow:0 0 0 3px var(--pk-accent-soft)}.pk-phone{display:grid;grid-template-columns:60px 80px minmax(0, 1fr) 60px;gap:6px}.pk-phone.pk-mob{grid-template-columns:60px 80px minmax(0, 1fr)}.pk-phone.pk-nat{grid-template-columns:80px minmax(0, 1fr) 60px}.pk-phone.pk-mob.pk-nat{grid-template-columns:80px minmax(0, 1fr)}.pk-phone label{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--pk-ink-3);min-width:0}.pk-check{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--pk-line);padding-top:16px}.pk-issues{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.pk-issues li{font-size:12.5px;padding:7px 9px;border-radius:6px;background:var(--pk-warn-soft);border-left:3px solid var(--pk-warn)}.pk-issues li.pk-error{background:var(--pk-err-soft);border-left-color:var(--pk-err)}.pk-issues li.pk-info{background:var(--pk-panel-2);border-left-color:var(--pk-ink-3)}.pk-issues li.pk-good{background:var(--pk-panel-2);border-left-color:var(--pk-ok)}.pk-spec{font-family:var(--pk-mono);font-size:11px;color:var(--pk-ink-2);line-height:1.6;font-variant-numeric:tabular-nums}.pk-actions{position:sticky;bottom:0;z-index:1;display:flex;flex-direction:column;gap:6px;margin:-6px calc(-1 * var(--pk-pad)) -20px;padding:10px var(--pk-pad) 14px;background:var(--pk-panel);border-top:1px solid var(--pk-line)}.pk-btn{border:0;background:var(--pk-accent);color:var(--pk-accent-ink);font-weight:700;padding:12px 18px;border-radius:9px;cursor:pointer;font-size:15px}.pk-btn:disabled{opacity:.55;cursor:not-allowed}.pk-hint{margin:0;font-size:12px;color:var(--pk-ink-2)}.pk-hint .pk-link{font-size:inherit;margin:0}.pk-confirm{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;line-height:1.4;cursor:pointer}.pk-confirm input{margin:2px 0 0;flex:none;width:16px;height:16px;accent-color:var(--pk-accent)}.pk-confirm:has(input:disabled){opacity:.55;cursor:default}.pk-side{margin:0;display:flex;flex-direction:column;align-items:center;gap:6px}.pk-both{gap:16px}.pk-both figcaption{font-size:11px;color:var(--pk-ink-2)}.pk-status{font-size:12.5px;min-height:1.2em;color:var(--pk-ink-2)}.pk-status.pk-ok{color:var(--pk-ok)}.pk-status.pk-err{color:var(--pk-err)}.pk-loading{position:absolute;inset:0;display:grid;place-items:center;background:var(--pk-panel);color:var(--pk-ink-2);font-family:ui-monospace, monospace;font-size:12px;z-index:5;padding:16px;text-align:center}@media (prefers-reduced-motion: reduce){*{transition:none !important;animation:none !important}}'}},[1,"pk-editor",{template:[1],fields:[1],value:[1],storageKey:[1,"storage-key"],fontBase:[1,"font-base"],download:[4],confirm:[4],showSpec:[4,"show-spec"],appearance:[513],ready:[32],error:[32],draft:[32],side:[32],printView:[32],confirmed:[32],active:[32],scale:[32],busy:[32],status:[32],rev:[32],touched:[32],tried:[32],getData:[64],validate:[64],createPdf:[64],reset:[64],showErrors:[64]},void 0,{printView:[{onPrintView:0}],template:[{onConfigChange:0}],fields:[{onConfigChange:0}],value:[{onValueChange:0}]}]),Ma=Sa,Ea=function(){"undefined"!=typeof customElements&&["pk-editor"].forEach((t=>{"pk-editor"===t&&(customElements.get(i(t))||customElements.define(i(t),Sa))}))};export{Ma as PkEditor,G as _,St as a,Mt as b,Ea as defineCustomElement,qt as s}