var va=Object.create;var _e=Object.defineProperty,Ra=Object.defineProperties,ka=Object.getOwnPropertyDescriptor,La=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,Da=Object.getPrototypeOf,Tt=Object.prototype.hasOwnProperty,Zt=Object.prototype.propertyIsEnumerable;var Ke=Math.pow,Kt=(t,n,o)=>n in t?_e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,v=(t,n)=>{for(var o in n||(n={}))Tt.call(n,o)&&Kt(t,o,n[o]);if(Ve)for(var o of Ve(n))Zt.call(n,o)&&Kt(t,o,n[o]);return t},P=(t,n)=>Ra(t,La(n));var ae=(t,n)=>{var o={};for(var a in t)Tt.call(t,a)&&n.indexOf(a)<0&&(o[a]=t[a]);if(t!=null&&Ve)for(var a of Ve(t))n.indexOf(a)<0&&Zt.call(t,a)&&(o[a]=t[a]);return o};var Pa=(t,n)=>{for(var o in n)_e(t,o,{get:n[o],enumerable:!0})},$t=(t,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ba(n))!Tt.call(t,r)&&r!==o&&_e(t,r,{get:()=>n[r],enumerable:!(a=ka(n,r))||a.enumerable});return t};var W=(t,n,o)=>(o=t!=null?va(Da(t)):{},$t(n||!t||!t.__esModule?_e(o,"default",{value:t,enumerable:!0}):o,t)),Wa=t=>$t(_e({},"__esModule",{value:!0}),t);var E=(t,n,o)=>new Promise((a,r)=>{var l=f=>{try{S(o.next(f))}catch(b){r(b)}},p=f=>{try{S(o.throw(f))}catch(b){r(b)}},S=f=>f.done?a(f.value):Promise.resolve(f.value).then(l,p);S((o=o.apply(t,n)).next())});var oi={};Pa(oi,{LoadingScreen:()=>ra,default:()=>ni});module.exports=Wa(oi);var y=require("@chakra-ui/react"),N=require("react"),ta=require("@solana/wallet-adapter-react");var J=W(require("axios"),1);var ft=require("react"),Ua=require("react/jsx-runtime"),ci=(0,ft.createContext)(void 0),ue="production";var j=ue==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk";var Et=(t,n,o)=>E(void 0,null,function*(){try{return(yield J.default.get(`${j}/collection/unstoppable/searchDomain?query=${n}&wallet_address=${o}`,{headers:{"X-API-KEY":t}})).data}catch(a){throw new Error(a)}}),Yt=(t,n)=>E(void 0,null,function*(){try{return(yield J.default.post(`${j}/collection/unstoppable/claim`,n,{headers:{"X-API-KEY":t}})).data}catch(o){throw o}}),Xt=(t,n)=>E(void 0,null,function*(){try{return(yield J.default.post(`${j}/collection/unstoppable/lockDomain`,n,{headers:{"X-API-KEY":t}})).data}catch(o){throw o}}),qt=(t,n,o,a)=>E(void 0,null,function*(){try{return(yield J.default.get(`${j}/collection/unstoppable/updatedPrice?domain=${n}&currency=${o}&wallet_address=${a}`,{headers:{"X-API-KEY":t}})).data}catch(r){throw r}}),yt=(t,n)=>E(void 0,null,function*(){try{return(yield J.default.get(`${j}/collection/sns/searchDomain?=&query=${n}`,{headers:{"X-API-KEY":t}})).data}catch(o){throw new Error(o)}}),jt=(t,n,o,a,r,l)=>E(void 0,null,function*(){try{return(yield J.default.post(`${j}/collection/sns/registerDomain`,{name:n,claimWallet:o,price:a,payUsing:r,space:l},{headers:{"X-API-KEY":t}})).data}catch(p){throw new Error(p)}}),Jt=(t,n,o)=>E(void 0,null,function*(){try{return(yield J.default.post(`${j}/collection/sns/claimDomain`,{name:n,transactionHash:o},{headers:{"X-API-KEY":t}})).data}catch(a){throw new Error(a)}}),ht=(t,n)=>E(void 0,null,function*(){try{return(yield J.default.get(`${j}/collection/ens/searchDomains?query=${n}.eth`,{headers:{"X-API-KEY":t}})).data}catch(o){throw new Error(o)}}),Qt=(t,n)=>E(void 0,null,function*(){try{return(yield J.default.post(`${j}/collection/ens/claimDomain`,n,{headers:{"X-API-KEY":t}})).data}catch(o){throw o}});var Oe=(t,n)=>t?t.length>n?t.substr(0,n-1)+"..."+t.substr(t.length-(n-1),t.length-1):t:"";var en=(t,n)=>{let o;return function(...a){o&&clearTimeout(o),o=setTimeout(()=>{t.apply(this,a)},n)}};var bi=require("react"),Te=require("@chakra-ui/react");var ve=require("react/jsx-runtime"),Ha=a=>{var r=a,{validators:t,fullWidth:n=!1}=r,o=ae(r,["validators","fullWidth"]);let l=t.find(u=>!u.should),p=v(v({},o),l==null?void 0:l.fallbackProps),{children:S,onClick:f,disabled:b,helperText:m,isLoading:d=!1}=p;return(0,ve.jsxs)(Te.Box,{style:{textAlign:"center"},children:[(0,ve.jsx)(Te.Button,{w:n?"full":"",variant:"primary",onClick:f,isDisabled:b,isLoading:d,loadingText:S,children:S}),m&&(0,ve.jsx)(Te.Text,{color:"foreground",fontSize:"12px",textAlign:"center",mb:"10px",lineHeight:1,mt:2,children:m})]})},tn=Ha;var Ci=require("react"),K=require("@chakra-ui/react"),nn=W(require("@emotion/styled"),1),V=require("react/jsx-runtime"),za=(0,nn.default)(K.Text)`
  position: relative;
  width: fit-content;
  margin: 0 auto;

  &:after {
    content: '';
    border-top: 1px solid #2d3748;
    width: 100%;
    height: 1px;
    position: absolute;
    top: 50%;
    left: 0;
  }
`,Ga=({selected:t,onSelect:n,onUnSelect:o,domain:a,currency:r})=>{var s,M;let{name:l,availability:p,rate:S,discountedRate:f,discount:b}=a,{price:m,status:d}=p,{subTotal:{usdCents:u}}=m,C=A=>{A.stopPropagation(),o()},c=()=>{if(d==="NOT_AVAILABLE")return"Sold";if(t)return"Selected";if(!t)return"Select"},U=()=>{t?o():t||n()};return(0,V.jsx)(K.Box,{position:"relative",paddingY:2,mb:3,zIndex:"1",border:"1px solid #cccccc",borderRadius:10,flexDir:"row",children:(0,V.jsxs)(K.Flex,{paddingX:3,align:"center",justify:"space-between",flexDir:"row",children:[(0,V.jsx)(K.Text,{fontSize:14,children:l}),(0,V.jsxs)(K.Flex,{align:"center",children:[d==="AVAILABLE"&&(0,V.jsxs)(K.Box,{mr:4,children:[(0,V.jsxs)(K.Text,{textAlign:"center",fontSize:12,fontWeight:600,children:[(s=f[r])!=null?s:u/100," ",r," ",(0,V.jsxs)("span",{style:{fontWeight:600},children:["($",f.USDT,")"]})]}),b>0&&(0,V.jsxs)(K.Flex,{children:[(0,V.jsxs)(za,{textAlign:"center",fontSize:10,fontWeight:500,lineHeight:1,children:[(M=S[r])!=null?M:u/100," ",r," ",(0,V.jsxs)("span",{style:{fontWeight:400},children:["($",u/100,")"]})]}),(0,V.jsxs)(K.Text,{ml:1,textAlign:"center",fontSize:10,fontWeight:500,lineHeight:1,color:"green",children:["(",b,"% off)"]})]})]}),(0,V.jsx)(K.Button,{size:"sm",variant:"outline",bg:t?"input":"initial",minWidth:"20",onClick:U,isDisabled:d==="NOT_AVAILABLE",children:c()})]})]})})},on=Ga;var wi=require("react"),Ze=require("@chakra-ui/react"),an=require("@chakra-ui/icons"),Re=require("react/jsx-runtime"),Fa=()=>(0,Re.jsxs)(Ze.Flex,{marginY:8,direction:"column",align:"center",children:[(0,Re.jsx)(an.Search2Icon,{mb:3}),(0,Re.jsx)(Ze.Text,{fontSize:"md",fontWeight:500,width:"80%",textAlign:"center",margin:"0 auto",children:"Find your perfect domain by typing into the search field above."})]}),rn=Fa;var na=W(require("@emotion/styled"),1),Lt=require("@solana/web3.js"),oa=require("@web3-react/core"),ce=W(require("bignumber.js"),1),aa=require("react-redux");var sn=require("@reduxjs/toolkit"),Va={selectedCollectionId:null,showMint:!1,collectionViewOpen:!1,selectedSpaceId:!1},ln=(0,sn.createSlice)({name:"collection",initialState:Va,reducers:{updateSelectedCollectionId(t,{payload:{id:n}}){t.selectedCollectionId=n},updateShowMint(t,{payload:{showMint:n}}){t.showMint=n},updateCollectionViewOpen(t,{payload:{collectionViewOpen:n}}){t.collectionViewOpen=n},updateSelectedSpaceId(t,{payload:{id:n}}){t.selectedSpaceId=n}}}),{updateSelectedCollectionId:cn,updateShowMint:Oi,updateCollectionViewOpen:vi,updateSelectedSpaceId:Ri}=ln.actions,ki=ln.reducer;var e={MAINNET:1,GOERLI:5,SHARDEUM20:8081,SHARDEUM_SPHINX:8082,BINANCE:56,BINANCE_TESTNET:97,SOLANA:9090,SOLANA_DEVNET:9091,POLYGON_MAINNET:137,POLYGON_MUMBAI:80001,STACKS_TESTNET:6061,STACKS_MAINNET:6060,BASE_MAINNET:8453,BASE_TESTNET:84531,CORE_MAINNET:1116,CORE_TESTNET:1115,TELOS_MAINNET:40,TELOS_TESTNET:41,OPTIMISM_MAINNET:10,OPTIMISM_GOERLI:420,ARBITRUM:42161,ARBITRUM_GOERLI:421613,AVALANCHE:43114,AVALANCHE_TESTNET:43113,ZORA_MAINNET:7777777,ZORA_GOERLI:999,MANTA:169,MANTA_TESTNET:3441005,ZETA:7e3,ZETA_TESTNET:7001,OMNI_TESTNET:165},Bi={[e.MAINNET]:"mainnet",[e.GOERLI]:"goerli",[e.BINANCE]:"binance smart chain",[e.BINANCE_TESTNET]:"binance smart chain - testnet",[e.SHARDEUM20]:"Shardeum Liberty 2.0",[e.SHARDEUM_SPHINX]:"Shardeum Sphinx",[e.BASE_MAINNET]:"base mainnet",[e.BASE_TESTNET]:"base goerli",[e.CORE_MAINNET]:"core mainnet",[e.CORE_TESTNET]:"core testnet",[e.TELOS_MAINNET]:"telos mainnet",[e.TELOS_TESTNET]:"telos testnet",[e.OPTIMISM_MAINNET]:"optimism mainnet",[e.OPTIMISM_GOERLI]:"optimism goerli",[e.ARBITRUM]:"arbitrum",[e.ARBITRUM_GOERLI]:"arbitrum goerli",[e.AVALANCHE]:"avalanche",[e.AVALANCHE_TESTNET]:"avalanche testnet",[e.ZORA_MAINNET]:"zora mainnet",[e.ZORA_GOERLI]:"zora goerli",[e.MANTA]:"manta",[e.MANTA_TESTNET]:"manta testnet",[e.ZETA]:"zeta",[e.ZETA_TESTNET]:"zeta testnet",[e.OMNI_TESTNET]:"omni testnet"},Di={[e.MAINNET]:"eth",[e.GOERLI]:"goerli",[e.BINANCE]:"bsc",[e.BINANCE_TESTNET]:"bsc-testnet",[e.SOLANA]:"solana",[e.SOLANA_DEVNET]:"solana-devnet",[e.SHARDEUM20]:"Shardeum-Liberty-2.0",[e.POLYGON_MAINNET]:"polygon-mainnet",[e.POLYGON_MUMBAI]:"polygon-mumbai",[e.BASE_MAINNET]:"base-mainnet",[e.BASE_TESTNET]:"base-goerli",[e.CORE_MAINNET]:"core",[e.CORE_TESTNET]:"core-testnet",[e.TELOS_MAINNET]:"telos-mainnet",[e.TELOS_TESTNET]:"telos-testnet",[e.OPTIMISM_MAINNET]:"optimism-mainnet",[e.OPTIMISM_GOERLI]:"optimism-goerli",[e.ARBITRUM]:"arbitrum",[e.ARBITRUM_GOERLI]:"arbitrum-goerli",[e.AVALANCHE]:"avalanche",[e.AVALANCHE_TESTNET]:"avalanche-testnet",[e.ZORA_MAINNET]:"zora-mainnet",[e.ZORA_GOERLI]:"zora-goerli",[e.MANTA]:"manta",[e.MANTA_TESTNET]:"manta-testnet",[e.ZETA]:"zeta",[e.ZETA_TESTNET]:"zeta-testnet",[e.OMNI_TESTNET]:"omni-testnet"},h={[e.MAINNET]:"https://etherscan.io/",[e.GOERLI]:"https://goerli.etherscan.io/",[e.BINANCE]:"https://bscscan.com/",[e.BINANCE_TESTNET]:"https://testnet.bscscan.com/",[e.SOLANA]:"https://solscan.io/",[e.SOLANA_DEVNET]:"https://solscan.io/",[e.SHARDEUM20]:"https://explorer-dapps.shardeum.org/",[e.SHARDEUM_SPHINX]:"https://explorer-sphinx.shardeum.org/",[e.POLYGON_MAINNET]:"https://polygonscan.com/",[e.POLYGON_MUMBAI]:"https://mumbai.polygonscan.com/",[e.STACKS_TESTNET]:"https://explorer.stacks.co/",[e.STACKS_MAINNET]:"https://explorer.stacks.co/",[e.BASE_MAINNET]:"https://basescan.org/",[e.BASE_TESTNET]:"https://goerli.basescan.org/",[e.CORE_MAINNET]:"https://scan.coredao.org/",[e.CORE_TESTNET]:"https://scan.test.btcs.network/",[e.TELOS_MAINNET]:"https://teloscan.io/",[e.TELOS_TESTNET]:"https://testnet.teloscan.io/",[e.OPTIMISM_MAINNET]:"https://optimistic.etherscan.io/",[e.OPTIMISM_GOERLI]:"https://optimism-goerli.blockscout.com/",[e.ARBITRUM]:"https://arbiscan.io/",[e.ARBITRUM_GOERLI]:"https://goerli-rollup-explorer.arbitrum.io/",[e.AVALANCHE]:"https://snowtrace.io/",[e.AVALANCHE_TESTNET]:"https://testnet.snowtrace.io/",[e.ZORA_MAINNET]:"https://explorer.zora.energy/",[e.ZORA_GOERLI]:"https://testnet.explorer.zora.energy/",[e.MANTA]:"https://pacific-explorer.manta.network/",[e.MANTA_TESTNET]:"https://pacific-explorer.testnet.manta.network/",[e.ZETA]:"https://explorer.mainnet.zetachain.com/",[e.ZETA_TESTNET]:"https://athens3.explorer.zetachain.com/",[e.OMNI_TESTNET]:"https://testnet.explorer.omni.network/"},pn={[e.MAINNET]:{explorer:h[e.MAINNET],label:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18}},[e.GOERLI]:{explorer:h[e.GOERLI],label:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"gETH",decimals:18}},[e.BINANCE]:{explorer:h[e.BINANCE],label:"BNB Smart Chain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18}},[e.BINANCE_TESTNET]:{explorer:h[e.BINANCE_TESTNET],label:"BNB Smart Chain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18}},[e.SHARDEUM20]:{explorer:h[e.SHARDEUM20],label:"Shardeum Sphinx DApp",nativeCurrency:{name:"SHM",symbol:"SHM",decimals:18}},[e.SHARDEUM_SPHINX]:{explorer:h[e.SHARDEUM_SPHINX],label:"Shardeum Sphinx",nativeCurrency:{name:"SHM",symbol:"SHM",decimals:18}},[e.POLYGON_MUMBAI]:{explorer:h[e.POLYGON_MUMBAI],label:"Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18}},[e.POLYGON_MAINNET]:{explorer:h[e.POLYGON_MAINNET],label:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18}},[e.SOLANA_DEVNET]:{explorer:h[e.SOLANA_DEVNET],label:"Solana Devnet",nativeCurrency:{name:"SOL",symbol:"SOL",decimals:9}},[e.SOLANA]:{explorer:h[e.SOLANA],label:"Solana",nativeCurrency:{name:"SOL",symbol:"SOL",decimals:9}},[e.BASE_MAINNET]:{explorer:h[e.BASE_MAINNET],label:"Base",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.BASE_TESTNET]:{explorer:h[e.BASE_TESTNET],label:"Base Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.CORE_MAINNET]:{explorer:h[e.CORE_MAINNET],label:"Core",nativeCurrency:{name:"CORE",symbol:"CORE",decimals:18}},[e.CORE_TESTNET]:{explorer:h[e.CORE_TESTNET],label:"Core Testnet",nativeCurrency:{name:"CORE",symbol:"CORE",decimals:18}},[e.STACKS_MAINNET]:{explorer:h[e.STACKS_MAINNET],label:"Stacks",nativeCurrency:{name:"STACKS",symbol:"STACKS",decimals:18}},[e.STACKS_TESTNET]:{explorer:h[e.STACKS_MAINNET],label:"Stacks Testnet",nativeCurrency:{name:"STACKS",symbol:"STACKS",decimals:18}},[e.TELOS_MAINNET]:{explorer:h[e.TELOS_MAINNET],label:"Telos",nativeCurrency:{name:"TLOS",symbol:"TLOS",decimals:18}},[e.TELOS_TESTNET]:{explorer:h[e.TELOS_TESTNET],label:"Telos Testnet",nativeCurrency:{name:"TLOS",symbol:"TLOS",decimals:18}},[e.OPTIMISM_MAINNET]:{explorer:h[e.OPTIMISM_MAINNET],label:"Optimism",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.OPTIMISM_GOERLI]:{explorer:h[e.OPTIMISM_GOERLI],label:"Optimism Goerli",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.ARBITRUM]:{explorer:h[e.ARBITRUM],label:"Arbitrum",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.ARBITRUM_GOERLI]:{explorer:h[e.ARBITRUM_GOERLI],label:"Arbitrum Goerli",nativeCurrency:{name:"AGOR",symbol:"AGOR",decimals:18}},[e.AVALANCHE]:{explorer:h[e.AVALANCHE],label:"Avalanche",nativeCurrency:{name:"AVAX",symbol:"AVAX",decimals:18}},[e.AVALANCHE_TESTNET]:{explorer:h[e.AVALANCHE_TESTNET],label:"Avalanche Testnet",nativeCurrency:{name:"AVAX",symbol:"AVAX",decimals:18}},[e.ZORA_MAINNET]:{explorer:h[e.ZORA_MAINNET],label:"Zora",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.ZORA_GOERLI]:{explorer:h[e.ZORA_GOERLI],label:"Zora Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.MANTA]:{explorer:h[e.MANTA],label:"Manta",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.MANTA_TESTNET]:{explorer:h[e.MANTA_TESTNET],label:"Manta Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18}},[e.ZETA]:{explorer:h[e.ZETA],label:"Zeta",nativeCurrency:{name:"ZETA",symbol:"ZETA",decimals:18}},[e.ZETA_TESTNET]:{explorer:h[e.ZETA_TESTNET],label:"Zeta Testnet",nativeCurrency:{name:"ZETA",symbol:"ZETA",decimals:18}},[e.OMNI_TESTNET]:{explorer:h[e.OMNI_TESTNET],label:"Omni Testnet",nativeCurrency:{name:"OMNI",symbol:"OMNI",decimals:18}}},Pi=Object.values(e).filter(t=>typeof t=="number"),Ka=[1,5,56,4,97,8081,8082,137,80001,8453,84531,1116,1115,40,41,10,420,42161,421613,43114,43113,7777777,999,3441005,7001,169,7e3,165],mn=Ka;var $e=require("@web3-react/core"),Tn=require("@web3-react/metamask"),fn=require("@web3-react/network"),En=require("@web3-react/walletconnect-v2");var Hi={[e.MAINNET]:"Ethereum",[e.GOERLI]:"Goerli",[e.BINANCE]:"BNB Smart Chain",[e.BINANCE_TESTNET]:"BNB Smart Chain Testnet",[e.SOLANA]:"Solana Mainnet",[e.SOLANA_DEVNET]:"Solana Devnet",[e.SHARDEUM20]:"Shardeum Sphinx DApp 1.X",[e.SHARDEUM_SPHINX]:"Shardeum Sphinx",[e.POLYGON_MUMBAI]:"Polygon Mumbai",[e.POLYGON_MAINNET]:"Polygon",[e.BASE_MAINNET]:"Base Mainnet",[e.BASE_TESTNET]:"Base Goerli",[e.CORE_MAINNET]:"Core Mainnet",[e.CORE_TESTNET]:"Core Testnet",[e.TELOS_MAINNET]:"Telos",[e.TELOS_TESTNET]:"Telos Testnet",[e.OPTIMISM_MAINNET]:"Optimism",[e.OPTIMISM_GOERLI]:"Optimism Goerli",[e.ARBITRUM]:"Arbitrum",[e.ARBITRUM_GOERLI]:"Arbitrum Goerli",[e.AVALANCHE]:"Avalanche",[e.AVALANCHE_TESTNET]:"Avalanche Testnet",[e.ZORA_MAINNET]:"Zora Mainnet",[e.ZORA_GOERLI]:"Zora Goerli",[e.MANTA]:"Manta",[e.MANTA_TESTNET]:"Manta Testnet",[e.ZETA]:"Zeta",[e.ZETA_TESTNET]:"ZetaChain Testnet",[e.OMNI_TESTNET]:"Omni Testnet"},zi={[e.MAINNET]:{name:"Ethereum mainnet",api:"https://api.etherscan.io/api",key:"7GJC7W52P7BJ3ESQCBGG2YP3M597M69ZEC",explorer:"https://etherscan.io"},[e.GOERLI]:{name:"Goerli",api:"https://api-goerli.etherscan.io/api",key:"7GJC7W52P7BJ3ESQCBGG2YP3M597M69ZEC",explorer:"https://goerli.etherscan.io"},[e.BINANCE]:{name:"Binance smart chain mainnet",api:"https://api.bscscan.com/api",key:"3THBPRKH4RNSF4KF52JFAJZX92SHX2FUIV",explorer:"https://bscscan.com"},[e.BINANCE_TESTNET]:{name:"Binance smart chain testnet",api:"https://api-testnet.bscscan.com/api",key:"3THBPRKH4RNSF4KF52JFAJZX92SHX2FUIV",explorer:"https://testnet.bscscan.com"},[e.SHARDEUM20]:{name:"Shadreum liberty 2.0",api:"",key:"",explorer:"https://explorer-liberty20.shardeum.org/"},[e.SOLANA]:{name:"Solana",api:"",key:""},[e.SOLANA_DEVNET]:{name:"Solana devnet",api:"",key:""},[e.BASE_MAINNET]:{name:"Base mainnet",api:"",key:"",explorer:"https://basescan.org"},[e.BASE_TESTNET]:{name:"Base testnet",api:"",key:"",explorer:"https://goerli.basescan.org"},[e.CORE_MAINNET]:{name:"Core mainnet",api:"",key:"",explorer:"https://scan.coredao.org/"},[e.CORE_TESTNET]:{name:"Core testnet",api:"",key:"",explorer:"https://scan.test.btcs.network/"},[e.MANTA]:{name:"Manta",api:"",key:"",explorer:"https://pacific-explorer.manta.network"},[e.MANTA_TESTNET]:{name:"Manta testnet",api:"",key:"",explorer:"https://pacific-explorer.testnet.manta.network"},[e.ZETA]:{name:"ZetaChain mainnet",api:"",key:"",explorer:"https://explorer.mainnet.zetachain.com"},[e.MANTA_TESTNET]:{name:"ZetaChain testnet",api:"",key:"",explorer:"https://athens3.explorer.zetachain.com"}},ke={[e.MAINNET]:"https://attentive-dark-slug.quiknode.pro/3b2478b2d351ebcec1f782076ece31b2a6c94ce8",[e.GOERLI]:"https://goerli.infura.io/v3/82e1f883cd2d45608ba6022fa9432ff0",[e.SHARDEUM20]:"https://dapps.shardeum.org/",[e.SHARDEUM_SPHINX]:"https://sphinx.shardeum.org/",[e.BINANCE]:"https://cold-green-snowflake.bsc.quiknode.pro/df79c99750fe774f3e16a8baddd8788dd627597a",[e.BINANCE_TESTNET]:"https://data-seed-prebsc-1-s1.binance.org:8545",[e.POLYGON_MUMBAI]:"https://polygon-mumbai.infura.io/v3/3e34307cdece46d9a15cce3d2a7525a2",[e.POLYGON_MAINNET]:"https://hardworking-sleek-shadow.matic.quiknode.pro/36b5bd8dec912863be0fe401fad61fce7634fdb8",[e.BASE_MAINNET]:"https://mainnet.base.org",[e.BASE_TESTNET]:"https://goerli.base.org",[e.CORE_MAINNET]:"https://rpc.coredao.org/",[e.CORE_TESTNET]:"https://rpc.test.btcs.network/",[e.TELOS_MAINNET]:"https://mainnet.telos.net/evm",[e.TELOS_TESTNET]:"https://testnet.telos.net/evm",[e.OPTIMISM_GOERLI]:"https://goerli.optimism.io",[e.OPTIMISM_MAINNET]:"https://optimism.meowrpc.com",[e.ARBITRUM]:"https://arb1.arbitrum.io/rpc",[e.ARBITRUM_GOERLI]:"https://endpoints.omniatech.io/v1/arbitrum/goerli/public",[e.AVALANCHE]:"https://api.avax.network/ext/bc/C/rpc",[e.AVALANCHE_TESTNET]:"https://api.avax-test.network/ext/bc/C/rpc",[e.ZORA_MAINNET]:"https://rpc.zora.energy",[e.ZORA_GOERLI]:"https://testnet.rpc.zora.energy",[e.MANTA]:"https://pacific-rpc.manta.network/http",[e.MANTA_TESTNET]:"https://manta-testnet.calderachain.xyz/http",[e.ZETA]:"https://api.mainnet.zetachain.com/evm",[e.ZETA_TESTNET]:"https://zetachain-athens-evm.blockpi.network/v1/rpc/public",[e.OMNI_TESTNET]:"https://testnet.omni.network"},dn={[e.MAINNET]:"https://mainnet.infura.io/v3/3e34307cdece46d9a15cce3d2a7525a2",[e.GOERLI]:"https://goerli.infura.io/v3/82e1f883cd2d45608ba6022fa9432ff0",[e.BINANCE]:"https://bsc-dataseed.binance.org",[e.SHARDEUM_SPHINX]:"https://sphinx.shardeum.org/",[e.SHARDEUM20]:"https://dapps.shardeum.org/",[e.BINANCE_TESTNET]:"https://data-seed-prebsc-1-s1.binance.org:8545",[e.POLYGON_MUMBAI]:"https://endpoints.omniatech.io/v1/matic/mumbai/public",[e.POLYGON_MAINNET]:"https://polygon.llamarpc.com",[e.BASE_MAINNET]:"https://mainnet.base.org",[e.BASE_TESTNET]:"https://goerli.base.org",[e.TELOS_MAINNET]:"https://mainnet.telos.net/evm",[e.TELOS_TESTNET]:"https://testnet.telos.net/evm",[e.OPTIMISM_GOERLI]:"https://goerli.optimism.io",[e.OPTIMISM_MAINNET]:"https://optimism.meowrpc.com",[e.ARBITRUM]:"https://arb1.arbitrum.io/rpc",[e.ARBITRUM_GOERLI]:"https://endpoints.omniatech.io/v1/arbitrum/goerli/public",[e.AVALANCHE]:"https://api.avax.network/ext/bc/C/rpc",[e.AVALANCHE_TESTNET]:"https://api.avax-test.network/ext/bc/C/rpc",[e.ZORA_MAINNET]:"https://rpc.zora.energy",[e.ZORA_GOERLI]:"https://testnet.rpc.zora.energy",[e.MANTA]:"https://pacific-rpc.manta.network/http",[e.MANTA_TESTNET]:"https://manta-testnet.calderachain.xyz/http",[e.ZETA]:"https://api.mainnet.zetachain.com/evm",[e.ZETA_TESTNET]:"https://zetachain-athens-evm.blockpi.network/v1/rpc/public",[e.OMNI_TESTNET]:"https://testnet.omni.network"},un={[e.MAINNET]:["https://api.mycryptoapi.com/eth","https://cloudflare-eth.com","https://rpc.ankr.com/eth","https://eth-mainnet.public.blastapi.io"],[e.GOERLI]:["https://rpc.goerli.mudit.blog/","https://rpc.ankr.com/eth_goerli"]},Gi={[e.MAINNET]:encodeURIComponent("ethereum"),[e.GOERLI]:encodeURIComponent("goerli"),[e.BINANCE]:encodeURIComponent("binance"),[e.BINANCE_TESTNET]:encodeURIComponent("binance testnet"),[e.SOLANA]:encodeURIComponent("solana"),[e.SOLANA_DEVNET]:encodeURIComponent("solana_devnet"),[e.SHARDEUM20]:encodeURIComponent("shardeum 2.0"),[e.POLYGON_MAINNET]:encodeURIComponent("polygon"),[e.POLYGON_MUMBAI]:encodeURIComponent("polygon-mumbai"),[e.STACKS_MAINNET]:encodeURIComponent("stacks"),[e.STACKS_TESTNET]:encodeURIComponent("stacks testnet"),[e.BASE_MAINNET]:encodeURIComponent("base mainnet"),[e.BASE_TESTNET]:encodeURIComponent("base testnet"),[e.CORE_MAINNET]:encodeURIComponent("core mainnet"),[e.CORE_TESTNET]:encodeURIComponent("core testnet"),[e.MANTA]:encodeURIComponent("manta"),[e.MANTA_TESTNET]:encodeURIComponent("manta testnet"),[e.ZETA]:encodeURIComponent("zeta"),[e.ZETA_TESTNET]:encodeURIComponent("zeta testnet")},Fi={[e.MAINNET]:"ETHEREUM",[e.GOERLI]:"GOERLI",[e.BINANCE]:"BSC",[e.BINANCE_TESTNET]:"BSC_TESTNET",[e.SOLANA]:"SOLANA",[e.SOLANA_DEVNET]:"SOLANA_DEVNET",[e.SHARDEUM20]:"SHARDEUM",[e.SHARDEUM_SPHINX]:"SHARDEUM_SPHINX_1.X",[e.POLYGON_MAINNET]:"POLYGON",[e.POLYGON_MUMBAI]:"POLYGON_MUMBAI",[e.STACKS_MAINNET]:"STACKS",[e.STACKS_TESTNET]:"STACKS_TESTNET",[e.BASE_MAINNET]:"BASE_MAINNET",[e.BASE_TESTNET]:"BASE_GOERLI",[e.CORE_MAINNET]:"CORE",[e.CORE_TESTNET]:"CORE_TESTNET",[e.TELOS_MAINNET]:"TELOS_MAINNET",[e.TELOS_TESTNET]:"TELOS_TESTNET",[e.OPTIMISM_MAINNET]:"OPTIMISM",[e.OPTIMISM_GOERLI]:"OPTIMISM_GOERLI",[e.ARBITRUM]:"ARBITRUM",[e.ARBITRUM_GOERLI]:"ARBITRUM_GOERLI",[e.AVALANCHE]:"AVALANCHE",[e.AVALANCHE_TESTNET]:"AVALANCHE_TESTNET",[e.ZORA_GOERLI]:"ZORA_GOERLI",[e.ZORA_MAINNET]:"ZORA",[e.MANTA]:"MANTA",[e.MANTA_TESTNET]:"MANTA_TESTNET",[e.ZETA]:"ZETA",[e.ZETA_TESTNET]:"ZETA_TESTNET",[e.OMNI_TESTNET]:"OMNI_TESTNET"};var St={INJECTED:"INJECTED",WALLET_CONNECT:"WALLET_CONNECT",NETWORK:"NETWORK"};function yn(t){console.debug(`web3-react error: ${t}`)}function Za(t){yn(t)}var[$a,Ya]=(0,$e.initializeConnector)(t=>new fn.Network({actions:t,urlMap:ke,defaultChainId:1})),hn={connector:$a,hooks:Ya,type:St.NETWORK},[Xa,qa]=(0,$e.initializeConnector)(t=>new Tn.MetaMask({actions:t,onError:Za})),Zi={connector:Xa,hooks:qa,type:St.INJECTED},[ja,Ja]=(0,$e.initializeConnector)(t=>{let n=Object.entries(ke).reduce((o,[a,r])=>P(v({},o),{[a]:r[0]}),{});return new En.WalletConnect({actions:t,options:{projectId:"600da6aac724cb2c05d52087cb405879",chains:[1],optionalChains:[5,137,80001,56,97,8081],showQrModal:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"2147483647"}}},onError:yn})}),Sn={connector:ja,hooks:Ja,type:St.WALLET_CONNECT};function Qa(t){switch(t){case e.MAINNET:case e.GOERLI:case e.BINANCE:case e.BINANCE_TESTNET:case e.SHARDEUM_SPHINX:case e.SHARDEUM20:case e.POLYGON_MAINNET:case e.POLYGON_MUMBAI:case e.BASE_MAINNET:case e.BASE_TESTNET:case e.CORE_MAINNET:case e.CORE_TESTNET:case e.TELOS_MAINNET:case e.TELOS_TESTNET:case e.OPTIMISM_MAINNET:case e.OPTIMISM_GOERLI:case e.ARBITRUM:case e.ARBITRUM_GOERLI:case e.AVALANCHE:case e.AVALANCHE_TESTNET:case e.ZORA_MAINNET:case e.ZORA_GOERLI:case e.MANTA:case e.MANTA_TESTNET:case e.ZETA:case e.ZETA_TESTNET:case e.OMNI_TESTNET:return dn[t];default:return un[t][0]}}function er(t){return!!t&&mn.includes(t)}var bn=(t,n)=>E(void 0,null,function*(){if(er(n))if(t===Sn.connector||t===hn.connector)yield t.activate(n);else{let o=pn[n],a={chainId:n,chainName:o.label,rpcUrls:[Qa(n)],nativeCurrency:o.nativeCurrency,blockExplorerUrls:[o.explorer]};yield t.activate(a)}else throw new Error(`Chain ${n} not supported for connector (${typeof t})`)});var Le=W(require("@emotion/styled"),1),Ye=require("@chakra-ui/react"),An=require("@chakra-ui/icons"),es=(0,Le.default)(Ye.Box)`
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: var(--bad-colors-background);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
`,ts=Le.default.a`
  // color: ${({theme:t})=>t.colors.primary} !important;
  // border-bottom: 1px solid ${({theme:t})=>t.colors.primary} !important;
  margin-top: 10px;
  font-size: 14px;
`,Nn=(0,Le.default)(An.CloseIcon)`
  position: absolute;
  right: 5%;
  top: 20px;
  width: 16px;
  height: 16px;
  cursor: pointer;
`,ns=(0,Le.default)(Ye.Button)`
  &:hover {
    background-color: ${({theme:t})=>t.colors.foreground} !important;
    color: ${({theme:t})=>t.colors.background};
  }
`;var gn=[{label:"BONK (Solana)",value:"BONK",ticker:"BONK",address:"ERkzwkBkPeF1Q2LJr9Jqr2dcy4zZSV1pX6VGFxDmniM2",chain:9091,decimals:6,id:9},{label:"SOL (Solana)",value:"SOL",ticker:"SOL",address:"",chain:9091,decimals:9,id:6},{label:"USDT (Solana)",value:"SOL_USDT",ticker:"USDT",address:"26TJZb2cciYM95dioxB5u7Yo2A3seLXEkbrLAaiCNwSr",chain:9091,decimals:6,id:12}],Cn=[{label:"BONK (Solana)",value:"BONK",ticker:"BONK",address:"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",chain:9091,decimals:5,id:9},{label:"SOL (Solana)",value:"SOL",ticker:"SOL",address:"",chain:9091,decimals:9,id:6},{label:"USDT (Solana)",value:"SOL_USDT",ticker:"USDT",address:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",chain:9091,decimals:6,id:12}],In=[{label:"USDT (Goerli)",value:"ETH_USDT",ticker:"USDT",address:"0x72904413f681e3ad1e054eb5473e65e57aa6856e",chain:5},{label:"ETH (Goerli)",value:"ETH",ticker:"ETH",chain:5},{label:"MATIC (Mumbai)",value:"MATIC",ticker:"MATIC",chain:80001},{label:"USDT (Mumbai)",value:"MATIC_USDT",ticker:"USDT",address:"0xf35524a13b9f49885a7c6848f5b164603db92bc0",chain:80001}],xn=[{label:"ETH (Ethereum)",value:"ETH",ticker:"ETH",chain:1},{label:"USDT (Ethereum)",value:"ETH_USDT",ticker:"USDT",address:"0xdac17f958d2ee523a2206206994597c13d831ec7",chain:1},{label:"MATIC (Polygon)",value:"MATIC",ticker:"MATIC",chain:137},{label:"USDT (Polygon)",value:"MATIC_USDT",ticker:"USDT",address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",chain:137}];var he=require("react");var vn=require("@web3-react/core"),Rn=require("react");var wn=require("@ethersproject/address"),Mn=require("@ethersproject/constants"),_n=require("@ethersproject/contracts");function tr(t,n){return t.getSigner(n).connectUnchecked()}function nr(t,n){return n?tr(t,n):t}function On(t,n,o,a){if(!(0,wn.isAddress)(t)||t===Mn.AddressZero)throw Error(`Invalid 'address' parameter '${t}'.`);return new _n.Contract(t,n,nr(o,a))}function fe(t,n,o=!0){let{provider:a,account:r,chainId:l}=(0,vn.useWeb3React)();return(0,Rn.useMemo)(()=>{if(!t||!n||!a||!l)return null;let p;if(typeof t=="string"?p=t:p=t[l],!p)return null;try{return On(p,n,a,o&&r?r:void 0)}catch(S){return console.error("Failed to get contract",S),null}},[t,n,a,l,o,r])}var oo=require("@ethersproject/address");var Xe=[{inputs:[{internalType:"uint256",name:"initialSupply",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}];var ao=require("@web3-react/core"),tt=require("@solana/wallet-adapter-react"),Se=require("@solana/web3.js"),et=W(require("bignumber.js"),1);var qe=require("react"),or=t=>{let n=(0,qe.useRef)();return(0,qe.useEffect)(()=>{n.current=t},[t]),n.current},bt=or;var kn=W(require("bignumber.js"),1),ar=new kn.default(10),Ln=ar.pow(18);var no=require("react");var ye=require("react"),br=require("@solana/wallet-adapter-react"),Ar=require("@web3-react/core");var Bn=require("react"),Dn=require("@stacks/connect");var $=t=>{var n;return t?(n=t==null?void 0:t.chains)==null?void 0:n.includes("SOL"):!1},At=t=>{var n;return t?(n=t==null?void 0:t.chains)==null?void 0:n.includes("EVM"):!1};var Pn=require("@reduxjs/toolkit"),rr={selectedWallet:void 0,selectedSolanaWallet:void 0,accessKey:null,details:{}},Wn=(0,Pn.createSlice)({name:"user",initialState:rr,reducers:{updateSelectedWallet(t,{payload:{wallet:n}}){t.selectedWallet=n},updateSolanaSelectedWallet(t,{payload:{wallet:n}}){t.selectedSolanaWallet=n},updateAccessKey(t,{payload:{accessKey:n}}){t.accessKey=n},updateUserDetails(t,{payload:{details:n}}){t.details=n}}}),{updateSelectedWallet:ir,updateSolanaSelectedWallet:Ts,updateAccessKey:fs,updateUserDetails:Es}=Wn.actions,ys=Wn.reducer;var Nr=require("react-redux");var Sr=require("react");var Be=require("@web3-react/core"),zn=require("@web3-react/metamask"),gt=require("@web3-react/walletconnect-v2"),Gn=require("@web3-react/network");var sr=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,lr=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,je=t=>typeof window=="undefined"||typeof navigator=="undefined"?!1:sr.test(navigator.userAgent)||lr.test(navigator.userAgent.substring(0,4))||Hn(t)||Un(),Un=()=>typeof window=="undefined"||typeof navigator=="undefined"?!1:/iPhone/.test(navigator.userAgent),Hn=t=>{if(typeof window=="undefined"||typeof navigator=="undefined")return!1;let n=t||navigator.maxTouchPoints;return/iPad/.test(navigator.userAgent)||/Mac/.test(navigator.userAgent)&&n===5},Nt=t=>typeof window=="undefined"||typeof navigator=="undefined"?!1:Un()||Hn(t),Je=()=>typeof window=="undefined"||typeof navigator=="undefined"?!1:navigator.userAgent.includes("SamsungBrowser");var De={METAMASK:"Metamask",BRAVE:"braveEvm",WALLET_CONNECT:"WalletConnect",HAHA_WALLET:"Haha",NETWORK:"Network"},cr=t=>{var n;(n=window==null?void 0:window.ReactNativeWebView)==null||n.postMessage(JSON.stringify(t))},[Fn,Vn]=(0,Be.initializeConnector)(t=>new zn.MetaMask({actions:t})),Kn={connector:Fn,hooks:Vn,name:De.METAMASK,isInstalled:()=>{var t;return(t=window==null?void 0:window.ethereum)==null?void 0:t.isMetaMask},handleMobile:(t,n)=>{Nt()?window.open(`${n.native}?uri=${encodeURIComponent(t!=null?t:"")}`,"_self","noreferrer noopener"):window.open(`${n.universal}?uri=${encodeURIComponent(t!=null?t:"")}`,"_self","noreferrer noopener")}},Zn={connector:Fn,hooks:Vn,name:De.BRAVE,isInstalled:()=>{var t;return(t=window==null?void 0:window.ethereum)==null?void 0:t.isBraveWallet},handleMobile:(t,n)=>{Nt()?window.open(`${n.native}?uri=${encodeURIComponent(t!=null?t:"")}`,"_self","noreferrer noopener"):window.open(`${n.universal}?uri=${encodeURIComponent(t!=null?t:"")}`,"_self","noreferrer noopener")}},[pr,mr]=(0,Be.initializeConnector)(t=>new gt.WalletConnect({actions:t,options:{projectId:"600da6aac724cb2c05d52087cb405879",chains:[1],optionalChains:[5,137,80001,56,97,8081],showQrModal:!1,qrModalOptions:{themeVariables:{"--wcm-z-index":"2147483647"}}},onError:n=>{console.log(n)}})),[dr,Ns]=(0,Be.initializeConnector)(t=>new gt.WalletConnect({actions:t,options:{projectId:"600da6aac724cb2c05d52087cb405879",chains:[1],optionalChains:[5,137,80001,56,97,8081],showQrModal:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"2147483647"}}},onError:n=>{console.log(n)}})),Ct={connector:pr,mobileConnector:dr,hooks:mr,name:De.WALLET_CONNECT,isInstalled:()=>!1},$n=P(v({},Ct),{name:De.HAHA_WALLET,handleMobile(t){if(window.sendWalletConnectQR!==void 0)cr({type:"walletconnect_haha",uri:t});else{let n=encodeURIComponent(window.location.toString()),o=encodeURIComponent(window.location.origin);window.location.assign(`haha://opensea?link=${n}`)}}}),[ur,Tr]=(0,Be.initializeConnector)(t=>new Gn.Network({actions:t,urlMap:ke})),Yn={connector:ur,hooks:Tr,name:De.NETWORK,isInstalled:()=>!1};var Pe=t=>t?t.replace(/\W/g,"").toLowerCase():"";var Ee=require("@stacks/connect"),fr=new Ee.AppConfig(["store_write","publish_data"]),It=class{constructor(){this.id="stacks",this.name="Stacks",this.supportedChain="STACKS",this.userSession=new Ee.UserSession({appConfig:fr})}activate(n,o){(0,Ee.showConnect)({appDetails:{name:"Bandit",icon:window.location.origin+"/logo512.png"},redirectTo:"/",onFinish:n,onCancel:o,userSession:this.userSession})}setUserSession(n){this.userSession=n}getUserSession(){return this.userSession}},Xn={connector:new It,hooks:null,name:"Stacks",isInstalled:()=>!0,handleMobile(){}};var qn=require("@solana/wallet-adapter-phantom");var jn={connector:new qn.PhantomWalletAdapter,hooks:null,name:"Phantom",isInstalled:()=>{var t;return(t=window==null?void 0:window.solana)==null?void 0:t.isPhantom},handleMobile(){let t=encodeURIComponent(window.location.toString()),n=encodeURIComponent(window.location.origin);je()&&(Je()?window.location.assign(`phantom://browse/${t}?ref=${n}`):window.location.assign(`https://phantom.app/ul/browse/${t}?ref=${n}`))}};var Jn=require("@solana/wallet-adapter-brave");var xt=class extends Jn.BraveWalletAdapter{constructor(){super(),this.id="brave-sol",this.name="Brave"}},Qn={connector:new xt,hooks:null,name:"BraveSol",isInstalled:()=>{var t;return(t=window==null?void 0:window.braveSolana)==null?void 0:t.isBraveWallet},handleMobile(){let t=encodeURIComponent(window.location.toString()),n=encodeURIComponent(window.location.origin);je()&&(Je()?window.location.assign(`phantom://browse/${t}?ref=${n}`):window.location.assign(`https://phantom.app/ul/browse/${t}?ref=${n}`))}};var Er=()=>[Kn,Zn,Ct,$n,Yn],yr=()=>[jn,Qn],hr=()=>[Xn],eo=()=>[...Er().filter(t=>Pe(t.name)!==Pe("network")),...yr(),...hr()];var Fs=eo();var gr=require("react/jsx-runtime"),to=(0,ye.createContext)(void 0);var Cr=()=>{let t=(0,no.useContext)(to);if(!t)throw Error("Component is not wrapper under wallet context provider");return t},Qe=Cr;var wt={ETH:0,MATIC:0,ETH_USDT:0,MATIC_USDT:0,BONK:0,SOL:0,SOL_USDT:0,SHM:0,TLOS:0,AGOR:0,AVAX:0,ZETA:0,OMNI:0};function ro({currency:t,address:n,tokenDecimals:o=1,refresh:a=!1}){let[r,l]=(0,he.useState)(wt),{account:p,provider:S}=(0,ao.useWeb3React)(),f=fe((0,oo.isAddress)(n)?n:null,Xe),{connection:b}=(0,tt.useConnection)(),{publicKey:m}=(0,tt.useWallet)(),{selectedWallet:d}=Qe(),u=bt(m==null?void 0:m.toBase58()),C=bt(p),c=(s,M)=>E(this,null,function*(){try{if(!b)return;let A=new Se.PublicKey(s),k=new Se.PublicKey(M),{value:G}=yield b.getTokenAccountsByOwner(k,{mint:A});if(G.length===0)return 0;let H=G[0].pubkey,{value:{uiAmount:Y}}=yield b.getTokenAccountBalance(H);return l(se=>P(v({},se),{[t]:Y})),Y}catch(A){console.log(A)}}),U=s=>E(this,null,function*(){try{if(!b)return;let M=yield b.getBalance(new Se.PublicKey(s));return l(A=>P(v({},A),{[t]:new et.default(M).dividedBy(Se.LAMPORTS_PER_SOL).toNumber()})),M}catch(M){console.log(M)}});return(0,he.useEffect)(()=>{d!=null&&d.chains.includes("SOL")?u&&u!==(m==null?void 0:m.toBase58())&&l(wt):C&&C!==p&&l(wt)},[d,u,C,m,p,a]),(0,he.useEffect)(()=>{d!=null&&d.chains.includes("SOL")&&m&&(t==="SOL"?U(m.toBase58()):(t==="SOL_USDT"||t==="BONK")&&c(n,m.toBase58()))},[d,m,t,a]),(0,he.useEffect)(()=>{if(d!=null&&d.chains.includes("EVM")&&S&&p){let s=()=>E(this,null,function*(){try{let A=yield S.getBalance(p);l(k=>P(v({},k),{[t]:new et.default(A.toString()).dividedBy(Ln).toNumber()}))}catch(A){console.log(A)}}),M=()=>E(this,null,function*(){try{let A=yield f.balanceOf(p);l(k=>P(v({},k),{[t]:new et.default(A.toString()).dividedBy(Ke(10,o)).toNumber()}))}catch(A){console.log(A)}});["ETH","MATIC","BNB","SHM","TLOS","AGOR","AVAX"].includes(t)?s():f&&M()}},[d,S,p,t,n,f,o,a]),{balances:r}}var so=require("@web3-react/core"),Mt=W(require("bignumber.js"),1),lo=require("react");var io=[{inputs:[{internalType:"contract BaseRegistrar",name:"_base",type:"address"},{internalType:"contract PriceOracle",name:"_prices",type:"address"},{internalType:"uint256",name:"_minCommitmentAge",type:"uint256"},{internalType:"uint256",name:"_maxCommitmentAge",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"cost",type:"uint256"},{indexed:!1,internalType:"uint256",name:"expires",type:"uint256"}],name:"NameRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"cost",type:"uint256"},{indexed:!1,internalType:"uint256",name:"expires",type:"uint256"}],name:"NameRenewed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oracle",type:"address"}],name:"NewPriceOracle",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{constant:!0,inputs:[],name:"MIN_REGISTRATION_DURATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"string",name:"name",type:"string"}],name:"available",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"commitment",type:"bytes32"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"secret",type:"bytes32"}],name:"makeCommitment",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"address",name:"resolver",type:"address"},{internalType:"address",name:"addr",type:"address"}],name:"makeCommitmentWithConfig",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[],name:"maxCommitmentAge",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"minCommitmentAge",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"bytes32",name:"secret",type:"bytes32"}],name:"register",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"bytes32",name:"secret",type:"bytes32"},{internalType:"address",name:"resolver",type:"address"},{internalType:"address",name:"addr",type:"address"}],name:"registerWithConfig",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"renew",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"rentPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"_minCommitmentAge",type:"uint256"},{internalType:"uint256",name:"_maxCommitmentAge",type:"uint256"}],name:"setCommitmentAges",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"contract PriceOracle",name:"_prices",type:"address"}],name:"setPriceOracle",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"string",name:"name",type:"string"}],name:"valid",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!1,inputs:[],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}];var Ir=()=>{let t=fe("0x283af0b28c62c092c9727f1ee09c02ca627eb7f5",io),{provider:n}=(0,so.useWeb3React)();return{registerEnsDomain:(0,lo.useCallback)((a,r,l,p,S,f,b,m,d,u)=>E(void 0,null,function*(){try{let C=p*31536e3,c=(0,Mt.default)(S).multipliedBy(C).multipliedBy(1.1).toFixed(0);console.log("totalRentPrice",c.toString());let U=new Uint8Array(32);window.crypto.getRandomValues(U);let s="0x"+Array.from(U).map(Y=>Y.toString(16).padStart(2,"0")).join(""),M=yield n.getGasPrice(),A=yield t.makeCommitmentWithConfig(r,l,s,"0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63",l),k=yield t.commit(A);yield new Promise(Y=>setTimeout(()=>Y(),6e4));let G=yield t.registerWithConfig(r,l,C,s,"0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63",l,{value:c.toString(),gasLimit:4e5,gasPrice:M}),H=G.hash;yield G.wait(),console.log(H),u&&(yield Qt(a,{name:`${r}.eth`,transactionHash:H,transferWallet:f,claimWallet:b,price:c,discountedPrice:new Mt.default(m).times(DEFAULT_TOKEN_DECIMAL).toString(),currency:d}))}catch(C){throw console.log(C),C}}),[]),ensRegistarController:t}},co=Ir;var nt=require("@solana/wallet-adapter-react"),po=require("@solana/web3.js"),mo=require("react");var xr=()=>{let t=(0,nt.useWallet)(),{connection:n}=(0,nt.useConnection)();return{registerSns:(0,mo.useCallback)((a,r,l,p,S,f)=>E(void 0,null,function*(){if(!(!t.connected||!t.publicKey||!n))try{let b=r,m=yield jt(a,p.name,S,b.toString(),l.value,f*1e3),d=yield n.getLatestBlockhash(),u=po.Transaction.from(Buffer.from(m));u.recentBlockhash=d.blockhash;let C=yield t.sendTransaction(u,n);console.log(C),yield Jt(a,p.name,C)}catch(b){throw b}}),[t,n])}},uo=xr;var _t=require("react");var No=require("@chakra-ui/react"),ot=require("@solana/wallet-adapter-react"),ge=require("@solana/web3.js"),Ne=require("@metaplex-foundation/js"),oe=require("@solana/spl-token"),Ot=W(require("bignumber.js"),1);var go=require("@ethersproject/address");var Co=require("@web3-react/core");var Il=require("react"),Ae=require("@chakra-ui/react"),yo=require("@ethersproject/address"),ho=W(require("@emotion/styled"),1);var To=W(require("react"),1),Z=require("@chakra-ui/react"),fo=require("@chakra-ui/anatomy");var re=require("react/jsx-runtime"),be=To.default.forwardRef((m,b)=>{var d=m,{label:t,error:n,placeholder:o,helperText:a,isInvalid:r,as:l=Z.Input,InputLeftAddon:p,InputRightAddon:S}=d,f=ae(d,["label","error","placeholder","helperText","isInvalid","as","InputLeftAddon","InputRightAddon"]);let{disabled:u}=f;return(0,re.jsxs)(Z.FormControl,{isInvalid:r,opacity:u?.4:1,children:[t&&(0,re.jsx)(Z.Text,{color:r?"destructive":"foreground",fontWeight:"medium",fontSize:"sm",lineHeight:1,children:t}),(0,re.jsxs)(Z.InputGroup,{mt:"2",children:[p,(0,re.jsx)(l,P(v({variant:"",placeholder:o},f),{ref:b})),S]}),a&&(0,re.jsx)(Z.Text,{fontSize:"xs",mt:2,color:"mutedForeground",children:a}),r&&n&&(0,re.jsx)(Z.Text,{fontSize:"xs",mt:2,color:"destructive",children:n})]})}),{definePartsStyle:Eo,defineMultiStyleConfig:wr}=(0,Z.createMultiStyleConfigHelpers)(fo.inputAnatomy.keys),Mr=Eo({field:{color:"foreground",background:"background",boxShadow:"base",borderWidth:"1px",borderStyle:"solid",borderColor:"input",borderRadius:"lg",_focusVisible:{borderColor:"ring"},_hover:{},_disabled:{opacity:1},_placeholder:{color:"mutedForeground"}}}),_r=(0,Z.defineStyle)({borderRadius:"md"}),Or={sm:Eo({field:_r})},Nl=wr({baseStyle:Mr,sizes:Or});var We=require("react/jsx-runtime"),vr=(0,ho.default)(Ae.Box)`
  position: relative;
  &:after {
    content: '';
    position: absolute;
    top: -30px;
    width: 100%;
    height: 32px;
    background: rgb(255, 255, 255);
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
  }
`,Rr=({address:t,setAddress:n})=>{let o=(0,Ae.useToast)();return(0,We.jsxs)(vr,{paddingY:4,children:[(0,We.jsx)(be,{placeholder:"Enter ethereum wallet address",value:t,onChange:r=>{let l=r.target.value;(0,yo.isAddress)(l)?n(l):(o({title:"Invalid ethereum address",description:"Please enter valid address",status:"error"}),n(""))}}),(0,We.jsx)(Ae.Text,{fontSize:14,mt:2,children:"Note: Enter correct wallet address for domain mapping. We are not liable for any discrepancies caused by an incorrect address"})]})},So=Rr;var Io=require("@ethersproject/units");var Mo=require("react/jsx-runtime"),xo=ue==="production",bo=xo?"HGZmW9bWZZhVvfGbBBU1dvYHsXwi7BqPX5vG39v87iXW":"5bPVXMADTeJCbZ1dMfn6GRm8Zm1mSbwR84UsyRT4eVAT",Ao=xo?"0x4D535c34DD050B0Bc0e7dC6A988a1443Dfb520ac":"0x663Bae08ad96BC7D0f5F895dAb6daA84F9F6De0C",kr=t=>{let n=(0,No.useToast)(),{connection:o}=(0,ot.useConnection)(),a=(0,ot.useWallet)(),r=fe((0,go.isAddress)(t.address)?t.address:null,Xe),{account:l,provider:p}=(0,Co.useWeb3React)(),S=(0,_t.useCallback)((m,d)=>E(void 0,null,function*(){var u;try{let C=yield o.getLatestBlockhash(),c=new ge.Transaction;if(d.value==="BONK"||d.value==="SOL_USDT"){let s=d.address,M=new Ne.PublicKey(bo),A=new Ne.PublicKey(s),k=(0,oe.getAssociatedTokenAddressSync)(A,a.publicKey),G=yield o.getTokenAccountsByOwner(M,{mint:A,programId:oe.TOKEN_PROGRAM_ID}),H=(0,oe.getAssociatedTokenAddressSync)(A,M);(u=G.value)!=null&&u.length||c.add((0,oe.createAssociatedTokenAccountInstruction)(a.publicKey,H,M,A)),c.add((0,oe.createTransferCheckedInstruction)(k,A,H,a.publicKey,(0,Ne.toBigNumber)(m*Ke(10,d.decimals)),d.decimals))}else c.add(ge.SystemProgram.transfer({fromPubkey:a.publicKey,toPubkey:new Ne.PublicKey(bo),lamports:new Ot.default(m).multipliedBy(ge.LAMPORTS_PER_SOL).toNumber()}));return c.feePayer=a.publicKey,c.recentBlockhash=C.blockhash,yield a.sendTransaction(c,o,{signers:[],preflightCommitment:"max"})}catch(C){throw C}}),[a.connected]);return{registerUd:(0,_t.useCallback)((m,d,u,C,c,U,s,M)=>E(void 0,null,function*(){var A;try{let k=null,{token:G,discountedValue:H,value:Y}=yield qt(m,d.name,u.value,C);if(u.ticker!=="USDT"&&H!==d.discountedRate[u.value]){n({title:"Price changed",status:"warning",duration:2e3}),M();return}if(yield Xt(m,{name:d.name,claimWallet:c,raw:G,discountedPrice:H,price:Y,currency:u.value}),s.current&&clearInterval(s.current),u.value==="BONK"||u.value==="SOL_USDT"||u.value==="SOL")k=yield S(H,u);else if(u.value==="ETH_USDT"||u.value==="MATIC_USDT"){let se=new Ot.default(H).multipliedBy(BIG_TEN.pow(6).toNumber()).toString();k=(yield(yield r.transfer(Ao,se)).wait()).transactionHash}else(u.value==="ETH"||u.value==="MATIC")&&(k=(yield(yield p.getSigner().sendTransaction({from:l,to:Ao,value:(0,Io.parseUnits)(H,"ether").toHexString()})).wait()).transactionHash);console.log(k),yield Yt(m,{name:d.name,transactionHash:k,transferWallet:(A=U==null?void 0:U.chains)!=null&&A.includes("SOL")?a.publicKey.toBase58():l,claimWallet:c})}catch(k){throw k}}),[p,S]),renderAddressInput:({address:m,setAddress:d})=>(0,Mo.jsx)(So,{address:m,setAddress:d})}},wo=kr;var Kl=require("react"),vt=require("@chakra-ui/react");var Pl=require("react"),_o=W(require("@emotion/styled"),1),Oo=require("@chakra-ui/react");var Ce=require("react/jsx-runtime"),Lr=(0,_o.default)(Oo.Text)`
  .one {
    opacity: 0;
    -webkit-animation: dot 1.3s infinite;
    -webkit-animation-delay: 0s;
    animation: dot 1.3s infinite;
    animation-delay: 0s;
  }

  .two {
    opacity: 0;
    -webkit-animation: dot 1.3s infinite;
    -webkit-animation-delay: 0.2s;
    animation: dot 1.3s infinite;
    animation-delay: 0.2s;
  }

  .three {
    opacity: 0;
    -webkit-animation: dot 1.3s infinite;
    -webkit-animation-delay: 0.3s;
    animation: dot 1.3s infinite;
    animation-delay: 0.3s;
  }

  @-webkit-keyframes dot {
    0% {
      opacity: 0;
    }
    50% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @keyframes dot {
    0% {
      opacity: 0;
    }
    50% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
`,Br=o=>{var a=o,{text:t="Loading"}=a,n=ae(a,["text"]);return(0,Ce.jsxs)(Lr,P(v({},n),{children:[t,(0,Ce.jsx)("span",{className:"one",children:"."}),(0,Ce.jsx)("span",{className:"two",children:"."}),(0,Ce.jsx)("span",{className:"three",children:"."})]}))},vo=Br;var zl=require("react"),Ro=require("@chakra-ui/react");var Lo=require("react/jsx-runtime"),Dr=n=>{var t=ae(n,[]);return(0,Lo.jsx)(Ro.Spinner,v({thickness:"4px",speed:"1.5s",emptyColor:"input",color:"black",size:"xl"},t))},ko=Dr;var Ie=require("react/jsx-runtime"),Pr=({completed:t,message:n})=>t?null:(0,Ie.jsxs)(vt.Flex,{flexDir:"column",w:"full",justifyContent:"center",alignItems:"center",children:[(0,Ie.jsxs)(vt.Flex,{align:"center",mb:"4",children:[(0,Ie.jsx)(ko,{size:"md",mr:"10px"}),(0,Ie.jsx)(vo,{text:"Minting In Progress",fontSize:22,fontWeight:600})]}),n()]}),Bo=Pr;var ql=require("react"),at=require("@chakra-ui/react"),Rt=require("react/jsx-runtime"),Wr=()=>(0,Rt.jsx)(at.Flex,{height:"350px",justify:"center",align:"center",children:(0,Rt.jsx)(at.Spinner,{thickness:"4px",size:"lg"})}),Do=Wr;var Uo=require("react");var Po=require("@chakra-ui/react"),Ql=require("react"),le=require("react/jsx-runtime"),Ur=t=>(0,le.jsx)(Po.Box,{as:"svg",width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,le.jsx)("g",{id:"a4e07f86",children:(0,le.jsxs)("g",{id:"fc8efcce",children:[(0,le.jsx)("path",{id:"725a9585",d:"M49.9999 8.33398L60.9443 16.3174L74.4909 16.2916L78.6526 29.1834L89.6272 37.125L85.4166 50.0006L89.6272 62.8763L78.6526 70.8179L74.4909 83.7096L60.9443 83.684L49.9999 91.6673L39.0555 83.684L25.5089 83.7096L21.3472 70.8179L10.3726 62.8763L14.5832 50.0006L10.3726 37.125L21.3472 29.1834L25.5089 16.2916L39.0555 16.3174L49.9999 8.33398Z",fill:"#51B592",stroke:"#52D5A7",strokeWidth:"8.33333",strokeLinecap:"round",strokeLinejoin:"round"}),(0,le.jsx)("path",{id:"26f77c74",d:"M35.4165 50.0007L45.8332 60.4173L66.6665 39.584",stroke:"white",strokeWidth:"8.33333",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),Wo=Ur;var _=require("@chakra-ui/react");var Ho=W(require("@emotion/styled"),1),zo=require("react-icons/ai"),Go=require("react-icons/fa"),x=require("react/jsx-runtime"),Hr="",zr="",Gr="",Fr=(0,Ho.default)(_.Box)`
  //margin-left: 30px;
  //margin-right: 30px;
  border: 1px solid #cccc;
  border-radius: 14px;
  padding: 10px 20px;
  height: 65px;
  overflow: hidden;
  ${({offersOpen:t})=>t&&`
    position: absolute;
    top : 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: unset;
  `};
`,kt=({imageSrc:t,title:n,onClick:o})=>(0,x.jsxs)(_.Flex,{align:"center",justify:"space-between",borderWidth:"1.5px",borderColor:"gray.400",borderRadius:"lg",p:1,mb:2,children:[(0,x.jsxs)(_.Flex,{align:"center",children:[(0,x.jsx)(_.Image,{src:t,w:8,h:8,borderRadius:"50%"}),(0,x.jsx)(_.Text,{fontSize:"12px",fontWeight:600,mb:1,ml:3,children:n})]}),o&&(0,x.jsx)(_.Button,{size:"xs",bg:"gray.800",color:"white",_hover:{bg:"gray.800"},onClick:o,children:"Claim here"})]}),Vr=({address:t,showOffers:n,onClickCollection:o,website:a,twitterHandle:r,isEnsDomain:l})=>{let[p,S]=(0,Uo.useState)(!1),f=()=>{l?window.open("https://twitter.com/intent/tweet?text=Just%20secured%20my%20new%20@ensdomains%20on%20bandit.network!%20Ready%20to%20rock%20my%20online%20presence.%20&hashtags=DigitalUpgrade","_blank"):window.open(`https://twitter.com/intent/tweet?text=Ready%20to%20take%20my%20online%20identity%20to%20the%20next%20level%20with%20my%20${r()}%20on%20bandit.network.%20And%20the%20best%20part?%20I%20also%20got%20some%20amazing%20rewards%20from%20@OnBndit,%20@bonk_inu,%20@NFTevening.%20Join%20me%20and%20claim%20yours%20now!`,"_blank")};return(0,x.jsx)(_.Box,{children:(0,x.jsxs)(_.Flex,{flexDir:"column",align:"center",position:"relative",w:"full",userSelect:"none",p:8,children:[(0,x.jsx)(_.Image,{src:Wo,w:"75",h:"75"}),(0,x.jsx)(_.Text,{textAlign:"center",mt:"4",fontSize:"20",fontWeight:"semibold",children:"Domain purchased successfully \u{1F389}"}),(0,x.jsxs)(_.Text,{textAlign:"center",marginY:"4",fontSize:14,children:["Note: Login to"," ",(0,x.jsx)(_.Link,{href:a(),target:"_blank",children:a()})," ","using ",(0,x.jsx)("b",{children:Oe(t,6)})," address to view your domain. It might take upto 10 minutes to register your domain."]}),(0,x.jsx)(_.Button,{mb:5,border:"1.5px solid",w:"fit-content",borderColor:"input",size:"sm",fontWeight:500,rightIcon:(0,x.jsx)(Go.FaTwitter,{width:20,height:20,color:"#1DA1F2"}),onClick:f,children:"Celebrate"}),n&&(0,x.jsxs)(Fr,{bg:"gray.200",offersOpen:p,children:[(0,x.jsxs)(_.Flex,{justify:"space-between",align:"center",children:[(0,x.jsx)(_.Text,{fontSize:"sm",fontWeight:600,mb:1,children:"Exclusive rewards for purchasing UD"}),(0,x.jsx)(zo.AiOutlineFullscreen,{cursor:"pointer",onClick:()=>S(!p)})]}),(0,x.jsx)(_.Text,{fontSize:"xs",fontWeight:500,mb:3,children:"As a thank you, we're offering exclusive rewards to the first 2500 users by our partner platforms"}),(0,x.jsx)(kt,{imageSrc:Gr,onClick:()=>o("64072"),title:"Claim 100 $BAD token wrapped Bandit NFTs by Bandit"}),(0,x.jsx)(kt,{imageSrc:Hr,title:"Eligible to receive 400K $BONK coins after the offer period by BONK"}),(0,x.jsx)(kt,{imageSrc:zr,title:"Get 15% discount on all services by NFT Evening"}),(0,x.jsx)(_.Text,{fontSize:"2xs",children:"These rewards are only available to the first 2500 users from our partner platforms, so don't miss out! Start exploring the exciting world of web3 domains and NFTs with these amazing offers."})]})]})})},Fo=Vr;var w=require("@chakra-ui/react"),$o=require("@solana/web3.js");var I=require("@chakra-ui/react"),Vo=W(require("@emotion/styled"),1),Ko=require("@solana/web3.js"),ic=require("react"),R=require("react/jsx-runtime"),Kr="https://docs.bonfida.org/collection/naming-service/how-to-create-a-solana-domain-name/purchasing-a-domain-name/direct-registration",Zr=(0,Vo.default)(I.Flex)`
  position: relative;
`,$r=({size:t,setSize:n,loading:o,subTotalPrice:a})=>(0,R.jsxs)(Zr,{paddingY:4,flexDir:"column",alignItems:"center",children:[(0,R.jsxs)(I.Slider,{defaultValue:0,min:1,max:10,step:1,w:"94%",onChange:l=>{n(l)},value:t,children:[(0,R.jsxs)(I.SliderTrack,{bg:"muted",children:[(0,R.jsx)(I.Box,{position:"relative",right:10}),(0,R.jsx)(I.SliderFilledTrack,{bg:"mutedForeground"})]}),(0,R.jsx)(I.SliderThumb,{boxSize:4,borderColor:"mutedForeground",borderWidth:"1"})]}),(0,R.jsxs)(I.Flex,{justifyContent:"space-between",w:"full",mt:"1",children:[(0,R.jsx)(I.Text,{fontSize:"12",children:"1 Kb"}),(0,R.jsx)(I.Text,{fontSize:"12",children:"10 Kb"})]}),(0,R.jsxs)(I.Flex,{w:"full",justifyContent:"space-between",children:[(0,R.jsxs)(I.Text,{fontSize:14,mt:4,fontWeight:"semibold",children:["Selected Size: ",`${t} Kb`]}),(0,R.jsx)(I.Text,{fontSize:14,mt:4,textDecoration:"underline",cursor:"pointer",onClick:()=>window.open(Kr),textAlign:"right",children:"How much storage is right for you?"})]}),(0,R.jsxs)(I.Flex,{w:"full",justifyContent:"space-between",alignItems:"center",children:[(0,R.jsx)(I.Text,{fontSize:14,mt:4,fontWeight:"bold",children:"Storage cost"}),(0,R.jsxs)(I.Flex,{alignItems:"flex-end",justifyContent:"center",mt:4,children:[o?(0,R.jsx)(I.Spinner,{size:"xs",mb:"1"}):(0,R.jsxs)(I.Text,{fontSize:14,fontWeight:"bold",children:["+",`${(a/Ko.LAMPORTS_PER_SOL).toFixed(5)}`]}),(0,R.jsx)(I.Text,{ml:"1",fontSize:14,fontWeight:"bold",children:"SOL"})]})]})]}),Zo=$r;var L=require("react/jsx-runtime"),Yr=({size:t,setSize:n,onOpen:o,onClose:a,isOpen:r,loading:l,subTotalPrice:p})=>(0,L.jsxs)(w.Flex,{mt:"2",justifyContent:"space-between",children:[(0,L.jsxs)(w.Flex,{alignItems:"center",children:[(0,L.jsx)(w.Text,{fontSize:"12",mr:"1",children:"Storage Cost:"}),(0,L.jsx)(w.Text,{textDecoration:"underline",fontSize:"12",cursor:"pointer",onClick:o,children:"Edit"})]}),(0,L.jsxs)(w.Flex,{alignItems:"center",justifyContent:"center",children:[l?(0,L.jsx)(w.Spinner,{size:"xs"}):(0,L.jsxs)(w.Text,{fontSize:"12",fontWeight:"bold",children:["+",`${(p/$o.LAMPORTS_PER_SOL).toFixed(5)}`]}),(0,L.jsx)(w.Text,{ml:"1",fontSize:"12",fontWeight:"bold",children:"SOL"}),(0,L.jsx)(w.Text,{fontSize:"12",mx:"1",children:`(${t} KB)`})]}),(0,L.jsxs)(w.Modal,{blockScrollOnMount:!1,isOpen:r,onClose:a,isCentered:!0,children:[(0,L.jsx)(w.ModalOverlay,{}),(0,L.jsxs)(w.ModalContent,{children:[(0,L.jsx)(w.ModalHeader,{children:"Edit storage size"}),(0,L.jsx)(w.ModalCloseButton,{}),(0,L.jsxs)(w.ModalBody,{children:[(0,L.jsx)(w.Text,{fontSize:"12",py:"2",px:"4",borderColor:"mutedForeground",borderWidth:"1px",borderStyle:"solid",borderRadius:"8",children:"Storage size cannot be changed after initial registration."}),(0,L.jsx)(Zo,{size:t,setSize:n,loading:l,subTotalPrice:p})]})]})]})]}),Yo=Yr;var O=require("@chakra-ui/react");var te=require("@chakra-ui/react"),jo=W(require("@emotion/styled"),1),Tc=require("react");var xe=require("react"),rt=W(require("@emotion/styled"),1),it=require("@chakra-ui/icons"),ie=require("@chakra-ui/react");var Q=require("react/jsx-runtime"),Xr=(0,rt.default)(ie.Box)`
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  height: 40px;
  border-radius: 12px;
`,Xo=(0,rt.default)(ie.Button)`
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 32px;
  width: 32px;
  //border-radius: 12px;
  //border: none;
  //border: 1px solid ${t=>t.theme.colors.border};
  pointer-events: ${t=>t.disabled?"none":"unset"};
  opacity: ${t=>t.disabled?"0.5":"1"};

  &:active {
    border: 1px solid ${t=>t.theme.colors.foreground};
  }

  svg {
    path {
      fill: ${t=>t.theme.colors.foreground};
    }
  }
`,qr=(0,rt.default)(be)`
  justify-content: center;
  font-size: 18px;
  min-width: 60px;
  user-select: none;
  border: none;
  box-shadow: none;
  max-width: 80px;
  text-align: center;
`,jr=({initialState:t=1,maxState:n,onChange:o,value:a,onError:r})=>{let[l,p]=(0,xe.useState)(t);return(0,xe.useEffect)(()=>{o(l)},[l]),(0,xe.useEffect)(()=>{p(t)},[t]),(0,xe.useEffect)(()=>{n>0&&a>n||l<1?r(!0):r(!1)},[n,a,l]),(0,Q.jsxs)(ie.Flex,{flexDirection:"column",alignItems:"flex-end",children:[(0,Q.jsxs)(Xr,{children:[(0,Q.jsx)(Xo,{variant:"outline",onClick:()=>{a>t&&p(m=>a-1)},disabled:a===1,children:(0,Q.jsx)(it.MinusIcon,{})}),(0,Q.jsx)(qr,{value:a,onChange:m=>{let d=Number(m.target.value);p(d)}}),(0,Q.jsx)(Xo,{variant:"outline",onClick:()=>{n?a<n&&p(m=>a+1):p(m=>a+1)},disabled:n===a||!n,children:(0,Q.jsx)(it.AddIcon,{})})]}),(n>0&&a>n||l<1)&&(0,Q.jsxs)(ie.Text,{fontSize:12,mt:10,color:"#E11900",children:["Enter quantity between 1 to ",n]})]})},qo=jr;var ee=require("react/jsx-runtime"),Jr=(0,jo.default)(te.Flex)`
  position: relative;
`,Qr=({duration:t,setDuration:n,loading:o,subTotalPrice:a,payUsing:r})=>(0,ee.jsxs)(Jr,{paddingY:4,flexDir:"column",alignItems:"center",children:[(0,ee.jsx)(qo,{initialState:1,maxState:1e4,onChange:n,onError:()=>{},value:t}),(0,ee.jsxs)(te.Flex,{w:"full",justifyContent:"space-between",alignItems:"center",children:[(0,ee.jsx)(te.Text,{fontSize:14,mt:4,fontWeight:"bold",children:`${t} year registration`}),(0,ee.jsxs)(te.Flex,{alignItems:"flex-end",justifyContent:"center",mt:4,children:[o?(0,ee.jsx)(te.Spinner,{size:"xs",mb:"1.5"}):(0,ee.jsx)(te.Text,{fontSize:14,fontWeight:"bold",children:`${a==null?void 0:a.toFixed(5)}`}),(0,ee.jsx)(te.Text,{ml:"1",fontSize:14,fontWeight:"bold",children:r==null?void 0:r.ticker})]})]})]}),Jo=Qr;var z=require("react/jsx-runtime"),ei=({selectedDomain:t,duration:n,selectDuration:o,onOpen:a,onClose:r,isOpen:l,loading:p,subTotalPrice:S,payUsing:f})=>{let b=(0,O.useToast)();return(0,z.jsxs)(O.Flex,{justifyContent:"space-between",children:[(0,z.jsxs)(O.Flex,{alignItems:"center",children:[(0,z.jsx)(O.Text,{fontSize:"12",mr:"1",children:"Duration:"}),(0,z.jsx)(O.Text,{textDecoration:"underline",fontSize:"12",cursor:"pointer",onClick:()=>{if(!t)return b({title:"Select Domain",status:"warning"});a()},children:"Edit"})]}),(0,z.jsx)(O.Text,{fontSize:"12",mr:"1",children:`${n} Year`}),(0,z.jsxs)(O.Modal,{blockScrollOnMount:!1,isOpen:l,onClose:r,isCentered:!0,children:[(0,z.jsx)(O.ModalOverlay,{}),(0,z.jsxs)(O.ModalContent,{children:[(0,z.jsx)(O.ModalHeader,{children:"Registration duration"}),(0,z.jsx)(O.ModalCloseButton,{}),(0,z.jsxs)(O.ModalBody,{children:[(0,z.jsx)(O.Text,{fontSize:"12",py:"2",px:"4",borderColor:"mutedForeground",borderWidth:"1px",borderStyle:"solid",borderRadius:"8",children:"Extending for multiple years will save money on network costs by avoiding yearly transactions."}),(0,z.jsx)(Jo,{duration:n,setDuration:o,loading:p,subTotalPrice:S,payUsing:f})]})]})]})]})},Qo=ei;var T=require("react/jsx-runtime"),ra=(0,na.default)(y.Box)`
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
`,Bt=ue==="production";var ea=Bt?Cn:gn,st=Bt?xn:In,ti=({accessKey:t,onClickClose:n,collectionState:o,disconnectWallet:a})=>{var Ft,Vt;let[r,l]=(0,N.useState)(""),[p,S]=(0,N.useState)(1),[f,b]=(0,N.useState)(!1),[m,d]=(0,N.useState)(""),[u,C]=(0,N.useState)([]),[c,U]=(0,N.useState)({label:null,value:null,chain:null}),[s,M]=(0,N.useState)(""),[A,k]=(0,N.useState)(!1),[G,H]=(0,N.useState)(!1),[Y,se]=(0,N.useState)(!1),[lt,pe]=(0,N.useState)(!1),[Dt,ct]=(0,N.useState)(0),[ia,Ue]=(0,N.useState)(!1),[Pt,Wt]=(0,N.useState)(0),{isOpen:sa,onOpen:la,onClose:ca}=(0,y.useDisclosure)(),{isOpen:pa,onOpen:ma,onClose:da}=(0,y.useDisclosure)(),[He,ua]=(0,N.useState)(1),{primaryAddress:ze,selectedWallet:F,setShowWallets:Ta,setFilterChains:fa}=Qe(),B=((Ft=o==null?void 0:o.contract)==null?void 0:Ft.contractAddress)==="bonfida-sns",X=((Vt=o==null?void 0:o.contract)==null?void 0:Vt.contractAddress)==="unstoppable-domain",D=!B&&!X,{connection:pt}=(0,ta.useConnection)(),Ea=(0,aa.useDispatch)(),{chainId:ya,account:mt}=(0,oa.useWeb3React)(),ne=ze,{balances:we}=ro({currency:c.value,address:c.address,tokenDecimals:c.decimals}),{registerUd:ha,renderAddressInput:Sa}=X&&wo(c),{registerEnsDomain:ba,ensRegistarController:Ut}=D&&co(),{registerSns:Aa}=B&&uo(),Na=(0,y.useToast)(),q=(0,N.useRef)();(0,N.useEffect)(()=>($(F)?U(ea[0]):(U(st[0]),l(ze)),()=>{q.current&&clearInterval(q.current)}),[F,ze]),(0,N.useEffect)(()=>{ne&&Me()},[ne]);let Ge=(0,N.useCallback)(()=>E(void 0,null,function*(){try{se(!0);let i;if(X?i=yield Et(t,m,ne):B?i=yield yt(t,m):D&&(i=yield ht(t,m)),s){let g=i.find(me=>me.name===s.name);g?M(g):s("")}C(i)}catch(i){}finally{se(!1)}}),[t,m,ne]),Me=(0,N.useCallback)(en(()=>E(void 0,null,function*(){try{if(!(m!=null&&m.length))return;q.current&&clearInterval(q.current),C([]),b(!0),M("");let i=m.trim().replace(/\s+/g,"-");if(X){let g=yield Et(t,encodeURIComponent(i),ne);g!=null&&g.length&&(C(g),q.current=setInterval(Ge,3e4))}else if(B){let g=yield yt(t,i);g!=null&&g.length&&(C(g),q.current=setInterval(Ge,3e4))}else if(D){let g=yield ht(t,i);g!=null&&g.length&&(C(g),q.current=setInterval(Ge,3e4))}}catch(i){console.log(i)}finally{b(!1)}}),400),[m,t,Ge,ne]),ga=i=>{d(B||D?i.target.value.split(".")[0]:i.target.value)},Ht=()=>$(F)?ea:D?[st[0],st[1]]:st,dt=(0,N.useCallback)((i=0)=>(s&&(c.ticker==="USDT"?ct(s.discountedRate.USDT):(c.value!=="SOL"&&$(F)&&(i=0),ct(Number(s.discountedRate[c.value])+i))),0),[s,c]),Ca=()=>ya===c.chain,ut=(0,N.useCallback)((i=0)=>{if(!s)return!0;B?c.ticker==="SOL"?pe(new ce.default(we[c.value]).gte(new ce.default(s==null?void 0:s.discountedRate[c.ticker]).plus(i/Lt.LAMPORTS_PER_SOL).toNumber())):pe(new ce.default(we[c.value]).gte(Number(s==null?void 0:s.discountedRate[c.ticker]))):pe(new ce.default(we[c.value]).gte(Number((s==null?void 0:s.discountedRate[c.ticker])+i)))},[s,we,c]),zt=(0,N.useCallback)(()=>E(void 0,null,function*(){if(pt&&B&&s)try{Ue(!0);let i=yield pt.getMinimumBalanceForRentExemption(p*1e3);Wt(i),ut(i),dt(i/Lt.LAMPORTS_PER_SOL)}catch(i){console.log(i)}finally{Ue(!1)}else if(s&&D&&Ut)try{Ue(!0);let i=(0,ce.default)(Number(s==null?void 0:s.discountedRate[c.ticker])).multipliedBy(He);Wt(i.toNumber()),pe(new ce.default(we[c.value]).gte(i.toNumber())),ct(i.toNumber())}catch(i){console.log(i)}finally{Ue(!1)}}),[pt,p,c,D,s,Ut,He]);(0,N.useEffect)(()=>{dt(),ut(),zt()},[dt,ut,zt]);let Ia=()=>E(void 0,null,function*(){try{yield bn(F.connector,c.chain)}catch(i){console.log(i)}}),xa=i=>{let me=Ht().filter(Fe=>Fe.value===i.target.value);U(me[0])},Gt=i=>{M(i)},wa=i=>{var g=i.keyCode||i.which;g===13&&(m==null?void 0:m.length)>0&&Me()},Ma=i=>{Ea(cn({id:i}))},_a=()=>E(void 0,null,function*(){var i,g,me,Fe;try{k(!0),q.current&&clearInterval(q.current),X?yield ha(t,s,c,ne,r,F,q,Me):B?yield Aa(t,Dt,c,s,ne,p):D&&(yield ba(t,s.name.split(".")[0],mt,He,(g=(i=s==null?void 0:s.availability)==null?void 0:i.price)==null?void 0:g.weiPerSecond,mt,r,s==null?void 0:s.discountedRate[c.value],c.value,Bt)),H(!0)}catch(de){M(""),Me(),Na({title:"Failed to mint",description:((Fe=(me=de==null?void 0:de.response)==null?void 0:me.data)==null?void 0:Fe.data)||de.reason||de.message,status:"error",duration:1e3}),console.log(de)}finally{k(!1)}}),Oa=i=>{ua(i)},ai=()=>{if(B)return!!$(F);if(X)return!0;if(D)return!$(F)},ri=()=>{if(B&&!$(F))return"Connect Wallet";if(D&&At(F))return"Connect to EVM Wallet"};return(0,T.jsxs)(y.Box,{children:[(A||G)&&(0,T.jsxs)(ra,{children:[G&&(0,T.jsx)(Nn,{onClick:n,zIndex:1}),(0,T.jsx)(Bo,{completed:G,message:()=>(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(y.Text,{fontSize:14,fontWeight:500,children:[`Minting ${s.name} to ${$(F)?Oe(ne,5):Oe(mt,5)}`,"."]}),(0,T.jsx)(y.Text,{fontSize:14,fontWeight:500,children:"Please do not refresh the page."}),D&&(0,T.jsxs)(y.Flex,{flexDir:"column",alignItems:"center",mt:"2",children:[(0,T.jsx)(y.Text,{fontSize:14,fontWeight:600,mt:"2",children:"Registering your domain takes three steps"}),(0,T.jsx)(y.Text,{fontSize:14,fontWeight:500,mt:"2",children:"1. Complete the claim transaction to begin the process."}),(0,T.jsx)(y.Text,{fontSize:14,fontWeight:500,mt:"2",children:"2. Waits 60 seconds for the claim transaction to complete."}),(0,T.jsx)(y.Text,{fontSize:14,fontWeight:500,mt:"2",children:"3. Complete the register transaction to secure your name."})]})]})}),G&&(0,T.jsx)(Fo,{address:r,onClickCollection:Ma,showOffers:!1,website:()=>{if(X)return"https://unstoppabledomains.com";if(D)return"https://ens.domains";if(B)return"https://sns.id/"},twitterHandle:()=>{if(X)return"@unstoppableweb";if(D)return"@ensdomains";if(B)return"@bonfida"},isEnsDomain:D})]}),(0,T.jsxs)(y.Flex,{mt:4,children:[(0,T.jsx)(be,{id:"ud-search",placeholder:"Search for your new domain",onChange:ga,onKeyPress:wa,size:"md",autoComplete:"off"}),(0,T.jsx)(y.Button,{size:"md",variant:"primary",cursor:"pointer",onClick:Me,ml:3,mt:2,children:"Search"})]}),!(u!=null&&u.length)&&!f&&(0,T.jsx)(rn,{}),f&&(0,T.jsx)(Do,{}),!!(u!=null&&u.length)&&(0,T.jsxs)(y.Box,{children:[(0,T.jsxs)(y.Flex,{justifyContent:"space-between",mt:4,alignItems:"center",children:[(0,T.jsx)(y.Text,{color:"foreground",fontWeight:400,fontSize:14,children:"Pay using"}),(0,T.jsx)(y.Flex,{justifyContent:"center",align:"center",mb:2,children:(0,T.jsx)(y.Select,{value:c==null?void 0:c.value,size:"sm",onChange:xa,borderColor:"muted",borderWidth:"1.5px",borderRadius:"lg",boxShadow:"base",_hover:{},children:Ht().map(({label:i,value:g})=>(0,T.jsx)("option",{value:g,children:i}))})})]}),(0,T.jsx)(y.Box,{h:s&&$(F)&&!B?"100px":"250px",overflowY:"auto",pt:2,position:"relative",children:u.map((i,g)=>(0,T.jsx)(on,{domain:P(v({},i),{name:B?(i==null?void 0:i.name)+".sol":i==null?void 0:i.name}),selected:i.name===(s==null?void 0:s.name),onSelect:()=>Gt(i),onUnSelect:()=>Gt(""),currency:c==null?void 0:c.ticker},g))}),B&&(0,T.jsx)(Yo,{size:p,setSize:S,onOpen:la,onClose:ca,isOpen:sa,loading:ia,subTotalPrice:Pt}),D&&(0,T.jsx)(Qo,{selectedDomain:s,duration:He,selectDuration:Oa,onOpen:ma,onClose:da,isOpen:pa,loading:f,subTotalPrice:Pt,payUsing:c}),s&&$(F)&&X&&Sa({address:r,setAddress:l}),(0,T.jsx)(y.Box,{mt:"15px",children:(0,T.jsxs)(tn,{validators:[{should:!!ze,fallbackProps:{onClick:()=>{fa(X?["EVM","SOL"]:D?["EVM"]:["SOL"]),Ta(!0)},children:"Connect Wallet"}},{should:$(F)?!0:Ca(),fallbackProps:{onClick:Ia,children:"Switch Network"}},{should:!!s,fallbackProps:{onClick:()=>{},children:"Select Domain",disabled:!0}},{should:B||!!r,fallbackProps:{onClick:()=>{},children:"Enter Ethereum address..",disabled:!0}},{should:lt,fallbackProps:{onClick:()=>{},children:"Insufficient balance",disabled:!0}},{should:!Y,fallbackProps:{onClick:()=>{},children:"Fetching best price..",disabled:!0}}],onClick:_a,children:[(0,T.jsxs)(y.Box,{mr:"20px",children:[(0,T.jsxs)(y.Text,{color:"background",fontSize:12,children:[Dt," ",c.ticker]}),(0,T.jsx)(y.Text,{color:"background",textAlign:"left",fontSize:"8px",mt:"2px",children:"Total amount"})]}),(0,T.jsx)(y.Text,{color:"background",children:"Mint"})]})})]})]})},ni=ti;0&&(module.exports={LoadingScreen});
