1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-BCkfvex0.js","assets/vendor-react-COL_fmx_.js"])))=>i.map(i=>d[i]); 2import{ar as d,u as $,_ as R,aD as O}from"./index-Cc-3hq20.js";import{r as i,j as e}from"./vendor-react-COL_fmx_.js";import{C as z}from"./check-BOTHkJBU.js";import"./vendor-three-CoHYrz5L.js";/** 3 * @license lucide-react v0.460.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const E=d("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 8 * @license lucide-react v0.460.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const D=d("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 13 * @license lucide-react v0.460.0 - ISC 14 * 15 * This source code is licensed under the ISC license. 16 * See the LICENSE file in the root directory of this source tree. 17 */const _=d("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 18 * @license lucide-react v0.460.0 - ISC 19 * 20 * This source code is licensed under the ISC license. 21 * See the LICENSE file in the root directory of this source tree. 22 */const U=d("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 23 * @license lucide-react v0.460.0 - ISC 24 * 25 * This source code is licensed under the ISC license. 26 * See the LICENSE file in the root directory of this source tree. 27 */const I=d("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),M=r=>r.slice(0,10)+"..."+r.slice(-6),x={display:"inline-flex",alignItems:"center",gap:6,background:"var(--accent)",border:"none",padding:"10px 16px",borderRadius:4,color:"var(--accent-ink, #fff)",fontSize:12,fontWeight:600,cursor:"pointer",letterSpacing:".4px",boxShadow:"0 2px 6px rgba(0,0,0,0.4)"},G=({open:r,onClose:f,address:o,ensName:s,suiAddress:a,suiExplorerBase:m="https://suivision.xyz/account/"})=>{const F=!!a,{t:n}=$(),[y,v]=i.useState("evm"),[c,k]=i.useState(null),[C,Q]=i.useState(null),[S,T]=i.useState(null),[L,V]=i.useState(!1),h=i.useRef(null);i.useEffect(()=>{if(!r)return;try{window.__efTrackDonateModalOpen?.()}catch{}let t=!1;return(async()=>{try{const{default:l}=await R(async()=>{const{default:b}=await import("./browser-BCkfvex0.js").then(j=>j.b);return{default:b}},__vite__mapDeps([0,1])),g=await l.toDataURL(o,{margin:1,scale:6,errorCorrectionLevel:"M"});t||Q(g)}catch{}if(a)try{const{default:l}=await R(async()=>{const{default:b}=await import("./browser-BCkfvex0.js").then(j=>j.b);return{default:b}},__vite__mapDeps([0,1])),g=await l.toDataURL(a,{margin:1,scale:6,errorCorrectionLevel:"M"});t||T(g)}catch{t||V(!0)}})(),()=>{t=!0}},[r,o,a]),i.useEffect(()=>{r&&h.current&&h.current.focus()},[r]),i.useEffect(()=>{if(!r)return;const t=l=>{l.key==="Escape"&&f()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[r,f]);const u=i.useCallback(async(t,l)=>{try{await navigator.clipboard.writeText(t),k(l),setTimeout(()=>k(null),1600)}catch{O("Copy failed; copy manually.")}},[]),p=i.useCallback(t=>{try{window.__efTrackDonateClick?.(t)}catch{}},[]);if(!r)return null;const w=t=>({flex:1,padding:"10px 16px",border:"none",borderRadius:4,background:t?"var(--accent)":"rgba(255,255,255,0.08)",color:t?"#fff":"rgba(255,255,255,0.7)",fontSize:13,fontWeight:600,cursor:"pointer",transition:"background .15s, color .15s"}),H=()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[e.jsxs("p",{style:{margin:0,fontSize:13,opacity:.85,lineHeight:1.5},children:[e.jsx("strong",{children:"ETH / USDC / USDT"})," on Ethereum Mainnet or L2 (Base, Arbitrum, Optimism, Polygon)."]}),s&&e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:"rgba(255,255,255,0.06)",padding:"6px 12px",borderRadius:4,fontSize:12,fontWeight:500,width:"fit-content"},children:[e.jsx("span",{style:{opacity:.85},children:n("donateCrypto.ens.label")}),e.jsx("span",{style:{fontFamily:"var(--font-mono)",letterSpacing:".5px"},children:s}),e.jsx("button",{className:c==="ens"?"ef-copy-feedback":void 0,onClick:()=>u(s,"ens"),style:{background:"var(--accent)",border:"none",color:"var(--accent-ink, #fff)",fontSize:11,padding:"4px 10px",borderRadius:4,cursor:"pointer"},children:c==="ens"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"ef-copy-tick",children:"â"}),"Â ",n("donateCrypto.button.copied")]}):n("donateCrypto.button.copy")}),e.jsx("a",{href:`https://app.ens.domains/name/${s}`,target:"_blank",rel:"noreferrer",style:{textDecoration:"none",color:"var(--accent)",fontSize:11},children:n("donateCrypto.button.view")})]})]}),e.jsxs("div",{style:{display:"flex",gap:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.04)",padding:18,borderRadius:4},children:[e.jsx("div",{style:{flex:"0 0 110px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,background:"linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05)
27)",aspectRatio:"1 / 1"},"aria-label":"EVM donation QR code",children:C?e.jsx("img",{src:C,alt:"EVM QR",style:{width:"100%",height:"100%",objectFit:"contain"}}):e.jsx("span",{style:{fontSize:11,opacity:.6},children:"QR"})}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:10},children:[e.jsx("code",{style:{fontFamily:"var(--font-mono)",fontSize:12,padding:"9px 11px",borderRadius:4,background:"rgba(0,0,0,0.35)",border:"1px solid rgba(255,255,255,0.13)",color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o}),e.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[e.jsx("button",{className:c==="evm"?"ef-copy-feedback":void 0,onClick:()=>{u(o,"evm"),p("crypto")},style:x,children:c==="evm"?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:16}),n("donateCrypto.button.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{size:16}),n("donateCrypto.button.copy")]})}),e.jsxs("a",{href:`https://etherscan.io/address/${o}`,onClick:()=>p("crypto"),target:"_blank",rel:"noreferrer",style:{...x,textDecoration:"none"},children:[e.jsx(_,{size:16}),n("donateCrypto.button.etherscan")]})]})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(30,30,32,0.9)",padding:"12px 14px",borderRadius:4,fontSize:12,lineHeight:1.45},children:[e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",color:"#b3f5c2"},children:[e.jsx(E,{size:16}),e.jsxs("span",{children:[e.jsx("strong",{children:n("donateCrypto.supported.label")})," ",n("donateCrypto.supported.networks")]})]}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",color:"#ffd4a3"},children:[e.jsx(I,{size:16}),e.jsx("span",{children:n("donateCrypto.subtitle.warning")})]}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",color:"#b8d9ff"},children:[e.jsx(U,{size:16}),e.jsx("span",{children:"ERC-20 tokens need a small amount of ETH for gas."})]})]}),e.jsxs("div",{style:{fontSize:11,opacity:.6},children:[s?`${s} -> `:"",e.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:M(o)})," - ",e.jsx("a",{href:`https://etherscan.io/address/${o}`,target:"_blank",rel:"noreferrer",style:{color:"inherit"},children:"Verify on Etherscan"})]})]}),W=()=>a?e.jsxs(e.Fragment,{children:[e.jsxs("p",{style:{margin:0,fontSize:13,opacity:.85,lineHeight:1.5},children:[e.jsx("strong",{children:"SUI"})," on Sui Mainnet."]}),e.jsxs("div",{style:{display:"flex",gap:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.04)",padding:18,borderRadius:4},children:[e.jsx("div",{style:{flex:"0 0 110px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,background:"linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05))",aspectRatio:"1 / 1"},"aria-label":"Sui donation QR code",children:S?e.jsx("img",{src:S,alt:"Sui QR",style:{width:"100%",height:"100%",objectFit:"contain"}}):L?e.jsx("span",{style:{fontSize:10,opacity:.5},children:"QR unavailable"}):e.jsx("span",{style:{fontSize:11,opacity:.6},children:"QR"})}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:10},children:[e.jsx("code",{style:{fontFamily:"var(--font-mono)",fontSize:11,padding:"9px 11px",borderRadius:4,background:"rgba(0,0,0,0.35)",border:"1px solid rgba(255,255,255,0.13)",color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a}),e.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[e.jsx("button",{className:c==="sui"?"ef-copy-feedback":void 0,onClick:()=>{u(a,"sui"),p("sui")},style:x,children:c==="sui"?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:16}),n("donateCrypto.button.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{size:16}),n("donateCrypto.button.copy")]})}),e.jsxs("a",{href:`${m}${encodeURIComponent(a)}`,onClick:()=>p("sui"),target:"_blank",rel:"noreferrer",style:{...x,textDecoration:"none"},children:[e.jsx(_,{size:16}),"SuiVision"]})]})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(30,30,32,0.9)",padding:"12px 14px",borderRadius:4,fontSize:12,lineHeight:1.45},children:[e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",color:"#b3f5c2"},children:[e.jsx(E,{size:16}),e.jsxs("span",{children:[e.jsx("strong",{children:"Supported:"})," Sui Mainnet."]})]}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",color:"#ffd4a3"},children:[e.jsx(I,{size:16}),e.jsx("span",{children:"Only send on the Sui network."})]})]}),e.jsxs("div",{style:{fontSize:11,opacity:.6},children:[e.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:M(a)})," - ",e.jsx("a",{href:`${m}${encodeURIComponent(a)}`,target:"_blank",rel:"noreferrer",style:{color:"inherit"},children:"Verify on SuiVision"})]})]}):null;return e.jsxs("div",{style:{position:"fixed",inset:0,zIndex:4e3,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx("div",{onClick:f,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.7)",backdropFilter:"blur(4px)"}}),e.jsxs("div",{ref:h,tabIndex:-1,style:{position:"relative",width:"min(680px,92%)",maxHeight:"82vh",overflowY:"auto",background:"rgba(20,20,22,0.94)",border:"1px solid rgba(255,255,255,0.15)",borderRadius:4,padding:"24px 26px 28px",boxShadow:"0 12px 42px -6px rgba(0,0,0,0.65)",display:"flex",flexDirection:"column",gap:16,color:"#f5f6f7",outline:"none"},children:[e.jsx("h2",{style:{margin:0,fontSize:20,fontWeight:600},children:n("donateCrypto.title")}),F&&e.jsxs("div",{style:{display:"flex",gap:6,background:"rgba(255,255,255,0.05)",padding:4,borderRadius:4},children:[e.jsx("button",{type:"button",style:w(y==="evm"),onClick:()=>v("evm"),children:"EVM (ETH/L2)"}),e.jsx("button",{type:"button",style:w(y==="sui"),onClick:()=>v("sui"),children:"Sui"})]}),y==="evm"?H():W()]})]})};export{G as DonateCryptoModal,G as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.