if(partial.instance&&partial.base==template)returnpartial.instance;if("string"==typeoftemplate){if(!this.c)thrownewError("No compiler available.");template=this.c.compile(template,this.options)}if(!template)returnnull;if(this.partials[symbol].base=template,partial.subs){partials.stackText||(partials.stackText={});for(keyinpartial.subs)partials.stackText[key]||(partials.stackText[key]=void0!==this.activeSub&&partials.stackText[this.activeSub]?partials.stackText[this.activeSub]:this.text);template=createSpecializedPartial(template,partial.subs,partial.partials,this.stackSubs,this.stackPartials,partials.stackText)}returnthis.partials[symbol].instance=template,template},rp:function(symbol,context,partials,indent){varpartial=this.ep(symbol,partials);returnpartial?partial.ri(context,partials,indent):""},rs:function(context,partials,section){vartail=context[context.length-1];if(!isArray(tail))returnvoidsection(context,partials,this);for(vari=0;i<tail.length;i++)context.push(tail[i]),section(context,partials,this),context.pop()},s:function(val,ctx,partials,inverted,start,end,tags){varpass;returnisArray(val)&&0===val.length?!1:("function"==typeofval&&(val=this.ms(val,ctx,partials,inverted,start,end,tags)),pass=!!val,!inverted&&pass&&ctx&&ctx.push("object"==typeofval?val:ctx[ctx.length-1]),pass)},d:function(key,ctx,partials,returnFound){varfound,names=key.split("."),val=this.f(names[0],ctx,partials,returnFound),doModelGet=this.options.modelGet,cx=null;if("."===key&&isArray(ctx[ctx.length-2]))val=ctx[ctx.length-1];elsefor(vari=1;i<names.length;i++)found=findInScope(names[i],val,doModelGet),void0!==found?(cx=val,val=found):val="";returnreturnFound&&!val?!1:(returnFound||"function"!=typeofval||(ctx.push(cx),val=this.mv(val,ctx,partials),ctx.pop()),val)},f:function(key,ctx,partials,returnFound){for(varval=!1,v=null,found=!1,doModelGet=this.options.modelGet,i=ctx.length-1;i>=0;i--)if(v=ctx[i],val=findInScope(key,v,doModelGet),void0!==val){found=!0;break}returnfound?(returnFound||"function"!=typeofval||(val=this.mv(val,ctx,partials)),val):returnFound?!1:""},ls:function(func,cx,partials,text,tags){varoldTags=this.options.delimiters;returnthis.options.delimiters=tags,this.b(this.ct(coerceToString(func.call(cx,text)),cx,partials)),this.options.delimiters=oldTags,!1},ct:function(text,cx,partials){if(this.options.disableLambda)thrownewError("Lambda features disabled.");returnthis.c.compile(text,this.options).render(cx,partials)},b:function(s){this.buf+=s},fl:function(){varr=this.buf;returnthis.buf="",r},ms:function(func,ctx,partials,inverted,start,end,tags){vartextSource,cx=ctx[ctx.length-1],result=func.call(cx);return"function"==typeofresult?inverted?!0:(textSource=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(result,cx,partials,textSource.substring(start,end),tags)):result},mv:function(func,ctx,partials){varcx=ctx[ctx.length-1],result=func.call(cx);return"function"==typeofresult?this.ct(coerceToString(result.call(cx)),cx,partials):result},sub:function(name,context,partials,indent){varf=this.subs[name];f&&(this.activeSub=name,f(context,partials,this,indent),this.activeSub=!1)}};varrAmp=/&/g,rLt=/</g,rGt=/>/g,rApos=/\'/g,rQuot=/\"/g,hChars=/[&<>\"\']/,isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}}("undefined"!=typeofexports?exports:Hogan)},{}],20:[function(require,module,exports){(function(process){functionnormalizeArray(parts,allowAboveRoot){for(varup=0,i=parts.length-1;i>=0;i--){varlast=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");returnparts}functionfilter(xs,f){if(xs.filter)returnxs.filter(f);for(varres=[],i=0;i<xs.length;i++)f(xs[i],i,xs)&&res.push(xs[i]);returnres}varsplitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,splitPath=function(filename){returnsplitPathRe.exec(filename).slice(1)};exports.resolve=function(){for(varresolvedPath="",re
returnRematch.distance(amod,bmod)});SideBySidePrinter.prototype.makeDiffHtml=function(file,diffs){varfileDiffTemplate=hoganUtils.template(baseTemplatesPath,"file-diff"),filePathTemplate=hoganUtils.template(genericTemplatesPath,"file-path"),fileIconTemplate=hoganUtils.template(iconsBaseTemplatesPath,"file"),fileTagTemplate=hoganUtils.template(tagsBaseTemplatesPath,printerUtils.getFileTypeIcon(file));returnfileDiffTemplate.render({file:file,fileHtmlId:printerUtils.getHtmlId(file),diffs:diffs,filePath:filePathTemplate.render({fileDiffName:printerUtils.getDiffName(file)},{fileIcon:fileIconTemplate,fileTag:fileTagTemplate})})},SideBySidePrinter.prototype.generateSideBySideJsonHtml=function(diffFiles){varthat=this,content=diffFiles.map(function(file){vardiffs;returndiffs=file.blocks.length?that.generateSideBySideFileHtml(file):that.generateEmptyDiff(),that.makeDiffHtml(file,diffs)}).join("\n");returnhoganUtils.render(genericTemplatesPath,"wrapper",{content:content})},SideBySidePrinter.prototype.makeSideHtml=function(blockHeader){returnhoganUtils.render(genericTemplatesPath,"column-line-number",{diffParser:diffParser,blockHeader:blockHeader,lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})},SideBySidePrinter.prototype.generateSideBySideFileHtml=function(file){varthat=this,fileHtml={};returnfileHtml.left="",fileHtml.right="",file.blocks.forEach(function(block){functionprocessChangeBlock(){varmatches,insertType,deleteType,comparisons=oldLines.length*newLines.length,maxComparisons=that.config.matchingMaxComparisons||2500,doMatching=maxComparisons>comparisons&&("lines"===that.config.matching||"words"===that.config.matching);doMatching?(matches=matcher(oldLines,newLines),insertType=diffParser.LINE_TYPE.INSERT_CHANGES,deleteType=diffParser.LINE_TYPE.DELETE_CHANGES):(matches=[[oldLines,newLines]],insertType=diffParser.LINE_TYPE.INSERTS,deleteType=diffParser.LINE_TYPE.DELETES),matches.forEach(function(match){oldLines=match[0],newLines=match[1];for(varcommon=Math.min(oldLines.length,newLines.length),max=Math.max(oldLines.length,newLines.length),j=0;common>j;j++){varoldLine=oldLines[j],newLine=newLines[j];that.config.isCombined=file.isCombined;vardiff=printerUtils.diffHighlight(oldLine.content,newLine.content,that.config);fileHtml.left+=that.generateSingleLineHtml(deleteType,oldLine.oldNumber,diff.first.line,diff.first.prefix),fileHtml.right+=that.generateSingleLineHtml(insertType,newLine.newNumber,diff.second.line,diff.second.prefix)}if(max>common){varoldSlice=oldLines.slice(common),newSlice=newLines.slice(common),tmpHtml=that.processLines(oldSlice,newSlice);fileHtml.left+=tmpHtml.left,fileHtml.right+=tmpHtml.right}}),oldLines=[],newLines=[]}fileHtml.left+=that.makeSideHtml(block.header),fileHtml.right+=that.makeSideHtml("");for(varoldLines=[],newLines=[],i=0;i<block.lines.length;i++){varline=block.lines[i],prefix=line.content[0],escapedLine=utils.escape(line.content.substr(1));line.type!==diffParser.LINE_TYPE.INSERTS&&(newLines.length>0||line.type!==diffParser.LINE_TYPE.DELETES&&oldLines.length>0)&&processChangeBlock(),line.type===diffParser.LINE_TYPE.CONTEXT?(fileHtml.left+=that.generateSingleLineHtml(line.type,line.oldNumber,escapedLine,prefix),fileHtml.right+=that.generateSingleLineHtml(line.type,line.newNumber,escapedLine,prefix)):line.type!==diffParser.LINE_TYPE.INSERTS||oldLines.length?line.type===diffParser.LINE_TYPE.DELETES?oldLines.push(line):line.type===diffParser.LINE_TYPE.INSERTS&&Boolean(oldLines.length)?newLines.push(line):(console.error("unknown state in html side-by-side generator"),processChangeBlock()):(fileHtml.left+=that.generateSingleLineHtml(diffParser.LINE_TYPE.CONTEXT,"","",""),fileHtml.right+=that.generateSingleLineHtml(line.type,line.newNumber,escapedLine,prefix))}processChangeBlock()}),fileHtml},SideBySidePrinter.prototype.processLines=function(oldLines,newLines){varthat=this,fileHtml={};fileHtml.left="",fileHtml.right="";for(varmaxLinesNumber=Math.max(oldLines.length,newLines.length),i=0;maxLinesNumber>i;i++){varoldContent,newContent,oldPrefix,newPrefix,oldLine=ol