1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-query~pages-index-share"],{"13d5":function(t,e,n){"use strict";var o=n("23e7"),r=n("d58f").left,i=n("a640"),s=n("ae40"),a=i("reduce"),c=s("reduce",{1:0});o({target:"Array",proto:!0,forced:!a||!c},{reduce:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"683e":function(t,e,n){(function(e){var o;n("99af"),n("cb29"),n("4de4"),n("4160"),n("c975"),n("a15b"),n("baa5"),n("d81d"),n("13d5"),n("26e9"),n("fb6a"),n("45fc"),n("4e82"),n("a434"),n("a9e3"),n("d3b7"),n("acd8"),n("e25e"),n("ac1f"),n("25f0"),n("3ca3"),n("466d"),n("5319"),n("1276"),n("498a"),n("159b"),n("ddb0"),function(e){t.exports=e()}((function(){var t;return function t(e,n,r){function i(a,c){if(!n[a]){if(!e[a]){var h="function"==typeof o&&o;if(!c&&h)return o(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[a]={exports:{}};e[a][0].call(d.exports,(function(t){var n=e[a][1][t];return i(n||t)}),d,d.exports,t,e,n,r)}return n[a].exports}for(var s="function"==typeof o&&o,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(n,o,r){(function(e){(function(n){var i="object"==typeof r&&r&&!r.nodeType&&r,s="object"==typeof o&&o&&!o.nodeType&&o,a="object"==typeof e&&e;a.global!==a&&a.window!==a&&a.self!==a||(n=a);var c,h,l=2147483647,d=36,u=1,p=26,f=38,g=700,m=72,y=128,w="-",v=/^xn--/,b=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=d-u,k=Math.floor,C=String.fromCharCode;function S(t){throw new RangeError(E[t])}function I(t,e){var n=t.length,o=[];while(n--)o[n]=e(t[n]);return o}function R(t,e){var n=t.split("@"),o="";n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(x,".");var r=t.split("."),i=I(r,e).join(".");return o+i}function O(t){var e,n,o=[],r=0,i=t.length;while(r<i)e=t.charCodeAt(r++),e>=55296&&e<=56319&&r<i?(n=t.charCodeAt(r++),56320==(64512&n)?o.push(((1023&e)<<10)+(1023&n)+65536):(o.push(e),r--)):o.push(e);return o}function A(t){return I(t,(function(t){var e="";return t>65535&&(t-=65536,e+=C(t>>>10&1023|55296),t=56320|1023&t),e+=C(t),e})).join("")}function L(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:d}function P(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function M(t,e,n){var o=0;for(t=n?k(t/g):t>>1,t+=k(t/e);t>T*p>>1;o+=d)t=k(t/T);return k(o+(T+1)*t/(t+f))}function N(t){var e,n,o,r,i,s,a,c,h,f,g=[],v=t.length,b=0,x=y,E=m;for(n=t.lastIndexOf(w),n<0&&(n=0),o=0;o<n;++o)t.charCodeAt(o)>=128&&S("not-basic"),g.push(t.charCodeAt(o));for(r=n>0?n+1:0;r<v;){for(i=b,s=1,a=d;;a+=d){if(r>=v&&S("invalid-input"),c=L(t.charCodeAt(r++)),(c>=d||c>k((l-b)/s))&&S("overflow"),b+=c*s,h=a<=E?u:a>=E+p?p:a-E,c<h)break;f=d-h,s>k(l/f)&&S("overflow"),s*=f}e=g.length+1,E=M(b-i,e,0==i),k(b/e)>l-x&&S("overflow"),x+=k(b/e),b%=e,g.splice(b++,0,x)}return A(g)}function B(t){var e,n,o,r,i,s,a,c,h,f,g,v,b,x,E,T=[];for(t=O(t),v=t.length,e=y,n=0,i=m,s=0;s<v;++s)g=t[s],g<128&&T.push(C(g));o=r=T.length,r&&T.push(w);while(o<v){for(a=l,s=0;s<v;++s)g=t[s],g>=e&&g<a&&(a=g);for(b=o+1,a-e>k((l-n)/b)&&S("overflow"),n+=(a-e)*b,e=a,s=0;s<v;++s)if(g=t[s],g<e&&++n>l&&S("overflow"),g==e){for(c=n,h=d;;h+=d){if(f=h<=i?u:h>=i+p?p:h-i,c<f)break;E=c-f,x=d-f,T.push(C(P(f+E%x,0))),c=k(E/x)}T.push(C(P(c,0))),i=M(n,b,o==r),n=0,++o}++n,++e}return T.join("")}function D(t){return R(t,(function(t){return v.test(t)?N(t.slice(4).toLowerCase()):t}))}function _(t){return R(t,(function(t){return b.test(t)?"xn--"+B(t):t}))}if(c={version:"1.4.1",ucs2:{decode:O,encode:A},decode:N,encode:B,toASCII:_,toUnicode:D},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",(function(){return c}));else if(i&&s)if(o.exports==i)s.exports=c;else for(h in c)c.hasOwnProperty(h)&&(i[h]=c[h]);else n.punycode=c})(this)}).call(this,"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],2:[function(t,e,n){var o=t("./log");function r(t,e,n){!t.defaultView||e===t.defaultView.pageXOffset&&n===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,n)}function i(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(n){o("Unable to copy canvas content from",t,n)}}function s(t,e){var n=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),o=t.firstChild;while(o)!0!==e&&1===o.nodeType&&"SCRIPT"===o.nodeName||n.appendChild(s(o,e)),o=o.nextSibling;return 1===t.nodeType&&(n._scrollTop=t.scrollTop,n._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?i(t,n):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(n.value=t.value)),n}function a(t){if(1===t.nodeType){t.scrollTop=t._scrollTop,t.scrollLeft=t._scrollLeft;var e=t.firstChild;while(e)a(e),e=e.nextSibling}}e.exports=function(t,e,n,o,i,c,h){var l=s(t.documentElement,i.javascriptEnabled),d=e.createElement("iframe");return d.className="html2canvas-container",d.style.visibility="hidden",d.style.position="fixed",d.style.left="-10000px",d.style.top="0px",d.style.border="0",d.width=n,d.height=o,d.scrolling="no",e.body.appendChild(d),new Promise((function(e){var n=d.contentWindow.document;d.contentWindow.onload=d.onload=function(){var t=setInterval((function(){n.body.childNodes.length>0&&(a(n.documentElement),clearInterval(t),"view"===i.type&&(d.contentWindow.scrollTo(c,h),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||d.contentWindow.scrollY===h&&d.contentWindow.scrollX===c||(n.documentElement.style.top=-h+"px",n.documentElement.style.left=-c+"px",n.documentElement.style.position="absolute")),e(d))}),50)},n.open(),n.write("<!DOCTYPE html><html></html>"),r(t,c,h),n.replaceChild(n.adoptNode(l),n.documentElement),n.close()}))}},{"./log":13}],3:[function(t,e,n){function o(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)}o.prototype.darken=function(t){var e=1-t;return new o([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},o.prototype.isTransparent=function(){return 0===this.a},o.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},o.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),t.length>3&&(this.a=t[3])),Array.isArray(t)};var r=/^#([a-f0-9]{3})$/i;o.prototype.hex3=function(t){var e=null;return null!==(e=t.match(r))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var i=/^#([a-f0-9]{6})$/i;o.prototype.hex6=function(t){var e=null;return null!==(e=t.match(i))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;o.prototype.rgb=function(t){var e=null;return null!==(e=t.match(s))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var a=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;o.prototype.rgba=function(t){var e=null;return null!==(e=t.match(a))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},o.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},o.prototype.namedColor=function(t){t=t.toLowerCase();var e=c[t];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t)return this.r=this.g=this.b=this.a=0,!0;return!!e},o.prototype.isColor=!0;var c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};e.exports=o},{}],4:[function(e,n,o){var r=e("./support"),i=e("./renderers/canvas"),s=e("./imageloader"),a=e("./nodeparser"),c=e("./nodecontainer"),h=e("./log"),l=e("./utils"),d=e("./clone"),u=e("./proxy").loadUrlDocument,p=l.getBounds,f="data-html2canvas-node",g=0;function m(t,e){var n=g++;if(e=e||{},e.logging&&(h.options.logging=!0,h.options.start=Date.now()),e.async="undefined"===typeof e.async||e.async,e.allowTaint="undefined"!==typeof e.allowTaint&&e.allowTaint,e.removeContainer="undefined"===typeof e.removeContainer||e.removeContainer,e.javascriptEnabled="undefined"!==typeof e.javascriptEnabled&&e.javascriptEnabled,e.imageTimeout="undefined"===typeof e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"===typeof e.renderer?e.renderer:i,e.strict=!!e.strict,"string"===typeof t){if("string"!==typeof e.proxy)return Promise.reject("Proxy must be used when rendering url");var o=null!=e.width?e.width:window.innerWidth,r=null!=e.height?e.height:window.innerHeight;return u(E(t),e.proxy,document,o,r,e).then((function(t){return v(t.contentWindow.document.documentElement,t,e,o,r)}))}var s=(void 0===t?[document.documentElement]:t.length?t:[t])[0];return s.setAttribute(f+n,n),w(s.ownerDocument,e,s.ownerDocument.defaultView.innerWidth,s.ownerDocument.defaultView.innerHeight,n).then((function(t){return"function"===typeof e.onrendered&&(h("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),e.onrendered(t)),t}))}m.CanvasRenderer=i,m.NodeContainer=c,m.log=h,m.utils=l;var y="undefined"===typeof document||"function"!==typeof Object.create||"function"!==typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:m;function w(t,e,n,o,r){return d(t,t,n,o,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then((function(i){h("Document cloned");var s=f+r,a="["+s+"='"+r+"']";t.querySelector(a).removeAttribute(s);var c=i.contentWindow,l=c.document.querySelector(a),d="function"===typeof e.onclone?Promise.resolve(e.onclone(c.document)):Promise.resolve(!0);return d.then((function(){return v(l,i,e,n,o)}))}))}function v(t,e,n,o,i){var c=e.contentWindow,l=new r(c.document),d=new s(n,l),u=p(t),f="view"===n.type?o:u.right+1,g="view"===n.type?i:u.bottom+1,m=new n.renderer(f,g,d,n,document),y=new a(t,m,l,d,n);return y.ready.then((function(){var o;if(h("Finished rendering"),"view"===n.type)o=x(m.canvas,{width:m.canvas.width,height:m.canvas.height,top:0,left:0,x:0,y:0});else if(t===c.document.body||t===c.document.documentElement||null!=n.canvas)o=m.canvas;else if(n.scale){var r={width:null!=n.width?n.width:u.width,height:null!=n.height?n.height:u.height,top:u.top,left:u.left,x:0,y:0},i={};for(var s in r)r.hasOwnProperty(s)&&(i[s]=r[s]*n.scale);o=x(m.canvas,i),o.style.width=r.width+"px",o.style.height=r.height+"px"}else o=x(m.canvas,{width:null!=n.width?n.width:u.width,height:null!=n.height?n.height:u.height,top:u.top,left:u.left,x:0,y:0});return b(e,n),o}))}function b(t,e){e.removeContainer&&(t.parentNode.removeChild(t),h("Cleaned up container"))}function x(t,e){var n=document.createElement("canvas"),o=Math.min(t.width-1,Math.max(0,e.left)),r=Math.min(t.width,Math.max(1,e.left+e.width)),i=Math.min(t.height-1,Math.max(0,e.top)),s=Math.min(t.height,Math.max(1,e.top+e.height));n.width=e.width,n.height=e.height;var a=r-o,c=s-i;return h("Cropping canvas at:","left:",e.left,"top:",e.top,"width:",a,"height:",c),h("Resulting crop with width",e.width,"and height",e.height,"with x",o,"and y",i),n.getContext("2d").drawImage(t,o,i,a,c,e.x,e.y,a,c),n}function E(t){var e=document.createElement("a");return e.href=t,e.href=e.href,e}n.exports=y,"function"===typeof t&&t.amd&&t("html2canvas",[],(function(){return y}))},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(t,e,n){var o=t("./log"),r=t("./utils").smallImage;function i(t){if(this.src=t,o("DummyImageContainer for",t),!this.promise||!this.image){o("Initiating DummyImageContainer"),i.prototype.image=new Image;var e=this.image;i.prototype.promise=new Promise((function(t,n){e.onload=t,e.onerror=n,e.src=r(),!0===e.complete&&t(e)}))}}e.exports=i},{"./log":13,"./utils":26}],6:[function(t,e,n){var o=t("./utils").smallImage;function r(t,e){var n,r,i=document.createElement("div"),s=document.createElement("img"),a=document.createElement("span"),c="Hidden Text";i.style.visibility="hidden",i.style.fontFamily=t,i.style.fontSize=e,i.style.margin=0,i.style.padding=0,document.body.appendChild(i),s.src=o(),s.width=1,s.height=1,s.style.margin=0,s.style.padding=0,s.style.verticalAlign="baseline",a.style.fontFamily=t,a.style.fontSize=e,a.style.margin=0,a.style.padding=0,a.appendChild(document.createTextNode(c)),i.appendChild(a),i.appendChild(s),n=s.offsetTop-a.offsetTop+1,i.removeChild(a),i.appendChild(document.createTextNode(c)),i.style.lineHeight="normal",s.style.verticalAlign="super",r=s.offsetTop-i.offsetTop+1,document.body.removeChild(i),this.baseline=n,this.lineWidth=1,this.middle=r}e.exports=r},{"./utils":26}],7:[function(t,e,n){var o=t("./font");function r(){this.data={}}r.prototype.getMetrics=function(t,e){return void 0===this.data[t+"-"+e]&&(this.data[t+"-"+e]=new o(t,e)),this.data[t+"-"+e]},e.exports=r},{"./font":6}],8:[function(t,e,n){var o=t("./utils"),r=o.getBounds,i=t("./proxy").loadUrlDocument;function s(e,n,o){this.image=null,this.src=e;var i=this,s=r(e);this.promise=(n?new Promise((function(t){"about:blank"===e.contentWindow.document.URL||null==e.contentWindow.document.documentElement?e.contentWindow.onload=e.onload=function(){t(e)}:t(e)})):this.proxyLoad(o.proxy,s,o)).then((function(e){var n=t("./core");return n(e.contentWindow.document.documentElement,{type:"view",width:e.width,height:e.height,proxy:o.proxy,javascriptEnabled:o.javascriptEnabled,removeContainer:o.removeContainer,allowTaint:o.allowTaint,imageTimeout:o.imageTimeout/2})})).then((function(t){return i.image=t}))}s.prototype.proxyLoad=function(t,e,n){var o=this.src;return i(o.src,t,o.ownerDocument,e.width,e.height,n)},e.exports=s},{"./core":4,"./proxy":16,"./utils":26}],9:[function(t,e,n){function o(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}o.TYPES={LINEAR:1,RADIAL:2},o.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,e.exports=o},{}],10:[function(t,e,n){function o(t,e){this.src=t,this.image=new Image;var n=this;this.tainted=null,this.promise=new Promise((function(o,r){n.image.onload=o,n.image.onerror=r,e&&(n.image.crossOrigin="anonymous"),n.image.src=t,!0===n.image.complete&&o(n.image)}))}e.exports=o},{}],11:[function(t,e,n){var o=t("./log"),r=t("./imagecontainer"),i=t("./dummyimagecontainer"),s=t("./proxyimagecontainer"),a=t("./framecontainer"),c=t("./svgcontainer"),h=t("./svgnodecontainer"),l=t("./lineargradientcontainer"),d=t("./webkitgradientcontainer"),u=t("./utils").bind;function p(t,e){this.link=null,this.options=t,this.support=e,this.origin=this.getOrigin(window.location.href)}p.prototype.findImages=function(t){var e=[];return t.reduce((function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t}),[]).forEach(this.addImage(e,this.loadImage),this),e},p.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},p.prototype.addImage=function(t,e){return function(n){n.args.forEach((function(r){this.imageExists(t,r)||(t.splice(0,0,e.call(this,n)),o("Added image #"+t.length,"string"===typeof r?r.substring(0,100):r))}),this)}},p.prototype.hasImageBackground=function(t){return"none"!==t.method},p.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new r(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||!0===this.options.allowTaint||this.isSVG(e)?new r(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new r(e,!0):this.options.proxy?new s(e,this.options.proxy):new i(e):new c(e)}return"linear-gradient"===t.method?new l(t):"gradient"===t.method?new d(t):"svg"===t.method?new h(t.args[0],this.support.svg):"IFRAME"===t.method?new a(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new i(t)},p.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||c.prototype.isInline(t)},p.prototype.imageExists=function(t,e){return t.some((function(t){return t.src===e}))},p.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},p.prototype.getOrigin=function(t){var e=this.link||(this.link=document.createElement("a"));return e.href=t,e.href=e.href,e.protocol+e.hostname+e.port},p.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout)["catch"]((function(){var e=new i(t.src);return e.promise.then((function(e){t.image=e}))}))},p.prototype.get=function(t){var e=null;return this.images.some((function(n){return(e=n).src===t}))?e:null},p.prototype.fetch=function(t){return this.images=t.reduce(u(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach((function(t,e){t.promise.then((function(){o("Succesfully loaded image #"+(e+1),t)}),(function(n){o("Failed loading image #"+(e+1),t,n)}))})),this.ready=Promise.all(this.images.map(this.getPromise,this)),o("Finished searching images"),this},p.prototype.timeout=function(t,e){var n,r=Promise.race([t.promise,new Promise((function(r,i){n=setTimeout((function(){o("Timed out loading image",t),i(t)}),e)}))]).then((function(t){return clearTimeout(n),t}));return r["catch"]((function(){clearTimeout(n)})),r},e.exports=p},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(t,e,n){var o=t("./gradientcontainer"),r=t("./color");function i(t){o.apply(this,arguments),this.type=o.TYPES.LINEAR;var e=i.REGEXP_DIRECTION.test(t.args[0])||!o.REGEXP_COLORSTOP.test(t.args[0]);e?t.args[0].split(/\s+/).reverse().forEach((function(t,e){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var n=this.y0,o=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=o,this.y1=n;break;case"center":break;default:var r=.01*parseFloat(t,10);if(isNaN(r))break;0===e?(this.y0=r,this.y1=1-this.y0):(this.x0=r,this.x1=1-this.x0);break}}),this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map((function(t){var e=t.match(o.REGEXP_COLORSTOP),n=+e[2],i=0===n?"%":e[3];return{color:new r(e[1]),stop:"%"===i?n/100:null}})),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach((function(t,e){null===t.stop&&this.colorStops.slice(e).some((function(n,o){return null!==n.stop&&(t.stop=(n.stop-this.colorStops[e-1].stop)/(o+1)+this.colorStops[e-1].stop,!0)}),this)}),this)}i.prototype=Object.create(o.prototype),i.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,e.exports=i},{"./color":3,"./gradientcontainer":9}],13:[function(t,e,n){var o=function t(){t.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-t.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};o.options={logging:!1},e.exports=o},{}],14:[function(t,e,n){var o=t("./color"),r=t("./utils"),i=r.getBounds,s=r.parseBackgrounds,a=r.offsetBounds;function c(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function h(t){var e=t.options[t.selectedIndex||0];return e&&e.text||""}function l(t){if(t&&"matrix"===t[1])return t[2].split(",").map((function(t){return parseFloat(t.trim())}));if(t&&"matrix3d"===t[1]){var e=t[2].split(",").map((function(t){return parseFloat(t.trim())}));return[e[0],e[1],e[4],e[5],e[12],e[13]]}}function d(t){var e=t[0],n=t[2],o=t[4],r=t[1],i=t[3],s=t[5],a=e*i-n*r,c=[i,-r,-n,e,n*s-o*i,o*r-e*s].map((function(t){return t/a}));return c}function u(t){return-1!==t.toString().indexOf("%")}function p(t){return t.replace("px","")}function f(t){return parseFloat(t)}c.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},c.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},c.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},c.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},c.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},c.prototype.prefixedCss=function(t){var e=["webkit","moz","ms","o"],n=this.css(t);return void 0===n&&e.some((function(e){return n=this.css(e+t.substr(0,1).toUpperCase()+t.substr(1)),void 0!==n}),this),void 0===n?null:n},c.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},c.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},c.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new o(this.css(t)))},c.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},c.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal";break}return t},c.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},c.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=s(this.css("backgroundImage")))},c.prototype.cssList=function(t,e){var n=(this.css(t)||"").split(",");return n=n[e||0]||n[0]||"auto",n=n.trim().split(" "),1===n.length&&(n=[n[0],u(n[0])?"auto":n[0]]),n},c.prototype.parseBackgroundSize=function(t,e,n){var o,r,i=this.cssList("backgroundSize",n);if(u(i[0]))o=t.width*parseFloat(i[0])/100;else{if(/contain|cover/.test(i[0])){var s=t.width/t.height,a=e.width/e.height;return s<a^"contain"===i[0]?{width:t.height*a,height:t.height}:{width:t.width,height:t.width/a}}o=parseInt(i[0],10)}return r="auto"===i[0]&&"auto"===i[1]?e.height:"auto"===i[1]?o/e.width*e.height:u(i[1])?t.height*parseFloat(i[1])/100:parseInt(i[1],10),"auto"===i[0]&&(o=r/e.height*e.width),{width:o,height:r}},c.prototype.parseBackgroundPosition=function(t,e,n,o){var r,i,s=this.cssList("backgroundPosition",n);return r=u(s[0])?(t.width-(o||e).width)*(parseFloat(s[0])/100):parseInt(s[0],10),i="auto"===s[1]?r/e.width*e.height:u(s[1])?(t.height-(o||e).height)*parseFloat(s[1])/100:parseInt(s[1],10),"auto"===s[0]&&(r=i/e.height*e.width),{left:r,top:i}},c.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},c.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var n=t.match(this.TEXT_SHADOW_PROPERTY),r=0;n&&r<n.length;r++){var i=n[r].match(this.TEXT_SHADOW_VALUES);e.push({color:new o(i[0]),offsetX:i[1]?parseFloat(i[1].replace("px","")):0,offsetY:i[2]?parseFloat(i[2].replace("px","")):0,blur:i[3]?i[3].replace("px",""):0})}return e},c.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var t=this.parseBounds(),e=this.prefixedCss("transformOrigin").split(" ").map(p).map(f);e[0]+=t.left,e[1]+=t.top,this.transformData={origin:e,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},c.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var t=this.prefixedCss("transform"),e=t?l(t.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=e||[1,0,0,1,0,0]}return this.transformMatrix},c.prototype.inverseTransform=function(){var t=this.parseTransform();return{origin:t.origin,matrix:d(t.matrix)}},c.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?a(this.node):i(this.node))},c.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},c.prototype.getValue=function(){var t=this.node.value||"";return"SELECT"===this.node.tagName?t=h(this.node):"password"===this.node.type&&(t=Array(t.length+1).join("•")),0===t.length?this.node.placeholder||"":t},c.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/,c.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,c.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,c.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,e.exports=c},{"./color":3,"./utils":26}],15:[function(t,e,n){var o=t("./log"),r=t("punycode"),i=t("./nodecontainer"),s=t("./textcontainer"),a=t("./pseudoelementcontainer"),c=t("./fontmetrics"),h=t("./color"),l=t("./stackingcontext"),d=t("./utils"),u=d.bind,p=d.getBounds,f=d.parseBackgrounds,g=d.offsetBounds;function m(t,e,n,r,s){o("Starting NodeParser"),this.renderer=e,this.options=s,this.range=null,this.support=n,this.renderQueue=[],this.stack=new l(!0,1,t.ownerDocument,null);var a=new i(t,null);if(s.background&&e.rectangle(0,0,e.width,e.height,new h(s.background)),t===t.ownerDocument.documentElement){var d=new i(a.color("backgroundColor").isTransparent()?t.ownerDocument.body:t.ownerDocument.documentElement,null);e.rectangle(0,0,e.width,e.height,d.color("backgroundColor"))}a.visibile=a.isElementVisible(),this.createPseudoHideStyles(t.ownerDocument),this.disableAnimations(t.ownerDocument),this.nodes=Q([a].concat(this.getChildren(a)).filter((function(t){return t.visible=t.isElementVisible()})).map(this.getPseudoElements,this)),this.fontMetrics=new c,o("Fetched nodes, total:",this.nodes.length),o("Calculate overflow clips"),this.calculateOverflowClips(),o("Start fetching images"),this.images=r.fetch(this.nodes.filter(j)),this.ready=this.images.ready.then(u((function(){return o("Images loaded, starting parsing"),o("Creating stacking contexts"),this.createStackingContexts(),o("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),o("Render queue created with "+this.renderQueue.length+" items"),new Promise(u((function(t){s.async?"function"===typeof s.async?s.async.call(this,this.renderQueue,t):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())}),this))}),this))}function y(t){return t.parent&&t.parent.clip.length}function w(t){return t.replace(/(\-[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}))}function v(){}m.prototype.calculateOverflowClips=function(){this.nodes.forEach((function(t){if(j(t)){z(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],n=t.parseClip();n&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+n.left,t.bounds.top+n.top,n.right-n.left,n.bottom-n.top]]),t.clip=y(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,z(t)&&t.cleanDOM()}else U(t)&&(t.clip=y(t)?t.parent.clip:[]);z(t)||(t.bounds=null)}),this)},m.prototype.asyncRenderer=function(t,e,n){n=n||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():n+20>Date.now()?this.asyncRenderer(t,e,n):setTimeout(u((function(){this.asyncRenderer(t,e)}),this),0)},m.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+a.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+a.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},m.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;}")},m.prototype.createStyles=function(t,e){var n=t.createElement("style");n.innerHTML=e,t.body.appendChild(n)},m.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var n=this.getPseudoElement(t,":before"),o=this.getPseudoElement(t,":after");n&&e.push(n),o&&e.push(o)}return Q(e)},m.prototype.getPseudoElement=function(t,e){var n=t.computedStyle(e);if(!n||!n.content||"none"===n.content||"-moz-alt-content"===n.content||"none"===n.display)return null;for(var o=J(n.content),r="url"===o.substr(0,3),i=document.createElement(r?"img":"html2canvaspseudoelement"),c=new a(i,t,e),h=n.length-1;h>=0;h--){var l=w(n.item(h));i.style[l]=n[l]}if(i.className=a.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+a.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,r)return i.src=f(o)[0].args[0],[c];var d=document.createTextNode(o);return i.appendChild(d),[c,new s(d,c)]},m.prototype.getChildren=function(t){return Q([].filter.call(t.node.childNodes,D).map((function(e){var n=[e.nodeType===Node.TEXT_NODE?new s(e,t):new i(e,t)].filter($);return e.nodeType===Node.ELEMENT_NODE&&n.length&&"TEXTAREA"!==e.tagName?n[0].isElementVisible()?n.concat(this.getChildren(n[0])):[]:n}),this))},m.prototype.newStackingContext=function(t,e){var n=new l(e,t.getOpacity(),t.node,t.parent);t.cloneTo(n);var o=e?n.getParentStack(this):n.parent.stack;o.contexts.push(n),t.stack=n},m.prototype.createStackingContexts=function(){this.nodes.forEach((function(t){j(t)&&(this.isRootElement(t)||G(t)||_(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):j(t)&&(F(t)&&A(t)||W(t)||V(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)}),this)},m.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},m.prototype.isRootElement=function(t){return null===t.parent},m.prototype.sortStackingContexts=function(t){t.contexts.sort(X(t.contexts.slice(0))),t.contexts.forEach(this.sortStackingContexts,this)},m.prototype.parseTextBounds=function(t){return function(e,n,o){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var r=o.slice(0,n).join("").length;return this.getRangeBounds(t.node,r,e.length)}if(t.node&&"string"===typeof t.node.data){var i=t.node.splitText(e.length),s=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=i,s}}else this.support.rangeBounds&&!t.parent.hasTransform()||(t.node=t.node.splitText(e.length));return{}}},m.prototype.getWrapperBounds=function(t,e){var n=t.ownerDocument.createElement("html2canvaswrapper"),o=t.parentNode,r=t.cloneNode(!0);n.appendChild(t.cloneNode(!0)),o.replaceChild(n,t);var i=e?g(n):p(n);return o.replaceChild(r,n),i},m.prototype.getRangeBounds=function(t,e,n){var o=this.range||(this.range=t.ownerDocument.createRange());return o.setStart(t,e),o.setEnd(t,e+n),o.getBoundingClientRect()},m.prototype.parse=function(t){var e=t.contexts.filter(R),n=t.children.filter(j),o=n.filter(H(V)),r=o.filter(H(F)).filter(H(L)),i=n.filter(H(F)).filter(V),s=o.filter(H(F)).filter(L),a=t.contexts.concat(o.filter(F)).filter(A),c=t.children.filter(U).filter(M),h=t.contexts.filter(O);e.concat(r).concat(i).concat(s).concat(a).concat(c).concat(h).forEach((function(t){this.renderQueue.push(t),P(t)&&(this.parse(t),this.renderQueue.push(new v))}),this)},m.prototype.paint=function(t){try{t instanceof v?this.renderer.ctx.restore():U(t)?(z(t.parent)&&t.parent.appendToDOM(),this.paintText(t),z(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(o(e),this.options.strict)throw e}},m.prototype.paintNode=function(t){P(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)},m.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,(function(){this.renderer.renderBackground(t,e,t.borders.borders.map(Y))}),this,t),this.renderer.mask(t.backgroundClip,(function(){this.renderer.renderShadows(t,t.borders.clip)}),this,t),this.renderer.clip(t.clip,(function(){this.renderer.renderBorders(t.borders.borders)}),this,t),this.renderer.clip(t.backgroundClip,(function(){switch(t.node.nodeName){case"svg":case"IFRAME":var n=this.images.get(t.node);n?this.renderer.renderImage(t,e,t.borders,n):o("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):o("Error loading <img>",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);break}}),this,t)},m.prototype.paintCheckbox=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height),o={width:n-1,height:n-1,top:e.top,left:e.left},r=[3,3],i=[r,r,r,r],s=[1,1,1,1].map((function(t){return{color:new h("#A5A5A5"),width:t}})),a=T(o,i,s);this.renderer.clip(t.backgroundClip,(function(){this.renderer.rectangle(o.left+1,o.top+1,o.width-2,o.height-2,new h("#DEDEDE")),this.renderer.renderBorders(x(s,o,a,i)),t.node.checked&&(this.renderer.font(new h("#424242"),"normal","normal","bold",n-3+"px","arial"),this.renderer.text("✔",o.left+n/6,o.top+n-1))}),this,t)},m.prototype.paintRadio=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,(function(){this.renderer.circleStroke(e.left+1,e.top+1,n,new h("#DEDEDE"),1,new h("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+n/4)+1,Math.ceil(e.top+n/4)+1,Math.floor(n/2),new h("#424242"))}),this,t)},m.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var n=t.node.ownerDocument,r=n.createElement("html2canvaswrapper"),i=["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"];i.forEach((function(e){try{r.style[e]=t.css(e)}catch(n){o("html2canvas: Parse: Exception caught in renderFormValue: "+n.message)}}));var a=t.parseBounds();r.style.position="fixed",r.style.left=a.left+"px",r.style.top=a.top+"px",r.textContent=e,n.body.appendChild(r),this.paintText(new s(r.firstChild,t)),n.body.removeChild(r)}},m.prototype.paintText=function(t){t.applyTextTransform();var e=r.ucs2.decode(t.node.data),n=(!this.options.letterRendering||N(t))&&!tt(t.node.data),o=n?K(e):e.map((function(t){return r.ucs2.encode([t])}));n||(t.parent.node.style.fontVariantLigatures="none");var i=t.parent.fontWeight(),s=t.parent.css("fontSize"),a=t.parent.css("fontFamily"),c=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),i,s,a),c.length?this.renderer.fontShadow(c[0].color,c[0].offsetX,c[0].offsetY,c[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,(function(){o.map(this.parseTextBounds(t),this).forEach((function(e,n){e&&(this.renderer.text(o[n],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(a,s)))}),this)}),this,t.parent)},m.prototype.renderTextDecoration=function(t,e,n){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+n.baseline+n.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+n.middle+n.lineWidth),e.width,1,t.color("color"));break}};var b={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};function x(t,e,n,o){var r={top:e.top+t[0].width/2,right:e.right-t[1].width/2,bottom:e.bottom-t[2].width/2,left:e.left+t[3].width/2};return t.map((function(i,s){if(i.width>0){var a=e.left,c=e.top,h=e.width,l=e.height-t[2].width;switch(s){case 0:l=t[0].width,i.args=C({c1:[a,c],c2:[a+h,c],c3:[a+h-t[1].width,c+l],c4:[a+t[3].width,c+l]},o[0],o[1],n.topLeftOuter,n.topLeftInner,n.topRightOuter,n.topRightInner),i.pathArgs=S({c1:[r.left,r.top],c2:[r.right,r.top]},o[0],o[1],n.topLeft,n.topRight);break;case 1:a=e.left+e.width-t[1].width,h=t[1].width,i.args=C({c1:[a+h,c],c2:[a+h,c+l+t[2].width],c3:[a,c+l],c4:[a,c+t[0].width]},o[1],o[2],n.topRightOuter,n.topRightInner,n.bottomRightOuter,n.bottomRightInner),i.pathArgs=S({c1:[r.right,r.top],c2:[r.right,r.bottom]},o[1],o[2],n.topRight,n.bottomRight);break;case 2:c=c+e.height-t[2].width,l=t[2].width,i.args=C({c1:[a+h,c+l],c2:[a,c+l],c3:[a+t[3].width,c],c4:[a+h-t[3].width,c]},o[2],o[3],n.bottomRightOuter,n.bottomRightInner,n.bottomLeftOuter,n.bottomLeftInner),i.pathArgs=S({c1:[r.right,r.bottom],c2:[r.left,r.bottom]},o[2],o[3],n.bottomRight,n.bottomLeft);break;case 3:h=t[3].width,i.args=C({c1:[a,c+l+t[2].width],c2:[a,c],c3:[a+h,c+t[0].width],c4:[a+h,c+l]},o[3],o[0],n.bottomLeftOuter,n.bottomLeftInner,n.topLeftOuter,n.topLeftInner),i.pathArgs=S({c1:[r.left,r.bottom],c2:[r.left,r.top]},o[3],o[0],n.bottomLeft,n.topLeft);break}}return i}))}function E(t,e,n,o){var r=(Math.sqrt(2)-1)/3*4,i=n*r,s=o*r,a=t+n,c=e+o;return{topLeft:k({x:t,y:c},{x:t,y:c-s},{x:a-i,y:e},{x:a,y:e}),topRight:k({x:t,y:e},{x:t+i,y:e},{x:a,y:c-s},{x:a,y:c}),bottomRight:k({x:a,y:e},{x:a,y:e+s},{x:t+i,y:c},{x:t,y:c}),bottomLeft:k({x:a,y:c},{x:a-i,y:c},{x:t,y:e+s},{x:t,y:e})}}function T(t,e,n){var o=t.left,r=t.top,i=t.width,s=t.height,a=e[0][0]<i/2?e[0][0]:i/2,c=e[0][1]<s/2?e[0][1]:s/2,h=e[1][0]<i/2?e[1][0]:i/2,l=e[1][1]<s/2?e[1][1]:s/2,d=e[2][0]<i/2?e[2][0]:i/2,u=e[2][1]<s/2?e[2][1]:s/2,p=e[3][0]<i/2?e[3][0]:i/2,f=e[3][1]<s/2?e[3][1]:s/2,g=i-h,m=s-u,y=i-d,w=s-f;return{topLeft:E(o+n[3].width/2,r+n[0].width/2,Math.max(0,a-n[3].width/2),Math.max(0,c-n[0].width/2)).topLeft.subdivide(.5),topRight:E(o+Math.min(g,i+n[3].width/2),r+n[0].width/2,g>i+n[3].width/2?0:h-n[3].width/2,l-n[0].width/2).topRight.subdivide(.5),bottomRight:E(o+Math.min(y,i-n[3].width/2),r+Math.min(m,s+n[0].width/2),Math.max(0,d-n[1].width/2),u-n[2].width/2).bottomRight.subdivide(.5),bottomLeft:E(o+n[3].width/2,r+w,Math.max(0,p-n[3].width/2),f-n[2].width/2).bottomLeft.subdivide(.5),topLeftOuter:E(o,r,a,c).topLeft.subdivide(.5),topLeftInner:E(o+n[3].width,r+n[0].width,Math.max(0,a-n[3].width),Math.max(0,c-n[0].width)).topLeft.subdivide(.5),topRightOuter:E(o+g,r,h,l).topRight.subdivide(.5),topRightInner:E(o+Math.min(g,i+n[3].width),r+n[0].width,g>i+n[3].width?0:h-n[3].width,l-n[0].width).topRight.subdivide(.5),bottomRightOuter:E(o+y,r+m,d,u).bottomRight.subdivide(.5),bottomRightInner:E(o+Math.min(y,i-n[3].width),r+Math.min(m,s+n[0].width),Math.max(0,d-n[1].width),u-n[2].width).bottomRight.subdivide(.5),bottomLeftOuter:E(o,r+w,p,f).bottomLeft.subdivide(.5),bottomLeftInner:E(o+n[3].width,r+w,Math.max(0,p-n[3].width),f-n[2].width).bottomLeft.subdivide(.5)}}function k(t,e,n,o){var r=function(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}};return{start:t,startControl:e,endControl:n,end:o,subdivide:function(i){var s=r(t,e,i),a=r(e,n,i),c=r(n,o,i),h=r(s,a,i),l=r(a,c,i),d=r(h,l,i);return[k(t,s,h,d),k(d,l,c,o)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,n.x,n.y,o.x,o.y])},curveToReversed:function(o){o.push(["bezierCurve",n.x,n.y,e.x,e.y,t.x,t.y])}}}function C(t,e,n,o,r,i,s){var a=[];return e[0]>0||e[1]>0?(a.push(["line",o[1].start.x,o[1].start.y]),o[1].curveTo(a)):a.push(["line",t.c1[0],t.c1[1]]),n[0]>0||n[1]>0?(a.push(["line",i[0].start.x,i[0].start.y]),i[0].curveTo(a),a.push(["line",s[0].end.x,s[0].end.y]),s[0].curveToReversed(a)):(a.push(["line",t.c2[0],t.c2[1]]),a.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(a.push(["line",r[1].end.x,r[1].end.y]),r[1].curveToReversed(a)):a.push(["line",t.c4[0],t.c4[1]]),a}function S(t,e,n,o,r){var i=[];return e[0]>0||e[1]>0?(i.push(["line",o[1].start.x,o[1].start.y]),o[1].curveTo(i)):i.push(["line",t.c1[0],t.c1[1]]),n[0]>0||n[1]>0?(i.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(i)):i.push(["line",t.c2[0],t.c2[1]]),i}function I(t,e,n,o,r,i,s){e[0]>0||e[1]>0?(t.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(t),o[1].curveTo(t)):t.push(["line",i,s]),(n[0]>0||n[1]>0)&&t.push(["line",r[0].start.x,r[0].start.y])}function R(t){return t.cssInt("zIndex")<0}function O(t){return t.cssInt("zIndex")>0}function A(t){return 0===t.cssInt("zIndex")}function L(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function P(t){return t instanceof l}function M(t){return t.node.data.trim().length>0}function N(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function B(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map((function(e){var n=t.css("border"+e+"Radius"),o=n.split(" ");return o.length<=1&&(o[1]=o[0]),o.map(q)}))}function D(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function _(t){var e=t.css("position"),n=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==n}function F(t){return"static"!==t.css("position")}function V(t){return"none"!==t.css("float")}function W(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function H(t){var e=this;return function(){return!t.apply(e,arguments)}}function j(t){return t.node.nodeType===Node.ELEMENT_NODE}function z(t){return!0===t.isPseudoElement}function U(t){return t.node.nodeType===Node.TEXT_NODE}function X(t){return function(e,n){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(n.cssInt("zIndex")+t.indexOf(n)/t.length)}}function G(t){return t.getOpacity()<1}function q(t){return parseInt(t,10)}function Y(t){return t.width}function $(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function Q(t){return[].concat.apply([],t)}function J(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}function K(t){var e,n=[],o=0,i=!1;while(t.length)Z(t[o])===i?(e=t.splice(0,o),e.length&&n.push(r.ucs2.encode(e)),i=!i,o=0):o++,o>=t.length&&(e=t.splice(0,o),e.length&&n.push(r.ucs2.encode(e)));return n}function Z(t){return-1!==[32,13,10,9,45].indexOf(t)}function tt(t){return/[^\u0000-\u00ff]/.test(t)}m.prototype.parseBorders=function(t){var e=t.parseBounds(),n=B(t),o=["Top","Right","Bottom","Left"].map((function(e,n){var o=t.css("border"+e+"Style"),r=t.color("border"+e+"Color");"inset"===o&&r.isBlack()&&(r=new h([255,255,255,r.a]));var i=b[o]?b[o][n]:null;return{width:t.cssInt("border"+e+"Width"),color:i?r[i[0]](i[1]):r,style:o,pathArgs:null,args:null}})),r=T(e,n,o);return{clip:this.parseBackgroundClip(t,r,o,n,e),borders:x(o,e,r,n)}},m.prototype.parseBackgroundClip=function(t,e,n,o,r){var i=t.css("backgroundClip"),s=[];switch(i){case"content-box":case"padding-box":I(s,o[0],o[1],e.topLeftInner,e.topRightInner,r.left+n[3].width,r.top+n[0].width),I(s,o[1],o[2],e.topRightInner,e.bottomRightInner,r.left+r.width-n[1].width,r.top+n[0].width),I(s,o[2],o[3],e.bottomRightInner,e.bottomLeftInner,r.left+r.width-n[1].width,r.top+r.height-n[2].width),I(s,o[3],o[0],e.bottomLeftInner,e.topLeftInner,r.left+n[3].width,r.top+r.height-n[2].width);break;default:I(s,o[0],o[1],e.topLeftOuter,e.topRightOuter,r.left,r.top),I(s,o[1],o[2],e.topRightOuter,e.bottomRightOuter,r.left+r.width,r.top),I(s,o[2],o[3],e.bottomRightOuter,e.bottomLeftOuter,r.left+r.width,r.top+r.height),I(s,o[3],o[0],e.bottomLeftOuter,e.topLeftOuter,r.left,r.top+r.height);break}return s},e.exports=m},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(t,e,n){var o=t("./xhr"),r=t("./utils"),i=t("./log"),s=t("./clone"),a=r.decode64;function c(t,e,n){var r="withCredentials"in new XMLHttpRequest;if(!e)return Promise.reject("No proxy configured");var i=u(r),s=p(e,t,i);return r?o(s):d(n,s,i).then((function(t){return a(t.content)}))}var h=0;function l(t,e,n){var o="crossOrigin"in new Image,r=u(o),i=p(e,t,r);return o?Promise.resolve(i):d(n,i,r).then((function(t){return"data:"+t.type+";base64,"+t.content}))}function d(t,e,n){return new Promise((function(o,r){var i=t.createElement("script"),s=function(){delete window.html2canvas.proxy[n],t.body.removeChild(i)};window.html2canvas.proxy[n]=function(t){s(),o(t)},i.src=e,i.onerror=function(t){s(),r(t)},t.body.appendChild(i)}))}function u(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++h+"_"+Math.round(1e5*Math.random())}function p(t,e,n){return t+"?url="+encodeURIComponent(e)+(n.length?"&callback=html2canvas.proxy."+n:"")}function f(t){return function(e){var n,o=new DOMParser;try{n=o.parseFromString(e,"text/html")}catch(a){i("DOMParser not supported, falling back to createHTMLDocument"),n=document.implementation.createHTMLDocument("");try{n.open(),n.write(e),n.close()}catch(c){i("createHTMLDocument write not supported, falling back to document.body.innerHTML"),n.body.innerHTML=e}}var r=n.querySelector("base");if(!r||!r.href.host){var s=n.createElement("base");s.href=t,n.head.insertBefore(s,n.head.firstChild)}return n}}function g(t,e,n,o,r,i){return new c(t,e,window.document).then(f(t)).then((function(t){return s(t,n,o,r,i,0,0)}))}n.Proxy=c,n.ProxyURL=l,n.loadUrlDocument=g},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(t,e,n){var o=t("./proxy").ProxyURL;function r(t,e){var n=document.createElement("a");n.href=t,t=n.href,this.src=t,this.image=new Image;var r=this;this.promise=new Promise((function(n,i){r.image.crossOrigin="Anonymous",r.image.onload=n,r.image.onerror=i,new o(t,e,document).then((function(t){r.image.src=t}))["catch"](i)}))}e.exports=r},{"./proxy":16}],18:[function(t,e,n){var o=t("./nodecontainer");function r(t,e,n){o.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===n}r.prototype.cloneTo=function(t){r.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},r.prototype=Object.create(o.prototype),r.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,n){var o=t("./log");function r(t,e,n,o,r){this.width=t,this.height=e,this.images=n,this.options=o,this.document=r}r.prototype.renderImage=function(t,e,n,o){var r=t.cssInt("paddingLeft"),i=t.cssInt("paddingTop"),s=t.cssInt("paddingRight"),a=t.cssInt("paddingBottom"),c=n.borders,h=e.width-(c[1].width+c[3].width+r+s),l=e.height-(c[0].width+c[2].width+i+a);this.drawImage(o,0,0,o.image.width||h,o.image.height||l,e.left+r+c[3].width,e.top+i+c[0].width,h,l)},r.prototype.renderBackground=function(t,e,n){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,n))},r.prototype.renderBackgroundColor=function(t,e){var n=t.color("backgroundColor");n.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,n)},r.prototype.renderShadows=function(t,e){var n=t.css("boxShadow");if("none"!==n){var o=n.split(/,(?![^(]*\))/);this.shadow(e,o)}},r.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(t){if(!t.color.isTransparent()&&null!==t.args)if("dashed"===t.style||"dotted"===t.style){var e="dashed"===t.style?3:t.width;this.ctx.setLineDash([e]),this.path(t.pathArgs),this.ctx.strokeStyle=t.color,this.ctx.lineWidth=t.width,this.ctx.stroke()}else this.drawShape(t.args,t.color)},r.prototype.renderBackgroundImage=function(t,e,n){var r=t.parseBackgroundImages();r.reverse().forEach((function(r,i,s){switch(r.method){case"url":var a=this.images.get(r.args[0]);a?this.renderBackgroundRepeating(t,e,a,s.length-(i+1),n):o("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var c=this.images.get(r.value);c?this.renderBackgroundGradient(c,e,n):o("Error loading background-image",r.args[0]);break;case"none":break;default:o("Unknown background-image type",r.args[0])}}),this)},r.prototype.renderBackgroundRepeating=function(t,e,n,o,r){var i=t.parseBackgroundSize(e,n.image,o),s=t.parseBackgroundPosition(e,n.image,o,i),a=t.parseBackgroundRepeat(o);switch(a){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(n,s,i,e,e.left+r[3],e.top+s.top+r[0],99999,i.height,r);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(n,s,i,e,e.left+s.left+r[3],e.top+r[0],i.width,99999,r);break;case"no-repeat":this.backgroundRepeatShape(n,s,i,e,e.left+s.left+r[3],e.top+s.top+r[0],i.width,i.height,r);break;default:this.renderBackgroundRepeat(n,s,i,{top:e.top,left:e.left},r[3],r[0]);break}},e.exports=r},{"./log":13}],20:[function(t,e,n){var o=t("../renderer"),r=t("../lineargradientcontainer"),i=t("../log");function s(t,e){o.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options.canvas||(this.options.dpi&&(this.options.scale=this.options.dpi/96),this.options.scale?(this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this.canvas.width=Math.floor(t*this.options.scale),this.canvas.height=Math.floor(e*this.options.scale),this.ctx.scale(this.options.scale,this.options.scale)):(this.canvas.width=t,this.canvas.height=e)),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},i("Initialized CanvasRenderer with size",t,"x",e)}function a(t){return t.length>0}s.prototype=Object.create(o.prototype),s.prototype.setFillStyle=function(t){return this.ctx.fillStyle="object"===typeof t&&t.isColor?t.toString():t,this.ctx},s.prototype.rectangle=function(t,e,n,o,r){this.setFillStyle(r).fillRect(t,e,n,o)},s.prototype.circle=function(t,e,n,o){this.setFillStyle(o),this.ctx.beginPath(),this.ctx.arc(t+n/2,e+n/2,n/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},s.prototype.circleStroke=function(t,e,n,o,r,i){this.circle(t,e,n,o),this.ctx.strokeStyle=i.toString(),this.ctx.stroke()},s.prototype.shadow=function(t,e){var n=function(t){var e={color:/^(#|rgb|hsl|(?!(inset|initial|inherit))\D+)/i,inset:/^inset/i,px:/px$/i},n=["x","y","blur","spread"],o=t.split(/ (?![^(]*\))/),r={};for(var i in e)r[i]=o.filter(e[i].test.bind(e[i])),r[i]=0===r[i].length?null:1===r[i].length?r[i][0]:r[i];for(var s=0;s<r.px.length;s++)r[n[s]]=parseInt(r.px[s]);return r},o=function(t){var e=n(t);e.inset||(r.shadowOffsetX=e.x,r.shadowOffsetY=e.y,r.shadowColor=e.color,r.shadowBlur=e.blur,r.fill())},r=this.setFillStyle("white");r.save(),this.shape(t),e.forEach(o,this),r.restore()},s.prototype.drawShape=function(t,e){this.shape(t),this.setFillStyle(e).fill()},s.prototype.taints=function(t){if(null===t.tainted){this.taintCtx.drawImage(t.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),t.tainted=!1}catch(e){this.taintCtx=document.createElement("canvas").getContext("2d"),t.tainted=!0}}return t.tainted},s.prototype.drawImage=function(t,e,n,o,r,i,s,a,c){this.taints(t)&&!this.options.allowTaint||this.ctx.drawImage(t.image,e,n,o,r,i,s,a,c)},s.prototype.clip=function(t,e,n,o){this.ctx.save(),o&&o.hasTransform()?(this.setTransform(o.inverseTransform()),t.filter(a).forEach((function(t){this.shape(t).clip()}),this),this.setTransform(o.parseTransform())):t.filter(a).forEach((function(t){this.shape(t).clip()}),this),e.call(n),this.ctx.restore()},s.prototype.mask=function(t,e,n,o){var r=t[t.length-1];if(r&&r.length){var i=["rect",this.canvas.width,0,-this.canvas.width,this.canvas.height],s=[i].concat(r).concat([r[0]]);t=t.slice(0,-1).concat([s])}this.clip(t,e,n,o)},s.prototype.shape=function(t){return this.ctx.beginPath(),t.forEach((function(t,e){"rect"===t[0]?this.ctx.rect.apply(this.ctx,t.slice(1)):this.ctx[0===e?"moveTo":t[0]+"To"].apply(this.ctx,t.slice(1))}),this),this.ctx.closePath(),this.ctx},s.prototype.path=function(t){return this.ctx.beginPath(),t.forEach((function(t,e){"rect"===t[0]?this.ctx.rect.apply(this.ctx,t.slice(1)):this.ctx[0===e?"moveTo":t[0]+"To"].apply(this.ctx,t.slice(1))}),this),this.ctx},s.prototype.font=function(t,e,n,o,r,i){n=/^(normal|small-caps)$/i.test(n)?n:"",this.setFillStyle(t).font=[e,n,o,r,i].join(" ").split(",")[0]},s.prototype.fontShadow=function(t,e,n,o){this.setVariable("shadowColor",t.toString()).setVariable("shadowOffsetY",e).setVariable("shadowOffsetX",n).setVariable("shadowBlur",o)},s.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},s.prototype.setOpacity=function(t){this.ctx.globalAlpha=t},s.prototype.setTransform=function(t){this.ctx.translate(t.origin[0],t.origin[1]),this.ctx.transform.apply(this.ctx,t.matrix),this.ctx.translate(-t.origin[0],-t.origin[1])},s.prototype.setVariable=function(t,e){return this.variables[t]!==e&&(this.variables[t]=this.ctx[t]=e),this},s.prototype.text=function(t,e,n){this.ctx.fillText(t,e,n)},s.prototype.backgroundRepeatShape=function(t,e,n,o,r,i,s,a,c){var h=[["line",Math.round(r),Math.round(i)],["line",Math.round(r+s),Math.round(i)],["line",Math.round(r+s),Math.round(a+i)],["line",Math.round(r),Math.round(a+i)]];this.clip([h],(function(){this.renderBackgroundRepeat(t,e,n,o,c[3],c[0])}),this)},s.prototype.renderBackgroundRepeat=function(t,e,n,o,r,i){var s=Math.round(o.left+e.left+r),a=Math.round(o.top+e.top+i);this.setFillStyle(this.ctx.createPattern(this.resizeImage(t,n),"repeat")),this.ctx.translate(s,a),this.ctx.fill(),this.ctx.translate(-s,-a)},s.prototype.renderBackgroundGradient=function(t,e){if(t instanceof r){var n=this.ctx.createLinearGradient(e.left+e.width*t.x0,e.top+e.height*t.y0,e.left+e.width*t.x1,e.top+e.height*t.y1);t.colorStops.forEach((function(t){n.addColorStop(t.stop,t.color.toString())})),this.rectangle(e.left,e.top,e.width,e.height,n)}},s.prototype.resizeImage=function(t,e){var n=t.image;if(n.width===e.width&&n.height===e.height)return n;var o,r=document.createElement("canvas");return r.width=e.width,r.height=e.height,o=r.getContext("2d"),o.drawImage(n,0,0,n.width,n.height,0,0,e.width,e.height),r},e.exports=s},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(t,e,n){var o=t("./nodecontainer");function r(t,e,n,r){o.call(this,n,r),this.ownStacking=t,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*e}r.prototype=Object.create(o.prototype),r.prototype.getParentStack=function(t){var e=this.parent?this.parent.stack:null;return e?e.ownStacking?e:e.getParentStack(t):t.stack},e.exports=r},{"./nodecontainer":14}],22:[function(t,e,n){function o(t){this.rangeBounds=this.testRangeBounds(t),this.cors=this.testCORS(),this.svg=this.testSVG()}o.prototype.testRangeBounds=function(t){var e,n,o,r,i=!1;return t.createRange&&(e=t.createRange(),e.getBoundingClientRect&&(n=t.createElement("boundtest"),n.style.height="123px",n.style.display="block",t.body.appendChild(n),e.selectNode(n),o=e.getBoundingClientRect(),r=o.height,123===r&&(i=!0),t.body.removeChild(n))),i},o.prototype.testCORS=function(){return"undefined"!==typeof(new Image).crossOrigin},o.prototype.testSVG=function(){var t=new Image,e=document.createElement("canvas"),n=e.getContext("2d");t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),e.toDataURL()}catch(o){return!1}return!0},e.exports=o},{}],23:[function(t,e,n){var o=t("./xhr"),r=t("./utils").decode64;function i(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)):o(t)})).then((function(t){return new Promise((function(n){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,n))}))}))}i.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"))},i.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},i.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},i.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},i.prototype.createCanvas=function(t){var e=this;return function(n,o){var r=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=r.lowerCanvasEl,r.setWidth(o.width).setHeight(o.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(n,o)).renderAll(),t(r.lowerCanvasEl)}},i.prototype.decode64=function(t){return"function"===typeof window.atob?window.atob(t):r(t)},e.exports=i},{"./utils":26,"./xhr":28}],24:[function(t,e,n){var o=t("./svgcontainer");function r(t,e){this.src=t,this.image=null;var n=this;this.promise=e?new Promise((function(e,o){n.image=new Image,n.image.onload=e,n.image.onerror=o,n.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),!0===n.image.complete&&e(n.image)})):this.hasFabric().then((function(){return new Promise((function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,n.createCanvas.call(n,e))}))}))}r.prototype=Object.create(o.prototype),e.exports=r},{"./svgcontainer":23}],25:[function(t,e,n){var o=t("./nodecontainer");function r(t,e){o.call(this,t,e)}function i(t,e,n){if(t.length>0)return e+n.toUpperCase()}r.prototype=Object.create(o.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,i);case"uppercase":return e.toUpperCase();default:return e}},e.exports=r},{"./nodecontainer":14}],26:[function(t,e,n){n.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},n.bind=function(t,e){return function(){return t.apply(e,arguments)}},n.decode64=function(t){var e,n,o,r,i,s,a,c,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=t.length,d="";for(e=0;e<l;e+=4)n=h.indexOf(t[e]),o=h.indexOf(t[e+1]),r=h.indexOf(t[e+2]),i=h.indexOf(t[e+3]),s=n<<2|o>>4,a=(15&o)<<4|r>>2,c=(3&r)<<6|i,d+=64===r?String.fromCharCode(s):64===i||-1===i?String.fromCharCode(s,a):String.fromCharCode(s,a,c);return d},n.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),n=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+n,left:e.left,width:n,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},n.offsetBounds=function(t){var e=t.offsetParent?n.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}},n.parseBackgrounds=function(t){var e,n,o,r,i,s,a,c=" \r\n\t",h=[],l=0,d=0,u=function(){e&&('"'===n.substr(0,1)&&(n=n.substr(1,n.length-2)),n&&a.push(n),"-"===e.substr(0,1)&&(r=e.indexOf("-",1)+1)>0&&(o=e.substr(0,r),e=e.substr(r)),h.push({prefix:o,method:e.toLowerCase(),value:i,args:a,image:null})),a=[],e=o=n=i=""};return a=[],e=o=n=i="",t.split("").forEach((function(t){if(!(0===l&&c.indexOf(t)>-1)){switch(t){case'"':s?s===t&&(s=null):s=t;break;case"(":if(s)break;if(0===l)return l=1,void(i+=t);d++;break;case")":if(s)break;if(1===l){if(0===d)return l=0,i+=t,void u();d--}break;case",":if(s)break;if(0===l)return void u();if(1===l&&0===d&&!e.match(/^url$/i))return a.push(n),n="",void(i+=t);break}i+=t,0===l?e+=t:n+=t}})),u(),h}},{}],27:[function(t,e,n){var o=t("./gradientcontainer");function r(t){o.apply(this,arguments),this.type="linear"===t.args[0]?o.TYPES.LINEAR:o.TYPES.RADIAL}r.prototype=Object.create(o.prototype),e.exports=r},{"./gradientcontainer":9}],28:[function(t,e,n){function o(t){return new Promise((function(e,n){var o=new XMLHttpRequest;o.open("GET",t),o.onload=function(){200===o.status?e(o.responseText):n(new Error(o.statusText))},o.onerror=function(){n(new Error("Network Error"))},o.send()}))}e.exports=o},{}]},{},[4])(4)}))}).call(this,n("c8ba"))},baa5:function(t,e,n){var o=n("23e7"),r=n("e58c");o({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},cb29:function(t,e,n){var o=n("23e7"),r=n("81d5"),i=n("44d2");o({target:"Array",proto:!0},{fill:r}),i("fill")},fe60:function(t,e,n){t.exports=n.p+"static/img/erwei1.09989b61.jpg"}}]);
|