@gardenfi/core 0.2.0-beta.75 → 0.2.0-beta.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +31 -1
- package/dist/index.js +7813 -28
- package/package.json +1 -1
- package/dist/index10.cjs +0 -1
- package/dist/index10.js +0 -112
- package/dist/index100.cjs +0 -1
- package/dist/index100.js +0 -23
- package/dist/index101.cjs +0 -1
- package/dist/index101.js +0 -9
- package/dist/index102.cjs +0 -1
- package/dist/index102.js +0 -35
- package/dist/index103.cjs +0 -1
- package/dist/index103.js +0 -4
- package/dist/index104.cjs +0 -1
- package/dist/index104.js +0 -40
- package/dist/index105.cjs +0 -1
- package/dist/index105.js +0 -31
- package/dist/index106.cjs +0 -1
- package/dist/index106.js +0 -9
- package/dist/index107.cjs +0 -1
- package/dist/index107.js +0 -7
- package/dist/index108.cjs +0 -1
- package/dist/index108.js +0 -13
- package/dist/index109.cjs +0 -1
- package/dist/index109.js +0 -4
- package/dist/index11.cjs +0 -20
- package/dist/index11.js +0 -380
- package/dist/index110.cjs +0 -1
- package/dist/index110.js +0 -60
- package/dist/index111.cjs +0 -1
- package/dist/index111.js +0 -4
- package/dist/index112.cjs +0 -1
- package/dist/index112.js +0 -42
- package/dist/index113.cjs +0 -1
- package/dist/index113.js +0 -45
- package/dist/index114.cjs +0 -1
- package/dist/index114.js +0 -20
- package/dist/index115.cjs +0 -1
- package/dist/index115.js +0 -111
- package/dist/index116.cjs +0 -1
- package/dist/index116.js +0 -23
- package/dist/index117.cjs +0 -1
- package/dist/index117.js +0 -228
- package/dist/index118.cjs +0 -1
- package/dist/index118.js +0 -6
- package/dist/index119.cjs +0 -1
- package/dist/index119.js +0 -160
- package/dist/index12.cjs +0 -1
- package/dist/index12.js +0 -22
- package/dist/index120.cjs +0 -1
- package/dist/index120.js +0 -4
- package/dist/index121.cjs +0 -1
- package/dist/index121.js +0 -75
- package/dist/index122.cjs +0 -1
- package/dist/index122.js +0 -64
- package/dist/index123.cjs +0 -1
- package/dist/index123.js +0 -37
- package/dist/index124.cjs +0 -1
- package/dist/index124.js +0 -7
- package/dist/index125.cjs +0 -1
- package/dist/index125.js +0 -107
- package/dist/index126.cjs +0 -1
- package/dist/index126.js +0 -15
- package/dist/index127.cjs +0 -1
- package/dist/index127.js +0 -35
- package/dist/index128.cjs +0 -1
- package/dist/index128.js +0 -4
- package/dist/index129.cjs +0 -1
- package/dist/index129.js +0 -32
- package/dist/index13.cjs +0 -1
- package/dist/index13.js +0 -396
- package/dist/index130.cjs +0 -1
- package/dist/index130.js +0 -4
- package/dist/index131.cjs +0 -1
- package/dist/index131.js +0 -358
- package/dist/index132.cjs +0 -1
- package/dist/index132.js +0 -241
- package/dist/index133.cjs +0 -1
- package/dist/index133.js +0 -70
- package/dist/index134.cjs +0 -1
- package/dist/index134.js +0 -64
- package/dist/index135.cjs +0 -1
- package/dist/index135.js +0 -14
- package/dist/index136.cjs +0 -1
- package/dist/index136.js +0 -47
- package/dist/index137.cjs +0 -1
- package/dist/index137.js +0 -65
- package/dist/index138.cjs +0 -1
- package/dist/index138.js +0 -21
- package/dist/index139.cjs +0 -1
- package/dist/index139.js +0 -228
- package/dist/index14.cjs +0 -1
- package/dist/index14.js +0 -28
- package/dist/index140.cjs +0 -1
- package/dist/index140.js +0 -5
- package/dist/index141.cjs +0 -1
- package/dist/index141.js +0 -171
- package/dist/index142.cjs +0 -1
- package/dist/index142.js +0 -30
- package/dist/index143.cjs +0 -1
- package/dist/index143.js +0 -23
- package/dist/index144.cjs +0 -1
- package/dist/index144.js +0 -72
- package/dist/index145.cjs +0 -1
- package/dist/index145.js +0 -130
- package/dist/index146.cjs +0 -1
- package/dist/index146.js +0 -9
- package/dist/index147.cjs +0 -1
- package/dist/index147.js +0 -4
- package/dist/index148.cjs +0 -1
- package/dist/index148.js +0 -28
- package/dist/index149.cjs +0 -1
- package/dist/index149.js +0 -4
- package/dist/index15.cjs +0 -1
- package/dist/index15.js +0 -34
- package/dist/index16.cjs +0 -1
- package/dist/index16.js +0 -27
- package/dist/index17.cjs +0 -1
- package/dist/index17.js +0 -33
- package/dist/index18.cjs +0 -1
- package/dist/index18.js +0 -32
- package/dist/index19.cjs +0 -1
- package/dist/index19.js +0 -55
- package/dist/index2.cjs +0 -1
- package/dist/index2.js +0 -412
- package/dist/index20.cjs +0 -1
- package/dist/index20.js +0 -28
- package/dist/index21.cjs +0 -1
- package/dist/index21.js +0 -4
- package/dist/index22.cjs +0 -1
- package/dist/index22.js +0 -140
- package/dist/index23.cjs +0 -1
- package/dist/index23.js +0 -4
- package/dist/index24.cjs +0 -1
- package/dist/index24.js +0 -11
- package/dist/index25.cjs +0 -1
- package/dist/index25.js +0 -11
- package/dist/index26.cjs +0 -3
- package/dist/index26.js +0 -30
- package/dist/index27.cjs +0 -1
- package/dist/index27.js +0 -17
- package/dist/index28.cjs +0 -2
- package/dist/index28.js +0 -27
- package/dist/index29.cjs +0 -1
- package/dist/index29.js +0 -43
- package/dist/index3.cjs +0 -1
- package/dist/index3.js +0 -5
- package/dist/index30.cjs +0 -1
- package/dist/index30.js +0 -201
- package/dist/index31.cjs +0 -1
- package/dist/index31.js +0 -4
- package/dist/index32.cjs +0 -1
- package/dist/index32.js +0 -4
- package/dist/index33.cjs +0 -1
- package/dist/index33.js +0 -4
- package/dist/index34.cjs +0 -1
- package/dist/index34.js +0 -15
- package/dist/index35.cjs +0 -1
- package/dist/index35.js +0 -39
- package/dist/index36.cjs +0 -1
- package/dist/index36.js +0 -44
- package/dist/index37.cjs +0 -1
- package/dist/index37.js +0 -30
- package/dist/index38.cjs +0 -1
- package/dist/index38.js +0 -17
- package/dist/index39.cjs +0 -1
- package/dist/index39.js +0 -26
- package/dist/index4.cjs +0 -1
- package/dist/index4.js +0 -18
- package/dist/index40.cjs +0 -1
- package/dist/index40.js +0 -28
- package/dist/index41.cjs +0 -1
- package/dist/index41.js +0 -57
- package/dist/index42.cjs +0 -1
- package/dist/index42.js +0 -30
- package/dist/index43.cjs +0 -1
- package/dist/index43.js +0 -177
- package/dist/index44.cjs +0 -1
- package/dist/index44.js +0 -4
- package/dist/index45.cjs +0 -1
- package/dist/index45.js +0 -37
- package/dist/index46.cjs +0 -1
- package/dist/index46.js +0 -11
- package/dist/index47.cjs +0 -1
- package/dist/index47.js +0 -15
- package/dist/index48.cjs +0 -1
- package/dist/index48.js +0 -14
- package/dist/index49.cjs +0 -1
- package/dist/index49.js +0 -6
- package/dist/index5.cjs +0 -1
- package/dist/index5.js +0 -99
- package/dist/index50.cjs +0 -1
- package/dist/index50.js +0 -48
- package/dist/index51.cjs +0 -1
- package/dist/index51.js +0 -45
- package/dist/index52.cjs +0 -1
- package/dist/index52.js +0 -174
- package/dist/index53.cjs +0 -1
- package/dist/index53.js +0 -15
- package/dist/index54.cjs +0 -1
- package/dist/index54.js +0 -7
- package/dist/index55.cjs +0 -1
- package/dist/index55.js +0 -19
- package/dist/index56.cjs +0 -1
- package/dist/index56.js +0 -14
- package/dist/index57.cjs +0 -1
- package/dist/index57.js +0 -22
- package/dist/index58.cjs +0 -1
- package/dist/index58.js +0 -34
- package/dist/index59.cjs +0 -1
- package/dist/index59.js +0 -4
- package/dist/index6.cjs +0 -1
- package/dist/index6.js +0 -5
- package/dist/index60.cjs +0 -6
- package/dist/index60.js +0 -949
- package/dist/index61.cjs +0 -1
- package/dist/index61.js +0 -4
- package/dist/index62.cjs +0 -1
- package/dist/index62.js +0 -64
- package/dist/index63.cjs +0 -1
- package/dist/index63.js +0 -35
- package/dist/index64.cjs +0 -1
- package/dist/index64.js +0 -89
- package/dist/index65.cjs +0 -1
- package/dist/index65.js +0 -58
- package/dist/index66.cjs +0 -2
- package/dist/index66.js +0 -62
- package/dist/index67.cjs +0 -1
- package/dist/index67.js +0 -6
- package/dist/index68.cjs +0 -1
- package/dist/index68.js +0 -37
- package/dist/index69.cjs +0 -1
- package/dist/index69.js +0 -130
- package/dist/index7.cjs +0 -1
- package/dist/index7.js +0 -76
- package/dist/index70.cjs +0 -2
- package/dist/index70.js +0 -45
- package/dist/index71.cjs +0 -1
- package/dist/index71.js +0 -11
- package/dist/index72.cjs +0 -1
- package/dist/index72.js +0 -13
- package/dist/index73.cjs +0 -1
- package/dist/index73.js +0 -14
- package/dist/index74.cjs +0 -1
- package/dist/index74.js +0 -16
- package/dist/index75.cjs +0 -1
- package/dist/index75.js +0 -9
- package/dist/index76.cjs +0 -1
- package/dist/index76.js +0 -20
- package/dist/index77.cjs +0 -1
- package/dist/index77.js +0 -81
- package/dist/index78.cjs +0 -1
- package/dist/index78.js +0 -17
- package/dist/index79.cjs +0 -1
- package/dist/index79.js +0 -21
- package/dist/index8.cjs +0 -1
- package/dist/index8.js +0 -61
- package/dist/index80.cjs +0 -1
- package/dist/index80.js +0 -24
- package/dist/index81.cjs +0 -1
- package/dist/index81.js +0 -16
- package/dist/index82.cjs +0 -1
- package/dist/index82.js +0 -9
- package/dist/index83.cjs +0 -1
- package/dist/index83.js +0 -4
- package/dist/index84.cjs +0 -1
- package/dist/index84.js +0 -4
- package/dist/index85.cjs +0 -2
- package/dist/index85.js +0 -37
- package/dist/index86.cjs +0 -1
- package/dist/index86.js +0 -8
- package/dist/index87.cjs +0 -1
- package/dist/index87.js +0 -22
- package/dist/index88.cjs +0 -1
- package/dist/index88.js +0 -37
- package/dist/index89.cjs +0 -1
- package/dist/index89.js +0 -369
- package/dist/index9.cjs +0 -1
- package/dist/index9.js +0 -63
- package/dist/index90.cjs +0 -1
- package/dist/index90.js +0 -23
- package/dist/index91.cjs +0 -1
- package/dist/index91.js +0 -58
- package/dist/index92.cjs +0 -1
- package/dist/index92.js +0 -5
- package/dist/index93.cjs +0 -1
- package/dist/index93.js +0 -51
- package/dist/index94.cjs +0 -1
- package/dist/index94.js +0 -28
- package/dist/index95.cjs +0 -1
- package/dist/index95.js +0 -4
- package/dist/index96.cjs +0 -1
- package/dist/index96.js +0 -4
- package/dist/index97.cjs +0 -1
- package/dist/index97.js +0 -15
- package/dist/index98.cjs +0 -1
- package/dist/index98.js +0 -9
- package/dist/index99.cjs +0 -1
- package/dist/index99.js +0 -115
package/dist/index51.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { BaseError as l } from "./index66.js";
|
|
2
|
-
import { createCursor as r } from "./index69.js";
|
|
3
|
-
import { hexToBytes as g } from "./index65.js";
|
|
4
|
-
import { bytesToHex as u } from "./index50.js";
|
|
5
|
-
function m(n, e = "hex") {
|
|
6
|
-
const i = s(n), h = r(new Uint8Array(i.length));
|
|
7
|
-
return i.encode(h), e === "hex" ? u(h.bytes) : h.bytes;
|
|
8
|
-
}
|
|
9
|
-
function s(n) {
|
|
10
|
-
return Array.isArray(n) ? p(n.map((e) => s(e))) : y(n);
|
|
11
|
-
}
|
|
12
|
-
function p(n) {
|
|
13
|
-
const e = n.reduce((t, f) => t + f.length, 0), i = o(e);
|
|
14
|
-
return {
|
|
15
|
-
length: e <= 55 ? 1 + e : 1 + i + e,
|
|
16
|
-
encode(t) {
|
|
17
|
-
e <= 55 ? t.pushByte(192 + e) : (t.pushByte(247 + i), i === 1 ? t.pushUint8(e) : i === 2 ? t.pushUint16(e) : i === 3 ? t.pushUint24(e) : t.pushUint32(e));
|
|
18
|
-
for (const { encode: f } of n)
|
|
19
|
-
f(t);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function y(n) {
|
|
24
|
-
const e = typeof n == "string" ? g(n) : n, i = o(e.length);
|
|
25
|
-
return {
|
|
26
|
-
length: e.length === 1 && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + i + e.length,
|
|
27
|
-
encode(t) {
|
|
28
|
-
e.length === 1 && e[0] < 128 ? t.pushBytes(e) : e.length <= 55 ? (t.pushByte(128 + e.length), t.pushBytes(e)) : (t.pushByte(183 + i), i === 1 ? t.pushUint8(e.length) : i === 2 ? t.pushUint16(e.length) : i === 3 ? t.pushUint24(e.length) : t.pushUint32(e.length), t.pushBytes(e));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function o(n) {
|
|
33
|
-
if (n < 2 ** 8)
|
|
34
|
-
return 1;
|
|
35
|
-
if (n < 2 ** 16)
|
|
36
|
-
return 2;
|
|
37
|
-
if (n < 2 ** 24)
|
|
38
|
-
return 3;
|
|
39
|
-
if (n < 2 ** 32)
|
|
40
|
-
return 4;
|
|
41
|
-
throw new l("Length is too large.");
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
m as toRlp
|
|
45
|
-
};
|
package/dist/index52.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index70.cjs"),G=require("./index71.cjs"),R=require("./index72.cjs"),S=require("./index73.cjs"),B=require("./index74.cjs"),L=require("./index49.cjs"),h=require("./index75.cjs"),t=require("./index50.cjs"),b=require("./index51.cjs"),V=require("./index76.cjs"),z=require("./index77.cjs"),C=require("./index78.cjs"),v=require("./index79.cjs");function k(e,o){const s=C.getTransactionType(e);return s==="eip1559"?_(e,o):s==="eip2930"?j(e,o):s==="eip4844"?Y(e,o):s==="eip7702"?w(e,o):M(e,o)}function w(e,o){const{authorizationList:s,chainId:i,gas:r,nonce:c,to:a,value:x,maxFeePerGas:l,maxPriorityFeePerGas:n,accessList:H,data:d}=e;z.assertTransactionEIP7702(e);const f=v.serializeAccessList(H),u=V.serializeAuthorizationList(s);return L.concatHex(["0x04",b.toRlp([t.toHex(i),c?t.toHex(c):"0x",n?t.toHex(n):"0x",l?t.toHex(l):"0x",r?t.toHex(r):"0x",a??"0x",x?t.toHex(x):"0x",d??"0x",f,u,...T(e,o)])])}function Y(e,o){const{chainId:s,gas:i,nonce:r,to:c,value:a,maxFeePerBlobGas:x,maxFeePerGas:l,maxPriorityFeePerGas:n,accessList:H,data:d}=e;z.assertTransactionEIP4844(e);let f=e.blobVersionedHashes,u=e.sidecars;if(e.blobs&&(typeof f>"u"||typeof u>"u")){const m=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(y=>t.bytesToHex(y)),P=e.kzg,p=G.blobsToCommitments({blobs:m,kzg:P});if(typeof f>"u"&&(f=S.commitmentsToVersionedHashes({commitments:p})),typeof u>"u"){const y=R.blobsToProofs({blobs:m,commitments:p,kzg:P});u=B.toBlobSidecars({blobs:m,commitments:p,proofs:y})}}const I=v.serializeAccessList(H),A=[t.toHex(s),r?t.toHex(r):"0x",n?t.toHex(n):"0x",l?t.toHex(l):"0x",i?t.toHex(i):"0x",c??"0x",a?t.toHex(a):"0x",d??"0x",I,x?t.toHex(x):"0x",f??[],...T(e,o)],q=[],g=[],E=[];if(u)for(let m=0;m<u.length;m++){const{blob:P,commitment:p,proof:y}=u[m];q.push(P),g.push(p),E.push(y)}return L.concatHex(["0x03",u?b.toRlp([A,q,g,E]):b.toRlp(A)])}function _(e,o){const{chainId:s,gas:i,nonce:r,to:c,value:a,maxFeePerGas:x,maxPriorityFeePerGas:l,accessList:n,data:H}=e;z.assertTransactionEIP1559(e);const d=v.serializeAccessList(n),f=[t.toHex(s),r?t.toHex(r):"0x",l?t.toHex(l):"0x",x?t.toHex(x):"0x",i?t.toHex(i):"0x",c??"0x",a?t.toHex(a):"0x",H??"0x",d,...T(e,o)];return L.concatHex(["0x02",b.toRlp(f)])}function j(e,o){const{chainId:s,gas:i,data:r,nonce:c,to:a,value:x,accessList:l,gasPrice:n}=e;z.assertTransactionEIP2930(e);const H=v.serializeAccessList(l),d=[t.toHex(s),c?t.toHex(c):"0x",n?t.toHex(n):"0x",i?t.toHex(i):"0x",a??"0x",x?t.toHex(x):"0x",r??"0x",H,...T(e,o)];return L.concatHex(["0x01",b.toRlp(d)])}function M(e,o){const{chainId:s=0,gas:i,data:r,nonce:c,to:a,value:x,gasPrice:l}=e;z.assertTransactionLegacy(e);let n=[c?t.toHex(c):"0x",l?t.toHex(l):"0x",i?t.toHex(i):"0x",a??"0x",x?t.toHex(x):"0x",r??"0x"];if(o){const H=(()=>{if(o.v>=35n)return(o.v-35n)/2n>0?o.v:27n+(o.v===35n?0n:1n);if(s>0)return BigInt(s*2)+BigInt(35n+o.v-27n);const u=27n+(o.v===27n?0n:1n);if(o.v!==u)throw new F.InvalidLegacyVError({v:o.v});return u})(),d=h.trim(o.r),f=h.trim(o.s);n=[...n,t.toHex(H),d==="0x00"?"0x":d,f==="0x00"?"0x":f]}else s>0&&(n=[...n,t.toHex(s),"0x","0x"]);return b.toRlp(n)}function T(e,o){const s=o??e,{v:i,yParity:r}=s;if(typeof s.r>"u")return[];if(typeof s.s>"u")return[];if(typeof i>"u"&&typeof r>"u")return[];const c=h.trim(s.r),a=h.trim(s.s);return[typeof r=="number"?r?t.toHex(1):"0x":i===0n?"0x":i===1n?t.toHex(1):i===27n?"0x":t.toHex(1),c==="0x00"?"0x":c,a==="0x00"?"0x":a]}exports.serializeTransaction=k;exports.toYParitySignatureArray=T;
|
package/dist/index52.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { InvalidLegacyVError as H } from "./index70.js";
|
|
2
|
-
import { blobsToCommitments as g } from "./index71.js";
|
|
3
|
-
import { blobsToProofs as B } from "./index72.js";
|
|
4
|
-
import { commitmentsToVersionedHashes as V } from "./index73.js";
|
|
5
|
-
import { toBlobSidecars as C } from "./index74.js";
|
|
6
|
-
import { concatHex as h } from "./index49.js";
|
|
7
|
-
import { trim as T } from "./index75.js";
|
|
8
|
-
import { toHex as o, bytesToHex as k } from "./index50.js";
|
|
9
|
-
import { toRlp as y } from "./index51.js";
|
|
10
|
-
import { serializeAuthorizationList as w } from "./index76.js";
|
|
11
|
-
import { assertTransactionEIP7702 as S, assertTransactionEIP4844 as _, assertTransactionEIP1559 as R, assertTransactionEIP2930 as Y, assertTransactionLegacy as j } from "./index77.js";
|
|
12
|
-
import { getTransactionType as q } from "./index78.js";
|
|
13
|
-
import { serializeAccessList as v } from "./index79.js";
|
|
14
|
-
function te(e, r) {
|
|
15
|
-
const i = q(e);
|
|
16
|
-
return i === "eip1559" ? K(e, r) : i === "eip2930" ? M(e, r) : i === "eip4844" ? J(e, r) : i === "eip7702" ? D(e, r) : N(e, r);
|
|
17
|
-
}
|
|
18
|
-
function D(e, r) {
|
|
19
|
-
const { authorizationList: i, chainId: s, gas: n, nonce: c, to: f, value: a, maxFeePerGas: x, maxPriorityFeePerGas: t, accessList: p, data: l } = e;
|
|
20
|
-
S(e);
|
|
21
|
-
const d = v(p), m = w(i);
|
|
22
|
-
return h([
|
|
23
|
-
"0x04",
|
|
24
|
-
y([
|
|
25
|
-
o(s),
|
|
26
|
-
c ? o(c) : "0x",
|
|
27
|
-
t ? o(t) : "0x",
|
|
28
|
-
x ? o(x) : "0x",
|
|
29
|
-
n ? o(n) : "0x",
|
|
30
|
-
f ?? "0x",
|
|
31
|
-
a ? o(a) : "0x",
|
|
32
|
-
l ?? "0x",
|
|
33
|
-
d,
|
|
34
|
-
m,
|
|
35
|
-
...I(e, r)
|
|
36
|
-
])
|
|
37
|
-
]);
|
|
38
|
-
}
|
|
39
|
-
function J(e, r) {
|
|
40
|
-
const { chainId: i, gas: s, nonce: n, to: c, value: f, maxFeePerBlobGas: a, maxFeePerGas: x, maxPriorityFeePerGas: t, accessList: p, data: l } = e;
|
|
41
|
-
_(e);
|
|
42
|
-
let d = e.blobVersionedHashes, m = e.sidecars;
|
|
43
|
-
if (e.blobs && (typeof d > "u" || typeof m > "u")) {
|
|
44
|
-
const u = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((P) => k(P)), z = e.kzg, b = g({
|
|
45
|
-
blobs: u,
|
|
46
|
-
kzg: z
|
|
47
|
-
});
|
|
48
|
-
if (typeof d > "u" && (d = V({
|
|
49
|
-
commitments: b
|
|
50
|
-
})), typeof m > "u") {
|
|
51
|
-
const P = B({ blobs: u, commitments: b, kzg: z });
|
|
52
|
-
m = C({ blobs: u, commitments: b, proofs: P });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const L = v(p), E = [
|
|
56
|
-
o(i),
|
|
57
|
-
n ? o(n) : "0x",
|
|
58
|
-
t ? o(t) : "0x",
|
|
59
|
-
x ? o(x) : "0x",
|
|
60
|
-
s ? o(s) : "0x",
|
|
61
|
-
c ?? "0x",
|
|
62
|
-
f ? o(f) : "0x",
|
|
63
|
-
l ?? "0x",
|
|
64
|
-
L,
|
|
65
|
-
a ? o(a) : "0x",
|
|
66
|
-
d ?? [],
|
|
67
|
-
...I(e, r)
|
|
68
|
-
], A = [], F = [], G = [];
|
|
69
|
-
if (m)
|
|
70
|
-
for (let u = 0; u < m.length; u++) {
|
|
71
|
-
const { blob: z, commitment: b, proof: P } = m[u];
|
|
72
|
-
A.push(z), F.push(b), G.push(P);
|
|
73
|
-
}
|
|
74
|
-
return h([
|
|
75
|
-
"0x03",
|
|
76
|
-
m ? (
|
|
77
|
-
// If sidecars are enabled, envelope turns into a "wrapper":
|
|
78
|
-
y([E, A, F, G])
|
|
79
|
-
) : (
|
|
80
|
-
// If sidecars are disabled, standard envelope is used:
|
|
81
|
-
y(E)
|
|
82
|
-
)
|
|
83
|
-
]);
|
|
84
|
-
}
|
|
85
|
-
function K(e, r) {
|
|
86
|
-
const { chainId: i, gas: s, nonce: n, to: c, value: f, maxFeePerGas: a, maxPriorityFeePerGas: x, accessList: t, data: p } = e;
|
|
87
|
-
R(e);
|
|
88
|
-
const l = v(t), d = [
|
|
89
|
-
o(i),
|
|
90
|
-
n ? o(n) : "0x",
|
|
91
|
-
x ? o(x) : "0x",
|
|
92
|
-
a ? o(a) : "0x",
|
|
93
|
-
s ? o(s) : "0x",
|
|
94
|
-
c ?? "0x",
|
|
95
|
-
f ? o(f) : "0x",
|
|
96
|
-
p ?? "0x",
|
|
97
|
-
l,
|
|
98
|
-
...I(e, r)
|
|
99
|
-
];
|
|
100
|
-
return h([
|
|
101
|
-
"0x02",
|
|
102
|
-
y(d)
|
|
103
|
-
]);
|
|
104
|
-
}
|
|
105
|
-
function M(e, r) {
|
|
106
|
-
const { chainId: i, gas: s, data: n, nonce: c, to: f, value: a, accessList: x, gasPrice: t } = e;
|
|
107
|
-
Y(e);
|
|
108
|
-
const p = v(x), l = [
|
|
109
|
-
o(i),
|
|
110
|
-
c ? o(c) : "0x",
|
|
111
|
-
t ? o(t) : "0x",
|
|
112
|
-
s ? o(s) : "0x",
|
|
113
|
-
f ?? "0x",
|
|
114
|
-
a ? o(a) : "0x",
|
|
115
|
-
n ?? "0x",
|
|
116
|
-
p,
|
|
117
|
-
...I(e, r)
|
|
118
|
-
];
|
|
119
|
-
return h([
|
|
120
|
-
"0x01",
|
|
121
|
-
y(l)
|
|
122
|
-
]);
|
|
123
|
-
}
|
|
124
|
-
function N(e, r) {
|
|
125
|
-
const { chainId: i = 0, gas: s, data: n, nonce: c, to: f, value: a, gasPrice: x } = e;
|
|
126
|
-
j(e);
|
|
127
|
-
let t = [
|
|
128
|
-
c ? o(c) : "0x",
|
|
129
|
-
x ? o(x) : "0x",
|
|
130
|
-
s ? o(s) : "0x",
|
|
131
|
-
f ?? "0x",
|
|
132
|
-
a ? o(a) : "0x",
|
|
133
|
-
n ?? "0x"
|
|
134
|
-
];
|
|
135
|
-
if (r) {
|
|
136
|
-
const p = (() => {
|
|
137
|
-
if (r.v >= 35n)
|
|
138
|
-
return (r.v - 35n) / 2n > 0 ? r.v : 27n + (r.v === 35n ? 0n : 1n);
|
|
139
|
-
if (i > 0)
|
|
140
|
-
return BigInt(i * 2) + BigInt(35n + r.v - 27n);
|
|
141
|
-
const m = 27n + (r.v === 27n ? 0n : 1n);
|
|
142
|
-
if (r.v !== m)
|
|
143
|
-
throw new H({ v: r.v });
|
|
144
|
-
return m;
|
|
145
|
-
})(), l = T(r.r), d = T(r.s);
|
|
146
|
-
t = [
|
|
147
|
-
...t,
|
|
148
|
-
o(p),
|
|
149
|
-
l === "0x00" ? "0x" : l,
|
|
150
|
-
d === "0x00" ? "0x" : d
|
|
151
|
-
];
|
|
152
|
-
} else i > 0 && (t = [
|
|
153
|
-
...t,
|
|
154
|
-
o(i),
|
|
155
|
-
"0x",
|
|
156
|
-
"0x"
|
|
157
|
-
]);
|
|
158
|
-
return y(t);
|
|
159
|
-
}
|
|
160
|
-
function I(e, r) {
|
|
161
|
-
const i = r ?? e, { v: s, yParity: n } = i;
|
|
162
|
-
if (typeof i.r > "u")
|
|
163
|
-
return [];
|
|
164
|
-
if (typeof i.s > "u")
|
|
165
|
-
return [];
|
|
166
|
-
if (typeof s > "u" && typeof n > "u")
|
|
167
|
-
return [];
|
|
168
|
-
const c = T(i.r), f = T(i.s);
|
|
169
|
-
return [typeof n == "number" ? n ? o(1) : "0x" : s === 0n ? "0x" : s === 1n ? o(1) : s === 27n ? "0x" : o(1), c === "0x00" ? "0x" : c, f === "0x00" ? "0x" : f];
|
|
170
|
-
}
|
|
171
|
-
export {
|
|
172
|
-
te as serializeTransaction,
|
|
173
|
-
I as toYParitySignatureArray
|
|
174
|
-
};
|
package/dist/index53.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index66.cjs");class i extends n.BaseError{constructor({max:e,min:r,signed:s,size:t,value:a}){super(`Number "${a}" is not in safe ${t?`${t*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class u extends n.BaseError{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}exports.IntegerOutOfRangeError=i;exports.SizeOverflowError=u;
|
package/dist/index53.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseError as t } from "./index66.js";
|
|
2
|
-
class $ extends t {
|
|
3
|
-
constructor({ max: e, min: r, signed: s, size: n, value: a }) {
|
|
4
|
-
super(`Number "${a}" is not in safe ${n ? `${n * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${r} to ${e})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
class c extends t {
|
|
8
|
-
constructor({ givenSize: e, maxSize: r }) {
|
|
9
|
-
super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
$ as IntegerOutOfRangeError,
|
|
14
|
-
c as SizeOverflowError
|
|
15
|
-
};
|
package/dist/index54.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index67.cjs");function i(e){return t.isHex(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}exports.size=i;
|
package/dist/index54.js
DELETED
package/dist/index55.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(o,n){return({exclude:t,format:f})=>({exclude:t,format:e=>{const r=n(e);if(t)for(const i of t)delete r[i];return{...r,...f(e)}},type:o})}exports.defineFormatter=a;
|
package/dist/index55.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
function a(e, f) {
|
|
2
|
-
return ({ exclude: t, format: n }) => ({
|
|
3
|
-
exclude: t,
|
|
4
|
-
format: (r) => {
|
|
5
|
-
const o = f(r);
|
|
6
|
-
if (t)
|
|
7
|
-
for (const m of t)
|
|
8
|
-
delete o[m];
|
|
9
|
-
return {
|
|
10
|
-
...o,
|
|
11
|
-
...n(r)
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
type: e
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
a as defineFormatter
|
|
19
|
-
};
|
package/dist/index56.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(n,{args:a,eventName:t}={}){return{...n,blockHash:n.blockHash?n.blockHash:null,blockNumber:n.blockNumber?BigInt(n.blockNumber):null,logIndex:n.logIndex?Number(n.logIndex):null,transactionHash:n.transactionHash?n.transactionHash:null,transactionIndex:n.transactionIndex?Number(n.transactionIndex):null,...t?{args:a,eventName:t}:{}}}exports.formatLog=r;
|
package/dist/index56.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
function r(n, { args: t, eventName: a } = {}) {
|
|
2
|
-
return {
|
|
3
|
-
...n,
|
|
4
|
-
blockHash: n.blockHash ? n.blockHash : null,
|
|
5
|
-
blockNumber: n.blockNumber ? BigInt(n.blockNumber) : null,
|
|
6
|
-
logIndex: n.logIndex ? Number(n.logIndex) : null,
|
|
7
|
-
transactionHash: n.transactionHash ? n.transactionHash : null,
|
|
8
|
-
transactionIndex: n.transactionIndex ? Number(n.transactionIndex) : null,
|
|
9
|
-
...a ? { args: t, eventName: a } : {}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
r as formatLog
|
|
14
|
-
};
|
package/dist/index57.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index87.cjs"),n=require("./index88.cjs"),o=require("./index89.cjs"),a=require("./index90.cjs"),h=require("./index91.cjs");var u=s.inherits_browserExports,d=n.md5_js,c=o.ripemd160,p=a.sha_jsExports,i=h.cipherBase;function t(r){i.call(this,"digest"),this._hash=r}u(t,i);t.prototype._update=function(r){this._hash.update(r)};t.prototype._final=function(){return this._hash.digest()};var _=function(e){return e=e.toLowerCase(),e==="md5"?new d:e==="rmd160"||e==="ripemd160"?new c:new t(p(e))};exports.browser=_;
|
package/dist/index57.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { i } from "./index87.js";
|
|
2
|
-
import { m as o } from "./index88.js";
|
|
3
|
-
import { r as a } from "./index89.js";
|
|
4
|
-
import { s as n } from "./index90.js";
|
|
5
|
-
import { c as h } from "./index91.js";
|
|
6
|
-
var p = i, m = o, f = a, u = n, e = h;
|
|
7
|
-
function s(t) {
|
|
8
|
-
e.call(this, "digest"), this._hash = t;
|
|
9
|
-
}
|
|
10
|
-
p(s, e);
|
|
11
|
-
s.prototype._update = function(t) {
|
|
12
|
-
this._hash.update(t);
|
|
13
|
-
};
|
|
14
|
-
s.prototype._final = function() {
|
|
15
|
-
return this._hash.digest();
|
|
16
|
-
};
|
|
17
|
-
var b = function(r) {
|
|
18
|
-
return r = r.toLowerCase(), r === "md5" ? new m() : r === "rmd160" || r === "ripemd160" ? new f() : new s(u(r));
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
b
|
|
22
|
-
};
|
package/dist/index58.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index92.cjs"),s=require("./index45.cjs");var o=i.bs58,v=s.safeBufferExports.Buffer,b=function(t){function a(e){var r=t(e);return o.encode(v.concat([e,r],e.length+4))}function u(e){var r=e.slice(0,-4),n=e.slice(-4),c=t(r);if(!(n[0]^c[0]|n[1]^c[1]|n[2]^c[2]|n[3]^c[3]))return r}function d(e){var r=o.decodeUnsafe(e);if(r)return u(r)}function f(e){var r=o.decode(e),n=u(r);if(!n)throw new Error("Invalid checksum");return n}return{encode:a,decode:f,decodeUnsafe:d}};exports.base=b;
|
package/dist/index58.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { b as s } from "./index92.js";
|
|
2
|
-
import { s as i } from "./index45.js";
|
|
3
|
-
var o = s, v = i.Buffer, h = function(a) {
|
|
4
|
-
function t(e) {
|
|
5
|
-
var r = a(e);
|
|
6
|
-
return o.encode(v.concat([
|
|
7
|
-
e,
|
|
8
|
-
r
|
|
9
|
-
], e.length + 4));
|
|
10
|
-
}
|
|
11
|
-
function f(e) {
|
|
12
|
-
var r = e.slice(0, -4), n = e.slice(-4), c = a(r);
|
|
13
|
-
if (!(n[0] ^ c[0] | n[1] ^ c[1] | n[2] ^ c[2] | n[3] ^ c[3]))
|
|
14
|
-
return r;
|
|
15
|
-
}
|
|
16
|
-
function u(e) {
|
|
17
|
-
var r = o.decodeUnsafe(e);
|
|
18
|
-
if (r)
|
|
19
|
-
return f(r);
|
|
20
|
-
}
|
|
21
|
-
function d(e) {
|
|
22
|
-
var r = o.decode(e), n = f(r);
|
|
23
|
-
if (!n) throw new Error("Invalid checksum");
|
|
24
|
-
return n;
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
encode: t,
|
|
28
|
-
decode: d,
|
|
29
|
-
decodeUnsafe: u
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
h as b
|
|
34
|
-
};
|
package/dist/index59.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
package/dist/index59.js
DELETED
package/dist/index6.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var d=(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))(d||{}),t=(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))(t||{});exports.OrderStatus=d;exports.SwapStatus=t;
|
package/dist/index6.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var d = /* @__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))(d || {}), t = /* @__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))(t || {});
|
|
2
|
-
export {
|
|
3
|
-
d as OrderStatus,
|
|
4
|
-
t as SwapStatus
|
|
5
|
-
};
|
package/dist/index60.cjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";const Ir=require("./index61.cjs");require("./index93.cjs");require("./index94.cjs");const dr=require("./index95.cjs"),Fr=require("./index96.cjs");/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/(function(d){const R=dr.__exports,m=Fr.__exports,N=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;d.Buffer=u,d.SlowBuffer=tr,d.INSPECT_MAX_BYTES=50;const U=2147483647;d.kMaxLength=U,u.TYPED_ARRAY_SUPPORT=K(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function K(){try{const i=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(i,r),i.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function x(i){if(i>U)throw new RangeError('The value "'+i+'" is invalid for option "size"');const r=new Uint8Array(i);return Object.setPrototypeOf(r,u.prototype),r}function u(i,r,t){if(typeof i=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(i)}return k(i,r,t)}u.poolSize=8192;function k(i,r,t){if(typeof i=="string")return Q(i,r);if(ArrayBuffer.isView(i))return v(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(a(i,ArrayBuffer)||i&&a(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(a(i,SharedArrayBuffer)||i&&a(i.buffer,SharedArrayBuffer)))return S(i,r,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return u.from(n,r,t);const e=rr(i);if(e)return e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return u.from(i[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}u.from=function(i,r,t){return k(i,r,t)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function $(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function Z(i,r,t){return $(i),i<=0?x(i):r!==void 0?typeof t=="string"?x(i).fill(r,t):x(i).fill(r):x(i)}u.alloc=function(i,r,t){return Z(i,r,t)};function T(i){return $(i),x(i<0?0:C(i)|0)}u.allocUnsafe=function(i){return T(i)},u.allocUnsafeSlow=function(i){return T(i)};function Q(i,r){if((typeof r!="string"||r==="")&&(r="utf8"),!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const t=P(i,r)|0;let n=x(t);const e=n.write(i,r);return e!==t&&(n=n.slice(0,e)),n}function _(i){const r=i.length<0?0:C(i.length)|0,t=x(r);for(let n=0;n<r;n+=1)t[n]=i[n]&255;return t}function v(i){if(a(i,Uint8Array)){const r=new Uint8Array(i);return S(r.buffer,r.byteOffset,r.byteLength)}return _(i)}function S(i,r,t){if(r<0||i.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return r===void 0&&t===void 0?n=new Uint8Array(i):t===void 0?n=new Uint8Array(i,r):n=new Uint8Array(i,r,t),Object.setPrototypeOf(n,u.prototype),n}function rr(i){if(u.isBuffer(i)){const r=C(i.length)|0,t=x(r);return t.length===0||i.copy(t,0,0,r),t}if(i.length!==void 0)return typeof i.length!="number"||D(i.length)?x(0):_(i);if(i.type==="Buffer"&&Array.isArray(i.data))return _(i.data)}function C(i){if(i>=U)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+U.toString(16)+" bytes");return i|0}function tr(i){return+i!=i&&(i=0),u.alloc(+i)}u.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==u.prototype},u.compare=function(r,t){if(a(r,Uint8Array)&&(r=u.from(r,r.offset,r.byteLength)),a(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(r)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let n=r.length,e=t.length;for(let o=0,h=Math.min(n,e);o<h;++o)if(r[o]!==t[o]){n=r[o],e=t[o];break}return n<e?-1:e<n?1:0},u.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return u.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;const e=u.allocUnsafe(t);let o=0;for(n=0;n<r.length;++n){let h=r[n];if(a(h,Uint8Array))o+h.length>e.length?(u.isBuffer(h)||(h=u.from(h)),h.copy(e,o)):Uint8Array.prototype.set.call(e,h,o);else if(u.isBuffer(h))h.copy(e,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=h.length}return e};function P(i,r){if(u.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||a(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);const t=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let e=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return L(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return J(i).length;default:if(e)return n?-1:L(i).length;r=(""+r).toLowerCase(),e=!0}}u.byteLength=P;function ir(i,r,t){let n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(i||(i="utf8");;)switch(i){case"hex":return sr(this,r,t);case"utf8":case"utf-8":return q(this,r,t);case"ascii":return pr(this,r,t);case"latin1":case"binary":return lr(this,r,t);case"base64":return fr(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yr(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function E(i,r,t){const n=i[r];i[r]=i[t],i[t]=n}u.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)E(this,t,t+1);return this},u.prototype.swap32=function(){const r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)E(this,t,t+3),E(this,t+1,t+2);return this},u.prototype.swap64=function(){const r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)E(this,t,t+7),E(this,t+1,t+6),E(this,t+2,t+5),E(this,t+3,t+4);return this},u.prototype.toString=function(){const r=this.length;return r===0?"":arguments.length===0?q(this,0,r):ir.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(r){if(!u.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:u.compare(this,r)===0},u.prototype.inspect=function(){let r="";const t=d.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},N&&(u.prototype[N]=u.prototype.inspect),u.prototype.compare=function(r,t,n,e,o){if(a(r,Uint8Array)&&(r=u.from(r,r.offset,r.byteLength)),!u.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),e===void 0&&(e=0),o===void 0&&(o=this.length),t<0||n>r.length||e<0||o>this.length)throw new RangeError("out of range index");if(e>=o&&t>=n)return 0;if(e>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,e>>>=0,o>>>=0,this===r)return 0;let h=o-e,f=n-t;const l=Math.min(h,f),p=this.slice(e,o),s=r.slice(t,n);for(let c=0;c<l;++c)if(p[c]!==s[c]){h=p[c],f=s[c];break}return h<f?-1:f<h?1:0};function M(i,r,t,n,e){if(i.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,D(t)&&(t=e?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(e)return-1;t=i.length-1}else if(t<0)if(e)t=0;else return-1;if(typeof r=="string"&&(r=u.from(r,n)),u.isBuffer(r))return r.length===0?-1:O(i,r,t,n,e);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?e?Uint8Array.prototype.indexOf.call(i,r,t):Uint8Array.prototype.lastIndexOf.call(i,r,t):O(i,[r],t,n,e);throw new TypeError("val must be string, number or Buffer")}function O(i,r,t,n,e){let o=1,h=i.length,f=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(i.length<2||r.length<2)return-1;o=2,h/=2,f/=2,t/=2}function l(s,c){return o===1?s[c]:s.readUInt16BE(c*o)}let p;if(e){let s=-1;for(p=t;p<h;p++)if(l(i,p)===l(r,s===-1?0:p-s)){if(s===-1&&(s=p),p-s+1===f)return s*o}else s!==-1&&(p-=p-s),s=-1}else for(t+f>h&&(t=h-f),p=t;p>=0;p--){let s=!0;for(let c=0;c<f;c++)if(l(i,p+c)!==l(r,c)){s=!1;break}if(s)return p}return-1}u.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1},u.prototype.indexOf=function(r,t,n){return M(this,r,t,n,!0)},u.prototype.lastIndexOf=function(r,t,n){return M(this,r,t,n,!1)};function nr(i,r,t,n){t=Number(t)||0;const e=i.length-t;n?(n=Number(n),n>e&&(n=e)):n=e;const o=r.length;n>o/2&&(n=o/2);let h;for(h=0;h<n;++h){const f=parseInt(r.substr(h*2,2),16);if(D(f))return h;i[t+h]=f}return h}function er(i,r,t,n){return A(L(r,i.length-t),i,t,n)}function or(i,r,t,n){return A(Br(r),i,t,n)}function ur(i,r,t,n){return A(J(r),i,t,n)}function hr(i,r,t,n){return A(Er(r,i.length-t),i,t,n)}u.prototype.write=function(r,t,n,e){if(t===void 0)e="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")e=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,e===void 0&&(e="utf8")):(e=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");let h=!1;for(;;)switch(e){case"hex":return nr(this,r,t,n);case"utf8":case"utf-8":return er(this,r,t,n);case"ascii":case"latin1":case"binary":return or(this,r,t,n);case"base64":return ur(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hr(this,r,t,n);default:if(h)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),h=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function fr(i,r,t){return r===0&&t===i.length?R.fromByteArray(i):R.fromByteArray(i.slice(r,t))}function q(i,r,t){t=Math.min(i.length,t);const n=[];let e=r;for(;e<t;){const o=i[e];let h=null,f=o>239?4:o>223?3:o>191?2:1;if(e+f<=t){let l,p,s,c;switch(f){case 1:o<128&&(h=o);break;case 2:l=i[e+1],(l&192)===128&&(c=(o&31)<<6|l&63,c>127&&(h=c));break;case 3:l=i[e+1],p=i[e+2],(l&192)===128&&(p&192)===128&&(c=(o&15)<<12|(l&63)<<6|p&63,c>2047&&(c<55296||c>57343)&&(h=c));break;case 4:l=i[e+1],p=i[e+2],s=i[e+3],(l&192)===128&&(p&192)===128&&(s&192)===128&&(c=(o&15)<<18|(l&63)<<12|(p&63)<<6|s&63,c>65535&&c<1114112&&(h=c))}}h===null?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|h&1023),n.push(h),e+=f}return cr(n)}const G=4096;function cr(i){const r=i.length;if(r<=G)return String.fromCharCode.apply(String,i);let t="",n=0;for(;n<r;)t+=String.fromCharCode.apply(String,i.slice(n,n+=G));return t}function pr(i,r,t){let n="";t=Math.min(i.length,t);for(let e=r;e<t;++e)n+=String.fromCharCode(i[e]&127);return n}function lr(i,r,t){let n="";t=Math.min(i.length,t);for(let e=r;e<t;++e)n+=String.fromCharCode(i[e]);return n}function sr(i,r,t){const n=i.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);let e="";for(let o=r;o<t;++o)e+=mr[i[o]];return e}function yr(i,r,t){const n=i.slice(r,t);let e="";for(let o=0;o<n.length-1;o+=2)e+=String.fromCharCode(n[o]+n[o+1]*256);return e}u.prototype.slice=function(r,t){const n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);const e=this.subarray(r,t);return Object.setPrototypeOf(e,u.prototype),e};function y(i,r,t){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+r>t)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||y(r,t,this.length);let e=this[r],o=1,h=0;for(;++h<t&&(o*=256);)e+=this[r+h]*o;return e},u.prototype.readUintBE=u.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||y(r,t,this.length);let e=this[r+--t],o=1;for(;t>0&&(o*=256);)e+=this[r+--t]*o;return e},u.prototype.readUint8=u.prototype.readUInt8=function(r,t){return r=r>>>0,t||y(r,1,this.length),this[r]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||y(r,2,this.length),this[r]|this[r+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||y(r,2,this.length),this[r]<<8|this[r+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||y(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||y(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},u.prototype.readBigUInt64LE=B(function(r){r=r>>>0,I(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&F(r,this.length-8);const e=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,o=this[++r]+this[++r]*2**8+this[++r]*2**16+n*2**24;return BigInt(e)+(BigInt(o)<<BigInt(32))}),u.prototype.readBigUInt64BE=B(function(r){r=r>>>0,I(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&F(r,this.length-8);const e=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],o=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n;return(BigInt(e)<<BigInt(32))+BigInt(o)}),u.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||y(r,t,this.length);let e=this[r],o=1,h=0;for(;++h<t&&(o*=256);)e+=this[r+h]*o;return o*=128,e>=o&&(e-=Math.pow(2,8*t)),e},u.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||y(r,t,this.length);let e=t,o=1,h=this[r+--e];for(;e>0&&(o*=256);)h+=this[r+--e]*o;return o*=128,h>=o&&(h-=Math.pow(2,8*t)),h},u.prototype.readInt8=function(r,t){return r=r>>>0,t||y(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},u.prototype.readInt16LE=function(r,t){r=r>>>0,t||y(r,2,this.length);const n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n},u.prototype.readInt16BE=function(r,t){r=r>>>0,t||y(r,2,this.length);const n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n},u.prototype.readInt32LE=function(r,t){return r=r>>>0,t||y(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},u.prototype.readInt32BE=function(r,t){return r=r>>>0,t||y(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},u.prototype.readBigInt64LE=B(function(r){r=r>>>0,I(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&F(r,this.length-8);const e=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(n<<24);return(BigInt(e)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),u.prototype.readBigInt64BE=B(function(r){r=r>>>0,I(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&F(r,this.length-8);const e=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(e)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n)}),u.prototype.readFloatLE=function(r,t){return r=r>>>0,t||y(r,4,this.length),m.read(this,r,!0,23,4)},u.prototype.readFloatBE=function(r,t){return r=r>>>0,t||y(r,4,this.length),m.read(this,r,!1,23,4)},u.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||y(r,8,this.length),m.read(this,r,!0,52,8)},u.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||y(r,8,this.length),m.read(this,r,!1,52,8)};function w(i,r,t,n,e,o){if(!u.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>e||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>i.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(r,t,n,e){if(r=+r,t=t>>>0,n=n>>>0,!e){const f=Math.pow(2,8*n)-1;w(this,r,t,n,f,0)}let o=1,h=0;for(this[t]=r&255;++h<n&&(o*=256);)this[t+h]=r/o&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(r,t,n,e){if(r=+r,t=t>>>0,n=n>>>0,!e){const f=Math.pow(2,8*n)-1;w(this,r,t,n,f,0)}let o=n-1,h=1;for(this[t+o]=r&255;--o>=0&&(h*=256);)this[t+o]=r/h&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,1,255,0),this[t]=r&255,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function Y(i,r,t,n,e){H(r,n,e,i,t,7);let o=Number(r&BigInt(4294967295));i[t++]=o,o=o>>8,i[t++]=o,o=o>>8,i[t++]=o,o=o>>8,i[t++]=o;let h=Number(r>>BigInt(32)&BigInt(4294967295));return i[t++]=h,h=h>>8,i[t++]=h,h=h>>8,i[t++]=h,h=h>>8,i[t++]=h,t}function W(i,r,t,n,e){H(r,n,e,i,t,7);let o=Number(r&BigInt(4294967295));i[t+7]=o,o=o>>8,i[t+6]=o,o=o>>8,i[t+5]=o,o=o>>8,i[t+4]=o;let h=Number(r>>BigInt(32)&BigInt(4294967295));return i[t+3]=h,h=h>>8,i[t+2]=h,h=h>>8,i[t+1]=h,h=h>>8,i[t]=h,t+8}u.prototype.writeBigUInt64LE=B(function(r,t=0){return Y(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=B(function(r,t=0){return W(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(r,t,n,e){if(r=+r,t=t>>>0,!e){const l=Math.pow(2,8*n-1);w(this,r,t,n,l-1,-l)}let o=0,h=1,f=0;for(this[t]=r&255;++o<n&&(h*=256);)r<0&&f===0&&this[t+o-1]!==0&&(f=1),this[t+o]=(r/h>>0)-f&255;return t+n},u.prototype.writeIntBE=function(r,t,n,e){if(r=+r,t=t>>>0,!e){const l=Math.pow(2,8*n-1);w(this,r,t,n,l-1,-l)}let o=n-1,h=1,f=0;for(this[t+o]=r&255;--o>=0&&(h*=256);)r<0&&f===0&&this[t+o+1]!==0&&(f=1),this[t+o]=(r/h>>0)-f&255;return t+n},u.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},u.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},u.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},u.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},u.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||w(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},u.prototype.writeBigInt64LE=B(function(r,t=0){return Y(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=B(function(r,t=0){return W(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function V(i,r,t,n,e,o){if(t+n>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function X(i,r,t,n,e){return r=+r,t=t>>>0,e||V(i,r,t,4),m.write(i,r,t,n,23,4),t+4}u.prototype.writeFloatLE=function(r,t,n){return X(this,r,t,!0,n)},u.prototype.writeFloatBE=function(r,t,n){return X(this,r,t,!1,n)};function j(i,r,t,n,e){return r=+r,t=t>>>0,e||V(i,r,t,8),m.write(i,r,t,n,52,8),t+8}u.prototype.writeDoubleLE=function(r,t,n){return j(this,r,t,!0,n)},u.prototype.writeDoubleBE=function(r,t,n){return j(this,r,t,!1,n)},u.prototype.copy=function(r,t,n,e){if(!u.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!e&&e!==0&&(e=this.length),t>=r.length&&(t=r.length),t||(t=0),e>0&&e<n&&(e=n),e===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),r.length-t<e-n&&(e=r.length-t+n);const o=e-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,e):Uint8Array.prototype.set.call(r,this.subarray(n,e),t),o},u.prototype.fill=function(r,t,n,e){if(typeof r=="string"){if(typeof t=="string"?(e=t,t=0,n=this.length):typeof n=="string"&&(e=n,n=this.length),e!==void 0&&typeof e!="string")throw new TypeError("encoding must be a string");if(typeof e=="string"&&!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);if(r.length===1){const h=r.charCodeAt(0);(e==="utf8"&&h<128||e==="latin1")&&(r=h)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);let o;if(typeof r=="number")for(o=t;o<n;++o)this[o]=r;else{const h=u.isBuffer(r)?r:u.from(r,e),f=h.length;if(f===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=h[o%f]}return this};const g={};function b(i,r,t){g[i]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}b("ERR_BUFFER_OUT_OF_BOUNDS",function(i){return i?`${i} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),b("ERR_INVALID_ARG_TYPE",function(i,r){return`The "${i}" argument must be of type number. Received type ${typeof r}`},TypeError),b("ERR_OUT_OF_RANGE",function(i,r,t){let n=`The value of "${i}" is out of range.`,e=t;return Number.isInteger(t)&&Math.abs(t)>2**32?e=z(String(t)):typeof t=="bigint"&&(e=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(e=z(e)),e+="n"),n+=` It must be ${r}. Received ${e}`,n},RangeError);function z(i){let r="",t=i.length;const n=i[0]==="-"?1:0;for(;t>=n+4;t-=3)r=`_${i.slice(t-3,t)}${r}`;return`${i.slice(0,t)}${r}`}function wr(i,r,t){I(r,"offset"),(i[r]===void 0||i[r+t]===void 0)&&F(r,i.length-(t+1))}function H(i,r,t,n,e,o){if(i>t||i<r){const h=typeof r=="bigint"?"n":"";let f;throw r===0||r===BigInt(0)?f=`>= 0${h} and < 2${h} ** ${(o+1)*8}${h}`:f=`>= -(2${h} ** ${(o+1)*8-1}${h}) and < 2 ** ${(o+1)*8-1}${h}`,new g.ERR_OUT_OF_RANGE("value",f,i)}wr(n,e,o)}function I(i,r){if(typeof i!="number")throw new g.ERR_INVALID_ARG_TYPE(r,"number",i)}function F(i,r,t){throw Math.floor(i)!==i?(I(i,t),new g.ERR_OUT_OF_RANGE("offset","an integer",i)):r<0?new g.ERR_BUFFER_OUT_OF_BOUNDS:new g.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${r}`,i)}const ar=/[^+/0-9A-Za-z-_]/g;function xr(i){if(i=i.split("=")[0],i=i.trim().replace(ar,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function L(i,r){r=r||1/0;let t;const n=i.length;let e=null;const o=[];for(let h=0;h<n;++h){if(t=i.charCodeAt(h),t>55295&&t<57344){if(!e){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(h+1===n){(r-=3)>-1&&o.push(239,191,189);continue}e=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),e=t;continue}t=(e-55296<<10|t-56320)+65536}else e&&(r-=3)>-1&&o.push(239,191,189);if(e=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function Br(i){const r=[];for(let t=0;t<i.length;++t)r.push(i.charCodeAt(t)&255);return r}function Er(i,r){let t,n,e;const o=[];for(let h=0;h<i.length&&!((r-=2)<0);++h)t=i.charCodeAt(h),n=t>>8,e=t%256,o.push(e),o.push(n);return o}function J(i){return R.toByteArray(xr(i))}function A(i,r,t,n){let e;for(e=0;e<n&&!(e+t>=r.length||e>=i.length);++e)r[e+t]=i[e];return e}function a(i,r){return i instanceof r||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===r.name}function D(i){return i!==i}const mr=function(){const i="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){const n=t*16;for(let e=0;e<16;++e)r[n+e]=i[t]+i[e]}return r}();function B(i){return typeof BigInt>"u"?gr:i}function gr(){throw new Error("BigInt not supported")}})(Ir.__exports);
|