@gardenfi/core 0.2.0-beta.36 → 0.2.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -5
- package/dist/index.js +1119 -1241
- package/dist/src/lib/utils.d.ts +1 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,156 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var nt = (e, t, r) =>
|
|
1
|
+
var _i = Object.defineProperty;
|
|
2
|
+
var wi = (e, t, r) => t in e ? _i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var nt = (e, t, r) => wi(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { Ok as se, Err as H, Fetcher as Ht, trim0x as ze } from "@catalogfi/utils";
|
|
5
|
-
import {
|
|
6
|
-
import { Url as
|
|
7
|
-
import { createWalletClient as
|
|
8
|
-
import * as
|
|
5
|
+
import { ChainToID as gi, Orderbook as vi, isMainnet as Ot, isBitcoin as Pt, getBlockchainType as yt, BlockchainType as ke } from "@gardenfi/orderbook";
|
|
6
|
+
import { Url as An, fetchEVMBlockNumber as mr, with0x as Dt, checkAllowanceAndApprove as mi, Authorization as jr, sleep as xi, fetchBitcoinBlockNumber as Wr } from "@gardenfi/utils";
|
|
7
|
+
import { createWalletClient as qr, custom as Kr, getContract as Ei, sha256 as Mt } from "viem";
|
|
8
|
+
import * as Gr from "varuint-bitcoin";
|
|
9
9
|
import * as ft from "tiny-secp256k1";
|
|
10
|
-
import { Urgency as
|
|
10
|
+
import { Urgency as Vr } from "@catalogfi/wallets";
|
|
11
11
|
import * as de from "bitcoinjs-lib";
|
|
12
|
-
import { crypto as
|
|
13
|
-
import
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
return {
|
|
17
|
-
formatters: void 0,
|
|
18
|
-
fees: void 0,
|
|
19
|
-
serializers: void 0,
|
|
20
|
-
...e
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const Ti = /* @__PURE__ */ Vt({
|
|
24
|
-
id: 42161,
|
|
25
|
-
name: "Arbitrum One",
|
|
26
|
-
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
27
|
-
rpcUrls: {
|
|
28
|
-
default: {
|
|
29
|
-
http: ["https://arb1.arbitrum.io/rpc"]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
blockExplorers: {
|
|
33
|
-
default: {
|
|
34
|
-
name: "Arbiscan",
|
|
35
|
-
url: "https://arbiscan.io",
|
|
36
|
-
apiUrl: "https://api.arbiscan.io/api"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
contracts: {
|
|
40
|
-
multicall3: {
|
|
41
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
42
|
-
blockCreated: 7654707
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}), Ii = /* @__PURE__ */ Vt({
|
|
46
|
-
id: 421614,
|
|
47
|
-
name: "Arbitrum Sepolia",
|
|
48
|
-
nativeCurrency: {
|
|
49
|
-
name: "Arbitrum Sepolia Ether",
|
|
50
|
-
symbol: "ETH",
|
|
51
|
-
decimals: 18
|
|
52
|
-
},
|
|
53
|
-
rpcUrls: {
|
|
54
|
-
default: {
|
|
55
|
-
http: ["https://sepolia-rollup.arbitrum.io/rpc"]
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
blockExplorers: {
|
|
59
|
-
default: {
|
|
60
|
-
name: "Arbiscan",
|
|
61
|
-
url: "https://sepolia.arbiscan.io",
|
|
62
|
-
apiUrl: "https://api-sepolia.arbiscan.io/api"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
contracts: {
|
|
66
|
-
multicall3: {
|
|
67
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
68
|
-
blockCreated: 81930
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
testnet: !0
|
|
72
|
-
}), Ci = /* @__PURE__ */ Vt({
|
|
73
|
-
id: 1,
|
|
74
|
-
name: "Ethereum",
|
|
75
|
-
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
76
|
-
rpcUrls: {
|
|
77
|
-
default: {
|
|
78
|
-
http: ["https://cloudflare-eth.com"]
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
blockExplorers: {
|
|
82
|
-
default: {
|
|
83
|
-
name: "Etherscan",
|
|
84
|
-
url: "https://etherscan.io",
|
|
85
|
-
apiUrl: "https://api.etherscan.io/api"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
contracts: {
|
|
89
|
-
ensRegistry: {
|
|
90
|
-
address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
|
|
91
|
-
},
|
|
92
|
-
ensUniversalResolver: {
|
|
93
|
-
address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
|
|
94
|
-
blockCreated: 19258213
|
|
95
|
-
},
|
|
96
|
-
multicall3: {
|
|
97
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
98
|
-
blockCreated: 14353601
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}), ki = /* @__PURE__ */ Vt({
|
|
102
|
-
id: 11155111,
|
|
103
|
-
name: "Sepolia",
|
|
104
|
-
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
105
|
-
rpcUrls: {
|
|
106
|
-
default: {
|
|
107
|
-
http: ["https://rpc2.sepolia.org"]
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
blockExplorers: {
|
|
111
|
-
default: {
|
|
112
|
-
name: "Etherscan",
|
|
113
|
-
url: "https://sepolia.etherscan.io",
|
|
114
|
-
apiUrl: "https://api-sepolia.etherscan.io/api"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
contracts: {
|
|
118
|
-
multicall3: {
|
|
119
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
120
|
-
blockCreated: 751532
|
|
121
|
-
},
|
|
122
|
-
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
123
|
-
ensUniversalResolver: {
|
|
124
|
-
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
125
|
-
blockCreated: 5317080
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
testnet: !0
|
|
129
|
-
});
|
|
130
|
-
function Rr(e) {
|
|
12
|
+
import { crypto as Ri } from "bitcoinjs-lib";
|
|
13
|
+
import Bi from "bignumber.js";
|
|
14
|
+
var xr = /* @__PURE__ */ ((e) => (e[e.evm = 14400] = "evm", e[e.btc = 288] = "btc", e))(xr || {}), pe = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.Initiate = "Initiate", e.Redeem = "Redeem", e.Refund = "Refund", e))(pe || {});
|
|
15
|
+
function Er(e) {
|
|
131
16
|
return typeof e == "string" && (e = Buffer.from(e, "hex")), e.length === 32 ? e : e.subarray(1, 33);
|
|
132
17
|
}
|
|
133
18
|
function it(e, t) {
|
|
134
19
|
if (!e) throw new Error(t);
|
|
135
20
|
}
|
|
136
|
-
function
|
|
21
|
+
function Si(e) {
|
|
137
22
|
return Buffer.concat([
|
|
138
23
|
Uint8Array.from([192]),
|
|
139
|
-
|
|
24
|
+
Ai(e)
|
|
140
25
|
]);
|
|
141
26
|
}
|
|
142
|
-
function
|
|
143
|
-
const t =
|
|
144
|
-
return
|
|
27
|
+
function Ai(e) {
|
|
28
|
+
const t = Gr.encodingLength(e.length), r = Buffer.allocUnsafe(t);
|
|
29
|
+
return Gr.encode(e.length, r), Buffer.concat([r, e]);
|
|
145
30
|
}
|
|
146
|
-
function
|
|
31
|
+
function Ti(e, t) {
|
|
147
32
|
if (e.compare(t) > 0) {
|
|
148
33
|
const r = e;
|
|
149
34
|
e = t, t = r;
|
|
150
35
|
}
|
|
151
36
|
return [e, t];
|
|
152
37
|
}
|
|
153
|
-
const _t = (e) => e.length === 64 ? e : e.slice(2),
|
|
38
|
+
const _t = (e) => e.length === 64 ? e : e.slice(2), Ii = (e) => {
|
|
154
39
|
if (!e) return !1;
|
|
155
40
|
try {
|
|
156
41
|
const t = Buffer.from(e, "hex");
|
|
@@ -158,38 +43,31 @@ const _t = (e) => e.length === 64 ? e : e.slice(2), Pi = (e) => {
|
|
|
158
43
|
} catch {
|
|
159
44
|
return !1;
|
|
160
45
|
}
|
|
161
|
-
},
|
|
162
|
-
ethereum: Ci,
|
|
163
|
-
ethereum_arbitrum: Ti,
|
|
164
|
-
ethereum_sepolia: ki,
|
|
165
|
-
arbitrum_sepolia: Ii,
|
|
166
|
-
ethereum_localnet: mi,
|
|
167
|
-
arbitrum_localnet: vi
|
|
168
|
-
}, ef = async (e, t) => {
|
|
46
|
+
}, Vs = async (e, t) => {
|
|
169
47
|
var a;
|
|
170
|
-
const r =
|
|
48
|
+
const r = gi[e];
|
|
171
49
|
if (r)
|
|
172
50
|
try {
|
|
173
51
|
if (r.id === ((a = t.chain) == null ? void 0 : a.id))
|
|
174
52
|
return se({ message: "Already on the network", walletClient: t });
|
|
175
53
|
await t.switchChain({ id: r.id });
|
|
176
|
-
const o =
|
|
54
|
+
const o = qr({
|
|
177
55
|
account: t.account,
|
|
178
56
|
chain: r,
|
|
179
|
-
transport:
|
|
57
|
+
transport: Kr(window.ethereum)
|
|
180
58
|
});
|
|
181
59
|
return se({
|
|
182
60
|
message: "Switched chain",
|
|
183
61
|
walletClient: o
|
|
184
62
|
});
|
|
185
63
|
} catch (o) {
|
|
186
|
-
if (
|
|
64
|
+
if (Ci(o))
|
|
187
65
|
try {
|
|
188
66
|
await t.addChain({ chain: r });
|
|
189
|
-
const s =
|
|
67
|
+
const s = qr({
|
|
190
68
|
account: t.account,
|
|
191
69
|
chain: r,
|
|
192
|
-
transport:
|
|
70
|
+
transport: Kr(window.ethereum)
|
|
193
71
|
});
|
|
194
72
|
return se({
|
|
195
73
|
message: "Added network",
|
|
@@ -203,13 +81,13 @@ const _t = (e) => e.length === 64 ? e : e.slice(2), Pi = (e) => {
|
|
|
203
81
|
}
|
|
204
82
|
else
|
|
205
83
|
return H("Chain not supported");
|
|
206
|
-
},
|
|
84
|
+
}, Ci = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
|
|
207
85
|
var ie = /* @__PURE__ */ ((e) => (e.Created = "Created", e.Matched = "Matched", e.InitiateDetected = "InitiateDetected", e.Initiated = "Initiated", e.CounterPartyInitiateDetected = "CounterPartyInitiateDetected", e.CounterPartyInitiated = "CounterPartyInitiated", e.RedeemDetected = "RedeemDetected", e.Redeemed = "Redeemed", e.CounterPartyRedeemDetected = "CounterPartyRedeemDetected", e.CounterPartyRedeemed = "CounterPartyRedeemed", e.Completed = "Completed", e.CounterPartySwapExpired = "CounterPartySwapExpired", e.Expired = "Expired", e.RefundDetected = "RefundDetected", e.Refunded = "Refunded", e.CounterPartyRefundDetected = "CounterPartyRefundDetected", e.CounterPartyRefunded = "CounterPartyRefunded", e.Cancelled = "Cancelled", e.DeadLineExceeded = "DeadLineExceeded", e))(ie || {}), Z = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.InitiateDetected = "InitiateDetected", e.Initiated = "Initiated", e.RedeemDetected = "RedeemDetected", e.Redeemed = "Redeemed", e.RefundDetected = "RefundDetected", e.Refunded = "Refunded", e.Expired = "Expired", e))(Z || {});
|
|
208
|
-
const
|
|
209
|
-
const a =
|
|
86
|
+
const ki = (e, t, r) => {
|
|
87
|
+
const a = Rr(
|
|
210
88
|
e.source_swap,
|
|
211
89
|
t
|
|
212
|
-
), o =
|
|
90
|
+
), o = Rr(
|
|
213
91
|
e.destination_swap,
|
|
214
92
|
r
|
|
215
93
|
);
|
|
@@ -233,8 +111,8 @@ const Di = (e, t, r) => {
|
|
|
233
111
|
const s = Number(
|
|
234
112
|
e.create_order.additional_data.deadline
|
|
235
113
|
);
|
|
236
|
-
return o === Z.Initiated ? ie.CounterPartyInitiated : o === Z.InitiateDetected ? ie.CounterPartyInitiateDetected :
|
|
237
|
-
},
|
|
114
|
+
return o === Z.Initiated ? ie.CounterPartyInitiated : o === Z.InitiateDetected ? ie.CounterPartyInitiateDetected : Jr(s, 12) ? ie.DeadLineExceeded : a === Z.Initiated ? ie.Initiated : Jr(s, 1) ? ie.DeadLineExceeded : a === Z.InitiateDetected ? ie.InitiateDetected : ie.Matched;
|
|
115
|
+
}, Rr = (e, t) => {
|
|
238
116
|
if (e.redeem_tx_hash)
|
|
239
117
|
return e.redeem_block_number ? Z.Redeemed : Z.RedeemDetected;
|
|
240
118
|
if (e.refund_tx_hash)
|
|
@@ -244,8 +122,8 @@ const Di = (e, t, r) => {
|
|
|
244
122
|
if (t > r) return Z.Expired;
|
|
245
123
|
}
|
|
246
124
|
return e.initiate_tx_hash ? e.initiate_block_number ? Z.Initiated : Z.InitiateDetected : Z.Idle;
|
|
247
|
-
},
|
|
248
|
-
switch (
|
|
125
|
+
}, Li = (e, t, r) => {
|
|
126
|
+
switch (ki(
|
|
249
127
|
e,
|
|
250
128
|
t,
|
|
251
129
|
r
|
|
@@ -259,10 +137,10 @@ const Di = (e, t, r) => {
|
|
|
259
137
|
default:
|
|
260
138
|
return pe.Idle;
|
|
261
139
|
}
|
|
262
|
-
},
|
|
140
|
+
}, Jr = (e, t = 0) => {
|
|
263
141
|
const r = Date.now(), a = e * 1e3 + t * 36e5;
|
|
264
142
|
return r >= a;
|
|
265
|
-
},
|
|
143
|
+
}, Oi = [
|
|
266
144
|
{
|
|
267
145
|
inputs: [
|
|
268
146
|
{
|
|
@@ -655,20 +533,20 @@ const Di = (e, t, r) => {
|
|
|
655
533
|
type: "function"
|
|
656
534
|
}
|
|
657
535
|
];
|
|
658
|
-
class
|
|
536
|
+
class Pi {
|
|
659
537
|
constructor(t, r, a) {
|
|
660
|
-
this.url = new
|
|
538
|
+
this.url = new An("/relayer", r), this.auth = a, this.order = t;
|
|
661
539
|
}
|
|
662
540
|
async init(t, r) {
|
|
663
541
|
if (!t.account) return H("No account found");
|
|
664
542
|
if (t.account.address.toLowerCase() !== this.order.source_swap.initiator.toLowerCase())
|
|
665
543
|
return H("Account address and order initiator mismatch");
|
|
666
544
|
if (!r) {
|
|
667
|
-
const
|
|
668
|
-
if (
|
|
669
|
-
r =
|
|
545
|
+
const v = await mr(t);
|
|
546
|
+
if (v.error) return H(v.error);
|
|
547
|
+
r = v.val;
|
|
670
548
|
}
|
|
671
|
-
if (
|
|
549
|
+
if (Rr(
|
|
672
550
|
this.order.source_swap,
|
|
673
551
|
r
|
|
674
552
|
) !== Z.Idle) return H("Invalid swap status");
|
|
@@ -677,20 +555,20 @@ class Hi {
|
|
|
677
555
|
return H("Invalid order");
|
|
678
556
|
const c = Dt(o.secret_hash), u = BigInt(o.timelock), p = Dt(s.redeemer), g = BigInt(s.amount);
|
|
679
557
|
try {
|
|
680
|
-
const
|
|
681
|
-
if (
|
|
682
|
-
const
|
|
558
|
+
const v = await this.auth.getToken();
|
|
559
|
+
if (v.error) return H(v.error);
|
|
560
|
+
const m = Ei({
|
|
683
561
|
address: Dt(this.order.source_swap.asset),
|
|
684
|
-
abi:
|
|
562
|
+
abi: Oi,
|
|
685
563
|
client: t
|
|
686
|
-
}), T = await
|
|
564
|
+
}), T = await m.read.token(), k = await mi(
|
|
687
565
|
Number(g),
|
|
688
566
|
T,
|
|
689
567
|
this.order.source_swap.asset,
|
|
690
568
|
t
|
|
691
569
|
);
|
|
692
570
|
if (k.error) return H(k.error);
|
|
693
|
-
const B = await
|
|
571
|
+
const B = await m.read.eip712Domain(), C = await t.signTypedData({
|
|
694
572
|
account: t.account,
|
|
695
573
|
domain: {
|
|
696
574
|
name: B[1],
|
|
@@ -722,14 +600,14 @@ class Hi {
|
|
|
722
600
|
perform_on: "Source"
|
|
723
601
|
}),
|
|
724
602
|
headers: {
|
|
725
|
-
Authorization:
|
|
603
|
+
Authorization: jr(v.val),
|
|
726
604
|
"Content-Type": "application/json"
|
|
727
605
|
}
|
|
728
606
|
}
|
|
729
607
|
);
|
|
730
608
|
return A.error ? H(A.error) : A.result ? se(A.result) : H("Init: No result found");
|
|
731
|
-
} catch (
|
|
732
|
-
return console.log("init error :",
|
|
609
|
+
} catch (v) {
|
|
610
|
+
return console.log("init error :", v), H(String(v));
|
|
733
611
|
}
|
|
734
612
|
}
|
|
735
613
|
async redeem(t, r) {
|
|
@@ -745,7 +623,7 @@ class Hi {
|
|
|
745
623
|
perform_on: "Destination"
|
|
746
624
|
}),
|
|
747
625
|
headers: {
|
|
748
|
-
Authorization:
|
|
626
|
+
Authorization: jr(a.val),
|
|
749
627
|
"Content-Type": "application/json"
|
|
750
628
|
}
|
|
751
629
|
}
|
|
@@ -756,29 +634,29 @@ class Hi {
|
|
|
756
634
|
}
|
|
757
635
|
}
|
|
758
636
|
}
|
|
759
|
-
const
|
|
637
|
+
const Mi = Buffer.from(
|
|
760
638
|
"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
|
761
639
|
"hex"
|
|
762
|
-
),
|
|
640
|
+
), Fi = Buffer.from(
|
|
763
641
|
"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
|
|
764
642
|
"hex"
|
|
765
|
-
),
|
|
643
|
+
), Ni = Buffer.concat([Mi, Fi]), Di = Buffer.from(
|
|
766
644
|
"0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
|
|
767
645
|
"hex"
|
|
768
|
-
),
|
|
646
|
+
), Yr = {
|
|
769
647
|
failedToCreateInternalPubkey: "failed to create internal pubkey",
|
|
770
648
|
failedToTweakPubkey: "failed to tweak pubkey"
|
|
771
649
|
};
|
|
772
|
-
function
|
|
773
|
-
const e =
|
|
774
|
-
Buffer.concat([Buffer.from("04", "hex"),
|
|
650
|
+
function Ui() {
|
|
651
|
+
const e = Ri.sha256(Buffer.from("GardenHTLC", "utf-8")), t = ft.pointMultiply(
|
|
652
|
+
Buffer.concat([Buffer.from("04", "hex"), Ni]),
|
|
775
653
|
e
|
|
776
654
|
);
|
|
777
655
|
if (!t)
|
|
778
|
-
throw new Error(
|
|
779
|
-
const r = ft.pointAdd(
|
|
780
|
-
if (!r) throw new Error(
|
|
781
|
-
return
|
|
656
|
+
throw new Error(Yr.failedToCreateInternalPubkey);
|
|
657
|
+
const r = ft.pointAdd(Di, t);
|
|
658
|
+
if (!r) throw new Error(Yr.failedToCreateInternalPubkey);
|
|
659
|
+
return Er(Buffer.from(r));
|
|
782
660
|
}
|
|
783
661
|
const ye = {
|
|
784
662
|
secretMismatch: "invalid secret",
|
|
@@ -793,14 +671,14 @@ const ye = {
|
|
|
793
671
|
htlcNotExpired: (e) => `HTLC not expired, need more ${e} blocks`,
|
|
794
672
|
controlBlockGenerationFailed: "failed to generate control block",
|
|
795
673
|
invalidLeaf: "invalid leaf"
|
|
796
|
-
},
|
|
674
|
+
}, Ft = 192;
|
|
797
675
|
de.initEccLib(ft);
|
|
798
676
|
class jt {
|
|
799
677
|
/**
|
|
800
678
|
* Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
|
|
801
679
|
*/
|
|
802
680
|
constructor(t, r, a, o, s, c, u, p) {
|
|
803
|
-
this.secretHash = a, this.redeemerPubkey = o, this.initiatorPubkey = s, this.expiry = c, this.signer = t, this.network = u, this.internalPubkey =
|
|
681
|
+
this.secretHash = a, this.redeemerPubkey = o, this.initiatorPubkey = s, this.expiry = c, this.signer = t, this.network = u, this.internalPubkey = Ui(), this.initiateAmount = r, this.utxoHashes = p;
|
|
804
682
|
}
|
|
805
683
|
/**
|
|
806
684
|
* Creates a GardenHTLC instance
|
|
@@ -828,8 +706,8 @@ class jt {
|
|
|
828
706
|
t,
|
|
829
707
|
r,
|
|
830
708
|
a,
|
|
831
|
-
|
|
832
|
-
|
|
709
|
+
Er(s).toString("hex"),
|
|
710
|
+
Er(o).toString("hex"),
|
|
833
711
|
c,
|
|
834
712
|
p,
|
|
835
713
|
u
|
|
@@ -861,12 +739,12 @@ class jt {
|
|
|
861
739
|
if (this.utxoHashes && this.utxoHashes.length > 0)
|
|
862
740
|
for (const p of this.utxoHashes) {
|
|
863
741
|
const g = await s.getTransaction(p);
|
|
864
|
-
for (let
|
|
865
|
-
const
|
|
866
|
-
|
|
742
|
+
for (let v = 0; v < g.vout.length; v++) {
|
|
743
|
+
const m = g.vout[v];
|
|
744
|
+
m.scriptpubkey_address === o && c.push({
|
|
867
745
|
txid: g.txid,
|
|
868
|
-
vout:
|
|
869
|
-
value:
|
|
746
|
+
vout: v,
|
|
747
|
+
value: m.value,
|
|
870
748
|
status: { confirmed: !1 }
|
|
871
749
|
});
|
|
872
750
|
}
|
|
@@ -877,7 +755,7 @@ class jt {
|
|
|
877
755
|
if (u === 0) throw new Error(`${o} ${ye.notFunded}`);
|
|
878
756
|
for (let p = 0; p < c.length; p++)
|
|
879
757
|
a.addInput(Buffer.from(c[p].txid, "hex").reverse(), c[p].vout);
|
|
880
|
-
return r ?? (r = await s.suggestFee(o, u,
|
|
758
|
+
return r ?? (r = await s.suggestFee(o, u, Vr.MEDIUM)), a.addOutput(
|
|
881
759
|
de.address.toOutputScript(t, this.network),
|
|
882
760
|
u - r
|
|
883
761
|
), { tx: a, usedUtxos: c };
|
|
@@ -899,7 +777,7 @@ class jt {
|
|
|
899
777
|
return t ?? (t = await (await this.signer.getProvider()).suggestFee(
|
|
900
778
|
await this.signer.getAddress(),
|
|
901
779
|
this.initiateAmount,
|
|
902
|
-
|
|
780
|
+
Vr.MEDIUM
|
|
903
781
|
)), await this.signer.send(this.address(), this.initiateAmount, t);
|
|
904
782
|
}
|
|
905
783
|
/**
|
|
@@ -910,16 +788,16 @@ class jt {
|
|
|
910
788
|
async instantRefund(t, r) {
|
|
911
789
|
it(t.length > 0, ye.noCounterpartySigs);
|
|
912
790
|
const { tx: a, usedUtxos: o } = await this.buildRawTx(r);
|
|
913
|
-
for (const
|
|
914
|
-
if (!t.find((T) => T.utxo ===
|
|
915
|
-
throw new Error(ye.counterPartySigNotFound(
|
|
791
|
+
for (const m of o)
|
|
792
|
+
if (!t.find((T) => T.utxo === m.txid))
|
|
793
|
+
throw new Error(ye.counterPartySigNotFound(m.txid));
|
|
916
794
|
const s = this.getOutputScript(), c = de.Transaction.SIGHASH_DEFAULT, u = this.leafHash(
|
|
917
795
|
2
|
|
918
796
|
/* INSTANT_REFUND */
|
|
919
|
-
), p = o.map((
|
|
920
|
-
for (let
|
|
797
|
+
), p = o.map((m) => m.value), g = ar(s, o.length);
|
|
798
|
+
for (let m = 0; m < a.ins.length; m++) {
|
|
921
799
|
const T = a.hashForWitnessV1(
|
|
922
|
-
|
|
800
|
+
m,
|
|
923
801
|
g,
|
|
924
802
|
p,
|
|
925
803
|
c,
|
|
@@ -928,15 +806,15 @@ class jt {
|
|
|
928
806
|
if (!ft.verifySchnorr(
|
|
929
807
|
T,
|
|
930
808
|
Buffer.from(this.redeemerPubkey, "hex"),
|
|
931
|
-
Buffer.from(t[
|
|
809
|
+
Buffer.from(t[m].sig, "hex")
|
|
932
810
|
))
|
|
933
811
|
throw new Error(
|
|
934
|
-
ye.invalidCounterpartySigForUTXO(t[
|
|
812
|
+
ye.invalidCounterpartySigForUTXO(t[m].utxo)
|
|
935
813
|
);
|
|
936
|
-
const k = await this.signer.signSchnorr(T), B = Buffer.from(a.ins[
|
|
814
|
+
const k = await this.signer.signSchnorr(T), B = Buffer.from(a.ins[m].hash).reverse().toString("hex"), C = t.find((A) => A.utxo === B);
|
|
937
815
|
if (!C)
|
|
938
816
|
throw new Error(ye.counterPartySigNotFound(B));
|
|
939
|
-
a.setWitness(
|
|
817
|
+
a.setWitness(m, [
|
|
940
818
|
Buffer.from(C.sig, "hex"),
|
|
941
819
|
k,
|
|
942
820
|
this.instantRefundLeaf(),
|
|
@@ -962,16 +840,16 @@ class jt {
|
|
|
962
840
|
), c = this.leafHash(
|
|
963
841
|
1
|
|
964
842
|
/* REDEEM */
|
|
965
|
-
), u = s.map((
|
|
966
|
-
for (let
|
|
843
|
+
), u = s.map((m) => m.value), p = ar(this.getOutputScript(), s.length), g = de.Transaction.SIGHASH_DEFAULT;
|
|
844
|
+
for (let m = 0; m < o.ins.length; m++) {
|
|
967
845
|
const T = o.hashForWitnessV1(
|
|
968
|
-
|
|
846
|
+
m,
|
|
969
847
|
p,
|
|
970
848
|
u,
|
|
971
849
|
g,
|
|
972
850
|
c
|
|
973
851
|
), k = await this.signer.signSchnorr(T);
|
|
974
|
-
o.setWitness(
|
|
852
|
+
o.setWitness(m, [
|
|
975
853
|
k,
|
|
976
854
|
Buffer.from(t, "hex"),
|
|
977
855
|
this.redeemLeaf(),
|
|
@@ -996,14 +874,14 @@ class jt {
|
|
|
996
874
|
const u = this.leafHash(
|
|
997
875
|
0
|
|
998
876
|
/* REFUND */
|
|
999
|
-
), p = o.map((T) => T.value), g =
|
|
877
|
+
), p = o.map((T) => T.value), g = ar(this.getOutputScript(), o.length), v = de.Transaction.SIGHASH_DEFAULT;
|
|
1000
878
|
for (let T = 0; T < a.ins.length; T++) {
|
|
1001
879
|
a.ins[T].sequence = this.expiry;
|
|
1002
880
|
const k = a.hashForWitnessV1(
|
|
1003
881
|
T,
|
|
1004
882
|
g,
|
|
1005
883
|
p,
|
|
1006
|
-
|
|
884
|
+
v,
|
|
1007
885
|
u
|
|
1008
886
|
), B = await this.signer.signSchnorr(k);
|
|
1009
887
|
a.setWitness(T, [
|
|
@@ -1053,7 +931,7 @@ class jt {
|
|
|
1053
931
|
scriptTree: this.leaves(),
|
|
1054
932
|
redeem: {
|
|
1055
933
|
output: r,
|
|
1056
|
-
redeemVersion:
|
|
934
|
+
redeemVersion: Ft
|
|
1057
935
|
}
|
|
1058
936
|
});
|
|
1059
937
|
if (!a.witness)
|
|
@@ -1067,7 +945,7 @@ class jt {
|
|
|
1067
945
|
*/
|
|
1068
946
|
leafHash(t) {
|
|
1069
947
|
let r = this.redeemLeaf();
|
|
1070
|
-
return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), de.crypto.taggedHash("TapLeaf",
|
|
948
|
+
return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), de.crypto.taggedHash("TapLeaf", Si(r));
|
|
1071
949
|
}
|
|
1072
950
|
refundLeaf() {
|
|
1073
951
|
return de.script.fromASM(
|
|
@@ -1107,16 +985,16 @@ class jt {
|
|
|
1107
985
|
return [
|
|
1108
986
|
// most probable leaf (redeem)
|
|
1109
987
|
{
|
|
1110
|
-
version:
|
|
988
|
+
version: Ft,
|
|
1111
989
|
output: this.redeemLeaf()
|
|
1112
990
|
},
|
|
1113
991
|
[
|
|
1114
992
|
{
|
|
1115
|
-
version:
|
|
993
|
+
version: Ft,
|
|
1116
994
|
output: this.refundLeaf()
|
|
1117
995
|
},
|
|
1118
996
|
{
|
|
1119
|
-
version:
|
|
997
|
+
version: Ft,
|
|
1120
998
|
output: this.instantRefundLeaf()
|
|
1121
999
|
}
|
|
1122
1000
|
]
|
|
@@ -1138,7 +1016,7 @@ class jt {
|
|
|
1138
1016
|
);
|
|
1139
1017
|
switch (t) {
|
|
1140
1018
|
case 1: {
|
|
1141
|
-
const s =
|
|
1019
|
+
const s = Ti(
|
|
1142
1020
|
o,
|
|
1143
1021
|
a
|
|
1144
1022
|
);
|
|
@@ -1158,13 +1036,13 @@ class jt {
|
|
|
1158
1036
|
}
|
|
1159
1037
|
}
|
|
1160
1038
|
}
|
|
1161
|
-
function
|
|
1039
|
+
function ar(e, t) {
|
|
1162
1040
|
const r = [];
|
|
1163
1041
|
for (let a = 0; a < t; a++)
|
|
1164
1042
|
r.push(e);
|
|
1165
1043
|
return r;
|
|
1166
1044
|
}
|
|
1167
|
-
class
|
|
1045
|
+
class $i {
|
|
1168
1046
|
constructor() {
|
|
1169
1047
|
this.cache = {};
|
|
1170
1048
|
}
|
|
@@ -1183,13 +1061,13 @@ class Vi {
|
|
|
1183
1061
|
delete this.cache[`${r}_${t.create_order.create_id}`];
|
|
1184
1062
|
}
|
|
1185
1063
|
}
|
|
1186
|
-
class
|
|
1064
|
+
class Js {
|
|
1187
1065
|
constructor(t) {
|
|
1188
|
-
if (this.eventListeners = /* @__PURE__ */ new Map(), this.getOrderThreshold = 20, this.pendingOrdersCount = 0, this.useRelay = !0, this.orderBook = new
|
|
1066
|
+
if (this.eventListeners = /* @__PURE__ */ new Map(), this.getOrderThreshold = 20, this.pendingOrdersCount = 0, this.useRelay = !0, this.orderBook = new vi({
|
|
1189
1067
|
url: t.orderbookURl,
|
|
1190
1068
|
walletClient: t.wallets.evmWallet,
|
|
1191
1069
|
auth: t.auth
|
|
1192
|
-
}), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.orderExecutorCache = new
|
|
1070
|
+
}), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.orderExecutorCache = new $i(), !t.wallets.evmWallet.account)
|
|
1193
1071
|
throw new Error("Account not found in evmWallet");
|
|
1194
1072
|
this.evmAddress = t.wallets.evmWallet.account.address;
|
|
1195
1073
|
}
|
|
@@ -1206,10 +1084,10 @@ class tf {
|
|
|
1206
1084
|
if (c.error) return H(c.error);
|
|
1207
1085
|
const u = c.val + 1, p = this.secretManager.generateSecret(u);
|
|
1208
1086
|
if (p.error) return H(p.error);
|
|
1209
|
-
const { strategyId: g, btcAddress:
|
|
1087
|
+
const { strategyId: g, btcAddress: v } = t.additionalData, m = {
|
|
1210
1088
|
strategy_id: g,
|
|
1211
|
-
...
|
|
1212
|
-
bitcoin_optional_recipient:
|
|
1089
|
+
...v && {
|
|
1090
|
+
bitcoin_optional_recipient: v
|
|
1213
1091
|
}
|
|
1214
1092
|
}, T = {
|
|
1215
1093
|
source_chain: t.fromAsset.chain,
|
|
@@ -1225,7 +1103,7 @@ class tf {
|
|
|
1225
1103
|
timelock: s,
|
|
1226
1104
|
secret_hash: ze(p.val.secretHash),
|
|
1227
1105
|
min_destination_confirmations: t.minDestinationConfirmations ?? 0,
|
|
1228
|
-
additional_data:
|
|
1106
|
+
additional_data: m
|
|
1229
1107
|
}, k = await this.quote.getAttestedQuote(T);
|
|
1230
1108
|
if (k.error) return H(k.error);
|
|
1231
1109
|
const B = await this.orderBook.createOrder(k.val);
|
|
@@ -1240,7 +1118,7 @@ class tf {
|
|
|
1240
1118
|
return H(
|
|
1241
1119
|
"Both assets should be on the same network (either mainnet or testnet)"
|
|
1242
1120
|
);
|
|
1243
|
-
if (
|
|
1121
|
+
if (Pt(t.fromAsset.chain) || Pt(t.toAsset.chain)) {
|
|
1244
1122
|
if (!this.wallets.btcWallet)
|
|
1245
1123
|
return H(
|
|
1246
1124
|
"btcWallet is required for bitcoin chain. Please provide btcWallet in the constructor"
|
|
@@ -1274,7 +1152,7 @@ class tf {
|
|
|
1274
1152
|
return this.wallets.evmWallet.account ? se(this.wallets.evmWallet.account.address) : H("EVM Wallet not found");
|
|
1275
1153
|
case ke.Bitcoin: {
|
|
1276
1154
|
const o = await ((a = this.wallets.btcWallet) == null ? void 0 : a.getPublicKey());
|
|
1277
|
-
return !o || !
|
|
1155
|
+
return !o || !Ii(o) ? H("Invalid btc public key") : se(_t(o));
|
|
1278
1156
|
}
|
|
1279
1157
|
default:
|
|
1280
1158
|
return H("Unsupported chain");
|
|
@@ -1283,15 +1161,15 @@ class tf {
|
|
|
1283
1161
|
validateAmount(t) {
|
|
1284
1162
|
if (t == null || t.includes("."))
|
|
1285
1163
|
return H("Invalid amount ", t);
|
|
1286
|
-
const r = new
|
|
1164
|
+
const r = new Bi(t);
|
|
1287
1165
|
return !r.isInteger() || r.isNaN() || r.lt(0) || r.isLessThanOrEqualTo(0) ? H("Invalid amount ", t) : se(r);
|
|
1288
1166
|
}
|
|
1289
1167
|
getTimelock(t) {
|
|
1290
1168
|
switch (yt(t)) {
|
|
1291
1169
|
case ke.EVM:
|
|
1292
|
-
return
|
|
1170
|
+
return xr.evm;
|
|
1293
1171
|
case ke.Bitcoin:
|
|
1294
|
-
return
|
|
1172
|
+
return xr.btc;
|
|
1295
1173
|
default:
|
|
1296
1174
|
return;
|
|
1297
1175
|
}
|
|
@@ -1299,7 +1177,7 @@ class tf {
|
|
|
1299
1177
|
async pollOrder(t) {
|
|
1300
1178
|
let r = await this.orderBook.getOrder(t, !0), a = 0;
|
|
1301
1179
|
for (; a < this.getOrderThreshold; ) {
|
|
1302
|
-
if (await
|
|
1180
|
+
if (await xi(1e3), a++, r.error) {
|
|
1303
1181
|
if (!r.error.includes("result is undefined"))
|
|
1304
1182
|
return H(r.error);
|
|
1305
1183
|
} else if (r.val && r.val.create_order.create_id.toLowerCase() === t.toLowerCase())
|
|
@@ -1341,29 +1219,29 @@ class tf {
|
|
|
1341
1219
|
);
|
|
1342
1220
|
return;
|
|
1343
1221
|
}
|
|
1344
|
-
switch (
|
|
1222
|
+
switch (Li(
|
|
1345
1223
|
o,
|
|
1346
1224
|
g.val.source,
|
|
1347
1225
|
g.val.destination
|
|
1348
1226
|
)) {
|
|
1349
1227
|
case pe.Redeem: {
|
|
1350
|
-
const
|
|
1228
|
+
const m = this.secretManager.generateSecret(
|
|
1351
1229
|
Number(o.create_order.nonce)
|
|
1352
1230
|
);
|
|
1353
|
-
if (
|
|
1354
|
-
this.emit("error", o,
|
|
1231
|
+
if (m.error) {
|
|
1232
|
+
this.emit("error", o, m.error);
|
|
1355
1233
|
return;
|
|
1356
1234
|
}
|
|
1357
1235
|
switch (yt(o.destination_swap.chain)) {
|
|
1358
1236
|
case ke.EVM: {
|
|
1359
|
-
await this.evmRedeem(o,
|
|
1237
|
+
await this.evmRedeem(o, m.val.secret);
|
|
1360
1238
|
break;
|
|
1361
1239
|
}
|
|
1362
1240
|
case ke.Bitcoin: {
|
|
1363
1241
|
await this.btcRedeem(
|
|
1364
1242
|
p.val,
|
|
1365
1243
|
o,
|
|
1366
|
-
|
|
1244
|
+
m.val.secret
|
|
1367
1245
|
);
|
|
1368
1246
|
break;
|
|
1369
1247
|
}
|
|
@@ -1416,7 +1294,7 @@ class tf {
|
|
|
1416
1294
|
this.emit("log", t.create_order.create_id, "already redeemed");
|
|
1417
1295
|
return;
|
|
1418
1296
|
}
|
|
1419
|
-
const s = await new
|
|
1297
|
+
const s = await new Pi(t, this.orderbookUrl, this.auth).redeem(t.create_order.create_id, r);
|
|
1420
1298
|
if (s.error) {
|
|
1421
1299
|
this.emit("error", t, s.error);
|
|
1422
1300
|
return;
|
|
@@ -1505,13 +1383,13 @@ class tf {
|
|
|
1505
1383
|
async fetchCurrentBlockNumbers(t, r) {
|
|
1506
1384
|
if (!r || !r.source || !r.destination)
|
|
1507
1385
|
return H("Provide wallets to fetch the current block number");
|
|
1508
|
-
const a =
|
|
1386
|
+
const a = Pt(t.source_swap.chain) ? await Wr(
|
|
1509
1387
|
await r.source.getProvider()
|
|
1510
|
-
) : await
|
|
1388
|
+
) : await mr(r.source);
|
|
1511
1389
|
if (a.error) return H(a.error);
|
|
1512
|
-
const o =
|
|
1390
|
+
const o = Pt(t.destination_swap.chain) ? await Wr(
|
|
1513
1391
|
await r.destination.getProvider()
|
|
1514
|
-
) : await
|
|
1392
|
+
) : await mr(r.destination);
|
|
1515
1393
|
return o.error ? H(o.error) : se({
|
|
1516
1394
|
source: a.val,
|
|
1517
1395
|
destination: o.val
|
|
@@ -1519,7 +1397,7 @@ class tf {
|
|
|
1519
1397
|
}
|
|
1520
1398
|
}
|
|
1521
1399
|
var Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1522
|
-
function
|
|
1400
|
+
function Hi(e) {
|
|
1523
1401
|
if (e.__esModule) return e;
|
|
1524
1402
|
var t = e.default;
|
|
1525
1403
|
if (typeof t == "function") {
|
|
@@ -1538,7 +1416,7 @@ function Ji(e) {
|
|
|
1538
1416
|
});
|
|
1539
1417
|
}), r;
|
|
1540
1418
|
}
|
|
1541
|
-
var
|
|
1419
|
+
var Tn = {}, ut = {}, ct = {};
|
|
1542
1420
|
Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
1543
1421
|
ct.testnet = ct.bitcoin = void 0;
|
|
1544
1422
|
ct.bitcoin = {
|
|
@@ -1565,7 +1443,7 @@ ct.testnet = {
|
|
|
1565
1443
|
scriptHash: 196,
|
|
1566
1444
|
wif: 239
|
|
1567
1445
|
};
|
|
1568
|
-
var
|
|
1446
|
+
var In = {}, Bt = {
|
|
1569
1447
|
Array: function(e) {
|
|
1570
1448
|
return e != null && e.constructor === Array;
|
|
1571
1449
|
},
|
|
@@ -1592,48 +1470,48 @@ var Cn = {}, Bt = {
|
|
|
1592
1470
|
}
|
|
1593
1471
|
};
|
|
1594
1472
|
Bt.Null = Bt.Nil;
|
|
1595
|
-
for (var
|
|
1596
|
-
Bt[
|
|
1473
|
+
for (var zr in Bt)
|
|
1474
|
+
Bt[zr].toJSON = (function(e) {
|
|
1597
1475
|
return e;
|
|
1598
|
-
}).bind(null,
|
|
1476
|
+
}).bind(null, zr);
|
|
1599
1477
|
var Pr = Bt, Xe = Pr;
|
|
1600
|
-
function
|
|
1478
|
+
function Cn(e) {
|
|
1601
1479
|
return e.name || e.toString().match(/function (.*?)\s*\(/)[1];
|
|
1602
1480
|
}
|
|
1603
1481
|
function Mr(e) {
|
|
1604
|
-
return Xe.Nil(e) ? "" :
|
|
1482
|
+
return Xe.Nil(e) ? "" : Cn(e.constructor);
|
|
1605
1483
|
}
|
|
1606
|
-
function
|
|
1484
|
+
function ji(e) {
|
|
1607
1485
|
return Xe.Function(e) ? "" : Xe.String(e) ? JSON.stringify(e) : e && Xe.Object(e) ? "" : e;
|
|
1608
1486
|
}
|
|
1609
|
-
function
|
|
1487
|
+
function Fr(e, t) {
|
|
1610
1488
|
Error.captureStackTrace && Error.captureStackTrace(e, t);
|
|
1611
1489
|
}
|
|
1612
1490
|
function Wt(e) {
|
|
1613
|
-
return Xe.Function(e) ? e.toJSON ? e.toJSON() :
|
|
1491
|
+
return Xe.Function(e) ? e.toJSON ? e.toJSON() : Cn(e) : Xe.Array(e) ? "Array" : e && Xe.Object(e) ? "Object" : e !== void 0 ? e : "";
|
|
1614
1492
|
}
|
|
1615
|
-
function
|
|
1616
|
-
var a =
|
|
1493
|
+
function kn(e, t, r) {
|
|
1494
|
+
var a = ji(t);
|
|
1617
1495
|
return "Expected " + Wt(e) + ", got" + (r !== "" ? " " + r : "") + (a !== "" ? " " + a : "");
|
|
1618
1496
|
}
|
|
1619
1497
|
function Ne(e, t, r) {
|
|
1620
|
-
r = r || Mr(t), this.message =
|
|
1498
|
+
r = r || Mr(t), this.message = kn(e, t, r), Fr(this, Ne), this.__type = e, this.__value = t, this.__valueTypeName = r;
|
|
1621
1499
|
}
|
|
1622
1500
|
Ne.prototype = Object.create(Error.prototype);
|
|
1623
1501
|
Ne.prototype.constructor = Ne;
|
|
1624
|
-
function
|
|
1502
|
+
function Wi(e, t, r, a, o) {
|
|
1625
1503
|
var s = '" of type ';
|
|
1626
|
-
return t === "key" && (s = '" with key type '),
|
|
1504
|
+
return t === "key" && (s = '" with key type '), kn('property "' + Wt(r) + s + Wt(e), a, o);
|
|
1627
1505
|
}
|
|
1628
1506
|
function ot(e, t, r, a, o) {
|
|
1629
|
-
e ? (o = o || Mr(a), this.message =
|
|
1507
|
+
e ? (o = o || Mr(a), this.message = Wi(e, r, t, a, o)) : this.message = 'Unexpected property "' + t + '"', Fr(this, Ne), this.__label = r, this.__property = t, this.__type = e, this.__value = a, this.__valueTypeName = o;
|
|
1630
1508
|
}
|
|
1631
1509
|
ot.prototype = Object.create(Error.prototype);
|
|
1632
1510
|
ot.prototype.constructor = Ne;
|
|
1633
|
-
function
|
|
1511
|
+
function qi(e, t) {
|
|
1634
1512
|
return new Ne(e, {}, t);
|
|
1635
1513
|
}
|
|
1636
|
-
function
|
|
1514
|
+
function Ki(e, t, r) {
|
|
1637
1515
|
return e instanceof ot ? (t = t + "." + e.__property, e = new ot(
|
|
1638
1516
|
e.__type,
|
|
1639
1517
|
t,
|
|
@@ -1646,20 +1524,20 @@ function Qi(e, t, r) {
|
|
|
1646
1524
|
r,
|
|
1647
1525
|
e.__value,
|
|
1648
1526
|
e.__valueTypeName
|
|
1649
|
-
)),
|
|
1527
|
+
)), Fr(e), e;
|
|
1650
1528
|
}
|
|
1651
|
-
var
|
|
1529
|
+
var Ln = {
|
|
1652
1530
|
TfTypeError: Ne,
|
|
1653
1531
|
TfPropertyTypeError: ot,
|
|
1654
|
-
tfCustomError:
|
|
1655
|
-
tfSubError:
|
|
1532
|
+
tfCustomError: qi,
|
|
1533
|
+
tfSubError: Ki,
|
|
1656
1534
|
tfJSON: Wt,
|
|
1657
1535
|
getValueTypeName: Mr
|
|
1658
|
-
},
|
|
1659
|
-
function
|
|
1660
|
-
if (
|
|
1661
|
-
|
|
1662
|
-
var e = Pr, t =
|
|
1536
|
+
}, or, Xr;
|
|
1537
|
+
function Gi() {
|
|
1538
|
+
if (Xr) return or;
|
|
1539
|
+
Xr = 1;
|
|
1540
|
+
var e = Pr, t = Ln;
|
|
1663
1541
|
function r(E) {
|
|
1664
1542
|
return Buffer.isBuffer(E);
|
|
1665
1543
|
}
|
|
@@ -1687,8 +1565,8 @@ function Zi() {
|
|
|
1687
1565
|
return `${N.toJSON()} between [${E}, ${j}]`;
|
|
1688
1566
|
}, U;
|
|
1689
1567
|
}
|
|
1690
|
-
var
|
|
1691
|
-
function
|
|
1568
|
+
var v = Math.pow(2, 53) - 1;
|
|
1569
|
+
function m(E) {
|
|
1692
1570
|
return typeof E == "number" && isFinite(E);
|
|
1693
1571
|
}
|
|
1694
1572
|
function T(E) {
|
|
@@ -1701,7 +1579,7 @@ function Zi() {
|
|
|
1701
1579
|
return (E | 0) === E;
|
|
1702
1580
|
}
|
|
1703
1581
|
function C(E) {
|
|
1704
|
-
return typeof E == "number" && E >= -
|
|
1582
|
+
return typeof E == "number" && E >= -v && E <= v && Math.floor(E) === E;
|
|
1705
1583
|
}
|
|
1706
1584
|
function A(E) {
|
|
1707
1585
|
return (E & 255) === E;
|
|
@@ -1712,14 +1590,14 @@ function Zi() {
|
|
|
1712
1590
|
function O(E) {
|
|
1713
1591
|
return E >>> 0 === E;
|
|
1714
1592
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return typeof E == "number" && E >= 0 && E <=
|
|
1593
|
+
function P(E) {
|
|
1594
|
+
return typeof E == "number" && E >= 0 && E <= v && Math.floor(E) === E;
|
|
1717
1595
|
}
|
|
1718
1596
|
var L = {
|
|
1719
1597
|
ArrayN: s,
|
|
1720
1598
|
Buffer: r,
|
|
1721
1599
|
BufferN: c,
|
|
1722
|
-
Finite:
|
|
1600
|
+
Finite: m,
|
|
1723
1601
|
Hex: a,
|
|
1724
1602
|
HexN: u,
|
|
1725
1603
|
Int8: T,
|
|
@@ -1731,15 +1609,15 @@ function Zi() {
|
|
|
1731
1609
|
UInt8: A,
|
|
1732
1610
|
UInt16: I,
|
|
1733
1611
|
UInt32: O,
|
|
1734
|
-
UInt53:
|
|
1612
|
+
UInt53: P
|
|
1735
1613
|
};
|
|
1736
|
-
for (var
|
|
1737
|
-
L[
|
|
1614
|
+
for (var F in L)
|
|
1615
|
+
L[F].toJSON = (function(E) {
|
|
1738
1616
|
return E;
|
|
1739
|
-
}).bind(null,
|
|
1740
|
-
return
|
|
1617
|
+
}).bind(null, F);
|
|
1618
|
+
return or = L, or;
|
|
1741
1619
|
}
|
|
1742
|
-
var At =
|
|
1620
|
+
var At = Ln, fe = Pr, Me = At.tfJSON, On = At.TfTypeError, Pn = At.TfPropertyTypeError, wt = At.tfSubError, Vi = At.getValueTypeName, Fe = {
|
|
1743
1621
|
arrayOf: function(t, r) {
|
|
1744
1622
|
t = Le(t), r = r || {};
|
|
1745
1623
|
function a(o, s) {
|
|
@@ -1752,7 +1630,7 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1752
1630
|
});
|
|
1753
1631
|
}
|
|
1754
1632
|
return a.toJSON = function() {
|
|
1755
|
-
var o = "[" +
|
|
1633
|
+
var o = "[" + Me(t) + "]";
|
|
1756
1634
|
return r.length !== void 0 ? o += "{" + r.length + "}" : (r.minLength !== void 0 || r.maxLength !== void 0) && (o += "{" + (r.minLength === void 0 ? 0 : r.minLength) + "," + (r.maxLength === void 0 ? 1 / 0 : r.maxLength) + "}"), o;
|
|
1757
1635
|
}, a;
|
|
1758
1636
|
},
|
|
@@ -1762,7 +1640,7 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1762
1640
|
return fe.Nil(a) || t(a, o, e);
|
|
1763
1641
|
}
|
|
1764
1642
|
return r.toJSON = function() {
|
|
1765
|
-
return "?" +
|
|
1643
|
+
return "?" + Me(t);
|
|
1766
1644
|
}, r;
|
|
1767
1645
|
},
|
|
1768
1646
|
map: function(t, r) {
|
|
@@ -1785,9 +1663,9 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1785
1663
|
return !0;
|
|
1786
1664
|
}
|
|
1787
1665
|
return r ? a.toJSON = function() {
|
|
1788
|
-
return "{" +
|
|
1666
|
+
return "{" + Me(r) + ": " + Me(t) + "}";
|
|
1789
1667
|
} : a.toJSON = function() {
|
|
1790
|
-
return "{" +
|
|
1668
|
+
return "{" + Me(t) + "}";
|
|
1791
1669
|
}, a;
|
|
1792
1670
|
},
|
|
1793
1671
|
object: function(t) {
|
|
@@ -1802,8 +1680,8 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1802
1680
|
var p = r[u], g = s[u];
|
|
1803
1681
|
we(p, g, c);
|
|
1804
1682
|
}
|
|
1805
|
-
} catch (
|
|
1806
|
-
throw wt(
|
|
1683
|
+
} catch (v) {
|
|
1684
|
+
throw wt(v, u);
|
|
1807
1685
|
}
|
|
1808
1686
|
if (c) {
|
|
1809
1687
|
for (u in s)
|
|
@@ -1813,7 +1691,7 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1813
1691
|
return !0;
|
|
1814
1692
|
}
|
|
1815
1693
|
return o.toJSON = function() {
|
|
1816
|
-
return
|
|
1694
|
+
return Me(r);
|
|
1817
1695
|
}, o;
|
|
1818
1696
|
},
|
|
1819
1697
|
anyOf: function() {
|
|
@@ -1828,7 +1706,7 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1828
1706
|
});
|
|
1829
1707
|
}
|
|
1830
1708
|
return r.toJSON = function() {
|
|
1831
|
-
return t.map(
|
|
1709
|
+
return t.map(Me).join("|");
|
|
1832
1710
|
}, r;
|
|
1833
1711
|
},
|
|
1834
1712
|
allOf: function() {
|
|
@@ -1843,12 +1721,12 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1843
1721
|
});
|
|
1844
1722
|
}
|
|
1845
1723
|
return r.toJSON = function() {
|
|
1846
|
-
return t.map(
|
|
1724
|
+
return t.map(Me).join(" & ");
|
|
1847
1725
|
}, r;
|
|
1848
1726
|
},
|
|
1849
1727
|
quacksLike: function(t) {
|
|
1850
1728
|
function r(a) {
|
|
1851
|
-
return t ===
|
|
1729
|
+
return t === Vi(a);
|
|
1852
1730
|
}
|
|
1853
1731
|
return r.toJSON = function() {
|
|
1854
1732
|
return t;
|
|
@@ -1866,7 +1744,7 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1866
1744
|
});
|
|
1867
1745
|
}
|
|
1868
1746
|
return r.toJSON = function() {
|
|
1869
|
-
return "(" + t.map(
|
|
1747
|
+
return "(" + t.map(Me).join(", ") + ")";
|
|
1870
1748
|
}, r;
|
|
1871
1749
|
},
|
|
1872
1750
|
value: function(t) {
|
|
@@ -1878,40 +1756,40 @@ var At = On, fe = Pr, Pe = At.tfJSON, Fn = At.TfTypeError, Pn = At.TfPropertyTyp
|
|
|
1878
1756
|
}, r;
|
|
1879
1757
|
}
|
|
1880
1758
|
};
|
|
1881
|
-
|
|
1759
|
+
Fe.oneOf = Fe.anyOf;
|
|
1882
1760
|
function Le(e) {
|
|
1883
1761
|
if (fe.String(e))
|
|
1884
|
-
return e[0] === "?" ?
|
|
1762
|
+
return e[0] === "?" ? Fe.maybe(e.slice(1)) : fe[e] || Fe.quacksLike(e);
|
|
1885
1763
|
if (e && fe.Object(e)) {
|
|
1886
1764
|
if (fe.Array(e)) {
|
|
1887
1765
|
if (e.length !== 1) throw new TypeError("Expected compile() parameter of type Array of length 1");
|
|
1888
|
-
return
|
|
1766
|
+
return Fe.arrayOf(e[0]);
|
|
1889
1767
|
}
|
|
1890
|
-
return
|
|
1768
|
+
return Fe.object(e);
|
|
1891
1769
|
} else if (fe.Function(e))
|
|
1892
1770
|
return e;
|
|
1893
|
-
return
|
|
1771
|
+
return Fe.value(e);
|
|
1894
1772
|
}
|
|
1895
1773
|
function we(e, t, r, a) {
|
|
1896
1774
|
if (fe.Function(e)) {
|
|
1897
1775
|
if (e(t, r)) return !0;
|
|
1898
|
-
throw new
|
|
1776
|
+
throw new On(a || e, t);
|
|
1899
1777
|
}
|
|
1900
1778
|
return we(Le(e), t, r);
|
|
1901
1779
|
}
|
|
1902
1780
|
for (var qe in fe)
|
|
1903
1781
|
we[qe] = fe[qe];
|
|
1904
|
-
for (qe in
|
|
1905
|
-
we[qe] =
|
|
1906
|
-
var
|
|
1907
|
-
for (qe in
|
|
1908
|
-
we[qe] =
|
|
1782
|
+
for (qe in Fe)
|
|
1783
|
+
we[qe] = Fe[qe];
|
|
1784
|
+
var Qr = Gi();
|
|
1785
|
+
for (qe in Qr)
|
|
1786
|
+
we[qe] = Qr[qe];
|
|
1909
1787
|
we.compile = Le;
|
|
1910
|
-
we.TfTypeError =
|
|
1788
|
+
we.TfTypeError = On;
|
|
1911
1789
|
we.TfPropertyTypeError = Pn;
|
|
1912
|
-
var
|
|
1790
|
+
var Ji = we;
|
|
1913
1791
|
(function(e) {
|
|
1914
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce =
|
|
1792
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = Ji, e.Network = e.typeforce.compile({
|
|
1915
1793
|
messagePrefix: e.typeforce.oneOf(
|
|
1916
1794
|
e.typeforce.Buffer,
|
|
1917
1795
|
e.typeforce.String
|
|
@@ -1924,14 +1802,14 @@ var ta = we;
|
|
|
1924
1802
|
scriptHash: e.typeforce.UInt8,
|
|
1925
1803
|
wif: e.typeforce.UInt8
|
|
1926
1804
|
}), e.Buffer256bit = e.typeforce.BufferN(32), e.Array = e.typeforce.Array, e.Boolean = e.typeforce.Boolean, e.maybe = e.typeforce.maybe;
|
|
1927
|
-
})(
|
|
1928
|
-
var
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
var Oe = [], Be = [],
|
|
1933
|
-
for (var at = 0,
|
|
1934
|
-
Oe[at] =
|
|
1805
|
+
})(In);
|
|
1806
|
+
var Br = { exports: {} }, Sr = { exports: {} }, lt = {}, Vt = {};
|
|
1807
|
+
Vt.byteLength = Xi;
|
|
1808
|
+
Vt.toByteArray = Zi;
|
|
1809
|
+
Vt.fromByteArray = ra;
|
|
1810
|
+
var Oe = [], Be = [], Yi = typeof Uint8Array < "u" ? Uint8Array : Array, sr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1811
|
+
for (var at = 0, zi = sr.length; at < zi; ++at)
|
|
1812
|
+
Oe[at] = sr[at], Be[sr.charCodeAt(at)] = at;
|
|
1935
1813
|
Be[45] = 62;
|
|
1936
1814
|
Be[95] = 63;
|
|
1937
1815
|
function Mn(e) {
|
|
@@ -1943,43 +1821,43 @@ function Mn(e) {
|
|
|
1943
1821
|
var a = r === t ? 0 : 4 - r % 4;
|
|
1944
1822
|
return [r, a];
|
|
1945
1823
|
}
|
|
1946
|
-
function
|
|
1824
|
+
function Xi(e) {
|
|
1947
1825
|
var t = Mn(e), r = t[0], a = t[1];
|
|
1948
1826
|
return (r + a) * 3 / 4 - a;
|
|
1949
1827
|
}
|
|
1950
|
-
function
|
|
1828
|
+
function Qi(e, t, r) {
|
|
1951
1829
|
return (t + r) * 3 / 4 - r;
|
|
1952
1830
|
}
|
|
1953
|
-
function
|
|
1954
|
-
var t, r = Mn(e), a = r[0], o = r[1], s = new
|
|
1831
|
+
function Zi(e) {
|
|
1832
|
+
var t, r = Mn(e), a = r[0], o = r[1], s = new Yi(Qi(e, a, o)), c = 0, u = o > 0 ? a - 4 : a, p;
|
|
1955
1833
|
for (p = 0; p < u; p += 4)
|
|
1956
1834
|
t = Be[e.charCodeAt(p)] << 18 | Be[e.charCodeAt(p + 1)] << 12 | Be[e.charCodeAt(p + 2)] << 6 | Be[e.charCodeAt(p + 3)], s[c++] = t >> 16 & 255, s[c++] = t >> 8 & 255, s[c++] = t & 255;
|
|
1957
1835
|
return o === 2 && (t = Be[e.charCodeAt(p)] << 2 | Be[e.charCodeAt(p + 1)] >> 4, s[c++] = t & 255), o === 1 && (t = Be[e.charCodeAt(p)] << 10 | Be[e.charCodeAt(p + 1)] << 4 | Be[e.charCodeAt(p + 2)] >> 2, s[c++] = t >> 8 & 255, s[c++] = t & 255), s;
|
|
1958
1836
|
}
|
|
1959
|
-
function
|
|
1837
|
+
function ea(e) {
|
|
1960
1838
|
return Oe[e >> 18 & 63] + Oe[e >> 12 & 63] + Oe[e >> 6 & 63] + Oe[e & 63];
|
|
1961
1839
|
}
|
|
1962
|
-
function
|
|
1840
|
+
function ta(e, t, r) {
|
|
1963
1841
|
for (var a, o = [], s = t; s < r; s += 3)
|
|
1964
|
-
a = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (e[s + 2] & 255), o.push(
|
|
1842
|
+
a = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (e[s + 2] & 255), o.push(ea(a));
|
|
1965
1843
|
return o.join("");
|
|
1966
1844
|
}
|
|
1967
|
-
function
|
|
1845
|
+
function ra(e) {
|
|
1968
1846
|
for (var t, r = e.length, a = r % 3, o = [], s = 16383, c = 0, u = r - a; c < u; c += s)
|
|
1969
|
-
o.push(
|
|
1847
|
+
o.push(ta(e, c, c + s > u ? u : c + s));
|
|
1970
1848
|
return a === 1 ? (t = e[r - 1], o.push(
|
|
1971
1849
|
Oe[t >> 2] + Oe[t << 4 & 63] + "=="
|
|
1972
1850
|
)) : a === 2 && (t = (e[r - 2] << 8) + e[r - 1], o.push(
|
|
1973
1851
|
Oe[t >> 10] + Oe[t >> 4 & 63] + Oe[t << 2 & 63] + "="
|
|
1974
1852
|
)), o.join("");
|
|
1975
1853
|
}
|
|
1976
|
-
var
|
|
1854
|
+
var Nr = {};
|
|
1977
1855
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1978
|
-
|
|
1979
|
-
var s, c, u = o * 8 - a - 1, p = (1 << u) - 1, g = p >> 1,
|
|
1980
|
-
for (
|
|
1856
|
+
Nr.read = function(e, t, r, a, o) {
|
|
1857
|
+
var s, c, u = o * 8 - a - 1, p = (1 << u) - 1, g = p >> 1, v = -7, m = r ? o - 1 : 0, T = r ? -1 : 1, k = e[t + m];
|
|
1858
|
+
for (m += T, s = k & (1 << -v) - 1, k >>= -v, v += u; v > 0; s = s * 256 + e[t + m], m += T, v -= 8)
|
|
1981
1859
|
;
|
|
1982
|
-
for (c = s & (1 << -
|
|
1860
|
+
for (c = s & (1 << -v) - 1, s >>= -v, v += a; v > 0; c = c * 256 + e[t + m], m += T, v -= 8)
|
|
1983
1861
|
;
|
|
1984
1862
|
if (s === 0)
|
|
1985
1863
|
s = 1 - g;
|
|
@@ -1990,9 +1868,9 @@ Dr.read = function(e, t, r, a, o) {
|
|
|
1990
1868
|
}
|
|
1991
1869
|
return (k ? -1 : 1) * c * Math.pow(2, s - a);
|
|
1992
1870
|
};
|
|
1993
|
-
|
|
1994
|
-
var c, u, p, g = s * 8 - o - 1,
|
|
1995
|
-
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, c =
|
|
1871
|
+
Nr.write = function(e, t, r, a, o, s) {
|
|
1872
|
+
var c, u, p, g = s * 8 - o - 1, v = (1 << g) - 1, m = v >> 1, T = o === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, k = a ? 0 : s - 1, B = a ? 1 : -1, C = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
1873
|
+
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, c = v) : (c = Math.floor(Math.log(t) / Math.LN2), t * (p = Math.pow(2, -c)) < 1 && (c--, p *= 2), c + m >= 1 ? t += T / p : t += T * Math.pow(2, 1 - m), t * p >= 2 && (c++, p /= 2), c + m >= v ? (u = 0, c = v) : c + m >= 1 ? (u = (t * p - 1) * Math.pow(2, o), c = c + m) : (u = t * Math.pow(2, m - 1) * Math.pow(2, o), c = 0)); o >= 8; e[r + k] = u & 255, k += B, u /= 256, o -= 8)
|
|
1996
1874
|
;
|
|
1997
1875
|
for (c = c << o | u, g += o; g > 0; e[r + k] = c & 255, k += B, c /= 256, g -= 8)
|
|
1998
1876
|
;
|
|
@@ -2005,7 +1883,7 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2005
1883
|
* @license MIT
|
|
2006
1884
|
*/
|
|
2007
1885
|
(function(e) {
|
|
2008
|
-
const t =
|
|
1886
|
+
const t = Vt, r = Nr, a = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
2009
1887
|
e.Buffer = u, e.SlowBuffer = O, e.INSPECT_MAX_BYTES = 50;
|
|
2010
1888
|
const o = 2147483647;
|
|
2011
1889
|
e.kMaxLength = o, u.TYPED_ARRAY_SUPPORT = s(), !u.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
@@ -2046,7 +1924,7 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2046
1924
|
throw new TypeError(
|
|
2047
1925
|
'The "string" argument must be of type string. Received type number'
|
|
2048
1926
|
);
|
|
2049
|
-
return
|
|
1927
|
+
return m(f);
|
|
2050
1928
|
}
|
|
2051
1929
|
return p(f, n, i);
|
|
2052
1930
|
}
|
|
@@ -2066,9 +1944,9 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2066
1944
|
throw new TypeError(
|
|
2067
1945
|
'The "value" argument must not be of type number. Received type number'
|
|
2068
1946
|
);
|
|
2069
|
-
const
|
|
2070
|
-
if (
|
|
2071
|
-
return u.from(
|
|
1947
|
+
const h = f.valueOf && f.valueOf();
|
|
1948
|
+
if (h != null && h !== f)
|
|
1949
|
+
return u.from(h, n, i);
|
|
2072
1950
|
const b = A(f);
|
|
2073
1951
|
if (b) return b;
|
|
2074
1952
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof f[Symbol.toPrimitive] == "function")
|
|
@@ -2086,32 +1964,32 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2086
1964
|
if (f < 0)
|
|
2087
1965
|
throw new RangeError('The value "' + f + '" is invalid for option "size"');
|
|
2088
1966
|
}
|
|
2089
|
-
function
|
|
1967
|
+
function v(f, n, i) {
|
|
2090
1968
|
return g(f), f <= 0 ? c(f) : n !== void 0 ? typeof i == "string" ? c(f).fill(n, i) : c(f).fill(n) : c(f);
|
|
2091
1969
|
}
|
|
2092
1970
|
u.alloc = function(f, n, i) {
|
|
2093
|
-
return
|
|
1971
|
+
return v(f, n, i);
|
|
2094
1972
|
};
|
|
2095
|
-
function
|
|
1973
|
+
function m(f) {
|
|
2096
1974
|
return g(f), c(f < 0 ? 0 : I(f) | 0);
|
|
2097
1975
|
}
|
|
2098
1976
|
u.allocUnsafe = function(f) {
|
|
2099
|
-
return
|
|
1977
|
+
return m(f);
|
|
2100
1978
|
}, u.allocUnsafeSlow = function(f) {
|
|
2101
|
-
return
|
|
1979
|
+
return m(f);
|
|
2102
1980
|
};
|
|
2103
1981
|
function T(f, n) {
|
|
2104
1982
|
if ((typeof n != "string" || n === "") && (n = "utf8"), !u.isEncoding(n))
|
|
2105
1983
|
throw new TypeError("Unknown encoding: " + n);
|
|
2106
|
-
const i =
|
|
2107
|
-
let
|
|
2108
|
-
const b =
|
|
2109
|
-
return b !== i && (
|
|
1984
|
+
const i = P(f, n) | 0;
|
|
1985
|
+
let h = c(i);
|
|
1986
|
+
const b = h.write(f, n);
|
|
1987
|
+
return b !== i && (h = h.slice(0, b)), h;
|
|
2110
1988
|
}
|
|
2111
1989
|
function k(f) {
|
|
2112
1990
|
const n = f.length < 0 ? 0 : I(f.length) | 0, i = c(n);
|
|
2113
|
-
for (let
|
|
2114
|
-
i[
|
|
1991
|
+
for (let h = 0; h < n; h += 1)
|
|
1992
|
+
i[h] = f[h] & 255;
|
|
2115
1993
|
return i;
|
|
2116
1994
|
}
|
|
2117
1995
|
function B(f) {
|
|
@@ -2126,8 +2004,8 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2126
2004
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
2127
2005
|
if (f.byteLength < n + (i || 0))
|
|
2128
2006
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
2129
|
-
let
|
|
2130
|
-
return n === void 0 && i === void 0 ?
|
|
2007
|
+
let h;
|
|
2008
|
+
return n === void 0 && i === void 0 ? h = new Uint8Array(f) : i === void 0 ? h = new Uint8Array(f, n) : h = new Uint8Array(f, n, i), Object.setPrototypeOf(h, u.prototype), h;
|
|
2131
2009
|
}
|
|
2132
2010
|
function A(f) {
|
|
2133
2011
|
if (u.isBuffer(f)) {
|
|
@@ -2155,13 +2033,13 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2155
2033
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
2156
2034
|
);
|
|
2157
2035
|
if (n === i) return 0;
|
|
2158
|
-
let
|
|
2159
|
-
for (let w = 0, x = Math.min(
|
|
2036
|
+
let h = n.length, b = i.length;
|
|
2037
|
+
for (let w = 0, x = Math.min(h, b); w < x; ++w)
|
|
2160
2038
|
if (n[w] !== i[w]) {
|
|
2161
|
-
|
|
2039
|
+
h = n[w], b = i[w];
|
|
2162
2040
|
break;
|
|
2163
2041
|
}
|
|
2164
|
-
return
|
|
2042
|
+
return h < b ? -1 : b < h ? 1 : 0;
|
|
2165
2043
|
}, u.isEncoding = function(n) {
|
|
2166
2044
|
switch (String(n).toLowerCase()) {
|
|
2167
2045
|
case "hex":
|
|
@@ -2184,14 +2062,14 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2184
2062
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
2185
2063
|
if (n.length === 0)
|
|
2186
2064
|
return u.alloc(0);
|
|
2187
|
-
let
|
|
2065
|
+
let h;
|
|
2188
2066
|
if (i === void 0)
|
|
2189
|
-
for (i = 0,
|
|
2190
|
-
i += n[
|
|
2067
|
+
for (i = 0, h = 0; h < n.length; ++h)
|
|
2068
|
+
i += n[h].length;
|
|
2191
2069
|
const b = u.allocUnsafe(i);
|
|
2192
2070
|
let w = 0;
|
|
2193
|
-
for (
|
|
2194
|
-
let x = n[
|
|
2071
|
+
for (h = 0; h < n.length; ++h) {
|
|
2072
|
+
let x = n[h];
|
|
2195
2073
|
if (Ee(x, Uint8Array))
|
|
2196
2074
|
w + x.length > b.length ? (u.isBuffer(x) || (x = u.from(x)), x.copy(b, w)) : Uint8Array.prototype.set.call(
|
|
2197
2075
|
b,
|
|
@@ -2206,7 +2084,7 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2206
2084
|
}
|
|
2207
2085
|
return b;
|
|
2208
2086
|
};
|
|
2209
|
-
function
|
|
2087
|
+
function P(f, n) {
|
|
2210
2088
|
if (u.isBuffer(f))
|
|
2211
2089
|
return f.length;
|
|
2212
2090
|
if (ArrayBuffer.isView(f) || Ee(f, ArrayBuffer))
|
|
@@ -2215,8 +2093,8 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2215
2093
|
throw new TypeError(
|
|
2216
2094
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof f
|
|
2217
2095
|
);
|
|
2218
|
-
const i = f.length,
|
|
2219
|
-
if (!
|
|
2096
|
+
const i = f.length, h = arguments.length > 2 && arguments[2] === !0;
|
|
2097
|
+
if (!h && i === 0) return 0;
|
|
2220
2098
|
let b = !1;
|
|
2221
2099
|
for (; ; )
|
|
2222
2100
|
switch (n) {
|
|
@@ -2238,13 +2116,13 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2238
2116
|
return pt(f).length;
|
|
2239
2117
|
default:
|
|
2240
2118
|
if (b)
|
|
2241
|
-
return
|
|
2119
|
+
return h ? -1 : G(f).length;
|
|
2242
2120
|
n = ("" + n).toLowerCase(), b = !0;
|
|
2243
2121
|
}
|
|
2244
2122
|
}
|
|
2245
|
-
u.byteLength =
|
|
2123
|
+
u.byteLength = P;
|
|
2246
2124
|
function L(f, n, i) {
|
|
2247
|
-
let
|
|
2125
|
+
let h = !1;
|
|
2248
2126
|
if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((i === void 0 || i > this.length) && (i = this.length), i <= 0) || (i >>>= 0, n >>>= 0, i <= n))
|
|
2249
2127
|
return "";
|
|
2250
2128
|
for (f || (f = "utf8"); ; )
|
|
@@ -2267,35 +2145,35 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2267
2145
|
case "utf-16le":
|
|
2268
2146
|
return He(this, n, i);
|
|
2269
2147
|
default:
|
|
2270
|
-
if (
|
|
2271
|
-
f = (f + "").toLowerCase(),
|
|
2148
|
+
if (h) throw new TypeError("Unknown encoding: " + f);
|
|
2149
|
+
f = (f + "").toLowerCase(), h = !0;
|
|
2272
2150
|
}
|
|
2273
2151
|
}
|
|
2274
2152
|
u.prototype._isBuffer = !0;
|
|
2275
|
-
function
|
|
2276
|
-
const
|
|
2277
|
-
f[n] = f[i], f[i] =
|
|
2153
|
+
function F(f, n, i) {
|
|
2154
|
+
const h = f[n];
|
|
2155
|
+
f[n] = f[i], f[i] = h;
|
|
2278
2156
|
}
|
|
2279
2157
|
u.prototype.swap16 = function() {
|
|
2280
2158
|
const n = this.length;
|
|
2281
2159
|
if (n % 2 !== 0)
|
|
2282
2160
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
2283
2161
|
for (let i = 0; i < n; i += 2)
|
|
2284
|
-
|
|
2162
|
+
F(this, i, i + 1);
|
|
2285
2163
|
return this;
|
|
2286
2164
|
}, u.prototype.swap32 = function() {
|
|
2287
2165
|
const n = this.length;
|
|
2288
2166
|
if (n % 4 !== 0)
|
|
2289
2167
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
2290
2168
|
for (let i = 0; i < n; i += 4)
|
|
2291
|
-
|
|
2169
|
+
F(this, i, i + 3), F(this, i + 1, i + 2);
|
|
2292
2170
|
return this;
|
|
2293
2171
|
}, u.prototype.swap64 = function() {
|
|
2294
2172
|
const n = this.length;
|
|
2295
2173
|
if (n % 8 !== 0)
|
|
2296
2174
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
2297
2175
|
for (let i = 0; i < n; i += 8)
|
|
2298
|
-
|
|
2176
|
+
F(this, i, i + 7), F(this, i + 1, i + 6), F(this, i + 2, i + 5), F(this, i + 3, i + 4);
|
|
2299
2177
|
return this;
|
|
2300
2178
|
}, u.prototype.toString = function() {
|
|
2301
2179
|
const n = this.length;
|
|
@@ -2307,22 +2185,22 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2307
2185
|
let n = "";
|
|
2308
2186
|
const i = e.INSPECT_MAX_BYTES;
|
|
2309
2187
|
return n = this.toString("hex", 0, i).replace(/(.{2})/g, "$1 ").trim(), this.length > i && (n += " ... "), "<Buffer " + n + ">";
|
|
2310
|
-
}, a && (u.prototype[a] = u.prototype.inspect), u.prototype.compare = function(n, i,
|
|
2188
|
+
}, a && (u.prototype[a] = u.prototype.inspect), u.prototype.compare = function(n, i, h, b, w) {
|
|
2311
2189
|
if (Ee(n, Uint8Array) && (n = u.from(n, n.offset, n.byteLength)), !u.isBuffer(n))
|
|
2312
2190
|
throw new TypeError(
|
|
2313
2191
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof n
|
|
2314
2192
|
);
|
|
2315
|
-
if (i === void 0 && (i = 0),
|
|
2193
|
+
if (i === void 0 && (i = 0), h === void 0 && (h = n ? n.length : 0), b === void 0 && (b = 0), w === void 0 && (w = this.length), i < 0 || h > n.length || b < 0 || w > this.length)
|
|
2316
2194
|
throw new RangeError("out of range index");
|
|
2317
|
-
if (b >= w && i >=
|
|
2195
|
+
if (b >= w && i >= h)
|
|
2318
2196
|
return 0;
|
|
2319
2197
|
if (b >= w)
|
|
2320
2198
|
return -1;
|
|
2321
|
-
if (i >=
|
|
2199
|
+
if (i >= h)
|
|
2322
2200
|
return 1;
|
|
2323
|
-
if (i >>>= 0,
|
|
2324
|
-
let x = w - b, K =
|
|
2325
|
-
const ee = Math.min(x, K), Q = this.slice(b, w), te = n.slice(i,
|
|
2201
|
+
if (i >>>= 0, h >>>= 0, b >>>= 0, w >>>= 0, this === n) return 0;
|
|
2202
|
+
let x = w - b, K = h - i;
|
|
2203
|
+
const ee = Math.min(x, K), Q = this.slice(b, w), te = n.slice(i, h);
|
|
2326
2204
|
for (let J = 0; J < ee; ++J)
|
|
2327
2205
|
if (Q[J] !== te[J]) {
|
|
2328
2206
|
x = Q[J], K = te[J];
|
|
@@ -2330,23 +2208,23 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2330
2208
|
}
|
|
2331
2209
|
return x < K ? -1 : K < x ? 1 : 0;
|
|
2332
2210
|
};
|
|
2333
|
-
function E(f, n, i,
|
|
2211
|
+
function E(f, n, i, h, b) {
|
|
2334
2212
|
if (f.length === 0) return -1;
|
|
2335
|
-
if (typeof i == "string" ? (
|
|
2213
|
+
if (typeof i == "string" ? (h = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Je(i) && (i = b ? 0 : f.length - 1), i < 0 && (i = f.length + i), i >= f.length) {
|
|
2336
2214
|
if (b) return -1;
|
|
2337
2215
|
i = f.length - 1;
|
|
2338
2216
|
} else if (i < 0)
|
|
2339
2217
|
if (b) i = 0;
|
|
2340
2218
|
else return -1;
|
|
2341
|
-
if (typeof n == "string" && (n = u.from(n,
|
|
2342
|
-
return n.length === 0 ? -1 : j(f, n, i,
|
|
2219
|
+
if (typeof n == "string" && (n = u.from(n, h)), u.isBuffer(n))
|
|
2220
|
+
return n.length === 0 ? -1 : j(f, n, i, h, b);
|
|
2343
2221
|
if (typeof n == "number")
|
|
2344
|
-
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? b ? Uint8Array.prototype.indexOf.call(f, n, i) : Uint8Array.prototype.lastIndexOf.call(f, n, i) : j(f, [n], i,
|
|
2222
|
+
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? b ? Uint8Array.prototype.indexOf.call(f, n, i) : Uint8Array.prototype.lastIndexOf.call(f, n, i) : j(f, [n], i, h, b);
|
|
2345
2223
|
throw new TypeError("val must be string, number or Buffer");
|
|
2346
2224
|
}
|
|
2347
|
-
function j(f, n, i,
|
|
2225
|
+
function j(f, n, i, h, b) {
|
|
2348
2226
|
let w = 1, x = f.length, K = n.length;
|
|
2349
|
-
if (
|
|
2227
|
+
if (h !== void 0 && (h = String(h).toLowerCase(), h === "ucs2" || h === "ucs-2" || h === "utf16le" || h === "utf-16le")) {
|
|
2350
2228
|
if (f.length < 2 || n.length < 2)
|
|
2351
2229
|
return -1;
|
|
2352
2230
|
w = 2, x /= 2, K /= 2, i /= 2;
|
|
@@ -2374,73 +2252,73 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2374
2252
|
}
|
|
2375
2253
|
return -1;
|
|
2376
2254
|
}
|
|
2377
|
-
u.prototype.includes = function(n, i,
|
|
2378
|
-
return this.indexOf(n, i,
|
|
2379
|
-
}, u.prototype.indexOf = function(n, i,
|
|
2380
|
-
return E(this, n, i,
|
|
2381
|
-
}, u.prototype.lastIndexOf = function(n, i,
|
|
2382
|
-
return E(this, n, i,
|
|
2255
|
+
u.prototype.includes = function(n, i, h) {
|
|
2256
|
+
return this.indexOf(n, i, h) !== -1;
|
|
2257
|
+
}, u.prototype.indexOf = function(n, i, h) {
|
|
2258
|
+
return E(this, n, i, h, !0);
|
|
2259
|
+
}, u.prototype.lastIndexOf = function(n, i, h) {
|
|
2260
|
+
return E(this, n, i, h, !1);
|
|
2383
2261
|
};
|
|
2384
|
-
function N(f, n, i,
|
|
2262
|
+
function N(f, n, i, h) {
|
|
2385
2263
|
i = Number(i) || 0;
|
|
2386
2264
|
const b = f.length - i;
|
|
2387
|
-
|
|
2265
|
+
h ? (h = Number(h), h > b && (h = b)) : h = b;
|
|
2388
2266
|
const w = n.length;
|
|
2389
|
-
|
|
2267
|
+
h > w / 2 && (h = w / 2);
|
|
2390
2268
|
let x;
|
|
2391
|
-
for (x = 0; x <
|
|
2269
|
+
for (x = 0; x < h; ++x) {
|
|
2392
2270
|
const K = parseInt(n.substr(x * 2, 2), 16);
|
|
2393
2271
|
if (Je(K)) return x;
|
|
2394
2272
|
f[i + x] = K;
|
|
2395
2273
|
}
|
|
2396
2274
|
return x;
|
|
2397
2275
|
}
|
|
2398
|
-
function U(f, n, i,
|
|
2399
|
-
return rt(G(n, f.length - i), f, i,
|
|
2276
|
+
function U(f, n, i, h) {
|
|
2277
|
+
return rt(G(n, f.length - i), f, i, h);
|
|
2400
2278
|
}
|
|
2401
|
-
function re(f, n, i,
|
|
2402
|
-
return rt(We(n), f, i,
|
|
2279
|
+
function re(f, n, i, h) {
|
|
2280
|
+
return rt(We(n), f, i, h);
|
|
2403
2281
|
}
|
|
2404
|
-
function Ae(f, n, i,
|
|
2405
|
-
return rt(pt(n), f, i,
|
|
2282
|
+
function Ae(f, n, i, h) {
|
|
2283
|
+
return rt(pt(n), f, i, h);
|
|
2406
2284
|
}
|
|
2407
|
-
function Ue(f, n, i,
|
|
2408
|
-
return rt(tt(n, f.length - i), f, i,
|
|
2285
|
+
function Ue(f, n, i, h) {
|
|
2286
|
+
return rt(tt(n, f.length - i), f, i, h);
|
|
2409
2287
|
}
|
|
2410
|
-
u.prototype.write = function(n, i,
|
|
2288
|
+
u.prototype.write = function(n, i, h, b) {
|
|
2411
2289
|
if (i === void 0)
|
|
2412
|
-
b = "utf8",
|
|
2413
|
-
else if (
|
|
2414
|
-
b = i,
|
|
2290
|
+
b = "utf8", h = this.length, i = 0;
|
|
2291
|
+
else if (h === void 0 && typeof i == "string")
|
|
2292
|
+
b = i, h = this.length, i = 0;
|
|
2415
2293
|
else if (isFinite(i))
|
|
2416
|
-
i = i >>> 0, isFinite(
|
|
2294
|
+
i = i >>> 0, isFinite(h) ? (h = h >>> 0, b === void 0 && (b = "utf8")) : (b = h, h = void 0);
|
|
2417
2295
|
else
|
|
2418
2296
|
throw new Error(
|
|
2419
2297
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
2420
2298
|
);
|
|
2421
2299
|
const w = this.length - i;
|
|
2422
|
-
if ((
|
|
2300
|
+
if ((h === void 0 || h > w) && (h = w), n.length > 0 && (h < 0 || i < 0) || i > this.length)
|
|
2423
2301
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
2424
2302
|
b || (b = "utf8");
|
|
2425
2303
|
let x = !1;
|
|
2426
2304
|
for (; ; )
|
|
2427
2305
|
switch (b) {
|
|
2428
2306
|
case "hex":
|
|
2429
|
-
return N(this, n, i,
|
|
2307
|
+
return N(this, n, i, h);
|
|
2430
2308
|
case "utf8":
|
|
2431
2309
|
case "utf-8":
|
|
2432
|
-
return U(this, n, i,
|
|
2310
|
+
return U(this, n, i, h);
|
|
2433
2311
|
case "ascii":
|
|
2434
2312
|
case "latin1":
|
|
2435
2313
|
case "binary":
|
|
2436
|
-
return re(this, n, i,
|
|
2314
|
+
return re(this, n, i, h);
|
|
2437
2315
|
case "base64":
|
|
2438
|
-
return Ae(this, n, i,
|
|
2316
|
+
return Ae(this, n, i, h);
|
|
2439
2317
|
case "ucs2":
|
|
2440
2318
|
case "ucs-2":
|
|
2441
2319
|
case "utf16le":
|
|
2442
2320
|
case "utf-16le":
|
|
2443
|
-
return Ue(this, n, i,
|
|
2321
|
+
return Ue(this, n, i, h);
|
|
2444
2322
|
default:
|
|
2445
2323
|
if (x) throw new TypeError("Unknown encoding: " + b);
|
|
2446
2324
|
b = ("" + b).toLowerCase(), x = !0;
|
|
@@ -2456,7 +2334,7 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2456
2334
|
}
|
|
2457
2335
|
function ge(f, n, i) {
|
|
2458
2336
|
i = Math.min(f.length, i);
|
|
2459
|
-
const
|
|
2337
|
+
const h = [];
|
|
2460
2338
|
let b = n;
|
|
2461
2339
|
for (; b < i; ) {
|
|
2462
2340
|
const w = f[b];
|
|
@@ -2477,55 +2355,55 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2477
2355
|
ee = f[b + 1], Q = f[b + 2], te = f[b + 3], (ee & 192) === 128 && (Q & 192) === 128 && (te & 192) === 128 && (J = (w & 15) << 18 | (ee & 63) << 12 | (Q & 63) << 6 | te & 63, J > 65535 && J < 1114112 && (x = J));
|
|
2478
2356
|
}
|
|
2479
2357
|
}
|
|
2480
|
-
x === null ? (x = 65533, K = 1) : x > 65535 && (x -= 65536,
|
|
2358
|
+
x === null ? (x = 65533, K = 1) : x > 65535 && (x -= 65536, h.push(x >>> 10 & 1023 | 55296), x = 56320 | x & 1023), h.push(x), b += K;
|
|
2481
2359
|
}
|
|
2482
|
-
return Ve(
|
|
2360
|
+
return Ve(h);
|
|
2483
2361
|
}
|
|
2484
|
-
const
|
|
2362
|
+
const ve = 4096;
|
|
2485
2363
|
function Ve(f) {
|
|
2486
2364
|
const n = f.length;
|
|
2487
|
-
if (n <=
|
|
2365
|
+
if (n <= ve)
|
|
2488
2366
|
return String.fromCharCode.apply(String, f);
|
|
2489
|
-
let i = "",
|
|
2490
|
-
for (;
|
|
2367
|
+
let i = "", h = 0;
|
|
2368
|
+
for (; h < n; )
|
|
2491
2369
|
i += String.fromCharCode.apply(
|
|
2492
2370
|
String,
|
|
2493
|
-
f.slice(
|
|
2371
|
+
f.slice(h, h += ve)
|
|
2494
2372
|
);
|
|
2495
2373
|
return i;
|
|
2496
2374
|
}
|
|
2497
2375
|
function Te(f, n, i) {
|
|
2498
|
-
let
|
|
2376
|
+
let h = "";
|
|
2499
2377
|
i = Math.min(f.length, i);
|
|
2500
2378
|
for (let b = n; b < i; ++b)
|
|
2501
|
-
|
|
2502
|
-
return
|
|
2379
|
+
h += String.fromCharCode(f[b] & 127);
|
|
2380
|
+
return h;
|
|
2503
2381
|
}
|
|
2504
2382
|
function $e(f, n, i) {
|
|
2505
|
-
let
|
|
2383
|
+
let h = "";
|
|
2506
2384
|
i = Math.min(f.length, i);
|
|
2507
2385
|
for (let b = n; b < i; ++b)
|
|
2508
|
-
|
|
2509
|
-
return
|
|
2386
|
+
h += String.fromCharCode(f[b]);
|
|
2387
|
+
return h;
|
|
2510
2388
|
}
|
|
2511
2389
|
function Ie(f, n, i) {
|
|
2512
|
-
const
|
|
2513
|
-
(!n || n < 0) && (n = 0), (!i || i < 0 || i >
|
|
2390
|
+
const h = f.length;
|
|
2391
|
+
(!n || n < 0) && (n = 0), (!i || i < 0 || i > h) && (i = h);
|
|
2514
2392
|
let b = "";
|
|
2515
2393
|
for (let w = n; w < i; ++w)
|
|
2516
2394
|
b += bt[f[w]];
|
|
2517
2395
|
return b;
|
|
2518
2396
|
}
|
|
2519
2397
|
function He(f, n, i) {
|
|
2520
|
-
const
|
|
2398
|
+
const h = f.slice(n, i);
|
|
2521
2399
|
let b = "";
|
|
2522
|
-
for (let w = 0; w <
|
|
2523
|
-
b += String.fromCharCode(
|
|
2400
|
+
for (let w = 0; w < h.length - 1; w += 2)
|
|
2401
|
+
b += String.fromCharCode(h[w] + h[w + 1] * 256);
|
|
2524
2402
|
return b;
|
|
2525
2403
|
}
|
|
2526
2404
|
u.prototype.slice = function(n, i) {
|
|
2527
|
-
const
|
|
2528
|
-
n = ~~n, i = i === void 0 ?
|
|
2405
|
+
const h = this.length;
|
|
2406
|
+
n = ~~n, i = i === void 0 ? h : ~~i, n < 0 ? (n += h, n < 0 && (n = 0)) : n > h && (n = h), i < 0 ? (i += h, i < 0 && (i = 0)) : i > h && (i = h), i < n && (i = n);
|
|
2529
2407
|
const b = this.subarray(n, i);
|
|
2530
2408
|
return Object.setPrototypeOf(b, u.prototype), b;
|
|
2531
2409
|
};
|
|
@@ -2533,14 +2411,14 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2533
2411
|
if (f % 1 !== 0 || f < 0) throw new RangeError("offset is not uint");
|
|
2534
2412
|
if (f + n > i) throw new RangeError("Trying to access beyond buffer length");
|
|
2535
2413
|
}
|
|
2536
|
-
u.prototype.readUintLE = u.prototype.readUIntLE = function(n, i,
|
|
2537
|
-
n = n >>> 0, i = i >>> 0,
|
|
2414
|
+
u.prototype.readUintLE = u.prototype.readUIntLE = function(n, i, h) {
|
|
2415
|
+
n = n >>> 0, i = i >>> 0, h || z(n, i, this.length);
|
|
2538
2416
|
let b = this[n], w = 1, x = 0;
|
|
2539
2417
|
for (; ++x < i && (w *= 256); )
|
|
2540
2418
|
b += this[n + x] * w;
|
|
2541
2419
|
return b;
|
|
2542
|
-
}, u.prototype.readUintBE = u.prototype.readUIntBE = function(n, i,
|
|
2543
|
-
n = n >>> 0, i = i >>> 0,
|
|
2420
|
+
}, u.prototype.readUintBE = u.prototype.readUIntBE = function(n, i, h) {
|
|
2421
|
+
n = n >>> 0, i = i >>> 0, h || z(n, i, this.length);
|
|
2544
2422
|
let b = this[n + --i], w = 1;
|
|
2545
2423
|
for (; i > 0 && (w *= 256); )
|
|
2546
2424
|
b += this[n + --i] * w;
|
|
@@ -2557,24 +2435,24 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2557
2435
|
return n = n >>> 0, i || z(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
|
|
2558
2436
|
}, u.prototype.readBigUInt64LE = Re(function(n) {
|
|
2559
2437
|
n = n >>> 0, R(n, "offset");
|
|
2560
|
-
const i = this[n],
|
|
2561
|
-
(i === void 0 ||
|
|
2562
|
-
const b = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, w = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 +
|
|
2438
|
+
const i = this[n], h = this[n + 7];
|
|
2439
|
+
(i === void 0 || h === void 0) && M(n, this.length - 8);
|
|
2440
|
+
const b = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, w = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + h * 2 ** 24;
|
|
2563
2441
|
return BigInt(b) + (BigInt(w) << BigInt(32));
|
|
2564
2442
|
}), u.prototype.readBigUInt64BE = Re(function(n) {
|
|
2565
2443
|
n = n >>> 0, R(n, "offset");
|
|
2566
|
-
const i = this[n],
|
|
2567
|
-
(i === void 0 ||
|
|
2568
|
-
const b = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], w = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
2444
|
+
const i = this[n], h = this[n + 7];
|
|
2445
|
+
(i === void 0 || h === void 0) && M(n, this.length - 8);
|
|
2446
|
+
const b = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], w = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + h;
|
|
2569
2447
|
return (BigInt(b) << BigInt(32)) + BigInt(w);
|
|
2570
|
-
}), u.prototype.readIntLE = function(n, i,
|
|
2571
|
-
n = n >>> 0, i = i >>> 0,
|
|
2448
|
+
}), u.prototype.readIntLE = function(n, i, h) {
|
|
2449
|
+
n = n >>> 0, i = i >>> 0, h || z(n, i, this.length);
|
|
2572
2450
|
let b = this[n], w = 1, x = 0;
|
|
2573
2451
|
for (; ++x < i && (w *= 256); )
|
|
2574
2452
|
b += this[n + x] * w;
|
|
2575
2453
|
return w *= 128, b >= w && (b -= Math.pow(2, 8 * i)), b;
|
|
2576
|
-
}, u.prototype.readIntBE = function(n, i,
|
|
2577
|
-
n = n >>> 0, i = i >>> 0,
|
|
2454
|
+
}, u.prototype.readIntBE = function(n, i, h) {
|
|
2455
|
+
n = n >>> 0, i = i >>> 0, h || z(n, i, this.length);
|
|
2578
2456
|
let b = i, w = 1, x = this[n + --b];
|
|
2579
2457
|
for (; b > 0 && (w *= 256); )
|
|
2580
2458
|
x += this[n + --b] * w;
|
|
@@ -2583,29 +2461,29 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2583
2461
|
return n = n >>> 0, i || z(n, 1, this.length), this[n] & 128 ? (255 - this[n] + 1) * -1 : this[n];
|
|
2584
2462
|
}, u.prototype.readInt16LE = function(n, i) {
|
|
2585
2463
|
n = n >>> 0, i || z(n, 2, this.length);
|
|
2586
|
-
const
|
|
2587
|
-
return
|
|
2464
|
+
const h = this[n] | this[n + 1] << 8;
|
|
2465
|
+
return h & 32768 ? h | 4294901760 : h;
|
|
2588
2466
|
}, u.prototype.readInt16BE = function(n, i) {
|
|
2589
2467
|
n = n >>> 0, i || z(n, 2, this.length);
|
|
2590
|
-
const
|
|
2591
|
-
return
|
|
2468
|
+
const h = this[n + 1] | this[n] << 8;
|
|
2469
|
+
return h & 32768 ? h | 4294901760 : h;
|
|
2592
2470
|
}, u.prototype.readInt32LE = function(n, i) {
|
|
2593
2471
|
return n = n >>> 0, i || z(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
|
|
2594
2472
|
}, u.prototype.readInt32BE = function(n, i) {
|
|
2595
2473
|
return n = n >>> 0, i || z(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
|
|
2596
2474
|
}, u.prototype.readBigInt64LE = Re(function(n) {
|
|
2597
2475
|
n = n >>> 0, R(n, "offset");
|
|
2598
|
-
const i = this[n],
|
|
2599
|
-
(i === void 0 ||
|
|
2600
|
-
const b = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (
|
|
2476
|
+
const i = this[n], h = this[n + 7];
|
|
2477
|
+
(i === void 0 || h === void 0) && M(n, this.length - 8);
|
|
2478
|
+
const b = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (h << 24);
|
|
2601
2479
|
return (BigInt(b) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
2602
2480
|
}), u.prototype.readBigInt64BE = Re(function(n) {
|
|
2603
2481
|
n = n >>> 0, R(n, "offset");
|
|
2604
|
-
const i = this[n],
|
|
2605
|
-
(i === void 0 ||
|
|
2482
|
+
const i = this[n], h = this[n + 7];
|
|
2483
|
+
(i === void 0 || h === void 0) && M(n, this.length - 8);
|
|
2606
2484
|
const b = (i << 24) + // Overflow
|
|
2607
2485
|
this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
|
|
2608
|
-
return (BigInt(b) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
2486
|
+
return (BigInt(b) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + h);
|
|
2609
2487
|
}), u.prototype.readFloatLE = function(n, i) {
|
|
2610
2488
|
return n = n >>> 0, i || z(n, 4, this.length), r.read(this, n, !0, 23, 4);
|
|
2611
2489
|
}, u.prototype.readFloatBE = function(n, i) {
|
|
@@ -2615,49 +2493,49 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2615
2493
|
}, u.prototype.readDoubleBE = function(n, i) {
|
|
2616
2494
|
return n = n >>> 0, i || z(n, 8, this.length), r.read(this, n, !1, 52, 8);
|
|
2617
2495
|
};
|
|
2618
|
-
function ne(f, n, i,
|
|
2496
|
+
function ne(f, n, i, h, b, w) {
|
|
2619
2497
|
if (!u.isBuffer(f)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
2620
2498
|
if (n > b || n < w) throw new RangeError('"value" argument is out of bounds');
|
|
2621
|
-
if (i +
|
|
2499
|
+
if (i + h > f.length) throw new RangeError("Index out of range");
|
|
2622
2500
|
}
|
|
2623
|
-
u.prototype.writeUintLE = u.prototype.writeUIntLE = function(n, i,
|
|
2624
|
-
if (n = +n, i = i >>> 0,
|
|
2625
|
-
const K = Math.pow(2, 8 *
|
|
2626
|
-
ne(this, n, i,
|
|
2501
|
+
u.prototype.writeUintLE = u.prototype.writeUIntLE = function(n, i, h, b) {
|
|
2502
|
+
if (n = +n, i = i >>> 0, h = h >>> 0, !b) {
|
|
2503
|
+
const K = Math.pow(2, 8 * h) - 1;
|
|
2504
|
+
ne(this, n, i, h, K, 0);
|
|
2627
2505
|
}
|
|
2628
2506
|
let w = 1, x = 0;
|
|
2629
|
-
for (this[i] = n & 255; ++x <
|
|
2507
|
+
for (this[i] = n & 255; ++x < h && (w *= 256); )
|
|
2630
2508
|
this[i + x] = n / w & 255;
|
|
2631
|
-
return i +
|
|
2632
|
-
}, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(n, i,
|
|
2633
|
-
if (n = +n, i = i >>> 0,
|
|
2634
|
-
const K = Math.pow(2, 8 *
|
|
2635
|
-
ne(this, n, i,
|
|
2509
|
+
return i + h;
|
|
2510
|
+
}, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(n, i, h, b) {
|
|
2511
|
+
if (n = +n, i = i >>> 0, h = h >>> 0, !b) {
|
|
2512
|
+
const K = Math.pow(2, 8 * h) - 1;
|
|
2513
|
+
ne(this, n, i, h, K, 0);
|
|
2636
2514
|
}
|
|
2637
|
-
let w =
|
|
2515
|
+
let w = h - 1, x = 1;
|
|
2638
2516
|
for (this[i + w] = n & 255; --w >= 0 && (x *= 256); )
|
|
2639
2517
|
this[i + w] = n / x & 255;
|
|
2640
|
-
return i +
|
|
2641
|
-
}, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(n, i,
|
|
2642
|
-
return n = +n, i = i >>> 0,
|
|
2643
|
-
}, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(n, i,
|
|
2644
|
-
return n = +n, i = i >>> 0,
|
|
2645
|
-
}, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(n, i,
|
|
2646
|
-
return n = +n, i = i >>> 0,
|
|
2647
|
-
}, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(n, i,
|
|
2648
|
-
return n = +n, i = i >>> 0,
|
|
2649
|
-
}, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(n, i,
|
|
2650
|
-
return n = +n, i = i >>> 0,
|
|
2518
|
+
return i + h;
|
|
2519
|
+
}, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(n, i, h) {
|
|
2520
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
|
|
2521
|
+
}, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(n, i, h) {
|
|
2522
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
2523
|
+
}, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(n, i, h) {
|
|
2524
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
2525
|
+
}, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(n, i, h) {
|
|
2526
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
|
|
2527
|
+
}, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(n, i, h) {
|
|
2528
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
2651
2529
|
};
|
|
2652
|
-
function xe(f, n, i,
|
|
2653
|
-
d(n,
|
|
2530
|
+
function xe(f, n, i, h, b) {
|
|
2531
|
+
d(n, h, b, f, i, 7);
|
|
2654
2532
|
let w = Number(n & BigInt(4294967295));
|
|
2655
2533
|
f[i++] = w, w = w >> 8, f[i++] = w, w = w >> 8, f[i++] = w, w = w >> 8, f[i++] = w;
|
|
2656
2534
|
let x = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
2657
2535
|
return f[i++] = x, x = x >> 8, f[i++] = x, x = x >> 8, f[i++] = x, x = x >> 8, f[i++] = x, i;
|
|
2658
2536
|
}
|
|
2659
|
-
function je(f, n, i,
|
|
2660
|
-
d(n,
|
|
2537
|
+
function je(f, n, i, h, b) {
|
|
2538
|
+
d(n, h, b, f, i, 7);
|
|
2661
2539
|
let w = Number(n & BigInt(4294967295));
|
|
2662
2540
|
f[i + 7] = w, w = w >> 8, f[i + 6] = w, w = w >> 8, f[i + 5] = w, w = w >> 8, f[i + 4] = w;
|
|
2663
2541
|
let x = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
@@ -2667,75 +2545,75 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2667
2545
|
return xe(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
2668
2546
|
}), u.prototype.writeBigUInt64BE = Re(function(n, i = 0) {
|
|
2669
2547
|
return je(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
2670
|
-
}), u.prototype.writeIntLE = function(n, i,
|
|
2548
|
+
}), u.prototype.writeIntLE = function(n, i, h, b) {
|
|
2671
2549
|
if (n = +n, i = i >>> 0, !b) {
|
|
2672
|
-
const ee = Math.pow(2, 8 *
|
|
2673
|
-
ne(this, n, i,
|
|
2550
|
+
const ee = Math.pow(2, 8 * h - 1);
|
|
2551
|
+
ne(this, n, i, h, ee - 1, -ee);
|
|
2674
2552
|
}
|
|
2675
2553
|
let w = 0, x = 1, K = 0;
|
|
2676
|
-
for (this[i] = n & 255; ++w <
|
|
2554
|
+
for (this[i] = n & 255; ++w < h && (x *= 256); )
|
|
2677
2555
|
n < 0 && K === 0 && this[i + w - 1] !== 0 && (K = 1), this[i + w] = (n / x >> 0) - K & 255;
|
|
2678
|
-
return i +
|
|
2679
|
-
}, u.prototype.writeIntBE = function(n, i,
|
|
2556
|
+
return i + h;
|
|
2557
|
+
}, u.prototype.writeIntBE = function(n, i, h, b) {
|
|
2680
2558
|
if (n = +n, i = i >>> 0, !b) {
|
|
2681
|
-
const ee = Math.pow(2, 8 *
|
|
2682
|
-
ne(this, n, i,
|
|
2559
|
+
const ee = Math.pow(2, 8 * h - 1);
|
|
2560
|
+
ne(this, n, i, h, ee - 1, -ee);
|
|
2683
2561
|
}
|
|
2684
|
-
let w =
|
|
2562
|
+
let w = h - 1, x = 1, K = 0;
|
|
2685
2563
|
for (this[i + w] = n & 255; --w >= 0 && (x *= 256); )
|
|
2686
2564
|
n < 0 && K === 0 && this[i + w + 1] !== 0 && (K = 1), this[i + w] = (n / x >> 0) - K & 255;
|
|
2687
|
-
return i +
|
|
2688
|
-
}, u.prototype.writeInt8 = function(n, i,
|
|
2689
|
-
return n = +n, i = i >>> 0,
|
|
2690
|
-
}, u.prototype.writeInt16LE = function(n, i,
|
|
2691
|
-
return n = +n, i = i >>> 0,
|
|
2692
|
-
}, u.prototype.writeInt16BE = function(n, i,
|
|
2693
|
-
return n = +n, i = i >>> 0,
|
|
2694
|
-
}, u.prototype.writeInt32LE = function(n, i,
|
|
2695
|
-
return n = +n, i = i >>> 0,
|
|
2696
|
-
}, u.prototype.writeInt32BE = function(n, i,
|
|
2697
|
-
return n = +n, i = i >>> 0,
|
|
2565
|
+
return i + h;
|
|
2566
|
+
}, u.prototype.writeInt8 = function(n, i, h) {
|
|
2567
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
|
|
2568
|
+
}, u.prototype.writeInt16LE = function(n, i, h) {
|
|
2569
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
2570
|
+
}, u.prototype.writeInt16BE = function(n, i, h) {
|
|
2571
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
2572
|
+
}, u.prototype.writeInt32LE = function(n, i, h) {
|
|
2573
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
|
|
2574
|
+
}, u.prototype.writeInt32BE = function(n, i, h) {
|
|
2575
|
+
return n = +n, i = i >>> 0, h || ne(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
2698
2576
|
}, u.prototype.writeBigInt64LE = Re(function(n, i = 0) {
|
|
2699
2577
|
return xe(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
2700
2578
|
}), u.prototype.writeBigInt64BE = Re(function(n, i = 0) {
|
|
2701
2579
|
return je(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
2702
2580
|
});
|
|
2703
|
-
function
|
|
2704
|
-
if (i +
|
|
2581
|
+
function Pe(f, n, i, h, b, w) {
|
|
2582
|
+
if (i + h > f.length) throw new RangeError("Index out of range");
|
|
2705
2583
|
if (i < 0) throw new RangeError("Index out of range");
|
|
2706
2584
|
}
|
|
2707
|
-
function _(f, n, i,
|
|
2708
|
-
return n = +n, i = i >>> 0, b ||
|
|
2585
|
+
function _(f, n, i, h, b) {
|
|
2586
|
+
return n = +n, i = i >>> 0, b || Pe(f, n, i, 4), r.write(f, n, i, h, 23, 4), i + 4;
|
|
2709
2587
|
}
|
|
2710
|
-
u.prototype.writeFloatLE = function(n, i,
|
|
2711
|
-
return _(this, n, i, !0,
|
|
2712
|
-
}, u.prototype.writeFloatBE = function(n, i,
|
|
2713
|
-
return _(this, n, i, !1,
|
|
2588
|
+
u.prototype.writeFloatLE = function(n, i, h) {
|
|
2589
|
+
return _(this, n, i, !0, h);
|
|
2590
|
+
}, u.prototype.writeFloatBE = function(n, i, h) {
|
|
2591
|
+
return _(this, n, i, !1, h);
|
|
2714
2592
|
};
|
|
2715
|
-
function y(f, n, i,
|
|
2716
|
-
return n = +n, i = i >>> 0, b ||
|
|
2717
|
-
}
|
|
2718
|
-
u.prototype.writeDoubleLE = function(n, i,
|
|
2719
|
-
return y(this, n, i, !0,
|
|
2720
|
-
}, u.prototype.writeDoubleBE = function(n, i,
|
|
2721
|
-
return y(this, n, i, !1,
|
|
2722
|
-
}, u.prototype.copy = function(n, i,
|
|
2593
|
+
function y(f, n, i, h, b) {
|
|
2594
|
+
return n = +n, i = i >>> 0, b || Pe(f, n, i, 8), r.write(f, n, i, h, 52, 8), i + 8;
|
|
2595
|
+
}
|
|
2596
|
+
u.prototype.writeDoubleLE = function(n, i, h) {
|
|
2597
|
+
return y(this, n, i, !0, h);
|
|
2598
|
+
}, u.prototype.writeDoubleBE = function(n, i, h) {
|
|
2599
|
+
return y(this, n, i, !1, h);
|
|
2600
|
+
}, u.prototype.copy = function(n, i, h, b) {
|
|
2723
2601
|
if (!u.isBuffer(n)) throw new TypeError("argument should be a Buffer");
|
|
2724
|
-
if (
|
|
2602
|
+
if (h || (h = 0), !b && b !== 0 && (b = this.length), i >= n.length && (i = n.length), i || (i = 0), b > 0 && b < h && (b = h), b === h || n.length === 0 || this.length === 0) return 0;
|
|
2725
2603
|
if (i < 0)
|
|
2726
2604
|
throw new RangeError("targetStart out of bounds");
|
|
2727
|
-
if (
|
|
2605
|
+
if (h < 0 || h >= this.length) throw new RangeError("Index out of range");
|
|
2728
2606
|
if (b < 0) throw new RangeError("sourceEnd out of bounds");
|
|
2729
|
-
b > this.length && (b = this.length), n.length - i < b -
|
|
2730
|
-
const w = b -
|
|
2731
|
-
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i,
|
|
2607
|
+
b > this.length && (b = this.length), n.length - i < b - h && (b = n.length - i + h);
|
|
2608
|
+
const w = b - h;
|
|
2609
|
+
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i, h, b) : Uint8Array.prototype.set.call(
|
|
2732
2610
|
n,
|
|
2733
|
-
this.subarray(
|
|
2611
|
+
this.subarray(h, b),
|
|
2734
2612
|
i
|
|
2735
2613
|
), w;
|
|
2736
|
-
}, u.prototype.fill = function(n, i,
|
|
2614
|
+
}, u.prototype.fill = function(n, i, h, b) {
|
|
2737
2615
|
if (typeof n == "string") {
|
|
2738
|
-
if (typeof i == "string" ? (b = i, i = 0,
|
|
2616
|
+
if (typeof i == "string" ? (b = i, i = 0, h = this.length) : typeof h == "string" && (b = h, h = this.length), b !== void 0 && typeof b != "string")
|
|
2739
2617
|
throw new TypeError("encoding must be a string");
|
|
2740
2618
|
if (typeof b == "string" && !u.isEncoding(b))
|
|
2741
2619
|
throw new TypeError("Unknown encoding: " + b);
|
|
@@ -2744,20 +2622,20 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2744
2622
|
(b === "utf8" && x < 128 || b === "latin1") && (n = x);
|
|
2745
2623
|
}
|
|
2746
2624
|
} else typeof n == "number" ? n = n & 255 : typeof n == "boolean" && (n = Number(n));
|
|
2747
|
-
if (i < 0 || this.length < i || this.length <
|
|
2625
|
+
if (i < 0 || this.length < i || this.length < h)
|
|
2748
2626
|
throw new RangeError("Out of range index");
|
|
2749
|
-
if (
|
|
2627
|
+
if (h <= i)
|
|
2750
2628
|
return this;
|
|
2751
|
-
i = i >>> 0,
|
|
2629
|
+
i = i >>> 0, h = h === void 0 ? this.length : h >>> 0, n || (n = 0);
|
|
2752
2630
|
let w;
|
|
2753
2631
|
if (typeof n == "number")
|
|
2754
|
-
for (w = i; w <
|
|
2632
|
+
for (w = i; w < h; ++w)
|
|
2755
2633
|
this[w] = n;
|
|
2756
2634
|
else {
|
|
2757
2635
|
const x = u.isBuffer(n) ? n : u.from(n, b), K = x.length;
|
|
2758
2636
|
if (K === 0)
|
|
2759
2637
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
2760
|
-
for (w = 0; w <
|
|
2638
|
+
for (w = 0; w < h - i; ++w)
|
|
2761
2639
|
this[w + i] = x[w % K];
|
|
2762
2640
|
}
|
|
2763
2641
|
return this;
|
|
@@ -2803,34 +2681,34 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2803
2681
|
), D(
|
|
2804
2682
|
"ERR_OUT_OF_RANGE",
|
|
2805
2683
|
function(f, n, i) {
|
|
2806
|
-
let
|
|
2807
|
-
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? b = W(String(i)) : typeof i == "bigint" && (b = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (b = W(b)), b += "n"),
|
|
2684
|
+
let h = `The value of "${f}" is out of range.`, b = i;
|
|
2685
|
+
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? b = W(String(i)) : typeof i == "bigint" && (b = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (b = W(b)), b += "n"), h += ` It must be ${n}. Received ${b}`, h;
|
|
2808
2686
|
},
|
|
2809
2687
|
RangeError
|
|
2810
2688
|
);
|
|
2811
2689
|
function W(f) {
|
|
2812
2690
|
let n = "", i = f.length;
|
|
2813
|
-
const
|
|
2814
|
-
for (; i >=
|
|
2691
|
+
const h = f[0] === "-" ? 1 : 0;
|
|
2692
|
+
for (; i >= h + 4; i -= 3)
|
|
2815
2693
|
n = `_${f.slice(i - 3, i)}${n}`;
|
|
2816
2694
|
return `${f.slice(0, i)}${n}`;
|
|
2817
2695
|
}
|
|
2818
|
-
function
|
|
2819
|
-
R(n, "offset"), (f[n] === void 0 || f[n + i] === void 0) &&
|
|
2696
|
+
function l(f, n, i) {
|
|
2697
|
+
R(n, "offset"), (f[n] === void 0 || f[n + i] === void 0) && M(n, f.length - (i + 1));
|
|
2820
2698
|
}
|
|
2821
|
-
function d(f, n, i,
|
|
2699
|
+
function d(f, n, i, h, b, w) {
|
|
2822
2700
|
if (f > i || f < n) {
|
|
2823
2701
|
const x = typeof n == "bigint" ? "n" : "";
|
|
2824
2702
|
let K;
|
|
2825
2703
|
throw n === 0 || n === BigInt(0) ? K = `>= 0${x} and < 2${x} ** ${(w + 1) * 8}${x}` : K = `>= -(2${x} ** ${(w + 1) * 8 - 1}${x}) and < 2 ** ${(w + 1) * 8 - 1}${x}`, new S.ERR_OUT_OF_RANGE("value", K, f);
|
|
2826
2704
|
}
|
|
2827
|
-
h
|
|
2705
|
+
l(h, b, w);
|
|
2828
2706
|
}
|
|
2829
2707
|
function R(f, n) {
|
|
2830
2708
|
if (typeof f != "number")
|
|
2831
2709
|
throw new S.ERR_INVALID_ARG_TYPE(n, "number", f);
|
|
2832
2710
|
}
|
|
2833
|
-
function
|
|
2711
|
+
function M(f, n, i) {
|
|
2834
2712
|
throw Math.floor(f) !== f ? (R(f, i), new S.ERR_OUT_OF_RANGE("offset", "an integer", f)) : n < 0 ? new S.ERR_BUFFER_OUT_OF_BOUNDS() : new S.ERR_OUT_OF_RANGE(
|
|
2835
2713
|
"offset",
|
|
2836
2714
|
`>= 0 and <= ${n}`,
|
|
@@ -2847,16 +2725,16 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2847
2725
|
function G(f, n) {
|
|
2848
2726
|
n = n || 1 / 0;
|
|
2849
2727
|
let i;
|
|
2850
|
-
const
|
|
2728
|
+
const h = f.length;
|
|
2851
2729
|
let b = null;
|
|
2852
2730
|
const w = [];
|
|
2853
|
-
for (let x = 0; x <
|
|
2731
|
+
for (let x = 0; x < h; ++x) {
|
|
2854
2732
|
if (i = f.charCodeAt(x), i > 55295 && i < 57344) {
|
|
2855
2733
|
if (!b) {
|
|
2856
2734
|
if (i > 56319) {
|
|
2857
2735
|
(n -= 3) > -1 && w.push(239, 191, 189);
|
|
2858
2736
|
continue;
|
|
2859
|
-
} else if (x + 1 ===
|
|
2737
|
+
} else if (x + 1 === h) {
|
|
2860
2738
|
(n -= 3) > -1 && w.push(239, 191, 189);
|
|
2861
2739
|
continue;
|
|
2862
2740
|
}
|
|
@@ -2905,18 +2783,18 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2905
2783
|
return n;
|
|
2906
2784
|
}
|
|
2907
2785
|
function tt(f, n) {
|
|
2908
|
-
let i,
|
|
2786
|
+
let i, h, b;
|
|
2909
2787
|
const w = [];
|
|
2910
2788
|
for (let x = 0; x < f.length && !((n -= 2) < 0); ++x)
|
|
2911
|
-
i = f.charCodeAt(x),
|
|
2789
|
+
i = f.charCodeAt(x), h = i >> 8, b = i % 256, w.push(b), w.push(h);
|
|
2912
2790
|
return w;
|
|
2913
2791
|
}
|
|
2914
2792
|
function pt(f) {
|
|
2915
2793
|
return t.toByteArray(q(f));
|
|
2916
2794
|
}
|
|
2917
|
-
function rt(f, n, i,
|
|
2795
|
+
function rt(f, n, i, h) {
|
|
2918
2796
|
let b;
|
|
2919
|
-
for (b = 0; b <
|
|
2797
|
+
for (b = 0; b < h && !(b + i >= n.length || b >= f.length); ++b)
|
|
2920
2798
|
n[b + i] = f[b];
|
|
2921
2799
|
return b;
|
|
2922
2800
|
}
|
|
@@ -2929,9 +2807,9 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2929
2807
|
const bt = function() {
|
|
2930
2808
|
const f = "0123456789abcdef", n = new Array(256);
|
|
2931
2809
|
for (let i = 0; i < 16; ++i) {
|
|
2932
|
-
const
|
|
2810
|
+
const h = i * 16;
|
|
2933
2811
|
for (let b = 0; b < 16; ++b)
|
|
2934
|
-
n[
|
|
2812
|
+
n[h + b] = f[i] + f[b];
|
|
2935
2813
|
}
|
|
2936
2814
|
return n;
|
|
2937
2815
|
}();
|
|
@@ -2941,10 +2819,10 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2941
2819
|
function Ye() {
|
|
2942
2820
|
throw new Error("BigInt not supported");
|
|
2943
2821
|
}
|
|
2944
|
-
})(
|
|
2822
|
+
})(lt);
|
|
2945
2823
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2946
2824
|
(function(e, t) {
|
|
2947
|
-
var r =
|
|
2825
|
+
var r = lt, a = r.Buffer;
|
|
2948
2826
|
function o(c, u) {
|
|
2949
2827
|
for (var p in c)
|
|
2950
2828
|
u[p] = c[p];
|
|
@@ -2971,29 +2849,29 @@ Dr.write = function(e, t, r, a, o, s) {
|
|
|
2971
2849
|
throw new TypeError("Argument must be a number");
|
|
2972
2850
|
return r.SlowBuffer(c);
|
|
2973
2851
|
};
|
|
2974
|
-
})(
|
|
2975
|
-
var
|
|
2976
|
-
function
|
|
2852
|
+
})(Sr, Sr.exports);
|
|
2853
|
+
var me = Sr.exports, fr = 65536, na = 4294967295;
|
|
2854
|
+
function ia() {
|
|
2977
2855
|
throw new Error(`Secure random number generation is not supported by this browser.
|
|
2978
2856
|
Use Chrome, Firefox or Internet Explorer 11`);
|
|
2979
2857
|
}
|
|
2980
|
-
var
|
|
2981
|
-
qt && qt.getRandomValues ?
|
|
2982
|
-
function
|
|
2983
|
-
if (e >
|
|
2984
|
-
var r =
|
|
2858
|
+
var aa = me.Buffer, qt = Ke.crypto || Ke.msCrypto;
|
|
2859
|
+
qt && qt.getRandomValues ? Br.exports = oa : Br.exports = ia;
|
|
2860
|
+
function oa(e, t) {
|
|
2861
|
+
if (e > na) throw new RangeError("requested too many random bytes");
|
|
2862
|
+
var r = aa.allocUnsafe(e);
|
|
2985
2863
|
if (e > 0)
|
|
2986
|
-
if (e >
|
|
2987
|
-
for (var a = 0; a < e; a +=
|
|
2988
|
-
qt.getRandomValues(r.slice(a, a +
|
|
2864
|
+
if (e > fr)
|
|
2865
|
+
for (var a = 0; a < e; a += fr)
|
|
2866
|
+
qt.getRandomValues(r.slice(a, a + fr));
|
|
2989
2867
|
else
|
|
2990
2868
|
qt.getRandomValues(r);
|
|
2991
2869
|
return typeof t == "function" ? process.nextTick(function() {
|
|
2992
2870
|
t(null, r);
|
|
2993
2871
|
}) : r;
|
|
2994
2872
|
}
|
|
2995
|
-
var
|
|
2996
|
-
typeof Object.create == "function" ?
|
|
2873
|
+
var sa = Br.exports, Ar = { exports: {} };
|
|
2874
|
+
typeof Object.create == "function" ? Ar.exports = function(t, r) {
|
|
2997
2875
|
r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
|
|
2998
2876
|
constructor: {
|
|
2999
2877
|
value: t,
|
|
@@ -3002,7 +2880,7 @@ typeof Object.create == "function" ? Tr.exports = function(t, r) {
|
|
|
3002
2880
|
configurable: !0
|
|
3003
2881
|
}
|
|
3004
2882
|
}));
|
|
3005
|
-
} :
|
|
2883
|
+
} : Ar.exports = function(t, r) {
|
|
3006
2884
|
if (r) {
|
|
3007
2885
|
t.super_ = r;
|
|
3008
2886
|
var a = function() {
|
|
@@ -3010,7 +2888,7 @@ typeof Object.create == "function" ? Tr.exports = function(t, r) {
|
|
|
3010
2888
|
a.prototype = r.prototype, t.prototype = new a(), t.prototype.constructor = t;
|
|
3011
2889
|
}
|
|
3012
2890
|
};
|
|
3013
|
-
var be =
|
|
2891
|
+
var be = Ar.exports, Tr = { exports: {} }, Dr = { exports: {} }, st = typeof Reflect == "object" ? Reflect : null, Zr = st && typeof st.apply == "function" ? st.apply : function(t, r, a) {
|
|
3014
2892
|
return Function.prototype.apply.call(t, r, a);
|
|
3015
2893
|
}, Ut;
|
|
3016
2894
|
st && typeof st.ownKeys == "function" ? Ut = st.ownKeys : Object.getOwnPropertySymbols ? Ut = function(t) {
|
|
@@ -3018,50 +2896,50 @@ st && typeof st.ownKeys == "function" ? Ut = st.ownKeys : Object.getOwnPropertyS
|
|
|
3018
2896
|
} : Ut = function(t) {
|
|
3019
2897
|
return Object.getOwnPropertyNames(t);
|
|
3020
2898
|
};
|
|
3021
|
-
function
|
|
2899
|
+
function fa(e) {
|
|
3022
2900
|
console && console.warn && console.warn(e);
|
|
3023
2901
|
}
|
|
3024
|
-
var
|
|
2902
|
+
var Fn = Number.isNaN || function(t) {
|
|
3025
2903
|
return t !== t;
|
|
3026
2904
|
};
|
|
3027
2905
|
function V() {
|
|
3028
2906
|
V.init.call(this);
|
|
3029
2907
|
}
|
|
3030
|
-
|
|
3031
|
-
|
|
2908
|
+
Dr.exports = V;
|
|
2909
|
+
Dr.exports.once = la;
|
|
3032
2910
|
V.EventEmitter = V;
|
|
3033
2911
|
V.prototype._events = void 0;
|
|
3034
2912
|
V.prototype._eventsCount = 0;
|
|
3035
2913
|
V.prototype._maxListeners = void 0;
|
|
3036
|
-
var
|
|
3037
|
-
function
|
|
2914
|
+
var en = 10;
|
|
2915
|
+
function Jt(e) {
|
|
3038
2916
|
if (typeof e != "function")
|
|
3039
2917
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
|
|
3040
2918
|
}
|
|
3041
2919
|
Object.defineProperty(V, "defaultMaxListeners", {
|
|
3042
2920
|
enumerable: !0,
|
|
3043
2921
|
get: function() {
|
|
3044
|
-
return
|
|
2922
|
+
return en;
|
|
3045
2923
|
},
|
|
3046
2924
|
set: function(e) {
|
|
3047
|
-
if (typeof e != "number" || e < 0 ||
|
|
2925
|
+
if (typeof e != "number" || e < 0 || Fn(e))
|
|
3048
2926
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3049
|
-
|
|
2927
|
+
en = e;
|
|
3050
2928
|
}
|
|
3051
2929
|
});
|
|
3052
2930
|
V.init = function() {
|
|
3053
2931
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
3054
2932
|
};
|
|
3055
2933
|
V.prototype.setMaxListeners = function(t) {
|
|
3056
|
-
if (typeof t != "number" || t < 0 ||
|
|
2934
|
+
if (typeof t != "number" || t < 0 || Fn(t))
|
|
3057
2935
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3058
2936
|
return this._maxListeners = t, this;
|
|
3059
2937
|
};
|
|
3060
|
-
function
|
|
2938
|
+
function Nn(e) {
|
|
3061
2939
|
return e._maxListeners === void 0 ? V.defaultMaxListeners : e._maxListeners;
|
|
3062
2940
|
}
|
|
3063
2941
|
V.prototype.getMaxListeners = function() {
|
|
3064
|
-
return
|
|
2942
|
+
return Nn(this);
|
|
3065
2943
|
};
|
|
3066
2944
|
V.prototype.emit = function(t) {
|
|
3067
2945
|
for (var r = [], a = 1; a < arguments.length; a++) r.push(arguments[a]);
|
|
@@ -3081,51 +2959,51 @@ V.prototype.emit = function(t) {
|
|
|
3081
2959
|
if (p === void 0)
|
|
3082
2960
|
return !1;
|
|
3083
2961
|
if (typeof p == "function")
|
|
3084
|
-
|
|
2962
|
+
Zr(p, this, r);
|
|
3085
2963
|
else
|
|
3086
|
-
for (var g = p.length,
|
|
3087
|
-
|
|
2964
|
+
for (var g = p.length, v = jn(p, g), a = 0; a < g; ++a)
|
|
2965
|
+
Zr(v[a], this, r);
|
|
3088
2966
|
return !0;
|
|
3089
2967
|
};
|
|
3090
|
-
function
|
|
2968
|
+
function Dn(e, t, r, a) {
|
|
3091
2969
|
var o, s, c;
|
|
3092
|
-
if (
|
|
2970
|
+
if (Jt(r), s = e._events, s === void 0 ? (s = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (s.newListener !== void 0 && (e.emit(
|
|
3093
2971
|
"newListener",
|
|
3094
2972
|
t,
|
|
3095
2973
|
r.listener ? r.listener : r
|
|
3096
2974
|
), s = e._events), c = s[t]), c === void 0)
|
|
3097
2975
|
c = s[t] = r, ++e._eventsCount;
|
|
3098
|
-
else if (typeof c == "function" ? c = s[t] = a ? [r, c] : [c, r] : a ? c.unshift(r) : c.push(r), o =
|
|
2976
|
+
else if (typeof c == "function" ? c = s[t] = a ? [r, c] : [c, r] : a ? c.unshift(r) : c.push(r), o = Nn(e), o > 0 && c.length > o && !c.warned) {
|
|
3099
2977
|
c.warned = !0;
|
|
3100
2978
|
var u = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3101
|
-
u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = c.length,
|
|
2979
|
+
u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = c.length, fa(u);
|
|
3102
2980
|
}
|
|
3103
2981
|
return e;
|
|
3104
2982
|
}
|
|
3105
2983
|
V.prototype.addListener = function(t, r) {
|
|
3106
|
-
return
|
|
2984
|
+
return Dn(this, t, r, !1);
|
|
3107
2985
|
};
|
|
3108
2986
|
V.prototype.on = V.prototype.addListener;
|
|
3109
2987
|
V.prototype.prependListener = function(t, r) {
|
|
3110
|
-
return
|
|
2988
|
+
return Dn(this, t, r, !0);
|
|
3111
2989
|
};
|
|
3112
|
-
function
|
|
2990
|
+
function ua() {
|
|
3113
2991
|
if (!this.fired)
|
|
3114
2992
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
3115
2993
|
}
|
|
3116
|
-
function
|
|
3117
|
-
var a = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, o =
|
|
2994
|
+
function Un(e, t, r) {
|
|
2995
|
+
var a = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, o = ua.bind(a);
|
|
3118
2996
|
return o.listener = r, a.wrapFn = o, o;
|
|
3119
2997
|
}
|
|
3120
2998
|
V.prototype.once = function(t, r) {
|
|
3121
|
-
return
|
|
2999
|
+
return Jt(r), this.on(t, Un(this, t, r)), this;
|
|
3122
3000
|
};
|
|
3123
3001
|
V.prototype.prependOnceListener = function(t, r) {
|
|
3124
|
-
return
|
|
3002
|
+
return Jt(r), this.prependListener(t, Un(this, t, r)), this;
|
|
3125
3003
|
};
|
|
3126
3004
|
V.prototype.removeListener = function(t, r) {
|
|
3127
3005
|
var a, o, s, c, u;
|
|
3128
|
-
if (
|
|
3006
|
+
if (Jt(r), o = this._events, o === void 0)
|
|
3129
3007
|
return this;
|
|
3130
3008
|
if (a = o[t], a === void 0)
|
|
3131
3009
|
return this;
|
|
@@ -3139,7 +3017,7 @@ V.prototype.removeListener = function(t, r) {
|
|
|
3139
3017
|
}
|
|
3140
3018
|
if (s < 0)
|
|
3141
3019
|
return this;
|
|
3142
|
-
s === 0 ? a.shift() :
|
|
3020
|
+
s === 0 ? a.shift() : ca(a, s), a.length === 1 && (o[t] = a[0]), o.removeListener !== void 0 && this.emit("removeListener", t, u || r);
|
|
3143
3021
|
}
|
|
3144
3022
|
return this;
|
|
3145
3023
|
};
|
|
@@ -3163,24 +3041,24 @@ V.prototype.removeAllListeners = function(t) {
|
|
|
3163
3041
|
this.removeListener(t, r[o]);
|
|
3164
3042
|
return this;
|
|
3165
3043
|
};
|
|
3166
|
-
function
|
|
3044
|
+
function $n(e, t, r) {
|
|
3167
3045
|
var a = e._events;
|
|
3168
3046
|
if (a === void 0)
|
|
3169
3047
|
return [];
|
|
3170
3048
|
var o = a[t];
|
|
3171
|
-
return o === void 0 ? [] : typeof o == "function" ? r ? [o.listener || o] : [o] : r ?
|
|
3049
|
+
return o === void 0 ? [] : typeof o == "function" ? r ? [o.listener || o] : [o] : r ? ha(o) : jn(o, o.length);
|
|
3172
3050
|
}
|
|
3173
3051
|
V.prototype.listeners = function(t) {
|
|
3174
|
-
return
|
|
3052
|
+
return $n(this, t, !0);
|
|
3175
3053
|
};
|
|
3176
3054
|
V.prototype.rawListeners = function(t) {
|
|
3177
|
-
return
|
|
3055
|
+
return $n(this, t, !1);
|
|
3178
3056
|
};
|
|
3179
3057
|
V.listenerCount = function(e, t) {
|
|
3180
|
-
return typeof e.listenerCount == "function" ? e.listenerCount(t) :
|
|
3058
|
+
return typeof e.listenerCount == "function" ? e.listenerCount(t) : Hn.call(e, t);
|
|
3181
3059
|
};
|
|
3182
|
-
V.prototype.listenerCount =
|
|
3183
|
-
function
|
|
3060
|
+
V.prototype.listenerCount = Hn;
|
|
3061
|
+
function Hn(e) {
|
|
3184
3062
|
var t = this._events;
|
|
3185
3063
|
if (t !== void 0) {
|
|
3186
3064
|
var r = t[e];
|
|
@@ -3194,22 +3072,22 @@ function jn(e) {
|
|
|
3194
3072
|
V.prototype.eventNames = function() {
|
|
3195
3073
|
return this._eventsCount > 0 ? Ut(this._events) : [];
|
|
3196
3074
|
};
|
|
3197
|
-
function
|
|
3075
|
+
function jn(e, t) {
|
|
3198
3076
|
for (var r = new Array(t), a = 0; a < t; ++a)
|
|
3199
3077
|
r[a] = e[a];
|
|
3200
3078
|
return r;
|
|
3201
3079
|
}
|
|
3202
|
-
function
|
|
3080
|
+
function ca(e, t) {
|
|
3203
3081
|
for (; t + 1 < e.length; t++)
|
|
3204
3082
|
e[t] = e[t + 1];
|
|
3205
3083
|
e.pop();
|
|
3206
3084
|
}
|
|
3207
|
-
function
|
|
3085
|
+
function ha(e) {
|
|
3208
3086
|
for (var t = new Array(e.length), r = 0; r < t.length; ++r)
|
|
3209
3087
|
t[r] = e[r].listener || e[r];
|
|
3210
3088
|
return t;
|
|
3211
3089
|
}
|
|
3212
|
-
function
|
|
3090
|
+
function la(e, t) {
|
|
3213
3091
|
return new Promise(function(r, a) {
|
|
3214
3092
|
function o(c) {
|
|
3215
3093
|
e.removeListener(t, s), a(c);
|
|
@@ -3217,13 +3095,13 @@ function ga(e, t) {
|
|
|
3217
3095
|
function s() {
|
|
3218
3096
|
typeof e.removeListener == "function" && e.removeListener("error", o), r([].slice.call(arguments));
|
|
3219
3097
|
}
|
|
3220
|
-
|
|
3098
|
+
Wn(e, t, s, { once: !0 }), t !== "error" && da(e, o, { once: !0 });
|
|
3221
3099
|
});
|
|
3222
3100
|
}
|
|
3223
|
-
function
|
|
3224
|
-
typeof e.on == "function" &&
|
|
3101
|
+
function da(e, t, r) {
|
|
3102
|
+
typeof e.on == "function" && Wn(e, "error", t, r);
|
|
3225
3103
|
}
|
|
3226
|
-
function
|
|
3104
|
+
function Wn(e, t, r, a) {
|
|
3227
3105
|
if (typeof e.on == "function")
|
|
3228
3106
|
a.once ? e.once(t, r) : e.on(t, r);
|
|
3229
3107
|
else if (typeof e.addEventListener == "function")
|
|
@@ -3233,15 +3111,15 @@ function qn(e, t, r, a) {
|
|
|
3233
3111
|
else
|
|
3234
3112
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
|
|
3235
3113
|
}
|
|
3236
|
-
var
|
|
3237
|
-
const
|
|
3114
|
+
var qn = Dr.exports, Kn = qn.EventEmitter;
|
|
3115
|
+
const pa = {}, ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3238
3116
|
__proto__: null,
|
|
3239
|
-
default:
|
|
3240
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3241
|
-
var
|
|
3242
|
-
function
|
|
3243
|
-
if (
|
|
3244
|
-
|
|
3117
|
+
default: pa
|
|
3118
|
+
}, Symbol.toStringTag, { value: "Module" })), Ur = /* @__PURE__ */ Hi(ba);
|
|
3119
|
+
var ur, tn;
|
|
3120
|
+
function ya() {
|
|
3121
|
+
if (tn) return ur;
|
|
3122
|
+
tn = 1;
|
|
3245
3123
|
function e(B, C) {
|
|
3246
3124
|
var A = Object.keys(B);
|
|
3247
3125
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -3293,11 +3171,11 @@ function Ea() {
|
|
|
3293
3171
|
}
|
|
3294
3172
|
return (C === "string" ? String : Number)(B);
|
|
3295
3173
|
}
|
|
3296
|
-
var p =
|
|
3174
|
+
var p = lt, g = p.Buffer, v = Ur, m = v.inspect, T = m && m.custom || "inspect";
|
|
3297
3175
|
function k(B, C, A) {
|
|
3298
3176
|
g.prototype.copy.call(B, C, A);
|
|
3299
3177
|
}
|
|
3300
|
-
return
|
|
3178
|
+
return ur = /* @__PURE__ */ function() {
|
|
3301
3179
|
function B() {
|
|
3302
3180
|
a(this, B), this.head = null, this.tail = null, this.length = 0;
|
|
3303
3181
|
}
|
|
@@ -3343,8 +3221,8 @@ function Ea() {
|
|
|
3343
3221
|
key: "concat",
|
|
3344
3222
|
value: function(A) {
|
|
3345
3223
|
if (this.length === 0) return g.alloc(0);
|
|
3346
|
-
for (var I = g.allocUnsafe(A >>> 0), O = this.head,
|
|
3347
|
-
k(O.data, I,
|
|
3224
|
+
for (var I = g.allocUnsafe(A >>> 0), O = this.head, P = 0; O; )
|
|
3225
|
+
k(O.data, I, P), P += O.data.length, O = O.next;
|
|
3348
3226
|
return I;
|
|
3349
3227
|
}
|
|
3350
3228
|
// Consumes a specified amount of bytes or characters from the buffered data.
|
|
@@ -3363,37 +3241,37 @@ function Ea() {
|
|
|
3363
3241
|
}, {
|
|
3364
3242
|
key: "_getString",
|
|
3365
3243
|
value: function(A) {
|
|
3366
|
-
var I = this.head, O = 1,
|
|
3367
|
-
for (A -=
|
|
3368
|
-
var L = I.data,
|
|
3369
|
-
if (
|
|
3370
|
-
|
|
3244
|
+
var I = this.head, O = 1, P = I.data;
|
|
3245
|
+
for (A -= P.length; I = I.next; ) {
|
|
3246
|
+
var L = I.data, F = A > L.length ? L.length : A;
|
|
3247
|
+
if (F === L.length ? P += L : P += L.slice(0, A), A -= F, A === 0) {
|
|
3248
|
+
F === L.length ? (++O, I.next ? this.head = I.next : this.head = this.tail = null) : (this.head = I, I.data = L.slice(F));
|
|
3371
3249
|
break;
|
|
3372
3250
|
}
|
|
3373
3251
|
++O;
|
|
3374
3252
|
}
|
|
3375
|
-
return this.length -= O,
|
|
3253
|
+
return this.length -= O, P;
|
|
3376
3254
|
}
|
|
3377
3255
|
// Consumes a specified amount of bytes from the buffered data.
|
|
3378
3256
|
}, {
|
|
3379
3257
|
key: "_getBuffer",
|
|
3380
3258
|
value: function(A) {
|
|
3381
|
-
var I = g.allocUnsafe(A), O = this.head,
|
|
3259
|
+
var I = g.allocUnsafe(A), O = this.head, P = 1;
|
|
3382
3260
|
for (O.data.copy(I), A -= O.data.length; O = O.next; ) {
|
|
3383
|
-
var L = O.data,
|
|
3384
|
-
if (L.copy(I, I.length - A, 0,
|
|
3385
|
-
|
|
3261
|
+
var L = O.data, F = A > L.length ? L.length : A;
|
|
3262
|
+
if (L.copy(I, I.length - A, 0, F), A -= F, A === 0) {
|
|
3263
|
+
F === L.length ? (++P, O.next ? this.head = O.next : this.head = this.tail = null) : (this.head = O, O.data = L.slice(F));
|
|
3386
3264
|
break;
|
|
3387
3265
|
}
|
|
3388
|
-
++
|
|
3266
|
+
++P;
|
|
3389
3267
|
}
|
|
3390
|
-
return this.length -=
|
|
3268
|
+
return this.length -= P, I;
|
|
3391
3269
|
}
|
|
3392
3270
|
// Make sure the linked list only shows the minimal necessary information.
|
|
3393
3271
|
}, {
|
|
3394
3272
|
key: T,
|
|
3395
3273
|
value: function(A, I) {
|
|
3396
|
-
return
|
|
3274
|
+
return m(this, t(t({}, I), {}, {
|
|
3397
3275
|
// Only inspect one level.
|
|
3398
3276
|
depth: 0,
|
|
3399
3277
|
// It should not recurse.
|
|
@@ -3401,54 +3279,54 @@ function Ea() {
|
|
|
3401
3279
|
}));
|
|
3402
3280
|
}
|
|
3403
3281
|
}]), B;
|
|
3404
|
-
}(),
|
|
3282
|
+
}(), ur;
|
|
3405
3283
|
}
|
|
3406
|
-
function
|
|
3284
|
+
function _a(e, t) {
|
|
3407
3285
|
var r = this, a = this._readableState && this._readableState.destroyed, o = this._writableState && this._writableState.destroyed;
|
|
3408
|
-
return a || o ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.nextTick(
|
|
3409
|
-
!t && s ? r._writableState ? r._writableState.errorEmitted ? process.nextTick($t, r) : (r._writableState.errorEmitted = !0, process.nextTick(
|
|
3286
|
+
return a || o ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.nextTick(Ir, this, e)) : process.nextTick(Ir, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(s) {
|
|
3287
|
+
!t && s ? r._writableState ? r._writableState.errorEmitted ? process.nextTick($t, r) : (r._writableState.errorEmitted = !0, process.nextTick(rn, r, s)) : process.nextTick(rn, r, s) : t ? (process.nextTick($t, r), t(s)) : process.nextTick($t, r);
|
|
3410
3288
|
}), this);
|
|
3411
3289
|
}
|
|
3412
|
-
function
|
|
3413
|
-
|
|
3290
|
+
function rn(e, t) {
|
|
3291
|
+
Ir(e, t), $t(e);
|
|
3414
3292
|
}
|
|
3415
3293
|
function $t(e) {
|
|
3416
3294
|
e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
|
|
3417
3295
|
}
|
|
3418
|
-
function
|
|
3296
|
+
function wa() {
|
|
3419
3297
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
|
|
3420
3298
|
}
|
|
3421
|
-
function
|
|
3299
|
+
function Ir(e, t) {
|
|
3422
3300
|
e.emit("error", t);
|
|
3423
3301
|
}
|
|
3424
|
-
function
|
|
3302
|
+
function ga(e, t) {
|
|
3425
3303
|
var r = e._readableState, a = e._writableState;
|
|
3426
3304
|
r && r.autoDestroy || a && a.autoDestroy ? e.destroy(t) : e.emit("error", t);
|
|
3427
3305
|
}
|
|
3428
|
-
var
|
|
3429
|
-
destroy:
|
|
3430
|
-
undestroy:
|
|
3431
|
-
errorOrDestroy:
|
|
3306
|
+
var Gn = {
|
|
3307
|
+
destroy: _a,
|
|
3308
|
+
undestroy: wa,
|
|
3309
|
+
errorOrDestroy: ga
|
|
3432
3310
|
}, Ze = {};
|
|
3433
|
-
function
|
|
3311
|
+
function va(e, t) {
|
|
3434
3312
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
|
|
3435
3313
|
}
|
|
3436
|
-
var
|
|
3314
|
+
var Vn = {};
|
|
3437
3315
|
function Se(e, t, r) {
|
|
3438
3316
|
r || (r = Error);
|
|
3439
3317
|
function a(s, c, u) {
|
|
3440
3318
|
return typeof t == "string" ? t : t(s, c, u);
|
|
3441
3319
|
}
|
|
3442
3320
|
var o = /* @__PURE__ */ function(s) {
|
|
3443
|
-
|
|
3321
|
+
va(c, s);
|
|
3444
3322
|
function c(u, p, g) {
|
|
3445
3323
|
return s.call(this, a(u, p, g)) || this;
|
|
3446
3324
|
}
|
|
3447
3325
|
return c;
|
|
3448
3326
|
}(r);
|
|
3449
|
-
o.prototype.name = r.name, o.prototype.code = e,
|
|
3327
|
+
o.prototype.name = r.name, o.prototype.code = e, Vn[e] = o;
|
|
3450
3328
|
}
|
|
3451
|
-
function
|
|
3329
|
+
function nn(e, t) {
|
|
3452
3330
|
if (Array.isArray(e)) {
|
|
3453
3331
|
var r = e.length;
|
|
3454
3332
|
return e = e.map(function(a) {
|
|
@@ -3457,13 +3335,13 @@ function an(e, t) {
|
|
|
3457
3335
|
} else
|
|
3458
3336
|
return "of ".concat(t, " ").concat(String(e));
|
|
3459
3337
|
}
|
|
3460
|
-
function
|
|
3338
|
+
function ma(e, t, r) {
|
|
3461
3339
|
return e.substr(0, t.length) === t;
|
|
3462
3340
|
}
|
|
3463
|
-
function
|
|
3341
|
+
function xa(e, t, r) {
|
|
3464
3342
|
return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
|
|
3465
3343
|
}
|
|
3466
|
-
function
|
|
3344
|
+
function Ea(e, t, r) {
|
|
3467
3345
|
return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
|
|
3468
3346
|
}
|
|
3469
3347
|
Se("ERR_INVALID_OPT_VALUE", function(e, t) {
|
|
@@ -3471,13 +3349,13 @@ Se("ERR_INVALID_OPT_VALUE", function(e, t) {
|
|
|
3471
3349
|
}, TypeError);
|
|
3472
3350
|
Se("ERR_INVALID_ARG_TYPE", function(e, t, r) {
|
|
3473
3351
|
var a;
|
|
3474
|
-
typeof t == "string" &&
|
|
3352
|
+
typeof t == "string" && ma(t, "not ") ? (a = "must not be", t = t.replace(/^not /, "")) : a = "must be";
|
|
3475
3353
|
var o;
|
|
3476
|
-
if (
|
|
3477
|
-
o = "The ".concat(e, " ").concat(a, " ").concat(
|
|
3354
|
+
if (xa(e, " argument"))
|
|
3355
|
+
o = "The ".concat(e, " ").concat(a, " ").concat(nn(t, "type"));
|
|
3478
3356
|
else {
|
|
3479
|
-
var s =
|
|
3480
|
-
o = 'The "'.concat(e, '" ').concat(s, " ").concat(a, " ").concat(
|
|
3357
|
+
var s = Ea(e, ".") ? "property" : "argument";
|
|
3358
|
+
o = 'The "'.concat(e, '" ').concat(s, " ").concat(a, " ").concat(nn(t, "type"));
|
|
3481
3359
|
}
|
|
3482
3360
|
return o += ". Received type ".concat(typeof r), o;
|
|
3483
3361
|
}, TypeError);
|
|
@@ -3497,40 +3375,40 @@ Se("ERR_UNKNOWN_ENCODING", function(e) {
|
|
|
3497
3375
|
return "Unknown encoding: " + e;
|
|
3498
3376
|
}, TypeError);
|
|
3499
3377
|
Se("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
3500
|
-
Ze.codes =
|
|
3501
|
-
var
|
|
3502
|
-
function
|
|
3378
|
+
Ze.codes = Vn;
|
|
3379
|
+
var Ra = Ze.codes.ERR_INVALID_OPT_VALUE;
|
|
3380
|
+
function Ba(e, t, r) {
|
|
3503
3381
|
return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
|
|
3504
3382
|
}
|
|
3505
|
-
function
|
|
3506
|
-
var o =
|
|
3383
|
+
function Sa(e, t, r, a) {
|
|
3384
|
+
var o = Ba(t, a, r);
|
|
3507
3385
|
if (o != null) {
|
|
3508
3386
|
if (!(isFinite(o) && Math.floor(o) === o) || o < 0) {
|
|
3509
3387
|
var s = a ? r : "highWaterMark";
|
|
3510
|
-
throw new
|
|
3388
|
+
throw new Ra(s, o);
|
|
3511
3389
|
}
|
|
3512
3390
|
return Math.floor(o);
|
|
3513
3391
|
}
|
|
3514
3392
|
return e.objectMode ? 16 : 16 * 1024;
|
|
3515
3393
|
}
|
|
3516
|
-
var
|
|
3517
|
-
getHighWaterMark:
|
|
3518
|
-
},
|
|
3519
|
-
function
|
|
3520
|
-
if (
|
|
3394
|
+
var Jn = {
|
|
3395
|
+
getHighWaterMark: Sa
|
|
3396
|
+
}, Aa = Ta;
|
|
3397
|
+
function Ta(e, t) {
|
|
3398
|
+
if (cr("noDeprecation"))
|
|
3521
3399
|
return e;
|
|
3522
3400
|
var r = !1;
|
|
3523
3401
|
function a() {
|
|
3524
3402
|
if (!r) {
|
|
3525
|
-
if (
|
|
3403
|
+
if (cr("throwDeprecation"))
|
|
3526
3404
|
throw new Error(t);
|
|
3527
|
-
|
|
3405
|
+
cr("traceDeprecation") ? console.trace(t) : console.warn(t), r = !0;
|
|
3528
3406
|
}
|
|
3529
3407
|
return e.apply(this, arguments);
|
|
3530
3408
|
}
|
|
3531
3409
|
return a;
|
|
3532
3410
|
}
|
|
3533
|
-
function
|
|
3411
|
+
function cr(e) {
|
|
3534
3412
|
try {
|
|
3535
3413
|
if (!Ke.localStorage) return !1;
|
|
3536
3414
|
} catch {
|
|
@@ -3539,21 +3417,21 @@ function lr(e) {
|
|
|
3539
3417
|
var t = Ke.localStorage[e];
|
|
3540
3418
|
return t == null ? !1 : String(t).toLowerCase() === "true";
|
|
3541
3419
|
}
|
|
3542
|
-
var hr,
|
|
3543
|
-
function
|
|
3544
|
-
if (
|
|
3545
|
-
|
|
3420
|
+
var hr, an;
|
|
3421
|
+
function Yn() {
|
|
3422
|
+
if (an) return hr;
|
|
3423
|
+
an = 1, hr = N;
|
|
3546
3424
|
function e(_) {
|
|
3547
3425
|
var y = this;
|
|
3548
3426
|
this.next = null, this.entry = null, this.finish = function() {
|
|
3549
|
-
|
|
3427
|
+
Pe(y, _);
|
|
3550
3428
|
};
|
|
3551
3429
|
}
|
|
3552
3430
|
var t;
|
|
3553
3431
|
N.WritableState = E;
|
|
3554
3432
|
var r = {
|
|
3555
|
-
deprecate:
|
|
3556
|
-
}, a =
|
|
3433
|
+
deprecate: Aa
|
|
3434
|
+
}, a = Kn, o = lt.Buffer, s = (typeof Ke < "u" ? Ke : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
3557
3435
|
};
|
|
3558
3436
|
function c(_) {
|
|
3559
3437
|
return o.from(_);
|
|
@@ -3561,12 +3439,12 @@ function zn() {
|
|
|
3561
3439
|
function u(_) {
|
|
3562
3440
|
return o.isBuffer(_) || _ instanceof s;
|
|
3563
3441
|
}
|
|
3564
|
-
var p =
|
|
3442
|
+
var p = Gn, g = Jn, v = g.getHighWaterMark, m = Ze.codes, T = m.ERR_INVALID_ARG_TYPE, k = m.ERR_METHOD_NOT_IMPLEMENTED, B = m.ERR_MULTIPLE_CALLBACK, C = m.ERR_STREAM_CANNOT_PIPE, A = m.ERR_STREAM_DESTROYED, I = m.ERR_STREAM_NULL_VALUES, O = m.ERR_STREAM_WRITE_AFTER_END, P = m.ERR_UNKNOWN_ENCODING, L = p.errorOrDestroy;
|
|
3565
3443
|
be(N, a);
|
|
3566
|
-
function
|
|
3444
|
+
function F() {
|
|
3567
3445
|
}
|
|
3568
3446
|
function E(_, y, S) {
|
|
3569
|
-
t = t ||
|
|
3447
|
+
t = t || ht(), _ = _ || {}, typeof S != "boolean" && (S = y instanceof t), this.objectMode = !!_.objectMode, S && (this.objectMode = this.objectMode || !!_.writableObjectMode), this.highWaterMark = v(this, _, "writableHighWaterMark", S), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
3570
3448
|
var D = _.decodeStrings === !1;
|
|
3571
3449
|
this.decodeStrings = !D, this.defaultEncoding = _.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(W) {
|
|
3572
3450
|
Ve(y, W);
|
|
@@ -3595,7 +3473,7 @@ function zn() {
|
|
|
3595
3473
|
return y instanceof this;
|
|
3596
3474
|
};
|
|
3597
3475
|
function N(_) {
|
|
3598
|
-
t = t ||
|
|
3476
|
+
t = t || ht();
|
|
3599
3477
|
var y = this instanceof t;
|
|
3600
3478
|
if (!y && !j.call(N, this)) return new N(_);
|
|
3601
3479
|
this._writableState = new E(_, this, y), this.writable = !0, _ && (typeof _.write == "function" && (this._write = _.write), typeof _.writev == "function" && (this._writev = _.writev), typeof _.destroy == "function" && (this._destroy = _.destroy), typeof _.final == "function" && (this._final = _.final)), a.call(this);
|
|
@@ -3612,15 +3490,15 @@ function zn() {
|
|
|
3612
3490
|
return S === null ? W = new I() : typeof S != "string" && !y.objectMode && (W = new T("chunk", ["string", "Buffer"], S)), W ? (L(_, W), process.nextTick(D, W), !1) : !0;
|
|
3613
3491
|
}
|
|
3614
3492
|
N.prototype.write = function(_, y, S) {
|
|
3615
|
-
var D = this._writableState, W = !1,
|
|
3616
|
-
return
|
|
3493
|
+
var D = this._writableState, W = !1, l = !D.objectMode && u(_);
|
|
3494
|
+
return l && !o.isBuffer(_) && (_ = c(_)), typeof y == "function" && (S = y, y = null), l ? y = "buffer" : y || (y = D.defaultEncoding), typeof S != "function" && (S = F), D.ending ? U(this, S) : (l || re(this, D, _, S)) && (D.pendingcb++, W = Ue(this, D, l, _, y, S)), W;
|
|
3617
3495
|
}, N.prototype.cork = function() {
|
|
3618
3496
|
this._writableState.corked++;
|
|
3619
3497
|
}, N.prototype.uncork = function() {
|
|
3620
3498
|
var _ = this._writableState;
|
|
3621
3499
|
_.corked && (_.corked--, !_.writing && !_.corked && !_.bufferProcessing && _.bufferedRequest && Ie(this, _));
|
|
3622
3500
|
}, N.prototype.setDefaultEncoding = function(y) {
|
|
3623
|
-
if (typeof y == "string" && (y = y.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((y + "").toLowerCase()) > -1)) throw new
|
|
3501
|
+
if (typeof y == "string" && (y = y.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((y + "").toLowerCase()) > -1)) throw new P(y);
|
|
3624
3502
|
return this._writableState.defaultEncoding = y, this;
|
|
3625
3503
|
}, Object.defineProperty(N.prototype, "writableBuffer", {
|
|
3626
3504
|
// making it explicit this property is not enumerable
|
|
@@ -3643,43 +3521,43 @@ function zn() {
|
|
|
3643
3521
|
return this._writableState.highWaterMark;
|
|
3644
3522
|
}
|
|
3645
3523
|
});
|
|
3646
|
-
function Ue(_, y, S, D, W,
|
|
3524
|
+
function Ue(_, y, S, D, W, l) {
|
|
3647
3525
|
if (!S) {
|
|
3648
3526
|
var d = Ae(y, D, W);
|
|
3649
3527
|
D !== d && (S = !0, W = "buffer", D = d);
|
|
3650
3528
|
}
|
|
3651
3529
|
var R = y.objectMode ? 1 : D.length;
|
|
3652
3530
|
y.length += R;
|
|
3653
|
-
var
|
|
3654
|
-
if (
|
|
3531
|
+
var M = y.length < y.highWaterMark;
|
|
3532
|
+
if (M || (y.needDrain = !0), y.writing || y.corked) {
|
|
3655
3533
|
var X = y.lastBufferedRequest;
|
|
3656
3534
|
y.lastBufferedRequest = {
|
|
3657
3535
|
chunk: D,
|
|
3658
3536
|
encoding: W,
|
|
3659
3537
|
isBuf: S,
|
|
3660
|
-
callback:
|
|
3538
|
+
callback: l,
|
|
3661
3539
|
next: null
|
|
3662
3540
|
}, X ? X.next = y.lastBufferedRequest : y.bufferedRequest = y.lastBufferedRequest, y.bufferedRequestCount += 1;
|
|
3663
3541
|
} else
|
|
3664
|
-
ae(_, y, !1, R, D, W,
|
|
3665
|
-
return
|
|
3542
|
+
ae(_, y, !1, R, D, W, l);
|
|
3543
|
+
return M;
|
|
3666
3544
|
}
|
|
3667
|
-
function ae(_, y, S, D, W,
|
|
3668
|
-
y.writelen = D, y.writecb = d, y.writing = !0, y.sync = !0, y.destroyed ? y.onwrite(new A("write")) : S ? _._writev(W, y.onwrite) : _._write(W,
|
|
3545
|
+
function ae(_, y, S, D, W, l, d) {
|
|
3546
|
+
y.writelen = D, y.writecb = d, y.writing = !0, y.sync = !0, y.destroyed ? y.onwrite(new A("write")) : S ? _._writev(W, y.onwrite) : _._write(W, l, y.onwrite), y.sync = !1;
|
|
3669
3547
|
}
|
|
3670
3548
|
function ge(_, y, S, D, W) {
|
|
3671
3549
|
--y.pendingcb, S ? (process.nextTick(W, D), process.nextTick(xe, _, y), _._writableState.errorEmitted = !0, L(_, D)) : (W(D), _._writableState.errorEmitted = !0, L(_, D), xe(_, y));
|
|
3672
3550
|
}
|
|
3673
|
-
function
|
|
3551
|
+
function ve(_) {
|
|
3674
3552
|
_.writing = !1, _.writecb = null, _.length -= _.writelen, _.writelen = 0;
|
|
3675
3553
|
}
|
|
3676
3554
|
function Ve(_, y) {
|
|
3677
3555
|
var S = _._writableState, D = S.sync, W = S.writecb;
|
|
3678
3556
|
if (typeof W != "function") throw new B();
|
|
3679
|
-
if (
|
|
3557
|
+
if (ve(S), y) ge(_, S, D, y, W);
|
|
3680
3558
|
else {
|
|
3681
|
-
var
|
|
3682
|
-
!
|
|
3559
|
+
var l = He(S) || _.destroyed;
|
|
3560
|
+
!l && !S.corked && !S.bufferProcessing && S.bufferedRequest && Ie(_, S), D ? process.nextTick(Te, _, S, l, W) : Te(_, S, l, W);
|
|
3683
3561
|
}
|
|
3684
3562
|
}
|
|
3685
3563
|
function Te(_, y, S, D) {
|
|
@@ -3692,15 +3570,15 @@ function zn() {
|
|
|
3692
3570
|
y.bufferProcessing = !0;
|
|
3693
3571
|
var S = y.bufferedRequest;
|
|
3694
3572
|
if (_._writev && S && S.next) {
|
|
3695
|
-
var D = y.bufferedRequestCount, W = new Array(D),
|
|
3696
|
-
|
|
3573
|
+
var D = y.bufferedRequestCount, W = new Array(D), l = y.corkedRequestsFree;
|
|
3574
|
+
l.entry = S;
|
|
3697
3575
|
for (var d = 0, R = !0; S; )
|
|
3698
3576
|
W[d] = S, S.isBuf || (R = !1), S = S.next, d += 1;
|
|
3699
|
-
W.allBuffers = R, ae(_, y, !0, y.length, W, "",
|
|
3577
|
+
W.allBuffers = R, ae(_, y, !0, y.length, W, "", l.finish), y.pendingcb++, y.lastBufferedRequest = null, l.next ? (y.corkedRequestsFree = l.next, l.next = null) : y.corkedRequestsFree = new e(y), y.bufferedRequestCount = 0;
|
|
3700
3578
|
} else {
|
|
3701
3579
|
for (; S; ) {
|
|
3702
|
-
var
|
|
3703
|
-
if (ae(_, y, !1, G,
|
|
3580
|
+
var M = S.chunk, X = S.encoding, q = S.callback, G = y.objectMode ? 1 : M.length;
|
|
3581
|
+
if (ae(_, y, !1, G, M, X, q), S = S.next, y.bufferedRequestCount--, y.writing)
|
|
3704
3582
|
break;
|
|
3705
3583
|
}
|
|
3706
3584
|
S === null && (y.lastBufferedRequest = null);
|
|
@@ -3743,7 +3621,7 @@ function zn() {
|
|
|
3743
3621
|
function je(_, y, S) {
|
|
3744
3622
|
y.ending = !0, xe(_, y), S && (y.finished ? process.nextTick(S) : _.once("finish", S)), y.ended = !0, _.writable = !1;
|
|
3745
3623
|
}
|
|
3746
|
-
function
|
|
3624
|
+
function Pe(_, y, S) {
|
|
3747
3625
|
var D = _.entry;
|
|
3748
3626
|
for (_.entry = null; D; ) {
|
|
3749
3627
|
var W = D.callback;
|
|
@@ -3766,17 +3644,17 @@ function zn() {
|
|
|
3766
3644
|
y(_);
|
|
3767
3645
|
}, hr;
|
|
3768
3646
|
}
|
|
3769
|
-
var
|
|
3770
|
-
function
|
|
3771
|
-
if (
|
|
3772
|
-
|
|
3647
|
+
var lr, on;
|
|
3648
|
+
function ht() {
|
|
3649
|
+
if (on) return lr;
|
|
3650
|
+
on = 1;
|
|
3773
3651
|
var e = Object.keys || function(g) {
|
|
3774
|
-
var
|
|
3775
|
-
for (var
|
|
3776
|
-
return
|
|
3652
|
+
var v = [];
|
|
3653
|
+
for (var m in g) v.push(m);
|
|
3654
|
+
return v;
|
|
3777
3655
|
};
|
|
3778
|
-
|
|
3779
|
-
var t =
|
|
3656
|
+
lr = c;
|
|
3657
|
+
var t = Xn(), r = Yn();
|
|
3780
3658
|
be(c, t);
|
|
3781
3659
|
for (var a = e(r.prototype), o = 0; o < a.length; o++) {
|
|
3782
3660
|
var s = a[o];
|
|
@@ -3825,12 +3703,12 @@ function lt() {
|
|
|
3825
3703
|
get: function() {
|
|
3826
3704
|
return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
|
|
3827
3705
|
},
|
|
3828
|
-
set: function(
|
|
3829
|
-
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed =
|
|
3706
|
+
set: function(v) {
|
|
3707
|
+
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = v, this._writableState.destroyed = v);
|
|
3830
3708
|
}
|
|
3831
|
-
}),
|
|
3709
|
+
}), lr;
|
|
3832
3710
|
}
|
|
3833
|
-
var Kt = {},
|
|
3711
|
+
var Kt = {}, $r = me.Buffer, sn = $r.isEncoding || function(e) {
|
|
3834
3712
|
switch (e = "" + e, e && e.toLowerCase()) {
|
|
3835
3713
|
case "hex":
|
|
3836
3714
|
case "utf8":
|
|
@@ -3848,7 +3726,7 @@ var Kt = {}, Hr = ve.Buffer, fn = Hr.isEncoding || function(e) {
|
|
|
3848
3726
|
return !1;
|
|
3849
3727
|
}
|
|
3850
3728
|
};
|
|
3851
|
-
function
|
|
3729
|
+
function Ia(e) {
|
|
3852
3730
|
if (!e) return "utf8";
|
|
3853
3731
|
for (var t; ; )
|
|
3854
3732
|
switch (e) {
|
|
@@ -3872,30 +3750,30 @@ function Ma(e) {
|
|
|
3872
3750
|
e = ("" + e).toLowerCase(), t = !0;
|
|
3873
3751
|
}
|
|
3874
3752
|
}
|
|
3875
|
-
function
|
|
3876
|
-
var t =
|
|
3877
|
-
if (typeof t != "string" && (
|
|
3753
|
+
function Ca(e) {
|
|
3754
|
+
var t = Ia(e);
|
|
3755
|
+
if (typeof t != "string" && ($r.isEncoding === sn || !sn(e))) throw new Error("Unknown encoding: " + e);
|
|
3878
3756
|
return t || e;
|
|
3879
3757
|
}
|
|
3880
3758
|
Kt.StringDecoder = Tt;
|
|
3881
3759
|
function Tt(e) {
|
|
3882
|
-
this.encoding =
|
|
3760
|
+
this.encoding = Ca(e);
|
|
3883
3761
|
var t;
|
|
3884
3762
|
switch (this.encoding) {
|
|
3885
3763
|
case "utf16le":
|
|
3886
|
-
this.text =
|
|
3764
|
+
this.text = Fa, this.end = Na, t = 4;
|
|
3887
3765
|
break;
|
|
3888
3766
|
case "utf8":
|
|
3889
|
-
this.fillLast =
|
|
3767
|
+
this.fillLast = Oa, t = 4;
|
|
3890
3768
|
break;
|
|
3891
3769
|
case "base64":
|
|
3892
|
-
this.text =
|
|
3770
|
+
this.text = Da, this.end = Ua, t = 3;
|
|
3893
3771
|
break;
|
|
3894
3772
|
default:
|
|
3895
|
-
this.write =
|
|
3773
|
+
this.write = $a, this.end = Ha;
|
|
3896
3774
|
return;
|
|
3897
3775
|
}
|
|
3898
|
-
this.lastNeed = 0, this.lastTotal = 0, this.lastChar =
|
|
3776
|
+
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = $r.allocUnsafe(t);
|
|
3899
3777
|
}
|
|
3900
3778
|
Tt.prototype.write = function(e) {
|
|
3901
3779
|
if (e.length === 0) return "";
|
|
@@ -3907,23 +3785,23 @@ Tt.prototype.write = function(e) {
|
|
|
3907
3785
|
r = 0;
|
|
3908
3786
|
return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || "";
|
|
3909
3787
|
};
|
|
3910
|
-
Tt.prototype.end =
|
|
3911
|
-
Tt.prototype.text =
|
|
3788
|
+
Tt.prototype.end = Ma;
|
|
3789
|
+
Tt.prototype.text = Pa;
|
|
3912
3790
|
Tt.prototype.fillLast = function(e) {
|
|
3913
3791
|
if (this.lastNeed <= e.length)
|
|
3914
3792
|
return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
3915
3793
|
e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length), this.lastNeed -= e.length;
|
|
3916
3794
|
};
|
|
3917
|
-
function
|
|
3795
|
+
function dr(e) {
|
|
3918
3796
|
return e <= 127 ? 0 : e >> 5 === 6 ? 2 : e >> 4 === 14 ? 3 : e >> 3 === 30 ? 4 : e >> 6 === 2 ? -1 : -2;
|
|
3919
3797
|
}
|
|
3920
|
-
function
|
|
3798
|
+
function ka(e, t, r) {
|
|
3921
3799
|
var a = t.length - 1;
|
|
3922
3800
|
if (a < r) return 0;
|
|
3923
|
-
var o =
|
|
3924
|
-
return o >= 0 ? (o > 0 && (e.lastNeed = o - 1), o) : --a < r || o === -2 ? 0 : (o =
|
|
3801
|
+
var o = dr(t[a]);
|
|
3802
|
+
return o >= 0 ? (o > 0 && (e.lastNeed = o - 1), o) : --a < r || o === -2 ? 0 : (o = dr(t[a]), o >= 0 ? (o > 0 && (e.lastNeed = o - 2), o) : --a < r || o === -2 ? 0 : (o = dr(t[a]), o >= 0 ? (o > 0 && (o === 2 ? o = 0 : e.lastNeed = o - 3), o) : 0));
|
|
3925
3803
|
}
|
|
3926
|
-
function
|
|
3804
|
+
function La(e, t, r) {
|
|
3927
3805
|
if ((t[0] & 192) !== 128)
|
|
3928
3806
|
return e.lastNeed = 0, "�";
|
|
3929
3807
|
if (e.lastNeed > 1 && t.length > 1) {
|
|
@@ -3933,25 +3811,25 @@ function Ua(e, t, r) {
|
|
|
3933
3811
|
return e.lastNeed = 2, "�";
|
|
3934
3812
|
}
|
|
3935
3813
|
}
|
|
3936
|
-
function
|
|
3937
|
-
var t = this.lastTotal - this.lastNeed, r =
|
|
3814
|
+
function Oa(e) {
|
|
3815
|
+
var t = this.lastTotal - this.lastNeed, r = La(this, e);
|
|
3938
3816
|
if (r !== void 0) return r;
|
|
3939
3817
|
if (this.lastNeed <= e.length)
|
|
3940
3818
|
return e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
3941
3819
|
e.copy(this.lastChar, t, 0, e.length), this.lastNeed -= e.length;
|
|
3942
3820
|
}
|
|
3943
|
-
function
|
|
3944
|
-
var r =
|
|
3821
|
+
function Pa(e, t) {
|
|
3822
|
+
var r = ka(this, e, t);
|
|
3945
3823
|
if (!this.lastNeed) return e.toString("utf8", t);
|
|
3946
3824
|
this.lastTotal = r;
|
|
3947
3825
|
var a = e.length - (r - this.lastNeed);
|
|
3948
3826
|
return e.copy(this.lastChar, 0, a), e.toString("utf8", t, a);
|
|
3949
3827
|
}
|
|
3950
|
-
function
|
|
3828
|
+
function Ma(e) {
|
|
3951
3829
|
var t = e && e.length ? this.write(e) : "";
|
|
3952
3830
|
return this.lastNeed ? t + "�" : t;
|
|
3953
3831
|
}
|
|
3954
|
-
function
|
|
3832
|
+
function Fa(e, t) {
|
|
3955
3833
|
if ((e.length - t) % 2 === 0) {
|
|
3956
3834
|
var r = e.toString("utf16le", t);
|
|
3957
3835
|
if (r) {
|
|
@@ -3963,7 +3841,7 @@ function Wa(e, t) {
|
|
|
3963
3841
|
}
|
|
3964
3842
|
return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1);
|
|
3965
3843
|
}
|
|
3966
|
-
function
|
|
3844
|
+
function Na(e) {
|
|
3967
3845
|
var t = e && e.length ? this.write(e) : "";
|
|
3968
3846
|
if (this.lastNeed) {
|
|
3969
3847
|
var r = this.lastTotal - this.lastNeed;
|
|
@@ -3971,22 +3849,22 @@ function qa(e) {
|
|
|
3971
3849
|
}
|
|
3972
3850
|
return t;
|
|
3973
3851
|
}
|
|
3974
|
-
function
|
|
3852
|
+
function Da(e, t) {
|
|
3975
3853
|
var r = (e.length - t) % 3;
|
|
3976
3854
|
return r === 0 ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, r === 1 ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r));
|
|
3977
3855
|
}
|
|
3978
|
-
function
|
|
3856
|
+
function Ua(e) {
|
|
3979
3857
|
var t = e && e.length ? this.write(e) : "";
|
|
3980
3858
|
return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t;
|
|
3981
3859
|
}
|
|
3982
|
-
function
|
|
3860
|
+
function $a(e) {
|
|
3983
3861
|
return e.toString(this.encoding);
|
|
3984
3862
|
}
|
|
3985
|
-
function
|
|
3863
|
+
function Ha(e) {
|
|
3986
3864
|
return e && e.length ? this.write(e) : "";
|
|
3987
3865
|
}
|
|
3988
|
-
var
|
|
3989
|
-
function
|
|
3866
|
+
var fn = Ze.codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
3867
|
+
function ja(e) {
|
|
3990
3868
|
var t = !1;
|
|
3991
3869
|
return function() {
|
|
3992
3870
|
if (!t) {
|
|
@@ -3997,97 +3875,97 @@ function Ya(e) {
|
|
|
3997
3875
|
}
|
|
3998
3876
|
};
|
|
3999
3877
|
}
|
|
4000
|
-
function
|
|
3878
|
+
function Wa() {
|
|
4001
3879
|
}
|
|
4002
|
-
function
|
|
3880
|
+
function qa(e) {
|
|
4003
3881
|
return e.setHeader && typeof e.abort == "function";
|
|
4004
3882
|
}
|
|
4005
|
-
function
|
|
4006
|
-
if (typeof t == "function") return
|
|
4007
|
-
t || (t = {}), r =
|
|
3883
|
+
function zn(e, t, r) {
|
|
3884
|
+
if (typeof t == "function") return zn(e, null, t);
|
|
3885
|
+
t || (t = {}), r = ja(r || Wa);
|
|
4008
3886
|
var a = t.readable || t.readable !== !1 && e.readable, o = t.writable || t.writable !== !1 && e.writable, s = function() {
|
|
4009
3887
|
e.writable || u();
|
|
4010
3888
|
}, c = e._writableState && e._writableState.finished, u = function() {
|
|
4011
3889
|
o = !1, c = !0, a || r.call(e);
|
|
4012
3890
|
}, p = e._readableState && e._readableState.endEmitted, g = function() {
|
|
4013
3891
|
a = !1, p = !0, o || r.call(e);
|
|
4014
|
-
},
|
|
3892
|
+
}, v = function(B) {
|
|
4015
3893
|
r.call(e, B);
|
|
4016
|
-
},
|
|
3894
|
+
}, m = function() {
|
|
4017
3895
|
var B;
|
|
4018
3896
|
if (a && !p)
|
|
4019
|
-
return (!e._readableState || !e._readableState.ended) && (B = new
|
|
3897
|
+
return (!e._readableState || !e._readableState.ended) && (B = new fn()), r.call(e, B);
|
|
4020
3898
|
if (o && !c)
|
|
4021
|
-
return (!e._writableState || !e._writableState.ended) && (B = new
|
|
3899
|
+
return (!e._writableState || !e._writableState.ended) && (B = new fn()), r.call(e, B);
|
|
4022
3900
|
}, T = function() {
|
|
4023
3901
|
e.req.on("finish", u);
|
|
4024
3902
|
};
|
|
4025
|
-
return
|
|
4026
|
-
e.removeListener("complete", u), e.removeListener("abort",
|
|
3903
|
+
return qa(e) ? (e.on("complete", u), e.on("abort", m), e.req ? T() : e.on("request", T)) : o && !e._writableState && (e.on("end", s), e.on("close", s)), e.on("end", g), e.on("finish", u), t.error !== !1 && e.on("error", v), e.on("close", m), function() {
|
|
3904
|
+
e.removeListener("complete", u), e.removeListener("abort", m), e.removeListener("request", T), e.req && e.req.removeListener("finish", u), e.removeListener("end", s), e.removeListener("close", s), e.removeListener("finish", u), e.removeListener("end", g), e.removeListener("error", v), e.removeListener("close", m);
|
|
4027
3905
|
};
|
|
4028
3906
|
}
|
|
4029
|
-
var
|
|
4030
|
-
function
|
|
4031
|
-
if (
|
|
4032
|
-
|
|
3907
|
+
var Hr = zn, pr, un;
|
|
3908
|
+
function Ka() {
|
|
3909
|
+
if (un) return pr;
|
|
3910
|
+
un = 1;
|
|
4033
3911
|
var e;
|
|
4034
|
-
function t(
|
|
4035
|
-
return L = r(L), L in
|
|
3912
|
+
function t(P, L, F) {
|
|
3913
|
+
return L = r(L), L in P ? Object.defineProperty(P, L, { value: F, enumerable: !0, configurable: !0, writable: !0 }) : P[L] = F, P;
|
|
4036
3914
|
}
|
|
4037
|
-
function r(
|
|
4038
|
-
var L = a(
|
|
3915
|
+
function r(P) {
|
|
3916
|
+
var L = a(P, "string");
|
|
4039
3917
|
return typeof L == "symbol" ? L : String(L);
|
|
4040
3918
|
}
|
|
4041
|
-
function a(
|
|
4042
|
-
if (typeof
|
|
4043
|
-
var
|
|
4044
|
-
if (
|
|
4045
|
-
var E =
|
|
3919
|
+
function a(P, L) {
|
|
3920
|
+
if (typeof P != "object" || P === null) return P;
|
|
3921
|
+
var F = P[Symbol.toPrimitive];
|
|
3922
|
+
if (F !== void 0) {
|
|
3923
|
+
var E = F.call(P, L || "default");
|
|
4046
3924
|
if (typeof E != "object") return E;
|
|
4047
3925
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4048
3926
|
}
|
|
4049
|
-
return (L === "string" ? String : Number)(
|
|
3927
|
+
return (L === "string" ? String : Number)(P);
|
|
4050
3928
|
}
|
|
4051
|
-
var o =
|
|
4052
|
-
function T(
|
|
3929
|
+
var o = Hr, s = Symbol("lastResolve"), c = Symbol("lastReject"), u = Symbol("error"), p = Symbol("ended"), g = Symbol("lastPromise"), v = Symbol("handlePromise"), m = Symbol("stream");
|
|
3930
|
+
function T(P, L) {
|
|
4053
3931
|
return {
|
|
4054
|
-
value:
|
|
3932
|
+
value: P,
|
|
4055
3933
|
done: L
|
|
4056
3934
|
};
|
|
4057
3935
|
}
|
|
4058
|
-
function k(
|
|
4059
|
-
var L =
|
|
3936
|
+
function k(P) {
|
|
3937
|
+
var L = P[s];
|
|
4060
3938
|
if (L !== null) {
|
|
4061
|
-
var
|
|
4062
|
-
|
|
3939
|
+
var F = P[m].read();
|
|
3940
|
+
F !== null && (P[g] = null, P[s] = null, P[c] = null, L(T(F, !1)));
|
|
4063
3941
|
}
|
|
4064
3942
|
}
|
|
4065
|
-
function B(
|
|
4066
|
-
process.nextTick(k,
|
|
3943
|
+
function B(P) {
|
|
3944
|
+
process.nextTick(k, P);
|
|
4067
3945
|
}
|
|
4068
|
-
function C(
|
|
4069
|
-
return function(
|
|
4070
|
-
|
|
3946
|
+
function C(P, L) {
|
|
3947
|
+
return function(F, E) {
|
|
3948
|
+
P.then(function() {
|
|
4071
3949
|
if (L[p]) {
|
|
4072
|
-
|
|
3950
|
+
F(T(void 0, !0));
|
|
4073
3951
|
return;
|
|
4074
3952
|
}
|
|
4075
|
-
L[
|
|
3953
|
+
L[v](F, E);
|
|
4076
3954
|
}, E);
|
|
4077
3955
|
};
|
|
4078
3956
|
}
|
|
4079
3957
|
var A = Object.getPrototypeOf(function() {
|
|
4080
3958
|
}), I = Object.setPrototypeOf((e = {
|
|
4081
3959
|
get stream() {
|
|
4082
|
-
return this[
|
|
3960
|
+
return this[m];
|
|
4083
3961
|
},
|
|
4084
3962
|
next: function() {
|
|
4085
|
-
var L = this,
|
|
4086
|
-
if (
|
|
4087
|
-
return Promise.reject(
|
|
3963
|
+
var L = this, F = this[u];
|
|
3964
|
+
if (F !== null)
|
|
3965
|
+
return Promise.reject(F);
|
|
4088
3966
|
if (this[p])
|
|
4089
3967
|
return Promise.resolve(T(void 0, !0));
|
|
4090
|
-
if (this[
|
|
3968
|
+
if (this[m].destroyed)
|
|
4091
3969
|
return new Promise(function(U, re) {
|
|
4092
3970
|
process.nextTick(function() {
|
|
4093
3971
|
L[u] ? re(L[u]) : U(T(void 0, !0));
|
|
@@ -4097,10 +3975,10 @@ function Qa() {
|
|
|
4097
3975
|
if (E)
|
|
4098
3976
|
j = new Promise(C(E, this));
|
|
4099
3977
|
else {
|
|
4100
|
-
var N = this[
|
|
3978
|
+
var N = this[m].read();
|
|
4101
3979
|
if (N !== null)
|
|
4102
3980
|
return Promise.resolve(T(N, !1));
|
|
4103
|
-
j = new Promise(this[
|
|
3981
|
+
j = new Promise(this[v]);
|
|
4104
3982
|
}
|
|
4105
3983
|
return this[g] = j, j;
|
|
4106
3984
|
}
|
|
@@ -4108,38 +3986,38 @@ function Qa() {
|
|
|
4108
3986
|
return this;
|
|
4109
3987
|
}), t(e, "return", function() {
|
|
4110
3988
|
var L = this;
|
|
4111
|
-
return new Promise(function(
|
|
4112
|
-
L[
|
|
3989
|
+
return new Promise(function(F, E) {
|
|
3990
|
+
L[m].destroy(null, function(j) {
|
|
4113
3991
|
if (j) {
|
|
4114
3992
|
E(j);
|
|
4115
3993
|
return;
|
|
4116
3994
|
}
|
|
4117
|
-
|
|
3995
|
+
F(T(void 0, !0));
|
|
4118
3996
|
});
|
|
4119
3997
|
});
|
|
4120
3998
|
}), e), A), O = function(L) {
|
|
4121
|
-
var
|
|
3999
|
+
var F, E = Object.create(I, (F = {}, t(F, m, {
|
|
4122
4000
|
value: L,
|
|
4123
4001
|
writable: !0
|
|
4124
|
-
}), t(
|
|
4002
|
+
}), t(F, s, {
|
|
4125
4003
|
value: null,
|
|
4126
4004
|
writable: !0
|
|
4127
|
-
}), t(
|
|
4005
|
+
}), t(F, c, {
|
|
4128
4006
|
value: null,
|
|
4129
4007
|
writable: !0
|
|
4130
|
-
}), t(
|
|
4008
|
+
}), t(F, u, {
|
|
4131
4009
|
value: null,
|
|
4132
4010
|
writable: !0
|
|
4133
|
-
}), t(
|
|
4011
|
+
}), t(F, p, {
|
|
4134
4012
|
value: L._readableState.endEmitted,
|
|
4135
4013
|
writable: !0
|
|
4136
|
-
}), t(
|
|
4014
|
+
}), t(F, v, {
|
|
4137
4015
|
value: function(N, U) {
|
|
4138
|
-
var re = E[
|
|
4016
|
+
var re = E[m].read();
|
|
4139
4017
|
re ? (E[g] = null, E[s] = null, E[c] = null, N(T(re, !1))) : (E[s] = N, E[c] = U);
|
|
4140
4018
|
},
|
|
4141
4019
|
writable: !0
|
|
4142
|
-
}),
|
|
4020
|
+
}), F));
|
|
4143
4021
|
return E[g] = null, o(L, function(j) {
|
|
4144
4022
|
if (j && j.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
4145
4023
|
var N = E[c];
|
|
@@ -4150,47 +4028,47 @@ function Qa() {
|
|
|
4150
4028
|
U !== null && (E[g] = null, E[s] = null, E[c] = null, U(T(void 0, !0))), E[p] = !0;
|
|
4151
4029
|
}), L.on("readable", B.bind(null, E)), E;
|
|
4152
4030
|
};
|
|
4153
|
-
return
|
|
4031
|
+
return pr = O, pr;
|
|
4154
4032
|
}
|
|
4155
|
-
var
|
|
4156
|
-
function
|
|
4157
|
-
return
|
|
4033
|
+
var br, cn;
|
|
4034
|
+
function Ga() {
|
|
4035
|
+
return cn || (cn = 1, br = function() {
|
|
4158
4036
|
throw new Error("Readable.from is not available in the browser");
|
|
4159
|
-
}),
|
|
4037
|
+
}), br;
|
|
4160
4038
|
}
|
|
4161
|
-
var
|
|
4162
|
-
function
|
|
4163
|
-
if (hn) return
|
|
4164
|
-
hn = 1,
|
|
4039
|
+
var yr, hn;
|
|
4040
|
+
function Xn() {
|
|
4041
|
+
if (hn) return yr;
|
|
4042
|
+
hn = 1, yr = U;
|
|
4165
4043
|
var e;
|
|
4166
|
-
U.ReadableState = N,
|
|
4044
|
+
U.ReadableState = N, qn.EventEmitter;
|
|
4167
4045
|
var t = function(d, R) {
|
|
4168
4046
|
return d.listeners(R).length;
|
|
4169
|
-
}, r =
|
|
4047
|
+
}, r = Kn, a = lt.Buffer, o = (typeof Ke < "u" ? Ke : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
4170
4048
|
};
|
|
4171
|
-
function s(
|
|
4172
|
-
return a.from(
|
|
4049
|
+
function s(l) {
|
|
4050
|
+
return a.from(l);
|
|
4173
4051
|
}
|
|
4174
|
-
function c(
|
|
4175
|
-
return a.isBuffer(
|
|
4052
|
+
function c(l) {
|
|
4053
|
+
return a.isBuffer(l) || l instanceof o;
|
|
4176
4054
|
}
|
|
4177
|
-
var u =
|
|
4055
|
+
var u = Ur, p;
|
|
4178
4056
|
u && u.debuglog ? p = u.debuglog("stream") : p = function() {
|
|
4179
4057
|
};
|
|
4180
|
-
var g =
|
|
4058
|
+
var g = ya(), v = Gn, m = Jn, T = m.getHighWaterMark, k = Ze.codes, B = k.ERR_INVALID_ARG_TYPE, C = k.ERR_STREAM_PUSH_AFTER_EOF, A = k.ERR_METHOD_NOT_IMPLEMENTED, I = k.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, O, P, L;
|
|
4181
4059
|
be(U, r);
|
|
4182
|
-
var
|
|
4183
|
-
function j(
|
|
4184
|
-
if (typeof
|
|
4185
|
-
!
|
|
4060
|
+
var F = v.errorOrDestroy, E = ["error", "close", "destroy", "pause", "resume"];
|
|
4061
|
+
function j(l, d, R) {
|
|
4062
|
+
if (typeof l.prependListener == "function") return l.prependListener(d, R);
|
|
4063
|
+
!l._events || !l._events[d] ? l.on(d, R) : Array.isArray(l._events[d]) ? l._events[d].unshift(R) : l._events[d] = [R, l._events[d]];
|
|
4186
4064
|
}
|
|
4187
|
-
function N(
|
|
4188
|
-
e = e ||
|
|
4065
|
+
function N(l, d, R) {
|
|
4066
|
+
e = e || ht(), l = l || {}, typeof R != "boolean" && (R = d instanceof e), this.objectMode = !!l.objectMode, R && (this.objectMode = this.objectMode || !!l.readableObjectMode), this.highWaterMark = T(this, l, "readableHighWaterMark", R), this.buffer = new g(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = l.emitClose !== !1, this.autoDestroy = !!l.autoDestroy, this.destroyed = !1, this.defaultEncoding = l.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, l.encoding && (O || (O = Kt.StringDecoder), this.decoder = new O(l.encoding), this.encoding = l.encoding);
|
|
4189
4067
|
}
|
|
4190
|
-
function U(
|
|
4191
|
-
if (e = e ||
|
|
4068
|
+
function U(l) {
|
|
4069
|
+
if (e = e || ht(), !(this instanceof U)) return new U(l);
|
|
4192
4070
|
var d = this instanceof e;
|
|
4193
|
-
this._readableState = new N(
|
|
4071
|
+
this._readableState = new N(l, this, d), this.readable = !0, l && (typeof l.read == "function" && (this._read = l.read), typeof l.destroy == "function" && (this._destroy = l.destroy)), r.call(this);
|
|
4194
4072
|
}
|
|
4195
4073
|
Object.defineProperty(U.prototype, "destroyed", {
|
|
4196
4074
|
// making it explicit this property is not enumerable
|
|
@@ -4203,238 +4081,238 @@ function Qn() {
|
|
|
4203
4081
|
set: function(d) {
|
|
4204
4082
|
this._readableState && (this._readableState.destroyed = d);
|
|
4205
4083
|
}
|
|
4206
|
-
}), U.prototype.destroy =
|
|
4207
|
-
d(
|
|
4208
|
-
}, U.prototype.push = function(
|
|
4209
|
-
var R = this._readableState,
|
|
4210
|
-
return R.objectMode ?
|
|
4211
|
-
}, U.prototype.unshift = function(
|
|
4212
|
-
return re(this,
|
|
4084
|
+
}), U.prototype.destroy = v.destroy, U.prototype._undestroy = v.undestroy, U.prototype._destroy = function(l, d) {
|
|
4085
|
+
d(l);
|
|
4086
|
+
}, U.prototype.push = function(l, d) {
|
|
4087
|
+
var R = this._readableState, M;
|
|
4088
|
+
return R.objectMode ? M = !0 : typeof l == "string" && (d = d || R.defaultEncoding, d !== R.encoding && (l = a.from(l, d), d = ""), M = !0), re(this, l, d, !1, M);
|
|
4089
|
+
}, U.prototype.unshift = function(l) {
|
|
4090
|
+
return re(this, l, null, !0, !1);
|
|
4213
4091
|
};
|
|
4214
|
-
function re(
|
|
4092
|
+
function re(l, d, R, M, X) {
|
|
4215
4093
|
p("readableAddChunk", d);
|
|
4216
|
-
var q =
|
|
4094
|
+
var q = l._readableState;
|
|
4217
4095
|
if (d === null)
|
|
4218
|
-
q.reading = !1, Ve(
|
|
4096
|
+
q.reading = !1, Ve(l, q);
|
|
4219
4097
|
else {
|
|
4220
4098
|
var G;
|
|
4221
4099
|
if (X || (G = Ue(q, d)), G)
|
|
4222
|
-
|
|
4100
|
+
F(l, G);
|
|
4223
4101
|
else if (q.objectMode || d && d.length > 0)
|
|
4224
|
-
if (typeof d != "string" && !q.objectMode && Object.getPrototypeOf(d) !== a.prototype && (d = s(d)),
|
|
4225
|
-
q.endEmitted ?
|
|
4102
|
+
if (typeof d != "string" && !q.objectMode && Object.getPrototypeOf(d) !== a.prototype && (d = s(d)), M)
|
|
4103
|
+
q.endEmitted ? F(l, new I()) : Ae(l, q, d, !0);
|
|
4226
4104
|
else if (q.ended)
|
|
4227
|
-
|
|
4105
|
+
F(l, new C());
|
|
4228
4106
|
else {
|
|
4229
4107
|
if (q.destroyed)
|
|
4230
4108
|
return !1;
|
|
4231
|
-
q.reading = !1, q.decoder && !R ? (d = q.decoder.write(d), q.objectMode || d.length !== 0 ? Ae(
|
|
4109
|
+
q.reading = !1, q.decoder && !R ? (d = q.decoder.write(d), q.objectMode || d.length !== 0 ? Ae(l, q, d, !1) : Ie(l, q)) : Ae(l, q, d, !1);
|
|
4232
4110
|
}
|
|
4233
|
-
else
|
|
4111
|
+
else M || (q.reading = !1, Ie(l, q));
|
|
4234
4112
|
}
|
|
4235
4113
|
return !q.ended && (q.length < q.highWaterMark || q.length === 0);
|
|
4236
4114
|
}
|
|
4237
|
-
function Ae(
|
|
4238
|
-
d.flowing && d.length === 0 && !d.sync ? (d.awaitDrain = 0,
|
|
4115
|
+
function Ae(l, d, R, M) {
|
|
4116
|
+
d.flowing && d.length === 0 && !d.sync ? (d.awaitDrain = 0, l.emit("data", R)) : (d.length += d.objectMode ? 1 : R.length, M ? d.buffer.unshift(R) : d.buffer.push(R), d.needReadable && Te(l)), Ie(l, d);
|
|
4239
4117
|
}
|
|
4240
|
-
function Ue(
|
|
4118
|
+
function Ue(l, d) {
|
|
4241
4119
|
var R;
|
|
4242
|
-
return !c(d) && typeof d != "string" && d !== void 0 && !
|
|
4120
|
+
return !c(d) && typeof d != "string" && d !== void 0 && !l.objectMode && (R = new B("chunk", ["string", "Buffer", "Uint8Array"], d)), R;
|
|
4243
4121
|
}
|
|
4244
4122
|
U.prototype.isPaused = function() {
|
|
4245
4123
|
return this._readableState.flowing === !1;
|
|
4246
|
-
}, U.prototype.setEncoding = function(
|
|
4124
|
+
}, U.prototype.setEncoding = function(l) {
|
|
4247
4125
|
O || (O = Kt.StringDecoder);
|
|
4248
|
-
var d = new O(
|
|
4126
|
+
var d = new O(l);
|
|
4249
4127
|
this._readableState.decoder = d, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
4250
|
-
for (var R = this._readableState.buffer.head,
|
|
4251
|
-
|
|
4252
|
-
return this._readableState.buffer.clear(),
|
|
4128
|
+
for (var R = this._readableState.buffer.head, M = ""; R !== null; )
|
|
4129
|
+
M += d.write(R.data), R = R.next;
|
|
4130
|
+
return this._readableState.buffer.clear(), M !== "" && this._readableState.buffer.push(M), this._readableState.length = M.length, this;
|
|
4253
4131
|
};
|
|
4254
4132
|
var ae = 1073741824;
|
|
4255
|
-
function ge(
|
|
4256
|
-
return
|
|
4133
|
+
function ge(l) {
|
|
4134
|
+
return l >= ae ? l = ae : (l--, l |= l >>> 1, l |= l >>> 2, l |= l >>> 4, l |= l >>> 8, l |= l >>> 16, l++), l;
|
|
4257
4135
|
}
|
|
4258
|
-
function
|
|
4259
|
-
return
|
|
4136
|
+
function ve(l, d) {
|
|
4137
|
+
return l <= 0 || d.length === 0 && d.ended ? 0 : d.objectMode ? 1 : l !== l ? d.flowing && d.length ? d.buffer.head.data.length : d.length : (l > d.highWaterMark && (d.highWaterMark = ge(l)), l <= d.length ? l : d.ended ? d.length : (d.needReadable = !0, 0));
|
|
4260
4138
|
}
|
|
4261
|
-
U.prototype.read = function(
|
|
4262
|
-
p("read",
|
|
4263
|
-
var d = this._readableState, R =
|
|
4264
|
-
if (
|
|
4139
|
+
U.prototype.read = function(l) {
|
|
4140
|
+
p("read", l), l = parseInt(l, 10);
|
|
4141
|
+
var d = this._readableState, R = l;
|
|
4142
|
+
if (l !== 0 && (d.emittedReadable = !1), l === 0 && d.needReadable && ((d.highWaterMark !== 0 ? d.length >= d.highWaterMark : d.length > 0) || d.ended))
|
|
4265
4143
|
return p("read: emitReadable", d.length, d.ended), d.length === 0 && d.ended ? S(this) : Te(this), null;
|
|
4266
|
-
if (
|
|
4144
|
+
if (l = ve(l, d), l === 0 && d.ended)
|
|
4267
4145
|
return d.length === 0 && S(this), null;
|
|
4268
|
-
var
|
|
4269
|
-
p("need readable",
|
|
4146
|
+
var M = d.needReadable;
|
|
4147
|
+
p("need readable", M), (d.length === 0 || d.length - l < d.highWaterMark) && (M = !0, p("length less than watermark", M)), d.ended || d.reading ? (M = !1, p("reading or ended", M)) : M && (p("do read"), d.reading = !0, d.sync = !0, d.length === 0 && (d.needReadable = !0), this._read(d.highWaterMark), d.sync = !1, d.reading || (l = ve(R, d)));
|
|
4270
4148
|
var X;
|
|
4271
|
-
return
|
|
4149
|
+
return l > 0 ? X = y(l, d) : X = null, X === null ? (d.needReadable = d.length <= d.highWaterMark, l = 0) : (d.length -= l, d.awaitDrain = 0), d.length === 0 && (d.ended || (d.needReadable = !0), R !== l && d.ended && S(this)), X !== null && this.emit("data", X), X;
|
|
4272
4150
|
};
|
|
4273
|
-
function Ve(
|
|
4151
|
+
function Ve(l, d) {
|
|
4274
4152
|
if (p("onEofChunk"), !d.ended) {
|
|
4275
4153
|
if (d.decoder) {
|
|
4276
4154
|
var R = d.decoder.end();
|
|
4277
4155
|
R && R.length && (d.buffer.push(R), d.length += d.objectMode ? 1 : R.length);
|
|
4278
4156
|
}
|
|
4279
|
-
d.ended = !0, d.sync ? Te(
|
|
4157
|
+
d.ended = !0, d.sync ? Te(l) : (d.needReadable = !1, d.emittedReadable || (d.emittedReadable = !0, $e(l)));
|
|
4280
4158
|
}
|
|
4281
4159
|
}
|
|
4282
|
-
function Te(
|
|
4283
|
-
var d =
|
|
4284
|
-
p("emitReadable", d.needReadable, d.emittedReadable), d.needReadable = !1, d.emittedReadable || (p("emitReadable", d.flowing), d.emittedReadable = !0, process.nextTick($e,
|
|
4160
|
+
function Te(l) {
|
|
4161
|
+
var d = l._readableState;
|
|
4162
|
+
p("emitReadable", d.needReadable, d.emittedReadable), d.needReadable = !1, d.emittedReadable || (p("emitReadable", d.flowing), d.emittedReadable = !0, process.nextTick($e, l));
|
|
4285
4163
|
}
|
|
4286
|
-
function $e(
|
|
4287
|
-
var d =
|
|
4288
|
-
p("emitReadable_", d.destroyed, d.length, d.ended), !d.destroyed && (d.length || d.ended) && (
|
|
4164
|
+
function $e(l) {
|
|
4165
|
+
var d = l._readableState;
|
|
4166
|
+
p("emitReadable_", d.destroyed, d.length, d.ended), !d.destroyed && (d.length || d.ended) && (l.emit("readable"), d.emittedReadable = !1), d.needReadable = !d.flowing && !d.ended && d.length <= d.highWaterMark, _(l);
|
|
4289
4167
|
}
|
|
4290
|
-
function Ie(
|
|
4291
|
-
d.readingMore || (d.readingMore = !0, process.nextTick(He,
|
|
4168
|
+
function Ie(l, d) {
|
|
4169
|
+
d.readingMore || (d.readingMore = !0, process.nextTick(He, l, d));
|
|
4292
4170
|
}
|
|
4293
|
-
function He(
|
|
4171
|
+
function He(l, d) {
|
|
4294
4172
|
for (; !d.reading && !d.ended && (d.length < d.highWaterMark || d.flowing && d.length === 0); ) {
|
|
4295
4173
|
var R = d.length;
|
|
4296
|
-
if (p("maybeReadMore read 0"),
|
|
4174
|
+
if (p("maybeReadMore read 0"), l.read(0), R === d.length)
|
|
4297
4175
|
break;
|
|
4298
4176
|
}
|
|
4299
4177
|
d.readingMore = !1;
|
|
4300
4178
|
}
|
|
4301
|
-
U.prototype._read = function(
|
|
4302
|
-
|
|
4303
|
-
}, U.prototype.pipe = function(
|
|
4304
|
-
var R = this,
|
|
4305
|
-
switch (
|
|
4179
|
+
U.prototype._read = function(l) {
|
|
4180
|
+
F(this, new A("_read()"));
|
|
4181
|
+
}, U.prototype.pipe = function(l, d) {
|
|
4182
|
+
var R = this, M = this._readableState;
|
|
4183
|
+
switch (M.pipesCount) {
|
|
4306
4184
|
case 0:
|
|
4307
|
-
|
|
4185
|
+
M.pipes = l;
|
|
4308
4186
|
break;
|
|
4309
4187
|
case 1:
|
|
4310
|
-
|
|
4188
|
+
M.pipes = [M.pipes, l];
|
|
4311
4189
|
break;
|
|
4312
4190
|
default:
|
|
4313
|
-
|
|
4191
|
+
M.pipes.push(l);
|
|
4314
4192
|
break;
|
|
4315
4193
|
}
|
|
4316
|
-
|
|
4317
|
-
var X = (!d || d.end !== !1) &&
|
|
4318
|
-
|
|
4194
|
+
M.pipesCount += 1, p("pipe count=%d opts=%j", M.pipesCount, d);
|
|
4195
|
+
var X = (!d || d.end !== !1) && l !== process.stdout && l !== process.stderr, q = X ? We : Ye;
|
|
4196
|
+
M.endEmitted ? process.nextTick(q) : R.once("end", q), l.on("unpipe", G);
|
|
4319
4197
|
function G(f, n) {
|
|
4320
4198
|
p("onunpipe"), f === R && n && n.hasUnpiped === !1 && (n.hasUnpiped = !0, rt());
|
|
4321
4199
|
}
|
|
4322
4200
|
function We() {
|
|
4323
|
-
p("onend"),
|
|
4201
|
+
p("onend"), l.end();
|
|
4324
4202
|
}
|
|
4325
4203
|
var tt = z(R);
|
|
4326
|
-
|
|
4204
|
+
l.on("drain", tt);
|
|
4327
4205
|
var pt = !1;
|
|
4328
4206
|
function rt() {
|
|
4329
|
-
p("cleanup"),
|
|
4207
|
+
p("cleanup"), l.removeListener("close", bt), l.removeListener("finish", Re), l.removeListener("drain", tt), l.removeListener("error", Je), l.removeListener("unpipe", G), R.removeListener("end", We), R.removeListener("end", Ye), R.removeListener("data", Ee), pt = !0, M.awaitDrain && (!l._writableState || l._writableState.needDrain) && tt();
|
|
4330
4208
|
}
|
|
4331
4209
|
R.on("data", Ee);
|
|
4332
4210
|
function Ee(f) {
|
|
4333
4211
|
p("ondata");
|
|
4334
|
-
var n =
|
|
4335
|
-
p("dest.write", n), n === !1 && ((
|
|
4212
|
+
var n = l.write(f);
|
|
4213
|
+
p("dest.write", n), n === !1 && ((M.pipesCount === 1 && M.pipes === l || M.pipesCount > 1 && W(M.pipes, l) !== -1) && !pt && (p("false write response, pause", M.awaitDrain), M.awaitDrain++), R.pause());
|
|
4336
4214
|
}
|
|
4337
4215
|
function Je(f) {
|
|
4338
|
-
p("onerror", f), Ye(),
|
|
4216
|
+
p("onerror", f), Ye(), l.removeListener("error", Je), t(l, "error") === 0 && F(l, f);
|
|
4339
4217
|
}
|
|
4340
|
-
j(
|
|
4218
|
+
j(l, "error", Je);
|
|
4341
4219
|
function bt() {
|
|
4342
|
-
|
|
4220
|
+
l.removeListener("finish", Re), Ye();
|
|
4343
4221
|
}
|
|
4344
|
-
|
|
4222
|
+
l.once("close", bt);
|
|
4345
4223
|
function Re() {
|
|
4346
|
-
p("onfinish"),
|
|
4224
|
+
p("onfinish"), l.removeListener("close", bt), Ye();
|
|
4347
4225
|
}
|
|
4348
|
-
|
|
4226
|
+
l.once("finish", Re);
|
|
4349
4227
|
function Ye() {
|
|
4350
|
-
p("unpipe"), R.unpipe(
|
|
4228
|
+
p("unpipe"), R.unpipe(l);
|
|
4351
4229
|
}
|
|
4352
|
-
return
|
|
4230
|
+
return l.emit("pipe", R), M.flowing || (p("pipe resume"), R.resume()), l;
|
|
4353
4231
|
};
|
|
4354
|
-
function z(
|
|
4232
|
+
function z(l) {
|
|
4355
4233
|
return function() {
|
|
4356
|
-
var R =
|
|
4357
|
-
p("pipeOnDrain", R.awaitDrain), R.awaitDrain && R.awaitDrain--, R.awaitDrain === 0 && t(
|
|
4234
|
+
var R = l._readableState;
|
|
4235
|
+
p("pipeOnDrain", R.awaitDrain), R.awaitDrain && R.awaitDrain--, R.awaitDrain === 0 && t(l, "data") && (R.flowing = !0, _(l));
|
|
4358
4236
|
};
|
|
4359
4237
|
}
|
|
4360
|
-
U.prototype.unpipe = function(
|
|
4238
|
+
U.prototype.unpipe = function(l) {
|
|
4361
4239
|
var d = this._readableState, R = {
|
|
4362
4240
|
hasUnpiped: !1
|
|
4363
4241
|
};
|
|
4364
4242
|
if (d.pipesCount === 0) return this;
|
|
4365
4243
|
if (d.pipesCount === 1)
|
|
4366
|
-
return
|
|
4367
|
-
if (!
|
|
4368
|
-
var
|
|
4244
|
+
return l && l !== d.pipes ? this : (l || (l = d.pipes), d.pipes = null, d.pipesCount = 0, d.flowing = !1, l && l.emit("unpipe", this, R), this);
|
|
4245
|
+
if (!l) {
|
|
4246
|
+
var M = d.pipes, X = d.pipesCount;
|
|
4369
4247
|
d.pipes = null, d.pipesCount = 0, d.flowing = !1;
|
|
4370
|
-
for (var q = 0; q < X; q++)
|
|
4248
|
+
for (var q = 0; q < X; q++) M[q].emit("unpipe", this, {
|
|
4371
4249
|
hasUnpiped: !1
|
|
4372
4250
|
});
|
|
4373
4251
|
return this;
|
|
4374
4252
|
}
|
|
4375
|
-
var G = W(d.pipes,
|
|
4376
|
-
return G === -1 ? this : (d.pipes.splice(G, 1), d.pipesCount -= 1, d.pipesCount === 1 && (d.pipes = d.pipes[0]),
|
|
4377
|
-
}, U.prototype.on = function(
|
|
4378
|
-
var R = r.prototype.on.call(this,
|
|
4379
|
-
return
|
|
4380
|
-
}, U.prototype.addListener = U.prototype.on, U.prototype.removeListener = function(
|
|
4381
|
-
var R = r.prototype.removeListener.call(this,
|
|
4382
|
-
return
|
|
4383
|
-
}, U.prototype.removeAllListeners = function(
|
|
4253
|
+
var G = W(d.pipes, l);
|
|
4254
|
+
return G === -1 ? this : (d.pipes.splice(G, 1), d.pipesCount -= 1, d.pipesCount === 1 && (d.pipes = d.pipes[0]), l.emit("unpipe", this, R), this);
|
|
4255
|
+
}, U.prototype.on = function(l, d) {
|
|
4256
|
+
var R = r.prototype.on.call(this, l, d), M = this._readableState;
|
|
4257
|
+
return l === "data" ? (M.readableListening = this.listenerCount("readable") > 0, M.flowing !== !1 && this.resume()) : l === "readable" && !M.endEmitted && !M.readableListening && (M.readableListening = M.needReadable = !0, M.flowing = !1, M.emittedReadable = !1, p("on readable", M.length, M.reading), M.length ? Te(this) : M.reading || process.nextTick(xe, this)), R;
|
|
4258
|
+
}, U.prototype.addListener = U.prototype.on, U.prototype.removeListener = function(l, d) {
|
|
4259
|
+
var R = r.prototype.removeListener.call(this, l, d);
|
|
4260
|
+
return l === "readable" && process.nextTick(ne, this), R;
|
|
4261
|
+
}, U.prototype.removeAllListeners = function(l) {
|
|
4384
4262
|
var d = r.prototype.removeAllListeners.apply(this, arguments);
|
|
4385
|
-
return (
|
|
4263
|
+
return (l === "readable" || l === void 0) && process.nextTick(ne, this), d;
|
|
4386
4264
|
};
|
|
4387
|
-
function ne(
|
|
4388
|
-
var d =
|
|
4389
|
-
d.readableListening =
|
|
4265
|
+
function ne(l) {
|
|
4266
|
+
var d = l._readableState;
|
|
4267
|
+
d.readableListening = l.listenerCount("readable") > 0, d.resumeScheduled && !d.paused ? d.flowing = !0 : l.listenerCount("data") > 0 && l.resume();
|
|
4390
4268
|
}
|
|
4391
|
-
function xe(
|
|
4392
|
-
p("readable nexttick read 0"),
|
|
4269
|
+
function xe(l) {
|
|
4270
|
+
p("readable nexttick read 0"), l.read(0);
|
|
4393
4271
|
}
|
|
4394
4272
|
U.prototype.resume = function() {
|
|
4395
|
-
var
|
|
4396
|
-
return
|
|
4273
|
+
var l = this._readableState;
|
|
4274
|
+
return l.flowing || (p("resume"), l.flowing = !l.readableListening, je(this, l)), l.paused = !1, this;
|
|
4397
4275
|
};
|
|
4398
|
-
function je(
|
|
4399
|
-
d.resumeScheduled || (d.resumeScheduled = !0, process.nextTick(
|
|
4276
|
+
function je(l, d) {
|
|
4277
|
+
d.resumeScheduled || (d.resumeScheduled = !0, process.nextTick(Pe, l, d));
|
|
4400
4278
|
}
|
|
4401
|
-
function
|
|
4402
|
-
p("resume", d.reading), d.reading ||
|
|
4279
|
+
function Pe(l, d) {
|
|
4280
|
+
p("resume", d.reading), d.reading || l.read(0), d.resumeScheduled = !1, l.emit("resume"), _(l), d.flowing && !d.reading && l.read(0);
|
|
4403
4281
|
}
|
|
4404
4282
|
U.prototype.pause = function() {
|
|
4405
4283
|
return p("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (p("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
|
4406
4284
|
};
|
|
4407
|
-
function _(
|
|
4408
|
-
var d =
|
|
4409
|
-
for (p("flow", d.flowing); d.flowing &&
|
|
4285
|
+
function _(l) {
|
|
4286
|
+
var d = l._readableState;
|
|
4287
|
+
for (p("flow", d.flowing); d.flowing && l.read() !== null; ) ;
|
|
4410
4288
|
}
|
|
4411
|
-
U.prototype.wrap = function(
|
|
4412
|
-
var d = this, R = this._readableState,
|
|
4413
|
-
|
|
4289
|
+
U.prototype.wrap = function(l) {
|
|
4290
|
+
var d = this, R = this._readableState, M = !1;
|
|
4291
|
+
l.on("end", function() {
|
|
4414
4292
|
if (p("wrapped end"), R.decoder && !R.ended) {
|
|
4415
4293
|
var G = R.decoder.end();
|
|
4416
4294
|
G && G.length && d.push(G);
|
|
4417
4295
|
}
|
|
4418
4296
|
d.push(null);
|
|
4419
|
-
}),
|
|
4297
|
+
}), l.on("data", function(G) {
|
|
4420
4298
|
if (p("wrapped data"), R.decoder && (G = R.decoder.write(G)), !(R.objectMode && G == null) && !(!R.objectMode && (!G || !G.length))) {
|
|
4421
4299
|
var We = d.push(G);
|
|
4422
|
-
We || (
|
|
4300
|
+
We || (M = !0, l.pause());
|
|
4423
4301
|
}
|
|
4424
4302
|
});
|
|
4425
|
-
for (var X in
|
|
4426
|
-
this[X] === void 0 && typeof
|
|
4303
|
+
for (var X in l)
|
|
4304
|
+
this[X] === void 0 && typeof l[X] == "function" && (this[X] = /* @__PURE__ */ function(We) {
|
|
4427
4305
|
return function() {
|
|
4428
|
-
return
|
|
4306
|
+
return l[We].apply(l, arguments);
|
|
4429
4307
|
};
|
|
4430
4308
|
}(X));
|
|
4431
4309
|
for (var q = 0; q < E.length; q++)
|
|
4432
|
-
|
|
4310
|
+
l.on(E[q], this.emit.bind(this, E[q]));
|
|
4433
4311
|
return this._read = function(G) {
|
|
4434
|
-
p("wrapped _read", G),
|
|
4312
|
+
p("wrapped _read", G), M && (M = !1, l.resume());
|
|
4435
4313
|
}, this;
|
|
4436
4314
|
}, typeof Symbol == "function" && (U.prototype[Symbol.asyncIterator] = function() {
|
|
4437
|
-
return
|
|
4315
|
+
return P === void 0 && (P = Ka()), P(this);
|
|
4438
4316
|
}), Object.defineProperty(U.prototype, "readableHighWaterMark", {
|
|
4439
4317
|
// making it explicit this property is not enumerable
|
|
4440
4318
|
// because otherwise some prototype manipulation in
|
|
@@ -4471,65 +4349,65 @@ function Qn() {
|
|
|
4471
4349
|
return this._readableState.length;
|
|
4472
4350
|
}
|
|
4473
4351
|
});
|
|
4474
|
-
function y(
|
|
4352
|
+
function y(l, d) {
|
|
4475
4353
|
if (d.length === 0) return null;
|
|
4476
4354
|
var R;
|
|
4477
|
-
return d.objectMode ? R = d.buffer.shift() : !
|
|
4355
|
+
return d.objectMode ? R = d.buffer.shift() : !l || l >= d.length ? (d.decoder ? R = d.buffer.join("") : d.buffer.length === 1 ? R = d.buffer.first() : R = d.buffer.concat(d.length), d.buffer.clear()) : R = d.buffer.consume(l, d.decoder), R;
|
|
4478
4356
|
}
|
|
4479
|
-
function S(
|
|
4480
|
-
var d =
|
|
4481
|
-
p("endReadable", d.endEmitted), d.endEmitted || (d.ended = !0, process.nextTick(D, d,
|
|
4357
|
+
function S(l) {
|
|
4358
|
+
var d = l._readableState;
|
|
4359
|
+
p("endReadable", d.endEmitted), d.endEmitted || (d.ended = !0, process.nextTick(D, d, l));
|
|
4482
4360
|
}
|
|
4483
|
-
function D(
|
|
4484
|
-
if (p("endReadableNT",
|
|
4361
|
+
function D(l, d) {
|
|
4362
|
+
if (p("endReadableNT", l.endEmitted, l.length), !l.endEmitted && l.length === 0 && (l.endEmitted = !0, d.readable = !1, d.emit("end"), l.autoDestroy)) {
|
|
4485
4363
|
var R = d._writableState;
|
|
4486
4364
|
(!R || R.autoDestroy && R.finished) && d.destroy();
|
|
4487
4365
|
}
|
|
4488
4366
|
}
|
|
4489
|
-
typeof Symbol == "function" && (U.from = function(
|
|
4490
|
-
return L === void 0 && (L =
|
|
4367
|
+
typeof Symbol == "function" && (U.from = function(l, d) {
|
|
4368
|
+
return L === void 0 && (L = Ga()), L(U, l, d);
|
|
4491
4369
|
});
|
|
4492
|
-
function W(
|
|
4493
|
-
for (var R = 0,
|
|
4494
|
-
if (
|
|
4370
|
+
function W(l, d) {
|
|
4371
|
+
for (var R = 0, M = l.length; R < M; R++)
|
|
4372
|
+
if (l[R] === d) return R;
|
|
4495
4373
|
return -1;
|
|
4496
4374
|
}
|
|
4497
|
-
return
|
|
4375
|
+
return yr;
|
|
4498
4376
|
}
|
|
4499
|
-
var
|
|
4500
|
-
be(De,
|
|
4501
|
-
function
|
|
4377
|
+
var Qn = De, Yt = Ze.codes, Va = Yt.ERR_METHOD_NOT_IMPLEMENTED, Ja = Yt.ERR_MULTIPLE_CALLBACK, Ya = Yt.ERR_TRANSFORM_ALREADY_TRANSFORMING, za = Yt.ERR_TRANSFORM_WITH_LENGTH_0, zt = ht();
|
|
4378
|
+
be(De, zt);
|
|
4379
|
+
function Xa(e, t) {
|
|
4502
4380
|
var r = this._transformState;
|
|
4503
4381
|
r.transforming = !1;
|
|
4504
4382
|
var a = r.writecb;
|
|
4505
4383
|
if (a === null)
|
|
4506
|
-
return this.emit("error", new
|
|
4384
|
+
return this.emit("error", new Ja());
|
|
4507
4385
|
r.writechunk = null, r.writecb = null, t != null && this.push(t), a(e);
|
|
4508
4386
|
var o = this._readableState;
|
|
4509
4387
|
o.reading = !1, (o.needReadable || o.length < o.highWaterMark) && this._read(o.highWaterMark);
|
|
4510
4388
|
}
|
|
4511
4389
|
function De(e) {
|
|
4512
4390
|
if (!(this instanceof De)) return new De(e);
|
|
4513
|
-
|
|
4514
|
-
afterTransform:
|
|
4391
|
+
zt.call(this, e), this._transformState = {
|
|
4392
|
+
afterTransform: Xa.bind(this),
|
|
4515
4393
|
needTransform: !1,
|
|
4516
4394
|
transforming: !1,
|
|
4517
4395
|
writecb: null,
|
|
4518
4396
|
writechunk: null,
|
|
4519
4397
|
writeencoding: null
|
|
4520
|
-
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish",
|
|
4398
|
+
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", Qa);
|
|
4521
4399
|
}
|
|
4522
|
-
function
|
|
4400
|
+
function Qa() {
|
|
4523
4401
|
var e = this;
|
|
4524
4402
|
typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
|
|
4525
|
-
|
|
4526
|
-
}) :
|
|
4403
|
+
ln(e, t, r);
|
|
4404
|
+
}) : ln(this, null, null);
|
|
4527
4405
|
}
|
|
4528
4406
|
De.prototype.push = function(e, t) {
|
|
4529
|
-
return this._transformState.needTransform = !1,
|
|
4407
|
+
return this._transformState.needTransform = !1, zt.prototype.push.call(this, e, t);
|
|
4530
4408
|
};
|
|
4531
4409
|
De.prototype._transform = function(e, t, r) {
|
|
4532
|
-
r(new
|
|
4410
|
+
r(new Va("_transform()"));
|
|
4533
4411
|
};
|
|
4534
4412
|
De.prototype._write = function(e, t, r) {
|
|
4535
4413
|
var a = this._transformState;
|
|
@@ -4543,45 +4421,45 @@ De.prototype._read = function(e) {
|
|
|
4543
4421
|
t.writechunk !== null && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform = !0;
|
|
4544
4422
|
};
|
|
4545
4423
|
De.prototype._destroy = function(e, t) {
|
|
4546
|
-
|
|
4424
|
+
zt.prototype._destroy.call(this, e, function(r) {
|
|
4547
4425
|
t(r);
|
|
4548
4426
|
});
|
|
4549
4427
|
};
|
|
4550
|
-
function
|
|
4428
|
+
function ln(e, t, r) {
|
|
4551
4429
|
if (t) return e.emit("error", t);
|
|
4552
|
-
if (r != null && e.push(r), e._writableState.length) throw new
|
|
4553
|
-
if (e._transformState.transforming) throw new
|
|
4430
|
+
if (r != null && e.push(r), e._writableState.length) throw new za();
|
|
4431
|
+
if (e._transformState.transforming) throw new Ya();
|
|
4554
4432
|
return e.push(null);
|
|
4555
4433
|
}
|
|
4556
|
-
var
|
|
4557
|
-
be(St,
|
|
4434
|
+
var Za = St, Zn = Qn;
|
|
4435
|
+
be(St, Zn);
|
|
4558
4436
|
function St(e) {
|
|
4559
4437
|
if (!(this instanceof St)) return new St(e);
|
|
4560
|
-
|
|
4438
|
+
Zn.call(this, e);
|
|
4561
4439
|
}
|
|
4562
4440
|
St.prototype._transform = function(e, t, r) {
|
|
4563
4441
|
r(null, e);
|
|
4564
4442
|
};
|
|
4565
|
-
var
|
|
4566
|
-
function
|
|
4443
|
+
var _r;
|
|
4444
|
+
function eo(e) {
|
|
4567
4445
|
var t = !1;
|
|
4568
4446
|
return function() {
|
|
4569
4447
|
t || (t = !0, e.apply(void 0, arguments));
|
|
4570
4448
|
};
|
|
4571
4449
|
}
|
|
4572
|
-
var
|
|
4573
|
-
function
|
|
4450
|
+
var ei = Ze.codes, to = ei.ERR_MISSING_ARGS, ro = ei.ERR_STREAM_DESTROYED;
|
|
4451
|
+
function dn(e) {
|
|
4574
4452
|
if (e) throw e;
|
|
4575
4453
|
}
|
|
4576
|
-
function
|
|
4454
|
+
function no(e) {
|
|
4577
4455
|
return e.setHeader && typeof e.abort == "function";
|
|
4578
4456
|
}
|
|
4579
|
-
function
|
|
4580
|
-
a =
|
|
4457
|
+
function io(e, t, r, a) {
|
|
4458
|
+
a = eo(a);
|
|
4581
4459
|
var o = !1;
|
|
4582
4460
|
e.on("close", function() {
|
|
4583
4461
|
o = !0;
|
|
4584
|
-
}),
|
|
4462
|
+
}), _r === void 0 && (_r = Hr), _r(e, {
|
|
4585
4463
|
readable: t,
|
|
4586
4464
|
writable: r
|
|
4587
4465
|
}, function(c) {
|
|
@@ -4591,48 +4469,48 @@ function lo(e, t, r, a) {
|
|
|
4591
4469
|
var s = !1;
|
|
4592
4470
|
return function(c) {
|
|
4593
4471
|
if (!o && !s) {
|
|
4594
|
-
if (s = !0,
|
|
4472
|
+
if (s = !0, no(e)) return e.abort();
|
|
4595
4473
|
if (typeof e.destroy == "function") return e.destroy();
|
|
4596
|
-
a(c || new
|
|
4474
|
+
a(c || new ro("pipe"));
|
|
4597
4475
|
}
|
|
4598
4476
|
};
|
|
4599
4477
|
}
|
|
4600
|
-
function
|
|
4478
|
+
function pn(e) {
|
|
4601
4479
|
e();
|
|
4602
4480
|
}
|
|
4603
|
-
function
|
|
4481
|
+
function ao(e, t) {
|
|
4604
4482
|
return e.pipe(t);
|
|
4605
4483
|
}
|
|
4606
|
-
function
|
|
4607
|
-
return !e.length || typeof e[e.length - 1] != "function" ?
|
|
4484
|
+
function oo(e) {
|
|
4485
|
+
return !e.length || typeof e[e.length - 1] != "function" ? dn : e.pop();
|
|
4608
4486
|
}
|
|
4609
|
-
function
|
|
4487
|
+
function so() {
|
|
4610
4488
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
4611
4489
|
t[r] = arguments[r];
|
|
4612
|
-
var a =
|
|
4490
|
+
var a = oo(t);
|
|
4613
4491
|
if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
|
|
4614
|
-
throw new
|
|
4492
|
+
throw new to("streams");
|
|
4615
4493
|
var o, s = t.map(function(c, u) {
|
|
4616
4494
|
var p = u < t.length - 1, g = u > 0;
|
|
4617
|
-
return
|
|
4618
|
-
o || (o =
|
|
4495
|
+
return io(c, p, g, function(v) {
|
|
4496
|
+
o || (o = v), v && s.forEach(pn), !p && (s.forEach(pn), a(o));
|
|
4619
4497
|
});
|
|
4620
4498
|
});
|
|
4621
|
-
return t.reduce(
|
|
4499
|
+
return t.reduce(ao);
|
|
4622
4500
|
}
|
|
4623
|
-
var
|
|
4501
|
+
var fo = so;
|
|
4624
4502
|
(function(e, t) {
|
|
4625
|
-
t = e.exports =
|
|
4626
|
-
})(
|
|
4627
|
-
var
|
|
4628
|
-
function
|
|
4503
|
+
t = e.exports = Xn(), t.Stream = t, t.Readable = t, t.Writable = Yn(), t.Duplex = ht(), t.Transform = Qn, t.PassThrough = Za, t.finished = Hr, t.pipeline = fo;
|
|
4504
|
+
})(Tr, Tr.exports);
|
|
4505
|
+
var uo = Tr.exports, Gt = me.Buffer, ti = uo.Transform, co = be;
|
|
4506
|
+
function ho(e, t) {
|
|
4629
4507
|
if (!Gt.isBuffer(e) && typeof e != "string")
|
|
4630
4508
|
throw new TypeError(t + " must be a string or a buffer");
|
|
4631
4509
|
}
|
|
4632
4510
|
function Ge(e) {
|
|
4633
|
-
|
|
4511
|
+
ti.call(this), this._block = Gt.allocUnsafe(e), this._blockSize = e, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
|
|
4634
4512
|
}
|
|
4635
|
-
|
|
4513
|
+
co(Ge, ti);
|
|
4636
4514
|
Ge.prototype._transform = function(e, t, r) {
|
|
4637
4515
|
var a = null;
|
|
4638
4516
|
try {
|
|
@@ -4652,7 +4530,7 @@ Ge.prototype._flush = function(e) {
|
|
|
4652
4530
|
e(t);
|
|
4653
4531
|
};
|
|
4654
4532
|
Ge.prototype.update = function(e, t) {
|
|
4655
|
-
if (
|
|
4533
|
+
if (ho(e, "Data"), this._finalized) throw new Error("Digest already called");
|
|
4656
4534
|
Gt.isBuffer(e) || (e = Gt.from(e, t));
|
|
4657
4535
|
for (var r = this._block, a = 0; this._blockOffset + e.length - a >= this._blockSize; ) {
|
|
4658
4536
|
for (var o = this._blockOffset; o < this._blockSize; ) r[o++] = e[a++];
|
|
@@ -4677,37 +4555,37 @@ Ge.prototype.digest = function(e) {
|
|
|
4677
4555
|
Ge.prototype._digest = function() {
|
|
4678
4556
|
throw new Error("_digest is not implemented");
|
|
4679
4557
|
};
|
|
4680
|
-
var
|
|
4681
|
-
function
|
|
4682
|
-
|
|
4558
|
+
var ri = Ge, lo = be, ni = ri, po = me.Buffer, bo = new Array(16);
|
|
4559
|
+
function Xt() {
|
|
4560
|
+
ni.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878;
|
|
4683
4561
|
}
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
for (var e =
|
|
4562
|
+
lo(Xt, ni);
|
|
4563
|
+
Xt.prototype._update = function() {
|
|
4564
|
+
for (var e = bo, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
|
|
4687
4565
|
var r = this._a, a = this._b, o = this._c, s = this._d;
|
|
4688
|
-
r = ue(r, a, o, s, e[0], 3614090360, 7), s = ue(s, r, a, o, e[1], 3905402710, 12), o = ue(o, s, r, a, e[2], 606105819, 17), a = ue(a, o, s, r, e[3], 3250441966, 22), r = ue(r, a, o, s, e[4], 4118548399, 7), s = ue(s, r, a, o, e[5], 1200080426, 12), o = ue(o, s, r, a, e[6], 2821735955, 17), a = ue(a, o, s, r, e[7], 4249261313, 22), r = ue(r, a, o, s, e[8], 1770035416, 7), s = ue(s, r, a, o, e[9], 2336552879, 12), o = ue(o, s, r, a, e[10], 4294925233, 17), a = ue(a, o, s, r, e[11], 2304563134, 22), r = ue(r, a, o, s, e[12], 1804603682, 7), s = ue(s, r, a, o, e[13], 4254626195, 12), o = ue(o, s, r, a, e[14], 2792965006, 17), a = ue(a, o, s, r, e[15], 1236535329, 22), r = ce(r, a, o, s, e[1], 4129170786, 5), s = ce(s, r, a, o, e[6], 3225465664, 9), o = ce(o, s, r, a, e[11], 643717713, 14), a = ce(a, o, s, r, e[0], 3921069994, 20), r = ce(r, a, o, s, e[5], 3593408605, 5), s = ce(s, r, a, o, e[10], 38016083, 9), o = ce(o, s, r, a, e[15], 3634488961, 14), a = ce(a, o, s, r, e[4], 3889429448, 20), r = ce(r, a, o, s, e[9], 568446438, 5), s = ce(s, r, a, o, e[14], 3275163606, 9), o = ce(o, s, r, a, e[3], 4107603335, 14), a = ce(a, o, s, r, e[8], 1163531501, 20), r = ce(r, a, o, s, e[13], 2850285829, 5), s = ce(s, r, a, o, e[2], 4243563512, 9), o = ce(o, s, r, a, e[7], 1735328473, 14), a = ce(a, o, s, r, e[12], 2368359562, 20), r =
|
|
4566
|
+
r = ue(r, a, o, s, e[0], 3614090360, 7), s = ue(s, r, a, o, e[1], 3905402710, 12), o = ue(o, s, r, a, e[2], 606105819, 17), a = ue(a, o, s, r, e[3], 3250441966, 22), r = ue(r, a, o, s, e[4], 4118548399, 7), s = ue(s, r, a, o, e[5], 1200080426, 12), o = ue(o, s, r, a, e[6], 2821735955, 17), a = ue(a, o, s, r, e[7], 4249261313, 22), r = ue(r, a, o, s, e[8], 1770035416, 7), s = ue(s, r, a, o, e[9], 2336552879, 12), o = ue(o, s, r, a, e[10], 4294925233, 17), a = ue(a, o, s, r, e[11], 2304563134, 22), r = ue(r, a, o, s, e[12], 1804603682, 7), s = ue(s, r, a, o, e[13], 4254626195, 12), o = ue(o, s, r, a, e[14], 2792965006, 17), a = ue(a, o, s, r, e[15], 1236535329, 22), r = ce(r, a, o, s, e[1], 4129170786, 5), s = ce(s, r, a, o, e[6], 3225465664, 9), o = ce(o, s, r, a, e[11], 643717713, 14), a = ce(a, o, s, r, e[0], 3921069994, 20), r = ce(r, a, o, s, e[5], 3593408605, 5), s = ce(s, r, a, o, e[10], 38016083, 9), o = ce(o, s, r, a, e[15], 3634488961, 14), a = ce(a, o, s, r, e[4], 3889429448, 20), r = ce(r, a, o, s, e[9], 568446438, 5), s = ce(s, r, a, o, e[14], 3275163606, 9), o = ce(o, s, r, a, e[3], 4107603335, 14), a = ce(a, o, s, r, e[8], 1163531501, 20), r = ce(r, a, o, s, e[13], 2850285829, 5), s = ce(s, r, a, o, e[2], 4243563512, 9), o = ce(o, s, r, a, e[7], 1735328473, 14), a = ce(a, o, s, r, e[12], 2368359562, 20), r = he(r, a, o, s, e[5], 4294588738, 4), s = he(s, r, a, o, e[8], 2272392833, 11), o = he(o, s, r, a, e[11], 1839030562, 16), a = he(a, o, s, r, e[14], 4259657740, 23), r = he(r, a, o, s, e[1], 2763975236, 4), s = he(s, r, a, o, e[4], 1272893353, 11), o = he(o, s, r, a, e[7], 4139469664, 16), a = he(a, o, s, r, e[10], 3200236656, 23), r = he(r, a, o, s, e[13], 681279174, 4), s = he(s, r, a, o, e[0], 3936430074, 11), o = he(o, s, r, a, e[3], 3572445317, 16), a = he(a, o, s, r, e[6], 76029189, 23), r = he(r, a, o, s, e[9], 3654602809, 4), s = he(s, r, a, o, e[12], 3873151461, 11), o = he(o, s, r, a, e[15], 530742520, 16), a = he(a, o, s, r, e[2], 3299628645, 23), r = le(r, a, o, s, e[0], 4096336452, 6), s = le(s, r, a, o, e[7], 1126891415, 10), o = le(o, s, r, a, e[14], 2878612391, 15), a = le(a, o, s, r, e[5], 4237533241, 21), r = le(r, a, o, s, e[12], 1700485571, 6), s = le(s, r, a, o, e[3], 2399980690, 10), o = le(o, s, r, a, e[10], 4293915773, 15), a = le(a, o, s, r, e[1], 2240044497, 21), r = le(r, a, o, s, e[8], 1873313359, 6), s = le(s, r, a, o, e[15], 4264355552, 10), o = le(o, s, r, a, e[6], 2734768916, 15), a = le(a, o, s, r, e[13], 1309151649, 21), r = le(r, a, o, s, e[4], 4149444226, 6), s = le(s, r, a, o, e[11], 3174756917, 10), o = le(o, s, r, a, e[2], 718787259, 15), a = le(a, o, s, r, e[9], 3951481745, 21), this._a = this._a + r | 0, this._b = this._b + a | 0, this._c = this._c + o | 0, this._d = this._d + s | 0;
|
|
4689
4567
|
};
|
|
4690
|
-
|
|
4568
|
+
Xt.prototype._digest = function() {
|
|
4691
4569
|
this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update();
|
|
4692
|
-
var e =
|
|
4570
|
+
var e = po.allocUnsafe(16);
|
|
4693
4571
|
return e.writeInt32LE(this._a, 0), e.writeInt32LE(this._b, 4), e.writeInt32LE(this._c, 8), e.writeInt32LE(this._d, 12), e;
|
|
4694
4572
|
};
|
|
4695
|
-
function
|
|
4573
|
+
function Qt(e, t) {
|
|
4696
4574
|
return e << t | e >>> 32 - t;
|
|
4697
4575
|
}
|
|
4698
4576
|
function ue(e, t, r, a, o, s, c) {
|
|
4699
|
-
return
|
|
4577
|
+
return Qt(e + (t & r | ~t & a) + o + s | 0, c) + t | 0;
|
|
4700
4578
|
}
|
|
4701
4579
|
function ce(e, t, r, a, o, s, c) {
|
|
4702
|
-
return
|
|
4703
|
-
}
|
|
4704
|
-
function le(e, t, r, a, o, s, c) {
|
|
4705
|
-
return Zt(e + (t ^ r ^ a) + o + s | 0, c) + t | 0;
|
|
4580
|
+
return Qt(e + (t & a | r & ~a) + o + s | 0, c) + t | 0;
|
|
4706
4581
|
}
|
|
4707
4582
|
function he(e, t, r, a, o, s, c) {
|
|
4708
|
-
return
|
|
4583
|
+
return Qt(e + (t ^ r ^ a) + o + s | 0, c) + t | 0;
|
|
4584
|
+
}
|
|
4585
|
+
function le(e, t, r, a, o, s, c) {
|
|
4586
|
+
return Qt(e + (r ^ (t | ~a)) + o + s | 0, c) + t | 0;
|
|
4709
4587
|
}
|
|
4710
|
-
var
|
|
4588
|
+
var yo = Xt, wr = lt.Buffer, _o = be, ii = ri, wo = new Array(16), gt = [
|
|
4711
4589
|
0,
|
|
4712
4590
|
1,
|
|
4713
4591
|
2,
|
|
@@ -4788,7 +4666,7 @@ var Eo = Qt, gr = ht.Buffer, Ro = be, ai = ni, Bo = new Array(16), gt = [
|
|
|
4788
4666
|
6,
|
|
4789
4667
|
15,
|
|
4790
4668
|
13
|
|
4791
|
-
],
|
|
4669
|
+
], vt = [
|
|
4792
4670
|
5,
|
|
4793
4671
|
14,
|
|
4794
4672
|
7,
|
|
@@ -4869,7 +4747,7 @@ var Eo = Qt, gr = ht.Buffer, Ro = be, ai = ni, Bo = new Array(16), gt = [
|
|
|
4869
4747
|
3,
|
|
4870
4748
|
9,
|
|
4871
4749
|
11
|
|
4872
|
-
],
|
|
4750
|
+
], mt = [
|
|
4873
4751
|
11,
|
|
4874
4752
|
14,
|
|
4875
4753
|
15,
|
|
@@ -5032,48 +4910,48 @@ var Eo = Qt, gr = ht.Buffer, Ro = be, ai = ni, Bo = new Array(16), gt = [
|
|
|
5032
4910
|
11,
|
|
5033
4911
|
11
|
|
5034
4912
|
], Et = [0, 1518500249, 1859775393, 2400959708, 2840853838], Rt = [1352829926, 1548603684, 1836072691, 2053994217, 0];
|
|
5035
|
-
function
|
|
5036
|
-
|
|
4913
|
+
function Zt() {
|
|
4914
|
+
ii.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520;
|
|
5037
4915
|
}
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
for (var e =
|
|
5041
|
-
for (var r = this._a | 0, a = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = this._a | 0, p = this._b | 0, g = this._c | 0,
|
|
4916
|
+
_o(Zt, ii);
|
|
4917
|
+
Zt.prototype._update = function() {
|
|
4918
|
+
for (var e = wo, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
|
|
4919
|
+
for (var r = this._a | 0, a = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = this._a | 0, p = this._b | 0, g = this._c | 0, v = this._d | 0, m = this._e | 0, T = 0; T < 80; T += 1) {
|
|
5042
4920
|
var k, B;
|
|
5043
|
-
T < 16 ? (k =
|
|
4921
|
+
T < 16 ? (k = bn(r, a, o, s, c, e[gt[T]], Et[0], mt[T]), B = gn(u, p, g, v, m, e[vt[T]], Rt[0], xt[T])) : T < 32 ? (k = yn(r, a, o, s, c, e[gt[T]], Et[1], mt[T]), B = wn(u, p, g, v, m, e[vt[T]], Rt[1], xt[T])) : T < 48 ? (k = _n(r, a, o, s, c, e[gt[T]], Et[2], mt[T]), B = _n(u, p, g, v, m, e[vt[T]], Rt[2], xt[T])) : T < 64 ? (k = wn(r, a, o, s, c, e[gt[T]], Et[3], mt[T]), B = yn(u, p, g, v, m, e[vt[T]], Rt[3], xt[T])) : (k = gn(r, a, o, s, c, e[gt[T]], Et[4], mt[T]), B = bn(u, p, g, v, m, e[vt[T]], Rt[4], xt[T])), r = c, c = s, s = Qe(o, 10), o = a, a = k, u = m, m = v, v = Qe(g, 10), g = p, p = B;
|
|
5044
4922
|
}
|
|
5045
|
-
var C = this._b + o +
|
|
5046
|
-
this._b = this._c + s +
|
|
4923
|
+
var C = this._b + o + v | 0;
|
|
4924
|
+
this._b = this._c + s + m | 0, this._c = this._d + c + u | 0, this._d = this._e + r + p | 0, this._e = this._a + a + g | 0, this._a = C;
|
|
5047
4925
|
};
|
|
5048
|
-
|
|
4926
|
+
Zt.prototype._digest = function() {
|
|
5049
4927
|
this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update();
|
|
5050
|
-
var e =
|
|
4928
|
+
var e = wr.alloc ? wr.alloc(20) : new wr(20);
|
|
5051
4929
|
return e.writeInt32LE(this._a, 0), e.writeInt32LE(this._b, 4), e.writeInt32LE(this._c, 8), e.writeInt32LE(this._d, 12), e.writeInt32LE(this._e, 16), e;
|
|
5052
4930
|
};
|
|
5053
4931
|
function Qe(e, t) {
|
|
5054
4932
|
return e << t | e >>> 32 - t;
|
|
5055
4933
|
}
|
|
5056
|
-
function
|
|
4934
|
+
function bn(e, t, r, a, o, s, c, u) {
|
|
5057
4935
|
return Qe(e + (t ^ r ^ a) + s + c | 0, u) + o | 0;
|
|
5058
4936
|
}
|
|
5059
|
-
function
|
|
4937
|
+
function yn(e, t, r, a, o, s, c, u) {
|
|
5060
4938
|
return Qe(e + (t & r | ~t & a) + s + c | 0, u) + o | 0;
|
|
5061
4939
|
}
|
|
5062
|
-
function
|
|
4940
|
+
function _n(e, t, r, a, o, s, c, u) {
|
|
5063
4941
|
return Qe(e + ((t | ~r) ^ a) + s + c | 0, u) + o | 0;
|
|
5064
4942
|
}
|
|
5065
|
-
function
|
|
4943
|
+
function wn(e, t, r, a, o, s, c, u) {
|
|
5066
4944
|
return Qe(e + (t & a | r & ~a) + s + c | 0, u) + o | 0;
|
|
5067
4945
|
}
|
|
5068
|
-
function
|
|
4946
|
+
function gn(e, t, r, a, o, s, c, u) {
|
|
5069
4947
|
return Qe(e + (t ^ (r | ~a)) + s + c | 0, u) + o | 0;
|
|
5070
4948
|
}
|
|
5071
|
-
var
|
|
5072
|
-
function
|
|
5073
|
-
this._block =
|
|
4949
|
+
var go = Zt, ai = { exports: {} }, oi = me.Buffer;
|
|
4950
|
+
function er(e, t) {
|
|
4951
|
+
this._block = oi.alloc(e), this._finalSize = t, this._blockSize = e, this._len = 0;
|
|
5074
4952
|
}
|
|
5075
|
-
|
|
5076
|
-
typeof e == "string" && (t = t || "utf8", e =
|
|
4953
|
+
er.prototype.update = function(e, t) {
|
|
4954
|
+
typeof e == "string" && (t = t || "utf8", e = oi.from(e, t));
|
|
5077
4955
|
for (var r = this._block, a = this._blockSize, o = e.length, s = this._len, c = 0; c < o; ) {
|
|
5078
4956
|
for (var u = s % a, p = Math.min(o - c, a - u), g = 0; g < p; g++)
|
|
5079
4957
|
r[u + g] = e[c + g];
|
|
@@ -5081,7 +4959,7 @@ tr.prototype.update = function(e, t) {
|
|
|
5081
4959
|
}
|
|
5082
4960
|
return this._len += o, this;
|
|
5083
4961
|
};
|
|
5084
|
-
|
|
4962
|
+
er.prototype.digest = function(e) {
|
|
5085
4963
|
var t = this._len % this._blockSize;
|
|
5086
4964
|
this._block[t] = 128, this._block.fill(0, t + 1), t >= this._finalSize && (this._update(this._block), this._block.fill(0));
|
|
5087
4965
|
var r = this._len * 8;
|
|
@@ -5095,83 +4973,83 @@ tr.prototype.digest = function(e) {
|
|
|
5095
4973
|
var s = this._hash();
|
|
5096
4974
|
return e ? s.toString(e) : s;
|
|
5097
4975
|
};
|
|
5098
|
-
|
|
4976
|
+
er.prototype._update = function() {
|
|
5099
4977
|
throw new Error("_update must be implemented by subclass");
|
|
5100
4978
|
};
|
|
5101
|
-
var dt =
|
|
4979
|
+
var dt = er, vo = be, si = dt, mo = me.Buffer, xo = [
|
|
5102
4980
|
1518500249,
|
|
5103
4981
|
1859775393,
|
|
5104
4982
|
-1894007588,
|
|
5105
4983
|
-899497514
|
|
5106
|
-
],
|
|
4984
|
+
], Eo = new Array(80);
|
|
5107
4985
|
function It() {
|
|
5108
|
-
this.init(), this._w =
|
|
4986
|
+
this.init(), this._w = Eo, si.call(this, 64, 56);
|
|
5109
4987
|
}
|
|
5110
|
-
|
|
4988
|
+
vo(It, si);
|
|
5111
4989
|
It.prototype.init = function() {
|
|
5112
4990
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
5113
4991
|
};
|
|
5114
|
-
function
|
|
4992
|
+
function Ro(e) {
|
|
5115
4993
|
return e << 5 | e >>> 27;
|
|
5116
4994
|
}
|
|
5117
|
-
function
|
|
4995
|
+
function Bo(e) {
|
|
5118
4996
|
return e << 30 | e >>> 2;
|
|
5119
4997
|
}
|
|
5120
|
-
function
|
|
4998
|
+
function So(e, t, r, a) {
|
|
5121
4999
|
return e === 0 ? t & r | ~t & a : e === 2 ? t & r | t & a | r & a : t ^ r ^ a;
|
|
5122
5000
|
}
|
|
5123
5001
|
It.prototype._update = function(e) {
|
|
5124
5002
|
for (var t = this._w, r = this._a | 0, a = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
|
|
5125
5003
|
for (; u < 80; ++u) t[u] = t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16];
|
|
5126
5004
|
for (var p = 0; p < 80; ++p) {
|
|
5127
|
-
var g = ~~(p / 20),
|
|
5128
|
-
c = s, s = o, o =
|
|
5005
|
+
var g = ~~(p / 20), v = Ro(r) + So(g, a, o, s) + c + t[p] + xo[g] | 0;
|
|
5006
|
+
c = s, s = o, o = Bo(a), a = r, r = v;
|
|
5129
5007
|
}
|
|
5130
5008
|
this._a = r + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = s + this._d | 0, this._e = c + this._e | 0;
|
|
5131
5009
|
};
|
|
5132
5010
|
It.prototype._hash = function() {
|
|
5133
|
-
var e =
|
|
5011
|
+
var e = mo.allocUnsafe(20);
|
|
5134
5012
|
return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
|
|
5135
5013
|
};
|
|
5136
|
-
var
|
|
5014
|
+
var Ao = It, To = be, fi = dt, Io = me.Buffer, Co = [
|
|
5137
5015
|
1518500249,
|
|
5138
5016
|
1859775393,
|
|
5139
5017
|
-1894007588,
|
|
5140
5018
|
-899497514
|
|
5141
|
-
],
|
|
5019
|
+
], ko = new Array(80);
|
|
5142
5020
|
function Ct() {
|
|
5143
|
-
this.init(), this._w =
|
|
5021
|
+
this.init(), this._w = ko, fi.call(this, 64, 56);
|
|
5144
5022
|
}
|
|
5145
|
-
|
|
5023
|
+
To(Ct, fi);
|
|
5146
5024
|
Ct.prototype.init = function() {
|
|
5147
5025
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
5148
5026
|
};
|
|
5149
|
-
function
|
|
5027
|
+
function Lo(e) {
|
|
5150
5028
|
return e << 1 | e >>> 31;
|
|
5151
5029
|
}
|
|
5152
|
-
function
|
|
5030
|
+
function Oo(e) {
|
|
5153
5031
|
return e << 5 | e >>> 27;
|
|
5154
5032
|
}
|
|
5155
|
-
function
|
|
5033
|
+
function Po(e) {
|
|
5156
5034
|
return e << 30 | e >>> 2;
|
|
5157
5035
|
}
|
|
5158
|
-
function
|
|
5036
|
+
function Mo(e, t, r, a) {
|
|
5159
5037
|
return e === 0 ? t & r | ~t & a : e === 2 ? t & r | t & a | r & a : t ^ r ^ a;
|
|
5160
5038
|
}
|
|
5161
5039
|
Ct.prototype._update = function(e) {
|
|
5162
5040
|
for (var t = this._w, r = this._a | 0, a = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
|
|
5163
|
-
for (; u < 80; ++u) t[u] =
|
|
5041
|
+
for (; u < 80; ++u) t[u] = Lo(t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16]);
|
|
5164
5042
|
for (var p = 0; p < 80; ++p) {
|
|
5165
|
-
var g = ~~(p / 20),
|
|
5166
|
-
c = s, s = o, o =
|
|
5043
|
+
var g = ~~(p / 20), v = Oo(r) + Mo(g, a, o, s) + c + t[p] + Co[g] | 0;
|
|
5044
|
+
c = s, s = o, o = Po(a), a = r, r = v;
|
|
5167
5045
|
}
|
|
5168
5046
|
this._a = r + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = s + this._d | 0, this._e = c + this._e | 0;
|
|
5169
5047
|
};
|
|
5170
5048
|
Ct.prototype._hash = function() {
|
|
5171
|
-
var e =
|
|
5049
|
+
var e = Io.allocUnsafe(20);
|
|
5172
5050
|
return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
|
|
5173
5051
|
};
|
|
5174
|
-
var
|
|
5052
|
+
var Fo = Ct, No = be, ui = dt, Do = me.Buffer, Uo = [
|
|
5175
5053
|
1116352408,
|
|
5176
5054
|
1899447441,
|
|
5177
5055
|
3049323471,
|
|
@@ -5236,58 +5114,58 @@ var Wo = Ct, qo = be, ci = dt, Ko = ve.Buffer, Go = [
|
|
|
5236
5114
|
2756734187,
|
|
5237
5115
|
3204031479,
|
|
5238
5116
|
3329325298
|
|
5239
|
-
],
|
|
5117
|
+
], $o = new Array(64);
|
|
5240
5118
|
function kt() {
|
|
5241
|
-
this.init(), this._w =
|
|
5119
|
+
this.init(), this._w = $o, ui.call(this, 64, 56);
|
|
5242
5120
|
}
|
|
5243
|
-
|
|
5121
|
+
No(kt, ui);
|
|
5244
5122
|
kt.prototype.init = function() {
|
|
5245
5123
|
return this._a = 1779033703, this._b = 3144134277, this._c = 1013904242, this._d = 2773480762, this._e = 1359893119, this._f = 2600822924, this._g = 528734635, this._h = 1541459225, this;
|
|
5246
5124
|
};
|
|
5247
|
-
function
|
|
5125
|
+
function Ho(e, t, r) {
|
|
5248
5126
|
return r ^ e & (t ^ r);
|
|
5249
5127
|
}
|
|
5250
|
-
function
|
|
5128
|
+
function jo(e, t, r) {
|
|
5251
5129
|
return e & t | r & (e | t);
|
|
5252
5130
|
}
|
|
5253
|
-
function
|
|
5131
|
+
function Wo(e) {
|
|
5254
5132
|
return (e >>> 2 | e << 30) ^ (e >>> 13 | e << 19) ^ (e >>> 22 | e << 10);
|
|
5255
5133
|
}
|
|
5256
|
-
function
|
|
5134
|
+
function qo(e) {
|
|
5257
5135
|
return (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
|
|
5258
5136
|
}
|
|
5259
|
-
function
|
|
5137
|
+
function Ko(e) {
|
|
5260
5138
|
return (e >>> 7 | e << 25) ^ (e >>> 18 | e << 14) ^ e >>> 3;
|
|
5261
5139
|
}
|
|
5262
|
-
function
|
|
5140
|
+
function Go(e) {
|
|
5263
5141
|
return (e >>> 17 | e << 15) ^ (e >>> 19 | e << 13) ^ e >>> 10;
|
|
5264
5142
|
}
|
|
5265
5143
|
kt.prototype._update = function(e) {
|
|
5266
|
-
for (var t = this._w, r = this._a | 0, a = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = this._f | 0, p = this._g | 0, g = this._h | 0,
|
|
5267
|
-
for (;
|
|
5268
|
-
for (var
|
|
5269
|
-
var T = g +
|
|
5144
|
+
for (var t = this._w, r = this._a | 0, a = this._b | 0, o = this._c | 0, s = this._d | 0, c = this._e | 0, u = this._f | 0, p = this._g | 0, g = this._h | 0, v = 0; v < 16; ++v) t[v] = e.readInt32BE(v * 4);
|
|
5145
|
+
for (; v < 64; ++v) t[v] = Go(t[v - 2]) + t[v - 7] + Ko(t[v - 15]) + t[v - 16] | 0;
|
|
5146
|
+
for (var m = 0; m < 64; ++m) {
|
|
5147
|
+
var T = g + qo(c) + Ho(c, u, p) + Uo[m] + t[m] | 0, k = Wo(r) + jo(r, a, o) | 0;
|
|
5270
5148
|
g = p, p = u, u = c, c = s + T | 0, s = o, o = a, a = r, r = T + k | 0;
|
|
5271
5149
|
}
|
|
5272
5150
|
this._a = r + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = s + this._d | 0, this._e = c + this._e | 0, this._f = u + this._f | 0, this._g = p + this._g | 0, this._h = g + this._h | 0;
|
|
5273
5151
|
};
|
|
5274
5152
|
kt.prototype._hash = function() {
|
|
5275
|
-
var e =
|
|
5153
|
+
var e = Do.allocUnsafe(32);
|
|
5276
5154
|
return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e.writeInt32BE(this._h, 28), e;
|
|
5277
5155
|
};
|
|
5278
|
-
var
|
|
5279
|
-
function
|
|
5280
|
-
this.init(), this._w =
|
|
5156
|
+
var ci = kt, Vo = be, Jo = ci, Yo = dt, zo = me.Buffer, Xo = new Array(64);
|
|
5157
|
+
function tr() {
|
|
5158
|
+
this.init(), this._w = Xo, Yo.call(this, 64, 56);
|
|
5281
5159
|
}
|
|
5282
|
-
|
|
5283
|
-
|
|
5160
|
+
Vo(tr, Jo);
|
|
5161
|
+
tr.prototype.init = function() {
|
|
5284
5162
|
return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this;
|
|
5285
5163
|
};
|
|
5286
|
-
|
|
5287
|
-
var e =
|
|
5164
|
+
tr.prototype._hash = function() {
|
|
5165
|
+
var e = zo.allocUnsafe(28);
|
|
5288
5166
|
return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e;
|
|
5289
5167
|
};
|
|
5290
|
-
var
|
|
5168
|
+
var Qo = tr, Zo = be, hi = dt, es = me.Buffer, vn = [
|
|
5291
5169
|
1116352408,
|
|
5292
5170
|
3609767458,
|
|
5293
5171
|
1899447441,
|
|
@@ -5448,100 +5326,100 @@ var as = rr, os = be, hi = dt, ss = ve.Buffer, vn = [
|
|
|
5448
5326
|
987167468,
|
|
5449
5327
|
1816402316,
|
|
5450
5328
|
1246189591
|
|
5451
|
-
],
|
|
5329
|
+
], ts = new Array(160);
|
|
5452
5330
|
function Lt() {
|
|
5453
|
-
this.init(), this._w =
|
|
5331
|
+
this.init(), this._w = ts, hi.call(this, 128, 112);
|
|
5454
5332
|
}
|
|
5455
|
-
|
|
5333
|
+
Zo(Lt, hi);
|
|
5456
5334
|
Lt.prototype.init = function() {
|
|
5457
5335
|
return this._ah = 1779033703, this._bh = 3144134277, this._ch = 1013904242, this._dh = 2773480762, this._eh = 1359893119, this._fh = 2600822924, this._gh = 528734635, this._hh = 1541459225, this._al = 4089235720, this._bl = 2227873595, this._cl = 4271175723, this._dl = 1595750129, this._el = 2917565137, this._fl = 725511199, this._gl = 4215389547, this._hl = 327033209, this;
|
|
5458
5336
|
};
|
|
5459
|
-
function
|
|
5337
|
+
function mn(e, t, r) {
|
|
5460
5338
|
return r ^ e & (t ^ r);
|
|
5461
5339
|
}
|
|
5462
|
-
function
|
|
5340
|
+
function xn(e, t, r) {
|
|
5463
5341
|
return e & t | r & (e | t);
|
|
5464
5342
|
}
|
|
5465
|
-
function
|
|
5343
|
+
function En(e, t) {
|
|
5466
5344
|
return (e >>> 28 | t << 4) ^ (t >>> 2 | e << 30) ^ (t >>> 7 | e << 25);
|
|
5467
5345
|
}
|
|
5468
|
-
function
|
|
5346
|
+
function Rn(e, t) {
|
|
5469
5347
|
return (e >>> 14 | t << 18) ^ (e >>> 18 | t << 14) ^ (t >>> 9 | e << 23);
|
|
5470
5348
|
}
|
|
5471
|
-
function
|
|
5349
|
+
function rs(e, t) {
|
|
5472
5350
|
return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ e >>> 7;
|
|
5473
5351
|
}
|
|
5474
|
-
function
|
|
5352
|
+
function ns(e, t) {
|
|
5475
5353
|
return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ (e >>> 7 | t << 25);
|
|
5476
5354
|
}
|
|
5477
|
-
function
|
|
5355
|
+
function is(e, t) {
|
|
5478
5356
|
return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ e >>> 6;
|
|
5479
5357
|
}
|
|
5480
|
-
function
|
|
5358
|
+
function as(e, t) {
|
|
5481
5359
|
return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ (e >>> 6 | t << 26);
|
|
5482
5360
|
}
|
|
5483
5361
|
function oe(e, t) {
|
|
5484
5362
|
return e >>> 0 < t >>> 0 ? 1 : 0;
|
|
5485
5363
|
}
|
|
5486
5364
|
Lt.prototype._update = function(e) {
|
|
5487
|
-
for (var t = this._w, r = this._ah | 0, a = this._bh | 0, o = this._ch | 0, s = this._dh | 0, c = this._eh | 0, u = this._fh | 0, p = this._gh | 0, g = this._hh | 0,
|
|
5365
|
+
for (var t = this._w, r = this._ah | 0, a = this._bh | 0, o = this._ch | 0, s = this._dh | 0, c = this._eh | 0, u = this._fh | 0, p = this._gh | 0, g = this._hh | 0, v = this._al | 0, m = this._bl | 0, T = this._cl | 0, k = this._dl | 0, B = this._el | 0, C = this._fl | 0, A = this._gl | 0, I = this._hl | 0, O = 0; O < 32; O += 2)
|
|
5488
5366
|
t[O] = e.readInt32BE(O * 4), t[O + 1] = e.readInt32BE(O * 4 + 4);
|
|
5489
5367
|
for (; O < 160; O += 2) {
|
|
5490
|
-
var
|
|
5491
|
-
|
|
5492
|
-
var j =
|
|
5368
|
+
var P = t[O - 30], L = t[O - 15 * 2 + 1], F = rs(P, L), E = ns(L, P);
|
|
5369
|
+
P = t[O - 2 * 2], L = t[O - 2 * 2 + 1];
|
|
5370
|
+
var j = is(P, L), N = as(L, P), U = t[O - 7 * 2], re = t[O - 7 * 2 + 1], Ae = t[O - 16 * 2], Ue = t[O - 16 * 2 + 1], ae = E + re | 0, ge = F + U + oe(ae, E) | 0;
|
|
5493
5371
|
ae = ae + N | 0, ge = ge + j + oe(ae, N) | 0, ae = ae + Ue | 0, ge = ge + Ae + oe(ae, Ue) | 0, t[O] = ge, t[O + 1] = ae;
|
|
5494
5372
|
}
|
|
5495
|
-
for (var
|
|
5496
|
-
ge = t[
|
|
5497
|
-
var Ve =
|
|
5498
|
-
_ = _ +
|
|
5373
|
+
for (var ve = 0; ve < 160; ve += 2) {
|
|
5374
|
+
ge = t[ve], ae = t[ve + 1];
|
|
5375
|
+
var Ve = xn(r, a, o), Te = xn(v, m, T), $e = En(r, v), Ie = En(v, r), He = Rn(c, B), z = Rn(B, c), ne = vn[ve], xe = vn[ve + 1], je = mn(c, u, p), Pe = mn(B, C, A), _ = I + z | 0, y = g + He + oe(_, I) | 0;
|
|
5376
|
+
_ = _ + Pe | 0, y = y + je + oe(_, Pe) | 0, _ = _ + xe | 0, y = y + ne + oe(_, xe) | 0, _ = _ + ae | 0, y = y + ge + oe(_, ae) | 0;
|
|
5499
5377
|
var S = Ie + Te | 0, D = $e + Ve + oe(S, Ie) | 0;
|
|
5500
|
-
g = p, I = A, p = u, A = C, u = c, C = B, B = k + _ | 0, c = s + y + oe(B, k) | 0, s = o, k = T, o = a, T =
|
|
5378
|
+
g = p, I = A, p = u, A = C, u = c, C = B, B = k + _ | 0, c = s + y + oe(B, k) | 0, s = o, k = T, o = a, T = m, a = r, m = v, v = _ + S | 0, r = y + D + oe(v, _) | 0;
|
|
5501
5379
|
}
|
|
5502
|
-
this._al = this._al +
|
|
5380
|
+
this._al = this._al + v | 0, this._bl = this._bl + m | 0, this._cl = this._cl + T | 0, this._dl = this._dl + k | 0, this._el = this._el + B | 0, this._fl = this._fl + C | 0, this._gl = this._gl + A | 0, this._hl = this._hl + I | 0, this._ah = this._ah + r + oe(this._al, v) | 0, this._bh = this._bh + a + oe(this._bl, m) | 0, this._ch = this._ch + o + oe(this._cl, T) | 0, this._dh = this._dh + s + oe(this._dl, k) | 0, this._eh = this._eh + c + oe(this._el, B) | 0, this._fh = this._fh + u + oe(this._fl, C) | 0, this._gh = this._gh + p + oe(this._gl, A) | 0, this._hh = this._hh + g + oe(this._hl, I) | 0;
|
|
5503
5381
|
};
|
|
5504
5382
|
Lt.prototype._hash = function() {
|
|
5505
|
-
var e =
|
|
5383
|
+
var e = es.allocUnsafe(64);
|
|
5506
5384
|
function t(r, a, o) {
|
|
5507
5385
|
e.writeInt32BE(r, o), e.writeInt32BE(a, o + 4);
|
|
5508
5386
|
}
|
|
5509
5387
|
return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), t(this._gh, this._gl, 48), t(this._hh, this._hl, 56), e;
|
|
5510
5388
|
};
|
|
5511
|
-
var
|
|
5512
|
-
function
|
|
5513
|
-
this.init(), this._w =
|
|
5389
|
+
var li = Lt, os = be, ss = li, fs = dt, us = me.Buffer, cs = new Array(160);
|
|
5390
|
+
function rr() {
|
|
5391
|
+
this.init(), this._w = cs, fs.call(this, 128, 112);
|
|
5514
5392
|
}
|
|
5515
|
-
|
|
5516
|
-
|
|
5393
|
+
os(rr, ss);
|
|
5394
|
+
rr.prototype.init = function() {
|
|
5517
5395
|
return this._ah = 3418070365, this._bh = 1654270250, this._ch = 2438529370, this._dh = 355462360, this._eh = 1731405415, this._fh = 2394180231, this._gh = 3675008525, this._hh = 1203062813, this._al = 3238371032, this._bl = 914150663, this._cl = 812702999, this._dl = 4144912697, this._el = 4290775857, this._fl = 1750603025, this._gl = 1694076839, this._hl = 3204075428, this;
|
|
5518
5396
|
};
|
|
5519
|
-
|
|
5520
|
-
var e =
|
|
5397
|
+
rr.prototype._hash = function() {
|
|
5398
|
+
var e = us.allocUnsafe(48);
|
|
5521
5399
|
function t(r, a, o) {
|
|
5522
5400
|
e.writeInt32BE(r, o), e.writeInt32BE(a, o + 4);
|
|
5523
5401
|
}
|
|
5524
5402
|
return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), e;
|
|
5525
5403
|
};
|
|
5526
|
-
var
|
|
5404
|
+
var hs = rr, et = ai.exports = function(t) {
|
|
5527
5405
|
t = t.toLowerCase();
|
|
5528
5406
|
var r = et[t];
|
|
5529
5407
|
if (!r) throw new Error(t + " is not supported (we accept pull requests)");
|
|
5530
5408
|
return new r();
|
|
5531
5409
|
};
|
|
5532
|
-
et.sha =
|
|
5533
|
-
et.sha1 =
|
|
5534
|
-
et.sha224 =
|
|
5535
|
-
et.sha256 =
|
|
5536
|
-
et.sha384 =
|
|
5537
|
-
et.sha512 =
|
|
5538
|
-
var
|
|
5410
|
+
et.sha = Ao;
|
|
5411
|
+
et.sha1 = Fo;
|
|
5412
|
+
et.sha224 = Qo;
|
|
5413
|
+
et.sha256 = ci;
|
|
5414
|
+
et.sha384 = hs;
|
|
5415
|
+
et.sha512 = li;
|
|
5416
|
+
var ls = ai.exports, di = me.Buffer, pi = Ur.Transform, ds = Kt.StringDecoder, ps = be;
|
|
5539
5417
|
function Ce(e) {
|
|
5540
|
-
|
|
5418
|
+
pi.call(this), this.hashMode = typeof e == "string", this.hashMode ? this[e] = this._finalOrDigest : this.final = this._finalOrDigest, this._final && (this.__final = this._final, this._final = null), this._decoder = null, this._encoding = null;
|
|
5541
5419
|
}
|
|
5542
|
-
|
|
5420
|
+
ps(Ce, pi);
|
|
5543
5421
|
Ce.prototype.update = function(e, t, r) {
|
|
5544
|
-
typeof e == "string" && (e =
|
|
5422
|
+
typeof e == "string" && (e = di.from(e, t));
|
|
5545
5423
|
var a = this._update(e);
|
|
5546
5424
|
return this.hashMode ? this : (r && (a = this._toString(a, r)), a);
|
|
5547
5425
|
};
|
|
@@ -5576,29 +5454,29 @@ Ce.prototype._flush = function(e) {
|
|
|
5576
5454
|
e(t);
|
|
5577
5455
|
};
|
|
5578
5456
|
Ce.prototype._finalOrDigest = function(e) {
|
|
5579
|
-
var t = this.__final() ||
|
|
5457
|
+
var t = this.__final() || di.alloc(0);
|
|
5580
5458
|
return e && (t = this._toString(t, e, !0)), t;
|
|
5581
5459
|
};
|
|
5582
5460
|
Ce.prototype._toString = function(e, t, r) {
|
|
5583
|
-
if (this._decoder || (this._decoder = new
|
|
5461
|
+
if (this._decoder || (this._decoder = new ds(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
|
|
5584
5462
|
var a = this._decoder.write(e);
|
|
5585
5463
|
return r && (a += this._decoder.end()), a;
|
|
5586
5464
|
};
|
|
5587
|
-
var
|
|
5588
|
-
function
|
|
5589
|
-
|
|
5465
|
+
var bs = Ce, ys = be, _s = yo, ws = go, gs = ls, bi = bs;
|
|
5466
|
+
function nr(e) {
|
|
5467
|
+
bi.call(this, "digest"), this._hash = e;
|
|
5590
5468
|
}
|
|
5591
|
-
|
|
5592
|
-
|
|
5469
|
+
ys(nr, bi);
|
|
5470
|
+
nr.prototype._update = function(e) {
|
|
5593
5471
|
this._hash.update(e);
|
|
5594
5472
|
};
|
|
5595
|
-
|
|
5473
|
+
nr.prototype._final = function() {
|
|
5596
5474
|
return this._hash.digest();
|
|
5597
5475
|
};
|
|
5598
|
-
var
|
|
5599
|
-
return t = t.toLowerCase(), t === "md5" ? new
|
|
5600
|
-
}, Nt =
|
|
5601
|
-
function
|
|
5476
|
+
var vs = function(t) {
|
|
5477
|
+
return t = t.toLowerCase(), t === "md5" ? new _s() : t === "rmd160" || t === "ripemd160" ? new ws() : new nr(gs(t));
|
|
5478
|
+
}, Nt = me.Buffer;
|
|
5479
|
+
function ms(e) {
|
|
5602
5480
|
if (e.length >= 255)
|
|
5603
5481
|
throw new TypeError("Alphabet too long");
|
|
5604
5482
|
for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
|
|
@@ -5610,27 +5488,27 @@ function Ts(e) {
|
|
|
5610
5488
|
t[s] = a;
|
|
5611
5489
|
}
|
|
5612
5490
|
var c = e.length, u = e.charAt(0), p = Math.log(c) / Math.log(256), g = Math.log(256) / Math.log(c);
|
|
5613
|
-
function
|
|
5491
|
+
function v(k) {
|
|
5614
5492
|
if ((Array.isArray(k) || k instanceof Uint8Array) && (k = Nt.from(k)), !Nt.isBuffer(k))
|
|
5615
5493
|
throw new TypeError("Expected Buffer");
|
|
5616
5494
|
if (k.length === 0)
|
|
5617
5495
|
return "";
|
|
5618
5496
|
for (var B = 0, C = 0, A = 0, I = k.length; A !== I && k[A] === 0; )
|
|
5619
5497
|
A++, B++;
|
|
5620
|
-
for (var O = (I - A) * g + 1 >>> 0,
|
|
5621
|
-
for (var L = k[A],
|
|
5622
|
-
L += 256 *
|
|
5498
|
+
for (var O = (I - A) * g + 1 >>> 0, P = new Uint8Array(O); A !== I; ) {
|
|
5499
|
+
for (var L = k[A], F = 0, E = O - 1; (L !== 0 || F < C) && E !== -1; E--, F++)
|
|
5500
|
+
L += 256 * P[E] >>> 0, P[E] = L % c >>> 0, L = L / c >>> 0;
|
|
5623
5501
|
if (L !== 0)
|
|
5624
5502
|
throw new Error("Non-zero carry");
|
|
5625
|
-
C =
|
|
5503
|
+
C = F, A++;
|
|
5626
5504
|
}
|
|
5627
|
-
for (var j = O - C; j !== O &&
|
|
5505
|
+
for (var j = O - C; j !== O && P[j] === 0; )
|
|
5628
5506
|
j++;
|
|
5629
5507
|
for (var N = u.repeat(B); j < O; ++j)
|
|
5630
|
-
N += e.charAt(
|
|
5508
|
+
N += e.charAt(P[j]);
|
|
5631
5509
|
return N;
|
|
5632
5510
|
}
|
|
5633
|
-
function
|
|
5511
|
+
function m(k) {
|
|
5634
5512
|
if (typeof k != "string")
|
|
5635
5513
|
throw new TypeError("Expected String");
|
|
5636
5514
|
if (k.length === 0)
|
|
@@ -5638,12 +5516,12 @@ function Ts(e) {
|
|
|
5638
5516
|
for (var B = 0, C = 0, A = 0; k[B] === u; )
|
|
5639
5517
|
C++, B++;
|
|
5640
5518
|
for (var I = (k.length - B) * p + 1 >>> 0, O = new Uint8Array(I); B < k.length; ) {
|
|
5641
|
-
var
|
|
5642
|
-
if (
|
|
5519
|
+
var P = t[k.charCodeAt(B)];
|
|
5520
|
+
if (P === 255)
|
|
5643
5521
|
return;
|
|
5644
|
-
for (var L = 0,
|
|
5645
|
-
|
|
5646
|
-
if (
|
|
5522
|
+
for (var L = 0, F = I - 1; (P !== 0 || L < A) && F !== -1; F--, L++)
|
|
5523
|
+
P += c * O[F] >>> 0, O[F] = P % 256 >>> 0, P = P / 256 >>> 0;
|
|
5524
|
+
if (P !== 0)
|
|
5647
5525
|
throw new Error("Non-zero carry");
|
|
5648
5526
|
A = L, B++;
|
|
5649
5527
|
}
|
|
@@ -5656,21 +5534,21 @@ function Ts(e) {
|
|
|
5656
5534
|
return j;
|
|
5657
5535
|
}
|
|
5658
5536
|
function T(k) {
|
|
5659
|
-
var B =
|
|
5537
|
+
var B = m(k);
|
|
5660
5538
|
if (B)
|
|
5661
5539
|
return B;
|
|
5662
5540
|
throw new Error("Non-base" + c + " character");
|
|
5663
5541
|
}
|
|
5664
5542
|
return {
|
|
5665
|
-
encode:
|
|
5666
|
-
decodeUnsafe:
|
|
5543
|
+
encode: v,
|
|
5544
|
+
decodeUnsafe: m,
|
|
5667
5545
|
decode: T
|
|
5668
5546
|
};
|
|
5669
5547
|
}
|
|
5670
|
-
var
|
|
5548
|
+
var xs = ms, Es = xs, Rs = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", Bs = Es(Rs), gr = Bs, Ss = me.Buffer, As = function(e) {
|
|
5671
5549
|
function t(s) {
|
|
5672
5550
|
var c = e(s);
|
|
5673
|
-
return
|
|
5551
|
+
return gr.encode(Ss.concat([
|
|
5674
5552
|
s,
|
|
5675
5553
|
c
|
|
5676
5554
|
], s.length + 4));
|
|
@@ -5681,12 +5559,12 @@ var Is = Ts, Cs = Is, ks = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrst
|
|
|
5681
5559
|
return c;
|
|
5682
5560
|
}
|
|
5683
5561
|
function a(s) {
|
|
5684
|
-
var c =
|
|
5562
|
+
var c = gr.decodeUnsafe(s);
|
|
5685
5563
|
if (c)
|
|
5686
5564
|
return r(c);
|
|
5687
5565
|
}
|
|
5688
5566
|
function o(s) {
|
|
5689
|
-
var c =
|
|
5567
|
+
var c = gr.decode(s), u = r(c);
|
|
5690
5568
|
if (!u) throw new Error("Invalid checksum");
|
|
5691
5569
|
return u;
|
|
5692
5570
|
}
|
|
@@ -5695,13 +5573,13 @@ var Is = Ts, Cs = Is, ks = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrst
|
|
|
5695
5573
|
decode: o,
|
|
5696
5574
|
decodeUnsafe: a
|
|
5697
5575
|
};
|
|
5698
|
-
},
|
|
5699
|
-
function
|
|
5700
|
-
var t =
|
|
5701
|
-
return
|
|
5576
|
+
}, Bn = vs, Ts = As;
|
|
5577
|
+
function Is(e) {
|
|
5578
|
+
var t = Bn("sha256").update(e).digest();
|
|
5579
|
+
return Bn("sha256").update(t).digest();
|
|
5702
5580
|
}
|
|
5703
|
-
var
|
|
5704
|
-
function
|
|
5581
|
+
var Cs = Ts(Is), Cr = Cs;
|
|
5582
|
+
function yi(e, t) {
|
|
5705
5583
|
if (t !== void 0 && e[0] !== t) throw new Error("Invalid network version");
|
|
5706
5584
|
if (e.length === 33)
|
|
5707
5585
|
return {
|
|
@@ -5717,32 +5595,32 @@ function _i(e, t) {
|
|
|
5717
5595
|
compressed: !0
|
|
5718
5596
|
};
|
|
5719
5597
|
}
|
|
5720
|
-
function
|
|
5598
|
+
function kr(e, t, r) {
|
|
5721
5599
|
var a = new Buffer(r ? 34 : 33);
|
|
5722
5600
|
return a.writeUInt8(e, 0), t.copy(a, 1), r && (a[33] = 1), a;
|
|
5723
5601
|
}
|
|
5724
|
-
function
|
|
5725
|
-
return
|
|
5602
|
+
function ks(e, t) {
|
|
5603
|
+
return yi(Cr.decode(e), t);
|
|
5726
5604
|
}
|
|
5727
|
-
function
|
|
5728
|
-
return typeof e == "number" ?
|
|
5729
|
-
|
|
5605
|
+
function Ls(e, t, r) {
|
|
5606
|
+
return typeof e == "number" ? Cr.encode(kr(e, t, r)) : Cr.encode(
|
|
5607
|
+
kr(
|
|
5730
5608
|
e.version,
|
|
5731
5609
|
e.privateKey,
|
|
5732
5610
|
e.compressed
|
|
5733
5611
|
)
|
|
5734
5612
|
);
|
|
5735
5613
|
}
|
|
5736
|
-
var
|
|
5737
|
-
decode:
|
|
5738
|
-
decodeRaw:
|
|
5739
|
-
encode:
|
|
5740
|
-
encodeRaw:
|
|
5741
|
-
},
|
|
5742
|
-
Object.defineProperty(
|
|
5743
|
-
|
|
5614
|
+
var Os = {
|
|
5615
|
+
decode: ks,
|
|
5616
|
+
decodeRaw: yi,
|
|
5617
|
+
encode: Ls,
|
|
5618
|
+
encodeRaw: kr
|
|
5619
|
+
}, ir = {};
|
|
5620
|
+
Object.defineProperty(ir, "__esModule", { value: !0 });
|
|
5621
|
+
ir.testEcc = void 0;
|
|
5744
5622
|
const $ = (e) => Buffer.from(e, "hex");
|
|
5745
|
-
function
|
|
5623
|
+
function Ps(e) {
|
|
5746
5624
|
Y(
|
|
5747
5625
|
e.isPoint(
|
|
5748
5626
|
$("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
|
|
@@ -5932,22 +5810,22 @@ function Hs(e) {
|
|
|
5932
5810
|
)
|
|
5933
5811
|
);
|
|
5934
5812
|
}
|
|
5935
|
-
|
|
5813
|
+
ir.testEcc = Ps;
|
|
5936
5814
|
function Y(e) {
|
|
5937
5815
|
if (!e) throw new Error("ecc library invalid");
|
|
5938
5816
|
}
|
|
5939
5817
|
Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
5940
5818
|
ut.ECPairFactory = ut.networks = void 0;
|
|
5941
|
-
const
|
|
5942
|
-
ut.networks =
|
|
5943
|
-
const _e =
|
|
5819
|
+
const Lr = ct;
|
|
5820
|
+
ut.networks = Lr;
|
|
5821
|
+
const _e = In, Ms = sa, Sn = Os, Fs = ir, vr = _e.typeforce.maybe(
|
|
5944
5822
|
_e.typeforce.compile({
|
|
5945
5823
|
compressed: _e.maybe(_e.Boolean),
|
|
5946
5824
|
network: _e.maybe(_e.Network)
|
|
5947
5825
|
})
|
|
5948
|
-
),
|
|
5949
|
-
function
|
|
5950
|
-
(0,
|
|
5826
|
+
), Ns = (e) => e.length === 32 ? e : e.slice(1, 33);
|
|
5827
|
+
function Ds(e) {
|
|
5828
|
+
(0, Fs.testEcc)(e);
|
|
5951
5829
|
function t(u) {
|
|
5952
5830
|
return e.isPoint(u);
|
|
5953
5831
|
}
|
|
@@ -5960,10 +5838,10 @@ function Ks(e) {
|
|
|
5960
5838
|
return _e.typeforce(e.isPoint, u), _e.typeforce(vr, p), new c(void 0, u, p);
|
|
5961
5839
|
}
|
|
5962
5840
|
function o(u, p) {
|
|
5963
|
-
const g =
|
|
5841
|
+
const g = Sn.decode(u), v = g.version;
|
|
5964
5842
|
if (_e.Array(p)) {
|
|
5965
|
-
if (p = p.filter((
|
|
5966
|
-
} else if (p = p ||
|
|
5843
|
+
if (p = p.filter((m) => v === m.wif).pop(), !p) throw new Error("Unknown network version");
|
|
5844
|
+
} else if (p = p || Lr.bitcoin, v !== p.wif) throw new Error("Invalid network version");
|
|
5967
5845
|
return r(g.privateKey, {
|
|
5968
5846
|
compressed: g.compressed,
|
|
5969
5847
|
network: p
|
|
@@ -5971,7 +5849,7 @@ function Ks(e) {
|
|
|
5971
5849
|
}
|
|
5972
5850
|
function s(u) {
|
|
5973
5851
|
_e.typeforce(vr, u), u === void 0 && (u = {});
|
|
5974
|
-
const p = u.rng ||
|
|
5852
|
+
const p = u.rng || Ms;
|
|
5975
5853
|
let g;
|
|
5976
5854
|
do
|
|
5977
5855
|
g = p(32), _e.typeforce(_e.Buffer256bit, g);
|
|
@@ -5979,13 +5857,13 @@ function Ks(e) {
|
|
|
5979
5857
|
return r(g, u);
|
|
5980
5858
|
}
|
|
5981
5859
|
class c {
|
|
5982
|
-
constructor(p, g,
|
|
5860
|
+
constructor(p, g, v) {
|
|
5983
5861
|
nt(this, "__D");
|
|
5984
5862
|
nt(this, "__Q");
|
|
5985
5863
|
nt(this, "compressed");
|
|
5986
5864
|
nt(this, "network");
|
|
5987
5865
|
nt(this, "lowR");
|
|
5988
|
-
this.__D = p, this.__Q = g, this.lowR = !1,
|
|
5866
|
+
this.__D = p, this.__Q = g, this.lowR = !1, v === void 0 && (v = {}), this.compressed = v.compressed === void 0 ? !0 : v.compressed, this.network = v.network || Lr.bitcoin, g !== void 0 && (this.__Q = Buffer.from(e.pointCompress(g, this.compressed)));
|
|
5989
5867
|
}
|
|
5990
5868
|
get privateKey() {
|
|
5991
5869
|
return this.__D;
|
|
@@ -5999,7 +5877,7 @@ function Ks(e) {
|
|
|
5999
5877
|
}
|
|
6000
5878
|
toWIF() {
|
|
6001
5879
|
if (!this.__D) throw new Error("Missing private key");
|
|
6002
|
-
return
|
|
5880
|
+
return Sn.encode(this.network.wif, this.__D, this.compressed);
|
|
6003
5881
|
}
|
|
6004
5882
|
tweak(p) {
|
|
6005
5883
|
return this.privateKey ? this.tweakFromPrivateKey(p) : this.tweakFromPublicKey(p);
|
|
@@ -6009,12 +5887,12 @@ function Ks(e) {
|
|
|
6009
5887
|
if (g === void 0 && (g = this.lowR), g === !1)
|
|
6010
5888
|
return Buffer.from(e.sign(p, this.__D));
|
|
6011
5889
|
{
|
|
6012
|
-
let
|
|
6013
|
-
const
|
|
5890
|
+
let v = e.sign(p, this.__D);
|
|
5891
|
+
const m = Buffer.alloc(32, 0);
|
|
6014
5892
|
let T = 0;
|
|
6015
|
-
for (;
|
|
6016
|
-
T++,
|
|
6017
|
-
return Buffer.from(
|
|
5893
|
+
for (; v[0] > 127; )
|
|
5894
|
+
T++, m.writeUIntLE(T, 0, 6), v = e.sign(p, this.__D, m);
|
|
5895
|
+
return Buffer.from(v);
|
|
6018
5896
|
}
|
|
6019
5897
|
}
|
|
6020
5898
|
signSchnorr(p) {
|
|
@@ -6032,21 +5910,21 @@ function Ks(e) {
|
|
|
6032
5910
|
return e.verifySchnorr(p, this.publicKey.subarray(1, 33), g);
|
|
6033
5911
|
}
|
|
6034
5912
|
tweakFromPublicKey(p) {
|
|
6035
|
-
const g =
|
|
6036
|
-
if (!
|
|
5913
|
+
const g = Ns(this.publicKey), v = e.xOnlyPointAddTweak(g, p);
|
|
5914
|
+
if (!v || v.xOnlyPubkey === null)
|
|
6037
5915
|
throw new Error("Cannot tweak public key!");
|
|
6038
|
-
const
|
|
6039
|
-
|
|
5916
|
+
const m = Buffer.from([
|
|
5917
|
+
v.parity === 0 ? 2 : 3
|
|
6040
5918
|
]);
|
|
6041
5919
|
return a(
|
|
6042
|
-
Buffer.concat([
|
|
5920
|
+
Buffer.concat([m, v.xOnlyPubkey]),
|
|
6043
5921
|
{ network: this.network, compressed: this.compressed }
|
|
6044
5922
|
);
|
|
6045
5923
|
}
|
|
6046
5924
|
tweakFromPrivateKey(p) {
|
|
6047
|
-
const
|
|
6048
|
-
if (!
|
|
6049
|
-
return r(Buffer.from(
|
|
5925
|
+
const v = this.publicKey[0] === 3 || this.publicKey[0] === 4 && (this.publicKey[64] & 1) === 1 ? e.privateNegate(this.privateKey) : this.privateKey, m = e.privateAdd(v, p);
|
|
5926
|
+
if (!m) throw new Error("Invalid tweaked private key!");
|
|
5927
|
+
return r(Buffer.from(m), {
|
|
6050
5928
|
network: this.network,
|
|
6051
5929
|
compressed: this.compressed
|
|
6052
5930
|
});
|
|
@@ -6060,7 +5938,7 @@ function Ks(e) {
|
|
|
6060
5938
|
makeRandom: s
|
|
6061
5939
|
};
|
|
6062
5940
|
}
|
|
6063
|
-
ut.ECPairFactory =
|
|
5941
|
+
ut.ECPairFactory = Ds;
|
|
6064
5942
|
(function(e) {
|
|
6065
5943
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.networks = e.ECPairFactory = e.default = void 0;
|
|
6066
5944
|
var t = ut;
|
|
@@ -6080,13 +5958,13 @@ ut.ECPairFactory = Ks;
|
|
|
6080
5958
|
return t.networks;
|
|
6081
5959
|
}
|
|
6082
5960
|
});
|
|
6083
|
-
})(
|
|
6084
|
-
class
|
|
5961
|
+
})(Tn);
|
|
5962
|
+
class Or {
|
|
6085
5963
|
constructor(t) {
|
|
6086
5964
|
this.privKey = t;
|
|
6087
5965
|
}
|
|
6088
5966
|
static fromPrivKey(t) {
|
|
6089
|
-
return new
|
|
5967
|
+
return new Or(ze(t));
|
|
6090
5968
|
}
|
|
6091
5969
|
static async fromWalletClient(t) {
|
|
6092
5970
|
if (!t.account) return H("No account found");
|
|
@@ -6115,7 +5993,7 @@ class Fr {
|
|
|
6115
5993
|
Nonce: 1n
|
|
6116
5994
|
}
|
|
6117
5995
|
});
|
|
6118
|
-
return se(new
|
|
5996
|
+
return se(new Or(ze(Mt(r))));
|
|
6119
5997
|
} catch (r) {
|
|
6120
5998
|
return H("Failed to initialize: " + r);
|
|
6121
5999
|
}
|
|
@@ -6124,19 +6002,19 @@ class Fr {
|
|
|
6124
6002
|
return this.privKey;
|
|
6125
6003
|
}
|
|
6126
6004
|
generateSecret(t) {
|
|
6127
|
-
const r = this.signMessage(t), a =
|
|
6005
|
+
const r = this.signMessage(t), a = Mt(Dt(r)), o = Mt(a);
|
|
6128
6006
|
return se({ secret: a, secretHash: o });
|
|
6129
6007
|
}
|
|
6130
6008
|
signMessage(t) {
|
|
6131
|
-
const r =
|
|
6009
|
+
const r = Tn.ECPairFactory(ft), a = "Garden.fi" + t.toString(), o = Buffer.from(a, "utf8"), s = Mt(o), c = Buffer.from(ze(this.privKey), "hex");
|
|
6132
6010
|
if (c.length !== 32)
|
|
6133
6011
|
throw new Error("Invalid private key length. Expected 32 bytes.");
|
|
6134
6012
|
return r.fromPrivateKey(c).sign(Buffer.from(ze(s), "hex")).toString("hex");
|
|
6135
6013
|
}
|
|
6136
6014
|
}
|
|
6137
|
-
class
|
|
6015
|
+
class zs {
|
|
6138
6016
|
constructor(t) {
|
|
6139
|
-
this.quoteUrl = new
|
|
6017
|
+
this.quoteUrl = new An("/quote", t);
|
|
6140
6018
|
}
|
|
6141
6019
|
async getQuote(t, r, a = !1) {
|
|
6142
6020
|
try {
|
|
@@ -6165,12 +6043,12 @@ class nf {
|
|
|
6165
6043
|
}
|
|
6166
6044
|
}
|
|
6167
6045
|
export {
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6046
|
+
Pi as EvmRelay,
|
|
6047
|
+
Js as Garden,
|
|
6048
|
+
ki as ParseOrderStatus,
|
|
6049
|
+
Rr as ParseSwapStatus,
|
|
6050
|
+
zs as Quote,
|
|
6051
|
+
Or as SecretManager,
|
|
6052
|
+
Li as parseAction,
|
|
6053
|
+
Vs as switchOrAddNetwork
|
|
6176
6054
|
};
|