@dcl/auth-site 4.11.10-22674067433.commit-ec9ee87 → 4.11.10
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/assets/1949206f0b8ec64d-qrlN31md.svg +9 -0
- package/assets/805322223c96be40-CKnEN-kZ.png +0 -0
- package/assets/{ConstantsUtil-ESae-Z7-.js → ConstantsUtil-p18SxHNb.js} +1 -1
- package/assets/{ContentfulRichText-BtJfWm5x.js → ContentfulRichText-CuUzDhK8.js} +1 -1
- package/assets/{ExchangeController-IT3Dhd87.js → ExchangeController-DzfUZs5x.js} +1 -1
- package/assets/{HelpersUtil-DSNS5n-9.js → HelpersUtil-XKCaotuk.js} +1 -1
- package/assets/NetworkUtil-sGYAtXqw.js +7 -0
- package/assets/{SwapController-yDy01m5V.js → SwapController-4W4ijrvf.js} +1 -1
- package/assets/{biconomy-B599Ur_0.js → biconomy-Dly9w0vY.js} +1 -1
- package/assets/brand-icons-Cu_C0hZ4.svg +1008 -0
- package/assets/brand-icons-F3SPCeH1.woff +0 -0
- package/assets/brand-icons-XL9sxUpA.woff2 +0 -0
- package/assets/brand-icons-sqJ2Pg7a.eot +0 -0
- package/assets/brand-icons-ubhWoxly.ttf +0 -0
- package/assets/ccip-B9aFL1MQ.js +1 -0
- package/assets/da0e2040ea4c51ef-rAUxngFb.svg +1 -0
- package/assets/{data-capture-CzsW3pB7.js → data-capture-tGGi1Ydy.js} +3 -3
- package/assets/{email-DWs9f9tH.js → email-hTjSyTyX.js} +6 -6
- package/assets/{embedded-wallet-P7U24FrG.js → embedded-wallet-BrB_4WzR.js} +6 -6
- package/assets/{engine-DAuziGro.js → engine-z9o8NNFN.js} +1 -1
- package/assets/extractIPFS-Dm5hYCcH.js +1 -0
- package/assets/{features--CaJUF7o.js → features-D-HmXfRu.js} +2 -2
- package/assets/flags-DOLqOU7Y.png +0 -0
- package/assets/fortmatic-DpLsx1s2.js +13 -0
- package/assets/{getInstalledModules-Bdsr8t_C.js → getInstalledModules-BxNMMrxI.js} +1 -1
- package/assets/icons-BOCtAERH.woff +0 -0
- package/assets/icons-CHzK1VD9.eot +0 -0
- package/assets/icons-D29ZQHHw.ttf +0 -0
- package/assets/icons-Du6TOHnR.woff2 +0 -0
- package/assets/icons-RwhydX30.svg +1518 -0
- package/assets/{if-defined-2xQLKahR.js → if-defined-BoFFMPLs.js} +1 -1
- package/assets/image1-_0ffTiKd.webp +0 -0
- package/assets/image10-I4vX--po.webp +0 -0
- package/assets/image2-sHeDDy_F.webp +0 -0
- package/assets/image3-B79JnaG7.webp +0 -0
- package/assets/image4-Cy2Bg8G8.webp +0 -0
- package/assets/image5-BwZ-6sYY.webp +0 -0
- package/assets/image6-DFi5BRnf.webp +0 -0
- package/assets/image7-CyRqcJTw.webp +0 -0
- package/assets/image8-DohHwcO9.webp +0 -0
- package/assets/image9-caIPOcpa.webp +0 -0
- package/assets/in-app-wallet-calls-C3aPhXtO.js +1 -0
- package/assets/{index-Dl7iro_s.js → index--wKrGngN.js} +1 -1
- package/assets/{index-DUoxxqna.js → index-8TMITg1r.js} +1 -1
- package/assets/index-B0fQnkQ5.js +248 -0
- package/assets/{index-MubCrWiB.js → index-B1qCZLvQ.js} +1 -1
- package/assets/index-B2UXqNqr.js +14 -0
- package/assets/{index-CzHm4Ry3.js → index-B3fadyTT.js} +3 -3
- package/assets/index-B5aC8E1X.css +1 -0
- package/assets/{index-EfYw_r-L.js → index-B729d3FM.js} +4 -4
- package/assets/index-BJ1WxAUM.js +7 -0
- package/assets/{index-vWAYjUUv.js → index-BSFhSoM_.js} +1 -1
- package/assets/{index-DJO0bodJ.js → index-BhaWASJT.js} +1 -1
- package/assets/{index-CUEaPFt-.js → index-BrOi7a3U.js} +3 -3
- package/assets/{index-DIWcFA1F.js → index-BsdLV5kJ.js} +1 -1
- package/assets/{index-ppPPH70g.js → index-BtZhKCqj.js} +4 -4
- package/assets/{index-CziCm94K.js → index-Bvny0Xgz.js} +1 -1
- package/assets/{index-D0cHggih.js → index-CCd5oS0s.js} +3 -3
- package/assets/index-COanpESA.js +425 -0
- package/assets/{index-BQsAkTBu.js → index-CVsaRRKm.js} +3 -3
- package/assets/index-C_pCrG4N.js +2 -0
- package/assets/{index-xFdcXlRb.js → index-Ccixd5c3.js} +1 -1
- package/assets/{index-Bv3VmA8e.js → index-D76LDvqK.js} +1 -1
- package/assets/{index-B9z9f635.js → index-DE30NxYx.js} +2 -2
- package/assets/{index-jq6mMx3J.js → index-DF-ZAXHc.js} +1 -1
- package/assets/{index-HAgxNzWE.js → index-DKWu_DOR.js} +1 -1
- package/assets/{index-VsMuUpAO.js → index-DWQfcLNQ.js} +1 -1
- package/assets/index-DdNA7FEA.js +20858 -0
- package/assets/index-Dh5xsOC8.js +13 -0
- package/assets/{index-CPXKpbtw.js → index-DhR4CWqo.js} +3 -3
- package/assets/{index-DdCktyEF.js → index-Dv6NX9VQ.js} +1 -1
- package/assets/{index-CRvDhax9.js → index-DvjRQRaG.js} +1 -1
- package/assets/{index-UvGAZXmw.js → index-DxXFLIUG.js} +4 -4
- package/assets/index-FZCkPsng.js +3 -0
- package/assets/index-T3ZzCX6S.js +4 -0
- package/assets/{index-CRA7VI9s.js → index-T74egyiU.js} +1 -1
- package/assets/{index-BsWozatx.js → index-U5jfZk1i.js} +1 -1
- package/assets/{index-BIUEtDdG.js → index-YOecdb0o.js} +1 -1
- package/assets/index-ZctKyjjk.js +1 -0
- package/assets/{index-CO5QKdxX.js → index-bKhmSsUt.js} +1 -1
- package/assets/{index-gcHRu1bF.js → index-ksqvpIH6.js} +1 -1
- package/assets/{index-L_5Cs_kx.js → index-l8aM--_F.js} +4 -4
- package/assets/{index-DAoSp5q5.js → index-zk2q_Q_G.js} +1 -1
- package/assets/networks-Clam15G5.js +4 -0
- package/assets/{onramp-WAW9ejhZ.js → onramp-9pmSlBnz.js} +1 -1
- package/assets/{openzeppelin-DV82z7lJ.js → openzeppelin-CCD6rP-X.js} +1 -1
- package/assets/outline-icons-BfdLr8tr.svg +366 -0
- package/assets/outline-icons-DD8jm0uy.ttf +0 -0
- package/assets/outline-icons-DInHoiqI.woff2 +0 -0
- package/assets/outline-icons-LX8adJ4n.eot +0 -0
- package/assets/outline-icons-aQ88nltS.woff +0 -0
- package/assets/{parse-typed-data-8DIRR0Kb.js → parse-typed-data-CQ7fMUke.js} +1 -1
- package/assets/passkeys-ClPCDmsq.js +1 -0
- package/assets/{pay-with-exchange-CNJhpLnE.js → pay-with-exchange-29qX9lth.js} +3 -3
- package/assets/{receive-ss1HRI3I.js → receive-BNr9rr8r.js} +3 -3
- package/assets/{ref-CoyvS0l-.js → ref-CfiuWBst.js} +1 -1
- package/assets/{resolveImplementation-C5lycJfC.js → resolveImplementation-DWNdXsgn.js} +1 -1
- package/assets/secp256k1-Cbm_E6WS.js +1 -0
- package/assets/{send-C4Og1BUJ.js → send-Db7vaGI-.js} +4 -4
- package/assets/send-eip712-transaction-rpuezGb0.js +1 -0
- package/assets/{send-gasless-transaction-DIQuGEL1.js → send-gasless-transaction-BMSa2txn.js} +2 -2
- package/assets/{socials-C7aTr6Px.js → socials-BHUNG0K3.js} +8 -8
- package/assets/{swaps-BDatuUE1.js → swaps-C9Q6lE1v.js} +1 -1
- package/assets/thirdweb-JZyWELEG.js +20 -0
- package/assets/{transactions-Do481Xcb.js → transactions-6g75FPKk.js} +2 -2
- package/assets/ui-DEQUo7uD.js +745 -0
- package/assets/ui-DzH-5xCG.css +346 -0
- package/assets/vendor-BhVAW1d5.js +59 -0
- package/assets/verifyHash-RVn4FTNf.js +35 -0
- package/assets/{w3m-modal-Cj2A1qC_.js → w3m-modal-CTfiBorR.js} +1 -1
- package/assets/web-connector-B09S69hZ.js +9 -0
- package/index.html +6 -5
- package/package.json +7 -7
- package/assets/NetworkUtil-BCvAceLL.js +0 -1
- package/assets/ccip-_ZVU0YUG.js +0 -1
- package/assets/extractIPFS-DgGO_4eF.js +0 -1
- package/assets/fortmatic-BouPZqQI.js +0 -13
- package/assets/in-app-wallet-calls-D8l_xpYN.js +0 -1
- package/assets/index-C0hHgKRI.js +0 -425
- package/assets/index-CA6Zy4Du.js +0 -7
- package/assets/index-CQzRvO-C.js +0 -1
- package/assets/index-D8AVDivV.js +0 -2
- package/assets/index-D9rT-G2z.js +0 -1
- package/assets/index-DPpJj3DF.js +0 -13
- package/assets/index-DRQzckTJ.js +0 -1
- package/assets/index-DvSlA4j0.js +0 -5
- package/assets/index-DvuTX_1c.css +0 -1
- package/assets/index-JH3zlM2a.js +0 -4
- package/assets/index-JRJx2NpU.js +0 -14
- package/assets/index-MkZbQyDw.js +0 -248
- package/assets/index-fG1WBhYz.js +0 -20895
- package/assets/networks-ZUADr5kB.js +0 -3
- package/assets/passkeys-BOJeUfAK.js +0 -1
- package/assets/secp256k1-DW9CEMKa.js +0 -1
- package/assets/send-eip712-transaction-C2PvhNcm.js +0 -1
- package/assets/successAnimation_Lottie-BpyTLLuX.js +0 -1
- package/assets/thirdweb-juEAwwxR.js +0 -20
- package/assets/ui-BsoeejM4.js +0 -762
- package/assets/vendor-C-guZ9WP.js +0 -59
- package/assets/web-connector-DIFP2_dO.js +0 -9
package/package.json
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/auth-site",
|
|
3
|
-
"version": "4.11.10
|
|
3
|
+
"version": "4.11.10",
|
|
4
4
|
"description": "Auth website",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/decentraland/auth.git"
|
|
12
|
-
},
|
|
13
9
|
"keywords": [
|
|
14
10
|
"decentraland",
|
|
15
11
|
"profile",
|
|
@@ -17,6 +13,10 @@
|
|
|
17
13
|
],
|
|
18
14
|
"author": "Decentraland",
|
|
19
15
|
"license": "Apache-2.0",
|
|
20
|
-
"
|
|
21
|
-
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/decentraland/auth.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://cdn.decentraland.org/@dcl/auth-site/4.11.10",
|
|
21
|
+
"commit": "1271d9160c1124bf7ccaf5d756cb050e9cd3f06e"
|
|
22
22
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as a}from"./thirdweb-juEAwwxR.js";var o={};const n={WC_NAME_SUFFIX:".reown.id",WC_NAME_SUFFIX_LEGACY:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CONNECTOR_ID:{WALLET_CONNECT:"walletConnect",INJECTED:"injected",WALLET_STANDARD:"announced",COINBASE:"coinbaseWallet",COINBASE_SDK:"coinbaseWalletSDK",BASE_ACCOUNT:"baseAccount",SAFE:"safe",LEDGER:"ledger",OKX:"okx",EIP6963:"eip6963",AUTH:"AUTH"},CONNECTOR_NAMES:{AUTH:"Auth"},AUTH_CONNECTOR_SUPPORTED_CHAINS:["eip155","solana"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:"eip155",SOLANA:"solana",POLKADOT:"polkadot",BITCOIN:"bip122",TON:"ton"},CHAIN_NAME_MAP:{eip155:"EVM Networks",solana:"Solana",polkadot:"Polkadot",bip122:"Bitcoin",cosmos:"Cosmos",sui:"Sui",stacks:"Stacks",ton:"TON"},ADAPTER_TYPES:{BITCOIN:"bitcoin",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",TON:"ton"},USDT_CONTRACT_ADDRESSES:["0xdac17f958d2ee523a2206206994597c13d831ec7","0xc2132d05d31c914a87c6611c10748aeb04b58e8f","0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7","0x919C1c267BC06a7039e03fcc2eF738525769109c","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","0x55d398326f99059fF775485246999027B3197955","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"],SOLANA_SPL_TOKEN_ADDRESSES:{SOL:"So11111111111111111111111111111111111111112"},HTTP_STATUS_CODES:{SERVER_ERROR:500,TOO_MANY_REQUESTS:429,SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:"Unknown Network",SECURE_SITE_SDK_ORIGIN:(typeof a<"u"&&typeof o<"u"?o.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",REMOTE_FEATURES_ALERTS:{MULTI_WALLET_NOT_ENABLED:{DEFAULT:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com."},CONNECTIONS_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnections hook."},CONNECTION_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnection hook."}},HEADLESS_NOT_ENABLED:{DEFAULT:{displayMessage:"",debugMessage:"Headless support is not enabled. Please enable it with the features.headless option in the AppKit configuration and make sure your current plan supports it."}}},IS_DEVELOPMENT:typeof a<"u"&&!1,DEFAULT_ALLOWED_ANCESTORS:["http://localhost:*","https://localhost:*","http://127.0.0.1:*","https://127.0.0.1:*","https://*.pages.dev","https://*.vercel.app","https://*.ngrok-free.app","https://secure-mobile.walletconnect.com","https://secure-mobile.walletconnect.org"],METMASK_CONNECTOR_NAME:"MetaMask",TRUST_CONNECTOR_NAME:"Trust Wallet",SOLFLARE_CONNECTOR_NAME:"Solflare",PHANTOM_CONNECTOR_NAME:"Phantom",COIN98_CONNECTOR_NAME:"Coin98",MAGIC_EDEN_CONNECTOR_NAME:"Magic Eden",BACKPACK_CONNECTOR_NAME:"Backpack",BITGET_CONNECTOR_NAME:"Bitget Wallet",FRONTIER_CONNECTOR_NAME:"Frontier",XVERSE_CONNECTOR_NAME:"Xverse Wallet",LEATHER_CONNECTOR_NAME:"Leather",OKX_CONNECTOR_NAME:"OKX Wallet",BINANCE_CONNECTOR_NAME:"Binance Wallet",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},CONNECTOR_TYPE_EXTERNAL:"EXTERNAL",CONNECTOR_TYPE_WALLET_CONNECT:"WALLET_CONNECT",CONNECTOR_TYPE_INJECTED:"INJECTED",CONNECTOR_TYPE_ANNOUNCED:"ANNOUNCED",CONNECTOR_TYPE_AUTH:"AUTH",CONNECTOR_TYPE_MULTI_CHAIN:"MULTI_CHAIN",CONNECTOR_TYPE_W3M_AUTH:"AUTH"},T={caipNetworkIdToNumber(e){return e?Number(e.split(":")[1]):void 0},parseEvmChainId(e){return typeof e=="string"?this.caipNetworkIdToNumber(e):e},getNetworksByNamespace(e,t){return(e==null?void 0:e.filter(E=>E.chainNamespace===t))||[]},getFirstNetworkByNamespace(e,t){return this.getNetworksByNamespace(e,t)[0]},getNetworkNameByCaipNetworkId(e,t){var N;if(!t)return;const E=e.find(_=>_.caipNetworkId===t);if(E)return E.name;const[s]=t.split(":");return((N=n.CHAIN_NAME_MAP)==null?void 0:N[s])||void 0}},C=["eip155","solana","polkadot","bip122","cosmos","sui","stacks"];export{C as A,n as C,T as N};
|
package/assets/ccip-_ZVU0YUG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a7 as u,d0 as y,cO as w,br as g,bH as k,d1 as L,d2 as O,d3 as E,bS as x,bv as R,aL as m,bV as M}from"./index-fG1WBhYz.js";import"./thirdweb-juEAwwxR.js";import"./ui-BsoeejM4.js";import"./vendor-C-guZ9WP.js";class S extends u{constructor({callbackSelector:r,cause:a,data:n,extraData:i,sender:f,urls:t}){var o;super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],(o=a.metaMessages)!=null&&o.length?"":[],"Offchain Gateway Call:",t&&[" Gateway URL(s):",...t.map(d=>` ${y(d)}`)],` Sender: ${f}`,` Data: ${n}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat(),name:"OffchainLookupError"})}}class $ extends u{constructor({result:r,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${y(a)}`,`Response: ${w(r)}`],name:"OffchainLookupResponseMalformedError"})}}class q extends u{constructor({sender:r,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const U="0x556f1830",T={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function j(c,{blockNumber:r,blockTag:a,data:n,to:i}){const{args:f}=g({data:n,abi:[T]}),[t,o,d,l,s]=f,{ccipRead:e}=c,h=e&&typeof(e==null?void 0:e.request)=="function"?e.request:C;try{if(!k(i,t))throw new q({sender:t,to:i});const p=o.includes(L)?await O({data:d,ccipRequest:h}):await h({data:d,sender:t,urls:o}),{data:b}=await E(c,{blockNumber:r,blockTag:a,data:x([l,R([{type:"bytes"},{type:"bytes"}],[p,s])]),to:i});return b}catch(p){throw new S({callbackSelector:l,cause:p,data:n,extraData:s,sender:t,urls:o})}}async function C({data:c,sender:r,urls:a}){var i;let n=new Error("An unknown error occurred.");for(let f=0;f<a.length;f++){const t=a[f],o=t.includes("{data}")?"GET":"POST",d=o==="POST"?{data:c,sender:r}:void 0,l=o==="POST"?{"Content-Type":"application/json"}:{};try{const s=await fetch(t.replace("{sender}",r.toLowerCase()).replace("{data}",c),{body:JSON.stringify(d),headers:l,method:o});let e;if((i=s.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?e=(await s.json()).data:e=await s.text(),!s.ok){n=new m({body:d,details:e!=null&&e.error?w(e.error):s.statusText,headers:s.headers,status:s.status,url:t});continue}if(!M(e)){n=new $({result:e,url:t});continue}return e}catch(s){n=new m({body:d,details:s.message,url:t})}}throw n}export{C as ccipRequest,j as offchainLookup,T as offchainLookupAbiItem,U as offchainLookupSignature};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as _,H as L}from"./thirdweb-juEAwwxR.js";const V="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",U=V.length,M=V.charAt(0),z=Math.log(256)/Math.log(U);function F(t){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length===0)return"";let e=0,i=0,n=0;const s=t.length;for(;n!==s&&t[n]===0;)n++,e++;const c=(s-n)*z+1>>>0,a=new Uint8Array(c);for(;n!==s;){let d=t[n]||0,w=0;for(let h=c-1;(d!==0||w<i)&&h!==-1;h--,w++)d+=256*(a[h]||0)>>>0,a[h]=d%U>>>0,d=d/U>>>0;if(d!==0)throw new Error("Non-zero carry");i=w,n++}let l=c-i;for(;l!==c&&a[l]===0;)l++;let u=M.repeat(e);for(;l<c;++l)u+=V.charAt(a[l]||0);return u}let o,E,r=0,j={},b,N;const D=0;let C=0,S,R,H;const $={mapsAsObjects:!0,useRecords:!1};function I(t){let e;if(t<16&&(e=T(t)))return e;if(t>64&&decoder)return decoder.decode(o.subarray(r,r+=t));const i=r+t,n=[];for(e="";r<i;){const s=o[r++];if(!(s&128))n.push(s);else if((s&224)===192){const c=o[r++]&63;n.push((s&31)<<6|c)}else if((s&240)===224){const c=o[r++]&63,a=o[r++]&63;n.push((s&31)<<12|c<<6|a)}else if((s&248)===240){const c=o[r++]&63,a=o[r++]&63,l=o[r++]&63;let u=(s&7)<<18|c<<12|a<<6|l;u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u)}else n.push(s);n.length>=4096&&(e+=x.apply(String,n),n.length=0)}return n.length>0&&(e+=x.apply(String,n)),e}class O{constructor(){Object.assign(this,$)}decodeKey(e){return e}decode(e,i=-1){E=i>-1?i:e.length,r=0,C=0,N=null,S=null,o=e;try{H=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(n){throw o=null,e instanceof Uint8Array?n:new Error(`Source must be a Uint8Array or Buffer but was a ${e&&typeof e=="object"?e.constructor.name:typeof e}`)}return this instanceof O?(j=this,this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),(!b||b.length>0)&&(b=[])):(j=$,(!b||b.length>0)&&(b=[])),v()}}function v(){try{const t=g();if(S){if(r>=S.postBundlePosition){const e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}r=S.postBundlePosition,S=null}if(r===E)b=null,o=null,R&&(R=null);else if(r>E){const e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}else throw new Error("Data read, but end of buffer not reached");return t}catch(t){throw q(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer"))&&(t.incomplete=!0),t}}function g(){let t=o[r++];const e=t>>5;if(t=t&31,t>23)switch(t){case 24:t=o[r++];break;default:throw new Error(`Unknown token ${t}`)}switch(e){case 0:return t;case 1:return~t;case 2:return W(t);case 3:if(C>=r)return N.slice(r-D,(r+=t)-D);if(C===0&&E<140&&t<32){const i=t<16?T(t):K(t);if(i!==null)return i}return I(t);case 4:{const i=new Array(t);for(let n=0;n<t;n++)i[n]=g();return i}case 5:{const i={};for(let n=0;n<t;n++)i[J(g())]=g();return i}default:if(Number.isNaN(t)){const i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error(`Unknown CBOR token ${t}`)}}function J(t){if(typeof t=="string")return t==="__proto__"?"__proto_":t;if(typeof t!="object")return t.toString();throw new Error(`Invalid property name type ${typeof t}`)}const x=String.fromCharCode;function K(t){const e=r,i=new Array(t);for(let n=0;n<t;n++){const s=o[r++];if((s&128)>0){r=e;return}i[n]=s}return x.apply(String,i)}function T(t){if(t<4){if(t<2){if(t===0)return"";const k=o[r++];if((k&128)>1){r-=1;return}return x(k)}const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=2;return}if(t<3)return x(f,p);const y=o[r++];if((y&128)>0){r-=3;return}return x(f,p,y)}const e=o[r++],i=o[r++],n=o[r++],s=o[r++];if((e&128)>0||(i&128)>0||(n&128)>0||(s&128)>0){r-=4;return}if(t<6){if(t===4)return x(e,i,n,s);const f=o[r++];if((f&128)>0){r-=5;return}return x(e,i,n,s,f)}if(t<8){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=6;return}if(t<7)return x(e,i,n,s,f,p);const y=o[r++];if((y&128)>0){r-=7;return}return x(e,i,n,s,f,p,y)}const c=o[r++],a=o[r++],l=o[r++],u=o[r++];if((c&128)>0||(a&128)>0||(l&128)>0||(u&128)>0){r-=8;return}if(t<10){if(t===8)return x(e,i,n,s,c,a,l,u);const f=o[r++];if((f&128)>0){r-=9;return}return x(e,i,n,s,c,a,l,u,f)}if(t<12){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=10;return}if(t<11)return x(e,i,n,s,c,a,l,u,f,p);const y=o[r++];if((y&128)>0){r-=11;return}return x(e,i,n,s,c,a,l,u,f,p,y)}const d=o[r++],w=o[r++],h=o[r++],m=o[r++];if((d&128)>0||(w&128)>0||(h&128)>0||(m&128)>0){r-=12;return}if(t<14){if(t===12)return x(e,i,n,s,c,a,l,u,d,w,h,m);const f=o[r++];if((f&128)>0){r-=13;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,f)}const A=o[r++],B=o[r++];if((A&128)>0||(B&128)>0){r-=14;return}if(t<15)return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B);const P=o[r++];if((P&128)>0){r-=15;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B,P)}function W(t){return j.copyBuffers?Uint8Array.prototype.slice.call(o,r,r+=t):o.subarray(r,r+=t)}function q(){o=null,R=null,b=null}const G=new Array(147);for(let t=0;t<256;t++)G[t]=+`1e${Math.floor(45.15-t*.30103)}`;const Q=new O,X=Q.decode;function Y(t){return _(t,{strict:!1})?t:`0x${t}`}function tt(t){const e=L(Y(t)),i=e[e.length-2]*256+e[e.length-1],n=e.length-2-i;if(n<0||n>e.length)return;const s=e.slice(n,-2),c=X(s);if("ipfs"in c)return`ipfs://${F(c.ipfs)}`}export{tt as extractIPFSUri};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{g as $}from"./thirdweb-juEAwwxR.js";var V,J;function X(){return J||(J=1,V=function(y){var b={};function a(r){if(b[r])return b[r].exports;var o=b[r]={i:r,l:!1,exports:{}};return y[r].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=y,a.c=b,a.d=function(r,o,l){a.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:l})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,o){if(1&o&&(r=a(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var u in r)a.d(l,u,(function(R){return r[R]}).bind(null,u));return l},a.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(o,"a",o),o},a.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},a.p="",a(a.s=3)}([function(y,b){y.exports=function(a){return a&&a.__esModule?a:{default:a}}},function(y,b){y.exports=function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}},function(y,b,a){function r(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(b,"__esModule",{value:!0}),b.sendAsyncWrapper=function(o,l){var u=this;return new Promise(function(R,x){u.sendAsync({jsonrpc:"2.0",id:r(),method:o,params:l||[]},function(T,A){T?x(T):R(A.result)})})},b.sendFortmaticAsyncWrapper=function(o){var l=this;return new Promise(function(u,R){l.getProvider().sendFortmaticAsync(o,function(x,T){x?R(x):u(T?T.result:{})})})},b.randomId=r,b.findExistingResponse=function(o,l){for(var u=0;u<o.length;u++)if(o[u].id===l)return o[u];return null}},function(y,b,a){y.exports=a(4)},function(y,b,a){var r=a(0),o=r(a(1)),l=r(a(5)),u=a(2),R="fm_composeSend",x="fm_logout",T="fm_get_balances",A="fm_get_transactions",w="fm_is_logged_in",P="fm_accountSettings",n="fm_deposit",s="fm_get_user",c="fm_configure",f={};y.exports=function g(_,O,I){var m=this;if((0,o.default)(this,g),this.fortmaticClient="https://x2.fortmatic.com",!_)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=_,this.options=I,this.ethNetwork=O,this.queryParams=btoa(JSON.stringify({API_KEY:_,ETH_NETWORK:O})),this.transactions={send:function(h,M){var C=new v(R,{to:h.to,value:h.amount});m.getProvider().sendFortmaticAsync(C,M)}},this.getProvider=function(){return f["fortmatic-".concat(m.queryParams)]||(f["fortmatic-".concat(m.queryParams)]=new l.default(m.fortmaticClient,{API_KEY:_,ETH_NETWORK:O})),f["fortmatic-".concat(m.queryParams)]},this.user={login:function(){return m.getProvider().enable()},logout:function(){m.getProvider().account=null,m.getProvider().network=null;var h=new v(x);return u.sendFortmaticAsyncWrapper.call(m,h)},getUser:function(){var h=new v(s);return u.sendFortmaticAsyncWrapper.call(m,h)},getBalances:function(){var h=new v(T);return u.sendFortmaticAsyncWrapper.call(m,h)},getTransactions:function(){var h=new v(A);return u.sendFortmaticAsyncWrapper.call(m,h)},isLoggedIn:function(){var h=new v(w);return u.sendFortmaticAsyncWrapper.call(m,h)},settings:function(){var h=new v(P);return u.sendFortmaticAsyncWrapper.call(m,h)},deposit:function(h){var M=new v(n,h);return u.sendFortmaticAsyncWrapper.call(m,M)}},this.configure=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=new v(c);return M.params=[h],u.sendFortmaticAsyncWrapper.call(m,M)}};var v=function g(_,O){(0,o.default)(this,g),this.id=(0,u.randomId)(),this.method=_,this.params=O?[O]:[{}]}},function(y,b,a){var r=a(0);Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var o=r(a(6)),l=r(a(9)),u=r(a(1)),R=r(a(10)),x=a(11),T=r(a(12)),A=a(2),w=function(){function P(n,s){if((0,u.default)(this,P),this.fortmaticClient=n,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!s.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:s.API_KEY,ETH_NETWORK:s.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:x.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,R.default)(P,[{key:"constructPostMessage",value:function(){var n=this;Object.keys(this.postMessages).map(function(s){n.postMessages[s]+="-".concat(n.queryParams)})}},{key:"createOverlay",value:function(){var n=this;return new Promise(function(s,c){var f=function(){if(function(){var O=!0,I=!1,m=void 0;try{for(var h,M=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(O=(h=M.next()).done);O=!0)if(h.value.src.includes(n.queryParams))return!1}catch(C){I=!0,m=C}finally{try{O||M.return==null||M.return()}finally{if(I)throw m}}return!0}()){var v=document.createElement("style");v.innerHTML=T.default.css,v.type="text/css",document.head.appendChild(v);var g=document.createElement("iframe");g.className="fortmatic-iframe",g.src="".concat(n.fortmaticClient,"/send?params=").concat(n.queryParams),document.body.appendChild(g);var _=document.createElement("img");_.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(_),s({iframe:g})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?f():window.addEventListener("load",f.bind(n),!1)})}},{key:"showOverlay",value:function(){var n=(0,l.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="block";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var n=(0,l.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="none";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"sendAsync",value:function(n,s){n.length>0?this.enqueue({payload:{id:(0,A.randomId)(),batch:n.map(function(c){return c.id=(0,A.randomId)(),c}),method:"eth_batchRequest"},cb:s}):this.enqueue({payload:n,cb:s})}},{key:"sendFortmaticAsync",value:function(n,s){this.enqueue({payload:n,cb:s,isNative:!0})}},{key:"send",value:function(n,s){if(typeof n=="string")return A.sendAsyncWrapper.call(this,n,s);if(!s){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(n,function(){});var c={};switch(n.method){case"eth_accounts":c=this.account?[this.account]:[];break;case"eth_coinbase":c=this.account;break;case"net_version":c=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":c=!0;break;default:c={}}return{id:n.id,jsonrpc:n.jsonrpc,result:c}}this.sendAsync(n,s)}},{key:"enqueue",value:function(n){this.queue.push(n),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var n=(0,l.default)(o.default.mark(function s(){var c,f,v,g=this;return o.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.queue.length!==0){_.next=2;break}return _.abrupt("return");case 2:if(!(c=this.queue.shift())){_.next=11;break}return f=c.payload,v=c.cb,f.id=(0,A.randomId)(),_.next=9,this.postMessage(c.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,c.payload);case 9:f.batch&&f.batch.length>0?(f.batch.forEach(function(O){g.requests[O.id]={parentId:f.id,payload:O,cb:function(I,m){var h=g.requests[f.id].batchResponse;if(I&&I.response&&!(0,A.findExistingResponse)(h,I.response.id))throw h.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),g.requests[f.id].cb(null,h),I.response;if(m&&m.result&&!(0,A.findExistingResponse)(h,m.id))return h.push(m);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[f.id]={payload:f,cb:v,batchResponse:[]}):this.requests[f.id]={payload:f,cb:v},this.dequeue();case 11:case"end":return _.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"postMessage",value:function(){var n=(0,l.default)(o.default.mark(function s(c,f){var v;return o.default.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,this.overlay;case 2:if(!(v=g.sent).iframe.contentWindow){g.next=7;break}v.iframe.contentWindow.postMessage({msgType:c,payload:f},"*"),g.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return g.stop()}},s,this)}));return function(s,c){return n.apply(this,arguments)}}()},{key:"enable",value:function(){return A.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var n=this;window.addEventListener("message",function(s){if(s.origin===n.fortmaticClient){var c=s.data.response?s.data.response.id:null;switch(s.data.msgType){case n.postMessages.FORTMATIC_OVERLAY_READY:n.overlayReady=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HANDLE_RESPONSE:try{n.requests[c].cb(null,s.data.response);var f=n.requests[c].parentId;f&&n.requests[f].payload.batch.length===n.requests[f].batchResponse.length&&n.requests[f].cb(null,n.requests[f].batchResponse),n.requests[c].payload.method==="eth_accounts"?n.account=s.data.response.result[0]:n.requests[c].payload.method==="eth_coinbase"?n.account=s.data.response.result:n.requests[c].payload.method==="net_version"&&(n.network=s.data.response.result)}catch{}n.isLoggedIn=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HIDE_OVERLAY:n.hideOverlay();break;case n.postMessages.FORTMATIC_SHOW_OVERLAY:n.showOverlay();break;case n.postMessages.FORTMATIC_USER_LOGOUT:n.account=null,n.network=null,n.isLoggedIn=!1;break;case n.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw n.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case n.postMessages.FORTMATIC_USER_DENIED:if(c){var v=s.data.response&&s.data.response.message?s.data.response.message:"Fortmatic: Modal was closed without executing action!",g=s.data.response&&s.data.response.code?s.data.response.code:1;n.requests[c].cb({message:v,code:g,response:s.data.response})}else n.queue.forEach(function(_){return _.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});n.dequeue()}}})}}]),P}();b.default=w},function(y,b,a){y.exports=a(7)},function(y,b,a){var r=function(){return this||typeof self=="object"&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,l=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,y.exports=a(8),o)r.regeneratorRuntime=l;else try{delete r.regeneratorRuntime}catch{r.regeneratorRuntime=void 0}},function(y,b){(function(a){var r,o=Object.prototype,l=o.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},R=u.iterator||"@@iterator",x=u.asyncIterator||"@@asyncIterator",T=u.toStringTag||"@@toStringTag",A=typeof y=="object",w=a.regeneratorRuntime;if(w)A&&(y.exports=w);else{(w=a.regeneratorRuntime=A?y.exports:{}).wrap=I;var P="suspendedStart",n="suspendedYield",s="executing",c="completed",f={},v={};v[R]=function(){return this};var g=Object.getPrototypeOf,_=g&&g(g(G([])));_&&_!==o&&l.call(_,R)&&(v=_);var O=C.prototype=h.prototype=Object.create(v);M.prototype=O.constructor=C,C.constructor=M,C[T]=M.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===M||(e.displayName||e.name)==="GeneratorFunction")},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,T in t||(t[T]="GeneratorFunction")),t.prototype=Object.create(O),t},w.awrap=function(t){return{__await:t}},B(U.prototype),U.prototype[x]=function(){return this},w.AsyncIterator=U,w.async=function(t,e,d,p){var i=new U(I(t,e,d,p));return w.isGeneratorFunction(e)?i:i.next().then(function(F){return F.done?F.value:i.next()})},B(O),O[T]="Generator",O[R]=function(){return this},O.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var d in t)e.push(d);return e.reverse(),function p(){for(;e.length;){var i=e.pop();if(i in t)return p.value=i,p.done=!1,p}return p.done=!0,p}},w.values=G,K.prototype={constructor:K,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(Y),!t)for(var e in this)e.charAt(0)==="t"&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function d(W,E){return F.type="throw",F.arg=t,e.next=W,E&&(e.method="next",e.arg=r),!!E}for(var p=this.tryEntries.length-1;p>=0;--p){var i=this.tryEntries[p],F=i.completion;if(i.tryLoc==="root")return d("end");if(i.tryLoc<=this.prev){var j=l.call(i,"catchLoc"),N=l.call(i,"finallyLoc");if(j&&N){if(this.prev<i.catchLoc)return d(i.catchLoc,!0);if(this.prev<i.finallyLoc)return d(i.finallyLoc)}else if(j){if(this.prev<i.catchLoc)return d(i.catchLoc,!0)}else{if(!N)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return d(i.finallyLoc)}}}},abrupt:function(t,e){for(var d=this.tryEntries.length-1;d>=0;--d){var p=this.tryEntries[d];if(p.tryLoc<=this.prev&&l.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var i=p;break}}i&&(t==="break"||t==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var F=i?i.completion:{};return F.type=t,F.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(F)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.finallyLoc===t)return this.complete(d.completion,d.afterLoc),Y(d),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.tryLoc===t){var p=d.completion;if(p.type==="throw"){var i=p.arg;Y(d)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,d){return this.delegate={iterator:G(t),resultName:e,nextLoc:d},this.method==="next"&&(this.arg=r),f}}}function I(t,e,d,p){var i=e&&e.prototype instanceof h?e:h,F=Object.create(i.prototype),j=new K(p||[]);return F._invoke=function(N,W,E){var k=P;return function(S,D){if(k===s)throw new Error("Generator is already running");if(k===c){if(S==="throw")throw D;return z()}for(E.method=S,E.arg=D;;){var H=E.delegate;if(H){var q=Q(H,E);if(q){if(q===f)continue;return q}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(k===P)throw k=c,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);k=s;var L=m(N,W,E);if(L.type==="normal"){if(k=E.done?c:n,L.arg===f)continue;return{value:L.arg,done:E.done}}L.type==="throw"&&(k=c,E.method="throw",E.arg=L.arg)}}}(t,d,j),F}function m(t,e,d){try{return{type:"normal",arg:t.call(e,d)}}catch(p){return{type:"throw",arg:p}}}function h(){}function M(){}function C(){}function B(t){["next","throw","return"].forEach(function(e){t[e]=function(d){return this._invoke(e,d)}})}function U(t){var e;this._invoke=function(d,p){function i(){return new Promise(function(F,j){(function N(W,E,k,S){var D=m(t[W],t,E);if(D.type!=="throw"){var H=D.arg,q=H.value;return q&&typeof q=="object"&&l.call(q,"__await")?Promise.resolve(q.__await).then(function(L){N("next",L,k,S)},function(L){N("throw",L,k,S)}):Promise.resolve(q).then(function(L){H.value=L,k(H)},function(L){return N("throw",L,k,S)})}S(D.arg)})(d,p,F,j)})}return e=e?e.then(i,i):i()}}function Q(t,e){var d=t.iterator[e.method];if(d===r){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=r,Q(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var p=m(d,t.iterator,e.arg);if(p.type==="throw")return e.method="throw",e.arg=p.arg,e.delegate=null,f;var i=p.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=r),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function Z(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Z,this),this.reset(!0)}function G(t){if(t){var e=t[R];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var d=-1,p=function i(){for(;++d<t.length;)if(l.call(t,d))return i.value=t[d],i.done=!1,i;return i.value=r,i.done=!0,i};return p.next=p}}return{next:z}}function z(){return{value:r,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(y,b){function a(r,o,l,u,R,x,T){try{var A=r[x](T),w=A.value}catch(P){return void l(P)}A.done?o(w):Promise.resolve(w).then(u,R)}y.exports=function(r){return function(){var o=this,l=arguments;return new Promise(function(u,R){var x=r.apply(o,l);function T(w){a(x,u,R,T,A,"next",w)}function A(w){a(x,u,R,T,A,"throw",w)}T(void 0)})}}},function(y,b){function a(r,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}y.exports=function(r,o,l){return o&&a(r.prototype,o),l&&a(r,l),r}},function(y){y.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(y,b,a){b.css=`
|
|
2
|
-
.fortmatic-iframe {
|
|
3
|
-
display: none;
|
|
4
|
-
position: fixed;
|
|
5
|
-
top: 0;
|
|
6
|
-
right: 0;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
border: none;
|
|
10
|
-
border-radius: 0;
|
|
11
|
-
z-index: 2147483647;
|
|
12
|
-
}
|
|
13
|
-
`}])),V}var ee=X();const te=$(ee),ne=Object.freeze(Object.defineProperty({__proto__:null,default:te},Symbol.toStringTag,{value:"Module"}));export{ne as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{L as h,b as p,e as m,r as b,s as f,d as g}from"./thirdweb-juEAwwxR.js";const i=new h(1e3);async function H(o){const{account:a,calls:r}=o,e=r.map(t=>({...t,chain:o.chain})),s=[],n=b(65);if(i.set(n,s),a.sendBatchTransaction){const t=await f({account:a,transactions:e});s.push(t.transactionHash),i.set(n,s)}else for(const t of e){const l=await g({account:a,transaction:t});s.push(l.transactionHash),i.set(n,s)}return n}async function T(o){const{chain:a,client:r,id:e}=o,s=i.get(e);if(!s)throw new Error("Failed to get calls status, unknown bundle id");const n=p({chain:a,client:r});let t="success";const l=await Promise.all(s.map(d=>m(n,{hash:d}).then(c=>({blockHash:c.blockHash,blockNumber:c.blockNumber,gasUsed:c.gasUsed,logs:c.logs.map(u=>({address:u.address,data:u.data,topics:u.topics})),status:c.status,transactionHash:c.transactionHash})).catch(()=>(t="pending",null))));return{atomic:!1,chainId:a.id,id:e,receipts:l.filter(d=>d!==null),status:t,statusCode:200,version:"2.0.0"}}export{T as inAppWalletGetCallsStatus,H as inAppWalletSendCalls};
|
package/assets/index-C0hHgKRI.js
DELETED
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
import{m as oe,o as se,q as w,r as Ce,C as pe,ac as F,a as xe,R as Fe,O as Re,E as Ne,y as Le,W as je}from"./index-MkZbQyDw.js";import{U as Te,n as I,r as Q,c as ae}from"./index-B9z9f635.js";import{g as ye}from"./thirdweb-juEAwwxR.js";import"./index-CziCm94K.js";import"./index-VsMuUpAO.js";import{o as ke}from"./if-defined-2xQLKahR.js";import"./index-jq6mMx3J.js";import"./index-vWAYjUUv.js";var me={exports:{}},ze=me.exports,Ie;function Ue(){return Ie||(Ie=1,function(e,t){(function(i,r){e.exports=r()})(ze,function(){var i=1e3,r=6e4,o=36e5,n="millisecond",s="second",u="minute",g="hour",p="day",y="week",$="month",j="quarter",D="year",R="date",Y="Invalid Date",X=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ee=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,te={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(h){var l=["th","st","nd","rd"],a=h%100;return"["+h+(l[(a-20)%10]||l[a]||l[0])+"]"}},ie=function(h,l,a){var d=String(h);return!d||d.length>=l?h:""+Array(l+1-d.length).join(a)+h},q={s:ie,z:function(h){var l=-h.utcOffset(),a=Math.abs(l),d=Math.floor(a/60),c=a%60;return(l<=0?"+":"-")+ie(d,2,"0")+":"+ie(c,2,"0")},m:function h(l,a){if(l.date()<a.date())return-h(a,l);var d=12*(a.year()-l.year())+(a.month()-l.month()),c=l.clone().add(d,$),m=a-c<0,f=l.clone().add(d+(m?-1:1),$);return+(-(d+(a-c)/(m?c-f:f-c))||0)},a:function(h){return h<0?Math.ceil(h)||0:Math.floor(h)},p:function(h){return{M:$,y:D,w:y,d:p,D:R,h:g,m:u,s,ms:n,Q:j}[h]||String(h||"").toLowerCase().replace(/s$/,"")},u:function(h){return h===void 0}},S="en",O={};O[S]=te;var V="$isDayjsObject",B=function(h){return h instanceof le||!(!h||!h[V])},ce=function h(l,a,d){var c;if(!l)return S;if(typeof l=="string"){var m=l.toLowerCase();O[m]&&(c=m),a&&(O[m]=a,c=m);var f=l.split("-");if(!c&&f.length>1)return h(f[0])}else{var v=l.name;O[v]=l,c=v}return!d&&c&&(S=c),c||!d&&S},_=function(h,l){if(B(h))return h.clone();var a=typeof l=="object"?l:{};return a.date=h,a.args=arguments,new le(a)},x=q;x.l=ce,x.i=B,x.w=function(h,l){return _(h,{locale:l.$L,utc:l.$u,x:l.$x,$offset:l.$offset})};var le=function(){function h(a){this.$L=ce(a.locale,null,!0),this.parse(a),this.$x=this.$x||a.x||{},this[V]=!0}var l=h.prototype;return l.parse=function(a){this.$d=function(d){var c=d.date,m=d.utc;if(c===null)return new Date(NaN);if(x.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var f=c.match(X);if(f){var v=f[2]-1||0,b=(f[7]||"0").substring(0,3);return m?new Date(Date.UTC(f[1],v,f[3]||1,f[4]||0,f[5]||0,f[6]||0,b)):new Date(f[1],v,f[3]||1,f[4]||0,f[5]||0,f[6]||0,b)}}return new Date(c)}(a),this.init()},l.init=function(){var a=this.$d;this.$y=a.getFullYear(),this.$M=a.getMonth(),this.$D=a.getDate(),this.$W=a.getDay(),this.$H=a.getHours(),this.$m=a.getMinutes(),this.$s=a.getSeconds(),this.$ms=a.getMilliseconds()},l.$utils=function(){return x},l.isValid=function(){return this.$d.toString()!==Y},l.isSame=function(a,d){var c=_(a);return this.startOf(d)<=c&&c<=this.endOf(d)},l.isAfter=function(a,d){return _(a)<this.startOf(d)},l.isBefore=function(a,d){return this.endOf(d)<_(a)},l.$g=function(a,d,c){return x.u(a)?this[d]:this.set(c,a)},l.unix=function(){return Math.floor(this.valueOf()/1e3)},l.valueOf=function(){return this.$d.getTime()},l.startOf=function(a,d){var c=this,m=!!x.u(d)||d,f=x.p(a),v=function(P,A){var z=x.w(c.$u?Date.UTC(c.$y,A,P):new Date(c.$y,A,P),c);return m?z:z.endOf(p)},b=function(P,A){return x.w(c.toDate()[P].apply(c.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(A)),c)},T=this.$W,M=this.$M,C=this.$D,J="set"+(this.$u?"UTC":"");switch(f){case D:return m?v(1,0):v(31,11);case $:return m?v(1,M):v(0,M+1);case y:var W=this.$locale().weekStart||0,re=(T<W?T+7:T)-W;return v(m?C-re:C+(6-re),M);case p:case R:return b(J+"Hours",0);case g:return b(J+"Minutes",1);case u:return b(J+"Seconds",2);case s:return b(J+"Milliseconds",3);default:return this.clone()}},l.endOf=function(a){return this.startOf(a,!1)},l.$set=function(a,d){var c,m=x.p(a),f="set"+(this.$u?"UTC":""),v=(c={},c[p]=f+"Date",c[R]=f+"Date",c[$]=f+"Month",c[D]=f+"FullYear",c[g]=f+"Hours",c[u]=f+"Minutes",c[s]=f+"Seconds",c[n]=f+"Milliseconds",c)[m],b=m===p?this.$D+(d-this.$W):d;if(m===$||m===D){var T=this.clone().set(R,1);T.$d[v](b),T.init(),this.$d=T.set(R,Math.min(this.$D,T.daysInMonth())).$d}else v&&this.$d[v](b);return this.init(),this},l.set=function(a,d){return this.clone().$set(a,d)},l.get=function(a){return this[x.p(a)]()},l.add=function(a,d){var c,m=this;a=Number(a);var f=x.p(d),v=function(M){var C=_(m);return x.w(C.date(C.date()+Math.round(M*a)),m)};if(f===$)return this.set($,this.$M+a);if(f===D)return this.set(D,this.$y+a);if(f===p)return v(1);if(f===y)return v(7);var b=(c={},c[u]=r,c[g]=o,c[s]=i,c)[f]||1,T=this.$d.getTime()+a*b;return x.w(T,this)},l.subtract=function(a,d){return this.add(-1*a,d)},l.format=function(a){var d=this,c=this.$locale();if(!this.isValid())return c.invalidDate||Y;var m=a||"YYYY-MM-DDTHH:mm:ssZ",f=x.z(this),v=this.$H,b=this.$m,T=this.$M,M=c.weekdays,C=c.months,J=c.meridiem,W=function(A,z,ne,de){return A&&(A[z]||A(d,m))||ne[z].slice(0,de)},re=function(A){return x.s(v%12||12,A,"0")},P=J||function(A,z,ne){var de=A<12?"AM":"PM";return ne?de.toLowerCase():de};return m.replace(ee,function(A,z){return z||function(ne){switch(ne){case"YY":return String(d.$y).slice(-2);case"YYYY":return x.s(d.$y,4,"0");case"M":return T+1;case"MM":return x.s(T+1,2,"0");case"MMM":return W(c.monthsShort,T,C,3);case"MMMM":return W(C,T);case"D":return d.$D;case"DD":return x.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return W(c.weekdaysMin,d.$W,M,2);case"ddd":return W(c.weekdaysShort,d.$W,M,3);case"dddd":return M[d.$W];case"H":return String(v);case"HH":return x.s(v,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return P(v,b,!0);case"A":return P(v,b,!1);case"m":return String(b);case"mm":return x.s(b,2,"0");case"s":return String(d.$s);case"ss":return x.s(d.$s,2,"0");case"SSS":return x.s(d.$ms,3,"0");case"Z":return f}return null}(A)||f.replace(":","")})},l.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},l.diff=function(a,d,c){var m,f=this,v=x.p(d),b=_(a),T=(b.utcOffset()-this.utcOffset())*r,M=this-b,C=function(){return x.m(f,b)};switch(v){case D:m=C()/12;break;case $:m=C();break;case j:m=C()/3;break;case y:m=(M-T)/6048e5;break;case p:m=(M-T)/864e5;break;case g:m=M/o;break;case u:m=M/r;break;case s:m=M/i;break;default:m=M}return c?m:x.a(m)},l.daysInMonth=function(){return this.endOf($).$D},l.$locale=function(){return O[this.$L]},l.locale=function(a,d){if(!a)return this.$L;var c=this.clone(),m=ce(a,d,!0);return m&&(c.$L=m),c},l.clone=function(){return x.w(this.$d,this)},l.toDate=function(){return new Date(this.valueOf())},l.toJSON=function(){return this.isValid()?this.toISOString():null},l.toISOString=function(){return this.$d.toISOString()},l.toString=function(){return this.$d.toUTCString()},h}(),_e=le.prototype;return _.prototype=_e,[["$ms",n],["$s",s],["$m",u],["$H",g],["$W",p],["$M",$],["$y",D],["$D",R]].forEach(function(h){_e[h[1]]=function(l){return this.$g(l,h[0],h[1])}}),_.extend=function(h,l){return h.$i||(h(l,le,_),h.$i=!0),_},_.locale=ce,_.isDayjs=B,_.unix=function(h){return _(1e3*h)},_.en=O[S],_.Ls=O,_.p={},_})}(me)),me.exports}var Ee=Ue();const K=ye(Ee);var fe={exports:{}},Ye=fe.exports,Me;function qe(){return Me||(Me=1,function(e,t){(function(i,r){e.exports=r()})(Ye,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var r=["th","st","nd","rd"],o=i%100;return"["+i+(r[(o-20)%10]||r[o]||r[0])+"]"}}})}(fe)),fe.exports}var Be=qe();const We=ye(Be);var ge={exports:{}},Pe=ge.exports,Se;function He(){return Se||(Se=1,function(e,t){(function(i,r){e.exports=r()})(Pe,function(){return function(i,r,o){i=i||{};var n=r.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(p,y,$,j){return n.fromToBase(p,y,$,j)}o.en.relativeTime=s,n.fromToBase=function(p,y,$,j,D){for(var R,Y,X,ee=$.$locale().relativeTime||s,te=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],ie=te.length,q=0;q<ie;q+=1){var S=te[q];S.d&&(R=j?o(p).diff($,S.d,!0):$.diff(p,S.d,!0));var O=(i.rounding||Math.round)(Math.abs(R));if(X=R>0,O<=S.r||!S.r){O<=1&&q>0&&(S=te[q-1]);var V=ee[S.l];D&&(O=D(""+O)),Y=typeof V=="string"?V.replace("%d",O):V(O,y,S.l,X);break}}if(y)return Y;var B=X?ee.future:ee.past;return typeof B=="function"?B(Y):B.replace("%s",Y)},n.to=function(p,y){return u(p,y,this,!0)},n.from=function(p,y){return u(p,y,this)};var g=function(p){return p.$u?o.utc():o()};n.toNow=function(p){return this.to(g(this),p)},n.fromNow=function(p){return this.from(g(this),p)}}})}(ge)),ge.exports}var Ge=He();const Ve=ye(Ge);var we={exports:{}},Je=we.exports,Oe;function Ze(){return Oe||(Oe=1,function(e,t){(function(i,r){e.exports=r()})(Je,function(){return function(i,r,o){o.updateLocale=function(n,s){var u=o.Ls[n];if(u)return(s?Object.keys(s):[]).forEach(function(g){u[g]=s[g]}),u}}})}(we)),we.exports}var Ke=Ze();const Qe=ye(Ke);K.extend(Ve);K.extend(Qe);const Xe={...We,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}},et=["January","February","March","April","May","June","July","August","September","October","November","December"];K.locale("en-web3-modal",Xe);const $e={getMonthNameByIndex(e){return et[e]},getYear(e=new Date().toISOString()){return K(e).year()},getRelativeDateFromNow(e){return K(e).locale("en-web3-modal").fromNow(!0)},formatDate(e,t="DD MMM"){return K(e).format(t)}},tt=3,he=.1,it=["receive","deposit","borrow","claim"],rt=["withdraw","repay","burn"],Z={getTransactionGroupTitle(e,t){const i=$e.getYear(),r=$e.getMonthNameByIndex(t);return e===i?r:`${r} ${e}`},getTransactionImages(e){const[t]=e;return(e==null?void 0:e.length)>1?e.map(r=>this.getTransactionImage(r)):[this.getTransactionImage(t)]},getTransactionImage(e){return{type:Z.getTransactionTransferTokenType(e),url:Z.getTransactionImageURL(e)}},getTransactionImageURL(e){var o,n,s,u,g;let t;const i=!!(e!=null&&e.nft_info),r=!!(e!=null&&e.fungible_info);return e&&i?t=(s=(n=(o=e==null?void 0:e.nft_info)==null?void 0:o.content)==null?void 0:n.preview)==null?void 0:s.url:e&&r&&(t=(g=(u=e==null?void 0:e.fungible_info)==null?void 0:u.icon)==null?void 0:g.url),t},getTransactionTransferTokenType(e){if(e!=null&&e.fungible_info)return"FUNGIBLE";if(e!=null&&e.nft_info)return"NFT"},getTransactionDescriptions(e,t){var j;const i=(j=e==null?void 0:e.metadata)==null?void 0:j.operationType,r=t||(e==null?void 0:e.transfers),o=r&&r.length>0,n=r&&r.length>1,s=o&&r.every(D=>!!(D!=null&&D.fungible_info)),[u,g]=r||[];let p=this.getTransferDescription(u),y=this.getTransferDescription(g);if(!o)return(i==="send"||i==="receive")&&s?(p=Te.getTruncateString({string:e==null?void 0:e.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),y=Te.getTruncateString({string:e==null?void 0:e.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[p,y]):[e.metadata.status];if(n)return r==null?void 0:r.map(D=>this.getTransferDescription(D));let $="";return it.includes(i)?$="+":rt.includes(i)&&($="-"),p=$.concat(p),[p]},getTransferDescription(e){var i;let t="";return e&&(e!=null&&e.nft_info?t=((i=e==null?void 0:e.nft_info)==null?void 0:i.name)||"-":e!=null&&e.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-")),t},getFungibleTransferDescription(e){var r;return e?[this.getQuantityFixedValue(e==null?void 0:e.quantity.numeric),(r=e==null?void 0:e.fungible_info)==null?void 0:r.symbol].join(" ").trim():null},mergeTransfers(e){if((e==null?void 0:e.length)<=1)return e;const i=this.filterGasFeeTransfers(e).reduce((o,n)=>{var g;const s=(g=n==null?void 0:n.fungible_info)==null?void 0:g.name,u=o.find(({fungible_info:p,direction:y})=>s&&s===(p==null?void 0:p.name)&&y===n.direction);if(u){const p=Number(u.quantity.numeric)+Number(n.quantity.numeric);u.quantity.numeric=p.toString(),u.value=(u.value||0)+(n.value||0)}else o.push(n);return o},[]);let r=i;return i.length>2&&(r=i.sort((o,n)=>(n.value||0)-(o.value||0)).slice(0,2)),r=r.sort((o,n)=>o.direction==="out"&&n.direction==="in"?-1:o.direction==="in"&&n.direction==="out"?1:0),r},filterGasFeeTransfers(e){const t=e==null?void 0:e.reduce((r,o)=>{var s;const n=(s=o==null?void 0:o.fungible_info)==null?void 0:s.name;return n&&(r[n]||(r[n]=[]),r[n].push(o)),r},{}),i=[];return Object.values(t??{}).forEach(r=>{if(r.length===1){const o=r[0];o&&i.push(o)}else{const o=r.filter(s=>s.direction==="in"),n=r.filter(s=>s.direction==="out");if(o.length===1&&n.length===1){const s=o[0],u=n[0];let g=!1;if(s&&u){const p=Number(s.quantity.numeric),y=Number(u.quantity.numeric);y<p*he?(i.push(s),g=!0):p<y*he&&(i.push(u),g=!0)}g||i.push(...r)}else{const s=this.filterGasFeesFromTokenGroup(r);i.push(...s)}}}),e==null||e.forEach(r=>{var o;(o=r==null?void 0:r.fungible_info)!=null&&o.name||i.push(r)}),i},filterGasFeesFromTokenGroup(e){if(e.length<=1)return e;const t=e==null?void 0:e.map(u=>Number(u.quantity.numeric)),i=Math.max(...t),r=Math.min(...t),o=.01;if(r<i*o)return e==null?void 0:e.filter(g=>Number(g.quantity.numeric)>=i*o);const n=e==null?void 0:e.filter(u=>u.direction==="in"),s=e==null?void 0:e.filter(u=>u.direction==="out");if(n.length===1&&s.length===1){const u=n[0],g=s[0];if(u&&g){const p=Number(u.quantity.numeric),y=Number(g.quantity.numeric);if(y<p*he)return[u];if(p<y*he)return[g]}}return e},getQuantityFixedValue(e){return e?parseFloat(e).toFixed(tt):null}};var be;(function(e){e.approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"})(be||(be={}));const nt=oe`
|
|
2
|
-
:host > wui-flex {
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
align-items: center;
|
|
6
|
-
position: relative;
|
|
7
|
-
width: 40px;
|
|
8
|
-
height: 40px;
|
|
9
|
-
box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010};
|
|
10
|
-
background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([data-no-images='true']) > wui-flex {
|
|
14
|
-
background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
15
|
-
border-radius: ${({borderRadius:e})=>e[3]} !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host > wui-flex wui-image {
|
|
19
|
-
display: block;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host > wui-flex,
|
|
23
|
-
:host > wui-flex wui-image,
|
|
24
|
-
.swap-images-container,
|
|
25
|
-
.swap-images-container.nft,
|
|
26
|
-
wui-image.nft {
|
|
27
|
-
border-top-left-radius: var(--local-left-border-radius);
|
|
28
|
-
border-top-right-radius: var(--local-right-border-radius);
|
|
29
|
-
border-bottom-left-radius: var(--local-left-border-radius);
|
|
30
|
-
border-bottom-right-radius: var(--local-right-border-radius);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.swap-images-container {
|
|
34
|
-
position: relative;
|
|
35
|
-
width: 40px;
|
|
36
|
-
height: 40px;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.swap-images-container wui-image:first-child {
|
|
41
|
-
position: absolute;
|
|
42
|
-
width: 40px;
|
|
43
|
-
height: 40px;
|
|
44
|
-
top: 0;
|
|
45
|
-
left: 0%;
|
|
46
|
-
clip-path: inset(0px calc(50% + 2px) 0px 0%);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.swap-images-container wui-image:last-child {
|
|
50
|
-
clip-path: inset(0px 0px 0px calc(50% + 2px));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.swap-fallback-container {
|
|
54
|
-
position: absolute;
|
|
55
|
-
inset: 0;
|
|
56
|
-
width: 40px;
|
|
57
|
-
height: 40px;
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.swap-fallback-container.first {
|
|
64
|
-
clip-path: inset(0px calc(50% + 2px) 0px 0%);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.swap-fallback-container.last {
|
|
68
|
-
clip-path: inset(0px 0px 0px calc(50% + 2px));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
wui-flex.status-box {
|
|
72
|
-
position: absolute;
|
|
73
|
-
right: 0;
|
|
74
|
-
bottom: 0;
|
|
75
|
-
transform: translate(20%, 20%);
|
|
76
|
-
border-radius: ${({borderRadius:e})=>e[4]};
|
|
77
|
-
background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
|
|
78
|
-
box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.backgroundPrimary};
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
width: 16px;
|
|
81
|
-
height: 16px;
|
|
82
|
-
}
|
|
83
|
-
`;var U=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};let N=class extends se{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""},this.failedImageUrls=new Set}handleImageError(t){return i=>{i.stopPropagation(),this.failedImageUrls.add(t),this.requestUpdate()}}render(){const[t,i]=this.images;this.images.length||(this.dataset.noImages="true");const r=(t==null?void 0:t.type)==="NFT",o=i!=null&&i.url?i.type==="NFT":r,n=r?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)",s=o?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)";return this.style.cssText=`
|
|
84
|
-
--local-left-border-radius: ${n};
|
|
85
|
-
--local-right-border-radius: ${s};
|
|
86
|
-
`,w`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`}templateVisual(){const[t,i]=this.images;return this.images.length===2&&(t!=null&&t.url||i!=null&&i.url)?this.renderSwapImages(t,i):t!=null&&t.url&&!this.failedImageUrls.has(t.url)?this.renderSingleImage(t):(t==null?void 0:t.type)==="NFT"?this.renderPlaceholderIcon("nftPlaceholder"):this.renderPlaceholderIcon("coinPlaceholder")}renderSwapImages(t,i){return w`<div class="swap-images-container">
|
|
87
|
-
${t!=null&&t.url?this.renderImageOrFallback(t,"first",!0):null}
|
|
88
|
-
${i!=null&&i.url?this.renderImageOrFallback(i,"last",!0):null}
|
|
89
|
-
</div>`}renderSingleImage(t){return this.renderImageOrFallback(t,void 0,!1)}renderImageOrFallback(t,i,r=!1){return t.url?this.failedImageUrls.has(t.url)?r&&i?this.renderFallbackIconInContainer(i):this.renderFallbackIcon():w`<wui-image
|
|
90
|
-
src=${t.url}
|
|
91
|
-
alt="Transaction image"
|
|
92
|
-
@onLoadError=${this.handleImageError(t.url)}
|
|
93
|
-
></wui-image>`:null}renderFallbackIconInContainer(t){return w`<div class="swap-fallback-container ${t}">${this.renderFallbackIcon()}</div>`}renderFallbackIcon(){return w`<wui-icon
|
|
94
|
-
size="xl"
|
|
95
|
-
weight="regular"
|
|
96
|
-
color="default"
|
|
97
|
-
name="networkPlaceholder"
|
|
98
|
-
></wui-icon>`}renderPlaceholderIcon(t){return w`<wui-icon size="xl" weight="regular" color="default" name=${t}></wui-icon>`}templateIcon(){let t="accent-primary",i;return i=this.getIcon(),this.status&&(t=this.getStatusColor()),i?w`
|
|
99
|
-
<wui-flex alignItems="center" justifyContent="center" class="status-box">
|
|
100
|
-
<wui-icon-box size="sm" color=${t} icon=${i}></wui-icon-box>
|
|
101
|
-
</wui-flex>
|
|
102
|
-
`:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():this.type==="trade"?"swapHorizontal":this.type==="approve"?"checkmark":this.type==="cancel"?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success";case"failed":return"error";case"pending":return"inverse";default:return"accent-primary"}}};N.styles=[nt];U([I()],N.prototype,"type",void 0);U([I()],N.prototype,"status",void 0);U([I()],N.prototype,"direction",void 0);U([I({type:Boolean})],N.prototype,"onlyDirectionIcon",void 0);U([I({type:Array})],N.prototype,"images",void 0);U([I({type:Object})],N.prototype,"secondImage",void 0);U([Q()],N.prototype,"failedImageUrls",void 0);N=U([ae("wui-transaction-visual")],N);const ot=oe`
|
|
103
|
-
:host {
|
|
104
|
-
width: 100%;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:host > wui-flex:first-child {
|
|
108
|
-
align-items: center;
|
|
109
|
-
column-gap: ${({spacing:e})=>e[2]};
|
|
110
|
-
padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]};
|
|
111
|
-
width: 100%;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
:host > wui-flex:first-child wui-text:nth-child(1) {
|
|
115
|
-
text-transform: capitalize;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
wui-transaction-visual {
|
|
119
|
-
width: 40px;
|
|
120
|
-
height: 40px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
wui-flex {
|
|
124
|
-
flex: 1;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
:host wui-flex wui-flex {
|
|
128
|
-
overflow: hidden;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:host .description-container wui-text span {
|
|
132
|
-
word-break: break-all;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:host .description-container wui-text {
|
|
136
|
-
overflow: hidden;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
:host .description-separator-icon {
|
|
140
|
-
margin: 0px 6px;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
:host wui-text > span {
|
|
144
|
-
overflow: hidden;
|
|
145
|
-
display: -webkit-box;
|
|
146
|
-
-webkit-box-orient: vertical;
|
|
147
|
-
-webkit-line-clamp: 1;
|
|
148
|
-
}
|
|
149
|
-
`;var E=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};let L=class extends se{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[]}render(){return w`
|
|
150
|
-
<wui-flex>
|
|
151
|
-
<wui-transaction-visual
|
|
152
|
-
.status=${this.status}
|
|
153
|
-
direction=${ke(this.direction)}
|
|
154
|
-
type=${this.type}
|
|
155
|
-
.onlyDirectionIcon=${this.onlyDirectionIcon}
|
|
156
|
-
.images=${this.images}
|
|
157
|
-
></wui-transaction-visual>
|
|
158
|
-
<wui-flex flexDirection="column" gap="1">
|
|
159
|
-
<wui-text variant="lg-medium" color="primary">
|
|
160
|
-
${be[this.type]||this.type}
|
|
161
|
-
</wui-text>
|
|
162
|
-
<wui-flex class="description-container">
|
|
163
|
-
${this.templateDescription()} ${this.templateSecondDescription()}
|
|
164
|
-
</wui-flex>
|
|
165
|
-
</wui-flex>
|
|
166
|
-
<wui-text variant="sm-medium" color="secondary"><span>${this.date}</span></wui-text>
|
|
167
|
-
</wui-flex>
|
|
168
|
-
`}templateDescription(){var i;const t=(i=this.descriptions)==null?void 0:i[0];return t?w`
|
|
169
|
-
<wui-text variant="md-regular" color="secondary">
|
|
170
|
-
<span>${t}</span>
|
|
171
|
-
</wui-text>
|
|
172
|
-
`:null}templateSecondDescription(){var i;const t=(i=this.descriptions)==null?void 0:i[1];return t?w`
|
|
173
|
-
<wui-icon class="description-separator-icon" size="sm" name="arrowRight"></wui-icon>
|
|
174
|
-
<wui-text variant="md-regular" color="secondary">
|
|
175
|
-
<span>${t}</span>
|
|
176
|
-
</wui-text>
|
|
177
|
-
`:null}};L.styles=[Ce,ot];E([I()],L.prototype,"type",void 0);E([I({type:Array})],L.prototype,"descriptions",void 0);E([I()],L.prototype,"date",void 0);E([I({type:Boolean})],L.prototype,"onlyDirectionIcon",void 0);E([I()],L.prototype,"status",void 0);E([I()],L.prototype,"direction",void 0);E([I({type:Array})],L.prototype,"images",void 0);L=E([ae("wui-transaction-list-item")],L);const st=oe`
|
|
178
|
-
wui-flex {
|
|
179
|
-
position: relative;
|
|
180
|
-
display: inline-flex;
|
|
181
|
-
justify-content: center;
|
|
182
|
-
align-items: center;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
wui-image {
|
|
186
|
-
border-radius: ${({borderRadius:e})=>e[128]};
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.fallback-icon {
|
|
190
|
-
color: ${({tokens:e})=>e.theme.iconInverse};
|
|
191
|
-
border-radius: ${({borderRadius:e})=>e[3]};
|
|
192
|
-
background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.direction-icon,
|
|
196
|
-
.status-image {
|
|
197
|
-
position: absolute;
|
|
198
|
-
right: 0;
|
|
199
|
-
bottom: 0;
|
|
200
|
-
border-radius: ${({borderRadius:e})=>e[128]};
|
|
201
|
-
border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary};
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.direction-icon {
|
|
205
|
-
padding: ${({spacing:e})=>e["01"]};
|
|
206
|
-
color: ${({tokens:e})=>e.core.iconSuccess};
|
|
207
|
-
|
|
208
|
-
background-color: color-mix(
|
|
209
|
-
in srgb,
|
|
210
|
-
${({tokens:e})=>e.core.textSuccess} 30%,
|
|
211
|
-
${({tokens:e})=>e.theme.backgroundPrimary} 70%
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/* -- Sizes --------------------------------------------------- */
|
|
216
|
-
:host([data-size='sm']) > wui-image:not(.status-image),
|
|
217
|
-
:host([data-size='sm']) > wui-flex {
|
|
218
|
-
width: 24px;
|
|
219
|
-
height: 24px;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
:host([data-size='lg']) > wui-image:not(.status-image),
|
|
223
|
-
:host([data-size='lg']) > wui-flex {
|
|
224
|
-
width: 40px;
|
|
225
|
-
height: 40px;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
:host([data-size='sm']) .fallback-icon {
|
|
229
|
-
height: 16px;
|
|
230
|
-
width: 16px;
|
|
231
|
-
padding: ${({spacing:e})=>e[1]};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host([data-size='lg']) .fallback-icon {
|
|
235
|
-
height: 32px;
|
|
236
|
-
width: 32px;
|
|
237
|
-
padding: ${({spacing:e})=>e[1]};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
:host([data-size='sm']) .direction-icon,
|
|
241
|
-
:host([data-size='sm']) .status-image {
|
|
242
|
-
transform: translate(40%, 30%);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
:host([data-size='lg']) .direction-icon,
|
|
246
|
-
:host([data-size='lg']) .status-image {
|
|
247
|
-
transform: translate(40%, 10%);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
:host([data-size='sm']) .status-image {
|
|
251
|
-
height: 14px;
|
|
252
|
-
width: 14px;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
:host([data-size='lg']) .status-image {
|
|
256
|
-
height: 20px;
|
|
257
|
-
width: 20px;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/* -- Crop effects --------------------------------------------------- */
|
|
261
|
-
.swap-crop-left-image,
|
|
262
|
-
.swap-crop-right-image {
|
|
263
|
-
position: absolute;
|
|
264
|
-
top: 0;
|
|
265
|
-
bottom: 0;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.swap-crop-left-image {
|
|
269
|
-
left: 0;
|
|
270
|
-
clip-path: inset(0px calc(50% + 1.5px) 0px 0%);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.swap-crop-right-image {
|
|
274
|
-
right: 0;
|
|
275
|
-
clip-path: inset(0px 0px 0px calc(50% + 1.5px));
|
|
276
|
-
}
|
|
277
|
-
`;var ue=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};const ve={sm:"xxs",lg:"md"};let H=class extends se{constructor(){super(...arguments),this.type="approve",this.size="lg",this.statusImageUrl="",this.images=[]}render(){return w`<wui-flex>${this.templateVisual()} ${this.templateIcon()}</wui-flex>`}templateVisual(){switch(this.dataset.size=this.size,this.type){case"trade":return this.swapTemplate();case"fiat":return this.fiatTemplate();case"unknown":return this.unknownTemplate();default:return this.tokenTemplate()}}swapTemplate(){const[t,i]=this.images;return this.images.length===2&&(t||i)?w`
|
|
278
|
-
<wui-image class="swap-crop-left-image" src=${t} alt="Swap image"></wui-image>
|
|
279
|
-
<wui-image class="swap-crop-right-image" src=${i} alt="Swap image"></wui-image>
|
|
280
|
-
`:t?w`<wui-image src=${t} alt="Swap image"></wui-image>`:null}fiatTemplate(){return w`<wui-icon
|
|
281
|
-
class="fallback-icon"
|
|
282
|
-
size=${ve[this.size]}
|
|
283
|
-
name="dollar"
|
|
284
|
-
></wui-icon>`}unknownTemplate(){return w`<wui-icon
|
|
285
|
-
class="fallback-icon"
|
|
286
|
-
size=${ve[this.size]}
|
|
287
|
-
name="questionMark"
|
|
288
|
-
></wui-icon>`}tokenTemplate(){const[t]=this.images;return t?w`<wui-image src=${t} alt="Token image"></wui-image> `:w`<wui-icon
|
|
289
|
-
class="fallback-icon"
|
|
290
|
-
name=${this.type==="nft"?"image":"coinPlaceholder"}
|
|
291
|
-
></wui-icon>`}templateIcon(){return this.statusImageUrl?w`<wui-image
|
|
292
|
-
class="status-image"
|
|
293
|
-
src=${this.statusImageUrl}
|
|
294
|
-
alt="Status image"
|
|
295
|
-
></wui-image>`:w`<wui-icon
|
|
296
|
-
class="direction-icon"
|
|
297
|
-
size=${ve[this.size]}
|
|
298
|
-
name=${this.getTemplateIcon()}
|
|
299
|
-
></wui-icon>`}getTemplateIcon(){return this.type==="trade"?"arrowClockWise":"arrowBottom"}};H.styles=[st];ue([I()],H.prototype,"type",void 0);ue([I()],H.prototype,"size",void 0);ue([I()],H.prototype,"statusImageUrl",void 0);ue([I({type:Array})],H.prototype,"images",void 0);H=ue([ae("wui-transaction-thumbnail")],H);const at=oe`
|
|
300
|
-
:host > wui-flex:first-child {
|
|
301
|
-
gap: ${({spacing:e})=>e[2]};
|
|
302
|
-
padding: ${({spacing:e})=>e[3]};
|
|
303
|
-
width: 100%;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
wui-flex {
|
|
307
|
-
display: flex;
|
|
308
|
-
flex: 1;
|
|
309
|
-
}
|
|
310
|
-
`;var ut=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};let De=class extends se{render(){return w`
|
|
311
|
-
<wui-flex alignItems="center" .padding=${["1","2","1","2"]}>
|
|
312
|
-
<wui-shimmer width="40px" height="40px" rounded></wui-shimmer>
|
|
313
|
-
<wui-flex flexDirection="column" gap="1">
|
|
314
|
-
<wui-shimmer width="124px" height="16px" rounded></wui-shimmer>
|
|
315
|
-
<wui-shimmer width="60px" height="14px" rounded></wui-shimmer>
|
|
316
|
-
</wui-flex>
|
|
317
|
-
<wui-shimmer width="24px" height="12px" rounded></wui-shimmer>
|
|
318
|
-
</wui-flex>
|
|
319
|
-
`}};De.styles=[Ce,at];De=ut([ae("wui-transaction-list-item-loader")],De);const ct=oe`
|
|
320
|
-
:host {
|
|
321
|
-
min-height: 100%;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.group-container[last-group='true'] {
|
|
325
|
-
padding-bottom: ${({spacing:e})=>e[3]};
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.contentContainer {
|
|
329
|
-
height: 280px;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.contentContainer > wui-icon-box {
|
|
333
|
-
width: 40px;
|
|
334
|
-
height: 40px;
|
|
335
|
-
border-radius: ${({borderRadius:e})=>e[3]};
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.contentContainer > .textContent {
|
|
339
|
-
width: 65%;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.emptyContainer {
|
|
343
|
-
height: 100%;
|
|
344
|
-
}
|
|
345
|
-
`;var G=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};const Ae="last-transaction",lt=7;let k=class extends se{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.caipAddress=pe.state.activeCaipAddress,this.transactionsByYear=F.state.transactionsByYear,this.loading=F.state.loading,this.empty=F.state.empty,this.next=F.state.next,F.clearCursor(),this.unsubscribe.push(pe.subscribeKey("activeCaipAddress",t=>{t&&this.caipAddress!==t&&(F.resetTransactions(),F.fetchTransactions(t)),this.caipAddress=t}),pe.subscribeKey("activeCaipNetwork",()=>{this.updateTransactionView()}),F.subscribe(t=>{this.transactionsByYear=t.transactionsByYear,this.loading=t.loading,this.empty=t.empty,this.next=t.next}))}firstUpdated(){this.updateTransactionView(),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return w` ${this.empty?null:this.templateTransactionsByYear()}
|
|
346
|
-
${this.loading?this.templateLoading():null}
|
|
347
|
-
${!this.loading&&this.empty?this.templateEmpty():null}`}updateTransactionView(){F.resetTransactions(),this.caipAddress&&F.fetchTransactions(xe.getPlainAddress(this.caipAddress))}templateTransactionsByYear(){return Object.keys(this.transactionsByYear).sort().reverse().map(i=>{const r=parseInt(i,10),o=new Array(12).fill(null).map((n,s)=>{var p;const u=Z.getTransactionGroupTitle(r,s),g=(p=this.transactionsByYear[r])==null?void 0:p[s];return{groupTitle:u,transactions:g}}).filter(({transactions:n})=>n).reverse();return o.map(({groupTitle:n,transactions:s},u)=>{const g=u===o.length-1;return s?w`
|
|
348
|
-
<wui-flex
|
|
349
|
-
flexDirection="column"
|
|
350
|
-
class="group-container"
|
|
351
|
-
last-group="${g?"true":"false"}"
|
|
352
|
-
data-testid="month-indexes"
|
|
353
|
-
>
|
|
354
|
-
<wui-flex
|
|
355
|
-
alignItems="center"
|
|
356
|
-
flexDirection="row"
|
|
357
|
-
.padding=${["2","3","3","3"]}
|
|
358
|
-
>
|
|
359
|
-
<wui-text variant="md-medium" color="secondary" data-testid="group-title">
|
|
360
|
-
${n}
|
|
361
|
-
</wui-text>
|
|
362
|
-
</wui-flex>
|
|
363
|
-
<wui-flex flexDirection="column" gap="2">
|
|
364
|
-
${this.templateTransactions(s,g)}
|
|
365
|
-
</wui-flex>
|
|
366
|
-
</wui-flex>
|
|
367
|
-
`:null})})}templateRenderTransaction(t,i){const{date:r,descriptions:o,direction:n,images:s,status:u,type:g,transfers:p,isAllNFT:y}=this.getTransactionListItemProps(t);return w`
|
|
368
|
-
<wui-transaction-list-item
|
|
369
|
-
date=${r}
|
|
370
|
-
.direction=${n}
|
|
371
|
-
id=${i&&this.next?Ae:""}
|
|
372
|
-
status=${u}
|
|
373
|
-
type=${g}
|
|
374
|
-
.images=${s}
|
|
375
|
-
.onlyDirectionIcon=${y||p.length===1}
|
|
376
|
-
.descriptions=${o}
|
|
377
|
-
></wui-transaction-list-item>
|
|
378
|
-
`}templateTransactions(t,i){return t.map((r,o)=>{const n=i&&o===t.length-1;return w`${this.templateRenderTransaction(r,n)}`})}emptyStateActivity(){return w`<wui-flex
|
|
379
|
-
class="emptyContainer"
|
|
380
|
-
flexGrow="1"
|
|
381
|
-
flexDirection="column"
|
|
382
|
-
justifyContent="center"
|
|
383
|
-
alignItems="center"
|
|
384
|
-
.padding=${["10","5","10","5"]}
|
|
385
|
-
gap="5"
|
|
386
|
-
data-testid="empty-activity-state"
|
|
387
|
-
>
|
|
388
|
-
<wui-icon-box color="default" icon="wallet" size="xl"></wui-icon-box>
|
|
389
|
-
<wui-flex flexDirection="column" alignItems="center" gap="2">
|
|
390
|
-
<wui-text align="center" variant="lg-medium" color="primary">No Transactions yet</wui-text>
|
|
391
|
-
<wui-text align="center" variant="lg-regular" color="secondary"
|
|
392
|
-
>Start trading on dApps <br />
|
|
393
|
-
to grow your wallet!</wui-text
|
|
394
|
-
>
|
|
395
|
-
</wui-flex>
|
|
396
|
-
</wui-flex>`}emptyStateAccount(){return w`<wui-flex
|
|
397
|
-
class="contentContainer"
|
|
398
|
-
alignItems="center"
|
|
399
|
-
justifyContent="center"
|
|
400
|
-
flexDirection="column"
|
|
401
|
-
gap="4"
|
|
402
|
-
data-testid="empty-account-state"
|
|
403
|
-
>
|
|
404
|
-
<wui-icon-box icon="swapHorizontal" size="lg" color="default"></wui-icon-box>
|
|
405
|
-
<wui-flex
|
|
406
|
-
class="textContent"
|
|
407
|
-
gap="2"
|
|
408
|
-
flexDirection="column"
|
|
409
|
-
justifyContent="center"
|
|
410
|
-
flexDirection="column"
|
|
411
|
-
>
|
|
412
|
-
<wui-text variant="md-regular" align="center" color="primary">No activity yet</wui-text>
|
|
413
|
-
<wui-text variant="sm-regular" align="center" color="secondary"
|
|
414
|
-
>Your next transactions will appear here</wui-text
|
|
415
|
-
>
|
|
416
|
-
</wui-flex>
|
|
417
|
-
<wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
|
|
418
|
-
</wui-flex>`}templateEmpty(){return this.page==="account"?w`${this.emptyStateAccount()}`:w`${this.emptyStateActivity()}`}templateLoading(){return this.page==="activity"?w` <wui-flex flexDirection="column" width="100%">
|
|
419
|
-
<wui-flex .padding=${["2","3","3","3"]}>
|
|
420
|
-
<wui-shimmer width="70px" height="16px" rounded></wui-shimmer>
|
|
421
|
-
</wui-flex>
|
|
422
|
-
<wui-flex flexDirection="column" gap="2" width="100%">
|
|
423
|
-
${Array(lt).fill(w` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(t=>t)}
|
|
424
|
-
</wui-flex>
|
|
425
|
-
</wui-flex>`:null}onReceiveClick(){Fe.push("WalletReceive")}createPaginationObserver(){const{projectId:t}=Re.state;this.paginationObserver=new IntersectionObserver(([i])=>{i!=null&&i.isIntersecting&&!this.loading&&(F.fetchTransactions(xe.getPlainAddress(this.caipAddress)),Ne.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:xe.getPlainAddress(this.caipAddress),projectId:t,cursor:this.next,isSmartAccount:Le(pe.state.activeChain)===je.ACCOUNT_TYPES.SMART_ACCOUNT}}))},{}),this.setPaginationObserver()}setPaginationObserver(){var i,r,o;(i=this.paginationObserver)==null||i.disconnect();const t=(r=this.shadowRoot)==null?void 0:r.querySelector(`#${Ae}`);t&&((o=this.paginationObserver)==null||o.observe(t))}getTransactionListItemProps(t){var g,p,y;const i=$e.formatDate((g=t==null?void 0:t.metadata)==null?void 0:g.minedAt),r=Z.mergeTransfers((t==null?void 0:t.transfers)||[]),o=Z.getTransactionDescriptions(t,r),n=r==null?void 0:r[0],s=!!n&&(r==null?void 0:r.every($=>!!$.nft_info)),u=Z.getTransactionImages(r);return{date:i,direction:n==null?void 0:n.direction,descriptions:o,isAllNFT:s,images:u,status:(p=t.metadata)==null?void 0:p.status,transfers:r,type:(y=t.metadata)==null?void 0:y.operationType}}};k.styles=ct;G([I()],k.prototype,"page",void 0);G([Q()],k.prototype,"caipAddress",void 0);G([Q()],k.prototype,"transactionsByYear",void 0);G([Q()],k.prototype,"loading",void 0);G([Q()],k.prototype,"empty",void 0);G([Q()],k.prototype,"next",void 0);k=G([ae("w3m-activity-list")],k);
|