/*! * html2canvas 1.0.0-alpha.4 * Copyright (c) 2017 Niklas von Hertzen * Released under MIT License */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.html2canvas=t():e.html2canvas=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=22)}([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;n4)&&[Number(t[1]),Number(t[2]),Number(t[3]),Number(t[4])]},h=function(e){return[Math.min(e[0],255),Math.min(e[1],255),Math.min(e[2],255),e.length>3?e[3]:null]},p=function(e){var t=m[e.toLowerCase()];return t||!1},g=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=Array.isArray(t)?h(t):i(t)||c(t)||f(t)||p(t)||l(t)||[0,0,0,null],o=r(n,4),a=o[0],u=o[1],s=o[2],d=o[3];this.r=a,this.g=u,this.b=s,this.a=d}return o(e,[{key:"isTransparent",value:function(){return 0===this.a}},{key:"toString",value:function(){return null!==this.a&&1!==this.a?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":"rgb("+this.r+","+this.g+","+this.b+")"}}]),e}();t.default=g;var m={transparent:[0,0,0,0],aliceblue:[240,248,255,null],antiquewhite:[250,235,215,null],aqua:[0,255,255,null],aquamarine:[127,255,212,null],azure:[240,255,255,null],beige:[245,245,220,null],bisque:[255,228,196,null],black:[0,0,0,null],blanchedalmond:[255,235,205,null],blue:[0,0,255,null],blueviolet:[138,43,226,null],brown:[165,42,42,null],burlywood:[222,184,135,null],cadetblue:[95,158,160,null],chartreuse:[127,255,0,null],chocolate:[210,105,30,null],coral:[255,127,80,null],cornflowerblue:[100,149,237,null],cornsilk:[255,248,220,null],crimson:[220,20,60,null],cyan:[0,255,255,null],darkblue:[0,0,139,null],darkcyan:[0,139,139,null],darkgoldenrod:[184,134,11,null],darkgray:[169,169,169,null],darkgreen:[0,100,0,null],darkgrey:[169,169,169,null],darkkhaki:[189,183,107,null],darkmagenta:[139,0,139,null],darkolivegreen:[85,107,47,null],darkorange:[255,140,0,null],darkorchid:[153,50,204,null],darkred:[139,0,0,null],darksalmon:[233,150,122,null],darkseagreen:[143,188,143,null],darkslateblue:[72,61,139,null],darkslategray:[47,79,79,null],darkslategrey:[47,79,79,null],darkturquoise:[0,206,209,null],darkviolet:[148,0,211,null],deeppink:[255,20,147,null],deepskyblue:[0,191,255,null],dimgray:[105,105,105,null],dimgrey:[105,105,105,null],dodgerblue:[30,144,255,null],firebrick:[178,34,34,null],floralwhite:[255,250,240,null],forestgreen:[34,139,34,null],fuchsia:[255,0,255,null],gainsboro:[220,220,220,null],ghostwhite:[248,248,255,null],gold:[255,215,0,null],goldenrod:[218,165,32,null],gray:[128,128,128,null],green:[0,128,0,null],greenyellow:[173,255,47,null],grey:[128,128,128,null],honeydew:[240,255,240,null],hotpink:[255,105,180,null],indianred:[205,92,92,null],indigo:[75,0,130,null],ivory:[255,255,240,null],khaki:[240,230,140,null],lavender:[230,230,250,null],lavenderblush:[255,240,245,null],lawngreen:[124,252,0,null],lemonchiffon:[255,250,205,null],lightblue:[173,216,230,null],lightcoral:[240,128,128,null],lightcyan:[224,255,255,null],lightgoldenrodyellow:[250,250,210,null],lightgray:[211,211,211,null],lightgreen:[144,238,144,null],lightgrey:[211,211,211,null],lightpink:[255,182,193,null],lightsalmon:[255,160,122,null],lightseagreen:[32,178,170,null],lightskyblue:[135,206,250,null],lightslategray:[119,136,153,null],lightslategrey:[119,136,153,null],lightsteelblue:[176,196,222,null],lightyellow:[255,255,224,null],lime:[0,255,0,null],limegreen:[50,205,50,null],linen:[250,240,230,null],magenta:[255,0,255,null],maroon:[128,0,0,null],mediumaquamarine:[102,205,170,null],mediumblue:[0,0,205,null],mediumorchid:[186,85,211,null],mediumpurple:[147,112,219,null],mediumseagreen:[60,179,113,null],mediumslateblue:[123,104,238,null],mediumspringgreen:[0,250,154,null],mediumturquoise:[72,209,204,null],mediumvioletred:[199,21,133,null],midnightblue:[25,25,112,null],mintcream:[245,255,250,null],mistyrose:[255,228,225,null],moccasin:[255,228,181,null],navajowhite:[255,222,173,null],navy:[0,0,128,null],oldlace:[253,245,230,null],olive:[128,128,0,null],olivedrab:[107,142,35,null],orange:[255,165,0,null],orangered:[255,69,0,null],orchid:[218,112,214,null],palegoldenrod:[238,232,170,null],palegreen:[152,251,152,null],paleturquoise:[175,238,238,null],palevioletred:[219,112,147,null],papayawhip:[255,239,213,null],peachpuff:[255,218,185,null],peru:[205,133,63,null],pink:[255,192,203,null],plum:[221,160,221,null],powderblue:[176,224,230,null],purple:[128,0,128,null],rebeccapurple:[102,51,153,null],red:[255,0,0,null],rosybrown:[188,143,143,null],royalblue:[65,105,225,null],saddlebrown:[139,69,19,null],salmon:[250,128,114,null],sandybrown:[244,164,96,null],seagreen:[46,139,87,null],seashell:[255,245,238,null],sienna:[160,82,45,null],silver:[192,192,192,null],skyblue:[135,206,235,null],slateblue:[106,90,205,null],slategray:[112,128,144,null],slategrey:[112,128,144,null],snow:[255,250,250,null],springgreen:[0,255,127,null],steelblue:[70,130,180,null],tan:[210,180,140,null],teal:[0,128,128,null],thistle:[216,191,216,null],tomato:[255,99,71,null],turquoise:[64,224,208,null],violet:[238,130,238,null],wheat:[245,222,179,null],white:[255,255,255,null],whitesmoke:[245,245,245,null],yellow:[255,255,0,null],yellowgreen:[154,205,50,null]};t.TRANSPARENT=new g([0,0,0,0])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.parseBoundCurves=t.calculatePaddingBoxPath=t.calculateBorderBoxPath=t.parsePathForBorder=t.parseDocumentSize=t.calculateContentBox=t.calculatePaddingBox=t.parseBounds=t.Bounds=void 0;var o=function(){function e(e,t){for(var n=0;n0||u>0?c(e.left,e.top,i,u,s.TOP_LEFT):new a.default(e.left,e.top),topLeftInner:i>0||u>0?c(e.left+t[3].borderWidth,e.top+t[0].borderWidth,Math.max(0,i-t[3].borderWidth),Math.max(0,u-t[0].borderWidth),s.TOP_LEFT):new a.default(e.left+t[3].borderWidth,e.top+t[0].borderWidth),topRightOuter:l>0||d>0?c(e.left+m,e.top,l,d,s.TOP_RIGHT):new a.default(e.left+e.width,e.top),topRightInner:l>0||d>0?c(e.left+Math.min(m,e.width+t[3].borderWidth),e.top+t[0].borderWidth,m>e.width+t[3].borderWidth?0:l-t[3].borderWidth,d-t[0].borderWidth,s.TOP_RIGHT):new a.default(e.left+e.width-t[1].borderWidth,e.top+t[0].borderWidth),bottomRightOuter:f>0||h>0?c(e.left+y,e.top+v,f,h,s.BOTTOM_RIGHT):new a.default(e.left+e.width,e.top+e.height),bottomRightInner:f>0||h>0?c(e.left+Math.min(y,e.width-t[3].borderWidth),e.top+Math.min(v,e.height+t[0].borderWidth),Math.max(0,f-t[1].borderWidth),h-t[2].borderWidth,s.BOTTOM_RIGHT):new a.default(e.left+e.width-t[1].borderWidth,e.top+e.height-t[2].borderWidth),bottomLeftOuter:p>0||g>0?c(e.left,e.top+b,p,g,s.BOTTOM_LEFT):new a.default(e.left,e.top+e.height),bottomLeftInner:p>0||g>0?c(e.left+t[3].borderWidth,e.top+b,Math.max(0,p-t[3].borderWidth),g-t[2].borderWidth,s.BOTTOM_LEFT):new a.default(e.left+t[3].borderWidth,e.top+e.height-t[2].borderWidth)}},{TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_RIGHT:2,BOTTOM_LEFT:3}),c=function(e,t,n,r,o){var u=(Math.sqrt(2)-1)/3*4,l=n*u,c=r*u,d=e+n,f=t+r;switch(o){case s.TOP_LEFT:return new i.default(new a.default(e,f),new a.default(e,f-c),new a.default(d-l,t),new a.default(d,t));case s.TOP_RIGHT:return new i.default(new a.default(e,t),new a.default(e+l,t),new a.default(d,f-c),new a.default(d,f));case s.BOTTOM_RIGHT:return new i.default(new a.default(d,t),new a.default(d,t+c),new a.default(e+l,f),new a.default(e,f));case s.BOTTOM_LEFT:default:return new i.default(new a.default(d,f),new a.default(d-l,f),new a.default(e,t+c),new a.default(e,t))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateLengthFromValueWithUnit=t.LENGTH_TYPE=void 0;var r=function(){function e(e,t){for(var n=0;n=0;n--){var r=e.item(n);"content"!==r&&t.style.setProperty(r,e.getPropertyValue(r))}return t},t.SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PATH={VECTOR:0,BEZIER_CURVE:1,CIRCLE:2}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&this.style.visibility===w.VISIBILITY.VISIBLE}},{key:"isAbsolutelyPositioned",value:function(){return this.style.position!==g.POSITION.STATIC&&this.style.position!==g.POSITION.RELATIVE}},{key:"isPositioned",value:function(){return this.style.position!==g.POSITION.STATIC}},{key:"isFloating",value:function(){return this.style.float!==c.FLOAT.NONE}},{key:"isRootElement",value:function(){return null===this.parent}},{key:"isTransformed",value:function(){return null!==this.style.transform}},{key:"isPositionedWithZIndex",value:function(){return this.isPositioned()&&!this.style.zIndex.auto}},{key:"isInlineLevel",value:function(){return(0,a.contains)(this.style.display,s.DISPLAY.INLINE)||(0,a.contains)(this.style.display,s.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,s.DISPLAY.INLINE_FLEX)||(0,a.contains)(this.style.display,s.DISPLAY.INLINE_GRID)||(0,a.contains)(this.style.display,s.DISPLAY.INLINE_LIST_ITEM)||(0,a.contains)(this.style.display,s.DISPLAY.INLINE_TABLE)}},{key:"isInlineBlockOrInlineTable",value:function(){return(0,a.contains)(this.style.display,s.DISPLAY.INLINE_BLOCK)||(0,a.contains)(this.style.display,s.DISPLAY.INLINE_TABLE)}}]),e}();t.default=_;var R=function(e,t){if(e instanceof e.ownerDocument.defaultView.SVGSVGElement||e instanceof SVGSVGElement){var n=new XMLSerializer;return t.loadImage("data:image/svg+xml,"+encodeURIComponent(n.serializeToString(e)))}switch(e.tagName){case"IMG":var r=e;return t.loadImage(r.currentSrc||r.src);case"CANVAS":var o=e;return t.loadCanvas(o);case"IFRAME":var a=e.getAttribute("data-html2canvas-internal-iframe-key");if(a)return a}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.parseBackgroundImage=t.parseBackground=t.calculateBackgroundRepeatPath=t.calculateBackgroundPosition=t.calculateBackgroungPositioningArea=t.calculateBackgroungPaintingArea=t.calculateGradientBackgroundSize=t.calculateBackgroundSize=t.BACKGROUND_ORIGIN=t.BACKGROUND_CLIP=t.BACKGROUND_SIZE=t.BACKGROUND_REPEAT=void 0;var o=r(n(0)),a=r(n(2)),i=r(n(26)),u=r(n(7)),l=n(1),s=n(14),c=t.BACKGROUND_REPEAT={REPEAT:0,NO_REPEAT:1,REPEAT_X:2,REPEAT_Y:3},d=t.BACKGROUND_SIZE={AUTO:0,CONTAIN:1,COVER:2,LENGTH:3},f=t.BACKGROUND_CLIP={BORDER_BOX:0,PADDING_BOX:1,CONTENT_BOX:2},h=t.BACKGROUND_ORIGIN=f,p=function e(t){switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){case"contain":this.size=d.CONTAIN;break;case"cover":this.size=d.COVER;break;case"auto":this.size=d.AUTO;break;default:this.value=new a.default(t)}},g=(t.calculateBackgroundSize=function(e,t,n){var r=0,o=0,a=e.size;if(a[0].size===d.CONTAIN||a[0].size===d.COVER){var u=n.width/n.height,l=t.width/t.height;return u0&&(e=o.substr(0,t).toLowerCase(),o=o.substr(t)),"none"!==(o=o.toLowerCase())&&n.push({prefix:e,method:o,args:r})}r=[],o=i=""};return e.split("").forEach(function(e){if(0!==u||!t.test(e)){switch(e){case'"':a?a===e&&(a=null):a=e;break;case"(":if(a)break;if(0===u)return void(u=1);l++;break;case")":if(a)break;if(1===u){if(0===l)return u=0,void s();l--}break;case",":if(a)break;if(0===u)return void s();if(1===u&&0===l&&!o.match(/^url$/i))return r.push(i.trim()),void(i="")}0===u?o+=e:i+=e}}),s(),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.PATH.VECTOR,this.x=t,this.y=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),o=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},a={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var n=e.createElement("boundtest");n.style.height="123px",n.style.display="block",e.body.appendChild(n),t.selectNode(n);var r=t.getBoundingClientRect(),o=Math.round(r.height);if(e.body.removeChild(n),123===o)return!0}}return!1}(document);return Object.defineProperty(a,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");t.src="data:image/svg+xml,";try{r.drawImage(t,0,0),n.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(a,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_BASE64_DRAWING(){return function(e){var t=function(e,t){var n=new Image,r=e.createElement("canvas"),o=r.getContext("2d");return new Promise(function(e){n.src=t;var a=function(){try{o.drawImage(n,0,0),r.toDataURL()}catch(t){return e(!1)}return e(!0)};n.onload=a,n.onerror=function(){return e(!1)},!0===n.complete&&setTimeout(function(){a()},500)})}(document,e);return Object.defineProperty(a,"SUPPORT_BASE64_DRAWING",{value:function(){return t}}),t}},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas");t.width=100,t.height=100;var n=t.getContext("2d");n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,100,100);var a=new Image,i=t.toDataURL();a.src=i;var u=(0,r.createForeignObjectSVG)(100,100,0,0,a);return n.fillStyle="red",n.fillRect(0,0,100,100),(0,r.loadSerializedSVG)(u).then(function(t){n.drawImage(t,0,0);var a=n.getImageData(0,0,100,100).data;n.fillStyle="red",n.fillRect(0,0,100,100);var u=e.createElement("div");return u.style.backgroundImage="url("+i+")",u.style.height="100px",o(a)?(0,r.loadSerializedSVG)((0,r.createForeignObjectSVG)(100,100,0,0,u)):Promise.reject(!1)}).then(function(e){return n.drawImage(e,0,0),o(n.getImageData(0,0,100,100).data)}).catch(function(e){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(a,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(a,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(a,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(a,"SUPPORT_CORS_XHR",{value:e}),e}};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTextDecoration=t.TEXT_DECORATION_LINE=t.TEXT_DECORATION=t.TEXT_DECORATION_STYLE=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),o=t.TEXT_DECORATION_STYLE={SOLID:0,DOUBLE:1,DOTTED:2,DASHED:3,WAVY:4},a=t.TEXT_DECORATION={NONE:null},i=t.TEXT_DECORATION_LINE={UNDERLINE:1,OVERLINE:2,LINE_THROUGH:3,BLINK:4},u=function(e){switch(e){case"underline":return i.UNDERLINE;case"overline":return i.OVERLINE;case"line-through":return i.LINE_THROUGH}return i.BLINK};t.parseTextDecoration=function(e){var t=function(e){return"none"===e?null:e.split(" ").map(u)}(e.textDecorationLine?e.textDecorationLine:e.textDecoration);if(null===t)return a.NONE;return{textDecorationLine:t,textDecorationColor:e.textDecorationColor?new r.default(e.textDecorationColor):null,textDecorationStyle:function(e){switch(e){case"double":return o.DOUBLE;case"dotted":return o.DOTTED;case"dashed":return o.DASHED;case"wavy":return o.WAVY}return o.SOLID}(e.textDecorationStyle)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseBorder=t.BORDER_SIDES=t.BORDER_STYLE=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),o=t.BORDER_STYLE={NONE:0,SOLID:1},a=t.BORDER_SIDES={TOP:0,RIGHT:1,BOTTOM:2,LEFT:3},i=Object.keys(a).map(function(e){return e.toLowerCase()});t.parseBorder=function(e){return i.map(function(t){var n=new r.default(e.getPropertyValue("border-"+t+"-color")),a=function(e){switch(e){case"none":return o.NONE}return o.SOLID}(e.getPropertyValue("border-"+t+"-style")),i=parseFloat(e.getPropertyValue("border-"+t+"-width"));return{borderColor:n,borderStyle:a,borderWidth:isNaN(i)?0:i}})}},function(e,t,n){"use strict";function r(e,t,n){return e.length>0?t+n.toUpperCase():e}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;ne.height?(e.left+=(e.width-e.height)/2,e.width=e.height):e.width0&&a){var i=t.ownerDocument.createElement("html2canvaswrapper");(0,d.copyCSSStyles)(t.ownerDocument.defaultView.getComputedStyle(t,null),i),i.style.position="fixed",i.style.left=n.bounds.left+"px",i.style.top=n.bounds.top+"px",r||(i.style.whiteSpace="nowrap");var u=t.ownerDocument.createTextNode(e);i.appendChild(u),a.appendChild(i),n.childNodes.push(o.default.fromTextNode(u,n)),a.removeChild(i)}}),T=function(e){var t="password"===e.type?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTextBounds=t.TextBounds=void 0;var r=n(38),o=n(1),a=n(9),i=function(e){return e&&e.__esModule?e:{default:e}}(n(8)),u=/[^\u0000-\u00ff]/,l=function(e){return r.ucs2.encode([e])},s=t.TextBounds=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.text=t,this.bounds=n},c=(t.parseTextBounds=function(e,t,n){for(var o=r.ucs2.decode(e),h=0!==t.style.letterSpacing||function(e){return u.test(e)}(e)?o.map(l):f(o),p=h.length,g=n.parentNode?n.parentNode.ownerDocument.defaultView:null,m=g?g.pageXOffset:0,v=g?g.pageYOffset:0,y=[],b=0,w=0;w0)if(i.default.SUPPORT_RANGE_BOUNDS)y.push(new s(E,d(n,b,E.length,m,v)));else{var T=n.splitText(E.length);y.push(new s(E,c(n,m,v))),n=T}else i.default.SUPPORT_RANGE_BOUNDS||(n=n.splitText(E.length));b+=E.length}return y},function(e,t,n){var r=e.ownerDocument.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var a=e.parentNode;if(a){a.replaceChild(r,e);var i=(0,o.parseBounds)(r,t,n);return r.firstChild&&a.replaceChild(r.firstChild,r),i}return new o.Bounds(0,0,0,0)}),d=function(e,t,n,r,a){var i=e.ownerDocument.createRange();return i.setStart(e,t),i.setEnd(e,t+n),o.Bounds.fromClientRect(i.getBoundingClientRect(),r,a)},f=function(e){for(var t=[],n=0,o=!1,a=void 0;e.length;)h(e[n])===o?((a=e.splice(0,n)).length&&t.push(r.ucs2.encode(a)),o=!o,n=0):n++,n>=e.length&&(a=e.splice(0,n)).length&&t.push(r.ucs2.encode(a));return t},h=function(e){return-1!==[32,13,10,9,45].indexOf(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&n.childNodes.push(i.default.fromTextNode(p,n));else if(p instanceof g.HTMLElement||p instanceof HTMLElement||g.parent&&p instanceof g.parent.HTMLElement){if(-1===l.indexOf(p.nodeName)){var m=new a.default(p,n,s,f++);if(m.isVisible()){"INPUT"===p.tagName?(0,u.inlineInputElement)(p,m):"TEXTAREA"===p.tagName?(0,u.inlineTextAreaElement)(p,m):"SELECT"===p.tagName&&(0,u.inlineSelectElement)(p,m);var v="TEXTAREA"!==p.tagName,y=c(m,p);if(y||d(m)){var b=y||m.isPositioned()?r.getRealParentStackingContext():r,w=new o.default(m,b,y);b.contexts.push(w),v&&e(p,m,w,s,f)}else r.children.push(m),v&&e(p,m,r,s,f)}}}else if(p instanceof g.SVGSVGElement||p instanceof SVGSVGElement||g.parent&&p instanceof g.parent.SVGSVGElement){var E=new a.default(p,n,s,f++),T=c(E,p);if(T||d(E)){var O=T||E.isPositioned()?r.getRealParentStackingContext():r,I=new o.default(E,O,T);O.contexts.push(I)}else r.children.push(E)}}},c=function(e,t){return e.isRootElement()||e.isPositionedWithZIndex()||e.style.opacity<1||e.isTransformed()||f(e,t)},d=function(e){return e.isPositioned()||e.isFloating()},f=function(e,t){return"BODY"===t.nodeName&&e.parent instanceof a.default&&e.parent.style.background.backgroundColor.isTransparent()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1&&(r=n[0]+"@",e=n[1]);return r+u((e=e.replace(S,".")).split("."),t).join(".")}function s(e){for(var t,n,r=[],o=0,a=e.length;o=55296&&t<=56319&&o65535&&(t+=L((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?C(e/O):e>>1,e+=C(e/t);e>N*E>>1;r+=b)e=C(e/N);return C(r+(N+1)*e/(e+T))}function p(e){var t,n,r,o,a,u,l,s,f,p,g=[],m=e.length,v=0,T=_,O=I;for((n=e.lastIndexOf(R))<0&&(n=0),r=0;r=128&&i("not-basic"),g.push(e.charCodeAt(r));for(o=n>0?n+1:0;o=m&&i("invalid-input"),((s=d(e.charCodeAt(o++)))>=b||s>C((y-v)/u))&&i("overflow"),v+=s*u,f=l<=O?w:l>=O+E?E:l-O,!(sC(y/(p=b-f))&&i("overflow"),u*=p;O=h(v-a,t=g.length+1,0==a),C(v/t)>y-T&&i("overflow"),T+=C(v/t),v%=t,g.splice(v++,0,T)}return c(g)}function g(e){var t,n,r,o,a,u,l,c,d,p,g,m,v,T,O,P=[];for(m=(e=s(e)).length,t=_,n=0,a=I,u=0;u=t&&gC((y-n)/(v=r+1))&&i("overflow"),n+=(l-t)*v,t=l,u=0;uy&&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