astra-modal-test 1.0.10 → 1.0.12

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.
Files changed (171) hide show
  1. package/README.md +206 -134
  2. package/dist/{SwapController-DyormRqe.js → SwapController-mYFErPzx.js} +1 -1
  3. package/dist/{add-C1zIRxeS.js → add-CXtFvysR.js} +1 -1
  4. package/dist/{all-wallets-5a2U9fLw.js → all-wallets-B9fFXw5x.js} +1 -1
  5. package/dist/{app-store-2IKrZeLe.js → app-store-BXf1yvR8.js} +1 -1
  6. package/dist/{apple-DH9ESSKX.js → apple-DtcOcX1n.js} +1 -1
  7. package/dist/{arrow-bottom-BxAPS43J.js → arrow-bottom-BXeLKqSV.js} +1 -1
  8. package/dist/{arrow-bottom-circle-Cy5Gjca4.js → arrow-bottom-circle-BVUU200N.js} +1 -1
  9. package/dist/{arrow-left-CBX7JaHB.js → arrow-left-LguJPyNR.js} +1 -1
  10. package/dist/{arrow-right-G72bt1-M.js → arrow-right-D9kKZzGG.js} +1 -1
  11. package/dist/{arrow-top-DCkQG0Dq.js → arrow-top-C5JcaCqz.js} +1 -1
  12. package/dist/{bank-FNxAUs8r.js → bank-DgbCzr0A.js} +1 -1
  13. package/dist/{bin-B-c2CIPW.js → bin-ykHym2bC.js} +1 -1
  14. package/dist/{bitcoin-jk4NLDu1.js → bitcoin-B8jzy_uV.js} +1 -1
  15. package/dist/{browser-D6w0J78l.js → browser-Bk8u8PAA.js} +1 -1
  16. package/dist/{card-BLWRKU-r.js → card-DcwQMUca.js} +1 -1
  17. package/dist/ccip-CwJvuExU.js +239 -0
  18. package/dist/{checkmark-C1pTfaGr.js → checkmark-D3aEYZ8B.js} +1 -1
  19. package/dist/{checkmark-bold-UzogCu8g.js → checkmark-bold-5H7N-CDG.js} +1 -1
  20. package/dist/{chevron-bottom-w_rMAO7x.js → chevron-bottom-BA3C4MR1.js} +1 -1
  21. package/dist/{chevron-left-DGNJGxiP.js → chevron-left-BX18UWKM.js} +1 -1
  22. package/dist/{chevron-right-VFQCvCyG.js → chevron-right-DG7ovxTe.js} +1 -1
  23. package/dist/{chevron-top-DVhFmsKp.js → chevron-top-DHfev7lV.js} +1 -1
  24. package/dist/{chrome-store-BkYX3All.js → chrome-store-BSVzpGdu.js} +1 -1
  25. package/dist/{circle-B1A3j4eP.js → circle-SYFB9f2-.js} +1 -1
  26. package/dist/{clock-BKr-VHDU.js → clock-Cygqlf1g.js} +1 -1
  27. package/dist/{close-BEacRQ8Q.js → close-B43cuuko.js} +1 -1
  28. package/dist/{coinPlaceholder-0ZwtMAHl.js → coinPlaceholder-BHdR6bKb.js} +1 -1
  29. package/dist/{compass-pulK-BFi.js → compass-7S6b6wyA.js} +1 -1
  30. package/dist/{copy-MWCQE0T4.js → copy-CT53bEwd.js} +1 -1
  31. package/dist/{cursor-transparent-Co_5p0du.js → cursor-transparent-LmjzjsFm.js} +1 -1
  32. package/dist/{cursor-C2GVfUuM.js → cursor-vtqRnrF7.js} +1 -1
  33. package/dist/{desktop-C91EoSqM.js → desktop-Doa7TQsq.js} +1 -1
  34. package/dist/{disconnect-BWg1-rml.js → disconnect-C5G6Ncu_.js} +1 -1
  35. package/dist/{discord-Bi0Bfa_e.js → discord-DX7Cl3Ko.js} +1 -1
  36. package/dist/{email-U2WCRPFh.js → email-CyHWh9wL.js} +1 -1
  37. package/dist/{embedded-wallet-B6P0kU9A.js → embedded-wallet-BZQImi7s.js} +8 -8
  38. package/dist/{ethereum-BeZyayQW.js → ethereum-Bwvtk5-_.js} +1 -1
  39. package/dist/{etherscan-BQTsufjv.js → etherscan-CyVRICvw.js} +1 -1
  40. package/dist/{exclamation-triangle-JT-YKNXX.js → exclamation-triangle-BDbPL3nL.js} +1 -1
  41. package/dist/{extension-TnYLHoFA.js → extension-Cx3t2k-R.js} +1 -1
  42. package/dist/{external-link-Dhgai9sc.js → external-link-DZCYpOZI.js} +1 -1
  43. package/dist/{facebook-C6XFGRDw.js → facebook-BEnPrhG3.js} +1 -1
  44. package/dist/{farcaster-CvYbxZQq.js → farcaster-DyBPLb_k.js} +1 -1
  45. package/dist/{filters-DwVRjAav.js → filters-CTwxivn_.js} +1 -1
  46. package/dist/{github-BVZSx-z9.js → github-kzQb61pT.js} +1 -1
  47. package/dist/{google-NbJiQLc5.js → google-DSC-rYNu.js} +1 -1
  48. package/dist/{help-circle-Cum2UOMJ.js → help-circle-C5XfimVx.js} +1 -1
  49. package/dist/{id-kRR6YgVc.js → id-B9fQOT4E.js} +1 -1
  50. package/dist/{image-BWUCRAmp.js → image-1CCj36XM.js} +1 -1
  51. package/dist/{index-RFYbqmu0.js → index-Bjik7E9u.js} +1 -1
  52. package/dist/{index-DQ5AZLMt.js → index-C1fgrzi0.js} +16 -16
  53. package/dist/{index-BZZHE-1t.js → index-CyeGBcX0.js} +1 -1
  54. package/dist/{index-Dq0LIBEh.js → index-DKEMW9N8.js} +25 -25
  55. package/dist/{index-2vYoun4O.js → index-LucuShOc.js} +45292 -56275
  56. package/dist/{info-Br-SBtj3.js → info-Begf9tO0.js} +1 -1
  57. package/dist/{info-circle-Ew4RoR_Q.js → info-circle-Bo1H2OXh.js} +1 -1
  58. package/dist/{lightbulb-BRBVOE_b.js → lightbulb-C-SU_z2I.js} +1 -1
  59. package/dist/{mail-Dzi4AncY.js → mail-CXsYiNAT.js} +1 -1
  60. package/dist/{mobile-BGGxQ5be.js → mobile-C7bUjgog.js} +1 -1
  61. package/dist/{more-BmNaKbYJ.js → more-29BC-wmy.js} +1 -1
  62. package/dist/{network-placeholder-EMiMf4q1.js → network-placeholder-B-x3-6jN.js} +1 -1
  63. package/dist/{nftPlaceholder-CvSqy3Sd.js → nftPlaceholder-pM-Hmswq.js} +1 -1
  64. package/dist/nodeflow-sdk.es.js +15 -0
  65. package/dist/{off-DF9uz0Nc.js → off-DEa_uc7_.js} +1 -1
  66. package/dist/{onramp-cKzTmKku.js → onramp-ZXqyloYt.js} +10 -10
  67. package/dist/{play-store-CGxW4MgL.js → play-store-WgSEpEI1.js} +1 -1
  68. package/dist/{plus-CQ6wWkN0.js → plus-u4UZhYAg.js} +1 -1
  69. package/dist/{qr-code-VBqx9nAF.js → qr-code-DxZGxoPE.js} +1 -1
  70. package/dist/{receive-CVzkHmKR.js → receive-Ct_mQWzk.js} +1 -1
  71. package/dist/{recycle-horizontal-Oq1YtvUx.js → recycle-horizontal-BWVpmHJc.js} +1 -1
  72. package/dist/{refresh-BDlGAzmY.js → refresh-gi4TfgEU.js} +1 -1
  73. package/dist/{reown-logo-BlIpXIlG.js → reown-logo-Bg731n4w.js} +1 -1
  74. package/dist/{search-DfmCmp0m.js → search-BQv7DVJG.js} +1 -1
  75. package/dist/{send-BXudz514.js → send-BzmnFT2p.js} +1 -1
  76. package/dist/{send-Cz0L5LmE.js → send-CyxKtrQ9.js} +17 -17
  77. package/dist/{socials-CDOh8MRf.js → socials-vziOn4zi.js} +5 -5
  78. package/dist/{solana-CbiyOE-8.js → solana-Dz48awbr.js} +1 -1
  79. package/dist/{swapHorizontal-DyU1TH_e.js → swapHorizontal-Cwe1PoMp.js} +1 -1
  80. package/dist/{swapHorizontalBold-CGXW7Ocj.js → swapHorizontalBold-Dxu58sRG.js} +1 -1
  81. package/dist/{swapHorizontalMedium-2KTcj67d.js → swapHorizontalMedium-DOZZthlB.js} +1 -1
  82. package/dist/{swapHorizontalRoundedBold-TxFtmmda.js → swapHorizontalRoundedBold-BkIZQXnD.js} +1 -1
  83. package/dist/{swapVertical-BKD6lxM3.js → swapVertical-LSq66ctC.js} +1 -1
  84. package/dist/{swaps-BuGsEQaI.js → swaps-C2EO6dQA.js} +9 -9
  85. package/dist/{telegram-CAsl9DeG.js → telegram-ITq9s69Y.js} +1 -1
  86. package/dist/{three-dots-BoE2aHZi.js → three-dots-JH3A1TFR.js} +1 -1
  87. package/dist/{transactions-C1NtsnD6.js → transactions-DpMVZVap.js} +1 -1
  88. package/dist/{twitch-CvkZZxgT.js → twitch-BKs5FlDf.js} +1 -1
  89. package/dist/{twitterIcon-CrhnOl_O.js → twitterIcon-CCXEj_Nv.js} +1 -1
  90. package/dist/{ui-BJcuThPA.js → ui-D5ULRvGt.js} +6 -6
  91. package/dist/{user-BZRWUXG7.js → user-CBgAUjZv.js} +1 -1
  92. package/dist/{verify-y9F4DcJ4.js → verify-BPlPPkhG.js} +1 -1
  93. package/dist/{verify-filled-X_8-BhMk.js → verify-filled-qTRg0OWM.js} +1 -1
  94. package/dist/{w3m-modal-BX--v1Nc.js → w3m-modal-DSdDfy32.js} +27 -27
  95. package/dist/{wallet-CIaVVkjQ.js → wallet-BuDEi_8z.js} +1 -1
  96. package/dist/{wallet-placeholder-Cq1ofde1.js → wallet-placeholder-D4DKTuB_.js} +1 -1
  97. package/dist/{walletconnect-CINzSCJ3.js → walletconnect-Dt3q5XFc.js} +1 -1
  98. package/dist/{warning-circle-BvBNhMKH.js → warning-circle-B8Fkc0_4.js} +1 -1
  99. package/dist/{x-xHY7JehW.js → x-Cm_V3zUI.js} +1 -1
  100. package/dist/{x-mark-DEmnBt6u.js → x-mark-BVvwdxda.js} +1 -1
  101. package/package.json +11 -10
  102. package/.github/workflows/code-quality.yml +0 -43
  103. package/.github/workflows/publish.yml +0 -64
  104. package/dist/astra-sdk.es.js +0 -9
  105. package/dist/ccip-DkYvh7hg.js +0 -149
  106. package/dist/clsx.m-DCYaa4RU.js +0 -20
  107. package/dist/index-BDE-2VTp.js +0 -315
  108. package/dist/index-BjLIiJQa.js +0 -21034
  109. package/dist/index-CIr4zlVp.js +0 -386
  110. package/dist/index-ChxXyuZj.js +0 -572
  111. package/dist/index-D-T7kk3G.js +0 -15911
  112. package/dist/index-DSX3HrTS.js +0 -10785
  113. package/dist/secp256k1-CsKSDHNi.js +0 -1257
  114. package/eslint.config.mjs +0 -41
  115. package/index.html +0 -13
  116. package/public/font/ClashDisplay-Variable.ttf +0 -0
  117. package/public/font/ClashDisplay-Variable.woff +0 -0
  118. package/public/font/ClashDisplay-Variable.woff2 +0 -0
  119. package/public/vite.svg +0 -1
  120. package/src/App.css +0 -170
  121. package/src/apis/lspApi.js +0 -82
  122. package/src/apis/request.js +0 -59
  123. package/src/assets/arrow-right.svg +0 -3
  124. package/src/assets/astr.svg +0 -13
  125. package/src/assets/bridge-loading.png +0 -0
  126. package/src/assets/ln.png +0 -0
  127. package/src/assets/network/Arbitrum.png +0 -0
  128. package/src/assets/network/Polygon.png +0 -0
  129. package/src/assets/network/Solana.png +0 -0
  130. package/src/assets/network/base.png +0 -0
  131. package/src/assets/network/botanix.png +0 -0
  132. package/src/assets/network/bsc.svg +0 -13
  133. package/src/assets/network/eth.png +0 -0
  134. package/src/assets/network/lighting.png +0 -0
  135. package/src/assets/network/ligtning.svg +0 -22
  136. package/src/assets/network/solona.png +0 -0
  137. package/src/assets/pay.png +0 -0
  138. package/src/assets/powerby.svg +0 -14
  139. package/src/assets/react.svg +0 -1
  140. package/src/assets/success.svg +0 -3
  141. package/src/assets/tip.svg +0 -5
  142. package/src/assets/tokens/sol.png +0 -0
  143. package/src/assets/tokens/usdc.png +0 -0
  144. package/src/assets/tokens/usdt.png +0 -0
  145. package/src/comps/AstraImage.jsx +0 -37
  146. package/src/comps/AstraModal.jsx +0 -202
  147. package/src/comps/AstraModalLogo.jsx +0 -29
  148. package/src/comps/AstraNetwork.jsx +0 -261
  149. package/src/comps/CheckErc20Button.jsx +0 -28
  150. package/src/comps/CommonStyle.jsx +0 -4
  151. package/src/comps/ConnectButton.jsx +0 -19
  152. package/src/comps/EllipsisMiddle.jsx +0 -42
  153. package/src/comps/ResultModal.jsx +0 -312
  154. package/src/comps/ToLightning.jsx +0 -653
  155. package/src/comps/ToToken.jsx +0 -550
  156. package/src/constants/index.js +0 -21
  157. package/src/font/ClashDisplay-Variable.ttf +0 -0
  158. package/src/font/ClashDisplay-Variable.woff +0 -0
  159. package/src/font/ClashDisplay-Variable.woff2 +0 -0
  160. package/src/hooks/useContract.js +0 -179
  161. package/src/hooks/useGetMinAndMax.js +0 -48
  162. package/src/hooks/useLspApi.js +0 -70
  163. package/src/hooks/useParseInvoice.js +0 -95
  164. package/src/index.css +0 -69
  165. package/src/index.jsx +0 -161
  166. package/src/lib/bolt11.min.js +0 -1
  167. package/src/main.jsx +0 -75
  168. package/src/store/index.js +0 -25
  169. package/src/theme.js +0 -108
  170. package/src/utils/index.js +0 -267
  171. package/vite.config.js +0 -50
@@ -1,4 +1,4 @@
1
- import { aB as q, aU as C, Y as O, V as y, P as g, aV as B, O as h, aW as j, M as z, Q as _, S as T, _ as N, R as Y, aI as x, a4 as X, a5 as J, E as W, J as F, K as m, au as v, av as w, I as H, at as Z, a3 as G, ar as Q } from "./index-2vYoun4O.js";
1
+ import { aA as q, aT as C, Y as O, V as y, P as g, aU as B, O as h, aV as j, M as z, Q as _, S as T, _ as A, R as Y, aH as x, a4 as X, a5 as J, E as W, J as F, K as m, a9 as v, aa as w, I as H, a8 as Z, a3 as G, a6 as Q } from "./index-LucuShOc.js";
2
2
  const o = {
3
3
  INVALID_PAYMENT_CONFIG: "INVALID_PAYMENT_CONFIG",
4
4
  INVALID_RECIPIENT: "INVALID_RECIPIENT",
@@ -12,7 +12,7 @@ const o = {
12
12
  ASSET_NOT_SUPPORTED: "ASSET_NOT_SUPPORTED",
13
13
  UNABLE_TO_GET_PAY_URL: "UNABLE_TO_GET_PAY_URL",
14
14
  UNABLE_TO_GET_BUY_STATUS: "UNABLE_TO_GET_BUY_STATUS"
15
- }, A = {
15
+ }, N = {
16
16
  [o.INVALID_PAYMENT_CONFIG]: "Invalid payment configuration",
17
17
  [o.INVALID_RECIPIENT]: "Invalid recipient address",
18
18
  [o.INVALID_ASSET]: "Invalid asset specified",
@@ -28,10 +28,10 @@ const o = {
28
28
  };
29
29
  class c extends Error {
30
30
  get message() {
31
- return A[this.code];
31
+ return N[this.code];
32
32
  }
33
33
  constructor(e, s) {
34
- super(A[e]), this.name = "AppKitPayError", this.code = e, this.details = s, Error.captureStackTrace && Error.captureStackTrace(this, c);
34
+ super(N[e]), this.name = "AppKitPayError", this.code = e, this.details = s, Error.captureStackTrace && Error.captureStackTrace(this, c);
35
35
  }
36
36
  }
37
37
  const ee = "https://rpc.walletconnect.org/v1/json-rpc";
@@ -240,7 +240,7 @@ const $ = 0, k = "unknown", n = z({
240
240
  });
241
241
  n.exchanges = t.exchanges.slice(0, 2);
242
242
  } catch {
243
- throw T.showError(A.UNABLE_TO_GET_EXCHANGES), new c(o.UNABLE_TO_GET_EXCHANGES);
243
+ throw T.showError(N.UNABLE_TO_GET_EXCHANGES), new c(o.UNABLE_TO_GET_EXCHANGES);
244
244
  } finally {
245
245
  n.isLoading = !1;
246
246
  }
@@ -314,13 +314,13 @@ const $ = 0, k = "unknown", n = z({
314
314
  const i = t.openInNewTab ?? !0 ? "_blank" : "_self";
315
315
  return O.openHref(a.url, i), a;
316
316
  } catch (a) {
317
- throw a instanceof c ? n.error = a.message : n.error = A.GENERIC_PAYMENT_ERROR, new c(o.UNABLE_TO_GET_PAY_URL);
317
+ throw a instanceof c ? n.error = a.message : n.error = N.GENERIC_PAYMENT_ERROR, new c(o.UNABLE_TO_GET_PAY_URL);
318
318
  }
319
319
  },
320
320
  subscribeEvents() {
321
321
  n.isConfigured || (h.subscribeKey("connections", (t) => {
322
322
  t.size > 0 && this.handlePayment();
323
- }), N.subscribeKey("caipAddress", (t) => {
323
+ }), A.subscribeKey("caipAddress", (t) => {
324
324
  const e = h.hasAnyConnection(g.CONNECTOR_ID.WALLET_CONNECT);
325
325
  t && (e ? setTimeout(() => {
326
326
  this.handlePayment();
@@ -332,7 +332,7 @@ const $ = 0, k = "unknown", n = z({
332
332
  type: "wallet",
333
333
  status: "IN_PROGRESS"
334
334
  };
335
- const t = N.state.caipAddress;
335
+ const t = A.state.caipAddress;
336
336
  if (!t)
337
337
  return;
338
338
  const { chainId: e, address: s } = C.parseCaipAddress(t), a = y.state.activeChain;
@@ -374,7 +374,7 @@ const $ = 0, k = "unknown", n = z({
374
374
  throw new c(o.INVALID_CHAIN_NAMESPACE);
375
375
  }
376
376
  } catch (l) {
377
- l instanceof c ? n.error = l.message : n.error = A.GENERIC_PAYMENT_ERROR, n.currentPayment.status = "FAILED", T.showError(n.error);
377
+ l instanceof c ? n.error = l.message : n.error = N.GENERIC_PAYMENT_ERROR, n.currentPayment.status = "FAILED", T.showError(n.error);
378
378
  } finally {
379
379
  n.isPaymentInProgress = !1;
380
380
  }
@@ -394,7 +394,7 @@ const $ = 0, k = "unknown", n = z({
394
394
  throw new c(o.INVALID_AMOUNT);
395
395
  },
396
396
  handlePayWithWallet() {
397
- const t = N.state.caipAddress;
397
+ const t = A.state.caipAddress;
398
398
  if (!t) {
399
399
  Y.push("Connect");
400
400
  return;
@@ -425,7 +425,7 @@ const $ = 0, k = "unknown", n = z({
425
425
  openInNewTab: n.openInNewTab
426
426
  };
427
427
  } catch (e) {
428
- return e instanceof c ? n.error = e.message : n.error = A.GENERIC_PAYMENT_ERROR, n.isPaymentInProgress = !1, T.showError(n.error), null;
428
+ return e instanceof c ? n.error = e.message : n.error = N.GENERIC_PAYMENT_ERROR, n.isPaymentInProgress = !1, T.showError(n.error), null;
429
429
  }
430
430
  },
431
431
  async getBuyStatus(t, e) {
@@ -528,10 +528,10 @@ var E = function(t, e, s, a) {
528
528
  };
529
529
  let p = class extends F {
530
530
  constructor() {
531
- super(), this.unsubscribe = [], this.amount = "", this.tokenSymbol = "", this.networkName = "", this.exchanges = u.state.exchanges, this.isLoading = u.state.isLoading, this.loadingExchangeId = null, this.connectedWalletInfo = N.state.connectedWalletInfo, this.initializePaymentDetails(), this.unsubscribe.push(u.subscribeKey("exchanges", (e) => this.exchanges = e)), this.unsubscribe.push(u.subscribeKey("isLoading", (e) => this.isLoading = e)), this.unsubscribe.push(N.subscribe((e) => this.connectedWalletInfo = e.connectedWalletInfo)), u.fetchExchanges();
531
+ super(), this.unsubscribe = [], this.amount = "", this.tokenSymbol = "", this.networkName = "", this.exchanges = u.state.exchanges, this.isLoading = u.state.isLoading, this.loadingExchangeId = null, this.connectedWalletInfo = A.state.connectedWalletInfo, this.initializePaymentDetails(), this.unsubscribe.push(u.subscribeKey("exchanges", (e) => this.exchanges = e)), this.unsubscribe.push(u.subscribeKey("isLoading", (e) => this.isLoading = e)), this.unsubscribe.push(A.subscribe((e) => this.connectedWalletInfo = e.connectedWalletInfo)), u.fetchExchanges();
532
532
  }
533
533
  get isWalletConnected() {
534
- return N.state.status === "connected";
534
+ return A.state.status === "connected";
535
535
  }
536
536
  render() {
537
537
  return m`
@@ -813,7 +813,7 @@ let I = class extends F {
813
813
  }
814
814
  }
815
815
  if (e.type === "wallet") {
816
- const a = (s = N.state.connectedWalletInfo) == null ? void 0 : s.icon;
816
+ const a = (s = A.state.connectedWalletInfo) == null ? void 0 : s.icon;
817
817
  if (a)
818
818
  return a;
819
819
  const r = y.state.activeChain;
@@ -851,7 +851,7 @@ const ye = 3e5;
851
851
  async function he(t) {
852
852
  return u.handleOpenPay(t);
853
853
  }
854
- async function Ae(t, e = ye) {
854
+ async function Ne(t, e = ye) {
855
855
  if (e <= 0)
856
856
  throw new c(o.INVALID_PAYMENT_CONFIG, "Timeout must be greater than 0");
857
857
  try {
@@ -1051,7 +1051,7 @@ export {
1051
1051
  he as openPay,
1052
1052
  Ue as optimismUSDC,
1053
1053
  Oe as optimismUSDT,
1054
- Ae as pay,
1054
+ Ne as pay,
1055
1055
  Re as polygonUSDC,
1056
1056
  Me as polygonUSDT,
1057
1057
  Ge as solanaSOL,
@@ -1,4 +1,4 @@
1
- import { A as a, b as s, d as i, f as n, W as o, h as W, i as w, k as m, a as c, q as V, c as l, l as u, u as A, m as C, n as p, p as r, o as B, r as h, s as g, e as k, v as N, w as S, j as K, g as d, C as f, x, z as I, B as b, y as v, t as M } from "./index-2vYoun4O.js";
1
+ import { A as a, b as s, d as i, f as n, W as o, h as W, i as w, k as m, a as c, q as V, c as l, l as u, u as A, m as C, n as p, p as r, o as B, r as h, s as g, e as k, v as N, w as S, j as K, g as d, C as f, x, z as I, B as b, y as v, t as M } from "./index-LucuShOc.js";
2
2
  export {
3
3
  a as AppKitAccountButton,
4
4
  s as AppKitButton,
@@ -1,4 +1,4 @@
1
- import { E, F as U, G as M, H as C, I as d, J as v, K as u, av as m, as as P, aX as S, R as l, a3 as h, Y as O, S as f, V, O as N, aB as x, Q as c, aI as W, aQ as B, aS as H, aO as q, P as G } from "./index-2vYoun4O.js";
1
+ import { E, F as U, G as M, H as C, I as d, J as v, K as u, aa as m, a7 as D, aW as A, R as l, a3 as h, Y as O, S as f, V, O as N, aA as x, Q as c, aH as W, aP as H, aR as B, aN as q, P as G } from "./index-LucuShOc.js";
2
2
  const K = E`
3
3
  :host {
4
4
  position: relative;
@@ -178,13 +178,13 @@ let w = class extends v {
178
178
  const n = e.target, o = this.getInputElement(n);
179
179
  if (o) {
180
180
  const i = o.value;
181
- e.inputType === "insertFromPaste" ? this.handlePaste(o, i, t) : P.isNumber(i) && e.data ? (this.updateInput(o, t, e.data), this.focusInputField("next", t)) : this.updateInput(o, t, "");
181
+ e.inputType === "insertFromPaste" ? this.handlePaste(o, i, t) : D.isNumber(i) && e.data ? (this.updateInput(o, t, e.data), this.focusInputField("next", t)) : this.updateInput(o, t, "");
182
182
  }
183
183
  this.dispatchInputChangeEvent();
184
184
  }
185
185
  handlePaste(e, t, n) {
186
186
  const o = t[0];
187
- if (o && P.isNumber(o)) {
187
+ if (o && D.isNumber(o)) {
188
188
  this.updateInput(e, n, o);
189
189
  const r = t.substring(1);
190
190
  if (n + 1 < this.length && r.length) {
@@ -221,7 +221,7 @@ _([
221
221
  w = _([
222
222
  d("wui-otp")
223
223
  ], w);
224
- const Q = E`
224
+ const J = E`
225
225
  wui-loading-spinner {
226
226
  margin: 9px auto;
227
227
  }
@@ -236,8 +236,8 @@ var R = function(a, e, t, n) {
236
236
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, n);
237
237
  else for (var s = a.length - 1; s >= 0; s--) (r = a[s]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, t, i) : r(e, t)) || i);
238
238
  return o > 3 && i && Object.defineProperty(e, t, i), i;
239
- }, T;
240
- let p = T = class extends v {
239
+ }, S;
240
+ let p = S = class extends v {
241
241
  firstUpdated() {
242
242
  this.startOTPTimeout();
243
243
  }
@@ -246,7 +246,7 @@ let p = T = class extends v {
246
246
  }
247
247
  constructor() {
248
248
  var e;
249
- super(), this.loading = !1, this.timeoutTimeLeft = S.getTimeToNextEmailLogin(), this.error = "", this.otp = "", this.email = (e = l.state.data) == null ? void 0 : e.email, this.authConnector = h.getAuthConnector();
249
+ super(), this.loading = !1, this.timeoutTimeLeft = A.getTimeToNextEmailLogin(), this.error = "", this.otp = "", this.email = (e = l.state.data) == null ? void 0 : e.email, this.authConnector = h.getAuthConnector();
250
250
  }
251
251
  render() {
252
252
  if (!this.email)
@@ -299,8 +299,8 @@ let p = T = class extends v {
299
299
  `;
300
300
  }
301
301
  startOTPTimeout() {
302
- this.timeoutTimeLeft = S.getTimeToNextEmailLogin(), this.OTPTimeout = setInterval(() => {
303
- this.timeoutTimeLeft > 0 ? this.timeoutTimeLeft = S.getTimeToNextEmailLogin() : clearInterval(this.OTPTimeout);
302
+ this.timeoutTimeLeft = A.getTimeToNextEmailLogin(), this.OTPTimeout = setInterval(() => {
303
+ this.timeoutTimeLeft > 0 ? this.timeoutTimeLeft = A.getTimeToNextEmailLogin() : clearInterval(this.OTPTimeout);
304
304
  }, 1e3);
305
305
  }
306
306
  async onOtpInputChange(e) {
@@ -336,11 +336,11 @@ let p = T = class extends v {
336
336
  };
337
337
  }
338
338
  shouldSubmitOnOtpChange() {
339
- return this.authConnector && this.otp.length === T.OTP_LENGTH;
339
+ return this.authConnector && this.otp.length === S.OTP_LENGTH;
340
340
  }
341
341
  };
342
342
  p.OTP_LENGTH = 6;
343
- p.styles = Q;
343
+ p.styles = J;
344
344
  R([
345
345
  m()
346
346
  ], p.prototype, "loading", void 0);
@@ -350,10 +350,10 @@ R([
350
350
  R([
351
351
  m()
352
352
  ], p.prototype, "error", void 0);
353
- p = T = R([
353
+ p = S = R([
354
354
  d("w3m-email-otp-widget")
355
355
  ], p);
356
- var J = function(a, e, t, n) {
356
+ var Q = function(a, e, t, n) {
357
357
  var o = arguments.length, i = o < 3 ? e : n === null ? n = Object.getOwnPropertyDescriptor(e, t) : n, r;
358
358
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, n);
359
359
  else for (var s = a.length - 1; s >= 0; s--) (r = a[s]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, t, i) : r(e, t)) || i);
@@ -402,7 +402,7 @@ let L = class extends p {
402
402
  };
403
403
  }
404
404
  };
405
- L = J([
405
+ L = Q([
406
406
  d("w3m-email-verify-otp-view")
407
407
  ], L);
408
408
  const X = E`
@@ -506,7 +506,7 @@ const Z = E`
506
506
  position: relative;
507
507
  }
508
508
  `;
509
- var D = function(a, e, t, n) {
509
+ var P = function(a, e, t, n) {
510
510
  var o = arguments.length, i = o < 3 ? e : n === null ? n = Object.getOwnPropertyDescriptor(e, t) : n, r;
511
511
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, n);
512
512
  else for (var s = a.length - 1; s >= 0; s--) (r = a[s]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, t, i) : r(e, t)) || i);
@@ -515,7 +515,7 @@ var D = function(a, e, t, n) {
515
515
  let b = class extends v {
516
516
  constructor() {
517
517
  var e, t;
518
- super(...arguments), this.formRef = B(), this.initialEmail = ((e = l.state.data) == null ? void 0 : e.email) ?? "", this.redirectView = (t = l.state.data) == null ? void 0 : t.redirectView, this.email = "", this.loading = !1;
518
+ super(...arguments), this.formRef = H(), this.initialEmail = ((e = l.state.data) == null ? void 0 : e.email) ?? "", this.redirectView = (t = l.state.data) == null ? void 0 : t.redirectView, this.email = "", this.loading = !1;
519
519
  }
520
520
  firstUpdated() {
521
521
  var e;
@@ -526,7 +526,7 @@ let b = class extends v {
526
526
  render() {
527
527
  return u`
528
528
  <wui-flex flexDirection="column" padding="m" gap="m">
529
- <form ${H(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
529
+ <form ${B(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
530
530
  <wui-email-input
531
531
  value=${this.initialEmail}
532
532
  .disabled=${this.loading}
@@ -598,13 +598,13 @@ let b = class extends v {
598
598
  }
599
599
  };
600
600
  b.styles = Z;
601
- D([
601
+ P([
602
602
  m()
603
603
  ], b.prototype, "email", void 0);
604
- D([
604
+ P([
605
605
  m()
606
606
  ], b.prototype, "loading", void 0);
607
- b = D([
607
+ b = P([
608
608
  d("w3m-update-email-wallet-view")
609
609
  ], b);
610
610
  var ee = function(a, e, t, n) {
@@ -667,7 +667,7 @@ var z = function(a, e, t, n) {
667
667
  else for (var s = a.length - 1; s >= 0; s--) (r = a[s]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, t, i) : r(e, t)) || i);
668
668
  return o > 3 && i && Object.defineProperty(e, t, i), i;
669
669
  };
670
- let A = class extends v {
670
+ let T = class extends v {
671
671
  constructor() {
672
672
  var e;
673
673
  super(), this.authConnector = h.getAuthConnector(), this.isEmailEnabled = (e = x.state.remoteFeatures) == null ? void 0 : e.email, this.isAuthEnabled = this.checkIfAuthEnabled(h.state.connectors), this.connectors = h.state.connectors, h.subscribeKey("connectors", (t) => {
@@ -694,16 +694,16 @@ let A = class extends v {
694
694
  };
695
695
  z([
696
696
  m()
697
- ], A.prototype, "connectors", void 0);
698
- A = z([
697
+ ], T.prototype, "connectors", void 0);
698
+ T = z([
699
699
  d("w3m-email-login-view")
700
- ], A);
700
+ ], T);
701
701
  export {
702
702
  L as W,
703
703
  I as a,
704
704
  b,
705
705
  F as c,
706
706
  j as d,
707
- A as e,
707
+ T as e,
708
708
  p as f
709
709
  };