@oottoo-core/oottoo-ui 0.0.4 → 0.0.6

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.
@@ -1,4053 +0,0 @@
1
- import { r as ho, g as mo, M as rt, R as j, T as ne, a as Oe, E as fo, b as z, C as me, c as I, O as K } from "./index-Bywq0IP9.js";
2
- /**
3
- * @license
4
- * Copyright 2019 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- const nt = window, Er = nt.ShadowRoot && (nt.ShadyCSS === void 0 || nt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ar = Symbol(), Br = /* @__PURE__ */ new WeakMap();
8
- let Dn = class {
9
- constructor(e, r, o) {
10
- if (this._$cssResult$ = !0, o !== Ar) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
- this.cssText = e, this.t = r;
12
- }
13
- get styleSheet() {
14
- let e = this.o;
15
- const r = this.t;
16
- if (Er && e === void 0) {
17
- const o = r !== void 0 && r.length === 1;
18
- o && (e = Br.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), o && Br.set(r, e));
19
- }
20
- return e;
21
- }
22
- toString() {
23
- return this.cssText;
24
- }
25
- };
26
- const go = (t) => new Dn(typeof t == "string" ? t : t + "", void 0, Ar), B = (t, ...e) => {
27
- const r = t.length === 1 ? t[0] : e.reduce(((o, n, i) => o + ((s) => {
28
- if (s._$cssResult$ === !0) return s.cssText;
29
- if (typeof s == "number") return s;
30
- throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
31
- })(n) + t[i + 1]), t[0]);
32
- return new Dn(r, t, Ar);
33
- }, po = (t, e) => {
34
- Er ? t.adoptedStyleSheets = e.map(((r) => r instanceof CSSStyleSheet ? r : r.styleSheet)) : e.forEach(((r) => {
35
- const o = document.createElement("style"), n = nt.litNonce;
36
- n !== void 0 && o.setAttribute("nonce", n), o.textContent = r.cssText, t.appendChild(o);
37
- }));
38
- }, Wr = Er ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
39
- let r = "";
40
- for (const o of e.cssRules) r += o.cssText;
41
- return go(r);
42
- })(t) : t;
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- var xt;
49
- const ot = window, kr = ot.trustedTypes, wo = kr ? kr.emptyScript : "", Ur = ot.reactiveElementPolyfillSupport, nr = { toAttribute(t, e) {
50
- switch (e) {
51
- case Boolean:
52
- t = t ? wo : null;
53
- break;
54
- case Object:
55
- case Array:
56
- t = t == null ? t : JSON.stringify(t);
57
- }
58
- return t;
59
- }, fromAttribute(t, e) {
60
- let r = t;
61
- switch (e) {
62
- case Boolean:
63
- r = t !== null;
64
- break;
65
- case Number:
66
- r = t === null ? null : Number(t);
67
- break;
68
- case Object:
69
- case Array:
70
- try {
71
- r = JSON.parse(t);
72
- } catch {
73
- r = null;
74
- }
75
- }
76
- return r;
77
- } }, Nn = (t, e) => e !== t && (e == e || t == t), Ct = { attribute: !0, type: String, converter: nr, reflect: !1, hasChanged: Nn }, or = "finalized";
78
- let _e = class extends HTMLElement {
79
- constructor() {
80
- super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
81
- }
82
- static addInitializer(e) {
83
- var r;
84
- this.finalize(), ((r = this.h) !== null && r !== void 0 ? r : this.h = []).push(e);
85
- }
86
- static get observedAttributes() {
87
- this.finalize();
88
- const e = [];
89
- return this.elementProperties.forEach(((r, o) => {
90
- const n = this._$Ep(o, r);
91
- n !== void 0 && (this._$Ev.set(n, o), e.push(n));
92
- })), e;
93
- }
94
- static createProperty(e, r = Ct) {
95
- if (r.state && (r.attribute = !1), this.finalize(), this.elementProperties.set(e, r), !r.noAccessor && !this.prototype.hasOwnProperty(e)) {
96
- const o = typeof e == "symbol" ? Symbol() : "__" + e, n = this.getPropertyDescriptor(e, o, r);
97
- n !== void 0 && Object.defineProperty(this.prototype, e, n);
98
- }
99
- }
100
- static getPropertyDescriptor(e, r, o) {
101
- return { get() {
102
- return this[r];
103
- }, set(n) {
104
- const i = this[e];
105
- this[r] = n, this.requestUpdate(e, i, o);
106
- }, configurable: !0, enumerable: !0 };
107
- }
108
- static getPropertyOptions(e) {
109
- return this.elementProperties.get(e) || Ct;
110
- }
111
- static finalize() {
112
- if (this.hasOwnProperty(or)) return !1;
113
- this[or] = !0;
114
- const e = Object.getPrototypeOf(this);
115
- 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")) {
116
- const r = this.properties, o = [...Object.getOwnPropertyNames(r), ...Object.getOwnPropertySymbols(r)];
117
- for (const n of o) this.createProperty(n, r[n]);
118
- }
119
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
120
- }
121
- static finalizeStyles(e) {
122
- const r = [];
123
- if (Array.isArray(e)) {
124
- const o = new Set(e.flat(1 / 0).reverse());
125
- for (const n of o) r.unshift(Wr(n));
126
- } else e !== void 0 && r.push(Wr(e));
127
- return r;
128
- }
129
- static _$Ep(e, r) {
130
- const o = r.attribute;
131
- return o === !1 ? void 0 : typeof o == "string" ? o : typeof e == "string" ? e.toLowerCase() : void 0;
132
- }
133
- _$Eu() {
134
- var e;
135
- this._$E_ = new Promise(((r) => this.enableUpdating = r)), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach(((r) => r(this)));
136
- }
137
- addController(e) {
138
- var r, o;
139
- ((r = this._$ES) !== null && r !== void 0 ? r : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((o = e.hostConnected) === null || o === void 0 || o.call(e));
140
- }
141
- removeController(e) {
142
- var r;
143
- (r = this._$ES) === null || r === void 0 || r.splice(this._$ES.indexOf(e) >>> 0, 1);
144
- }
145
- _$Eg() {
146
- this.constructor.elementProperties.forEach(((e, r) => {
147
- this.hasOwnProperty(r) && (this._$Ei.set(r, this[r]), delete this[r]);
148
- }));
149
- }
150
- createRenderRoot() {
151
- var e;
152
- const r = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
153
- return po(r, this.constructor.elementStyles), r;
154
- }
155
- connectedCallback() {
156
- var e;
157
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach(((r) => {
158
- var o;
159
- return (o = r.hostConnected) === null || o === void 0 ? void 0 : o.call(r);
160
- }));
161
- }
162
- enableUpdating(e) {
163
- }
164
- disconnectedCallback() {
165
- var e;
166
- (e = this._$ES) === null || e === void 0 || e.forEach(((r) => {
167
- var o;
168
- return (o = r.hostDisconnected) === null || o === void 0 ? void 0 : o.call(r);
169
- }));
170
- }
171
- attributeChangedCallback(e, r, o) {
172
- this._$AK(e, o);
173
- }
174
- _$EO(e, r, o = Ct) {
175
- var n;
176
- const i = this.constructor._$Ep(e, o);
177
- if (i !== void 0 && o.reflect === !0) {
178
- const s = (((n = o.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? o.converter : nr).toAttribute(r, o.type);
179
- this._$El = e, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$El = null;
180
- }
181
- }
182
- _$AK(e, r) {
183
- var o;
184
- const n = this.constructor, i = n._$Ev.get(e);
185
- if (i !== void 0 && this._$El !== i) {
186
- const s = n.getPropertyOptions(i), a = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((o = s.converter) === null || o === void 0 ? void 0 : o.fromAttribute) !== void 0 ? s.converter : nr;
187
- this._$El = i, this[i] = a.fromAttribute(r, s.type), this._$El = null;
188
- }
189
- }
190
- requestUpdate(e, r, o) {
191
- let n = !0;
192
- e !== void 0 && (((o = o || this.constructor.getPropertyOptions(e)).hasChanged || Nn)(this[e], r) ? (this._$AL.has(e) || this._$AL.set(e, r), o.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, o))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
193
- }
194
- async _$Ej() {
195
- this.isUpdatePending = !0;
196
- try {
197
- await this._$E_;
198
- } catch (r) {
199
- Promise.reject(r);
200
- }
201
- const e = this.scheduleUpdate();
202
- return e != null && await e, !this.isUpdatePending;
203
- }
204
- scheduleUpdate() {
205
- return this.performUpdate();
206
- }
207
- performUpdate() {
208
- var e;
209
- if (!this.isUpdatePending) return;
210
- this.hasUpdated, this._$Ei && (this._$Ei.forEach(((n, i) => this[i] = n)), this._$Ei = void 0);
211
- let r = !1;
212
- const o = this._$AL;
213
- try {
214
- r = this.shouldUpdate(o), r ? (this.willUpdate(o), (e = this._$ES) === null || e === void 0 || e.forEach(((n) => {
215
- var i;
216
- return (i = n.hostUpdate) === null || i === void 0 ? void 0 : i.call(n);
217
- })), this.update(o)) : this._$Ek();
218
- } catch (n) {
219
- throw r = !1, this._$Ek(), n;
220
- }
221
- r && this._$AE(o);
222
- }
223
- willUpdate(e) {
224
- }
225
- _$AE(e) {
226
- var r;
227
- (r = this._$ES) === null || r === void 0 || r.forEach(((o) => {
228
- var n;
229
- return (n = o.hostUpdated) === null || n === void 0 ? void 0 : n.call(o);
230
- })), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
231
- }
232
- _$Ek() {
233
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
234
- }
235
- get updateComplete() {
236
- return this.getUpdateComplete();
237
- }
238
- getUpdateComplete() {
239
- return this._$E_;
240
- }
241
- shouldUpdate(e) {
242
- return !0;
243
- }
244
- update(e) {
245
- this._$EC !== void 0 && (this._$EC.forEach(((r, o) => this._$EO(o, this[o], r))), this._$EC = void 0), this._$Ek();
246
- }
247
- updated(e) {
248
- }
249
- firstUpdated(e) {
250
- }
251
- };
252
- _e[or] = !0, _e.elementProperties = /* @__PURE__ */ new Map(), _e.elementStyles = [], _e.shadowRootOptions = { mode: "open" }, Ur == null || Ur({ ReactiveElement: _e }), ((xt = ot.reactiveElementVersions) !== null && xt !== void 0 ? xt : ot.reactiveElementVersions = []).push("1.6.3");
253
- /**
254
- * @license
255
- * Copyright 2017 Google LLC
256
- * SPDX-License-Identifier: BSD-3-Clause
257
- */
258
- var _t;
259
- const it = window, Ie = it.trustedTypes, jr = Ie ? Ie.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, ir = "$lit$", re = `lit$${(Math.random() + "").slice(9)}$`, Ln = "?" + re, vo = `<${Ln}>`, fe = document, je = () => fe.createComment(""), He = (t) => t === null || typeof t != "object" && typeof t != "function", Bn = Array.isArray, bo = (t) => Bn(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", $t = `[
260
- \f\r]`, Be = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Hr = /-->/g, Fr = />/g, de = RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
261
- \f\r"'\`<>=]|("|')|))|$)`, "g"), zr = /'/g, qr = /"/g, Wn = /^(?:script|style|textarea|title)$/i, kn = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), m = kn(1), U = kn(2), ge = Symbol.for("lit-noChange"), H = Symbol.for("lit-nothing"), Vr = /* @__PURE__ */ new WeakMap(), ue = fe.createTreeWalker(fe, 129, null, !1);
262
- function Un(t, e) {
263
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
264
- return jr !== void 0 ? jr.createHTML(e) : e;
265
- }
266
- const yo = (t, e) => {
267
- const r = t.length - 1, o = [];
268
- let n, i = e === 2 ? "<svg>" : "", s = Be;
269
- for (let a = 0; a < r; a++) {
270
- const l = t[a];
271
- let c, h, w = -1, d = 0;
272
- for (; d < l.length && (s.lastIndex = d, h = s.exec(l), h !== null); ) d = s.lastIndex, s === Be ? h[1] === "!--" ? s = Hr : h[1] !== void 0 ? s = Fr : h[2] !== void 0 ? (Wn.test(h[2]) && (n = RegExp("</" + h[2], "g")), s = de) : h[3] !== void 0 && (s = de) : s === de ? h[0] === ">" ? (s = n ?? Be, w = -1) : h[1] === void 0 ? w = -2 : (w = s.lastIndex - h[2].length, c = h[1], s = h[3] === void 0 ? de : h[3] === '"' ? qr : zr) : s === qr || s === zr ? s = de : s === Hr || s === Fr ? s = Be : (s = de, n = void 0);
273
- const u = s === de && t[a + 1].startsWith("/>") ? " " : "";
274
- i += s === Be ? l + vo : w >= 0 ? (o.push(c), l.slice(0, w) + ir + l.slice(w) + re + u) : l + re + (w === -2 ? (o.push(void 0), a) : u);
275
- }
276
- return [Un(t, i + (t[r] || "<?>") + (e === 2 ? "</svg>" : "")), o];
277
- };
278
- class Fe {
279
- constructor({ strings: e, _$litType$: r }, o) {
280
- let n;
281
- this.parts = [];
282
- let i = 0, s = 0;
283
- const a = e.length - 1, l = this.parts, [c, h] = yo(e, r);
284
- if (this.el = Fe.createElement(c, o), ue.currentNode = this.el.content, r === 2) {
285
- const w = this.el.content, d = w.firstChild;
286
- d.remove(), w.append(...d.childNodes);
287
- }
288
- for (; (n = ue.nextNode()) !== null && l.length < a; ) {
289
- if (n.nodeType === 1) {
290
- if (n.hasAttributes()) {
291
- const w = [];
292
- for (const d of n.getAttributeNames()) if (d.endsWith(ir) || d.startsWith(re)) {
293
- const u = h[s++];
294
- if (w.push(d), u !== void 0) {
295
- const b = n.getAttribute(u.toLowerCase() + ir).split(re), p = /([.?@])?(.*)/.exec(u);
296
- l.push({ type: 1, index: i, name: p[2], strings: b, ctor: p[1] === "." ? Co : p[1] === "?" ? $o : p[1] === "@" ? Eo : ft });
297
- } else l.push({ type: 6, index: i });
298
- }
299
- for (const d of w) n.removeAttribute(d);
300
- }
301
- if (Wn.test(n.tagName)) {
302
- const w = n.textContent.split(re), d = w.length - 1;
303
- if (d > 0) {
304
- n.textContent = Ie ? Ie.emptyScript : "";
305
- for (let u = 0; u < d; u++) n.append(w[u], je()), ue.nextNode(), l.push({ type: 2, index: ++i });
306
- n.append(w[d], je());
307
- }
308
- }
309
- } else if (n.nodeType === 8) if (n.data === Ln) l.push({ type: 2, index: i });
310
- else {
311
- let w = -1;
312
- for (; (w = n.data.indexOf(re, w + 1)) !== -1; ) l.push({ type: 7, index: i }), w += re.length - 1;
313
- }
314
- i++;
315
- }
316
- }
317
- static createElement(e, r) {
318
- const o = fe.createElement("template");
319
- return o.innerHTML = e, o;
320
- }
321
- }
322
- function Pe(t, e, r = t, o) {
323
- var n, i, s, a;
324
- if (e === ge) return e;
325
- let l = o !== void 0 ? (n = r._$Co) === null || n === void 0 ? void 0 : n[o] : r._$Cl;
326
- const c = He(e) ? void 0 : e._$litDirective$;
327
- return (l == null ? void 0 : l.constructor) !== c && ((i = l == null ? void 0 : l._$AO) === null || i === void 0 || i.call(l, !1), c === void 0 ? l = void 0 : (l = new c(t), l._$AT(t, r, o)), o !== void 0 ? ((s = (a = r)._$Co) !== null && s !== void 0 ? s : a._$Co = [])[o] = l : r._$Cl = l), l !== void 0 && (e = Pe(t, l._$AS(t, e.values), l, o)), e;
328
- }
329
- class xo {
330
- constructor(e, r) {
331
- this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = r;
332
- }
333
- get parentNode() {
334
- return this._$AM.parentNode;
335
- }
336
- get _$AU() {
337
- return this._$AM._$AU;
338
- }
339
- u(e) {
340
- var r;
341
- const { el: { content: o }, parts: n } = this._$AD, i = ((r = e == null ? void 0 : e.creationScope) !== null && r !== void 0 ? r : fe).importNode(o, !0);
342
- ue.currentNode = i;
343
- let s = ue.nextNode(), a = 0, l = 0, c = n[0];
344
- for (; c !== void 0; ) {
345
- if (a === c.index) {
346
- let h;
347
- c.type === 2 ? h = new Ye(s, s.nextSibling, this, e) : c.type === 1 ? h = new c.ctor(s, c.name, c.strings, this, e) : c.type === 6 && (h = new Ao(s, this, e)), this._$AV.push(h), c = n[++l];
348
- }
349
- a !== (c == null ? void 0 : c.index) && (s = ue.nextNode(), a++);
350
- }
351
- return ue.currentNode = fe, i;
352
- }
353
- v(e) {
354
- let r = 0;
355
- for (const o of this._$AV) o !== void 0 && (o.strings !== void 0 ? (o._$AI(e, o, r), r += o.strings.length - 2) : o._$AI(e[r])), r++;
356
- }
357
- }
358
- class Ye {
359
- constructor(e, r, o, n) {
360
- var i;
361
- this.type = 2, this._$AH = H, this._$AN = void 0, this._$AA = e, this._$AB = r, this._$AM = o, this.options = n, this._$Cp = (i = n == null ? void 0 : n.isConnected) === null || i === void 0 || i;
362
- }
363
- get _$AU() {
364
- var e, r;
365
- return (r = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && r !== void 0 ? r : this._$Cp;
366
- }
367
- get parentNode() {
368
- let e = this._$AA.parentNode;
369
- const r = this._$AM;
370
- return r !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = r.parentNode), e;
371
- }
372
- get startNode() {
373
- return this._$AA;
374
- }
375
- get endNode() {
376
- return this._$AB;
377
- }
378
- _$AI(e, r = this) {
379
- e = Pe(this, e, r), He(e) ? e === H || e == null || e === "" ? (this._$AH !== H && this._$AR(), this._$AH = H) : e !== this._$AH && e !== ge && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : bo(e) ? this.T(e) : this._(e);
380
- }
381
- k(e) {
382
- return this._$AA.parentNode.insertBefore(e, this._$AB);
383
- }
384
- $(e) {
385
- this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
386
- }
387
- _(e) {
388
- this._$AH !== H && He(this._$AH) ? this._$AA.nextSibling.data = e : this.$(fe.createTextNode(e)), this._$AH = e;
389
- }
390
- g(e) {
391
- var r;
392
- const { values: o, _$litType$: n } = e, i = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = Fe.createElement(Un(n.h, n.h[0]), this.options)), n);
393
- if (((r = this._$AH) === null || r === void 0 ? void 0 : r._$AD) === i) this._$AH.v(o);
394
- else {
395
- const s = new xo(i, this), a = s.u(this.options);
396
- s.v(o), this.$(a), this._$AH = s;
397
- }
398
- }
399
- _$AC(e) {
400
- let r = Vr.get(e.strings);
401
- return r === void 0 && Vr.set(e.strings, r = new Fe(e)), r;
402
- }
403
- T(e) {
404
- Bn(this._$AH) || (this._$AH = [], this._$AR());
405
- const r = this._$AH;
406
- let o, n = 0;
407
- for (const i of e) n === r.length ? r.push(o = new Ye(this.k(je()), this.k(je()), this, this.options)) : o = r[n], o._$AI(i), n++;
408
- n < r.length && (this._$AR(o && o._$AB.nextSibling, n), r.length = n);
409
- }
410
- _$AR(e = this._$AA.nextSibling, r) {
411
- var o;
412
- for ((o = this._$AP) === null || o === void 0 || o.call(this, !1, !0, r); e && e !== this._$AB; ) {
413
- const n = e.nextSibling;
414
- e.remove(), e = n;
415
- }
416
- }
417
- setConnected(e) {
418
- var r;
419
- this._$AM === void 0 && (this._$Cp = e, (r = this._$AP) === null || r === void 0 || r.call(this, e));
420
- }
421
- }
422
- class ft {
423
- constructor(e, r, o, n, i) {
424
- this.type = 1, this._$AH = H, this._$AN = void 0, this.element = e, this.name = r, this._$AM = n, this.options = i, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = H;
425
- }
426
- get tagName() {
427
- return this.element.tagName;
428
- }
429
- get _$AU() {
430
- return this._$AM._$AU;
431
- }
432
- _$AI(e, r = this, o, n) {
433
- const i = this.strings;
434
- let s = !1;
435
- if (i === void 0) e = Pe(this, e, r, 0), s = !He(e) || e !== this._$AH && e !== ge, s && (this._$AH = e);
436
- else {
437
- const a = e;
438
- let l, c;
439
- for (e = i[0], l = 0; l < i.length - 1; l++) c = Pe(this, a[o + l], r, l), c === ge && (c = this._$AH[l]), s || (s = !He(c) || c !== this._$AH[l]), c === H ? e = H : e !== H && (e += (c ?? "") + i[l + 1]), this._$AH[l] = c;
440
- }
441
- s && !n && this.j(e);
442
- }
443
- j(e) {
444
- e === H ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
445
- }
446
- }
447
- class Co extends ft {
448
- constructor() {
449
- super(...arguments), this.type = 3;
450
- }
451
- j(e) {
452
- this.element[this.name] = e === H ? void 0 : e;
453
- }
454
- }
455
- const _o = Ie ? Ie.emptyScript : "";
456
- class $o extends ft {
457
- constructor() {
458
- super(...arguments), this.type = 4;
459
- }
460
- j(e) {
461
- e && e !== H ? this.element.setAttribute(this.name, _o) : this.element.removeAttribute(this.name);
462
- }
463
- }
464
- class Eo extends ft {
465
- constructor(e, r, o, n, i) {
466
- super(e, r, o, n, i), this.type = 5;
467
- }
468
- _$AI(e, r = this) {
469
- var o;
470
- if ((e = (o = Pe(this, e, r, 0)) !== null && o !== void 0 ? o : H) === ge) return;
471
- const n = this._$AH, i = e === H && n !== H || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, s = e !== H && (n === H || i);
472
- i && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this, e), this._$AH = e;
473
- }
474
- handleEvent(e) {
475
- var r, o;
476
- typeof this._$AH == "function" ? this._$AH.call((o = (r = this.options) === null || r === void 0 ? void 0 : r.host) !== null && o !== void 0 ? o : this.element, e) : this._$AH.handleEvent(e);
477
- }
478
- }
479
- class Ao {
480
- constructor(e, r, o) {
481
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = o;
482
- }
483
- get _$AU() {
484
- return this._$AM._$AU;
485
- }
486
- _$AI(e) {
487
- Pe(this, e);
488
- }
489
- }
490
- const Zr = it.litHtmlPolyfillSupport;
491
- Zr == null || Zr(Fe, Ye), ((_t = it.litHtmlVersions) !== null && _t !== void 0 ? _t : it.litHtmlVersions = []).push("2.8.0");
492
- const Oo = (t, e, r) => {
493
- var o, n;
494
- const i = (o = r == null ? void 0 : r.renderBefore) !== null && o !== void 0 ? o : e;
495
- let s = i._$litPart$;
496
- if (s === void 0) {
497
- const a = (n = r == null ? void 0 : r.renderBefore) !== null && n !== void 0 ? n : null;
498
- i._$litPart$ = s = new Ye(e.insertBefore(je(), a), a, void 0, r ?? {});
499
- }
500
- return s._$AI(t), s;
501
- };
502
- /**
503
- * @license
504
- * Copyright 2017 Google LLC
505
- * SPDX-License-Identifier: BSD-3-Clause
506
- */
507
- var Et, At;
508
- class S extends _e {
509
- constructor() {
510
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
511
- }
512
- createRenderRoot() {
513
- var e, r;
514
- const o = super.createRenderRoot();
515
- return (e = (r = this.renderOptions).renderBefore) !== null && e !== void 0 || (r.renderBefore = o.firstChild), o;
516
- }
517
- update(e) {
518
- const r = this.render();
519
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Oo(r, this.renderRoot, this.renderOptions);
520
- }
521
- connectedCallback() {
522
- var e;
523
- super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
524
- }
525
- disconnectedCallback() {
526
- var e;
527
- super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
528
- }
529
- render() {
530
- return ge;
531
- }
532
- }
533
- S.finalized = !0, S._$litElement$ = !0, (Et = globalThis.litElementHydrateSupport) === null || Et === void 0 || Et.call(globalThis, { LitElement: S });
534
- const Kr = globalThis.litElementPolyfillSupport;
535
- Kr == null || Kr({ LitElement: S });
536
- ((At = globalThis.litElementVersions) !== null && At !== void 0 ? At : globalThis.litElementVersions = []).push("3.3.3");
537
- /**
538
- * @license
539
- * Copyright 2017 Google LLC
540
- * SPDX-License-Identifier: BSD-3-Clause
541
- */
542
- const L = (t) => (e) => typeof e == "function" ? ((r, o) => (customElements.define(r, o), o))(t, e) : ((r, o) => {
543
- const { kind: n, elements: i } = o;
544
- return { kind: n, elements: i, finisher(s) {
545
- customElements.define(r, s);
546
- } };
547
- })(t, e);
548
- /**
549
- * @license
550
- * Copyright 2017 Google LLC
551
- * SPDX-License-Identifier: BSD-3-Clause
552
- */
553
- const Io = (t, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(r) {
554
- r.createProperty(e.key, t);
555
- } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
556
- typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
557
- }, finisher(r) {
558
- r.createProperty(e.key, t);
559
- } }, Po = (t, e, r) => {
560
- e.constructor.createProperty(r, t);
561
- };
562
- function M(t) {
563
- return (e, r) => r !== void 0 ? Po(t, e, r) : Io(t, e);
564
- }
565
- /**
566
- * @license
567
- * Copyright 2017 Google LLC
568
- * SPDX-License-Identifier: BSD-3-Clause
569
- */
570
- function q(t) {
571
- return M({ ...t, state: !0 });
572
- }
573
- /**
574
- * @license
575
- * Copyright 2021 Google LLC
576
- * SPDX-License-Identifier: BSD-3-Clause
577
- */
578
- var Ot;
579
- ((Ot = window.HTMLSlotElement) === null || Ot === void 0 ? void 0 : Ot.prototype.assignedElements) != null;
580
- /**
581
- * @license
582
- * Copyright 2017 Google LLC
583
- * SPDX-License-Identifier: BSD-3-Clause
584
- */
585
- const To = { ATTRIBUTE: 1 }, Ro = (t) => (...e) => ({ _$litDirective$: t, values: e });
586
- class Mo {
587
- constructor(e) {
588
- }
589
- get _$AU() {
590
- return this._$AM._$AU;
591
- }
592
- _$AT(e, r, o) {
593
- this._$Ct = e, this._$AM = r, this._$Ci = o;
594
- }
595
- _$AS(e, r) {
596
- return this.update(e, r);
597
- }
598
- update(e, r) {
599
- return this.render(...r);
600
- }
601
- }
602
- /**
603
- * @license
604
- * Copyright 2018 Google LLC
605
- * SPDX-License-Identifier: BSD-3-Clause
606
- */
607
- const X = Ro(class extends Mo {
608
- constructor(t) {
609
- var e;
610
- if (super(t), t.type !== To.ATTRIBUTE || t.name !== "class" || ((e = t.strings) === null || e === void 0 ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
611
- }
612
- render(t) {
613
- return " " + Object.keys(t).filter(((e) => t[e])).join(" ") + " ";
614
- }
615
- update(t, [e]) {
616
- var r, o;
617
- if (this.it === void 0) {
618
- this.it = /* @__PURE__ */ new Set(), t.strings !== void 0 && (this.nt = new Set(t.strings.join(" ").split(/\s/).filter(((i) => i !== ""))));
619
- for (const i in e) e[i] && !(!((r = this.nt) === null || r === void 0) && r.has(i)) && this.it.add(i);
620
- return this.render(e);
621
- }
622
- const n = t.element.classList;
623
- this.it.forEach(((i) => {
624
- i in e || (n.remove(i), this.it.delete(i));
625
- }));
626
- for (const i in e) {
627
- const s = !!e[i];
628
- s === this.it.has(i) || !((o = this.nt) === null || o === void 0) && o.has(i) || (s ? (n.add(i), this.it.add(i)) : (n.remove(i), this.it.delete(i)));
629
- }
630
- return ge;
631
- }
632
- });
633
- function So(t, e) {
634
- t.indexOf(e) === -1 && t.push(e);
635
- }
636
- const jn = (t, e, r) => Math.min(Math.max(r, t), e), V = {
637
- duration: 0.3,
638
- delay: 0,
639
- endDelay: 0,
640
- repeat: 0,
641
- easing: "ease"
642
- }, st = (t) => typeof t == "number", Ee = (t) => Array.isArray(t) && !st(t[0]), Do = (t, e, r) => {
643
- const o = e - t;
644
- return ((r - t) % o + o) % o + t;
645
- };
646
- function No(t, e) {
647
- return Ee(t) ? t[Do(0, t.length, e)] : t;
648
- }
649
- const Hn = (t, e, r) => -r * t + r * e + t, Fn = () => {
650
- }, oe = (t) => t, Or = (t, e, r) => e - t === 0 ? 1 : (r - t) / (e - t);
651
- function zn(t, e) {
652
- const r = t[t.length - 1];
653
- for (let o = 1; o <= e; o++) {
654
- const n = Or(0, e, o);
655
- t.push(Hn(r, 1, n));
656
- }
657
- }
658
- function Lo(t) {
659
- const e = [0];
660
- return zn(e, t - 1), e;
661
- }
662
- function Bo(t, e = Lo(t.length), r = oe) {
663
- const o = t.length, n = o - e.length;
664
- return n > 0 && zn(e, n), (i) => {
665
- let s = 0;
666
- for (; s < o - 2 && !(i < e[s + 1]); s++)
667
- ;
668
- let a = jn(0, 1, Or(e[s], e[s + 1], i));
669
- return a = No(r, s)(a), Hn(t[s], t[s + 1], a);
670
- };
671
- }
672
- const qn = (t) => Array.isArray(t) && st(t[0]), sr = (t) => typeof t == "object" && !!t.createAnimation, Te = (t) => typeof t == "function", Wo = (t) => typeof t == "string", Ue = {
673
- ms: (t) => t * 1e3,
674
- s: (t) => t / 1e3
675
- }, Vn = (t, e, r) => (((1 - 3 * r + 3 * e) * t + (3 * r - 6 * e)) * t + 3 * e) * t, ko = 1e-7, Uo = 12;
676
- function jo(t, e, r, o, n) {
677
- let i, s, a = 0;
678
- do
679
- s = e + (r - e) / 2, i = Vn(s, o, n) - t, i > 0 ? r = s : e = s;
680
- while (Math.abs(i) > ko && ++a < Uo);
681
- return s;
682
- }
683
- function ke(t, e, r, o) {
684
- if (t === e && r === o)
685
- return oe;
686
- const n = (i) => jo(i, 0, 1, t, r);
687
- return (i) => i === 0 || i === 1 ? i : Vn(n(i), e, o);
688
- }
689
- const Ho = (t, e = "end") => (r) => {
690
- r = e === "end" ? Math.min(r, 0.999) : Math.max(r, 1e-3);
691
- const o = r * t, n = e === "end" ? Math.floor(o) : Math.ceil(o);
692
- return jn(0, 1, n / t);
693
- }, Fo = {
694
- ease: ke(0.25, 0.1, 0.25, 1),
695
- "ease-in": ke(0.42, 0, 1, 1),
696
- "ease-in-out": ke(0.42, 0, 0.58, 1),
697
- "ease-out": ke(0, 0, 0.58, 1)
698
- }, zo = /\((.*?)\)/;
699
- function Yr(t) {
700
- if (Te(t))
701
- return t;
702
- if (qn(t))
703
- return ke(...t);
704
- const e = Fo[t];
705
- if (e)
706
- return e;
707
- if (t.startsWith("steps")) {
708
- const r = zo.exec(t);
709
- if (r) {
710
- const o = r[1].split(",");
711
- return Ho(parseFloat(o[0]), o[1].trim());
712
- }
713
- }
714
- return oe;
715
- }
716
- class Zn {
717
- constructor(e, r = [0, 1], { easing: o, duration: n = V.duration, delay: i = V.delay, endDelay: s = V.endDelay, repeat: a = V.repeat, offset: l, direction: c = "normal", autoplay: h = !0 } = {}) {
718
- if (this.startTime = null, this.rate = 1, this.t = 0, this.cancelTimestamp = null, this.easing = oe, this.duration = 0, this.totalDuration = 0, this.repeat = 0, this.playState = "idle", this.finished = new Promise((d, u) => {
719
- this.resolve = d, this.reject = u;
720
- }), o = o || V.easing, sr(o)) {
721
- const d = o.createAnimation(r);
722
- o = d.easing, r = d.keyframes || r, n = d.duration || n;
723
- }
724
- this.repeat = a, this.easing = Ee(o) ? oe : Yr(o), this.updateDuration(n);
725
- const w = Bo(r, l, Ee(o) ? o.map(Yr) : oe);
726
- this.tick = (d) => {
727
- var u;
728
- i = i;
729
- let b = 0;
730
- this.pauseTime !== void 0 ? b = this.pauseTime : b = (d - this.startTime) * this.rate, this.t = b, b /= 1e3, b = Math.max(b - i, 0), this.playState === "finished" && this.pauseTime === void 0 && (b = this.totalDuration);
731
- const p = b / this.duration;
732
- let D = Math.floor(p), g = p % 1;
733
- !g && p >= 1 && (g = 1), g === 1 && D--;
734
- const E = D % 2;
735
- (c === "reverse" || c === "alternate" && E || c === "alternate-reverse" && !E) && (g = 1 - g);
736
- const y = b >= this.totalDuration ? 1 : Math.min(g, 1), C = w(this.easing(y));
737
- e(C), this.pauseTime === void 0 && (this.playState === "finished" || b >= this.totalDuration + s) ? (this.playState = "finished", (u = this.resolve) === null || u === void 0 || u.call(this, C)) : this.playState !== "idle" && (this.frameRequestId = requestAnimationFrame(this.tick));
738
- }, h && this.play();
739
- }
740
- play() {
741
- const e = performance.now();
742
- 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);
743
- }
744
- pause() {
745
- this.playState = "paused", this.pauseTime = this.t;
746
- }
747
- finish() {
748
- this.playState = "finished", this.tick(0);
749
- }
750
- stop() {
751
- var e;
752
- this.playState = "idle", this.frameRequestId !== void 0 && cancelAnimationFrame(this.frameRequestId), (e = this.reject) === null || e === void 0 || e.call(this, !1);
753
- }
754
- cancel() {
755
- this.stop(), this.tick(this.cancelTimestamp);
756
- }
757
- reverse() {
758
- this.rate *= -1;
759
- }
760
- commitStyles() {
761
- }
762
- updateDuration(e) {
763
- this.duration = e, this.totalDuration = e * (this.repeat + 1);
764
- }
765
- get currentTime() {
766
- return this.t;
767
- }
768
- set currentTime(e) {
769
- this.pauseTime !== void 0 || this.rate === 0 ? this.pauseTime = e : this.startTime = performance.now() - e / this.rate;
770
- }
771
- get playbackRate() {
772
- return this.rate;
773
- }
774
- set playbackRate(e) {
775
- this.rate = e;
776
- }
777
- }
778
- var ar = function() {
779
- };
780
- process.env.NODE_ENV !== "production" && (ar = function(t, e) {
781
- if (!t)
782
- throw new Error(e);
783
- });
784
- class qo {
785
- setAnimation(e) {
786
- this.animation = e, e == null || e.finished.then(() => this.clearAnimation()).catch(() => {
787
- });
788
- }
789
- clearAnimation() {
790
- this.animation = this.generator = void 0;
791
- }
792
- }
793
- const It = /* @__PURE__ */ new WeakMap();
794
- function Kn(t) {
795
- return It.has(t) || It.set(t, {
796
- transforms: [],
797
- values: /* @__PURE__ */ new Map()
798
- }), It.get(t);
799
- }
800
- function Vo(t, e) {
801
- return t.has(e) || t.set(e, new qo()), t.get(e);
802
- }
803
- const Zo = ["", "X", "Y", "Z"], Ko = ["translate", "scale", "rotate", "skew"], at = {
804
- x: "translateX",
805
- y: "translateY",
806
- z: "translateZ"
807
- }, Gr = {
808
- syntax: "<angle>",
809
- initialValue: "0deg",
810
- toDefaultUnit: (t) => t + "deg"
811
- }, Yo = {
812
- translate: {
813
- syntax: "<length-percentage>",
814
- initialValue: "0px",
815
- toDefaultUnit: (t) => t + "px"
816
- },
817
- rotate: Gr,
818
- scale: {
819
- syntax: "<number>",
820
- initialValue: 1,
821
- toDefaultUnit: oe
822
- },
823
- skew: Gr
824
- }, ze = /* @__PURE__ */ new Map(), Ir = (t) => `--motion-${t}`, lt = ["x", "y", "z"];
825
- Ko.forEach((t) => {
826
- Zo.forEach((e) => {
827
- lt.push(t + e), ze.set(Ir(t + e), Yo[t]);
828
- });
829
- });
830
- const Go = (t, e) => lt.indexOf(t) - lt.indexOf(e), Qo = new Set(lt), Yn = (t) => Qo.has(t), Jo = (t, e) => {
831
- at[e] && (e = at[e]);
832
- const { transforms: r } = Kn(t);
833
- So(r, e), t.style.transform = Xo(r);
834
- }, Xo = (t) => t.sort(Go).reduce(ei, "").trim(), ei = (t, e) => `${t} ${e}(var(${Ir(e)}))`, lr = (t) => t.startsWith("--"), Qr = /* @__PURE__ */ new Set();
835
- function ti(t) {
836
- if (!Qr.has(t)) {
837
- Qr.add(t);
838
- try {
839
- const { syntax: e, initialValue: r } = ze.has(t) ? ze.get(t) : {};
840
- CSS.registerProperty({
841
- name: t,
842
- inherits: !1,
843
- syntax: e,
844
- initialValue: r
845
- });
846
- } catch {
847
- }
848
- }
849
- }
850
- const Pt = (t, e) => document.createElement("div").animate(t, e), Jr = {
851
- cssRegisterProperty: () => typeof CSS < "u" && Object.hasOwnProperty.call(CSS, "registerProperty"),
852
- waapi: () => Object.hasOwnProperty.call(Element.prototype, "animate"),
853
- partialKeyframes: () => {
854
- try {
855
- Pt({ opacity: [1] });
856
- } catch {
857
- return !1;
858
- }
859
- return !0;
860
- },
861
- finished: () => !!Pt({ opacity: [0, 1] }, { duration: 1e-3 }).finished,
862
- linearEasing: () => {
863
- try {
864
- Pt({ opacity: 0 }, { easing: "linear(0, 1)" });
865
- } catch {
866
- return !1;
867
- }
868
- return !0;
869
- }
870
- }, Tt = {}, $e = {};
871
- for (const t in Jr)
872
- $e[t] = () => (Tt[t] === void 0 && (Tt[t] = Jr[t]()), Tt[t]);
873
- const ri = 0.015, ni = (t, e) => {
874
- let r = "";
875
- const o = Math.round(e / ri);
876
- for (let n = 0; n < o; n++)
877
- r += t(Or(0, o - 1, n)) + ", ";
878
- return r.substring(0, r.length - 2);
879
- }, Xr = (t, e) => Te(t) ? $e.linearEasing() ? `linear(${ni(t, e)})` : V.easing : qn(t) ? oi(t) : t, oi = ([t, e, r, o]) => `cubic-bezier(${t}, ${e}, ${r}, ${o})`;
880
- function ii(t, e) {
881
- for (let r = 0; r < t.length; r++)
882
- t[r] === null && (t[r] = r ? t[r - 1] : e());
883
- return t;
884
- }
885
- const si = (t) => Array.isArray(t) ? t : [t];
886
- function cr(t) {
887
- return at[t] && (t = at[t]), Yn(t) ? Ir(t) : t;
888
- }
889
- const et = {
890
- get: (t, e) => {
891
- e = cr(e);
892
- let r = lr(e) ? t.style.getPropertyValue(e) : getComputedStyle(t)[e];
893
- if (!r && r !== 0) {
894
- const o = ze.get(e);
895
- o && (r = o.initialValue);
896
- }
897
- return r;
898
- },
899
- set: (t, e, r) => {
900
- e = cr(e), lr(e) ? t.style.setProperty(e, r) : t.style[e] = r;
901
- }
902
- };
903
- function Gn(t, e = !0) {
904
- if (!(!t || t.playState === "finished"))
905
- try {
906
- t.stop ? t.stop() : (e && t.commitStyles(), t.cancel());
907
- } catch {
908
- }
909
- }
910
- function ai(t, e) {
911
- var r;
912
- let o = (e == null ? void 0 : e.toDefaultUnit) || oe;
913
- const n = t[t.length - 1];
914
- if (Wo(n)) {
915
- const i = ((r = n.match(/(-?[\d.]+)([a-z%]*)/)) === null || r === void 0 ? void 0 : r[2]) || "";
916
- i && (o = (s) => s + i);
917
- }
918
- return o;
919
- }
920
- function li() {
921
- return window.__MOTION_DEV_TOOLS_RECORD;
922
- }
923
- function ci(t, e, r, o = {}, n) {
924
- const i = li(), s = o.record !== !1 && i;
925
- let a, { duration: l = V.duration, delay: c = V.delay, endDelay: h = V.endDelay, repeat: w = V.repeat, easing: d = V.easing, persist: u = !1, direction: b, offset: p, allowWebkitAcceleration: D = !1, autoplay: g = !0 } = o;
926
- const E = Kn(t), y = Yn(e);
927
- let C = $e.waapi();
928
- y && Jo(t, e);
929
- const W = cr(e), x = Vo(E.values, W), $ = ze.get(W);
930
- return Gn(x.animation, !(sr(d) && x.generator) && o.record !== !1), () => {
931
- const A = () => {
932
- var v, O;
933
- return (O = (v = et.get(t, W)) !== null && v !== void 0 ? v : $ == null ? void 0 : $.initialValue) !== null && O !== void 0 ? O : 0;
934
- };
935
- let f = ii(si(r), A);
936
- const P = ai(f, $);
937
- if (sr(d)) {
938
- const v = d.createAnimation(f, e !== "opacity", A, W, x);
939
- d = v.easing, f = v.keyframes || f, l = v.duration || l;
940
- }
941
- if (lr(W) && ($e.cssRegisterProperty() ? ti(W) : C = !1), y && !$e.linearEasing() && (Te(d) || Ee(d) && d.some(Te)) && (C = !1), C) {
942
- $ && (f = f.map((_) => st(_) ? $.toDefaultUnit(_) : _)), f.length === 1 && (!$e.partialKeyframes() || s) && f.unshift(A());
943
- const v = {
944
- delay: Ue.ms(c),
945
- duration: Ue.ms(l),
946
- endDelay: Ue.ms(h),
947
- easing: Ee(d) ? void 0 : Xr(d, l),
948
- direction: b,
949
- iterations: w + 1,
950
- fill: "both"
951
- };
952
- a = t.animate({
953
- [W]: f,
954
- offset: p,
955
- easing: Ee(d) ? d.map((_) => Xr(_, l)) : void 0
956
- }, v), a.finished || (a.finished = new Promise((_, R) => {
957
- a.onfinish = _, a.oncancel = R;
958
- }));
959
- const O = f[f.length - 1];
960
- a.finished.then(() => {
961
- u || (et.set(t, W, O), a.cancel());
962
- }).catch(Fn), D || (a.playbackRate = 1.000001);
963
- } else if (n && y)
964
- f = f.map((v) => typeof v == "string" ? parseFloat(v) : v), f.length === 1 && f.unshift(parseFloat(A())), a = new n((v) => {
965
- et.set(t, W, P ? P(v) : v);
966
- }, f, Object.assign(Object.assign({}, o), {
967
- duration: l,
968
- easing: d
969
- }));
970
- else {
971
- const v = f[f.length - 1];
972
- et.set(t, W, $ && st(v) ? $.toDefaultUnit(v) : v);
973
- }
974
- return s && i(t, e, f, {
975
- duration: l,
976
- delay: c,
977
- easing: d,
978
- repeat: w,
979
- offset: p
980
- }, "motion-one"), x.setAnimation(a), a && !g && a.pause(), a;
981
- };
982
- }
983
- const di = (t, e) => (
984
- /**
985
- * TODO: Make test for this
986
- * Always return a new object otherwise delay is overwritten by results of stagger
987
- * and this results in no stagger
988
- */
989
- t[e] ? Object.assign(Object.assign({}, t), t[e]) : Object.assign({}, t)
990
- );
991
- function ui(t, e) {
992
- return typeof t == "string" ? t = document.querySelectorAll(t) : t instanceof Element && (t = [t]), Array.from(t || []);
993
- }
994
- const hi = (t) => t(), Qn = (t, e, r = V.duration) => new Proxy({
995
- animations: t.map(hi).filter(Boolean),
996
- duration: r,
997
- options: e
998
- }, fi), mi = (t) => t.animations[0], fi = {
999
- get: (t, e) => {
1000
- const r = mi(t);
1001
- switch (e) {
1002
- case "duration":
1003
- return t.duration;
1004
- case "currentTime":
1005
- return Ue.s((r == null ? void 0 : r[e]) || 0);
1006
- case "playbackRate":
1007
- case "playState":
1008
- return r == null ? void 0 : r[e];
1009
- case "finished":
1010
- return t.finished || (t.finished = Promise.all(t.animations.map(gi)).catch(Fn)), t.finished;
1011
- case "stop":
1012
- return () => {
1013
- t.animations.forEach((o) => Gn(o));
1014
- };
1015
- case "forEachNative":
1016
- return (o) => {
1017
- t.animations.forEach((n) => o(n, t));
1018
- };
1019
- default:
1020
- return typeof (r == null ? void 0 : r[e]) > "u" ? void 0 : () => t.animations.forEach((o) => o[e]());
1021
- }
1022
- },
1023
- set: (t, e, r) => {
1024
- switch (e) {
1025
- case "currentTime":
1026
- r = Ue.ms(r);
1027
- // Fall-through
1028
- case "playbackRate":
1029
- for (let o = 0; o < t.animations.length; o++)
1030
- t.animations[o][e] = r;
1031
- return !0;
1032
- }
1033
- return !1;
1034
- }
1035
- }, gi = (t) => t.finished;
1036
- function pi(t, e, r) {
1037
- return Te(t) ? t(e, r) : t;
1038
- }
1039
- function wi(t) {
1040
- return function(r, o, n = {}) {
1041
- r = ui(r);
1042
- const i = r.length;
1043
- ar(!!i, "No valid element provided."), ar(!!o, "No keyframes defined.");
1044
- const s = [];
1045
- for (let a = 0; a < i; a++) {
1046
- const l = r[a];
1047
- for (const c in o) {
1048
- const h = di(n, c);
1049
- h.delay = pi(h.delay, a, i);
1050
- const w = ci(l, c, o[c], h, t);
1051
- s.push(w);
1052
- }
1053
- }
1054
- return Qn(
1055
- s,
1056
- n,
1057
- /**
1058
- * TODO:
1059
- * If easing is set to spring or glide, duration will be dynamically
1060
- * generated. Ideally we would dynamically generate this from
1061
- * animation.effect.getComputedTiming().duration but this isn't
1062
- * supported in iOS13 or our number polyfill. Perhaps it's possible
1063
- * to Proxy animations returned from animateStyle that has duration
1064
- * as a getter.
1065
- */
1066
- n.duration
1067
- );
1068
- };
1069
- }
1070
- const vi = wi(Zn);
1071
- function bi(t, e = {}) {
1072
- return Qn([
1073
- () => {
1074
- const r = new Zn(t, [0, 1], e);
1075
- return r.finished.catch(() => {
1076
- }), r;
1077
- }
1078
- ], e, e.duration);
1079
- }
1080
- function he(t, e, r) {
1081
- return (Te(t) ? bi : vi)(t, e, r);
1082
- }
1083
- /**
1084
- * @license
1085
- * Copyright 2018 Google LLC
1086
- * SPDX-License-Identifier: BSD-3-Clause
1087
- */
1088
- const F = (t) => t ?? H;
1089
- var Ce = {}, Rt, en;
1090
- function yi() {
1091
- return en || (en = 1, Rt = function() {
1092
- return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
1093
- }), Rt;
1094
- }
1095
- var Mt = {}, te = {}, tn;
1096
- function be() {
1097
- if (tn) return te;
1098
- tn = 1;
1099
- let t;
1100
- const e = [
1101
- 0,
1102
- // Not used
1103
- 26,
1104
- 44,
1105
- 70,
1106
- 100,
1107
- 134,
1108
- 172,
1109
- 196,
1110
- 242,
1111
- 292,
1112
- 346,
1113
- 404,
1114
- 466,
1115
- 532,
1116
- 581,
1117
- 655,
1118
- 733,
1119
- 815,
1120
- 901,
1121
- 991,
1122
- 1085,
1123
- 1156,
1124
- 1258,
1125
- 1364,
1126
- 1474,
1127
- 1588,
1128
- 1706,
1129
- 1828,
1130
- 1921,
1131
- 2051,
1132
- 2185,
1133
- 2323,
1134
- 2465,
1135
- 2611,
1136
- 2761,
1137
- 2876,
1138
- 3034,
1139
- 3196,
1140
- 3362,
1141
- 3532,
1142
- 3706
1143
- ];
1144
- return te.getSymbolSize = function(o) {
1145
- if (!o) throw new Error('"version" cannot be null or undefined');
1146
- if (o < 1 || o > 40) throw new Error('"version" should be in range from 1 to 40');
1147
- return o * 4 + 17;
1148
- }, te.getSymbolTotalCodewords = function(o) {
1149
- return e[o];
1150
- }, te.getBCHDigit = function(r) {
1151
- let o = 0;
1152
- for (; r !== 0; )
1153
- o++, r >>>= 1;
1154
- return o;
1155
- }, te.setToSJISFunction = function(o) {
1156
- if (typeof o != "function")
1157
- throw new Error('"toSJISFunc" is not a valid function.');
1158
- t = o;
1159
- }, te.isKanjiModeEnabled = function() {
1160
- return typeof t < "u";
1161
- }, te.toSJIS = function(o) {
1162
- return t(o);
1163
- }, te;
1164
- }
1165
- var St = {}, rn;
1166
- function Pr() {
1167
- return rn || (rn = 1, (function(t) {
1168
- t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
1169
- function e(r) {
1170
- if (typeof r != "string")
1171
- throw new Error("Param is not a string");
1172
- switch (r.toLowerCase()) {
1173
- case "l":
1174
- case "low":
1175
- return t.L;
1176
- case "m":
1177
- case "medium":
1178
- return t.M;
1179
- case "q":
1180
- case "quartile":
1181
- return t.Q;
1182
- case "h":
1183
- case "high":
1184
- return t.H;
1185
- default:
1186
- throw new Error("Unknown EC Level: " + r);
1187
- }
1188
- }
1189
- t.isValid = function(o) {
1190
- return o && typeof o.bit < "u" && o.bit >= 0 && o.bit < 4;
1191
- }, t.from = function(o, n) {
1192
- if (t.isValid(o))
1193
- return o;
1194
- try {
1195
- return e(o);
1196
- } catch {
1197
- return n;
1198
- }
1199
- };
1200
- })(St)), St;
1201
- }
1202
- var Dt, nn;
1203
- function xi() {
1204
- if (nn) return Dt;
1205
- nn = 1;
1206
- function t() {
1207
- this.buffer = [], this.length = 0;
1208
- }
1209
- return t.prototype = {
1210
- get: function(e) {
1211
- const r = Math.floor(e / 8);
1212
- return (this.buffer[r] >>> 7 - e % 8 & 1) === 1;
1213
- },
1214
- put: function(e, r) {
1215
- for (let o = 0; o < r; o++)
1216
- this.putBit((e >>> r - o - 1 & 1) === 1);
1217
- },
1218
- getLengthInBits: function() {
1219
- return this.length;
1220
- },
1221
- putBit: function(e) {
1222
- const r = Math.floor(this.length / 8);
1223
- this.buffer.length <= r && this.buffer.push(0), e && (this.buffer[r] |= 128 >>> this.length % 8), this.length++;
1224
- }
1225
- }, Dt = t, Dt;
1226
- }
1227
- var Nt, on;
1228
- function Ci() {
1229
- if (on) return Nt;
1230
- on = 1;
1231
- function t(e) {
1232
- if (!e || e < 1)
1233
- throw new Error("BitMatrix size must be defined and greater than 0");
1234
- this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
1235
- }
1236
- return t.prototype.set = function(e, r, o, n) {
1237
- const i = e * this.size + r;
1238
- this.data[i] = o, n && (this.reservedBit[i] = !0);
1239
- }, t.prototype.get = function(e, r) {
1240
- return this.data[e * this.size + r];
1241
- }, t.prototype.xor = function(e, r, o) {
1242
- this.data[e * this.size + r] ^= o;
1243
- }, t.prototype.isReserved = function(e, r) {
1244
- return this.reservedBit[e * this.size + r];
1245
- }, Nt = t, Nt;
1246
- }
1247
- var Lt = {}, sn;
1248
- function _i() {
1249
- return sn || (sn = 1, (function(t) {
1250
- const e = be().getSymbolSize;
1251
- t.getRowColCoords = function(o) {
1252
- if (o === 1) return [];
1253
- const n = Math.floor(o / 7) + 2, i = e(o), s = i === 145 ? 26 : Math.ceil((i - 13) / (2 * n - 2)) * 2, a = [i - 7];
1254
- for (let l = 1; l < n - 1; l++)
1255
- a[l] = a[l - 1] - s;
1256
- return a.push(6), a.reverse();
1257
- }, t.getPositions = function(o) {
1258
- const n = [], i = t.getRowColCoords(o), s = i.length;
1259
- for (let a = 0; a < s; a++)
1260
- for (let l = 0; l < s; l++)
1261
- a === 0 && l === 0 || // top-left
1262
- a === 0 && l === s - 1 || // bottom-left
1263
- a === s - 1 && l === 0 || n.push([i[a], i[l]]);
1264
- return n;
1265
- };
1266
- })(Lt)), Lt;
1267
- }
1268
- var Bt = {}, an;
1269
- function $i() {
1270
- if (an) return Bt;
1271
- an = 1;
1272
- const t = be().getSymbolSize, e = 7;
1273
- return Bt.getPositions = function(o) {
1274
- const n = t(o);
1275
- return [
1276
- // top-left
1277
- [0, 0],
1278
- // top-right
1279
- [n - e, 0],
1280
- // bottom-left
1281
- [0, n - e]
1282
- ];
1283
- }, Bt;
1284
- }
1285
- var Wt = {}, ln;
1286
- function Ei() {
1287
- return ln || (ln = 1, (function(t) {
1288
- t.Patterns = {
1289
- PATTERN000: 0,
1290
- PATTERN001: 1,
1291
- PATTERN010: 2,
1292
- PATTERN011: 3,
1293
- PATTERN100: 4,
1294
- PATTERN101: 5,
1295
- PATTERN110: 6,
1296
- PATTERN111: 7
1297
- };
1298
- const e = {
1299
- N1: 3,
1300
- N2: 3,
1301
- N3: 40,
1302
- N4: 10
1303
- };
1304
- t.isValid = function(n) {
1305
- return n != null && n !== "" && !isNaN(n) && n >= 0 && n <= 7;
1306
- }, t.from = function(n) {
1307
- return t.isValid(n) ? parseInt(n, 10) : void 0;
1308
- }, t.getPenaltyN1 = function(n) {
1309
- const i = n.size;
1310
- let s = 0, a = 0, l = 0, c = null, h = null;
1311
- for (let w = 0; w < i; w++) {
1312
- a = l = 0, c = h = null;
1313
- for (let d = 0; d < i; d++) {
1314
- let u = n.get(w, d);
1315
- u === c ? a++ : (a >= 5 && (s += e.N1 + (a - 5)), c = u, a = 1), u = n.get(d, w), u === h ? l++ : (l >= 5 && (s += e.N1 + (l - 5)), h = u, l = 1);
1316
- }
1317
- a >= 5 && (s += e.N1 + (a - 5)), l >= 5 && (s += e.N1 + (l - 5));
1318
- }
1319
- return s;
1320
- }, t.getPenaltyN2 = function(n) {
1321
- const i = n.size;
1322
- let s = 0;
1323
- for (let a = 0; a < i - 1; a++)
1324
- for (let l = 0; l < i - 1; l++) {
1325
- const c = n.get(a, l) + n.get(a, l + 1) + n.get(a + 1, l) + n.get(a + 1, l + 1);
1326
- (c === 4 || c === 0) && s++;
1327
- }
1328
- return s * e.N2;
1329
- }, t.getPenaltyN3 = function(n) {
1330
- const i = n.size;
1331
- let s = 0, a = 0, l = 0;
1332
- for (let c = 0; c < i; c++) {
1333
- a = l = 0;
1334
- for (let h = 0; h < i; h++)
1335
- a = a << 1 & 2047 | n.get(c, h), h >= 10 && (a === 1488 || a === 93) && s++, l = l << 1 & 2047 | n.get(h, c), h >= 10 && (l === 1488 || l === 93) && s++;
1336
- }
1337
- return s * e.N3;
1338
- }, t.getPenaltyN4 = function(n) {
1339
- let i = 0;
1340
- const s = n.data.length;
1341
- for (let l = 0; l < s; l++) i += n.data[l];
1342
- return Math.abs(Math.ceil(i * 100 / s / 5) - 10) * e.N4;
1343
- };
1344
- function r(o, n, i) {
1345
- switch (o) {
1346
- case t.Patterns.PATTERN000:
1347
- return (n + i) % 2 === 0;
1348
- case t.Patterns.PATTERN001:
1349
- return n % 2 === 0;
1350
- case t.Patterns.PATTERN010:
1351
- return i % 3 === 0;
1352
- case t.Patterns.PATTERN011:
1353
- return (n + i) % 3 === 0;
1354
- case t.Patterns.PATTERN100:
1355
- return (Math.floor(n / 2) + Math.floor(i / 3)) % 2 === 0;
1356
- case t.Patterns.PATTERN101:
1357
- return n * i % 2 + n * i % 3 === 0;
1358
- case t.Patterns.PATTERN110:
1359
- return (n * i % 2 + n * i % 3) % 2 === 0;
1360
- case t.Patterns.PATTERN111:
1361
- return (n * i % 3 + (n + i) % 2) % 2 === 0;
1362
- default:
1363
- throw new Error("bad maskPattern:" + o);
1364
- }
1365
- }
1366
- t.applyMask = function(n, i) {
1367
- const s = i.size;
1368
- for (let a = 0; a < s; a++)
1369
- for (let l = 0; l < s; l++)
1370
- i.isReserved(l, a) || i.xor(l, a, r(n, l, a));
1371
- }, t.getBestMask = function(n, i) {
1372
- const s = Object.keys(t.Patterns).length;
1373
- let a = 0, l = 1 / 0;
1374
- for (let c = 0; c < s; c++) {
1375
- i(c), t.applyMask(c, n);
1376
- const h = t.getPenaltyN1(n) + t.getPenaltyN2(n) + t.getPenaltyN3(n) + t.getPenaltyN4(n);
1377
- t.applyMask(c, n), h < l && (l = h, a = c);
1378
- }
1379
- return a;
1380
- };
1381
- })(Wt)), Wt;
1382
- }
1383
- var tt = {}, cn;
1384
- function Jn() {
1385
- if (cn) return tt;
1386
- cn = 1;
1387
- const t = Pr(), e = [
1388
- // L M Q H
1389
- 1,
1390
- 1,
1391
- 1,
1392
- 1,
1393
- 1,
1394
- 1,
1395
- 1,
1396
- 1,
1397
- 1,
1398
- 1,
1399
- 2,
1400
- 2,
1401
- 1,
1402
- 2,
1403
- 2,
1404
- 4,
1405
- 1,
1406
- 2,
1407
- 4,
1408
- 4,
1409
- 2,
1410
- 4,
1411
- 4,
1412
- 4,
1413
- 2,
1414
- 4,
1415
- 6,
1416
- 5,
1417
- 2,
1418
- 4,
1419
- 6,
1420
- 6,
1421
- 2,
1422
- 5,
1423
- 8,
1424
- 8,
1425
- 4,
1426
- 5,
1427
- 8,
1428
- 8,
1429
- 4,
1430
- 5,
1431
- 8,
1432
- 11,
1433
- 4,
1434
- 8,
1435
- 10,
1436
- 11,
1437
- 4,
1438
- 9,
1439
- 12,
1440
- 16,
1441
- 4,
1442
- 9,
1443
- 16,
1444
- 16,
1445
- 6,
1446
- 10,
1447
- 12,
1448
- 18,
1449
- 6,
1450
- 10,
1451
- 17,
1452
- 16,
1453
- 6,
1454
- 11,
1455
- 16,
1456
- 19,
1457
- 6,
1458
- 13,
1459
- 18,
1460
- 21,
1461
- 7,
1462
- 14,
1463
- 21,
1464
- 25,
1465
- 8,
1466
- 16,
1467
- 20,
1468
- 25,
1469
- 8,
1470
- 17,
1471
- 23,
1472
- 25,
1473
- 9,
1474
- 17,
1475
- 23,
1476
- 34,
1477
- 9,
1478
- 18,
1479
- 25,
1480
- 30,
1481
- 10,
1482
- 20,
1483
- 27,
1484
- 32,
1485
- 12,
1486
- 21,
1487
- 29,
1488
- 35,
1489
- 12,
1490
- 23,
1491
- 34,
1492
- 37,
1493
- 12,
1494
- 25,
1495
- 34,
1496
- 40,
1497
- 13,
1498
- 26,
1499
- 35,
1500
- 42,
1501
- 14,
1502
- 28,
1503
- 38,
1504
- 45,
1505
- 15,
1506
- 29,
1507
- 40,
1508
- 48,
1509
- 16,
1510
- 31,
1511
- 43,
1512
- 51,
1513
- 17,
1514
- 33,
1515
- 45,
1516
- 54,
1517
- 18,
1518
- 35,
1519
- 48,
1520
- 57,
1521
- 19,
1522
- 37,
1523
- 51,
1524
- 60,
1525
- 19,
1526
- 38,
1527
- 53,
1528
- 63,
1529
- 20,
1530
- 40,
1531
- 56,
1532
- 66,
1533
- 21,
1534
- 43,
1535
- 59,
1536
- 70,
1537
- 22,
1538
- 45,
1539
- 62,
1540
- 74,
1541
- 24,
1542
- 47,
1543
- 65,
1544
- 77,
1545
- 25,
1546
- 49,
1547
- 68,
1548
- 81
1549
- ], r = [
1550
- // L M Q H
1551
- 7,
1552
- 10,
1553
- 13,
1554
- 17,
1555
- 10,
1556
- 16,
1557
- 22,
1558
- 28,
1559
- 15,
1560
- 26,
1561
- 36,
1562
- 44,
1563
- 20,
1564
- 36,
1565
- 52,
1566
- 64,
1567
- 26,
1568
- 48,
1569
- 72,
1570
- 88,
1571
- 36,
1572
- 64,
1573
- 96,
1574
- 112,
1575
- 40,
1576
- 72,
1577
- 108,
1578
- 130,
1579
- 48,
1580
- 88,
1581
- 132,
1582
- 156,
1583
- 60,
1584
- 110,
1585
- 160,
1586
- 192,
1587
- 72,
1588
- 130,
1589
- 192,
1590
- 224,
1591
- 80,
1592
- 150,
1593
- 224,
1594
- 264,
1595
- 96,
1596
- 176,
1597
- 260,
1598
- 308,
1599
- 104,
1600
- 198,
1601
- 288,
1602
- 352,
1603
- 120,
1604
- 216,
1605
- 320,
1606
- 384,
1607
- 132,
1608
- 240,
1609
- 360,
1610
- 432,
1611
- 144,
1612
- 280,
1613
- 408,
1614
- 480,
1615
- 168,
1616
- 308,
1617
- 448,
1618
- 532,
1619
- 180,
1620
- 338,
1621
- 504,
1622
- 588,
1623
- 196,
1624
- 364,
1625
- 546,
1626
- 650,
1627
- 224,
1628
- 416,
1629
- 600,
1630
- 700,
1631
- 224,
1632
- 442,
1633
- 644,
1634
- 750,
1635
- 252,
1636
- 476,
1637
- 690,
1638
- 816,
1639
- 270,
1640
- 504,
1641
- 750,
1642
- 900,
1643
- 300,
1644
- 560,
1645
- 810,
1646
- 960,
1647
- 312,
1648
- 588,
1649
- 870,
1650
- 1050,
1651
- 336,
1652
- 644,
1653
- 952,
1654
- 1110,
1655
- 360,
1656
- 700,
1657
- 1020,
1658
- 1200,
1659
- 390,
1660
- 728,
1661
- 1050,
1662
- 1260,
1663
- 420,
1664
- 784,
1665
- 1140,
1666
- 1350,
1667
- 450,
1668
- 812,
1669
- 1200,
1670
- 1440,
1671
- 480,
1672
- 868,
1673
- 1290,
1674
- 1530,
1675
- 510,
1676
- 924,
1677
- 1350,
1678
- 1620,
1679
- 540,
1680
- 980,
1681
- 1440,
1682
- 1710,
1683
- 570,
1684
- 1036,
1685
- 1530,
1686
- 1800,
1687
- 570,
1688
- 1064,
1689
- 1590,
1690
- 1890,
1691
- 600,
1692
- 1120,
1693
- 1680,
1694
- 1980,
1695
- 630,
1696
- 1204,
1697
- 1770,
1698
- 2100,
1699
- 660,
1700
- 1260,
1701
- 1860,
1702
- 2220,
1703
- 720,
1704
- 1316,
1705
- 1950,
1706
- 2310,
1707
- 750,
1708
- 1372,
1709
- 2040,
1710
- 2430
1711
- ];
1712
- return tt.getBlocksCount = function(n, i) {
1713
- switch (i) {
1714
- case t.L:
1715
- return e[(n - 1) * 4 + 0];
1716
- case t.M:
1717
- return e[(n - 1) * 4 + 1];
1718
- case t.Q:
1719
- return e[(n - 1) * 4 + 2];
1720
- case t.H:
1721
- return e[(n - 1) * 4 + 3];
1722
- default:
1723
- return;
1724
- }
1725
- }, tt.getTotalCodewordsCount = function(n, i) {
1726
- switch (i) {
1727
- case t.L:
1728
- return r[(n - 1) * 4 + 0];
1729
- case t.M:
1730
- return r[(n - 1) * 4 + 1];
1731
- case t.Q:
1732
- return r[(n - 1) * 4 + 2];
1733
- case t.H:
1734
- return r[(n - 1) * 4 + 3];
1735
- default:
1736
- return;
1737
- }
1738
- }, tt;
1739
- }
1740
- var kt = {}, We = {}, dn;
1741
- function Ai() {
1742
- if (dn) return We;
1743
- dn = 1;
1744
- const t = new Uint8Array(512), e = new Uint8Array(256);
1745
- return (function() {
1746
- let o = 1;
1747
- for (let n = 0; n < 255; n++)
1748
- t[n] = o, e[o] = n, o <<= 1, o & 256 && (o ^= 285);
1749
- for (let n = 255; n < 512; n++)
1750
- t[n] = t[n - 255];
1751
- })(), We.log = function(o) {
1752
- if (o < 1) throw new Error("log(" + o + ")");
1753
- return e[o];
1754
- }, We.exp = function(o) {
1755
- return t[o];
1756
- }, We.mul = function(o, n) {
1757
- return o === 0 || n === 0 ? 0 : t[e[o] + e[n]];
1758
- }, We;
1759
- }
1760
- var un;
1761
- function Oi() {
1762
- return un || (un = 1, (function(t) {
1763
- const e = Ai();
1764
- t.mul = function(o, n) {
1765
- const i = new Uint8Array(o.length + n.length - 1);
1766
- for (let s = 0; s < o.length; s++)
1767
- for (let a = 0; a < n.length; a++)
1768
- i[s + a] ^= e.mul(o[s], n[a]);
1769
- return i;
1770
- }, t.mod = function(o, n) {
1771
- let i = new Uint8Array(o);
1772
- for (; i.length - n.length >= 0; ) {
1773
- const s = i[0];
1774
- for (let l = 0; l < n.length; l++)
1775
- i[l] ^= e.mul(n[l], s);
1776
- let a = 0;
1777
- for (; a < i.length && i[a] === 0; ) a++;
1778
- i = i.slice(a);
1779
- }
1780
- return i;
1781
- }, t.generateECPolynomial = function(o) {
1782
- let n = new Uint8Array([1]);
1783
- for (let i = 0; i < o; i++)
1784
- n = t.mul(n, new Uint8Array([1, e.exp(i)]));
1785
- return n;
1786
- };
1787
- })(kt)), kt;
1788
- }
1789
- var Ut, hn;
1790
- function Ii() {
1791
- if (hn) return Ut;
1792
- hn = 1;
1793
- const t = Oi();
1794
- function e(r) {
1795
- this.genPoly = void 0, this.degree = r, this.degree && this.initialize(this.degree);
1796
- }
1797
- return e.prototype.initialize = function(o) {
1798
- this.degree = o, this.genPoly = t.generateECPolynomial(this.degree);
1799
- }, e.prototype.encode = function(o) {
1800
- if (!this.genPoly)
1801
- throw new Error("Encoder not initialized");
1802
- const n = new Uint8Array(o.length + this.degree);
1803
- n.set(o);
1804
- const i = t.mod(n, this.genPoly), s = this.degree - i.length;
1805
- if (s > 0) {
1806
- const a = new Uint8Array(this.degree);
1807
- return a.set(i, s), a;
1808
- }
1809
- return i;
1810
- }, Ut = e, Ut;
1811
- }
1812
- var jt = {}, Ht = {}, Ft = {}, mn;
1813
- function Xn() {
1814
- return mn || (mn = 1, Ft.isValid = function(e) {
1815
- return !isNaN(e) && e >= 1 && e <= 40;
1816
- }), Ft;
1817
- }
1818
- var Z = {}, fn;
1819
- function eo() {
1820
- if (fn) return Z;
1821
- fn = 1;
1822
- const t = "[0-9]+", e = "[A-Z $%*+\\-./:]+";
1823
- let r = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
1824
- r = r.replace(/u/g, "\\u");
1825
- const o = "(?:(?![A-Z0-9 $%*+\\-./:]|" + r + `)(?:.|[\r
1826
- ]))+`;
1827
- Z.KANJI = new RegExp(r, "g"), Z.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), Z.BYTE = new RegExp(o, "g"), Z.NUMERIC = new RegExp(t, "g"), Z.ALPHANUMERIC = new RegExp(e, "g");
1828
- const n = new RegExp("^" + r + "$"), i = new RegExp("^" + t + "$"), s = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
1829
- return Z.testKanji = function(l) {
1830
- return n.test(l);
1831
- }, Z.testNumeric = function(l) {
1832
- return i.test(l);
1833
- }, Z.testAlphanumeric = function(l) {
1834
- return s.test(l);
1835
- }, Z;
1836
- }
1837
- var gn;
1838
- function ye() {
1839
- return gn || (gn = 1, (function(t) {
1840
- const e = Xn(), r = eo();
1841
- t.NUMERIC = {
1842
- id: "Numeric",
1843
- bit: 1,
1844
- ccBits: [10, 12, 14]
1845
- }, t.ALPHANUMERIC = {
1846
- id: "Alphanumeric",
1847
- bit: 2,
1848
- ccBits: [9, 11, 13]
1849
- }, t.BYTE = {
1850
- id: "Byte",
1851
- bit: 4,
1852
- ccBits: [8, 16, 16]
1853
- }, t.KANJI = {
1854
- id: "Kanji",
1855
- bit: 8,
1856
- ccBits: [8, 10, 12]
1857
- }, t.MIXED = {
1858
- bit: -1
1859
- }, t.getCharCountIndicator = function(i, s) {
1860
- if (!i.ccBits) throw new Error("Invalid mode: " + i);
1861
- if (!e.isValid(s))
1862
- throw new Error("Invalid version: " + s);
1863
- return s >= 1 && s < 10 ? i.ccBits[0] : s < 27 ? i.ccBits[1] : i.ccBits[2];
1864
- }, t.getBestModeForData = function(i) {
1865
- return r.testNumeric(i) ? t.NUMERIC : r.testAlphanumeric(i) ? t.ALPHANUMERIC : r.testKanji(i) ? t.KANJI : t.BYTE;
1866
- }, t.toString = function(i) {
1867
- if (i && i.id) return i.id;
1868
- throw new Error("Invalid mode");
1869
- }, t.isValid = function(i) {
1870
- return i && i.bit && i.ccBits;
1871
- };
1872
- function o(n) {
1873
- if (typeof n != "string")
1874
- throw new Error("Param is not a string");
1875
- switch (n.toLowerCase()) {
1876
- case "numeric":
1877
- return t.NUMERIC;
1878
- case "alphanumeric":
1879
- return t.ALPHANUMERIC;
1880
- case "kanji":
1881
- return t.KANJI;
1882
- case "byte":
1883
- return t.BYTE;
1884
- default:
1885
- throw new Error("Unknown mode: " + n);
1886
- }
1887
- }
1888
- t.from = function(i, s) {
1889
- if (t.isValid(i))
1890
- return i;
1891
- try {
1892
- return o(i);
1893
- } catch {
1894
- return s;
1895
- }
1896
- };
1897
- })(Ht)), Ht;
1898
- }
1899
- var pn;
1900
- function Pi() {
1901
- return pn || (pn = 1, (function(t) {
1902
- const e = be(), r = Jn(), o = Pr(), n = ye(), i = Xn(), s = 7973, a = e.getBCHDigit(s);
1903
- function l(d, u, b) {
1904
- for (let p = 1; p <= 40; p++)
1905
- if (u <= t.getCapacity(p, b, d))
1906
- return p;
1907
- }
1908
- function c(d, u) {
1909
- return n.getCharCountIndicator(d, u) + 4;
1910
- }
1911
- function h(d, u) {
1912
- let b = 0;
1913
- return d.forEach(function(p) {
1914
- const D = c(p.mode, u);
1915
- b += D + p.getBitsLength();
1916
- }), b;
1917
- }
1918
- function w(d, u) {
1919
- for (let b = 1; b <= 40; b++)
1920
- if (h(d, b) <= t.getCapacity(b, u, n.MIXED))
1921
- return b;
1922
- }
1923
- t.from = function(u, b) {
1924
- return i.isValid(u) ? parseInt(u, 10) : b;
1925
- }, t.getCapacity = function(u, b, p) {
1926
- if (!i.isValid(u))
1927
- throw new Error("Invalid QR Code version");
1928
- typeof p > "u" && (p = n.BYTE);
1929
- const D = e.getSymbolTotalCodewords(u), g = r.getTotalCodewordsCount(u, b), E = (D - g) * 8;
1930
- if (p === n.MIXED) return E;
1931
- const y = E - c(p, u);
1932
- switch (p) {
1933
- case n.NUMERIC:
1934
- return Math.floor(y / 10 * 3);
1935
- case n.ALPHANUMERIC:
1936
- return Math.floor(y / 11 * 2);
1937
- case n.KANJI:
1938
- return Math.floor(y / 13);
1939
- case n.BYTE:
1940
- default:
1941
- return Math.floor(y / 8);
1942
- }
1943
- }, t.getBestVersionForData = function(u, b) {
1944
- let p;
1945
- const D = o.from(b, o.M);
1946
- if (Array.isArray(u)) {
1947
- if (u.length > 1)
1948
- return w(u, D);
1949
- if (u.length === 0)
1950
- return 1;
1951
- p = u[0];
1952
- } else
1953
- p = u;
1954
- return l(p.mode, p.getLength(), D);
1955
- }, t.getEncodedBits = function(u) {
1956
- if (!i.isValid(u) || u < 7)
1957
- throw new Error("Invalid QR Code version");
1958
- let b = u << 12;
1959
- for (; e.getBCHDigit(b) - a >= 0; )
1960
- b ^= s << e.getBCHDigit(b) - a;
1961
- return u << 12 | b;
1962
- };
1963
- })(jt)), jt;
1964
- }
1965
- var zt = {}, wn;
1966
- function Ti() {
1967
- if (wn) return zt;
1968
- wn = 1;
1969
- const t = be(), e = 1335, r = 21522, o = t.getBCHDigit(e);
1970
- return zt.getEncodedBits = function(i, s) {
1971
- const a = i.bit << 3 | s;
1972
- let l = a << 10;
1973
- for (; t.getBCHDigit(l) - o >= 0; )
1974
- l ^= e << t.getBCHDigit(l) - o;
1975
- return (a << 10 | l) ^ r;
1976
- }, zt;
1977
- }
1978
- var qt = {}, Vt, vn;
1979
- function Ri() {
1980
- if (vn) return Vt;
1981
- vn = 1;
1982
- const t = ye();
1983
- function e(r) {
1984
- this.mode = t.NUMERIC, this.data = r.toString();
1985
- }
1986
- return e.getBitsLength = function(o) {
1987
- return 10 * Math.floor(o / 3) + (o % 3 ? o % 3 * 3 + 1 : 0);
1988
- }, e.prototype.getLength = function() {
1989
- return this.data.length;
1990
- }, e.prototype.getBitsLength = function() {
1991
- return e.getBitsLength(this.data.length);
1992
- }, e.prototype.write = function(o) {
1993
- let n, i, s;
1994
- for (n = 0; n + 3 <= this.data.length; n += 3)
1995
- i = this.data.substr(n, 3), s = parseInt(i, 10), o.put(s, 10);
1996
- const a = this.data.length - n;
1997
- a > 0 && (i = this.data.substr(n), s = parseInt(i, 10), o.put(s, a * 3 + 1));
1998
- }, Vt = e, Vt;
1999
- }
2000
- var Zt, bn;
2001
- function Mi() {
2002
- if (bn) return Zt;
2003
- bn = 1;
2004
- const t = ye(), e = [
2005
- "0",
2006
- "1",
2007
- "2",
2008
- "3",
2009
- "4",
2010
- "5",
2011
- "6",
2012
- "7",
2013
- "8",
2014
- "9",
2015
- "A",
2016
- "B",
2017
- "C",
2018
- "D",
2019
- "E",
2020
- "F",
2021
- "G",
2022
- "H",
2023
- "I",
2024
- "J",
2025
- "K",
2026
- "L",
2027
- "M",
2028
- "N",
2029
- "O",
2030
- "P",
2031
- "Q",
2032
- "R",
2033
- "S",
2034
- "T",
2035
- "U",
2036
- "V",
2037
- "W",
2038
- "X",
2039
- "Y",
2040
- "Z",
2041
- " ",
2042
- "$",
2043
- "%",
2044
- "*",
2045
- "+",
2046
- "-",
2047
- ".",
2048
- "/",
2049
- ":"
2050
- ];
2051
- function r(o) {
2052
- this.mode = t.ALPHANUMERIC, this.data = o;
2053
- }
2054
- return r.getBitsLength = function(n) {
2055
- return 11 * Math.floor(n / 2) + 6 * (n % 2);
2056
- }, r.prototype.getLength = function() {
2057
- return this.data.length;
2058
- }, r.prototype.getBitsLength = function() {
2059
- return r.getBitsLength(this.data.length);
2060
- }, r.prototype.write = function(n) {
2061
- let i;
2062
- for (i = 0; i + 2 <= this.data.length; i += 2) {
2063
- let s = e.indexOf(this.data[i]) * 45;
2064
- s += e.indexOf(this.data[i + 1]), n.put(s, 11);
2065
- }
2066
- this.data.length % 2 && n.put(e.indexOf(this.data[i]), 6);
2067
- }, Zt = r, Zt;
2068
- }
2069
- var Kt, yn;
2070
- function Si() {
2071
- return yn || (yn = 1, Kt = function(e) {
2072
- for (var r = [], o = e.length, n = 0; n < o; n++) {
2073
- var i = e.charCodeAt(n);
2074
- if (i >= 55296 && i <= 56319 && o > n + 1) {
2075
- var s = e.charCodeAt(n + 1);
2076
- s >= 56320 && s <= 57343 && (i = (i - 55296) * 1024 + s - 56320 + 65536, n += 1);
2077
- }
2078
- if (i < 128) {
2079
- r.push(i);
2080
- continue;
2081
- }
2082
- if (i < 2048) {
2083
- r.push(i >> 6 | 192), r.push(i & 63 | 128);
2084
- continue;
2085
- }
2086
- if (i < 55296 || i >= 57344 && i < 65536) {
2087
- r.push(i >> 12 | 224), r.push(i >> 6 & 63 | 128), r.push(i & 63 | 128);
2088
- continue;
2089
- }
2090
- if (i >= 65536 && i <= 1114111) {
2091
- r.push(i >> 18 | 240), r.push(i >> 12 & 63 | 128), r.push(i >> 6 & 63 | 128), r.push(i & 63 | 128);
2092
- continue;
2093
- }
2094
- r.push(239, 191, 189);
2095
- }
2096
- return new Uint8Array(r).buffer;
2097
- }), Kt;
2098
- }
2099
- var Yt, xn;
2100
- function Di() {
2101
- if (xn) return Yt;
2102
- xn = 1;
2103
- const t = Si(), e = ye();
2104
- function r(o) {
2105
- this.mode = e.BYTE, typeof o == "string" && (o = t(o)), this.data = new Uint8Array(o);
2106
- }
2107
- return r.getBitsLength = function(n) {
2108
- return n * 8;
2109
- }, r.prototype.getLength = function() {
2110
- return this.data.length;
2111
- }, r.prototype.getBitsLength = function() {
2112
- return r.getBitsLength(this.data.length);
2113
- }, r.prototype.write = function(o) {
2114
- for (let n = 0, i = this.data.length; n < i; n++)
2115
- o.put(this.data[n], 8);
2116
- }, Yt = r, Yt;
2117
- }
2118
- var Gt, Cn;
2119
- function Ni() {
2120
- if (Cn) return Gt;
2121
- Cn = 1;
2122
- const t = ye(), e = be();
2123
- function r(o) {
2124
- this.mode = t.KANJI, this.data = o;
2125
- }
2126
- return r.getBitsLength = function(n) {
2127
- return n * 13;
2128
- }, r.prototype.getLength = function() {
2129
- return this.data.length;
2130
- }, r.prototype.getBitsLength = function() {
2131
- return r.getBitsLength(this.data.length);
2132
- }, r.prototype.write = function(o) {
2133
- let n;
2134
- for (n = 0; n < this.data.length; n++) {
2135
- let i = e.toSJIS(this.data[n]);
2136
- if (i >= 33088 && i <= 40956)
2137
- i -= 33088;
2138
- else if (i >= 57408 && i <= 60351)
2139
- i -= 49472;
2140
- else
2141
- throw new Error(
2142
- "Invalid SJIS character: " + this.data[n] + `
2143
- Make sure your charset is UTF-8`
2144
- );
2145
- i = (i >>> 8 & 255) * 192 + (i & 255), o.put(i, 13);
2146
- }
2147
- }, Gt = r, Gt;
2148
- }
2149
- var _n;
2150
- function Li() {
2151
- return _n || (_n = 1, (function(t) {
2152
- const e = ye(), r = Ri(), o = Mi(), n = Di(), i = Ni(), s = eo(), a = be(), l = ho();
2153
- function c(g) {
2154
- return unescape(encodeURIComponent(g)).length;
2155
- }
2156
- function h(g, E, y) {
2157
- const C = [];
2158
- let W;
2159
- for (; (W = g.exec(y)) !== null; )
2160
- C.push({
2161
- data: W[0],
2162
- index: W.index,
2163
- mode: E,
2164
- length: W[0].length
2165
- });
2166
- return C;
2167
- }
2168
- function w(g) {
2169
- const E = h(s.NUMERIC, e.NUMERIC, g), y = h(s.ALPHANUMERIC, e.ALPHANUMERIC, g);
2170
- let C, W;
2171
- return a.isKanjiModeEnabled() ? (C = h(s.BYTE, e.BYTE, g), W = h(s.KANJI, e.KANJI, g)) : (C = h(s.BYTE_KANJI, e.BYTE, g), W = []), E.concat(y, C, W).sort(function($, A) {
2172
- return $.index - A.index;
2173
- }).map(function($) {
2174
- return {
2175
- data: $.data,
2176
- mode: $.mode,
2177
- length: $.length
2178
- };
2179
- });
2180
- }
2181
- function d(g, E) {
2182
- switch (E) {
2183
- case e.NUMERIC:
2184
- return r.getBitsLength(g);
2185
- case e.ALPHANUMERIC:
2186
- return o.getBitsLength(g);
2187
- case e.KANJI:
2188
- return i.getBitsLength(g);
2189
- case e.BYTE:
2190
- return n.getBitsLength(g);
2191
- }
2192
- }
2193
- function u(g) {
2194
- return g.reduce(function(E, y) {
2195
- const C = E.length - 1 >= 0 ? E[E.length - 1] : null;
2196
- return C && C.mode === y.mode ? (E[E.length - 1].data += y.data, E) : (E.push(y), E);
2197
- }, []);
2198
- }
2199
- function b(g) {
2200
- const E = [];
2201
- for (let y = 0; y < g.length; y++) {
2202
- const C = g[y];
2203
- switch (C.mode) {
2204
- case e.NUMERIC:
2205
- E.push([
2206
- C,
2207
- { data: C.data, mode: e.ALPHANUMERIC, length: C.length },
2208
- { data: C.data, mode: e.BYTE, length: C.length }
2209
- ]);
2210
- break;
2211
- case e.ALPHANUMERIC:
2212
- E.push([
2213
- C,
2214
- { data: C.data, mode: e.BYTE, length: C.length }
2215
- ]);
2216
- break;
2217
- case e.KANJI:
2218
- E.push([
2219
- C,
2220
- { data: C.data, mode: e.BYTE, length: c(C.data) }
2221
- ]);
2222
- break;
2223
- case e.BYTE:
2224
- E.push([
2225
- { data: C.data, mode: e.BYTE, length: c(C.data) }
2226
- ]);
2227
- }
2228
- }
2229
- return E;
2230
- }
2231
- function p(g, E) {
2232
- const y = {}, C = { start: {} };
2233
- let W = ["start"];
2234
- for (let x = 0; x < g.length; x++) {
2235
- const $ = g[x], A = [];
2236
- for (let f = 0; f < $.length; f++) {
2237
- const P = $[f], v = "" + x + f;
2238
- A.push(v), y[v] = { node: P, lastCount: 0 }, C[v] = {};
2239
- for (let O = 0; O < W.length; O++) {
2240
- const _ = W[O];
2241
- y[_] && y[_].node.mode === P.mode ? (C[_][v] = d(y[_].lastCount + P.length, P.mode) - d(y[_].lastCount, P.mode), y[_].lastCount += P.length) : (y[_] && (y[_].lastCount = P.length), C[_][v] = d(P.length, P.mode) + 4 + e.getCharCountIndicator(P.mode, E));
2242
- }
2243
- }
2244
- W = A;
2245
- }
2246
- for (let x = 0; x < W.length; x++)
2247
- C[W[x]].end = 0;
2248
- return { map: C, table: y };
2249
- }
2250
- function D(g, E) {
2251
- let y;
2252
- const C = e.getBestModeForData(g);
2253
- if (y = e.from(E, C), y !== e.BYTE && y.bit < C.bit)
2254
- throw new Error('"' + g + '" cannot be encoded with mode ' + e.toString(y) + `.
2255
- Suggested mode is: ` + e.toString(C));
2256
- switch (y === e.KANJI && !a.isKanjiModeEnabled() && (y = e.BYTE), y) {
2257
- case e.NUMERIC:
2258
- return new r(g);
2259
- case e.ALPHANUMERIC:
2260
- return new o(g);
2261
- case e.KANJI:
2262
- return new i(g);
2263
- case e.BYTE:
2264
- return new n(g);
2265
- }
2266
- }
2267
- t.fromArray = function(E) {
2268
- return E.reduce(function(y, C) {
2269
- return typeof C == "string" ? y.push(D(C, null)) : C.data && y.push(D(C.data, C.mode)), y;
2270
- }, []);
2271
- }, t.fromString = function(E, y) {
2272
- const C = w(E, a.isKanjiModeEnabled()), W = b(C), x = p(W, y), $ = l.find_path(x.map, "start", "end"), A = [];
2273
- for (let f = 1; f < $.length - 1; f++)
2274
- A.push(x.table[$[f]].node);
2275
- return t.fromArray(u(A));
2276
- }, t.rawSplit = function(E) {
2277
- return t.fromArray(
2278
- w(E, a.isKanjiModeEnabled())
2279
- );
2280
- };
2281
- })(qt)), qt;
2282
- }
2283
- var $n;
2284
- function Bi() {
2285
- if ($n) return Mt;
2286
- $n = 1;
2287
- const t = be(), e = Pr(), r = xi(), o = Ci(), n = _i(), i = $i(), s = Ei(), a = Jn(), l = Ii(), c = Pi(), h = Ti(), w = ye(), d = Li();
2288
- function u(x, $) {
2289
- const A = x.size, f = i.getPositions($);
2290
- for (let P = 0; P < f.length; P++) {
2291
- const v = f[P][0], O = f[P][1];
2292
- for (let _ = -1; _ <= 7; _++)
2293
- if (!(v + _ <= -1 || A <= v + _))
2294
- for (let R = -1; R <= 7; R++)
2295
- O + R <= -1 || A <= O + R || (_ >= 0 && _ <= 6 && (R === 0 || R === 6) || R >= 0 && R <= 6 && (_ === 0 || _ === 6) || _ >= 2 && _ <= 4 && R >= 2 && R <= 4 ? x.set(v + _, O + R, !0, !0) : x.set(v + _, O + R, !1, !0));
2296
- }
2297
- }
2298
- function b(x) {
2299
- const $ = x.size;
2300
- for (let A = 8; A < $ - 8; A++) {
2301
- const f = A % 2 === 0;
2302
- x.set(A, 6, f, !0), x.set(6, A, f, !0);
2303
- }
2304
- }
2305
- function p(x, $) {
2306
- const A = n.getPositions($);
2307
- for (let f = 0; f < A.length; f++) {
2308
- const P = A[f][0], v = A[f][1];
2309
- for (let O = -2; O <= 2; O++)
2310
- for (let _ = -2; _ <= 2; _++)
2311
- O === -2 || O === 2 || _ === -2 || _ === 2 || O === 0 && _ === 0 ? x.set(P + O, v + _, !0, !0) : x.set(P + O, v + _, !1, !0);
2312
- }
2313
- }
2314
- function D(x, $) {
2315
- const A = x.size, f = c.getEncodedBits($);
2316
- let P, v, O;
2317
- for (let _ = 0; _ < 18; _++)
2318
- P = Math.floor(_ / 3), v = _ % 3 + A - 8 - 3, O = (f >> _ & 1) === 1, x.set(P, v, O, !0), x.set(v, P, O, !0);
2319
- }
2320
- function g(x, $, A) {
2321
- const f = x.size, P = h.getEncodedBits($, A);
2322
- let v, O;
2323
- for (v = 0; v < 15; v++)
2324
- O = (P >> v & 1) === 1, v < 6 ? x.set(v, 8, O, !0) : v < 8 ? x.set(v + 1, 8, O, !0) : x.set(f - 15 + v, 8, O, !0), v < 8 ? x.set(8, f - v - 1, O, !0) : v < 9 ? x.set(8, 15 - v - 1 + 1, O, !0) : x.set(8, 15 - v - 1, O, !0);
2325
- x.set(f - 8, 8, 1, !0);
2326
- }
2327
- function E(x, $) {
2328
- const A = x.size;
2329
- let f = -1, P = A - 1, v = 7, O = 0;
2330
- for (let _ = A - 1; _ > 0; _ -= 2)
2331
- for (_ === 6 && _--; ; ) {
2332
- for (let R = 0; R < 2; R++)
2333
- if (!x.isReserved(P, _ - R)) {
2334
- let ee = !1;
2335
- O < $.length && (ee = ($[O] >>> v & 1) === 1), x.set(P, _ - R, ee), v--, v === -1 && (O++, v = 7);
2336
- }
2337
- if (P += f, P < 0 || A <= P) {
2338
- P -= f, f = -f;
2339
- break;
2340
- }
2341
- }
2342
- }
2343
- function y(x, $, A) {
2344
- const f = new r();
2345
- A.forEach(function(R) {
2346
- f.put(R.mode.bit, 4), f.put(R.getLength(), w.getCharCountIndicator(R.mode, x)), R.write(f);
2347
- });
2348
- const P = t.getSymbolTotalCodewords(x), v = a.getTotalCodewordsCount(x, $), O = (P - v) * 8;
2349
- for (f.getLengthInBits() + 4 <= O && f.put(0, 4); f.getLengthInBits() % 8 !== 0; )
2350
- f.putBit(0);
2351
- const _ = (O - f.getLengthInBits()) / 8;
2352
- for (let R = 0; R < _; R++)
2353
- f.put(R % 2 ? 17 : 236, 8);
2354
- return C(f, x, $);
2355
- }
2356
- function C(x, $, A) {
2357
- const f = t.getSymbolTotalCodewords($), P = a.getTotalCodewordsCount($, A), v = f - P, O = a.getBlocksCount($, A), _ = f % O, R = O - _, ee = Math.floor(f / O), Le = Math.floor(v / O), lo = Le + 1, Dr = ee - Le, co = new l(Dr);
2358
- let wt = 0;
2359
- const Xe = new Array(O), Nr = new Array(O);
2360
- let vt = 0;
2361
- const uo = new Uint8Array(x.buffer);
2362
- for (let xe = 0; xe < O; xe++) {
2363
- const yt = xe < R ? Le : lo;
2364
- Xe[xe] = uo.slice(wt, wt + yt), Nr[xe] = co.encode(Xe[xe]), wt += yt, vt = Math.max(vt, yt);
2365
- }
2366
- const bt = new Uint8Array(f);
2367
- let Lr = 0, G, Q;
2368
- for (G = 0; G < vt; G++)
2369
- for (Q = 0; Q < O; Q++)
2370
- G < Xe[Q].length && (bt[Lr++] = Xe[Q][G]);
2371
- for (G = 0; G < Dr; G++)
2372
- for (Q = 0; Q < O; Q++)
2373
- bt[Lr++] = Nr[Q][G];
2374
- return bt;
2375
- }
2376
- function W(x, $, A, f) {
2377
- let P;
2378
- if (Array.isArray(x))
2379
- P = d.fromArray(x);
2380
- else if (typeof x == "string") {
2381
- let ee = $;
2382
- if (!ee) {
2383
- const Le = d.rawSplit(x);
2384
- ee = c.getBestVersionForData(Le, A);
2385
- }
2386
- P = d.fromString(x, ee || 40);
2387
- } else
2388
- throw new Error("Invalid data");
2389
- const v = c.getBestVersionForData(P, A);
2390
- if (!v)
2391
- throw new Error("The amount of data is too big to be stored in a QR Code");
2392
- if (!$)
2393
- $ = v;
2394
- else if ($ < v)
2395
- throw new Error(
2396
- `
2397
- The chosen QR Code version cannot contain this amount of data.
2398
- Minimum version required to store current data is: ` + v + `.
2399
- `
2400
- );
2401
- const O = y($, A, P), _ = t.getSymbolSize($), R = new o(_);
2402
- return u(R, $), b(R), p(R, $), g(R, A, 0), $ >= 7 && D(R, $), E(R, O), isNaN(f) && (f = s.getBestMask(
2403
- R,
2404
- g.bind(null, R, A)
2405
- )), s.applyMask(f, R), g(R, A, f), {
2406
- modules: R,
2407
- version: $,
2408
- errorCorrectionLevel: A,
2409
- maskPattern: f,
2410
- segments: P
2411
- };
2412
- }
2413
- return Mt.create = function($, A) {
2414
- if (typeof $ > "u" || $ === "")
2415
- throw new Error("No input text");
2416
- let f = e.M, P, v;
2417
- return typeof A < "u" && (f = e.from(A.errorCorrectionLevel, e.M), P = c.from(A.version), v = s.from(A.maskPattern), A.toSJISFunc && t.setToSJISFunction(A.toSJISFunc)), W($, P, f, v);
2418
- }, Mt;
2419
- }
2420
- var Qt = {}, Jt = {}, En;
2421
- function to() {
2422
- return En || (En = 1, (function(t) {
2423
- function e(r) {
2424
- if (typeof r == "number" && (r = r.toString()), typeof r != "string")
2425
- throw new Error("Color should be defined as hex string");
2426
- let o = r.slice().replace("#", "").split("");
2427
- if (o.length < 3 || o.length === 5 || o.length > 8)
2428
- throw new Error("Invalid hex color: " + r);
2429
- (o.length === 3 || o.length === 4) && (o = Array.prototype.concat.apply([], o.map(function(i) {
2430
- return [i, i];
2431
- }))), o.length === 6 && o.push("F", "F");
2432
- const n = parseInt(o.join(""), 16);
2433
- return {
2434
- r: n >> 24 & 255,
2435
- g: n >> 16 & 255,
2436
- b: n >> 8 & 255,
2437
- a: n & 255,
2438
- hex: "#" + o.slice(0, 6).join("")
2439
- };
2440
- }
2441
- t.getOptions = function(o) {
2442
- o || (o = {}), o.color || (o.color = {});
2443
- const n = typeof o.margin > "u" || o.margin === null || o.margin < 0 ? 4 : o.margin, i = o.width && o.width >= 21 ? o.width : void 0, s = o.scale || 4;
2444
- return {
2445
- width: i,
2446
- scale: i ? 4 : s,
2447
- margin: n,
2448
- color: {
2449
- dark: e(o.color.dark || "#000000ff"),
2450
- light: e(o.color.light || "#ffffffff")
2451
- },
2452
- type: o.type,
2453
- rendererOpts: o.rendererOpts || {}
2454
- };
2455
- }, t.getScale = function(o, n) {
2456
- return n.width && n.width >= o + n.margin * 2 ? n.width / (o + n.margin * 2) : n.scale;
2457
- }, t.getImageWidth = function(o, n) {
2458
- const i = t.getScale(o, n);
2459
- return Math.floor((o + n.margin * 2) * i);
2460
- }, t.qrToImageData = function(o, n, i) {
2461
- const s = n.modules.size, a = n.modules.data, l = t.getScale(s, i), c = Math.floor((s + i.margin * 2) * l), h = i.margin * l, w = [i.color.light, i.color.dark];
2462
- for (let d = 0; d < c; d++)
2463
- for (let u = 0; u < c; u++) {
2464
- let b = (d * c + u) * 4, p = i.color.light;
2465
- if (d >= h && u >= h && d < c - h && u < c - h) {
2466
- const D = Math.floor((d - h) / l), g = Math.floor((u - h) / l);
2467
- p = w[a[D * s + g] ? 1 : 0];
2468
- }
2469
- o[b++] = p.r, o[b++] = p.g, o[b++] = p.b, o[b] = p.a;
2470
- }
2471
- };
2472
- })(Jt)), Jt;
2473
- }
2474
- var An;
2475
- function Wi() {
2476
- return An || (An = 1, (function(t) {
2477
- const e = to();
2478
- function r(n, i, s) {
2479
- n.clearRect(0, 0, i.width, i.height), i.style || (i.style = {}), i.height = s, i.width = s, i.style.height = s + "px", i.style.width = s + "px";
2480
- }
2481
- function o() {
2482
- try {
2483
- return document.createElement("canvas");
2484
- } catch {
2485
- throw new Error("You need to specify a canvas element");
2486
- }
2487
- }
2488
- t.render = function(i, s, a) {
2489
- let l = a, c = s;
2490
- typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), s || (c = o()), l = e.getOptions(l);
2491
- const h = e.getImageWidth(i.modules.size, l), w = c.getContext("2d"), d = w.createImageData(h, h);
2492
- return e.qrToImageData(d.data, i, l), r(w, c, h), w.putImageData(d, 0, 0), c;
2493
- }, t.renderToDataURL = function(i, s, a) {
2494
- let l = a;
2495
- typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), l || (l = {});
2496
- const c = t.render(i, s, l), h = l.type || "image/png", w = l.rendererOpts || {};
2497
- return c.toDataURL(h, w.quality);
2498
- };
2499
- })(Qt)), Qt;
2500
- }
2501
- var Xt = {}, On;
2502
- function ki() {
2503
- if (On) return Xt;
2504
- On = 1;
2505
- const t = to();
2506
- function e(n, i) {
2507
- const s = n.a / 255, a = i + '="' + n.hex + '"';
2508
- return s < 1 ? a + " " + i + '-opacity="' + s.toFixed(2).slice(1) + '"' : a;
2509
- }
2510
- function r(n, i, s) {
2511
- let a = n + i;
2512
- return typeof s < "u" && (a += " " + s), a;
2513
- }
2514
- function o(n, i, s) {
2515
- let a = "", l = 0, c = !1, h = 0;
2516
- for (let w = 0; w < n.length; w++) {
2517
- const d = Math.floor(w % i), u = Math.floor(w / i);
2518
- !d && !c && (c = !0), n[w] ? (h++, w > 0 && d > 0 && n[w - 1] || (a += c ? r("M", d + s, 0.5 + u + s) : r("m", l, 0), l = 0, c = !1), d + 1 < i && n[w + 1] || (a += r("h", h), h = 0)) : l++;
2519
- }
2520
- return a;
2521
- }
2522
- return Xt.render = function(i, s, a) {
2523
- const l = t.getOptions(s), c = i.modules.size, h = i.modules.data, w = c + l.margin * 2, d = l.color.light.a ? "<path " + e(l.color.light, "fill") + ' d="M0 0h' + w + "v" + w + 'H0z"/>' : "", u = "<path " + e(l.color.dark, "stroke") + ' d="' + o(h, c, l.margin) + '"/>', b = 'viewBox="0 0 ' + w + " " + w + '"', D = '<svg xmlns="http://www.w3.org/2000/svg" ' + (l.width ? 'width="' + l.width + '" height="' + l.width + '" ' : "") + b + ' shape-rendering="crispEdges">' + d + u + `</svg>
2524
- `;
2525
- return typeof a == "function" && a(null, D), D;
2526
- }, Xt;
2527
- }
2528
- var In;
2529
- function Ui() {
2530
- if (In) return Ce;
2531
- In = 1;
2532
- const t = yi(), e = Bi(), r = Wi(), o = ki();
2533
- function n(i, s, a, l, c) {
2534
- const h = [].slice.call(arguments, 1), w = h.length, d = typeof h[w - 1] == "function";
2535
- if (!d && !t())
2536
- throw new Error("Callback required as last argument");
2537
- if (d) {
2538
- if (w < 2)
2539
- throw new Error("Too few arguments provided");
2540
- w === 2 ? (c = a, a = s, s = l = void 0) : w === 3 && (s.getContext && typeof c > "u" ? (c = l, l = void 0) : (c = l, l = a, a = s, s = void 0));
2541
- } else {
2542
- if (w < 1)
2543
- throw new Error("Too few arguments provided");
2544
- return w === 1 ? (a = s, s = l = void 0) : w === 2 && !s.getContext && (l = a, a = s, s = void 0), new Promise(function(u, b) {
2545
- try {
2546
- const p = e.create(a, l);
2547
- u(i(p, s, l));
2548
- } catch (p) {
2549
- b(p);
2550
- }
2551
- });
2552
- }
2553
- try {
2554
- const u = e.create(a, l);
2555
- c(null, i(u, s, l));
2556
- } catch (u) {
2557
- c(u);
2558
- }
2559
- }
2560
- return Ce.create = e.create, Ce.toCanvas = n.bind(null, r.render), Ce.toDataURL = n.bind(null, r.renderToDataURL), Ce.toString = n.bind(null, function(i, s, a) {
2561
- return o.render(i, a);
2562
- }), Ce;
2563
- }
2564
- var ji = Ui();
2565
- const Hi = /* @__PURE__ */ mo(ji);
2566
- var Fi = Object.defineProperty, Pn = Object.getOwnPropertySymbols, zi = Object.prototype.hasOwnProperty, qi = Object.prototype.propertyIsEnumerable, Tn = (t, e, r) => e in t ? Fi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, er = (t, e) => {
2567
- for (var r in e || (e = {}))
2568
- zi.call(e, r) && Tn(t, r, e[r]);
2569
- if (Pn)
2570
- for (var r of Pn(e))
2571
- qi.call(e, r) && Tn(t, r, e[r]);
2572
- return t;
2573
- };
2574
- function Vi() {
2575
- var t;
2576
- const e = (t = Oe.state.themeMode) != null ? t : "dark", o = {
2577
- light: {
2578
- foreground: { 1: "rgb(20,20,20)", 2: "rgb(121,134,134)", 3: "rgb(158,169,169)" },
2579
- background: { 1: "rgb(255,255,255)", 2: "rgb(241,243,243)", 3: "rgb(228,231,231)" },
2580
- overlay: "rgba(0,0,0,0.1)"
2581
- },
2582
- dark: {
2583
- foreground: { 1: "rgb(228,231,231)", 2: "rgb(148,158,158)", 3: "rgb(110,119,119)" },
2584
- background: { 1: "rgb(20,20,20)", 2: "rgb(39,42,42)", 3: "rgb(59,64,64)" },
2585
- overlay: "rgba(255,255,255,0.1)"
2586
- }
2587
- }[e];
2588
- return {
2589
- "--wcm-color-fg-1": o.foreground[1],
2590
- "--wcm-color-fg-2": o.foreground[2],
2591
- "--wcm-color-fg-3": o.foreground[3],
2592
- "--wcm-color-bg-1": o.background[1],
2593
- "--wcm-color-bg-2": o.background[2],
2594
- "--wcm-color-bg-3": o.background[3],
2595
- "--wcm-color-overlay": o.overlay
2596
- };
2597
- }
2598
- function Rn() {
2599
- return {
2600
- "--wcm-accent-color": "#3396FF",
2601
- "--wcm-accent-fill-color": "#FFFFFF",
2602
- "--wcm-z-index": "89",
2603
- "--wcm-background-color": "#3396FF",
2604
- "--wcm-background-border-radius": "8px",
2605
- "--wcm-container-border-radius": "30px",
2606
- "--wcm-wallet-icon-border-radius": "15px",
2607
- "--wcm-wallet-icon-large-border-radius": "30px",
2608
- "--wcm-wallet-icon-small-border-radius": "7px",
2609
- "--wcm-input-border-radius": "28px",
2610
- "--wcm-button-border-radius": "10px",
2611
- "--wcm-notification-border-radius": "36px",
2612
- "--wcm-secondary-button-border-radius": "28px",
2613
- "--wcm-icon-button-border-radius": "50%",
2614
- "--wcm-button-hover-highlight-border-radius": "10px",
2615
- "--wcm-text-big-bold-size": "20px",
2616
- "--wcm-text-big-bold-weight": "600",
2617
- "--wcm-text-big-bold-line-height": "24px",
2618
- "--wcm-text-big-bold-letter-spacing": "-0.03em",
2619
- "--wcm-text-big-bold-text-transform": "none",
2620
- "--wcm-text-xsmall-bold-size": "10px",
2621
- "--wcm-text-xsmall-bold-weight": "700",
2622
- "--wcm-text-xsmall-bold-line-height": "12px",
2623
- "--wcm-text-xsmall-bold-letter-spacing": "0.02em",
2624
- "--wcm-text-xsmall-bold-text-transform": "uppercase",
2625
- "--wcm-text-xsmall-regular-size": "12px",
2626
- "--wcm-text-xsmall-regular-weight": "600",
2627
- "--wcm-text-xsmall-regular-line-height": "14px",
2628
- "--wcm-text-xsmall-regular-letter-spacing": "-0.03em",
2629
- "--wcm-text-xsmall-regular-text-transform": "none",
2630
- "--wcm-text-small-thin-size": "14px",
2631
- "--wcm-text-small-thin-weight": "500",
2632
- "--wcm-text-small-thin-line-height": "16px",
2633
- "--wcm-text-small-thin-letter-spacing": "-0.03em",
2634
- "--wcm-text-small-thin-text-transform": "none",
2635
- "--wcm-text-small-regular-size": "14px",
2636
- "--wcm-text-small-regular-weight": "600",
2637
- "--wcm-text-small-regular-line-height": "16px",
2638
- "--wcm-text-small-regular-letter-spacing": "-0.03em",
2639
- "--wcm-text-small-regular-text-transform": "none",
2640
- "--wcm-text-medium-regular-size": "16px",
2641
- "--wcm-text-medium-regular-weight": "600",
2642
- "--wcm-text-medium-regular-line-height": "20px",
2643
- "--wcm-text-medium-regular-letter-spacing": "-0.03em",
2644
- "--wcm-text-medium-regular-text-transform": "none",
2645
- "--wcm-font-family": "-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif",
2646
- "--wcm-font-feature-settings": "'tnum' on, 'lnum' on, 'case' on",
2647
- "--wcm-success-color": "rgb(38,181,98)",
2648
- "--wcm-error-color": "rgb(242, 90, 103)",
2649
- "--wcm-overlay-background-color": "rgba(0, 0, 0, 0.3)",
2650
- "--wcm-overlay-backdrop-filter": "none"
2651
- };
2652
- }
2653
- const N = {
2654
- getPreset(t) {
2655
- return Rn()[t];
2656
- },
2657
- setTheme() {
2658
- const t = document.querySelector(":root"), { themeVariables: e } = Oe.state;
2659
- if (t) {
2660
- const r = er(er(er({}, Vi()), Rn()), e);
2661
- Object.entries(r).forEach(([o, n]) => t.style.setProperty(o, n));
2662
- }
2663
- },
2664
- globalCss: B`*,::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)}`
2665
- }, Zi = B`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}`;
2666
- var Ki = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Se = (t, e, r, o) => {
2667
- for (var n = o > 1 ? void 0 : o ? Yi(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2668
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
2669
- return o && n && Ki(e, r, n), n;
2670
- };
2671
- let se = class extends S {
2672
- constructor() {
2673
- super(...arguments), this.disabled = !1, this.iconLeft = void 0, this.iconRight = void 0, this.onClick = () => null, this.variant = "default";
2674
- }
2675
- // -- render ------------------------------------------------------- //
2676
- render() {
2677
- const t = {
2678
- "wcm-icon-left": this.iconLeft !== void 0,
2679
- "wcm-icon-right": this.iconRight !== void 0,
2680
- "wcm-ghost": this.variant === "ghost",
2681
- "wcm-outline": this.variant === "outline"
2682
- };
2683
- let e = "inverse";
2684
- return this.variant === "ghost" && (e = "secondary"), this.variant === "outline" && (e = "accent"), m`<button class="${X(t)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<wcm-text variant="small-regular" color="${e}"><slot></slot></wcm-text>${this.iconRight}</button>`;
2685
- }
2686
- };
2687
- se.styles = [N.globalCss, Zi];
2688
- Se([
2689
- M({ type: Boolean })
2690
- ], se.prototype, "disabled", 2);
2691
- Se([
2692
- M()
2693
- ], se.prototype, "iconLeft", 2);
2694
- Se([
2695
- M()
2696
- ], se.prototype, "iconRight", 2);
2697
- Se([
2698
- M()
2699
- ], se.prototype, "onClick", 2);
2700
- Se([
2701
- M()
2702
- ], se.prototype, "variant", 2);
2703
- se = Se([
2704
- L("wcm-button")
2705
- ], se);
2706
- const Gi = B`: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)}}`;
2707
- var Qi = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, Tr = (t, e, r, o) => {
2708
- for (var n = o > 1 ? void 0 : o ? Ji(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2709
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
2710
- return o && n && Qi(e, r, n), n;
2711
- };
2712
- let qe = class extends S {
2713
- constructor() {
2714
- super(...arguments), this.disabled = !1, this.variant = "primary";
2715
- }
2716
- // -- render ------------------------------------------------------- //
2717
- render() {
2718
- const t = {
2719
- "wcm-secondary": this.variant === "secondary"
2720
- };
2721
- return m`<button ?disabled="${this.disabled}" class="${X(t)}"><slot></slot></button>`;
2722
- }
2723
- };
2724
- qe.styles = [N.globalCss, Gi];
2725
- Tr([
2726
- M({ type: Boolean })
2727
- ], qe.prototype, "disabled", 2);
2728
- Tr([
2729
- M()
2730
- ], qe.prototype, "variant", 2);
2731
- qe = Tr([
2732
- L("wcm-button-big")
2733
- ], qe);
2734
- const Xi = B`: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}`;
2735
- var es = Object.getOwnPropertyDescriptor, ts = (t, e, r, o) => {
2736
- for (var n = o > 1 ? void 0 : o ? es(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2737
- (s = t[i]) && (n = s(n) || n);
2738
- return n;
2739
- };
2740
- let dr = class extends S {
2741
- // -- render ------------------------------------------------------- //
2742
- render() {
2743
- return m`<div><slot></slot></div>`;
2744
- }
2745
- };
2746
- dr.styles = [N.globalCss, Xi];
2747
- dr = ts([
2748
- L("wcm-info-footer")
2749
- ], dr);
2750
- const k = {
2751
- CROSS_ICON: U`<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>`,
2752
- WALLET_CONNECT_LOGO: U`<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>`,
2753
- WALLET_CONNECT_ICON: U`<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>`,
2754
- WALLET_CONNECT_ICON_COLORED: U`<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>`,
2755
- BACK_ICON: U`<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>`,
2756
- COPY_ICON: U`<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>`,
2757
- RETRY_ICON: U`<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>`,
2758
- DESKTOP_ICON: U`<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>`,
2759
- MOBILE_ICON: U`<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>`,
2760
- ARROW_DOWN_ICON: U`<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>`,
2761
- ARROW_UP_RIGHT_ICON: U`<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>`,
2762
- ARROW_RIGHT_ICON: U`<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>`,
2763
- QRCODE_ICON: U`<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>`,
2764
- SCAN_ICON: U`<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>`,
2765
- CHECKMARK_ICON: U`<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>`,
2766
- SEARCH_ICON: U`<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>`,
2767
- WALLET_PLACEHOLDER: U`<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>`,
2768
- GLOBE_ICON: U`<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>`
2769
- }, rs = B`.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)}}`;
2770
- var ns = Object.getOwnPropertyDescriptor, os = (t, e, r, o) => {
2771
- for (var n = o > 1 ? void 0 : o ? ns(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2772
- (s = t[i]) && (n = s(n) || n);
2773
- return n;
2774
- };
2775
- let ur = class extends S {
2776
- // -- render ------------------------------------------------------- //
2777
- render() {
2778
- return m`<div class="wcm-toolbar-placeholder"></div><div class="wcm-toolbar">${k.WALLET_CONNECT_LOGO} <button @click="${rt.close}">${k.CROSS_ICON}</button></div>`;
2779
- }
2780
- };
2781
- ur.styles = [N.globalCss, rs];
2782
- ur = os([
2783
- L("wcm-modal-backcard")
2784
- ], ur);
2785
- const is = B`main{padding:20px;padding-top:0;width:100%}`;
2786
- var ss = Object.getOwnPropertyDescriptor, as = (t, e, r, o) => {
2787
- for (var n = o > 1 ? void 0 : o ? ss(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2788
- (s = t[i]) && (n = s(n) || n);
2789
- return n;
2790
- };
2791
- let hr = class extends S {
2792
- // -- render ------------------------------------------------------- //
2793
- render() {
2794
- return m`<main><slot></slot></main>`;
2795
- }
2796
- };
2797
- hr.styles = [N.globalCss, is];
2798
- hr = as([
2799
- L("wcm-modal-content")
2800
- ], hr);
2801
- const ls = B`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;
2802
- var cs = Object.getOwnPropertyDescriptor, ds = (t, e, r, o) => {
2803
- for (var n = o > 1 ? void 0 : o ? cs(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2804
- (s = t[i]) && (n = s(n) || n);
2805
- return n;
2806
- };
2807
- let mr = class extends S {
2808
- // -- render ------------------------------------------------------- //
2809
- render() {
2810
- return m`<footer><slot></slot></footer>`;
2811
- }
2812
- };
2813
- mr.styles = [N.globalCss, ls];
2814
- mr = ds([
2815
- L("wcm-modal-footer")
2816
- ], mr);
2817
- const us = B`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)}`;
2818
- var hs = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, Ge = (t, e, r, o) => {
2819
- for (var n = o > 1 ? void 0 : o ? ms(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2820
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
2821
- return o && n && hs(e, r, n), n;
2822
- };
2823
- let pe = class extends S {
2824
- constructor() {
2825
- super(...arguments), this.title = "", this.onAction = void 0, this.actionIcon = void 0, this.border = !1;
2826
- }
2827
- // -- private ------------------------------------------------------ //
2828
- backBtnTemplate() {
2829
- return m`<button class="wcm-back-btn" @click="${j.goBack}">${k.BACK_ICON}</button>`;
2830
- }
2831
- actionBtnTemplate() {
2832
- return m`<button class="wcm-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`;
2833
- }
2834
- // -- render ------------------------------------------------------- //
2835
- render() {
2836
- const t = {
2837
- "wcm-border": this.border
2838
- }, e = j.state.history.length > 1, r = this.title ? m`<wcm-text variant="big-bold">${this.title}</wcm-text>` : m`<slot></slot>`;
2839
- return m`<header class="${X(t)}">${e ? this.backBtnTemplate() : null} ${r} ${this.onAction ? this.actionBtnTemplate() : null}</header>`;
2840
- }
2841
- };
2842
- pe.styles = [N.globalCss, us];
2843
- Ge([
2844
- M()
2845
- ], pe.prototype, "title", 2);
2846
- Ge([
2847
- M()
2848
- ], pe.prototype, "onAction", 2);
2849
- Ge([
2850
- M()
2851
- ], pe.prototype, "actionIcon", 2);
2852
- Ge([
2853
- M({ type: Boolean })
2854
- ], pe.prototype, "border", 2);
2855
- pe = Ge([
2856
- L("wcm-modal-header")
2857
- ], pe);
2858
- const T = {
2859
- MOBILE_BREAKPOINT: 600,
2860
- WCM_RECENT_WALLET_DATA: "WCM_RECENT_WALLET_DATA",
2861
- EXPLORER_WALLET_URL: "https://explorer.walletconnect.com/?type=wallet",
2862
- getShadowRootElement(t, e) {
2863
- const r = t.renderRoot.querySelector(e);
2864
- if (!r)
2865
- throw new Error(`${e} not found`);
2866
- return r;
2867
- },
2868
- getWalletIcon({ id: t, image_id: e }) {
2869
- const { walletImages: r } = me.state;
2870
- return r != null && r[t] ? r[t] : e ? z.getWalletImageUrl(e) : "";
2871
- },
2872
- getWalletName(t, e = !1) {
2873
- return e && t.length > 8 ? `${t.substring(0, 8)}..` : t;
2874
- },
2875
- isMobileAnimation() {
2876
- return window.innerWidth <= T.MOBILE_BREAKPOINT;
2877
- },
2878
- async preloadImage(t) {
2879
- const e = new Promise((r, o) => {
2880
- const n = new Image();
2881
- n.onload = r, n.onerror = o, n.crossOrigin = "anonymous", n.src = t;
2882
- });
2883
- return Promise.race([e, I.wait(3e3)]);
2884
- },
2885
- getErrorMessage(t) {
2886
- return t instanceof Error ? t.message : "Unknown Error";
2887
- },
2888
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2889
- debounce(t, e = 500) {
2890
- let r;
2891
- return (...o) => {
2892
- function n() {
2893
- t(...o);
2894
- }
2895
- r && clearTimeout(r), r = setTimeout(n, e);
2896
- };
2897
- },
2898
- handleMobileLinking(t, e = "_self") {
2899
- const { walletConnectUri: r } = K.state, { mobile: o, name: n } = t, i = o == null ? void 0 : o.native, s = o == null ? void 0 : o.universal;
2900
- T.setRecentWallet(t);
2901
- function a(l) {
2902
- if (i) {
2903
- const c = I.formatNativeUrl(i, l, n);
2904
- I.openHref(c, e);
2905
- } else if (s) {
2906
- const c = I.formatUniversalUrl(s, l, n);
2907
- I.openHref(c, e);
2908
- }
2909
- }
2910
- r && a(r);
2911
- },
2912
- handleAndroidLinking() {
2913
- const { walletConnectUri: t } = K.state;
2914
- t && (I.setWalletConnectAndroidDeepLink(t), I.openHref(t, I.isTelegram() ? "_blank" : "_self"));
2915
- },
2916
- async handleUriCopy() {
2917
- const { walletConnectUri: t } = K.state;
2918
- if (t)
2919
- try {
2920
- await navigator.clipboard.writeText(t), ne.openToast("Link copied", "success");
2921
- } catch {
2922
- ne.openToast("Failed to copy", "error");
2923
- }
2924
- },
2925
- getCustomImageUrls() {
2926
- const { walletImages: t } = me.state, e = Object.values(t ?? {});
2927
- return Object.values(e);
2928
- },
2929
- truncate(t, e = 8) {
2930
- return t.length <= e ? t : `${t.substring(0, 4)}...${t.substring(t.length - 4)}`;
2931
- },
2932
- setRecentWallet(t) {
2933
- try {
2934
- localStorage.setItem(T.WCM_RECENT_WALLET_DATA, JSON.stringify(t));
2935
- } catch {
2936
- console.info("Unable to set recent wallet");
2937
- }
2938
- },
2939
- getRecentWallet() {
2940
- try {
2941
- const t = localStorage.getItem(T.WCM_RECENT_WALLET_DATA);
2942
- return t ? JSON.parse(t) : void 0;
2943
- } catch {
2944
- console.info("Unable to get recent wallet");
2945
- }
2946
- },
2947
- caseSafeIncludes(t, e) {
2948
- return t.toUpperCase().includes(e.toUpperCase());
2949
- },
2950
- openWalletExplorerUrl() {
2951
- I.openHref(T.EXPLORER_WALLET_URL, "_blank");
2952
- },
2953
- getCachedRouterWalletPlatforms() {
2954
- const { desktop: t, mobile: e } = I.getWalletRouterData(), r = !!(t != null && t.native), o = !!(t != null && t.universal), n = !!(e != null && e.native) || !!(e != null && e.universal);
2955
- return { isDesktop: r, isMobile: n, isWeb: o };
2956
- },
2957
- goToConnectingView(t) {
2958
- j.setData({ Wallet: t });
2959
- const e = I.isMobile(), { isDesktop: r, isWeb: o, isMobile: n } = T.getCachedRouterWalletPlatforms();
2960
- e ? n ? (j.push("MobileConnecting"), !I.isAndroid() && I.isTelegram() && this.handleMobileLinking(t, "_blank")) : o ? j.push("WebConnecting") : j.push("InstallWallet") : r ? j.push("DesktopConnecting") : o ? j.push("WebConnecting") : n ? j.push("MobileQrcodeConnecting") : j.push("InstallWallet");
2961
- }
2962
- }, fs = B`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;
2963
- var gs = Object.defineProperty, ps = Object.getOwnPropertyDescriptor, Rr = (t, e, r, o) => {
2964
- for (var n = o > 1 ? void 0 : o ? ps(e, r) : e, i = t.length - 1, s; i >= 0; i--)
2965
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
2966
- return o && n && gs(e, r, n), n;
2967
- };
2968
- let Ve = class extends S {
2969
- // -- lifecycle ---------------------------------------------------- //
2970
- constructor() {
2971
- super(), this.view = j.state.view, this.prevView = j.state.view, this.unsubscribe = void 0, this.oldHeight = "0px", this.resizeObserver = void 0, this.unsubscribe = j.subscribe((t) => {
2972
- this.view !== t.view && this.onChangeRoute();
2973
- });
2974
- }
2975
- firstUpdated() {
2976
- this.resizeObserver = new ResizeObserver(([t]) => {
2977
- const e = `${t.contentRect.height}px`;
2978
- this.oldHeight !== "0px" && he(this.routerEl, { height: [this.oldHeight, e] }, { duration: 0.2 }), this.oldHeight = e;
2979
- }), this.resizeObserver.observe(this.contentEl);
2980
- }
2981
- disconnectedCallback() {
2982
- var t, e;
2983
- (t = this.unsubscribe) == null || t.call(this), (e = this.resizeObserver) == null || e.disconnect();
2984
- }
2985
- get routerEl() {
2986
- return T.getShadowRootElement(this, ".wcm-router");
2987
- }
2988
- get contentEl() {
2989
- return T.getShadowRootElement(this, ".wcm-content");
2990
- }
2991
- viewTemplate() {
2992
- switch (this.view) {
2993
- case "ConnectWallet":
2994
- return m`<wcm-connect-wallet-view></wcm-connect-wallet-view>`;
2995
- case "DesktopConnecting":
2996
- return m`<wcm-desktop-connecting-view></wcm-desktop-connecting-view>`;
2997
- case "MobileConnecting":
2998
- return m`<wcm-mobile-connecting-view></wcm-mobile-connecting-view>`;
2999
- case "WebConnecting":
3000
- return m`<wcm-web-connecting-view></wcm-web-connecting-view>`;
3001
- case "MobileQrcodeConnecting":
3002
- return m`<wcm-mobile-qr-connecting-view></wcm-mobile-qr-connecting-view>`;
3003
- case "WalletExplorer":
3004
- return m`<wcm-wallet-explorer-view></wcm-wallet-explorer-view>`;
3005
- case "Qrcode":
3006
- return m`<wcm-qrcode-view></wcm-qrcode-view>`;
3007
- case "InstallWallet":
3008
- return m`<wcm-install-wallet-view></wcm-install-wallet-view>`;
3009
- default:
3010
- return m`<div>Not Found</div>`;
3011
- }
3012
- }
3013
- async onChangeRoute() {
3014
- await he(
3015
- this.routerEl,
3016
- { opacity: [1, 0], scale: [1, 1.02] },
3017
- { duration: 0.15, delay: 0.1 }
3018
- ).finished, this.view = j.state.view, he(this.routerEl, { opacity: [0, 1], scale: [0.99, 1] }, { duration: 0.37, delay: 0.05 });
3019
- }
3020
- // -- render ------------------------------------------------------- //
3021
- render() {
3022
- return m`<div class="wcm-router"><div class="wcm-content">${this.viewTemplate()}</div></div>`;
3023
- }
3024
- };
3025
- Ve.styles = [N.globalCss, fs];
3026
- Rr([
3027
- q()
3028
- ], Ve.prototype, "view", 2);
3029
- Rr([
3030
- q()
3031
- ], Ve.prototype, "prevView", 2);
3032
- Ve = Rr([
3033
- L("wcm-modal-router")
3034
- ], Ve);
3035
- const ws = B`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)}`;
3036
- var vs = Object.defineProperty, bs = Object.getOwnPropertyDescriptor, ro = (t, e, r, o) => {
3037
- for (var n = o > 1 ? void 0 : o ? bs(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3038
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3039
- return o && n && vs(e, r, n), n;
3040
- };
3041
- let ct = class extends S {
3042
- constructor() {
3043
- super(), this.open = !1, this.unsubscribe = void 0, this.timeout = void 0, this.unsubscribe = ne.subscribe((t) => {
3044
- t.open ? (this.open = !0, this.timeout = setTimeout(() => ne.closeToast(), 2200)) : (this.open = !1, clearTimeout(this.timeout));
3045
- });
3046
- }
3047
- disconnectedCallback() {
3048
- var t;
3049
- (t = this.unsubscribe) == null || t.call(this), clearTimeout(this.timeout), ne.closeToast();
3050
- }
3051
- // -- render ------------------------------------------------------- //
3052
- render() {
3053
- const { message: t, variant: e } = ne.state, r = {
3054
- "wcm-success": e === "success",
3055
- "wcm-error": e === "error"
3056
- };
3057
- return this.open ? m`<div class="${X(r)}">${e === "success" ? k.CHECKMARK_ICON : null} ${e === "error" ? k.CROSS_ICON : null}<wcm-text variant="small-regular">${t}</wcm-text></div>` : null;
3058
- }
3059
- };
3060
- ct.styles = [N.globalCss, ws];
3061
- ro([
3062
- q()
3063
- ], ct.prototype, "open", 2);
3064
- ct = ro([
3065
- L("wcm-modal-toast")
3066
- ], ct);
3067
- const ys = 0.1, Mn = 2.5, J = 7;
3068
- function tr(t, e, r) {
3069
- return t === e ? !1 : (t - e < 0 ? e - t : t - e) <= r + ys;
3070
- }
3071
- function xs(t, e) {
3072
- const r = Array.prototype.slice.call(
3073
- Hi.create(t, { errorCorrectionLevel: e }).modules.data,
3074
- 0
3075
- ), o = Math.sqrt(r.length);
3076
- return r.reduce(
3077
- (n, i, s) => (s % o === 0 ? n.push([i]) : n[n.length - 1].push(i)) && n,
3078
- []
3079
- );
3080
- }
3081
- const Cs = {
3082
- generate(t, e, r) {
3083
- const o = "#141414", n = "#ffffff", i = [], s = xs(t, "Q"), a = e / s.length, l = [
3084
- { x: 0, y: 0 },
3085
- { x: 1, y: 0 },
3086
- { x: 0, y: 1 }
3087
- ];
3088
- l.forEach(({ x: b, y: p }) => {
3089
- const D = (s.length - J) * a * b, g = (s.length - J) * a * p, E = 0.45;
3090
- for (let y = 0; y < l.length; y += 1) {
3091
- const C = a * (J - y * 2);
3092
- i.push(
3093
- U`<rect fill="${y % 2 === 0 ? o : n}" height="${C}" rx="${C * E}" ry="${C * E}" width="${C}" x="${D + a * y}" y="${g + a * y}">`
3094
- );
3095
- }
3096
- });
3097
- const c = Math.floor((r + 25) / a), h = s.length / 2 - c / 2, w = s.length / 2 + c / 2 - 1, d = [];
3098
- s.forEach((b, p) => {
3099
- b.forEach((D, g) => {
3100
- if (s[p][g] && !(p < J && g < J || p > s.length - (J + 1) && g < J || p < J && g > s.length - (J + 1)) && !(p > h && p < w && g > h && g < w)) {
3101
- const E = p * a + a / 2, y = g * a + a / 2;
3102
- d.push([E, y]);
3103
- }
3104
- });
3105
- });
3106
- const u = {};
3107
- return d.forEach(([b, p]) => {
3108
- u[b] ? u[b].push(p) : u[b] = [p];
3109
- }), Object.entries(u).map(([b, p]) => {
3110
- const D = p.filter(
3111
- (g) => p.every((E) => !tr(g, E, a))
3112
- );
3113
- return [Number(b), D];
3114
- }).forEach(([b, p]) => {
3115
- p.forEach((D) => {
3116
- i.push(
3117
- U`<circle cx="${b}" cy="${D}" fill="${o}" r="${a / Mn}">`
3118
- );
3119
- });
3120
- }), Object.entries(u).filter(([b, p]) => p.length > 1).map(([b, p]) => {
3121
- const D = p.filter((g) => p.some((E) => tr(g, E, a)));
3122
- return [Number(b), D];
3123
- }).map(([b, p]) => {
3124
- p.sort((g, E) => g < E ? -1 : 1);
3125
- const D = [];
3126
- for (const g of p) {
3127
- const E = D.find(
3128
- (y) => y.some((C) => tr(g, C, a))
3129
- );
3130
- E ? E.push(g) : D.push([g]);
3131
- }
3132
- return [b, D.map((g) => [g[0], g[g.length - 1]])];
3133
- }).forEach(([b, p]) => {
3134
- p.forEach(([D, g]) => {
3135
- i.push(
3136
- U`<line x1="${b}" x2="${b}" y1="${D}" y2="${g}" stroke="${o}" stroke-width="${a / (Mn / 2)}" stroke-linecap="round">`
3137
- );
3138
- });
3139
- }), i;
3140
- }
3141
- }, _s = B`@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)}`;
3142
- var $s = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, De = (t, e, r, o) => {
3143
- for (var n = o > 1 ? void 0 : o ? Es(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3144
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3145
- return o && n && $s(e, r, n), n;
3146
- };
3147
- let ae = class extends S {
3148
- constructor() {
3149
- super(...arguments), this.uri = "", this.size = 0, this.imageId = void 0, this.walletId = void 0, this.imageUrl = void 0;
3150
- }
3151
- // -- private ------------------------------------------------------ //
3152
- svgTemplate() {
3153
- const e = Oe.state.themeMode === "light" ? this.size : this.size - 36;
3154
- return U`<svg height="${e}" width="${e}">${Cs.generate(this.uri, e, e / 4)}</svg>`;
3155
- }
3156
- // -- render ------------------------------------------------------- //
3157
- render() {
3158
- const t = {
3159
- "wcm-dark": Oe.state.themeMode === "dark"
3160
- };
3161
- return m`<div style="${`width: ${this.size}px`}" class="${X(t)}">${this.walletId || this.imageUrl ? m`<wcm-wallet-image walletId="${F(this.walletId)}" imageId="${F(this.imageId)}" imageUrl="${F(this.imageUrl)}"></wcm-wallet-image>` : k.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`;
3162
- }
3163
- };
3164
- ae.styles = [N.globalCss, _s];
3165
- De([
3166
- M()
3167
- ], ae.prototype, "uri", 2);
3168
- De([
3169
- M({ type: Number })
3170
- ], ae.prototype, "size", 2);
3171
- De([
3172
- M()
3173
- ], ae.prototype, "imageId", 2);
3174
- De([
3175
- M()
3176
- ], ae.prototype, "walletId", 2);
3177
- De([
3178
- M()
3179
- ], ae.prototype, "imageUrl", 2);
3180
- ae = De([
3181
- L("wcm-qrcode")
3182
- ], ae);
3183
- const As = B`: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)}`;
3184
- var Os = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, no = (t, e, r, o) => {
3185
- for (var n = o > 1 ? void 0 : o ? Is(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3186
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3187
- return o && n && Os(e, r, n), n;
3188
- };
3189
- let dt = class extends S {
3190
- constructor() {
3191
- super(...arguments), this.onChange = () => null;
3192
- }
3193
- // -- render ------------------------------------------------------- //
3194
- render() {
3195
- return m`<input type="text" @input="${this.onChange}" placeholder="Search wallets"> ${k.SEARCH_ICON}`;
3196
- }
3197
- };
3198
- dt.styles = [N.globalCss, As];
3199
- no([
3200
- M()
3201
- ], dt.prototype, "onChange", 2);
3202
- dt = no([
3203
- L("wcm-search-input")
3204
- ], dt);
3205
- const Ps = B`@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)}`;
3206
- var Ts = Object.getOwnPropertyDescriptor, Rs = (t, e, r, o) => {
3207
- for (var n = o > 1 ? void 0 : o ? Ts(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3208
- (s = t[i]) && (n = s(n) || n);
3209
- return n;
3210
- };
3211
- let fr = class extends S {
3212
- // -- render ------------------------------------------------------- //
3213
- render() {
3214
- return m`<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>`;
3215
- }
3216
- };
3217
- fr.styles = [N.globalCss, Ps];
3218
- fr = Rs([
3219
- L("wcm-spinner")
3220
- ], fr);
3221
- const Ms = B`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)}`;
3222
- var Ss = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, Mr = (t, e, r, o) => {
3223
- for (var n = o > 1 ? void 0 : o ? Ds(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3224
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3225
- return o && n && Ss(e, r, n), n;
3226
- };
3227
- let Ze = class extends S {
3228
- constructor() {
3229
- super(...arguments), this.variant = "medium-regular", this.color = "primary";
3230
- }
3231
- // -- render ------------------------------------------------------- //
3232
- render() {
3233
- const t = {
3234
- "wcm-big-bold": this.variant === "big-bold",
3235
- "wcm-medium-regular": this.variant === "medium-regular",
3236
- "wcm-small-regular": this.variant === "small-regular",
3237
- "wcm-small-thin": this.variant === "small-thin",
3238
- "wcm-xsmall-regular": this.variant === "xsmall-regular",
3239
- "wcm-xsmall-bold": this.variant === "xsmall-bold",
3240
- "wcm-color-primary": this.color === "primary",
3241
- "wcm-color-secondary": this.color === "secondary",
3242
- "wcm-color-tertiary": this.color === "tertiary",
3243
- "wcm-color-inverse": this.color === "inverse",
3244
- "wcm-color-accnt": this.color === "accent",
3245
- "wcm-color-error": this.color === "error"
3246
- };
3247
- return m`<span><slot class="${X(t)}"></slot></span>`;
3248
- }
3249
- };
3250
- Ze.styles = [N.globalCss, Ms];
3251
- Mr([
3252
- M()
3253
- ], Ze.prototype, "variant", 2);
3254
- Mr([
3255
- M()
3256
- ], Ze.prototype, "color", 2);
3257
- Ze = Mr([
3258
- L("wcm-text")
3259
- ], Ze);
3260
- const Ns = B`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}`;
3261
- var Ls = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, ce = (t, e, r, o) => {
3262
- for (var n = o > 1 ? void 0 : o ? Bs(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3263
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3264
- return o && n && Ls(e, r, n), n;
3265
- };
3266
- let Y = class extends S {
3267
- constructor() {
3268
- super(...arguments), this.onClick = () => null, this.name = "", this.walletId = "", this.label = void 0, this.imageId = void 0, this.installed = !1, this.recent = !1;
3269
- }
3270
- // -- private ------------------------------------------------------ //
3271
- sublabelTemplate() {
3272
- return this.recent ? m`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">RECENT</wcm-text>` : this.installed ? m`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</wcm-text>` : null;
3273
- }
3274
- handleClick() {
3275
- fo.click({ name: "WALLET_BUTTON", walletId: this.walletId }), this.onClick();
3276
- }
3277
- // -- render ------------------------------------------------------- //
3278
- render() {
3279
- var t;
3280
- return m`<button @click="${this.handleClick.bind(this)}"><div><wcm-wallet-image walletId="${this.walletId}" imageId="${F(this.imageId)}"></wcm-wallet-image><wcm-text variant="xsmall-regular">${(t = this.label) != null ? t : T.getWalletName(this.name, !0)}</wcm-text>${this.sublabelTemplate()}</div></button>`;
3281
- }
3282
- };
3283
- Y.styles = [N.globalCss, Ns];
3284
- ce([
3285
- M()
3286
- ], Y.prototype, "onClick", 2);
3287
- ce([
3288
- M()
3289
- ], Y.prototype, "name", 2);
3290
- ce([
3291
- M()
3292
- ], Y.prototype, "walletId", 2);
3293
- ce([
3294
- M()
3295
- ], Y.prototype, "label", 2);
3296
- ce([
3297
- M()
3298
- ], Y.prototype, "imageId", 2);
3299
- ce([
3300
- M({ type: Boolean })
3301
- ], Y.prototype, "installed", 2);
3302
- ce([
3303
- M({ type: Boolean })
3304
- ], Y.prototype, "recent", 2);
3305
- Y = ce([
3306
- L("wcm-wallet-button")
3307
- ], Y);
3308
- const Ws = B`: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)}`;
3309
- var ks = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, gt = (t, e, r, o) => {
3310
- for (var n = o > 1 ? void 0 : o ? Us(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3311
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3312
- return o && n && ks(e, r, n), n;
3313
- };
3314
- let Re = class extends S {
3315
- constructor() {
3316
- super(...arguments), this.walletId = "", this.imageId = void 0, this.imageUrl = void 0;
3317
- }
3318
- // -- render ------------------------------------------------------- //
3319
- render() {
3320
- var t;
3321
- const e = (t = this.imageUrl) != null && t.length ? this.imageUrl : T.getWalletIcon({ id: this.walletId, image_id: this.imageId });
3322
- return m`${e.length ? m`<div><img crossorigin="anonymous" src="${e}" alt="${this.id}"></div>` : k.WALLET_PLACEHOLDER}`;
3323
- }
3324
- };
3325
- Re.styles = [N.globalCss, Ws];
3326
- gt([
3327
- M()
3328
- ], Re.prototype, "walletId", 2);
3329
- gt([
3330
- M()
3331
- ], Re.prototype, "imageId", 2);
3332
- gt([
3333
- M()
3334
- ], Re.prototype, "imageUrl", 2);
3335
- Re = gt([
3336
- L("wcm-wallet-image")
3337
- ], Re);
3338
- var js = Object.defineProperty, Hs = Object.getOwnPropertyDescriptor, oo = (t, e, r, o) => {
3339
- for (var n = o > 1 ? void 0 : o ? Hs(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3340
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3341
- return o && n && js(e, r, n), n;
3342
- };
3343
- let gr = class extends S {
3344
- // -- lifecycle ---------------------------------------------------- //
3345
- constructor() {
3346
- super(), this.preload = !0, this.preloadData();
3347
- }
3348
- // -- private ------------------------------------------------------ //
3349
- async loadImages(t) {
3350
- try {
3351
- t != null && t.length && await Promise.all(t.map(async (e) => T.preloadImage(e)));
3352
- } catch {
3353
- console.info("Unsuccessful attempt at preloading some images", t);
3354
- }
3355
- }
3356
- async preloadListings() {
3357
- if (me.state.enableExplorer) {
3358
- await z.getRecomendedWallets(), K.setIsDataLoaded(!0);
3359
- const { recomendedWallets: t } = z.state, e = t.map((r) => T.getWalletIcon(r));
3360
- await this.loadImages(e);
3361
- } else
3362
- K.setIsDataLoaded(!0);
3363
- }
3364
- async preloadCustomImages() {
3365
- const t = T.getCustomImageUrls();
3366
- await this.loadImages(t);
3367
- }
3368
- async preloadData() {
3369
- try {
3370
- this.preload && (this.preload = !1, await Promise.all([this.preloadListings(), this.preloadCustomImages()]));
3371
- } catch (t) {
3372
- console.error(t), ne.openToast("Failed preloading", "error");
3373
- }
3374
- }
3375
- };
3376
- oo([
3377
- q()
3378
- ], gr.prototype, "preload", 2);
3379
- gr = oo([
3380
- L("wcm-explorer-context")
3381
- ], gr);
3382
- var Fs = Object.getOwnPropertyDescriptor, zs = (t, e, r, o) => {
3383
- for (var n = o > 1 ? void 0 : o ? Fs(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3384
- (s = t[i]) && (n = s(n) || n);
3385
- return n;
3386
- };
3387
- let Sn = class extends S {
3388
- // -- lifecycle ---------------------------------------------------- //
3389
- constructor() {
3390
- super(), this.unsubscribeTheme = void 0, N.setTheme(), this.unsubscribeTheme = Oe.subscribe(N.setTheme);
3391
- }
3392
- disconnectedCallback() {
3393
- var t;
3394
- (t = this.unsubscribeTheme) == null || t.call(this);
3395
- }
3396
- };
3397
- Sn = zs([
3398
- L("wcm-theme-context")
3399
- ], Sn);
3400
- const qs = B`@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)}`;
3401
- var Vs = Object.getOwnPropertyDescriptor, Zs = (t, e, r, o) => {
3402
- for (var n = o > 1 ? void 0 : o ? Vs(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3403
- (s = t[i]) && (n = s(n) || n);
3404
- return n;
3405
- };
3406
- let pr = class extends S {
3407
- // -- private ------------------------------------------------------ //
3408
- onGoToQrcode() {
3409
- j.push("Qrcode");
3410
- }
3411
- // -- render ------------------------------------------------------- //
3412
- render() {
3413
- const { recomendedWallets: t } = z.state, e = [...t, ...t], r = I.RECOMMENDED_WALLET_AMOUNT * 2;
3414
- return m`<wcm-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${k.QRCODE_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-title">${k.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">WalletConnect</wcm-text></div><div class="wcm-slider"><div class="wcm-track">${[...Array(r)].map((o, n) => {
3415
- const i = e[n % e.length];
3416
- return i ? m`<wcm-wallet-image walletId="${i.id}" imageId="${i.image_id}"></wcm-wallet-image>` : k.WALLET_PLACEHOLDER;
3417
- })}</div><wcm-button-big @click="${T.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>`;
3418
- }
3419
- };
3420
- pr.styles = [N.globalCss, qs];
3421
- pr = Zs([
3422
- L("wcm-android-wallet-selection")
3423
- ], pr);
3424
- const Ks = B`@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}`;
3425
- var Ys = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, Ne = (t, e, r, o) => {
3426
- for (var n = o > 1 ? void 0 : o ? Gs(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3427
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3428
- return o && n && Ys(e, r, n), n;
3429
- };
3430
- let le = class extends S {
3431
- constructor() {
3432
- super(...arguments), this.walletId = void 0, this.imageId = void 0, this.isError = !1, this.isStale = !1, this.label = "";
3433
- }
3434
- // -- private ------------------------------------------------------ //
3435
- svgLoaderTemplate() {
3436
- var t, e;
3437
- const i = (e = (t = Oe.state.themeVariables) == null ? void 0 : t["--wcm-wallet-icon-large-border-radius"]) != null ? e : N.getPreset("--wcm-wallet-icon-large-border-radius");
3438
- let s = 0;
3439
- i.includes("%") ? s = 88 / 100 * parseInt(i, 10) : s = parseInt(i, 10), s *= 1.17;
3440
- const a = 317 - s * 1.57, l = 425 - s * 1.8;
3441
- return m`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="wcm-loader" x="2" y="2" width="106" height="106" rx="${s}"/><use xlink:href="#wcm-loader" stroke-dasharray="106 ${a}" stroke-dashoffset="${l}"></use></svg>`;
3442
- }
3443
- // -- render ------------------------------------------------------- //
3444
- render() {
3445
- const t = {
3446
- "wcm-error": this.isError,
3447
- "wcm-stale": this.isStale
3448
- };
3449
- return m`<div class="${X(t)}">${this.svgLoaderTemplate()}<wcm-wallet-image walletId="${F(this.walletId)}" imageId="${F(this.imageId)}"></wcm-wallet-image></div><wcm-text variant="medium-regular" color="${this.isError ? "error" : "primary"}">${this.isError ? "Connection declined" : this.label}</wcm-text>`;
3450
- }
3451
- };
3452
- le.styles = [N.globalCss, Ks];
3453
- Ne([
3454
- M()
3455
- ], le.prototype, "walletId", 2);
3456
- Ne([
3457
- M()
3458
- ], le.prototype, "imageId", 2);
3459
- Ne([
3460
- M({ type: Boolean })
3461
- ], le.prototype, "isError", 2);
3462
- Ne([
3463
- M({ type: Boolean })
3464
- ], le.prototype, "isStale", 2);
3465
- Ne([
3466
- M()
3467
- ], le.prototype, "label", 2);
3468
- le = Ne([
3469
- L("wcm-connector-waiting")
3470
- ], le);
3471
- const Ae = {
3472
- manualWallets() {
3473
- var t, e;
3474
- const { mobileWallets: r, desktopWallets: o } = me.state, n = (t = Ae.recentWallet()) == null ? void 0 : t.id, i = I.isMobile() ? r : o, s = i == null ? void 0 : i.filter((a) => n !== a.id);
3475
- return (e = I.isMobile() ? s == null ? void 0 : s.map(({ id: a, name: l, links: c }) => ({ id: a, name: l, mobile: c, links: c })) : s == null ? void 0 : s.map(({ id: a, name: l, links: c }) => ({ id: a, name: l, desktop: c, links: c }))) != null ? e : [];
3476
- },
3477
- recentWallet() {
3478
- return T.getRecentWallet();
3479
- },
3480
- recomendedWallets(t = !1) {
3481
- var e;
3482
- const r = t || (e = Ae.recentWallet()) == null ? void 0 : e.id, { recomendedWallets: o } = z.state;
3483
- return o.filter((i) => r !== i.id);
3484
- }
3485
- }, ie = {
3486
- onConnecting(t) {
3487
- T.goToConnectingView(t);
3488
- },
3489
- manualWalletsTemplate() {
3490
- return Ae.manualWallets().map(
3491
- (e) => m`<wcm-wallet-button walletId="${e.id}" name="${e.name}" .onClick="${() => this.onConnecting(e)}"></wcm-wallet-button>`
3492
- );
3493
- },
3494
- recomendedWalletsTemplate(t = !1) {
3495
- return Ae.recomendedWallets(t).map(
3496
- (r) => m`<wcm-wallet-button name="${r.name}" walletId="${r.id}" imageId="${r.image_id}" .onClick="${() => this.onConnecting(r)}"></wcm-wallet-button>`
3497
- );
3498
- },
3499
- recentWalletTemplate() {
3500
- const t = Ae.recentWallet();
3501
- if (t)
3502
- return m`<wcm-wallet-button name="${t.name}" walletId="${t.id}" imageId="${F(t.image_id)}" .recent="${!0}" .onClick="${() => this.onConnecting(t)}"></wcm-wallet-button>`;
3503
- }
3504
- }, Qs = B`.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)}`;
3505
- var Js = Object.getOwnPropertyDescriptor, Xs = (t, e, r, o) => {
3506
- for (var n = o > 1 ? void 0 : o ? Js(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3507
- (s = t[i]) && (n = s(n) || n);
3508
- return n;
3509
- };
3510
- let wr = class extends S {
3511
- // -- render ------------------------------------------------------- //
3512
- render() {
3513
- const { explorerExcludedWalletIds: t, enableExplorer: e } = me.state, r = t !== "ALL" && e, o = ie.manualWalletsTemplate(), n = ie.recomendedWalletsTemplate();
3514
- let s = [ie.recentWalletTemplate(), ...o, ...n];
3515
- s = s.filter(Boolean);
3516
- const a = s.length > 4 || r;
3517
- let l = [];
3518
- a ? l = s.slice(0, 3) : l = s;
3519
- const c = !!l.length;
3520
- return m`<wcm-modal-header .border="${!0}" title="Connect your wallet" .onAction="${T.handleUriCopy}" .actionIcon="${k.COPY_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-mobile-title"><div class="wcm-subtitle">${k.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">Mobile</wcm-text></div><div class="wcm-subtitle">${k.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 ? m`<wcm-modal-footer><div class="wcm-desktop-title">${k.DESKTOP_ICON}<wcm-text variant="small-regular" color="accent">Desktop</wcm-text></div><div class="wcm-grid">${l} ${a ? m`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-footer>` : null}`;
3521
- }
3522
- };
3523
- wr.styles = [N.globalCss, Qs];
3524
- wr = Xs([
3525
- L("wcm-desktop-wallet-selection")
3526
- ], wr);
3527
- const ea = B`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}}`;
3528
- var ta = Object.getOwnPropertyDescriptor, ra = (t, e, r, o) => {
3529
- for (var n = o > 1 ? void 0 : o ? ta(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3530
- (s = t[i]) && (n = s(n) || n);
3531
- return n;
3532
- };
3533
- let vr = class extends S {
3534
- // -- render ------------------------------------------------------- //
3535
- render() {
3536
- const { termsOfServiceUrl: t, privacyPolicyUrl: e } = me.state;
3537
- return t ?? e ? m`<div><wcm-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${t ? m`<a href="${t}" target="_blank" rel="noopener noreferrer">Terms of Service</a>` : null} ${t && e ? "and" : null} ${e ? m`<a href="${e}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>` : null}</wcm-text></div>` : null;
3538
- }
3539
- };
3540
- vr.styles = [N.globalCss, ea];
3541
- vr = ra([
3542
- L("wcm-legal-notice")
3543
- ], vr);
3544
- const na = B`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;
3545
- var oa = Object.getOwnPropertyDescriptor, ia = (t, e, r, o) => {
3546
- for (var n = o > 1 ? void 0 : o ? oa(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3547
- (s = t[i]) && (n = s(n) || n);
3548
- return n;
3549
- };
3550
- let br = class extends S {
3551
- // -- private ------------------------------------------------------ //
3552
- onQrcode() {
3553
- j.push("Qrcode");
3554
- }
3555
- // -- render ------------------------------------------------------- //
3556
- render() {
3557
- const { explorerExcludedWalletIds: t, enableExplorer: e } = me.state, r = t !== "ALL" && e, o = ie.manualWalletsTemplate(), n = ie.recomendedWalletsTemplate();
3558
- let s = [ie.recentWalletTemplate(), ...o, ...n];
3559
- s = s.filter(Boolean);
3560
- const a = s.length > 8 || r;
3561
- let l = [];
3562
- a ? l = s.slice(0, 7) : l = s;
3563
- const c = !!l.length;
3564
- return m`<wcm-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${k.QRCODE_ICON}"></wcm-modal-header>${c ? m`<wcm-modal-content><div>${l} ${a ? m`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-content>` : null}`;
3565
- }
3566
- };
3567
- br.styles = [N.globalCss, na];
3568
- br = ia([
3569
- L("wcm-mobile-wallet-selection")
3570
- ], br);
3571
- const sa = B`: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}}`;
3572
- var aa = Object.defineProperty, la = Object.getOwnPropertyDescriptor, Sr = (t, e, r, o) => {
3573
- for (var n = o > 1 ? void 0 : o ? la(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3574
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3575
- return o && n && aa(e, r, n), n;
3576
- };
3577
- let Ke = class extends S {
3578
- // -- lifecycle ---------------------------------------------------- //
3579
- constructor() {
3580
- super(), this.open = !1, this.active = !1, this.unsubscribeModal = void 0, this.abortController = void 0, this.unsubscribeModal = rt.subscribe((t) => {
3581
- t.open ? this.onOpenModalEvent() : this.onCloseModalEvent();
3582
- });
3583
- }
3584
- disconnectedCallback() {
3585
- var t;
3586
- (t = this.unsubscribeModal) == null || t.call(this);
3587
- }
3588
- get overlayEl() {
3589
- return T.getShadowRootElement(this, ".wcm-overlay");
3590
- }
3591
- get containerEl() {
3592
- return T.getShadowRootElement(this, ".wcm-container");
3593
- }
3594
- toggleBodyScroll(t) {
3595
- if (document.querySelector("body"))
3596
- if (t) {
3597
- const r = document.getElementById("wcm-styles");
3598
- r == null || r.remove();
3599
- } else
3600
- document.head.insertAdjacentHTML(
3601
- "beforeend",
3602
- '<style id="wcm-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>'
3603
- );
3604
- }
3605
- onCloseModal(t) {
3606
- t.target === t.currentTarget && rt.close();
3607
- }
3608
- onOpenModalEvent() {
3609
- this.toggleBodyScroll(!1), this.addKeyboardEvents(), this.open = !0, setTimeout(async () => {
3610
- const t = T.isMobileAnimation() ? { y: ["50vh", "0vh"] } : { scale: [0.98, 1] }, e = 0.1, r = 0.2;
3611
- await Promise.all([
3612
- he(this.overlayEl, { opacity: [0, 1] }, { delay: e, duration: r }).finished,
3613
- he(this.containerEl, t, { delay: e, duration: r }).finished
3614
- ]), this.active = !0;
3615
- }, 0);
3616
- }
3617
- async onCloseModalEvent() {
3618
- this.toggleBodyScroll(!0), this.removeKeyboardEvents();
3619
- const t = T.isMobileAnimation() ? { y: ["0vh", "50vh"] } : { scale: [1, 0.98] }, e = 0.2;
3620
- await Promise.all([
3621
- he(this.overlayEl, { opacity: [1, 0] }, { duration: e }).finished,
3622
- he(this.containerEl, t, { duration: e }).finished
3623
- ]), this.containerEl.removeAttribute("style"), this.active = !1, this.open = !1;
3624
- }
3625
- addKeyboardEvents() {
3626
- this.abortController = new AbortController(), window.addEventListener(
3627
- "keydown",
3628
- (t) => {
3629
- var e;
3630
- t.key === "Escape" ? rt.close() : t.key === "Tab" && ((e = t.target) != null && e.tagName.includes("wcm-") || this.containerEl.focus());
3631
- },
3632
- this.abortController
3633
- ), this.containerEl.focus();
3634
- }
3635
- removeKeyboardEvents() {
3636
- var t;
3637
- (t = this.abortController) == null || t.abort(), this.abortController = void 0;
3638
- }
3639
- // -- render ------------------------------------------------------- //
3640
- render() {
3641
- const t = {
3642
- "wcm-overlay": !0,
3643
- "wcm-active": this.active
3644
- };
3645
- return m`<wcm-explorer-context></wcm-explorer-context><wcm-theme-context></wcm-theme-context><div id="wcm-modal" class="${X(t)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="wcm-container" tabindex="0">${this.open ? m`<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>`;
3646
- }
3647
- };
3648
- Ke.styles = [N.globalCss, sa];
3649
- Sr([
3650
- q()
3651
- ], Ke.prototype, "open", 2);
3652
- Sr([
3653
- q()
3654
- ], Ke.prototype, "active", 2);
3655
- Ke = Sr([
3656
- L("wcm-modal")
3657
- ], Ke);
3658
- const ca = B`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;
3659
- var da = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, Qe = (t, e, r, o) => {
3660
- for (var n = o > 1 ? void 0 : o ? ua(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3661
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3662
- return o && n && da(e, r, n), n;
3663
- };
3664
- let we = class extends S {
3665
- constructor() {
3666
- super(...arguments), this.isMobile = !1, this.isDesktop = !1, this.isWeb = !1, this.isRetry = !1;
3667
- }
3668
- // -- private ------------------------------------------------------ //
3669
- onMobile() {
3670
- I.isMobile() ? j.replace("MobileConnecting") : j.replace("MobileQrcodeConnecting");
3671
- }
3672
- onDesktop() {
3673
- j.replace("DesktopConnecting");
3674
- }
3675
- onWeb() {
3676
- j.replace("WebConnecting");
3677
- }
3678
- // -- render ------------------------------------------------------- //
3679
- render() {
3680
- return m`<div>${this.isRetry ? m`<slot></slot>` : null} ${this.isMobile ? m`<wcm-button .onClick="${this.onMobile}" .iconLeft="${k.MOBILE_ICON}" variant="outline">Mobile</wcm-button>` : null} ${this.isDesktop ? m`<wcm-button .onClick="${this.onDesktop}" .iconLeft="${k.DESKTOP_ICON}" variant="outline">Desktop</wcm-button>` : null} ${this.isWeb ? m`<wcm-button .onClick="${this.onWeb}" .iconLeft="${k.GLOBE_ICON}" variant="outline">Web</wcm-button>` : null}</div>`;
3681
- }
3682
- };
3683
- we.styles = [N.globalCss, ca];
3684
- Qe([
3685
- M({ type: Boolean })
3686
- ], we.prototype, "isMobile", 2);
3687
- Qe([
3688
- M({ type: Boolean })
3689
- ], we.prototype, "isDesktop", 2);
3690
- Qe([
3691
- M({ type: Boolean })
3692
- ], we.prototype, "isWeb", 2);
3693
- Qe([
3694
- M({ type: Boolean })
3695
- ], we.prototype, "isRetry", 2);
3696
- we = Qe([
3697
- L("wcm-platform-selection")
3698
- ], we);
3699
- const ha = B`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)}`;
3700
- var ma = Object.getOwnPropertyDescriptor, fa = (t, e, r, o) => {
3701
- for (var n = o > 1 ? void 0 : o ? ma(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3702
- (s = t[i]) && (n = s(n) || n);
3703
- return n;
3704
- };
3705
- let yr = class extends S {
3706
- // -- render ------------------------------------------------------- //
3707
- onClick() {
3708
- j.push("WalletExplorer");
3709
- }
3710
- // -- render ------------------------------------------------------- //
3711
- render() {
3712
- const { recomendedWallets: t } = z.state, e = Ae.manualWallets(), r = [...t, ...e].reverse().slice(0, 4);
3713
- return m`<button @click="${this.onClick}"><div class="wcm-icons">${r.map((o) => {
3714
- const n = T.getWalletIcon(o);
3715
- if (n)
3716
- return m`<img crossorigin="anonymous" src="${n}">`;
3717
- const i = T.getWalletIcon({ id: o.id });
3718
- return i ? m`<img crossorigin="anonymous" src="${i}">` : k.WALLET_PLACEHOLDER;
3719
- })} ${[...Array(4 - r.length)].map(() => k.WALLET_PLACEHOLDER)}</div><wcm-text variant="xsmall-regular">View All</wcm-text></button>`;
3720
- }
3721
- };
3722
- yr.styles = [N.globalCss, ha];
3723
- yr = fa([
3724
- L("wcm-view-all-wallets-button")
3725
- ], yr);
3726
- const ga = B`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;
3727
- var pa = Object.defineProperty, wa = Object.getOwnPropertyDescriptor, pt = (t, e, r, o) => {
3728
- for (var n = o > 1 ? void 0 : o ? wa(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3729
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3730
- return o && n && pa(e, r, n), n;
3731
- };
3732
- let Me = class extends S {
3733
- // -- lifecycle ---------------------------------------------------- //
3734
- constructor() {
3735
- super(), this.walletId = "", this.imageId = "", this.uri = "", setTimeout(() => {
3736
- const { walletConnectUri: t } = K.state;
3737
- this.uri = t;
3738
- }, 0);
3739
- }
3740
- // -- private ------------------------------------------------------ //
3741
- get overlayEl() {
3742
- return T.getShadowRootElement(this, ".wcm-qr-container");
3743
- }
3744
- // -- render ------------------------------------------------------- //
3745
- render() {
3746
- return m`<div class="wcm-qr-container">${this.uri ? m`<wcm-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${F(this.walletId)}" imageId="${F(this.imageId)}"></wcm-qrcode>` : m`<wcm-spinner></wcm-spinner>`}</div>`;
3747
- }
3748
- };
3749
- Me.styles = [N.globalCss, ga];
3750
- pt([
3751
- M()
3752
- ], Me.prototype, "walletId", 2);
3753
- pt([
3754
- M()
3755
- ], Me.prototype, "imageId", 2);
3756
- pt([
3757
- q()
3758
- ], Me.prototype, "uri", 2);
3759
- Me = pt([
3760
- L("wcm-walletconnect-qr")
3761
- ], Me);
3762
- var va = Object.getOwnPropertyDescriptor, ba = (t, e, r, o) => {
3763
- for (var n = o > 1 ? void 0 : o ? va(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3764
- (s = t[i]) && (n = s(n) || n);
3765
- return n;
3766
- };
3767
- let xr = class extends S {
3768
- // -- private ------------------------------------------------------ //
3769
- viewTemplate() {
3770
- return I.isAndroid() && !I.isTelegram() ? m`<wcm-android-wallet-selection></wcm-android-wallet-selection>` : I.isMobile() ? m`<wcm-mobile-wallet-selection></wcm-mobile-wallet-selection>` : m`<wcm-desktop-wallet-selection></wcm-desktop-wallet-selection>`;
3771
- }
3772
- // -- render ------------------------------------------------------- //
3773
- render() {
3774
- return m`${this.viewTemplate()}<wcm-legal-notice></wcm-legal-notice>`;
3775
- }
3776
- };
3777
- xr.styles = [N.globalCss];
3778
- xr = ba([
3779
- L("wcm-connect-wallet-view")
3780
- ], xr);
3781
- const ya = B`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
3782
- var xa = Object.defineProperty, Ca = Object.getOwnPropertyDescriptor, io = (t, e, r, o) => {
3783
- for (var n = o > 1 ? void 0 : o ? Ca(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3784
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3785
- return o && n && xa(e, r, n), n;
3786
- };
3787
- let ut = class extends S {
3788
- // -- lifecycle ---------------------------------------------------- //
3789
- constructor() {
3790
- super(), this.isError = !1, this.openDesktopApp();
3791
- }
3792
- // -- private ------------------------------------------------------ //
3793
- onFormatAndRedirect(t) {
3794
- const { desktop: e, name: r } = I.getWalletRouterData(), o = e == null ? void 0 : e.native, n = e == null ? void 0 : e.universal;
3795
- if (o) {
3796
- const i = I.formatNativeUrl(o, t, r);
3797
- I.openHref(i, "_self");
3798
- } else if (n) {
3799
- const i = I.formatUniversalUrl(n, t, r);
3800
- I.openHref(i, "_blank");
3801
- }
3802
- }
3803
- openDesktopApp() {
3804
- const { walletConnectUri: t } = K.state, e = I.getWalletRouterData();
3805
- T.setRecentWallet(e), t && this.onFormatAndRedirect(t);
3806
- }
3807
- // -- render ------------------------------------------------------- //
3808
- render() {
3809
- const { name: t, id: e, image_id: r } = I.getWalletRouterData(), { isMobile: o, isWeb: n } = T.getCachedRouterWalletPlatforms();
3810
- return m`<wcm-modal-header title="${t}" .onAction="${T.handleUriCopy}" .actionIcon="${k.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${F(r)}" 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="${o}" .isWeb="${n}" .isRetry="${!0}"><wcm-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${k.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
3811
- }
3812
- };
3813
- ut.styles = [N.globalCss, ya];
3814
- io([
3815
- q()
3816
- ], ut.prototype, "isError", 2);
3817
- ut = io([
3818
- L("wcm-desktop-connecting-view")
3819
- ], ut);
3820
- const _a = B`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}`;
3821
- var $a = Object.getOwnPropertyDescriptor, Ea = (t, e, r, o) => {
3822
- for (var n = o > 1 ? void 0 : o ? $a(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3823
- (s = t[i]) && (n = s(n) || n);
3824
- return n;
3825
- };
3826
- let Cr = class extends S {
3827
- // -- private ------------------------------------------------------ //
3828
- onInstall(t) {
3829
- t && I.openHref(t, "_blank");
3830
- }
3831
- // -- render ------------------------------------------------------- //
3832
- render() {
3833
- const { name: t, id: e, image_id: r, homepage: o } = I.getWalletRouterData();
3834
- return m`<wcm-modal-header title="${t}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${F(r)}" 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(o)}" .iconLeft="${k.ARROW_DOWN_ICON}">Download</wcm-button></wcm-info-footer>`;
3835
- }
3836
- };
3837
- Cr.styles = [N.globalCss, _a];
3838
- Cr = Ea([
3839
- L("wcm-install-wallet-view")
3840
- ], Cr);
3841
- const Aa = B`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)}`;
3842
- var Oa = Object.defineProperty, Ia = Object.getOwnPropertyDescriptor, so = (t, e, r, o) => {
3843
- for (var n = o > 1 ? void 0 : o ? Ia(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3844
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3845
- return o && n && Oa(e, r, n), n;
3846
- };
3847
- let ht = class extends S {
3848
- // -- lifecycle ---------------------------------------------------- //
3849
- constructor() {
3850
- super(), this.isError = !1, this.openMobileApp();
3851
- }
3852
- // -- private ------------------------------------------------------ //
3853
- onFormatAndRedirect(t, e = !1) {
3854
- const { mobile: r, name: o } = I.getWalletRouterData(), n = r == null ? void 0 : r.native, i = r == null ? void 0 : r.universal, s = I.isTelegram() ? "_blank" : "_self";
3855
- if (t = I.isTelegram() && I.isAndroid() ? encodeURIComponent(t) : t, n && !e) {
3856
- const a = I.formatNativeUrl(n, t, o);
3857
- I.openHref(a, s);
3858
- } else if (i) {
3859
- const a = I.formatUniversalUrl(i, t, o);
3860
- I.openHref(a, s);
3861
- }
3862
- }
3863
- openMobileApp(t = !1) {
3864
- const { walletConnectUri: e } = K.state, r = I.getWalletRouterData();
3865
- e && this.onFormatAndRedirect(e, t), T.setRecentWallet(r);
3866
- }
3867
- onGoToAppStore(t) {
3868
- t && I.openHref(t, "_blank");
3869
- }
3870
- // -- render ------------------------------------------------------- //
3871
- render() {
3872
- const { name: t, id: e, image_id: r, app: o, mobile: n } = I.getWalletRouterData(), { isWeb: i } = T.getCachedRouterWalletPlatforms(), s = o == null ? void 0 : o.ios, a = n == null ? void 0 : n.universal;
3873
- return m`<wcm-modal-header title="${t}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${F(r)}" label="Tap 'Open' to continue…" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer class="wcm-note"><wcm-platform-selection .isWeb="${i}" .isRetry="${!0}"><wcm-button .onClick="${() => this.openMobileApp(!1)}" .iconRight="${k.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection>${a ? m`<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="${F(r)}"></wcm-wallet-image><wcm-text>${`Get ${t}`}</wcm-text></div><wcm-button .iconRight="${k.ARROW_RIGHT_ICON}" .onClick="${() => this.onGoToAppStore(s)}" variant="ghost">App Store</wcm-button></wcm-info-footer>`;
3874
- }
3875
- };
3876
- ht.styles = [N.globalCss, Aa];
3877
- so([
3878
- q()
3879
- ], ht.prototype, "isError", 2);
3880
- ht = so([
3881
- L("wcm-mobile-connecting-view")
3882
- ], ht);
3883
- const Pa = B`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
3884
- var Ta = Object.getOwnPropertyDescriptor, Ra = (t, e, r, o) => {
3885
- for (var n = o > 1 ? void 0 : o ? Ta(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3886
- (s = t[i]) && (n = s(n) || n);
3887
- return n;
3888
- };
3889
- let _r = class extends S {
3890
- // -- render ------------------------------------------------------- //
3891
- render() {
3892
- const { name: t, id: e, image_id: r } = I.getWalletRouterData(), { isDesktop: o, isWeb: n } = T.getCachedRouterWalletPlatforms();
3893
- return m`<wcm-modal-header title="${t}" .onAction="${T.handleUriCopy}" .actionIcon="${k.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr walletId="${e}" imageId="${F(r)}"></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="${o}" .isWeb="${n}"></wcm-platform-selection></wcm-info-footer>`;
3894
- }
3895
- };
3896
- _r.styles = [N.globalCss, Pa];
3897
- _r = Ra([
3898
- L("wcm-mobile-qr-connecting-view")
3899
- ], _r);
3900
- var Ma = Object.getOwnPropertyDescriptor, Sa = (t, e, r, o) => {
3901
- for (var n = o > 1 ? void 0 : o ? Ma(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3902
- (s = t[i]) && (n = s(n) || n);
3903
- return n;
3904
- };
3905
- let $r = class extends S {
3906
- // -- render ------------------------------------------------------- //
3907
- render() {
3908
- return m`<wcm-modal-header title="Scan the code" .onAction="${T.handleUriCopy}" .actionIcon="${k.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>`;
3909
- }
3910
- };
3911
- $r.styles = [N.globalCss];
3912
- $r = Sa([
3913
- L("wcm-qrcode-view")
3914
- ], $r);
3915
- const Da = B`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}`;
3916
- var Na = Object.defineProperty, La = Object.getOwnPropertyDescriptor, Je = (t, e, r, o) => {
3917
- for (var n = o > 1 ? void 0 : o ? La(e, r) : e, i = t.length - 1, s; i >= 0; i--)
3918
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
3919
- return o && n && Na(e, r, n), n;
3920
- };
3921
- const rr = 40;
3922
- let ve = class extends S {
3923
- constructor() {
3924
- super(...arguments), this.loading = !z.state.wallets.listings.length, this.firstFetch = !z.state.wallets.listings.length, this.search = "", this.endReached = !1, this.intersectionObserver = void 0, this.searchDebounce = T.debounce((t) => {
3925
- t.length >= 1 ? (this.firstFetch = !0, this.endReached = !1, this.search = t, z.resetSearch(), this.fetchWallets()) : this.search && (this.search = "", this.endReached = this.isLastPage(), z.resetSearch());
3926
- });
3927
- }
3928
- // -- lifecycle ---------------------------------------------------- //
3929
- firstUpdated() {
3930
- this.createPaginationObserver();
3931
- }
3932
- disconnectedCallback() {
3933
- var t;
3934
- (t = this.intersectionObserver) == null || t.disconnect();
3935
- }
3936
- // -- private ------------------------------------------------------ //
3937
- get placeholderEl() {
3938
- return T.getShadowRootElement(this, ".wcm-placeholder-block");
3939
- }
3940
- createPaginationObserver() {
3941
- this.intersectionObserver = new IntersectionObserver(([t]) => {
3942
- t.isIntersecting && !(this.search && this.firstFetch) && this.fetchWallets();
3943
- }), this.intersectionObserver.observe(this.placeholderEl);
3944
- }
3945
- isLastPage() {
3946
- const { wallets: t, search: e } = z.state, { listings: r, total: o } = this.search ? e : t;
3947
- return o <= rr || r.length >= o;
3948
- }
3949
- async fetchWallets() {
3950
- var t;
3951
- const { wallets: e, search: r } = z.state, { listings: o, total: n, page: i } = this.search ? r : e;
3952
- if (!this.endReached && (this.firstFetch || n > rr && o.length < n))
3953
- try {
3954
- this.loading = !0;
3955
- const s = (t = K.state.chains) == null ? void 0 : t.join(","), { listings: a } = await z.getWallets({
3956
- page: this.firstFetch ? 1 : i + 1,
3957
- entries: rr,
3958
- search: this.search,
3959
- version: 2,
3960
- chains: s
3961
- }), l = a.map((c) => T.getWalletIcon(c));
3962
- await Promise.all([
3963
- ...l.map(async (c) => T.preloadImage(c)),
3964
- I.wait(300)
3965
- ]), this.endReached = this.isLastPage();
3966
- } catch (s) {
3967
- console.error(s), ne.openToast(T.getErrorMessage(s), "error");
3968
- } finally {
3969
- this.loading = !1, this.firstFetch = !1;
3970
- }
3971
- }
3972
- onConnect(t) {
3973
- I.isAndroid() ? T.handleMobileLinking(t) : T.goToConnectingView(t);
3974
- }
3975
- onSearchChange(t) {
3976
- const { value: e } = t.target;
3977
- this.searchDebounce(e);
3978
- }
3979
- // -- render ------------------------------------------------------- //
3980
- render() {
3981
- const { wallets: t, search: e } = z.state, { listings: r } = this.search ? e : t, o = this.loading && !r.length, n = this.search.length >= 3;
3982
- let i = ie.manualWalletsTemplate(), s = ie.recomendedWalletsTemplate(!0);
3983
- n && (i = i.filter(
3984
- ({ values: c }) => T.caseSafeIncludes(c[0], this.search)
3985
- ), s = s.filter(
3986
- ({ values: c }) => T.caseSafeIncludes(c[0], this.search)
3987
- ));
3988
- const a = !this.loading && !r.length && !s.length, l = {
3989
- "wcm-loading": o,
3990
- "wcm-end-reached": this.endReached || !this.loading,
3991
- "wcm-empty": a
3992
- };
3993
- return m`<wcm-modal-header><wcm-search-input .onChange="${this.onSearchChange.bind(this)}"></wcm-search-input></wcm-modal-header><wcm-modal-content class="${X(l)}"><div class="wcm-grid">${o ? null : i} ${o ? null : s} ${o ? null : r.map(
3994
- (c) => m`${c ? m`<wcm-wallet-button imageId="${c.image_id}" name="${c.name}" walletId="${c.id}" .onClick="${() => this.onConnect(c)}"></wcm-wallet-button>` : null}`
3995
- )}</div><div class="wcm-placeholder-block">${a ? m`<wcm-text variant="big-bold" color="secondary">No results found</wcm-text>` : null} ${!a && this.loading ? m`<wcm-spinner></wcm-spinner>` : null}</div></wcm-modal-content>`;
3996
- }
3997
- };
3998
- ve.styles = [N.globalCss, Da];
3999
- Je([
4000
- q()
4001
- ], ve.prototype, "loading", 2);
4002
- Je([
4003
- q()
4004
- ], ve.prototype, "firstFetch", 2);
4005
- Je([
4006
- q()
4007
- ], ve.prototype, "search", 2);
4008
- Je([
4009
- q()
4010
- ], ve.prototype, "endReached", 2);
4011
- ve = Je([
4012
- L("wcm-wallet-explorer-view")
4013
- ], ve);
4014
- const Ba = B`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
4015
- var Wa = Object.defineProperty, ka = Object.getOwnPropertyDescriptor, ao = (t, e, r, o) => {
4016
- for (var n = o > 1 ? void 0 : o ? ka(e, r) : e, i = t.length - 1, s; i >= 0; i--)
4017
- (s = t[i]) && (n = (o ? s(e, r, n) : s(n)) || n);
4018
- return o && n && Wa(e, r, n), n;
4019
- };
4020
- let mt = class extends S {
4021
- // -- lifecycle ---------------------------------------------------- //
4022
- constructor() {
4023
- super(), this.isError = !1, this.openWebWallet();
4024
- }
4025
- // -- private ------------------------------------------------------ //
4026
- onFormatAndRedirect(t) {
4027
- const { desktop: e, name: r } = I.getWalletRouterData(), o = e == null ? void 0 : e.universal;
4028
- if (o) {
4029
- const n = I.formatUniversalUrl(o, t, r);
4030
- I.openHref(n, "_blank");
4031
- }
4032
- }
4033
- openWebWallet() {
4034
- const { walletConnectUri: t } = K.state, e = I.getWalletRouterData();
4035
- T.setRecentWallet(e), t && this.onFormatAndRedirect(t);
4036
- }
4037
- // -- render ------------------------------------------------------- //
4038
- render() {
4039
- const { name: t, id: e, image_id: r } = I.getWalletRouterData(), { isMobile: o, isDesktop: n } = T.getCachedRouterWalletPlatforms(), i = I.isMobile();
4040
- return m`<wcm-modal-header title="${t}" .onAction="${T.handleUriCopy}" .actionIcon="${k.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${e}" imageId="${F(r)}" 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="${o}" .isDesktop="${i ? !1 : n}" .isRetry="${!0}"><wcm-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${k.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
4041
- }
4042
- };
4043
- mt.styles = [N.globalCss, Ba];
4044
- ao([
4045
- q()
4046
- ], mt.prototype, "isError", 2);
4047
- mt = ao([
4048
- L("wcm-web-connecting-view")
4049
- ], mt);
4050
- export {
4051
- Ke as WcmModal,
4052
- ae as WcmQrCode
4053
- };