`);
});
}), i2;
} }, Oo = i$3`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;width:100%;aspect-ratio:1/1;animation:fadeIn ease .2s}svg:first-child,w3m-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{width:25%;height:25%;border-radius:15px}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--w3m-color-fg-accent)}svg:first-child path:last-child{stroke:var(--w3m-color-overlay)}`;
var Io = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, me = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Eo(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Io(t2, a2, o3), o3;
};
let K = class extends s {
constructor() {
super(...arguments), this.uri = "", this.size = 0, this.logoSrc = "", this.walletId = "";
}
svgTemplate() {
var e2;
const t2 = (e2 = W.state.themeMode) != null ? e2 : "light";
return w``;
}
render() {
return y`${this.walletId || this.logoSrc ? y`` : g.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`;
}
};
K.styles = [u.globalCss, Oo], me([e$1()], K.prototype, "uri", 2), me([e$1({ type: Number })], K.prototype, "size", 2), me([e$1()], K.prototype, "logoSrc", 2), me([e$1()], K.prototype, "walletId", 2), K = me([e$2("w3m-qrcode")], K);
const Mo = i$3`:host{position:relative;height:28px;width:75%}input{width:100%;height:100%;line-height:28px!important;border-radius:28px;font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:transparent;position:absolute;background-color:var(--w3m-color-bg-3);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}input::placeholder{color:transparent}svg{margin-right:4px}.w3m-placeholder{top:0;left:50%;transform:translateX(-50%);transition:.2s all ease;pointer-events:none;display:flex;align-items:center;justify-content:center;height:100%;width:fit-content;position:relative}input:focus-within+.w3m-placeholder,input:not(:placeholder-shown)+.w3m-placeholder{transform:translateX(10px);left:0}w3m-text{opacity:1;transition:.2s opacity ease}input:focus-within+.w3m-placeholder w3m-text,input:not(:placeholder-shown)+.w3m-placeholder w3m-text{opacity:0}input:focus-within,input:not(:placeholder-shown){color:var(--w3m-color-fg-1)}input:focus-within{box-shadow:inset 0 0 0 1px var(--w3m-color-fg-accent)}path{fill:var(--w3m-color-fg-2)}`;
var Wo = Object.defineProperty, Ao = Object.getOwnPropertyDescriptor, ft = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Ao(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Wo(t2, a2, o3), o3;
};
let Ee = class extends s {
constructor() {
super(...arguments), this.onChange = () => null;
}
render() {
const e2 = d$2.isMobile() ? "Search mobile wallets" : "Search desktop wallets";
return y`${g.SEARCH_ICON}${e2}
`;
}
};
Ee.styles = [u.globalCss, Mo], ft([e$1()], Ee.prototype, "onChange", 2), Ee = ft([e$2("w3m-search-input")], Ee);
const Lo = i$3`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--w3m-color-fg-accent)}`;
var jo = Object.defineProperty, So = Object.getOwnPropertyDescriptor, Po = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? So(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && jo(t2, a2, o3), o3;
};
let Ze = class extends s {
render() {
return y``;
}
};
Ze.styles = [u.globalCss, Lo], Ze = Po([e$2("w3m-spinner")], Ze);
const _o = i$3`span{font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'tnum' on,'lnum' on,'case' on}.w3m-xxsmall-bold{font-weight:700;font-size:10px;line-height:12px;letter-spacing:.02em;text-transform:uppercase}.w3m-xsmall-normal{font-weight:600;font-size:12px;line-height:14px;letter-spacing:-.03em}.w3m-small-thin{font-weight:500;font-size:14px;line-height:16px;letter-spacing:-.03em}.w3m-small-normal{font-weight:600;font-size:14px;line-height:16px;letter-spacing:-.03em}.w3m-medium-thin{font-weight:500;font-size:16px;line-height:20px;letter-spacing:-.03em}.w3m-medium-normal{font-weight:600;font-size:16px;line-height:20px;letter-spacing:-.03em}.w3m-medium-bold{font-weight:700;font-size:16px;line-height:20px;letter-spacing:-.03em}.w3m-large-bold{font-weight:600;font-size:20px;line-height:24px;letter-spacing:-.03em}:host(*){color:var(--w3m-color-fg-1)}.w3m-color-primary{color:var(--w3m-color-fg-1)}.w3m-color-secondary{color:var(--w3m-color-fg-2)}.w3m-color-tertiary{color:var(--w3m-color-fg-3)}.w3m-color-inverse{color:var(--w3m-color-fg-inverse)}.w3m-color-accnt{color:var(--w3m-color-fg-accent)}.w3m-color-error{color:var(--w3m-color-err)}`;
var Do = Object.defineProperty, To = Object.getOwnPropertyDescriptor, Fe = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? To(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Do(t2, a2, o3), o3;
};
let pe = class extends s {
constructor() {
super(...arguments), this.variant = "medium-normal", this.color = "primary";
}
render() {
const e2 = { "w3m-large-bold": this.variant === "large-bold", "w3m-medium-bold": this.variant === "medium-bold", "w3m-medium-normal": this.variant === "medium-normal", "w3m-medium-thin": this.variant === "medium-thin", "w3m-small-normal": this.variant === "small-normal", "w3m-small-thin": this.variant === "small-thin", "w3m-xsmall-normal": this.variant === "xsmall-normal", "w3m-xxsmall-bold": this.variant === "xxsmall-bold", "w3m-color-primary": this.color === "primary", "w3m-color-secondary": this.color === "secondary", "w3m-color-tertiary": this.color === "tertiary", "w3m-color-inverse": this.color === "inverse", "w3m-color-accnt": this.color === "accent", "w3m-color-error": this.color === "error" };
return y``;
}
};
pe.styles = [u.globalCss, _o], Fe([e$1()], pe.prototype, "variant", 2), Fe([e$1()], pe.prototype, "color", 2), pe = Fe([e$2("w3m-text")], pe);
const No = i$3`div{overflow:hidden;position:relative;border-radius:50%}div::after{content:'';position:absolute;inset:0;border-radius:50%;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}svg{width:100%;height:100%}#token-placeholder-fill{fill:var(--w3m-color-bg-3)}#token-placeholder-dash{stroke:var(--w3m-color-overlay)}`;
var Ro = Object.defineProperty, Bo = Object.getOwnPropertyDescriptor, yt = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Bo(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Ro(t2, a2, o3), o3;
};
let Me = class extends s {
constructor() {
super(...arguments), this.symbol = void 0;
}
render() {
var e2;
const t2 = h.getTokenIcon((e2 = this.symbol) != null ? e2 : "");
return t2 ? y`` : g.TOKEN_PLACEHOLDER;
}
};
Me.styles = [u.globalCss, No], yt([e$1()], Me.prototype, "symbol", 2), Me = yt([e$2("w3m-token-image")], Me);
const Uo = i$3`button{transition:all .2s ease;width:100%;height:100%;border-radius:10px;display:flex;align-items:flex-start}button:hover{background-color:var(--w3m-color-overlay)}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}w3m-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:15px;margin-bottom:5px}.w3m-sublabel{margin-top:2px}`;
var Ho = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, z = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Zo(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Ho(t2, a2, o3), o3;
};
let H2 = class extends s {
constructor() {
super(...arguments), this.onClick = () => null, this.name = "", this.walletId = "", this.label = void 0, this.src = void 0, this.installed = false, this.recent = false;
}
sublabelTemplate() {
return this.recent ? y`RECENT` : this.installed ? y`INSTALLED` : null;
}
render() {
var e2;
return y``;
}
};
H2.styles = [u.globalCss, Uo], z([e$1()], H2.prototype, "onClick", 2), z([e$1()], H2.prototype, "name", 2), z([e$1()], H2.prototype, "walletId", 2), z([e$1()], H2.prototype, "label", 2), z([e$1()], H2.prototype, "src", 2), z([e$1()], H2.prototype, "installed", 2), z([e$1()], H2.prototype, "recent", 2), H2 = z([e$2("w3m-wallet-button")], H2);
const Fo = i$3`div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;inset:0;border-radius:inherit;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;
var zo = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, ze = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Vo(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && zo(t2, a2, o3), o3;
};
let ue = class extends s {
constructor() {
super(...arguments), this.walletId = void 0, this.src = void 0;
}
render() {
var e2;
const t2 = h.getWalletId((e2 = this.walletId) != null ? e2 : ""), a2 = h.getWalletId(t2), n2 = this.src ? this.src : h.getWalletIcon(a2);
return y`${n2.length ? y`` : g.WALLET_PLACEHOLDER}`;
}
};
ue.styles = [u.globalCss, Fo], ze([e$1()], ue.prototype, "walletId", 2), ze([e$1()], ue.prototype, "src", 2), ue = ze([e$2("w3m-wallet-image")], ue);
const Go = i$3`:host{all:initial}div{display:flex;align-items:center;background-color:var(--w3m-color-overlay);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);border-radius:10px;padding:4px 4px 4px 8px}div button{border-radius:16px;padding:4px 8px 4px 4px;height:auto;margin-left:10px;color:var(--w3m-color-fg-inverse);background-color:var(--w3m-color-fg-accent)}button::after{content:'';inset:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}w3m-avatar{margin-right:6px}w3m-button-big w3m-avatar{margin-left:-5px}`;
var qo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, xt = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Ko(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && qo(t2, a2, o3), o3;
};
let We = class extends s {
constructor() {
super(), this.balance = "hide", h.rejectStandaloneButtonComponent();
}
onOpen() {
const { isStandalone: e2 } = a$2.state;
e2 || k$1.open({ route: "Account" });
}
accountTemplate() {
return y``;
}
render() {
return this.balance === "show" ? y`
` : y`${this.accountTemplate()}`;
}
};
We.styles = [u.globalCss, Go], xt([e$1()], We.prototype, "balance", 2), We = xt([e$2("w3m-account-button")], We);
const Yo = i$3`button{display:flex;border-radius:10px;flex-direction:column;transition:background-color .2s ease;justify-content:center;padding:5px;width:100px}button:hover{background-color:var(--w3m-color-overlay)}button:disabled{pointer-events:none}w3m-network-image{width:32px;height:32px}w3m-text{margin-top:4px}`;
var Xo = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, Ve = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Qo(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Xo(t2, a2, o3), o3;
};
let ve = class extends s {
constructor() {
super(), this.chainId = "", this.label = "", this.unsubscribeNetwork = void 0;
const { selectedChain: e2 } = a$2.state;
this.chainId = e2 == null ? void 0 : e2.id.toString(), this.label = e2 == null ? void 0 : e2.name, this.unsubscribeNetwork = a$2.subscribe(({ selectedChain: t2 }) => {
this.chainId = t2 == null ? void 0 : t2.id.toString(), this.label = t2 == null ? void 0 : t2.name;
});
}
disconnectedCallback() {
var e2;
(e2 = this.unsubscribeNetwork) == null || e2.call(this);
}
onClick() {
g$2.push("SelectNetwork");
}
render() {
const { chains: e2 } = a$2.state, t2 = e2 && e2.length > 1;
return y``;
}
};
ve.styles = [u.globalCss, Yo], Ve([t$1()], ve.prototype, "chainId", 2), Ve([t$1()], ve.prototype, "label", 2), ve = Ve([e$2("w3m-account-network-button")], ve);
const Jo = i$3`@keyframes slide{0%{background-position:0 0}100%{background-position:200px 0}}w3m-text{padding:1px 0}.w3m-loading{background:linear-gradient(270deg,var(--w3m-color-fg-1) 36.33%,var(--w3m-color-fg-3) 42.07%,var(--w3m-color-fg-1) 83.3%);background-size:200px 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation-name:slide;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}`;
var ea = Object.defineProperty, ta = Object.getOwnPropertyDescriptor, ge = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? ta(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && ea(t2, a2, o3), o3;
};
let Y = class extends s {
constructor() {
super(), this.address = void 0, this.name = void 0, this.loading = true, this.variant = "button", this.unsubscribeAccount = void 0, this.address = a$2.state.address, this.name = a$2.state.profileName, this.loading = Boolean(a$2.state.profileLoading), this.unsubscribeAccount = a$2.subscribe(({ address: e2, profileName: t2, profileLoading: a2 }) => {
this.address = e2, this.name = t2, this.loading = Boolean(a2);
});
}
disconnectedCallback() {
var e2;
(e2 = this.unsubscribeAccount) == null || e2.call(this);
}
render() {
var e2;
const t2 = this.variant === "button", a2 = { "w3m-loading": this.loading };
return y`${this.name ? this.name : h.truncate((e2 = this.address) != null ? e2 : "")}`;
}
};
Y.styles = [u.globalCss, Jo], ge([t$1()], Y.prototype, "address", 2), ge([t$1()], Y.prototype, "name", 2), ge([t$1()], Y.prototype, "loading", 2), ge([e$1()], Y.prototype, "variant", 2), Y = ge([e$2("w3m-address-text")], Y);
const oa = i$3`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 10),0,0)}}.w3m-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px}.w3m-slider::after,.w3m-slider::before{content:'';height:100%;width:50px;z-index:2;position:absolute;background:linear-gradient(to right,var(--w3m-color-bg-1) 0,transparent 100%);top:0}.w3m-slider::before{left:0}.w3m-slider::after{right:0;transform:rotateZ(180deg)}.w3m-track{display:flex;width:calc(70px * 20);animation:scroll 20s linear infinite}.w3m-action{padding:30px 0 10px 0;display:flex;justify-content:center;align-items:center;flex-direction:column}.w3m-action w3m-button-big:last-child{margin-top:10px}w3m-wallet-image{width:60px;height:60px;margin:0 5px;box-shadow:0 2px 4px -2px rgba(0,0,0,.12),0 4px 4px -2px rgba(0,0,0,.08);border-radius:15px}`;
var aa = Object.defineProperty, na = Object.getOwnPropertyDescriptor, ra = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? na(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && aa(t2, a2, o3), o3;
};
let Ge = class extends s {
onGoToQrcode() {
g$2.push("Qrcode");
}
onGoToGetWallet() {
g$2.push("GetWallet");
}
render() {
const { previewWallets: e2 } = A$1.state, t2 = e2.length, a2 = [...e2, ...e2];
return y`${t2 ? y`${a2.map(({ image_url: n2 }) => y``)}
` : null}Select WalletI don’t have a wallet
`;
}
};
Ge.styles = [u.globalCss, oa], Ge = ra([e$2("w3m-android-wallet-selection")], Ge);
const ia = i$3`@keyframes slide{0%{transform:translateX(-50px)}100%{transform:translateX(200px)}}.w3m-placeholder,img{border-radius:50%;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);display:block;position:relative;overflow:hidden!important;background-color:var(--w3m-color-av-1);background-image:radial-gradient(at 66% 77%,var(--w3m-color-av-2) 0,transparent 50%),radial-gradient(at 29% 97%,var(--w3m-color-av-3) 0,transparent 50%),radial-gradient(at 99% 86%,var(--w3m-color-av-4) 0,transparent 50%),radial-gradient(at 29% 88%,var(--w3m-color-av-5) 0,transparent 50%);transform:translateZ(0)}.w3m-loader{width:50px;height:100%;background:linear-gradient(270deg,transparent 0,rgba(255,255,255,.4) 30%,transparent 100%);animation-name:slide;animation-duration:1.5s;transform:translateX(-50px);animation-iteration-count:infinite;animation-timing-function:linear;animation-delay:.55s}.w3m-small{width:24px;height:24px}.w3m-medium{width:60px;height:60px}`;
var la = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, we = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? sa(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && la(t2, a2, o3), o3;
};
let X = class extends s {
constructor() {
super(), this.address = void 0, this.avatar = void 0, this.loading = true, this.size = "small", this.unsubscribeAccount = void 0, this.address = a$2.state.address, this.avatar = a$2.state.profileAvatar, this.loading = Boolean(a$2.state.profileLoading), this.unsubscribeAccount = a$2.subscribe(({ address: e2, profileAvatar: t2, profileLoading: a2 }) => {
this.address = e2, this.avatar = t2, this.loading = Boolean(a2);
});
}
disconnectedCallback() {
var e2;
(e2 = this.unsubscribeAccount) == null || e2.call(this);
}
render() {
const e2 = { "w3m-placeholder": true, "w3m-small": this.size === "small", "w3m-medium": this.size === "medium" };
return this.avatar ? y`` : this.address ? (h.generateAvatarColors(this.address), y`${this.loading ? y`
` : null}
`) : null;
}
};
X.styles = [u.globalCss, ia], we([t$1()], X.prototype, "address", 2), we([t$1()], X.prototype, "avatar", 2), we([t$1()], X.prototype, "loading", 2), we([e$1()], X.prototype, "size", 2), X = we([e$2("w3m-avatar")], X);
const ca = i$3`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;
var da = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, qe = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? ha(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && da(t2, a2, o3), o3;
};
let be = class extends s {
constructor() {
var e2, t2;
super(), this.symbol = void 0, this.amount = void 0, this.unsubscribeAccount = void 0, this.symbol = (e2 = a$2.state.balance) == null ? void 0 : e2.symbol, this.amount = (t2 = a$2.state.balance) == null ? void 0 : t2.amount, this.unsubscribeAccount = a$2.subscribe(({ balance: a2 }) => {
this.symbol = a2 == null ? void 0 : a2.symbol, this.amount = a2 == null ? void 0 : a2.amount;
});
}
disconnectedCallback() {
var e2;
(e2 = this.unsubscribeAccount) == null || e2.call(this);
}
render() {
let e2 = "_._";
return this.amount === "0.0" && (e2 = 0), this.amount && this.amount.length > 6 && (e2 = parseFloat(this.amount).toFixed(3)), y`${e2} ${this.symbol}
`;
}
};
be.styles = [u.globalCss, ca], qe([t$1()], be.prototype, "symbol", 2), qe([t$1()], be.prototype, "amount", 2), be = qe([e$2("w3m-balance")], be);
const ma = i$3`:host{all:initial}svg{width:28px;height:20px;margin:-1px 3px 0 -5px}svg path{fill:var(--w3m-color-fg-inverse)}button:disabled svg path{fill:var(--w3m-color-fg-3)}w3m-spinner{margin:0 10px 0 0}`;
var pa = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, Ae = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? ua(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && pa(t2, a2, o3), o3;
};
let ae = class extends s {
constructor() {
super(), this.loading = false, this.label = "Connect Wallet", this.icon = "show", this.modalUnsub = void 0, h.rejectStandaloneButtonComponent(), this.modalUnsub = k$1.subscribe((e2) => {
e2.open && (this.loading = true), e2.open || (this.loading = false);
});
}
disconnectedCallback() {
var e2;
(e2 = this.modalUnsub) == null || e2.call(this);
}
iconTemplate() {
return this.icon === "show" ? g.WALLET_CONNECT_ICON : null;
}
onClick() {
a$2.state.isConnected ? this.onDisconnect() : this.onConnect();
}
onConnect() {
this.loading = true;
const { enableNetworkView: e2 } = W.state, { chains: t2, selectedChain: a2 } = a$2.state, n2 = (t2 == null ? void 0 : t2.length) && t2.length > 1;
e2 || n2 && !a2 ? k$1.open({ route: "SelectNetwork" }) : k$1.open({ route: "ConnectWallet" });
}
onDisconnect() {
L.client().disconnect(), a$2.resetAccount();
}
render() {
return y`${this.loading ? y`Connecting...` : y`${this.iconTemplate()}${this.label}`}`;
}
};
ae.styles = [u.globalCss, ma], Ae([t$1()], ae.prototype, "loading", 2), Ae([e$1()], ae.prototype, "label", 2), Ae([e$1()], ae.prototype, "icon", 2), ae = Ae([e$2("w3m-connect-button")], ae);
var va = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, fe = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? ga(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && va(t2, a2, o3), o3;
};
let ne = class extends s {
constructor() {
super(), this.isConnected = false, this.label = "Connect Wallet", this.icon = "show", this.balance = "hide", this.unsubscribeAccount = void 0, h.rejectStandaloneButtonComponent(), this.isConnected = a$2.state.isConnected, this.unsubscribeAccount = a$2.subscribe(({ isConnected: e2 }) => {
this.isConnected = e2;
});
}
disconnectedCallback() {
var e2;
(e2 = this.unsubscribeAccount) == null || e2.call(this);
}
render() {
const { enableAccountView: e2 } = W.state;
return this.isConnected && e2 ? y`` : y``;
}
};
fe([t$1()], ne.prototype, "isConnected", 2), fe([e$1()], ne.prototype, "label", 2), fe([e$1()], ne.prototype, "icon", 2), fe([e$1()], ne.prototype, "balance", 2), ne = fe([e$2("w3m-core-button")], ne);
const R = { allowedExplorerListings(e2) {
const { explorerAllowList: t2, explorerDenyList: a2 } = W.state;
let n2 = [...e2];
return t2 && (n2 = n2.filter((o3) => t2.includes(o3.id))), a2 && (n2 = n2.filter((o3) => !a2.includes(o3.id))), n2;
}, walletsWithInjected(e2) {
let t2 = [...e2 ?? []];
if (window.ethereum) {
const a2 = h.getWalletName("");
t2 = t2.filter(({ name: n2 }) => !h.caseSafeIncludes(n2, a2));
}
return t2;
}, connectorWallets() {
const { isStandalone: e2 } = a$2.state;
if (e2)
return [];
let t2 = L.client().getConnectors();
return !window.ethereum && d$2.isMobile() && (t2 = t2.filter(({ id: a2 }) => a2 !== "injected" && a2 !== Z.metaMask)), t2;
}, walletTemplatesWithRecent(e2, t2) {
let a2 = [...e2];
if (t2) {
const n2 = h.getRecentWallet();
a2 = a2.filter((o3) => !o3.values.includes(n2 == null ? void 0 : n2.name)), a2.splice(1, 0, t2);
}
return a2;
}, deduplicateExplorerListingsFromConnectors(e2) {
const { isStandalone: t2 } = a$2.state;
if (t2)
return e2;
const a2 = L.client().getConnectors().map(({ name: n2 }) => n2.toUpperCase());
return e2.filter(({ name: n2 }) => !a2.includes(n2.toUpperCase()));
} }, wa = i$3`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-desktop-title,.w3m-mobile-title{display:flex;align-items:center}.w3m-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.w3m-desktop-title{margin-bottom:10px;padding:0 10px}.w3m-subtitle{display:flex;align-items:center}.w3m-subtitle:last-child path{fill:var(--w3m-color-fg-3)}.w3m-desktop-title svg,.w3m-mobile-title svg{margin-right:6px}.w3m-desktop-title path,.w3m-mobile-title path{fill:var(--w3m-color-fg-accent)}`;
var ba = Object.defineProperty, fa = Object.getOwnPropertyDescriptor, ya = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? fa(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && ba(t2, a2, o3), o3;
};
let Ke = class extends s {
onDesktopWallet(e2) {
g$2.push("DesktopConnector", { DesktopConnector: e2 });
}
onInjectedWallet() {
g$2.push("InjectedConnector");
}
onInstallConnector() {
g$2.push("InstallConnector", { InstallConnector: { id: "metaMask", name: "MetaMask", isMobile: true, url: "https://metamask.io" } });
}
async onConnectorWallet(e2) {
window.ethereum ? e2 === "injected" || e2 === Z.metaMask ? this.onInjectedWallet() : await h.handleConnectorConnection(e2) : this.onInstallConnector();
}
desktopWalletsTemplate() {
const { desktopWallets: e2 } = W.state;
return e2 == null ? void 0 : e2.map(({ id: t2, name: a2, links: { universal: n2, native: o3 } }) => y``);
}
previewWalletsTemplate() {
let e2 = R.allowedExplorerListings(A$1.state.previewWallets);
return e2 = R.deduplicateExplorerListingsFromConnectors(e2), e2.map(({ name: t2, desktop: { universal: a2, native: n2 }, homepage: o3, image_url: r2, id: i2 }) => y``);
}
connectorWalletsTemplate() {
return R.connectorWallets().map(({ id: e2, name: t2, ready: a2 }) => y``);
}
recentWalletTemplate() {
const e2 = h.getRecentWallet();
if (!e2)
return;
const { id: t2, name: a2, links: n2, image: o3 } = e2;
return y``;
}
render() {
const { standaloneUri: e2 } = a$2.state, t2 = this.desktopWalletsTemplate(), a2 = this.previewWalletsTemplate(), n2 = this.connectorWalletsTemplate(), o3 = this.recentWalletTemplate(), r2 = [...t2 ?? [], ...a2], i2 = [...n2, ...r2], c2 = R.walletTemplatesWithRecent(i2, o3), m2 = R.walletTemplatesWithRecent(r2, o3), s2 = e2 ? m2 : c2, d3 = s2.length > 4;
let v2 = [];
d3 ? v2 = s2.filter((C2) => !C2.values.includes(Z.coinbaseWallet)).slice(0, 3) : v2 = s2;
const O = Boolean(v2.length);
return y`${g.MOBILE_ICON}Mobile
${g.SCAN_ICON}Scan with your wallet
${O ? y`${g.DESKTOP_ICON}Desktop
${v2} ${d3 ? y`` : null}
` : null}`;
}
};
Ke.styles = [u.globalCss, wa], Ke = ya([e$2("w3m-desktop-wallet-selection")], Ke);
const xa = i$3`div{background-color:var(--w3m-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--w3m-color-bg-3);text-align:center}a{color:var(--w3m-color-fg-accent);text-decoration:none;transition:opacity .2s ease-in-out}a:hover{opacity:.8}`;
var Ca = Object.defineProperty, ka = Object.getOwnPropertyDescriptor, $a = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? ka(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Ca(t2, a2, o3), o3;
};
let Ye = class extends s {
render() {
const { termsOfServiceUrl: e2, privacyPolicyUrl: t2 } = W.state;
return e2 ?? t2 ? y`` : null;
}
};
Ye.styles = [u.globalCss, xa], Ye = $a([e$2("w3m-legal-notice")], Ye);
const Oa = i$3`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;
var Ia = Object.defineProperty, Ea = Object.getOwnPropertyDescriptor, Ma = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Ea(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Ia(t2, a2, o3), o3;
};
let Xe = class extends s {
onGoToQrcode() {
g$2.push("Qrcode");
}
async onConnectorWallet(e2) {
await h.handleConnectorConnection(e2);
}
mobileWalletsTemplate() {
const { mobileWallets: e2 } = W.state, t2 = R.walletsWithInjected(e2);
if (t2.length)
return t2.map(({ id: a2, name: n2, links: { universal: o3, native: r2 } }) => y``);
}
previewWalletsTemplate() {
const { previewWallets: e2 } = A$1.state;
let t2 = R.walletsWithInjected(e2);
return t2 = R.allowedExplorerListings(t2), t2 = R.deduplicateExplorerListingsFromConnectors(t2), t2.map(({ image_url: a2, name: n2, mobile: { native: o3, universal: r2 }, id: i2 }) => y``);
}
connectorWalletsTemplate() {
let e2 = R.connectorWallets();
return window.ethereum || (e2 = e2.filter(({ id: t2 }) => t2 !== "injected" && t2 !== Z.metaMask)), e2.map(({ name: t2, id: a2, ready: n2 }) => y``);
}
recentWalletTemplate() {
const e2 = h.getRecentWallet();
if (!e2)
return;
const { id: t2, name: a2, links: n2, image: o3 } = e2;
return y``;
}
render() {
const { standaloneUri: e2 } = a$2.state, t2 = this.connectorWalletsTemplate(), a2 = this.mobileWalletsTemplate(), n2 = this.previewWalletsTemplate(), o3 = this.recentWalletTemplate(), r2 = a2 ?? n2, i2 = [...t2, ...r2], c2 = R.walletTemplatesWithRecent(i2, o3), m2 = R.walletTemplatesWithRecent(r2, o3), s2 = e2 ? m2 : c2, d3 = s2.length > 8;
let v2 = [];
d3 ? v2 = s2.filter((E2) => !E2.values.includes(Z.coinbaseWallet)).slice(0, 7) : v2 = s2;
const O = v2.slice(0, 4), C2 = v2.slice(4, 8), N2 = Boolean(v2.length);
return y`${N2 ? y`${O} ${C2.length ? y`${C2} ${d3 ? y`` : null}` : null}
` : null}`;
}
};
Xe.styles = [u.globalCss, Oa], Xe = Ma([e$2("w3m-mobile-wallet-selection")], Xe);
const Wa = i$3`:host{all:initial}.w3m-overlay{inset:0;position:fixed;z-index:var(--w3m-modal-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,.3);opacity:0;pointer-events:none}.w3m-open{pointer-events:auto}.w3m-container{position:relative;max-width:360px;width:100%;outline:0}.w3m-card{width:100%;position:relative;transform:translateY(5px);border-radius:30px;overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-color-bg-1);color:var(--w3m-color-fg-1)}@media(max-width:600px){.w3m-container{max-width:440px}.w3m-card{border-radius:40px 40px 0 0}.w3m-overlay{align-items:flex-end}}@media(max-width:600px){.w3m-container{max-width:440px}.w3m-card{transform:translateY(5px);border-radius:40px 40px 0 0}.w3m-overlay{align-items:flex-end}}`;
var Aa = Object.defineProperty, La = Object.getOwnPropertyDescriptor, Le = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? La(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Aa(t2, a2, o3), o3;
};
let re = class extends s {
constructor() {
if (super(), this.open = false, this.preload = true, this.activeChainId = void 0, this.unsubscribeModal = void 0, this.unsubscribeConfig = void 0, this.unwatchAccount = void 0, this.unwatchNetwork = void 0, this.abortController = void 0, u.setTheme(), this.unsubscribeConfig = W.subscribe(u.setTheme), this.unsubscribeModal = k$1.subscribe((e2) => {
e2.open ? this.onOpenModalEvent() : this.onCloseModalEvent();
}), !a$2.state.isStandalone) {
a$2.getAccount();
const e2 = a$2.getSelectedChain();
this.activeChainId = e2 == null ? void 0 : e2.id, this.fetchEnsProfile(), this.fetchBalance(), this.unwatchNetwork = L.client().watchNetwork((t2) => {
const a2 = t2.chain;
a2 && this.activeChainId !== a2.id && (a$2.setSelectedChain(a2), this.activeChainId = a2.id, a$2.resetBalance(), this.fetchBalance());
}), this.unwatchAccount = L.client().watchAccount((t2) => {
const { address: a2 } = a$2.state;
t2.address !== a2 && (this.fetchEnsProfile(t2.address), this.fetchBalance(t2.address)), a$2.setAddress(t2.address), a$2.setIsConnected(t2.isConnected);
});
}
this.preloadModalData();
}
disconnectedCallback() {
var e2, t2, a2, n2;
(e2 = this.unsubscribeModal) == null || e2.call(this), (t2 = this.unsubscribeConfig) == null || t2.call(this), (a2 = this.unwatchAccount) == null || a2.call(this), (n2 = this.unwatchNetwork) == null || n2.call(this);
}
get overlayEl() {
return h.getShadowRootElement(this, ".w3m-overlay");
}
get containerEl() {
return h.getShadowRootElement(this, ".w3m-container");
}
async fetchEnsProfile(e2) {
try {
if (W.state.enableAccountView) {
a$2.setProfileLoading(true);
const t2 = e2 ?? a$2.state.address, { id: a2 } = L.client().getDefaultChain();
if (t2 && a2 === 1) {
const [n2, o3] = await Promise.all([L.client().fetchEnsName({ address: t2, chainId: 1 }), L.client().fetchEnsAvatar({ address: t2, chainId: 1 })]);
o3 && await h.preloadImage(o3), a$2.setProfileName(n2), a$2.setProfileAvatar(o3);
}
}
} catch (t2) {
console.error(t2), P$1.openToast(h.getErrorMessage(t2), "error");
} finally {
a$2.setProfileLoading(false);
}
}
async fetchBalance(e2) {
try {
if (W.state.enableAccountView) {
a$2.setBalanceLoading(true);
const t2 = e2 ?? a$2.state.address;
if (t2) {
const a2 = await L.client().fetchBalance({ address: t2 });
a$2.setBalance({ amount: a2.formatted, symbol: a2.symbol });
}
}
} catch (t2) {
console.error(t2), P$1.openToast(h.getErrorMessage(t2), "error");
} finally {
a$2.setBalanceLoading(false);
}
}
toggleBodyScroll(e2) {
if (document.querySelector("body"))
if (e2) {
const t2 = document.getElementById("w3m-styles");
t2 == null ? void 0 : t2.remove();
} else
document.head.insertAdjacentHTML("beforeend", '');
}
async preloadExplorerData() {
var e2;
const { standaloneChains: t2, chains: a2, walletConnectVersion: n2 } = a$2.state, o3 = t2 == null ? void 0 : t2.join(",");
await Promise.all([A$1.getPreviewWallets({ page: 1, entries: 10, chains: o3, device: d$2.isMobile() ? "mobile" : "desktop", version: n2 }), A$1.getRecomendedWallets()]), a$2.setIsDataLoaded(true);
const { previewWallets: r2, recomendedWallets: i2 } = A$1.state, c2 = (e2 = a2 == null ? void 0 : a2.map((s2) => h.getChainIcon(s2.id))) != null ? e2 : [], m2 = [...r2, ...i2].map((s2) => s2.image_url.lg);
await this.preloadExplorerImages([...c2, ...m2]);
}
async preloadExplorerImages(e2) {
e2.length && await Promise.all(e2.map(async (t2) => h.preloadImage(t2)));
}
async preloadCustomImages() {
const e2 = h.getCustomImageUrls();
e2.length && await Promise.all(e2.map(async (t2) => h.preloadImage(t2)));
}
async preloadConnectorImages() {
if (!a$2.state.isStandalone) {
const e2 = h.getConnectorImageUrls();
e2.length && await Promise.all(e2.map(async (t2) => h.preloadImage(t2)));
}
}
async preloadModalData() {
try {
this.preload && (this.preload = false, await Promise.all([this.preloadExplorerData(), this.preloadCustomImages(), this.preloadConnectorImages()]));
} catch (e2) {
console.error(e2), P$1.openToast("Failed preloading", "error");
}
}
onCloseModal(e2) {
e2.target === e2.currentTarget && k$1.close();
}
async onOpenModalEvent() {
await this.preloadModalData(), this.toggleBodyScroll(false);
const e2 = 0.2;
await animate(this.containerEl, { y: 0 }, { duration: 0 }).finished, animate(this.overlayEl, { opacity: [0, 1] }, { duration: 0.2, delay: e2 }), animate(this.containerEl, h.isMobileAnimation() ? { y: ["50vh", 0] } : { scale: [0.98, 1] }, { scale: { easing: spring({ velocity: 0.4 }) }, y: { easing: spring({ mass: 0.5 }) }, delay: e2 }), this.addKeyboardEvents(), this.open = true;
}
async onCloseModalEvent() {
this.toggleBodyScroll(true), this.removeKeyboardEvents(), await Promise.all([animate(this.containerEl, h.isMobileAnimation() ? { y: [0, "50vh"] } : { scale: [1, 0.98] }, { scale: { easing: spring({ velocity: 0 }) }, y: { easing: spring({ mass: 0.5 }) } }).finished, animate(this.overlayEl, { opacity: [1, 0] }, { duration: 0.2 }).finished]), this.open = false;
}
addKeyboardEvents() {
this.abortController = new AbortController(), window.addEventListener("keydown", (e2) => {
var t2;
e2.key === "Escape" ? k$1.close() : e2.key === "Tab" && ((t2 = e2.target) != null && t2.tagName.includes("W3M-") || this.containerEl.focus());
}, this.abortController), this.containerEl.focus();
}
removeKeyboardEvents() {
var e2;
(e2 = this.abortController) == null || e2.abort(), this.abortController = void 0;
}
render() {
const e2 = { "w3m-overlay": true, "w3m-open": this.open };
return y`${this.open ? y`
` : null}
`;
}
};
re.styles = [u.globalCss, Wa], Le([t$1()], re.prototype, "open", 2), Le([t$1()], re.prototype, "preload", 2), Le([t$1()], re.prototype, "activeChainId", 2), re = Le([e$2("w3m-modal")], re);
const ja = i$3`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;
var Sa = Object.defineProperty, Pa = Object.getOwnPropertyDescriptor, je = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Pa(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Sa(t2, a2, o3), o3;
};
let ie = class extends s {
constructor() {
super(), this.chainId = "", this.label = "", this.wrongNetwork = false, this.unsubscribeNetwork = void 0, h.rejectStandaloneButtonComponent();
const { selectedChain: e2 } = a$2.state;
this.onSetChainData(e2), this.unsubscribeNetwork = a$2.subscribe(({ selectedChain: t2 }) => {
this.onSetChainData(t2);
});
}
disconnectedCallback() {
var e2;
(e2 = this.unsubscribeNetwork) == null || e2.call(this);
}
onSetChainData(e2) {
if (e2) {
const { chains: t2 } = a$2.state, a2 = t2 == null ? void 0 : t2.map((n2) => n2.id);
this.chainId = e2.id.toString(), this.wrongNetwork = !(a2 != null && a2.includes(e2.id)), this.label = this.wrongNetwork ? "Wrong Network" : e2.name;
}
}
onClick() {
k$1.open({ route: "SelectNetwork" });
}
render() {
var e2;
const { chains: t2 } = a$2.state, a2 = t2 && t2.length > 1;
return y`${(e2 = this.label) != null && e2.length ? this.label : "Select Network"}`;
}
};
ie.styles = [u.globalCss, ja], je([t$1()], ie.prototype, "chainId", 2), je([t$1()], ie.prototype, "label", 2), je([t$1()], ie.prototype, "wrongNetwork", 2), ie = je([e$2("w3m-network-switch")], ie);
const _a = i$3`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:10px;transition:background-color .2s ease;height:100%;justify-content:flex-start}.w3m-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:15px;justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}button:hover{background-color:var(--w3m-color-overlay)}.w3m-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:8px;border:1px solid var(--w3m-color-overlay)}.w3m-icons svg{width:21px;height:21px}.w3m-icons img:nth-child(1),.w3m-icons img:nth-child(2),.w3m-icons svg:nth-child(1),.w3m-icons svg:nth-child(2){margin-bottom:4px}w3m-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;
var Da = Object.defineProperty, Ta = Object.getOwnPropertyDescriptor, Na = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Ta(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Da(t2, a2, o3), o3;
};
let Qe = class extends s {
onClick() {
g$2.push("WalletExplorer");
}
render() {
const { previewWallets: e2 } = A$1.state, t2 = h.getCustomWallets(), a2 = [...e2, ...t2].reverse().slice(0, 4);
return y``;
}
};
Qe.styles = [u.globalCss, _a], Qe = Na([e$2("w3m-view-all-wallets-button")], Qe);
const Ra = i$3`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;
var Ba = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, Ct = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Ua(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Ba(t2, a2, o3), o3;
};
let Se = class extends s {
constructor() {
super(), this.uri = "", this.createConnectionAndWait();
}
get overlayEl() {
return h.getShadowRootElement(this, ".w3m-qr-container");
}
async createConnectionAndWait(e2 = 0) {
var t2;
try {
const { standaloneUri: a2 } = a$2.state;
a2 ? setTimeout(() => this.uri = a2, 0) : (await L.client().connectWalletConnect((n2) => this.uri = n2, (t2 = a$2.state.selectedChain) == null ? void 0 : t2.id), k$1.close());
} catch (a2) {
console.error(a2), P$1.openToast("Connection request declined", "error"), e2 < 2 && this.createConnectionAndWait(e2 + 1);
}
}
render() {
return y`${this.uri ? y`` : y``}
`;
}
};
Se.styles = [u.globalCss, Ra], Ct([t$1()], Se.prototype, "uri", 2), Se = Ct([e$2("w3m-walletconnect-qr")], Se);
const Ha = i$3`.w3m-profile{display:flex;justify-content:space-between;align-items:flex-start;padding-top:20px}.w3m-connection-badge{background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);padding:6px 10px 6px 26px;position:relative;border-radius:28px}.w3m-connection-badge::before{content:'';position:absolute;width:10px;height:10px;left:10px;background-color:var(--w3m-color-success);border-radius:50%;top:50%;margin-top:-5px;box-shadow:0 1px 4px 1px var(--w3m-color-success),inset 0 0 0 1px var(--w3m-color-overlay)}.w3m-footer{display:flex;justify-content:space-between}w3m-address-text{margin-top:10px;display:block}.w3m-balance{border-top:1px solid var(--w3m-color-bg-2);padding:11px 20px}`;
var Za = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, za = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Fa(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Za(t2, a2, o3), o3;
};
let Je = class extends s {
onDisconnect() {
k$1.close(), L.client().disconnect(), a$2.resetAccount();
}
async onCopyAddress() {
var e2;
await navigator.clipboard.writeText((e2 = a$2.state.address) != null ? e2 : ""), P$1.openToast("Address copied", "success");
}
render() {
return y`
`;
}
};
Je.styles = [u.globalCss, Ha], Je = za([e$2("w3m-account-view")], Je);
var Va = Object.defineProperty, Ga = Object.getOwnPropertyDescriptor, qa = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Ga(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Va(t2, a2, o3), o3;
};
let et = class extends s {
viewTemplate() {
return d$2.isAndroid() ? y`` : d$2.isMobile() ? y`` : y``;
}
render() {
return y`${this.viewTemplate()}`;
}
};
et.styles = [u.globalCss], et = qa([e$2("w3m-connect-wallet-view")], et);
const Ka = i$3`.w3m-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}w3m-spinner{margin-right:10px}w3m-wallet-image{border-radius:15px;width:25%;aspect-ratio:1/1;margin-bottom:20px}.w3m-install-actions{display:flex}.w3m-install-actions w3m-button{margin:0 5px;opacity:1}`;
var Ya = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, kt = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? Xa(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Ya(t2, a2, o3), o3;
};
let Pe = class extends s {
constructor() {
super(), this.uri = "", this.createConnectionAndWait();
}
getRouterData() {
var e2;
const t2 = (e2 = g$2.state.data) == null ? void 0 : e2.DesktopConnector;
if (!t2)
throw new Error("Missing router data");
return t2;
}
onFormatAndRedirect(e2) {
const { native: t2, universal: a2, name: n2 } = this.getRouterData();
if (t2) {
const o3 = d$2.formatNativeUrl(t2, e2, n2);
d$2.openHref(o3);
} else if (a2) {
const o3 = d$2.formatUniversalUrl(a2, e2, n2);
d$2.openHref(o3, "_blank");
}
}
async createConnectionAndWait(e2 = 0) {
var t2;
const { standaloneUri: a2 } = a$2.state, { name: n2, walletId: o3, native: r2, universal: i2, icon: c2 } = this.getRouterData(), m2 = { name: n2, id: o3, links: { native: r2, universal: i2 }, image: c2 };
if (a2)
h.setRecentWallet(m2), this.onFormatAndRedirect(a2);
else
try {
await L.client().connectWalletConnect((s2) => {
this.uri = s2, this.onFormatAndRedirect(s2);
}, (t2 = a$2.state.selectedChain) == null ? void 0 : t2.id), h.setRecentWallet(m2), k$1.close();
} catch (s2) {
console.error(s2), P$1.openToast("Connection request declined", "error"), e2 < 2 && this.createConnectionAndWait(e2 + 1);
}
}
onConnectWithMobile() {
g$2.push("Qrcode");
}
onGoToWallet() {
const { universal: e2, name: t2 } = this.getRouterData();
if (e2) {
const a2 = d$2.formatUniversalUrl(e2, this.uri, t2);
d$2.openHref(a2, "_blank");
}
}
render() {
const { name: e2, icon: t2, universal: a2, walletId: n2 } = this.getRouterData(), o3 = h.getWalletName(e2);
return y`${t2 ? y`
` : y`
`}
${`Continue in ${o3}...`}
Retry${a2 ? y`Go to Wallet` : y`Connect with Mobile`}
`;
}
};
Pe.styles = [u.globalCss, Ka], kt([t$1()], Pe.prototype, "uri", 2), Pe = kt([e$2("w3m-desktop-connector-view")], Pe);
const Qa = i$3`.w3m-info-text{margin:5px 0 15px;max-width:320px;text-align:center}.w3m-wallet-item{margin:0 -20px 0 0;padding-right:20px;display:flex;align-items:center;border-bottom:1px solid var(--w3m-color-bg-2)}.w3m-wallet-item:last-child{margin-bottom:-20px;border-bottom:0}.w3m-wallet-content{margin-left:20px;height:60px;display:flex;flex:1;align-items:center;justify-content:space-between}.w3m-footer-actions{display:flex;flex-direction:column;align-items:center;padding:20px 0;border-top:1px solid var(--w3m-color-bg-2)}w3m-wallet-image{display:block;width:40px;height:40px;border-radius:10px}`;
var Ja = Object.defineProperty, en = Object.getOwnPropertyDescriptor, tn = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? en(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Ja(t2, a2, o3), o3;
};
let tt = class extends s {
constructor() {
super(...arguments), this.explorerUrl = "https://explorer.walletconnect.com/";
}
onGet(e2) {
d$2.openHref(e2, "_blank");
}
onExplore() {
d$2.openHref(this.explorerUrl, "_blank");
}
render() {
const { recomendedWallets: e2 } = A$1.state, t2 = h.getCustomWallets().slice(0, 6), a2 = e2.length, n2 = t2.length;
return y`${a2 ? e2.map(({ name: o3, image_url: r2, homepage: i2 }) => y``) : null} ${n2 ? t2.map(({ name: o3, id: r2, links: i2 }) => y``) : null}`;
}
};
tt.styles = [u.globalCss, Qa], tt = tn([e$2("w3m-get-wallet-view")], tt);
const on = i$3`.w3m-footer-actions{display:flex;justify-content:center}.w3m-footer-actions w3m-button{margin:0 5px}.w3m-info-container{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:20px}.w3m-info-container:last-child{margin-bottom:0}.w3m-info-text{margin-top:5px;text-align:center}.w3m-images svg{margin:0 2px 5px;width:55px;height:55px}.help-img-highlight{stroke:var(--w3m-color-overlay)}`;
var an = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, rn = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? nn(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && an(t2, a2, o3), o3;
};
let ot = class extends s {
constructor() {
super(...arguments), this.learnUrl = "https://ethereum.org/en/wallets/";
}
onGet() {
g$2.push("GetWallet");
}
onLearnMore() {
d$2.openHref(this.learnUrl, "_blank");
}
render() {
return y`${g.HELP_CHART_IMG} ${g.HELP_PAINTING_IMG} ${g.HELP_ETH_IMG}
A home for your digital assetsA wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.${g.HELP_KEY_IMG} ${g.HELP_USER_IMG} ${g.HELP_LOCK_IMG}
One login for all of web3Log in to any app by connecting your wallet. Say goodbye to countless passwords!${g.HELP_COMPAS_IMG} ${g.HELP_NOUN_IMG} ${g.HELP_DAO_IMG}
Your gateway to a new webWith your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more. `;
}
};
ot.styles = [u.globalCss, on], ot = rn([e$2("w3m-help-view")], ot);
const ln = i$3`.w3m-injected-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:20px}w3m-spinner{margin-right:10px}w3m-wallet-image{border-radius:15px;width:25%;aspect-ratio:1/1;margin-bottom:20px}w3m-button{opacity:0}.w3m-injected-error w3m-button{opacity:1}`;
var sn = Object.defineProperty, cn = Object.getOwnPropertyDescriptor, at = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? cn(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && sn(t2, a2, o3), o3;
};
let ye = class extends s {
constructor() {
super(), this.connecting = true, this.error = false, this.connector = L.client().getConnectorById("injected"), this.onConnect();
}
async onConnect() {
const { ready: e2 } = this.connector;
e2 && (this.error = false, this.connecting = true, await h.handleConnectorConnection("injected", () => {
this.error = true, this.connecting = false;
}));
}
render() {
const e2 = h.getWalletName(this.connector.name), t2 = h.getWalletId(this.connector.id), a2 = { "w3m-injected-wrapper": true, "w3m-injected-error": this.error };
return y`${this.connecting ? y`` : null}${this.error ? "Connection declined" : `Continue in ${e2}...`}
Try Again `;
}
};
ye.styles = [u.globalCss, ln], at([t$1()], ye.prototype, "connecting", 2), at([t$1()], ye.prototype, "error", 2), ye = at([e$2("w3m-injected-connector-view")], ye);
const dn = i$3`.w3m-injected-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}.w3m-install-title{display:flex;align-items:center;justify-content:center;flex-direction:column}.w3m-install-title w3m-text:last-child{margin-top:10px;max-width:240px}.w3m-install-actions{display:flex;margin-top:15px;align-items:center;flex-direction:column}@media(max-width:355px){.w3m-install-actions{flex-direction:column;align-items:center}}w3m-wallet-image{border-radius:15px;width:25%;aspect-ratio:1/1;margin-bottom:20px}w3m-button{opacity:0}.w3m-install-actions w3m-button{margin:5px;opacity:1}.w3m-info-text{text-align:center}`;
var hn = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, pn = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? mn(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && hn(t2, a2, o3), o3;
};
let nt = class extends s {
getRouterData() {
var e2;
const t2 = (e2 = g$2.state.data) == null ? void 0 : e2.InstallConnector;
if (!t2)
throw new Error("Missing router data");
return t2;
}
onInstall() {
const { url: e2 } = this.getRouterData();
d$2.openHref(e2, "_blank");
}
onMobile() {
const { name: e2 } = this.getRouterData();
g$2.push("ConnectWallet"), P$1.openToast(`Scan the code with ${e2}`, "success");
}
render() {
const { name: e2, id: t2, isMobile: a2 } = this.getRouterData();
return y`Install ${e2}To connect ${e2}, install the browser extension.
Install Extension${a2 ? y`${e2} Mobile` : null}
`;
}
};
nt.styles = [u.globalCss, dn], nt = pn([e$2("w3m-install-connector-view")], nt);
var un = Object.defineProperty, vn = Object.getOwnPropertyDescriptor, gn = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? vn(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && un(t2, a2, o3), o3;
};
let rt = class extends s {
render() {
return y``;
}
};
rt.styles = [u.globalCss], rt = gn([e$2("w3m-qrcode-view")], rt);
const wn = i$3`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}`;
var bn = Object.defineProperty, fn = Object.getOwnPropertyDescriptor, yn = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? fn(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && bn(t2, a2, o3), o3;
};
let it = class extends s {
async onSelectChain(e2) {
const { isConnected: t2, selectedChain: a2, walletConnectVersion: n2 } = a$2.state;
t2 ? (a2 == null ? void 0 : a2.id) === e2.id ? g$2.replace("Account") : n2 === 2 ? (await L.client().switchNetwork({ chainId: e2.id }), g$2.replace("Account")) : g$2.push("SwitchNetwork", { SwitchNetwork: e2 }) : (g$2.push("ConnectWallet"), a$2.setSelectedChain(e2));
}
render() {
const { chains: e2 } = a$2.state;
return y`${e2 == null ? void 0 : e2.map((t2) => y`${t2.name}`)}
`;
}
};
it.styles = [u.globalCss, wn], it = yn([e$2("w3m-select-network-view")], it);
const xn = i$3`.w3m-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}w3m-spinner{margin-right:10px}w3m-network-image{width:96px;height:96px;margin-bottom:20px}w3m-button{opacity:0}.w3m-error w3m-button{opacity:1}`;
var Cn = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, $t = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? kn(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && Cn(t2, a2, o3), o3;
};
let _e = class extends s {
constructor() {
super(), this.error = false, this.onSwitchNetwork();
}
getRouterData() {
var e2;
const t2 = (e2 = g$2.state.data) == null ? void 0 : e2.SwitchNetwork;
if (!t2)
throw new Error("Missing router data");
return t2;
}
async onSwitchNetwork() {
try {
this.error = false;
const e2 = this.getRouterData();
await L.client().switchNetwork({ chainId: e2.id }), a$2.setSelectedChain(e2), g$2.replace("Account");
} catch {
this.error = true;
}
}
render() {
const { id: e2, name: t2 } = this.getRouterData(), a2 = { "w3m-wrapper": true, "w3m-error": this.error };
return y`${this.error ? null : y``}${this.error ? "Connection declined" : "Approve in your wallet"}
Try Again `;
}
};
_e.styles = [u.globalCss, xn], $t([t$1()], _e.prototype, "error", 2), _e = $t([e$2("w3m-switch-network-view")], _e);
const $n = i$3`w3m-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}w3m-modal-content::after,w3m-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}w3m-modal-content::before{box-shadow:0 -1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(var(--w3m-color-bg-1),rgba(255,255,255,0))}w3m-modal-content::after{box-shadow:0 1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--w3m-color-bg-1));top:calc(100% - 20px)}w3m-modal-content::-webkit-scrollbar{display:none}.w3m-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.w3m-empty,.w3m-loading{display:flex}.w3m-loading .w3m-placeholder-block{height:100%}.w3m-end-reached .w3m-placeholder-block{height:0;opacity:0}.w3m-empty .w3m-placeholder-block{opacity:1;height:100%}w3m-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;
var On = Object.defineProperty, In = Object.getOwnPropertyDescriptor, xe = (e2, t2, a2, n2) => {
for (var o3 = n2 > 1 ? void 0 : n2 ? In(t2, a2) : t2, r2 = e2.length - 1, i2; r2 >= 0; r2--)
(i2 = e2[r2]) && (o3 = (n2 ? i2(t2, a2, o3) : i2(o3)) || o3);
return n2 && o3 && On(t2, a2, o3), o3;
};
const lt = 40;
let Q = class extends s {
constructor() {
super(...arguments), this.loading = !A$1.state.wallets.listings.length, this.firstFetch = !A$1.state.wallets.listings.length, this.search = "", this.endReached = false, this.intersectionObserver = void 0, this.searchDebounce = h.debounce((e2) => {
e2.length >= 3 ? (this.firstFetch = true, this.endReached = false, this.search = e2, A$1.resetSearch(), this.fetchWallets()) : this.search && (this.search = "", this.endReached = this.isLastPage(), A$1.resetSearch());
});
}
firstUpdated() {
this.createPaginationObserver();
}
disconnectedCallback() {
var e2;
(e2 = this.intersectionObserver) == null || e2.disconnect();
}
get placeholderEl() {
return h.getShadowRootElement(this, ".w3m-placeholder-block");
}
createPaginationObserver() {
this.intersectionObserver = new IntersectionObserver(([e2]) => {
e2.isIntersecting && !(this.search && this.firstFetch) && this.fetchWallets();
}), this.intersectionObserver.observe(this.placeholderEl);
}
isLastPage() {
const { wallets: e2, search: t2 } = A$1.state, { listings: a2, total: n2 } = this.search ? t2 : e2;
return n2 <= lt || a2.length >= n2;
}
async fetchWallets() {
var e2;
const { wallets: t2, search: a2 } = A$1.state, n2 = h.getExtensionWallets(), { listings: o3, total: r2, page: i2 } = this.search ? a2 : t2;
if (!this.endReached && (this.firstFetch || r2 > lt && o3.length < r2))
try {
this.loading = true;
const c2 = (e2 = a$2.state.standaloneChains) == null ? void 0 : e2.join(","), { listings: m2 } = await A$1.getPaginatedWallets({ page: this.firstFetch ? 1 : i2 + 1, entries: lt, device: d$2.isMobile() ? "mobile" : "desktop", search: this.search, version: a$2.state.walletConnectVersion, chains: c2 }), s2 = m2.map(({ image_url: v2 }) => v2.lg), d3 = n2.map(({ id: v2 }) => h.getWalletIcon(v2));
await Promise.all([...s2.map(async (v2) => h.preloadImage(v2)), ...d3.map(async (v2) => h.preloadImage(v2)), d$2.wait(300)]), this.endReached = this.isLastPage();
} catch (c2) {
console.error(c2), P$1.openToast(h.getErrorMessage(c2), "error");
} finally {
this.loading = false, this.firstFetch = false;
}
}
onConnectCustom({ name: e2, id: t2, links: a2 }) {
d$2.isMobile() ? h.handleMobileLinking({ links: a2, name: e2, id: t2 }) : g$2.push("DesktopConnector", { DesktopConnector: { name: e2, walletId: t2, universal: a2.universal, native: a2.native } });
}
onConnectListing(e2) {
if (d$2.isMobile()) {
const { id: t2, image_url: a2 } = e2, { native: n2, universal: o3 } = e2.mobile;
h.handleMobileLinking({ links: { native: n2, universal: o3 }, name: e2.name, id: t2, image: a2.lg });
} else
g$2.push("DesktopConnector", { DesktopConnector: { name: e2.name, icon: e2.image_url.lg, universal: e2.desktop.universal || e2.homepage, native: e2.desktop.native } });
}
onConnectExtension(e2) {
h.getWalletId("") === e2.id ? g$2.push("InjectedConnector") : g$2.push("InstallConnector", { InstallConnector: e2 });
}
onSearchChange(e2) {
const { value: t2 } = e2.target;
this.searchDebounce(t2);
}
coinbaseConnectorTemplate() {
try {
const e2 = L.client().getConnectorById(Z.coinbaseWallet);
return y``;
} catch {
return null;
}
}
render() {
const { wallets: e2, search: t2 } = A$1.state, { isStandalone: a2 } = a$2.state;
let { listings: n2 } = this.search ? t2 : e2;
n2 = R.allowedExplorerListings(n2);
const o$12 = this.loading && !n2.length, r2 = this.search.length >= 3, i2 = !o$12 && (!r2 || h.caseSafeIncludes(Z.coinbaseWallet, this.search));
let c2 = !a2 && !d$2.isMobile() ? h.getExtensionWallets() : [], m2 = h.getCustomWallets();
r2 && (c2 = c2.filter(({ name: O }) => h.caseSafeIncludes(O, this.search)), m2 = m2.filter(({ name: O }) => h.caseSafeIncludes(O, this.search)));
const s2 = !this.loading && !n2.length && !c2.length && !i2, d3 = Math.max(c2.length, n2.length), v2 = { "w3m-loading": o$12, "w3m-end-reached": this.endReached || !this.loading, "w3m-empty": s2 };
return y`${o$12 ? null : [...Array(d3)].map((O, C2) => y`${m2[C2] ? y`` : null} ${c2[C2] ? y`` : null} ${n2[C2] ? y`` : null}`)} ${i2 ? this.coinbaseConnectorTemplate() : null}
${s2 ? y`No results found` : null} ${!s2 && this.loading ? y`` : null}
`;
}
};
Q.styles = [u.globalCss, $n], xe([t$1()], Q.prototype, "loading", 2), xe([t$1()], Q.prototype, "firstFetch", 2), xe([t$1()], Q.prototype, "search", 2), xe([t$1()], Q.prototype, "endReached", 2), Q = xe([e$2("w3m-wallet-explorer-view")], Q);
export {
We as W3mAccountButton,
ae as W3mConnectButton,
ne as W3mCoreButton,
re as W3mModal,
ie as W3mNetworkSwitch
};