/*! * html2canvas-pro 1.5.11 * Copyright (c) 2024-present yorickshan and html2canvas-pro contributors * Released under MIT License */ !function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A="undefined"!=typeof globalThis?globalThis:A||self).html2canvas=e()}(this,function(){"use strict";var A=function(e,t){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])},A(e,t)};function e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var t=function(){return t=Object.assign||function(A){for(var e,t=1,r=arguments.length;t0&&B[B.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!B||o[1]>B[0]&&o[1]=55296&&B<=56319&&t>10),s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q="undefined"==typeof Uint8Array?[]:new Uint8Array(256),w=0;w<64;w++)Q[a.charCodeAt(w)]=w;for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256),l=0;l<64;l++)u[g.charCodeAt(l)]=l;for(var U=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},C=function(){function A(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}return A.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="undefined"==typeof Uint8Array?[]:new Uint8Array(256),d=0;d<64;d++)h[F.charCodeAt(d)]=d;var f=10,p=13,H=15,E=17,I=18,y=19,K=20,m=21,v=22,L=24,b=25,D=26,M=27,x=28,S=30,T=32,G=33,O=34,V=35,k=37,R=38,N=39,P=40,X=42,J=[9001,65288],Y="×",W="÷",Z=function(A){var e,t,r,B=function(A){var e,t,r,B,n,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),a=Array.isArray(c)?c:new Uint8Array(c);for(e=0;e>4,a[i++]=(15&r)<<4|B>>2,a[i++]=(3&B)<<6|63&n;return c}(A),n=Array.isArray(B)?function(A){for(var e=A.length,t=[],r=0;r0;){var s=r[--n];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o=t;o<=r.length;){var i;if((i=r[++o])===e)return!0;if(i!==f)break}if(s!==f)break}return!1},rA=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==f)return r;t--}return 0},BA=function(A,e,t,r,B){if(0===t[r])return Y;var n=r-1;if(Array.isArray(B)&&!0===B[n])return Y;var s=n-1,o=n+1,i=e[n],c=s>=0?e[s]:0,a=e[o];if(2===i&&3===a)return Y;if(-1!==q.indexOf(i))return"!";if(-1!==q.indexOf(a))return Y;if(-1!==j.indexOf(a))return Y;if(8===rA(n,e))return W;if(11===Z.get(A[n]))return Y;if((i===T||i===G)&&11===Z.get(A[o]))return Y;if(7===i||7===a)return Y;if(9===i)return Y;if(-1===[f,p,H].indexOf(i)&&9===a)return Y;if(-1!==[E,I,y,L,x].indexOf(a))return Y;if(rA(n,e)===v)return Y;if(tA(23,v,n,e))return Y;if(tA([E,I],m,n,e))return Y;if(tA(12,12,n,e))return Y;if(i===f)return W;if(23===i||23===a)return Y;if(16===a||16===i)return W;if(-1!==[p,H,m].indexOf(a)||14===i)return Y;if(36===c&&-1!==eA.indexOf(i))return Y;if(i===x&&36===a)return Y;if(a===K)return Y;if(-1!==_.indexOf(a)&&i===b||-1!==_.indexOf(i)&&a===b)return Y;if(i===M&&-1!==[k,T,G].indexOf(a)||-1!==[k,T,G].indexOf(i)&&a===D)return Y;if(-1!==_.indexOf(i)&&-1!==z.indexOf(a)||-1!==z.indexOf(i)&&-1!==_.indexOf(a))return Y;if(-1!==[M,D].indexOf(i)&&(a===b||-1!==[v,H].indexOf(a)&&e[o+1]===b)||-1!==[v,H].indexOf(i)&&a===b||i===b&&-1!==[b,x,L].indexOf(a))return Y;if(-1!==[b,x,L,E,I].indexOf(a))for(var Q=n;Q>=0;){if((w=e[Q])===b)return Y;if(-1===[x,L].indexOf(w))break;Q--}if(-1!==[M,D].indexOf(a))for(Q=-1!==[E,I].indexOf(i)?s:n;Q>=0;){var w;if((w=e[Q])===b)return Y;if(-1===[x,L].indexOf(w))break;Q--}if(R===i&&-1!==[R,N,O,V].indexOf(a)||-1!==[N,O].indexOf(i)&&-1!==[N,P].indexOf(a)||-1!==[P,V].indexOf(i)&&a===P)return Y;if(-1!==AA.indexOf(i)&&-1!==[K,D].indexOf(a)||-1!==AA.indexOf(a)&&i===M)return Y;if(-1!==_.indexOf(i)&&-1!==_.indexOf(a))return Y;if(i===L&&-1!==_.indexOf(a))return Y;if(-1!==_.concat(b).indexOf(i)&&a===v&&-1===J.indexOf(A[o])||-1!==_.concat(b).indexOf(a)&&i===I)return Y;if(41===i&&41===a){for(var g=t[n],u=1;g>0&&41===e[--g];)u++;if(u%2!=0)return Y}return i===T&&a===G?Y:W},nA=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=function(A,e){void 0===e&&(e="strict");var t=[],r=[],B=[];return A.forEach(function(A,n){var s=Z.get(A);if(s>50?(B.push(!0),s-=50):B.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return r.push(n),t.push(16);if(4===s||11===s){if(0===n)return r.push(n),t.push(S);var o=t[n-1];return-1===$.indexOf(o)?(r.push(r[n-1]),t.push(o)):(r.push(n),t.push(S))}return r.push(n),31===s?t.push("strict"===e?m:k):s===X||29===s?t.push(S):43===s?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(k):t.push(S):void t.push(s)}),[r,t,B]}(A,e.lineBreak),r=t[0],B=t[1],n=t[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(B=B.map(function(A){return-1!==[b,S,X].indexOf(A)?k:A}));var s="keep-all"===e.wordBreak?n.map(function(e,t){return e&&A[t]>=19968&&A[t]<=40959}):void 0;return[r,B,s]},sA=function(){function A(A,e,t,r){this.codePoints=A,this.required="!"===e,this.start=t,this.end=r}return A.prototype.slice=function(){return c.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),oA=45,iA=43,cA=-1,aA=function(A){return A>=48&&A<=57},QA=function(A){return aA(A)||A>=65&&A<=70||A>=97&&A<=102},wA=function(A){return 10===A||9===A||32===A},gA=function(A){return function(A){return function(A){return A>=97&&A<=122}(A)||function(A){return A>=65&&A<=90}(A)}(A)||function(A){return A>=128}(A)||95===A},uA=function(A){return gA(A)||aA(A)||A===oA},lA=function(A){return A>=0&&A<=8||11===A||A>=14&&A<=31||127===A},UA=function(A,e){return 92===A&&10!==e},CA=function(A,e,t){return A===oA?gA(e)||UA(e,t):!!gA(A)||!(92!==A||!UA(A,e))},FA=function(A,e,t){return A===iA||A===oA?!!aA(e)||46===e&&aA(t):aA(46===A?e:A)},hA=function(A){var e=0,t=1;A[e]!==iA&&A[e]!==oA||(A[e]===oA&&(t=-1),e++);for(var r=[];aA(A[e]);)r.push(A[e++]);var B=r.length?parseInt(c.apply(void 0,r),10):0;46===A[e]&&e++;for(var n=[];aA(A[e]);)n.push(A[e++]);var s=n.length,o=s?parseInt(c.apply(void 0,n),10):0;69!==A[e]&&101!==A[e]||e++;var i=1;A[e]!==iA&&A[e]!==oA||(A[e]===oA&&(i=-1),e++);for(var a=[];aA(A[e]);)a.push(A[e++]);var Q=a.length?parseInt(c.apply(void 0,a),10):0;return t*(B+o*Math.pow(10,-s))*Math.pow(10,i*Q)},dA={type:2},fA={type:3},pA={type:4},HA={type:13},EA={type:8},IA={type:21},yA={type:9},KA={type:10},mA={type:11},vA={type:12},LA={type:14},bA={type:23},DA={type:1},MA={type:25},xA={type:24},SA={type:26},TA={type:27},GA={type:28},OA={type:29},VA={type:31},kA={type:32},RA=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(i(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==kA;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(uA(e)||UA(t,r)){var B=CA(e,t,r)?2:1;return{type:5,value:this.consumeName(),flags:B}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),HA;break;case 39:return this.consumeStringToken(39);case 40:return dA;case 41:return fA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),LA;break;case iA:if(FA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return pA;case oA:var n=A,s=this.peekCodePoint(0),o=this.peekCodePoint(1);if(FA(n,s,o))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(CA(n,s,o))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(s===oA&&62===o)return this.consumeCodePoint(),this.consumeCodePoint(),xA;break;case 46:if(FA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var i=this.consumeCodePoint();if(42===i&&47===(i=this.consumeCodePoint()))return this.consumeToken();if(i===cA)return this.consumeToken()}break;case 58:return SA;case 59:return TA;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===oA&&this.peekCodePoint(2)===oA)return this.consumeCodePoint(),this.consumeCodePoint(),MA;break;case 64:var a=this.peekCodePoint(0),Q=this.peekCodePoint(1),w=this.peekCodePoint(2);if(CA(a,Q,w))return{type:7,value:this.consumeName()};break;case 91:return GA;case 92:if(UA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return OA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),EA;break;case 123:return mA;case 125:return vA;case 117:case 85:var g=this.peekCodePoint(0),u=this.peekCodePoint(1);return g!==iA||!QA(u)&&63!==u||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),yA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),IA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),KA;break;case cA:return kA}return wA(A)?(this.consumeWhiteSpace(),VA):aA(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):gA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:c(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();QA(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;63===e&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t)return{type:30,start:parseInt(c.apply(void 0,A.map(function(A){return 63===A?48:A})),16),end:parseInt(c.apply(void 0,A.map(function(A){return 63===A?70:A})),16)};var r=parseInt(c.apply(void 0,A),16);if(this.peekCodePoint(0)===oA&&QA(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var B=[];QA(e)&&B.length<6;)B.push(e),e=this.consumeCodePoint();return{type:30,start:r,end:parseInt(c.apply(void 0,B),16)}}return{type:30,start:r,end:r}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===cA)return{type:22,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var t=this.consumeStringToken(this.consumeCodePoint());return 0===t.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===cA||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),bA)}for(;;){var r=this.consumeCodePoint();if(r===cA||41===r)return{type:22,value:c.apply(void 0,A)};if(wA(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===cA||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:c.apply(void 0,A)}):(this.consumeBadUrlRemnants(),bA);if(34===r||39===r||40===r||lA(r))return this.consumeBadUrlRemnants(),bA;if(92===r){if(!UA(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),bA;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;wA(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||A===cA)return;UA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e="";A>0;){var t=Math.min(5e4,A);e+=c.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(r===cA||void 0===r||r===A)return{type:0,value:e+=this.consumeStringSlice(t)};if(10===r)return this._value.splice(0,t),DA;if(92===r){var B=this._value[t+1];B!==cA&&void 0!==B&&(10===B?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):UA(r,B)&&(e+=this.consumeStringSlice(t),e+=c(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=4,t=this.peekCodePoint(0);for(t!==iA&&t!==oA||A.push(this.consumeCodePoint());aA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===t&&aA(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;aA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var B=this.peekCodePoint(2);if((69===t||101===t)&&((r===iA||r===oA)&&aA(B)||aA(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;aA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[hA(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),B=this.peekCodePoint(1),n=this.peekCodePoint(2);return CA(r,B,n)?{type:15,number:e,flags:t,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(QA(A)){for(var e=c(A);QA(this.peekCodePoint(0))&&e.length<6;)e+=c(this.consumeCodePoint());wA(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||function(A){return A>=55296&&A<=57343}(t)||t>1114111?65533:t}return A===cA?65533:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(uA(e))A+=c(e);else{if(!UA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=c(this.consumeEscapedCodePoint())}}},A}(),NA=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new RA;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();31===A.type;)A=this.consumeToken();if(32===A.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(31===A.type);if(32===A.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(32===e.type)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(32===t.type||jA(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(32===t.type||3===t.type)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?kA:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),PA=function(A){return 15===A.type},XA=function(A){return 17===A.type},JA=function(A){return 20===A.type},YA=function(A){return 0===A.type},WA=function(A,e){return JA(A)&&A.value===e},ZA=function(A){return 31!==A.type},_A=function(A){return 31!==A.type&&4!==A.type},qA=function(A){var e=[],t=[];return A.forEach(function(A){if(4===A.type){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}31!==A.type&&t.push(A)}),t.length&&e.push(t),e},jA=function(A,e){return 11===e&&12===A.type||(28===e&&29===A.type||2===e&&3===A.type)},zA=function(A){return 17===A.type||15===A.type},$A=function(A){return 16===A.type||zA(A)},Ae=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},ee={type:17,number:0,flags:4},te={type:16,number:50,flags:4},re={type:16,number:100,flags:4},Be=function(A,e,t){var r=A[0],B=A[1];return[ne(r,e),ne(void 0!==B?B:r,t)]},ne=function(A,e){if(!A||"object"!=typeof A)return 0;if(16===A.type)return A.number/100*e;if(PA(A))switch(A.unit){case"rem":case"em":return 16*A.number;default:return A.number}return A.number||0},se="grad",oe="turn",ie=function(A,e){if(15===e.type)switch(e.unit){case"deg":return Math.PI*e.number/180;case se:return Math.PI/200*e.number;case"rad":return e.number;case oe:return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},ce=function(A){return 15===A.type&&("deg"===A.unit||A.unit===se||"rad"===A.unit||A.unit===oe)},ae=function(A){switch(A.filter(JA).map(function(A){return A.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ee,ee];case"to top":case"bottom":return Qe(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ee,re];case"to right":case"left":return Qe(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[re,re];case"to bottom":case"top":return Qe(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[re,ee];case"to left":case"right":return Qe(270)}return 0},Qe=function(A){return Math.PI*A/180},we=function(A){return!(255&A)},ge=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,B=255&A>>24;return e<255?"rgba(".concat(B,",").concat(r,",").concat(t,",").concat(e/255,")"):"rgb(".concat(B,",").concat(r,",").concat(t,")")},ue=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r))>>>0},le=function(A,e){if(17===A.type)return A.number;if(16===A.type){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},Ue=function(A){return"from"===(20===A[0].type?A[0].value:"unknown")},Ce=function(A,e,t){return Math.min(Math.max(A,e),t)},Fe=function(A,e){return[A[0]*e[0]+A[1]*e[1]+A[2]*e[2],A[3]*e[0]+A[4]*e[1]+A[5]*e[2],A[6]*e[0]+A[7]*e[1]+A[8]*e[2]]},he=function(A){var e=A[0],t=A[1],r=A[2],B=A[3],n=Ge([e,t,r]);return ue(Ce(Math.round(255*n[0]),0,255),Ce(Math.round(255*n[1]),0,255),Ce(Math.round(255*n[2]),0,255),B)},de=function(A){var e=Se([A[0],A[1],A[2]]);return he([e[0],e[1],e[2],A[3]])},fe=function(A,e){var t=e.filter(_A),r=t[0],B=t[1],n=t[2],s=t[3];return[(17===r.type?Qe(r.number):ie(A,r))/(2*Math.PI),$A(B)?B.number/100:0,$A(n)?n.number/100:0,void 0!==s&&$A(s)?ne(s,1):1]},pe=function(A,e){if(Ue(e))throw new Error("Relative color not supported for hsl()");var t=fe(A,e),r=t[0],B=t[1],n=t[2],s=t[3],o=ve([r,B,n]);return ue(255*o[0],255*o[1],255*o[2],0===B?1:s)},He=function(A){var e=A.filter(_A);return[$A(e[0])?e[0].number:0,$A(e[1])?e[1].number:0,XA(e[2])||PA(e[2])?e[2].number:0,void 0!==e[4]&&$A(e[4])?ne(e[4],1):1]},Ee=function(A){var e=A.filter(_A);return[16===e[0].type?e[0].number/100:XA(e[0])?e[0].number:0,16===e[1].type?e[1].number/100:XA(e[1])?e[1].number:0,XA(e[2])||PA(e[2])?e[2].number:0,void 0!==e[4]&&$A(e[4])?ne(e[4],1):1]},Ie=function(A){var e=A.filter(_A);return[16===e[0].type?e[0].number/100:XA(e[0])?e[0].number:0,16===e[1].type?e[1].number/100:XA(e[1])?e[1].number:0,XA(e[2])||PA(e[2])?e[2].number:0,void 0!==e[4]&&$A(e[4])?ne(e[4],1):1]},ye=function(A){return Fe([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],A)},Ke=function(A){return Fe([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],A)},me=function(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A},ve=function(A){var e=A[0],t=A[1],r=A[2];if(0===t)return[255*r,255*r,255*r];var B=r<=.5?r*(t+1):r+t-r*t,n=2*r-B;return[me(n,B,e+1/3),me(n,B,e),me(n,B,e-1/3)]},Le=function(A){var e=A[0],t=A[1],r=A[2];return t<0&&(t=0),isNaN(r)&&(r=0),[e,t*Math.cos(r*Math.PI/180),t*Math.sin(r*Math.PI/180)]},be=function(A){var e=Fe([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],A).map(function(A){return Math.pow(A,3)});return Fe([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],e)},De=function(A){var e=(A[0]+16)/116,t=A[1]/500+e,r=e-A[2]/200,B=24389/27,n=24/116,s=[.3457*(t>n?Math.pow(t,3):(116*t-16)/B)/.3585,A[0]>8?Math.pow(e,3):A[0]/B,.2958*(r>n?Math.pow(r,3):(116*r-16)/B)/.3585];return Ke([s[0],s[1],s[2]])},Me=function(A){return A},xe=function(A){return de([A[0],A[1],A[2],A[3]])},Se=function(A){return Fe([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],A)},Te=function(A){return Fe([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],A)},Ge=function(A){return A.map(function(A){var e=A<0?-1:1,t=Math.abs(A);return t>.0031308?e*(1.055*Math.pow(t,1/2.4)-.055):12.92*A})},Oe=function(A){return A.map(function(A){var e=A<0?-1:1,t=Math.abs(A);return t<=.04045?A/12.92:e*Math.pow((t+.055)/1.055,2.4)})},Ve=function(A){var e,t=[A[0],A[1],A[2]].map(function(A){var e=A<0?-1:1;return A*e<=.04045?A/12.92:e*Math.pow((A+.055)/1.055,2.4)||0});return e=[t[0],t[1],t[2]],Fe([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],e)},ke=function(A){var e=[A[0],A[1],A[2]].map(function(A){return A<16/512?A/16:Math.pow(A,1.8)});return Ke(function(A){return Fe([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],A)}([e[0],e[1],e[2]]))},Re=1.09929682680944,Ne=.018053968510807,Pe=function(A){var e,t=function(A){return A.map(function(A){return A<4.5*Ne?A/4.5:Math.pow((A+Re-1)/Re,1/.45)})}([A[0],A[1],A[2]]);return e=[t[0],t[1],t[2]],Fe([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],e)},Xe=function(A,e){if(18===e.type){var t=qe[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported color function "'.concat(e.name,'"'));return t(A,e.values)}if(5===e.type){var r=Je(e),B=r[0],n=r[1],s=r[2],o=r[3];return ue(B,n,s,o)}if(20===e.type){var i=ze[e.value.toUpperCase()];if(void 0!==i)return i}return ze.TRANSPARENT},Je=function(A){if(3===A.value.length){var e=A.value.substring(0,1),t=A.value.substring(1,2),r=A.value.substring(2,3);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(r+r,16),1]}if(4===A.value.length){e=A.value.substring(0,1),t=A.value.substring(1,2),r=A.value.substring(2,3);var B=A.value.substring(3,4);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(r+r,16),parseInt(B+B,16)/255]}if(6===A.value.length){e=A.value.substring(0,2),t=A.value.substring(2,4),r=A.value.substring(4,6);return[parseInt(e,16),parseInt(t,16),parseInt(r,16),1]}if(8===A.value.length){e=A.value.substring(0,2),t=A.value.substring(2,4),r=A.value.substring(4,6),B=A.value.substring(6,8);return[parseInt(e,16),parseInt(t,16),parseInt(r,16),parseInt(B,16)/255]}return[0,0,0,1]},Ye=function(A,e){var t=e.filter(_A);if(Ue(t))throw new Error("Relative color not supported for rgb()");if(3===t.length){var r=t.map(le),B=r[0],n=r[1],s=r[2];return ue(B,n,s,1)}if(4===t.length){var o=t.map(le),i=(B=o[0],n=o[1],s=o[2],o[3]);return ue(B,n,s,i)}return 0},We={srgb:function(A){return ue(Ce(Math.round(255*A[0]),0,255),Ce(Math.round(255*A[1]),0,255),Ce(Math.round(255*A[2]),0,255),Ce(A[3],0,1))},"srgb-linear":he,"display-p3":function(A){var e=Ve([A[0],A[1],A[2]]);return de([e[0],e[1],e[2],A[3]])},"a98-rgb":function(A){var e,t=Se((e=function(A){var e=A.map(function(A){var e=A<0?-1:1,t=Math.abs(A);return e*Math.pow(t,563/256)});return[e[0],e[1],e[2]]}([A[0],A[1],A[2]]),Fe([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],e)));return he([t[0],t[1],t[2],A[3]])},"prophoto-rgb":function(A){var e=ke([A[0],A[1],A[2]]);return de([e[0],e[1],e[2],A[3]])},xyz:xe,"xyz-d50":function(A){var e=function(A){return Ke([A[0],A[1],A[2]])}([A[0],A[1],A[2]]);return de([e[0],e[1],e[2],A[3]])},"xyz-d65":xe,rec2020:function(A){var e=Pe([A[0],A[1],A[2]]);return de([e[0],e[1],e[2],A[3]])}},Ze={rgb:function(A,e){var t=e.filter(_A);if(3===t.length){var r=t.map(le),B=r[0],n=r[1],s=r[2],o=Oe([B/255,n/255,s/255]),i=Te([o[0],o[1],o[2]]);return[i[0],i[1],i[2],1]}if(4===t.length){var c=t.map(le),a=(B=c[0],n=c[1],s=c[2],c[3]),Q=(o=Oe([B/255,n/255,s/255]),Te([o[0],o[1],o[2]]));return[Q[0],Q[1],Q[2],a]}return[0,0,0,1]},hsl:function(A,e){var t=fe(A,e),r=t[0],B=t[1],n=t[2],s=t[3],o=Oe(ve([r,B,n])),i=Te([o[0],o[1],o[2]]);return[i[0],i[1],i[2],s]},lab:function(A,e){var t=Ee(e),r=t[0],B=t[1],n=t[2],s=t[3],o=De([r,B,n]);return[o[0],o[1],o[2],s]},lch:function(A,e){var t=He(e),r=t[0],B=t[1],n=t[2],s=t[3],o=De(Le([r,B,n]));return[o[0],o[1],o[2],s]},oklab:function(A,e){var t=Ee(e),r=t[0],B=t[1],n=t[2],s=t[3],o=be([r,B,n]);return[o[0],o[1],o[2],s]},oklch:function(A,e){var t=Ie(e),r=t[0],B=t[1],n=t[2],s=t[3],o=be(Le([r,B,n]));return[o[0],o[1],o[2],s]}},_e={srgb:function(A){var e=Ge(Se([A[0],A[1],A[2]]));return[e[0],e[1],e[2],A[3]]},"srgb-linear":function(A){var e=Se([A[0],A[1],A[2]]),t=e[0],r=e[1],B=e[2];return[Ce(Math.round(255*t),0,255),Ce(Math.round(255*r),0,255),Ce(Math.round(255*B),0,255),A[3]]},"display-p3":function(A){var e,t,r=(t=[A[0],A[1],A[2]],e=Fe([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],t),Ge(e));return[r[0],r[1],r[2],A[3]]},"a98-rgb":function(A){var e,t=function(A){var e=A.map(function(A){var e=A<0?-1:1,t=Math.abs(A);return e*Math.pow(t,256/563)});return[e[0],e[1],e[2]]}((e=[A[0],A[1],A[2]],Fe([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],e)));return[t[0],t[1],t[2],A[3]]},"prophoto-rgb":function(A){var e,t=(e=ye([A[0],A[1],A[2]]),Fe([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],e).map(function(A){return A>1/512?Math.pow(A,1/1.8):16*A}));return[t[0],t[1],t[2],A[3]]},xyz:Me,"xyz-d50":function(A){var e=ye([A[0],A[2],A[3]]);return[e[0],e[1],e[2],A[3]]},"xyz-d65":Me,rec2020:function(A){var e,t=function(A){return A.map(function(A){return A>=Ne?Re*Math.pow(A,.45)-(Re-1):4.5*A})}((e=[A[0],A[1],A[2]],Fe([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],e)));return[t[0],t[1],t[2],A[3]]}},qe={hsl:pe,hsla:pe,rgb:Ye,rgba:Ye,lch:function(A,e){if(Ue(e.filter(_A)))throw new Error("Relative color not supported for lch()");var t=He(e),r=t[0],B=t[1],n=t[2],s=t[3],o=Ge(Se(De(Le([r,B,n]))));return ue(Ce(Math.round(255*o[0]),0,255),Ce(Math.round(255*o[1]),0,255),Ce(Math.round(255*o[2]),0,255),s)},oklch:function(A,e){if(Ue(e.filter(_A)))throw new Error("Relative color not supported for oklch()");var t=Ie(e),r=t[0],B=t[1],n=t[2],s=t[3],o=Ge(Se(be(Le([r,B,n]))));return ue(Ce(Math.round(255*o[0]),0,255),Ce(Math.round(255*o[1]),0,255),Ce(Math.round(255*o[2]),0,255),s)},oklab:function(A,e){if(Ue(e.filter(_A)))throw new Error("Relative color not supported for oklab()");var t=Ee(e),r=t[0],B=t[1],n=t[2],s=t[3],o=Ge(Se(be([r,B,n])));return ue(Ce(Math.round(255*o[0]),0,255),Ce(Math.round(255*o[1]),0,255),Ce(Math.round(255*o[2]),0,255),s)},lab:function(A,e){if(Ue(e.filter(_A)))throw new Error("Relative color not supported for lab()");var t=Ee(e),r=t[0],B=t[1],n=t[2],s=t[3],o=Ge(Se(De([r,B,n])));return ue(Ce(Math.round(255*o[0]),0,255),Ce(Math.round(255*o[1]),0,255),Ce(Math.round(255*o[2]),0,255),s)},color:function(A,e){var t=e.filter(_A),r=20===t[0].type?t[0].value:"unknown";if(!Ue(t)){var B=r,n=We[B];if(void 0===n)throw new Error('Attempting to parse an unsupported color space "'.concat(B,'" for color() function'));return n([C=XA(t[1])?t[1].number:0,F=XA(t[2])?t[2].number:0,h=XA(t[3])?t[3].number:0,d=t.length>4&&6===t[4].type&&"/"===t[4].value&&XA(t[5])?t[5].number:1])}var s=function(A,e){if(XA(e))return e.number;var t;if(JA(e))return A["r"===(t=e.value)||"x"===t?0:"g"===t||"y"===t?1:2];var r=function(A){for(var e="(",t=0,B=A.filter(_A);t>24,flags:1},{type:17,number:255&a>>16,flags:1},{type:17,number:255&a>>8,flags:1},{type:17,number:(Q=255&a)>1?Q/255:Q,flags:1}]}else if(5===t[1].type){var Q,w=Je(t[1]);c=[{type:17,number:w[0],flags:1},{type:17,number:w[1],flags:1},{type:17,number:w[2],flags:1},{type:17,number:(Q=w[3])>1?Q/255:Q,flags:1}]}if(0===c.length)throw new Error("Attempting to use unknown color in relative color 'from'");if("unknown"===i)throw new Error("Attempting to use unknown colorspace in relative color 'to'");var g=Ze[o],u=_e[i],l=We[i];if(void 0===g)throw new Error('Attempting to parse an unsupported color space "'.concat(o,'" for color() function'));if(void 0===u)throw new Error('Attempting to parse an unsupported color space "'.concat(i,'" for color() function'));var U=u(g(A,c)),C=s(U,t[3]),F=s(U,t[4]),h=s(U,t[5]),d=t.length>6&&6===t[6].type&&"/"===t[6].value&&XA(t[7])?t[7].number:1;if(null===C||null===F||null===h)throw new Error("Invalid relative color in color() function");return l([C,F,h,d])}},je=function(A,e){return Xe(A,NA.create(e).parseComponentValue())},ze={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},$e={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(JA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},At={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},et=function(A,e){var t=Xe(A,e[0]),r=e[1];return r&&$A(r)?{color:t,stop:r}:{color:t,stop:null}},tt=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=ee),null===r.stop&&(r.stop=re);for(var B=[],n=0,s=0;sn?B.push(i):B.push(n),n=i}else B.push(null)}var c=null;for(s=0;sA.optimumDistance)?{optimumCorner:e,optimumDistance:o}:A},{optimumDistance:B?1/0:-1/0,optimumCorner:null}).optimumCorner},st=function(A,e){var t=Qe(180),r=[];return qA(e).forEach(function(e,B){if(0===B){var n=e[0];if(20===n.type&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(t=ae(e));if(ce(n))return void(t=(ie(A,n)+Qe(270))%Qe(360))}var s=et(A,e);r.push(s)}),{angle:t,stops:r,type:1}},ot="closest-side",it="farthest-side",ct="closest-corner",at="farthest-corner",Qt="circle",wt="ellipse",gt="cover",ut="contain",lt=function(A,e){var t=0,r=3,B=[],n=[];return qA(e).forEach(function(e,s){var o=!0;if(0===s?o=e.reduce(function(A,e){if(JA(e))switch(e.value){case"center":return n.push(te),!1;case"top":case"left":return n.push(ee),!1;case"right":case"bottom":return n.push(re),!1}else if($A(e)||zA(e))return n.push(e),!1;return A},o):1===s&&(o=e.reduce(function(A,e){if(JA(e))switch(e.value){case Qt:return t=0,!1;case wt:return t=1,!1;case ut:case ot:return r=0,!1;case it:return r=1,!1;case ct:return r=2,!1;case gt:case at:return r=3,!1}else if(zA(e)||$A(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return A},o)),o){var i=et(A,e);B.push(i)}}),{size:r,shape:t,stops:B,position:n,type:2}},Ut=function(A,e){if(22===e.type){var t={url:e.value,type:0};return A.cache.addImage(e.value),t}if(18===e.type){var r=Ft[e.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'.concat(e.name,'"'));return r(A,e.values)}throw new Error("Unsupported image type ".concat(e.type))};var Ct,Ft={"linear-gradient":function(A,e){var t=Qe(180),r=[];return qA(e).forEach(function(e,B){if(0===B){var n=e[0];if(20===n.type&&"to"===n.value)return void(t=ae(e));if(ce(n))return void(t=ie(A,n))}var s=et(A,e);r.push(s)}),{angle:t,stops:r,type:1}},"-moz-linear-gradient":st,"-ms-linear-gradient":st,"-o-linear-gradient":st,"-webkit-linear-gradient":st,"radial-gradient":function(A,e){var t=0,r=3,B=[],n=[];return qA(e).forEach(function(e,s){var o=!0;if(0===s){var i=!1;o=e.reduce(function(A,e){if(i)if(JA(e))switch(e.value){case"center":return n.push(te),A;case"top":case"left":return n.push(ee),A;case"right":case"bottom":return n.push(re),A}else($A(e)||zA(e))&&n.push(e);else if(JA(e))switch(e.value){case Qt:return t=0,!1;case wt:return t=1,!1;case"at":return i=!0,!1;case ot:return r=0,!1;case gt:case it:return r=1,!1;case ut:case ct:return r=2,!1;case at:return r=3,!1}else if(zA(e)||$A(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return A},o)}if(o){var c=et(A,e);B.push(c)}}),{size:r,shape:t,stops:B,position:n,type:2}},"-moz-radial-gradient":lt,"-ms-radial-gradient":lt,"-o-radial-gradient":lt,"-webkit-radial-gradient":lt,"-webkit-gradient":function(A,e){var t=Qe(180),r=[],B=1;return qA(e).forEach(function(e,t){var n=e[0];if(0===t){if(JA(n)&&"linear"===n.value)return void(B=1);if(JA(n)&&"radial"===n.value)return void(B=2)}if(18===n.type)if("from"===n.name){var s=Xe(A,n.values[0]);r.push({stop:ee,color:s})}else if("to"===n.name){s=Xe(A,n.values[0]);r.push({stop:re,color:s})}else if("color-stop"===n.name){var o=n.values.filter(_A);if(2===o.length){s=Xe(A,o[1]);var i=o[0];XA(i)&&r.push({stop:{type:16,number:100*i.number,flags:i.flags},color:s})}}}),1===B?{angle:(t+Qe(180))%Qe(360),stops:r,type:B}:{size:3,shape:0,stops:r,position:[],type:B}}},ht={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e.filter(function(A){return _A(A)&&function(A){return!(20===A.type&&"none"===A.value||18===A.type&&!Ft[A.name])}(A)}).map(function(e){return Ut(A,e)})}},dt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(JA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ft={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return qA(e).map(function(A){return A.filter($A)}).map(Ae)}},pt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return qA(e).map(function(A){return A.filter(JA).map(function(A){return A.value}).join(" ")}).map(Ht)}},Ht=function(A){switch(A){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(Ct||(Ct={}));var Et,It={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(A,e){return qA(e).map(function(A){return A.filter(yt)})}},yt=function(A){return JA(A)||$A(A)},Kt=function(A){return{name:"border-".concat(A,"-color"),initialValue:"transparent",prefix:!1,type:3,format:"color"}},mt=Kt("top"),vt=Kt("right"),Lt=Kt("bottom"),bt=Kt("left"),Dt=function(A){return{name:"border-radius-".concat(A),initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return Ae(e.filter($A))}}},Mt=Dt("top-left"),xt=Dt("top-right"),St=Dt("bottom-right"),Tt=Dt("bottom-left"),Gt=function(A){return{name:"border-".concat(A,"-style"),initialValue:"solid",prefix:!1,type:2,parse:function(A,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Ot=Gt("top"),Vt=Gt("right"),kt=Gt("bottom"),Rt=Gt("left"),Nt=function(A){return{name:"border-".concat(A,"-width"),initialValue:"0",type:0,prefix:!1,parse:function(A,e){return PA(e)?e.number:0}}},Pt=Nt("top"),Xt=Nt("right"),Jt=Nt("bottom"),Yt=Nt("left"),Wt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Zt={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){return"rtl"===e?1:0}},_t={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(JA).reduce(function(A,e){return A|qt(e.value)},0)}},qt=function(A){switch(A){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},jt={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},zt={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(A,e){return 20===e.type&&"normal"===e.value?0:17===e.type||15===e.type?e.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(Et||(Et={}));var $t,Ar={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){return"strict"===e?Et.STRICT:Et.NORMAL}},er={name:"line-height",initialValue:"normal",prefix:!1,type:4},tr=function(A,e){return JA(A)&&"normal"===A.value?1.2*e:17===A.type?e*A.number:$A(A)?ne(A,e):e},rr={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(A,e){return 20===e.type&&"none"===e.value?null:Ut(A,e)}},Br={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(A,e){return"inside"===e?0:1}},nr={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 52;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},sr=function(A){return{name:"margin-".concat(A),initialValue:"0",prefix:!1,type:4}},or=sr("top"),ir=sr("right"),cr=sr("bottom"),ar=sr("left"),Qr={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(JA).map(function(A){switch(A.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},wr={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){return"break-word"===e?"break-word":"normal"}},gr=function(A){return{name:"padding-".concat(A),initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},ur=gr("top"),lr=gr("right"),Ur=gr("bottom"),Cr=gr("left"),Fr={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(A,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},hr={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(A,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},dr={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return 1===e.length&&WA(e[0],"none")?[]:qA(e).map(function(e){for(var t={color:ze.TRANSPARENT,offsetX:ee,offsetY:ee,blur:ee},r=0,B=0;B1?1:0],this.overflowWrap=eB(A,wr,e.overflowWrap),this.paddingTop=eB(A,ur,e.paddingTop),this.paddingRight=eB(A,lr,e.paddingRight),this.paddingBottom=eB(A,Ur,e.paddingBottom),this.paddingLeft=eB(A,Cr,e.paddingLeft),this.paintOrder=eB(A,Wr,e.paintOrder),this.position=eB(A,hr,e.position),this.textAlign=eB(A,Fr,e.textAlign),this.textDecorationColor=eB(A,Dr,null!==(t=e.textDecorationColor)&&void 0!==t?t:e.color),this.textDecorationLine=eB(A,Mr,null!==(r=e.textDecorationLine)&&void 0!==r?r:e.textDecoration),this.textShadow=eB(A,dr,e.textShadow),this.textTransform=eB(A,fr,e.textTransform),this.transform=eB(A,pr,e.transform),this.transformOrigin=eB(A,yr,e.transformOrigin),this.visibility=eB(A,Kr,e.visibility),this.webkitTextStrokeColor=eB(A,Zr,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=eB(A,_r,e.webkitTextStrokeWidth),this.wordBreak=eB(A,mr,e.wordBreak),this.zIndex=eB(A,vr,e.zIndex),this.objectFit=eB(A,qr,e.objectFit)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},A.prototype.isTransparent=function(){return we(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return 0!==this.position},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return 0!==this.float},A.prototype.isInlineLevel=function(){return Vr(this.display,4)||Vr(this.display,33554432)||Vr(this.display,268435456)||Vr(this.display,536870912)||Vr(this.display,67108864)||Vr(this.display,134217728)},A}(),$r=function(A,e){this.content=eB(A,kr,e.content),this.quotes=eB(A,Xr,e.quotes)},AB=function(A,e){this.counterIncrement=eB(A,Rr,e.counterIncrement),this.counterReset=eB(A,Nr,e.counterReset)},eB=function(A,e,t){var r=new RA,B=null!=t?t.toString():e.initialValue;r.write(B);var n=new NA(r.read());switch(e.type){case 2:var s=n.parseComponentValue();return e.parse(A,JA(s)?s.value:e.initialValue);case 0:return e.parse(A,n.parseComponentValue());case 1:return e.parse(A,n.parseComponentValues());case 4:return n.parseComponentValue();case 3:switch(e.format){case"angle":return ie(A,n.parseComponentValue());case"color":return Xe(A,n.parseComponentValue());case"image":return Ut(A,n.parseComponentValue());case"length":var o=n.parseComponentValue();return zA(o)?o:ee;case"length-percentage":var i=n.parseComponentValue();return $A(i)?i:ee;case"time":return Lr(A,n.parseComponentValue())}}},tB=function(A,e){var t=function(A){switch(A.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(A);return 1===t||e===t},rB=function(A,e){this.context=A,this.textNodes=[],this.elements=[],this.flags=0,tB(e,3),this.styles=new zr(A,window.getComputedStyle(e,null)),on(e)&&(this.styles.animationDuration.some(function(A){return A>0})&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=o(this.context,e),tB(e,4)&&(this.flags|=16)},BB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nB="undefined"==typeof Uint8Array?[]:new Uint8Array(256),sB=0;sB<64;sB++)nB[BB.charCodeAt(sB)]=sB;for(var oB=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},iB=function(){function A(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}return A.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),cB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",aB="undefined"==typeof Uint8Array?[]:new Uint8Array(256),QB=0;QB<64;QB++)aB[cB.charCodeAt(QB)]=QB;var wB,gB=8,uB=9,lB=11,UB=12,CB=function(){for(var A=[],e=0;e>10),s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},FB=function(A){var e,t,r,B=function(A){var e,t,r,B,n,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),a=Array.isArray(c)?c:new Uint8Array(c);for(e=0;e>4,a[i++]=(15&r)<<4|B>>2,a[i++]=(3&B)<<6|63&n;return c}(A),n=Array.isArray(B)?function(A){for(var e=A.length,t=[],r=0;r=55296&&B<=56319&&t=t)return{done:!0,value:null};for(var A=hB;rs.x||B.y>s.y;return s=B,0===e||o});return A.body.removeChild(e),o}(document);return Object.defineProperty(yB,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),t.toDataURL()}catch(A){return!1}return!0}(document);return Object.defineProperty(yB,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(A){var e=A.createElement("canvas"),t=100;e.width=t,e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var B=new Image,n=e.toDataURL();B.src=n;var s=EB(t,t,0,0,B);return r.fillStyle="red",r.fillRect(0,0,t,t),IB(s).then(function(e){r.drawImage(e,0,0);var B=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var s=A.createElement("div");return s.style.backgroundImage="url(".concat(n,")"),s.style.height="".concat(t,"px"),HB(B)?IB(EB(t,t,0,0,s)):Promise.reject(!1)}).then(function(A){return r.drawImage(A,0,0),HB(r.getImageData(0,0,t,t).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(yB,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(yB,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(yB,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(yB,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(yB,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}},KB=function(A,e){this.text=A,this.bounds=e},mB=function(A,e){var t=e.ownerDocument;if(t){var r=t.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var B=e.parentNode;if(B){B.replaceChild(r,e);var n=o(A,r);return r.firstChild&&B.replaceChild(r.firstChild,r),n}}return s.EMPTY},vB=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var B=r.createRange();return B.setStart(A,e),B.setEnd(A,e+t),B},LB=function(A){if(yB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(A)).map(function(A){return A.segment})}return function(A){for(var e,t=pB(A),r=[];!(e=t.next()).done;)e.value&&r.push(e.value.slice());return r}(A)},bB=function(A,e){return 0!==e.letterSpacing?LB(A):function(A,e){if(yB.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(A)).map(function(A){return A.segment})}return MB(A,e)}(A,e)},DB=[32,160,4961,65792,65793,4153,4241],MB=function(A,e){for(var t,r=function(A,e){var t=i(A),r=nA(t,e),B=r[0],n=r[1],s=r[2],o=t.length,c=0,a=0;return{next:function(){if(a>=o)return{done:!0,value:null};for(var A=Y;a0)if(yB.SUPPORT_RANGE_BOUNDS){var B=vB(r,o,e.length).getClientRects();if(B.length>1){var i=LB(e),c=0;i.forEach(function(e){n.push(new KB(e,s.fromDOMRectList(A,vB(r,c+o,e.length).getClientRects()))),c+=e.length})}else n.push(new KB(e,s.fromDOMRectList(A,B)))}else{var a=r.splitText(e.length);n.push(new KB(e,mB(A,r))),r=a}else yB.SUPPORT_RANGE_BOUNDS||(r=r.splitText(e.length));o+=e.length}),n}(A,this.text,t,e)},SB=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(TB,GB);case 2:return A.toUpperCase();default:return A}},TB=/(^|\s|:|-|\(|\))([a-z])/g,GB=function(A,e,t){return A.length>0?e+t.toUpperCase():A},OB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.src=t.currentSrc||t.src,r.intrinsicWidth=t.naturalWidth,r.intrinsicHeight=t.naturalHeight,r.context.cache.addImage(r.src),r}return e(t,A),t}(rB),VB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.canvas=t,r.intrinsicWidth=t.width,r.intrinsicHeight=t.height,r}return e(t,A),t}(rB),kB=function(A){function t(e,t){var r=A.call(this,e,t)||this,B=new XMLSerializer,n=o(e,t);return t.setAttribute("width","".concat(n.width,"px")),t.setAttribute("height","".concat(n.height,"px")),r.svg="data:image/svg+xml,".concat(encodeURIComponent(B.serializeToString(t))),r.intrinsicWidth=t.width.baseVal.value,r.intrinsicHeight=t.height.baseVal.value,r.context.cache.addImage(r.svg),r}return e(t,A),t}(rB),RB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.value=t.value,r}return e(t,A),t}(rB),NB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.start=t.start,r.reversed="boolean"==typeof t.reversed&&!0===t.reversed,r}return e(t,A),t}(rB),PB=[{type:15,flags:0,unit:"px",number:3}],XB=[{type:16,flags:0,number:50}],JB="checkbox",YB="radio",WB="password",ZB=707406591,_B=function(A){function t(e,t){var r,B,n,o=A.call(this,e,t)||this;switch(o.type=t.type.toLowerCase(),o.checked=t.checked,o.value=0===(B=(r=t).type===WB?new Array(r.value.length+1).join("•"):r.value).length?r.placeholder||"":B,o.type!==JB&&o.type!==YB||(o.styles.backgroundColor=3739148031,o.styles.borderTopColor=o.styles.borderRightColor=o.styles.borderBottomColor=o.styles.borderLeftColor=2779096575,o.styles.borderTopWidth=o.styles.borderRightWidth=o.styles.borderBottomWidth=o.styles.borderLeftWidth=1,o.styles.borderTopStyle=o.styles.borderRightStyle=o.styles.borderBottomStyle=o.styles.borderLeftStyle=1,o.styles.backgroundClip=[0],o.styles.backgroundOrigin=[0],o.bounds=(n=o.bounds).width>n.height?new s(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width0)t.textNodes.push(new xB(A,B,t.styles));else if(sn(B))if(pn(B)&&B.assignedNodes)B.assignedNodes().forEach(function(e){return An(A,e,t,r)});else{var s=en(A,B);s.styles.isVisible()&&(rn(B,s,r)?s.flags|=4:Bn(s.styles)&&(s.flags|=2),-1!==$B.indexOf(B.tagName)&&(s.flags|=8),t.elements.push(s),B.slot,B.shadowRoot?An(A,B.shadowRoot,s,r):dn(B)||gn(B)||fn(B)||An(A,B,s,r))}},en=function(A,e){return Cn(e)?new OB(A,e):ln(e)?new VB(A,e):gn(e)?new kB(A,e):an(e)?new RB(A,e):Qn(e)?new NB(A,e):wn(e)?new _B(A,e):fn(e)?new qB(A,e):dn(e)?new jB(A,e):Fn(e)?new zB(A,e):new rB(A,e)},tn=function(A,e){var t=en(A,e);return t.flags|=4,An(A,e,t,t),t},rn=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||un(A)&&t.styles.isTransparent()},Bn=function(A){return A.isPositioned()||A.isFloating()},nn=function(A){return A.nodeType===Node.TEXT_NODE},sn=function(A){return A.nodeType===Node.ELEMENT_NODE},on=function(A){return sn(A)&&void 0!==A.style&&!cn(A)},cn=function(A){return"object"==typeof A.className},an=function(A){return"LI"===A.tagName},Qn=function(A){return"OL"===A.tagName},wn=function(A){return"INPUT"===A.tagName},gn=function(A){return"svg"===A.tagName},un=function(A){return"BODY"===A.tagName},ln=function(A){return"CANVAS"===A.tagName},Un=function(A){return"VIDEO"===A.tagName},Cn=function(A){return"IMG"===A.tagName},Fn=function(A){return"IFRAME"===A.tagName},hn=function(A){return"STYLE"===A.tagName},dn=function(A){return"TEXTAREA"===A.tagName},fn=function(A){return"SELECT"===A.tagName},pn=function(A){return"SLOT"===A.tagName},Hn=function(A){return A.tagName.indexOf("-")>0},En=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},A.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,B=!0;null!==t&&t.forEach(function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(B=!1,t.length||t.push(1),t[Math.max(0,t.length-1)]+=A.increment)});var n=[];return B&&r.forEach(function(A){var t=e.counters[A.counter];n.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)}),n},A}(),In={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"]},yn={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Kn={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},mn={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},vn=function(A,e,t,r,B,n){return At?On(A,B,n.length>0):r.integers.reduce(function(e,t,B){for(;A>=t;)A-=t,e+=r.values[B];return e},"")+n},Ln=function(A,e,t,r){var B="";do{t||A--,B=r(A)+B,A/=e}while(A*e>=e);return B},bn=function(A,e,t,r,B){var n=t-e+1;return(A<0?"-":"")+(Ln(Math.abs(A),n,r,function(A){return c(Math.floor(A%n)+e)})+B)},Dn=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return Ln(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},Mn=function(A,e,t,r,B,n){if(A<-9999||A>9999)return On(A,4,B.length>0);var s=Math.abs(A),o=B;if(0===s)return e[0]+o;for(var i=0;s>0&&i<=4;i++){var c=s%10;0===c&&Vr(n,1)&&""!==o?o=e[c]+o:c>1||1===c&&0===i||1===c&&1===i&&Vr(n,2)||1===c&&1===i&&Vr(n,4)&&A>100||1===c&&i>1&&Vr(n,8)?o=e[c]+(i>0?t[i-1]:"")+o:1===c&&i>0&&(o=t[i-1]+o),s=Math.floor(s/10)}return(A<0?r:"")+o},xn="十百千萬",Sn="拾佰仟萬",Tn="マイナス",Gn="마이너스",On=function(A,e,t){var r=t?". ":"",B=t?"、":"",n=t?", ":"",s=t?" ":"";switch(e){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var o=bn(A,48,57,!0,r);return o.length<4?"0".concat(o):o;case 4:return Dn(A,"〇一二三四五六七八九",B);case 6:return vn(A,1,3999,In,3,r).toLowerCase();case 7:return vn(A,1,3999,In,3,r);case 8:return bn(A,945,969,!1,r);case 9:return bn(A,97,122,!1,r);case 10:return bn(A,65,90,!1,r);case 11:return bn(A,1632,1641,!0,r);case 12:case 49:return vn(A,1,9999,yn,3,r);case 35:return vn(A,1,9999,yn,3,r).toLowerCase();case 13:return bn(A,2534,2543,!0,r);case 14:case 30:return bn(A,6112,6121,!0,r);case 15:return Dn(A,"子丑寅卯辰巳午未申酉戌亥",B);case 16:return Dn(A,"甲乙丙丁戊己庚辛壬癸",B);case 17:case 48:return Mn(A,"零一二三四五六七八九",xn,"負",B,14);case 47:return Mn(A,"零壹貳參肆伍陸柒捌玖",Sn,"負",B,15);case 42:return Mn(A,"零一二三四五六七八九",xn,"负",B,14);case 41:return Mn(A,"零壹贰叁肆伍陆柒捌玖",Sn,"负",B,15);case 26:return Mn(A,"〇一二三四五六七八九","十百千万",Tn,B,0);case 25:return Mn(A,"零壱弐参四伍六七八九","拾百千万",Tn,B,7);case 31:return Mn(A,"영일이삼사오육칠팔구","십백천만",Gn,n,7);case 33:return Mn(A,"零一二三四五六七八九","十百千萬",Gn,n,0);case 32:return Mn(A,"零壹貳參四五六七八九","拾百千",Gn,n,7);case 18:return bn(A,2406,2415,!0,r);case 20:return vn(A,1,19999,mn,3,r);case 21:return bn(A,2790,2799,!0,r);case 22:return bn(A,2662,2671,!0,r);case 52:return vn(A,1,10999,Kn,3,r);case 23:return Dn(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Dn(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return bn(A,3302,3311,!0,r);case 28:return Dn(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",B);case 29:return Dn(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",B);case 34:return bn(A,3792,3801,!0,r);case 37:return bn(A,6160,6169,!0,r);case 38:return bn(A,4160,4169,!0,r);case 39:return bn(A,2918,2927,!0,r);case 40:return bn(A,1776,1785,!0,r);case 43:return bn(A,3046,3055,!0,r);case 44:return bn(A,3174,3183,!0,r);case 45:return bn(A,3664,3673,!0,r);case 46:return bn(A,3872,3881,!0,r);default:return bn(A,48,57,!0,r)}},Vn="data-html2canvas-ignore",kn=function(){function A(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new En,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return A.prototype.toIFrame=function(A,e){var t=this,n=Nn(A,e);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var s=A.defaultView.pageXOffset,o=A.defaultView.pageYOffset,i=n.contentWindow,c=i.document,a=Jn(n).then(function(){return r(t,void 0,void 0,function(){var A,t;return B(this,function(r){switch(r.label){case 0:return this.scrolledElements.forEach(qn),i&&(i.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||i.scrollY===e.top&&i.scrollX===e.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(i.scrollX-e.left,i.scrollY-e.top,0,0))),A=this.options.onclone,void 0===(t=this.clonedReferenceElement)?[2,Promise.reject("Error finding the ".concat(this.referenceElement.nodeName," in the cloned document"))]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Xn(c)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof A?[2,Promise.resolve().then(function(){return A(c,t)}).then(function(){return n})]:[2,n]}})})}),Q=c.adoptNode(this.documentElement);return ts(Q,c),c.open(),c.write("".concat(Zn(document.doctype),"")),_n(this.referenceElement.ownerDocument,s,o),c.replaceChild(Q,c.documentElement),c.close(),a},A.prototype.createElementClone=function(A){if(tB(A,2),ln(A))return this.createCanvasClone(A);if(Un(A))return this.createVideoClone(A);if(hn(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return Cn(e)&&(Cn(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),Hn(e)?this.createCustomElementClone(e):e},A.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");return Wn(A.style,e),e},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A},""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(A){if(this.context.logger.error("Unable to access cssRules property",A),"SecurityError"!==A.name)throw A}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){var e;if(this.options.inlineImages&&A.ownerDocument){var t=A.ownerDocument.createElement("img");try{return t.src=A.toDataURL(),t}catch(e){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var r=A.cloneNode(!1);try{r.width=A.width,r.height=A.height;var B=A.getContext("2d"),n=r.getContext("2d",{willReadFrequently:!0});if(n)if(!this.options.allowTaint&&B)n.putImageData(B.getImageData(0,0,A.width,A.height),0,0);else{var s=null!==(e=A.getContext("webgl2"))&&void 0!==e?e:A.getContext("webgl");if(s){var o=s.getContextAttributes();!1===(null==o?void 0:o.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}n.drawImage(A,0,0)}return r}catch(e){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return r},A.prototype.createVideoClone=function(A){var e=A.ownerDocument.createElement("canvas");e.width=A.offsetWidth,e.height=A.offsetHeight;var t=e.getContext("2d");try{return t&&(t.drawImage(A,0,0,e.width,e.height),this.options.allowTaint||t.getImageData(0,0,e.width,e.height)),e}catch(e){this.context.logger.info("Unable to clone video as it is tainted",A)}var r=A.ownerDocument.createElement("canvas");return r.width=A.offsetWidth,r.height=A.offsetHeight,r},A.prototype.appendChildNode=function(A,e,t){sn(e)&&("SCRIPT"===e.tagName||e.hasAttribute(Vn)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&sn(e)&&hn(e)||A.appendChild(this.cloneNode(e,t))},A.prototype.cloneChildNodes=function(A,e,t){for(var r=this,B=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;B;B=B.nextSibling)if(sn(B)&&pn(B)&&"function"==typeof B.assignedNodes){var n=B.assignedNodes();n.length&&n.forEach(function(A){return r.appendChildNode(e,A,t)})}else this.appendChildNode(e,B,t)},A.prototype.cloneNode=function(A,e){if(nn(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&sn(A)&&(on(A)||cn(A))){var r=this.createElementClone(A);r.style.transitionProperty="none";var B=t.getComputedStyle(A),n=t.getComputedStyle(A,":before"),s=t.getComputedStyle(A,":after");this.referenceElement===A&&on(r)&&(this.clonedReferenceElement=r),un(r)&&As(r);var o=this.counters.parse(new AB(this.context,B)),i=this.resolvePseudoContent(A,r,n,wB.BEFORE);Hn(A)&&(e=!0),Un(A)||this.cloneChildNodes(A,r,e),i&&r.insertBefore(i,r.firstChild);var c=this.resolvePseudoContent(A,r,s,wB.AFTER);return c&&r.appendChild(c),this.counters.pop(o),(B&&(this.options.copyStyles||cn(A))&&!Fn(A)||e)&&Wn(B,r),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([r,A.scrollLeft,A.scrollTop]),(dn(A)||fn(A))&&(dn(r)||fn(r))&&(r.value=A.value),r}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var B=this;if(t){var n=t.content,s=e.ownerDocument;if(s&&n&&"none"!==n&&"-moz-alt-content"!==n&&"none"!==t.display){this.counters.parse(new AB(this.context,t));var o=new $r(this.context,t),i=s.createElement("html2canvaspseudoelement");Wn(t,i),o.content.forEach(function(e){if(0===e.type)i.appendChild(s.createTextNode(e.value));else if(22===e.type){var t=s.createElement("img");t.src=e.value,t.style.opacity="1",i.appendChild(t)}else if(18===e.type){if("attr"===e.name){var r=e.values.filter(JA);r.length&&i.appendChild(s.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var n=e.values.filter(_A),c=n[0],a=n[1];if(c&&JA(c)){var Q=B.counters.getCounterValue(c.value),w=a&&JA(a)?nr.parse(B.context,a.value):3;i.appendChild(s.createTextNode(On(Q,w,!1)))}}else if("counters"===e.name){var g=e.values.filter(_A),u=(c=g[0],g[1]);a=g[2];if(c&&JA(c)){var l=B.counters.getCounterValues(c.value),U=a&&JA(a)?nr.parse(B.context,a.value):3,C=u&&0===u.type?u.value:"",F=l.map(function(A){return On(A,U,!1)}).join(C);i.appendChild(s.createTextNode(F))}}}else if(20===e.type)switch(e.value){case"open-quote":i.appendChild(s.createTextNode(Jr(o.quotes,B.quoteDepth++,!0)));break;case"close-quote":i.appendChild(s.createTextNode(Jr(o.quotes,--B.quoteDepth,!1)));break;default:i.appendChild(s.createTextNode(e.value))}}),i.className="".concat(jn," ").concat(zn);var c=r===wB.BEFORE?" ".concat(jn):" ".concat(zn);return cn(e)?e.className.baseValue+=c:e.className+=c,i}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(wB||(wB={}));var Rn,Nn=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(Vn,"true"),A.body.appendChild(t),t},Pn=function(A){return new Promise(function(e){A.complete?e():A.src?(A.onload=e,A.onerror=e):e()})},Xn=function(A){return Promise.all([].slice.call(A.images,0).map(Pn))},Jn=function(A){return new Promise(function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var B=r.document;r.onload=A.onload=function(){r.onload=A.onload=null;var t=setInterval(function(){B.body.childNodes.length>0&&"complete"===B.readyState&&(clearInterval(t),e(A))},50)}})},Yn=["all","d","content"],Wn=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);-1===Yn.indexOf(r)&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Zn=function(A){var e="";return A&&(e+=""),e},_n=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},qn=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},jn="___html2canvas___pseudoelement_before",zn="___html2canvas___pseudoelement_after",$n='{\n content: "" !important;\n display: none !important;\n}',As=function(A){es(A,".".concat(jn).concat(":before").concat($n,"\n .").concat(zn).concat(":after").concat($n))},es=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},ts=function(A,e){var t,r=e.createElement("base");r.href=e.baseURI;var B=A.getElementsByTagName("head").item(0);null==B||B.insertBefore(r,null!==(t=null==B?void 0:B.firstChild)&&void 0!==t?t:null)},rs=function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A}(),Bs=function(){function A(A,e){this.context=A,this._options=e,this._cache={}}return A.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)?e:Qs(A)||is(A)?((this._cache[A]=this.loadImage(A)).catch(function(){}),e):e},A.prototype.match=function(A){return this._cache[A]},A.prototype.loadImage=function(A){return r(this,void 0,void 0,function(){var e,t,r,n,s,o=this;return B(this,function(B){switch(B.label){case 0:return"function"!=typeof this._options.customIsSameOrigin?[3,2]:[4,this._options.customIsSameOrigin(A,rs.isSameOrigin)];case 1:return t=B.sent(),[3,3];case 2:t=rs.isSameOrigin(A),B.label=3;case 3:return e=t,r=!cs(A)&&!0===this._options.useCORS&&yB.SUPPORT_CORS_IMAGES&&!e,n=!cs(A)&&!e&&!Qs(A)&&"string"==typeof this._options.proxy&&yB.SUPPORT_CORS_XHR&&!r,e||!1!==this._options.allowTaint||cs(A)||Qs(A)||n||r?(s=A,n?[4,this.proxy(s)]:[3,5]):[2];case 4:s=B.sent(),B.label=5;case 5:return this.context.logger.debug("Added image ".concat(A.substring(0,256))),[4,new Promise(function(A,e){var t=new Image;t.onload=function(){return A(t)},t.onerror=e,(as(s)||r)&&(t.crossOrigin="anonymous"),t.src=s,!0===t.complete&&setTimeout(function(){return A(t)},500),o._options.imageTimeout>0&&setTimeout(function(){return e("Timed out (".concat(o._options.imageTimeout,"ms) loading image"))},o._options.imageTimeout)})];case 6:return[2,B.sent()]}})})},A.prototype.has=function(A){return void 0!==this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(B,n){var s=yB.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(200===o.status)if("text"===s)B(o.response);else{var A=new FileReader;A.addEventListener("load",function(){return B(A.result)},!1),A.addEventListener("error",function(A){return n(A)},!1),A.readAsDataURL(o.response)}else n("Failed to proxy resource ".concat(r," with status code ").concat(o.status))},o.onerror=n;var i=t.indexOf("?")>-1?"&":"?";if(o.open("GET","".concat(t).concat(i,"url=").concat(encodeURIComponent(A),"&responseType=").concat(s)),"text"!==s&&o instanceof XMLHttpRequest&&(o.responseType=s),e._options.imageTimeout){var c=e._options.imageTimeout;o.timeout=c,o.ontimeout=function(){return n("Timed out (".concat(c,"ms) proxying ").concat(r))}}o.send()})},A}(),ns=/^data:image\/svg\+xml/i,ss=/^data:image\/.*;base64,/i,os=/^data:image\/.*/i,is=function(A){return yB.SUPPORT_SVG_DRAWING||!ws(A)},cs=function(A){return os.test(A)},as=function(A){return ss.test(A)},Qs=function(A){return"blob"===A.substr(0,4)},ws=function(A){return"svg"===A.substr(-3).toLowerCase()||ns.test(A)},gs=function(){function A(A,e){this.type=0,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),us=function(A,e,t){return new gs(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},ls=function(){function A(A,e,t,r){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=us(this.start,this.startControl,e),B=us(this.startControl,this.endControl,e),n=us(this.endControl,this.end,e),s=us(r,B,e),o=us(B,n,e),i=us(s,o,e);return t?new A(this.start,r,s,i):new A(i,o,n,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),Us=function(A){return 1===A.type},Cs=function(A){var e=A.styles,t=A.bounds,r=Be(e.borderTopLeftRadius,t.width,t.height),B=r[0],n=r[1],s=Be(e.borderTopRightRadius,t.width,t.height),o=s[0],i=s[1],c=Be(e.borderBottomRightRadius,t.width,t.height),a=c[0],Q=c[1],w=Be(e.borderBottomLeftRadius,t.width,t.height),g=w[0],u=w[1],l=[];l.push((B+o)/t.width),l.push((g+a)/t.width),l.push((n+u)/t.height),l.push((i+Q)/t.height);var U=Math.max.apply(Math,l);U>1&&(B/=U,n/=U,o/=U,i/=U,a/=U,Q/=U,g/=U,u/=U);var C=t.width-o,F=t.height-Q,h=t.width-a,d=t.height-u,f=e.borderTopWidth,p=e.borderRightWidth,H=e.borderBottomWidth,E=e.borderLeftWidth,I=ne(e.paddingTop,A.bounds.width),y=ne(e.paddingRight,A.bounds.width),K=ne(e.paddingBottom,A.bounds.width),m=ne(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=B>0||n>0?Fs(t.left+E/3,t.top+f/3,B-E/3,n-f/3,Rn.TOP_LEFT):new gs(t.left+E/3,t.top+f/3),this.topRightBorderDoubleOuterBox=B>0||n>0?Fs(t.left+C,t.top+f/3,o-p/3,i-f/3,Rn.TOP_RIGHT):new gs(t.left+t.width-p/3,t.top+f/3),this.bottomRightBorderDoubleOuterBox=a>0||Q>0?Fs(t.left+h,t.top+F,a-p/3,Q-H/3,Rn.BOTTOM_RIGHT):new gs(t.left+t.width-p/3,t.top+t.height-H/3),this.bottomLeftBorderDoubleOuterBox=g>0||u>0?Fs(t.left+E/3,t.top+d,g-E/3,u-H/3,Rn.BOTTOM_LEFT):new gs(t.left+E/3,t.top+t.height-H/3),this.topLeftBorderDoubleInnerBox=B>0||n>0?Fs(t.left+2*E/3,t.top+2*f/3,B-2*E/3,n-2*f/3,Rn.TOP_LEFT):new gs(t.left+2*E/3,t.top+2*f/3),this.topRightBorderDoubleInnerBox=B>0||n>0?Fs(t.left+C,t.top+2*f/3,o-2*p/3,i-2*f/3,Rn.TOP_RIGHT):new gs(t.left+t.width-2*p/3,t.top+2*f/3),this.bottomRightBorderDoubleInnerBox=a>0||Q>0?Fs(t.left+h,t.top+F,a-2*p/3,Q-2*H/3,Rn.BOTTOM_RIGHT):new gs(t.left+t.width-2*p/3,t.top+t.height-2*H/3),this.bottomLeftBorderDoubleInnerBox=g>0||u>0?Fs(t.left+2*E/3,t.top+d,g-2*E/3,u-2*H/3,Rn.BOTTOM_LEFT):new gs(t.left+2*E/3,t.top+t.height-2*H/3),this.topLeftBorderStroke=B>0||n>0?Fs(t.left+E/2,t.top+f/2,B-E/2,n-f/2,Rn.TOP_LEFT):new gs(t.left+E/2,t.top+f/2),this.topRightBorderStroke=B>0||n>0?Fs(t.left+C,t.top+f/2,o-p/2,i-f/2,Rn.TOP_RIGHT):new gs(t.left+t.width-p/2,t.top+f/2),this.bottomRightBorderStroke=a>0||Q>0?Fs(t.left+h,t.top+F,a-p/2,Q-H/2,Rn.BOTTOM_RIGHT):new gs(t.left+t.width-p/2,t.top+t.height-H/2),this.bottomLeftBorderStroke=g>0||u>0?Fs(t.left+E/2,t.top+d,g-E/2,u-H/2,Rn.BOTTOM_LEFT):new gs(t.left+E/2,t.top+t.height-H/2),this.topLeftBorderBox=B>0||n>0?Fs(t.left,t.top,B,n,Rn.TOP_LEFT):new gs(t.left,t.top),this.topRightBorderBox=o>0||i>0?Fs(t.left+C,t.top,o,i,Rn.TOP_RIGHT):new gs(t.left+t.width,t.top),this.bottomRightBorderBox=a>0||Q>0?Fs(t.left+h,t.top+F,a,Q,Rn.BOTTOM_RIGHT):new gs(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=g>0||u>0?Fs(t.left,t.top+d,g,u,Rn.BOTTOM_LEFT):new gs(t.left,t.top+t.height),this.topLeftPaddingBox=B>0||n>0?Fs(t.left+E,t.top+f,Math.max(0,B-E),Math.max(0,n-f),Rn.TOP_LEFT):new gs(t.left+E,t.top+f),this.topRightPaddingBox=o>0||i>0?Fs(t.left+Math.min(C,t.width-p),t.top+f,C>t.width+p?0:Math.max(0,o-p),Math.max(0,i-f),Rn.TOP_RIGHT):new gs(t.left+t.width-p,t.top+f),this.bottomRightPaddingBox=a>0||Q>0?Fs(t.left+Math.min(h,t.width-E),t.top+Math.min(F,t.height-H),Math.max(0,a-p),Math.max(0,Q-H),Rn.BOTTOM_RIGHT):new gs(t.left+t.width-p,t.top+t.height-H),this.bottomLeftPaddingBox=g>0||u>0?Fs(t.left+E,t.top+Math.min(d,t.height-H),Math.max(0,g-E),Math.max(0,u-H),Rn.BOTTOM_LEFT):new gs(t.left+E,t.top+t.height-H),this.topLeftContentBox=B>0||n>0?Fs(t.left+E+m,t.top+f+I,Math.max(0,B-(E+m)),Math.max(0,n-(f+I)),Rn.TOP_LEFT):new gs(t.left+E+m,t.top+f+I),this.topRightContentBox=o>0||i>0?Fs(t.left+Math.min(C,t.width+E+m),t.top+f+I,C>t.width+E+m?0:o-E+m,i-(f+I),Rn.TOP_RIGHT):new gs(t.left+t.width-(p+y),t.top+f+I),this.bottomRightContentBox=a>0||Q>0?Fs(t.left+Math.min(h,t.width-(E+m)),t.top+Math.min(F,t.height+f+I),Math.max(0,a-(p+y)),Q-(H+K),Rn.BOTTOM_RIGHT):new gs(t.left+t.width-(p+y),t.top+t.height-(H+K)),this.bottomLeftContentBox=g>0||u>0?Fs(t.left+E+m,t.top+d,Math.max(0,g-(E+m)),u-(H+K),Rn.BOTTOM_LEFT):new gs(t.left+E+m,t.top+t.height-(H+K))};!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Rn||(Rn={}));var Fs=function(A,e,t,r,B){var n=(Math.sqrt(2)-1)/3*4,s=t*n,o=r*n,i=A+t,c=e+r;switch(B){case Rn.TOP_LEFT:return new ls(new gs(A,c),new gs(A,c-o),new gs(i-s,e),new gs(i,e));case Rn.TOP_RIGHT:return new ls(new gs(A,e),new gs(A+s,e),new gs(i,c-o),new gs(i,c));case Rn.BOTTOM_RIGHT:return new ls(new gs(i,e),new gs(i,e+o),new gs(A+s,c),new gs(A,c));case Rn.BOTTOM_LEFT:default:return new ls(new gs(i,c),new gs(i-s,c),new gs(A,e+o),new gs(A,e))}},hs=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},ds=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},fs=function(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6},ps=function(A,e){this.path=A,this.target=e,this.type=1},Hs=function(A){this.opacity=A,this.type=2,this.target=6},Es=function(A){return 1===A.type},Is=function(A,e){return A.length===e.length&&A.some(function(A,t){return A===e[t]})},ys=function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Ks=function(){function A(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new Cs(this.container),this.container.styles.opacity<1&&this.effects.push(new Hs(this.container.styles.opacity)),null!==this.container.styles.transform){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,B=this.container.styles.transform;this.effects.push(new fs(t,r,B))}if(0!==this.container.styles.overflowX){var n=hs(this.curves),s=ds(this.curves);Is(n,s)?this.effects.push(new ps(n,6)):(this.effects.push(new ps(n,2)),this.effects.push(new ps(s,4)))}}return A.prototype.getEffects=function(A){for(var e=-1===[2,3].indexOf(this.container.styles.position),t=this.parent,r=this.effects.slice(0);t;){var B=t.effects.filter(function(A){return!Es(A)});if(e||0!==t.container.styles.position||!t.parent){if(e=-1===[2,3].indexOf(t.container.styles.position),0!==t.container.styles.overflowX){var n=hs(t.curves),s=ds(t.curves);Is(n,s)||r.unshift(new ps(s,6))}r.unshift.apply(r,B)}else r.unshift.apply(r,B);t=t.parent}return r.filter(function(e){return Vr(e.target,A)})},A}(),ms=function(A,e,t,r){A.container.elements.forEach(function(B){var n=Vr(B.flags,4),s=Vr(B.flags,2),o=new Ks(B,A);Vr(B.styles.display,2048)&&r.push(o);var i=Vr(B.flags,8)?[]:r;if(n||s){var c=n||B.styles.isPositioned()?t:e,a=new ys(o);if(B.styles.isPositioned()||B.styles.opacity<1||B.styles.isTransformed()){var Q=B.styles.zIndex.order;if(Q<0){var w=0;c.negativeZIndex.some(function(A,e){return Q>A.element.container.styles.zIndex.order?(w=e,!1):w>0}),c.negativeZIndex.splice(w,0,a)}else if(Q>0){var g=0;c.positiveZIndex.some(function(A,e){return Q>=A.element.container.styles.zIndex.order?(g=e+1,!1):g>0}),c.positiveZIndex.splice(g,0,a)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(a)}else B.styles.isFloating()?c.nonPositionedFloats.push(a):c.nonPositionedInlineLevel.push(a);ms(o,a,n?a:t,i)}else B.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),ms(o,e,t,i);Vr(B.flags,8)&&vs(B,i)})},vs=function(A,e){for(var t=A instanceof NB?A.start:1,r=A instanceof NB&&A.reversed,B=0;B0&&B>0){var n=xs(A),s=ds(e);this.path(s),this.ctx.save(),this.ctx.clip();var o=0,i=0,c=r,a=B,Q=n.left,w=n.top,g=n.width,u=n.height,l=A.styles.objectFit,U=g/u,C=c/a;if(2===l)C>U?(u=g/C,w+=(n.height-u)/2):(g=u*C,Q+=(n.width-g)/2);else if(4===l)C>U?o+=(r-(c=a*U))/2:i+=(B-(a=c/U))/2;else if(8===l)c>g?(o+=(c-g)/2,c=g):(Q+=(g-c)/2,g=c),a>u?(i+=(a-u)/2,a=u):(w+=(u-a)/2,u=a);else if(16===l){(C>U?g:u*C)<(c>g?c:g)?C>U?(u=g/C,w+=(n.height-u)/2):(g=u*C,Q+=(n.width-g)/2):(c>g?(o+=(c-g)/2,c=g):(Q+=(g-c)/2,g=c),a>u?(i+=(a-u)/2,a=u):(w+=(u-a)/2,u=a))}this.ctx.drawImage(t,o,i,c,a,Q,w,g,u),this.ctx.restore()}},t.prototype.renderNodeContent=function(A){return r(this,void 0,void 0,function(){var e,r,n,o,i,c,a,Q,w,g,u,l,U,C,F,h,d,f,p;return B(this,function(B){switch(B.label){case 0:this.applyEffects(A.getEffects(4)),e=A.container,r=A.curves,n=e.styles,o=0,i=e.textNodes,B.label=1;case 1:return o0&&y>0&&(d=r.ctx.createPattern(C,"repeat"),r.renderRepeat(p,d,m,v))):function(A){return 2===A.type}(t)&&(f=Ss(A,e,[null,null,null]),p=f[0],H=f[1],E=f[2],I=f[3],y=f[4],K=0===t.position.length?[te]:t.position,m=ne(K[0],I),v=ne(K[K.length-1],y),L=function(A,e,t,r,B){var n=0,s=0;switch(A.size){case 0:0===A.shape?n=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B)):1===A.shape&&(n=Math.min(Math.abs(e),Math.abs(e-r)),s=Math.min(Math.abs(t),Math.abs(t-B)));break;case 2:if(0===A.shape)n=s=Math.min(Bt(e,t),Bt(e,t-B),Bt(e-r,t),Bt(e-r,t-B));else if(1===A.shape){var o=Math.min(Math.abs(t),Math.abs(t-B))/Math.min(Math.abs(e),Math.abs(e-r)),i=nt(r,B,e,t,!0),c=i[0],a=i[1];s=o*(n=Bt(c-e,(a-t)/o))}break;case 1:0===A.shape?n=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B)):1===A.shape&&(n=Math.max(Math.abs(e),Math.abs(e-r)),s=Math.max(Math.abs(t),Math.abs(t-B)));break;case 3:if(0===A.shape)n=s=Math.max(Bt(e,t),Bt(e,t-B),Bt(e-r,t),Bt(e-r,t-B));else if(1===A.shape){o=Math.max(Math.abs(t),Math.abs(t-B))/Math.max(Math.abs(e),Math.abs(e-r));var Q=nt(r,B,e,t,!1);c=Q[0],a=Q[1],s=o*(n=Bt(c-e,(a-t)/o))}}return Array.isArray(A.size)&&(n=ne(A.size[0],r),s=2===A.size.length?ne(A.size[1],B):n),[n,s]}(t,m,v,I,y),b=L[0],D=L[1],b>0&&D>0&&(M=r.ctx.createRadialGradient(H+m,E+v,0,H+m,E+v,b),tt(t.stops,2*b).forEach(function(A){return M.addColorStop(A.stop,ge(A.color))}),r.path(p),r.ctx.fillStyle=M,b!==D?(x=A.bounds.left+.5*A.bounds.width,S=A.bounds.top+.5*A.bounds.height,G=1/(T=D/b),r.ctx.save(),r.ctx.translate(x,S),r.ctx.transform(1,0,0,T,0,0),r.ctx.translate(-x,-S),r.ctx.fillRect(H,G*(E-S)+S,I,y*G),r.ctx.restore()):r.ctx.fill())),B.label=6;case 6:return e--,[2]}})},r=this,n=0,s=A.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return n0?2!==c.style?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,s,A.curves,2)]:[3,11]:[3,13];case 4:return B.sent(),[3,11];case 5:return 3!==c.style?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,s,A.curves,3)];case 6:return B.sent(),[3,11];case 7:return 4!==c.style?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,s,A.curves)];case 8:return B.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,s,A.curves)];case 10:B.sent(),B.label=11;case 11:s++,B.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(A,e,t,n,s){return r(this,void 0,void 0,function(){var r,o,i,c,a,Q,w,g,u,l,U,C,F,h,d,f;return B(this,function(B){return this.ctx.save(),r=function(A,e){switch(e){case 0:return bs(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return bs(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return bs(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);default:return bs(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}}(n,t),o=Ls(n,t),2===s&&(this.path(o),this.ctx.clip()),Us(o[0])?(i=o[0].start.x,c=o[0].start.y):(i=o[0].x,c=o[0].y),Us(o[1])?(a=o[1].end.x,Q=o[1].end.y):(a=o[1].x,Q=o[1].y),w=0===t||2===t?Math.abs(i-a):Math.abs(c-Q),this.ctx.beginPath(),3===s?this.formatPath(r):this.formatPath(o.slice(0,2)),g=e<3?3*e:2*e,u=e<3?2*e:e,3===s&&(g=e,u=e),l=!0,w<=2*g?l=!1:w<=2*g+u?(g*=U=w/(2*g+u),u*=U):(C=Math.floor((w+u)/(g+u)),F=(w-C*g)/(C-1),u=(h=(w-(C+1)*g)/C)<=0||Math.abs(u-F)