@gardenfi/core 0.2.0-beta.47 → 0.2.0-beta.48

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.js CHANGED
@@ -1,12 +1,12 @@
1
1
  var $s = Object.defineProperty;
2
2
  var Hs = (e, t, r) => t in e ? $s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var pt = (e, t, r) => Hs(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { Ok as fe, Err as D, Fetcher as Gt, trim0x as nt } from "@catalogfi/utils";
5
- import { EthereumLocalnet as zs, ArbitrumLocalnet as Gs, Orderbook as js, isMainnet as rr, isBitcoin as nr, getBlockchainType as Ct, BlockchainType as ke } from "@gardenfi/orderbook";
4
+ import { Ok as fe, Err as M, Fetcher as mt, trim0x as nt } from "@catalogfi/utils";
5
+ import { EthereumLocalnet as zs, ArbitrumLocalnet as Gs, Orderbook as js, isMainnet as rr, isBitcoin as nr, getBlockchainType as Lt, BlockchainType as ke } from "@gardenfi/orderbook";
6
6
  import { Url as pn, fetchEVMBlockNumber as Zr, with0x as fr, checkAllowanceAndApprove as Ws, Authorization as Cn, sleep as qs, fetchBitcoinBlockNumber as Ln } from "@gardenfi/utils";
7
7
  import { createWalletClient as kn, custom as Fn, getContract as Vs, sha256 as ir } from "viem";
8
8
  import * as Un from "varuint-bitcoin";
9
- import * as _t from "tiny-secp256k1";
9
+ import * as xt from "tiny-secp256k1";
10
10
  import { Urgency as On } from "@catalogfi/wallets";
11
11
  import * as be from "bitcoinjs-lib";
12
12
  import { crypto as Ks } from "bitcoinjs-lib";
@@ -21,7 +21,7 @@ function qt(e) {
21
21
  };
22
22
  }
23
23
  const Ii = "2.21.30";
24
- let Lt = {
24
+ let kt = {
25
25
  getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: r }) => t ? `${e ?? "https://viem.sh"}${t}${r ? `#${r}` : ""}` : void 0,
26
26
  version: `viem@${Ii}`
27
27
  };
@@ -31,13 +31,13 @@ class X extends Error {
31
31
  const n = (() => {
32
32
  var l;
33
33
  return r.cause instanceof X ? r.cause.details : (l = r.cause) != null && l.message ? r.cause.message : r.details;
34
- })(), i = r.cause instanceof X && r.cause.docsPath || r.docsPath, a = (u = Lt.getDocsUrl) == null ? void 0 : u.call(Lt, { ...r, docsPath: i }), f = [
34
+ })(), i = r.cause instanceof X && r.cause.docsPath || r.docsPath, a = (u = kt.getDocsUrl) == null ? void 0 : u.call(kt, { ...r, docsPath: i }), f = [
35
35
  t || "An error occurred.",
36
36
  "",
37
37
  ...r.metaMessages ? [...r.metaMessages, ""] : [],
38
38
  ...a ? [`Docs: ${a}`] : [],
39
39
  ...n ? [`Details: ${n}`] : [],
40
- ...Lt.version ? [`Version: ${Lt.version}`] : []
40
+ ...kt.version ? [`Version: ${kt.version}`] : []
41
41
  ].join(`
42
42
  `);
43
43
  super(f, r.cause ? { cause: r.cause } : void 0), Object.defineProperty(this, "details", {
@@ -92,7 +92,7 @@ class Xs extends X {
92
92
  function Vt(e, { strict: t = !0 } = {}) {
93
93
  return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
94
94
  }
95
- function xt(e) {
95
+ function vt(e) {
96
96
  return Vt(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
97
97
  }
98
98
  function lr(e, { dir: t = "left" } = {}) {
@@ -111,7 +111,7 @@ class Ri extends X {
111
111
  super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`, { name: "SizeExceedsPaddingSizeError" });
112
112
  }
113
113
  }
114
- function St(e, { dir: t, size: r = 32 } = {}) {
114
+ function It(e, { dir: t, size: r = 32 } = {}) {
115
115
  return typeof e == "string" ? Zs(e, { dir: t, size: r }) : eo(e, { dir: t, size: r });
116
116
  }
117
117
  function Zs(e, { dir: t, size: r = 32 } = {}) {
@@ -148,14 +148,14 @@ function W(e, t = {}) {
148
148
  }
149
149
  function ro(e, t = {}) {
150
150
  const r = `0x${Number(e)}`;
151
- return typeof t.size == "number" ? (It(r, { size: t.size }), St(r, { size: t.size })) : r;
151
+ return typeof t.size == "number" ? (At(r, { size: t.size }), It(r, { size: t.size })) : r;
152
152
  }
153
153
  function Qe(e, t = {}) {
154
154
  let r = "";
155
155
  for (let i = 0; i < e.length; i++)
156
156
  r += to[e[i]];
157
157
  const n = `0x${r}`;
158
- return typeof t.size == "number" ? (It(n, { size: t.size }), St(n, { dir: "right", size: t.size })) : n;
158
+ return typeof t.size == "number" ? (At(n, { size: t.size }), It(n, { dir: "right", size: t.size })) : n;
159
159
  }
160
160
  function Ti(e, t = {}) {
161
161
  const { signed: r, size: n } = t, i = BigInt(e);
@@ -173,7 +173,7 @@ function Ti(e, t = {}) {
173
173
  });
174
174
  }
175
175
  const u = `0x${(r && i < 0 ? (1n << BigInt(n * 8)) + BigInt(i) : i).toString(16)}`;
176
- return n ? St(u, { size: n }) : u;
176
+ return n ? It(u, { size: n }) : u;
177
177
  }
178
178
  const no = /* @__PURE__ */ new TextEncoder();
179
179
  function io(e, t = {}) {
@@ -186,7 +186,7 @@ function Pi(e, t = {}) {
186
186
  }
187
187
  function oo(e, t = {}) {
188
188
  const r = new Uint8Array(1);
189
- return r[0] = Number(e), typeof t.size == "number" ? (It(r, { size: t.size }), St(r, { size: t.size })) : r;
189
+ return r[0] = Number(e), typeof t.size == "number" ? (At(r, { size: t.size }), It(r, { size: t.size })) : r;
190
190
  }
191
191
  const Ne = {
192
192
  zero: 48,
@@ -206,7 +206,7 @@ function Mn(e) {
206
206
  }
207
207
  function st(e, t = {}) {
208
208
  let r = e;
209
- t.size && (It(r, { size: t.size }), r = St(r, { dir: "right", size: t.size }));
209
+ t.size && (At(r, { size: t.size }), r = It(r, { dir: "right", size: t.size }));
210
210
  let n = r.slice(2);
211
211
  n.length % 2 && (n = `0${n}`);
212
212
  const i = n.length / 2, a = new Uint8Array(i);
@@ -224,18 +224,18 @@ function ao(e, t) {
224
224
  }
225
225
  function Ci(e, t = {}) {
226
226
  const r = so.encode(e);
227
- return typeof t.size == "number" ? (It(r, { size: t.size }), St(r, { dir: "right", size: t.size })) : r;
227
+ return typeof t.size == "number" ? (At(r, { size: t.size }), It(r, { dir: "right", size: t.size })) : r;
228
228
  }
229
- function It(e, { size: t }) {
230
- if (xt(e) > t)
229
+ function At(e, { size: t }) {
230
+ if (vt(e) > t)
231
231
  throw new Xs({
232
- givenSize: xt(e),
232
+ givenSize: vt(e),
233
233
  maxSize: t
234
234
  });
235
235
  }
236
236
  function gt(e, t = {}) {
237
237
  const { signed: r } = t;
238
- t.size && It(e, { size: t.size });
238
+ t.size && At(e, { size: t.size });
239
239
  const n = BigInt(e);
240
240
  if (!r)
241
241
  return n;
@@ -886,7 +886,7 @@ class jo extends X {
886
886
  }
887
887
  }
888
888
  function Wo(e) {
889
- const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), r = typeof e.data == "string" ? st(e.data) : e.data, n = xt(r);
889
+ const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), r = typeof e.data == "string" ? st(e.data) : e.data, n = vt(r);
890
890
  if (!n)
891
891
  throw new ji();
892
892
  if (n > Gn)
@@ -1016,12 +1016,12 @@ function Yo(e, t = !1) {
1016
1016
  }
1017
1017
  return [r, n];
1018
1018
  }
1019
- const Jo = (e, t, r) => e << r | t >>> 32 - r, Xo = (e, t, r) => t << r | e >>> 32 - r, Qo = (e, t, r) => t << r - 32 | e >>> 64 - r, Zo = (e, t, r) => e << r - 32 | t >>> 64 - r, Vi = [], Ki = [], Yi = [], ea = /* @__PURE__ */ BigInt(0), kt = /* @__PURE__ */ BigInt(1), ta = /* @__PURE__ */ BigInt(2), ra = /* @__PURE__ */ BigInt(7), na = /* @__PURE__ */ BigInt(256), ia = /* @__PURE__ */ BigInt(113);
1020
- for (let e = 0, t = kt, r = 1, n = 0; e < 24; e++) {
1019
+ const Jo = (e, t, r) => e << r | t >>> 32 - r, Xo = (e, t, r) => t << r | e >>> 32 - r, Qo = (e, t, r) => t << r - 32 | e >>> 64 - r, Zo = (e, t, r) => e << r - 32 | t >>> 64 - r, Vi = [], Ki = [], Yi = [], ea = /* @__PURE__ */ BigInt(0), Ft = /* @__PURE__ */ BigInt(1), ta = /* @__PURE__ */ BigInt(2), ra = /* @__PURE__ */ BigInt(7), na = /* @__PURE__ */ BigInt(256), ia = /* @__PURE__ */ BigInt(113);
1020
+ for (let e = 0, t = Ft, r = 1, n = 0; e < 24; e++) {
1021
1021
  [r, n] = [n, (2 * r + 3 * n) % 5], Vi.push(2 * (5 * n + r)), Ki.push((e + 1) * (e + 2) / 2 % 64);
1022
1022
  let i = ea;
1023
1023
  for (let a = 0; a < 7; a++)
1024
- t = (t << kt ^ (t >> ra) * ia) % na, t & ta && (i ^= kt << (kt << /* @__PURE__ */ BigInt(a)) - kt);
1024
+ t = (t << Ft ^ (t >> ra) * ia) % na, t & ta && (i ^= Ft << (Ft << /* @__PURE__ */ BigInt(a)) - Ft);
1025
1025
  Yi.push(i);
1026
1026
  }
1027
1027
  const [sa, oa] = /* @__PURE__ */ Yo(Yi, !0), Wn = (e, t, r) => r > 32 ? Qo(e, t, r) : Jo(e, t, r), qn = (e, t, r) => r > 32 ? Zo(e, t, r) : Xo(e, t, r);
@@ -1144,11 +1144,11 @@ function da(e, t, r, { strict: n } = {}) {
1144
1144
  });
1145
1145
  }
1146
1146
  function Ji(e, t, r) {
1147
- if (xt(e) !== r - t)
1147
+ if (vt(e) !== r - t)
1148
1148
  throw new Qs({
1149
1149
  offset: r,
1150
1150
  position: "end",
1151
- size: xt(e)
1151
+ size: vt(e)
1152
1152
  });
1153
1153
  }
1154
1154
  function pa(e, t, r, { strict: n } = {}) {
@@ -1177,7 +1177,7 @@ function ga(e) {
1177
1177
  if (t.length === 0)
1178
1178
  throw new ji();
1179
1179
  for (const r of t) {
1180
- const n = xt(r), i = hr(da(r, 0, 1));
1180
+ const n = vt(r), i = hr(da(r, 0, 1));
1181
1181
  if (n !== 32)
1182
1182
  throw new Go({ hash: r, size: n });
1183
1183
  if (i !== Gi)
@@ -1531,7 +1531,7 @@ const Vn = {
1531
1531
  }
1532
1532
  },
1533
1533
  testnet: !0
1534
- }), Ft = 11155111, Oa = /* @__PURE__ */ qt({
1534
+ }), Ut = 11155111, Oa = /* @__PURE__ */ qt({
1535
1535
  ...Vn,
1536
1536
  id: 84532,
1537
1537
  network: "base-sepolia",
@@ -1552,23 +1552,23 @@ const Vn = {
1552
1552
  contracts: {
1553
1553
  ...Vn.contracts,
1554
1554
  disputeGameFactory: {
1555
- [Ft]: {
1555
+ [Ut]: {
1556
1556
  address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"
1557
1557
  }
1558
1558
  },
1559
1559
  l2OutputOracle: {
1560
- [Ft]: {
1560
+ [Ut]: {
1561
1561
  address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"
1562
1562
  }
1563
1563
  },
1564
1564
  portal: {
1565
- [Ft]: {
1565
+ [Ut]: {
1566
1566
  address: "0x49f53e41452c74589e85ca1677426ba426459e85",
1567
1567
  blockCreated: 4446677
1568
1568
  }
1569
1569
  },
1570
1570
  l1StandardBridge: {
1571
- [Ft]: {
1571
+ [Ut]: {
1572
1572
  address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120",
1573
1573
  blockCreated: 4446677
1574
1574
  }
@@ -1579,7 +1579,7 @@ const Vn = {
1579
1579
  }
1580
1580
  },
1581
1581
  testnet: !0,
1582
- sourceId: Ft
1582
+ sourceId: Ut
1583
1583
  }), Ma = /* @__PURE__ */ qt({
1584
1584
  id: 1,
1585
1585
  name: "Ethereum",
@@ -1661,11 +1661,11 @@ function Ha(e, t) {
1661
1661
  }
1662
1662
  return [e, t];
1663
1663
  }
1664
- const Ut = (e) => e.length === 64 ? e : e.slice(2), za = (e) => {
1664
+ const Ot = (e) => e.length === 64 ? e : e.slice(2), za = (e) => {
1665
1665
  if (!e) return !1;
1666
1666
  try {
1667
1667
  const t = Buffer.from(e, "hex");
1668
- return _t.isPoint(t);
1668
+ return xt.isPoint(t);
1669
1669
  } catch {
1670
1670
  return !1;
1671
1671
  }
@@ -1677,7 +1677,7 @@ const Ut = (e) => e.length === 64 ? e : e.slice(2), za = (e) => {
1677
1677
  ethereum_localnet: zs,
1678
1678
  arbitrum_localnet: Gs,
1679
1679
  base_sepolia: Oa
1680
- }, u0 = async (e, t) => {
1680
+ }, c0 = async (e, t) => {
1681
1681
  var n;
1682
1682
  const r = Ga[e];
1683
1683
  if (r)
@@ -1708,16 +1708,16 @@ const Ut = (e) => e.length === 64 ? e : e.slice(2), za = (e) => {
1708
1708
  walletClient: a
1709
1709
  });
1710
1710
  } catch {
1711
- return D("Failed to add network");
1711
+ return M("Failed to add network");
1712
1712
  }
1713
1713
  else
1714
- return D("Failed to switch network");
1714
+ return M("Failed to switch network");
1715
1715
  }
1716
1716
  else
1717
- return D("Chain not supported");
1718
- }, ja = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
1717
+ return M("Chain not supported");
1718
+ }, ja = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902, Wa = (e, t, r, n) => e + ":" + t.toLowerCase() + "::" + r + ":" + n.toLowerCase();
1719
1719
  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 || {}), te = /* @__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))(te || {});
1720
- const Wa = (e, t, r) => {
1720
+ const qa = (e, t, r) => {
1721
1721
  const n = nn(
1722
1722
  e.source_swap,
1723
1723
  t
@@ -1756,8 +1756,8 @@ const Wa = (e, t, r) => {
1756
1756
  if (t > r) return te.Expired;
1757
1757
  }
1758
1758
  return e.initiate_tx_hash ? Number(e.initiate_block_number) ? te.Initiated : te.InitiateDetected : te.Idle;
1759
- }, qa = (e, t, r) => {
1760
- switch (Wa(
1759
+ }, Va = (e, t, r) => {
1760
+ switch (qa(
1761
1761
  e,
1762
1762
  t,
1763
1763
  r
@@ -1775,7 +1775,7 @@ const Wa = (e, t, r) => {
1775
1775
  }, Kn = (e, t = 0) => {
1776
1776
  const r = Date.now(), n = e * 1e3 + t * 36e5;
1777
1777
  return r >= n;
1778
- }, Va = [
1778
+ }, Ka = [
1779
1779
  {
1780
1780
  inputs: [
1781
1781
  {
@@ -2168,33 +2168,33 @@ const Wa = (e, t, r) => {
2168
2168
  type: "function"
2169
2169
  }
2170
2170
  ];
2171
- class Ka {
2171
+ class Ya {
2172
2172
  constructor(t, r, n) {
2173
2173
  this.url = new pn("/relayer", r), this.auth = n, this.order = t;
2174
2174
  }
2175
2175
  async init(t, r) {
2176
- if (!t.account) return D("No account found");
2176
+ if (!t.account) return M("No account found");
2177
2177
  if (t.account.address.toLowerCase() !== this.order.source_swap.initiator.toLowerCase())
2178
- return D("Account address and order initiator mismatch");
2178
+ return M("Account address and order initiator mismatch");
2179
2179
  if (!r) {
2180
2180
  const g = await Zr(t);
2181
- if (g.error) return D(g.error);
2181
+ if (g.error) return M(g.error);
2182
2182
  r = g.val;
2183
2183
  }
2184
2184
  if (nn(
2185
2185
  this.order.source_swap,
2186
2186
  r
2187
- ) !== te.Idle) return D("Invalid swap status");
2187
+ ) !== te.Idle) return M("Invalid swap status");
2188
2188
  const { create_order: i, source_swap: a } = this.order;
2189
2189
  if (!a.amount || !a.redeemer || !i.timelock || !i.secret_hash)
2190
- return D("Invalid order");
2190
+ return M("Invalid order");
2191
2191
  const f = fr(i.secret_hash), u = BigInt(i.timelock), l = fr(a.redeemer), y = BigInt(a.amount);
2192
2192
  try {
2193
2193
  const g = await this.auth.getToken();
2194
- if (g.error) return D(g.error);
2194
+ if (g.error) return M(g.error);
2195
2195
  const w = Vs({
2196
2196
  address: fr(this.order.source_swap.asset),
2197
- abi: Va,
2197
+ abi: Ka,
2198
2198
  client: t
2199
2199
  }), E = await w.read.token(), I = await Ws(
2200
2200
  Number(y),
@@ -2202,7 +2202,7 @@ class Ka {
2202
2202
  this.order.source_swap.asset,
2203
2203
  t
2204
2204
  );
2205
- if (I.error) return D(I.error);
2205
+ if (I.error) return M(I.error);
2206
2206
  const v = await w.read.eip712Domain(), P = await t.signTypedData({
2207
2207
  account: t.account,
2208
2208
  domain: {
@@ -2226,7 +2226,7 @@ class Ka {
2226
2226
  amount: y,
2227
2227
  secretHash: f
2228
2228
  }
2229
- }), T = await Gt.post(
2229
+ }), T = await mt.post(
2230
2230
  this.url.endpoint("initiate"),
2231
2231
  {
2232
2232
  body: JSON.stringify({
@@ -2240,16 +2240,16 @@ class Ka {
2240
2240
  }
2241
2241
  }
2242
2242
  );
2243
- return T.error ? D(T.error) : T.result ? fe(T.result) : D("Init: No result found");
2243
+ return T.error ? M(T.error) : T.result ? fe(T.result) : M("Init: No result found");
2244
2244
  } catch (g) {
2245
- return console.log("init error :", g), D(String(g));
2245
+ return console.log("init error :", g), M(String(g));
2246
2246
  }
2247
2247
  }
2248
2248
  async redeem(t, r) {
2249
2249
  try {
2250
2250
  const n = await this.auth.getToken();
2251
- if (n.error) return D(n.error);
2252
- const i = await Gt.post(
2251
+ if (n.error) return M(n.error);
2252
+ const i = await mt.post(
2253
2253
  this.url.endpoint("redeem"),
2254
2254
  {
2255
2255
  body: JSON.stringify({
@@ -2263,33 +2263,33 @@ class Ka {
2263
2263
  }
2264
2264
  }
2265
2265
  );
2266
- return i.error ? D(i.error) : i.result ? fe(i.result) : D("Redeem: No result found");
2266
+ return i.error ? M(i.error) : i.result ? fe(i.result) : M("Redeem: No result found");
2267
2267
  } catch (n) {
2268
- return D(String(n));
2268
+ return M(String(n));
2269
2269
  }
2270
2270
  }
2271
2271
  }
2272
- const Ya = Buffer.from(
2272
+ const Ja = Buffer.from(
2273
2273
  "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
2274
2274
  "hex"
2275
- ), Ja = Buffer.from(
2275
+ ), Xa = Buffer.from(
2276
2276
  "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
2277
2277
  "hex"
2278
- ), Xa = Buffer.concat([Ya, Ja]), Qa = Buffer.from(
2278
+ ), Qa = Buffer.concat([Ja, Xa]), Za = Buffer.from(
2279
2279
  "0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
2280
2280
  "hex"
2281
2281
  ), Yn = {
2282
2282
  failedToCreateInternalPubkey: "failed to create internal pubkey",
2283
2283
  failedToTweakPubkey: "failed to tweak pubkey"
2284
2284
  };
2285
- function Za() {
2286
- const e = Ks.sha256(Buffer.from("GardenHTLC", "utf-8")), t = _t.pointMultiply(
2287
- Buffer.concat([Buffer.from("04", "hex"), Xa]),
2285
+ function ef() {
2286
+ const e = Ks.sha256(Buffer.from("GardenHTLC", "utf-8")), t = xt.pointMultiply(
2287
+ Buffer.concat([Buffer.from("04", "hex"), Qa]),
2288
2288
  e
2289
2289
  );
2290
2290
  if (!t)
2291
2291
  throw new Error(Yn.failedToCreateInternalPubkey);
2292
- const r = _t.pointAdd(Qa, t);
2292
+ const r = xt.pointAdd(Za, t);
2293
2293
  if (!r) throw new Error(Yn.failedToCreateInternalPubkey);
2294
2294
  return rn(Buffer.from(r));
2295
2295
  }
@@ -2307,13 +2307,13 @@ const me = {
2307
2307
  controlBlockGenerationFailed: "failed to generate control block",
2308
2308
  invalidLeaf: "invalid leaf"
2309
2309
  }, or = 192;
2310
- be.initEccLib(_t);
2310
+ be.initEccLib(xt);
2311
2311
  class pr {
2312
2312
  /**
2313
2313
  * Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
2314
2314
  */
2315
2315
  constructor(t, r, n, i, a, f, u, l) {
2316
- this.secretHash = n, this.redeemerPubkey = i, this.initiatorPubkey = a, this.expiry = f, this.signer = t, this.network = u, this.internalPubkey = Za(), this.initiateAmount = r, this.utxoHashes = l;
2316
+ this.secretHash = n, this.redeemerPubkey = i, this.initiatorPubkey = a, this.expiry = f, this.signer = t, this.network = u, this.internalPubkey = ef(), this.initiateAmount = r, this.utxoHashes = l;
2317
2317
  }
2318
2318
  /**
2319
2319
  * Creates a GardenHTLC instance
@@ -2438,7 +2438,7 @@ class pr {
2438
2438
  f,
2439
2439
  u
2440
2440
  );
2441
- if (!_t.verifySchnorr(
2441
+ if (!xt.verifySchnorr(
2442
2442
  E,
2443
2443
  Buffer.from(this.redeemerPubkey, "hex"),
2444
2444
  Buffer.from(t[w].sig, "hex")
@@ -2677,7 +2677,7 @@ function Mr(e, t) {
2677
2677
  r.push(e);
2678
2678
  return r;
2679
2679
  }
2680
- class ef {
2680
+ class tf {
2681
2681
  constructor() {
2682
2682
  this.cache = {};
2683
2683
  }
@@ -2696,29 +2696,29 @@ class ef {
2696
2696
  delete this.cache[`${r}_${t.create_order.create_id}`];
2697
2697
  }
2698
2698
  }
2699
- class tf {
2699
+ class rf {
2700
2700
  constructor(t, r) {
2701
2701
  this.url = new pn("/blocknumber/" + r, t);
2702
2702
  }
2703
2703
  async fetchBlockNumbers() {
2704
2704
  console.log("this.url :", this.url.toString());
2705
2705
  try {
2706
- const t = await Gt.get(this.url);
2706
+ const t = await mt.get(this.url);
2707
2707
  return fe(t);
2708
2708
  } catch (t) {
2709
- return D("Failed to fetch block numbers", t);
2709
+ return M("Failed to fetch block numbers", t);
2710
2710
  }
2711
2711
  }
2712
2712
  }
2713
- class c0 {
2713
+ class l0 {
2714
2714
  constructor(t) {
2715
2715
  if (this.eventListeners = /* @__PURE__ */ new Map(), this.getOrderThreshold = 20, this.pendingOrdersCount = 0, this.useRelay = !0, this.orderBook = new js({
2716
2716
  url: t.orderbookURl,
2717
2717
  walletClient: t.wallets.evmWallet,
2718
2718
  auth: t.auth
2719
- }), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.orderExecutorCache = new ef(), !t.wallets.evmWallet.account)
2719
+ }), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.orderExecutorCache = new tf(), !t.wallets.evmWallet.account)
2720
2720
  throw new Error("Account not found in evmWallet");
2721
- this.evmAddress = t.wallets.evmWallet.account.address, this.blockNumberFetcher = t.blockNumberFetcher && new tf(
2721
+ this.evmAddress = t.wallets.evmWallet.account.address, this.blockNumberFetcher = t.blockNumberFetcher && new rf(
2722
2722
  t.blockNumberFetcher.url,
2723
2723
  t.blockNumberFetcher.network
2724
2724
  );
@@ -2731,11 +2731,11 @@ class c0 {
2731
2731
  }
2732
2732
  async swap(t) {
2733
2733
  const r = await this.validateAndFillParams(t);
2734
- if (r.error) return D(r.error);
2734
+ if (r.error) return M(r.error);
2735
2735
  const { sendAddress: n, receiveAddress: i, timelock: a } = r.val, f = await this.orderBook.getOrdersCount(this.evmAddress);
2736
- if (f.error) return D(f.error);
2736
+ if (f.error) return M(f.error);
2737
2737
  const u = f.val + 1, l = this.secretManager.generateSecret(u);
2738
- if (l.error) return D(l.error);
2738
+ if (l.error) return M(l.error);
2739
2739
  const { strategyId: y, btcAddress: g } = t.additionalData, w = {
2740
2740
  strategy_id: y,
2741
2741
  ...g && {
@@ -2757,67 +2757,67 @@ class c0 {
2757
2757
  min_destination_confirmations: t.minDestinationConfirmations ?? 0,
2758
2758
  additional_data: w
2759
2759
  }, I = await this.quote.getAttestedQuote(E);
2760
- if (I.error) return D(I.error);
2760
+ if (I.error) return M(I.error);
2761
2761
  const v = await this.orderBook.createOrder(I.val);
2762
- if (v.error) return D(v.error);
2762
+ if (v.error) return M(v.error);
2763
2763
  const P = await this.pollOrder(v.val);
2764
- return P.error ? D(P.error) : fe(P.val);
2764
+ return P.error ? M(P.error) : fe(P.val);
2765
2765
  }
2766
2766
  async validateAndFillParams(t) {
2767
2767
  if (t.fromAsset.chain === t.toAsset.chain && t.fromAsset.atomicSwapAddress === t.toAsset.atomicSwapAddress)
2768
- return D("Source and destination assets cannot be the same");
2768
+ return M("Source and destination assets cannot be the same");
2769
2769
  if (rr(t.fromAsset.chain) && !rr(t.toAsset.chain) || !rr(t.fromAsset.chain) && rr(t.toAsset.chain))
2770
- return D(
2770
+ return M(
2771
2771
  "Both assets should be on the same network (either mainnet or testnet)"
2772
2772
  );
2773
2773
  if (nr(t.fromAsset.chain) || nr(t.toAsset.chain)) {
2774
2774
  if (!this.wallets.btcWallet)
2775
- return D(
2775
+ return M(
2776
2776
  "btcWallet is required for bitcoin chain. Please provide btcWallet in the constructor"
2777
2777
  );
2778
2778
  if (!t.additionalData.btcAddress)
2779
- return D(
2779
+ return M(
2780
2780
  "btcAddress in additionalData is required for bitcoin chain"
2781
2781
  );
2782
2782
  }
2783
2783
  const r = await this.getAddresses(t.fromAsset.chain);
2784
- if (r.error) return D(r.error);
2784
+ if (r.error) return M(r.error);
2785
2785
  const n = await this.getAddresses(t.toAsset.chain);
2786
- if (n.error) return D(n.error);
2786
+ if (n.error) return M(n.error);
2787
2787
  const i = this.validateAmount(t.sendAmount);
2788
- if (i.error) return D(i.error);
2788
+ if (i.error) return M(i.error);
2789
2789
  const a = this.validateAmount(t.receiveAmount);
2790
- if (a.error) return D(a.error);
2790
+ if (a.error) return M(a.error);
2791
2791
  if (i < a)
2792
- return D("Send amount should be greater than receive amount");
2792
+ return M("Send amount should be greater than receive amount");
2793
2793
  const f = this.getTimelock(t.fromAsset.chain);
2794
2794
  return f ? fe({
2795
2795
  sendAddress: r.val,
2796
2796
  receiveAddress: n.val,
2797
2797
  timelock: t.timelock ?? f
2798
- }) : D("Unsupported chain for timelock");
2798
+ }) : M("Unsupported chain for timelock");
2799
2799
  }
2800
2800
  async getAddresses(t) {
2801
2801
  var n;
2802
- switch (Ct(t)) {
2802
+ switch (Lt(t)) {
2803
2803
  case ke.EVM:
2804
- return this.wallets.evmWallet.account ? fe(this.wallets.evmWallet.account.address) : D("EVM Wallet not found");
2804
+ return this.wallets.evmWallet.account ? fe(this.wallets.evmWallet.account.address) : M("EVM Wallet not found");
2805
2805
  case ke.Bitcoin: {
2806
2806
  const i = await ((n = this.wallets.btcWallet) == null ? void 0 : n.getPublicKey());
2807
- return !i || !za(i) ? D("Invalid btc public key") : fe(Ut(i));
2807
+ return !i || !za(i) ? M("Invalid btc public key") : fe(Ot(i));
2808
2808
  }
2809
2809
  default:
2810
- return D("Unsupported chain");
2810
+ return M("Unsupported chain");
2811
2811
  }
2812
2812
  }
2813
2813
  validateAmount(t) {
2814
2814
  if (t == null || t.includes("."))
2815
- return D("Invalid amount ", t);
2815
+ return M("Invalid amount ", t);
2816
2816
  const r = new Ys(t);
2817
- return !r.isInteger() || r.isNaN() || r.lt(0) || r.isLessThanOrEqualTo(0) ? D("Invalid amount ", t) : fe(r);
2817
+ return !r.isInteger() || r.isNaN() || r.lt(0) || r.isLessThanOrEqualTo(0) ? M("Invalid amount ", t) : fe(r);
2818
2818
  }
2819
2819
  getTimelock(t) {
2820
- switch (Ct(t)) {
2820
+ switch (Lt(t)) {
2821
2821
  case ke.EVM:
2822
2822
  return en.evm;
2823
2823
  case ke.Bitcoin:
@@ -2831,12 +2831,12 @@ class c0 {
2831
2831
  for (; n < this.getOrderThreshold; ) {
2832
2832
  if (await qs(1e3), n++, r.error) {
2833
2833
  if (!r.error.includes("result is undefined"))
2834
- return D(r.error);
2834
+ return M(r.error);
2835
2835
  } else if (r.val && r.val.create_order.create_id.toLowerCase() === t.toLowerCase())
2836
2836
  return fe(r.val);
2837
2837
  r = await this.orderBook.getOrder(t, !0);
2838
2838
  }
2839
- return D(`Order not found, createOrder id: ${t}`);
2839
+ return M(`Order not found, createOrder id: ${t}`);
2840
2840
  }
2841
2841
  emit(t, ...r) {
2842
2842
  (this.eventListeners.get(t) ?? []).forEach((i) => {
@@ -2877,7 +2877,7 @@ class c0 {
2877
2877
  }
2878
2878
  w = v.val.source, E = v.val.destination;
2879
2879
  }
2880
- switch (qa(
2880
+ switch (Va(
2881
2881
  f,
2882
2882
  w,
2883
2883
  E
@@ -2890,7 +2890,7 @@ class c0 {
2890
2890
  this.emit("error", f, v.error);
2891
2891
  return;
2892
2892
  }
2893
- switch (Ct(f.destination_swap.chain)) {
2893
+ switch (Lt(f.destination_swap.chain)) {
2894
2894
  case ke.EVM: {
2895
2895
  await this.evmRedeem(f, v.val.secret);
2896
2896
  break;
@@ -2913,7 +2913,7 @@ class c0 {
2913
2913
  break;
2914
2914
  }
2915
2915
  case ye.Refund: {
2916
- switch (Ct(f.source_swap.chain)) {
2916
+ switch (Lt(f.source_swap.chain)) {
2917
2917
  case ke.EVM: {
2918
2918
  this.emit(
2919
2919
  "error",
@@ -2952,7 +2952,7 @@ class c0 {
2952
2952
  this.emit("log", t.create_order.create_id, "already redeemed");
2953
2953
  return;
2954
2954
  }
2955
- const a = await new Ka(t, this.orderbookUrl, this.auth).redeem(t.create_order.create_id, r);
2955
+ const a = await new Ya(t, this.orderbookUrl, this.auth).redeem(t.create_order.create_id, r);
2956
2956
  if (a.error) {
2957
2957
  this.emit("error", t, a.error);
2958
2958
  return;
@@ -2980,8 +2980,8 @@ class c0 {
2980
2980
  t,
2981
2981
  Number(r.destination_swap.amount),
2982
2982
  r.create_order.secret_hash,
2983
- Ut(r.destination_swap.initiator),
2984
- Ut(r.destination_swap.redeemer),
2983
+ Ot(r.destination_swap.initiator),
2984
+ Ot(r.destination_swap.redeemer),
2985
2985
  r.destination_swap.timelock,
2986
2986
  a ? [r.destination_swap.initiate_tx_hash] : []
2987
2987
  )).redeem(
@@ -3007,8 +3007,8 @@ class c0 {
3007
3007
  t,
3008
3008
  Number(r.source_swap.amount),
3009
3009
  r.create_order.secret_hash,
3010
- Ut(r.source_swap.initiator),
3011
- Ut(r.source_swap.redeemer),
3010
+ Ot(r.source_swap.initiator),
3011
+ Ot(r.source_swap.redeemer),
3012
3012
  r.source_swap.timelock
3013
3013
  )).refund(
3014
3014
  (n = r.create_order.additional_data) == null ? void 0 : n.bitcoin_optional_recipient
@@ -3020,13 +3020,13 @@ class c0 {
3020
3020
  }
3021
3021
  }
3022
3022
  getWallet(t) {
3023
- switch (Ct(t)) {
3023
+ switch (Lt(t)) {
3024
3024
  case ke.EVM:
3025
3025
  return fe(this.wallets.evmWallet);
3026
3026
  case ke.Bitcoin:
3027
3027
  return fe(this.wallets.btcWallet);
3028
3028
  default:
3029
- return D("Unsupported chain for wallet");
3029
+ return M("Unsupported chain for wallet");
3030
3030
  }
3031
3031
  }
3032
3032
  on(t, r) {
@@ -3039,22 +3039,22 @@ class c0 {
3039
3039
  }
3040
3040
  async fetchCurrentBlockNumbers(t, r) {
3041
3041
  if (!r || !r.source || !r.destination)
3042
- return D("Provide wallets to fetch the current block number");
3042
+ return M("Provide wallets to fetch the current block number");
3043
3043
  const n = nr(t.source_swap.chain) ? await Ln(
3044
3044
  await r.source.getProvider()
3045
3045
  ) : await Zr(r.source);
3046
- if (n.error) return D(n.error);
3046
+ if (n.error) return M(n.error);
3047
3047
  const i = nr(t.destination_swap.chain) ? await Ln(
3048
3048
  await r.destination.getProvider()
3049
3049
  ) : await Zr(r.destination);
3050
- return i.error ? D(i.error) : fe({
3050
+ return i.error ? M(i.error) : fe({
3051
3051
  source: n.val,
3052
3052
  destination: i.val
3053
3053
  });
3054
3054
  }
3055
3055
  }
3056
3056
  var Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3057
- function rf(e) {
3057
+ function nf(e) {
3058
3058
  if (e.__esModule) return e;
3059
3059
  var t = e.default;
3060
3060
  if (typeof t == "function") {
@@ -3073,10 +3073,10 @@ function rf(e) {
3073
3073
  });
3074
3074
  }), r;
3075
3075
  }
3076
- var Xi = {}, vt = {}, Et = {};
3077
- Object.defineProperty(Et, "__esModule", { value: !0 });
3078
- Et.testnet = Et.bitcoin = void 0;
3079
- Et.bitcoin = {
3076
+ var Xi = {}, Et = {}, Bt = {};
3077
+ Object.defineProperty(Bt, "__esModule", { value: !0 });
3078
+ Bt.testnet = Bt.bitcoin = void 0;
3079
+ Bt.bitcoin = {
3080
3080
  messagePrefix: `Bitcoin Signed Message:
3081
3081
  `,
3082
3082
  bech32: "bc",
@@ -3088,7 +3088,7 @@ Et.bitcoin = {
3088
3088
  scriptHash: 5,
3089
3089
  wif: 128
3090
3090
  };
3091
- Et.testnet = {
3091
+ Bt.testnet = {
3092
3092
  messagePrefix: `Bitcoin Signed Message:
3093
3093
  `,
3094
3094
  bech32: "tb",
@@ -3138,7 +3138,7 @@ function Zi(e) {
3138
3138
  function Bn(e) {
3139
3139
  return it.Nil(e) ? "" : Zi(e.constructor);
3140
3140
  }
3141
- function nf(e) {
3141
+ function sf(e) {
3142
3142
  return it.Function(e) ? "" : it.String(e) ? JSON.stringify(e) : e && it.Object(e) ? "" : e;
3143
3143
  }
3144
3144
  function Sn(e, t) {
@@ -3148,7 +3148,7 @@ function br(e) {
3148
3148
  return it.Function(e) ? e.toJSON ? e.toJSON() : Zi(e) : it.Array(e) ? "Array" : e && it.Object(e) ? "Object" : e !== void 0 ? e : "";
3149
3149
  }
3150
3150
  function es(e, t, r) {
3151
- var n = nf(t);
3151
+ var n = sf(t);
3152
3152
  return "Expected " + br(e) + ", got" + (r !== "" ? " " + r : "") + (n !== "" ? " " + n : "");
3153
3153
  }
3154
3154
  function He(e, t, r) {
@@ -3156,26 +3156,26 @@ function He(e, t, r) {
3156
3156
  }
3157
3157
  He.prototype = Object.create(Error.prototype);
3158
3158
  He.prototype.constructor = He;
3159
- function sf(e, t, r, n, i) {
3159
+ function of(e, t, r, n, i) {
3160
3160
  var a = '" of type ';
3161
3161
  return t === "key" && (a = '" with key type '), es('property "' + br(r) + a + br(e), n, i);
3162
3162
  }
3163
- function mt(e, t, r, n, i) {
3164
- e ? (i = i || Bn(n), this.message = sf(e, r, t, n, i)) : this.message = 'Unexpected property "' + t + '"', Sn(this, He), this.__label = r, this.__property = t, this.__type = e, this.__value = n, this.__valueTypeName = i;
3163
+ function wt(e, t, r, n, i) {
3164
+ e ? (i = i || Bn(n), this.message = of(e, r, t, n, i)) : this.message = 'Unexpected property "' + t + '"', Sn(this, He), this.__label = r, this.__property = t, this.__type = e, this.__value = n, this.__valueTypeName = i;
3165
3165
  }
3166
- mt.prototype = Object.create(Error.prototype);
3167
- mt.prototype.constructor = He;
3168
- function of(e, t) {
3166
+ wt.prototype = Object.create(Error.prototype);
3167
+ wt.prototype.constructor = He;
3168
+ function af(e, t) {
3169
3169
  return new He(e, {}, t);
3170
3170
  }
3171
- function af(e, t, r) {
3172
- return e instanceof mt ? (t = t + "." + e.__property, e = new mt(
3171
+ function ff(e, t, r) {
3172
+ return e instanceof wt ? (t = t + "." + e.__property, e = new wt(
3173
3173
  e.__type,
3174
3174
  t,
3175
3175
  e.__label,
3176
3176
  e.__value,
3177
3177
  e.__valueTypeName
3178
- )) : e instanceof He && (e = new mt(
3178
+ )) : e instanceof He && (e = new wt(
3179
3179
  e.__type,
3180
3180
  t,
3181
3181
  r,
@@ -3185,13 +3185,13 @@ function af(e, t, r) {
3185
3185
  }
3186
3186
  var ts = {
3187
3187
  TfTypeError: He,
3188
- TfPropertyTypeError: mt,
3189
- tfCustomError: of,
3190
- tfSubError: af,
3188
+ TfPropertyTypeError: wt,
3189
+ tfCustomError: af,
3190
+ tfSubError: ff,
3191
3191
  tfJSON: br,
3192
3192
  getValueTypeName: Bn
3193
3193
  }, Nr, Xn;
3194
- function ff() {
3194
+ function uf() {
3195
3195
  if (Xn) return Nr;
3196
3196
  Xn = 1;
3197
3197
  var e = En, t = ts;
@@ -3202,24 +3202,24 @@ function ff() {
3202
3202
  return typeof S == "string" && /^([0-9a-f]{2})+$/i.test(S);
3203
3203
  }
3204
3204
  function i(S, z) {
3205
- var M = S.toJSON();
3205
+ var N = S.toJSON();
3206
3206
  function $(se) {
3207
3207
  if (!S(se)) return !1;
3208
3208
  if (se.length === z) return !0;
3209
- throw t.tfCustomError(M + "(Length: " + z + ")", M + "(Length: " + se.length + ")");
3209
+ throw t.tfCustomError(N + "(Length: " + z + ")", N + "(Length: " + se.length + ")");
3210
3210
  }
3211
3211
  return $.toJSON = function() {
3212
- return M;
3212
+ return N;
3213
3213
  }, $;
3214
3214
  }
3215
3215
  var a = i.bind(null, e.Array), f = i.bind(null, r), u = i.bind(null, n), l = i.bind(null, e.String);
3216
- function y(S, z, M) {
3217
- M = M || e.Number;
3216
+ function y(S, z, N) {
3217
+ N = N || e.Number;
3218
3218
  function $(se, Te) {
3219
- return M(se, Te) && se > S && se < z;
3219
+ return N(se, Te) && se > S && se < z;
3220
3220
  }
3221
3221
  return $.toJSON = function() {
3222
- return `${M.toJSON()} between [${S}, ${z}]`;
3222
+ return `${N.toJSON()} between [${S}, ${z}]`;
3223
3223
  }, $;
3224
3224
  }
3225
3225
  var g = Math.pow(2, 53) - 1;
@@ -3274,7 +3274,7 @@ function ff() {
3274
3274
  }).bind(null, U);
3275
3275
  return Nr = L, Nr;
3276
3276
  }
3277
- var Jt = ts, ce = En, De = Jt.tfJSON, rs = Jt.TfTypeError, ns = Jt.TfPropertyTypeError, Ot = Jt.tfSubError, uf = Jt.getValueTypeName, $e = {
3277
+ var Jt = ts, ce = En, De = Jt.tfJSON, rs = Jt.TfTypeError, ns = Jt.TfPropertyTypeError, Mt = Jt.tfSubError, cf = Jt.getValueTypeName, $e = {
3278
3278
  arrayOf: function(t, r) {
3279
3279
  t = Ue(t), r = r || {};
3280
3280
  function n(i, a) {
@@ -3282,7 +3282,7 @@ var Jt = ts, ce = En, De = Jt.tfJSON, rs = Jt.TfTypeError, ns = Jt.TfPropertyTyp
3282
3282
  try {
3283
3283
  return _e(t, f, a);
3284
3284
  } catch (l) {
3285
- throw Ot(l, u);
3285
+ throw Mt(l, u);
3286
3286
  }
3287
3287
  });
3288
3288
  }
@@ -3308,13 +3308,13 @@ var Jt = ts, ce = En, De = Jt.tfJSON, rs = Jt.TfTypeError, ns = Jt.TfPropertyTyp
3308
3308
  try {
3309
3309
  r && _e(r, f, a);
3310
3310
  } catch (l) {
3311
- throw Ot(l, f, "key");
3311
+ throw Mt(l, f, "key");
3312
3312
  }
3313
3313
  try {
3314
3314
  var u = i[f];
3315
3315
  _e(t, u, a);
3316
3316
  } catch (l) {
3317
- throw Ot(l, f);
3317
+ throw Mt(l, f);
3318
3318
  }
3319
3319
  }
3320
3320
  return !0;
@@ -3338,7 +3338,7 @@ var Jt = ts, ce = En, De = Jt.tfJSON, rs = Jt.TfTypeError, ns = Jt.TfPropertyTyp
3338
3338
  _e(l, y, f);
3339
3339
  }
3340
3340
  } catch (g) {
3341
- throw Ot(g, u);
3341
+ throw Mt(g, u);
3342
3342
  }
3343
3343
  if (f) {
3344
3344
  for (u in a)
@@ -3383,7 +3383,7 @@ var Jt = ts, ce = En, De = Jt.tfJSON, rs = Jt.TfTypeError, ns = Jt.TfPropertyTyp
3383
3383
  },
3384
3384
  quacksLike: function(t) {
3385
3385
  function r(n) {
3386
- return t === uf(n);
3386
+ return t === cf(n);
3387
3387
  }
3388
3388
  return r.toJSON = function() {
3389
3389
  return t;
@@ -3396,7 +3396,7 @@ var Jt = ts, ce = En, De = Jt.tfJSON, rs = Jt.TfTypeError, ns = Jt.TfPropertyTyp
3396
3396
  try {
3397
3397
  return _e(a, n[f], i);
3398
3398
  } catch (u) {
3399
- throw Ot(u, f);
3399
+ throw Mt(u, f);
3400
3400
  }
3401
3401
  });
3402
3402
  }
@@ -3438,15 +3438,15 @@ for (var Je in ce)
3438
3438
  _e[Je] = ce[Je];
3439
3439
  for (Je in $e)
3440
3440
  _e[Je] = $e[Je];
3441
- var Qn = ff();
3441
+ var Qn = uf();
3442
3442
  for (Je in Qn)
3443
3443
  _e[Je] = Qn[Je];
3444
3444
  _e.compile = Ue;
3445
3445
  _e.TfTypeError = rs;
3446
3446
  _e.TfPropertyTypeError = ns;
3447
- var cf = _e;
3447
+ var lf = _e;
3448
3448
  (function(e) {
3449
- Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = cf, e.Network = e.typeforce.compile({
3449
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = lf, e.Network = e.typeforce.compile({
3450
3450
  messagePrefix: e.typeforce.oneOf(
3451
3451
  e.typeforce.Buffer,
3452
3452
  e.typeforce.String
@@ -3460,12 +3460,12 @@ var cf = _e;
3460
3460
  wif: e.typeforce.UInt8
3461
3461
  }), e.Buffer256bit = e.typeforce.BufferN(32), e.Array = e.typeforce.Array, e.Boolean = e.typeforce.Boolean, e.maybe = e.typeforce.maybe;
3462
3462
  })(Qi);
3463
- var sn = { exports: {} }, on = { exports: {} }, At = {}, vr = {};
3464
- vr.byteLength = df;
3465
- vr.toByteArray = bf;
3466
- vr.fromByteArray = mf;
3467
- var Oe = [], Ae = [], lf = typeof Uint8Array < "u" ? Uint8Array : Array, Dr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
3468
- for (var yt = 0, hf = Dr.length; yt < hf; ++yt)
3463
+ var sn = { exports: {} }, on = { exports: {} }, Rt = {}, vr = {};
3464
+ vr.byteLength = pf;
3465
+ vr.toByteArray = yf;
3466
+ vr.fromByteArray = wf;
3467
+ var Oe = [], Ae = [], hf = typeof Uint8Array < "u" ? Uint8Array : Array, Dr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
3468
+ for (var yt = 0, df = Dr.length; yt < df; ++yt)
3469
3469
  Oe[yt] = Dr[yt], Ae[Dr.charCodeAt(yt)] = yt;
3470
3470
  Ae[45] = 62;
3471
3471
  Ae[95] = 63;
@@ -3478,30 +3478,30 @@ function is(e) {
3478
3478
  var n = r === t ? 0 : 4 - r % 4;
3479
3479
  return [r, n];
3480
3480
  }
3481
- function df(e) {
3481
+ function pf(e) {
3482
3482
  var t = is(e), r = t[0], n = t[1];
3483
3483
  return (r + n) * 3 / 4 - n;
3484
3484
  }
3485
- function pf(e, t, r) {
3485
+ function bf(e, t, r) {
3486
3486
  return (t + r) * 3 / 4 - r;
3487
3487
  }
3488
- function bf(e) {
3489
- var t, r = is(e), n = r[0], i = r[1], a = new lf(pf(e, n, i)), f = 0, u = i > 0 ? n - 4 : n, l;
3488
+ function yf(e) {
3489
+ var t, r = is(e), n = r[0], i = r[1], a = new hf(bf(e, n, i)), f = 0, u = i > 0 ? n - 4 : n, l;
3490
3490
  for (l = 0; l < u; l += 4)
3491
3491
  t = Ae[e.charCodeAt(l)] << 18 | Ae[e.charCodeAt(l + 1)] << 12 | Ae[e.charCodeAt(l + 2)] << 6 | Ae[e.charCodeAt(l + 3)], a[f++] = t >> 16 & 255, a[f++] = t >> 8 & 255, a[f++] = t & 255;
3492
3492
  return i === 2 && (t = Ae[e.charCodeAt(l)] << 2 | Ae[e.charCodeAt(l + 1)] >> 4, a[f++] = t & 255), i === 1 && (t = Ae[e.charCodeAt(l)] << 10 | Ae[e.charCodeAt(l + 1)] << 4 | Ae[e.charCodeAt(l + 2)] >> 2, a[f++] = t >> 8 & 255, a[f++] = t & 255), a;
3493
3493
  }
3494
- function yf(e) {
3494
+ function gf(e) {
3495
3495
  return Oe[e >> 18 & 63] + Oe[e >> 12 & 63] + Oe[e >> 6 & 63] + Oe[e & 63];
3496
3496
  }
3497
- function gf(e, t, r) {
3497
+ function mf(e, t, r) {
3498
3498
  for (var n, i = [], a = t; a < r; a += 3)
3499
- n = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(yf(n));
3499
+ n = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(gf(n));
3500
3500
  return i.join("");
3501
3501
  }
3502
- function mf(e) {
3502
+ function wf(e) {
3503
3503
  for (var t, r = e.length, n = r % 3, i = [], a = 16383, f = 0, u = r - n; f < u; f += a)
3504
- i.push(gf(e, f, f + a > u ? u : f + a));
3504
+ i.push(mf(e, f, f + a > u ? u : f + a));
3505
3505
  return n === 1 ? (t = e[r - 1], i.push(
3506
3506
  Oe[t >> 2] + Oe[t << 4 & 63] + "=="
3507
3507
  )) : n === 2 && (t = (e[r - 2] << 8) + e[r - 1], i.push(
@@ -3770,7 +3770,7 @@ In.write = function(e, t, r, n, i, a) {
3770
3770
  case "hex":
3771
3771
  return o >>> 1;
3772
3772
  case "base64":
3773
- return Tt(c).length;
3773
+ return Pt(c).length;
3774
3774
  default:
3775
3775
  if (b)
3776
3776
  return h ? -1 : V(c).length;
@@ -3916,7 +3916,7 @@ In.write = function(e, t, r, n, i, a) {
3916
3916
  }, u.prototype.lastIndexOf = function(s, o, h) {
3917
3917
  return S(this, s, o, h, !1);
3918
3918
  };
3919
- function M(c, s, o, h) {
3919
+ function N(c, s, o, h) {
3920
3920
  o = Number(o) || 0;
3921
3921
  const b = c.length - o;
3922
3922
  h ? (h = Number(h), h > b && (h = b)) : h = b;
@@ -3937,7 +3937,7 @@ In.write = function(e, t, r, n, i, a) {
3937
3937
  return dt(Ve(s), c, o, h);
3938
3938
  }
3939
3939
  function Te(c, s, o, h) {
3940
- return dt(Tt(s), c, o, h);
3940
+ return dt(Pt(s), c, o, h);
3941
3941
  }
3942
3942
  function Ge(c, s, o, h) {
3943
3943
  return dt(ht(s, c.length - o), c, o, h);
@@ -3961,7 +3961,7 @@ In.write = function(e, t, r, n, i, a) {
3961
3961
  for (; ; )
3962
3962
  switch (b) {
3963
3963
  case "hex":
3964
- return M(this, s, o, h);
3964
+ return N(this, s, o, h);
3965
3965
  case "utf8":
3966
3966
  case "utf-8":
3967
3967
  return $(this, s, o, h);
@@ -4048,7 +4048,7 @@ In.write = function(e, t, r, n, i, a) {
4048
4048
  (!s || s < 0) && (s = 0), (!o || o < 0 || o > h) && (o = h);
4049
4049
  let b = "";
4050
4050
  for (let x = s; x < o; ++x)
4051
- b += Pt[c[x]];
4051
+ b += Ct[c[x]];
4052
4052
  return b;
4053
4053
  }
4054
4054
  function We(c, s, o) {
@@ -4298,7 +4298,7 @@ In.write = function(e, t, r, n, i, a) {
4298
4298
  return this;
4299
4299
  };
4300
4300
  const R = {};
4301
- function N(c, s, o) {
4301
+ function D(c, s, o) {
4302
4302
  R[c] = class extends o {
4303
4303
  constructor() {
4304
4304
  super(), Object.defineProperty(this, "message", {
@@ -4323,19 +4323,19 @@ In.write = function(e, t, r, n, i, a) {
4323
4323
  }
4324
4324
  };
4325
4325
  }
4326
- N(
4326
+ D(
4327
4327
  "ERR_BUFFER_OUT_OF_BOUNDS",
4328
4328
  function(c) {
4329
4329
  return c ? `${c} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
4330
4330
  },
4331
4331
  RangeError
4332
- ), N(
4332
+ ), D(
4333
4333
  "ERR_INVALID_ARG_TYPE",
4334
4334
  function(c, s) {
4335
4335
  return `The "${c}" argument must be of type number. Received type ${typeof s}`;
4336
4336
  },
4337
4337
  TypeError
4338
- ), N(
4338
+ ), D(
4339
4339
  "ERR_OUT_OF_RANGE",
4340
4340
  function(c, s, o) {
4341
4341
  let h = `The value of "${c}" is out of range.`, b = o;
@@ -4446,7 +4446,7 @@ In.write = function(e, t, r, n, i, a) {
4446
4446
  o = c.charCodeAt(B), h = o >> 8, b = o % 256, x.push(b), x.push(h);
4447
4447
  return x;
4448
4448
  }
4449
- function Tt(c) {
4449
+ function Pt(c) {
4450
4450
  return t.toByteArray(j(c));
4451
4451
  }
4452
4452
  function dt(c, s, o, h) {
@@ -4461,7 +4461,7 @@ In.write = function(e, t, r, n, i, a) {
4461
4461
  function tt(c) {
4462
4462
  return c !== c;
4463
4463
  }
4464
- const Pt = function() {
4464
+ const Ct = function() {
4465
4465
  const c = "0123456789abcdef", s = new Array(256);
4466
4466
  for (let o = 0; o < 16; ++o) {
4467
4467
  const h = o * 16;
@@ -4476,10 +4476,10 @@ In.write = function(e, t, r, n, i, a) {
4476
4476
  function rt() {
4477
4477
  throw new Error("BigInt not supported");
4478
4478
  }
4479
- })(At);
4479
+ })(Rt);
4480
4480
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
4481
4481
  (function(e, t) {
4482
- var r = At, n = r.Buffer;
4482
+ var r = Rt, n = r.Buffer;
4483
4483
  function i(f, u) {
4484
4484
  for (var l in f)
4485
4485
  u[l] = f[l];
@@ -4507,16 +4507,16 @@ In.write = function(e, t, r, n, i, a) {
4507
4507
  return r.SlowBuffer(f);
4508
4508
  };
4509
4509
  })(on, on.exports);
4510
- var Ee = on.exports, $r = 65536, wf = 4294967295;
4511
- function _f() {
4510
+ var Ee = on.exports, $r = 65536, _f = 4294967295;
4511
+ function xf() {
4512
4512
  throw new Error(`Secure random number generation is not supported by this browser.
4513
4513
  Use Chrome, Firefox or Internet Explorer 11`);
4514
4514
  }
4515
- var xf = Ee.Buffer, yr = Xe.crypto || Xe.msCrypto;
4516
- yr && yr.getRandomValues ? sn.exports = vf : sn.exports = _f;
4517
- function vf(e, t) {
4518
- if (e > wf) throw new RangeError("requested too many random bytes");
4519
- var r = xf.allocUnsafe(e);
4515
+ var vf = Ee.Buffer, yr = Xe.crypto || Xe.msCrypto;
4516
+ yr && yr.getRandomValues ? sn.exports = Ef : sn.exports = xf;
4517
+ function Ef(e, t) {
4518
+ if (e > _f) throw new RangeError("requested too many random bytes");
4519
+ var r = vf.allocUnsafe(e);
4520
4520
  if (e > 0)
4521
4521
  if (e > $r)
4522
4522
  for (var n = 0; n < e; n += $r)
@@ -4527,7 +4527,7 @@ function vf(e, t) {
4527
4527
  t(null, r);
4528
4528
  }) : r;
4529
4529
  }
4530
- var Ef = sn.exports, an = { exports: {} };
4530
+ var Bf = sn.exports, an = { exports: {} };
4531
4531
  typeof Object.create == "function" ? an.exports = function(t, r) {
4532
4532
  r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
4533
4533
  constructor: {
@@ -4545,15 +4545,15 @@ typeof Object.create == "function" ? an.exports = function(t, r) {
4545
4545
  n.prototype = r.prototype, t.prototype = new n(), t.prototype.constructor = t;
4546
4546
  }
4547
4547
  };
4548
- var ge = an.exports, fn = { exports: {} }, An = { exports: {} }, wt = typeof Reflect == "object" ? Reflect : null, Zn = wt && typeof wt.apply == "function" ? wt.apply : function(t, r, n) {
4548
+ var ge = an.exports, fn = { exports: {} }, An = { exports: {} }, _t = typeof Reflect == "object" ? Reflect : null, Zn = _t && typeof _t.apply == "function" ? _t.apply : function(t, r, n) {
4549
4549
  return Function.prototype.apply.call(t, r, n);
4550
4550
  }, ur;
4551
- wt && typeof wt.ownKeys == "function" ? ur = wt.ownKeys : Object.getOwnPropertySymbols ? ur = function(t) {
4551
+ _t && typeof _t.ownKeys == "function" ? ur = _t.ownKeys : Object.getOwnPropertySymbols ? ur = function(t) {
4552
4552
  return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
4553
4553
  } : ur = function(t) {
4554
4554
  return Object.getOwnPropertyNames(t);
4555
4555
  };
4556
- function Bf(e) {
4556
+ function Sf(e) {
4557
4557
  console && console.warn && console.warn(e);
4558
4558
  }
4559
4559
  var ss = Number.isNaN || function(t) {
@@ -4563,7 +4563,7 @@ function K() {
4563
4563
  K.init.call(this);
4564
4564
  }
4565
4565
  An.exports = K;
4566
- An.exports.once = Rf;
4566
+ An.exports.once = Tf;
4567
4567
  K.EventEmitter = K;
4568
4568
  K.prototype._events = void 0;
4569
4569
  K.prototype._eventsCount = 0;
@@ -4633,7 +4633,7 @@ function as(e, t, r, n) {
4633
4633
  else if (typeof f == "function" ? f = a[t] = n ? [r, f] : [f, r] : n ? f.unshift(r) : f.push(r), i = os(e), i > 0 && f.length > i && !f.warned) {
4634
4634
  f.warned = !0;
4635
4635
  var u = new Error("Possible EventEmitter memory leak detected. " + f.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
4636
- u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = f.length, Bf(u);
4636
+ u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = f.length, Sf(u);
4637
4637
  }
4638
4638
  return e;
4639
4639
  }
@@ -4644,12 +4644,12 @@ K.prototype.on = K.prototype.addListener;
4644
4644
  K.prototype.prependListener = function(t, r) {
4645
4645
  return as(this, t, r, !0);
4646
4646
  };
4647
- function Sf() {
4647
+ function If() {
4648
4648
  if (!this.fired)
4649
4649
  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);
4650
4650
  }
4651
4651
  function fs(e, t, r) {
4652
- var n = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, i = Sf.bind(n);
4652
+ var n = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, i = If.bind(n);
4653
4653
  return i.listener = r, n.wrapFn = i, i;
4654
4654
  }
4655
4655
  K.prototype.once = function(t, r) {
@@ -4674,7 +4674,7 @@ K.prototype.removeListener = function(t, r) {
4674
4674
  }
4675
4675
  if (a < 0)
4676
4676
  return this;
4677
- a === 0 ? n.shift() : If(n, a), n.length === 1 && (i[t] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", t, u || r);
4677
+ a === 0 ? n.shift() : Af(n, a), n.length === 1 && (i[t] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", t, u || r);
4678
4678
  }
4679
4679
  return this;
4680
4680
  };
@@ -4703,7 +4703,7 @@ function us(e, t, r) {
4703
4703
  if (n === void 0)
4704
4704
  return [];
4705
4705
  var i = n[t];
4706
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Af(i) : ls(i, i.length);
4706
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Rf(i) : ls(i, i.length);
4707
4707
  }
4708
4708
  K.prototype.listeners = function(t) {
4709
4709
  return us(this, t, !0);
@@ -4734,17 +4734,17 @@ function ls(e, t) {
4734
4734
  r[n] = e[n];
4735
4735
  return r;
4736
4736
  }
4737
- function If(e, t) {
4737
+ function Af(e, t) {
4738
4738
  for (; t + 1 < e.length; t++)
4739
4739
  e[t] = e[t + 1];
4740
4740
  e.pop();
4741
4741
  }
4742
- function Af(e) {
4742
+ function Rf(e) {
4743
4743
  for (var t = new Array(e.length), r = 0; r < t.length; ++r)
4744
4744
  t[r] = e[r].listener || e[r];
4745
4745
  return t;
4746
4746
  }
4747
- function Rf(e, t) {
4747
+ function Tf(e, t) {
4748
4748
  return new Promise(function(r, n) {
4749
4749
  function i(f) {
4750
4750
  e.removeListener(t, a), n(f);
@@ -4752,10 +4752,10 @@ function Rf(e, t) {
4752
4752
  function a() {
4753
4753
  typeof e.removeListener == "function" && e.removeListener("error", i), r([].slice.call(arguments));
4754
4754
  }
4755
- hs(e, t, a, { once: !0 }), t !== "error" && Tf(e, i, { once: !0 });
4755
+ hs(e, t, a, { once: !0 }), t !== "error" && Pf(e, i, { once: !0 });
4756
4756
  });
4757
4757
  }
4758
- function Tf(e, t, r) {
4758
+ function Pf(e, t, r) {
4759
4759
  typeof e.on == "function" && hs(e, "error", t, r);
4760
4760
  }
4761
4761
  function hs(e, t, r, n) {
@@ -4769,12 +4769,12 @@ function hs(e, t, r, n) {
4769
4769
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
4770
4770
  }
4771
4771
  var ds = An.exports, ps = ds.EventEmitter;
4772
- const Pf = {}, Cf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4772
+ const Cf = {}, Lf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4773
4773
  __proto__: null,
4774
- default: Pf
4775
- }, Symbol.toStringTag, { value: "Module" })), Rn = /* @__PURE__ */ rf(Cf);
4774
+ default: Cf
4775
+ }, Symbol.toStringTag, { value: "Module" })), Rn = /* @__PURE__ */ nf(Lf);
4776
4776
  var Hr, ti;
4777
- function Lf() {
4777
+ function kf() {
4778
4778
  if (ti) return Hr;
4779
4779
  ti = 1;
4780
4780
  function e(v, P) {
@@ -4828,7 +4828,7 @@ function Lf() {
4828
4828
  }
4829
4829
  return (P === "string" ? String : Number)(v);
4830
4830
  }
4831
- var l = At, y = l.Buffer, g = Rn, w = g.inspect, E = w && w.custom || "inspect";
4831
+ var l = Rt, y = l.Buffer, g = Rn, w = g.inspect, E = w && w.custom || "inspect";
4832
4832
  function I(v, P, T) {
4833
4833
  y.prototype.copy.call(v, P, T);
4834
4834
  }
@@ -4938,7 +4938,7 @@ function Lf() {
4938
4938
  }]), v;
4939
4939
  }(), Hr;
4940
4940
  }
4941
- function kf(e, t) {
4941
+ function Ff(e, t) {
4942
4942
  var r = this, n = this._readableState && this._readableState.destroyed, i = this._writableState && this._writableState.destroyed;
4943
4943
  return n || i ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.nextTick(un, this, e)) : process.nextTick(un, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(a) {
4944
4944
  !t && a ? r._writableState ? r._writableState.errorEmitted ? process.nextTick(cr, r) : (r._writableState.errorEmitted = !0, process.nextTick(ri, r, a)) : process.nextTick(ri, r, a) : t ? (process.nextTick(cr, r), t(a)) : process.nextTick(cr, r);
@@ -4950,22 +4950,22 @@ function ri(e, t) {
4950
4950
  function cr(e) {
4951
4951
  e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
4952
4952
  }
4953
- function Ff() {
4953
+ function Uf() {
4954
4954
  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);
4955
4955
  }
4956
4956
  function un(e, t) {
4957
4957
  e.emit("error", t);
4958
4958
  }
4959
- function Uf(e, t) {
4959
+ function Of(e, t) {
4960
4960
  var r = e._readableState, n = e._writableState;
4961
4961
  r && r.autoDestroy || n && n.autoDestroy ? e.destroy(t) : e.emit("error", t);
4962
4962
  }
4963
4963
  var bs = {
4964
- destroy: kf,
4965
- undestroy: Ff,
4966
- errorOrDestroy: Uf
4964
+ destroy: Ff,
4965
+ undestroy: Uf,
4966
+ errorOrDestroy: Of
4967
4967
  }, ct = {};
4968
- function Of(e, t) {
4968
+ function Mf(e, t) {
4969
4969
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
4970
4970
  }
4971
4971
  var ys = {};
@@ -4975,7 +4975,7 @@ function Re(e, t, r) {
4975
4975
  return typeof t == "string" ? t : t(a, f, u);
4976
4976
  }
4977
4977
  var i = /* @__PURE__ */ function(a) {
4978
- Of(f, a);
4978
+ Mf(f, a);
4979
4979
  function f(u, l, y) {
4980
4980
  return a.call(this, n(u, l, y)) || this;
4981
4981
  }
@@ -4992,13 +4992,13 @@ function ni(e, t) {
4992
4992
  } else
4993
4993
  return "of ".concat(t, " ").concat(String(e));
4994
4994
  }
4995
- function Mf(e, t, r) {
4995
+ function Nf(e, t, r) {
4996
4996
  return e.substr(0, t.length) === t;
4997
4997
  }
4998
- function Nf(e, t, r) {
4998
+ function Df(e, t, r) {
4999
4999
  return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
5000
5000
  }
5001
- function Df(e, t, r) {
5001
+ function $f(e, t, r) {
5002
5002
  return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
5003
5003
  }
5004
5004
  Re("ERR_INVALID_OPT_VALUE", function(e, t) {
@@ -5006,12 +5006,12 @@ Re("ERR_INVALID_OPT_VALUE", function(e, t) {
5006
5006
  }, TypeError);
5007
5007
  Re("ERR_INVALID_ARG_TYPE", function(e, t, r) {
5008
5008
  var n;
5009
- typeof t == "string" && Mf(t, "not ") ? (n = "must not be", t = t.replace(/^not /, "")) : n = "must be";
5009
+ typeof t == "string" && Nf(t, "not ") ? (n = "must not be", t = t.replace(/^not /, "")) : n = "must be";
5010
5010
  var i;
5011
- if (Nf(e, " argument"))
5011
+ if (Df(e, " argument"))
5012
5012
  i = "The ".concat(e, " ").concat(n, " ").concat(ni(t, "type"));
5013
5013
  else {
5014
- var a = Df(e, ".") ? "property" : "argument";
5014
+ var a = $f(e, ".") ? "property" : "argument";
5015
5015
  i = 'The "'.concat(e, '" ').concat(a, " ").concat(n, " ").concat(ni(t, "type"));
5016
5016
  }
5017
5017
  return i += ". Received type ".concat(typeof r), i;
@@ -5033,25 +5033,25 @@ Re("ERR_UNKNOWN_ENCODING", function(e) {
5033
5033
  }, TypeError);
5034
5034
  Re("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
5035
5035
  ct.codes = ys;
5036
- var $f = ct.codes.ERR_INVALID_OPT_VALUE;
5037
- function Hf(e, t, r) {
5036
+ var Hf = ct.codes.ERR_INVALID_OPT_VALUE;
5037
+ function zf(e, t, r) {
5038
5038
  return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
5039
5039
  }
5040
- function zf(e, t, r, n) {
5041
- var i = Hf(t, n, r);
5040
+ function Gf(e, t, r, n) {
5041
+ var i = zf(t, n, r);
5042
5042
  if (i != null) {
5043
5043
  if (!(isFinite(i) && Math.floor(i) === i) || i < 0) {
5044
5044
  var a = n ? r : "highWaterMark";
5045
- throw new $f(a, i);
5045
+ throw new Hf(a, i);
5046
5046
  }
5047
5047
  return Math.floor(i);
5048
5048
  }
5049
5049
  return e.objectMode ? 16 : 16 * 1024;
5050
5050
  }
5051
5051
  var gs = {
5052
- getHighWaterMark: zf
5053
- }, Gf = jf;
5054
- function jf(e, t) {
5052
+ getHighWaterMark: Gf
5053
+ }, jf = Wf;
5054
+ function Wf(e, t) {
5055
5055
  if (zr("noDeprecation"))
5056
5056
  return e;
5057
5057
  var r = !1;
@@ -5077,7 +5077,7 @@ function zr(e) {
5077
5077
  var Gr, ii;
5078
5078
  function ms() {
5079
5079
  if (ii) return Gr;
5080
- ii = 1, Gr = M;
5080
+ ii = 1, Gr = N;
5081
5081
  function e(_) {
5082
5082
  var m = this;
5083
5083
  this.next = null, this.entry = null, this.finish = function() {
@@ -5085,10 +5085,10 @@ function ms() {
5085
5085
  };
5086
5086
  }
5087
5087
  var t;
5088
- M.WritableState = S;
5088
+ N.WritableState = S;
5089
5089
  var r = {
5090
- deprecate: Gf
5091
- }, n = ps, i = At.Buffer, a = (typeof Xe < "u" ? Xe : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
5090
+ deprecate: jf
5091
+ }, n = ps, i = Rt.Buffer, a = (typeof Xe < "u" ? Xe : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
5092
5092
  };
5093
5093
  function f(_) {
5094
5094
  return i.from(_);
@@ -5097,13 +5097,13 @@ function ms() {
5097
5097
  return i.isBuffer(_) || _ instanceof a;
5098
5098
  }
5099
5099
  var l = bs, y = gs, g = y.getHighWaterMark, w = ct.codes, E = w.ERR_INVALID_ARG_TYPE, I = w.ERR_METHOD_NOT_IMPLEMENTED, v = w.ERR_MULTIPLE_CALLBACK, P = w.ERR_STREAM_CANNOT_PIPE, T = w.ERR_STREAM_DESTROYED, C = w.ERR_STREAM_NULL_VALUES, F = w.ERR_STREAM_WRITE_AFTER_END, k = w.ERR_UNKNOWN_ENCODING, L = l.errorOrDestroy;
5100
- ge(M, n);
5100
+ ge(N, n);
5101
5101
  function U() {
5102
5102
  }
5103
5103
  function S(_, m, R) {
5104
- t = t || Bt(), _ = _ || {}, typeof R != "boolean" && (R = m instanceof t), this.objectMode = !!_.objectMode, R && (this.objectMode = this.objectMode || !!_.writableObjectMode), this.highWaterMark = g(this, _, "writableHighWaterMark", R), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
5105
- var N = _.decodeStrings === !1;
5106
- this.decodeStrings = !N, this.defaultEncoding = _.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(G) {
5104
+ t = t || St(), _ = _ || {}, typeof R != "boolean" && (R = m instanceof t), this.objectMode = !!_.objectMode, R && (this.objectMode = this.objectMode || !!_.writableObjectMode), this.highWaterMark = g(this, _, "writableHighWaterMark", R), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
5105
+ var D = _.decodeStrings === !1;
5106
+ 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(G) {
5107
5107
  et(m, G);
5108
5108
  }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = _.emitClose !== !1, this.autoDestroy = !!_.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new e(this);
5109
5109
  }
@@ -5122,42 +5122,42 @@ function ms() {
5122
5122
  }
5123
5123
  }();
5124
5124
  var z;
5125
- typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (z = Function.prototype[Symbol.hasInstance], Object.defineProperty(M, Symbol.hasInstance, {
5125
+ typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (z = Function.prototype[Symbol.hasInstance], Object.defineProperty(N, Symbol.hasInstance, {
5126
5126
  value: function(m) {
5127
- return z.call(this, m) ? !0 : this !== M ? !1 : m && m._writableState instanceof S;
5127
+ return z.call(this, m) ? !0 : this !== N ? !1 : m && m._writableState instanceof S;
5128
5128
  }
5129
5129
  })) : z = function(m) {
5130
5130
  return m instanceof this;
5131
5131
  };
5132
- function M(_) {
5133
- t = t || Bt();
5132
+ function N(_) {
5133
+ t = t || St();
5134
5134
  var m = this instanceof t;
5135
- if (!m && !z.call(M, this)) return new M(_);
5135
+ if (!m && !z.call(N, this)) return new N(_);
5136
5136
  this._writableState = new S(_, this, m), 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)), n.call(this);
5137
5137
  }
5138
- M.prototype.pipe = function() {
5138
+ N.prototype.pipe = function() {
5139
5139
  L(this, new P());
5140
5140
  };
5141
5141
  function $(_, m) {
5142
5142
  var R = new F();
5143
5143
  L(_, R), process.nextTick(m, R);
5144
5144
  }
5145
- function se(_, m, R, N) {
5145
+ function se(_, m, R, D) {
5146
5146
  var G;
5147
- return R === null ? G = new C() : typeof R != "string" && !m.objectMode && (G = new E("chunk", ["string", "Buffer"], R)), G ? (L(_, G), process.nextTick(N, G), !1) : !0;
5147
+ return R === null ? G = new C() : typeof R != "string" && !m.objectMode && (G = new E("chunk", ["string", "Buffer"], R)), G ? (L(_, G), process.nextTick(D, G), !1) : !0;
5148
5148
  }
5149
- M.prototype.write = function(_, m, R) {
5150
- var N = this._writableState, G = !1, d = !N.objectMode && u(_);
5151
- return d && !i.isBuffer(_) && (_ = f(_)), typeof m == "function" && (R = m, m = null), d ? m = "buffer" : m || (m = N.defaultEncoding), typeof R != "function" && (R = U), N.ending ? $(this, R) : (d || se(this, N, _, R)) && (N.pendingcb++, G = Ge(this, N, d, _, m, R)), G;
5152
- }, M.prototype.cork = function() {
5149
+ N.prototype.write = function(_, m, R) {
5150
+ var D = this._writableState, G = !1, d = !D.objectMode && u(_);
5151
+ return d && !i.isBuffer(_) && (_ = f(_)), typeof m == "function" && (R = m, m = null), d ? m = "buffer" : m || (m = D.defaultEncoding), typeof R != "function" && (R = U), D.ending ? $(this, R) : (d || se(this, D, _, R)) && (D.pendingcb++, G = Ge(this, D, d, _, m, R)), G;
5152
+ }, N.prototype.cork = function() {
5153
5153
  this._writableState.corked++;
5154
- }, M.prototype.uncork = function() {
5154
+ }, N.prototype.uncork = function() {
5155
5155
  var _ = this._writableState;
5156
5156
  _.corked && (_.corked--, !_.writing && !_.corked && !_.bufferProcessing && _.bufferedRequest && Ce(this, _));
5157
- }, M.prototype.setDefaultEncoding = function(m) {
5157
+ }, N.prototype.setDefaultEncoding = function(m) {
5158
5158
  if (typeof m == "string" && (m = m.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((m + "").toLowerCase()) > -1)) throw new k(m);
5159
5159
  return this._writableState.defaultEncoding = m, this;
5160
- }, Object.defineProperty(M.prototype, "writableBuffer", {
5160
+ }, Object.defineProperty(N.prototype, "writableBuffer", {
5161
5161
  // making it explicit this property is not enumerable
5162
5162
  // because otherwise some prototype manipulation in
5163
5163
  // userland will fail
@@ -5169,7 +5169,7 @@ function ms() {
5169
5169
  function Te(_, m, R) {
5170
5170
  return !_.objectMode && _.decodeStrings !== !1 && typeof m == "string" && (m = i.from(m, R)), m;
5171
5171
  }
5172
- Object.defineProperty(M.prototype, "writableHighWaterMark", {
5172
+ Object.defineProperty(N.prototype, "writableHighWaterMark", {
5173
5173
  // making it explicit this property is not enumerable
5174
5174
  // because otherwise some prototype manipulation in
5175
5175
  // userland will fail
@@ -5178,47 +5178,47 @@ function ms() {
5178
5178
  return this._writableState.highWaterMark;
5179
5179
  }
5180
5180
  });
5181
- function Ge(_, m, R, N, G, d) {
5181
+ function Ge(_, m, R, D, G, d) {
5182
5182
  if (!R) {
5183
- var p = Te(m, N, G);
5184
- N !== p && (R = !0, G = "buffer", N = p);
5183
+ var p = Te(m, D, G);
5184
+ D !== p && (R = !0, G = "buffer", D = p);
5185
5185
  }
5186
- var A = m.objectMode ? 1 : N.length;
5186
+ var A = m.objectMode ? 1 : D.length;
5187
5187
  m.length += A;
5188
5188
  var O = m.length < m.highWaterMark;
5189
5189
  if (O || (m.needDrain = !0), m.writing || m.corked) {
5190
5190
  var Z = m.lastBufferedRequest;
5191
5191
  m.lastBufferedRequest = {
5192
- chunk: N,
5192
+ chunk: D,
5193
5193
  encoding: G,
5194
5194
  isBuf: R,
5195
5195
  callback: d,
5196
5196
  next: null
5197
5197
  }, Z ? Z.next = m.lastBufferedRequest : m.bufferedRequest = m.lastBufferedRequest, m.bufferedRequestCount += 1;
5198
5198
  } else
5199
- ae(_, m, !1, A, N, G, d);
5199
+ ae(_, m, !1, A, D, G, d);
5200
5200
  return O;
5201
5201
  }
5202
- function ae(_, m, R, N, G, d, p) {
5203
- m.writelen = N, m.writecb = p, m.writing = !0, m.sync = !0, m.destroyed ? m.onwrite(new T("write")) : R ? _._writev(G, m.onwrite) : _._write(G, d, m.onwrite), m.sync = !1;
5202
+ function ae(_, m, R, D, G, d, p) {
5203
+ m.writelen = D, m.writecb = p, m.writing = !0, m.sync = !0, m.destroyed ? m.onwrite(new T("write")) : R ? _._writev(G, m.onwrite) : _._write(G, d, m.onwrite), m.sync = !1;
5204
5204
  }
5205
- function xe(_, m, R, N, G) {
5206
- --m.pendingcb, R ? (process.nextTick(G, N), process.nextTick(Be, _, m), _._writableState.errorEmitted = !0, L(_, N)) : (G(N), _._writableState.errorEmitted = !0, L(_, N), Be(_, m));
5205
+ function xe(_, m, R, D, G) {
5206
+ --m.pendingcb, R ? (process.nextTick(G, D), process.nextTick(Be, _, m), _._writableState.errorEmitted = !0, L(_, D)) : (G(D), _._writableState.errorEmitted = !0, L(_, D), Be(_, m));
5207
5207
  }
5208
5208
  function ve(_) {
5209
5209
  _.writing = !1, _.writecb = null, _.length -= _.writelen, _.writelen = 0;
5210
5210
  }
5211
5211
  function et(_, m) {
5212
- var R = _._writableState, N = R.sync, G = R.writecb;
5212
+ var R = _._writableState, D = R.sync, G = R.writecb;
5213
5213
  if (typeof G != "function") throw new v();
5214
- if (ve(R), m) xe(_, R, N, m, G);
5214
+ if (ve(R), m) xe(_, R, D, m, G);
5215
5215
  else {
5216
5216
  var d = We(R) || _.destroyed;
5217
- !d && !R.corked && !R.bufferProcessing && R.bufferedRequest && Ce(_, R), N ? process.nextTick(Pe, _, R, d, G) : Pe(_, R, d, G);
5217
+ !d && !R.corked && !R.bufferProcessing && R.bufferedRequest && Ce(_, R), D ? process.nextTick(Pe, _, R, d, G) : Pe(_, R, d, G);
5218
5218
  }
5219
5219
  }
5220
- function Pe(_, m, R, N) {
5221
- R || je(_, m), m.pendingcb--, N(), Be(_, m);
5220
+ function Pe(_, m, R, D) {
5221
+ R || je(_, m), m.pendingcb--, D(), Be(_, m);
5222
5222
  }
5223
5223
  function je(_, m) {
5224
5224
  m.length === 0 && m.needDrain && (m.needDrain = !1, _.emit("drain"));
@@ -5227,7 +5227,7 @@ function ms() {
5227
5227
  m.bufferProcessing = !0;
5228
5228
  var R = m.bufferedRequest;
5229
5229
  if (_._writev && R && R.next) {
5230
- var N = m.bufferedRequestCount, G = new Array(N), d = m.corkedRequestsFree;
5230
+ var D = m.bufferedRequestCount, G = new Array(D), d = m.corkedRequestsFree;
5231
5231
  d.entry = R;
5232
5232
  for (var p = 0, A = !0; R; )
5233
5233
  G[p] = R, R.isBuf || (A = !1), R = R.next, p += 1;
@@ -5242,12 +5242,12 @@ function ms() {
5242
5242
  }
5243
5243
  m.bufferedRequest = R, m.bufferProcessing = !1;
5244
5244
  }
5245
- M.prototype._write = function(_, m, R) {
5245
+ N.prototype._write = function(_, m, R) {
5246
5246
  R(new I("_write()"));
5247
- }, M.prototype._writev = null, M.prototype.end = function(_, m, R) {
5248
- var N = this._writableState;
5249
- return typeof _ == "function" ? (R = _, _ = null, m = null) : typeof m == "function" && (R = m, m = null), _ != null && this.write(_, m), N.corked && (N.corked = 1, this.uncork()), N.ending || qe(this, N, R), this;
5250
- }, Object.defineProperty(M.prototype, "writableLength", {
5247
+ }, N.prototype._writev = null, N.prototype.end = function(_, m, R) {
5248
+ var D = this._writableState;
5249
+ return typeof _ == "function" ? (R = _, _ = null, m = null) : typeof m == "function" && (R = m, m = null), _ != null && this.write(_, m), D.corked && (D.corked = 1, this.uncork()), D.ending || qe(this, D, R), this;
5250
+ }, Object.defineProperty(N.prototype, "writableLength", {
5251
5251
  // making it explicit this property is not enumerable
5252
5252
  // because otherwise some prototype manipulation in
5253
5253
  // userland will fail
@@ -5270,8 +5270,8 @@ function ms() {
5270
5270
  function Be(_, m) {
5271
5271
  var R = We(m);
5272
5272
  if (R && (oe(_, m), m.pendingcb === 0 && (m.finished = !0, _.emit("finish"), m.autoDestroy))) {
5273
- var N = _._readableState;
5274
- (!N || N.autoDestroy && N.endEmitted) && _.destroy();
5273
+ var D = _._readableState;
5274
+ (!D || D.autoDestroy && D.endEmitted) && _.destroy();
5275
5275
  }
5276
5276
  return R;
5277
5277
  }
@@ -5279,14 +5279,14 @@ function ms() {
5279
5279
  m.ending = !0, Be(_, m), R && (m.finished ? process.nextTick(R) : _.once("finish", R)), m.ended = !0, _.writable = !1;
5280
5280
  }
5281
5281
  function Me(_, m, R) {
5282
- var N = _.entry;
5283
- for (_.entry = null; N; ) {
5284
- var G = N.callback;
5285
- m.pendingcb--, G(R), N = N.next;
5282
+ var D = _.entry;
5283
+ for (_.entry = null; D; ) {
5284
+ var G = D.callback;
5285
+ m.pendingcb--, G(R), D = D.next;
5286
5286
  }
5287
5287
  m.corkedRequestsFree.next = _;
5288
5288
  }
5289
- return Object.defineProperty(M.prototype, "destroyed", {
5289
+ return Object.defineProperty(N.prototype, "destroyed", {
5290
5290
  // making it explicit this property is not enumerable
5291
5291
  // because otherwise some prototype manipulation in
5292
5292
  // userland will fail
@@ -5297,12 +5297,12 @@ function ms() {
5297
5297
  set: function(m) {
5298
5298
  this._writableState && (this._writableState.destroyed = m);
5299
5299
  }
5300
- }), M.prototype.destroy = l.destroy, M.prototype._undestroy = l.undestroy, M.prototype._destroy = function(_, m) {
5300
+ }), N.prototype.destroy = l.destroy, N.prototype._undestroy = l.undestroy, N.prototype._destroy = function(_, m) {
5301
5301
  m(_);
5302
5302
  }, Gr;
5303
5303
  }
5304
5304
  var jr, si;
5305
- function Bt() {
5305
+ function St() {
5306
5306
  if (si) return jr;
5307
5307
  si = 1;
5308
5308
  var e = Object.keys || function(y) {
@@ -5383,7 +5383,7 @@ var gr = {}, Tn = Ee.Buffer, oi = Tn.isEncoding || function(e) {
5383
5383
  return !1;
5384
5384
  }
5385
5385
  };
5386
- function Wf(e) {
5386
+ function qf(e) {
5387
5387
  if (!e) return "utf8";
5388
5388
  for (var t; ; )
5389
5389
  switch (e) {
@@ -5407,27 +5407,27 @@ function Wf(e) {
5407
5407
  e = ("" + e).toLowerCase(), t = !0;
5408
5408
  }
5409
5409
  }
5410
- function qf(e) {
5411
- var t = Wf(e);
5410
+ function Vf(e) {
5411
+ var t = qf(e);
5412
5412
  if (typeof t != "string" && (Tn.isEncoding === oi || !oi(e))) throw new Error("Unknown encoding: " + e);
5413
5413
  return t || e;
5414
5414
  }
5415
5415
  gr.StringDecoder = Xt;
5416
5416
  function Xt(e) {
5417
- this.encoding = qf(e);
5417
+ this.encoding = Vf(e);
5418
5418
  var t;
5419
5419
  switch (this.encoding) {
5420
5420
  case "utf16le":
5421
- this.text = Qf, this.end = Zf, t = 4;
5421
+ this.text = Zf, this.end = eu, t = 4;
5422
5422
  break;
5423
5423
  case "utf8":
5424
- this.fillLast = Yf, t = 4;
5424
+ this.fillLast = Jf, t = 4;
5425
5425
  break;
5426
5426
  case "base64":
5427
- this.text = eu, this.end = tu, t = 3;
5427
+ this.text = tu, this.end = ru, t = 3;
5428
5428
  break;
5429
5429
  default:
5430
- this.write = ru, this.end = nu;
5430
+ this.write = nu, this.end = iu;
5431
5431
  return;
5432
5432
  }
5433
5433
  this.lastNeed = 0, this.lastTotal = 0, this.lastChar = Tn.allocUnsafe(t);
@@ -5442,8 +5442,8 @@ Xt.prototype.write = function(e) {
5442
5442
  r = 0;
5443
5443
  return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || "";
5444
5444
  };
5445
- Xt.prototype.end = Xf;
5446
- Xt.prototype.text = Jf;
5445
+ Xt.prototype.end = Qf;
5446
+ Xt.prototype.text = Xf;
5447
5447
  Xt.prototype.fillLast = function(e) {
5448
5448
  if (this.lastNeed <= e.length)
5449
5449
  return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
@@ -5452,13 +5452,13 @@ Xt.prototype.fillLast = function(e) {
5452
5452
  function Wr(e) {
5453
5453
  return e <= 127 ? 0 : e >> 5 === 6 ? 2 : e >> 4 === 14 ? 3 : e >> 3 === 30 ? 4 : e >> 6 === 2 ? -1 : -2;
5454
5454
  }
5455
- function Vf(e, t, r) {
5455
+ function Kf(e, t, r) {
5456
5456
  var n = t.length - 1;
5457
5457
  if (n < r) return 0;
5458
5458
  var i = Wr(t[n]);
5459
5459
  return i >= 0 ? (i > 0 && (e.lastNeed = i - 1), i) : --n < r || i === -2 ? 0 : (i = Wr(t[n]), i >= 0 ? (i > 0 && (e.lastNeed = i - 2), i) : --n < r || i === -2 ? 0 : (i = Wr(t[n]), i >= 0 ? (i > 0 && (i === 2 ? i = 0 : e.lastNeed = i - 3), i) : 0));
5460
5460
  }
5461
- function Kf(e, t, r) {
5461
+ function Yf(e, t, r) {
5462
5462
  if ((t[0] & 192) !== 128)
5463
5463
  return e.lastNeed = 0, "�";
5464
5464
  if (e.lastNeed > 1 && t.length > 1) {
@@ -5468,25 +5468,25 @@ function Kf(e, t, r) {
5468
5468
  return e.lastNeed = 2, "�";
5469
5469
  }
5470
5470
  }
5471
- function Yf(e) {
5472
- var t = this.lastTotal - this.lastNeed, r = Kf(this, e);
5471
+ function Jf(e) {
5472
+ var t = this.lastTotal - this.lastNeed, r = Yf(this, e);
5473
5473
  if (r !== void 0) return r;
5474
5474
  if (this.lastNeed <= e.length)
5475
5475
  return e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
5476
5476
  e.copy(this.lastChar, t, 0, e.length), this.lastNeed -= e.length;
5477
5477
  }
5478
- function Jf(e, t) {
5479
- var r = Vf(this, e, t);
5478
+ function Xf(e, t) {
5479
+ var r = Kf(this, e, t);
5480
5480
  if (!this.lastNeed) return e.toString("utf8", t);
5481
5481
  this.lastTotal = r;
5482
5482
  var n = e.length - (r - this.lastNeed);
5483
5483
  return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n);
5484
5484
  }
5485
- function Xf(e) {
5485
+ function Qf(e) {
5486
5486
  var t = e && e.length ? this.write(e) : "";
5487
5487
  return this.lastNeed ? t + "�" : t;
5488
5488
  }
5489
- function Qf(e, t) {
5489
+ function Zf(e, t) {
5490
5490
  if ((e.length - t) % 2 === 0) {
5491
5491
  var r = e.toString("utf16le", t);
5492
5492
  if (r) {
@@ -5498,7 +5498,7 @@ function Qf(e, t) {
5498
5498
  }
5499
5499
  return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1);
5500
5500
  }
5501
- function Zf(e) {
5501
+ function eu(e) {
5502
5502
  var t = e && e.length ? this.write(e) : "";
5503
5503
  if (this.lastNeed) {
5504
5504
  var r = this.lastTotal - this.lastNeed;
@@ -5506,22 +5506,22 @@ function Zf(e) {
5506
5506
  }
5507
5507
  return t;
5508
5508
  }
5509
- function eu(e, t) {
5509
+ function tu(e, t) {
5510
5510
  var r = (e.length - t) % 3;
5511
5511
  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));
5512
5512
  }
5513
- function tu(e) {
5513
+ function ru(e) {
5514
5514
  var t = e && e.length ? this.write(e) : "";
5515
5515
  return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t;
5516
5516
  }
5517
- function ru(e) {
5517
+ function nu(e) {
5518
5518
  return e.toString(this.encoding);
5519
5519
  }
5520
- function nu(e) {
5520
+ function iu(e) {
5521
5521
  return e && e.length ? this.write(e) : "";
5522
5522
  }
5523
5523
  var ai = ct.codes.ERR_STREAM_PREMATURE_CLOSE;
5524
- function iu(e) {
5524
+ function su(e) {
5525
5525
  var t = !1;
5526
5526
  return function() {
5527
5527
  if (!t) {
@@ -5532,14 +5532,14 @@ function iu(e) {
5532
5532
  }
5533
5533
  };
5534
5534
  }
5535
- function su() {
5535
+ function ou() {
5536
5536
  }
5537
- function ou(e) {
5537
+ function au(e) {
5538
5538
  return e.setHeader && typeof e.abort == "function";
5539
5539
  }
5540
5540
  function ws(e, t, r) {
5541
5541
  if (typeof t == "function") return ws(e, null, t);
5542
- t || (t = {}), r = iu(r || su);
5542
+ t || (t = {}), r = su(r || ou);
5543
5543
  var n = t.readable || t.readable !== !1 && e.readable, i = t.writable || t.writable !== !1 && e.writable, a = function() {
5544
5544
  e.writable || u();
5545
5545
  }, f = e._writableState && e._writableState.finished, u = function() {
@@ -5557,12 +5557,12 @@ function ws(e, t, r) {
5557
5557
  }, E = function() {
5558
5558
  e.req.on("finish", u);
5559
5559
  };
5560
- return ou(e) ? (e.on("complete", u), e.on("abort", w), e.req ? E() : e.on("request", E)) : i && !e._writableState && (e.on("end", a), e.on("close", a)), e.on("end", y), e.on("finish", u), t.error !== !1 && e.on("error", g), e.on("close", w), function() {
5560
+ return au(e) ? (e.on("complete", u), e.on("abort", w), e.req ? E() : e.on("request", E)) : i && !e._writableState && (e.on("end", a), e.on("close", a)), e.on("end", y), e.on("finish", u), t.error !== !1 && e.on("error", g), e.on("close", w), function() {
5561
5561
  e.removeListener("complete", u), e.removeListener("abort", w), e.removeListener("request", E), e.req && e.req.removeListener("finish", u), e.removeListener("end", a), e.removeListener("close", a), e.removeListener("finish", u), e.removeListener("end", y), e.removeListener("error", g), e.removeListener("close", w);
5562
5562
  };
5563
5563
  }
5564
5564
  var Pn = ws, qr, fi;
5565
- function au() {
5565
+ function fu() {
5566
5566
  if (fi) return qr;
5567
5567
  fi = 1;
5568
5568
  var e;
@@ -5632,9 +5632,9 @@ function au() {
5632
5632
  if (S)
5633
5633
  z = new Promise(P(S, this));
5634
5634
  else {
5635
- var M = this[w].read();
5636
- if (M !== null)
5637
- return Promise.resolve(E(M, !1));
5635
+ var N = this[w].read();
5636
+ if (N !== null)
5637
+ return Promise.resolve(E(N, !1));
5638
5638
  z = new Promise(this[g]);
5639
5639
  }
5640
5640
  return this[y] = z, z;
@@ -5669,16 +5669,16 @@ function au() {
5669
5669
  value: L._readableState.endEmitted,
5670
5670
  writable: !0
5671
5671
  }), t(U, g, {
5672
- value: function(M, $) {
5672
+ value: function(N, $) {
5673
5673
  var se = S[w].read();
5674
- se ? (S[y] = null, S[a] = null, S[f] = null, M(E(se, !1))) : (S[a] = M, S[f] = $);
5674
+ se ? (S[y] = null, S[a] = null, S[f] = null, N(E(se, !1))) : (S[a] = N, S[f] = $);
5675
5675
  },
5676
5676
  writable: !0
5677
5677
  }), U));
5678
5678
  return S[y] = null, i(L, function(z) {
5679
5679
  if (z && z.code !== "ERR_STREAM_PREMATURE_CLOSE") {
5680
- var M = S[f];
5681
- M !== null && (S[y] = null, S[a] = null, S[f] = null, M(z)), S[u] = z;
5680
+ var N = S[f];
5681
+ N !== null && (S[y] = null, S[a] = null, S[f] = null, N(z)), S[u] = z;
5682
5682
  return;
5683
5683
  }
5684
5684
  var $ = S[a];
@@ -5688,7 +5688,7 @@ function au() {
5688
5688
  return qr = F, qr;
5689
5689
  }
5690
5690
  var Vr, ui;
5691
- function fu() {
5691
+ function uu() {
5692
5692
  return ui || (ui = 1, Vr = function() {
5693
5693
  throw new Error("Readable.from is not available in the browser");
5694
5694
  }), Vr;
@@ -5698,10 +5698,10 @@ function _s() {
5698
5698
  if (ci) return Kr;
5699
5699
  ci = 1, Kr = $;
5700
5700
  var e;
5701
- $.ReadableState = M, ds.EventEmitter;
5701
+ $.ReadableState = N, ds.EventEmitter;
5702
5702
  var t = function(p, A) {
5703
5703
  return p.listeners(A).length;
5704
- }, r = ps, n = At.Buffer, i = (typeof Xe < "u" ? Xe : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
5704
+ }, r = ps, n = Rt.Buffer, i = (typeof Xe < "u" ? Xe : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
5705
5705
  };
5706
5706
  function a(d) {
5707
5707
  return n.from(d);
@@ -5712,20 +5712,20 @@ function _s() {
5712
5712
  var u = Rn, l;
5713
5713
  u && u.debuglog ? l = u.debuglog("stream") : l = function() {
5714
5714
  };
5715
- var y = Lf(), g = bs, w = gs, E = w.getHighWaterMark, I = ct.codes, v = I.ERR_INVALID_ARG_TYPE, P = I.ERR_STREAM_PUSH_AFTER_EOF, T = I.ERR_METHOD_NOT_IMPLEMENTED, C = I.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, F, k, L;
5715
+ var y = kf(), g = bs, w = gs, E = w.getHighWaterMark, I = ct.codes, v = I.ERR_INVALID_ARG_TYPE, P = I.ERR_STREAM_PUSH_AFTER_EOF, T = I.ERR_METHOD_NOT_IMPLEMENTED, C = I.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, F, k, L;
5716
5716
  ge($, r);
5717
5717
  var U = g.errorOrDestroy, S = ["error", "close", "destroy", "pause", "resume"];
5718
5718
  function z(d, p, A) {
5719
5719
  if (typeof d.prependListener == "function") return d.prependListener(p, A);
5720
5720
  !d._events || !d._events[p] ? d.on(p, A) : Array.isArray(d._events[p]) ? d._events[p].unshift(A) : d._events[p] = [A, d._events[p]];
5721
5721
  }
5722
- function M(d, p, A) {
5723
- e = e || Bt(), d = d || {}, typeof A != "boolean" && (A = p instanceof e), this.objectMode = !!d.objectMode, A && (this.objectMode = this.objectMode || !!d.readableObjectMode), this.highWaterMark = E(this, d, "readableHighWaterMark", A), this.buffer = new y(), 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 = d.emitClose !== !1, this.autoDestroy = !!d.autoDestroy, this.destroyed = !1, this.defaultEncoding = d.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, d.encoding && (F || (F = gr.StringDecoder), this.decoder = new F(d.encoding), this.encoding = d.encoding);
5722
+ function N(d, p, A) {
5723
+ e = e || St(), d = d || {}, typeof A != "boolean" && (A = p instanceof e), this.objectMode = !!d.objectMode, A && (this.objectMode = this.objectMode || !!d.readableObjectMode), this.highWaterMark = E(this, d, "readableHighWaterMark", A), this.buffer = new y(), 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 = d.emitClose !== !1, this.autoDestroy = !!d.autoDestroy, this.destroyed = !1, this.defaultEncoding = d.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, d.encoding && (F || (F = gr.StringDecoder), this.decoder = new F(d.encoding), this.encoding = d.encoding);
5724
5724
  }
5725
5725
  function $(d) {
5726
- if (e = e || Bt(), !(this instanceof $)) return new $(d);
5726
+ if (e = e || St(), !(this instanceof $)) return new $(d);
5727
5727
  var p = this instanceof e;
5728
- this._readableState = new M(d, this, p), this.readable = !0, d && (typeof d.read == "function" && (this._read = d.read), typeof d.destroy == "function" && (this._destroy = d.destroy)), r.call(this);
5728
+ this._readableState = new N(d, this, p), this.readable = !0, d && (typeof d.read == "function" && (this._read = d.read), typeof d.destroy == "function" && (this._destroy = d.destroy)), r.call(this);
5729
5729
  }
5730
5730
  Object.defineProperty($.prototype, "destroyed", {
5731
5731
  // making it explicit this property is not enumerable
@@ -5859,26 +5859,26 @@ function _s() {
5859
5859
  }
5860
5860
  var ht = Q(A);
5861
5861
  d.on("drain", ht);
5862
- var Tt = !1;
5862
+ var Pt = !1;
5863
5863
  function dt() {
5864
- l("cleanup"), d.removeListener("close", Pt), d.removeListener("finish", Ie), d.removeListener("drain", ht), d.removeListener("error", tt), d.removeListener("unpipe", V), A.removeListener("end", Ve), A.removeListener("end", rt), A.removeListener("data", Se), Tt = !0, O.awaitDrain && (!d._writableState || d._writableState.needDrain) && ht();
5864
+ l("cleanup"), d.removeListener("close", Ct), d.removeListener("finish", Ie), d.removeListener("drain", ht), d.removeListener("error", tt), d.removeListener("unpipe", V), A.removeListener("end", Ve), A.removeListener("end", rt), A.removeListener("data", Se), Pt = !0, O.awaitDrain && (!d._writableState || d._writableState.needDrain) && ht();
5865
5865
  }
5866
5866
  A.on("data", Se);
5867
5867
  function Se(c) {
5868
5868
  l("ondata");
5869
5869
  var s = d.write(c);
5870
- l("dest.write", s), s === !1 && ((O.pipesCount === 1 && O.pipes === d || O.pipesCount > 1 && G(O.pipes, d) !== -1) && !Tt && (l("false write response, pause", O.awaitDrain), O.awaitDrain++), A.pause());
5870
+ l("dest.write", s), s === !1 && ((O.pipesCount === 1 && O.pipes === d || O.pipesCount > 1 && G(O.pipes, d) !== -1) && !Pt && (l("false write response, pause", O.awaitDrain), O.awaitDrain++), A.pause());
5871
5871
  }
5872
5872
  function tt(c) {
5873
5873
  l("onerror", c), rt(), d.removeListener("error", tt), t(d, "error") === 0 && U(d, c);
5874
5874
  }
5875
5875
  z(d, "error", tt);
5876
- function Pt() {
5876
+ function Ct() {
5877
5877
  d.removeListener("finish", Ie), rt();
5878
5878
  }
5879
- d.once("close", Pt);
5879
+ d.once("close", Ct);
5880
5880
  function Ie() {
5881
- l("onfinish"), d.removeListener("close", Pt), rt();
5881
+ l("onfinish"), d.removeListener("close", Ct), rt();
5882
5882
  }
5883
5883
  d.once("finish", Ie);
5884
5884
  function rt() {
@@ -5969,7 +5969,7 @@ function _s() {
5969
5969
  l("wrapped _read", V), O && (O = !1, d.resume());
5970
5970
  }, this;
5971
5971
  }, typeof Symbol == "function" && ($.prototype[Symbol.asyncIterator] = function() {
5972
- return k === void 0 && (k = au()), k(this);
5972
+ return k === void 0 && (k = fu()), k(this);
5973
5973
  }), Object.defineProperty($.prototype, "readableHighWaterMark", {
5974
5974
  // making it explicit this property is not enumerable
5975
5975
  // because otherwise some prototype manipulation in
@@ -6013,16 +6013,16 @@ function _s() {
6013
6013
  }
6014
6014
  function R(d) {
6015
6015
  var p = d._readableState;
6016
- l("endReadable", p.endEmitted), p.endEmitted || (p.ended = !0, process.nextTick(N, p, d));
6016
+ l("endReadable", p.endEmitted), p.endEmitted || (p.ended = !0, process.nextTick(D, p, d));
6017
6017
  }
6018
- function N(d, p) {
6018
+ function D(d, p) {
6019
6019
  if (l("endReadableNT", d.endEmitted, d.length), !d.endEmitted && d.length === 0 && (d.endEmitted = !0, p.readable = !1, p.emit("end"), d.autoDestroy)) {
6020
6020
  var A = p._writableState;
6021
6021
  (!A || A.autoDestroy && A.finished) && p.destroy();
6022
6022
  }
6023
6023
  }
6024
6024
  typeof Symbol == "function" && ($.from = function(d, p) {
6025
- return L === void 0 && (L = fu()), L($, d, p);
6025
+ return L === void 0 && (L = uu()), L($, d, p);
6026
6026
  });
6027
6027
  function G(d, p) {
6028
6028
  for (var A = 0, O = d.length; A < O; A++)
@@ -6031,14 +6031,14 @@ function _s() {
6031
6031
  }
6032
6032
  return Kr;
6033
6033
  }
6034
- var xs = ze, Br = ct.codes, uu = Br.ERR_METHOD_NOT_IMPLEMENTED, cu = Br.ERR_MULTIPLE_CALLBACK, lu = Br.ERR_TRANSFORM_ALREADY_TRANSFORMING, hu = Br.ERR_TRANSFORM_WITH_LENGTH_0, Sr = Bt();
6034
+ var xs = ze, Br = ct.codes, cu = Br.ERR_METHOD_NOT_IMPLEMENTED, lu = Br.ERR_MULTIPLE_CALLBACK, hu = Br.ERR_TRANSFORM_ALREADY_TRANSFORMING, du = Br.ERR_TRANSFORM_WITH_LENGTH_0, Sr = St();
6035
6035
  ge(ze, Sr);
6036
- function du(e, t) {
6036
+ function pu(e, t) {
6037
6037
  var r = this._transformState;
6038
6038
  r.transforming = !1;
6039
6039
  var n = r.writecb;
6040
6040
  if (n === null)
6041
- return this.emit("error", new cu());
6041
+ return this.emit("error", new lu());
6042
6042
  r.writechunk = null, r.writecb = null, t != null && this.push(t), n(e);
6043
6043
  var i = this._readableState;
6044
6044
  i.reading = !1, (i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
@@ -6046,15 +6046,15 @@ function du(e, t) {
6046
6046
  function ze(e) {
6047
6047
  if (!(this instanceof ze)) return new ze(e);
6048
6048
  Sr.call(this, e), this._transformState = {
6049
- afterTransform: du.bind(this),
6049
+ afterTransform: pu.bind(this),
6050
6050
  needTransform: !1,
6051
6051
  transforming: !1,
6052
6052
  writecb: null,
6053
6053
  writechunk: null,
6054
6054
  writeencoding: null
6055
- }, 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", pu);
6055
+ }, 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", bu);
6056
6056
  }
6057
- function pu() {
6057
+ function bu() {
6058
6058
  var e = this;
6059
6059
  typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
6060
6060
  li(e, t, r);
@@ -6064,7 +6064,7 @@ ze.prototype.push = function(e, t) {
6064
6064
  return this._transformState.needTransform = !1, Sr.prototype.push.call(this, e, t);
6065
6065
  };
6066
6066
  ze.prototype._transform = function(e, t, r) {
6067
- r(new uu("_transform()"));
6067
+ r(new cu("_transform()"));
6068
6068
  };
6069
6069
  ze.prototype._write = function(e, t, r) {
6070
6070
  var n = this._transformState;
@@ -6084,11 +6084,11 @@ ze.prototype._destroy = function(e, t) {
6084
6084
  };
6085
6085
  function li(e, t, r) {
6086
6086
  if (t) return e.emit("error", t);
6087
- if (r != null && e.push(r), e._writableState.length) throw new hu();
6088
- if (e._transformState.transforming) throw new lu();
6087
+ if (r != null && e.push(r), e._writableState.length) throw new du();
6088
+ if (e._transformState.transforming) throw new hu();
6089
6089
  return e.push(null);
6090
6090
  }
6091
- var bu = Wt, vs = xs;
6091
+ var yu = Wt, vs = xs;
6092
6092
  ge(Wt, vs);
6093
6093
  function Wt(e) {
6094
6094
  if (!(this instanceof Wt)) return new Wt(e);
@@ -6098,21 +6098,21 @@ Wt.prototype._transform = function(e, t, r) {
6098
6098
  r(null, e);
6099
6099
  };
6100
6100
  var Yr;
6101
- function yu(e) {
6101
+ function gu(e) {
6102
6102
  var t = !1;
6103
6103
  return function() {
6104
6104
  t || (t = !0, e.apply(void 0, arguments));
6105
6105
  };
6106
6106
  }
6107
- var Es = ct.codes, gu = Es.ERR_MISSING_ARGS, mu = Es.ERR_STREAM_DESTROYED;
6107
+ var Es = ct.codes, mu = Es.ERR_MISSING_ARGS, wu = Es.ERR_STREAM_DESTROYED;
6108
6108
  function hi(e) {
6109
6109
  if (e) throw e;
6110
6110
  }
6111
- function wu(e) {
6111
+ function _u(e) {
6112
6112
  return e.setHeader && typeof e.abort == "function";
6113
6113
  }
6114
- function _u(e, t, r, n) {
6115
- n = yu(n);
6114
+ function xu(e, t, r, n) {
6115
+ n = gu(n);
6116
6116
  var i = !1;
6117
6117
  e.on("close", function() {
6118
6118
  i = !0;
@@ -6126,48 +6126,48 @@ function _u(e, t, r, n) {
6126
6126
  var a = !1;
6127
6127
  return function(f) {
6128
6128
  if (!i && !a) {
6129
- if (a = !0, wu(e)) return e.abort();
6129
+ if (a = !0, _u(e)) return e.abort();
6130
6130
  if (typeof e.destroy == "function") return e.destroy();
6131
- n(f || new mu("pipe"));
6131
+ n(f || new wu("pipe"));
6132
6132
  }
6133
6133
  };
6134
6134
  }
6135
6135
  function di(e) {
6136
6136
  e();
6137
6137
  }
6138
- function xu(e, t) {
6138
+ function vu(e, t) {
6139
6139
  return e.pipe(t);
6140
6140
  }
6141
- function vu(e) {
6141
+ function Eu(e) {
6142
6142
  return !e.length || typeof e[e.length - 1] != "function" ? hi : e.pop();
6143
6143
  }
6144
- function Eu() {
6144
+ function Bu() {
6145
6145
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
6146
6146
  t[r] = arguments[r];
6147
- var n = vu(t);
6147
+ var n = Eu(t);
6148
6148
  if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
6149
- throw new gu("streams");
6149
+ throw new mu("streams");
6150
6150
  var i, a = t.map(function(f, u) {
6151
6151
  var l = u < t.length - 1, y = u > 0;
6152
- return _u(f, l, y, function(g) {
6152
+ return xu(f, l, y, function(g) {
6153
6153
  i || (i = g), g && a.forEach(di), !l && (a.forEach(di), n(i));
6154
6154
  });
6155
6155
  });
6156
- return t.reduce(xu);
6156
+ return t.reduce(vu);
6157
6157
  }
6158
- var Bu = Eu;
6158
+ var Su = Bu;
6159
6159
  (function(e, t) {
6160
- t = e.exports = _s(), t.Stream = t, t.Readable = t, t.Writable = ms(), t.Duplex = Bt(), t.Transform = xs, t.PassThrough = bu, t.finished = Pn, t.pipeline = Bu;
6160
+ t = e.exports = _s(), t.Stream = t, t.Readable = t, t.Writable = ms(), t.Duplex = St(), t.Transform = xs, t.PassThrough = yu, t.finished = Pn, t.pipeline = Su;
6161
6161
  })(fn, fn.exports);
6162
- var Su = fn.exports, mr = Ee.Buffer, Bs = Su.Transform, Iu = ge;
6163
- function Au(e, t) {
6162
+ var Iu = fn.exports, mr = Ee.Buffer, Bs = Iu.Transform, Au = ge;
6163
+ function Ru(e, t) {
6164
6164
  if (!mr.isBuffer(e) && typeof e != "string")
6165
6165
  throw new TypeError(t + " must be a string or a buffer");
6166
6166
  }
6167
6167
  function Ze(e) {
6168
6168
  Bs.call(this), this._block = mr.allocUnsafe(e), this._blockSize = e, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
6169
6169
  }
6170
- Iu(Ze, Bs);
6170
+ Au(Ze, Bs);
6171
6171
  Ze.prototype._transform = function(e, t, r) {
6172
6172
  var n = null;
6173
6173
  try {
@@ -6187,7 +6187,7 @@ Ze.prototype._flush = function(e) {
6187
6187
  e(t);
6188
6188
  };
6189
6189
  Ze.prototype.update = function(e, t) {
6190
- if (Au(e, "Data"), this._finalized) throw new Error("Digest already called");
6190
+ if (Ru(e, "Data"), this._finalized) throw new Error("Digest already called");
6191
6191
  mr.isBuffer(e) || (e = mr.from(e, t));
6192
6192
  for (var r = this._block, n = 0; this._blockOffset + e.length - n >= this._blockSize; ) {
6193
6193
  for (var i = this._blockOffset; i < this._blockSize; ) r[i++] = e[n++];
@@ -6212,19 +6212,19 @@ Ze.prototype.digest = function(e) {
6212
6212
  Ze.prototype._digest = function() {
6213
6213
  throw new Error("_digest is not implemented");
6214
6214
  };
6215
- var Ss = Ze, Ru = ge, Is = Ss, Tu = Ee.Buffer, Pu = new Array(16);
6215
+ var Ss = Ze, Tu = ge, Is = Ss, Pu = Ee.Buffer, Cu = new Array(16);
6216
6216
  function Ir() {
6217
6217
  Is.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878;
6218
6218
  }
6219
- Ru(Ir, Is);
6219
+ Tu(Ir, Is);
6220
6220
  Ir.prototype._update = function() {
6221
- for (var e = Pu, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
6221
+ for (var e = Cu, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
6222
6222
  var r = this._a, n = this._b, i = this._c, a = this._d;
6223
6223
  r = le(r, n, i, a, e[0], 3614090360, 7), a = le(a, r, n, i, e[1], 3905402710, 12), i = le(i, a, r, n, e[2], 606105819, 17), n = le(n, i, a, r, e[3], 3250441966, 22), r = le(r, n, i, a, e[4], 4118548399, 7), a = le(a, r, n, i, e[5], 1200080426, 12), i = le(i, a, r, n, e[6], 2821735955, 17), n = le(n, i, a, r, e[7], 4249261313, 22), r = le(r, n, i, a, e[8], 1770035416, 7), a = le(a, r, n, i, e[9], 2336552879, 12), i = le(i, a, r, n, e[10], 4294925233, 17), n = le(n, i, a, r, e[11], 2304563134, 22), r = le(r, n, i, a, e[12], 1804603682, 7), a = le(a, r, n, i, e[13], 4254626195, 12), i = le(i, a, r, n, e[14], 2792965006, 17), n = le(n, i, a, r, e[15], 1236535329, 22), r = he(r, n, i, a, e[1], 4129170786, 5), a = he(a, r, n, i, e[6], 3225465664, 9), i = he(i, a, r, n, e[11], 643717713, 14), n = he(n, i, a, r, e[0], 3921069994, 20), r = he(r, n, i, a, e[5], 3593408605, 5), a = he(a, r, n, i, e[10], 38016083, 9), i = he(i, a, r, n, e[15], 3634488961, 14), n = he(n, i, a, r, e[4], 3889429448, 20), r = he(r, n, i, a, e[9], 568446438, 5), a = he(a, r, n, i, e[14], 3275163606, 9), i = he(i, a, r, n, e[3], 4107603335, 14), n = he(n, i, a, r, e[8], 1163531501, 20), r = he(r, n, i, a, e[13], 2850285829, 5), a = he(a, r, n, i, e[2], 4243563512, 9), i = he(i, a, r, n, e[7], 1735328473, 14), n = he(n, i, a, r, e[12], 2368359562, 20), r = de(r, n, i, a, e[5], 4294588738, 4), a = de(a, r, n, i, e[8], 2272392833, 11), i = de(i, a, r, n, e[11], 1839030562, 16), n = de(n, i, a, r, e[14], 4259657740, 23), r = de(r, n, i, a, e[1], 2763975236, 4), a = de(a, r, n, i, e[4], 1272893353, 11), i = de(i, a, r, n, e[7], 4139469664, 16), n = de(n, i, a, r, e[10], 3200236656, 23), r = de(r, n, i, a, e[13], 681279174, 4), a = de(a, r, n, i, e[0], 3936430074, 11), i = de(i, a, r, n, e[3], 3572445317, 16), n = de(n, i, a, r, e[6], 76029189, 23), r = de(r, n, i, a, e[9], 3654602809, 4), a = de(a, r, n, i, e[12], 3873151461, 11), i = de(i, a, r, n, e[15], 530742520, 16), n = de(n, i, a, r, e[2], 3299628645, 23), r = pe(r, n, i, a, e[0], 4096336452, 6), a = pe(a, r, n, i, e[7], 1126891415, 10), i = pe(i, a, r, n, e[14], 2878612391, 15), n = pe(n, i, a, r, e[5], 4237533241, 21), r = pe(r, n, i, a, e[12], 1700485571, 6), a = pe(a, r, n, i, e[3], 2399980690, 10), i = pe(i, a, r, n, e[10], 4293915773, 15), n = pe(n, i, a, r, e[1], 2240044497, 21), r = pe(r, n, i, a, e[8], 1873313359, 6), a = pe(a, r, n, i, e[15], 4264355552, 10), i = pe(i, a, r, n, e[6], 2734768916, 15), n = pe(n, i, a, r, e[13], 1309151649, 21), r = pe(r, n, i, a, e[4], 4149444226, 6), a = pe(a, r, n, i, e[11], 3174756917, 10), i = pe(i, a, r, n, e[2], 718787259, 15), n = pe(n, i, a, r, e[9], 3951481745, 21), this._a = this._a + r | 0, this._b = this._b + n | 0, this._c = this._c + i | 0, this._d = this._d + a | 0;
6224
6224
  };
6225
6225
  Ir.prototype._digest = function() {
6226
6226
  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();
6227
- var e = Tu.allocUnsafe(16);
6227
+ var e = Pu.allocUnsafe(16);
6228
6228
  return e.writeInt32LE(this._a, 0), e.writeInt32LE(this._b, 4), e.writeInt32LE(this._c, 8), e.writeInt32LE(this._d, 12), e;
6229
6229
  };
6230
6230
  function Ar(e, t) {
@@ -6242,7 +6242,7 @@ function de(e, t, r, n, i, a, f) {
6242
6242
  function pe(e, t, r, n, i, a, f) {
6243
6243
  return Ar(e + (r ^ (t | ~n)) + i + a | 0, f) + t | 0;
6244
6244
  }
6245
- var Cu = Ir, Jr = At.Buffer, Lu = ge, As = Ss, ku = new Array(16), Mt = [
6245
+ var Lu = Ir, Jr = Rt.Buffer, ku = ge, As = Ss, Fu = new Array(16), Nt = [
6246
6246
  0,
6247
6247
  1,
6248
6248
  2,
@@ -6323,7 +6323,7 @@ var Cu = Ir, Jr = At.Buffer, Lu = ge, As = Ss, ku = new Array(16), Mt = [
6323
6323
  6,
6324
6324
  15,
6325
6325
  13
6326
- ], Nt = [
6326
+ ], Dt = [
6327
6327
  5,
6328
6328
  14,
6329
6329
  7,
@@ -6404,7 +6404,7 @@ var Cu = Ir, Jr = At.Buffer, Lu = ge, As = Ss, ku = new Array(16), Mt = [
6404
6404
  3,
6405
6405
  9,
6406
6406
  11
6407
- ], Dt = [
6407
+ ], $t = [
6408
6408
  11,
6409
6409
  14,
6410
6410
  15,
@@ -6485,7 +6485,7 @@ var Cu = Ir, Jr = At.Buffer, Lu = ge, As = Ss, ku = new Array(16), Mt = [
6485
6485
  8,
6486
6486
  5,
6487
6487
  6
6488
- ], $t = [
6488
+ ], Ht = [
6489
6489
  8,
6490
6490
  9,
6491
6491
  9,
@@ -6566,16 +6566,16 @@ var Cu = Ir, Jr = At.Buffer, Lu = ge, As = Ss, ku = new Array(16), Mt = [
6566
6566
  13,
6567
6567
  11,
6568
6568
  11
6569
- ], Ht = [0, 1518500249, 1859775393, 2400959708, 2840853838], zt = [1352829926, 1548603684, 1836072691, 2053994217, 0];
6569
+ ], zt = [0, 1518500249, 1859775393, 2400959708, 2840853838], Gt = [1352829926, 1548603684, 1836072691, 2053994217, 0];
6570
6570
  function Rr() {
6571
6571
  As.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520;
6572
6572
  }
6573
- Lu(Rr, As);
6573
+ ku(Rr, As);
6574
6574
  Rr.prototype._update = function() {
6575
- for (var e = ku, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
6575
+ for (var e = Fu, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
6576
6576
  for (var r = this._a | 0, n = this._b | 0, i = this._c | 0, a = this._d | 0, f = this._e | 0, u = this._a | 0, l = this._b | 0, y = this._c | 0, g = this._d | 0, w = this._e | 0, E = 0; E < 80; E += 1) {
6577
6577
  var I, v;
6578
- E < 16 ? (I = pi(r, n, i, a, f, e[Mt[E]], Ht[0], Dt[E]), v = mi(u, l, y, g, w, e[Nt[E]], zt[0], $t[E])) : E < 32 ? (I = bi(r, n, i, a, f, e[Mt[E]], Ht[1], Dt[E]), v = gi(u, l, y, g, w, e[Nt[E]], zt[1], $t[E])) : E < 48 ? (I = yi(r, n, i, a, f, e[Mt[E]], Ht[2], Dt[E]), v = yi(u, l, y, g, w, e[Nt[E]], zt[2], $t[E])) : E < 64 ? (I = gi(r, n, i, a, f, e[Mt[E]], Ht[3], Dt[E]), v = bi(u, l, y, g, w, e[Nt[E]], zt[3], $t[E])) : (I = mi(r, n, i, a, f, e[Mt[E]], Ht[4], Dt[E]), v = pi(u, l, y, g, w, e[Nt[E]], zt[4], $t[E])), r = f, f = a, a = ut(i, 10), i = n, n = I, u = w, w = g, g = ut(y, 10), y = l, l = v;
6578
+ E < 16 ? (I = pi(r, n, i, a, f, e[Nt[E]], zt[0], $t[E]), v = mi(u, l, y, g, w, e[Dt[E]], Gt[0], Ht[E])) : E < 32 ? (I = bi(r, n, i, a, f, e[Nt[E]], zt[1], $t[E]), v = gi(u, l, y, g, w, e[Dt[E]], Gt[1], Ht[E])) : E < 48 ? (I = yi(r, n, i, a, f, e[Nt[E]], zt[2], $t[E]), v = yi(u, l, y, g, w, e[Dt[E]], Gt[2], Ht[E])) : E < 64 ? (I = gi(r, n, i, a, f, e[Nt[E]], zt[3], $t[E]), v = bi(u, l, y, g, w, e[Dt[E]], Gt[3], Ht[E])) : (I = mi(r, n, i, a, f, e[Nt[E]], zt[4], $t[E]), v = pi(u, l, y, g, w, e[Dt[E]], Gt[4], Ht[E])), r = f, f = a, a = ut(i, 10), i = n, n = I, u = w, w = g, g = ut(y, 10), y = l, l = v;
6579
6579
  }
6580
6580
  var P = this._b + i + g | 0;
6581
6581
  this._b = this._c + a + w | 0, this._c = this._d + f + u | 0, this._d = this._e + r + l | 0, this._e = this._a + n + y | 0, this._a = P;
@@ -6603,7 +6603,7 @@ function gi(e, t, r, n, i, a, f, u) {
6603
6603
  function mi(e, t, r, n, i, a, f, u) {
6604
6604
  return ut(e + (t ^ (r | ~n)) + a + f | 0, u) + i | 0;
6605
6605
  }
6606
- var Fu = Rr, Rs = { exports: {} }, Ts = Ee.Buffer;
6606
+ var Uu = Rr, Rs = { exports: {} }, Ts = Ee.Buffer;
6607
6607
  function Tr(e, t) {
6608
6608
  this._block = Ts.alloc(e), this._finalSize = t, this._blockSize = e, this._len = 0;
6609
6609
  }
@@ -6633,80 +6633,80 @@ Tr.prototype.digest = function(e) {
6633
6633
  Tr.prototype._update = function() {
6634
6634
  throw new Error("_update must be implemented by subclass");
6635
6635
  };
6636
- var Rt = Tr, Uu = ge, Ps = Rt, Ou = Ee.Buffer, Mu = [
6636
+ var Tt = Tr, Ou = ge, Ps = Tt, Mu = Ee.Buffer, Nu = [
6637
6637
  1518500249,
6638
6638
  1859775393,
6639
6639
  -1894007588,
6640
6640
  -899497514
6641
- ], Nu = new Array(80);
6641
+ ], Du = new Array(80);
6642
6642
  function Qt() {
6643
- this.init(), this._w = Nu, Ps.call(this, 64, 56);
6643
+ this.init(), this._w = Du, Ps.call(this, 64, 56);
6644
6644
  }
6645
- Uu(Qt, Ps);
6645
+ Ou(Qt, Ps);
6646
6646
  Qt.prototype.init = function() {
6647
6647
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
6648
6648
  };
6649
- function Du(e) {
6649
+ function $u(e) {
6650
6650
  return e << 5 | e >>> 27;
6651
6651
  }
6652
- function $u(e) {
6652
+ function Hu(e) {
6653
6653
  return e << 30 | e >>> 2;
6654
6654
  }
6655
- function Hu(e, t, r, n) {
6655
+ function zu(e, t, r, n) {
6656
6656
  return e === 0 ? t & r | ~t & n : e === 2 ? t & r | t & n | r & n : t ^ r ^ n;
6657
6657
  }
6658
6658
  Qt.prototype._update = function(e) {
6659
6659
  for (var t = this._w, r = this._a | 0, n = this._b | 0, i = this._c | 0, a = this._d | 0, f = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
6660
6660
  for (; u < 80; ++u) t[u] = t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16];
6661
6661
  for (var l = 0; l < 80; ++l) {
6662
- var y = ~~(l / 20), g = Du(r) + Hu(y, n, i, a) + f + t[l] + Mu[y] | 0;
6663
- f = a, a = i, i = $u(n), n = r, r = g;
6662
+ var y = ~~(l / 20), g = $u(r) + zu(y, n, i, a) + f + t[l] + Nu[y] | 0;
6663
+ f = a, a = i, i = Hu(n), n = r, r = g;
6664
6664
  }
6665
6665
  this._a = r + this._a | 0, this._b = n + this._b | 0, this._c = i + this._c | 0, this._d = a + this._d | 0, this._e = f + this._e | 0;
6666
6666
  };
6667
6667
  Qt.prototype._hash = function() {
6668
- var e = Ou.allocUnsafe(20);
6668
+ var e = Mu.allocUnsafe(20);
6669
6669
  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;
6670
6670
  };
6671
- var zu = Qt, Gu = ge, Cs = Rt, ju = Ee.Buffer, Wu = [
6671
+ var Gu = Qt, ju = ge, Cs = Tt, Wu = Ee.Buffer, qu = [
6672
6672
  1518500249,
6673
6673
  1859775393,
6674
6674
  -1894007588,
6675
6675
  -899497514
6676
- ], qu = new Array(80);
6676
+ ], Vu = new Array(80);
6677
6677
  function Zt() {
6678
- this.init(), this._w = qu, Cs.call(this, 64, 56);
6678
+ this.init(), this._w = Vu, Cs.call(this, 64, 56);
6679
6679
  }
6680
- Gu(Zt, Cs);
6680
+ ju(Zt, Cs);
6681
6681
  Zt.prototype.init = function() {
6682
6682
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
6683
6683
  };
6684
- function Vu(e) {
6684
+ function Ku(e) {
6685
6685
  return e << 1 | e >>> 31;
6686
6686
  }
6687
- function Ku(e) {
6687
+ function Yu(e) {
6688
6688
  return e << 5 | e >>> 27;
6689
6689
  }
6690
- function Yu(e) {
6690
+ function Ju(e) {
6691
6691
  return e << 30 | e >>> 2;
6692
6692
  }
6693
- function Ju(e, t, r, n) {
6693
+ function Xu(e, t, r, n) {
6694
6694
  return e === 0 ? t & r | ~t & n : e === 2 ? t & r | t & n | r & n : t ^ r ^ n;
6695
6695
  }
6696
6696
  Zt.prototype._update = function(e) {
6697
6697
  for (var t = this._w, r = this._a | 0, n = this._b | 0, i = this._c | 0, a = this._d | 0, f = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
6698
- for (; u < 80; ++u) t[u] = Vu(t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16]);
6698
+ for (; u < 80; ++u) t[u] = Ku(t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16]);
6699
6699
  for (var l = 0; l < 80; ++l) {
6700
- var y = ~~(l / 20), g = Ku(r) + Ju(y, n, i, a) + f + t[l] + Wu[y] | 0;
6701
- f = a, a = i, i = Yu(n), n = r, r = g;
6700
+ var y = ~~(l / 20), g = Yu(r) + Xu(y, n, i, a) + f + t[l] + qu[y] | 0;
6701
+ f = a, a = i, i = Ju(n), n = r, r = g;
6702
6702
  }
6703
6703
  this._a = r + this._a | 0, this._b = n + this._b | 0, this._c = i + this._c | 0, this._d = a + this._d | 0, this._e = f + this._e | 0;
6704
6704
  };
6705
6705
  Zt.prototype._hash = function() {
6706
- var e = ju.allocUnsafe(20);
6706
+ var e = Wu.allocUnsafe(20);
6707
6707
  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;
6708
6708
  };
6709
- var Xu = Zt, Qu = ge, Ls = Rt, Zu = Ee.Buffer, ec = [
6709
+ var Qu = Zt, Zu = ge, Ls = Tt, ec = Ee.Buffer, tc = [
6710
6710
  1116352408,
6711
6711
  1899447441,
6712
6712
  3049323471,
@@ -6771,58 +6771,58 @@ var Xu = Zt, Qu = ge, Ls = Rt, Zu = Ee.Buffer, ec = [
6771
6771
  2756734187,
6772
6772
  3204031479,
6773
6773
  3329325298
6774
- ], tc = new Array(64);
6774
+ ], rc = new Array(64);
6775
6775
  function er() {
6776
- this.init(), this._w = tc, Ls.call(this, 64, 56);
6776
+ this.init(), this._w = rc, Ls.call(this, 64, 56);
6777
6777
  }
6778
- Qu(er, Ls);
6778
+ Zu(er, Ls);
6779
6779
  er.prototype.init = function() {
6780
6780
  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;
6781
6781
  };
6782
- function rc(e, t, r) {
6782
+ function nc(e, t, r) {
6783
6783
  return r ^ e & (t ^ r);
6784
6784
  }
6785
- function nc(e, t, r) {
6785
+ function ic(e, t, r) {
6786
6786
  return e & t | r & (e | t);
6787
6787
  }
6788
- function ic(e) {
6788
+ function sc(e) {
6789
6789
  return (e >>> 2 | e << 30) ^ (e >>> 13 | e << 19) ^ (e >>> 22 | e << 10);
6790
6790
  }
6791
- function sc(e) {
6791
+ function oc(e) {
6792
6792
  return (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
6793
6793
  }
6794
- function oc(e) {
6794
+ function ac(e) {
6795
6795
  return (e >>> 7 | e << 25) ^ (e >>> 18 | e << 14) ^ e >>> 3;
6796
6796
  }
6797
- function ac(e) {
6797
+ function fc(e) {
6798
6798
  return (e >>> 17 | e << 15) ^ (e >>> 19 | e << 13) ^ e >>> 10;
6799
6799
  }
6800
6800
  er.prototype._update = function(e) {
6801
6801
  for (var t = this._w, r = this._a | 0, n = this._b | 0, i = this._c | 0, a = this._d | 0, f = this._e | 0, u = this._f | 0, l = this._g | 0, y = this._h | 0, g = 0; g < 16; ++g) t[g] = e.readInt32BE(g * 4);
6802
- for (; g < 64; ++g) t[g] = ac(t[g - 2]) + t[g - 7] + oc(t[g - 15]) + t[g - 16] | 0;
6802
+ for (; g < 64; ++g) t[g] = fc(t[g - 2]) + t[g - 7] + ac(t[g - 15]) + t[g - 16] | 0;
6803
6803
  for (var w = 0; w < 64; ++w) {
6804
- var E = y + sc(f) + rc(f, u, l) + ec[w] + t[w] | 0, I = ic(r) + nc(r, n, i) | 0;
6804
+ var E = y + oc(f) + nc(f, u, l) + tc[w] + t[w] | 0, I = sc(r) + ic(r, n, i) | 0;
6805
6805
  y = l, l = u, u = f, f = a + E | 0, a = i, i = n, n = r, r = E + I | 0;
6806
6806
  }
6807
6807
  this._a = r + this._a | 0, this._b = n + this._b | 0, this._c = i + this._c | 0, this._d = a + this._d | 0, this._e = f + this._e | 0, this._f = u + this._f | 0, this._g = l + this._g | 0, this._h = y + this._h | 0;
6808
6808
  };
6809
6809
  er.prototype._hash = function() {
6810
- var e = Zu.allocUnsafe(32);
6810
+ var e = ec.allocUnsafe(32);
6811
6811
  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;
6812
6812
  };
6813
- var ks = er, fc = ge, uc = ks, cc = Rt, lc = Ee.Buffer, hc = new Array(64);
6813
+ var ks = er, uc = ge, cc = ks, lc = Tt, hc = Ee.Buffer, dc = new Array(64);
6814
6814
  function Pr() {
6815
- this.init(), this._w = hc, cc.call(this, 64, 56);
6815
+ this.init(), this._w = dc, lc.call(this, 64, 56);
6816
6816
  }
6817
- fc(Pr, uc);
6817
+ uc(Pr, cc);
6818
6818
  Pr.prototype.init = function() {
6819
6819
  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;
6820
6820
  };
6821
6821
  Pr.prototype._hash = function() {
6822
- var e = lc.allocUnsafe(28);
6822
+ var e = hc.allocUnsafe(28);
6823
6823
  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;
6824
6824
  };
6825
- var dc = Pr, pc = ge, Fs = Rt, bc = Ee.Buffer, wi = [
6825
+ var pc = Pr, bc = ge, Fs = Tt, yc = Ee.Buffer, wi = [
6826
6826
  1116352408,
6827
6827
  3609767458,
6828
6828
  1899447441,
@@ -6983,11 +6983,11 @@ var dc = Pr, pc = ge, Fs = Rt, bc = Ee.Buffer, wi = [
6983
6983
  987167468,
6984
6984
  1816402316,
6985
6985
  1246189591
6986
- ], yc = new Array(160);
6986
+ ], gc = new Array(160);
6987
6987
  function tr() {
6988
- this.init(), this._w = yc, Fs.call(this, 128, 112);
6988
+ this.init(), this._w = gc, Fs.call(this, 128, 112);
6989
6989
  }
6990
- pc(tr, Fs);
6990
+ bc(tr, Fs);
6991
6991
  tr.prototype.init = function() {
6992
6992
  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;
6993
6993
  };
@@ -7003,16 +7003,16 @@ function vi(e, t) {
7003
7003
  function Ei(e, t) {
7004
7004
  return (e >>> 14 | t << 18) ^ (e >>> 18 | t << 14) ^ (t >>> 9 | e << 23);
7005
7005
  }
7006
- function gc(e, t) {
7006
+ function mc(e, t) {
7007
7007
  return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ e >>> 7;
7008
7008
  }
7009
- function mc(e, t) {
7009
+ function wc(e, t) {
7010
7010
  return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ (e >>> 7 | t << 25);
7011
7011
  }
7012
- function wc(e, t) {
7012
+ function _c(e, t) {
7013
7013
  return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ e >>> 6;
7014
7014
  }
7015
- function _c(e, t) {
7015
+ function xc(e, t) {
7016
7016
  return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ (e >>> 6 | t << 26);
7017
7017
  }
7018
7018
  function ue(e, t) {
@@ -7022,59 +7022,59 @@ tr.prototype._update = function(e) {
7022
7022
  for (var t = this._w, r = this._ah | 0, n = this._bh | 0, i = this._ch | 0, a = this._dh | 0, f = this._eh | 0, u = this._fh | 0, l = this._gh | 0, y = this._hh | 0, g = this._al | 0, w = this._bl | 0, E = this._cl | 0, I = this._dl | 0, v = this._el | 0, P = this._fl | 0, T = this._gl | 0, C = this._hl | 0, F = 0; F < 32; F += 2)
7023
7023
  t[F] = e.readInt32BE(F * 4), t[F + 1] = e.readInt32BE(F * 4 + 4);
7024
7024
  for (; F < 160; F += 2) {
7025
- var k = t[F - 30], L = t[F - 15 * 2 + 1], U = gc(k, L), S = mc(L, k);
7025
+ var k = t[F - 30], L = t[F - 15 * 2 + 1], U = mc(k, L), S = wc(L, k);
7026
7026
  k = t[F - 2 * 2], L = t[F - 2 * 2 + 1];
7027
- var z = wc(k, L), M = _c(L, k), $ = t[F - 7 * 2], se = t[F - 7 * 2 + 1], Te = t[F - 16 * 2], Ge = t[F - 16 * 2 + 1], ae = S + se | 0, xe = U + $ + ue(ae, S) | 0;
7028
- ae = ae + M | 0, xe = xe + z + ue(ae, M) | 0, ae = ae + Ge | 0, xe = xe + Te + ue(ae, Ge) | 0, t[F] = xe, t[F + 1] = ae;
7027
+ var z = _c(k, L), N = xc(L, k), $ = t[F - 7 * 2], se = t[F - 7 * 2 + 1], Te = t[F - 16 * 2], Ge = t[F - 16 * 2 + 1], ae = S + se | 0, xe = U + $ + ue(ae, S) | 0;
7028
+ ae = ae + N | 0, xe = xe + z + ue(ae, N) | 0, ae = ae + Ge | 0, xe = xe + Te + ue(ae, Ge) | 0, t[F] = xe, t[F + 1] = ae;
7029
7029
  }
7030
7030
  for (var ve = 0; ve < 160; ve += 2) {
7031
7031
  xe = t[ve], ae = t[ve + 1];
7032
7032
  var et = xi(r, n, i), Pe = xi(g, w, E), je = vi(r, g), Ce = vi(g, r), We = Ei(f, v), Q = Ei(v, f), oe = wi[ve], Be = wi[ve + 1], qe = _i(f, u, l), Me = _i(v, P, T), _ = C + Q | 0, m = y + We + ue(_, C) | 0;
7033
7033
  _ = _ + Me | 0, m = m + qe + ue(_, Me) | 0, _ = _ + Be | 0, m = m + oe + ue(_, Be) | 0, _ = _ + ae | 0, m = m + xe + ue(_, ae) | 0;
7034
- var R = Ce + Pe | 0, N = je + et + ue(R, Ce) | 0;
7035
- y = l, C = T, l = u, T = P, u = f, P = v, v = I + _ | 0, f = a + m + ue(v, I) | 0, a = i, I = E, i = n, E = w, n = r, w = g, g = _ + R | 0, r = m + N + ue(g, _) | 0;
7034
+ var R = Ce + Pe | 0, D = je + et + ue(R, Ce) | 0;
7035
+ y = l, C = T, l = u, T = P, u = f, P = v, v = I + _ | 0, f = a + m + ue(v, I) | 0, a = i, I = E, i = n, E = w, n = r, w = g, g = _ + R | 0, r = m + D + ue(g, _) | 0;
7036
7036
  }
7037
7037
  this._al = this._al + g | 0, this._bl = this._bl + w | 0, this._cl = this._cl + E | 0, this._dl = this._dl + I | 0, this._el = this._el + v | 0, this._fl = this._fl + P | 0, this._gl = this._gl + T | 0, this._hl = this._hl + C | 0, this._ah = this._ah + r + ue(this._al, g) | 0, this._bh = this._bh + n + ue(this._bl, w) | 0, this._ch = this._ch + i + ue(this._cl, E) | 0, this._dh = this._dh + a + ue(this._dl, I) | 0, this._eh = this._eh + f + ue(this._el, v) | 0, this._fh = this._fh + u + ue(this._fl, P) | 0, this._gh = this._gh + l + ue(this._gl, T) | 0, this._hh = this._hh + y + ue(this._hl, C) | 0;
7038
7038
  };
7039
7039
  tr.prototype._hash = function() {
7040
- var e = bc.allocUnsafe(64);
7040
+ var e = yc.allocUnsafe(64);
7041
7041
  function t(r, n, i) {
7042
7042
  e.writeInt32BE(r, i), e.writeInt32BE(n, i + 4);
7043
7043
  }
7044
7044
  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;
7045
7045
  };
7046
- var Us = tr, xc = ge, vc = Us, Ec = Rt, Bc = Ee.Buffer, Sc = new Array(160);
7046
+ var Us = tr, vc = ge, Ec = Us, Bc = Tt, Sc = Ee.Buffer, Ic = new Array(160);
7047
7047
  function Cr() {
7048
- this.init(), this._w = Sc, Ec.call(this, 128, 112);
7048
+ this.init(), this._w = Ic, Bc.call(this, 128, 112);
7049
7049
  }
7050
- xc(Cr, vc);
7050
+ vc(Cr, Ec);
7051
7051
  Cr.prototype.init = function() {
7052
7052
  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;
7053
7053
  };
7054
7054
  Cr.prototype._hash = function() {
7055
- var e = Bc.allocUnsafe(48);
7055
+ var e = Sc.allocUnsafe(48);
7056
7056
  function t(r, n, i) {
7057
7057
  e.writeInt32BE(r, i), e.writeInt32BE(n, i + 4);
7058
7058
  }
7059
7059
  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;
7060
7060
  };
7061
- var Ic = Cr, lt = Rs.exports = function(t) {
7061
+ var Ac = Cr, lt = Rs.exports = function(t) {
7062
7062
  t = t.toLowerCase();
7063
7063
  var r = lt[t];
7064
7064
  if (!r) throw new Error(t + " is not supported (we accept pull requests)");
7065
7065
  return new r();
7066
7066
  };
7067
- lt.sha = zu;
7068
- lt.sha1 = Xu;
7069
- lt.sha224 = dc;
7067
+ lt.sha = Gu;
7068
+ lt.sha1 = Qu;
7069
+ lt.sha224 = pc;
7070
7070
  lt.sha256 = ks;
7071
- lt.sha384 = Ic;
7071
+ lt.sha384 = Ac;
7072
7072
  lt.sha512 = Us;
7073
- var Ac = Rs.exports, Os = Ee.Buffer, Ms = Rn.Transform, Rc = gr.StringDecoder, Tc = ge;
7073
+ var Rc = Rs.exports, Os = Ee.Buffer, Ms = Rn.Transform, Tc = gr.StringDecoder, Pc = ge;
7074
7074
  function Le(e) {
7075
7075
  Ms.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;
7076
7076
  }
7077
- Tc(Le, Ms);
7077
+ Pc(Le, Ms);
7078
7078
  Le.prototype.update = function(e, t, r) {
7079
7079
  typeof e == "string" && (e = Os.from(e, t));
7080
7080
  var n = this._update(e);
@@ -7115,25 +7115,25 @@ Le.prototype._finalOrDigest = function(e) {
7115
7115
  return e && (t = this._toString(t, e, !0)), t;
7116
7116
  };
7117
7117
  Le.prototype._toString = function(e, t, r) {
7118
- if (this._decoder || (this._decoder = new Rc(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
7118
+ if (this._decoder || (this._decoder = new Tc(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
7119
7119
  var n = this._decoder.write(e);
7120
7120
  return r && (n += this._decoder.end()), n;
7121
7121
  };
7122
- var Pc = Le, Cc = ge, Lc = Cu, kc = Fu, Fc = Ac, Ns = Pc;
7122
+ var Cc = Le, Lc = ge, kc = Lu, Fc = Uu, Uc = Rc, Ns = Cc;
7123
7123
  function Lr(e) {
7124
7124
  Ns.call(this, "digest"), this._hash = e;
7125
7125
  }
7126
- Cc(Lr, Ns);
7126
+ Lc(Lr, Ns);
7127
7127
  Lr.prototype._update = function(e) {
7128
7128
  this._hash.update(e);
7129
7129
  };
7130
7130
  Lr.prototype._final = function() {
7131
7131
  return this._hash.digest();
7132
7132
  };
7133
- var Uc = function(t) {
7134
- return t = t.toLowerCase(), t === "md5" ? new Lc() : t === "rmd160" || t === "ripemd160" ? new kc() : new Lr(Fc(t));
7133
+ var Oc = function(t) {
7134
+ return t = t.toLowerCase(), t === "md5" ? new kc() : t === "rmd160" || t === "ripemd160" ? new Fc() : new Lr(Uc(t));
7135
7135
  }, ar = Ee.Buffer;
7136
- function Oc(e) {
7136
+ function Mc(e) {
7137
7137
  if (e.length >= 255)
7138
7138
  throw new TypeError("Alphabet too long");
7139
7139
  for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
@@ -7161,9 +7161,9 @@ function Oc(e) {
7161
7161
  }
7162
7162
  for (var z = F - P; z !== F && k[z] === 0; )
7163
7163
  z++;
7164
- for (var M = u.repeat(v); z < F; ++z)
7165
- M += e.charAt(k[z]);
7166
- return M;
7164
+ for (var N = u.repeat(v); z < F; ++z)
7165
+ N += e.charAt(k[z]);
7166
+ return N;
7167
7167
  }
7168
7168
  function w(I) {
7169
7169
  if (typeof I != "string")
@@ -7186,8 +7186,8 @@ function Oc(e) {
7186
7186
  S++;
7187
7187
  var z = ar.allocUnsafe(P + (C - S));
7188
7188
  z.fill(0, 0, P);
7189
- for (var M = P; S !== C; )
7190
- z[M++] = F[S++];
7189
+ for (var N = P; S !== C; )
7190
+ z[N++] = F[S++];
7191
7191
  return z;
7192
7192
  }
7193
7193
  function E(I) {
@@ -7202,10 +7202,10 @@ function Oc(e) {
7202
7202
  decode: E
7203
7203
  };
7204
7204
  }
7205
- var Mc = Oc, Nc = Mc, Dc = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", $c = Nc(Dc), Xr = $c, Hc = Ee.Buffer, zc = function(e) {
7205
+ var Nc = Mc, Dc = Nc, $c = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", Hc = Dc($c), Xr = Hc, zc = Ee.Buffer, Gc = function(e) {
7206
7206
  function t(a) {
7207
7207
  var f = e(a);
7208
- return Xr.encode(Hc.concat([
7208
+ return Xr.encode(zc.concat([
7209
7209
  a,
7210
7210
  f
7211
7211
  ], a.length + 4));
@@ -7230,12 +7230,12 @@ var Mc = Oc, Nc = Mc, Dc = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrst
7230
7230
  decode: i,
7231
7231
  decodeUnsafe: n
7232
7232
  };
7233
- }, Bi = Uc, Gc = zc;
7234
- function jc(e) {
7233
+ }, Bi = Oc, jc = Gc;
7234
+ function Wc(e) {
7235
7235
  var t = Bi("sha256").update(e).digest();
7236
7236
  return Bi("sha256").update(t).digest();
7237
7237
  }
7238
- var Wc = Gc(jc), cn = Wc;
7238
+ var qc = jc(Wc), cn = qc;
7239
7239
  function Ds(e, t) {
7240
7240
  if (t !== void 0 && e[0] !== t) throw new Error("Invalid network version");
7241
7241
  if (e.length === 33)
@@ -7256,10 +7256,10 @@ function ln(e, t, r) {
7256
7256
  var n = new Buffer(r ? 34 : 33);
7257
7257
  return n.writeUInt8(e, 0), t.copy(n, 1), r && (n[33] = 1), n;
7258
7258
  }
7259
- function qc(e, t) {
7259
+ function Vc(e, t) {
7260
7260
  return Ds(cn.decode(e), t);
7261
7261
  }
7262
- function Vc(e, t, r) {
7262
+ function Kc(e, t, r) {
7263
7263
  return typeof e == "number" ? cn.encode(ln(e, t, r)) : cn.encode(
7264
7264
  ln(
7265
7265
  e.version,
@@ -7268,16 +7268,16 @@ function Vc(e, t, r) {
7268
7268
  )
7269
7269
  );
7270
7270
  }
7271
- var Kc = {
7272
- decode: qc,
7271
+ var Yc = {
7272
+ decode: Vc,
7273
7273
  decodeRaw: Ds,
7274
- encode: Vc,
7274
+ encode: Kc,
7275
7275
  encodeRaw: ln
7276
7276
  }, kr = {};
7277
7277
  Object.defineProperty(kr, "__esModule", { value: !0 });
7278
7278
  kr.testEcc = void 0;
7279
7279
  const H = (e) => Buffer.from(e, "hex");
7280
- function Yc(e) {
7280
+ function Jc(e) {
7281
7281
  J(
7282
7282
  e.isPoint(
7283
7283
  H("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
@@ -7467,22 +7467,22 @@ function Yc(e) {
7467
7467
  )
7468
7468
  );
7469
7469
  }
7470
- kr.testEcc = Yc;
7470
+ kr.testEcc = Jc;
7471
7471
  function J(e) {
7472
7472
  if (!e) throw new Error("ecc library invalid");
7473
7473
  }
7474
- Object.defineProperty(vt, "__esModule", { value: !0 });
7475
- vt.ECPairFactory = vt.networks = void 0;
7476
- const hn = Et;
7477
- vt.networks = hn;
7478
- const we = Qi, Jc = Ef, Si = Kc, Xc = kr, Qr = we.typeforce.maybe(
7474
+ Object.defineProperty(Et, "__esModule", { value: !0 });
7475
+ Et.ECPairFactory = Et.networks = void 0;
7476
+ const hn = Bt;
7477
+ Et.networks = hn;
7478
+ const we = Qi, Xc = Bf, Si = Yc, Qc = kr, Qr = we.typeforce.maybe(
7479
7479
  we.typeforce.compile({
7480
7480
  compressed: we.maybe(we.Boolean),
7481
7481
  network: we.maybe(we.Network)
7482
7482
  })
7483
- ), Qc = (e) => e.length === 32 ? e : e.slice(1, 33);
7484
- function Zc(e) {
7485
- (0, Xc.testEcc)(e);
7483
+ ), Zc = (e) => e.length === 32 ? e : e.slice(1, 33);
7484
+ function e0(e) {
7485
+ (0, Qc.testEcc)(e);
7486
7486
  function t(u) {
7487
7487
  return e.isPoint(u);
7488
7488
  }
@@ -7506,7 +7506,7 @@ function Zc(e) {
7506
7506
  }
7507
7507
  function a(u) {
7508
7508
  we.typeforce(Qr, u), u === void 0 && (u = {});
7509
- const l = u.rng || Jc;
7509
+ const l = u.rng || Xc;
7510
7510
  let y;
7511
7511
  do
7512
7512
  y = l(32), we.typeforce(we.Buffer256bit, y);
@@ -7567,7 +7567,7 @@ function Zc(e) {
7567
7567
  return e.verifySchnorr(l, this.publicKey.subarray(1, 33), y);
7568
7568
  }
7569
7569
  tweakFromPublicKey(l) {
7570
- const y = Qc(this.publicKey), g = e.xOnlyPointAddTweak(y, l);
7570
+ const y = Zc(this.publicKey), g = e.xOnlyPointAddTweak(y, l);
7571
7571
  if (!g || g.xOnlyPubkey === null)
7572
7572
  throw new Error("Cannot tweak public key!");
7573
7573
  const w = Buffer.from([
@@ -7595,10 +7595,10 @@ function Zc(e) {
7595
7595
  makeRandom: a
7596
7596
  };
7597
7597
  }
7598
- vt.ECPairFactory = Zc;
7598
+ Et.ECPairFactory = e0;
7599
7599
  (function(e) {
7600
7600
  Object.defineProperty(e, "__esModule", { value: !0 }), e.networks = e.ECPairFactory = e.default = void 0;
7601
- var t = vt;
7601
+ var t = Et;
7602
7602
  Object.defineProperty(e, "default", {
7603
7603
  enumerable: !0,
7604
7604
  get: function() {
@@ -7624,7 +7624,7 @@ class dn {
7624
7624
  return new dn(nt(t));
7625
7625
  }
7626
7626
  static async fromWalletClient(t) {
7627
- if (!t.account) return D("No account found");
7627
+ if (!t.account) return M("No account found");
7628
7628
  try {
7629
7629
  const r = await t.signTypedData({
7630
7630
  account: t.account,
@@ -7652,7 +7652,7 @@ class dn {
7652
7652
  });
7653
7653
  return fe(new dn(nt(ir(r))));
7654
7654
  } catch (r) {
7655
- return D("Failed to initialize: " + r);
7655
+ return M("Failed to initialize: " + r);
7656
7656
  }
7657
7657
  }
7658
7658
  getMasterPrivKey() {
@@ -7663,13 +7663,13 @@ class dn {
7663
7663
  return fe({ secret: n, secretHash: i });
7664
7664
  }
7665
7665
  signMessage(t) {
7666
- const r = Xi.ECPairFactory(_t), n = "Garden.fi" + t.toString(), i = Buffer.from(n, "utf8"), a = ir(i), f = Buffer.from(nt(this.privKey), "hex");
7666
+ const r = Xi.ECPairFactory(xt), n = "Garden.fi" + t.toString(), i = Buffer.from(n, "utf8"), a = ir(i), f = Buffer.from(nt(this.privKey), "hex");
7667
7667
  if (f.length !== 32)
7668
7668
  throw new Error("Invalid private key length. Expected 32 bytes.");
7669
7669
  return r.fromPrivateKey(f).sign(Buffer.from(nt(a), "hex")).toString("hex");
7670
7670
  }
7671
7671
  }
7672
- class h0 {
7672
+ class d0 {
7673
7673
  constructor(t) {
7674
7674
  this.quoteUrl = new pn("/quote", t);
7675
7675
  }
@@ -7679,38 +7679,66 @@ class h0 {
7679
7679
  order_pair: t,
7680
7680
  amount: r.toString(),
7681
7681
  exact_out: n.toString()
7682
- }), a = await Gt.get(i);
7683
- return a.error ? D(a.error) : a.result ? fe(a.result) : D("GetQuote: Unexpected error, result is undefined");
7682
+ }), a = await mt.get(i);
7683
+ return a.error ? M(a.error) : a.result ? fe(a.result) : M("GetQuote: Unexpected error, result is undefined");
7684
7684
  } catch (i) {
7685
- return D("GetQuote:", String(i));
7685
+ return M("GetQuote:", String(i));
7686
7686
  }
7687
7687
  }
7688
7688
  async getAttestedQuote(t) {
7689
7689
  try {
7690
- const r = await Gt.post(this.quoteUrl.endpoint("/attested").toString(), {
7690
+ const r = await mt.post(this.quoteUrl.endpoint("/attested").toString(), {
7691
7691
  body: JSON.stringify(t),
7692
7692
  headers: {
7693
7693
  "Content-Type": "application/json"
7694
7694
  }
7695
7695
  });
7696
- return r.error ? D(r.error) : r.result ? fe(r.result) : D("GetAttestedQuote: Unexpected error, result is undefined");
7696
+ return r.error ? M(r.error) : r.result ? fe(r.result) : M("GetAttestedQuote: Unexpected error, result is undefined");
7697
7697
  } catch (r) {
7698
- return console.log("error :", r), D("GetAttestedQuote:", String(r));
7698
+ return console.log("error :", r), M("GetAttestedQuote:", String(r));
7699
+ }
7700
+ }
7701
+ async getStrategies() {
7702
+ try {
7703
+ const t = await mt.get(
7704
+ this.quoteUrl.endpoint("/strategies")
7705
+ );
7706
+ if (t.error) return M(t.error);
7707
+ if (!t.result)
7708
+ return M("GetStrategies: Unexpected error, result is undefined");
7709
+ const r = {};
7710
+ for (const n of Object.values(t.result)) {
7711
+ const i = Wa(
7712
+ n.source_chain,
7713
+ n.source_asset.asset,
7714
+ n.dest_chain,
7715
+ n.dest_asset.asset
7716
+ );
7717
+ r[i] = {
7718
+ id: n.id,
7719
+ minAmount: n.min_amount,
7720
+ maxAmount: n.max_amount
7721
+ };
7722
+ }
7723
+ return fe(r);
7724
+ } catch (t) {
7725
+ return M("GetStrategies:", String(t));
7699
7726
  }
7700
7727
  }
7701
7728
  }
7702
7729
  export {
7703
- tf as BlockNumberFetcher,
7704
- Ka as EvmRelay,
7705
- c0 as Garden,
7730
+ rf as BlockNumberFetcher,
7731
+ Ya as EvmRelay,
7732
+ l0 as Garden,
7706
7733
  ye as OrderActions,
7707
7734
  ie as OrderStatus,
7708
- Wa as ParseOrderStatus,
7735
+ qa as ParseOrderStatus,
7709
7736
  nn as ParseSwapStatus,
7710
- h0 as Quote,
7737
+ d0 as Quote,
7711
7738
  dn as SecretManager,
7712
7739
  te as SwapStatus,
7713
7740
  en as TimeLocks,
7714
- qa as parseAction,
7715
- u0 as switchOrAddNetwork
7741
+ Wa as constructOrderPair,
7742
+ Va as parseAction,
7743
+ c0 as switchOrAddNetwork
7716
7744
  };