@blockend/widget 1.0.60 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AllRoutes-Bi2Qb6vT.js → AllRoutes-BqW5S4_J.js} +9 -9
- package/dist/AllRoutes-CIe7ZLbW.js +2209 -0
- package/dist/{Box-DofFTOO9.js → Box-Dw7IJo3D.js} +1 -1
- package/dist/Box-QpYIDD-V.js +54 -0
- package/dist/EstGas-C_ldluj6.js +1576 -0
- package/dist/{EstGas-w0MeYkJr.js → EstGas-Dpwt2-50.js} +7 -7
- package/dist/{Grow-C7qv-xx7.js → Grow-DjneaPQY.js} +2 -2
- package/dist/Grow-L7kyPhbh.js +1656 -0
- package/dist/{InputComp-B7JBOOCL.js → InputComp-CWH4SAk7.js} +3 -3
- package/dist/InputComp-Dl4M7E5v.js +105 -0
- package/dist/{LoadRoute-KBCAhdb3.js → LoadRoute-Cafzlcfy.js} +4 -4
- package/dist/LoadRoute-cBSl34Bs.js +125 -0
- package/dist/{QuotesProgress-DaVjqEE8.js → QuotesProgress-Covy7wmW.js} +1 -1
- package/dist/QuotesProgress-CxJUoCPy.js +28 -0
- package/dist/{SwapAsset-ClNXL1XN.js → SwapAsset-BqXVX_DR.js} +1 -1
- package/dist/SwapAsset-CkRat7Ok.js +51 -0
- package/dist/Tooltip-3YpYU_vO.js +572 -0
- package/dist/{Tooltip-BfAqBg9y.js → Tooltip-D2kKNQ0U.js} +3 -3
- package/dist/TxnButton-CPMFPFA_.js +222 -0
- package/dist/{TxnButton-41zPru_N.js → TxnButton-mfwy-EoQ.js} +3 -3
- package/dist/{add-Dtd6YmCJ.js → add-CRY8asYF.js} +1 -1
- package/dist/add-Dfrw-dUV.js +19 -0
- package/dist/{all-wallets-fWl6fl6Y.js → all-wallets-DOnIRIv0.js} +1 -1
- package/dist/all-wallets-Dw10lWJZ.js +10 -0
- package/dist/{app-store-DSLOwXZY.js → app-store-C0M9hC1B.js} +1 -1
- package/dist/app-store-DJiZFSCr.js +21 -0
- package/dist/{apple-BMDEkk8X.js → apple-Bv7oA5AQ.js} +1 -1
- package/dist/apple-kMZGS4AC.js +22 -0
- package/dist/{arrow-bottom-BWURPGva.js → arrow-bottom-D4arnome.js} +1 -1
- package/dist/arrow-bottom-DgmWrLqf.js +12 -0
- package/dist/{arrow-bottom-circle-BR18TdWN.js → arrow-bottom-circle-BUny4yP8.js} +1 -1
- package/dist/arrow-bottom-circle-C7iPKwzW.js +15 -0
- package/dist/{arrow-left-DSHPaT9f.js → arrow-left-DImJbKZs.js} +1 -1
- package/dist/arrow-left-Dol642VI.js +12 -0
- package/dist/{arrow-right-BQyfcxHk.js → arrow-right-BvRPNX9F.js} +1 -1
- package/dist/arrow-right-CMwyPVT7.js +12 -0
- package/dist/{arrow-top-RP3srPoV.js → arrow-top-1RWPJImu.js} +1 -1
- package/dist/arrow-top-kn9xtx92.js +12 -0
- package/dist/{bank-C9VWqird.js → bank-C0t9JpLj.js} +1 -1
- package/dist/bank-DK-FvDfd.js +18 -0
- package/dist/{basic-ChmJK0Xt.js → basic-Sejv2JvX.js} +3 -3
- package/dist/basic-VfgwBHn1.js +5783 -0
- package/dist/{browser-CSkm7gnt.js → browser-0d0uw45D.js} +1 -1
- package/dist/browser-BzT1ACe9.js +18 -0
- package/dist/{card-qLWgu9c8.js → card-BBByykfy.js} +1 -1
- package/dist/card-DqDM55a-.js +18 -0
- package/dist/{ccip-QF_uXtAt.js → ccip-8__szz9Q.js} +1 -1
- package/dist/ccip-BPZSey8I.js +228 -0
- package/dist/{checkmark-BmzqmMw0.js → checkmark-B_osdsm_.js} +1 -1
- package/dist/checkmark-DEKH6rOS.js +15 -0
- package/dist/{checkmark-bold-B6aImdAf.js → checkmark-bold-BEzepFY4.js} +1 -1
- package/dist/checkmark-bold-Dzv2hN2Q.js +12 -0
- package/dist/{chevron-bottom-t4h4eaxS.js → chevron-bottom-Bdaxlaxc.js} +1 -1
- package/dist/chevron-bottom-CXdHWe0F.js +12 -0
- package/dist/{chevron-left-D3susSgC.js → chevron-left-2aCeqxdm.js} +1 -1
- package/dist/chevron-left-CeuFz3M9.js +12 -0
- package/dist/{chevron-right-W13sAkua.js → chevron-right-BPgQeMPz.js} +1 -1
- package/dist/chevron-right-DikqbHjp.js +12 -0
- package/dist/{chevron-top-Bx-QdB_J.js → chevron-top-BskFpgMP.js} +1 -1
- package/dist/chevron-top-CjCScawp.js +12 -0
- package/dist/{chrome-store-CGxM7IYK.js → chrome-store-CxhEG2Jk.js} +1 -1
- package/dist/chrome-store-DaP5Y4w2.js +65 -0
- package/dist/{clock-DLxk1mp4.js → clock-BDgHn083.js} +1 -1
- package/dist/clock-BzjZWK68.js +12 -0
- package/dist/{close-XyT_Ei7X.js → close-CQTa1LZg.js} +1 -1
- package/dist/close-Dqncm2nY.js +12 -0
- package/dist/{coinPlaceholder-COnVP39c.js → coinPlaceholder-B-NSV729.js} +1 -1
- package/dist/coinPlaceholder-BExfa33b.js +12 -0
- package/dist/{compass-B7Ua__ME.js → compass-BdJmk2w2.js} +1 -1
- package/dist/compass-C1H_fht-.js +12 -0
- package/dist/{copy-CwqmRN0X.js → copy-Cg4vgr82.js} +1 -1
- package/dist/copy-DPMVX3yZ.js +19 -0
- package/dist/{core-HN_b3jpG.js → core-BSwMFU2B.js} +6124 -4570
- package/dist/core-BYOwnw_B.js +16521 -0
- package/dist/{cursor-CZUzCZDa.js → cursor-BoD_rq0f.js} +1 -1
- package/dist/{cursor-transparent-C-iNJp5e.js → cursor-transparent-Dqs1kXcb.js} +1 -1
- package/dist/cursor-transparent-IQlZspwQ.js +16 -0
- package/dist/cursor-ybJpiPr6.js +7 -0
- package/dist/{desktop-CKvUvwiO.js → desktop-BOxkTik1.js} +1 -1
- package/dist/desktop-WMYv3b4Q.js +13 -0
- package/dist/{disconnect-Baq1ttCe.js → disconnect-CTxFyZWa.js} +1 -1
- package/dist/disconnect-eMeec26w.js +12 -0
- package/dist/{discord-D8jJPT-u.js → discord-BJRxIhBt.js} +1 -1
- package/dist/discord-CpTo4KnZ.js +21 -0
- package/dist/{down-CbXkinMO.js → down-372J_rRV.js} +2 -2
- package/dist/down-hvB7J3FG.js +622 -0
- package/dist/{etherscan-DmvsfmlR.js → etherscan-CyQf5MH5.js} +1 -1
- package/dist/etherscan-DQ1h54d3.js +10 -0
- package/dist/{exclamation-triangle-B5sVL0Op.js → exclamation-triangle-DFOXjtuI.js} +1 -1
- package/dist/exclamation-triangle-DzKs0-30.js +8 -0
- package/dist/{extension-DTURW9PD.js → extension-XiWSr1Ku.js} +1 -1
- package/dist/extension-ep1TEUSD.js +12 -0
- package/dist/{external-link-BhiyYwAM.js → external-link-CYjbHRDY.js} +1 -1
- package/dist/external-link-DRzzevt_.js +12 -0
- package/dist/{facebook-BKU8pCSU.js → facebook-DhP37m2R.js} +1 -1
- package/dist/facebook-eXS31CP5.js +30 -0
- package/dist/{farcaster-aPuBoT-f.js → farcaster-C1J2oGt2.js} +1 -1
- package/dist/farcaster-f0EPKy4w.js +16 -0
- package/dist/{filters-Dhcy_bWD.js → filters-C5jLy9GP.js} +1 -1
- package/dist/filters-RqawLZYy.js +12 -0
- package/dist/{getChainIds-hFBaLC3P.js → getChainIds-AaKb_MmO.js} +2 -2
- package/dist/getChainIds-DXEtLb1g.js +1888 -0
- package/dist/{getCosmosAddress-wW2QvGf4.js → getCosmosAddress-D-F7jz-d.js} +2 -2
- package/dist/getCosmosAddress-X_cfoAnv.js +9517 -0
- package/dist/{github-DpOcHBpK.js → github-CJ8g1by7.js} +1 -1
- package/dist/github-d1vUfc1B.js +22 -0
- package/dist/{google-Dlr5X4XZ.js → google-DpIVCnNm.js} +1 -1
- package/dist/google-Dtcfyt4F.js +22 -0
- package/dist/{hamburger-CbTP1z8e.js → hamburger-BylLGawu.js} +5 -5
- package/dist/hamburger-DezZOKRv.js +3915 -0
- package/dist/{help-circle-DfsreI1-.js → help-circle-BESCFGIa.js} +1 -1
- package/dist/help-circle-BTpSg7wr.js +16 -0
- package/dist/{id-CgVrDv4g.js → id-CPX0IEMo.js} +1 -1
- package/dist/id-CV-pIIiZ.js +16 -0
- package/dist/{image-BgZMfISb.js → image-DrFHyQOS.js} +1 -1
- package/dist/image-n7ODnWNp.js +8 -0
- package/dist/{index-CzIE4OVR.js → index-BDezoD7C.js} +1 -1
- package/dist/{index-DEzMTwnP.js → index-BOd8pd8c.js} +11 -11
- package/dist/index-BYmiFoJh.js +29495 -0
- package/dist/index-BheqnLKf.js +992 -0
- package/dist/{index-ij8WLtCK.js → index-C7McnY5R.js} +10 -10
- package/dist/{index-Dfnahm9u.js → index-CI-V1HdQ.js} +4 -4
- package/dist/{index-CQef3aFT.js → index-CSgWo9Cg.js} +5 -5
- package/dist/index-CViW2kjE.js +13547 -0
- package/dist/{index-W17Yun1B.js → index-CoV9zQx1.js} +78 -78
- package/dist/{index-BzlNNUJC.js → index-D0J1OD73.js} +4 -4
- package/dist/index-DO14DPs3.js +6713 -0
- package/dist/{index-BNAc3BNQ.js → index-D_8iklL2.js} +7 -7
- package/dist/{index-D-h2D2T4.js → index-DhZwdjPQ.js} +2 -2
- package/dist/{index-cmkdh21h.js → index-DjHDqI7m.js} +4 -4
- package/dist/{index-Doq8prid.js → index-DoNokw4Q.js} +1 -1
- package/dist/index-GlSAE8hE.js +472 -0
- package/dist/index-H7ThVJwV.js +3267 -0
- package/dist/index-Pni0gIii.js +206 -0
- package/dist/index-TEYMoNwP.js +9 -0
- package/dist/index-VS3sEqmI.js +330 -0
- package/dist/index-ePnYqYhf.js +1483 -0
- package/dist/index-eatshJSd.js +18509 -0
- package/dist/{index.es-DznYPOeF.js → index.es-B95K0DgG.js} +1 -1
- package/dist/index.es-BzyBckd_.js +366 -0
- package/dist/index.es-CMvE7ghR.js +14904 -0
- package/dist/index.es-gTtSa0r5.js +14904 -0
- package/dist/index.es.js +1 -1
- package/dist/{info-CZQMmcBD.js → info-DB9XS3BU.js} +1 -1
- package/dist/info-DWZmKXfC.js +7 -0
- package/dist/{info-circle-CA3WSSRD.js → info-circle-BVB8s9W_.js} +1 -1
- package/dist/info-circle-Bk9rpQzz.js +16 -0
- package/dist/{lightbulb-8ISYXfUt.js → lightbulb-C0eiLvuS.js} +1 -1
- package/dist/lightbulb-CUDopurR.js +7 -0
- package/dist/{mail-CHIth09p.js → mail-CYcc9yZZ.js} +1 -1
- package/dist/mail-Df9wlUBz.js +12 -0
- package/dist/{mobile-CrFtClXb.js → mobile-Cvm9Skqq.js} +1 -1
- package/dist/mobile-DcoUJktC.js +13 -0
- package/dist/{more-mHern-4V.js → more-B-UvO1Yo.js} +1 -1
- package/dist/more-DbsAB7Xx.js +15 -0
- package/dist/{network-placeholder-CoODkTLk.js → network-placeholder-C8QNcwPf.js} +1 -1
- package/dist/network-placeholder-CnHZLxGT.js +18 -0
- package/dist/{nftPlaceholder-CG7DC4DT.js → nftPlaceholder-C_LU9tT5.js} +1 -1
- package/dist/nftPlaceholder-D7igGAAq.js +12 -0
- package/dist/{off-CrgcN-zp.js → off-BEQbMYBZ.js} +1 -1
- package/dist/off-Brms9nN7.js +12 -0
- package/dist/{play-store-CQP9kqkp.js → play-store-CEopCauM.js} +1 -1
- package/dist/play-store-z4z-boXn.js +36 -0
- package/dist/{plus-DHA7xDuc.js → plus-CtEYHV2t.js} +1 -1
- package/dist/plus-LkrIZJEQ.js +17 -0
- package/dist/{qr-code-zibhnzKq.js → qr-code-BhmZxeo_.js} +1 -1
- package/dist/qr-code-CZnYaNoE.js +10 -0
- package/dist/{recycle-horizontal-DywyCULr.js → recycle-horizontal-CF9eqICi.js} +1 -1
- package/dist/recycle-horizontal-CeGotUdv.js +13 -0
- package/dist/{refresh-e2GocWQK.js → refresh-Bm3plkBE.js} +1 -1
- package/dist/refresh-CKhWU1dQ.js +12 -0
- package/dist/{reown-logo-BU64qOXz.js → reown-logo-8S9ZN_-T.js} +1 -1
- package/dist/reown-logo-CF2Qkyw1.js +16 -0
- package/dist/{search-DzxpvkH-.js → search-DNcA47oY.js} +1 -1
- package/dist/search-DyuAYb_-.js +12 -0
- package/dist/{send-r9Pjl4vo.js → send-B0S9gHH6.js} +1 -1
- package/dist/send-BbBOjlsM.js +19 -0
- package/dist/{swapHorizontal-BTrXWq48.js → swapHorizontal-BuTPPB8N.js} +1 -1
- package/dist/swapHorizontal-DA7yhPfV.js +12 -0
- package/dist/{swapHorizontalBold-CJqWkgp6.js → swapHorizontalBold-BnB-fpce.js} +1 -1
- package/dist/swapHorizontalBold-BujZxwgY.js +12 -0
- package/dist/{swapHorizontalMedium-DX7hDgRK.js → swapHorizontalMedium-9QnwwjJD.js} +1 -1
- package/dist/swapHorizontalMedium-hEBn_MJv.js +20 -0
- package/dist/{swapHorizontalRoundedBold-C51tXWKa.js → swapHorizontalRoundedBold-C83mxp3u.js} +1 -1
- package/dist/swapHorizontalRoundedBold-Cqg1Na-5.js +12 -0
- package/dist/{swapVertical-Crddwuzr.js → swapVertical-BAz7hmKO.js} +1 -1
- package/dist/swapVertical-D1CdGHJt.js +12 -0
- package/dist/{telegram-BC6rpZd8.js → telegram-BMT9bLfw.js} +1 -1
- package/dist/telegram-dDQ2sOw5.js +20 -0
- package/dist/{three-dots-DC9iZV71.js → three-dots-DuhUrXKI.js} +1 -1
- package/dist/three-dots-ltDeu1Xu.js +9 -0
- package/dist/{twitch-Dqthmddu.js → twitch-ClsoABSi.js} +1 -1
- package/dist/twitch-sBusnrAt.js +22 -0
- package/dist/{twitterIcon-DIWxOs67.js → twitterIcon-B9n98fnH.js} +1 -1
- package/dist/twitterIcon-BKMgaEZ4.js +10 -0
- package/dist/{unsupportedProp-BW6bMgdV.js → unsupportedProp-BXmR-9gT.js} +1 -1
- package/dist/unsupportedProp-P9y3_0om.js +10 -0
- package/dist/{useRegisterError-D0oAcJrb.js → useRegisterError-DGMdKFc9.js} +1 -1
- package/dist/useRegisterError-DVG0sgLq.js +8918 -0
- package/dist/{verify-GrViE51Y.js → verify-BHTa1Niv.js} +1 -1
- package/dist/verify-DXzijLDZ.js +12 -0
- package/dist/{verify-filled-Cws_QO3X.js → verify-filled-CqobBYuI.js} +1 -1
- package/dist/verify-filled-DnKqj8X5.js +12 -0
- package/dist/{w3m-modal-n7hzVP_I.js → w3m-modal-B7akV0Kp.js} +2 -2
- package/dist/w3m-modal-Cc1j8j_E.js +1471 -0
- package/dist/{wallet-Cd1ruTUh.js → wallet-ObJy7yZR.js} +1 -1
- package/dist/{wallet-placeholder-Ce4gGswZ.js → wallet-placeholder-BxVrKpEz.js} +1 -1
- package/dist/wallet-placeholder-DEsjd5Nv.js +18 -0
- package/dist/wallet-zL6TDKIa.js +12 -0
- package/dist/{walletconnect-CqpJhu9-.js → walletconnect-CYJbrPQQ.js} +1 -1
- package/dist/walletconnect-CZz6e0wy.js +36 -0
- package/dist/{warning-circle-DQ6ZS1NO.js → warning-circle-DOwgDOgL.js} +1 -1
- package/dist/warning-circle-DsGlg2MF.js +16 -0
- package/dist/{x-CR749er2.js → x-B03u0kWD.js} +1 -1
- package/dist/x-MwPhq03Y.js +16 -0
- package/package.json +1 -1
- package/dist/index.es-C8qSCFHh.js +0 -13234
@@ -0,0 +1,1471 @@
|
|
1
|
+
import { w as ve, p as fe, s as ge, q as be, M as g, t as ne, R as l, i as v, r as P, a as f, x as o, u as K, e as ce, o as le, h as m, d as Y, j as ye, v as S, E as ie, O as I, C as q, y as oe, k as T, A as H, T as xe, z as Ce, b as ke, g as Se } from "./core-BYOwnw_B.js";
|
2
|
+
import { c as u, n as d, r as w, o as F, U as We } from "./index-CoV9zQx1.js";
|
3
|
+
const p = fe({
|
4
|
+
message: "",
|
5
|
+
open: !1,
|
6
|
+
triggerRect: {
|
7
|
+
width: 0,
|
8
|
+
height: 0,
|
9
|
+
top: 0,
|
10
|
+
left: 0
|
11
|
+
},
|
12
|
+
variant: "shade"
|
13
|
+
}), Re = {
|
14
|
+
state: p,
|
15
|
+
subscribe(r) {
|
16
|
+
return be(p, () => r(p));
|
17
|
+
},
|
18
|
+
subscribeKey(r, e) {
|
19
|
+
return ge(p, r, e);
|
20
|
+
},
|
21
|
+
showTooltip({ message: r, triggerRect: e, variant: t }) {
|
22
|
+
p.open = !0, p.message = r, p.triggerRect = e, p.variant = t;
|
23
|
+
},
|
24
|
+
hide() {
|
25
|
+
p.open = !1, p.message = "", p.triggerRect = {
|
26
|
+
width: 0,
|
27
|
+
height: 0,
|
28
|
+
top: 0,
|
29
|
+
left: 0
|
30
|
+
};
|
31
|
+
}
|
32
|
+
}, N = ve(Re), we = {
|
33
|
+
isUnsupportedChainView() {
|
34
|
+
return l.state.view === "UnsupportedChain" || l.state.view === "SwitchNetwork" && l.state.history.includes("UnsupportedChain");
|
35
|
+
},
|
36
|
+
async safeClose() {
|
37
|
+
if (this.isUnsupportedChainView()) {
|
38
|
+
g.shake();
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
if (await ne.isSIWXCloseDisabled()) {
|
42
|
+
g.shake();
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
g.close();
|
46
|
+
}
|
47
|
+
}, $e = v`
|
48
|
+
:host {
|
49
|
+
display: block;
|
50
|
+
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
|
51
|
+
box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);
|
52
|
+
background-color: var(--wui-color-modal-bg);
|
53
|
+
overflow: hidden;
|
54
|
+
}
|
55
|
+
|
56
|
+
:host([data-embedded='true']) {
|
57
|
+
box-shadow:
|
58
|
+
0 0 0 1px var(--wui-color-gray-glass-005),
|
59
|
+
0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);
|
60
|
+
}
|
61
|
+
`;
|
62
|
+
var Ae = function(r, e, t, a) {
|
63
|
+
var s = arguments.length, i = s < 3 ? e : a === null ? a = Object.getOwnPropertyDescriptor(e, t) : a, n;
|
64
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
65
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
66
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
67
|
+
};
|
68
|
+
let J = class extends f {
|
69
|
+
render() {
|
70
|
+
return o`<slot></slot>`;
|
71
|
+
}
|
72
|
+
};
|
73
|
+
J.styles = [P, $e];
|
74
|
+
J = Ae([
|
75
|
+
u("wui-card")
|
76
|
+
], J);
|
77
|
+
const Te = v`
|
78
|
+
:host {
|
79
|
+
display: flex;
|
80
|
+
align-items: center;
|
81
|
+
justify-content: center;
|
82
|
+
padding: var(--wui-spacing-s);
|
83
|
+
border-radius: var(--wui-border-radius-s);
|
84
|
+
border: 1px solid var(--wui-color-dark-glass-100);
|
85
|
+
box-sizing: border-box;
|
86
|
+
background-color: var(--wui-color-bg-325);
|
87
|
+
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
|
88
|
+
}
|
89
|
+
|
90
|
+
wui-flex {
|
91
|
+
width: 100%;
|
92
|
+
}
|
93
|
+
|
94
|
+
wui-text {
|
95
|
+
word-break: break-word;
|
96
|
+
flex: 1;
|
97
|
+
}
|
98
|
+
|
99
|
+
.close {
|
100
|
+
cursor: pointer;
|
101
|
+
}
|
102
|
+
|
103
|
+
.icon-box {
|
104
|
+
height: 40px;
|
105
|
+
width: 40px;
|
106
|
+
border-radius: var(--wui-border-radius-3xs);
|
107
|
+
background-color: var(--local-icon-bg-value);
|
108
|
+
}
|
109
|
+
`;
|
110
|
+
var B = function(r, e, t, a) {
|
111
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
112
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
113
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
114
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
115
|
+
};
|
116
|
+
let W = class extends f {
|
117
|
+
constructor() {
|
118
|
+
super(...arguments), this.message = "", this.backgroundColor = "accent-100", this.iconColor = "accent-100", this.icon = "info";
|
119
|
+
}
|
120
|
+
render() {
|
121
|
+
return this.style.cssText = `
|
122
|
+
--local-icon-bg-value: var(--wui-color-${this.backgroundColor});
|
123
|
+
`, o`
|
124
|
+
<wui-flex flexDirection="row" justifyContent="space-between" alignItems="center">
|
125
|
+
<wui-flex columnGap="xs" flexDirection="row" alignItems="center">
|
126
|
+
<wui-flex
|
127
|
+
flexDirection="row"
|
128
|
+
alignItems="center"
|
129
|
+
justifyContent="center"
|
130
|
+
class="icon-box"
|
131
|
+
>
|
132
|
+
<wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon>
|
133
|
+
</wui-flex>
|
134
|
+
<wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text"
|
135
|
+
>${this.message}</wui-text
|
136
|
+
>
|
137
|
+
</wui-flex>
|
138
|
+
<wui-icon
|
139
|
+
class="close"
|
140
|
+
color="bg-350"
|
141
|
+
size="sm"
|
142
|
+
name="close"
|
143
|
+
@click=${this.onClose}
|
144
|
+
></wui-icon>
|
145
|
+
</wui-flex>
|
146
|
+
`;
|
147
|
+
}
|
148
|
+
onClose() {
|
149
|
+
K.close();
|
150
|
+
}
|
151
|
+
};
|
152
|
+
W.styles = [P, Te];
|
153
|
+
B([
|
154
|
+
d()
|
155
|
+
], W.prototype, "message", void 0);
|
156
|
+
B([
|
157
|
+
d()
|
158
|
+
], W.prototype, "backgroundColor", void 0);
|
159
|
+
B([
|
160
|
+
d()
|
161
|
+
], W.prototype, "iconColor", void 0);
|
162
|
+
B([
|
163
|
+
d()
|
164
|
+
], W.prototype, "icon", void 0);
|
165
|
+
W = B([
|
166
|
+
u("wui-alertbar")
|
167
|
+
], W);
|
168
|
+
const Ne = v`
|
169
|
+
:host {
|
170
|
+
display: block;
|
171
|
+
position: absolute;
|
172
|
+
top: var(--wui-spacing-s);
|
173
|
+
left: var(--wui-spacing-l);
|
174
|
+
right: var(--wui-spacing-l);
|
175
|
+
opacity: 0;
|
176
|
+
pointer-events: none;
|
177
|
+
}
|
178
|
+
`;
|
179
|
+
var de = function(r, e, t, a) {
|
180
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
181
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
182
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
183
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
184
|
+
};
|
185
|
+
const Ee = {
|
186
|
+
info: {
|
187
|
+
backgroundColor: "fg-350",
|
188
|
+
iconColor: "fg-325",
|
189
|
+
icon: "info"
|
190
|
+
},
|
191
|
+
success: {
|
192
|
+
backgroundColor: "success-glass-reown-020",
|
193
|
+
iconColor: "success-125",
|
194
|
+
icon: "checkmark"
|
195
|
+
},
|
196
|
+
warning: {
|
197
|
+
backgroundColor: "warning-glass-reown-020",
|
198
|
+
iconColor: "warning-100",
|
199
|
+
icon: "warningCircle"
|
200
|
+
},
|
201
|
+
error: {
|
202
|
+
backgroundColor: "error-glass-reown-020",
|
203
|
+
iconColor: "error-125",
|
204
|
+
icon: "exclamationTriangle"
|
205
|
+
}
|
206
|
+
};
|
207
|
+
let M = class extends f {
|
208
|
+
constructor() {
|
209
|
+
super(), this.unsubscribe = [], this.open = K.state.open, this.onOpen(!0), this.unsubscribe.push(K.subscribeKey("open", (e) => {
|
210
|
+
this.open = e, this.onOpen(!1);
|
211
|
+
}));
|
212
|
+
}
|
213
|
+
disconnectedCallback() {
|
214
|
+
this.unsubscribe.forEach((e) => e());
|
215
|
+
}
|
216
|
+
render() {
|
217
|
+
const { message: e, variant: t } = K.state, a = Ee[t];
|
218
|
+
return o`
|
219
|
+
<wui-alertbar
|
220
|
+
message=${e}
|
221
|
+
backgroundColor=${a == null ? void 0 : a.backgroundColor}
|
222
|
+
iconColor=${a == null ? void 0 : a.iconColor}
|
223
|
+
icon=${a == null ? void 0 : a.icon}
|
224
|
+
></wui-alertbar>
|
225
|
+
`;
|
226
|
+
}
|
227
|
+
onOpen(e) {
|
228
|
+
this.open ? (this.animate([
|
229
|
+
{ opacity: 0, transform: "scale(0.85)" },
|
230
|
+
{ opacity: 1, transform: "scale(1)" }
|
231
|
+
], {
|
232
|
+
duration: 150,
|
233
|
+
fill: "forwards",
|
234
|
+
easing: "ease"
|
235
|
+
}), this.style.cssText = "pointer-events: auto") : e || (this.animate([
|
236
|
+
{ opacity: 1, transform: "scale(1)" },
|
237
|
+
{ opacity: 0, transform: "scale(0.85)" }
|
238
|
+
], {
|
239
|
+
duration: 150,
|
240
|
+
fill: "forwards",
|
241
|
+
easing: "ease"
|
242
|
+
}), this.style.cssText = "pointer-events: none");
|
243
|
+
}
|
244
|
+
};
|
245
|
+
M.styles = Ne;
|
246
|
+
de([
|
247
|
+
w()
|
248
|
+
], M.prototype, "open", void 0);
|
249
|
+
M = de([
|
250
|
+
u("w3m-alertbar")
|
251
|
+
], M);
|
252
|
+
const Ie = v`
|
253
|
+
button {
|
254
|
+
border-radius: var(--local-border-radius);
|
255
|
+
color: var(--wui-color-fg-100);
|
256
|
+
padding: var(--local-padding);
|
257
|
+
}
|
258
|
+
|
259
|
+
@media (max-width: 700px) {
|
260
|
+
button {
|
261
|
+
padding: var(--wui-spacing-s);
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
265
|
+
button > wui-icon {
|
266
|
+
pointer-events: none;
|
267
|
+
}
|
268
|
+
|
269
|
+
button:disabled > wui-icon {
|
270
|
+
color: var(--wui-color-bg-300) !important;
|
271
|
+
}
|
272
|
+
|
273
|
+
button:disabled {
|
274
|
+
background-color: transparent;
|
275
|
+
}
|
276
|
+
`;
|
277
|
+
var L = function(r, e, t, a) {
|
278
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
279
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
280
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
281
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
282
|
+
};
|
283
|
+
let R = class extends f {
|
284
|
+
constructor() {
|
285
|
+
super(...arguments), this.size = "md", this.disabled = !1, this.icon = "copy", this.iconColor = "inherit";
|
286
|
+
}
|
287
|
+
render() {
|
288
|
+
const e = this.size === "lg" ? "--wui-border-radius-xs" : "--wui-border-radius-xxs", t = this.size === "lg" ? "--wui-spacing-1xs" : "--wui-spacing-2xs";
|
289
|
+
return this.style.cssText = `
|
290
|
+
--local-border-radius: var(${e});
|
291
|
+
--local-padding: var(${t});
|
292
|
+
`, o`
|
293
|
+
<button ?disabled=${this.disabled}>
|
294
|
+
<wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>
|
295
|
+
</button>
|
296
|
+
`;
|
297
|
+
}
|
298
|
+
};
|
299
|
+
R.styles = [P, ce, le, Ie];
|
300
|
+
L([
|
301
|
+
d()
|
302
|
+
], R.prototype, "size", void 0);
|
303
|
+
L([
|
304
|
+
d({ type: Boolean })
|
305
|
+
], R.prototype, "disabled", void 0);
|
306
|
+
L([
|
307
|
+
d()
|
308
|
+
], R.prototype, "icon", void 0);
|
309
|
+
L([
|
310
|
+
d()
|
311
|
+
], R.prototype, "iconColor", void 0);
|
312
|
+
R = L([
|
313
|
+
u("wui-icon-link")
|
314
|
+
], R);
|
315
|
+
const Oe = v`
|
316
|
+
button {
|
317
|
+
display: block;
|
318
|
+
display: flex;
|
319
|
+
align-items: center;
|
320
|
+
padding: var(--wui-spacing-xxs);
|
321
|
+
gap: var(--wui-spacing-xxs);
|
322
|
+
transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);
|
323
|
+
border-radius: var(--wui-border-radius-xxs);
|
324
|
+
}
|
325
|
+
|
326
|
+
wui-image {
|
327
|
+
border-radius: 100%;
|
328
|
+
width: var(--wui-spacing-xl);
|
329
|
+
height: var(--wui-spacing-xl);
|
330
|
+
}
|
331
|
+
|
332
|
+
wui-icon-box {
|
333
|
+
width: var(--wui-spacing-xl);
|
334
|
+
height: var(--wui-spacing-xl);
|
335
|
+
}
|
336
|
+
|
337
|
+
button:hover {
|
338
|
+
background-color: var(--wui-color-gray-glass-002);
|
339
|
+
}
|
340
|
+
|
341
|
+
button:active {
|
342
|
+
background-color: var(--wui-color-gray-glass-005);
|
343
|
+
}
|
344
|
+
`;
|
345
|
+
var ue = function(r, e, t, a) {
|
346
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
347
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
348
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
349
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
350
|
+
};
|
351
|
+
let V = class extends f {
|
352
|
+
constructor() {
|
353
|
+
super(...arguments), this.imageSrc = "";
|
354
|
+
}
|
355
|
+
render() {
|
356
|
+
return o`<button>
|
357
|
+
${this.imageTemplate()}
|
358
|
+
<wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
|
359
|
+
</button>`;
|
360
|
+
}
|
361
|
+
imageTemplate() {
|
362
|
+
return this.imageSrc ? o`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>` : o`<wui-icon-box
|
363
|
+
size="xxs"
|
364
|
+
iconColor="fg-200"
|
365
|
+
backgroundColor="fg-100"
|
366
|
+
background="opaque"
|
367
|
+
icon="networkPlaceholder"
|
368
|
+
></wui-icon-box>`;
|
369
|
+
}
|
370
|
+
};
|
371
|
+
V.styles = [P, ce, le, Oe];
|
372
|
+
ue([
|
373
|
+
d()
|
374
|
+
], V.prototype, "imageSrc", void 0);
|
375
|
+
V = ue([
|
376
|
+
u("wui-select")
|
377
|
+
], V);
|
378
|
+
const Pe = v`
|
379
|
+
:host {
|
380
|
+
height: 64px;
|
381
|
+
}
|
382
|
+
|
383
|
+
wui-text {
|
384
|
+
text-transform: capitalize;
|
385
|
+
}
|
386
|
+
|
387
|
+
wui-flex.w3m-header-title {
|
388
|
+
transform: translateY(0);
|
389
|
+
opacity: 1;
|
390
|
+
}
|
391
|
+
|
392
|
+
wui-flex.w3m-header-title[view-direction='prev'] {
|
393
|
+
animation:
|
394
|
+
slide-down-out 120ms forwards var(--wui-ease-out-power-2),
|
395
|
+
slide-down-in 120ms forwards var(--wui-ease-out-power-2);
|
396
|
+
animation-delay: 0ms, 200ms;
|
397
|
+
}
|
398
|
+
|
399
|
+
wui-flex.w3m-header-title[view-direction='next'] {
|
400
|
+
animation:
|
401
|
+
slide-up-out 120ms forwards var(--wui-ease-out-power-2),
|
402
|
+
slide-up-in 120ms forwards var(--wui-ease-out-power-2);
|
403
|
+
animation-delay: 0ms, 200ms;
|
404
|
+
}
|
405
|
+
|
406
|
+
wui-icon-link[data-hidden='true'] {
|
407
|
+
opacity: 0 !important;
|
408
|
+
pointer-events: none;
|
409
|
+
}
|
410
|
+
|
411
|
+
@keyframes slide-up-out {
|
412
|
+
from {
|
413
|
+
transform: translateY(0px);
|
414
|
+
opacity: 1;
|
415
|
+
}
|
416
|
+
to {
|
417
|
+
transform: translateY(3px);
|
418
|
+
opacity: 0;
|
419
|
+
}
|
420
|
+
}
|
421
|
+
|
422
|
+
@keyframes slide-up-in {
|
423
|
+
from {
|
424
|
+
transform: translateY(-3px);
|
425
|
+
opacity: 0;
|
426
|
+
}
|
427
|
+
to {
|
428
|
+
transform: translateY(0);
|
429
|
+
opacity: 1;
|
430
|
+
}
|
431
|
+
}
|
432
|
+
|
433
|
+
@keyframes slide-down-out {
|
434
|
+
from {
|
435
|
+
transform: translateY(0px);
|
436
|
+
opacity: 1;
|
437
|
+
}
|
438
|
+
to {
|
439
|
+
transform: translateY(-3px);
|
440
|
+
opacity: 0;
|
441
|
+
}
|
442
|
+
}
|
443
|
+
|
444
|
+
@keyframes slide-down-in {
|
445
|
+
from {
|
446
|
+
transform: translateY(3px);
|
447
|
+
opacity: 0;
|
448
|
+
}
|
449
|
+
to {
|
450
|
+
transform: translateY(0);
|
451
|
+
opacity: 1;
|
452
|
+
}
|
453
|
+
}
|
454
|
+
`;
|
455
|
+
var y = function(r, e, t, a) {
|
456
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
457
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
458
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
459
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
460
|
+
};
|
461
|
+
const Be = ["SmartSessionList"];
|
462
|
+
function G() {
|
463
|
+
var n, c, E, k, _, z, D;
|
464
|
+
const r = (c = (n = l.state.data) == null ? void 0 : n.connector) == null ? void 0 : c.name, e = (k = (E = l.state.data) == null ? void 0 : E.wallet) == null ? void 0 : k.name, t = (z = (_ = l.state.data) == null ? void 0 : _.network) == null ? void 0 : z.name, a = e ?? r, s = q.getConnectors();
|
465
|
+
return {
|
466
|
+
Connect: `Connect ${s.length === 1 && ((D = s[0]) == null ? void 0 : D.id) === "w3m-email" ? "Email" : ""} Wallet`,
|
467
|
+
Create: "Create Wallet",
|
468
|
+
ChooseAccountName: void 0,
|
469
|
+
Account: void 0,
|
470
|
+
AccountSettings: void 0,
|
471
|
+
AllWallets: "All Wallets",
|
472
|
+
ApproveTransaction: "Approve Transaction",
|
473
|
+
BuyInProgress: "Buy",
|
474
|
+
ConnectingExternal: a ?? "Connect Wallet",
|
475
|
+
ConnectingWalletConnect: a ?? "WalletConnect",
|
476
|
+
ConnectingWalletConnectBasic: "WalletConnect",
|
477
|
+
ConnectingSiwe: "Sign In",
|
478
|
+
Convert: "Convert",
|
479
|
+
ConvertSelectToken: "Select token",
|
480
|
+
ConvertPreview: "Preview convert",
|
481
|
+
Downloads: a ? `Get ${a}` : "Downloads",
|
482
|
+
EmailLogin: "Email Login",
|
483
|
+
EmailVerifyOtp: "Confirm Email",
|
484
|
+
EmailVerifyDevice: "Register Device",
|
485
|
+
GetWallet: "Get a wallet",
|
486
|
+
Networks: "Choose Network",
|
487
|
+
OnRampProviders: "Choose Provider",
|
488
|
+
OnRampActivity: "Activity",
|
489
|
+
OnRampTokenSelect: "Select Token",
|
490
|
+
OnRampFiatSelect: "Select Currency",
|
491
|
+
Pay: "How you pay",
|
492
|
+
Profile: void 0,
|
493
|
+
SwitchNetwork: t ?? "Switch Network",
|
494
|
+
SwitchAddress: "Switch Address",
|
495
|
+
Transactions: "Activity",
|
496
|
+
UnsupportedChain: "Switch Network",
|
497
|
+
UpgradeEmailWallet: "Upgrade your Wallet",
|
498
|
+
UpdateEmailWallet: "Edit Email",
|
499
|
+
UpdateEmailPrimaryOtp: "Confirm Current Email",
|
500
|
+
UpdateEmailSecondaryOtp: "Confirm New Email",
|
501
|
+
WhatIsABuy: "What is Buy?",
|
502
|
+
RegisterAccountName: "Choose name",
|
503
|
+
RegisterAccountNameSuccess: "",
|
504
|
+
WalletReceive: "Receive",
|
505
|
+
WalletCompatibleNetworks: "Compatible Networks",
|
506
|
+
Swap: "Swap",
|
507
|
+
SwapSelectToken: "Select token",
|
508
|
+
SwapPreview: "Preview swap",
|
509
|
+
WalletSend: "Send",
|
510
|
+
WalletSendPreview: "Review send",
|
511
|
+
WalletSendSelectToken: "Select Token",
|
512
|
+
WhatIsANetwork: "What is a network?",
|
513
|
+
WhatIsAWallet: "What is a wallet?",
|
514
|
+
ConnectWallets: "Connect wallet",
|
515
|
+
ConnectSocials: "All socials",
|
516
|
+
ConnectingSocial: oe.state.socialProvider ? oe.state.socialProvider : "Connect Social",
|
517
|
+
ConnectingMultiChain: "Select chain",
|
518
|
+
ConnectingFarcaster: "Farcaster",
|
519
|
+
SwitchActiveChain: "Switch chain",
|
520
|
+
SmartSessionCreated: void 0,
|
521
|
+
SmartSessionList: "Smart Sessions",
|
522
|
+
SIWXSignMessage: "Sign In",
|
523
|
+
PayLoading: "Payment in progress"
|
524
|
+
};
|
525
|
+
}
|
526
|
+
let h = class extends f {
|
527
|
+
constructor() {
|
528
|
+
super(), this.unsubscribe = [], this.heading = G()[l.state.view], this.network = m.state.activeCaipNetwork, this.networkImage = Y.getNetworkImage(this.network), this.showBack = !1, this.prevHistoryLength = 1, this.view = l.state.view, this.viewDirection = "", this.headerText = G()[l.state.view], this.unsubscribe.push(ye.subscribeNetworkImages(() => {
|
529
|
+
this.networkImage = Y.getNetworkImage(this.network);
|
530
|
+
}), l.subscribeKey("view", (e) => {
|
531
|
+
setTimeout(() => {
|
532
|
+
this.view = e, this.headerText = G()[e];
|
533
|
+
}, S.ANIMATION_DURATIONS.HeaderText), this.onViewChange(), this.onHistoryChange();
|
534
|
+
}), m.subscribeKey("activeCaipNetwork", (e) => {
|
535
|
+
this.network = e, this.networkImage = Y.getNetworkImage(this.network);
|
536
|
+
}));
|
537
|
+
}
|
538
|
+
disconnectCallback() {
|
539
|
+
this.unsubscribe.forEach((e) => e());
|
540
|
+
}
|
541
|
+
render() {
|
542
|
+
return o`
|
543
|
+
<wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
|
544
|
+
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
545
|
+
</wui-flex>
|
546
|
+
`;
|
547
|
+
}
|
548
|
+
onWalletHelp() {
|
549
|
+
ie.sendEvent({ type: "track", event: "CLICK_WALLET_HELP" }), l.push("WhatIsAWallet");
|
550
|
+
}
|
551
|
+
async onClose() {
|
552
|
+
await we.safeClose();
|
553
|
+
}
|
554
|
+
rightHeaderTemplate() {
|
555
|
+
var t, a, s;
|
556
|
+
const e = (s = (a = (t = I) == null ? void 0 : t.state) == null ? void 0 : a.features) == null ? void 0 : s.smartSessions;
|
557
|
+
return l.state.view !== "Account" || !e ? this.closeButtonTemplate() : o`<wui-flex>
|
558
|
+
<wui-icon-link
|
559
|
+
icon="clock"
|
560
|
+
@click=${() => l.push("SmartSessionList")}
|
561
|
+
data-testid="w3m-header-smart-sessions"
|
562
|
+
></wui-icon-link>
|
563
|
+
${this.closeButtonTemplate()}
|
564
|
+
</wui-flex> `;
|
565
|
+
}
|
566
|
+
closeButtonTemplate() {
|
567
|
+
return o`
|
568
|
+
<wui-icon-link
|
569
|
+
icon="close"
|
570
|
+
@click=${this.onClose.bind(this)}
|
571
|
+
data-testid="w3m-header-close"
|
572
|
+
></wui-icon-link>
|
573
|
+
`;
|
574
|
+
}
|
575
|
+
titleTemplate() {
|
576
|
+
const e = Be.includes(this.view);
|
577
|
+
return o`
|
578
|
+
<wui-flex
|
579
|
+
view-direction="${this.viewDirection}"
|
580
|
+
class="w3m-header-title"
|
581
|
+
alignItems="center"
|
582
|
+
gap="xs"
|
583
|
+
>
|
584
|
+
<wui-text variant="paragraph-700" color="fg-100" data-testid="w3m-header-text"
|
585
|
+
>${this.headerText}</wui-text
|
586
|
+
>
|
587
|
+
${e ? o`<wui-tag variant="main">Beta</wui-tag>` : null}
|
588
|
+
</wui-flex>
|
589
|
+
`;
|
590
|
+
}
|
591
|
+
leftHeaderTemplate() {
|
592
|
+
var k;
|
593
|
+
const { view: e } = l.state, t = e === "Connect", a = I.state.enableEmbedded, s = e === "ApproveTransaction", i = e === "ConnectingSiwe", n = e === "Account", c = I.state.enableNetworkSwitch, E = s || i || t && a;
|
594
|
+
return n && c ? o`<wui-select
|
595
|
+
id="dynamic"
|
596
|
+
data-testid="w3m-account-select-network"
|
597
|
+
active-network=${F((k = this.network) == null ? void 0 : k.name)}
|
598
|
+
@click=${this.onNetworks.bind(this)}
|
599
|
+
imageSrc=${F(this.networkImage)}
|
600
|
+
></wui-select>` : this.showBack && !E ? o`<wui-icon-link
|
601
|
+
data-testid="header-back"
|
602
|
+
id="dynamic"
|
603
|
+
icon="chevronLeft"
|
604
|
+
@click=${this.onGoBack.bind(this)}
|
605
|
+
></wui-icon-link>` : o`<wui-icon-link
|
606
|
+
data-hidden=${!t}
|
607
|
+
id="dynamic"
|
608
|
+
icon="helpCircle"
|
609
|
+
@click=${this.onWalletHelp.bind(this)}
|
610
|
+
></wui-icon-link>`;
|
611
|
+
}
|
612
|
+
onNetworks() {
|
613
|
+
this.isAllowedNetworkSwitch() && (ie.sendEvent({ type: "track", event: "CLICK_NETWORKS" }), l.push("Networks"));
|
614
|
+
}
|
615
|
+
isAllowedNetworkSwitch() {
|
616
|
+
const e = m.getAllRequestedCaipNetworks(), t = e ? e.length > 1 : !1, a = e == null ? void 0 : e.find(({ id: s }) => {
|
617
|
+
var i;
|
618
|
+
return s === ((i = this.network) == null ? void 0 : i.id);
|
619
|
+
});
|
620
|
+
return t || !a;
|
621
|
+
}
|
622
|
+
getPadding() {
|
623
|
+
return this.heading ? ["l", "2l", "l", "2l"] : ["0", "2l", "0", "2l"];
|
624
|
+
}
|
625
|
+
onViewChange() {
|
626
|
+
const { history: e } = l.state;
|
627
|
+
let t = S.VIEW_DIRECTION.Next;
|
628
|
+
e.length < this.prevHistoryLength && (t = S.VIEW_DIRECTION.Prev), this.prevHistoryLength = e.length, this.viewDirection = t;
|
629
|
+
}
|
630
|
+
async onHistoryChange() {
|
631
|
+
var a;
|
632
|
+
const { history: e } = l.state, t = (a = this.shadowRoot) == null ? void 0 : a.querySelector("#dynamic");
|
633
|
+
e.length > 1 && !this.showBack && t ? (await t.animate([{ opacity: 1 }, { opacity: 0 }], {
|
634
|
+
duration: 200,
|
635
|
+
fill: "forwards",
|
636
|
+
easing: "ease"
|
637
|
+
}).finished, this.showBack = !0, t.animate([{ opacity: 0 }, { opacity: 1 }], {
|
638
|
+
duration: 200,
|
639
|
+
fill: "forwards",
|
640
|
+
easing: "ease"
|
641
|
+
})) : e.length <= 1 && this.showBack && t && (await t.animate([{ opacity: 1 }, { opacity: 0 }], {
|
642
|
+
duration: 200,
|
643
|
+
fill: "forwards",
|
644
|
+
easing: "ease"
|
645
|
+
}).finished, this.showBack = !1, t.animate([{ opacity: 0 }, { opacity: 1 }], {
|
646
|
+
duration: 200,
|
647
|
+
fill: "forwards",
|
648
|
+
easing: "ease"
|
649
|
+
}));
|
650
|
+
}
|
651
|
+
onGoBack() {
|
652
|
+
l.goBack();
|
653
|
+
}
|
654
|
+
};
|
655
|
+
h.styles = Pe;
|
656
|
+
y([
|
657
|
+
w()
|
658
|
+
], h.prototype, "heading", void 0);
|
659
|
+
y([
|
660
|
+
w()
|
661
|
+
], h.prototype, "network", void 0);
|
662
|
+
y([
|
663
|
+
w()
|
664
|
+
], h.prototype, "networkImage", void 0);
|
665
|
+
y([
|
666
|
+
w()
|
667
|
+
], h.prototype, "showBack", void 0);
|
668
|
+
y([
|
669
|
+
w()
|
670
|
+
], h.prototype, "prevHistoryLength", void 0);
|
671
|
+
y([
|
672
|
+
w()
|
673
|
+
], h.prototype, "view", void 0);
|
674
|
+
y([
|
675
|
+
w()
|
676
|
+
], h.prototype, "viewDirection", void 0);
|
677
|
+
y([
|
678
|
+
w()
|
679
|
+
], h.prototype, "headerText", void 0);
|
680
|
+
h = y([
|
681
|
+
u("w3m-header")
|
682
|
+
], h);
|
683
|
+
const Le = v`
|
684
|
+
:host {
|
685
|
+
display: flex;
|
686
|
+
column-gap: var(--wui-spacing-s);
|
687
|
+
align-items: center;
|
688
|
+
padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
|
689
|
+
border-radius: var(--wui-border-radius-s);
|
690
|
+
border: 1px solid var(--wui-color-gray-glass-005);
|
691
|
+
box-sizing: border-box;
|
692
|
+
background-color: var(--wui-color-bg-175);
|
693
|
+
box-shadow:
|
694
|
+
0px 14px 64px -4px rgba(0, 0, 0, 0.15),
|
695
|
+
0px 8px 22px -6px rgba(0, 0, 0, 0.15);
|
696
|
+
|
697
|
+
max-width: 300px;
|
698
|
+
}
|
699
|
+
|
700
|
+
:host wui-loading-spinner {
|
701
|
+
margin-left: var(--wui-spacing-3xs);
|
702
|
+
}
|
703
|
+
`;
|
704
|
+
var A = function(r, e, t, a) {
|
705
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
706
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
707
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
708
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
709
|
+
};
|
710
|
+
let b = class extends f {
|
711
|
+
constructor() {
|
712
|
+
super(...arguments), this.backgroundColor = "accent-100", this.iconColor = "accent-100", this.icon = "checkmark", this.message = "", this.loading = !1, this.iconType = "default";
|
713
|
+
}
|
714
|
+
render() {
|
715
|
+
return o`
|
716
|
+
${this.templateIcon()}
|
717
|
+
<wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message"
|
718
|
+
>${this.message}</wui-text
|
719
|
+
>
|
720
|
+
`;
|
721
|
+
}
|
722
|
+
templateIcon() {
|
723
|
+
return this.loading ? o`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>` : this.iconType === "default" ? o`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>` : o`<wui-icon-box
|
724
|
+
size="sm"
|
725
|
+
iconSize="xs"
|
726
|
+
iconColor=${this.iconColor}
|
727
|
+
backgroundColor=${this.backgroundColor}
|
728
|
+
icon=${this.icon}
|
729
|
+
background="opaque"
|
730
|
+
></wui-icon-box>`;
|
731
|
+
}
|
732
|
+
};
|
733
|
+
b.styles = [P, Le];
|
734
|
+
A([
|
735
|
+
d()
|
736
|
+
], b.prototype, "backgroundColor", void 0);
|
737
|
+
A([
|
738
|
+
d()
|
739
|
+
], b.prototype, "iconColor", void 0);
|
740
|
+
A([
|
741
|
+
d()
|
742
|
+
], b.prototype, "icon", void 0);
|
743
|
+
A([
|
744
|
+
d()
|
745
|
+
], b.prototype, "message", void 0);
|
746
|
+
A([
|
747
|
+
d()
|
748
|
+
], b.prototype, "loading", void 0);
|
749
|
+
A([
|
750
|
+
d()
|
751
|
+
], b.prototype, "iconType", void 0);
|
752
|
+
b = A([
|
753
|
+
u("wui-snackbar")
|
754
|
+
], b);
|
755
|
+
const Ue = v`
|
756
|
+
:host {
|
757
|
+
display: block;
|
758
|
+
position: absolute;
|
759
|
+
opacity: 0;
|
760
|
+
pointer-events: none;
|
761
|
+
top: 11px;
|
762
|
+
left: 50%;
|
763
|
+
width: max-content;
|
764
|
+
}
|
765
|
+
`;
|
766
|
+
var pe = function(r, e, t, a) {
|
767
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
768
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
769
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
770
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
771
|
+
};
|
772
|
+
const _e = {
|
773
|
+
loading: void 0,
|
774
|
+
success: {
|
775
|
+
backgroundColor: "success-100",
|
776
|
+
iconColor: "success-100",
|
777
|
+
icon: "checkmark"
|
778
|
+
},
|
779
|
+
error: {
|
780
|
+
backgroundColor: "error-100",
|
781
|
+
iconColor: "error-100",
|
782
|
+
icon: "close"
|
783
|
+
}
|
784
|
+
};
|
785
|
+
let X = class extends f {
|
786
|
+
constructor() {
|
787
|
+
super(), this.unsubscribe = [], this.timeout = void 0, this.open = T.state.open, this.unsubscribe.push(T.subscribeKey("open", (e) => {
|
788
|
+
this.open = e, this.onOpen();
|
789
|
+
}));
|
790
|
+
}
|
791
|
+
disconnectedCallback() {
|
792
|
+
clearTimeout(this.timeout), this.unsubscribe.forEach((e) => e());
|
793
|
+
}
|
794
|
+
render() {
|
795
|
+
const { message: e, variant: t, svg: a } = T.state, s = _e[t], { icon: i, iconColor: n } = a ?? s ?? {};
|
796
|
+
return o`
|
797
|
+
<wui-snackbar
|
798
|
+
message=${e}
|
799
|
+
backgroundColor=${s == null ? void 0 : s.backgroundColor}
|
800
|
+
iconColor=${n}
|
801
|
+
icon=${i}
|
802
|
+
.loading=${t === "loading"}
|
803
|
+
></wui-snackbar>
|
804
|
+
`;
|
805
|
+
}
|
806
|
+
onOpen() {
|
807
|
+
clearTimeout(this.timeout), this.open ? (this.animate([
|
808
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" },
|
809
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" }
|
810
|
+
], {
|
811
|
+
duration: 150,
|
812
|
+
fill: "forwards",
|
813
|
+
easing: "ease"
|
814
|
+
}), this.timeout && clearTimeout(this.timeout), T.state.autoClose && (this.timeout = setTimeout(() => T.hide(), 2500))) : this.animate([
|
815
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" },
|
816
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" }
|
817
|
+
], {
|
818
|
+
duration: 150,
|
819
|
+
fill: "forwards",
|
820
|
+
easing: "ease"
|
821
|
+
});
|
822
|
+
}
|
823
|
+
};
|
824
|
+
X.styles = Ue;
|
825
|
+
pe([
|
826
|
+
w()
|
827
|
+
], X.prototype, "open", void 0);
|
828
|
+
X = pe([
|
829
|
+
u("w3m-snackbar")
|
830
|
+
], X);
|
831
|
+
const ze = v`
|
832
|
+
:host {
|
833
|
+
pointer-events: none;
|
834
|
+
}
|
835
|
+
|
836
|
+
:host > wui-flex {
|
837
|
+
display: var(--w3m-tooltip-display);
|
838
|
+
opacity: var(--w3m-tooltip-opacity);
|
839
|
+
padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);
|
840
|
+
border-radius: var(--wui-border-radius-xxs);
|
841
|
+
color: var(--wui-color-bg-100);
|
842
|
+
position: fixed;
|
843
|
+
top: var(--w3m-tooltip-top);
|
844
|
+
left: var(--w3m-tooltip-left);
|
845
|
+
transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));
|
846
|
+
max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl));
|
847
|
+
transition: opacity 0.2s var(--wui-ease-out-power-2);
|
848
|
+
will-change: opacity;
|
849
|
+
}
|
850
|
+
|
851
|
+
:host([data-variant='shade']) > wui-flex {
|
852
|
+
background-color: var(--wui-color-bg-150);
|
853
|
+
border: 1px solid var(--wui-color-gray-glass-005);
|
854
|
+
}
|
855
|
+
|
856
|
+
:host([data-variant='shade']) > wui-flex > wui-text {
|
857
|
+
color: var(--wui-color-fg-150);
|
858
|
+
}
|
859
|
+
|
860
|
+
:host([data-variant='fill']) > wui-flex {
|
861
|
+
background-color: var(--wui-color-fg-100);
|
862
|
+
border: none;
|
863
|
+
}
|
864
|
+
|
865
|
+
wui-icon {
|
866
|
+
position: absolute;
|
867
|
+
width: 12px !important;
|
868
|
+
height: 4px !important;
|
869
|
+
color: var(--wui-color-bg-150);
|
870
|
+
}
|
871
|
+
|
872
|
+
wui-icon[data-placement='top'] {
|
873
|
+
bottom: 0px;
|
874
|
+
left: 50%;
|
875
|
+
transform: translate(-50%, 95%);
|
876
|
+
}
|
877
|
+
|
878
|
+
wui-icon[data-placement='bottom'] {
|
879
|
+
top: 0;
|
880
|
+
left: 50%;
|
881
|
+
transform: translate(-50%, -95%) rotate(180deg);
|
882
|
+
}
|
883
|
+
|
884
|
+
wui-icon[data-placement='right'] {
|
885
|
+
top: 50%;
|
886
|
+
left: 0;
|
887
|
+
transform: translate(-65%, -50%) rotate(90deg);
|
888
|
+
}
|
889
|
+
|
890
|
+
wui-icon[data-placement='left'] {
|
891
|
+
top: 50%;
|
892
|
+
right: 0%;
|
893
|
+
transform: translate(65%, -50%) rotate(270deg);
|
894
|
+
}
|
895
|
+
`;
|
896
|
+
var U = function(r, e, t, a) {
|
897
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
898
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
899
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
900
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
901
|
+
};
|
902
|
+
let $ = class extends f {
|
903
|
+
constructor() {
|
904
|
+
super(), this.unsubscribe = [], this.open = N.state.open, this.message = N.state.message, this.triggerRect = N.state.triggerRect, this.variant = N.state.variant, this.unsubscribe.push(N.subscribe((e) => {
|
905
|
+
this.open = e.open, this.message = e.message, this.triggerRect = e.triggerRect, this.variant = e.variant;
|
906
|
+
}));
|
907
|
+
}
|
908
|
+
disconnectedCallback() {
|
909
|
+
this.unsubscribe.forEach((e) => e());
|
910
|
+
}
|
911
|
+
render() {
|
912
|
+
this.dataset.variant = this.variant;
|
913
|
+
const e = this.triggerRect.top, t = this.triggerRect.left;
|
914
|
+
return this.style.cssText = `
|
915
|
+
--w3m-tooltip-top: ${e}px;
|
916
|
+
--w3m-tooltip-left: ${t}px;
|
917
|
+
--w3m-tooltip-parent-width: ${this.triggerRect.width / 2}px;
|
918
|
+
--w3m-tooltip-display: ${this.open ? "flex" : "none"};
|
919
|
+
--w3m-tooltip-opacity: ${this.open ? 1 : 0};
|
920
|
+
`, o`<wui-flex>
|
921
|
+
<wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon>
|
922
|
+
<wui-text color="inherit" variant="small-500">${this.message}</wui-text>
|
923
|
+
</wui-flex>`;
|
924
|
+
}
|
925
|
+
};
|
926
|
+
$.styles = [ze];
|
927
|
+
U([
|
928
|
+
w()
|
929
|
+
], $.prototype, "open", void 0);
|
930
|
+
U([
|
931
|
+
w()
|
932
|
+
], $.prototype, "message", void 0);
|
933
|
+
U([
|
934
|
+
w()
|
935
|
+
], $.prototype, "triggerRect", void 0);
|
936
|
+
U([
|
937
|
+
w()
|
938
|
+
], $.prototype, "variant", void 0);
|
939
|
+
$ = U([
|
940
|
+
u("w3m-tooltip"),
|
941
|
+
u("w3m-tooltip")
|
942
|
+
], $);
|
943
|
+
const De = v`
|
944
|
+
:host {
|
945
|
+
--prev-height: 0px;
|
946
|
+
--new-height: 0px;
|
947
|
+
display: block;
|
948
|
+
}
|
949
|
+
|
950
|
+
div.w3m-router-container {
|
951
|
+
transform: translateY(0);
|
952
|
+
opacity: 1;
|
953
|
+
}
|
954
|
+
|
955
|
+
div.w3m-router-container[view-direction='prev'] {
|
956
|
+
animation:
|
957
|
+
slide-left-out 150ms forwards ease,
|
958
|
+
slide-left-in 150ms forwards ease;
|
959
|
+
animation-delay: 0ms, 200ms;
|
960
|
+
}
|
961
|
+
|
962
|
+
div.w3m-router-container[view-direction='next'] {
|
963
|
+
animation:
|
964
|
+
slide-right-out 150ms forwards ease,
|
965
|
+
slide-right-in 150ms forwards ease;
|
966
|
+
animation-delay: 0ms, 200ms;
|
967
|
+
}
|
968
|
+
|
969
|
+
@keyframes slide-left-out {
|
970
|
+
from {
|
971
|
+
transform: translateX(0px);
|
972
|
+
opacity: 1;
|
973
|
+
}
|
974
|
+
to {
|
975
|
+
transform: translateX(10px);
|
976
|
+
opacity: 0;
|
977
|
+
}
|
978
|
+
}
|
979
|
+
|
980
|
+
@keyframes slide-left-in {
|
981
|
+
from {
|
982
|
+
transform: translateX(-10px);
|
983
|
+
opacity: 0;
|
984
|
+
}
|
985
|
+
to {
|
986
|
+
transform: translateX(0);
|
987
|
+
opacity: 1;
|
988
|
+
}
|
989
|
+
}
|
990
|
+
|
991
|
+
@keyframes slide-right-out {
|
992
|
+
from {
|
993
|
+
transform: translateX(0px);
|
994
|
+
opacity: 1;
|
995
|
+
}
|
996
|
+
to {
|
997
|
+
transform: translateX(-10px);
|
998
|
+
opacity: 0;
|
999
|
+
}
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
@keyframes slide-right-in {
|
1003
|
+
from {
|
1004
|
+
transform: translateX(10px);
|
1005
|
+
opacity: 0;
|
1006
|
+
}
|
1007
|
+
to {
|
1008
|
+
transform: translateX(0);
|
1009
|
+
opacity: 1;
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
`;
|
1013
|
+
var Q = function(r, e, t, a) {
|
1014
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
1015
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
1016
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
1017
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
1018
|
+
};
|
1019
|
+
let O = class extends f {
|
1020
|
+
constructor() {
|
1021
|
+
super(), this.resizeObserver = void 0, this.prevHeight = "0px", this.prevHistoryLength = 1, this.unsubscribe = [], this.view = l.state.view, this.viewDirection = "", this.unsubscribe.push(l.subscribeKey("view", (e) => this.onViewChange(e)));
|
1022
|
+
}
|
1023
|
+
firstUpdated() {
|
1024
|
+
var e;
|
1025
|
+
this.resizeObserver = new ResizeObserver(([t]) => {
|
1026
|
+
const a = `${t == null ? void 0 : t.contentRect.height}px`;
|
1027
|
+
this.prevHeight !== "0px" && (this.style.setProperty("--prev-height", this.prevHeight), this.style.setProperty("--new-height", a), this.style.animation = "w3m-view-height 150ms forwards ease", this.style.height = "auto"), setTimeout(() => {
|
1028
|
+
this.prevHeight = a, this.style.animation = "unset";
|
1029
|
+
}, S.ANIMATION_DURATIONS.ModalHeight);
|
1030
|
+
}), (e = this.resizeObserver) == null || e.observe(this.getWrapper());
|
1031
|
+
}
|
1032
|
+
disconnectedCallback() {
|
1033
|
+
var e;
|
1034
|
+
(e = this.resizeObserver) == null || e.unobserve(this.getWrapper()), this.unsubscribe.forEach((t) => t());
|
1035
|
+
}
|
1036
|
+
render() {
|
1037
|
+
return o`<div class="w3m-router-container" view-direction="${this.viewDirection}">
|
1038
|
+
${this.viewTemplate()}
|
1039
|
+
</div>`;
|
1040
|
+
}
|
1041
|
+
viewTemplate() {
|
1042
|
+
switch (this.view) {
|
1043
|
+
case "AccountSettings":
|
1044
|
+
return o`<w3m-account-settings-view></w3m-account-settings-view>`;
|
1045
|
+
case "Account":
|
1046
|
+
return o`<w3m-account-view></w3m-account-view>`;
|
1047
|
+
case "AllWallets":
|
1048
|
+
return o`<w3m-all-wallets-view></w3m-all-wallets-view>`;
|
1049
|
+
case "ApproveTransaction":
|
1050
|
+
return o`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;
|
1051
|
+
case "BuyInProgress":
|
1052
|
+
return o`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;
|
1053
|
+
case "ChooseAccountName":
|
1054
|
+
return o`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;
|
1055
|
+
case "Connect":
|
1056
|
+
return o`<w3m-connect-view></w3m-connect-view>`;
|
1057
|
+
case "Create":
|
1058
|
+
return o`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;
|
1059
|
+
case "ConnectingWalletConnect":
|
1060
|
+
return o`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;
|
1061
|
+
case "ConnectingWalletConnectBasic":
|
1062
|
+
return o`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;
|
1063
|
+
case "ConnectingExternal":
|
1064
|
+
return o`<w3m-connecting-external-view></w3m-connecting-external-view>`;
|
1065
|
+
case "ConnectingSiwe":
|
1066
|
+
return o`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;
|
1067
|
+
case "ConnectWallets":
|
1068
|
+
return o`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;
|
1069
|
+
case "ConnectSocials":
|
1070
|
+
return o`<w3m-connect-socials-view></w3m-connect-socials-view>`;
|
1071
|
+
case "ConnectingSocial":
|
1072
|
+
return o`<w3m-connecting-social-view></w3m-connecting-social-view>`;
|
1073
|
+
case "Downloads":
|
1074
|
+
return o`<w3m-downloads-view></w3m-downloads-view>`;
|
1075
|
+
case "EmailLogin":
|
1076
|
+
return o`<w3m-email-login-view></w3m-email-login-view>`;
|
1077
|
+
case "EmailVerifyOtp":
|
1078
|
+
return o`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;
|
1079
|
+
case "EmailVerifyDevice":
|
1080
|
+
return o`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;
|
1081
|
+
case "GetWallet":
|
1082
|
+
return o`<w3m-get-wallet-view></w3m-get-wallet-view>`;
|
1083
|
+
case "Networks":
|
1084
|
+
return o`<w3m-networks-view></w3m-networks-view>`;
|
1085
|
+
case "SwitchNetwork":
|
1086
|
+
return o`<w3m-network-switch-view></w3m-network-switch-view>`;
|
1087
|
+
case "Profile":
|
1088
|
+
return o`<w3m-profile-view></w3m-profile-view>`;
|
1089
|
+
case "SwitchAddress":
|
1090
|
+
return o`<w3m-switch-address-view></w3m-switch-address-view>`;
|
1091
|
+
case "Transactions":
|
1092
|
+
return o`<w3m-transactions-view></w3m-transactions-view>`;
|
1093
|
+
case "OnRampProviders":
|
1094
|
+
return o`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;
|
1095
|
+
case "OnRampActivity":
|
1096
|
+
return o`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;
|
1097
|
+
case "OnRampTokenSelect":
|
1098
|
+
return o`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;
|
1099
|
+
case "OnRampFiatSelect":
|
1100
|
+
return o`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;
|
1101
|
+
case "UpgradeEmailWallet":
|
1102
|
+
return o`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;
|
1103
|
+
case "UpdateEmailWallet":
|
1104
|
+
return o`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;
|
1105
|
+
case "UpdateEmailPrimaryOtp":
|
1106
|
+
return o`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;
|
1107
|
+
case "UpdateEmailSecondaryOtp":
|
1108
|
+
return o`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;
|
1109
|
+
case "UnsupportedChain":
|
1110
|
+
return o`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;
|
1111
|
+
case "Swap":
|
1112
|
+
return o`<w3m-swap-view></w3m-swap-view>`;
|
1113
|
+
case "SwapSelectToken":
|
1114
|
+
return o`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;
|
1115
|
+
case "SwapPreview":
|
1116
|
+
return o`<w3m-swap-preview-view></w3m-swap-preview-view>`;
|
1117
|
+
case "WalletSend":
|
1118
|
+
return o`<w3m-wallet-send-view></w3m-wallet-send-view>`;
|
1119
|
+
case "WalletSendSelectToken":
|
1120
|
+
return o`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;
|
1121
|
+
case "WalletSendPreview":
|
1122
|
+
return o`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;
|
1123
|
+
case "WhatIsABuy":
|
1124
|
+
return o`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;
|
1125
|
+
case "WalletReceive":
|
1126
|
+
return o`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;
|
1127
|
+
case "WalletCompatibleNetworks":
|
1128
|
+
return o`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;
|
1129
|
+
case "WhatIsAWallet":
|
1130
|
+
return o`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;
|
1131
|
+
case "ConnectingMultiChain":
|
1132
|
+
return o`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;
|
1133
|
+
case "WhatIsANetwork":
|
1134
|
+
return o`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;
|
1135
|
+
case "ConnectingFarcaster":
|
1136
|
+
return o`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;
|
1137
|
+
case "SwitchActiveChain":
|
1138
|
+
return o`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;
|
1139
|
+
case "RegisterAccountName":
|
1140
|
+
return o`<w3m-register-account-name-view></w3m-register-account-name-view>`;
|
1141
|
+
case "RegisterAccountNameSuccess":
|
1142
|
+
return o`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;
|
1143
|
+
case "SmartSessionCreated":
|
1144
|
+
return o`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;
|
1145
|
+
case "SmartSessionList":
|
1146
|
+
return o`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;
|
1147
|
+
case "SIWXSignMessage":
|
1148
|
+
return o`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;
|
1149
|
+
case "Pay":
|
1150
|
+
return o`<w3m-pay-view></w3m-pay-view>`;
|
1151
|
+
case "PayLoading":
|
1152
|
+
return o`<w3m-pay-loading-view></w3m-pay-loading-view>`;
|
1153
|
+
default:
|
1154
|
+
return o`<w3m-connect-view></w3m-connect-view>`;
|
1155
|
+
}
|
1156
|
+
}
|
1157
|
+
onViewChange(e) {
|
1158
|
+
N.hide();
|
1159
|
+
let t = S.VIEW_DIRECTION.Next;
|
1160
|
+
const { history: a } = l.state;
|
1161
|
+
a.length < this.prevHistoryLength && (t = S.VIEW_DIRECTION.Prev), this.prevHistoryLength = a.length, this.viewDirection = t, setTimeout(() => {
|
1162
|
+
this.view = e;
|
1163
|
+
}, S.ANIMATION_DURATIONS.ViewTransition);
|
1164
|
+
}
|
1165
|
+
getWrapper() {
|
1166
|
+
var e;
|
1167
|
+
return (e = this.shadowRoot) == null ? void 0 : e.querySelector("div");
|
1168
|
+
}
|
1169
|
+
};
|
1170
|
+
O.styles = De;
|
1171
|
+
Q([
|
1172
|
+
w()
|
1173
|
+
], O.prototype, "view", void 0);
|
1174
|
+
Q([
|
1175
|
+
w()
|
1176
|
+
], O.prototype, "viewDirection", void 0);
|
1177
|
+
O = Q([
|
1178
|
+
u("w3m-router")
|
1179
|
+
], O);
|
1180
|
+
const je = v`
|
1181
|
+
:host {
|
1182
|
+
z-index: var(--w3m-z-index);
|
1183
|
+
display: block;
|
1184
|
+
backface-visibility: hidden;
|
1185
|
+
will-change: opacity;
|
1186
|
+
position: fixed;
|
1187
|
+
top: 0;
|
1188
|
+
left: 0;
|
1189
|
+
right: 0;
|
1190
|
+
bottom: 0;
|
1191
|
+
pointer-events: none;
|
1192
|
+
opacity: 0;
|
1193
|
+
background-color: var(--wui-cover);
|
1194
|
+
transition: opacity 0.2s var(--wui-ease-out-power-2);
|
1195
|
+
will-change: opacity;
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
:host(.open) {
|
1199
|
+
opacity: 1;
|
1200
|
+
}
|
1201
|
+
|
1202
|
+
:host(.appkit-modal) {
|
1203
|
+
position: relative;
|
1204
|
+
pointer-events: unset;
|
1205
|
+
background: none;
|
1206
|
+
width: 100%;
|
1207
|
+
opacity: 1;
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
wui-card {
|
1211
|
+
max-width: var(--w3m-modal-width);
|
1212
|
+
width: 100%;
|
1213
|
+
position: relative;
|
1214
|
+
animation: zoom-in 0.2s var(--wui-ease-out-power-2);
|
1215
|
+
animation-fill-mode: backwards;
|
1216
|
+
outline: none;
|
1217
|
+
transition:
|
1218
|
+
border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
1219
|
+
background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);
|
1220
|
+
will-change: border-radius, background-color;
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
:host(.appkit-modal) wui-card {
|
1224
|
+
max-width: 400px;
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
wui-card[shake='true'] {
|
1228
|
+
animation:
|
1229
|
+
zoom-in 0.2s var(--wui-ease-out-power-2),
|
1230
|
+
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
wui-flex {
|
1234
|
+
overflow-x: hidden;
|
1235
|
+
overflow-y: auto;
|
1236
|
+
display: flex;
|
1237
|
+
align-items: center;
|
1238
|
+
justify-content: center;
|
1239
|
+
width: 100%;
|
1240
|
+
height: 100%;
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
@media (max-height: 700px) and (min-width: 431px) {
|
1244
|
+
wui-flex {
|
1245
|
+
align-items: flex-start;
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
wui-card {
|
1249
|
+
margin: var(--wui-spacing-xxl) 0px;
|
1250
|
+
}
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
@media (max-width: 430px) {
|
1254
|
+
wui-flex {
|
1255
|
+
align-items: flex-end;
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
wui-card {
|
1259
|
+
max-width: 100%;
|
1260
|
+
border-bottom-left-radius: var(--local-border-bottom-mobile-radius);
|
1261
|
+
border-bottom-right-radius: var(--local-border-bottom-mobile-radius);
|
1262
|
+
border-bottom: none;
|
1263
|
+
animation: slide-in 0.2s var(--wui-ease-out-power-2);
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
wui-card[shake='true'] {
|
1267
|
+
animation:
|
1268
|
+
slide-in 0.2s var(--wui-ease-out-power-2),
|
1269
|
+
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
1270
|
+
}
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
@keyframes zoom-in {
|
1274
|
+
0% {
|
1275
|
+
transform: scale(0.95) translateY(0);
|
1276
|
+
}
|
1277
|
+
100% {
|
1278
|
+
transform: scale(1) translateY(0);
|
1279
|
+
}
|
1280
|
+
}
|
1281
|
+
|
1282
|
+
@keyframes slide-in {
|
1283
|
+
0% {
|
1284
|
+
transform: scale(1) translateY(50px);
|
1285
|
+
}
|
1286
|
+
100% {
|
1287
|
+
transform: scale(1) translateY(0);
|
1288
|
+
}
|
1289
|
+
}
|
1290
|
+
|
1291
|
+
@keyframes w3m-shake {
|
1292
|
+
0% {
|
1293
|
+
transform: scale(1) rotate(0deg);
|
1294
|
+
}
|
1295
|
+
20% {
|
1296
|
+
transform: scale(1) rotate(-1deg);
|
1297
|
+
}
|
1298
|
+
40% {
|
1299
|
+
transform: scale(1) rotate(1.5deg);
|
1300
|
+
}
|
1301
|
+
60% {
|
1302
|
+
transform: scale(1) rotate(-1.5deg);
|
1303
|
+
}
|
1304
|
+
80% {
|
1305
|
+
transform: scale(1) rotate(1deg);
|
1306
|
+
}
|
1307
|
+
100% {
|
1308
|
+
transform: scale(1) rotate(0deg);
|
1309
|
+
}
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
@keyframes w3m-view-height {
|
1313
|
+
from {
|
1314
|
+
height: var(--prev-height);
|
1315
|
+
}
|
1316
|
+
to {
|
1317
|
+
height: var(--new-height);
|
1318
|
+
}
|
1319
|
+
}
|
1320
|
+
`;
|
1321
|
+
var C = function(r, e, t, a) {
|
1322
|
+
var s = arguments.length, i = s < 3 ? e : a, n;
|
1323
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(r, e, t, a);
|
1324
|
+
else for (var c = r.length - 1; c >= 0; c--) (n = r[c]) && (i = (s < 3 ? n(i) : s > 3 ? n(e, t, i) : n(e, t)) || i);
|
1325
|
+
return s > 3 && i && Object.defineProperty(e, t, i), i;
|
1326
|
+
};
|
1327
|
+
const ae = "scroll-lock";
|
1328
|
+
class x extends f {
|
1329
|
+
constructor() {
|
1330
|
+
super(), this.unsubscribe = [], this.abortController = void 0, this.hasPrefetched = !1, this.enableEmbedded = I.state.enableEmbedded, this.open = g.state.open, this.caipAddress = m.state.activeCaipAddress, this.caipNetwork = m.state.activeCaipNetwork, this.shake = g.state.shake, this.filterByNamespace = q.state.filterByNamespace, this.initializeTheming(), H.prefetchAnalyticsConfig(), this.unsubscribe.push(g.subscribeKey("open", (e) => e ? this.onOpen() : this.onClose()), g.subscribeKey("shake", (e) => this.shake = e), m.subscribeKey("activeCaipNetwork", (e) => this.onNewNetwork(e)), m.subscribeKey("activeCaipAddress", (e) => this.onNewAddress(e)), I.subscribeKey("enableEmbedded", (e) => this.enableEmbedded = e), q.subscribeKey("filterByNamespace", (e) => {
|
1331
|
+
var t;
|
1332
|
+
this.filterByNamespace !== e && !((t = m.getAccountData(e)) != null && t.caipAddress) && (H.fetchRecommendedWallets(), this.filterByNamespace = e);
|
1333
|
+
}));
|
1334
|
+
}
|
1335
|
+
firstUpdated() {
|
1336
|
+
if (this.caipAddress) {
|
1337
|
+
if (this.enableEmbedded) {
|
1338
|
+
g.close(), this.prefetch();
|
1339
|
+
return;
|
1340
|
+
}
|
1341
|
+
this.onNewAddress(this.caipAddress);
|
1342
|
+
}
|
1343
|
+
this.open && this.onOpen(), this.enableEmbedded && this.prefetch();
|
1344
|
+
}
|
1345
|
+
disconnectedCallback() {
|
1346
|
+
this.unsubscribe.forEach((e) => e()), this.onRemoveKeyboardListener();
|
1347
|
+
}
|
1348
|
+
render() {
|
1349
|
+
return this.style.cssText = `
|
1350
|
+
--local-border-bottom-mobile-radius: ${this.enableEmbedded ? "clamp(0px, var(--wui-border-radius-l), 44px)" : "0px"};
|
1351
|
+
`, this.enableEmbedded ? o`${this.contentTemplate()}
|
1352
|
+
<w3m-tooltip></w3m-tooltip> ` : this.open ? o`
|
1353
|
+
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
1354
|
+
${this.contentTemplate()}
|
1355
|
+
</wui-flex>
|
1356
|
+
<w3m-tooltip></w3m-tooltip>
|
1357
|
+
` : null;
|
1358
|
+
}
|
1359
|
+
contentTemplate() {
|
1360
|
+
return o` <wui-card
|
1361
|
+
shake="${this.shake}"
|
1362
|
+
data-embedded="${F(this.enableEmbedded)}"
|
1363
|
+
role="alertdialog"
|
1364
|
+
aria-modal="true"
|
1365
|
+
tabindex="0"
|
1366
|
+
data-testid="w3m-modal-card"
|
1367
|
+
>
|
1368
|
+
<w3m-header></w3m-header>
|
1369
|
+
<w3m-router></w3m-router>
|
1370
|
+
<w3m-snackbar></w3m-snackbar>
|
1371
|
+
<w3m-alertbar></w3m-alertbar>
|
1372
|
+
</wui-card>`;
|
1373
|
+
}
|
1374
|
+
async onOverlayClick(e) {
|
1375
|
+
e.target === e.currentTarget && await this.handleClose();
|
1376
|
+
}
|
1377
|
+
async handleClose() {
|
1378
|
+
await we.safeClose();
|
1379
|
+
}
|
1380
|
+
initializeTheming() {
|
1381
|
+
const { themeVariables: e, themeMode: t } = xe.state, a = We.getColorTheme(t);
|
1382
|
+
Ce(e, a);
|
1383
|
+
}
|
1384
|
+
onClose() {
|
1385
|
+
this.open = !1, this.classList.remove("open"), this.onScrollUnlock(), T.hide(), this.onRemoveKeyboardListener();
|
1386
|
+
}
|
1387
|
+
onOpen() {
|
1388
|
+
this.open = !0, this.classList.add("open"), this.onScrollLock(), this.onAddKeyboardListener();
|
1389
|
+
}
|
1390
|
+
onScrollLock() {
|
1391
|
+
const e = document.createElement("style");
|
1392
|
+
e.dataset.w3m = ae, e.textContent = `
|
1393
|
+
body {
|
1394
|
+
touch-action: none;
|
1395
|
+
overflow: hidden;
|
1396
|
+
overscroll-behavior: contain;
|
1397
|
+
}
|
1398
|
+
w3m-modal {
|
1399
|
+
pointer-events: auto;
|
1400
|
+
}
|
1401
|
+
`, document.head.appendChild(e);
|
1402
|
+
}
|
1403
|
+
onScrollUnlock() {
|
1404
|
+
const e = document.head.querySelector(`style[data-w3m="${ae}"]`);
|
1405
|
+
e && e.remove();
|
1406
|
+
}
|
1407
|
+
onAddKeyboardListener() {
|
1408
|
+
var t;
|
1409
|
+
this.abortController = new AbortController();
|
1410
|
+
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector("wui-card");
|
1411
|
+
e == null || e.focus(), window.addEventListener("keydown", (a) => {
|
1412
|
+
if (a.key === "Escape")
|
1413
|
+
this.handleClose();
|
1414
|
+
else if (a.key === "Tab") {
|
1415
|
+
const { tagName: s } = a.target;
|
1416
|
+
s && !s.includes("W3M-") && !s.includes("WUI-") && (e == null || e.focus());
|
1417
|
+
}
|
1418
|
+
}, this.abortController);
|
1419
|
+
}
|
1420
|
+
onRemoveKeyboardListener() {
|
1421
|
+
var e;
|
1422
|
+
(e = this.abortController) == null || e.abort(), this.abortController = void 0;
|
1423
|
+
}
|
1424
|
+
async onNewAddress(e) {
|
1425
|
+
const t = m.state.isSwitchingNamespace, a = ke.getPlainAddress(e);
|
1426
|
+
!a && !t ? g.close() : t && a && l.goBack(), await ne.initializeIfEnabled(), this.caipAddress = e, m.setIsSwitchingNamespace(!1);
|
1427
|
+
}
|
1428
|
+
onNewNetwork(e) {
|
1429
|
+
var Z, ee, te;
|
1430
|
+
const t = this.caipNetwork, a = (Z = t == null ? void 0 : t.caipNetworkId) == null ? void 0 : Z.toString(), s = t == null ? void 0 : t.chainNamespace, i = (ee = e == null ? void 0 : e.caipNetworkId) == null ? void 0 : ee.toString(), n = e == null ? void 0 : e.chainNamespace, c = a !== i, k = c && !(s !== n), _ = (t == null ? void 0 : t.name) === Se.UNSUPPORTED_NETWORK_NAME, z = l.state.view === "ConnectingExternal", D = !((te = m.getAccountData(e == null ? void 0 : e.chainNamespace)) != null && te.caipAddress), me = l.state.view === "UnsupportedChain", he = g.state.open;
|
1431
|
+
let j = !1;
|
1432
|
+
he && !z && (D ? c && (j = !0) : (me || k && !_) && (j = !0)), j && l.state.view !== "SIWXSignMessage" && l.goBack(), this.caipNetwork = e;
|
1433
|
+
}
|
1434
|
+
prefetch() {
|
1435
|
+
this.hasPrefetched || (H.prefetch(), H.fetchWalletsByPage({ page: 1 }), this.hasPrefetched = !0);
|
1436
|
+
}
|
1437
|
+
}
|
1438
|
+
x.styles = je;
|
1439
|
+
C([
|
1440
|
+
d({ type: Boolean })
|
1441
|
+
], x.prototype, "enableEmbedded", void 0);
|
1442
|
+
C([
|
1443
|
+
w()
|
1444
|
+
], x.prototype, "open", void 0);
|
1445
|
+
C([
|
1446
|
+
w()
|
1447
|
+
], x.prototype, "caipAddress", void 0);
|
1448
|
+
C([
|
1449
|
+
w()
|
1450
|
+
], x.prototype, "caipNetwork", void 0);
|
1451
|
+
C([
|
1452
|
+
w()
|
1453
|
+
], x.prototype, "shake", void 0);
|
1454
|
+
C([
|
1455
|
+
w()
|
1456
|
+
], x.prototype, "filterByNamespace", void 0);
|
1457
|
+
let se = class extends x {
|
1458
|
+
};
|
1459
|
+
se = C([
|
1460
|
+
u("w3m-modal")
|
1461
|
+
], se);
|
1462
|
+
let re = class extends x {
|
1463
|
+
};
|
1464
|
+
re = C([
|
1465
|
+
u("appkit-modal")
|
1466
|
+
], re);
|
1467
|
+
export {
|
1468
|
+
re as AppKitModal,
|
1469
|
+
se as W3mModal,
|
1470
|
+
x as W3mModalBase
|
1471
|
+
};
|