>>f&255,f+=i.bits;B[m]=v>>>f&255}if(16===i.bits){p=(H=new Uint32Array(i.decodePixels().buffer)).length,g=new Uint8Array(p*(32/i.pixelBitlength)*i.colors),B=new Uint8Array(p*(32/i.pixelBitlength));for(var v,Q=1>>0&255,Q&&(g[y++]=v>>>16&255,v=H[m++],g[y++]=v>>>0&255),B[C++]=v>>>16&255;d=8}r!==b.image_compression.NONE&&F()?(t=E(g,i.width*i.colors,i.colors,r),l=E(B,i.width,1,r)):(t=g,l=B,h=null)}if(3===i.colorType&&(u=this.color_spaces.INDEXED,c=i.palette,i.transparency.indexed)){var U=i.transparency.indexed,x=0;for(m=0,p=U.length;mr&&(n.push(t.slice(s,i)),a=0,s=i),a+=e[i],i++;return s!==i&&n.push(t.slice(s,i)),n},V=function(t,e,A){A||(A={});var r,n,i,o,a,s,c=[],l=[c],u=A.textIndent||0,h=0,d=0,f=t.split(" "),p=z.apply(this,[" ",A])[0];if(s=-1===A.lineIndent?f[0].length+2:A.lineIndent||0){var g=Array(s).join(" "),B=[];f.map(function(t){1<(t=t.split(/\s*\n/)).length?B=B.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):B.push(t[0])}),f=B,s=j.apply(this,[g,A])}for(i=0,o=f.length;i>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},et=st.API,nt=rt=At="",et.addMetadata=function(t,e){return rt=e||"http://jspdf.default.namespaceuri/",At=t,this.internal.events.subscribe("postPutResources",function(){if(At){var t='',e=unescape(encodeURIComponent('')),A=unescape(encodeURIComponent(t)),r=unescape(encodeURIComponent(At)),n=unescape(encodeURIComponent("")),i=unescape(encodeURIComponent("")),o=A.length+r.length+n.length+e.length+i.length;nt=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+o+" >>"),this.internal.write("stream"),this.internal.write(e+A+r+n+i),this.internal.write("endstream"),this.internal.write("endobj")}else nt=""}),this.internal.events.subscribe("putCatalog",function(){nt&&this.internal.write("/Metadata "+nt+" 0 R")}),this},function(t,e){var A=t.API,r=[0];A.events.push(["putFont",function(e){!function(e,A,n){if(e.metadata instanceof t.API.TTFFont&&"Identity-H"===e.encoding){for(var i=e.metadata.Unicode.widths,o=e.metadata.subset.encode(r),a="",s=0;s>"),A("stream"),A(a),A("endstream"),A("endobj");var l=n();A("<<"),A("/Type /FontDescriptor"),A("/FontName /"+e.fontName),A("/FontFile2 "+c+" 0 R"),A("/FontBBox "+t.API.PDFObject.convert(e.metadata.bbox)),A("/Flags "+e.metadata.flags),A("/StemV "+e.metadata.stemV),A("/ItalicAngle "+e.metadata.italicAngle),A("/Ascent "+e.metadata.ascender),A("/Descent "+e.metadata.decender),A("/CapHeight "+e.metadata.capHeight),A(">>"),A("endobj");var u=n();A("<<"),A("/Type /Font"),A("/BaseFont /"+e.fontName),A("/FontDescriptor "+l+" 0 R"),A("/W "+t.API.PDFObject.convert(i)),A("/CIDToGIDMap /Identity"),A("/DW 1000"),A("/Subtype /CIDFontType2"),A("/CIDSystemInfo"),A("<<"),A("/Supplement 0"),A("/Registry (Adobe)"),A("/Ordering ("+e.encoding+")"),A(">>"),A(">>"),A("endobj"),e.objectNumber=n(),A("<<"),A("/Type /Font"),A("/Subtype /Type0"),A("/BaseFont /"+e.fontName),A("/Encoding /"+e.encoding),A("/DescendantFonts ["+u+" 0 R]"),A(">>"),A("endobj"),e.isAlreadyPutted=!0}}(e.font,e.out,e.newObject)}]),A.events.push(["putFont",function(e){!function(e,A,r){if(e.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===e.encoding){e.metadata.Unicode.widths;for(var n=e.metadata.rawData,i="",o=0;o>"),A("stream"),A(i),A("endstream"),A("endobj");var s=r();for(A("<<"),A("/Descent "+e.metadata.decender),A("/CapHeight "+e.metadata.capHeight),A("/StemV "+e.metadata.stemV),A("/Type /FontDescriptor"),A("/FontFile2 "+a+" 0 R"),A("/Flags 96"),A("/FontBBox "+t.API.PDFObject.convert(e.metadata.bbox)),A("/FontName /"+e.fontName),A("/ItalicAngle "+e.metadata.italicAngle),A("/Ascent "+e.metadata.ascender),A(">>"),A("endobj"),e.objectNumber=r(),o=0;o>"),A("endobj"),e.isAlreadyPutted=!0}}(e.font,e.out,e.newObject)}]);var n=function(t){var e,A,n=t.text||"",i=t.x,o=t.y,a=t.options||{},s=t.mutex||{},c=s.pdfEscape,l=s.activeFontKey,u=s.fonts,h=(s.activeFontSize,""),d=0,f="",p=u[A=l].encoding;if("Identity-H"!==u[A].encoding)return{text:n,x:i,y:o,options:a,mutex:s};for(f=n,A=l,"[object Array]"===Object.prototype.toString.call(n)&&(f=n[0]),d=0;d>>16,n=0,i=e.length;n>>0},yt=function(t,e){for(var A=65535&t,r=t>>>16,n=0,i=e.length;n>>0},Qt=(vt={}).Adler32=(((dt=(ht=function(t){if(!(this instanceof ht))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(t=null==t?1:+t))throw new Error("First arguments needs to be a finite number.");this.checksum=t>>>0}).prototype={}).constructor=ht).from=((ct=function(t){if(!(this instanceof ht))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");this.checksum=mt(1,t.toString())}).prototype=dt,ct),ht.fromUtf8=((lt=function(t){if(!(this instanceof ht))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");var e=Bt(t.toString());this.checksum=mt(1,e)}).prototype=dt,lt),ft&&(ht.fromBuffer=((ut=function(t){if(!(this instanceof ht))throw new TypeError("Constructor cannot called be as a function.");if(!gt(t))throw new Error("First argument needs to be ArrayBuffer.");var e=new Uint8Array(t);return this.checksum=yt(1,e)}).prototype=dt,ut)),dt.update=function(t){if(null==t)throw new Error("First argument needs to be a string.");return t=t.toString(),this.checksum=mt(this.checksum,t)},dt.updateUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=Bt(t.toString());return this.checksum=mt(this.checksum,e)},ft&&(dt.updateBuffer=function(t){if(!gt(t))throw new Error("First argument needs to be ArrayBuffer.");var e=new Uint8Array(t);return this.checksum=yt(this.checksum,e)}),dt.clone=function(){return new Qt(this.checksum)},ht),vt.from=function(t){if(null==t)throw new Error("First argument needs to be a string.");return mt(1,t.toString())},vt.fromUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=Bt(t.toString());return mt(1,e)},ft&&(vt.fromBuffer=function(t){if(!gt(t))throw new Error("First argument need to be ArrayBuffer.");var e=new Uint8Array(t);return yt(1,e)}),vt);try{A.GifWriter=function(t,e,A,r){function n(t){var e=t.length;if(e<2||256>=1;)++s;if(l=1<>8&255,t[i++]=255&A,t[i++]=A>>8&255,t[i++]=(null!==a?128:0)|s,t[i++]=c,t[i++]=0,null!==a)for(var u=0,h=a.length;u>16&255,t[i++]=d>>8&255,t[i++]=255&d}if(null!==o){if(o<0||65535>8&255,t[i++]=0}var f=!1;this.addFrame=function(e,A,r,o,s,c){if(!0===f&&(--i,f=!1),c=void 0===c?{}:c,e<0||A<0||65535>=1;)++d;h=1<>8&255,t[i++]=w,t[i++]=0),t[i++]=44,t[i++]=255&e,t[i++]=e>>8&255,t[i++]=255&A,t[i++]=A>>8&255,t[i++]=255&r,t[i++]=r>>8&255,t[i++]=255&o,t[i++]=o>>8&255,t[i++]=!0===l?128|d-1:0,!0===l)for(var m=0,y=u.length;m>16&255,t[i++]=v>>8&255,t[i++]=255&v}i=function(t,e,A,r){function n(A){for(;A<=h;)t[e++]=255&d,d>>=8,h-=8,e===o+256&&(t[o]=255,o=e++)}function i(t){d|=t<>=8,h-=8,e===o+256&&(t[o]=255,o=e++);4096===l?(i(a),l=c+1,u=A+1,p={}):(1<>7-a&1];this.data[o+4*a]=s.blue,this.data[o+4*a+1]=s.green,this.data[o+4*a+2]=s.red,this.data[o+4*a+3]=255}0!=e&&(this.pos+=4-e)}},a.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,A=this.height-1;0<=A;A--){for(var r=this.bottom_up?A:this.height-1-A,n=0;n>4,s=15&i,c=this.palette[a];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*n+1>=this.width)break;c=this.palette[s],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}0!=e&&(this.pos+=4-e)}},a.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;0<=e;e--){for(var A=this.bottom_up?e:this.height-1-e,r=0;r>5&e)/e*255|0,s=(i>>10&e)/e*255|0,c=i>>15?255:0,l=r*this.width*4+4*n;this.data[l]=s,this.data[l+1]=a,this.data[l+2]=o,this.data[l+3]=c}this.pos+=t}},a.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),A=parseInt("111111",2),r=this.height-1;0<=r;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i>5&A)/A*255|0,c=(o>>11)/e*255|0,l=n*this.width*4+4*i;this.data[l]=c,this.data[l+1]=s,this.data[l+2]=a,this.data[l+3]=255}this.pos+=t}},a.prototype.bit24=function(){for(var t=this.height-1;0<=t;t--){for(var e=this.bottom_up?t:this.height-1-t,A=0;A>>=1,A<<=1,0<--e;);return A>>>1}var e=this;e.build_tree=function(A){var r,n,i,o=e.dyn_tree,c=e.stat_desc.static_tree,l=e.stat_desc.elems,u=-1;for(A.heap_len=0,A.heap_max=s,r=0;re.max_code||(t.bl_count[i]++,o=0,d<=r&&(o=h[r-d]),c=l[2*r],t.opt_len+=c*(i+o),u&&(t.static_len+=c*(u[2*r+1]+o)));if(0!==p){do{for(i=f-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[f]--,p-=2}while(0e.max_code||(l[2*n+1]!=i&&(t.opt_len+=(i-l[2*n+1])*l[2*n],l[2*n+1]=i),r--)}}(A),function(e,A,r){var n,i,o,s=[],c=0;for(n=1;n<=a;n++)s[n]=c=c+r[n-1]<<1;for(i=0;i<=A;i++)0!==(o=e[2*i+1])&&(e[2*i]=t(s[o]++,o))}(o,e.max_code,A.bl_count)}}function A(t,e,A,r,n){var i=this;i.static_tree=t,i.extra_bits=e,i.extra_base=A,i.elems=r,i.max_length=n}function r(t,e,A,r,n){var i=this;i.good_length=t,i.max_lazy=e,i.nice_length=A,i.max_chain=r,i.func=n}function n(t,e,A,r){var n=t[2*e],i=t[2*A];return n>>8&255)}function a(t,e){var A,r=e;16-r>>16-st,st+=r-16):(at|=t<>>=8,st-=8)}function f(t,A){var r,n,i;if(ct.pending_buf[nt+2*rt]=t>>>8&255,ct.pending_buf[nt+2*rt+1]=255&t,ct.pending_buf[et+rt]=255&A,rt++,0===t?Z[2*A]++:(it++,t--,Z[2*(e._length_code[A]+256+1)]++,$[2*e.d_code(t)]++),0==(8191&rt)&&2>>=3,it>>3,(l=ct.static_len+3+7>>>3)<=s&&(s=l)):s=l=i+5,i+4<=s&&-1!=n?B(n,i,o):l==s?(a(2+(o?1:0),3),p(A.static_ltree,A.static_dtree)):(a(4+(o?1:0),3),function(t,A,r){var n;for(a(t-257,5),a(A-1,5),a(r-4,4),n=0;n>=2),qo&&0!=--r);return i<=q?i:q}function v(e){return e.total_in=e.total_out=0,e.msg=null,ct.pending=0,ct.pending_out=0,C=113,b=0,lt.dyn_tree=Z,lt.stat_desc=A.static_l_desc,ut.dyn_tree=$,ut.stat_desc=A.static_d_desc,ht.dyn_tree=tt,ht.stat_desc=A.static_bl_desc,st=at=0,ot=8,t(),function(){var t;for(I=2*F,t=_[N-1]=0;t>1)&&(o=3),n|=o<<6,0!==K&&(n|=32),C=113,i((g=n+=31-n%31)>>8&255),i(255&g)),0!==ct.pending){if(Q.flush_pending(),0===Q.avail_out)return b=-1,0}else if(0===Q.avail_in&&e<=c&&4!=e)return Q.msg=u[7],-5;if(666==C&&0!==Q.avail_in)return t.msg=u[7],-5;if(0!==Q.avail_in||0!==q||0!=e&&666!=C){switch(p=-1,l[G].func){case 0:p=function(t){var e,A=65535;for(U-5>>7)]},e.extra_lbits=[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],e.extra_dbits=[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],e.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],e.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],A.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],A.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],A.static_l_desc=new A(A.static_ltree,e.extra_lbits,257,286,a),A.static_d_desc=new A(A.static_dtree,e.extra_dbits,0,30,a),A.static_bl_desc=new A(null,e.extra_blbits,0,19,7);var l=[new r(0,0,0,0,0),new r(4,4,8,4,1),new r(4,5,16,8,1),new r(4,6,32,32,1),new r(4,4,16,16,2),new r(8,16,32,32,2),new r(8,16,128,128,2),new r(8,32,128,256,2),new r(32,128,258,1024,2),new r(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],h=262;o.prototype={deflateInit:function(t,e){return this.dstate=new i,e||(e=a),this.dstate.deflateInit(this,t,e)},deflate:function(t){return this.dstate?this.dstate.deflate(this,t):-2},deflateEnd:function(){if(!this.dstate)return-2;var t=this.dstate.deflateEnd();return this.dstate=null,t},deflateParams:function(t,e){return this.dstate?this.dstate.deflateParams(this,t,e):-2},deflateSetDictionary:function(t,e){return this.dstate?this.dstate.deflateSetDictionary(this,t,e):-2},read_buf:function(t,e,A){var r=this,n=r.avail_in;return At.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};var d=t.zip||t;d.Deflater=d._jzlib_Deflater=function(t){var e=new o,A=new Uint8Array(512),r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=A,this.append=function(t,r){var n,i=[],o=0,a=0,s=0;if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=512,0!=e.deflate(0))throw new Error("deflating: "+e.msg);e.next_out_index&&(512==e.next_out_index?i.push(new Uint8Array(A)):i.push(new Uint8Array(A.subarray(0,e.next_out_index)))),s+=e.next_out_index,r&&0 "+l.toRGB()+" -> "+l.toHex());c.appendChild(u),c.appendChild(h),s.appendChild(c)}catch(t){}return s}}e.exports&&(e.exports=A),t.RGBColor=A}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==r&&r||Function('return typeof this === "object" && this.content')()||Function("return this")()),e.exports=function e(A,r,n){function i(a,s){if(!r[a]){if(!A[a]){var c="function"==typeof t&&t;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[a]={exports:{}};A[a][0].call(u.exports,function(t){return i(A[a][1][t]||t)},u,u.exports,e,A,r,n)}return r[a].exports}for(var o="function"==typeof t&&t,a=0;a>>10&1023|55296),t=56320|1023&t),e+=T(t)}).join("")}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function l(t,e,A){var r=0;for(t=A?_(t/C):t>>1,t+=_(t/e);S*v>>1_((w-B)/a))&&n("overflow"),B+=u*a,!(u<(h=c<=C?y:C+v<=c?v:c-C));c+=m)a>_(w/(d=m-h))&&n("overflow"),a*=d;C=l(B-o,e=p.length+1,0==o),_(B/e)>w-Q&&n("overflow"),Q+=_(B/e),B%=e,p.splice(B++,0,Q)}return s(p)}function h(t){var e,A,r,i,o,s,u,h,d,f,p,g,B,Q,C,E=[];for(g=(t=a(t)).length,e=b,o=U,s=A=0;s_((w-A)/(B=r+1))&&n("overflow"),A+=(u-e)*B,e=u,s=0;sw&&n("overflow"),p==e){for(h=A,d=m;!(h<(f=d<=o?y:o+v<=d?v:d-o));d+=m)C=h-f,Q=m-f,E.push(T(c(f+C%Q,0))),h=_(C/Q);E.push(T(c(h,0))),o=l(A,B,r==i),A=0,++r}++A,++e}return E.join("")}var d="object"==typeof A&&A,f="object"==typeof e&&e&&e.exports==d&&e,p="object"==typeof t&&t;p.global!==p&&p.window!==p||(r=p);var g,B,w=2147483647,m=36,y=1,v=26,Q=38,C=700,U=72,b=128,F="-",E=/^xn--/,x=/[^ -~]/,H=/\x2E|\u3002|\uFF0E|\uFF61/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=m-y,_=Math.floor,T=String.fromCharCode;if(g={version:"1.2.4",ucs2:{decode:a,encode:s},decode:u,encode:h,toASCII:function(t){return o(t,function(t){return x.test(t)?"xn--"+h(t):t})},toUnicode:function(t){return o(t,function(t){return E.test(t)?u(t.slice(4).toLowerCase()):t})}},d&&!d.nodeType)if(f)f.exports=g;else for(B in g)g.hasOwnProperty(B)&&(d[B]=g[B]);else r.punycode=g}(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,A){function r(t,e){for(var A=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;)!0!==e&&1===i.nodeType&&"SCRIPT"===i.nodeName||A.appendChild(r(i,e)),i=i.nextSibling;return 1===t.nodeType&&(A._scrollTop=t.scrollTop,A._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?function(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(e){n("Unable to copy canvas content from",t,e)}}(t,A):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(A.value=t.value)),A}var n=t("./log");e.exports=function(t,e,A,n,i,o,a){var s=r(t.documentElement,i.javascriptEnabled),c=e.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=A,c.height=n,c.scrolling="no",e.body.appendChild(c),new Promise(function(e){var A,r,n,l=c.contentWindow.document;c.contentWindow.onload=c.onload=function(){var t=setInterval(function(){0"),r=o,n=a,!(A=t).defaultView||r===A.defaultView.pageXOffset&&n===A.defaultView.pageYOffset||A.defaultView.scrollTo(r,n),l.replaceChild(l.adoptNode(s),l.documentElement),l.close()})}},{"./log":13}],3:[function(t,e,A){function r(t){this.r=0,this.g=0,this.b=0,this.a=null,this.fromArray(t)||this.namedColor(t)||this.rgb(t)||this.rgba(t)||this.hex6(t)||this.hex3(t)}r.prototype.darken=function(t){var e=1-t;return new r([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},r.prototype.isTransparent=function(){return 0===this.a},r.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},r.prototype.fromArray=function(t){return Array.isArray(t)&&(this.r=Math.min(t[0],255),this.g=Math.min(t[1],255),this.b=Math.min(t[2],255),3i+A[3].width?0:l-A[3].width,u-A[0].width).topRight.subdivide(.5),bottomRightOuter:a(r+w,n+B,h,d).bottomRight.subdivide(.5),bottomRightInner:a(r+Math.min(w,i-A[3].width),n+Math.min(B,o+A[0].width),Math.max(0,h-A[1].width),d-A[2].width).bottomRight.subdivide(.5),bottomLeftOuter:a(r,n+m,f,p).bottomLeft.subdivide(.5),bottomLeftInner:a(r+A[3].width,n+m,Math.max(0,f-A[3].width),p-A[2].width).bottomLeft.subdivide(.5)}}function c(t,e,A,r){var n=function(t,e,A){return{x:t.x+(e.x-t.x)*A,y:t.y+(e.y-t.y)*A}};return{start:t,startControl:e,endControl:A,end:r,subdivide:function(i){var o=n(t,e,i),a=n(e,A,i),s=n(A,r,i),l=n(o,a,i),u=n(a,s,i),h=n(l,u,i);return[c(t,o,l,h),c(h,u,s,r)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,A.x,A.y,r.x,r.y])},curveToReversed:function(r){r.push(["bezierCurve",A.x,A.y,e.x,e.y,t.x,t.y])}}}function l(t,e,A,r,n,i,o){var a=[];return 0Date.now()?this.asyncRenderer(t,e,A):setTimeout(D(function(){this.asyncRenderer(t,e)},this),0)},r.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+T.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+T.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},r.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},r.prototype.createStyles=function(t,e){var A=t.createElement("style");A.innerHTML=e,t.body.appendChild(A)},r.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var A=this.getPseudoElement(t,":before"),r=this.getPseudoElement(t,":after");A&&e.push(A),r&&e.push(r)}return x(e)},r.prototype.getPseudoElement=function(t,e){var A=t.computedStyle(e);if(!A||!A.content||"none"===A.content||"-moz-alt-content"===A.content||"none"===A.display)return null;for(var r,n,i=(r=A.content,(n=r.substr(0,1))===r.substr(r.length-1)&&n.match(/'|"/)?r.substr(1,r.length-2):r),o="url"===i.substr(0,3),a=document.createElement(o?"img":"html2canvaspseudoelement"),s=new T(a,t,e),c=A.length-1;0<=c;c--){var l=A.item(c).replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")});a.style[l]=A[l]}if(a.className=T.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+T.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,o)return a.src=R(i)[0].args[0],[s];var u=document.createTextNode(i);return a.appendChild(u),[s,new _(u,s)]},r.prototype.getChildren=function(t){return x([].filter.call(t.node.childNodes,w).map(function(e){var A=[e.nodeType===Node.TEXT_NODE?new _(e,t):new S(e,t)].filter(E);return e.nodeType===Node.ELEMENT_NODE&&A.length&&"TEXTAREA"!==e.tagName?A[0].isElementVisible()?A.concat(this.getChildren(A[0])):[]:A},this))},r.prototype.newStackingContext=function(t,e){var A=new O(e,t.getOpacity(),t.node,t.parent);t.cloneTo(A),(e?A.getParentStack(this):A.parent.stack).contexts.push(A),t.stack=A},r.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){var e,A;Q(t)&&(this.isRootElement(t)||t.getOpacity()<1||(A=(e=t).css("position"),"auto"!==(-1!==["absolute","relative","fixed"].indexOf(A)?e.css("zIndex"):"auto"))||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):Q(t)&&(m(t)&&f(t)||-1!==["inline-block","inline-table"].indexOf(t.css("display"))||y(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)},this)},r.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},r.prototype.isRootElement=function(t){return null===t.parent},r.prototype.sortStackingContexts=function(t){var e;t.contexts.sort((e=t.contexts.slice(0),function(t,A){return t.cssInt("zIndex")+e.indexOf(t)/e.length-(A.cssInt("zIndex")+e.indexOf(A)/e.length)})),t.contexts.forEach(this.sortStackingContexts,this)},r.prototype.parseTextBounds=function(t){return function(e,A,r){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var n=r.slice(0,A).join("").length;return this.getRangeBounds(t.node,n,e.length)}if(t.node&&"string"==typeof t.node.data){var i=t.node.splitText(e.length),o=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=i,o}}else this.support.rangeBounds&&!t.parent.hasTransform()||(t.node=t.node.splitText(e.length));return{}}},r.prototype.getWrapperBounds=function(t,e){var A=t.ownerDocument.createElement("html2canvaswrapper"),r=t.parentNode,n=t.cloneNode(!0);A.appendChild(t.cloneNode(!0)),r.replaceChild(A,t);var i=e?M(A):L(A);return r.replaceChild(n,A),i},r.prototype.getRangeBounds=function(t,e,A){var r=this.range||(this.range=t.ownerDocument.createRange());return r.setStart(t,e),r.setEnd(t,e+A),r.getBoundingClientRect()},r.prototype.parse=function(t){var e=t.contexts.filter(h),A=t.children.filter(Q),r=A.filter(v(y)),n=r.filter(v(m)).filter(v(p)),o=A.filter(v(m)).filter(y),a=r.filter(v(m)).filter(p),s=t.contexts.concat(r.filter(m)).filter(f),c=t.children.filter(U).filter(B),l=t.contexts.filter(d);e.concat(n).concat(o).concat(a).concat(s).concat(c).concat(l).forEach(function(t){this.renderQueue.push(t),g(t)&&(this.parse(t),this.renderQueue.push(new i))},this)},r.prototype.paint=function(t){try{t instanceof i?this.renderer.ctx.restore():U(t)?(C(t.parent)&&t.parent.appendToDOM(),this.paintText(t),C(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(t){if(H(t),this.options.strict)throw t}},r.prototype.paintNode=function(t){g(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},r.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,function(){this.renderer.renderBackground(t,e,t.borders.borders.map(F))},this),this.renderer.clip(t.clip,function(){this.renderer.renderBorders(t.borders.borders)},this),this.renderer.clip(t.backgroundClip,function(){switch(t.node.nodeName){case"svg":case"IFRAME":var A=this.images.get(t.node);A?this.renderer.renderImage(t,e,t.borders,A):H("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var r=this.images.get(t.node.src);r?this.renderer.renderImage(t,e,t.borders,r):H("Error loading
",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this)},r.prototype.paintCheckbox=function(t){var e=t.parseBounds(),A=Math.min(e.width,e.height),r={width:A-1,height:A-1,top:e.top,left:e.left},n=[3,3],i=[n,n,n,n],a=[1,1,1,1].map(function(t){return{color:new k("#A5A5A5"),width:t}}),c=s(r,i,a);this.renderer.clip(t.backgroundClip,function(){this.renderer.rectangle(r.left+1,r.top+1,r.width-2,r.height-2,new k("#DEDEDE")),this.renderer.renderBorders(o(a,r,c,i)),t.node.checked&&(this.renderer.font(new k("#424242"),"normal","normal","bold",A-3+"px","arial"),this.renderer.text("✔",r.left+A/6,r.top+A-1))},this)},r.prototype.paintRadio=function(t){var e=t.parseBounds(),A=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,function(){this.renderer.circleStroke(e.left+1,e.top+1,A,new k("#DEDEDE"),1,new k("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+A/4)+1,Math.ceil(e.top+A/4)+1,Math.floor(A/2),new k("#424242"))},this)},r.prototype.paintFormValue=function(t){var e=t.getValue();if(0=t.length&&(e=t.splice(0,r)).length&&A.push(I.ucs2.encode(e));var i;return A}(A),n=t.parent.fontWeight(),i=t.parent.css("fontSize"),o=t.parent.css("fontFamily"),a=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),n,i,o),a.length?this.renderer.fontShadow(a[0].color,a[0].offsetX,a[0].offsetY,a[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){r.map(this.parseTextBounds(t),this).forEach(function(e,A){e&&!1===/^\s*$/.test(r[A])&&(this.renderer.text(r[A],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(o,i)))},this)},this)},r.prototype.renderTextDecoration=function(t,e,A){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+A.baseline+A.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+A.middle+A.lineWidth),e.width,1,t.color("color"))}};var K={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};r.prototype.parseBorders=function(t){var e,A=t.parseBounds(),r=(e=t,["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(t){var A=e.css("border"+t+"Radius").split(" ");return A.length<=1&&(A[1]=A[0]),A.map(b)})),n=["Top","Right","Bottom","Left"].map(function(e,A){var r=t.css("border"+e+"Style"),n=t.color("border"+e+"Color");"inset"===r&&n.isBlack()&&(n=new k([255,255,255,n.a]));var i=K[r]?K[r][A]:null;return{width:t.cssInt("border"+e+"Width"),color:i?n[i[0]](i[1]):n,args:null}}),i=s(A,r,n);return{clip:this.parseBackgroundClip(t,i,n,r,A),borders:o(n,A,i,r)}},r.prototype.parseBackgroundClip=function(t,e,A,r,n){var i=[];switch(t.css("backgroundClip")){case"content-box":case"padding-box":u(i,r[0],r[1],e.topLeftInner,e.topRightInner,n.left+A[3].width,n.top+A[0].width),u(i,r[1],r[2],e.topRightInner,e.bottomRightInner,n.left+n.width-A[1].width,n.top+A[0].width),u(i,r[2],r[3],e.bottomRightInner,e.bottomLeftInner,n.left+n.width-A[1].width,n.top+n.height-A[2].width),u(i,r[3],r[0],e.bottomLeftInner,e.topLeftInner,n.left+A[3].width,n.top+n.height-A[2].width);break;default:u(i,r[0],r[1],e.topLeftOuter,e.topRightOuter,n.left,n.top),u(i,r[1],r[2],e.topRightOuter,e.bottomRightOuter,n.left+n.width,n.top),u(i,r[2],r[3],e.bottomRightOuter,e.bottomLeftOuter,n.left+n.width,n.top+n.height),u(i,r[3],r[0],e.bottomLeftOuter,e.topLeftOuter,n.left,n.top+n.height)}return i},e.exports=r},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(t,e,A){function r(t,e,A){var r="withCredentials"in new XMLHttpRequest;if(!e)return Promise.reject("No proxy configured");var s=i(r),c=o(e,t,s);return r?a(c):n(A,c,s).then(function(t){return u(t.content)})}function n(t,e,A){return new Promise(function(r,n){var i=t.createElement("script"),o=function(){delete window.html2canvas.proxy[A],t.body.removeChild(i)};window.html2canvas.proxy[A]=function(t){o(),r(t)},i.src=e,i.onerror=function(t){o(),n(t)},t.body.appendChild(i)})}function i(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++h+"_"+Math.round(1e5*Math.random())}function o(t,e,A){return t+"?url="+encodeURIComponent(e)+(A.length?"&callback=html2canvas.proxy."+A:"")}var a=t("./xhr"),s=t("./utils"),c=t("./log"),l=t("./clone"),u=s.decode64,h=0;A.Proxy=r,A.ProxyURL=function(t,e,A){var r="crossOrigin"in new Image,a=i(r),s=o(e,t,a);return r?Promise.resolve(s):n(A,s,a).then(function(t){return"data:"+t.type+";base64,"+t.content})},A.loadUrlDocument=function(t,e,A,n,i,o){return new r(t,e,window.document).then((a=t,function(t){var e,A=new DOMParser;try{e=A.parseFromString(t,"text/html")}catch(A){c("DOMParser not supported, falling back to createHTMLDocument"),e=document.implementation.createHTMLDocument("");try{e.open(),e.write(t),e.close()}catch(A){c("createHTMLDocument write not supported, falling back to document.body.innerHTML"),e.body.innerHTML=t}}var r=e.querySelector("base");if(!r||!r.href.host){var n=e.createElement("base");n.href=a,e.head.insertBefore(n,e.head.firstChild)}return e})).then(function(t){return l(t,A,n,i,o,0,0)});var a}},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(t,e,A){var r=t("./proxy").ProxyURL;e.exports=function(t,e){var A=document.createElement("a");A.href=t,t=A.href,this.src=t,this.image=new Image;var n=this;this.promise=new Promise(function(A,i){n.image.crossOrigin="Anonymous",n.image.onload=A,n.image.onerror=i,new r(t,e,document).then(function(t){n.image.src=t}).catch(i)})}},{"./proxy":16}],18:[function(t,e,A){function r(t,e,A){n.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===A}var n=t("./nodecontainer");r.prototype.cloneTo=function(t){r.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},(r.prototype=Object.create(n.prototype)).appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",e.exports=r},{"./nodecontainer":14}],19:[function(t,e,A){function r(t,e,A,r,n){this.width=t,this.height=e,this.images=A,this.options=r,this.document=n}var n=t("./log");r.prototype.renderImage=function(t,e,A,r){var n=t.cssInt("paddingLeft"),i=t.cssInt("paddingTop"),o=t.cssInt("paddingRight"),a=t.cssInt("paddingBottom"),s=A.borders,c=e.width-(s[1].width+s[3].width+n+o),l=e.height-(s[0].width+s[2].width+i+a);this.drawImage(r,0,0,r.image.width||c,r.image.height||l,e.left+n+s[3].width,e.top+i+s[0].width,c,l)},r.prototype.renderBackground=function(t,e,A){0";try{A.drawImage(t,0,0),e.toDataURL()}catch(t){return!1}return!0},e.exports=r},{}],23:[function(t,e,A){function r(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then(function(){return e.isInline(t)?Promise.resolve(e.inlineFormatting(t)):n(t)}).then(function(t){return new Promise(function(A){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,A))})})}var n=t("./xhr"),i=t("./utils").decode64;r.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},r.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},r.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},r.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},r.prototype.createCanvas=function(t){var e=this;return function(A,r){var n=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=n.lowerCanvasEl,n.setWidth(r.width).setHeight(r.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(A,r)).renderAll(),t(n.lowerCanvasEl)}},r.prototype.decode64=function(t){return"function"==typeof window.atob?window.atob(t):i(t)},e.exports=r},{"./utils":26,"./xhr":28}],24:[function(t,e,A){function r(t,e){this.src=t,this.image=null;var A=this;this.promise=e?new Promise(function(e,r){A.image=new Image,A.image.onload=e,A.image.onerror=r,A.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),!0===A.image.complete&&e(A.image)}):this.hasFabric().then(function(){return new Promise(function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,A.createCanvas.call(A,e))})})}var n=t("./svgcontainer");r.prototype=Object.create(n.prototype),e.exports=r},{"./svgcontainer":23}],25:[function(t,e,A){function r(t,e){i.call(this,t,e)}function n(t,e,A){if(0>4,o=(15&A)<<4|(r=s.indexOf(t[e+2]))>>2,a=(3&r)<<6|(n=s.indexOf(t[e+3])),l+=64===r?String.fromCharCode(i):64===n||-1===n?String.fromCharCode(i,o):String.fromCharCode(i,o,a);return l},A.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),A=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+A,left:e.left,width:A,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},A.offsetBounds=function(t){var e=t.offsetParent?A.offsetBounds(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+e.top,bottom:t.offsetTop+t.offsetHeight+e.top,right:t.offsetLeft+e.left+t.offsetWidth,left:t.offsetLeft+e.left,width:t.offsetWidth,height:t.offsetHeight}},A.parseBackgrounds=function(t){var e,A,r,n,i,o,a,s=[],c=0,l=0,u=function(){e&&('"'===A.substr(0,1)&&(A=A.substr(1,A.length-2)),A&&a.push(A),"-"===e.substr(0,1)&&0<(n=e.indexOf("-",1)+1)&&(r=e.substr(0,n),e=e.substr(n)),s.push({prefix:r,method:e.toLowerCase(),value:i,args:a,image:null})),a=[],e=r=A=i=""};return a=[],e=r=A=i="",t.split("").forEach(function(t){if(!(0===c&&-1<" \r\n\t".indexOf(t))){switch(t){case'"':o?o===t&&(o=null):o=t;break;case"(":if(o)break;if(0===c)return c=1,void(i+=t);l++;break;case")":if(o)break;if(1===c){if(0===l)return c=0,i+=t,void u();l--}break;case",":if(o)break;if(0===c)return void u();if(1===c&&0===l&&!e.match(/^url$/i))return a.push(A),A="",void(i+=t)}i+=t,0===c?e+=t:A+=t}}),u(),s}},{}],27:[function(t,e,A){function r(t){n.apply(this,arguments),this.type="linear"===t.args[0]?n.TYPES.LINEAR:n.TYPES.RADIAL}var n=t("./gradientcontainer");r.prototype=Object.create(n.prototype),e.exports=r},{"./gradientcontainer":9}],28:[function(t,e,A){e.exports=function(t){return new Promise(function(e,A){var r=new XMLHttpRequest;r.open("GET",t),r.onload=function(){200===r.status?e(r.responseText):A(new Error(r.statusText))},r.onerror=function(){A(new Error("Network Error"))},r.send()})}},{}]},{},[4])(4),function(t){var e="+".charCodeAt(0),A="/".charCodeAt(0),r="0".charCodeAt(0),n="a".charCodeAt(0),i="A".charCodeAt(0),o="-".charCodeAt(0),a="_".charCodeAt(0),s=function(t){var s=t.charCodeAt(0);return s===e||s===o?62:s===A||s===a?63:s>16),e((65280&i)>>8),e(255&i);return 2===o?e(255&(i=s(t.charAt(A))<<2|s(t.charAt(A+1))>>4)):1===o&&(e((i=s(t.charAt(A))<<10|s(t.charAt(A+1))<<4|s(t.charAt(A+2))>>2)>>8&255),e(255&i)),a}(r),A,n)},t.prototype.parse=function(){return this.directory=new u(this.contents),this.head=new f(this),this.name=new v(this),this.cmap=new g(this),this.hhea=new B(this),this.maxp=new Q(this),this.hmtx=new C(this),this.post=new m(this),this.os2=new w(this),this.loca=new x(this),this.glyf=new b(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,e,A,r,n;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var e,A,r,n;for(n=[],e=0,A=(r=this.bbox).length;e>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+A)):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 new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t.prototype.widthOfString=function(t,e,A){var r,n,i,o,a;for(n=o=i=0,a=(t=""+t).length;0<=a?o>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return 2147483648<=(t=this.readUInt32())?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 32768<=(t=this.readUInt16())?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,A,r;for(A=[],e=r=0;0<=t?r>8,s[4*c+1]=(16711680&A[c])>>16,s[4*c]=(4278190080&A[c])>>24;return s},e}(),H=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,e,A,r,n;for(e in r=this.font.cmap.tables[0].codeMap,t={},n=this.subset)A=n[e],t[e]=r[A];return t},t.prototype.glyphsFor=function(t){var e,A,r,n,i,o,a;for(r={},i=0,o=t.length;i>"),i.join("\n")}return""+A},t}()}(st),Ct="undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==r&&r||Function('return typeof this === "object" && this.content')()||Function("return this")(),Ut=function(){function t(t){var e,A,r,n,i,o,a,s,c,l,u,h,d,f;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},o=null;;){switch(e=this.readUInt32(),c=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":o&&this.animation.frames.push(o),this.pos+=4,o={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},i=this.readUInt16(),n=this.readUInt16()||100,o.delay=1e3*i/n,o.disposeOp=this.data[this.pos++],o.blendOp=this.data[this.pos++],o.data=[];break;case"IDAT":case"fdAT":for("fdAT"===c&&(this.pos+=4,e-=4),t=(null!=o?o.data:void 0)||this.imgData,h=0;0<=e?hr)throw new Error("More transparent colors than palette size");if(0<(l=r-this.transparency.indexed.length))for(d=0;0<=l?dthis.data.length)throw new Error("Incomplete or corrupt PNG file")}}var e,A,r;t.load=function(e,A,r){var n;return"function"==typeof A&&(r=A),(n=new XMLHttpRequest).open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){var e;return e=new t(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=A?A.getContext:void 0)&&e.render(A),"function"==typeof r?r(e):void 0},n.send(null)},t.prototype.read=function(t){var e,A;for(A=[],e=0;0<=t?e>e,this.codeSize=r-=e,this.bytesPos=o,A},e.prototype.getCode=function(e){for(var A=e[0],r=e[1],n=this.codeSize,i=this.codeBuf,o=this.bytes,a=this.bytesPos;n>16,u=65535&c;return(0==n||n>l,this.codeSize=n-l,this.bytesPos=a,u},e.prototype.generateHuffmanTable=function(t){for(var e=t.length,A=0,r=0;rA&&(A=t[r]);for(var n=1<>=1;for(r=l;r>=1)){var s,c;if(1==a)s=i,c=o;else if(2==a){for(var l=this.getBits(5)+257,u=this.getBits(5)+1,h=this.getBits(4)+4,d=Array(A.length),f=0;f>16;0>16)&&(C=this.getBits(C));var U=(65535&Q)+C;y<=v+g&&(y=(_=this.ensureBuffer(v+g)).length);for(var b=0;b>18&63,A=i>>12&63,r=i>>6&63,n=63&i,c[a++]=u.charAt(e)+u.charAt(A)+u.charAt(r)+u.charAt(n),o>16&255,A=o>>8&255,r=255&o,c[s++]=64==n?String.fromCharCode(e):64==i?String.fromCharCode(e,A):String.fromCharCode(e,A,r),a>>0,r=new Array(A),n=1>>0,n=0;n4)&&[Number(e[1]),Number(e[2]),Number(e[3]),Number(e[4])]},h=function(t){return[Math.min(t[0],255),Math.min(t[1],255),Math.min(t[2],255),t.length>3?t[3]:null]},d=function(t){var e=p[t.toLowerCase()];return e||!1},f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=Array.isArray(e)?h(e):i(e)||c(e)||u(e)||d(e)||a(e)||[0,0,0,null],n=A(r,4),o=n[0],s=n[1],l=n[2],f=n[3];this.r=o,this.g=s,this.b=l,this.a=f}return r(t,[{key:"isTransparent",value:function(){return 0===this.a}},{key:"toString",value:function(){return null!==this.a&&1!==this.a?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":"rgb("+this.r+","+this.g+","+this.b+")"}}]),t}();e.default=f;var p={transparent:[0,0,0,0],aliceblue:[240,248,255,null],antiquewhite:[250,235,215,null],aqua:[0,255,255,null],aquamarine:[127,255,212,null],azure:[240,255,255,null],beige:[245,245,220,null],bisque:[255,228,196,null],black:[0,0,0,null],blanchedalmond:[255,235,205,null],blue:[0,0,255,null],blueviolet:[138,43,226,null],brown:[165,42,42,null],burlywood:[222,184,135,null],cadetblue:[95,158,160,null],chartreuse:[127,255,0,null],chocolate:[210,105,30,null],coral:[255,127,80,null],cornflowerblue:[100,149,237,null],cornsilk:[255,248,220,null],crimson:[220,20,60,null],cyan:[0,255,255,null],darkblue:[0,0,139,null],darkcyan:[0,139,139,null],darkgoldenrod:[184,134,11,null],darkgray:[169,169,169,null],darkgreen:[0,100,0,null],darkgrey:[169,169,169,null],darkkhaki:[189,183,107,null],darkmagenta:[139,0,139,null],darkolivegreen:[85,107,47,null],darkorange:[255,140,0,null],darkorchid:[153,50,204,null],darkred:[139,0,0,null],darksalmon:[233,150,122,null],darkseagreen:[143,188,143,null],darkslateblue:[72,61,139,null],darkslategray:[47,79,79,null],darkslategrey:[47,79,79,null],darkturquoise:[0,206,209,null],darkviolet:[148,0,211,null],deeppink:[255,20,147,null],deepskyblue:[0,191,255,null],dimgray:[105,105,105,null],dimgrey:[105,105,105,null],dodgerblue:[30,144,255,null],firebrick:[178,34,34,null],floralwhite:[255,250,240,null],forestgreen:[34,139,34,null],fuchsia:[255,0,255,null],gainsboro:[220,220,220,null],ghostwhite:[248,248,255,null],gold:[255,215,0,null],goldenrod:[218,165,32,null],gray:[128,128,128,null],green:[0,128,0,null],greenyellow:[173,255,47,null],grey:[128,128,128,null],honeydew:[240,255,240,null],hotpink:[255,105,180,null],indianred:[205,92,92,null],indigo:[75,0,130,null],ivory:[255,255,240,null],khaki:[240,230,140,null],lavender:[230,230,250,null],lavenderblush:[255,240,245,null],lawngreen:[124,252,0,null],lemonchiffon:[255,250,205,null],lightblue:[173,216,230,null],lightcoral:[240,128,128,null],lightcyan:[224,255,255,null],lightgoldenrodyellow:[250,250,210,null],lightgray:[211,211,211,null],lightgreen:[144,238,144,null],lightgrey:[211,211,211,null],lightpink:[255,182,193,null],lightsalmon:[255,160,122,null],lightseagreen:[32,178,170,null],lightskyblue:[135,206,250,null],lightslategray:[119,136,153,null],lightslategrey:[119,136,153,null],lightsteelblue:[176,196,222,null],lightyellow:[255,255,224,null],lime:[0,255,0,null],limegreen:[50,205,50,null],linen:[250,240,230,null],magenta:[255,0,255,null],maroon:[128,0,0,null],mediumaquamarine:[102,205,170,null],mediumblue:[0,0,205,null],mediumorchid:[186,85,211,null],mediumpurple:[147,112,219,null],mediumseagreen:[60,179,113,null],mediumslateblue:[123,104,238,null],mediumspringgreen:[0,250,154,null],mediumturquoise:[72,209,204,null],mediumvioletred:[199,21,133,null],midnightblue:[25,25,112,null],mintcream:[245,255,250,null],mistyrose:[255,228,225,null],moccasin:[255,228,181,null],navajowhite:[255,222,173,null],navy:[0,0,128,null],oldlace:[253,245,230,null],olive:[128,128,0,null],olivedrab:[107,142,35,null],orange:[255,165,0,null],orangered:[255,69,0,null],orchid:[218,112,214,null],palegoldenrod:[238,232,170,null],palegreen:[152,251,152,null],paleturquoise:[175,238,238,null],palevioletred:[219,112,147,null],papayawhip:[255,239,213,null],peachpuff:[255,218,185,null],peru:[205,133,63,null],pink:[255,192,203,null],plum:[221,160,221,null],powderblue:[176,224,230,null],purple:[128,0,128,null],rebeccapurple:[102,51,153,null],red:[255,0,0,null],rosybrown:[188,143,143,null],royalblue:[65,105,225,null],saddlebrown:[139,69,19,null],salmon:[250,128,114,null],sandybrown:[244,164,96,null],seagreen:[46,139,87,null],seashell:[255,245,238,null],sienna:[160,82,45,null],silver:[192,192,192,null],skyblue:[135,206,235,null],slateblue:[106,90,205,null],slategray:[112,128,144,null],slategrey:[112,128,144,null],snow:[255,250,250,null],springgreen:[0,255,127,null],steelblue:[70,130,180,null],tan:[210,180,140,null],teal:[0,128,128,null],thistle:[216,191,216,null],tomato:[255,99,71,null],turquoise:[64,224,208,null],violet:[238,130,238,null],wheat:[245,222,179,null],white:[255,255,255,null],whitesmoke:[245,245,245,null],yellow:[255,255,0,null],yellowgreen:[154,205,50,null]};e.TRANSPARENT=new f([0,0,0,0])});e(o);o.TRANSPARENT;var a=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseTextDecoration=e.TEXT_DECORATION_LINE=e.TEXT_DECORATION=e.TEXT_DECORATION_STYLE=void 0;var A=function(t){return t&&t.__esModule?t:{default:t}}(o),r=e.TEXT_DECORATION_STYLE={SOLID:0,DOUBLE:1,DOTTED:2,DASHED:3,WAVY:4},n=e.TEXT_DECORATION={NONE:null},i=e.TEXT_DECORATION_LINE={UNDERLINE:1,OVERLINE:2,LINE_THROUGH:3,BLINK:4},a=function(t){switch(t){case"underline":return i.UNDERLINE;case"overline":return i.OVERLINE;case"line-through":return i.LINE_THROUGH}return i.BLINK};e.parseTextDecoration=function(t){var e=function(t){return"none"===t?null:t.split(" ").map(a)}(t.textDecorationLine?t.textDecorationLine:t.textDecoration);if(null===e)return n.NONE;return{textDecorationLine:e,textDecorationColor:t.textDecorationColor?new A.default(t.textDecorationColor):null,textDecorationStyle:function(t){switch(t){case"double":return r.DOUBLE;case"dotted":return r.DOTTED;case"dashed":return r.DASHED;case"wavy":return r.WAVY}return r.SOLID}(t.textDecorationStyle)}}});e(a);a.parseTextDecoration,a.TEXT_DECORATION_LINE,a.TEXT_DECORATION,a.TEXT_DECORATION_STYLE;var s=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var A=0;A=0;A--){var r=t.item(A);"content"!==r&&e.style.setProperty(r,t.getPropertyValue(r))}return e},e.SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"});e(l);l.contains,l.distance,l.copyCSSStyles,l.SMALL_IMAGE;var u=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateLengthFromValueWithUnit=e.LENGTH_TYPE=void 0;var A=function(){function t(t,e){for(var A=0;A1&&(r/=p,i/=p,o/=p,a/=p,l/=p,u/=p,h/=p,d/=p);var g=t.width-o,B=t.height-u,w=t.width-l,m=t.height-d;return{topLeftOuter:r>0||i>0?c(t.left,t.top,r,i,s.TOP_LEFT):new n.default(t.left,t.top),topLeftInner:r>0||i>0?c(t.left+e[3].borderWidth,t.top+e[0].borderWidth,Math.max(0,r-e[3].borderWidth),Math.max(0,i-e[0].borderWidth),s.TOP_LEFT):new n.default(t.left+e[3].borderWidth,t.top+e[0].borderWidth),topRightOuter:o>0||a>0?c(t.left+g,t.top,o,a,s.TOP_RIGHT):new n.default(t.left+t.width,t.top),topRightInner:o>0||a>0?c(t.left+Math.min(g,t.width+e[3].borderWidth),t.top+e[0].borderWidth,g>t.width+e[3].borderWidth?0:o-e[3].borderWidth,a-e[0].borderWidth,s.TOP_RIGHT):new n.default(t.left+t.width-e[1].borderWidth,t.top+e[0].borderWidth),bottomRightOuter:l>0||u>0?c(t.left+w,t.top+B,l,u,s.BOTTOM_RIGHT):new n.default(t.left+t.width,t.top+t.height),bottomRightInner:l>0||u>0?c(t.left+Math.min(w,t.width-e[3].borderWidth),t.top+Math.min(B,t.height+e[0].borderWidth),Math.max(0,l-e[1].borderWidth),u-e[2].borderWidth,s.BOTTOM_RIGHT):new n.default(t.left+t.width-e[1].borderWidth,t.top+t.height-e[2].borderWidth),bottomLeftOuter:h>0||d>0?c(t.left,t.top+m,h,d,s.BOTTOM_LEFT):new n.default(t.left,t.top+t.height),bottomLeftInner:h>0||d>0?c(t.left+e[3].borderWidth,t.top+m,Math.max(0,h-e[3].borderWidth),d-e[2].borderWidth,s.BOTTOM_LEFT):new n.default(t.left+e[3].borderWidth,t.top+t.height-e[2].borderWidth)}},{TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3}),c=function(t,e,A,r,o){var a=(Math.sqrt(2)-1)/3*4,c=A*a,l=r*a,u=t+A,h=e+r;switch(o){case s.TOP_LEFT:return new i.default(new n.default(t,h),new n.default(t,h-l),new n.default(u-c,e),new n.default(u,e));case s.TOP_RIGHT:return new i.default(new n.default(t,e),new n.default(t+c,e),new n.default(u,h-l),new n.default(u,h));case s.BOTTOM_RIGHT:return new i.default(new n.default(u,e),new n.default(u,e+l),new n.default(t+c,h),new n.default(t,h));case s.BOTTOM_LEFT:default:return new i.default(new n.default(u,h),new n.default(u-c,h),new n.default(t,e+l),new n.default(t,e))}}});e(p);p.parseBoundCurves,p.calculatePaddingBoxPath,p.calculateBorderBoxPath,p.parsePathForBorder,p.parseDocumentSize,p.calculateContentBox,p.calculatePaddingBox,p.parseBounds,p.Bounds;var g=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parsePadding=e.PADDING_SIDES=void 0;var A=function(t){return t&&t.__esModule?t:{default:t}}(u),r=(e.PADDING_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},["top","right","bottom","left"]);e.parsePadding=function(t){return r.map(function(e){return new A.default(t.getPropertyValue("padding-"+e))})}});e(g);g.parsePadding,g.PADDING_SIDES;var B=A(function(t,e){function A(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.parseBackgroundImage=e.parseBackground=e.calculateBackgroundRepeatPath=e.calculateBackgroundPosition=e.calculateBackgroungPositioningArea=e.calculateBackgroungPaintingArea=e.calculateGradientBackgroundSize=e.calculateBackgroundSize=e.BACKGROUND_ORIGIN=e.BACKGROUND_CLIP=e.BACKGROUND_SIZE=e.BACKGROUND_REPEAT=void 0;var r=A(o),n=A(u),i=A(h),a=A(d),s=e.BACKGROUND_REPEAT={REPEAT:0,NO_REPEAT:1,REPEAT_X:2,REPEAT_Y:3},c=e.BACKGROUND_SIZE={AUTO:0,CONTAIN:1,COVER:2,LENGTH:3},l=e.BACKGROUND_CLIP={BORDER_BOX:0,PADDING_BOX:1,CONTENT_BOX:2},f=e.BACKGROUND_ORIGIN=l,B=function t(e){switch(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e){case"contain":this.size=c.CONTAIN;break;case"cover":this.size=c.COVER;break;case"auto":this.size=c.AUTO;break;default:this.value=new n.default(e)}},w=(e.calculateBackgroundSize=function(t,e,A){var r=0,n=0,o=t.size;if(o[0].size===c.CONTAIN||o[0].size===c.COVER){var a=A.width/A.height,s=e.width/e.height;return a0&&(t=n.substr(0,e).toLowerCase(),n=n.substr(e)),"none"!==(n=n.toLowerCase())&&A.push({prefix:t,method:n,args:r})}r=[],n=o=""};return t.split("").forEach(function(t){if(0!==a||!e.test(t)){switch(t){case'"':i?i===t&&(i=null):i=t;break;case"(":if(i)break;if(0===a)return void(a=1);s++;break;case")":if(i)break;if(1===a){if(0===s)return a=0,void c();s--}break;case",":if(i)break;if(0===a)return void c();if(1===a&&0===s&&!n.match(/^url$/i))return r.push(o.trim()),void(o="")}0===a?n+=t:o+=t}}),c(),A}});e(B);B.parseBackgroundImage,B.parseBackground,B.calculateBackgroundRepeatPath,B.calculateBackgroundPosition,B.calculateBackgroungPositioningArea,B.calculateBackgroungPaintingArea,B.calculateGradientBackgroundSize,B.calculateBackgroundSize,B.BACKGROUND_ORIGIN,B.BACKGROUND_CLIP,B.BACKGROUND_SIZE,B.BACKGROUND_REPEAT;var w=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseBorder=e.BORDER_SIDES=e.BORDER_STYLE=void 0;var A=function(t){return t&&t.__esModule?t:{default:t}}(o),r=e.BORDER_STYLE={NONE:0,SOLID:1},n=e.BORDER_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},i=Object.keys(n).map(function(t){return t.toLowerCase()});e.parseBorder=function(t){return i.map(function(e){var n=new A.default(t.getPropertyValue("border-"+e+"-color")),i=function(t){switch(t){case"none":return r.NONE}return r.SOLID}(t.getPropertyValue("border-"+e+"-style")),o=parseFloat(t.getPropertyValue("border-"+e+"-width"));return{borderColor:n,borderStyle:i,borderWidth:isNaN(o)?0:o}})}});e(w);w.parseBorder,w.BORDER_SIDES,w.BORDER_STYLE;var m=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseBorderRadius=void 0;var A=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var A=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);r=!0);}catch(t){n=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(n)throw i}}return A}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(t){return t&&t.__esModule?t:{default:t}}(u),n=["top-left","top-right","bottom-right","bottom-left"];e.parseBorderRadius=function(t){return n.map(function(e){var n=t.getPropertyValue("border-"+e+"-radius").split(" ").map(r.default.create),i=A(n,2),o=i[0],a=i[1];return void 0===a?[o,o]:[o,a]})}});e(m);m.parseBorderRadius;var y=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=e.DISPLAY={NONE:1,BLOCK:2,INLINE:4,RUN_IN:8,FLOW:16,FLOW_ROOT:32,TABLE:64,FLEX:128,GRID:256,RUBY:512,SUBGRID:1024,LIST_ITEM:2048,TABLE_ROW_GROUP:4096,TABLE_HEADER_GROUP:8192,TABLE_FOOTER_GROUP:16384,TABLE_ROW:32768,TABLE_CELL:65536,TABLE_COLUMN_GROUP:1<<17,TABLE_COLUMN:1<<18,TABLE_CAPTION:1<<19,RUBY_BASE:1<<20,RUBY_TEXT:1<<21,RUBY_BASE_CONTAINER:1<<22,RUBY_TEXT_CONTAINER:1<<23,CONTENTS:1<<24,INLINE_BLOCK:1<<25,INLINE_LIST_ITEM:1<<26,INLINE_TABLE:1<<27,INLINE_FLEX:1<<28,INLINE_GRID:1<<29},r=function(t,e){return t|function(t){switch(t){case"block":return A.BLOCK;case"inline":return A.INLINE;case"run-in":return A.RUN_IN;case"flow":return A.FLOW;case"flow-root":return A.FLOW_ROOT;case"table":return A.TABLE;case"flex":return A.FLEX;case"grid":return A.GRID;case"ruby":return A.RUBY;case"subgrid":return A.SUBGRID;case"list-item":return A.LIST_ITEM;case"table-row-group":return A.TABLE_ROW_GROUP;case"table-header-group":return A.TABLE_HEADER_GROUP;case"table-footer-group":return A.TABLE_FOOTER_GROUP;case"table-row":return A.TABLE_ROW;case"table-cell":return A.TABLE_CELL;case"table-column-group":return A.TABLE_COLUMN_GROUP;case"table-column":return A.TABLE_COLUMN;case"table-caption":return A.TABLE_CAPTION;case"ruby-base":return A.RUBY_BASE;case"ruby-text":return A.RUBY_TEXT;case"ruby-base-container":return A.RUBY_BASE_CONTAINER;case"ruby-text-container":return A.RUBY_TEXT_CONTAINER;case"contents":return A.CONTENTS;case"inline-block":return A.INLINE_BLOCK;case"inline-list-item":return A.INLINE_LIST_ITEM;case"inline-table":return A.INLINE_TABLE;case"inline-flex":return A.INLINE_FLEX;case"inline-grid":return A.INLINE_GRID}return A.NONE}(e)};e.parseDisplay=function(t){return t.split(" ").reduce(r,0)}});e(y);y.DISPLAY,y.parseDisplay;var v=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=e.FLOAT={NONE:0,LEFT:1,RIGHT:2,INLINE_START:3,INLINE_END:4};e.parseCSSFloat=function(t){switch(t){case"left":return A.LEFT;case"right":return A.RIGHT;case"inline-start":return A.INLINE_START;case"inline-end":return A.INLINE_END}return A.NONE}});e(v);v.FLOAT,v.parseCSSFloat;var Q=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.parseFont=function(t){return{fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontVariant:t.fontVariant,fontWeight:function(t){switch(t){case"normal":return 400;case"bold":return 700}var e=parseInt(t,10);return isNaN(e)?400:e}(t.fontWeight)}}});e(Q);Q.parseFont;var C=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.parseLetterSpacing=function(t){if("normal"===t)return 0;var e=parseFloat(t);return isNaN(e)?0:e}});e(C);C.parseLetterSpacing;var U=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=e.LINE_BREAK={NORMAL:"normal",STRICT:"strict"};e.parseLineBreak=function(t){switch(t){case"strict":return A.STRICT;case"normal":default:return A.NORMAL}}});e(U);U.LINE_BREAK,U.parseLineBreak;var b=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseListStyle=e.parseListStyleType=e.LIST_STYLE_TYPE=e.LIST_STYLE_POSITION=void 0;var A=e.LIST_STYLE_POSITION={INSIDE:0,OUTSIDE:1},r=e.LIST_STYLE_TYPE={NONE:-1,DISC:0,CIRCLE:1,SQUARE:2,DECIMAL:3,CJK_DECIMAL:4,DECIMAL_LEADING_ZERO:5,LOWER_ROMAN:6,UPPER_ROMAN:7,LOWER_GREEK:8,LOWER_ALPHA:9,UPPER_ALPHA:10,ARABIC_INDIC:11,ARMENIAN:12,BENGALI:13,CAMBODIAN:14,CJK_EARTHLY_BRANCH:15,CJK_HEAVENLY_STEM:16,CJK_IDEOGRAPHIC:17,DEVANAGARI:18,ETHIOPIC_NUMERIC:19,GEORGIAN:20,GUJARATI:21,GURMUKHI:22,HEBREW:22,HIRAGANA:23,HIRAGANA_IROHA:24,JAPANESE_FORMAL:25,JAPANESE_INFORMAL:26,KANNADA:27,KATAKANA:28,KATAKANA_IROHA:29,KHMER:30,KOREAN_HANGUL_FORMAL:31,KOREAN_HANJA_FORMAL:32,KOREAN_HANJA_INFORMAL:33,LAO:34,LOWER_ARMENIAN:35,MALAYALAM:36,MONGOLIAN:37,MYANMAR:38,ORIYA:39,PERSIAN:40,SIMP_CHINESE_FORMAL:41,SIMP_CHINESE_INFORMAL:42,TAMIL:43,TELUGU:44,THAI:45,TIBETAN:46,TRAD_CHINESE_FORMAL:47,TRAD_CHINESE_INFORMAL:48,UPPER_ARMENIAN:49,DISCLOSURE_OPEN:50,DISCLOSURE_CLOSED:51},n=e.parseListStyleType=function(t){switch(t){case"disc":return r.DISC;case"circle":return r.CIRCLE;case"square":return r.SQUARE;case"decimal":return r.DECIMAL;case"cjk-decimal":return r.CJK_DECIMAL;case"decimal-leading-zero":return r.DECIMAL_LEADING_ZERO;case"lower-roman":return r.LOWER_ROMAN;case"upper-roman":return r.UPPER_ROMAN;case"lower-greek":return r.LOWER_GREEK;case"lower-alpha":return r.LOWER_ALPHA;case"upper-alpha":return r.UPPER_ALPHA;case"arabic-indic":return r.ARABIC_INDIC;case"armenian":return r.ARMENIAN;case"bengali":return r.BENGALI;case"cambodian":return r.CAMBODIAN;case"cjk-earthly-branch":return r.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return r.CJK_HEAVENLY_STEM;case"cjk-ideographic":return r.CJK_IDEOGRAPHIC;case"devanagari":return r.DEVANAGARI;case"ethiopic-numeric":return r.ETHIOPIC_NUMERIC;case"georgian":return r.GEORGIAN;case"gujarati":return r.GUJARATI;case"gurmukhi":return r.GURMUKHI;case"hebrew":return r.HEBREW;case"hiragana":return r.HIRAGANA;case"hiragana-iroha":return r.HIRAGANA_IROHA;case"japanese-formal":return r.JAPANESE_FORMAL;case"japanese-informal":return r.JAPANESE_INFORMAL;case"kannada":return r.KANNADA;case"katakana":return r.KATAKANA;case"katakana-iroha":return r.KATAKANA_IROHA;case"khmer":return r.KHMER;case"korean-hangul-formal":return r.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return r.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return r.KOREAN_HANJA_INFORMAL;case"lao":return r.LAO;case"lower-armenian":return r.LOWER_ARMENIAN;case"malayalam":return r.MALAYALAM;case"mongolian":return r.MONGOLIAN;case"myanmar":return r.MYANMAR;case"oriya":return r.ORIYA;case"persian":return r.PERSIAN;case"simp-chinese-formal":return r.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return r.SIMP_CHINESE_INFORMAL;case"tamil":return r.TAMIL;case"telugu":return r.TELUGU;case"thai":return r.THAI;case"tibetan":return r.TIBETAN;case"trad-chinese-formal":return r.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return r.TRAD_CHINESE_INFORMAL;case"upper-armenian":return r.UPPER_ARMENIAN;case"disclosure-open":return r.DISCLOSURE_OPEN;case"disclosure-closed":return r.DISCLOSURE_CLOSED;case"none":default:return r.NONE}},i=(e.parseListStyle=function(t){var e=(0,B.parseBackgroundImage)(t.getPropertyValue("list-style-image"));return{listStyleType:n(t.getPropertyValue("list-style-type")),listStyleImage:e.length?e[0]:null,listStylePosition:i(t.getPropertyValue("list-style-position"))}},function(t){switch(t){case"inside":return A.INSIDE;case"outside":default:return A.OUTSIDE}})});e(b);b.parseListStyle,b.parseListStyleType,b.LIST_STYLE_TYPE,b.LIST_STYLE_POSITION;var F=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseMargin=void 0;var A=function(t){return t&&t.__esModule?t:{default:t}}(u),r=["top","right","bottom","left"];e.parseMargin=function(t){return r.map(function(e){return new A.default(t.getPropertyValue("margin-"+e))})}});e(F);F.parseMargin;var E=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=e.OVERFLOW={VISIBLE:0,HIDDEN:1,SCROLL:2,AUTO:3};e.parseOverflow=function(t){switch(t){case"hidden":return A.HIDDEN;case"scroll":return A.SCROLL;case"auto":return A.AUTO;case"visible":default:return A.VISIBLE}}});e(E);E.OVERFLOW,E.parseOverflow;var x=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=e.OVERFLOW_WRAP={NORMAL:0,BREAK_WORD:1};e.parseOverflowWrap=function(t){switch(t){case"break-word":return A.BREAK_WORD;case"normal":default:return A.NORMAL}}});e(x);x.OVERFLOW_WRAP,x.parseOverflowWrap;var H=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=e.POSITION={STATIC:0,RELATIVE:1,ABSOLUTE:2,FIXED:3,STICKY:4};e.parsePosition=function(t){switch(t){case"relative":return A.RELATIVE;case"absolute":return A.ABSOLUTE;case"fixed":return A.FIXED;case"sticky":return A.STICKY}return A.STATIC}});e(H);H.POSITION,H.parsePosition;var I=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseTextShadow=void 0;var A=function(t){return t&&t.__esModule?t:{default:t}}(o),r=/^([+-]|\d|\.)$/i;e.parseTextShadow=function(t){if("none"===t||"string"!=typeof t)return null;for(var e="",n=!1,i=[],o=[],a=0,s=null,c=function(){e.length&&(n?i.push(parseFloat(e)):s=new A.default(e)),n=!1,e=""},l=function(){i.length&&null!==s&&o.push({color:s,offsetX:i[0]||0,offsetY:i[1]||0,blur:i[2]||0}),i.splice(0,i.length),s=null},u=0;u";try{r.drawImage(e,0,0),A.toDataURL()}catch(t){return!1}return!0}(document);return Object.defineProperty(r,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_BASE64_DRAWING(){return function(t){var e=function(t,e){var A=new Image,r=t.createElement("canvas"),n=r.getContext("2d");return new Promise(function(t){A.src=e;var i=function(){try{n.drawImage(A,0,0),r.toDataURL()}catch(e){return t(!1)}return t(!0)};A.onload=i,A.onerror=function(){return t(!1)},!0===A.complete&&setTimeout(function(){i()},500)})}(document,t);return Object.defineProperty(r,"SUPPORT_BASE64_DRAWING",{value:function(){return e}}),e}},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t="function"==typeof Array.from&&"function"==typeof window.fetch?function(t){var e=t.createElement("canvas");e.width=100,e.height=100;var r=e.getContext("2d");r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,100,100);var n=new Image,i=e.toDataURL();n.src=i;var o=(0,O.createForeignObjectSVG)(100,100,0,0,n);return r.fillStyle="red",r.fillRect(0,0,100,100),(0,O.loadSerializedSVG)(o).then(function(e){r.drawImage(e,0,0);var n=r.getImageData(0,0,100,100).data;r.fillStyle="red",r.fillRect(0,0,100,100);var o=t.createElement("div");return o.style.backgroundImage="url("+i+")",o.style.height="100px",A(n)?(0,O.loadSerializedSVG)((0,O.createForeignObjectSVG)(100,100,0,0,o)):Promise.reject(!1)}).then(function(t){return r.drawImage(t,0,0),A(r.getImageData(0,0,100,100).data)}).catch(function(t){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(r,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=void 0!==(new Image).crossOrigin;return Object.defineProperty(r,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(r,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(r,"SUPPORT_CORS_XHR",{value:t}),t}};e.default=r});e(P);var D=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.toCodePoints=function(t){for(var e=[],A=0,r=t.length;A=55296&&n<=56319&&A>10),n%1024+56320)),(A+1===t||e.length>16384)&&(r+=String.fromCharCode.apply(String,e),e.length=0)}return r};for(var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256),n=0;n>4,u[i++]=(15&a)<<4|s>>2,u[i++]=(3&s)<<6|63&c;return l},e.polyUint16Array=function(t){for(var e=t.length,A=[],r=0;r>r,s=e.UTRIE2_DATA_BLOCK_LENGTH=1<>r,u=e.UTRIE2_INDEX_2_BMP_LENGTH=a+l,h=e.UTRIE2_UTF8_2B_INDEX_2_OFFSET=u,d=e.UTRIE2_UTF8_2B_INDEX_2_LENGTH=32,f=e.UTRIE2_INDEX_1_OFFSET=h+d,p=e.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=65536>>n,g=e.UTRIE2_INDEX_2_BLOCK_LENGTH=1<=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>r],e=(e<>r)],e=(e<>n),e=this.index[e],e+=t>>r&B,e=this.index[e],e=(e<1&&void 0!==arguments[1]?arguments[1]:"strict",A=[],r=[],n=[];return t.forEach(function(t,o){var a=T.get(t);if(a>i?(n.push(!0),a-=i):n.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(t))return r.push(o),A.push(16);if(4===a||11===a){if(0===o)return r.push(o),A.push(y);var s=A[o-1];return-1===R.indexOf(s)?(r.push(r[o-1]),A.push(s)):(r.push(o),A.push(y))}return r.push(o),31===a?A.push("strict"===e?d:b):a===H?A.push(y):29===a?A.push(y):43===a?t>=131072&&t<=196605||t>=196608&&t<=262141?A.push(b):A.push(y):void A.push(a)}),[r,A,n]},q=function(t,e,A,r){var n=r[A];if(Array.isArray(t)?-1!==t.indexOf(n):t===n)for(var i=A;i<=r.length;){var a=r[++i];if(a===e)return!0;if(a!==o)break}if(n===o)for(var s=A;s>0;){var c=r[--s];if(Array.isArray(t)?-1!==t.indexOf(c):t===c)for(var l=A;l<=r.length;){var u=r[++l];if(u===e)return!0;if(u!==o)break}if(c!==o)break}return!1},j=function(t,e){for(var A=t;A>=0;){var r=e[A];if(r!==o)return r;A--}return 0},X=function(t,e,A,r,n){if(0===A[r])return S;var i=r-1;if(Array.isArray(n)&&!0===n[i])return S;var y=i-1,H=i+1,D=e[i],L=y>=0?e[y]:0,R=e[H];if(2===D&&3===R)return S;if(-1!==k.indexOf(D))return I;if(-1!==k.indexOf(R))return S;if(-1!==O.indexOf(R))return S;if(8===j(i,e))return _;if(11===T.get(t[i])&&(R===b||R===v||R===Q))return S;if(7===D||7===R)return S;if(9===D)return S;if(-1===[o,a,s].indexOf(D)&&9===R)return S;if(-1!==[c,l,u,p,m].indexOf(R))return S;if(j(i,e)===f)return S;if(q(23,f,i,e))return S;if(q([c,l],d,i,e))return S;if(q(12,12,i,e))return S;if(D===o)return _;if(23===D||23===R)return S;if(16===R||16===D)return _;if(-1!==[a,s,d].indexOf(R)||14===D)return S;if(36===L&&-1!==K.indexOf(D))return S;if(D===m&&36===R)return S;if(R===h&&-1!==N.concat(h,u,g,b,v,Q).indexOf(D))return S;if(-1!==N.indexOf(R)&&D===g||-1!==N.indexOf(D)&&R===g)return S;if(D===w&&-1!==[b,v,Q].indexOf(R)||-1!==[b,v,Q].indexOf(D)&&R===B)return S;if(-1!==N.indexOf(D)&&-1!==P.indexOf(R)||-1!==P.indexOf(D)&&-1!==N.indexOf(R))return S;if(-1!==[w,B].indexOf(D)&&(R===g||-1!==[f,s].indexOf(R)&&e[H+1]===g)||-1!==[f,s].indexOf(D)&&R===g||D===g&&-1!==[g,m,p].indexOf(R))return S;if(-1!==[g,m,p,c,l].indexOf(R))for(var z=i;z>=0;){var X=e[z];if(X===g)return S;if(-1===[m,p].indexOf(X))break;z--}if(-1!==[w,B].indexOf(R))for(var V=-1!==[c,l].indexOf(D)?y:i;V>=0;){var G=e[V];if(G===g)return S;if(-1===[m,p].indexOf(G))break;V--}if(F===D&&-1!==[F,E,C,U].indexOf(R)||-1!==[E,C].indexOf(D)&&-1!==[E,x].indexOf(R)||-1!==[x,U].indexOf(D)&&R===x)return S;if(-1!==M.indexOf(D)&&-1!==[h,B].indexOf(R)||-1!==M.indexOf(R)&&D===w)return S;if(-1!==N.indexOf(D)&&-1!==N.indexOf(R))return S;if(D===p&&-1!==N.indexOf(R))return S;if(-1!==N.concat(g).indexOf(D)&&R===f||-1!==N.concat(g).indexOf(R)&&D===l)return S;if(41===D&&41===R){for(var W=A[i],Y=1;W>0&&(W--,41===e[W]);)Y++;if(Y%2!=0)return S}return D===v&&R===Q?S:_},V=(e.lineBreakAtIndex=function(t,e){if(0===e)return S;if(e>=t.length)return I;var A=z(t),n=r(A,2),i=n[0],o=n[1];return X(t,o,i,e)},function(t,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var A=z(t,e.lineBreak),n=r(A,3),i=n[0],o=n[1],a=n[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(o=o.map(function(t){return-1!==[g,y,H].indexOf(t)?b:t}));return[i,o,"keep-all"===e.wordBreak?a.map(function(e,A){return e&&t[A]>=19968&&t[A]<=40959}):null]}),G=(e.inlineBreakOpportunities=function(t,e){var A=(0,D.toCodePoints)(t),n=S,i=V(A,e),o=r(i,3),a=o[0],s=o[1],c=o[2];return A.forEach(function(t,e){n+=(0,D.fromCodePoint)(t)+(e>=A.length-1?I:X(A,s,a,e+1,c))}),n},function(){function t(e,A,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._codePoints=e,this.required=A===I,this.start=r,this.end=n}return A(t,[{key:"slice",value:function(){return D.fromCodePoint.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);e=c)return{done:!0};for(var t=S;u0)if(A.default.SUPPORT_RANGE_BOUNDS)d.push(new r(g,i(o,f,g.length,u,h)));else{var B=o.splitText(g.length);d.push(new r(g,n(o,u,h))),o=B}else A.default.SUPPORT_RANGE_BOUNDS||(o=o.splitText(g.length));f+=g.length}return d},function(t,e,A){var r=t.ownerDocument.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var n=t.parentNode;if(n){n.replaceChild(r,t);var i=(0,p.parseBounds)(r,e,A);return r.firstChild&&n.replaceChild(r.firstChild,r),i}return new p.Bounds(0,0,0,0)}),i=function(t,e,A,r,n){var i=t.ownerDocument.createRange();return i.setStart(t,e),i.setEnd(t,e+A),p.Bounds.fromClientRect(i.getBoundingClientRect(),r,n)}});e(z);z.parseTextBounds,z.TextBounds;var q=A(function(t,e){function A(t,e,A){return t.length>0?e+A.toUpperCase():t}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;At.height?(t.left+=(t.width-t.height)/2,t.width=t.height):t.width0&&i){var o=e.ownerDocument.createElement("html2canvaswrapper");(0,l.copyCSSStyles)(e.ownerDocument.defaultView.getComputedStyle(e,null),o),o.style.position="absolute",o.style.left=A.bounds.left+"px",o.style.top=A.bounds.top+"px",n||(o.style.whiteSpace="nowrap");var a=e.ownerDocument.createTextNode(t);o.appendChild(a),i.appendChild(o),A.childNodes.push(r.default.fromTextNode(a,A)),i.removeChild(o)}}),U=function(t){var e="password"===t.type?new Array(t.value.length+1).join("•"):t.value;return 0===e.length?t.placeholder||"":e}});e(X);X.reformatInputBounds,X.inlineSelectElement,X.inlineTextAreaElement,X.inlineInputElement,X.getInputBorderRadius,X.INPUT_BACKGROUND,X.INPUT_BORDERS,X.INPUT_COLOR;var V=A(function(t,e){function A(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.createCounterText=e.inlineListItemElement=e.getListOwner=void 0;var r=A(G),n=A(q),i=["OL","UL","MENU"],o=(e.getListOwner=function(t){var e=t.parent;if(!e)return null;do{if(-1!==i.indexOf(e.tagName))return e;e=e.parent}while(e);return t.parent},e.inlineListItemElement=function(t,e,A){var i=e.style.listStyle;if(i){var o=t.ownerDocument.defaultView.getComputedStyle(t,null),a=t.ownerDocument.createElement("html2canvaswrapper");switch((0,l.copyCSSStyles)(o,a),a.style.position="absolute",a.style.bottom="auto",a.style.display="block",a.style.letterSpacing="normal",i.listStylePosition){case b.LIST_STYLE_POSITION.OUTSIDE:a.style.left="auto",a.style.right=t.ownerDocument.defaultView.innerWidth-e.bounds.left-e.style.margin[1].getAbsoluteValue(e.bounds.width)+7+"px",a.style.textAlign="right";break;case b.LIST_STYLE_POSITION.INSIDE:a.style.left=e.bounds.left-e.style.margin[3].getAbsoluteValue(e.bounds.width)+"px",a.style.right="auto",a.style.textAlign="left"}var s=void 0,c=e.style.margin[0].getAbsoluteValue(e.bounds.width),u=i.listStyleImage;if(u)if("url"===u.method){var h=t.ownerDocument.createElement("img");h.src=u.args[0],a.style.top=e.bounds.top-c+"px",a.style.width="auto",a.style.height="auto",a.appendChild(h)}else{var d=.5*parseFloat(e.style.font.fontSize);a.style.top=e.bounds.top-c+e.bounds.height-1.5*d+"px",a.style.width=d+"px",a.style.height=d+"px",a.style.backgroundImage=o.listStyleImage}else"number"==typeof e.listIndex&&(s=t.ownerDocument.createTextNode(g(e.listIndex,i.listStyleType,!0)),a.appendChild(s),a.style.top=e.bounds.top-c+"px");var f=t.ownerDocument.body;f.appendChild(a),s?(e.childNodes.push(n.default.fromTextNode(s,e)),f.removeChild(a)):e.childNodes.push(new r.default(a,e,A,0))}},{integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]}),a={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},s={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},c={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},u=function(t,e,A,r,n,i){return tA?g(t,n,i.length>0):r.integers.reduce(function(e,A,n){for(;t>=A;)t-=A,e+=r.values[n];return e},"")+i},h=function(t,e,A,r){var n="";do{A||t--,n=r(t)+n,t/=e}while(t*e>=e);return n},d=function(t,e,A,r,n){var i=A-e+1;return(t<0?"-":"")+(h(Math.abs(t),i,r,function(t){return(0,K.fromCodePoint)(Math.floor(t%i)+e)})+n)},f=function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:". ",r=e.length;return h(Math.abs(t),r,!1,function(t){return e[Math.floor(t%r)]})+A},p=function(t,e,A,r,n,i){if(t<-9999||t>9999)return g(t,b.LIST_STYLE_TYPE.CJK_DECIMAL,n.length>0);var o=Math.abs(t),a=n;if(0===o)return e[0]+a;for(var s=0;o>0&&s<=4;s++){var c=o%10;0===c&&(0,l.contains)(i,1)&&""!==a?a=e[c]+a:c>1||1===c&&0===s||1===c&&1===s&&(0,l.contains)(i,2)||1===c&&1===s&&(0,l.contains)(i,4)&&t>100||1===c&&s>1&&(0,l.contains)(i,8)?a=e[c]+(s>0?A[s-1]:"")+a:1===c&&s>0&&(a=A[s-1]+a),o=Math.floor(o/10)}return(t<0?r:"")+a},g=e.createCounterText=function(t,e,A){var r=A?". ":"",n=A?"、":"",i=A?", ":"";switch(e){case b.LIST_STYLE_TYPE.DISC:return"•";case b.LIST_STYLE_TYPE.CIRCLE:return"◦";case b.LIST_STYLE_TYPE.SQUARE:return"◾";case b.LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:var l=d(t,48,57,!0,r);return l.length<4?"0"+l:l;case b.LIST_STYLE_TYPE.CJK_DECIMAL:return f(t,"〇一二三四五六七八九",n);case b.LIST_STYLE_TYPE.LOWER_ROMAN:return u(t,1,3999,o,b.LIST_STYLE_TYPE.DECIMAL,r).toLowerCase();case b.LIST_STYLE_TYPE.UPPER_ROMAN:return u(t,1,3999,o,b.LIST_STYLE_TYPE.DECIMAL,r);case b.LIST_STYLE_TYPE.LOWER_GREEK:return d(t,945,969,!1,r);case b.LIST_STYLE_TYPE.LOWER_ALPHA:return d(t,97,122,!1,r);case b.LIST_STYLE_TYPE.UPPER_ALPHA:return d(t,65,90,!1,r);case b.LIST_STYLE_TYPE.ARABIC_INDIC:return d(t,1632,1641,!0,r);case b.LIST_STYLE_TYPE.ARMENIAN:case b.LIST_STYLE_TYPE.UPPER_ARMENIAN:return u(t,1,9999,a,b.LIST_STYLE_TYPE.DECIMAL,r);case b.LIST_STYLE_TYPE.LOWER_ARMENIAN:return u(t,1,9999,a,b.LIST_STYLE_TYPE.DECIMAL,r).toLowerCase();case b.LIST_STYLE_TYPE.BENGALI:return d(t,2534,2543,!0,r);case b.LIST_STYLE_TYPE.CAMBODIAN:case b.LIST_STYLE_TYPE.KHMER:return d(t,6112,6121,!0,r);case b.LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:return f(t,"子丑寅卯辰巳午未申酉戌亥",n);case b.LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:return f(t,"甲乙丙丁戊己庚辛壬癸",n);case b.LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:case b.LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:return p(t,"零一二三四五六七八九","十百千萬","負",n,14);case b.LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:return p(t,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",n,15);case b.LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:return p(t,"零一二三四五六七八九","十百千萬","负",n,14);case b.LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:return p(t,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",n,15);case b.LIST_STYLE_TYPE.JAPANESE_INFORMAL:return p(t,"〇一二三四五六七八九","十百千万","マイナス",n,0);case b.LIST_STYLE_TYPE.JAPANESE_FORMAL:return p(t,"零壱弐参四伍六七八九","拾百千万","マイナス",n,7);case b.LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:return p(t,"영일이삼사오육칠팔구","십백천만","마이너스 ",i,7);case b.LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:return p(t,"零一二三四五六七八九","十百千萬","마이너스 ",i,0);case b.LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:return p(t,"零壹貳參四五六七八九","拾百千","마이너스 ",i,7);case b.LIST_STYLE_TYPE.DEVANAGARI:return d(t,2406,2415,!0,r);case b.LIST_STYLE_TYPE.GEORGIAN:return u(t,1,19999,c,b.LIST_STYLE_TYPE.DECIMAL,r);case b.LIST_STYLE_TYPE.GUJARATI:return d(t,2790,2799,!0,r);case b.LIST_STYLE_TYPE.GURMUKHI:return d(t,2662,2671,!0,r);case b.LIST_STYLE_TYPE.HEBREW:return u(t,1,10999,s,b.LIST_STYLE_TYPE.DECIMAL,r);case b.LIST_STYLE_TYPE.HIRAGANA:return f(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case b.LIST_STYLE_TYPE.HIRAGANA_IROHA:return f(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case b.LIST_STYLE_TYPE.KANNADA:return d(t,3302,3311,!0,r);case b.LIST_STYLE_TYPE.KATAKANA:return f(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case b.LIST_STYLE_TYPE.KATAKANA_IROHA:return f(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case b.LIST_STYLE_TYPE.LAO:return d(t,3792,3801,!0,r);case b.LIST_STYLE_TYPE.MONGOLIAN:return d(t,6160,6169,!0,r);case b.LIST_STYLE_TYPE.MYANMAR:return d(t,4160,4169,!0,r);case b.LIST_STYLE_TYPE.ORIYA:return d(t,2918,2927,!0,r);case b.LIST_STYLE_TYPE.PERSIAN:return d(t,1776,1785,!0,r);case b.LIST_STYLE_TYPE.TAMIL:return d(t,3046,3055,!0,r);case b.LIST_STYLE_TYPE.TELUGU:return d(t,3174,3183,!0,r);case b.LIST_STYLE_TYPE.THAI:return d(t,3664,3673,!0,r);case b.LIST_STYLE_TYPE.TIBETAN:return d(t,3872,3881,!0,r);case b.LIST_STYLE_TYPE.DECIMAL:default:return d(t,48,57,!0,r)}}});e(V);V.createCounterText,V.inlineListItemElement,V.getListOwner;var G=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var A=0;A0&&this.style.visibility===T.VISIBILITY.VISIBLE}},{key:"isAbsolutelyPositioned",value:function(){return this.style.position!==H.POSITION.STATIC&&this.style.position!==H.POSITION.RELATIVE}},{key:"isPositioned",value:function(){return this.style.position!==H.POSITION.STATIC}},{key:"isFloating",value:function(){return this.style.float!==v.FLOAT.NONE}},{key:"isRootElement",value:function(){return null===this.parent}},{key:"isTransformed",value:function(){return null!==this.style.transform}},{key:"isPositionedWithZIndex",value:function(){return this.isPositioned()&&!this.style.zIndex.auto}},{key:"isInlineLevel",value:function(){return(0,l.contains)(this.style.display,y.DISPLAY.INLINE)||(0,l.contains)(this.style.display,y.DISPLAY.INLINE_BLOCK)||(0,l.contains)(this.style.display,y.DISPLAY.INLINE_FLEX)||(0,l.contains)(this.style.display,y.DISPLAY.INLINE_GRID)||(0,l.contains)(this.style.display,y.DISPLAY.INLINE_LIST_ITEM)||(0,l.contains)(this.style.display,y.DISPLAY.INLINE_TABLE)}},{key:"isInlineBlockOrInlineTable",value:function(){return(0,l.contains)(this.style.display,y.DISPLAY.INLINE_BLOCK)||(0,l.contains)(this.style.display,y.DISPLAY.INLINE_TABLE)}}]),t}();e.default=i;var s=function(t,e){if(t instanceof t.ownerDocument.defaultView.SVGSVGElement||t instanceof SVGSVGElement){var A=new XMLSerializer;return e.loadImage("data:image/svg+xml,"+encodeURIComponent(A.serializeToString(t)))}switch(t.tagName){case"IMG":var r=t;return e.loadImage(r.currentSrc||r.src);case"CANVAS":var n=t;return e.loadCanvas(n);case"IFRAME":var i=t.getAttribute("data-html2canvas-internal-iframe-key");if(i)return i}return null}});e(G);var W=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var A=0;A0&&A.childNodes.push(i.default.fromTextNode(d,A));else if(d instanceof f.HTMLElement||d instanceof HTMLElement||f.parent&&d instanceof f.parent.HTMLElement){if(-1===o.indexOf(d.nodeName)){var p=new n.default(d,A,l,u++);if(p.isVisible()){"INPUT"===d.tagName?(0,X.inlineInputElement)(d,p):"TEXTAREA"===d.tagName?(0,X.inlineTextAreaElement)(d,p):"SELECT"===d.tagName?(0,X.inlineSelectElement)(d,p):p.style.listStyle&&p.style.listStyle.listStyleType!==b.LIST_STYLE_TYPE.NONE&&(0,V.inlineListItemElement)(d,p,l);var g="TEXTAREA"!==d.tagName,B=s(p,d);if(B||c(p)){var w=B||p.isPositioned()?a.getRealParentStackingContext():a,m=new r.default(p,w,B);w.contexts.push(m),g&&t(d,p,m,l,u)}else a.children.push(p),g&&t(d,p,a,l,u)}}}else if(d instanceof f.SVGSVGElement||d instanceof SVGSVGElement||f.parent&&d instanceof f.parent.SVGSVGElement){var y=new n.default(d,A,l,u++),v=s(y,d);if(v||c(y)){var Q=v||y.isPositioned()?a.getRealParentStackingContext():a,C=new r.default(y,Q,v);Q.contexts.push(C)}else a.children.push(y)}}},s=function(t,e){return t.isRootElement()||t.isPositionedWithZIndex()||t.style.opacity<1||t.isTransformed()||l(t,e)},c=function(t){return t.isPositioned()||t.isFloating()},l=function(t,e){return"BODY"===e.nodeName&&t.parent instanceof n.default&&t.parent.style.background.backgroundColor.isTransparent()}});e(Y);Y.NodeParser;var J=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.FontMetrics=void 0;var A=function(){function t(t,e){for(var A=0;At.optimumDistance)?{optimumCorner:n,optimumDistance:i}:t},{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},x=function(t,e,A,r,n){var i=A.x,o=A.y,a=0,s=0;switch(t){case"closest-side":e===g.CIRCLE?a=s=Math.min(Math.abs(i),Math.abs(i-n.width),Math.abs(o),Math.abs(o-n.height)):e===g.ELLIPSE&&(a=Math.min(Math.abs(i),Math.abs(i-n.width)),s=Math.min(Math.abs(o),Math.abs(o-n.height)));break;case"closest-corner":if(e===g.CIRCLE)a=s=Math.min((0,l.distance)(i,o),(0,l.distance)(i,o-n.height),(0,l.distance)(i-n.width,o),(0,l.distance)(i-n.width,o-n.height));else if(e===g.ELLIPSE){var c=Math.min(Math.abs(o),Math.abs(o-n.height))/Math.min(Math.abs(i),Math.abs(i-n.width)),u=E(n,i,o,!0);s=c*(a=(0,l.distance)(u.x-i,(u.y-o)/c))}break;case"farthest-side":e===g.CIRCLE?a=s=Math.max(Math.abs(i),Math.abs(i-n.width),Math.abs(o),Math.abs(o-n.height)):e===g.ELLIPSE&&(a=Math.max(Math.abs(i),Math.abs(i-n.width)),s=Math.max(Math.abs(o),Math.abs(o-n.height)));break;case"farthest-corner":if(e===g.CIRCLE)a=s=Math.max((0,l.distance)(i,o),(0,l.distance)(i,o-n.height),(0,l.distance)(i-n.width,o),(0,l.distance)(i-n.width,o-n.height));else if(e===g.ELLIPSE){var h=Math.max(Math.abs(o),Math.abs(o-n.height))/Math.max(Math.abs(i),Math.abs(i-n.width)),d=E(n,i,o,!1);s=h*(a=(0,l.distance)(d.x-i,(d.y-o)/h))}break;default:a=r.x||0,s=void 0!==r.y?r.y:a}return{x:a,y:s}},H=e.transformWebkitRadialGradientArgs=function(t){var e="",A="",r="",n="",i=0,o=/^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i,a=/^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i,s=t[i].match(o);s&&i++;var c=t[i].match(/^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i);c&&(e=c[1]||"","contain"===(r=c[2]||"")?r="closest-side":"cover"===r&&(r="farthest-corner"),i++);var l=t[i].match(a);l&&i++;var u=t[i].match(o);u&&i++;var h=t[i].match(a);h&&i++;var d=u||s;d&&d[1]&&(n=d[1]+(/^\d+$/.test(d[1])?"px":""),d[2]&&(n+=" "+d[2]+(/^\d+$/.test(d[2])?"px":"")));var f=h||l;return f&&(A=f[0],f[1]||(A+="px")),!n||e||A||r||(A=n,n=""),n&&(n="at "+n),[[e,r,A,n].filter(function(t){return!!t}).join(" ")].concat(t.slice(i))},I=function(t){return t.map(function(t){return t.match(d)}).map(function(e,A){if(!e)return t[A];switch(e[1]){case"from":return e[4]+" 0%";case"to":return e[4]+" 100%";case"color-stop":return"%"===e[3]?e[4]+" "+e[2]:e[4]+" "+100*parseFloat(e[2])+"%"}})}});e($);$.transformWebkitRadialGradientArgs,$.parseGradient,$.RadialGradient,$.LinearGradient,$.RADIAL_GRADIENT_SHAPE,$.GRADIENT_TYPE;var tt=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var A=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);r=!0);}catch(t){n=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(n)throw i}}return A}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var A=0;A0?A.width:r.width,o="number"==typeof A.height&&A.height>0?A.height:r.height;i>0&&o>0&&e.target.clip([(0,p.calculatePaddingBoxPath)(t.curvedBounds)],function(){e.target.drawImage(A,new p.Bounds(0,0,i,o),r)})}}},r=t.getClipPaths();r.length?this.target.clip(r,A):A()}},{key:"renderNodeBackgroundAndBorders",value:function(t){var e=this,A=!t.style.background.backgroundColor.isTransparent()||t.style.background.backgroundImage.length,r=t.style.border.some(function(t){return t.borderStyle!==w.BORDER_STYLE.NONE&&!t.borderColor.isTransparent()}),n=function(){var r=(0,B.calculateBackgroungPaintingArea)(t.curvedBounds,t.style.background.backgroundClip);A&&e.target.clip([r],function(){t.style.background.backgroundColor.isTransparent()||e.target.fill(t.style.background.backgroundColor),e.renderBackgroundImage(t)}),t.style.border.forEach(function(A,r){A.borderStyle===w.BORDER_STYLE.NONE||A.borderColor.isTransparent()||e.renderBorder(A,r,t.curvedBounds)})};if(A||r){var i=t.parent?t.parent.getClipPaths():[];i.length?this.target.clip(i,n):n()}}},{key:"renderBackgroundImage",value:function(t){var e=this;t.style.background.backgroundImage.slice(0).reverse().forEach(function(A){"url"===A.source.method&&A.source.args.length?e.renderBackgroundRepeat(t,A):/gradient/i.test(A.source.method)&&e.renderBackgroundGradient(t,A)})}},{key:"renderBackgroundRepeat",value:function(t,e){var A=this.options.imageStore.get(e.source.args[0]);if(A){var r=(0,B.calculateBackgroungPositioningArea)(t.style.background.backgroundOrigin,t.bounds,t.style.padding,t.style.border),n=(0,B.calculateBackgroundSize)(e,A,r),i=(0,B.calculateBackgroundPosition)(e.position,n,r),o=(0,B.calculateBackgroundRepeatPath)(e,i,n,r,t.bounds),a=Math.round(r.left+i.x),s=Math.round(r.top+i.y);this.target.renderRepeat(o,A,n,a,s)}}},{key:"renderBackgroundGradient",value:function(t,e){var A=(0,B.calculateBackgroungPositioningArea)(t.style.background.backgroundOrigin,t.bounds,t.style.padding,t.style.border),r=(0,B.calculateGradientBackgroundSize)(e,A),n=(0,B.calculateBackgroundPosition)(e.position,r,A),i=new p.Bounds(Math.round(A.left+n.x),Math.round(A.top+n.y),r.width,r.height),o=(0,$.parseGradient)(t,e.source,i);if(o)switch(o.type){case $.GRADIENT_TYPE.LINEAR_GRADIENT:this.target.renderLinearGradient(i,o);break;case $.GRADIENT_TYPE.RADIAL_GRADIENT:this.target.renderRadialGradient(i,o)}}},{key:"renderBorder",value:function(t,e,A){this.target.drawShape((0,p.parsePathForBorder)(A,e),t.borderColor)}},{key:"renderStack",value:function(t){var e=this;if(t.container.isVisible()){var A=t.getOpacity();A!==this._opacity&&(this.target.setOpacity(t.getOpacity()),this._opacity=A);var r=t.container.style.transform;null!==r?this.target.transform(t.container.bounds.left+r.transformOrigin[0].value,t.container.bounds.top+r.transformOrigin[1].value,r.transform,function(){return e.renderStackContent(t)}):this.renderStackContent(t)}}},{key:"renderStackContent",value:function(t){var e=a(t),r=A(e,5),n=r[0],i=r[1],c=r[2],l=r[3],u=r[4],h=o(t),d=A(h,2),f=d[0],p=d[1];this.renderNodeBackgroundAndBorders(t.container),n.sort(s).forEach(this.renderStack,this),this.renderNodeContent(t.container),p.forEach(this.renderNode,this),l.forEach(this.renderStack,this),u.forEach(this.renderStack,this),f.forEach(this.renderNode,this),i.forEach(this.renderStack,this),c.sort(s).forEach(this.renderStack,this)}},{key:"render",value:function(t){this.options.backgroundColor&&this.target.rectangle(this.options.x,this.options.y,this.options.width,this.options.height,this.options.backgroundColor),this.renderStack(t);return this.target.getTarget()}}]),t}();e.default=i;var o=function(t){for(var e=[],A=[],r=t.children.length,n=0;n0?r.push(s):A.push(s):s.container.isFloating()?n.push(s):i.push(s)}return[e,A,r,n,i]},s=function(t,e){return t.container.style.zIndex.order>e.container.style.zIndex.order?1:t.container.style.zIndex.ordere.container.index?1:-1}});e(tt);var et=A(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Proxy=void 0;var A=function(t){return t&&t.__esModule?t:{default:t}}(P);e.Proxy=function(t,e){if(!e.proxy)return Promise.reject(null);var r=e.proxy;return new Promise(function(n,i){var o=A.default.SUPPORT_CORS_XHR&&A.default.SUPPORT_RESPONSE_TYPE?"blob":"text",a=A.default.SUPPORT_CORS_XHR?new XMLHttpRequest:new XDomainRequest;if(a.onload=function(){if(a instanceof XMLHttpRequest)if(200===a.status)if("text"===o)n(a.response);else{var t=new FileReader;t.addEventListener("load",function(){return n(t.result)},!1),t.addEventListener("error",function(t){return i(t)},!1),t.readAsDataURL(a.response)}else i("");else n(a.responseText)},a.onerror=i,a.open("GET",r+"?url="+encodeURIComponent(t)+"&responseType="+o),"text"!==o&&a instanceof XMLHttpRequest&&(a.responseType=o),e.imageTimeout){var s=e.imageTimeout;a.timeout=s,a.ontimeout=function(){return i("")}}a.send()})}});e(et);et.Proxy;var At=A(function(t,e){function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceStore=void 0;var r=function(){function t(t,e){for(var A=0;A0&&A.push({type:n.ATTRIBUTE,value:u[0]});break;case"counter":if(u.length>0){var f={type:n.COUNTER,name:u[0]};u.length>1&&(f.format=u[1]),A.push(f)}break;case"counters":if(u.length>0){var p={type:n.COUNTERS,name:u[0]};u.length>1&&(p.glue=u[1]),u.length>2&&(p.format=u[2]),A.push(p)}break;case"url":u.length>0&&A.push({type:n.URL,value:u[0]})}s=!1,c=""}break;case",":i?c+=d:s&&(u.push(c),c="");break;case" ":case"\t":i?c+=d:c&&(o(A,c),c="");break;default:c+=d}"\\"!==d&&(a=!1)}return c&&o(A,c),e&&(e[t]=A),A}),o=function(t,e){switch(e){case"open-quote":t.push({type:n.OPENQUOTE});break;case"close-quote":t.push({type:n.CLOSEQUOTE})}},a=function(t,e,A){var r=t.quotes?t.quotes.split(/\s+/):["'\"'","'\"'"],n=2*A;return n>=r.length&&(n=r.length-2),e||++n,r[n].replace(/^["']|["']$/g,"")},s=function(t,e,A){for(var r=t.length,n="",i=0;i0&&(n+=e||""),n+=(0,V.createCounterText)(t[i],(0,b.parseListStyleType)(A||"decimal"),!1);return n}});e(rt);rt.parseContent,rt.resolvePseudoContent,rt.popCounters,rt.parseCounterReset,rt.TOKEN_TYPE,rt.PSEUDO_CONTENT_ITEM_TYPE;var nt=A(function(t,e){function A(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.cloneWindow=e.DocumentCloner=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var A=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);r=!0);}catch(t){n=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(n)throw i}}return A}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function t(t,e){for(var A=0;A1&&(A.backgroundColor=""),A.backgroundImage=t.join(",")}),t instanceof HTMLImageElement&&this.resourceLoader.inlineImage(t.src).then(function(e){if(e&&t instanceof HTMLImageElement&&t.parentNode){var A=t.parentNode,r=(0,l.copyCSSStyles)(t.style,e.cloneNode(!1));A.replaceChild(r,t)}}).catch(function(t){})}}},{key:"inlineFonts",value:function(t){var e=this;return Promise.all(Array.from(t.styleSheets).map(function(e){return e.href?fetch(e.href).then(function(t){return t.text()}).then(function(t){return u(t,e.href)}).catch(function(t){return[]}):c(e,t)})).then(function(t){return t.reduce(function(t,e){return t.concat(e)},[])}).then(function(t){return Promise.all(t.map(function(t){return fetch(t.formats[0].src).then(function(t){return t.blob()}).then(function(t){return new Promise(function(e,A){var r=new FileReader;r.onerror=A,r.onload=function(){var t=r.result;e(t)},r.readAsDataURL(t)})}).then(function(e){return t.fontFace.setProperty("src",'url("'+e+'")'),"@font-face {"+t.fontFace.cssText+" "})}))}).then(function(A){var r=t.createElement("style");r.textContent=A.join("\n"),e.documentElement.appendChild(r)})}},{key:"createElementClone",value:function(t){var e=this;if(this.copyStyles&&t instanceof HTMLCanvasElement){var A=t.ownerDocument.createElement("img");try{return A.src=t.toDataURL(),A}catch(t){}}if(t instanceof HTMLIFrameElement){var r=t.cloneNode(!1),n=C();r.setAttribute("data-html2canvas-internal-iframe-key",n);var i=(0,p.parseBounds)(t,0,0),a=i.width,s=i.height;return this.resourceLoader.cache[n]=b(t,this.options).then(function(t){return e.renderer(t,{async:e.options.async,allowTaint:e.options.allowTaint,backgroundColor:"#ffffff",canvas:null,imageTimeout:e.options.imageTimeout,logging:e.options.logging,proxy:e.options.proxy,removeContainer:e.options.removeContainer,scale:e.options.scale,foreignObjectRendering:e.options.foreignObjectRendering,useCORS:e.options.useCORS,target:new o.default,width:a,height:s,x:0,y:0,windowWidth:t.ownerDocument.defaultView.innerWidth,windowHeight:t.ownerDocument.defaultView.innerHeight,scrollX:t.ownerDocument.defaultView.pageXOffset,scrollY:t.ownerDocument.defaultView.pageYOffset},e.logger.child(n))}).then(function(e){return new Promise(function(A,n){var i=document.createElement("img");i.onload=function(){return A(e)},i.onerror=n,i.src=e.toDataURL(),r.parentNode&&r.parentNode.replaceChild((0,l.copyCSSStyles)(t.ownerDocument.defaultView.getComputedStyle(t),i),r)})}),r}if(t instanceof HTMLStyleElement&&t.sheet&&t.sheet.cssRules){var c=[].slice.call(t.sheet.cssRules,0).reduce(function(t,A){try{return A&&A.cssText?t+A.cssText:t}catch(r){return e.logger.log("Unable to access cssText property",A.name),t}},""),u=t.cloneNode(!1);return u.textContent=c,u}return t.cloneNode(!1)}},{key:"cloneNode",value:function(t){var e=t.nodeType===Node.TEXT_NODE?document.createTextNode(t.nodeValue):this.createElementClone(t),A=t.ownerDocument.defaultView,r=t instanceof A.HTMLElement?A.getComputedStyle(t):null,n=t instanceof A.HTMLElement?A.getComputedStyle(t,":before"):null,i=t instanceof A.HTMLElement?A.getComputedStyle(t,":after"):null;this.referenceElement===t&&e instanceof A.HTMLElement&&(this.clonedReferenceElement=e),e instanceof A.HTMLBodyElement&&y(e);for(var o=(0,rt.parseCounterReset)(r,this.pseudoContentData),a=(0,rt.resolvePseudoContent)(t,n,this.pseudoContentData),s=t.firstChild;s;s=s.nextSibling)s.nodeType===Node.ELEMENT_NODE&&("SCRIPT"===s.nodeName||s.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(s))||this.copyStyles&&"STYLE"===s.nodeName||e.appendChild(this.cloneNode(s));var c=(0,rt.resolvePseudoContent)(t,i,this.pseudoContentData);if((0,rt.popCounters)(o,this.pseudoContentData),t instanceof A.HTMLElement&&e instanceof A.HTMLElement)switch(n&&this.inlineAllImages(d(t,e,n,a,f)),i&&this.inlineAllImages(d(t,e,i,c,g)),!r||!this.copyStyles||t instanceof HTMLIFrameElement||(0,l.copyCSSStyles)(r,e),this.inlineAllImages(e),0===t.scrollTop&&0===t.scrollLeft||this.scrolledElements.push([e,t.scrollLeft,t.scrollTop]),t.nodeName){case"CANVAS":this.copyStyles||h(t,e);break;case"TEXTAREA":case"SELECT":e.value=t.value}return e}}]),t}(),c=function(t,e){return(t.cssRules?Array.from(t.cssRules):[]).filter(function(t){return t.type===CSSRule.FONT_FACE_RULE}).map(function(t){for(var A=(0,B.parseBackgroundImage)(t.style.getPropertyValue("src")),r=[],n=0;n0&&"complete"===A.readyState&&(clearInterval(e),r(t))},50)}})},x=(e.cloneWindow=function(t,e,A,r,n,i){var o=new a(A,r,n,!1,i),s=t.defaultView.pageXOffset,c=t.defaultView.pageYOffset;return F(t,e).then(function(n){var i=n.contentWindow,a=i.document,l=E(n).then(function(){o.scrolledElements.forEach(Q),i.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||i.scrollY===e.top&&i.scrollX===e.left||(a.documentElement.style.top=-e.top+"px",a.documentElement.style.left=-e.left+"px",a.documentElement.style.position="absolute");var A=Promise.resolve([n,o.clonedReferenceElement,o.resourceLoader]),s=r.onclone;return o.clonedReferenceElement instanceof i.HTMLElement||o.clonedReferenceElement instanceof t.defaultView.HTMLElement||o.clonedReferenceElement instanceof HTMLElement?"function"==typeof s?Promise.resolve().then(function(){return s(a)}).then(function(){return A}):A:Promise.reject("")});return a.open(),a.write(x(document.doctype)+""),function(t,e,A){!t.defaultView||e===t.defaultView.pageXOffset&&A===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,A)}(A.ownerDocument,s,c),a.replaceChild(a.adoptNode(o.documentElement),a.documentElement),a.close(),l})},function(t){var e="";return t&&(e+=""),e})});e(nt);nt.cloneWindow,nt.DocumentCloner;var it=A(function(t,e){function A(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.renderElement=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var A=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);r=!0);}catch(t){n=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(n)throw i}}return A}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=(A(c),A(tt)),i=A(O),a=A(P),s=A(o);e.renderElement=function t(e,A,c){var l=e.ownerDocument,u=new p.Bounds(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),h=l.documentElement?new s.default(getComputedStyle(l.documentElement).backgroundColor):o.TRANSPARENT,d=l.body?new s.default(getComputedStyle(l.body).backgroundColor):o.TRANSPARENT,f=e===l.documentElement?h.isTransparent()?d.isTransparent()?A.backgroundColor?new s.default(A.backgroundColor):null:d:h:A.backgroundColor?new s.default(A.backgroundColor):null;return(A.foreignObjectRendering?a.default.SUPPORT_FOREIGNOBJECT_DRAWING:Promise.resolve(!1)).then(function(a){return a?function(t){return t.inlineFonts(l).then(function(){return t.resourceLoader.ready()}).then(function(){var r=new i.default(t.documentElement),n=l.defaultView,o=n.pageXOffset,a=n.pageYOffset,s="HTML"===e.tagName||"BODY"===e.tagName?(0,p.parseDocumentSize)(l):(0,p.parseBounds)(e,o,a),u=s.width,h=s.height,d=s.left,g=s.top;return r.render({backgroundColor:f,logger:c,scale:A.scale,x:"number"==typeof A.x?A.x:d,y:"number"==typeof A.y?A.y:g,width:"number"==typeof A.width?A.width:Math.ceil(u),height:"number"==typeof A.height?A.height:Math.ceil(h),windowWidth:A.windowWidth,windowHeight:A.windowHeight,scrollX:A.scrollX,scrollY:A.scrollY})})}(new nt.DocumentCloner(e,A,c,!0,t)):(0,nt.cloneWindow)(l,u,e,A,c,t).then(function(t){var e=r(t,3),i=e[0],a=e[1],s=e[2],u=(0,Y.NodeParser)(a,s,c),h=a.ownerDocument;return f===u.container.style.background.backgroundColor&&(u.container.style.background.backgroundColor=o.TRANSPARENT),s.ready().then(function(t){var e=new J.FontMetrics(h),r=h.defaultView,o=r.pageXOffset,s=r.pageYOffset,d="HTML"===a.tagName||"BODY"===a.tagName?(0,p.parseDocumentSize)(l):(0,p.parseBounds)(a,o,s),g=d.width,B=d.height,w=d.left,m=d.top,y={backgroundColor:f,fontMetrics:e,imageStore:t,logger:c,scale:A.scale,x:"number"==typeof A.x?A.x:w,y:"number"==typeof A.y?A.y:m,width:"number"==typeof A.width?A.width:Math.ceil(g),height:"number"==typeof A.height?A.height:Math.ceil(B)};if(Array.isArray(A.target))return Promise.all(A.target.map(function(t){return new n.default(t,y).render(u)}));var v=new n.default(A.target,y).render(u);return!0===A.removeContainer&&i.parentNode&&i.parentNode.removeChild(i),v})})})}});e(it);it.renderElement;var ot=e(A(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var A=Object.assign||function(t){for(var e=1;e0;null)r[n].parentNode.removeChild(r[n])}for(var i in e.style)A.style[i]=e.style[i];return A},ut=function(t,e){if("number"===ct(t))return 72*t/96/e;var A={};for(var r in t)A[r]=72*t[r]/96/e;return A},ht=function(t,e){return Math.floor(t*e/72*96)},dt=function t(e){var A=st(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),r=t.convert(Promise.resolve(),A);return r=r.setProgress(1,t,1,[t]),r=r.set(e)};(dt.prototype=Object.create(Promise.prototype)).constructor=dt,dt.convert=function(t,e){return t.__proto__=e||dt.prototype,t},dt.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],image:{type:"jpeg",quality:.95},enableLinks:!0,html2canvas:{},jsPDF:{}}},dt.prototype.from=function(t,e){return this.then(function(){switch(e=e||function(t){switch(ct(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.set({src:lt("div",{innerHTML:t})});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.")}})},dt.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.")}},dt.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:"fixed",overflow:"hidden",zIndex:1e3,left:0,right:0,bottom:0,top:0,backgroundColor:"rgba(0,0,0,0.8)"},e={position:"absolute",width:this.prop.pageSize.inner.width+this.prop.pageSize.unit,left:0,right:0,top:0,height:"auto",margin:"auto",backgroundColor:"white"};t.opacity=0;var A=function t(e,A){for(var r=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),n=e.firstChild;n;n=n.nextSibling)!0!==A&&1===n.nodeType&&"SCRIPT"===n.nodeName||r.appendChild(t(n,A));return 1===e.nodeType&&("CANVAS"===e.nodeName?(r.width=e.width,r.height=e.height,r.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(r.value=e.value),r.addEventListener("load",function(){r.scrollTop=e.scrollTop,r.scrollLeft=e.scrollLeft},!0)),r}(this.prop.src,this.opt.html2canvas.javascriptEnabled);this.prop.overlay=lt("div",{className:"html2pdf__overlay",style:t}),this.prop.container=lt("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(A),this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay)})},dt.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(function(){var t=st({},this.opt.html2canvas);return delete t.onrendered,ot(this.prop.container,t)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},dt.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})},dt.prototype.toPdf=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var t=this.prop.canvas,e=this.opt,A=(t.getContext("2d"),t.height),r=Math.floor(t.width*this.prop.pageSize.inner.ratio),i=Math.ceil(A/r),o=this.prop.pageSize.inner.height,a=document.createElement("canvas"),s=a.getContext("2d");a.width=t.width,a.height=r,this.prop.pdf=this.prop.pdf||new n(e.jsPDF);for(var c=0;ca){c=s;s=a,a=c}}else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;if(t="l",a>s){var c=s;s=a,a=c}}return{width:s,height:a,unit:e,k:o}};var ft={toContainer:dt.prototype.toContainer};dt.template.opt.pagebreak={mode:["css","legacy"],before:[],after:[],avoid:[]},dt.prototype.toContainer=function(){return ft.toContainer.call(this).then(function(){var t=this.prop.container,e=this.prop.pageSize.inner.px.height,A=[].concat(this.opt.pagebreak.mode),r={avoidAll:-1!==A.indexOf("avoid-all"),css:-1!==A.indexOf("css"),legacy:-1!==A.indexOf("legacy")},n={},i=this;["before","after","avoid"].forEach(function(e){var A=r.avoidAll&&"avoid"===e;n[e]=A?[]:[].concat(i.opt.pagebreak[e]||[]),n[e].length>0&&(n[e]=Array.prototype.slice.call(t.querySelectorAll(n[e].join(", "))))});var o=t.querySelectorAll(".html2pdf__page-break");o=Array.prototype.slice.call(o);var a=t.querySelectorAll("*");Array.prototype.forEach.call(a,function(t){var A={before:!1,after:r.legacy&&-1!==o.indexOf(t),avoid:r.avoidAll};if(r.css){var i=window.getComputedStyle(t),a=["always","page","left","right"];A={before:A.before||-1!==a.indexOf(i.breakBefore||i.pageBreakBefore),after:A.after||-1!==a.indexOf(i.breakAfter||i.pageBreakAfter),avoid:A.avoid||-1!==["avoid","avoid-page"].indexOf(i.breakInside||i.pageBreakInside)}}Object.keys(A).forEach(function(e){A[e]=A[e]||-1!==n[e].indexOf(t)});var s=t.getBoundingClientRect();if(A.avoid&&!A.before){var c=Math.floor(s.top/e),l=Math.floor(s.bottom/e),u=Math.abs(s.bottom-s.top)/e;l!==c&&u<=1&&(A.before=!0)}if(A.before){h=lt("div",{style:{display:"block",height:e-s.top%e+"px"}});t.parentNode.insertBefore(h,t)}if(A.after){var h=lt("div",{style:{display:"block",height:e-s.bottom%e+"px"}});t.parentNode.insertBefore(h,t.nextSibling)}})})};var pt=[],gt={toContainer:dt.prototype.toContainer,toPdf:dt.prototype.toPdf};dt.prototype.toContainer=function(){return gt.toContainer.call(this).then(function(){if(this.opt.enableLinks){var t=this.prop.container,e=t.querySelectorAll("a"),A=ut(t.getBoundingClientRect(),this.prop.pageSize.k);pt=[],Array.prototype.forEach.call(e,function(t){for(var e=t.getClientRects(),r=0;r