1import{au as Q,x as V,r as c,j as e,B as g,G as L,a3 as u}from"./index-EOagY1xL.js";import{L as J,x as y}from"./Layout-CbGqocRH.js";import{C as b,a as j,b as v,d as P,c as N}from"./card-CS4Gom1z.js";import{u as K,a as m}from"./useShirtToken-DEnntS7e.js";import{m as t}from"./motion-BrGqV1p0.js";import{G as z,F as X}from"./usePersonalFeed-C_2ua0tJ.js";import{S as f}from"./tutorials-DpfhMTPp.js";import{A as ee}from"./index-DVD3Zg7o.js";import{P as R}from"./package-B1UIcCjv.js";import{U as te}from"./floatingChrome-D57i0lRb.js";import{W as B}from"./SEO-CAUtX4mQ.js";import{L as D}from"./useMarketAutocomplete-DUOg4jeE.js";import{b as re}from"./FeedbackModal-BvPMhMEp.js";import{Z as ae}from"./skeleton-CLPw7O35.js";import"./index-C5ikjDJd.js";import"./Combination-BS1XGO-p.js";import"./PageAnswerCapsule-W0_boT86.js";import"./useWhaleFeed-nmqv5HF_.js";import"./copilotBridge-BLi8X6Hb.js";import"./useDebouncedValue-BJxmesZ3.js";import"./useArkhamIntel-C_agIJxW.js";import"./KpiCardRow-Bt1XgT0b.js";import"./priceDisplay-B36E1VD1.js";import"./useMovers-DSN7j7vE.js";import"./shareUtils-dtGEdkhW.js";import"./submissionMeta-B5ijCL4J.js";import"./useWalletSearch-CbO4qcXD.js";import"./isAfter-Bzyw8vlL.js";import"./create-config-yFYUlX-f.js";import"./create-visual-element-BUgakVZq.js";import"./useOrderPreview-DfzhC_kE.js";import"./useWalletDisplayNames-CZRPLpmi.js";import"./topMarketsBoard-fJ1CjvKB.js";const G="/assets/shirt-front-CA4zuPDG.png",Y="/assets/shirt-back-uk1AHcEM.png",H=10,ie=({delay:a,duration:i,size:s,left:d})=>e.jsx(t.div,{className:"absolute rounded-full bg-primary/20 blur-sm",style:{width:s,height:s,left:d},initial:{y:"100vh",opacity:0}
1,animate:{y:"-100px",opacity:[0,1,1,0]},transition:{duration:i,delay:a,repeat:1/0,ease:"linear"}}),se=()=>{const[a,i]=c.useState("front");return e.jsxs("div",{className:"space-y-2",children:[e.jsxs(t.div,{className:"aspect-[4/3] bg-gradient-to-br from-cyan-500/10 via-purple-500/10 to-pink-500/10 rounded-lg overflow-hidden border border-primary/20 relative group",whileHover:{scale:1.01},children:[e.jsx(ee,{mode:"wait",children:e.jsx(t.img,{src:a==="front"?G:Y,alt:`Shirt ${a}`,className:"w-full h-full object-contain relative z-10",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2}},a)}),e.jsx(t.div,{className:"absolute top-2 right-2 text-yellow-400",animate:{rotate:[0,15,-15,0]},transition:{duration:2,repeat:1/0},children:e.jsx(f,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["front","back"].map(s=>e.jsx("button",{onClick:()=>i(s),className:`aspect-[4/3] rounded-lg overflow-hidden border-2 transition-all ${a===s?"border-primary ring-2 ring-primary/20":"border-border/50 hover:border-primary/50"}`,children:e.jsx("img",{src:s==="front"?G:Y,alt:s,className:"w-full h-full object-contain bg-gradient-to-br from-cyan-50 to-purple-50 dark:from-cyan-900/20 dark:to-purple-900/20"})},s))})]})},ne=({circulating:a,burned:i})=>{const s=m-a-i,d=a/m*100;return e.jsx(t.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:e.jsxs(b,{className:"bg-gradient-to-br from-primary/5 via-purple-500/5 to-pink-500/5 border-primary/20 overflow-hidden relative",children:[e.jsx("div",{className:"absolute inset-0 overflow-hidden",children:e.jsx(t.div,{className:"absolute -top-1/2 -right-1/2 w-full h-full bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl",animate:{rotate:360},transition:{duration:20,repeat:1/0,ease:"linear"}})}),e.jsx(j,{className:"pb-2 pt-3 px-4 relative",children:e.jsxs(v,{className:"text-sm flex items-center gap-2",children:[e.jsx(t.div,{animate:{rotate:[0,360]},transition:{duration:3,repeat:1/0,ease:"linear"},children:e.jsx(R,{className:"h-4 w-4 text-primary"})}),e.jsx("span",{className:"bg-gradient-to-r from-primary via-purple-500 to-pink-500 bg-clip-text text-transparent font-bold",children:"NFT Supply Tracker"})]})}),e.jsxs(N,{className:"space-y-3 relative px-4 pb-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:"text-muted-foreground",children:"Distribution"}),e.jsxs(t.span,{className:"font-bold text-primary",initial:{scale:1.5},animate:{scale:1},children:[a,"/",m]},a)]}),e.jsx("div",{className:"relative h-2 bg-muted/50 rounded-full overflow-hidden",children:e.jsx(t.div,{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-primary via-purple-500 to-pink-500 rounded-full",initial:{width:0},animate:{width:`${d}%`},transition:{duration:1,delay:.5}})})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{icon:te,value:a,label:"Circulating",color:"text-green-500",bg:"from-green-500/20 to-green-500/5"},{icon:R,value:s,label:"Uncirculated",color:"text-muted-foreground",bg:"from-muted/50 to-muted/20"},{icon:X,value:i,label:"Burned",color:"text-orange-500",bg:"from-orange-500/20 to-orange-500/5"}].map((o,p)=>e.jsxs(t.div,{className:`bg-gradient-to-br ${o.bg} backdrop-blur-sm rounded-lg p-2 text-center border border-border/50`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3+p*.1},whileHover:{scale:1.05},children:[e.jsx(o.icon,{className:`h-3 w-3 mx-auto mb-0.5 ${o.color}`}),e.jsx("div",{className:"text-lg font-bold",children:o.value}),e.jsx("div",{className:"text-[10px] text-muted-foreground",children:o.label})]},o.label))}),e.jsxs(t.div,{className:"bg-gradient-to-r from-primary/20 via-purple-500/20 to-pink-500/20 rounded-lg p-2.5 border border-primary/30 relative overflow-hidden",whileHover:{scale:1.02},children:[e.jsx(t.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/10 to-transparent",animate:{x:["-100%","100%"]},transition:{duration:2,repeat:1/0,repeatDelay:1}}),e.jsxs("div",{className:"relative flex items-center gap-2",children:[e.jsx(z,{className:"h-5 w-5 text-primary"}),e.jsx("div",{children:e.jsxs("div",{className:"text-xs font-bold bg-gradient-to-r from-primary to-purple-500 bg-clip-text text-transparent",children:["Current Giveaway: ",H," tokens"]})})]})]})]})]})})},He=()=>{var C,_,E,I,F;const{authenticated:a,user:i}=Q(),{connect:s}=V(),[d,o]=c.useState(!0),[p,w]=c.useState(!1),[M,k]=c.useState(!1),S=K((C=i==null?void 0:i.wallet)==null?void 0:C.address),W=S.isLoading,x=((E=(_=S.data)==null?void 0:_.tokens)==null?void 0:E[0])??null,[T,$]=c.useState({circulating:0,burned:0}),r=(F=(I=i==null?void 0:i.wallet)==null?void 0:I.address)==null?void 0:F.toLowerCase();c.useEffect(()=>{(async()=>{try{const{data:l,error:h}=await g.from("shirt_tokens").select("is_redeemed");
1if(!h&&l){const q=l.length,Z=l.filter(O=>O.is_redeemed).length;$({circulating:q,burned:Z})}}catch(l){console.error("Error fetching supply:",l)}})()},[]),c.useEffect(()=>{(async()=>{if(!r){o(!1);return}try{const{data:l,error:h}=await g.from("shirt_waitlist").select("id").eq("wallet_address",r).maybeSingle();h?console.error("Error checking waitlist:",h):l&&k(!0)}catch(l){console.error("Error:",l)}finally{o(!1)}})()},[r]);const U=async()=>{if(!r){u.error("Please connect your wallet first");return}w(!0);try{const{error:n}=await g.from("shirt_waitlist").insert({wallet_address:r,shipping_name:"TBD",shipping_address_line1:"TBD",shipping_city:"TBD",shipping_state:"TBD",shipping_postal_code:"TBD",shipping_country:"TBD",shirt_size:"TBD"});if(n)if(n.code==="23505")u.error("You have already registered!");else throw n;else u.success("Successfully registered for the giveaway!"),k(!0)}catch(n){console.error("Error registering:",n),u.error("Failed to register. Please try again.")}finally{w(!1)}},A=()=>a?d||W?e.jsx("div",{className:"flex items-center justify-center py-10",children:e.jsx(D,{className:"h-6 w-6 text-primary animate-spin"})}):x?e.jsxs(t.div,{className:"flex flex-col items-center py-4 gap-3",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},children:[e.jsx("div",{className:"p-3 rounded-full bg-gradient-to-br from-yellow-500/30 via-orange-500/20 to-red-500/20",children:e.jsx(y,{className:"h-8 w-8 text-yellow-500"})}),e.jsx("h3",{className:"text-lg font-bold text-center bg-gradient-to-r from-yellow-400 via-orange-500 to-red-500 bg-clip-text text-transparent",children:"You own a Shirt Token!"}),e.jsxs("p",{className:"text-muted-foreground text-center text-sm",children:["Token ",e.jsxs("span",{className:"font-bold text-primary",children:["#",x.token_number]})," of ",m]}),e.jsxs("div",{className:"w-full bg-muted/30 rounded-lg p-3 space-y-2 text-center border border-border/50",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Your token can be transferred or burned to redeem the physical shirt."}),e.jsx("p",{className:`text-xs font-medium ${x.is_redeemed?"text-orange-500":"text-green-500"}`,children:x.is_redeemed?"ð¥ Burned (Redeemed)":"⨠Active & Tradeable"})]})]}):M?e.jsxs(t.div,{className:"flex flex-col items-center py-4 gap-3",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},children:[e.jsx("div",{className:"p-3 rounded-full bg-gradient-to-br from-green-500/20 to-emerald-500/20",children:e.jsx(re,{className:"h-8 w-8 text-green-500"})}),e.jsx("h3",{className:"text-lg font-bold text-center bg-gradient-to-r from-green-400 to-emerald-500 bg-clip-text text-transparent",children:"You're In! ð"}),e.jsx("p",{className:"text-muted-foreground text-center text-xs",children:"Your wallet is registered. Winners receive a tradeable shirt NFT token!"}),e.jsxs("div",{className:"w-full bg-muted/30 rounded-lg p-3 text-center border border-green-500/20",children:[e.jsx("p",{className:"text-[10px] text-muted-foreground mb-0.5",children:"Registered wallet"}),e.jsxs("p",{className:"font-mono text-xs font-medium text-primary",children:[r==null?void 0:r.slice(0,10),"...",r==null?void 0:r.slice(-8)]})]})]}):e.jsxs(t.div,{className:"flex flex-col items-center py-4 gap-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:[e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:"p-3 rounded-full bg-gradient-to-br from-primary/20 via-purple-500/20 to-pink-500/20",children:e.jsx(y,{className:"h-8 w-8 text-primary"})}),e.jsx("h3",{className:"text-lg font-bold text-center bg-gradient-to-r from-primary via-purple-500 to-pink-500 bg-clip-text text-transparent",children:"Enter the Giveaway"}),e.jsxs("p",{className:"text-muted-foreground text-center text-xs",children:["Register for a chance to win one of ",H," shirt NFT tokens!"]})]}),e.jsxs("div",{className:"w-full bg-muted/30 rounded-lg p-3 text-center border border-border/50",children:[e.jsx("p",{className:"text-[10px] text-muted-foreground mb-0.5",children:"Your wallet"}),e.jsxs("p",{className:"font-mono text-xs font-medium",children:[r==null?void 0:r.slice(0,10),"...",r==null?void 0:r.slice(-8)]})]}),e.jsx(L,{onClick:U,className:"w-full bg-gradient-to-r from-primary via-purple-500 to-pink-500 hover:opacity-90",disabled:p,children:p?e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"h-4 w-4 mr-2 animate-spin"}),"Registering..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"h-4 w-4 mr-2"}),"Register Now"]})}),e.jsxs("p",{className:"text-[10px] text-muted-foreground text-center flex items-center gap-1",children:[e.jsx(f,{className:"h-2.5 w-2.5"}),"No personal information required",e.jsx(f,{className:"h-2.5 w-2.5"})]})]}):e.jsxs(t.div,{className:"flex flex-col items-center justify-center py-6 gap-4",initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},children:[e.jsxs(t.div,{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:"p-3 rounded-full bg-gradient-to-br from-primary/20 via-purple-500/20 to-pink-500/20 relative",children:e.jsx(B,{className:"h-8 w-8 text-primary relative z-10"})}),e.jsx("h3",{className:"text-lg font-bold text-center bg-gradient-to-r from-primary via-purple-500 to-pink-500 bg-clip-text text-transparent",children:"Connect to Enter"}),e.jsx("p",{className:"text-muted-foreground text-center text-xs max-w-xs",children:"Connect your wallet for a chance to receive a limited edition shirt NFT!"})]}),e.jsx(t.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:e.jsxs(L,{size:"default",onClick:s,className:"gap-2 bg-gradient-to-r from-primary via-purple-500 to-pink-500 hover:opacity-90",children:[e.jsx(B,{className:"h-4 w-4"}),"Connect Wallet"]})})]});return e.jsx(J,{children:e.jsxs("div",{className:"relative min-h-screen overflow-hidden",children:[e.jsx("div",{className:"fixed inset-0 pointer-events-none overflow-hidden",children:Array.from({length:15}).map((n,l)=>e.jsx(ie,{delay:l*.8,duration:8+Math.random()*4,size:10+Math.random()*20,left:`${Math.random()*100}%`},l))}),e.jsx("div",{className:"fixed top-0 left-1/4 w-96 h-96 bg-primary/10 rounded-full blur-3xl pointer-events-none"}),e.jsx("div",{className:"fixed bottom-0 right-1/4 w-96 h-96 bg-purple-500/10 rounded-full blur-3xl pointer-events-none"}),e.jsxs("div",{className:"max-w-4xl mx-auto py-4 px-4 relative z-10",children:[e.jsxs(t.div,{className:"text-center mb-4",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[e.jsxs(t.div,{className:"inline-flex p-3 rounded-full bg-gradient-to-br from-primary/20 via-purple-500/20 to-pink-500/20 mb-3 relative",animate:{rotate:[0,5,-5,0]},transition:{duration:4,repeat:1/0},children:[e.jsx(t.div,{className:"absolute inset-0 rounded-full",style:{background:"conic-gradient(from 0deg, hsl(var(--primary) / 0.3), purple, pink, hsl(var(--primary) / 0.3))"},animate:{rotate:360},transition:{duration:8,repeat:1/0,ease:"linear"}}),e.jsx(y,{className:"h-8 w-8 text-primary relative z-10"})]}),e.jsx(t.h1,{className:"text-2xl md:text-3xl font-bold mb-1",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:e.jsx("span",{className:"bg-gradient-to-r from-primary via-purple-500 to-pink-500 bg-clip-text text-transparent",children:"Shirt NFT Giveaway"})}),e.jsxs(t.p,{className:"text-muted-foreground text-sm",initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.2},children:["Limited batch of ",e.jsx("span",{className:"font-bold text-primary",children:m})," tradeable tokens"]}),e.jsxs(t.div,{className:"inline-flex items-center gap-1.5 mt-2 px-3 py-1.5 rounded-full bg-gradient-to-r from-primary/10 via-purple-500/10 to-pink-500/10 border border-primary/20",animate:{scale:[1,1.02,1]},transition:{duration:2,repeat:1/0},children:[e.jsx("span",{children:"â¡"}),e.jsx("span",{className:"text-xs font-medium",children:"Like Unisocks, but for PolyMarketScan"})]})]}),e.jsx("div",{className:"mb-4",children:e.jsx(ne,{circulating:T.circulating,burned:T.burned})}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-4 items-stretch",children:[e.jsx(t.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.3},className:"h-full",children:e.jsxs(b,{className:"border-primary/20 bg-gradient-to-br from-card via-card to-primary/5 overflow-hidden relative h-full flex flex-col",children:[e.jsxs(j,{className:"pb-2",children:[e.jsxs(v,{className:"flex items-center gap-2 text-base",children:[e.jsx(z,{className:"h-4 w-4 text-primary"}),"Enter the Giveaway"]}),e.jsx(P,{className:"text-xs",children:a?"Register your wallet for a chance to win":"Connect your wallet to get started"})]}),e.jsxs(N,{className:"flex-1 flex flex-col pt-0",children:[e.jsx("div",{className:"flex-1 flex items-center justify-center",children:A()}),e.jsx("div",{className:"space-y-1.5 mt-3 pt-3 border-t border-border/50",children:[{text:"Tradeable NFT token",icon:"ð"},{text:"Redeem anytime for physical shirt",icon:"ð"},{text:"Free worldwide shipping",icon:"ð"}].map(n=>e.jsxs("div",{className:"flex items-center gap-2 text-xs p-1.5 rounded bg-muted/30",children:[e.jsx("span",{children:n.icon}),e.jsx("span",{children:n.text})]},n.text))})]})]})}),e.jsx(t.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.4},className:"h-full",children:e.jsxs(b,{className:"overflow-hidden border-primary/20 bg-gradient-to-br from-card via-card to-purple-500/5 relative h-full",children:[e.jsxs(j,{className:"pb-2",children:[e.jsxs(v,{className:"flex items-center gap-2 text-base",children:[e.jsx(f,{className:"h-4 w-4 text-purple-500"}),"Exclusive Merch"]}),e.jsx(P,{className:"text-xs",children:"Limited edition PolyMarketScan design"})]}),e.jsx(N,{className:"pt-0",children:e.jsx(se,{})})]})})]})]})]})})};export{He 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.