y&&i("overflow"),g==t){for(c=n,d=b;p=d<=a?w:d>=a+E?E:d-a,!(c= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=b-w,C=Math.floor,L=String.fromCharCode;v={version:"1.4.1",ucs2:{decode:s,encode:c},decode:p,encode:g,toASCII:function(e){return l(e,function(e){return x.test(e)?"xn--"+g(e):e})},toUnicode:function(e){return l(e,function(e){return P.test(e)?p(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return v}.call(t,n,t,e))||(e.exports=o)}()}).call(t,n(39)(e),n(40))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t.default=function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.PATH.CIRCLE,this.x=t,this.y=n,this.radius=o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n0?n.width:r.width,i="number"==typeof n.height&&n.height>0?n.height:r.height;o>0&&i>0&&t.target.clip([(0,a.calculatePaddingBoxPath)(e.curvedBounds)],function(){t.target.drawImage(n,new a.Bounds(0,0,o,i),r)})}}},r=e.getClipPaths();r.length?this.target.clip(r,n):n()}},{key:"renderNodeBackgroundAndBorders",value:function(e){var t=this,n=!e.style.background.backgroundColor.isTransparent()||e.style.background.backgroundImage.length,r=e.style.border.filter(function(e){return e.borderStyle!==s.BORDER_STYLE.NONE&&!e.borderColor.isTransparent()}),o=function(){var o=(0,l.calculateBackgroungPaintingArea)(e.curvedBounds,e.style.background.backgroundClip);n&&t.target.clip([o],function(){e.style.background.backgroundColor.isTransparent()||t.target.fill(e.style.background.backgroundColor),t.renderBackgroundImage(e)}),r.forEach(function(n,r){t.renderBorder(n,r,e.curvedBounds)})};if(n||r.length){var a=e.parent?e.parent.getClipPaths():[];a.length?this.target.clip(a,o):o()}}},{key:"renderBackgroundImage",value:function(e){var t=this;e.style.background.backgroundImage.slice(0).reverse().forEach(function(n){"url"===n.source.method&&n.source.args.length?t.renderBackgroundRepeat(e,n):/gradient/i.test(n.source.method)&&t.renderBackgroundGradient(e,n)})}},{key:"renderBackgroundRepeat",value:function(e,t){var n=this.options.imageStore.get(t.source.args[0]);if(n){var r=(0,l.calculateBackgroungPositioningArea)(e.style.background.backgroundOrigin,e.bounds,e.style.padding,e.style.border),o=(0,l.calculateBackgroundSize)(t,n,r),a=(0,l.calculateBackgroundPosition)(t.position,o,r),i=(0,l.calculateBackgroundRepeatPath)(t,a,o,r,e.bounds),u=Math.round(r.left+a.x),s=Math.round(r.top+a.y);this.target.renderRepeat(i,n,o,u,s)}}},{key:"renderBackgroundGradient",value:function(e,t){var n=(0,l.calculateBackgroungPositioningArea)(e.style.background.backgroundOrigin,e.bounds,e.style.padding,e.style.border),r=(0,l.calculateGradientBackgroundSize)(t,n),o=(0,l.calculateBackgroundPosition)(t.position,r,n),u=new a.Bounds(Math.round(n.left+o.x),Math.round(n.top+o.y),r.width,r.height),s=(0,i.parseGradient)(e,t.source,u);if(s)switch(s.type){case i.GRADIENT_TYPE.LINEAR_GRADIENT:this.target.renderLinearGradient(u,s);break;case i.GRADIENT_TYPE.RADIAL_GRADIENT:this.target.renderRadialGradient(u,s)}}},{key:"renderBorder",value:function(e,t,n){this.target.drawShape((0,a.parsePathForBorder)(n,t),e.borderColor)}},{key:"renderStack",value:function(e){var t=this;if(e.container.isVisible()){var n=e.getOpacity();n!==this._opacity&&(this.target.setOpacity(e.getOpacity()),this._opacity=n);var r=e.container.style.transform;null!==r?this.target.transform(e.container.bounds.left+r.transformOrigin[0].value,e.container.bounds.top+r.transformOrigin[1].value,r.transform,function(){return t.renderStackContent(e)}):this.renderStackContent(e)}}},{key:"renderStackContent",value:function(e){var t=f(e),n=r(t,5),o=n[0],a=n[1],i=n[2],u=n[3],l=n[4],s=d(e),c=r(s,2),p=c[0],g=c[1];this.renderNodeBackgroundAndBorders(e.container),o.sort(h).forEach(this.renderStack,this),this.renderNodeContent(e.container),g.forEach(this.renderNode,this),u.forEach(this.renderStack,this),l.forEach(this.renderStack,this),p.forEach(this.renderNode,this),a.forEach(this.renderStack,this),i.sort(h).forEach(this.renderStack,this)}},{key:"render",value:function(e){this.options.backgroundColor&&this.target.rectangle(this.options.x,this.options.y,this.options.width,this.options.height,this.options.backgroundColor),this.renderStack(e);var t=this.target.getTarget();return t}}]),e}();t.default=c;var d=function(e){for(var t=[],n=[],r=e.children.length,o=0;o0?r.push(l):n.push(l):l.container.isFloating()?o.push(l):a.push(l)}return[t,n,r,o,a]},h=function(e,t){return e.container.style.zIndex.order>t.container.style.zIndex.order?1:e.container.style.zIndex.ordert.container.index?1:-1}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.transformWebkitRadialGradientArgs=t.parseGradient=t.RadialGradient=t.LinearGradient=t.RADIAL_GRADIENT_SHAPE=t.GRADIENT_TYPE=void 0;var a=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=(r(n(5)),n(44)),u=r(n(0)),l=n(2),s=r(l),c=n(3),d=/^(to )?(left|top|right|bottom)( (left|top|right|bottom))?$/i,f=/^([+-]?\d*\.?\d+)% ([+-]?\d*\.?\d+)%$/i,h=/(px)|%|( 0)$/i,p=/^(from|to|color-stop)\((?:([\d.]+)(%)?,\s*)?(.+?)\)$/i,g=/^\s*(circle|ellipse)?\s*((?:([\d.]+)(px|r?em|%)\s*(?:([\d.]+)(px|r?em|%))?)|closest-side|closest-corner|farthest-side|farthest-corner)?\s*(?:at\s*(?:(left|center|right)|([\d.]+)(px|r?em|%))\s+(?:(top|center|bottom)|([\d.]+)(px|r?em|%)))?(?:\s|$)/i,m=t.GRADIENT_TYPE={LINEAR_GRADIENT:0,RADIAL_GRADIENT:1},v=t.RADIAL_GRADIENT_SHAPE={CIRCLE:0,ELLIPSE:1},y={left:new s.default("0%"),top:new s.default("0%"),center:new s.default("50%"),right:new s.default("100%"),bottom:new s.default("100%")},b=t.LinearGradient=function e(t,n){o(this,e),this.type=m.LINEAR_GRADIENT,this.colorStops=t,this.direction=n},w=t.RadialGradient=function e(t,n,r,a){o(this,e),this.type=m.RADIAL_GRADIENT,this.colorStops=t,this.shape=n,this.center=r,this.radius=a},E=(t.parseGradient=function(e,t,n){var r=t.args,o=t.method,a=t.prefix;return"linear-gradient"===o?T(r,n,!!a):"gradient"===o&&"linear"===r[0]?T(["to bottom"].concat(N(r.slice(3))),n,!!a):"radial-gradient"===o?O(e,"-webkit-"===a?A(r):r,n):"gradient"===o&&"radial"===r[0]?O(e,N(A(r.slice(1))),n):void 0},function(e,t,n){for(var r=[],o=t;oe.optimumDistance)?{optimumCorner:o,optimumDistance:a}:e},{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},S=function(e,t,n,r,o){var a=n.x,i=n.y,u=0,l=0;switch(e){case"closest-side":t===v.CIRCLE?u=l=Math.min(Math.abs(a),Math.abs(a-o.width),Math.abs(i),Math.abs(i-o.height)):t===v.ELLIPSE&&(u=Math.min(Math.abs(a),Math.abs(a-o.width)),l=Math.min(Math.abs(i),Math.abs(i-o.height)));break;case"closest-corner":if(t===v.CIRCLE)u=l=Math.min((0,c.distance)(a,i),(0,c.distance)(a,i-o.height),(0,c.distance)(a-o.width,i),(0,c.distance)(a-o.width,i-o.height));else if(t===v.ELLIPSE){var s=Math.min(Math.abs(i),Math.abs(i-o.height))/Math.min(Math.abs(a),Math.abs(a-o.width)),d=x(o,a,i,!0);l=s*(u=(0,c.distance)(d.x-a,(d.y-i)/s))}break;case"farthest-side":t===v.CIRCLE?u=l=Math.max(Math.abs(a),Math.abs(a-o.width),Math.abs(i),Math.abs(i-o.height)):t===v.ELLIPSE&&(u=Math.max(Math.abs(a),Math.abs(a-o.width)),l=Math.max(Math.abs(i),Math.abs(i-o.height)));break;case"farthest-corner":if(t===v.CIRCLE)u=l=Math.max((0,c.distance)(a,i),(0,c.distance)(a,i-o.height),(0,c.distance)(a-o.width,i),(0,c.distance)(a-o.width,i-o.height));else if(t===v.ELLIPSE){var f=Math.max(Math.abs(i),Math.abs(i-o.height))/Math.max(Math.abs(a),Math.abs(a-o.width)),h=x(o,a,i,!1);l=f*(u=(0,c.distance)(h.x-a,(h.y-i)/f))}break;default:u=r.x||0,l=void 0!==r.y?r.y:u}return{x:u,y:l}},A=t.transformWebkitRadialGradientArgs=function(e){var t="",n="",r="",o="",a=0,i=/^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i,u=/^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i,l=e[a].match(i);l&&a++;var s=e[a].match(/^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i);s&&(t=s[1]||"","contain"===(r=s[2]||"")?r="closest-side":"cover"===r&&(r="farthest-corner"),a++);var c=e[a].match(u);c&&a++;var d=e[a].match(i);d&&a++;var f=e[a].match(u);f&&a++;var h=d||l;h&&h[1]&&(o=h[1]+(/^\d+$/.test(h[1])?"px":""),h[2]&&(o+=" "+h[2]+(/^\d+$/.test(h[2])?"px":"")));var p=f||c;return p&&(n=p[0],p[1]||(n+="px")),!o||t||n||r||(n=o,o=""),o&&(o="at "+o),[[t,r,n,o].filter(function(e){return!!e}).join(" ")].concat(e.slice(a))},N=function(e){return e.map(function(e){return e.match(p)}).map(function(t,n){if(!t)return e[n];switch(t[1]){case"from":return t[4]+" 0%";case"to":return t[4]+" 100%";case"color-stop":return"%"===t[3]?t[4]+" "+t[2]:t[4]+" "+100*parseFloat(t[2])+"%"}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/([+-]?\d*\.?\d+)(deg|grad|rad|turn)/i;t.parseAngle=function(e){var t=e.match(r);if(t){var n=parseFloat(t[1]);switch(t[2].toLowerCase()){case"deg":return Math.PI*n/180;case"grad":return Math.PI/200*n;case"rad":return n;case"turn":return 2*Math.PI*n}}return null}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.cloneWindow=t.DocumentCloner=void 0;var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function e(e,t){for(var n=0;n1&&(n.backgroundColor=""),n.backgroundImage=e.join(",")}),e instanceof HTMLImageElement&&this.resourceLoader.inlineImage(e.src).then(function(t){if(t&&e instanceof HTMLImageElement&&e.parentNode){var n=e.parentNode,r=(0,s.copyCSSStyles)(e.style,t.cloneNode(!1));n.replaceChild(r,e)}}).catch(function(e){0})}}},{key:"inlineFonts",value:function(e){var t=this;return Promise.all(Array.from(e.styleSheets).map(function(t){return t.href?fetch(t.href).then(function(e){return e.text()}).then(function(e){return g(e,t.href)}).catch(function(e){return[]}):p(t,e)})).then(function(e){return e.reduce(function(e,t){return e.concat(t)},[])}).then(function(e){return Promise.all(e.map(function(e){return fetch(e.formats[0].src).then(function(e){return e.blob()}).then(function(e){return new Promise(function(t,n){var r=new FileReader;r.onerror=n,r.onload=function(){var e=r.result;t(e)},r.readAsDataURL(e)})}).then(function(t){return e.fontFace.setProperty("src",'url("'+t+'")'),"@font-face {"+e.fontFace.cssText+" "})}))}).then(function(n){var r=e.createElement("style");r.textContent=n.join("\n"),t.documentElement.appendChild(r)})}},{key:"createElementClone",value:function(e){var t=this;if(this.copyStyles&&e instanceof HTMLCanvasElement){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch(e){0}}if(e instanceof HTMLIFrameElement){var r=e.cloneNode(!1),o=x();r.setAttribute("data-html2canvas-internal-iframe-key",o);var a=(0,i.parseBounds)(e,0,0),u=a.width,l=a.height;return this.resourceLoader.cache[o]=A(e,this.options).then(function(e){return t.renderer(e,{async:t.options.async,allowTaint:t.options.allowTaint,backgroundColor:"#ffffff",canvas:null,imageTimeout:t.options.imageTimeout,logging:t.options.logging,proxy:t.options.proxy,removeContainer:t.options.removeContainer,scale:t.options.scale,foreignObjectRendering:t.options.foreignObjectRendering,target:new d.default,width:u,height:l,x:0,y:0,windowWidth:e.ownerDocument.defaultView.innerWidth,windowHeight:e.ownerDocument.defaultView.innerHeight,scrollX:e.ownerDocument.defaultView.pageXOffset,scrollY:e.ownerDocument.defaultView.pageYOffset},t.logger.child(o))}).then(function(t){return new Promise(function(n,o){var a=document.createElement("img");a.onload=function(){return n(t)},a.onerror=o,a.src=t.toDataURL(),r.parentNode&&r.parentNode.replaceChild((0,s.copyCSSStyles)(e.ownerDocument.defaultView.getComputedStyle(e),a),r)})}),r}return e.cloneNode(!1)}},{key:"cloneNode",value:function(e){var t=e.nodeType===Node.TEXT_NODE?document.createTextNode(e.nodeValue):this.createElementClone(e),n=e.ownerDocument.defaultView;this.referenceElement===e&&t instanceof n.HTMLElement&&(this.clonedReferenceElement=t),t instanceof n.HTMLBodyElement&&_(t);for(var r=e.firstChild;r;r=r.nextSibling)(r.nodeType!==Node.ELEMENT_NODE||"SCRIPT"!==r.nodeName&&!r.hasAttribute(f))&&(this.copyStyles&&"STYLE"===r.nodeName||t.appendChild(this.cloneNode(r)));if(e instanceof n.HTMLElement&&t instanceof n.HTMLElement)switch(this.inlineAllImages(v(e,t,w)),this.inlineAllImages(v(e,t,E)),!this.copyStyles||e instanceof HTMLIFrameElement||(0,s.copyCSSStyles)(e.ownerDocument.defaultView.getComputedStyle(e),t),this.inlineAllImages(t),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([t,e.scrollLeft,e.scrollTop]),e.nodeName){case"CANVAS":this.copyStyles||m(e,t);break;case"TEXTAREA":case"SELECT":t.value=e.value}return t}}]),e}(),p=function(e,t){return(e.cssRules?Array.from(e.cssRules):[]).filter(function(e){return e.type===CSSRule.FONT_FACE_RULE}).map(function(e){for(var n=(0,c.parseBackgroundImage)(e.style.getPropertyValue("src")),r=[],o=0;o0&&"complete"===n.readyState&&(clearInterval(t),r(e))},50)}})};t.cloneWindow=function(e,t,n,r,o,a){var i=new h(n,r,o,!1,a),u=e.defaultView.pageXOffset,l=e.defaultView.pageYOffset;return N(e,t).then(function(r){var o=r.contentWindow,a=o.document,s=C(r).then(function(){return i.scrolledElements.forEach(P),o.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||o.scrollY===t.top&&o.scrollX===t.left||(a.documentElement.style.top=-t.top+"px",a.documentElement.style.left=-t.left+"px",a.documentElement.style.position="absolute"),i.clonedReferenceElement instanceof o.HTMLElement||i.clonedReferenceElement instanceof e.defaultView.HTMLElement||i.clonedReferenceElement instanceof HTMLElement?Promise.resolve([r,i.clonedReferenceElement,i.resourceLoader]):Promise.reject("")});return a.open(),a.write(""),function(e,t,n){!e.defaultView||t===e.defaultView.pageXOffset&&n===e.defaultView.pageYOffset||e.defaultView.scrollTo(t,n)}(n.ownerDocument,u,l),a.replaceChild(a.adoptNode(i.documentElement),a.documentElement),a.close(),s})}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceStore=void 0;var o=function(){function e(e,t){for(var n=0;n