Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-diff-view

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-diff-view - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

index.js

@@ -6,3 +6,3 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.reactDiffView=t(require("react"),require("prop-types")):e.reactDiffView=t(e.React,e.propTypes)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){var r,o;/*!

*/
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var a={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"parseDiff",function(){return f}),n.d(t,"addStubHunk",function(){return d});var o=n(4),a=n.n(o),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(e){var t=e.reduce(function(e,t,n){var r=u(e,3),o=r[0],a=r[1],i=r[2];return a?t.isInsert&&i>=0?(o.splice(i+1,0,t),[o,t,i+2]):(o.push(t),[o,t,t.isDelete?a.isDelete?i:n:i]):(o.push(t),[o,t,t.isDelete?n:-1])},[[],null,-1]);return u(t,1)[0]},c=function(e,t){var n="zip"===t.nearbySequences?s(e.changes):e.changes;return i({},e,{changes:n})},l=function(e,t){var n=e.hunks.map(function(e){return c(e,t)});return i({},e,{hunks:t.stubHunk?d(n):n})},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a.a.parse(e).map(function(e){return l(e,t)})},d=function(e){if(!e||!e.length)return e;var t=e[e.length-1],n={oldStart:t.oldStart+t.oldLines,oldLines:0,newStart:t.newStart+t.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(r(e),[n])}},function(e,t,n){!function(n){var r={parse:function(e){for(var t,n,r,o,a=[],i=2,u=e.split("\n"),s=u.length,c=0;c<s;){var l=u[c];if(0===l.indexOf("diff --git")){var f=l.split(" ");t={oldPath:f[2].slice(2),newPath:f[3].slice(2),hunks:[]},a.push(t);var d=null,p=u[c+1];0===p.indexOf("old")&&(t.oldMode=p.slice(9,16),t.newMode=u[c+2].slice(9,16),p=u[(c+=2)+1]),0===p.indexOf("similarity")&&(t.similarity=parseInt(p.split(" ")[2],10),c+=1);var h;e:for(;h=u[++c];){switch((f=h.split(" "))[0]){case"diff":c--;break e;case"index":var v=f[1].split("..");t.oldRevision=v[0],t.newRevision=v[1],f[2]&&(t.oldMode=t.newMode=f[2]),i=5;var m=u[c+1];if(0===m.indexOf("---")){var y=u[c+2];/\s\/dev\/null$/.test(m)?(t.oldPath="/dev/null",d="add"):/\s\/dev\/null$/.test(y)&&(t.newPath="/dev/null",d="delete"),c+=2}break e}d||(d=f[0])}t.type=d||"modify"}else if(0===l.indexOf("Binary"))t.isBinary=!0,i=2,t=null;else if(5===i)if(0===l.indexOf("@@")){var g=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(l);n={content:l,oldStart:g[1]-0,newStart:g[4]-0,oldLines:g[3]-0||0,newLines:g[6]-0||0,changes:[]},t.hunks.push(n),r=n.oldStart,o=n.newStart}else{var b=l.slice(0,1),w={content:l.slice(1)};switch(b){case"+":w.type="insert",w.isInsert=!0,o++,w.lineNumber=o;break;case"-":w.type="delete",w.isDelete=!0,r++,w.lineNumber=r;break;case" ":w.type="normal",w.isNormal=!0,r++,o++,w.oldLineNumber=r,w.newLineNumber=o}w.type&&n.changes.push(w)}c++}return a}};t=e.exports=r}()},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function i(e,t){return null==e?void 0:e[t]}function u(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function s(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function c(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function l(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function f(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function d(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function p(e){var t=-1,n=e?e.length:0;for(this.__data__=new d;++t<n;)this.add(e[t])}function h(e){this.__data__=new f(e)}function v(e,t){var n=Ct(e)||X(e)?a(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!tt.call(e,i)||o&&("length"==i||F(i,r))||n.push(i);return n}function m(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1}function y(e,t){return e&&Nt(e,t,ie)}function g(e,t){for(var n=0,r=(t=I(t,e)?[t]:P(t)).length;null!=e&&n<r;)e=e[U(t[n++])];return n&&n==r?e:void 0}function b(e,t){return null!=e&&t in Object(e)}function w(e,t,n,r,o){return e===t||(null==e||null==t||!ee(e)&&!te(t)?e!==e&&t!==t:_(e,t,w,n,r,o))}function _(e,t,n,r,o,a){var i=Ct(e),s=Ct(t),c=ye,l=ye;i||(c=(c=Ot(e))==me?je:c),s||(l=(l=Ot(t))==me?je:l);var f=c==je&&!u(e),d=l==je&&!u(t),p=c==l;if(p&&!f)return a||(a=new h),i||kt(e)?L(e,t,n,r,o,a):A(e,t,c,n,r,o,a);if(!(o&pe)){var v=f&&tt.call(e,"__wrapped__"),m=d&&tt.call(t,"__wrapped__");if(v||m){var y=v?e.value():e,g=m?t.value():t;return a||(a=new h),n(y,g,r,o,a)}}return!!p&&(a||(a=new h),T(e,t,n,r,o,a))}function E(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var u=n[o];if(i&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var s=(u=n[o])[0],c=e[s],l=u[1];if(i&&u[2]){if(void 0===c&&!(s in e))return!1}else{var f=new h;if(r)var d=r(c,l,s,e,t,f);if(!(void 0===d?w(l,c,r,de|pe,f):d))return!1}}return!0}function N(e){return!(!ee(e)||W(e))&&(Q(e)||u(e)?rt:Fe).test(J(e))}function O(e){return"function"==typeof e?e:null==e?ue:"object"==typeof e?Ct(e)?k(e[0],e[1]):C(e):se(e)}function j(e){if(!G(e))return st(e);var t=[];for(var n in Object(e))tt.call(e,n)&&"constructor"!=n&&t.push(n);return t}function C(e){var t=H(e);return 1==t.length&&t[0][2]?$(t[0][0],t[0][1]):function(n){return n===e||E(n,e,t)}}function k(e,t){return I(e)&&z(t)?$(U(e),t):function(n){var r=oe(n,e);return void 0===r&&r===t?ae(n,e):w(t,r,void 0,de|pe)}}function x(e){return function(t){return g(t,e)}}function S(e){if("string"==typeof e)return e;if(ne(e))return Et?Et.call(e):"";var t=e+"";return"0"==t&&1/e==-he?"-0":t}function P(e){return Ct(e)?e:jt(e)}function L(e,t,n,o,a,i){var u=a&pe,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var f=-1,d=!0,h=a&de?new p:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],m=t[f];if(o)var y=u?o(m,v,f,t,e,i):o(v,m,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(h){if(!r(t,function(e,t){if(!h.has(t)&&(v===e||n(v,e,o,a,i)))return h.add(t)})){d=!1;break}}else if(v!==m&&!n(v,m,o,a,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function A(e,t,n,r,o,a,i){switch(n){case Le:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Pe:return!(e.byteLength!=t.byteLength||!r(new at(e),new at(t)));case ge:case be:case Oe:return V(+e,+t);case we:return e.name==t.name&&e.message==t.message;case Ce:case xe:return e==t+"";case Ne:var u=s;case ke:var l=a&pe;if(u||(u=c),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;a|=de,i.set(e,t);var d=L(u(e),u(t),r,o,a,i);return i.delete(e),d;case Se:if(_t)return _t.call(e)==_t.call(t)}return!1}function T(e,t,n,r,o,a){var i=o&pe,u=ie(e),s=u.length;if(s!=ie(t).length&&!i)return!1;for(var c=s;c--;){var l=u[c];if(!(i?l in t:tt.call(t,l)))return!1}var f=a.get(e);if(f&&a.get(t))return f==t;var d=!0;a.set(e,t),a.set(t,e);for(var p=i;++c<s;){var h=e[l=u[c]],v=t[l];if(r)var m=i?r(v,h,l,t,e,a):r(h,v,l,e,t,a);if(!(void 0===m?h===v||n(h,v,r,o,a):m)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var y=e.constructor,g=t.constructor;y!=g&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g)&&(d=!1)}return a.delete(e),a.delete(t),d}function M(e,t){var n=e.__data__;return q(t)?n["string"==typeof t?"string":"hash"]:n.map}function H(e){for(var t=ie(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,z(o)]}return t}function D(e,t){var n=i(e,t);return N(n)?n:void 0}function R(e,t,n){for(var r,o=-1,a=(t=I(t,e)?[t]:P(t)).length;++o<a;){var i=U(t[o]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(a=e?e.length:0)&&Y(a)&&F(i,a)&&(Ct(e)||X(e))}function F(e,t){return!!(t=null==t?ve:t)&&("number"==typeof e||Ie.test(e))&&e>-1&&e%1==0&&e<t}function I(e,t){if(Ct(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ne(e))||(Te.test(e)||!Ae.test(e)||null!=t&&e in Object(t))}function q(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function W(e){return!!Ye&&Ye in e}function G(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ze)}function z(e){return e===e&&!ee(e)}function $(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function U(e){if("string"==typeof e||ne(e))return e;var t=e+"";return"0"==t&&1/e==-he?"-0":t}function J(e){if(null!=e){try{return et.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(le);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(B.Cache||d),n}function V(e,t){return e===t||e!==e&&t!==t}function X(e){return Z(e)&&tt.call(e,"callee")&&(!it.call(e,"callee")||nt.call(e)==me)}function K(e){return null!=e&&Y(e.length)&&!Q(e)}function Z(e){return te(e)&&K(e)}function Q(e){var t=ee(e)?nt.call(e):"";return t==_e||t==Ee}function Y(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ve}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function te(e){return!!e&&"object"==typeof e}function ne(e){return"symbol"==typeof e||te(e)&&nt.call(e)==Se}function re(e){return null==e?"":S(e)}function oe(e,t,n){var r=null==e?void 0:g(e,t);return void 0===r?n:r}function ae(e,t){return null!=e&&R(e,t,b)}function ie(e){return K(e)?v(e):j(e)}function ue(e){return e}function se(e){return I(e)?o(U(e)):x(e)}var ce=200,le="Expected a function",fe="__lodash_hash_undefined__",de=1,pe=2,he=1/0,ve=9007199254740991,me="[object Arguments]",ye="[object Array]",ge="[object Boolean]",be="[object Date]",we="[object Error]",_e="[object Function]",Ee="[object GeneratorFunction]",Ne="[object Map]",Oe="[object Number]",je="[object Object]",Ce="[object RegExp]",ke="[object Set]",xe="[object String]",Se="[object Symbol]",Pe="[object ArrayBuffer]",Le="[object DataView]",Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Te=/^\w*$/,Me=/^\./,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,De=/[\\^$.*+?()[\]{}|]/g,Re=/\\(\\)?/g,Fe=/^\[object .+?Constructor\]$/,Ie=/^(?:0|[1-9]\d*)$/,qe={};qe["[object Float32Array]"]=qe["[object Float64Array]"]=qe["[object Int8Array]"]=qe["[object Int16Array]"]=qe["[object Int32Array]"]=qe["[object Uint8Array]"]=qe["[object Uint8ClampedArray]"]=qe["[object Uint16Array]"]=qe["[object Uint32Array]"]=!0,qe[me]=qe[ye]=qe[Pe]=qe[ge]=qe[Le]=qe[be]=qe[we]=qe[_e]=qe[Ne]=qe[Oe]=qe[je]=qe[Ce]=qe[ke]=qe[xe]=qe["[object WeakMap]"]=!1;var We="object"==typeof e&&e&&e.Object===Object&&e,Ge="object"==typeof self&&self&&self.Object===Object&&self,ze=We||Ge||Function("return this")(),$e="object"==typeof t&&t&&!t.nodeType&&t,Ue=$e&&"object"==typeof n&&n&&!n.nodeType&&n,Je=Ue&&Ue.exports===$e&&We.process,Be=function(){try{return Je&&Je.binding("util")}catch(e){}}(),Ve=Be&&Be.isTypedArray,Xe=Array.prototype,Ke=Function.prototype,Ze=Object.prototype,Qe=ze["__core-js_shared__"],Ye=function(){var e=/[^.]+$/.exec(Qe&&Qe.keys&&Qe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),et=Ke.toString,tt=Ze.hasOwnProperty,nt=Ze.toString,rt=RegExp("^"+et.call(tt).replace(De,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ot=ze.Symbol,at=ze.Uint8Array,it=Ze.propertyIsEnumerable,ut=Xe.splice,st=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ct=D(ze,"DataView"),lt=D(ze,"Map"),ft=D(ze,"Promise"),dt=D(ze,"Set"),pt=D(ze,"WeakMap"),ht=D(Object,"create"),vt=J(ct),mt=J(lt),yt=J(ft),gt=J(dt),bt=J(pt),wt=ot?ot.prototype:void 0,_t=wt?wt.valueOf:void 0,Et=wt?wt.toString:void 0;l.prototype.clear=function(){this.__data__=ht?ht(null):{}},l.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},l.prototype.get=function(e){var t=this.__data__;if(ht){var n=t[e];return n===fe?void 0:n}return tt.call(t,e)?t[e]:void 0},l.prototype.has=function(e){var t=this.__data__;return ht?void 0!==t[e]:tt.call(t,e)},l.prototype.set=function(e,t){return this.__data__[e]=ht&&void 0===t?fe:t,this},f.prototype.clear=function(){this.__data__=[]},f.prototype.delete=function(e){var t=this.__data__,n=m(t,e);return!(n<0||(n==t.length-1?t.pop():ut.call(t,n,1),0))},f.prototype.get=function(e){var t=this.__data__,n=m(t,e);return n<0?void 0:t[n][1]},f.prototype.has=function(e){return m(this.__data__,e)>-1},f.prototype.set=function(e,t){var n=this.__data__,r=m(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},d.prototype.clear=function(){this.__data__={hash:new l,map:new(lt||f),string:new l}},d.prototype.delete=function(e){return M(this,e).delete(e)},d.prototype.get=function(e){return M(this,e).get(e)},d.prototype.has=function(e){return M(this,e).has(e)},d.prototype.set=function(e,t){return M(this,e).set(e,t),this},p.prototype.add=p.prototype.push=function(e){return this.__data__.set(e,fe),this},p.prototype.has=function(e){return this.__data__.has(e)},h.prototype.clear=function(){this.__data__=new f},h.prototype.delete=function(e){return this.__data__.delete(e)},h.prototype.get=function(e){return this.__data__.get(e)},h.prototype.has=function(e){return this.__data__.has(e)},h.prototype.set=function(e,t){var n=this.__data__;if(n instanceof f){var r=n.__data__;if(!lt||r.length<ce-1)return r.push([e,t]),this;n=this.__data__=new d(r)}return n.set(e,t),this};var Nt=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}(),Ot=function(e){return nt.call(e)};(ct&&Ot(new ct(new ArrayBuffer(1)))!=Le||lt&&Ot(new lt)!=Ne||ft&&"[object Promise]"!=Ot(ft.resolve())||dt&&Ot(new dt)!=ke||pt&&"[object WeakMap]"!=Ot(new pt))&&(Ot=function(e){var t=nt.call(e),n=t==je?e.constructor:void 0,r=n?J(n):void 0;if(r)switch(r){case vt:return Le;case mt:return Ne;case yt:return"[object Promise]";case gt:return ke;case bt:return"[object WeakMap]"}return t});var jt=B(function(e){e=re(e);var t=[];return Me.test(e)&&t.push(""),e.replace(He,function(e,n,r,o){t.push(r?o.replace(Re,"$1"):n||e)}),t});B.Cache=d;var Ct=Array.isArray,kt=Ve?function(e){return function(t){return e(t)}}(Ve):function(e){return te(e)&&Y(e.length)&&!!qe[nt.call(e)]};n.exports=function(e,t){var n={};return t=O(t,3),y(e,function(e,r,o){n[r]=t(e,r,o)}),n}}).call(t,n(6),n(12)(e))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function d(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function b(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function w(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function O(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var j,C,k=n(0),x=n.n(k),S=n(1),P=n.n(S),L=n(2),A=n.n(L),T=n(10),M=n.n(T),H=n(11),D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R=function(e){var t=e.isNormal,n=e.lineNumber,r=e.oldLineNumber;return t?r:n},F=function(e){var t=e.isNormal,n=e.lineNumber,r=e.newLineNumber;return t?r:n},I=function(e){return e[e.length-1]},q=function(e,t,n){var r=e.reduce(function(e,r,o){var a={type:"normal",isNormal:!0,oldLineNumber:t+o,newLineNumber:n+o,content:" "+r};return e.push(a),e},[]),o=r.length;return{content:"@@ -"+t+","+o+" +"+n+","+o,oldStart:t,oldLines:o,newStart:n,newLines:o,changes:r}},W=function(e,t){if(!e||!t)return null;var n=I(e.changes),o=t.changes[0];return n&&o?R(n)+1!==R(o)?null:D({},e,{changes:[].concat(r(e.changes),r(t.changes))}):null},G=function(e,t){return e.reduce(function(e,n){var r=W(n,t)||W(t,n);return e.push(r||n),e},[])},z=function(e){var t=e.isNormal,n=e.isInsert,r=e.lineNumber,o=e.oldLineNumber;return t?"N"+o:(n?"I":"D")+r},$=[[],[]],U=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.threshold,r=void 0===n?1/0:n,o=t.markLongDistanceDiff,a=void 0!==o&&o;return function(t,n){if(!t||!n)return $;var o=t.content,i=n.content;if(r!==1/0&&M()(o,i)>r)return a?[[[0,o.length]],[[0,i.length]]]:$;var u=e(o,i).reduce(function(e,t){var n=t.added,r=t.removed,o=t.value;return n||r?n?(e.bEdits.push([e.bIndex,o.length]),e.bIndex+=o.length,e):(e.aEdits.push([e.aIndex,o.length]),e.aIndex+=o.length,e):(e.aIndex+=o.length,e.bIndex+=o.length,e)},{aEdits:[],bEdits:[],aIndex:0,bIndex:0});return[u.aEdits,u.bEdits]}}},J=U(H.diffWordsWithSpace),B=U(H.diffChars),V=P.a.oneOf(["unified","split"]),X={type:P.a.oneOf(["delete","insert","normal"]).isRequired,content:P.a.string.isRequired,isNormal:P.a.bool,isInsert:P.a.bool,isDelete:P.a.bool,lineNumber:P.a.number,oldLineNumber:P.a.number,newLineNumber:P.a.number},K=P.a.shape(X),Z={oldStart:P.a.number.isRequired,oldLines:P.a.number.isRequired,newStart:P.a.number.isRequired,newLines:P.a.number.isRequired,content:P.a.string.isRequired,changes:P.a.arrayOf(K).isRequired},Q=P.a.shape(Z),Y={gutterHeader:P.a.object,codeHeader:P.a.object,gutter:P.a.object,code:P.a.object},ee=P.a.shape(Y),te={hunk:P.a.string,hunkHeader:P.a.string,gutterHeader:P.a.string,codeHeader:P.a.string,line:P.a.string,gutter:P.a.string,code:P.a.string},ne=P.a.shape(te),re=n(5),oe=n.n(re),ae=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},ie=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return t&&ae(t,o)||(n=e.apply(void 0,o),t=o),n}},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{headerGutterEvents:e.gutterHeader,headerContentEvents:e.codeHeader,otherEvents:o(e,["gutterHeader","codeHeader"])}},se=function(){return ie(ue)},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{hunkClassName:e.hunk,headerClassName:e.hunkHeader,headerGutterClassName:e.gutterHeader,headerContentClassName:e.codeHeader,otherClassNames:o(e,["hunk","hunkHeader","gutterHeader","codeHeader"])}},le=function(){return ie(ce)},fe=function(e,t){return oe()(e,function(e){return function(){return e(t)}})},de=function(){return ie(fe)},pe=(n(7),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),he=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ve=(C=j=function(e){function t(){var e,n,r,o;a(this,t);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.bindGutterEvents=de(),r.bindCodeEvents=de(),o=n,i(r,o)}return u(t,k["PureComponent"]),he(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.change;(0,e.onRenderCode)(this.container.querySelector(".diff-code"),t)}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){var e=this,t=this.props,n=t.change,r=t.selected,o=t.customClassNames,a=t.customEvents,i=n.type,u=n.isInsert,s=n.isDelete,c=n.content,l=R(n),f=F(n),d=this.bindGutterEvents(a.gutter,n),p=this.bindCodeEvents(a.code,n),h=A()("diff-gutter","diff-gutter-"+i,o.gutter,{"diff-gutter-selected":r}),v=A()("diff-code","diff-code-"+i,o.code,{"diff-code-selected":r});return x.a.createElement("tr",{className:A()("diff-line",o.line),ref:function(t){return e.container=t}},x.a.createElement("td",pe({className:h},d),!u&&l),x.a.createElement("td",pe({className:h},d),!s&&f),x.a.createElement("td",pe({className:v},p),c))}}]),t}(),j.propTypes={change:K.isRequired,selected:P.a.bool.isRequired,customEvents:ee,customClassNames:ne,onRenderCode:P.a.func},j.defaultProps={customEvents:{},onRenderCode:function(){}},C);ve.displayName="UnifiedChange";n(8);var me=function(e){var t=e.element;return x.a.createElement("tr",{className:"widget"},x.a.createElement("td",{colSpan:3},t))};me.displayName="UnifiedWidget";var ye=me,ge=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_e=function(e,t){return e.reduce(function(e,n){e.push(["change",n]);var r=z(n),o=t[r];return o&&e.push(["widget",o]),e},[])},Ee=function(e,t,n,r){var o=we(e,2),a=o[0],i=o[1];if("change"===a){var u=z(i);return x.a.createElement(ve,be({key:t,change:i,selected:n.includes(u)},r))}return"widget"===a?x.a.createElement(ye,{key:t,element:i}):null},Ne=function(e){function t(){var e,n,r,o;c(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.bindGutterEvents=de(),r.bindContentEvents=de(),o=n,l(r,o)}return f(t,k["PureComponent"]),ge(t,[{key:"render",value:function(){var e=this.props,t=e.hunk,n=e.elements,r=e.gutterEvents,o=e.contentEvents,a=e.className,i=e.gutterClassName,u=e.contentClassName,s=this.bindGutterEvents(r,t),c=this.bindGutterEvents(o,t),l=A()("diff-hunk-header",a),f=A()("diff-hunk-header-gutter",i),d=A()("diff-hunk-header-content",u);if(void 0===n)return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:2,className:f},s)),x.a.createElement("td",be({className:d},c),t.content));if(null===n)return null;if(Array.isArray(n)){var p=we(n,2),h=p[0],v=p[1];return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:2,className:f},s),h),x.a.createElement("td",be({className:d},c),v))}return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:3,className:d},c),n))}}]),t}();Ne.displayName="HunkHeader";var Oe=function(e){var t=e.hunk,n=e.widgets,r=e.selectedChanges,o=e.header,a=e.headerGutterEvents,i=e.headerContentEvents,u=e.className,c=e.headerClassName,l=e.headerGutterClassName,f=e.headerContentClassName,d=s(e,["hunk","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),p=_e(t.changes,n);return x.a.createElement("tbody",{className:A()("diff-hunk",u)},x.a.createElement(Ne,{hunk:t,elements:o,gutterEvents:a,contentEvents:i,className:c,gutterClassName:l,contentClassName:f}),p.map(function(e,t){return Ee(e,t,r,d)}))};Oe.displayName="UnifiedHunk";var je,Ce,ke=Oe,xe=n(13),Se=n.n(xe),Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ae=(Ce=je=function(e){function t(){var e,n,r,o;p(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=h(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.cell=null,o=n,h(r,o)}return v(t,k["PureComponent"]),Le(t,[{key:"componentDidMount",value:function(){this.notifyRender()}},{key:"componentDidUpdate",value:function(e){e.text===this.props.text&&e.html===this.props.html||this.notifyRender()}},{key:"notifyRender",value:function(){this.props.onRender(this.cell)}},{key:"render",value:function(){var e=this,t=this.props,n=t.text,r=t.html,o=(t.onRender,d(t,["text","html","onRender"])),a=function(t){return e.cell=t};return r?x.a.createElement("td",Pe({ref:a},o,{dangerouslySetInnerHTML:{__html:r}})):x.a.createElement("td",Pe({ref:a},o),n)}}]),t}(),je.defaultProps={onRender:function(){}},Ce);Ae.displayName="CodeCell";var Te,Me,He=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),De=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Re=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe=[[],[]],Ie=function(e){var t=e.change,n=e.side,r=e.edits,o=e.selected,a=e.customClassNames,i=e.customEvents,u=e.onRenderCode,s=e.bindGutterEvents,c=e.bindCodeEvents;if(!t)return[x.a.createElement("td",{key:"gutter",className:A()("diff-gutter","diff-gutter-omit",a.gutter)}),x.a.createElement("td",{key:"code",className:A()("diff-code","diff-code-omit",a.code)})];var l=t.type,f=t.content,d=0===n?R(t):F(t),p=s(i.gutter,t),h=A()("diff-gutter","diff-gutter-"+l,a.gutter,{"diff-gutter-selected":o}),v=Re({key:"gutter",className:h,"data-line-number":d},p),m=c(i.code,t),y=A()("diff-code","diff-code-"+l,a.code,{"diff-code-selected":o}),g=Re({key:"code",className:y,onRender:u},m);if(!r.length)return[x.a.createElement("td",v),x.a.createElement(Ae,Re({},g,{text:f}))];var b=r.reduce(function(e,t){var n=De(t,2),r=n[0],o=n[1],a=f.slice(e.lastIndex,r),i=f.substr(r,o);return e.html+=Se()(a)+'<mark class="diff-code-edit">'+Se()(i)+"</mark>",e.lastIndex=r+o,e},{html:"",lastIndex:0}),w=b.html,_=b.lastIndex,E=Se()(f.substring(_));return[x.a.createElement("td",v),x.a.createElement(Ae,Re({},g,{html:w+E}))]},qe=(Me=Te=function(e){function t(){var e,n,r,o;m(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.bindOldGutterEvents=de(),r.bindNewGutterEvents=de(),r.bindOldCodeEvents=de(),r.bindNewCodeEvents=de(),o=n,y(r,o)}return g(t,k["PureComponent"]),He(t,[{key:"render",value:function(){var e=this.props,t=e.oldChange,n=e.newChange,r=e.oldSelected,o=e.newSelected,a=e.monotonous,i=e.markEdits,u=e.customClassNames,s=e.customEvents,c=e.onRenderCode,l=i(t,n),f=De(l,2),d=f[0],p=f[1],h={monotonous:a,customClassNames:u,customEvents:s,onRenderCode:c},v=Re({},h,{change:t,side:0,edits:d,selected:r,bindGutterEvents:this.bindOldGutterEvents,bindCodeEvents:this.bindOldCodeEvents}),m=Re({},h,{change:n,side:1,edits:p,selected:o,bindGutterEvents:this.bindNewGutterEvents,bindCodeEvents:this.bindNewCodeEvents});if(a)return x.a.createElement("tr",{className:A()("diff-line",u.line)},Ie(t?v:m));var y=function(e,t){return e&&!t?"diff-line-old-only":!e&&t?"diff-line-new-only":e===t?"diff-line-normal":"diff-line-compare"}(t,n);return x.a.createElement("tr",{className:A()("diff-line",u.line,y)},Ie(v),Ie(m))}}]),t}(),Te.propTypes={monotonous:P.a.bool.isRequired,oldChange:K,newChange:K,oldSelected:P.a.bool.isRequired,newSelected:P.a.bool.isRequired,markEdits:P.a.func,customEvents:ee,customClassNames:ne,onRenderCode:P.a.func},Te.defaultProps={customEvents:{},markEdits:function(){return Fe},onRenderCode:function(){}},Me);qe.displayName="SplitChange";var We=function(e){var t=e.oldElement,n=e.newElement;return e.monotonous?x.a.createElement("tr",{className:"widget"},x.a.createElement("td",{colSpan:2},t||n)):t===n?x.a.createElement("tr",{className:"widget"},x.a.createElement("td",{colSpan:4},t)):x.a.createElement("tr",{className:"widget"},x.a.createElement("td",{colSpan:2},t),x.a.createElement("td",{colSpan:2},n))};We.displayName="SplitWidget";var Ge=We,ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Ue=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];if(o.isNormal)n.push(["change",o,o]);else if(o.isDelete){var a=e[r+1];a&&a.isInsert?(r+=1,n.push(["change",o,a])):n.push(["change",o,null])}else n.push(["change",null,o]);var i=n[n.length-1].slice(1).map(function(e){if(!e)return null;var n=z(e);return t[n]||null}),u=$e(i,2),s=u[0],c=u[1];(s||c)&&n.push(["widget",s,c])}return n},Je=function(e,t,n,r,o){var a=$e(e,3),i=a[0],u=a[1],s=a[2];if("change"===i){var c=!!u&&n.includes(z(u)),l=!!s&&n.includes(z(s));return x.a.createElement(qe,ze({key:t,oldChange:u,newChange:s,monotonous:r,oldSelected:c,newSelected:l},o))}return"widget"===i?x.a.createElement(Ge,{key:t,monotonous:r,oldElement:u,newElement:s}):null},Be=function(e){var t=e.hunk,n=e.monotonous,r=e.elements,o=e.gutterEvents,a=e.contentEvents,i=e.className,u=e.gutterClassName,s=e.contentClassName,c=function(e){return function(){return e(t)}},l=oe()(o,c),f=oe()(a,c),d=A()("diff-hunk-header",i),p=A()("diff-hunk-header-gutter",u),h=A()("diff-hunk-header-content",s);if(void 0===r)return x.a.createElement("tr",{className:d},x.a.createElement("td",ze({className:p},l)),x.a.createElement("td",ze({colSpan:n?1:3,className:h},f),t.content));if(null===r)return null;if(Array.isArray(r)){var v=$e(r,2),m=v[0],y=v[1];return x.a.createElement("tr",{className:d},x.a.createElement("td",ze({className:p},l),m),x.a.createElement("td",ze({colSpan:n?1:3,className:h},f),y))}return x.a.createElement("tr",{className:d},x.a.createElement("td",{colSpan:n?2:4,className:h},r))};Be.displayName="HunkHeader";var Ve=function(e){var t=e.hunk,n=e.monotonous,r=e.widgets,o=e.selectedChanges,a=e.header,i=e.headerGutterEvents,u=e.headerContentEvents,s=e.className,c=e.headerClassName,l=e.headerGutterClassName,f=e.headerContentClassName,d=b(e,["hunk","monotonous","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),p=Ue(t.changes,r);return x.a.createElement("tbody",{className:A()("diff-hunk",s)},x.a.createElement(Be,{hunk:t,monotonous:n,elements:a,gutterEvents:i,contentEvents:u,className:c,gutterClassName:l,contentClassName:f}),p.map(function(e,t){return Je(e,t,o,n,d)}))};Ve.displayName="SplitHunk";var Xe,Ke,Ze=Ve,Qe=(n(14),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),Ye=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),et=(Ke=Xe=function(e){function t(){var e,n,r,o;_(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=E(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.selectEvents=se(),r.selectClassNames=le(),o=n,E(r,o)}return N(t,k["PureComponent"]),Ye(t,[{key:"render",value:function(){var e=this.props,t=e.viewType,n=e.customEvents,r=e.customClassNames,o=w(e,["viewType","customEvents","customClassNames"]),a="unified"===t?ke:Ze,i=this.selectEvents(n),u=i.headerGutterEvents,s=i.headerContentEvents,c=i.otherEvents,l=this.selectClassNames(r),f=l.hunkClassName,d=l.headerClassName,p=l.headerGutterClassName,h=l.headerContentClassName,v=l.otherClassNames;return x.a.createElement(a,Qe({},o,{headerGutterEvents:u,headerContentEvents:s,className:f,headerClassName:d,headerGutterClassName:p,headerContentClassName:h,customEvents:c,customClassNames:v}))}}]),t}(),Xe.propTypes={viewType:V,hunk:Q.isRequired,header:P.a.oneOfType([P.a.node,P.a.shape([P.a.node,P.a.node])]),widgets:P.a.objectOf(P.a.element),selectedChanges:P.a.arrayOf(P.a.string),customEvents:ee},Xe.defaultProps={viewType:"split",widgets:{},selectedChanges:[],customEvents:{}},Ke);et.displayName="Hunk";n(15);var tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nt=function(e){var t=e.diffType,n=e.hunks,r=e.children,o=e.className,a=O(e,["diffType","hunks","children","className"]),i="add"===t||"delete"===t,u=function(e,t){return"unified"===a.viewType?x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null)):t?x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null)):x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null),x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null))}(0,i),s=r?k.Children.map(r,function(e){return Object(k.cloneElement)(e,tt({},a,{monotonous:i}))}):n.map(function(e){return x.a.createElement(et,tt({key:e.content,hunk:e,monotonous:i},a))});return x.a.createElement("table",{className:A()("diff",o)},u,s)};nt.displayName="Diff",nt.propTypes={diffType:P.a.oneOf(["add","delete","modify","rename","copy"]),viewType:V.isRequired,hunks:P.a.arrayOf(Q),children:P.a.oneOfType([P.a.element,P.a.arrayOf(P.a.element)])};var rt=nt,ot=n(3);n.d(t,"Diff",function(){return rt}),n.d(t,"Hunk",function(){return et}),n.d(t,"parseDiff",function(){return ot.parseDiff}),n.d(t,"addStubHunk",function(){return ot.addStubHunk}),n.d(t,"computeOldLineNumber",function(){return R}),n.d(t,"computeNewLineNumber",function(){return F}),n.d(t,"textLinesToHunk",function(){return q}),n.d(t,"insertHunk",function(){return G}),n.d(t,"getChangeKey",function(){return z}),n.d(t,"markWordEdits",function(){return J}),n.d(t,"markCharacterEdits",function(){return B})},function(e,t,n){"use strict";var r=[],o=[];e.exports=function(e,t){if(e===t)return 0;var n=e;e.length>t.length&&(e=t,t=n);var a=e.length,i=t.length;if(0===a)return i;if(0===i)return a;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-i);)a--,i--;if(0===a)return i;for(var u=0;u<a&&e.charCodeAt(u)===t.charCodeAt(u);)u++;if(a-=u,i-=u,0===a)return i;for(var s,c,l,f,d=0,p=0;d<a;)o[u+d]=e.charCodeAt(u+d),r[d]=++d;for(;p<i;)for(s=t.charCodeAt(u+p),l=p++,c=p,d=0;d<a;d++)f=s===o[u+d]?l:l+1,l=r[d],c=r[d]=l>c?f>c?c+1:f:f>l?l+1:f;return c}},function(e,t,n){/*!
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var a={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"parseDiff",function(){return f}),n.d(t,"addStubHunk",function(){return d});var o=n(4),a=n.n(o),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(e){var t=e.reduce(function(e,t,n){var r=u(e,3),o=r[0],a=r[1],i=r[2];return a?t.isInsert&&i>=0?(o.splice(i+1,0,t),[o,t,i+2]):(o.push(t),[o,t,t.isDelete?a.isDelete?i:n:i]):(o.push(t),[o,t,t.isDelete?n:-1])},[[],null,-1]);return u(t,1)[0]},c=function(e,t){var n="zip"===t.nearbySequences?s(e.changes):e.changes;return i({},e,{changes:n})},l=function(e,t){var n=e.hunks.map(function(e){return c(e,t)});return i({},e,{hunks:t.stubHunk?d(n):n})},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a.a.parse(e).map(function(e){return l(e,t)})},d=function(e){if(!e||!e.length)return e;var t=e[e.length-1],n={oldStart:t.oldStart+t.oldLines,oldLines:0,newStart:t.newStart+t.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(r(e),[n])}},function(e,t,n){!function(n){var r={parse:function(e){for(var t,n,r,o,a=[],i=2,u=e.split("\n"),s=u.length,c=0;c<s;){var l=u[c];if(0===l.indexOf("diff --git")){var f=l.split(" ");t={oldPath:f[2].slice(2),newPath:f[3].slice(2),hunks:[]},a.push(t);var d=null,p=u[c+1];0===p.indexOf("old")&&(t.oldMode=p.slice(9,16),t.newMode=u[c+2].slice(9,16),p=u[(c+=2)+1]),0===p.indexOf("similarity")&&(t.similarity=parseInt(p.split(" ")[2],10),c+=1);var h;e:for(;h=u[++c];){switch((f=h.split(" "))[0]){case"diff":c--;break e;case"index":var v=f[1].split("..");t.oldRevision=v[0],t.newRevision=v[1],f[2]&&(t.oldMode=t.newMode=f[2]),i=5;var m=u[c+1];if(0===m.indexOf("---")){var y=u[c+2];/\s\/dev\/null$/.test(m)?(t.oldPath="/dev/null",d="add"):/\s\/dev\/null$/.test(y)&&(t.newPath="/dev/null",d="delete"),c+=2}break e}d||(d=f[0])}t.type=d||"modify"}else if(0===l.indexOf("Binary"))t.isBinary=!0,i=2,t=null;else if(5===i)if(0===l.indexOf("@@")){var g=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(l);n={content:l,oldStart:g[1]-0,newStart:g[4]-0,oldLines:g[3]-0||0,newLines:g[6]-0||0,changes:[]},t.hunks.push(n),r=n.oldStart,o=n.newStart}else{var b=l.slice(0,1),w={content:l.slice(1)};switch(b){case"+":w.type="insert",w.isInsert=!0,w.lineNumber=o,o++;break;case"-":w.type="delete",w.isDelete=!0,w.lineNumber=r,r++;break;case" ":w.type="normal",w.isNormal=!0,w.oldLineNumber=r,w.newLineNumber=o,r++,o++}w.type&&n.changes.push(w)}c++}return a}};t=e.exports=r}()},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function i(e,t){return null==e?void 0:e[t]}function u(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function s(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function c(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function l(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function f(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function d(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function p(e){var t=-1,n=e?e.length:0;for(this.__data__=new d;++t<n;)this.add(e[t])}function h(e){this.__data__=new f(e)}function v(e,t){var n=Ct(e)||X(e)?a(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!tt.call(e,i)||o&&("length"==i||F(i,r))||n.push(i);return n}function m(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1}function y(e,t){return e&&Nt(e,t,ie)}function g(e,t){for(var n=0,r=(t=I(t,e)?[t]:P(t)).length;null!=e&&n<r;)e=e[U(t[n++])];return n&&n==r?e:void 0}function b(e,t){return null!=e&&t in Object(e)}function w(e,t,n,r,o){return e===t||(null==e||null==t||!ee(e)&&!te(t)?e!==e&&t!==t:_(e,t,w,n,r,o))}function _(e,t,n,r,o,a){var i=Ct(e),s=Ct(t),c=ye,l=ye;i||(c=(c=Ot(e))==me?je:c),s||(l=(l=Ot(t))==me?je:l);var f=c==je&&!u(e),d=l==je&&!u(t),p=c==l;if(p&&!f)return a||(a=new h),i||kt(e)?L(e,t,n,r,o,a):A(e,t,c,n,r,o,a);if(!(o&pe)){var v=f&&tt.call(e,"__wrapped__"),m=d&&tt.call(t,"__wrapped__");if(v||m){var y=v?e.value():e,g=m?t.value():t;return a||(a=new h),n(y,g,r,o,a)}}return!!p&&(a||(a=new h),T(e,t,n,r,o,a))}function E(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var u=n[o];if(i&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var s=(u=n[o])[0],c=e[s],l=u[1];if(i&&u[2]){if(void 0===c&&!(s in e))return!1}else{var f=new h;if(r)var d=r(c,l,s,e,t,f);if(!(void 0===d?w(l,c,r,de|pe,f):d))return!1}}return!0}function N(e){return!(!ee(e)||W(e))&&(Q(e)||u(e)?rt:Fe).test(J(e))}function O(e){return"function"==typeof e?e:null==e?ue:"object"==typeof e?Ct(e)?k(e[0],e[1]):C(e):se(e)}function j(e){if(!G(e))return st(e);var t=[];for(var n in Object(e))tt.call(e,n)&&"constructor"!=n&&t.push(n);return t}function C(e){var t=H(e);return 1==t.length&&t[0][2]?$(t[0][0],t[0][1]):function(n){return n===e||E(n,e,t)}}function k(e,t){return I(e)&&z(t)?$(U(e),t):function(n){var r=oe(n,e);return void 0===r&&r===t?ae(n,e):w(t,r,void 0,de|pe)}}function x(e){return function(t){return g(t,e)}}function S(e){if("string"==typeof e)return e;if(ne(e))return Et?Et.call(e):"";var t=e+"";return"0"==t&&1/e==-he?"-0":t}function P(e){return Ct(e)?e:jt(e)}function L(e,t,n,o,a,i){var u=a&pe,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var f=-1,d=!0,h=a&de?new p:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],m=t[f];if(o)var y=u?o(m,v,f,t,e,i):o(v,m,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(h){if(!r(t,function(e,t){if(!h.has(t)&&(v===e||n(v,e,o,a,i)))return h.add(t)})){d=!1;break}}else if(v!==m&&!n(v,m,o,a,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function A(e,t,n,r,o,a,i){switch(n){case Le:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Pe:return!(e.byteLength!=t.byteLength||!r(new at(e),new at(t)));case ge:case be:case Oe:return V(+e,+t);case we:return e.name==t.name&&e.message==t.message;case Ce:case xe:return e==t+"";case Ne:var u=s;case ke:var l=a&pe;if(u||(u=c),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;a|=de,i.set(e,t);var d=L(u(e),u(t),r,o,a,i);return i.delete(e),d;case Se:if(_t)return _t.call(e)==_t.call(t)}return!1}function T(e,t,n,r,o,a){var i=o&pe,u=ie(e),s=u.length;if(s!=ie(t).length&&!i)return!1;for(var c=s;c--;){var l=u[c];if(!(i?l in t:tt.call(t,l)))return!1}var f=a.get(e);if(f&&a.get(t))return f==t;var d=!0;a.set(e,t),a.set(t,e);for(var p=i;++c<s;){var h=e[l=u[c]],v=t[l];if(r)var m=i?r(v,h,l,t,e,a):r(h,v,l,e,t,a);if(!(void 0===m?h===v||n(h,v,r,o,a):m)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var y=e.constructor,g=t.constructor;y!=g&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g)&&(d=!1)}return a.delete(e),a.delete(t),d}function M(e,t){var n=e.__data__;return q(t)?n["string"==typeof t?"string":"hash"]:n.map}function H(e){for(var t=ie(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,z(o)]}return t}function D(e,t){var n=i(e,t);return N(n)?n:void 0}function R(e,t,n){for(var r,o=-1,a=(t=I(t,e)?[t]:P(t)).length;++o<a;){var i=U(t[o]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(a=e?e.length:0)&&Y(a)&&F(i,a)&&(Ct(e)||X(e))}function F(e,t){return!!(t=null==t?ve:t)&&("number"==typeof e||Ie.test(e))&&e>-1&&e%1==0&&e<t}function I(e,t){if(Ct(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ne(e))||(Te.test(e)||!Ae.test(e)||null!=t&&e in Object(t))}function q(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function W(e){return!!Ye&&Ye in e}function G(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ze)}function z(e){return e===e&&!ee(e)}function $(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function U(e){if("string"==typeof e||ne(e))return e;var t=e+"";return"0"==t&&1/e==-he?"-0":t}function J(e){if(null!=e){try{return et.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(le);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(B.Cache||d),n}function V(e,t){return e===t||e!==e&&t!==t}function X(e){return Z(e)&&tt.call(e,"callee")&&(!it.call(e,"callee")||nt.call(e)==me)}function K(e){return null!=e&&Y(e.length)&&!Q(e)}function Z(e){return te(e)&&K(e)}function Q(e){var t=ee(e)?nt.call(e):"";return t==_e||t==Ee}function Y(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ve}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function te(e){return!!e&&"object"==typeof e}function ne(e){return"symbol"==typeof e||te(e)&&nt.call(e)==Se}function re(e){return null==e?"":S(e)}function oe(e,t,n){var r=null==e?void 0:g(e,t);return void 0===r?n:r}function ae(e,t){return null!=e&&R(e,t,b)}function ie(e){return K(e)?v(e):j(e)}function ue(e){return e}function se(e){return I(e)?o(U(e)):x(e)}var ce=200,le="Expected a function",fe="__lodash_hash_undefined__",de=1,pe=2,he=1/0,ve=9007199254740991,me="[object Arguments]",ye="[object Array]",ge="[object Boolean]",be="[object Date]",we="[object Error]",_e="[object Function]",Ee="[object GeneratorFunction]",Ne="[object Map]",Oe="[object Number]",je="[object Object]",Ce="[object RegExp]",ke="[object Set]",xe="[object String]",Se="[object Symbol]",Pe="[object ArrayBuffer]",Le="[object DataView]",Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Te=/^\w*$/,Me=/^\./,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,De=/[\\^$.*+?()[\]{}|]/g,Re=/\\(\\)?/g,Fe=/^\[object .+?Constructor\]$/,Ie=/^(?:0|[1-9]\d*)$/,qe={};qe["[object Float32Array]"]=qe["[object Float64Array]"]=qe["[object Int8Array]"]=qe["[object Int16Array]"]=qe["[object Int32Array]"]=qe["[object Uint8Array]"]=qe["[object Uint8ClampedArray]"]=qe["[object Uint16Array]"]=qe["[object Uint32Array]"]=!0,qe[me]=qe[ye]=qe[Pe]=qe[ge]=qe[Le]=qe[be]=qe[we]=qe[_e]=qe[Ne]=qe[Oe]=qe[je]=qe[Ce]=qe[ke]=qe[xe]=qe["[object WeakMap]"]=!1;var We="object"==typeof e&&e&&e.Object===Object&&e,Ge="object"==typeof self&&self&&self.Object===Object&&self,ze=We||Ge||Function("return this")(),$e="object"==typeof t&&t&&!t.nodeType&&t,Ue=$e&&"object"==typeof n&&n&&!n.nodeType&&n,Je=Ue&&Ue.exports===$e&&We.process,Be=function(){try{return Je&&Je.binding("util")}catch(e){}}(),Ve=Be&&Be.isTypedArray,Xe=Array.prototype,Ke=Function.prototype,Ze=Object.prototype,Qe=ze["__core-js_shared__"],Ye=function(){var e=/[^.]+$/.exec(Qe&&Qe.keys&&Qe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),et=Ke.toString,tt=Ze.hasOwnProperty,nt=Ze.toString,rt=RegExp("^"+et.call(tt).replace(De,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ot=ze.Symbol,at=ze.Uint8Array,it=Ze.propertyIsEnumerable,ut=Xe.splice,st=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ct=D(ze,"DataView"),lt=D(ze,"Map"),ft=D(ze,"Promise"),dt=D(ze,"Set"),pt=D(ze,"WeakMap"),ht=D(Object,"create"),vt=J(ct),mt=J(lt),yt=J(ft),gt=J(dt),bt=J(pt),wt=ot?ot.prototype:void 0,_t=wt?wt.valueOf:void 0,Et=wt?wt.toString:void 0;l.prototype.clear=function(){this.__data__=ht?ht(null):{}},l.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},l.prototype.get=function(e){var t=this.__data__;if(ht){var n=t[e];return n===fe?void 0:n}return tt.call(t,e)?t[e]:void 0},l.prototype.has=function(e){var t=this.__data__;return ht?void 0!==t[e]:tt.call(t,e)},l.prototype.set=function(e,t){return this.__data__[e]=ht&&void 0===t?fe:t,this},f.prototype.clear=function(){this.__data__=[]},f.prototype.delete=function(e){var t=this.__data__,n=m(t,e);return!(n<0||(n==t.length-1?t.pop():ut.call(t,n,1),0))},f.prototype.get=function(e){var t=this.__data__,n=m(t,e);return n<0?void 0:t[n][1]},f.prototype.has=function(e){return m(this.__data__,e)>-1},f.prototype.set=function(e,t){var n=this.__data__,r=m(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},d.prototype.clear=function(){this.__data__={hash:new l,map:new(lt||f),string:new l}},d.prototype.delete=function(e){return M(this,e).delete(e)},d.prototype.get=function(e){return M(this,e).get(e)},d.prototype.has=function(e){return M(this,e).has(e)},d.prototype.set=function(e,t){return M(this,e).set(e,t),this},p.prototype.add=p.prototype.push=function(e){return this.__data__.set(e,fe),this},p.prototype.has=function(e){return this.__data__.has(e)},h.prototype.clear=function(){this.__data__=new f},h.prototype.delete=function(e){return this.__data__.delete(e)},h.prototype.get=function(e){return this.__data__.get(e)},h.prototype.has=function(e){return this.__data__.has(e)},h.prototype.set=function(e,t){var n=this.__data__;if(n instanceof f){var r=n.__data__;if(!lt||r.length<ce-1)return r.push([e,t]),this;n=this.__data__=new d(r)}return n.set(e,t),this};var Nt=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}(),Ot=function(e){return nt.call(e)};(ct&&Ot(new ct(new ArrayBuffer(1)))!=Le||lt&&Ot(new lt)!=Ne||ft&&"[object Promise]"!=Ot(ft.resolve())||dt&&Ot(new dt)!=ke||pt&&"[object WeakMap]"!=Ot(new pt))&&(Ot=function(e){var t=nt.call(e),n=t==je?e.constructor:void 0,r=n?J(n):void 0;if(r)switch(r){case vt:return Le;case mt:return Ne;case yt:return"[object Promise]";case gt:return ke;case bt:return"[object WeakMap]"}return t});var jt=B(function(e){e=re(e);var t=[];return Me.test(e)&&t.push(""),e.replace(He,function(e,n,r,o){t.push(r?o.replace(Re,"$1"):n||e)}),t});B.Cache=d;var Ct=Array.isArray,kt=Ve?function(e){return function(t){return e(t)}}(Ve):function(e){return te(e)&&Y(e.length)&&!!qe[nt.call(e)]};n.exports=function(e,t){var n={};return t=O(t,3),y(e,function(e,r,o){n[r]=t(e,r,o)}),n}}).call(t,n(6),n(12)(e))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function d(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function b(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function w(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function O(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var j,C,k=n(0),x=n.n(k),S=n(1),P=n.n(S),L=n(2),A=n.n(L),T=n(10),M=n.n(T),H=n(11),D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R=function(e){var t=e.isNormal,n=e.lineNumber,r=e.oldLineNumber;return t?r:n},F=function(e){var t=e.isNormal,n=e.lineNumber,r=e.newLineNumber;return t?r:n},I=function(e){return e[e.length-1]},q=function(e,t,n){var r=e.reduce(function(e,r,o){var a={type:"normal",isNormal:!0,oldLineNumber:t+o,newLineNumber:n+o,content:" "+r};return e.push(a),e},[]),o=r.length;return{content:"@@ -"+t+","+o+" +"+n+","+o,oldStart:t,oldLines:o,newStart:n,newLines:o,changes:r}},W=function(e,t){if(!e||!t)return null;var n=I(e.changes),o=t.changes[0];return n&&o?R(n)+1!==R(o)?null:D({},e,{changes:[].concat(r(e.changes),r(t.changes))}):null},G=function(e,t){return e.reduce(function(e,n){var r=W(n,t)||W(t,n);return e.push(r||n),e},[])},z=function(e){var t=e.isNormal,n=e.isInsert,r=e.lineNumber,o=e.oldLineNumber;return t?"N"+o:(n?"I":"D")+r},$=[[],[]],U=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.threshold,r=void 0===n?1/0:n,o=t.markLongDistanceDiff,a=void 0!==o&&o;return function(t,n){if(!t||!n)return $;var o=t.content,i=n.content;if(r!==1/0&&M()(o,i)>r)return a?[[[0,o.length]],[[0,i.length]]]:$;var u=e(o,i).reduce(function(e,t){var n=t.added,r=t.removed,o=t.value;return n||r?n?(e.bEdits.push([e.bIndex,o.length]),e.bIndex+=o.length,e):(e.aEdits.push([e.aIndex,o.length]),e.aIndex+=o.length,e):(e.aIndex+=o.length,e.bIndex+=o.length,e)},{aEdits:[],bEdits:[],aIndex:0,bIndex:0});return[u.aEdits,u.bEdits]}}},J=U(H.diffWordsWithSpace),B=U(H.diffChars),V=P.a.oneOf(["unified","split"]),X={type:P.a.oneOf(["delete","insert","normal"]).isRequired,content:P.a.string.isRequired,isNormal:P.a.bool,isInsert:P.a.bool,isDelete:P.a.bool,lineNumber:P.a.number,oldLineNumber:P.a.number,newLineNumber:P.a.number},K=P.a.shape(X),Z={oldStart:P.a.number.isRequired,oldLines:P.a.number.isRequired,newStart:P.a.number.isRequired,newLines:P.a.number.isRequired,content:P.a.string.isRequired,changes:P.a.arrayOf(K).isRequired},Q=P.a.shape(Z),Y={gutterHeader:P.a.object,codeHeader:P.a.object,gutter:P.a.object,code:P.a.object},ee=P.a.shape(Y),te={hunk:P.a.string,hunkHeader:P.a.string,gutterHeader:P.a.string,codeHeader:P.a.string,line:P.a.string,gutter:P.a.string,code:P.a.string},ne=P.a.shape(te),re=n(5),oe=n.n(re),ae=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},ie=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return t&&ae(t,o)||(n=e.apply(void 0,o),t=o),n}},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{headerGutterEvents:e.gutterHeader,headerContentEvents:e.codeHeader,otherEvents:o(e,["gutterHeader","codeHeader"])}},se=function(){return ie(ue)},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{hunkClassName:e.hunk,headerClassName:e.hunkHeader,headerGutterClassName:e.gutterHeader,headerContentClassName:e.codeHeader,otherClassNames:o(e,["hunk","hunkHeader","gutterHeader","codeHeader"])}},le=function(){return ie(ce)},fe=function(e,t){return oe()(e,function(e){return function(){return e(t)}})},de=function(){return ie(fe)},pe=(n(7),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),he=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ve=(C=j=function(e){function t(){var e,n,r,o;a(this,t);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.bindGutterEvents=de(),r.bindCodeEvents=de(),o=n,i(r,o)}return u(t,k["PureComponent"]),he(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.change;(0,e.onRenderCode)(this.container.querySelector(".diff-code"),t)}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){var e=this,t=this.props,n=t.change,r=t.selected,o=t.customClassNames,a=t.customEvents,i=n.type,u=n.isInsert,s=n.isDelete,c=n.content,l=R(n),f=F(n),d=this.bindGutterEvents(a.gutter,n),p=this.bindCodeEvents(a.code,n),h=A()("diff-gutter","diff-gutter-"+i,o.gutter,{"diff-gutter-selected":r}),v=A()("diff-code","diff-code-"+i,o.code,{"diff-code-selected":r});return x.a.createElement("tr",{className:A()("diff-line",o.line),ref:function(t){return e.container=t}},x.a.createElement("td",pe({className:h},d),!u&&l),x.a.createElement("td",pe({className:h},d),!s&&f),x.a.createElement("td",pe({className:v},p),c))}}]),t}(),j.propTypes={change:K.isRequired,selected:P.a.bool.isRequired,customEvents:ee,customClassNames:ne,onRenderCode:P.a.func},j.defaultProps={customEvents:{},onRenderCode:function(){}},C);ve.displayName="UnifiedChange";n(8);var me=function(e){var t=e.element;return x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:3,className:"diff-widget-content"},t))};me.displayName="UnifiedWidget";var ye=me,ge=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_e=function(e,t){return e.reduce(function(e,n){e.push(["change",n]);var r=z(n),o=t[r];return o&&e.push(["widget",o]),e},[])},Ee=function(e,t,n,r){var o=we(e,2),a=o[0],i=o[1];if("change"===a){var u=z(i);return x.a.createElement(ve,be({key:t,change:i,selected:n.includes(u)},r))}return"widget"===a?x.a.createElement(ye,{key:t,element:i}):null},Ne=function(e){function t(){var e,n,r,o;c(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.bindGutterEvents=de(),r.bindContentEvents=de(),o=n,l(r,o)}return f(t,k["PureComponent"]),ge(t,[{key:"render",value:function(){var e=this.props,t=e.hunk,n=e.elements,r=e.gutterEvents,o=e.contentEvents,a=e.className,i=e.gutterClassName,u=e.contentClassName,s=this.bindGutterEvents(r,t),c=this.bindGutterEvents(o,t),l=A()("diff-hunk-header",a),f=A()("diff-hunk-header-gutter",i),d=A()("diff-hunk-header-content",u);if(void 0===n)return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:2,className:f},s)),x.a.createElement("td",be({className:d},c),t.content));if(null===n)return null;if(Array.isArray(n)){var p=we(n,2),h=p[0],v=p[1];return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:2,className:f},s),h),x.a.createElement("td",be({className:d},c),v))}return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:3,className:d},c),n))}}]),t}();Ne.displayName="HunkHeader";var Oe=function(e){var t=e.hunk,n=e.widgets,r=e.selectedChanges,o=e.header,a=e.headerGutterEvents,i=e.headerContentEvents,u=e.className,c=e.headerClassName,l=e.headerGutterClassName,f=e.headerContentClassName,d=s(e,["hunk","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),p=_e(t.changes,n);return x.a.createElement("tbody",{className:A()("diff-hunk",u)},x.a.createElement(Ne,{hunk:t,elements:o,gutterEvents:a,contentEvents:i,className:c,gutterClassName:l,contentClassName:f}),p.map(function(e,t){return Ee(e,t,r,d)}))};Oe.displayName="UnifiedHunk";var je,Ce,ke=Oe,xe=n(13),Se=n.n(xe),Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ae=(Ce=je=function(e){function t(){var e,n,r,o;p(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=h(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.cell=null,o=n,h(r,o)}return v(t,k["PureComponent"]),Le(t,[{key:"componentDidMount",value:function(){this.notifyRender()}},{key:"componentDidUpdate",value:function(e){e.text===this.props.text&&e.html===this.props.html||this.notifyRender()}},{key:"notifyRender",value:function(){this.props.onRender(this.cell)}},{key:"render",value:function(){var e=this,t=this.props,n=t.text,r=t.html,o=(t.onRender,d(t,["text","html","onRender"])),a=function(t){return e.cell=t};return r?x.a.createElement("td",Pe({ref:a},o,{dangerouslySetInnerHTML:{__html:r}})):x.a.createElement("td",Pe({ref:a},o),n)}}]),t}(),je.defaultProps={onRender:function(){}},Ce);Ae.displayName="CodeCell";var Te,Me,He=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),De=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Re=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe=[[],[]],Ie=function(e){var t=e.change,n=e.side,r=e.edits,o=e.selected,a=e.customClassNames,i=e.customEvents,u=e.onRenderCode,s=e.bindGutterEvents,c=e.bindCodeEvents;if(!t)return[x.a.createElement("td",{key:"gutter",className:A()("diff-gutter","diff-gutter-omit",a.gutter)}),x.a.createElement("td",{key:"code",className:A()("diff-code","diff-code-omit",a.code)})];var l=t.type,f=t.content,d=0===n?R(t):F(t),p=s(i.gutter,t),h=A()("diff-gutter","diff-gutter-"+l,a.gutter,{"diff-gutter-selected":o}),v=Re({key:"gutter",className:h,"data-line-number":d},p),m=c(i.code,t),y=A()("diff-code","diff-code-"+l,a.code,{"diff-code-selected":o}),g=Re({key:"code",className:y,onRender:u},m);if(!r.length)return[x.a.createElement("td",v),x.a.createElement(Ae,Re({},g,{text:f}))];var b=r.reduce(function(e,t){var n=De(t,2),r=n[0],o=n[1],a=f.slice(e.lastIndex,r),i=f.substr(r,o);return e.html+=Se()(a)+'<mark class="diff-code-edit">'+Se()(i)+"</mark>",e.lastIndex=r+o,e},{html:"",lastIndex:0}),w=b.html,_=b.lastIndex,E=Se()(f.substring(_));return[x.a.createElement("td",v),x.a.createElement(Ae,Re({},g,{html:w+E}))]},qe=(Me=Te=function(e){function t(){var e,n,r,o;m(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.bindOldGutterEvents=de(),r.bindNewGutterEvents=de(),r.bindOldCodeEvents=de(),r.bindNewCodeEvents=de(),o=n,y(r,o)}return g(t,k["PureComponent"]),He(t,[{key:"render",value:function(){var e=this.props,t=e.oldChange,n=e.newChange,r=e.oldSelected,o=e.newSelected,a=e.monotonous,i=e.markEdits,u=e.customClassNames,s=e.customEvents,c=e.onRenderCode,l=i(t,n),f=De(l,2),d=f[0],p=f[1],h={monotonous:a,customClassNames:u,customEvents:s,onRenderCode:c},v=Re({},h,{change:t,side:0,edits:d,selected:r,bindGutterEvents:this.bindOldGutterEvents,bindCodeEvents:this.bindOldCodeEvents}),m=Re({},h,{change:n,side:1,edits:p,selected:o,bindGutterEvents:this.bindNewGutterEvents,bindCodeEvents:this.bindNewCodeEvents});if(a)return x.a.createElement("tr",{className:A()("diff-line",u.line)},Ie(t?v:m));var y=function(e,t){return e&&!t?"diff-line-old-only":!e&&t?"diff-line-new-only":e===t?"diff-line-normal":"diff-line-compare"}(t,n);return x.a.createElement("tr",{className:A()("diff-line",u.line,y)},Ie(v),Ie(m))}}]),t}(),Te.propTypes={monotonous:P.a.bool.isRequired,oldChange:K,newChange:K,oldSelected:P.a.bool.isRequired,newSelected:P.a.bool.isRequired,markEdits:P.a.func,customEvents:ee,customClassNames:ne,onRenderCode:P.a.func},Te.defaultProps={customEvents:{},markEdits:function(){return Fe},onRenderCode:function(){}},Me);qe.displayName="SplitChange";var We=function(e){var t=e.oldElement,n=e.newElement;return e.monotonous?x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:2,className:"diff-widget-content"},t||n)):t===n?x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:4,className:"diff-widget-content"},t)):x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:2,className:"diff-widget-gutter"},t),x.a.createElement("td",{colSpan:2,className:"diff-widget-content"},n))};We.displayName="SplitWidget";var Ge=We,ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Ue=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];if(o.isNormal)n.push(["change",o,o]);else if(o.isDelete){var a=e[r+1];a&&a.isInsert?(r+=1,n.push(["change",o,a])):n.push(["change",o,null])}else n.push(["change",null,o]);var i=n[n.length-1].slice(1).map(function(e){if(!e)return null;var n=z(e);return t[n]||null}),u=$e(i,2),s=u[0],c=u[1];(s||c)&&n.push(["widget",s,c])}return n},Je=function(e,t,n,r,o){var a=$e(e,3),i=a[0],u=a[1],s=a[2];if("change"===i){var c=!!u&&n.includes(z(u)),l=!!s&&n.includes(z(s));return x.a.createElement(qe,ze({key:t,oldChange:u,newChange:s,monotonous:r,oldSelected:c,newSelected:l},o))}return"widget"===i?x.a.createElement(Ge,{key:t,monotonous:r,oldElement:u,newElement:s}):null},Be=function(e){var t=e.hunk,n=e.monotonous,r=e.elements,o=e.gutterEvents,a=e.contentEvents,i=e.className,u=e.gutterClassName,s=e.contentClassName,c=function(e){return function(){return e(t)}},l=oe()(o,c),f=oe()(a,c),d=A()("diff-hunk-header",i),p=A()("diff-hunk-header-gutter",u),h=A()("diff-hunk-header-content",s);if(void 0===r)return x.a.createElement("tr",{className:d},x.a.createElement("td",ze({className:p},l)),x.a.createElement("td",ze({colSpan:n?1:3,className:h},f),t.content));if(null===r)return null;if(Array.isArray(r)){var v=$e(r,2),m=v[0],y=v[1];return x.a.createElement("tr",{className:d},x.a.createElement("td",ze({className:p},l),m),x.a.createElement("td",ze({colSpan:n?1:3,className:h},f),y))}return x.a.createElement("tr",{className:d},x.a.createElement("td",{colSpan:n?2:4,className:h},r))};Be.displayName="HunkHeader";var Ve=function(e){var t=e.hunk,n=e.monotonous,r=e.widgets,o=e.selectedChanges,a=e.header,i=e.headerGutterEvents,u=e.headerContentEvents,s=e.className,c=e.headerClassName,l=e.headerGutterClassName,f=e.headerContentClassName,d=b(e,["hunk","monotonous","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),p=Ue(t.changes,r);return x.a.createElement("tbody",{className:A()("diff-hunk",s)},x.a.createElement(Be,{hunk:t,monotonous:n,elements:a,gutterEvents:i,contentEvents:u,className:c,gutterClassName:l,contentClassName:f}),p.map(function(e,t){return Je(e,t,o,n,d)}))};Ve.displayName="SplitHunk";var Xe,Ke,Ze=Ve,Qe=(n(14),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),Ye=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),et=(Ke=Xe=function(e){function t(){var e,n,r,o;_(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=E(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.selectEvents=se(),r.selectClassNames=le(),o=n,E(r,o)}return N(t,k["PureComponent"]),Ye(t,[{key:"render",value:function(){var e=this.props,t=e.viewType,n=e.customEvents,r=e.customClassNames,o=w(e,["viewType","customEvents","customClassNames"]),a="unified"===t?ke:Ze,i=this.selectEvents(n),u=i.headerGutterEvents,s=i.headerContentEvents,c=i.otherEvents,l=this.selectClassNames(r),f=l.hunkClassName,d=l.headerClassName,p=l.headerGutterClassName,h=l.headerContentClassName,v=l.otherClassNames;return x.a.createElement(a,Qe({},o,{headerGutterEvents:u,headerContentEvents:s,className:f,headerClassName:d,headerGutterClassName:p,headerContentClassName:h,customEvents:c,customClassNames:v}))}}]),t}(),Xe.propTypes={viewType:V,hunk:Q.isRequired,header:P.a.oneOfType([P.a.node,P.a.shape([P.a.node,P.a.node])]),widgets:P.a.objectOf(P.a.element),selectedChanges:P.a.arrayOf(P.a.string),customEvents:ee},Xe.defaultProps={viewType:"split",widgets:{},selectedChanges:[],customEvents:{}},Ke);et.displayName="Hunk";n(15);var tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nt=function(e){var t=e.diffType,n=e.hunks,r=e.children,o=e.className,a=O(e,["diffType","hunks","children","className"]),i="add"===t||"delete"===t,u=function(e,t){return"unified"===a.viewType?x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null)):t?x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null)):x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null),x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null))}(0,i),s=r?k.Children.map(r,function(e){return Object(k.cloneElement)(e,tt({},a,{monotonous:i}))}):n.map(function(e){return x.a.createElement(et,tt({key:e.content,hunk:e,monotonous:i},a))});return x.a.createElement("table",{className:A()("diff",o)},u,s)};nt.displayName="Diff",nt.propTypes={diffType:P.a.oneOf(["add","delete","modify","rename","copy"]),viewType:V.isRequired,hunks:P.a.arrayOf(Q),children:P.a.oneOfType([P.a.element,P.a.arrayOf(P.a.element)])};var rt=nt,ot=n(3);n.d(t,"Diff",function(){return rt}),n.d(t,"Hunk",function(){return et}),n.d(t,"parseDiff",function(){return ot.parseDiff}),n.d(t,"addStubHunk",function(){return ot.addStubHunk}),n.d(t,"computeOldLineNumber",function(){return R}),n.d(t,"computeNewLineNumber",function(){return F}),n.d(t,"textLinesToHunk",function(){return q}),n.d(t,"insertHunk",function(){return G}),n.d(t,"getChangeKey",function(){return z}),n.d(t,"markWordEdits",function(){return J}),n.d(t,"markCharacterEdits",function(){return B})},function(e,t,n){"use strict";var r=[],o=[];e.exports=function(e,t){if(e===t)return 0;var n=e;e.length>t.length&&(e=t,t=n);var a=e.length,i=t.length;if(0===a)return i;if(0===i)return a;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-i);)a--,i--;if(0===a)return i;for(var u=0;u<a&&e.charCodeAt(u)===t.charCodeAt(u);)u++;if(a-=u,i-=u,0===a)return i;for(var s,c,l,f,d=0,p=0;d<a;)o[u+d]=e.charCodeAt(u+d),r[d]=++d;for(;p<i;)for(s=t.charCodeAt(u+p),l=p++,c=p,d=0;d<a;d++)f=s===o[u+d]?l:l+1,l=r[d],c=r[d]=l>c?f>c?c+1:f:f>l?l+1:f;return c}},function(e,t,n){/*!

@@ -9,0 +9,0 @@ diff v3.3.1

{
"name": "react-diff-view",
"version": "1.0.0",
"version": "1.1.0",
"description": "A git diff component to consume the git unified diff output.",

@@ -17,3 +17,3 @@ "main": "index.js",

"diff": "^3.3.1",
"gitdiff-parser": "0.0.3",
"gitdiff-parser": "0.0.5",
"leven": "^2.1.0",

@@ -20,0 +20,0 @@ "lodash.escape": "^4.0.1",

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.reactDiffView=n():e.reactDiffView=n()}(this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([,,,function(e,n,t){"use strict";function r(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}Object.defineProperty(n,"__esModule",{value:!0}),t.d(n,"parseDiff",function(){return f}),t.d(n,"addStubHunk",function(){return d});var i=t(4),o=t.n(i),a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u=function(){function e(e,n){var t=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return t}return function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(e){var n=e.reduce(function(e,n,t){var r=u(e,3),i=r[0],o=r[1],a=r[2];return o?n.isInsert&&a>=0?(i.splice(a+1,0,n),[i,n,a+2]):(i.push(n),[i,n,n.isDelete?o.isDelete?a:t:a]):(i.push(n),[i,n,n.isDelete?t:-1])},[[],null,-1]);return u(n,1)[0]},l=function(e,n){var t="zip"===n.nearbySequences?s(e.changes):e.changes;return a({},e,{changes:t})},c=function(e,n){var t=e.hunks.map(function(e){return l(e,n)});return a({},e,{hunks:n.stubHunk?d(t):t})},f=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.a.parse(e).map(function(e){return c(e,n)})},d=function(e){if(!e||!e.length)return e;var n=e[e.length-1],t={oldStart:n.oldStart+n.oldLines,oldLines:0,newStart:n.newStart+n.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(r(e),[t])}},function(e,n,t){!function(t){var r={parse:function(e){for(var n,t,r,i,o=[],a=2,u=e.split("\n"),s=u.length,l=0;l<s;){var c=u[l];if(0===c.indexOf("diff --git")){var f=c.split(" ");n={oldPath:f[2].slice(2),newPath:f[3].slice(2),hunks:[]},o.push(n);var d=null,p=u[l+1];0===p.indexOf("old")&&(n.oldMode=p.slice(9,16),n.newMode=u[l+2].slice(9,16),p=u[(l+=2)+1]),0===p.indexOf("similarity")&&(n.similarity=parseInt(p.split(" ")[2],10),l+=1);var v;e:for(;v=u[++l];){switch((f=v.split(" "))[0]){case"diff":l--;break e;case"index":var h=f[1].split("..");n.oldRevision=h[0],n.newRevision=h[1],f[2]&&(n.oldMode=n.newMode=f[2]),a=5;var y=u[l+1];if(0===y.indexOf("---")){var b=u[l+2];/\s\/dev\/null$/.test(y)?(n.oldPath="/dev/null",d="add"):/\s\/dev\/null$/.test(b)&&(n.newPath="/dev/null",d="delete"),l+=2}break e}d||(d=f[0])}n.type=d||"modify"}else if(0===c.indexOf("Binary"))n.isBinary=!0,a=2,n=null;else if(5===a)if(0===c.indexOf("@@")){var w=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(c);t={content:c,oldStart:w[1]-0,newStart:w[4]-0,oldLines:w[3]-0||0,newLines:w[6]-0||0,changes:[]},n.hunks.push(t),r=t.oldStart,i=t.newStart}else{var m=c.slice(0,1),x={content:c.slice(1)};switch(m){case"+":x.type="insert",x.isInsert=!0,i++,x.lineNumber=i;break;case"-":x.type="delete",x.isDelete=!0,r++,x.lineNumber=r;break;case" ":x.type="normal",x.isNormal=!0,r++,i++,x.oldLineNumber=r,x.newLineNumber=i}x.type&&t.changes.push(x)}l++}return o}};n=e.exports=r}()}])});
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.reactDiffView=n():e.reactDiffView=n()}(this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([,,,function(e,n,t){"use strict";function r(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}Object.defineProperty(n,"__esModule",{value:!0}),t.d(n,"parseDiff",function(){return f}),t.d(n,"addStubHunk",function(){return d});var i=t(4),o=t.n(i),a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u=function(){function e(e,n){var t=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return t}return function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(e){var n=e.reduce(function(e,n,t){var r=u(e,3),i=r[0],o=r[1],a=r[2];return o?n.isInsert&&a>=0?(i.splice(a+1,0,n),[i,n,a+2]):(i.push(n),[i,n,n.isDelete?o.isDelete?a:t:a]):(i.push(n),[i,n,n.isDelete?t:-1])},[[],null,-1]);return u(n,1)[0]},l=function(e,n){var t="zip"===n.nearbySequences?s(e.changes):e.changes;return a({},e,{changes:t})},c=function(e,n){var t=e.hunks.map(function(e){return l(e,n)});return a({},e,{hunks:n.stubHunk?d(t):t})},f=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.a.parse(e).map(function(e){return c(e,n)})},d=function(e){if(!e||!e.length)return e;var n=e[e.length-1],t={oldStart:n.oldStart+n.oldLines,oldLines:0,newStart:n.newStart+n.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(r(e),[t])}},function(e,n,t){!function(t){var r={parse:function(e){for(var n,t,r,i,o=[],a=2,u=e.split("\n"),s=u.length,l=0;l<s;){var c=u[l];if(0===c.indexOf("diff --git")){var f=c.split(" ");n={oldPath:f[2].slice(2),newPath:f[3].slice(2),hunks:[]},o.push(n);var d=null,p=u[l+1];0===p.indexOf("old")&&(n.oldMode=p.slice(9,16),n.newMode=u[l+2].slice(9,16),p=u[(l+=2)+1]),0===p.indexOf("similarity")&&(n.similarity=parseInt(p.split(" ")[2],10),l+=1);var v;e:for(;v=u[++l];){switch((f=v.split(" "))[0]){case"diff":l--;break e;case"index":var h=f[1].split("..");n.oldRevision=h[0],n.newRevision=h[1],f[2]&&(n.oldMode=n.newMode=f[2]),a=5;var y=u[l+1];if(0===y.indexOf("---")){var b=u[l+2];/\s\/dev\/null$/.test(y)?(n.oldPath="/dev/null",d="add"):/\s\/dev\/null$/.test(b)&&(n.newPath="/dev/null",d="delete"),l+=2}break e}d||(d=f[0])}n.type=d||"modify"}else if(0===c.indexOf("Binary"))n.isBinary=!0,a=2,n=null;else if(5===a)if(0===c.indexOf("@@")){var w=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(c);t={content:c,oldStart:w[1]-0,newStart:w[4]-0,oldLines:w[3]-0||0,newLines:w[6]-0||0,changes:[]},n.hunks.push(t),r=t.oldStart,i=t.newStart}else{var m=c.slice(0,1),x={content:c.slice(1)};switch(m){case"+":x.type="insert",x.isInsert=!0,x.lineNumber=i,i++;break;case"-":x.type="delete",x.isDelete=!0,x.lineNumber=r,r++;break;case" ":x.type="normal",x.isNormal=!0,x.oldLineNumber=r,x.newLineNumber=i,r++,i++}x.type&&t.changes.push(x)}l++}return o}};n=e.exports=r}()}])});
//# sourceMappingURL=parse.js.map

@@ -288,2 +288,5 @@ # react-diff-view

- `diff-code-edit`: Edits on a line of code.
- `diff-widget`: The `<tr>` element to render widget.
- `diff-widget-gutter`: The first `<td>` element when widget is rendered in 2 cells.
- `diff-widget-content`: The `<td>` element to render widget content.

@@ -390,3 +393,3 @@ You can pass `className` prop to `Diff` component to add custom class to the `<table>` element.

- `{Hunk} textLinesToHunk({string[]} lines, {number} oldStartLineNumber, {number} newStartLineNumber)`: Create a hunk with all normal changes, this is useful when expanding code between two hunks.
- `{Hunk[]} insertHunk({Hunk[]} hunks, {Hunk} insertion)`: Insert a new hunk into the original list, it will merge hunk is possible, useful for expanding code.
- `{Hunk[]} insertHunk({Hunk[]} hunks, {Hunk} insertion)`: Insert a new hunk into the original list, it will merge sibling hunks if possible, useful for expanding code.

@@ -413,1 +416,7 @@ ## Unsupported

- Upgrade `react` and `prop-types` dependency versions to MIT licensed ones, also `react ^16.0.0` is supported.
### 1.1.0
- Remove unofficial styles such as paddings and borders around widgets.
- Introduce class names for widgets.
- Upgrade `gitdiff-parser` to `^0.0.5` to fix a line number issue.

@@ -6,4 +6,4 @@ import './Widget.css';

return (
<tr className="widget">
<td colSpan={2}>
<tr className="diff-widget">
<td colSpan={2} className="diff-widget-content">
{oldElement || newElement}

@@ -17,4 +17,4 @@ </td>

return (
<tr className="widget">
<td colSpan={4}>
<tr className="diff-widget">
<td colSpan={4} className="diff-widget-content">
{oldElement}

@@ -27,7 +27,7 @@ </td>

return (
<tr className="widget">
<td colSpan={2}>
<tr className="diff-widget">
<td colSpan={2} className="diff-widget-gutter">
{oldElement}
</td>
<td colSpan={2}>
<td colSpan={2} className="diff-widget-content">
{newElement}

@@ -34,0 +34,0 @@ </td>

import './Widget.css';
const UnifiedWidget = ({element}) => (
<tr className="widget">
<td colSpan={3}>
<tr className="diff-widget">
<td colSpan={3} className="diff-widget-content">
{element}

@@ -7,0 +7,0 @@ </td>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc