{"version":3,"sources":["/source-files/jsondiffpatch/node_modules/fiberglass/node_modules/browserify/node_modules/browser-pack/_prelude.js","/source-files/jsondiffpatch/src/main-formatters.js","/source-files/jsondiffpatch/src/formatters/index.js","/source-files/jsondiffpatch/src/environment.js","/source-files/jsondiffpatch/src/formatters/html.js","/source-files/jsondiffpatch/src/formatters/base.js","/source-files/jsondiffpatch/src/formatters/annotated.js"],"names":["module","exports","require","environment","base","html","annotated","isBrowser","consoleModuleName","console","window","htmlEscape","text","replacements","i","length","replace","BaseFormatter","HtmlFormatter","prototype","typeFormattterErrorFormatter","context","err","out","formatValue","value","JSON","stringify","formatTextDiffString","lines","this","parseTextDiff","l","line","location","chr","pieces","pieceIndex","piecesLength","piece","type","unescape","adjustArrows","node","document","getElementText","el","textContent","innerText","eachByQuery","query","fn","elems","querySelectorAll","eachChildren","children","arrow","arrowParent","parentNode","svg","path","style","display","destinationElem","destination","querySelector","container","child","getAttribute","distance","offsetTop","setAttribute","Math","abs","top","curve","round","rootBegin","nodeType","nodeClass","rootEnd","hasArrows","toString","nodeBegin","key","leftKey","nodeEnd","format_unchanged","delta","left","format_movedestination","format_node","_t","formatDeltaChildren","format_added","format_modified","format_deleted","format_moved","format_textdiff","showUnchanged","show","delay","body","prefix","classes","showing","hiding","visible","hidden","list","classList","remove","add","setTimeout","intervalId","setInterval","clearInterval","hideUnchanged","defaultInstance","format","isArray","Array","a","getObjectKeys","Object","keys","obj","names","property","hasOwnProperty","push","trimUnderscore","str","substr","slice","arrayKeyToSortNumber","parseInt","arrayKeyComparer","key1","key2","prepareContext","recurse","finalize","buffer","apply","arguments","typeFormattterNotFound","deltaType","Error","join","movedFrom","isLast","useMoveOriginHere","leftValue","getDeltaType","typeFormattter","call","error","stack","self","forEachDeltaKey","undefined","name","arrayKeys","moveDestinations","includeMoveDestinations","sort","index","output","split","lineOutput","exec","pieceOutput","AnnotatedFormatter","indent","levels","indentLevel","indentPad","row","json","htmlNote","wrapPropertyName","deltaAnnotations","added","formatL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i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","\nmodule.exports = require('./formatters');\n","var environment = require('../environment');\n\nexports.base = require('./base');\nexports.html = require('./html');\nexports.annotated = require('./annotated');\n\nif (!environment.isBrowser) {\n  var consoleModuleName = './console';\n  exports.console = require(consoleModuleName);\n}\n","\nexports.isBrowser = typeof window !== 'undefined';\n","var base = require('./base');\nvar BaseFormatter = base.BaseFormatter;\n\nvar HtmlFormatter = function HtmlFormatter() {};\n\nHtmlFormatter.prototype = new BaseFormatter();\n\nfunction htmlEscape(text) {\n  var html = text;\n  var replacements = [\n    [/&/g, '&amp;'],\n    [/</g, '&lt;'],\n    [/>/g, '&gt;'],\n    [/'/g, '&apos;'],\n    [/\"/g, '&quot;']\n  ];\n  for (var i = 0; i < replacements.length; i++) {\n    html = html.replace(replacements[i][0], replacements[i][1]);\n  }\n  return html;\n}\n\nHtmlFormatter.prototype.typeFormattterErrorFormatter = function(context, err) {\n  context.out('<pre class=\"jsondiffpatch-error\">' + err + '</pre>');\n};\n\nHtmlFormatter.prototype.formatValue = function(context, value) {\n  context.out('<pre>' + htmlEscape(JSON.stringify(value, null, 2)) + '</pre>');\n};\n\nHtmlFormatter.prototype.formatTextDiffString = function(context, value) {\n  var lines = this.parseTextDiff(value);\n  context.out('<ul class=\"jsondiffpatch-textdiff\">');\n  for (var i = 0, l = lines.length; i < l; i++) {\n    var line = lines[i];\n    context.out('<li>' +\n      '<div class=\"jsondiffpatch-textdiff-location\">' +\n      '<span class=\"jsondiffpatch-textdiff-line-number\">' +\n      line.location.line +\n      '</span>' +\n      '<span class=\"jsondiffpatch-textdiff-char\">' +\n      line.location.chr +\n      '</span>' +\n      '</div>' +\n      '<div class=\"jsondiffpatch-textdiff-line\">');\n    var pieces = line.pieces;\n    for (var pieceIndex = 0, piecesLength = pieces.length; pieceIndex < piecesLength; pieceIndex++) {\n      /* global unescape */\n      var piece = pieces[pieceIndex];\n      context.out('<span class=\"jsondiffpatch-textdiff-' + piece.type + '\">' +\n        htmlEscape(unescape(piece.text)) + '</span>');\n    }\n    context.out('</div></li>');\n  }\n  context.out('</ul>');\n};\n\nvar adjustArrows = function jsondiffpatchHtmlFormatterAdjustArrows(node) {\n  node = node || document;\n  var getElementText = function(el) {\n    return el.textContent || el.innerText;\n  };\n  var eachByQuery = function(el, query, fn) {\n    var elems = el.querySelectorAll(query);\n    for (var i = 0, l = elems.length; i < l; i++) {\n      fn(elems[i]);\n    }\n  };\n  var eachChildren = function(el, fn) {\n    for (var i = 0, l = el.children.length; i < l; i++) {\n      fn(el.children[i], i);\n    }\n  };\n  eachByQuery(node, '.jsondiffpatch-arrow', function(arrow) {\n    var arrowParent = arrow.parentNode;\n    var svg = arrow.children[0],\n      path = svg.children[1];\n    svg.style.display = 'none';\n    var destination = getElementText(arrowParent.querySelector('.jsondiffpatch-moved-destination'));\n    var container = arrowParent.parentNode;\n    var destinationElem;\n    eachChildren(container, function(child) {\n      if (child.getAttribute('data-key') === destination) {\n        destinationElem = child;\n      }\n    });\n    if (!destinationElem) {\n      return;\n    }\n    try {\n      var distance = destinationElem.offsetTop - arrowParent.offsetTop;\n      svg.setAttribute('height', Math.abs(distance) + 6);\n      arrow.style.top = (-8 + (distance > 0 ? 0 : distance)) + 'px';\n      var curve = distance > 0 ?\n        'M30,0 Q-10,' + Math.round(distance / 2) + ' 26,' + (distance - 4) :\n        'M30,' + (-distance) + ' Q-10,' + Math.round(-distance / 2) + ' 26,4';\n      path.setAttribute('d', curve);\n      svg.style.display = '';\n    } catch (err) {\n      return;\n    }\n  });\n};\n\nHtmlFormatter.prototype.rootBegin = function(context, type, nodeType) {\n  var nodeClass = 'jsondiffpatch-' + type +\n    (nodeType ? ' jsondiffpatch-child-node-type-' + nodeType : '');\n  context.out('<div class=\"jsondiffpatch-delta ' + nodeClass + '\">');\n};\n\nHtmlFormatter.prototype.rootEnd = function(context) {\n  context.out('</div>' + (context.hasArrows ?\n    ('<script type=\"text/javascript\">setTimeout(' +\n      adjustArrows.toString() +\n      ',10);</script>') : ''));\n};\n\nHtmlFormatter.prototype.nodeBegin = function(context, key, leftKey, type, nodeType) {\n  var nodeClass = 'jsondiffpatch-' + type +\n    (nodeType ? ' jsondiffpatch-child-node-type-' + nodeType : '');\n  context.out('<li class=\"' + nodeClass + '\" data-key=\"' + leftKey + '\">' +\n    '<div class=\"jsondiffpatch-property-name\">' + leftKey + '</div>');\n};\n\n\nHtmlFormatter.prototype.nodeEnd = function(context) {\n  context.out('</li>');\n};\n\n/* jshint camelcase: false */\n\nHtmlFormatter.prototype.format_unchanged = function(context, delta, left) {\n  if (typeof left === 'undefined') {\n    return;\n  }\n  context.out('<div class=\"jsondiffpatch-value\">');\n  this.formatValue(context, left);\n  context.out('</div>');\n};\n\nHtmlFormatter.prototype.format_movedestination = function(context, delta, left) {\n  if (typeof left === 'undefined') {\n    return;\n  }\n  context.out('<div class=\"jsondiffpatch-value\">');\n  this.formatValue(context, left);\n  context.out('</div>');\n};\n\nHtmlFormatter.prototype.format_node = function(context, delta, left) {\n  // recurse\n  var nodeType = (delta._t === 'a') ? 'array' : 'object';\n  context.out('<ul class=\"jsondiffpatch-node jsondiffpatch-node-type-' + nodeType + '\">');\n  this.formatDeltaChildren(context, delta, left);\n  context.out('</ul>');\n};\n\nHtmlFormatter.prototype.format_added = function(context, delta) {\n  context.out('<div class=\"jsondiffpatch-value\">');\n  this.formatValue(context, delta[0]);\n  context.out('</div>');\n};\n\nHtmlFormatter.prototype.format_modified = function(context, delta) {\n  context.out('<div class=\"jsondiffpatch-value jsondiffpatch-left-value\">');\n  this.formatValue(context, delta[0]);\n  context.out('</div>' +\n    '<div class=\"jsondiffpatch-value jsondiffpatch-right-value\">');\n  this.formatValue(context, delta[1]);\n  context.out('</div>');\n};\n\nHtmlFormatter.prototype.format_deleted = function(context, delta) {\n  context.out('<div class=\"jsondiffpatch-value\">');\n  this.formatValue(context, delta[0]);\n  context.out('</div>');\n};\n\nHtmlFormatter.prototype.format_moved = function(context, delta) {\n  context.out('<div class=\"jsondiffpatch-value\">');\n  this.formatValue(context, delta[0]);\n  context.out('</div><div class=\"jsondiffpatch-moved-destination\">' + delta[1] + '</div>');\n\n  // draw an SVG arrow from here to move destination\n  context.out(\n    /*jshint multistr: true */\n    '<div class=\"jsondiffpatch-arrow\" style=\"position: relative; left: -34px;\">\\\n        <svg width=\"30\" height=\"60\" style=\"position: absolute; display: none;\">\\\n        <defs>\\\n            <marker id=\"markerArrow\" markerWidth=\"8\" markerHeight=\"8\" refx=\"2\" refy=\"4\"\\\n                   orient=\"auto\" markerUnits=\"userSpaceOnUse\">\\\n                <path d=\"M1,1 L1,7 L7,4 L1,1\" style=\"fill: #339;\" />\\\n            </marker>\\\n        </defs>\\\n        <path d=\"M30,0 Q-10,25 26,50\" style=\"stroke: #88f; stroke-width: 2px; fill: none;\\\n        stroke-opacity: 0.5; marker-end: url(#markerArrow);\"></path>\\\n        </svg>\\\n        </div>');\n  context.hasArrows = true;\n};\n\nHtmlFormatter.prototype.format_textdiff = function(context, delta) {\n  context.out('<div class=\"jsondiffpatch-value\">');\n  this.formatTextDiffString(context, delta[0]);\n  context.out('</div>');\n};\n\n/* jshint camelcase: true */\n\nvar showUnchanged = function(show, node, delay) {\n  var el = node || document.body;\n  var prefix = 'jsondiffpatch-unchanged-';\n  var classes = {\n    showing: prefix + 'showing',\n    hiding: prefix + 'hiding',\n    visible: prefix + 'visible',\n    hidden: prefix + 'hidden',\n  };\n  var list = el.classList;\n  if (!list) {\n    return;\n  }\n  if (!delay) {\n    list.remove(classes.showing);\n    list.remove(classes.hiding);\n    list.remove(classes.visible);\n    list.remove(classes.hidden);\n    if (show === false) {\n      list.add(classes.hidden);\n    }\n    return;\n  }\n  if (show === false) {\n    list.remove(classes.showing);\n    list.add(classes.visible);\n    setTimeout(function() {\n      list.add(classes.hiding);\n    }, 10);\n  } else {\n    list.remove(classes.hiding);\n    list.add(classes.showing);\n    list.remove(classes.hidden);\n  }\n  var intervalId = setInterval(function() {\n    adjustArrows(el);\n  }, 100);\n  setTimeout(function() {\n    list.remove(classes.showing);\n    list.remove(classes.hiding);\n    if (show === false) {\n      list.add(classes.hidden);\n      list.remove(classes.visible);\n    } else {\n      list.add(classes.visible);\n      list.remove(classes.hidden);\n    }\n    setTimeout(function() {\n      list.remove(classes.visible);\n      clearInterval(intervalId);\n    }, delay + 400);\n  }, delay);\n};\n\nvar hideUnchanged = function(node, delay) {\n  return showUnchanged(false, node, delay);\n};\n\nexports.HtmlFormatter = HtmlFormatter;\n\nexports.showUnchanged = showUnchanged;\n\nexports.hideUnchanged = hideUnchanged;\n\nvar defaultInstance;\n\nexports.format = function(delta, left) {\n  if (!defaultInstance) {\n    defaultInstance = new HtmlFormatter();\n  }\n  return defaultInstance.format(delta, left);\n};\n","var isArray = (typeof Array.isArray === 'function') ?\n  // use native function\n  Array.isArray :\n  // use instanceof operator\n  function(a) {\n    return a instanceof Array;\n  };\n\nvar getObjectKeys = typeof Object.keys === 'function' ?\n  function(obj) {\n    return Object.keys(obj);\n  } : function(obj) {\n    var names = [];\n    for (var property in obj) {\n      if (obj.hasOwnProperty(property)) {\n        names.push(property);\n      }\n    }\n    return names;\n  };\n\nvar trimUnderscore = function(str) {\n  if (str.substr(0, 1) === '_') {\n    return str.slice(1);\n  }\n  return str;\n};\n\nvar arrayKeyToSortNumber = function(key) {\n  if (key === '_t') {\n    return -1;\n  } else {\n    if (key.substr(0, 1) === '_') {\n      return parseInt(key.slice(1), 10);\n    } else {\n      return parseInt(key, 10) + 0.1;\n    }\n  }\n};\n\nvar arrayKeyComparer = function(key1, key2) {\n  return arrayKeyToSortNumber(key1) - arrayKeyToSortNumber(key2);\n};\n\nvar BaseFormatter = function BaseFormatter() {};\n\nBaseFormatter.prototype.format = function(delta, left) {\n  var context = {};\n  this.prepareContext(context);\n  this.recurse(context, delta, left);\n  return this.finalize(context);\n};\n\nBaseFormatter.prototype.prepareContext = function(context) {\n  context.buffer = [];\n  context.out = function() {\n    this.buffer.push.apply(this.buffer, arguments);\n  };\n};\n\nBaseFormatter.prototype.typeFormattterNotFound = function(context, deltaType) {\n  throw new Error('cannot format delta type: ' + deltaType);\n};\n\nBaseFormatter.prototype.typeFormattterErrorFormatter = function(context, err) {\n  return err.toString();\n};\n\nBaseFormatter.prototype.finalize = function(context) {\n  if (isArray(context.buffer)) {\n    return context.buffer.join('');\n  }\n};\n\nBaseFormatter.prototype.recurse = function(context, delta, left, key, leftKey, movedFrom, isLast) {\n\n  var useMoveOriginHere = delta && movedFrom;\n  var leftValue = useMoveOriginHere ? movedFrom.value : left;\n\n  if (typeof delta === 'undefined' && typeof key === 'undefined') {\n    return undefined;\n  }\n\n  var type = this.getDeltaType(delta, movedFrom);\n  var nodeType = type === 'node' ? (delta._t === 'a' ? 'array' : 'object') : '';\n\n  if (typeof key !== 'undefined') {\n    this.nodeBegin(context, key, leftKey, type, nodeType, isLast);\n  } else {\n    this.rootBegin(context, type, nodeType);\n  }\n\n  var typeFormattter;\n  try {\n    typeFormattter = this['format_' + type] || this.typeFormattterNotFound(context, type);\n    typeFormattter.call(this, context, delta, leftValue, key, leftKey, movedFrom);\n  } catch (err) {\n    this.typeFormattterErrorFormatter(context, err, delta, leftValue, key, leftKey, movedFrom);\n    if (typeof console !== 'undefined' && console.error) {\n      console.error(err.stack);\n    }\n  }\n\n  if (typeof key !== 'undefined') {\n    this.nodeEnd(context, key, leftKey, type, nodeType, isLast);\n  } else {\n    this.rootEnd(context, type, nodeType);\n  }\n};\n\nBaseFormatter.prototype.formatDeltaChildren = function(context, delta, left) {\n  var self = this;\n  this.forEachDeltaKey(delta, left, function(key, leftKey, movedFrom, isLast) {\n    self.recurse(context, delta[key], left ? left[leftKey] : undefined,\n      key, leftKey, movedFrom, isLast);\n  });\n};\n\nBaseFormatter.prototype.forEachDeltaKey = function(delta, left, fn) {\n  var keys = getObjectKeys(delta);\n  var arrayKeys = delta._t === 'a';\n  var moveDestinations = {};\n  var name;\n  if (typeof left !== 'undefined') {\n    for (name in left) {\n      if (typeof delta[name] === 'undefined' &&\n        ((!arrayKeys) || typeof delta['_' + name] === 'undefined')) {\n        keys.push(name);\n      }\n    }\n  }\n  // look for move destinations\n  for (name in delta) {\n    var value = delta[name];\n    if (isArray(value) && value[2] === 3) {\n      moveDestinations[value[1].toString()] = {\n        key: name,\n        value: left && left[parseInt(name.substr(1))]\n      };\n      if (this.includeMoveDestinations !== false) {\n        if ((typeof left === 'undefined') &&\n          (typeof delta[value[1]] === 'undefined')) {\n          keys.push(value[1].toString());\n        }\n      }\n    }\n  }\n  if (arrayKeys) {\n    keys.sort(arrayKeyComparer);\n  } else {\n    keys.sort();\n  }\n  for (var index = 0, length = keys.length; index < length; index++) {\n    var key = keys[index];\n    if (arrayKeys && key === '_t') {\n      continue;\n    }\n    var leftKey = arrayKeys ?\n      (typeof key === 'number' ? key : parseInt(trimUnderscore(key), 10)) :\n      key;\n    var isLast = (index === length - 1);\n    fn(key, leftKey, moveDestinations[leftKey], isLast);\n  }\n};\n\nBaseFormatter.prototype.getDeltaType = function(delta, movedFrom) {\n  if (typeof delta === 'undefined') {\n    if (typeof movedFrom !== 'undefined') {\n      return 'movedestination';\n    }\n    return 'unchanged';\n  }\n  if (isArray(delta)) {\n    if (delta.length === 1) {\n      return 'added';\n    }\n    if (delta.length === 2) {\n      return 'modified';\n    }\n    if (delta.length === 3 && delta[2] === 0) {\n      return 'deleted';\n    }\n    if (delta.length === 3 && delta[2] === 2) {\n      return 'textdiff';\n    }\n    if (delta.length === 3 && delta[2] === 3) {\n      return 'moved';\n    }\n  } else if (typeof delta === 'object') {\n    return 'node';\n  }\n  return 'unknown';\n};\n\nBaseFormatter.prototype.parseTextDiff = function(value) {\n  var output = [];\n  var lines = value.split('\\n@@ ');\n  for (var i = 0, l = lines.length; i < l; i++) {\n    var line = lines[i];\n    var lineOutput = {\n      pieces: []\n    };\n    var location = /^(?:@@ )?[-+]?(\\d+),(\\d+)/.exec(line).slice(1);\n    lineOutput.location = {\n      line: location[0],\n      chr: location[1]\n    };\n    var pieces = line.split('\\n').slice(1);\n    for (var pieceIndex = 0, piecesLength = pieces.length; pieceIndex < piecesLength; pieceIndex++) {\n      var piece = pieces[pieceIndex];\n      if (!piece.length) {\n        continue;\n      }\n      var pieceOutput = {\n        type: 'context'\n      };\n      if (piece.substr(0, 1) === '+') {\n        pieceOutput.type = 'added';\n      } else if (piece.substr(0, 1) === '-') {\n        pieceOutput.type = 'deleted';\n      }\n      pieceOutput.text = piece.slice(1);\n      lineOutput.pieces.push(pieceOutput);\n    }\n    output.push(lineOutput);\n  }\n  return output;\n};\n\nexports.BaseFormatter = BaseFormatter;\n","var base = require('./base');\nvar BaseFormatter = base.BaseFormatter;\n\nvar AnnotatedFormatter = function AnnotatedFormatter() {\n  this.includeMoveDestinations = false;\n};\n\nAnnotatedFormatter.prototype = new BaseFormatter();\n\nAnnotatedFormatter.prototype.prepareContext = function(context) {\n  BaseFormatter.prototype.prepareContext.call(this, context);\n  context.indent = function(levels) {\n    this.indentLevel = (this.indentLevel || 0) +\n      (typeof levels === 'undefined' ? 1 : levels);\n    this.indentPad = new Array(this.indentLevel + 1).join('&nbsp;&nbsp;');\n  };\n  context.row = function(json, htmlNote) {\n    context.out('<tr><td style=\"white-space: nowrap;\">' +\n      '<pre class=\"jsondiffpatch-annotated-indent\" style=\"display: inline-block\">');\n    context.out(context.indentPad);\n    context.out('</pre><pre style=\"display: inline-block\">');\n    context.out(json);\n    context.out('</pre></td><td class=\"jsondiffpatch-delta-note\"><div>');\n    context.out(htmlNote);\n    context.out('</div></td></tr>');\n  };\n};\n\nAnnotatedFormatter.prototype.typeFormattterErrorFormatter = function(context, err) {\n  context.row('', '<pre class=\"jsondiffpatch-error\">' + err + '</pre>');\n};\n\nAnnotatedFormatter.prototype.formatTextDiffString = function(context, value) {\n  var lines = this.parseTextDiff(value);\n  context.out('<ul class=\"jsondiffpatch-textdiff\">');\n  for (var i = 0, l = lines.length; i < l; i++) {\n    var line = lines[i];\n    context.out('<li>' +\n      '<div class=\"jsondiffpatch-textdiff-location\">' +\n      '<span class=\"jsondiffpatch-textdiff-line-number\">' +\n      line.location.line +\n      '</span>' +\n      '<span class=\"jsondiffpatch-textdiff-char\">' +\n      line.location.chr +\n      '</span>' +\n      '</div>' +\n      '<div class=\"jsondiffpatch-textdiff-line\">');\n    var pieces = line.pieces;\n    for (var pieceIndex = 0, piecesLength = pieces.length; pieceIndex < piecesLength; pieceIndex++) {\n      var piece = pieces[pieceIndex];\n      context.out('<span class=\"jsondiffpatch-textdiff-' + piece.type + '\">' +\n        piece.text + '</span>');\n    }\n    context.out('</div></li>');\n  }\n  context.out('</ul>');\n};\n\nAnnotatedFormatter.prototype.rootBegin = function(context, type, nodeType) {\n  context.out('<table class=\"jsondiffpatch-annotated-delta\">');\n  if (type === 'node') {\n    context.row('{');\n    context.indent();\n  }\n  if (nodeType === 'array') {\n    context.row('\"_t\": \"a\",', 'Array delta (member names indicate array indices)');\n  }\n};\n\nAnnotatedFormatter.prototype.rootEnd = function(context, type) {\n  if (type === 'node') {\n    context.indent(-1);\n    context.row('}');\n  }\n  context.out('</table>');\n};\n\nAnnotatedFormatter.prototype.nodeBegin = function(context, key, leftKey, type, nodeType) {\n  context.row('&quot;' + key + '&quot;: {');\n  if (type === 'node') {\n    context.indent();\n  }\n  if (nodeType === 'array') {\n    context.row('\"_t\": \"a\",', 'Array delta (member names indicate array indices)');\n  }\n};\n\nAnnotatedFormatter.prototype.nodeEnd = function(context, key, leftKey, type, nodeType, isLast) {\n  if (type === 'node') {\n    context.indent(-1);\n  }\n  context.row('}' + (isLast ? '' : ','));\n};\n\n/* jshint camelcase: false */\n\nAnnotatedFormatter.prototype.format_unchanged = function() {\n  return;\n};\n\nAnnotatedFormatter.prototype.format_movedestination = function() {\n  return;\n};\n\n\nAnnotatedFormatter.prototype.format_node = function(context, delta, left) {\n  // recurse\n  this.formatDeltaChildren(context, delta, left);\n};\n\nvar wrapPropertyName = function(name) {\n  return '<pre style=\"display:inline-block\">&quot;' + name + '&quot;</pre>';\n};\n\nvar deltaAnnotations = {\n  added: function(delta, left, key, leftKey) {\n    var formatLegend = ' <pre>([newValue])</pre>';\n    if (typeof leftKey === 'undefined') {\n      return 'new value' + formatLegend;\n    }\n    if (typeof leftKey === 'number') {\n      return 'insert at index ' + leftKey + formatLegend;\n    }\n    return 'add property ' + wrapPropertyName(leftKey) + formatLegend;\n  },\n  modified: function(delta, left, key, leftKey) {\n    var formatLegend = ' <pre>([previousValue, newValue])</pre>';\n    if (typeof leftKey === 'undefined') {\n      return 'modify value' + formatLegend;\n    }\n    if (typeof leftKey === 'number') {\n      return 'modify at index ' + leftKey + formatLegend;\n    }\n    return 'modify property ' + wrapPropertyName(leftKey) + formatLegend;\n  },\n  deleted: function(delta, left, key, leftKey) {\n    var formatLegend = ' <pre>([previousValue, 0, 0])</pre>';\n    if (typeof leftKey === 'undefined') {\n      return 'delete value' + formatLegend;\n    }\n    if (typeof leftKey === 'number') {\n      return 'remove index ' + leftKey + formatLegend;\n    }\n    return 'delete property ' + wrapPropertyName(leftKey) + formatLegend;\n  },\n  moved: function(delta, left, key, leftKey) {\n    return 'move from <span title=\"(position to remove at original state)\">index ' +\n      leftKey + '</span> to ' +\n      '<span title=\"(position to insert at final state)\">index ' +\n      delta[1] + '</span>';\n  },\n  textdiff: function(delta, left, key, leftKey) {\n    var location = (typeof leftKey === 'undefined') ?\n      '' : (\n        (typeof leftKey === 'number') ?\n        ' at index ' + leftKey :\n        ' at property ' + wrapPropertyName(leftKey)\n      );\n    return 'text diff' + location + ', format is ' +\n      '<a href=\"https://code.google.com/p/google-diff-match-patch/wiki/Unidiff\">' +\n      'a variation of Unidiff</a>';\n  }\n};\n\nvar formatAnyChange = function(context, delta) {\n  var deltaType = this.getDeltaType(delta);\n  var annotator = deltaAnnotations[deltaType];\n  var htmlNote = annotator && annotator.apply(annotator,\n    Array.prototype.slice.call(arguments, 1));\n  var json = JSON.stringify(delta, null, 2);\n  if (deltaType === 'textdiff') {\n    // split text diffs lines\n    json = json.split('\\\\n').join('\\\\n\"+\\n   \"');\n  }\n  context.indent();\n  context.row(json, htmlNote);\n  context.indent(-1);\n};\n\nAnnotatedFormatter.prototype.format_added = formatAnyChange;\nAnnotatedFormatter.prototype.format_modified = formatAnyChange;\nAnnotatedFormatter.prototype.format_deleted = formatAnyChange;\nAnnotatedFormatter.prototype.format_moved = formatAnyChange;\nAnnotatedFormatter.prototype.format_textdiff = formatAnyChange;\n\n/* jshint camelcase: true */\n\nexports.AnnotatedFormatter = AnnotatedFormatter;\n\nvar defaultInstance;\n\nexports.format = function(delta, left) {\n  if (!defaultInstance) {\n    defaultInstance = new AnnotatedFormatter();\n  }\n  return defaultInstance.format(delta, left);\n};\n"]}