0xtrails 0.0.1 → 0.0.2
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/LICENSE +202 -0
- package/README.md +42 -0
- package/dist/abi.d.ts +37 -0
- package/dist/abi.d.ts.map +1 -0
- package/dist/abi.js +36 -0
- package/dist/apiClient.d.ts +9 -0
- package/dist/apiClient.d.ts.map +1 -0
- package/dist/apiClient.js +18 -0
- package/dist/buffer.d.ts +3 -0
- package/dist/buffer.d.ts.map +1 -0
- package/dist/buffer.js +8 -0
- package/dist/cctp.d.ts +84 -0
- package/dist/cctp.d.ts.map +1 -0
- package/dist/cctp.js +401 -0
- package/dist/chainSwitch.d.ts +7 -0
- package/dist/chainSwitch.d.ts.map +1 -0
- package/dist/chainSwitch.js +33 -0
- package/dist/chains.d.ts +13 -0
- package/dist/chains.d.ts.map +1 -0
- package/dist/chains.js +95 -0
- package/dist/constants.d.ts +11 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +16 -0
- package/dist/encoders.d.ts +7 -0
- package/dist/encoders.d.ts.map +1 -0
- package/dist/encoders.js +8 -0
- package/dist/error.d.ts +2 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +12 -0
- package/dist/explorer.d.ts +12 -0
- package/dist/explorer.d.ts.map +1 -0
- package/dist/explorer.js +18 -0
- package/dist/gasless.d.ts +116 -0
- package/dist/gasless.d.ts.map +1 -0
- package/dist/gasless.js +297 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/indexerClient.d.ts +9 -0
- package/dist/indexerClient.d.ts.map +1 -0
- package/dist/indexerClient.js +18 -0
- package/dist/intents.d.ts +83 -0
- package/dist/intents.d.ts.map +1 -0
- package/dist/intents.js +288 -0
- package/dist/metaTxnMonitor.d.ts +14 -0
- package/dist/metaTxnMonitor.d.ts.map +1 -0
- package/dist/metaTxnMonitor.js +121 -0
- package/dist/metaTxns.d.ts +6 -0
- package/dist/metaTxns.d.ts.map +1 -0
- package/dist/metaTxns.js +4 -0
- package/dist/paymasterSend.d.ts +90 -0
- package/dist/paymasterSend.d.ts.map +1 -0
- package/dist/paymasterSend.js +329 -0
- package/dist/preconditions.d.ts +11 -0
- package/dist/preconditions.d.ts.map +1 -0
- package/dist/preconditions.js +29 -0
- package/dist/prepareSend.d.ts +102 -0
- package/dist/prepareSend.d.ts.map +1 -0
- package/dist/prepareSend.js +1080 -0
- package/dist/prices.d.ts +18 -0
- package/dist/prices.d.ts.map +1 -0
- package/dist/prices.js +142 -0
- package/dist/queryParams.d.ts +9 -0
- package/dist/queryParams.d.ts.map +1 -0
- package/dist/queryParams.js +66 -0
- package/dist/relaySdk.d.ts +65 -0
- package/dist/relaySdk.d.ts.map +1 -0
- package/dist/relaySdk.js +314 -0
- package/dist/relayer.d.ts +23 -0
- package/dist/relayer.d.ts.map +1 -0
- package/dist/relayer.js +230 -0
- package/dist/sendUserOp.d.ts +140 -0
- package/dist/sendUserOp.d.ts.map +1 -0
- package/dist/sendUserOp.js +388 -0
- package/dist/sequenceWallet.d.ts +79 -0
- package/dist/sequenceWallet.d.ts.map +1 -0
- package/dist/sequenceWallet.js +374 -0
- package/dist/theme.d.ts +3 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +1 -0
- package/dist/toSimpleSmartAccount.d.ts +95 -0
- package/dist/toSimpleSmartAccount.d.ts.map +1 -0
- package/dist/toSimpleSmartAccount.js +373 -0
- package/dist/tokenBalances.d.ts +118 -0
- package/dist/tokenBalances.d.ts.map +1 -0
- package/dist/tokenBalances.js +492 -0
- package/dist/tokens.d.ts +50 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +356 -0
- package/dist/trails.d.ts +128 -0
- package/dist/trails.d.ts.map +1 -0
- package/dist/trails.js +1031 -0
- package/dist/umd/trails.min.js +12610 -0
- package/dist/umd/trails.min.js.map +1 -0
- package/dist/umd.d.ts +24 -0
- package/dist/umd.d.ts.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +9 -0
- package/dist/widget/ConstantsUtil-B-_-u8aQ.js +6 -0
- package/dist/widget/add-hVLs3ldJ.js +20 -0
- package/dist/widget/all-wallets-Cwxnx4BT.js +11 -0
- package/dist/widget/app-store-CAAVQjW0.js +22 -0
- package/dist/widget/apple-C3BSbglw.js +23 -0
- package/dist/widget/arrow-bottom-circle-BGU9MmsZ.js +16 -0
- package/dist/widget/arrow-bottom-hS_SA8Gp.js +13 -0
- package/dist/widget/arrow-left-CJZanWz7.js +13 -0
- package/dist/widget/arrow-right-C1qL8EMd.js +13 -0
- package/dist/widget/arrow-top-CbuCmbQs.js +13 -0
- package/dist/widget/bank-CXBEEGbb.js +19 -0
- package/dist/widget/bin-Dqzv3zCZ.js +9 -0
- package/dist/widget/bitcoin-4y3sovZp.js +18 -0
- package/dist/widget/browser-DyOl4_8m.js +1413 -0
- package/dist/widget/browser-t7Fh0sEU.js +19 -0
- package/dist/widget/card-Bo4CZkTs.js +19 -0
- package/dist/widget/ccip-BynehMIN.js +232 -0
- package/dist/widget/checkmark-DV6OKvnY.js +16 -0
- package/dist/widget/checkmark-bold-CAp1-IQ2.js +13 -0
- package/dist/widget/chevron-bottom-BjzsVzk9.js +13 -0
- package/dist/widget/chevron-left-CQZBDCiR.js +13 -0
- package/dist/widget/chevron-right-Dhg4zeZM.js +13 -0
- package/dist/widget/chevron-top-CDQmfJef.js +13 -0
- package/dist/widget/chrome-store-BNaC_b6w.js +66 -0
- package/dist/widget/circle-BC_GBj91.js +9 -0
- package/dist/widget/clock-BmF8-4a0.js +13 -0
- package/dist/widget/close-Bf61nZ8o.js +13 -0
- package/dist/widget/coinPlaceholder-7cZW2058.js +13 -0
- package/dist/widget/compass-CFC3yhnW.js +13 -0
- package/dist/widget/components/ChainImage.d.ts +8 -0
- package/dist/widget/components/ChainImage.d.ts.map +1 -0
- package/dist/widget/components/ChainImage.js +6 -0
- package/dist/widget/components/ConnectWallet.d.ts +18 -0
- package/dist/widget/components/ConnectWallet.d.ts.map +1 -0
- package/dist/widget/components/ConnectWallet.js +66 -0
- package/dist/widget/components/DebugScreensDropdown.d.ts +9 -0
- package/dist/widget/components/DebugScreensDropdown.d.ts.map +1 -0
- package/dist/widget/components/DebugScreensDropdown.js +40 -0
- package/dist/widget/components/FeeOptions.d.ts +17 -0
- package/dist/widget/components/FeeOptions.d.ts.map +1 -0
- package/dist/widget/components/FeeOptions.js +65 -0
- package/dist/widget/components/Footer.d.ts +9 -0
- package/dist/widget/components/Footer.d.ts.map +1 -0
- package/dist/widget/components/Footer.js +13 -0
- package/dist/widget/components/GreenCheckAnimation.d.ts +2 -0
- package/dist/widget/components/GreenCheckAnimation.d.ts.map +1 -0
- package/dist/widget/components/GreenCheckAnimation.js +74 -0
- package/dist/widget/components/Modal.d.ts +11 -0
- package/dist/widget/components/Modal.d.ts.map +1 -0
- package/dist/widget/components/Modal.js +36 -0
- package/dist/widget/components/Receipt.d.ts +13 -0
- package/dist/widget/components/Receipt.d.ts.map +1 -0
- package/dist/widget/components/Receipt.js +36 -0
- package/dist/widget/components/SendForm.d.ts +44 -0
- package/dist/widget/components/SendForm.d.ts.map +1 -0
- package/dist/widget/components/SendForm.js +177 -0
- package/dist/widget/components/TokenImage.d.ts +10 -0
- package/dist/widget/components/TokenImage.d.ts.map +1 -0
- package/dist/widget/components/TokenImage.js +8 -0
- package/dist/widget/components/TokenList.d.ts +16 -0
- package/dist/widget/components/TokenList.d.ts.map +1 -0
- package/dist/widget/components/TokenList.js +39 -0
- package/dist/widget/components/TransferPending.d.ts +11 -0
- package/dist/widget/components/TransferPending.d.ts.map +1 -0
- package/dist/widget/components/TransferPending.js +77 -0
- package/dist/widget/components/TransferPendingVertical.d.ts +18 -0
- package/dist/widget/components/TransferPendingVertical.d.ts.map +1 -0
- package/dist/widget/components/TransferPendingVertical.js +183 -0
- package/dist/widget/components/WalletConfirmation.d.ts +18 -0
- package/dist/widget/components/WalletConfirmation.d.ts.map +1 -0
- package/dist/widget/components/WalletConfirmation.js +22 -0
- package/dist/widget/config.d.ts +4 -0
- package/dist/widget/config.d.ts.map +1 -0
- package/dist/widget/config.js +3 -0
- package/dist/widget/copy-e0xXvKN0.js +20 -0
- package/dist/widget/cursor-CqM3v0xJ.js +8 -0
- package/dist/widget/cursor-transparent-CUQpdsCG.js +17 -0
- package/dist/widget/desktop-DUDGIRpM.js +14 -0
- package/dist/widget/disconnect-DUFST9QQ.js +13 -0
- package/dist/widget/discord-C1cj365Z.js +22 -0
- package/dist/widget/email-BHhmb_lX.js +703 -0
- package/dist/widget/embedded-wallet-CuuC4eah.js +467 -0
- package/dist/widget/ethereum-CfmBVfeB.js +15 -0
- package/dist/widget/etherscan-BSiynDhW.js +11 -0
- package/dist/widget/exclamation-triangle-DEiFNpHw.js +9 -0
- package/dist/widget/extension-mRmfCDxo.js +13 -0
- package/dist/widget/external-link-B4xMIVnW.js +13 -0
- package/dist/widget/facebook-CBAZStBR.js +31 -0
- package/dist/widget/farcaster-LHDEDf5S.js +17 -0
- package/dist/widget/filters-CBijuvFv.js +13 -0
- package/dist/widget/github-C3ILD420.js +23 -0
- package/dist/widget/google-CSj73POX.js +23 -0
- package/dist/widget/help-circle-2hdG5IdB.js +17 -0
- package/dist/widget/hooks/useAmountUsd.d.ts +13 -0
- package/dist/widget/hooks/useAmountUsd.d.ts.map +1 -0
- package/dist/widget/hooks/useAmountUsd.js +35 -0
- package/dist/widget/hooks/useSendForm.d.ts +125 -0
- package/dist/widget/hooks/useSendForm.d.ts.map +1 -0
- package/dist/widget/hooks/useSendForm.js +450 -0
- package/dist/widget/hooks/useTokenList.d.ts +52 -0
- package/dist/widget/hooks/useTokenList.d.ts.map +1 -0
- package/dist/widget/hooks/useTokenList.js +252 -0
- package/dist/widget/id-ByYSrwsd.js +17 -0
- package/dist/widget/if-defined-DRXJEhv7.js +752 -0
- package/dist/widget/image-C90L4Rf6.js +9 -0
- package/dist/widget/index-B3SlQ9v3.js +46 -0
- package/dist/widget/index-B8LPuLXQ.js +78 -0
- package/dist/widget/index-BDbworWA.js +171 -0
- package/dist/widget/index-BTlDgFSK.js +98 -0
- package/dist/widget/index-BUCcjXbd.js +306 -0
- package/dist/widget/index-BZ34edi2.js +1055 -0
- package/dist/widget/index-BiCU29wK.js +147 -0
- package/dist/widget/index-BlmqIKsY.js +266 -0
- package/dist/widget/index-BlviH5nG.js +55 -0
- package/dist/widget/index-Bwd5X3fS.js +8306 -0
- package/dist/widget/index-C5gmknHK.js +78 -0
- package/dist/widget/index-CD6dBcRj.js +76 -0
- package/dist/widget/index-CDlhy529.js +63 -0
- package/dist/widget/index-CHXa5ke-.js +59 -0
- package/dist/widget/index-CK94R-H7.js +22498 -0
- package/dist/widget/index-CQzo3m3x.js +182 -0
- package/dist/widget/index-CRT8cAwG.js +325 -0
- package/dist/widget/index-CY7Lt2Yu.js +310 -0
- package/dist/widget/index-CiKfAu1E.js +79 -0
- package/dist/widget/index-CkCu6rMi.js +258 -0
- package/dist/widget/index-CngLTu_R.js +517 -0
- package/dist/widget/index-CsMV8-em.js +2577 -0
- package/dist/widget/index-Cu2Wva8v.js +200 -0
- package/dist/widget/index-DKBxLTEF.js +240 -0
- package/dist/widget/index-DQEVT3dx.js +511 -0
- package/dist/widget/index-DU2HcCis.js +200 -0
- package/dist/widget/index-DutZGWNW.js +321 -0
- package/dist/widget/index-O0glArmc.js +182 -0
- package/dist/widget/index-O8FmRjKe.js +63719 -0
- package/dist/widget/index-RtKXrB6I.js +576 -0
- package/dist/widget/index-TIYtS0gE.js +88 -0
- package/dist/widget/index-dQNJvWHs.js +66 -0
- package/dist/widget/index-wmEwdsq7.js +909 -0
- package/dist/widget/index.d.ts +3 -0
- package/dist/widget/index.d.ts.map +1 -0
- package/dist/widget/index.js +2 -0
- package/dist/widget/info-DMPChDjV.js +8 -0
- package/dist/widget/info-circle-DAvS_7nY.js +17 -0
- package/dist/widget/lightbulb-DnZ9mNEs.js +8 -0
- package/dist/widget/lit-html-BRjl1r6K.js +243 -0
- package/dist/widget/mail-DpaVSOP8.js +13 -0
- package/dist/widget/mobile-CRvdyu7I.js +14 -0
- package/dist/widget/more-C5VqW9PR.js +16 -0
- package/dist/widget/network-placeholder-CZ0vApma.js +19 -0
- package/dist/widget/nftPlaceholder-7jjIK2bT.js +13 -0
- package/dist/widget/off-4mHjJLLX.js +9 -0
- package/dist/widget/onramp-Bc0ozVsw.js +929 -0
- package/dist/widget/play-store-Uocul8nC.js +37 -0
- package/dist/widget/plus-DrYF7siO.js +18 -0
- package/dist/widget/prepareSend-BQJmzM5B.js +54987 -0
- package/dist/widget/qr-code-DcnGMUB3.js +11 -0
- package/dist/widget/receive-fvIVd7R_.js +184 -0
- package/dist/widget/recycle-horizontal-DrDwXC4D.js +14 -0
- package/dist/widget/ref-CXNmEjML.js +41 -0
- package/dist/widget/refresh-OK9lIPLS.js +13 -0
- package/dist/widget/reown-logo-C-Qn7mS3.js +17 -0
- package/dist/widget/search-DZqv1oKg.js +13 -0
- package/dist/widget/send-CJlmI-xe.js +1039 -0
- package/dist/widget/send-otoEC8uU.js +20 -0
- package/dist/widget/socials-BJciurWF.js +599 -0
- package/dist/widget/solana-Bv5Hs_0T.js +18 -0
- package/dist/widget/swapHorizontal-BzOPGV37.js +13 -0
- package/dist/widget/swapHorizontalBold-axyHnSmj.js +13 -0
- package/dist/widget/swapHorizontalMedium-C6YOPfPz.js +21 -0
- package/dist/widget/swapHorizontalRoundedBold-yVcLbWNT.js +13 -0
- package/dist/widget/swapVertical-BDjxt9pE.js +13 -0
- package/dist/widget/swaps-DEWNj4kd.js +1637 -0
- package/dist/widget/telegram-BQJD7dlP.js +21 -0
- package/dist/widget/three-dots-DW9jmSMG.js +10 -0
- package/dist/widget/transactions-uCseGQQt.js +38 -0
- package/dist/widget/twitch-XugxDfOE.js +23 -0
- package/dist/widget/twitterIcon-DQVObQUL.js +11 -0
- package/dist/widget/types.d.ts +51 -0
- package/dist/widget/types.d.ts.map +1 -0
- package/dist/widget/types.js +1 -0
- package/dist/widget/verify-DpMYHxLf.js +13 -0
- package/dist/widget/verify-filled-KpEL6ZJ_.js +13 -0
- package/dist/widget/w3m-modal-C8e-6Kba.js +1047 -0
- package/dist/widget/wallet-D8ssEB0o.js +13 -0
- package/dist/widget/wallet-placeholder-HtAy21Wc.js +19 -0
- package/dist/widget/walletconnect-Bp_4XfrY.js +37 -0
- package/dist/widget/warning-circle-FgYS7P7n.js +17 -0
- package/dist/widget/widget/index.js +7 -0
- package/dist/widget/widget.d.ts +47 -0
- package/dist/widget/widget.d.ts.map +1 -0
- package/dist/widget/widget.js +932 -0
- package/dist/widget/x-DlZBoP9k.js +17 -0
- package/dist/widget/x-mark-Ba9pt-_h.js +8 -0
- package/package.json +102 -8
- package/src/abi.ts +38 -0
- package/src/apiClient.ts +32 -0
- package/src/buffer.ts +10 -0
- package/src/cctp.ts +579 -0
- package/src/chainSwitch.ts +55 -0
- package/src/chains.ts +124 -0
- package/src/constants.ts +26 -0
- package/src/encoders.ts +20 -0
- package/src/error.ts +15 -0
- package/src/explorer.ts +37 -0
- package/src/gasless.ts +545 -0
- package/src/index.ts +48 -0
- package/src/indexerClient.ts +36 -0
- package/src/intents.ts +537 -0
- package/src/metaTxnMonitor.ts +163 -0
- package/src/metaTxns.ts +21 -0
- package/src/paymasterSend.ts +503 -0
- package/src/preconditions.ts +52 -0
- package/src/prepareSend.ts +1849 -0
- package/src/prices.ts +186 -0
- package/src/queryParams.ts +80 -0
- package/src/relaySdk.ts +481 -0
- package/src/relayer.ts +255 -0
- package/src/sendUserOp.ts +570 -0
- package/src/sequenceWallet.ts +579 -0
- package/src/theme.ts +2 -0
- package/src/toSimpleSmartAccount.ts +567 -0
- package/src/tokenBalances.ts +760 -0
- package/src/tokens.ts +471 -0
- package/src/trails.ts +1591 -0
- package/src/types.d.ts +11 -0
- package/src/umd.tsx +49 -0
- package/src/utils.ts +16 -0
- package/src/vite-env.d.ts +4 -0
- package/src/widget/assets/MetaMask-icon-fox-with-margins.svg +31 -0
- package/src/widget/assets/MetaMask-icon-fox.svg +26 -0
- package/src/widget/assets/MetaMask-logo-black.svg +3 -0
- package/src/widget/assets/MetaMask-logo-white.svg +16 -0
- package/src/widget/assets/Privy_Brandmark_Black.svg +9 -0
- package/src/widget/assets/Privy_Brandmark_White.svg +9 -0
- package/src/widget/assets/Trails-logo-black.svg +11 -0
- package/src/widget/assets/Trails-logo-white.svg +11 -0
- package/src/widget/components/ChainImage.tsx +28 -0
- package/src/widget/components/ConnectWallet.tsx +206 -0
- package/src/widget/components/DebugScreensDropdown.tsx +88 -0
- package/src/widget/components/FeeOptions.tsx +199 -0
- package/src/widget/components/Footer.tsx +51 -0
- package/src/widget/components/GreenCheckAnimation.tsx +119 -0
- package/src/widget/components/Modal.tsx +97 -0
- package/src/widget/components/Receipt.tsx +237 -0
- package/src/widget/components/SendForm.tsx +695 -0
- package/src/widget/components/TokenImage.tsx +37 -0
- package/src/widget/components/TokenList.tsx +287 -0
- package/src/widget/components/TransferPending.tsx +204 -0
- package/src/widget/components/TransferPendingVertical.tsx +412 -0
- package/src/widget/components/WalletConfirmation.tsx +172 -0
- package/src/widget/config.ts +5 -0
- package/src/widget/hooks/useAmountUsd.ts +59 -0
- package/src/widget/hooks/useSendForm.ts +715 -0
- package/src/widget/hooks/useTokenList.ts +397 -0
- package/src/widget/index.css +2 -0
- package/src/widget/index.tsx +8 -0
- package/src/widget/types/svg.d.ts +8 -0
- package/src/widget/types.ts +59 -0
- package/src/widget/widget.tsx +1438 -0
- package/index.js +0 -1
|
@@ -0,0 +1,2577 @@
|
|
|
1
|
+
import { M as He, R as A, T as F, a as pe, E as jr, b as D, C as oe, c as h, O as j } from "./index-RtKXrB6I.js";
|
|
2
|
+
import { b as W } from "./lit-html-BRjl1r6K.js";
|
|
3
|
+
import { b as Hr } from "./browser-DyOl4_8m.js";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2019 Google LLC
|
|
7
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const Be = window, Nt = Be.ShadowRoot && (Be.ShadyCSS === void 0 || Be.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ut = Symbol(), qt = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
let wr = class {
|
|
11
|
+
constructor(e, r, i) {
|
|
12
|
+
if (this._$cssResult$ = !0, i !== Ut) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
13
|
+
this.cssText = e, this.t = r;
|
|
14
|
+
}
|
|
15
|
+
get styleSheet() {
|
|
16
|
+
let e = this.o;
|
|
17
|
+
const r = this.t;
|
|
18
|
+
if (Nt && e === void 0) {
|
|
19
|
+
const i = r !== void 0 && r.length === 1;
|
|
20
|
+
i && (e = qt.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && qt.set(r, e));
|
|
21
|
+
}
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
toString() {
|
|
25
|
+
return this.cssText;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const Br = (t) => new wr(typeof t == "string" ? t : t + "", void 0, Ut), _ = (t, ...e) => {
|
|
29
|
+
const r = t.length === 1 ? t[0] : e.reduce((i, o, s) => i + ((l) => {
|
|
30
|
+
if (l._$cssResult$ === !0) return l.cssText;
|
|
31
|
+
if (typeof l == "number") return l;
|
|
32
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + l + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
33
|
+
})(o) + t[s + 1], t[0]);
|
|
34
|
+
return new wr(r, t, Ut);
|
|
35
|
+
}, Zr = (t, e) => {
|
|
36
|
+
Nt ? t.adoptedStyleSheets = e.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet) : e.forEach((r) => {
|
|
37
|
+
const i = document.createElement("style"), o = Be.litNonce;
|
|
38
|
+
o !== void 0 && i.setAttribute("nonce", o), i.textContent = r.cssText, t.appendChild(i);
|
|
39
|
+
});
|
|
40
|
+
}, Kt = Nt ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
|
|
41
|
+
let r = "";
|
|
42
|
+
for (const i of e.cssRules) r += i.cssText;
|
|
43
|
+
return Br(r);
|
|
44
|
+
})(t) : t;
|
|
45
|
+
/**
|
|
46
|
+
* @license
|
|
47
|
+
* Copyright 2017 Google LLC
|
|
48
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
+
*/
|
|
50
|
+
var ot;
|
|
51
|
+
const ze = window, Qt = ze.trustedTypes, zr = Qt ? Qt.emptyScript : "", Gt = ze.reactiveElementPolyfillSupport, ft = { toAttribute(t, e) {
|
|
52
|
+
switch (e) {
|
|
53
|
+
case Boolean:
|
|
54
|
+
t = t ? zr : null;
|
|
55
|
+
break;
|
|
56
|
+
case Object:
|
|
57
|
+
case Array:
|
|
58
|
+
t = t == null ? t : JSON.stringify(t);
|
|
59
|
+
}
|
|
60
|
+
return t;
|
|
61
|
+
}, fromAttribute(t, e) {
|
|
62
|
+
let r = t;
|
|
63
|
+
switch (e) {
|
|
64
|
+
case Boolean:
|
|
65
|
+
r = t !== null;
|
|
66
|
+
break;
|
|
67
|
+
case Number:
|
|
68
|
+
r = t === null ? null : Number(t);
|
|
69
|
+
break;
|
|
70
|
+
case Object:
|
|
71
|
+
case Array:
|
|
72
|
+
try {
|
|
73
|
+
r = JSON.parse(t);
|
|
74
|
+
} catch {
|
|
75
|
+
r = null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return r;
|
|
79
|
+
} }, fr = (t, e) => e !== t && (e == e || t == t), it = { attribute: !0, type: String, converter: ft, reflect: !1, hasChanged: fr }, vt = "finalized";
|
|
80
|
+
let ce = class extends HTMLElement {
|
|
81
|
+
constructor() {
|
|
82
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
83
|
+
}
|
|
84
|
+
static addInitializer(e) {
|
|
85
|
+
var r;
|
|
86
|
+
this.finalize(), ((r = this.h) !== null && r !== void 0 ? r : this.h = []).push(e);
|
|
87
|
+
}
|
|
88
|
+
static get observedAttributes() {
|
|
89
|
+
this.finalize();
|
|
90
|
+
const e = [];
|
|
91
|
+
return this.elementProperties.forEach((r, i) => {
|
|
92
|
+
const o = this._$Ep(i, r);
|
|
93
|
+
o !== void 0 && (this._$Ev.set(o, i), e.push(o));
|
|
94
|
+
}), e;
|
|
95
|
+
}
|
|
96
|
+
static createProperty(e, r = it) {
|
|
97
|
+
if (r.state && (r.attribute = !1), this.finalize(), this.elementProperties.set(e, r), !r.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
|
98
|
+
const i = typeof e == "symbol" ? Symbol() : "__" + e, o = this.getPropertyDescriptor(e, i, r);
|
|
99
|
+
o !== void 0 && Object.defineProperty(this.prototype, e, o);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
static getPropertyDescriptor(e, r, i) {
|
|
103
|
+
return { get() {
|
|
104
|
+
return this[r];
|
|
105
|
+
}, set(o) {
|
|
106
|
+
const s = this[e];
|
|
107
|
+
this[r] = o, this.requestUpdate(e, s, i);
|
|
108
|
+
}, configurable: !0, enumerable: !0 };
|
|
109
|
+
}
|
|
110
|
+
static getPropertyOptions(e) {
|
|
111
|
+
return this.elementProperties.get(e) || it;
|
|
112
|
+
}
|
|
113
|
+
static finalize() {
|
|
114
|
+
if (this.hasOwnProperty(vt)) return !1;
|
|
115
|
+
this[vt] = !0;
|
|
116
|
+
const e = Object.getPrototypeOf(this);
|
|
117
|
+
if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
118
|
+
const r = this.properties, i = [...Object.getOwnPropertyNames(r), ...Object.getOwnPropertySymbols(r)];
|
|
119
|
+
for (const o of i) this.createProperty(o, r[o]);
|
|
120
|
+
}
|
|
121
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
122
|
+
}
|
|
123
|
+
static finalizeStyles(e) {
|
|
124
|
+
const r = [];
|
|
125
|
+
if (Array.isArray(e)) {
|
|
126
|
+
const i = new Set(e.flat(1 / 0).reverse());
|
|
127
|
+
for (const o of i) r.unshift(Kt(o));
|
|
128
|
+
} else e !== void 0 && r.push(Kt(e));
|
|
129
|
+
return r;
|
|
130
|
+
}
|
|
131
|
+
static _$Ep(e, r) {
|
|
132
|
+
const i = r.attribute;
|
|
133
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
134
|
+
}
|
|
135
|
+
_$Eu() {
|
|
136
|
+
var e;
|
|
137
|
+
this._$E_ = new Promise((r) => this.enableUpdating = r), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((r) => r(this));
|
|
138
|
+
}
|
|
139
|
+
addController(e) {
|
|
140
|
+
var r, i;
|
|
141
|
+
((r = this._$ES) !== null && r !== void 0 ? r : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((i = e.hostConnected) === null || i === void 0 || i.call(e));
|
|
142
|
+
}
|
|
143
|
+
removeController(e) {
|
|
144
|
+
var r;
|
|
145
|
+
(r = this._$ES) === null || r === void 0 || r.splice(this._$ES.indexOf(e) >>> 0, 1);
|
|
146
|
+
}
|
|
147
|
+
_$Eg() {
|
|
148
|
+
this.constructor.elementProperties.forEach((e, r) => {
|
|
149
|
+
this.hasOwnProperty(r) && (this._$Ei.set(r, this[r]), delete this[r]);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
createRenderRoot() {
|
|
153
|
+
var e;
|
|
154
|
+
const r = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
|
|
155
|
+
return Zr(r, this.constructor.elementStyles), r;
|
|
156
|
+
}
|
|
157
|
+
connectedCallback() {
|
|
158
|
+
var e;
|
|
159
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((r) => {
|
|
160
|
+
var i;
|
|
161
|
+
return (i = r.hostConnected) === null || i === void 0 ? void 0 : i.call(r);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
enableUpdating(e) {
|
|
165
|
+
}
|
|
166
|
+
disconnectedCallback() {
|
|
167
|
+
var e;
|
|
168
|
+
(e = this._$ES) === null || e === void 0 || e.forEach((r) => {
|
|
169
|
+
var i;
|
|
170
|
+
return (i = r.hostDisconnected) === null || i === void 0 ? void 0 : i.call(r);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
attributeChangedCallback(e, r, i) {
|
|
174
|
+
this._$AK(e, i);
|
|
175
|
+
}
|
|
176
|
+
_$EO(e, r, i = it) {
|
|
177
|
+
var o;
|
|
178
|
+
const s = this.constructor._$Ep(e, i);
|
|
179
|
+
if (s !== void 0 && i.reflect === !0) {
|
|
180
|
+
const l = (((o = i.converter) === null || o === void 0 ? void 0 : o.toAttribute) !== void 0 ? i.converter : ft).toAttribute(r, i.type);
|
|
181
|
+
this._$El = e, l == null ? this.removeAttribute(s) : this.setAttribute(s, l), this._$El = null;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
_$AK(e, r) {
|
|
185
|
+
var i;
|
|
186
|
+
const o = this.constructor, s = o._$Ev.get(e);
|
|
187
|
+
if (s !== void 0 && this._$El !== s) {
|
|
188
|
+
const l = o.getPropertyOptions(s), n = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((i = l.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? l.converter : ft;
|
|
189
|
+
this._$El = s, this[s] = n.fromAttribute(r, l.type), this._$El = null;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
requestUpdate(e, r, i) {
|
|
193
|
+
let o = !0;
|
|
194
|
+
e !== void 0 && (((i = i || this.constructor.getPropertyOptions(e)).hasChanged || fr)(this[e], r) ? (this._$AL.has(e) || this._$AL.set(e, r), i.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, i))) : o = !1), !this.isUpdatePending && o && (this._$E_ = this._$Ej());
|
|
195
|
+
}
|
|
196
|
+
async _$Ej() {
|
|
197
|
+
this.isUpdatePending = !0;
|
|
198
|
+
try {
|
|
199
|
+
await this._$E_;
|
|
200
|
+
} catch (r) {
|
|
201
|
+
Promise.reject(r);
|
|
202
|
+
}
|
|
203
|
+
const e = this.scheduleUpdate();
|
|
204
|
+
return e != null && await e, !this.isUpdatePending;
|
|
205
|
+
}
|
|
206
|
+
scheduleUpdate() {
|
|
207
|
+
return this.performUpdate();
|
|
208
|
+
}
|
|
209
|
+
performUpdate() {
|
|
210
|
+
var e;
|
|
211
|
+
if (!this.isUpdatePending) return;
|
|
212
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((o, s) => this[s] = o), this._$Ei = void 0);
|
|
213
|
+
let r = !1;
|
|
214
|
+
const i = this._$AL;
|
|
215
|
+
try {
|
|
216
|
+
r = this.shouldUpdate(i), r ? (this.willUpdate(i), (e = this._$ES) === null || e === void 0 || e.forEach((o) => {
|
|
217
|
+
var s;
|
|
218
|
+
return (s = o.hostUpdate) === null || s === void 0 ? void 0 : s.call(o);
|
|
219
|
+
}), this.update(i)) : this._$Ek();
|
|
220
|
+
} catch (o) {
|
|
221
|
+
throw r = !1, this._$Ek(), o;
|
|
222
|
+
}
|
|
223
|
+
r && this._$AE(i);
|
|
224
|
+
}
|
|
225
|
+
willUpdate(e) {
|
|
226
|
+
}
|
|
227
|
+
_$AE(e) {
|
|
228
|
+
var r;
|
|
229
|
+
(r = this._$ES) === null || r === void 0 || r.forEach((i) => {
|
|
230
|
+
var o;
|
|
231
|
+
return (o = i.hostUpdated) === null || o === void 0 ? void 0 : o.call(i);
|
|
232
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
233
|
+
}
|
|
234
|
+
_$Ek() {
|
|
235
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
236
|
+
}
|
|
237
|
+
get updateComplete() {
|
|
238
|
+
return this.getUpdateComplete();
|
|
239
|
+
}
|
|
240
|
+
getUpdateComplete() {
|
|
241
|
+
return this._$E_;
|
|
242
|
+
}
|
|
243
|
+
shouldUpdate(e) {
|
|
244
|
+
return !0;
|
|
245
|
+
}
|
|
246
|
+
update(e) {
|
|
247
|
+
this._$EC !== void 0 && (this._$EC.forEach((r, i) => this._$EO(i, this[i], r)), this._$EC = void 0), this._$Ek();
|
|
248
|
+
}
|
|
249
|
+
updated(e) {
|
|
250
|
+
}
|
|
251
|
+
firstUpdated(e) {
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
ce[vt] = !0, ce.elementProperties = /* @__PURE__ */ new Map(), ce.elementStyles = [], ce.shadowRootOptions = { mode: "open" }, Gt == null || Gt({ ReactiveElement: ce }), ((ot = ze.reactiveElementVersions) !== null && ot !== void 0 ? ot : ze.reactiveElementVersions = []).push("1.6.3");
|
|
255
|
+
/**
|
|
256
|
+
* @license
|
|
257
|
+
* Copyright 2017 Google LLC
|
|
258
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
259
|
+
*/
|
|
260
|
+
var st;
|
|
261
|
+
const Ve = window, ue = Ve.trustedTypes, Yt = ue ? ue.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, gt = "$lit$", V = `lit$${(Math.random() + "").slice(9)}$`, vr = "?" + V, Vr = `<${vr}>`, ie = document, Ae = () => ie.createComment(""), Ee = (t) => t === null || typeof t != "object" && typeof t != "function", gr = Array.isArray, Fr = (t) => gr(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", lt = `[
|
|
262
|
+
\f\r]`, _e = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Xt = /-->/g, Jt = />/g, ee = RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
263
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), er = /'/g, tr = /"/g, br = /^(?:script|style|textarea|title)$/i, yr = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), c = yr(1), Ze = yr(2), se = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), rr = /* @__PURE__ */ new WeakMap(), te = ie.createTreeWalker(ie, 129, null, !1);
|
|
264
|
+
function xr(t, e) {
|
|
265
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
266
|
+
return Yt !== void 0 ? Yt.createHTML(e) : e;
|
|
267
|
+
}
|
|
268
|
+
const qr = (t, e) => {
|
|
269
|
+
const r = t.length - 1, i = [];
|
|
270
|
+
let o, s = e === 2 ? "<svg>" : "", l = _e;
|
|
271
|
+
for (let n = 0; n < r; n++) {
|
|
272
|
+
const a = t[n];
|
|
273
|
+
let d, x, $ = -1, p = 0;
|
|
274
|
+
for (; p < a.length && (l.lastIndex = p, x = l.exec(a), x !== null); ) p = l.lastIndex, l === _e ? x[1] === "!--" ? l = Xt : x[1] !== void 0 ? l = Jt : x[2] !== void 0 ? (br.test(x[2]) && (o = RegExp("</" + x[2], "g")), l = ee) : x[3] !== void 0 && (l = ee) : l === ee ? x[0] === ">" ? (l = o ?? _e, $ = -1) : x[1] === void 0 ? $ = -2 : ($ = l.lastIndex - x[2].length, d = x[1], l = x[3] === void 0 ? ee : x[3] === '"' ? tr : er) : l === tr || l === er ? l = ee : l === Xt || l === Jt ? l = _e : (l = ee, o = void 0);
|
|
275
|
+
const O = l === ee && t[n + 1].startsWith("/>") ? " " : "";
|
|
276
|
+
s += l === _e ? a + Vr : $ >= 0 ? (i.push(d), a.slice(0, $) + gt + a.slice($) + V + O) : a + V + ($ === -2 ? (i.push(void 0), n) : O);
|
|
277
|
+
}
|
|
278
|
+
return [xr(t, s + (t[r] || "<?>") + (e === 2 ? "</svg>" : "")), i];
|
|
279
|
+
};
|
|
280
|
+
class Pe {
|
|
281
|
+
constructor({ strings: e, _$litType$: r }, i) {
|
|
282
|
+
let o;
|
|
283
|
+
this.parts = [];
|
|
284
|
+
let s = 0, l = 0;
|
|
285
|
+
const n = e.length - 1, a = this.parts, [d, x] = qr(e, r);
|
|
286
|
+
if (this.el = Pe.createElement(d, i), te.currentNode = this.el.content, r === 2) {
|
|
287
|
+
const $ = this.el.content, p = $.firstChild;
|
|
288
|
+
p.remove(), $.append(...p.childNodes);
|
|
289
|
+
}
|
|
290
|
+
for (; (o = te.nextNode()) !== null && a.length < n; ) {
|
|
291
|
+
if (o.nodeType === 1) {
|
|
292
|
+
if (o.hasAttributes()) {
|
|
293
|
+
const $ = [];
|
|
294
|
+
for (const p of o.getAttributeNames()) if (p.endsWith(gt) || p.startsWith(V)) {
|
|
295
|
+
const O = x[l++];
|
|
296
|
+
if ($.push(p), O !== void 0) {
|
|
297
|
+
const g = o.getAttribute(O.toLowerCase() + gt).split(V), w = /([.?@])?(.*)/.exec(O);
|
|
298
|
+
a.push({ type: 1, index: s, name: w[2], strings: g, ctor: w[1] === "." ? Qr : w[1] === "?" ? Yr : w[1] === "@" ? Xr : et });
|
|
299
|
+
} else a.push({ type: 6, index: s });
|
|
300
|
+
}
|
|
301
|
+
for (const p of $) o.removeAttribute(p);
|
|
302
|
+
}
|
|
303
|
+
if (br.test(o.tagName)) {
|
|
304
|
+
const $ = o.textContent.split(V), p = $.length - 1;
|
|
305
|
+
if (p > 0) {
|
|
306
|
+
o.textContent = ue ? ue.emptyScript : "";
|
|
307
|
+
for (let O = 0; O < p; O++) o.append($[O], Ae()), te.nextNode(), a.push({ type: 2, index: ++s });
|
|
308
|
+
o.append($[p], Ae());
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
} else if (o.nodeType === 8) if (o.data === vr) a.push({ type: 2, index: s });
|
|
312
|
+
else {
|
|
313
|
+
let $ = -1;
|
|
314
|
+
for (; ($ = o.data.indexOf(V, $ + 1)) !== -1; ) a.push({ type: 7, index: s }), $ += V.length - 1;
|
|
315
|
+
}
|
|
316
|
+
s++;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
static createElement(e, r) {
|
|
320
|
+
const i = ie.createElement("template");
|
|
321
|
+
return i.innerHTML = e, i;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
function we(t, e, r = t, i) {
|
|
325
|
+
var o, s, l, n;
|
|
326
|
+
if (e === se) return e;
|
|
327
|
+
let a = i !== void 0 ? (o = r._$Co) === null || o === void 0 ? void 0 : o[i] : r._$Cl;
|
|
328
|
+
const d = Ee(e) ? void 0 : e._$litDirective$;
|
|
329
|
+
return (a == null ? void 0 : a.constructor) !== d && ((s = a == null ? void 0 : a._$AO) === null || s === void 0 || s.call(a, !1), d === void 0 ? a = void 0 : (a = new d(t), a._$AT(t, r, i)), i !== void 0 ? ((l = (n = r)._$Co) !== null && l !== void 0 ? l : n._$Co = [])[i] = a : r._$Cl = a), a !== void 0 && (e = we(t, a._$AS(t, e.values), a, i)), e;
|
|
330
|
+
}
|
|
331
|
+
class Kr {
|
|
332
|
+
constructor(e, r) {
|
|
333
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = r;
|
|
334
|
+
}
|
|
335
|
+
get parentNode() {
|
|
336
|
+
return this._$AM.parentNode;
|
|
337
|
+
}
|
|
338
|
+
get _$AU() {
|
|
339
|
+
return this._$AM._$AU;
|
|
340
|
+
}
|
|
341
|
+
u(e) {
|
|
342
|
+
var r;
|
|
343
|
+
const { el: { content: i }, parts: o } = this._$AD, s = ((r = e == null ? void 0 : e.creationScope) !== null && r !== void 0 ? r : ie).importNode(i, !0);
|
|
344
|
+
te.currentNode = s;
|
|
345
|
+
let l = te.nextNode(), n = 0, a = 0, d = o[0];
|
|
346
|
+
for (; d !== void 0; ) {
|
|
347
|
+
if (n === d.index) {
|
|
348
|
+
let x;
|
|
349
|
+
d.type === 2 ? x = new Re(l, l.nextSibling, this, e) : d.type === 1 ? x = new d.ctor(l, d.name, d.strings, this, e) : d.type === 6 && (x = new Jr(l, this, e)), this._$AV.push(x), d = o[++a];
|
|
350
|
+
}
|
|
351
|
+
n !== (d == null ? void 0 : d.index) && (l = te.nextNode(), n++);
|
|
352
|
+
}
|
|
353
|
+
return te.currentNode = ie, s;
|
|
354
|
+
}
|
|
355
|
+
v(e) {
|
|
356
|
+
let r = 0;
|
|
357
|
+
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, r), r += i.strings.length - 2) : i._$AI(e[r])), r++;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
class Re {
|
|
361
|
+
constructor(e, r, i, o) {
|
|
362
|
+
var s;
|
|
363
|
+
this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = e, this._$AB = r, this._$AM = i, this.options = o, this._$Cp = (s = o == null ? void 0 : o.isConnected) === null || s === void 0 || s;
|
|
364
|
+
}
|
|
365
|
+
get _$AU() {
|
|
366
|
+
var e, r;
|
|
367
|
+
return (r = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && r !== void 0 ? r : this._$Cp;
|
|
368
|
+
}
|
|
369
|
+
get parentNode() {
|
|
370
|
+
let e = this._$AA.parentNode;
|
|
371
|
+
const r = this._$AM;
|
|
372
|
+
return r !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = r.parentNode), e;
|
|
373
|
+
}
|
|
374
|
+
get startNode() {
|
|
375
|
+
return this._$AA;
|
|
376
|
+
}
|
|
377
|
+
get endNode() {
|
|
378
|
+
return this._$AB;
|
|
379
|
+
}
|
|
380
|
+
_$AI(e, r = this) {
|
|
381
|
+
e = we(this, e, r), Ee(e) ? e === T || e == null || e === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : e !== this._$AH && e !== se && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : Fr(e) ? this.T(e) : this._(e);
|
|
382
|
+
}
|
|
383
|
+
k(e) {
|
|
384
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
385
|
+
}
|
|
386
|
+
$(e) {
|
|
387
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
|
|
388
|
+
}
|
|
389
|
+
_(e) {
|
|
390
|
+
this._$AH !== T && Ee(this._$AH) ? this._$AA.nextSibling.data = e : this.$(ie.createTextNode(e)), this._$AH = e;
|
|
391
|
+
}
|
|
392
|
+
g(e) {
|
|
393
|
+
var r;
|
|
394
|
+
const { values: i, _$litType$: o } = e, s = typeof o == "number" ? this._$AC(e) : (o.el === void 0 && (o.el = Pe.createElement(xr(o.h, o.h[0]), this.options)), o);
|
|
395
|
+
if (((r = this._$AH) === null || r === void 0 ? void 0 : r._$AD) === s) this._$AH.v(i);
|
|
396
|
+
else {
|
|
397
|
+
const l = new Kr(s, this), n = l.u(this.options);
|
|
398
|
+
l.v(i), this.$(n), this._$AH = l;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
_$AC(e) {
|
|
402
|
+
let r = rr.get(e.strings);
|
|
403
|
+
return r === void 0 && rr.set(e.strings, r = new Pe(e)), r;
|
|
404
|
+
}
|
|
405
|
+
T(e) {
|
|
406
|
+
gr(this._$AH) || (this._$AH = [], this._$AR());
|
|
407
|
+
const r = this._$AH;
|
|
408
|
+
let i, o = 0;
|
|
409
|
+
for (const s of e) o === r.length ? r.push(i = new Re(this.k(Ae()), this.k(Ae()), this, this.options)) : i = r[o], i._$AI(s), o++;
|
|
410
|
+
o < r.length && (this._$AR(i && i._$AB.nextSibling, o), r.length = o);
|
|
411
|
+
}
|
|
412
|
+
_$AR(e = this._$AA.nextSibling, r) {
|
|
413
|
+
var i;
|
|
414
|
+
for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, r); e && e !== this._$AB; ) {
|
|
415
|
+
const o = e.nextSibling;
|
|
416
|
+
e.remove(), e = o;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
setConnected(e) {
|
|
420
|
+
var r;
|
|
421
|
+
this._$AM === void 0 && (this._$Cp = e, (r = this._$AP) === null || r === void 0 || r.call(this, e));
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
class et {
|
|
425
|
+
constructor(e, r, i, o, s) {
|
|
426
|
+
this.type = 1, this._$AH = T, this._$AN = void 0, this.element = e, this.name = r, this._$AM = o, this.options = s, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = T;
|
|
427
|
+
}
|
|
428
|
+
get tagName() {
|
|
429
|
+
return this.element.tagName;
|
|
430
|
+
}
|
|
431
|
+
get _$AU() {
|
|
432
|
+
return this._$AM._$AU;
|
|
433
|
+
}
|
|
434
|
+
_$AI(e, r = this, i, o) {
|
|
435
|
+
const s = this.strings;
|
|
436
|
+
let l = !1;
|
|
437
|
+
if (s === void 0) e = we(this, e, r, 0), l = !Ee(e) || e !== this._$AH && e !== se, l && (this._$AH = e);
|
|
438
|
+
else {
|
|
439
|
+
const n = e;
|
|
440
|
+
let a, d;
|
|
441
|
+
for (e = s[0], a = 0; a < s.length - 1; a++) d = we(this, n[i + a], r, a), d === se && (d = this._$AH[a]), l || (l = !Ee(d) || d !== this._$AH[a]), d === T ? e = T : e !== T && (e += (d ?? "") + s[a + 1]), this._$AH[a] = d;
|
|
442
|
+
}
|
|
443
|
+
l && !o && this.j(e);
|
|
444
|
+
}
|
|
445
|
+
j(e) {
|
|
446
|
+
e === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
class Qr extends et {
|
|
450
|
+
constructor() {
|
|
451
|
+
super(...arguments), this.type = 3;
|
|
452
|
+
}
|
|
453
|
+
j(e) {
|
|
454
|
+
this.element[this.name] = e === T ? void 0 : e;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
const Gr = ue ? ue.emptyScript : "";
|
|
458
|
+
class Yr extends et {
|
|
459
|
+
constructor() {
|
|
460
|
+
super(...arguments), this.type = 4;
|
|
461
|
+
}
|
|
462
|
+
j(e) {
|
|
463
|
+
e && e !== T ? this.element.setAttribute(this.name, Gr) : this.element.removeAttribute(this.name);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
class Xr extends et {
|
|
467
|
+
constructor(e, r, i, o, s) {
|
|
468
|
+
super(e, r, i, o, s), this.type = 5;
|
|
469
|
+
}
|
|
470
|
+
_$AI(e, r = this) {
|
|
471
|
+
var i;
|
|
472
|
+
if ((e = (i = we(this, e, r, 0)) !== null && i !== void 0 ? i : T) === se) return;
|
|
473
|
+
const o = this._$AH, s = e === T && o !== T || e.capture !== o.capture || e.once !== o.once || e.passive !== o.passive, l = e !== T && (o === T || s);
|
|
474
|
+
s && this.element.removeEventListener(this.name, this, o), l && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
475
|
+
}
|
|
476
|
+
handleEvent(e) {
|
|
477
|
+
var r, i;
|
|
478
|
+
typeof this._$AH == "function" ? this._$AH.call((i = (r = this.options) === null || r === void 0 ? void 0 : r.host) !== null && i !== void 0 ? i : this.element, e) : this._$AH.handleEvent(e);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
class Jr {
|
|
482
|
+
constructor(e, r, i) {
|
|
483
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = i;
|
|
484
|
+
}
|
|
485
|
+
get _$AU() {
|
|
486
|
+
return this._$AM._$AU;
|
|
487
|
+
}
|
|
488
|
+
_$AI(e) {
|
|
489
|
+
we(this, e);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
const or = Ve.litHtmlPolyfillSupport;
|
|
493
|
+
or == null || or(Pe, Re), ((st = Ve.litHtmlVersions) !== null && st !== void 0 ? st : Ve.litHtmlVersions = []).push("2.8.0");
|
|
494
|
+
const eo = (t, e, r) => {
|
|
495
|
+
var i, o;
|
|
496
|
+
const s = (i = r == null ? void 0 : r.renderBefore) !== null && i !== void 0 ? i : e;
|
|
497
|
+
let l = s._$litPart$;
|
|
498
|
+
if (l === void 0) {
|
|
499
|
+
const n = (o = r == null ? void 0 : r.renderBefore) !== null && o !== void 0 ? o : null;
|
|
500
|
+
s._$litPart$ = l = new Re(e.insertBefore(Ae(), n), n, void 0, r ?? {});
|
|
501
|
+
}
|
|
502
|
+
return l._$AI(t), l;
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* @license
|
|
506
|
+
* Copyright 2017 Google LLC
|
|
507
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
508
|
+
*/
|
|
509
|
+
var nt, at;
|
|
510
|
+
class f extends ce {
|
|
511
|
+
constructor() {
|
|
512
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
513
|
+
}
|
|
514
|
+
createRenderRoot() {
|
|
515
|
+
var e, r;
|
|
516
|
+
const i = super.createRenderRoot();
|
|
517
|
+
return (e = (r = this.renderOptions).renderBefore) !== null && e !== void 0 || (r.renderBefore = i.firstChild), i;
|
|
518
|
+
}
|
|
519
|
+
update(e) {
|
|
520
|
+
const r = this.render();
|
|
521
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = eo(r, this.renderRoot, this.renderOptions);
|
|
522
|
+
}
|
|
523
|
+
connectedCallback() {
|
|
524
|
+
var e;
|
|
525
|
+
super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
|
|
526
|
+
}
|
|
527
|
+
disconnectedCallback() {
|
|
528
|
+
var e;
|
|
529
|
+
super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
|
|
530
|
+
}
|
|
531
|
+
render() {
|
|
532
|
+
return se;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
f.finalized = !0, f._$litElement$ = !0, (nt = globalThis.litElementHydrateSupport) === null || nt === void 0 || nt.call(globalThis, { LitElement: f });
|
|
536
|
+
const ir = globalThis.litElementPolyfillSupport;
|
|
537
|
+
ir == null || ir({ LitElement: f });
|
|
538
|
+
((at = globalThis.litElementVersions) !== null && at !== void 0 ? at : globalThis.litElementVersions = []).push("3.3.3");
|
|
539
|
+
/**
|
|
540
|
+
* @license
|
|
541
|
+
* Copyright 2017 Google LLC
|
|
542
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
543
|
+
*/
|
|
544
|
+
const y = (t) => (e) => typeof e == "function" ? ((r, i) => (customElements.define(r, i), i))(t, e) : ((r, i) => {
|
|
545
|
+
const { kind: o, elements: s } = i;
|
|
546
|
+
return { kind: o, elements: s, finisher(l) {
|
|
547
|
+
customElements.define(r, l);
|
|
548
|
+
} };
|
|
549
|
+
})(t, e);
|
|
550
|
+
/**
|
|
551
|
+
* @license
|
|
552
|
+
* Copyright 2017 Google LLC
|
|
553
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
554
|
+
*/
|
|
555
|
+
const to = (t, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(r) {
|
|
556
|
+
r.createProperty(e.key, t);
|
|
557
|
+
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
|
|
558
|
+
typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
|
|
559
|
+
}, finisher(r) {
|
|
560
|
+
r.createProperty(e.key, t);
|
|
561
|
+
} }, ro = (t, e, r) => {
|
|
562
|
+
e.constructor.createProperty(r, t);
|
|
563
|
+
};
|
|
564
|
+
function u(t) {
|
|
565
|
+
return (e, r) => r !== void 0 ? ro(t, e, r) : to(t, e);
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* @license
|
|
569
|
+
* Copyright 2017 Google LLC
|
|
570
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
571
|
+
*/
|
|
572
|
+
function L(t) {
|
|
573
|
+
return u({ ...t, state: !0 });
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* @license
|
|
577
|
+
* Copyright 2021 Google LLC
|
|
578
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
579
|
+
*/
|
|
580
|
+
var ct;
|
|
581
|
+
((ct = window.HTMLSlotElement) === null || ct === void 0 ? void 0 : ct.prototype.assignedElements) != null;
|
|
582
|
+
/**
|
|
583
|
+
* @license
|
|
584
|
+
* Copyright 2017 Google LLC
|
|
585
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
586
|
+
*/
|
|
587
|
+
const oo = { ATTRIBUTE: 1 }, io = (t) => (...e) => ({ _$litDirective$: t, values: e });
|
|
588
|
+
class so {
|
|
589
|
+
constructor(e) {
|
|
590
|
+
}
|
|
591
|
+
get _$AU() {
|
|
592
|
+
return this._$AM._$AU;
|
|
593
|
+
}
|
|
594
|
+
_$AT(e, r, i) {
|
|
595
|
+
this._$Ct = e, this._$AM = r, this._$Ci = i;
|
|
596
|
+
}
|
|
597
|
+
_$AS(e, r) {
|
|
598
|
+
return this.update(e, r);
|
|
599
|
+
}
|
|
600
|
+
update(e, r) {
|
|
601
|
+
return this.render(...r);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* @license
|
|
606
|
+
* Copyright 2018 Google LLC
|
|
607
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
608
|
+
*/
|
|
609
|
+
const Z = io(class extends so {
|
|
610
|
+
constructor(t) {
|
|
611
|
+
var e;
|
|
612
|
+
if (super(t), t.type !== oo.ATTRIBUTE || t.name !== "class" || ((e = t.strings) === null || e === void 0 ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
613
|
+
}
|
|
614
|
+
render(t) {
|
|
615
|
+
return " " + Object.keys(t).filter((e) => t[e]).join(" ") + " ";
|
|
616
|
+
}
|
|
617
|
+
update(t, [e]) {
|
|
618
|
+
var r, i;
|
|
619
|
+
if (this.it === void 0) {
|
|
620
|
+
this.it = /* @__PURE__ */ new Set(), t.strings !== void 0 && (this.nt = new Set(t.strings.join(" ").split(/\s/).filter((s) => s !== "")));
|
|
621
|
+
for (const s in e) e[s] && !(!((r = this.nt) === null || r === void 0) && r.has(s)) && this.it.add(s);
|
|
622
|
+
return this.render(e);
|
|
623
|
+
}
|
|
624
|
+
const o = t.element.classList;
|
|
625
|
+
this.it.forEach((s) => {
|
|
626
|
+
s in e || (o.remove(s), this.it.delete(s));
|
|
627
|
+
});
|
|
628
|
+
for (const s in e) {
|
|
629
|
+
const l = !!e[s];
|
|
630
|
+
l === this.it.has(s) || !((i = this.nt) === null || i === void 0) && i.has(s) || (l ? (o.add(s), this.it.add(s)) : (o.remove(s), this.it.delete(s)));
|
|
631
|
+
}
|
|
632
|
+
return se;
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
function lo(t, e) {
|
|
636
|
+
t.indexOf(e) === -1 && t.push(e);
|
|
637
|
+
}
|
|
638
|
+
const $r = (t, e, r) => Math.min(Math.max(r, t), e), N = {
|
|
639
|
+
duration: 0.3,
|
|
640
|
+
delay: 0,
|
|
641
|
+
endDelay: 0,
|
|
642
|
+
repeat: 0,
|
|
643
|
+
easing: "ease"
|
|
644
|
+
}, Fe = (t) => typeof t == "number", he = (t) => Array.isArray(t) && !Fe(t[0]), no = (t, e, r) => {
|
|
645
|
+
const i = e - t;
|
|
646
|
+
return ((r - t) % i + i) % i + t;
|
|
647
|
+
};
|
|
648
|
+
function ao(t, e) {
|
|
649
|
+
return he(t) ? t[no(0, t.length, e)] : t;
|
|
650
|
+
}
|
|
651
|
+
const _r = (t, e, r) => -r * t + r * e + t, Cr = () => {
|
|
652
|
+
}, q = (t) => t, jt = (t, e, r) => e - t === 0 ? 1 : (r - t) / (e - t);
|
|
653
|
+
function Or(t, e) {
|
|
654
|
+
const r = t[t.length - 1];
|
|
655
|
+
for (let i = 1; i <= e; i++) {
|
|
656
|
+
const o = jt(0, e, i);
|
|
657
|
+
t.push(_r(r, 1, o));
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
function co(t) {
|
|
661
|
+
const e = [0];
|
|
662
|
+
return Or(e, t - 1), e;
|
|
663
|
+
}
|
|
664
|
+
function ho(t, e = co(t.length), r = q) {
|
|
665
|
+
const i = t.length, o = i - e.length;
|
|
666
|
+
return o > 0 && Or(e, o), (s) => {
|
|
667
|
+
let l = 0;
|
|
668
|
+
for (; l < i - 2 && !(s < e[l + 1]); l++)
|
|
669
|
+
;
|
|
670
|
+
let n = $r(0, 1, jt(e[l], e[l + 1], s));
|
|
671
|
+
return n = ao(r, l)(n), _r(t[l], t[l + 1], n);
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
const Ar = (t) => Array.isArray(t) && Fe(t[0]), bt = (t) => typeof t == "object" && !!t.createAnimation, fe = (t) => typeof t == "function", mo = (t) => typeof t == "string", Oe = {
|
|
675
|
+
ms: (t) => t * 1e3,
|
|
676
|
+
s: (t) => t / 1e3
|
|
677
|
+
}, Er = (t, e, r) => (((1 - 3 * r + 3 * e) * t + (3 * r - 6 * e)) * t + 3 * e) * t, po = 1e-7, uo = 12;
|
|
678
|
+
function wo(t, e, r, i, o) {
|
|
679
|
+
let s, l, n = 0;
|
|
680
|
+
do
|
|
681
|
+
l = e + (r - e) / 2, s = Er(l, i, o) - t, s > 0 ? r = l : e = l;
|
|
682
|
+
while (Math.abs(s) > po && ++n < uo);
|
|
683
|
+
return l;
|
|
684
|
+
}
|
|
685
|
+
function Ce(t, e, r, i) {
|
|
686
|
+
if (t === e && r === i)
|
|
687
|
+
return q;
|
|
688
|
+
const o = (s) => wo(s, 0, 1, t, r);
|
|
689
|
+
return (s) => s === 0 || s === 1 ? s : Er(o(s), e, i);
|
|
690
|
+
}
|
|
691
|
+
const fo = (t, e = "end") => (r) => {
|
|
692
|
+
r = e === "end" ? Math.min(r, 0.999) : Math.max(r, 1e-3);
|
|
693
|
+
const i = r * t, o = e === "end" ? Math.floor(i) : Math.ceil(i);
|
|
694
|
+
return $r(0, 1, o / t);
|
|
695
|
+
}, vo = {
|
|
696
|
+
ease: Ce(0.25, 0.1, 0.25, 1),
|
|
697
|
+
"ease-in": Ce(0.42, 0, 1, 1),
|
|
698
|
+
"ease-in-out": Ce(0.42, 0, 0.58, 1),
|
|
699
|
+
"ease-out": Ce(0, 0, 0.58, 1)
|
|
700
|
+
}, go = /\((.*?)\)/;
|
|
701
|
+
function sr(t) {
|
|
702
|
+
if (fe(t))
|
|
703
|
+
return t;
|
|
704
|
+
if (Ar(t))
|
|
705
|
+
return Ce(...t);
|
|
706
|
+
const e = vo[t];
|
|
707
|
+
if (e)
|
|
708
|
+
return e;
|
|
709
|
+
if (t.startsWith("steps")) {
|
|
710
|
+
const r = go.exec(t);
|
|
711
|
+
if (r) {
|
|
712
|
+
const i = r[1].split(",");
|
|
713
|
+
return fo(parseFloat(i[0]), i[1].trim());
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return q;
|
|
717
|
+
}
|
|
718
|
+
class Pr {
|
|
719
|
+
constructor(e, r = [0, 1], { easing: i, duration: o = N.duration, delay: s = N.delay, endDelay: l = N.endDelay, repeat: n = N.repeat, offset: a, direction: d = "normal", autoplay: x = !0 } = {}) {
|
|
720
|
+
if (this.startTime = null, this.rate = 1, this.t = 0, this.cancelTimestamp = null, this.easing = q, this.duration = 0, this.totalDuration = 0, this.repeat = 0, this.playState = "idle", this.finished = new Promise((p, O) => {
|
|
721
|
+
this.resolve = p, this.reject = O;
|
|
722
|
+
}), i = i || N.easing, bt(i)) {
|
|
723
|
+
const p = i.createAnimation(r);
|
|
724
|
+
i = p.easing, r = p.keyframes || r, o = p.duration || o;
|
|
725
|
+
}
|
|
726
|
+
this.repeat = n, this.easing = he(i) ? q : sr(i), this.updateDuration(o);
|
|
727
|
+
const $ = ho(r, a, he(i) ? i.map(sr) : q);
|
|
728
|
+
this.tick = (p) => {
|
|
729
|
+
var O;
|
|
730
|
+
s = s;
|
|
731
|
+
let g = 0;
|
|
732
|
+
this.pauseTime !== void 0 ? g = this.pauseTime : g = (p - this.startTime) * this.rate, this.t = g, g /= 1e3, g = Math.max(g - s, 0), this.playState === "finished" && this.pauseTime === void 0 && (g = this.totalDuration);
|
|
733
|
+
const w = g / this.duration;
|
|
734
|
+
let P = Math.floor(w), b = w % 1;
|
|
735
|
+
!b && w >= 1 && (b = 1), b === 1 && P--;
|
|
736
|
+
const M = P % 2;
|
|
737
|
+
(d === "reverse" || d === "alternate" && M || d === "alternate-reverse" && !M) && (b = 1 - b);
|
|
738
|
+
const S = g >= this.totalDuration ? 1 : Math.min(b, 1), k = $(this.easing(S));
|
|
739
|
+
e(k), this.pauseTime === void 0 && (this.playState === "finished" || g >= this.totalDuration + l) ? (this.playState = "finished", (O = this.resolve) === null || O === void 0 || O.call(this, k)) : this.playState !== "idle" && (this.frameRequestId = requestAnimationFrame(this.tick));
|
|
740
|
+
}, x && this.play();
|
|
741
|
+
}
|
|
742
|
+
play() {
|
|
743
|
+
const e = performance.now();
|
|
744
|
+
this.playState = "running", this.pauseTime !== void 0 ? this.startTime = e - this.pauseTime : this.startTime || (this.startTime = e), this.cancelTimestamp = this.startTime, this.pauseTime = void 0, this.frameRequestId = requestAnimationFrame(this.tick);
|
|
745
|
+
}
|
|
746
|
+
pause() {
|
|
747
|
+
this.playState = "paused", this.pauseTime = this.t;
|
|
748
|
+
}
|
|
749
|
+
finish() {
|
|
750
|
+
this.playState = "finished", this.tick(0);
|
|
751
|
+
}
|
|
752
|
+
stop() {
|
|
753
|
+
var e;
|
|
754
|
+
this.playState = "idle", this.frameRequestId !== void 0 && cancelAnimationFrame(this.frameRequestId), (e = this.reject) === null || e === void 0 || e.call(this, !1);
|
|
755
|
+
}
|
|
756
|
+
cancel() {
|
|
757
|
+
this.stop(), this.tick(this.cancelTimestamp);
|
|
758
|
+
}
|
|
759
|
+
reverse() {
|
|
760
|
+
this.rate *= -1;
|
|
761
|
+
}
|
|
762
|
+
commitStyles() {
|
|
763
|
+
}
|
|
764
|
+
updateDuration(e) {
|
|
765
|
+
this.duration = e, this.totalDuration = e * (this.repeat + 1);
|
|
766
|
+
}
|
|
767
|
+
get currentTime() {
|
|
768
|
+
return this.t;
|
|
769
|
+
}
|
|
770
|
+
set currentTime(e) {
|
|
771
|
+
this.pauseTime !== void 0 || this.rate === 0 ? this.pauseTime = e : this.startTime = performance.now() - e / this.rate;
|
|
772
|
+
}
|
|
773
|
+
get playbackRate() {
|
|
774
|
+
return this.rate;
|
|
775
|
+
}
|
|
776
|
+
set playbackRate(e) {
|
|
777
|
+
this.rate = e;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
var yt = function() {
|
|
781
|
+
};
|
|
782
|
+
process.env.NODE_ENV !== "production" && (yt = function(t, e) {
|
|
783
|
+
if (!t)
|
|
784
|
+
throw new Error(e);
|
|
785
|
+
});
|
|
786
|
+
class bo {
|
|
787
|
+
setAnimation(e) {
|
|
788
|
+
this.animation = e, e == null || e.finished.then(() => this.clearAnimation()).catch(() => {
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
clearAnimation() {
|
|
792
|
+
this.animation = this.generator = void 0;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
const dt = /* @__PURE__ */ new WeakMap();
|
|
796
|
+
function Ir(t) {
|
|
797
|
+
return dt.has(t) || dt.set(t, {
|
|
798
|
+
transforms: [],
|
|
799
|
+
values: /* @__PURE__ */ new Map()
|
|
800
|
+
}), dt.get(t);
|
|
801
|
+
}
|
|
802
|
+
function yo(t, e) {
|
|
803
|
+
return t.has(e) || t.set(e, new bo()), t.get(e);
|
|
804
|
+
}
|
|
805
|
+
const xo = ["", "X", "Y", "Z"], $o = ["translate", "scale", "rotate", "skew"], qe = {
|
|
806
|
+
x: "translateX",
|
|
807
|
+
y: "translateY",
|
|
808
|
+
z: "translateZ"
|
|
809
|
+
}, lr = {
|
|
810
|
+
syntax: "<angle>",
|
|
811
|
+
initialValue: "0deg",
|
|
812
|
+
toDefaultUnit: (t) => t + "deg"
|
|
813
|
+
}, _o = {
|
|
814
|
+
translate: {
|
|
815
|
+
syntax: "<length-percentage>",
|
|
816
|
+
initialValue: "0px",
|
|
817
|
+
toDefaultUnit: (t) => t + "px"
|
|
818
|
+
},
|
|
819
|
+
rotate: lr,
|
|
820
|
+
scale: {
|
|
821
|
+
syntax: "<number>",
|
|
822
|
+
initialValue: 1,
|
|
823
|
+
toDefaultUnit: q
|
|
824
|
+
},
|
|
825
|
+
skew: lr
|
|
826
|
+
}, Ie = /* @__PURE__ */ new Map(), Ht = (t) => `--motion-${t}`, Ke = ["x", "y", "z"];
|
|
827
|
+
$o.forEach((t) => {
|
|
828
|
+
xo.forEach((e) => {
|
|
829
|
+
Ke.push(t + e), Ie.set(Ht(t + e), _o[t]);
|
|
830
|
+
});
|
|
831
|
+
});
|
|
832
|
+
const Co = (t, e) => Ke.indexOf(t) - Ke.indexOf(e), Oo = new Set(Ke), Tr = (t) => Oo.has(t), Ao = (t, e) => {
|
|
833
|
+
qe[e] && (e = qe[e]);
|
|
834
|
+
const { transforms: r } = Ir(t);
|
|
835
|
+
lo(r, e), t.style.transform = Eo(r);
|
|
836
|
+
}, Eo = (t) => t.sort(Co).reduce(Po, "").trim(), Po = (t, e) => `${t} ${e}(var(${Ht(e)}))`, xt = (t) => t.startsWith("--"), nr = /* @__PURE__ */ new Set();
|
|
837
|
+
function Io(t) {
|
|
838
|
+
if (!nr.has(t)) {
|
|
839
|
+
nr.add(t);
|
|
840
|
+
try {
|
|
841
|
+
const { syntax: e, initialValue: r } = Ie.has(t) ? Ie.get(t) : {};
|
|
842
|
+
CSS.registerProperty({
|
|
843
|
+
name: t,
|
|
844
|
+
inherits: !1,
|
|
845
|
+
syntax: e,
|
|
846
|
+
initialValue: r
|
|
847
|
+
});
|
|
848
|
+
} catch {
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
const ht = (t, e) => document.createElement("div").animate(t, e), ar = {
|
|
853
|
+
cssRegisterProperty: () => typeof CSS < "u" && Object.hasOwnProperty.call(CSS, "registerProperty"),
|
|
854
|
+
waapi: () => Object.hasOwnProperty.call(Element.prototype, "animate"),
|
|
855
|
+
partialKeyframes: () => {
|
|
856
|
+
try {
|
|
857
|
+
ht({ opacity: [1] });
|
|
858
|
+
} catch {
|
|
859
|
+
return !1;
|
|
860
|
+
}
|
|
861
|
+
return !0;
|
|
862
|
+
},
|
|
863
|
+
finished: () => !!ht({ opacity: [0, 1] }, { duration: 1e-3 }).finished,
|
|
864
|
+
linearEasing: () => {
|
|
865
|
+
try {
|
|
866
|
+
ht({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
867
|
+
} catch {
|
|
868
|
+
return !1;
|
|
869
|
+
}
|
|
870
|
+
return !0;
|
|
871
|
+
}
|
|
872
|
+
}, mt = {}, de = {};
|
|
873
|
+
for (const t in ar)
|
|
874
|
+
de[t] = () => (mt[t] === void 0 && (mt[t] = ar[t]()), mt[t]);
|
|
875
|
+
const To = 0.015, Mo = (t, e) => {
|
|
876
|
+
let r = "";
|
|
877
|
+
const i = Math.round(e / To);
|
|
878
|
+
for (let o = 0; o < i; o++)
|
|
879
|
+
r += t(jt(0, i - 1, o)) + ", ";
|
|
880
|
+
return r.substring(0, r.length - 2);
|
|
881
|
+
}, cr = (t, e) => fe(t) ? de.linearEasing() ? `linear(${Mo(t, e)})` : N.easing : Ar(t) ? Wo(t) : t, Wo = ([t, e, r, i]) => `cubic-bezier(${t}, ${e}, ${r}, ${i})`;
|
|
882
|
+
function So(t, e) {
|
|
883
|
+
for (let r = 0; r < t.length; r++)
|
|
884
|
+
t[r] === null && (t[r] = r ? t[r - 1] : e());
|
|
885
|
+
return t;
|
|
886
|
+
}
|
|
887
|
+
const Ro = (t) => Array.isArray(t) ? t : [t];
|
|
888
|
+
function $t(t) {
|
|
889
|
+
return qe[t] && (t = qe[t]), Tr(t) ? Ht(t) : t;
|
|
890
|
+
}
|
|
891
|
+
const je = {
|
|
892
|
+
get: (t, e) => {
|
|
893
|
+
e = $t(e);
|
|
894
|
+
let r = xt(e) ? t.style.getPropertyValue(e) : getComputedStyle(t)[e];
|
|
895
|
+
if (!r && r !== 0) {
|
|
896
|
+
const i = Ie.get(e);
|
|
897
|
+
i && (r = i.initialValue);
|
|
898
|
+
}
|
|
899
|
+
return r;
|
|
900
|
+
},
|
|
901
|
+
set: (t, e, r) => {
|
|
902
|
+
e = $t(e), xt(e) ? t.style.setProperty(e, r) : t.style[e] = r;
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
function Mr(t, e = !0) {
|
|
906
|
+
if (!(!t || t.playState === "finished"))
|
|
907
|
+
try {
|
|
908
|
+
t.stop ? t.stop() : (e && t.commitStyles(), t.cancel());
|
|
909
|
+
} catch {
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
function Do(t, e) {
|
|
913
|
+
var r;
|
|
914
|
+
let i = (e == null ? void 0 : e.toDefaultUnit) || q;
|
|
915
|
+
const o = t[t.length - 1];
|
|
916
|
+
if (mo(o)) {
|
|
917
|
+
const s = ((r = o.match(/(-?[\d.]+)([a-z%]*)/)) === null || r === void 0 ? void 0 : r[2]) || "";
|
|
918
|
+
s && (i = (l) => l + s);
|
|
919
|
+
}
|
|
920
|
+
return i;
|
|
921
|
+
}
|
|
922
|
+
function Lo() {
|
|
923
|
+
return window.__MOTION_DEV_TOOLS_RECORD;
|
|
924
|
+
}
|
|
925
|
+
function ko(t, e, r, i = {}, o) {
|
|
926
|
+
const s = Lo(), l = i.record !== !1 && s;
|
|
927
|
+
let n, { duration: a = N.duration, delay: d = N.delay, endDelay: x = N.endDelay, repeat: $ = N.repeat, easing: p = N.easing, persist: O = !1, direction: g, offset: w, allowWebkitAcceleration: P = !1, autoplay: b = !0 } = i;
|
|
928
|
+
const M = Ir(t), S = Tr(e);
|
|
929
|
+
let k = de.waapi();
|
|
930
|
+
S && Ao(t, e);
|
|
931
|
+
const U = $t(e), Ne = yo(M.values, U), z = Ie.get(U);
|
|
932
|
+
return Mr(Ne.animation, !(bt(p) && Ne.generator) && i.record !== !1), () => {
|
|
933
|
+
const Ue = () => {
|
|
934
|
+
var E, $e;
|
|
935
|
+
return ($e = (E = je.get(t, U)) !== null && E !== void 0 ? E : z == null ? void 0 : z.initialValue) !== null && $e !== void 0 ? $e : 0;
|
|
936
|
+
};
|
|
937
|
+
let I = So(Ro(r), Ue);
|
|
938
|
+
const Ft = Do(I, z);
|
|
939
|
+
if (bt(p)) {
|
|
940
|
+
const E = p.createAnimation(I, e !== "opacity", Ue, U, Ne);
|
|
941
|
+
p = E.easing, I = E.keyframes || I, a = E.duration || a;
|
|
942
|
+
}
|
|
943
|
+
if (xt(U) && (de.cssRegisterProperty() ? Io(U) : k = !1), S && !de.linearEasing() && (fe(p) || he(p) && p.some(fe)) && (k = !1), k) {
|
|
944
|
+
z && (I = I.map((J) => Fe(J) ? z.toDefaultUnit(J) : J)), I.length === 1 && (!de.partialKeyframes() || l) && I.unshift(Ue());
|
|
945
|
+
const E = {
|
|
946
|
+
delay: Oe.ms(d),
|
|
947
|
+
duration: Oe.ms(a),
|
|
948
|
+
endDelay: Oe.ms(x),
|
|
949
|
+
easing: he(p) ? void 0 : cr(p, a),
|
|
950
|
+
direction: g,
|
|
951
|
+
iterations: $ + 1,
|
|
952
|
+
fill: "both"
|
|
953
|
+
};
|
|
954
|
+
n = t.animate({
|
|
955
|
+
[U]: I,
|
|
956
|
+
offset: w,
|
|
957
|
+
easing: he(p) ? p.map((J) => cr(J, a)) : void 0
|
|
958
|
+
}, E), n.finished || (n.finished = new Promise((J, Ur) => {
|
|
959
|
+
n.onfinish = J, n.oncancel = Ur;
|
|
960
|
+
}));
|
|
961
|
+
const $e = I[I.length - 1];
|
|
962
|
+
n.finished.then(() => {
|
|
963
|
+
O || (je.set(t, U, $e), n.cancel());
|
|
964
|
+
}).catch(Cr), P || (n.playbackRate = 1.000001);
|
|
965
|
+
} else if (o && S)
|
|
966
|
+
I = I.map((E) => typeof E == "string" ? parseFloat(E) : E), I.length === 1 && I.unshift(parseFloat(Ue())), n = new o((E) => {
|
|
967
|
+
je.set(t, U, Ft ? Ft(E) : E);
|
|
968
|
+
}, I, Object.assign(Object.assign({}, i), {
|
|
969
|
+
duration: a,
|
|
970
|
+
easing: p
|
|
971
|
+
}));
|
|
972
|
+
else {
|
|
973
|
+
const E = I[I.length - 1];
|
|
974
|
+
je.set(t, U, z && Fe(E) ? z.toDefaultUnit(E) : E);
|
|
975
|
+
}
|
|
976
|
+
return l && s(t, e, I, {
|
|
977
|
+
duration: a,
|
|
978
|
+
delay: d,
|
|
979
|
+
easing: p,
|
|
980
|
+
repeat: $,
|
|
981
|
+
offset: w
|
|
982
|
+
}, "motion-one"), Ne.setAnimation(n), n && !b && n.pause(), n;
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
const No = (t, e) => (
|
|
986
|
+
/**
|
|
987
|
+
* TODO: Make test for this
|
|
988
|
+
* Always return a new object otherwise delay is overwritten by results of stagger
|
|
989
|
+
* and this results in no stagger
|
|
990
|
+
*/
|
|
991
|
+
t[e] ? Object.assign(Object.assign({}, t), t[e]) : Object.assign({}, t)
|
|
992
|
+
);
|
|
993
|
+
function Uo(t, e) {
|
|
994
|
+
return typeof t == "string" ? t = document.querySelectorAll(t) : t instanceof Element && (t = [t]), Array.from(t || []);
|
|
995
|
+
}
|
|
996
|
+
const jo = (t) => t(), Wr = (t, e, r = N.duration) => new Proxy({
|
|
997
|
+
animations: t.map(jo).filter(Boolean),
|
|
998
|
+
duration: r,
|
|
999
|
+
options: e
|
|
1000
|
+
}, Bo), Ho = (t) => t.animations[0], Bo = {
|
|
1001
|
+
get: (t, e) => {
|
|
1002
|
+
const r = Ho(t);
|
|
1003
|
+
switch (e) {
|
|
1004
|
+
case "duration":
|
|
1005
|
+
return t.duration;
|
|
1006
|
+
case "currentTime":
|
|
1007
|
+
return Oe.s((r == null ? void 0 : r[e]) || 0);
|
|
1008
|
+
case "playbackRate":
|
|
1009
|
+
case "playState":
|
|
1010
|
+
return r == null ? void 0 : r[e];
|
|
1011
|
+
case "finished":
|
|
1012
|
+
return t.finished || (t.finished = Promise.all(t.animations.map(Zo)).catch(Cr)), t.finished;
|
|
1013
|
+
case "stop":
|
|
1014
|
+
return () => {
|
|
1015
|
+
t.animations.forEach((i) => Mr(i));
|
|
1016
|
+
};
|
|
1017
|
+
case "forEachNative":
|
|
1018
|
+
return (i) => {
|
|
1019
|
+
t.animations.forEach((o) => i(o, t));
|
|
1020
|
+
};
|
|
1021
|
+
default:
|
|
1022
|
+
return typeof (r == null ? void 0 : r[e]) > "u" ? void 0 : () => t.animations.forEach((i) => i[e]());
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
set: (t, e, r) => {
|
|
1026
|
+
switch (e) {
|
|
1027
|
+
case "currentTime":
|
|
1028
|
+
r = Oe.ms(r);
|
|
1029
|
+
case "playbackRate":
|
|
1030
|
+
for (let i = 0; i < t.animations.length; i++)
|
|
1031
|
+
t.animations[i][e] = r;
|
|
1032
|
+
return !0;
|
|
1033
|
+
}
|
|
1034
|
+
return !1;
|
|
1035
|
+
}
|
|
1036
|
+
}, Zo = (t) => t.finished;
|
|
1037
|
+
function zo(t, e, r) {
|
|
1038
|
+
return fe(t) ? t(e, r) : t;
|
|
1039
|
+
}
|
|
1040
|
+
function Vo(t) {
|
|
1041
|
+
return function(r, i, o = {}) {
|
|
1042
|
+
r = Uo(r);
|
|
1043
|
+
const s = r.length;
|
|
1044
|
+
yt(!!s, "No valid element provided."), yt(!!i, "No keyframes defined.");
|
|
1045
|
+
const l = [];
|
|
1046
|
+
for (let n = 0; n < s; n++) {
|
|
1047
|
+
const a = r[n];
|
|
1048
|
+
for (const d in i) {
|
|
1049
|
+
const x = No(o, d);
|
|
1050
|
+
x.delay = zo(x.delay, n, s);
|
|
1051
|
+
const $ = ko(a, d, i[d], x, t);
|
|
1052
|
+
l.push($);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return Wr(
|
|
1056
|
+
l,
|
|
1057
|
+
o,
|
|
1058
|
+
/**
|
|
1059
|
+
* TODO:
|
|
1060
|
+
* If easing is set to spring or glide, duration will be dynamically
|
|
1061
|
+
* generated. Ideally we would dynamically generate this from
|
|
1062
|
+
* animation.effect.getComputedTiming().duration but this isn't
|
|
1063
|
+
* supported in iOS13 or our number polyfill. Perhaps it's possible
|
|
1064
|
+
* to Proxy animations returned from animateStyle that has duration
|
|
1065
|
+
* as a getter.
|
|
1066
|
+
*/
|
|
1067
|
+
o.duration
|
|
1068
|
+
);
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
const Fo = Vo(Pr);
|
|
1072
|
+
function qo(t, e = {}) {
|
|
1073
|
+
return Wr([
|
|
1074
|
+
() => {
|
|
1075
|
+
const r = new Pr(t, [0, 1], e);
|
|
1076
|
+
return r.finished.catch(() => {
|
|
1077
|
+
}), r;
|
|
1078
|
+
}
|
|
1079
|
+
], e, e.duration);
|
|
1080
|
+
}
|
|
1081
|
+
function re(t, e, r) {
|
|
1082
|
+
return (fe(t) ? qo : Fo)(t, e, r);
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* @license
|
|
1086
|
+
* Copyright 2018 Google LLC
|
|
1087
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1088
|
+
*/
|
|
1089
|
+
const R = (t) => t ?? T;
|
|
1090
|
+
var Ko = Object.defineProperty, dr = Object.getOwnPropertySymbols, Qo = Object.prototype.hasOwnProperty, Go = Object.prototype.propertyIsEnumerable, hr = (t, e, r) => e in t ? Ko(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, pt = (t, e) => {
|
|
1091
|
+
for (var r in e || (e = {}))
|
|
1092
|
+
Qo.call(e, r) && hr(t, r, e[r]);
|
|
1093
|
+
if (dr)
|
|
1094
|
+
for (var r of dr(e))
|
|
1095
|
+
Go.call(e, r) && hr(t, r, e[r]);
|
|
1096
|
+
return t;
|
|
1097
|
+
};
|
|
1098
|
+
function Yo() {
|
|
1099
|
+
var t;
|
|
1100
|
+
const e = (t = pe.state.themeMode) != null ? t : "dark", i = {
|
|
1101
|
+
light: {
|
|
1102
|
+
foreground: { 1: "rgb(20,20,20)", 2: "rgb(121,134,134)", 3: "rgb(158,169,169)" },
|
|
1103
|
+
background: { 1: "rgb(255,255,255)", 2: "rgb(241,243,243)", 3: "rgb(228,231,231)" },
|
|
1104
|
+
overlay: "rgba(0,0,0,0.1)"
|
|
1105
|
+
},
|
|
1106
|
+
dark: {
|
|
1107
|
+
foreground: { 1: "rgb(228,231,231)", 2: "rgb(148,158,158)", 3: "rgb(110,119,119)" },
|
|
1108
|
+
background: { 1: "rgb(20,20,20)", 2: "rgb(39,42,42)", 3: "rgb(59,64,64)" },
|
|
1109
|
+
overlay: "rgba(255,255,255,0.1)"
|
|
1110
|
+
}
|
|
1111
|
+
}[e];
|
|
1112
|
+
return {
|
|
1113
|
+
"--wcm-color-fg-1": i.foreground[1],
|
|
1114
|
+
"--wcm-color-fg-2": i.foreground[2],
|
|
1115
|
+
"--wcm-color-fg-3": i.foreground[3],
|
|
1116
|
+
"--wcm-color-bg-1": i.background[1],
|
|
1117
|
+
"--wcm-color-bg-2": i.background[2],
|
|
1118
|
+
"--wcm-color-bg-3": i.background[3],
|
|
1119
|
+
"--wcm-color-overlay": i.overlay
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
function mr() {
|
|
1123
|
+
return {
|
|
1124
|
+
"--wcm-accent-color": "#3396FF",
|
|
1125
|
+
"--wcm-accent-fill-color": "#FFFFFF",
|
|
1126
|
+
"--wcm-z-index": "89",
|
|
1127
|
+
"--wcm-background-color": "#3396FF",
|
|
1128
|
+
"--wcm-background-border-radius": "8px",
|
|
1129
|
+
"--wcm-container-border-radius": "30px",
|
|
1130
|
+
"--wcm-wallet-icon-border-radius": "15px",
|
|
1131
|
+
"--wcm-wallet-icon-large-border-radius": "30px",
|
|
1132
|
+
"--wcm-wallet-icon-small-border-radius": "7px",
|
|
1133
|
+
"--wcm-input-border-radius": "28px",
|
|
1134
|
+
"--wcm-button-border-radius": "10px",
|
|
1135
|
+
"--wcm-notification-border-radius": "36px",
|
|
1136
|
+
"--wcm-secondary-button-border-radius": "28px",
|
|
1137
|
+
"--wcm-icon-button-border-radius": "50%",
|
|
1138
|
+
"--wcm-button-hover-highlight-border-radius": "10px",
|
|
1139
|
+
"--wcm-text-big-bold-size": "20px",
|
|
1140
|
+
"--wcm-text-big-bold-weight": "600",
|
|
1141
|
+
"--wcm-text-big-bold-line-height": "24px",
|
|
1142
|
+
"--wcm-text-big-bold-letter-spacing": "-0.03em",
|
|
1143
|
+
"--wcm-text-big-bold-text-transform": "none",
|
|
1144
|
+
"--wcm-text-xsmall-bold-size": "10px",
|
|
1145
|
+
"--wcm-text-xsmall-bold-weight": "700",
|
|
1146
|
+
"--wcm-text-xsmall-bold-line-height": "12px",
|
|
1147
|
+
"--wcm-text-xsmall-bold-letter-spacing": "0.02em",
|
|
1148
|
+
"--wcm-text-xsmall-bold-text-transform": "uppercase",
|
|
1149
|
+
"--wcm-text-xsmall-regular-size": "12px",
|
|
1150
|
+
"--wcm-text-xsmall-regular-weight": "600",
|
|
1151
|
+
"--wcm-text-xsmall-regular-line-height": "14px",
|
|
1152
|
+
"--wcm-text-xsmall-regular-letter-spacing": "-0.03em",
|
|
1153
|
+
"--wcm-text-xsmall-regular-text-transform": "none",
|
|
1154
|
+
"--wcm-text-small-thin-size": "14px",
|
|
1155
|
+
"--wcm-text-small-thin-weight": "500",
|
|
1156
|
+
"--wcm-text-small-thin-line-height": "16px",
|
|
1157
|
+
"--wcm-text-small-thin-letter-spacing": "-0.03em",
|
|
1158
|
+
"--wcm-text-small-thin-text-transform": "none",
|
|
1159
|
+
"--wcm-text-small-regular-size": "14px",
|
|
1160
|
+
"--wcm-text-small-regular-weight": "600",
|
|
1161
|
+
"--wcm-text-small-regular-line-height": "16px",
|
|
1162
|
+
"--wcm-text-small-regular-letter-spacing": "-0.03em",
|
|
1163
|
+
"--wcm-text-small-regular-text-transform": "none",
|
|
1164
|
+
"--wcm-text-medium-regular-size": "16px",
|
|
1165
|
+
"--wcm-text-medium-regular-weight": "600",
|
|
1166
|
+
"--wcm-text-medium-regular-line-height": "20px",
|
|
1167
|
+
"--wcm-text-medium-regular-letter-spacing": "-0.03em",
|
|
1168
|
+
"--wcm-text-medium-regular-text-transform": "none",
|
|
1169
|
+
"--wcm-font-family": "-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif",
|
|
1170
|
+
"--wcm-font-feature-settings": "'tnum' on, 'lnum' on, 'case' on",
|
|
1171
|
+
"--wcm-success-color": "rgb(38,181,98)",
|
|
1172
|
+
"--wcm-error-color": "rgb(242, 90, 103)",
|
|
1173
|
+
"--wcm-overlay-background-color": "rgba(0, 0, 0, 0.3)",
|
|
1174
|
+
"--wcm-overlay-backdrop-filter": "none"
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
const v = {
|
|
1178
|
+
getPreset(t) {
|
|
1179
|
+
return mr()[t];
|
|
1180
|
+
},
|
|
1181
|
+
setTheme() {
|
|
1182
|
+
const t = document.querySelector(":root"), { themeVariables: e } = pe.state;
|
|
1183
|
+
if (t) {
|
|
1184
|
+
const r = pt(pt(pt({}, Yo()), mr()), e);
|
|
1185
|
+
Object.entries(r).forEach(([i, o]) => t.style.setProperty(i, o));
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
globalCss: _`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`
|
|
1189
|
+
}, Xo = _`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;
|
|
1190
|
+
var Jo = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, be = (t, e, r, i) => {
|
|
1191
|
+
for (var o = i > 1 ? void 0 : i ? ei(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1192
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1193
|
+
return i && o && Jo(e, r, o), o;
|
|
1194
|
+
};
|
|
1195
|
+
let Q = class extends f {
|
|
1196
|
+
constructor() {
|
|
1197
|
+
super(...arguments), this.disabled = !1, this.iconLeft = void 0, this.iconRight = void 0, this.onClick = () => null, this.variant = "default";
|
|
1198
|
+
}
|
|
1199
|
+
// -- render ------------------------------------------------------- //
|
|
1200
|
+
render() {
|
|
1201
|
+
const t = {
|
|
1202
|
+
"wcm-icon-left": this.iconLeft !== void 0,
|
|
1203
|
+
"wcm-icon-right": this.iconRight !== void 0,
|
|
1204
|
+
"wcm-ghost": this.variant === "ghost",
|
|
1205
|
+
"wcm-outline": this.variant === "outline"
|
|
1206
|
+
};
|
|
1207
|
+
let e = "inverse";
|
|
1208
|
+
return this.variant === "ghost" && (e = "secondary"), this.variant === "outline" && (e = "accent"), c`<button class="${Z(t)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<wcm-text variant="small-regular" color="${e}"><slot></slot></wcm-text>${this.iconRight}</button>`;
|
|
1209
|
+
}
|
|
1210
|
+
};
|
|
1211
|
+
Q.styles = [v.globalCss, Xo];
|
|
1212
|
+
be([
|
|
1213
|
+
u({ type: Boolean })
|
|
1214
|
+
], Q.prototype, "disabled", 2);
|
|
1215
|
+
be([
|
|
1216
|
+
u()
|
|
1217
|
+
], Q.prototype, "iconLeft", 2);
|
|
1218
|
+
be([
|
|
1219
|
+
u()
|
|
1220
|
+
], Q.prototype, "iconRight", 2);
|
|
1221
|
+
be([
|
|
1222
|
+
u()
|
|
1223
|
+
], Q.prototype, "onClick", 2);
|
|
1224
|
+
be([
|
|
1225
|
+
u()
|
|
1226
|
+
], Q.prototype, "variant", 2);
|
|
1227
|
+
Q = be([
|
|
1228
|
+
y("wcm-button")
|
|
1229
|
+
], Q);
|
|
1230
|
+
const ti = _`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;
|
|
1231
|
+
var ri = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, Bt = (t, e, r, i) => {
|
|
1232
|
+
for (var o = i > 1 ? void 0 : i ? oi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1233
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1234
|
+
return i && o && ri(e, r, o), o;
|
|
1235
|
+
};
|
|
1236
|
+
let Te = class extends f {
|
|
1237
|
+
constructor() {
|
|
1238
|
+
super(...arguments), this.disabled = !1, this.variant = "primary";
|
|
1239
|
+
}
|
|
1240
|
+
// -- render ------------------------------------------------------- //
|
|
1241
|
+
render() {
|
|
1242
|
+
const t = {
|
|
1243
|
+
"wcm-secondary": this.variant === "secondary"
|
|
1244
|
+
};
|
|
1245
|
+
return c`<button ?disabled="${this.disabled}" class="${Z(t)}"><slot></slot></button>`;
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
Te.styles = [v.globalCss, ti];
|
|
1249
|
+
Bt([
|
|
1250
|
+
u({ type: Boolean })
|
|
1251
|
+
], Te.prototype, "disabled", 2);
|
|
1252
|
+
Bt([
|
|
1253
|
+
u()
|
|
1254
|
+
], Te.prototype, "variant", 2);
|
|
1255
|
+
Te = Bt([
|
|
1256
|
+
y("wcm-button-big")
|
|
1257
|
+
], Te);
|
|
1258
|
+
const ii = _`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;
|
|
1259
|
+
var si = Object.getOwnPropertyDescriptor, li = (t, e, r, i) => {
|
|
1260
|
+
for (var o = i > 1 ? void 0 : i ? si(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1261
|
+
(l = t[s]) && (o = l(o) || o);
|
|
1262
|
+
return o;
|
|
1263
|
+
};
|
|
1264
|
+
let _t = class extends f {
|
|
1265
|
+
// -- render ------------------------------------------------------- //
|
|
1266
|
+
render() {
|
|
1267
|
+
return c`<div><slot></slot></div>`;
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
_t.styles = [v.globalCss, ii];
|
|
1271
|
+
_t = li([
|
|
1272
|
+
y("wcm-info-footer")
|
|
1273
|
+
], _t);
|
|
1274
|
+
const C = {
|
|
1275
|
+
CROSS_ICON: W`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,
|
|
1276
|
+
WALLET_CONNECT_LOGO: W`<svg width="178" height="29" viewBox="0 0 178 29" id="wcm-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,
|
|
1277
|
+
WALLET_CONNECT_ICON: W`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,
|
|
1278
|
+
WALLET_CONNECT_ICON_COLORED: W`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,
|
|
1279
|
+
BACK_ICON: W`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,
|
|
1280
|
+
COPY_ICON: W`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,
|
|
1281
|
+
RETRY_ICON: W`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,
|
|
1282
|
+
DESKTOP_ICON: W`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,
|
|
1283
|
+
MOBILE_ICON: W`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,
|
|
1284
|
+
ARROW_DOWN_ICON: W`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,
|
|
1285
|
+
ARROW_UP_RIGHT_ICON: W`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,
|
|
1286
|
+
ARROW_RIGHT_ICON: W`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,
|
|
1287
|
+
QRCODE_ICON: W`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,
|
|
1288
|
+
SCAN_ICON: W`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,
|
|
1289
|
+
CHECKMARK_ICON: W`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,
|
|
1290
|
+
SEARCH_ICON: W`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,
|
|
1291
|
+
WALLET_PLACEHOLDER: W`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,
|
|
1292
|
+
GLOBE_ICON: W`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>`
|
|
1293
|
+
}, ni = _`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;
|
|
1294
|
+
var ai = Object.getOwnPropertyDescriptor, ci = (t, e, r, i) => {
|
|
1295
|
+
for (var o = i > 1 ? void 0 : i ? ai(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1296
|
+
(l = t[s]) && (o = l(o) || o);
|
|
1297
|
+
return o;
|
|
1298
|
+
};
|
|
1299
|
+
let Ct = class extends f {
|
|
1300
|
+
// -- render ------------------------------------------------------- //
|
|
1301
|
+
render() {
|
|
1302
|
+
return c`<div class="wcm-toolbar-placeholder"></div><div class="wcm-toolbar">${C.WALLET_CONNECT_LOGO} <button @click="${He.close}">${C.CROSS_ICON}</button></div>`;
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
Ct.styles = [v.globalCss, ni];
|
|
1306
|
+
Ct = ci([
|
|
1307
|
+
y("wcm-modal-backcard")
|
|
1308
|
+
], Ct);
|
|
1309
|
+
const di = _`main{padding:20px;padding-top:0;width:100%}`;
|
|
1310
|
+
var hi = Object.getOwnPropertyDescriptor, mi = (t, e, r, i) => {
|
|
1311
|
+
for (var o = i > 1 ? void 0 : i ? hi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1312
|
+
(l = t[s]) && (o = l(o) || o);
|
|
1313
|
+
return o;
|
|
1314
|
+
};
|
|
1315
|
+
let Ot = class extends f {
|
|
1316
|
+
// -- render ------------------------------------------------------- //
|
|
1317
|
+
render() {
|
|
1318
|
+
return c`<main><slot></slot></main>`;
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
Ot.styles = [v.globalCss, di];
|
|
1322
|
+
Ot = mi([
|
|
1323
|
+
y("wcm-modal-content")
|
|
1324
|
+
], Ot);
|
|
1325
|
+
const pi = _`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;
|
|
1326
|
+
var ui = Object.getOwnPropertyDescriptor, wi = (t, e, r, i) => {
|
|
1327
|
+
for (var o = i > 1 ? void 0 : i ? ui(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1328
|
+
(l = t[s]) && (o = l(o) || o);
|
|
1329
|
+
return o;
|
|
1330
|
+
};
|
|
1331
|
+
let At = class extends f {
|
|
1332
|
+
// -- render ------------------------------------------------------- //
|
|
1333
|
+
render() {
|
|
1334
|
+
return c`<footer><slot></slot></footer>`;
|
|
1335
|
+
}
|
|
1336
|
+
};
|
|
1337
|
+
At.styles = [v.globalCss, pi];
|
|
1338
|
+
At = wi([
|
|
1339
|
+
y("wcm-modal-footer")
|
|
1340
|
+
], At);
|
|
1341
|
+
const fi = _`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;
|
|
1342
|
+
var vi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, De = (t, e, r, i) => {
|
|
1343
|
+
for (var o = i > 1 ? void 0 : i ? gi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1344
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1345
|
+
return i && o && vi(e, r, o), o;
|
|
1346
|
+
};
|
|
1347
|
+
let le = class extends f {
|
|
1348
|
+
constructor() {
|
|
1349
|
+
super(...arguments), this.title = "", this.onAction = void 0, this.actionIcon = void 0, this.border = !1;
|
|
1350
|
+
}
|
|
1351
|
+
// -- private ------------------------------------------------------ //
|
|
1352
|
+
backBtnTemplate() {
|
|
1353
|
+
return c`<button class="wcm-back-btn" @click="${A.goBack}">${C.BACK_ICON}</button>`;
|
|
1354
|
+
}
|
|
1355
|
+
actionBtnTemplate() {
|
|
1356
|
+
return c`<button class="wcm-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`;
|
|
1357
|
+
}
|
|
1358
|
+
// -- render ------------------------------------------------------- //
|
|
1359
|
+
render() {
|
|
1360
|
+
const t = {
|
|
1361
|
+
"wcm-border": this.border
|
|
1362
|
+
}, e = A.state.history.length > 1, r = this.title ? c`<wcm-text variant="big-bold">${this.title}</wcm-text>` : c`<slot></slot>`;
|
|
1363
|
+
return c`<header class="${Z(t)}">${e ? this.backBtnTemplate() : null} ${r} ${this.onAction ? this.actionBtnTemplate() : null}</header>`;
|
|
1364
|
+
}
|
|
1365
|
+
};
|
|
1366
|
+
le.styles = [v.globalCss, fi];
|
|
1367
|
+
De([
|
|
1368
|
+
u()
|
|
1369
|
+
], le.prototype, "title", 2);
|
|
1370
|
+
De([
|
|
1371
|
+
u()
|
|
1372
|
+
], le.prototype, "onAction", 2);
|
|
1373
|
+
De([
|
|
1374
|
+
u()
|
|
1375
|
+
], le.prototype, "actionIcon", 2);
|
|
1376
|
+
De([
|
|
1377
|
+
u({ type: Boolean })
|
|
1378
|
+
], le.prototype, "border", 2);
|
|
1379
|
+
le = De([
|
|
1380
|
+
y("wcm-modal-header")
|
|
1381
|
+
], le);
|
|
1382
|
+
const m = {
|
|
1383
|
+
MOBILE_BREAKPOINT: 600,
|
|
1384
|
+
WCM_RECENT_WALLET_DATA: "WCM_RECENT_WALLET_DATA",
|
|
1385
|
+
EXPLORER_WALLET_URL: "https://explorer.walletconnect.com/?type=wallet",
|
|
1386
|
+
getShadowRootElement(t, e) {
|
|
1387
|
+
const r = t.renderRoot.querySelector(e);
|
|
1388
|
+
if (!r)
|
|
1389
|
+
throw new Error(`${e} not found`);
|
|
1390
|
+
return r;
|
|
1391
|
+
},
|
|
1392
|
+
getWalletIcon({ id: t, image_id: e }) {
|
|
1393
|
+
const { walletImages: r } = oe.state;
|
|
1394
|
+
return r != null && r[t] ? r[t] : e ? D.getWalletImageUrl(e) : "";
|
|
1395
|
+
},
|
|
1396
|
+
getWalletName(t, e = !1) {
|
|
1397
|
+
return e && t.length > 8 ? `${t.substring(0, 8)}..` : t;
|
|
1398
|
+
},
|
|
1399
|
+
isMobileAnimation() {
|
|
1400
|
+
return window.innerWidth <= m.MOBILE_BREAKPOINT;
|
|
1401
|
+
},
|
|
1402
|
+
async preloadImage(t) {
|
|
1403
|
+
const e = new Promise((r, i) => {
|
|
1404
|
+
const o = new Image();
|
|
1405
|
+
o.onload = r, o.onerror = i, o.crossOrigin = "anonymous", o.src = t;
|
|
1406
|
+
});
|
|
1407
|
+
return Promise.race([e, h.wait(3e3)]);
|
|
1408
|
+
},
|
|
1409
|
+
getErrorMessage(t) {
|
|
1410
|
+
return t instanceof Error ? t.message : "Unknown Error";
|
|
1411
|
+
},
|
|
1412
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1413
|
+
debounce(t, e = 500) {
|
|
1414
|
+
let r;
|
|
1415
|
+
return (...i) => {
|
|
1416
|
+
function o() {
|
|
1417
|
+
t(...i);
|
|
1418
|
+
}
|
|
1419
|
+
r && clearTimeout(r), r = setTimeout(o, e);
|
|
1420
|
+
};
|
|
1421
|
+
},
|
|
1422
|
+
handleMobileLinking(t, e = "_self") {
|
|
1423
|
+
const { walletConnectUri: r } = j.state, { mobile: i, name: o } = t, s = i == null ? void 0 : i.native, l = i == null ? void 0 : i.universal;
|
|
1424
|
+
m.setRecentWallet(t);
|
|
1425
|
+
function n(a) {
|
|
1426
|
+
if (s) {
|
|
1427
|
+
const d = h.formatNativeUrl(s, a, o);
|
|
1428
|
+
h.openHref(d, e);
|
|
1429
|
+
} else if (l) {
|
|
1430
|
+
const d = h.formatUniversalUrl(l, a, o);
|
|
1431
|
+
h.openHref(d, e);
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
r && n(r);
|
|
1435
|
+
},
|
|
1436
|
+
handleAndroidLinking() {
|
|
1437
|
+
const { walletConnectUri: t } = j.state;
|
|
1438
|
+
t && (h.setWalletConnectAndroidDeepLink(t), h.openHref(t, h.isTelegram() ? "_blank" : "_self"));
|
|
1439
|
+
},
|
|
1440
|
+
async handleUriCopy() {
|
|
1441
|
+
const { walletConnectUri: t } = j.state;
|
|
1442
|
+
if (t)
|
|
1443
|
+
try {
|
|
1444
|
+
await navigator.clipboard.writeText(t), F.openToast("Link copied", "success");
|
|
1445
|
+
} catch {
|
|
1446
|
+
F.openToast("Failed to copy", "error");
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
getCustomImageUrls() {
|
|
1450
|
+
const { walletImages: t } = oe.state, e = Object.values(t ?? {});
|
|
1451
|
+
return Object.values(e);
|
|
1452
|
+
},
|
|
1453
|
+
truncate(t, e = 8) {
|
|
1454
|
+
return t.length <= e ? t : `${t.substring(0, 4)}...${t.substring(t.length - 4)}`;
|
|
1455
|
+
},
|
|
1456
|
+
setRecentWallet(t) {
|
|
1457
|
+
try {
|
|
1458
|
+
localStorage.setItem(m.WCM_RECENT_WALLET_DATA, JSON.stringify(t));
|
|
1459
|
+
} catch {
|
|
1460
|
+
console.info("Unable to set recent wallet");
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
getRecentWallet() {
|
|
1464
|
+
try {
|
|
1465
|
+
const t = localStorage.getItem(m.WCM_RECENT_WALLET_DATA);
|
|
1466
|
+
return t ? JSON.parse(t) : void 0;
|
|
1467
|
+
} catch {
|
|
1468
|
+
console.info("Unable to get recent wallet");
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
caseSafeIncludes(t, e) {
|
|
1472
|
+
return t.toUpperCase().includes(e.toUpperCase());
|
|
1473
|
+
},
|
|
1474
|
+
openWalletExplorerUrl() {
|
|
1475
|
+
h.openHref(m.EXPLORER_WALLET_URL, "_blank");
|
|
1476
|
+
},
|
|
1477
|
+
getCachedRouterWalletPlatforms() {
|
|
1478
|
+
const { desktop: t, mobile: e } = h.getWalletRouterData(), r = !!(t != null && t.native), i = !!(t != null && t.universal), o = !!(e != null && e.native) || !!(e != null && e.universal);
|
|
1479
|
+
return { isDesktop: r, isMobile: o, isWeb: i };
|
|
1480
|
+
},
|
|
1481
|
+
goToConnectingView(t) {
|
|
1482
|
+
A.setData({ Wallet: t });
|
|
1483
|
+
const e = h.isMobile(), { isDesktop: r, isWeb: i, isMobile: o } = m.getCachedRouterWalletPlatforms();
|
|
1484
|
+
e ? o ? (A.push("MobileConnecting"), !h.isAndroid() && h.isTelegram() && this.handleMobileLinking(t, "_blank")) : i ? A.push("WebConnecting") : A.push("InstallWallet") : r ? A.push("DesktopConnecting") : i ? A.push("WebConnecting") : o ? A.push("MobileQrcodeConnecting") : A.push("InstallWallet");
|
|
1485
|
+
}
|
|
1486
|
+
}, bi = _`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;
|
|
1487
|
+
var yi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Zt = (t, e, r, i) => {
|
|
1488
|
+
for (var o = i > 1 ? void 0 : i ? xi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1489
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1490
|
+
return i && o && yi(e, r, o), o;
|
|
1491
|
+
};
|
|
1492
|
+
let Me = class extends f {
|
|
1493
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
1494
|
+
constructor() {
|
|
1495
|
+
super(), this.view = A.state.view, this.prevView = A.state.view, this.unsubscribe = void 0, this.oldHeight = "0px", this.resizeObserver = void 0, this.unsubscribe = A.subscribe((t) => {
|
|
1496
|
+
this.view !== t.view && this.onChangeRoute();
|
|
1497
|
+
});
|
|
1498
|
+
}
|
|
1499
|
+
firstUpdated() {
|
|
1500
|
+
this.resizeObserver = new ResizeObserver(([t]) => {
|
|
1501
|
+
const e = `${t.contentRect.height}px`;
|
|
1502
|
+
this.oldHeight !== "0px" && re(this.routerEl, { height: [this.oldHeight, e] }, { duration: 0.2 }), this.oldHeight = e;
|
|
1503
|
+
}), this.resizeObserver.observe(this.contentEl);
|
|
1504
|
+
}
|
|
1505
|
+
disconnectedCallback() {
|
|
1506
|
+
var t, e;
|
|
1507
|
+
(t = this.unsubscribe) == null || t.call(this), (e = this.resizeObserver) == null || e.disconnect();
|
|
1508
|
+
}
|
|
1509
|
+
get routerEl() {
|
|
1510
|
+
return m.getShadowRootElement(this, ".wcm-router");
|
|
1511
|
+
}
|
|
1512
|
+
get contentEl() {
|
|
1513
|
+
return m.getShadowRootElement(this, ".wcm-content");
|
|
1514
|
+
}
|
|
1515
|
+
viewTemplate() {
|
|
1516
|
+
switch (this.view) {
|
|
1517
|
+
case "ConnectWallet":
|
|
1518
|
+
return c`<wcm-connect-wallet-view></wcm-connect-wallet-view>`;
|
|
1519
|
+
case "DesktopConnecting":
|
|
1520
|
+
return c`<wcm-desktop-connecting-view></wcm-desktop-connecting-view>`;
|
|
1521
|
+
case "MobileConnecting":
|
|
1522
|
+
return c`<wcm-mobile-connecting-view></wcm-mobile-connecting-view>`;
|
|
1523
|
+
case "WebConnecting":
|
|
1524
|
+
return c`<wcm-web-connecting-view></wcm-web-connecting-view>`;
|
|
1525
|
+
case "MobileQrcodeConnecting":
|
|
1526
|
+
return c`<wcm-mobile-qr-connecting-view></wcm-mobile-qr-connecting-view>`;
|
|
1527
|
+
case "WalletExplorer":
|
|
1528
|
+
return c`<wcm-wallet-explorer-view></wcm-wallet-explorer-view>`;
|
|
1529
|
+
case "Qrcode":
|
|
1530
|
+
return c`<wcm-qrcode-view></wcm-qrcode-view>`;
|
|
1531
|
+
case "InstallWallet":
|
|
1532
|
+
return c`<wcm-install-wallet-view></wcm-install-wallet-view>`;
|
|
1533
|
+
default:
|
|
1534
|
+
return c`<div>Not Found</div>`;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
async onChangeRoute() {
|
|
1538
|
+
await re(
|
|
1539
|
+
this.routerEl,
|
|
1540
|
+
{ opacity: [1, 0], scale: [1, 1.02] },
|
|
1541
|
+
{ duration: 0.15, delay: 0.1 }
|
|
1542
|
+
).finished, this.view = A.state.view, re(this.routerEl, { opacity: [0, 1], scale: [0.99, 1] }, { duration: 0.37, delay: 0.05 });
|
|
1543
|
+
}
|
|
1544
|
+
// -- render ------------------------------------------------------- //
|
|
1545
|
+
render() {
|
|
1546
|
+
return c`<div class="wcm-router"><div class="wcm-content">${this.viewTemplate()}</div></div>`;
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
Me.styles = [v.globalCss, bi];
|
|
1550
|
+
Zt([
|
|
1551
|
+
L()
|
|
1552
|
+
], Me.prototype, "view", 2);
|
|
1553
|
+
Zt([
|
|
1554
|
+
L()
|
|
1555
|
+
], Me.prototype, "prevView", 2);
|
|
1556
|
+
Me = Zt([
|
|
1557
|
+
y("wcm-modal-router")
|
|
1558
|
+
], Me);
|
|
1559
|
+
const $i = _`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;
|
|
1560
|
+
var _i = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Sr = (t, e, r, i) => {
|
|
1561
|
+
for (var o = i > 1 ? void 0 : i ? Ci(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1562
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1563
|
+
return i && o && _i(e, r, o), o;
|
|
1564
|
+
};
|
|
1565
|
+
let Qe = class extends f {
|
|
1566
|
+
constructor() {
|
|
1567
|
+
super(), this.open = !1, this.unsubscribe = void 0, this.timeout = void 0, this.unsubscribe = F.subscribe((t) => {
|
|
1568
|
+
t.open ? (this.open = !0, this.timeout = setTimeout(() => F.closeToast(), 2200)) : (this.open = !1, clearTimeout(this.timeout));
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
disconnectedCallback() {
|
|
1572
|
+
var t;
|
|
1573
|
+
(t = this.unsubscribe) == null || t.call(this), clearTimeout(this.timeout), F.closeToast();
|
|
1574
|
+
}
|
|
1575
|
+
// -- render ------------------------------------------------------- //
|
|
1576
|
+
render() {
|
|
1577
|
+
const { message: t, variant: e } = F.state, r = {
|
|
1578
|
+
"wcm-success": e === "success",
|
|
1579
|
+
"wcm-error": e === "error"
|
|
1580
|
+
};
|
|
1581
|
+
return this.open ? c`<div class="${Z(r)}">${e === "success" ? C.CHECKMARK_ICON : null} ${e === "error" ? C.CROSS_ICON : null}<wcm-text variant="small-regular">${t}</wcm-text></div>` : null;
|
|
1582
|
+
}
|
|
1583
|
+
};
|
|
1584
|
+
Qe.styles = [v.globalCss, $i];
|
|
1585
|
+
Sr([
|
|
1586
|
+
L()
|
|
1587
|
+
], Qe.prototype, "open", 2);
|
|
1588
|
+
Qe = Sr([
|
|
1589
|
+
y("wcm-modal-toast")
|
|
1590
|
+
], Qe);
|
|
1591
|
+
const Oi = 0.1, pr = 2.5, B = 7;
|
|
1592
|
+
function ut(t, e, r) {
|
|
1593
|
+
return t === e ? !1 : (t - e < 0 ? e - t : t - e) <= r + Oi;
|
|
1594
|
+
}
|
|
1595
|
+
function Ai(t, e) {
|
|
1596
|
+
const r = Array.prototype.slice.call(
|
|
1597
|
+
Hr.create(t, { errorCorrectionLevel: e }).modules.data,
|
|
1598
|
+
0
|
|
1599
|
+
), i = Math.sqrt(r.length);
|
|
1600
|
+
return r.reduce(
|
|
1601
|
+
(o, s, l) => (l % i === 0 ? o.push([s]) : o[o.length - 1].push(s)) && o,
|
|
1602
|
+
[]
|
|
1603
|
+
);
|
|
1604
|
+
}
|
|
1605
|
+
const Ei = {
|
|
1606
|
+
generate(t, e, r) {
|
|
1607
|
+
const i = "#141414", o = "#ffffff", s = [], l = Ai(t, "Q"), n = e / l.length, a = [
|
|
1608
|
+
{ x: 0, y: 0 },
|
|
1609
|
+
{ x: 1, y: 0 },
|
|
1610
|
+
{ x: 0, y: 1 }
|
|
1611
|
+
];
|
|
1612
|
+
a.forEach(({ x: g, y: w }) => {
|
|
1613
|
+
const P = (l.length - B) * n * g, b = (l.length - B) * n * w, M = 0.45;
|
|
1614
|
+
for (let S = 0; S < a.length; S += 1) {
|
|
1615
|
+
const k = n * (B - S * 2);
|
|
1616
|
+
s.push(
|
|
1617
|
+
Ze`<rect fill="${S % 2 === 0 ? i : o}" height="${k}" rx="${k * M}" ry="${k * M}" width="${k}" x="${P + n * S}" y="${b + n * S}">`
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1620
|
+
});
|
|
1621
|
+
const d = Math.floor((r + 25) / n), x = l.length / 2 - d / 2, $ = l.length / 2 + d / 2 - 1, p = [];
|
|
1622
|
+
l.forEach((g, w) => {
|
|
1623
|
+
g.forEach((P, b) => {
|
|
1624
|
+
if (l[w][b] && !(w < B && b < B || w > l.length - (B + 1) && b < B || w < B && b > l.length - (B + 1)) && !(w > x && w < $ && b > x && b < $)) {
|
|
1625
|
+
const M = w * n + n / 2, S = b * n + n / 2;
|
|
1626
|
+
p.push([M, S]);
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1629
|
+
});
|
|
1630
|
+
const O = {};
|
|
1631
|
+
return p.forEach(([g, w]) => {
|
|
1632
|
+
O[g] ? O[g].push(w) : O[g] = [w];
|
|
1633
|
+
}), Object.entries(O).map(([g, w]) => {
|
|
1634
|
+
const P = w.filter(
|
|
1635
|
+
(b) => w.every((M) => !ut(b, M, n))
|
|
1636
|
+
);
|
|
1637
|
+
return [Number(g), P];
|
|
1638
|
+
}).forEach(([g, w]) => {
|
|
1639
|
+
w.forEach((P) => {
|
|
1640
|
+
s.push(
|
|
1641
|
+
Ze`<circle cx="${g}" cy="${P}" fill="${i}" r="${n / pr}">`
|
|
1642
|
+
);
|
|
1643
|
+
});
|
|
1644
|
+
}), Object.entries(O).filter(([g, w]) => w.length > 1).map(([g, w]) => {
|
|
1645
|
+
const P = w.filter((b) => w.some((M) => ut(b, M, n)));
|
|
1646
|
+
return [Number(g), P];
|
|
1647
|
+
}).map(([g, w]) => {
|
|
1648
|
+
w.sort((b, M) => b < M ? -1 : 1);
|
|
1649
|
+
const P = [];
|
|
1650
|
+
for (const b of w) {
|
|
1651
|
+
const M = P.find(
|
|
1652
|
+
(S) => S.some((k) => ut(b, k, n))
|
|
1653
|
+
);
|
|
1654
|
+
M ? M.push(b) : P.push([b]);
|
|
1655
|
+
}
|
|
1656
|
+
return [g, P.map((b) => [b[0], b[b.length - 1]])];
|
|
1657
|
+
}).forEach(([g, w]) => {
|
|
1658
|
+
w.forEach(([P, b]) => {
|
|
1659
|
+
s.push(
|
|
1660
|
+
Ze`<line x1="${g}" x2="${g}" y1="${P}" y2="${b}" stroke="${i}" stroke-width="${n / (pr / 2)}" stroke-linecap="round">`
|
|
1661
|
+
);
|
|
1662
|
+
});
|
|
1663
|
+
}), s;
|
|
1664
|
+
}
|
|
1665
|
+
}, Pi = _`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;
|
|
1666
|
+
var Ii = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, ye = (t, e, r, i) => {
|
|
1667
|
+
for (var o = i > 1 ? void 0 : i ? Ti(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1668
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1669
|
+
return i && o && Ii(e, r, o), o;
|
|
1670
|
+
};
|
|
1671
|
+
let G = class extends f {
|
|
1672
|
+
constructor() {
|
|
1673
|
+
super(...arguments), this.uri = "", this.size = 0, this.imageId = void 0, this.walletId = void 0, this.imageUrl = void 0;
|
|
1674
|
+
}
|
|
1675
|
+
// -- private ------------------------------------------------------ //
|
|
1676
|
+
svgTemplate() {
|
|
1677
|
+
const e = pe.state.themeMode === "light" ? this.size : this.size - 18 * 2;
|
|
1678
|
+
return Ze`<svg height="${e}" width="${e}">${Ei.generate(this.uri, e, e / 4)}</svg>`;
|
|
1679
|
+
}
|
|
1680
|
+
// -- render ------------------------------------------------------- //
|
|
1681
|
+
render() {
|
|
1682
|
+
const t = {
|
|
1683
|
+
"wcm-dark": pe.state.themeMode === "dark"
|
|
1684
|
+
};
|
|
1685
|
+
return c`<div style="${`width: ${this.size}px`}" class="${Z(t)}">${this.walletId || this.imageUrl ? c`<wcm-wallet-image walletId="${R(this.walletId)}" imageId="${R(this.imageId)}" imageUrl="${R(this.imageUrl)}"></wcm-wallet-image>` : C.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`;
|
|
1686
|
+
}
|
|
1687
|
+
};
|
|
1688
|
+
G.styles = [v.globalCss, Pi];
|
|
1689
|
+
ye([
|
|
1690
|
+
u()
|
|
1691
|
+
], G.prototype, "uri", 2);
|
|
1692
|
+
ye([
|
|
1693
|
+
u({ type: Number })
|
|
1694
|
+
], G.prototype, "size", 2);
|
|
1695
|
+
ye([
|
|
1696
|
+
u()
|
|
1697
|
+
], G.prototype, "imageId", 2);
|
|
1698
|
+
ye([
|
|
1699
|
+
u()
|
|
1700
|
+
], G.prototype, "walletId", 2);
|
|
1701
|
+
ye([
|
|
1702
|
+
u()
|
|
1703
|
+
], G.prototype, "imageUrl", 2);
|
|
1704
|
+
G = ye([
|
|
1705
|
+
y("wcm-qrcode")
|
|
1706
|
+
], G);
|
|
1707
|
+
const Mi = _`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;
|
|
1708
|
+
var Wi = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, Rr = (t, e, r, i) => {
|
|
1709
|
+
for (var o = i > 1 ? void 0 : i ? Si(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1710
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1711
|
+
return i && o && Wi(e, r, o), o;
|
|
1712
|
+
};
|
|
1713
|
+
let Ge = class extends f {
|
|
1714
|
+
constructor() {
|
|
1715
|
+
super(...arguments), this.onChange = () => null;
|
|
1716
|
+
}
|
|
1717
|
+
// -- render ------------------------------------------------------- //
|
|
1718
|
+
render() {
|
|
1719
|
+
return c`<input type="text" @input="${this.onChange}" placeholder="Search wallets"> ${C.SEARCH_ICON}`;
|
|
1720
|
+
}
|
|
1721
|
+
};
|
|
1722
|
+
Ge.styles = [v.globalCss, Mi];
|
|
1723
|
+
Rr([
|
|
1724
|
+
u()
|
|
1725
|
+
], Ge.prototype, "onChange", 2);
|
|
1726
|
+
Ge = Rr([
|
|
1727
|
+
y("wcm-search-input")
|
|
1728
|
+
], Ge);
|
|
1729
|
+
const Ri = _`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;
|
|
1730
|
+
var Di = Object.getOwnPropertyDescriptor, Li = (t, e, r, i) => {
|
|
1731
|
+
for (var o = i > 1 ? void 0 : i ? Di(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1732
|
+
(l = t[s]) && (o = l(o) || o);
|
|
1733
|
+
return o;
|
|
1734
|
+
};
|
|
1735
|
+
let Et = class extends f {
|
|
1736
|
+
// -- render ------------------------------------------------------- //
|
|
1737
|
+
render() {
|
|
1738
|
+
return c`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`;
|
|
1739
|
+
}
|
|
1740
|
+
};
|
|
1741
|
+
Et.styles = [v.globalCss, Ri];
|
|
1742
|
+
Et = Li([
|
|
1743
|
+
y("wcm-spinner")
|
|
1744
|
+
], Et);
|
|
1745
|
+
const ki = _`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;
|
|
1746
|
+
var Ni = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, zt = (t, e, r, i) => {
|
|
1747
|
+
for (var o = i > 1 ? void 0 : i ? Ui(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1748
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1749
|
+
return i && o && Ni(e, r, o), o;
|
|
1750
|
+
};
|
|
1751
|
+
let We = class extends f {
|
|
1752
|
+
constructor() {
|
|
1753
|
+
super(...arguments), this.variant = "medium-regular", this.color = "primary";
|
|
1754
|
+
}
|
|
1755
|
+
// -- render ------------------------------------------------------- //
|
|
1756
|
+
render() {
|
|
1757
|
+
const t = {
|
|
1758
|
+
"wcm-big-bold": this.variant === "big-bold",
|
|
1759
|
+
"wcm-medium-regular": this.variant === "medium-regular",
|
|
1760
|
+
"wcm-small-regular": this.variant === "small-regular",
|
|
1761
|
+
"wcm-small-thin": this.variant === "small-thin",
|
|
1762
|
+
"wcm-xsmall-regular": this.variant === "xsmall-regular",
|
|
1763
|
+
"wcm-xsmall-bold": this.variant === "xsmall-bold",
|
|
1764
|
+
"wcm-color-primary": this.color === "primary",
|
|
1765
|
+
"wcm-color-secondary": this.color === "secondary",
|
|
1766
|
+
"wcm-color-tertiary": this.color === "tertiary",
|
|
1767
|
+
"wcm-color-inverse": this.color === "inverse",
|
|
1768
|
+
"wcm-color-accnt": this.color === "accent",
|
|
1769
|
+
"wcm-color-error": this.color === "error"
|
|
1770
|
+
};
|
|
1771
|
+
return c`<span><slot class="${Z(t)}"></slot></span>`;
|
|
1772
|
+
}
|
|
1773
|
+
};
|
|
1774
|
+
We.styles = [v.globalCss, ki];
|
|
1775
|
+
zt([
|
|
1776
|
+
u()
|
|
1777
|
+
], We.prototype, "variant", 2);
|
|
1778
|
+
zt([
|
|
1779
|
+
u()
|
|
1780
|
+
], We.prototype, "color", 2);
|
|
1781
|
+
We = zt([
|
|
1782
|
+
y("wcm-text")
|
|
1783
|
+
], We);
|
|
1784
|
+
const ji = _`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;
|
|
1785
|
+
var Hi = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, X = (t, e, r, i) => {
|
|
1786
|
+
for (var o = i > 1 ? void 0 : i ? Bi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1787
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1788
|
+
return i && o && Hi(e, r, o), o;
|
|
1789
|
+
};
|
|
1790
|
+
let H = class extends f {
|
|
1791
|
+
constructor() {
|
|
1792
|
+
super(...arguments), this.onClick = () => null, this.name = "", this.walletId = "", this.label = void 0, this.imageId = void 0, this.installed = !1, this.recent = !1;
|
|
1793
|
+
}
|
|
1794
|
+
// -- private ------------------------------------------------------ //
|
|
1795
|
+
sublabelTemplate() {
|
|
1796
|
+
return this.recent ? c`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">RECENT</wcm-text>` : this.installed ? c`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</wcm-text>` : null;
|
|
1797
|
+
}
|
|
1798
|
+
handleClick() {
|
|
1799
|
+
jr.click({ name: "WALLET_BUTTON", walletId: this.walletId }), this.onClick();
|
|
1800
|
+
}
|
|
1801
|
+
// -- render ------------------------------------------------------- //
|
|
1802
|
+
render() {
|
|
1803
|
+
var t;
|
|
1804
|
+
return c`<button @click="${this.handleClick.bind(this)}"><div><wcm-wallet-image walletId="${this.walletId}" imageId="${R(this.imageId)}"></wcm-wallet-image><wcm-text variant="xsmall-regular">${(t = this.label) != null ? t : m.getWalletName(this.name, !0)}</wcm-text>${this.sublabelTemplate()}</div></button>`;
|
|
1805
|
+
}
|
|
1806
|
+
};
|
|
1807
|
+
H.styles = [v.globalCss, ji];
|
|
1808
|
+
X([
|
|
1809
|
+
u()
|
|
1810
|
+
], H.prototype, "onClick", 2);
|
|
1811
|
+
X([
|
|
1812
|
+
u()
|
|
1813
|
+
], H.prototype, "name", 2);
|
|
1814
|
+
X([
|
|
1815
|
+
u()
|
|
1816
|
+
], H.prototype, "walletId", 2);
|
|
1817
|
+
X([
|
|
1818
|
+
u()
|
|
1819
|
+
], H.prototype, "label", 2);
|
|
1820
|
+
X([
|
|
1821
|
+
u()
|
|
1822
|
+
], H.prototype, "imageId", 2);
|
|
1823
|
+
X([
|
|
1824
|
+
u({ type: Boolean })
|
|
1825
|
+
], H.prototype, "installed", 2);
|
|
1826
|
+
X([
|
|
1827
|
+
u({ type: Boolean })
|
|
1828
|
+
], H.prototype, "recent", 2);
|
|
1829
|
+
H = X([
|
|
1830
|
+
y("wcm-wallet-button")
|
|
1831
|
+
], H);
|
|
1832
|
+
const Zi = _`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
|
|
1833
|
+
var zi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, tt = (t, e, r, i) => {
|
|
1834
|
+
for (var o = i > 1 ? void 0 : i ? Vi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1835
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1836
|
+
return i && o && zi(e, r, o), o;
|
|
1837
|
+
};
|
|
1838
|
+
let ve = class extends f {
|
|
1839
|
+
constructor() {
|
|
1840
|
+
super(...arguments), this.walletId = "", this.imageId = void 0, this.imageUrl = void 0;
|
|
1841
|
+
}
|
|
1842
|
+
// -- render ------------------------------------------------------- //
|
|
1843
|
+
render() {
|
|
1844
|
+
var t;
|
|
1845
|
+
const e = (t = this.imageUrl) != null && t.length ? this.imageUrl : m.getWalletIcon({ id: this.walletId, image_id: this.imageId });
|
|
1846
|
+
return c`${e.length ? c`<div><img crossorigin="anonymous" src="${e}" alt="${this.id}"></div>` : C.WALLET_PLACEHOLDER}`;
|
|
1847
|
+
}
|
|
1848
|
+
};
|
|
1849
|
+
ve.styles = [v.globalCss, Zi];
|
|
1850
|
+
tt([
|
|
1851
|
+
u()
|
|
1852
|
+
], ve.prototype, "walletId", 2);
|
|
1853
|
+
tt([
|
|
1854
|
+
u()
|
|
1855
|
+
], ve.prototype, "imageId", 2);
|
|
1856
|
+
tt([
|
|
1857
|
+
u()
|
|
1858
|
+
], ve.prototype, "imageUrl", 2);
|
|
1859
|
+
ve = tt([
|
|
1860
|
+
y("wcm-wallet-image")
|
|
1861
|
+
], ve);
|
|
1862
|
+
var Fi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, Dr = (t, e, r, i) => {
|
|
1863
|
+
for (var o = i > 1 ? void 0 : i ? qi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1864
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1865
|
+
return i && o && Fi(e, r, o), o;
|
|
1866
|
+
};
|
|
1867
|
+
let Pt = class extends f {
|
|
1868
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
1869
|
+
constructor() {
|
|
1870
|
+
super(), this.preload = !0, this.preloadData();
|
|
1871
|
+
}
|
|
1872
|
+
// -- private ------------------------------------------------------ //
|
|
1873
|
+
async loadImages(t) {
|
|
1874
|
+
try {
|
|
1875
|
+
t != null && t.length && await Promise.all(t.map(async (e) => m.preloadImage(e)));
|
|
1876
|
+
} catch {
|
|
1877
|
+
console.info("Unsuccessful attempt at preloading some images", t);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
async preloadListings() {
|
|
1881
|
+
if (oe.state.enableExplorer) {
|
|
1882
|
+
await D.getRecomendedWallets(), j.setIsDataLoaded(!0);
|
|
1883
|
+
const { recomendedWallets: t } = D.state, e = t.map((r) => m.getWalletIcon(r));
|
|
1884
|
+
await this.loadImages(e);
|
|
1885
|
+
} else
|
|
1886
|
+
j.setIsDataLoaded(!0);
|
|
1887
|
+
}
|
|
1888
|
+
async preloadCustomImages() {
|
|
1889
|
+
const t = m.getCustomImageUrls();
|
|
1890
|
+
await this.loadImages(t);
|
|
1891
|
+
}
|
|
1892
|
+
async preloadData() {
|
|
1893
|
+
try {
|
|
1894
|
+
this.preload && (this.preload = !1, await Promise.all([this.preloadListings(), this.preloadCustomImages()]));
|
|
1895
|
+
} catch (t) {
|
|
1896
|
+
console.error(t), F.openToast("Failed preloading", "error");
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
};
|
|
1900
|
+
Dr([
|
|
1901
|
+
L()
|
|
1902
|
+
], Pt.prototype, "preload", 2);
|
|
1903
|
+
Pt = Dr([
|
|
1904
|
+
y("wcm-explorer-context")
|
|
1905
|
+
], Pt);
|
|
1906
|
+
var Ki = Object.getOwnPropertyDescriptor, Qi = (t, e, r, i) => {
|
|
1907
|
+
for (var o = i > 1 ? void 0 : i ? Ki(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1908
|
+
(l = t[s]) && (o = l(o) || o);
|
|
1909
|
+
return o;
|
|
1910
|
+
};
|
|
1911
|
+
let ur = class extends f {
|
|
1912
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
1913
|
+
constructor() {
|
|
1914
|
+
super(), this.unsubscribeTheme = void 0, v.setTheme(), this.unsubscribeTheme = pe.subscribe(v.setTheme);
|
|
1915
|
+
}
|
|
1916
|
+
disconnectedCallback() {
|
|
1917
|
+
var t;
|
|
1918
|
+
(t = this.unsubscribeTheme) == null || t.call(this);
|
|
1919
|
+
}
|
|
1920
|
+
};
|
|
1921
|
+
ur = Qi([
|
|
1922
|
+
y("wcm-theme-context")
|
|
1923
|
+
], ur);
|
|
1924
|
+
const Gi = _`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
|
|
1925
|
+
var Yi = Object.getOwnPropertyDescriptor, Xi = (t, e, r, i) => {
|
|
1926
|
+
for (var o = i > 1 ? void 0 : i ? Yi(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1927
|
+
(l = t[s]) && (o = l(o) || o);
|
|
1928
|
+
return o;
|
|
1929
|
+
};
|
|
1930
|
+
let It = class extends f {
|
|
1931
|
+
// -- private ------------------------------------------------------ //
|
|
1932
|
+
onGoToQrcode() {
|
|
1933
|
+
A.push("Qrcode");
|
|
1934
|
+
}
|
|
1935
|
+
// -- render ------------------------------------------------------- //
|
|
1936
|
+
render() {
|
|
1937
|
+
const { recomendedWallets: t } = D.state, e = [...t, ...t], r = h.RECOMMENDED_WALLET_AMOUNT * 2;
|
|
1938
|
+
return c`<wcm-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${C.QRCODE_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-title">${C.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">WalletConnect</wcm-text></div><div class="wcm-slider"><div class="wcm-track">${[...Array(r)].map((i, o) => {
|
|
1939
|
+
const s = e[o % e.length];
|
|
1940
|
+
return s ? c`<wcm-wallet-image walletId="${s.id}" imageId="${s.image_id}"></wcm-wallet-image>` : C.WALLET_PLACEHOLDER;
|
|
1941
|
+
})}</div><wcm-button-big @click="${m.handleAndroidLinking}"><wcm-text variant="medium-regular" color="inverse">Select Wallet</wcm-text></wcm-button-big></div></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">Choose WalletConnect to see supported apps on your device</wcm-text></wcm-info-footer>`;
|
|
1942
|
+
}
|
|
1943
|
+
};
|
|
1944
|
+
It.styles = [v.globalCss, Gi];
|
|
1945
|
+
It = Xi([
|
|
1946
|
+
y("wcm-android-wallet-selection")
|
|
1947
|
+
], It);
|
|
1948
|
+
const Ji = _`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;
|
|
1949
|
+
var es = Object.defineProperty, ts = Object.getOwnPropertyDescriptor, xe = (t, e, r, i) => {
|
|
1950
|
+
for (var o = i > 1 ? void 0 : i ? ts(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
1951
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
1952
|
+
return i && o && es(e, r, o), o;
|
|
1953
|
+
};
|
|
1954
|
+
let Y = class extends f {
|
|
1955
|
+
constructor() {
|
|
1956
|
+
super(...arguments), this.walletId = void 0, this.imageId = void 0, this.isError = !1, this.isStale = !1, this.label = "";
|
|
1957
|
+
}
|
|
1958
|
+
// -- private ------------------------------------------------------ //
|
|
1959
|
+
svgLoaderTemplate() {
|
|
1960
|
+
var t, e;
|
|
1961
|
+
const s = (e = (t = pe.state.themeVariables) == null ? void 0 : t["--wcm-wallet-icon-large-border-radius"]) != null ? e : v.getPreset("--wcm-wallet-icon-large-border-radius");
|
|
1962
|
+
let l = 0;
|
|
1963
|
+
s.includes("%") ? l = 88 / 100 * parseInt(s, 10) : l = parseInt(s, 10), l *= 1.17;
|
|
1964
|
+
const n = 317 - l * 1.57, a = 425 - l * 1.8;
|
|
1965
|
+
return c`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="wcm-loader" x="2" y="2" width="106" height="106" rx="${l}"/><use xlink:href="#wcm-loader" stroke-dasharray="106 ${n}" stroke-dashoffset="${a}"></use></svg>`;
|
|
1966
|
+
}
|
|
1967
|
+
// -- render ------------------------------------------------------- //
|
|
1968
|
+
render() {
|
|
1969
|
+
const t = {
|
|
1970
|
+
"wcm-error": this.isError,
|
|
1971
|
+
"wcm-stale": this.isStale
|
|
1972
|
+
};
|
|
1973
|
+
return c`<div class="${Z(t)}">${this.svgLoaderTemplate()}<wcm-wallet-image walletId="${R(this.walletId)}" imageId="${R(this.imageId)}"></wcm-wallet-image></div><wcm-text variant="medium-regular" color="${this.isError ? "error" : "primary"}">${this.isError ? "Connection declined" : this.label}</wcm-text>`;
|
|
1974
|
+
}
|
|
1975
|
+
};
|
|
1976
|
+
Y.styles = [v.globalCss, Ji];
|
|
1977
|
+
xe([
|
|
1978
|
+
u()
|
|
1979
|
+
], Y.prototype, "walletId", 2);
|
|
1980
|
+
xe([
|
|
1981
|
+
u()
|
|
1982
|
+
], Y.prototype, "imageId", 2);
|
|
1983
|
+
xe([
|
|
1984
|
+
u({ type: Boolean })
|
|
1985
|
+
], Y.prototype, "isError", 2);
|
|
1986
|
+
xe([
|
|
1987
|
+
u({ type: Boolean })
|
|
1988
|
+
], Y.prototype, "isStale", 2);
|
|
1989
|
+
xe([
|
|
1990
|
+
u()
|
|
1991
|
+
], Y.prototype, "label", 2);
|
|
1992
|
+
Y = xe([
|
|
1993
|
+
y("wcm-connector-waiting")
|
|
1994
|
+
], Y);
|
|
1995
|
+
const me = {
|
|
1996
|
+
manualWallets() {
|
|
1997
|
+
var t, e;
|
|
1998
|
+
const { mobileWallets: r, desktopWallets: i } = oe.state, o = (t = me.recentWallet()) == null ? void 0 : t.id, s = h.isMobile() ? r : i, l = s == null ? void 0 : s.filter((n) => o !== n.id);
|
|
1999
|
+
return (e = h.isMobile() ? l == null ? void 0 : l.map(({ id: n, name: a, links: d }) => ({ id: n, name: a, mobile: d, links: d })) : l == null ? void 0 : l.map(({ id: n, name: a, links: d }) => ({ id: n, name: a, desktop: d, links: d }))) != null ? e : [];
|
|
2000
|
+
},
|
|
2001
|
+
recentWallet() {
|
|
2002
|
+
return m.getRecentWallet();
|
|
2003
|
+
},
|
|
2004
|
+
recomendedWallets(t = !1) {
|
|
2005
|
+
var e;
|
|
2006
|
+
const r = t || (e = me.recentWallet()) == null ? void 0 : e.id, { recomendedWallets: i } = D.state;
|
|
2007
|
+
return i.filter((s) => r !== s.id);
|
|
2008
|
+
}
|
|
2009
|
+
}, K = {
|
|
2010
|
+
onConnecting(t) {
|
|
2011
|
+
m.goToConnectingView(t);
|
|
2012
|
+
},
|
|
2013
|
+
manualWalletsTemplate() {
|
|
2014
|
+
return me.manualWallets().map(
|
|
2015
|
+
(e) => c`<wcm-wallet-button walletId="${e.id}" name="${e.name}" .onClick="${() => this.onConnecting(e)}"></wcm-wallet-button>`
|
|
2016
|
+
);
|
|
2017
|
+
},
|
|
2018
|
+
recomendedWalletsTemplate(t = !1) {
|
|
2019
|
+
return me.recomendedWallets(t).map(
|
|
2020
|
+
(r) => c`<wcm-wallet-button name="${r.name}" walletId="${r.id}" imageId="${r.image_id}" .onClick="${() => this.onConnecting(r)}"></wcm-wallet-button>`
|
|
2021
|
+
);
|
|
2022
|
+
},
|
|
2023
|
+
recentWalletTemplate() {
|
|
2024
|
+
const t = me.recentWallet();
|
|
2025
|
+
if (t)
|
|
2026
|
+
return c`<wcm-wallet-button name="${t.name}" walletId="${t.id}" imageId="${R(t.image_id)}" .recent="${!0}" .onClick="${() => this.onConnecting(t)}"></wcm-wallet-button>`;
|
|
2027
|
+
}
|
|
2028
|
+
}, rs = _`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;
|
|
2029
|
+
var os = Object.getOwnPropertyDescriptor, is = (t, e, r, i) => {
|
|
2030
|
+
for (var o = i > 1 ? void 0 : i ? os(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2031
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2032
|
+
return o;
|
|
2033
|
+
};
|
|
2034
|
+
let Tt = class extends f {
|
|
2035
|
+
// -- render ------------------------------------------------------- //
|
|
2036
|
+
render() {
|
|
2037
|
+
const { explorerExcludedWalletIds: t, enableExplorer: e } = oe.state, r = t !== "ALL" && e, i = K.manualWalletsTemplate(), o = K.recomendedWalletsTemplate();
|
|
2038
|
+
let l = [K.recentWalletTemplate(), ...i, ...o];
|
|
2039
|
+
l = l.filter(Boolean);
|
|
2040
|
+
const n = l.length > 4 || r;
|
|
2041
|
+
let a = [];
|
|
2042
|
+
n ? a = l.slice(0, 3) : a = l;
|
|
2043
|
+
const d = !!a.length;
|
|
2044
|
+
return c`<wcm-modal-header .border="${!0}" title="Connect your wallet" .onAction="${m.handleUriCopy}" .actionIcon="${C.COPY_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-mobile-title"><div class="wcm-subtitle">${C.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">Mobile</wcm-text></div><div class="wcm-subtitle">${C.SCAN_ICON}<wcm-text variant="small-regular" color="secondary">Scan with your wallet</wcm-text></div></div><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>${d ? c`<wcm-modal-footer><div class="wcm-desktop-title">${C.DESKTOP_ICON}<wcm-text variant="small-regular" color="accent">Desktop</wcm-text></div><div class="wcm-grid">${a} ${n ? c`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-footer>` : null}`;
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
Tt.styles = [v.globalCss, rs];
|
|
2048
|
+
Tt = is([
|
|
2049
|
+
y("wcm-desktop-wallet-selection")
|
|
2050
|
+
], Tt);
|
|
2051
|
+
const ss = _`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;
|
|
2052
|
+
var ls = Object.getOwnPropertyDescriptor, ns = (t, e, r, i) => {
|
|
2053
|
+
for (var o = i > 1 ? void 0 : i ? ls(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2054
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2055
|
+
return o;
|
|
2056
|
+
};
|
|
2057
|
+
let Mt = class extends f {
|
|
2058
|
+
// -- render ------------------------------------------------------- //
|
|
2059
|
+
render() {
|
|
2060
|
+
const { termsOfServiceUrl: t, privacyPolicyUrl: e } = oe.state;
|
|
2061
|
+
return t ?? e ? c`<div><wcm-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${t ? c`<a href="${t}" target="_blank" rel="noopener noreferrer">Terms of Service</a>` : null} ${t && e ? "and" : null} ${e ? c`<a href="${e}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>` : null}</wcm-text></div>` : null;
|
|
2062
|
+
}
|
|
2063
|
+
};
|
|
2064
|
+
Mt.styles = [v.globalCss, ss];
|
|
2065
|
+
Mt = ns([
|
|
2066
|
+
y("wcm-legal-notice")
|
|
2067
|
+
], Mt);
|
|
2068
|
+
const as = _`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;
|
|
2069
|
+
var cs = Object.getOwnPropertyDescriptor, ds = (t, e, r, i) => {
|
|
2070
|
+
for (var o = i > 1 ? void 0 : i ? cs(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2071
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2072
|
+
return o;
|
|
2073
|
+
};
|
|
2074
|
+
let Wt = class extends f {
|
|
2075
|
+
// -- private ------------------------------------------------------ //
|
|
2076
|
+
onQrcode() {
|
|
2077
|
+
A.push("Qrcode");
|
|
2078
|
+
}
|
|
2079
|
+
// -- render ------------------------------------------------------- //
|
|
2080
|
+
render() {
|
|
2081
|
+
const { explorerExcludedWalletIds: t, enableExplorer: e } = oe.state, r = t !== "ALL" && e, i = K.manualWalletsTemplate(), o = K.recomendedWalletsTemplate();
|
|
2082
|
+
let l = [K.recentWalletTemplate(), ...i, ...o];
|
|
2083
|
+
l = l.filter(Boolean);
|
|
2084
|
+
const n = l.length > 8 || r;
|
|
2085
|
+
let a = [];
|
|
2086
|
+
n ? a = l.slice(0, 7) : a = l;
|
|
2087
|
+
const d = !!a.length;
|
|
2088
|
+
return c`<wcm-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${C.QRCODE_ICON}"></wcm-modal-header>${d ? c`<wcm-modal-content><div>${a} ${n ? c`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-content>` : null}`;
|
|
2089
|
+
}
|
|
2090
|
+
};
|
|
2091
|
+
Wt.styles = [v.globalCss, as];
|
|
2092
|
+
Wt = ds([
|
|
2093
|
+
y("wcm-mobile-wallet-selection")
|
|
2094
|
+
], Wt);
|
|
2095
|
+
const hs = _`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;
|
|
2096
|
+
var ms = Object.defineProperty, ps = Object.getOwnPropertyDescriptor, Vt = (t, e, r, i) => {
|
|
2097
|
+
for (var o = i > 1 ? void 0 : i ? ps(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2098
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
2099
|
+
return i && o && ms(e, r, o), o;
|
|
2100
|
+
};
|
|
2101
|
+
let Se = class extends f {
|
|
2102
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
2103
|
+
constructor() {
|
|
2104
|
+
super(), this.open = !1, this.active = !1, this.unsubscribeModal = void 0, this.abortController = void 0, this.unsubscribeModal = He.subscribe((t) => {
|
|
2105
|
+
t.open ? this.onOpenModalEvent() : this.onCloseModalEvent();
|
|
2106
|
+
});
|
|
2107
|
+
}
|
|
2108
|
+
disconnectedCallback() {
|
|
2109
|
+
var t;
|
|
2110
|
+
(t = this.unsubscribeModal) == null || t.call(this);
|
|
2111
|
+
}
|
|
2112
|
+
get overlayEl() {
|
|
2113
|
+
return m.getShadowRootElement(this, ".wcm-overlay");
|
|
2114
|
+
}
|
|
2115
|
+
get containerEl() {
|
|
2116
|
+
return m.getShadowRootElement(this, ".wcm-container");
|
|
2117
|
+
}
|
|
2118
|
+
toggleBodyScroll(t) {
|
|
2119
|
+
if (document.querySelector("body"))
|
|
2120
|
+
if (t) {
|
|
2121
|
+
const r = document.getElementById("wcm-styles");
|
|
2122
|
+
r == null || r.remove();
|
|
2123
|
+
} else
|
|
2124
|
+
document.head.insertAdjacentHTML(
|
|
2125
|
+
"beforeend",
|
|
2126
|
+
'<style id="wcm-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>'
|
|
2127
|
+
);
|
|
2128
|
+
}
|
|
2129
|
+
onCloseModal(t) {
|
|
2130
|
+
t.target === t.currentTarget && He.close();
|
|
2131
|
+
}
|
|
2132
|
+
onOpenModalEvent() {
|
|
2133
|
+
this.toggleBodyScroll(!1), this.addKeyboardEvents(), this.open = !0, setTimeout(async () => {
|
|
2134
|
+
const t = m.isMobileAnimation() ? { y: ["50vh", "0vh"] } : { scale: [0.98, 1] }, e = 0.1, r = 0.2;
|
|
2135
|
+
await Promise.all([
|
|
2136
|
+
re(this.overlayEl, { opacity: [0, 1] }, { delay: e, duration: r }).finished,
|
|
2137
|
+
re(this.containerEl, t, { delay: e, duration: r }).finished
|
|
2138
|
+
]), this.active = !0;
|
|
2139
|
+
}, 0);
|
|
2140
|
+
}
|
|
2141
|
+
async onCloseModalEvent() {
|
|
2142
|
+
this.toggleBodyScroll(!0), this.removeKeyboardEvents();
|
|
2143
|
+
const t = m.isMobileAnimation() ? { y: ["0vh", "50vh"] } : { scale: [1, 0.98] }, e = 0.2;
|
|
2144
|
+
await Promise.all([
|
|
2145
|
+
re(this.overlayEl, { opacity: [1, 0] }, { duration: e }).finished,
|
|
2146
|
+
re(this.containerEl, t, { duration: e }).finished
|
|
2147
|
+
]), this.containerEl.removeAttribute("style"), this.active = !1, this.open = !1;
|
|
2148
|
+
}
|
|
2149
|
+
addKeyboardEvents() {
|
|
2150
|
+
this.abortController = new AbortController(), window.addEventListener(
|
|
2151
|
+
"keydown",
|
|
2152
|
+
(t) => {
|
|
2153
|
+
var e;
|
|
2154
|
+
t.key === "Escape" ? He.close() : t.key === "Tab" && ((e = t.target) != null && e.tagName.includes("wcm-") || this.containerEl.focus());
|
|
2155
|
+
},
|
|
2156
|
+
this.abortController
|
|
2157
|
+
), this.containerEl.focus();
|
|
2158
|
+
}
|
|
2159
|
+
removeKeyboardEvents() {
|
|
2160
|
+
var t;
|
|
2161
|
+
(t = this.abortController) == null || t.abort(), this.abortController = void 0;
|
|
2162
|
+
}
|
|
2163
|
+
// -- render ------------------------------------------------------- //
|
|
2164
|
+
render() {
|
|
2165
|
+
const t = {
|
|
2166
|
+
"wcm-overlay": !0,
|
|
2167
|
+
"wcm-active": this.active
|
|
2168
|
+
};
|
|
2169
|
+
return c`<wcm-explorer-context></wcm-explorer-context><wcm-theme-context></wcm-theme-context><div id="wcm-modal" class="${Z(t)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="wcm-container" tabindex="0">${this.open ? c`<wcm-modal-backcard></wcm-modal-backcard><div class="wcm-card"><wcm-modal-router></wcm-modal-router><wcm-modal-toast></wcm-modal-toast></div>` : null}</div></div>`;
|
|
2170
|
+
}
|
|
2171
|
+
};
|
|
2172
|
+
Se.styles = [v.globalCss, hs];
|
|
2173
|
+
Vt([
|
|
2174
|
+
L()
|
|
2175
|
+
], Se.prototype, "open", 2);
|
|
2176
|
+
Vt([
|
|
2177
|
+
L()
|
|
2178
|
+
], Se.prototype, "active", 2);
|
|
2179
|
+
Se = Vt([
|
|
2180
|
+
y("wcm-modal")
|
|
2181
|
+
], Se);
|
|
2182
|
+
const us = _`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;
|
|
2183
|
+
var ws = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, Le = (t, e, r, i) => {
|
|
2184
|
+
for (var o = i > 1 ? void 0 : i ? fs(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2185
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
2186
|
+
return i && o && ws(e, r, o), o;
|
|
2187
|
+
};
|
|
2188
|
+
let ne = class extends f {
|
|
2189
|
+
constructor() {
|
|
2190
|
+
super(...arguments), this.isMobile = !1, this.isDesktop = !1, this.isWeb = !1, this.isRetry = !1;
|
|
2191
|
+
}
|
|
2192
|
+
// -- private ------------------------------------------------------ //
|
|
2193
|
+
onMobile() {
|
|
2194
|
+
h.isMobile() ? A.replace("MobileConnecting") : A.replace("MobileQrcodeConnecting");
|
|
2195
|
+
}
|
|
2196
|
+
onDesktop() {
|
|
2197
|
+
A.replace("DesktopConnecting");
|
|
2198
|
+
}
|
|
2199
|
+
onWeb() {
|
|
2200
|
+
A.replace("WebConnecting");
|
|
2201
|
+
}
|
|
2202
|
+
// -- render ------------------------------------------------------- //
|
|
2203
|
+
render() {
|
|
2204
|
+
return c`<div>${this.isRetry ? c`<slot></slot>` : null} ${this.isMobile ? c`<wcm-button .onClick="${this.onMobile}" .iconLeft="${C.MOBILE_ICON}" variant="outline">Mobile</wcm-button>` : null} ${this.isDesktop ? c`<wcm-button .onClick="${this.onDesktop}" .iconLeft="${C.DESKTOP_ICON}" variant="outline">Desktop</wcm-button>` : null} ${this.isWeb ? c`<wcm-button .onClick="${this.onWeb}" .iconLeft="${C.GLOBE_ICON}" variant="outline">Web</wcm-button>` : null}</div>`;
|
|
2205
|
+
}
|
|
2206
|
+
};
|
|
2207
|
+
ne.styles = [v.globalCss, us];
|
|
2208
|
+
Le([
|
|
2209
|
+
u({ type: Boolean })
|
|
2210
|
+
], ne.prototype, "isMobile", 2);
|
|
2211
|
+
Le([
|
|
2212
|
+
u({ type: Boolean })
|
|
2213
|
+
], ne.prototype, "isDesktop", 2);
|
|
2214
|
+
Le([
|
|
2215
|
+
u({ type: Boolean })
|
|
2216
|
+
], ne.prototype, "isWeb", 2);
|
|
2217
|
+
Le([
|
|
2218
|
+
u({ type: Boolean })
|
|
2219
|
+
], ne.prototype, "isRetry", 2);
|
|
2220
|
+
ne = Le([
|
|
2221
|
+
y("wcm-platform-selection")
|
|
2222
|
+
], ne);
|
|
2223
|
+
const vs = _`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
|
|
2224
|
+
var gs = Object.getOwnPropertyDescriptor, bs = (t, e, r, i) => {
|
|
2225
|
+
for (var o = i > 1 ? void 0 : i ? gs(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2226
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2227
|
+
return o;
|
|
2228
|
+
};
|
|
2229
|
+
let St = class extends f {
|
|
2230
|
+
// -- render ------------------------------------------------------- //
|
|
2231
|
+
onClick() {
|
|
2232
|
+
A.push("WalletExplorer");
|
|
2233
|
+
}
|
|
2234
|
+
// -- render ------------------------------------------------------- //
|
|
2235
|
+
render() {
|
|
2236
|
+
const { recomendedWallets: t } = D.state, e = me.manualWallets(), r = [...t, ...e].reverse().slice(0, 4);
|
|
2237
|
+
return c`<button @click="${this.onClick}"><div class="wcm-icons">${r.map((i) => {
|
|
2238
|
+
const o = m.getWalletIcon(i);
|
|
2239
|
+
if (o)
|
|
2240
|
+
return c`<img crossorigin="anonymous" src="${o}">`;
|
|
2241
|
+
const s = m.getWalletIcon({ id: i.id });
|
|
2242
|
+
return s ? c`<img crossorigin="anonymous" src="${s}">` : C.WALLET_PLACEHOLDER;
|
|
2243
|
+
})} ${[...Array(4 - r.length)].map(() => C.WALLET_PLACEHOLDER)}</div><wcm-text variant="xsmall-regular">View All</wcm-text></button>`;
|
|
2244
|
+
}
|
|
2245
|
+
};
|
|
2246
|
+
St.styles = [v.globalCss, vs];
|
|
2247
|
+
St = bs([
|
|
2248
|
+
y("wcm-view-all-wallets-button")
|
|
2249
|
+
], St);
|
|
2250
|
+
const ys = _`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;
|
|
2251
|
+
var xs = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, rt = (t, e, r, i) => {
|
|
2252
|
+
for (var o = i > 1 ? void 0 : i ? $s(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2253
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
2254
|
+
return i && o && xs(e, r, o), o;
|
|
2255
|
+
};
|
|
2256
|
+
let ge = class extends f {
|
|
2257
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
2258
|
+
constructor() {
|
|
2259
|
+
super(), this.walletId = "", this.imageId = "", this.uri = "", setTimeout(() => {
|
|
2260
|
+
const { walletConnectUri: t } = j.state;
|
|
2261
|
+
this.uri = t;
|
|
2262
|
+
}, 0);
|
|
2263
|
+
}
|
|
2264
|
+
// -- private ------------------------------------------------------ //
|
|
2265
|
+
get overlayEl() {
|
|
2266
|
+
return m.getShadowRootElement(this, ".wcm-qr-container");
|
|
2267
|
+
}
|
|
2268
|
+
// -- render ------------------------------------------------------- //
|
|
2269
|
+
render() {
|
|
2270
|
+
return c`<div class="wcm-qr-container">${this.uri ? c`<wcm-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${R(this.walletId)}" imageId="${R(this.imageId)}"></wcm-qrcode>` : c`<wcm-spinner></wcm-spinner>`}</div>`;
|
|
2271
|
+
}
|
|
2272
|
+
};
|
|
2273
|
+
ge.styles = [v.globalCss, ys];
|
|
2274
|
+
rt([
|
|
2275
|
+
u()
|
|
2276
|
+
], ge.prototype, "walletId", 2);
|
|
2277
|
+
rt([
|
|
2278
|
+
u()
|
|
2279
|
+
], ge.prototype, "imageId", 2);
|
|
2280
|
+
rt([
|
|
2281
|
+
L()
|
|
2282
|
+
], ge.prototype, "uri", 2);
|
|
2283
|
+
ge = rt([
|
|
2284
|
+
y("wcm-walletconnect-qr")
|
|
2285
|
+
], ge);
|
|
2286
|
+
var _s = Object.getOwnPropertyDescriptor, Cs = (t, e, r, i) => {
|
|
2287
|
+
for (var o = i > 1 ? void 0 : i ? _s(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2288
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2289
|
+
return o;
|
|
2290
|
+
};
|
|
2291
|
+
let Rt = class extends f {
|
|
2292
|
+
// -- private ------------------------------------------------------ //
|
|
2293
|
+
viewTemplate() {
|
|
2294
|
+
return h.isAndroid() && !h.isTelegram() ? c`<wcm-android-wallet-selection></wcm-android-wallet-selection>` : h.isMobile() ? c`<wcm-mobile-wallet-selection></wcm-mobile-wallet-selection>` : c`<wcm-desktop-wallet-selection></wcm-desktop-wallet-selection>`;
|
|
2295
|
+
}
|
|
2296
|
+
// -- render ------------------------------------------------------- //
|
|
2297
|
+
render() {
|
|
2298
|
+
return c`${this.viewTemplate()}<wcm-legal-notice></wcm-legal-notice>`;
|
|
2299
|
+
}
|
|
2300
|
+
};
|
|
2301
|
+
Rt.styles = [v.globalCss];
|
|
2302
|
+
Rt = Cs([
|
|
2303
|
+
y("wcm-connect-wallet-view")
|
|
2304
|
+
], Rt);
|
|
2305
|
+
const Os = _`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
|
|
2306
|
+
var As = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Lr = (t, e, r, i) => {
|
|
2307
|
+
for (var o = i > 1 ? void 0 : i ? Es(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2308
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
2309
|
+
return i && o && As(e, r, o), o;
|
|
2310
|
+
};
|
|
2311
|
+
let Ye = class extends f {
|
|
2312
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
2313
|
+
constructor() {
|
|
2314
|
+
super(), this.isError = !1, this.openDesktopApp();
|
|
2315
|
+
}
|
|
2316
|
+
// -- private ------------------------------------------------------ //
|
|
2317
|
+
onFormatAndRedirect(t) {
|
|
2318
|
+
const { desktop: e, name: r } = h.getWalletRouterData(), i = e == null ? void 0 : e.native, o = e == null ? void 0 : e.universal;
|
|
2319
|
+
if (i) {
|
|
2320
|
+
const s = h.formatNativeUrl(i, t, r);
|
|
2321
|
+
h.openHref(s, "_self");
|
|
2322
|
+
} else if (o) {
|
|
2323
|
+
const s = h.formatUniversalUrl(o, t, r);
|
|
2324
|
+
h.openHref(s, "_blank");
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
openDesktopApp() {
|
|
2328
|
+
const { walletConnectUri: t } = j.state, e = h.getWalletRouterData();
|
|
2329
|
+
m.setRecentWallet(e), t && this.onFormatAndRedirect(t);
|
|
2330
|
+
}
|
|
2331
|
+
// -- render ------------------------------------------------------- //
|
|
2332
|
+
render() {
|
|
2333
|
+
const { name: t, id: e, image_id: r } = h.getWalletRouterData(), { isMobile: i, isWeb: o } = m.getCachedRouterWalletPlatforms();
|
|
2334
|
+
return c`<wcm-modal-header title="${t}" .onAction="${m.handleUriCopy}" .actionIcon="${C.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${R(r)}" label="${`Continue in ${t}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Connection can continue loading if ${t} is not installed on your device`}</wcm-text><wcm-platform-selection .isMobile="${i}" .isWeb="${o}" .isRetry="${!0}"><wcm-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${C.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
|
|
2335
|
+
}
|
|
2336
|
+
};
|
|
2337
|
+
Ye.styles = [v.globalCss, Os];
|
|
2338
|
+
Lr([
|
|
2339
|
+
L()
|
|
2340
|
+
], Ye.prototype, "isError", 2);
|
|
2341
|
+
Ye = Lr([
|
|
2342
|
+
y("wcm-desktop-connecting-view")
|
|
2343
|
+
], Ye);
|
|
2344
|
+
const Ps = _`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;
|
|
2345
|
+
var Is = Object.getOwnPropertyDescriptor, Ts = (t, e, r, i) => {
|
|
2346
|
+
for (var o = i > 1 ? void 0 : i ? Is(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2347
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2348
|
+
return o;
|
|
2349
|
+
};
|
|
2350
|
+
let Dt = class extends f {
|
|
2351
|
+
// -- private ------------------------------------------------------ //
|
|
2352
|
+
onInstall(t) {
|
|
2353
|
+
t && h.openHref(t, "_blank");
|
|
2354
|
+
}
|
|
2355
|
+
// -- render ------------------------------------------------------- //
|
|
2356
|
+
render() {
|
|
2357
|
+
const { name: t, id: e, image_id: r, homepage: i } = h.getWalletRouterData();
|
|
2358
|
+
return c`<wcm-modal-header title="${t}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${R(r)}" label="Not Detected" .isStale="${!0}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Download ${t} to continue. If multiple browser extensions are installed, disable non ${t} ones and try again`}</wcm-text><wcm-button .onClick="${() => this.onInstall(i)}" .iconLeft="${C.ARROW_DOWN_ICON}">Download</wcm-button></wcm-info-footer>`;
|
|
2359
|
+
}
|
|
2360
|
+
};
|
|
2361
|
+
Dt.styles = [v.globalCss, Ps];
|
|
2362
|
+
Dt = Ts([
|
|
2363
|
+
y("wcm-install-wallet-view")
|
|
2364
|
+
], Dt);
|
|
2365
|
+
const Ms = _`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;
|
|
2366
|
+
var Ws = Object.defineProperty, Ss = Object.getOwnPropertyDescriptor, kr = (t, e, r, i) => {
|
|
2367
|
+
for (var o = i > 1 ? void 0 : i ? Ss(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2368
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
2369
|
+
return i && o && Ws(e, r, o), o;
|
|
2370
|
+
};
|
|
2371
|
+
let Xe = class extends f {
|
|
2372
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
2373
|
+
constructor() {
|
|
2374
|
+
super(), this.isError = !1, this.openMobileApp();
|
|
2375
|
+
}
|
|
2376
|
+
// -- private ------------------------------------------------------ //
|
|
2377
|
+
onFormatAndRedirect(t, e = !1) {
|
|
2378
|
+
const { mobile: r, name: i } = h.getWalletRouterData(), o = r == null ? void 0 : r.native, s = r == null ? void 0 : r.universal, l = h.isTelegram() ? "_blank" : "_self";
|
|
2379
|
+
if (t = h.isTelegram() && h.isAndroid() ? encodeURIComponent(t) : t, o && !e) {
|
|
2380
|
+
const n = h.formatNativeUrl(o, t, i);
|
|
2381
|
+
h.openHref(n, l);
|
|
2382
|
+
} else if (s) {
|
|
2383
|
+
const n = h.formatUniversalUrl(s, t, i);
|
|
2384
|
+
h.openHref(n, l);
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
openMobileApp(t = !1) {
|
|
2388
|
+
const { walletConnectUri: e } = j.state, r = h.getWalletRouterData();
|
|
2389
|
+
e && this.onFormatAndRedirect(e, t), m.setRecentWallet(r);
|
|
2390
|
+
}
|
|
2391
|
+
onGoToAppStore(t) {
|
|
2392
|
+
t && h.openHref(t, "_blank");
|
|
2393
|
+
}
|
|
2394
|
+
// -- render ------------------------------------------------------- //
|
|
2395
|
+
render() {
|
|
2396
|
+
const { name: t, id: e, image_id: r, app: i, mobile: o } = h.getWalletRouterData(), { isWeb: s } = m.getCachedRouterWalletPlatforms(), l = i == null ? void 0 : i.ios, n = o == null ? void 0 : o.universal;
|
|
2397
|
+
return c`<wcm-modal-header title="${t}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${R(r)}" label="Tap 'Open' to continue…" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer class="wcm-note"><wcm-platform-selection .isWeb="${s}" .isRetry="${!0}"><wcm-button .onClick="${() => this.openMobileApp(!1)}" .iconRight="${C.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection>${n ? c`<wcm-text color="secondary" variant="small-thin">Still doesn't work? <span tabindex="0" @click="${() => this.openMobileApp(!0)}">Try this alternate link</span></wcm-text>` : null}</wcm-info-footer><wcm-info-footer class="wcm-app-store"><div><wcm-wallet-image walletId="${e}" imageId="${R(r)}"></wcm-wallet-image><wcm-text>${`Get ${t}`}</wcm-text></div><wcm-button .iconRight="${C.ARROW_RIGHT_ICON}" .onClick="${() => this.onGoToAppStore(l)}" variant="ghost">App Store</wcm-button></wcm-info-footer>`;
|
|
2398
|
+
}
|
|
2399
|
+
};
|
|
2400
|
+
Xe.styles = [v.globalCss, Ms];
|
|
2401
|
+
kr([
|
|
2402
|
+
L()
|
|
2403
|
+
], Xe.prototype, "isError", 2);
|
|
2404
|
+
Xe = kr([
|
|
2405
|
+
y("wcm-mobile-connecting-view")
|
|
2406
|
+
], Xe);
|
|
2407
|
+
const Rs = _`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
|
|
2408
|
+
var Ds = Object.getOwnPropertyDescriptor, Ls = (t, e, r, i) => {
|
|
2409
|
+
for (var o = i > 1 ? void 0 : i ? Ds(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2410
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2411
|
+
return o;
|
|
2412
|
+
};
|
|
2413
|
+
let Lt = class extends f {
|
|
2414
|
+
// -- render ------------------------------------------------------- //
|
|
2415
|
+
render() {
|
|
2416
|
+
const { name: t, id: e, image_id: r } = h.getWalletRouterData(), { isDesktop: i, isWeb: o } = m.getCachedRouterWalletPlatforms();
|
|
2417
|
+
return c`<wcm-modal-header title="${t}" .onAction="${m.handleUriCopy}" .actionIcon="${C.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr walletId="${e}" imageId="${R(r)}"></wcm-walletconnect-qr></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Scan this QR Code with your phone's camera or inside ${t} app`}</wcm-text><wcm-platform-selection .isDesktop="${i}" .isWeb="${o}"></wcm-platform-selection></wcm-info-footer>`;
|
|
2418
|
+
}
|
|
2419
|
+
};
|
|
2420
|
+
Lt.styles = [v.globalCss, Rs];
|
|
2421
|
+
Lt = Ls([
|
|
2422
|
+
y("wcm-mobile-qr-connecting-view")
|
|
2423
|
+
], Lt);
|
|
2424
|
+
var ks = Object.getOwnPropertyDescriptor, Ns = (t, e, r, i) => {
|
|
2425
|
+
for (var o = i > 1 ? void 0 : i ? ks(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2426
|
+
(l = t[s]) && (o = l(o) || o);
|
|
2427
|
+
return o;
|
|
2428
|
+
};
|
|
2429
|
+
let kt = class extends f {
|
|
2430
|
+
// -- render ------------------------------------------------------- //
|
|
2431
|
+
render() {
|
|
2432
|
+
return c`<wcm-modal-header title="Scan the code" .onAction="${m.handleUriCopy}" .actionIcon="${C.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>`;
|
|
2433
|
+
}
|
|
2434
|
+
};
|
|
2435
|
+
kt.styles = [v.globalCss];
|
|
2436
|
+
kt = Ns([
|
|
2437
|
+
y("wcm-qrcode-view")
|
|
2438
|
+
], kt);
|
|
2439
|
+
const Us = _`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;
|
|
2440
|
+
var js = Object.defineProperty, Hs = Object.getOwnPropertyDescriptor, ke = (t, e, r, i) => {
|
|
2441
|
+
for (var o = i > 1 ? void 0 : i ? Hs(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2442
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
2443
|
+
return i && o && js(e, r, o), o;
|
|
2444
|
+
};
|
|
2445
|
+
const wt = 40;
|
|
2446
|
+
let ae = class extends f {
|
|
2447
|
+
constructor() {
|
|
2448
|
+
super(...arguments), this.loading = !D.state.wallets.listings.length, this.firstFetch = !D.state.wallets.listings.length, this.search = "", this.endReached = !1, this.intersectionObserver = void 0, this.searchDebounce = m.debounce((t) => {
|
|
2449
|
+
t.length >= 1 ? (this.firstFetch = !0, this.endReached = !1, this.search = t, D.resetSearch(), this.fetchWallets()) : this.search && (this.search = "", this.endReached = this.isLastPage(), D.resetSearch());
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
2453
|
+
firstUpdated() {
|
|
2454
|
+
this.createPaginationObserver();
|
|
2455
|
+
}
|
|
2456
|
+
disconnectedCallback() {
|
|
2457
|
+
var t;
|
|
2458
|
+
(t = this.intersectionObserver) == null || t.disconnect();
|
|
2459
|
+
}
|
|
2460
|
+
// -- private ------------------------------------------------------ //
|
|
2461
|
+
get placeholderEl() {
|
|
2462
|
+
return m.getShadowRootElement(this, ".wcm-placeholder-block");
|
|
2463
|
+
}
|
|
2464
|
+
createPaginationObserver() {
|
|
2465
|
+
this.intersectionObserver = new IntersectionObserver(([t]) => {
|
|
2466
|
+
t.isIntersecting && !(this.search && this.firstFetch) && this.fetchWallets();
|
|
2467
|
+
}), this.intersectionObserver.observe(this.placeholderEl);
|
|
2468
|
+
}
|
|
2469
|
+
isLastPage() {
|
|
2470
|
+
const { wallets: t, search: e } = D.state, { listings: r, total: i } = this.search ? e : t;
|
|
2471
|
+
return i <= wt || r.length >= i;
|
|
2472
|
+
}
|
|
2473
|
+
async fetchWallets() {
|
|
2474
|
+
var t;
|
|
2475
|
+
const { wallets: e, search: r } = D.state, { listings: i, total: o, page: s } = this.search ? r : e;
|
|
2476
|
+
if (!this.endReached && (this.firstFetch || o > wt && i.length < o))
|
|
2477
|
+
try {
|
|
2478
|
+
this.loading = !0;
|
|
2479
|
+
const l = (t = j.state.chains) == null ? void 0 : t.join(","), { listings: n } = await D.getWallets({
|
|
2480
|
+
page: this.firstFetch ? 1 : s + 1,
|
|
2481
|
+
entries: wt,
|
|
2482
|
+
search: this.search,
|
|
2483
|
+
version: 2,
|
|
2484
|
+
chains: l
|
|
2485
|
+
}), a = n.map((d) => m.getWalletIcon(d));
|
|
2486
|
+
await Promise.all([
|
|
2487
|
+
...a.map(async (d) => m.preloadImage(d)),
|
|
2488
|
+
h.wait(300)
|
|
2489
|
+
]), this.endReached = this.isLastPage();
|
|
2490
|
+
} catch (l) {
|
|
2491
|
+
console.error(l), F.openToast(m.getErrorMessage(l), "error");
|
|
2492
|
+
} finally {
|
|
2493
|
+
this.loading = !1, this.firstFetch = !1;
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
onConnect(t) {
|
|
2497
|
+
h.isAndroid() ? m.handleMobileLinking(t) : m.goToConnectingView(t);
|
|
2498
|
+
}
|
|
2499
|
+
onSearchChange(t) {
|
|
2500
|
+
const { value: e } = t.target;
|
|
2501
|
+
this.searchDebounce(e);
|
|
2502
|
+
}
|
|
2503
|
+
// -- render ------------------------------------------------------- //
|
|
2504
|
+
render() {
|
|
2505
|
+
const { wallets: t, search: e } = D.state, { listings: r } = this.search ? e : t, i = this.loading && !r.length, o = this.search.length >= 3;
|
|
2506
|
+
let s = K.manualWalletsTemplate(), l = K.recomendedWalletsTemplate(!0);
|
|
2507
|
+
o && (s = s.filter(
|
|
2508
|
+
({ values: d }) => m.caseSafeIncludes(d[0], this.search)
|
|
2509
|
+
), l = l.filter(
|
|
2510
|
+
({ values: d }) => m.caseSafeIncludes(d[0], this.search)
|
|
2511
|
+
));
|
|
2512
|
+
const n = !this.loading && !r.length && !l.length, a = {
|
|
2513
|
+
"wcm-loading": i,
|
|
2514
|
+
"wcm-end-reached": this.endReached || !this.loading,
|
|
2515
|
+
"wcm-empty": n
|
|
2516
|
+
};
|
|
2517
|
+
return c`<wcm-modal-header><wcm-search-input .onChange="${this.onSearchChange.bind(this)}"></wcm-search-input></wcm-modal-header><wcm-modal-content class="${Z(a)}"><div class="wcm-grid">${i ? null : s} ${i ? null : l} ${i ? null : r.map(
|
|
2518
|
+
(d) => c`${d ? c`<wcm-wallet-button imageId="${d.image_id}" name="${d.name}" walletId="${d.id}" .onClick="${() => this.onConnect(d)}"></wcm-wallet-button>` : null}`
|
|
2519
|
+
)}</div><div class="wcm-placeholder-block">${n ? c`<wcm-text variant="big-bold" color="secondary">No results found</wcm-text>` : null} ${!n && this.loading ? c`<wcm-spinner></wcm-spinner>` : null}</div></wcm-modal-content>`;
|
|
2520
|
+
}
|
|
2521
|
+
};
|
|
2522
|
+
ae.styles = [v.globalCss, Us];
|
|
2523
|
+
ke([
|
|
2524
|
+
L()
|
|
2525
|
+
], ae.prototype, "loading", 2);
|
|
2526
|
+
ke([
|
|
2527
|
+
L()
|
|
2528
|
+
], ae.prototype, "firstFetch", 2);
|
|
2529
|
+
ke([
|
|
2530
|
+
L()
|
|
2531
|
+
], ae.prototype, "search", 2);
|
|
2532
|
+
ke([
|
|
2533
|
+
L()
|
|
2534
|
+
], ae.prototype, "endReached", 2);
|
|
2535
|
+
ae = ke([
|
|
2536
|
+
y("wcm-wallet-explorer-view")
|
|
2537
|
+
], ae);
|
|
2538
|
+
const Bs = _`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
|
|
2539
|
+
var Zs = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, Nr = (t, e, r, i) => {
|
|
2540
|
+
for (var o = i > 1 ? void 0 : i ? zs(e, r) : e, s = t.length - 1, l; s >= 0; s--)
|
|
2541
|
+
(l = t[s]) && (o = (i ? l(e, r, o) : l(o)) || o);
|
|
2542
|
+
return i && o && Zs(e, r, o), o;
|
|
2543
|
+
};
|
|
2544
|
+
let Je = class extends f {
|
|
2545
|
+
// -- lifecycle ---------------------------------------------------- //
|
|
2546
|
+
constructor() {
|
|
2547
|
+
super(), this.isError = !1, this.openWebWallet();
|
|
2548
|
+
}
|
|
2549
|
+
// -- private ------------------------------------------------------ //
|
|
2550
|
+
onFormatAndRedirect(t) {
|
|
2551
|
+
const { desktop: e, name: r } = h.getWalletRouterData(), i = e == null ? void 0 : e.universal;
|
|
2552
|
+
if (i) {
|
|
2553
|
+
const o = h.formatUniversalUrl(i, t, r);
|
|
2554
|
+
h.openHref(o, "_blank");
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
openWebWallet() {
|
|
2558
|
+
const { walletConnectUri: t } = j.state, e = h.getWalletRouterData();
|
|
2559
|
+
m.setRecentWallet(e), t && this.onFormatAndRedirect(t);
|
|
2560
|
+
}
|
|
2561
|
+
// -- render ------------------------------------------------------- //
|
|
2562
|
+
render() {
|
|
2563
|
+
const { name: t, id: e, image_id: r } = h.getWalletRouterData(), { isMobile: i, isDesktop: o } = m.getCachedRouterWalletPlatforms(), s = h.isMobile();
|
|
2564
|
+
return c`<wcm-modal-header title="${t}" .onAction="${m.handleUriCopy}" .actionIcon="${C.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${R(r)}" label="${`Continue in ${t}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`${t} web app has opened in a new tab. Go there, accept the connection, and come back`}</wcm-text><wcm-platform-selection .isMobile="${i}" .isDesktop="${s ? !1 : o}" .isRetry="${!0}"><wcm-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${C.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
|
|
2565
|
+
}
|
|
2566
|
+
};
|
|
2567
|
+
Je.styles = [v.globalCss, Bs];
|
|
2568
|
+
Nr([
|
|
2569
|
+
L()
|
|
2570
|
+
], Je.prototype, "isError", 2);
|
|
2571
|
+
Je = Nr([
|
|
2572
|
+
y("wcm-web-connecting-view")
|
|
2573
|
+
], Je);
|
|
2574
|
+
export {
|
|
2575
|
+
Se as WcmModal,
|
|
2576
|
+
G as WcmQrCode
|
|
2577
|
+
};
|