@edgex-web/components 0.1.0-beta.37 → 0.1.0-beta.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-Ce2tn0VX.mjs → ccip-l0s_ak6V.mjs} +2 -2
- package/dist/{ccip-Ce2tn0VX.mjs.map → ccip-l0s_ak6V.mjs.map} +1 -1
- package/dist/components/Deposit/src/components/evm/index.d.ts.map +1 -1
- package/dist/{index-EY9qKvQ0.mjs → index-DpU91i2T.mjs} +86 -82
- package/dist/{index-EY9qKvQ0.mjs.map → index-DpU91i2T.mjs.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-
|
|
1
|
+
import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-DpU91i2T.mjs";
|
|
2
2
|
class S extends p {
|
|
3
3
|
constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
|
|
4
4
|
var o;
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
T as offchainLookupAbiItem,
|
|
148
148
|
A as offchainLookupSignature
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=ccip-
|
|
150
|
+
//# sourceMappingURL=ccip-l0s_ak6V.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ccip-Ce2tn0VX.mjs","sources":["../node_modules/viem/_esm/errors/ccip.js","../node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n name: 'OffchainLookupError',\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n name: 'OffchainLookupResponseMalformedError',\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n name: 'OffchainLookupSenderMismatchError',\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { localBatchGatewayRequest, localBatchGatewayUrl, } from './ens/localBatchGatewayRequest.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl)\n ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_,\n })\n : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","localBatchGatewayUrl","localBatchGatewayRequest","data_","call","concat","encodeAbiParameters","err","error","i","method","body","headers","response","HttpRequestError","isHex"],"mappings":";AAGO,MAAMA,UAA4BC,EAAU;AAAA,EAC/C,YAAY,EAAE,kBAAAC,GAAkB,OAAAC,GAAO,MAAAC,GAAM,WAAAC,GAAW,QAAAC,GAAQ,MAAAC,KAAS;;AACrE,UAAMJ,EAAM,gBACR,4DAA4D;AAAA,MAC5D,OAAAA;AAAA,MACA,cAAc;AAAA,QACV,GAAIA,EAAM,gBAAgB;SAC1BK,IAAAL,EAAM,iBAAN,QAAAK,EAAoB,SAAS,KAAK,CAAA;AAAA,QAClC;AAAA,QACAD,KAAQ;AAAA,UACJ;AAAA,UACA,GAAGA,EAAK,IAAI,CAACE,MAAQ,OAAOC,EAAOD,CAAG,CAAC,EAAE;AAAA,QAC7D;AAAA,QACgB,aAAaH,CAAM;AAAA,QACnB,WAAWF,CAAI;AAAA,QACf,wBAAwBF,CAAgB;AAAA,QACxC,iBAAiBG,CAAS;AAAA,MAC1C,EAAc,KAAI;AAAA,MACN,MAAM;AAAA,IAClB,CAAS;AAAA,EACL;AACJ;AACO,MAAMM,UAA6CV,EAAU;AAAA,EAChE,YAAY,EAAE,QAAAW,GAAQ,KAAAH,KAAO;AACzB,UAAM,8EAA8E;AAAA,MAChF,cAAc;AAAA,QACV,gBAAgBC,EAAOD,CAAG,CAAC;AAAA,QAC3B,aAAaI,EAAUD,CAAM,CAAC;AAAA,MAC9C;AAAA,MACY,MAAM;AAAA,IAClB,CAAS;AAAA,EACL;AACJ;AACO,MAAME,UAA0Cb,EAAU;AAA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AAU,MAAM6B,EAAS,KAAI,GAAI,OAGjC7B,IAAU,MAAM6B,EAAS,QAEzB,CAACA,EAAS,IAAI;AACd,QAAAL,IAAQ,IAAIM,EAAiB;AAAA,UACzB,MAAAH;AAAA,UACA,SAAS3B,KAAA,QAAAA,EAAQ,QACXC,EAAUD,EAAO,KAAK,IACtB6B,EAAS;AAAA,UACf,SAASA,EAAS;AAAA,UAClB,QAAQA,EAAS;AAAA,UACjB,KAAAhC;AAAA,QACpB,CAAiB;AACD;AAAA,MACJ;AACA,UAAI,CAACkC,EAAM/B,CAAM,GAAG;AAChB,QAAAwB,IAAQ,IAAIzB,EAAqC;AAAA,UAC7C,QAAAC;AAAA,UACA,KAAAH;AAAA,QACpB,CAAiB;AACD;AAAA,MACJ;AACA,aAAOG;AAAA,IACX,SACOuB,GAAK;AACR,MAAAC,IAAQ,IAAIM,EAAiB;AAAA,QACzB,MAAAH;AAAA,QACA,SAASJ,EAAI;AAAA,QACb,KAAA1B;AAAA,MAChB,CAAa;AAAA,IACL;AAAA,EACJ;AACA,QAAM2B;AACV;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"ccip-l0s_ak6V.mjs","sources":["../node_modules/viem/_esm/errors/ccip.js","../node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n name: 'OffchainLookupError',\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n name: 'OffchainLookupResponseMalformedError',\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n name: 'OffchainLookupSenderMismatchError',\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { localBatchGatewayRequest, localBatchGatewayUrl, } from './ens/localBatchGatewayRequest.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl)\n ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_,\n })\n : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","localBatchGatewayUrl","localBatchGatewayRequest","data_","call","concat","encodeAbiParameters","err","error","i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AAAA,QACpB,CAAiB;AACD;AAAA,MACJ;AACA,UAAI,CAACkC,EAAM/B,CAAM,GAAG;AAChB,QAAAwB,IAAQ,IAAIzB,EAAqC;AAAA,UAC7C,QAAAC;AAAA,UACA,KAAAH;AAAA,QACpB,CAAiB;AACD;AAAA,MACJ;AACA,aAAOG;AAAA,IACX,SACOuB,GAAK;AACR,MAAAC,IAAQ,IAAIM,EAAiB;AAAA,QACzB,MAAAH;AAAA,QACA,SAASJ,EAAI;AAAA,QACb,KAAA1B;AAAA,MAChB,CAAa;AAAA,IACL;AAAA,EACJ;AACA,QAAM2B;AACV;","x_google_ignoreList":[0,1]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Deposit/src/components/evm/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,EAAE,EAAE,MAAM,OAAO,CAAA;AAUrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAwB7C,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Deposit/src/components/evm/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,EAAE,EAAE,MAAM,OAAO,CAAA;AAUrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAwB7C,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,mBAAmB,CAichC,CAAA;AAED,eAAe,GAAG,CAAA"}
|
|
@@ -2,7 +2,7 @@ var mm = Object.defineProperty;
|
|
|
2
2
|
var gm = (e, t, n) => t in e ? mm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Nr = (e, t, n) => gm(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as _ from "react";
|
|
5
|
-
import K, { createContext as Le, useContext as we, useMemo as re, useCallback as X, forwardRef as ec, createElement as is, useRef as se, useEffect as
|
|
5
|
+
import K, { createContext as Le, useContext as we, useMemo as re, useCallback as X, forwardRef as ec, createElement as is, useRef as se, useEffect as xe, useState as ie, useLayoutEffect as Ps, Fragment as lt, isValidElement as bm, cloneElement as ym, useId as Vn, useReducer as vm, useSyncExternalStore as wm, useImperativeHandle as Pf } from "react";
|
|
6
6
|
import * as Vr from "react-dom";
|
|
7
7
|
import $f, { createPortal as Af, flushSync as Ur } from "react-dom";
|
|
8
8
|
function xm(e) {
|
|
@@ -1837,7 +1837,7 @@ function Lf() {
|
|
|
1837
1837
|
}, [
|
|
1838
1838
|
n
|
|
1839
1839
|
]);
|
|
1840
|
-
return
|
|
1840
|
+
return xe(() => r, [
|
|
1841
1841
|
r
|
|
1842
1842
|
]), {
|
|
1843
1843
|
addGlobalListener: t,
|
|
@@ -1981,7 +1981,7 @@ function og(e, t, n) {
|
|
|
1981
1981
|
return e = e || r.activeElement instanceof o && !rg.has(r.activeElement.type) || r.activeElement instanceof s || r.activeElement instanceof i && r.activeElement.isContentEditable, !(e && t === "keyboard" && n instanceof c && !eg[n.key]);
|
|
1982
1982
|
}
|
|
1983
1983
|
function sg(e, t, n) {
|
|
1984
|
-
Xi(),
|
|
1984
|
+
Xi(), xe(() => {
|
|
1985
1985
|
let r = (o, s) => {
|
|
1986
1986
|
og(!!(n != null && n.isTextInput), o, s) && e(zf());
|
|
1987
1987
|
};
|
|
@@ -2084,7 +2084,7 @@ function ug(e) {
|
|
|
2084
2084
|
pointerType: "",
|
|
2085
2085
|
target: null
|
|
2086
2086
|
}).current;
|
|
2087
|
-
|
|
2087
|
+
xe(cg, []);
|
|
2088
2088
|
let { addGlobalListener: a, removeAllGlobalListeners: u } = Lf(), { hoverProps: l, triggerHoverEnd: f } = re(() => {
|
|
2089
2089
|
let d = (m, v) => {
|
|
2090
2090
|
if (c.pointerType = v, o || v === "touch" || c.isHovered || !m.currentTarget.contains(m.target)) return;
|
|
@@ -2130,7 +2130,7 @@ function ug(e) {
|
|
|
2130
2130
|
a,
|
|
2131
2131
|
u
|
|
2132
2132
|
]);
|
|
2133
|
-
return
|
|
2133
|
+
return xe(() => {
|
|
2134
2134
|
o && f({
|
|
2135
2135
|
currentTarget: c.target
|
|
2136
2136
|
}, c.pointerType);
|
|
@@ -2245,10 +2245,10 @@ function $t() {
|
|
|
2245
2245
|
}
|
|
2246
2246
|
function xr() {
|
|
2247
2247
|
let [e] = ie($t);
|
|
2248
|
-
return
|
|
2248
|
+
return xe(() => () => e.dispose(), [e]), e;
|
|
2249
2249
|
}
|
|
2250
2250
|
let ge = (e, t) => {
|
|
2251
|
-
kt.isServer ?
|
|
2251
|
+
kt.isServer ? xe(e, t) : Ps(e, t);
|
|
2252
2252
|
};
|
|
2253
2253
|
function Gn(e) {
|
|
2254
2254
|
let t = se(e);
|
|
@@ -2454,12 +2454,12 @@ function Rg({ children: e }) {
|
|
|
2454
2454
|
}
|
|
2455
2455
|
function Og({ data: e, form: t, disabled: n, onReset: r, overrides: o }) {
|
|
2456
2456
|
let [s, i] = ie(null), c = xr();
|
|
2457
|
-
return
|
|
2457
|
+
return xe(() => {
|
|
2458
2458
|
if (r && s) return c.addEventListener(s, "reset", r);
|
|
2459
2459
|
}, [s, t, r]), K.createElement(Rg, null, K.createElement(Ig, { setForm: i, formId: t }), Gf(e).map(([a, u]) => K.createElement(Kf, { features: ac.Hidden, ...hn({ key: a, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: n, name: a, value: u, ...o }) })));
|
|
2460
2460
|
}
|
|
2461
2461
|
function Ig({ setForm: e, formId: t }) {
|
|
2462
|
-
return
|
|
2462
|
+
return xe(() => {
|
|
2463
2463
|
if (t) {
|
|
2464
2464
|
let n = document.getElementById(t);
|
|
2465
2465
|
n && e(n);
|
|
@@ -2528,7 +2528,7 @@ function Dg(e, t = !0) {
|
|
|
2528
2528
|
}
|
|
2529
2529
|
function mt(...e) {
|
|
2530
2530
|
let t = se(e);
|
|
2531
|
-
|
|
2531
|
+
xe(() => {
|
|
2532
2532
|
t.current = e;
|
|
2533
2533
|
}, [e]);
|
|
2534
2534
|
let n = ue((r) => {
|
|
@@ -2909,7 +2909,7 @@ function lb(e, t, n) {
|
|
|
2909
2909
|
let s = o.getBoundingClientRect();
|
|
2910
2910
|
s.x === 0 && s.y === 0 && s.width === 0 && s.height === 0 && n();
|
|
2911
2911
|
});
|
|
2912
|
-
|
|
2912
|
+
xe(() => {
|
|
2913
2913
|
if (!e) return;
|
|
2914
2914
|
let o = t === null ? null : un(t) ? t : t.current;
|
|
2915
2915
|
if (!o) return;
|
|
@@ -3006,7 +3006,7 @@ function zu() {
|
|
|
3006
3006
|
}
|
|
3007
3007
|
function nr(e, t, n, r) {
|
|
3008
3008
|
let o = Gn(n);
|
|
3009
|
-
|
|
3009
|
+
xe(() => {
|
|
3010
3010
|
if (!e) return;
|
|
3011
3011
|
function s(i) {
|
|
3012
3012
|
o.current(i);
|
|
@@ -3016,7 +3016,7 @@ function nr(e, t, n, r) {
|
|
|
3016
3016
|
}
|
|
3017
3017
|
function xb(e, t, n, r) {
|
|
3018
3018
|
let o = Gn(n);
|
|
3019
|
-
|
|
3019
|
+
xe(() => {
|
|
3020
3020
|
if (!e) return;
|
|
3021
3021
|
function s(i) {
|
|
3022
3022
|
o.current(i);
|
|
@@ -4691,7 +4691,7 @@ function kd(e) {
|
|
|
4691
4691
|
return t.current == null ? void 0 : t.current(...r);
|
|
4692
4692
|
}, []);
|
|
4693
4693
|
}
|
|
4694
|
-
var la = typeof document < "u" ? Ps :
|
|
4694
|
+
var la = typeof document < "u" ? Ps : xe;
|
|
4695
4695
|
let ol = !1, a1 = 0;
|
|
4696
4696
|
const sl = () => (
|
|
4697
4697
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
@@ -5199,7 +5199,7 @@ function Ho(e, t) {
|
|
|
5199
5199
|
var jd = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(jd || {});
|
|
5200
5200
|
function _d(e) {
|
|
5201
5201
|
let t = ue(e), n = se(!1);
|
|
5202
|
-
|
|
5202
|
+
xe(() => (n.current = !1, () => {
|
|
5203
5203
|
n.current = !0, Hf(() => {
|
|
5204
5204
|
n.current && t();
|
|
5205
5205
|
});
|
|
@@ -5231,9 +5231,9 @@ function F1(e) {
|
|
|
5231
5231
|
let c = e.createElement("div");
|
|
5232
5232
|
return c.setAttribute("id", "headlessui-portal-root"), e.body.appendChild(c);
|
|
5233
5233
|
});
|
|
5234
|
-
return
|
|
5234
|
+
return xe(() => {
|
|
5235
5235
|
r !== null && (e != null && e.body.contains(r) || e == null || e.body.appendChild(r));
|
|
5236
|
-
}, [r, e]),
|
|
5236
|
+
}, [r, e]), xe(() => {
|
|
5237
5237
|
t || n !== null && o(n.current);
|
|
5238
5238
|
}, [n, o, t]), r;
|
|
5239
5239
|
}
|
|
@@ -5352,7 +5352,7 @@ function Y1(e, t) {
|
|
|
5352
5352
|
ne === "enter" ? i == null || i() : ne === "leave" && (a == null || a());
|
|
5353
5353
|
}), Q === "leave" && !ks(N) && (I("hidden"), E($));
|
|
5354
5354
|
});
|
|
5355
|
-
|
|
5355
|
+
xe(() => {
|
|
5356
5356
|
C && o || (k(D), j(D));
|
|
5357
5357
|
}, [D, C, o]);
|
|
5358
5358
|
let U = !(!o || !C || !x || A), [, z] = md(U, T, D, { start: k, end: j }), Z = hn({ ref: L, className: ((r = Ji(v.className, R && u, R && l, z.enter && u, z.enter && z.closed && l, z.enter && !z.closed && f, z.leave && p, z.leave && !z.closed && h, z.leave && z.closed && m, !z.transition && D && d)) == null ? void 0 : r.trim()) || void 0, ...hd(z) }), H = 0;
|
|
@@ -5676,7 +5676,7 @@ function pv(e, t) {
|
|
|
5676
5676
|
let G = Array.from(d.listRef.current.values());
|
|
5677
5677
|
return { ...u, inner: { listRef: { current: G }, index: E } };
|
|
5678
5678
|
})(), [A, R] = R1(x), y = T1(), N = mt(t, u ? A : null, p.actions.setOptionsElement, f), k = xr();
|
|
5679
|
-
|
|
5679
|
+
xe(() => {
|
|
5680
5680
|
var G;
|
|
5681
5681
|
let Q = v;
|
|
5682
5682
|
Q && h === Ce.Open && Q !== ((G = So(Q)) == null ? void 0 : G.activeElement) && (Q == null || Q.focus({ preventScroll: !0 }));
|
|
@@ -6044,7 +6044,7 @@ const Av = {
|
|
|
6044
6044
|
(m) => m.token === r || m.symbol === r
|
|
6045
6045
|
) || p[0];
|
|
6046
6046
|
}, [p, r]);
|
|
6047
|
-
return
|
|
6047
|
+
return xe(() => {
|
|
6048
6048
|
if (p.length === 0) return;
|
|
6049
6049
|
if (!p.some(
|
|
6050
6050
|
(v) => (v.symbol || v.token) === r
|
|
@@ -6052,7 +6052,7 @@ const Av = {
|
|
|
6052
6052
|
const v = p[0];
|
|
6053
6053
|
o(v.symbol || v.token);
|
|
6054
6054
|
}
|
|
6055
|
-
}, [p, r, o]),
|
|
6055
|
+
}, [p, r, o]), xe(() => {
|
|
6056
6056
|
if (f.length === 0) return;
|
|
6057
6057
|
f.some(
|
|
6058
6058
|
(v) => v.chainId === e.chainId
|
|
@@ -6716,7 +6716,7 @@ var jn;
|
|
|
6716
6716
|
if (!c)
|
|
6717
6717
|
throw new Error("Assertion error");
|
|
6718
6718
|
}
|
|
6719
|
-
const s = class
|
|
6719
|
+
const s = class Ee {
|
|
6720
6720
|
/*-- Constructor (low level) and fields --*/
|
|
6721
6721
|
// Creates a new QR Code segment with the given attributes and data.
|
|
6722
6722
|
// The character count (numChars) must agree with the mode and the bit buffer length,
|
|
@@ -6734,36 +6734,36 @@ var jn;
|
|
|
6734
6734
|
let u = [];
|
|
6735
6735
|
for (const l of a)
|
|
6736
6736
|
n(l, 8, u);
|
|
6737
|
-
return new
|
|
6737
|
+
return new Ee(Ee.Mode.BYTE, a.length, u);
|
|
6738
6738
|
}
|
|
6739
6739
|
// Returns a segment representing the given string of decimal digits encoded in numeric mode.
|
|
6740
6740
|
static makeNumeric(a) {
|
|
6741
|
-
if (!
|
|
6741
|
+
if (!Ee.isNumeric(a))
|
|
6742
6742
|
throw new RangeError("String contains non-numeric characters");
|
|
6743
6743
|
let u = [];
|
|
6744
6744
|
for (let l = 0; l < a.length; ) {
|
|
6745
6745
|
const f = Math.min(a.length - l, 3);
|
|
6746
6746
|
n(parseInt(a.substring(l, l + f), 10), f * 3 + 1, u), l += f;
|
|
6747
6747
|
}
|
|
6748
|
-
return new
|
|
6748
|
+
return new Ee(Ee.Mode.NUMERIC, a.length, u);
|
|
6749
6749
|
}
|
|
6750
6750
|
// Returns a segment representing the given text string encoded in alphanumeric mode.
|
|
6751
6751
|
// The characters allowed are: 0 to 9, A to Z (uppercase only), space,
|
|
6752
6752
|
// dollar, percent, asterisk, plus, hyphen, period, slash, colon.
|
|
6753
6753
|
static makeAlphanumeric(a) {
|
|
6754
|
-
if (!
|
|
6754
|
+
if (!Ee.isAlphanumeric(a))
|
|
6755
6755
|
throw new RangeError("String contains unencodable characters in alphanumeric mode");
|
|
6756
6756
|
let u = [], l;
|
|
6757
6757
|
for (l = 0; l + 2 <= a.length; l += 2) {
|
|
6758
|
-
let f =
|
|
6759
|
-
f +=
|
|
6758
|
+
let f = Ee.ALPHANUMERIC_CHARSET.indexOf(a.charAt(l)) * 45;
|
|
6759
|
+
f += Ee.ALPHANUMERIC_CHARSET.indexOf(a.charAt(l + 1)), n(f, 11, u);
|
|
6760
6760
|
}
|
|
6761
|
-
return l < a.length && n(
|
|
6761
|
+
return l < a.length && n(Ee.ALPHANUMERIC_CHARSET.indexOf(a.charAt(l)), 6, u), new Ee(Ee.Mode.ALPHANUMERIC, a.length, u);
|
|
6762
6762
|
}
|
|
6763
6763
|
// Returns a new mutable list of zero or more segments to represent the given Unicode text string.
|
|
6764
6764
|
// The result may use various segment modes and switch modes to optimize the length of the bit stream.
|
|
6765
6765
|
static makeSegments(a) {
|
|
6766
|
-
return a == "" ? [] :
|
|
6766
|
+
return a == "" ? [] : Ee.isNumeric(a) ? [Ee.makeNumeric(a)] : Ee.isAlphanumeric(a) ? [Ee.makeAlphanumeric(a)] : [Ee.makeBytes(Ee.toUtf8ByteArray(a))];
|
|
6767
6767
|
}
|
|
6768
6768
|
// Returns a segment representing an Extended Channel Interpretation
|
|
6769
6769
|
// (ECI) designator with the given assignment value.
|
|
@@ -6779,18 +6779,18 @@ var jn;
|
|
|
6779
6779
|
n(6, 3, u), n(a, 21, u);
|
|
6780
6780
|
else
|
|
6781
6781
|
throw new RangeError("ECI assignment value out of range");
|
|
6782
|
-
return new
|
|
6782
|
+
return new Ee(Ee.Mode.ECI, 0, u);
|
|
6783
6783
|
}
|
|
6784
6784
|
// Tests whether the given string can be encoded as a segment in numeric mode.
|
|
6785
6785
|
// A string is encodable iff each character is in the range 0 to 9.
|
|
6786
6786
|
static isNumeric(a) {
|
|
6787
|
-
return
|
|
6787
|
+
return Ee.NUMERIC_REGEX.test(a);
|
|
6788
6788
|
}
|
|
6789
6789
|
// Tests whether the given string can be encoded as a segment in alphanumeric mode.
|
|
6790
6790
|
// A string is encodable iff each character is in the following set: 0 to 9, A to Z
|
|
6791
6791
|
// (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
|
|
6792
6792
|
static isAlphanumeric(a) {
|
|
6793
|
-
return
|
|
6793
|
+
return Ee.ALPHANUMERIC_REGEX.test(a);
|
|
6794
6794
|
}
|
|
6795
6795
|
/*-- Methods --*/
|
|
6796
6796
|
// Returns a new copy of the data bits of this segment.
|
|
@@ -9129,7 +9129,7 @@ function kx(e, { includeName: t }) {
|
|
|
9129
9129
|
function jt(e, { strict: t = !0 } = {}) {
|
|
9130
9130
|
return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
|
|
9131
9131
|
}
|
|
9132
|
-
function
|
|
9132
|
+
function Se(e) {
|
|
9133
9133
|
return jt(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
|
|
9134
9134
|
}
|
|
9135
9135
|
const Lp = "2.34.0";
|
|
@@ -9260,7 +9260,7 @@ class Dx extends W {
|
|
|
9260
9260
|
}
|
|
9261
9261
|
class jx extends W {
|
|
9262
9262
|
constructor({ expectedSize: t, value: n }) {
|
|
9263
|
-
super(`Size of bytes "${n}" (bytes${
|
|
9263
|
+
super(`Size of bytes "${n}" (bytes${Se(n)}) does not match expected size (bytes${t}).`, { name: "AbiEncodingBytesSizeMismatchError" });
|
|
9264
9264
|
}
|
|
9265
9265
|
}
|
|
9266
9266
|
class _x extends W {
|
|
@@ -9571,9 +9571,9 @@ function Mn(e, { dir: t = "left" } = {}) {
|
|
|
9571
9571
|
return n = t === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
|
|
9572
9572
|
}
|
|
9573
9573
|
function At(e, { size: t }) {
|
|
9574
|
-
if (
|
|
9574
|
+
if (Se(e) > t)
|
|
9575
9575
|
throw new Jx({
|
|
9576
|
-
givenSize:
|
|
9576
|
+
givenSize: Se(e),
|
|
9577
9577
|
maxSize: t
|
|
9578
9578
|
});
|
|
9579
9579
|
}
|
|
@@ -10038,19 +10038,19 @@ function br(e, t, n, { strict: r } = {}) {
|
|
|
10038
10038
|
});
|
|
10039
10039
|
}
|
|
10040
10040
|
function rh(e, t) {
|
|
10041
|
-
if (typeof t == "number" && t > 0 && t >
|
|
10041
|
+
if (typeof t == "number" && t > 0 && t > Se(e) - 1)
|
|
10042
10042
|
throw new zp({
|
|
10043
10043
|
offset: t,
|
|
10044
10044
|
position: "start",
|
|
10045
|
-
size:
|
|
10045
|
+
size: Se(e)
|
|
10046
10046
|
});
|
|
10047
10047
|
}
|
|
10048
10048
|
function oh(e, t, n) {
|
|
10049
|
-
if (typeof t == "number" && typeof n == "number" &&
|
|
10049
|
+
if (typeof t == "number" && typeof n == "number" && Se(e) !== n - t)
|
|
10050
10050
|
throw new zp({
|
|
10051
10051
|
offset: n,
|
|
10052
10052
|
position: "end",
|
|
10053
|
-
size:
|
|
10053
|
+
size: Se(e)
|
|
10054
10054
|
});
|
|
10055
10055
|
}
|
|
10056
10056
|
function sh(e, t, n, { strict: r } = {}) {
|
|
@@ -10115,13 +10115,13 @@ function Mc(e) {
|
|
|
10115
10115
|
let t = 0;
|
|
10116
10116
|
for (let s = 0; s < e.length; s++) {
|
|
10117
10117
|
const { dynamic: i, encoded: c } = e[s];
|
|
10118
|
-
i ? t += 32 : t +=
|
|
10118
|
+
i ? t += 32 : t += Se(c);
|
|
10119
10119
|
}
|
|
10120
10120
|
const n = [], r = [];
|
|
10121
10121
|
let o = 0;
|
|
10122
10122
|
for (let s = 0; s < e.length; s++) {
|
|
10123
10123
|
const { dynamic: i, encoded: c } = e[s];
|
|
10124
|
-
i ? (n.push(J(t + o, { size: 32 })), r.push(c), o +=
|
|
10124
|
+
i ? (n.push(J(t + o, { size: 32 })), r.push(c), o += Se(c)) : n.push(c);
|
|
10125
10125
|
}
|
|
10126
10126
|
return Ut([...n, ...r]);
|
|
10127
10127
|
}
|
|
@@ -10164,7 +10164,7 @@ function kE(e, { length: t, param: n }) {
|
|
|
10164
10164
|
};
|
|
10165
10165
|
}
|
|
10166
10166
|
function FE(e, { param: t }) {
|
|
10167
|
-
const [, n] = t.type.split("bytes"), r =
|
|
10167
|
+
const [, n] = t.type.split("bytes"), r = Se(e);
|
|
10168
10168
|
if (!n) {
|
|
10169
10169
|
let o = e;
|
|
10170
10170
|
return r % 32 !== 0 && (o = yn(o, {
|
|
@@ -10208,7 +10208,7 @@ function jE(e, { signed: t, size: n = 256 }) {
|
|
|
10208
10208
|
};
|
|
10209
10209
|
}
|
|
10210
10210
|
function _E(e) {
|
|
10211
|
-
const t = Qr(e), n = Math.ceil(
|
|
10211
|
+
const t = Qr(e), n = Math.ceil(Se(t) / 32), r = [];
|
|
10212
10212
|
for (let o = 0; o < n; o++)
|
|
10213
10213
|
r.push(yn(br(t, o * 32, (o + 1) * 32), {
|
|
10214
10214
|
dir: "right"
|
|
@@ -10216,7 +10216,7 @@ function _E(e) {
|
|
|
10216
10216
|
return {
|
|
10217
10217
|
dynamic: !0,
|
|
10218
10218
|
encoded: Ut([
|
|
10219
|
-
yn(J(
|
|
10219
|
+
yn(J(Se(t), { size: 32 })),
|
|
10220
10220
|
...r
|
|
10221
10221
|
])
|
|
10222
10222
|
};
|
|
@@ -10598,13 +10598,13 @@ function ZE(e, t = {}) {
|
|
|
10598
10598
|
}
|
|
10599
10599
|
function Io(e, t) {
|
|
10600
10600
|
const n = typeof t == "string" ? Pt(t) : t, r = kc(n);
|
|
10601
|
-
if (
|
|
10601
|
+
if (Se(n) === 0 && e.length > 0)
|
|
10602
10602
|
throw new To();
|
|
10603
|
-
if (
|
|
10603
|
+
if (Se(t) && Se(t) < 32)
|
|
10604
10604
|
throw new Fp({
|
|
10605
10605
|
data: typeof t == "string" ? t : Oe(t),
|
|
10606
10606
|
params: e,
|
|
10607
|
-
size:
|
|
10607
|
+
size: Se(t)
|
|
10608
10608
|
});
|
|
10609
10609
|
let o = 0;
|
|
10610
10610
|
const s = [];
|
|
@@ -11588,7 +11588,7 @@ async function v2({ hash: e, signature: t }) {
|
|
|
11588
11588
|
return new r.Signature(_t(u), _t(l)).addRecoveryBit(h);
|
|
11589
11589
|
}
|
|
11590
11590
|
const i = jt(t) ? t : rn(t);
|
|
11591
|
-
if (
|
|
11591
|
+
if (Se(i) !== 65)
|
|
11592
11592
|
throw new Error("invalid signature length");
|
|
11593
11593
|
const c = nn(`0x${i.slice(130)}`), a = Yl(c);
|
|
11594
11594
|
return r.Signature.fromCompact(i.substring(2, 130)).addRecoveryBit(a);
|
|
@@ -12419,7 +12419,7 @@ class G2 extends W {
|
|
|
12419
12419
|
}
|
|
12420
12420
|
}
|
|
12421
12421
|
function q2(e) {
|
|
12422
|
-
const t = typeof e.data == "string" ? Pt(e.data) : e.data, n =
|
|
12422
|
+
const t = typeof e.data == "string" ? Pt(e.data) : e.data, n = Se(t);
|
|
12423
12423
|
if (!n)
|
|
12424
12424
|
throw new G2();
|
|
12425
12425
|
if (n > Jl)
|
|
@@ -12721,7 +12721,7 @@ function Zc(e) {
|
|
|
12721
12721
|
abiItem: a,
|
|
12722
12722
|
data: n,
|
|
12723
12723
|
params: h,
|
|
12724
|
-
size:
|
|
12724
|
+
size: Se(n)
|
|
12725
12725
|
}) : m;
|
|
12726
12726
|
}
|
|
12727
12727
|
else if (s)
|
|
@@ -13984,7 +13984,7 @@ async function Xs(e, t) {
|
|
|
13984
13984
|
});
|
|
13985
13985
|
return H === "0x" ? { data: void 0 } : { data: H };
|
|
13986
13986
|
} catch (R) {
|
|
13987
|
-
const y = M6(R), { offchainLookup: N, offchainLookupSignature: k } = await import("./ccip-
|
|
13987
|
+
const y = M6(R), { offchainLookup: N, offchainLookupSignature: k } = await import("./ccip-l0s_ak6V.mjs");
|
|
13988
13988
|
if (e.ccipRead !== !1 && (y == null ? void 0 : y.slice(0, 10)) === k && C)
|
|
13989
13989
|
return { data: await N(e, { data: y, to: C }) };
|
|
13990
13990
|
throw I && (y == null ? void 0 : y.slice(0, 10)) === "0x101bb98d" ? new h2({ factory: d }) : Qh(R, {
|
|
@@ -15572,10 +15572,10 @@ function U5(e) {
|
|
|
15572
15572
|
const p = l.match(BE);
|
|
15573
15573
|
if (p) {
|
|
15574
15574
|
const [m, v] = p;
|
|
15575
|
-
if (v &&
|
|
15575
|
+
if (v && Se(f) !== Number.parseInt(v))
|
|
15576
15576
|
throw new Vx({
|
|
15577
15577
|
expectedSize: Number.parseInt(v),
|
|
15578
|
-
givenSize:
|
|
15578
|
+
givenSize: Se(f)
|
|
15579
15579
|
});
|
|
15580
15580
|
}
|
|
15581
15581
|
const h = o[l];
|
|
@@ -15615,7 +15615,7 @@ function H5(e) {
|
|
|
15615
15615
|
const W5 = `Ethereum Signed Message:
|
|
15616
15616
|
`;
|
|
15617
15617
|
function V5(e) {
|
|
15618
|
-
const t = typeof e == "string" ? Qr(e) : typeof e.raw == "string" ? e.raw : Oe(e.raw), n = Qr(`${W5}${
|
|
15618
|
+
const t = typeof e == "string" ? Qr(e) : typeof e.raw == "string" ? e.raw : Oe(e.raw), n = Qr(`${W5}${Se(t)}`);
|
|
15619
15619
|
return Ut([n, t]);
|
|
15620
15620
|
}
|
|
15621
15621
|
function p0(e, t) {
|
|
@@ -18741,7 +18741,7 @@ const TP = (e) => {
|
|
|
18741
18741
|
if (n)
|
|
18742
18742
|
return {
|
|
18743
18743
|
text: t("deposit.switchNetwork"),
|
|
18744
|
-
disabled: !
|
|
18744
|
+
disabled: !0,
|
|
18745
18745
|
isNetworkSwitch: !0
|
|
18746
18746
|
};
|
|
18747
18747
|
const u = parseFloat(r || "0"), l = SP(
|
|
@@ -18854,7 +18854,7 @@ const MP = ({
|
|
|
18854
18854
|
enabled: !!t && !!n && !!e.tokenAddress && !!(r != null && r.useBalance)
|
|
18855
18855
|
}
|
|
18856
18856
|
});
|
|
18857
|
-
return
|
|
18857
|
+
return xe(() => {
|
|
18858
18858
|
o(kn(e.tokenAddress), { balance: s });
|
|
18859
18859
|
}, [s, e.tokenAddress, o]), null;
|
|
18860
18860
|
}, V0 = ({
|
|
@@ -19028,7 +19028,7 @@ const kP = ({
|
|
|
19028
19028
|
const { t: a } = En(), u = s.useAccount(), l = t.tokenList.find(
|
|
19029
19029
|
(k) => k.token === n
|
|
19030
19030
|
), f = t.chainId, [d, p] = ie("");
|
|
19031
|
-
|
|
19031
|
+
xe(() => {
|
|
19032
19032
|
p("");
|
|
19033
19033
|
}, [n, t.chainId]);
|
|
19034
19034
|
const { multicallResult: h, queryComponents: m } = V0({
|
|
@@ -19078,7 +19078,13 @@ const kP = ({
|
|
|
19078
19078
|
} finally {
|
|
19079
19079
|
D(!1);
|
|
19080
19080
|
}
|
|
19081
|
-
}, [F, w]), I = re(() => +u.chainId != +t.chainId, [u.chainId, t.chainId]),
|
|
19081
|
+
}, [F, w]), I = re(() => +u.chainId != +t.chainId, [u.chainId, t.chainId]), O = X(async () => {
|
|
19082
|
+
i && i(f);
|
|
19083
|
+
}, [i, f]);
|
|
19084
|
+
xe(() => {
|
|
19085
|
+
I || O();
|
|
19086
|
+
}, [I, O]);
|
|
19087
|
+
const { showLayerZeroTip: S, layerZeroTipKey: E } = re(() => {
|
|
19082
19088
|
const k = +t.chainId == 42161 || +t.chainId == 421614, j = (n == null ? void 0 : n.toUpperCase()) === "USDT", U = new je(d || "0"), z = new je("200000");
|
|
19083
19089
|
let Z = !1, H;
|
|
19084
19090
|
if (k && j && d)
|
|
@@ -19097,31 +19103,29 @@ const kP = ({
|
|
|
19097
19103
|
n,
|
|
19098
19104
|
d,
|
|
19099
19105
|
L
|
|
19100
|
-
]),
|
|
19106
|
+
]), x = X(() => $P(
|
|
19101
19107
|
+t.chainId,
|
|
19102
19108
|
v || "0",
|
|
19103
19109
|
n
|
|
19104
|
-
), [v, t == null ? void 0 : t.chainId, n]),
|
|
19110
|
+
), [v, t == null ? void 0 : t.chainId, n]), A = re(() => PP(
|
|
19105
19111
|
+t.chainId,
|
|
19106
19112
|
d,
|
|
19107
19113
|
n
|
|
19108
|
-
), [t == null ? void 0 : t.chainId, d, n]),
|
|
19114
|
+
), [t == null ? void 0 : t.chainId, d, n]), R = CP({
|
|
19109
19115
|
isNetworkMismatch: I,
|
|
19110
19116
|
depositAmount: d,
|
|
19111
19117
|
approved: g,
|
|
19112
19118
|
currentTokenBalance: v,
|
|
19113
19119
|
selectedToken: n,
|
|
19114
|
-
showLayerZeroTip:
|
|
19120
|
+
showLayerZeroTip: S,
|
|
19115
19121
|
minDeposit: 10
|
|
19116
|
-
}),
|
|
19117
|
-
const j = k.target.value, U =
|
|
19122
|
+
}), y = (k) => {
|
|
19123
|
+
const j = k.target.value, U = x(), z = Rc(j, U);
|
|
19118
19124
|
if (z.isValid)
|
|
19119
19125
|
p(z.formattedValue), z.errorType;
|
|
19120
19126
|
else
|
|
19121
19127
|
return z.errorType === "exceed_balance", void 0;
|
|
19122
|
-
},
|
|
19123
|
-
i && i(f);
|
|
19124
|
-
}, [i, f]), N = X(async () => {
|
|
19128
|
+
}, N = X(async () => {
|
|
19125
19129
|
Qa(!0);
|
|
19126
19130
|
try {
|
|
19127
19131
|
c && c({
|
|
@@ -19150,7 +19154,7 @@ const kP = ({
|
|
|
19150
19154
|
type: "text",
|
|
19151
19155
|
placeholder: a("deposit.amount"),
|
|
19152
19156
|
value: d,
|
|
19153
|
-
onChange:
|
|
19157
|
+
onChange: y,
|
|
19154
19158
|
className: "flex-1 bg-transparent text-text-primary text-sm font-medium placeholder-text-tertiary placeholder:font-normal focus:outline-none border-none p-0 h-full"
|
|
19155
19159
|
}
|
|
19156
19160
|
),
|
|
@@ -19158,7 +19162,7 @@ const kP = ({
|
|
|
19158
19162
|
"button",
|
|
19159
19163
|
{
|
|
19160
19164
|
onClick: () => {
|
|
19161
|
-
const k =
|
|
19165
|
+
const k = x();
|
|
19162
19166
|
p(k);
|
|
19163
19167
|
},
|
|
19164
19168
|
className: "text-theme-normal text-xs font-medium cursor-pointer hover:opacity-80 transition-opacity h-full flex items-center",
|
|
@@ -19197,20 +19201,20 @@ const kP = ({
|
|
|
19197
19201
|
}
|
|
19198
19202
|
)
|
|
19199
19203
|
] }),
|
|
19200
|
-
|
|
19204
|
+
S && /* @__PURE__ */ B.jsxs(B.Fragment, { children: [
|
|
19201
19205
|
/* @__PURE__ */ B.jsxs("div", { className: "flex mb-4", children: [
|
|
19202
19206
|
/* @__PURE__ */ B.jsx("div", { className: "w-5", children: /* @__PURE__ */ B.jsx("img", { src: rs, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19203
|
-
/* @__PURE__ */ B.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: a(
|
|
19207
|
+
/* @__PURE__ */ B.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: a(E || "deposit.layerZeroDepositTip") })
|
|
19204
19208
|
] }),
|
|
19205
19209
|
/* @__PURE__ */ B.jsx("div", { className: "my-2 ml-5 h-[1px] border-b border-dashed border-line-divider-secondary" })
|
|
19206
19210
|
] }),
|
|
19207
|
-
|
|
19211
|
+
A && /* @__PURE__ */ B.jsxs("div", { className: "flex mb-4", children: [
|
|
19208
19212
|
/* @__PURE__ */ B.jsx("div", { className: "w-5", children: /* @__PURE__ */ B.jsx("img", { src: rs, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19209
19213
|
/* @__PURE__ */ B.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: a("deposit.depositTipFor25w") })
|
|
19210
19214
|
] }),
|
|
19211
|
-
|
|
19215
|
+
A && /* @__PURE__ */ B.jsx("div", { className: "my-2 ml-5 h-[1px] border-b border-dashed border-line-divider-secondary" }),
|
|
19212
19216
|
/* @__PURE__ */ B.jsxs("div", { className: "flex mb-4", children: [
|
|
19213
|
-
/* @__PURE__ */ B.jsx("div", { className: "w-5", children: !(
|
|
19217
|
+
/* @__PURE__ */ B.jsx("div", { className: "w-5", children: !(A || S) && /* @__PURE__ */ B.jsx("img", { src: rs, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19214
19218
|
/* @__PURE__ */ B.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: a("deposit.noPrivateKeyWalletWarning") })
|
|
19215
19219
|
] }),
|
|
19216
19220
|
/* @__PURE__ */ B.jsxs("div", { className: "border-t border-line-divider-secondary border-dashed py-4", children: [
|
|
@@ -19249,12 +19253,12 @@ const kP = ({
|
|
|
19249
19253
|
/* @__PURE__ */ B.jsxs(
|
|
19250
19254
|
"button",
|
|
19251
19255
|
{
|
|
19252
|
-
className: `w-full h-[38px] text-sm rounded-xl font-medium transition-colors flex items-center justify-center gap-2 ${
|
|
19253
|
-
onClick:
|
|
19254
|
-
disabled:
|
|
19256
|
+
className: `w-full h-[38px] text-sm rounded-xl font-medium transition-colors flex items-center justify-center gap-2 ${R.disabled || o ? "bg-text-disabled text-text-secondary cursor-not-allowed" : "bg-fill-btn-primary text-text-on-sec-btn"}`,
|
|
19257
|
+
onClick: R.isNetworkSwitch ? O : N,
|
|
19258
|
+
disabled: R.disabled || o,
|
|
19255
19259
|
children: [
|
|
19256
|
-
o && /* @__PURE__ */ B.jsx(Xa, { size: "xs" }),
|
|
19257
|
-
|
|
19260
|
+
(o || R.isNetworkSwitch) && /* @__PURE__ */ B.jsx(Xa, { size: "xs" }),
|
|
19261
|
+
R.text
|
|
19258
19262
|
]
|
|
19259
19263
|
}
|
|
19260
19264
|
)
|
|
@@ -19964,4 +19968,4 @@ export {
|
|
|
19964
19968
|
zP as y,
|
|
19965
19969
|
HP as z
|
|
19966
19970
|
};
|
|
19967
|
-
//# sourceMappingURL=index-
|
|
19971
|
+
//# sourceMappingURL=index-DpU91i2T.mjs.map
|