@skip-go/widget 3.14.5 → 3.14.6
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/build/{add-BJQPsA8k.js → add-OU9UR09f.js} +1 -1
- package/build/{all-wallets-B11_4Ybe.js → all-wallets-CnC4K8P_.js} +1 -1
- package/build/{app-store-CARimMW3.js → app-store-BNT7XXF6.js} +1 -1
- package/build/{apple-DEuxqvQi.js → apple-VlWBFQL3.js} +1 -1
- package/build/{arrow-bottom-BsHbGBdB.js → arrow-bottom-BrTpz555.js} +1 -1
- package/build/{arrow-bottom-circle-Cs2knW0e.js → arrow-bottom-circle-BFqNXfAJ.js} +1 -1
- package/build/{arrow-left-DzEykZh_.js → arrow-left-DTSO5oTj.js} +1 -1
- package/build/{arrow-right-BhBVwf9g.js → arrow-right-CHmRiK5M.js} +1 -1
- package/build/{arrow-top-CQFpDrN4.js → arrow-top-HOpXRBeh.js} +1 -1
- package/build/{bank-CjU2Dyen.js → bank-D9n-fWz5.js} +1 -1
- package/build/{basic-DEapmA0E.js → basic-HCdYkMDV.js} +2 -2
- package/build/{browser-DuTL2ZwF.js → browser-D3bwXmI4.js} +1 -1
- package/build/{card-H_VBjXH3.js → card-D9vxcllp.js} +1 -1
- package/build/{checkmark-Dtjtjmf1.js → checkmark-CWuCFCbc.js} +1 -1
- package/build/{checkmark-bold-z4hM-TsC.js → checkmark-bold-C-ofvBtG.js} +1 -1
- package/build/{chevron-bottom-CtArV2wF.js → chevron-bottom-DdxUv2fD.js} +1 -1
- package/build/{chevron-left-DdvY2CTb.js → chevron-left-CBSBkfMZ.js} +1 -1
- package/build/{chevron-right-CFXUESPe.js → chevron-right-DAlUsIyJ.js} +1 -1
- package/build/{chevron-top-Dy9Hw3fV.js → chevron-top-DOHisvoY.js} +1 -1
- package/build/{chrome-store-C_pTffOw.js → chrome-store-ckBKFu2u.js} +1 -1
- package/build/{clock-CMOyk9S9.js → clock-EVWQaxj4.js} +1 -1
- package/build/{close-Dms7aMSR.js → close-Kju9mNwB.js} +1 -1
- package/build/{coinPlaceholder-B2cZTC3R.js → coinPlaceholder-DSj4kRrT.js} +1 -1
- package/build/{compass-DNOfEAM2.js → compass-CK1JIozN.js} +1 -1
- package/build/{copy-DZbibH1K.js → copy-BVAzSylU.js} +1 -1
- package/build/{core-BfKZ4PIC.js → core-C5Tt1lSh.js} +4 -4
- package/build/{cursor-BbBjTjwp.js → cursor-7fWVYUTS.js} +1 -1
- package/build/{cursor-transparent-DCOjv2sR.js → cursor-transparent-D06UOvOi.js} +1 -1
- package/build/{desktop-uyYbF0Mn.js → desktop-DKKUnNl6.js} +1 -1
- package/build/{disconnect-CetZ4edH.js → disconnect-Vh90GXp6.js} +1 -1
- package/build/{discord-Cf_HZf3N.js → discord-CjN6c_PW.js} +1 -1
- package/build/{etherscan-C4OLKng2.js → etherscan-CkbQizFu.js} +1 -1
- package/build/{exclamation-triangle-uVxTDhvu.js → exclamation-triangle-CbRMu3fz.js} +1 -1
- package/build/{extension-DxctmiWz.js → extension-BMBjiq_p.js} +1 -1
- package/build/{external-link-MqCcqsdd.js → external-link-UULbZUf4.js} +1 -1
- package/build/{facebook-C4dd-ziA.js → facebook-C91t60c_.js} +1 -1
- package/build/{farcaster-CeVdeAEP.js → farcaster-DYbQRXPh.js} +1 -1
- package/build/{filters-BiMkQFV8.js → filters-DFnZXBsy.js} +1 -1
- package/build/{github-CU_W_N6N.js → github-DbU7ZrOo.js} +1 -1
- package/build/{google-7s8MQVzB.js → google-kNiA63Ur.js} +1 -1
- package/build/{help-circle-C3-nycKi.js → help-circle-C7uFI7Ku.js} +1 -1
- package/build/{id-C2tHtjX6.js → id-Bg-Zp7io.js} +1 -1
- package/build/{image-DPaMR_cv.js → image-DB--nbLZ.js} +1 -1
- package/build/{index-jvbs7eGH.js → index-BY1pAz15.js} +1916 -62
- package/build/{index-omwtuTW1.js → index-CusgsBvY.js} +78 -78
- package/build/{index.es-LTt2Eg_D.js → index.es-CyMUlQCP.js} +20 -1787
- package/build/index.js +1 -1
- package/build/{info-qKe_hnXy.js → info-BiDa0NUh.js} +1 -1
- package/build/{info-circle-B_IxCfxa.js → info-circle-jDRUilD2.js} +1 -1
- package/build/{lightbulb-1XI0Bxv-.js → lightbulb-Cjzd_5vT.js} +1 -1
- package/build/{mail-CJW1dmhW.js → mail-BhHxMnnb.js} +1 -1
- package/build/{mobile-DHY_7Eey.js → mobile-CVEErxrI.js} +1 -1
- package/build/{more-CHCKQBcM.js → more-CfbjsXii.js} +1 -1
- package/build/{network-placeholder-Bjoe5sTj.js → network-placeholder-D9Hcdrem.js} +1 -1
- package/build/{nftPlaceholder-BfGB28hh.js → nftPlaceholder-CCUcacNJ.js} +1 -1
- package/build/{off-Bf2iuTEi.js → off-ocoCgFJP.js} +1 -1
- package/build/{play-store-BIvS0r4I.js → play-store-83Y_snPu.js} +1 -1
- package/build/{plus-qgz3JQAB.js → plus-CD7xYh2p.js} +1 -1
- package/build/{qr-code-BuWsCw2z.js → qr-code-BW0gz7pJ.js} +1 -1
- package/build/{recycle-horizontal-B1CVSSLJ.js → recycle-horizontal-Ds7s7Sit.js} +1 -1
- package/build/{refresh-BhvhNniM.js → refresh-CJ9Y8DnB.js} +1 -1
- package/build/{reown-logo-C5z3wp07.js → reown-logo-BGBwEvrd.js} +1 -1
- package/build/{search-BTpo0HGA.js → search--iTcbqZy.js} +1 -1
- package/build/{send-B8pnkBAp.js → send-CLkzavxP.js} +1 -1
- package/build/{swapHorizontal-A29wlFie.js → swapHorizontal-CKPsXWdA.js} +1 -1
- package/build/{swapHorizontalBold-CG4RbMR8.js → swapHorizontalBold-DDCTIIzG.js} +1 -1
- package/build/{swapHorizontalMedium-BZPbiWG7.js → swapHorizontalMedium-lUQACbbW.js} +1 -1
- package/build/{swapHorizontalRoundedBold-CgYvX4sR.js → swapHorizontalRoundedBold-Cg9aevUh.js} +1 -1
- package/build/{swapVertical-DGjhPMtl.js → swapVertical-DNTwnj6a.js} +1 -1
- package/build/{telegram-BTYv80UF.js → telegram-C4O1GO_a.js} +1 -1
- package/build/{three-dots-CK7eAfOP.js → three-dots-DoPYPHEn.js} +1 -1
- package/build/{twitch-K05X_UT8.js → twitch-B3UmQm3u.js} +1 -1
- package/build/{twitterIcon-BE4qUrhF.js → twitterIcon-oHOf3N21.js} +1 -1
- package/build/{verify-zHV40_w6.js → verify-DfKajNvm.js} +1 -1
- package/build/{verify-filled-BfZdE__v.js → verify-filled-2w9LL51n.js} +1 -1
- package/build/{w3m-modal-DkheqxGa.js → w3m-modal-CwfW-8ec.js} +2 -2
- package/build/{wallet-BTbqWApb.js → wallet-CMhaBAHn.js} +1 -1
- package/build/{wallet-placeholder-B6hnZ20G.js → wallet-placeholder-CtnQLBLW.js} +1 -1
- package/build/{walletconnect-BgwXLnVI.js → walletconnect-BddWPfWc.js} +1 -1
- package/build/{warning-circle-B-OJt-sc.js → warning-circle-BGMkOv-1.js} +1 -1
- package/build/{x-Dd85BL0v.js → x-B6DiY0ts.js} +1 -1
- package/package.json +2 -2
|
@@ -1768,6 +1768,8 @@ const flexProps = lt`
|
|
|
1768
1768
|
${({ padding }) => padding && `padding: ${padding}px`};
|
|
1769
1769
|
${({ borderRadius }) => borderRadius && `border-radius: ${borderRadius}px`};
|
|
1770
1770
|
${({ flexDirection }) => flexDirection && `flex-direction: ${flexDirection}`};
|
|
1771
|
+
${({ maxWidth }) => maxWidth && `max-width: ${maxWidth}`};
|
|
1772
|
+
${({ maxHeight }) => maxHeight && `max-height: ${maxHeight}`};
|
|
1771
1773
|
`;
|
|
1772
1774
|
const Row = dt.div`
|
|
1773
1775
|
${({ width }) => width !== void 0 && `width: ${typeof width === "number" ? `${width}px` : width}`};
|
|
@@ -1827,7 +1829,7 @@ const ArrowIcon = ({
|
|
|
1827
1829
|
viewBox: "0 0 40 40",
|
|
1828
1830
|
fill: "none",
|
|
1829
1831
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1830
|
-
transform: direction === "down" ? "rotate(90)" : direction === "left" ? "rotate(180)" : direction === "up" ? "rotate(-90)" : "",
|
|
1832
|
+
transform: direction === "down" ? "rotate(90)" : direction === "left" ? "rotate(180)" : direction === "up" ? "rotate(-90)" : direction === "top-right" ? "rotate(-45)" : void 0,
|
|
1831
1833
|
children: maskedVersion ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1832
1834
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("mask", { id: "arrowMask", children: [
|
|
1833
1835
|
/* @__PURE__ */ jsx("rect", { width: "40", height: "40", fill: "white" }),
|
|
@@ -1961,15 +1963,25 @@ const WarningIcon = ({
|
|
|
1961
1963
|
}
|
|
1962
1964
|
)
|
|
1963
1965
|
] });
|
|
1964
|
-
const TriangleWarningIcon = ({ backgroundColor
|
|
1965
|
-
"
|
|
1966
|
+
const TriangleWarningIcon = ({ backgroundColor, width = 47, height = 41 }) => /* @__PURE__ */ jsx(
|
|
1967
|
+
"svg",
|
|
1966
1968
|
{
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
fill:
|
|
1969
|
+
width,
|
|
1970
|
+
height,
|
|
1971
|
+
viewBox: "0 0 47 41",
|
|
1972
|
+
fill: "none",
|
|
1973
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1974
|
+
children: /* @__PURE__ */ jsx(
|
|
1975
|
+
"path",
|
|
1976
|
+
{
|
|
1977
|
+
fillRule: "evenodd",
|
|
1978
|
+
clipRule: "evenodd",
|
|
1979
|
+
d: "M25.5686 1.76471C24.7988 0.431378 22.8743 0.431374 22.1045 1.76471L1.18402 38C0.414219 39.3333 1.37647 41 2.91607 41H44.757C46.2966 41 47.2588 39.3333 46.489 38L25.5686 1.76471ZM22.7622 27.766C22.8336 28.3044 23.2927 28.7066 23.8358 28.7066C24.3788 28.7066 24.8379 28.3044 24.9093 27.766L26.0164 19.418V14.6072C26.0164 13.4028 25.0401 12.4265 23.8358 12.4265C22.6314 12.4265 21.6551 13.4028 21.6551 14.6072V19.418L22.7622 27.766ZM21.3222 33.52C21.3222 34.7413 22.3122 35.7314 23.5335 35.7314H24.138C25.3593 35.7314 26.3494 34.7413 26.3494 33.52V32.9821C26.3494 31.7608 25.3593 30.7708 24.138 30.7708H23.5335C22.3122 30.7708 21.3222 31.7608 21.3222 32.9821V33.52Z",
|
|
1980
|
+
fill: backgroundColor
|
|
1981
|
+
}
|
|
1982
|
+
)
|
|
1971
1983
|
}
|
|
1972
|
-
)
|
|
1984
|
+
);
|
|
1973
1985
|
const PenIcon = ({ color = "currentColor" }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "11", height: "13", viewBox: "0 0 11 12", fill: "none", children: /* @__PURE__ */ jsx(
|
|
1974
1986
|
"path",
|
|
1975
1987
|
{
|
|
@@ -3957,7 +3969,11 @@ const convertTokenAmountToHumanReadableAmount = (tokenAmount, decimals = DEFAULT
|
|
|
3957
3969
|
};
|
|
3958
3970
|
const getTruncatedAddress = (address, extraShort) => {
|
|
3959
3971
|
if (!address) return "";
|
|
3960
|
-
|
|
3972
|
+
const minLength = extraShort ? 10 : 15;
|
|
3973
|
+
if (address.length <= minLength) return address;
|
|
3974
|
+
if (extraShort) {
|
|
3975
|
+
return `${address.slice(0, 6)}…${address.slice(-3)}`;
|
|
3976
|
+
}
|
|
3961
3977
|
return `${address.slice(0, 9)}…${address.slice(-5)}`;
|
|
3962
3978
|
};
|
|
3963
3979
|
const MAX_CACHE_ENTRIES = 20;
|
|
@@ -4286,7 +4302,7 @@ const PillButton = dt(Button)`
|
|
|
4286
4302
|
const Link = dt(Button).attrs({
|
|
4287
4303
|
as: "a"
|
|
4288
4304
|
})`
|
|
4289
|
-
color: ${({ theme }) => theme.primary.text.lowContrast};
|
|
4305
|
+
color: ${({ color, theme }) => color ?? theme.primary.text.lowContrast};
|
|
4290
4306
|
text-decoration: none;
|
|
4291
4307
|
`;
|
|
4292
4308
|
const PillButtonLink = dt(PillButton).attrs({
|
|
@@ -41950,13 +41966,13 @@ function getClientOperations(operations) {
|
|
|
41950
41966
|
}
|
|
41951
41967
|
function filterNeutronSwapFee(operations) {
|
|
41952
41968
|
return operations.filter((op, i) => {
|
|
41953
|
-
var _a
|
|
41969
|
+
var _a;
|
|
41954
41970
|
const clientOperation = getClientOperation(op);
|
|
41955
|
-
if (clientOperation.type === "swap" &&
|
|
41971
|
+
if (clientOperation.type === "swap" && clientOperation.chainId === "neutron-1" && clientOperation.denomOut === "untrn" && clientOperation.fromChainId === "neutron-1" && ((_a = clientOperation.swapOut) == null ? void 0 : _a.swapAmountOut) === "200000") {
|
|
41956
41972
|
const nextOperation = operations[i + 1];
|
|
41957
41973
|
if (nextOperation) {
|
|
41958
41974
|
const nextClientOperation = getClientOperation(nextOperation);
|
|
41959
|
-
if (nextClientOperation.type === "swap" &&
|
|
41975
|
+
if (nextClientOperation.type === "swap" && nextClientOperation.chainId === "neutron-1") {
|
|
41960
41976
|
return false;
|
|
41961
41977
|
}
|
|
41962
41978
|
}
|
|
@@ -41977,6 +41993,1772 @@ function isUserRejectedRequestError(input) {
|
|
|
41977
41993
|
}
|
|
41978
41994
|
return false;
|
|
41979
41995
|
}
|
|
41996
|
+
var buffer = {};
|
|
41997
|
+
var base64Js = {};
|
|
41998
|
+
base64Js.byteLength = byteLength;
|
|
41999
|
+
base64Js.toByteArray = toByteArray;
|
|
42000
|
+
base64Js.fromByteArray = fromByteArray;
|
|
42001
|
+
var lookup = [];
|
|
42002
|
+
var revLookup = [];
|
|
42003
|
+
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
42004
|
+
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
42005
|
+
for (var i = 0, len = code.length; i < len; ++i) {
|
|
42006
|
+
lookup[i] = code[i];
|
|
42007
|
+
revLookup[code.charCodeAt(i)] = i;
|
|
42008
|
+
}
|
|
42009
|
+
revLookup["-".charCodeAt(0)] = 62;
|
|
42010
|
+
revLookup["_".charCodeAt(0)] = 63;
|
|
42011
|
+
function getLens(b64) {
|
|
42012
|
+
var len = b64.length;
|
|
42013
|
+
if (len % 4 > 0) {
|
|
42014
|
+
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
42015
|
+
}
|
|
42016
|
+
var validLen = b64.indexOf("=");
|
|
42017
|
+
if (validLen === -1) validLen = len;
|
|
42018
|
+
var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
|
|
42019
|
+
return [validLen, placeHoldersLen];
|
|
42020
|
+
}
|
|
42021
|
+
function byteLength(b64) {
|
|
42022
|
+
var lens = getLens(b64);
|
|
42023
|
+
var validLen = lens[0];
|
|
42024
|
+
var placeHoldersLen = lens[1];
|
|
42025
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
42026
|
+
}
|
|
42027
|
+
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
42028
|
+
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
42029
|
+
}
|
|
42030
|
+
function toByteArray(b64) {
|
|
42031
|
+
var tmp;
|
|
42032
|
+
var lens = getLens(b64);
|
|
42033
|
+
var validLen = lens[0];
|
|
42034
|
+
var placeHoldersLen = lens[1];
|
|
42035
|
+
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
42036
|
+
var curByte = 0;
|
|
42037
|
+
var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
42038
|
+
var i;
|
|
42039
|
+
for (i = 0; i < len; i += 4) {
|
|
42040
|
+
tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
|
|
42041
|
+
arr[curByte++] = tmp >> 16 & 255;
|
|
42042
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
42043
|
+
arr[curByte++] = tmp & 255;
|
|
42044
|
+
}
|
|
42045
|
+
if (placeHoldersLen === 2) {
|
|
42046
|
+
tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
|
|
42047
|
+
arr[curByte++] = tmp & 255;
|
|
42048
|
+
}
|
|
42049
|
+
if (placeHoldersLen === 1) {
|
|
42050
|
+
tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
|
|
42051
|
+
arr[curByte++] = tmp >> 8 & 255;
|
|
42052
|
+
arr[curByte++] = tmp & 255;
|
|
42053
|
+
}
|
|
42054
|
+
return arr;
|
|
42055
|
+
}
|
|
42056
|
+
function tripletToBase64(num) {
|
|
42057
|
+
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
42058
|
+
}
|
|
42059
|
+
function encodeChunk(uint8, start, end) {
|
|
42060
|
+
var tmp;
|
|
42061
|
+
var output = [];
|
|
42062
|
+
for (var i = start; i < end; i += 3) {
|
|
42063
|
+
tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
|
|
42064
|
+
output.push(tripletToBase64(tmp));
|
|
42065
|
+
}
|
|
42066
|
+
return output.join("");
|
|
42067
|
+
}
|
|
42068
|
+
function fromByteArray(uint8) {
|
|
42069
|
+
var tmp;
|
|
42070
|
+
var len = uint8.length;
|
|
42071
|
+
var extraBytes = len % 3;
|
|
42072
|
+
var parts = [];
|
|
42073
|
+
var maxChunkLength = 16383;
|
|
42074
|
+
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
|
42075
|
+
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
|
|
42076
|
+
}
|
|
42077
|
+
if (extraBytes === 1) {
|
|
42078
|
+
tmp = uint8[len - 1];
|
|
42079
|
+
parts.push(
|
|
42080
|
+
lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
|
|
42081
|
+
);
|
|
42082
|
+
} else if (extraBytes === 2) {
|
|
42083
|
+
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
|
|
42084
|
+
parts.push(
|
|
42085
|
+
lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
|
|
42086
|
+
);
|
|
42087
|
+
}
|
|
42088
|
+
return parts.join("");
|
|
42089
|
+
}
|
|
42090
|
+
var ieee754 = {};
|
|
42091
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
42092
|
+
ieee754.read = function(buffer2, offset, isLE2, mLen, nBytes) {
|
|
42093
|
+
var e, m2;
|
|
42094
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
42095
|
+
var eMax = (1 << eLen) - 1;
|
|
42096
|
+
var eBias = eMax >> 1;
|
|
42097
|
+
var nBits = -7;
|
|
42098
|
+
var i = isLE2 ? nBytes - 1 : 0;
|
|
42099
|
+
var d = isLE2 ? -1 : 1;
|
|
42100
|
+
var s = buffer2[offset + i];
|
|
42101
|
+
i += d;
|
|
42102
|
+
e = s & (1 << -nBits) - 1;
|
|
42103
|
+
s >>= -nBits;
|
|
42104
|
+
nBits += eLen;
|
|
42105
|
+
for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
42106
|
+
}
|
|
42107
|
+
m2 = e & (1 << -nBits) - 1;
|
|
42108
|
+
e >>= -nBits;
|
|
42109
|
+
nBits += mLen;
|
|
42110
|
+
for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i], i += d, nBits -= 8) {
|
|
42111
|
+
}
|
|
42112
|
+
if (e === 0) {
|
|
42113
|
+
e = 1 - eBias;
|
|
42114
|
+
} else if (e === eMax) {
|
|
42115
|
+
return m2 ? NaN : (s ? -1 : 1) * Infinity;
|
|
42116
|
+
} else {
|
|
42117
|
+
m2 = m2 + Math.pow(2, mLen);
|
|
42118
|
+
e = e - eBias;
|
|
42119
|
+
}
|
|
42120
|
+
return (s ? -1 : 1) * m2 * Math.pow(2, e - mLen);
|
|
42121
|
+
};
|
|
42122
|
+
ieee754.write = function(buffer2, value, offset, isLE2, mLen, nBytes) {
|
|
42123
|
+
var e, m2, c;
|
|
42124
|
+
var eLen = nBytes * 8 - mLen - 1;
|
|
42125
|
+
var eMax = (1 << eLen) - 1;
|
|
42126
|
+
var eBias = eMax >> 1;
|
|
42127
|
+
var rt2 = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
42128
|
+
var i = isLE2 ? 0 : nBytes - 1;
|
|
42129
|
+
var d = isLE2 ? 1 : -1;
|
|
42130
|
+
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
42131
|
+
value = Math.abs(value);
|
|
42132
|
+
if (isNaN(value) || value === Infinity) {
|
|
42133
|
+
m2 = isNaN(value) ? 1 : 0;
|
|
42134
|
+
e = eMax;
|
|
42135
|
+
} else {
|
|
42136
|
+
e = Math.floor(Math.log(value) / Math.LN2);
|
|
42137
|
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
42138
|
+
e--;
|
|
42139
|
+
c *= 2;
|
|
42140
|
+
}
|
|
42141
|
+
if (e + eBias >= 1) {
|
|
42142
|
+
value += rt2 / c;
|
|
42143
|
+
} else {
|
|
42144
|
+
value += rt2 * Math.pow(2, 1 - eBias);
|
|
42145
|
+
}
|
|
42146
|
+
if (value * c >= 2) {
|
|
42147
|
+
e++;
|
|
42148
|
+
c /= 2;
|
|
42149
|
+
}
|
|
42150
|
+
if (e + eBias >= eMax) {
|
|
42151
|
+
m2 = 0;
|
|
42152
|
+
e = eMax;
|
|
42153
|
+
} else if (e + eBias >= 1) {
|
|
42154
|
+
m2 = (value * c - 1) * Math.pow(2, mLen);
|
|
42155
|
+
e = e + eBias;
|
|
42156
|
+
} else {
|
|
42157
|
+
m2 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
42158
|
+
e = 0;
|
|
42159
|
+
}
|
|
42160
|
+
}
|
|
42161
|
+
for (; mLen >= 8; buffer2[offset + i] = m2 & 255, i += d, m2 /= 256, mLen -= 8) {
|
|
42162
|
+
}
|
|
42163
|
+
e = e << mLen | m2;
|
|
42164
|
+
eLen += mLen;
|
|
42165
|
+
for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
42166
|
+
}
|
|
42167
|
+
buffer2[offset + i - d] |= s * 128;
|
|
42168
|
+
};
|
|
42169
|
+
/*!
|
|
42170
|
+
* The buffer module from node.js, for the browser.
|
|
42171
|
+
*
|
|
42172
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
42173
|
+
* @license MIT
|
|
42174
|
+
*/
|
|
42175
|
+
(function(exports) {
|
|
42176
|
+
const base64 = base64Js;
|
|
42177
|
+
const ieee754$1 = ieee754;
|
|
42178
|
+
const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
42179
|
+
exports.Buffer = Buffer2;
|
|
42180
|
+
exports.SlowBuffer = SlowBuffer;
|
|
42181
|
+
exports.INSPECT_MAX_BYTES = 50;
|
|
42182
|
+
const K_MAX_LENGTH = 2147483647;
|
|
42183
|
+
exports.kMaxLength = K_MAX_LENGTH;
|
|
42184
|
+
const { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;
|
|
42185
|
+
Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
42186
|
+
if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
42187
|
+
console.error(
|
|
42188
|
+
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
42189
|
+
);
|
|
42190
|
+
}
|
|
42191
|
+
function typedArraySupport() {
|
|
42192
|
+
try {
|
|
42193
|
+
const arr = new GlobalUint8Array(1);
|
|
42194
|
+
const proto = { foo: function() {
|
|
42195
|
+
return 42;
|
|
42196
|
+
} };
|
|
42197
|
+
Object.setPrototypeOf(proto, GlobalUint8Array.prototype);
|
|
42198
|
+
Object.setPrototypeOf(arr, proto);
|
|
42199
|
+
return arr.foo() === 42;
|
|
42200
|
+
} catch (e) {
|
|
42201
|
+
return false;
|
|
42202
|
+
}
|
|
42203
|
+
}
|
|
42204
|
+
Object.defineProperty(Buffer2.prototype, "parent", {
|
|
42205
|
+
enumerable: true,
|
|
42206
|
+
get: function() {
|
|
42207
|
+
if (!Buffer2.isBuffer(this)) return void 0;
|
|
42208
|
+
return this.buffer;
|
|
42209
|
+
}
|
|
42210
|
+
});
|
|
42211
|
+
Object.defineProperty(Buffer2.prototype, "offset", {
|
|
42212
|
+
enumerable: true,
|
|
42213
|
+
get: function() {
|
|
42214
|
+
if (!Buffer2.isBuffer(this)) return void 0;
|
|
42215
|
+
return this.byteOffset;
|
|
42216
|
+
}
|
|
42217
|
+
});
|
|
42218
|
+
function createBuffer(length2) {
|
|
42219
|
+
if (length2 > K_MAX_LENGTH) {
|
|
42220
|
+
throw new RangeError('The value "' + length2 + '" is invalid for option "size"');
|
|
42221
|
+
}
|
|
42222
|
+
const buf = new GlobalUint8Array(length2);
|
|
42223
|
+
Object.setPrototypeOf(buf, Buffer2.prototype);
|
|
42224
|
+
return buf;
|
|
42225
|
+
}
|
|
42226
|
+
function Buffer2(arg, encodingOrOffset, length2) {
|
|
42227
|
+
if (typeof arg === "number") {
|
|
42228
|
+
if (typeof encodingOrOffset === "string") {
|
|
42229
|
+
throw new TypeError(
|
|
42230
|
+
'The "string" argument must be of type string. Received type number'
|
|
42231
|
+
);
|
|
42232
|
+
}
|
|
42233
|
+
return allocUnsafe(arg);
|
|
42234
|
+
}
|
|
42235
|
+
return from2(arg, encodingOrOffset, length2);
|
|
42236
|
+
}
|
|
42237
|
+
Buffer2.poolSize = 8192;
|
|
42238
|
+
function from2(value, encodingOrOffset, length2) {
|
|
42239
|
+
if (typeof value === "string") {
|
|
42240
|
+
return fromString(value, encodingOrOffset);
|
|
42241
|
+
}
|
|
42242
|
+
if (GlobalArrayBuffer.isView(value)) {
|
|
42243
|
+
return fromArrayView(value);
|
|
42244
|
+
}
|
|
42245
|
+
if (value == null) {
|
|
42246
|
+
throw new TypeError(
|
|
42247
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
42248
|
+
);
|
|
42249
|
+
}
|
|
42250
|
+
if (isInstance(value, GlobalArrayBuffer) || value && isInstance(value.buffer, GlobalArrayBuffer)) {
|
|
42251
|
+
return fromArrayBuffer(value, encodingOrOffset, length2);
|
|
42252
|
+
}
|
|
42253
|
+
if (typeof GlobalSharedArrayBuffer !== "undefined" && (isInstance(value, GlobalSharedArrayBuffer) || value && isInstance(value.buffer, GlobalSharedArrayBuffer))) {
|
|
42254
|
+
return fromArrayBuffer(value, encodingOrOffset, length2);
|
|
42255
|
+
}
|
|
42256
|
+
if (typeof value === "number") {
|
|
42257
|
+
throw new TypeError(
|
|
42258
|
+
'The "value" argument must not be of type number. Received type number'
|
|
42259
|
+
);
|
|
42260
|
+
}
|
|
42261
|
+
const valueOf = value.valueOf && value.valueOf();
|
|
42262
|
+
if (valueOf != null && valueOf !== value) {
|
|
42263
|
+
return Buffer2.from(valueOf, encodingOrOffset, length2);
|
|
42264
|
+
}
|
|
42265
|
+
const b = fromObject(value);
|
|
42266
|
+
if (b) return b;
|
|
42267
|
+
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
42268
|
+
return Buffer2.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length2);
|
|
42269
|
+
}
|
|
42270
|
+
throw new TypeError(
|
|
42271
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
42272
|
+
);
|
|
42273
|
+
}
|
|
42274
|
+
Buffer2.from = function(value, encodingOrOffset, length2) {
|
|
42275
|
+
return from2(value, encodingOrOffset, length2);
|
|
42276
|
+
};
|
|
42277
|
+
Object.setPrototypeOf(Buffer2.prototype, GlobalUint8Array.prototype);
|
|
42278
|
+
Object.setPrototypeOf(Buffer2, GlobalUint8Array);
|
|
42279
|
+
function assertSize2(size2) {
|
|
42280
|
+
if (typeof size2 !== "number") {
|
|
42281
|
+
throw new TypeError('"size" argument must be of type number');
|
|
42282
|
+
} else if (size2 < 0) {
|
|
42283
|
+
throw new RangeError('The value "' + size2 + '" is invalid for option "size"');
|
|
42284
|
+
}
|
|
42285
|
+
}
|
|
42286
|
+
function alloc2(size2, fill, encoding) {
|
|
42287
|
+
assertSize2(size2);
|
|
42288
|
+
if (size2 <= 0) {
|
|
42289
|
+
return createBuffer(size2);
|
|
42290
|
+
}
|
|
42291
|
+
if (fill !== void 0) {
|
|
42292
|
+
return typeof encoding === "string" ? createBuffer(size2).fill(fill, encoding) : createBuffer(size2).fill(fill);
|
|
42293
|
+
}
|
|
42294
|
+
return createBuffer(size2);
|
|
42295
|
+
}
|
|
42296
|
+
Buffer2.alloc = function(size2, fill, encoding) {
|
|
42297
|
+
return alloc2(size2, fill, encoding);
|
|
42298
|
+
};
|
|
42299
|
+
function allocUnsafe(size2) {
|
|
42300
|
+
assertSize2(size2);
|
|
42301
|
+
return createBuffer(size2 < 0 ? 0 : checked(size2) | 0);
|
|
42302
|
+
}
|
|
42303
|
+
Buffer2.allocUnsafe = function(size2) {
|
|
42304
|
+
return allocUnsafe(size2);
|
|
42305
|
+
};
|
|
42306
|
+
Buffer2.allocUnsafeSlow = function(size2) {
|
|
42307
|
+
return allocUnsafe(size2);
|
|
42308
|
+
};
|
|
42309
|
+
function fromString(string, encoding) {
|
|
42310
|
+
if (typeof encoding !== "string" || encoding === "") {
|
|
42311
|
+
encoding = "utf8";
|
|
42312
|
+
}
|
|
42313
|
+
if (!Buffer2.isEncoding(encoding)) {
|
|
42314
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
42315
|
+
}
|
|
42316
|
+
const length2 = byteLength2(string, encoding) | 0;
|
|
42317
|
+
let buf = createBuffer(length2);
|
|
42318
|
+
const actual = buf.write(string, encoding);
|
|
42319
|
+
if (actual !== length2) {
|
|
42320
|
+
buf = buf.slice(0, actual);
|
|
42321
|
+
}
|
|
42322
|
+
return buf;
|
|
42323
|
+
}
|
|
42324
|
+
function fromArrayLike(array) {
|
|
42325
|
+
const length2 = array.length < 0 ? 0 : checked(array.length) | 0;
|
|
42326
|
+
const buf = createBuffer(length2);
|
|
42327
|
+
for (let i = 0; i < length2; i += 1) {
|
|
42328
|
+
buf[i] = array[i] & 255;
|
|
42329
|
+
}
|
|
42330
|
+
return buf;
|
|
42331
|
+
}
|
|
42332
|
+
function fromArrayView(arrayView) {
|
|
42333
|
+
if (isInstance(arrayView, GlobalUint8Array)) {
|
|
42334
|
+
const copy2 = new GlobalUint8Array(arrayView);
|
|
42335
|
+
return fromArrayBuffer(copy2.buffer, copy2.byteOffset, copy2.byteLength);
|
|
42336
|
+
}
|
|
42337
|
+
return fromArrayLike(arrayView);
|
|
42338
|
+
}
|
|
42339
|
+
function fromArrayBuffer(array, byteOffset, length2) {
|
|
42340
|
+
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
42341
|
+
throw new RangeError('"offset" is outside of buffer bounds');
|
|
42342
|
+
}
|
|
42343
|
+
if (array.byteLength < byteOffset + (length2 || 0)) {
|
|
42344
|
+
throw new RangeError('"length" is outside of buffer bounds');
|
|
42345
|
+
}
|
|
42346
|
+
let buf;
|
|
42347
|
+
if (byteOffset === void 0 && length2 === void 0) {
|
|
42348
|
+
buf = new GlobalUint8Array(array);
|
|
42349
|
+
} else if (length2 === void 0) {
|
|
42350
|
+
buf = new GlobalUint8Array(array, byteOffset);
|
|
42351
|
+
} else {
|
|
42352
|
+
buf = new GlobalUint8Array(array, byteOffset, length2);
|
|
42353
|
+
}
|
|
42354
|
+
Object.setPrototypeOf(buf, Buffer2.prototype);
|
|
42355
|
+
return buf;
|
|
42356
|
+
}
|
|
42357
|
+
function fromObject(obj) {
|
|
42358
|
+
if (Buffer2.isBuffer(obj)) {
|
|
42359
|
+
const len = checked(obj.length) | 0;
|
|
42360
|
+
const buf = createBuffer(len);
|
|
42361
|
+
if (buf.length === 0) {
|
|
42362
|
+
return buf;
|
|
42363
|
+
}
|
|
42364
|
+
obj.copy(buf, 0, 0, len);
|
|
42365
|
+
return buf;
|
|
42366
|
+
}
|
|
42367
|
+
if (obj.length !== void 0) {
|
|
42368
|
+
if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
|
|
42369
|
+
return createBuffer(0);
|
|
42370
|
+
}
|
|
42371
|
+
return fromArrayLike(obj);
|
|
42372
|
+
}
|
|
42373
|
+
if (obj.type === "Buffer" && Array.isArray(obj.data)) {
|
|
42374
|
+
return fromArrayLike(obj.data);
|
|
42375
|
+
}
|
|
42376
|
+
}
|
|
42377
|
+
function checked(length2) {
|
|
42378
|
+
if (length2 >= K_MAX_LENGTH) {
|
|
42379
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
|
|
42380
|
+
}
|
|
42381
|
+
return length2 | 0;
|
|
42382
|
+
}
|
|
42383
|
+
function SlowBuffer(length2) {
|
|
42384
|
+
if (+length2 != length2) {
|
|
42385
|
+
length2 = 0;
|
|
42386
|
+
}
|
|
42387
|
+
return Buffer2.alloc(+length2);
|
|
42388
|
+
}
|
|
42389
|
+
Buffer2.isBuffer = function isBuffer(b) {
|
|
42390
|
+
return b != null && b._isBuffer === true && b !== Buffer2.prototype;
|
|
42391
|
+
};
|
|
42392
|
+
Buffer2.compare = function compare2(a, b) {
|
|
42393
|
+
if (isInstance(a, GlobalUint8Array)) a = Buffer2.from(a, a.offset, a.byteLength);
|
|
42394
|
+
if (isInstance(b, GlobalUint8Array)) b = Buffer2.from(b, b.offset, b.byteLength);
|
|
42395
|
+
if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
|
|
42396
|
+
throw new TypeError(
|
|
42397
|
+
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
42398
|
+
);
|
|
42399
|
+
}
|
|
42400
|
+
if (a === b) return 0;
|
|
42401
|
+
let x2 = a.length;
|
|
42402
|
+
let y2 = b.length;
|
|
42403
|
+
for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
|
|
42404
|
+
if (a[i] !== b[i]) {
|
|
42405
|
+
x2 = a[i];
|
|
42406
|
+
y2 = b[i];
|
|
42407
|
+
break;
|
|
42408
|
+
}
|
|
42409
|
+
}
|
|
42410
|
+
if (x2 < y2) return -1;
|
|
42411
|
+
if (y2 < x2) return 1;
|
|
42412
|
+
return 0;
|
|
42413
|
+
};
|
|
42414
|
+
Buffer2.isEncoding = function isEncoding(encoding) {
|
|
42415
|
+
switch (String(encoding).toLowerCase()) {
|
|
42416
|
+
case "hex":
|
|
42417
|
+
case "utf8":
|
|
42418
|
+
case "utf-8":
|
|
42419
|
+
case "ascii":
|
|
42420
|
+
case "latin1":
|
|
42421
|
+
case "binary":
|
|
42422
|
+
case "base64":
|
|
42423
|
+
case "ucs2":
|
|
42424
|
+
case "ucs-2":
|
|
42425
|
+
case "utf16le":
|
|
42426
|
+
case "utf-16le":
|
|
42427
|
+
return true;
|
|
42428
|
+
default:
|
|
42429
|
+
return false;
|
|
42430
|
+
}
|
|
42431
|
+
};
|
|
42432
|
+
Buffer2.concat = function concat(list, length2) {
|
|
42433
|
+
if (!Array.isArray(list)) {
|
|
42434
|
+
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
42435
|
+
}
|
|
42436
|
+
if (list.length === 0) {
|
|
42437
|
+
return Buffer2.alloc(0);
|
|
42438
|
+
}
|
|
42439
|
+
let i;
|
|
42440
|
+
if (length2 === void 0) {
|
|
42441
|
+
length2 = 0;
|
|
42442
|
+
for (i = 0; i < list.length; ++i) {
|
|
42443
|
+
length2 += list[i].length;
|
|
42444
|
+
}
|
|
42445
|
+
}
|
|
42446
|
+
const buffer2 = Buffer2.allocUnsafe(length2);
|
|
42447
|
+
let pos = 0;
|
|
42448
|
+
for (i = 0; i < list.length; ++i) {
|
|
42449
|
+
let buf = list[i];
|
|
42450
|
+
if (isInstance(buf, GlobalUint8Array)) {
|
|
42451
|
+
if (pos + buf.length > buffer2.length) {
|
|
42452
|
+
if (!Buffer2.isBuffer(buf)) buf = Buffer2.from(buf);
|
|
42453
|
+
buf.copy(buffer2, pos);
|
|
42454
|
+
} else {
|
|
42455
|
+
GlobalUint8Array.prototype.set.call(
|
|
42456
|
+
buffer2,
|
|
42457
|
+
buf,
|
|
42458
|
+
pos
|
|
42459
|
+
);
|
|
42460
|
+
}
|
|
42461
|
+
} else if (!Buffer2.isBuffer(buf)) {
|
|
42462
|
+
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
42463
|
+
} else {
|
|
42464
|
+
buf.copy(buffer2, pos);
|
|
42465
|
+
}
|
|
42466
|
+
pos += buf.length;
|
|
42467
|
+
}
|
|
42468
|
+
return buffer2;
|
|
42469
|
+
};
|
|
42470
|
+
function byteLength2(string, encoding) {
|
|
42471
|
+
if (Buffer2.isBuffer(string)) {
|
|
42472
|
+
return string.length;
|
|
42473
|
+
}
|
|
42474
|
+
if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) {
|
|
42475
|
+
return string.byteLength;
|
|
42476
|
+
}
|
|
42477
|
+
if (typeof string !== "string") {
|
|
42478
|
+
throw new TypeError(
|
|
42479
|
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string
|
|
42480
|
+
);
|
|
42481
|
+
}
|
|
42482
|
+
const len = string.length;
|
|
42483
|
+
const mustMatch = arguments.length > 2 && arguments[2] === true;
|
|
42484
|
+
if (!mustMatch && len === 0) return 0;
|
|
42485
|
+
let loweredCase = false;
|
|
42486
|
+
for (; ; ) {
|
|
42487
|
+
switch (encoding) {
|
|
42488
|
+
case "ascii":
|
|
42489
|
+
case "latin1":
|
|
42490
|
+
case "binary":
|
|
42491
|
+
return len;
|
|
42492
|
+
case "utf8":
|
|
42493
|
+
case "utf-8":
|
|
42494
|
+
return utf8ToBytes2(string).length;
|
|
42495
|
+
case "ucs2":
|
|
42496
|
+
case "ucs-2":
|
|
42497
|
+
case "utf16le":
|
|
42498
|
+
case "utf-16le":
|
|
42499
|
+
return len * 2;
|
|
42500
|
+
case "hex":
|
|
42501
|
+
return len >>> 1;
|
|
42502
|
+
case "base64":
|
|
42503
|
+
return base64ToBytes(string).length;
|
|
42504
|
+
default:
|
|
42505
|
+
if (loweredCase) {
|
|
42506
|
+
return mustMatch ? -1 : utf8ToBytes2(string).length;
|
|
42507
|
+
}
|
|
42508
|
+
encoding = ("" + encoding).toLowerCase();
|
|
42509
|
+
loweredCase = true;
|
|
42510
|
+
}
|
|
42511
|
+
}
|
|
42512
|
+
}
|
|
42513
|
+
Buffer2.byteLength = byteLength2;
|
|
42514
|
+
function slowToString(encoding, start, end) {
|
|
42515
|
+
let loweredCase = false;
|
|
42516
|
+
if (start === void 0 || start < 0) {
|
|
42517
|
+
start = 0;
|
|
42518
|
+
}
|
|
42519
|
+
if (start > this.length) {
|
|
42520
|
+
return "";
|
|
42521
|
+
}
|
|
42522
|
+
if (end === void 0 || end > this.length) {
|
|
42523
|
+
end = this.length;
|
|
42524
|
+
}
|
|
42525
|
+
if (end <= 0) {
|
|
42526
|
+
return "";
|
|
42527
|
+
}
|
|
42528
|
+
end >>>= 0;
|
|
42529
|
+
start >>>= 0;
|
|
42530
|
+
if (end <= start) {
|
|
42531
|
+
return "";
|
|
42532
|
+
}
|
|
42533
|
+
if (!encoding) encoding = "utf8";
|
|
42534
|
+
while (true) {
|
|
42535
|
+
switch (encoding) {
|
|
42536
|
+
case "hex":
|
|
42537
|
+
return hexSlice(this, start, end);
|
|
42538
|
+
case "utf8":
|
|
42539
|
+
case "utf-8":
|
|
42540
|
+
return utf8Slice(this, start, end);
|
|
42541
|
+
case "ascii":
|
|
42542
|
+
return asciiSlice(this, start, end);
|
|
42543
|
+
case "latin1":
|
|
42544
|
+
case "binary":
|
|
42545
|
+
return latin1Slice(this, start, end);
|
|
42546
|
+
case "base64":
|
|
42547
|
+
return base64Slice(this, start, end);
|
|
42548
|
+
case "ucs2":
|
|
42549
|
+
case "ucs-2":
|
|
42550
|
+
case "utf16le":
|
|
42551
|
+
case "utf-16le":
|
|
42552
|
+
return utf16leSlice(this, start, end);
|
|
42553
|
+
default:
|
|
42554
|
+
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
|
|
42555
|
+
encoding = (encoding + "").toLowerCase();
|
|
42556
|
+
loweredCase = true;
|
|
42557
|
+
}
|
|
42558
|
+
}
|
|
42559
|
+
}
|
|
42560
|
+
Buffer2.prototype._isBuffer = true;
|
|
42561
|
+
function swap(b, n, m2) {
|
|
42562
|
+
const i = b[n];
|
|
42563
|
+
b[n] = b[m2];
|
|
42564
|
+
b[m2] = i;
|
|
42565
|
+
}
|
|
42566
|
+
Buffer2.prototype.swap16 = function swap16() {
|
|
42567
|
+
const len = this.length;
|
|
42568
|
+
if (len % 2 !== 0) {
|
|
42569
|
+
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
42570
|
+
}
|
|
42571
|
+
for (let i = 0; i < len; i += 2) {
|
|
42572
|
+
swap(this, i, i + 1);
|
|
42573
|
+
}
|
|
42574
|
+
return this;
|
|
42575
|
+
};
|
|
42576
|
+
Buffer2.prototype.swap32 = function swap32() {
|
|
42577
|
+
const len = this.length;
|
|
42578
|
+
if (len % 4 !== 0) {
|
|
42579
|
+
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
42580
|
+
}
|
|
42581
|
+
for (let i = 0; i < len; i += 4) {
|
|
42582
|
+
swap(this, i, i + 3);
|
|
42583
|
+
swap(this, i + 1, i + 2);
|
|
42584
|
+
}
|
|
42585
|
+
return this;
|
|
42586
|
+
};
|
|
42587
|
+
Buffer2.prototype.swap64 = function swap64() {
|
|
42588
|
+
const len = this.length;
|
|
42589
|
+
if (len % 8 !== 0) {
|
|
42590
|
+
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
42591
|
+
}
|
|
42592
|
+
for (let i = 0; i < len; i += 8) {
|
|
42593
|
+
swap(this, i, i + 7);
|
|
42594
|
+
swap(this, i + 1, i + 6);
|
|
42595
|
+
swap(this, i + 2, i + 5);
|
|
42596
|
+
swap(this, i + 3, i + 4);
|
|
42597
|
+
}
|
|
42598
|
+
return this;
|
|
42599
|
+
};
|
|
42600
|
+
Buffer2.prototype.toString = function toString() {
|
|
42601
|
+
const length2 = this.length;
|
|
42602
|
+
if (length2 === 0) return "";
|
|
42603
|
+
if (arguments.length === 0) return utf8Slice(this, 0, length2);
|
|
42604
|
+
return slowToString.apply(this, arguments);
|
|
42605
|
+
};
|
|
42606
|
+
Buffer2.prototype.toLocaleString = Buffer2.prototype.toString;
|
|
42607
|
+
Buffer2.prototype.equals = function equals(b) {
|
|
42608
|
+
if (!Buffer2.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
|
|
42609
|
+
if (this === b) return true;
|
|
42610
|
+
return Buffer2.compare(this, b) === 0;
|
|
42611
|
+
};
|
|
42612
|
+
Buffer2.prototype.inspect = function inspect() {
|
|
42613
|
+
let str = "";
|
|
42614
|
+
const max = exports.INSPECT_MAX_BYTES;
|
|
42615
|
+
str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
|
|
42616
|
+
if (this.length > max) str += " ... ";
|
|
42617
|
+
return "<Buffer " + str + ">";
|
|
42618
|
+
};
|
|
42619
|
+
if (customInspectSymbol) {
|
|
42620
|
+
Buffer2.prototype[customInspectSymbol] = Buffer2.prototype.inspect;
|
|
42621
|
+
}
|
|
42622
|
+
Buffer2.prototype.compare = function compare2(target, start, end, thisStart, thisEnd) {
|
|
42623
|
+
if (isInstance(target, GlobalUint8Array)) {
|
|
42624
|
+
target = Buffer2.from(target, target.offset, target.byteLength);
|
|
42625
|
+
}
|
|
42626
|
+
if (!Buffer2.isBuffer(target)) {
|
|
42627
|
+
throw new TypeError(
|
|
42628
|
+
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target
|
|
42629
|
+
);
|
|
42630
|
+
}
|
|
42631
|
+
if (start === void 0) {
|
|
42632
|
+
start = 0;
|
|
42633
|
+
}
|
|
42634
|
+
if (end === void 0) {
|
|
42635
|
+
end = target ? target.length : 0;
|
|
42636
|
+
}
|
|
42637
|
+
if (thisStart === void 0) {
|
|
42638
|
+
thisStart = 0;
|
|
42639
|
+
}
|
|
42640
|
+
if (thisEnd === void 0) {
|
|
42641
|
+
thisEnd = this.length;
|
|
42642
|
+
}
|
|
42643
|
+
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
|
42644
|
+
throw new RangeError("out of range index");
|
|
42645
|
+
}
|
|
42646
|
+
if (thisStart >= thisEnd && start >= end) {
|
|
42647
|
+
return 0;
|
|
42648
|
+
}
|
|
42649
|
+
if (thisStart >= thisEnd) {
|
|
42650
|
+
return -1;
|
|
42651
|
+
}
|
|
42652
|
+
if (start >= end) {
|
|
42653
|
+
return 1;
|
|
42654
|
+
}
|
|
42655
|
+
start >>>= 0;
|
|
42656
|
+
end >>>= 0;
|
|
42657
|
+
thisStart >>>= 0;
|
|
42658
|
+
thisEnd >>>= 0;
|
|
42659
|
+
if (this === target) return 0;
|
|
42660
|
+
let x2 = thisEnd - thisStart;
|
|
42661
|
+
let y2 = end - start;
|
|
42662
|
+
const len = Math.min(x2, y2);
|
|
42663
|
+
const thisCopy = this.slice(thisStart, thisEnd);
|
|
42664
|
+
const targetCopy = target.slice(start, end);
|
|
42665
|
+
for (let i = 0; i < len; ++i) {
|
|
42666
|
+
if (thisCopy[i] !== targetCopy[i]) {
|
|
42667
|
+
x2 = thisCopy[i];
|
|
42668
|
+
y2 = targetCopy[i];
|
|
42669
|
+
break;
|
|
42670
|
+
}
|
|
42671
|
+
}
|
|
42672
|
+
if (x2 < y2) return -1;
|
|
42673
|
+
if (y2 < x2) return 1;
|
|
42674
|
+
return 0;
|
|
42675
|
+
};
|
|
42676
|
+
function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
|
|
42677
|
+
if (buffer2.length === 0) return -1;
|
|
42678
|
+
if (typeof byteOffset === "string") {
|
|
42679
|
+
encoding = byteOffset;
|
|
42680
|
+
byteOffset = 0;
|
|
42681
|
+
} else if (byteOffset > 2147483647) {
|
|
42682
|
+
byteOffset = 2147483647;
|
|
42683
|
+
} else if (byteOffset < -2147483648) {
|
|
42684
|
+
byteOffset = -2147483648;
|
|
42685
|
+
}
|
|
42686
|
+
byteOffset = +byteOffset;
|
|
42687
|
+
if (numberIsNaN(byteOffset)) {
|
|
42688
|
+
byteOffset = dir ? 0 : buffer2.length - 1;
|
|
42689
|
+
}
|
|
42690
|
+
if (byteOffset < 0) byteOffset = buffer2.length + byteOffset;
|
|
42691
|
+
if (byteOffset >= buffer2.length) {
|
|
42692
|
+
if (dir) return -1;
|
|
42693
|
+
else byteOffset = buffer2.length - 1;
|
|
42694
|
+
} else if (byteOffset < 0) {
|
|
42695
|
+
if (dir) byteOffset = 0;
|
|
42696
|
+
else return -1;
|
|
42697
|
+
}
|
|
42698
|
+
if (typeof val === "string") {
|
|
42699
|
+
val = Buffer2.from(val, encoding);
|
|
42700
|
+
}
|
|
42701
|
+
if (Buffer2.isBuffer(val)) {
|
|
42702
|
+
if (val.length === 0) {
|
|
42703
|
+
return -1;
|
|
42704
|
+
}
|
|
42705
|
+
return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);
|
|
42706
|
+
} else if (typeof val === "number") {
|
|
42707
|
+
val = val & 255;
|
|
42708
|
+
if (typeof GlobalUint8Array.prototype.indexOf === "function") {
|
|
42709
|
+
if (dir) {
|
|
42710
|
+
return GlobalUint8Array.prototype.indexOf.call(buffer2, val, byteOffset);
|
|
42711
|
+
} else {
|
|
42712
|
+
return GlobalUint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);
|
|
42713
|
+
}
|
|
42714
|
+
}
|
|
42715
|
+
return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);
|
|
42716
|
+
}
|
|
42717
|
+
throw new TypeError("val must be string, number or Buffer");
|
|
42718
|
+
}
|
|
42719
|
+
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
|
|
42720
|
+
let indexSize = 1;
|
|
42721
|
+
let arrLength = arr.length;
|
|
42722
|
+
let valLength = val.length;
|
|
42723
|
+
if (encoding !== void 0) {
|
|
42724
|
+
encoding = String(encoding).toLowerCase();
|
|
42725
|
+
if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
|
|
42726
|
+
if (arr.length < 2 || val.length < 2) {
|
|
42727
|
+
return -1;
|
|
42728
|
+
}
|
|
42729
|
+
indexSize = 2;
|
|
42730
|
+
arrLength /= 2;
|
|
42731
|
+
valLength /= 2;
|
|
42732
|
+
byteOffset /= 2;
|
|
42733
|
+
}
|
|
42734
|
+
}
|
|
42735
|
+
function read(buf, i2) {
|
|
42736
|
+
if (indexSize === 1) {
|
|
42737
|
+
return buf[i2];
|
|
42738
|
+
} else {
|
|
42739
|
+
return buf.readUInt16BE(i2 * indexSize);
|
|
42740
|
+
}
|
|
42741
|
+
}
|
|
42742
|
+
let i;
|
|
42743
|
+
if (dir) {
|
|
42744
|
+
let foundIndex = -1;
|
|
42745
|
+
for (i = byteOffset; i < arrLength; i++) {
|
|
42746
|
+
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
|
42747
|
+
if (foundIndex === -1) foundIndex = i;
|
|
42748
|
+
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
|
|
42749
|
+
} else {
|
|
42750
|
+
if (foundIndex !== -1) i -= i - foundIndex;
|
|
42751
|
+
foundIndex = -1;
|
|
42752
|
+
}
|
|
42753
|
+
}
|
|
42754
|
+
} else {
|
|
42755
|
+
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
|
|
42756
|
+
for (i = byteOffset; i >= 0; i--) {
|
|
42757
|
+
let found = true;
|
|
42758
|
+
for (let j2 = 0; j2 < valLength; j2++) {
|
|
42759
|
+
if (read(arr, i + j2) !== read(val, j2)) {
|
|
42760
|
+
found = false;
|
|
42761
|
+
break;
|
|
42762
|
+
}
|
|
42763
|
+
}
|
|
42764
|
+
if (found) return i;
|
|
42765
|
+
}
|
|
42766
|
+
}
|
|
42767
|
+
return -1;
|
|
42768
|
+
}
|
|
42769
|
+
Buffer2.prototype.includes = function includes(val, byteOffset, encoding) {
|
|
42770
|
+
return this.indexOf(val, byteOffset, encoding) !== -1;
|
|
42771
|
+
};
|
|
42772
|
+
Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
|
|
42773
|
+
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
|
|
42774
|
+
};
|
|
42775
|
+
Buffer2.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
|
|
42776
|
+
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
|
|
42777
|
+
};
|
|
42778
|
+
function hexWrite(buf, string, offset, length2) {
|
|
42779
|
+
offset = Number(offset) || 0;
|
|
42780
|
+
const remaining = buf.length - offset;
|
|
42781
|
+
if (!length2) {
|
|
42782
|
+
length2 = remaining;
|
|
42783
|
+
} else {
|
|
42784
|
+
length2 = Number(length2);
|
|
42785
|
+
if (length2 > remaining) {
|
|
42786
|
+
length2 = remaining;
|
|
42787
|
+
}
|
|
42788
|
+
}
|
|
42789
|
+
const strLen = string.length;
|
|
42790
|
+
if (length2 > strLen / 2) {
|
|
42791
|
+
length2 = strLen / 2;
|
|
42792
|
+
}
|
|
42793
|
+
let i;
|
|
42794
|
+
for (i = 0; i < length2; ++i) {
|
|
42795
|
+
const parsed = parseInt(string.substr(i * 2, 2), 16);
|
|
42796
|
+
if (numberIsNaN(parsed)) return i;
|
|
42797
|
+
buf[offset + i] = parsed;
|
|
42798
|
+
}
|
|
42799
|
+
return i;
|
|
42800
|
+
}
|
|
42801
|
+
function utf8Write(buf, string, offset, length2) {
|
|
42802
|
+
return blitBuffer(utf8ToBytes2(string, buf.length - offset), buf, offset, length2);
|
|
42803
|
+
}
|
|
42804
|
+
function asciiWrite(buf, string, offset, length2) {
|
|
42805
|
+
return blitBuffer(asciiToBytes(string), buf, offset, length2);
|
|
42806
|
+
}
|
|
42807
|
+
function base64Write(buf, string, offset, length2) {
|
|
42808
|
+
return blitBuffer(base64ToBytes(string), buf, offset, length2);
|
|
42809
|
+
}
|
|
42810
|
+
function ucs2Write(buf, string, offset, length2) {
|
|
42811
|
+
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length2);
|
|
42812
|
+
}
|
|
42813
|
+
Buffer2.prototype.write = function write(string, offset, length2, encoding) {
|
|
42814
|
+
if (offset === void 0) {
|
|
42815
|
+
encoding = "utf8";
|
|
42816
|
+
length2 = this.length;
|
|
42817
|
+
offset = 0;
|
|
42818
|
+
} else if (length2 === void 0 && typeof offset === "string") {
|
|
42819
|
+
encoding = offset;
|
|
42820
|
+
length2 = this.length;
|
|
42821
|
+
offset = 0;
|
|
42822
|
+
} else if (isFinite(offset)) {
|
|
42823
|
+
offset = offset >>> 0;
|
|
42824
|
+
if (isFinite(length2)) {
|
|
42825
|
+
length2 = length2 >>> 0;
|
|
42826
|
+
if (encoding === void 0) encoding = "utf8";
|
|
42827
|
+
} else {
|
|
42828
|
+
encoding = length2;
|
|
42829
|
+
length2 = void 0;
|
|
42830
|
+
}
|
|
42831
|
+
} else {
|
|
42832
|
+
throw new Error(
|
|
42833
|
+
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
42834
|
+
);
|
|
42835
|
+
}
|
|
42836
|
+
const remaining = this.length - offset;
|
|
42837
|
+
if (length2 === void 0 || length2 > remaining) length2 = remaining;
|
|
42838
|
+
if (string.length > 0 && (length2 < 0 || offset < 0) || offset > this.length) {
|
|
42839
|
+
throw new RangeError("Attempt to write outside buffer bounds");
|
|
42840
|
+
}
|
|
42841
|
+
if (!encoding) encoding = "utf8";
|
|
42842
|
+
let loweredCase = false;
|
|
42843
|
+
for (; ; ) {
|
|
42844
|
+
switch (encoding) {
|
|
42845
|
+
case "hex":
|
|
42846
|
+
return hexWrite(this, string, offset, length2);
|
|
42847
|
+
case "utf8":
|
|
42848
|
+
case "utf-8":
|
|
42849
|
+
return utf8Write(this, string, offset, length2);
|
|
42850
|
+
case "ascii":
|
|
42851
|
+
case "latin1":
|
|
42852
|
+
case "binary":
|
|
42853
|
+
return asciiWrite(this, string, offset, length2);
|
|
42854
|
+
case "base64":
|
|
42855
|
+
return base64Write(this, string, offset, length2);
|
|
42856
|
+
case "ucs2":
|
|
42857
|
+
case "ucs-2":
|
|
42858
|
+
case "utf16le":
|
|
42859
|
+
case "utf-16le":
|
|
42860
|
+
return ucs2Write(this, string, offset, length2);
|
|
42861
|
+
default:
|
|
42862
|
+
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
|
|
42863
|
+
encoding = ("" + encoding).toLowerCase();
|
|
42864
|
+
loweredCase = true;
|
|
42865
|
+
}
|
|
42866
|
+
}
|
|
42867
|
+
};
|
|
42868
|
+
Buffer2.prototype.toJSON = function toJSON() {
|
|
42869
|
+
return {
|
|
42870
|
+
type: "Buffer",
|
|
42871
|
+
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
42872
|
+
};
|
|
42873
|
+
};
|
|
42874
|
+
function base64Slice(buf, start, end) {
|
|
42875
|
+
if (start === 0 && end === buf.length) {
|
|
42876
|
+
return base64.fromByteArray(buf);
|
|
42877
|
+
} else {
|
|
42878
|
+
return base64.fromByteArray(buf.slice(start, end));
|
|
42879
|
+
}
|
|
42880
|
+
}
|
|
42881
|
+
function utf8Slice(buf, start, end) {
|
|
42882
|
+
end = Math.min(buf.length, end);
|
|
42883
|
+
const res = [];
|
|
42884
|
+
let i = start;
|
|
42885
|
+
while (i < end) {
|
|
42886
|
+
const firstByte = buf[i];
|
|
42887
|
+
let codePoint = null;
|
|
42888
|
+
let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
|
|
42889
|
+
if (i + bytesPerSequence <= end) {
|
|
42890
|
+
let secondByte, thirdByte, fourthByte, tempCodePoint;
|
|
42891
|
+
switch (bytesPerSequence) {
|
|
42892
|
+
case 1:
|
|
42893
|
+
if (firstByte < 128) {
|
|
42894
|
+
codePoint = firstByte;
|
|
42895
|
+
}
|
|
42896
|
+
break;
|
|
42897
|
+
case 2:
|
|
42898
|
+
secondByte = buf[i + 1];
|
|
42899
|
+
if ((secondByte & 192) === 128) {
|
|
42900
|
+
tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
|
|
42901
|
+
if (tempCodePoint > 127) {
|
|
42902
|
+
codePoint = tempCodePoint;
|
|
42903
|
+
}
|
|
42904
|
+
}
|
|
42905
|
+
break;
|
|
42906
|
+
case 3:
|
|
42907
|
+
secondByte = buf[i + 1];
|
|
42908
|
+
thirdByte = buf[i + 2];
|
|
42909
|
+
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
|
|
42910
|
+
tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
|
|
42911
|
+
if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
|
|
42912
|
+
codePoint = tempCodePoint;
|
|
42913
|
+
}
|
|
42914
|
+
}
|
|
42915
|
+
break;
|
|
42916
|
+
case 4:
|
|
42917
|
+
secondByte = buf[i + 1];
|
|
42918
|
+
thirdByte = buf[i + 2];
|
|
42919
|
+
fourthByte = buf[i + 3];
|
|
42920
|
+
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
|
|
42921
|
+
tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
|
|
42922
|
+
if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
|
|
42923
|
+
codePoint = tempCodePoint;
|
|
42924
|
+
}
|
|
42925
|
+
}
|
|
42926
|
+
}
|
|
42927
|
+
}
|
|
42928
|
+
if (codePoint === null) {
|
|
42929
|
+
codePoint = 65533;
|
|
42930
|
+
bytesPerSequence = 1;
|
|
42931
|
+
} else if (codePoint > 65535) {
|
|
42932
|
+
codePoint -= 65536;
|
|
42933
|
+
res.push(codePoint >>> 10 & 1023 | 55296);
|
|
42934
|
+
codePoint = 56320 | codePoint & 1023;
|
|
42935
|
+
}
|
|
42936
|
+
res.push(codePoint);
|
|
42937
|
+
i += bytesPerSequence;
|
|
42938
|
+
}
|
|
42939
|
+
return decodeCodePointsArray(res);
|
|
42940
|
+
}
|
|
42941
|
+
const MAX_ARGUMENTS_LENGTH = 4096;
|
|
42942
|
+
function decodeCodePointsArray(codePoints) {
|
|
42943
|
+
const len = codePoints.length;
|
|
42944
|
+
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
42945
|
+
return String.fromCharCode.apply(String, codePoints);
|
|
42946
|
+
}
|
|
42947
|
+
let res = "";
|
|
42948
|
+
let i = 0;
|
|
42949
|
+
while (i < len) {
|
|
42950
|
+
res += String.fromCharCode.apply(
|
|
42951
|
+
String,
|
|
42952
|
+
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
|
42953
|
+
);
|
|
42954
|
+
}
|
|
42955
|
+
return res;
|
|
42956
|
+
}
|
|
42957
|
+
function asciiSlice(buf, start, end) {
|
|
42958
|
+
let ret = "";
|
|
42959
|
+
end = Math.min(buf.length, end);
|
|
42960
|
+
for (let i = start; i < end; ++i) {
|
|
42961
|
+
ret += String.fromCharCode(buf[i] & 127);
|
|
42962
|
+
}
|
|
42963
|
+
return ret;
|
|
42964
|
+
}
|
|
42965
|
+
function latin1Slice(buf, start, end) {
|
|
42966
|
+
let ret = "";
|
|
42967
|
+
end = Math.min(buf.length, end);
|
|
42968
|
+
for (let i = start; i < end; ++i) {
|
|
42969
|
+
ret += String.fromCharCode(buf[i]);
|
|
42970
|
+
}
|
|
42971
|
+
return ret;
|
|
42972
|
+
}
|
|
42973
|
+
function hexSlice(buf, start, end) {
|
|
42974
|
+
const len = buf.length;
|
|
42975
|
+
if (!start || start < 0) start = 0;
|
|
42976
|
+
if (!end || end < 0 || end > len) end = len;
|
|
42977
|
+
let out = "";
|
|
42978
|
+
for (let i = start; i < end; ++i) {
|
|
42979
|
+
out += hexSliceLookupTable[buf[i]];
|
|
42980
|
+
}
|
|
42981
|
+
return out;
|
|
42982
|
+
}
|
|
42983
|
+
function utf16leSlice(buf, start, end) {
|
|
42984
|
+
const bytes = buf.slice(start, end);
|
|
42985
|
+
let res = "";
|
|
42986
|
+
for (let i = 0; i < bytes.length - 1; i += 2) {
|
|
42987
|
+
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
|
|
42988
|
+
}
|
|
42989
|
+
return res;
|
|
42990
|
+
}
|
|
42991
|
+
Buffer2.prototype.slice = function slice2(start, end) {
|
|
42992
|
+
const len = this.length;
|
|
42993
|
+
start = ~~start;
|
|
42994
|
+
end = end === void 0 ? len : ~~end;
|
|
42995
|
+
if (start < 0) {
|
|
42996
|
+
start += len;
|
|
42997
|
+
if (start < 0) start = 0;
|
|
42998
|
+
} else if (start > len) {
|
|
42999
|
+
start = len;
|
|
43000
|
+
}
|
|
43001
|
+
if (end < 0) {
|
|
43002
|
+
end += len;
|
|
43003
|
+
if (end < 0) end = 0;
|
|
43004
|
+
} else if (end > len) {
|
|
43005
|
+
end = len;
|
|
43006
|
+
}
|
|
43007
|
+
if (end < start) end = start;
|
|
43008
|
+
const newBuf = this.subarray(start, end);
|
|
43009
|
+
Object.setPrototypeOf(newBuf, Buffer2.prototype);
|
|
43010
|
+
return newBuf;
|
|
43011
|
+
};
|
|
43012
|
+
function checkOffset(offset, ext, length2) {
|
|
43013
|
+
if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
|
|
43014
|
+
if (offset + ext > length2) throw new RangeError("Trying to access beyond buffer length");
|
|
43015
|
+
}
|
|
43016
|
+
Buffer2.prototype.readUintLE = Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength3, noAssert) {
|
|
43017
|
+
offset = offset >>> 0;
|
|
43018
|
+
byteLength3 = byteLength3 >>> 0;
|
|
43019
|
+
if (!noAssert) checkOffset(offset, byteLength3, this.length);
|
|
43020
|
+
let val = this[offset];
|
|
43021
|
+
let mul = 1;
|
|
43022
|
+
let i = 0;
|
|
43023
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
43024
|
+
val += this[offset + i] * mul;
|
|
43025
|
+
}
|
|
43026
|
+
return val;
|
|
43027
|
+
};
|
|
43028
|
+
Buffer2.prototype.readUintBE = Buffer2.prototype.readUIntBE = function readUIntBE(offset, byteLength3, noAssert) {
|
|
43029
|
+
offset = offset >>> 0;
|
|
43030
|
+
byteLength3 = byteLength3 >>> 0;
|
|
43031
|
+
if (!noAssert) {
|
|
43032
|
+
checkOffset(offset, byteLength3, this.length);
|
|
43033
|
+
}
|
|
43034
|
+
let val = this[offset + --byteLength3];
|
|
43035
|
+
let mul = 1;
|
|
43036
|
+
while (byteLength3 > 0 && (mul *= 256)) {
|
|
43037
|
+
val += this[offset + --byteLength3] * mul;
|
|
43038
|
+
}
|
|
43039
|
+
return val;
|
|
43040
|
+
};
|
|
43041
|
+
Buffer2.prototype.readUint8 = Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) {
|
|
43042
|
+
offset = offset >>> 0;
|
|
43043
|
+
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
43044
|
+
return this[offset];
|
|
43045
|
+
};
|
|
43046
|
+
Buffer2.prototype.readUint16LE = Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
|
|
43047
|
+
offset = offset >>> 0;
|
|
43048
|
+
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
43049
|
+
return this[offset] | this[offset + 1] << 8;
|
|
43050
|
+
};
|
|
43051
|
+
Buffer2.prototype.readUint16BE = Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
|
|
43052
|
+
offset = offset >>> 0;
|
|
43053
|
+
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
43054
|
+
return this[offset] << 8 | this[offset + 1];
|
|
43055
|
+
};
|
|
43056
|
+
Buffer2.prototype.readUint32LE = Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
|
|
43057
|
+
offset = offset >>> 0;
|
|
43058
|
+
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
43059
|
+
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
|
|
43060
|
+
};
|
|
43061
|
+
Buffer2.prototype.readUint32BE = Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
|
|
43062
|
+
offset = offset >>> 0;
|
|
43063
|
+
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
43064
|
+
return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
|
|
43065
|
+
};
|
|
43066
|
+
Buffer2.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
|
|
43067
|
+
offset = offset >>> 0;
|
|
43068
|
+
validateNumber(offset, "offset");
|
|
43069
|
+
const first = this[offset];
|
|
43070
|
+
const last = this[offset + 7];
|
|
43071
|
+
if (first === void 0 || last === void 0) {
|
|
43072
|
+
boundsError(offset, this.length - 8);
|
|
43073
|
+
}
|
|
43074
|
+
const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
|
|
43075
|
+
const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
|
|
43076
|
+
return BigInt(lo) + (BigInt(hi) << BigInt(32));
|
|
43077
|
+
});
|
|
43078
|
+
Buffer2.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
|
|
43079
|
+
offset = offset >>> 0;
|
|
43080
|
+
validateNumber(offset, "offset");
|
|
43081
|
+
const first = this[offset];
|
|
43082
|
+
const last = this[offset + 7];
|
|
43083
|
+
if (first === void 0 || last === void 0) {
|
|
43084
|
+
boundsError(offset, this.length - 8);
|
|
43085
|
+
}
|
|
43086
|
+
const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
43087
|
+
const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
|
|
43088
|
+
return (BigInt(hi) << BigInt(32)) + BigInt(lo);
|
|
43089
|
+
});
|
|
43090
|
+
Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength3, noAssert) {
|
|
43091
|
+
offset = offset >>> 0;
|
|
43092
|
+
byteLength3 = byteLength3 >>> 0;
|
|
43093
|
+
if (!noAssert) checkOffset(offset, byteLength3, this.length);
|
|
43094
|
+
let val = this[offset];
|
|
43095
|
+
let mul = 1;
|
|
43096
|
+
let i = 0;
|
|
43097
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
43098
|
+
val += this[offset + i] * mul;
|
|
43099
|
+
}
|
|
43100
|
+
mul *= 128;
|
|
43101
|
+
if (val >= mul) val -= Math.pow(2, 8 * byteLength3);
|
|
43102
|
+
return val;
|
|
43103
|
+
};
|
|
43104
|
+
Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength3, noAssert) {
|
|
43105
|
+
offset = offset >>> 0;
|
|
43106
|
+
byteLength3 = byteLength3 >>> 0;
|
|
43107
|
+
if (!noAssert) checkOffset(offset, byteLength3, this.length);
|
|
43108
|
+
let i = byteLength3;
|
|
43109
|
+
let mul = 1;
|
|
43110
|
+
let val = this[offset + --i];
|
|
43111
|
+
while (i > 0 && (mul *= 256)) {
|
|
43112
|
+
val += this[offset + --i] * mul;
|
|
43113
|
+
}
|
|
43114
|
+
mul *= 128;
|
|
43115
|
+
if (val >= mul) val -= Math.pow(2, 8 * byteLength3);
|
|
43116
|
+
return val;
|
|
43117
|
+
};
|
|
43118
|
+
Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) {
|
|
43119
|
+
offset = offset >>> 0;
|
|
43120
|
+
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
43121
|
+
if (!(this[offset] & 128)) return this[offset];
|
|
43122
|
+
return (255 - this[offset] + 1) * -1;
|
|
43123
|
+
};
|
|
43124
|
+
Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
|
|
43125
|
+
offset = offset >>> 0;
|
|
43126
|
+
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
43127
|
+
const val = this[offset] | this[offset + 1] << 8;
|
|
43128
|
+
return val & 32768 ? val | 4294901760 : val;
|
|
43129
|
+
};
|
|
43130
|
+
Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
|
|
43131
|
+
offset = offset >>> 0;
|
|
43132
|
+
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
43133
|
+
const val = this[offset + 1] | this[offset] << 8;
|
|
43134
|
+
return val & 32768 ? val | 4294901760 : val;
|
|
43135
|
+
};
|
|
43136
|
+
Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
|
|
43137
|
+
offset = offset >>> 0;
|
|
43138
|
+
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
43139
|
+
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
|
|
43140
|
+
};
|
|
43141
|
+
Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
|
|
43142
|
+
offset = offset >>> 0;
|
|
43143
|
+
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
43144
|
+
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
|
|
43145
|
+
};
|
|
43146
|
+
Buffer2.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
|
|
43147
|
+
offset = offset >>> 0;
|
|
43148
|
+
validateNumber(offset, "offset");
|
|
43149
|
+
const first = this[offset];
|
|
43150
|
+
const last = this[offset + 7];
|
|
43151
|
+
if (first === void 0 || last === void 0) {
|
|
43152
|
+
boundsError(offset, this.length - 8);
|
|
43153
|
+
}
|
|
43154
|
+
const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
|
|
43155
|
+
return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
|
|
43156
|
+
});
|
|
43157
|
+
Buffer2.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
|
|
43158
|
+
offset = offset >>> 0;
|
|
43159
|
+
validateNumber(offset, "offset");
|
|
43160
|
+
const first = this[offset];
|
|
43161
|
+
const last = this[offset + 7];
|
|
43162
|
+
if (first === void 0 || last === void 0) {
|
|
43163
|
+
boundsError(offset, this.length - 8);
|
|
43164
|
+
}
|
|
43165
|
+
const val = (first << 24) + // Overflow
|
|
43166
|
+
this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
43167
|
+
return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
|
|
43168
|
+
});
|
|
43169
|
+
Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
|
|
43170
|
+
offset = offset >>> 0;
|
|
43171
|
+
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
43172
|
+
return ieee754$1.read(this, offset, true, 23, 4);
|
|
43173
|
+
};
|
|
43174
|
+
Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
|
|
43175
|
+
offset = offset >>> 0;
|
|
43176
|
+
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
43177
|
+
return ieee754$1.read(this, offset, false, 23, 4);
|
|
43178
|
+
};
|
|
43179
|
+
Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
|
|
43180
|
+
offset = offset >>> 0;
|
|
43181
|
+
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
43182
|
+
return ieee754$1.read(this, offset, true, 52, 8);
|
|
43183
|
+
};
|
|
43184
|
+
Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
|
|
43185
|
+
offset = offset >>> 0;
|
|
43186
|
+
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
43187
|
+
return ieee754$1.read(this, offset, false, 52, 8);
|
|
43188
|
+
};
|
|
43189
|
+
function checkInt(buf, value, offset, ext, max, min) {
|
|
43190
|
+
if (!Buffer2.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
43191
|
+
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
|
|
43192
|
+
if (offset + ext > buf.length) throw new RangeError("Index out of range");
|
|
43193
|
+
}
|
|
43194
|
+
Buffer2.prototype.writeUintLE = Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength3, noAssert) {
|
|
43195
|
+
value = +value;
|
|
43196
|
+
offset = offset >>> 0;
|
|
43197
|
+
byteLength3 = byteLength3 >>> 0;
|
|
43198
|
+
if (!noAssert) {
|
|
43199
|
+
const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
|
|
43200
|
+
checkInt(this, value, offset, byteLength3, maxBytes, 0);
|
|
43201
|
+
}
|
|
43202
|
+
let mul = 1;
|
|
43203
|
+
let i = 0;
|
|
43204
|
+
this[offset] = value & 255;
|
|
43205
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
43206
|
+
this[offset + i] = value / mul & 255;
|
|
43207
|
+
}
|
|
43208
|
+
return offset + byteLength3;
|
|
43209
|
+
};
|
|
43210
|
+
Buffer2.prototype.writeUintBE = Buffer2.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength3, noAssert) {
|
|
43211
|
+
value = +value;
|
|
43212
|
+
offset = offset >>> 0;
|
|
43213
|
+
byteLength3 = byteLength3 >>> 0;
|
|
43214
|
+
if (!noAssert) {
|
|
43215
|
+
const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
|
|
43216
|
+
checkInt(this, value, offset, byteLength3, maxBytes, 0);
|
|
43217
|
+
}
|
|
43218
|
+
let i = byteLength3 - 1;
|
|
43219
|
+
let mul = 1;
|
|
43220
|
+
this[offset + i] = value & 255;
|
|
43221
|
+
while (--i >= 0 && (mul *= 256)) {
|
|
43222
|
+
this[offset + i] = value / mul & 255;
|
|
43223
|
+
}
|
|
43224
|
+
return offset + byteLength3;
|
|
43225
|
+
};
|
|
43226
|
+
Buffer2.prototype.writeUint8 = Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
|
|
43227
|
+
value = +value;
|
|
43228
|
+
offset = offset >>> 0;
|
|
43229
|
+
if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
|
|
43230
|
+
this[offset] = value & 255;
|
|
43231
|
+
return offset + 1;
|
|
43232
|
+
};
|
|
43233
|
+
Buffer2.prototype.writeUint16LE = Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
|
|
43234
|
+
value = +value;
|
|
43235
|
+
offset = offset >>> 0;
|
|
43236
|
+
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
43237
|
+
this[offset] = value & 255;
|
|
43238
|
+
this[offset + 1] = value >>> 8;
|
|
43239
|
+
return offset + 2;
|
|
43240
|
+
};
|
|
43241
|
+
Buffer2.prototype.writeUint16BE = Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
|
|
43242
|
+
value = +value;
|
|
43243
|
+
offset = offset >>> 0;
|
|
43244
|
+
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
43245
|
+
this[offset] = value >>> 8;
|
|
43246
|
+
this[offset + 1] = value & 255;
|
|
43247
|
+
return offset + 2;
|
|
43248
|
+
};
|
|
43249
|
+
Buffer2.prototype.writeUint32LE = Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
|
|
43250
|
+
value = +value;
|
|
43251
|
+
offset = offset >>> 0;
|
|
43252
|
+
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
43253
|
+
this[offset + 3] = value >>> 24;
|
|
43254
|
+
this[offset + 2] = value >>> 16;
|
|
43255
|
+
this[offset + 1] = value >>> 8;
|
|
43256
|
+
this[offset] = value & 255;
|
|
43257
|
+
return offset + 4;
|
|
43258
|
+
};
|
|
43259
|
+
Buffer2.prototype.writeUint32BE = Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
|
|
43260
|
+
value = +value;
|
|
43261
|
+
offset = offset >>> 0;
|
|
43262
|
+
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
43263
|
+
this[offset] = value >>> 24;
|
|
43264
|
+
this[offset + 1] = value >>> 16;
|
|
43265
|
+
this[offset + 2] = value >>> 8;
|
|
43266
|
+
this[offset + 3] = value & 255;
|
|
43267
|
+
return offset + 4;
|
|
43268
|
+
};
|
|
43269
|
+
function wrtBigUInt64LE(buf, value, offset, min, max) {
|
|
43270
|
+
checkIntBI(value, min, max, buf, offset, 7);
|
|
43271
|
+
let lo = Number(value & BigInt(4294967295));
|
|
43272
|
+
buf[offset++] = lo;
|
|
43273
|
+
lo = lo >> 8;
|
|
43274
|
+
buf[offset++] = lo;
|
|
43275
|
+
lo = lo >> 8;
|
|
43276
|
+
buf[offset++] = lo;
|
|
43277
|
+
lo = lo >> 8;
|
|
43278
|
+
buf[offset++] = lo;
|
|
43279
|
+
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
43280
|
+
buf[offset++] = hi;
|
|
43281
|
+
hi = hi >> 8;
|
|
43282
|
+
buf[offset++] = hi;
|
|
43283
|
+
hi = hi >> 8;
|
|
43284
|
+
buf[offset++] = hi;
|
|
43285
|
+
hi = hi >> 8;
|
|
43286
|
+
buf[offset++] = hi;
|
|
43287
|
+
return offset;
|
|
43288
|
+
}
|
|
43289
|
+
function wrtBigUInt64BE(buf, value, offset, min, max) {
|
|
43290
|
+
checkIntBI(value, min, max, buf, offset, 7);
|
|
43291
|
+
let lo = Number(value & BigInt(4294967295));
|
|
43292
|
+
buf[offset + 7] = lo;
|
|
43293
|
+
lo = lo >> 8;
|
|
43294
|
+
buf[offset + 6] = lo;
|
|
43295
|
+
lo = lo >> 8;
|
|
43296
|
+
buf[offset + 5] = lo;
|
|
43297
|
+
lo = lo >> 8;
|
|
43298
|
+
buf[offset + 4] = lo;
|
|
43299
|
+
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
43300
|
+
buf[offset + 3] = hi;
|
|
43301
|
+
hi = hi >> 8;
|
|
43302
|
+
buf[offset + 2] = hi;
|
|
43303
|
+
hi = hi >> 8;
|
|
43304
|
+
buf[offset + 1] = hi;
|
|
43305
|
+
hi = hi >> 8;
|
|
43306
|
+
buf[offset] = hi;
|
|
43307
|
+
return offset + 8;
|
|
43308
|
+
}
|
|
43309
|
+
Buffer2.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
|
|
43310
|
+
return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
43311
|
+
});
|
|
43312
|
+
Buffer2.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
|
|
43313
|
+
return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
43314
|
+
});
|
|
43315
|
+
Buffer2.prototype.writeIntLE = function writeIntLE(value, offset, byteLength3, noAssert) {
|
|
43316
|
+
value = +value;
|
|
43317
|
+
offset = offset >>> 0;
|
|
43318
|
+
if (!noAssert) {
|
|
43319
|
+
const limit = Math.pow(2, 8 * byteLength3 - 1);
|
|
43320
|
+
checkInt(this, value, offset, byteLength3, limit - 1, -limit);
|
|
43321
|
+
}
|
|
43322
|
+
let i = 0;
|
|
43323
|
+
let mul = 1;
|
|
43324
|
+
let sub = 0;
|
|
43325
|
+
this[offset] = value & 255;
|
|
43326
|
+
while (++i < byteLength3 && (mul *= 256)) {
|
|
43327
|
+
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
|
43328
|
+
sub = 1;
|
|
43329
|
+
}
|
|
43330
|
+
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
43331
|
+
}
|
|
43332
|
+
return offset + byteLength3;
|
|
43333
|
+
};
|
|
43334
|
+
Buffer2.prototype.writeIntBE = function writeIntBE(value, offset, byteLength3, noAssert) {
|
|
43335
|
+
value = +value;
|
|
43336
|
+
offset = offset >>> 0;
|
|
43337
|
+
if (!noAssert) {
|
|
43338
|
+
const limit = Math.pow(2, 8 * byteLength3 - 1);
|
|
43339
|
+
checkInt(this, value, offset, byteLength3, limit - 1, -limit);
|
|
43340
|
+
}
|
|
43341
|
+
let i = byteLength3 - 1;
|
|
43342
|
+
let mul = 1;
|
|
43343
|
+
let sub = 0;
|
|
43344
|
+
this[offset + i] = value & 255;
|
|
43345
|
+
while (--i >= 0 && (mul *= 256)) {
|
|
43346
|
+
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
|
43347
|
+
sub = 1;
|
|
43348
|
+
}
|
|
43349
|
+
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
43350
|
+
}
|
|
43351
|
+
return offset + byteLength3;
|
|
43352
|
+
};
|
|
43353
|
+
Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
|
|
43354
|
+
value = +value;
|
|
43355
|
+
offset = offset >>> 0;
|
|
43356
|
+
if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
|
|
43357
|
+
if (value < 0) value = 255 + value + 1;
|
|
43358
|
+
this[offset] = value & 255;
|
|
43359
|
+
return offset + 1;
|
|
43360
|
+
};
|
|
43361
|
+
Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
|
|
43362
|
+
value = +value;
|
|
43363
|
+
offset = offset >>> 0;
|
|
43364
|
+
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
43365
|
+
this[offset] = value & 255;
|
|
43366
|
+
this[offset + 1] = value >>> 8;
|
|
43367
|
+
return offset + 2;
|
|
43368
|
+
};
|
|
43369
|
+
Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
|
|
43370
|
+
value = +value;
|
|
43371
|
+
offset = offset >>> 0;
|
|
43372
|
+
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
43373
|
+
this[offset] = value >>> 8;
|
|
43374
|
+
this[offset + 1] = value & 255;
|
|
43375
|
+
return offset + 2;
|
|
43376
|
+
};
|
|
43377
|
+
Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
|
|
43378
|
+
value = +value;
|
|
43379
|
+
offset = offset >>> 0;
|
|
43380
|
+
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
43381
|
+
this[offset] = value & 255;
|
|
43382
|
+
this[offset + 1] = value >>> 8;
|
|
43383
|
+
this[offset + 2] = value >>> 16;
|
|
43384
|
+
this[offset + 3] = value >>> 24;
|
|
43385
|
+
return offset + 4;
|
|
43386
|
+
};
|
|
43387
|
+
Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
|
|
43388
|
+
value = +value;
|
|
43389
|
+
offset = offset >>> 0;
|
|
43390
|
+
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
43391
|
+
if (value < 0) value = 4294967295 + value + 1;
|
|
43392
|
+
this[offset] = value >>> 24;
|
|
43393
|
+
this[offset + 1] = value >>> 16;
|
|
43394
|
+
this[offset + 2] = value >>> 8;
|
|
43395
|
+
this[offset + 3] = value & 255;
|
|
43396
|
+
return offset + 4;
|
|
43397
|
+
};
|
|
43398
|
+
Buffer2.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
|
|
43399
|
+
return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
43400
|
+
});
|
|
43401
|
+
Buffer2.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
|
|
43402
|
+
return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
43403
|
+
});
|
|
43404
|
+
function checkIEEE754(buf, value, offset, ext, max, min) {
|
|
43405
|
+
if (offset + ext > buf.length) throw new RangeError("Index out of range");
|
|
43406
|
+
if (offset < 0) throw new RangeError("Index out of range");
|
|
43407
|
+
}
|
|
43408
|
+
function writeFloat(buf, value, offset, littleEndian, noAssert) {
|
|
43409
|
+
value = +value;
|
|
43410
|
+
offset = offset >>> 0;
|
|
43411
|
+
if (!noAssert) {
|
|
43412
|
+
checkIEEE754(buf, value, offset, 4);
|
|
43413
|
+
}
|
|
43414
|
+
ieee754$1.write(buf, value, offset, littleEndian, 23, 4);
|
|
43415
|
+
return offset + 4;
|
|
43416
|
+
}
|
|
43417
|
+
Buffer2.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
|
|
43418
|
+
return writeFloat(this, value, offset, true, noAssert);
|
|
43419
|
+
};
|
|
43420
|
+
Buffer2.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
|
|
43421
|
+
return writeFloat(this, value, offset, false, noAssert);
|
|
43422
|
+
};
|
|
43423
|
+
function writeDouble(buf, value, offset, littleEndian, noAssert) {
|
|
43424
|
+
value = +value;
|
|
43425
|
+
offset = offset >>> 0;
|
|
43426
|
+
if (!noAssert) {
|
|
43427
|
+
checkIEEE754(buf, value, offset, 8);
|
|
43428
|
+
}
|
|
43429
|
+
ieee754$1.write(buf, value, offset, littleEndian, 52, 8);
|
|
43430
|
+
return offset + 8;
|
|
43431
|
+
}
|
|
43432
|
+
Buffer2.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
|
|
43433
|
+
return writeDouble(this, value, offset, true, noAssert);
|
|
43434
|
+
};
|
|
43435
|
+
Buffer2.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
|
|
43436
|
+
return writeDouble(this, value, offset, false, noAssert);
|
|
43437
|
+
};
|
|
43438
|
+
Buffer2.prototype.copy = function copy2(target, targetStart, start, end) {
|
|
43439
|
+
if (!Buffer2.isBuffer(target)) throw new TypeError("argument should be a Buffer");
|
|
43440
|
+
if (!start) start = 0;
|
|
43441
|
+
if (!end && end !== 0) end = this.length;
|
|
43442
|
+
if (targetStart >= target.length) targetStart = target.length;
|
|
43443
|
+
if (!targetStart) targetStart = 0;
|
|
43444
|
+
if (end > 0 && end < start) end = start;
|
|
43445
|
+
if (end === start) return 0;
|
|
43446
|
+
if (target.length === 0 || this.length === 0) return 0;
|
|
43447
|
+
if (targetStart < 0) {
|
|
43448
|
+
throw new RangeError("targetStart out of bounds");
|
|
43449
|
+
}
|
|
43450
|
+
if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
|
|
43451
|
+
if (end < 0) throw new RangeError("sourceEnd out of bounds");
|
|
43452
|
+
if (end > this.length) end = this.length;
|
|
43453
|
+
if (target.length - targetStart < end - start) {
|
|
43454
|
+
end = target.length - targetStart + start;
|
|
43455
|
+
}
|
|
43456
|
+
const len = end - start;
|
|
43457
|
+
if (this === target && typeof GlobalUint8Array.prototype.copyWithin === "function") {
|
|
43458
|
+
this.copyWithin(targetStart, start, end);
|
|
43459
|
+
} else {
|
|
43460
|
+
GlobalUint8Array.prototype.set.call(
|
|
43461
|
+
target,
|
|
43462
|
+
this.subarray(start, end),
|
|
43463
|
+
targetStart
|
|
43464
|
+
);
|
|
43465
|
+
}
|
|
43466
|
+
return len;
|
|
43467
|
+
};
|
|
43468
|
+
Buffer2.prototype.fill = function fill(val, start, end, encoding) {
|
|
43469
|
+
if (typeof val === "string") {
|
|
43470
|
+
if (typeof start === "string") {
|
|
43471
|
+
encoding = start;
|
|
43472
|
+
start = 0;
|
|
43473
|
+
end = this.length;
|
|
43474
|
+
} else if (typeof end === "string") {
|
|
43475
|
+
encoding = end;
|
|
43476
|
+
end = this.length;
|
|
43477
|
+
}
|
|
43478
|
+
if (encoding !== void 0 && typeof encoding !== "string") {
|
|
43479
|
+
throw new TypeError("encoding must be a string");
|
|
43480
|
+
}
|
|
43481
|
+
if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) {
|
|
43482
|
+
throw new TypeError("Unknown encoding: " + encoding);
|
|
43483
|
+
}
|
|
43484
|
+
if (val.length === 1) {
|
|
43485
|
+
const code2 = val.charCodeAt(0);
|
|
43486
|
+
if (encoding === "utf8" && code2 < 128 || encoding === "latin1") {
|
|
43487
|
+
val = code2;
|
|
43488
|
+
}
|
|
43489
|
+
}
|
|
43490
|
+
} else if (typeof val === "number") {
|
|
43491
|
+
val = val & 255;
|
|
43492
|
+
} else if (typeof val === "boolean") {
|
|
43493
|
+
val = Number(val);
|
|
43494
|
+
}
|
|
43495
|
+
if (start < 0 || this.length < start || this.length < end) {
|
|
43496
|
+
throw new RangeError("Out of range index");
|
|
43497
|
+
}
|
|
43498
|
+
if (end <= start) {
|
|
43499
|
+
return this;
|
|
43500
|
+
}
|
|
43501
|
+
start = start >>> 0;
|
|
43502
|
+
end = end === void 0 ? this.length : end >>> 0;
|
|
43503
|
+
if (!val) val = 0;
|
|
43504
|
+
let i;
|
|
43505
|
+
if (typeof val === "number") {
|
|
43506
|
+
for (i = start; i < end; ++i) {
|
|
43507
|
+
this[i] = val;
|
|
43508
|
+
}
|
|
43509
|
+
} else {
|
|
43510
|
+
const bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding);
|
|
43511
|
+
const len = bytes.length;
|
|
43512
|
+
if (len === 0) {
|
|
43513
|
+
throw new TypeError('The value "' + val + '" is invalid for argument "value"');
|
|
43514
|
+
}
|
|
43515
|
+
for (i = 0; i < end - start; ++i) {
|
|
43516
|
+
this[i + start] = bytes[i % len];
|
|
43517
|
+
}
|
|
43518
|
+
}
|
|
43519
|
+
return this;
|
|
43520
|
+
};
|
|
43521
|
+
const errors = {};
|
|
43522
|
+
function E2(sym, getMessage, Base) {
|
|
43523
|
+
errors[sym] = class NodeError extends Base {
|
|
43524
|
+
constructor() {
|
|
43525
|
+
super();
|
|
43526
|
+
Object.defineProperty(this, "message", {
|
|
43527
|
+
value: getMessage.apply(this, arguments),
|
|
43528
|
+
writable: true,
|
|
43529
|
+
configurable: true
|
|
43530
|
+
});
|
|
43531
|
+
this.name = `${this.name} [${sym}]`;
|
|
43532
|
+
this.stack;
|
|
43533
|
+
delete this.name;
|
|
43534
|
+
}
|
|
43535
|
+
get code() {
|
|
43536
|
+
return sym;
|
|
43537
|
+
}
|
|
43538
|
+
set code(value) {
|
|
43539
|
+
Object.defineProperty(this, "code", {
|
|
43540
|
+
configurable: true,
|
|
43541
|
+
enumerable: true,
|
|
43542
|
+
value,
|
|
43543
|
+
writable: true
|
|
43544
|
+
});
|
|
43545
|
+
}
|
|
43546
|
+
toString() {
|
|
43547
|
+
return `${this.name} [${sym}]: ${this.message}`;
|
|
43548
|
+
}
|
|
43549
|
+
};
|
|
43550
|
+
}
|
|
43551
|
+
E2(
|
|
43552
|
+
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
43553
|
+
function(name) {
|
|
43554
|
+
if (name) {
|
|
43555
|
+
return `${name} is outside of buffer bounds`;
|
|
43556
|
+
}
|
|
43557
|
+
return "Attempt to access memory outside buffer bounds";
|
|
43558
|
+
},
|
|
43559
|
+
RangeError
|
|
43560
|
+
);
|
|
43561
|
+
E2(
|
|
43562
|
+
"ERR_INVALID_ARG_TYPE",
|
|
43563
|
+
function(name, actual) {
|
|
43564
|
+
return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
|
|
43565
|
+
},
|
|
43566
|
+
TypeError
|
|
43567
|
+
);
|
|
43568
|
+
E2(
|
|
43569
|
+
"ERR_OUT_OF_RANGE",
|
|
43570
|
+
function(str, range, input) {
|
|
43571
|
+
let msg = `The value of "${str}" is out of range.`;
|
|
43572
|
+
let received = input;
|
|
43573
|
+
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
43574
|
+
received = addNumericalSeparator(String(input));
|
|
43575
|
+
} else if (typeof input === "bigint") {
|
|
43576
|
+
received = String(input);
|
|
43577
|
+
if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
|
|
43578
|
+
received = addNumericalSeparator(received);
|
|
43579
|
+
}
|
|
43580
|
+
received += "n";
|
|
43581
|
+
}
|
|
43582
|
+
msg += ` It must be ${range}. Received ${received}`;
|
|
43583
|
+
return msg;
|
|
43584
|
+
},
|
|
43585
|
+
RangeError
|
|
43586
|
+
);
|
|
43587
|
+
function addNumericalSeparator(val) {
|
|
43588
|
+
let res = "";
|
|
43589
|
+
let i = val.length;
|
|
43590
|
+
const start = val[0] === "-" ? 1 : 0;
|
|
43591
|
+
for (; i >= start + 4; i -= 3) {
|
|
43592
|
+
res = `_${val.slice(i - 3, i)}${res}`;
|
|
43593
|
+
}
|
|
43594
|
+
return `${val.slice(0, i)}${res}`;
|
|
43595
|
+
}
|
|
43596
|
+
function checkBounds(buf, offset, byteLength3) {
|
|
43597
|
+
validateNumber(offset, "offset");
|
|
43598
|
+
if (buf[offset] === void 0 || buf[offset + byteLength3] === void 0) {
|
|
43599
|
+
boundsError(offset, buf.length - (byteLength3 + 1));
|
|
43600
|
+
}
|
|
43601
|
+
}
|
|
43602
|
+
function checkIntBI(value, min, max, buf, offset, byteLength3) {
|
|
43603
|
+
if (value > max || value < min) {
|
|
43604
|
+
const n = typeof min === "bigint" ? "n" : "";
|
|
43605
|
+
let range;
|
|
43606
|
+
{
|
|
43607
|
+
if (min === 0 || min === BigInt(0)) {
|
|
43608
|
+
range = `>= 0${n} and < 2${n} ** ${(byteLength3 + 1) * 8}${n}`;
|
|
43609
|
+
} else {
|
|
43610
|
+
range = `>= -(2${n} ** ${(byteLength3 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength3 + 1) * 8 - 1}${n}`;
|
|
43611
|
+
}
|
|
43612
|
+
}
|
|
43613
|
+
throw new errors.ERR_OUT_OF_RANGE("value", range, value);
|
|
43614
|
+
}
|
|
43615
|
+
checkBounds(buf, offset, byteLength3);
|
|
43616
|
+
}
|
|
43617
|
+
function validateNumber(value, name) {
|
|
43618
|
+
if (typeof value !== "number") {
|
|
43619
|
+
throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
|
|
43620
|
+
}
|
|
43621
|
+
}
|
|
43622
|
+
function boundsError(value, length2, type) {
|
|
43623
|
+
if (Math.floor(value) !== value) {
|
|
43624
|
+
validateNumber(value, type);
|
|
43625
|
+
throw new errors.ERR_OUT_OF_RANGE("offset", "an integer", value);
|
|
43626
|
+
}
|
|
43627
|
+
if (length2 < 0) {
|
|
43628
|
+
throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
|
|
43629
|
+
}
|
|
43630
|
+
throw new errors.ERR_OUT_OF_RANGE(
|
|
43631
|
+
"offset",
|
|
43632
|
+
`>= ${0} and <= ${length2}`,
|
|
43633
|
+
value
|
|
43634
|
+
);
|
|
43635
|
+
}
|
|
43636
|
+
const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
|
|
43637
|
+
function base64clean(str) {
|
|
43638
|
+
str = str.split("=")[0];
|
|
43639
|
+
str = str.trim().replace(INVALID_BASE64_RE, "");
|
|
43640
|
+
if (str.length < 2) return "";
|
|
43641
|
+
while (str.length % 4 !== 0) {
|
|
43642
|
+
str = str + "=";
|
|
43643
|
+
}
|
|
43644
|
+
return str;
|
|
43645
|
+
}
|
|
43646
|
+
function utf8ToBytes2(string, units) {
|
|
43647
|
+
units = units || Infinity;
|
|
43648
|
+
let codePoint;
|
|
43649
|
+
const length2 = string.length;
|
|
43650
|
+
let leadSurrogate = null;
|
|
43651
|
+
const bytes = [];
|
|
43652
|
+
for (let i = 0; i < length2; ++i) {
|
|
43653
|
+
codePoint = string.charCodeAt(i);
|
|
43654
|
+
if (codePoint > 55295 && codePoint < 57344) {
|
|
43655
|
+
if (!leadSurrogate) {
|
|
43656
|
+
if (codePoint > 56319) {
|
|
43657
|
+
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
43658
|
+
continue;
|
|
43659
|
+
} else if (i + 1 === length2) {
|
|
43660
|
+
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
43661
|
+
continue;
|
|
43662
|
+
}
|
|
43663
|
+
leadSurrogate = codePoint;
|
|
43664
|
+
continue;
|
|
43665
|
+
}
|
|
43666
|
+
if (codePoint < 56320) {
|
|
43667
|
+
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
43668
|
+
leadSurrogate = codePoint;
|
|
43669
|
+
continue;
|
|
43670
|
+
}
|
|
43671
|
+
codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
|
|
43672
|
+
} else if (leadSurrogate) {
|
|
43673
|
+
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
43674
|
+
}
|
|
43675
|
+
leadSurrogate = null;
|
|
43676
|
+
if (codePoint < 128) {
|
|
43677
|
+
if ((units -= 1) < 0) break;
|
|
43678
|
+
bytes.push(codePoint);
|
|
43679
|
+
} else if (codePoint < 2048) {
|
|
43680
|
+
if ((units -= 2) < 0) break;
|
|
43681
|
+
bytes.push(
|
|
43682
|
+
codePoint >> 6 | 192,
|
|
43683
|
+
codePoint & 63 | 128
|
|
43684
|
+
);
|
|
43685
|
+
} else if (codePoint < 65536) {
|
|
43686
|
+
if ((units -= 3) < 0) break;
|
|
43687
|
+
bytes.push(
|
|
43688
|
+
codePoint >> 12 | 224,
|
|
43689
|
+
codePoint >> 6 & 63 | 128,
|
|
43690
|
+
codePoint & 63 | 128
|
|
43691
|
+
);
|
|
43692
|
+
} else if (codePoint < 1114112) {
|
|
43693
|
+
if ((units -= 4) < 0) break;
|
|
43694
|
+
bytes.push(
|
|
43695
|
+
codePoint >> 18 | 240,
|
|
43696
|
+
codePoint >> 12 & 63 | 128,
|
|
43697
|
+
codePoint >> 6 & 63 | 128,
|
|
43698
|
+
codePoint & 63 | 128
|
|
43699
|
+
);
|
|
43700
|
+
} else {
|
|
43701
|
+
throw new Error("Invalid code point");
|
|
43702
|
+
}
|
|
43703
|
+
}
|
|
43704
|
+
return bytes;
|
|
43705
|
+
}
|
|
43706
|
+
function asciiToBytes(str) {
|
|
43707
|
+
const byteArray = [];
|
|
43708
|
+
for (let i = 0; i < str.length; ++i) {
|
|
43709
|
+
byteArray.push(str.charCodeAt(i) & 255);
|
|
43710
|
+
}
|
|
43711
|
+
return byteArray;
|
|
43712
|
+
}
|
|
43713
|
+
function utf16leToBytes(str, units) {
|
|
43714
|
+
let c, hi, lo;
|
|
43715
|
+
const byteArray = [];
|
|
43716
|
+
for (let i = 0; i < str.length; ++i) {
|
|
43717
|
+
if ((units -= 2) < 0) break;
|
|
43718
|
+
c = str.charCodeAt(i);
|
|
43719
|
+
hi = c >> 8;
|
|
43720
|
+
lo = c % 256;
|
|
43721
|
+
byteArray.push(lo);
|
|
43722
|
+
byteArray.push(hi);
|
|
43723
|
+
}
|
|
43724
|
+
return byteArray;
|
|
43725
|
+
}
|
|
43726
|
+
function base64ToBytes(str) {
|
|
43727
|
+
return base64.toByteArray(base64clean(str));
|
|
43728
|
+
}
|
|
43729
|
+
function blitBuffer(src, dst, offset, length2) {
|
|
43730
|
+
let i;
|
|
43731
|
+
for (i = 0; i < length2; ++i) {
|
|
43732
|
+
if (i + offset >= dst.length || i >= src.length) break;
|
|
43733
|
+
dst[i + offset] = src[i];
|
|
43734
|
+
}
|
|
43735
|
+
return i;
|
|
43736
|
+
}
|
|
43737
|
+
function isInstance(obj, type) {
|
|
43738
|
+
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
43739
|
+
}
|
|
43740
|
+
function numberIsNaN(obj) {
|
|
43741
|
+
return obj !== obj;
|
|
43742
|
+
}
|
|
43743
|
+
const hexSliceLookupTable = function() {
|
|
43744
|
+
const alphabet = "0123456789abcdef";
|
|
43745
|
+
const table = new Array(256);
|
|
43746
|
+
for (let i = 0; i < 16; ++i) {
|
|
43747
|
+
const i16 = i * 16;
|
|
43748
|
+
for (let j2 = 0; j2 < 16; ++j2) {
|
|
43749
|
+
table[i16 + j2] = alphabet[i] + alphabet[j2];
|
|
43750
|
+
}
|
|
43751
|
+
}
|
|
43752
|
+
return table;
|
|
43753
|
+
}();
|
|
43754
|
+
function defineBigIntMethod(fn) {
|
|
43755
|
+
return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
|
|
43756
|
+
}
|
|
43757
|
+
function BufferBigIntNotDefined() {
|
|
43758
|
+
throw new Error("BigInt not supported");
|
|
43759
|
+
}
|
|
43760
|
+
})(buffer);
|
|
43761
|
+
const Buffer = buffer.Buffer;
|
|
41980
43762
|
function defineChain(chain) {
|
|
41981
43763
|
return {
|
|
41982
43764
|
formatters: void 0,
|
|
@@ -43014,7 +44796,7 @@ class HashMD extends Hash {
|
|
|
43014
44796
|
aexists(this);
|
|
43015
44797
|
data = toBytes(data);
|
|
43016
44798
|
abytes(data);
|
|
43017
|
-
const { view, buffer, blockLen } = this;
|
|
44799
|
+
const { view, buffer: buffer2, blockLen } = this;
|
|
43018
44800
|
const len = data.length;
|
|
43019
44801
|
for (let pos = 0; pos < len; ) {
|
|
43020
44802
|
const take = Math.min(blockLen - this.pos, len - pos);
|
|
@@ -43024,7 +44806,7 @@ class HashMD extends Hash {
|
|
|
43024
44806
|
this.process(dataView, pos);
|
|
43025
44807
|
continue;
|
|
43026
44808
|
}
|
|
43027
|
-
|
|
44809
|
+
buffer2.set(data.subarray(pos, pos + take), this.pos);
|
|
43028
44810
|
this.pos += take;
|
|
43029
44811
|
pos += take;
|
|
43030
44812
|
if (this.pos === blockLen) {
|
|
@@ -43040,16 +44822,16 @@ class HashMD extends Hash {
|
|
|
43040
44822
|
aexists(this);
|
|
43041
44823
|
aoutput(out, this);
|
|
43042
44824
|
this.finished = true;
|
|
43043
|
-
const { buffer, view, blockLen, isLE: isLE2 } = this;
|
|
44825
|
+
const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;
|
|
43044
44826
|
let { pos } = this;
|
|
43045
|
-
|
|
44827
|
+
buffer2[pos++] = 128;
|
|
43046
44828
|
clean(this.buffer.subarray(pos));
|
|
43047
44829
|
if (this.padOffset > blockLen - pos) {
|
|
43048
44830
|
this.process(view, 0);
|
|
43049
44831
|
pos = 0;
|
|
43050
44832
|
}
|
|
43051
44833
|
for (let i = pos; i < blockLen; i++)
|
|
43052
|
-
|
|
44834
|
+
buffer2[i] = 0;
|
|
43053
44835
|
setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);
|
|
43054
44836
|
this.process(view, 0);
|
|
43055
44837
|
const oview = createView(out);
|
|
@@ -43064,22 +44846,22 @@ class HashMD extends Hash {
|
|
|
43064
44846
|
oview.setUint32(4 * i, state[i], isLE2);
|
|
43065
44847
|
}
|
|
43066
44848
|
digest() {
|
|
43067
|
-
const { buffer, outputLen } = this;
|
|
43068
|
-
this.digestInto(
|
|
43069
|
-
const res =
|
|
44849
|
+
const { buffer: buffer2, outputLen } = this;
|
|
44850
|
+
this.digestInto(buffer2);
|
|
44851
|
+
const res = buffer2.slice(0, outputLen);
|
|
43070
44852
|
this.destroy();
|
|
43071
44853
|
return res;
|
|
43072
44854
|
}
|
|
43073
44855
|
_cloneInto(to2) {
|
|
43074
44856
|
to2 || (to2 = new this.constructor());
|
|
43075
44857
|
to2.set(...this.get());
|
|
43076
|
-
const { blockLen, buffer, length: length2, finished, destroyed, pos } = this;
|
|
44858
|
+
const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;
|
|
43077
44859
|
to2.destroyed = destroyed;
|
|
43078
44860
|
to2.finished = finished;
|
|
43079
44861
|
to2.length = length2;
|
|
43080
44862
|
to2.pos = pos;
|
|
43081
44863
|
if (length2 % blockLen)
|
|
43082
|
-
to2.buffer.set(
|
|
44864
|
+
to2.buffer.set(buffer2);
|
|
43083
44865
|
return to2;
|
|
43084
44866
|
}
|
|
43085
44867
|
clone() {
|
|
@@ -45981,7 +47763,7 @@ function walletConnect(parameters) {
|
|
|
45981
47763
|
const optionalChains = config2.chains.map((x2) => x2.id);
|
|
45982
47764
|
if (!optionalChains.length)
|
|
45983
47765
|
return;
|
|
45984
|
-
const { EthereumProvider } = await import("./index.es-
|
|
47766
|
+
const { EthereumProvider } = await import("./index.es-CyMUlQCP.js").then((n) => n.i);
|
|
45985
47767
|
return await EthereumProvider.init({
|
|
45986
47768
|
...parameters,
|
|
45987
47769
|
disableProviderPing: true,
|
|
@@ -46281,6 +48063,16 @@ const config = createConfig({
|
|
|
46281
48063
|
]
|
|
46282
48064
|
});
|
|
46283
48065
|
const walletConnectLogo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAAABOo35HAAADAFBMVEVHcEwge/wfffwKcv4TeP0MdP4ngvwog/wcfP0Xe/0hgP0Vev0hgP0ff/wbfv8cffwbffwbfPwaff4QeP4Jc/4sg/oshfsng/wafPwggv8ihf8dffwYgf8hfPgffvsogfslgv0ffvwefvwafP0Ze/0Xe/4QeP4JdP4wiPskgfsliP8igPwhf/wgf/wff/wXe/0VfP8Wefw0ifsXev0Wev0Tfv8Hc/4nhv8kgfwjgPwVef0Tef8IdP4Hcv4vh/sTef0Gc/4Fcf4phf0rif8ng/0lgfsmgvsTeP0ngvsSeP0phf4og/sRd/0Pev8Pd/8Off8vjf8pg/sQd/0qhPsDcf4rhPsPdv4shfsyjf8thfsNdv4uhvs3i/sNdf4Ecf5Aj/k0i/0vh/wvhvoMdv8GdP40ivwyif0wh/oJev8zi/02j/8Ldf5Ik/kxh/oyiPoEcf5CkPgLdP4Kdf8ziPo5kf80ifoJdP41ifo3jP02ivoIdP8Ic/4IeP1Ik/g5jf03ivoHd/89lP84i/pCj/k5i/o5i/k6jPk7jfoGc/88jvw7jPkGcv4/kPw9kf88jflAkvtGkvpAk/89jfkBcP9Dlv8+jfk+jvkCdv9Dkfk/jvkEcv4DeP9Aj/kFcf9Bj/lJmP9Cj/lPlvhEkvxCkPkDcf9DkPlKk/dDkPhEkfhIlfxFkfhBj/hGkvhGkfhQnP9HkvgBc/9PlvdIk/gCcP9Jk/hOmf1Kk/hNlfdKlPhNlfhRl/dLlPggfvsdffspgvpVnPxgpP12sP2Ct/0ae/tanfqbxf2z0/7I3/7Z6f/k8P/x9//2+v/////U5/98s/wrhPqsz/7P4/78/f9Mlfi61/5bof6Uwf1OlfhtqvxQlveMvf1Ql/dOlfff7f9Wn/9OlvcthPlPlvcwhvlop/tQl/eiyf0AcP80iPlSmPdWmvZRl/cNdP3r9P82iflVm/nB2/5TmPdWmfdVmfdUmPdXmvdWmfdWmvhYmfZZm/Y+jfg8jPhZnPUDb/1bnPZbm/VcnfcUYgSRAAAA/3RSTlMACh8sRU5rhJSqw9XR7f//////7YASLOD4/////wQYObf//////7VfYf///////////53///+b///////AjKj/4Wvt///////////////////////V/////////7n/to33////+Nn////p//8o//+nSv///////////////4D//////7X///////////////ju///u/////9///////////2j/////W//////V//////+Z///////R//+o/////////////////////////////////////+b/t//v/////////////////9D/////////6f/////b9v///77///H5MkSAAAAo7klEQVR4AeTWBW4rMRSF4SbDWAgzM3PKzIz7X8o798HIr5Y1YnWSfwmfjq+88QMKhSVZUTXdMC3bcTfR1tY22olYlmnoUVWRpXBoY82LxWVVM+yEk0yl0+kUct3MJqPlum6WcpOOZRtRVY7H1pAply+oetF20lQKlUqlMpXJMFqoUqlWq7XaDqGhiFXXG4V8bn2k4k2t6LTS7XY61en2qH6fsMRag9/VarUhwIajSD3aiK/BouLNMfZETqkO6nah9YdLqFX1tCaTyXQ6HQ6Hs+wwYs0b0govLC/rptNuL9LLXapDdRE7Ln8ttLe3tz+czbKRg0M5v4pSYfUosVi000vKRwvxL5HVIq7j42OADU+M0/CKXSm1eNY+X1wsLy8vWx4WtNiXyN8tHou0PCxqf5idReqn0spsqlk8O4fUFbpErZb/tlgtJJoWur7e35/Bq7EC+wopRyR1g2CFWC2Gy1cLibSub2+H8JoroWA/P82+O1/c34OK1/J7ieKzxWGhh8fZoxUN7HPMyTSqu/vf/a8FLk+L25a/1hTxWg9Pz7OIIQfxOxFTzfOX81fkaS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NhYpPEH8HKSvN6a4SlGqjlJV1Tian6tUEtS96RX2FRwO8y0CxDhqqVBlZ+1j1bcXrPfwM8g0iKyL3A0Vqp2bJI0klv32yG/B6t2ClrRVuEL8I9XI/eKtItbMitjyeWPnWZrO5+1K1Cn2FvYoqrADUn3LrAUmCGArAcOxk0Uy70Cytzfsfam3MlEf/Eb7gvb07eY/AGlYRoew0nWbzrH4v7r+WhucbVQRXglRgbSvj4cDYbJoy7z/e4GyrX/dqb2/vuNgL9EmPS7DuPYHxxo4vYr93hhlWbdvuFUWxdxR0169Qm1FZ1Uw0T3fsJe/9TKu23XXFS4HuBKurEmxeUUwYlyaxqX8l8859tdp17hXJpVYbec0IjsCGBxEmlHEhldbWfbEKtFZShIwSjJZh4XwEFR7YAWTU9FMAAAAASUVORK5CYII=";
|
|
48066
|
+
const getBase64ExplorerData = (historyItem) => {
|
|
48067
|
+
const jsonString = JSON.stringify({
|
|
48068
|
+
route: historyItem == null ? void 0 : historyItem.route,
|
|
48069
|
+
userAddresses: historyItem == null ? void 0 : historyItem.userAddresses,
|
|
48070
|
+
transactionDetails: historyItem == null ? void 0 : historyItem.transactionDetails,
|
|
48071
|
+
status: historyItem == null ? void 0 : historyItem.status
|
|
48072
|
+
});
|
|
48073
|
+
const base64Encoded = Buffer.from(jsonString).toString("base64");
|
|
48074
|
+
return base64Encoded;
|
|
48075
|
+
};
|
|
46284
48076
|
const createExplorerLink = ({
|
|
46285
48077
|
chainId,
|
|
46286
48078
|
txHash,
|
|
@@ -46308,13 +48100,16 @@ const createExplorerLink = ({
|
|
|
46308
48100
|
return void 0;
|
|
46309
48101
|
}
|
|
46310
48102
|
};
|
|
46311
|
-
const createSkipExplorerLink = (transactionDetails) => {
|
|
48103
|
+
const createSkipExplorerLink = (transactionDetails, base64ExplorerData) => {
|
|
46312
48104
|
var _a, _b;
|
|
46313
48105
|
if (!transactionDetails) return "";
|
|
46314
48106
|
const { get } = jotaiStore;
|
|
46315
48107
|
const txHashCommaSeperatedList = (_a = transactionDetails == null ? void 0 : transactionDetails.map((txDetails) => txDetails.txHash)) == null ? void 0 : _a.join(",");
|
|
46316
48108
|
const isTestnet = get(onlyTestnetsAtom);
|
|
46317
48109
|
const initialTxChainId = (_b = transactionDetails == null ? void 0 : transactionDetails[0]) == null ? void 0 : _b.chainId;
|
|
48110
|
+
if (base64ExplorerData) {
|
|
48111
|
+
return `https://explorer.skip.build/?data=${base64ExplorerData}`;
|
|
48112
|
+
}
|
|
46318
48113
|
return `https://explorer.skip.build/?tx_hash=${txHashCommaSeperatedList}&chain_id=${initialTxChainId}${isTestnet ? "&is_testnet=true" : ""}`;
|
|
46319
48114
|
};
|
|
46320
48115
|
const skipAllBalancesRequestAtom = atom$1(void 0);
|
|
@@ -47261,7 +49056,15 @@ const Container$2 = dt.div`
|
|
|
47261
49056
|
}};
|
|
47262
49057
|
background: ${({ theme, backgroundColor }) => backgroundColor ?? theme.primary.background.normal};
|
|
47263
49058
|
`;
|
|
47264
|
-
const Modal = ({
|
|
49059
|
+
const Modal = ({
|
|
49060
|
+
children,
|
|
49061
|
+
drawer,
|
|
49062
|
+
container,
|
|
49063
|
+
onOpenChange,
|
|
49064
|
+
theme,
|
|
49065
|
+
blurBackground,
|
|
49066
|
+
disableCloseOnClickOutside
|
|
49067
|
+
}) => {
|
|
47265
49068
|
const [prevOverflowStyle, setPrevOverflowStyle] = useState("");
|
|
47266
49069
|
const modalRef = useRef(null);
|
|
47267
49070
|
const modal = useModal();
|
|
@@ -47281,6 +49084,7 @@ const Modal = ({ children, drawer, container, onOpenChange, theme }) => {
|
|
|
47281
49084
|
}
|
|
47282
49085
|
};
|
|
47283
49086
|
const handleClickOutside = (event) => {
|
|
49087
|
+
if (disableCloseOnClickOutside) return;
|
|
47284
49088
|
if (modalRef.current !== event.target && modal.visible) {
|
|
47285
49089
|
modal.hide();
|
|
47286
49090
|
}
|
|
@@ -47303,7 +49107,7 @@ const Modal = ({ children, drawer, container, onOpenChange, theme }) => {
|
|
|
47303
49107
|
onOpenChange == null ? void 0 : onOpenChange(false);
|
|
47304
49108
|
document.documentElement.style.overflow = prevOverflowStyle2;
|
|
47305
49109
|
};
|
|
47306
|
-
}, [drawer, modal, onOpenChange, prevOverflowStyle]);
|
|
49110
|
+
}, [disableCloseOnClickOutside, drawer, modal, onOpenChange, prevOverflowStyle]);
|
|
47307
49111
|
if (disableShadowDom && wasVisible === void 0) return null;
|
|
47308
49112
|
return createPortal(
|
|
47309
49113
|
/* @__PURE__ */ jsx(ShadowDomAndProviders, { theme, children: /* @__PURE__ */ jsx(
|
|
@@ -47312,6 +49116,7 @@ const Modal = ({ children, drawer, container, onOpenChange, theme }) => {
|
|
|
47312
49116
|
drawer,
|
|
47313
49117
|
open: modal.visible,
|
|
47314
49118
|
"data-root-id": rootId,
|
|
49119
|
+
blurBackground,
|
|
47315
49120
|
onAnimationEnd: () => {
|
|
47316
49121
|
if (!modal.visible) {
|
|
47317
49122
|
if (modalRef.current) {
|
|
@@ -47411,6 +49216,9 @@ const fadeOutAndZoomIn = mt`
|
|
|
47411
49216
|
`;
|
|
47412
49217
|
const StyledOverlay = dt.div`
|
|
47413
49218
|
background: rgba(0 0 0 / 0.5);
|
|
49219
|
+
${({ blurBackground }) => blurBackground && lt`
|
|
49220
|
+
backdrop-filter: blur(4px);
|
|
49221
|
+
`}
|
|
47414
49222
|
position: fixed;
|
|
47415
49223
|
top: 0;
|
|
47416
49224
|
left: 0;
|
|
@@ -47549,15 +49357,14 @@ const StyledModalRowItemContainer = dt(Row)`
|
|
|
47549
49357
|
` : "";
|
|
47550
49358
|
}}
|
|
47551
49359
|
`;
|
|
47552
|
-
const
|
|
47553
|
-
const useIsMobileScreenSize = () => {
|
|
49360
|
+
const useIsMobileScreenSize = (size2 = 767) => {
|
|
47554
49361
|
const [isMobileScreenSize, setIsMobileScreenSize] = useState(
|
|
47555
|
-
typeof window !== "undefined" && window.innerWidth <=
|
|
49362
|
+
typeof window !== "undefined" && window.innerWidth <= size2
|
|
47556
49363
|
);
|
|
47557
49364
|
useEffect(() => {
|
|
47558
49365
|
if (typeof window === "undefined") return;
|
|
47559
49366
|
const handleResize = () => {
|
|
47560
|
-
const isMobileScreenSize2 = (window == null ? void 0 : window.innerWidth) <=
|
|
49367
|
+
const isMobileScreenSize2 = (window == null ? void 0 : window.innerWidth) <= size2;
|
|
47561
49368
|
setIsMobileScreenSize(isMobileScreenSize2);
|
|
47562
49369
|
};
|
|
47563
49370
|
handleResize();
|
|
@@ -47565,7 +49372,7 @@ const useIsMobileScreenSize = () => {
|
|
|
47565
49372
|
return () => {
|
|
47566
49373
|
window == null ? void 0 : window.removeEventListener("resize", handleResize);
|
|
47567
49374
|
};
|
|
47568
|
-
}, []);
|
|
49375
|
+
}, [size2]);
|
|
47569
49376
|
return isMobileScreenSize;
|
|
47570
49377
|
};
|
|
47571
49378
|
const MAX_MODAL_HEIGHT = 600;
|
|
@@ -48974,25 +50781,31 @@ const Tooltip = ({
|
|
|
48974
50781
|
direction = "right",
|
|
48975
50782
|
style
|
|
48976
50783
|
}) => {
|
|
48977
|
-
var _a;
|
|
48978
50784
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
48979
50785
|
const tooltipTriggerContainerRef = useRef(null);
|
|
48980
50786
|
const tooltipContainerRef = useRef(null);
|
|
48981
50787
|
const [tooltipTop, setTooltipTop] = useState(0);
|
|
50788
|
+
const [tooltipPosition, setTooltipPosition] = useState({ left: 0, top: 0 });
|
|
48982
50789
|
useEffect(() => {
|
|
48983
|
-
|
|
48984
|
-
|
|
50790
|
+
if (showTooltip && tooltipContainerRef.current && tooltipTriggerContainerRef.current) {
|
|
50791
|
+
const rect = tooltipTriggerContainerRef.current.getBoundingClientRect();
|
|
48985
50792
|
const height = tooltipContainerRef.current.offsetHeight;
|
|
48986
|
-
const containerHeight =
|
|
50793
|
+
const containerHeight = tooltipTriggerContainerRef.current.offsetHeight;
|
|
50794
|
+
const top = rect.top + rect.height / 2 - height / 2;
|
|
50795
|
+
const left = direction === "right" ? rect.right + OFFSET_GAP : rect.left - OFFSET_GAP;
|
|
50796
|
+
setTooltipPosition({ left, top });
|
|
48987
50797
|
setTooltipTop(height / 2 - containerHeight / 2);
|
|
48988
50798
|
}
|
|
48989
|
-
}, [showTooltip]);
|
|
50799
|
+
}, [showTooltip, direction]);
|
|
48990
50800
|
const renderContent = useMemo(() => {
|
|
48991
50801
|
if (typeof content === "string") {
|
|
48992
50802
|
return /* @__PURE__ */ jsx(SmallText, { normalTextColor: true, textWrap: "nowrap", children: content });
|
|
48993
50803
|
}
|
|
48994
50804
|
return content;
|
|
48995
50805
|
}, [content]);
|
|
50806
|
+
if (isMobile()) {
|
|
50807
|
+
return children;
|
|
50808
|
+
}
|
|
48996
50809
|
return /* @__PURE__ */ jsxs(
|
|
48997
50810
|
StyledTooltipTriggerContainer,
|
|
48998
50811
|
{
|
|
@@ -49002,15 +50815,23 @@ const Tooltip = ({
|
|
|
49002
50815
|
onMouseLeave: () => setShowTooltip(false),
|
|
49003
50816
|
children: [
|
|
49004
50817
|
children,
|
|
49005
|
-
showTooltip &&
|
|
49006
|
-
|
|
49007
|
-
|
|
49008
|
-
|
|
49009
|
-
|
|
49010
|
-
|
|
49011
|
-
|
|
49012
|
-
|
|
49013
|
-
|
|
50818
|
+
showTooltip && createPortal(
|
|
50819
|
+
/* @__PURE__ */ jsx(
|
|
50820
|
+
StyledTooltipContainer,
|
|
50821
|
+
{
|
|
50822
|
+
ref: tooltipContainerRef,
|
|
50823
|
+
direction,
|
|
50824
|
+
top: tooltipTop,
|
|
50825
|
+
style: {
|
|
50826
|
+
position: "fixed",
|
|
50827
|
+
left: tooltipPosition.left,
|
|
50828
|
+
top: tooltipPosition.top,
|
|
50829
|
+
zIndex: 9999
|
|
50830
|
+
},
|
|
50831
|
+
children: renderContent
|
|
50832
|
+
}
|
|
50833
|
+
),
|
|
50834
|
+
document.body
|
|
49014
50835
|
)
|
|
49015
50836
|
]
|
|
49016
50837
|
}
|
|
@@ -49360,7 +51181,7 @@ const getFeeDetail = (estimatedFee) => {
|
|
|
49360
51181
|
return {
|
|
49361
51182
|
assetAmount: Number(humanReadableAmount),
|
|
49362
51183
|
formattedAssetAmount: `${formatDisplayAmount(humanReadableAmount)} ${estimatedFee.originAsset.symbol}`,
|
|
49363
|
-
formattedUsdAmount: formatUSD(totalUsd.toString())
|
|
51184
|
+
formattedUsdAmount: totalUsd > 0 ? formatUSD(totalUsd.toString()) : void 0
|
|
49364
51185
|
};
|
|
49365
51186
|
};
|
|
49366
51187
|
const BRIDGE_ID_TO_LABEL_MAP = {
|
|
@@ -49404,7 +51225,7 @@ function getTotalFees(fees2) {
|
|
|
49404
51225
|
return {
|
|
49405
51226
|
assetAmount: totalAsset,
|
|
49406
51227
|
formattedAssetAmount: `${totalAsset.toFixed(6)} ${symbol}`,
|
|
49407
|
-
formattedUsdAmount: totalUsd > 0 ? formatUSD(totalUsd.toString()) :
|
|
51228
|
+
formattedUsdAmount: totalUsd > 0 ? formatUSD(totalUsd.toString()) : void 0
|
|
49408
51229
|
};
|
|
49409
51230
|
}
|
|
49410
51231
|
const QuestionMarkIcon = ({
|
|
@@ -49788,12 +51609,14 @@ const useFilteredAssets = ({
|
|
|
49788
51609
|
};
|
|
49789
51610
|
const ibcEurekaHighlightedAssetsAtom = atom$1({});
|
|
49790
51611
|
const hideAssetsUnlessWalletTypeConnectedAtom = atom$1(false);
|
|
51612
|
+
const chainIdsSortedToTopAtom = atom$1([]);
|
|
49791
51613
|
const useFilteredChains = ({
|
|
49792
51614
|
selectedGroup,
|
|
49793
51615
|
searchQuery = "",
|
|
49794
51616
|
context
|
|
49795
51617
|
}) => {
|
|
49796
51618
|
const { data: chains2 } = useAtomValue(skipChainsAtom);
|
|
51619
|
+
const chainIdsSortedToTop = useAtomValue(chainIdsSortedToTopAtom);
|
|
49797
51620
|
const hideAssetsUnlessWalletTypeConnected = useAtomValue(hideAssetsUnlessWalletTypeConnectedAtom);
|
|
49798
51621
|
const filterOutUnlessUserHasBalance = useAtomValue(filterOutUnlessUserHasBalanceAtom);
|
|
49799
51622
|
const getBalance = useGetBalance();
|
|
@@ -49865,6 +51688,13 @@ const useFilteredChains = ({
|
|
|
49865
51688
|
const bIsHighlighted = indexB !== -1;
|
|
49866
51689
|
if (aIsHighlighted && !bIsHighlighted) return -1;
|
|
49867
51690
|
if (bIsHighlighted && !aIsHighlighted) return 1;
|
|
51691
|
+
const privA = chainIdsSortedToTop.indexOf(chainWithAssetA.chainId);
|
|
51692
|
+
const privB = chainIdsSortedToTop.indexOf(chainWithAssetB.chainId);
|
|
51693
|
+
if (privA !== -1 && privB !== -1) {
|
|
51694
|
+
return privA - privB;
|
|
51695
|
+
}
|
|
51696
|
+
if (privA !== -1) return -1;
|
|
51697
|
+
if (privB !== -1) return 1;
|
|
49868
51698
|
const aMatchesName = (_f = chainWithAssetA.chainName) == null ? void 0 : _f.toLowerCase().includes(((_e2 = chainWithAssetA.asset.recommendedSymbol) == null ? void 0 : _e2.toLowerCase()) ?? "");
|
|
49869
51699
|
const bMatchesName = (_h = chainWithAssetB.chainName) == null ? void 0 : _h.toLowerCase().includes(((_g = chainWithAssetB.asset.recommendedSymbol) == null ? void 0 : _g.toLowerCase()) ?? "");
|
|
49870
51700
|
if (aMatchesName && !bMatchesName) return -1;
|
|
@@ -49887,6 +51717,7 @@ const useFilteredChains = ({
|
|
|
49887
51717
|
return chainWithAsset;
|
|
49888
51718
|
});
|
|
49889
51719
|
}, [
|
|
51720
|
+
chainIdsSortedToTop,
|
|
49890
51721
|
chains2,
|
|
49891
51722
|
context,
|
|
49892
51723
|
cosmosWalletConnected,
|
|
@@ -53189,8 +55020,12 @@ const SwapExecutionPage = () => {
|
|
|
53189
55020
|
centerButton: shouldRenderTrackProgressButton ? {
|
|
53190
55021
|
label: "Track progress",
|
|
53191
55022
|
onClick: () => {
|
|
55023
|
+
const base64ExplorerData = getBase64ExplorerData(currentTransaction);
|
|
53192
55024
|
window.open(
|
|
53193
|
-
createSkipExplorerLink(
|
|
55025
|
+
createSkipExplorerLink(
|
|
55026
|
+
currentTransaction == null ? void 0 : currentTransaction.transactionDetails,
|
|
55027
|
+
base64ExplorerData
|
|
55028
|
+
),
|
|
53194
55029
|
"_blank"
|
|
53195
55030
|
);
|
|
53196
55031
|
track("swap execution page: track progress button - clicked", {
|
|
@@ -53947,7 +55782,7 @@ const useConnectToMissingCosmosChain = () => {
|
|
|
53947
55782
|
}, [sourceAsset, wallets, extraChainIdsToConnect, addExtraChainIdsToConnectForWalletType]);
|
|
53948
55783
|
return { isAskingToApproveConnection };
|
|
53949
55784
|
};
|
|
53950
|
-
const version = "3.14.
|
|
55785
|
+
const version = "3.14.6";
|
|
53951
55786
|
const packageJson = {
|
|
53952
55787
|
version
|
|
53953
55788
|
};
|
|
@@ -54409,10 +56244,13 @@ const TransactionHistoryPageHistoryItemDetails = ({
|
|
|
54409
56244
|
transactionDetails,
|
|
54410
56245
|
feeAssetRouteDetails,
|
|
54411
56246
|
senderAddress,
|
|
54412
|
-
receiverAddress
|
|
56247
|
+
receiverAddress,
|
|
56248
|
+
base64ExplorerData
|
|
54413
56249
|
}) => {
|
|
54414
56250
|
var _a;
|
|
54415
56251
|
const theme = nt();
|
|
56252
|
+
const { saveToClipboard: saveSenderAddressToClipboard, isCopied: isSenderAddressCopied } = useClipboard();
|
|
56253
|
+
const { saveToClipboard: saveReceiverAddressToClipboard, isCopied: isReceiverAddressCopied } = useClipboard();
|
|
54416
56254
|
const initialTxHash = (_a = transactionDetails == null ? void 0 : transactionDetails[0]) == null ? void 0 : _a.txHash;
|
|
54417
56255
|
const statusColor = useMemo(() => {
|
|
54418
56256
|
if (status === "failed" || status === "incomplete") {
|
|
@@ -54432,7 +56270,7 @@ const TransactionHistoryPageHistoryItemDetails = ({
|
|
|
54432
56270
|
assetDenom: transferAssetRelease == null ? void 0 : transferAssetRelease.denom,
|
|
54433
56271
|
chainId: transferAssetRelease == null ? void 0 : transferAssetRelease.chainId
|
|
54434
56272
|
});
|
|
54435
|
-
const skipExplorerLink = createSkipExplorerLink(transactionDetails);
|
|
56273
|
+
const skipExplorerLink = createSkipExplorerLink(transactionDetails, base64ExplorerData);
|
|
54436
56274
|
return /* @__PURE__ */ jsxs(Column, { padding: 10, gap: 10, style: { paddingTop: showTransferAssetRelease ? 0 : 10 }, children: [
|
|
54437
56275
|
showTransferAssetRelease && /* @__PURE__ */ jsx(StyledTransferAssetRelease, { children: /* @__PURE__ */ jsxs(SmallText, { color: theme.warning.text, children: [
|
|
54438
56276
|
"This transaction did not complete. Your assets have been released as:",
|
|
@@ -54481,11 +56319,25 @@ const TransactionHistoryPageHistoryItemDetails = ({
|
|
|
54481
56319
|
] }),
|
|
54482
56320
|
senderAddress && /* @__PURE__ */ jsxs(StyledHistoryItemDetailRow, { align: "center", children: [
|
|
54483
56321
|
/* @__PURE__ */ jsx(StyledDetailsLabel, { children: "Sender" }),
|
|
54484
|
-
/* @__PURE__ */ jsx(
|
|
56322
|
+
/* @__PURE__ */ jsx(
|
|
56323
|
+
SmallTextButton,
|
|
56324
|
+
{
|
|
56325
|
+
normalTextColor: true,
|
|
56326
|
+
onClick: () => saveSenderAddressToClipboard(senderAddress),
|
|
56327
|
+
children: isSenderAddressCopied ? "Copied!" : getTruncatedAddress(senderAddress)
|
|
56328
|
+
}
|
|
56329
|
+
)
|
|
54485
56330
|
] }),
|
|
54486
56331
|
receiverAddress && /* @__PURE__ */ jsxs(StyledHistoryItemDetailRow, { align: "center", children: [
|
|
54487
56332
|
/* @__PURE__ */ jsx(StyledDetailsLabel, { children: "Receiver" }),
|
|
54488
|
-
/* @__PURE__ */ jsx(
|
|
56333
|
+
/* @__PURE__ */ jsx(
|
|
56334
|
+
SmallTextButton,
|
|
56335
|
+
{
|
|
56336
|
+
normalTextColor: true,
|
|
56337
|
+
onClick: () => saveReceiverAddressToClipboard(receiverAddress),
|
|
56338
|
+
children: isReceiverAddressCopied ? "Copied!" : getTruncatedAddress(receiverAddress)
|
|
56339
|
+
}
|
|
56340
|
+
)
|
|
54489
56341
|
] }),
|
|
54490
56342
|
feeAssetRouteDetails && /* @__PURE__ */ jsx(StyledHistoryItemDetailRow, { align: "center", children: /* @__PURE__ */ jsxs(Column, { width: "100%", children: [
|
|
54491
56343
|
/* @__PURE__ */ jsx(Spacer, { height: 20, showLine: true, lineColor: theme.secondary.background.transparent }),
|
|
@@ -55124,16 +56976,16 @@ const getMobileDateFormat = (date, timeZone) => {
|
|
|
55124
56976
|
};
|
|
55125
56977
|
const formatter = new Intl.DateTimeFormat("en-US", options);
|
|
55126
56978
|
const parts = formatter.formatToParts(date);
|
|
55127
|
-
const
|
|
56979
|
+
const lookup2 = (type) => {
|
|
55128
56980
|
var _a;
|
|
55129
56981
|
return ((_a = parts.find((p2) => p2.type === type)) == null ? void 0 : _a.value) ?? "";
|
|
55130
56982
|
};
|
|
55131
|
-
const hours =
|
|
55132
|
-
const minutes =
|
|
55133
|
-
const tz =
|
|
55134
|
-
const day =
|
|
55135
|
-
const month =
|
|
55136
|
-
const year =
|
|
56983
|
+
const hours = lookup2("hour");
|
|
56984
|
+
const minutes = lookup2("minute");
|
|
56985
|
+
const tz = lookup2("timeZoneName");
|
|
56986
|
+
const day = lookup2("day");
|
|
56987
|
+
const month = lookup2("month");
|
|
56988
|
+
const year = lookup2("year");
|
|
55137
56989
|
return `${hours}:${minutes} ${tz} ${month}/${day}/${year}`;
|
|
55138
56990
|
};
|
|
55139
56991
|
const FilledWarningIcon = ({
|
|
@@ -55314,7 +57166,8 @@ const TransactionHistoryPageHistoryItem = forwardRef(
|
|
|
55314
57166
|
transferAssetRelease: historyItem == null ? void 0 : historyItem.transferAssetRelease,
|
|
55315
57167
|
feeAssetRouteDetails,
|
|
55316
57168
|
senderAddress,
|
|
55317
|
-
receiverAddress
|
|
57169
|
+
receiverAddress,
|
|
57170
|
+
base64ExplorerData: getBase64ExplorerData(txHistoryItem)
|
|
55318
57171
|
}
|
|
55319
57172
|
)
|
|
55320
57173
|
] });
|
|
@@ -56076,6 +57929,7 @@ const WidgetContainer = dt.div`
|
|
|
56076
57929
|
}
|
|
56077
57930
|
`;
|
|
56078
57931
|
export {
|
|
57932
|
+
Buffer as B,
|
|
56079
57933
|
Widget as W,
|
|
56080
57934
|
getAugmentedNamespace as a,
|
|
56081
57935
|
commonjsGlobal as c,
|