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