@wp-playground/storage 3.0.21 → 3.0.22
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/index.cjs +19 -19
- package/index.cjs.map +1 -1
- package/index.js +532 -536
- package/index.js.map +1 -1
- package/package.json +6 -6
package/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Semaphore as
|
|
2
|
-
import { Octokit as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { Semaphore as ir, normalizePath as se, joinPaths as Kr } from "@php-wasm/util";
|
|
2
|
+
import { Octokit as Zr } from "octokit";
|
|
3
|
+
import Qr from "crc-32";
|
|
4
|
+
import fe from "pako";
|
|
5
5
|
import { StreamedFile as ot } from "@php-wasm/stream-compression";
|
|
6
|
-
import { ZipReader as
|
|
7
|
-
function
|
|
8
|
-
return new
|
|
6
|
+
import { ZipReader as Ie, BlobReader as _e, BlobWriter as tn } from "@zip.js/zip.js";
|
|
7
|
+
function fa(r) {
|
|
8
|
+
return new Zr({
|
|
9
9
|
auth: r
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ca(r, t = "") {
|
|
13
13
|
t.length && !t.endsWith("/") && (t += "/");
|
|
14
14
|
const e = {};
|
|
15
15
|
for (const i of r)
|
|
16
16
|
i.path.startsWith(t) && (e[i.path.substring(t.length)] = i.content);
|
|
17
17
|
return e;
|
|
18
18
|
}
|
|
19
|
-
async function
|
|
19
|
+
async function en(r, t, e, i, a, f = {}) {
|
|
20
20
|
f.progress || (f.progress = {
|
|
21
21
|
foundFiles: 0,
|
|
22
22
|
downloadedFiles: 0
|
|
@@ -33,9 +33,9 @@ async function nn(r, t, e, i, a, f = {}) {
|
|
|
33
33
|
);
|
|
34
34
|
for (const m of d)
|
|
35
35
|
m.type === "file" ? (++f.progress.foundFiles, u == null || u(f.progress), s.push(
|
|
36
|
-
|
|
36
|
+
nn(r, t, e, i, m).then((v) => (++f.progress.downloadedFiles, u == null || u(f.progress), v))
|
|
37
37
|
)) : m.type === "dir" && h.push(
|
|
38
|
-
|
|
38
|
+
en(
|
|
39
39
|
r,
|
|
40
40
|
t,
|
|
41
41
|
e,
|
|
@@ -49,9 +49,9 @@ async function nn(r, t, e, i, a, f = {}) {
|
|
|
49
49
|
);
|
|
50
50
|
return [...y, ...g];
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
async function
|
|
54
|
-
const f = await
|
|
52
|
+
const rn = new ir({ concurrency: 15 });
|
|
53
|
+
async function nn(r, t, e, i, a) {
|
|
54
|
+
const f = await rn.acquire();
|
|
55
55
|
try {
|
|
56
56
|
const { data: u } = await r.rest.repos.getContent({
|
|
57
57
|
owner: t,
|
|
@@ -64,19 +64,19 @@ async function an(r, t, e, i, a) {
|
|
|
64
64
|
return {
|
|
65
65
|
name: a.name,
|
|
66
66
|
path: a.path,
|
|
67
|
-
content:
|
|
67
|
+
content: on(u.content)
|
|
68
68
|
};
|
|
69
69
|
} finally {
|
|
70
70
|
f();
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function on(r) {
|
|
74
74
|
const t = window.atob(r), e = t.length, i = new Uint8Array(e);
|
|
75
75
|
for (let a = 0; a < e; a++)
|
|
76
76
|
i[a] = t.charCodeAt(a);
|
|
77
77
|
return i;
|
|
78
78
|
}
|
|
79
|
-
async function
|
|
79
|
+
async function ua(r, t, e, i, a) {
|
|
80
80
|
var y;
|
|
81
81
|
const { data: f } = await r.rest.pulls.get({
|
|
82
82
|
owner: t,
|
|
@@ -99,7 +99,7 @@ async function ha(r, t, e, i, a) {
|
|
|
99
99
|
archive_format: "zip"
|
|
100
100
|
})).data;
|
|
101
101
|
}
|
|
102
|
-
async function
|
|
102
|
+
async function la(r, t, e) {
|
|
103
103
|
var f;
|
|
104
104
|
const { data: i, headers: a } = await r.request(
|
|
105
105
|
"GET /repos/{owner}/{repo}",
|
|
@@ -110,7 +110,7 @@ async function pa(r, t, e) {
|
|
|
110
110
|
);
|
|
111
111
|
return !(!a["x-oauth-scopes"] || !((f = i.permissions) != null && f.push));
|
|
112
112
|
}
|
|
113
|
-
async function
|
|
113
|
+
async function ha(r, t, e, i, a) {
|
|
114
114
|
await r.request("GET /repos/{owner}/{repo}/branches/{branch}", {
|
|
115
115
|
owner: t,
|
|
116
116
|
repo: e,
|
|
@@ -130,7 +130,7 @@ async function ya(r, t, e, i, a) {
|
|
|
130
130
|
ref: `refs/heads/${i}`
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
async function
|
|
133
|
+
async function pa(r, t, e) {
|
|
134
134
|
const i = await r.request("GET /user");
|
|
135
135
|
return (await r.request("GET /repos/{owner}/{repo}/forks", {
|
|
136
136
|
owner: t,
|
|
@@ -142,7 +142,7 @@ async function da(r, t, e) {
|
|
|
142
142
|
repo: e
|
|
143
143
|
}), i.data.login;
|
|
144
144
|
}
|
|
145
|
-
async function
|
|
145
|
+
async function ya(r, t, e, i, a, f) {
|
|
146
146
|
const {
|
|
147
147
|
data: { sha: u }
|
|
148
148
|
} = await r.request("POST /repos/{owner}/{repo}/git/commits", {
|
|
@@ -154,8 +154,8 @@ async function ga(r, t, e, i, a, f) {
|
|
|
154
154
|
});
|
|
155
155
|
return u;
|
|
156
156
|
}
|
|
157
|
-
async function
|
|
158
|
-
const f = await
|
|
157
|
+
async function da(r, t, e, i, a) {
|
|
158
|
+
const f = await an(
|
|
159
159
|
r,
|
|
160
160
|
t,
|
|
161
161
|
e,
|
|
@@ -174,21 +174,21 @@ async function wa(r, t, e, i, a) {
|
|
|
174
174
|
});
|
|
175
175
|
return u;
|
|
176
176
|
}
|
|
177
|
-
async function
|
|
177
|
+
async function an(r, t, e, i, a) {
|
|
178
178
|
const f = [];
|
|
179
179
|
for (const [u, s] of a.create)
|
|
180
|
-
f.push(
|
|
180
|
+
f.push(Fe(r, t, e, u, s));
|
|
181
181
|
for (const [u, s] of a.update)
|
|
182
|
-
f.push(
|
|
182
|
+
f.push(Fe(r, t, e, u, s));
|
|
183
183
|
for (const u of a.delete)
|
|
184
|
-
f.push(
|
|
184
|
+
f.push(sn(r, t, e, i, u));
|
|
185
185
|
return Promise.all(f).then(
|
|
186
186
|
(u) => u.filter((s) => !!s)
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
|
-
const
|
|
190
|
-
async function
|
|
191
|
-
const f = await
|
|
189
|
+
const or = new ir({ concurrency: 10 });
|
|
190
|
+
async function Fe(r, t, e, i, a) {
|
|
191
|
+
const f = await or.acquire();
|
|
192
192
|
try {
|
|
193
193
|
if (ArrayBuffer.isView(a))
|
|
194
194
|
try {
|
|
@@ -207,7 +207,7 @@ async function Ue(r, t, e, i, a) {
|
|
|
207
207
|
owner: t,
|
|
208
208
|
repo: e,
|
|
209
209
|
encoding: "base64",
|
|
210
|
-
content:
|
|
210
|
+
content: fn(a)
|
|
211
211
|
});
|
|
212
212
|
return {
|
|
213
213
|
path: i,
|
|
@@ -225,8 +225,8 @@ async function Ue(r, t, e, i, a) {
|
|
|
225
225
|
f();
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
async function
|
|
229
|
-
const f = await
|
|
228
|
+
async function sn(r, t, e, i, a) {
|
|
229
|
+
const f = await or.acquire();
|
|
230
230
|
try {
|
|
231
231
|
return await r.request("HEAD /repos/{owner}/{repo}/contents/:path", {
|
|
232
232
|
owner: t,
|
|
@@ -244,14 +244,14 @@ async function cn(r, t, e, i, a) {
|
|
|
244
244
|
f();
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function fn(r) {
|
|
248
248
|
const t = [], e = r.byteLength;
|
|
249
249
|
for (let i = 0; i < e; i++)
|
|
250
250
|
t.push(String.fromCharCode(r[i]));
|
|
251
251
|
return window.btoa(t.join(""));
|
|
252
252
|
}
|
|
253
|
-
async function*
|
|
254
|
-
if (t =
|
|
253
|
+
async function* ga(r, t, { exceptPaths: e = [] } = {}) {
|
|
254
|
+
if (t = se(t), !await r.isDir(t)) {
|
|
255
255
|
await r.fileExists(t) && (yield {
|
|
256
256
|
path: t,
|
|
257
257
|
read: async () => await r.readFileAsBuffer(t)
|
|
@@ -265,7 +265,7 @@ async function* ma(r, t, { exceptPaths: e = [] } = {}) {
|
|
|
265
265
|
return;
|
|
266
266
|
const f = await r.listFiles(a);
|
|
267
267
|
for (const u of f) {
|
|
268
|
-
const s =
|
|
268
|
+
const s = Kr(a, u);
|
|
269
269
|
e.includes(s.substring(t.length + 1)) || (await r.isDir(s) ? i.push(s) : yield {
|
|
270
270
|
path: s,
|
|
271
271
|
read: async () => await r.readFileAsBuffer(s)
|
|
@@ -273,7 +273,7 @@ async function* ma(r, t, { exceptPaths: e = [] } = {}) {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
async function
|
|
276
|
+
async function wa(r, t) {
|
|
277
277
|
const e = {
|
|
278
278
|
create: /* @__PURE__ */ new Map(),
|
|
279
279
|
update: /* @__PURE__ */ new Map(),
|
|
@@ -282,26 +282,26 @@ async function ba(r, t) {
|
|
|
282
282
|
for await (const a of t) {
|
|
283
283
|
i.add(a.path);
|
|
284
284
|
const f = r.get(a.path), u = await a.read();
|
|
285
|
-
f ?
|
|
285
|
+
f ? cn(f, u) || e.update.set(a.path, u) : e.create.set(a.path, u);
|
|
286
286
|
}
|
|
287
287
|
for (const a of r.keys())
|
|
288
288
|
i.has(a) || e.delete.add(a);
|
|
289
289
|
return e;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function cn(r, t) {
|
|
292
292
|
return r.length === t.length && r.every((e, i) => e === t[i]);
|
|
293
293
|
}
|
|
294
|
-
async function
|
|
295
|
-
return r.type === "local-fs" ? r.handle :
|
|
294
|
+
async function un(r) {
|
|
295
|
+
return r.type === "local-fs" ? r.handle : ln(r.path);
|
|
296
296
|
}
|
|
297
|
-
async function
|
|
297
|
+
async function ln(r) {
|
|
298
298
|
const t = r.split("/").filter((i) => i.length > 0);
|
|
299
299
|
let e = await navigator.storage.getDirectory();
|
|
300
300
|
for (const i of t)
|
|
301
301
|
e = await e.getDirectoryHandle(i, { create: !0 });
|
|
302
302
|
return e;
|
|
303
303
|
}
|
|
304
|
-
async function
|
|
304
|
+
async function ma(r) {
|
|
305
305
|
const e = await (await navigator.storage.getDirectory()).resolve(r);
|
|
306
306
|
if (e === null)
|
|
307
307
|
throw new DOMException(
|
|
@@ -310,14 +310,14 @@ async function va(r) {
|
|
|
310
310
|
);
|
|
311
311
|
return "/" + e.join("/");
|
|
312
312
|
}
|
|
313
|
-
async function
|
|
314
|
-
const t = await
|
|
313
|
+
async function ba(r) {
|
|
314
|
+
const t = await un(r);
|
|
315
315
|
for await (const e of t.keys())
|
|
316
316
|
await t.removeEntry(e, {
|
|
317
317
|
recursive: !0
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function hn(r) {
|
|
321
321
|
let t = [r];
|
|
322
322
|
return {
|
|
323
323
|
next() {
|
|
@@ -331,14 +331,14 @@ function yn(r) {
|
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
return r[Symbol.asyncIterator] ? r[Symbol.asyncIterator]() : r[Symbol.iterator] ? r[Symbol.iterator]() : r.next ? r :
|
|
334
|
+
function ar(r) {
|
|
335
|
+
return r[Symbol.asyncIterator] ? r[Symbol.asyncIterator]() : r[Symbol.iterator] ? r[Symbol.iterator]() : r.next ? r : hn(r);
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class sr {
|
|
338
338
|
constructor(t) {
|
|
339
339
|
if (typeof Buffer > "u")
|
|
340
340
|
throw new Error("Missing Buffer dependency");
|
|
341
|
-
this.stream =
|
|
341
|
+
this.stream = ar(t), this.buffer = null, this.cursor = 0, this.undoCursor = 0, this.started = !1, this._ended = !1, this._discardedBytes = 0;
|
|
342
342
|
}
|
|
343
343
|
eof() {
|
|
344
344
|
return this._ended && this.cursor === this.buffer.length;
|
|
@@ -378,7 +378,7 @@ class cr {
|
|
|
378
378
|
async _accumulate(t) {
|
|
379
379
|
if (this._ended) return;
|
|
380
380
|
const e = [this.buffer];
|
|
381
|
-
for (; this.cursor + t >
|
|
381
|
+
for (; this.cursor + t > pn(e); ) {
|
|
382
382
|
const i = await this._next();
|
|
383
383
|
if (this._ended) break;
|
|
384
384
|
e.push(i);
|
|
@@ -392,10 +392,10 @@ class cr {
|
|
|
392
392
|
this.buffer = await this._next();
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function pn(r) {
|
|
396
396
|
return r.reduce((t, e) => t + e.length, 0);
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function yn(r, t) {
|
|
399
399
|
const e = t.toString(16);
|
|
400
400
|
return "0".repeat(r - e.length) + e;
|
|
401
401
|
}
|
|
@@ -408,11 +408,11 @@ class j {
|
|
|
408
408
|
}
|
|
409
409
|
static encode(t) {
|
|
410
410
|
typeof t == "string" && (t = Buffer.from(t));
|
|
411
|
-
const e = t.length + 4, i =
|
|
411
|
+
const e = t.length + 4, i = yn(4, e);
|
|
412
412
|
return Buffer.concat([Buffer.from(i, "utf8"), t]);
|
|
413
413
|
}
|
|
414
414
|
static streamReader(t) {
|
|
415
|
-
const e = new
|
|
415
|
+
const e = new sr(t);
|
|
416
416
|
return async function() {
|
|
417
417
|
try {
|
|
418
418
|
let a = await e.read(4);
|
|
@@ -467,19 +467,19 @@ class ut extends nt {
|
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
ut.code = "UnsafeFilepathError";
|
|
470
|
-
function
|
|
470
|
+
function fr(r, t) {
|
|
471
471
|
return -(r < t) || +(r > t);
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
return
|
|
473
|
+
function cr(r, t) {
|
|
474
|
+
return fr(r.path, t.path);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
return
|
|
476
|
+
function dn(r, t) {
|
|
477
|
+
return fr(Ue(r), Ue(t));
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Ue(r) {
|
|
480
480
|
return r.mode === "040000" ? r.path + "/" : r.path;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function ur(r) {
|
|
483
483
|
switch (r) {
|
|
484
484
|
case "040000":
|
|
485
485
|
return "tree";
|
|
@@ -494,7 +494,7 @@ function hr(r) {
|
|
|
494
494
|
}
|
|
495
495
|
throw new I(`Unexpected GitTree entry mode: ${r}`);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function gn(r) {
|
|
498
498
|
const t = [];
|
|
499
499
|
let e = 0;
|
|
500
500
|
for (; e < r.length; ) {
|
|
@@ -510,7 +510,7 @@ function mn(r) {
|
|
|
510
510
|
);
|
|
511
511
|
let f = r.slice(e, i).toString("utf8");
|
|
512
512
|
f === "40000" && (f = "040000");
|
|
513
|
-
const u =
|
|
513
|
+
const u = ur(f), s = r.slice(i + 1, a).toString("utf8");
|
|
514
514
|
if (s.includes("\\") || s.includes("/"))
|
|
515
515
|
throw new ut(s);
|
|
516
516
|
const h = r.slice(a + 1, a + 21).toString("hex");
|
|
@@ -518,7 +518,7 @@ function mn(r) {
|
|
|
518
518
|
}
|
|
519
519
|
return t;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function wn(r) {
|
|
522
522
|
if (typeof r == "number" && (r = r.toString(8)), r.match(/^0?4.*/)) return "040000";
|
|
523
523
|
if (r.match(/^1006.*/)) return "100644";
|
|
524
524
|
if (r.match(/^1007.*/)) return "100755";
|
|
@@ -526,21 +526,21 @@ function bn(r) {
|
|
|
526
526
|
if (r.match(/^160.*/)) return "160000";
|
|
527
527
|
throw new I(`Could not understand file mode: ${r}`);
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
return !r.oid && r.sha && (r.oid = r.sha), r.mode =
|
|
529
|
+
function mn(r) {
|
|
530
|
+
return !r.oid && r.sha && (r.oid = r.sha), r.mode = wn(r.mode), r.type || (r.type = ur(r.mode)), r;
|
|
531
531
|
}
|
|
532
|
-
class
|
|
532
|
+
class ce {
|
|
533
533
|
constructor(t) {
|
|
534
534
|
if (Buffer.isBuffer(t))
|
|
535
|
-
this._entries =
|
|
535
|
+
this._entries = gn(t);
|
|
536
536
|
else if (Array.isArray(t))
|
|
537
|
-
this._entries = t.map(
|
|
537
|
+
this._entries = t.map(mn);
|
|
538
538
|
else
|
|
539
539
|
throw new I("invalid type passed to GitTree constructor");
|
|
540
|
-
this._entries.sort(
|
|
540
|
+
this._entries.sort(cr);
|
|
541
541
|
}
|
|
542
542
|
static from(t) {
|
|
543
|
-
return new
|
|
543
|
+
return new ce(t);
|
|
544
544
|
}
|
|
545
545
|
render() {
|
|
546
546
|
return this._entries.map((t) => `${t.mode} ${t.type} ${t.oid} ${t.path}`).join(`
|
|
@@ -548,7 +548,7 @@ class ue {
|
|
|
548
548
|
}
|
|
549
549
|
toObject() {
|
|
550
550
|
const t = [...this._entries];
|
|
551
|
-
return t.sort(
|
|
551
|
+
return t.sort(dn), Buffer.concat(
|
|
552
552
|
t.map((e) => {
|
|
553
553
|
const i = Buffer.from(e.mode.replace(/^0/, "")), a = Buffer.from(" "), f = Buffer.from(e.path, "utf8"), u = Buffer.from([0]), s = Buffer.from(e.oid, "hex");
|
|
554
554
|
return Buffer.concat([i, a, f, u, s]);
|
|
@@ -566,21 +566,21 @@ class ue {
|
|
|
566
566
|
yield t;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
570
|
-
return i =
|
|
569
|
+
function re({ name: r, email: t, timestamp: e, timezoneOffset: i }) {
|
|
570
|
+
return i = bn(i), `${r} <${t}> ${e} ${i}`;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const t =
|
|
572
|
+
function bn(r) {
|
|
573
|
+
const t = vn(En(r));
|
|
574
574
|
r = Math.abs(r);
|
|
575
575
|
const e = Math.floor(r / 60);
|
|
576
576
|
r -= e * 60;
|
|
577
577
|
let i = String(e), a = String(r);
|
|
578
578
|
return i.length < 2 && (i = "0" + i), a.length < 2 && (a = "0" + a), (t === -1 ? "-" : "+") + i + a;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function vn(r) {
|
|
581
581
|
return Math.sign(r) || (Object.is(r, -0) ? -1 : 1);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function En(r) {
|
|
584
584
|
return r === 0 ? r : -r;
|
|
585
585
|
}
|
|
586
586
|
function V(r) {
|
|
@@ -595,14 +595,14 @@ function Et(r) {
|
|
|
595
595
|
name: t,
|
|
596
596
|
email: e,
|
|
597
597
|
timestamp: Number(i),
|
|
598
|
-
timezoneOffset:
|
|
598
|
+
timezoneOffset: xn(a)
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function xn(r) {
|
|
602
602
|
let [, t, e, i] = r.match(/(\+|-)(\d\d)(\d\d)/);
|
|
603
|
-
return i = (t === "+" ? 1 : -1) * (Number(e) * 60 + Number(i)),
|
|
603
|
+
return i = (t === "+" ? 1 : -1) * (Number(e) * 60 + Number(i)), An(i);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function An(r) {
|
|
606
606
|
return r === 0 ? r : -r;
|
|
607
607
|
}
|
|
608
608
|
class it {
|
|
@@ -625,7 +625,7 @@ class it {
|
|
|
625
625
|
return `object ${t.object}
|
|
626
626
|
type ${t.type}
|
|
627
627
|
tag ${t.tag}
|
|
628
|
-
tagger ${
|
|
628
|
+
tagger ${re(t.tagger)}
|
|
629
629
|
|
|
630
630
|
${t.message}
|
|
631
631
|
${t.gpgsig ? t.gpgsig : ""}`;
|
|
@@ -699,7 +699,7 @@ function Pt(r) {
|
|
|
699
699
|
`) + `
|
|
700
700
|
`;
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function Bn(r) {
|
|
703
703
|
return r.split(`
|
|
704
704
|
`).map((t) => t.replace(/^ /, "")).join(`
|
|
705
705
|
`);
|
|
@@ -777,10 +777,10 @@ gpgsig` + Pt(e) + `
|
|
|
777
777
|
`;
|
|
778
778
|
}
|
|
779
779
|
const i = t.author;
|
|
780
|
-
e += `author ${
|
|
780
|
+
e += `author ${re(i)}
|
|
781
781
|
`;
|
|
782
782
|
const a = t.committer || t.author;
|
|
783
|
-
return e += `committer ${
|
|
783
|
+
return e += `committer ${re(a)}
|
|
784
784
|
`, t.gpgsig && (e += "gpgsig" + Pt(t.gpgsig)), e;
|
|
785
785
|
}
|
|
786
786
|
static render(t) {
|
|
@@ -807,7 +807,7 @@ gpgsig`)), i = t.slice(
|
|
|
807
807
|
this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),
|
|
808
808
|
this._commit.indexOf("-----END PGP SIGNATURE-----") + 27
|
|
809
809
|
);
|
|
810
|
-
return
|
|
810
|
+
return Bn(t);
|
|
811
811
|
}
|
|
812
812
|
static async sign(t, e, i) {
|
|
813
813
|
const a = t.withoutSignature(), f = M.justMessage(t._commit);
|
|
@@ -819,7 +819,7 @@ gpgsig` + Pt(u) + `
|
|
|
819
819
|
return M.from(h);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
-
class
|
|
822
|
+
class Sn {
|
|
823
823
|
static wrap({ type: t, object: e }) {
|
|
824
824
|
return Buffer.concat([
|
|
825
825
|
Buffer.from(`${t} ${e.byteLength.toString()}\0`),
|
|
@@ -892,22 +892,22 @@ class H {
|
|
|
892
892
|
return this._start += 4, e;
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
896
|
-
const e = new H(r), i =
|
|
895
|
+
function In(r, t) {
|
|
896
|
+
const e = new H(r), i = $e(e);
|
|
897
897
|
if (i !== t.byteLength)
|
|
898
898
|
throw new I(
|
|
899
899
|
`applyDelta expected source buffer to be ${i} bytes but the provided buffer was ${t.length} bytes`
|
|
900
900
|
);
|
|
901
|
-
const a =
|
|
901
|
+
const a = $e(e);
|
|
902
902
|
let f;
|
|
903
|
-
const u =
|
|
903
|
+
const u = Te(e, t);
|
|
904
904
|
if (u.byteLength === a)
|
|
905
905
|
f = u;
|
|
906
906
|
else {
|
|
907
907
|
f = Buffer.alloc(a);
|
|
908
908
|
const s = new H(f);
|
|
909
909
|
for (s.copy(u); !e.eof(); )
|
|
910
|
-
s.copy(
|
|
910
|
+
s.copy(Te(e, t));
|
|
911
911
|
const h = s.tell();
|
|
912
912
|
if (a !== h)
|
|
913
913
|
throw new I(
|
|
@@ -916,30 +916,30 @@ function Fn(r, t) {
|
|
|
916
916
|
}
|
|
917
917
|
return f;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function $e(r) {
|
|
920
920
|
let t = 0, e = 0, i = null;
|
|
921
921
|
do
|
|
922
922
|
i = r.readUInt8(), t |= (i & 127) << e, e += 7;
|
|
923
923
|
while (i & 128);
|
|
924
924
|
return t;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Pe(r, t, e) {
|
|
927
927
|
let i = 0, a = 0;
|
|
928
928
|
for (; e--; )
|
|
929
929
|
t & 1 && (i |= r.readUInt8() << a), t >>= 1, a += 8;
|
|
930
930
|
return i;
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function Te(r, t) {
|
|
933
933
|
const e = r.readUInt8(), i = 128, a = 15, f = 112;
|
|
934
934
|
if (e & i) {
|
|
935
|
-
const u =
|
|
936
|
-
let s =
|
|
935
|
+
const u = Pe(r, e & a, 4);
|
|
936
|
+
let s = Pe(r, (e & f) >> 4, 3);
|
|
937
937
|
return s === 0 && (s = 65536), t.slice(u, u + s);
|
|
938
938
|
} else
|
|
939
939
|
return r.slice(e);
|
|
940
940
|
}
|
|
941
|
-
async function
|
|
942
|
-
const e = new
|
|
941
|
+
async function _n(r, t) {
|
|
942
|
+
const e = new sr(r);
|
|
943
943
|
let i = await e.read(4);
|
|
944
944
|
if (i = i.toString("utf8"), i !== "PACK")
|
|
945
945
|
throw new I(`Invalid PACK header '${i}'`);
|
|
@@ -949,7 +949,7 @@ async function Un(r, t) {
|
|
|
949
949
|
let f = await e.read(4);
|
|
950
950
|
if (f = f.readUInt32BE(0), !(f < 1))
|
|
951
951
|
for (; !e.eof() && f--; ) {
|
|
952
|
-
const u = e.tell(), { type: s, length: h, ofs: d, reference: y } = await
|
|
952
|
+
const u = e.tell(), { type: s, length: h, ofs: d, reference: y } = await Fn(e), g = new fe.Inflate();
|
|
953
953
|
for (; !g.result; ) {
|
|
954
954
|
const m = await e.chunk();
|
|
955
955
|
if (!m) break;
|
|
@@ -975,7 +975,7 @@ async function Un(r, t) {
|
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
async function
|
|
978
|
+
async function Fn(r) {
|
|
979
979
|
let t = await r.byte();
|
|
980
980
|
const e = t >> 4 & 7;
|
|
981
981
|
let i = t & 15;
|
|
@@ -997,15 +997,15 @@ async function $n(r) {
|
|
|
997
997
|
}
|
|
998
998
|
return e === 7 && (f = await r.read(20)), { type: e, length: i, ofs: a, reference: f };
|
|
999
999
|
}
|
|
1000
|
-
async function
|
|
1001
|
-
return
|
|
1000
|
+
async function Un(r) {
|
|
1001
|
+
return fe.inflate(r);
|
|
1002
1002
|
}
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1003
|
+
var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1004
|
+
function $n(r) {
|
|
1005
1005
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
1006
1006
|
}
|
|
1007
|
-
var
|
|
1008
|
-
typeof Object.create == "function" ?
|
|
1007
|
+
var ne = { exports: {} };
|
|
1008
|
+
typeof Object.create == "function" ? ne.exports = function(t, e) {
|
|
1009
1009
|
e && (t.super_ = e, t.prototype = Object.create(e.prototype, {
|
|
1010
1010
|
constructor: {
|
|
1011
1011
|
value: t,
|
|
@@ -1014,7 +1014,7 @@ typeof Object.create == "function" ? ie.exports = function(t, e) {
|
|
|
1014
1014
|
configurable: !0
|
|
1015
1015
|
}
|
|
1016
1016
|
}));
|
|
1017
|
-
} :
|
|
1017
|
+
} : ne.exports = function(t, e) {
|
|
1018
1018
|
if (e) {
|
|
1019
1019
|
t.super_ = e;
|
|
1020
1020
|
var i = function() {
|
|
@@ -1022,16 +1022,16 @@ typeof Object.create == "function" ? ie.exports = function(t, e) {
|
|
|
1022
1022
|
i.prototype = e.prototype, t.prototype = new i(), t.prototype.constructor = t;
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
|
-
var
|
|
1026
|
-
St.byteLength =
|
|
1027
|
-
St.toByteArray =
|
|
1028
|
-
St.fromByteArray =
|
|
1029
|
-
var W = [], L = [],
|
|
1030
|
-
for (var K = 0,
|
|
1025
|
+
var Pn = ne.exports, ie = { exports: {} }, ue = {}, St = {};
|
|
1026
|
+
St.byteLength = kn;
|
|
1027
|
+
St.toByteArray = jn;
|
|
1028
|
+
St.fromByteArray = Nn;
|
|
1029
|
+
var W = [], L = [], Tn = typeof Uint8Array < "u" ? Uint8Array : Array, Tt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1030
|
+
for (var K = 0, On = Tt.length; K < On; ++K)
|
|
1031
1031
|
W[K] = Tt[K], L[Tt.charCodeAt(K)] = K;
|
|
1032
1032
|
L[45] = 62;
|
|
1033
1033
|
L[95] = 63;
|
|
1034
|
-
function
|
|
1034
|
+
function hr(r) {
|
|
1035
1035
|
var t = r.length;
|
|
1036
1036
|
if (t % 4 > 0)
|
|
1037
1037
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -1040,39 +1040,39 @@ function yr(r) {
|
|
|
1040
1040
|
var i = e === t ? 0 : 4 - e % 4;
|
|
1041
1041
|
return [e, i];
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
var t =
|
|
1043
|
+
function kn(r) {
|
|
1044
|
+
var t = hr(r), e = t[0], i = t[1];
|
|
1045
1045
|
return (e + i) * 3 / 4 - i;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function Rn(r, t, e) {
|
|
1048
1048
|
return (t + e) * 3 / 4 - e;
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1051
|
-
var t, e =
|
|
1050
|
+
function jn(r) {
|
|
1051
|
+
var t, e = hr(r), i = e[0], a = e[1], f = new Tn(Rn(r, i, a)), u = 0, s = a > 0 ? i - 4 : i, h;
|
|
1052
1052
|
for (h = 0; h < s; h += 4)
|
|
1053
1053
|
t = L[r.charCodeAt(h)] << 18 | L[r.charCodeAt(h + 1)] << 12 | L[r.charCodeAt(h + 2)] << 6 | L[r.charCodeAt(h + 3)], f[u++] = t >> 16 & 255, f[u++] = t >> 8 & 255, f[u++] = t & 255;
|
|
1054
1054
|
return a === 2 && (t = L[r.charCodeAt(h)] << 2 | L[r.charCodeAt(h + 1)] >> 4, f[u++] = t & 255), a === 1 && (t = L[r.charCodeAt(h)] << 10 | L[r.charCodeAt(h + 1)] << 4 | L[r.charCodeAt(h + 2)] >> 2, f[u++] = t >> 8 & 255, f[u++] = t & 255), f;
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function Cn(r) {
|
|
1057
1057
|
return W[r >> 18 & 63] + W[r >> 12 & 63] + W[r >> 6 & 63] + W[r & 63];
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function Dn(r, t, e) {
|
|
1060
1060
|
for (var i, a = [], f = t; f < e; f += 3)
|
|
1061
|
-
i = (r[f] << 16 & 16711680) + (r[f + 1] << 8 & 65280) + (r[f + 2] & 255), a.push(
|
|
1061
|
+
i = (r[f] << 16 & 16711680) + (r[f + 1] << 8 & 65280) + (r[f + 2] & 255), a.push(Cn(i));
|
|
1062
1062
|
return a.join("");
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Nn(r) {
|
|
1065
1065
|
for (var t, e = r.length, i = e % 3, a = [], f = 16383, u = 0, s = e - i; u < s; u += f)
|
|
1066
|
-
a.push(
|
|
1066
|
+
a.push(Dn(r, u, u + f > s ? s : u + f));
|
|
1067
1067
|
return i === 1 ? (t = r[e - 1], a.push(
|
|
1068
1068
|
W[t >> 2] + W[t << 4 & 63] + "=="
|
|
1069
1069
|
)) : i === 2 && (t = (r[e - 2] << 8) + r[e - 1], a.push(
|
|
1070
1070
|
W[t >> 10] + W[t >> 4 & 63] + W[t << 2 & 63] + "="
|
|
1071
1071
|
)), a.join("");
|
|
1072
1072
|
}
|
|
1073
|
-
var
|
|
1073
|
+
var le = {};
|
|
1074
1074
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1075
|
-
|
|
1075
|
+
le.read = function(r, t, e, i, a) {
|
|
1076
1076
|
var f, u, s = a * 8 - i - 1, h = (1 << s) - 1, d = h >> 1, y = -7, g = e ? a - 1 : 0, m = e ? -1 : 1, v = r[t + g];
|
|
1077
1077
|
for (g += m, f = v & (1 << -y) - 1, v >>= -y, y += s; y > 0; f = f * 256 + r[t + g], g += m, y -= 8)
|
|
1078
1078
|
;
|
|
@@ -1087,7 +1087,7 @@ he.read = function(r, t, e, i, a) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
return (v ? -1 : 1) * u * Math.pow(2, f - i);
|
|
1089
1089
|
};
|
|
1090
|
-
|
|
1090
|
+
le.write = function(r, t, e, i, a, f) {
|
|
1091
1091
|
var u, s, h, d = f * 8 - a - 1, y = (1 << d) - 1, g = y >> 1, m = a === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, v = i ? 0 : f - 1, F = i ? 1 : -1, $ = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
1092
1092
|
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0, u = y) : (u = Math.floor(Math.log(t) / Math.LN2), t * (h = Math.pow(2, -u)) < 1 && (u--, h *= 2), u + g >= 1 ? t += m / h : t += m * Math.pow(2, 1 - g), t * h >= 2 && (u++, h /= 2), u + g >= y ? (s = 0, u = y) : u + g >= 1 ? (s = (t * h - 1) * Math.pow(2, a), u = u + g) : (s = t * Math.pow(2, g - 1) * Math.pow(2, a), u = 0)); a >= 8; r[e + v] = s & 255, v += F, s /= 256, a -= 8)
|
|
1093
1093
|
;
|
|
@@ -1102,7 +1102,7 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1102
1102
|
* @license MIT
|
|
1103
1103
|
*/
|
|
1104
1104
|
(function(r) {
|
|
1105
|
-
var t = St, e =
|
|
1105
|
+
var t = St, e = le, i = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
1106
1106
|
r.Buffer = s, r.SlowBuffer = _, r.INSPECT_MAX_BYTES = 50;
|
|
1107
1107
|
var a = 2147483647;
|
|
1108
1108
|
r.kMaxLength = a, s.TYPED_ARRAY_SUPPORT = f(), !s.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
@@ -1330,7 +1330,7 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1330
1330
|
case "hex":
|
|
1331
1331
|
return o >>> 1;
|
|
1332
1332
|
case "base64":
|
|
1333
|
-
return
|
|
1333
|
+
return Ae(c).length;
|
|
1334
1334
|
default:
|
|
1335
1335
|
if (p)
|
|
1336
1336
|
return l ? -1 : Ut(c).length;
|
|
@@ -1345,22 +1345,22 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1345
1345
|
for (c || (c = "utf8"); ; )
|
|
1346
1346
|
switch (c) {
|
|
1347
1347
|
case "hex":
|
|
1348
|
-
return
|
|
1348
|
+
return zr(this, n, o);
|
|
1349
1349
|
case "utf8":
|
|
1350
1350
|
case "utf-8":
|
|
1351
|
-
return
|
|
1351
|
+
return me(this, n, o);
|
|
1352
1352
|
case "ascii":
|
|
1353
|
-
return
|
|
1353
|
+
return Gr(this, n, o);
|
|
1354
1354
|
case "latin1":
|
|
1355
1355
|
case "binary":
|
|
1356
|
-
return
|
|
1356
|
+
return qr(this, n, o);
|
|
1357
1357
|
case "base64":
|
|
1358
|
-
return
|
|
1358
|
+
return Mr(this, n, o);
|
|
1359
1359
|
case "ucs2":
|
|
1360
1360
|
case "ucs-2":
|
|
1361
1361
|
case "utf16le":
|
|
1362
1362
|
case "utf-16le":
|
|
1363
|
-
return
|
|
1363
|
+
return Hr(this, n, o);
|
|
1364
1364
|
default:
|
|
1365
1365
|
if (l) throw new TypeError("Unknown encoding: " + c);
|
|
1366
1366
|
c = (c + "").toLowerCase(), l = !0;
|
|
@@ -1394,7 +1394,7 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1394
1394
|
return this;
|
|
1395
1395
|
}, s.prototype.toString = function() {
|
|
1396
1396
|
var n = this.length;
|
|
1397
|
-
return n === 0 ? "" : arguments.length === 0 ?
|
|
1397
|
+
return n === 0 ? "" : arguments.length === 0 ? me(this, 0, n) : P.apply(this, arguments);
|
|
1398
1398
|
}, s.prototype.toLocaleString = s.prototype.toString, s.prototype.equals = function(n) {
|
|
1399
1399
|
if (!s.isBuffer(n)) throw new TypeError("Argument must be a Buffer");
|
|
1400
1400
|
return this === n ? !0 : s.compare(this, n) === 0;
|
|
@@ -1422,7 +1422,7 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
return b < S ? -1 : S < b ? 1 : 0;
|
|
1424
1424
|
};
|
|
1425
|
-
function
|
|
1425
|
+
function ge(c, n, o, l, p) {
|
|
1426
1426
|
if (c.length === 0) return -1;
|
|
1427
1427
|
if (typeof o == "string" ? (l = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o, $t(o) && (o = p ? 0 : c.length - 1), o < 0 && (o = c.length + o), o >= c.length) {
|
|
1428
1428
|
if (p) return -1;
|
|
@@ -1431,20 +1431,20 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1431
1431
|
if (p) o = 0;
|
|
1432
1432
|
else return -1;
|
|
1433
1433
|
if (typeof n == "string" && (n = s.from(n, l)), s.isBuffer(n))
|
|
1434
|
-
return n.length === 0 ? -1 :
|
|
1434
|
+
return n.length === 0 ? -1 : we(c, n, o, l, p);
|
|
1435
1435
|
if (typeof n == "number")
|
|
1436
|
-
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(c, n, o) : Uint8Array.prototype.lastIndexOf.call(c, n, o) :
|
|
1436
|
+
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(c, n, o) : Uint8Array.prototype.lastIndexOf.call(c, n, o) : we(c, [n], o, l, p);
|
|
1437
1437
|
throw new TypeError("val must be string, number or Buffer");
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function we(c, n, o, l, p) {
|
|
1440
1440
|
var w = 1, b = c.length, S = n.length;
|
|
1441
1441
|
if (l !== void 0 && (l = String(l).toLowerCase(), l === "ucs2" || l === "ucs-2" || l === "utf16le" || l === "utf-16le")) {
|
|
1442
1442
|
if (c.length < 2 || n.length < 2)
|
|
1443
1443
|
return -1;
|
|
1444
1444
|
w = 2, b /= 2, S /= 2, o /= 2;
|
|
1445
1445
|
}
|
|
1446
|
-
function U(
|
|
1447
|
-
return w === 1 ? Se
|
|
1446
|
+
function U(Be, Se) {
|
|
1447
|
+
return w === 1 ? Be[Se] : Be.readUInt16BE(Se * w);
|
|
1448
1448
|
}
|
|
1449
1449
|
var T;
|
|
1450
1450
|
if (p) {
|
|
@@ -1468,11 +1468,11 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1468
1468
|
s.prototype.includes = function(n, o, l) {
|
|
1469
1469
|
return this.indexOf(n, o, l) !== -1;
|
|
1470
1470
|
}, s.prototype.indexOf = function(n, o, l) {
|
|
1471
|
-
return
|
|
1471
|
+
return ge(this, n, o, l, !0);
|
|
1472
1472
|
}, s.prototype.lastIndexOf = function(n, o, l) {
|
|
1473
|
-
return
|
|
1473
|
+
return ge(this, n, o, l, !1);
|
|
1474
1474
|
};
|
|
1475
|
-
function
|
|
1475
|
+
function Rr(c, n, o, l) {
|
|
1476
1476
|
o = Number(o) || 0;
|
|
1477
1477
|
var p = c.length - o;
|
|
1478
1478
|
l ? (l = Number(l), l > p && (l = p)) : l = p;
|
|
@@ -1485,17 +1485,17 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
return b;
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1488
|
+
function jr(c, n, o, l) {
|
|
1489
1489
|
return wt(Ut(n, c.length - o), c, o, l);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
return wt(
|
|
1491
|
+
function Cr(c, n, o, l) {
|
|
1492
|
+
return wt(Jr(n), c, o, l);
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1495
|
-
return wt(
|
|
1494
|
+
function Dr(c, n, o, l) {
|
|
1495
|
+
return wt(Ae(n), c, o, l);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
return wt(
|
|
1497
|
+
function Nr(c, n, o, l) {
|
|
1498
|
+
return wt(Yr(n, c.length - o), c, o, l);
|
|
1499
1499
|
}
|
|
1500
1500
|
s.prototype.write = function(n, o, l, p) {
|
|
1501
1501
|
if (o === void 0)
|
|
@@ -1515,21 +1515,21 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1515
1515
|
for (var b = !1; ; )
|
|
1516
1516
|
switch (p) {
|
|
1517
1517
|
case "hex":
|
|
1518
|
-
return
|
|
1518
|
+
return Rr(this, n, o, l);
|
|
1519
1519
|
case "utf8":
|
|
1520
1520
|
case "utf-8":
|
|
1521
|
-
return
|
|
1521
|
+
return jr(this, n, o, l);
|
|
1522
1522
|
case "ascii":
|
|
1523
1523
|
case "latin1":
|
|
1524
1524
|
case "binary":
|
|
1525
|
-
return
|
|
1525
|
+
return Cr(this, n, o, l);
|
|
1526
1526
|
case "base64":
|
|
1527
|
-
return
|
|
1527
|
+
return Dr(this, n, o, l);
|
|
1528
1528
|
case "ucs2":
|
|
1529
1529
|
case "ucs-2":
|
|
1530
1530
|
case "utf16le":
|
|
1531
1531
|
case "utf-16le":
|
|
1532
|
-
return
|
|
1532
|
+
return Nr(this, n, o, l);
|
|
1533
1533
|
default:
|
|
1534
1534
|
if (b) throw new TypeError("Unknown encoding: " + p);
|
|
1535
1535
|
p = ("" + p).toLowerCase(), b = !0;
|
|
@@ -1540,10 +1540,10 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1540
1540
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1541
1541
|
};
|
|
1542
1542
|
};
|
|
1543
|
-
function
|
|
1543
|
+
function Mr(c, n, o) {
|
|
1544
1544
|
return n === 0 && o === c.length ? t.fromByteArray(c) : t.fromByteArray(c.slice(n, o));
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function me(c, n, o) {
|
|
1547
1547
|
o = Math.min(c.length, o);
|
|
1548
1548
|
for (var l = [], p = n; p < o; ) {
|
|
1549
1549
|
var w = c[p], b = null, S = w > 239 ? 4 : w > 223 ? 3 : w > 191 ? 2 : 1;
|
|
@@ -1565,42 +1565,42 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
b === null ? (b = 65533, S = 1) : b > 65535 && (b -= 65536, l.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), l.push(b), p += S;
|
|
1567
1567
|
}
|
|
1568
|
-
return
|
|
1568
|
+
return Lr(l);
|
|
1569
1569
|
}
|
|
1570
|
-
var
|
|
1571
|
-
function
|
|
1570
|
+
var be = 4096;
|
|
1571
|
+
function Lr(c) {
|
|
1572
1572
|
var n = c.length;
|
|
1573
|
-
if (n <=
|
|
1573
|
+
if (n <= be)
|
|
1574
1574
|
return String.fromCharCode.apply(String, c);
|
|
1575
1575
|
for (var o = "", l = 0; l < n; )
|
|
1576
1576
|
o += String.fromCharCode.apply(
|
|
1577
1577
|
String,
|
|
1578
|
-
c.slice(l, l +=
|
|
1578
|
+
c.slice(l, l += be)
|
|
1579
1579
|
);
|
|
1580
1580
|
return o;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function Gr(c, n, o) {
|
|
1583
1583
|
var l = "";
|
|
1584
1584
|
o = Math.min(c.length, o);
|
|
1585
1585
|
for (var p = n; p < o; ++p)
|
|
1586
1586
|
l += String.fromCharCode(c[p] & 127);
|
|
1587
1587
|
return l;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function qr(c, n, o) {
|
|
1590
1590
|
var l = "";
|
|
1591
1591
|
o = Math.min(c.length, o);
|
|
1592
1592
|
for (var p = n; p < o; ++p)
|
|
1593
1593
|
l += String.fromCharCode(c[p]);
|
|
1594
1594
|
return l;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function zr(c, n, o) {
|
|
1597
1597
|
var l = c.length;
|
|
1598
1598
|
(!n || n < 0) && (n = 0), (!o || o < 0 || o > l) && (o = l);
|
|
1599
1599
|
for (var p = "", w = n; w < o; ++w)
|
|
1600
|
-
p +=
|
|
1600
|
+
p += Xr[c[w]];
|
|
1601
1601
|
return p;
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function Hr(c, n, o) {
|
|
1604
1604
|
for (var l = c.slice(n, o), p = "", w = 0; w < l.length - 1; w += 2)
|
|
1605
1605
|
p += String.fromCharCode(l[w] + l[w + 1] * 256);
|
|
1606
1606
|
return p;
|
|
@@ -1730,25 +1730,25 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1730
1730
|
}, s.prototype.writeInt32BE = function(n, o, l) {
|
|
1731
1731
|
return n = +n, o = o >>> 0, l || N(this, n, o, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[o] = n >>> 24, this[o + 1] = n >>> 16, this[o + 2] = n >>> 8, this[o + 3] = n & 255, o + 4;
|
|
1732
1732
|
};
|
|
1733
|
-
function
|
|
1733
|
+
function ve(c, n, o, l, p, w) {
|
|
1734
1734
|
if (o + l > c.length) throw new RangeError("Index out of range");
|
|
1735
1735
|
if (o < 0) throw new RangeError("Index out of range");
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1738
|
-
return n = +n, o = o >>> 0, p ||
|
|
1737
|
+
function Ee(c, n, o, l, p) {
|
|
1738
|
+
return n = +n, o = o >>> 0, p || ve(c, n, o, 4), e.write(c, n, o, l, 23, 4), o + 4;
|
|
1739
1739
|
}
|
|
1740
1740
|
s.prototype.writeFloatLE = function(n, o, l) {
|
|
1741
|
-
return
|
|
1741
|
+
return Ee(this, n, o, !0, l);
|
|
1742
1742
|
}, s.prototype.writeFloatBE = function(n, o, l) {
|
|
1743
|
-
return
|
|
1743
|
+
return Ee(this, n, o, !1, l);
|
|
1744
1744
|
};
|
|
1745
|
-
function
|
|
1746
|
-
return n = +n, o = o >>> 0, p ||
|
|
1745
|
+
function xe(c, n, o, l, p) {
|
|
1746
|
+
return n = +n, o = o >>> 0, p || ve(c, n, o, 8), e.write(c, n, o, l, 52, 8), o + 8;
|
|
1747
1747
|
}
|
|
1748
1748
|
s.prototype.writeDoubleLE = function(n, o, l) {
|
|
1749
|
-
return
|
|
1749
|
+
return xe(this, n, o, !0, l);
|
|
1750
1750
|
}, s.prototype.writeDoubleBE = function(n, o, l) {
|
|
1751
|
-
return
|
|
1751
|
+
return xe(this, n, o, !1, l);
|
|
1752
1752
|
}, s.prototype.copy = function(n, o, l, p) {
|
|
1753
1753
|
if (!s.isBuffer(n)) throw new TypeError("argument should be a Buffer");
|
|
1754
1754
|
if (l || (l = 0), !p && p !== 0 && (p = this.length), o >= n.length && (o = n.length), o || (o = 0), p > 0 && p < l && (p = l), p === l || n.length === 0 || this.length === 0) return 0;
|
|
@@ -1792,9 +1792,9 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
return this;
|
|
1794
1794
|
};
|
|
1795
|
-
var
|
|
1796
|
-
function
|
|
1797
|
-
if (c = c.split("=")[0], c = c.trim().replace(
|
|
1795
|
+
var Wr = /[^+/0-9A-Za-z-_]/g;
|
|
1796
|
+
function Vr(c) {
|
|
1797
|
+
if (c = c.split("=")[0], c = c.trim().replace(Wr, ""), c.length < 2) return "";
|
|
1798
1798
|
for (; c.length % 4 !== 0; )
|
|
1799
1799
|
c = c + "=";
|
|
1800
1800
|
return c;
|
|
@@ -1849,18 +1849,18 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1849
1849
|
}
|
|
1850
1850
|
return w;
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function Jr(c) {
|
|
1853
1853
|
for (var n = [], o = 0; o < c.length; ++o)
|
|
1854
1854
|
n.push(c.charCodeAt(o) & 255);
|
|
1855
1855
|
return n;
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function Yr(c, n) {
|
|
1858
1858
|
for (var o, l, p, w = [], b = 0; b < c.length && !((n -= 2) < 0); ++b)
|
|
1859
1859
|
o = c.charCodeAt(b), l = o >> 8, p = o % 256, w.push(p), w.push(l);
|
|
1860
1860
|
return w;
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1863
|
-
return t.toByteArray(
|
|
1862
|
+
function Ae(c) {
|
|
1863
|
+
return t.toByteArray(Vr(c));
|
|
1864
1864
|
}
|
|
1865
1865
|
function wt(c, n, o, l) {
|
|
1866
1866
|
for (var p = 0; p < l && !(p + o >= n.length || p >= c.length); ++p)
|
|
@@ -1873,16 +1873,16 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1873
1873
|
function $t(c) {
|
|
1874
1874
|
return c !== c;
|
|
1875
1875
|
}
|
|
1876
|
-
var
|
|
1876
|
+
var Xr = function() {
|
|
1877
1877
|
for (var c = "0123456789abcdef", n = new Array(256), o = 0; o < 16; ++o)
|
|
1878
1878
|
for (var l = o * 16, p = 0; p < 16; ++p)
|
|
1879
1879
|
n[l + p] = c[o] + c[p];
|
|
1880
1880
|
return n;
|
|
1881
1881
|
}();
|
|
1882
|
-
})(
|
|
1882
|
+
})(ue);
|
|
1883
1883
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1884
1884
|
(function(r, t) {
|
|
1885
|
-
var e =
|
|
1885
|
+
var e = ue, i = e.Buffer;
|
|
1886
1886
|
function a(u, s) {
|
|
1887
1887
|
for (var h in u)
|
|
1888
1888
|
s[h] = u[h];
|
|
@@ -1909,14 +1909,14 @@ he.write = function(r, t, e, i, a, f) {
|
|
|
1909
1909
|
throw new TypeError("Argument must be a number");
|
|
1910
1910
|
return e.SlowBuffer(u);
|
|
1911
1911
|
};
|
|
1912
|
-
})(
|
|
1913
|
-
var
|
|
1914
|
-
return
|
|
1915
|
-
}, lt = TypeError,
|
|
1912
|
+
})(ie, ie.exports);
|
|
1913
|
+
var he = ie.exports, Mn = {}.toString, Ln = Array.isArray || function(r) {
|
|
1914
|
+
return Mn.call(r) == "[object Array]";
|
|
1915
|
+
}, lt = TypeError, pr = Object, Gn = Error, qn = EvalError, zn = RangeError, Hn = ReferenceError, yr = SyntaxError, Wn = URIError, Vn = Math.abs, Jn = Math.floor, Yn = Math.max, Xn = Math.min, Kn = Math.pow, Zn = Math.round, Qn = Number.isNaN || function(t) {
|
|
1916
1916
|
return t !== t;
|
|
1917
|
-
},
|
|
1918
|
-
return
|
|
1919
|
-
},
|
|
1917
|
+
}, ti = Qn, ei = function(t) {
|
|
1918
|
+
return ti(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
1919
|
+
}, ri = Object.getOwnPropertyDescriptor, bt = ri;
|
|
1920
1920
|
if (bt)
|
|
1921
1921
|
try {
|
|
1922
1922
|
bt([], "length");
|
|
@@ -1930,9 +1930,9 @@ if (vt)
|
|
|
1930
1930
|
} catch {
|
|
1931
1931
|
vt = !1;
|
|
1932
1932
|
}
|
|
1933
|
-
var It = vt, Ot,
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
1933
|
+
var It = vt, Ot, Oe;
|
|
1934
|
+
function dr() {
|
|
1935
|
+
return Oe || (Oe = 1, Ot = function() {
|
|
1936
1936
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
1937
1937
|
return !1;
|
|
1938
1938
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -1960,77 +1960,73 @@ function wr() {
|
|
|
1960
1960
|
return !0;
|
|
1961
1961
|
}), Ot;
|
|
1962
1962
|
}
|
|
1963
|
-
var kt,
|
|
1964
|
-
function
|
|
1965
|
-
if (
|
|
1966
|
-
|
|
1967
|
-
var r = typeof Symbol < "u" && Symbol, t =
|
|
1963
|
+
var kt, ke;
|
|
1964
|
+
function ni() {
|
|
1965
|
+
if (ke) return kt;
|
|
1966
|
+
ke = 1;
|
|
1967
|
+
var r = typeof Symbol < "u" && Symbol, t = dr();
|
|
1968
1968
|
return kt = function() {
|
|
1969
1969
|
return typeof r != "function" || typeof Symbol != "function" || typeof r("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : t();
|
|
1970
1970
|
}, kt;
|
|
1971
1971
|
}
|
|
1972
|
-
var Rt,
|
|
1973
|
-
function
|
|
1974
|
-
return
|
|
1972
|
+
var Rt, Re;
|
|
1973
|
+
function gr() {
|
|
1974
|
+
return Re || (Re = 1, Rt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Rt;
|
|
1975
1975
|
}
|
|
1976
|
-
var jt,
|
|
1977
|
-
function
|
|
1978
|
-
if (
|
|
1979
|
-
|
|
1980
|
-
var r =
|
|
1976
|
+
var jt, je;
|
|
1977
|
+
function wr() {
|
|
1978
|
+
if (je) return jt;
|
|
1979
|
+
je = 1;
|
|
1980
|
+
var r = pr;
|
|
1981
1981
|
return jt = r.getPrototypeOf || null, jt;
|
|
1982
1982
|
}
|
|
1983
|
-
var
|
|
1983
|
+
var ii = "Function.prototype.bind called on incompatible ", oi = Object.prototype.toString, ai = Math.max, si = "[object Function]", Ce = function(t, e) {
|
|
1984
1984
|
for (var i = [], a = 0; a < t.length; a += 1)
|
|
1985
1985
|
i[a] = t[a];
|
|
1986
1986
|
for (var f = 0; f < e.length; f += 1)
|
|
1987
1987
|
i[f + t.length] = e[f];
|
|
1988
1988
|
return i;
|
|
1989
|
-
},
|
|
1989
|
+
}, fi = function(t, e) {
|
|
1990
1990
|
for (var i = [], a = e, f = 0; a < t.length; a += 1, f += 1)
|
|
1991
1991
|
i[f] = t[a];
|
|
1992
1992
|
return i;
|
|
1993
|
-
},
|
|
1993
|
+
}, ci = function(r, t) {
|
|
1994
1994
|
for (var e = "", i = 0; i < r.length; i += 1)
|
|
1995
1995
|
e += r[i], i + 1 < r.length && (e += t);
|
|
1996
1996
|
return e;
|
|
1997
|
-
},
|
|
1997
|
+
}, ui = function(t) {
|
|
1998
1998
|
var e = this;
|
|
1999
|
-
if (typeof e != "function" ||
|
|
2000
|
-
throw new TypeError(
|
|
2001
|
-
for (var i =
|
|
1999
|
+
if (typeof e != "function" || oi.apply(e) !== si)
|
|
2000
|
+
throw new TypeError(ii + e);
|
|
2001
|
+
for (var i = fi(arguments, 1), a, f = function() {
|
|
2002
2002
|
if (this instanceof a) {
|
|
2003
2003
|
var y = e.apply(
|
|
2004
2004
|
this,
|
|
2005
|
-
|
|
2005
|
+
Ce(i, arguments)
|
|
2006
2006
|
);
|
|
2007
2007
|
return Object(y) === y ? y : this;
|
|
2008
2008
|
}
|
|
2009
2009
|
return e.apply(
|
|
2010
2010
|
t,
|
|
2011
|
-
|
|
2011
|
+
Ce(i, arguments)
|
|
2012
2012
|
);
|
|
2013
|
-
}, u =
|
|
2013
|
+
}, u = ai(0, e.length - i.length), s = [], h = 0; h < u; h++)
|
|
2014
2014
|
s[h] = "$" + h;
|
|
2015
|
-
if (a = Function("binder", "return function (" +
|
|
2015
|
+
if (a = Function("binder", "return function (" + ci(s, ",") + "){ return binder.apply(this,arguments); }")(f), e.prototype) {
|
|
2016
2016
|
var d = function() {
|
|
2017
2017
|
};
|
|
2018
2018
|
d.prototype = e.prototype, a.prototype = new d(), d.prototype = null;
|
|
2019
2019
|
}
|
|
2020
2020
|
return a;
|
|
2021
|
-
},
|
|
2022
|
-
function de() {
|
|
2023
|
-
return Ne || (Ne = 1, Ct = Function.prototype.apply), Ct;
|
|
2024
|
-
}
|
|
2025
|
-
var yi = typeof Reflect < "u" && Reflect && Reflect.apply, di = pt, gi = de(), wi = ye, mi = yi, vr = mi || di.call(wi, gi), bi = pt, vi = lt, Ei = ye, xi = vr, ge = function(t) {
|
|
2021
|
+
}, li = ui, pt = Function.prototype.bind || li, pe = Function.prototype.call, ye = Function.prototype.apply, hi = typeof Reflect < "u" && Reflect && Reflect.apply, pi = pt, yi = ye, di = pe, gi = hi, mr = gi || pi.call(di, yi), wi = pt, mi = lt, bi = pe, vi = mr, de = function(t) {
|
|
2026
2022
|
if (t.length < 1 || typeof t[0] != "function")
|
|
2027
|
-
throw new
|
|
2028
|
-
return
|
|
2029
|
-
},
|
|
2030
|
-
function
|
|
2031
|
-
if (
|
|
2032
|
-
|
|
2033
|
-
var r =
|
|
2023
|
+
throw new mi("a function is required");
|
|
2024
|
+
return vi(wi, bi, t);
|
|
2025
|
+
}, Ct, De;
|
|
2026
|
+
function Ei() {
|
|
2027
|
+
if (De) return Ct;
|
|
2028
|
+
De = 1;
|
|
2029
|
+
var r = de, t = ht, e;
|
|
2034
2030
|
try {
|
|
2035
2031
|
e = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2036
2032
|
[].__proto__ === Array.prototype;
|
|
@@ -2043,19 +2039,19 @@ function Ai() {
|
|
|
2043
2039
|
/** @type {keyof typeof Object.prototype} */
|
|
2044
2040
|
"__proto__"
|
|
2045
2041
|
), a = Object, f = a.getPrototypeOf;
|
|
2046
|
-
return
|
|
2042
|
+
return Ct = i && typeof i.get == "function" ? r([i.get]) : typeof f == "function" ? (
|
|
2047
2043
|
/** @type {import('./get')} */
|
|
2048
2044
|
function(s) {
|
|
2049
2045
|
return f(s == null ? s : a(s));
|
|
2050
2046
|
}
|
|
2051
|
-
) : !1,
|
|
2052
|
-
}
|
|
2053
|
-
var
|
|
2054
|
-
function
|
|
2055
|
-
if (
|
|
2056
|
-
|
|
2057
|
-
var r =
|
|
2058
|
-
return
|
|
2047
|
+
) : !1, Ct;
|
|
2048
|
+
}
|
|
2049
|
+
var Dt, Ne;
|
|
2050
|
+
function br() {
|
|
2051
|
+
if (Ne) return Dt;
|
|
2052
|
+
Ne = 1;
|
|
2053
|
+
var r = gr(), t = wr(), e = Ei();
|
|
2054
|
+
return Dt = r ? function(a) {
|
|
2059
2055
|
return r(a);
|
|
2060
2056
|
} : t ? function(a) {
|
|
2061
2057
|
if (!a || typeof a != "object" && typeof a != "function")
|
|
@@ -2063,33 +2059,33 @@ function Er() {
|
|
|
2063
2059
|
return t(a);
|
|
2064
2060
|
} : e ? function(a) {
|
|
2065
2061
|
return e(a);
|
|
2066
|
-
} : null,
|
|
2062
|
+
} : null, Dt;
|
|
2067
2063
|
}
|
|
2068
|
-
var
|
|
2069
|
-
function
|
|
2070
|
-
if (
|
|
2071
|
-
|
|
2064
|
+
var Nt, Me;
|
|
2065
|
+
function xi() {
|
|
2066
|
+
if (Me) return Nt;
|
|
2067
|
+
Me = 1;
|
|
2072
2068
|
var r = Function.prototype.call, t = Object.prototype.hasOwnProperty, e = pt;
|
|
2073
|
-
return
|
|
2069
|
+
return Nt = e.call(r, t), Nt;
|
|
2074
2070
|
}
|
|
2075
|
-
var A, Si =
|
|
2071
|
+
var A, Ai = pr, Bi = Gn, Si = qn, Ii = zn, _i = Hn, et = yr, tt = lt, Fi = Wn, Ui = Vn, $i = Jn, Pi = Yn, Ti = Xn, Oi = Kn, ki = Zn, Ri = ei, vr = Function, Mt = function(r) {
|
|
2076
2072
|
try {
|
|
2077
|
-
return
|
|
2073
|
+
return vr('"use strict"; return (' + r + ").constructor;")();
|
|
2078
2074
|
} catch {
|
|
2079
2075
|
}
|
|
2080
|
-
}, at = ht,
|
|
2076
|
+
}, at = ht, ji = It, Lt = function() {
|
|
2081
2077
|
throw new tt();
|
|
2082
|
-
},
|
|
2078
|
+
}, Ci = at ? function() {
|
|
2083
2079
|
try {
|
|
2084
|
-
return arguments.callee,
|
|
2080
|
+
return arguments.callee, Lt;
|
|
2085
2081
|
} catch {
|
|
2086
2082
|
try {
|
|
2087
2083
|
return at(arguments, "callee").get;
|
|
2088
2084
|
} catch {
|
|
2089
|
-
return
|
|
2085
|
+
return Lt;
|
|
2090
2086
|
}
|
|
2091
2087
|
}
|
|
2092
|
-
}() :
|
|
2088
|
+
}() : Lt, Z = ni()(), R = br(), Di = wr(), Ni = gr(), Er = ye, yt = pe, Q = {}, Mi = typeof Uint8Array > "u" || !R ? A : R(Uint8Array), Y = {
|
|
2093
2089
|
__proto__: null,
|
|
2094
2090
|
"%AggregateError%": typeof AggregateError > "u" ? A : AggregateError,
|
|
2095
2091
|
"%Array%": Array,
|
|
@@ -2111,15 +2107,15 @@ var A, Si = dr, Ii = zn, _i = Hn, Fi = Wn, Ui = Vn, et = gr, tt = lt, $i = Jn, P
|
|
|
2111
2107
|
"%decodeURIComponent%": decodeURIComponent,
|
|
2112
2108
|
"%encodeURI%": encodeURI,
|
|
2113
2109
|
"%encodeURIComponent%": encodeURIComponent,
|
|
2114
|
-
"%Error%":
|
|
2110
|
+
"%Error%": Bi,
|
|
2115
2111
|
"%eval%": eval,
|
|
2116
2112
|
// eslint-disable-line no-eval
|
|
2117
|
-
"%EvalError%":
|
|
2113
|
+
"%EvalError%": Si,
|
|
2118
2114
|
"%Float16Array%": typeof Float16Array > "u" ? A : Float16Array,
|
|
2119
2115
|
"%Float32Array%": typeof Float32Array > "u" ? A : Float32Array,
|
|
2120
2116
|
"%Float64Array%": typeof Float64Array > "u" ? A : Float64Array,
|
|
2121
2117
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? A : FinalizationRegistry,
|
|
2122
|
-
"%Function%":
|
|
2118
|
+
"%Function%": vr,
|
|
2123
2119
|
"%GeneratorFunction%": Q,
|
|
2124
2120
|
"%Int8Array%": typeof Int8Array > "u" ? A : Int8Array,
|
|
2125
2121
|
"%Int16Array%": typeof Int16Array > "u" ? A : Int16Array,
|
|
@@ -2132,14 +2128,14 @@ var A, Si = dr, Ii = zn, _i = Hn, Fi = Wn, Ui = Vn, et = gr, tt = lt, $i = Jn, P
|
|
|
2132
2128
|
"%MapIteratorPrototype%": typeof Map > "u" || !Z || !R ? A : R((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2133
2129
|
"%Math%": Math,
|
|
2134
2130
|
"%Number%": Number,
|
|
2135
|
-
"%Object%":
|
|
2131
|
+
"%Object%": Ai,
|
|
2136
2132
|
"%Object.getOwnPropertyDescriptor%": at,
|
|
2137
2133
|
"%parseFloat%": parseFloat,
|
|
2138
2134
|
"%parseInt%": parseInt,
|
|
2139
2135
|
"%Promise%": typeof Promise > "u" ? A : Promise,
|
|
2140
2136
|
"%Proxy%": typeof Proxy > "u" ? A : Proxy,
|
|
2141
|
-
"%RangeError%":
|
|
2142
|
-
"%ReferenceError%":
|
|
2137
|
+
"%RangeError%": Ii,
|
|
2138
|
+
"%ReferenceError%": _i,
|
|
2143
2139
|
"%Reflect%": typeof Reflect > "u" ? A : Reflect,
|
|
2144
2140
|
"%RegExp%": RegExp,
|
|
2145
2141
|
"%Set%": typeof Set > "u" ? A : Set,
|
|
@@ -2149,45 +2145,45 @@ var A, Si = dr, Ii = zn, _i = Hn, Fi = Wn, Ui = Vn, et = gr, tt = lt, $i = Jn, P
|
|
|
2149
2145
|
"%StringIteratorPrototype%": Z && R ? R(""[Symbol.iterator]()) : A,
|
|
2150
2146
|
"%Symbol%": Z ? Symbol : A,
|
|
2151
2147
|
"%SyntaxError%": et,
|
|
2152
|
-
"%ThrowTypeError%":
|
|
2153
|
-
"%TypedArray%":
|
|
2148
|
+
"%ThrowTypeError%": Ci,
|
|
2149
|
+
"%TypedArray%": Mi,
|
|
2154
2150
|
"%TypeError%": tt,
|
|
2155
2151
|
"%Uint8Array%": typeof Uint8Array > "u" ? A : Uint8Array,
|
|
2156
2152
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? A : Uint8ClampedArray,
|
|
2157
2153
|
"%Uint16Array%": typeof Uint16Array > "u" ? A : Uint16Array,
|
|
2158
2154
|
"%Uint32Array%": typeof Uint32Array > "u" ? A : Uint32Array,
|
|
2159
|
-
"%URIError%":
|
|
2155
|
+
"%URIError%": Fi,
|
|
2160
2156
|
"%WeakMap%": typeof WeakMap > "u" ? A : WeakMap,
|
|
2161
2157
|
"%WeakRef%": typeof WeakRef > "u" ? A : WeakRef,
|
|
2162
2158
|
"%WeakSet%": typeof WeakSet > "u" ? A : WeakSet,
|
|
2163
2159
|
"%Function.prototype.call%": yt,
|
|
2164
|
-
"%Function.prototype.apply%":
|
|
2165
|
-
"%Object.defineProperty%":
|
|
2166
|
-
"%Object.getPrototypeOf%":
|
|
2167
|
-
"%Math.abs%":
|
|
2168
|
-
"%Math.floor%":
|
|
2169
|
-
"%Math.max%":
|
|
2170
|
-
"%Math.min%":
|
|
2171
|
-
"%Math.pow%":
|
|
2172
|
-
"%Math.round%":
|
|
2173
|
-
"%Math.sign%":
|
|
2174
|
-
"%Reflect.getPrototypeOf%":
|
|
2160
|
+
"%Function.prototype.apply%": Er,
|
|
2161
|
+
"%Object.defineProperty%": ji,
|
|
2162
|
+
"%Object.getPrototypeOf%": Di,
|
|
2163
|
+
"%Math.abs%": Ui,
|
|
2164
|
+
"%Math.floor%": $i,
|
|
2165
|
+
"%Math.max%": Pi,
|
|
2166
|
+
"%Math.min%": Ti,
|
|
2167
|
+
"%Math.pow%": Oi,
|
|
2168
|
+
"%Math.round%": ki,
|
|
2169
|
+
"%Math.sign%": Ri,
|
|
2170
|
+
"%Reflect.getPrototypeOf%": Ni
|
|
2175
2171
|
};
|
|
2176
2172
|
if (R)
|
|
2177
2173
|
try {
|
|
2178
2174
|
null.error;
|
|
2179
2175
|
} catch (r) {
|
|
2180
|
-
var
|
|
2181
|
-
Y["%Error.prototype%"] =
|
|
2176
|
+
var Li = R(R(r));
|
|
2177
|
+
Y["%Error.prototype%"] = Li;
|
|
2182
2178
|
}
|
|
2183
|
-
var
|
|
2179
|
+
var Gi = function r(t) {
|
|
2184
2180
|
var e;
|
|
2185
2181
|
if (t === "%AsyncFunction%")
|
|
2186
|
-
e =
|
|
2182
|
+
e = Mt("async function () {}");
|
|
2187
2183
|
else if (t === "%GeneratorFunction%")
|
|
2188
|
-
e =
|
|
2184
|
+
e = Mt("function* () {}");
|
|
2189
2185
|
else if (t === "%AsyncGeneratorFunction%")
|
|
2190
|
-
e =
|
|
2186
|
+
e = Mt("async function* () {}");
|
|
2191
2187
|
else if (t === "%AsyncGenerator%") {
|
|
2192
2188
|
var i = r("%AsyncGeneratorFunction%");
|
|
2193
2189
|
i && (e = i.prototype);
|
|
@@ -2196,7 +2192,7 @@ var zi = function r(t) {
|
|
|
2196
2192
|
a && R && (e = R(a.prototype));
|
|
2197
2193
|
}
|
|
2198
2194
|
return Y[t] = e, e;
|
|
2199
|
-
},
|
|
2195
|
+
}, Le = {
|
|
2200
2196
|
__proto__: null,
|
|
2201
2197
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
2202
2198
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -2249,21 +2245,21 @@ var zi = function r(t) {
|
|
|
2249
2245
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2250
2246
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2251
2247
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2252
|
-
}, dt = pt, xt =
|
|
2248
|
+
}, dt = pt, xt = xi(), qi = dt.call(yt, Array.prototype.concat), zi = dt.call(Er, Array.prototype.splice), Ge = dt.call(yt, String.prototype.replace), At = dt.call(yt, String.prototype.slice), Hi = dt.call(yt, RegExp.prototype.exec), Wi = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Vi = /\\(\\)?/g, Ji = function(t) {
|
|
2253
2249
|
var e = At(t, 0, 1), i = At(t, -1);
|
|
2254
2250
|
if (e === "%" && i !== "%")
|
|
2255
2251
|
throw new et("invalid intrinsic syntax, expected closing `%`");
|
|
2256
2252
|
if (i === "%" && e !== "%")
|
|
2257
2253
|
throw new et("invalid intrinsic syntax, expected opening `%`");
|
|
2258
2254
|
var a = [];
|
|
2259
|
-
return
|
|
2260
|
-
a[a.length] = s ?
|
|
2255
|
+
return Ge(t, Wi, function(f, u, s, h) {
|
|
2256
|
+
a[a.length] = s ? Ge(h, Vi, "$1") : u || f;
|
|
2261
2257
|
}), a;
|
|
2262
|
-
},
|
|
2258
|
+
}, Yi = function(t, e) {
|
|
2263
2259
|
var i = t, a;
|
|
2264
|
-
if (xt(
|
|
2260
|
+
if (xt(Le, i) && (a = Le[i], i = "%" + a[0] + "%"), xt(Y, i)) {
|
|
2265
2261
|
var f = Y[i];
|
|
2266
|
-
if (f === Q && (f =
|
|
2262
|
+
if (f === Q && (f = Gi(i)), typeof f > "u" && !e)
|
|
2267
2263
|
throw new tt("intrinsic " + t + " exists, but is not available. Please file an issue!");
|
|
2268
2264
|
return {
|
|
2269
2265
|
alias: a,
|
|
@@ -2272,15 +2268,15 @@ var zi = function r(t) {
|
|
|
2272
2268
|
};
|
|
2273
2269
|
}
|
|
2274
2270
|
throw new et("intrinsic " + t + " does not exist!");
|
|
2275
|
-
},
|
|
2271
|
+
}, xr = function(t, e) {
|
|
2276
2272
|
if (typeof t != "string" || t.length === 0)
|
|
2277
2273
|
throw new tt("intrinsic name must be a non-empty string");
|
|
2278
2274
|
if (arguments.length > 1 && typeof e != "boolean")
|
|
2279
2275
|
throw new tt('"allowMissing" argument must be a boolean');
|
|
2280
|
-
if (
|
|
2276
|
+
if (Hi(/^%?[^%]*%?$/, t) === null)
|
|
2281
2277
|
throw new et("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2282
|
-
var i =
|
|
2283
|
-
d && (a = d[0],
|
|
2278
|
+
var i = Ji(t), a = i.length > 0 ? i[0] : "", f = Yi("%" + a + "%", e), u = f.name, s = f.value, h = !1, d = f.alias;
|
|
2279
|
+
d && (a = d[0], zi(i, qi([0, 1], d)));
|
|
2284
2280
|
for (var y = 1, g = !0; y < i.length; y += 1) {
|
|
2285
2281
|
var m = i[y], v = At(m, 0, 1), F = At(m, -1);
|
|
2286
2282
|
if ((v === '"' || v === "'" || v === "`" || F === '"' || F === "'" || F === "`") && v !== F)
|
|
@@ -2302,19 +2298,19 @@ var zi = function r(t) {
|
|
|
2302
2298
|
}
|
|
2303
2299
|
}
|
|
2304
2300
|
return s;
|
|
2305
|
-
},
|
|
2301
|
+
}, Ar = xr, Br = de, Xi = Br([Ar("%String.prototype.indexOf%")]), Sr = function(t, e) {
|
|
2306
2302
|
var i = (
|
|
2307
2303
|
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
2308
|
-
|
|
2304
|
+
Ar(t, !!e)
|
|
2309
2305
|
);
|
|
2310
|
-
return typeof i == "function" &&
|
|
2306
|
+
return typeof i == "function" && Xi(t, ".prototype.") > -1 ? Br(
|
|
2311
2307
|
/** @type {const} */
|
|
2312
2308
|
[i]
|
|
2313
2309
|
) : i;
|
|
2314
|
-
},
|
|
2315
|
-
function
|
|
2316
|
-
if (
|
|
2317
|
-
|
|
2310
|
+
}, Gt, qe;
|
|
2311
|
+
function Ki() {
|
|
2312
|
+
if (qe) return Gt;
|
|
2313
|
+
qe = 1;
|
|
2318
2314
|
var r = Function.prototype.toString, t = typeof Reflect == "object" && Reflect !== null && Reflect.apply, e, i;
|
|
2319
2315
|
if (typeof t == "function" && typeof Object.defineProperty == "function")
|
|
2320
2316
|
try {
|
|
@@ -2358,7 +2354,7 @@ function Qi() {
|
|
|
2358
2354
|
return !1;
|
|
2359
2355
|
});
|
|
2360
2356
|
}
|
|
2361
|
-
return
|
|
2357
|
+
return Gt = t ? function(E) {
|
|
2362
2358
|
if (B(E))
|
|
2363
2359
|
return !0;
|
|
2364
2360
|
if (!E || typeof E != "function" && typeof E != "object")
|
|
@@ -2381,13 +2377,13 @@ function Qi() {
|
|
|
2381
2377
|
return !1;
|
|
2382
2378
|
var P = s.call(E);
|
|
2383
2379
|
return P !== d && P !== y && !/^\[object HTML/.test(P) ? !1 : u(E);
|
|
2384
|
-
},
|
|
2380
|
+
}, Gt;
|
|
2385
2381
|
}
|
|
2386
|
-
var
|
|
2387
|
-
function
|
|
2388
|
-
if (
|
|
2389
|
-
|
|
2390
|
-
var r =
|
|
2382
|
+
var qt, ze;
|
|
2383
|
+
function Zi() {
|
|
2384
|
+
if (ze) return qt;
|
|
2385
|
+
ze = 1;
|
|
2386
|
+
var r = Ki(), t = Object.prototype.toString, e = Object.prototype.hasOwnProperty, i = function(h, d, y) {
|
|
2391
2387
|
for (var g = 0, m = h.length; g < m; g++)
|
|
2392
2388
|
e.call(h, g) && (y == null ? d(h[g], g, h) : d.call(y, h[g], g, h));
|
|
2393
2389
|
}, a = function(h, d, y) {
|
|
@@ -2400,16 +2396,16 @@ function to() {
|
|
|
2400
2396
|
function u(s) {
|
|
2401
2397
|
return t.call(s) === "[object Array]";
|
|
2402
2398
|
}
|
|
2403
|
-
return
|
|
2399
|
+
return qt = function(h, d, y) {
|
|
2404
2400
|
if (!r(d))
|
|
2405
2401
|
throw new TypeError("iterator must be a function");
|
|
2406
2402
|
var g;
|
|
2407
2403
|
arguments.length >= 3 && (g = y), u(h) ? i(h, d, g) : typeof h == "string" ? a(h, d, g) : f(h, d, g);
|
|
2408
|
-
},
|
|
2404
|
+
}, qt;
|
|
2409
2405
|
}
|
|
2410
|
-
var
|
|
2411
|
-
function
|
|
2412
|
-
return
|
|
2406
|
+
var zt, He;
|
|
2407
|
+
function Qi() {
|
|
2408
|
+
return He || (He = 1, zt = [
|
|
2413
2409
|
"Float16Array",
|
|
2414
2410
|
"Float32Array",
|
|
2415
2411
|
"Float64Array",
|
|
@@ -2422,25 +2418,25 @@ function eo() {
|
|
|
2422
2418
|
"Uint32Array",
|
|
2423
2419
|
"BigInt64Array",
|
|
2424
2420
|
"BigUint64Array"
|
|
2425
|
-
]),
|
|
2421
|
+
]), zt;
|
|
2426
2422
|
}
|
|
2427
|
-
var
|
|
2428
|
-
function
|
|
2429
|
-
if (
|
|
2430
|
-
|
|
2431
|
-
var r =
|
|
2432
|
-
return
|
|
2423
|
+
var Ht, We;
|
|
2424
|
+
function to() {
|
|
2425
|
+
if (We) return Ht;
|
|
2426
|
+
We = 1;
|
|
2427
|
+
var r = Qi(), t = typeof globalThis > "u" ? lr : globalThis;
|
|
2428
|
+
return Ht = function() {
|
|
2433
2429
|
for (var i = [], a = 0; a < r.length; a++)
|
|
2434
2430
|
typeof t[r[a]] == "function" && (i[i.length] = r[a]);
|
|
2435
2431
|
return i;
|
|
2436
|
-
},
|
|
2432
|
+
}, Ht;
|
|
2437
2433
|
}
|
|
2438
|
-
var
|
|
2439
|
-
function
|
|
2440
|
-
if (
|
|
2441
|
-
|
|
2442
|
-
var r = It, t =
|
|
2443
|
-
return
|
|
2434
|
+
var Wt = { exports: {} }, Vt, Ve;
|
|
2435
|
+
function eo() {
|
|
2436
|
+
if (Ve) return Vt;
|
|
2437
|
+
Ve = 1;
|
|
2438
|
+
var r = It, t = yr, e = lt, i = ht;
|
|
2439
|
+
return Vt = function(f, u, s) {
|
|
2444
2440
|
if (!f || typeof f != "object" && typeof f != "function")
|
|
2445
2441
|
throw new e("`obj` must be an object or a function`");
|
|
2446
2442
|
if (typeof u != "string" && typeof u != "symbol")
|
|
@@ -2465,12 +2461,12 @@ function no() {
|
|
|
2465
2461
|
f[u] = s;
|
|
2466
2462
|
else
|
|
2467
2463
|
throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2468
|
-
},
|
|
2464
|
+
}, Vt;
|
|
2469
2465
|
}
|
|
2470
|
-
var
|
|
2471
|
-
function
|
|
2472
|
-
if (
|
|
2473
|
-
|
|
2466
|
+
var Jt, Je;
|
|
2467
|
+
function ro() {
|
|
2468
|
+
if (Je) return Jt;
|
|
2469
|
+
Je = 1;
|
|
2474
2470
|
var r = It, t = function() {
|
|
2475
2471
|
return !!r;
|
|
2476
2472
|
};
|
|
@@ -2482,14 +2478,14 @@ function io() {
|
|
|
2482
2478
|
} catch {
|
|
2483
2479
|
return !0;
|
|
2484
2480
|
}
|
|
2485
|
-
},
|
|
2481
|
+
}, Jt = t, Jt;
|
|
2486
2482
|
}
|
|
2487
|
-
var
|
|
2488
|
-
function
|
|
2489
|
-
if (
|
|
2490
|
-
|
|
2491
|
-
var r =
|
|
2492
|
-
return
|
|
2483
|
+
var Yt, Ye;
|
|
2484
|
+
function no() {
|
|
2485
|
+
if (Ye) return Yt;
|
|
2486
|
+
Ye = 1;
|
|
2487
|
+
var r = xr, t = eo(), e = ro()(), i = ht, a = lt, f = r("%Math.floor%");
|
|
2488
|
+
return Yt = function(s, h) {
|
|
2493
2489
|
if (typeof s != "function")
|
|
2494
2490
|
throw new a("`fn` is not a function");
|
|
2495
2491
|
if (typeof h != "number" || h < 0 || h > 4294967295 || f(h) !== h)
|
|
@@ -2512,21 +2508,21 @@ function oo() {
|
|
|
2512
2508
|
"length",
|
|
2513
2509
|
h
|
|
2514
2510
|
)), s;
|
|
2515
|
-
},
|
|
2511
|
+
}, Yt;
|
|
2516
2512
|
}
|
|
2517
|
-
var
|
|
2518
|
-
function
|
|
2519
|
-
if (
|
|
2520
|
-
|
|
2521
|
-
var r = pt, t =
|
|
2522
|
-
return
|
|
2513
|
+
var Xt, Xe;
|
|
2514
|
+
function io() {
|
|
2515
|
+
if (Xe) return Xt;
|
|
2516
|
+
Xe = 1;
|
|
2517
|
+
var r = pt, t = ye, e = mr;
|
|
2518
|
+
return Xt = function() {
|
|
2523
2519
|
return e(r, t, arguments);
|
|
2524
|
-
},
|
|
2520
|
+
}, Xt;
|
|
2525
2521
|
}
|
|
2526
|
-
var
|
|
2527
|
-
function
|
|
2528
|
-
return
|
|
2529
|
-
var t =
|
|
2522
|
+
var Ke;
|
|
2523
|
+
function oo() {
|
|
2524
|
+
return Ke || (Ke = 1, function(r) {
|
|
2525
|
+
var t = no(), e = It, i = de, a = io();
|
|
2530
2526
|
r.exports = function(u) {
|
|
2531
2527
|
var s = i(arguments), h = u.length - (arguments.length - 1);
|
|
2532
2528
|
return t(
|
|
@@ -2535,22 +2531,22 @@ function so() {
|
|
|
2535
2531
|
!0
|
|
2536
2532
|
);
|
|
2537
2533
|
}, e ? e(r.exports, "apply", { value: a }) : r.exports.apply = a;
|
|
2538
|
-
}(
|
|
2534
|
+
}(Wt)), Wt.exports;
|
|
2539
2535
|
}
|
|
2540
|
-
var
|
|
2541
|
-
function
|
|
2542
|
-
if (
|
|
2543
|
-
|
|
2544
|
-
var r =
|
|
2545
|
-
return
|
|
2536
|
+
var Kt, Ze;
|
|
2537
|
+
function ao() {
|
|
2538
|
+
if (Ze) return Kt;
|
|
2539
|
+
Ze = 1;
|
|
2540
|
+
var r = dr();
|
|
2541
|
+
return Kt = function() {
|
|
2546
2542
|
return r() && !!Symbol.toStringTag;
|
|
2547
|
-
},
|
|
2543
|
+
}, Kt;
|
|
2548
2544
|
}
|
|
2549
|
-
var
|
|
2550
|
-
function
|
|
2551
|
-
if (
|
|
2552
|
-
|
|
2553
|
-
var r =
|
|
2545
|
+
var Zt, Qe;
|
|
2546
|
+
function so() {
|
|
2547
|
+
if (Qe) return Zt;
|
|
2548
|
+
Qe = 1;
|
|
2549
|
+
var r = Zi(), t = to(), e = oo(), i = Sr, a = ht, f = br(), u = i("Object.prototype.toString"), s = ao()(), h = typeof globalThis > "u" ? lr : globalThis, d = t(), y = i("String.prototype.slice"), g = i("Array.prototype.indexOf", !0) || function(B, x) {
|
|
2554
2550
|
for (var _ = 0; _ < B.length; _ += 1)
|
|
2555
2551
|
if (B[_] === x)
|
|
2556
2552
|
return _;
|
|
@@ -2606,7 +2602,7 @@ function co() {
|
|
|
2606
2602
|
}
|
|
2607
2603
|
), x;
|
|
2608
2604
|
};
|
|
2609
|
-
return
|
|
2605
|
+
return Zt = function(B) {
|
|
2610
2606
|
if (!B || typeof B != "object")
|
|
2611
2607
|
return !1;
|
|
2612
2608
|
if (!s) {
|
|
@@ -2614,36 +2610,36 @@ function co() {
|
|
|
2614
2610
|
return g(d, x) > -1 ? x : x !== "Object" ? !1 : F(B);
|
|
2615
2611
|
}
|
|
2616
2612
|
return a ? v(B) : null;
|
|
2617
|
-
},
|
|
2613
|
+
}, Zt;
|
|
2618
2614
|
}
|
|
2619
|
-
var
|
|
2620
|
-
function
|
|
2621
|
-
if (
|
|
2622
|
-
|
|
2623
|
-
var r =
|
|
2624
|
-
return
|
|
2615
|
+
var Qt, tr;
|
|
2616
|
+
function fo() {
|
|
2617
|
+
if (tr) return Qt;
|
|
2618
|
+
tr = 1;
|
|
2619
|
+
var r = so();
|
|
2620
|
+
return Qt = function(e) {
|
|
2625
2621
|
return !!r(e);
|
|
2626
|
-
},
|
|
2622
|
+
}, Qt;
|
|
2627
2623
|
}
|
|
2628
|
-
var
|
|
2629
|
-
if (!
|
|
2630
|
-
throw new
|
|
2624
|
+
var co = lt, uo = Sr, lo = uo("TypedArray.prototype.buffer", !0), ho = fo(), po = lo || function(t) {
|
|
2625
|
+
if (!ho(t))
|
|
2626
|
+
throw new co("Not a Typed Array");
|
|
2631
2627
|
return t.buffer;
|
|
2632
|
-
}, G =
|
|
2628
|
+
}, G = he.Buffer, yo = Ln, go = po, wo = ArrayBuffer.isView || function(t) {
|
|
2633
2629
|
try {
|
|
2634
|
-
return
|
|
2630
|
+
return go(t), !0;
|
|
2635
2631
|
} catch {
|
|
2636
2632
|
return !1;
|
|
2637
2633
|
}
|
|
2638
|
-
},
|
|
2634
|
+
}, mo = typeof Uint8Array < "u", Ir = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", bo = Ir && (G.prototype instanceof Uint8Array || G.TYPED_ARRAY_SUPPORT), vo = function(t, e) {
|
|
2639
2635
|
if (G.isBuffer(t))
|
|
2640
2636
|
return t.constructor && !("isBuffer" in t) ? G.from(t) : t;
|
|
2641
2637
|
if (typeof t == "string")
|
|
2642
2638
|
return G.from(t, e);
|
|
2643
|
-
if (
|
|
2639
|
+
if (Ir && wo(t)) {
|
|
2644
2640
|
if (t.byteLength === 0)
|
|
2645
2641
|
return G.alloc(0);
|
|
2646
|
-
if (
|
|
2642
|
+
if (bo) {
|
|
2647
2643
|
var i = G.from(t.buffer, t.byteOffset, t.byteLength);
|
|
2648
2644
|
if (i.byteLength === t.byteLength)
|
|
2649
2645
|
return i;
|
|
@@ -2652,9 +2648,9 @@ var lo = lt, ho = _r, po = ho("TypedArray.prototype.buffer", !0), yo = uo(), go
|
|
|
2652
2648
|
if (f.length === t.byteLength)
|
|
2653
2649
|
return f;
|
|
2654
2650
|
}
|
|
2655
|
-
if (
|
|
2651
|
+
if (mo && t instanceof Uint8Array)
|
|
2656
2652
|
return G.from(t);
|
|
2657
|
-
var u =
|
|
2653
|
+
var u = yo(t);
|
|
2658
2654
|
if (u)
|
|
2659
2655
|
for (var s = 0; s < t.length; s += 1) {
|
|
2660
2656
|
var h = t[s];
|
|
@@ -2664,12 +2660,12 @@ var lo = lt, ho = _r, po = ho("TypedArray.prototype.buffer", !0), yo = uo(), go
|
|
|
2664
2660
|
if (u || G.isBuffer(t) && t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t))
|
|
2665
2661
|
return G.from(t);
|
|
2666
2662
|
throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.');
|
|
2667
|
-
},
|
|
2663
|
+
}, Eo = he.Buffer, xo = vo;
|
|
2668
2664
|
function _t(r, t) {
|
|
2669
|
-
this._block =
|
|
2665
|
+
this._block = Eo.alloc(r), this._finalSize = t, this._blockSize = r, this._len = 0;
|
|
2670
2666
|
}
|
|
2671
2667
|
_t.prototype.update = function(r, t) {
|
|
2672
|
-
r =
|
|
2668
|
+
r = xo(r, t || "utf8");
|
|
2673
2669
|
for (var e = this._block, i = this._blockSize, a = r.length, f = this._len, u = 0; u < a; ) {
|
|
2674
2670
|
for (var s = f % i, h = Math.min(a - u, i - s), d = 0; d < h; d++)
|
|
2675
2671
|
e[s + d] = r[u + d];
|
|
@@ -2694,73 +2690,73 @@ _t.prototype.digest = function(r) {
|
|
|
2694
2690
|
_t.prototype._update = function() {
|
|
2695
2691
|
throw new Error("_update must be implemented by subclass");
|
|
2696
2692
|
};
|
|
2697
|
-
var
|
|
2693
|
+
var Ao = _t, Bo = Pn, _r = Ao, So = he.Buffer, Io = [
|
|
2698
2694
|
1518500249,
|
|
2699
2695
|
1859775393,
|
|
2700
2696
|
-1894007588,
|
|
2701
2697
|
-899497514
|
|
2702
|
-
],
|
|
2698
|
+
], _o = new Array(80);
|
|
2703
2699
|
function gt() {
|
|
2704
|
-
this.init(), this._w =
|
|
2700
|
+
this.init(), this._w = _o, _r.call(this, 64, 56);
|
|
2705
2701
|
}
|
|
2706
|
-
|
|
2702
|
+
Bo(gt, _r);
|
|
2707
2703
|
gt.prototype.init = function() {
|
|
2708
2704
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
2709
2705
|
};
|
|
2710
|
-
function
|
|
2706
|
+
function Fo(r) {
|
|
2711
2707
|
return r << 1 | r >>> 31;
|
|
2712
2708
|
}
|
|
2713
|
-
function
|
|
2709
|
+
function Uo(r) {
|
|
2714
2710
|
return r << 5 | r >>> 27;
|
|
2715
2711
|
}
|
|
2716
|
-
function
|
|
2712
|
+
function $o(r) {
|
|
2717
2713
|
return r << 30 | r >>> 2;
|
|
2718
2714
|
}
|
|
2719
|
-
function
|
|
2715
|
+
function Po(r, t, e, i) {
|
|
2720
2716
|
return r === 0 ? t & e | ~t & i : r === 2 ? t & e | t & i | e & i : t ^ e ^ i;
|
|
2721
2717
|
}
|
|
2722
2718
|
gt.prototype._update = function(r) {
|
|
2723
2719
|
for (var t = this._w, e = this._a | 0, i = this._b | 0, a = this._c | 0, f = this._d | 0, u = this._e | 0, s = 0; s < 16; ++s)
|
|
2724
2720
|
t[s] = r.readInt32BE(s * 4);
|
|
2725
2721
|
for (; s < 80; ++s)
|
|
2726
|
-
t[s] =
|
|
2722
|
+
t[s] = Fo(t[s - 3] ^ t[s - 8] ^ t[s - 14] ^ t[s - 16]);
|
|
2727
2723
|
for (var h = 0; h < 80; ++h) {
|
|
2728
|
-
var d = ~~(h / 20), y =
|
|
2729
|
-
u = f, f = a, a =
|
|
2724
|
+
var d = ~~(h / 20), y = Uo(e) + Po(d, i, a, f) + u + t[h] + Io[d] | 0;
|
|
2725
|
+
u = f, f = a, a = $o(i), i = e, e = y;
|
|
2730
2726
|
}
|
|
2731
2727
|
this._a = e + this._a | 0, this._b = i + this._b | 0, this._c = a + this._c | 0, this._d = f + this._d | 0, this._e = u + this._e | 0;
|
|
2732
2728
|
};
|
|
2733
2729
|
gt.prototype._hash = function() {
|
|
2734
|
-
var r =
|
|
2730
|
+
var r = So.allocUnsafe(20);
|
|
2735
2731
|
return r.writeInt32BE(this._a | 0, 0), r.writeInt32BE(this._b | 0, 4), r.writeInt32BE(this._c | 0, 8), r.writeInt32BE(this._d | 0, 12), r.writeInt32BE(this._e | 0, 16), r;
|
|
2736
2732
|
};
|
|
2737
|
-
var
|
|
2738
|
-
const
|
|
2739
|
-
function
|
|
2733
|
+
var To = gt;
|
|
2734
|
+
const Oo = /* @__PURE__ */ $n(To);
|
|
2735
|
+
function ko(r) {
|
|
2740
2736
|
let t = "";
|
|
2741
2737
|
for (const e of new Uint8Array(r))
|
|
2742
2738
|
e < 16 && (t += "0"), t += e.toString(16);
|
|
2743
2739
|
return t;
|
|
2744
2740
|
}
|
|
2745
|
-
let
|
|
2741
|
+
let te = null;
|
|
2746
2742
|
async function Bt(r) {
|
|
2747
|
-
return
|
|
2743
|
+
return te === null && (te = await jo()), te ? Fr(r) : Ro(r);
|
|
2748
2744
|
}
|
|
2749
|
-
function
|
|
2750
|
-
return new
|
|
2745
|
+
function Ro(r) {
|
|
2746
|
+
return new Oo().update(r).digest("hex");
|
|
2751
2747
|
}
|
|
2752
|
-
async function
|
|
2748
|
+
async function Fr(r) {
|
|
2753
2749
|
const t = await crypto.subtle.digest("SHA-1", r);
|
|
2754
|
-
return
|
|
2750
|
+
return ko(t);
|
|
2755
2751
|
}
|
|
2756
|
-
async function
|
|
2752
|
+
async function jo() {
|
|
2757
2753
|
try {
|
|
2758
|
-
if (await
|
|
2754
|
+
if (await Fr(new Uint8Array([])) === "da39a3ee5e6b4b0d3255bfef95601890afd80709") return !0;
|
|
2759
2755
|
} catch {
|
|
2760
2756
|
}
|
|
2761
2757
|
return !1;
|
|
2762
2758
|
}
|
|
2763
|
-
function
|
|
2759
|
+
function Co(r) {
|
|
2764
2760
|
const t = [];
|
|
2765
2761
|
let e = 0, i = 0;
|
|
2766
2762
|
do {
|
|
@@ -2770,7 +2766,7 @@ function No(r) {
|
|
|
2770
2766
|
} while (i);
|
|
2771
2767
|
return t.reduce((a, f) => a + 1 << 7 | f, -1);
|
|
2772
2768
|
}
|
|
2773
|
-
function
|
|
2769
|
+
function Do(r, t) {
|
|
2774
2770
|
let e = t, i = 4, a = null;
|
|
2775
2771
|
do
|
|
2776
2772
|
a = r.readUInt8(), e |= (a & 127) << i, i += 7;
|
|
@@ -2823,7 +2819,7 @@ class rt {
|
|
|
2823
2819
|
7: "ref-delta"
|
|
2824
2820
|
}, f = {}, u = t.slice(-20).toString("hex"), s = [], h = {}, d = /* @__PURE__ */ new Map();
|
|
2825
2821
|
let y = null, g = null;
|
|
2826
|
-
await
|
|
2822
|
+
await _n([t], async ({ data: B, type: x, reference: _, offset: E, num: P }) => {
|
|
2827
2823
|
y === null && (y = P);
|
|
2828
2824
|
const C = Math.floor(
|
|
2829
2825
|
(y - P) * 100 / y
|
|
@@ -2845,7 +2841,7 @@ class rt {
|
|
|
2845
2841
|
});
|
|
2846
2842
|
const m = Object.keys(f).map(Number);
|
|
2847
2843
|
for (const [B, x] of m.entries()) {
|
|
2848
|
-
const _ = B + 1 === m.length ? t.byteLength - 20 : m[B + 1], E = f[x], P =
|
|
2844
|
+
const _ = B + 1 === m.length ? t.byteLength - 20 : m[B + 1], E = f[x], P = Qr.buf(t.slice(x, _)) >>> 0;
|
|
2849
2845
|
E.end = _, E.crc = P;
|
|
2850
2846
|
}
|
|
2851
2847
|
const v = new rt({
|
|
@@ -2873,7 +2869,7 @@ class rt {
|
|
|
2873
2869
|
v.readDepth = 0, v.externalReadDepth = 0;
|
|
2874
2870
|
const { type: E, object: P } = await v.readSlice({ start: B });
|
|
2875
2871
|
$[v.readDepth] += 1;
|
|
2876
|
-
const C = await Bt(
|
|
2872
|
+
const C = await Bt(Sn.wrap({ type: E, object: P }));
|
|
2877
2873
|
_.oid = C, s.push(C), d.set(C, B), h[C] = _.crc;
|
|
2878
2874
|
} catch {
|
|
2879
2875
|
continue;
|
|
@@ -2944,10 +2940,10 @@ class rt {
|
|
|
2944
2940
|
throw new I("Unrecognized type: 0b" + u.toString(2));
|
|
2945
2941
|
const h = f & 15;
|
|
2946
2942
|
let d = h;
|
|
2947
|
-
f & 128 && (d =
|
|
2943
|
+
f & 128 && (d = Do(a, h));
|
|
2948
2944
|
let g = null, m = null;
|
|
2949
2945
|
if (s === "ofs_delta") {
|
|
2950
|
-
const F =
|
|
2946
|
+
const F = Co(a), $ = t - F;
|
|
2951
2947
|
({ object: g, type: s } = await this.readSlice({ start: $ }));
|
|
2952
2948
|
}
|
|
2953
2949
|
if (s === "ref_delta") {
|
|
@@ -2955,11 +2951,11 @@ class rt {
|
|
|
2955
2951
|
({ object: g, type: s } = await this.read({ oid: F }));
|
|
2956
2952
|
}
|
|
2957
2953
|
const v = i.slice(a.tell());
|
|
2958
|
-
if (m = Buffer.from(await
|
|
2954
|
+
if (m = Buffer.from(await Un(v)), m.byteLength !== d)
|
|
2959
2955
|
throw new I(
|
|
2960
2956
|
`Packfile told us object would have length ${d} but it had length ${m.byteLength}`
|
|
2961
2957
|
);
|
|
2962
|
-
return g && (m = Buffer.from(
|
|
2958
|
+
return g && (m = Buffer.from(In(m, g))), this.readDepth > 3 && (this.offsetCache[t] = { type: s, object: m }), { type: s, format: "content", object: m };
|
|
2963
2959
|
}
|
|
2964
2960
|
}
|
|
2965
2961
|
class st extends nt {
|
|
@@ -2985,27 +2981,27 @@ class Ft extends nt {
|
|
|
2985
2981
|
}
|
|
2986
2982
|
}
|
|
2987
2983
|
Ft.code = "ObjectTypeError";
|
|
2988
|
-
function
|
|
2984
|
+
function No(r) {
|
|
2989
2985
|
let t = r > 0 ? r >> 12 : 0;
|
|
2990
2986
|
t !== 4 && t !== 8 && t !== 10 && t !== 14 && (t = 8);
|
|
2991
2987
|
let e = r & 511;
|
|
2992
2988
|
return e & 73 ? e = 493 : e = 420, t !== 8 && (e = 0), (t << 12) + e;
|
|
2993
2989
|
}
|
|
2994
2990
|
const z = 2 ** 32;
|
|
2995
|
-
function
|
|
2991
|
+
function er(r, t, e, i) {
|
|
2996
2992
|
if (r !== void 0 && t !== void 0)
|
|
2997
2993
|
return [r, t];
|
|
2998
2994
|
e === void 0 && (e = i.valueOf());
|
|
2999
2995
|
const a = Math.floor(e / 1e3), f = (e - a * 1e3) * 1e6;
|
|
3000
2996
|
return [a, f];
|
|
3001
2997
|
}
|
|
3002
|
-
function
|
|
3003
|
-
const [t, e] =
|
|
2998
|
+
function rr(r) {
|
|
2999
|
+
const [t, e] = er(
|
|
3004
3000
|
r.ctimeSeconds,
|
|
3005
3001
|
r.ctimeNanoseconds,
|
|
3006
3002
|
r.ctimeMs,
|
|
3007
3003
|
r.ctime
|
|
3008
|
-
), [i, a] =
|
|
3004
|
+
), [i, a] = er(
|
|
3009
3005
|
r.mtimeSeconds,
|
|
3010
3006
|
r.mtimeNanoseconds,
|
|
3011
3007
|
r.mtimeMs,
|
|
@@ -3018,7 +3014,7 @@ function ir(r) {
|
|
|
3018
3014
|
mtimeNanoseconds: a % z,
|
|
3019
3015
|
dev: r.dev % z,
|
|
3020
3016
|
ino: r.ino % z,
|
|
3021
|
-
mode:
|
|
3017
|
+
mode: No(r.mode % z),
|
|
3022
3018
|
uid: r.uid % z,
|
|
3023
3019
|
gid: r.gid % z,
|
|
3024
3020
|
// size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers
|
|
@@ -3026,7 +3022,7 @@ function ir(r) {
|
|
|
3026
3022
|
size: r.size > -1 ? r.size % z : 0
|
|
3027
3023
|
};
|
|
3028
3024
|
}
|
|
3029
|
-
function
|
|
3025
|
+
function Mo(r) {
|
|
3030
3026
|
return {
|
|
3031
3027
|
assumeValid: !!(r & 32768),
|
|
3032
3028
|
extended: !!(r & 16384),
|
|
@@ -3034,7 +3030,7 @@ function Go(r) {
|
|
|
3034
3030
|
nameLength: r & 4095
|
|
3035
3031
|
};
|
|
3036
3032
|
}
|
|
3037
|
-
function
|
|
3033
|
+
function Lo(r) {
|
|
3038
3034
|
const t = r.flags;
|
|
3039
3035
|
return t.extended = !1, t.nameLength = Math.min(Buffer.from(r.path).length, 4095), (t.assumeValid ? 32768 : 0) + (t.extended ? 16384 : 0) + ((t.stage & 3) << 12) + (t.nameLength & 4095);
|
|
3040
3036
|
}
|
|
@@ -3081,7 +3077,7 @@ class J {
|
|
|
3081
3077
|
const y = {};
|
|
3082
3078
|
y.ctimeSeconds = i.readUInt32BE(), y.ctimeNanoseconds = i.readUInt32BE(), y.mtimeSeconds = i.readUInt32BE(), y.mtimeNanoseconds = i.readUInt32BE(), y.dev = i.readUInt32BE(), y.ino = i.readUInt32BE(), y.mode = i.readUInt32BE(), y.uid = i.readUInt32BE(), y.gid = i.readUInt32BE(), y.size = i.readUInt32BE(), y.oid = i.slice(20).toString("hex");
|
|
3083
3079
|
const g = i.readUInt16BE();
|
|
3084
|
-
y.flags =
|
|
3080
|
+
y.flags = Mo(g);
|
|
3085
3081
|
const m = t.indexOf(0, i.tell() + 1) - i.tell();
|
|
3086
3082
|
if (m < 1)
|
|
3087
3083
|
throw new I(`Got a path length of: ${m}`);
|
|
@@ -3105,7 +3101,7 @@ class J {
|
|
|
3105
3101
|
return [...this._unmergedPaths];
|
|
3106
3102
|
}
|
|
3107
3103
|
get entries() {
|
|
3108
|
-
return [...this._entries.values()].sort(
|
|
3104
|
+
return [...this._entries.values()].sort(cr);
|
|
3109
3105
|
}
|
|
3110
3106
|
get entriesMap() {
|
|
3111
3107
|
return this._entries;
|
|
@@ -3129,7 +3125,7 @@ class J {
|
|
|
3129
3125
|
uid: 0,
|
|
3130
3126
|
gid: 0,
|
|
3131
3127
|
size: 0
|
|
3132
|
-
}), e =
|
|
3128
|
+
}), e = rr(e);
|
|
3133
3129
|
const f = Buffer.from(t), u = {
|
|
3134
3130
|
ctimeSeconds: e.ctimeSeconds,
|
|
3135
3131
|
ctimeNanoseconds: e.ctimeNanoseconds,
|
|
@@ -3175,8 +3171,8 @@ class J {
|
|
|
3175
3171
|
`);
|
|
3176
3172
|
}
|
|
3177
3173
|
static async _entryToBuffer(t) {
|
|
3178
|
-
const e = Buffer.from(t.path), i = Math.ceil((62 + e.length + 1) / 8) * 8, a = Buffer.alloc(i), f = new H(a), u =
|
|
3179
|
-
return f.writeUInt32BE(u.ctimeSeconds), f.writeUInt32BE(u.ctimeNanoseconds), f.writeUInt32BE(u.mtimeSeconds), f.writeUInt32BE(u.mtimeNanoseconds), f.writeUInt32BE(u.dev), f.writeUInt32BE(u.ino), f.writeUInt32BE(u.mode), f.writeUInt32BE(u.uid), f.writeUInt32BE(u.gid), f.writeUInt32BE(u.size), f.write(t.oid, 20, "hex"), f.writeUInt16BE(
|
|
3174
|
+
const e = Buffer.from(t.path), i = Math.ceil((62 + e.length + 1) / 8) * 8, a = Buffer.alloc(i), f = new H(a), u = rr(t);
|
|
3175
|
+
return f.writeUInt32BE(u.ctimeSeconds), f.writeUInt32BE(u.ctimeNanoseconds), f.writeUInt32BE(u.mtimeSeconds), f.writeUInt32BE(u.mtimeNanoseconds), f.writeUInt32BE(u.dev), f.writeUInt32BE(u.ino), f.writeUInt32BE(u.mode), f.writeUInt32BE(u.uid), f.writeUInt32BE(u.gid), f.writeUInt32BE(u.size), f.write(t.oid, 20, "hex"), f.writeUInt16BE(Lo(t)), f.write(t.path, e.length, "utf8"), a;
|
|
3180
3176
|
}
|
|
3181
3177
|
async toObject() {
|
|
3182
3178
|
const t = Buffer.alloc(12), e = new H(t);
|
|
@@ -3191,8 +3187,8 @@ class J {
|
|
|
3191
3187
|
return Buffer.concat([f, Buffer.from(u, "hex")]);
|
|
3192
3188
|
}
|
|
3193
3189
|
}
|
|
3194
|
-
async function
|
|
3195
|
-
const e =
|
|
3190
|
+
async function Ur(r, t) {
|
|
3191
|
+
const e = ar(r);
|
|
3196
3192
|
for (; ; ) {
|
|
3197
3193
|
const { value: i, done: a } = await e.next();
|
|
3198
3194
|
if (i && await t(i), a) break;
|
|
@@ -3202,7 +3198,7 @@ async function Pr(r, t) {
|
|
|
3202
3198
|
async function ft(r) {
|
|
3203
3199
|
let t = 0;
|
|
3204
3200
|
const e = [];
|
|
3205
|
-
await
|
|
3201
|
+
await Ur(r, (f) => {
|
|
3206
3202
|
e.push(f), t += f.byteLength;
|
|
3207
3203
|
});
|
|
3208
3204
|
const i = new Uint8Array(t);
|
|
@@ -3211,7 +3207,7 @@ async function ft(r) {
|
|
|
3211
3207
|
i.set(f, a), a += f.byteLength;
|
|
3212
3208
|
return i;
|
|
3213
3209
|
}
|
|
3214
|
-
class
|
|
3210
|
+
class ee {
|
|
3215
3211
|
constructor() {
|
|
3216
3212
|
this._queue = [];
|
|
3217
3213
|
}
|
|
@@ -3247,9 +3243,9 @@ class re {
|
|
|
3247
3243
|
});
|
|
3248
3244
|
}
|
|
3249
3245
|
}
|
|
3250
|
-
class
|
|
3246
|
+
class Go {
|
|
3251
3247
|
static demux(t) {
|
|
3252
|
-
const e = j.streamReader(t), i = new
|
|
3248
|
+
const e = j.streamReader(t), i = new ee(), a = new ee(), f = new ee(), u = async function() {
|
|
3253
3249
|
const s = await e();
|
|
3254
3250
|
if (s === null) return u();
|
|
3255
3251
|
if (s === !0) {
|
|
@@ -3349,11 +3345,11 @@ class zo {
|
|
|
3349
3345
|
// return output
|
|
3350
3346
|
// }
|
|
3351
3347
|
}
|
|
3352
|
-
async function
|
|
3353
|
-
const { packetlines: t, packfile: e, progress: i } =
|
|
3348
|
+
async function $r(r) {
|
|
3349
|
+
const { packetlines: t, packfile: e, progress: i } = Go.demux(r), a = [], f = [], u = [];
|
|
3354
3350
|
let s = !1, h = !1;
|
|
3355
3351
|
return new Promise((d, y) => {
|
|
3356
|
-
|
|
3352
|
+
Ur(t, (g) => {
|
|
3357
3353
|
const m = g.toString("utf8").trim();
|
|
3358
3354
|
if (m.startsWith("shallow")) {
|
|
3359
3355
|
const v = m.slice(-41).trim();
|
|
@@ -3371,12 +3367,12 @@ async function Tr(r) {
|
|
|
3371
3367
|
});
|
|
3372
3368
|
});
|
|
3373
3369
|
}
|
|
3374
|
-
typeof globalThis.Buffer > "u" && (globalThis.Buffer =
|
|
3375
|
-
async function
|
|
3376
|
-
const a = await
|
|
3370
|
+
typeof globalThis.Buffer > "u" && (globalThis.Buffer = ue.Buffer);
|
|
3371
|
+
async function va(r, t, e, i) {
|
|
3372
|
+
const a = await Tr(r, t), f = await Vo(a.idx, t, e), u = e.map((m) => f[m].oid), s = u.length > 0 ? await Jo(r, u) : null, h = {};
|
|
3377
3373
|
if (await Promise.all(
|
|
3378
3374
|
e.map(async (m) => {
|
|
3379
|
-
s && (h[m] = await
|
|
3375
|
+
s && (h[m] = await Or(
|
|
3380
3376
|
s.idx,
|
|
3381
3377
|
f[m].oid
|
|
3382
3378
|
));
|
|
@@ -3405,27 +3401,27 @@ async function xa(r, t, e, i) {
|
|
|
3405
3401
|
files: h,
|
|
3406
3402
|
packfiles: d,
|
|
3407
3403
|
objects: [
|
|
3408
|
-
...await
|
|
3409
|
-
...await
|
|
3404
|
+
...await nr(a),
|
|
3405
|
+
...await nr(s)
|
|
3410
3406
|
],
|
|
3411
3407
|
fileOids: g
|
|
3412
3408
|
};
|
|
3413
3409
|
}
|
|
3414
|
-
const
|
|
3415
|
-
async function
|
|
3416
|
-
const e = await
|
|
3417
|
-
return i != null && i.object ?
|
|
3410
|
+
const qo = /^[0-9a-f]{40}$/i;
|
|
3411
|
+
async function Ea(r, t) {
|
|
3412
|
+
const e = await Tr(r, t), i = await Wo(e.idx, t);
|
|
3413
|
+
return i != null && i.object ? Pr(i) : [];
|
|
3418
3414
|
}
|
|
3419
|
-
async function
|
|
3420
|
-
const e = await
|
|
3415
|
+
async function xa(r, t) {
|
|
3416
|
+
const e = await Ho(r, t);
|
|
3421
3417
|
if (e.resolvedOid)
|
|
3422
3418
|
return e.resolvedOid;
|
|
3423
|
-
const i = await
|
|
3419
|
+
const i = await oe(r, e.refname);
|
|
3424
3420
|
if (!i)
|
|
3425
3421
|
throw new Error(`Git ref "${e.refname}" not found at ${r}`);
|
|
3426
3422
|
return i;
|
|
3427
3423
|
}
|
|
3428
|
-
function
|
|
3424
|
+
function Pr(r) {
|
|
3429
3425
|
return r.object.map((t) => {
|
|
3430
3426
|
if (t.type === "blob")
|
|
3431
3427
|
return {
|
|
@@ -3436,11 +3432,11 @@ function Or(r) {
|
|
|
3436
3432
|
return {
|
|
3437
3433
|
name: t.path,
|
|
3438
3434
|
type: "folder",
|
|
3439
|
-
children:
|
|
3435
|
+
children: Pr(t)
|
|
3440
3436
|
};
|
|
3441
3437
|
}).filter((t) => !!(t != null && t.name));
|
|
3442
3438
|
}
|
|
3443
|
-
async function
|
|
3439
|
+
async function zo(r, t) {
|
|
3444
3440
|
const e = Buffer.from(
|
|
3445
3441
|
await ft([
|
|
3446
3442
|
j.encode(`command=ls-refs
|
|
@@ -3466,13 +3462,13 @@ async function Wo(r, t) {
|
|
|
3466
3462
|
},
|
|
3467
3463
|
body: e
|
|
3468
3464
|
}), a = {};
|
|
3469
|
-
for await (const f of
|
|
3465
|
+
for await (const f of Yo(i)) {
|
|
3470
3466
|
const u = f.indexOf(" "), s = f.slice(0, u), d = f.slice(u + 1, f.length - 1).split(" ")[0];
|
|
3471
3467
|
a[d] = s;
|
|
3472
3468
|
}
|
|
3473
3469
|
return a;
|
|
3474
3470
|
}
|
|
3475
|
-
async function
|
|
3471
|
+
async function Ho(r, t) {
|
|
3476
3472
|
switch (t.type ?? "infer") {
|
|
3477
3473
|
case "commit":
|
|
3478
3474
|
return {
|
|
@@ -3507,20 +3503,20 @@ async function Vo(r, t) {
|
|
|
3507
3503
|
kind: "refname",
|
|
3508
3504
|
refname: i
|
|
3509
3505
|
};
|
|
3510
|
-
if (
|
|
3506
|
+
if (qo.test(i))
|
|
3511
3507
|
return {
|
|
3512
3508
|
kind: "commit",
|
|
3513
3509
|
refname: i,
|
|
3514
3510
|
resolvedOid: i
|
|
3515
3511
|
};
|
|
3516
|
-
const a = `refs/heads/${i}`, f = await
|
|
3512
|
+
const a = `refs/heads/${i}`, f = await oe(r, a);
|
|
3517
3513
|
if (f)
|
|
3518
3514
|
return {
|
|
3519
3515
|
kind: "refname",
|
|
3520
3516
|
refname: a,
|
|
3521
3517
|
resolvedOid: f
|
|
3522
3518
|
};
|
|
3523
|
-
const u = `refs/tags/${i}`, s = await
|
|
3519
|
+
const u = `refs/tags/${i}`, s = await oe(r, u);
|
|
3524
3520
|
if (s)
|
|
3525
3521
|
return {
|
|
3526
3522
|
kind: "refname",
|
|
@@ -3533,8 +3529,8 @@ async function Vo(r, t) {
|
|
|
3533
3529
|
throw new Error(`Invalid ref type: ${t.type}`);
|
|
3534
3530
|
}
|
|
3535
3531
|
}
|
|
3536
|
-
async function
|
|
3537
|
-
const e = await
|
|
3532
|
+
async function oe(r, t) {
|
|
3533
|
+
const e = await zo(r, t), i = [t, `${t}^{}`];
|
|
3538
3534
|
for (const a of i) {
|
|
3539
3535
|
const f = a.trim();
|
|
3540
3536
|
if (f in e)
|
|
@@ -3542,7 +3538,7 @@ async function ae(r, t) {
|
|
|
3542
3538
|
}
|
|
3543
3539
|
return null;
|
|
3544
3540
|
}
|
|
3545
|
-
async function
|
|
3541
|
+
async function Tr(r, t) {
|
|
3546
3542
|
const e = Buffer.from(
|
|
3547
3543
|
await ft([
|
|
3548
3544
|
j.encode(
|
|
@@ -3569,7 +3565,7 @@ async function kr(r, t) {
|
|
|
3569
3565
|
"Content-Length": `${e.length}`
|
|
3570
3566
|
},
|
|
3571
3567
|
body: e
|
|
3572
|
-
}), a =
|
|
3568
|
+
}), a = kr(i.body), f = await $r(a), u = Buffer.from(await ft(f.packfile)), s = await rt.fromPack({
|
|
3573
3569
|
pack: u
|
|
3574
3570
|
}), h = s.read;
|
|
3575
3571
|
return s.read = async function({ oid: d, ...y }) {
|
|
@@ -3581,7 +3577,7 @@ async function kr(r, t) {
|
|
|
3581
3577
|
promisor: !0
|
|
3582
3578
|
};
|
|
3583
3579
|
}
|
|
3584
|
-
async function
|
|
3580
|
+
async function Wo(r, t) {
|
|
3585
3581
|
const e = await r.read({
|
|
3586
3582
|
oid: t
|
|
3587
3583
|
});
|
|
@@ -3595,7 +3591,7 @@ async function Jo(r, t) {
|
|
|
3595
3591
|
}
|
|
3596
3592
|
return i;
|
|
3597
3593
|
}
|
|
3598
|
-
async function
|
|
3594
|
+
async function nr(r) {
|
|
3599
3595
|
if (!r)
|
|
3600
3596
|
return [];
|
|
3601
3597
|
const t = [], e = /* @__PURE__ */ new Set();
|
|
@@ -3614,7 +3610,7 @@ async function or(r) {
|
|
|
3614
3610
|
}
|
|
3615
3611
|
return t;
|
|
3616
3612
|
}
|
|
3617
|
-
async function
|
|
3613
|
+
async function Vo(r, t, e) {
|
|
3618
3614
|
const i = await r.read({
|
|
3619
3615
|
oid: t
|
|
3620
3616
|
});
|
|
@@ -3646,7 +3642,7 @@ async function Yo(r, t, e) {
|
|
|
3646
3642
|
}
|
|
3647
3643
|
return f;
|
|
3648
3644
|
}
|
|
3649
|
-
async function
|
|
3645
|
+
async function Jo(r, t) {
|
|
3650
3646
|
const e = Buffer.from(
|
|
3651
3647
|
await ft([
|
|
3652
3648
|
...t.map(
|
|
@@ -3667,7 +3663,7 @@ async function Xo(r, t) {
|
|
|
3667
3663
|
"Content-Length": `${e.length}`
|
|
3668
3664
|
},
|
|
3669
3665
|
body: e
|
|
3670
|
-
}), a =
|
|
3666
|
+
}), a = kr(i.body), f = await $r(a), u = Buffer.from(await ft(f.packfile));
|
|
3671
3667
|
return u.byteLength === 0 ? {
|
|
3672
3668
|
idx: await rt.fromPack({
|
|
3673
3669
|
pack: u
|
|
@@ -3682,7 +3678,7 @@ async function Xo(r, t) {
|
|
|
3682
3678
|
promisor: !1
|
|
3683
3679
|
};
|
|
3684
3680
|
}
|
|
3685
|
-
async function
|
|
3681
|
+
async function Or(r, t) {
|
|
3686
3682
|
const e = await r.read({ oid: t });
|
|
3687
3683
|
if (X(e), e.type === "blob")
|
|
3688
3684
|
return e.object;
|
|
@@ -3691,7 +3687,7 @@ async function Rr(r, t) {
|
|
|
3691
3687
|
if (u === "blob") {
|
|
3692
3688
|
const s = await r.read({ oid: f });
|
|
3693
3689
|
X(s), i[a] = s.object;
|
|
3694
|
-
} else u === "tree" && (i[a] = await
|
|
3690
|
+
} else u === "tree" && (i[a] = await Or(r, f));
|
|
3695
3691
|
return i;
|
|
3696
3692
|
}
|
|
3697
3693
|
function X(r) {
|
|
@@ -3701,7 +3697,7 @@ function X(r) {
|
|
|
3701
3697
|
r.object = M.from(r.object).parse();
|
|
3702
3698
|
break;
|
|
3703
3699
|
case "tree":
|
|
3704
|
-
r.object =
|
|
3700
|
+
r.object = ce.from(r.object).entries();
|
|
3705
3701
|
break;
|
|
3706
3702
|
case "blob":
|
|
3707
3703
|
r.object = new Uint8Array(r.object), r.format = "content";
|
|
@@ -3717,7 +3713,7 @@ function X(r) {
|
|
|
3717
3713
|
);
|
|
3718
3714
|
}
|
|
3719
3715
|
}
|
|
3720
|
-
async function*
|
|
3716
|
+
async function* Yo(r) {
|
|
3721
3717
|
const t = await r.text();
|
|
3722
3718
|
let e = 0;
|
|
3723
3719
|
for (; e <= t.length; ) {
|
|
@@ -3727,7 +3723,7 @@ async function* Ko(r) {
|
|
|
3727
3723
|
yield t.substring(e + 4, e + i), e += i;
|
|
3728
3724
|
}
|
|
3729
3725
|
}
|
|
3730
|
-
function
|
|
3726
|
+
function kr(r) {
|
|
3731
3727
|
if (r[Symbol.asyncIterator])
|
|
3732
3728
|
return r;
|
|
3733
3729
|
const t = r.getReader();
|
|
@@ -3746,8 +3742,8 @@ function jr(r) {
|
|
|
3746
3742
|
function ct(r) {
|
|
3747
3743
|
return r instanceof Uint8Array, Uint8Array.from(r);
|
|
3748
3744
|
}
|
|
3749
|
-
const
|
|
3750
|
-
async function
|
|
3745
|
+
const Xo = fe.deflate, Ko = /^[0-9a-f]{40}$/i;
|
|
3746
|
+
async function Zo(r) {
|
|
3751
3747
|
const t = {}, e = new TextEncoder();
|
|
3752
3748
|
return await Promise.all(
|
|
3753
3749
|
r.map(async ({ oid: i, type: a, body: f }) => {
|
|
@@ -3755,12 +3751,12 @@ async function ta(r) {
|
|
|
3755
3751
|
return;
|
|
3756
3752
|
const u = e.encode(`${a} ${f.length}\0`), s = new Uint8Array(u.length + f.length);
|
|
3757
3753
|
s.set(u, 0), s.set(f, u.length);
|
|
3758
|
-
const h = await
|
|
3754
|
+
const h = await Xo(s), d = i.slice(0, 2), y = i.slice(2);
|
|
3759
3755
|
t[`.git/objects/${d}/${y}`] = h;
|
|
3760
3756
|
})
|
|
3761
3757
|
), t;
|
|
3762
3758
|
}
|
|
3763
|
-
function
|
|
3759
|
+
function Qo(r, t, e) {
|
|
3764
3760
|
const i = (r == null ? void 0 : r.trim()) ?? "";
|
|
3765
3761
|
let a = null;
|
|
3766
3762
|
switch (t) {
|
|
@@ -3777,7 +3773,7 @@ function ea(r, t, e) {
|
|
|
3777
3773
|
a = null;
|
|
3778
3774
|
break;
|
|
3779
3775
|
default:
|
|
3780
|
-
i.startsWith("refs/") ? a = i :
|
|
3776
|
+
i.startsWith("refs/") ? a = i : Ko.test(i) ? a = null : i && i !== "HEAD" && (a = `refs/heads/${i}`);
|
|
3781
3777
|
break;
|
|
3782
3778
|
}
|
|
3783
3779
|
const f = a ? `ref: ${a}
|
|
@@ -3790,7 +3786,7 @@ function ea(r, t, e) {
|
|
|
3790
3786
|
tagName: d
|
|
3791
3787
|
};
|
|
3792
3788
|
}
|
|
3793
|
-
function
|
|
3789
|
+
function ta(r, {
|
|
3794
3790
|
branchName: t,
|
|
3795
3791
|
partialCloneFilter: e
|
|
3796
3792
|
}) {
|
|
@@ -3815,7 +3811,7 @@ function ra(r, {
|
|
|
3815
3811
|
`) + `
|
|
3816
3812
|
`;
|
|
3817
3813
|
}
|
|
3818
|
-
async function
|
|
3814
|
+
async function Aa({
|
|
3819
3815
|
repoUrl: r,
|
|
3820
3816
|
commitHash: t,
|
|
3821
3817
|
ref: e,
|
|
@@ -3824,8 +3820,8 @@ async function Sa({
|
|
|
3824
3820
|
fileOids: f,
|
|
3825
3821
|
pathPrefix: u
|
|
3826
3822
|
}) {
|
|
3827
|
-
const s = {}, h =
|
|
3828
|
-
s[".git/HEAD"] = h.headContent, s[".git/config"] =
|
|
3823
|
+
const s = {}, h = Qo(e, i, t);
|
|
3824
|
+
s[".git/HEAD"] = h.headContent, s[".git/config"] = ta(r, {
|
|
3829
3825
|
branchName: h.branchName
|
|
3830
3826
|
}), s[".git/description"] = `WordPress Playground clone
|
|
3831
3827
|
`, s[".git/shallow"] = `${t}
|
|
@@ -3834,7 +3830,7 @@ async function Sa({
|
|
|
3834
3830
|
`, s[`.git/refs/remotes/origin/${h.branchName}`] = `${t}
|
|
3835
3831
|
`, s[".git/refs/remotes/origin/HEAD"] = `ref: refs/remotes/origin/${h.branchName}
|
|
3836
3832
|
`), h.tagName && (s[`.git/refs/tags/${h.tagName}`] = `${t}
|
|
3837
|
-
`), Object.assign(s, await
|
|
3833
|
+
`), Object.assign(s, await Zo(a));
|
|
3838
3834
|
const d = new J();
|
|
3839
3835
|
for (const [g, m] of Object.entries(f)) {
|
|
3840
3836
|
const v = g.substring(u.length).replace(/^\/+/, "");
|
|
@@ -3859,8 +3855,8 @@ async function Sa({
|
|
|
3859
3855
|
const y = await d.toObject();
|
|
3860
3856
|
return s[".git/index"] = Uint8Array.from(y), s;
|
|
3861
3857
|
}
|
|
3862
|
-
function
|
|
3863
|
-
t =
|
|
3858
|
+
function Ba(r, t) {
|
|
3859
|
+
t = se(t);
|
|
3864
3860
|
const e = ["", ".", "/"].includes(t);
|
|
3865
3861
|
let i = r;
|
|
3866
3862
|
if (e)
|
|
@@ -3889,10 +3885,10 @@ function Ia(r, t) {
|
|
|
3889
3885
|
}
|
|
3890
3886
|
return a;
|
|
3891
3887
|
}
|
|
3892
|
-
function
|
|
3888
|
+
function Sa(r, t) {
|
|
3893
3889
|
return r.startsWith(t) ? r.substring(t.length) : r;
|
|
3894
3890
|
}
|
|
3895
|
-
class
|
|
3891
|
+
class Ia {
|
|
3896
3892
|
constructor(t) {
|
|
3897
3893
|
this.fileTree = t;
|
|
3898
3894
|
}
|
|
@@ -3924,24 +3920,24 @@ class Fa {
|
|
|
3924
3920
|
throw new Error(`File not found at ${t}`);
|
|
3925
3921
|
}
|
|
3926
3922
|
}
|
|
3927
|
-
class
|
|
3923
|
+
class ae {
|
|
3928
3924
|
constructor(t) {
|
|
3929
3925
|
this.entries = /* @__PURE__ */ new Map(), this.zipReader = t;
|
|
3930
3926
|
}
|
|
3931
3927
|
static fromStream(t) {
|
|
3932
|
-
const e = new
|
|
3933
|
-
new
|
|
3928
|
+
const e = new Ie(
|
|
3929
|
+
new _e(new ot(t, "archive.zip"))
|
|
3934
3930
|
);
|
|
3935
|
-
return new
|
|
3931
|
+
return new ae(e);
|
|
3936
3932
|
}
|
|
3937
3933
|
static fromArrayBuffer(t) {
|
|
3938
|
-
const e = new
|
|
3939
|
-
new
|
|
3934
|
+
const e = new Ie(
|
|
3935
|
+
new _e(new Blob([t]))
|
|
3940
3936
|
);
|
|
3941
|
-
return new
|
|
3937
|
+
return new ae(e);
|
|
3942
3938
|
}
|
|
3943
3939
|
async read(t) {
|
|
3944
|
-
const e = await this.getEntry(t), i = await e.getData(new
|
|
3940
|
+
const e = await this.getEntry(t), i = await e.getData(new tn());
|
|
3945
3941
|
return new ot(i.stream(), t, {
|
|
3946
3942
|
filesize: e.uncompressedSize
|
|
3947
3943
|
});
|
|
@@ -3961,7 +3957,7 @@ class se {
|
|
|
3961
3957
|
return this.entries;
|
|
3962
3958
|
}
|
|
3963
3959
|
}
|
|
3964
|
-
class
|
|
3960
|
+
class _a {
|
|
3965
3961
|
/**
|
|
3966
3962
|
* Creates a new OverlayFilesystem.
|
|
3967
3963
|
*
|
|
@@ -4001,7 +3997,7 @@ class Ua {
|
|
|
4001
3997
|
);
|
|
4002
3998
|
}
|
|
4003
3999
|
}
|
|
4004
|
-
class
|
|
4000
|
+
class Fa {
|
|
4005
4001
|
constructor(t) {
|
|
4006
4002
|
if (this.baseUrl = "", this.options = t, this.isDataUrl = t.baseUrl.startsWith("data:"), this.isDataUrl)
|
|
4007
4003
|
return;
|
|
@@ -4017,7 +4013,7 @@ class $a {
|
|
|
4017
4013
|
throw new Error(
|
|
4018
4014
|
"FetchFilesystem cannot fetch files from data URLs"
|
|
4019
4015
|
);
|
|
4020
|
-
t =
|
|
4016
|
+
t = se(t);
|
|
4021
4017
|
const e = t.replace(/^\//, ""), i = new URL(e, this.baseUrl).toString();
|
|
4022
4018
|
if (!i.startsWith(this.baseUrl))
|
|
4023
4019
|
throw new Error(
|
|
@@ -4032,7 +4028,7 @@ class $a {
|
|
|
4032
4028
|
return new ot(f.body, t, { filesize: u });
|
|
4033
4029
|
}
|
|
4034
4030
|
}
|
|
4035
|
-
class
|
|
4031
|
+
class Ua {
|
|
4036
4032
|
constructor(t) {
|
|
4037
4033
|
this.root = t;
|
|
4038
4034
|
}
|
|
@@ -4069,7 +4065,7 @@ class Pa {
|
|
|
4069
4065
|
)
|
|
4070
4066
|
) : e(
|
|
4071
4067
|
new ot(
|
|
4072
|
-
|
|
4068
|
+
ea(f),
|
|
4073
4069
|
t,
|
|
4074
4070
|
{
|
|
4075
4071
|
filesize: s.size
|
|
@@ -4080,7 +4076,7 @@ class Pa {
|
|
|
4080
4076
|
});
|
|
4081
4077
|
}
|
|
4082
4078
|
}
|
|
4083
|
-
function
|
|
4079
|
+
function ea(r) {
|
|
4084
4080
|
return new ReadableStream({
|
|
4085
4081
|
start(e) {
|
|
4086
4082
|
r.on("data", (i) => e.enqueue(i)), r.on("end", () => e.close());
|
|
@@ -4088,35 +4084,35 @@ function na(r) {
|
|
|
4088
4084
|
});
|
|
4089
4085
|
}
|
|
4090
4086
|
export {
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4087
|
+
Fa as FetchFilesystem,
|
|
4088
|
+
Ia as InMemoryFilesystem,
|
|
4089
|
+
Ua as NodeJsFilesystem,
|
|
4090
|
+
_a as OverlayFilesystem,
|
|
4091
|
+
ae as ZipFilesystem,
|
|
4092
|
+
wa as changeset,
|
|
4093
|
+
ba as clearContentsFromMountDevice,
|
|
4094
|
+
fa as createClient,
|
|
4095
|
+
ya as createCommit,
|
|
4096
|
+
Aa as createDotGitDirectory,
|
|
4097
|
+
ha as createOrUpdateBranch,
|
|
4098
|
+
da as createTree,
|
|
4099
|
+
Fe as createTreeNode,
|
|
4100
|
+
an as createTreeNodes,
|
|
4101
|
+
sn as deleteFile,
|
|
4102
|
+
un as directoryHandleFromMountDevice,
|
|
4103
|
+
ma as directoryHandleToOpfsPath,
|
|
4104
|
+
ca as filesListToObject,
|
|
4105
|
+
pa as fork,
|
|
4106
|
+
ua as getArtifact,
|
|
4107
|
+
en as getFilesFromDirectory,
|
|
4108
|
+
ga as iterateFiles,
|
|
4109
|
+
Ba as listDescendantFiles,
|
|
4110
|
+
Ea as listGitFiles,
|
|
4111
|
+
zo as listGitRefs,
|
|
4112
|
+
la as mayPush,
|
|
4113
|
+
ln as opfsPathToDirectoryHandle,
|
|
4114
|
+
Sa as removePathPrefix,
|
|
4115
|
+
xa as resolveCommitHash,
|
|
4116
|
+
va as sparseCheckout
|
|
4121
4117
|
};
|
|
4122
4118
|
//# sourceMappingURL=index.js.map
|