{"version":3,"file":"bundle.js","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/annotated.js","/source-files/jsondiffpatch/src/formatters/base.js"],"names":["environment","require","exports","html","annotated","isBrowser","consoleModuleName","console","window","base","BaseFormatter","HtmlFormatter","prototype","typeFormattterErrorFormatter","context","err","out","formatValue","value","JSON","stringify","formatTextDiffString","lines","this","parseTextDiff","i","l","length","line","location","chr","pieces","pieceIndex","piecesLength","piece","type","text","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","AnnotatedFormatter","includeMoveDestinations","prepareContext","call","indent","levels","indentLevel","indentPad","Array","join","row","json","htmlNote","isLast","wrapPropertyName","name","deltaAnnotations","added","formatLegend","modified","deleted","moved","textdiff","formatAnyChange","deltaType","getDeltaType","annotator","apply","slice","arguments","split","isArray","a","getObjectKeys","Object","keys","obj","names","property","hasOwnProperty","push","trimUnderscore","str","substr","arrayKeyToSortNumber","parseInt","arrayKeyComparer","key1","key2","recurse","finalize","buffer","typeFormattterNotFound","Error","movedFrom","useMoveOriginHere","leftValue","undefined","typeFormattter","error","stack","self","forEachDeltaKey","arrayKeys","moveDestinations","sort","index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AEtB,IAAIM,GAAaC,YAAY,WAC3BzE,aAAaI,IACZ,IACHmE,YAAW,WACTJ,EAAKE,OAAOP,EAAQC,SACpBI,EAAKE,OAAOP,EAAQE,QAChBN,KAAS,GACXS,EAAKG,IAAIR,EAAQI,QACjBC,EAAKE,OAAOP,EAAQG,WAEpBE,EAAKG,IAAIR,EAAQG,SACjBE,EAAKE,OAAOP,EAAQI,SAEtBK,WAAW,WACTJ,EAAKE,OAAOP,EAAQG,SACpBS,cAAcF,IACbb,EAAQ,MACVA,KAGDgB,cAAgB,SAAS1E,EAAM0D,GACjC,MAAOF,gBAAc,EAAOxD,EAAM0D,GAGpC9F,SAAQS,cAAgBA,cAExBT,QAAQ4F,cAAgBA,cAExB5F,QAAQ8G,cAAgBA,aAExB,IAAIC,gBAEJ/G,SAAQgH,OAAS,SAAS/B,EAAOC,GAI/B,MAHK6B,mBACHA,gBAAkB,GAAItG,gBAEjBsG,gBAAgBC,OAAO/B,EAAOC;;AFvQvC,GAAIpF,aAAcC,QAAQ,iBAK1B,IAHAC,QAAQC,KAAOF,QAAQ,UACvBC,QAAQE,UAAYH,QAAQ,gBAEvBD,YAAYK,UAAW,CAC3B,GAAIC,mBAAoB,WACxBJ,SAAQK,QAAUN,QAAQK","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(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' + err + '');\n};\n\nHtmlFormatter.prototype.formatValue = function(context, value) {\n context.out('
' + JSON.stringify(value, null, 2) + '
');\n};\n\nHtmlFormatter.prototype.formatTextDiffString = function(context, value) {\n var lines = this.parseTextDiff(value);\n context.out('');\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('
');\n};\n\nHtmlFormatter.prototype.rootEnd = function(context) {\n context.out('
' + (context.hasArrows ?\n ('') : ''));\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('
  • ' +\n '
    ' + leftKey + '
    ');\n};\n\n\nHtmlFormatter.prototype.nodeEnd = function(context) {\n context.out('
  • ');\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('
    ');\n this.formatValue(context, left);\n context.out('
    ');\n};\n\nHtmlFormatter.prototype.format_movedestination = function(context, delta, left) {\n if (typeof left === 'undefined') {\n return;\n }\n context.out('
    ');\n this.formatValue(context, left);\n context.out('
    ');\n};\n\nHtmlFormatter.prototype.format_node = function(context, delta, left) {\n // recurse\n var nodeType = (delta._t === 'a') ? 'array' : 'object';\n context.out('');\n};\n\nHtmlFormatter.prototype.format_added = function(context, delta) {\n context.out('
    ');\n this.formatValue(context, delta[0]);\n context.out('
    ');\n};\n\nHtmlFormatter.prototype.format_modified = function(context, delta) {\n context.out('
    ');\n this.formatValue(context, delta[0]);\n context.out('
    ' +\n '
    ');\n this.formatValue(context, delta[1]);\n context.out('
    ');\n};\n\nHtmlFormatter.prototype.format_deleted = function(context, delta) {\n context.out('
    ');\n this.formatValue(context, delta[0]);\n context.out('
    ');\n};\n\nHtmlFormatter.prototype.format_moved = function(context, delta) {\n context.out('
    ');\n this.formatValue(context, delta[0]);\n context.out('
    ' + delta[1] + '
    ');\n\n // draw an SVG arrow from here to move destination\n context.out(\n /*jshint multistr: true */\n '
    \\\n \\\n \\\n \\\n \\\n \\\n \\\n \\\n \\\n
    ');\n context.hasArrows = true;\n};\n\nHtmlFormatter.prototype.format_textdiff = function(context, delta) {\n context.out('
    ');\n this.formatTextDiffString(context, delta[0]);\n context.out('
    ');\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 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('  ');\n };\n context.row = function(json, htmlNote) {\n context.out('' +\n '
    ');\n    context.out(context.indentPad);\n    context.out('
    ');\n    context.out(json);\n    context.out('
    ');\n context.out(htmlNote);\n context.out('
    ');\n };\n};\n\nAnnotatedFormatter.prototype.typeFormattterErrorFormatter = function(context, err) {\n context.row('', '
    ' + err + '
    ');\n};\n\nAnnotatedFormatter.prototype.formatTextDiffString = function(context, value) {\n var lines = this.parseTextDiff(value);\n context.out('');\n};\n\nAnnotatedFormatter.prototype.rootBegin = function(context, type, nodeType) {\n context.out('');\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('
    ');\n};\n\nAnnotatedFormatter.prototype.nodeBegin = function(context, key, leftKey, type, nodeType) {\n context.row('"' + key + '": {');\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 '
    "' + name + '"
    ';\n};\n\nvar deltaAnnotations = {\n added: function(delta, left, key, leftKey) {\n var formatLegend = '
    ([newValue])
    ';\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 = '
    ([previousValue, newValue])
    ';\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 = '
    ([previousValue, 0, 0])
    ';\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 index ' +\n leftKey + ' to ' +\n 'index ' +\n delta[1] + '';\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 '' +\n 'a variation of Unidiff';\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","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[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"]}