@cfxjs/sirius-next-common 0.2.9 → 0.2.11
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/_esm-TZ4WSCGM.js +4035 -0
- package/dist/_esm-TZ4WSCGM.js.map +1 -0
- package/dist/abis/CommonError.d.ts +10 -0
- package/dist/abis/CommonError.js +8 -0
- package/dist/abis/CommonError.js.map +1 -0
- package/dist/abis/CommonPanic.d.ts +10 -0
- package/dist/abis/CommonPanic.js +8 -0
- package/dist/abis/CommonPanic.js.map +1 -0
- package/dist/ccip-DBSI27GO.js +15 -0
- package/dist/ccip-DBSI27GO.js.map +1 -0
- package/dist/chunk-3PXUIH3S.js +17 -0
- package/dist/chunk-3PXUIH3S.js.map +1 -0
- package/dist/chunk-4B6ASBYQ.js +408 -0
- package/dist/chunk-4B6ASBYQ.js.map +1 -0
- package/dist/{chunk-Z6EYKGBH.js → chunk-5EDEEGZK.js} +42 -66
- package/dist/chunk-5EDEEGZK.js.map +1 -0
- package/dist/chunk-5TGK2EA2.js +18 -0
- package/dist/chunk-5TGK2EA2.js.map +1 -0
- package/dist/chunk-5Y7I6VYA.js +145 -0
- package/dist/chunk-5Y7I6VYA.js.map +1 -0
- package/dist/chunk-6H5A42YS.js +23 -0
- package/dist/chunk-6H5A42YS.js.map +1 -0
- package/dist/chunk-6SXAFSBF.js +1032 -0
- package/dist/chunk-6SXAFSBF.js.map +1 -0
- package/dist/chunk-735VMABS.js +82 -0
- package/dist/chunk-735VMABS.js.map +1 -0
- package/dist/chunk-7CBOXGGA.js +78 -0
- package/dist/chunk-7CBOXGGA.js.map +1 -0
- package/dist/chunk-ADNS57X5.js +18 -0
- package/dist/chunk-ADNS57X5.js.map +1 -0
- package/dist/{chunk-CY4XPEK5.js → chunk-ADULNBMD.js} +5 -5
- package/dist/chunk-AKMGJWIM.js +79 -0
- package/dist/chunk-AKMGJWIM.js.map +1 -0
- package/dist/{chunk-EYT54RGS.js → chunk-BUSBM33B.js} +4 -4
- package/dist/chunk-CKVDFS45.js +56 -0
- package/dist/chunk-CKVDFS45.js.map +1 -0
- package/dist/{chunk-KKR2JERD.js → chunk-CNF26YY7.js} +3 -3
- package/dist/{chunk-H7V2CGOB.js → chunk-CPPQCJEV.js} +3 -3
- package/dist/chunk-CPR4QZT6.js +21 -0
- package/dist/chunk-CPR4QZT6.js.map +1 -0
- package/dist/chunk-CPSXYQJ7.js +13 -0
- package/dist/chunk-CPSXYQJ7.js.map +1 -0
- package/dist/{chunk-JXKHN73X.js → chunk-DF3PVTB5.js} +2 -2
- package/dist/chunk-E3ZD2GGG.js +17 -0
- package/dist/chunk-E3ZD2GGG.js.map +1 -0
- package/dist/chunk-EERNUGUK.js +198 -0
- package/dist/chunk-EERNUGUK.js.map +1 -0
- package/dist/{chunk-BVED57CI.js → chunk-EMPFZFBS.js} +6 -19
- package/dist/chunk-EMPFZFBS.js.map +1 -0
- package/dist/chunk-FYLAXC3R.js +82 -0
- package/dist/chunk-FYLAXC3R.js.map +1 -0
- package/dist/{chunk-52R454XN.js → chunk-GKZK26DZ.js} +3 -3
- package/dist/{chunk-OQCPL2OI.js → chunk-GSWIFV2B.js} +2 -2
- package/dist/chunk-JFFTHCNE.js +344 -0
- package/dist/chunk-JFFTHCNE.js.map +1 -0
- package/dist/chunk-JIRLY7OG.js +4357 -0
- package/dist/chunk-JIRLY7OG.js.map +1 -0
- package/dist/chunk-K6FHTS3F.js +115 -0
- package/dist/chunk-K6FHTS3F.js.map +1 -0
- package/dist/chunk-L62OTV7F.js +71 -0
- package/dist/chunk-L62OTV7F.js.map +1 -0
- package/dist/{chunk-WOX3LUVT.js → chunk-LVFMTP5H.js} +2 -2
- package/dist/chunk-NWVSTRCG.js +20 -0
- package/dist/chunk-NWVSTRCG.js.map +1 -0
- package/dist/chunk-NXCZ5PMI.js +64 -0
- package/dist/chunk-NXCZ5PMI.js.map +1 -0
- package/dist/{chunk-XZQWPTKA.js → chunk-NZY53U2H.js} +9 -13
- package/dist/chunk-NZY53U2H.js.map +1 -0
- package/dist/{chunk-FXGL77DI.js → chunk-OCQIWTDC.js} +2 -2
- package/dist/{chunk-3CHXTO52.js → chunk-ODJ4QBD5.js} +6 -6
- package/dist/chunk-OYESIV3F.js +47 -0
- package/dist/chunk-OYESIV3F.js.map +1 -0
- package/dist/{chunk-W7ZK4OQA.js → chunk-P4EE3QGM.js} +3 -3
- package/dist/{chunk-CKOT4CK7.js → chunk-Q2DX6IDH.js} +2 -2
- package/dist/chunk-SFCNLOQ5.js +37 -0
- package/dist/chunk-SFCNLOQ5.js.map +1 -0
- package/dist/chunk-SUCQASD3.js +84 -0
- package/dist/chunk-SUCQASD3.js.map +1 -0
- package/dist/chunk-U6ZN2ABK.js +184 -0
- package/dist/chunk-U6ZN2ABK.js.map +1 -0
- package/dist/chunk-UM5J477V.js +69 -0
- package/dist/chunk-UM5J477V.js.map +1 -0
- package/dist/{chunk-7RH7LJYB.js → chunk-WIB76E7O.js} +6 -2
- package/dist/{chunk-7RH7LJYB.js.map → chunk-WIB76E7O.js.map} +1 -1
- package/dist/chunk-WQG2LZMB.js +50 -0
- package/dist/chunk-WQG2LZMB.js.map +1 -0
- package/dist/chunk-XZ7IV2FF.js +5947 -0
- package/dist/chunk-XZ7IV2FF.js.map +1 -0
- package/dist/chunk-Y7OVL5US.js +46 -0
- package/dist/chunk-Y7OVL5US.js.map +1 -0
- package/dist/chunk-YBQQ72FQ.js +10 -0
- package/dist/chunk-YBQQ72FQ.js.map +1 -0
- package/dist/chunk-YDA7DDMQ.js +186 -0
- package/dist/chunk-YDA7DDMQ.js.map +1 -0
- package/dist/{chunk-YEUH2K6Z.js → chunk-YEINMVAR.js} +8 -2
- package/dist/chunk-YEINMVAR.js.map +1 -0
- package/dist/chunk-YIZCD4WG.js +107 -0
- package/dist/chunk-YIZCD4WG.js.map +1 -0
- package/dist/components/AceEditor/index.js +9 -143
- package/dist/components/AceEditor/index.js.map +1 -1
- package/dist/components/AddressContainer/CoreAddressContainer.js +14 -12
- package/dist/components/AddressContainer/EVMAddressContainer.js +13 -11
- package/dist/components/AddressContainer/addressSwitcher.js +11 -9
- package/dist/components/AddressContainer/addressView.js +9 -8
- package/dist/components/AddressContainer/label.js +7 -6
- package/dist/components/AddressContainer/utils.d.ts +9 -0
- package/dist/components/AddressContainer/utils.js +30 -0
- package/dist/components/AddressContainer/utils.js.map +1 -0
- package/dist/components/Age/index.js +7 -6
- package/dist/components/Age/index.js.map +1 -1
- package/dist/components/AutoComplete/index.js +6 -5
- package/dist/components/AutoComplete/index.js.map +1 -1
- package/dist/components/Button/ActionButton/index.js +1 -0
- package/dist/components/Button/BaseButton/index.js +1 -0
- package/dist/components/Button/IconButton/index.js +1 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Card/index.js +1 -0
- package/dist/components/Charts/BreadcrumbNav.js +1 -0
- package/dist/components/Charts/ChartOptions.js +1 -0
- package/dist/components/Charts/PreviewChartTemplate.js +3 -2
- package/dist/components/Charts/PreviewChartTemplate.js.map +1 -1
- package/dist/components/Charts/PreviewTitle.js +1 -0
- package/dist/components/Charts/StockChartTemplate.js +10 -9
- package/dist/components/Charts/StockChartTemplate.js.map +1 -1
- package/dist/components/Charts/StockTitle.js +1 -0
- package/dist/components/Charts/config.js +1 -0
- package/dist/components/Charts/constants.js +1 -0
- package/dist/components/Charts/useHighCharts.js +1 -0
- package/dist/components/CookieTip/CookieIcon.js +1 -0
- package/dist/components/CookieTip/index.js +2 -1
- package/dist/components/CookieTip/index.js.map +1 -1
- package/dist/components/CopyButton/index.js +6 -5
- package/dist/components/CopyButton/index.js.map +1 -1
- package/dist/components/DecimalsSelect/index.js +6 -5
- package/dist/components/DecimalsSelect/index.js.map +1 -1
- package/dist/components/DeleteIcon/index.js +2 -0
- package/dist/components/DeleteIcon/index.js.map +1 -1
- package/dist/components/Description/index.js +1 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/DownloadCSV/index.js +7 -6
- package/dist/components/DownloadCSV/index.js.map +1 -1
- package/dist/components/Dropdown/index.js +1 -0
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Empty/index.js +4 -40
- package/dist/components/Empty/index.js.map +1 -1
- package/dist/components/FileUpload/index.js +2 -0
- package/dist/components/FileUpload/index.js.map +1 -1
- package/dist/components/Footer/index.js +1 -0
- package/dist/components/Footer/index.js.map +1 -1
- package/dist/components/GasPriceDropdown/index.js +5 -4
- package/dist/components/GasPriceDropdown/index.js.map +1 -1
- package/dist/components/Highlight/index.js +1 -0
- package/dist/components/Highlight/index.js.map +1 -1
- package/dist/components/Icons/index.d.ts +8 -1
- package/dist/components/Icons/index.js +20 -64
- package/dist/components/Icons/index.js.map +1 -1
- package/dist/components/ImageSkeleton/index.js +2 -0
- package/dist/components/ImageSkeleton/index.js.map +1 -1
- package/dist/components/IncreasePercent/Icons.js +1 -0
- package/dist/components/IncreasePercent/index.js +5 -4
- package/dist/components/IncreasePercent/index.js.map +1 -1
- package/dist/components/InfoIconWithTooltip/InfoIcon.js +1 -0
- package/dist/components/InfoIconWithTooltip/index.js +7 -6
- package/dist/components/InputData/AddressLabel.d.ts +8 -0
- package/dist/components/InputData/AddressLabel.js +23 -0
- package/dist/components/InputData/AddressLabel.js.map +1 -0
- package/dist/components/InputData/ContractDetail.d.ts +22 -0
- package/dist/components/InputData/ContractDetail.js +19 -0
- package/dist/components/InputData/ContractDetail.js.map +1 -0
- package/dist/components/InputData/FunctionName.d.ts +10 -0
- package/dist/components/InputData/FunctionName.js +10 -0
- package/dist/components/InputData/FunctionName.js.map +1 -0
- package/dist/components/InputData/GeneralDecode.d.ts +9 -0
- package/dist/components/InputData/GeneralDecode.js +8 -0
- package/dist/components/InputData/GeneralDecode.js.map +1 -0
- package/dist/components/InputData/JsonDecode.d.ts +18 -0
- package/dist/components/InputData/JsonDecode.js +19 -0
- package/dist/components/InputData/JsonDecode.js.map +1 -0
- package/dist/components/InputData/OptimizationDecode.d.ts +23 -0
- package/dist/components/InputData/OptimizationDecode.js +32 -0
- package/dist/components/InputData/OptimizationDecode.js.map +1 -0
- package/dist/components/InputData/Original.d.ts +8 -0
- package/dist/components/InputData/Original.js +8 -0
- package/dist/components/InputData/Original.js.map +1 -0
- package/dist/components/InputData/UTF8.d.ts +8 -0
- package/dist/components/InputData/UTF8.js +14 -0
- package/dist/components/InputData/UTF8.js.map +1 -0
- package/dist/components/InputData/index.d.ts +15 -0
- package/dist/components/InputData/index.js +36 -0
- package/dist/components/InputData/index.js.map +1 -0
- package/dist/components/InputData/utils.d.ts +5 -0
- package/dist/components/InputData/utils.js +8 -0
- package/dist/components/InputData/utils.js.map +1 -0
- package/dist/components/Link/index.js +1 -0
- package/dist/components/List/index.js +1 -0
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Loading/index.js +1 -0
- package/dist/components/Loading/index.js.map +1 -1
- package/dist/components/Loading/loading.js +1 -0
- package/dist/components/Modal/index.js +6 -5
- package/dist/components/NetworkIcon/index.js +5 -4
- package/dist/components/NetworkIcon/index.js.map +1 -1
- package/dist/components/OutputData/ErrorDecode.d.ts +14 -0
- package/dist/components/OutputData/ErrorDecode.js +39 -0
- package/dist/components/OutputData/ErrorDecode.js.map +1 -0
- package/dist/components/OutputData/index.d.ts +21 -0
- package/dist/components/OutputData/index.js +42 -0
- package/dist/components/OutputData/index.js.map +1 -0
- package/dist/components/PageHeader/index.js +2 -0
- package/dist/components/PageHeader/index.js.map +1 -1
- package/dist/components/PhishingAddressContainer/PhishingWarningIcon.js +1 -0
- package/dist/components/PhishingAddressContainer/index.js +7 -6
- package/dist/components/PhishingAddressContainer/index.js.map +1 -1
- package/dist/components/Popover/index.js +6 -5
- package/dist/components/Price/index.js +6 -5
- package/dist/components/Price/index.js.map +1 -1
- package/dist/components/ProxyContractAddress/index.d.ts +24 -0
- package/dist/components/ProxyContractAddress/index.js +120 -0
- package/dist/components/ProxyContractAddress/index.js.map +1 -0
- package/dist/components/Radio/index.js +5 -4
- package/dist/components/Radio/index.js.map +1 -1
- package/dist/components/Remark/index.js +1 -0
- package/dist/components/Remark/index.js.map +1 -1
- package/dist/components/SearchIcon/index.js +2 -0
- package/dist/components/SearchIcon/index.js.map +1 -1
- package/dist/components/SearchInput/index.js +7 -6
- package/dist/components/SearchInput/index.js.map +1 -1
- package/dist/components/Select/index.d.ts +5 -4
- package/dist/components/Select/index.js +10 -105
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/select.js +7 -5
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/SkeletonContainer/index.js +1 -0
- package/dist/components/Spin/index.js +1 -0
- package/dist/components/Switch/index.d.ts +10 -0
- package/dist/components/Switch/index.js +81 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Table/index.d.ts +9 -0
- package/dist/components/Table/index.js +12 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/Text/index.js +7 -6
- package/dist/components/TextLogo/index.js +2 -0
- package/dist/components/TextLogo/index.js.map +1 -1
- package/dist/components/Tooltip/index.js +6 -5
- package/dist/components/TransactionAction/constants.js +1 -0
- package/dist/components/TransactionAction/coreTransactionAction.js +15 -13
- package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
- package/dist/components/TransactionAction/evmTransactionAction.js +14 -12
- package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
- package/dist/components/TransactionTrace/TraceDetail.d.ts +20 -0
- package/dist/components/TransactionTrace/TraceDetail.js +54 -0
- package/dist/components/TransactionTrace/TraceDetail.js.map +1 -0
- package/dist/components/TransactionTrace/TreeTraceTable.d.ts +20 -0
- package/dist/components/TransactionTrace/TreeTraceTable.js +57 -0
- package/dist/components/TransactionTrace/TreeTraceTable.js.map +1 -0
- package/dist/components/TransactionTrace/index.d.ts +9 -0
- package/dist/components/TransactionTrace/index.js +60 -0
- package/dist/components/TransactionTrace/index.js.map +1 -0
- package/dist/secp256k1-WGKMGTUQ.js +2255 -0
- package/dist/secp256k1-WGKMGTUQ.js.map +1 -0
- package/dist/store/index.js +1 -0
- package/dist/uno.css +103 -5
- package/dist/utils/address.js +5 -4
- package/dist/utils/cache.js +2 -1
- package/dist/utils/constants.d.ts +3 -1
- package/dist/utils/constants.js +6 -1
- package/dist/utils/contractManagerTool.js +5 -4
- package/dist/utils/contractManagerTool.js.map +1 -1
- package/dist/utils/cookie.js +1 -0
- package/dist/utils/ga.js +1 -0
- package/dist/utils/hooks/useAddressLabel.d.ts +3 -0
- package/dist/utils/hooks/useAddressLabel.js +14 -0
- package/dist/utils/hooks/useAddressLabel.js.map +1 -0
- package/dist/utils/hooks/useAge.js +2 -1
- package/dist/utils/hooks/useAge.js.map +1 -1
- package/dist/utils/hooks/useAutoSetHolderFilterParams.d.ts +3 -0
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js +72 -0
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js.map +1 -0
- package/dist/utils/hooks/useChartQueryParams.js +2 -0
- package/dist/utils/hooks/useChartQueryParams.js.map +1 -1
- package/dist/utils/hooks/useContractDetail.d.ts +6 -0
- package/dist/utils/hooks/useContractDetail.js +12 -0
- package/dist/utils/hooks/useContractDetail.js.map +1 -0
- package/dist/utils/hooks/useDecodeFunctionData.d.ts +29 -0
- package/dist/utils/hooks/useDecodeFunctionData.js +19 -0
- package/dist/utils/hooks/useDecodeFunctionData.js.map +1 -0
- package/dist/utils/hooks/useDecodeFunctionError.d.ts +17 -0
- package/dist/utils/hooks/useDecodeFunctionError.js +19 -0
- package/dist/utils/hooks/useDecodeFunctionError.js.map +1 -0
- package/dist/utils/hooks/useDecodedDataType.d.ts +18 -0
- package/dist/utils/hooks/useDecodedDataType.js +8 -0
- package/dist/utils/hooks/useDecodedDataType.js.map +1 -0
- package/dist/utils/hooks/useENS.js +6 -5
- package/dist/utils/hooks/useGetTxnStatus.js +2 -0
- package/dist/utils/hooks/useGetTxnStatus.js.map +1 -1
- package/dist/utils/hooks/useMethodAbi.d.ts +8 -0
- package/dist/utils/hooks/useMethodAbi.js +12 -0
- package/dist/utils/hooks/useMethodAbi.js.map +1 -0
- package/dist/utils/hooks/useMultiAceSearch.js +2 -0
- package/dist/utils/hooks/useMultiAceSearch.js.map +1 -1
- package/dist/utils/hooks/useSearchParams.d.ts +5 -0
- package/dist/utils/hooks/useSearchParams.js +8 -0
- package/dist/utils/hooks/useSearchParams.js.map +1 -0
- package/dist/utils/hooks/useTxTrace.d.ts +124 -0
- package/dist/utils/hooks/useTxTrace.js +170 -0
- package/dist/utils/hooks/useTxTrace.js.map +1 -0
- package/dist/utils/index.js +5 -4
- package/dist/utils/media.js +1 -0
- package/dist/utils/pubsub.js +1 -0
- package/dist/utils/request.d.ts +5 -7
- package/dist/utils/request.js +7 -6
- package/dist/utils/request.types.d.ts +18 -3
- package/dist/utils/rpcRequest.js +1 -0
- package/dist/utils/rpcRequest.js.map +1 -1
- package/dist/utils/sdk.d.ts +35 -0
- package/dist/utils/sdk.js +19 -0
- package/dist/utils/sdk.js.map +1 -0
- package/package.json +8 -5
- package/dist/chunk-BVED57CI.js.map +0 -1
- package/dist/chunk-XZQWPTKA.js.map +0 -1
- package/dist/chunk-YEUH2K6Z.js.map +0 -1
- package/dist/chunk-Z6EYKGBH.js.map +0 -1
- /package/dist/{chunk-CY4XPEK5.js.map → chunk-ADULNBMD.js.map} +0 -0
- /package/dist/{chunk-EYT54RGS.js.map → chunk-BUSBM33B.js.map} +0 -0
- /package/dist/{chunk-KKR2JERD.js.map → chunk-CNF26YY7.js.map} +0 -0
- /package/dist/{chunk-H7V2CGOB.js.map → chunk-CPPQCJEV.js.map} +0 -0
- /package/dist/{chunk-JXKHN73X.js.map → chunk-DF3PVTB5.js.map} +0 -0
- /package/dist/{chunk-52R454XN.js.map → chunk-GKZK26DZ.js.map} +0 -0
- /package/dist/{chunk-OQCPL2OI.js.map → chunk-GSWIFV2B.js.map} +0 -0
- /package/dist/{chunk-WOX3LUVT.js.map → chunk-LVFMTP5H.js.map} +0 -0
- /package/dist/{chunk-FXGL77DI.js.map → chunk-OCQIWTDC.js.map} +0 -0
- /package/dist/{chunk-3CHXTO52.js.map → chunk-ODJ4QBD5.js.map} +0 -0
- /package/dist/{chunk-W7ZK4OQA.js.map → chunk-P4EE3QGM.js.map} +0 -0
- /package/dist/{chunk-CKOT4CK7.js.map → chunk-Q2DX6IDH.js.map} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useI18n
|
|
3
|
+
} from "./chunk-DQGLZCIG.js";
|
|
4
|
+
|
|
5
|
+
// src/components/Empty/index.tsx
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import imgTableWhoops from "./table-whoops-UDAVUZCG.png";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var Empty = ({
|
|
11
|
+
show,
|
|
12
|
+
type = "fluid",
|
|
13
|
+
className,
|
|
14
|
+
title,
|
|
15
|
+
noTitle = false,
|
|
16
|
+
description,
|
|
17
|
+
children,
|
|
18
|
+
...others
|
|
19
|
+
}) => {
|
|
20
|
+
const { t } = useTranslation();
|
|
21
|
+
const { translations } = useI18n();
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: clsx(
|
|
26
|
+
"empty",
|
|
27
|
+
"top-0 left-0 right-0 bottom-0 flex-col justify-center items-center min-h-16.4286rem",
|
|
28
|
+
show ? "flex" : "hidden",
|
|
29
|
+
type === "fluid" ? "relative" : "absolute",
|
|
30
|
+
className
|
|
31
|
+
),
|
|
32
|
+
...others,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx("img", { className: "w-6rem h-8.5714rem", src: imgTableWhoops, alt: "no data" }),
|
|
35
|
+
noTitle ? /* @__PURE__ */ jsx("p", { className: "noTitle" }) : /* @__PURE__ */ jsx("p", { className: "text-1.5714rem font-medium text-#000 lh-2rem", children: title || t(translations.general.table.whoops) }),
|
|
36
|
+
/* @__PURE__ */ jsx("h1", { className: "text-1rem font-medium text-#4b4b4b lh-1.2857rem opacity-40", children: description || t(translations.general.table.noData) }),
|
|
37
|
+
children
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
Empty
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=chunk-Y7OVL5US.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Empty/index.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\nimport { useTranslation } from 'react-i18next';\nimport { useI18n } from '../../store';\nimport imgTableWhoops from '../../images/table-whoops.png';\n\ninterface Props {\n show: boolean;\n type?: 'fixed' | 'fluid';\n title?: string | null;\n noTitle?: boolean;\n description?: string | null;\n className?: string;\n children?: React.ReactNode;\n}\n\ntype NativeAttrs = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props>;\nexport type EmptyProps = Props & NativeAttrs;\n\nexport const Empty = ({\n show,\n type = 'fluid',\n className,\n title,\n noTitle = false,\n description,\n children,\n ...others\n}: EmptyProps) => {\n const { t } = useTranslation();\n const { translations } = useI18n();\n return (\n <div\n className={clsx(\n 'empty',\n 'top-0 left-0 right-0 bottom-0 flex-col justify-center items-center min-h-16.4286rem',\n show ? 'flex' : 'hidden',\n type === 'fluid' ? 'relative' : 'absolute',\n className,\n )}\n {...others}\n >\n <img className=\"w-6rem h-8.5714rem\" src={imgTableWhoops} alt=\"no data\" />\n {noTitle ? (\n <p className=\"noTitle\" />\n ) : (\n <p className=\"text-1.5714rem font-medium text-#000 lh-2rem\">\n {title || t(translations.general.table.whoops)}\n </p>\n )}\n <h1 className=\"text-1rem font-medium text-#4b4b4b lh-1.2857rem opacity-40\">\n {description || t(translations.general.table.noData)}\n </h1>\n {children}\n </div>\n );\n};\n"],"mappings":";;;;;AACA,OAAO,UAAU;AACjB,SAAS,sBAAsB;AAE/B,OAAO,oBAAoB;AA4BvB,SAUE,KAVF;AAbG,IAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkB;AAChB,QAAM,EAAE,EAAE,IAAI,eAAe;AAC7B,QAAM,EAAE,aAAa,IAAI,QAAQ;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,OAAO,SAAS;AAAA,QAChB,SAAS,UAAU,aAAa;AAAA,QAChC;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAI,WAAU,sBAAqB,KAAK,gBAAgB,KAAI,WAAU;AAAA,QACtE,UACC,oBAAC,OAAE,WAAU,WAAU,IAEvB,oBAAC,OAAE,WAAU,gDACV,mBAAS,EAAE,aAAa,QAAQ,MAAM,MAAM,GAC/C;AAAA,QAEF,oBAAC,QAAG,WAAU,8DACX,yBAAe,EAAE,aAAa,QAAQ,MAAM,MAAM,GACrD;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/InputData/Original.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var Original = ({ data }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", { className: "m-initial h-13.2857rem overflow-y-auto text-#97a3b4 bg-#fafbfc px-0.7143rem font-[var(--theme-monospace-font)]", children: /* @__PURE__ */ jsx("p", { children: data }) });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
Original
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-YBQQ72FQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/InputData/Original.tsx"],"sourcesContent":["interface Props {\n data: string;\n}\n\nexport const Original = ({ data }: Props) => {\n return (\n <div className=\"m-initial h-13.2857rem overflow-y-auto text-#97a3b4 bg-#fafbfc px-0.7143rem font-[var(--theme-monospace-font)]\">\n <p>{data}</p>\n </div>\n );\n};\n"],"mappings":";AAOM;AAHC,IAAM,WAAW,CAAC,EAAE,KAAK,MAAa;AAC3C,SACE,oBAAC,SAAI,WAAU,kHACb,8BAAC,OAAG,gBAAK,GACX;AAEJ;","names":[]}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useDecodedDataType
|
|
3
|
+
} from "./chunk-UM5J477V.js";
|
|
4
|
+
import {
|
|
5
|
+
useDecodeFunctionData
|
|
6
|
+
} from "./chunk-EERNUGUK.js";
|
|
7
|
+
import {
|
|
8
|
+
Select
|
|
9
|
+
} from "./chunk-YIZCD4WG.js";
|
|
10
|
+
import {
|
|
11
|
+
OutputData
|
|
12
|
+
} from "./chunk-7CBOXGGA.js";
|
|
13
|
+
import {
|
|
14
|
+
InputData
|
|
15
|
+
} from "./chunk-NXCZ5PMI.js";
|
|
16
|
+
import {
|
|
17
|
+
Card
|
|
18
|
+
} from "./chunk-O6NJ56NA.js";
|
|
19
|
+
import {
|
|
20
|
+
getTranslations
|
|
21
|
+
} from "./chunk-DQGLZCIG.js";
|
|
22
|
+
|
|
23
|
+
// src/components/TransactionTrace/TraceDetail.tsx
|
|
24
|
+
import { useTranslation } from "react-i18next";
|
|
25
|
+
import clsx from "clsx";
|
|
26
|
+
import { useState } from "react";
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
var CommonTraceDetail = ({
|
|
29
|
+
to,
|
|
30
|
+
input = "0x",
|
|
31
|
+
output,
|
|
32
|
+
outcome = "success",
|
|
33
|
+
abi,
|
|
34
|
+
isContractCreated,
|
|
35
|
+
space,
|
|
36
|
+
proxy
|
|
37
|
+
}) => {
|
|
38
|
+
const success = outcome === "success";
|
|
39
|
+
const { t } = useTranslation();
|
|
40
|
+
const translations = getTranslations();
|
|
41
|
+
const [decodedData] = useDecodeFunctionData({
|
|
42
|
+
to,
|
|
43
|
+
input,
|
|
44
|
+
output,
|
|
45
|
+
success,
|
|
46
|
+
space,
|
|
47
|
+
abi,
|
|
48
|
+
withOutput: true
|
|
49
|
+
});
|
|
50
|
+
const { dataType, setDataType, dataTypeList } = useDecodedDataType({
|
|
51
|
+
to,
|
|
52
|
+
input,
|
|
53
|
+
isContractCreated,
|
|
54
|
+
decodedData
|
|
55
|
+
});
|
|
56
|
+
let outputDataType = dataType;
|
|
57
|
+
if ((outputDataType === "optimizationDecode" || outputDataType === "generalDecode") && outcome === "fail") {
|
|
58
|
+
outputDataType = "utf8";
|
|
59
|
+
}
|
|
60
|
+
return /* @__PURE__ */ jsxs(Card, { className: "!border-1 !border-#E8E9EA py-10px", children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-5px", children: [
|
|
62
|
+
/* @__PURE__ */ jsx("div", { className: "w-150px shrink-0" }),
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
Select,
|
|
65
|
+
{
|
|
66
|
+
value: dataType,
|
|
67
|
+
onChange: setDataType,
|
|
68
|
+
disableMatchWidth: true,
|
|
69
|
+
size: "medium",
|
|
70
|
+
className: "mb-16px mt-0 bg-#fff border border-solid border-#ccc",
|
|
71
|
+
disabled: dataTypeList.length === 1,
|
|
72
|
+
width: 180,
|
|
73
|
+
children: dataTypeList.map((dataTypeItem) => {
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
Select.Option,
|
|
76
|
+
{
|
|
77
|
+
className: "data-[highlighted]:bg-[var(--theme-color-green2)] data-[highlighted]:text-#fff",
|
|
78
|
+
value: dataTypeItem,
|
|
79
|
+
children: t(translations.transaction.select[dataTypeItem])
|
|
80
|
+
},
|
|
81
|
+
dataTypeItem
|
|
82
|
+
);
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-5px", children: [
|
|
88
|
+
dataType !== "optimizationDecode" && /* @__PURE__ */ jsx("div", { className: "w-150px shrink-0", children: dataType === "json" ? "In and Out Data" : "Input Data" }),
|
|
89
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
90
|
+
InputData,
|
|
91
|
+
{
|
|
92
|
+
dataType,
|
|
93
|
+
input,
|
|
94
|
+
decodedData,
|
|
95
|
+
space,
|
|
96
|
+
labelClassName: "text-#002257 w-150px"
|
|
97
|
+
}
|
|
98
|
+
) })
|
|
99
|
+
] }),
|
|
100
|
+
dataType !== "json" && /* @__PURE__ */ jsxs("div", { className: "flex gap-5px mt-16px", children: [
|
|
101
|
+
outputDataType !== "optimizationDecode" && /* @__PURE__ */ jsx("div", { className: clsx("w-150px shrink-0", !success && "text-red"), children: outcome === "success" ? "Output Data" : outcome === "fail" ? "Failed" : "Error" }),
|
|
102
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
103
|
+
OutputData,
|
|
104
|
+
{
|
|
105
|
+
dataType: outputDataType,
|
|
106
|
+
output,
|
|
107
|
+
decodedData,
|
|
108
|
+
space,
|
|
109
|
+
proxy,
|
|
110
|
+
success,
|
|
111
|
+
to,
|
|
112
|
+
labelClassName: clsx(
|
|
113
|
+
"w-150px",
|
|
114
|
+
!success ? "text-red" : "text-#002257"
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
) })
|
|
118
|
+
] })
|
|
119
|
+
] });
|
|
120
|
+
};
|
|
121
|
+
var CreateContractFailedTraceDetail = ({
|
|
122
|
+
to,
|
|
123
|
+
output,
|
|
124
|
+
space,
|
|
125
|
+
proxy,
|
|
126
|
+
outcome
|
|
127
|
+
}) => {
|
|
128
|
+
const [dataType, setDataType] = useState("utf8");
|
|
129
|
+
const { t } = useTranslation();
|
|
130
|
+
const translations = getTranslations();
|
|
131
|
+
const dataTypeList = ["original", "utf8"];
|
|
132
|
+
return /* @__PURE__ */ jsxs(Card, { className: "!border-1 !border-#E8E9EA py-10px", children: [
|
|
133
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-5px", children: [
|
|
134
|
+
/* @__PURE__ */ jsx("div", { className: "w-150px shrink-0" }),
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
Select,
|
|
137
|
+
{
|
|
138
|
+
value: dataType,
|
|
139
|
+
onChange: setDataType,
|
|
140
|
+
disableMatchWidth: true,
|
|
141
|
+
size: "medium",
|
|
142
|
+
className: "mb-16px mt-0 bg-#fff border border-solid border-#ccc",
|
|
143
|
+
disabled: dataTypeList.length === 1,
|
|
144
|
+
width: 180,
|
|
145
|
+
children: dataTypeList.map((dataTypeItem) => {
|
|
146
|
+
return /* @__PURE__ */ jsx(
|
|
147
|
+
Select.Option,
|
|
148
|
+
{
|
|
149
|
+
className: "data-[highlighted]:bg-[var(--theme-color-green2)] data-[highlighted]:text-#fff",
|
|
150
|
+
value: dataTypeItem,
|
|
151
|
+
children: t(translations.transaction.select[dataTypeItem])
|
|
152
|
+
},
|
|
153
|
+
dataTypeItem
|
|
154
|
+
);
|
|
155
|
+
})
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
] }),
|
|
159
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-5px mt-16px", children: [
|
|
160
|
+
/* @__PURE__ */ jsx("div", { className: clsx("w-150px shrink-0 text-red"), children: outcome === "fail" ? "Failed" : "Error" }),
|
|
161
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
162
|
+
OutputData,
|
|
163
|
+
{
|
|
164
|
+
dataType,
|
|
165
|
+
output,
|
|
166
|
+
space,
|
|
167
|
+
proxy,
|
|
168
|
+
success: false,
|
|
169
|
+
to,
|
|
170
|
+
labelClassName: "w-150px text-red"
|
|
171
|
+
}
|
|
172
|
+
) })
|
|
173
|
+
] })
|
|
174
|
+
] });
|
|
175
|
+
};
|
|
176
|
+
var TraceDetail = (props) => {
|
|
177
|
+
const { outcome = "success", isContractCreated } = props;
|
|
178
|
+
if (isContractCreated && outcome !== "success")
|
|
179
|
+
return /* @__PURE__ */ jsx(CreateContractFailedTraceDetail, { ...props });
|
|
180
|
+
return /* @__PURE__ */ jsx(CommonTraceDetail, { ...props });
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export {
|
|
184
|
+
TraceDetail
|
|
185
|
+
};
|
|
186
|
+
//# sourceMappingURL=chunk-YDA7DDMQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TransactionTrace/TraceDetail.tsx"],"sourcesContent":["import { Card } from '../Card';\nimport { Select } from '../Select';\nimport { useTranslation } from 'react-i18next';\nimport { getTranslations } from 'src/store';\nimport clsx from 'clsx';\nimport { useDecodeFunctionData } from 'src/utils/hooks/useDecodeFunctionData';\nimport {\n DataType,\n useDecodedDataType,\n} from 'src/utils/hooks/useDecodedDataType';\nimport { InputData } from '../InputData';\nimport { OutputData } from '../OutputData';\nimport { AbiFunctionWithoutGas } from 'src/utils/sdk';\nimport { useState } from 'react';\n\ninterface Props {\n to?: string;\n isContractCreated?: boolean;\n input?: `0x${string}`;\n output?: `0x${string}`;\n abi?: AbiFunctionWithoutGas[];\n outcome?: 'success' | 'fail' | 'reverted';\n space: 'evm' | 'core';\n proxy?: {\n beaconAddress?: string;\n implAddress: string;\n };\n}\n\nconst CommonTraceDetail = ({\n to,\n input = '0x',\n output,\n outcome = 'success',\n abi,\n isContractCreated,\n space,\n proxy,\n}: Props) => {\n const success = outcome === 'success';\n const { t } = useTranslation();\n const translations = getTranslations();\n const [decodedData] = useDecodeFunctionData({\n to,\n input,\n output,\n success,\n space,\n abi,\n withOutput: true,\n });\n const { dataType, setDataType, dataTypeList } = useDecodedDataType({\n to,\n input,\n isContractCreated,\n decodedData,\n });\n let outputDataType = dataType;\n // when the transaction failed, the output is the error message, use utf8 as decode type\n if (\n (outputDataType === 'optimizationDecode' ||\n outputDataType === 'generalDecode') &&\n outcome === 'fail'\n ) {\n outputDataType = 'utf8';\n }\n\n return (\n <Card className=\"!border-1 !border-#E8E9EA py-10px\">\n <div className=\"flex gap-5px\">\n <div className=\"w-150px shrink-0\"></div>\n <Select\n value={dataType}\n onChange={setDataType}\n disableMatchWidth\n size=\"medium\"\n className=\"mb-16px mt-0 bg-#fff border border-solid border-#ccc\"\n disabled={dataTypeList.length === 1}\n width={180}\n >\n {dataTypeList.map(dataTypeItem => {\n return (\n <Select.Option\n className=\"data-[highlighted]:bg-[var(--theme-color-green2)] data-[highlighted]:text-#fff\"\n key={dataTypeItem}\n value={dataTypeItem}\n >\n {t(translations.transaction.select[dataTypeItem])}\n </Select.Option>\n );\n })}\n </Select>\n </div>\n <div className=\"flex gap-5px\">\n {dataType !== 'optimizationDecode' && (\n <div className=\"w-150px shrink-0\">\n {dataType === 'json' ? 'In and Out Data' : 'Input Data'}\n </div>\n )}\n <div className=\"flex-1\">\n <InputData\n dataType={dataType}\n input={input}\n decodedData={decodedData}\n space={space}\n labelClassName=\"text-#002257 w-150px\"\n />\n </div>\n </div>\n {dataType !== 'json' && (\n <div className=\"flex gap-5px mt-16px\">\n {outputDataType !== 'optimizationDecode' && (\n <div className={clsx('w-150px shrink-0', !success && 'text-red')}>\n {outcome === 'success'\n ? 'Output Data'\n : outcome === 'fail'\n ? 'Failed'\n : 'Error'}\n </div>\n )}\n <div className=\"flex-1\">\n <OutputData\n dataType={outputDataType}\n output={output}\n decodedData={decodedData}\n space={space}\n proxy={proxy}\n success={success}\n to={to}\n labelClassName={clsx(\n 'w-150px',\n !success ? 'text-red' : 'text-#002257',\n )}\n />\n </div>\n </div>\n )}\n </Card>\n );\n};\n\n// create contract failed may return error data, but it's not standard, so we only show error info for it\nconst CreateContractFailedTraceDetail = ({\n to,\n output,\n space,\n proxy,\n outcome,\n}: Props) => {\n const [dataType, setDataType] = useState<DataType>('utf8');\n const { t } = useTranslation();\n const translations = getTranslations();\n const dataTypeList = ['original', 'utf8'] as DataType[];\n\n return (\n <Card className=\"!border-1 !border-#E8E9EA py-10px\">\n <div className=\"flex gap-5px\">\n <div className=\"w-150px shrink-0\"></div>\n <Select\n value={dataType}\n onChange={setDataType}\n disableMatchWidth\n size=\"medium\"\n className=\"mb-16px mt-0 bg-#fff border border-solid border-#ccc\"\n disabled={dataTypeList.length === 1}\n width={180}\n >\n {dataTypeList.map(dataTypeItem => {\n return (\n <Select.Option\n className=\"data-[highlighted]:bg-[var(--theme-color-green2)] data-[highlighted]:text-#fff\"\n key={dataTypeItem}\n value={dataTypeItem}\n >\n {t(translations.transaction.select[dataTypeItem])}\n </Select.Option>\n );\n })}\n </Select>\n </div>\n <div className=\"flex gap-5px mt-16px\">\n <div className={clsx('w-150px shrink-0 text-red')}>\n {outcome === 'fail' ? 'Failed' : 'Error'}\n </div>\n <div className=\"flex-1\">\n <OutputData\n dataType={dataType}\n output={output}\n space={space}\n proxy={proxy}\n success={false}\n to={to}\n labelClassName=\"w-150px text-red\"\n />\n </div>\n </div>\n </Card>\n );\n};\n\nexport const TraceDetail = (props: Props) => {\n const { outcome = 'success', isContractCreated } = props;\n if (isContractCreated && outcome !== 'success')\n return <CreateContractFailedTraceDetail {...props} />;\n return <CommonTraceDetail {...props} />;\n};\n"],"mappings":"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","names":[]}
|
|
@@ -41,11 +41,17 @@ var fetchWithCache = (fetcher, options = {}) => {
|
|
|
41
41
|
return data;
|
|
42
42
|
}
|
|
43
43
|
const res = fetcher(...args);
|
|
44
|
-
|
|
44
|
+
const capturedKey = cacheKey;
|
|
45
|
+
mapStorage.setItem(capturedKey, {
|
|
45
46
|
data: res,
|
|
46
47
|
maxAge,
|
|
47
48
|
createdAt: Date.now()
|
|
48
49
|
});
|
|
50
|
+
if (res instanceof Promise) {
|
|
51
|
+
void res.catch(() => {
|
|
52
|
+
mapStorage.removeItem(capturedKey);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
49
55
|
return res;
|
|
50
56
|
};
|
|
51
57
|
};
|
|
@@ -53,4 +59,4 @@ var fetchWithCache = (fetcher, options = {}) => {
|
|
|
53
59
|
export {
|
|
54
60
|
fetchWithCache
|
|
55
61
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-YEINMVAR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/cache.ts"],"sourcesContent":["interface Cache {\n createdAt: number;\n maxAge?: number;\n data: unknown;\n}\n\nconst cacheMap = new Map<string, Cache>();\n\nconst mapStorage = {\n getItem: (key: string) => {\n const item = cacheMap.get(key);\n if (!item) {\n return {\n cache: false,\n };\n }\n const { data, createdAt, maxAge } = item;\n if (maxAge !== undefined && Date.now() - createdAt > maxAge) {\n cacheMap.delete(key);\n return {\n cache: false,\n };\n }\n return {\n data,\n cache: true,\n };\n },\n setItem: (key: string, value: Cache) => {\n cacheMap.set(key, value);\n },\n removeItem: (key: string) => {\n cacheMap.delete(key);\n },\n};\n\nexport const fetchWithCache = <T extends (...params: any[]) => unknown>(\n fetcher: T,\n options: {\n key?: string;\n generateKey?: (...params: any[]) => string;\n maxAge?: number;\n } = {},\n) => {\n return ((...args: any[]) => {\n const { key, generateKey, maxAge } = options;\n let cacheKey: string | null = null;\n try {\n cacheKey = generateKey\n ? generateKey(...args)\n : key\n ? key + JSON.stringify(args)\n : JSON.stringify(args);\n } catch (_) {\n return fetcher(...args);\n }\n const { cache, data } = mapStorage.getItem(cacheKey);\n if (cache) {\n return data;\n }\n const res = fetcher(...args);\n const capturedKey = cacheKey;\n mapStorage.setItem(capturedKey, {\n data: res as any,\n maxAge,\n createdAt: Date.now(),\n });\n // If the fetcher returns a rejected Promise, evict the cache entry so\n // subsequent callers retry rather than re-receiving the same rejection.\n // The `.catch()` is a side-effect only; `res` is returned unmodified so\n // the caller still receives the rejection normally.\n if (res instanceof Promise) {\n void (res as Promise<unknown>).catch(() => {\n mapStorage.removeItem(capturedKey);\n });\n }\n return res;\n }) as T;\n};\n"],"mappings":";AAMA,IAAM,WAAW,oBAAI,IAAmB;AAExC,IAAM,aAAa;AAAA,EACjB,SAAS,CAAC,QAAgB;AACxB,UAAM,OAAO,SAAS,IAAI,GAAG;AAC7B,QAAI,CAAC,MAAM;AACT,aAAO;AAAA,QACL,OAAO;AAAA,MACT;AAAA,IACF;AACA,UAAM,EAAE,MAAM,WAAW,OAAO,IAAI;AACpC,QAAI,WAAW,UAAa,KAAK,IAAI,IAAI,YAAY,QAAQ;AAC3D,eAAS,OAAO,GAAG;AACnB,aAAO;AAAA,QACL,OAAO;AAAA,MACT;AAAA,IACF;AACA,WAAO;AAAA,MACL;AAAA,MACA,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,SAAS,CAAC,KAAa,UAAiB;AACtC,aAAS,IAAI,KAAK,KAAK;AAAA,EACzB;AAAA,EACA,YAAY,CAAC,QAAgB;AAC3B,aAAS,OAAO,GAAG;AAAA,EACrB;AACF;AAEO,IAAM,iBAAiB,CAC5B,SACA,UAII,CAAC,MACF;AACH,SAAQ,IAAI,SAAgB;AAC1B,UAAM,EAAE,KAAK,aAAa,OAAO,IAAI;AACrC,QAAI,WAA0B;AAC9B,QAAI;AACF,iBAAW,cACP,YAAY,GAAG,IAAI,IACnB,MACE,MAAM,KAAK,UAAU,IAAI,IACzB,KAAK,UAAU,IAAI;AAAA,IAC3B,SAAS,GAAP;AACA,aAAO,QAAQ,GAAG,IAAI;AAAA,IACxB;AACA,UAAM,EAAE,OAAO,KAAK,IAAI,WAAW,QAAQ,QAAQ;AACnD,QAAI,OAAO;AACT,aAAO;AAAA,IACT;AACA,UAAM,MAAM,QAAQ,GAAG,IAAI;AAC3B,UAAM,cAAc;AACpB,eAAW,QAAQ,aAAa;AAAA,MAC9B,MAAM;AAAA,MACN;AAAA,MACA,WAAW,KAAK,IAAI;AAAA,IACtB,CAAC;AAKD,QAAI,eAAe,SAAS;AAC1B,WAAM,IAAyB,MAAM,MAAM;AACzC,mBAAW,WAAW,WAAW;AAAA,MACnC,CAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Select,
|
|
3
|
+
SelectContent,
|
|
4
|
+
SelectGroup,
|
|
5
|
+
SelectItem,
|
|
6
|
+
SelectTrigger,
|
|
7
|
+
SelectValue
|
|
8
|
+
} from "./chunk-EMPFZFBS.js";
|
|
9
|
+
import {
|
|
10
|
+
cn
|
|
11
|
+
} from "./chunk-CPPQCJEV.js";
|
|
12
|
+
|
|
13
|
+
// src/components/Select/index.tsx
|
|
14
|
+
import React, { useMemo, useState, useEffect } from "react";
|
|
15
|
+
import { debounce } from "lodash";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var Select2 = ({
|
|
18
|
+
className = "",
|
|
19
|
+
disableMatchWidth = true,
|
|
20
|
+
size = "medium",
|
|
21
|
+
value,
|
|
22
|
+
onChange,
|
|
23
|
+
width = "auto",
|
|
24
|
+
children,
|
|
25
|
+
lable = "",
|
|
26
|
+
...props
|
|
27
|
+
}) => {
|
|
28
|
+
const [open, setOpen] = useState(false);
|
|
29
|
+
const selectedText = useMemo(() => {
|
|
30
|
+
let text = "Select an option...";
|
|
31
|
+
React.Children.forEach(children, (child) => {
|
|
32
|
+
if (React.isValidElement(child) && child.props.value === value) {
|
|
33
|
+
text = child.props.children;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return text;
|
|
37
|
+
}, [value, children]);
|
|
38
|
+
const handleValueChange = debounce((value2) => {
|
|
39
|
+
onChange(value2);
|
|
40
|
+
}, 300);
|
|
41
|
+
const wheel = () => {
|
|
42
|
+
setOpen(false);
|
|
43
|
+
};
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (open) {
|
|
46
|
+
document.body.removeAttribute("data-scroll-locked");
|
|
47
|
+
window.addEventListener("wheel", wheel, { passive: false });
|
|
48
|
+
window.addEventListener("touchmove", wheel, { passive: false });
|
|
49
|
+
} else {
|
|
50
|
+
window.removeEventListener("wheel", wheel);
|
|
51
|
+
window.removeEventListener("touchmove", wheel);
|
|
52
|
+
}
|
|
53
|
+
return () => {
|
|
54
|
+
window.removeEventListener("wheel", wheel);
|
|
55
|
+
window.removeEventListener("touchmove", wheel);
|
|
56
|
+
};
|
|
57
|
+
}, [open, setOpen]);
|
|
58
|
+
return /* @__PURE__ */ jsxs(
|
|
59
|
+
Select,
|
|
60
|
+
{
|
|
61
|
+
value,
|
|
62
|
+
onValueChange: handleValueChange,
|
|
63
|
+
open,
|
|
64
|
+
onOpenChange: setOpen,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
SelectTrigger,
|
|
68
|
+
{
|
|
69
|
+
className: cn(
|
|
70
|
+
"bg-blue-04 hover:bg-blue-08",
|
|
71
|
+
size === "small" && "h-8 text-xs",
|
|
72
|
+
size === "medium" && "h-10 text-sm",
|
|
73
|
+
size === "large" && "h-12 text-lg",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
style: { width },
|
|
77
|
+
...props,
|
|
78
|
+
children: lable ? lable : /* @__PURE__ */ jsx(SelectValue, { children: selectedText })
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
SelectContent,
|
|
83
|
+
{
|
|
84
|
+
className: cn(
|
|
85
|
+
"relative z-50 max-h-96 overflow-hidden rounded-md bg-[#FFF] shadow-md",
|
|
86
|
+
!disableMatchWidth && "w-full"
|
|
87
|
+
),
|
|
88
|
+
children: /* @__PURE__ */ jsx(SelectGroup, { children })
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
var Option = ({
|
|
96
|
+
className = "",
|
|
97
|
+
children,
|
|
98
|
+
value,
|
|
99
|
+
...props
|
|
100
|
+
}) => /* @__PURE__ */ jsx(SelectItem, { value, className, ...props, children });
|
|
101
|
+
Option.displayName = "Option";
|
|
102
|
+
Select2.Option = Option;
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
Select2 as Select
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=chunk-YIZCD4WG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Select/index.tsx"],"sourcesContent":["import React, { useMemo, useState, useEffect } from 'react';\nimport {\n Select as RadixUISelect,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n SelectGroup,\n} from './select';\nimport { cn } from '../../utils';\nimport { debounce } from 'lodash';\n\ninterface SelectProps<T extends string = string> {\n className?: string;\n disableMatchWidth?: boolean;\n size?: 'small' | 'medium' | 'large';\n value?: T;\n onChange: (value: T) => void;\n width?: string | number;\n children: React.ReactNode;\n lable?: string;\n disabled?: boolean;\n}\n\ninterface OptionProps {\n className?: string;\n children: React.ReactNode;\n value: string;\n}\nconst Select: {\n <T extends string = string>(props: SelectProps<T>): JSX.Element;\n Option: React.FC<OptionProps>;\n} = ({\n className = '',\n disableMatchWidth = true,\n size = 'medium',\n value,\n onChange,\n width = 'auto',\n children,\n lable = '',\n ...props\n}) => {\n const [open, setOpen] = useState(false);\n\n const selectedText = useMemo(() => {\n let text = 'Select an option...';\n React.Children.forEach(children, child => {\n if (React.isValidElement(child) && child.props.value === value) {\n text = child.props.children;\n }\n });\n return text;\n }, [value, children]);\n\n const handleValueChange = debounce(value => {\n onChange(value);\n }, 300);\n\n const wheel = () => {\n setOpen(false);\n };\n\n useEffect(() => {\n if (open) {\n document.body.removeAttribute('data-scroll-locked');\n window.addEventListener('wheel', wheel, { passive: false });\n window.addEventListener('touchmove', wheel, { passive: false });\n } else {\n window.removeEventListener('wheel', wheel);\n window.removeEventListener('touchmove', wheel);\n }\n\n return () => {\n window.removeEventListener('wheel', wheel);\n window.removeEventListener('touchmove', wheel);\n };\n }, [open, setOpen]);\n\n return (\n <RadixUISelect\n value={value}\n onValueChange={handleValueChange}\n open={open}\n onOpenChange={setOpen}\n >\n <SelectTrigger\n className={cn(\n 'bg-blue-04 hover:bg-blue-08',\n size === 'small' && 'h-8 text-xs',\n size === 'medium' && 'h-10 text-sm',\n size === 'large' && 'h-12 text-lg',\n className,\n )}\n style={{ width }}\n {...props}\n >\n {lable ? lable : <SelectValue>{selectedText}</SelectValue>}\n </SelectTrigger>\n\n <SelectContent\n className={cn(\n 'relative z-50 max-h-96 overflow-hidden rounded-md bg-[#FFF] shadow-md',\n !disableMatchWidth && 'w-full',\n )}\n >\n <SelectGroup>{children}</SelectGroup>\n </SelectContent>\n </RadixUISelect>\n );\n};\n\nconst Option: React.FC<OptionProps> = ({\n className = '',\n children,\n value,\n ...props\n}: OptionProps) => (\n <SelectItem value={value} className={className} {...props}>\n {children}\n </SelectItem>\n);\nOption.displayName = 'Option';\n\nSelect.Option = Option;\n\nexport { Select };\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,SAAS,SAAS,UAAU,iBAAiB;AAUpD,SAAS,gBAAgB;AAsErB,SAiBqB,KAjBrB;AAnDJ,IAAMA,UAGF,CAAC;AAAA,EACH,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AAEtC,QAAM,eAAe,QAAQ,MAAM;AACjC,QAAI,OAAO;AACX,UAAM,SAAS,QAAQ,UAAU,WAAS;AACxC,UAAI,MAAM,eAAe,KAAK,KAAK,MAAM,MAAM,UAAU,OAAO;AAC9D,eAAO,MAAM,MAAM;AAAA,MACrB;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,QAAQ,CAAC;AAEpB,QAAM,oBAAoB,SAAS,CAAAC,WAAS;AAC1C,aAASA,MAAK;AAAA,EAChB,GAAG,GAAG;AAEN,QAAM,QAAQ,MAAM;AAClB,YAAQ,KAAK;AAAA,EACf;AAEA,YAAU,MAAM;AACd,QAAI,MAAM;AACR,eAAS,KAAK,gBAAgB,oBAAoB;AAClD,aAAO,iBAAiB,SAAS,OAAO,EAAE,SAAS,MAAM,CAAC;AAC1D,aAAO,iBAAiB,aAAa,OAAO,EAAE,SAAS,MAAM,CAAC;AAAA,IAChE,OAAO;AACL,aAAO,oBAAoB,SAAS,KAAK;AACzC,aAAO,oBAAoB,aAAa,KAAK;AAAA,IAC/C;AAEA,WAAO,MAAM;AACX,aAAO,oBAAoB,SAAS,KAAK;AACzC,aAAO,oBAAoB,aAAa,KAAK;AAAA,IAC/C;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AAElB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAe;AAAA,MACf;AAAA,MACA,cAAc;AAAA,MAEd;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,SAAS,WAAW;AAAA,cACpB,SAAS,YAAY;AAAA,cACrB,SAAS,WAAW;AAAA,cACpB;AAAA,YACF;AAAA,YACA,OAAO,EAAE,MAAM;AAAA,YACd,GAAG;AAAA,YAEH,kBAAQ,QAAQ,oBAAC,eAAa,wBAAa;AAAA;AAAA,QAC9C;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,CAAC,qBAAqB;AAAA,YACxB;AAAA,YAEA,8BAAC,eAAa,UAAS;AAAA;AAAA,QACzB;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAM,SAAgC,CAAC;AAAA,EACrC,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,oBAAC,cAAW,OAAc,WAAuB,GAAG,OACjD,UACH;AAEF,OAAO,cAAc;AAErBD,QAAO,SAAS;","names":["Select","value"]}
|
|
@@ -1,150 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunk-
|
|
2
|
+
AceEditor
|
|
3
|
+
} from "../../chunk-5Y7I6VYA.js";
|
|
4
|
+
import "../../chunk-DF3PVTB5.js";
|
|
4
5
|
import "../../chunk-BMO4IZHV.js";
|
|
5
6
|
import "../../chunk-LRCAKRPK.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-CPPQCJEV.js";
|
|
8
|
+
import "../../chunk-WIB76E7O.js";
|
|
9
|
+
import "../../chunk-5EDEEGZK.js";
|
|
9
10
|
import "../../chunk-J2I22Q2M.js";
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
} from "../../chunk-DQGLZCIG.js";
|
|
14
|
-
|
|
15
|
-
// src/components/AceEditor/index.tsx
|
|
16
|
-
import AceEditorComponent from "react-ace";
|
|
17
|
-
import {
|
|
18
|
-
forwardRef,
|
|
19
|
-
useEffect,
|
|
20
|
-
useMemo,
|
|
21
|
-
useRef,
|
|
22
|
-
useState
|
|
23
|
-
} from "react";
|
|
24
|
-
import { mergeRefs } from "react-merge-refs";
|
|
25
|
-
import clsx from "clsx";
|
|
26
|
-
import { Minimize, Maximize } from "lucide-react";
|
|
27
|
-
import { useMeasure } from "react-use";
|
|
28
|
-
import { useTranslation } from "react-i18next";
|
|
29
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
30
|
-
var AceEditor = forwardRef(
|
|
31
|
-
({
|
|
32
|
-
onSearchTrigged,
|
|
33
|
-
onReplaceTrigged,
|
|
34
|
-
theme = "tomorrow",
|
|
35
|
-
width = "100%",
|
|
36
|
-
fontSize = "1rem",
|
|
37
|
-
resize = true,
|
|
38
|
-
height: _height,
|
|
39
|
-
commands: _commands,
|
|
40
|
-
title,
|
|
41
|
-
headerClassName,
|
|
42
|
-
supportFullScreen = false,
|
|
43
|
-
maxLines: _maxLines,
|
|
44
|
-
className,
|
|
45
|
-
...props
|
|
46
|
-
}, ref) => {
|
|
47
|
-
const { translations } = useI18n();
|
|
48
|
-
const { t } = useTranslation();
|
|
49
|
-
const showHeader = supportFullScreen || !!title;
|
|
50
|
-
const fullScreenLockRef = useRef(false);
|
|
51
|
-
const [isFullScreen, setIsFullScreen] = useState(false);
|
|
52
|
-
const [height, setHeight] = useState(_height);
|
|
53
|
-
const innerEditorRef = useRef(null);
|
|
54
|
-
const [measureRef, bounds] = useMeasure();
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
if (!resize || !bounds.height)
|
|
57
|
-
return;
|
|
58
|
-
if (!fullScreenLockRef.current) {
|
|
59
|
-
setIsFullScreen(false);
|
|
60
|
-
setHeight(`${bounds.height}px`);
|
|
61
|
-
} else {
|
|
62
|
-
fullScreenLockRef.current = false;
|
|
63
|
-
}
|
|
64
|
-
}, [bounds.height, resize]);
|
|
65
|
-
const commands = useMemo(() => {
|
|
66
|
-
return [
|
|
67
|
-
{
|
|
68
|
-
bindKey: { win: "Ctrl-F", mac: "Command-F" },
|
|
69
|
-
name: "Search",
|
|
70
|
-
exec: (e) => {
|
|
71
|
-
onSearchTrigged?.();
|
|
72
|
-
e.execCommand("find");
|
|
73
|
-
},
|
|
74
|
-
// 在 readonly 模式下也可用
|
|
75
|
-
readOnly: true
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
bindKey: { win: "Ctrl-H", mac: "Command-Option-F" },
|
|
79
|
-
name: "Search+Replace",
|
|
80
|
-
exec: (e) => {
|
|
81
|
-
onReplaceTrigged?.();
|
|
82
|
-
e.execCommand("replace");
|
|
83
|
-
},
|
|
84
|
-
// 在 readonly 模式下也可用
|
|
85
|
-
readOnly: true
|
|
86
|
-
},
|
|
87
|
-
..._commands || []
|
|
88
|
-
];
|
|
89
|
-
}, [_commands, onSearchTrigged, onReplaceTrigged]);
|
|
90
|
-
const maxLines = isFullScreen ? Infinity : _maxLines;
|
|
91
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
92
|
-
showHeader && /* @__PURE__ */ jsxs("div", { className: clsx("flex items-center mb-10px", headerClassName), children: [
|
|
93
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1", children: title }),
|
|
94
|
-
/* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center gap-5px", children: supportFullScreen && /* @__PURE__ */ jsx(
|
|
95
|
-
Tooltip,
|
|
96
|
-
{
|
|
97
|
-
title: t(translations.toolTip.contract.toggleFullscreen),
|
|
98
|
-
children: /* @__PURE__ */ jsx(
|
|
99
|
-
"div",
|
|
100
|
-
{
|
|
101
|
-
className: "bg-#F8F9FB hover:bg-#E9ECEF flex-center w-30px h-30px rounded-4px cursor-pointer",
|
|
102
|
-
onClick: () => {
|
|
103
|
-
if (!isFullScreen) {
|
|
104
|
-
fullScreenLockRef.current = true;
|
|
105
|
-
setHeight(void 0);
|
|
106
|
-
setIsFullScreen(true);
|
|
107
|
-
} else {
|
|
108
|
-
setHeight(_height);
|
|
109
|
-
setIsFullScreen(false);
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
children: isFullScreen ? /* @__PURE__ */ jsx(Minimize, { className: "w-15px h-15px" }) : /* @__PURE__ */ jsx(Maximize, { className: "w-15px h-15px" })
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
) })
|
|
117
|
-
] }),
|
|
118
|
-
/* @__PURE__ */ jsx(
|
|
119
|
-
AceEditorComponent,
|
|
120
|
-
{
|
|
121
|
-
ref: mergeRefs([
|
|
122
|
-
resize ? (editor) => {
|
|
123
|
-
if (editor) {
|
|
124
|
-
measureRef(editor.editor.container);
|
|
125
|
-
}
|
|
126
|
-
} : void 0,
|
|
127
|
-
innerEditorRef,
|
|
128
|
-
ref
|
|
129
|
-
]),
|
|
130
|
-
theme,
|
|
131
|
-
className: clsx(
|
|
132
|
-
"bg-#F8F9FB",
|
|
133
|
-
isFullScreen && "min-h-5rem",
|
|
134
|
-
resize && "resize-y",
|
|
135
|
-
className
|
|
136
|
-
),
|
|
137
|
-
width,
|
|
138
|
-
height,
|
|
139
|
-
fontSize,
|
|
140
|
-
commands,
|
|
141
|
-
maxLines,
|
|
142
|
-
...props
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
] });
|
|
146
|
-
}
|
|
147
|
-
);
|
|
11
|
+
import "../../chunk-YEINMVAR.js";
|
|
12
|
+
import "../../chunk-DQGLZCIG.js";
|
|
13
|
+
import "../../chunk-WQG2LZMB.js";
|
|
148
14
|
export {
|
|
149
15
|
AceEditor
|
|
150
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CoreAddressContainer
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-ODJ4QBD5.js";
|
|
4
|
+
import "../../chunk-BUSBM33B.js";
|
|
5
|
+
import "../../chunk-NZY53U2H.js";
|
|
6
|
+
import "../../chunk-JFFTHCNE.js";
|
|
7
|
+
import "../../chunk-GKZK26DZ.js";
|
|
8
|
+
import "../../chunk-CNF26YY7.js";
|
|
9
|
+
import "../../chunk-P4EE3QGM.js";
|
|
10
10
|
import "../../chunk-TOKKKTFG.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-Q2DX6IDH.js";
|
|
12
|
+
import "../../chunk-DF3PVTB5.js";
|
|
12
13
|
import "../../chunk-BMO4IZHV.js";
|
|
13
14
|
import "../../chunk-LRCAKRPK.js";
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-CPPQCJEV.js";
|
|
16
|
+
import "../../chunk-WIB76E7O.js";
|
|
17
|
+
import "../../chunk-5EDEEGZK.js";
|
|
17
18
|
import "../../chunk-J2I22Q2M.js";
|
|
18
|
-
import "../../chunk-
|
|
19
|
+
import "../../chunk-YEINMVAR.js";
|
|
19
20
|
import "../../chunk-DQGLZCIG.js";
|
|
21
|
+
import "../../chunk-WQG2LZMB.js";
|
|
20
22
|
export {
|
|
21
23
|
CoreAddressContainer
|
|
22
24
|
};
|