├── .browserslistrc ├── .gitignore ├── src ├── images │ ├── rbq_1.jpg │ ├── rbq_2.jpg │ ├── rbq_3.jpg │ ├── rbq_4.jpg │ └── rbq_5.jpg ├── js │ ├── main.js │ └── app.js ├── index.html └── scss │ └── styles.scss ├── dist ├── rbq_1.4e5afea9.jpg ├── rbq_2.dfc010e0.jpg ├── rbq_3.747600b1.jpg ├── rbq_4.d95e6086.jpg ├── rbq_5.f2d50ec1.jpg ├── index.html ├── app.7f7bd74d.js ├── main.73a08813.css └── main.68b75b7d.js ├── .editorconfig ├── .postcssrc ├── README.md ├── package.json └── gulpfile.js /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% in CN -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | .parcelCache 4 | test -------------------------------------------------------------------------------- /src/images/rbq_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/src/images/rbq_1.jpg -------------------------------------------------------------------------------- /src/images/rbq_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/src/images/rbq_2.jpg -------------------------------------------------------------------------------- /src/images/rbq_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/src/images/rbq_3.jpg -------------------------------------------------------------------------------- /src/images/rbq_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/src/images/rbq_4.jpg -------------------------------------------------------------------------------- /src/images/rbq_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/src/images/rbq_5.jpg -------------------------------------------------------------------------------- /dist/rbq_1.4e5afea9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/dist/rbq_1.4e5afea9.jpg -------------------------------------------------------------------------------- /dist/rbq_2.dfc010e0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/dist/rbq_2.dfc010e0.jpg -------------------------------------------------------------------------------- /dist/rbq_3.747600b1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/dist/rbq_3.747600b1.jpg -------------------------------------------------------------------------------- /dist/rbq_4.d95e6086.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/dist/rbq_4.d95e6086.jpg -------------------------------------------------------------------------------- /dist/rbq_5.f2d50ec1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ice-Hazymoon/bqb_tnt/HEAD/dist/rbq_5.f2d50ec1.jpg -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 4 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true -------------------------------------------------------------------------------- /src/js/main.js: -------------------------------------------------------------------------------- 1 | const normalizecss = require('normalize.css'); 2 | const styles = require('../scss/styles.scss'); 3 | const html2canvas = require('./html2canvas'); 4 | // const recorder = require('./HZRecorder'); 5 | window.html2canvas = html2canvas; -------------------------------------------------------------------------------- /.postcssrc: -------------------------------------------------------------------------------- 1 | { 2 | "map": true, 3 | "plugins": { 4 | "autoprefixer": { 5 | "browsers": "> 1% in CN", 6 | "grid": true 7 | }, 8 | "postcss-pxtorem": { 9 | "rootValue": 16, 10 | "propList": ["*"], 11 | "selectorBlackList": ["html"], 12 | "replace": false 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 表情包在线制作 2 | 3 | 在线预览: [https://ice-hazymoon.github.io/bqb_tnt/dist/](https://ice-hazymoon.github.io/bqb_tnt/dist/) 4 | 5 | ## 功能 6 | 7 | - 本地语音识别, 不依赖任何网络服务 8 | - 可自行上传图片, 也可使用模板的图片 9 | - 可自行替换文字, 可设置样式 (居中, 加粗, 斜体, 放大缩小) 10 | - 可自定义css 11 | - 文本框内支持粘贴图片, 代码块, Word文档等内容 12 | 13 | ## 使用了 14 | 15 | - html2canvas 16 | - Web Speech API 17 | 18 | ## 已知 bug 19 | 20 | - 语音识别兼容性有点问题, 仅支持现代浏览器 21 | - 语音识别不能使用? 刷新几次试试? 22 | 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "biaoqinbao", 3 | "version": "0.0.1", 4 | "description": "", 5 | "main": "gulpfile.js", 6 | "scripts": { 7 | "start": "node ./node_modules/gulp/bin/gulp.js", 8 | "build": "node ./node_modules/gulp/bin/gulp.js build" 9 | }, 10 | "author": "Ice-Hazmoon ", 11 | "license": "", 12 | "devDependencies": { 13 | "autoprefixer": "^8.3.0", 14 | "browser-sync": "^2.23.7", 15 | "gulp": "^3.9.1", 16 | "gulp-parcel": "^0.3.5", 17 | "gulp-plumber": "^1.2.0", 18 | "node-sass": "^4.9.0", 19 | "normalize.css": "^8.0.0", 20 | "postcss-pxtorem": "^4.0.1" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | const gulp = require('gulp'); 2 | const browserSync = require('browser-sync'); 3 | const reload = browserSync.reload; 4 | const parcel = require('gulp-parcel'); 5 | 6 | gulp.task('server', ()=>{ 7 | browserSync.init({ 8 | server: { 9 | baseDir: './dist' 10 | }, 11 | port: 2333, 12 | open: false 13 | }) 14 | gulp.watch(['./src/js/**/*.js', './src/**/*.html', './src/images/*.{png,jpg,jpeg,gif,svg}']).on('change', (e)=>{ 15 | setTimeout(() => { 16 | reload() 17 | }, 100); 18 | }); 19 | gulp.watch(['./dist/*.css']).on('change', (e)=>{ 20 | reload(e.path) 21 | }); 22 | }) 23 | 24 | gulp.task('start', ()=>{ 25 | gulp.src('./src/**/*.html', {read:false}) 26 | .pipe(parcel({ 27 | outDir: './dist', 28 | publicURL: './', 29 | minify: false, 30 | watch: true, 31 | sourceMaps: true, 32 | cache: true, 33 | cacheDir: '.parcelCache', 34 | })) 35 | .pipe(gulp.dest('./dist')) 36 | }) 37 | 38 | gulp.task('build', ()=>{ 39 | gulp.src('./src/**/*.html', {read:false}) 40 | .pipe(parcel({ 41 | outDir: './dist', 42 | publicURL: './', 43 | minify: true, 44 | watch: false, 45 | sourceMaps: false, 46 | cache: false, 47 | cacheDir: '.parcelCache', 48 | })) 49 | .pipe(gulp.dest('./dist')) 50 | }) 51 | 52 | gulp.task('default', ['start', 'server']); -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 表情包生成
表情包制作
 

-------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 表情包生成 8 | 9 | 10 |
11 |
表情包制作
12 | 13 | 20 |
21 | 22 | 23 |

24 |         
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 | 35 | 40 |
41 | 42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/scss/styles.scss: -------------------------------------------------------------------------------- 1 | html{ 2 | font-size: 16px; 3 | } 4 | 5 | body{ 6 | font-size: 1rem; 7 | } 8 | 9 | body, pre{ 10 | font-family: -apple-system, SF UI Text, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; 11 | } 12 | 13 | .rbq{ 14 | padding-top: 40px; 15 | width: 300px; 16 | margin: 0 auto; 17 | #canvas{ 18 | display: block; 19 | margin: 20px auto; 20 | box-sizing: border-box; 21 | max-width: 100%; 22 | } 23 | .title{ 24 | font-size: 28px; 25 | text-align: center; 26 | margin: 20px 0; 27 | } 28 | .subtitle{ 29 | margin: 20px 0; 30 | text-align: center; 31 | line-height: 1.3; 32 | font-size: 12px; 33 | } 34 | .select-img{ 35 | display: flex; 36 | justify-content: space-between; 37 | padding: 0; 38 | list-style: none; 39 | margin: 0; 40 | margin-bottom: 20px; 41 | li{ 42 | margin: 0; 43 | padding: 0; 44 | list-style: none; 45 | border: 1px solid rgb(209, 209, 209); 46 | margin: 0 5px; 47 | cursor: pointer; 48 | &:last-child{ 49 | margin: 0; 50 | } 51 | &:first-child{ 52 | margin: 0; 53 | } 54 | img{ 55 | object-fit: cover; 56 | height: 50px; 57 | width: 100%; 58 | } 59 | } 60 | } 61 | .main{ 62 | box-shadow: 0px 0px 1px rgba(0, 0, 0, .3); 63 | background-color: #fff; 64 | pre{ 65 | padding: 15px; 66 | padding-top: 0; 67 | max-width: 100%; 68 | white-space: pre-wrap; 69 | word-wrap: break-word; 70 | word-break:break-all; 71 | line-height: 1.5; 72 | display: block; 73 | box-sizing: border-box; 74 | margin: 0; 75 | } 76 | #uploadImg{ 77 | cursor: pointer; 78 | width: 100%; 79 | } 80 | } 81 | .btnbox{ 82 | text-align: center; 83 | margin-top: 20px; 84 | } 85 | .btn{ 86 | outline: none; 87 | border: none; 88 | background: none; 89 | box-shadow: none; 90 | display: inline-block; 91 | margin: 0 auto; 92 | padding: 10px 20px; 93 | background-color: rgba($color: #000000, $alpha: .7); 94 | color: #fff; 95 | cursor: pointer; 96 | transition: .3s ease all; 97 | margin: 5px; 98 | &:active{ 99 | background-color: rgba($color: #000000, $alpha: 1); 100 | } 101 | } 102 | #tnt{ 103 | #recording-instructions{ 104 | font-size: 14px; 105 | color: rgb(194, 3, 3); 106 | } 107 | } 108 | } 109 | 110 | .center{ 111 | text-align: center; 112 | } 113 | 114 | .bold{ 115 | font-weight: bold; 116 | } 117 | 118 | .italic{ 119 | font-style: italic; 120 | } 121 | 122 | @media (max-width:400px){ 123 | html{ 124 | font-size: 14px; 125 | } 126 | } -------------------------------------------------------------------------------- /dist/app.7f7bd74d.js: -------------------------------------------------------------------------------- 1 | parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f { 23 | let current = event.resultIndex; 24 | 25 | // 获取识别后的内容 26 | let transcript = event.results[current][0].transcript; 27 | 28 | // 解决安卓设备的bug 29 | let mobileRepeatBug = (current == 1 && transcript == event.results[0][0].transcript); 30 | 31 | if (!mobileRepeatBug) { 32 | noteContent += transcript; 33 | noteTextarea.innerText = noteContent; 34 | } 35 | }; 36 | 37 | recognition.onstart = (e)=> { 38 | instructions.innerText = '正在识别, 请讲话'; 39 | } 40 | 41 | recognition.onerror = (event)=> { 42 | if (event.error == 'no-speech') { 43 | instructions.innerText = '未检测到语音,请再试一次'; 44 | }; 45 | } 46 | 47 | document.getElementById('start-recording').addEventListener('click', e=>{ 48 | console.log('开始录音'); 49 | recognition.start(); 50 | if (noteContent.length) { 51 | noteContent += ' '; 52 | } 53 | }) 54 | 55 | document.getElementById('stop-recording').addEventListener('click', e=>{ 56 | console.log('录音停止'); 57 | recognition.stop(); 58 | instructions.innerText = '语音识别暂停'; 59 | }) 60 | } 61 | 62 | // 设置日期 63 | let d = new Date(); 64 | let text = d.getFullYear()+'年'+(d.getMonth()+1)+'月'+d.getDate()+'日,晴。和昨天一样没吃饭。一直在群里等人带我。 昨天说好今天带我的,现在他们又说今天要援交没有时间带我,还说不仅今天往后'+(d.getDate()+1)+'号、'+(d.getDate()+2)+'号都不会带我,居然还说以后都不带我了,简直不能忍一定要好好记下来'; 65 | document.getElementById('text').innerText = text; 66 | 67 | // 上传本地图片 68 | let input = document.getElementById('file'); 69 | input.addEventListener('change', function(e){ 70 | let files = input.files 71 | if(files.length){ 72 | if(files[0].type.indexOf('gif') != -1){ 73 | alert('暂不支持GIF文件') 74 | }else{ 75 | getBase64(files[0]).then( 76 | data => { 77 | document.getElementById('uploadImg').src = data; 78 | } 79 | ).catch(err=>{ 80 | alert('上传失败, 请尝试更换浏览器后重试') 81 | }); 82 | } 83 | } 84 | }, false) 85 | 86 | // 切换图片 87 | document.querySelectorAll('.select-img img').forEach((el, index, list)=>{ 88 | el.addEventListener('click', function(e){ 89 | let imgSrc = this.src; 90 | document.getElementById('uploadImg').src = imgSrc; 91 | }, false) 92 | }) 93 | 94 | // 文件转base64 95 | function getBase64(file) { 96 | return new Promise((resolve, reject) => { 97 | const reader = new FileReader(); 98 | reader.readAsDataURL(file); 99 | reader.onload = () => resolve(reader.result); 100 | reader.onerror = error => reject(error); 101 | }); 102 | } 103 | 104 | // 切换class 105 | function ToggleClass(el, classname){ 106 | if(el.classList.contains(classname)){ 107 | el.classList.remove(classname); 108 | }else{ 109 | el.classList.add(classname); 110 | } 111 | } 112 | 113 | // 生成canvas 114 | function newCanvas(el, callback){ 115 | html2canvas(el, { 116 | allowTaint: true, 117 | taintTest: false, 118 | width: el.offsetWidth, 119 | height: el.offsetHeight, 120 | scale: 2 121 | }).then(canvas=>{ 122 | document.getElementById('canvas').src = canvas.toDataURL("image/png"); 123 | setTimeout(() => { 124 | window.scrollTo(0,document.body.scrollHeight) 125 | }, 300); 126 | }).catch(err=>{ 127 | alert('生成失败, 请尝试更换浏览器后重试'+err) 128 | }); 129 | } 130 | 131 | // 上传图片 132 | document.getElementById('uploadImg').addEventListener('click', function(e){ 133 | input.click(); 134 | }, false) 135 | 136 | // 开启 TNT 模式 137 | document.getElementById('start-tnt').onclick = function(){ 138 | SpeechRecognition() 139 | this.parentNode.removeChild(this); 140 | document.getElementById('tnt').style.display = 'block'; 141 | document.getElementById('recording-instructions').innerText = '已开启 TNT 模式, 仅支持小部分现代浏览器, 请授权网页使用麦克风, 代码在本地环境运行, 不会上传您的任何信息' 142 | } 143 | 144 | // 字体样式 145 | function fontStyle(id, style){ 146 | document.getElementById(id).addEventListener('click', function(e){ 147 | ToggleClass(pre, style); 148 | }, false) 149 | } 150 | 151 | // 居中 152 | fontStyle('font-centering', 'center'); 153 | // 加粗 154 | fontStyle('font-bold', 'bold'); 155 | // 斜体 156 | fontStyle('font-italic', 'italic'); 157 | // 字体放大 158 | document.getElementById('font-enlarge').addEventListener('click', e=>{ 159 | // pre 160 | let fontSize = parseInt(getComputedStyle(pre)['fontSize']); 161 | pre.style.fontSize = fontSize+1+'px'; 162 | }) 163 | // 字体缩小 164 | document.getElementById('font-reduce').addEventListener('click', e=>{ 165 | // pre 166 | let fontSize = parseInt(getComputedStyle(pre)['fontSize']); 167 | pre.style.fontSize = fontSize-1+'px'; 168 | }) 169 | // 自定义css样式 170 | document.getElementById('font-css').addEventListener('click', e=>{ 171 | let text = prompt('(实验性功能) 请输入需要自定义的 css 样式, 格式为 "line-height:1.5;color:red;" 不能少分号!!!'); 172 | if(text && text.trim()){ 173 | let cssText = text.replace(/\s/g, '').match(/[\w\-]+\:.+\;/g); 174 | let style = document.createElement('style'); 175 | style.innerText = '#text{'+cssText+'}'; 176 | document.body.appendChild(style); 177 | } 178 | }) 179 | 180 | // 使用方法 181 | document.getElementById('instructions').addEventListener('click', e=>{ 182 | alert(`- 点击图片可上传本地图片, 也可使用自带模板\n\ 183 | - 点击文字可自行编辑\n\ 184 | - 可自定义css(实验性功能), 结尾一定要加分号!!\n\ 185 | - 开启TNT模式后可录制语音并转换为文字\n\ 186 | - TNT 模式仅支持部分浏览器, 推荐使用 Chrome\n\ 187 | - 编辑完后点击生成, 在网页最下方生成的图片上长按即可保存\n\ 188 | - 文本框内支持粘贴word文档, 代码块, 图片等内容\n\ 189 | - 源代码地址: https://github.com/Ice-Hazymoon/bqb_tnt\n\ 190 | - 作者博客: https://imiku.me`); 191 | }) 192 | 193 | // 下载 194 | document.getElementById('download').addEventListener('click', function(e){ 195 | let el = this.parentNode.parentNode.querySelector('.main'); 196 | newCanvas(el, function(url){ 197 | let a = document.createElement('a'); 198 | a.href = url; 199 | a.download = 'bqb.jpg'; 200 | a.click(); 201 | }) 202 | }, false) 203 | }()) -------------------------------------------------------------------------------- /dist/main.73a08813.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}html{font-size:16px}body{font-size:1rem}body,pre{font-family:-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif}.rbq{padding-top:2.5rem;width:300px;width:18.75rem;margin:0 auto}.rbq #canvas{display:block;margin:1.25rem auto;box-sizing:border-box;max-width:100%}.rbq .title{font-size:28px;font-size:1.75rem}.rbq .subtitle,.rbq .title{text-align:center;margin:1.25rem 0}.rbq .subtitle{line-height:1.3;font-size:12px;font-size:.75rem}.rbq .select-img{display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;padding:0;list-style:none;margin:0 0 1.25rem}.rbq .select-img li{padding:0;list-style:none;border:.0625rem solid #d1d1d1;margin:0 .3125rem;cursor:pointer}.rbq .select-img li:first-child,.rbq .select-img li:last-child{margin:0}.rbq .select-img li img{object-fit:cover;height:50px;height:3.125rem;width:100%}.rbq .main{box-shadow:0 0 1px rgba(0,0,0,.3);box-shadow:0 0 .0625rem rgba(0,0,0,.3);background-color:#fff}.rbq .main pre{padding:0 .9375rem .9375rem;max-width:100%;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;display:block;box-sizing:border-box;margin:0}.rbq .main #uploadImg{cursor:pointer;width:100%}.rbq .btnbox{text-align:center;margin-top:1.25rem}.rbq .btn{outline:none;border:none;background:none;box-shadow:none;display:inline-block;padding:.625rem 1.25rem;background-color:rgba(0,0,0,.7);color:#fff;cursor:pointer;-webkit-transition:all .3s ease;transition:all .3s ease;margin:.3125rem}.rbq .btn:active{background-color:#000}.rbq #tnt #recording-instructions{font-size:14px;font-size:.875rem;color:#c20303}.center{text-align:center}.bold{font-weight:700}.italic{font-style:italic}@media (max-width:400px){html{font-size:14px}} 2 | /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLEtBQ0UsY0FBZ0IsQ0FBRSxBQUVwQixLQUNFLGNBQWdCLENBQUUsQUFFcEIsU0FDRSxzSEFBdUksQ0FBRSxBQUUzSSxLQUNFLG1CQUFrQixBQUNsQixZQUFhLEFBQWIsZUFBYSxBQUNiLGFBQWUsQ0FBRSxBQUNqQixhQUNFLGNBQWUsQUFDZixvQkFBa0IsQUFDbEIsc0JBQXVCLEFBQ3ZCLGNBQWdCLENBQUUsQUFDcEIsWUFDRSxlQUFnQixBQUFoQixpQkFBZ0IsQ0FFQyxBQUNuQiwyQkFGRSxrQkFBbUIsQUFDbkIsZ0JBQWUsQ0FLRyxBQUpwQixlQUdFLGdCQUFpQixBQUNqQixlQUFnQixBQUFoQixnQkFBZ0IsQ0FBRSxBQUNwQixpQkFDRSxvQkFBYyxBQUFkLGFBQWMsQUFDZCx5QkFBK0IsQUFBL0IsOEJBQStCLEFBQy9CLFVBQVcsQUFDWCxnQkFBaUIsQUFFakIsa0JBQW9CLENBQUUsQUFDdEIsb0JBRUUsVUFBVyxBQUNYLGdCQUFpQixBQUNqQiw4QkFBMEIsQUFDMUIsa0JBQWMsQUFDZCxjQUFnQixDQUFFLEFBR2xCLCtEQUNFLFFBQVUsQ0FBRSxBQUNkLHdCQUNFLGlCQUFrQixBQUNsQixZQUFhLEFBQWIsZ0JBQWEsQUFDYixVQUFZLENBQUUsQUFDcEIsV0FDRSxrQ0FBMkMsQUFBM0MsdUNBQTJDLEFBQzNDLHFCQUF1QixDQUFFLEFBQ3pCLGVBRUUsNEJBQWUsQUFDZixlQUFnQixBQUNoQixxQkFBc0IsQUFDdEIscUJBQXNCLEFBQ3RCLHFCQUFzQixBQUN0QixnQkFBaUIsQUFDakIsY0FBZSxBQUNmLHNCQUF1QixBQUN2QixRQUFVLENBQUUsQUFDZCxzQkFDRSxlQUFnQixBQUNoQixVQUFZLENBQUUsQUFDbEIsYUFDRSxrQkFBbUIsQUFDbkIsa0JBQWlCLENBQUUsQUFDckIsVUFDRSxhQUFjLEFBQ2QsWUFBYSxBQUNiLGdCQUFpQixBQUNqQixnQkFBaUIsQUFDakIscUJBQXNCLEFBRXRCLHdCQUFtQixBQUNuQixnQ0FBcUMsQUFDckMsV0FBWSxBQUNaLGVBQWdCLEFBQ2hCLGdDQUF5QixBQUF6Qix3QkFBeUIsQUFDekIsZUFBWSxDQUFFLEFBQ2QsaUJBQ0UscUJBQXdCLENBQUUsQUFDOUIsa0NBQ0UsZUFBZ0IsQUFBaEIsa0JBQWdCLEFBQ2hCLGFBQWUsQ0FBRSxBQUVyQixRQUNFLGlCQUFtQixDQUFFLEFBRXZCLE1BQ0UsZUFBa0IsQ0FBRSxBQUV0QixRQUNFLGlCQUFtQixDQUFFLEFBRXZCLHlCQUNFLEtBQ0UsY0FBZ0IsQ0FBRSxDQUFFIiwiZmlsZSI6InN0eWxlcy5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiaHRtbCB7XG4gIGZvbnQtc2l6ZTogMTZweDsgfVxuXG5ib2R5IHtcbiAgZm9udC1zaXplOiAxcmVtOyB9XG5cbmJvZHksIHByZSB7XG4gIGZvbnQtZmFtaWx5OiAtYXBwbGUtc3lzdGVtLCBTRiBVSSBUZXh0LCBBcmlhbCwgXCJQaW5nRmFuZyBTQ1wiLCBcIkhpcmFnaW5vIFNhbnMgR0JcIiwgXCJNaWNyb3NvZnQgWWFIZWlcIiwgXCJXZW5RdWFuWWkgTWljcm8gSGVpXCIsIHNhbnMtc2VyaWY7IH1cblxuLnJicSB7XG4gIHBhZGRpbmctdG9wOiA0MHB4O1xuICB3aWR0aDogMzAwcHg7XG4gIG1hcmdpbjogMCBhdXRvOyB9XG4gIC5yYnEgI2NhbnZhcyB7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gICAgbWFyZ2luOiAyMHB4IGF1dG87XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgICBtYXgtd2lkdGg6IDEwMCU7IH1cbiAgLnJicSAudGl0bGUge1xuICAgIGZvbnQtc2l6ZTogMjhweDtcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgbWFyZ2luOiAyMHB4IDA7IH1cbiAgLnJicSAuc3VidGl0bGUge1xuICAgIG1hcmdpbjogMjBweCAwO1xuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgICBsaW5lLWhlaWdodDogMS4zO1xuICAgIGZvbnQtc2l6ZTogMTJweDsgfVxuICAucmJxIC5zZWxlY3QtaW1nIHtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcbiAgICBwYWRkaW5nOiAwO1xuICAgIGxpc3Qtc3R5bGU6IG5vbmU7XG4gICAgbWFyZ2luOiAwO1xuICAgIG1hcmdpbi1ib3R0b206IDIwcHg7IH1cbiAgICAucmJxIC5zZWxlY3QtaW1nIGxpIHtcbiAgICAgIG1hcmdpbjogMDtcbiAgICAgIHBhZGRpbmc6IDA7XG4gICAgICBsaXN0LXN0eWxlOiBub25lO1xuICAgICAgYm9yZGVyOiAxcHggc29saWQgI2QxZDFkMTtcbiAgICAgIG1hcmdpbjogMCA1cHg7XG4gICAgICBjdXJzb3I6IHBvaW50ZXI7IH1cbiAgICAgIC5yYnEgLnNlbGVjdC1pbWcgbGk6bGFzdC1jaGlsZCB7XG4gICAgICAgIG1hcmdpbjogMDsgfVxuICAgICAgLnJicSAuc2VsZWN0LWltZyBsaTpmaXJzdC1jaGlsZCB7XG4gICAgICAgIG1hcmdpbjogMDsgfVxuICAgICAgLnJicSAuc2VsZWN0LWltZyBsaSBpbWcge1xuICAgICAgICBvYmplY3QtZml0OiBjb3ZlcjtcbiAgICAgICAgaGVpZ2h0OiA1MHB4O1xuICAgICAgICB3aWR0aDogMTAwJTsgfVxuICAucmJxIC5tYWluIHtcbiAgICBib3gtc2hhZG93OiAwcHggMHB4IDFweCByZ2JhKDAsIDAsIDAsIDAuMyk7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsgfVxuICAgIC5yYnEgLm1haW4gcHJlIHtcbiAgICAgIHBhZGRpbmc6IDE1cHg7XG4gICAgICBwYWRkaW5nLXRvcDogMDtcbiAgICAgIG1heC13aWR0aDogMTAwJTtcbiAgICAgIHdoaXRlLXNwYWNlOiBwcmUtd3JhcDtcbiAgICAgIHdvcmQtd3JhcDogYnJlYWstd29yZDtcbiAgICAgIHdvcmQtYnJlYWs6IGJyZWFrLWFsbDtcbiAgICAgIGxpbmUtaGVpZ2h0OiAxLjU7XG4gICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICBtYXJnaW46IDA7IH1cbiAgICAucmJxIC5tYWluICN1cGxvYWRJbWcge1xuICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgd2lkdGg6IDEwMCU7IH1cbiAgLnJicSAuYnRuYm94IHtcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgbWFyZ2luLXRvcDogMjBweDsgfVxuICAucmJxIC5idG4ge1xuICAgIG91dGxpbmU6IG5vbmU7XG4gICAgYm9yZGVyOiBub25lO1xuICAgIGJhY2tncm91bmQ6IG5vbmU7XG4gICAgYm94LXNoYWRvdzogbm9uZTtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgbWFyZ2luOiAwIGF1dG87XG4gICAgcGFkZGluZzogMTBweCAyMHB4O1xuICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC43KTtcbiAgICBjb2xvcjogI2ZmZjtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgdHJhbnNpdGlvbjogLjNzIGVhc2UgYWxsO1xuICAgIG1hcmdpbjogNXB4OyB9XG4gICAgLnJicSAuYnRuOmFjdGl2ZSB7XG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiBibGFjazsgfVxuICAucmJxICN0bnQgI3JlY29yZGluZy1pbnN0cnVjdGlvbnMge1xuICAgIGZvbnQtc2l6ZTogMTRweDtcbiAgICBjb2xvcjogI2MyMDMwMzsgfVxuXG4uY2VudGVyIHtcbiAgdGV4dC1hbGlnbjogY2VudGVyOyB9XG5cbi5ib2xkIHtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7IH1cblxuLml0YWxpYyB7XG4gIGZvbnQtc3R5bGU6IGl0YWxpYzsgfVxuXG5AbWVkaWEgKG1heC13aWR0aDogNDAwcHgpIHtcbiAgaHRtbCB7XG4gICAgZm9udC1zaXplOiAxNHB4OyB9IH1cbiJdfQ== */ -------------------------------------------------------------------------------- /dist/main.68b75b7d.js: -------------------------------------------------------------------------------- 1 | parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f= 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){for(var n=t.length,o=[];n--;)o[n]=e(t[n]);return o}function R(t,e){var n=t.split("@"),o="";return n.length>1&&(o=n[0]+"@",t=n[1]),o+I((t=t.replace(x,".")).split("."),e).join(".")}function O(t){for(var e,n,o=[],r=0,i=t.length;r=55296&&e<=56319&&r65535&&(e+=C((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=C(t)}).join("")}function A(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function P(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 M(t){var e,n,o,r,i,s,a,c,h,f,g,v=[],b=t.length,x=0,E=y,T=m;for((n=t.lastIndexOf(w))<0&&(n=0),o=0;o=128&&S("not-basic"),v.push(t.charCodeAt(o));for(r=n>0?n+1:0;r=b&&S("invalid-input"),((c=(g=t.charCodeAt(r++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:d)>=d||c>k((l-x)/s))&&S("overflow"),x+=c*s,!(c<(h=a<=T?u:a>=T+p?p:a-T));a+=d)s>k(l/(f=d-h))&&S("overflow"),s*=f;T=P(x-i,e=v.length+1,0==i),k(x/e)>l-E&&S("overflow"),E+=k(x/e),x%=e,v.splice(x++,0,E)}return L(v)}function N(t){var e,n,o,r,i,s,a,c,h,f,g,v,b,x,E,T=[];for(v=(t=O(t)).length,e=y,n=0,i=m,s=0;s=e&&gk((l-n)/(b=o+1))&&S("overflow"),n+=(a-e)*b,e=a,s=0;sl&&S("overflow"),g==e){for(c=n,h=d;!(c<(f=h<=i?u:h>=i+p?p:h-i));h+=d)E=c-f,x=d-f,T.push(C(A(f+E%x,0))),c=k(E/x);T.push(C(A(c,0))),i=P(n,b,o==r),n=0,++o}++n,++e}return T.join("")}if(c={version:"1.4.1",ucs2:{decode:O,encode:L},decode:M,encode:N,toASCII:function(t){return R(t,function(t){return b.test(t)?"xn--"+N(t):t})},toUnicode:function(t){return R(t,function(t){return v.test(t)?M(t.slice(4).toLowerCase()):t})}},i&&s)if(o.exports==i)s.exports=c;else for(h in c)c.hasOwnProperty(h)&&(i[h]=c[h]);else e.punycode=c}(this)}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){var o=t("./log");function r(t,e){for(var n=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;)!0!==e&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(r(i,e)),i=i.nextSibling;return 1===t.nodeType&&(n._scrollTop=t.scrollTop,n._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?function(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(n){o("Unable to copy canvas content from",t,n)}}(t,n):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(n.value=t.value)),n}e.exports=function(t,e,n,o,i,s,a){var c=r(t.documentElement,i.javascriptEnabled),h=e.createElement("iframe");return h.className="html2canvas-container",h.style.visibility="hidden",h.style.position="fixed",h.style.left="-10000px",h.style.top="0px",h.style.border="0",h.width=n,h.height=o,h.scrolling="no",e.body.appendChild(h),new Promise(function(e){var n=h.contentWindow.document;h.contentWindow.onload=h.onload=function(){var t=setInterval(function(){n.body.childNodes.length>0&&(!function t(e){if(1===e.nodeType){e.scrollTop=e._scrollTop,e.scrollLeft=e._scrollLeft;for(var n=e.firstChild;n;)t(n),n=n.nextSibling}}(n.documentElement),clearInterval(t),"view"===i.type&&(h.contentWindow.scrollTo(s,a),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||h.contentWindow.scrollY===a&&h.contentWindow.scrollX===s||(n.documentElement.style.top=-a+"px",n.documentElement.style.left=-s+"px",n.documentElement.style.position="absolute")),e(h))},50)},n.open(),n.write(""),function(t,e,n){!t.defaultView||e===t.defaultView.pageXOffset&&n===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,n)}(t,s,a),n.replaceChild(n.adoptNode(c),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;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;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;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(t,e,n){var o=t("./support"),r=t("./renderers/canvas"),i=t("./imageloader"),s=t("./nodeparser"),a=t("./nodecontainer"),c=t("./log"),h=t("./utils"),l=t("./clone"),d=t("./proxy").loadUrlDocument,u=h.getBounds,p="data-html2canvas-node",f=0;function g(t,e){var n,o,i=f++;if((e=e||{}).logging&&(c.options.logging=!0,c.options.start=Date.now()),e.async=void 0===e.async||e.async,e.allowTaint=void 0!==e.allowTaint&&e.allowTaint,e.removeContainer=void 0===e.removeContainer||e.removeContainer,e.javascriptEnabled=void 0!==e.javascriptEnabled&&e.javascriptEnabled,e.imageTimeout=void 0===e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"==typeof e.renderer?e.renderer:r,e.strict=!!e.strict,"string"==typeof t){if("string"!=typeof e.proxy)return Promise.reject("Proxy must be used when rendering url");var s=null!=e.width?e.width:window.innerWidth,a=null!=e.height?e.height:window.innerHeight;return d((n=t,o=document.createElement("a"),o.href=n,o.href=o.href,o),e.proxy,document,s,a,e).then(function(t){return y(t.contentWindow.document.documentElement,t,e,s,a)})}var h=(void 0===t?[document.documentElement]:t.length?t:[t])[0];return h.setAttribute(p+i,i),function(t,e,n,o,r){return l(t,t,n,o,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then(function(i){c("Document cloned");var s=p+r,a="["+s+"='"+r+"']";t.querySelector(a).removeAttribute(s);var h=i.contentWindow,l=h.document.querySelector(a),d="function"==typeof e.onclone?Promise.resolve(e.onclone(h.document)):Promise.resolve(!0);return d.then(function(){return y(l,i,e,n,o)})})}(h.ownerDocument,e,h.ownerDocument.defaultView.innerWidth,h.ownerDocument.defaultView.innerHeight,i).then(function(t){return"function"==typeof e.onrendered&&(c("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),e.onrendered(t)),t})}g.CanvasRenderer=r,g.NodeContainer=a,g.log=c,g.utils=h;var m="undefined"==typeof document||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:g;function y(t,e,n,r,a){var h=e.contentWindow,l=new o(h.document),d=new i(n,l),p=u(t),f="view"===n.type?r:p.right+1,g="view"===n.type?a:p.bottom+1,m=new n.renderer(f,g,d,n,document);return new s(t,m,l,d,n).ready.then(function(){var o;if(c("Finished rendering"),"view"===n.type)o=w(m.canvas,{width:m.canvas.width,height:m.canvas.height,top:0,left:0,x:0,y:0});else if(t===h.document.body||t===h.document.documentElement||null!=n.canvas)o=m.canvas;else if(n.scale){var r={width:null!=n.width?n.width:p.width,height:null!=n.height?n.height:p.height,top:p.top,left:p.left,x:0,y:0},i={};for(var s in r)r.hasOwnProperty(s)&&(i[s]=r[s]*n.scale);(o=w(m.canvas,i)).style.width=r.width+"px",o.style.height=r.height+"px"}else o=w(m.canvas,{width:null!=n.width?n.width:p.width,height:null!=n.height?n.height:p.height,top:p.top,left:p.left,x:0,y:0});return function(t,e){e.removeContainer&&(t.parentNode.removeChild(t),c("Cleaned up container"))}(e,n),o})}function w(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,h=s-i;return c("Cropping canvas at:","left:",e.left,"top:",e.top,"width:",a,"height:",h),c("Resulting crop with width",e.width,"and height",e.height,"with x",o,"and y",i),n.getContext("2d").drawImage(t,o,i,a,h,e.x,e.y,a,h),n}e.exports=m},{"./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;e.exports=function t(e){if(this.src=e,o("DummyImageContainer for",e),!this.promise||!this.image){o("Initiating DummyImageContainer"),t.prototype.image=new Image;var n=this.image;t.prototype.promise=new Promise(function(t,e){n.onload=t,n.onerror=e,n.src=r(),!0===n.complete&&t(n)})}}},{"./log":13,"./utils":26}],6:[function(t,e,n){var o=t("./utils").smallImage;e.exports=function(t,e){var n,r,i=document.createElement("div"),s=document.createElement("img"),a=document.createElement("span");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("Hidden Text")),i.appendChild(a),i.appendChild(s),n=s.offsetTop-a.offsetTop+1,i.removeChild(a),i.appendChild(document.createTextNode("Hidden Text")),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}},{"./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").getBounds,r=t("./proxy").loadUrlDocument;function i(e,n,r){this.image=null,this.src=e;var i=this,s=o(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(r.proxy,s,r)).then(function(e){return t("./core")(e.contentWindow.document.documentElement,{type:"view",width:e.width,height:e.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})}).then(function(t){return i.image=t})}i.prototype.proxyLoad=function(t,e,n){var o=this.src;return r(o.src,t,o.ownerDocument,e.width,e.height,n)},e.exports=i},{"./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){e.exports=function(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)})}},{}],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(){return new i(t.src).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)}},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){return-1!==t.toString().indexOf("%")}function l(t){return t.replace("px","")}function d(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=this.css(t);return void 0===e&&["webkit","moz","ms","o"].some(function(n){return void 0!==(e=this.css(n+t.substr(0,1).toUpperCase()+t.substr(1)))},this),void 0===e?null:e},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"}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 1===(n=(n=n[e||0]||n[0]||"auto").trim().split(" ")).length&&(n=[n[0],h(n[0])?"auto":n[0]]),n},c.prototype.parseBackgroundSize=function(t,e,n){var o,r,i=this.cssList("backgroundSize",n);if(h(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 s0?(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(){}m.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(t){if(_(t)){F(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,F(t)&&t.cleanDOM()}else V(t)&&(t.clip=y(t)?t.parent.clip:[]);F(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 z(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=function(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}(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=n.item(h).replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")});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 z([].filter.call(t.node.childNodes,M).map(function(e){var n=[e.nodeType===Node.TEXT_NODE?new s(e,t):new i(e,t)].filter(j);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),(e?n.getParentStack(this):n.parent.stack).contexts.push(n),t.stack=n},m.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){_(t)&&(this.isRootElement(t)||function(t){return t.getOpacity()<1}(t)||function(t){var e=t.css("position");return"auto"!==(-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto")}(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):_(t)&&(N(t)&&O(t)||function(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}(t)||B(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){var e;t.contexts.sort((e=t.contexts.slice(0),function(t,n){return t.cssInt("zIndex")+e.indexOf(t)/e.length-(n.cssInt("zIndex")+e.indexOf(n)/e.length)})),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(I),n=t.children.filter(_),o=n.filter(D(B)),r=o.filter(D(N)).filter(D(L)),i=n.filter(D(N)).filter(B),s=o.filter(D(N)).filter(L),a=t.contexts.concat(o.filter(N)).filter(O),c=t.children.filter(V).filter(P),h=t.contexts.filter(R);e.concat(r).concat(i).concat(s).concat(a).concat(c).concat(h).forEach(function(t){this.renderQueue.push(t),A(t)&&(this.parse(t),this.renderQueue.push(new w))},this)},m.prototype.paint=function(t){try{t instanceof w?this.renderer.ctx.restore():V(t)?(F(t.parent)&&t.parent.appendToDOM(),this.paintText(t),F(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(o(e),this.options.strict)throw e}},m.prototype.paintNode=function(t){A(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(H))},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 ",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this,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=E(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(b(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");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach(function(e){try{r.style[e]=t.css(e)}catch(n){o("html2canvas: Parse: Exception caught in renderFormValue: "+n.message)}});var i=t.parseBounds();r.style.position="fixed",r.style.left=i.left+"px",r.style.top=i.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,n=r.ucs2.decode(t.node.data),o=(!this.options.letterRendering||function(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}(t))&&(e=t.node.data,!/[^\u0000-\u00ff]/.test(e)),i=o?function(t){var e,n=[],o=0,i=!1;for(;t.length;)s=t[o],-1!==[32,13,10,9,45].indexOf(s)===i?((e=t.splice(0,o)).length&&n.push(r.ucs2.encode(e)),i=!i,o=0):o++,o>=t.length&&(e=t.splice(0,o)).length&&n.push(r.ucs2.encode(e));var s;return n}(n):n.map(function(t){return r.ucs2.encode([t])});o||(t.parent.node.style.fontVariantLigatures="none");var s=t.parent.fontWeight(),a=t.parent.css("fontSize"),c=t.parent.css("fontFamily"),h=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),s,a,c),h.length?this.renderer.fontShadow(h[0].color,h[0].offsetX,h[0].offsetY,h[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){i.map(this.parseTextBounds(t),this).forEach(function(e,n){e&&(this.renderer.text(i[n],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(c,a)))},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"))}};var v={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};function b(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=k({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=C({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=k({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=C({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=k({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=C({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=k({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=C({c1:[r.left,r.bottom],c2:[r.left,r.top]},o[3],o[0],n.bottomLeft,n.topLeft)}}return i})}function x(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:T({x:t,y:c},{x:t,y:c-s},{x:a-i,y:e},{x:a,y:e}),topRight:T({x:t,y:e},{x:t+i,y:e},{x:a,y:c-s},{x:a,y:c}),bottomRight:T({x:a,y:e},{x:a,y:e+s},{x:t+i,y:c},{x:t,y:c}),bottomLeft:T({x:a,y:c},{x:a-i,y:c},{x:t,y:e+s},{x:t,y:e})}}function E(t,e,n){var o=t.left,r=t.top,i=t.width,s=t.height,a=e[0][0]i+n[3].width/2?0:h-n[3].width/2,l-n[0].width/2).topRight.subdivide(.5),bottomRight:x(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:x(o+n[3].width/2,r+w,Math.max(0,p-n[3].width/2),f-n[2].width/2).bottomLeft.subdivide(.5),topLeftOuter:x(o,r,a,c).topLeft.subdivide(.5),topLeftInner:x(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:x(o+g,r,h,l).topRight.subdivide(.5),topRightInner:x(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:x(o+y,r+m,d,u).bottomRight.subdivide(.5),bottomRightInner:x(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:x(o,r+w,p,f).bottomLeft.subdivide(.5),bottomLeftInner:x(o+n[3].width,r+w,Math.max(0,p-n[3].width),f-n[2].width).bottomLeft.subdivide(.5)}}function T(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[T(t,s,h,d),T(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 k(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 C(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 S(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 I(t){return t.cssInt("zIndex")<0}function R(t){return t.cssInt("zIndex")>0}function O(t){return 0===t.cssInt("zIndex")}function L(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function A(t){return t instanceof l}function P(t){return t.node.data.trim().length>0}function M(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function N(t){return"static"!==t.css("position")}function B(t){return"none"!==t.css("float")}function D(t){var e=this;return function(){return!t.apply(e,arguments)}}function _(t){return t.node.nodeType===Node.ELEMENT_NODE}function F(t){return!0===t.isPseudoElement}function V(t){return t.node.nodeType===Node.TEXT_NODE}function W(t){return parseInt(t,10)}function H(t){return t.width}function j(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function z(t){return[].concat.apply([],t)}m.prototype.parseBorders=function(t){var e=t.parseBounds(),n=function(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(W)})}(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=v[o]?v[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=E(e,n,o);return{clip:this.parseBackgroundClip(t,r,o,n,e),borders:b(o,e,r,n)}},m.prototype.parseBackgroundClip=function(t,e,n,o,r){var i=[];switch(t.css("backgroundClip")){case"content-box":case"padding-box":S(i,o[0],o[1],e.topLeftInner,e.topRightInner,r.left+n[3].width,r.top+n[0].width),S(i,o[1],o[2],e.topRightInner,e.bottomRightInner,r.left+r.width-n[1].width,r.top+n[0].width),S(i,o[2],o[3],e.bottomRightInner,e.bottomLeftInner,r.left+r.width-n[1].width,r.top+r.height-n[2].width),S(i,o[3],o[0],e.bottomLeftInner,e.topLeftInner,r.left+n[3].width,r.top+r.height-n[2].width);break;default:S(i,o[0],o[1],e.topLeftOuter,e.topRightOuter,r.left,r.top),S(i,o[1],o[2],e.topRightOuter,e.bottomRightOuter,r.left+r.width,r.top),S(i,o[2],o[3],e.bottomRightOuter,e.bottomLeftOuter,r.left+r.width,r.top+r.height),S(i,o[3],o[0],e.bottomLeftOuter,e.topLeftOuter,r.left,r.top+r.height)}return i},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=d(r),s=u(e,t,i);return r?o(s):l(n,s,i).then(function(t){return a(t.content)})}var h=0;function l(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 d(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++h+"_"+Math.round(1e5*Math.random())}function u(t,e,n){return t+"?url="+encodeURIComponent(e)+(n.length?"&callback=html2canvas.proxy."+n:"")}function p(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}}n.Proxy=c,n.ProxyURL=function(t,e,n){var o="crossOrigin"in new Image,r=d(o),i=u(e,t,r);return o?Promise.resolve(i):l(n,i,r).then(function(t){return"data:"+t.type+";base64,"+t.content})},n.loadUrlDocument=function(t,e,n,o,r,i){return new c(t,e,window.document).then(p(t)).then(function(t){return s(t,n,o,r,i,0,0)})}},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(t,e,n){var o=t("./proxy").ProxyURL;e.exports=function(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)})}},{"./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){t.parseBackgroundImages().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);switch(t.parseBackgroundRepeat(o)){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])}},e.exports=r},{"./log":13}],20:[function(t,e,o){var r=t("../renderer"),i=t("../lineargradientcontainer"),s=t("../log");function a(t,e){r.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={},s("Initialized CanvasRenderer with size",t,"x",e)}function c(t){return t.length>0}a.prototype=Object.create(r.prototype),a.prototype.setFillStyle=function(t){return this.ctx.fillStyle="object"===n(t)&&t.isColor?t.toString():t,this.ctx},a.prototype.rectangle=function(t,e,n,o,r){this.setFillStyle(r).fillRect(t,e,n,o)},a.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()},a.prototype.circleStroke=function(t,e,n,o,r,i){this.circle(t,e,n,o),this.ctx.strokeStyle=i.toString(),this.ctx.stroke()},a.prototype.shadow=function(t,e){var n=this.setFillStyle("white");n.save(),this.shape(t),e.forEach(function(t){var e=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";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="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=t.length,l="";for(e=0;e>4,s=(15&n)<<4|(o=c.indexOf(t[e+2]))>>2,a=(3&o)<<6|(r=c.indexOf(t[e+3])),l+=64===o?String.fromCharCode(i):64===r||-1===r?String.fromCharCode(i,s):String.fromCharCode(i,s,a);return l},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=[],h=0,l=0,d=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)),c.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===h&&" \r\n\t".indexOf(t)>-1)){switch(t){case'"':s?s===t&&(s=null):s=t;break;case"(":if(s)break;if(0===h)return h=1,void(i+=t);l++;break;case")":if(s)break;if(1===h){if(0===l)return h=0,i+=t,void d();l--}break;case",":if(s)break;if(0===h)return void d();if(1===h&&0===l&&!e.match(/^url$/i))return a.push(n),n="",void(i+=t)}i+=t,0===h?e+=t:n+=t}}),d(),c}},{}],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){e.exports=function(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()})}},{}]},{},[4])(4)}); 7 | },{}],"d6sW":[function(require,module,exports) { 8 | var s=require("normalize.css"),e=require("../scss/styles.scss"),r=require("./html2canvas");window.html2canvas=r; 9 | },{"normalize.css":"DOAq","../scss/styles.scss":"DOAq","./html2canvas":"0BV3"}]},{},["d6sW"], null) --------------------------------------------------------------------------------