@neonwilderness/moveskins 1.1.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/dist/index.js +788 -650
- package/package.json +13 -11
- package/skins/skinRegister.json +12 -0
- package/src/_download.js +63 -1
- package/src/_upload.js +34 -12
- package/src/index.js +17 -1
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import k, { resolve as A } from "node:path";
|
|
|
17
17
|
import "node:stream/promises";
|
|
18
18
|
import { execFile as j } from "node:child_process";
|
|
19
19
|
//#region \0rolldown/runtime.js
|
|
20
|
-
var M = Object.create, N = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, P = Object.getOwnPropertyNames, F = Object.getPrototypeOf, I = Object.prototype.hasOwnProperty, L = (e, t) => () => (e && (t = e(e = 0)), t), R = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), z = (e, t) => {
|
|
20
|
+
var M = Object.create, N = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, P = Object.getOwnPropertyNames, F = Object.getPrototypeOf, I = Object.prototype.hasOwnProperty, L = (e, t) => () => (e && (t = e(e = 0)), t), R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), z = (e, t) => {
|
|
21
21
|
let n = {};
|
|
22
22
|
for (var r in e) N(n, r, {
|
|
23
23
|
get: e[r],
|
|
@@ -1268,7 +1268,7 @@ var ft, pt = class {
|
|
|
1268
1268
|
function C(e, t, n, r) {
|
|
1269
1269
|
let i, a = R(t, h.nargs);
|
|
1270
1270
|
if (a = typeof a != "number" || isNaN(a) ? 1 : a, a === 0) return re(r) || (v = Error(m("Argument unexpected for: %s", t))), T(t, ne(t)), e;
|
|
1271
|
-
let s = re(r)
|
|
1271
|
+
let s = +!re(r);
|
|
1272
1272
|
if (o["nargs-eats-options"]) n.length - (e + 1) + s < a && (v = Error(m("Not enough arguments following: %s", t))), s = a;
|
|
1273
1273
|
else {
|
|
1274
1274
|
for (i = e + 1; i < n.length && (!n[i].match(/^-[^0-9]/) || n[i].match(g) || V(n[i])); i++) s++;
|
|
@@ -1554,7 +1554,7 @@ Ct.detailed = function(e, t) {
|
|
|
1554
1554
|
//#endregion
|
|
1555
1555
|
//#region node_modules/yargs/build/lib/utils/process-argv.js
|
|
1556
1556
|
function wt() {
|
|
1557
|
-
return Tt()
|
|
1557
|
+
return +!Tt();
|
|
1558
1558
|
}
|
|
1559
1559
|
function Tt() {
|
|
1560
1560
|
return Et() && !process.defaultApp;
|
|
@@ -3742,7 +3742,7 @@ function hi(e, { streamIsTTY: t, sniffFlags: n = !0 } = {}) {
|
|
|
3742
3742
|
"BUILDKITE",
|
|
3743
3743
|
"DRONE"
|
|
3744
3744
|
].some((e) => e in di) || di.CI_NAME === "codeship" ? 1 : a;
|
|
3745
|
-
if ("TEAMCITY_VERSION" in di) return
|
|
3745
|
+
if ("TEAMCITY_VERSION" in di) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(di.TEAMCITY_VERSION);
|
|
3746
3746
|
if (di.COLORTERM === "truecolor" || di.TERM === "xterm-kitty" || di.TERM === "xterm-ghostty" || di.TERM === "wezterm") return 3;
|
|
3747
3747
|
if ("TERM_PROGRAM" in di) {
|
|
3748
3748
|
let e = Number.parseInt((di.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
@@ -5294,7 +5294,7 @@ var Ii = /* @__PURE__ */ R(((e, t) => {
|
|
|
5294
5294
|
"GITHUB_ACTIONS",
|
|
5295
5295
|
"BUILDKITE"
|
|
5296
5296
|
].some((e) => e in a) || a.CI_NAME === "codeship" ? 1 : r;
|
|
5297
|
-
if ("TEAMCITY_VERSION" in a) return
|
|
5297
|
+
if ("TEAMCITY_VERSION" in a) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION);
|
|
5298
5298
|
if (a.COLORTERM === "truecolor") return 3;
|
|
5299
5299
|
if ("TERM_PROGRAM" in a) {
|
|
5300
5300
|
let e = parseInt((a.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
@@ -27052,7 +27052,7 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
27052
27052
|
return n ? {
|
|
27053
27053
|
hash: t,
|
|
27054
27054
|
request: n.request,
|
|
27055
|
-
responseCount: n.responses ? n.responses.length : n.response
|
|
27055
|
+
responseCount: n.responses ? n.responses.length : +!!n.response,
|
|
27056
27056
|
callCount: n.callCount || 0,
|
|
27057
27057
|
timestamp: n.timestamp
|
|
27058
27058
|
} : null;
|
|
@@ -33058,60 +33058,60 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33058
33058
|
return await a, c;
|
|
33059
33059
|
}
|
|
33060
33060
|
})), Hd = /* @__PURE__ */ R(((e) => {
|
|
33061
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
|
|
33062
|
-
|
|
33063
|
-
|
|
33064
|
-
n === void 0 && (n = {});
|
|
33065
|
-
var r;
|
|
33061
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = class {
|
|
33062
|
+
diff(e, t, n = {}) {
|
|
33063
|
+
let r;
|
|
33066
33064
|
typeof n == "function" ? (r = n, n = {}) : "callback" in n && (r = n.callback);
|
|
33067
|
-
|
|
33065
|
+
let i = this.castInput(e, n), a = this.castInput(t, n), o = this.removeEmpty(this.tokenize(i, n)), s = this.removeEmpty(this.tokenize(a, n));
|
|
33068
33066
|
return this.diffWithOptionsObj(o, s, n, r);
|
|
33069
|
-
}
|
|
33070
|
-
|
|
33071
|
-
|
|
33067
|
+
}
|
|
33068
|
+
diffWithOptionsObj(e, t, n, r) {
|
|
33069
|
+
let i = (e) => {
|
|
33070
|
+
if (e = this.postProcess(e, n), r) {
|
|
33072
33071
|
setTimeout(function() {
|
|
33073
33072
|
r(e);
|
|
33074
33073
|
}, 0);
|
|
33075
33074
|
return;
|
|
33076
33075
|
} else return e;
|
|
33077
|
-
},
|
|
33078
|
-
n.maxEditLength != null && (
|
|
33079
|
-
|
|
33076
|
+
}, a = t.length, o = e.length, s = 1, c = a + o;
|
|
33077
|
+
n.maxEditLength != null && (c = Math.min(c, n.maxEditLength));
|
|
33078
|
+
let l = n.timeout ?? Infinity, u = Date.now() + l, d = [{
|
|
33080
33079
|
oldPos: -1,
|
|
33081
33080
|
lastComponent: void 0
|
|
33082
|
-
}],
|
|
33083
|
-
if (
|
|
33084
|
-
|
|
33085
|
-
for (
|
|
33086
|
-
|
|
33087
|
-
|
|
33088
|
-
|
|
33089
|
-
if (
|
|
33090
|
-
|
|
33091
|
-
|
|
33081
|
+
}], f = this.extractCommon(d[0], t, e, 0, n);
|
|
33082
|
+
if (d[0].oldPos + 1 >= o && f + 1 >= a) return i(this.buildValues(d[0].lastComponent, t, e));
|
|
33083
|
+
let p = -Infinity, m = Infinity, h = () => {
|
|
33084
|
+
for (let r = Math.max(p, -s); r <= Math.min(m, s); r += 2) {
|
|
33085
|
+
let s, c = d[r - 1], l = d[r + 1];
|
|
33086
|
+
c && (d[r - 1] = void 0);
|
|
33087
|
+
let u = !1;
|
|
33088
|
+
if (l) {
|
|
33089
|
+
let e = l.oldPos - r;
|
|
33090
|
+
u = l && 0 <= e && e < a;
|
|
33092
33091
|
}
|
|
33093
|
-
|
|
33094
|
-
if (!
|
|
33095
|
-
|
|
33092
|
+
let h = c && c.oldPos + 1 < o;
|
|
33093
|
+
if (!u && !h) {
|
|
33094
|
+
d[r] = void 0;
|
|
33096
33095
|
continue;
|
|
33097
33096
|
}
|
|
33098
|
-
if (
|
|
33099
|
-
|
|
33097
|
+
if (s = !h || u && c.oldPos < l.oldPos ? this.addToPath(l, !0, !1, 0, n) : this.addToPath(c, !1, !0, 1, n), f = this.extractCommon(s, t, e, r, n), s.oldPos + 1 >= o && f + 1 >= a) return i(this.buildValues(s.lastComponent, t, e)) || !0;
|
|
33098
|
+
d[r] = s, s.oldPos + 1 >= o && (m = Math.min(m, r - 1)), f + 1 >= a && (p = Math.max(p, r + 1));
|
|
33100
33099
|
}
|
|
33101
|
-
|
|
33100
|
+
s++;
|
|
33102
33101
|
};
|
|
33103
33102
|
if (r) (function e() {
|
|
33104
33103
|
setTimeout(function() {
|
|
33105
|
-
if (
|
|
33106
|
-
|
|
33104
|
+
if (s > c || Date.now() > u) return r(void 0);
|
|
33105
|
+
h() || e();
|
|
33107
33106
|
}, 0);
|
|
33108
33107
|
})();
|
|
33109
|
-
else for (;
|
|
33110
|
-
|
|
33111
|
-
if (
|
|
33108
|
+
else for (; s <= c && Date.now() <= u;) {
|
|
33109
|
+
let e = h();
|
|
33110
|
+
if (e) return e;
|
|
33112
33111
|
}
|
|
33113
|
-
}
|
|
33114
|
-
|
|
33112
|
+
}
|
|
33113
|
+
addToPath(e, t, n, r, i) {
|
|
33114
|
+
let a = e.lastComponent;
|
|
33115
33115
|
return a && !i.oneChangePerToken && a.added === t && a.removed === n ? {
|
|
33116
33116
|
oldPos: e.oldPos + r,
|
|
33117
33117
|
lastComponent: {
|
|
@@ -33129,8 +33129,10 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33129
33129
|
previousComponent: a
|
|
33130
33130
|
}
|
|
33131
33131
|
};
|
|
33132
|
-
}
|
|
33133
|
-
|
|
33132
|
+
}
|
|
33133
|
+
extractCommon(e, t, n, r, i) {
|
|
33134
|
+
let a = t.length, o = n.length, s = e.oldPos, c = s - r, l = 0;
|
|
33135
|
+
for (; c + 1 < a && s + 1 < o && this.equals(n[s + 1], t[c + 1], i);) c++, s++, l++, i.oneChangePerToken && (e.lastComponent = {
|
|
33134
33136
|
count: 1,
|
|
33135
33137
|
previousComponent: e.lastComponent,
|
|
33136
33138
|
added: !1,
|
|
@@ -33142,82 +33144,71 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33142
33144
|
added: !1,
|
|
33143
33145
|
removed: !1
|
|
33144
33146
|
}), e.oldPos = s, c;
|
|
33145
|
-
}
|
|
33147
|
+
}
|
|
33148
|
+
equals(e, t, n) {
|
|
33146
33149
|
return n.comparator ? n.comparator(e, t) : e === t || !!n.ignoreCase && e.toLowerCase() === t.toLowerCase();
|
|
33147
|
-
}
|
|
33148
|
-
|
|
33150
|
+
}
|
|
33151
|
+
removeEmpty(e) {
|
|
33152
|
+
let t = [];
|
|
33153
|
+
for (let n = 0; n < e.length; n++) e[n] && t.push(e[n]);
|
|
33149
33154
|
return t;
|
|
33150
|
-
}
|
|
33155
|
+
}
|
|
33156
|
+
castInput(e, t) {
|
|
33151
33157
|
return e;
|
|
33152
|
-
}
|
|
33158
|
+
}
|
|
33159
|
+
tokenize(e, t) {
|
|
33153
33160
|
return Array.from(e);
|
|
33154
|
-
}
|
|
33161
|
+
}
|
|
33162
|
+
join(e) {
|
|
33155
33163
|
return e.join("");
|
|
33156
|
-
}
|
|
33164
|
+
}
|
|
33165
|
+
postProcess(e, t) {
|
|
33157
33166
|
return e;
|
|
33158
|
-
}
|
|
33159
|
-
|
|
33160
|
-
|
|
33161
|
-
|
|
33162
|
-
|
|
33163
|
-
|
|
33164
|
-
|
|
33165
|
-
for (var r = [], i; e;) r.push(e), i = e.previousComponent, delete e.previousComponent, e = i;
|
|
33167
|
+
}
|
|
33168
|
+
get useLongestToken() {
|
|
33169
|
+
return !1;
|
|
33170
|
+
}
|
|
33171
|
+
buildValues(e, t, n) {
|
|
33172
|
+
let r = [], i;
|
|
33173
|
+
for (; e;) r.push(e), i = e.previousComponent, delete e.previousComponent, e = i;
|
|
33166
33174
|
r.reverse();
|
|
33167
|
-
|
|
33168
|
-
|
|
33169
|
-
|
|
33175
|
+
let a = r.length, o = 0, s = 0, c = 0;
|
|
33176
|
+
for (; o < a; o++) {
|
|
33177
|
+
let e = r[o];
|
|
33178
|
+
if (e.removed) e.value = this.join(n.slice(c, c + e.count)), c += e.count;
|
|
33170
33179
|
else {
|
|
33171
|
-
if (!
|
|
33172
|
-
|
|
33173
|
-
|
|
33174
|
-
|
|
33180
|
+
if (!e.added && this.useLongestToken) {
|
|
33181
|
+
let r = t.slice(s, s + e.count);
|
|
33182
|
+
r = r.map(function(e, t) {
|
|
33183
|
+
let r = n[c + t];
|
|
33175
33184
|
return r.length > e.length ? r : e;
|
|
33176
|
-
}),
|
|
33177
|
-
} else
|
|
33178
|
-
s +=
|
|
33185
|
+
}), e.value = this.join(r);
|
|
33186
|
+
} else e.value = this.join(t.slice(s, s + e.count));
|
|
33187
|
+
s += e.count, e.added || (c += e.count);
|
|
33179
33188
|
}
|
|
33180
33189
|
}
|
|
33181
33190
|
return r;
|
|
33182
|
-
}, e;
|
|
33183
|
-
}();
|
|
33184
|
-
})), Ud = /* @__PURE__ */ R(((e) => {
|
|
33185
|
-
var t = e && e.__extends || (function() {
|
|
33186
|
-
var e = function(t, n) {
|
|
33187
|
-
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
33188
|
-
e.__proto__ = t;
|
|
33189
|
-
} || function(e, t) {
|
|
33190
|
-
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
33191
|
-
}, e(t, n);
|
|
33192
|
-
};
|
|
33193
|
-
return function(t, n) {
|
|
33194
|
-
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
33195
|
-
e(t, n);
|
|
33196
|
-
function r() {
|
|
33197
|
-
this.constructor = t;
|
|
33198
|
-
}
|
|
33199
|
-
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
33200
|
-
};
|
|
33201
|
-
})();
|
|
33202
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.characterDiff = void 0, e.diffChars = n, e.characterDiff = new (function(e) {
|
|
33203
|
-
t(n, e);
|
|
33204
|
-
function n() {
|
|
33205
|
-
return e !== null && e.apply(this, arguments) || this;
|
|
33206
33191
|
}
|
|
33207
|
-
|
|
33208
|
-
|
|
33209
|
-
|
|
33192
|
+
};
|
|
33193
|
+
})), Ud = /* @__PURE__ */ R(((e) => {
|
|
33194
|
+
var t = e && e.__importDefault || function(e) {
|
|
33195
|
+
return e && e.__esModule ? e : { default: e };
|
|
33196
|
+
};
|
|
33197
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.characterDiff = void 0, e.diffChars = r;
|
|
33198
|
+
var n = t(Hd());
|
|
33199
|
+
e.characterDiff = new class extends n.default {}();
|
|
33200
|
+
function r(t, n, r) {
|
|
33210
33201
|
return e.characterDiff.diff(t, n, r);
|
|
33211
33202
|
}
|
|
33212
33203
|
})), Wd = /* @__PURE__ */ R(((e) => {
|
|
33213
33204
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.longestCommonPrefix = t, e.longestCommonSuffix = n, e.replacePrefix = r, e.replaceSuffix = i, e.removePrefix = a, e.removeSuffix = o, e.maximumOverlap = s, e.hasOnlyWinLineEndings = l, e.hasOnlyUnixLineEndings = u, e.segment = d, e.trailingWs = f, e.leadingWs = p, e.leadingAndTrailingWs = m;
|
|
33214
33205
|
function t(e, t) {
|
|
33215
|
-
|
|
33206
|
+
let n;
|
|
33216
33207
|
for (n = 0; n < e.length && n < t.length; n++) if (e[n] != t[n]) return e.slice(0, n);
|
|
33217
33208
|
return e.slice(0, n);
|
|
33218
33209
|
}
|
|
33219
33210
|
function n(e, t) {
|
|
33220
|
-
|
|
33211
|
+
let n;
|
|
33221
33212
|
if (!e || !t || e[e.length - 1] != t[t.length - 1]) return "";
|
|
33222
33213
|
for (n = 0; n < e.length && n < t.length; n++) if (e[e.length - (n + 1)] != t[t.length - (n + 1)]) return e.slice(-n);
|
|
33223
33214
|
return e.slice(-n);
|
|
@@ -33241,20 +33232,20 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33241
33232
|
return t.slice(0, c(e, t));
|
|
33242
33233
|
}
|
|
33243
33234
|
function c(e, t) {
|
|
33244
|
-
|
|
33235
|
+
let n = 0;
|
|
33245
33236
|
e.length > t.length && (n = e.length - t.length);
|
|
33246
|
-
|
|
33237
|
+
let r = t.length;
|
|
33247
33238
|
e.length < t.length && (r = e.length);
|
|
33248
|
-
|
|
33239
|
+
let i = Array(r), a = 0;
|
|
33249
33240
|
i[0] = 0;
|
|
33250
|
-
for (
|
|
33251
|
-
for (t[
|
|
33252
|
-
t[
|
|
33241
|
+
for (let e = 1; e < r; e++) {
|
|
33242
|
+
for (t[e] == t[a] ? i[e] = i[a] : i[e] = a; a > 0 && t[e] != t[a];) a = i[a];
|
|
33243
|
+
t[e] == t[a] && a++;
|
|
33253
33244
|
}
|
|
33254
33245
|
a = 0;
|
|
33255
|
-
for (
|
|
33256
|
-
for (; a > 0 && e[
|
|
33257
|
-
e[
|
|
33246
|
+
for (let r = n; r < e.length; r++) {
|
|
33247
|
+
for (; a > 0 && e[r] != t[a];) a = i[a];
|
|
33248
|
+
e[r] == t[a] && a++;
|
|
33258
33249
|
}
|
|
33259
33250
|
return a;
|
|
33260
33251
|
}
|
|
@@ -33265,126 +33256,105 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33265
33256
|
return !e.includes("\r\n") && e.includes("\n");
|
|
33266
33257
|
}
|
|
33267
33258
|
function d(e, t) {
|
|
33268
|
-
|
|
33269
|
-
|
|
33270
|
-
|
|
33259
|
+
let n = [];
|
|
33260
|
+
for (let r of Array.from(t.segment(e))) {
|
|
33261
|
+
let e = r.segment;
|
|
33262
|
+
n.length && /\s/.test(n[n.length - 1]) && /\s/.test(e) ? n[n.length - 1] += e : n.push(e);
|
|
33271
33263
|
}
|
|
33272
33264
|
return n;
|
|
33273
33265
|
}
|
|
33274
33266
|
function f(e, t) {
|
|
33275
33267
|
if (t) return m(e, t)[1];
|
|
33276
|
-
|
|
33268
|
+
let n;
|
|
33277
33269
|
for (n = e.length - 1; n >= 0 && e[n].match(/\s/); n--);
|
|
33278
33270
|
return e.substring(n + 1);
|
|
33279
33271
|
}
|
|
33280
33272
|
function p(e, t) {
|
|
33281
33273
|
if (t) return m(e, t)[0];
|
|
33282
|
-
|
|
33274
|
+
let n = e.match(/^\s*/);
|
|
33283
33275
|
return n ? n[0] : "";
|
|
33284
33276
|
}
|
|
33285
33277
|
function m(e, t) {
|
|
33286
33278
|
if (!t) return [p(e), f(e)];
|
|
33287
33279
|
if (t.resolvedOptions().granularity != "word") throw Error("The segmenter passed must have a granularity of \"word\"");
|
|
33288
|
-
|
|
33280
|
+
let n = d(e, t), r = n[0], i = n[n.length - 1];
|
|
33289
33281
|
return [/\s/.test(r) ? r : "", /\s/.test(i) ? i : ""];
|
|
33290
33282
|
}
|
|
33291
33283
|
})), Gd = /* @__PURE__ */ R(((e) => {
|
|
33292
|
-
var t = e && e.
|
|
33293
|
-
|
|
33294
|
-
|
|
33295
|
-
e.__proto__ = t;
|
|
33296
|
-
} || function(e, t) {
|
|
33297
|
-
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
33298
|
-
}, e(t, n);
|
|
33299
|
-
};
|
|
33300
|
-
return function(t, n) {
|
|
33301
|
-
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
33302
|
-
e(t, n);
|
|
33303
|
-
function r() {
|
|
33304
|
-
this.constructor = t;
|
|
33305
|
-
}
|
|
33306
|
-
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
33307
|
-
};
|
|
33308
|
-
})();
|
|
33284
|
+
var t = e && e.__importDefault || function(e) {
|
|
33285
|
+
return e && e.__esModule ? e : { default: e };
|
|
33286
|
+
};
|
|
33309
33287
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.wordsWithSpaceDiff = e.wordDiff = void 0, e.diffWords = o, e.diffWordsWithSpace = c;
|
|
33310
|
-
var n = Hd(), r = Wd(), i = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", a = RegExp(`[${i}]+|\\s+|[^${i}]`, "ug");
|
|
33311
|
-
e.wordDiff = new
|
|
33312
|
-
|
|
33313
|
-
function n() {
|
|
33314
|
-
return e !== null && e.apply(this, arguments) || this;
|
|
33315
|
-
}
|
|
33316
|
-
return n.prototype.equals = function(e, t, n) {
|
|
33288
|
+
var n = t(Hd()), r = Wd(), i = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", a = RegExp(`[${i}]+|\\s+|[^${i}]`, "ug");
|
|
33289
|
+
e.wordDiff = new class extends n.default {
|
|
33290
|
+
equals(e, t, n) {
|
|
33317
33291
|
return n.ignoreCase && (e = e.toLowerCase(), t = t.toLowerCase()), e.trim() === t.trim();
|
|
33318
|
-
}
|
|
33319
|
-
|
|
33320
|
-
|
|
33292
|
+
}
|
|
33293
|
+
tokenize(e, t = {}) {
|
|
33294
|
+
let n;
|
|
33321
33295
|
if (t.intlSegmenter) {
|
|
33322
|
-
|
|
33296
|
+
let i = t.intlSegmenter;
|
|
33323
33297
|
if (i.resolvedOptions().granularity != "word") throw Error("The segmenter passed must have a granularity of \"word\"");
|
|
33324
33298
|
n = (0, r.segment)(e, i);
|
|
33325
33299
|
} else n = e.match(a) || [];
|
|
33326
|
-
|
|
33327
|
-
return n.forEach(
|
|
33328
|
-
/\s/.test(e) ?
|
|
33329
|
-
}),
|
|
33330
|
-
}
|
|
33331
|
-
|
|
33332
|
-
|
|
33333
|
-
|
|
33334
|
-
|
|
33300
|
+
let i = [], o = null;
|
|
33301
|
+
return n.forEach((e) => {
|
|
33302
|
+
/\s/.test(e) ? o == null ? i.push(e) : i.push(i.pop() + e) : o != null && /\s/.test(o) ? i[i.length - 1] == o ? i.push(i.pop() + e) : i.push(o + e) : i.push(e), o = e;
|
|
33303
|
+
}), i;
|
|
33304
|
+
}
|
|
33305
|
+
join(e) {
|
|
33306
|
+
return e.map((e, t) => t == 0 ? e : e.replace(/^\s+/, "")).join("");
|
|
33307
|
+
}
|
|
33308
|
+
postProcess(e, t) {
|
|
33335
33309
|
if (!e || t.oneChangePerToken) return e;
|
|
33336
|
-
|
|
33337
|
-
return e.forEach(
|
|
33310
|
+
let n = null, r = null, i = null;
|
|
33311
|
+
return e.forEach((e) => {
|
|
33338
33312
|
e.added ? r = e : e.removed ? i = e : ((r || i) && s(n, i, r, e, t.intlSegmenter), n = e, r = null, i = null);
|
|
33339
33313
|
}), (r || i) && s(n, i, r, null, t.intlSegmenter), e;
|
|
33340
|
-
}
|
|
33341
|
-
}(
|
|
33314
|
+
}
|
|
33315
|
+
}();
|
|
33342
33316
|
function o(t, n, r) {
|
|
33343
33317
|
return r?.ignoreWhitespace != null && !r.ignoreWhitespace ? c(t, n, r) : e.wordDiff.diff(t, n, r);
|
|
33344
33318
|
}
|
|
33345
33319
|
function s(e, t, n, i, a) {
|
|
33346
33320
|
if (t && n) {
|
|
33347
|
-
|
|
33321
|
+
let [o, s] = (0, r.leadingAndTrailingWs)(t.value, a), [c, l] = (0, r.leadingAndTrailingWs)(n.value, a);
|
|
33348
33322
|
if (e) {
|
|
33349
|
-
|
|
33350
|
-
e.value = (0, r.replaceSuffix)(e.value,
|
|
33323
|
+
let i = (0, r.longestCommonPrefix)(o, c);
|
|
33324
|
+
e.value = (0, r.replaceSuffix)(e.value, c, i), t.value = (0, r.removePrefix)(t.value, i), n.value = (0, r.removePrefix)(n.value, i);
|
|
33351
33325
|
}
|
|
33352
33326
|
if (i) {
|
|
33353
|
-
|
|
33354
|
-
i.value = (0, r.replacePrefix)(i.value,
|
|
33327
|
+
let e = (0, r.longestCommonSuffix)(s, l);
|
|
33328
|
+
i.value = (0, r.replacePrefix)(i.value, l, e), t.value = (0, r.removeSuffix)(t.value, e), n.value = (0, r.removeSuffix)(n.value, e);
|
|
33355
33329
|
}
|
|
33356
33330
|
} else if (n) {
|
|
33357
33331
|
if (e) {
|
|
33358
|
-
|
|
33359
|
-
n.value = n.value.substring(
|
|
33332
|
+
let e = (0, r.leadingWs)(n.value, a);
|
|
33333
|
+
n.value = n.value.substring(e.length);
|
|
33360
33334
|
}
|
|
33361
33335
|
if (i) {
|
|
33362
|
-
|
|
33363
|
-
i.value = i.value.substring(
|
|
33336
|
+
let e = (0, r.leadingWs)(i.value, a);
|
|
33337
|
+
i.value = i.value.substring(e.length);
|
|
33364
33338
|
}
|
|
33365
33339
|
} else if (e && i) {
|
|
33366
|
-
|
|
33367
|
-
t.value = (0, r.removePrefix)(t.value,
|
|
33368
|
-
|
|
33369
|
-
t.value = (0, r.removeSuffix)(t.value,
|
|
33340
|
+
let n = (0, r.leadingWs)(i.value, a), [o, s] = (0, r.leadingAndTrailingWs)(t.value, a), c = (0, r.longestCommonPrefix)(n, o);
|
|
33341
|
+
t.value = (0, r.removePrefix)(t.value, c);
|
|
33342
|
+
let l = (0, r.longestCommonSuffix)((0, r.removePrefix)(n, c), s);
|
|
33343
|
+
t.value = (0, r.removeSuffix)(t.value, l), i.value = (0, r.replacePrefix)(i.value, n, l), e.value = (0, r.replaceSuffix)(e.value, n, n.slice(0, n.length - l.length));
|
|
33370
33344
|
} else if (i) {
|
|
33371
|
-
|
|
33372
|
-
t.value = (0, r.removeSuffix)(t.value,
|
|
33345
|
+
let e = (0, r.leadingWs)(i.value, a), n = (0, r.trailingWs)(t.value, a), o = (0, r.maximumOverlap)(n, e);
|
|
33346
|
+
t.value = (0, r.removeSuffix)(t.value, o);
|
|
33373
33347
|
} else if (e) {
|
|
33374
|
-
|
|
33375
|
-
t.value = (0, r.removePrefix)(t.value,
|
|
33348
|
+
let n = (0, r.trailingWs)(e.value, a), i = (0, r.leadingWs)(t.value, a), o = (0, r.maximumOverlap)(n, i);
|
|
33349
|
+
t.value = (0, r.removePrefix)(t.value, o);
|
|
33376
33350
|
}
|
|
33377
33351
|
}
|
|
33378
|
-
e.wordsWithSpaceDiff = new
|
|
33379
|
-
|
|
33380
|
-
|
|
33381
|
-
return e !== null && e.apply(this, arguments) || this;
|
|
33382
|
-
}
|
|
33383
|
-
return n.prototype.tokenize = function(e) {
|
|
33384
|
-
var t = RegExp(`(\\r?\\n)|[${i}]+|[^\\S\\n\\r]+|[^${i}]`, "ug");
|
|
33352
|
+
e.wordsWithSpaceDiff = new class extends n.default {
|
|
33353
|
+
tokenize(e) {
|
|
33354
|
+
let t = RegExp(`(\\r?\\n)|[${i}]+|[^\\S\\n\\r]+|[^${i}]`, "ug");
|
|
33385
33355
|
return e.match(t) || [];
|
|
33386
|
-
}
|
|
33387
|
-
}(
|
|
33356
|
+
}
|
|
33357
|
+
}();
|
|
33388
33358
|
function c(t, n, r) {
|
|
33389
33359
|
return e.wordsWithSpaceDiff.diff(t, n, r);
|
|
33390
33360
|
}
|
|
@@ -33392,41 +33362,25 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33392
33362
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.generateOptions = t;
|
|
33393
33363
|
function t(e, t) {
|
|
33394
33364
|
if (typeof e == "function") t.callback = e;
|
|
33395
|
-
else if (e) for (
|
|
33365
|
+
else if (e) for (let n in e)
|
|
33396
33366
|
/* istanbul ignore else */
|
|
33397
33367
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
|
|
33398
33368
|
return t;
|
|
33399
33369
|
}
|
|
33400
33370
|
})), qd = /* @__PURE__ */ R(((e) => {
|
|
33401
|
-
var t = e && e.
|
|
33402
|
-
|
|
33403
|
-
|
|
33404
|
-
e.__proto__ = t;
|
|
33405
|
-
} || function(e, t) {
|
|
33406
|
-
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
33407
|
-
}, e(t, n);
|
|
33408
|
-
};
|
|
33409
|
-
return function(t, n) {
|
|
33410
|
-
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
33411
|
-
e(t, n);
|
|
33412
|
-
function r() {
|
|
33413
|
-
this.constructor = t;
|
|
33414
|
-
}
|
|
33415
|
-
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
33416
|
-
};
|
|
33417
|
-
})();
|
|
33371
|
+
var t = e && e.__importDefault || function(e) {
|
|
33372
|
+
return e && e.__esModule ? e : { default: e };
|
|
33373
|
+
};
|
|
33418
33374
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.lineDiff = void 0, e.diffLines = i, e.diffTrimmedLines = a, e.tokenize = o;
|
|
33419
|
-
var n = Hd(), r = Kd();
|
|
33420
|
-
e.lineDiff = new
|
|
33421
|
-
|
|
33422
|
-
|
|
33423
|
-
|
|
33424
|
-
|
|
33375
|
+
var n = t(Hd()), r = Kd();
|
|
33376
|
+
e.lineDiff = new class extends n.default {
|
|
33377
|
+
constructor() {
|
|
33378
|
+
super(...arguments), this.tokenize = o;
|
|
33379
|
+
}
|
|
33380
|
+
equals(e, t, n) {
|
|
33381
|
+
return n.ignoreWhitespace ? ((!n.newlineIsToken || !e.includes("\n")) && (e = e.trim()), (!n.newlineIsToken || !t.includes("\n")) && (t = t.trim())) : n.ignoreNewlineAtEof && !n.newlineIsToken && (e.endsWith("\n") && (e = e.slice(0, -1)), t.endsWith("\n") && (t = t.slice(0, -1))), super.equals(e, t, n);
|
|
33425
33382
|
}
|
|
33426
|
-
|
|
33427
|
-
return r.ignoreWhitespace ? ((!r.newlineIsToken || !t.includes("\n")) && (t = t.trim()), (!r.newlineIsToken || !n.includes("\n")) && (n = n.trim())) : r.ignoreNewlineAtEof && !r.newlineIsToken && (t.endsWith("\n") && (t = t.slice(0, -1)), n.endsWith("\n") && (n = n.slice(0, -1))), e.prototype.equals.call(this, t, n, r);
|
|
33428
|
-
}, n;
|
|
33429
|
-
}(n.default))();
|
|
33383
|
+
}();
|
|
33430
33384
|
function i(t, n, r) {
|
|
33431
33385
|
return e.lineDiff.diff(t, n, r);
|
|
33432
33386
|
}
|
|
@@ -33435,44 +33389,27 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33435
33389
|
}
|
|
33436
33390
|
function o(e, t) {
|
|
33437
33391
|
t.stripTrailingCr && (e = e.replace(/\r\n/g, "\n"));
|
|
33438
|
-
|
|
33392
|
+
let n = [], r = e.split(/(\n|\r\n)/);
|
|
33439
33393
|
r[r.length - 1] || r.pop();
|
|
33440
|
-
for (
|
|
33441
|
-
|
|
33442
|
-
|
|
33394
|
+
for (let e = 0; e < r.length; e++) {
|
|
33395
|
+
let i = r[e];
|
|
33396
|
+
e % 2 && !t.newlineIsToken ? n[n.length - 1] += i : n.push(i);
|
|
33443
33397
|
}
|
|
33444
33398
|
return n;
|
|
33445
33399
|
}
|
|
33446
33400
|
})), Jd = /* @__PURE__ */ R(((e) => {
|
|
33447
|
-
var t = e && e.
|
|
33448
|
-
|
|
33449
|
-
|
|
33450
|
-
e.__proto__ = t;
|
|
33451
|
-
} || function(e, t) {
|
|
33452
|
-
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
33453
|
-
}, e(t, n);
|
|
33454
|
-
};
|
|
33455
|
-
return function(t, n) {
|
|
33456
|
-
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
33457
|
-
e(t, n);
|
|
33458
|
-
function r() {
|
|
33459
|
-
this.constructor = t;
|
|
33460
|
-
}
|
|
33461
|
-
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
33462
|
-
};
|
|
33463
|
-
})();
|
|
33401
|
+
var t = e && e.__importDefault || function(e) {
|
|
33402
|
+
return e && e.__esModule ? e : { default: e };
|
|
33403
|
+
};
|
|
33464
33404
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.sentenceDiff = void 0, e.diffSentences = i;
|
|
33465
|
-
var n = Hd();
|
|
33405
|
+
var n = t(Hd());
|
|
33466
33406
|
function r(e) {
|
|
33467
33407
|
return e == "." || e == "!" || e == "?";
|
|
33468
33408
|
}
|
|
33469
|
-
e.sentenceDiff = new
|
|
33470
|
-
|
|
33471
|
-
|
|
33472
|
-
|
|
33473
|
-
}
|
|
33474
|
-
return n.prototype.tokenize = function(e) {
|
|
33475
|
-
for (var t = [], n = 0, i = 0; i < e.length; i++) {
|
|
33409
|
+
e.sentenceDiff = new class extends n.default {
|
|
33410
|
+
tokenize(e) {
|
|
33411
|
+
let t = [], n = 0;
|
|
33412
|
+
for (let i = 0; i < e.length; i++) {
|
|
33476
33413
|
if (i == e.length - 1) {
|
|
33477
33414
|
t.push(e.slice(n));
|
|
33478
33415
|
break;
|
|
@@ -33483,218 +33420,279 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33483
33420
|
}
|
|
33484
33421
|
}
|
|
33485
33422
|
return t;
|
|
33486
|
-
}
|
|
33487
|
-
}(
|
|
33423
|
+
}
|
|
33424
|
+
}();
|
|
33488
33425
|
function i(t, n, r) {
|
|
33489
33426
|
return e.sentenceDiff.diff(t, n, r);
|
|
33490
33427
|
}
|
|
33491
33428
|
})), Yd = /* @__PURE__ */ R(((e) => {
|
|
33492
|
-
var t = e && e.
|
|
33493
|
-
|
|
33494
|
-
|
|
33495
|
-
|
|
33496
|
-
|
|
33497
|
-
|
|
33498
|
-
|
|
33499
|
-
};
|
|
33500
|
-
return function(t, n) {
|
|
33501
|
-
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
33502
|
-
e(t, n);
|
|
33503
|
-
function r() {
|
|
33504
|
-
this.constructor = t;
|
|
33505
|
-
}
|
|
33506
|
-
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
33507
|
-
};
|
|
33508
|
-
})();
|
|
33509
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.cssDiff = void 0, e.diffCss = n, e.cssDiff = new (function(e) {
|
|
33510
|
-
t(n, e);
|
|
33511
|
-
function n() {
|
|
33512
|
-
return e !== null && e.apply(this, arguments) || this;
|
|
33513
|
-
}
|
|
33514
|
-
return n.prototype.tokenize = function(e) {
|
|
33429
|
+
var t = e && e.__importDefault || function(e) {
|
|
33430
|
+
return e && e.__esModule ? e : { default: e };
|
|
33431
|
+
};
|
|
33432
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.cssDiff = void 0, e.diffCss = r;
|
|
33433
|
+
var n = t(Hd());
|
|
33434
|
+
e.cssDiff = new class extends n.default {
|
|
33435
|
+
tokenize(e) {
|
|
33515
33436
|
return e.split(/([{}:;,]|\s+)/);
|
|
33516
|
-
}
|
|
33517
|
-
}(
|
|
33518
|
-
function
|
|
33437
|
+
}
|
|
33438
|
+
}();
|
|
33439
|
+
function r(t, n, r) {
|
|
33519
33440
|
return e.cssDiff.diff(t, n, r);
|
|
33520
33441
|
}
|
|
33521
33442
|
})), Xd = /* @__PURE__ */ R(((e) => {
|
|
33522
|
-
var t = e && e.
|
|
33523
|
-
|
|
33524
|
-
|
|
33525
|
-
e.__proto__ = t;
|
|
33526
|
-
} || function(e, t) {
|
|
33527
|
-
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
33528
|
-
}, e(t, n);
|
|
33529
|
-
};
|
|
33530
|
-
return function(t, n) {
|
|
33531
|
-
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
33532
|
-
e(t, n);
|
|
33533
|
-
function r() {
|
|
33534
|
-
this.constructor = t;
|
|
33535
|
-
}
|
|
33536
|
-
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
33537
|
-
};
|
|
33538
|
-
})();
|
|
33443
|
+
var t = e && e.__importDefault || function(e) {
|
|
33444
|
+
return e && e.__esModule ? e : { default: e };
|
|
33445
|
+
};
|
|
33539
33446
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.jsonDiff = void 0, e.diffJson = i, e.canonicalize = a;
|
|
33540
|
-
var n = Hd(), r = qd();
|
|
33541
|
-
e.jsonDiff = new
|
|
33542
|
-
|
|
33543
|
-
|
|
33544
|
-
var t = e !== null && e.apply(this, arguments) || this;
|
|
33545
|
-
return t.tokenize = r.tokenize, t;
|
|
33447
|
+
var n = t(Hd()), r = qd();
|
|
33448
|
+
e.jsonDiff = new class extends n.default {
|
|
33449
|
+
constructor() {
|
|
33450
|
+
super(...arguments), this.tokenize = r.tokenize;
|
|
33546
33451
|
}
|
|
33547
|
-
|
|
33548
|
-
|
|
33549
|
-
|
|
33550
|
-
|
|
33551
|
-
|
|
33552
|
-
|
|
33553
|
-
}
|
|
33554
|
-
|
|
33555
|
-
return
|
|
33556
|
-
|
|
33557
|
-
|
|
33558
|
-
}, n.prototype.equals = function(t, n, r) {
|
|
33559
|
-
return e.prototype.equals.call(this, t.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"), r);
|
|
33560
|
-
}, n;
|
|
33561
|
-
}(n.default))();
|
|
33452
|
+
get useLongestToken() {
|
|
33453
|
+
return !0;
|
|
33454
|
+
}
|
|
33455
|
+
castInput(e, t) {
|
|
33456
|
+
let { undefinedReplacement: n, stringifyReplacer: r = (e, t) => t === void 0 ? n : t } = t;
|
|
33457
|
+
return typeof e == "string" ? e : JSON.stringify(a(e, null, null, r), null, " ");
|
|
33458
|
+
}
|
|
33459
|
+
equals(e, t, n) {
|
|
33460
|
+
return super.equals(e.replace(/,([\r\n])/g, "$1"), t.replace(/,([\r\n])/g, "$1"), n);
|
|
33461
|
+
}
|
|
33462
|
+
}();
|
|
33562
33463
|
function i(t, n, r) {
|
|
33563
33464
|
return e.jsonDiff.diff(t, n, r);
|
|
33564
33465
|
}
|
|
33565
33466
|
function a(e, t, n, r, i) {
|
|
33566
33467
|
t ||= [], n ||= [], r && (e = r(i === void 0 ? "" : i, e));
|
|
33567
|
-
|
|
33468
|
+
let o;
|
|
33568
33469
|
for (o = 0; o < t.length; o += 1) if (t[o] === e) return n[o];
|
|
33569
|
-
|
|
33470
|
+
let s;
|
|
33570
33471
|
if (Object.prototype.toString.call(e) === "[object Array]") {
|
|
33571
33472
|
for (t.push(e), s = Array(e.length), n.push(s), o = 0; o < e.length; o += 1) s[o] = a(e[o], t, n, r, String(o));
|
|
33572
33473
|
return t.pop(), n.pop(), s;
|
|
33573
33474
|
}
|
|
33574
33475
|
if (e && e.toJSON && (e = e.toJSON()), typeof e == "object" && e) {
|
|
33575
33476
|
t.push(e), s = {}, n.push(s);
|
|
33576
|
-
|
|
33577
|
-
for (
|
|
33477
|
+
let i = [], c;
|
|
33478
|
+
for (c in e)
|
|
33578
33479
|
/* istanbul ignore else */
|
|
33579
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
33580
|
-
for (
|
|
33480
|
+
Object.prototype.hasOwnProperty.call(e, c) && i.push(c);
|
|
33481
|
+
for (i.sort(), o = 0; o < i.length; o += 1) c = i[o], s[c] = a(e[c], t, n, r, c);
|
|
33581
33482
|
t.pop(), n.pop();
|
|
33582
33483
|
} else s = e;
|
|
33583
33484
|
return s;
|
|
33584
33485
|
}
|
|
33585
33486
|
})), Zd = /* @__PURE__ */ R(((e) => {
|
|
33586
|
-
var t = e && e.
|
|
33587
|
-
|
|
33588
|
-
|
|
33589
|
-
|
|
33590
|
-
|
|
33591
|
-
|
|
33592
|
-
|
|
33593
|
-
};
|
|
33594
|
-
return function(t, n) {
|
|
33595
|
-
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
33596
|
-
e(t, n);
|
|
33597
|
-
function r() {
|
|
33598
|
-
this.constructor = t;
|
|
33599
|
-
}
|
|
33600
|
-
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
33601
|
-
};
|
|
33602
|
-
})();
|
|
33603
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.arrayDiff = void 0, e.diffArrays = n, e.arrayDiff = new (function(e) {
|
|
33604
|
-
t(n, e);
|
|
33605
|
-
function n() {
|
|
33606
|
-
return e !== null && e.apply(this, arguments) || this;
|
|
33607
|
-
}
|
|
33608
|
-
return n.prototype.tokenize = function(e) {
|
|
33487
|
+
var t = e && e.__importDefault || function(e) {
|
|
33488
|
+
return e && e.__esModule ? e : { default: e };
|
|
33489
|
+
};
|
|
33490
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.arrayDiff = void 0, e.diffArrays = r;
|
|
33491
|
+
var n = t(Hd());
|
|
33492
|
+
e.arrayDiff = new class extends n.default {
|
|
33493
|
+
tokenize(e) {
|
|
33609
33494
|
return e.slice();
|
|
33610
|
-
}
|
|
33495
|
+
}
|
|
33496
|
+
join(e) {
|
|
33611
33497
|
return e;
|
|
33612
|
-
}
|
|
33498
|
+
}
|
|
33499
|
+
removeEmpty(e) {
|
|
33613
33500
|
return e;
|
|
33614
|
-
}
|
|
33615
|
-
}(
|
|
33616
|
-
function
|
|
33501
|
+
}
|
|
33502
|
+
}();
|
|
33503
|
+
function r(t, n, r) {
|
|
33617
33504
|
return e.arrayDiff.diff(t, n, r);
|
|
33618
33505
|
}
|
|
33619
33506
|
})), Qd = /* @__PURE__ */ R(((e) => {
|
|
33620
|
-
|
|
33621
|
-
|
|
33622
|
-
|
|
33623
|
-
|
|
33624
|
-
}, t.apply(this, arguments);
|
|
33625
|
-
};
|
|
33626
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.unixToWin = n, e.winToUnix = r, e.isUnix = i, e.isWin = a;
|
|
33507
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.unixToWin = t, e.winToUnix = n, e.isUnix = r, e.isWin = i;
|
|
33508
|
+
function t(e) {
|
|
33509
|
+
return Array.isArray(e) ? e.map((e) => t(e)) : Object.assign(Object.assign({}, e), { hunks: e.hunks.map((e) => Object.assign(Object.assign({}, e), { lines: e.lines.map((t, n) => t.startsWith("\\") || t.endsWith("\r") || e.lines[n + 1]?.startsWith("\\") ? t : t + "\r") })) });
|
|
33510
|
+
}
|
|
33627
33511
|
function n(e) {
|
|
33628
|
-
return Array.isArray(e) ? e.map(
|
|
33629
|
-
return n(e);
|
|
33630
|
-
}) : t(t({}, e), { hunks: e.hunks.map(function(e) {
|
|
33631
|
-
return t(t({}, e), { lines: e.lines.map(function(t, n) {
|
|
33632
|
-
return t.startsWith("\\") || t.endsWith("\r") || e.lines[n + 1]?.startsWith("\\") ? t : t + "\r";
|
|
33633
|
-
}) });
|
|
33634
|
-
}) });
|
|
33512
|
+
return Array.isArray(e) ? e.map((e) => n(e)) : Object.assign(Object.assign({}, e), { hunks: e.hunks.map((e) => Object.assign(Object.assign({}, e), { lines: e.lines.map((e) => e.endsWith("\r") ? e.substring(0, e.length - 1) : e) })) });
|
|
33635
33513
|
}
|
|
33636
33514
|
function r(e) {
|
|
33637
|
-
return Array.isArray(e)
|
|
33638
|
-
return r(e);
|
|
33639
|
-
}) : t(t({}, e), { hunks: e.hunks.map(function(e) {
|
|
33640
|
-
return t(t({}, e), { lines: e.lines.map(function(e) {
|
|
33641
|
-
return e.endsWith("\r") ? e.substring(0, e.length - 1) : e;
|
|
33642
|
-
}) });
|
|
33643
|
-
}) });
|
|
33515
|
+
return Array.isArray(e) || (e = [e]), !e.some((e) => e.hunks.some((e) => e.lines.some((e) => !e.startsWith("\\") && e.endsWith("\r"))));
|
|
33644
33516
|
}
|
|
33645
33517
|
function i(e) {
|
|
33646
|
-
return Array.isArray(e) || (e = [e]),
|
|
33647
|
-
return e.hunks.some(function(e) {
|
|
33648
|
-
return e.lines.some(function(e) {
|
|
33649
|
-
return !e.startsWith("\\") && e.endsWith("\r");
|
|
33650
|
-
});
|
|
33651
|
-
});
|
|
33652
|
-
});
|
|
33653
|
-
}
|
|
33654
|
-
function a(e) {
|
|
33655
|
-
return Array.isArray(e) || (e = [e]), e.some(function(e) {
|
|
33656
|
-
return e.hunks.some(function(e) {
|
|
33657
|
-
return e.lines.some(function(e) {
|
|
33658
|
-
return e.endsWith("\r");
|
|
33659
|
-
});
|
|
33660
|
-
});
|
|
33661
|
-
}) && e.every(function(e) {
|
|
33662
|
-
return e.hunks.every(function(e) {
|
|
33663
|
-
return e.lines.every(function(t, n) {
|
|
33664
|
-
return t.startsWith("\\") || t.endsWith("\r") || e.lines[n + 1]?.startsWith("\\");
|
|
33665
|
-
});
|
|
33666
|
-
});
|
|
33667
|
-
});
|
|
33518
|
+
return Array.isArray(e) || (e = [e]), e.some((e) => e.hunks.some((e) => e.lines.some((e) => e.endsWith("\r")))) && e.every((e) => e.hunks.every((e) => e.lines.every((t, n) => t.startsWith("\\") || t.endsWith("\r") || e.lines[n + 1]?.startsWith("\\"))));
|
|
33668
33519
|
}
|
|
33669
33520
|
})), $d = /* @__PURE__ */ R(((e) => {
|
|
33670
33521
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.parsePatch = t;
|
|
33671
33522
|
function t(e) {
|
|
33672
|
-
|
|
33673
|
-
function i() {
|
|
33674
|
-
|
|
33675
|
-
for (n.push(e); r < t.length;) {
|
|
33676
|
-
var i = t[r];
|
|
33677
|
-
if (/^(---|\+\+\+|@@)\s/.test(i)) break;
|
|
33678
|
-
var s = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(i);
|
|
33679
|
-
s && (e.index = i.substring(s[0].length).trim()), r++;
|
|
33680
|
-
}
|
|
33681
|
-
for (a(e), a(e), e.hunks = []; r < t.length;) {
|
|
33682
|
-
var i = t[r];
|
|
33683
|
-
if (/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(i)) break;
|
|
33684
|
-
if (/^@@/.test(i)) e.hunks.push(o());
|
|
33685
|
-
else if (i) throw Error("Unknown line " + (r + 1) + " " + JSON.stringify(i));
|
|
33686
|
-
else r++;
|
|
33687
|
-
}
|
|
33523
|
+
let t = e.split(/\n/), n = [], r = 0;
|
|
33524
|
+
function i(e) {
|
|
33525
|
+
return /^diff --git /.test(e);
|
|
33688
33526
|
}
|
|
33689
33527
|
function a(e) {
|
|
33690
|
-
|
|
33528
|
+
return i(e) || /^Index:\s/.test(e) || /^diff(?: -r \w+)+\s/.test(e);
|
|
33529
|
+
}
|
|
33530
|
+
function o(e) {
|
|
33531
|
+
return /^(---|\+\+\+)\s/.test(e);
|
|
33532
|
+
}
|
|
33533
|
+
function s(e) {
|
|
33534
|
+
return /^@@\s/.test(e);
|
|
33535
|
+
}
|
|
33536
|
+
function c() {
|
|
33537
|
+
let e = {};
|
|
33538
|
+
e.hunks = [], n.push(e);
|
|
33539
|
+
let c = !1;
|
|
33540
|
+
for (; r < t.length;) {
|
|
33541
|
+
let n = t[r];
|
|
33542
|
+
if (o(n) || s(n)) break;
|
|
33543
|
+
if (i(n)) {
|
|
33544
|
+
if (c) return;
|
|
33545
|
+
c = !0, e.isGit = !0;
|
|
33546
|
+
let i = l(n);
|
|
33547
|
+
for (i && (e.oldFileName = i.oldFileName, e.newFileName = i.newFileName), r++; r < t.length;) {
|
|
33548
|
+
let n = t[r];
|
|
33549
|
+
if (o(n) || s(n) || a(n)) break;
|
|
33550
|
+
let i = /^rename from (.*)/.exec(n);
|
|
33551
|
+
i && (e.oldFileName = "a/" + u(i[1]), e.isRename = !0);
|
|
33552
|
+
let c = /^rename to (.*)/.exec(n);
|
|
33553
|
+
c && (e.newFileName = "b/" + u(c[1]), e.isRename = !0);
|
|
33554
|
+
let l = /^copy from (.*)/.exec(n);
|
|
33555
|
+
l && (e.oldFileName = "a/" + u(l[1]), e.isCopy = !0);
|
|
33556
|
+
let d = /^copy to (.*)/.exec(n);
|
|
33557
|
+
d && (e.newFileName = "b/" + u(d[1]), e.isCopy = !0);
|
|
33558
|
+
let f = /^new file mode (\d+)/.exec(n);
|
|
33559
|
+
f && (e.isCreate = !0, e.newMode = f[1]);
|
|
33560
|
+
let p = /^deleted file mode (\d+)/.exec(n);
|
|
33561
|
+
p && (e.isDelete = !0, e.oldMode = p[1]);
|
|
33562
|
+
let m = /^old mode (\d+)/.exec(n);
|
|
33563
|
+
m && (e.oldMode = m[1]);
|
|
33564
|
+
let h = /^new mode (\d+)/.exec(n);
|
|
33565
|
+
h && (e.newMode = h[1]), /^Binary files /.test(n) && (e.isBinary = !0), r++;
|
|
33566
|
+
}
|
|
33567
|
+
continue;
|
|
33568
|
+
} else if (a(n)) {
|
|
33569
|
+
if (c) return;
|
|
33570
|
+
c = !0;
|
|
33571
|
+
let t = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(n);
|
|
33572
|
+
t && (e.index = n.substring(t[0].length).trim());
|
|
33573
|
+
}
|
|
33574
|
+
r++;
|
|
33575
|
+
}
|
|
33576
|
+
if (f(e), f(e), e.oldFileName === void 0 != (e.newFileName === void 0)) throw Error("Missing " + (e.oldFileName === void 0 ? "\"--- ...\"" : "\"+++ ...\"") + " file header for " + (e.oldFileName ?? e.newFileName));
|
|
33577
|
+
for (; r < t.length;) {
|
|
33578
|
+
let n = t[r];
|
|
33579
|
+
if (a(n) || o(n) || /^===================================================================/.test(n)) break;
|
|
33580
|
+
s(n) ? e.hunks.push(p()) : r++;
|
|
33581
|
+
}
|
|
33582
|
+
}
|
|
33583
|
+
function l(e) {
|
|
33584
|
+
let t = e.substring(11);
|
|
33585
|
+
if (t.startsWith("\"")) {
|
|
33586
|
+
let e = d(t);
|
|
33587
|
+
if (e === null) return null;
|
|
33588
|
+
let n = t.substring(e.rawLength + 1), r;
|
|
33589
|
+
if (n.startsWith("\"")) {
|
|
33590
|
+
let e = d(n);
|
|
33591
|
+
if (e === null) return null;
|
|
33592
|
+
r = e.fileName;
|
|
33593
|
+
} else r = n;
|
|
33594
|
+
return {
|
|
33595
|
+
oldFileName: e.fileName,
|
|
33596
|
+
newFileName: r
|
|
33597
|
+
};
|
|
33598
|
+
}
|
|
33599
|
+
let n = t.indexOf("\"");
|
|
33600
|
+
if (n > 0) {
|
|
33601
|
+
let e = t.substring(0, n - 1), r = d(t.substring(n));
|
|
33602
|
+
return r === null ? null : {
|
|
33603
|
+
oldFileName: e,
|
|
33604
|
+
newFileName: r.fileName
|
|
33605
|
+
};
|
|
33606
|
+
}
|
|
33607
|
+
if (t.startsWith("a/")) {
|
|
33608
|
+
let e = [], n = 0;
|
|
33609
|
+
for (; n = t.indexOf(" b/", n + 1), n !== -1;) e.push(n);
|
|
33610
|
+
if (e.length > 0) {
|
|
33611
|
+
let n = e[Math.floor(e.length / 2)];
|
|
33612
|
+
return {
|
|
33613
|
+
oldFileName: t.substring(0, n),
|
|
33614
|
+
newFileName: t.substring(n + 1)
|
|
33615
|
+
};
|
|
33616
|
+
}
|
|
33617
|
+
}
|
|
33618
|
+
return null;
|
|
33619
|
+
}
|
|
33620
|
+
function u(e) {
|
|
33621
|
+
if (e.startsWith("\"")) {
|
|
33622
|
+
let t = d(e);
|
|
33623
|
+
if (t) return t.fileName;
|
|
33624
|
+
}
|
|
33625
|
+
return e;
|
|
33626
|
+
}
|
|
33627
|
+
function d(e) {
|
|
33628
|
+
if (!e.startsWith("\"")) return null;
|
|
33629
|
+
let t = "", n = 1;
|
|
33630
|
+
for (; n < e.length;) {
|
|
33631
|
+
if (e[n] === "\"") return {
|
|
33632
|
+
fileName: t,
|
|
33633
|
+
rawLength: n + 1
|
|
33634
|
+
};
|
|
33635
|
+
if (e[n] === "\\" && n + 1 < e.length) switch (n++, e[n]) {
|
|
33636
|
+
case "a":
|
|
33637
|
+
t += "\x07";
|
|
33638
|
+
break;
|
|
33639
|
+
case "b":
|
|
33640
|
+
t += "\b";
|
|
33641
|
+
break;
|
|
33642
|
+
case "f":
|
|
33643
|
+
t += "\f";
|
|
33644
|
+
break;
|
|
33645
|
+
case "n":
|
|
33646
|
+
t += "\n";
|
|
33647
|
+
break;
|
|
33648
|
+
case "r":
|
|
33649
|
+
t += "\r";
|
|
33650
|
+
break;
|
|
33651
|
+
case "t":
|
|
33652
|
+
t += " ";
|
|
33653
|
+
break;
|
|
33654
|
+
case "v":
|
|
33655
|
+
t += "\v";
|
|
33656
|
+
break;
|
|
33657
|
+
case "\\":
|
|
33658
|
+
t += "\\";
|
|
33659
|
+
break;
|
|
33660
|
+
case "\"":
|
|
33661
|
+
t += "\"";
|
|
33662
|
+
break;
|
|
33663
|
+
case "0":
|
|
33664
|
+
case "1":
|
|
33665
|
+
case "2":
|
|
33666
|
+
case "3":
|
|
33667
|
+
case "4":
|
|
33668
|
+
case "5":
|
|
33669
|
+
case "6":
|
|
33670
|
+
case "7": {
|
|
33671
|
+
if (n + 2 >= e.length || e[n + 1] < "0" || e[n + 1] > "7" || e[n + 2] < "0" || e[n + 2] > "7") return null;
|
|
33672
|
+
let r = [parseInt(e.substring(n, n + 3), 8)];
|
|
33673
|
+
for (n += 3; e[n] === "\\" && e[n + 1] >= "0" && e[n + 1] <= "7";) {
|
|
33674
|
+
if (n + 3 >= e.length || e[n + 2] < "0" || e[n + 2] > "7" || e[n + 3] < "0" || e[n + 3] > "7") return null;
|
|
33675
|
+
r.push(parseInt(e.substring(n + 1, n + 4), 8)), n += 4;
|
|
33676
|
+
}
|
|
33677
|
+
t += new TextDecoder("utf-8").decode(new Uint8Array(r));
|
|
33678
|
+
continue;
|
|
33679
|
+
}
|
|
33680
|
+
default: return null;
|
|
33681
|
+
}
|
|
33682
|
+
else t += e[n];
|
|
33683
|
+
n++;
|
|
33684
|
+
}
|
|
33685
|
+
return null;
|
|
33686
|
+
}
|
|
33687
|
+
function f(e) {
|
|
33688
|
+
let n = /^(---|\+\+\+)\s+/.exec(t[r]);
|
|
33691
33689
|
if (n) {
|
|
33692
|
-
|
|
33693
|
-
s
|
|
33690
|
+
let i = n[1], a = t[r].substring(3).trim().split(" ", 2), o = (a[1] || "").trim(), s = a[0];
|
|
33691
|
+
s = s.startsWith("\"") ? u(s) : s.replace(/\\\\/g, "\\"), i === "---" ? (e.oldFileName = s, e.oldHeader = o) : (e.newFileName = s, e.newHeader = o), r++;
|
|
33694
33692
|
}
|
|
33695
33693
|
}
|
|
33696
|
-
function
|
|
33697
|
-
|
|
33694
|
+
function p() {
|
|
33695
|
+
let e = r, n = t[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/), i = {
|
|
33698
33696
|
oldStart: +n[1],
|
|
33699
33697
|
oldLines: n[2] === void 0 ? 1 : +n[2],
|
|
33700
33698
|
newStart: +n[3],
|
|
@@ -33702,22 +33700,24 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33702
33700
|
lines: []
|
|
33703
33701
|
};
|
|
33704
33702
|
i.oldLines === 0 && (i.oldStart += 1), i.newLines === 0 && (i.newStart += 1);
|
|
33705
|
-
|
|
33706
|
-
|
|
33707
|
-
|
|
33703
|
+
let a = 0, s = 0;
|
|
33704
|
+
for (; r < t.length && (s < i.oldLines || a < i.newLines || t[r]?.startsWith("\\")); r++) {
|
|
33705
|
+
let n = t[r].length == 0 && r != t.length - 1 ? " " : t[r][0];
|
|
33706
|
+
if (n === "+" || n === "-" || n === " " || n === "\\") i.lines.push(t[r]), n === "+" ? a++ : n === "-" ? s++ : n === " " && (a++, s++);
|
|
33708
33707
|
else throw Error(`Hunk at line ${e + 1} contained invalid line ${t[r]}`);
|
|
33709
33708
|
}
|
|
33710
|
-
if (!a && i.newLines === 1 && (i.newLines = 0), !
|
|
33711
|
-
if (
|
|
33709
|
+
if (!a && i.newLines === 1 && (i.newLines = 0), !s && i.oldLines === 1 && (i.oldLines = 0), a !== i.newLines) throw Error("Added line count did not match for hunk at line " + (e + 1));
|
|
33710
|
+
if (s !== i.oldLines) throw Error("Removed line count did not match for hunk at line " + (e + 1));
|
|
33711
|
+
if (r < t.length && t[r] && /^[+ -]/.test(t[r]) && !o(t[r])) throw Error("Hunk at line " + (e + 1) + " has more lines than expected (expected " + i.oldLines + " old lines and " + i.newLines + " new lines)");
|
|
33712
33712
|
return i;
|
|
33713
33713
|
}
|
|
33714
|
-
for (; r < t.length;)
|
|
33714
|
+
for (; r < t.length;) c();
|
|
33715
33715
|
return n;
|
|
33716
33716
|
}
|
|
33717
33717
|
})), ef = /* @__PURE__ */ R(((e) => {
|
|
33718
33718
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = t;
|
|
33719
33719
|
function t(e, t, n) {
|
|
33720
|
-
|
|
33720
|
+
let r = !0, i = !1, a = !1, o = 1;
|
|
33721
33721
|
return function s() {
|
|
33722
33722
|
if (r && !a) {
|
|
33723
33723
|
if (i ? o++ : r = !1, e + o <= n) return e + o;
|
|
@@ -33727,24 +33727,25 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33727
33727
|
};
|
|
33728
33728
|
}
|
|
33729
33729
|
})), tf = /* @__PURE__ */ R(((e) => {
|
|
33730
|
-
|
|
33731
|
-
|
|
33732
|
-
|
|
33733
|
-
|
|
33734
|
-
|
|
33735
|
-
|
|
33736
|
-
|
|
33737
|
-
|
|
33738
|
-
|
|
33739
|
-
|
|
33740
|
-
|
|
33741
|
-
|
|
33742
|
-
|
|
33730
|
+
var t = e && e.__importDefault || function(e) {
|
|
33731
|
+
return e && e.__esModule ? e : { default: e };
|
|
33732
|
+
};
|
|
33733
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.applyPatch = o, e.applyPatches = c;
|
|
33734
|
+
var n = Wd(), r = Qd(), i = $d(), a = t(ef());
|
|
33735
|
+
function o(e, t, n = {}) {
|
|
33736
|
+
let r;
|
|
33737
|
+
if (r = typeof t == "string" ? (0, i.parsePatch)(t) : Array.isArray(t) ? t : [t], r.length > 1) throw Error("applyPatch only works with a single input.");
|
|
33738
|
+
return s(e, r[0], n);
|
|
33739
|
+
}
|
|
33740
|
+
function s(e, t, i = {}) {
|
|
33741
|
+
(i.autoConvertLineEndings || i.autoConvertLineEndings == null) && ((0, n.hasOnlyWinLineEndings)(e) && (0, r.isUnix)(t) ? t = (0, r.unixToWin)(t) : (0, n.hasOnlyUnixLineEndings)(e) && (0, r.isWin)(t) && (t = (0, r.winToUnix)(t)));
|
|
33742
|
+
let o = e.split("\n"), s = t.hunks, c = i.compareLine || ((e, t, n, r) => t === r), l = i.fuzzFactor || 0, u = 0;
|
|
33743
33743
|
if (l < 0 || !Number.isInteger(l)) throw Error("fuzzFactor must be a non-negative integer");
|
|
33744
33744
|
if (!s.length) return e;
|
|
33745
|
-
|
|
33746
|
-
|
|
33747
|
-
|
|
33745
|
+
let d = "", f = !1, p = !1;
|
|
33746
|
+
for (let e = 0; e < s[s.length - 1].lines.length; e++) {
|
|
33747
|
+
let t = s[s.length - 1].lines[e];
|
|
33748
|
+
t[0] == "\\" && (d[0] == "+" ? f = !0 : d[0] == "-" && (p = !0)), d = t;
|
|
33748
33749
|
}
|
|
33749
33750
|
if (f) {
|
|
33750
33751
|
if (p) {
|
|
@@ -33755,95 +33756,102 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33755
33756
|
if (o[o.length - 1] != "") o.push("");
|
|
33756
33757
|
else if (!l) return !1;
|
|
33757
33758
|
}
|
|
33758
|
-
function
|
|
33759
|
-
|
|
33760
|
-
for (
|
|
33761
|
-
|
|
33759
|
+
function m(e, t, n, r = 0, i = !0, a = [], s = 0) {
|
|
33760
|
+
let l = 0, u = !1;
|
|
33761
|
+
for (; r < e.length; r++) {
|
|
33762
|
+
let d = e[r], f = d.length > 0 ? d[0] : " ", p = d.length > 0 ? d.substr(1) : d;
|
|
33762
33763
|
if (f === "-") if (c(t + 1, o[t], f, p)) t++, l = 0;
|
|
33763
|
-
else return !n || o[t] == null ? null : (a[s] = o[t],
|
|
33764
|
+
else return !n || o[t] == null ? null : (a[s] = o[t], m(e, t + 1, n - 1, r, !1, a, s + 1));
|
|
33764
33765
|
if (f === "+") {
|
|
33765
33766
|
if (!i) return null;
|
|
33766
33767
|
a[s] = p, s++, l = 0, u = !0;
|
|
33767
33768
|
}
|
|
33768
33769
|
if (f === " ") if (l++, a[s] = o[t], c(t + 1, o[t], f, p)) s++, i = !0, u = !1, t++;
|
|
33769
|
-
else return u || !n ? null : o[t] && (
|
|
33770
|
+
else return u || !n ? null : o[t] && (m(e, t + 1, n - 1, r + 1, !1, a, s + 1) || m(e, t + 1, n - 1, r, !1, a, s + 1)) || m(e, t, n - 1, r + 1, !1, a, s);
|
|
33770
33771
|
}
|
|
33771
33772
|
return s -= l, t -= l, a.length = s, {
|
|
33772
33773
|
patchedLines: a,
|
|
33773
33774
|
oldLineLastI: t - 1
|
|
33774
33775
|
};
|
|
33775
33776
|
}
|
|
33776
|
-
|
|
33777
|
-
|
|
33778
|
-
|
|
33779
|
-
|
|
33780
|
-
|
|
33777
|
+
let h = [], g = 0;
|
|
33778
|
+
for (let e = 0; e < s.length; e++) {
|
|
33779
|
+
let t = s[e], n, r = o.length - t.oldLines + l, i;
|
|
33780
|
+
for (let e = 0; e <= l; e++) {
|
|
33781
|
+
i = t.oldStart + g - 1;
|
|
33782
|
+
let o = (0, a.default)(i, u, r);
|
|
33783
|
+
for (; i !== void 0 && (n = m(t.lines, i, e), !n); i = o());
|
|
33784
|
+
if (n) break;
|
|
33781
33785
|
}
|
|
33782
|
-
if (!
|
|
33783
|
-
for (
|
|
33784
|
-
for (
|
|
33785
|
-
|
|
33786
|
-
|
|
33786
|
+
if (!n) return !1;
|
|
33787
|
+
for (let e = u; e < i; e++) h.push(o[e]);
|
|
33788
|
+
for (let e = 0; e < n.patchedLines.length; e++) {
|
|
33789
|
+
let t = n.patchedLines[e];
|
|
33790
|
+
h.push(t);
|
|
33787
33791
|
}
|
|
33788
|
-
u =
|
|
33792
|
+
u = n.oldLineLastI + 1, g = i + 1 - t.oldStart;
|
|
33789
33793
|
}
|
|
33790
|
-
for (
|
|
33791
|
-
return
|
|
33794
|
+
for (let e = u; e < o.length; e++) h.push(o[e]);
|
|
33795
|
+
return h.join("\n");
|
|
33792
33796
|
}
|
|
33793
|
-
function
|
|
33794
|
-
|
|
33795
|
-
function
|
|
33796
|
-
|
|
33797
|
+
function c(e, t) {
|
|
33798
|
+
let n = typeof e == "string" ? (0, i.parsePatch)(e) : e, r = 0;
|
|
33799
|
+
function a() {
|
|
33800
|
+
let e = n[r++];
|
|
33797
33801
|
if (!e) return t.complete();
|
|
33798
33802
|
t.loadFile(e, function(n, r) {
|
|
33799
33803
|
if (n) return t.complete(n);
|
|
33800
|
-
|
|
33804
|
+
let i = o(r, e, t);
|
|
33801
33805
|
t.patched(e, i, function(e) {
|
|
33802
33806
|
if (e) return t.complete(e);
|
|
33803
|
-
|
|
33807
|
+
a();
|
|
33804
33808
|
});
|
|
33805
33809
|
});
|
|
33806
33810
|
}
|
|
33807
|
-
|
|
33811
|
+
a();
|
|
33808
33812
|
}
|
|
33809
33813
|
})), nf = /* @__PURE__ */ R(((e) => {
|
|
33810
|
-
var t = e && e.__assign || function() {
|
|
33811
|
-
return t = Object.assign || function(e) {
|
|
33812
|
-
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
33813
|
-
return e;
|
|
33814
|
-
}, t.apply(this, arguments);
|
|
33815
|
-
};
|
|
33816
33814
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.reversePatch = n;
|
|
33815
|
+
function t(e) {
|
|
33816
|
+
return e === void 0 || e === "/dev/null" ? e : e.startsWith("a/") ? "b/" + e.slice(2) : e.startsWith("b/") ? "a/" + e.slice(2) : e;
|
|
33817
|
+
}
|
|
33817
33818
|
function n(e) {
|
|
33818
|
-
|
|
33819
|
-
|
|
33820
|
-
|
|
33821
|
-
oldFileName: e.newFileName,
|
|
33819
|
+
if (Array.isArray(e)) return e.map((e) => n(e)).reverse();
|
|
33820
|
+
let r = Object.assign(Object.assign({}, e), {
|
|
33821
|
+
oldFileName: e.isGit ? t(e.newFileName) : e.newFileName,
|
|
33822
33822
|
oldHeader: e.newHeader,
|
|
33823
|
-
newFileName: e.oldFileName,
|
|
33823
|
+
newFileName: e.isGit ? t(e.oldFileName) : e.oldFileName,
|
|
33824
33824
|
newHeader: e.oldHeader,
|
|
33825
|
-
|
|
33826
|
-
|
|
33827
|
-
|
|
33828
|
-
|
|
33829
|
-
|
|
33830
|
-
|
|
33831
|
-
|
|
33832
|
-
|
|
33833
|
-
|
|
33834
|
-
}
|
|
33835
|
-
})
|
|
33825
|
+
oldMode: e.newMode,
|
|
33826
|
+
newMode: e.oldMode,
|
|
33827
|
+
isCreate: e.isDelete,
|
|
33828
|
+
isDelete: e.isCreate,
|
|
33829
|
+
hunks: e.hunks.map((e) => ({
|
|
33830
|
+
oldLines: e.newLines,
|
|
33831
|
+
oldStart: e.newStart,
|
|
33832
|
+
newLines: e.oldLines,
|
|
33833
|
+
newStart: e.oldStart,
|
|
33834
|
+
lines: e.lines.map((e) => e.startsWith("-") ? `+${e.slice(1)}` : e.startsWith("+") ? `-${e.slice(1)}` : e)
|
|
33835
|
+
}))
|
|
33836
33836
|
});
|
|
33837
|
+
return e.isCopy && (r.newFileName = "/dev/null", r.newHeader = void 0, r.isDelete = !0, delete r.isCreate, delete r.isCopy, delete r.isRename, r.hunks = []), r;
|
|
33837
33838
|
}
|
|
33838
33839
|
})), rf = /* @__PURE__ */ R(((e) => {
|
|
33839
|
-
|
|
33840
|
-
|
|
33841
|
-
|
|
33842
|
-
|
|
33843
|
-
|
|
33844
|
-
}
|
|
33845
|
-
|
|
33846
|
-
|
|
33840
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.OMIT_HEADERS = e.FILE_HEADERS_ONLY = e.INCLUDE_HEADERS = void 0, e.structuredPatch = i, e.formatPatch = a, e.createTwoFilesPatch = o, e.createPatch = s;
|
|
33841
|
+
var t = qd();
|
|
33842
|
+
function n(e) {
|
|
33843
|
+
for (let t = 0; t < e.length; t++) if (e[t] < " " || e[t] > "~" || e[t] === "\"" || e[t] === "\\") return !0;
|
|
33844
|
+
return !1;
|
|
33845
|
+
}
|
|
33846
|
+
function r(e) {
|
|
33847
|
+
if (!n(e)) return e;
|
|
33848
|
+
let t = "\"", r = new TextEncoder().encode(e), i = 0;
|
|
33849
|
+
for (; i < r.length;) {
|
|
33850
|
+
let e = r[i];
|
|
33851
|
+
e === 7 ? t += "\\a" : e === 8 ? t += "\\b" : e === 9 ? t += "\\t" : e === 10 ? t += "\\n" : e === 11 ? t += "\\v" : e === 12 ? t += "\\f" : e === 13 ? t += "\\r" : e === 34 ? t += "\\\"" : e === 92 ? t += "\\\\" : e >= 32 && e <= 126 ? t += String.fromCharCode(e) : t += "\\" + e.toString(8).padStart(3, "0"), i++;
|
|
33852
|
+
}
|
|
33853
|
+
return t += "\"", t;
|
|
33854
|
+
}
|
|
33847
33855
|
e.INCLUDE_HEADERS = {
|
|
33848
33856
|
includeIndex: !0,
|
|
33849
33857
|
includeUnderline: !0,
|
|
@@ -33857,311 +33865,309 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
33857
33865
|
includeUnderline: !1,
|
|
33858
33866
|
includeFileHeaders: !1
|
|
33859
33867
|
};
|
|
33860
|
-
function
|
|
33861
|
-
|
|
33862
|
-
|
|
33863
|
-
|
|
33864
|
-
if (
|
|
33865
|
-
if (
|
|
33866
|
-
|
|
33867
|
-
(0,
|
|
33868
|
-
|
|
33868
|
+
function i(e, n, r, i, a, o, s) {
|
|
33869
|
+
let l;
|
|
33870
|
+
l = s ? typeof s == "function" ? { callback: s } : s : {}, l.context === void 0 && (l.context = 4);
|
|
33871
|
+
let u = l.context;
|
|
33872
|
+
if (l.newlineIsToken) throw Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");
|
|
33873
|
+
if (l.callback) {
|
|
33874
|
+
let { callback: e } = l;
|
|
33875
|
+
(0, t.diffLines)(r, i, Object.assign(Object.assign({}, l), { callback: (t) => {
|
|
33876
|
+
e(d(t));
|
|
33869
33877
|
} }));
|
|
33870
|
-
} else return
|
|
33871
|
-
function
|
|
33878
|
+
} else return d((0, t.diffLines)(r, i, l));
|
|
33879
|
+
function d(t) {
|
|
33872
33880
|
if (!t) return;
|
|
33873
33881
|
t.push({
|
|
33874
33882
|
value: "",
|
|
33875
33883
|
lines: []
|
|
33876
33884
|
});
|
|
33877
|
-
function
|
|
33885
|
+
function r(e) {
|
|
33878
33886
|
return e.map(function(e) {
|
|
33879
33887
|
return " " + e;
|
|
33880
33888
|
});
|
|
33881
33889
|
}
|
|
33882
|
-
|
|
33883
|
-
|
|
33884
|
-
|
|
33885
|
-
|
|
33886
|
-
|
|
33887
|
-
|
|
33888
|
-
|
|
33889
|
-
for (var v = 0, y = g; v < y.length; v++) {
|
|
33890
|
-
var b = y[v];
|
|
33891
|
-
u.push((h.added ? "+" : "-") + b);
|
|
33890
|
+
let i = [], s = 0, l = 0, d = [], f = 1, p = 1;
|
|
33891
|
+
for (let e = 0; e < t.length; e++) {
|
|
33892
|
+
let n = t[e], a = n.lines || c(n.value);
|
|
33893
|
+
if (n.lines = a, n.added || n.removed) {
|
|
33894
|
+
if (!s) {
|
|
33895
|
+
let n = t[e - 1];
|
|
33896
|
+
s = f, l = p, n && (d = u > 0 ? r(n.lines.slice(-u)) : [], s -= d.length, l -= d.length);
|
|
33892
33897
|
}
|
|
33893
|
-
|
|
33898
|
+
for (let e of a) d.push((n.added ? "+" : "-") + e);
|
|
33899
|
+
n.added ? p += a.length : f += a.length;
|
|
33894
33900
|
} else {
|
|
33895
|
-
if (
|
|
33896
|
-
var b = S[x];
|
|
33897
|
-
u.push(b);
|
|
33898
|
-
}
|
|
33901
|
+
if (s) if (a.length <= u * 2 && e < t.length - 2) for (let e of r(a)) d.push(e);
|
|
33899
33902
|
else {
|
|
33900
|
-
|
|
33901
|
-
|
|
33902
|
-
|
|
33903
|
-
|
|
33904
|
-
|
|
33905
|
-
oldStart: a,
|
|
33906
|
-
oldLines: f - a + C,
|
|
33903
|
+
let e = Math.min(a.length, u);
|
|
33904
|
+
for (let t of r(a.slice(0, e))) d.push(t);
|
|
33905
|
+
let t = {
|
|
33906
|
+
oldStart: s,
|
|
33907
|
+
oldLines: f - s + e,
|
|
33907
33908
|
newStart: l,
|
|
33908
|
-
newLines: p - l +
|
|
33909
|
-
lines:
|
|
33909
|
+
newLines: p - l + e,
|
|
33910
|
+
lines: d
|
|
33910
33911
|
};
|
|
33911
|
-
i.push(
|
|
33912
|
+
i.push(t), s = 0, l = 0, d = [];
|
|
33912
33913
|
}
|
|
33913
|
-
f +=
|
|
33914
|
+
f += a.length, p += a.length;
|
|
33914
33915
|
}
|
|
33915
33916
|
}
|
|
33916
|
-
for (
|
|
33917
|
+
for (let e of i) for (let t = 0; t < e.lines.length; t++) e.lines[t].endsWith("\n") ? e.lines[t] = e.lines[t].slice(0, -1) : (e.lines.splice(t + 1, 0, "\"), t++);
|
|
33917
33918
|
return {
|
|
33918
33919
|
oldFileName: e,
|
|
33919
|
-
newFileName:
|
|
33920
|
-
oldHeader:
|
|
33921
|
-
newHeader:
|
|
33920
|
+
newFileName: n,
|
|
33921
|
+
oldHeader: a,
|
|
33922
|
+
newHeader: o,
|
|
33922
33923
|
hunks: i
|
|
33923
33924
|
};
|
|
33924
33925
|
}
|
|
33925
33926
|
}
|
|
33926
|
-
function
|
|
33927
|
+
function a(t, n) {
|
|
33927
33928
|
if (n ||= e.INCLUDE_HEADERS, Array.isArray(t)) {
|
|
33928
|
-
if (t.length > 1 && !n.includeFileHeaders) throw Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");
|
|
33929
|
-
return t.map(
|
|
33930
|
-
|
|
33931
|
-
|
|
33932
|
-
|
|
33933
|
-
|
|
33934
|
-
|
|
33935
|
-
|
|
33936
|
-
|
|
33937
|
-
|
|
33938
|
-
|
|
33939
|
-
|
|
33940
|
-
|
|
33941
|
-
|
|
33942
|
-
|
|
33943
|
-
|
|
33944
|
-
|
|
33945
|
-
|
|
33946
|
-
|
|
33947
|
-
|
|
33948
|
-
|
|
33949
|
-
|
|
33929
|
+
if (t.length > 1 && !n.includeFileHeaders && !t.every((e) => e.isGit)) throw Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");
|
|
33930
|
+
return t.map((e) => a(e, n)).join("\n");
|
|
33931
|
+
}
|
|
33932
|
+
let i = [];
|
|
33933
|
+
if (t.isGit) {
|
|
33934
|
+
if (n = e.INCLUDE_HEADERS, !t.oldFileName) throw Error("oldFileName must be specified for Git patches");
|
|
33935
|
+
if (!t.newFileName) throw Error("newFileName must be specified for Git patches");
|
|
33936
|
+
let a = t.oldFileName, o = t.newFileName;
|
|
33937
|
+
t.isCreate && a === "/dev/null" ? a = o.replace(/^b\//, "a/") : t.isDelete && o === "/dev/null" && (o = a.replace(/^a\//, "b/")), i.push("diff --git " + r(a) + " " + r(o)), t.isDelete && i.push("deleted file mode " + (t.oldMode ?? "100644")), t.isCreate && i.push("new file mode " + (t.newMode ?? "100644")), t.oldMode && t.newMode && !t.isDelete && !t.isCreate && (i.push("old mode " + t.oldMode), i.push("new mode " + t.newMode)), t.isRename && (i.push("rename from " + r((t.oldFileName ?? "").replace(/^a\//, ""))), i.push("rename to " + r((t.newFileName ?? "").replace(/^b\//, "")))), t.isCopy && (i.push("copy from " + r((t.oldFileName ?? "").replace(/^a\//, ""))), i.push("copy to " + r((t.newFileName ?? "").replace(/^b\//, ""))));
|
|
33938
|
+
} else n.includeIndex && t.oldFileName == t.newFileName && t.oldFileName !== void 0 && i.push("Index: " + t.oldFileName), n.includeUnderline && i.push("===================================================================");
|
|
33939
|
+
let o = t.hunks.length > 0;
|
|
33940
|
+
n.includeFileHeaders && t.oldFileName !== void 0 && t.newFileName !== void 0 && (!t.isGit || o) && (i.push("--- " + r(t.oldFileName) + (t.oldHeader ? " " + t.oldHeader : "")), i.push("+++ " + r(t.newFileName) + (t.newHeader ? " " + t.newHeader : "")));
|
|
33941
|
+
for (let e = 0; e < t.hunks.length; e++) {
|
|
33942
|
+
let n = t.hunks[e], r = n.oldLines === 0 ? n.oldStart - 1 : n.oldStart, a = n.newLines === 0 ? n.newStart - 1 : n.newStart;
|
|
33943
|
+
i.push("@@ -" + r + "," + n.oldLines + " +" + a + "," + n.newLines + " @@");
|
|
33944
|
+
for (let e of n.lines) i.push(e);
|
|
33945
|
+
}
|
|
33946
|
+
return i.join("\n") + "\n";
|
|
33947
|
+
}
|
|
33948
|
+
function o(e, t, n, r, o, s, c) {
|
|
33949
|
+
if (typeof c == "function" && (c = { callback: c }), c?.callback) {
|
|
33950
|
+
let { callback: l } = c;
|
|
33951
|
+
i(e, t, n, r, o, s, Object.assign(Object.assign({}, c), { callback: (e) => {
|
|
33952
|
+
l(e ? a(e, c.headerOptions) : void 0);
|
|
33950
33953
|
} }));
|
|
33951
33954
|
} else {
|
|
33952
|
-
|
|
33953
|
-
return
|
|
33955
|
+
let l = i(e, t, n, r, o, s, c);
|
|
33956
|
+
return l ? a(l, c?.headerOptions) : void 0;
|
|
33954
33957
|
}
|
|
33955
33958
|
}
|
|
33956
|
-
function
|
|
33957
|
-
return
|
|
33959
|
+
function s(e, t, n, r, i, a) {
|
|
33960
|
+
return o(e, e, t, n, r, i, a);
|
|
33958
33961
|
}
|
|
33959
|
-
function
|
|
33960
|
-
|
|
33961
|
-
return e + "\n";
|
|
33962
|
-
});
|
|
33962
|
+
function c(e) {
|
|
33963
|
+
let t = e.endsWith("\n"), n = e.split("\n").map((e) => e + "\n");
|
|
33963
33964
|
return t ? n.pop() : n.push(n.pop().slice(0, -1)), n;
|
|
33964
33965
|
}
|
|
33965
33966
|
})), af = /* @__PURE__ */ R(((e) => {
|
|
33966
33967
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.convertChangesToDMP = t;
|
|
33967
33968
|
function t(e) {
|
|
33968
|
-
|
|
33969
|
+
let t = [], n, r;
|
|
33970
|
+
for (let i = 0; i < e.length; i++) n = e[i], r = n.added ? 1 : n.removed ? -1 : 0, t.push([r, n.value]);
|
|
33969
33971
|
return t;
|
|
33970
33972
|
}
|
|
33971
33973
|
})), of = /* @__PURE__ */ R(((e) => {
|
|
33972
33974
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.convertChangesToXML = t;
|
|
33973
33975
|
function t(e) {
|
|
33974
|
-
|
|
33975
|
-
|
|
33976
|
+
let t = [];
|
|
33977
|
+
for (let r = 0; r < e.length; r++) {
|
|
33978
|
+
let i = e[r];
|
|
33976
33979
|
i.added ? t.push("<ins>") : i.removed && t.push("<del>"), t.push(n(i.value)), i.added ? t.push("</ins>") : i.removed && t.push("</del>");
|
|
33977
33980
|
}
|
|
33978
33981
|
return t.join("");
|
|
33979
33982
|
}
|
|
33980
33983
|
function n(e) {
|
|
33981
|
-
|
|
33984
|
+
let t = e;
|
|
33982
33985
|
return t = t.replace(/&/g, "&"), t = t.replace(/</g, "<"), t = t.replace(/>/g, ">"), t = t.replace(/"/g, """), t;
|
|
33983
33986
|
}
|
|
33984
33987
|
})), sf = /* @__PURE__ */ R(((e) => {
|
|
33985
|
-
|
|
33986
|
-
|
|
33988
|
+
var t = e && e.__importDefault || function(e) {
|
|
33989
|
+
return e && e.__esModule ? e : { default: e };
|
|
33990
|
+
};
|
|
33991
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.canonicalize = e.convertChangesToXML = e.convertChangesToDMP = e.reversePatch = e.parsePatch = e.applyPatches = e.applyPatch = e.OMIT_HEADERS = e.FILE_HEADERS_ONLY = e.INCLUDE_HEADERS = e.formatPatch = e.createPatch = e.createTwoFilesPatch = e.structuredPatch = e.arrayDiff = e.diffArrays = e.jsonDiff = e.diffJson = e.cssDiff = e.diffCss = e.sentenceDiff = e.diffSentences = e.diffTrimmedLines = e.lineDiff = e.diffLines = e.wordsWithSpaceDiff = e.diffWordsWithSpace = e.wordDiff = e.diffWords = e.characterDiff = e.diffChars = e.Diff = void 0, e.Diff = t(Hd()).default;
|
|
33992
|
+
var n = Ud();
|
|
33987
33993
|
Object.defineProperty(e, "diffChars", {
|
|
33988
33994
|
enumerable: !0,
|
|
33989
33995
|
get: function() {
|
|
33990
|
-
return
|
|
33996
|
+
return n.diffChars;
|
|
33991
33997
|
}
|
|
33992
33998
|
}), Object.defineProperty(e, "characterDiff", {
|
|
33993
33999
|
enumerable: !0,
|
|
33994
34000
|
get: function() {
|
|
33995
|
-
return
|
|
34001
|
+
return n.characterDiff;
|
|
33996
34002
|
}
|
|
33997
34003
|
});
|
|
33998
|
-
var
|
|
34004
|
+
var r = Gd();
|
|
33999
34005
|
Object.defineProperty(e, "diffWords", {
|
|
34000
34006
|
enumerable: !0,
|
|
34001
34007
|
get: function() {
|
|
34002
|
-
return
|
|
34008
|
+
return r.diffWords;
|
|
34003
34009
|
}
|
|
34004
34010
|
}), Object.defineProperty(e, "diffWordsWithSpace", {
|
|
34005
34011
|
enumerable: !0,
|
|
34006
34012
|
get: function() {
|
|
34007
|
-
return
|
|
34013
|
+
return r.diffWordsWithSpace;
|
|
34008
34014
|
}
|
|
34009
34015
|
}), Object.defineProperty(e, "wordDiff", {
|
|
34010
34016
|
enumerable: !0,
|
|
34011
34017
|
get: function() {
|
|
34012
|
-
return
|
|
34018
|
+
return r.wordDiff;
|
|
34013
34019
|
}
|
|
34014
34020
|
}), Object.defineProperty(e, "wordsWithSpaceDiff", {
|
|
34015
34021
|
enumerable: !0,
|
|
34016
34022
|
get: function() {
|
|
34017
|
-
return
|
|
34023
|
+
return r.wordsWithSpaceDiff;
|
|
34018
34024
|
}
|
|
34019
34025
|
});
|
|
34020
|
-
var
|
|
34026
|
+
var i = qd();
|
|
34021
34027
|
Object.defineProperty(e, "diffLines", {
|
|
34022
34028
|
enumerable: !0,
|
|
34023
34029
|
get: function() {
|
|
34024
|
-
return
|
|
34030
|
+
return i.diffLines;
|
|
34025
34031
|
}
|
|
34026
34032
|
}), Object.defineProperty(e, "diffTrimmedLines", {
|
|
34027
34033
|
enumerable: !0,
|
|
34028
34034
|
get: function() {
|
|
34029
|
-
return
|
|
34035
|
+
return i.diffTrimmedLines;
|
|
34030
34036
|
}
|
|
34031
34037
|
}), Object.defineProperty(e, "lineDiff", {
|
|
34032
34038
|
enumerable: !0,
|
|
34033
34039
|
get: function() {
|
|
34034
|
-
return
|
|
34040
|
+
return i.lineDiff;
|
|
34035
34041
|
}
|
|
34036
34042
|
});
|
|
34037
|
-
var
|
|
34043
|
+
var a = Jd();
|
|
34038
34044
|
Object.defineProperty(e, "diffSentences", {
|
|
34039
34045
|
enumerable: !0,
|
|
34040
34046
|
get: function() {
|
|
34041
|
-
return
|
|
34047
|
+
return a.diffSentences;
|
|
34042
34048
|
}
|
|
34043
34049
|
}), Object.defineProperty(e, "sentenceDiff", {
|
|
34044
34050
|
enumerable: !0,
|
|
34045
34051
|
get: function() {
|
|
34046
|
-
return
|
|
34052
|
+
return a.sentenceDiff;
|
|
34047
34053
|
}
|
|
34048
34054
|
});
|
|
34049
|
-
var
|
|
34055
|
+
var o = Yd();
|
|
34050
34056
|
Object.defineProperty(e, "diffCss", {
|
|
34051
34057
|
enumerable: !0,
|
|
34052
34058
|
get: function() {
|
|
34053
|
-
return
|
|
34059
|
+
return o.diffCss;
|
|
34054
34060
|
}
|
|
34055
34061
|
}), Object.defineProperty(e, "cssDiff", {
|
|
34056
34062
|
enumerable: !0,
|
|
34057
34063
|
get: function() {
|
|
34058
|
-
return
|
|
34064
|
+
return o.cssDiff;
|
|
34059
34065
|
}
|
|
34060
34066
|
});
|
|
34061
|
-
var
|
|
34067
|
+
var s = Xd();
|
|
34062
34068
|
Object.defineProperty(e, "diffJson", {
|
|
34063
34069
|
enumerable: !0,
|
|
34064
34070
|
get: function() {
|
|
34065
|
-
return
|
|
34071
|
+
return s.diffJson;
|
|
34066
34072
|
}
|
|
34067
34073
|
}), Object.defineProperty(e, "canonicalize", {
|
|
34068
34074
|
enumerable: !0,
|
|
34069
34075
|
get: function() {
|
|
34070
|
-
return
|
|
34076
|
+
return s.canonicalize;
|
|
34071
34077
|
}
|
|
34072
34078
|
}), Object.defineProperty(e, "jsonDiff", {
|
|
34073
34079
|
enumerable: !0,
|
|
34074
34080
|
get: function() {
|
|
34075
|
-
return
|
|
34081
|
+
return s.jsonDiff;
|
|
34076
34082
|
}
|
|
34077
34083
|
});
|
|
34078
|
-
var
|
|
34084
|
+
var c = Zd();
|
|
34079
34085
|
Object.defineProperty(e, "diffArrays", {
|
|
34080
34086
|
enumerable: !0,
|
|
34081
34087
|
get: function() {
|
|
34082
|
-
return
|
|
34088
|
+
return c.diffArrays;
|
|
34083
34089
|
}
|
|
34084
34090
|
}), Object.defineProperty(e, "arrayDiff", {
|
|
34085
34091
|
enumerable: !0,
|
|
34086
34092
|
get: function() {
|
|
34087
|
-
return
|
|
34093
|
+
return c.arrayDiff;
|
|
34088
34094
|
}
|
|
34089
34095
|
});
|
|
34090
|
-
var
|
|
34096
|
+
var l = tf();
|
|
34091
34097
|
Object.defineProperty(e, "applyPatch", {
|
|
34092
34098
|
enumerable: !0,
|
|
34093
34099
|
get: function() {
|
|
34094
|
-
return
|
|
34100
|
+
return l.applyPatch;
|
|
34095
34101
|
}
|
|
34096
34102
|
}), Object.defineProperty(e, "applyPatches", {
|
|
34097
34103
|
enumerable: !0,
|
|
34098
34104
|
get: function() {
|
|
34099
|
-
return
|
|
34105
|
+
return l.applyPatches;
|
|
34100
34106
|
}
|
|
34101
34107
|
});
|
|
34102
|
-
var
|
|
34108
|
+
var u = $d();
|
|
34103
34109
|
Object.defineProperty(e, "parsePatch", {
|
|
34104
34110
|
enumerable: !0,
|
|
34105
34111
|
get: function() {
|
|
34106
|
-
return
|
|
34112
|
+
return u.parsePatch;
|
|
34107
34113
|
}
|
|
34108
34114
|
});
|
|
34109
|
-
var
|
|
34115
|
+
var d = nf();
|
|
34110
34116
|
Object.defineProperty(e, "reversePatch", {
|
|
34111
34117
|
enumerable: !0,
|
|
34112
34118
|
get: function() {
|
|
34113
|
-
return
|
|
34119
|
+
return d.reversePatch;
|
|
34114
34120
|
}
|
|
34115
34121
|
});
|
|
34116
|
-
var
|
|
34122
|
+
var f = rf();
|
|
34117
34123
|
Object.defineProperty(e, "structuredPatch", {
|
|
34118
34124
|
enumerable: !0,
|
|
34119
34125
|
get: function() {
|
|
34120
|
-
return
|
|
34126
|
+
return f.structuredPatch;
|
|
34121
34127
|
}
|
|
34122
34128
|
}), Object.defineProperty(e, "createTwoFilesPatch", {
|
|
34123
34129
|
enumerable: !0,
|
|
34124
34130
|
get: function() {
|
|
34125
|
-
return
|
|
34131
|
+
return f.createTwoFilesPatch;
|
|
34126
34132
|
}
|
|
34127
34133
|
}), Object.defineProperty(e, "createPatch", {
|
|
34128
34134
|
enumerable: !0,
|
|
34129
34135
|
get: function() {
|
|
34130
|
-
return
|
|
34136
|
+
return f.createPatch;
|
|
34131
34137
|
}
|
|
34132
34138
|
}), Object.defineProperty(e, "formatPatch", {
|
|
34133
34139
|
enumerable: !0,
|
|
34134
34140
|
get: function() {
|
|
34135
|
-
return
|
|
34141
|
+
return f.formatPatch;
|
|
34136
34142
|
}
|
|
34137
34143
|
}), Object.defineProperty(e, "INCLUDE_HEADERS", {
|
|
34138
34144
|
enumerable: !0,
|
|
34139
34145
|
get: function() {
|
|
34140
|
-
return
|
|
34146
|
+
return f.INCLUDE_HEADERS;
|
|
34141
34147
|
}
|
|
34142
34148
|
}), Object.defineProperty(e, "FILE_HEADERS_ONLY", {
|
|
34143
34149
|
enumerable: !0,
|
|
34144
34150
|
get: function() {
|
|
34145
|
-
return
|
|
34151
|
+
return f.FILE_HEADERS_ONLY;
|
|
34146
34152
|
}
|
|
34147
34153
|
}), Object.defineProperty(e, "OMIT_HEADERS", {
|
|
34148
34154
|
enumerable: !0,
|
|
34149
34155
|
get: function() {
|
|
34150
|
-
return
|
|
34156
|
+
return f.OMIT_HEADERS;
|
|
34151
34157
|
}
|
|
34152
34158
|
});
|
|
34153
|
-
var
|
|
34159
|
+
var p = af();
|
|
34154
34160
|
Object.defineProperty(e, "convertChangesToDMP", {
|
|
34155
34161
|
enumerable: !0,
|
|
34156
34162
|
get: function() {
|
|
34157
|
-
return
|
|
34163
|
+
return p.convertChangesToDMP;
|
|
34158
34164
|
}
|
|
34159
34165
|
});
|
|
34160
|
-
var
|
|
34166
|
+
var m = of();
|
|
34161
34167
|
Object.defineProperty(e, "convertChangesToXML", {
|
|
34162
34168
|
enumerable: !0,
|
|
34163
34169
|
get: function() {
|
|
34164
|
-
return
|
|
34170
|
+
return m.convertChangesToXML;
|
|
34165
34171
|
}
|
|
34166
34172
|
});
|
|
34167
34173
|
})), cf = /* @__PURE__ */ R(((e, t) => {
|
|
@@ -41487,7 +41493,7 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
41487
41493
|
}), i.bind(s, o);
|
|
41488
41494
|
}
|
|
41489
41495
|
function o(e, t) {
|
|
41490
|
-
return e < t ? -1 : e > t
|
|
41496
|
+
return e < t ? -1 : +(e > t);
|
|
41491
41497
|
}
|
|
41492
41498
|
function s(e, t) {
|
|
41493
41499
|
return -1 * o(e, t);
|
|
@@ -44783,7 +44789,7 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
44783
44789
|
return;
|
|
44784
44790
|
}
|
|
44785
44791
|
if (a) {
|
|
44786
|
-
|
|
44792
|
+
let t = async () => {
|
|
44787
44793
|
try {
|
|
44788
44794
|
for (let e of this.options.hooks.beforeRetry) await e(this.options, r, n);
|
|
44789
44795
|
} catch (t) {
|
|
@@ -44791,7 +44797,8 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
44791
44797
|
return;
|
|
44792
44798
|
}
|
|
44793
44799
|
this.destroyed || (this.destroy(), this.emit("retry", n, e));
|
|
44794
|
-
}
|
|
44800
|
+
};
|
|
44801
|
+
this[U] = setTimeout(t, a);
|
|
44795
44802
|
return;
|
|
44796
44803
|
}
|
|
44797
44804
|
}
|
|
@@ -44860,7 +44867,7 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
44860
44867
|
}
|
|
44861
44868
|
get downloadProgress() {
|
|
44862
44869
|
let e;
|
|
44863
|
-
return e = this[j] ? this[M] / this[j] : this[j] === this[M]
|
|
44870
|
+
return e = this[j] ? this[M] / this[j] : +(this[j] === this[M]), {
|
|
44864
44871
|
percent: e,
|
|
44865
44872
|
transferred: this[M],
|
|
44866
44873
|
total: this[j]
|
|
@@ -44868,7 +44875,7 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
44868
44875
|
}
|
|
44869
44876
|
get uploadProgress() {
|
|
44870
44877
|
let e;
|
|
44871
|
-
return e = this[N] ? this[ee] / this[N] : this[N] === this[ee]
|
|
44878
|
+
return e = this[N] ? this[ee] / this[N] : +(this[N] === this[ee]), {
|
|
44872
44879
|
percent: e,
|
|
44873
44880
|
transferred: this[ee],
|
|
44874
44881
|
total: this[N]
|
|
@@ -45317,7 +45324,7 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
45317
45324
|
types: () => _m,
|
|
45318
45325
|
version: () => mm
|
|
45319
45326
|
}), pm, mm, hm, gm, _m, vm, ym, bm, xm, Sm, Cm, wm, Tm, Em, Dm, Om = L((() => {
|
|
45320
|
-
pm = "@neonwilderness/twoday", mm = "0.
|
|
45327
|
+
pm = "@neonwilderness/twoday", mm = "0.8.0", hm = "Module to help interact with the most relevant functions of the Twoday blogger platform", gm = "./src/index.js", _m = "./types/index.d.ts", vm = [
|
|
45321
45328
|
"src",
|
|
45322
45329
|
"docs",
|
|
45323
45330
|
"types",
|
|
@@ -45339,7 +45346,7 @@ Content-Type: ${s.type || "application/octet-stream"}\r\n\r\n`);
|
|
|
45339
45346
|
}, Em = {
|
|
45340
45347
|
chalk: "^4.1.2",
|
|
45341
45348
|
cheerio: "^1.2.0",
|
|
45342
|
-
diff: "^
|
|
45349
|
+
diff: "^9.0.0",
|
|
45343
45350
|
"form-data": "^4.0.5",
|
|
45344
45351
|
got: "^11.8.6",
|
|
45345
45352
|
"tough-cookie": "^6.0.1"
|
|
@@ -45436,7 +45443,7 @@ function Lm(e) {
|
|
|
45436
45443
|
}
|
|
45437
45444
|
function Rm(e) {
|
|
45438
45445
|
if (e.length < 3) return !1;
|
|
45439
|
-
let t = e.startsWith("[")
|
|
45446
|
+
let t = +!!e.startsWith("["), n = e.length;
|
|
45440
45447
|
if (e[n - 1] === "]" && --n, n - t > 39) return !1;
|
|
45441
45448
|
let r = !1;
|
|
45442
45449
|
for (; t < n; t += 1) {
|
|
@@ -55917,7 +55924,7 @@ function oh(e, t, n, r) {
|
|
|
55917
55924
|
}
|
|
55918
55925
|
function sh(e, t, n) {
|
|
55919
55926
|
if (eh(e, t, n)) return;
|
|
55920
|
-
let r = e.split("."), i = (t.allowPrivateDomains ? 2 : 0) |
|
|
55927
|
+
let r = e.split("."), i = (t.allowPrivateDomains ? 2 : 0) | !!t.allowIcannDomains, a = oh(r, rh, r.length - 1, i);
|
|
55921
55928
|
if (a !== null) {
|
|
55922
55929
|
n.isIcann = a.isIcann, n.isPrivate = a.isPrivate, n.publicSuffix = r.slice(a.index + 1).join(".");
|
|
55923
55930
|
return;
|
|
@@ -57074,7 +57081,8 @@ var gh, _h = L((() => {
|
|
|
57074
57081
|
async getValidHoptypes() {
|
|
57075
57082
|
if (this.validHoptypes) return this.validHoptypes;
|
|
57076
57083
|
try {
|
|
57077
|
-
|
|
57084
|
+
let e = await this.got.get("https://gitlab.com/api/v4/projects/8966097/repository/tree?path=code&per_page=100").json();
|
|
57085
|
+
return this.validHoptypes = e.reduce((e, t) => (t.type === "tree" && e.push(t.name), e), []), this.validHoptypes;
|
|
57078
57086
|
} catch (e) {
|
|
57079
57087
|
this.#r("getValidHoptypes failed", e, f);
|
|
57080
57088
|
}
|
|
@@ -57141,11 +57149,11 @@ var gh, _h = L((() => {
|
|
|
57141
57149
|
}
|
|
57142
57150
|
async isModifiedSkin(e, t) {
|
|
57143
57151
|
try {
|
|
57144
|
-
let n = await this.isValidHoptype(t), r = (await this.getModifiedSkins(e)).filter((e) => {
|
|
57145
|
-
let t = e.name.split(".")[0].toLowerCase(),
|
|
57146
|
-
return
|
|
57152
|
+
let n = await this.isValidHoptype(t), r = n.prototype.toLowerCase(), i = (await this.getModifiedSkins(e)).filter((e) => {
|
|
57153
|
+
let t = e.name.split(".")[0].toLowerCase(), i = e.name.slice(t.length + 1);
|
|
57154
|
+
return r === t && n.name === i;
|
|
57147
57155
|
});
|
|
57148
|
-
return n.isModified = !!
|
|
57156
|
+
return n.isModified = !!i.length, n.url = n.isModified ? i[0].url : "", n;
|
|
57149
57157
|
} catch (n) {
|
|
57150
57158
|
this.#r(`isModifiedSkin "${e}/${t}" failed`, n, f);
|
|
57151
57159
|
}
|
|
@@ -57694,6 +57702,64 @@ var gh, _h = L((() => {
|
|
|
57694
57702
|
this.#r(`Error while getting infos of "${e}"`, t, f);
|
|
57695
57703
|
}
|
|
57696
57704
|
}
|
|
57705
|
+
async getSidebarModules(e) {
|
|
57706
|
+
try {
|
|
57707
|
+
this.#e();
|
|
57708
|
+
let t = await this.delayed(this.got.get(`${this.getAliasDomain(e)}/modules/order`)), n = r.load(t.body), i = {
|
|
57709
|
+
sidebar01: [],
|
|
57710
|
+
sidebar02: []
|
|
57711
|
+
}, a = n(".grid-bg option");
|
|
57712
|
+
return a && a.each((e, t) => {
|
|
57713
|
+
i[t.parent.attribs.id.slice(0, 9)].push(t.attribs.value);
|
|
57714
|
+
}), i;
|
|
57715
|
+
} catch (t) {
|
|
57716
|
+
this.#r(`Error while reading sidebar modules of "${e}"`, t, f);
|
|
57717
|
+
}
|
|
57718
|
+
}
|
|
57719
|
+
isValidFreeTextModule(e) {
|
|
57720
|
+
return [...Array.from({ length: 5 }, (e, t) => `modFreeText${(++t).toString().padStart(2, "0")}`), ...Array.from({ length: 3 }, (e, t) => `modMacroFreeText${(++t).toString().padStart(2, "0")}`)].includes(e);
|
|
57721
|
+
}
|
|
57722
|
+
async getFreeTextModule(e, t) {
|
|
57723
|
+
try {
|
|
57724
|
+
this.#e();
|
|
57725
|
+
let n = await this.delayed(this.got.get(`${this.getAliasDomain(e)}/modules/preferences?mod=${t}`)), i = r.load(n.body);
|
|
57726
|
+
return {
|
|
57727
|
+
heading: i("input[type=text]").attr("value").trim(),
|
|
57728
|
+
content: i("textarea").text().trim()
|
|
57729
|
+
};
|
|
57730
|
+
} catch (n) {
|
|
57731
|
+
this.#r(`Error while reading freetext module "${t}" of "${e}"`, n, f);
|
|
57732
|
+
}
|
|
57733
|
+
}
|
|
57734
|
+
async updateFreeTextModule(e, t, n = {}) {
|
|
57735
|
+
try {
|
|
57736
|
+
if (this.#e(), !this.isValidFreeTextModule(t)) throw Error(`Cannot update "${t}" as it is no FreeText module!`);
|
|
57737
|
+
let r = `${this.getAliasDomain(e)}/modules/preferences?mod=${t}`, i = await this.delayed(this.got.get(r)), a = `${t.toLowerCase()}header`, o = `${t}Text`, s = {
|
|
57738
|
+
secretKey: this.#n(i.body),
|
|
57739
|
+
mod: t,
|
|
57740
|
+
preferencesform: 1,
|
|
57741
|
+
submit: "Sichern"
|
|
57742
|
+
};
|
|
57743
|
+
return s[a] = n.heading || " ", s[o] = n.content || "", await this.delayed(this.got.post(r, { form: s }));
|
|
57744
|
+
} catch (n) {
|
|
57745
|
+
this.#r(`Error while updating freetext module "${t}" of "${e}"`, n, f);
|
|
57746
|
+
}
|
|
57747
|
+
}
|
|
57748
|
+
async getModuleSkins(e, t) {
|
|
57749
|
+
try {
|
|
57750
|
+
this.#e();
|
|
57751
|
+
let n = await this.delayed(this.got.get(`${this.getAliasDomain(e)}/modules/preferences?mod=${t}`)), i = r.load(n.body), a = i("input[type=text]").eq(0).attr("value");
|
|
57752
|
+
return n = await this.delayed(this.got.get(`${this.getAliasDomain(e)}/modules/skins?mod=${t}`)), i = r.load(n.body), {
|
|
57753
|
+
heading: a,
|
|
57754
|
+
skins: i(".skin > a").map((e, t) => ({
|
|
57755
|
+
name: t.attribs.name,
|
|
57756
|
+
url: t.attribs.href
|
|
57757
|
+
})).get()
|
|
57758
|
+
};
|
|
57759
|
+
} catch (n) {
|
|
57760
|
+
this.#r(`Error while reading freetext module "${t}" of "${e}"`, n, f);
|
|
57761
|
+
}
|
|
57762
|
+
}
|
|
57697
57763
|
};
|
|
57698
57764
|
})))(), 1), bh = /* @__PURE__ */ R(((e) => {
|
|
57699
57765
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.splitWhen = e.flatten = void 0;
|
|
@@ -57982,7 +58048,7 @@ var gh, _h = L((() => {
|
|
|
57982
58048
|
for (n && (e = e.slice(1), t--); e.length < t;) e = "0" + e;
|
|
57983
58049
|
return n ? "-" + e : e;
|
|
57984
58050
|
}, f = (e, t, n) => {
|
|
57985
|
-
e.negatives.sort((e, t) => e < t ? -1 : e > t
|
|
58051
|
+
e.negatives.sort((e, t) => e < t ? -1 : +(e > t)), e.positives.sort((e, t) => e < t ? -1 : +(e > t));
|
|
57986
58052
|
let r = t.capture ? "" : "?:", i = "", a = "", o;
|
|
57987
58053
|
return e.positives.length && (i = e.positives.map((e) => d(String(e), n)).join("|")), e.negatives.length && (a = `-(${r}${e.negatives.map((e) => d(String(e), n)).join("|")})`), o = i && a ? `${i}|${a}` : i || a, t.wrap ? `(${r}${o})` : o;
|
|
57988
58054
|
}, p = (e, t, n, i) => {
|
|
@@ -61272,19 +61338,63 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61272
61338
|
}, M_ = (e, t) => {
|
|
61273
61339
|
let n = A_(e, t);
|
|
61274
61340
|
return v(n) ? x(n).filter((e) => e.endsWith(".skin")) : [];
|
|
61275
|
-
}, N_ = (e, t) => e.split(t).filter((e) => e.trim().length).map((e) => e.toLowerCase()), P_ = async (e, t, n) => {
|
|
61341
|
+
}, N_ = (e, t) => e.split(t).filter((e) => e.trim().length).map((e) => e.toLowerCase()), P_ = (e) => e.charAt(0).toUpperCase() + e.slice(1), F_ = async (e, t, n, r) => {
|
|
61342
|
+
let i = n.match(/<%\s.*?\.skin name=".*?"\s%>/g);
|
|
61343
|
+
if (i) for (let n of i) {
|
|
61344
|
+
let i = n.match(/(\w+)\.skin name="(\w+)"/);
|
|
61345
|
+
if (!i) continue;
|
|
61346
|
+
let a = `${P_(i[1])}.${i[2]}`, o = await e.getActiveLayoutUrl(t), { skin: s } = await e.getSkin({
|
|
61347
|
+
name: a,
|
|
61348
|
+
url: `${o}/skins/edit?key=${a}`
|
|
61349
|
+
});
|
|
61350
|
+
r[a] = s, r = await F_(e, t, s, r);
|
|
61351
|
+
}
|
|
61352
|
+
return r;
|
|
61353
|
+
}, I_ = async (e, t, n) => {
|
|
61276
61354
|
try {
|
|
61277
61355
|
await e.login();
|
|
61278
61356
|
for (let r of t) {
|
|
61279
61357
|
console.log(Fi.green(`\nNow processing alias "${r}"...`));
|
|
61280
|
-
let t = A_(r, n.backup), i = await e.getModifiedSkins(r);
|
|
61358
|
+
let t = A_(r, n.backup), i = await e.getModifiedSkins(r), a = {};
|
|
61281
61359
|
i.length && !v(t) && y(t), console.log(Fi.yellow(`${r} has ${i.length} modified skin${i.length === 1 ? "" : "s"}`)), n.skin && console.log(Fi.yellow(`Filtering skins for ${n.skin}.`));
|
|
61282
|
-
for (let
|
|
61283
|
-
if (n.skin && !n.skin.test(
|
|
61284
|
-
console.log(Fi.gray(`Reading "${
|
|
61285
|
-
let { title: i, description:
|
|
61286
|
-
k_.setData(
|
|
61360
|
+
for (let t of i) {
|
|
61361
|
+
if (n.skin && !n.skin.test(t.name)) continue;
|
|
61362
|
+
console.log(Fi.gray(`Reading "${t.name}".`));
|
|
61363
|
+
let { title: i, description: o, skin: s } = await e.getSkin(t);
|
|
61364
|
+
k_.setData(t.name, i, o), a[t.name] = s, a = await F_(e, r, s, a);
|
|
61365
|
+
}
|
|
61366
|
+
if (n.modules) {
|
|
61367
|
+
console.log(Fi.yellow("Exporting sidebar freetext modules as requested."));
|
|
61368
|
+
let t = await e.getSidebarModules(r), n = [...t.sidebar01, ...t.sidebar02];
|
|
61369
|
+
for (let t of n) if (e.isValidFreeTextModule(t)) {
|
|
61370
|
+
console.log(Fi.gray(`Reading sidebar module "${t}".`));
|
|
61371
|
+
let { heading: n, content: i } = await e.getFreeTextModule(r, t);
|
|
61372
|
+
a[`Sidebar.${t}`] = `${n}\n${i}`;
|
|
61373
|
+
} else {
|
|
61374
|
+
let { skins: n } = await e.getModuleSkins(r, t);
|
|
61375
|
+
for (let t of n) {
|
|
61376
|
+
let { title: n, description: r, skin: i } = await e.getSkin(t);
|
|
61377
|
+
k_.setData(t.name, n, r), a[t.name] = i;
|
|
61378
|
+
}
|
|
61379
|
+
}
|
|
61380
|
+
}
|
|
61381
|
+
if (n.toolbar) {
|
|
61382
|
+
let t = await e.getActiveLayoutUrl(r);
|
|
61383
|
+
for (let n of [
|
|
61384
|
+
"Main",
|
|
61385
|
+
"DropDowns",
|
|
61386
|
+
"Closed"
|
|
61387
|
+
]) {
|
|
61388
|
+
let r = `Site.modToolbar${n}`;
|
|
61389
|
+
console.log(Fi.gray(`Reading "${r}".`));
|
|
61390
|
+
let { title: i, description: o, skin: s } = await e.getSkin({
|
|
61391
|
+
name: r,
|
|
61392
|
+
url: `${t}/skins/edit?key=${r}`
|
|
61393
|
+
});
|
|
61394
|
+
k_.setData(r, i, o), a[r] = s;
|
|
61395
|
+
}
|
|
61287
61396
|
}
|
|
61397
|
+
for (let [e, n] of Object.entries(a)) S(A(t, `${e}.skin`), n);
|
|
61288
61398
|
}
|
|
61289
61399
|
console.log(Fi.green("Download completed."));
|
|
61290
61400
|
} catch (e) {
|
|
@@ -61292,7 +61402,7 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61292
61402
|
} finally {
|
|
61293
61403
|
k_.store();
|
|
61294
61404
|
}
|
|
61295
|
-
},
|
|
61405
|
+
}, L_ = async (e, t, n) => {
|
|
61296
61406
|
try {
|
|
61297
61407
|
await e.login();
|
|
61298
61408
|
for (let r of t) {
|
|
@@ -61302,13 +61412,28 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61302
61412
|
let i = await e.getModifiedSkins(r), a = new Set(i.map((e) => e.name)), o = A_(r, n.backup);
|
|
61303
61413
|
for (let i of t) {
|
|
61304
61414
|
if (!i.endsWith(".skin") || n.skin && !n.skin.test(i)) continue;
|
|
61305
|
-
let t =
|
|
61306
|
-
|
|
61307
|
-
|
|
61308
|
-
|
|
61309
|
-
|
|
61310
|
-
|
|
61311
|
-
|
|
61415
|
+
let [t, s] = i.split(".");
|
|
61416
|
+
if (t === "Sidebar") {
|
|
61417
|
+
let t = b(A(o, i)).toString().replace(/\r\n/g, "\n"), n = t.indexOf("\n"), a = t.slice(0, n), c = t.slice(++n);
|
|
61418
|
+
console.log(Fi.blue(`Now updating sidebar module ${s} (len=${c.length}).`)), await e.updateFreeTextModule(r, s, {
|
|
61419
|
+
heading: a,
|
|
61420
|
+
content: c
|
|
61421
|
+
}), console.log(Fi.green(`Update request completed for module: ${s}`));
|
|
61422
|
+
} else {
|
|
61423
|
+
let { isValid: t, prototype: a } = e.isValidHoptype(i.slice(0, -5));
|
|
61424
|
+
if (!t) {
|
|
61425
|
+
console.log(Fi.red(`Skipping upload for invalid skin hoptype "${a}" (Skin file ${i}).`));
|
|
61426
|
+
continue;
|
|
61427
|
+
}
|
|
61428
|
+
let s = k_.getData(i);
|
|
61429
|
+
s.content = b(A(o, i)).toString().replace(/\r\n/g, "\n"), console.log(Fi.blue(`Now updating skin ${s.name} (len=${s.content.length}).`)), await e.updateSkin(r, s.name, {
|
|
61430
|
+
title: s.title,
|
|
61431
|
+
description: s.description,
|
|
61432
|
+
skin: s.content,
|
|
61433
|
+
diff: n.debug
|
|
61434
|
+
}), console.log(Fi.green(`Update request completed for skin: ${s.name}`));
|
|
61435
|
+
}
|
|
61436
|
+
a.has(skin.name) && a.delete(skin.name);
|
|
61312
61437
|
}
|
|
61313
61438
|
a.size > 0 && (console.log(Fi.blue(`\nFollowing skins exist on "${r}" and were not touched by this upload:`)), a.forEach((e) => console.log(`--> ${Fi.blue(e)}`)));
|
|
61314
61439
|
}
|
|
@@ -61316,12 +61441,12 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61316
61441
|
} catch (e) {
|
|
61317
61442
|
console.log(Fi.red(`Error while uploading skins: ${e}`));
|
|
61318
61443
|
}
|
|
61319
|
-
},
|
|
61444
|
+
}, R_ = {
|
|
61320
61445
|
different: "cyan",
|
|
61321
61446
|
identical: "grey",
|
|
61322
61447
|
new: "green",
|
|
61323
61448
|
untouched: "grey"
|
|
61324
|
-
},
|
|
61449
|
+
}, z_ = (e, t) => e.name < t.name ? -1 : +(e.name > t.name), B_ = async (e, t) => {
|
|
61325
61450
|
let n = { aliases: [] };
|
|
61326
61451
|
try {
|
|
61327
61452
|
typeof t == "string" && (t = [t]), await e.login();
|
|
@@ -61334,7 +61459,7 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61334
61459
|
let o = A_(i, !1), s = M_(i, !1).map((e) => {
|
|
61335
61460
|
let t = k_.getData(e);
|
|
61336
61461
|
return t.skin = b(A(o, e)).toString().replace(/\r\n/g, "\n"), t;
|
|
61337
|
-
}).sort(
|
|
61462
|
+
}).sort(z_), c = await e.getModifiedSkins(a), l = [];
|
|
61338
61463
|
for (let t of c) l.push(e.getSkin(t));
|
|
61339
61464
|
let u = (await Promise.all(l)).map((e) => {
|
|
61340
61465
|
let { name: t, title: n, description: r, skin: i } = e;
|
|
@@ -61344,7 +61469,7 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61344
61469
|
description: r,
|
|
61345
61470
|
skin: i
|
|
61346
61471
|
};
|
|
61347
|
-
}).sort(
|
|
61472
|
+
}).sort(z_), d = 0, f = 0;
|
|
61348
61473
|
for (; d < s.length && f < u.length;) {
|
|
61349
61474
|
let n = d < s.length ? s[d].name : "", r = f < u.length ? u[f].name : "", i = {
|
|
61350
61475
|
open: !1,
|
|
@@ -61354,7 +61479,7 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61354
61479
|
console.log(Fi.white(`Processing skin ${Fi.italic(n)}`));
|
|
61355
61480
|
let t = e.diffSkin(n, u[f], s[d]);
|
|
61356
61481
|
i.class = t.skinChanged ? "different" : "identical", i.open = t.skinChanged, i.text = `${t.skinName} is ${i.class}.`, i.results = t.results, d++, f++;
|
|
61357
|
-
} else n < r ? (i.text = `Local skin ${n} missing on remote. Will be created upon update!`, i.class = "new", d++) : (i.text = `Remote skin ${r} without local counterpart. Will remain untouched upon update!`, i.class = "untouched", f++), console.log(Fi[
|
|
61482
|
+
} else n < r ? (i.text = `Local skin ${n} missing on remote. Will be created upon update!`, i.class = "new", d++) : (i.text = `Remote skin ${r} without local counterpart. Will remain untouched upon update!`, i.class = "untouched", f++), console.log(Fi[R_[i.class]](i.text));
|
|
61358
61483
|
t.skins.push(i);
|
|
61359
61484
|
}
|
|
61360
61485
|
n.aliases.push(t);
|
|
@@ -61365,7 +61490,7 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61365
61490
|
} catch (e) {
|
|
61366
61491
|
console.log(Fi.red(`Error while comparing skins: ${e}`));
|
|
61367
61492
|
}
|
|
61368
|
-
},
|
|
61493
|
+
}, V_ = /* @__PURE__ */ R(((e, t) => {
|
|
61369
61494
|
var n = H("fs"), r = H("path");
|
|
61370
61495
|
function i(e) {
|
|
61371
61496
|
console.log(`[dotenv][DEBUG] ${e}`);
|
|
@@ -61394,7 +61519,7 @@ var E_ = A(process.cwd(), "skins"), D_ = A(process.cwd(), "backup"), O_ = A(E_,
|
|
|
61394
61519
|
}
|
|
61395
61520
|
}
|
|
61396
61521
|
t.exports.config = u, t.exports.parse = l;
|
|
61397
|
-
})),
|
|
61522
|
+
})), H_ = /* @__PURE__ */ R(((e, t) => {
|
|
61398
61523
|
var n = H("util");
|
|
61399
61524
|
function r(e, t, n, r, i) {
|
|
61400
61525
|
let a = `The following variables were defined in ${n} but are not present in the environment:\n ${r.join(", ")}
|
|
@@ -61406,8 +61531,8 @@ Make sure to add them to ${t} or directly to the environment.`, o = e ? "" : "If
|
|
|
61406
61531
|
].filter(Boolean).join("\n\n"), Error.captureStackTrace(this, this.constructor);
|
|
61407
61532
|
}
|
|
61408
61533
|
n.inherits(r, Error), t.exports = r;
|
|
61409
|
-
})),
|
|
61410
|
-
var n =
|
|
61534
|
+
})), U_ = (/* @__PURE__ */ R(((e, t) => {
|
|
61535
|
+
var n = V_(), r = H("fs"), i = H_();
|
|
61411
61536
|
function a(e, t) {
|
|
61412
61537
|
return e.filter((e) => t.indexOf(e) < 0);
|
|
61413
61538
|
}
|
|
@@ -61430,7 +61555,7 @@ Make sure to add them to ${t} or directly to the environment.`, o = e ? "" : "If
|
|
|
61430
61555
|
parse: n.parse,
|
|
61431
61556
|
MissingEnvVarsError: i
|
|
61432
61557
|
}, t.exports.MissingEnvVarsError = i;
|
|
61433
|
-
})))(),
|
|
61558
|
+
})))(), W_ = ei(process.argv.slice(2)).options({
|
|
61434
61559
|
from: {
|
|
61435
61560
|
alias: "f",
|
|
61436
61561
|
description: "Platform where to download the skins from: \"dev\" or \"prod\"",
|
|
@@ -61451,6 +61576,17 @@ Make sure to add them to ${t} or directly to the environment.`, o = e ? "" : "If
|
|
|
61451
61576
|
description: "Skin selection string (regex) to filter the skins to upload",
|
|
61452
61577
|
type: "string"
|
|
61453
61578
|
},
|
|
61579
|
+
modules: {
|
|
61580
|
+
alias: "m",
|
|
61581
|
+
description: "Download sidebar module skins/freetext as well",
|
|
61582
|
+
default: !1,
|
|
61583
|
+
type: "boolean"
|
|
61584
|
+
},
|
|
61585
|
+
toolbar: {
|
|
61586
|
+
description: "Download modToolbar skins, too",
|
|
61587
|
+
default: !1,
|
|
61588
|
+
type: "boolean"
|
|
61589
|
+
},
|
|
61454
61590
|
backup: {
|
|
61455
61591
|
alias: "b",
|
|
61456
61592
|
description: "Backup skins to the local /backup folder to preserve their former status",
|
|
@@ -61472,20 +61608,22 @@ Make sure to add them to ${t} or directly to the environment.`, o = e ? "" : "If
|
|
|
61472
61608
|
type: "boolean"
|
|
61473
61609
|
}
|
|
61474
61610
|
}).argv;
|
|
61475
|
-
(0,
|
|
61476
|
-
var
|
|
61611
|
+
(0, U_.config)(), !W_.from && !W_.to && (console.log("Desired action must be specified with --from=dev|prod or --to=dev|prod"), process.exit(1)), W_.from && W_.to && (console.log("You cannot specify --from=dev|prod AND --to=dev|prod in one run"), process.exit(1)), W_.compare && !W_.to && (console.log("You must specify a target platform with --to=dev|prod when comparing skins"), process.exit(1)), W_.alias || (console.log("You must specify the desired alias(es) with --alias=name1[,name2,...] OR --alias=*"), process.exit(1));
|
|
61612
|
+
var G_ = (W_.from || W_.to).toLowerCase(), K_ = new yh.Twoday(G_, { delay: 100 }), q_ = W_.alias === "*" ? [
|
|
61477
61613
|
"www",
|
|
61478
61614
|
"info",
|
|
61479
61615
|
"help",
|
|
61480
61616
|
"top"
|
|
61481
|
-
] : N_(
|
|
61482
|
-
if (
|
|
61617
|
+
] : N_(W_.alias, ",");
|
|
61618
|
+
if (W_.compare) q_.length === 1 && q_[0].includes(":") && console.log(`Start comparing local skin files of alias${q_.length > 1 ? "es" : ""} ${Fi.yellow(q_.join(", "))} to ${Fi.green(K_.fullDomain)}...`), B_(K_, q_);
|
|
61483
61619
|
else {
|
|
61484
|
-
let e =
|
|
61485
|
-
e === "down" &&
|
|
61486
|
-
backup:
|
|
61487
|
-
debug:
|
|
61488
|
-
|
|
61620
|
+
let e = W_.from ? "down" : "up", t = W_.from ? "from" : "to", n = W_.from ? I_ : L_;
|
|
61621
|
+
e === "down" && W_.clean && (j_(q_, W_.backup), console.log(Fi.yellow(`Cleaning target download folder/s for "${q_}".`))), console.log(`Start ${e}loading modified skins of alias${q_.length > 1 ? "es" : ""} ${Fi.yellow(q_.join(", "))} ${t} remote ${Fi.green(K_.fullDomain)}...`), n(K_, q_, {
|
|
61622
|
+
backup: W_.backup,
|
|
61623
|
+
debug: W_.debug,
|
|
61624
|
+
modules: W_.modules,
|
|
61625
|
+
skin: W_.skin ? new RegExp(W_.skin) : null,
|
|
61626
|
+
toolbar: W_.toolbar
|
|
61489
61627
|
});
|
|
61490
61628
|
}
|
|
61491
61629
|
//#endregion
|