@stablyai/playwright-test 2.0.12 → 2.0.15
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/dist/{index-YCMYxOS2.mjs → index-BklBJUIC.mjs} +1342 -1305
- package/dist/index-BklBJUIC.mjs.map +1 -0
- package/dist/{index-Cf1SUa76.cjs → index-Da3bGLIB.cjs} +1341 -1304
- package/dist/index-Da3bGLIB.cjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/{index.d-DaMmBaG3.d.cts → index.d-BjGuH5NO.d.cts} +9 -1
- package/dist/{index.d-DaMmBaG3.d.cts.map → index.d-BjGuH5NO.d.cts.map} +1 -1
- package/dist/{index.d-DaMmBaG3.d.ts → index.d-BjGuH5NO.d.mts} +9 -1
- package/dist/{index.d-DaMmBaG3.d.mts.map → index.d-BjGuH5NO.d.mts.map} +1 -1
- package/dist/{index.d-DaMmBaG3.d.mts → index.d-BjGuH5NO.d.ts} +9 -1
- package/dist/{index.d-DaMmBaG3.d.ts.map → index.d-BjGuH5NO.d.ts.map} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/reporter.cjs +2 -2
- package/dist/reporter.d.cts +1 -1
- package/dist/reporter.d.mts +1 -1
- package/dist/reporter.mjs +2 -2
- package/package.json +4 -4
- package/dist/index-Cf1SUa76.cjs.map +0 -1
- package/dist/index-YCMYxOS2.mjs.map +0 -1
|
@@ -15,7 +15,7 @@ var require$$0 = require('stream');
|
|
|
15
15
|
var node_util = require('node:util');
|
|
16
16
|
var g = require('node:readline');
|
|
17
17
|
require('node:stream');
|
|
18
|
-
var
|
|
18
|
+
var ei = require('util');
|
|
19
19
|
var require$$0$5 = require('events');
|
|
20
20
|
var require$$1$1 = require('https');
|
|
21
21
|
var require$$2 = require('http');
|
|
@@ -25,7 +25,7 @@ var require$$1 = require('crypto');
|
|
|
25
25
|
var require$$7 = require('url');
|
|
26
26
|
var require$$0$3 = require('zlib');
|
|
27
27
|
var require$$0$4 = require('buffer');
|
|
28
|
-
var
|
|
28
|
+
var wr = require('os');
|
|
29
29
|
|
|
30
30
|
function _interopNamespaceDefault(e) {
|
|
31
31
|
var n = Object.create(null);
|
|
@@ -2432,6 +2432,7 @@ function getAttemptFromEnv(ciService) {
|
|
|
2432
2432
|
return process.env.SYSTEM_JOBATTEMPT;
|
|
2433
2433
|
case "bitbucket":
|
|
2434
2434
|
return process.env.BITBUCKET_STEP_RUN_NUMBER;
|
|
2435
|
+
case void 0:
|
|
2435
2436
|
default:
|
|
2436
2437
|
return void 0;
|
|
2437
2438
|
}
|
|
@@ -2447,7 +2448,7 @@ function getCiRunKey() {
|
|
|
2447
2448
|
const attempt = getAttemptFromEnv(ci.service);
|
|
2448
2449
|
const parts = [
|
|
2449
2450
|
ci.service,
|
|
2450
|
-
"slug" in ci ? ci.slug : void 0,
|
|
2451
|
+
"slug" in ci ? ci.slug?.replace(/\//g, "_") : void 0,
|
|
2451
2452
|
"build" in ci ? String(ci.build) : void 0,
|
|
2452
2453
|
"job" in ci ? String(ci.job) : void 0,
|
|
2453
2454
|
attempt && String(attempt)
|
|
@@ -2594,7 +2595,7 @@ function requirePicocolors () {
|
|
|
2594
2595
|
}
|
|
2595
2596
|
|
|
2596
2597
|
var picocolorsExports = /*@__PURE__*/ requirePicocolors();
|
|
2597
|
-
var
|
|
2598
|
+
var Ce = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
|
|
2598
2599
|
|
|
2599
2600
|
function DD({ onlyFirst: e = false } = {}) {
|
|
2600
2601
|
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
@@ -2704,14 +2705,14 @@ function ce$1() {
|
|
|
2704
2705
|
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2705
2706
|
}
|
|
2706
2707
|
const V$1 = ce$1(), u = (t, n) => V$1 ? t : n, L = u("\u25A0", "x"), W$1 = u("\u25B2", "x"), C = u("\u25C7", "o"), ue$1 = u("\u250C", "T"), o = u("\u2502", "|"), d = u("\u2514", "\u2014"), Ie$1 = (t = "") => {
|
|
2707
|
-
process.stdout.write(`${
|
|
2708
|
+
process.stdout.write(`${Ce.gray(ue$1)} ${t}
|
|
2708
2709
|
`);
|
|
2709
2710
|
}, Se$1 = (t = "") => {
|
|
2710
|
-
process.stdout.write(`${
|
|
2711
|
-
${
|
|
2711
|
+
process.stdout.write(`${Ce.gray(o)}
|
|
2712
|
+
${Ce.gray(d)} ${t}
|
|
2712
2713
|
|
|
2713
2714
|
`);
|
|
2714
|
-
}; `${
|
|
2715
|
+
}; `${Ce.gray(o)} `; const Y$1 = ({ indicator: t = "dots" } = {}) => {
|
|
2715
2716
|
const n = V$1 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], r = V$1 ? 80 : 120, i = process.env.CI === "true";
|
|
2716
2717
|
let s, c, a = false, l = "", $, g = performance.now();
|
|
2717
2718
|
const p = (m) => {
|
|
@@ -2732,13 +2733,13 @@ ${be.gray(d)} ${t}
|
|
|
2732
2733
|
const h = (performance.now() - m) / 1e3, w = Math.floor(h / 60), I = Math.floor(h % 60);
|
|
2733
2734
|
return w > 0 ? `[${w}m ${I}s]` : `[${I}s]`;
|
|
2734
2735
|
}, H = (m = "") => {
|
|
2735
|
-
a = true, s = fD(), l = R(m), g = performance.now(), process.stdout.write(`${
|
|
2736
|
+
a = true, s = fD(), l = R(m), g = performance.now(), process.stdout.write(`${Ce.gray(o)}
|
|
2736
2737
|
`);
|
|
2737
2738
|
let h = 0, w = 0;
|
|
2738
2739
|
j(), c = setInterval(() => {
|
|
2739
2740
|
if (i && l === $) return;
|
|
2740
2741
|
B(), $ = l;
|
|
2741
|
-
const I =
|
|
2742
|
+
const I = Ce.magenta(n[h]);
|
|
2742
2743
|
if (i) process.stdout.write(`${I} ${l}...`);
|
|
2743
2744
|
else if (t === "timer") process.stdout.write(`${I} ${l} ${O(g)}`);
|
|
2744
2745
|
else {
|
|
@@ -2749,7 +2750,7 @@ ${be.gray(d)} ${t}
|
|
|
2749
2750
|
}, r);
|
|
2750
2751
|
}, N = (m = "", h = 0) => {
|
|
2751
2752
|
a = false, clearInterval(c), B();
|
|
2752
|
-
const w = h === 0 ?
|
|
2753
|
+
const w = h === 0 ? Ce.green(C) : h === 1 ? Ce.red(L) : Ce.red(W$1);
|
|
2753
2754
|
l = R(m ?? l), t === "timer" ? process.stdout.write(`${w} ${l} ${O(g)}
|
|
2754
2755
|
`) : process.stdout.write(`${w} ${l}
|
|
2755
2756
|
`), E(), s();
|
|
@@ -6604,111 +6605,111 @@ async function pRetry(input, options = {}) {
|
|
|
6604
6605
|
throw new Error("Retry attempts exhausted without throwing an error.");
|
|
6605
6606
|
}
|
|
6606
6607
|
|
|
6607
|
-
var
|
|
6608
|
-
var s = (e, t) =>
|
|
6609
|
-
const st = BigInt(2 ** 32 - 1),
|
|
6610
|
-
function
|
|
6611
|
-
return t ? { h: Number(e & st), l: Number(e >>
|
|
6612
|
-
}
|
|
6613
|
-
s(
|
|
6614
|
-
function
|
|
6608
|
+
var Yn = Object.defineProperty;
|
|
6609
|
+
var s = (e, t) => Yn(e, "name", { value: t, configurable: true });
|
|
6610
|
+
const st = BigInt(2 ** 32 - 1), Ar = BigInt(32);
|
|
6611
|
+
function ui(e, t = false) {
|
|
6612
|
+
return t ? { h: Number(e & st), l: Number(e >> Ar & st) } : { h: Number(e >> Ar & st) | 0, l: Number(e & st) | 0 };
|
|
6613
|
+
}
|
|
6614
|
+
s(ui, "fromBig");
|
|
6615
|
+
function li(e, t = false) {
|
|
6615
6616
|
const r = e.length;
|
|
6616
|
-
let n = new Uint32Array(r),
|
|
6617
|
-
for (let
|
|
6618
|
-
const { h: c, l } =
|
|
6619
|
-
[n[
|
|
6617
|
+
let n = new Uint32Array(r), i = new Uint32Array(r);
|
|
6618
|
+
for (let o = 0; o < r; o++) {
|
|
6619
|
+
const { h: c, l } = ui(e[o], t);
|
|
6620
|
+
[n[o], i[o]] = [c, l];
|
|
6620
6621
|
}
|
|
6621
|
-
return [n,
|
|
6622
|
+
return [n, i];
|
|
6622
6623
|
}
|
|
6623
|
-
s(
|
|
6624
|
-
const
|
|
6624
|
+
s(li, "split");
|
|
6625
|
+
const fi = s((e, t, r) => e << r | t >>> 32 - r, "rotlSH"), hi = s((e, t, r) => t << r | e >>> 32 - r, "rotlSL"), di = s((e, t, r) => t << r - 32 | e >>> 64 - r, "rotlBH"), pi = s((e, t, r) => e << r - 32 | t >>> 64 - r, "rotlBL");
|
|
6625
6626
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
6626
|
-
function
|
|
6627
|
+
function mi(e) {
|
|
6627
6628
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
6628
6629
|
}
|
|
6629
|
-
s(
|
|
6630
|
-
function
|
|
6630
|
+
s(mi, "isBytes");
|
|
6631
|
+
function vr(e, t = "") {
|
|
6631
6632
|
if (!Number.isSafeInteger(e) || e < 0) {
|
|
6632
6633
|
const r = t && `"${t}" `;
|
|
6633
6634
|
throw new Error(`${r}expected integer >= 0, got ${e}`);
|
|
6634
6635
|
}
|
|
6635
6636
|
}
|
|
6636
|
-
s(
|
|
6637
|
+
s(vr, "anumber");
|
|
6637
6638
|
function Ut(e, t, r = "") {
|
|
6638
|
-
const n =
|
|
6639
|
+
const n = mi(e), i = e?.length;
|
|
6639
6640
|
if (!n || t !== void 0) {
|
|
6640
|
-
const c = r && `"${r}" `, l = "", h = n ? `length=${
|
|
6641
|
+
const c = r && `"${r}" `, l = "", h = n ? `length=${i}` : `type=${typeof e}`;
|
|
6641
6642
|
throw new Error(c + "expected Uint8Array" + l + ", got " + h);
|
|
6642
6643
|
}
|
|
6643
6644
|
return e;
|
|
6644
6645
|
}
|
|
6645
6646
|
s(Ut, "abytes");
|
|
6646
|
-
function
|
|
6647
|
+
function br(e, t = true) {
|
|
6647
6648
|
if (e.destroyed) throw new Error("Hash instance has been destroyed");
|
|
6648
6649
|
if (t && e.finished) throw new Error("Hash#digest() has already been called");
|
|
6649
6650
|
}
|
|
6650
|
-
s(
|
|
6651
|
-
function
|
|
6651
|
+
s(br, "aexists");
|
|
6652
|
+
function Ei(e, t) {
|
|
6652
6653
|
Ut(e, void 0, "digestInto() output");
|
|
6653
6654
|
const r = t.outputLen;
|
|
6654
6655
|
if (e.length < r) throw new Error('"digestInto() output" expected to be of length >=' + r);
|
|
6655
6656
|
}
|
|
6656
|
-
s(
|
|
6657
|
-
function
|
|
6657
|
+
s(Ei, "aoutput");
|
|
6658
|
+
function _i(e) {
|
|
6658
6659
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
6659
6660
|
}
|
|
6660
|
-
s(
|
|
6661
|
-
function
|
|
6661
|
+
s(_i, "u32");
|
|
6662
|
+
function Cr(...e) {
|
|
6662
6663
|
for (let t = 0; t < e.length; t++) e[t].fill(0);
|
|
6663
6664
|
}
|
|
6664
|
-
s(
|
|
6665
|
-
const
|
|
6666
|
-
function
|
|
6665
|
+
s(Cr, "clean");
|
|
6666
|
+
const gi = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
6667
|
+
function Ii(e) {
|
|
6667
6668
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
6668
6669
|
}
|
|
6669
|
-
s(
|
|
6670
|
-
function
|
|
6671
|
-
for (let t = 0; t < e.length; t++) e[t] =
|
|
6670
|
+
s(Ii, "byteSwap");
|
|
6671
|
+
function Si(e) {
|
|
6672
|
+
for (let t = 0; t < e.length; t++) e[t] = Ii(e[t]);
|
|
6672
6673
|
return e;
|
|
6673
6674
|
}
|
|
6674
|
-
s(
|
|
6675
|
-
const
|
|
6676
|
-
function
|
|
6677
|
-
const r = s((
|
|
6678
|
-
return r.outputLen = n.outputLen, r.blockLen = n.blockLen, r.create = (
|
|
6675
|
+
s(Si, "byteSwap32");
|
|
6676
|
+
const Ur = gi ? (e) => e : Si;
|
|
6677
|
+
function Ri(e, t = {}) {
|
|
6678
|
+
const r = s((i, o) => e(o).update(i).digest(), "hashC"), n = e(void 0);
|
|
6679
|
+
return r.outputLen = n.outputLen, r.blockLen = n.blockLen, r.create = (i) => e(i), Object.assign(r, t), Object.freeze(r);
|
|
6679
6680
|
}
|
|
6680
|
-
s(
|
|
6681
|
-
const
|
|
6681
|
+
s(Ri, "createHasher");
|
|
6682
|
+
const Ti = s((e) => ({ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e]) }), "oidNist"), yi = BigInt(0), Qe = BigInt(1), wi = BigInt(2), Ai = BigInt(7), vi = BigInt(256), bi = BigInt(113), Br = [], Or = [], Lr = [];
|
|
6682
6683
|
for (let e = 0, t = Qe, r = 1, n = 0; e < 24; e++) {
|
|
6683
|
-
[r, n] = [n, (2 * r + 3 * n) % 5],
|
|
6684
|
-
let
|
|
6685
|
-
for (let
|
|
6686
|
-
|
|
6684
|
+
[r, n] = [n, (2 * r + 3 * n) % 5], Br.push(2 * (5 * n + r)), Or.push((e + 1) * (e + 2) / 2 % 64);
|
|
6685
|
+
let i = yi;
|
|
6686
|
+
for (let o = 0; o < 7; o++) t = (t << Qe ^ (t >> Ai) * bi) % vi, t & wi && (i ^= Qe << (Qe << BigInt(o)) - Qe);
|
|
6687
|
+
Lr.push(i);
|
|
6687
6688
|
}
|
|
6688
|
-
const
|
|
6689
|
-
function
|
|
6689
|
+
const Pr = li(Lr, true), Ci = Pr[0], Ui = Pr[1], Nr = s((e, t, r) => r > 32 ? di(e, t, r) : fi(e, t, r), "rotlH"), Dr = s((e, t, r) => r > 32 ? pi(e, t, r) : hi(e, t, r), "rotlL");
|
|
6690
|
+
function Bi(e, t = 24) {
|
|
6690
6691
|
const r = new Uint32Array(10);
|
|
6691
6692
|
for (let n = 24 - t; n < 24; n++) {
|
|
6692
6693
|
for (let c = 0; c < 10; c++) r[c] = e[c] ^ e[c + 10] ^ e[c + 20] ^ e[c + 30] ^ e[c + 40];
|
|
6693
6694
|
for (let c = 0; c < 10; c += 2) {
|
|
6694
|
-
const l = (c + 8) % 10, h = (c + 2) % 10,
|
|
6695
|
-
for (let O = 0; O < 50; O += 10) e[c + O] ^= A, e[c + O + 1] ^=
|
|
6695
|
+
const l = (c + 8) % 10, h = (c + 2) % 10, g = r[h], m = r[h + 1], A = Nr(g, m, 1) ^ r[l], b = Dr(g, m, 1) ^ r[l + 1];
|
|
6696
|
+
for (let O = 0; O < 50; O += 10) e[c + O] ^= A, e[c + O + 1] ^= b;
|
|
6696
6697
|
}
|
|
6697
|
-
let
|
|
6698
|
+
let i = e[2], o = e[3];
|
|
6698
6699
|
for (let c = 0; c < 24; c++) {
|
|
6699
|
-
const l =
|
|
6700
|
-
|
|
6700
|
+
const l = Or[c], h = Nr(i, o, l), g = Dr(i, o, l), m = Br[c];
|
|
6701
|
+
i = e[m], o = e[m + 1], e[m] = h, e[m + 1] = g;
|
|
6701
6702
|
}
|
|
6702
6703
|
for (let c = 0; c < 50; c += 10) {
|
|
6703
6704
|
for (let l = 0; l < 10; l++) r[l] = e[c + l];
|
|
6704
6705
|
for (let l = 0; l < 10; l++) e[c + l] ^= ~r[(l + 2) % 10] & r[(l + 4) % 10];
|
|
6705
6706
|
}
|
|
6706
|
-
e[0] ^=
|
|
6707
|
+
e[0] ^= Ci[n], e[1] ^= Ui[n];
|
|
6707
6708
|
}
|
|
6708
|
-
|
|
6709
|
+
Cr(r);
|
|
6709
6710
|
}
|
|
6710
|
-
s(
|
|
6711
|
-
class
|
|
6711
|
+
s(Bi, "keccakP");
|
|
6712
|
+
class mr {
|
|
6712
6713
|
static {
|
|
6713
6714
|
s(this, "Keccak");
|
|
6714
6715
|
}
|
|
@@ -6723,22 +6724,22 @@ class dr {
|
|
|
6723
6724
|
outputLen;
|
|
6724
6725
|
enableXOF = false;
|
|
6725
6726
|
rounds;
|
|
6726
|
-
constructor(t, r, n,
|
|
6727
|
-
if (this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF =
|
|
6728
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
6727
|
+
constructor(t, r, n, i = false, o = 24) {
|
|
6728
|
+
if (this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = i, this.rounds = o, vr(n, "outputLen"), !(0 < t && t < 200)) throw new Error("only keccak-f1600 function is supported");
|
|
6729
|
+
this.state = new Uint8Array(200), this.state32 = _i(this.state);
|
|
6729
6730
|
}
|
|
6730
6731
|
clone() {
|
|
6731
6732
|
return this._cloneInto();
|
|
6732
6733
|
}
|
|
6733
6734
|
keccak() {
|
|
6734
|
-
|
|
6735
|
+
Ur(this.state32), Bi(this.state32, this.rounds), Ur(this.state32), this.posOut = 0, this.pos = 0;
|
|
6735
6736
|
}
|
|
6736
6737
|
update(t) {
|
|
6737
|
-
|
|
6738
|
-
const { blockLen: r, state: n } = this,
|
|
6739
|
-
for (let
|
|
6740
|
-
const c = Math.min(r - this.pos,
|
|
6741
|
-
for (let l = 0; l < c; l++) n[this.pos++] ^= t[
|
|
6738
|
+
br(this), Ut(t);
|
|
6739
|
+
const { blockLen: r, state: n } = this, i = t.length;
|
|
6740
|
+
for (let o = 0; o < i; ) {
|
|
6741
|
+
const c = Math.min(r - this.pos, i - o);
|
|
6742
|
+
for (let l = 0; l < c; l++) n[this.pos++] ^= t[o++];
|
|
6742
6743
|
this.pos === r && this.keccak();
|
|
6743
6744
|
}
|
|
6744
6745
|
return this;
|
|
@@ -6746,16 +6747,16 @@ class dr {
|
|
|
6746
6747
|
finish() {
|
|
6747
6748
|
if (this.finished) return;
|
|
6748
6749
|
this.finished = true;
|
|
6749
|
-
const { state: t, suffix: r, pos: n, blockLen:
|
|
6750
|
-
t[n] ^= r, (r & 128) !== 0 && n ===
|
|
6750
|
+
const { state: t, suffix: r, pos: n, blockLen: i } = this;
|
|
6751
|
+
t[n] ^= r, (r & 128) !== 0 && n === i - 1 && this.keccak(), t[i - 1] ^= 128, this.keccak();
|
|
6751
6752
|
}
|
|
6752
6753
|
writeInto(t) {
|
|
6753
|
-
|
|
6754
|
+
br(this, false), Ut(t), this.finish();
|
|
6754
6755
|
const r = this.state, { blockLen: n } = this;
|
|
6755
|
-
for (let
|
|
6756
|
+
for (let i = 0, o = t.length; i < o; ) {
|
|
6756
6757
|
this.posOut >= n && this.keccak();
|
|
6757
|
-
const c = Math.min(n - this.posOut,
|
|
6758
|
-
t.set(r.subarray(this.posOut, this.posOut + c),
|
|
6758
|
+
const c = Math.min(n - this.posOut, o - i);
|
|
6759
|
+
t.set(r.subarray(this.posOut, this.posOut + c), i), this.posOut += c, i += c;
|
|
6759
6760
|
}
|
|
6760
6761
|
return t;
|
|
6761
6762
|
}
|
|
@@ -6764,30 +6765,30 @@ class dr {
|
|
|
6764
6765
|
return this.writeInto(t);
|
|
6765
6766
|
}
|
|
6766
6767
|
xof(t) {
|
|
6767
|
-
return
|
|
6768
|
+
return vr(t), this.xofInto(new Uint8Array(t));
|
|
6768
6769
|
}
|
|
6769
6770
|
digestInto(t) {
|
|
6770
|
-
if (
|
|
6771
|
+
if (Ei(t, this), this.finished) throw new Error("digest() was already called");
|
|
6771
6772
|
return this.writeInto(t), this.destroy(), t;
|
|
6772
6773
|
}
|
|
6773
6774
|
digest() {
|
|
6774
6775
|
return this.digestInto(new Uint8Array(this.outputLen));
|
|
6775
6776
|
}
|
|
6776
6777
|
destroy() {
|
|
6777
|
-
this.destroyed = true,
|
|
6778
|
+
this.destroyed = true, Cr(this.state);
|
|
6778
6779
|
}
|
|
6779
6780
|
_cloneInto(t) {
|
|
6780
|
-
const { blockLen: r, suffix: n, outputLen:
|
|
6781
|
-
return t ||= new
|
|
6781
|
+
const { blockLen: r, suffix: n, outputLen: i, rounds: o, enableXOF: c } = this;
|
|
6782
|
+
return t ||= new mr(r, n, i, c, o), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = o, t.suffix = n, t.outputLen = i, t.enableXOF = c, t.destroyed = this.destroyed, t;
|
|
6782
6783
|
}
|
|
6783
6784
|
}
|
|
6784
|
-
const
|
|
6785
|
-
var
|
|
6786
|
-
function
|
|
6787
|
-
var t, r, n,
|
|
6788
|
-
function
|
|
6789
|
-
var f,
|
|
6790
|
-
if (!(R instanceof
|
|
6785
|
+
const Oi = s((e, t, r, n = {}) => Ri(() => new mr(t, e, r), n), "genKeccak"), Li = Oi(6, 72, 64, Ti(10));
|
|
6786
|
+
var Pi = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Bt = Math.ceil, ce = Math.floor, oe = "[BigNumber Error] ", Mr = oe + "Number primitive has more than 15 significant digits: ", me = 1e14, $ = 14, Ot = 9007199254740991, Lt = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Ue = 1e7, te = 1e9;
|
|
6787
|
+
function xr(e) {
|
|
6788
|
+
var t, r, n, i = y.prototype = { constructor: y, toString: null, valueOf: null }, o = new y(1), c = 20, l = 4, h = -7, g = 21, m = -1e7, A = 1e7, b = false, O = 1, x = 0, M = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: "\xA0", suffix: "" }, w = "0123456789abcdefghijklmnopqrstuvwxyz", C = true;
|
|
6789
|
+
function y(a, u) {
|
|
6790
|
+
var f, _, p, I, T, d, E, S, R = this;
|
|
6791
|
+
if (!(R instanceof y)) return new y(a, u);
|
|
6791
6792
|
if (u == null) {
|
|
6792
6793
|
if (a && a._isBigNumber === true) {
|
|
6793
6794
|
R.s = a.s, !a.c || a.e > A ? R.c = R.e = null : a.e < m ? R.c = [R.e = 0] : (R.e = a.e, R.c = a.c.slice());
|
|
@@ -6801,18 +6802,18 @@ function Pr(e) {
|
|
|
6801
6802
|
}
|
|
6802
6803
|
S = String(a);
|
|
6803
6804
|
} else {
|
|
6804
|
-
if (!
|
|
6805
|
+
if (!Pi.test(S = String(a))) return n(R, S, d);
|
|
6805
6806
|
R.s = S.charCodeAt(0) == 45 ? (S = S.slice(1), -1) : 1;
|
|
6806
6807
|
}
|
|
6807
6808
|
(I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (T = S.search(/e/i)) > 0 ? (I < 0 && (I = T), I += +S.slice(T + 1), S = S.substring(0, T)) : I < 0 && (I = S.length);
|
|
6808
6809
|
} else {
|
|
6809
|
-
if (J(u, 2,
|
|
6810
|
+
if (J(u, 2, w.length, "Base"), u == 10 && C) return R = new y(a), G(R, c + R.e + 1, l);
|
|
6810
6811
|
if (S = String(a), d = typeof a == "number") {
|
|
6811
6812
|
if (a * 0 != 0) return n(R, S, d, u);
|
|
6812
|
-
if (R.s = 1 / a < 0 ? (S = S.slice(1), -1) : 1,
|
|
6813
|
+
if (R.s = 1 / a < 0 ? (S = S.slice(1), -1) : 1, y.DEBUG && S.replace(/^0\.0*|\./, "").length > 15) throw Error(Mr + a);
|
|
6813
6814
|
} else R.s = S.charCodeAt(0) === 45 ? (S = S.slice(1), -1) : 1;
|
|
6814
|
-
for (f =
|
|
6815
|
-
if (
|
|
6815
|
+
for (f = w.slice(0, u), I = T = 0, E = S.length; T < E; T++) if (f.indexOf(_ = S.charAt(T)) < 0) {
|
|
6816
|
+
if (_ == ".") {
|
|
6816
6817
|
if (T > I) {
|
|
6817
6818
|
I = E;
|
|
6818
6819
|
continue;
|
|
@@ -6828,7 +6829,7 @@ function Pr(e) {
|
|
|
6828
6829
|
for (T = 0; S.charCodeAt(T) === 48; T++) ;
|
|
6829
6830
|
for (E = S.length; S.charCodeAt(--E) === 48; ) ;
|
|
6830
6831
|
if (S = S.slice(T, ++E)) {
|
|
6831
|
-
if (E -= T, d &&
|
|
6832
|
+
if (E -= T, d && y.DEBUG && E > 15 && (a > Ot || a !== ce(a))) throw Error(Mr + R.s * a);
|
|
6832
6833
|
if ((I = I - T - 1) > A) R.c = R.e = null;
|
|
6833
6834
|
else if (I < m) R.c = [R.e = 0];
|
|
6834
6835
|
else {
|
|
@@ -6841,59 +6842,59 @@ function Pr(e) {
|
|
|
6841
6842
|
}
|
|
6842
6843
|
} else R.c = [R.e = 0];
|
|
6843
6844
|
}
|
|
6844
|
-
s(
|
|
6845
|
+
s(y, "BigNumber2"), y.clone = xr, y.ROUND_UP = 0, y.ROUND_DOWN = 1, y.ROUND_CEIL = 2, y.ROUND_FLOOR = 3, y.ROUND_HALF_UP = 4, y.ROUND_HALF_DOWN = 5, y.ROUND_HALF_EVEN = 6, y.ROUND_HALF_CEIL = 7, y.ROUND_HALF_FLOOR = 8, y.EUCLID = 9, y.config = y.set = function(a) {
|
|
6845
6846
|
var u, f;
|
|
6846
6847
|
if (a != null) if (typeof a == "object") {
|
|
6847
|
-
if (a.hasOwnProperty(u = "DECIMAL_PLACES") && (f = a[u], J(f, 0, te, u), c = f), a.hasOwnProperty(u = "ROUNDING_MODE") && (f = a[u], J(f, 0, 8, u), l = f), a.hasOwnProperty(u = "EXPONENTIAL_AT") && (f = a[u], f && f.pop ? (J(f[0], -te, 0, u), J(f[1], 0, te, u), h = f[0],
|
|
6848
|
+
if (a.hasOwnProperty(u = "DECIMAL_PLACES") && (f = a[u], J(f, 0, te, u), c = f), a.hasOwnProperty(u = "ROUNDING_MODE") && (f = a[u], J(f, 0, 8, u), l = f), a.hasOwnProperty(u = "EXPONENTIAL_AT") && (f = a[u], f && f.pop ? (J(f[0], -te, 0, u), J(f[1], 0, te, u), h = f[0], g = f[1]) : (J(f, -te, te, u), h = -(g = f < 0 ? -f : f))), a.hasOwnProperty(u = "RANGE")) if (f = a[u], f && f.pop) J(f[0], -te, -1, u), J(f[1], 1, te, u), m = f[0], A = f[1];
|
|
6848
6849
|
else if (J(f, -te, te, u), f) m = -(A = f < 0 ? -f : f);
|
|
6849
|
-
else throw Error(
|
|
6850
|
-
if (a.hasOwnProperty(u = "CRYPTO")) if (f = a[u], f === !!f) if (f) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
6851
|
-
else throw
|
|
6852
|
-
else
|
|
6853
|
-
else throw Error(
|
|
6850
|
+
else throw Error(oe + u + " cannot be zero: " + f);
|
|
6851
|
+
if (a.hasOwnProperty(u = "CRYPTO")) if (f = a[u], f === !!f) if (f) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) b = f;
|
|
6852
|
+
else throw b = !f, Error(oe + "crypto unavailable");
|
|
6853
|
+
else b = f;
|
|
6854
|
+
else throw Error(oe + u + " not true or false: " + f);
|
|
6854
6855
|
if (a.hasOwnProperty(u = "MODULO_MODE") && (f = a[u], J(f, 0, 9, u), O = f), a.hasOwnProperty(u = "POW_PRECISION") && (f = a[u], J(f, 0, te, u), x = f), a.hasOwnProperty(u = "FORMAT")) if (f = a[u], typeof f == "object") M = f;
|
|
6855
|
-
else throw Error(
|
|
6856
|
-
if (a.hasOwnProperty(u = "ALPHABET")) if (f = a[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f))
|
|
6857
|
-
else throw Error(
|
|
6858
|
-
} else throw Error(
|
|
6859
|
-
return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [h,
|
|
6860
|
-
},
|
|
6856
|
+
else throw Error(oe + u + " not an object: " + f);
|
|
6857
|
+
if (a.hasOwnProperty(u = "ALPHABET")) if (f = a[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f)) C = f.slice(0, 10) == "0123456789", w = f;
|
|
6858
|
+
else throw Error(oe + u + " invalid: " + f);
|
|
6859
|
+
} else throw Error(oe + "Object expected: " + a);
|
|
6860
|
+
return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [h, g], RANGE: [m, A], CRYPTO: b, MODULO_MODE: O, POW_PRECISION: x, FORMAT: M, ALPHABET: w };
|
|
6861
|
+
}, y.isBigNumber = function(a) {
|
|
6861
6862
|
if (!a || a._isBigNumber !== true) return false;
|
|
6862
|
-
if (!
|
|
6863
|
-
var u, f,
|
|
6864
|
-
e: if ({}.toString.call(
|
|
6863
|
+
if (!y.DEBUG) return true;
|
|
6864
|
+
var u, f, _ = a.c, p = a.e, I = a.s;
|
|
6865
|
+
e: if ({}.toString.call(_) == "[object Array]") {
|
|
6865
6866
|
if ((I === 1 || I === -1) && p >= -te && p <= te && p === ce(p)) {
|
|
6866
|
-
if (
|
|
6867
|
-
if (p === 0 &&
|
|
6867
|
+
if (_[0] === 0) {
|
|
6868
|
+
if (p === 0 && _.length === 1) return true;
|
|
6868
6869
|
break e;
|
|
6869
6870
|
}
|
|
6870
|
-
if (u = (p + 1) % $, u < 1 && (u += $), String(
|
|
6871
|
-
for (u = 0; u <
|
|
6871
|
+
if (u = (p + 1) % $, u < 1 && (u += $), String(_[0]).length == u) {
|
|
6872
|
+
for (u = 0; u < _.length; u++) if (f = _[u], f < 0 || f >= me || f !== ce(f)) break e;
|
|
6872
6873
|
if (f !== 0) return true;
|
|
6873
6874
|
}
|
|
6874
6875
|
}
|
|
6875
|
-
} else if (
|
|
6876
|
-
throw Error(
|
|
6877
|
-
},
|
|
6876
|
+
} else if (_ === null && p === null && (I === null || I === 1 || I === -1)) return true;
|
|
6877
|
+
throw Error(oe + "Invalid BigNumber: " + a);
|
|
6878
|
+
}, y.maximum = y.max = function() {
|
|
6878
6879
|
return L(arguments, -1);
|
|
6879
|
-
},
|
|
6880
|
+
}, y.minimum = y.min = function() {
|
|
6880
6881
|
return L(arguments, 1);
|
|
6881
|
-
},
|
|
6882
|
+
}, y.random = (function() {
|
|
6882
6883
|
var a = 9007199254740992, u = Math.random() * a & 2097151 ? function() {
|
|
6883
6884
|
return ce(Math.random() * a);
|
|
6884
6885
|
} : function() {
|
|
6885
6886
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
6886
6887
|
};
|
|
6887
6888
|
return function(f) {
|
|
6888
|
-
var
|
|
6889
|
-
if (f == null ? f = c : J(f, 0, te), T = Bt(f / $),
|
|
6890
|
-
for (
|
|
6889
|
+
var _, p, I, T, d, E = 0, S = [], R = new y(o);
|
|
6890
|
+
if (f == null ? f = c : J(f, 0, te), T = Bt(f / $), b) if (crypto.getRandomValues) {
|
|
6891
|
+
for (_ = crypto.getRandomValues(new Uint32Array(T *= 2)); E < T; ) d = _[E] * 131072 + (_[E + 1] >>> 11), d >= 9e15 ? (p = crypto.getRandomValues(new Uint32Array(2)), _[E] = p[0], _[E + 1] = p[1]) : (S.push(d % 1e14), E += 2);
|
|
6891
6892
|
E = T / 2;
|
|
6892
6893
|
} else if (crypto.randomBytes) {
|
|
6893
|
-
for (
|
|
6894
|
+
for (_ = crypto.randomBytes(T *= 7); E < T; ) d = (_[E] & 31) * 281474976710656 + _[E + 1] * 1099511627776 + _[E + 2] * 4294967296 + _[E + 3] * 16777216 + (_[E + 4] << 16) + (_[E + 5] << 8) + _[E + 6], d >= 9e15 ? crypto.randomBytes(7).copy(_, E) : (S.push(d % 1e14), E += 7);
|
|
6894
6895
|
E = T / 7;
|
|
6895
|
-
} else throw
|
|
6896
|
-
if (!
|
|
6896
|
+
} else throw b = false, Error(oe + "crypto unavailable");
|
|
6897
|
+
if (!b) for (; E < T; ) d = u(), d < 9e15 && (S[E++] = d % 1e14);
|
|
6897
6898
|
for (T = S[--E], f %= $, T && f && (d = Lt[$ - f], S[E] = ce(T / d) * d); S[E] === 0; S.pop(), E--) ;
|
|
6898
6899
|
if (E < 0) S = [I = 0];
|
|
6899
6900
|
else {
|
|
@@ -6903,67 +6904,67 @@ function Pr(e) {
|
|
|
6903
6904
|
}
|
|
6904
6905
|
return R.e = I, R.c = S, R;
|
|
6905
6906
|
};
|
|
6906
|
-
})(),
|
|
6907
|
-
for (var a = 1, u = arguments, f = new
|
|
6907
|
+
})(), y.sum = function() {
|
|
6908
|
+
for (var a = 1, u = arguments, f = new y(u[0]); a < u.length; ) f = f.plus(u[a++]);
|
|
6908
6909
|
return f;
|
|
6909
6910
|
}, r = (function() {
|
|
6910
6911
|
var a = "0123456789";
|
|
6911
|
-
function u(f,
|
|
6912
|
+
function u(f, _, p, I) {
|
|
6912
6913
|
for (var T, d = [0], E, S = 0, R = f.length; S < R; ) {
|
|
6913
|
-
for (E = d.length; E--; d[E] *=
|
|
6914
|
+
for (E = d.length; E--; d[E] *= _) ;
|
|
6914
6915
|
for (d[0] += I.indexOf(f.charAt(S++)), T = 0; T < d.length; T++) d[T] > p - 1 && (d[T + 1] == null && (d[T + 1] = 0), d[T + 1] += d[T] / p | 0, d[T] %= p);
|
|
6915
6916
|
}
|
|
6916
6917
|
return d.reverse();
|
|
6917
6918
|
}
|
|
6918
|
-
return s(u, "toBaseOut"), function(f,
|
|
6919
|
-
var d, E, S, R, v,
|
|
6920
|
-
for (j >= 0 && (R = x, x = 0, f = f.replace(".", ""), H = new
|
|
6921
|
-
if (!
|
|
6922
|
-
if (j < 0 ? --S : (
|
|
6919
|
+
return s(u, "toBaseOut"), function(f, _, p, I, T) {
|
|
6920
|
+
var d, E, S, R, v, N, P, H, j = f.indexOf("."), q = c, D = l;
|
|
6921
|
+
for (j >= 0 && (R = x, x = 0, f = f.replace(".", ""), H = new y(_), N = H.pow(f.length - j), x = R, H.c = u(ye(le(N.c), N.e, "0"), 10, p, a), H.e = H.c.length), P = u(f, _, p, T ? (d = w, a) : (d = a, w)), S = R = P.length; P[--R] == 0; P.pop()) ;
|
|
6922
|
+
if (!P[0]) return d.charAt(0);
|
|
6923
|
+
if (j < 0 ? --S : (N.c = P, N.e = S, N.s = I, N = t(N, H, q, D, p), P = N.c, v = N.r, S = N.e), E = S + q + 1, j = P[E], R = p / 2, v = v || E < 0 || P[E + 1] != null, v = D < 4 ? (j != null || v) && (D == 0 || D == (N.s < 0 ? 3 : 2)) : j > R || j == R && (D == 4 || v || D == 6 && P[E - 1] & 1 || D == (N.s < 0 ? 8 : 7)), E < 1 || !P[0]) f = v ? ye(d.charAt(1), -q, d.charAt(0)) : d.charAt(0);
|
|
6923
6924
|
else {
|
|
6924
|
-
if (
|
|
6925
|
-
for (R =
|
|
6926
|
-
for (j = 0, f = ""; j <= R; f += d.charAt(
|
|
6927
|
-
f =
|
|
6925
|
+
if (P.length = E, v) for (--p; ++P[--E] > p; ) P[E] = 0, E || (++S, P = [1].concat(P));
|
|
6926
|
+
for (R = P.length; !P[--R]; ) ;
|
|
6927
|
+
for (j = 0, f = ""; j <= R; f += d.charAt(P[j++])) ;
|
|
6928
|
+
f = ye(f, S, d.charAt(0));
|
|
6928
6929
|
}
|
|
6929
6930
|
return f;
|
|
6930
6931
|
};
|
|
6931
6932
|
})(), t = (function() {
|
|
6932
|
-
function a(
|
|
6933
|
-
var T, d, E, S, R = 0, v =
|
|
6934
|
-
for (
|
|
6935
|
-
return R && (
|
|
6933
|
+
function a(_, p, I) {
|
|
6934
|
+
var T, d, E, S, R = 0, v = _.length, N = p % Ue, P = p / Ue | 0;
|
|
6935
|
+
for (_ = _.slice(); v--; ) E = _[v] % Ue, S = _[v] / Ue | 0, T = P * E + S * N, d = N * E + T % Ue * Ue + R, R = (d / I | 0) + (T / Ue | 0) + P * S, _[v] = d % I;
|
|
6936
|
+
return R && (_ = [R].concat(_)), _;
|
|
6936
6937
|
}
|
|
6937
6938
|
s(a, "multiply");
|
|
6938
|
-
function u(
|
|
6939
|
+
function u(_, p, I, T) {
|
|
6939
6940
|
var d, E;
|
|
6940
6941
|
if (I != T) E = I > T ? 1 : -1;
|
|
6941
|
-
else for (d = E = 0; d < I; d++) if (
|
|
6942
|
-
E =
|
|
6942
|
+
else for (d = E = 0; d < I; d++) if (_[d] != p[d]) {
|
|
6943
|
+
E = _[d] > p[d] ? 1 : -1;
|
|
6943
6944
|
break;
|
|
6944
6945
|
}
|
|
6945
6946
|
return E;
|
|
6946
6947
|
}
|
|
6947
6948
|
s(u, "compare2");
|
|
6948
|
-
function f(
|
|
6949
|
-
for (var d = 0; I--; )
|
|
6950
|
-
for (; !
|
|
6951
|
-
}
|
|
6952
|
-
return s(f, "subtract"), function(
|
|
6953
|
-
var E, S, R, v,
|
|
6954
|
-
if (!ee || !ee[0] || !Q || !Q[0]) return new
|
|
6955
|
-
for (j = new
|
|
6949
|
+
function f(_, p, I, T) {
|
|
6950
|
+
for (var d = 0; I--; ) _[I] -= d, d = _[I] < p[I] ? 1 : 0, _[I] = d * T + _[I] - p[I];
|
|
6951
|
+
for (; !_[0] && _.length > 1; _.splice(0, 1)) ;
|
|
6952
|
+
}
|
|
6953
|
+
return s(f, "subtract"), function(_, p, I, T, d) {
|
|
6954
|
+
var E, S, R, v, N, P, H, j, q, D, F, z, de, ve, be, ne, pe, Z = _.s == p.s ? 1 : -1, ee = _.c, Q = p.c;
|
|
6955
|
+
if (!ee || !ee[0] || !Q || !Q[0]) return new y(!_.s || !p.s || (ee ? Q && ee[0] == Q[0] : !Q) ? NaN : ee && ee[0] == 0 || !Q ? Z * 0 : Z / 0);
|
|
6956
|
+
for (j = new y(Z), q = j.c = [], S = _.e - p.e, Z = I + S + 1, d || (d = me, S = ue(_.e / $) - ue(p.e / $), Z = Z / $ | 0), R = 0; Q[R] == (ee[R] || 0); R++) ;
|
|
6956
6957
|
if (Q[R] > (ee[R] || 0) && S--, Z < 0) q.push(1), v = true;
|
|
6957
6958
|
else {
|
|
6958
|
-
for (ve = ee.length, ne = Q.length, R = 0, Z += 2,
|
|
6959
|
-
pe = Q.slice(), pe = [0].concat(pe),
|
|
6959
|
+
for (ve = ee.length, ne = Q.length, R = 0, Z += 2, N = ce(d / (Q[0] + 1)), N > 1 && (Q = a(Q, N, d), ee = a(ee, N, d), ne = Q.length, ve = ee.length), de = ne, D = ee.slice(0, ne), F = D.length; F < ne; D[F++] = 0) ;
|
|
6960
|
+
pe = Q.slice(), pe = [0].concat(pe), be = Q[0], Q[1] >= d / 2 && be++;
|
|
6960
6961
|
do {
|
|
6961
|
-
if (
|
|
6962
|
-
if (z = D[0], ne != F && (z = z * d + (D[1] || 0)),
|
|
6963
|
-
else
|
|
6964
|
-
if (H < F && (
|
|
6965
|
-
} else E === 0 && (
|
|
6966
|
-
q[R++] =
|
|
6962
|
+
if (N = 0, E = u(Q, D, ne, F), E < 0) {
|
|
6963
|
+
if (z = D[0], ne != F && (z = z * d + (D[1] || 0)), N = ce(z / be), N > 1) for (N >= d && (N = d - 1), P = a(Q, N, d), H = P.length, F = D.length; u(P, D, H, F) == 1; ) N--, f(P, ne < H ? pe : Q, H, d), H = P.length, E = 1;
|
|
6964
|
+
else N == 0 && (E = N = 1), P = Q.slice(), H = P.length;
|
|
6965
|
+
if (H < F && (P = [0].concat(P)), f(D, P, F, d), F = D.length, E == -1) for (; u(Q, D, ne, F) < 1; ) N++, f(D, ne < F ? pe : Q, F, d), F = D.length;
|
|
6966
|
+
} else E === 0 && (N++, D = [0]);
|
|
6967
|
+
q[R++] = N, D[0] ? D[F++] = ee[de] || 0 : (D = [ee[de]], F = 1);
|
|
6967
6968
|
} while ((de++ < ve || D[0] != null) && Z--);
|
|
6968
6969
|
v = D[0] != null, q[0] || q.splice(0, 1);
|
|
6969
6970
|
}
|
|
@@ -6974,60 +6975,60 @@ function Pr(e) {
|
|
|
6974
6975
|
return j;
|
|
6975
6976
|
};
|
|
6976
6977
|
})();
|
|
6977
|
-
function B(a, u, f,
|
|
6978
|
+
function B(a, u, f, _) {
|
|
6978
6979
|
var p, I, T, d, E;
|
|
6979
6980
|
if (f == null ? f = l : J(f, 0, 8), !a.c) return a.toString();
|
|
6980
|
-
if (p = a.c[0], T = a.e, u == null) E = le(a.c), E =
|
|
6981
|
-
else if (a = G(new
|
|
6981
|
+
if (p = a.c[0], T = a.e, u == null) E = le(a.c), E = _ == 1 || _ == 2 && (T <= h || T >= g) ? ct(E, T) : ye(E, T, "0");
|
|
6982
|
+
else if (a = G(new y(a), u, f), I = a.e, E = le(a.c), d = E.length, _ == 1 || _ == 2 && (u <= I || I <= h)) {
|
|
6982
6983
|
for (; d < u; E += "0", d++) ;
|
|
6983
6984
|
E = ct(E, I);
|
|
6984
|
-
} else if (u -= T + (
|
|
6985
|
+
} else if (u -= T + (_ === 2 && I > T), E = ye(E, I, "0"), I + 1 > d) {
|
|
6985
6986
|
if (--u > 0) for (E += "."; u--; E += "0") ;
|
|
6986
6987
|
} else if (u += I - d, u > 0) for (I + 1 == d && (E += "."); u--; E += "0") ;
|
|
6987
6988
|
return a.s < 0 && p ? "-" + E : E;
|
|
6988
6989
|
}
|
|
6989
6990
|
s(B, "format");
|
|
6990
6991
|
function L(a, u) {
|
|
6991
|
-
for (var f,
|
|
6992
|
+
for (var f, _, p = 1, I = new y(a[0]); p < a.length; p++) _ = new y(a[p]), (!_.s || (f = Me(I, _)) === u || f === 0 && I.s === u) && (I = _);
|
|
6992
6993
|
return I;
|
|
6993
6994
|
}
|
|
6994
6995
|
s(L, "maxOrMin");
|
|
6995
6996
|
function U(a, u, f) {
|
|
6996
|
-
for (var
|
|
6997
|
-
for (p = u[0]; p >= 10; p /= 10,
|
|
6998
|
-
return (f =
|
|
6997
|
+
for (var _ = 1, p = u.length; !u[--p]; u.pop()) ;
|
|
6998
|
+
for (p = u[0]; p >= 10; p /= 10, _++) ;
|
|
6999
|
+
return (f = _ + f * $ - 1) > A ? a.c = a.e = null : f < m ? a.c = [a.e = 0] : (a.e = f, a.c = u), a;
|
|
6999
7000
|
}
|
|
7000
7001
|
s(U, "normalise"), n = /* @__PURE__ */ (function() {
|
|
7001
|
-
var a = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/,
|
|
7002
|
+
var a = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/, _ = /^-?(Infinity|NaN)$/, p = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
7002
7003
|
return function(I, T, d, E) {
|
|
7003
7004
|
var S, R = d ? T : T.replace(p, "");
|
|
7004
|
-
if (
|
|
7005
|
+
if (_.test(R)) I.s = isNaN(R) ? null : R < 0 ? -1 : 1;
|
|
7005
7006
|
else {
|
|
7006
|
-
if (!d && (R = R.replace(a, function(v,
|
|
7007
|
-
return S = (
|
|
7008
|
-
}), E && (S = E, R = R.replace(u, "$1").replace(f, "0.$1")), T != R)) return new
|
|
7009
|
-
if (
|
|
7007
|
+
if (!d && (R = R.replace(a, function(v, N, P) {
|
|
7008
|
+
return S = (P = P.toLowerCase()) == "x" ? 16 : P == "b" ? 2 : 8, !E || E == S ? N : v;
|
|
7009
|
+
}), E && (S = E, R = R.replace(u, "$1").replace(f, "0.$1")), T != R)) return new y(R, S);
|
|
7010
|
+
if (y.DEBUG) throw Error(oe + "Not a" + (E ? " base " + E : "") + " number: " + T);
|
|
7010
7011
|
I.s = null;
|
|
7011
7012
|
}
|
|
7012
7013
|
I.c = I.e = null;
|
|
7013
7014
|
};
|
|
7014
7015
|
})();
|
|
7015
|
-
function G(a, u, f,
|
|
7016
|
-
var p, I, T, d, E, S, R, v = a.c,
|
|
7016
|
+
function G(a, u, f, _) {
|
|
7017
|
+
var p, I, T, d, E, S, R, v = a.c, N = Lt;
|
|
7017
7018
|
if (v) {
|
|
7018
7019
|
e: {
|
|
7019
7020
|
for (p = 1, d = v[0]; d >= 10; d /= 10, p++) ;
|
|
7020
|
-
if (I = u - p, I < 0) I += $, T = u, E = v[S = 0], R = ce(E /
|
|
7021
|
-
else if (S = Bt((I + 1) / $), S >= v.length) if (
|
|
7021
|
+
if (I = u - p, I < 0) I += $, T = u, E = v[S = 0], R = ce(E / N[p - T - 1] % 10);
|
|
7022
|
+
else if (S = Bt((I + 1) / $), S >= v.length) if (_) {
|
|
7022
7023
|
for (; v.length <= S; v.push(0)) ;
|
|
7023
7024
|
E = R = 0, p = 1, I %= $, T = I - $ + 1;
|
|
7024
7025
|
} else break e;
|
|
7025
7026
|
else {
|
|
7026
7027
|
for (E = d = v[S], p = 1; d >= 10; d /= 10, p++) ;
|
|
7027
|
-
I %= $, T = I - $ + p, R = T < 0 ? 0 : ce(E /
|
|
7028
|
+
I %= $, T = I - $ + p, R = T < 0 ? 0 : ce(E / N[p - T - 1] % 10);
|
|
7028
7029
|
}
|
|
7029
|
-
if (
|
|
7030
|
-
if (I == 0 ? (v.length = S, d = 1, S--) : (v.length = S + 1, d =
|
|
7030
|
+
if (_ = _ || u < 0 || v[S + 1] != null || (T < 0 ? E : E % N[p - T - 1]), _ = f < 4 ? (R || _) && (f == 0 || f == (a.s < 0 ? 3 : 2)) : R > 5 || R == 5 && (f == 4 || _ || f == 6 && (I > 0 ? T > 0 ? E / N[p - T] : 0 : v[S - 1]) % 10 & 1 || f == (a.s < 0 ? 8 : 7)), u < 1 || !v[0]) return v.length = 0, _ ? (u -= a.e + 1, v[0] = N[($ - u % $) % $], a.e = -u || 0) : v[0] = a.e = 0, a;
|
|
7031
|
+
if (I == 0 ? (v.length = S, d = 1, S--) : (v.length = S + 1, d = N[$ - I], v[S] = T > 0 ? ce(E / N[p - T] % N[T]) * d : 0), _) for (; ; ) if (S == 0) {
|
|
7031
7032
|
for (I = 1, T = v[0]; T >= 10; T /= 10, I++) ;
|
|
7032
7033
|
for (T = v[0] += d, d = 1; T >= 10; T /= 10, d++) ;
|
|
7033
7034
|
I != d && (a.e++, v[0] == me && (v[0] = 1));
|
|
@@ -7045,38 +7046,38 @@ function Pr(e) {
|
|
|
7045
7046
|
s(G, "round");
|
|
7046
7047
|
function k(a) {
|
|
7047
7048
|
var u, f = a.e;
|
|
7048
|
-
return f === null ? a.toString() : (u = le(a.c), u = f <= h || f >=
|
|
7049
|
+
return f === null ? a.toString() : (u = le(a.c), u = f <= h || f >= g ? ct(u, f) : ye(u, f, "0"), a.s < 0 ? "-" + u : u);
|
|
7049
7050
|
}
|
|
7050
|
-
return s(k, "valueOf"),
|
|
7051
|
-
var a = new
|
|
7051
|
+
return s(k, "valueOf"), i.absoluteValue = i.abs = function() {
|
|
7052
|
+
var a = new y(this);
|
|
7052
7053
|
return a.s < 0 && (a.s = 1), a;
|
|
7053
|
-
},
|
|
7054
|
-
return Me(this, new
|
|
7055
|
-
},
|
|
7056
|
-
var f,
|
|
7057
|
-
if (a != null) return J(a, 0, te), u == null ? u = l : J(u, 0, 8), G(new
|
|
7054
|
+
}, i.comparedTo = function(a, u) {
|
|
7055
|
+
return Me(this, new y(a, u));
|
|
7056
|
+
}, i.decimalPlaces = i.dp = function(a, u) {
|
|
7057
|
+
var f, _, p, I = this;
|
|
7058
|
+
if (a != null) return J(a, 0, te), u == null ? u = l : J(u, 0, 8), G(new y(I), a + I.e + 1, u);
|
|
7058
7059
|
if (!(f = I.c)) return null;
|
|
7059
|
-
if (
|
|
7060
|
-
return
|
|
7061
|
-
},
|
|
7062
|
-
return t(this, new
|
|
7063
|
-
},
|
|
7064
|
-
return t(this, new
|
|
7065
|
-
},
|
|
7066
|
-
var f,
|
|
7067
|
-
if (a = new
|
|
7068
|
-
if (u != null && (u = new
|
|
7060
|
+
if (_ = ((p = f.length - 1) - ue(this.e / $)) * $, p = f[p]) for (; p % 10 == 0; p /= 10, _--) ;
|
|
7061
|
+
return _ < 0 && (_ = 0), _;
|
|
7062
|
+
}, i.dividedBy = i.div = function(a, u) {
|
|
7063
|
+
return t(this, new y(a, u), c, l);
|
|
7064
|
+
}, i.dividedToIntegerBy = i.idiv = function(a, u) {
|
|
7065
|
+
return t(this, new y(a, u), 0, 1);
|
|
7066
|
+
}, i.exponentiatedBy = i.pow = function(a, u) {
|
|
7067
|
+
var f, _, p, I, T, d, E, S, R, v = this;
|
|
7068
|
+
if (a = new y(a), a.c && !a.isInteger()) throw Error(oe + "Exponent not an integer: " + k(a));
|
|
7069
|
+
if (u != null && (u = new y(u)), d = a.e > 14, !v.c || !v.c[0] || v.c[0] == 1 && !v.e && v.c.length == 1 || !a.c || !a.c[0]) return R = new y(Math.pow(+k(v), d ? a.s * (2 - at(a)) : +k(a))), u ? R.mod(u) : R;
|
|
7069
7070
|
if (E = a.s < 0, u) {
|
|
7070
|
-
if (u.c ? !u.c[0] : !u.s) return new
|
|
7071
|
-
|
|
7071
|
+
if (u.c ? !u.c[0] : !u.s) return new y(NaN);
|
|
7072
|
+
_ = !E && v.isInteger() && u.isInteger(), _ && (v = v.mod(u));
|
|
7072
7073
|
} else {
|
|
7073
|
-
if (a.e > 9 && (v.e > 0 || v.e < -1 || (v.e == 0 ? v.c[0] > 1 || d && v.c[1] >= 24e7 : v.c[0] < 8e13 || d && v.c[0] <= 9999975e7))) return I = v.s < 0 && at(a) ? -0 : 0, v.e > -1 && (I = 1 / I), new
|
|
7074
|
+
if (a.e > 9 && (v.e > 0 || v.e < -1 || (v.e == 0 ? v.c[0] > 1 || d && v.c[1] >= 24e7 : v.c[0] < 8e13 || d && v.c[0] <= 9999975e7))) return I = v.s < 0 && at(a) ? -0 : 0, v.e > -1 && (I = 1 / I), new y(E ? 1 / I : I);
|
|
7074
7075
|
x && (I = Bt(x / $ + 2));
|
|
7075
7076
|
}
|
|
7076
|
-
for (d ? (f = new
|
|
7077
|
+
for (d ? (f = new y(0.5), E && (a.s = 1), S = at(a)) : (p = Math.abs(+k(a)), S = p % 2), R = new y(o); ; ) {
|
|
7077
7078
|
if (S) {
|
|
7078
7079
|
if (R = R.times(v), !R.c) break;
|
|
7079
|
-
I ? R.c.length > I && (R.c.length = I) :
|
|
7080
|
+
I ? R.c.length > I && (R.c.length = I) : _ && (R = R.mod(u));
|
|
7080
7081
|
}
|
|
7081
7082
|
if (p) {
|
|
7082
7083
|
if (p = ce(p / 2), p === 0) break;
|
|
@@ -7086,83 +7087,83 @@ function Pr(e) {
|
|
|
7086
7087
|
if (p = +k(a), p === 0) break;
|
|
7087
7088
|
S = p % 2;
|
|
7088
7089
|
}
|
|
7089
|
-
v = v.times(v), I ? v.c && v.c.length > I && (v.c.length = I) :
|
|
7090
|
+
v = v.times(v), I ? v.c && v.c.length > I && (v.c.length = I) : _ && (v = v.mod(u));
|
|
7090
7091
|
}
|
|
7091
|
-
return
|
|
7092
|
-
},
|
|
7093
|
-
var u = new
|
|
7092
|
+
return _ ? R : (E && (R = o.div(R)), u ? R.mod(u) : I ? G(R, x, l, T) : R);
|
|
7093
|
+
}, i.integerValue = function(a) {
|
|
7094
|
+
var u = new y(this);
|
|
7094
7095
|
return a == null ? a = l : J(a, 0, 8), G(u, u.e + 1, a);
|
|
7095
|
-
},
|
|
7096
|
-
return Me(this, new
|
|
7097
|
-
},
|
|
7096
|
+
}, i.isEqualTo = i.eq = function(a, u) {
|
|
7097
|
+
return Me(this, new y(a, u)) === 0;
|
|
7098
|
+
}, i.isFinite = function() {
|
|
7098
7099
|
return !!this.c;
|
|
7099
|
-
},
|
|
7100
|
-
return Me(this, new
|
|
7101
|
-
},
|
|
7102
|
-
return (u = Me(this, new
|
|
7103
|
-
},
|
|
7100
|
+
}, i.isGreaterThan = i.gt = function(a, u) {
|
|
7101
|
+
return Me(this, new y(a, u)) > 0;
|
|
7102
|
+
}, i.isGreaterThanOrEqualTo = i.gte = function(a, u) {
|
|
7103
|
+
return (u = Me(this, new y(a, u))) === 1 || u === 0;
|
|
7104
|
+
}, i.isInteger = function() {
|
|
7104
7105
|
return !!this.c && ue(this.e / $) > this.c.length - 2;
|
|
7105
|
-
},
|
|
7106
|
-
return Me(this, new
|
|
7107
|
-
},
|
|
7108
|
-
return (u = Me(this, new
|
|
7109
|
-
},
|
|
7106
|
+
}, i.isLessThan = i.lt = function(a, u) {
|
|
7107
|
+
return Me(this, new y(a, u)) < 0;
|
|
7108
|
+
}, i.isLessThanOrEqualTo = i.lte = function(a, u) {
|
|
7109
|
+
return (u = Me(this, new y(a, u))) === -1 || u === 0;
|
|
7110
|
+
}, i.isNaN = function() {
|
|
7110
7111
|
return !this.s;
|
|
7111
|
-
},
|
|
7112
|
+
}, i.isNegative = function() {
|
|
7112
7113
|
return this.s < 0;
|
|
7113
|
-
},
|
|
7114
|
+
}, i.isPositive = function() {
|
|
7114
7115
|
return this.s > 0;
|
|
7115
|
-
},
|
|
7116
|
+
}, i.isZero = function() {
|
|
7116
7117
|
return !!this.c && this.c[0] == 0;
|
|
7117
|
-
},
|
|
7118
|
-
var f,
|
|
7119
|
-
if (a = new
|
|
7118
|
+
}, i.minus = function(a, u) {
|
|
7119
|
+
var f, _, p, I, T = this, d = T.s;
|
|
7120
|
+
if (a = new y(a, u), u = a.s, !d || !u) return new y(NaN);
|
|
7120
7121
|
if (d != u) return a.s = -u, T.plus(a);
|
|
7121
7122
|
var E = T.e / $, S = a.e / $, R = T.c, v = a.c;
|
|
7122
7123
|
if (!E || !S) {
|
|
7123
|
-
if (!R || !v) return R ? (a.s = -u, a) : new
|
|
7124
|
-
if (!R[0] || !v[0]) return v[0] ? (a.s = -u, a) : new
|
|
7124
|
+
if (!R || !v) return R ? (a.s = -u, a) : new y(v ? T : NaN);
|
|
7125
|
+
if (!R[0] || !v[0]) return v[0] ? (a.s = -u, a) : new y(R[0] ? T : l == 3 ? -0 : 0);
|
|
7125
7126
|
}
|
|
7126
7127
|
if (E = ue(E), S = ue(S), R = R.slice(), d = E - S) {
|
|
7127
7128
|
for ((I = d < 0) ? (d = -d, p = R) : (S = E, p = v), p.reverse(), u = d; u--; p.push(0)) ;
|
|
7128
7129
|
p.reverse();
|
|
7129
|
-
} else for (
|
|
7130
|
+
} else for (_ = (I = (d = R.length) < (u = v.length)) ? d : u, d = u = 0; u < _; u++) if (R[u] != v[u]) {
|
|
7130
7131
|
I = R[u] < v[u];
|
|
7131
7132
|
break;
|
|
7132
7133
|
}
|
|
7133
|
-
if (I && (p = R, R = v, v = p, a.s = -a.s), u = (
|
|
7134
|
-
for (u = me - 1;
|
|
7135
|
-
if (R[--
|
|
7136
|
-
for (f =
|
|
7137
|
-
--R[f], R[
|
|
7134
|
+
if (I && (p = R, R = v, v = p, a.s = -a.s), u = (_ = v.length) - (f = R.length), u > 0) for (; u--; R[f++] = 0) ;
|
|
7135
|
+
for (u = me - 1; _ > d; ) {
|
|
7136
|
+
if (R[--_] < v[_]) {
|
|
7137
|
+
for (f = _; f && !R[--f]; R[f] = u) ;
|
|
7138
|
+
--R[f], R[_] += me;
|
|
7138
7139
|
}
|
|
7139
|
-
R[
|
|
7140
|
+
R[_] -= v[_];
|
|
7140
7141
|
}
|
|
7141
7142
|
for (; R[0] == 0; R.splice(0, 1), --S) ;
|
|
7142
7143
|
return R[0] ? U(a, R, S) : (a.s = l == 3 ? -1 : 1, a.c = [a.e = 0], a);
|
|
7143
|
-
},
|
|
7144
|
-
var f,
|
|
7145
|
-
return a = new
|
|
7146
|
-
},
|
|
7147
|
-
var f,
|
|
7144
|
+
}, i.modulo = i.mod = function(a, u) {
|
|
7145
|
+
var f, _, p = this;
|
|
7146
|
+
return a = new y(a, u), !p.c || !a.s || a.c && !a.c[0] ? new y(NaN) : !a.c || p.c && !p.c[0] ? new y(p) : (O == 9 ? (_ = a.s, a.s = 1, f = t(p, a, 0, 3), a.s = _, f.s *= _) : f = t(p, a, 0, O), a = p.minus(f.times(a)), !a.c[0] && O == 1 && (a.s = p.s), a);
|
|
7147
|
+
}, i.multipliedBy = i.times = function(a, u) {
|
|
7148
|
+
var f, _, p, I, T, d, E, S, R, v, N, P, H, j, q, D = this, F = D.c, z = (a = new y(a, u)).c;
|
|
7148
7149
|
if (!F || !z || !F[0] || !z[0]) return !D.s || !a.s || F && !F[0] && !z || z && !z[0] && !F ? a.c = a.e = a.s = null : (a.s *= D.s, !F || !z ? a.c = a.e = null : (a.c = [0], a.e = 0)), a;
|
|
7149
|
-
for (
|
|
7150
|
+
for (_ = ue(D.e / $) + ue(a.e / $), a.s *= D.s, E = F.length, v = z.length, E < v && (H = F, F = z, z = H, p = E, E = v, v = p), p = E + v, H = []; p--; H.push(0)) ;
|
|
7150
7151
|
for (j = me, q = Ue, p = v; --p >= 0; ) {
|
|
7151
|
-
for (f = 0,
|
|
7152
|
+
for (f = 0, N = z[p] % q, P = z[p] / q | 0, T = E, I = p + T; I > p; ) S = F[--T] % q, R = F[T] / q | 0, d = P * S + R * N, S = N * S + d % q * q + H[I] + f, f = (S / j | 0) + (d / q | 0) + P * R, H[I--] = S % j;
|
|
7152
7153
|
H[I] = f;
|
|
7153
7154
|
}
|
|
7154
|
-
return f ? ++
|
|
7155
|
-
},
|
|
7156
|
-
var a = new
|
|
7155
|
+
return f ? ++_ : H.splice(0, 1), U(a, H, _);
|
|
7156
|
+
}, i.negated = function() {
|
|
7157
|
+
var a = new y(this);
|
|
7157
7158
|
return a.s = -a.s || null, a;
|
|
7158
|
-
},
|
|
7159
|
-
var f,
|
|
7160
|
-
if (a = new
|
|
7161
|
-
if (p != u) return a.s = -u,
|
|
7162
|
-
var I =
|
|
7159
|
+
}, i.plus = function(a, u) {
|
|
7160
|
+
var f, _ = this, p = _.s;
|
|
7161
|
+
if (a = new y(a, u), u = a.s, !p || !u) return new y(NaN);
|
|
7162
|
+
if (p != u) return a.s = -u, _.minus(a);
|
|
7163
|
+
var I = _.e / $, T = a.e / $, d = _.c, E = a.c;
|
|
7163
7164
|
if (!I || !T) {
|
|
7164
|
-
if (!d || !E) return new
|
|
7165
|
-
if (!d[0] || !E[0]) return E[0] ? a : new
|
|
7165
|
+
if (!d || !E) return new y(p / 0);
|
|
7166
|
+
if (!d[0] || !E[0]) return E[0] ? a : new y(d[0] ? _ : p * 0);
|
|
7166
7167
|
}
|
|
7167
7168
|
if (I = ue(I), T = ue(T), d = d.slice(), p = I - T) {
|
|
7168
7169
|
for (p > 0 ? (T = I, f = E) : (p = -p, f = d), f.reverse(); p--; f.push(0)) ;
|
|
@@ -7170,95 +7171,95 @@ function Pr(e) {
|
|
|
7170
7171
|
}
|
|
7171
7172
|
for (p = d.length, u = E.length, p - u < 0 && (f = E, E = d, d = f, u = p), p = 0; u; ) p = (d[--u] = d[u] + E[u] + p) / me | 0, d[u] = me === d[u] ? 0 : d[u] % me;
|
|
7172
7173
|
return p && (d = [p].concat(d), ++T), U(a, d, T);
|
|
7173
|
-
},
|
|
7174
|
-
var f,
|
|
7175
|
-
if (a != null && a !== !!a) return J(a, 1, te), u == null ? u = l : J(u, 0, 8), G(new
|
|
7174
|
+
}, i.precision = i.sd = function(a, u) {
|
|
7175
|
+
var f, _, p, I = this;
|
|
7176
|
+
if (a != null && a !== !!a) return J(a, 1, te), u == null ? u = l : J(u, 0, 8), G(new y(I), a, u);
|
|
7176
7177
|
if (!(f = I.c)) return null;
|
|
7177
|
-
if (p = f.length - 1,
|
|
7178
|
-
for (; p % 10 == 0; p /= 10,
|
|
7179
|
-
for (p = f[0]; p >= 10; p /= 10,
|
|
7178
|
+
if (p = f.length - 1, _ = p * $ + 1, p = f[p]) {
|
|
7179
|
+
for (; p % 10 == 0; p /= 10, _--) ;
|
|
7180
|
+
for (p = f[0]; p >= 10; p /= 10, _++) ;
|
|
7180
7181
|
}
|
|
7181
|
-
return a && I.e + 1 >
|
|
7182
|
-
},
|
|
7182
|
+
return a && I.e + 1 > _ && (_ = I.e + 1), _;
|
|
7183
|
+
}, i.shiftedBy = function(a) {
|
|
7183
7184
|
return J(a, -Ot, Ot), this.times("1e" + a);
|
|
7184
|
-
},
|
|
7185
|
-
var a, u, f,
|
|
7186
|
-
if (d !== 1 || !T || !T[0]) return new
|
|
7187
|
-
if (d = Math.sqrt(+k(I)), d == 0 || d == 1 / 0 ? (u = le(T), (u.length + E) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), E = ue((E + 1) / 2) - (E < 0 || E % 2), d == 1 / 0 ? u = "5e" + E : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + E), f = new
|
|
7188
|
-
for (E = f.e, d = E + S, d < 3 && (d = 0); ; ) if (p = f, f = R.times(p.plus(t(I, p, S, 1))), le(p.c).slice(0, d) === (u = le(f.c)).slice(0, d)) if (f.e < E && --d, u = u.slice(d - 3, d + 1), u == "9999" || !
|
|
7189
|
-
if (!
|
|
7185
|
+
}, i.squareRoot = i.sqrt = function() {
|
|
7186
|
+
var a, u, f, _, p, I = this, T = I.c, d = I.s, E = I.e, S = c + 4, R = new y("0.5");
|
|
7187
|
+
if (d !== 1 || !T || !T[0]) return new y(!d || d < 0 && (!T || T[0]) ? NaN : T ? I : 1 / 0);
|
|
7188
|
+
if (d = Math.sqrt(+k(I)), d == 0 || d == 1 / 0 ? (u = le(T), (u.length + E) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), E = ue((E + 1) / 2) - (E < 0 || E % 2), d == 1 / 0 ? u = "5e" + E : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + E), f = new y(u)) : f = new y(d + ""), f.c[0]) {
|
|
7189
|
+
for (E = f.e, d = E + S, d < 3 && (d = 0); ; ) if (p = f, f = R.times(p.plus(t(I, p, S, 1))), le(p.c).slice(0, d) === (u = le(f.c)).slice(0, d)) if (f.e < E && --d, u = u.slice(d - 3, d + 1), u == "9999" || !_ && u == "4999") {
|
|
7190
|
+
if (!_ && (G(p, p.e + c + 2, 0), p.times(p).eq(I))) {
|
|
7190
7191
|
f = p;
|
|
7191
7192
|
break;
|
|
7192
7193
|
}
|
|
7193
|
-
S += 4, d += 4,
|
|
7194
|
+
S += 4, d += 4, _ = 1;
|
|
7194
7195
|
} else {
|
|
7195
7196
|
(!+u || !+u.slice(1) && u.charAt(0) == "5") && (G(f, f.e + c + 2, 1), a = !f.times(f).eq(I));
|
|
7196
7197
|
break;
|
|
7197
7198
|
}
|
|
7198
7199
|
}
|
|
7199
7200
|
return G(f, f.e + c + 1, l, a);
|
|
7200
|
-
},
|
|
7201
|
+
}, i.toExponential = function(a, u) {
|
|
7201
7202
|
return a != null && (J(a, 0, te), a++), B(this, a, u, 1);
|
|
7202
|
-
},
|
|
7203
|
+
}, i.toFixed = function(a, u) {
|
|
7203
7204
|
return a != null && (J(a, 0, te), a = a + this.e + 1), B(this, a, u);
|
|
7204
|
-
},
|
|
7205
|
-
var
|
|
7205
|
+
}, i.toFormat = function(a, u, f) {
|
|
7206
|
+
var _, p = this;
|
|
7206
7207
|
if (f == null) a != null && u && typeof u == "object" ? (f = u, u = null) : a && typeof a == "object" ? (f = a, a = u = null) : f = M;
|
|
7207
|
-
else if (typeof f != "object") throw Error(
|
|
7208
|
-
if (
|
|
7209
|
-
var I, T =
|
|
7208
|
+
else if (typeof f != "object") throw Error(oe + "Argument not an object: " + f);
|
|
7209
|
+
if (_ = p.toFixed(a, u), p.c) {
|
|
7210
|
+
var I, T = _.split("."), d = +f.groupSize, E = +f.secondaryGroupSize, S = f.groupSeparator || "", R = T[0], v = T[1], N = p.s < 0, P = N ? R.slice(1) : R, H = P.length;
|
|
7210
7211
|
if (E && (I = d, d = E, E = I, H -= I), d > 0 && H > 0) {
|
|
7211
|
-
for (I = H % d || d, R =
|
|
7212
|
-
E > 0 && (R += S +
|
|
7212
|
+
for (I = H % d || d, R = P.substr(0, I); I < H; I += d) R += S + P.substr(I, d);
|
|
7213
|
+
E > 0 && (R += S + P.slice(I)), N && (R = "-" + R);
|
|
7213
7214
|
}
|
|
7214
|
-
|
|
7215
|
-
}
|
|
7216
|
-
return (f.prefix || "") +
|
|
7217
|
-
},
|
|
7218
|
-
var u, f,
|
|
7219
|
-
if (a != null && (d = new
|
|
7220
|
-
if (!H) return new
|
|
7221
|
-
for (u = new
|
|
7222
|
-
return p = t(a.minus(f),
|
|
7223
|
-
},
|
|
7215
|
+
_ = v ? R + (f.decimalSeparator || "") + ((E = +f.fractionGroupSize) ? v.replace(new RegExp("\\d{" + E + "}\\B", "g"), "$&" + (f.fractionGroupSeparator || "")) : v) : R;
|
|
7216
|
+
}
|
|
7217
|
+
return (f.prefix || "") + _ + (f.suffix || "");
|
|
7218
|
+
}, i.toFraction = function(a) {
|
|
7219
|
+
var u, f, _, p, I, T, d, E, S, R, v, N, P = this, H = P.c;
|
|
7220
|
+
if (a != null && (d = new y(a), !d.isInteger() && (d.c || d.s !== 1) || d.lt(o))) throw Error(oe + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") + k(d));
|
|
7221
|
+
if (!H) return new y(P);
|
|
7222
|
+
for (u = new y(o), S = f = new y(o), _ = E = new y(o), N = le(H), I = u.e = N.length - P.e - 1, u.c[0] = Lt[(T = I % $) < 0 ? $ + T : T], a = !a || d.comparedTo(u) > 0 ? I > 0 ? u : S : d, T = A, A = 1 / 0, d = new y(N), E.c[0] = 0; R = t(d, u, 0, 1), p = f.plus(R.times(_)), p.comparedTo(a) != 1; ) f = _, _ = p, S = E.plus(R.times(p = S)), E = p, u = d.minus(R.times(p = u)), d = p;
|
|
7223
|
+
return p = t(a.minus(f), _, 0, 1), E = E.plus(p.times(S)), f = f.plus(p.times(_)), E.s = S.s = P.s, I = I * 2, v = t(S, _, I, l).minus(P).abs().comparedTo(t(E, f, I, l).minus(P).abs()) < 1 ? [S, _] : [E, f], A = T, v;
|
|
7224
|
+
}, i.toNumber = function() {
|
|
7224
7225
|
return +k(this);
|
|
7225
|
-
},
|
|
7226
|
+
}, i.toPrecision = function(a, u) {
|
|
7226
7227
|
return a != null && J(a, 1, te), B(this, a, u, 2);
|
|
7227
|
-
},
|
|
7228
|
-
var u, f = this,
|
|
7229
|
-
return p === null ?
|
|
7230
|
-
},
|
|
7228
|
+
}, i.toString = function(a) {
|
|
7229
|
+
var u, f = this, _ = f.s, p = f.e;
|
|
7230
|
+
return p === null ? _ ? (u = "Infinity", _ < 0 && (u = "-" + u)) : u = "NaN" : (a == null ? u = p <= h || p >= g ? ct(le(f.c), p) : ye(le(f.c), p, "0") : a === 10 && C ? (f = G(new y(f), c + p + 1, l), u = ye(le(f.c), f.e, "0")) : (J(a, 2, w.length, "Base"), u = r(ye(le(f.c), p, "0"), 10, a, _, true)), _ < 0 && f.c[0] && (u = "-" + u)), u;
|
|
7231
|
+
}, i.valueOf = i.toJSON = function() {
|
|
7231
7232
|
return k(this);
|
|
7232
|
-
},
|
|
7233
|
+
}, i._isBigNumber = true, i[Symbol.toStringTag] = "BigNumber", i[Symbol.for("nodejs.util.inspect.custom")] = i.valueOf, e != null && y.set(e), y;
|
|
7233
7234
|
}
|
|
7234
|
-
s(
|
|
7235
|
+
s(xr, "clone");
|
|
7235
7236
|
function ue(e) {
|
|
7236
7237
|
var t = e | 0;
|
|
7237
7238
|
return e > 0 || e === t ? t : t - 1;
|
|
7238
7239
|
}
|
|
7239
7240
|
s(ue, "bitFloor");
|
|
7240
7241
|
function le(e) {
|
|
7241
|
-
for (var t, r, n = 1,
|
|
7242
|
+
for (var t, r, n = 1, i = e.length, o = e[0] + ""; n < i; ) {
|
|
7242
7243
|
for (t = e[n++] + "", r = $ - t.length; r--; t = "0" + t) ;
|
|
7243
|
-
|
|
7244
|
+
o += t;
|
|
7244
7245
|
}
|
|
7245
|
-
for (
|
|
7246
|
-
return
|
|
7246
|
+
for (i = o.length; o.charCodeAt(--i) === 48; ) ;
|
|
7247
|
+
return o.slice(0, i + 1 || 1);
|
|
7247
7248
|
}
|
|
7248
7249
|
s(le, "coeffToString");
|
|
7249
7250
|
function Me(e, t) {
|
|
7250
|
-
var r, n,
|
|
7251
|
+
var r, n, i = e.c, o = t.c, c = e.s, l = t.s, h = e.e, g = t.e;
|
|
7251
7252
|
if (!c || !l) return null;
|
|
7252
|
-
if (r =
|
|
7253
|
+
if (r = i && !i[0], n = o && !o[0], r || n) return r ? n ? 0 : -l : c;
|
|
7253
7254
|
if (c != l) return c;
|
|
7254
|
-
if (r = c < 0, n = h ==
|
|
7255
|
-
if (!n) return h >
|
|
7256
|
-
for (l = (h =
|
|
7257
|
-
return h ==
|
|
7255
|
+
if (r = c < 0, n = h == g, !i || !o) return n ? 0 : !i ^ r ? 1 : -1;
|
|
7256
|
+
if (!n) return h > g ^ r ? 1 : -1;
|
|
7257
|
+
for (l = (h = i.length) < (g = o.length) ? h : g, c = 0; c < l; c++) if (i[c] != o[c]) return i[c] > o[c] ^ r ? 1 : -1;
|
|
7258
|
+
return h == g ? 0 : h > g ^ r ? 1 : -1;
|
|
7258
7259
|
}
|
|
7259
7260
|
s(Me, "compare");
|
|
7260
7261
|
function J(e, t, r, n) {
|
|
7261
|
-
if (e < t || e > r || e !== ce(e)) throw Error(
|
|
7262
|
+
if (e < t || e > r || e !== ce(e)) throw Error(oe + (n || "Argument") + (typeof e == "number" ? e < t || e > r ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
|
|
7262
7263
|
}
|
|
7263
7264
|
s(J, "intCheck");
|
|
7264
7265
|
function at(e) {
|
|
@@ -7270,61 +7271,61 @@ function ct(e, t) {
|
|
|
7270
7271
|
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t;
|
|
7271
7272
|
}
|
|
7272
7273
|
s(ct, "toExponential");
|
|
7273
|
-
function
|
|
7274
|
-
var n,
|
|
7274
|
+
function ye(e, t, r) {
|
|
7275
|
+
var n, i;
|
|
7275
7276
|
if (t < 0) {
|
|
7276
|
-
for (
|
|
7277
|
-
e =
|
|
7277
|
+
for (i = r + "."; ++t; i += r) ;
|
|
7278
|
+
e = i + e;
|
|
7278
7279
|
} else if (n = e.length, ++t > n) {
|
|
7279
|
-
for (
|
|
7280
|
-
e +=
|
|
7280
|
+
for (i = r, t -= n; --t; i += r) ;
|
|
7281
|
+
e += i;
|
|
7281
7282
|
} else t < n && (e = e.slice(0, t) + "." + e.slice(t));
|
|
7282
7283
|
return e;
|
|
7283
7284
|
}
|
|
7284
|
-
s(
|
|
7285
|
-
var
|
|
7286
|
-
const
|
|
7285
|
+
s(ye, "toFixedPoint");
|
|
7286
|
+
var Ni = xr();
|
|
7287
|
+
const Di = 24, Xe = 32, Mi = s(() => typeof globalThis < "u" && globalThis.crypto && typeof globalThis.crypto.getRandomValues == "function" ? () => {
|
|
7287
7288
|
const e = new Uint32Array(1);
|
|
7288
7289
|
return globalThis.crypto.getRandomValues(e), e[0] / 4294967296;
|
|
7289
|
-
} : Math.random, "createRandom"),
|
|
7290
|
+
} : Math.random, "createRandom"), Pt = Mi(), Nt = s((e = 4, t = Pt) => {
|
|
7290
7291
|
let r = "";
|
|
7291
7292
|
for (; r.length < e; ) r = r + Math.floor(t() * 36).toString(36);
|
|
7292
7293
|
return r;
|
|
7293
7294
|
}, "createEntropy");
|
|
7294
|
-
function
|
|
7295
|
-
let t = new
|
|
7295
|
+
function xi(e) {
|
|
7296
|
+
let t = new Ni(0);
|
|
7296
7297
|
for (const r of e.values()) t = t.multipliedBy(256).plus(r);
|
|
7297
7298
|
return t;
|
|
7298
7299
|
}
|
|
7299
|
-
s(
|
|
7300
|
-
const
|
|
7300
|
+
s(xi, "bufToBigInt");
|
|
7301
|
+
const Gr = s((e = "") => {
|
|
7301
7302
|
const t = new TextEncoder();
|
|
7302
|
-
return
|
|
7303
|
-
}, "hash"),
|
|
7304
|
-
const r = Object.keys(e).toString(), n = r.length ? r +
|
|
7305
|
-
return
|
|
7306
|
-
}, "createFingerprint"),
|
|
7303
|
+
return xi(Li(t.encode(e))).toString(36).slice(1);
|
|
7304
|
+
}, "hash"), $r = Array.from({ length: 26 }, (e, t) => String.fromCharCode(t + 97)), Gi = s((e) => $r[Math.floor(e() * $r.length)], "randomLetter"), $i = s(({ globalObj: e = typeof global < "u" ? global : typeof window < "u" ? window : {}, random: t = Pt } = {}) => {
|
|
7305
|
+
const r = Object.keys(e).toString(), n = r.length ? r + Nt(Xe, t) : Nt(Xe, t);
|
|
7306
|
+
return Gr(n).substring(0, Xe);
|
|
7307
|
+
}, "createFingerprint"), ki = s((e) => () => e++, "createCounter"), Hi = 476782367, Fi = s(({ random: e = Pt, counter: t = ki(Math.floor(e() * Hi)), length: r = Di, fingerprint: n = $i({ random: e }) } = {}) => {
|
|
7307
7308
|
if (r > Xe) throw new Error(`Length must be between 2 and ${Xe}. Received: ${r}`);
|
|
7308
7309
|
return s(function() {
|
|
7309
|
-
const
|
|
7310
|
-
return `${
|
|
7310
|
+
const o = Gi(e), c = Date.now().toString(36), l = t().toString(36), h = Nt(r, e), g = `${c + h + l + n}`;
|
|
7311
|
+
return `${o + Gr(g).substring(1, r)}`;
|
|
7311
7312
|
}, "cuid2");
|
|
7312
|
-
}, "init"), ut =
|
|
7313
|
-
function
|
|
7313
|
+
}, "init"), ut = ji(Fi);
|
|
7314
|
+
function ji(e) {
|
|
7314
7315
|
let t;
|
|
7315
7316
|
return () => (t || (t = e()), t());
|
|
7316
7317
|
}
|
|
7317
|
-
s(
|
|
7318
|
-
var
|
|
7319
|
-
function
|
|
7318
|
+
s(ji, "lazy");
|
|
7319
|
+
var qi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7320
|
+
function kr(e) {
|
|
7320
7321
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7321
7322
|
}
|
|
7322
|
-
s(
|
|
7323
|
-
var xe = {},
|
|
7324
|
-
function
|
|
7325
|
-
if (
|
|
7326
|
-
|
|
7327
|
-
const e = ze, t =
|
|
7323
|
+
s(kr, "getDefaultExportFromCjs");
|
|
7324
|
+
var xe = {}, Hr;
|
|
7325
|
+
function Wi() {
|
|
7326
|
+
if (Hr) return xe;
|
|
7327
|
+
Hr = 1, Object.defineProperty(xe, "__esModule", { value: true }), xe.isBinaryFileSync = xe.isBinaryFile = void 0;
|
|
7328
|
+
const e = ze, t = ei, r = (0, t.promisify)(e.stat), n = (0, t.promisify)(e.open), i = (0, t.promisify)(e.close), o = 512, c = 3;
|
|
7328
7329
|
class l {
|
|
7329
7330
|
static {
|
|
7330
7331
|
s(this, "Reader");
|
|
@@ -7333,8 +7334,8 @@ function $i() {
|
|
|
7333
7334
|
size;
|
|
7334
7335
|
offset;
|
|
7335
7336
|
error;
|
|
7336
|
-
constructor(
|
|
7337
|
-
this.fileBuffer =
|
|
7337
|
+
constructor(C, y) {
|
|
7338
|
+
this.fileBuffer = C, this.size = y, this.offset = 0, this.error = false;
|
|
7338
7339
|
}
|
|
7339
7340
|
hasError() {
|
|
7340
7341
|
return this.error;
|
|
@@ -7342,63 +7343,63 @@ function $i() {
|
|
|
7342
7343
|
nextByte() {
|
|
7343
7344
|
return this.offset === this.size || this.hasError() ? (this.error = true, 255) : this.fileBuffer[this.offset++];
|
|
7344
7345
|
}
|
|
7345
|
-
next(
|
|
7346
|
-
const
|
|
7347
|
-
for (let B = 0; B <
|
|
7348
|
-
if (this.error) return
|
|
7349
|
-
|
|
7346
|
+
next(C) {
|
|
7347
|
+
const y = new Array();
|
|
7348
|
+
for (let B = 0; B < C; B++) {
|
|
7349
|
+
if (this.error) return y;
|
|
7350
|
+
y[B] = this.nextByte();
|
|
7350
7351
|
}
|
|
7351
|
-
return
|
|
7352
|
+
return y;
|
|
7352
7353
|
}
|
|
7353
7354
|
}
|
|
7354
|
-
function h(
|
|
7355
|
-
let
|
|
7356
|
-
for (; !
|
|
7357
|
-
const B =
|
|
7358
|
-
if (
|
|
7359
|
-
if (
|
|
7360
|
-
|
|
7355
|
+
function h(w) {
|
|
7356
|
+
let C = 0, y = 0;
|
|
7357
|
+
for (; !w.hasError(); ) {
|
|
7358
|
+
const B = w.nextByte();
|
|
7359
|
+
if (y = y | (B & 127) << 7 * C, (B & 128) === 0) break;
|
|
7360
|
+
if (C >= 10) {
|
|
7361
|
+
w.error = true;
|
|
7361
7362
|
break;
|
|
7362
7363
|
}
|
|
7363
|
-
|
|
7364
|
+
C++;
|
|
7364
7365
|
}
|
|
7365
|
-
return
|
|
7366
|
+
return y;
|
|
7366
7367
|
}
|
|
7367
7368
|
s(h, "readProtoVarInt");
|
|
7368
|
-
function
|
|
7369
|
-
switch (h(
|
|
7369
|
+
function g(w) {
|
|
7370
|
+
switch (h(w) & 7) {
|
|
7370
7371
|
case 0:
|
|
7371
|
-
return h(
|
|
7372
|
+
return h(w), true;
|
|
7372
7373
|
case 1:
|
|
7373
|
-
return
|
|
7374
|
+
return w.next(8), true;
|
|
7374
7375
|
case 2:
|
|
7375
|
-
const B = h(
|
|
7376
|
-
return
|
|
7376
|
+
const B = h(w);
|
|
7377
|
+
return w.next(B), true;
|
|
7377
7378
|
case 5:
|
|
7378
|
-
return
|
|
7379
|
+
return w.next(4), true;
|
|
7379
7380
|
}
|
|
7380
7381
|
return false;
|
|
7381
7382
|
}
|
|
7382
|
-
s(
|
|
7383
|
-
function m(
|
|
7384
|
-
const
|
|
7383
|
+
s(g, "readProtoMessage");
|
|
7384
|
+
function m(w, C) {
|
|
7385
|
+
const y = new l(w, C);
|
|
7385
7386
|
let B = 0;
|
|
7386
7387
|
for (; ; ) {
|
|
7387
|
-
if (!
|
|
7388
|
-
if (
|
|
7388
|
+
if (!g(y) && !y.hasError()) return false;
|
|
7389
|
+
if (y.hasError()) break;
|
|
7389
7390
|
B++;
|
|
7390
7391
|
}
|
|
7391
7392
|
return B > 0;
|
|
7392
7393
|
}
|
|
7393
7394
|
s(m, "isBinaryProto");
|
|
7394
|
-
async function A(
|
|
7395
|
-
if (x(
|
|
7396
|
-
const
|
|
7397
|
-
M(
|
|
7398
|
-
const B = await n(
|
|
7395
|
+
async function A(w, C) {
|
|
7396
|
+
if (x(w)) {
|
|
7397
|
+
const y = await r(w);
|
|
7398
|
+
M(y);
|
|
7399
|
+
const B = await n(w, "r"), L = Buffer.alloc(o + c);
|
|
7399
7400
|
return new Promise((U, G) => {
|
|
7400
|
-
e.read(B, L, 0,
|
|
7401
|
-
if (
|
|
7401
|
+
e.read(B, L, 0, o + c, 0, (k, a, u) => {
|
|
7402
|
+
if (i(B), k) G(k);
|
|
7402
7403
|
else try {
|
|
7403
7404
|
U(O(L, a));
|
|
7404
7405
|
} catch (f) {
|
|
@@ -7406,91 +7407,91 @@ function $i() {
|
|
|
7406
7407
|
}
|
|
7407
7408
|
});
|
|
7408
7409
|
});
|
|
7409
|
-
} else return
|
|
7410
|
+
} else return C === void 0 && (C = w.length), O(w, C);
|
|
7410
7411
|
}
|
|
7411
7412
|
s(A, "isBinaryFile"), xe.isBinaryFile = A;
|
|
7412
|
-
function
|
|
7413
|
-
if (x(
|
|
7414
|
-
const
|
|
7415
|
-
M(
|
|
7416
|
-
const B = e.openSync(
|
|
7413
|
+
function b(w, C) {
|
|
7414
|
+
if (x(w)) {
|
|
7415
|
+
const y = e.statSync(w);
|
|
7416
|
+
M(y);
|
|
7417
|
+
const B = e.openSync(w, "r"), L = Buffer.alloc(o + c), U = e.readSync(B, L, 0, o + c, 0);
|
|
7417
7418
|
return e.closeSync(B), O(L, U);
|
|
7418
|
-
} else return
|
|
7419
|
-
}
|
|
7420
|
-
s(
|
|
7421
|
-
function O(
|
|
7422
|
-
if (
|
|
7423
|
-
let
|
|
7424
|
-
const B = Math.min(
|
|
7425
|
-
if (
|
|
7426
|
-
if (B >= 5 &&
|
|
7427
|
-
if (
|
|
7419
|
+
} else return C === void 0 && (C = w.length), O(w, C);
|
|
7420
|
+
}
|
|
7421
|
+
s(b, "isBinaryFileSync"), xe.isBinaryFileSync = b;
|
|
7422
|
+
function O(w, C) {
|
|
7423
|
+
if (C === 0) return false;
|
|
7424
|
+
let y = 0;
|
|
7425
|
+
const B = Math.min(C, o + c), L = Math.min(B, o);
|
|
7426
|
+
if (C >= 3 && w[0] === 239 && w[1] === 187 && w[2] === 191 || C >= 4 && w[0] === 0 && w[1] === 0 && w[2] === 254 && w[3] === 255 || C >= 4 && w[0] === 255 && w[1] === 254 && w[2] === 0 && w[3] === 0 || C >= 4 && w[0] === 132 && w[1] === 49 && w[2] === 149 && w[3] === 51) return false;
|
|
7427
|
+
if (B >= 5 && w.slice(0, 5).toString() === "%PDF-") return true;
|
|
7428
|
+
if (C >= 2 && w[0] === 254 && w[1] === 255 || C >= 2 && w[0] === 255 && w[1] === 254) return false;
|
|
7428
7429
|
for (let U = 0; U < L; U++) {
|
|
7429
|
-
if (
|
|
7430
|
-
if ((
|
|
7431
|
-
if (
|
|
7432
|
-
if (U++,
|
|
7433
|
-
} else if (
|
|
7434
|
-
if (U++,
|
|
7430
|
+
if (w[U] === 0) return true;
|
|
7431
|
+
if ((w[U] < 7 || w[U] > 14) && (w[U] < 32 || w[U] > 127)) {
|
|
7432
|
+
if (w[U] >= 192 && w[U] <= 223 && U + 1 < B) {
|
|
7433
|
+
if (U++, w[U] >= 128 && w[U] <= 191) continue;
|
|
7434
|
+
} else if (w[U] >= 224 && w[U] <= 239 && U + 2 < B) {
|
|
7435
|
+
if (U++, w[U] >= 128 && w[U] <= 191 && w[U + 1] >= 128 && w[U + 1] <= 191) {
|
|
7435
7436
|
U++;
|
|
7436
7437
|
continue;
|
|
7437
7438
|
}
|
|
7438
|
-
} else if (
|
|
7439
|
+
} else if (w[U] >= 240 && w[U] <= 247 && U + 3 < B && (U++, w[U] >= 128 && w[U] <= 191 && w[U + 1] >= 128 && w[U + 1] <= 191 && w[U + 2] >= 128 && w[U + 2] <= 191)) {
|
|
7439
7440
|
U += 2;
|
|
7440
7441
|
continue;
|
|
7441
7442
|
}
|
|
7442
|
-
if (
|
|
7443
|
+
if (y++, U >= 32 && y * 100 / L > 10) return true;
|
|
7443
7444
|
}
|
|
7444
7445
|
}
|
|
7445
|
-
return !!(
|
|
7446
|
+
return !!(y * 100 / L > 10 || y > 1 && m(w, L));
|
|
7446
7447
|
}
|
|
7447
7448
|
s(O, "isBinaryCheck");
|
|
7448
|
-
function x(
|
|
7449
|
-
return typeof
|
|
7449
|
+
function x(w) {
|
|
7450
|
+
return typeof w == "string";
|
|
7450
7451
|
}
|
|
7451
7452
|
s(x, "isString");
|
|
7452
|
-
function M(
|
|
7453
|
-
if (!
|
|
7453
|
+
function M(w) {
|
|
7454
|
+
if (!w.isFile()) throw new Error("Path provided was not a file!");
|
|
7454
7455
|
}
|
|
7455
7456
|
return s(M, "isStatFile"), xe;
|
|
7456
7457
|
}
|
|
7457
|
-
s(
|
|
7458
|
-
var
|
|
7459
|
-
var
|
|
7460
|
-
return
|
|
7458
|
+
s(Wi, "requireLib");
|
|
7459
|
+
var Ki = Wi(), Fr = {}, Vi = s((function(e, t, r, n, i) {
|
|
7460
|
+
var o = new Worker(Fr[t] || (Fr[t] = URL.createObjectURL(new Blob([e + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'], { type: "text/javascript" }))));
|
|
7461
|
+
return o.onmessage = function(c) {
|
|
7461
7462
|
var l = c.data, h = l.$e$;
|
|
7462
7463
|
if (h) {
|
|
7463
|
-
var
|
|
7464
|
-
|
|
7465
|
-
} else
|
|
7466
|
-
},
|
|
7467
|
-
}), "wk"), K = Uint8Array, ie = Uint16Array, Ze = Int32Array, je = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), qe = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), et = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
|
|
7464
|
+
var g = new Error(h[0]);
|
|
7465
|
+
g.code = h[1], g.stack = h[2], i(g, null);
|
|
7466
|
+
} else i(null, l);
|
|
7467
|
+
}, o.postMessage(r, n), o;
|
|
7468
|
+
}), "wk"), K = Uint8Array, ie = Uint16Array, Ze = Int32Array, je = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), qe = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), et = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), jr = s(function(e, t) {
|
|
7468
7469
|
for (var r = new ie(31), n = 0; n < 31; ++n) r[n] = t += 1 << e[n - 1];
|
|
7469
|
-
for (var
|
|
7470
|
-
return { b: r, r:
|
|
7471
|
-
}, "freb"),
|
|
7470
|
+
for (var i = new Ze(r[30]), n = 1; n < 30; ++n) for (var o = r[n]; o < r[n + 1]; ++o) i[o] = o - r[n] << 5 | n;
|
|
7471
|
+
return { b: r, r: i };
|
|
7472
|
+
}, "freb"), qr = jr(je, 2), Dt = qr.b, lt = qr.r;
|
|
7472
7473
|
Dt[28] = 258, lt[258] = 28;
|
|
7473
|
-
for (var
|
|
7474
|
+
for (var Wr = jr(qe, 0), Kr = Wr.b, Mt = Wr.r, tt = new ie(32768), V = 0; V < 32768; ++V) {
|
|
7474
7475
|
var Be = (V & 43690) >> 1 | (V & 21845) << 1;
|
|
7475
7476
|
Be = (Be & 52428) >> 2 | (Be & 13107) << 2, Be = (Be & 61680) >> 4 | (Be & 3855) << 4, tt[V] = ((Be & 65280) >> 8 | (Be & 255) << 8) >> 1;
|
|
7476
7477
|
}
|
|
7477
7478
|
for (var fe = s((function(e, t, r) {
|
|
7478
|
-
for (var n = e.length,
|
|
7479
|
+
for (var n = e.length, i = 0, o = new ie(t); i < n; ++i) e[i] && ++o[e[i] - 1];
|
|
7479
7480
|
var c = new ie(t);
|
|
7480
|
-
for (
|
|
7481
|
+
for (i = 1; i < t; ++i) c[i] = c[i - 1] + o[i - 1] << 1;
|
|
7481
7482
|
var l;
|
|
7482
7483
|
if (r) {
|
|
7483
7484
|
l = new ie(1 << t);
|
|
7484
7485
|
var h = 15 - t;
|
|
7485
|
-
for (
|
|
7486
|
-
} else for (l = new ie(n),
|
|
7486
|
+
for (i = 0; i < n; ++i) if (e[i]) for (var g = i << 4 | e[i], m = t - e[i], A = c[e[i] - 1]++ << m, b = A | (1 << m) - 1; A <= b; ++A) l[tt[A] >> h] = g;
|
|
7487
|
+
} else for (l = new ie(n), i = 0; i < n; ++i) e[i] && (l[i] = tt[c[e[i] - 1]++] >> 15 - e[i]);
|
|
7487
7488
|
return l;
|
|
7488
|
-
}), "hMap"),
|
|
7489
|
-
for (var V = 144; V < 256; ++V)
|
|
7490
|
-
for (var V = 256; V < 280; ++V)
|
|
7491
|
-
for (var V = 280; V < 288; ++V)
|
|
7489
|
+
}), "hMap"), we = new K(288), V = 0; V < 144; ++V) we[V] = 8;
|
|
7490
|
+
for (var V = 144; V < 256; ++V) we[V] = 9;
|
|
7491
|
+
for (var V = 256; V < 280; ++V) we[V] = 7;
|
|
7492
|
+
for (var V = 280; V < 288; ++V) we[V] = 8;
|
|
7492
7493
|
for (var We = new K(32), V = 0; V < 32; ++V) We[V] = 5;
|
|
7493
|
-
var
|
|
7494
|
+
var Vr = fe(we, 9, 0), Yr = fe(we, 9, 1), zr = fe(We, 5, 0), Jr = fe(We, 5, 1), ft = s(function(e) {
|
|
7494
7495
|
for (var t = e[0], r = 1; r < e.length; ++r) e[r] > t && (t = e[r]);
|
|
7495
7496
|
return t;
|
|
7496
7497
|
}, "max"), he = s(function(e, t, r) {
|
|
@@ -7503,99 +7504,99 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7503
7504
|
return (e + 7) / 8 | 0;
|
|
7504
7505
|
}, "shft"), Ge = s(function(e, t, r) {
|
|
7505
7506
|
return (t == null || t < 0) && (t = 0), (r == null || r > e.length) && (r = e.length), new K(e.subarray(t, r));
|
|
7506
|
-
}, "slc"),
|
|
7507
|
-
var n = new Error(t ||
|
|
7507
|
+
}, "slc"), Qr = ["unexpected EOF", "invalid block type", "invalid length/literal", "invalid distance", "stream finished", "no stream handler", , "no callback", "invalid UTF-8 data", "extra field too long", "date not in range 1980-2099", "filename too long", "stream finishing", "invalid zip data"], X = s(function(e, t, r) {
|
|
7508
|
+
var n = new Error(t || Qr[e]);
|
|
7508
7509
|
if (n.code = e, Error.captureStackTrace && Error.captureStackTrace(n, X), !r) throw n;
|
|
7509
7510
|
return n;
|
|
7510
|
-
}, "err"),
|
|
7511
|
-
var
|
|
7512
|
-
if (!
|
|
7511
|
+
}, "err"), Xr = s(function(e, t, r, n) {
|
|
7512
|
+
var i = e.length, o = n ? n.length : 0;
|
|
7513
|
+
if (!i || t.f && !t.l) return r || new K(0);
|
|
7513
7514
|
var c = !r, l = c || t.i != 2, h = t.i;
|
|
7514
|
-
c && (r = new K(
|
|
7515
|
-
var
|
|
7515
|
+
c && (r = new K(i * 3));
|
|
7516
|
+
var g = s(function(ne) {
|
|
7516
7517
|
var pe = r.length;
|
|
7517
7518
|
if (ne > pe) {
|
|
7518
7519
|
var Z = new K(Math.max(pe * 2, ne));
|
|
7519
7520
|
Z.set(r), r = Z;
|
|
7520
7521
|
}
|
|
7521
|
-
}, "cbuf"), m = t.f || 0, A = t.p || 0,
|
|
7522
|
+
}, "cbuf"), m = t.f || 0, A = t.p || 0, b = t.b || 0, O = t.l, x = t.d, M = t.m, w = t.n, C = i * 8;
|
|
7522
7523
|
do {
|
|
7523
7524
|
if (!O) {
|
|
7524
7525
|
m = he(e, A, 1);
|
|
7525
|
-
var
|
|
7526
|
-
if (A += 3,
|
|
7527
|
-
else if (
|
|
7526
|
+
var y = he(e, A + 1, 3);
|
|
7527
|
+
if (A += 3, y) if (y == 1) O = Yr, x = Jr, M = 9, w = 5;
|
|
7528
|
+
else if (y == 2) {
|
|
7528
7529
|
var G = he(e, A, 31) + 257, k = he(e, A + 10, 15) + 4, a = G + he(e, A + 5, 31) + 1;
|
|
7529
7530
|
A += 14;
|
|
7530
|
-
for (var u = new K(a), f = new K(19),
|
|
7531
|
+
for (var u = new K(a), f = new K(19), _ = 0; _ < k; ++_) f[et[_]] = he(e, A + _ * 3, 7);
|
|
7531
7532
|
A += k * 3;
|
|
7532
|
-
for (var p = ft(f), I = (1 << p) - 1, T = fe(f, p, 1),
|
|
7533
|
+
for (var p = ft(f), I = (1 << p) - 1, T = fe(f, p, 1), _ = 0; _ < a; ) {
|
|
7533
7534
|
var d = T[he(e, A, I)];
|
|
7534
7535
|
A += d & 15;
|
|
7535
7536
|
var B = d >> 4;
|
|
7536
|
-
if (B < 16) u[
|
|
7537
|
+
if (B < 16) u[_++] = B;
|
|
7537
7538
|
else {
|
|
7538
7539
|
var E = 0, S = 0;
|
|
7539
|
-
for (B == 16 ? (S = 3 + he(e, A, 3), A += 2, E = u[
|
|
7540
|
+
for (B == 16 ? (S = 3 + he(e, A, 3), A += 2, E = u[_ - 1]) : B == 17 ? (S = 3 + he(e, A, 7), A += 3) : B == 18 && (S = 11 + he(e, A, 127), A += 7); S--; ) u[_++] = E;
|
|
7540
7541
|
}
|
|
7541
7542
|
}
|
|
7542
7543
|
var R = u.subarray(0, G), v = u.subarray(G);
|
|
7543
|
-
M = ft(R),
|
|
7544
|
+
M = ft(R), w = ft(v), O = fe(R, M, 1), x = fe(v, w, 1);
|
|
7544
7545
|
} else X(1);
|
|
7545
7546
|
else {
|
|
7546
7547
|
var B = rt(A) + 4, L = e[B - 4] | e[B - 3] << 8, U = B + L;
|
|
7547
|
-
if (U >
|
|
7548
|
+
if (U > i) {
|
|
7548
7549
|
h && X(0);
|
|
7549
7550
|
break;
|
|
7550
7551
|
}
|
|
7551
|
-
l &&
|
|
7552
|
+
l && g(b + L), r.set(e.subarray(B, U), b), t.b = b += L, t.p = A = U * 8, t.f = m;
|
|
7552
7553
|
continue;
|
|
7553
7554
|
}
|
|
7554
|
-
if (A >
|
|
7555
|
+
if (A > C) {
|
|
7555
7556
|
h && X(0);
|
|
7556
7557
|
break;
|
|
7557
7558
|
}
|
|
7558
7559
|
}
|
|
7559
|
-
l &&
|
|
7560
|
-
for (var
|
|
7561
|
-
var E = O[ht(e, A) &
|
|
7562
|
-
if (A += E & 15, A >
|
|
7560
|
+
l && g(b + 131072);
|
|
7561
|
+
for (var N = (1 << M) - 1, P = (1 << w) - 1, H = A; ; H = A) {
|
|
7562
|
+
var E = O[ht(e, A) & N], j = E >> 4;
|
|
7563
|
+
if (A += E & 15, A > C) {
|
|
7563
7564
|
h && X(0);
|
|
7564
7565
|
break;
|
|
7565
7566
|
}
|
|
7566
|
-
if (E || X(2), j < 256) r[
|
|
7567
|
+
if (E || X(2), j < 256) r[b++] = j;
|
|
7567
7568
|
else if (j == 256) {
|
|
7568
7569
|
H = A, O = null;
|
|
7569
7570
|
break;
|
|
7570
7571
|
} else {
|
|
7571
7572
|
var q = j - 254;
|
|
7572
7573
|
if (j > 264) {
|
|
7573
|
-
var
|
|
7574
|
-
q = he(e, A, (1 << D) - 1) + Dt[
|
|
7574
|
+
var _ = j - 257, D = je[_];
|
|
7575
|
+
q = he(e, A, (1 << D) - 1) + Dt[_], A += D;
|
|
7575
7576
|
}
|
|
7576
|
-
var F = x[ht(e, A) &
|
|
7577
|
+
var F = x[ht(e, A) & P], z = F >> 4;
|
|
7577
7578
|
F || X(3), A += F & 15;
|
|
7578
|
-
var v =
|
|
7579
|
+
var v = Kr[z];
|
|
7579
7580
|
if (z > 3) {
|
|
7580
7581
|
var D = qe[z];
|
|
7581
7582
|
v += ht(e, A) & (1 << D) - 1, A += D;
|
|
7582
7583
|
}
|
|
7583
|
-
if (A >
|
|
7584
|
+
if (A > C) {
|
|
7584
7585
|
h && X(0);
|
|
7585
7586
|
break;
|
|
7586
7587
|
}
|
|
7587
|
-
l &&
|
|
7588
|
-
var de =
|
|
7589
|
-
if (
|
|
7590
|
-
var ve =
|
|
7591
|
-
for (ve +
|
|
7588
|
+
l && g(b + 131072);
|
|
7589
|
+
var de = b + q;
|
|
7590
|
+
if (b < v) {
|
|
7591
|
+
var ve = o - v, be = Math.min(v, de);
|
|
7592
|
+
for (ve + b < 0 && X(3); b < be; ++b) r[b] = n[ve + b];
|
|
7592
7593
|
}
|
|
7593
|
-
for (;
|
|
7594
|
+
for (; b < de; ++b) r[b] = r[b - v];
|
|
7594
7595
|
}
|
|
7595
7596
|
}
|
|
7596
|
-
t.l = O, t.p = H, t.b =
|
|
7597
|
+
t.l = O, t.p = H, t.b = b, t.f = m, O && (m = 1, t.m = M, t.d = x, t.n = w);
|
|
7597
7598
|
} while (!m);
|
|
7598
|
-
return
|
|
7599
|
+
return b != r.length && c ? Ge(r, 0, b) : r.subarray(0, b);
|
|
7599
7600
|
}, "inflt"), ge = s(function(e, t, r) {
|
|
7600
7601
|
r <<= t & 7;
|
|
7601
7602
|
var n = t / 8 | 0;
|
|
@@ -7606,34 +7607,34 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7606
7607
|
e[n] |= r, e[n + 1] |= r >> 8, e[n + 2] |= r >> 16;
|
|
7607
7608
|
}, "wbits16"), dt = s(function(e, t) {
|
|
7608
7609
|
for (var r = [], n = 0; n < e.length; ++n) e[n] && r.push({ s: n, f: e[n] });
|
|
7609
|
-
var
|
|
7610
|
-
if (!
|
|
7611
|
-
if (
|
|
7610
|
+
var i = r.length, o = r.slice();
|
|
7611
|
+
if (!i) return { t: kt, l: 0 };
|
|
7612
|
+
if (i == 1) {
|
|
7612
7613
|
var c = new K(r[0].s + 1);
|
|
7613
7614
|
return c[r[0].s] = 1, { t: c, l: 1 };
|
|
7614
7615
|
}
|
|
7615
7616
|
r.sort(function(U, G) {
|
|
7616
7617
|
return U.f - G.f;
|
|
7617
7618
|
}), r.push({ s: -1, f: 25001 });
|
|
7618
|
-
var l = r[0], h = r[1],
|
|
7619
|
-
for (r[0] = { s: -1, f: l.f + h.f, l, r: h }; m !=
|
|
7620
|
-
for (var
|
|
7621
|
-
var O = new ie(
|
|
7619
|
+
var l = r[0], h = r[1], g = 0, m = 1, A = 2;
|
|
7620
|
+
for (r[0] = { s: -1, f: l.f + h.f, l, r: h }; m != i - 1; ) l = r[r[g].f < r[A].f ? g++ : A++], h = r[g != m && r[g].f < r[A].f ? g++ : A++], r[m++] = { s: -1, f: l.f + h.f, l, r: h };
|
|
7621
|
+
for (var b = o[0].s, n = 1; n < i; ++n) o[n].s > b && (b = o[n].s);
|
|
7622
|
+
var O = new ie(b + 1), x = pt(r[m - 1], O, 0);
|
|
7622
7623
|
if (x > t) {
|
|
7623
|
-
var n = 0, M = 0,
|
|
7624
|
-
for (
|
|
7624
|
+
var n = 0, M = 0, w = x - t, C = 1 << w;
|
|
7625
|
+
for (o.sort(function(G, k) {
|
|
7625
7626
|
return O[k.s] - O[G.s] || G.f - k.f;
|
|
7626
|
-
}); n <
|
|
7627
|
-
var
|
|
7628
|
-
if (O[
|
|
7627
|
+
}); n < i; ++n) {
|
|
7628
|
+
var y = o[n].s;
|
|
7629
|
+
if (O[y] > t) M += C - (1 << x - O[y]), O[y] = t;
|
|
7629
7630
|
else break;
|
|
7630
7631
|
}
|
|
7631
|
-
for (M >>=
|
|
7632
|
-
var B =
|
|
7632
|
+
for (M >>= w; M > 0; ) {
|
|
7633
|
+
var B = o[n].s;
|
|
7633
7634
|
O[B] < t ? M -= 1 << t - O[B]++ - 1 : ++n;
|
|
7634
7635
|
}
|
|
7635
7636
|
for (; n >= 0 && M; --n) {
|
|
7636
|
-
var L =
|
|
7637
|
+
var L = o[n].s;
|
|
7637
7638
|
O[L] == t && (--O[L], ++M);
|
|
7638
7639
|
}
|
|
7639
7640
|
x = t;
|
|
@@ -7643,48 +7644,48 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7643
7644
|
return e.s == -1 ? Math.max(pt(e.l, t, r + 1), pt(e.r, t, r + 1)) : t[e.s] = r;
|
|
7644
7645
|
}, "ln"), xt = s(function(e) {
|
|
7645
7646
|
for (var t = e.length; t && !e[--t]; ) ;
|
|
7646
|
-
for (var r = new ie(++t), n = 0,
|
|
7647
|
+
for (var r = new ie(++t), n = 0, i = e[0], o = 1, c = s(function(h) {
|
|
7647
7648
|
r[n++] = h;
|
|
7648
|
-
}, "w"), l = 1; l <= t; ++l) if (e[l] ==
|
|
7649
|
+
}, "w"), l = 1; l <= t; ++l) if (e[l] == i && l != t) ++o;
|
|
7649
7650
|
else {
|
|
7650
|
-
if (!
|
|
7651
|
-
for (;
|
|
7652
|
-
|
|
7653
|
-
} else if (
|
|
7654
|
-
for (c(
|
|
7655
|
-
|
|
7651
|
+
if (!i && o > 2) {
|
|
7652
|
+
for (; o > 138; o -= 138) c(32754);
|
|
7653
|
+
o > 2 && (c(o > 10 ? o - 11 << 5 | 28690 : o - 3 << 5 | 12305), o = 0);
|
|
7654
|
+
} else if (o > 3) {
|
|
7655
|
+
for (c(i), --o; o > 6; o -= 6) c(8304);
|
|
7656
|
+
o > 2 && (c(o - 3 << 5 | 8208), o = 0);
|
|
7656
7657
|
}
|
|
7657
|
-
for (;
|
|
7658
|
-
|
|
7658
|
+
for (; o--; ) c(i);
|
|
7659
|
+
o = 1, i = e[l];
|
|
7659
7660
|
}
|
|
7660
7661
|
return { c: r.subarray(0, n), n: t };
|
|
7661
7662
|
}, "lc"), Ve = s(function(e, t) {
|
|
7662
7663
|
for (var r = 0, n = 0; n < t.length; ++n) r += e[n] * t[n];
|
|
7663
7664
|
return r;
|
|
7664
7665
|
}, "clen"), Gt = s(function(e, t, r) {
|
|
7665
|
-
var n = r.length,
|
|
7666
|
-
e[
|
|
7667
|
-
for (var
|
|
7668
|
-
return (
|
|
7669
|
-
}, "wfblk"), $t = s(function(e, t, r, n,
|
|
7670
|
-
ge(t, m++, r), ++
|
|
7671
|
-
for (var A = dt(
|
|
7666
|
+
var n = r.length, i = rt(t + 2);
|
|
7667
|
+
e[i] = n & 255, e[i + 1] = n >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
|
|
7668
|
+
for (var o = 0; o < n; ++o) e[i + o + 4] = r[o];
|
|
7669
|
+
return (i + 4 + n) * 8;
|
|
7670
|
+
}, "wfblk"), $t = s(function(e, t, r, n, i, o, c, l, h, g, m) {
|
|
7671
|
+
ge(t, m++, r), ++i[256];
|
|
7672
|
+
for (var A = dt(i, 15), b = A.t, O = A.l, x = dt(o, 15), M = x.t, w = x.l, C = xt(b), y = C.c, B = C.n, L = xt(M), U = L.c, G = L.n, k = new ie(19), a = 0; a < y.length; ++a) ++k[y[a] & 31];
|
|
7672
7673
|
for (var a = 0; a < U.length; ++a) ++k[U[a] & 31];
|
|
7673
|
-
for (var u = dt(k, 7), f = u.t,
|
|
7674
|
-
var I =
|
|
7675
|
-
if (h >= 0 && I <= T && I <= d) return Gt(t, m, e.subarray(h, h +
|
|
7674
|
+
for (var u = dt(k, 7), f = u.t, _ = u.l, p = 19; p > 4 && !f[et[p - 1]]; --p) ;
|
|
7675
|
+
var I = g + 5 << 3, T = Ve(i, we) + Ve(o, We) + c, d = Ve(i, b) + Ve(o, M) + c + 14 + 3 * p + Ve(k, f) + 2 * k[16] + 3 * k[17] + 7 * k[18];
|
|
7676
|
+
if (h >= 0 && I <= T && I <= d) return Gt(t, m, e.subarray(h, h + g));
|
|
7676
7677
|
var E, S, R, v;
|
|
7677
7678
|
if (ge(t, m, 1 + (d < T)), m += 2, d < T) {
|
|
7678
|
-
E = fe(
|
|
7679
|
-
var
|
|
7679
|
+
E = fe(b, O, 0), S = b, R = fe(M, w, 0), v = M;
|
|
7680
|
+
var N = fe(f, _, 0);
|
|
7680
7681
|
ge(t, m, B - 257), ge(t, m + 5, G - 1), ge(t, m + 10, p - 4), m += 14;
|
|
7681
7682
|
for (var a = 0; a < p; ++a) ge(t, m + 3 * a, f[et[a]]);
|
|
7682
7683
|
m += 3 * p;
|
|
7683
|
-
for (var
|
|
7684
|
+
for (var P = [y, U], H = 0; H < 2; ++H) for (var j = P[H], a = 0; a < j.length; ++a) {
|
|
7684
7685
|
var q = j[a] & 31;
|
|
7685
|
-
ge(t, m,
|
|
7686
|
+
ge(t, m, N[q]), m += f[q], q > 15 && (ge(t, m, j[a] >> 5 & 127), m += j[a] >> 12);
|
|
7686
7687
|
}
|
|
7687
|
-
} else E =
|
|
7688
|
+
} else E = Vr, S = we, R = zr, v = We;
|
|
7688
7689
|
for (var a = 0; a < l; ++a) {
|
|
7689
7690
|
var D = n[a];
|
|
7690
7691
|
if (D > 255) {
|
|
@@ -7695,116 +7696,116 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7695
7696
|
} else Ke(t, m, E[D]), m += S[D];
|
|
7696
7697
|
}
|
|
7697
7698
|
return Ke(t, m, E[256]), m + S[256];
|
|
7698
|
-
}, "wblk"),
|
|
7699
|
-
var c =
|
|
7699
|
+
}, "wblk"), Zr = new Ze([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), kt = new K(0), en = s(function(e, t, r, n, i, o) {
|
|
7700
|
+
var c = o.z || e.length, l = new K(n + c + 5 * (1 + Math.ceil(c / 7e3)) + i), h = l.subarray(n, l.length - i), g = o.l, m = (o.r || 0) & 7;
|
|
7700
7701
|
if (t) {
|
|
7701
|
-
m && (h[0] =
|
|
7702
|
-
for (var A =
|
|
7703
|
-
return (e[ee] ^ e[ee + 1] <<
|
|
7704
|
-
}, "hsh"), L = new Ze(25e3), U = new ie(288), G = new ie(32), k = 0, a = 0, u =
|
|
7705
|
-
var I = B(u), T = u & 32767, d =
|
|
7706
|
-
if (M[T] = d,
|
|
7702
|
+
m && (h[0] = o.r >> 3);
|
|
7703
|
+
for (var A = Zr[t - 1], b = A >> 13, O = A & 8191, x = (1 << r) - 1, M = o.p || new ie(32768), w = o.h || new ie(x + 1), C = Math.ceil(r / 3), y = 2 * C, B = s(function(ee) {
|
|
7704
|
+
return (e[ee] ^ e[ee + 1] << C ^ e[ee + 2] << y) & x;
|
|
7705
|
+
}, "hsh"), L = new Ze(25e3), U = new ie(288), G = new ie(32), k = 0, a = 0, u = o.i || 0, f = 0, _ = o.w || 0, p = 0; u + 2 < c; ++u) {
|
|
7706
|
+
var I = B(u), T = u & 32767, d = w[I];
|
|
7707
|
+
if (M[T] = d, w[I] = T, _ <= u) {
|
|
7707
7708
|
var E = c - u;
|
|
7708
|
-
if ((k > 7e3 || f > 24576) && (E > 423 || !
|
|
7709
|
+
if ((k > 7e3 || f > 24576) && (E > 423 || !g)) {
|
|
7709
7710
|
m = $t(e, h, 0, L, U, G, a, f, p, u - p, m), f = k = a = 0, p = u;
|
|
7710
7711
|
for (var S = 0; S < 286; ++S) U[S] = 0;
|
|
7711
7712
|
for (var S = 0; S < 30; ++S) G[S] = 0;
|
|
7712
7713
|
}
|
|
7713
|
-
var R = 2, v = 0,
|
|
7714
|
-
if (E > 2 && I == B(u -
|
|
7715
|
-
if (e[u + R] == e[u + R -
|
|
7716
|
-
for (var D = 0; D < q && e[u + D] == e[u + D -
|
|
7714
|
+
var R = 2, v = 0, N = O, P = T - d & 32767;
|
|
7715
|
+
if (E > 2 && I == B(u - P)) for (var H = Math.min(b, E) - 1, j = Math.min(32767, u), q = Math.min(258, E); P <= j && --N && T != d; ) {
|
|
7716
|
+
if (e[u + R] == e[u + R - P]) {
|
|
7717
|
+
for (var D = 0; D < q && e[u + D] == e[u + D - P]; ++D) ;
|
|
7717
7718
|
if (D > R) {
|
|
7718
|
-
if (R = D, v =
|
|
7719
|
-
for (var F = Math.min(
|
|
7720
|
-
var de = u -
|
|
7721
|
-
|
|
7719
|
+
if (R = D, v = P, D > H) break;
|
|
7720
|
+
for (var F = Math.min(P, D - 2), z = 0, S = 0; S < F; ++S) {
|
|
7721
|
+
var de = u - P + S & 32767, ve = M[de], be = de - ve & 32767;
|
|
7722
|
+
be > z && (z = be, d = de);
|
|
7722
7723
|
}
|
|
7723
7724
|
}
|
|
7724
7725
|
}
|
|
7725
|
-
T = d, d = M[T],
|
|
7726
|
+
T = d, d = M[T], P += T - d & 32767;
|
|
7726
7727
|
}
|
|
7727
7728
|
if (v) {
|
|
7728
7729
|
L[f++] = 268435456 | lt[R] << 18 | Mt[v];
|
|
7729
7730
|
var ne = lt[R] & 31, pe = Mt[v] & 31;
|
|
7730
|
-
a += je[ne] + qe[pe], ++U[257 + ne], ++G[pe],
|
|
7731
|
+
a += je[ne] + qe[pe], ++U[257 + ne], ++G[pe], _ = u + R, ++k;
|
|
7731
7732
|
} else L[f++] = e[u], ++U[e[u]];
|
|
7732
7733
|
}
|
|
7733
7734
|
}
|
|
7734
|
-
for (u = Math.max(u,
|
|
7735
|
-
m = $t(e, h,
|
|
7735
|
+
for (u = Math.max(u, _); u < c; ++u) L[f++] = e[u], ++U[e[u]];
|
|
7736
|
+
m = $t(e, h, g, L, U, G, a, f, p, u - p, m), g || (o.r = m & 7 | h[m / 8 | 0] << 3, m -= 7, o.h = w, o.p = M, o.i = u, o.w = _);
|
|
7736
7737
|
} else {
|
|
7737
|
-
for (var u =
|
|
7738
|
+
for (var u = o.w || 0; u < c + g; u += 65535) {
|
|
7738
7739
|
var Z = u + 65535;
|
|
7739
|
-
Z >= c && (h[m / 8 | 0] =
|
|
7740
|
+
Z >= c && (h[m / 8 | 0] = g, Z = c), m = Gt(h, m + 1, e.subarray(u, Z));
|
|
7740
7741
|
}
|
|
7741
|
-
|
|
7742
|
+
o.i = c;
|
|
7742
7743
|
}
|
|
7743
|
-
return Ge(l, 0, n + rt(m) +
|
|
7744
|
-
}, "dflt"),
|
|
7744
|
+
return Ge(l, 0, n + rt(m) + i);
|
|
7745
|
+
}, "dflt"), Yi = (function() {
|
|
7745
7746
|
for (var e = new Int32Array(256), t = 0; t < 256; ++t) {
|
|
7746
7747
|
for (var r = t, n = 9; --n; ) r = (r & 1 && -306674912) ^ r >>> 1;
|
|
7747
7748
|
e[t] = r;
|
|
7748
7749
|
}
|
|
7749
7750
|
return e;
|
|
7750
|
-
})(),
|
|
7751
|
+
})(), zi = s(function() {
|
|
7751
7752
|
var e = -1;
|
|
7752
7753
|
return { p: s(function(t) {
|
|
7753
|
-
for (var r = e, n = 0; n < t.length; ++n) r =
|
|
7754
|
+
for (var r = e, n = 0; n < t.length; ++n) r = Yi[r & 255 ^ t[n]] ^ r >>> 8;
|
|
7754
7755
|
e = r;
|
|
7755
7756
|
}, "p"), d: s(function() {
|
|
7756
7757
|
return ~e;
|
|
7757
7758
|
}, "d") };
|
|
7758
|
-
}, "crc"),
|
|
7759
|
-
if (!
|
|
7760
|
-
var
|
|
7761
|
-
c.set(
|
|
7759
|
+
}, "crc"), tn = s(function(e, t, r, n, i) {
|
|
7760
|
+
if (!i && (i = { l: 1 }, t.dictionary)) {
|
|
7761
|
+
var o = t.dictionary.subarray(-32768), c = new K(o.length + e.length);
|
|
7762
|
+
c.set(o), c.set(e, o.length), e = c, i.w = o.length;
|
|
7762
7763
|
}
|
|
7763
|
-
return
|
|
7764
|
+
return en(e, t.level == null ? 6 : t.level, t.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, r, n, i);
|
|
7764
7765
|
}, "dopt"), Ht = s(function(e, t) {
|
|
7765
7766
|
var r = {};
|
|
7766
7767
|
for (var n in e) r[n] = e[n];
|
|
7767
7768
|
for (var n in t) r[n] = t[n];
|
|
7768
7769
|
return r;
|
|
7769
|
-
}, "mrg"),
|
|
7770
|
-
for (var n = e(),
|
|
7771
|
-
var l = n[c], h =
|
|
7770
|
+
}, "mrg"), rn = s(function(e, t, r) {
|
|
7771
|
+
for (var n = e(), i = e.toString(), o = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","), c = 0; c < n.length; ++c) {
|
|
7772
|
+
var l = n[c], h = o[c];
|
|
7772
7773
|
if (typeof l == "function") {
|
|
7773
7774
|
t += ";" + h + "=";
|
|
7774
|
-
var
|
|
7775
|
-
if (l.prototype) if (
|
|
7776
|
-
var m =
|
|
7777
|
-
t +=
|
|
7775
|
+
var g = l.toString();
|
|
7776
|
+
if (l.prototype) if (g.indexOf("[native code]") != -1) {
|
|
7777
|
+
var m = g.indexOf(" ", 8) + 1;
|
|
7778
|
+
t += g.slice(m, g.indexOf("(", m));
|
|
7778
7779
|
} else {
|
|
7779
|
-
t +=
|
|
7780
|
+
t += g;
|
|
7780
7781
|
for (var A in l.prototype) t += ";" + h + ".prototype." + A + "=" + l.prototype[A].toString();
|
|
7781
7782
|
}
|
|
7782
|
-
else t +=
|
|
7783
|
+
else t += g;
|
|
7783
7784
|
} else r[h] = l;
|
|
7784
7785
|
}
|
|
7785
7786
|
return t;
|
|
7786
|
-
}, "wcln"), mt = [],
|
|
7787
|
+
}, "wcln"), mt = [], Ji = s(function(e) {
|
|
7787
7788
|
var t = [];
|
|
7788
7789
|
for (var r in e) e[r].buffer && t.push((e[r] = new e[r].constructor(e[r])).buffer);
|
|
7789
7790
|
return t;
|
|
7790
|
-
}, "cbfs"),
|
|
7791
|
+
}, "cbfs"), Qi = s(function(e, t, r, n) {
|
|
7791
7792
|
if (!mt[r]) {
|
|
7792
|
-
for (var
|
|
7793
|
-
mt[r] = { c:
|
|
7793
|
+
for (var i = "", o = {}, c = e.length - 1, l = 0; l < c; ++l) i = rn(e[l], i, o);
|
|
7794
|
+
mt[r] = { c: rn(e[c], i, o), e: o };
|
|
7794
7795
|
}
|
|
7795
7796
|
var h = Ht({}, mt[r].e);
|
|
7796
|
-
return
|
|
7797
|
-
}, "wrkr"),
|
|
7798
|
-
return [K, ie, Ze, je, qe, et, Dt,
|
|
7799
|
-
}, "bInflt"),
|
|
7800
|
-
return [K, ie, Ze, je, qe, et, lt, Mt,
|
|
7797
|
+
return Vi(mt[r].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + t.toString() + "}", r, h, Ji(h), n);
|
|
7798
|
+
}, "wrkr"), Xi = s(function() {
|
|
7799
|
+
return [K, ie, Ze, je, qe, et, Dt, Kr, Yr, Jr, tt, Qr, fe, ft, he, ht, rt, Ge, X, Xr, qt, Et, nn];
|
|
7800
|
+
}, "bInflt"), Zi = s(function() {
|
|
7801
|
+
return [K, ie, Ze, je, qe, et, lt, Mt, Vr, we, zr, We, tt, Zr, kt, fe, ge, Ke, dt, pt, xt, Ve, Gt, $t, rt, Ge, en, tn, jt, Et];
|
|
7801
7802
|
}, "bDflt"), Et = s(function(e) {
|
|
7802
7803
|
return postMessage(e, [e.buffer]);
|
|
7803
|
-
}, "pbf"),
|
|
7804
|
+
}, "pbf"), nn = s(function(e) {
|
|
7804
7805
|
return e && { out: e.size && new K(e.size), dictionary: e.dictionary };
|
|
7805
|
-
}, "gopt"),
|
|
7806
|
-
var c =
|
|
7807
|
-
c.terminate(),
|
|
7806
|
+
}, "gopt"), on = s(function(e, t, r, n, i, o) {
|
|
7807
|
+
var c = Qi(r, n, i, function(l, h) {
|
|
7808
|
+
c.terminate(), o(l, h);
|
|
7808
7809
|
});
|
|
7809
7810
|
return c.postMessage([e, t], t.consume ? [e.buffer] : []), function() {
|
|
7810
7811
|
c.terminate();
|
|
@@ -7818,76 +7819,76 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7818
7819
|
}, "b8"), re = s(function(e, t, r) {
|
|
7819
7820
|
for (; r; ++t) e[t] = r, r >>>= 8;
|
|
7820
7821
|
}, "wbytes");
|
|
7821
|
-
function
|
|
7822
|
-
return r || (r = t, t = {}), typeof r != "function" && X(7),
|
|
7822
|
+
function eo(e, t, r) {
|
|
7823
|
+
return r || (r = t, t = {}), typeof r != "function" && X(7), on(e, t, [Zi], function(n) {
|
|
7823
7824
|
return Et(jt(n.data[0], n.data[1]));
|
|
7824
7825
|
}, 0, r);
|
|
7825
7826
|
}
|
|
7826
|
-
s(
|
|
7827
|
+
s(eo, "deflate");
|
|
7827
7828
|
function jt(e, t) {
|
|
7828
|
-
return
|
|
7829
|
+
return tn(e, t || {}, 0, 0);
|
|
7829
7830
|
}
|
|
7830
7831
|
s(jt, "deflateSync");
|
|
7831
|
-
function
|
|
7832
|
-
return r || (r = t, t = {}), typeof r != "function" && X(7),
|
|
7833
|
-
return Et(qt(n.data[0],
|
|
7832
|
+
function to(e, t, r) {
|
|
7833
|
+
return r || (r = t, t = {}), typeof r != "function" && X(7), on(e, t, [Xi], function(n) {
|
|
7834
|
+
return Et(qt(n.data[0], nn(n.data[1])));
|
|
7834
7835
|
}, 1, r);
|
|
7835
7836
|
}
|
|
7836
|
-
s(
|
|
7837
|
+
s(to, "inflate");
|
|
7837
7838
|
function qt(e, t) {
|
|
7838
|
-
return
|
|
7839
|
+
return Xr(e, { i: 2 }, t && t.out, t && t.dictionary);
|
|
7839
7840
|
}
|
|
7840
7841
|
s(qt, "inflateSync");
|
|
7841
|
-
var
|
|
7842
|
-
for (var
|
|
7843
|
-
var
|
|
7844
|
-
Array.isArray(
|
|
7842
|
+
var sn = s(function(e, t, r, n) {
|
|
7843
|
+
for (var i in e) {
|
|
7844
|
+
var o = e[i], c = t + i, l = n;
|
|
7845
|
+
Array.isArray(o) && (l = Ht(n, o[1]), o = o[0]), o instanceof K ? r[c] = [o, l] : (r[c += "/"] = [new K(0), l], sn(o, c, r, n));
|
|
7845
7846
|
}
|
|
7846
|
-
}, "fltn"),
|
|
7847
|
+
}, "fltn"), an = typeof TextEncoder < "u" && new TextEncoder(), Wt = typeof TextDecoder < "u" && new TextDecoder(), ro = 0;
|
|
7847
7848
|
try {
|
|
7848
|
-
Wt.decode(kt, { stream: true }),
|
|
7849
|
+
Wt.decode(kt, { stream: true }), ro = 1;
|
|
7849
7850
|
} catch {
|
|
7850
7851
|
}
|
|
7851
|
-
var
|
|
7852
|
+
var no = s(function(e) {
|
|
7852
7853
|
for (var t = "", r = 0; ; ) {
|
|
7853
|
-
var n = e[r++],
|
|
7854
|
-
if (r +
|
|
7855
|
-
|
|
7854
|
+
var n = e[r++], i = (n > 127) + (n > 223) + (n > 239);
|
|
7855
|
+
if (r + i > e.length) return { s: t, r: Ge(e, r - 1) };
|
|
7856
|
+
i ? i == 3 ? (n = ((n & 15) << 18 | (e[r++] & 63) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) - 65536, t += String.fromCharCode(55296 | n >> 10, 56320 | n & 1023)) : i & 1 ? t += String.fromCharCode((n & 31) << 6 | e[r++] & 63) : t += String.fromCharCode((n & 15) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) : t += String.fromCharCode(n);
|
|
7856
7857
|
}
|
|
7857
7858
|
}, "dutf8");
|
|
7858
|
-
function
|
|
7859
|
+
function cn(e, t) {
|
|
7859
7860
|
var r;
|
|
7860
|
-
if (
|
|
7861
|
-
for (var n = e.length,
|
|
7862
|
-
o
|
|
7861
|
+
if (an) return an.encode(e);
|
|
7862
|
+
for (var n = e.length, i = new K(e.length + (e.length >> 1)), o = 0, c = s(function(g) {
|
|
7863
|
+
i[o++] = g;
|
|
7863
7864
|
}, "w"), r = 0; r < n; ++r) {
|
|
7864
|
-
if (
|
|
7865
|
-
var l = new K(
|
|
7866
|
-
l.set(
|
|
7865
|
+
if (o + 5 > i.length) {
|
|
7866
|
+
var l = new K(o + 8 + (n - r << 1));
|
|
7867
|
+
l.set(i), i = l;
|
|
7867
7868
|
}
|
|
7868
7869
|
var h = e.charCodeAt(r);
|
|
7869
7870
|
h < 128 || t ? c(h) : h < 2048 ? (c(192 | h >> 6), c(128 | h & 63)) : h > 55295 && h < 57344 ? (h = 65536 + (h & 1047552) | e.charCodeAt(++r) & 1023, c(240 | h >> 18), c(128 | h >> 12 & 63), c(128 | h >> 6 & 63), c(128 | h & 63)) : (c(224 | h >> 12), c(128 | h >> 6 & 63), c(128 | h & 63));
|
|
7870
7871
|
}
|
|
7871
|
-
return Ge(
|
|
7872
|
+
return Ge(i, 0, o);
|
|
7872
7873
|
}
|
|
7873
|
-
s(
|
|
7874
|
-
function
|
|
7874
|
+
s(cn, "strToU8");
|
|
7875
|
+
function io(e, t) {
|
|
7875
7876
|
if (t) {
|
|
7876
7877
|
for (var r = "", n = 0; n < e.length; n += 16384) r += String.fromCharCode.apply(null, e.subarray(n, n + 16384));
|
|
7877
7878
|
return r;
|
|
7878
7879
|
} else {
|
|
7879
7880
|
if (Wt) return Wt.decode(e);
|
|
7880
|
-
var
|
|
7881
|
-
return r.length && X(8),
|
|
7881
|
+
var i = no(e), o = i.s, r = i.r;
|
|
7882
|
+
return r.length && X(8), o;
|
|
7882
7883
|
}
|
|
7883
7884
|
}
|
|
7884
|
-
s(
|
|
7885
|
-
var
|
|
7885
|
+
s(io, "strFromU8");
|
|
7886
|
+
var oo = s(function(e, t) {
|
|
7886
7887
|
return t + 30 + Ie(e, t + 26) + Ie(e, t + 28);
|
|
7887
|
-
}, "slzh"),
|
|
7888
|
-
var n = Ie(e, t + 28),
|
|
7889
|
-
return [Ie(e, t + 10), h,
|
|
7890
|
-
}, "zh"),
|
|
7888
|
+
}, "slzh"), so = s(function(e, t, r) {
|
|
7889
|
+
var n = Ie(e, t + 28), i = io(e.subarray(t + 46, t + 46 + n), !(Ie(e, t + 8) & 2048)), o = t + 46 + n, c = Ee(e, t + 20), l = r && c == 4294967295 ? ao(e, o) : [c, Ee(e, t + 24), Ee(e, t + 42)], h = l[0], g = l[1], m = l[2];
|
|
7890
|
+
return [Ie(e, t + 10), h, g, i, o + Ie(e, t + 30) + Ie(e, t + 32), m];
|
|
7891
|
+
}, "zh"), ao = s(function(e, t) {
|
|
7891
7892
|
for (; Ie(e, t) != 1; t += 4 + Ie(e, t + 2)) ;
|
|
7892
7893
|
return [Ft(e, t + 12), Ft(e, t + 4), Ft(e, t + 20)];
|
|
7893
7894
|
}, "z64e"), Kt = s(function(e) {
|
|
@@ -7897,57 +7898,57 @@ var Zi = s(function(e, t) {
|
|
|
7897
7898
|
n > 65535 && X(9), t += n + 4;
|
|
7898
7899
|
}
|
|
7899
7900
|
return t;
|
|
7900
|
-
}, "exfl"),
|
|
7901
|
-
var h = n.length,
|
|
7902
|
-
re(e, t, c != null ? 33639248 : 67324752), t += 4, c != null && (e[t++] = 20, e[t++] = r.os), e[t] = 20, t += 2, e[t++] = r.flag << 1 | (
|
|
7903
|
-
var
|
|
7904
|
-
if ((O < 0 || O > 119) && X(10), re(e, t, O << 25 |
|
|
7905
|
-
var M =
|
|
7906
|
-
re(e, t, +x), re(e, t + 2,
|
|
7901
|
+
}, "exfl"), un = s(function(e, t, r, n, i, o, c, l) {
|
|
7902
|
+
var h = n.length, g = r.extra, m = l && l.length, A = Kt(g);
|
|
7903
|
+
re(e, t, c != null ? 33639248 : 67324752), t += 4, c != null && (e[t++] = 20, e[t++] = r.os), e[t] = 20, t += 2, e[t++] = r.flag << 1 | (o < 0 && 8), e[t++] = i && 8, e[t++] = r.compression & 255, e[t++] = r.compression >> 8;
|
|
7904
|
+
var b = new Date(r.mtime == null ? Date.now() : r.mtime), O = b.getFullYear() - 1980;
|
|
7905
|
+
if ((O < 0 || O > 119) && X(10), re(e, t, O << 25 | b.getMonth() + 1 << 21 | b.getDate() << 16 | b.getHours() << 11 | b.getMinutes() << 5 | b.getSeconds() >> 1), t += 4, o != -1 && (re(e, t, r.crc), re(e, t + 4, o < 0 ? -o - 2 : o), re(e, t + 8, r.size)), re(e, t + 12, h), re(e, t + 14, A), t += 16, c != null && (re(e, t, m), re(e, t + 6, r.attrs), re(e, t + 10, c), t += 14), e.set(n, t), t += h, A) for (var x in g) {
|
|
7906
|
+
var M = g[x], w = M.length;
|
|
7907
|
+
re(e, t, +x), re(e, t + 2, w), e.set(M, t + 4), t += 4 + w;
|
|
7907
7908
|
}
|
|
7908
7909
|
return m && (e.set(l, t), t += m), t;
|
|
7909
|
-
}, "wzh"),
|
|
7910
|
-
re(e, t, 101010256), re(e, t + 8, r), re(e, t + 10, r), re(e, t + 12, n), re(e, t + 16,
|
|
7910
|
+
}, "wzh"), co = s(function(e, t, r, n, i) {
|
|
7911
|
+
re(e, t, 101010256), re(e, t + 8, r), re(e, t + 10, r), re(e, t + 12, n), re(e, t + 16, i);
|
|
7911
7912
|
}, "wzf");
|
|
7912
|
-
function
|
|
7913
|
+
function uo(e, t, r) {
|
|
7913
7914
|
r || (r = t, t = {}), typeof r != "function" && X(7);
|
|
7914
7915
|
var n = {};
|
|
7915
|
-
|
|
7916
|
-
var
|
|
7917
|
-
for (var
|
|
7918
|
-
}, "tAll"),
|
|
7916
|
+
sn(e, "", n, t);
|
|
7917
|
+
var i = Object.keys(n), o = i.length, c = 0, l = 0, h = o, g = new Array(o), m = [], A = s(function() {
|
|
7918
|
+
for (var w = 0; w < m.length; ++w) m[w]();
|
|
7919
|
+
}, "tAll"), b = s(function(w, C) {
|
|
7919
7920
|
_t(function() {
|
|
7920
|
-
r(
|
|
7921
|
+
r(w, C);
|
|
7921
7922
|
});
|
|
7922
7923
|
}, "cbd");
|
|
7923
7924
|
_t(function() {
|
|
7924
|
-
|
|
7925
|
+
b = r;
|
|
7925
7926
|
});
|
|
7926
7927
|
var O = s(function() {
|
|
7927
|
-
var
|
|
7928
|
+
var w = new K(l + 22), C = c, y = l - c;
|
|
7928
7929
|
l = 0;
|
|
7929
7930
|
for (var B = 0; B < h; ++B) {
|
|
7930
|
-
var L =
|
|
7931
|
+
var L = g[B];
|
|
7931
7932
|
try {
|
|
7932
7933
|
var U = L.c.length;
|
|
7933
|
-
|
|
7934
|
+
un(w, l, L, L.f, L.u, U);
|
|
7934
7935
|
var G = 30 + L.f.length + Kt(L.extra), k = l + G;
|
|
7935
|
-
|
|
7936
|
+
w.set(L.c, k), un(w, c, L, L.f, L.u, U, l, L.m), c += 16 + G + (L.m ? L.m.length : 0), l = k + U;
|
|
7936
7937
|
} catch (a) {
|
|
7937
|
-
return
|
|
7938
|
+
return b(a, null);
|
|
7938
7939
|
}
|
|
7939
7940
|
}
|
|
7940
|
-
|
|
7941
|
+
co(w, c, g.length, y, C), b(null, w);
|
|
7941
7942
|
}, "cbf");
|
|
7942
|
-
|
|
7943
|
-
for (var x = s(function(
|
|
7944
|
-
var
|
|
7943
|
+
o || O();
|
|
7944
|
+
for (var x = s(function(w) {
|
|
7945
|
+
var C = i[w], y = n[C], B = y[0], L = y[1], U = zi(), G = B.length;
|
|
7945
7946
|
U.p(B);
|
|
7946
|
-
var k =
|
|
7947
|
-
if (d) A(),
|
|
7947
|
+
var k = cn(C), a = k.length, u = L.comment, f = u && cn(u), _ = f && f.length, p = Kt(L.extra), I = L.level == 0 ? 0 : 8, T = s(function(d, E) {
|
|
7948
|
+
if (d) A(), b(d, null);
|
|
7948
7949
|
else {
|
|
7949
7950
|
var S = E.length;
|
|
7950
|
-
|
|
7951
|
+
g[w] = Ht(L, { size: G, crc: U.d(), c: E, f: k, m: f, u: a != C.length || f && u.length != _, compression: I }), c += 30 + a + p + S, l += 76 + 2 * (a + p) + (_ || 0) + S, --o || O();
|
|
7951
7952
|
}
|
|
7952
7953
|
}, "cbl");
|
|
7953
7954
|
if (a > 65535 && T(X(11, 0, 1), null), !I) T(null, B);
|
|
@@ -7956,87 +7957,87 @@ function no(e, t, r) {
|
|
|
7956
7957
|
} catch (d) {
|
|
7957
7958
|
T(d, null);
|
|
7958
7959
|
}
|
|
7959
|
-
else m.push(
|
|
7960
|
+
else m.push(eo(B, L, T));
|
|
7960
7961
|
}, "_loop_1"), M = 0; M < h; ++M) x(M);
|
|
7961
7962
|
return A;
|
|
7962
7963
|
}
|
|
7963
|
-
s(
|
|
7964
|
+
s(uo, "zip");
|
|
7964
7965
|
var _t = typeof queueMicrotask == "function" ? queueMicrotask : typeof setTimeout == "function" ? setTimeout : function(e) {
|
|
7965
7966
|
e();
|
|
7966
7967
|
};
|
|
7967
|
-
function
|
|
7968
|
+
function lo(e, t, r) {
|
|
7968
7969
|
r || (r = t, t = {}), typeof r != "function" && X(7);
|
|
7969
|
-
var n = [],
|
|
7970
|
-
for (var
|
|
7971
|
-
}, "tAll"),
|
|
7970
|
+
var n = [], i = s(function() {
|
|
7971
|
+
for (var w = 0; w < n.length; ++w) n[w]();
|
|
7972
|
+
}, "tAll"), o = {}, c = s(function(w, C) {
|
|
7972
7973
|
_t(function() {
|
|
7973
|
-
r(
|
|
7974
|
+
r(w, C);
|
|
7974
7975
|
});
|
|
7975
7976
|
}, "cbd");
|
|
7976
7977
|
_t(function() {
|
|
7977
7978
|
c = r;
|
|
7978
7979
|
});
|
|
7979
|
-
for (var l = e.length - 22; Ee(e, l) != 101010256; --l) if (!l || e.length - l > 65558) return c(X(13, 0, 1), null),
|
|
7980
|
+
for (var l = e.length - 22; Ee(e, l) != 101010256; --l) if (!l || e.length - l > 65558) return c(X(13, 0, 1), null), i;
|
|
7980
7981
|
var h = Ie(e, l + 8);
|
|
7981
7982
|
if (h) {
|
|
7982
|
-
var
|
|
7983
|
+
var g = h, m = Ee(e, l + 16), A = m == 4294967295 || g == 65535;
|
|
7983
7984
|
if (A) {
|
|
7984
|
-
var
|
|
7985
|
-
A = Ee(e,
|
|
7985
|
+
var b = Ee(e, l - 12);
|
|
7986
|
+
A = Ee(e, b) == 101075792, A && (g = h = Ee(e, b + 32), m = Ee(e, b + 48));
|
|
7986
7987
|
}
|
|
7987
|
-
for (var O = t && t.filter, x = s(function(
|
|
7988
|
-
var
|
|
7988
|
+
for (var O = t && t.filter, x = s(function(w) {
|
|
7989
|
+
var C = so(e, m, A), y = C[0], B = C[1], L = C[2], U = C[3], G = C[4], k = C[5], a = oo(e, k);
|
|
7989
7990
|
m = G;
|
|
7990
|
-
var u = s(function(
|
|
7991
|
-
|
|
7991
|
+
var u = s(function(_, p) {
|
|
7992
|
+
_ ? (i(), c(_, null)) : (p && (o[U] = p), --h || c(null, o));
|
|
7992
7993
|
}, "cbl");
|
|
7993
|
-
if (!O || O({ name: U, size: B, originalSize: L, compression:
|
|
7994
|
-
else if (
|
|
7994
|
+
if (!O || O({ name: U, size: B, originalSize: L, compression: y })) if (!y) u(null, Ge(e, a, a + B));
|
|
7995
|
+
else if (y == 8) {
|
|
7995
7996
|
var f = e.subarray(a, a + B);
|
|
7996
7997
|
if (L < 524288 || B > 0.8 * L) try {
|
|
7997
7998
|
u(null, qt(f, { out: new K(L) }));
|
|
7998
|
-
} catch (
|
|
7999
|
-
u(
|
|
7999
|
+
} catch (_) {
|
|
8000
|
+
u(_, null);
|
|
8000
8001
|
}
|
|
8001
|
-
else n.push(
|
|
8002
|
-
} else u(X(14, "unknown compression type " +
|
|
8002
|
+
else n.push(to(f, { size: L }, u));
|
|
8003
|
+
} else u(X(14, "unknown compression type " + y, 1), null);
|
|
8003
8004
|
else u(null, null);
|
|
8004
|
-
}, "_loop_3"), M = 0; M <
|
|
8005
|
+
}, "_loop_3"), M = 0; M < g; ++M) x(M);
|
|
8005
8006
|
} else c(null, {});
|
|
8006
|
-
return
|
|
8007
|
+
return i;
|
|
8007
8008
|
}
|
|
8008
|
-
s(
|
|
8009
|
-
const
|
|
8010
|
-
function
|
|
8011
|
-
return e.filter((t) => !(t.length <
|
|
8009
|
+
s(lo, "unzip");
|
|
8010
|
+
const fo = [/^\/$/, /^\*+$/, /^[0-9]+$/], ho = ["/artifact/", "https://", "http://", "*********"], po = 3;
|
|
8011
|
+
function ln(e) {
|
|
8012
|
+
return e.filter((t) => !(t.length < po || fo.some((r) => r.test(t)) || ho.some((r) => t.includes(r))));
|
|
8012
8013
|
}
|
|
8013
|
-
s(
|
|
8014
|
-
const Ae = Symbol.for("@ts-pattern/matcher"),
|
|
8014
|
+
s(ln, "filterSensitiveValues");
|
|
8015
|
+
const Ae = Symbol.for("@ts-pattern/matcher"), mo = Symbol.for("@ts-pattern/isVariadic"), gt = "@ts-pattern/anonymous-select-key", Vt = s((e) => !!(e && typeof e == "object"), "r"), It = s((e) => e && !!e[Ae], "i"), Se = s((e, t, r) => {
|
|
8015
8016
|
if (It(e)) {
|
|
8016
|
-
const n = e[Ae](), { matched:
|
|
8017
|
-
return
|
|
8017
|
+
const n = e[Ae](), { matched: i, selections: o } = n.match(t);
|
|
8018
|
+
return i && o && Object.keys(o).forEach((c) => r(c, o[c])), i;
|
|
8018
8019
|
}
|
|
8019
8020
|
if (Vt(e)) {
|
|
8020
8021
|
if (!Vt(t)) return false;
|
|
8021
8022
|
if (Array.isArray(e)) {
|
|
8022
8023
|
if (!Array.isArray(t)) return false;
|
|
8023
|
-
let n = [],
|
|
8024
|
+
let n = [], i = [], o = [];
|
|
8024
8025
|
for (const c of e.keys()) {
|
|
8025
8026
|
const l = e[c];
|
|
8026
|
-
It(l) && l[
|
|
8027
|
+
It(l) && l[mo] ? o.push(l) : o.length ? i.push(l) : n.push(l);
|
|
8027
8028
|
}
|
|
8028
|
-
if (
|
|
8029
|
-
if (
|
|
8030
|
-
if (t.length < n.length +
|
|
8031
|
-
const c = t.slice(0, n.length), l =
|
|
8032
|
-
return n.every((
|
|
8029
|
+
if (o.length) {
|
|
8030
|
+
if (o.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
|
|
8031
|
+
if (t.length < n.length + i.length) return false;
|
|
8032
|
+
const c = t.slice(0, n.length), l = i.length === 0 ? [] : t.slice(-i.length), h = t.slice(n.length, i.length === 0 ? 1 / 0 : -i.length);
|
|
8033
|
+
return n.every((g, m) => Se(g, c[m], r)) && i.every((g, m) => Se(g, l[m], r)) && (o.length === 0 || Se(o[0], h, r));
|
|
8033
8034
|
}
|
|
8034
8035
|
return e.length === t.length && e.every((c, l) => Se(c, t[l], r));
|
|
8035
8036
|
}
|
|
8036
8037
|
return Reflect.ownKeys(e).every((n) => {
|
|
8037
|
-
const
|
|
8038
|
-
return (n in t || It(
|
|
8039
|
-
var
|
|
8038
|
+
const i = e[n];
|
|
8039
|
+
return (n in t || It(o = i) && o[Ae]().matcherType === "optional") && Se(i, t[n], r);
|
|
8040
|
+
var o;
|
|
8040
8041
|
});
|
|
8041
8042
|
}
|
|
8042
8043
|
return Object.is(t, e);
|
|
@@ -8045,57 +8046,57 @@ const Ae = Symbol.for("@ts-pattern/matcher"), co = Symbol.for("@ts-pattern/isVar
|
|
|
8045
8046
|
return Vt(e) ? It(e) ? (t = (r = (n = e[Ae]()).getSelectionKeys) == null ? void 0 : r.call(n)) != null ? t : [] : Array.isArray(e) ? nt(e, Oe) : nt(Object.values(e), Oe) : [];
|
|
8046
8047
|
}, "s"), nt = s((e, t) => e.reduce((r, n) => r.concat(t(n)), []), "c");
|
|
8047
8048
|
function ae(e) {
|
|
8048
|
-
return Object.assign(e, { optional: s(() =>
|
|
8049
|
+
return Object.assign(e, { optional: s(() => Eo(e), "optional"), and: s((t) => Y(e, t), "and"), or: s((t) => _o(e, t), "or"), select: s((t) => t === void 0 ? fn(e) : fn(t, e), "select") });
|
|
8049
8050
|
}
|
|
8050
8051
|
s(ae, "a");
|
|
8051
|
-
function
|
|
8052
|
+
function Eo(e) {
|
|
8052
8053
|
return ae({ [Ae]: () => ({ match: s((t) => {
|
|
8053
8054
|
let r = {};
|
|
8054
|
-
const n = s((
|
|
8055
|
-
r[
|
|
8055
|
+
const n = s((i, o) => {
|
|
8056
|
+
r[i] = o;
|
|
8056
8057
|
}, "r2");
|
|
8057
|
-
return t === void 0 ? (Oe(e).forEach((
|
|
8058
|
+
return t === void 0 ? (Oe(e).forEach((i) => n(i, void 0)), { matched: true, selections: r }) : { matched: Se(e, t, n), selections: r };
|
|
8058
8059
|
}, "match"), getSelectionKeys: s(() => Oe(e), "getSelectionKeys"), matcherType: "optional" }) });
|
|
8059
8060
|
}
|
|
8060
|
-
s(
|
|
8061
|
+
s(Eo, "h");
|
|
8061
8062
|
function Y(...e) {
|
|
8062
8063
|
return ae({ [Ae]: () => ({ match: s((t) => {
|
|
8063
8064
|
let r = {};
|
|
8064
|
-
const n = s((
|
|
8065
|
-
r[
|
|
8065
|
+
const n = s((i, o) => {
|
|
8066
|
+
r[i] = o;
|
|
8066
8067
|
}, "r2");
|
|
8067
|
-
return { matched: e.every((
|
|
8068
|
+
return { matched: e.every((i) => Se(i, t, n)), selections: r };
|
|
8068
8069
|
}, "match"), getSelectionKeys: s(() => nt(e, Oe), "getSelectionKeys"), matcherType: "and" }) });
|
|
8069
8070
|
}
|
|
8070
8071
|
s(Y, "d");
|
|
8071
|
-
function
|
|
8072
|
+
function _o(...e) {
|
|
8072
8073
|
return ae({ [Ae]: () => ({ match: s((t) => {
|
|
8073
8074
|
let r = {};
|
|
8074
|
-
const n = s((
|
|
8075
|
-
r[
|
|
8075
|
+
const n = s((i, o) => {
|
|
8076
|
+
r[i] = o;
|
|
8076
8077
|
}, "r2");
|
|
8077
|
-
return nt(e, Oe).forEach((
|
|
8078
|
+
return nt(e, Oe).forEach((i) => n(i, void 0)), { matched: e.some((i) => Se(i, t, n)), selections: r };
|
|
8078
8079
|
}, "match"), getSelectionKeys: s(() => nt(e, Oe), "getSelectionKeys"), matcherType: "or" }) });
|
|
8079
8080
|
}
|
|
8080
|
-
s(
|
|
8081
|
+
s(_o, "y");
|
|
8081
8082
|
function W(e) {
|
|
8082
8083
|
return { [Ae]: () => ({ match: s((t) => ({ matched: !!e(t) }), "match") }) };
|
|
8083
8084
|
}
|
|
8084
8085
|
s(W, "p");
|
|
8085
|
-
function
|
|
8086
|
+
function fn(...e) {
|
|
8086
8087
|
const t = typeof e[0] == "string" ? e[0] : void 0, r = e.length === 2 ? e[1] : typeof e[0] == "string" ? void 0 : e[0];
|
|
8087
8088
|
return ae({ [Ae]: () => ({ match: s((n) => {
|
|
8088
|
-
let
|
|
8089
|
-
return { matched: r === void 0 || Se(r, n, (
|
|
8090
|
-
o
|
|
8091
|
-
}), selections:
|
|
8089
|
+
let i = { [t ?? gt]: n };
|
|
8090
|
+
return { matched: r === void 0 || Se(r, n, (o, c) => {
|
|
8091
|
+
i[o] = c;
|
|
8092
|
+
}), selections: i };
|
|
8092
8093
|
}, "match"), getSelectionKeys: s(() => [t ?? gt].concat(r === void 0 ? [] : Oe(r)), "getSelectionKeys") }) });
|
|
8093
8094
|
}
|
|
8094
|
-
s(
|
|
8095
|
-
function
|
|
8095
|
+
s(fn, "v");
|
|
8096
|
+
function hn(e) {
|
|
8096
8097
|
return true;
|
|
8097
8098
|
}
|
|
8098
|
-
s(
|
|
8099
|
+
s(hn, "b");
|
|
8099
8100
|
function Re(e) {
|
|
8100
8101
|
return typeof e == "number";
|
|
8101
8102
|
}
|
|
@@ -8104,28 +8105,28 @@ function Le(e) {
|
|
|
8104
8105
|
return typeof e == "string";
|
|
8105
8106
|
}
|
|
8106
8107
|
s(Le, "S");
|
|
8107
|
-
function
|
|
8108
|
+
function Pe(e) {
|
|
8108
8109
|
return typeof e == "bigint";
|
|
8109
8110
|
}
|
|
8110
|
-
s(
|
|
8111
|
-
const
|
|
8112
|
-
return
|
|
8111
|
+
s(Pe, "j"), ae(W(hn)), ae(W(hn));
|
|
8112
|
+
const Ne = s((e) => Object.assign(ae(e), { startsWith: s((t) => {
|
|
8113
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && n.startsWith(r)))));
|
|
8113
8114
|
var r;
|
|
8114
8115
|
}, "startsWith"), endsWith: s((t) => {
|
|
8115
|
-
return
|
|
8116
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && n.endsWith(r)))));
|
|
8116
8117
|
var r;
|
|
8117
|
-
}, "endsWith"), minLength: s((t) =>
|
|
8118
|
-
return
|
|
8118
|
+
}, "endsWith"), minLength: s((t) => Ne(Y(e, ((r) => W((n) => Le(n) && n.length >= r))(t))), "minLength"), length: s((t) => Ne(Y(e, ((r) => W((n) => Le(n) && n.length === r))(t))), "length"), maxLength: s((t) => Ne(Y(e, ((r) => W((n) => Le(n) && n.length <= r))(t))), "maxLength"), includes: s((t) => {
|
|
8119
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && n.includes(r)))));
|
|
8119
8120
|
var r;
|
|
8120
8121
|
}, "includes"), regex: s((t) => {
|
|
8121
|
-
return
|
|
8122
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && !!n.match(r)))));
|
|
8122
8123
|
var r;
|
|
8123
8124
|
}, "regex") }), "x");
|
|
8124
|
-
|
|
8125
|
-
const Te = s((e) => Object.assign(ae(e), { between: s((t, r) => Te(Y(e, ((n,
|
|
8125
|
+
Ne(W(Le));
|
|
8126
|
+
const Te = s((e) => Object.assign(ae(e), { between: s((t, r) => Te(Y(e, ((n, i) => W((o) => Re(o) && n <= o && i >= o))(t, r))), "between"), lt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n < r))(t))), "lt"), gt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n > r))(t))), "gt"), lte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n <= r))(t))), "lte"), gte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n >= r))(t))), "gte"), int: s(() => Te(Y(e, W((t) => Re(t) && Number.isInteger(t)))), "int"), finite: s(() => Te(Y(e, W((t) => Re(t) && Number.isFinite(t)))), "finite"), positive: s(() => Te(Y(e, W((t) => Re(t) && t > 0))), "positive"), negative: s(() => Te(Y(e, W((t) => Re(t) && t < 0))), "negative") }), "N");
|
|
8126
8127
|
Te(W(Re));
|
|
8127
|
-
const De = s((e) => Object.assign(ae(e), { between: s((t, r) => De(Y(e, ((n,
|
|
8128
|
-
De(W(
|
|
8128
|
+
const De = s((e) => Object.assign(ae(e), { between: s((t, r) => De(Y(e, ((n, i) => W((o) => Pe(o) && n <= o && i >= o))(t, r))), "between"), lt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n < r))(t))), "lt"), gt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n > r))(t))), "gt"), lte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n <= r))(t))), "lte"), gte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n >= r))(t))), "gte"), positive: s(() => De(Y(e, W((t) => Pe(t) && t > 0))), "positive"), negative: s(() => De(Y(e, W((t) => Pe(t) && t < 0))), "negative") }), "k");
|
|
8129
|
+
De(W(Pe)), ae(W(function(e) {
|
|
8129
8130
|
return typeof e == "boolean";
|
|
8130
8131
|
})), ae(W(function(e) {
|
|
8131
8132
|
return typeof e == "symbol";
|
|
@@ -8134,7 +8135,7 @@ De(W(Ne)), ae(W(function(e) {
|
|
|
8134
8135
|
})), ae(W(function(e) {
|
|
8135
8136
|
return e != null;
|
|
8136
8137
|
}));
|
|
8137
|
-
class
|
|
8138
|
+
class go extends Error {
|
|
8138
8139
|
static {
|
|
8139
8140
|
s(this, "I");
|
|
8140
8141
|
}
|
|
@@ -8149,10 +8150,10 @@ class fo extends Error {
|
|
|
8149
8150
|
}
|
|
8150
8151
|
}
|
|
8151
8152
|
const Yt = { matched: false, value: void 0 };
|
|
8152
|
-
function
|
|
8153
|
+
function Io(e) {
|
|
8153
8154
|
return new vt(e, Yt);
|
|
8154
8155
|
}
|
|
8155
|
-
s(
|
|
8156
|
+
s(Io, "M");
|
|
8156
8157
|
class vt {
|
|
8157
8158
|
static {
|
|
8158
8159
|
s(this, "R");
|
|
@@ -8163,12 +8164,12 @@ class vt {
|
|
|
8163
8164
|
with(...t) {
|
|
8164
8165
|
if (this.state.matched) return this;
|
|
8165
8166
|
const r = t[t.length - 1], n = [t[0]];
|
|
8166
|
-
let
|
|
8167
|
-
t.length === 3 && typeof t[1] == "function" ?
|
|
8168
|
-
let
|
|
8169
|
-
const l = s((
|
|
8170
|
-
|
|
8171
|
-
}, "u2"), h = !n.some((
|
|
8167
|
+
let i;
|
|
8168
|
+
t.length === 3 && typeof t[1] == "function" ? i = t[1] : t.length > 2 && n.push(...t.slice(1, t.length - 1));
|
|
8169
|
+
let o = false, c = {};
|
|
8170
|
+
const l = s((g, m) => {
|
|
8171
|
+
o = true, c[g] = m;
|
|
8172
|
+
}, "u2"), h = !n.some((g) => Se(g, this.input, l)) || i && !i(this.input) ? Yt : { matched: true, value: r(o ? gt in c ? c[gt] : c : this.input, this.input) };
|
|
8172
8173
|
return new vt(this.input, h);
|
|
8173
8174
|
}
|
|
8174
8175
|
when(t, r) {
|
|
@@ -8179,7 +8180,7 @@ class vt {
|
|
|
8179
8180
|
otherwise(t) {
|
|
8180
8181
|
return this.state.matched ? this.state.value : t(this.input);
|
|
8181
8182
|
}
|
|
8182
|
-
exhaustive(t =
|
|
8183
|
+
exhaustive(t = So) {
|
|
8183
8184
|
return this.state.matched ? this.state.value : t(this.input);
|
|
8184
8185
|
}
|
|
8185
8186
|
run() {
|
|
@@ -8192,74 +8193,92 @@ class vt {
|
|
|
8192
8193
|
return this;
|
|
8193
8194
|
}
|
|
8194
8195
|
}
|
|
8195
|
-
function
|
|
8196
|
-
throw new
|
|
8196
|
+
function So(e) {
|
|
8197
|
+
throw new go(e);
|
|
8197
8198
|
}
|
|
8198
|
-
s(
|
|
8199
|
-
const
|
|
8200
|
-
function
|
|
8201
|
-
return e.reduce((r, n) => r.replaceAll(n,
|
|
8199
|
+
s(So, "F");
|
|
8200
|
+
const Ro = "[REDACTED]", To = /* @__PURE__ */ new Set(["sha1", "_sha1", "pageref", "downloadsPath", "tracesDir", "pageId"]);
|
|
8201
|
+
function se({ sensitiveValues: e, str: t }) {
|
|
8202
|
+
return e.reduce((r, n) => r.replaceAll(n, Ro), t);
|
|
8202
8203
|
}
|
|
8203
|
-
s(
|
|
8204
|
-
function
|
|
8204
|
+
s(se, "scrubString");
|
|
8205
|
+
function yo(e) {
|
|
8205
8206
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
8206
8207
|
}
|
|
8207
|
-
s(
|
|
8208
|
+
s(yo, "isRecord");
|
|
8208
8209
|
function it({ sensitiveValues: e, value: t }) {
|
|
8209
|
-
return typeof t == "string" ?
|
|
8210
|
+
return typeof t == "string" ? se({ sensitiveValues: e, str: t }) : Array.isArray(t) ? t.map((r) => it({ sensitiveValues: e, value: r })) : yo(t) ? $e({ obj: t, sensitiveValues: e }) : t;
|
|
8210
8211
|
}
|
|
8211
8212
|
s(it, "scrubValue");
|
|
8212
|
-
function
|
|
8213
|
-
return
|
|
8213
|
+
function wo(e) {
|
|
8214
|
+
return To.has(e) ? true : e.toLowerCase().endsWith("sha1");
|
|
8214
8215
|
}
|
|
8215
|
-
s(
|
|
8216
|
+
s(wo, "shouldPreserveKey");
|
|
8216
8217
|
function $e({ obj: e, sensitiveValues: t }) {
|
|
8217
|
-
return Object.fromEntries(Object.entries(e).map(([r, n]) => [r,
|
|
8218
|
+
return Object.fromEntries(Object.entries(e).map(([r, n]) => [r, wo(r) ? n : it({ sensitiveValues: t, value: n })]));
|
|
8218
8219
|
}
|
|
8219
8220
|
s($e, "scrubObject");
|
|
8220
|
-
function
|
|
8221
|
-
return
|
|
8221
|
+
function dn({ error: e, sensitiveValues: t }) {
|
|
8222
|
+
return e ? { ...e, message: se({ sensitiveValues: t, str: e.message }) } : void 0;
|
|
8222
8223
|
}
|
|
8223
|
-
s(
|
|
8224
|
-
function
|
|
8224
|
+
s(dn, "scrubError");
|
|
8225
|
+
function Ao({ event: e, sensitiveValues: t }) {
|
|
8226
|
+
return Io(e).with({ type: "console" }, (r) => ({ ...r, args: r.args?.map((n) => ({ ...n, preview: se({ sensitiveValues: t, str: n.preview }), value: it({ sensitiveValues: t, value: n.value }) })), text: se({ sensitiveValues: t, str: r.text }) })).with({ type: "before" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "after" }, (r) => ({ ...r, error: dn({ error: r.error, sensitiveValues: t }), result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0 })).with({ type: "action" }, (r) => ({ ...r, error: dn({ error: r.error, sensitiveValues: t }), params: $e({ obj: r.params, sensitiveValues: t }), result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0, title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "event" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }) })).with({ type: "stdout" }, { type: "stderr" }, (r) => ({ ...r, text: r.text !== void 0 ? se({ sensitiveValues: t, str: r.text }) : void 0 })).with({ type: "error" }, (r) => ({ ...r, message: se({ sensitiveValues: t, str: r.message }) })).with({ type: "log" }, (r) => ({ ...r, message: se({ sensitiveValues: t, str: r.message }) })).with({ type: "context-options" }, (r) => ({ ...r, options: $e({ obj: r.options, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "frame-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "resource-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "screencast-frame" }, { type: "input" }, (r) => r).exhaustive();
|
|
8227
|
+
}
|
|
8228
|
+
s(Ao, "scrubTraceEvent");
|
|
8229
|
+
function vo({ content: e, sensitiveValues: t }) {
|
|
8225
8230
|
const r = new node_util.TextDecoder(), n = new node_util.TextEncoder(), c = r.decode(e).split(`
|
|
8226
8231
|
`).map((l) => {
|
|
8227
8232
|
if (!l.trim()) return l;
|
|
8228
8233
|
try {
|
|
8229
|
-
const h = JSON.parse(l),
|
|
8230
|
-
return JSON.stringify(
|
|
8234
|
+
const h = JSON.parse(l), g = Ao({ event: h, sensitiveValues: t });
|
|
8235
|
+
return JSON.stringify(g);
|
|
8231
8236
|
} catch {
|
|
8232
|
-
return
|
|
8237
|
+
return se({ sensitiveValues: t, str: l });
|
|
8233
8238
|
}
|
|
8234
8239
|
});
|
|
8235
8240
|
return n.encode(c.join(`
|
|
8236
8241
|
`));
|
|
8237
8242
|
}
|
|
8238
|
-
s(
|
|
8239
|
-
function
|
|
8240
|
-
const r = new node_util.TextDecoder(), n = new node_util.TextEncoder(),
|
|
8241
|
-
return n.encode(
|
|
8243
|
+
s(vo, "scrubJsonLinesFile");
|
|
8244
|
+
function pn({ content: e, sensitiveValues: t }) {
|
|
8245
|
+
const r = new node_util.TextDecoder(), n = new node_util.TextEncoder(), i = se({ sensitiveValues: t, str: r.decode(e) });
|
|
8246
|
+
return n.encode(i);
|
|
8242
8247
|
}
|
|
8243
|
-
s(
|
|
8244
|
-
const
|
|
8245
|
-
async function
|
|
8246
|
-
const r =
|
|
8248
|
+
s(pn, "scrubTextFile");
|
|
8249
|
+
const bo = node_util.promisify(lo), Co = node_util.promisify(uo);
|
|
8250
|
+
async function zt({ sensitiveValues: e, traceBuffer: t }) {
|
|
8251
|
+
const r = ln(e);
|
|
8247
8252
|
if (r.length === 0) return new Uint8Array(t);
|
|
8248
|
-
const n = r.sort((h,
|
|
8249
|
-
return
|
|
8253
|
+
const n = [...r].sort((h, g) => g.length - h.length), i = await bo(new Uint8Array(t)), o = Object.entries(i), c = await Promise.all(o.map(async ([h, g]) => [h, await Uo({ content: g, filename: h, sensitiveValues: n })])), l = Object.fromEntries(c);
|
|
8254
|
+
return Co(l);
|
|
8250
8255
|
}
|
|
8251
|
-
s(
|
|
8252
|
-
async function
|
|
8256
|
+
s(zt, "scrubTrace");
|
|
8257
|
+
async function Uo({ content: e, filename: t, sensitiveValues: r }) {
|
|
8253
8258
|
const n = t.toLowerCase();
|
|
8254
|
-
return n.endsWith(".trace") || n.endsWith(".network") ?
|
|
8255
|
-
}
|
|
8256
|
-
s(
|
|
8257
|
-
async function
|
|
8258
|
-
return await
|
|
8259
|
-
}
|
|
8260
|
-
s(
|
|
8261
|
-
|
|
8262
|
-
|
|
8259
|
+
return n.endsWith(".trace") || n.endsWith(".network") ? vo({ content: e, sensitiveValues: r }) : n.endsWith(".html") || n.endsWith(".dat") || n.endsWith(".json") ? pn({ content: e, sensitiveValues: r }) : n.startsWith("resources/") ? Bo({ content: e, sensitiveValues: r }) : e;
|
|
8260
|
+
}
|
|
8261
|
+
s(Uo, "scrubFile");
|
|
8262
|
+
async function Bo({ content: e, sensitiveValues: t }) {
|
|
8263
|
+
return await Ki.isBinaryFile(Buffer.from(e)) ? e : pn({ content: e, sensitiveValues: t });
|
|
8264
|
+
}
|
|
8265
|
+
s(Bo, "scrubResourceFile");
|
|
8266
|
+
async function Oo({ sensitiveValues: e, tracePath: t }) {
|
|
8267
|
+
const r = [], n = node_fs.createReadStream(t);
|
|
8268
|
+
for await (const o of n) r.push(Uint8Array.from(o));
|
|
8269
|
+
const i = new Uint8Array(Buffer.concat(r));
|
|
8270
|
+
return zt({ sensitiveValues: e, traceBuffer: i });
|
|
8271
|
+
}
|
|
8272
|
+
s(Oo, "scrubTraceFromPath");
|
|
8273
|
+
async function Lo({ sensitiveValues: e, traceFd: t, tracePath: r }) {
|
|
8274
|
+
const n = [], i = node_fs.createReadStream(r, { autoClose: true, fd: t });
|
|
8275
|
+
for await (const c of i) n.push(Uint8Array.from(c));
|
|
8276
|
+
const o = new Uint8Array(Buffer.concat(n));
|
|
8277
|
+
return zt({ sensitiveValues: e, traceBuffer: o });
|
|
8278
|
+
}
|
|
8279
|
+
s(Lo, "scrubTraceFromFd");
|
|
8280
|
+
const mn = { AUTHENTICATION_FAILED: 1008 };
|
|
8281
|
+
class Po {
|
|
8263
8282
|
static {
|
|
8264
8283
|
s(this, "WebSocketClient");
|
|
8265
8284
|
}
|
|
@@ -8278,8 +8297,8 @@ class vo {
|
|
|
8278
8297
|
isManualClose = false;
|
|
8279
8298
|
isAuthenticated = false;
|
|
8280
8299
|
authenticationFailed = false;
|
|
8281
|
-
constructor({ apiKey: t, maxBufferSize: r = 1e3, maxReconnectAttempts: n = 3, onError:
|
|
8282
|
-
this.url = h, this.apiKey = t, this.projectId = c, this.maxBufferSize = r, this.reconnectDelay = l, this.maxReconnectAttempts = n, this.onMessage =
|
|
8300
|
+
constructor({ apiKey: t, maxBufferSize: r = 1e3, maxReconnectAttempts: n = 3, onError: i, onMessage: o, projectId: c, reconnectDelay: l = 2e3, url: h }) {
|
|
8301
|
+
this.url = h, this.apiKey = t, this.projectId = c, this.maxBufferSize = r, this.reconnectDelay = l, this.maxReconnectAttempts = n, this.onMessage = o, this.onError = i, this.connect();
|
|
8283
8302
|
}
|
|
8284
8303
|
connect() {
|
|
8285
8304
|
try {
|
|
@@ -8288,12 +8307,12 @@ class vo {
|
|
|
8288
8307
|
this.reconnectAttempts = 0;
|
|
8289
8308
|
}), this.socket.on("message", (r) => {
|
|
8290
8309
|
try {
|
|
8291
|
-
const n = typeof r == "string" ? r : r.toString(),
|
|
8292
|
-
|
|
8310
|
+
const n = typeof r == "string" ? r : r.toString(), i = JSON.parse(n);
|
|
8311
|
+
i.type === "connected" ? (this.isAuthenticated = true, this.authenticationFailed = false, this.flushBuffer()) : this.onMessage && this.onMessage(i);
|
|
8293
8312
|
} catch {
|
|
8294
8313
|
}
|
|
8295
8314
|
}), this.socket.on("close", (r, n) => {
|
|
8296
|
-
this.isAuthenticated = false, r ===
|
|
8315
|
+
this.isAuthenticated = false, r === mn.AUTHENTICATION_FAILED && (this.authenticationFailed = true, this.onError && this.onError({ code: r, message: n.toString() || "Authentication failed", reason: n.toString() })), !this.isManualClose && !this.authenticationFailed && this.reconnectAttempts < this.maxReconnectAttempts && this.scheduleReconnect();
|
|
8297
8316
|
}), this.socket.on("error", () => {
|
|
8298
8317
|
});
|
|
8299
8318
|
} catch {
|
|
@@ -8311,8 +8330,8 @@ class vo {
|
|
|
8311
8330
|
this.buffer = [];
|
|
8312
8331
|
for (const r of t) try {
|
|
8313
8332
|
const n = JSON.stringify(r);
|
|
8314
|
-
this.socket.send(n, (
|
|
8315
|
-
|
|
8333
|
+
this.socket.send(n, (i) => {
|
|
8334
|
+
i && this.bufferEvent(r);
|
|
8316
8335
|
});
|
|
8317
8336
|
} catch {
|
|
8318
8337
|
this.bufferEvent(r);
|
|
@@ -8348,268 +8367,268 @@ class vo {
|
|
|
8348
8367
|
return [...this.buffer];
|
|
8349
8368
|
}
|
|
8350
8369
|
}
|
|
8351
|
-
var
|
|
8370
|
+
var No = { detect({ env: e }) {
|
|
8352
8371
|
return !!e.APPVEYOR;
|
|
8353
8372
|
}, configuration({ env: e }) {
|
|
8354
8373
|
const t = e.APPVEYOR_PULL_REQUEST_NUMBER, r = !!t;
|
|
8355
8374
|
return { name: "Appveyor", service: "appveyor", commit: e.APPVEYOR_REPO_COMMIT, tag: e.APPVEYOR_REPO_TAG_NAME, build: e.APPVEYOR_BUILD_NUMBER, buildUrl: `https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/${e.APPVEYOR_BUILD_VERSION}`, branch: e.APPVEYOR_REPO_BRANCH, job: e.APPVEYOR_JOB_NUMBER, jobUrl: `https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/job/${e.APPVEYOR_JOB_ID}`, pr: t, isPr: r, prBranch: e.APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH, slug: e.APPVEYOR_REPO_NAME, root: e.APPVEYOR_BUILD_FOLDER };
|
|
8356
8375
|
} };
|
|
8357
|
-
function
|
|
8376
|
+
function En(e) {
|
|
8358
8377
|
return (/\d+(?!.*\d+)/.exec(e) || [])[0];
|
|
8359
8378
|
}
|
|
8360
|
-
s(
|
|
8379
|
+
s(En, "prNumber");
|
|
8361
8380
|
function ot(e) {
|
|
8362
8381
|
return e ? /^(?:refs\/heads\/)?(?<branch>.+)$/i.exec(e)[1] : void 0;
|
|
8363
8382
|
}
|
|
8364
8383
|
s(ot, "parseBranch");
|
|
8365
|
-
var
|
|
8384
|
+
var Do = { detect({ env: e }) {
|
|
8366
8385
|
return !!e.BUILD_BUILDURI;
|
|
8367
8386
|
}, configuration({ env: e }) {
|
|
8368
8387
|
const t = e.SYSTEM_PULLREQUEST_PULLREQUESTID, r = !!t;
|
|
8369
8388
|
return { name: "Azure Pipelines", service: "azurePipelines", commit: e.BUILD_SOURCEVERSION, build: e.BUILD_BUILDNUMBER, branch: ot(r ? e.SYSTEM_PULLREQUEST_TARGETBRANCH : e.BUILD_SOURCEBRANCH), pr: t, isPr: r, prBranch: ot(r ? e.SYSTEM_PULLREQUEST_SOURCEBRANCH : void 0), root: e.BUILD_REPOSITORY_LOCALPATH };
|
|
8370
|
-
} },
|
|
8389
|
+
} }, Mo = { detect({ env: e }) {
|
|
8371
8390
|
return !!e.bamboo_agentId;
|
|
8372
8391
|
}, configuration({ env: e }) {
|
|
8373
8392
|
return { name: "Bamboo", service: "bamboo", commit: e.bamboo_planRepository_1_revision, build: e.bamboo_buildNumber, buildUrl: e.bamboo_buildResultsUrl, branch: e.bamboo_planRepository_1_branchName, job: e.bamboo_buildKey, root: e.bamboo_build_working_directory };
|
|
8374
|
-
} },
|
|
8393
|
+
} }, xo = { detect({ env: e }) {
|
|
8375
8394
|
return !!e.BITBUCKET_BUILD_NUMBER;
|
|
8376
8395
|
}, configuration({ env: e }) {
|
|
8377
8396
|
return { name: "Bitbucket Pipelines", service: "bitbucket", commit: e.BITBUCKET_COMMIT, tag: e.BITBUCKET_TAG, build: e.BITBUCKET_BUILD_NUMBER, buildUrl: `https://bitbucket.org/${e.BITBUCKET_REPO_FULL_NAME}/addon/pipelines/home#!/results/${e.BITBUCKET_BUILD_NUMBER}`, branch: e.BITBUCKET_BRANCH, slug: e.BITBUCKET_REPO_FULL_NAME, root: e.BITBUCKET_CLONE_DIR };
|
|
8378
|
-
} },
|
|
8397
|
+
} }, Go = { detect({ env: e }) {
|
|
8379
8398
|
return !!e.BITRISE_IO;
|
|
8380
8399
|
}, configuration({ env: e }) {
|
|
8381
8400
|
const t = e.BITRISE_PULL_REQUEST === "false" ? void 0 : e.BITRISE_PULL_REQUEST, r = !!t;
|
|
8382
8401
|
return { name: "Bitrise", service: "bitrise", commit: e.BITRISE_GIT_COMMIT, tag: e.BITRISE_GIT_TAG, build: e.BITRISE_BUILD_NUMBER, buildUrl: e.BITRISE_BUILD_URL, branch: r ? e.BITRISEIO_GIT_BRANCH_DEST : e.BITRISE_GIT_BRANCH, pr: t, isPr: r, prBranch: r ? e.BITRISE_GIT_BRANCH : void 0, slug: e.BITRISE_APP_SLUG };
|
|
8383
|
-
} },
|
|
8402
|
+
} }, $o = { detect({ env: e }) {
|
|
8384
8403
|
return !!e.BUDDY_WORKSPACE_ID;
|
|
8385
8404
|
}, configuration({ env: e }) {
|
|
8386
|
-
const t =
|
|
8405
|
+
const t = En(e.BUDDY_EXECUTION_PULL_REQUEST_ID), r = !!t;
|
|
8387
8406
|
return { name: "Buddy", service: "buddy", commit: e.BUDDY_EXECUTION_REVISION, tag: e.BUDDY_EXECUTION_TAG, build: e.BUDDY_EXECUTION_ID, buildUrl: e.BUDDY_EXECUTION_URL, branch: r ? e.BUDDY_EXECUTION_PULL_REQUEST_HEAD_BRANCH : e.BUDDY_EXECUTION_BRANCH, pr: t, isPr: r, slug: e.BUDDY_REPO_SLUG };
|
|
8388
|
-
} }, ke = { exports: {} },
|
|
8389
|
-
function
|
|
8390
|
-
if (
|
|
8391
|
-
|
|
8407
|
+
} }, ke = { exports: {} }, Jt, _n;
|
|
8408
|
+
function ko() {
|
|
8409
|
+
if (_n) return Jt;
|
|
8410
|
+
_n = 1, Jt = n, n.sync = i;
|
|
8392
8411
|
var e = ze;
|
|
8393
|
-
function t(
|
|
8412
|
+
function t(o, c) {
|
|
8394
8413
|
var l = c.pathExt !== void 0 ? c.pathExt : process.env.PATHEXT;
|
|
8395
8414
|
if (!l || (l = l.split(";"), l.indexOf("") !== -1)) return true;
|
|
8396
8415
|
for (var h = 0; h < l.length; h++) {
|
|
8397
|
-
var
|
|
8398
|
-
if (
|
|
8416
|
+
var g = l[h].toLowerCase();
|
|
8417
|
+
if (g && o.substr(-g.length).toLowerCase() === g) return true;
|
|
8399
8418
|
}
|
|
8400
8419
|
return false;
|
|
8401
8420
|
}
|
|
8402
8421
|
s(t, "checkPathExt");
|
|
8403
|
-
function r(
|
|
8404
|
-
return !
|
|
8422
|
+
function r(o, c, l) {
|
|
8423
|
+
return !o.isSymbolicLink() && !o.isFile() ? false : t(c, l);
|
|
8405
8424
|
}
|
|
8406
8425
|
s(r, "checkStat");
|
|
8407
|
-
function n(
|
|
8408
|
-
e.stat(
|
|
8409
|
-
l(h, h ? false : r(
|
|
8426
|
+
function n(o, c, l) {
|
|
8427
|
+
e.stat(o, function(h, g) {
|
|
8428
|
+
l(h, h ? false : r(g, o, c));
|
|
8410
8429
|
});
|
|
8411
8430
|
}
|
|
8412
8431
|
s(n, "isexe");
|
|
8413
|
-
function o
|
|
8414
|
-
return r(e.statSync(
|
|
8432
|
+
function i(o, c) {
|
|
8433
|
+
return r(e.statSync(o), o, c);
|
|
8415
8434
|
}
|
|
8416
|
-
return s(
|
|
8435
|
+
return s(i, "sync"), Jt;
|
|
8417
8436
|
}
|
|
8418
|
-
s(
|
|
8419
|
-
var
|
|
8420
|
-
function
|
|
8421
|
-
if (
|
|
8422
|
-
|
|
8437
|
+
s(ko, "requireWindows");
|
|
8438
|
+
var Qt, gn;
|
|
8439
|
+
function Ho() {
|
|
8440
|
+
if (gn) return Qt;
|
|
8441
|
+
gn = 1, Qt = t, t.sync = r;
|
|
8423
8442
|
var e = ze;
|
|
8424
|
-
function t(
|
|
8425
|
-
e.stat(
|
|
8426
|
-
l(h, h ? false : n(
|
|
8443
|
+
function t(o, c, l) {
|
|
8444
|
+
e.stat(o, function(h, g) {
|
|
8445
|
+
l(h, h ? false : n(g, c));
|
|
8427
8446
|
});
|
|
8428
8447
|
}
|
|
8429
8448
|
s(t, "isexe");
|
|
8430
|
-
function r(
|
|
8431
|
-
return n(e.statSync(
|
|
8449
|
+
function r(o, c) {
|
|
8450
|
+
return n(e.statSync(o), c);
|
|
8432
8451
|
}
|
|
8433
8452
|
s(r, "sync");
|
|
8434
|
-
function n(
|
|
8435
|
-
return
|
|
8453
|
+
function n(o, c) {
|
|
8454
|
+
return o.isFile() && i(o, c);
|
|
8436
8455
|
}
|
|
8437
8456
|
s(n, "checkStat");
|
|
8438
|
-
function o
|
|
8439
|
-
var l =
|
|
8440
|
-
return
|
|
8457
|
+
function i(o, c) {
|
|
8458
|
+
var l = o.mode, h = o.uid, g = o.gid, m = c.uid !== void 0 ? c.uid : process.getuid && process.getuid(), A = c.gid !== void 0 ? c.gid : process.getgid && process.getgid(), b = parseInt("100", 8), O = parseInt("010", 8), x = parseInt("001", 8), M = b | O, w = l & x || l & O && g === A || l & b && h === m || l & M && m === 0;
|
|
8459
|
+
return w;
|
|
8441
8460
|
}
|
|
8442
|
-
return s(
|
|
8461
|
+
return s(i, "checkMode"), Qt;
|
|
8443
8462
|
}
|
|
8444
|
-
s(
|
|
8445
|
-
var
|
|
8446
|
-
function
|
|
8447
|
-
if (
|
|
8448
|
-
|
|
8463
|
+
s(Ho, "requireMode");
|
|
8464
|
+
var Xt, In;
|
|
8465
|
+
function Fo() {
|
|
8466
|
+
if (In) return Xt;
|
|
8467
|
+
In = 1;
|
|
8449
8468
|
var e;
|
|
8450
|
-
process.platform === "win32" ||
|
|
8451
|
-
function t(n,
|
|
8452
|
-
if (typeof
|
|
8469
|
+
process.platform === "win32" || qi.TESTING_WINDOWS ? e = ko() : e = Ho(), Xt = t, t.sync = r;
|
|
8470
|
+
function t(n, i, o) {
|
|
8471
|
+
if (typeof i == "function" && (o = i, i = {}), !o) {
|
|
8453
8472
|
if (typeof Promise != "function") throw new TypeError("callback not provided");
|
|
8454
8473
|
return new Promise(function(c, l) {
|
|
8455
|
-
t(n,
|
|
8456
|
-
h ? l(h) : c(
|
|
8474
|
+
t(n, i || {}, function(h, g) {
|
|
8475
|
+
h ? l(h) : c(g);
|
|
8457
8476
|
});
|
|
8458
8477
|
});
|
|
8459
8478
|
}
|
|
8460
|
-
e(n,
|
|
8461
|
-
c && (c.code === "EACCES" ||
|
|
8479
|
+
e(n, i || {}, function(c, l) {
|
|
8480
|
+
c && (c.code === "EACCES" || i && i.ignoreErrors) && (c = null, l = false), o(c, l);
|
|
8462
8481
|
});
|
|
8463
8482
|
}
|
|
8464
8483
|
s(t, "isexe");
|
|
8465
|
-
function r(n,
|
|
8484
|
+
function r(n, i) {
|
|
8466
8485
|
try {
|
|
8467
|
-
return e.sync(n,
|
|
8468
|
-
} catch (
|
|
8469
|
-
if (
|
|
8470
|
-
throw
|
|
8471
|
-
}
|
|
8472
|
-
}
|
|
8473
|
-
return s(r, "sync"),
|
|
8474
|
-
}
|
|
8475
|
-
s(
|
|
8476
|
-
var
|
|
8477
|
-
function
|
|
8478
|
-
if (
|
|
8479
|
-
|
|
8480
|
-
const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t = require$$0$1, r = e ? ";" : ":", n =
|
|
8481
|
-
const m =
|
|
8482
|
-
return e && h.indexOf(".") !== -1 && O[0] !== "" && O.unshift(""), { pathEnv: A, pathExt: O, pathExtExe:
|
|
8483
|
-
}, "getPathInfo"), c = s((h,
|
|
8484
|
-
typeof
|
|
8485
|
-
const { pathEnv: A, pathExt:
|
|
8486
|
-
if (
|
|
8487
|
-
const L = A[
|
|
8488
|
-
w(
|
|
8489
|
-
}), "step"),
|
|
8490
|
-
if (B ===
|
|
8491
|
-
const G =
|
|
8492
|
-
n(
|
|
8493
|
-
if (!k && a) if (
|
|
8494
|
-
else return L(
|
|
8495
|
-
return L(
|
|
8486
|
+
return e.sync(n, i || {});
|
|
8487
|
+
} catch (o) {
|
|
8488
|
+
if (i && i.ignoreErrors || o.code === "EACCES") return false;
|
|
8489
|
+
throw o;
|
|
8490
|
+
}
|
|
8491
|
+
}
|
|
8492
|
+
return s(r, "sync"), Xt;
|
|
8493
|
+
}
|
|
8494
|
+
s(Fo, "requireIsexe");
|
|
8495
|
+
var Zt, Sn;
|
|
8496
|
+
function jo() {
|
|
8497
|
+
if (Sn) return Zt;
|
|
8498
|
+
Sn = 1;
|
|
8499
|
+
const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t = require$$0$1, r = e ? ";" : ":", n = Fo(), i = s((h) => Object.assign(new Error(`not found: ${h}`), { code: "ENOENT" }), "getNotFoundError"), o = s((h, g) => {
|
|
8500
|
+
const m = g.colon || r, A = h.match(/\//) || e && h.match(/\\/) ? [""] : [...e ? [process.cwd()] : [], ...(g.path || process.env.PATH || "").split(m)], b = e ? g.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", O = e ? b.split(m) : [""];
|
|
8501
|
+
return e && h.indexOf(".") !== -1 && O[0] !== "" && O.unshift(""), { pathEnv: A, pathExt: O, pathExtExe: b };
|
|
8502
|
+
}, "getPathInfo"), c = s((h, g, m) => {
|
|
8503
|
+
typeof g == "function" && (m = g, g = {}), g || (g = {});
|
|
8504
|
+
const { pathEnv: A, pathExt: b, pathExtExe: O } = o(h, g), x = [], M = s((C) => new Promise((y, B) => {
|
|
8505
|
+
if (C === A.length) return g.all && x.length ? y(x) : B(i(h));
|
|
8506
|
+
const L = A[C], U = /^".*"$/.test(L) ? L.slice(1, -1) : L, G = t.join(U, h), k = !U && /^\.[\\\/]/.test(h) ? h.slice(0, 2) + G : G;
|
|
8507
|
+
y(w(k, C, 0));
|
|
8508
|
+
}), "step"), w = s((C, y, B) => new Promise((L, U) => {
|
|
8509
|
+
if (B === b.length) return L(M(y + 1));
|
|
8510
|
+
const G = b[B];
|
|
8511
|
+
n(C + G, { pathExt: O }, (k, a) => {
|
|
8512
|
+
if (!k && a) if (g.all) x.push(C + G);
|
|
8513
|
+
else return L(C + G);
|
|
8514
|
+
return L(w(C, y, B + 1));
|
|
8496
8515
|
});
|
|
8497
8516
|
}), "subStep");
|
|
8498
|
-
return m ? M(0).then((
|
|
8499
|
-
}, "which"), l = s((h,
|
|
8500
|
-
|
|
8501
|
-
const { pathEnv: m, pathExt: A, pathExtExe:
|
|
8517
|
+
return m ? M(0).then((C) => m(null, C), m) : M(0);
|
|
8518
|
+
}, "which"), l = s((h, g) => {
|
|
8519
|
+
g = g || {};
|
|
8520
|
+
const { pathEnv: m, pathExt: A, pathExtExe: b } = o(h, g), O = [];
|
|
8502
8521
|
for (let x = 0; x < m.length; x++) {
|
|
8503
|
-
const M = m[x],
|
|
8522
|
+
const M = m[x], w = /^".*"$/.test(M) ? M.slice(1, -1) : M, C = t.join(w, h), y = !w && /^\.[\\\/]/.test(h) ? h.slice(0, 2) + C : C;
|
|
8504
8523
|
for (let B = 0; B < A.length; B++) {
|
|
8505
|
-
const L =
|
|
8524
|
+
const L = y + A[B];
|
|
8506
8525
|
try {
|
|
8507
|
-
if (n.sync(L, { pathExt:
|
|
8526
|
+
if (n.sync(L, { pathExt: b })) if (g.all) O.push(L);
|
|
8508
8527
|
else return L;
|
|
8509
8528
|
} catch {
|
|
8510
8529
|
}
|
|
8511
8530
|
}
|
|
8512
8531
|
}
|
|
8513
|
-
if (
|
|
8514
|
-
if (
|
|
8515
|
-
throw
|
|
8532
|
+
if (g.all && O.length) return O;
|
|
8533
|
+
if (g.nothrow) return null;
|
|
8534
|
+
throw i(h);
|
|
8516
8535
|
}, "whichSync");
|
|
8517
|
-
return
|
|
8536
|
+
return Zt = c, c.sync = l, Zt;
|
|
8518
8537
|
}
|
|
8519
|
-
s(
|
|
8520
|
-
var St = { exports: {} },
|
|
8521
|
-
function
|
|
8522
|
-
if (
|
|
8523
|
-
|
|
8538
|
+
s(jo, "requireWhich");
|
|
8539
|
+
var St = { exports: {} }, Rn;
|
|
8540
|
+
function qo() {
|
|
8541
|
+
if (Rn) return St.exports;
|
|
8542
|
+
Rn = 1;
|
|
8524
8543
|
const e = s((t = {}) => {
|
|
8525
8544
|
const r = t.env || process.env;
|
|
8526
|
-
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(r).reverse().find((
|
|
8545
|
+
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(r).reverse().find((i) => i.toUpperCase() === "PATH") || "Path";
|
|
8527
8546
|
}, "pathKey");
|
|
8528
8547
|
return St.exports = e, St.exports.default = e, St.exports;
|
|
8529
8548
|
}
|
|
8530
|
-
s(
|
|
8531
|
-
var
|
|
8532
|
-
function
|
|
8533
|
-
if (
|
|
8534
|
-
|
|
8535
|
-
const e = require$$0$1, t =
|
|
8536
|
-
function n(
|
|
8537
|
-
const l =
|
|
8549
|
+
s(qo, "requirePathKey");
|
|
8550
|
+
var er, Tn;
|
|
8551
|
+
function Wo() {
|
|
8552
|
+
if (Tn) return er;
|
|
8553
|
+
Tn = 1;
|
|
8554
|
+
const e = require$$0$1, t = jo(), r = qo();
|
|
8555
|
+
function n(o, c) {
|
|
8556
|
+
const l = o.options.env || process.env, h = process.cwd(), g = o.options.cwd != null, m = g && process.chdir !== void 0 && !process.chdir.disabled;
|
|
8538
8557
|
if (m) try {
|
|
8539
|
-
process.chdir(
|
|
8558
|
+
process.chdir(o.options.cwd);
|
|
8540
8559
|
} catch {
|
|
8541
8560
|
}
|
|
8542
8561
|
let A;
|
|
8543
8562
|
try {
|
|
8544
|
-
A = t.sync(
|
|
8563
|
+
A = t.sync(o.command, { path: l[r({ env: l })], pathExt: c ? e.delimiter : void 0 });
|
|
8545
8564
|
} catch {
|
|
8546
8565
|
} finally {
|
|
8547
8566
|
m && process.chdir(h);
|
|
8548
8567
|
}
|
|
8549
|
-
return A && (A = e.resolve(
|
|
8568
|
+
return A && (A = e.resolve(g ? o.options.cwd : "", A)), A;
|
|
8550
8569
|
}
|
|
8551
8570
|
s(n, "resolveCommandAttempt");
|
|
8552
|
-
function o
|
|
8553
|
-
return n(
|
|
8571
|
+
function i(o) {
|
|
8572
|
+
return n(o) || n(o, true);
|
|
8554
8573
|
}
|
|
8555
|
-
return s(
|
|
8574
|
+
return s(i, "resolveCommand"), er = i, er;
|
|
8556
8575
|
}
|
|
8557
|
-
s(
|
|
8558
|
-
var Rt = {},
|
|
8559
|
-
function
|
|
8560
|
-
if (
|
|
8561
|
-
|
|
8576
|
+
s(Wo, "requireResolveCommand");
|
|
8577
|
+
var Rt = {}, yn;
|
|
8578
|
+
function Ko() {
|
|
8579
|
+
if (yn) return Rt;
|
|
8580
|
+
yn = 1;
|
|
8562
8581
|
const e = /([()\][%!^"`<>&|;, *?])/g;
|
|
8563
8582
|
function t(n) {
|
|
8564
8583
|
return n = n.replace(e, "^$1"), n;
|
|
8565
8584
|
}
|
|
8566
8585
|
s(t, "escapeCommand");
|
|
8567
|
-
function r(n,
|
|
8568
|
-
return n = `${n}`, n = n.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), n = n.replace(/(?=(\\+?)?)\1$/, "$1$1"), n = `"${n}"`, n = n.replace(e, "^$1"),
|
|
8586
|
+
function r(n, i) {
|
|
8587
|
+
return n = `${n}`, n = n.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), n = n.replace(/(?=(\\+?)?)\1$/, "$1$1"), n = `"${n}"`, n = n.replace(e, "^$1"), i && (n = n.replace(e, "^$1")), n;
|
|
8569
8588
|
}
|
|
8570
8589
|
return s(r, "escapeArgument"), Rt.command = t, Rt.argument = r, Rt;
|
|
8571
8590
|
}
|
|
8572
|
-
s(
|
|
8573
|
-
var
|
|
8574
|
-
function
|
|
8575
|
-
return
|
|
8591
|
+
s(Ko, "require_escape");
|
|
8592
|
+
var tr, wn;
|
|
8593
|
+
function Vo() {
|
|
8594
|
+
return wn || (wn = 1, tr = /^#!(.*)/), tr;
|
|
8576
8595
|
}
|
|
8577
|
-
s(
|
|
8578
|
-
var
|
|
8579
|
-
function
|
|
8580
|
-
if (
|
|
8581
|
-
|
|
8582
|
-
const e =
|
|
8583
|
-
return
|
|
8596
|
+
s(Vo, "requireShebangRegex");
|
|
8597
|
+
var rr, An;
|
|
8598
|
+
function Yo() {
|
|
8599
|
+
if (An) return rr;
|
|
8600
|
+
An = 1;
|
|
8601
|
+
const e = Vo();
|
|
8602
|
+
return rr = s((t = "") => {
|
|
8584
8603
|
const r = t.match(e);
|
|
8585
8604
|
if (!r) return null;
|
|
8586
|
-
const [n,
|
|
8587
|
-
return
|
|
8588
|
-
}, "shebangCommand"),
|
|
8589
|
-
}
|
|
8590
|
-
s(
|
|
8591
|
-
var
|
|
8592
|
-
function
|
|
8593
|
-
if (
|
|
8594
|
-
|
|
8595
|
-
const e = ze, t =
|
|
8605
|
+
const [n, i] = r[0].replace(/#! ?/, "").split(" "), o = n.split("/").pop();
|
|
8606
|
+
return o === "env" ? i : i ? `${o} ${i}` : o;
|
|
8607
|
+
}, "shebangCommand"), rr;
|
|
8608
|
+
}
|
|
8609
|
+
s(Yo, "requireShebangCommand");
|
|
8610
|
+
var nr, vn;
|
|
8611
|
+
function zo() {
|
|
8612
|
+
if (vn) return nr;
|
|
8613
|
+
vn = 1;
|
|
8614
|
+
const e = ze, t = Yo();
|
|
8596
8615
|
function r(n) {
|
|
8597
|
-
const
|
|
8616
|
+
const o = Buffer.alloc(150);
|
|
8598
8617
|
let c;
|
|
8599
8618
|
try {
|
|
8600
|
-
c = e.openSync(n, "r"), e.readSync(c,
|
|
8619
|
+
c = e.openSync(n, "r"), e.readSync(c, o, 0, 150, 0), e.closeSync(c);
|
|
8601
8620
|
} catch {
|
|
8602
8621
|
}
|
|
8603
|
-
return t(
|
|
8622
|
+
return t(o.toString());
|
|
8604
8623
|
}
|
|
8605
|
-
return s(r, "readShebang"),
|
|
8624
|
+
return s(r, "readShebang"), nr = r, nr;
|
|
8606
8625
|
}
|
|
8607
|
-
s(
|
|
8608
|
-
var
|
|
8609
|
-
function
|
|
8610
|
-
if (
|
|
8611
|
-
|
|
8612
|
-
const e = require$$0$1, t =
|
|
8626
|
+
s(zo, "requireReadShebang");
|
|
8627
|
+
var ir, bn;
|
|
8628
|
+
function Jo() {
|
|
8629
|
+
if (bn) return ir;
|
|
8630
|
+
bn = 1;
|
|
8631
|
+
const e = require$$0$1, t = Wo(), r = Ko(), n = zo(), i = process.platform === "win32", o = /\.(?:com|exe)$/i, c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
8613
8632
|
function l(m) {
|
|
8614
8633
|
m.file = t(m);
|
|
8615
8634
|
const A = m.file && n(m.file);
|
|
@@ -8617,9 +8636,9 @@ function jo() {
|
|
|
8617
8636
|
}
|
|
8618
8637
|
s(l, "detectShebang");
|
|
8619
8638
|
function h(m) {
|
|
8620
|
-
if (!
|
|
8621
|
-
const A = l(m),
|
|
8622
|
-
if (m.options.forceShell ||
|
|
8639
|
+
if (!i) return m;
|
|
8640
|
+
const A = l(m), b = !o.test(A);
|
|
8641
|
+
if (m.options.forceShell || b) {
|
|
8623
8642
|
const O = c.test(A);
|
|
8624
8643
|
m.command = e.normalize(m.command), m.command = r.command(m.command), m.args = m.args.map((M) => r.argument(M, O));
|
|
8625
8644
|
const x = [m.command].concat(m.args).join(" ");
|
|
@@ -8628,131 +8647,131 @@ function jo() {
|
|
|
8628
8647
|
return m;
|
|
8629
8648
|
}
|
|
8630
8649
|
s(h, "parseNonShell");
|
|
8631
|
-
function
|
|
8632
|
-
A && !Array.isArray(A) && (
|
|
8633
|
-
const O = { command: m, args: A, options:
|
|
8634
|
-
return
|
|
8635
|
-
}
|
|
8636
|
-
return s(
|
|
8637
|
-
}
|
|
8638
|
-
s(
|
|
8639
|
-
var
|
|
8640
|
-
function
|
|
8641
|
-
if (
|
|
8642
|
-
|
|
8650
|
+
function g(m, A, b) {
|
|
8651
|
+
A && !Array.isArray(A) && (b = A, A = null), A = A ? A.slice(0) : [], b = Object.assign({}, b);
|
|
8652
|
+
const O = { command: m, args: A, options: b, file: void 0, original: { command: m, args: A } };
|
|
8653
|
+
return b.shell ? O : h(O);
|
|
8654
|
+
}
|
|
8655
|
+
return s(g, "parse"), ir = g, ir;
|
|
8656
|
+
}
|
|
8657
|
+
s(Jo, "requireParse");
|
|
8658
|
+
var or, Cn;
|
|
8659
|
+
function Qo() {
|
|
8660
|
+
if (Cn) return or;
|
|
8661
|
+
Cn = 1;
|
|
8643
8662
|
const e = process.platform === "win32";
|
|
8644
|
-
function t(
|
|
8645
|
-
return Object.assign(new Error(`${c} ${
|
|
8663
|
+
function t(o, c) {
|
|
8664
|
+
return Object.assign(new Error(`${c} ${o.command} ENOENT`), { code: "ENOENT", errno: "ENOENT", syscall: `${c} ${o.command}`, path: o.command, spawnargs: o.args });
|
|
8646
8665
|
}
|
|
8647
8666
|
s(t, "notFoundError");
|
|
8648
|
-
function r(
|
|
8667
|
+
function r(o, c) {
|
|
8649
8668
|
if (!e) return;
|
|
8650
|
-
const l =
|
|
8651
|
-
|
|
8669
|
+
const l = o.emit;
|
|
8670
|
+
o.emit = function(h, g) {
|
|
8652
8671
|
if (h === "exit") {
|
|
8653
|
-
const m = n(
|
|
8654
|
-
if (m) return l.call(
|
|
8672
|
+
const m = n(g, c);
|
|
8673
|
+
if (m) return l.call(o, "error", m);
|
|
8655
8674
|
}
|
|
8656
|
-
return l.apply(
|
|
8675
|
+
return l.apply(o, arguments);
|
|
8657
8676
|
};
|
|
8658
8677
|
}
|
|
8659
8678
|
s(r, "hookChildProcess");
|
|
8660
|
-
function n(
|
|
8661
|
-
return e &&
|
|
8679
|
+
function n(o, c) {
|
|
8680
|
+
return e && o === 1 && !c.file ? t(c.original, "spawn") : null;
|
|
8662
8681
|
}
|
|
8663
8682
|
s(n, "verifyENOENT");
|
|
8664
|
-
function o
|
|
8665
|
-
return e &&
|
|
8683
|
+
function i(o, c) {
|
|
8684
|
+
return e && o === 1 && !c.file ? t(c.original, "spawnSync") : null;
|
|
8666
8685
|
}
|
|
8667
|
-
return s(
|
|
8686
|
+
return s(i, "verifyENOENTSync"), or = { hookChildProcess: r, verifyENOENT: n, verifyENOENTSync: i, notFoundError: t }, or;
|
|
8668
8687
|
}
|
|
8669
|
-
s(
|
|
8670
|
-
var
|
|
8671
|
-
function
|
|
8672
|
-
if (
|
|
8673
|
-
|
|
8674
|
-
const e = require$$0$2, t =
|
|
8675
|
-
function n(
|
|
8676
|
-
const h = t(
|
|
8677
|
-
return r.hookChildProcess(
|
|
8688
|
+
s(Qo, "requireEnoent");
|
|
8689
|
+
var Un;
|
|
8690
|
+
function Xo() {
|
|
8691
|
+
if (Un) return ke.exports;
|
|
8692
|
+
Un = 1;
|
|
8693
|
+
const e = require$$0$2, t = Jo(), r = Qo();
|
|
8694
|
+
function n(o, c, l) {
|
|
8695
|
+
const h = t(o, c, l), g = e.spawn(h.command, h.args, h.options);
|
|
8696
|
+
return r.hookChildProcess(g, h), g;
|
|
8678
8697
|
}
|
|
8679
8698
|
s(n, "spawn");
|
|
8680
|
-
function o
|
|
8681
|
-
const h = t(
|
|
8682
|
-
return
|
|
8699
|
+
function i(o, c, l) {
|
|
8700
|
+
const h = t(o, c, l), g = e.spawnSync(h.command, h.args, h.options);
|
|
8701
|
+
return g.error = g.error || r.verifyENOENTSync(g.status, h), g;
|
|
8683
8702
|
}
|
|
8684
|
-
return s(
|
|
8703
|
+
return s(i, "spawnSync"), ke.exports = n, ke.exports.spawn = n, ke.exports.sync = i, ke.exports._parse = t, ke.exports._enoent = r, ke.exports;
|
|
8685
8704
|
}
|
|
8686
|
-
s(
|
|
8687
|
-
var
|
|
8688
|
-
function
|
|
8705
|
+
s(Xo, "requireCrossSpawn");
|
|
8706
|
+
var Zo = Xo(), es = kr(Zo);
|
|
8707
|
+
function ts(e) {
|
|
8689
8708
|
const t = typeof e == "string" ? `
|
|
8690
8709
|
` : 10, r = typeof e == "string" ? "\r" : 13;
|
|
8691
8710
|
return e[e.length - 1] === t && (e = e.slice(0, -1)), e[e.length - 1] === r && (e = e.slice(0, -1)), e;
|
|
8692
8711
|
}
|
|
8693
|
-
s(
|
|
8694
|
-
function
|
|
8712
|
+
s(ts, "stripFinalNewline");
|
|
8713
|
+
function Bn(e = {}) {
|
|
8695
8714
|
const { env: t = process.env, platform: r = process.platform } = e;
|
|
8696
8715
|
return r !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
8697
8716
|
}
|
|
8698
|
-
s(
|
|
8699
|
-
const
|
|
8700
|
-
const
|
|
8701
|
-
return r &&
|
|
8702
|
-
}, "npmRunPath"),
|
|
8717
|
+
s(Bn, "pathKey");
|
|
8718
|
+
const rs = s(({ cwd: e = y.cwd(), path: t = y.env[Bn()], preferLocal: r = true, execPath: n = y.execPath, addExecPath: i = true } = {}) => {
|
|
8719
|
+
const o = e instanceof URL ? node_url.fileURLToPath(e) : e, c = path.resolve(o), l = [];
|
|
8720
|
+
return r && ns(l, c), i && is(l, n, c), [...l, t].join(path.delimiter);
|
|
8721
|
+
}, "npmRunPath"), ns = s((e, t) => {
|
|
8703
8722
|
let r;
|
|
8704
8723
|
for (; r !== t; ) e.push(path.join(t, "node_modules/.bin")), r = t, t = path.resolve(t, "..");
|
|
8705
|
-
}, "applyPreferLocal"),
|
|
8724
|
+
}, "applyPreferLocal"), is = s((e, t, r) => {
|
|
8706
8725
|
const n = t instanceof URL ? node_url.fileURLToPath(t) : t;
|
|
8707
8726
|
e.push(path.resolve(r, n, ".."));
|
|
8708
|
-
}, "applyExecPath"),
|
|
8727
|
+
}, "applyExecPath"), os = s(({ env: e = y.env, ...t } = {}) => {
|
|
8709
8728
|
e = { ...e };
|
|
8710
|
-
const r =
|
|
8711
|
-
return t.path = e[r], e[r] =
|
|
8712
|
-
}, "npmRunPathEnv"),
|
|
8713
|
-
const e =
|
|
8714
|
-
return Array.from({ length: e },
|
|
8715
|
-
}, "getRealtimeSignals"),
|
|
8716
|
-
const e =
|
|
8717
|
-
return [...
|
|
8718
|
-
}, "getSignals"),
|
|
8729
|
+
const r = Bn({ env: e });
|
|
8730
|
+
return t.path = e[r], e[r] = rs(t), e;
|
|
8731
|
+
}, "npmRunPathEnv"), ss = s(() => {
|
|
8732
|
+
const e = Ln - On + 1;
|
|
8733
|
+
return Array.from({ length: e }, as);
|
|
8734
|
+
}, "getRealtimeSignals"), as = s((e, t) => ({ name: `SIGRT${t + 1}`, number: On + t, action: "terminate", description: "Application-specific signal (realtime)", standard: "posix" }), "getRealtimeSignal"), On = 34, Ln = 64, cs = [{ name: "SIGHUP", number: 1, action: "terminate", description: "Terminal closed", standard: "posix" }, { name: "SIGINT", number: 2, action: "terminate", description: "User interruption with CTRL-C", standard: "ansi" }, { name: "SIGQUIT", number: 3, action: "core", description: "User interruption with CTRL-\\", standard: "posix" }, { name: "SIGILL", number: 4, action: "core", description: "Invalid machine instruction", standard: "ansi" }, { name: "SIGTRAP", number: 5, action: "core", description: "Debugger breakpoint", standard: "posix" }, { name: "SIGABRT", number: 6, action: "core", description: "Aborted", standard: "ansi" }, { name: "SIGIOT", number: 6, action: "core", description: "Aborted", standard: "bsd" }, { name: "SIGBUS", number: 7, action: "core", description: "Bus error due to misaligned, non-existing address or paging error", standard: "bsd" }, { name: "SIGEMT", number: 7, action: "terminate", description: "Command should be emulated but is not implemented", standard: "other" }, { name: "SIGFPE", number: 8, action: "core", description: "Floating point arithmetic error", standard: "ansi" }, { name: "SIGKILL", number: 9, action: "terminate", description: "Forced termination", standard: "posix", forced: true }, { name: "SIGUSR1", number: 10, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGSEGV", number: 11, action: "core", description: "Segmentation fault", standard: "ansi" }, { name: "SIGUSR2", number: 12, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGPIPE", number: 13, action: "terminate", description: "Broken pipe or socket", standard: "posix" }, { name: "SIGALRM", number: 14, action: "terminate", description: "Timeout or timer", standard: "posix" }, { name: "SIGTERM", number: 15, action: "terminate", description: "Termination", standard: "ansi" }, { name: "SIGSTKFLT", number: 16, action: "terminate", description: "Stack is empty or overflowed", standard: "other" }, { name: "SIGCHLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "posix" }, { name: "SIGCLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "other" }, { name: "SIGCONT", number: 18, action: "unpause", description: "Unpaused", standard: "posix", forced: true }, { name: "SIGSTOP", number: 19, action: "pause", description: "Paused", standard: "posix", forced: true }, { name: "SIGTSTP", number: 20, action: "pause", description: 'Paused using CTRL-Z or "suspend"', standard: "posix" }, { name: "SIGTTIN", number: 21, action: "pause", description: "Background process cannot read terminal input", standard: "posix" }, { name: "SIGBREAK", number: 21, action: "terminate", description: "User interruption with CTRL-BREAK", standard: "other" }, { name: "SIGTTOU", number: 22, action: "pause", description: "Background process cannot write to terminal output", standard: "posix" }, { name: "SIGURG", number: 23, action: "ignore", description: "Socket received out-of-band data", standard: "bsd" }, { name: "SIGXCPU", number: 24, action: "core", description: "Process timed out", standard: "bsd" }, { name: "SIGXFSZ", number: 25, action: "core", description: "File too big", standard: "bsd" }, { name: "SIGVTALRM", number: 26, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGPROF", number: 27, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGWINCH", number: 28, action: "ignore", description: "Terminal window size changed", standard: "bsd" }, { name: "SIGIO", number: 29, action: "terminate", description: "I/O is available", standard: "other" }, { name: "SIGPOLL", number: 29, action: "terminate", description: "Watched event", standard: "other" }, { name: "SIGINFO", number: 29, action: "ignore", description: "Request for process information", standard: "other" }, { name: "SIGPWR", number: 30, action: "terminate", description: "Device running out of power", standard: "systemv" }, { name: "SIGSYS", number: 31, action: "core", description: "Invalid system call", standard: "other" }, { name: "SIGUNUSED", number: 31, action: "terminate", description: "Invalid system call", standard: "other" }], Pn = s(() => {
|
|
8735
|
+
const e = ss();
|
|
8736
|
+
return [...cs, ...e].map(us);
|
|
8737
|
+
}, "getSignals"), us = s(({ name: e, number: t, description: r, action: n, forced: i = false, standard: o }) => {
|
|
8719
8738
|
const { signals: { [e]: c } } = node_os.constants, l = c !== void 0;
|
|
8720
|
-
return { name: e, number: l ? c : t, description: r, supported: l, action: n, forced:
|
|
8721
|
-
}, "normalizeSignal"),
|
|
8722
|
-
const e =
|
|
8723
|
-
return Object.fromEntries(e.map(
|
|
8724
|
-
}, "getSignalsByName"),
|
|
8725
|
-
const e =
|
|
8739
|
+
return { name: e, number: l ? c : t, description: r, supported: l, action: n, forced: i, standard: o };
|
|
8740
|
+
}, "normalizeSignal"), ls = s(() => {
|
|
8741
|
+
const e = Pn();
|
|
8742
|
+
return Object.fromEntries(e.map(fs));
|
|
8743
|
+
}, "getSignalsByName"), fs = s(({ name: e, number: t, description: r, supported: n, action: i, forced: o, standard: c }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: o, standard: c }], "getSignalByName"), hs = ls(), ds = s(() => {
|
|
8744
|
+
const e = Pn(), t = Ln + 1, r = Array.from({ length: t }, (n, i) => ps(i, e));
|
|
8726
8745
|
return Object.assign({}, ...r);
|
|
8727
|
-
}, "getSignalsByNumber"),
|
|
8728
|
-
const r =
|
|
8746
|
+
}, "getSignalsByNumber"), ps = s((e, t) => {
|
|
8747
|
+
const r = ms(e, t);
|
|
8729
8748
|
if (r === void 0) return {};
|
|
8730
|
-
const { name: n, description:
|
|
8731
|
-
return { [e]: { name: n, number: e, description:
|
|
8732
|
-
}, "getSignalByNumber"),
|
|
8749
|
+
const { name: n, description: i, supported: o, action: c, forced: l, standard: h } = r;
|
|
8750
|
+
return { [e]: { name: n, number: e, description: i, supported: o, action: c, forced: l, standard: h } };
|
|
8751
|
+
}, "getSignalByNumber"), ms = s((e, t) => {
|
|
8733
8752
|
const r = t.find(({ name: n }) => node_os.constants.signals[n] === e);
|
|
8734
8753
|
return r !== void 0 ? r : t.find((n) => n.number === e);
|
|
8735
8754
|
}, "findSignalByNumber");
|
|
8736
|
-
|
|
8737
|
-
const
|
|
8738
|
-
|
|
8739
|
-
const O =
|
|
8740
|
-
${n.message}` :
|
|
8755
|
+
ds();
|
|
8756
|
+
const Es = s(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: o, isCanceled: c }) => e ? `timed out after ${t} milliseconds` : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${i})` : o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), Nn = s(({ stdout: e, stderr: t, all: r, error: n, signal: i, exitCode: o, command: c, escapedCommand: l, timedOut: h, isCanceled: g, killed: m, parsed: { options: { timeout: A, cwd: b = y.cwd() } } }) => {
|
|
8757
|
+
o = o === null ? void 0 : o, i = i === null ? void 0 : i;
|
|
8758
|
+
const O = i === void 0 ? void 0 : hs[i].description, x = n && n.code, w = `Command ${Es({ timedOut: h, timeout: A, errorCode: x, signal: i, signalDescription: O, exitCode: o, isCanceled: g })}: ${c}`, C = Object.prototype.toString.call(n) === "[object Error]", y = C ? `${w}
|
|
8759
|
+
${n.message}` : w, B = [y, t, e].filter(Boolean).join(`
|
|
8741
8760
|
`);
|
|
8742
|
-
return
|
|
8743
|
-
}, "makeError"), Tt = ["stdin", "stdout", "stderr"],
|
|
8761
|
+
return C ? (n.originalMessage = n.message, n.message = B) : n = new Error(B), n.shortMessage = y, n.command = c, n.escapedCommand = l, n.exitCode = o, n.signal = i, n.signalDescription = O, n.stdout = e, n.stderr = t, n.cwd = b, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.bufferedData, n.failed = true, n.timedOut = !!h, n.isCanceled = g, n.killed = m && !h, n;
|
|
8762
|
+
}, "makeError"), Tt = ["stdin", "stdout", "stderr"], _s = s((e) => Tt.some((t) => e[t] !== void 0), "hasAlias"), gs = s((e) => {
|
|
8744
8763
|
if (!e) return;
|
|
8745
8764
|
const { stdio: t } = e;
|
|
8746
8765
|
if (t === void 0) return Tt.map((n) => e[n]);
|
|
8747
|
-
if (
|
|
8766
|
+
if (_s(e)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Tt.map((n) => `\`${n}\``).join(", ")}`);
|
|
8748
8767
|
if (typeof t == "string") return t;
|
|
8749
8768
|
if (!Array.isArray(t)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
|
|
8750
8769
|
const r = Math.max(t.length, Tt.length);
|
|
8751
|
-
return Array.from({ length: r }, (n,
|
|
8770
|
+
return Array.from({ length: r }, (n, i) => t[i]);
|
|
8752
8771
|
}, "normalizeStdio"), Ye = [];
|
|
8753
8772
|
Ye.push("SIGHUP", "SIGINT", "SIGTERM"), process.platform !== "win32" && Ye.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"), process.platform === "linux" && Ye.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
8754
|
-
const
|
|
8755
|
-
class
|
|
8773
|
+
const yt = s((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "function", "processOk"), sr = Symbol.for("signal-exit emitter"), ar = globalThis, Is = Object.defineProperty.bind(Object);
|
|
8774
|
+
class Ss {
|
|
8756
8775
|
static {
|
|
8757
8776
|
s(this, "Emitter");
|
|
8758
8777
|
}
|
|
@@ -8761,37 +8780,37 @@ class ds {
|
|
|
8761
8780
|
count = 0;
|
|
8762
8781
|
id = Math.random();
|
|
8763
8782
|
constructor() {
|
|
8764
|
-
if (sr
|
|
8765
|
-
|
|
8783
|
+
if (ar[sr]) return ar[sr];
|
|
8784
|
+
Is(ar, sr, { value: this, writable: false, enumerable: false, configurable: false });
|
|
8766
8785
|
}
|
|
8767
8786
|
on(t, r) {
|
|
8768
8787
|
this.listeners[t].push(r);
|
|
8769
8788
|
}
|
|
8770
8789
|
removeListener(t, r) {
|
|
8771
|
-
const n = this.listeners[t],
|
|
8772
|
-
|
|
8790
|
+
const n = this.listeners[t], i = n.indexOf(r);
|
|
8791
|
+
i !== -1 && (i === 0 && n.length === 1 ? n.length = 0 : n.splice(i, 1));
|
|
8773
8792
|
}
|
|
8774
8793
|
emit(t, r, n) {
|
|
8775
8794
|
if (this.emitted[t]) return false;
|
|
8776
8795
|
this.emitted[t] = true;
|
|
8777
|
-
let
|
|
8778
|
-
for (const
|
|
8779
|
-
return t === "exit" && (
|
|
8796
|
+
let i = false;
|
|
8797
|
+
for (const o of this.listeners[t]) i = o(r, n) === true || i;
|
|
8798
|
+
return t === "exit" && (i = this.emit("afterExit", r, n) || i), i;
|
|
8780
8799
|
}
|
|
8781
8800
|
}
|
|
8782
|
-
class
|
|
8801
|
+
class Dn {
|
|
8783
8802
|
static {
|
|
8784
8803
|
s(this, "SignalExitBase");
|
|
8785
8804
|
}
|
|
8786
8805
|
}
|
|
8787
|
-
const
|
|
8806
|
+
const Rs = s((e) => ({ onExit(t, r) {
|
|
8788
8807
|
return e.onExit(t, r);
|
|
8789
8808
|
}, load() {
|
|
8790
8809
|
return e.load();
|
|
8791
8810
|
}, unload() {
|
|
8792
8811
|
return e.unload();
|
|
8793
8812
|
} }), "signalExitWrap");
|
|
8794
|
-
class
|
|
8813
|
+
class Ts extends Dn {
|
|
8795
8814
|
static {
|
|
8796
8815
|
s(this, "SignalExitFallback");
|
|
8797
8816
|
}
|
|
@@ -8804,12 +8823,12 @@ class ms extends On {
|
|
|
8804
8823
|
unload() {
|
|
8805
8824
|
}
|
|
8806
8825
|
}
|
|
8807
|
-
class
|
|
8826
|
+
class ys extends Dn {
|
|
8808
8827
|
static {
|
|
8809
8828
|
s(this, "SignalExit");
|
|
8810
8829
|
}
|
|
8811
|
-
#s =
|
|
8812
|
-
#t = new
|
|
8830
|
+
#s = cr.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
8831
|
+
#t = new Ss();
|
|
8813
8832
|
#e;
|
|
8814
8833
|
#i;
|
|
8815
8834
|
#o;
|
|
@@ -8819,9 +8838,9 @@ class Es extends On {
|
|
|
8819
8838
|
super(), this.#e = t, this.#n = {};
|
|
8820
8839
|
for (const r of Ye) this.#n[r] = () => {
|
|
8821
8840
|
const n = this.#e.listeners(r);
|
|
8822
|
-
let { count:
|
|
8823
|
-
const
|
|
8824
|
-
if (typeof
|
|
8841
|
+
let { count: i } = this.#t;
|
|
8842
|
+
const o = t;
|
|
8843
|
+
if (typeof o.__signal_exit_emitter__ == "object" && typeof o.__signal_exit_emitter__.count == "number" && (i += o.__signal_exit_emitter__.count), n.length === i) {
|
|
8825
8844
|
this.unload();
|
|
8826
8845
|
const c = this.#t.emit("exit", null, r), l = r === "SIGHUP" ? this.#s : r;
|
|
8827
8846
|
c || t.kill(t.pid, l);
|
|
@@ -8830,7 +8849,7 @@ class Es extends On {
|
|
|
8830
8849
|
this.#o = t.reallyExit, this.#i = t.emit;
|
|
8831
8850
|
}
|
|
8832
8851
|
onExit(t, r) {
|
|
8833
|
-
if (!
|
|
8852
|
+
if (!yt(this.#e)) return () => {
|
|
8834
8853
|
};
|
|
8835
8854
|
this.#r === false && this.load();
|
|
8836
8855
|
const n = r?.alwaysLast ? "afterExit" : "exit";
|
|
@@ -8860,99 +8879,99 @@ class Es extends On {
|
|
|
8860
8879
|
}), this.#e.emit = this.#i, this.#e.reallyExit = this.#o, this.#t.count -= 1);
|
|
8861
8880
|
}
|
|
8862
8881
|
#a(t) {
|
|
8863
|
-
return
|
|
8882
|
+
return yt(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#o.call(this.#e, this.#e.exitCode)) : 0;
|
|
8864
8883
|
}
|
|
8865
8884
|
#c(t, ...r) {
|
|
8866
8885
|
const n = this.#i;
|
|
8867
|
-
if (t === "exit" &&
|
|
8886
|
+
if (t === "exit" && yt(this.#e)) {
|
|
8868
8887
|
typeof r[0] == "number" && (this.#e.exitCode = r[0]);
|
|
8869
|
-
const
|
|
8870
|
-
return this.#t.emit("exit", this.#e.exitCode, null),
|
|
8888
|
+
const i = n.call(this.#e, t, ...r);
|
|
8889
|
+
return this.#t.emit("exit", this.#e.exitCode, null), i;
|
|
8871
8890
|
} else return n.call(this.#e, t, ...r);
|
|
8872
8891
|
}
|
|
8873
8892
|
}
|
|
8874
|
-
const
|
|
8875
|
-
|
|
8876
|
-
function
|
|
8893
|
+
const cr = globalThis.process;
|
|
8894
|
+
Rs(yt(cr) ? new ys(cr) : new Ts());
|
|
8895
|
+
function ws(e) {
|
|
8877
8896
|
return e !== null && typeof e == "object" && typeof e.pipe == "function";
|
|
8878
8897
|
}
|
|
8879
|
-
s(
|
|
8880
|
-
var
|
|
8881
|
-
function
|
|
8882
|
-
if (
|
|
8883
|
-
|
|
8898
|
+
s(ws, "isStream"), new TextEncoder();
|
|
8899
|
+
var ur, Mn;
|
|
8900
|
+
function As() {
|
|
8901
|
+
if (Mn) return ur;
|
|
8902
|
+
Mn = 1;
|
|
8884
8903
|
const { PassThrough: e } = require$$0;
|
|
8885
|
-
return
|
|
8904
|
+
return ur = s(function() {
|
|
8886
8905
|
var t = [], r = new e({ objectMode: true });
|
|
8887
|
-
return r.setMaxListeners(0), r.add = n, r.isEmpty =
|
|
8906
|
+
return r.setMaxListeners(0), r.add = n, r.isEmpty = i, r.on("unpipe", o), Array.prototype.slice.call(arguments).forEach(n), r;
|
|
8888
8907
|
function n(c) {
|
|
8889
|
-
return Array.isArray(c) ? (c.forEach(n), this) : (t.push(c), c.once("end",
|
|
8908
|
+
return Array.isArray(c) ? (c.forEach(n), this) : (t.push(c), c.once("end", o.bind(null, c)), c.once("error", r.emit.bind(r, "error")), c.pipe(r, { end: false }), this);
|
|
8890
8909
|
}
|
|
8891
|
-
function
|
|
8910
|
+
function i() {
|
|
8892
8911
|
return t.length == 0;
|
|
8893
8912
|
}
|
|
8894
|
-
function
|
|
8913
|
+
function o(c) {
|
|
8895
8914
|
t = t.filter(function(l) {
|
|
8896
8915
|
return l !== c;
|
|
8897
8916
|
}), !t.length && r.readable && r.end();
|
|
8898
8917
|
}
|
|
8899
|
-
}, "mergeStream"),
|
|
8918
|
+
}, "mergeStream"), ur;
|
|
8900
8919
|
}
|
|
8901
|
-
s(
|
|
8902
|
-
const
|
|
8920
|
+
s(As, "requireMergeStream"), As();
|
|
8921
|
+
const vs = s((e) => {
|
|
8903
8922
|
if (e !== void 0) throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
8904
|
-
}, "validateInputOptions"),
|
|
8905
|
-
const t =
|
|
8906
|
-
if (
|
|
8923
|
+
}, "validateInputOptions"), bs = s(({ input: e, inputFile: t }) => typeof t != "string" ? e : (vs(e), node_fs.readFileSync(t)), "getInputSync"), Cs = s((e) => {
|
|
8924
|
+
const t = bs(e);
|
|
8925
|
+
if (ws(t)) throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
8907
8926
|
return t;
|
|
8908
|
-
}, "handleInputSync"),
|
|
8927
|
+
}, "handleInputSync"), Us = (async () => {
|
|
8909
8928
|
})().constructor.prototype;
|
|
8910
|
-
["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(
|
|
8911
|
-
const
|
|
8929
|
+
["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(Us, e)]);
|
|
8930
|
+
const xn = s((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Bs = /^[\w.-]+$/, Os = s((e) => typeof e != "string" || Bs.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), Ls = s((e, t) => xn(e, t).join(" "), "joinCommand"), Ps = s((e, t) => xn(e, t).map((r) => Os(r)).join(" "), "getEscapedCommand"), Ns = node_util.debuglog("execa").enabled, wt = s((e, t) => String(e).padStart(t, "0"), "padField"), Ds = s(() => {
|
|
8912
8931
|
const e = /* @__PURE__ */ new Date();
|
|
8913
|
-
return `${
|
|
8914
|
-
}, "getTimestamp"),
|
|
8915
|
-
t && y.stderr.write(`[${
|
|
8932
|
+
return `${wt(e.getHours(), 2)}:${wt(e.getMinutes(), 2)}:${wt(e.getSeconds(), 2)}.${wt(e.getMilliseconds(), 3)}`;
|
|
8933
|
+
}, "getTimestamp"), Ms = s((e, { verbose: t }) => {
|
|
8934
|
+
t && y.stderr.write(`[${Ds()}] ${e}
|
|
8916
8935
|
`);
|
|
8917
|
-
}, "logCommand"),
|
|
8918
|
-
const
|
|
8919
|
-
return r ?
|
|
8920
|
-
}, "getEnv"),
|
|
8921
|
-
const n =
|
|
8922
|
-
return e = n.command, t = n.args, r = n.options, r = { maxBuffer:
|
|
8923
|
-
}, "handleArguments"),
|
|
8924
|
-
function
|
|
8925
|
-
const n =
|
|
8926
|
-
|
|
8927
|
-
const c =
|
|
8936
|
+
}, "logCommand"), xs = 1e3 * 1e3 * 100, Gs = s(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
|
|
8937
|
+
const o = t ? { ...y.env, ...e } : e;
|
|
8938
|
+
return r ? os({ env: o, cwd: n, execPath: i }) : o;
|
|
8939
|
+
}, "getEnv"), $s = s((e, t, r = {}) => {
|
|
8940
|
+
const n = es._parse(e, t, r);
|
|
8941
|
+
return e = n.command, t = n.args, r = n.options, r = { maxBuffer: xs, buffer: true, stripFinalNewline: true, extendEnv: true, preferLocal: false, localDir: r.cwd || y.cwd(), execPath: y.execPath, encoding: "utf8", reject: true, cleanup: true, all: false, windowsHide: true, verbose: Ns, ...r }, r.env = Gs(r), r.stdio = gs(r), y.platform === "win32" && path.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r, parsed: n };
|
|
8942
|
+
}, "handleArguments"), Gn = s((e, t, r) => typeof t != "string" && !node_buffer.Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ? ts(t) : t, "handleOutput");
|
|
8943
|
+
function lr(e, t, r) {
|
|
8944
|
+
const n = $s(e, t, r), i = Ls(e, t), o = Ps(e, t);
|
|
8945
|
+
Ms(o, n.options);
|
|
8946
|
+
const c = Cs(n.options);
|
|
8928
8947
|
let l;
|
|
8929
8948
|
try {
|
|
8930
8949
|
l = childProcess.spawnSync(n.file, n.args, { ...n.options, input: c });
|
|
8931
8950
|
} catch (m) {
|
|
8932
|
-
throw
|
|
8951
|
+
throw Nn({ error: m, stdout: "", stderr: "", all: "", command: i, escapedCommand: o, parsed: n, timedOut: false, isCanceled: false, killed: false });
|
|
8933
8952
|
}
|
|
8934
|
-
const h =
|
|
8953
|
+
const h = Gn(n.options, l.stdout, l.error), g = Gn(n.options, l.stderr, l.error);
|
|
8935
8954
|
if (l.error || l.status !== 0 || l.signal !== null) {
|
|
8936
|
-
const m =
|
|
8955
|
+
const m = Nn({ stdout: h, stderr: g, error: l.error, signal: l.signal, exitCode: l.status, command: i, escapedCommand: o, parsed: n, timedOut: l.error && l.error.code === "ETIMEDOUT", isCanceled: false, killed: l.signal !== null });
|
|
8937
8956
|
if (!n.options.reject) return m;
|
|
8938
8957
|
throw m;
|
|
8939
8958
|
}
|
|
8940
|
-
return { command:
|
|
8959
|
+
return { command: i, escapedCommand: o, exitCode: 0, stdout: h, stderr: g, failed: false, timedOut: false, isCanceled: false, killed: false };
|
|
8941
8960
|
}
|
|
8942
|
-
s(
|
|
8961
|
+
s(lr, "execaSync");
|
|
8943
8962
|
function At(e) {
|
|
8944
8963
|
try {
|
|
8945
|
-
return
|
|
8964
|
+
return lr("git", ["rev-parse", "HEAD"], e).stdout;
|
|
8946
8965
|
} catch {
|
|
8947
8966
|
return;
|
|
8948
8967
|
}
|
|
8949
8968
|
}
|
|
8950
8969
|
s(At, "head");
|
|
8951
|
-
function
|
|
8970
|
+
function fr(e) {
|
|
8952
8971
|
try {
|
|
8953
|
-
const t =
|
|
8972
|
+
const t = lr("git", ["rev-parse", "--abbrev-ref", "HEAD"], e).stdout;
|
|
8954
8973
|
if (t === "HEAD") {
|
|
8955
|
-
const r =
|
|
8974
|
+
const r = lr("git", ["show", "-s", "--pretty=%d", "HEAD"], e).stdout.replace(/^\(|\)$/g, "").split(", ").find((n) => n.startsWith("origin/"));
|
|
8956
8975
|
return r ? r.match(/^origin\/(?<branch>.+)/)[1] : void 0;
|
|
8957
8976
|
}
|
|
8958
8977
|
return t;
|
|
@@ -8960,217 +8979,217 @@ function lr(e) {
|
|
|
8960
8979
|
return;
|
|
8961
8980
|
}
|
|
8962
8981
|
}
|
|
8963
|
-
s(
|
|
8964
|
-
const
|
|
8965
|
-
function
|
|
8982
|
+
s(fr, "branch");
|
|
8983
|
+
const $n = /^(?:.*)@(?:.*):(?:\d+\/)?(.*)\.git$/, ks = /^\/(.*)\.git$/;
|
|
8984
|
+
function Hs(e) {
|
|
8966
8985
|
if (e) {
|
|
8967
|
-
if (e.match(
|
|
8986
|
+
if (e.match($n)) return e.replace($n, "$1");
|
|
8968
8987
|
try {
|
|
8969
|
-
return new URL(e).pathname.replace(
|
|
8988
|
+
return new URL(e).pathname.replace(ks, "$1");
|
|
8970
8989
|
} catch {
|
|
8971
8990
|
return;
|
|
8972
8991
|
}
|
|
8973
8992
|
}
|
|
8974
8993
|
}
|
|
8975
|
-
s(
|
|
8976
|
-
var
|
|
8994
|
+
s(Hs, "getSlugFromGitURL");
|
|
8995
|
+
var Fs = { detect({ env: e }) {
|
|
8977
8996
|
return !!e.BUILDKITE;
|
|
8978
8997
|
}, configuration({ env: e }) {
|
|
8979
8998
|
const t = e.BUILDKITE_PULL_REQUEST === "false" ? void 0 : e.BUILDKITE_PULL_REQUEST, r = !!t;
|
|
8980
|
-
return { name: "Buildkite", service: "buildkite", build: e.BUILDKITE_BUILD_NUMBER, buildUrl: e.BUILDKITE_BUILD_URL, commit: e.BUILDKITE_COMMIT, tag: e.BUILDKITE_TAG, branch: r ? e.BUILDKITE_PULL_REQUEST_BASE_BRANCH : e.BUILDKITE_BRANCH, slug:
|
|
8981
|
-
} },
|
|
8999
|
+
return { name: "Buildkite", service: "buildkite", build: e.BUILDKITE_BUILD_NUMBER, buildUrl: e.BUILDKITE_BUILD_URL, commit: e.BUILDKITE_COMMIT, tag: e.BUILDKITE_TAG, branch: r ? e.BUILDKITE_PULL_REQUEST_BASE_BRANCH : e.BUILDKITE_BRANCH, slug: Hs(e.BUILDKITE_REPO), pr: t, isPr: r, prBranch: r ? e.BUILDKITE_BRANCH : void 0, root: e.BUILDKITE_BUILD_CHECKOUT_PATH };
|
|
9000
|
+
} }, js = { detect({ env: e }) {
|
|
8982
9001
|
return !!e.CIRCLECI;
|
|
8983
9002
|
}, configuration({ env: e }) {
|
|
8984
|
-
const t = e.CIRCLE_PR_NUMBER ||
|
|
9003
|
+
const t = e.CIRCLE_PR_NUMBER || En(e.CIRCLE_PULL_REQUEST || e.CI_PULL_REQUEST), r = !!t;
|
|
8985
9004
|
return { name: "CircleCI", service: "circleci", build: e.CIRCLE_BUILD_NUM, buildUrl: e.CIRCLE_BUILD_URL, job: `${e.CIRCLE_BUILD_NUM}.${e.CIRCLE_NODE_INDEX}`, commit: e.CIRCLE_SHA1, tag: e.CIRCLE_TAG, branch: r ? void 0 : e.CIRCLE_BRANCH, pr: t, isPr: r, prBranch: r ? e.CIRCLE_BRANCH : void 0, slug: `${e.CIRCLE_PROJECT_USERNAME}/${e.CIRCLE_PROJECT_REPONAME}` };
|
|
8986
9005
|
} };
|
|
8987
|
-
const
|
|
8988
|
-
var
|
|
9006
|
+
const kn = "https://cirrus-ci.com";
|
|
9007
|
+
var qs = { detect({ env: e }) {
|
|
8989
9008
|
return !!e.CIRRUS_CI;
|
|
8990
9009
|
}, configuration({ env: e }) {
|
|
8991
9010
|
const t = e.CIRRUS_PR, r = !!t;
|
|
8992
|
-
return { name: "Cirrus CI", service: "cirrus", commit: e.CIRRUS_CHANGE_IN_REPO, tag: e.CIRRUS_TAG, build: e.CIRRUS_BUILD_ID, buildUrl: `${
|
|
8993
|
-
} },
|
|
9011
|
+
return { name: "Cirrus CI", service: "cirrus", commit: e.CIRRUS_CHANGE_IN_REPO, tag: e.CIRRUS_TAG, build: e.CIRRUS_BUILD_ID, buildUrl: `${kn}/build/${e.CIRRUS_BUILD_ID}`, job: e.CIRRUS_TASK_ID, jobUrl: `${kn}/task/${e.CIRRUS_TASK_ID}`, branch: r ? e.CIRRUS_BASE_BRANCH : e.CIRRUS_BRANCH, pr: t, isPr: r, prBranch: r ? e.CIRRUS_BRANCH : void 0, slug: e.CIRRUS_REPO_FULL_NAME, root: e.CIRRUS_WORKING_DIR };
|
|
9012
|
+
} }, Ws = { detect({ env: e }) {
|
|
8994
9013
|
return e.CF_PAGES === "1";
|
|
8995
9014
|
}, configuration({ env: e }) {
|
|
8996
9015
|
return { name: "Cloudflare Pages", service: "cloudflarePages", commit: e.CF_PAGES_COMMIT_SHA, branch: e.CF_PAGES_BRANCH, root: e.PWD };
|
|
8997
|
-
} },
|
|
9016
|
+
} }, Ks = { detect({ env: e }) {
|
|
8998
9017
|
return !!e.CODEBUILD_BUILD_ID;
|
|
8999
9018
|
}, configuration({ env: e, cwd: t }) {
|
|
9000
|
-
return { name: "AWS CodeBuild", service: "codebuild", commit: At({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch:
|
|
9001
|
-
} },
|
|
9019
|
+
return { name: "AWS CodeBuild", service: "codebuild", commit: At({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch: fr({ env: e, cwd: t }), buildUrl: `https://console.aws.amazon.com/codebuild/home?region=${e.AWS_REGION}#/builds/${e.CODEBUILD_BUILD_ID}/view/new`, root: e.PWD };
|
|
9020
|
+
} }, Vs = { detect({ env: e }) {
|
|
9002
9021
|
return !!e.CF_BUILD_ID;
|
|
9003
9022
|
}, configuration({ env: e }) {
|
|
9004
9023
|
const t = e.CF_PULL_REQUEST_NUMBER, r = !!t;
|
|
9005
9024
|
return { name: "Codefresh", service: "codefresh", commit: e.CF_REVISION, build: e.CF_BUILD_ID, buildUrl: e.CF_BUILD_URL, branch: r ? e.CF_PULL_REQUEST_TARGET : e.CF_BRANCH, pr: t, isPr: r, prBranch: r ? e.CF_BRANCH : void 0, slug: `${e.CF_REPO_OWNER}/${e.CF_REPO_NAME}`, root: e.CF_VOLUME_PATH };
|
|
9006
|
-
} },
|
|
9025
|
+
} }, Ys = { detect({ env: e }) {
|
|
9007
9026
|
return e.CI_NAME && e.CI_NAME === "codeship";
|
|
9008
9027
|
}, configuration({ env: e }) {
|
|
9009
9028
|
return { name: "Codeship", service: "codeship", build: e.CI_BUILD_NUMBER, buildUrl: e.CI_BUILD_URL, commit: e.CI_COMMIT_ID, branch: e.CI_BRANCH, slug: e.CI_REPO_NAME };
|
|
9010
|
-
} },
|
|
9029
|
+
} }, zs = { detect({ env: e }) {
|
|
9011
9030
|
return !!e.DRONE;
|
|
9012
9031
|
}, configuration({ env: e }) {
|
|
9013
9032
|
const t = e.DRONE_BUILD_EVENT === "pull_request";
|
|
9014
9033
|
return { name: "Drone", service: "drone", commit: e.DRONE_COMMIT_SHA, tag: e.DRONE_TAG, build: e.DRONE_BUILD_NUMBER, buildUrl: e.DRONE_BUILD_LINK, branch: t ? e.DRONE_TARGET_BRANCH : e.DRONE_BRANCH, job: e.DRONE_JOB_NUMBER, jobUrl: e.DRONE_BUILD_LINK, pr: e.DRONE_PULL_REQUEST, isPr: t, prBranch: t ? e.DRONE_SOURCE_BRANCH : void 0, slug: `${e.DRONE_REPO_OWNER}/${e.DRONE_REPO_NAME}`, root: e.DRONE_WORKSPACE };
|
|
9015
|
-
} },
|
|
9016
|
-
return { commit: At(e), branch:
|
|
9034
|
+
} }, Js = { configuration(e) {
|
|
9035
|
+
return { commit: At(e), branch: fr(e) };
|
|
9017
9036
|
} };
|
|
9018
|
-
const
|
|
9037
|
+
const Qs = s(({ env: e }) => {
|
|
9019
9038
|
try {
|
|
9020
9039
|
const t = e.GITHUB_EVENT_PATH ? JSON.parse(node_fs.readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
|
|
9021
9040
|
if (t && t.pull_request) return { branch: t.pull_request.base ? ot(t.pull_request.base.ref) : void 0, pr: t.pull_request.number };
|
|
9022
9041
|
} catch {
|
|
9023
9042
|
}
|
|
9024
9043
|
return { pr: void 0, branch: void 0 };
|
|
9025
|
-
}, "getPrEvent"),
|
|
9044
|
+
}, "getPrEvent"), Xs = s((e) => {
|
|
9026
9045
|
const t = e.GITHUB_EVENT_PATH ? JSON.parse(node_fs.readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
|
|
9027
9046
|
return t && t.pull_request ? t.pull_request.number : void 0;
|
|
9028
9047
|
}, "getPrNumber");
|
|
9029
|
-
var
|
|
9048
|
+
var Zs = { detect({ env: e }) {
|
|
9030
9049
|
return !!e.GITHUB_ACTIONS;
|
|
9031
9050
|
}, configuration({ env: e, cwd: t }) {
|
|
9032
|
-
const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = ot(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${
|
|
9033
|
-
return { name: "GitHub Actions", service: "github", commit: e.GITHUB_SHA, build: e.GITHUB_RUN_ID, buildUrl: `${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`, isPr: r, branch: n, prBranch: r ? n : void 0, slug: e.GITHUB_REPOSITORY, root: e.GITHUB_WORKSPACE, ...r ?
|
|
9034
|
-
} },
|
|
9051
|
+
const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = ot(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${Xs(e)}/merge` : e.GITHUB_REF);
|
|
9052
|
+
return { name: "GitHub Actions", service: "github", commit: e.GITHUB_SHA, build: e.GITHUB_RUN_ID, buildUrl: `${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`, isPr: r, branch: n, prBranch: r ? n : void 0, slug: e.GITHUB_REPOSITORY, root: e.GITHUB_WORKSPACE, ...r ? Qs({ env: e }) : void 0 };
|
|
9053
|
+
} }, ea = { detect({ env: e }) {
|
|
9035
9054
|
return !!e.GITLAB_CI;
|
|
9036
9055
|
}, configuration({ env: e }) {
|
|
9037
9056
|
const t = e.CI_MERGE_REQUEST_ID, r = !!t;
|
|
9038
9057
|
return { name: "GitLab CI/CD", service: "gitlab", commit: e.CI_COMMIT_SHA, tag: e.CI_COMMIT_TAG, build: e.CI_PIPELINE_ID, buildUrl: `${e.CI_PROJECT_URL}/pipelines/${e.CI_PIPELINE_ID}`, job: e.CI_JOB_ID, jobUrl: `${e.CI_PROJECT_URL}/-/jobs/${e.CI_JOB_ID}`, branch: r ? e.CI_MERGE_REQUEST_TARGET_BRANCH_NAME : e.CI_COMMIT_REF_NAME, pr: t, isPr: r, prBranch: e.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME, slug: e.CI_PROJECT_PATH, root: e.CI_PROJECT_DIR };
|
|
9039
|
-
} },
|
|
9058
|
+
} }, ta = { detect({ env: e }) {
|
|
9040
9059
|
return !!e.JENKINS_URL;
|
|
9041
9060
|
}, configuration({ env: e, cwd: t }) {
|
|
9042
|
-
const r = e.ghprbPullId || e.gitlabMergeRequestId || e.CHANGE_ID, n = !!r,
|
|
9043
|
-
return { name: "Jenkins", service: "jenkins", commit: e.ghprbActualCommit || e.GIT_COMMIT || At({ env: e, cwd: t }), branch: n ? e.ghprbTargetBranch || e.gitlabTargetBranch :
|
|
9044
|
-
} },
|
|
9061
|
+
const r = e.ghprbPullId || e.gitlabMergeRequestId || e.CHANGE_ID, n = !!r, i = e.GIT_LOCAL_BRANCH || e.GIT_BRANCH || e.gitlabBranch || e.BRANCH_NAME;
|
|
9062
|
+
return { name: "Jenkins", service: "jenkins", commit: e.ghprbActualCommit || e.GIT_COMMIT || At({ env: e, cwd: t }), branch: n ? e.ghprbTargetBranch || e.gitlabTargetBranch : i, build: e.BUILD_NUMBER, buildUrl: e.BUILD_URL, root: e.WORKSPACE, pr: r, isPr: n, prBranch: n ? e.ghprbSourceBranch || e.gitlabSourceBranch || i : void 0 };
|
|
9063
|
+
} }, ra = { detect({ env: e }) {
|
|
9045
9064
|
return e.NETLIFY === "true";
|
|
9046
9065
|
}, configuration({ env: e }) {
|
|
9047
9066
|
const t = e.PULL_REQUEST === "true";
|
|
9048
9067
|
return { name: "Netlify", service: "netlify", commit: e.COMMIT_REF, build: e.DEPLOY_ID, buildUrl: `https://app.netlify.com/sites/${e.SITE_NAME}/deploys/${e.DEPLOY_ID}`, branch: t ? void 0 : e.HEAD, pr: e.REVIEW_ID, isPr: t, prBranch: t ? e.HEAD : void 0, slug: e.REPOSITORY_URL.match(/[^/:]+\/[^/]+?$/)[0], root: e.PWD };
|
|
9049
|
-
} },
|
|
9068
|
+
} }, na = { detect({ env: e }) {
|
|
9050
9069
|
return !!e.DISTELLI_APPNAME;
|
|
9051
9070
|
}, configuration({ env: e }) {
|
|
9052
9071
|
return { name: "Puppet", service: "puppet", build: e.DISTELLI_BUILDNUM, buildUrl: e.DISTELLI_RELEASE, commit: e.DISTELLI_RELREVISION, branch: e.DISTELLI_RELBRANCH, root: e.DISTELLI_INSTALLHOME };
|
|
9053
|
-
} },
|
|
9072
|
+
} }, ia = { detect({ env: e }) {
|
|
9054
9073
|
return !!e.SAILCI;
|
|
9055
9074
|
}, configuration({ env: e }) {
|
|
9056
9075
|
const t = e.SAIL_PULL_REQUEST_NUMBER, r = !!t;
|
|
9057
9076
|
return { name: "Sail CI", service: "sail", commit: e.SAIL_COMMIT_SHA, branch: r ? void 0 : e.SAIL_COMMIT_BRANCH, pr: t, isPr: r, slug: `${e.SAIL_REPO_OWNER}/${e.SAIL_REPO_NAME}`, root: e.SAIL_CLONE_DIR };
|
|
9058
|
-
} },
|
|
9077
|
+
} }, oa = { detect({ env: e }) {
|
|
9059
9078
|
return !!e.SCREWDRIVER;
|
|
9060
9079
|
}, configuration({ env: e }) {
|
|
9061
9080
|
const t = e.SD_PULL_REQUEST, r = !!t;
|
|
9062
9081
|
return { name: "Screwdriver.cd", service: "screwdriver", branch: r ? e.PR_BASE_BRANCH_NAME : e.GIT_BRANCH, prBranch: r ? e.PR_BRANCH_NAME : void 0, commit: e.SD_BUILD_SHA, build: e.SD_BUILD_ID, buildUrl: e.SD_UI_BUILD_URL, job: e.SD_JOB_ID, pr: t, isPr: r, slug: e.SD_PIPELINE_NAME, root: e.SD_ROOT_DIR };
|
|
9063
|
-
} },
|
|
9082
|
+
} }, sa = { detect({ env: e }) {
|
|
9064
9083
|
return !!e.SCRUTINIZER;
|
|
9065
9084
|
}, configuration({ env: e }) {
|
|
9066
9085
|
const t = e.SCRUTINIZER_PR_NUMBER, r = !!t;
|
|
9067
9086
|
return { name: "Scrutinizer", service: "scrutinizer", commit: e.SCRUTINIZER_SHA1, build: e.SCRUTINIZER_INSPECTION_UUID, branch: e.SCRUTINIZER_BRANCH, pr: t, isPr: r, prBranch: e.SCRUTINIZER_PR_SOURCE_BRANCH };
|
|
9068
|
-
} },
|
|
9087
|
+
} }, aa = { detect({ env: e }) {
|
|
9069
9088
|
return !!e.SEMAPHORE;
|
|
9070
9089
|
}, configuration({ env: e, cwd: t }) {
|
|
9071
9090
|
const r = e.SEMAPHORE_GIT_PR_NUMBER || e.PULL_REQUEST_NUMBER, n = !!r;
|
|
9072
9091
|
return { name: "Semaphore", service: "semaphore", commit: e.SEMAPHORE_GIT_SHA || At({ env: e, cwd: t }), tag: e.SEMAPHORE_GIT_TAG_NAME, build: e.SEMAPHORE_JOB_ID || e.SEMAPHORE_BUILD_NUMBER, branch: e.SEMAPHORE_GIT_BRANCH || (n ? void 0 : e.BRANCH_NAME), pr: r, isPr: n, prBranch: e.SEMAPHORE_GIT_PR_BRANCH || (n ? e.BRANCH_NAME : void 0), slug: e.SEMAPHORE_GIT_REPO_SLUG || e.SEMAPHORE_REPO_SLUG, root: e.SEMAPHORE_GIT_DIR || e.SEMAPHORE_PROJECT_DIR };
|
|
9073
|
-
} },
|
|
9092
|
+
} }, ca = { detect({ env: e }) {
|
|
9074
9093
|
return !!e.SHIPPABLE;
|
|
9075
9094
|
}, configuration({ env: e }) {
|
|
9076
9095
|
const t = e.IS_PULL_REQUEST === "true" ? e.PULL_REQUEST : void 0, r = !!t;
|
|
9077
9096
|
return { name: "Shippable", service: "shippable", commit: e.COMMIT, tag: e.GIT_TAG_NAME, build: e.BUILD_NUMBER, buildUrl: e.BUILD_URL, branch: r ? e.BASE_BRANCH : e.BRANCH, job: e.JOB_NUMBER, pr: t, isPr: r, prBranch: r ? e.HEAD_BRANCH : void 0, slug: e.SHIPPABLE_REPO_SLUG, root: e.SHIPPABLE_BUILD_DIR };
|
|
9078
|
-
} }, He = {},
|
|
9079
|
-
function
|
|
9080
|
-
if (
|
|
9081
|
-
|
|
9097
|
+
} }, He = {}, Hn;
|
|
9098
|
+
function ua() {
|
|
9099
|
+
if (Hn) return He;
|
|
9100
|
+
Hn = 1, Object.defineProperty(He, "__esModule", { value: true }), He.of = He.PropertiesFile = void 0;
|
|
9082
9101
|
var e = t(ze);
|
|
9083
|
-
function t(
|
|
9084
|
-
return
|
|
9102
|
+
function t(i) {
|
|
9103
|
+
return i && i.__esModule ? i : { default: i };
|
|
9085
9104
|
}
|
|
9086
9105
|
s(t, "_interopRequireDefault");
|
|
9087
9106
|
class r {
|
|
9088
9107
|
static {
|
|
9089
9108
|
s(this, "PropertiesFile");
|
|
9090
9109
|
}
|
|
9091
|
-
constructor(...
|
|
9092
|
-
this.objs = {},
|
|
9110
|
+
constructor(...o) {
|
|
9111
|
+
this.objs = {}, o.length && this.of.apply(this, o);
|
|
9093
9112
|
}
|
|
9094
|
-
makeKeys(
|
|
9095
|
-
if (
|
|
9096
|
-
let c = ["=", ":"].map((m) =>
|
|
9097
|
-
if (this.objs.hasOwnProperty(h)) if (Array.isArray(this.objs[h])) this.objs[h].push(
|
|
9113
|
+
makeKeys(o) {
|
|
9114
|
+
if (o && o.indexOf("#") !== 0) {
|
|
9115
|
+
let c = ["=", ":"].map((m) => o.indexOf(m)).filter((m) => m > -1), l = Math.min(...c), h = o.substring(0, l).trim(), g = o.substring(l + 1).trim();
|
|
9116
|
+
if (this.objs.hasOwnProperty(h)) if (Array.isArray(this.objs[h])) this.objs[h].push(g);
|
|
9098
9117
|
else {
|
|
9099
9118
|
let m = this.objs[h];
|
|
9100
|
-
this.objs[h] = [m,
|
|
9119
|
+
this.objs[h] = [m, g];
|
|
9101
9120
|
}
|
|
9102
9121
|
else {
|
|
9103
|
-
const m =
|
|
9122
|
+
const m = g.replace(/"/g, '\\"').replace(/\\:/g, ":").replace(/\\=/g, "=");
|
|
9104
9123
|
this.objs[h] = unescape(JSON.parse('"' + m + '"'));
|
|
9105
9124
|
}
|
|
9106
9125
|
}
|
|
9107
9126
|
}
|
|
9108
|
-
addFile(
|
|
9109
|
-
let l = e.default.readFileSync(
|
|
9110
|
-
for (let
|
|
9111
|
-
let m = l[
|
|
9127
|
+
addFile(o) {
|
|
9128
|
+
let l = e.default.readFileSync(o, "utf-8").split(/\r?\n/), h = this;
|
|
9129
|
+
for (let g = 0; g < l.length; g++) {
|
|
9130
|
+
let m = l[g];
|
|
9112
9131
|
for (; m.substring(m.length - 1) === "\\"; ) {
|
|
9113
9132
|
m = m.slice(0, -1);
|
|
9114
|
-
let A = l[
|
|
9115
|
-
m = m + A.trim(),
|
|
9133
|
+
let A = l[g + 1];
|
|
9134
|
+
m = m + A.trim(), g++;
|
|
9116
9135
|
}
|
|
9117
9136
|
h.makeKeys(m);
|
|
9118
9137
|
}
|
|
9119
9138
|
}
|
|
9120
|
-
of(...
|
|
9121
|
-
for (let c = 0; c <
|
|
9139
|
+
of(...o) {
|
|
9140
|
+
for (let c = 0; c < o.length; c++) this.addFile(o[c]);
|
|
9122
9141
|
}
|
|
9123
|
-
get(
|
|
9124
|
-
if (this.objs.hasOwnProperty(
|
|
9142
|
+
get(o, c) {
|
|
9143
|
+
if (this.objs.hasOwnProperty(o)) if (Array.isArray(this.objs[o])) {
|
|
9125
9144
|
let l = [];
|
|
9126
|
-
for (let h = 0; h < this.objs[
|
|
9145
|
+
for (let h = 0; h < this.objs[o].length; h++) l[h] = this.interpolate(this.objs[o][h]);
|
|
9127
9146
|
return l;
|
|
9128
|
-
} else return typeof this.objs[
|
|
9147
|
+
} else return typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]);
|
|
9129
9148
|
return c;
|
|
9130
9149
|
}
|
|
9131
|
-
getLast(
|
|
9132
|
-
if (this.objs.hasOwnProperty(
|
|
9133
|
-
var l = this.objs[
|
|
9134
|
-
return this.interpolate(this.objs[
|
|
9135
|
-
} else return typeof this.objs[
|
|
9150
|
+
getLast(o, c) {
|
|
9151
|
+
if (this.objs.hasOwnProperty(o)) if (Array.isArray(this.objs[o])) {
|
|
9152
|
+
var l = this.objs[o].length;
|
|
9153
|
+
return this.interpolate(this.objs[o][l - 1]);
|
|
9154
|
+
} else return typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]);
|
|
9136
9155
|
return c;
|
|
9137
9156
|
}
|
|
9138
|
-
getFirst(
|
|
9139
|
-
return this.objs.hasOwnProperty(
|
|
9157
|
+
getFirst(o, c) {
|
|
9158
|
+
return this.objs.hasOwnProperty(o) ? Array.isArray(this.objs[o]) ? this.interpolate(this.objs[o][0]) : typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]) : c;
|
|
9140
9159
|
}
|
|
9141
|
-
getInt(
|
|
9142
|
-
let l = this.getLast(
|
|
9160
|
+
getInt(o, c) {
|
|
9161
|
+
let l = this.getLast(o);
|
|
9143
9162
|
return l ? parseInt(l, 10) : c;
|
|
9144
9163
|
}
|
|
9145
|
-
getFloat(
|
|
9146
|
-
let l = this.getLast(
|
|
9164
|
+
getFloat(o, c) {
|
|
9165
|
+
let l = this.getLast(o);
|
|
9147
9166
|
return l ? parseFloat(l) : c;
|
|
9148
9167
|
}
|
|
9149
|
-
getBoolean(
|
|
9150
|
-
function l(
|
|
9151
|
-
return !/^(false|0)$/i.test(
|
|
9168
|
+
getBoolean(o, c) {
|
|
9169
|
+
function l(g) {
|
|
9170
|
+
return !/^(false|0)$/i.test(g) && !!g;
|
|
9152
9171
|
}
|
|
9153
9172
|
s(l, "parseBool");
|
|
9154
|
-
let h = this.getLast(
|
|
9173
|
+
let h = this.getLast(o);
|
|
9155
9174
|
return h ? l(h) : c || false;
|
|
9156
9175
|
}
|
|
9157
|
-
set(
|
|
9158
|
-
this.objs[
|
|
9176
|
+
set(o, c) {
|
|
9177
|
+
this.objs[o] = c;
|
|
9159
9178
|
}
|
|
9160
|
-
interpolate(
|
|
9179
|
+
interpolate(o) {
|
|
9161
9180
|
let c = this;
|
|
9162
|
-
return
|
|
9181
|
+
return o.replace(/\\\\/g, "\\").replace(/\$\{([A-Za-z0-9\.\-\_]*)\}/g, function(l) {
|
|
9163
9182
|
return c.getLast(l.substring(2, l.length - 1));
|
|
9164
9183
|
});
|
|
9165
9184
|
}
|
|
9166
9185
|
getKeys() {
|
|
9167
|
-
let
|
|
9168
|
-
for (let c in this.objs)
|
|
9169
|
-
return
|
|
9186
|
+
let o = [];
|
|
9187
|
+
for (let c in this.objs) o.push(c);
|
|
9188
|
+
return o;
|
|
9170
9189
|
}
|
|
9171
|
-
getMatchingKeys(
|
|
9190
|
+
getMatchingKeys(o) {
|
|
9172
9191
|
let c = [];
|
|
9173
|
-
for (let l in this.objs) l.search(
|
|
9192
|
+
for (let l in this.objs) l.search(o) !== -1 && c.push(l);
|
|
9174
9193
|
return c;
|
|
9175
9194
|
}
|
|
9176
9195
|
reset() {
|
|
@@ -9178,69 +9197,70 @@ function ra() {
|
|
|
9178
9197
|
}
|
|
9179
9198
|
}
|
|
9180
9199
|
He.PropertiesFile = r;
|
|
9181
|
-
let n = s(function(...
|
|
9200
|
+
let n = s(function(...o) {
|
|
9182
9201
|
let c = new r();
|
|
9183
|
-
return c.of.apply(c,
|
|
9202
|
+
return c.of.apply(c, o), c;
|
|
9184
9203
|
}, "of2");
|
|
9185
9204
|
return He.of = n, He;
|
|
9186
9205
|
}
|
|
9187
|
-
s(
|
|
9188
|
-
var
|
|
9189
|
-
const
|
|
9206
|
+
s(ua, "requireDistNode");
|
|
9207
|
+
var la = ua(), fa = kr(la);
|
|
9208
|
+
const hr = { root: "teamcity.build.workingDir", branch: "teamcity.build.branch" }, Fn = s((e) => {
|
|
9190
9209
|
try {
|
|
9191
|
-
return
|
|
9210
|
+
return fa.of(e);
|
|
9192
9211
|
} catch {
|
|
9193
9212
|
return;
|
|
9194
9213
|
}
|
|
9195
|
-
}, "safeReadProperties"),
|
|
9196
|
-
const r = e.TEAMCITY_BUILD_PROPERTIES_FILE ?
|
|
9197
|
-
return Object.fromEntries(Object.keys(
|
|
9214
|
+
}, "safeReadProperties"), ha = s(({ env: e, cwd: t }) => {
|
|
9215
|
+
const r = e.TEAMCITY_BUILD_PROPERTIES_FILE ? Fn(e.TEAMCITY_BUILD_PROPERTIES_FILE) : void 0, n = r ? r.get("teamcity.configuration.properties.file") : void 0, i = n && Fn(n);
|
|
9216
|
+
return Object.fromEntries(Object.keys(hr).map((o) => [o, (r ? r.get(hr[o]) : void 0) || (i ? i.get(hr[o]) : void 0) || (o === "branch" ? fr({ env: e, cwd: t }) : void 0)]));
|
|
9198
9217
|
}, "getProperties");
|
|
9199
|
-
var
|
|
9218
|
+
var da = { detect({ env: e }) {
|
|
9200
9219
|
return !!e.TEAMCITY_VERSION;
|
|
9201
9220
|
}, configuration({ env: e, cwd: t }) {
|
|
9202
|
-
return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...
|
|
9203
|
-
} },
|
|
9221
|
+
return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...ha({ env: e, cwd: t }) };
|
|
9222
|
+
} }, pa = { detect({ env: e }) {
|
|
9204
9223
|
return !!e.TRAVIS;
|
|
9205
9224
|
}, configuration({ env: e }) {
|
|
9206
9225
|
const t = e.TRAVIS_PULL_REQUEST === "false" ? void 0 : e.TRAVIS_PULL_REQUEST, r = !!t;
|
|
9207
9226
|
return { name: "Travis CI", service: "travis", commit: e.TRAVIS_COMMIT, tag: e.TRAVIS_TAG, build: e.TRAVIS_BUILD_NUMBER, buildUrl: e.TRAVIS_BUILD_WEB_URL, branch: e.TRAVIS_BRANCH, job: e.TRAVIS_JOB_NUMBER, jobUrl: e.TRAVIS_JOB_WEB_URL, pr: t, isPr: r, prBranch: e.TRAVIS_PULL_REQUEST_BRANCH, slug: e.TRAVIS_REPO_SLUG, root: e.TRAVIS_BUILD_DIR };
|
|
9208
|
-
} },
|
|
9227
|
+
} }, ma = { detect({ env: e }) {
|
|
9209
9228
|
return !!e.VELA;
|
|
9210
9229
|
}, configuration({ env: e }) {
|
|
9211
9230
|
const t = e.VELA_BUILD_EVENT === "pull_request";
|
|
9212
9231
|
return { name: "Vela", service: "vela", branch: t ? e.VELA_PULL_REQUEST_TARGET : e.VELA_BUILD_BRANCH, commit: e.VELA_BUILD_COMMIT, tag: e.VELA_BUILD_TAG, build: e.VELA_BUILD_NUMBER, buildUrl: e.VELA_BUILD_LINK, job: void 0, jobUrl: void 0, isPr: t, pr: e.VELA_BUILD_PULL_REQUEST, prBranch: e.VELA_PULL_REQUEST_SOURCE, slug: e.VELA_REPO_FULL_NAME, root: e.VELA_BUILD_WORKSPACE };
|
|
9213
|
-
} },
|
|
9232
|
+
} }, Ea = { detect({ env: e }) {
|
|
9214
9233
|
return !!e.VERCEL || !!e.NOW_GITHUB_DEPLOYMENT;
|
|
9215
9234
|
}, configuration({ env: e }) {
|
|
9216
9235
|
const t = "Vercel", r = "vercel";
|
|
9217
9236
|
return e.VERCEL ? { name: t, service: r, commit: e.VERCEL_GIT_COMMIT_SHA, branch: e.VERCEL_GIT_COMMIT_REF, slug: `${e.VERCEL_GIT_REPO_OWNER}/${e.VERCEL_GIT_REPO_SLUG}` } : { name: t, service: r, commit: e.NOW_GITHUB_COMMIT_SHA, branch: e.NOW_GITHUB_COMMIT_REF, slug: `${e.NOW_GITHUB_ORG}/${e.NOW_GITHUB_REPO}` };
|
|
9218
|
-
} },
|
|
9237
|
+
} }, _a = { detect({ env: e }) {
|
|
9219
9238
|
return !!e.WERCKER_MAIN_PIPELINE_STARTED;
|
|
9220
9239
|
}, configuration({ env: e }) {
|
|
9221
9240
|
return { name: "Wercker", service: "wercker", commit: e.WERCKER_GIT_COMMIT, build: e.WERCKER_MAIN_PIPELINE_STARTED, buildUrl: e.WERCKER_RUN_URL, branch: e.WERCKER_GIT_BRANCH, slug: `${e.WERCKER_GIT_OWNER}/${e.WERCKER_GIT_REPOSITORY}`, root: e.WERCKER_ROOT };
|
|
9222
|
-
} },
|
|
9241
|
+
} }, ga = { detect({ env: e }) {
|
|
9223
9242
|
return e.CI && e.CI === "woodpecker";
|
|
9224
9243
|
}, configuration({ env: e }) {
|
|
9225
9244
|
const t = e.CI_PIPELINE_EVENT === "pull_request";
|
|
9226
9245
|
return { name: "Woodpecker CI", service: "woodpecker", commit: e.CI_COMMIT_SHA, tag: e.CI_COMMIT_TAG, build: e.CI_PIPELINE_NUMBER, buildUrl: e.CI_PIPELINE_URL, branch: t ? e.CI_COMMIT_TARGET_BRANCH : e.CI_COMMIT_BRANCH, job: e.CI_STEP_NUMBER, jobUrl: e.CI_STEP_URL, pr: e.CI_COMMIT_PULL_REQUEST, isPr: t, prBranch: t ? e.CI_COMMIT_SOURCE_BRANCH : void 0, slug: `${e.CI_REPO_OWNER}/${e.CI_REPO_NAME}`, root: e.CI_WORKSPACE };
|
|
9227
|
-
} },
|
|
9246
|
+
} }, Ia = { detect({ env: e }) {
|
|
9228
9247
|
return !!e.JB_SPACE_EXECUTION_NUMBER;
|
|
9229
9248
|
}, configuration({ env: e }) {
|
|
9230
9249
|
const t = e.JB_SPACE_PROJECT_KEY, r = e.JB_SPACE_GIT_REPOSITORY_NAME;
|
|
9231
9250
|
return { name: "JetBrains Space", service: "jetbrainsSpace", commit: e.JB_SPACE_GIT_REVISION, build: e.JB_SPACE_EXECUTION_NUMBER, branch: ot(e.JB_SPACE_GIT_BRANCH), slug: t && r ? `${t.toLowerCase()}/${r}` : void 0 };
|
|
9232
9251
|
} };
|
|
9233
|
-
const
|
|
9234
|
-
var
|
|
9235
|
-
for (const r of Object.keys(
|
|
9236
|
-
return { isCi: !!e.CI, ...
|
|
9237
|
-
}, "
|
|
9238
|
-
function
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
}
|
|
9242
|
-
|
|
9243
|
-
|
|
9252
|
+
const dr = { appveyor: No, azurePipelines: Do, bamboo: Mo, bitbucket: xo, bitrise: Go, buddy: $o, buildkite: Fs, circleci: js, cirrus: qs, cloudflarePages: Ws, codebuild: Ks, codefresh: Vs, codeship: Ys, drone: zs, github: Zs, gitlab: ea, jenkins: ta, netlify: ra, puppet: na, sail: ia, screwdriver: oa, scrutinizer: sa, semaphore: aa, shippable: ca, teamcity: da, travis: pa, vela: ma, vercel: Ea, wercker: _a, woodpecker: ga, jetbrainsSpace: Ia };
|
|
9253
|
+
var pr = s(({ env: e = process.env, cwd: t = process.cwd() } = {}) => {
|
|
9254
|
+
for (const r of Object.keys(dr)) if (dr[r].detect({ env: e, cwd: t })) return { isCi: true, ...dr[r].configuration({ env: e, cwd: t }) };
|
|
9255
|
+
return { isCi: !!e.CI, ...Js.configuration({ env: e, cwd: t }) };
|
|
9256
|
+
}, "envCiModule");
|
|
9257
|
+
const Sa = typeof pr == "function" ? pr : pr.default;
|
|
9258
|
+
function Ra() {
|
|
9259
|
+
const e = Sa();
|
|
9260
|
+
return { branch: e.branch, commit: { message: ya(), sha: e.commit }, isCI: e.isCi, pr: Ta() };
|
|
9261
|
+
}
|
|
9262
|
+
s(Ra, "getGitInfo");
|
|
9263
|
+
function Ta() {
|
|
9244
9264
|
try {
|
|
9245
9265
|
const e = process.env.GITHUB_EVENT_PATH;
|
|
9246
9266
|
if (e) {
|
|
@@ -9252,30 +9272,30 @@ function ma() {
|
|
|
9252
9272
|
return;
|
|
9253
9273
|
}
|
|
9254
9274
|
}
|
|
9255
|
-
s(
|
|
9256
|
-
function
|
|
9275
|
+
s(Ta, "getPRInfo");
|
|
9276
|
+
function ya() {
|
|
9257
9277
|
try {
|
|
9258
9278
|
return require$$0$2.execSync("git log -1 --pretty=%B", { encoding: "utf-8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
9259
9279
|
} catch {
|
|
9260
9280
|
return;
|
|
9261
9281
|
}
|
|
9262
9282
|
}
|
|
9263
|
-
s(
|
|
9264
|
-
function
|
|
9265
|
-
return { hostname:
|
|
9283
|
+
s(ya, "getLastCommitMessage");
|
|
9284
|
+
function wa() {
|
|
9285
|
+
return { hostname: wr.hostname(), platform: wr.platform() };
|
|
9266
9286
|
}
|
|
9267
|
-
s(
|
|
9268
|
-
const
|
|
9269
|
-
var
|
|
9270
|
-
function o
|
|
9271
|
-
return
|
|
9272
|
-
c(
|
|
9287
|
+
s(wa, "getMachineInfo");
|
|
9288
|
+
const Aa = new Error("request for lock canceled");
|
|
9289
|
+
var va = s(function(e, t, r, n) {
|
|
9290
|
+
function i(o) {
|
|
9291
|
+
return o instanceof r ? o : new r(function(c) {
|
|
9292
|
+
c(o);
|
|
9273
9293
|
});
|
|
9274
9294
|
}
|
|
9275
|
-
return s(
|
|
9295
|
+
return s(i, "adopt"), new (r || (r = Promise))(function(o, c) {
|
|
9276
9296
|
function l(m) {
|
|
9277
9297
|
try {
|
|
9278
|
-
|
|
9298
|
+
g(n.next(m));
|
|
9279
9299
|
} catch (A) {
|
|
9280
9300
|
c(A);
|
|
9281
9301
|
}
|
|
@@ -9283,37 +9303,37 @@ var Ia = s(function(e, t, r, n) {
|
|
|
9283
9303
|
s(l, "fulfilled");
|
|
9284
9304
|
function h(m) {
|
|
9285
9305
|
try {
|
|
9286
|
-
|
|
9306
|
+
g(n.throw(m));
|
|
9287
9307
|
} catch (A) {
|
|
9288
9308
|
c(A);
|
|
9289
9309
|
}
|
|
9290
9310
|
}
|
|
9291
9311
|
s(h, "rejected");
|
|
9292
|
-
function
|
|
9293
|
-
m.done ?
|
|
9312
|
+
function g(m) {
|
|
9313
|
+
m.done ? o(m.value) : i(m.value).then(l, h);
|
|
9294
9314
|
}
|
|
9295
|
-
s(
|
|
9315
|
+
s(g, "step"), g((n = n.apply(e, t || [])).next());
|
|
9296
9316
|
});
|
|
9297
9317
|
}, "__awaiter$2");
|
|
9298
|
-
class
|
|
9318
|
+
class ba {
|
|
9299
9319
|
static {
|
|
9300
9320
|
s(this, "Semaphore");
|
|
9301
9321
|
}
|
|
9302
|
-
constructor(t, r =
|
|
9322
|
+
constructor(t, r = Aa) {
|
|
9303
9323
|
this._value = t, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
|
|
9304
9324
|
}
|
|
9305
9325
|
acquire(t = 1, r = 0) {
|
|
9306
9326
|
if (t <= 0) throw new Error(`invalid weight ${t}: must be positive`);
|
|
9307
|
-
return new Promise((n,
|
|
9308
|
-
const
|
|
9309
|
-
c === -1 && t <= this._value ? this._dispatchItem(
|
|
9327
|
+
return new Promise((n, i) => {
|
|
9328
|
+
const o = { resolve: n, reject: i, weight: t, priority: r }, c = jn(this._queue, (l) => r <= l.priority);
|
|
9329
|
+
c === -1 && t <= this._value ? this._dispatchItem(o) : this._queue.splice(c + 1, 0, o);
|
|
9310
9330
|
});
|
|
9311
9331
|
}
|
|
9312
9332
|
runExclusive(t) {
|
|
9313
|
-
return
|
|
9314
|
-
const [
|
|
9333
|
+
return va(this, arguments, void 0, function* (r, n = 1, i = 0) {
|
|
9334
|
+
const [o, c] = yield this.acquire(n, i);
|
|
9315
9335
|
try {
|
|
9316
|
-
return yield r(
|
|
9336
|
+
return yield r(o);
|
|
9317
9337
|
} finally {
|
|
9318
9338
|
c();
|
|
9319
9339
|
}
|
|
@@ -9322,7 +9342,7 @@ class Sa {
|
|
|
9322
9342
|
waitForUnlock(t = 1, r = 0) {
|
|
9323
9343
|
if (t <= 0) throw new Error(`invalid weight ${t}: must be positive`);
|
|
9324
9344
|
return this._couldLockImmediately(t, r) ? Promise.resolve() : new Promise((n) => {
|
|
9325
|
-
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []),
|
|
9345
|
+
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Ca(this._weightedWaiters[t - 1], { resolve: n, priority: r });
|
|
9326
9346
|
});
|
|
9327
9347
|
}
|
|
9328
9348
|
isLocked() {
|
|
@@ -9364,8 +9384,8 @@ class Sa {
|
|
|
9364
9384
|
for (let r = this._value; r > 0; r--) {
|
|
9365
9385
|
const n = this._weightedWaiters[r - 1];
|
|
9366
9386
|
if (!n) continue;
|
|
9367
|
-
const
|
|
9368
|
-
(
|
|
9387
|
+
const i = n.findIndex((o) => o.priority <= t);
|
|
9388
|
+
(i === -1 ? n : n.splice(0, i)).forEach(((o) => o.resolve()));
|
|
9369
9389
|
}
|
|
9370
9390
|
}
|
|
9371
9391
|
}
|
|
@@ -9373,26 +9393,26 @@ class Sa {
|
|
|
9373
9393
|
return (this._queue.length === 0 || this._queue[0].priority < r) && t <= this._value;
|
|
9374
9394
|
}
|
|
9375
9395
|
}
|
|
9376
|
-
function
|
|
9377
|
-
const r =
|
|
9396
|
+
function Ca(e, t) {
|
|
9397
|
+
const r = jn(e, (n) => t.priority <= n.priority);
|
|
9378
9398
|
e.splice(r + 1, 0, t);
|
|
9379
9399
|
}
|
|
9380
|
-
s(
|
|
9381
|
-
function
|
|
9400
|
+
s(Ca, "insertSorted");
|
|
9401
|
+
function jn(e, t) {
|
|
9382
9402
|
for (let r = e.length - 1; r >= 0; r--) if (t(e[r])) return r;
|
|
9383
9403
|
return -1;
|
|
9384
9404
|
}
|
|
9385
|
-
s(
|
|
9386
|
-
var
|
|
9387
|
-
function o
|
|
9388
|
-
return
|
|
9389
|
-
c(
|
|
9405
|
+
s(jn, "findIndexFromEnd");
|
|
9406
|
+
var Ua = s(function(e, t, r, n) {
|
|
9407
|
+
function i(o) {
|
|
9408
|
+
return o instanceof r ? o : new r(function(c) {
|
|
9409
|
+
c(o);
|
|
9390
9410
|
});
|
|
9391
9411
|
}
|
|
9392
|
-
return s(
|
|
9412
|
+
return s(i, "adopt"), new (r || (r = Promise))(function(o, c) {
|
|
9393
9413
|
function l(m) {
|
|
9394
9414
|
try {
|
|
9395
|
-
|
|
9415
|
+
g(n.next(m));
|
|
9396
9416
|
} catch (A) {
|
|
9397
9417
|
c(A);
|
|
9398
9418
|
}
|
|
@@ -9400,27 +9420,27 @@ var Ta = s(function(e, t, r, n) {
|
|
|
9400
9420
|
s(l, "fulfilled");
|
|
9401
9421
|
function h(m) {
|
|
9402
9422
|
try {
|
|
9403
|
-
|
|
9423
|
+
g(n.throw(m));
|
|
9404
9424
|
} catch (A) {
|
|
9405
9425
|
c(A);
|
|
9406
9426
|
}
|
|
9407
9427
|
}
|
|
9408
9428
|
s(h, "rejected");
|
|
9409
|
-
function
|
|
9410
|
-
m.done ?
|
|
9429
|
+
function g(m) {
|
|
9430
|
+
m.done ? o(m.value) : i(m.value).then(l, h);
|
|
9411
9431
|
}
|
|
9412
|
-
s(
|
|
9432
|
+
s(g, "step"), g((n = n.apply(e, t || [])).next());
|
|
9413
9433
|
});
|
|
9414
9434
|
}, "__awaiter$1");
|
|
9415
|
-
class
|
|
9435
|
+
class Ba {
|
|
9416
9436
|
static {
|
|
9417
9437
|
s(this, "Mutex");
|
|
9418
9438
|
}
|
|
9419
9439
|
constructor(t) {
|
|
9420
|
-
this._semaphore = new
|
|
9440
|
+
this._semaphore = new ba(1, t);
|
|
9421
9441
|
}
|
|
9422
9442
|
acquire() {
|
|
9423
|
-
return
|
|
9443
|
+
return Ua(this, arguments, void 0, function* (t = 0) {
|
|
9424
9444
|
const [, r] = yield this._semaphore.acquire(1, t);
|
|
9425
9445
|
return r;
|
|
9426
9446
|
});
|
|
@@ -9441,47 +9461,47 @@ class wa {
|
|
|
9441
9461
|
return this._semaphore.cancel();
|
|
9442
9462
|
}
|
|
9443
9463
|
}
|
|
9444
|
-
function
|
|
9464
|
+
function qn(e, t) {
|
|
9445
9465
|
const r = e.length;
|
|
9446
|
-
let n = 0,
|
|
9447
|
-
const
|
|
9448
|
-
return t({ completed: n, errors:
|
|
9449
|
-
n++, t({ completed: n, errors:
|
|
9466
|
+
let n = 0, i = 0;
|
|
9467
|
+
const o = new Ba();
|
|
9468
|
+
return t({ completed: n, errors: i, total: r }), e.map((c) => c.then(async (l) => (await o.runExclusive(() => {
|
|
9469
|
+
n++, t({ completed: n, errors: i, total: r });
|
|
9450
9470
|
}), l)).catch(async (l) => {
|
|
9451
|
-
throw await
|
|
9452
|
-
n++,
|
|
9471
|
+
throw await o.runExclusive(() => {
|
|
9472
|
+
n++, i++, t({ completed: n, errors: i, total: r });
|
|
9453
9473
|
}), l;
|
|
9454
9474
|
}));
|
|
9455
9475
|
}
|
|
9456
|
-
s(
|
|
9457
|
-
function
|
|
9458
|
-
return e.steps.map((r) =>
|
|
9476
|
+
s(qn, "trackPromiseProgress");
|
|
9477
|
+
function Oa({ result: e, sensitiveValues: t }) {
|
|
9478
|
+
return e.steps.map((r) => Wn({ sensitiveValues: t, step: r }));
|
|
9459
9479
|
}
|
|
9460
|
-
s(
|
|
9461
|
-
function
|
|
9462
|
-
const r = s((n) => n && e?.length ?
|
|
9463
|
-
return { category: t.category, duration: t.duration, error: t.error ? { message: r(t.error.message) || "Unknown error", stack: r(t.error.stack) } : void 0, location: t.location ? { column: t.location.column, file: t.location.file, line: t.location.line } : void 0, startedAt: new Date(t.startTime), steps: t.steps && t.steps.length > 0 ? t.steps.map((n) =>
|
|
9480
|
+
s(Oa, "extractSteps");
|
|
9481
|
+
function Wn({ sensitiveValues: e, step: t }) {
|
|
9482
|
+
const r = s((n) => n && e?.length ? se({ sensitiveValues: e, str: n }) : n, "scrub");
|
|
9483
|
+
return { category: t.category, duration: t.duration, error: t.error ? { message: r(t.error.message) || "Unknown error", stack: r(t.error.stack) } : void 0, location: t.location ? { column: t.location.column, file: t.location.file, line: t.location.line } : void 0, startedAt: new Date(t.startTime), steps: t.steps && t.steps.length > 0 ? t.steps.map((n) => Wn({ sensitiveValues: e, step: n })) : void 0, title: r(t.title) ?? t.title };
|
|
9464
9484
|
}
|
|
9465
|
-
s(
|
|
9466
|
-
async function
|
|
9485
|
+
s(Wn, "extractStep");
|
|
9486
|
+
async function La({ fileData: e, maxRetries: t = 3, uploadUrl: r }) {
|
|
9467
9487
|
await pRetry(async () => {
|
|
9468
9488
|
const n = await fetch(r, { body: e, method: "PUT" });
|
|
9469
9489
|
if (!n.ok) throw n.status >= 400 && n.status < 500 ? new AbortError(`Upload failed with status ${n.status}: ${n.statusText}`) : new Error(`Upload failed with status ${n.status}: ${n.statusText}`);
|
|
9470
9490
|
}, { minTimeout: 2e3, randomize: true, retries: t });
|
|
9471
9491
|
}
|
|
9472
|
-
s(
|
|
9473
|
-
const
|
|
9492
|
+
s(La, "uploadWithRetry");
|
|
9493
|
+
const Pa = process.env.STABLY_WS_URL || "wss://api.stably.ai/reporter", Kn = 120 * 1e3, Na = s(({ notificationConfigs: e, suite: t }) => {
|
|
9474
9494
|
if (!e || e.length === 0) return;
|
|
9475
|
-
const r = new Set(t.allTests().map((
|
|
9495
|
+
const r = new Set(t.allTests().map((i) => i.parent.project()?.name).filter(Boolean)), n = e.filter((i) => r.has(i.projectName));
|
|
9476
9496
|
return n.length > 0 ? n : void 0;
|
|
9477
|
-
}, "filterNotificationConfigsByRunningProjects"),
|
|
9497
|
+
}, "filterNotificationConfigsByRunningProjects"), Da = s((e) => e ? { configFile: e.configFile, forbidOnly: e.forbidOnly, fullyParallel: e.fullyParallel, globalSetup: e.globalSetup, globalTeardown: e.globalTeardown, globalTimeout: e.globalTimeout, grep: e.grep?.toString(), grepInvert: e.grepInvert?.toString(), maxFailures: e.maxFailures, metadata: e.metadata, preserveOutput: e.preserveOutput, quiet: e.quiet, reporter: e.reporter, reportSlowTests: e.reportSlowTests, rootDir: e.rootDir, shard: e.shard, updateSnapshots: e.updateSnapshots, version: e.version, webServer: e.webServer, workers: e.workers } : void 0, "extractConfigInfo"), Ma = s(({ absolutePath: e, rootDir: t }) => {
|
|
9478
9498
|
if (t && e.startsWith(t)) {
|
|
9479
9499
|
const r = e.slice(t.length);
|
|
9480
9500
|
return r.startsWith("/") ? r.slice(1) : r;
|
|
9481
9501
|
}
|
|
9482
9502
|
return e;
|
|
9483
9503
|
}, "makePathRelative");
|
|
9484
|
-
class
|
|
9504
|
+
class Vn {
|
|
9485
9505
|
static {
|
|
9486
9506
|
s(this, "StablyReporter");
|
|
9487
9507
|
}
|
|
@@ -9506,16 +9526,16 @@ class jn {
|
|
|
9506
9526
|
if (!r) throw new Error("STABLY_API_KEY is required. Provide it via options or environment variable.");
|
|
9507
9527
|
if (!n) throw new Error("STABLY_PROJECT_ID is required. Provide it via options or environment variable.");
|
|
9508
9528
|
if (this.notificationConfigs = t?.notificationConfigs, t?.sensitiveValues?.length) {
|
|
9509
|
-
const
|
|
9510
|
-
this.sensitiveValues = [...
|
|
9529
|
+
const i = ln(t.sensitiveValues);
|
|
9530
|
+
this.sensitiveValues = [...i].sort((o, c) => c.length - o.length);
|
|
9511
9531
|
}
|
|
9512
|
-
this.wsClient = new
|
|
9532
|
+
this.wsClient = new Po({ apiKey: r, maxBufferSize: 1e3, maxReconnectAttempts: 3, onError: s((i) => this.handleWebSocketError(i), "onError"), onMessage: s((i) => this.handleWebSocketMessage(i), "onMessage"), projectId: n, reconnectDelay: 2e3, url: Pa });
|
|
9513
9533
|
}
|
|
9514
9534
|
onBegin(t, r) {
|
|
9515
9535
|
if (this.isListMode = process.argv.includes("--list"), this.isListMode) return;
|
|
9516
9536
|
r.allTests().length === 0 && process.exit(1), this.config = t, this.testSuiteRunId = this.getSuiteRunId(t), this.rootDir = t.rootDir, this.suiteData = this.extractSuiteInfo(t, r);
|
|
9517
|
-
const
|
|
9518
|
-
this.filteredNotificationConfigs =
|
|
9537
|
+
const i = Na({ notificationConfigs: this.notificationConfigs, suite: r });
|
|
9538
|
+
this.filteredNotificationConfigs = i, this.pendingOperations.push(this.wsClient.sendEvent({ payload: { ...this.suiteData, notificationRequest: i ? { notificationConfigs: i, totalShards: this.config?.shard?.total } : void 0, status: "running" }, type: "suite_start" }));
|
|
9519
9539
|
}
|
|
9520
9540
|
getSuiteRunId(t) {
|
|
9521
9541
|
return getCiRunKey() ?? t.metadata?.testSuiteRunId ?? ut();
|
|
@@ -9529,16 +9549,16 @@ class jn {
|
|
|
9529
9549
|
if (this.isListMode) return;
|
|
9530
9550
|
const n = this.extractTestCaseInfo(t, r);
|
|
9531
9551
|
this.testCases.push(n), this.testStepsMap.set(n.id, r);
|
|
9532
|
-
const
|
|
9533
|
-
const l = await this.extractAttachmentMetadata({ attachments:
|
|
9534
|
-
let h,
|
|
9535
|
-
l.length > 0 && (h = `${n.id}-${n.attemptNumber}`,
|
|
9552
|
+
const i = Oa({ result: r, sensitiveValues: this.sensitiveValues }), o = [...r.attachments, { contentType: "text/plain", name: "source-code", path: t.location.file }], c = (async () => {
|
|
9553
|
+
const l = await this.extractAttachmentMetadata({ attachments: o, attemptNumber: n.attemptNumber, testId: n.id });
|
|
9554
|
+
let h, g;
|
|
9555
|
+
l.length > 0 && (h = `${n.id}-${n.attemptNumber}`, g = new Promise((m) => {
|
|
9536
9556
|
this.pendingUploadUrlRequests.set(h, m);
|
|
9537
|
-
}), this.pendingOperations.push(
|
|
9557
|
+
}), this.pendingOperations.push(g));
|
|
9538
9558
|
try {
|
|
9539
|
-
await this.wsClient.sendEvent({ payload: { ...n, attachments: l, steps:
|
|
9559
|
+
await this.wsClient.sendEvent({ payload: { ...n, attachments: l, steps: i }, type: "test_end" });
|
|
9540
9560
|
} catch (m) {
|
|
9541
|
-
if (h &&
|
|
9561
|
+
if (h && g) {
|
|
9542
9562
|
const A = this.pendingUploadUrlRequests.get(h);
|
|
9543
9563
|
A && (A(), this.pendingUploadUrlRequests.delete(h));
|
|
9544
9564
|
}
|
|
@@ -9552,60 +9572,77 @@ class jn {
|
|
|
9552
9572
|
this.pendingOperations.push(this.wsClient.sendEvent({ payload: { duration: t.duration, notificationRequest: this.filteredNotificationConfigs ? { notificationConfigs: this.filteredNotificationConfigs, totalShards: this.config?.shard?.total } : void 0, status: t.status === "timedout" ? "timedOut" : t.status, suiteId: this.testSuiteRunId }, type: "suite_end" })), Ie$1("[Stably reporter] Waiting for pending tasks to finish...");
|
|
9553
9573
|
const r = Y$1();
|
|
9554
9574
|
r.start("Waiting for tasks to finish...");
|
|
9555
|
-
const n = Promise.allSettled(
|
|
9556
|
-
r.message(`${h}/${m} tasks finished${
|
|
9557
|
-
})),
|
|
9575
|
+
const n = Promise.allSettled(qn(this.pendingOperations, ({ completed: h, errors: g, total: m }) => {
|
|
9576
|
+
r.message(`${h}/${m} tasks finished${g > 0 ? `, ${g} errors` : ""}`);
|
|
9577
|
+
})), i = new Promise((h, g) => {
|
|
9558
9578
|
setTimeout(() => {
|
|
9559
|
-
|
|
9560
|
-
},
|
|
9579
|
+
g(new Error(`Tasks timeout: Some operations did not complete within ${Kn / 1e3}s`));
|
|
9580
|
+
}, Kn);
|
|
9561
9581
|
});
|
|
9562
9582
|
try {
|
|
9563
|
-
await Promise.race([n,
|
|
9583
|
+
await Promise.race([n, i]);
|
|
9564
9584
|
} catch (h) {
|
|
9565
|
-
const
|
|
9566
|
-
console.warn(`[StablyAI reporter] Tasks timeout reached. Some operations may still be pending: ${
|
|
9585
|
+
const g = h instanceof Error ? h.message : String(h);
|
|
9586
|
+
console.warn(`[StablyAI reporter] Tasks timeout reached. Some operations may still be pending: ${g}`);
|
|
9567
9587
|
}
|
|
9568
9588
|
this.wsClient.flushBuffer(), r.stop("All tasks finished");
|
|
9569
|
-
const
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
})),
|
|
9589
|
+
const o = Y$1();
|
|
9590
|
+
o.start("Waiting for file uploads to finish..."), await Promise.allSettled(qn(this.pendingUploads, ({ completed: h, errors: g, total: m }) => {
|
|
9591
|
+
o.message(`${h}/${m} uploads finished${g > 0 ? `, ${g} errors` : ""}`);
|
|
9592
|
+
})), o.stop("All file uploads finished"), this.wsClient.close();
|
|
9573
9593
|
const c = this.createdSuiteRun?.name || this.suiteData?.title || "Test Suite", l = t.status === "failed" || t.status === "timedout";
|
|
9574
|
-
Se$1(
|
|
9575
|
-
\u{1F4CA} View results: ${
|
|
9594
|
+
Se$1(Ce.cyan(`\u2728 Suite "${Ce.bold(c)}" run complete!${this.createdSuiteRun ? `
|
|
9595
|
+
\u{1F4CA} View results: ${Ce.bold(Ce.underline(this.createdSuiteRun.url))}` : ""}${l ? `
|
|
9576
9596
|
|
|
9577
9597
|
\u{1F527} To auto-heal failed tests, run:
|
|
9578
|
-
${
|
|
9598
|
+
${Ce.bold(Ce.underline(`stably fix ${this.testSuiteRunId}`))}` : ""}`));
|
|
9579
9599
|
}
|
|
9580
9600
|
scrubSensitiveString(t) {
|
|
9581
|
-
return !t || !this.sensitiveValues?.length ? t :
|
|
9601
|
+
return !t || !this.sensitiveValues?.length ? t : se({ sensitiveValues: this.sensitiveValues, str: t });
|
|
9582
9602
|
}
|
|
9583
9603
|
extractSuiteInfo(t, r) {
|
|
9584
|
-
const n =
|
|
9585
|
-
return { id: ut(), projectSettings:
|
|
9604
|
+
const n = Ra(), i = wa(), o = /* @__PURE__ */ new Date();
|
|
9605
|
+
return { id: ut(), projectSettings: Da(t), startedAt: o, suiteId: this.testSuiteRunId, title: r.title || "Playwright Test Suite", createdAt: o, git: { branch: n.branch, commit: { message: n.commit.message, sha: n.commit.sha }, pr: n.pr }, isCI: n.isCI, shards: t.shard?.total ?? 1, workers: t.workers, machineInfo: i, updatedAt: o };
|
|
9586
9606
|
}
|
|
9587
9607
|
extractTestCaseInfo(t, r) {
|
|
9588
|
-
const n =
|
|
9589
|
-
return { fullTitle: this.scrubSensitiveString(t.titlePath().join(" \u203A ")) ?? "", id: ut(), location: `${n}:${t.location.line}:${t.location.column}`, suiteId: this.testSuiteRunId, testIdentifier: t.id, title: this.scrubSensitiveString(t.title) ?? t.title, browserName: c, duration: r.duration, expectedStatus: t.expectedStatus, finishedAt: r.startTime && r.duration ? new Date(r.startTime.getTime() + r.duration) : void 0, outcome: t.outcome(), projectName:
|
|
9608
|
+
const n = Ma({ absolutePath: t.location.file, rootDir: this.rootDir }), i = t.parent.project(), o = i?.name, c = i?.use?.defaultBrowserType;
|
|
9609
|
+
return { fullTitle: this.scrubSensitiveString(t.titlePath().join(" \u203A ")) ?? "", id: ut(), location: `${n}:${t.location.line}:${t.location.column}`, suiteId: this.testSuiteRunId, testIdentifier: t.id, title: this.scrubSensitiveString(t.title) ?? t.title, browserName: c, duration: r.duration, expectedStatus: t.expectedStatus, finishedAt: r.startTime && r.duration ? new Date(r.startTime.getTime() + r.duration) : void 0, outcome: t.outcome(), projectName: o, startedAt: new Date(r.startTime), status: r.status, attemptNumber: r.retry + 1, maxRetries: t.retries, retryCount: r.retry, errorMessage: this.scrubSensitiveString(r.error?.message), errorStack: this.scrubSensitiveString(r.error?.stack), errorType: r.error?.value, annotations: t.annotations.length > 0 ? t.annotations : void 0, tags: t.tags.length > 0 ? t.tags : void 0 };
|
|
9590
9610
|
}
|
|
9591
9611
|
async extractAttachmentMetadata({ attachments: t, attemptNumber: r, testId: n }) {
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9612
|
+
return (await Promise.all(t.map((o) => this.processAttachment({ attachment: o, attemptNumber: r, testId: n })))).filter((o) => o !== void 0);
|
|
9613
|
+
}
|
|
9614
|
+
async processAttachment({ attachment: t, attemptNumber: r, testId: n }) {
|
|
9615
|
+
let i;
|
|
9616
|
+
try {
|
|
9617
|
+
i = t.name === "trace" && t.path && this.sensitiveValues && this.sensitiveValues.length > 0 ? ze.openSync(t.path, "r") : void 0;
|
|
9618
|
+
const o = await this.getAttachmentFileData({ attachment: t, traceFd: i });
|
|
9619
|
+
if (!o) return;
|
|
9620
|
+
const c = ut(), l = `${n}-${r}-${c}`;
|
|
9621
|
+
return this.attachmentFiles.set(l, o), { artifactId: c, attemptNumber: r, contentType: t.contentType, name: t.name, sizeBytes: o.length, testId: n };
|
|
9622
|
+
} catch (o) {
|
|
9623
|
+
const c = o instanceof Error ? o.message : String(o);
|
|
9624
|
+
console.error(`[StablyAI reporter] Failed to read attachment ${t.name}: ${c}`);
|
|
9625
|
+
return;
|
|
9626
|
+
} finally {
|
|
9627
|
+
if (i !== void 0) try {
|
|
9628
|
+
ze.closeSync(i);
|
|
9629
|
+
} catch {
|
|
9630
|
+
}
|
|
9631
|
+
}
|
|
9632
|
+
}
|
|
9633
|
+
async getAttachmentFileData({ attachment: t, traceFd: r }) {
|
|
9634
|
+
if (!t.path && !t.body) return;
|
|
9635
|
+
if (t.name === "trace" && this.sensitiveValues && this.sensitiveValues.length > 0) {
|
|
9636
|
+
const i = t.path ? await this.scrubTraceFromFile({ attachmentPath: t.path, sensitiveValues: this.sensitiveValues, traceFd: r }) : t.body ? await zt({ sensitiveValues: this.sensitiveValues, traceBuffer: Buffer.from(t.body) }) : void 0;
|
|
9637
|
+
return i ? Buffer.from(i) : void 0;
|
|
9638
|
+
}
|
|
9639
|
+
return t.body ? Buffer.from(t.body) : t.path ? ze.readFileSync(t.path) : void 0;
|
|
9640
|
+
}
|
|
9641
|
+
async scrubTraceFromFile({ attachmentPath: t, sensitiveValues: r, traceFd: n }) {
|
|
9642
|
+
return n !== void 0 ? Lo({ sensitiveValues: r, traceFd: n, tracePath: t }) : Oo({ sensitiveValues: r, tracePath: t });
|
|
9606
9643
|
}
|
|
9607
9644
|
handleWebSocketError(t) {
|
|
9608
|
-
t.code ===
|
|
9645
|
+
t.code === mn.AUTHENTICATION_FAILED && (console.error(Ce.bold(Ce.red("[StablyAI reporter] Could not authenticate with the server. Either the API Key or Project ID is invalid. These can be provided via stablyReporter({ apiKey, projectId }) in playwright.config.ts or environment variables (STABLY_API_KEY, STABLY_PROJECT_ID). You can find your API key and Project ID at https://app.stably.ai/settings?tab=api-key"))), process.exit(1)), console.error("[StablyAI reporter] Could not connect to the server. Please check your internet connection and try again."), process.exit(1);
|
|
9609
9646
|
}
|
|
9610
9647
|
handleWebSocketMessage(t) {
|
|
9611
9648
|
if (t.type === "suite_created") this.createdSuiteRun = { id: t.id, name: t.name, url: t.url };
|
|
@@ -9613,28 +9650,28 @@ class jn {
|
|
|
9613
9650
|
const r = `${t.testId}-${t.attemptNumber}`, n = this.pendingUploadUrlRequests.get(r);
|
|
9614
9651
|
if (!n) return;
|
|
9615
9652
|
n(), this.pendingUploadUrlRequests.delete(r);
|
|
9616
|
-
const
|
|
9617
|
-
this.pendingUploads.push(
|
|
9653
|
+
const i = this.uploadAttachments(t.testId, t.attemptNumber, t.uploadUrls);
|
|
9654
|
+
this.pendingUploads.push(i);
|
|
9618
9655
|
}
|
|
9619
9656
|
}
|
|
9620
9657
|
async uploadAttachments(t, r, n) {
|
|
9621
|
-
const
|
|
9622
|
-
const h = `${t}-${r}-${
|
|
9623
|
-
if (
|
|
9624
|
-
await
|
|
9658
|
+
const i = n.map(async ({ artifactId: o, name: c, uploadUrl: l }) => {
|
|
9659
|
+
const h = `${t}-${r}-${o}`, g = this.attachmentFiles.get(h);
|
|
9660
|
+
if (g) try {
|
|
9661
|
+
await La({ fileData: g, maxRetries: 3, uploadUrl: l }), this.attachmentFiles.delete(h);
|
|
9625
9662
|
} catch (m) {
|
|
9626
9663
|
const A = m instanceof Error ? m.message : String(m);
|
|
9627
9664
|
console.error(`[StablyAI reporter] Failed to upload ${c} after retries: ${A}`);
|
|
9628
9665
|
}
|
|
9629
9666
|
});
|
|
9630
|
-
await Promise.allSettled(
|
|
9667
|
+
await Promise.allSettled(i);
|
|
9631
9668
|
}
|
|
9632
9669
|
}
|
|
9633
|
-
function
|
|
9670
|
+
function xa(e) {
|
|
9634
9671
|
return ["@stablyai/playwright-test/reporter", e];
|
|
9635
9672
|
}
|
|
9636
|
-
s(
|
|
9673
|
+
s(xa, "stablyReporter");
|
|
9637
9674
|
|
|
9638
|
-
exports.
|
|
9639
|
-
exports.
|
|
9640
|
-
//# sourceMappingURL=index-
|
|
9675
|
+
exports.Vn = Vn;
|
|
9676
|
+
exports.xa = xa;
|
|
9677
|
+
//# sourceMappingURL=index-Da3bGLIB.cjs.map
|