@set2333/upload-script-helpers
Version:
Helper library for upload scripts
1,408 lines • 3.18 MB
JavaScript
var n8 = (n, e, t) => {
if (!e.has(n))
throw TypeError("Cannot " + t);
};
var Ce = (n, e, t) => (n8(n, e, "read from private field"), t ? t.call(n) : e.get(n)), z3 = (n, e, t) => {
if (e.has(n))
throw TypeError("Cannot add the same private member more than once");
e instanceof WeakSet ? e.add(n) : e.set(n, t);
}, V2 = (n, e, t, i) => (n8(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
import Mu from "tls";
import Kt, { isIP as Mh } from "net";
import O3 from "events";
import cn, { types as Z4, promisify as Yh, deprecate as Al } from "util";
import f3, { Buffer as Me } from "buffer";
import J0, { PassThrough as q4, pipeline as Et } from "stream";
import Hh from "string_decoder";
import j3 from "path";
import hn from "crypto";
import fa, { format as Jh, URL as Zh } from "url";
import Ye from "fs";
import Yt from "http";
import ts from "https";
import Ln from "zlib";
import is from "dns";
import as from "os";
import qh from "child_process";
var j0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Uh(n) {
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
}
function Xh(n) {
if (n.__esModule)
return n;
var e = n.default;
if (typeof e == "function") {
var t = function i() {
return this instanceof i ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
};
t.prototype = e.prototype;
} else
t = {};
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(n).forEach(function(i) {
var a = Object.getOwnPropertyDescriptor(n, i);
Object.defineProperty(t, i, a.get ? a : {
enumerable: !0,
get: function() {
return n[i];
}
});
}), t;
}
var Yu = {}, lu = { exports: {} };
(function(n, e) {
e = n.exports = l0;
var t;
typeof process == "object" && /* nomin */
process.env && /* nomin */
process.env.NODE_DEBUG && /* nomin */
/\bsemver\b/i.test(process.env.NODE_DEBUG) ? t = function() {
var A = Array.prototype.slice.call(arguments, 0);
A.unshift("SEMVER"), console.log.apply(console, A);
} : t = function() {
}, e.SEMVER_SPEC_VERSION = "2.0.0";
var i = 256, a = Number.MAX_SAFE_INTEGER || 9007199254740991, l = e.re = [], r = e.src = [], u = 0, s = u++;
r[s] = "0|[1-9]\\d*";
var o = u++;
r[o] = "[0-9]+";
var x = u++;
r[x] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
var p = u++;
r[p] = "(" + r[s] + ")\\.(" + r[s] + ")\\.(" + r[s] + ")";
var c = u++;
r[c] = "(" + r[o] + ")\\.(" + r[o] + ")\\.(" + r[o] + ")";
var f = u++;
r[f] = "(?:" + r[s] + "|" + r[x] + ")";
var E = u++;
r[E] = "(?:" + r[o] + "|" + r[x] + ")";
var g = u++;
r[g] = "(?:-(" + r[f] + "(?:\\." + r[f] + ")*))";
var m = u++;
r[m] = "(?:-?(" + r[E] + "(?:\\." + r[E] + ")*))";
var b = u++;
r[b] = "[0-9A-Za-z-]+";
var w = u++;
r[w] = "(?:\\+(" + r[b] + "(?:\\." + r[b] + ")*))";
var B = u++, k = "v?" + r[p] + r[g] + "?" + r[w] + "?";
r[B] = "^" + k + "$";
var _ = "[v=\\s]*" + r[c] + r[m] + "?" + r[w] + "?", T = u++;
r[T] = "^" + _ + "$";
var F = u++;
r[F] = "((?:<|>)?=?)";
var H = u++;
r[H] = r[o] + "|x|X|\\*";
var N = u++;
r[N] = r[s] + "|x|X|\\*";
var J = u++;
r[J] = "[v=\\s]*(" + r[N] + ")(?:\\.(" + r[N] + ")(?:\\.(" + r[N] + ")(?:" + r[g] + ")?" + r[w] + "?)?)?";
var R = u++;
r[R] = "[v=\\s]*(" + r[H] + ")(?:\\.(" + r[H] + ")(?:\\.(" + r[H] + ")(?:" + r[m] + ")?" + r[w] + "?)?)?";
var y = u++;
r[y] = "^" + r[F] + "\\s*" + r[J] + "$";
var j = u++;
r[j] = "^" + r[F] + "\\s*" + r[R] + "$";
var z = u++;
r[z] = "(?:~>?)";
var Q = u++;
r[Q] = "(\\s*)" + r[z] + "\\s+", l[Q] = new RegExp(r[Q], "g");
var s0 = "$1~", f0 = u++;
r[f0] = "^" + r[z] + r[J] + "$";
var B0 = u++;
r[B0] = "^" + r[z] + r[R] + "$";
var W = u++;
r[W] = "(?:\\^)";
var g0 = u++;
r[g0] = "(\\s*)" + r[W] + "\\s+", l[g0] = new RegExp(r[g0], "g");
var y0 = "$1^", Y = u++;
r[Y] = "^" + r[W] + r[J] + "$";
var r0 = u++;
r[r0] = "^" + r[W] + r[R] + "$";
var n0 = u++;
r[n0] = "^" + r[F] + "\\s*(" + _ + ")$|^$";
var V = u++;
r[V] = "^" + r[F] + "\\s*(" + k + ")$|^$";
var o0 = u++;
r[o0] = "(\\s*)" + r[F] + "\\s*(" + _ + "|" + r[J] + ")", l[o0] = new RegExp(r[o0], "g");
var p0 = "$1$2$3", U = u++;
r[U] = "^\\s*(" + r[J] + ")\\s+-\\s+(" + r[J] + ")\\s*$";
var Z = u++;
r[Z] = "^\\s*(" + r[R] + ")\\s+-\\s+(" + r[R] + ")\\s*$";
var M = u++;
r[M] = "(<|>)?=?\\s*\\*";
for (var q = 0; q < u; q++)
t(q, r[q]), l[q] || (l[q] = new RegExp(r[q]));
e.parse = D;
function D(A, C) {
if (A instanceof l0)
return A;
if (typeof A != "string" || A.length > i)
return null;
var S = C ? l[T] : l[B];
if (!S.test(A))
return null;
try {
return new l0(A, C);
} catch {
return null;
}
}
e.valid = t0;
function t0(A, C) {
var S = D(A, C);
return S ? S.version : null;
}
e.clean = x0;
function x0(A, C) {
var S = D(A.trim().replace(/^[=v]+/, ""), C);
return S ? S.version : null;
}
e.SemVer = l0;
function l0(A, C) {
if (A instanceof l0) {
if (A.loose === C)
return A;
A = A.version;
} else if (typeof A != "string")
throw new TypeError("Invalid Version: " + A);
if (A.length > i)
throw new TypeError("version is longer than " + i + " characters");
if (!(this instanceof l0))
return new l0(A, C);
t("SemVer", A, C), this.loose = C;
var S = A.trim().match(C ? l[T] : l[B]);
if (!S)
throw new TypeError("Invalid Version: " + A);
if (this.raw = A, this.major = +S[1], this.minor = +S[2], this.patch = +S[3], this.major > a || this.major < 0)
throw new TypeError("Invalid major version");
if (this.minor > a || this.minor < 0)
throw new TypeError("Invalid minor version");
if (this.patch > a || this.patch < 0)
throw new TypeError("Invalid patch version");
S[4] ? this.prerelease = S[4].split(".").map(function(X) {
if (/^[0-9]+$/.test(X)) {
var G = +X;
if (G >= 0 && G < a)
return G;
}
return X;
}) : this.prerelease = [], this.build = S[5] ? S[5].split(".") : [], this.format();
}
l0.prototype.format = function() {
return this.version = this.major + "." + this.minor + "." + this.patch, this.prerelease.length && (this.version += "-" + this.prerelease.join(".")), this.version;
}, l0.prototype.toString = function() {
return this.version;
}, l0.prototype.compare = function(A) {
return t("SemVer.compare", this.version, this.loose, A), A instanceof l0 || (A = new l0(A, this.loose)), this.compareMain(A) || this.comparePre(A);
}, l0.prototype.compareMain = function(A) {
return A instanceof l0 || (A = new l0(A, this.loose)), z0(this.major, A.major) || z0(this.minor, A.minor) || z0(this.patch, A.patch);
}, l0.prototype.comparePre = function(A) {
if (A instanceof l0 || (A = new l0(A, this.loose)), this.prerelease.length && !A.prerelease.length)
return -1;
if (!this.prerelease.length && A.prerelease.length)
return 1;
if (!this.prerelease.length && !A.prerelease.length)
return 0;
var C = 0;
do {
var S = this.prerelease[C], X = A.prerelease[C];
if (t("prerelease compare", C, S, X), S === void 0 && X === void 0)
return 0;
if (X === void 0)
return 1;
if (S === void 0)
return -1;
if (S === X)
continue;
return z0(S, X);
} while (++C);
}, l0.prototype.inc = function(A, C) {
switch (A) {
case "premajor":
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", C);
break;
case "preminor":
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", C);
break;
case "prepatch":
this.prerelease.length = 0, this.inc("patch", C), this.inc("pre", C);
break;
case "prerelease":
this.prerelease.length === 0 && this.inc("patch", C), this.inc("pre", C);
break;
case "major":
(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
break;
case "minor":
(this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
break;
case "patch":
this.prerelease.length === 0 && this.patch++, this.prerelease = [];
break;
case "pre":
if (this.prerelease.length === 0)
this.prerelease = [0];
else {
for (var S = this.prerelease.length; --S >= 0; )
typeof this.prerelease[S] == "number" && (this.prerelease[S]++, S = -2);
S === -1 && this.prerelease.push(0);
}
C && (this.prerelease[0] === C ? isNaN(this.prerelease[1]) && (this.prerelease = [C, 0]) : this.prerelease = [C, 0]);
break;
default:
throw new Error("invalid increment argument: " + A);
}
return this.format(), this.raw = this.version, this;
}, e.inc = m0;
function m0(A, C, S, X) {
typeof S == "string" && (X = S, S = void 0);
try {
return new l0(A, S).inc(C, X).version;
} catch {
return null;
}
}
e.diff = E0;
function E0(A, C) {
if ($0(A, C))
return null;
var S = D(A), X = D(C);
if (S.prerelease.length || X.prerelease.length) {
for (var G in S)
if ((G === "major" || G === "minor" || G === "patch") && S[G] !== X[G])
return "pre" + G;
return "prerelease";
}
for (var G in S)
if ((G === "major" || G === "minor" || G === "patch") && S[G] !== X[G])
return G;
}
e.compareIdentifiers = z0;
var N0 = /^[0-9]+$/;
function z0(A, C) {
var S = N0.test(A), X = N0.test(C);
return S && X && (A = +A, C = +C), S && !X ? -1 : X && !S ? 1 : A < C ? -1 : A > C ? 1 : 0;
}
e.rcompareIdentifiers = Ee;
function Ee(A, C) {
return z0(C, A);
}
e.major = e2;
function e2(A, C) {
return new l0(A, C).major;
}
e.minor = Ne;
function Ne(A, C) {
return new l0(A, C).minor;
}
e.patch = ge;
function ge(A, C) {
return new l0(A, C).patch;
}
e.compare = Q0;
function Q0(A, C, S) {
return new l0(A, S).compare(C);
}
e.compareLoose = c2;
function c2(A, C) {
return Q0(A, C, !0);
}
e.rcompare = n2;
function n2(A, C, S) {
return Q0(C, A, S);
}
e.sort = b2;
function b2(A, C) {
return A.sort(function(S, X) {
return e.compare(S, X, C);
});
}
e.rsort = me;
function me(A, C) {
return A.sort(function(S, X) {
return e.rcompare(S, X, C);
});
}
e.gt = ye;
function ye(A, C, S) {
return Q0(A, C, S) > 0;
}
e.lt = I0;
function I0(A, C, S) {
return Q0(A, C, S) < 0;
}
e.eq = $0;
function $0(A, C, S) {
return Q0(A, C, S) === 0;
}
e.neq = ve;
function ve(A, C, S) {
return Q0(A, C, S) !== 0;
}
e.gte = te;
function te(A, C, S) {
return Q0(A, C, S) >= 0;
}
e.lte = t2;
function t2(A, C, S) {
return Q0(A, C, S) <= 0;
}
e.cmp = A3;
function A3(A, C, S, X) {
var G;
switch (C) {
case "===":
typeof A == "object" && (A = A.version), typeof S == "object" && (S = S.version), G = A === S;
break;
case "!==":
typeof A == "object" && (A = A.version), typeof S == "object" && (S = S.version), G = A !== S;
break;
case "":
case "=":
case "==":
G = $0(A, S, X);
break;
case "!=":
G = ve(A, S, X);
break;
case ">":
G = ye(A, S, X);
break;
case ">=":
G = te(A, S, X);
break;
case "<":
G = I0(A, S, X);
break;
case "<=":
G = t2(A, S, X);
break;
default:
throw new TypeError("Invalid operator: " + C);
}
return G;
}
e.Comparator = Xe;
function Xe(A, C) {
if (A instanceof Xe) {
if (A.loose === C)
return A;
A = A.value;
}
if (!(this instanceof Xe))
return new Xe(A, C);
t("comparator", A, C), this.loose = C, this.parse(A), this.semver === R2 ? this.value = "" : this.value = this.operator + this.semver.version, t("comp", this);
}
var R2 = {};
Xe.prototype.parse = function(A) {
var C = this.loose ? l[n0] : l[V], S = A.match(C);
if (!S)
throw new TypeError("Invalid comparator: " + A);
this.operator = S[1], this.operator === "=" && (this.operator = ""), S[2] ? this.semver = new l0(S[2], this.loose) : this.semver = R2;
}, Xe.prototype.toString = function() {
return this.value;
}, Xe.prototype.test = function(A) {
return t("Comparator.test", A, this.loose), this.semver === R2 ? !0 : (typeof A == "string" && (A = new l0(A, this.loose)), A3(A, this.operator, this.semver, this.loose));
}, e.Range = ce;
function ce(A, C) {
if (A instanceof ce && A.loose === C)
return A;
if (!(this instanceof ce))
return new ce(A, C);
if (this.loose = C, this.raw = A, this.set = A.split(/\s*\|\|\s*/).map(function(S) {
return this.parseRange(S.trim());
}, this).filter(function(S) {
return S.length;
}), !this.set.length)
throw new TypeError("Invalid SemVer Range: " + A);
this.format();
}
ce.prototype.format = function() {
return this.range = this.set.map(function(A) {
return A.join(" ").trim();
}).join("||").trim(), this.range;
}, ce.prototype.toString = function() {
return this.range;
}, ce.prototype.parseRange = function(A) {
var C = this.loose;
A = A.trim(), t("range", A, C);
var S = C ? l[Z] : l[U];
A = A.replace(S, si), t("hyphen replace", A), A = A.replace(l[o0], p0), t("comparator trim", A, l[o0]), A = A.replace(l[Q], s0), A = A.replace(l[g0], y0), A = A.split(/\s+/).join(" ");
var X = C ? l[n0] : l[V], G = A.split(" ").map(function(K) {
return i2(K, C);
}).join(" ").split(/\s+/);
return this.loose && (G = G.filter(function(K) {
return !!K.match(X);
})), G = G.map(function(K) {
return new Xe(K, C);
}), G;
}, e.toComparators = bn;
function bn(A, C) {
return new ce(A, C).set.map(function(S) {
return S.map(function(X) {
return X.value;
}).join(" ").trim().split(" ");
});
}
function i2(A, C) {
return t("comp", A), A = li(A, C), t("caret", A), A = at(A, C), t("tildes", A), A = lt(A, C), t("xrange", A), A = ui(A, C), t("stars", A), A;
}
function ie(A) {
return !A || A.toLowerCase() === "x" || A === "*";
}
function at(A, C) {
return A.trim().split(/\s+/).map(function(S) {
return N2(S, C);
}).join(" ");
}
function N2(A, C) {
var S = C ? l[B0] : l[f0];
return A.replace(S, function(X, G, K, i0, a0) {
t("tilde", A, X, G, K, i0, a0);
var c0;
return ie(G) ? c0 = "" : ie(K) ? c0 = ">=" + G + ".0.0 <" + (+G + 1) + ".0.0" : ie(i0) ? c0 = ">=" + G + "." + K + ".0 <" + G + "." + (+K + 1) + ".0" : a0 ? (t("replaceTilde pr", a0), a0.charAt(0) !== "-" && (a0 = "-" + a0), c0 = ">=" + G + "." + K + "." + i0 + a0 + " <" + G + "." + (+K + 1) + ".0") : c0 = ">=" + G + "." + K + "." + i0 + " <" + G + "." + (+K + 1) + ".0", t("tilde return", c0), c0;
});
}
function li(A, C) {
return A.trim().split(/\s+/).map(function(S) {
return yn(S, C);
}).join(" ");
}
function yn(A, C) {
t("caret", A, C);
var S = C ? l[r0] : l[Y];
return A.replace(S, function(X, G, K, i0, a0) {
t("caret", A, X, G, K, i0, a0);
var c0;
return ie(G) ? c0 = "" : ie(K) ? c0 = ">=" + G + ".0.0 <" + (+G + 1) + ".0.0" : ie(i0) ? G === "0" ? c0 = ">=" + G + "." + K + ".0 <" + G + "." + (+K + 1) + ".0" : c0 = ">=" + G + "." + K + ".0 <" + (+G + 1) + ".0.0" : a0 ? (t("replaceCaret pr", a0), a0.charAt(0) !== "-" && (a0 = "-" + a0), G === "0" ? K === "0" ? c0 = ">=" + G + "." + K + "." + i0 + a0 + " <" + G + "." + K + "." + (+i0 + 1) : c0 = ">=" + G + "." + K + "." + i0 + a0 + " <" + G + "." + (+K + 1) + ".0" : c0 = ">=" + G + "." + K + "." + i0 + a0 + " <" + (+G + 1) + ".0.0") : (t("no pr"), G === "0" ? K === "0" ? c0 = ">=" + G + "." + K + "." + i0 + " <" + G + "." + K + "." + (+i0 + 1) : c0 = ">=" + G + "." + K + "." + i0 + " <" + G + "." + (+K + 1) + ".0" : c0 = ">=" + G + "." + K + "." + i0 + " <" + (+G + 1) + ".0.0"), t("caret return", c0), c0;
});
}
function lt(A, C) {
return t("replaceXRanges", A, C), A.split(/\s+/).map(function(S) {
return ri(S, C);
}).join(" ");
}
function ri(A, C) {
A = A.trim();
var S = C ? l[j] : l[y];
return A.replace(S, function(X, G, K, i0, a0, c0) {
t("xRange", A, X, G, K, i0, a0, c0);
var A0 = ie(K), v0 = A0 || ie(i0), d0 = v0 || ie(a0), b0 = d0;
return G === "=" && b0 && (G = ""), A0 ? G === ">" || G === "<" ? X = "<0.0.0" : X = "*" : G && b0 ? (v0 && (i0 = 0), d0 && (a0 = 0), G === ">" ? (G = ">=", v0 ? (K = +K + 1, i0 = 0, a0 = 0) : d0 && (i0 = +i0 + 1, a0 = 0)) : G === "<=" && (G = "<", v0 ? K = +K + 1 : i0 = +i0 + 1), X = G + K + "." + i0 + "." + a0) : v0 ? X = ">=" + K + ".0.0 <" + (+K + 1) + ".0.0" : d0 && (X = ">=" + K + "." + i0 + ".0 <" + K + "." + (+i0 + 1) + ".0"), t("xRange return", X), X;
});
}
function ui(A, C) {
return t("replaceStars", A, C), A.trim().replace(l[M], "");
}
function si(A, C, S, X, G, K, i0, a0, c0, A0, v0, d0, b0) {
return ie(S) ? C = "" : ie(X) ? C = ">=" + S + ".0.0" : ie(G) ? C = ">=" + S + "." + X + ".0" : C = ">=" + C, ie(c0) ? a0 = "" : ie(A0) ? a0 = "<" + (+c0 + 1) + ".0.0" : ie(v0) ? a0 = "<" + c0 + "." + (+A0 + 1) + ".0" : d0 ? a0 = "<=" + c0 + "." + A0 + "." + v0 + "-" + d0 : a0 = "<=" + a0, (C + " " + a0).trim();
}
ce.prototype.test = function(A) {
if (!A)
return !1;
typeof A == "string" && (A = new l0(A, this.loose));
for (var C = 0; C < this.set.length; C++)
if (oi(this.set[C], A))
return !0;
return !1;
};
function oi(A, C) {
for (var S = 0; S < A.length; S++)
if (!A[S].test(C))
return !1;
if (C.prerelease.length) {
for (var S = 0; S < A.length; S++)
if (t(A[S].semver), A[S].semver !== R2 && A[S].semver.prerelease.length > 0) {
var X = A[S].semver;
if (X.major === C.major && X.minor === C.minor && X.patch === C.patch)
return !0;
}
return !1;
}
return !0;
}
e.satisfies = B3;
function B3(A, C, S) {
try {
C = new ce(C, S);
} catch {
return !1;
}
return C.test(A);
}
e.maxSatisfying = b3;
function b3(A, C, S) {
return A.filter(function(X) {
return B3(X, C, S);
}).sort(function(X, G) {
return n2(X, G, S);
})[0] || null;
}
e.minSatisfying = vn;
function vn(A, C, S) {
return A.filter(function(X) {
return B3(X, C, S);
}).sort(function(X, G) {
return Q0(X, G, S);
})[0] || null;
}
e.validRange = xi;
function xi(A, C) {
try {
return new ce(A, C).range || "*";
} catch {
return null;
}
}
e.ltr = y2;
function y2(A, C, S) {
return O(A, C, "<", S);
}
e.gtr = L;
function L(A, C, S) {
return O(A, C, ">", S);
}
e.outside = O;
function O(A, C, S, X) {
A = new l0(A, X), C = new ce(C, X);
var G, K, i0, a0, c0;
switch (S) {
case ">":
G = ye, K = t2, i0 = I0, a0 = ">", c0 = ">=";
break;
case "<":
G = I0, K = te, i0 = ye, a0 = "<", c0 = "<=";
break;
default:
throw new TypeError('Must provide a hilo val of "<" or ">"');
}
if (B3(A, C, X))
return !1;
for (var A0 = 0; A0 < C.set.length; ++A0) {
var v0 = C.set[A0], d0 = null, b0 = null;
if (v0.forEach(function(S0) {
S0.semver === R2 && (S0 = new Xe(">=0.0.0")), d0 = d0 || S0, b0 = b0 || S0, G(S0.semver, d0.semver, X) ? d0 = S0 : i0(S0.semver, b0.semver, X) && (b0 = S0);
}), d0.operator === a0 || d0.operator === c0 || (!b0.operator || b0.operator === a0) && K(A, b0.semver))
return !1;
if (b0.operator === c0 && i0(A, b0.semver))
return !1;
}
return !0;
}
e.prerelease = I;
function I(A, C) {
var S = D(A, C);
return S && S.prerelease.length ? S.prerelease : null;
}
})(lu, lu.exports);
var Gh = lu.exports;
(function(n) {
f3.Buffer;
var e = Gh;
e.gte(process.version, "6.0.0");
function t(x) {
for (var p = allocateAsciiBuffer(x.length * 2), c = 0, f = 0; c < x.length; c++) {
var E = x.charCodeAt(c);
p[f++] = E >> 8, p[f++] = E & 255;
}
return p.toString("base64").replace(/=+$/, "");
}
e.gte(process.version, "6.0.0");
function i(x) {
for (var p = allocateBase64Buffer(x), c = [], f = 0; f < p.length; )
c.push(String.fromCharCode(p[f++] << 8 | p[f++]));
return c.join("");
}
function a(x) {
return x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
}
var l = "A-Za-z0-9" + a("'(),-./:?"), r = a(`!"#$%&*;<=>@[]^_'{|}`), u = a(` \r
`), s = {}, o = new RegExp("[^" + u + l + r + "]+", "g");
n.imap = {}, n.encode = function(x, p) {
return p || (p = ""), s[p] || (s[p] = new RegExp("[^" + l + a(p) + "]+", "g")), x.replace(s[p], function(c) {
return "+" + (c === "+" ? "" : t(c)) + "-";
});
}, n.encodeAll = function(x) {
return x.replace(o, function(p) {
return "+" + (p === "+" ? "" : t(p)) + "-";
});
}, n.imap.encode = function(x) {
return x.replace(/&/g, "&-").replace(/[^\x20-\x7e]+/g, function(p) {
return p = (p === "&" ? "" : t(p)).replace(/\//g, ","), "&" + p + "-";
});
}, n.decode = function(x) {
return x.replace(/\+([A-Za-z0-9\/]*)-?/gi, function(p, c) {
return c === "" ? "+" : i(c);
});
}, n.imap.decode = function(x) {
return x.replace(/&([^-]*)-/g, function(p, c) {
return c === "" ? "&" : i(c.replace(/,/g, "/"));
});
};
})(Yu);
var pn = {}, c4 = { exports: {} }, or, t8;
function Wh() {
return t8 || (t8 = 1, or = Array.isArray || function(n) {
return Object.prototype.toString.call(n) == "[object Array]";
}), or;
}
var Se = {}, i8;
function da() {
if (i8)
return Se;
i8 = 1;
function n(g) {
return Array.isArray ? Array.isArray(g) : E(g) === "[object Array]";
}
Se.isArray = n;
function e(g) {
return typeof g == "boolean";
}
Se.isBoolean = e;
function t(g) {
return g === null;
}
Se.isNull = t;
function i(g) {
return g == null;
}
Se.isNullOrUndefined = i;
function a(g) {
return typeof g == "number";
}
Se.isNumber = a;
function l(g) {
return typeof g == "string";
}
Se.isString = l;
function r(g) {
return typeof g == "symbol";
}
Se.isSymbol = r;
function u(g) {
return g === void 0;
}
Se.isUndefined = u;
function s(g) {
return E(g) === "[object RegExp]";
}
Se.isRegExp = s;
function o(g) {
return typeof g == "object" && g !== null;
}
Se.isObject = o;
function x(g) {
return E(g) === "[object Date]";
}
Se.isDate = x;
function p(g) {
return E(g) === "[object Error]" || g instanceof Error;
}
Se.isError = p;
function c(g) {
return typeof g == "function";
}
Se.isFunction = c;
function f(g) {
return g === null || typeof g == "boolean" || typeof g == "number" || typeof g == "string" || typeof g == "symbol" || // ES6 symbol
typeof g > "u";
}
Se.isPrimitive = f, Se.isBuffer = f3.Buffer.isBuffer;
function E(g) {
return Object.prototype.toString.call(g);
}
return Se;
}
var h4 = { exports: {} }, p4 = { exports: {} }, a8;
function zh() {
return a8 || (a8 = 1, typeof Object.create == "function" ? p4.exports = function(e, t) {
t && (e.super_ = t, e.prototype = Object.create(t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}));
} : p4.exports = function(e, t) {
if (t) {
e.super_ = t;
var i = function() {
};
i.prototype = t.prototype, e.prototype = new i(), e.prototype.constructor = e;
}
}), p4.exports;
}
var l8;
function Ea() {
if (l8)
return h4.exports;
l8 = 1;
try {
var n = require("util");
if (typeof n.inherits != "function")
throw "";
h4.exports = n.inherits;
} catch {
h4.exports = zh();
}
return h4.exports;
}
var xr, r8;
function ls() {
if (r8)
return xr;
r8 = 1, xr = l;
var n = f3.Buffer;
l.WritableState = a;
var e = da();
e.inherits = Ea();
var t = J0;
e.inherits(l, t);
function i(_, T, F) {
this.chunk = _, this.encoding = T, this.callback = F;
}
function a(_, T) {
var F = Ht();
_ = _ || {};
var H = _.highWaterMark, N = _.objectMode ? 16 : 16 * 1024;
this.highWaterMark = H || H === 0 ? H : N, this.objectMode = !!_.objectMode, T instanceof F && (this.objectMode = this.objectMode || !!_.writableObjectMode), this.highWaterMark = ~~this.highWaterMark, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1;
var J = _.decodeStrings === !1;
this.decodeStrings = !J, this.defaultEncoding = _.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(R) {
f(T, R);
}, this.writecb = null, this.writelen = 0, this.buffer = [], this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1;
}
function l(_) {
var T = Ht();
if (!(this instanceof l) && !(this instanceof T))
return new l(_);
this._writableState = new a(_, this), this.writable = !0, t.call(this);
}
l.prototype.pipe = function() {
this.emit("error", new Error("Cannot pipe. Not readable."));
};
function r(_, T, F) {
var H = new Error("write after end");
_.emit("error", H), process.nextTick(function() {
F(H);
});
}
function u(_, T, F, H) {
var N = !0;
if (!e.isBuffer(F) && !e.isString(F) && !e.isNullOrUndefined(F) && !T.objectMode) {
var J = new TypeError("Invalid non-string/buffer chunk");
_.emit("error", J), process.nextTick(function() {
H(J);
}), N = !1;
}
return N;
}
l.prototype.write = function(_, T, F) {
var H = this._writableState, N = !1;
return e.isFunction(T) && (F = T, T = null), e.isBuffer(_) ? T = "buffer" : T || (T = H.defaultEncoding), e.isFunction(F) || (F = function() {
}), H.ended ? r(this, H, F) : u(this, H, _, F) && (H.pendingcb++, N = o(this, H, _, T, F)), N;
}, l.prototype.cork = function() {
var _ = this._writableState;
_.corked++;
}, l.prototype.uncork = function() {
var _ = this._writableState;
_.corked && (_.corked--, !_.writing && !_.corked && !_.finished && !_.bufferProcessing && _.buffer.length && m(this, _));
};
function s(_, T, F) {
return !_.objectMode && _.decodeStrings !== !1 && e.isString(T) && (T = new n(T, F)), T;
}
function o(_, T, F, H, N) {
F = s(T, F, H), e.isBuffer(F) && (H = "buffer");
var J = T.objectMode ? 1 : F.length;
T.length += J;
var R = T.length < T.highWaterMark;
return R || (T.needDrain = !0), T.writing || T.corked ? T.buffer.push(new i(F, H, N)) : x(_, T, !1, J, F, H, N), R;
}
function x(_, T, F, H, N, J, R) {
T.writelen = H, T.writecb = R, T.writing = !0, T.sync = !0, F ? _._writev(N, T.onwrite) : _._write(N, J, T.onwrite), T.sync = !1;
}
function p(_, T, F, H, N) {
F ? process.nextTick(function() {
T.pendingcb--, N(H);
}) : (T.pendingcb--, N(H)), _._writableState.errorEmitted = !0, _.emit("error", H);
}
function c(_) {
_.writing = !1, _.writecb = null, _.length -= _.writelen, _.writelen = 0;
}
function f(_, T) {
var F = _._writableState, H = F.sync, N = F.writecb;
if (c(F), T)
p(_, F, H, T, N);
else {
var J = b(_, F);
!J && !F.corked && !F.bufferProcessing && F.buffer.length && m(_, F), H ? process.nextTick(function() {
E(_, F, J, N);
}) : E(_, F, J, N);
}
}
function E(_, T, F, H) {
F || g(_, T), T.pendingcb--, H(), B(_, T);
}
function g(_, T) {
T.length === 0 && T.needDrain && (T.needDrain = !1, _.emit("drain"));
}
function m(_, T) {
if (T.bufferProcessing = !0, _._writev && T.buffer.length > 1) {
for (var F = [], H = 0; H < T.buffer.length; H++)
F.push(T.buffer[H].callback);
T.pendingcb++, x(_, T, !0, T.length, T.buffer, "", function(z) {
for (var Q = 0; Q < F.length; Q++)
T.pendingcb--, F[Q](z);
}), T.buffer = [];
} else {
for (var H = 0; H < T.buffer.length; H++) {
var N = T.buffer[H], J = N.chunk, R = N.encoding, y = N.callback, j = T.objectMode ? 1 : J.length;
if (x(_, T, !1, j, J, R, y), T.writing) {
H++;
break;
}
}
H < T.buffer.length ? T.buffer = T.buffer.slice(H) : T.buffer.length = 0;
}
T.bufferProcessing = !1;
}
l.prototype._write = function(_, T, F) {
F(new Error("not implemented"));
}, l.prototype._writev = null, l.prototype.end = function(_, T, F) {
var H = this._writableState;
e.isFunction(_) ? (F = _, _ = null, T = null) : e.isFunction(T) && (F = T, T = null), e.isNullOrUndefined(_) || this.write(_, T), H.corked && (H.corked = 1, this.uncork()), !H.ending && !H.finished && k(this, H, F);
};
function b(_, T) {
return T.ending && T.length === 0 && !T.finished && !T.writing;
}
function w(_, T) {
T.prefinished || (T.prefinished = !0, _.emit("prefinish"));
}
function B(_, T) {
var F = b(_, T);
return F && (T.pendingcb === 0 ? (w(_, T), T.finished = !0, _.emit("finish")) : w(_, T)), F;
}
function k(_, T, F) {
T.ending = !0, B(_, T), F && (T.finished ? process.nextTick(F) : _.once("finish", F)), T.ended = !0;
}
return xr;
}
var cr, u8;
function Ht() {
if (u8)
return cr;
u8 = 1, cr = a;
var n = Object.keys || function(u) {
var s = [];
for (var o in u)
s.push(o);
return s;
}, e = da();
e.inherits = Ea();
var t = rs(), i = ls();
e.inherits(a, t), r(n(i.prototype), function(u) {
a.prototype[u] || (a.prototype[u] = i.prototype[u]);
});
function a(u) {
if (!(this instanceof a))
return new a(u);
t.call(this, u), i.call(this, u), u && u.readable === !1 && (this.readable = !1), u && u.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, u && u.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", l);
}
function l() {
this.allowHalfOpen || this._writableState.ended || process.nextTick(this.end.bind(this));
}
function r(u, s) {
for (var o = 0, x = u.length; o < x; o++)
s(u[o], o);
}
return cr;
}
var hr = {}, s8;
function o8() {
if (s8)
return hr;
s8 = 1;
var n = f3.Buffer, e = n.isEncoding || function(u) {
switch (u && u.toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
case "raw":
return !0;
default:
return !1;
}
};
function t(u) {
if (u && !e(u))
throw new Error("Unknown encoding: " + u);
}
var i = hr.StringDecoder = function(u) {
switch (this.encoding = (u || "utf8").toLowerCase().replace(/[-_]/, ""), t(u), this.encoding) {
case "utf8":
this.surrogateSize = 3;
break;
case "ucs2":
case "utf16le":
this.surrogateSize = 2, this.detectIncompleteChar = l;
break;
case "base64":
this.surrogateSize = 3, this.detectIncompleteChar = r;
break;
default:
this.write = a;
return;
}
this.charBuffer = new n(6), this.charReceived = 0, this.charLength = 0;
};
i.prototype.write = function(u) {
for (var s = ""; this.charLength; ) {
var o = u.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : u.length;
if (u.copy(this.charBuffer, this.charReceived, 0, o), this.charReceived += o, this.charReceived < this.charLength)
return "";
u = u.slice(o, u.length), s = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
var p = s.charCodeAt(s.length - 1);
if (p >= 55296 && p <= 56319) {
this.charLength += this.surrogateSize, s = "";
continue;
}
if (this.charReceived = this.charLength = 0, u.length === 0)
return s;
break;
}
this.detectIncompleteChar(u);
var x = u.length;
this.charLength && (u.copy(this.charBuffer, 0, u.length - this.charReceived, x), x -= this.charReceived), s += u.toString(this.encoding, 0, x);
var x = s.length - 1, p = s.charCodeAt(x);
if (p >= 55296 && p <= 56319) {
var c = this.surrogateSize;
return this.charLength += c, this.charReceived += c, this.charBuffer.copy(this.charBuffer, c, 0, c), u.copy(this.charBuffer, 0, 0, c), s.substring(0, x);
}
return s;
}, i.prototype.detectIncompleteChar = function(u) {
for (var s = u.length >= 3 ? 3 : u.length; s > 0; s--) {
var o = u[u.length - s];
if (s == 1 && o >> 5 == 6) {
this.charLength = 2;
break;
}
if (s <= 2 && o >> 4 == 14) {
this.charLength = 3;
break;
}
if (s <= 3 && o >> 3 == 30) {
this.charLength = 4;
break;
}
}
this.charReceived = s;
}, i.prototype.end = function(u) {
var s = "";
if (u && u.length && (s = this.write(u)), this.charReceived) {
var o = this.charReceived, x = this.charBuffer, p = this.encoding;
s += x.slice(0, o).toString(p);
}
return s;
};
function a(u) {
return u.toString(this.encoding);
}
function l(u) {
this.charReceived = u.length % 2, this.charLength = this.charReceived ? 2 : 0;
}
function r(u) {
this.charReceived = u.length % 3, this.charLength = this.charReceived ? 3 : 0;
}
return hr;
}
var pr, x8;
function rs() {
if (x8)
return pr;
x8 = 1, pr = s;
var n = Wh(), e = f3.Buffer;
s.ReadableState = u;
var t = O3.EventEmitter;
t.listenerCount || (t.listenerCount = function(y, j) {
return y.listeners(j).length;
});
var i = J0, a = da();
a.inherits = Ea();
var l, r = cn;
r && r.debuglog ? r = r.debuglog("stream") : r = function() {
}, a.inherits(s, i);
function u(y, j) {
var z = Ht();
y = y || {};
var Q = y.highWaterMark, s0 = y.objectMode ? 16 : 16 * 1024;
this.highWaterMark = Q || Q === 0 ? Q : s0, this.highWaterMark = ~~this.highWaterMark, this.buffer = [], this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.objectMode = !!y.objectMode, j instanceof z && (this.objectMode = this.objectMode || !!y.readableObjectMode), this.defaultEncoding = y.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, y.encoding && (l || (l = o8().StringDecoder), this.decoder = new l(y.encoding), this.encoding = y.encoding);
}
function s(y) {
if (Ht(), !(this instanceof s))
return new s(y);
this._readableState = new u(y, this), this.readable = !0, i.call(this);
}
s.prototype.push = function(y, j) {
var z = this._readableState;
return a.isString(y) && !z.objectMode && (j = j || z.defaultEncoding, j !== z.encoding && (y = new e(y, j), j = "")), o(this, z, y, j, !1);
}, s.prototype.unshift = function(y) {
var j = this._readableState;
return o(this, j, y, "", !0);
};
function o(y, j, z, Q, s0) {
var f0 = E(j, z);
if (f0)
y.emit("error", f0);
else if (a.isNullOrUndefined(z))
j.reading = !1, j.ended || g(y, j);
else if (j.objectMode || z && z.length > 0)
if (j.ended && !s0) {
var B0 = new Error("stream.push() after EOF");
y.emit("error", B0);
} else if (j.endEmitted && s0) {
var B0 = new Error("stream.unshift() after end event");
y.emit("error", B0);
} else
j.decoder && !s0 && !Q && (z = j.decoder.write(z)), s0 || (j.reading = !1), j.flowing && j.length === 0 && !j.sync ? (y.emit("data", z), y.read(0)) : (j.length += j.objectMode ? 1 : z.length, s0 ? j.buffer.unshift(z) : j.buffer.push(z), j.needReadable && m(y)), w(y, j);
else
s0 || (j.reading = !1);
return x(j);
}
function x(y) {
return !y.ended && (y.needReadable || y.length < y.highWaterMark || y.length === 0);
}
s.prototype.setEncoding = function(y) {
return l || (l = o8().StringDecoder), this._readableState.decoder = new l(y), this._readableState.encoding = y, this;
};
var p = 8388608;
function c(y) {
if (y >= p)
y = p;
else {
y--;
for (var j = 1; j < 32; j <<= 1)
y |= y >> j;
y++;
}
return y;
}
function f(y, j) {
return j.length === 0 && j.ended ? 0 : j.objectMode ? y === 0 ? 0 : 1 : isNaN(y) || a.isNull(y) ? j.flowing && j.buffer.length ? j.buffer[0].length : j.length : y <= 0 ? 0 : (y > j.highWaterMark && (j.highWaterMark = c(y)), y > j.length ? j.ended ? j.length : (j.needReadable = !0, 0) : y);
}
s.prototype.read = function(y) {
r("read", y);
var j = this._readableState, z = y;
if ((!a.isNumber(y) || y > 0) && (j.emittedReadable = !1), y === 0 && j.needReadable && (j.length >= j.highWaterMark || j.ended))
return r("read: emitReadable", j.length, j.ended), j.length === 0 && j.ended ? N(this) : m(this), null;
if (y = f(y, j), y === 0 && j.ended)
return j.length === 0 && N(this), null;
var Q = j.needReadable;
r("need readable", Q), (j.length === 0 || j.length - y < j.highWaterMark) && (Q = !0, r("length less than watermark", Q)), (j.ended || j.reading) && (Q = !1, r("reading or ended", Q)), Q && (r("do read"), j.reading = !0, j.sync = !0, j.length === 0 && (j.needReadable = !0), this._read(j.highWaterMark), j.sync = !1), Q && !j.reading && (y = f(z, j));
var s0;
return y > 0 ? s0 = H(y, j) : s0 = null, a.isNull(s0) && (j.needReadable = !0, y = 0), j.length -= y, j.length === 0 && !j.ended && (j.needReadable = !0), z !== y && j.ended && j.length === 0 && N(this), a.isNull(s0) || this.emit("data", s0), s0;
};
function E(y, j) {
var z = null;
return !a.isBuffer(j) && !a.isString(j) && !a.isNullOrUndefined(j) && !y.objectMode && (z = new TypeError("Invalid non-string/buffer chunk")), z;
}
function g(y, j) {
if (j.decoder && !j.ended) {
var z = j.decoder.end();
z && z.length && (j.buffer.push(z), j.length += j.objectMode ? 1 : z.length);
}
j.ended = !0, m(y);
}
function m(y) {
var j = y._readableState;
j.needReadable = !1, j.emittedReadable || (r("emitReadable", j.flowing), j.emittedReadable = !0, j.sync ? process.nextTick(function() {
b(y);
}) : b(y));
}
function b(y) {
r("emit readable"), y.emit("readable"), F(y);
}
function w(y, j) {
j.readingMore || (j.readingMore = !0, process.nextTick(function() {
B(y, j);
}));
}
function B(y, j) {
for (var z = j.length; !j.reading && !j.flowing && !j.ended && j.length < j.highWaterMark && (r("maybeReadMore read 0"), y.read(0), z !== j.length); )
z = j.length;
j.readingMore = !1;
}
s.prototype._read = function(y) {
this.emit("error", new Error("not implemented"));
}, s.prototype.pipe = function(y, j) {
var z = this, Q = this._readableState;
switch (Q.pipesCount) {
case 0:
Q.pipes = y;
break;
case 1:
Q.pipes = [Q.pipes, y];
break;
default:
Q.pipes.push(y);
break;
}
Q.pipesCount += 1, r("pipe count=%d opts=%j", Q.pipesCount, j);
var s0 = (!j || j.end !== !1) && y !== process.stdout && y !== process.stderr, f0 = s0 ? W : y0;
Q.endEmitted ? process.nextTick(f0) : z.once("end", f0), y.on("unpipe", B0);
function B0(p0) {
r("onunpipe"), p0 === z && y0();
}
function W() {
r("onend"), y.end();
}
var g0 = k(z);
y.on("drain", g0);
function y0() {
r("cleanup"), y.removeListener("close", n0), y.removeListener("finish", V), y.removeListener("drain", g0), y.removeListener("error", r0), y.removeListener("unpipe", B0), z.removeListener("end", W), z.removeListener("end", y0), z.removeListener("data", Y), Q.awaitDrain && (!y._writableState || y._writableState.needDrain) && g0();
}
z.on("data", Y);
function Y(p0) {
r("ondata");
var U = y.write(p0);
U === !1 && (r(
"false write response, pause",
z._readableState.awaitDrain
), z._readableState.awaitDrain++, z.pause());
}
function r0(p0) {
r("onerror", p0), o0(), y.removeListener("error", r0), t.listenerCount(y, "error") === 0 && y.emit("error", p0);
}
!y._events || !y._events.error ? y.on("error", r0) : n(y._events.error) ? y._events.error.unshift(r0) : y._events.error = [r0, y._events.error];
function n0() {
y.removeListener("finish", V), o0();
}
y.once("close", n0);
function V() {
r("onfinish"), y.removeListener("close", n0), o0();
}
y.once("finish", V);
function o0() {
r("unpipe"), z.unpipe(y);
}
return y.emit("pipe", z), Q.flowing || (r("pipe resume"), z.resume()), y;
};
function k(y) {
return function() {
var j = y._readableState;
r("pipeOnDrain", j.awaitDrain), j.awaitDrain && j.awaitDrain--, j.awaitDrain === 0 && t.listenerCount(y, "data") && (j.flowing = !0, F(y));
};
}
s.prototype.unpipe = function(y) {
var j = this._readableState;
if (j.pipesCount === 0)
return this;
if (j.pipesCount === 1)
return y && y !== j.pipes ? this : (y || (y = j.pipes), j.pipes = null, j.pipesCount = 0, j.flowing = !1, y && y.emit("unpipe", this), this);
if (!y) {
var z = j.pipes, Q = j.pipesCount;
j.pipes = null, j.pipesCount = 0, j.flowing = !1;
for (var s0 = 0; s0 < Q; s0++)
z[s0].emit("unpipe", this);
return this;
}
var s0 = R(j.pipes, y);
return s0 === -1 ? this : (j.pipes.splice(s0, 1), j.pipesCount -= 1, j.pipesCount === 1 && (j.pipes = j.pipes[0]), y.emit("unpipe", this), this);
}, s.prototype.on = function(y, j) {
var z = i.prototype.on.call(this, y, j);
if (y === "data" && this._readableState.flowing !== !1 && this.resume(), y === "readable" && this.readable) {
var Q = this._readableState;
if (!Q.readableListening)
if (Q.readableListening = !0, Q.emittedReadable = !1, Q.needReadable = !0, Q.reading)
Q.length && m(this);
else {
var s0 = this;
process.nextTick(function() {
r("readable nexttick read 0"), s0.read(0);
});
}
}
return z;
}, s.prototype.addListener = s.prototype.on, s.prototype.resume = function() {
var y = this._readableState;
return y.flowing || (r("resume"), y.flowing = !0, y.reading || (r("resume read 0"), this.read(0)), _(this, y)), this;
};
function _(y, j) {
j.resumeScheduled || (j.resumeScheduled = !0, process.nextTick(function() {
T(y, j);
}));
}
function T(y, j) {
j.resumeScheduled = !1, y.emit("resume"), F(y), j.flowing && !j.reading && y.read(0);
}
s.prototype.pause = function() {
return r("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (r("pause"), this._readableState.flowing = !1, this.emit("pause")), this;
};
function F(y) {
var j = y._readableState;
if (r("flow", j.flowing), j.flowing)
do
var z = y.read();
while (z !== null && j.flowing);
}
s.prototype.wrap = function(y) {
var j = this._readableState, z = !1, Q = this;
y.on("end", function() {
if (r("wrapped end"), j.decoder && !j.ended) {
var B0 = j.decoder.end();
B0 && B0.length && Q.push(B0);
}
Q.push(null);
}), y.on("data", function(B0) {
if (r("wrapped data"), j.decoder && (B0 = j.decoder.write(B0)), !(!B0 || !j.objectMode && !B0.length)) {
var W = Q.push(B0);
W || (z = !0, y.pause());
}
});
for (var s0 in y)
a.isFunction(y[s0]) && a.isUndefined(this[s0]) && (this[s0] = function(B0) {
return function() {
return y[B0].apply(y, arguments);
};
}(s0));
var f0 = ["error", "close", "destroy", "pause", "resume"];
return J(f0, function(B0) {
y.on(B0, Q.emit.bind(Q, B0));
}), Q._read = function(B0) {
r("wrapped _read", B0), z && (z = !1, y.resume());
}, Q;
}, s._fromList = H;
function H(y, j) {
var z = j.buffer, Q = j.length, s0 = !!j.decoder, f0 = !!j.objectMode, B0;
if (z.length === 0)
return null;
if (Q === 0)
B0 = null;
else if (f0)
B0 = z.shift();
else if (!y || y >= Q)
s0 ? B0 = z.join("") : B0 = e.concat(z, Q), z.length = 0;
else if (y < z[0].length) {
var W = z[0];
B0 = W.slice(0, y), z[0] = W.slice(y);
} else if (y === z[0].length)
B0 = z.shift();
else {
s0 ? B0 = "" : B0 = new e(y);
for (var g0 = 0, y0 = 0, Y = z.length; y0 < Y && g0 < y; y0++) {
var W = z[0], r0 = Math.min(y - g0, W.length);
s0 ? B0 += W.slice(0, r0) : W.copy(B0, g0, 0, r0), r0 < W.length ? z[0] = W.slice(r0) : z.shift(), g0 += r0;
}
}
return B0;
}
function N(y) {
var j = y._readableState;
if (j.length > 0)
throw new Error("endReadable called on non-empty stream");
j.endEmitted || (j.ended = !0, process.nextTick(function() {
!j.endEmitted && j.length === 0 && (j.endEmitted = !0, y.readable = !1, y.emit("end"));
}));
}
function J(y, j) {
for (var z = 0, Q = y.length; z < Q; z++)
j(y[z], z);
}
function R(y, j) {
for (var z = 0, Q = y.length; z < Q; z++)
if (y[z] === j)
return z;
return -1;
}
return pr;
}
var fr, c8;
function us() {
if (c8)
return fr;
c8 = 1, fr = a;
var n = Ht(), e = da();
e.inherits = Ea(), e.inherits(a, n);
function t(r, u) {
this.afterTransform = function(s, o) {
return i(u, s, o);
}, this.needTransform = !1, this.transforming = !1, this.writecb = null, this.writechunk = null;
}
function i(r, u, s) {
var o = r._transformState;
o.transforming = !1;
var x = o.writecb;
if (!x)
return r.emit("error", new Error("no writecb in Transform class"));
o.writechunk = null, o.writecb = null, e.isNullOrUndefined(s) || r.push(s), x && x(u);
var p = r._readableState;
p.reading = !1, (p.needReadable || p.length < p.highWaterMark) && r._read(p.highWaterMark);
}
function a(r) {
if (!(this instanceof a))
return new a(r);
n.call(this, r), this._transformState = new t(r, this);
var u = this;
this._readableState.needReadable = !0, this._readableState.sync = !1, this.once("prefinish", function() {
e.isFunction(this._flush) ? this._flush(function(s) {
l(u, s);
}) : l(u);
});
}
a.prototype.push = function(r, u) {
return this._transformState.needTransform = !1, n.prototype.push.call(this, r, u);
}, a.prototype._transform = function(r, u, s) {
throw new Error("not implemented");
}, a.prototype._write = function(r, u, s) {
var o = this._transformState;
if (o.writecb = s, o.writechunk = r, o.writeencoding = u, !o.transforming) {
var x = this._readableState;
(o.needTransform || x.needReadable || x.length < x.highWaterMark) && this._read(x.highWaterMark);
}
}, a.prototype._read = function(r) {
var u = this._transformState;
!e.isNull(u.writechunk) && u.writecb && !u.transforming ? (u.transforming = !0, this._transform(u.writechunk, u.writeencoding, u.afterTransform)) : u.needTransform = !0;
};
function l(r, u) {
if (u)
return r.emit("error", u);
var s = r._writableState, o = r._transformState;
if (s.length)
throw new Error("calling transform done when ws.length != 0");
if (o.transforming)
throw new Error("calling transform done when still transforming");
return r.push(null);
}
return fr;
}
var dr, h8;
function Qh() {
if (h8)
return dr;
h8 = 1, dr = t;
var n = us(), e = da();
e.inherits = Ea(), e.inherits(t, n);
function t(i) {
if (!(this instanceof t))
return new t(i);
n.call(this, i);
}
return t.prototype._transform = function(i, a, l) {
l(null, i);
}, dr;
}
var p8;
function Kh() {
return p8 || (p8 = 1, function(n, e) {
e = n.exports = rs(), e.Stream = J0, e.Readable = e, e.Writable = ls(), e.Duplex = Ht(), e.Transform = us(), e.PassThrough = Qh(), !process.browser && process.env.READABLE_STREAM === "disable" && (n.exports = J0);
}(c4, c4.exports)), c4.exports;
}
var Ai = {}, Er, f8;
function $h() {
return f8 || (f8 = 1, Er = {
big5: [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, n