!(function (e, t) {
'object' == typeof exports && 'object' == typeof module
? (module.exports = t())
: 'function' == typeof define && define.amd
? define('Diff2Html', [], t)
: 'object' == typeof exports
? (exports.Diff2Html = t())
: (e.Diff2Html = t());
})(this, () => {
return (
(e = {
696: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.convertChangesToDMP = function (e) {
for (var t, n, i = [], r = 0; r < e.length; r++)
(n = (t = e[r]).added ? 1 : t.removed ? -1 : 0), i.push([n, t.value]);
return i;
});
},
826: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.convertChangesToXML = function (e) {
for (var t = [], n = 0; n < e.length; n++) {
var i = e[n];
i.added ? t.push('') : i.removed && t.push(''),
t.push(
i.value.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"')
),
i.added ? t.push('') : i.removed && t.push('');
}
return t.join('');
});
},
976: (e, t, n) => {
'use strict';
var i;
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.diffArrays = function (e, t, n) {
return r.diff(e, t, n);
}),
(t.arrayDiff = void 0);
var r = new ((i = n(913)) && i.__esModule ? i : { default: i }).default();
(t.arrayDiff = r),
(r.tokenize = function (e) {
return e.slice();
}),
(r.join = r.removeEmpty =
function (e) {
return e;
});
},
913: (e, t) => {
'use strict';
function n() {}
function i(e, t, n, i, r) {
for (var s = 0, o = t.length, a = 0, l = 0; s < o; s++) {
var c = t[s];
if (c.removed) {
if (((c.value = e.join(i.slice(l, l + c.count))), (l += c.count), s && t[s - 1].added)) {
var d = t[s - 1];
(t[s - 1] = t[s]), (t[s] = d);
}
} else {
if (!c.added && r) {
var f = n.slice(a, a + c.count);
(f = f.map(function (e, t) {
var n = i[l + t];
return n.length > e.length ? n : e;
})),
(c.value = e.join(f));
} else c.value = e.join(n.slice(a, a + c.count));
(a += c.count), c.added || (l += c.count);
}
}
var u = t[o - 1];
return (
o > 1 &&
'string' == typeof u.value &&
(u.added || u.removed) &&
e.equals('', u.value) &&
((t[o - 2].value += u.value), t.pop()),
t
);
}
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.default = n),
(n.prototype = {
diff: function (e, t) {
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
r = n.callback;
'function' == typeof n && ((r = n), (n = {})), (this.options = n);
var s = this;
function o(e) {
return r
? (setTimeout(function () {
r(void 0, e);
}, 0),
!0)
: e;
}
(e = this.castInput(e)), (t = this.castInput(t)), (e = this.removeEmpty(this.tokenize(e)));
var a = (t = this.removeEmpty(this.tokenize(t))).length,
l = e.length,
c = 1,
d = a + l;
n.maxEditLength && (d = Math.min(d, n.maxEditLength));
var f = [{ newPos: -1, components: [] }],
u = this.extractCommon(f[0], t, e, 0);
if (f[0].newPos + 1 >= a && u + 1 >= l) return o([{ value: this.join(t), count: t.length }]);
function h() {
for (var n = -1 * c; n <= c; n += 2) {
var r = void 0,
d = f[n - 1],
u = f[n + 1],
h = (u ? u.newPos : 0) - n;
d && (f[n - 1] = void 0);
var p = d && d.newPos + 1 < a,
b = u && 0 <= h && h < l;
if (p || b) {
if (
(!p || (b && d.newPos < u.newPos)
? ((r = { newPos: (g = u).newPos, components: g.components.slice(0) }),
s.pushComponent(r.components, void 0, !0))
: ((r = d).newPos++, s.pushComponent(r.components, !0, void 0)),
(h = s.extractCommon(r, t, e, n)),
r.newPos + 1 >= a && h + 1 >= l)
)
return o(i(s, r.components, t, e, s.useLongestToken));
f[n] = r;
} else f[n] = void 0;
}
var g;
c++;
}
if (r)
!(function e() {
setTimeout(function () {
if (c > d) return r();
h() || e();
}, 0);
})();
else
for (; c <= d; ) {
var p = h();
if (p) return p;
}
},
pushComponent: function (e, t, n) {
var i = e[e.length - 1];
i && i.added === t && i.removed === n
? (e[e.length - 1] = { count: i.count + 1, added: t, removed: n })
: e.push({ count: 1, added: t, removed: n });
},
extractCommon: function (e, t, n, i) {
for (
var r = t.length, s = n.length, o = e.newPos, a = o - i, l = 0;
o + 1 < r && a + 1 < s && this.equals(t[o + 1], n[a + 1]);
)
o++, a++, l++;
return l && e.components.push({ count: l }), (e.newPos = o), a;
},
equals: function (e, t) {
return this.options.comparator
? this.options.comparator(e, t)
: e === t || (this.options.ignoreCase && e.toLowerCase() === t.toLowerCase());
},
removeEmpty: function (e) {
for (var t = [], n = 0; n < e.length; n++) e[n] && t.push(e[n]);
return t;
},
castInput: function (e) {
return e;
},
tokenize: function (e) {
return e.split('');
},
join: function (e) {
return e.join('');
}
});
},
630: (e, t, n) => {
'use strict';
var i;
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.diffChars = function (e, t, n) {
return r.diff(e, t, n);
}),
(t.characterDiff = void 0);
var r = new ((i = n(913)) && i.__esModule ? i : { default: i }).default();
t.characterDiff = r;
},
852: (e, t, n) => {
'use strict';
var i;
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.diffCss = function (e, t, n) {
return r.diff(e, t, n);
}),
(t.cssDiff = void 0);
var r = new ((i = n(913)) && i.__esModule ? i : { default: i }).default();
(t.cssDiff = r),
(r.tokenize = function (e) {
return e.split(/([{}:;,]|\s+)/);
});
},
276: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.diffJson = function (e, t, n) {
return l.diff(e, t, n);
}),
(t.canonicalize = c),
(t.jsonDiff = void 0);
var i,
r = (i = n(913)) && i.__esModule ? i : { default: i },
s = n(187);
function o(e) {
return (
(o =
'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
? function (e) {
return typeof e;
}
: function (e) {
return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype
? 'symbol'
: typeof e;
}),
o(e)
);
}
var a = Object.prototype.toString,
l = new r.default();
function c(e, t, n, i, r) {
var s, l;
for (t = t || [], n = n || [], i && (e = i(r, e)), s = 0; s < t.length; s += 1) if (t[s] === e) return n[s];
if ('[object Array]' === a.call(e)) {
for (t.push(e), l = new Array(e.length), n.push(l), s = 0; s < e.length; s += 1) l[s] = c(e[s], t, n, i, r);
return t.pop(), n.pop(), l;
}
if ((e && e.toJSON && (e = e.toJSON()), 'object' === o(e) && null !== e)) {
t.push(e), (l = {}), n.push(l);
var d,
f = [];
for (d in e) e.hasOwnProperty(d) && f.push(d);
for (f.sort(), s = 0; s < f.length; s += 1) l[(d = f[s])] = c(e[d], t, n, i, d);
t.pop(), n.pop();
} else l = e;
return l;
}
(t.jsonDiff = l),
(l.useLongestToken = !0),
(l.tokenize = s.lineDiff.tokenize),
(l.castInput = function (e) {
var t = this.options,
n = t.undefinedReplacement,
i = t.stringifyReplacer,
r =
void 0 === i
? function (e, t) {
return void 0 === t ? n : t;
}
: i;
return 'string' == typeof e ? e : JSON.stringify(c(e, null, null, r), r, ' ');
}),
(l.equals = function (e, t) {
return r.default.prototype.equals.call(l, e.replace(/,([\r\n])/g, '$1'), t.replace(/,([\r\n])/g, '$1'));
});
},
187: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.diffLines = function (e, t, n) {
return o.diff(e, t, n);
}),
(t.diffTrimmedLines = function (e, t, n) {
var i = (0, s.generateOptions)(n, { ignoreWhitespace: !0 });
return o.diff(e, t, i);
}),
(t.lineDiff = void 0);
var i,
r = (i = n(913)) && i.__esModule ? i : { default: i },
s = n(9),
o = new r.default();
(t.lineDiff = o),
(o.tokenize = function (e) {
var t = [],
n = e.split(/(\n|\r\n)/);
n[n.length - 1] || n.pop();
for (var i = 0; i < n.length; i++) {
var r = n[i];
i % 2 && !this.options.newlineIsToken
? (t[t.length - 1] += r)
: (this.options.ignoreWhitespace && (r = r.trim()), t.push(r));
}
return t;
});
},
146: (e, t, n) => {
'use strict';
var i;
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.diffSentences = function (e, t, n) {
return r.diff(e, t, n);
}),
(t.sentenceDiff = void 0);
var r = new ((i = n(913)) && i.__esModule ? i : { default: i }).default();
(t.sentenceDiff = r),
(r.tokenize = function (e) {
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
});
},
303: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.diffWords = function (e, t, n) {
return (n = (0, s.generateOptions)(n, { ignoreWhitespace: !0 })), l.diff(e, t, n);
}),
(t.diffWordsWithSpace = function (e, t, n) {
return l.diff(e, t, n);
}),
(t.wordDiff = void 0);
var i,
r = (i = n(913)) && i.__esModule ? i : { default: i },
s = n(9),
o = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,
a = /\S/,
l = new r.default();
(t.wordDiff = l),
(l.equals = function (e, t) {
return (
this.options.ignoreCase && ((e = e.toLowerCase()), (t = t.toLowerCase())),
e === t || (this.options.ignoreWhitespace && !a.test(e) && !a.test(t))
);
}),
(l.tokenize = function (e) {
for (var t = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), n = 0; n < t.length - 1; n++)
!t[n + 1] &&
t[n + 2] &&
o.test(t[n]) &&
o.test(t[n + 2]) &&
((t[n] += t[n + 2]), t.splice(n + 1, 2), n--);
return t;
});
},
785: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
Object.defineProperty(t, 'Diff', {
enumerable: !0,
get: function () {
return r.default;
}
}),
Object.defineProperty(t, 'diffChars', {
enumerable: !0,
get: function () {
return s.diffChars;
}
}),
Object.defineProperty(t, 'diffWords', {
enumerable: !0,
get: function () {
return o.diffWords;
}
}),
Object.defineProperty(t, 'diffWordsWithSpace', {
enumerable: !0,
get: function () {
return o.diffWordsWithSpace;
}
}),
Object.defineProperty(t, 'diffLines', {
enumerable: !0,
get: function () {
return a.diffLines;
}
}),
Object.defineProperty(t, 'diffTrimmedLines', {
enumerable: !0,
get: function () {
return a.diffTrimmedLines;
}
}),
Object.defineProperty(t, 'diffSentences', {
enumerable: !0,
get: function () {
return l.diffSentences;
}
}),
Object.defineProperty(t, 'diffCss', {
enumerable: !0,
get: function () {
return c.diffCss;
}
}),
Object.defineProperty(t, 'diffJson', {
enumerable: !0,
get: function () {
return d.diffJson;
}
}),
Object.defineProperty(t, 'canonicalize', {
enumerable: !0,
get: function () {
return d.canonicalize;
}
}),
Object.defineProperty(t, 'diffArrays', {
enumerable: !0,
get: function () {
return f.diffArrays;
}
}),
Object.defineProperty(t, 'applyPatch', {
enumerable: !0,
get: function () {
return u.applyPatch;
}
}),
Object.defineProperty(t, 'applyPatches', {
enumerable: !0,
get: function () {
return u.applyPatches;
}
}),
Object.defineProperty(t, 'parsePatch', {
enumerable: !0,
get: function () {
return h.parsePatch;
}
}),
Object.defineProperty(t, 'merge', {
enumerable: !0,
get: function () {
return p.merge;
}
}),
Object.defineProperty(t, 'structuredPatch', {
enumerable: !0,
get: function () {
return b.structuredPatch;
}
}),
Object.defineProperty(t, 'createTwoFilesPatch', {
enumerable: !0,
get: function () {
return b.createTwoFilesPatch;
}
}),
Object.defineProperty(t, 'createPatch', {
enumerable: !0,
get: function () {
return b.createPatch;
}
}),
Object.defineProperty(t, 'convertChangesToDMP', {
enumerable: !0,
get: function () {
return g.convertChangesToDMP;
}
}),
Object.defineProperty(t, 'convertChangesToXML', {
enumerable: !0,
get: function () {
return m.convertChangesToXML;
}
});
var i,
r = (i = n(913)) && i.__esModule ? i : { default: i },
s = n(630),
o = n(303),
a = n(187),
l = n(146),
c = n(852),
d = n(276),
f = n(976),
u = n(690),
h = n(719),
p = n(51),
b = n(286),
g = n(696),
m = n(826);
},
690: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.applyPatch = o),
(t.applyPatches = function (e, t) {
'string' == typeof e && (e = (0, r.parsePatch)(e));
var n = 0;
!(function i() {
var r = e[n++];
if (!r) return t.complete();
t.loadFile(r, function (e, n) {
if (e) return t.complete(e);
var s = o(n, r, t);
t.patched(r, s, function (e) {
if (e) return t.complete(e);
i();
});
});
})();
});
var i,
r = n(719),
s = (i = n(169)) && i.__esModule ? i : { default: i };
function o(e, t) {
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
if (('string' == typeof t && (t = (0, r.parsePatch)(t)), Array.isArray(t))) {
if (t.length > 1) throw new Error('applyPatch only works with a single input.');
t = t[0];
}
var i,
o,
a = e.split(/\r\n|[\n\v\f\r\x85]/),
l = e.match(/\r\n|[\n\v\f\r\x85]/g) || [],
c = t.hunks,
d =
n.compareLine ||
function (e, t, n, i) {
return t === i;
},
f = 0,
u = n.fuzzFactor || 0,
h = 0,
p = 0;
function b(e, t) {
for (var n = 0; n < e.lines.length; n++) {
var i = e.lines[n],
r = i.length > 0 ? i[0] : ' ',
s = i.length > 0 ? i.substr(1) : i;
if (' ' === r || '-' === r) {
if (!d(t + 1, a[t], r, s) && ++f > u) return !1;
t++;
}
}
return !0;
}
for (var g = 0; g < c.length; g++) {
for (
var m = c[g], v = a.length - m.oldLines, y = 0, w = p + m.oldStart - 1, S = (0, s.default)(w, h, v);
void 0 !== y;
y = S()
)
if (b(m, w + y)) {
m.offset = p += y;
break;
}
if (void 0 === y) return !1;
h = m.offset + m.oldStart + m.oldLines;
}
for (var L = 0, C = 0; C < c.length; C++) {
var x = c[C],
O = x.oldStart + x.offset + L - 1;
L += x.newLines - x.oldLines;
for (var T = 0; T < x.lines.length; T++) {
var j = x.lines[T],
_ = j.length > 0 ? j[0] : ' ',
N = j.length > 0 ? j.substr(1) : j,
P = x.linedelimiters[T];
if (' ' === _) O++;
else if ('-' === _) a.splice(O, 1), l.splice(O, 1);
else if ('+' === _) a.splice(O, 0, N), l.splice(O, 0, P), O++;
else if ('\\' === _) {
var E = x.lines[T - 1] ? x.lines[T - 1][0] : null;
'+' === E ? (i = !0) : '-' === E && (o = !0);
}
}
}
if (i) for (; !a[a.length - 1]; ) a.pop(), l.pop();
else o && (a.push(''), l.push('\n'));
for (var M = 0; M < a.length - 1; M++) a[M] = a[M] + l[M];
return a.join('');
}
},
286: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.structuredPatch = o),
(t.formatPatch = a),
(t.createTwoFilesPatch = l),
(t.createPatch = function (e, t, n, i, r, s) {
return l(e, e, t, n, i, r, s);
});
var i = n(187);
function r(e) {
return (
(function (e) {
if (Array.isArray(e)) return s(e);
})(e) ||
(function (e) {
if ('undefined' != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);
})(e) ||
(function (e, t) {
if (e) {
if ('string' == typeof e) return s(e, t);
var n = Object.prototype.toString.call(e).slice(8, -1);
return (
'Object' === n && e.constructor && (n = e.constructor.name),
'Map' === n || 'Set' === n
? Array.from(e)
: 'Arguments' === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
? s(e, t)
: void 0
);
}
})(e) ||
(function () {
throw new TypeError(
'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
);
})()
);
}
function s(e, t) {
(null == t || t > e.length) && (t = e.length);
for (var n = 0, i = new Array(t); n < t; n++) i[n] = e[n];
return i;
}
function o(e, t, n, s, o, a, l) {
l || (l = {}), void 0 === l.context && (l.context = 4);
var c = (0, i.diffLines)(n, s, l);
if (c) {
c.push({ value: '', lines: [] });
for (
var d = [],
f = 0,
u = 0,
h = [],
p = 1,
b = 1,
g = function (e) {
var t = c[e],
i = t.lines || t.value.replace(/\n$/, '').split('\n');
if (((t.lines = i), t.added || t.removed)) {
var o;
if (!f) {
var a = c[e - 1];
(f = p),
(u = b),
a &&
((h = l.context > 0 ? v(a.lines.slice(-l.context)) : []), (f -= h.length), (u -= h.length));
}
(o = h).push.apply(
o,
r(
i.map(function (e) {
return (t.added ? '+' : '-') + e;
})
)
),
t.added ? (b += i.length) : (p += i.length);
} else {
if (f)
if (i.length <= 2 * l.context && e < c.length - 2) {
var g;
(g = h).push.apply(g, r(v(i)));
} else {
var m,
y = Math.min(i.length, l.context);
(m = h).push.apply(m, r(v(i.slice(0, y))));
var w = { oldStart: f, oldLines: p - f + y, newStart: u, newLines: b - u + y, lines: h };
if (e >= c.length - 2 && i.length <= l.context) {
var S = /\n$/.test(n),
L = /\n$/.test(s),
C = 0 == i.length && h.length > w.oldLines;
!S && C && n.length > 0 && h.splice(w.oldLines, 0, '\\ No newline at end of file'),
((S || C) && L) || h.push('\\ No newline at end of file');
}
d.push(w), (f = 0), (u = 0), (h = []);
}
(p += i.length), (b += i.length);
}
},
m = 0;
m < c.length;
m++
)
g(m);
return { oldFileName: e, newFileName: t, oldHeader: o, newHeader: a, hunks: d };
}
function v(e) {
return e.map(function (e) {
return ' ' + e;
});
}
}
function a(e) {
var t = [];
e.oldFileName == e.newFileName && t.push('Index: ' + e.oldFileName),
t.push('==================================================================='),
t.push('--- ' + e.oldFileName + (void 0 === e.oldHeader ? '' : '\t' + e.oldHeader)),
t.push('+++ ' + e.newFileName + (void 0 === e.newHeader ? '' : '\t' + e.newHeader));
for (var n = 0; n < e.hunks.length; n++) {
var i = e.hunks[n];
0 === i.oldLines && (i.oldStart -= 1),
0 === i.newLines && (i.newStart -= 1),
t.push('@@ -' + i.oldStart + ',' + i.oldLines + ' +' + i.newStart + ',' + i.newLines + ' @@'),
t.push.apply(t, i.lines);
}
return t.join('\n') + '\n';
}
function l(e, t, n, i, r, s, l) {
return a(o(e, t, n, i, r, s, l));
}
},
51: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.calcLineCount = l),
(t.merge = function (e, t, n) {
(e = c(e, n)), (t = c(t, n));
var i = {};
(e.index || t.index) && (i.index = e.index || t.index),
(e.newFileName || t.newFileName) &&
(d(e)
? d(t)
? ((i.oldFileName = f(i, e.oldFileName, t.oldFileName)),
(i.newFileName = f(i, e.newFileName, t.newFileName)),
(i.oldHeader = f(i, e.oldHeader, t.oldHeader)),
(i.newHeader = f(i, e.newHeader, t.newHeader)))
: ((i.oldFileName = e.oldFileName),
(i.newFileName = e.newFileName),
(i.oldHeader = e.oldHeader),
(i.newHeader = e.newHeader))
: ((i.oldFileName = t.oldFileName || e.oldFileName),
(i.newFileName = t.newFileName || e.newFileName),
(i.oldHeader = t.oldHeader || e.oldHeader),
(i.newHeader = t.newHeader || e.newHeader))),
(i.hunks = []);
for (var r = 0, s = 0, o = 0, a = 0; r < e.hunks.length || s < t.hunks.length; ) {
var l = e.hunks[r] || { oldStart: 1 / 0 },
b = t.hunks[s] || { oldStart: 1 / 0 };
if (u(l, b)) i.hunks.push(h(l, o)), r++, (a += l.newLines - l.oldLines);
else if (u(b, l)) i.hunks.push(h(b, a)), s++, (o += b.newLines - b.oldLines);
else {
var g = {
oldStart: Math.min(l.oldStart, b.oldStart),
oldLines: 0,
newStart: Math.min(l.newStart + o, b.oldStart + a),
newLines: 0,
lines: []
};
p(g, l.oldStart, l.lines, b.oldStart, b.lines), s++, r++, i.hunks.push(g);
}
}
return i;
});
var i = n(286),
r = n(719),
s = n(780);
function o(e) {
return (
(function (e) {
if (Array.isArray(e)) return a(e);
})(e) ||
(function (e) {
if ('undefined' != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);
})(e) ||
(function (e, t) {
if (e) {
if ('string' == typeof e) return a(e, t);
var n = Object.prototype.toString.call(e).slice(8, -1);
return (
'Object' === n && e.constructor && (n = e.constructor.name),
'Map' === n || 'Set' === n
? Array.from(e)
: 'Arguments' === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
? a(e, t)
: void 0
);
}
})(e) ||
(function () {
throw new TypeError(
'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
);
})()
);
}
function a(e, t) {
(null == t || t > e.length) && (t = e.length);
for (var n = 0, i = new Array(t); n < t; n++) i[n] = e[n];
return i;
}
function l(e) {
var t = C(e.lines),
n = t.oldLines,
i = t.newLines;
void 0 !== n ? (e.oldLines = n) : delete e.oldLines, void 0 !== i ? (e.newLines = i) : delete e.newLines;
}
function c(e, t) {
if ('string' == typeof e) {
if (/^@@/m.test(e) || /^Index:/m.test(e)) return (0, r.parsePatch)(e)[0];
if (!t) throw new Error('Must provide a base reference or pass in a patch');
return (0, i.structuredPatch)(void 0, void 0, t, e);
}
return e;
}
function d(e) {
return e.newFileName && e.newFileName !== e.oldFileName;
}
function f(e, t, n) {
return t === n ? t : ((e.conflict = !0), { mine: t, theirs: n });
}
function u(e, t) {
return e.oldStart < t.oldStart && e.oldStart + e.oldLines < t.oldStart;
}
function h(e, t) {
return {
oldStart: e.oldStart,
oldLines: e.oldLines,
newStart: e.newStart + t,
newLines: e.newLines,
lines: e.lines
};
}
function p(e, t, n, i, r) {
var s = { offset: t, lines: n, index: 0 },
a = { offset: i, lines: r, index: 0 };
for (v(e, s, a), v(e, a, s); s.index < s.lines.length && a.index < a.lines.length; ) {
var c = s.lines[s.index],
d = a.lines[a.index];
if (('-' !== c[0] && '+' !== c[0]) || ('-' !== d[0] && '+' !== d[0]))
if ('+' === c[0] && ' ' === d[0]) {
var f;
(f = e.lines).push.apply(f, o(w(s)));
} else if ('+' === d[0] && ' ' === c[0]) {
var u;
(u = e.lines).push.apply(u, o(w(a)));
} else
'-' === c[0] && ' ' === d[0]
? g(e, s, a)
: '-' === d[0] && ' ' === c[0]
? g(e, a, s, !0)
: c === d
? (e.lines.push(c), s.index++, a.index++)
: m(e, w(s), w(a));
else b(e, s, a);
}
y(e, s), y(e, a), l(e);
}
function b(e, t, n) {
var i = w(t),
r = w(n);
if (S(i) && S(r)) {
var a, l;
if ((0, s.arrayStartsWith)(i, r) && L(n, i, i.length - r.length))
return void (a = e.lines).push.apply(a, o(i));
if ((0, s.arrayStartsWith)(r, i) && L(t, r, r.length - i.length))
return void (l = e.lines).push.apply(l, o(r));
} else if ((0, s.arrayEqual)(i, r)) {
var c;
return void (c = e.lines).push.apply(c, o(i));
}
m(e, i, r);
}
function g(e, t, n, i) {
var r,
s = w(t),
a = (function (e, t) {
for (var n = [], i = [], r = 0, s = !1, o = !1; r < t.length && e.index < e.lines.length; ) {
var a = e.lines[e.index],
l = t[r];
if ('+' === l[0]) break;
if (((s = s || ' ' !== a[0]), i.push(l), r++, '+' === a[0]))
for (o = !0; '+' === a[0]; ) n.push(a), (a = e.lines[++e.index]);
l.substr(1) === a.substr(1) ? (n.push(a), e.index++) : (o = !0);
}
if (('+' === (t[r] || '')[0] && s && (o = !0), o)) return n;
for (; r < t.length; ) i.push(t[r++]);
return { merged: i, changes: n };
})(n, s);
a.merged ? (r = e.lines).push.apply(r, o(a.merged)) : m(e, i ? a : s, i ? s : a);
}
function m(e, t, n) {
(e.conflict = !0), e.lines.push({ conflict: !0, mine: t, theirs: n });
}
function v(e, t, n) {
for (; t.offset < n.offset && t.index < t.lines.length; ) {
var i = t.lines[t.index++];
e.lines.push(i), t.offset++;
}
}
function y(e, t) {
for (; t.index < t.lines.length; ) {
var n = t.lines[t.index++];
e.lines.push(n);
}
}
function w(e) {
for (var t = [], n = e.lines[e.index][0]; e.index < e.lines.length; ) {
var i = e.lines[e.index];
if (('-' === n && '+' === i[0] && (n = '+'), n !== i[0])) break;
t.push(i), e.index++;
}
return t;
}
function S(e) {
return e.reduce(function (e, t) {
return e && '-' === t[0];
}, !0);
}
function L(e, t, n) {
for (var i = 0; i < n; i++) {
var r = t[t.length - n + i].substr(1);
if (e.lines[e.index + i] !== ' ' + r) return !1;
}
return (e.index += n), !0;
}
function C(e) {
var t = 0,
n = 0;
return (
e.forEach(function (e) {
if ('string' != typeof e) {
var i = C(e.mine),
r = C(e.theirs);
void 0 !== t && (i.oldLines === r.oldLines ? (t += i.oldLines) : (t = void 0)),
void 0 !== n && (i.newLines === r.newLines ? (n += i.newLines) : (n = void 0));
} else void 0 === n || ('+' !== e[0] && ' ' !== e[0]) || n++, void 0 === t || ('-' !== e[0] && ' ' !== e[0]) || t++;
}),
{ oldLines: t, newLines: n }
);
}
},
719: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.parsePatch = function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
n = e.split(/\r\n|[\n\v\f\r\x85]/),
i = e.match(/\r\n|[\n\v\f\r\x85]/g) || [],
r = [],
s = 0;
function o() {
var e = {};
for (r.push(e); s < n.length; ) {
var i = n[s];
if (/^(\-\-\-|\+\+\+|@@)\s/.test(i)) break;
var o = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(i);
o && (e.index = o[1]), s++;
}
for (a(e), a(e), e.hunks = []; s < n.length; ) {
var c = n[s];
if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c)) break;
if (/^@@/.test(c)) e.hunks.push(l());
else {
if (c && t.strict) throw new Error('Unknown line ' + (s + 1) + ' ' + JSON.stringify(c));
s++;
}
}
}
function a(e) {
var t = /^(---|\+\+\+)\s+(.*)$/.exec(n[s]);
if (t) {
var i = '---' === t[1] ? 'old' : 'new',
r = t[2].split('\t', 2),
o = r[0].replace(/\\\\/g, '\\');
/^".*"$/.test(o) && (o = o.substr(1, o.length - 2)),
(e[i + 'FileName'] = o),
(e[i + 'Header'] = (r[1] || '').trim()),
s++;
}
}
function l() {
var e = s,
r = n[s++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),
o = {
oldStart: +r[1],
oldLines: void 0 === r[2] ? 1 : +r[2],
newStart: +r[3],
newLines: void 0 === r[4] ? 1 : +r[4],
lines: [],
linedelimiters: []
};
0 === o.oldLines && (o.oldStart += 1), 0 === o.newLines && (o.newStart += 1);
for (
var a = 0, l = 0;
s < n.length &&
!(
0 === n[s].indexOf('--- ') &&
s + 2 < n.length &&
0 === n[s + 1].indexOf('+++ ') &&
0 === n[s + 2].indexOf('@@')
);
s++
) {
var c = 0 == n[s].length && s != n.length - 1 ? ' ' : n[s][0];
if ('+' !== c && '-' !== c && ' ' !== c && '\\' !== c) break;
o.lines.push(n[s]),
o.linedelimiters.push(i[s] || '\n'),
'+' === c ? a++ : '-' === c ? l++ : ' ' === c && (a++, l++);
}
if ((a || 1 !== o.newLines || (o.newLines = 0), l || 1 !== o.oldLines || (o.oldLines = 0), t.strict)) {
if (a !== o.newLines) throw new Error('Added line count did not match for hunk at line ' + (e + 1));
if (l !== o.oldLines) throw new Error('Removed line count did not match for hunk at line ' + (e + 1));
}
return o;
}
for (; s < n.length; ) o();
return r;
});
},
780: (e, t) => {
'use strict';
function n(e, t) {
if (t.length > e.length) return !1;
for (var n = 0; n < t.length; n++) if (t[n] !== e[n]) return !1;
return !0;
}
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.arrayEqual = function (e, t) {
return e.length === t.length && n(e, t);
}),
(t.arrayStartsWith = n);
},
169: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.default = function (e, t, n) {
var i = !0,
r = !1,
s = !1,
o = 1;
return function a() {
if (i && !s) {
if ((r ? o++ : (i = !1), e + o <= n)) return o;
s = !0;
}
if (!r) return s || (i = !0), t <= e - o ? -o++ : ((r = !0), a());
};
});
},
9: (e, t) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }),
(t.generateOptions = function (e, t) {
if ('function' == typeof e) t.callback = e;
else if (e) for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
return t;
});
},
397: (e, t) => {
!(function (e) {
var t = /\S/,
n = /\"/g,
i = /\n/g,
r = /\r/g,
s = /\\/g,
o = /\u2028/,
a = /\u2029/;
function l(e) {
return e.trim ? e.trim() : e.replace(/^\s*|\s*$/g, '');
}
function c(e, t, n) {
if (t.charAt(n) != e.charAt(0)) return !1;
for (var i = 1, r = e.length; i < r; i++) if (t.charAt(n + i) != e.charAt(i)) return !1;
return !0;
}
(e.tags = { '#': 1, '^': 2, '<': 3, $: 4, '/': 5, '!': 6, '>': 7, '=': 8, _v: 9, '{': 10, '&': 11, _t: 12 }),
(e.scan = function (n, i) {
var r,
s = n.length,
o = 0,
a = null,
d = null,
f = '',
u = [],
h = !1,
p = 0,
b = 0,
g = '{{',
m = '}}';
function v() {
f.length > 0 && (u.push({ tag: '_t', text: new String(f) }), (f = ''));
}
function y(n, i) {
if (
(v(),
n &&
(function () {
for (var n = !0, i = b; i < u.length; i++)
if (!(n = e.tags[u[i].tag] < e.tags._v || ('_t' == u[i].tag && null === u[i].text.match(t))))
return !1;
return n;
})())
)
for (var r, s = b; s < u.length; s++)
u[s].text && ((r = u[s + 1]) && '>' == r.tag && (r.indent = u[s].text.toString()), u.splice(s, 1));
else i || u.push({ tag: '\n' });
(h = !1), (b = u.length);
}
function w(e, t) {
var n = '=' + m,
i = e.indexOf(n, t),
r = l(e.substring(e.indexOf('=', t) + 1, i)).split(' ');
return (g = r[0]), (m = r[r.length - 1]), i + n.length - 1;
}
for (i && ((i = i.split(' ')), (g = i[0]), (m = i[1])), p = 0; p < s; p++)
0 == o
? c(g, n, p)
? (--p, v(), (o = 1))
: '\n' == n.charAt(p)
? y(h)
: (f += n.charAt(p))
: 1 == o
? ((p += g.length - 1),
'=' == (a = (d = e.tags[n.charAt(p + 1)]) ? n.charAt(p + 1) : '_v')
? ((p = w(n, p)), (o = 0))
: (d && p++, (o = 2)),
(h = p))
: c(m, n, p)
? (u.push({ tag: a, n: l(f), otag: g, ctag: m, i: '/' == a ? h - g.length : p + m.length }),
(f = ''),
(p += m.length - 1),
(o = 0),
'{' == a &&
('}}' == m
? p++
: '}' === (r = u[u.length - 1]).n.substr(r.n.length - 1) &&
(r.n = r.n.substring(0, r.n.length - 1))))
: (f += n.charAt(p));
return y(h, !0), u;
});
var d = { _t: !0, '\n': !0, $: !0, '/': !0 };
function f(t, n, i, r) {
var s,
o = [],
a = null,
l = null;
for (s = i[i.length - 1]; t.length > 0; ) {
if (((l = t.shift()), s && '<' == s.tag && !(l.tag in d)))
throw new Error('Illegal content in < super tag.');
if (e.tags[l.tag] <= e.tags.$ || u(l, r)) i.push(l), (l.nodes = f(t, l.tag, i, r));
else {
if ('/' == l.tag) {
if (0 === i.length) throw new Error('Closing tag without opener: /' + l.n);
if (((a = i.pop()), l.n != a.n && !h(l.n, a.n, r)))
throw new Error('Nesting error: ' + a.n + ' vs. ' + l.n);
return (a.end = l.i), o;
}
'\n' == l.tag && (l.last = 0 == t.length || '\n' == t[0].tag);
}
o.push(l);
}
if (i.length > 0) throw new Error('missing closing tag: ' + i.pop().n);
return o;
}
function u(e, t) {
for (var n = 0, i = t.length; n < i; n++) if (t[n].o == e.n) return (e.tag = '#'), !0;
}
function h(e, t, n) {
for (var i = 0, r = n.length; i < r; i++) if (n[i].c == e && n[i].o == t) return !0;
}
function p(e) {
var t = [];
for (var n in e.partials)
t.push('"' + g(n) + '":{name:"' + g(e.partials[n].name) + '", ' + p(e.partials[n]) + '}');
return (
'partials: {' +
t.join(',') +
'}, subs: ' +
(function (e) {
var t = [];
for (var n in e) t.push('"' + g(n) + '": function(c,p,t,i) {' + e[n] + '}');
return '{ ' + t.join(',') + ' }';
})(e.subs)
);
}
e.stringify = function (t, n, i) {
return '{code: function (c,p,i) { ' + e.wrapMain(t.code) + ' },' + p(t) + '}';
};
var b = 0;
function g(e) {
return e
.replace(s, '\\\\')
.replace(n, '\\"')
.replace(i, '\\n')
.replace(r, '\\r')
.replace(o, '\\u2028')
.replace(a, '\\u2029');
}
function m(e) {
return ~e.indexOf('.') ? 'd' : 'f';
}
function v(e, t) {
var n = '<' + (t.prefix || '') + e.n + b++;
return (
(t.partials[n] = { name: e.n, partials: {} }),
(t.code += 't.b(t.rp("' + g(n) + '",c,p,"' + (e.indent || '') + '"));'),
n
);
}
function y(e, t) {
t.code += 't.b(t.t(t.' + m(e.n) + '("' + g(e.n) + '",c,p,0)));';
}
function w(e) {
return 't.b(' + e + ');';
}
(e.generate = function (t, n, i) {
b = 0;
var r = { code: '', subs: {}, partials: {} };
return e.walk(t, r), i.asString ? this.stringify(r, n, i) : this.makeTemplate(r, n, i);
}),
(e.wrapMain = function (e) {
return 'var t=this;t.b(i=i||"");' + e + 'return t.fl();';
}),
(e.template = e.Template),
(e.makeTemplate = function (e, t, n) {
var i = this.makePartials(e);
return (i.code = new Function('c', 'p', 'i', this.wrapMain(e.code))), new this.template(i, t, this, n);
}),
(e.makePartials = function (e) {
var t,
n = { subs: {}, partials: e.partials, name: e.name };
for (t in n.partials) n.partials[t] = this.makePartials(n.partials[t]);
for (t in e.subs) n.subs[t] = new Function('c', 'p', 't', 'i', e.subs[t]);
return n;
}),
(e.codegen = {
'#': function (t, n) {
(n.code +=
'if(t.s(t.' +
m(t.n) +
'("' +
g(t.n) +
'",c,p,1),c,p,0,' +
t.i +
',' +
t.end +
',"' +
t.otag +
' ' +
t.ctag +
'")){t.rs(c,p,function(c,p,t){'),
e.walk(t.nodes, n),
(n.code += '});c.pop();}');
},
'^': function (t, n) {
(n.code += 'if(!t.s(t.' + m(t.n) + '("' + g(t.n) + '",c,p,1),c,p,1,0,0,"")){'),
e.walk(t.nodes, n),
(n.code += '};');
},
'>': v,
'<': function (t, n) {
var i = { partials: {}, code: '', subs: {}, inPartial: !0 };
e.walk(t.nodes, i);
var r = n.partials[v(t, n)];
(r.subs = i.subs), (r.partials = i.partials);
},
$: function (t, n) {
var i = { subs: {}, code: '', partials: n.partials, prefix: t.n };
e.walk(t.nodes, i), (n.subs[t.n] = i.code), n.inPartial || (n.code += 't.sub("' + g(t.n) + '",c,p,i);');
},
'\n': function (e, t) {
t.code += w('"\\n"' + (e.last ? '' : ' + i'));
},
_v: function (e, t) {
t.code += 't.b(t.v(t.' + m(e.n) + '("' + g(e.n) + '",c,p,0)));';
},
_t: function (e, t) {
t.code += w('"' + g(e.text) + '"');
},
'{': y,
'&': y
}),
(e.walk = function (t, n) {
for (var i, r = 0, s = t.length; r < s; r++) (i = e.codegen[t[r].tag]) && i(t[r], n);
return n;
}),
(e.parse = function (e, t, n) {
return f(e, 0, [], (n = n || {}).sectionTags || []);
}),
(e.cache = {}),
(e.cacheKey = function (e, t) {
return [e, !!t.asString, !!t.disableLambda, t.delimiters, !!t.modelGet].join('||');
}),
(e.compile = function (t, n) {
n = n || {};
var i = e.cacheKey(t, n),
r = this.cache[i];
if (r) {
var s = r.partials;
for (var o in s) delete s[o].instance;
return r;
}
return (r = this.generate(this.parse(this.scan(t, n.delimiters), t, n), t, n)), (this.cache[i] = r);
});
})(t);
},
485: (e, t, n) => {
var i = n(397);
(i.Template = n(882).Template), (i.template = i.Template), (e.exports = i);
},
882: (e, t) => {
!(function (e) {
function t(e, t, n) {
var i;
return (
t &&
'object' == typeof t &&
(void 0 !== t[e] ? (i = t[e]) : n && t.get && 'function' == typeof t.get && (i = t.get(e))),
i
);
}
(e.Template = function (e, t, n, i) {
(e = e || {}),
(this.r = e.code || this.r),
(this.c = n),
(this.options = i || {}),
(this.text = t || ''),
(this.partials = e.partials || {}),
(this.subs = e.subs || {}),
(this.buf = '');
}),
(e.Template.prototype = {
r: function (e, t, n) {
return '';
},
v: function (e) {
return (
(e = l(e)),
a.test(e)
? e
.replace(n, '&')
.replace(i, '<')
.replace(r, '>')
.replace(s, ''')
.replace(o, '"')
: e
);
},
t: l,
render: function (e, t, n) {
return this.ri([e], t || {}, n);
},
ri: function (e, t, n) {
return this.r(e, t, n);
},
ep: function (e, t) {
var n = this.partials[e],
i = t[n.name];
if (n.instance && n.base == i) return n.instance;
if ('string' == typeof i) {
if (!this.c) throw new Error('No compiler available.');
i = this.c.compile(i, this.options);
}
if (!i) return null;
if (((this.partials[e].base = i), n.subs)) {
for (key in (t.stackText || (t.stackText = {}), n.subs))
t.stackText[key] ||
(t.stackText[key] =
void 0 !== this.activeSub && t.stackText[this.activeSub]
? t.stackText[this.activeSub]
: this.text);
i = (function (e, t, n, i, r, s) {
function o() {}
function a() {}
var l;
(o.prototype = e), (a.prototype = e.subs);
var c = new o();
for (l in ((c.subs = new a()),
(c.subsText = {}),
(c.buf = ''),
(i = i || {}),
(c.stackSubs = i),
(c.subsText = s),
t))
i[l] || (i[l] = t[l]);
for (l in i) c.subs[l] = i[l];
for (l in ((r = r || {}), (c.stackPartials = r), n)) r[l] || (r[l] = n[l]);
for (l in r) c.partials[l] = r[l];
return c;
})(i, n.subs, n.partials, this.stackSubs, this.stackPartials, t.stackText);
}
return (this.partials[e].instance = i), i;
},
rp: function (e, t, n, i) {
var r = this.ep(e, n);
return r ? r.ri(t, n, i) : '';
},
rs: function (e, t, n) {
var i = e[e.length - 1];
if (c(i)) for (var r = 0; r < i.length; r++) e.push(i[r]), n(e, t, this), e.pop();
else n(e, t, this);
},
s: function (e, t, n, i, r, s, o) {
var a;
return (
(!c(e) || 0 !== e.length) &&
('function' == typeof e && (e = this.ms(e, t, n, i, r, s, o)),
(a = !!e),
!i && a && t && t.push('object' == typeof e ? e : t[t.length - 1]),
a)
);
},
d: function (e, n, i, r) {
var s,
o = e.split('.'),
a = this.f(o[0], n, i, r),
l = this.options.modelGet,
d = null;
if ('.' === e && c(n[n.length - 2])) a = n[n.length - 1];
else for (var f = 1; f < o.length; f++) void 0 !== (s = t(o[f], a, l)) ? ((d = a), (a = s)) : (a = '');
return !(r && !a) && (r || 'function' != typeof a || (n.push(d), (a = this.mv(a, n, i)), n.pop()), a);
},
f: function (e, n, i, r) {
for (var s = !1, o = !1, a = this.options.modelGet, l = n.length - 1; l >= 0; l--)
if (void 0 !== (s = t(e, n[l], a))) {
o = !0;
break;
}
return o ? (r || 'function' != typeof s || (s = this.mv(s, n, i)), s) : !r && '';
},
ls: function (e, t, n, i, r) {
var s = this.options.delimiters;
return (
(this.options.delimiters = r),
this.b(this.ct(l(e.call(t, i)), t, n)),
(this.options.delimiters = s),
!1
);
},
ct: function (e, t, n) {
if (this.options.disableLambda) throw new Error('Lambda features disabled.');
return this.c.compile(e, this.options).render(t, n);
},
b: function (e) {
this.buf += e;
},
fl: function () {
var e = this.buf;
return (this.buf = ''), e;
},
ms: function (e, t, n, i, r, s, o) {
var a,
l = t[t.length - 1],
c = e.call(l);
return 'function' == typeof c
? !!i ||
((a =
this.activeSub && this.subsText && this.subsText[this.activeSub]
? this.subsText[this.activeSub]
: this.text),
this.ls(c, l, n, a.substring(r, s), o))
: c;
},
mv: function (e, t, n) {
var i = t[t.length - 1],
r = e.call(i);
return 'function' == typeof r ? this.ct(l(r.call(i)), i, n) : r;
},
sub: function (e, t, n, i) {
var r = this.subs[e];
r && ((this.activeSub = e), r(t, n, this, i), (this.activeSub = !1));
}
});
var n = /&/g,
i = //g,
s = /\'/g,
o = /\"/g,
a = /[&<>\"\']/;
function l(e) {
return String(null == e ? '' : e);
}
var c =
Array.isArray ||
function (e) {
return '[object Array]' === Object.prototype.toString.call(e);
};
})(t);
},
468: (e, t, n) => {
'use strict';
Object.defineProperty(t, '__esModule', { value: !0 }), (t.parse = void 0);
const i = n(699),
r = n(593);
function s(e, t) {
const n = e.split('.');
return n.length > 1 ? n[n.length - 1] : t;
}
function o(e, t) {
return t.reduce((t, n) => t || e.startsWith(n), !1);
}
const a = ['a/', 'b/', 'i/', 'w/', 'c/', 'o/'];
function l(e, t, n) {
const i = void 0 !== n ? [...a, n] : a,
s = t ? new RegExp(`^${(0, r.escapeForRegExp)(t)} "?(.+?)"?$`) : new RegExp('^"?(.+?)"?$'),
[, o = ''] = s.exec(e) || [],
l = i.find((e) => 0 === o.indexOf(e));
return (l ? o.slice(l.length) : o).replace(
/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,
''
);
}
t.parse = function (e, t = {}) {
const n = [];
let r = null,
a = null,
c = null,
d = null,
f = null,
u = null,
h = null;
const p = '--- ',
b = '+++ ',
g = '@@',
m = /^old mode (\d{6})/,
v = /^new mode (\d{6})/,
y = /^deleted file mode (\d{6})/,
w = /^new file mode (\d{6})/,
S = /^copy from "?(.+)"?/,
L = /^copy to "?(.+)"?/,
C = /^rename from "?(.+)"?/,
x = /^rename to "?(.+)"?/,
O = /^similarity index (\d+)%/,
T = /^dissimilarity index (\d+)%/,
j = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,
_ = /^Binary files (.*) and (.*) differ/,
N = /^GIT binary patch/,
P = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,
E = /^mode (\d{6}),(\d{6})\.\.(\d{6})/,
M = /^new file mode (\d{6})/,
H = /^deleted file mode (\d{6}),(\d{6})/,
k = e
.replace(/\\ No newline at end of file/g, '')
.replace(/\r\n?/g, '\n')
.split('\n');
function D() {
null !== a && null !== r && (r.blocks.push(a), (a = null));
}
function F() {
null !== r &&
(r.oldName || null === u || (r.oldName = u),
r.newName || null === h || (r.newName = h),
r.newName && (n.push(r), (r = null))),
(u = null),
(h = null);
}
function I() {
D(), F(), (r = { blocks: [], deletedLines: 0, addedLines: 0 });
}
function A(e) {
let t;
D(),
null !== r &&
((t = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))
? ((r.isCombined = !1), (c = parseInt(t[1], 10)), (f = parseInt(t[2], 10)))
: (t = /^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))
? ((r.isCombined = !0), (c = parseInt(t[1], 10)), (d = parseInt(t[2], 10)), (f = parseInt(t[3], 10)))
: (e.startsWith(g) && console.error('Failed to parse lines, starting in 0!'),
(c = 0),
(f = 0),
(r.isCombined = !1))),
(a = { lines: [], oldStartLine: c, oldStartLine2: d, newStartLine: f, header: e });
}
return (
k.forEach((e, d) => {
if (!e || e.startsWith('*')) return;
let D;
const F = k[d - 1],
R = k[d + 1],
W = k[d + 2];
if (e.startsWith('diff --git') || e.startsWith('diff --combined')) {
if (
(I(),
(D = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e)) &&
((u = l(D[1], void 0, t.dstPrefix)), (h = l(D[2], void 0, t.srcPrefix))),
null === r)
)
throw new Error('Where is my file !!!');
return void (r.isGitDiff = !0);
}
if (e.startsWith('Binary files') && !(null == r ? void 0 : r.isGitDiff)) {
if (
(I(),
(D = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(e)) &&
((u = l(D[1], void 0, t.dstPrefix)), (h = l(D[2], void 0, t.srcPrefix))),
null === r)
)
throw new Error('Where is my file !!!');
return void (r.isBinary = !0);
}
if (
((!r || (!r.isGitDiff && r && e.startsWith(p) && R.startsWith(b) && W.startsWith(g))) && I(),
null == r ? void 0 : r.isTooBig)
)
return;
if (
r &&
(('number' == typeof t.diffMaxChanges && r.addedLines + r.deletedLines > t.diffMaxChanges) ||
('number' == typeof t.diffMaxLineLength && e.length > t.diffMaxLineLength))
)
return (
(r.isTooBig = !0),
(r.addedLines = 0),
(r.deletedLines = 0),
(r.blocks = []),
(a = null),
void A(
'function' == typeof t.diffTooBigMessage
? t.diffTooBigMessage(n.length)
: 'Diff too big to be displayed'
)
);
if ((e.startsWith(p) && R.startsWith(b)) || (e.startsWith(b) && F.startsWith(p))) {
if (
r &&
!r.oldName &&
e.startsWith('--- ') &&
(D = (function (e, t) {
return l(e, '---', t);
})(e, t.srcPrefix))
)
return (r.oldName = D), void (r.language = s(r.oldName, r.language));
if (
r &&
!r.newName &&
e.startsWith('+++ ') &&
(D = (function (e, t) {
return l(e, '+++', t);
})(e, t.dstPrefix))
)
return (r.newName = D), void (r.language = s(r.newName, r.language));
}
if (r && (e.startsWith(g) || (r.isGitDiff && r.oldName && r.newName && !a))) return void A(e);
if (a && (e.startsWith('+') || e.startsWith('-') || e.startsWith(' ')))
return void (function (e) {
if (null === r || null === a || null === c || null === f) return;
const t = { content: e },
n = r.isCombined ? ['+ ', ' +', '++'] : ['+'],
s = r.isCombined ? ['- ', ' -', '--'] : ['-'];
o(e, n)
? (r.addedLines++, (t.type = i.LineType.INSERT), (t.oldNumber = void 0), (t.newNumber = f++))
: o(e, s)
? (r.deletedLines++, (t.type = i.LineType.DELETE), (t.oldNumber = c++), (t.newNumber = void 0))
: ((t.type = i.LineType.CONTEXT), (t.oldNumber = c++), (t.newNumber = f++)),
a.lines.push(t);
})(e);
const B = !(function (e, t) {
let n = t;
for (; n < k.length - 3; ) {
if (e.startsWith('diff')) return !1;
if (k[n].startsWith(p) && k[n + 1].startsWith(b) && k[n + 2].startsWith(g)) return !0;
n++;
}
return !1;
})(e, d);
if (null === r) throw new Error('Where is my file !!!');
(D = m.exec(e))
? (r.oldMode = D[1])
: (D = v.exec(e))
? (r.newMode = D[1])
: (D = y.exec(e))
? ((r.deletedFileMode = D[1]), (r.isDeleted = !0))
: (D = w.exec(e))
? ((r.newFileMode = D[1]), (r.isNew = !0))
: (D = S.exec(e))
? (B && (r.oldName = D[1]), (r.isCopy = !0))
: (D = L.exec(e))
? (B && (r.newName = D[1]), (r.isCopy = !0))
: (D = C.exec(e))
? (B && (r.oldName = D[1]), (r.isRename = !0))
: (D = x.exec(e))
? (B && (r.newName = D[1]), (r.isRename = !0))
: (D = _.exec(e))
? ((r.isBinary = !0),
(r.oldName = l(D[1], void 0, t.srcPrefix)),
(r.newName = l(D[2], void 0, t.dstPrefix)),
A('Binary file'))
: N.test(e)
? ((r.isBinary = !0), A(e))
: (D = O.exec(e))
? (r.unchangedPercentage = parseInt(D[1], 10))
: (D = T.exec(e))
? (r.changedPercentage = parseInt(D[1], 10))
: (D = j.exec(e))
? ((r.checksumBefore = D[1]), (r.checksumAfter = D[2]), D[3] && (r.mode = D[3]))
: (D = P.exec(e))
? ((r.checksumBefore = [D[2], D[3]]), (r.checksumAfter = D[1]))
: (D = E.exec(e))
? ((r.oldMode = [D[2], D[3]]), (r.newMode = D[1]))
: (D = M.exec(e))
? ((r.newFileMode = D[1]), (r.isNew = !0))
: (D = H.exec(e)) && ((r.deletedFileMode = D[1]), (r.isDeleted = !0));
}),
D(),
F(),
n
);
};
},
979: function (e, t, n) {
'use strict';
var i =
(this && this.__createBinding) ||
(Object.create
? function (e, t, n, i) {
void 0 === i && (i = n);
var r = Object.getOwnPropertyDescriptor(t, n);
(r && !('get' in r ? !t.__esModule : r.writable || r.configurable)) ||
(r = {
enumerable: !0,
get: function () {
return t[n];
}
}),
Object.defineProperty(e, i, r);
}
: function (e, t, n, i) {
void 0 === i && (i = n), (e[i] = t[n]);
}),
r =
(this && this.__setModuleDefault) ||
(Object.create
? function (e, t) {
Object.defineProperty(e, 'default', { enumerable: !0, value: t });
}
: function (e, t) {
e.default = t;
}),
s =
(this && this.__importStar) ||
function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e) 'default' !== n && Object.prototype.hasOwnProperty.call(e, n) && i(t, e, n);
return r(t, e), t;
};
Object.defineProperty(t, '__esModule', { value: !0 }), (t.defaultTemplates = void 0);
const o = s(n(485));
(t.defaultTemplates = {}),
(t.defaultTemplates['file-summary-line'] = new o.Template({
code: function (e, t, n) {
var i = this;
return (
i.b((n = n || '')),
i.b('