"use strict";(function(){"use strict";var t=require("util");var r={tmp:["tmp"],data:["flash"],usb:["usb0","usb1"],sata:["sata0","sata1"]};exports.parseTechSupport=function(t){var a=t.split(/\r?\n/gi);if(!Array.isArray(a)){console.log("is not array");return null}for(var n in a){var e=a[n].match(/the package file is .*(tmp|data|sata|usb).*\/(\w+\.tar\.gz)/);if(e==null){continue}console.log("splitArray:",e);if(r[e[1]]==undefined){console.log("cannot find in techMap");return null}console.log("splitArray[2]:",e[2]);return{flag:e[1],fileName:e[2]}}return null};exports.buildDownloadTechCmd=function(a,n,e,o,s){var l=exports.parseTechSupport(a);if(l==null){return["none tftp"]}s=s==undefined?"toolkit/collectInfos":s;var i=r[l.flag];var u=[];var f=n?"oob_tftp":"tftp";i.forEach(function(r){var a=t.format("copy %s:%s %s://%s/%s/%s/%s",r,l.fileName,f,e,s,o,l.fileName);u.push(a)});return u}})();