resultToDraw={json1:"",json2:"",colorLine:[],stepDiff:[],currentLine:0,tab:""};myCodeMirrorText2=myCodeMirrorText1=null;result={csv:[],text:"",maxColumn:0,nbLineDiff:0,nbColumnDiff:0}; var resultContainer=document.getElementById("result-csv-diff"),separatorSelect=document.getElementById("separatorRow"),quoteSelect=document.getElementById("quoteRow"),escapeSelect=document.getElementById("escapeRow"),compareSelect=document.getElementById("line-export"),compareLineSelect=document.getElementById("id-line-export"),Compare={ONLY1:1,ONLY2:2,DIFF:3}; function compare(){function a(a){for(var e=[],d=a.split(c),h=0;hresult.maxColumn&&(result.maxColumn=a(e).length)});g.forEach(function(b,c){a(b).length>result.maxColumn&&(result.maxColumn=a(b).length)});l.forEach(function(b,c){var d={columns:[],diff:!1};result.csv.push(d);var h=a(b);if(g.length>c){var e=a(g[c]),m=0;h.forEach(function(a,b){e.length>b?(b=e[b],a==b?d.columns.push(a):(d.columns.push({data:a+" != "+b,diff:Compare.DIFF}),result.nbColumnDiff++,m=1)):(d.columns.push({data:a,diff:Compare.ONLY1}),result.nbColumnDiff++, m=1)});e.forEach(function(a,b){b>=h.length&&(d.columns.push({data:a,diff:Compare.ONLY2}),result.nbColumnDiff++,m=1)});result.nbLineDiff+=m;0=l.length){var d={columns:[],diff:!0};result.csv.push(d);result.nbLineDiff+=1;a(b).forEach(function(a,b){d.columns.push({data:a,diff:Compare.ONLY2});result.nbColumnDiff++})}});return result} function showDiff(){function a(a){var b=document.createElement("div");resultContainer.appendChild(b);b.classList.add("csv-diff-line");if(a){var d=document.createElement("div");d.classList.add("csv-diff-column");d.classList.add("csv-diff-column-row");d.appendChild(document.createTextNode("Row "+a));b.appendChild(d)}return b}function c(a,b,d){d=void 0===d?null:d;var c=document.createElement("div");a.appendChild(c);c.classList.add("csv-diff-column");d===Compare.ONLY1?c.classList.add("csv-diff-column-only-column1"): d===Compare.ONLY2?c.classList.add("csv-diff-column-only-column2"):d===Compare.DIFF&&c.classList.add("csv-diff-column-different");c.appendChild(document.createTextNode(null===b?"":b));result.text+=null===b?"":b;return a}var f=separatorSelect.value,b=compareSelect.value,n=compareLineSelect.checked;document.getElementById("result").style.display="";window.location.href="proxy.php?url=#result";result.text="";services.billboard.emptyAndHide(["editor-error1","editor-valid1"]);for(services.billboard.emptyAndHide(["editor-error2", "editor-valid2"]);resultContainer.firstChild;)resultContainer.removeChild(resultContainer.firstChild);for(var p=a(),l=0;l<=result.maxColumn;l++){var g=document.createElement("div");g.classList.add("csv-diff-column");g.classList.add("csv-diff-column-field");0