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