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,EACC,IAAI,IAAI,KAAO,EACX,MAAM,GAAO,EAAO,GAI5B,MAAQ,KAAK,mBAAmB,SAAS,EAAK,EAAa,GACnD,EAIA,QAAQ,MAAO,IAHf,EAAc,EAAY,QAAQ,KAAM,GAAI,GAC5C,QAAQ,MAAO,EAAU,GAIjC,GAEJ,EAEA,OAAO,QAAU","file":"/npm/phantomjs-capture@0.1.6/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/phantomjs-capture@0.1.6/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\n/*!\n * Capture - simple screenshot tool using PhantomJS\n * Copyright(c) 2014 spricity <spricity@gmail.com>\n * MIT Licensed\n */\nvar util = require('util');\nvar begin = new Date();\nvar program = require('commander');\nvar helpInfo = {\n    'dir':['输出文件目录。eg: -d ./','Directory'],\n    'output':['输出文件名。eg: -o xxx','File name'],\n    'url':['需要截图的页面的URL。eg: -u http://ju.taobao.com', 'Remote URL'],\n    'size':['需要截图的页面的宽度x高度, eg: -s 800x600', 'Captrue width x height, eg: -size 800x600'],\n    'screenTimer':['滚屏的时间，如果该时间太短，可能造成一些异步加载的数据未返回时，页面出现空白等，单位:ms。 eg: -t 10000', 'Screen Timer'],\n    'domHook':['DOM上的ID节点，表示此元素出现后将停止截屏，如 <div id=\"footer\"></div>， -dh footer', 'DOM Hook'],\n    'phantomPath':['phantomjs的路径，eg: -phantomPath /usr/local/bin/phantomjs', 'phantomjs path in your system'],\n    'help':['帮助','Help']\n};\nvar exec = require('child_process').exec,\n    child;\n\n\nvar LANG = process.env.LANG || 'zh';\nvar langIndex = (LANG.indexOf('zh') === 0) ? 0 : 1;\nprogram\n    .version(require(__dirname+'/package.json').version)\n    .option('-d, --dir [string]', helpInfo.dir[langIndex])\n    .option('-o, --output [string]', helpInfo.output[langIndex])\n    .option('-u, --url [string]', helpInfo.url[langIndex])\n    .option('-s, --size [string]', helpInfo.size[langIndex])\n    .option('-dh, --dom-hook [string]', helpInfo.domHook[langIndex])\n    .option('-t, --screen-timer [integer]', helpInfo.screenTimer[langIndex])\n    .option('-phantomPath, --phantomPath [string]', helpInfo.phantomPath[langIndex])\n    .parse(process.argv);\n\n\nvar url = program.url || '';\nvar dir = program.dir || '.';\n\nvar param = {};\nparam.dir = dir;\nparam.url = url;\nparam.output = program.output || '';\nparam.size = program.size || '';\nparam.screenTimer = program.screenTimer || 1000;\nparam.domHook = program.domHook || '';\nparam.phantomPath = program.phantomPath || '';\n\nvar Capture = require('./capture/index');\n\nvar end = new Date();\nvar spend = end.getTime()-begin.getTime();\nutil.log('Server starup in ' +spend+' ms');\n\nvar init = function(config, callback){\n    if(config){\n        for(var key in config){\n            param[key] = config[key];\n        }\n    }\n\n    child = exec('which phantomjs', function(err, phantomPath, stderr){\n        if(!err){\n            phantomPath = phantomPath.replace('\\n', '', phantomPath);\n            Capture(param, callback, phantomPath);\n        }else{\n            Capture(param, callback);\n        }\n    });\n\n}\n\nmodule.exports = init;\n\n"]}