@dcl/vesting-dashboard 3.6.1-16577537275.commit-a4c65b5 → 3.7.1-19868070294.commit-e76f047
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/assets/PhArrowCircleDown-b4d1b9f0.js +14 -0
- package/assets/PhArrowClockwise-35e72491.js +14 -0
- package/assets/PhArrowDown-57c22b7e.js +14 -0
- package/assets/PhArrowLeft-f48f6a32.js +14 -0
- package/assets/PhArrowRight-86fee956.js +14 -0
- package/assets/PhArrowSquareOut-7b8bc76d.js +14 -0
- package/assets/PhArrowUp-cb14a0b1.js +14 -0
- package/assets/PhArrowUpRight-72a93a0e.js +14 -0
- package/assets/PhArrowsClockwise-ecc02e05.js +14 -0
- package/assets/PhArrowsDownUp-336a1435.js +14 -0
- package/assets/PhArrowsLeftRight-fbdccc02.js +14 -0
- package/assets/PhBank-31d2eba3.js +14 -0
- package/assets/PhBrowser-90d21d12.js +14 -0
- package/assets/PhCaretDown-3aabbdc5.js +14 -0
- package/assets/PhCaretLeft-282326ec.js +14 -0
- package/assets/PhCaretRight-7b09ae84.js +14 -0
- package/assets/PhCaretUp-e4584d94.js +14 -0
- package/assets/PhCheck-5730aae2.js +14 -0
- package/assets/PhCircleHalf-7d16bc06.js +14 -0
- package/assets/PhClock-8b060e99.js +14 -0
- package/assets/PhCompass-45d3bde6.js +14 -0
- package/assets/PhCopy-f77992ef.js +14 -0
- package/assets/PhCreditCard-c353277e.js +14 -0
- package/assets/PhCurrencyDollar-510272c7.js +14 -0
- package/assets/PhDesktop-49e8128e.js +14 -0
- package/assets/PhDeviceMobile-cfdf19ef.js +14 -0
- package/assets/PhDotsThree-69a484e4.js +14 -0
- package/assets/PhEnvelope-fc3dd2a0.js +14 -0
- package/assets/PhFunnelSimple-5abe9858.js +14 -0
- package/assets/PhGlobe-a1b4ca91.js +14 -0
- package/assets/PhIdentificationCard-80541484.js +14 -0
- package/assets/PhImage-6bbac6b7.js +14 -0
- package/assets/PhInfo-3481abef.js +14 -0
- package/assets/PhLightbulb-26b52ed2.js +14 -0
- package/assets/PhMagnifyingGlass-4dfb76cc.js +14 -0
- package/assets/PhPaperPlaneRight-e6cf54ef.js +14 -0
- package/assets/PhPlus-f5753116.js +14 -0
- package/assets/PhPower-8bf5c9c7.js +14 -0
- package/assets/PhPuzzlePiece-93f1c92b.js +14 -0
- package/assets/PhQrCode-03aa9f8a.js +14 -0
- package/assets/PhQuestion-6c2bd1ad.js +14 -0
- package/assets/PhQuestionMark-820f14af.js +14 -0
- package/assets/PhSealCheck-137e0b1b.js +14 -0
- package/assets/PhSignOut-ed65c268.js +14 -0
- package/assets/PhSpinner-19f53f69.js +14 -0
- package/assets/PhTrash-acb3ad59.js +14 -0
- package/assets/PhUser-92aa32ba.js +14 -0
- package/assets/PhVault-ed94ef20.js +14 -0
- package/assets/PhWarning-b2396b99.js +14 -0
- package/assets/PhWarningCircle-0f363973.js +14 -0
- package/assets/PhX-522d79dd.js +14 -0
- package/assets/basic-eeeaaaeb.js +1435 -0
- package/assets/core-84b3ed1e.js +254 -0
- package/assets/features-21cad012.js +5 -0
- package/assets/{fortmatic-38f79735.js → fortmatic-f30106eb.js} +1 -1
- package/assets/{index-5fe88343.js → index-04415554.js} +1 -1
- package/assets/index-069f2f19.js +40 -0
- package/assets/index-388893ce.js +1321 -0
- package/assets/index-516a1ffc.js +26 -0
- package/assets/{index-9c03b9eb.css → index-91d98a83.css} +7 -7
- package/assets/{index-d9a3300d.js → index-be0620a9.js} +1 -1
- package/assets/{index-db35fe51.js → index-cf405d3f.js} +1 -1
- package/assets/index-ec27bc27.js +7 -0
- package/assets/{index-1e0cfb06.js → index-fec77d48.js} +136 -130
- package/assets/native-bf1092f7.js +1 -0
- package/assets/property-70d704fc.js +27 -0
- package/assets/w3m-modal-4a2f6c0b.js +1209 -0
- package/index.html +4 -4
- package/package.json +3 -3
- package/assets/add-423b3765.js +0 -15
- package/assets/all-wallets-6318b594.js +0 -6
- package/assets/app-store-c30317c0.js +0 -17
- package/assets/apple-248aca7f.js +0 -18
- package/assets/arrow-bottom-99c2809a.js +0 -8
- package/assets/arrow-bottom-circle-52aa2a11.js +0 -11
- package/assets/arrow-left-69c01e2b.js +0 -8
- package/assets/arrow-right-1c1b5b19.js +0 -8
- package/assets/arrow-top-741c53b5.js +0 -8
- package/assets/bank-24f6d02d.js +0 -14
- package/assets/basic-9dc8174a.js +0 -2128
- package/assets/browser-95dd5a39.js +0 -14
- package/assets/card-2db2dba3.js +0 -14
- package/assets/checkmark-b219f135.js +0 -11
- package/assets/checkmark-bold-25fa686a.js +0 -8
- package/assets/chevron-bottom-f075ffbd.js +0 -8
- package/assets/chevron-left-71e407e9.js +0 -8
- package/assets/chevron-right-6189a026.js +0 -8
- package/assets/chevron-top-3b0f639b.js +0 -8
- package/assets/chrome-store-bcf03a9a.js +0 -61
- package/assets/clock-ccbbd268.js +0 -8
- package/assets/close-7a27f645.js +0 -8
- package/assets/coinPlaceholder-ae5a3855.js +0 -8
- package/assets/compass-313e8cfe.js +0 -8
- package/assets/copy-12ca4475.js +0 -15
- package/assets/core-10800243.js +0 -910
- package/assets/cursor-07342d1b.js +0 -3
- package/assets/cursor-transparent-4c6027d5.js +0 -12
- package/assets/desktop-739920a7.js +0 -9
- package/assets/disconnect-4c3a444c.js +0 -8
- package/assets/discord-15059aa1.js +0 -17
- package/assets/etherscan-94f3dd64.js +0 -6
- package/assets/exclamation-triangle-2f387115.js +0 -4
- package/assets/extension-9d4a1b73.js +0 -8
- package/assets/external-link-a8b07c98.js +0 -8
- package/assets/facebook-55d423f7.js +0 -26
- package/assets/farcaster-dd4a3e14.js +0 -12
- package/assets/filters-602ee0e2.js +0 -8
- package/assets/github-bec58e5b.js +0 -18
- package/assets/google-98d84a2c.js +0 -18
- package/assets/help-circle-ef60da9e.js +0 -12
- package/assets/id-d31bfc51.js +0 -12
- package/assets/image-fb1f3e63.js +0 -4
- package/assets/index-376d9ca5.js +0 -394
- package/assets/index-4c3c4c35.js +0 -7
- package/assets/index.es-63034a59.js +0 -26
- package/assets/info-8e7d9734.js +0 -3
- package/assets/info-circle-beb255df.js +0 -12
- package/assets/lightbulb-9b5bc46f.js +0 -3
- package/assets/mail-a8cb5474.js +0 -8
- package/assets/mobile-830dba07.js +0 -9
- package/assets/more-94154d68.js +0 -11
- package/assets/network-placeholder-feda2a74.js +0 -14
- package/assets/nftPlaceholder-3500f4ec.js +0 -8
- package/assets/off-514e4de1.js +0 -8
- package/assets/play-store-2e9bbeb8.js +0 -32
- package/assets/plus-a33257e8.js +0 -13
- package/assets/qr-code-2dd8cc67.js +0 -6
- package/assets/recycle-horizontal-1cac807c.js +0 -9
- package/assets/refresh-1a3f6cce.js +0 -8
- package/assets/reown-logo-f43b0e23.js +0 -12
- package/assets/search-3bd8cbcb.js +0 -8
- package/assets/secp256k1-68a098fa.js +0 -1
- package/assets/secp256k1-bb840cb1.js +0 -1
- package/assets/send-10d3ed06.js +0 -15
- package/assets/swapHorizontal-5baadf98.js +0 -8
- package/assets/swapHorizontalBold-f2a3ad00.js +0 -8
- package/assets/swapHorizontalMedium-cf44b565.js +0 -16
- package/assets/swapHorizontalRoundedBold-342fa240.js +0 -8
- package/assets/swapVertical-178d166c.js +0 -8
- package/assets/telegram-795f2864.js +0 -16
- package/assets/three-dots-0198b4c0.js +0 -5
- package/assets/twitch-27573001.js +0 -18
- package/assets/twitterIcon-cb8f65cb.js +0 -6
- package/assets/verify-37b11cb7.js +0 -8
- package/assets/verify-filled-f1000698.js +0 -8
- package/assets/w3m-modal-22f5aa95.js +0 -642
- package/assets/wallet-97c0e814.js +0 -8
- package/assets/wallet-placeholder-24cab014.js +0 -14
- package/assets/walletconnect-63e804b2.js +0 -30
- package/assets/warning-circle-d5eaf6d9.js +0 -12
- package/assets/x-44f57cce.js +0 -12
package/assets/basic-9dc8174a.js
DELETED
|
@@ -1,2128 +0,0 @@
|
|
|
1
|
-
import{i as P,e as M,r as A,a as _,x as c,C as L,A as S,b as I,E as J,R as O,O as Y,c as kt,d as D,f as W,S as ge,g as Hi,W as fe,h as je,j as si,T as ke,k as Qt,M as vi,l as yi,m as At,n as li,o as Ki}from"./core-10800243.js";import{n as u,c as C,o as y,r as v,U as st,e as Gi,f as Yi,a as Ji}from"./index-376d9ca5.js";import"./index-1e0cfb06.js";import"./index.es-63034a59.js";const Qi=P`
|
|
2
|
-
:host {
|
|
3
|
-
position: relative;
|
|
4
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
5
|
-
display: flex;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
width: var(--local-size);
|
|
9
|
-
height: var(--local-size);
|
|
10
|
-
border-radius: inherit;
|
|
11
|
-
border-radius: var(--local-border-radius);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host > wui-flex {
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
border-radius: inherit;
|
|
17
|
-
border-radius: var(--local-border-radius);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host::after {
|
|
21
|
-
content: '';
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 0;
|
|
24
|
-
bottom: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
right: 0;
|
|
27
|
-
border-radius: inherit;
|
|
28
|
-
border: 1px solid var(--wui-color-gray-glass-010);
|
|
29
|
-
pointer-events: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host([name='Extension'])::after {
|
|
33
|
-
border: 1px solid var(--wui-color-accent-glass-010);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host([data-wallet-icon='allWallets']) {
|
|
37
|
-
background-color: var(--wui-all-wallets-bg-100);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:host([data-wallet-icon='allWallets'])::after {
|
|
41
|
-
border: 1px solid var(--wui-color-accent-glass-010);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
wui-icon[data-parent-size='inherit'] {
|
|
45
|
-
width: 75%;
|
|
46
|
-
height: 75%;
|
|
47
|
-
align-items: center;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
wui-icon[data-parent-size='sm'] {
|
|
51
|
-
width: 18px;
|
|
52
|
-
height: 18px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
wui-icon[data-parent-size='md'] {
|
|
56
|
-
width: 24px;
|
|
57
|
-
height: 24px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
wui-icon[data-parent-size='lg'] {
|
|
61
|
-
width: 42px;
|
|
62
|
-
height: 42px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
wui-icon[data-parent-size='full'] {
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host > wui-icon-box {
|
|
71
|
-
position: absolute;
|
|
72
|
-
overflow: hidden;
|
|
73
|
-
right: -1px;
|
|
74
|
-
bottom: -2px;
|
|
75
|
-
z-index: 1;
|
|
76
|
-
border: 2px solid var(--wui-color-bg-150, #1e1f1f);
|
|
77
|
-
padding: 1px;
|
|
78
|
-
}
|
|
79
|
-
`;var xt=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let lt=class extends _{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let t="xxs";return this.size==="lg"?t="m":this.size==="md"?t="xs":t="xxs",this.style.cssText=`
|
|
80
|
-
--local-border-radius: var(--wui-border-radius-${t});
|
|
81
|
-
--local-size: var(--wui-wallet-image-size-${this.size});
|
|
82
|
-
`,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),c`
|
|
83
|
-
<wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
|
|
84
|
-
`}templateVisual(){return this.imageSrc?c`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?c`<wui-icon
|
|
85
|
-
data-parent-size="md"
|
|
86
|
-
size="md"
|
|
87
|
-
color="inherit"
|
|
88
|
-
name=${this.walletIcon}
|
|
89
|
-
></wui-icon>`:c`<wui-icon
|
|
90
|
-
data-parent-size=${this.size}
|
|
91
|
-
size="inherit"
|
|
92
|
-
color="inherit"
|
|
93
|
-
name="walletPlaceholder"
|
|
94
|
-
></wui-icon>`}};lt.styles=[M,A,Qi];xt([u()],lt.prototype,"size",void 0);xt([u()],lt.prototype,"name",void 0);xt([u()],lt.prototype,"imageSrc",void 0);xt([u()],lt.prototype,"walletIcon",void 0);xt([u({type:Boolean})],lt.prototype,"installed",void 0);xt([u()],lt.prototype,"badgeSize",void 0);lt=xt([C("wui-wallet-image")],lt);const Xi=P`
|
|
95
|
-
:host {
|
|
96
|
-
position: relative;
|
|
97
|
-
border-radius: var(--wui-border-radius-xxs);
|
|
98
|
-
width: 40px;
|
|
99
|
-
height: 40px;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
background: var(--wui-color-gray-glass-002);
|
|
102
|
-
display: flex;
|
|
103
|
-
justify-content: center;
|
|
104
|
-
align-items: center;
|
|
105
|
-
flex-wrap: wrap;
|
|
106
|
-
gap: var(--wui-spacing-4xs);
|
|
107
|
-
padding: 3.75px !important;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
:host::after {
|
|
111
|
-
content: '';
|
|
112
|
-
position: absolute;
|
|
113
|
-
top: 0;
|
|
114
|
-
bottom: 0;
|
|
115
|
-
left: 0;
|
|
116
|
-
right: 0;
|
|
117
|
-
border-radius: inherit;
|
|
118
|
-
border: 1px solid var(--wui-color-gray-glass-010);
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
:host > wui-wallet-image {
|
|
123
|
-
width: 14px;
|
|
124
|
-
height: 14px;
|
|
125
|
-
border-radius: var(--wui-border-radius-5xs);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:host > wui-flex {
|
|
129
|
-
padding: 2px;
|
|
130
|
-
position: fixed;
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
left: 34px;
|
|
133
|
-
bottom: 8px;
|
|
134
|
-
background: var(--dark-background-150, #1e1f1f);
|
|
135
|
-
border-radius: 50%;
|
|
136
|
-
z-index: 2;
|
|
137
|
-
display: flex;
|
|
138
|
-
}
|
|
139
|
-
`;var xi=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};const Ee=4;let Xt=class extends _{constructor(){super(...arguments),this.walletImages=[]}render(){const t=this.walletImages.length<Ee;return c`${this.walletImages.slice(0,Ee).map(({src:i,walletName:n})=>c`
|
|
140
|
-
<wui-wallet-image
|
|
141
|
-
size="inherit"
|
|
142
|
-
imageSrc=${i}
|
|
143
|
-
name=${y(n)}
|
|
144
|
-
></wui-wallet-image>
|
|
145
|
-
`)}
|
|
146
|
-
${t?[...Array(Ee-this.walletImages.length)].map(()=>c` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`):null}
|
|
147
|
-
<wui-flex>
|
|
148
|
-
<wui-icon-box
|
|
149
|
-
size="xxs"
|
|
150
|
-
iconSize="xxs"
|
|
151
|
-
iconcolor="success-100"
|
|
152
|
-
backgroundcolor="success-100"
|
|
153
|
-
icon="checkmark"
|
|
154
|
-
background="opaque"
|
|
155
|
-
></wui-icon-box>
|
|
156
|
-
</wui-flex>`}};Xt.styles=[A,Xi];xi([u({type:Array})],Xt.prototype,"walletImages",void 0);Xt=xi([C("wui-all-wallets-image")],Xt);const Zi=P`
|
|
157
|
-
button {
|
|
158
|
-
column-gap: var(--wui-spacing-s);
|
|
159
|
-
padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
|
|
160
|
-
width: 100%;
|
|
161
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
162
|
-
border-radius: var(--wui-border-radius-xs);
|
|
163
|
-
color: var(--wui-color-fg-100);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
button > wui-text:nth-child(2) {
|
|
167
|
-
display: flex;
|
|
168
|
-
flex: 1;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
button:disabled {
|
|
172
|
-
background-color: var(--wui-color-gray-glass-015);
|
|
173
|
-
color: var(--wui-color-gray-glass-015);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
button:disabled > wui-tag {
|
|
177
|
-
background-color: var(--wui-color-gray-glass-010);
|
|
178
|
-
color: var(--wui-color-fg-300);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
wui-icon {
|
|
182
|
-
color: var(--wui-color-fg-200) !important;
|
|
183
|
-
}
|
|
184
|
-
`;var U=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let k=class extends _{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.tabIdx=void 0,this.installed=!1,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return c`
|
|
185
|
-
<button ?disabled=${this.disabled} tabindex=${y(this.tabIdx)}>
|
|
186
|
-
${this.templateAllWallets()} ${this.templateWalletImage()}
|
|
187
|
-
<wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
|
|
188
|
-
${this.templateStatus()}
|
|
189
|
-
</button>
|
|
190
|
-
`}templateAllWallets(){return this.showAllWallets&&this.imageSrc?c` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?c` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?c`<wui-wallet-image
|
|
191
|
-
size="sm"
|
|
192
|
-
imageSrc=${this.imageSrc}
|
|
193
|
-
name=${this.name}
|
|
194
|
-
.installed=${this.installed}
|
|
195
|
-
></wui-wallet-image>`:!this.showAllWallets&&!this.imageSrc?c`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`:null}templateStatus(){return this.loading?c`<wui-loading-spinner
|
|
196
|
-
size="lg"
|
|
197
|
-
color=${this.loadingSpinnerColor}
|
|
198
|
-
></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?c`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?c`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};k.styles=[A,M,Zi];U([u({type:Array})],k.prototype,"walletImages",void 0);U([u()],k.prototype,"imageSrc",void 0);U([u()],k.prototype,"name",void 0);U([u()],k.prototype,"tagLabel",void 0);U([u()],k.prototype,"tagVariant",void 0);U([u()],k.prototype,"icon",void 0);U([u()],k.prototype,"walletIcon",void 0);U([u()],k.prototype,"tabIdx",void 0);U([u({type:Boolean})],k.prototype,"installed",void 0);U([u({type:Boolean})],k.prototype,"disabled",void 0);U([u({type:Boolean})],k.prototype,"showAllWallets",void 0);U([u({type:Boolean})],k.prototype,"loading",void 0);U([u({type:String})],k.prototype,"loadingSpinnerColor",void 0);k=U([C("wui-list-wallet")],k);var Pt=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let wt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.count=S.state.count,this.filteredCount=S.state.filteredWallets.length,this.isFetchingRecommendedWallets=S.state.isFetchingRecommendedWallets,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t),S.subscribeKey("count",t=>this.count=t),S.subscribeKey("filteredWallets",t=>this.filteredCount=t.length),S.subscribeKey("isFetchingRecommendedWallets",t=>this.isFetchingRecommendedWallets=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.connectors.find(l=>l.id==="walletConnect"),{allWallets:i}=Y.state;if(!t||i==="HIDE"||i==="ONLY_MOBILE"&&!I.isMobile())return null;const n=S.state.featured.length,o=this.count+n,e=o<10?o:Math.floor(o/10)*10,a=this.filteredCount>0?this.filteredCount:e;let s=`${a}`;return this.filteredCount>0?s=`${this.filteredCount}`:a<o&&(s=`${a}+`),c`
|
|
199
|
-
<wui-list-wallet
|
|
200
|
-
name="All Wallets"
|
|
201
|
-
walletIcon="allWallets"
|
|
202
|
-
showAllWallets
|
|
203
|
-
@click=${this.onAllWallets.bind(this)}
|
|
204
|
-
tagLabel=${s}
|
|
205
|
-
tagVariant="shade"
|
|
206
|
-
data-testid="all-wallets"
|
|
207
|
-
tabIdx=${y(this.tabIdx)}
|
|
208
|
-
.loading=${this.isFetchingRecommendedWallets}
|
|
209
|
-
loadingSpinnerColor=${this.isFetchingRecommendedWallets?"fg-300":"accent-100"}
|
|
210
|
-
></wui-list-wallet>
|
|
211
|
-
`}onAllWallets(){J.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),O.push("AllWallets")}};Pt([u()],wt.prototype,"tabIdx",void 0);Pt([v()],wt.prototype,"connectors",void 0);Pt([v()],wt.prototype,"count",void 0);Pt([v()],wt.prototype,"filteredCount",void 0);Pt([v()],wt.prototype,"isFetchingRecommendedWallets",void 0);wt=Pt([C("w3m-all-wallets-widget")],wt);var Ke=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Zt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.connectors.filter(i=>i.type==="ANNOUNCED");return t!=null&&t.length?c`
|
|
212
|
-
<wui-flex flexDirection="column" gap="xs">
|
|
213
|
-
${t.filter(kt.showConnector).map(i=>c`
|
|
214
|
-
<wui-list-wallet
|
|
215
|
-
imageSrc=${y(D.getConnectorImage(i))}
|
|
216
|
-
name=${i.name??"Unknown"}
|
|
217
|
-
@click=${()=>this.onConnector(i)}
|
|
218
|
-
tagVariant="success"
|
|
219
|
-
tagLabel="installed"
|
|
220
|
-
data-testid=${`wallet-selector-${i.id}`}
|
|
221
|
-
.installed=${!0}
|
|
222
|
-
tabIdx=${y(this.tabIdx)}
|
|
223
|
-
>
|
|
224
|
-
</wui-list-wallet>
|
|
225
|
-
`)}
|
|
226
|
-
</wui-flex>
|
|
227
|
-
`:(this.style.cssText="display: none",null)}onConnector(t){t.id==="walletConnect"?I.isMobile()?O.push("AllWallets"):O.push("ConnectingWalletConnect"):O.push("ConnectingExternal",{connector:t})}};Ke([u()],Zt.prototype,"tabIdx",void 0);Ke([v()],Zt.prototype,"connectors",void 0);Zt=Ke([C("w3m-connect-announced-widget")],Zt);var we=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let zt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.loading=!1,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t)),I.isTelegram()&&I.isIos()&&(this.loading=!W.state.wcUri,this.unsubscribe.push(W.subscribeKey("wcUri",t=>this.loading=!t)))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const{customWallets:t}=Y.state;if(!(t!=null&&t.length))return this.style.cssText="display: none",null;const i=this.filterOutDuplicateWallets(t);return c`<wui-flex flexDirection="column" gap="xs">
|
|
228
|
-
${i.map(n=>c`
|
|
229
|
-
<wui-list-wallet
|
|
230
|
-
imageSrc=${y(D.getWalletImage(n))}
|
|
231
|
-
name=${n.name??"Unknown"}
|
|
232
|
-
@click=${()=>this.onConnectWallet(n)}
|
|
233
|
-
data-testid=${`wallet-selector-${n.id}`}
|
|
234
|
-
tabIdx=${y(this.tabIdx)}
|
|
235
|
-
?loading=${this.loading}
|
|
236
|
-
>
|
|
237
|
-
</wui-list-wallet>
|
|
238
|
-
`)}
|
|
239
|
-
</wui-flex>`}filterOutDuplicateWallets(t){const i=ge.getRecentWallets(),n=this.connectors.map(s=>{var l;return(l=s.info)==null?void 0:l.rdns}).filter(Boolean),o=i.map(s=>s.rdns).filter(Boolean),e=n.concat(o);if(e.includes("io.metamask.mobile")&&I.isMobile()){const s=e.indexOf("io.metamask.mobile");e[s]="io.metamask"}return t.filter(s=>!e.includes(String(s==null?void 0:s.rdns)))}onConnectWallet(t){this.loading||O.push("ConnectingWalletConnect",{wallet:t})}};we([u()],zt.prototype,"tabIdx",void 0);we([v()],zt.prototype,"connectors",void 0);we([v()],zt.prototype,"loading",void 0);zt=we([C("w3m-connect-custom-widget")],zt);var Ge=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let te=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const n=this.connectors.filter(o=>o.type==="EXTERNAL").filter(kt.showConnector).filter(o=>o.id!==Hi.CONNECTOR_ID.COINBASE_SDK);return n!=null&&n.length?c`
|
|
240
|
-
<wui-flex flexDirection="column" gap="xs">
|
|
241
|
-
${n.map(o=>c`
|
|
242
|
-
<wui-list-wallet
|
|
243
|
-
imageSrc=${y(D.getConnectorImage(o))}
|
|
244
|
-
.installed=${!0}
|
|
245
|
-
name=${o.name??"Unknown"}
|
|
246
|
-
data-testid=${`wallet-selector-external-${o.id}`}
|
|
247
|
-
@click=${()=>this.onConnector(o)}
|
|
248
|
-
tabIdx=${y(this.tabIdx)}
|
|
249
|
-
>
|
|
250
|
-
</wui-list-wallet>
|
|
251
|
-
`)}
|
|
252
|
-
</wui-flex>
|
|
253
|
-
`:(this.style.cssText="display: none",null)}onConnector(t){O.push("ConnectingExternal",{connector:t})}};Ge([u()],te.prototype,"tabIdx",void 0);Ge([v()],te.prototype,"connectors",void 0);te=Ge([C("w3m-connect-external-widget")],te);var Ye=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ee=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.wallets=[]}render(){return this.wallets.length?c`
|
|
254
|
-
<wui-flex flexDirection="column" gap="xs">
|
|
255
|
-
${this.wallets.map(t=>c`
|
|
256
|
-
<wui-list-wallet
|
|
257
|
-
data-testid=${`wallet-selector-featured-${t.id}`}
|
|
258
|
-
imageSrc=${y(D.getWalletImage(t))}
|
|
259
|
-
name=${t.name??"Unknown"}
|
|
260
|
-
@click=${()=>this.onConnectWallet(t)}
|
|
261
|
-
tabIdx=${y(this.tabIdx)}
|
|
262
|
-
>
|
|
263
|
-
</wui-list-wallet>
|
|
264
|
-
`)}
|
|
265
|
-
</wui-flex>
|
|
266
|
-
`:(this.style.cssText="display: none",null)}onConnectWallet(t){L.selectWalletConnector(t)}};Ye([u()],ee.prototype,"tabIdx",void 0);Ye([u()],ee.prototype,"wallets",void 0);ee=Ye([C("w3m-connect-featured-widget")],ee);var Je=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ie=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.connectors=[]}render(){const t=this.connectors.filter(kt.showConnector);return t.length===0?(this.style.cssText="display: none",null):c`
|
|
267
|
-
<wui-flex flexDirection="column" gap="xs">
|
|
268
|
-
${t.map(i=>c`
|
|
269
|
-
<wui-list-wallet
|
|
270
|
-
imageSrc=${y(D.getConnectorImage(i))}
|
|
271
|
-
.installed=${!0}
|
|
272
|
-
name=${i.name??"Unknown"}
|
|
273
|
-
tagVariant="success"
|
|
274
|
-
tagLabel="installed"
|
|
275
|
-
data-testid=${`wallet-selector-${i.id}`}
|
|
276
|
-
@click=${()=>this.onConnector(i)}
|
|
277
|
-
tabIdx=${y(this.tabIdx)}
|
|
278
|
-
>
|
|
279
|
-
</wui-list-wallet>
|
|
280
|
-
`)}
|
|
281
|
-
</wui-flex>
|
|
282
|
-
`}onConnector(t){L.setActiveConnector(t),O.push("ConnectingExternal",{connector:t})}};Je([u()],ie.prototype,"tabIdx",void 0);Je([u()],ie.prototype,"connectors",void 0);ie=Je([C("w3m-connect-injected-widget")],ie);var Qe=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ne=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.connectors.filter(i=>i.type==="MULTI_CHAIN"&&i.name!=="WalletConnect");return t!=null&&t.length?c`
|
|
283
|
-
<wui-flex flexDirection="column" gap="xs">
|
|
284
|
-
${t.map(i=>c`
|
|
285
|
-
<wui-list-wallet
|
|
286
|
-
imageSrc=${y(D.getConnectorImage(i))}
|
|
287
|
-
.installed=${!0}
|
|
288
|
-
name=${i.name??"Unknown"}
|
|
289
|
-
tagVariant="shade"
|
|
290
|
-
tagLabel="multichain"
|
|
291
|
-
data-testid=${`wallet-selector-${i.id}`}
|
|
292
|
-
@click=${()=>this.onConnector(i)}
|
|
293
|
-
tabIdx=${y(this.tabIdx)}
|
|
294
|
-
>
|
|
295
|
-
</wui-list-wallet>
|
|
296
|
-
`)}
|
|
297
|
-
</wui-flex>
|
|
298
|
-
`:(this.style.cssText="display: none",null)}onConnector(t){L.setActiveConnector(t),O.push("ConnectingMultiChain")}};Qe([u()],ne.prototype,"tabIdx",void 0);Qe([v()],ne.prototype,"connectors",void 0);ne=Qe([C("w3m-connect-multi-chain-widget")],ne);var be=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Dt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.loading=!1,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t)),I.isTelegram()&&I.isIos()&&(this.loading=!W.state.wcUri,this.unsubscribe.push(W.subscribeKey("wcUri",t=>this.loading=!t)))}render(){const i=ge.getRecentWallets().filter(n=>!fe.isExcluded(n)).filter(n=>!this.hasWalletConnector(n)).filter(n=>this.isWalletCompatibleWithCurrentChain(n));return i.length?c`
|
|
299
|
-
<wui-flex flexDirection="column" gap="xs">
|
|
300
|
-
${i.map(n=>c`
|
|
301
|
-
<wui-list-wallet
|
|
302
|
-
imageSrc=${y(D.getWalletImage(n))}
|
|
303
|
-
name=${n.name??"Unknown"}
|
|
304
|
-
@click=${()=>this.onConnectWallet(n)}
|
|
305
|
-
tagLabel="recent"
|
|
306
|
-
tagVariant="shade"
|
|
307
|
-
tabIdx=${y(this.tabIdx)}
|
|
308
|
-
?loading=${this.loading}
|
|
309
|
-
>
|
|
310
|
-
</wui-list-wallet>
|
|
311
|
-
`)}
|
|
312
|
-
</wui-flex>
|
|
313
|
-
`:(this.style.cssText="display: none",null)}onConnectWallet(t){this.loading||L.selectWalletConnector(t)}hasWalletConnector(t){return this.connectors.some(i=>i.id===t.id||i.name===t.name)}isWalletCompatibleWithCurrentChain(t){const i=je.state.activeChain;return i&&t.chains?t.chains.some(n=>{const o=n.split(":")[0];return i===o}):!0}};be([u()],Dt.prototype,"tabIdx",void 0);be([v()],Dt.prototype,"connectors",void 0);be([v()],Dt.prototype,"loading",void 0);Dt=be([C("w3m-connect-recent-widget")],Dt);var me=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Nt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.wallets=[],this.loading=!1,I.isTelegram()&&I.isIos()&&(this.loading=!W.state.wcUri,this.unsubscribe.push(W.subscribeKey("wcUri",t=>this.loading=!t)))}render(){const{connectors:t}=L.state,{customWallets:i,featuredWalletIds:n}=Y.state,o=ge.getRecentWallets(),e=t.find(R=>R.id==="walletConnect"),s=t.filter(R=>R.type==="INJECTED"||R.type==="ANNOUNCED"||R.type==="MULTI_CHAIN").filter(R=>R.name!=="Browser Wallet");if(!e)return null;if(n||i||!this.wallets.length)return this.style.cssText="display: none",null;const l=s.length+o.length,h=Math.max(0,2-l),d=fe.filterOutDuplicateWallets(this.wallets).slice(0,h);return d.length?c`
|
|
314
|
-
<wui-flex flexDirection="column" gap="xs">
|
|
315
|
-
${d.map(R=>c`
|
|
316
|
-
<wui-list-wallet
|
|
317
|
-
imageSrc=${y(D.getWalletImage(R))}
|
|
318
|
-
name=${(R==null?void 0:R.name)??"Unknown"}
|
|
319
|
-
@click=${()=>this.onConnectWallet(R)}
|
|
320
|
-
tabIdx=${y(this.tabIdx)}
|
|
321
|
-
?loading=${this.loading}
|
|
322
|
-
>
|
|
323
|
-
</wui-list-wallet>
|
|
324
|
-
`)}
|
|
325
|
-
</wui-flex>
|
|
326
|
-
`:(this.style.cssText="display: none",null)}onConnectWallet(t){if(this.loading)return;const i=L.getConnector(t.id,t.rdns);i?O.push("ConnectingExternal",{connector:i}):O.push("ConnectingWalletConnect",{wallet:t})}};me([u()],Nt.prototype,"tabIdx",void 0);me([u()],Nt.prototype,"wallets",void 0);me([v()],Nt.prototype,"loading",void 0);Nt=me([C("w3m-connect-recommended-widget")],Nt);var ve=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Mt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.connectorImages=si.state.connectorImages,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t),si.subscribeKey("connectorImages",t=>this.connectorImages=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){if(I.isMobile())return this.style.cssText="display: none",null;const t=this.connectors.find(n=>n.id==="walletConnect");if(!t)return this.style.cssText="display: none",null;const i=t.imageUrl||this.connectorImages[(t==null?void 0:t.imageId)??""];return c`
|
|
327
|
-
<wui-list-wallet
|
|
328
|
-
imageSrc=${y(i)}
|
|
329
|
-
name=${t.name??"Unknown"}
|
|
330
|
-
@click=${()=>this.onConnector(t)}
|
|
331
|
-
tagLabel="qr code"
|
|
332
|
-
tagVariant="main"
|
|
333
|
-
tabIdx=${y(this.tabIdx)}
|
|
334
|
-
data-testid="wallet-selector-walletconnect"
|
|
335
|
-
>
|
|
336
|
-
</wui-list-wallet>
|
|
337
|
-
`}onConnector(t){L.setActiveConnector(t),O.push("ConnectingWalletConnect")}};ve([u()],Mt.prototype,"tabIdx",void 0);ve([v()],Mt.prototype,"connectors",void 0);ve([v()],Mt.prototype,"connectorImages",void 0);Mt=ve([C("w3m-connect-walletconnect-widget")],Mt);const tn=P`
|
|
338
|
-
:host {
|
|
339
|
-
margin-top: var(--wui-spacing-3xs);
|
|
340
|
-
}
|
|
341
|
-
wui-separator {
|
|
342
|
-
margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)
|
|
343
|
-
calc(var(--wui-spacing-m) * -1);
|
|
344
|
-
width: calc(100% + var(--wui-spacing-s) * 2);
|
|
345
|
-
}
|
|
346
|
-
`;var Ft=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let bt=class extends _{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=L.state.connectors,this.recommended=S.state.recommended,this.featured=S.state.featured,this.unsubscribe.push(L.subscribeKey("connectors",t=>this.connectors=t),S.subscribeKey("recommended",t=>this.recommended=t),S.subscribeKey("featured",t=>this.featured=t))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return c`
|
|
347
|
-
<wui-flex flexDirection="column" gap="xs"> ${this.connectorListTemplate()} </wui-flex>
|
|
348
|
-
`}connectorListTemplate(){const{custom:t,recent:i,announced:n,injected:o,multiChain:e,recommended:a,featured:s,external:l}=kt.getConnectorsByType(this.connectors,this.recommended,this.featured);return kt.getConnectorTypeOrder({custom:t,recent:i,announced:n,injected:o,multiChain:e,recommended:a,featured:s,external:l}).map(d=>{switch(d){case"injected":return c`
|
|
349
|
-
${e.length?c`<w3m-connect-multi-chain-widget
|
|
350
|
-
tabIdx=${y(this.tabIdx)}
|
|
351
|
-
></w3m-connect-multi-chain-widget>`:null}
|
|
352
|
-
${n.length?c`<w3m-connect-announced-widget
|
|
353
|
-
tabIdx=${y(this.tabIdx)}
|
|
354
|
-
></w3m-connect-announced-widget>`:null}
|
|
355
|
-
${o.length?c`<w3m-connect-injected-widget
|
|
356
|
-
.connectors=${o}
|
|
357
|
-
tabIdx=${y(this.tabIdx)}
|
|
358
|
-
></w3m-connect-injected-widget>`:null}
|
|
359
|
-
`;case"walletConnect":return c`<w3m-connect-walletconnect-widget
|
|
360
|
-
tabIdx=${y(this.tabIdx)}
|
|
361
|
-
></w3m-connect-walletconnect-widget>`;case"recent":return c`<w3m-connect-recent-widget
|
|
362
|
-
tabIdx=${y(this.tabIdx)}
|
|
363
|
-
></w3m-connect-recent-widget>`;case"featured":return c`<w3m-connect-featured-widget
|
|
364
|
-
.wallets=${s}
|
|
365
|
-
tabIdx=${y(this.tabIdx)}
|
|
366
|
-
></w3m-connect-featured-widget>`;case"custom":return c`<w3m-connect-custom-widget
|
|
367
|
-
tabIdx=${y(this.tabIdx)}
|
|
368
|
-
></w3m-connect-custom-widget>`;case"external":return c`<w3m-connect-external-widget
|
|
369
|
-
tabIdx=${y(this.tabIdx)}
|
|
370
|
-
></w3m-connect-external-widget>`;case"recommended":return c`<w3m-connect-recommended-widget
|
|
371
|
-
.wallets=${a}
|
|
372
|
-
tabIdx=${y(this.tabIdx)}
|
|
373
|
-
></w3m-connect-recommended-widget>`;default:return console.warn(`Unknown connector type: ${d}`),null}})}};bt.styles=tn;Ft([u()],bt.prototype,"tabIdx",void 0);Ft([v()],bt.prototype,"connectors",void 0);Ft([v()],bt.prototype,"recommended",void 0);Ft([v()],bt.prototype,"featured",void 0);bt=Ft([C("w3m-connector-list")],bt);const en=P`
|
|
374
|
-
:host {
|
|
375
|
-
display: inline-flex;
|
|
376
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
377
|
-
border-radius: var(--wui-border-radius-3xl);
|
|
378
|
-
padding: var(--wui-spacing-3xs);
|
|
379
|
-
position: relative;
|
|
380
|
-
height: 36px;
|
|
381
|
-
min-height: 36px;
|
|
382
|
-
overflow: hidden;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
:host::before {
|
|
386
|
-
content: '';
|
|
387
|
-
position: absolute;
|
|
388
|
-
pointer-events: none;
|
|
389
|
-
top: 4px;
|
|
390
|
-
left: 4px;
|
|
391
|
-
display: block;
|
|
392
|
-
width: var(--local-tab-width);
|
|
393
|
-
height: 28px;
|
|
394
|
-
border-radius: var(--wui-border-radius-3xl);
|
|
395
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
396
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
397
|
-
transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));
|
|
398
|
-
transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
399
|
-
will-change: background-color, opacity;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
:host([data-type='flex'])::before {
|
|
403
|
-
left: 3px;
|
|
404
|
-
transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
:host([data-type='flex']) {
|
|
408
|
-
display: flex;
|
|
409
|
-
padding: 0px 0px 0px 12px;
|
|
410
|
-
gap: 4px;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
:host([data-type='flex']) > button > wui-text {
|
|
414
|
-
position: absolute;
|
|
415
|
-
left: 18px;
|
|
416
|
-
opacity: 0;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
button[data-active='true'] > wui-icon,
|
|
420
|
-
button[data-active='true'] > wui-text {
|
|
421
|
-
color: var(--wui-color-fg-100);
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
button[data-active='false'] > wui-icon,
|
|
425
|
-
button[data-active='false'] > wui-text {
|
|
426
|
-
color: var(--wui-color-fg-200);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
button[data-active='true']:disabled,
|
|
430
|
-
button[data-active='false']:disabled {
|
|
431
|
-
background-color: transparent;
|
|
432
|
-
opacity: 0.5;
|
|
433
|
-
cursor: not-allowed;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
button[data-active='true']:disabled > wui-text {
|
|
437
|
-
color: var(--wui-color-fg-200);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
button[data-active='false']:disabled > wui-text {
|
|
441
|
-
color: var(--wui-color-fg-300);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
button > wui-icon,
|
|
445
|
-
button > wui-text {
|
|
446
|
-
pointer-events: none;
|
|
447
|
-
transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);
|
|
448
|
-
will-change: color;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
button {
|
|
452
|
-
width: var(--local-tab-width);
|
|
453
|
-
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
454
|
-
will-change: background-color;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
:host([data-type='flex']) > button {
|
|
458
|
-
width: 34px;
|
|
459
|
-
position: relative;
|
|
460
|
-
display: flex;
|
|
461
|
-
justify-content: flex-start;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
button:hover:enabled,
|
|
465
|
-
button:active:enabled {
|
|
466
|
-
background-color: transparent !important;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
button:hover:enabled > wui-icon,
|
|
470
|
-
button:active:enabled > wui-icon {
|
|
471
|
-
transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
|
472
|
-
color: var(--wui-color-fg-125);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
button:hover:enabled > wui-text,
|
|
476
|
-
button:active:enabled > wui-text {
|
|
477
|
-
transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
|
|
478
|
-
color: var(--wui-color-fg-125);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
button {
|
|
482
|
-
border-radius: var(--wui-border-radius-3xl);
|
|
483
|
-
}
|
|
484
|
-
`;var gt=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let tt=class extends _{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`
|
|
485
|
-
--local-tab: ${this.activeTab};
|
|
486
|
-
--local-tab-width: ${this.localTabWidth};
|
|
487
|
-
`,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((t,i)=>{var o;const n=i===this.activeTab;return c`
|
|
488
|
-
<button
|
|
489
|
-
?disabled=${this.disabled}
|
|
490
|
-
@click=${()=>this.onTabClick(i)}
|
|
491
|
-
data-active=${n}
|
|
492
|
-
data-testid="tab-${(o=t.label)==null?void 0:o.toLowerCase()}"
|
|
493
|
-
>
|
|
494
|
-
${this.iconTemplate(t)}
|
|
495
|
-
<wui-text variant="small-600" color="inherit"> ${t.label} </wui-text>
|
|
496
|
-
</button>
|
|
497
|
-
`})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(t){return t.icon?c`<wui-icon size="xs" color="inherit" name=${t.icon}></wui-icon>`:null}onTabClick(t){this.buttons&&this.animateTabs(t,!1),this.activeTab=t,this.onTabChange(t)}animateTabs(t,i){const n=this.buttons[this.activeTab],o=this.buttons[t],e=n==null?void 0:n.querySelector("wui-text"),a=o==null?void 0:o.querySelector("wui-text"),s=o==null?void 0:o.getBoundingClientRect(),l=a==null?void 0:a.getBoundingClientRect();n&&e&&!i&&t!==this.activeTab&&(e.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),n.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),o&&s&&l&&a&&(t!==this.activeTab||i)&&(this.localTabWidth=`${Math.round(s.width+l.width)+6}px`,o.animate([{width:`${s.width+l.width}px`}],{duration:i?0:500,fill:"forwards",easing:"ease"}),a.animate([{opacity:1}],{duration:i?0:125,delay:i?0:200,fill:"forwards",easing:"ease"}))}};tt.styles=[A,M,en];gt([u({type:Array})],tt.prototype,"tabs",void 0);gt([u()],tt.prototype,"onTabChange",void 0);gt([u({type:Array})],tt.prototype,"buttons",void 0);gt([u({type:Boolean})],tt.prototype,"disabled",void 0);gt([u()],tt.prototype,"localTabWidth",void 0);gt([v()],tt.prototype,"activeTab",void 0);gt([v()],tt.prototype,"isDense",void 0);tt=gt([C("wui-tabs")],tt);var Xe=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let oe=class extends _{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(t=>t())}render(){const t=this.generateTabs();return c`
|
|
498
|
-
<wui-flex justifyContent="center" .padding=${["0","0","l","0"]}>
|
|
499
|
-
<wui-tabs .tabs=${t} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>
|
|
500
|
-
</wui-flex>
|
|
501
|
-
`}generateTabs(){const t=this.platforms.map(i=>i==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:i==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:i==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:i==="web"?{label:"Webapp",icon:"browser",platform:"web"}:i==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=t.map(({platform:i})=>i),t}onTabChange(t){var n;const i=this.platformTabs[t];i&&((n=this.onSelectPlatfrom)==null||n.call(this,i))}};Xe([u({type:Array})],oe.prototype,"platforms",void 0);Xe([u()],oe.prototype,"onSelectPlatfrom",void 0);oe=Xe([C("w3m-connecting-header")],oe);const nn=P`
|
|
502
|
-
:host {
|
|
503
|
-
width: var(--local-width);
|
|
504
|
-
position: relative;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
button {
|
|
508
|
-
border: none;
|
|
509
|
-
border-radius: var(--local-border-radius);
|
|
510
|
-
width: var(--local-width);
|
|
511
|
-
white-space: nowrap;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
/* -- Sizes --------------------------------------------------- */
|
|
515
|
-
button[data-size='md'] {
|
|
516
|
-
padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);
|
|
517
|
-
height: 36px;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {
|
|
521
|
-
padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {
|
|
525
|
-
padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
button[data-size='lg'] {
|
|
529
|
-
padding: var(--wui-spacing-m) var(--wui-spacing-2l);
|
|
530
|
-
height: 48px;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
/* -- Variants --------------------------------------------------------- */
|
|
534
|
-
button[data-variant='main'] {
|
|
535
|
-
background-color: var(--wui-color-accent-100);
|
|
536
|
-
color: var(--wui-color-inverse-100);
|
|
537
|
-
border: none;
|
|
538
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
button[data-variant='inverse'] {
|
|
542
|
-
background-color: var(--wui-color-inverse-100);
|
|
543
|
-
color: var(--wui-color-inverse-000);
|
|
544
|
-
border: none;
|
|
545
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
button[data-variant='accent'] {
|
|
549
|
-
background-color: var(--wui-color-accent-glass-010);
|
|
550
|
-
color: var(--wui-color-accent-100);
|
|
551
|
-
border: none;
|
|
552
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
button[data-variant='accent-error'] {
|
|
556
|
-
background: var(--wui-color-error-glass-015);
|
|
557
|
-
color: var(--wui-color-error-100);
|
|
558
|
-
border: none;
|
|
559
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
button[data-variant='accent-success'] {
|
|
563
|
-
background: var(--wui-color-success-glass-015);
|
|
564
|
-
color: var(--wui-color-success-100);
|
|
565
|
-
border: none;
|
|
566
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
button[data-variant='neutral'] {
|
|
570
|
-
background: transparent;
|
|
571
|
-
color: var(--wui-color-fg-100);
|
|
572
|
-
border: none;
|
|
573
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
/* -- Focus states --------------------------------------------------- */
|
|
577
|
-
button[data-variant='main']:focus-visible:enabled {
|
|
578
|
-
background-color: var(--wui-color-accent-090);
|
|
579
|
-
box-shadow:
|
|
580
|
-
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
581
|
-
0 0 0 4px var(--wui-color-accent-glass-020);
|
|
582
|
-
}
|
|
583
|
-
button[data-variant='inverse']:focus-visible:enabled {
|
|
584
|
-
background-color: var(--wui-color-inverse-100);
|
|
585
|
-
box-shadow:
|
|
586
|
-
inset 0 0 0 1px var(--wui-color-gray-glass-010),
|
|
587
|
-
0 0 0 4px var(--wui-color-accent-glass-020);
|
|
588
|
-
}
|
|
589
|
-
button[data-variant='accent']:focus-visible:enabled {
|
|
590
|
-
background-color: var(--wui-color-accent-glass-010);
|
|
591
|
-
box-shadow:
|
|
592
|
-
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
593
|
-
0 0 0 4px var(--wui-color-accent-glass-020);
|
|
594
|
-
}
|
|
595
|
-
button[data-variant='accent-error']:focus-visible:enabled {
|
|
596
|
-
background: var(--wui-color-error-glass-015);
|
|
597
|
-
box-shadow:
|
|
598
|
-
inset 0 0 0 1px var(--wui-color-error-100),
|
|
599
|
-
0 0 0 4px var(--wui-color-error-glass-020);
|
|
600
|
-
}
|
|
601
|
-
button[data-variant='accent-success']:focus-visible:enabled {
|
|
602
|
-
background: var(--wui-color-success-glass-015);
|
|
603
|
-
box-shadow:
|
|
604
|
-
inset 0 0 0 1px var(--wui-color-success-100),
|
|
605
|
-
0 0 0 4px var(--wui-color-success-glass-020);
|
|
606
|
-
}
|
|
607
|
-
button[data-variant='neutral']:focus-visible:enabled {
|
|
608
|
-
background: var(--wui-color-gray-glass-005);
|
|
609
|
-
box-shadow:
|
|
610
|
-
inset 0 0 0 1px var(--wui-color-gray-glass-010),
|
|
611
|
-
0 0 0 4px var(--wui-color-gray-glass-002);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
/* -- Hover & Active states ----------------------------------------------------------- */
|
|
615
|
-
@media (hover: hover) and (pointer: fine) {
|
|
616
|
-
button[data-variant='main']:hover:enabled {
|
|
617
|
-
background-color: var(--wui-color-accent-090);
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
button[data-variant='main']:active:enabled {
|
|
621
|
-
background-color: var(--wui-color-accent-080);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
button[data-variant='accent']:hover:enabled {
|
|
625
|
-
background-color: var(--wui-color-accent-glass-015);
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
button[data-variant='accent']:active:enabled {
|
|
629
|
-
background-color: var(--wui-color-accent-glass-020);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
button[data-variant='accent-error']:hover:enabled {
|
|
633
|
-
background: var(--wui-color-error-glass-020);
|
|
634
|
-
color: var(--wui-color-error-100);
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
button[data-variant='accent-error']:active:enabled {
|
|
638
|
-
background: var(--wui-color-error-glass-030);
|
|
639
|
-
color: var(--wui-color-error-100);
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
button[data-variant='accent-success']:hover:enabled {
|
|
643
|
-
background: var(--wui-color-success-glass-020);
|
|
644
|
-
color: var(--wui-color-success-100);
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
button[data-variant='accent-success']:active:enabled {
|
|
648
|
-
background: var(--wui-color-success-glass-030);
|
|
649
|
-
color: var(--wui-color-success-100);
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
button[data-variant='neutral']:hover:enabled {
|
|
653
|
-
background: var(--wui-color-gray-glass-002);
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
button[data-variant='neutral']:active:enabled {
|
|
657
|
-
background: var(--wui-color-gray-glass-005);
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {
|
|
661
|
-
padding-left: var(--wui-spacing-m);
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {
|
|
665
|
-
padding-right: var(--wui-spacing-m);
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
/* -- Disabled state --------------------------------------------------- */
|
|
670
|
-
button:disabled {
|
|
671
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
672
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
673
|
-
color: var(--wui-color-gray-glass-020);
|
|
674
|
-
cursor: not-allowed;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
button > wui-text {
|
|
678
|
-
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
679
|
-
will-change: opacity;
|
|
680
|
-
opacity: var(--local-opacity-100);
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
::slotted(*) {
|
|
684
|
-
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
685
|
-
will-change: opacity;
|
|
686
|
-
opacity: var(--local-opacity-100);
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
wui-loading-spinner {
|
|
690
|
-
position: absolute;
|
|
691
|
-
left: 50%;
|
|
692
|
-
top: 50%;
|
|
693
|
-
transform: translate(-50%, -50%);
|
|
694
|
-
opacity: var(--local-opacity-000);
|
|
695
|
-
}
|
|
696
|
-
`;var et=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};const ci={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},on={lg:"paragraph-600",md:"small-600"},rn={lg:"md",md:"md"};let q=class extends _{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`
|
|
697
|
-
--local-width: ${this.fullWidth?"100%":"auto"};
|
|
698
|
-
--local-opacity-100: ${this.loading?0:1};
|
|
699
|
-
--local-opacity-000: ${this.loading?1:0};
|
|
700
|
-
--local-border-radius: var(--wui-border-radius-${this.borderRadius});
|
|
701
|
-
`;const t=this.textVariant??on[this.size];return c`
|
|
702
|
-
<button
|
|
703
|
-
data-variant=${this.variant}
|
|
704
|
-
data-icon-left=${this.hasIconLeft}
|
|
705
|
-
data-icon-right=${this.hasIconRight}
|
|
706
|
-
data-size=${this.size}
|
|
707
|
-
?disabled=${this.disabled}
|
|
708
|
-
>
|
|
709
|
-
${this.loadingTemplate()}
|
|
710
|
-
<slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot>
|
|
711
|
-
<wui-text variant=${t} color="inherit">
|
|
712
|
-
<slot></slot>
|
|
713
|
-
</wui-text>
|
|
714
|
-
<slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot>
|
|
715
|
-
</button>
|
|
716
|
-
`}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const t=rn[this.size],i=this.disabled?ci.disabled:ci[this.variant];return c`<wui-loading-spinner color=${i} size=${t}></wui-loading-spinner>`}return c``}};q.styles=[A,M,nn];et([u()],q.prototype,"size",void 0);et([u({type:Boolean})],q.prototype,"disabled",void 0);et([u({type:Boolean})],q.prototype,"fullWidth",void 0);et([u({type:Boolean})],q.prototype,"loading",void 0);et([u()],q.prototype,"variant",void 0);et([u({type:Boolean})],q.prototype,"hasIconLeft",void 0);et([u({type:Boolean})],q.prototype,"hasIconRight",void 0);et([u()],q.prototype,"borderRadius",void 0);et([u()],q.prototype,"textVariant",void 0);q=et([C("wui-button")],q);const an=P`
|
|
717
|
-
button {
|
|
718
|
-
padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
|
|
719
|
-
border-radius: var(--wui-border-radius-3xs);
|
|
720
|
-
background-color: transparent;
|
|
721
|
-
color: var(--wui-color-accent-100);
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
button:disabled {
|
|
725
|
-
background-color: transparent;
|
|
726
|
-
color: var(--wui-color-gray-glass-015);
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
button:hover {
|
|
730
|
-
background-color: var(--wui-color-gray-glass-005);
|
|
731
|
-
}
|
|
732
|
-
`;var ye=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let $t=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.disabled=!1,this.color="inherit"}render(){return c`
|
|
733
|
-
<button ?disabled=${this.disabled} tabindex=${y(this.tabIdx)}>
|
|
734
|
-
<slot name="iconLeft"></slot>
|
|
735
|
-
<wui-text variant="small-600" color=${this.color}>
|
|
736
|
-
<slot></slot>
|
|
737
|
-
</wui-text>
|
|
738
|
-
<slot name="iconRight"></slot>
|
|
739
|
-
</button>
|
|
740
|
-
`}};$t.styles=[A,M,an];ye([u()],$t.prototype,"tabIdx",void 0);ye([u({type:Boolean})],$t.prototype,"disabled",void 0);ye([u()],$t.prototype,"color",void 0);$t=ye([C("wui-link")],$t);const sn=P`
|
|
741
|
-
:host {
|
|
742
|
-
display: block;
|
|
743
|
-
width: var(--wui-box-size-md);
|
|
744
|
-
height: var(--wui-box-size-md);
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
svg {
|
|
748
|
-
width: var(--wui-box-size-md);
|
|
749
|
-
height: var(--wui-box-size-md);
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
rect {
|
|
753
|
-
fill: none;
|
|
754
|
-
stroke: var(--wui-color-accent-100);
|
|
755
|
-
stroke-width: 4px;
|
|
756
|
-
stroke-linecap: round;
|
|
757
|
-
animation: dash 1s linear infinite;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
@keyframes dash {
|
|
761
|
-
to {
|
|
762
|
-
stroke-dashoffset: 0px;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
`;var Ci=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let re=class extends _{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const t=this.radius>50?50:this.radius,n=36-t,o=116+n,e=245+n,a=360+n*1.75;return c`
|
|
766
|
-
<svg viewBox="0 0 110 110" width="110" height="110">
|
|
767
|
-
<rect
|
|
768
|
-
x="2"
|
|
769
|
-
y="2"
|
|
770
|
-
width="106"
|
|
771
|
-
height="106"
|
|
772
|
-
rx=${t}
|
|
773
|
-
stroke-dasharray="${o} ${e}"
|
|
774
|
-
stroke-dashoffset=${a}
|
|
775
|
-
/>
|
|
776
|
-
</svg>
|
|
777
|
-
`}};re.styles=[A,sn];Ci([u({type:Number})],re.prototype,"radius",void 0);re=Ci([C("wui-loading-thumbnail")],re);const ln=P`
|
|
778
|
-
button {
|
|
779
|
-
border: none;
|
|
780
|
-
border-radius: var(--wui-border-radius-3xl);
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
button[data-variant='main'] {
|
|
784
|
-
background-color: var(--wui-color-accent-100);
|
|
785
|
-
color: var(--wui-color-inverse-100);
|
|
786
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
button[data-variant='accent'] {
|
|
790
|
-
background-color: var(--wui-color-accent-glass-010);
|
|
791
|
-
color: var(--wui-color-accent-100);
|
|
792
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
button[data-variant='gray'] {
|
|
796
|
-
background-color: transparent;
|
|
797
|
-
color: var(--wui-color-fg-200);
|
|
798
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
button[data-variant='shade'] {
|
|
802
|
-
background-color: transparent;
|
|
803
|
-
color: var(--wui-color-accent-100);
|
|
804
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
button[data-size='sm'] {
|
|
808
|
-
height: 32px;
|
|
809
|
-
padding: 0 var(--wui-spacing-s);
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
button[data-size='md'] {
|
|
813
|
-
height: 40px;
|
|
814
|
-
padding: 0 var(--wui-spacing-l);
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
button[data-size='sm'] > wui-image {
|
|
818
|
-
width: 16px;
|
|
819
|
-
height: 16px;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
button[data-size='md'] > wui-image {
|
|
823
|
-
width: 24px;
|
|
824
|
-
height: 24px;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
button[data-size='sm'] > wui-icon {
|
|
828
|
-
width: 12px;
|
|
829
|
-
height: 12px;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
button[data-size='md'] > wui-icon {
|
|
833
|
-
width: 14px;
|
|
834
|
-
height: 14px;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
wui-image {
|
|
838
|
-
border-radius: var(--wui-border-radius-3xl);
|
|
839
|
-
overflow: hidden;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
button.disabled > wui-icon,
|
|
843
|
-
button.disabled > wui-image {
|
|
844
|
-
filter: grayscale(1);
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
button[data-variant='main'] > wui-image {
|
|
848
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
button[data-variant='shade'] > wui-image,
|
|
852
|
-
button[data-variant='gray'] > wui-image {
|
|
853
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
@media (hover: hover) and (pointer: fine) {
|
|
857
|
-
button[data-variant='main']:focus-visible {
|
|
858
|
-
background-color: var(--wui-color-accent-090);
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
button[data-variant='main']:hover:enabled {
|
|
862
|
-
background-color: var(--wui-color-accent-090);
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
button[data-variant='main']:active:enabled {
|
|
866
|
-
background-color: var(--wui-color-accent-080);
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
button[data-variant='accent']:hover:enabled {
|
|
870
|
-
background-color: var(--wui-color-accent-glass-015);
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
button[data-variant='accent']:active:enabled {
|
|
874
|
-
background-color: var(--wui-color-accent-glass-020);
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
button[data-variant='shade']:focus-visible,
|
|
878
|
-
button[data-variant='gray']:focus-visible,
|
|
879
|
-
button[data-variant='shade']:hover,
|
|
880
|
-
button[data-variant='gray']:hover {
|
|
881
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
button[data-variant='gray']:active,
|
|
885
|
-
button[data-variant='shade']:active {
|
|
886
|
-
background-color: var(--wui-color-gray-glass-005);
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
button.disabled {
|
|
891
|
-
color: var(--wui-color-gray-glass-020);
|
|
892
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
893
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
894
|
-
pointer-events: none;
|
|
895
|
-
}
|
|
896
|
-
`;var Ct=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ct=class extends _{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const t=this.size==="sm"?"small-600":"paragraph-600";return c`
|
|
897
|
-
<button
|
|
898
|
-
class=${this.disabled?"disabled":""}
|
|
899
|
-
data-variant=${this.variant}
|
|
900
|
-
data-size=${this.size}
|
|
901
|
-
>
|
|
902
|
-
${this.imageSrc?c`<wui-image src=${this.imageSrc}></wui-image>`:null}
|
|
903
|
-
<wui-text variant=${t} color="inherit"> ${this.text} </wui-text>
|
|
904
|
-
<wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
|
|
905
|
-
</button>
|
|
906
|
-
`}};ct.styles=[A,M,ln];Ct([u()],ct.prototype,"variant",void 0);Ct([u()],ct.prototype,"imageSrc",void 0);Ct([u({type:Boolean})],ct.prototype,"disabled",void 0);Ct([u()],ct.prototype,"icon",void 0);Ct([u()],ct.prototype,"size",void 0);Ct([u()],ct.prototype,"text",void 0);ct=Ct([C("wui-chip-button")],ct);const cn=P`
|
|
907
|
-
wui-flex {
|
|
908
|
-
width: 100%;
|
|
909
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
910
|
-
border-radius: var(--wui-border-radius-xs);
|
|
911
|
-
}
|
|
912
|
-
`;var xe=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Tt=class extends _{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return c`
|
|
913
|
-
<wui-flex
|
|
914
|
-
justifyContent="space-between"
|
|
915
|
-
alignItems="center"
|
|
916
|
-
.padding=${["1xs","2l","1xs","2l"]}
|
|
917
|
-
>
|
|
918
|
-
<wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text>
|
|
919
|
-
<wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight">
|
|
920
|
-
</wui-chip-button>
|
|
921
|
-
</wui-flex>
|
|
922
|
-
`}};Tt.styles=[A,M,cn];xe([u({type:Boolean})],Tt.prototype,"disabled",void 0);xe([u()],Tt.prototype,"label",void 0);xe([u()],Tt.prototype,"buttonLabel",void 0);Tt=xe([C("wui-cta-button")],Tt);const un=P`
|
|
923
|
-
:host {
|
|
924
|
-
display: block;
|
|
925
|
-
padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);
|
|
926
|
-
}
|
|
927
|
-
`;var $i=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ae=class extends _{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:t,app_store:i,play_store:n,chrome_store:o,homepage:e}=this.wallet,a=I.isMobile(),s=I.isIos(),l=I.isAndroid(),h=[i,n,e,o].filter(Boolean).length>1,d=st.getTruncateString({string:t,charsStart:12,charsEnd:0,truncate:"end"});return h&&!a?c`
|
|
928
|
-
<wui-cta-button
|
|
929
|
-
label=${`Don't have ${d}?`}
|
|
930
|
-
buttonLabel="Get"
|
|
931
|
-
@click=${()=>O.push("Downloads",{wallet:this.wallet})}
|
|
932
|
-
></wui-cta-button>
|
|
933
|
-
`:!h&&e?c`
|
|
934
|
-
<wui-cta-button
|
|
935
|
-
label=${`Don't have ${d}?`}
|
|
936
|
-
buttonLabel="Get"
|
|
937
|
-
@click=${this.onHomePage.bind(this)}
|
|
938
|
-
></wui-cta-button>
|
|
939
|
-
`:i&&s?c`
|
|
940
|
-
<wui-cta-button
|
|
941
|
-
label=${`Don't have ${d}?`}
|
|
942
|
-
buttonLabel="Get"
|
|
943
|
-
@click=${this.onAppStore.bind(this)}
|
|
944
|
-
></wui-cta-button>
|
|
945
|
-
`:n&&l?c`
|
|
946
|
-
<wui-cta-button
|
|
947
|
-
label=${`Don't have ${d}?`}
|
|
948
|
-
buttonLabel="Get"
|
|
949
|
-
@click=${this.onPlayStore.bind(this)}
|
|
950
|
-
></wui-cta-button>
|
|
951
|
-
`:(this.style.display="none",null)}onAppStore(){var t;(t=this.wallet)!=null&&t.app_store&&I.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var t;(t=this.wallet)!=null&&t.play_store&&I.openHref(this.wallet.play_store,"_blank")}onHomePage(){var t;(t=this.wallet)!=null&&t.homepage&&I.openHref(this.wallet.homepage,"_blank")}};ae.styles=[un];$i([u({type:Object})],ae.prototype,"wallet",void 0);ae=$i([C("w3m-mobile-download-links")],ae);const dn=P`
|
|
952
|
-
@keyframes shake {
|
|
953
|
-
0% {
|
|
954
|
-
transform: translateX(0);
|
|
955
|
-
}
|
|
956
|
-
25% {
|
|
957
|
-
transform: translateX(3px);
|
|
958
|
-
}
|
|
959
|
-
50% {
|
|
960
|
-
transform: translateX(-3px);
|
|
961
|
-
}
|
|
962
|
-
75% {
|
|
963
|
-
transform: translateX(3px);
|
|
964
|
-
}
|
|
965
|
-
100% {
|
|
966
|
-
transform: translateX(0);
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
wui-flex:first-child:not(:only-child) {
|
|
971
|
-
position: relative;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
wui-loading-thumbnail {
|
|
975
|
-
position: absolute;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
wui-icon-box {
|
|
979
|
-
position: absolute;
|
|
980
|
-
right: calc(var(--wui-spacing-3xs) * -1);
|
|
981
|
-
bottom: calc(var(--wui-spacing-3xs) * -1);
|
|
982
|
-
opacity: 0;
|
|
983
|
-
transform: scale(0.5);
|
|
984
|
-
transition-property: opacity, transform;
|
|
985
|
-
transition-duration: var(--wui-duration-lg);
|
|
986
|
-
transition-timing-function: var(--wui-ease-out-power-2);
|
|
987
|
-
will-change: opacity, transform;
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
wui-text[align='center'] {
|
|
991
|
-
width: 100%;
|
|
992
|
-
padding: 0px var(--wui-spacing-l);
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
[data-error='true'] wui-icon-box {
|
|
996
|
-
opacity: 1;
|
|
997
|
-
transform: scale(1);
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
[data-error='true'] > wui-flex:first-child {
|
|
1001
|
-
animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
[data-retry='false'] wui-link {
|
|
1005
|
-
display: none;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
[data-retry='true'] wui-link {
|
|
1009
|
-
display: block;
|
|
1010
|
-
opacity: 1;
|
|
1011
|
-
}
|
|
1012
|
-
`;var it=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};class z extends _{constructor(){var t,i,n,o,e;super(),this.wallet=(t=O.state.data)==null?void 0:t.wallet,this.connector=(i=O.state.data)==null?void 0:i.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=D.getWalletImage(this.wallet)??D.getConnectorImage(this.connector),this.name=((n=this.wallet)==null?void 0:n.name)??((o=this.connector)==null?void 0:o.name)??"Wallet",this.isRetrying=!1,this.uri=W.state.wcUri,this.error=W.state.wcError,this.ready=!1,this.showRetry=!1,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(W.subscribeKey("wcUri",a=>{var s;this.uri=a,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,(s=this.onConnect)==null||s.call(this))}),W.subscribeKey("wcError",a=>this.error=a)),(I.isTelegram()||I.isSafari())&&I.isIos()&&W.state.wcUri&&((e=this.onConnect)==null||e.call(this))}firstUpdated(){var t;(t=this.onAutoConnect)==null||t.call(this),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(t=>t()),W.setWcError(!1),clearTimeout(this.timeout)}render(){var n;(n=this.onRender)==null||n.call(this),this.onShowRetry();const t=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let i=`Continue in ${this.name}`;return this.error&&(i="Connection declined"),c`
|
|
1013
|
-
<wui-flex
|
|
1014
|
-
data-error=${y(this.error)}
|
|
1015
|
-
data-retry=${this.showRetry}
|
|
1016
|
-
flexDirection="column"
|
|
1017
|
-
alignItems="center"
|
|
1018
|
-
.padding=${["3xl","xl","xl","xl"]}
|
|
1019
|
-
gap="xl"
|
|
1020
|
-
>
|
|
1021
|
-
<wui-flex justifyContent="center" alignItems="center">
|
|
1022
|
-
<wui-wallet-image size="lg" imageSrc=${y(this.imageSrc)}></wui-wallet-image>
|
|
1023
|
-
|
|
1024
|
-
${this.error?null:this.loaderTemplate()}
|
|
1025
|
-
|
|
1026
|
-
<wui-icon-box
|
|
1027
|
-
backgroundColor="error-100"
|
|
1028
|
-
background="opaque"
|
|
1029
|
-
iconColor="error-100"
|
|
1030
|
-
icon="close"
|
|
1031
|
-
size="sm"
|
|
1032
|
-
border
|
|
1033
|
-
borderColor="wui-color-bg-125"
|
|
1034
|
-
></wui-icon-box>
|
|
1035
|
-
</wui-flex>
|
|
1036
|
-
|
|
1037
|
-
<wui-flex flexDirection="column" alignItems="center" gap="xs">
|
|
1038
|
-
<wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
|
|
1039
|
-
${i}
|
|
1040
|
-
</wui-text>
|
|
1041
|
-
<wui-text align="center" variant="small-500" color="fg-200">${t}</wui-text>
|
|
1042
|
-
</wui-flex>
|
|
1043
|
-
|
|
1044
|
-
${this.secondaryBtnLabel?c`
|
|
1045
|
-
<wui-button
|
|
1046
|
-
variant="accent"
|
|
1047
|
-
size="md"
|
|
1048
|
-
?disabled=${this.isRetrying||this.isLoading}
|
|
1049
|
-
@click=${this.onTryAgain.bind(this)}
|
|
1050
|
-
data-testid="w3m-connecting-widget-secondary-button"
|
|
1051
|
-
>
|
|
1052
|
-
<wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon>
|
|
1053
|
-
${this.secondaryBtnLabel}
|
|
1054
|
-
</wui-button>
|
|
1055
|
-
`:null}
|
|
1056
|
-
</wui-flex>
|
|
1057
|
-
|
|
1058
|
-
${this.isWalletConnect?c`
|
|
1059
|
-
<wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
|
|
1060
|
-
<wui-link @click=${this.onCopyUri} color="fg-200" data-testid="wui-link-copy">
|
|
1061
|
-
<wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
|
|
1062
|
-
Copy link
|
|
1063
|
-
</wui-link>
|
|
1064
|
-
</wui-flex>
|
|
1065
|
-
`:null}
|
|
1066
|
-
|
|
1067
|
-
<w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
|
|
1068
|
-
`}onShowRetry(){var t;if(this.error&&!this.showRetry){this.showRetry=!0;const i=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-button");i==null||i.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){var t,i;W.setWcError(!1),this.onRetry?(this.isRetrying=!0,(t=this.onRetry)==null||t.call(this)):(i=this.onConnect)==null||i.call(this)}loaderTemplate(){const t=ke.state.themeVariables["--w3m-border-radius-master"],i=t?parseInt(t.replace("px",""),10):4;return c`<wui-loading-thumbnail radius=${i*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(I.copyToClopboard(this.uri),Qt.showSuccess("Link copied"))}catch{Qt.showError("Failed to copy")}}}z.styles=dn;it([v()],z.prototype,"isRetrying",void 0);it([v()],z.prototype,"uri",void 0);it([v()],z.prototype,"error",void 0);it([v()],z.prototype,"ready",void 0);it([v()],z.prototype,"showRetry",void 0);it([v()],z.prototype,"secondaryBtnLabel",void 0);it([v()],z.prototype,"secondaryLabel",void 0);it([v()],z.prototype,"isLoading",void 0);it([u({type:Boolean})],z.prototype,"isMobile",void 0);it([u()],z.prototype,"onRetry",void 0);var hn=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ui=class extends z{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){var t;try{this.error=!1;const{connectors:i}=L.state,n=i.find(o=>{var e,a,s;return o.type==="ANNOUNCED"&&((e=o.info)==null?void 0:e.rdns)===((a=this.wallet)==null?void 0:a.rdns)||o.type==="INJECTED"||o.name===((s=this.wallet)==null?void 0:s.name)});if(n)await W.connectExternal(n,n.chain);else throw new Error("w3m-connecting-wc-browser: No connector found");vi.close(),J.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:((t=this.wallet)==null?void 0:t.name)||"Unknown"}})}catch(i){J.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(i==null?void 0:i.message)??"Unknown"}}),this.error=!0}}};ui=hn([C("w3m-connecting-wc-browser")],ui);var pn=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let di=class extends z{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){var t;!this.ready&&this.uri&&(this.ready=!0,(t=this.onConnect)==null||t.call(this))}onConnectProxy(){var t;if((t=this.wallet)!=null&&t.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:i,name:n}=this.wallet,{redirect:o,href:e}=I.formatNativeUrl(i,this.uri);W.setWcLinking({name:n,href:e}),W.setRecentWallet(this.wallet),I.openHref(o,"_blank")}catch{this.error=!0}}};di=pn([C("w3m-connecting-wc-desktop")],di);var Lt=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let mt=class extends z{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=Y.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{var t;if((t=this.wallet)!=null&&t.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:i,link_mode:n,name:o}=this.wallet,{redirect:e,redirectUniversalLink:a,href:s}=I.formatNativeUrl(i,this.uri,n);this.redirectDeeplink=e,this.redirectUniversalLink=a,this.target=I.isIframe()?"_top":"_self",W.setWcLinking({name:o,href:s}),W.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?I.openHref(this.redirectUniversalLink,this.target):I.openHref(this.redirectDeeplink,this.target)}catch(i){J.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:i instanceof Error?i.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=yi.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(W.subscribeKey("wcUri",()=>{this.onHandleURI()})),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){var t;this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,(t=this.onConnect)==null||t.call(this))}onTryAgain(){var t;W.setWcError(!1),(t=this.onConnect)==null||t.call(this)}};Lt([v()],mt.prototype,"redirectDeeplink",void 0);Lt([v()],mt.prototype,"redirectUniversalLink",void 0);Lt([v()],mt.prototype,"target",void 0);Lt([v()],mt.prototype,"preferUniversalLinks",void 0);Lt([v()],mt.prototype,"isLoading",void 0);mt=Lt([C("w3m-connecting-wc-mobile")],mt);var Vt={},gn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Ti={},V={};let Ze;const fn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];V.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};V.getSymbolTotalCodewords=function(t){return fn[t]};V.getBCHDigit=function(r){let t=0;for(;r!==0;)t++,r>>>=1;return t};V.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Ze=t};V.isKanjiModeEnabled=function(){return typeof Ze<"u"};V.toSJIS=function(t){return Ze(t)};var Ce={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function t(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,o){if(r.isValid(n))return n;try{return t(n)}catch{return o}}})(Ce);function Ri(){this.buffer=[],this.length=0}Ri.prototype={get:function(r){const t=Math.floor(r/8);return(this.buffer[t]>>>7-r%8&1)===1},put:function(r,t){for(let i=0;i<t;i++)this.putBit((r>>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),r&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var wn=Ri;function qt(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}qt.prototype.set=function(r,t,i,n){const o=r*this.size+t;this.data[o]=i,n&&(this.reservedBit[o]=!0)};qt.prototype.get=function(r,t){return this.data[r*this.size+t]};qt.prototype.xor=function(r,t,i){this.data[r*this.size+t]^=i};qt.prototype.isReserved=function(r,t){return this.reservedBit[r*this.size+t]};var bn=qt,_i={};(function(r){const t=V.getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const o=Math.floor(n/7)+2,e=t(n),a=e===145?26:Math.ceil((e-13)/(2*o-2))*2,s=[e-7];for(let l=1;l<o-1;l++)s[l]=s[l-1]-a;return s.push(6),s.reverse()},r.getPositions=function(n){const o=[],e=r.getRowColCoords(n),a=e.length;for(let s=0;s<a;s++)for(let l=0;l<a;l++)s===0&&l===0||s===0&&l===a-1||s===a-1&&l===0||o.push([e[s],e[l]]);return o}})(_i);var Ii={};const mn=V.getSymbolSize,hi=7;Ii.getPositions=function(t){const i=mn(t);return[[0,0],[i-hi,0],[0,i-hi]]};var Ei={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};r.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},r.from=function(o){return r.isValid(o)?parseInt(o,10):void 0},r.getPenaltyN1=function(o){const e=o.size;let a=0,s=0,l=0,h=null,d=null;for(let R=0;R<e;R++){s=l=0,h=d=null;for(let x=0;x<e;x++){let m=o.get(R,x);m===h?s++:(s>=5&&(a+=t.N1+(s-5)),h=m,s=1),m=o.get(x,R),m===d?l++:(l>=5&&(a+=t.N1+(l-5)),d=m,l=1)}s>=5&&(a+=t.N1+(s-5)),l>=5&&(a+=t.N1+(l-5))}return a},r.getPenaltyN2=function(o){const e=o.size;let a=0;for(let s=0;s<e-1;s++)for(let l=0;l<e-1;l++){const h=o.get(s,l)+o.get(s,l+1)+o.get(s+1,l)+o.get(s+1,l+1);(h===4||h===0)&&a++}return a*t.N2},r.getPenaltyN3=function(o){const e=o.size;let a=0,s=0,l=0;for(let h=0;h<e;h++){s=l=0;for(let d=0;d<e;d++)s=s<<1&2047|o.get(h,d),d>=10&&(s===1488||s===93)&&a++,l=l<<1&2047|o.get(d,h),d>=10&&(l===1488||l===93)&&a++}return a*t.N3},r.getPenaltyN4=function(o){let e=0;const a=o.data.length;for(let l=0;l<a;l++)e+=o.data[l];return Math.abs(Math.ceil(e*100/a/5)-10)*t.N4};function i(n,o,e){switch(n){case r.Patterns.PATTERN000:return(o+e)%2===0;case r.Patterns.PATTERN001:return o%2===0;case r.Patterns.PATTERN010:return e%3===0;case r.Patterns.PATTERN011:return(o+e)%3===0;case r.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(e/3))%2===0;case r.Patterns.PATTERN101:return o*e%2+o*e%3===0;case r.Patterns.PATTERN110:return(o*e%2+o*e%3)%2===0;case r.Patterns.PATTERN111:return(o*e%3+(o+e)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}r.applyMask=function(o,e){const a=e.size;for(let s=0;s<a;s++)for(let l=0;l<a;l++)e.isReserved(l,s)||e.xor(l,s,i(o,l,s))},r.getBestMask=function(o,e){const a=Object.keys(r.Patterns).length;let s=0,l=1/0;for(let h=0;h<a;h++){e(h),r.applyMask(h,o);const d=r.getPenaltyN1(o)+r.getPenaltyN2(o)+r.getPenaltyN3(o)+r.getPenaltyN4(o);r.applyMask(h,o),d<l&&(l=d,s=h)}return s}})(Ei);var $e={};const ht=Ce,Yt=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Jt=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];$e.getBlocksCount=function(t,i){switch(i){case ht.L:return Yt[(t-1)*4+0];case ht.M:return Yt[(t-1)*4+1];case ht.Q:return Yt[(t-1)*4+2];case ht.H:return Yt[(t-1)*4+3];default:return}};$e.getTotalCodewordsCount=function(t,i){switch(i){case ht.L:return Jt[(t-1)*4+0];case ht.M:return Jt[(t-1)*4+1];case ht.Q:return Jt[(t-1)*4+2];case ht.H:return Jt[(t-1)*4+3];default:return}};var Wi={},Te={};const jt=new Uint8Array(512),se=new Uint8Array(256);(function(){let t=1;for(let i=0;i<255;i++)jt[i]=t,se[t]=i,t<<=1,t&256&&(t^=285);for(let i=255;i<512;i++)jt[i]=jt[i-255]})();Te.log=function(t){if(t<1)throw new Error("log("+t+")");return se[t]};Te.exp=function(t){return jt[t]};Te.mul=function(t,i){return t===0||i===0?0:jt[se[t]+se[i]]};(function(r){const t=Te;r.mul=function(n,o){const e=new Uint8Array(n.length+o.length-1);for(let a=0;a<n.length;a++)for(let s=0;s<o.length;s++)e[a+s]^=t.mul(n[a],o[s]);return e},r.mod=function(n,o){let e=new Uint8Array(n);for(;e.length-o.length>=0;){const a=e[0];for(let l=0;l<o.length;l++)e[l]^=t.mul(o[l],a);let s=0;for(;s<e.length&&e[s]===0;)s++;e=e.slice(s)}return e},r.generateECPolynomial=function(n){let o=new Uint8Array([1]);for(let e=0;e<n;e++)o=r.mul(o,new Uint8Array([1,t.exp(e)]));return o}})(Wi);const Si=Wi;function ti(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}ti.prototype.initialize=function(t){this.degree=t,this.genPoly=Si.generateECPolynomial(this.degree)};ti.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(t.length+this.degree);i.set(t);const n=Si.mod(i,this.genPoly),o=this.degree-n.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(n,o),e}return n};var vn=ti,Pi={},ft={},ei={};ei.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var nt={};const Li="[0-9]+",yn="[A-Z $%*+\\-./:]+";let Ut="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ut=Ut.replace(/u/g,"\\u");const xn="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ut+`)(?:.|[\r
|
|
1069
|
-
]))+`;nt.KANJI=new RegExp(Ut,"g");nt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");nt.BYTE=new RegExp(xn,"g");nt.NUMERIC=new RegExp(Li,"g");nt.ALPHANUMERIC=new RegExp(yn,"g");const Cn=new RegExp("^"+Ut+"$"),$n=new RegExp("^"+Li+"$"),Tn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");nt.testKanji=function(t){return Cn.test(t)};nt.testNumeric=function(t){return $n.test(t)};nt.testAlphanumeric=function(t){return Tn.test(t)};(function(r){const t=ei,i=nt;r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(e,a){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?e.ccBits[0]:a<27?e.ccBits[1]:e.ccBits[2]},r.getBestModeForData=function(e){return i.testNumeric(e)?r.NUMERIC:i.testAlphanumeric(e)?r.ALPHANUMERIC:i.testKanji(e)?r.KANJI:r.BYTE},r.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},r.isValid=function(e){return e&&e.bit&&e.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+o)}}r.from=function(e,a){if(r.isValid(e))return e;try{return n(e)}catch{return a}}})(ft);(function(r){const t=V,i=$e,n=Ce,o=ft,e=ei,a=7973,s=t.getBCHDigit(a);function l(x,m,$){for(let b=1;b<=40;b++)if(m<=r.getCapacity(b,$,x))return b}function h(x,m){return o.getCharCountIndicator(x,m)+4}function d(x,m){let $=0;return x.forEach(function(b){const T=h(b.mode,m);$+=T+b.getBitsLength()}),$}function R(x,m){for(let $=1;$<=40;$++)if(d(x,$)<=r.getCapacity($,m,o.MIXED))return $}r.from=function(m,$){return e.isValid(m)?parseInt(m,10):$},r.getCapacity=function(m,$,b){if(!e.isValid(m))throw new Error("Invalid QR Code version");typeof b>"u"&&(b=o.BYTE);const T=t.getSymbolTotalCodewords(m),f=i.getTotalCodewordsCount(m,$),g=(T-f)*8;if(b===o.MIXED)return g;const w=g-h(b,m);switch(b){case o.NUMERIC:return Math.floor(w/10*3);case o.ALPHANUMERIC:return Math.floor(w/11*2);case o.KANJI:return Math.floor(w/13);case o.BYTE:default:return Math.floor(w/8)}},r.getBestVersionForData=function(m,$){let b;const T=n.from($,n.M);if(Array.isArray(m)){if(m.length>1)return R(m,T);if(m.length===0)return 1;b=m[0]}else b=m;return l(b.mode,b.getLength(),T)},r.getEncodedBits=function(m){if(!e.isValid(m)||m<7)throw new Error("Invalid QR Code version");let $=m<<12;for(;t.getBCHDigit($)-s>=0;)$^=a<<t.getBCHDigit($)-s;return m<<12|$}})(Pi);var Bi={};const ze=V,Oi=1335,Rn=21522,pi=ze.getBCHDigit(Oi);Bi.getEncodedBits=function(t,i){const n=t.bit<<3|i;let o=n<<10;for(;ze.getBCHDigit(o)-pi>=0;)o^=Oi<<ze.getBCHDigit(o)-pi;return(n<<10|o)^Rn};var Ai={};const _n=ft;function Rt(r){this.mode=_n.NUMERIC,this.data=r.toString()}Rt.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Rt.prototype.getLength=function(){return this.data.length};Rt.prototype.getBitsLength=function(){return Rt.getBitsLength(this.data.length)};Rt.prototype.write=function(t){let i,n,o;for(i=0;i+3<=this.data.length;i+=3)n=this.data.substr(i,3),o=parseInt(n,10),t.put(o,10);const e=this.data.length-i;e>0&&(n=this.data.substr(i),o=parseInt(n,10),t.put(o,e*3+1))};var In=Rt;const En=ft,We=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function _t(r){this.mode=En.ALPHANUMERIC,this.data=r}_t.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};_t.prototype.getLength=function(){return this.data.length};_t.prototype.getBitsLength=function(){return _t.getBitsLength(this.data.length)};_t.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let n=We.indexOf(this.data[i])*45;n+=We.indexOf(this.data[i+1]),t.put(n,11)}this.data.length%2&&t.put(We.indexOf(this.data[i]),6)};var Wn=_t,Sn=function(t){for(var i=[],n=t.length,o=0;o<n;o++){var e=t.charCodeAt(o);if(e>=55296&&e<=56319&&n>o+1){var a=t.charCodeAt(o+1);a>=56320&&a<=57343&&(e=(e-55296)*1024+a-56320+65536,o+=1)}if(e<128){i.push(e);continue}if(e<2048){i.push(e>>6|192),i.push(e&63|128);continue}if(e<55296||e>=57344&&e<65536){i.push(e>>12|224),i.push(e>>6&63|128),i.push(e&63|128);continue}if(e>=65536&&e<=1114111){i.push(e>>18|240),i.push(e>>12&63|128),i.push(e>>6&63|128),i.push(e&63|128);continue}i.push(239,191,189)}return new Uint8Array(i).buffer};const Pn=Sn,Ln=ft;function It(r){this.mode=Ln.BYTE,typeof r=="string"&&(r=Pn(r)),this.data=new Uint8Array(r)}It.getBitsLength=function(t){return t*8};It.prototype.getLength=function(){return this.data.length};It.prototype.getBitsLength=function(){return It.getBitsLength(this.data.length)};It.prototype.write=function(r){for(let t=0,i=this.data.length;t<i;t++)r.put(this.data[t],8)};var Bn=It;const On=ft,An=V;function Et(r){this.mode=On.KANJI,this.data=r}Et.getBitsLength=function(t){return t*13};Et.prototype.getLength=function(){return this.data.length};Et.prototype.getBitsLength=function(){return Et.getBitsLength(this.data.length)};Et.prototype.write=function(r){let t;for(t=0;t<this.data.length;t++){let i=An.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
1070
|
-
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),r.put(i,13)}};var jn=Et,ji={exports:{}};(function(r){var t={single_source_shortest_paths:function(i,n,o){var e={},a={};a[n]=0;var s=t.PriorityQueue.make();s.push(n,0);for(var l,h,d,R,x,m,$,b,T;!s.empty();){l=s.pop(),h=l.value,R=l.cost,x=i[h]||{};for(d in x)x.hasOwnProperty(d)&&(m=x[d],$=R+m,b=a[d],T=typeof a[d]>"u",(T||b>$)&&(a[d]=$,s.push(d,$),e[d]=h))}if(typeof o<"u"&&typeof a[o]>"u"){var f=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(f)}return e},extract_shortest_path_from_predecessor_list:function(i,n){for(var o=[],e=n;e;)o.push(e),i[e],e=i[e];return o.reverse(),o},find_path:function(i,n,o){var e=t.single_source_shortest_paths(i,n,o);return t.extract_shortest_path_from_predecessor_list(e,o)},PriorityQueue:{make:function(i){var n=t.PriorityQueue,o={},e;i=i||{};for(e in n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o.queue=[],o.sorter=i.sorter||n.default_sorter,o},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var o={value:i,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=t})(ji);var kn=ji.exports;(function(r){const t=ft,i=In,n=Wn,o=Bn,e=jn,a=nt,s=V,l=kn;function h(f){return unescape(encodeURIComponent(f)).length}function d(f,g,w){const p=[];let E;for(;(E=f.exec(w))!==null;)p.push({data:E[0],index:E.index,mode:g,length:E[0].length});return p}function R(f){const g=d(a.NUMERIC,t.NUMERIC,f),w=d(a.ALPHANUMERIC,t.ALPHANUMERIC,f);let p,E;return s.isKanjiModeEnabled()?(p=d(a.BYTE,t.BYTE,f),E=d(a.KANJI,t.KANJI,f)):(p=d(a.BYTE_KANJI,t.BYTE,f),E=[]),g.concat(w,p,E).sort(function(j,G){return j.index-G.index}).map(function(j){return{data:j.data,mode:j.mode,length:j.length}})}function x(f,g){switch(g){case t.NUMERIC:return i.getBitsLength(f);case t.ALPHANUMERIC:return n.getBitsLength(f);case t.KANJI:return e.getBitsLength(f);case t.BYTE:return o.getBitsLength(f)}}function m(f){return f.reduce(function(g,w){const p=g.length-1>=0?g[g.length-1]:null;return p&&p.mode===w.mode?(g[g.length-1].data+=w.data,g):(g.push(w),g)},[])}function $(f){const g=[];for(let w=0;w<f.length;w++){const p=f[w];switch(p.mode){case t.NUMERIC:g.push([p,{data:p.data,mode:t.ALPHANUMERIC,length:p.length},{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.ALPHANUMERIC:g.push([p,{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.KANJI:g.push([p,{data:p.data,mode:t.BYTE,length:h(p.data)}]);break;case t.BYTE:g.push([{data:p.data,mode:t.BYTE,length:h(p.data)}])}}return g}function b(f,g){const w={},p={start:{}};let E=["start"];for(let B=0;B<f.length;B++){const j=f[B],G=[];for(let dt=0;dt<j.length;dt++){const Z=j[dt],Ot=""+B+dt;G.push(Ot),w[Ot]={node:Z,lastCount:0},p[Ot]={};for(let Ie=0;Ie<E.length;Ie++){const rt=E[Ie];w[rt]&&w[rt].node.mode===Z.mode?(p[rt][Ot]=x(w[rt].lastCount+Z.length,Z.mode)-x(w[rt].lastCount,Z.mode),w[rt].lastCount+=Z.length):(w[rt]&&(w[rt].lastCount=Z.length),p[rt][Ot]=x(Z.length,Z.mode)+4+t.getCharCountIndicator(Z.mode,g))}}E=G}for(let B=0;B<E.length;B++)p[E[B]].end=0;return{map:p,table:w}}function T(f,g){let w;const p=t.getBestModeForData(f);if(w=t.from(g,p),w!==t.BYTE&&w.bit<p.bit)throw new Error('"'+f+'" cannot be encoded with mode '+t.toString(w)+`.
|
|
1071
|
-
Suggested mode is: `+t.toString(p));switch(w===t.KANJI&&!s.isKanjiModeEnabled()&&(w=t.BYTE),w){case t.NUMERIC:return new i(f);case t.ALPHANUMERIC:return new n(f);case t.KANJI:return new e(f);case t.BYTE:return new o(f)}}r.fromArray=function(g){return g.reduce(function(w,p){return typeof p=="string"?w.push(T(p,null)):p.data&&w.push(T(p.data,p.mode)),w},[])},r.fromString=function(g,w){const p=R(g,s.isKanjiModeEnabled()),E=$(p),B=b(E,w),j=l.find_path(B.map,"start","end"),G=[];for(let dt=1;dt<j.length-1;dt++)G.push(B.table[j[dt]].node);return r.fromArray(m(G))},r.rawSplit=function(g){return r.fromArray(R(g,s.isKanjiModeEnabled()))}})(Ai);const Re=V,Se=Ce,zn=wn,Dn=bn,Nn=_i,Mn=Ii,De=Ei,Ne=$e,Un=vn,le=Pi,Fn=Bi,Vn=ft,Pe=Ai;function qn(r,t){const i=r.size,n=Mn.getPositions(t);for(let o=0;o<n.length;o++){const e=n[o][0],a=n[o][1];for(let s=-1;s<=7;s++)if(!(e+s<=-1||i<=e+s))for(let l=-1;l<=7;l++)a+l<=-1||i<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?r.set(e+s,a+l,!0,!0):r.set(e+s,a+l,!1,!0))}}function Hn(r){const t=r.size;for(let i=8;i<t-8;i++){const n=i%2===0;r.set(i,6,n,!0),r.set(6,i,n,!0)}}function Kn(r,t){const i=Nn.getPositions(t);for(let n=0;n<i.length;n++){const o=i[n][0],e=i[n][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?r.set(o+a,e+s,!0,!0):r.set(o+a,e+s,!1,!0)}}function Gn(r,t){const i=r.size,n=le.getEncodedBits(t);let o,e,a;for(let s=0;s<18;s++)o=Math.floor(s/3),e=s%3+i-8-3,a=(n>>s&1)===1,r.set(o,e,a,!0),r.set(e,o,a,!0)}function Le(r,t,i){const n=r.size,o=Fn.getEncodedBits(t,i);let e,a;for(e=0;e<15;e++)a=(o>>e&1)===1,e<6?r.set(e,8,a,!0):e<8?r.set(e+1,8,a,!0):r.set(n-15+e,8,a,!0),e<8?r.set(8,n-e-1,a,!0):e<9?r.set(8,15-e-1+1,a,!0):r.set(8,15-e-1,a,!0);r.set(n-8,8,1,!0)}function Yn(r,t){const i=r.size;let n=-1,o=i-1,e=7,a=0;for(let s=i-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!r.isReserved(o,s-l)){let h=!1;a<t.length&&(h=(t[a]>>>e&1)===1),r.set(o,s-l,h),e--,e===-1&&(a++,e=7)}if(o+=n,o<0||i<=o){o-=n,n=-n;break}}}function Jn(r,t,i){const n=new zn;i.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),Vn.getCharCountIndicator(l.mode,r)),l.write(n)});const o=Re.getSymbolTotalCodewords(r),e=Ne.getTotalCodewordsCount(r,t),a=(o-e)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const s=(a-n.getLengthInBits())/8;for(let l=0;l<s;l++)n.put(l%2?17:236,8);return Qn(n,r,t)}function Qn(r,t,i){const n=Re.getSymbolTotalCodewords(t),o=Ne.getTotalCodewordsCount(t,i),e=n-o,a=Ne.getBlocksCount(t,i),s=n%a,l=a-s,h=Math.floor(n/a),d=Math.floor(e/a),R=d+1,x=h-d,m=new Un(x);let $=0;const b=new Array(a),T=new Array(a);let f=0;const g=new Uint8Array(r.buffer);for(let j=0;j<a;j++){const G=j<l?d:R;b[j]=g.slice($,$+G),T[j]=m.encode(b[j]),$+=G,f=Math.max(f,G)}const w=new Uint8Array(n);let p=0,E,B;for(E=0;E<f;E++)for(B=0;B<a;B++)E<b[B].length&&(w[p++]=b[B][E]);for(E=0;E<x;E++)for(B=0;B<a;B++)w[p++]=T[B][E];return w}function Xn(r,t,i,n){let o;if(Array.isArray(r))o=Pe.fromArray(r);else if(typeof r=="string"){let h=t;if(!h){const d=Pe.rawSplit(r);h=le.getBestVersionForData(d,i)}o=Pe.fromString(r,h||40)}else throw new Error("Invalid data");const e=le.getBestVersionForData(o,i);if(!e)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=e;else if(t<e)throw new Error(`
|
|
1072
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
1073
|
-
Minimum version required to store current data is: `+e+`.
|
|
1074
|
-
`);const a=Jn(t,i,o),s=Re.getSymbolSize(t),l=new Dn(s);return qn(l,t),Hn(l),Kn(l,t),Le(l,i,0),t>=7&&Gn(l,t),Yn(l,a),isNaN(n)&&(n=De.getBestMask(l,Le.bind(null,l,i))),De.applyMask(n,l),Le(l,i,n),{modules:l,version:t,errorCorrectionLevel:i,maskPattern:n,segments:o}}Ti.create=function(t,i){if(typeof t>"u"||t==="")throw new Error("No input text");let n=Se.M,o,e;return typeof i<"u"&&(n=Se.from(i.errorCorrectionLevel,Se.M),o=le.from(i.version),e=De.from(i.maskPattern),i.toSJISFunc&&Re.setToSJISFunction(i.toSJISFunc)),Xn(t,o,n,e)};var ki={},ii={};(function(r){function t(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let n=i.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+i);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(e){return[e,e]}))),n.length===6&&n.push("F","F");const o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}r.getOptions=function(n){n||(n={}),n.color||(n.color={});const o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,e=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:e,scale:e?4:a,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},r.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},r.getImageWidth=function(n,o){const e=r.getScale(n,o);return Math.floor((n+o.margin*2)*e)},r.qrToImageData=function(n,o,e){const a=o.modules.size,s=o.modules.data,l=r.getScale(a,e),h=Math.floor((a+e.margin*2)*l),d=e.margin*l,R=[e.color.light,e.color.dark];for(let x=0;x<h;x++)for(let m=0;m<h;m++){let $=(x*h+m)*4,b=e.color.light;if(x>=d&&m>=d&&x<h-d&&m<h-d){const T=Math.floor((x-d)/l),f=Math.floor((m-d)/l);b=R[s[T*a+f]?1:0]}n[$++]=b.r,n[$++]=b.g,n[$++]=b.b,n[$]=b.a}}})(ii);(function(r){const t=ii;function i(o,e,a){o.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=a,e.width=a,e.style.height=a+"px",e.style.width=a+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}r.render=function(e,a,s){let l=s,h=a;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(h=n()),l=t.getOptions(l);const d=t.getImageWidth(e.modules.size,l),R=h.getContext("2d"),x=R.createImageData(d,d);return t.qrToImageData(x.data,e,l),i(R,h,d),R.putImageData(x,0,0),h},r.renderToDataURL=function(e,a,s){let l=s;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const h=r.render(e,a,l),d=l.type||"image/png",R=l.rendererOpts||{};return h.toDataURL(d,R.quality)}})(ki);var zi={};const Zn=ii;function gi(r,t){const i=r.a/255,n=t+'="'+r.hex+'"';return i<1?n+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function Be(r,t,i){let n=r+t;return typeof i<"u"&&(n+=" "+i),n}function to(r,t,i){let n="",o=0,e=!1,a=0;for(let s=0;s<r.length;s++){const l=Math.floor(s%t),h=Math.floor(s/t);!l&&!e&&(e=!0),r[s]?(a++,s>0&&l>0&&r[s-1]||(n+=e?Be("M",l+i,.5+h+i):Be("m",o,0),o=0,e=!1),l+1<t&&r[s+1]||(n+=Be("h",a),a=0)):o++}return n}zi.render=function(t,i,n){const o=Zn.getOptions(i),e=t.modules.size,a=t.modules.data,s=e+o.margin*2,l=o.color.light.a?"<path "+gi(o.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",h="<path "+gi(o.color.dark,"stroke")+' d="'+to(a,e,o.margin)+'"/>',d='viewBox="0 0 '+s+" "+s+'"',x='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+h+`</svg>
|
|
1075
|
-
`;return typeof n=="function"&&n(null,x),x};const eo=gn,Me=Ti,Di=ki,io=zi;function ni(r,t,i,n,o){const e=[].slice.call(arguments,1),a=e.length,s=typeof e[a-1]=="function";if(!s&&!eo())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(o=i,i=t,t=n=void 0):a===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=i,i=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(i=t,t=n=void 0):a===2&&!t.getContext&&(n=i,i=t,t=void 0),new Promise(function(l,h){try{const d=Me.create(i,n);l(r(d,t,n))}catch(d){h(d)}})}try{const l=Me.create(i,n);o(null,r(l,t,n))}catch(l){o(l)}}Vt.create=Me.create;Vt.toCanvas=ni.bind(null,Di.render);Vt.toDataURL=ni.bind(null,Di.renderToDataURL);Vt.toString=ni.bind(null,function(r,t,i){return io.render(r,i)});const no=.1,fi=2.5,at=7;function Oe(r,t,i){return r===t?!1:(r-t<0?t-r:r-t)<=i+no}function oo(r,t){const i=Array.prototype.slice.call(Vt.create(r,{errorCorrectionLevel:t}).modules.data,0),n=Math.sqrt(i.length);return i.reduce((o,e,a)=>(a%n===0?o.push([e]):o[o.length-1].push(e))&&o,[])}const ro={generate({uri:r,size:t,logoSize:i,dotColor:n="#141414"}){const o="transparent",a=[],s=oo(r,"Q"),l=t/s.length,h=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];h.forEach(({x:b,y:T})=>{const f=(s.length-at)*l*b,g=(s.length-at)*l*T,w=.45;for(let p=0;p<h.length;p+=1){const E=l*(at-p*2);a.push(At`
|
|
1076
|
-
<rect
|
|
1077
|
-
fill=${p===2?n:o}
|
|
1078
|
-
width=${p===0?E-5:E}
|
|
1079
|
-
rx= ${p===0?(E-5)*w:E*w}
|
|
1080
|
-
ry= ${p===0?(E-5)*w:E*w}
|
|
1081
|
-
stroke=${n}
|
|
1082
|
-
stroke-width=${p===0?5:0}
|
|
1083
|
-
height=${p===0?E-5:E}
|
|
1084
|
-
x= ${p===0?g+l*p+5/2:g+l*p}
|
|
1085
|
-
y= ${p===0?f+l*p+5/2:f+l*p}
|
|
1086
|
-
/>
|
|
1087
|
-
`)}});const d=Math.floor((i+25)/l),R=s.length/2-d/2,x=s.length/2+d/2-1,m=[];s.forEach((b,T)=>{b.forEach((f,g)=>{if(s[T][g]&&!(T<at&&g<at||T>s.length-(at+1)&&g<at||T<at&&g>s.length-(at+1))&&!(T>R&&T<x&&g>R&&g<x)){const w=T*l+l/2,p=g*l+l/2;m.push([w,p])}})});const $={};return m.forEach(([b,T])=>{var f;$[b]?(f=$[b])==null||f.push(T):$[b]=[T]}),Object.entries($).map(([b,T])=>{const f=T.filter(g=>T.every(w=>!Oe(g,w,l)));return[Number(b),f]}).forEach(([b,T])=>{T.forEach(f=>{a.push(At`<circle cx=${b} cy=${f} fill=${n} r=${l/fi} />`)})}),Object.entries($).filter(([b,T])=>T.length>1).map(([b,T])=>{const f=T.filter(g=>T.some(w=>Oe(g,w,l)));return[Number(b),f]}).map(([b,T])=>{T.sort((g,w)=>g<w?-1:1);const f=[];for(const g of T){const w=f.find(p=>p.some(E=>Oe(g,E,l)));w?w.push(g):f.push([g])}return[b,f.map(g=>[g[0],g[g.length-1]])]}).forEach(([b,T])=>{T.forEach(([f,g])=>{a.push(At`
|
|
1088
|
-
<line
|
|
1089
|
-
x1=${b}
|
|
1090
|
-
x2=${b}
|
|
1091
|
-
y1=${f}
|
|
1092
|
-
y2=${g}
|
|
1093
|
-
stroke=${n}
|
|
1094
|
-
stroke-width=${l/(fi/2)}
|
|
1095
|
-
stroke-linecap="round"
|
|
1096
|
-
/>
|
|
1097
|
-
`)})}),a}},ao=P`
|
|
1098
|
-
:host {
|
|
1099
|
-
position: relative;
|
|
1100
|
-
user-select: none;
|
|
1101
|
-
display: block;
|
|
1102
|
-
overflow: hidden;
|
|
1103
|
-
aspect-ratio: 1 / 1;
|
|
1104
|
-
width: var(--local-size);
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
:host([data-theme='dark']) {
|
|
1108
|
-
border-radius: clamp(0px, var(--wui-border-radius-l), 40px);
|
|
1109
|
-
background-color: var(--wui-color-inverse-100);
|
|
1110
|
-
padding: var(--wui-spacing-l);
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
:host([data-theme='light']) {
|
|
1114
|
-
box-shadow: 0 0 0 1px var(--wui-color-bg-125);
|
|
1115
|
-
background-color: var(--wui-color-bg-125);
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
:host([data-clear='true']) > wui-icon {
|
|
1119
|
-
display: none;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
svg:first-child,
|
|
1123
|
-
wui-image,
|
|
1124
|
-
wui-icon {
|
|
1125
|
-
position: absolute;
|
|
1126
|
-
top: 50%;
|
|
1127
|
-
left: 50%;
|
|
1128
|
-
transform: translateY(-50%) translateX(-50%);
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
wui-image {
|
|
1132
|
-
width: 25%;
|
|
1133
|
-
height: 25%;
|
|
1134
|
-
border-radius: var(--wui-border-radius-xs);
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
wui-icon {
|
|
1138
|
-
width: 100%;
|
|
1139
|
-
height: 100%;
|
|
1140
|
-
color: var(--local-icon-color) !important;
|
|
1141
|
-
transform: translateY(-50%) translateX(-50%) scale(0.25);
|
|
1142
|
-
}
|
|
1143
|
-
`;var ut=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};const so="#3396ff";let Q=class extends _{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`
|
|
1144
|
-
--local-size: ${this.size}px;
|
|
1145
|
-
--local-icon-color: ${this.color??so}
|
|
1146
|
-
`,c`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const t=this.theme==="light"?this.size:this.size-32;return At`
|
|
1147
|
-
<svg height=${t} width=${t}>
|
|
1148
|
-
${ro.generate({uri:this.uri,size:t,logoSize:this.arenaClear?0:t/4,dotColor:this.color})}
|
|
1149
|
-
</svg>
|
|
1150
|
-
`}templateVisual(){return this.imageSrc?c`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?c`<wui-icon
|
|
1151
|
-
class="farcaster"
|
|
1152
|
-
size="inherit"
|
|
1153
|
-
color="inherit"
|
|
1154
|
-
name="farcaster"
|
|
1155
|
-
></wui-icon>`:c`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};Q.styles=[A,ao];ut([u()],Q.prototype,"uri",void 0);ut([u({type:Number})],Q.prototype,"size",void 0);ut([u()],Q.prototype,"theme",void 0);ut([u()],Q.prototype,"imageSrc",void 0);ut([u()],Q.prototype,"alt",void 0);ut([u()],Q.prototype,"color",void 0);ut([u({type:Boolean})],Q.prototype,"arenaClear",void 0);ut([u({type:Boolean})],Q.prototype,"farcaster",void 0);Q=ut([C("wui-qr-code")],Q);const lo=P`
|
|
1156
|
-
:host {
|
|
1157
|
-
display: block;
|
|
1158
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
1159
|
-
background: linear-gradient(
|
|
1160
|
-
120deg,
|
|
1161
|
-
var(--wui-color-bg-200) 5%,
|
|
1162
|
-
var(--wui-color-bg-200) 48%,
|
|
1163
|
-
var(--wui-color-bg-300) 55%,
|
|
1164
|
-
var(--wui-color-bg-300) 60%,
|
|
1165
|
-
var(--wui-color-bg-300) calc(60% + 10px),
|
|
1166
|
-
var(--wui-color-bg-200) calc(60% + 12px),
|
|
1167
|
-
var(--wui-color-bg-200) 100%
|
|
1168
|
-
);
|
|
1169
|
-
background-size: 250%;
|
|
1170
|
-
animation: shimmer 3s linear infinite reverse;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
:host([variant='light']) {
|
|
1174
|
-
background: linear-gradient(
|
|
1175
|
-
120deg,
|
|
1176
|
-
var(--wui-color-bg-150) 5%,
|
|
1177
|
-
var(--wui-color-bg-150) 48%,
|
|
1178
|
-
var(--wui-color-bg-200) 55%,
|
|
1179
|
-
var(--wui-color-bg-200) 60%,
|
|
1180
|
-
var(--wui-color-bg-200) calc(60% + 10px),
|
|
1181
|
-
var(--wui-color-bg-150) calc(60% + 12px),
|
|
1182
|
-
var(--wui-color-bg-150) 100%
|
|
1183
|
-
);
|
|
1184
|
-
background-size: 250%;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
@keyframes shimmer {
|
|
1188
|
-
from {
|
|
1189
|
-
background-position: -250% 0;
|
|
1190
|
-
}
|
|
1191
|
-
to {
|
|
1192
|
-
background-position: 250% 0;
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
`;var Ht=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let vt=class extends _{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=`
|
|
1196
|
-
width: ${this.width};
|
|
1197
|
-
height: ${this.height};
|
|
1198
|
-
border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};
|
|
1199
|
-
`,c`<slot></slot>`}};vt.styles=[lo];Ht([u()],vt.prototype,"width",void 0);Ht([u()],vt.prototype,"height",void 0);Ht([u()],vt.prototype,"borderRadius",void 0);Ht([u()],vt.prototype,"variant",void 0);vt=Ht([C("wui-shimmer")],vt);const co="https://reown.com",uo=P`
|
|
1200
|
-
.reown-logo {
|
|
1201
|
-
height: var(--wui-spacing-xxl);
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
a {
|
|
1205
|
-
text-decoration: none;
|
|
1206
|
-
cursor: pointer;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
a:hover {
|
|
1210
|
-
opacity: 0.9;
|
|
1211
|
-
}
|
|
1212
|
-
`;var ho=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Ue=class extends _{render(){return c`
|
|
1213
|
-
<a
|
|
1214
|
-
data-testid="ux-branding-reown"
|
|
1215
|
-
href=${co}
|
|
1216
|
-
rel="noreferrer"
|
|
1217
|
-
target="_blank"
|
|
1218
|
-
style="text-decoration: none;"
|
|
1219
|
-
>
|
|
1220
|
-
<wui-flex
|
|
1221
|
-
justifyContent="center"
|
|
1222
|
-
alignItems="center"
|
|
1223
|
-
gap="xs"
|
|
1224
|
-
.padding=${["0","0","l","0"]}
|
|
1225
|
-
>
|
|
1226
|
-
<wui-text variant="small-500" color="fg-100"> UX by </wui-text>
|
|
1227
|
-
<wui-icon name="reown" size="xxxl" class="reown-logo"></wui-icon>
|
|
1228
|
-
</wui-flex>
|
|
1229
|
-
</a>
|
|
1230
|
-
`}};Ue.styles=[A,M,uo];Ue=ho([C("wui-ux-by-reown")],Ue);const po=P`
|
|
1231
|
-
@keyframes fadein {
|
|
1232
|
-
from {
|
|
1233
|
-
opacity: 0;
|
|
1234
|
-
}
|
|
1235
|
-
to {
|
|
1236
|
-
opacity: 1;
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
wui-shimmer {
|
|
1241
|
-
width: 100%;
|
|
1242
|
-
aspect-ratio: 1 / 1;
|
|
1243
|
-
border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
wui-qr-code {
|
|
1247
|
-
opacity: 0;
|
|
1248
|
-
animation-duration: 200ms;
|
|
1249
|
-
animation-timing-function: ease;
|
|
1250
|
-
animation-name: fadein;
|
|
1251
|
-
animation-fill-mode: forwards;
|
|
1252
|
-
}
|
|
1253
|
-
`;var go=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Fe=class extends z{constructor(){var t;super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:((t=this.wallet)==null?void 0:t.name)??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.unsubscribe)==null||t.forEach(i=>i()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),c`
|
|
1254
|
-
<wui-flex
|
|
1255
|
-
flexDirection="column"
|
|
1256
|
-
alignItems="center"
|
|
1257
|
-
.padding=${["0","xl","xl","xl"]}
|
|
1258
|
-
gap="xl"
|
|
1259
|
-
>
|
|
1260
|
-
<wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
|
|
1261
|
-
|
|
1262
|
-
<wui-text variant="paragraph-500" color="fg-100">
|
|
1263
|
-
Scan this QR Code with your phone
|
|
1264
|
-
</wui-text>
|
|
1265
|
-
${this.copyTemplate()}
|
|
1266
|
-
</wui-flex>
|
|
1267
|
-
<w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
|
|
1268
|
-
`}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const t=this.getBoundingClientRect().width-40,i=this.wallet?this.wallet.name:void 0;return W.setWcLinking(void 0),W.setRecentWallet(this.wallet),c` <wui-qr-code
|
|
1269
|
-
size=${t}
|
|
1270
|
-
theme=${ke.state.themeMode}
|
|
1271
|
-
uri=${this.uri}
|
|
1272
|
-
imageSrc=${y(D.getWalletImage(this.wallet))}
|
|
1273
|
-
color=${y(ke.state.themeVariables["--w3m-qr-color"])}
|
|
1274
|
-
alt=${y(i)}
|
|
1275
|
-
data-testid="wui-qr-code"
|
|
1276
|
-
></wui-qr-code>`}copyTemplate(){const t=!this.uri||!this.ready;return c`<wui-link
|
|
1277
|
-
.disabled=${t}
|
|
1278
|
-
@click=${this.onCopyUri}
|
|
1279
|
-
color="fg-200"
|
|
1280
|
-
data-testid="copy-wc2-uri"
|
|
1281
|
-
>
|
|
1282
|
-
<wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
|
|
1283
|
-
Copy link
|
|
1284
|
-
</wui-link>`}};Fe.styles=po;Fe=go([C("w3m-connecting-wc-qrcode")],Fe);var fo=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let wi=class extends _{constructor(){var t;if(super(),this.wallet=(t=O.state.data)==null?void 0:t.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return c`
|
|
1285
|
-
<wui-flex
|
|
1286
|
-
flexDirection="column"
|
|
1287
|
-
alignItems="center"
|
|
1288
|
-
.padding=${["3xl","xl","xl","xl"]}
|
|
1289
|
-
gap="xl"
|
|
1290
|
-
>
|
|
1291
|
-
<wui-wallet-image
|
|
1292
|
-
size="lg"
|
|
1293
|
-
imageSrc=${y(D.getWalletImage(this.wallet))}
|
|
1294
|
-
></wui-wallet-image>
|
|
1295
|
-
|
|
1296
|
-
<wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text>
|
|
1297
|
-
</wui-flex>
|
|
1298
|
-
|
|
1299
|
-
<w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
|
|
1300
|
-
`}};wi=fo([C("w3m-connecting-wc-unsupported")],wi);var Ni=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Ve=class extends z{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=yi.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(W.subscribeKey("wcUri",()=>{this.updateLoadingState()})),J.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){var t;if((t=this.wallet)!=null&&t.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:i,name:n}=this.wallet,{redirect:o,href:e}=I.formatUniversalUrl(i,this.uri);W.setWcLinking({name:n,href:e}),W.setRecentWallet(this.wallet),I.openHref(o,"_blank")}catch{this.error=!0}}};Ni([v()],Ve.prototype,"isLoading",void 0);Ve=Ni([C("w3m-connecting-wc-web")],Ve);var Kt=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let Wt=class extends _{constructor(){var t;super(),this.wallet=(t=O.state.data)==null?void 0:t.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!Y.state.siwx,this.remoteFeatures=Y.state.remoteFeatures,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(Y.subscribeKey("remoteFeatures",i=>this.remoteFeatures=i))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return c`
|
|
1301
|
-
${this.headerTemplate()}
|
|
1302
|
-
<div>${this.platformTemplate()}</div>
|
|
1303
|
-
${this.reownBrandingTemplate()}
|
|
1304
|
-
`}reownBrandingTemplate(){var t;return(t=this.remoteFeatures)!=null&&t.reownBranding?c`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(t=!1){if(!(this.platform==="browser"||Y.state.manualWCControl&&!t))try{const{wcPairingExpiry:i,status:n}=W.state;(t||Y.state.enableEmbedded||I.isPairingExpired(i)||n==="connecting")&&(await W.connectWalletConnect(),this.isSiwxEnabled||vi.close())}catch(i){J.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(i==null?void 0:i.message)??"Unknown"}}),W.setWcError(!0),Qt.showError(i.message??"Connection error"),W.resetWcConnection(),O.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;const{mobile_link:t,desktop_link:i,webapp_link:n,injected:o,rdns:e}=this.wallet,a=o==null?void 0:o.map(({injected_id:$})=>$).filter(Boolean),s=[...e?[e]:a??[]],l=Y.state.isUniversalProvider?!1:s.length,h=t,d=n,R=W.checkInstalled(s),x=l&&R,m=i&&!I.isMobile();x&&!je.state.noAdapters&&this.platforms.push("browser"),h&&this.platforms.push(I.isMobile()?"mobile":"qrcode"),d&&this.platforms.push("web"),m&&this.platforms.push("desktop"),!x&&l&&!je.state.noAdapters&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return c`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return c`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return c`
|
|
1305
|
-
<w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
|
|
1306
|
-
</w3m-connecting-wc-desktop>
|
|
1307
|
-
`;case"mobile":return c`
|
|
1308
|
-
<w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
|
|
1309
|
-
</w3m-connecting-wc-mobile>
|
|
1310
|
-
`;case"qrcode":return c`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return c`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?c`
|
|
1311
|
-
<w3m-connecting-header
|
|
1312
|
-
.platforms=${this.platforms}
|
|
1313
|
-
.onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
|
|
1314
|
-
>
|
|
1315
|
-
</w3m-connecting-header>
|
|
1316
|
-
`:null}async onSelectPlatform(t){var n;const i=(n=this.shadowRoot)==null?void 0:n.querySelector("div");i&&(await i.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=t,i.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};Kt([v()],Wt.prototype,"platform",void 0);Kt([v()],Wt.prototype,"platforms",void 0);Kt([v()],Wt.prototype,"isSiwxEnabled",void 0);Kt([v()],Wt.prototype,"remoteFeatures",void 0);Wt=Kt([C("w3m-connecting-wc-view")],Wt);var Mi=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let qe=class extends _{constructor(){super(...arguments),this.isMobile=I.isMobile()}render(){if(this.isMobile){const{featured:t,recommended:i}=S.state,{customWallets:n}=Y.state,o=ge.getRecentWallets(),e=t.length||i.length||(n==null?void 0:n.length)||o.length;return c`<wui-flex
|
|
1317
|
-
flexDirection="column"
|
|
1318
|
-
gap="xs"
|
|
1319
|
-
.margin=${["3xs","s","s","s"]}
|
|
1320
|
-
>
|
|
1321
|
-
${e?c`<w3m-connector-list></w3m-connector-list>`:null}
|
|
1322
|
-
<w3m-all-wallets-widget></w3m-all-wallets-widget>
|
|
1323
|
-
</wui-flex>`}return c`<wui-flex flexDirection="column" .padding=${["0","0","l","0"]}>
|
|
1324
|
-
<w3m-connecting-wc-view></w3m-connecting-wc-view>
|
|
1325
|
-
<wui-flex flexDirection="column" .padding=${["0","m","0","m"]}>
|
|
1326
|
-
<w3m-all-wallets-widget></w3m-all-wallets-widget> </wui-flex
|
|
1327
|
-
></wui-flex>`}};Mi([v()],qe.prototype,"isMobile",void 0);qe=Mi([C("w3m-connecting-wc-basic-view")],qe);/**
|
|
1328
|
-
* @license
|
|
1329
|
-
* Copyright 2020 Google LLC
|
|
1330
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1331
|
-
*/const oi=()=>new wo;class wo{}const Ae=new WeakMap,ri=Gi(class extends Yi{render(r){return li}update(r,[t]){var n;const i=t!==this.G;return i&&this.G!==void 0&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=(n=r.options)==null?void 0:n.host,this.rt(this.ct=r.element)),li}rt(r){if(this.isConnected||(r=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let i=Ae.get(t);i===void 0&&(i=new WeakMap,Ae.set(t,i)),i.get(this.G)!==void 0&&this.G.call(this.ht,void 0),i.set(this.G,r),r!==void 0&&this.G.call(this.ht,r)}else this.G.value=r}get lt(){var r,t;return typeof this.G=="function"?(r=Ae.get(this.ht??globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),bo=P`
|
|
1332
|
-
:host {
|
|
1333
|
-
display: flex;
|
|
1334
|
-
align-items: center;
|
|
1335
|
-
justify-content: center;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
label {
|
|
1339
|
-
position: relative;
|
|
1340
|
-
display: inline-block;
|
|
1341
|
-
width: 32px;
|
|
1342
|
-
height: 22px;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
input {
|
|
1346
|
-
width: 0;
|
|
1347
|
-
height: 0;
|
|
1348
|
-
opacity: 0;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
span {
|
|
1352
|
-
position: absolute;
|
|
1353
|
-
cursor: pointer;
|
|
1354
|
-
top: 0;
|
|
1355
|
-
left: 0;
|
|
1356
|
-
right: 0;
|
|
1357
|
-
bottom: 0;
|
|
1358
|
-
background-color: var(--wui-color-blue-100);
|
|
1359
|
-
border-width: 1px;
|
|
1360
|
-
border-style: solid;
|
|
1361
|
-
border-color: var(--wui-color-gray-glass-002);
|
|
1362
|
-
border-radius: 999px;
|
|
1363
|
-
transition:
|
|
1364
|
-
background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
|
1365
|
-
border-color var(--wui-ease-inout-power-1) var(--wui-duration-md);
|
|
1366
|
-
will-change: background-color, border-color;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
span:before {
|
|
1370
|
-
position: absolute;
|
|
1371
|
-
content: '';
|
|
1372
|
-
height: 16px;
|
|
1373
|
-
width: 16px;
|
|
1374
|
-
left: 3px;
|
|
1375
|
-
top: 2px;
|
|
1376
|
-
background-color: var(--wui-color-inverse-100);
|
|
1377
|
-
transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg);
|
|
1378
|
-
will-change: transform;
|
|
1379
|
-
border-radius: 50%;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
input:checked + span {
|
|
1383
|
-
border-color: var(--wui-color-gray-glass-005);
|
|
1384
|
-
background-color: var(--wui-color-blue-100);
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
input:not(:checked) + span {
|
|
1388
|
-
background-color: var(--wui-color-gray-glass-010);
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
input:checked + span:before {
|
|
1392
|
-
transform: translateX(calc(100% - 7px));
|
|
1393
|
-
}
|
|
1394
|
-
`;var Ui=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ce=class extends _{constructor(){super(...arguments),this.inputElementRef=oi(),this.checked=void 0}render(){return c`
|
|
1395
|
-
<label>
|
|
1396
|
-
<input
|
|
1397
|
-
${ri(this.inputElementRef)}
|
|
1398
|
-
type="checkbox"
|
|
1399
|
-
?checked=${y(this.checked)}
|
|
1400
|
-
@change=${this.dispatchChangeEvent.bind(this)}
|
|
1401
|
-
/>
|
|
1402
|
-
<span></span>
|
|
1403
|
-
</label>
|
|
1404
|
-
`}dispatchChangeEvent(){var t;this.dispatchEvent(new CustomEvent("switchChange",{detail:(t=this.inputElementRef.value)==null?void 0:t.checked,bubbles:!0,composed:!0}))}};ce.styles=[A,M,Ki,bo];Ui([u({type:Boolean})],ce.prototype,"checked",void 0);ce=Ui([C("wui-switch")],ce);const mo=P`
|
|
1405
|
-
:host {
|
|
1406
|
-
height: 100%;
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
button {
|
|
1410
|
-
display: flex;
|
|
1411
|
-
align-items: center;
|
|
1412
|
-
justify-content: center;
|
|
1413
|
-
column-gap: var(--wui-spacing-1xs);
|
|
1414
|
-
padding: var(--wui-spacing-xs) var(--wui-spacing-s);
|
|
1415
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
1416
|
-
border-radius: var(--wui-border-radius-xs);
|
|
1417
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
1418
|
-
transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
1419
|
-
will-change: background-color;
|
|
1420
|
-
cursor: pointer;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
wui-switch {
|
|
1424
|
-
pointer-events: none;
|
|
1425
|
-
}
|
|
1426
|
-
`;var Fi=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let ue=class extends _{constructor(){super(...arguments),this.checked=void 0}render(){return c`
|
|
1427
|
-
<button>
|
|
1428
|
-
<wui-icon size="xl" name="walletConnectBrown"></wui-icon>
|
|
1429
|
-
<wui-switch ?checked=${y(this.checked)}></wui-switch>
|
|
1430
|
-
</button>
|
|
1431
|
-
`}};ue.styles=[A,M,mo];Fi([u({type:Boolean})],ue.prototype,"checked",void 0);ue=Fi([C("wui-certified-switch")],ue);const vo=P`
|
|
1432
|
-
button {
|
|
1433
|
-
background-color: var(--wui-color-fg-300);
|
|
1434
|
-
border-radius: var(--wui-border-radius-4xs);
|
|
1435
|
-
width: 16px;
|
|
1436
|
-
height: 16px;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
button:disabled {
|
|
1440
|
-
background-color: var(--wui-color-bg-300);
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
wui-icon {
|
|
1444
|
-
color: var(--wui-color-bg-200) !important;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
button:focus-visible {
|
|
1448
|
-
background-color: var(--wui-color-fg-250);
|
|
1449
|
-
border: 1px solid var(--wui-color-accent-100);
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
@media (hover: hover) and (pointer: fine) {
|
|
1453
|
-
button:hover:enabled {
|
|
1454
|
-
background-color: var(--wui-color-fg-250);
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
button:active:enabled {
|
|
1458
|
-
background-color: var(--wui-color-fg-225);
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
`;var Vi=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let de=class extends _{constructor(){super(...arguments),this.icon="copy"}render(){return c`
|
|
1462
|
-
<button>
|
|
1463
|
-
<wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon>
|
|
1464
|
-
</button>
|
|
1465
|
-
`}};de.styles=[A,M,vo];Vi([u()],de.prototype,"icon",void 0);de=Vi([C("wui-input-element")],de);const yo=P`
|
|
1466
|
-
:host {
|
|
1467
|
-
position: relative;
|
|
1468
|
-
width: 100%;
|
|
1469
|
-
display: inline-block;
|
|
1470
|
-
color: var(--wui-color-fg-275);
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
input {
|
|
1474
|
-
width: 100%;
|
|
1475
|
-
border-radius: var(--wui-border-radius-xs);
|
|
1476
|
-
box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
|
|
1477
|
-
background: var(--wui-color-gray-glass-002);
|
|
1478
|
-
font-size: var(--wui-font-size-paragraph);
|
|
1479
|
-
letter-spacing: var(--wui-letter-spacing-paragraph);
|
|
1480
|
-
color: var(--wui-color-fg-100);
|
|
1481
|
-
transition:
|
|
1482
|
-
background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
|
1483
|
-
border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
|
|
1484
|
-
box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
|
|
1485
|
-
will-change: background-color, border-color, box-shadow;
|
|
1486
|
-
caret-color: var(--wui-color-accent-100);
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
input:disabled {
|
|
1490
|
-
cursor: not-allowed;
|
|
1491
|
-
border: 1px solid var(--wui-color-gray-glass-010);
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
input:disabled::placeholder,
|
|
1495
|
-
input:disabled + wui-icon {
|
|
1496
|
-
color: var(--wui-color-fg-300);
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
input::placeholder {
|
|
1500
|
-
color: var(--wui-color-fg-275);
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
input:focus:enabled {
|
|
1504
|
-
background-color: var(--wui-color-gray-glass-005);
|
|
1505
|
-
-webkit-box-shadow:
|
|
1506
|
-
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
1507
|
-
0px 0px 0px 4px var(--wui-box-shadow-blue);
|
|
1508
|
-
-moz-box-shadow:
|
|
1509
|
-
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
1510
|
-
0px 0px 0px 4px var(--wui-box-shadow-blue);
|
|
1511
|
-
box-shadow:
|
|
1512
|
-
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
1513
|
-
0px 0px 0px 4px var(--wui-box-shadow-blue);
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
input:hover:enabled {
|
|
1517
|
-
background-color: var(--wui-color-gray-glass-005);
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
wui-icon {
|
|
1521
|
-
position: absolute;
|
|
1522
|
-
top: 50%;
|
|
1523
|
-
transform: translateY(-50%);
|
|
1524
|
-
pointer-events: none;
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
.wui-size-sm {
|
|
1528
|
-
padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
wui-icon + .wui-size-sm {
|
|
1532
|
-
padding: 9px var(--wui-spacing-m) 10px 36px;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
wui-icon[data-input='sm'] {
|
|
1536
|
-
left: var(--wui-spacing-s);
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
.wui-size-md {
|
|
1540
|
-
padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
wui-icon + .wui-size-md,
|
|
1544
|
-
wui-loading-spinner + .wui-size-md {
|
|
1545
|
-
padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl);
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
wui-icon[data-input='md'] {
|
|
1549
|
-
left: var(--wui-spacing-l);
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
.wui-size-lg {
|
|
1553
|
-
padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);
|
|
1554
|
-
letter-spacing: var(--wui-letter-spacing-medium-title);
|
|
1555
|
-
font-size: var(--wui-font-size-medium-title);
|
|
1556
|
-
font-weight: var(--wui-font-weight-light);
|
|
1557
|
-
line-height: 130%;
|
|
1558
|
-
color: var(--wui-color-fg-100);
|
|
1559
|
-
height: 64px;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
.wui-padding-right-xs {
|
|
1563
|
-
padding-right: var(--wui-spacing-xs);
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
.wui-padding-right-s {
|
|
1567
|
-
padding-right: var(--wui-spacing-s);
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
.wui-padding-right-m {
|
|
1571
|
-
padding-right: var(--wui-spacing-m);
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
.wui-padding-right-l {
|
|
1575
|
-
padding-right: var(--wui-spacing-l);
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
.wui-padding-right-xl {
|
|
1579
|
-
padding-right: var(--wui-spacing-xl);
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
.wui-padding-right-2xl {
|
|
1583
|
-
padding-right: var(--wui-spacing-2xl);
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
.wui-padding-right-3xl {
|
|
1587
|
-
padding-right: var(--wui-spacing-3xl);
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
.wui-padding-right-4xl {
|
|
1591
|
-
padding-right: var(--wui-spacing-4xl);
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
.wui-padding-right-5xl {
|
|
1595
|
-
padding-right: var(--wui-spacing-5xl);
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
wui-icon + .wui-size-lg,
|
|
1599
|
-
wui-loading-spinner + .wui-size-lg {
|
|
1600
|
-
padding-left: 50px;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
wui-icon[data-input='lg'] {
|
|
1604
|
-
left: var(--wui-spacing-l);
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
.wui-size-mdl {
|
|
1608
|
-
padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m);
|
|
1609
|
-
}
|
|
1610
|
-
wui-icon + .wui-size-mdl,
|
|
1611
|
-
wui-loading-spinner + .wui-size-mdl {
|
|
1612
|
-
padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px;
|
|
1613
|
-
}
|
|
1614
|
-
wui-icon[data-input='mdl'] {
|
|
1615
|
-
left: var(--wui-spacing-m);
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
input:placeholder-shown ~ ::slotted(wui-input-element),
|
|
1619
|
-
input:placeholder-shown ~ ::slotted(wui-icon) {
|
|
1620
|
-
opacity: 0;
|
|
1621
|
-
pointer-events: none;
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
input::-webkit-outer-spin-button,
|
|
1625
|
-
input::-webkit-inner-spin-button {
|
|
1626
|
-
-webkit-appearance: none;
|
|
1627
|
-
margin: 0;
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
input[type='number'] {
|
|
1631
|
-
-moz-appearance: textfield;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
::slotted(wui-input-element),
|
|
1635
|
-
::slotted(wui-icon) {
|
|
1636
|
-
position: absolute;
|
|
1637
|
-
top: 50%;
|
|
1638
|
-
transform: translateY(-50%);
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
::slotted(wui-input-element) {
|
|
1642
|
-
right: var(--wui-spacing-m);
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
::slotted(wui-icon) {
|
|
1646
|
-
right: 0px;
|
|
1647
|
-
}
|
|
1648
|
-
`;var ot=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let H=class extends _{constructor(){super(...arguments),this.inputElementRef=oi(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const t=`wui-padding-right-${this.inputRightPadding}`,n={[`wui-size-${this.size}`]:!0,[t]:!!this.inputRightPadding};return c`${this.templateIcon()}
|
|
1649
|
-
<input
|
|
1650
|
-
data-testid="wui-input-text"
|
|
1651
|
-
${ri(this.inputElementRef)}
|
|
1652
|
-
class=${Ji(n)}
|
|
1653
|
-
type=${this.type}
|
|
1654
|
-
enterkeyhint=${y(this.enterKeyHint)}
|
|
1655
|
-
?disabled=${this.disabled}
|
|
1656
|
-
placeholder=${this.placeholder}
|
|
1657
|
-
@input=${this.dispatchInputChangeEvent.bind(this)}
|
|
1658
|
-
.value=${this.value||""}
|
|
1659
|
-
tabindex=${y(this.tabIdx)}
|
|
1660
|
-
/>
|
|
1661
|
-
<slot></slot>`}templateIcon(){return this.icon?c`<wui-icon
|
|
1662
|
-
data-input=${this.size}
|
|
1663
|
-
size=${this.size}
|
|
1664
|
-
color="inherit"
|
|
1665
|
-
name=${this.icon}
|
|
1666
|
-
></wui-icon>`:null}dispatchInputChangeEvent(){var t;this.dispatchEvent(new CustomEvent("inputChange",{detail:(t=this.inputElementRef.value)==null?void 0:t.value,bubbles:!0,composed:!0}))}};H.styles=[A,M,yo];ot([u()],H.prototype,"size",void 0);ot([u()],H.prototype,"icon",void 0);ot([u({type:Boolean})],H.prototype,"disabled",void 0);ot([u()],H.prototype,"placeholder",void 0);ot([u()],H.prototype,"type",void 0);ot([u()],H.prototype,"keyHint",void 0);ot([u()],H.prototype,"value",void 0);ot([u()],H.prototype,"inputRightPadding",void 0);ot([u()],H.prototype,"tabIdx",void 0);H=ot([C("wui-input-text")],H);const xo=P`
|
|
1667
|
-
:host {
|
|
1668
|
-
position: relative;
|
|
1669
|
-
display: inline-block;
|
|
1670
|
-
width: 100%;
|
|
1671
|
-
}
|
|
1672
|
-
`;var Co=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let He=class extends _{constructor(){super(...arguments),this.inputComponentRef=oi()}render(){return c`
|
|
1673
|
-
<wui-input-text
|
|
1674
|
-
${ri(this.inputComponentRef)}
|
|
1675
|
-
placeholder="Search wallet"
|
|
1676
|
-
icon="search"
|
|
1677
|
-
type="search"
|
|
1678
|
-
enterKeyHint="search"
|
|
1679
|
-
size="sm"
|
|
1680
|
-
>
|
|
1681
|
-
<wui-input-element @click=${this.clearValue} icon="close"></wui-input-element>
|
|
1682
|
-
</wui-input-text>
|
|
1683
|
-
`}clearValue(){const t=this.inputComponentRef.value,i=t==null?void 0:t.inputElementRef.value;i&&(i.value="",i.focus(),i.dispatchEvent(new Event("input")))}};He.styles=[A,xo];He=Co([C("wui-search-bar")],He);const $o=At`<svg viewBox="0 0 48 54" fill="none">
|
|
1684
|
-
<path
|
|
1685
|
-
d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
|
|
1686
|
-
/>
|
|
1687
|
-
</svg>`,To=P`
|
|
1688
|
-
:host {
|
|
1689
|
-
display: flex;
|
|
1690
|
-
flex-direction: column;
|
|
1691
|
-
align-items: center;
|
|
1692
|
-
width: 104px;
|
|
1693
|
-
row-gap: var(--wui-spacing-xs);
|
|
1694
|
-
padding: var(--wui-spacing-xs) 10px;
|
|
1695
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
1696
|
-
border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
|
|
1697
|
-
position: relative;
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
wui-shimmer[data-type='network'] {
|
|
1701
|
-
border: none;
|
|
1702
|
-
-webkit-clip-path: var(--wui-path-network);
|
|
1703
|
-
clip-path: var(--wui-path-network);
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
svg {
|
|
1707
|
-
position: absolute;
|
|
1708
|
-
width: 48px;
|
|
1709
|
-
height: 54px;
|
|
1710
|
-
z-index: 1;
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
svg > path {
|
|
1714
|
-
stroke: var(--wui-color-gray-glass-010);
|
|
1715
|
-
stroke-width: 1px;
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
@media (max-width: 350px) {
|
|
1719
|
-
:host {
|
|
1720
|
-
width: 100%;
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
`;var qi=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let he=class extends _{constructor(){super(...arguments),this.type="wallet"}render(){return c`
|
|
1724
|
-
${this.shimmerTemplate()}
|
|
1725
|
-
<wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer>
|
|
1726
|
-
`}shimmerTemplate(){return this.type==="network"?c` <wui-shimmer
|
|
1727
|
-
data-type=${this.type}
|
|
1728
|
-
width="48px"
|
|
1729
|
-
height="54px"
|
|
1730
|
-
borderRadius="xs"
|
|
1731
|
-
></wui-shimmer>
|
|
1732
|
-
${$o}`:c`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};he.styles=[A,M,To];qi([u()],he.prototype,"type",void 0);he=qi([C("wui-card-select-loader")],he);const Ro=P`
|
|
1733
|
-
:host {
|
|
1734
|
-
display: grid;
|
|
1735
|
-
width: inherit;
|
|
1736
|
-
height: inherit;
|
|
1737
|
-
}
|
|
1738
|
-
`;var K=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let N=class extends _{render(){return this.style.cssText=`
|
|
1739
|
-
grid-template-rows: ${this.gridTemplateRows};
|
|
1740
|
-
grid-template-columns: ${this.gridTemplateColumns};
|
|
1741
|
-
justify-items: ${this.justifyItems};
|
|
1742
|
-
align-items: ${this.alignItems};
|
|
1743
|
-
justify-content: ${this.justifyContent};
|
|
1744
|
-
align-content: ${this.alignContent};
|
|
1745
|
-
column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
|
|
1746
|
-
row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
|
|
1747
|
-
gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
|
|
1748
|
-
padding-top: ${this.padding&&st.getSpacingStyles(this.padding,0)};
|
|
1749
|
-
padding-right: ${this.padding&&st.getSpacingStyles(this.padding,1)};
|
|
1750
|
-
padding-bottom: ${this.padding&&st.getSpacingStyles(this.padding,2)};
|
|
1751
|
-
padding-left: ${this.padding&&st.getSpacingStyles(this.padding,3)};
|
|
1752
|
-
margin-top: ${this.margin&&st.getSpacingStyles(this.margin,0)};
|
|
1753
|
-
margin-right: ${this.margin&&st.getSpacingStyles(this.margin,1)};
|
|
1754
|
-
margin-bottom: ${this.margin&&st.getSpacingStyles(this.margin,2)};
|
|
1755
|
-
margin-left: ${this.margin&&st.getSpacingStyles(this.margin,3)};
|
|
1756
|
-
`,c`<slot></slot>`}};N.styles=[A,Ro];K([u()],N.prototype,"gridTemplateRows",void 0);K([u()],N.prototype,"gridTemplateColumns",void 0);K([u()],N.prototype,"justifyItems",void 0);K([u()],N.prototype,"alignItems",void 0);K([u()],N.prototype,"justifyContent",void 0);K([u()],N.prototype,"alignContent",void 0);K([u()],N.prototype,"columnGap",void 0);K([u()],N.prototype,"rowGap",void 0);K([u()],N.prototype,"gap",void 0);K([u()],N.prototype,"padding",void 0);K([u()],N.prototype,"margin",void 0);N=K([C("wui-grid")],N);const _o=P`
|
|
1757
|
-
button {
|
|
1758
|
-
display: flex;
|
|
1759
|
-
flex-direction: column;
|
|
1760
|
-
justify-content: center;
|
|
1761
|
-
align-items: center;
|
|
1762
|
-
cursor: pointer;
|
|
1763
|
-
width: 104px;
|
|
1764
|
-
row-gap: var(--wui-spacing-xs);
|
|
1765
|
-
padding: var(--wui-spacing-s) var(--wui-spacing-0);
|
|
1766
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
1767
|
-
border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
|
|
1768
|
-
transition:
|
|
1769
|
-
color var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
|
1770
|
-
background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
|
1771
|
-
border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1);
|
|
1772
|
-
will-change: background-color, color, border-radius;
|
|
1773
|
-
outline: none;
|
|
1774
|
-
border: none;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
button > wui-flex > wui-text {
|
|
1778
|
-
color: var(--wui-color-fg-100);
|
|
1779
|
-
max-width: 86px;
|
|
1780
|
-
white-space: nowrap;
|
|
1781
|
-
overflow: hidden;
|
|
1782
|
-
text-overflow: ellipsis;
|
|
1783
|
-
justify-content: center;
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
button > wui-flex > wui-text.certified {
|
|
1787
|
-
max-width: 66px;
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
button:hover:enabled {
|
|
1791
|
-
background-color: var(--wui-color-gray-glass-005);
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
button:disabled > wui-flex > wui-text {
|
|
1795
|
-
color: var(--wui-color-gray-glass-015);
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
[data-selected='true'] {
|
|
1799
|
-
background-color: var(--wui-color-accent-glass-020);
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
@media (hover: hover) and (pointer: fine) {
|
|
1803
|
-
[data-selected='true']:hover:enabled {
|
|
1804
|
-
background-color: var(--wui-color-accent-glass-015);
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
[data-selected='true']:active:enabled {
|
|
1809
|
-
background-color: var(--wui-color-accent-glass-010);
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
@media (max-width: 350px) {
|
|
1813
|
-
button {
|
|
1814
|
-
width: 100%;
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
`;var Gt=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let yt=class extends _{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.wallet=void 0,this.observer=new IntersectionObserver(t=>{t.forEach(i=>{i.isIntersecting?(this.visible=!0,this.fetchImageSrc()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){var i,n;const t=((i=this.wallet)==null?void 0:i.badge_type)==="certified";return c`
|
|
1818
|
-
<button>
|
|
1819
|
-
${this.imageTemplate()}
|
|
1820
|
-
<wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="3xs">
|
|
1821
|
-
<wui-text
|
|
1822
|
-
variant="tiny-500"
|
|
1823
|
-
color="inherit"
|
|
1824
|
-
class=${y(t?"certified":void 0)}
|
|
1825
|
-
>${(n=this.wallet)==null?void 0:n.name}</wui-text
|
|
1826
|
-
>
|
|
1827
|
-
${t?c`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null}
|
|
1828
|
-
</wui-flex>
|
|
1829
|
-
</button>
|
|
1830
|
-
`}imageTemplate(){var t,i;return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():c`
|
|
1831
|
-
<wui-wallet-image
|
|
1832
|
-
size="md"
|
|
1833
|
-
imageSrc=${y(this.imageSrc)}
|
|
1834
|
-
name=${(t=this.wallet)==null?void 0:t.name}
|
|
1835
|
-
.installed=${(i=this.wallet)==null?void 0:i.installed}
|
|
1836
|
-
badgeSize="sm"
|
|
1837
|
-
>
|
|
1838
|
-
</wui-wallet-image>
|
|
1839
|
-
`}shimmerTemplate(){return c`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=D.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=await D.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}};yt.styles=_o;Gt([v()],yt.prototype,"visible",void 0);Gt([v()],yt.prototype,"imageSrc",void 0);Gt([v()],yt.prototype,"imageLoading",void 0);Gt([u()],yt.prototype,"wallet",void 0);yt=Gt([C("w3m-all-wallets-list-item")],yt);const Io=P`
|
|
1840
|
-
wui-grid {
|
|
1841
|
-
max-height: clamp(360px, 400px, 80vh);
|
|
1842
|
-
overflow: scroll;
|
|
1843
|
-
scrollbar-width: none;
|
|
1844
|
-
grid-auto-rows: min-content;
|
|
1845
|
-
grid-template-columns: repeat(auto-fill, 104px);
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
@media (max-width: 350px) {
|
|
1849
|
-
wui-grid {
|
|
1850
|
-
grid-template-columns: repeat(2, 1fr);
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
wui-grid[data-scroll='false'] {
|
|
1855
|
-
overflow: hidden;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
wui-grid::-webkit-scrollbar {
|
|
1859
|
-
display: none;
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
wui-loading-spinner {
|
|
1863
|
-
padding-top: var(--wui-spacing-l);
|
|
1864
|
-
padding-bottom: var(--wui-spacing-l);
|
|
1865
|
-
justify-content: center;
|
|
1866
|
-
grid-column: 1 / span 4;
|
|
1867
|
-
}
|
|
1868
|
-
`;var Bt=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};const bi="local-paginator";let pt=class extends _{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!S.state.wallets.length,this.wallets=S.state.wallets,this.recommended=S.state.recommended,this.featured=S.state.featured,this.filteredWallets=S.state.filteredWallets,this.unsubscribe.push(S.subscribeKey("wallets",t=>this.wallets=t),S.subscribeKey("recommended",t=>this.recommended=t),S.subscribeKey("featured",t=>this.featured=t),S.subscribeKey("filteredWallets",t=>this.filteredWallets=t))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){var t;this.unsubscribe.forEach(i=>i()),(t=this.paginationObserver)==null||t.disconnect()}render(){return c`
|
|
1869
|
-
<wui-grid
|
|
1870
|
-
data-scroll=${!this.loading}
|
|
1871
|
-
.padding=${["0","s","s","s"]}
|
|
1872
|
-
columnGap="xxs"
|
|
1873
|
-
rowGap="l"
|
|
1874
|
-
justifyContent="space-between"
|
|
1875
|
-
>
|
|
1876
|
-
${this.loading?this.shimmerTemplate(16):this.walletsTemplate()}
|
|
1877
|
-
${this.paginationLoaderTemplate()}
|
|
1878
|
-
</wui-grid>
|
|
1879
|
-
`}async initialFetch(){var i;this.loading=!0;const t=(i=this.shadowRoot)==null?void 0:i.querySelector("wui-grid");t&&(await S.fetchWalletsByPage({page:1}),await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(t,i){return[...Array(t)].map(()=>c`
|
|
1880
|
-
<wui-card-select-loader type="wallet" id=${y(i)}></wui-card-select-loader>
|
|
1881
|
-
`)}walletsTemplate(){var n;const t=((n=this.filteredWallets)==null?void 0:n.length)>0?I.uniqueBy([...this.featured,...this.recommended,...this.filteredWallets],"id"):I.uniqueBy([...this.featured,...this.recommended,...this.wallets],"id");return fe.markWalletsAsInstalled(t).map(o=>c`
|
|
1882
|
-
<w3m-all-wallets-list-item
|
|
1883
|
-
@click=${()=>this.onConnectWallet(o)}
|
|
1884
|
-
.wallet=${o}
|
|
1885
|
-
></w3m-all-wallets-list-item>
|
|
1886
|
-
`)}paginationLoaderTemplate(){const{wallets:t,recommended:i,featured:n,count:o}=S.state,e=window.innerWidth<352?3:4,a=t.length+i.length;let l=Math.ceil(a/e)*e-a+e;return l-=t.length?n.length%e:0,o===0&&n.length>0?null:o===0||[...n,...t,...i].length<o?this.shimmerTemplate(l,bi):null}createPaginationObserver(){var i;const t=(i=this.shadowRoot)==null?void 0:i.querySelector(`#${bi}`);t&&(this.paginationObserver=new IntersectionObserver(([n])=>{if(n!=null&&n.isIntersecting&&!this.loading){const{page:o,count:e,wallets:a}=S.state;a.length<e&&S.fetchWalletsByPage({page:o+1})}}),this.paginationObserver.observe(t))}onConnectWallet(t){L.selectWalletConnector(t)}};pt.styles=Io;Bt([v()],pt.prototype,"loading",void 0);Bt([v()],pt.prototype,"wallets",void 0);Bt([v()],pt.prototype,"recommended",void 0);Bt([v()],pt.prototype,"featured",void 0);Bt([v()],pt.prototype,"filteredWallets",void 0);pt=Bt([C("w3m-all-wallets-list")],pt);const Eo=P`
|
|
1887
|
-
wui-grid,
|
|
1888
|
-
wui-loading-spinner,
|
|
1889
|
-
wui-flex {
|
|
1890
|
-
height: 360px;
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
wui-grid {
|
|
1894
|
-
overflow: scroll;
|
|
1895
|
-
scrollbar-width: none;
|
|
1896
|
-
grid-auto-rows: min-content;
|
|
1897
|
-
grid-template-columns: repeat(auto-fill, 104px);
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
wui-grid[data-scroll='false'] {
|
|
1901
|
-
overflow: hidden;
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
wui-grid::-webkit-scrollbar {
|
|
1905
|
-
display: none;
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
wui-loading-spinner {
|
|
1909
|
-
justify-content: center;
|
|
1910
|
-
align-items: center;
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
@media (max-width: 350px) {
|
|
1914
|
-
wui-grid {
|
|
1915
|
-
grid-template-columns: repeat(2, 1fr);
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
`;var _e=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let St=class extends _{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?c`<wui-loading-spinner color="accent-100"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await S.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){const{search:t}=S.state,i=fe.markWalletsAsInstalled(t);return t.length?c`
|
|
1919
|
-
<wui-grid
|
|
1920
|
-
data-testid="wallet-list"
|
|
1921
|
-
.padding=${["0","s","s","s"]}
|
|
1922
|
-
rowGap="l"
|
|
1923
|
-
columnGap="xs"
|
|
1924
|
-
justifyContent="space-between"
|
|
1925
|
-
>
|
|
1926
|
-
${i.map(n=>c`
|
|
1927
|
-
<w3m-all-wallets-list-item
|
|
1928
|
-
@click=${()=>this.onConnectWallet(n)}
|
|
1929
|
-
.wallet=${n}
|
|
1930
|
-
data-testid="wallet-search-item-${n.id}"
|
|
1931
|
-
></w3m-all-wallets-list-item>
|
|
1932
|
-
`)}
|
|
1933
|
-
</wui-grid>
|
|
1934
|
-
`:c`
|
|
1935
|
-
<wui-flex
|
|
1936
|
-
data-testid="no-wallet-found"
|
|
1937
|
-
justifyContent="center"
|
|
1938
|
-
alignItems="center"
|
|
1939
|
-
gap="s"
|
|
1940
|
-
flexDirection="column"
|
|
1941
|
-
>
|
|
1942
|
-
<wui-icon-box
|
|
1943
|
-
size="lg"
|
|
1944
|
-
iconColor="fg-200"
|
|
1945
|
-
backgroundColor="fg-300"
|
|
1946
|
-
icon="wallet"
|
|
1947
|
-
background="transparent"
|
|
1948
|
-
></wui-icon-box>
|
|
1949
|
-
<wui-text data-testid="no-wallet-found-text" color="fg-200" variant="paragraph-500">
|
|
1950
|
-
No Wallet found
|
|
1951
|
-
</wui-text>
|
|
1952
|
-
</wui-flex>
|
|
1953
|
-
`}onConnectWallet(t){L.selectWalletConnector(t)}};St.styles=Eo;_e([v()],St.prototype,"loading",void 0);_e([u()],St.prototype,"query",void 0);_e([u()],St.prototype,"badge",void 0);St=_e([C("w3m-all-wallets-search")],St);var ai=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let pe=class extends _{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=I.debounce(t=>{this.search=t})}render(){const t=this.search.length>=2;return c`
|
|
1954
|
-
<wui-flex .padding=${["0","s","s","s"]} gap="xs">
|
|
1955
|
-
<wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
|
|
1956
|
-
<wui-certified-switch
|
|
1957
|
-
?checked=${this.badge}
|
|
1958
|
-
@click=${this.onClick.bind(this)}
|
|
1959
|
-
data-testid="wui-certified-switch"
|
|
1960
|
-
></wui-certified-switch>
|
|
1961
|
-
${this.qrButtonTemplate()}
|
|
1962
|
-
</wui-flex>
|
|
1963
|
-
${t||this.badge?c`<w3m-all-wallets-search
|
|
1964
|
-
query=${this.search}
|
|
1965
|
-
badge=${y(this.badge)}
|
|
1966
|
-
></w3m-all-wallets-search>`:c`<w3m-all-wallets-list badge=${y(this.badge)}></w3m-all-wallets-list>`}
|
|
1967
|
-
`}onInputChange(t){this.onDebouncedSearch(t.detail)}onClick(){if(this.badge==="certified"){this.badge=void 0;return}this.badge="certified",Qt.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})}qrButtonTemplate(){return I.isMobile()?c`
|
|
1968
|
-
<wui-icon-box
|
|
1969
|
-
size="lg"
|
|
1970
|
-
iconSize="xl"
|
|
1971
|
-
iconColor="accent-100"
|
|
1972
|
-
backgroundColor="accent-100"
|
|
1973
|
-
icon="qrCode"
|
|
1974
|
-
background="transparent"
|
|
1975
|
-
border
|
|
1976
|
-
borderColor="wui-accent-glass-010"
|
|
1977
|
-
@click=${this.onWalletConnectQr.bind(this)}
|
|
1978
|
-
></wui-icon-box>
|
|
1979
|
-
`:null}onWalletConnectQr(){O.push("ConnectingWalletConnect")}};ai([v()],pe.prototype,"search",void 0);ai([v()],pe.prototype,"badge",void 0);pe=ai([C("w3m-all-wallets-view")],pe);const Wo=P`
|
|
1980
|
-
button {
|
|
1981
|
-
column-gap: var(--wui-spacing-s);
|
|
1982
|
-
padding: 11px 18px 11px var(--wui-spacing-s);
|
|
1983
|
-
width: 100%;
|
|
1984
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
1985
|
-
border-radius: var(--wui-border-radius-xs);
|
|
1986
|
-
color: var(--wui-color-fg-250);
|
|
1987
|
-
transition:
|
|
1988
|
-
color var(--wui-ease-out-power-1) var(--wui-duration-md),
|
|
1989
|
-
background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
1990
|
-
will-change: color, background-color;
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
button[data-iconvariant='square'],
|
|
1994
|
-
button[data-iconvariant='square-blue'] {
|
|
1995
|
-
padding: 6px 18px 6px 9px;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
button > wui-flex {
|
|
1999
|
-
flex: 1;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
button > wui-image {
|
|
2003
|
-
width: 32px;
|
|
2004
|
-
height: 32px;
|
|
2005
|
-
box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
|
|
2006
|
-
border-radius: var(--wui-border-radius-3xl);
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
button > wui-icon {
|
|
2010
|
-
width: 36px;
|
|
2011
|
-
height: 36px;
|
|
2012
|
-
transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
2013
|
-
will-change: opacity;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
button > wui-icon-box[data-variant='blue'] {
|
|
2017
|
-
box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005);
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
button > wui-icon-box[data-variant='overlay'] {
|
|
2021
|
-
box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
button > wui-icon-box[data-variant='square-blue'] {
|
|
2025
|
-
border-radius: var(--wui-border-radius-3xs);
|
|
2026
|
-
position: relative;
|
|
2027
|
-
border: none;
|
|
2028
|
-
width: 36px;
|
|
2029
|
-
height: 36px;
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
button > wui-icon-box[data-variant='square-blue']::after {
|
|
2033
|
-
content: '';
|
|
2034
|
-
position: absolute;
|
|
2035
|
-
top: 0;
|
|
2036
|
-
bottom: 0;
|
|
2037
|
-
left: 0;
|
|
2038
|
-
right: 0;
|
|
2039
|
-
border-radius: inherit;
|
|
2040
|
-
border: 1px solid var(--wui-color-accent-glass-010);
|
|
2041
|
-
pointer-events: none;
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
button > wui-icon:last-child {
|
|
2045
|
-
width: 14px;
|
|
2046
|
-
height: 14px;
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
button:disabled {
|
|
2050
|
-
color: var(--wui-color-gray-glass-020);
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
button[data-loading='true'] > wui-icon {
|
|
2054
|
-
opacity: 0;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
wui-loading-spinner {
|
|
2058
|
-
position: absolute;
|
|
2059
|
-
right: 18px;
|
|
2060
|
-
top: 50%;
|
|
2061
|
-
transform: translateY(-50%);
|
|
2062
|
-
}
|
|
2063
|
-
`;var X=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let F=class extends _{constructor(){super(...arguments),this.tabIdx=void 0,this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return c`
|
|
2064
|
-
<button
|
|
2065
|
-
?disabled=${this.loading?!0:!!this.disabled}
|
|
2066
|
-
data-loading=${this.loading}
|
|
2067
|
-
data-iconvariant=${y(this.iconVariant)}
|
|
2068
|
-
tabindex=${y(this.tabIdx)}
|
|
2069
|
-
>
|
|
2070
|
-
${this.loadingTemplate()} ${this.visualTemplate()}
|
|
2071
|
-
<wui-flex gap="3xs">
|
|
2072
|
-
<slot></slot>
|
|
2073
|
-
</wui-flex>
|
|
2074
|
-
${this.chevronTemplate()}
|
|
2075
|
-
</button>
|
|
2076
|
-
`}visualTemplate(){if(this.variant==="image"&&this.imageSrc)return c`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if(this.iconVariant==="square"&&this.icon&&this.variant==="icon")return c`<wui-icon name=${this.icon}></wui-icon>`;if(this.variant==="icon"&&this.icon&&this.iconVariant){const t=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",i=this.iconVariant==="square-blue"?"mdl":"md",n=this.iconSize?this.iconSize:i;return c`
|
|
2077
|
-
<wui-icon-box
|
|
2078
|
-
data-variant=${this.iconVariant}
|
|
2079
|
-
icon=${this.icon}
|
|
2080
|
-
iconSize=${n}
|
|
2081
|
-
background="transparent"
|
|
2082
|
-
iconColor=${t}
|
|
2083
|
-
backgroundColor=${t}
|
|
2084
|
-
size=${i}
|
|
2085
|
-
></wui-icon-box>
|
|
2086
|
-
`}return null}loadingTemplate(){return this.loading?c`<wui-loading-spinner
|
|
2087
|
-
data-testid="wui-list-item-loading-spinner"
|
|
2088
|
-
color="fg-300"
|
|
2089
|
-
></wui-loading-spinner>`:c``}chevronTemplate(){return this.chevron?c`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}};F.styles=[A,M,Wo];X([u()],F.prototype,"icon",void 0);X([u()],F.prototype,"iconSize",void 0);X([u()],F.prototype,"tabIdx",void 0);X([u()],F.prototype,"variant",void 0);X([u()],F.prototype,"iconVariant",void 0);X([u({type:Boolean})],F.prototype,"disabled",void 0);X([u()],F.prototype,"imageSrc",void 0);X([u()],F.prototype,"alt",void 0);X([u({type:Boolean})],F.prototype,"chevron",void 0);X([u({type:Boolean})],F.prototype,"loading",void 0);F=X([C("wui-list-item")],F);var So=globalThis&&globalThis.__decorate||function(r,t,i,n){var o=arguments.length,e=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,i,n);else for(var s=r.length-1;s>=0;s--)(a=r[s])&&(e=(o<3?a(e):o>3?a(t,i,e):a(t,i))||e);return o>3&&e&&Object.defineProperty(t,i,e),e};let mi=class extends _{constructor(){var t;super(...arguments),this.wallet=(t=O.state.data)==null?void 0:t.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return c`
|
|
2090
|
-
<wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}>
|
|
2091
|
-
${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
|
|
2092
|
-
${this.homepageTemplate()}
|
|
2093
|
-
</wui-flex>
|
|
2094
|
-
`}chromeTemplate(){var t;return(t=this.wallet)!=null&&t.chrome_store?c`<wui-list-item
|
|
2095
|
-
variant="icon"
|
|
2096
|
-
icon="chromeStore"
|
|
2097
|
-
iconVariant="square"
|
|
2098
|
-
@click=${this.onChromeStore.bind(this)}
|
|
2099
|
-
chevron
|
|
2100
|
-
>
|
|
2101
|
-
<wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text>
|
|
2102
|
-
</wui-list-item>`:null}iosTemplate(){var t;return(t=this.wallet)!=null&&t.app_store?c`<wui-list-item
|
|
2103
|
-
variant="icon"
|
|
2104
|
-
icon="appStore"
|
|
2105
|
-
iconVariant="square"
|
|
2106
|
-
@click=${this.onAppStore.bind(this)}
|
|
2107
|
-
chevron
|
|
2108
|
-
>
|
|
2109
|
-
<wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text>
|
|
2110
|
-
</wui-list-item>`:null}androidTemplate(){var t;return(t=this.wallet)!=null&&t.play_store?c`<wui-list-item
|
|
2111
|
-
variant="icon"
|
|
2112
|
-
icon="playStore"
|
|
2113
|
-
iconVariant="square"
|
|
2114
|
-
@click=${this.onPlayStore.bind(this)}
|
|
2115
|
-
chevron
|
|
2116
|
-
>
|
|
2117
|
-
<wui-text variant="paragraph-500" color="fg-100">Android App</wui-text>
|
|
2118
|
-
</wui-list-item>`:null}homepageTemplate(){var t;return(t=this.wallet)!=null&&t.homepage?c`
|
|
2119
|
-
<wui-list-item
|
|
2120
|
-
variant="icon"
|
|
2121
|
-
icon="browser"
|
|
2122
|
-
iconVariant="square-blue"
|
|
2123
|
-
@click=${this.onHomePage.bind(this)}
|
|
2124
|
-
chevron
|
|
2125
|
-
>
|
|
2126
|
-
<wui-text variant="paragraph-500" color="fg-100">Website</wui-text>
|
|
2127
|
-
</wui-list-item>
|
|
2128
|
-
`:null}onChromeStore(){var t;(t=this.wallet)!=null&&t.chrome_store&&I.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){var t;(t=this.wallet)!=null&&t.app_store&&I.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var t;(t=this.wallet)!=null&&t.play_store&&I.openHref(this.wallet.play_store,"_blank")}onHomePage(){var t;(t=this.wallet)!=null&&t.homepage&&I.openHref(this.wallet.homepage,"_blank")}};mi=So([C("w3m-downloads-view")],mi);export{pe as W3mAllWalletsView,qe as W3mConnectingWcBasicView,mi as W3mDownloadsView};
|