@lnfi-network/nodeflow-sdk 1.0.0-alpha.1 → 1.0.0-alpha.3
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/build-info.json +1 -1
- package/dist/nodeflow-sdk.es.js +12608 -13
- package/package.json +6 -4
- package/dist/SwapController-BpMRmmBg.js +0 -447
- package/dist/add-DzEC3Ev-.js +0 -19
- package/dist/all-wallets-9_E4QbJe.js +0 -10
- package/dist/app-store-Bh-X568B.js +0 -21
- package/dist/apple-D-gsNYPl.js +0 -22
- package/dist/arrow-bottom-Cc07vF_J.js +0 -12
- package/dist/arrow-bottom-circle-BVGuqXDY.js +0 -15
- package/dist/arrow-left-BlsXOgcw.js +0 -12
- package/dist/arrow-right-iy1FcTuZ.js +0 -12
- package/dist/arrow-top-CNfwfrtQ.js +0 -12
- package/dist/bank-5pqyViSd.js +0 -18
- package/dist/bin-CTZMH3Ih.js +0 -8
- package/dist/bitcoin-dzJD8ofL.js +0 -17
- package/dist/browser-Bt2mUNa_.js +0 -18
- package/dist/card-BsIEe52W.js +0 -18
- package/dist/ccip-B877DHTW.js +0 -239
- package/dist/checkmark-bbvJgWyv.js +0 -15
- package/dist/checkmark-bold-DlLF8se_.js +0 -12
- package/dist/chevron-bottom-U-2kAiJt.js +0 -12
- package/dist/chevron-left-C84B66iG.js +0 -12
- package/dist/chevron-right-ChXuATmC.js +0 -12
- package/dist/chevron-top-d7GMCQei.js +0 -12
- package/dist/chrome-store-D_HjUWdg.js +0 -65
- package/dist/circle-DTseH6Gb.js +0 -8
- package/dist/clock-Bs2n9nAN.js +0 -12
- package/dist/close-Bvc8CgSW.js +0 -12
- package/dist/coinPlaceholder-CYusrhO9.js +0 -12
- package/dist/compass-DpcrZk5k.js +0 -12
- package/dist/copy-BwHzN1jy.js +0 -19
- package/dist/cursor-B5h_XDQf.js +0 -7
- package/dist/cursor-transparent-CXszKloD.js +0 -16
- package/dist/desktop-D1gXlccz.js +0 -13
- package/dist/disconnect-DjoSlupF.js +0 -12
- package/dist/discord-B7wW6Lli.js +0 -21
- package/dist/email-BVCRPA-e.js +0 -10
- package/dist/embedded-wallet-B2adLwLx.js +0 -464
- package/dist/ethereum-B_oY83Bi.js +0 -14
- package/dist/etherscan-D0L4Fyjd.js +0 -10
- package/dist/exclamation-triangle-BCenEx9s.js +0 -8
- package/dist/extension-HlbLaVC_.js +0 -12
- package/dist/external-link-10DCMdGo.js +0 -12
- package/dist/facebook-DnFD3CY1.js +0 -30
- package/dist/farcaster-C69ECwhq.js +0 -16
- package/dist/filters-DM4Bw_dB.js +0 -12
- package/dist/github-BHtxcolR.js +0 -22
- package/dist/google-D8mBK68A.js +0 -22
- package/dist/help-circle-t2cDsLEe.js +0 -16
- package/dist/id-CV5PIYFN.js +0 -16
- package/dist/image-B6iXY017.js +0 -8
- package/dist/index-BjsyhlWF.js +0 -70
- package/dist/index-CB5Y8Qyu.js +0 -1060
- package/dist/index-CJ6NogxX.js +0 -33
- package/dist/index-CQyrL-Nf.js +0 -709
- package/dist/index-Cdy2VAPd.js +0 -63547
- package/dist/info-DSo6bLOH.js +0 -7
- package/dist/info-circle-BGUrVnRL.js +0 -16
- package/dist/lightbulb-DzUH0ECK.js +0 -7
- package/dist/mail-2IXcoFzQ.js +0 -12
- package/dist/mobile-jKpID8sE.js +0 -13
- package/dist/more-BfdPaQg5.js +0 -15
- package/dist/network-placeholder-BRAmrrNc.js +0 -18
- package/dist/nftPlaceholder-BQl4OwhJ.js +0 -12
- package/dist/off-vrksO3bW.js +0 -8
- package/dist/onramp-GJSUl6nX.js +0 -917
- package/dist/play-store-CgO-nxtt.js +0 -36
- package/dist/plus-BvuCUa5G.js +0 -17
- package/dist/qr-code-CW_UmduJ.js +0 -10
- package/dist/receive-CAxob7RN.js +0 -179
- package/dist/recycle-horizontal-gyQahv_l.js +0 -13
- package/dist/refresh-CmhB5uJy.js +0 -12
- package/dist/reown-logo-DdEknUEn.js +0 -16
- package/dist/search-MM5ffeOZ.js +0 -12
- package/dist/send--MYuynOo.js +0 -1039
- package/dist/send-D4Uk3qsv.js +0 -19
- package/dist/socials-A1l-HGb-.js +0 -589
- package/dist/solana-Ih4CCb2H.js +0 -17
- package/dist/swapHorizontal-DPJ4KZ6x.js +0 -12
- package/dist/swapHorizontalBold-CTLbh7NX.js +0 -12
- package/dist/swapHorizontalMedium-BwOK8UCu.js +0 -20
- package/dist/swapHorizontalRoundedBold-CvWEM1FX.js +0 -12
- package/dist/swapVertical-Deg2QWe3.js +0 -12
- package/dist/swaps-wBf7GXDq.js +0 -1713
- package/dist/telegram-CgM_qBjq.js +0 -20
- package/dist/three-dots-pNIDZDwS.js +0 -9
- package/dist/transactions-BfY5SwKO.js +0 -35
- package/dist/twitch-BqyE4tpL.js +0 -22
- package/dist/twitterIcon-D0GmV1fH.js +0 -10
- package/dist/ui-BNDf6B6k.js +0 -812
- package/dist/user-C1rWIm1v.js +0 -7
- package/dist/verify-Lo6JPJ5L.js +0 -12
- package/dist/verify-filled-DSGvcsYL.js +0 -12
- package/dist/w3m-modal-DyT3FrOn.js +0 -1041
- package/dist/wallet-IVCN4Ks-.js +0 -12
- package/dist/wallet-placeholder-CemVDrin.js +0 -18
- package/dist/walletconnect-BYcF6w2s.js +0 -36
- package/dist/warning-circle-o-I-tSQk.js +0 -16
- package/dist/x-Bt6OetKn.js +0 -16
- package/dist/x-mark-bMcD9ngD.js +0 -7
|
@@ -1,1041 +0,0 @@
|
|
|
1
|
-
import { aH as p, a_ as R, R as l, O as re, E as y, F as L, I as b, J as C, K as c, H as u, $ as _, aa as d, G as le, a$ as ce, V as h, a6 as U, aY as de, aE as H, Q as q, aA as T, a9 as z, a3 as M, _ as F, S as A, aM as P, a8 as ue, a7 as pe, b0 as he, aT as we, Y as me, P as fe } from "./index-Cdy2VAPd.js";
|
|
2
|
-
import { S as be } from "./SwapController-BpMRmmBg.js";
|
|
3
|
-
const ee = {
|
|
4
|
-
isUnsupportedChainView() {
|
|
5
|
-
return l.state.view === "UnsupportedChain" || l.state.view === "SwitchNetwork" && l.state.history.includes("UnsupportedChain");
|
|
6
|
-
},
|
|
7
|
-
async safeClose() {
|
|
8
|
-
if (this.isUnsupportedChainView()) {
|
|
9
|
-
p.shake();
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (await R.isSIWXCloseDisabled()) {
|
|
13
|
-
p.shake();
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
(l.state.view === "DataCapture" || l.state.view === "DataCaptureOtpConfirm") && re.disconnect(), p.close();
|
|
17
|
-
}
|
|
18
|
-
}, ge = y`
|
|
19
|
-
:host {
|
|
20
|
-
display: block;
|
|
21
|
-
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
|
|
22
|
-
box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
23
|
-
background-color: var(--wui-color-modal-bg);
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host([data-embedded='true']) {
|
|
28
|
-
box-shadow:
|
|
29
|
-
0 0 0 1px var(--wui-color-gray-glass-005),
|
|
30
|
-
0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
var ve = function(n, e, t, i) {
|
|
34
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
35
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
36
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
37
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
38
|
-
};
|
|
39
|
-
let V = class extends C {
|
|
40
|
-
render() {
|
|
41
|
-
return c`<slot></slot>`;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
V.styles = [L, ge];
|
|
45
|
-
V = ve([
|
|
46
|
-
b("wui-card")
|
|
47
|
-
], V);
|
|
48
|
-
const ye = y`
|
|
49
|
-
:host {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
padding: var(--wui-spacing-s);
|
|
54
|
-
border-radius: var(--wui-border-radius-s);
|
|
55
|
-
border: 1px solid var(--wui-color-dark-glass-100);
|
|
56
|
-
box-sizing: border-box;
|
|
57
|
-
background-color: var(--wui-color-bg-325);
|
|
58
|
-
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
wui-flex {
|
|
62
|
-
width: 100%;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
wui-text {
|
|
66
|
-
word-break: break-word;
|
|
67
|
-
flex: 1;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.close {
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.icon-box {
|
|
75
|
-
height: 40px;
|
|
76
|
-
width: 40px;
|
|
77
|
-
border-radius: var(--wui-border-radius-3xs);
|
|
78
|
-
background-color: var(--local-icon-bg-value);
|
|
79
|
-
}
|
|
80
|
-
`;
|
|
81
|
-
var I = function(n, e, t, i) {
|
|
82
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
83
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
84
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
85
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
86
|
-
};
|
|
87
|
-
let S = class extends C {
|
|
88
|
-
constructor() {
|
|
89
|
-
super(...arguments), this.message = "", this.backgroundColor = "accent-100", this.iconColor = "accent-100", this.icon = "info";
|
|
90
|
-
}
|
|
91
|
-
render() {
|
|
92
|
-
return this.style.cssText = `
|
|
93
|
-
--local-icon-bg-value: var(--wui-color-${this.backgroundColor});
|
|
94
|
-
`, c`
|
|
95
|
-
<wui-flex flexDirection="row" justifyContent="space-between" alignItems="center">
|
|
96
|
-
<wui-flex columnGap="xs" flexDirection="row" alignItems="center">
|
|
97
|
-
<wui-flex
|
|
98
|
-
flexDirection="row"
|
|
99
|
-
alignItems="center"
|
|
100
|
-
justifyContent="center"
|
|
101
|
-
class="icon-box"
|
|
102
|
-
>
|
|
103
|
-
<wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon>
|
|
104
|
-
</wui-flex>
|
|
105
|
-
<wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text"
|
|
106
|
-
>${this.message}</wui-text
|
|
107
|
-
>
|
|
108
|
-
</wui-flex>
|
|
109
|
-
<wui-icon
|
|
110
|
-
class="close"
|
|
111
|
-
color="bg-350"
|
|
112
|
-
size="sm"
|
|
113
|
-
name="close"
|
|
114
|
-
@click=${this.onClose}
|
|
115
|
-
></wui-icon>
|
|
116
|
-
</wui-flex>
|
|
117
|
-
`;
|
|
118
|
-
}
|
|
119
|
-
onClose() {
|
|
120
|
-
_.close();
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
S.styles = [L, ye];
|
|
124
|
-
I([
|
|
125
|
-
u()
|
|
126
|
-
], S.prototype, "message", void 0);
|
|
127
|
-
I([
|
|
128
|
-
u()
|
|
129
|
-
], S.prototype, "backgroundColor", void 0);
|
|
130
|
-
I([
|
|
131
|
-
u()
|
|
132
|
-
], S.prototype, "iconColor", void 0);
|
|
133
|
-
I([
|
|
134
|
-
u()
|
|
135
|
-
], S.prototype, "icon", void 0);
|
|
136
|
-
S = I([
|
|
137
|
-
b("wui-alertbar")
|
|
138
|
-
], S);
|
|
139
|
-
const Ce = y`
|
|
140
|
-
:host {
|
|
141
|
-
display: block;
|
|
142
|
-
position: absolute;
|
|
143
|
-
top: var(--wui-spacing-s);
|
|
144
|
-
left: var(--wui-spacing-l);
|
|
145
|
-
right: var(--wui-spacing-l);
|
|
146
|
-
opacity: 0;
|
|
147
|
-
pointer-events: none;
|
|
148
|
-
}
|
|
149
|
-
`;
|
|
150
|
-
var te = function(n, e, t, i) {
|
|
151
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
152
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
153
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
154
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
155
|
-
};
|
|
156
|
-
const xe = {
|
|
157
|
-
info: {
|
|
158
|
-
backgroundColor: "fg-350",
|
|
159
|
-
iconColor: "fg-325",
|
|
160
|
-
icon: "info"
|
|
161
|
-
},
|
|
162
|
-
success: {
|
|
163
|
-
backgroundColor: "success-glass-reown-020",
|
|
164
|
-
iconColor: "success-125",
|
|
165
|
-
icon: "checkmark"
|
|
166
|
-
},
|
|
167
|
-
warning: {
|
|
168
|
-
backgroundColor: "warning-glass-reown-020",
|
|
169
|
-
iconColor: "warning-100",
|
|
170
|
-
icon: "warningCircle"
|
|
171
|
-
},
|
|
172
|
-
error: {
|
|
173
|
-
backgroundColor: "error-glass-reown-020",
|
|
174
|
-
iconColor: "error-125",
|
|
175
|
-
icon: "exclamationTriangle"
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
let B = class extends C {
|
|
179
|
-
constructor() {
|
|
180
|
-
super(), this.unsubscribe = [], this.open = _.state.open, this.onOpen(!0), this.unsubscribe.push(_.subscribeKey("open", (e) => {
|
|
181
|
-
this.open = e, this.onOpen(!1);
|
|
182
|
-
}));
|
|
183
|
-
}
|
|
184
|
-
disconnectedCallback() {
|
|
185
|
-
this.unsubscribe.forEach((e) => e());
|
|
186
|
-
}
|
|
187
|
-
render() {
|
|
188
|
-
const { message: e, variant: t } = _.state, i = xe[t];
|
|
189
|
-
return c`
|
|
190
|
-
<wui-alertbar
|
|
191
|
-
message=${e}
|
|
192
|
-
backgroundColor=${i == null ? void 0 : i.backgroundColor}
|
|
193
|
-
iconColor=${i == null ? void 0 : i.iconColor}
|
|
194
|
-
icon=${i == null ? void 0 : i.icon}
|
|
195
|
-
></wui-alertbar>
|
|
196
|
-
`;
|
|
197
|
-
}
|
|
198
|
-
onOpen(e) {
|
|
199
|
-
this.open ? (this.animate([
|
|
200
|
-
{ opacity: 0, transform: "scale(0.85)" },
|
|
201
|
-
{ opacity: 1, transform: "scale(1)" }
|
|
202
|
-
], {
|
|
203
|
-
duration: 150,
|
|
204
|
-
fill: "forwards",
|
|
205
|
-
easing: "ease"
|
|
206
|
-
}), this.style.cssText = "pointer-events: auto") : e || (this.animate([
|
|
207
|
-
{ opacity: 1, transform: "scale(1)" },
|
|
208
|
-
{ opacity: 0, transform: "scale(0.85)" }
|
|
209
|
-
], {
|
|
210
|
-
duration: 150,
|
|
211
|
-
fill: "forwards",
|
|
212
|
-
easing: "ease"
|
|
213
|
-
}), this.style.cssText = "pointer-events: none");
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
B.styles = Ce;
|
|
217
|
-
te([
|
|
218
|
-
d()
|
|
219
|
-
], B.prototype, "open", void 0);
|
|
220
|
-
B = te([
|
|
221
|
-
b("w3m-alertbar")
|
|
222
|
-
], B);
|
|
223
|
-
const ke = y`
|
|
224
|
-
button {
|
|
225
|
-
display: block;
|
|
226
|
-
display: flex;
|
|
227
|
-
align-items: center;
|
|
228
|
-
padding: var(--wui-spacing-xxs);
|
|
229
|
-
gap: var(--wui-spacing-xxs);
|
|
230
|
-
transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
231
|
-
border-radius: var(--wui-border-radius-xxs);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
wui-image {
|
|
235
|
-
border-radius: 100%;
|
|
236
|
-
width: var(--wui-spacing-xl);
|
|
237
|
-
height: var(--wui-spacing-xl);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
wui-icon-box {
|
|
241
|
-
width: var(--wui-spacing-xl);
|
|
242
|
-
height: var(--wui-spacing-xl);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
button:hover {
|
|
246
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
button:active {
|
|
250
|
-
background-color: var(--wui-color-gray-glass-005);
|
|
251
|
-
}
|
|
252
|
-
`;
|
|
253
|
-
var oe = function(n, e, t, i) {
|
|
254
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
255
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
256
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
257
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
258
|
-
};
|
|
259
|
-
let D = class extends C {
|
|
260
|
-
constructor() {
|
|
261
|
-
super(...arguments), this.imageSrc = "";
|
|
262
|
-
}
|
|
263
|
-
render() {
|
|
264
|
-
return c`<button>
|
|
265
|
-
${this.imageTemplate()}
|
|
266
|
-
<wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
|
|
267
|
-
</button>`;
|
|
268
|
-
}
|
|
269
|
-
imageTemplate() {
|
|
270
|
-
return this.imageSrc ? c`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>` : c`<wui-icon-box
|
|
271
|
-
size="xxs"
|
|
272
|
-
iconColor="fg-200"
|
|
273
|
-
backgroundColor="fg-100"
|
|
274
|
-
background="opaque"
|
|
275
|
-
icon="networkPlaceholder"
|
|
276
|
-
></wui-icon-box>`;
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
D.styles = [L, le, ce, ke];
|
|
280
|
-
oe([
|
|
281
|
-
u()
|
|
282
|
-
], D.prototype, "imageSrc", void 0);
|
|
283
|
-
D = oe([
|
|
284
|
-
b("wui-select")
|
|
285
|
-
], D);
|
|
286
|
-
const Se = y`
|
|
287
|
-
:host {
|
|
288
|
-
height: 64px;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
wui-text {
|
|
292
|
-
text-transform: capitalize;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
wui-flex.w3m-header-title {
|
|
296
|
-
transform: translateY(0);
|
|
297
|
-
opacity: 1;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
wui-flex.w3m-header-title[view-direction='prev'] {
|
|
301
|
-
animation:
|
|
302
|
-
slide-down-out 120ms forwards var(--wui-ease-out-power-2),
|
|
303
|
-
slide-down-in 120ms forwards var(--wui-ease-out-power-2);
|
|
304
|
-
animation-delay: 0ms, 200ms;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
wui-flex.w3m-header-title[view-direction='next'] {
|
|
308
|
-
animation:
|
|
309
|
-
slide-up-out 120ms forwards var(--wui-ease-out-power-2),
|
|
310
|
-
slide-up-in 120ms forwards var(--wui-ease-out-power-2);
|
|
311
|
-
animation-delay: 0ms, 200ms;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
wui-icon-link[data-hidden='true'] {
|
|
315
|
-
opacity: 0 !important;
|
|
316
|
-
pointer-events: none;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
@keyframes slide-up-out {
|
|
320
|
-
from {
|
|
321
|
-
transform: translateY(0px);
|
|
322
|
-
opacity: 1;
|
|
323
|
-
}
|
|
324
|
-
to {
|
|
325
|
-
transform: translateY(3px);
|
|
326
|
-
opacity: 0;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
@keyframes slide-up-in {
|
|
331
|
-
from {
|
|
332
|
-
transform: translateY(-3px);
|
|
333
|
-
opacity: 0;
|
|
334
|
-
}
|
|
335
|
-
to {
|
|
336
|
-
transform: translateY(0);
|
|
337
|
-
opacity: 1;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
@keyframes slide-down-out {
|
|
342
|
-
from {
|
|
343
|
-
transform: translateY(0px);
|
|
344
|
-
opacity: 1;
|
|
345
|
-
}
|
|
346
|
-
to {
|
|
347
|
-
transform: translateY(-3px);
|
|
348
|
-
opacity: 0;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
@keyframes slide-down-in {
|
|
353
|
-
from {
|
|
354
|
-
transform: translateY(3px);
|
|
355
|
-
opacity: 0;
|
|
356
|
-
}
|
|
357
|
-
to {
|
|
358
|
-
transform: translateY(0);
|
|
359
|
-
opacity: 1;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
`;
|
|
363
|
-
var g = function(n, e, t, i) {
|
|
364
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
365
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
366
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
367
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
368
|
-
};
|
|
369
|
-
const We = ["SmartSessionList"];
|
|
370
|
-
function K() {
|
|
371
|
-
var s, r, k, m, $, E, O;
|
|
372
|
-
const n = (r = (s = l.state.data) == null ? void 0 : s.connector) == null ? void 0 : r.name, e = (m = (k = l.state.data) == null ? void 0 : k.wallet) == null ? void 0 : m.name, t = (E = ($ = l.state.data) == null ? void 0 : $.network) == null ? void 0 : E.name, i = e ?? n, a = M.getConnectors();
|
|
373
|
-
return {
|
|
374
|
-
Connect: `Connect ${a.length === 1 && ((O = a[0]) == null ? void 0 : O.id) === "w3m-email" ? "Email" : ""} Wallet`,
|
|
375
|
-
Create: "Create Wallet",
|
|
376
|
-
ChooseAccountName: void 0,
|
|
377
|
-
Account: void 0,
|
|
378
|
-
AccountSettings: void 0,
|
|
379
|
-
AllWallets: "All Wallets",
|
|
380
|
-
ApproveTransaction: "Approve Transaction",
|
|
381
|
-
BuyInProgress: "Buy",
|
|
382
|
-
ConnectingExternal: i ?? "Connect Wallet",
|
|
383
|
-
ConnectingWalletConnect: i ?? "WalletConnect",
|
|
384
|
-
ConnectingWalletConnectBasic: "WalletConnect",
|
|
385
|
-
ConnectingSiwe: "Sign In",
|
|
386
|
-
Convert: "Convert",
|
|
387
|
-
ConvertSelectToken: "Select token",
|
|
388
|
-
ConvertPreview: "Preview convert",
|
|
389
|
-
Downloads: i ? `Get ${i}` : "Downloads",
|
|
390
|
-
EmailLogin: "Email Login",
|
|
391
|
-
EmailVerifyOtp: "Confirm Email",
|
|
392
|
-
EmailVerifyDevice: "Register Device",
|
|
393
|
-
GetWallet: "Get a wallet",
|
|
394
|
-
Networks: "Choose Network",
|
|
395
|
-
OnRampProviders: "Choose Provider",
|
|
396
|
-
OnRampActivity: "Activity",
|
|
397
|
-
OnRampTokenSelect: "Select Token",
|
|
398
|
-
OnRampFiatSelect: "Select Currency",
|
|
399
|
-
Pay: "How you pay",
|
|
400
|
-
ProfileWallets: "Wallets",
|
|
401
|
-
SwitchNetwork: t ?? "Switch Network",
|
|
402
|
-
Transactions: "Activity",
|
|
403
|
-
UnsupportedChain: "Switch Network",
|
|
404
|
-
UpgradeEmailWallet: "Upgrade your Wallet",
|
|
405
|
-
UpdateEmailWallet: "Edit Email",
|
|
406
|
-
UpdateEmailPrimaryOtp: "Confirm Current Email",
|
|
407
|
-
UpdateEmailSecondaryOtp: "Confirm New Email",
|
|
408
|
-
WhatIsABuy: "What is Buy?",
|
|
409
|
-
RegisterAccountName: "Choose name",
|
|
410
|
-
RegisterAccountNameSuccess: "",
|
|
411
|
-
WalletReceive: "Receive",
|
|
412
|
-
WalletCompatibleNetworks: "Compatible Networks",
|
|
413
|
-
Swap: "Swap",
|
|
414
|
-
SwapSelectToken: "Select token",
|
|
415
|
-
SwapPreview: "Preview swap",
|
|
416
|
-
WalletSend: "Send",
|
|
417
|
-
WalletSendPreview: "Review send",
|
|
418
|
-
WalletSendSelectToken: "Select Token",
|
|
419
|
-
WhatIsANetwork: "What is a network?",
|
|
420
|
-
WhatIsAWallet: "What is a wallet?",
|
|
421
|
-
ConnectWallets: "Connect wallet",
|
|
422
|
-
ConnectSocials: "All socials",
|
|
423
|
-
ConnectingSocial: F.state.socialProvider ? F.state.socialProvider : "Connect Social",
|
|
424
|
-
ConnectingMultiChain: "Select chain",
|
|
425
|
-
ConnectingFarcaster: "Farcaster",
|
|
426
|
-
SwitchActiveChain: "Switch chain",
|
|
427
|
-
SmartSessionCreated: void 0,
|
|
428
|
-
SmartSessionList: "Smart Sessions",
|
|
429
|
-
SIWXSignMessage: "Sign In",
|
|
430
|
-
PayLoading: "Payment in progress",
|
|
431
|
-
DataCapture: "Profile",
|
|
432
|
-
DataCaptureOtpConfirm: "Confirm Email"
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
let w = class extends C {
|
|
436
|
-
constructor() {
|
|
437
|
-
super(), this.unsubscribe = [], this.heading = K()[l.state.view], this.network = h.state.activeCaipNetwork, this.networkImage = U.getNetworkImage(this.network), this.showBack = !1, this.prevHistoryLength = 1, this.view = l.state.view, this.viewDirection = "", this.headerText = K()[l.state.view], this.unsubscribe.push(de.subscribeNetworkImages(() => {
|
|
438
|
-
this.networkImage = U.getNetworkImage(this.network);
|
|
439
|
-
}), l.subscribeKey("view", (e) => {
|
|
440
|
-
setTimeout(() => {
|
|
441
|
-
this.view = e, this.headerText = K()[e];
|
|
442
|
-
}, H.ANIMATION_DURATIONS.HeaderText), this.onViewChange(), this.onHistoryChange();
|
|
443
|
-
}), h.subscribeKey("activeCaipNetwork", (e) => {
|
|
444
|
-
this.network = e, this.networkImage = U.getNetworkImage(this.network);
|
|
445
|
-
}));
|
|
446
|
-
}
|
|
447
|
-
disconnectCallback() {
|
|
448
|
-
this.unsubscribe.forEach((e) => e());
|
|
449
|
-
}
|
|
450
|
-
render() {
|
|
451
|
-
return c`
|
|
452
|
-
<wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
|
|
453
|
-
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
454
|
-
</wui-flex>
|
|
455
|
-
`;
|
|
456
|
-
}
|
|
457
|
-
onWalletHelp() {
|
|
458
|
-
q.sendEvent({ type: "track", event: "CLICK_WALLET_HELP" }), l.push("WhatIsAWallet");
|
|
459
|
-
}
|
|
460
|
-
async onClose() {
|
|
461
|
-
await ee.safeClose();
|
|
462
|
-
}
|
|
463
|
-
rightHeaderTemplate() {
|
|
464
|
-
var t, i, a;
|
|
465
|
-
const e = (a = (i = (t = T) == null ? void 0 : t.state) == null ? void 0 : i.features) == null ? void 0 : a.smartSessions;
|
|
466
|
-
return l.state.view !== "Account" || !e ? this.closeButtonTemplate() : c`<wui-flex>
|
|
467
|
-
<wui-icon-link
|
|
468
|
-
icon="clock"
|
|
469
|
-
@click=${() => l.push("SmartSessionList")}
|
|
470
|
-
data-testid="w3m-header-smart-sessions"
|
|
471
|
-
></wui-icon-link>
|
|
472
|
-
${this.closeButtonTemplate()}
|
|
473
|
-
</wui-flex> `;
|
|
474
|
-
}
|
|
475
|
-
closeButtonTemplate() {
|
|
476
|
-
return c`
|
|
477
|
-
<wui-icon-link
|
|
478
|
-
icon="close"
|
|
479
|
-
@click=${this.onClose.bind(this)}
|
|
480
|
-
data-testid="w3m-header-close"
|
|
481
|
-
></wui-icon-link>
|
|
482
|
-
`;
|
|
483
|
-
}
|
|
484
|
-
titleTemplate() {
|
|
485
|
-
const e = We.includes(this.view);
|
|
486
|
-
return c`
|
|
487
|
-
<wui-flex
|
|
488
|
-
view-direction="${this.viewDirection}"
|
|
489
|
-
class="w3m-header-title"
|
|
490
|
-
alignItems="center"
|
|
491
|
-
gap="xs"
|
|
492
|
-
>
|
|
493
|
-
<wui-text variant="paragraph-700" color="fg-100" data-testid="w3m-header-text"
|
|
494
|
-
>${this.headerText}</wui-text
|
|
495
|
-
>
|
|
496
|
-
${e ? c`<wui-tag variant="main">Beta</wui-tag>` : null}
|
|
497
|
-
</wui-flex>
|
|
498
|
-
`;
|
|
499
|
-
}
|
|
500
|
-
leftHeaderTemplate() {
|
|
501
|
-
var m;
|
|
502
|
-
const { view: e } = l.state, t = e === "Connect", i = T.state.enableEmbedded, a = e === "ApproveTransaction", o = e === "ConnectingSiwe", s = e === "Account", r = T.state.enableNetworkSwitch, k = a || o || t && i;
|
|
503
|
-
return s && r ? c`<wui-select
|
|
504
|
-
id="dynamic"
|
|
505
|
-
data-testid="w3m-account-select-network"
|
|
506
|
-
active-network=${z((m = this.network) == null ? void 0 : m.name)}
|
|
507
|
-
@click=${this.onNetworks.bind(this)}
|
|
508
|
-
imageSrc=${z(this.networkImage)}
|
|
509
|
-
></wui-select>` : this.showBack && !k ? c`<wui-icon-link
|
|
510
|
-
data-testid="header-back"
|
|
511
|
-
id="dynamic"
|
|
512
|
-
icon="chevronLeft"
|
|
513
|
-
@click=${this.onGoBack.bind(this)}
|
|
514
|
-
></wui-icon-link>` : c`<wui-icon-link
|
|
515
|
-
data-hidden=${!t}
|
|
516
|
-
id="dynamic"
|
|
517
|
-
icon="helpCircle"
|
|
518
|
-
@click=${this.onWalletHelp.bind(this)}
|
|
519
|
-
></wui-icon-link>`;
|
|
520
|
-
}
|
|
521
|
-
onNetworks() {
|
|
522
|
-
this.isAllowedNetworkSwitch() && (q.sendEvent({ type: "track", event: "CLICK_NETWORKS" }), l.push("Networks"));
|
|
523
|
-
}
|
|
524
|
-
isAllowedNetworkSwitch() {
|
|
525
|
-
const e = h.getAllRequestedCaipNetworks(), t = e ? e.length > 1 : !1, i = e == null ? void 0 : e.find(({ id: a }) => {
|
|
526
|
-
var o;
|
|
527
|
-
return a === ((o = this.network) == null ? void 0 : o.id);
|
|
528
|
-
});
|
|
529
|
-
return t || !i;
|
|
530
|
-
}
|
|
531
|
-
getPadding() {
|
|
532
|
-
return this.heading ? ["l", "2l", "l", "2l"] : ["0", "2l", "0", "2l"];
|
|
533
|
-
}
|
|
534
|
-
onViewChange() {
|
|
535
|
-
const { history: e } = l.state;
|
|
536
|
-
let t = H.VIEW_DIRECTION.Next;
|
|
537
|
-
e.length < this.prevHistoryLength && (t = H.VIEW_DIRECTION.Prev), this.prevHistoryLength = e.length, this.viewDirection = t;
|
|
538
|
-
}
|
|
539
|
-
async onHistoryChange() {
|
|
540
|
-
var i;
|
|
541
|
-
const { history: e } = l.state, t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("#dynamic");
|
|
542
|
-
e.length > 1 && !this.showBack && t ? (await t.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
543
|
-
duration: 200,
|
|
544
|
-
fill: "forwards",
|
|
545
|
-
easing: "ease"
|
|
546
|
-
}).finished, this.showBack = !0, t.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
547
|
-
duration: 200,
|
|
548
|
-
fill: "forwards",
|
|
549
|
-
easing: "ease"
|
|
550
|
-
})) : e.length <= 1 && this.showBack && t && (await t.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
551
|
-
duration: 200,
|
|
552
|
-
fill: "forwards",
|
|
553
|
-
easing: "ease"
|
|
554
|
-
}).finished, this.showBack = !1, t.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
555
|
-
duration: 200,
|
|
556
|
-
fill: "forwards",
|
|
557
|
-
easing: "ease"
|
|
558
|
-
}));
|
|
559
|
-
}
|
|
560
|
-
onGoBack() {
|
|
561
|
-
l.goBack();
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
w.styles = Se;
|
|
565
|
-
g([
|
|
566
|
-
d()
|
|
567
|
-
], w.prototype, "heading", void 0);
|
|
568
|
-
g([
|
|
569
|
-
d()
|
|
570
|
-
], w.prototype, "network", void 0);
|
|
571
|
-
g([
|
|
572
|
-
d()
|
|
573
|
-
], w.prototype, "networkImage", void 0);
|
|
574
|
-
g([
|
|
575
|
-
d()
|
|
576
|
-
], w.prototype, "showBack", void 0);
|
|
577
|
-
g([
|
|
578
|
-
d()
|
|
579
|
-
], w.prototype, "prevHistoryLength", void 0);
|
|
580
|
-
g([
|
|
581
|
-
d()
|
|
582
|
-
], w.prototype, "view", void 0);
|
|
583
|
-
g([
|
|
584
|
-
d()
|
|
585
|
-
], w.prototype, "viewDirection", void 0);
|
|
586
|
-
g([
|
|
587
|
-
d()
|
|
588
|
-
], w.prototype, "headerText", void 0);
|
|
589
|
-
w = g([
|
|
590
|
-
b("w3m-header")
|
|
591
|
-
], w);
|
|
592
|
-
const $e = y`
|
|
593
|
-
:host {
|
|
594
|
-
display: flex;
|
|
595
|
-
column-gap: var(--wui-spacing-s);
|
|
596
|
-
align-items: center;
|
|
597
|
-
padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
|
|
598
|
-
border-radius: var(--wui-border-radius-s);
|
|
599
|
-
border: 1px solid var(--wui-color-gray-glass-005);
|
|
600
|
-
box-sizing: border-box;
|
|
601
|
-
background-color: var(--wui-color-bg-175);
|
|
602
|
-
box-shadow:
|
|
603
|
-
0px 14px 64px -4px rgba(0, 0, 0, 0.15),
|
|
604
|
-
0px 8px 22px -6px rgba(0, 0, 0, 0.15);
|
|
605
|
-
|
|
606
|
-
max-width: 300px;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
:host wui-loading-spinner {
|
|
610
|
-
margin-left: var(--wui-spacing-3xs);
|
|
611
|
-
}
|
|
612
|
-
`;
|
|
613
|
-
var W = function(n, e, t, i) {
|
|
614
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
615
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
616
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
617
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
618
|
-
};
|
|
619
|
-
let f = class extends C {
|
|
620
|
-
constructor() {
|
|
621
|
-
super(...arguments), this.backgroundColor = "accent-100", this.iconColor = "accent-100", this.icon = "checkmark", this.message = "", this.loading = !1, this.iconType = "default";
|
|
622
|
-
}
|
|
623
|
-
render() {
|
|
624
|
-
return c`
|
|
625
|
-
${this.templateIcon()}
|
|
626
|
-
<wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message"
|
|
627
|
-
>${this.message}</wui-text
|
|
628
|
-
>
|
|
629
|
-
`;
|
|
630
|
-
}
|
|
631
|
-
templateIcon() {
|
|
632
|
-
return this.loading ? c`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>` : this.iconType === "default" ? c`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>` : c`<wui-icon-box
|
|
633
|
-
size="sm"
|
|
634
|
-
iconSize="xs"
|
|
635
|
-
iconColor=${this.iconColor}
|
|
636
|
-
backgroundColor=${this.backgroundColor}
|
|
637
|
-
icon=${this.icon}
|
|
638
|
-
background="opaque"
|
|
639
|
-
></wui-icon-box>`;
|
|
640
|
-
}
|
|
641
|
-
};
|
|
642
|
-
f.styles = [L, $e];
|
|
643
|
-
W([
|
|
644
|
-
u()
|
|
645
|
-
], f.prototype, "backgroundColor", void 0);
|
|
646
|
-
W([
|
|
647
|
-
u()
|
|
648
|
-
], f.prototype, "iconColor", void 0);
|
|
649
|
-
W([
|
|
650
|
-
u()
|
|
651
|
-
], f.prototype, "icon", void 0);
|
|
652
|
-
W([
|
|
653
|
-
u()
|
|
654
|
-
], f.prototype, "message", void 0);
|
|
655
|
-
W([
|
|
656
|
-
u()
|
|
657
|
-
], f.prototype, "loading", void 0);
|
|
658
|
-
W([
|
|
659
|
-
u()
|
|
660
|
-
], f.prototype, "iconType", void 0);
|
|
661
|
-
f = W([
|
|
662
|
-
b("wui-snackbar")
|
|
663
|
-
], f);
|
|
664
|
-
const Ee = y`
|
|
665
|
-
:host {
|
|
666
|
-
display: block;
|
|
667
|
-
position: absolute;
|
|
668
|
-
opacity: 0;
|
|
669
|
-
pointer-events: none;
|
|
670
|
-
top: 11px;
|
|
671
|
-
left: 50%;
|
|
672
|
-
width: max-content;
|
|
673
|
-
}
|
|
674
|
-
`;
|
|
675
|
-
var ie = function(n, e, t, i) {
|
|
676
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
677
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
678
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
679
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
680
|
-
};
|
|
681
|
-
const Ae = {
|
|
682
|
-
loading: void 0,
|
|
683
|
-
success: {
|
|
684
|
-
backgroundColor: "success-100",
|
|
685
|
-
iconColor: "success-100",
|
|
686
|
-
icon: "checkmark"
|
|
687
|
-
},
|
|
688
|
-
error: {
|
|
689
|
-
backgroundColor: "error-100",
|
|
690
|
-
iconColor: "error-100",
|
|
691
|
-
icon: "close"
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
let j = class extends C {
|
|
695
|
-
constructor() {
|
|
696
|
-
super(), this.unsubscribe = [], this.timeout = void 0, this.open = A.state.open, this.unsubscribe.push(A.subscribeKey("open", (e) => {
|
|
697
|
-
this.open = e, this.onOpen();
|
|
698
|
-
}));
|
|
699
|
-
}
|
|
700
|
-
disconnectedCallback() {
|
|
701
|
-
clearTimeout(this.timeout), this.unsubscribe.forEach((e) => e());
|
|
702
|
-
}
|
|
703
|
-
render() {
|
|
704
|
-
const { message: e, variant: t, svg: i } = A.state, a = Ae[t], { icon: o, iconColor: s } = i ?? a ?? {};
|
|
705
|
-
return c`
|
|
706
|
-
<wui-snackbar
|
|
707
|
-
message=${e}
|
|
708
|
-
backgroundColor=${a == null ? void 0 : a.backgroundColor}
|
|
709
|
-
iconColor=${s}
|
|
710
|
-
icon=${o}
|
|
711
|
-
.loading=${t === "loading"}
|
|
712
|
-
></wui-snackbar>
|
|
713
|
-
`;
|
|
714
|
-
}
|
|
715
|
-
onOpen() {
|
|
716
|
-
clearTimeout(this.timeout), this.open ? (this.animate([
|
|
717
|
-
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" },
|
|
718
|
-
{ opacity: 1, transform: "translateX(-50%) scale(1)" }
|
|
719
|
-
], {
|
|
720
|
-
duration: 150,
|
|
721
|
-
fill: "forwards",
|
|
722
|
-
easing: "ease"
|
|
723
|
-
}), this.timeout && clearTimeout(this.timeout), A.state.autoClose && (this.timeout = setTimeout(() => A.hide(), 2500))) : this.animate([
|
|
724
|
-
{ opacity: 1, transform: "translateX(-50%) scale(1)" },
|
|
725
|
-
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" }
|
|
726
|
-
], {
|
|
727
|
-
duration: 150,
|
|
728
|
-
fill: "forwards",
|
|
729
|
-
easing: "ease"
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
j.styles = Ee;
|
|
734
|
-
ie([
|
|
735
|
-
d()
|
|
736
|
-
], j.prototype, "open", void 0);
|
|
737
|
-
j = ie([
|
|
738
|
-
b("w3m-snackbar")
|
|
739
|
-
], j);
|
|
740
|
-
const Ne = y`
|
|
741
|
-
:host {
|
|
742
|
-
z-index: var(--w3m-z-index);
|
|
743
|
-
display: block;
|
|
744
|
-
backface-visibility: hidden;
|
|
745
|
-
will-change: opacity;
|
|
746
|
-
position: fixed;
|
|
747
|
-
top: 0;
|
|
748
|
-
left: 0;
|
|
749
|
-
right: 0;
|
|
750
|
-
bottom: 0;
|
|
751
|
-
pointer-events: none;
|
|
752
|
-
opacity: 0;
|
|
753
|
-
background-color: var(--wui-cover);
|
|
754
|
-
transition: opacity 0.2s var(--wui-ease-out-power-2);
|
|
755
|
-
will-change: opacity;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
:host(.open) {
|
|
759
|
-
opacity: 1;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
:host(.appkit-modal) {
|
|
763
|
-
position: relative;
|
|
764
|
-
pointer-events: unset;
|
|
765
|
-
background: none;
|
|
766
|
-
width: 100%;
|
|
767
|
-
opacity: 1;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
wui-card {
|
|
771
|
-
max-width: var(--w3m-modal-width);
|
|
772
|
-
width: 100%;
|
|
773
|
-
position: relative;
|
|
774
|
-
animation: zoom-in 0.2s var(--wui-ease-out-power-2);
|
|
775
|
-
animation-fill-mode: backwards;
|
|
776
|
-
outline: none;
|
|
777
|
-
transition:
|
|
778
|
-
border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
|
779
|
-
background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);
|
|
780
|
-
will-change: border-radius, background-color;
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
:host(.appkit-modal) wui-card {
|
|
784
|
-
max-width: 400px;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
wui-card[shake='true'] {
|
|
788
|
-
animation:
|
|
789
|
-
zoom-in 0.2s var(--wui-ease-out-power-2),
|
|
790
|
-
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
wui-flex {
|
|
794
|
-
overflow-x: hidden;
|
|
795
|
-
overflow-y: auto;
|
|
796
|
-
display: flex;
|
|
797
|
-
align-items: center;
|
|
798
|
-
justify-content: center;
|
|
799
|
-
width: 100%;
|
|
800
|
-
height: 100%;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
@media (max-height: 700px) and (min-width: 431px) {
|
|
804
|
-
wui-flex {
|
|
805
|
-
align-items: flex-start;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
wui-card {
|
|
809
|
-
margin: var(--wui-spacing-xxl) 0px;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
@media (max-width: 430px) {
|
|
814
|
-
wui-flex {
|
|
815
|
-
align-items: flex-end;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
wui-card {
|
|
819
|
-
max-width: 100%;
|
|
820
|
-
border-bottom-left-radius: var(--local-border-bottom-mobile-radius);
|
|
821
|
-
border-bottom-right-radius: var(--local-border-bottom-mobile-radius);
|
|
822
|
-
border-bottom: none;
|
|
823
|
-
animation: slide-in 0.2s var(--wui-ease-out-power-2);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
wui-card[shake='true'] {
|
|
827
|
-
animation:
|
|
828
|
-
slide-in 0.2s var(--wui-ease-out-power-2),
|
|
829
|
-
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
@keyframes zoom-in {
|
|
834
|
-
0% {
|
|
835
|
-
transform: scale(0.95) translateY(0);
|
|
836
|
-
}
|
|
837
|
-
100% {
|
|
838
|
-
transform: scale(1) translateY(0);
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
@keyframes slide-in {
|
|
843
|
-
0% {
|
|
844
|
-
transform: scale(1) translateY(50px);
|
|
845
|
-
}
|
|
846
|
-
100% {
|
|
847
|
-
transform: scale(1) translateY(0);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
@keyframes w3m-shake {
|
|
852
|
-
0% {
|
|
853
|
-
transform: scale(1) rotate(0deg);
|
|
854
|
-
}
|
|
855
|
-
20% {
|
|
856
|
-
transform: scale(1) rotate(-1deg);
|
|
857
|
-
}
|
|
858
|
-
40% {
|
|
859
|
-
transform: scale(1) rotate(1.5deg);
|
|
860
|
-
}
|
|
861
|
-
60% {
|
|
862
|
-
transform: scale(1) rotate(-1.5deg);
|
|
863
|
-
}
|
|
864
|
-
80% {
|
|
865
|
-
transform: scale(1) rotate(1deg);
|
|
866
|
-
}
|
|
867
|
-
100% {
|
|
868
|
-
transform: scale(1) rotate(0deg);
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
@keyframes w3m-view-height {
|
|
873
|
-
from {
|
|
874
|
-
height: var(--prev-height);
|
|
875
|
-
}
|
|
876
|
-
to {
|
|
877
|
-
height: var(--new-height);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
`;
|
|
881
|
-
var x = function(n, e, t, i) {
|
|
882
|
-
var a = arguments.length, o = a < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, s;
|
|
883
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(n, e, t, i);
|
|
884
|
-
else for (var r = n.length - 1; r >= 0; r--) (s = n[r]) && (o = (a < 3 ? s(o) : a > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
885
|
-
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
886
|
-
};
|
|
887
|
-
const J = "scroll-lock";
|
|
888
|
-
class v extends C {
|
|
889
|
-
constructor() {
|
|
890
|
-
super(), this.unsubscribe = [], this.abortController = void 0, this.hasPrefetched = !1, this.enableEmbedded = T.state.enableEmbedded, this.open = p.state.open, this.caipAddress = h.state.activeCaipAddress, this.caipNetwork = h.state.activeCaipNetwork, this.shake = p.state.shake, this.filterByNamespace = M.state.filterByNamespace, this.initializeTheming(), P.prefetchAnalyticsConfig(), this.unsubscribe.push(p.subscribeKey("open", (e) => e ? this.onOpen() : this.onClose()), p.subscribeKey("shake", (e) => this.shake = e), h.subscribeKey("activeCaipNetwork", (e) => this.onNewNetwork(e)), h.subscribeKey("activeCaipAddress", (e) => this.onNewAddress(e)), T.subscribeKey("enableEmbedded", (e) => this.enableEmbedded = e), M.subscribeKey("filterByNamespace", (e) => {
|
|
891
|
-
var t;
|
|
892
|
-
this.filterByNamespace !== e && !((t = h.getAccountData(e)) != null && t.caipAddress) && (P.fetchRecommendedWallets(), this.filterByNamespace = e);
|
|
893
|
-
}));
|
|
894
|
-
}
|
|
895
|
-
firstUpdated() {
|
|
896
|
-
if (this.caipAddress) {
|
|
897
|
-
if (this.enableEmbedded) {
|
|
898
|
-
p.close(), this.prefetch();
|
|
899
|
-
return;
|
|
900
|
-
}
|
|
901
|
-
this.onNewAddress(this.caipAddress);
|
|
902
|
-
}
|
|
903
|
-
this.open && this.onOpen(), this.enableEmbedded && this.prefetch();
|
|
904
|
-
}
|
|
905
|
-
disconnectedCallback() {
|
|
906
|
-
this.unsubscribe.forEach((e) => e()), this.onRemoveKeyboardListener();
|
|
907
|
-
}
|
|
908
|
-
render() {
|
|
909
|
-
return this.style.cssText = `
|
|
910
|
-
--local-border-bottom-mobile-radius: ${this.enableEmbedded ? "clamp(0px, var(--wui-border-radius-l), 44px)" : "0px"};
|
|
911
|
-
`, this.enableEmbedded ? c`${this.contentTemplate()}
|
|
912
|
-
<w3m-tooltip></w3m-tooltip> ` : this.open ? c`
|
|
913
|
-
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
|
914
|
-
${this.contentTemplate()}
|
|
915
|
-
</wui-flex>
|
|
916
|
-
<w3m-tooltip></w3m-tooltip>
|
|
917
|
-
` : null;
|
|
918
|
-
}
|
|
919
|
-
contentTemplate() {
|
|
920
|
-
return c` <wui-card
|
|
921
|
-
shake="${this.shake}"
|
|
922
|
-
data-embedded="${z(this.enableEmbedded)}"
|
|
923
|
-
role="alertdialog"
|
|
924
|
-
aria-modal="true"
|
|
925
|
-
tabindex="0"
|
|
926
|
-
data-testid="w3m-modal-card"
|
|
927
|
-
>
|
|
928
|
-
<w3m-header></w3m-header>
|
|
929
|
-
<w3m-router></w3m-router>
|
|
930
|
-
<w3m-snackbar></w3m-snackbar>
|
|
931
|
-
<w3m-alertbar></w3m-alertbar>
|
|
932
|
-
</wui-card>`;
|
|
933
|
-
}
|
|
934
|
-
async onOverlayClick(e) {
|
|
935
|
-
e.target === e.currentTarget && await this.handleClose();
|
|
936
|
-
}
|
|
937
|
-
async handleClose() {
|
|
938
|
-
await ee.safeClose();
|
|
939
|
-
}
|
|
940
|
-
initializeTheming() {
|
|
941
|
-
const { themeVariables: e, themeMode: t } = ue.state, i = pe.getColorTheme(t);
|
|
942
|
-
he(e, i);
|
|
943
|
-
}
|
|
944
|
-
onClose() {
|
|
945
|
-
this.open = !1, this.classList.remove("open"), this.onScrollUnlock(), A.hide(), this.onRemoveKeyboardListener();
|
|
946
|
-
}
|
|
947
|
-
onOpen() {
|
|
948
|
-
this.open = !0, this.classList.add("open"), this.onScrollLock(), this.onAddKeyboardListener();
|
|
949
|
-
}
|
|
950
|
-
onScrollLock() {
|
|
951
|
-
const e = document.createElement("style");
|
|
952
|
-
e.dataset.w3m = J, e.textContent = `
|
|
953
|
-
body {
|
|
954
|
-
touch-action: none;
|
|
955
|
-
overflow: hidden;
|
|
956
|
-
overscroll-behavior: contain;
|
|
957
|
-
}
|
|
958
|
-
w3m-modal {
|
|
959
|
-
pointer-events: auto;
|
|
960
|
-
}
|
|
961
|
-
`, document.head.appendChild(e);
|
|
962
|
-
}
|
|
963
|
-
onScrollUnlock() {
|
|
964
|
-
const e = document.head.querySelector(`style[data-w3m="${J}"]`);
|
|
965
|
-
e && e.remove();
|
|
966
|
-
}
|
|
967
|
-
onAddKeyboardListener() {
|
|
968
|
-
var t;
|
|
969
|
-
this.abortController = new AbortController();
|
|
970
|
-
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector("wui-card");
|
|
971
|
-
e == null || e.focus(), window.addEventListener("keydown", (i) => {
|
|
972
|
-
if (i.key === "Escape")
|
|
973
|
-
this.handleClose();
|
|
974
|
-
else if (i.key === "Tab") {
|
|
975
|
-
const { tagName: a } = i.target;
|
|
976
|
-
a && !a.includes("W3M-") && !a.includes("WUI-") && (e == null || e.focus());
|
|
977
|
-
}
|
|
978
|
-
}, this.abortController);
|
|
979
|
-
}
|
|
980
|
-
onRemoveKeyboardListener() {
|
|
981
|
-
var e;
|
|
982
|
-
(e = this.abortController) == null || e.abort(), this.abortController = void 0;
|
|
983
|
-
}
|
|
984
|
-
async onNewAddress(e) {
|
|
985
|
-
const t = h.state.isSwitchingNamespace, i = l.state.view === "ProfileWallets";
|
|
986
|
-
e ? await this.onConnected({
|
|
987
|
-
caipAddress: e,
|
|
988
|
-
isSwitchingNamespace: t,
|
|
989
|
-
isInProfileView: i
|
|
990
|
-
}) : !t && !this.enableEmbedded && !i && p.close(), await R.initializeIfEnabled(e), this.caipAddress = e, h.setIsSwitchingNamespace(!1);
|
|
991
|
-
}
|
|
992
|
-
async onConnected(e) {
|
|
993
|
-
if (e.isInProfileView)
|
|
994
|
-
return;
|
|
995
|
-
const { chainNamespace: t, chainId: i, address: a } = we.parseCaipAddress(e.caipAddress), o = `${t}:${i}`, s = !me.getPlainAddress(this.caipAddress), r = await R.getSessions({ address: a, caipNetworkId: o }), k = R.getSIWX() ? r.some((E) => E.data.accountAddress === a) : !0, m = e.isSwitchingNamespace && k && !this.enableEmbedded, $ = this.enableEmbedded && s;
|
|
996
|
-
m ? l.goBack() : $ && p.close();
|
|
997
|
-
}
|
|
998
|
-
onNewNetwork(e) {
|
|
999
|
-
var Y, X, G;
|
|
1000
|
-
const t = this.caipNetwork, i = (Y = t == null ? void 0 : t.caipNetworkId) == null ? void 0 : Y.toString(), a = t == null ? void 0 : t.chainNamespace, o = (X = e == null ? void 0 : e.caipNetworkId) == null ? void 0 : X.toString(), s = e == null ? void 0 : e.chainNamespace, r = i !== o, m = r && !(a !== s), $ = (t == null ? void 0 : t.name) === fe.UNSUPPORTED_NETWORK_NAME, E = l.state.view === "ConnectingExternal", O = l.state.view === "ProfileWallets", ae = !((G = h.getAccountData(e == null ? void 0 : e.chainNamespace)) != null && G.caipAddress), se = l.state.view === "UnsupportedChain", ne = p.state.open;
|
|
1001
|
-
let N = !1;
|
|
1002
|
-
this.enableEmbedded && l.state.view === "SwitchNetwork" && (N = !0), r && be.resetState(), ne && !E && !O && (ae ? r && (N = !0) : (se || m && !$) && (N = !0)), N && l.state.view !== "SIWXSignMessage" && l.goBack(), this.caipNetwork = e;
|
|
1003
|
-
}
|
|
1004
|
-
prefetch() {
|
|
1005
|
-
this.hasPrefetched || (P.prefetch(), P.fetchWalletsByPage({ page: 1 }), this.hasPrefetched = !0);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
v.styles = Ne;
|
|
1009
|
-
x([
|
|
1010
|
-
u({ type: Boolean })
|
|
1011
|
-
], v.prototype, "enableEmbedded", void 0);
|
|
1012
|
-
x([
|
|
1013
|
-
d()
|
|
1014
|
-
], v.prototype, "open", void 0);
|
|
1015
|
-
x([
|
|
1016
|
-
d()
|
|
1017
|
-
], v.prototype, "caipAddress", void 0);
|
|
1018
|
-
x([
|
|
1019
|
-
d()
|
|
1020
|
-
], v.prototype, "caipNetwork", void 0);
|
|
1021
|
-
x([
|
|
1022
|
-
d()
|
|
1023
|
-
], v.prototype, "shake", void 0);
|
|
1024
|
-
x([
|
|
1025
|
-
d()
|
|
1026
|
-
], v.prototype, "filterByNamespace", void 0);
|
|
1027
|
-
let Q = class extends v {
|
|
1028
|
-
};
|
|
1029
|
-
Q = x([
|
|
1030
|
-
b("w3m-modal")
|
|
1031
|
-
], Q);
|
|
1032
|
-
let Z = class extends v {
|
|
1033
|
-
};
|
|
1034
|
-
Z = x([
|
|
1035
|
-
b("appkit-modal")
|
|
1036
|
-
], Z);
|
|
1037
|
-
export {
|
|
1038
|
-
Z as AppKitModal,
|
|
1039
|
-
Q as W3mModal,
|
|
1040
|
-
v as W3mModalBase
|
|
1041
|
-
};
|