1var b=(s,t,l)=>new Promise((c,d)=>{var g=a=>{try{r(l.next(a))}catch(i){d(i)}},n=a=>{try{r(l.throw(a))}catch(i){d(i)}},r=a=>a.done?c(a.value):Promise.resolve(a.value).then(g,n);r((l=l.apply(s,t)).next())});import{j as e,r as h}from"./vendor-CGQSKER-.js";import{F as k,G as A,H as $,I as v}from"./index-4_cKO1GI.js";import{L as N,T as f,r as C,c as S}from"./ui-libs-DbZ9k2Vy.js";import{S as L}from"./SEO-DvxOZlmj.js";import{A as U}from"./AdUnit-DbCa6UqK.js";import"./supabase-DjcmmUCl.js";import"./GameIcon-B7Y1gsji.js";function P({achievement:s,unlocked:t,progress:l=0}){const c=k(s.rarity);return e.jsx("div",{className:`relative bg-gradient-to-br ${t?`${c} p-[2px]`:"from-slate-700 to-slate-800 p-[1px]"} rounded-xl overflow-hidden transition-all hover:scale-105 ${t?"hover:shadow-lg":""}`,children:e.jsxs("div",{className:"bg-slate-900 rounded-xl p-4 h-full",children:[e.jsx("div",{className:"text-center mb-3",children:e.jsx("div",{className:`text-5xl ${t?"":"grayscale opacity-40"}`,children:t?s.icon:e.jsx(N,{className:"w-12 h-12 mx-auto text-slate-600"})})}),e.jsx("h3",{className:`text-lg font-bold text-center mb-2 ${t?"text-white":"text-slate-500"}`,children:s.name}),e.jsx("p",{className:`text-sm text-center mb-3 ${t?"text-slate-300":"text-slate-600"}`,children:s.description}),e.jsx("div",{className:"flex justify-center mb-2",children:e.jsx("span",{className:`text-xs px-3 py-1 rounded-full font-semibold ${t?`bg-gradient-to-r ${c} text-white`:"bg-slate-800 text-slate-500"}`,children:s.rarity.toUpperCase()})}),!t&&l>0&&e.jsxs("div",{className:"mt-3",children:[e.jsxs("div",{className:"flex justify-between text-xs text-slate-500 mb-1",children:[e.jsx("span",{children:"Progress"}),e.jsxs("span",{children:[Math.round(l),"%"]})]}),e.jsx("div",{className:"w-full bg-slate-800 rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:"bg-gradient-to-r from-blue-500 to-cyan-500 h-full transition-all duration-500",style:{width:`${l}%`}})})]}),t&&e.jsx("div",{className:"absolute top-2 right-2",children:e.jsx("div",{className:"w-8 h-8 bg-green-500 rounded-full flex items-center justify-center",children:e.jsx("span",{className:"text-white text-lg",children:"â"})})})]})})}function H(){const[s,t]=h.useState([]),[l,c]=h.useState([]),[d,g]=h.useState(!0),[n,r]=h.useState("all");h.useEffect(()=>{a()},[]);const a=()=>b(this,null,function*(){g(!0);const m=yield A(),u=$(m),w=u.map(j=>j.id),y=v.filter(j=>!w.includes(j.id));t(u),c(y),g(!1)}),i=v.length,x=s.length,o=Math.round(x/i*100),p=n==="unlocked"?s:n==="locked"?l:[...s,...l];return e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Achievements - ArcadePocket",description:`Track your progress and unlock 23 achievements. ${x} unlocked so far!`,url:"https://arcadepocket.com/achievements"}),e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[e.jsx(f,{className:"w-8 h-8 sm:w-10 sm:h-10 text-yellow-400"}),e.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-white",children:"Achievements"}),e.jsx(f,{className:"w-8 h-8 sm:w-10 sm:h-10 text-yellow-400"})]}),e.jsx("p",{className:"text-slate-400 text-lg mb-6",children:"Unlock achievements by playing games and completing challenges"}),e.jsxs("div",{className:"max-w-2xl mx-auto bg-gradient-to-br from-slate-800 to-slate-900 rounded-xl p-6 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"text-left",children:[e.jsxs("div",{className:"text-4xl font-bold text-white",children:[x,"/",i]}),e.jsx("div",{className:"text-sm text-slate-400",children:"Achievements Unlocked"})]}),e.jsx("div",{className:"text-6xl",children:o>=100?"ð":o>=75?"ð":o>=50?"â":o>=25?"ð¯":"ð®"})]}),e.jsx("div",{className:"w-full bg-slate-700 rounded-full h-4 overflow-hidden",children:e.jsx("div",{className:"bg-gradient-to-r from-yellow-500 to-orange-500 h-full transition-all duration-500",style:{width:`${o}%`}})}),e.jsxs("div",{className:"text-right text-sm text-slate-400 mt-2",children:[o,"% Complete"]})]})]}),e.jsxs("div",{className:"flex justify-center gap-2 sm:gap-4 mb-8",children:[e.jsxs("button",{onClick:()=>r("all"),className:`px-4 sm:px-6 py-2 rounded-lg font-semibold transition-all ${n==="all"?"bg-gradient-to-r from-blue-600 to-cyan-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:[e.jsx(C,{className:"w-4 h-4 inline mr-2"}),"All (",i,")"]}),e.jsxs("button",{onClick:()=>r("unlocked"),className:`px-4 sm:px-6 py-2 rounded-lg font-semibold transition-all ${n==="unlocked"?"bg-gradient-to-r from-green-600 to-emerald-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:[e.jsx(S,{className:"w-4 h-4 inline mr-2"}),"Unlocked (",x,")"]}),e.jsxs("button",{onClick:()=>r("locked"),className:`px-4 sm:px-6 py-2 rounded-lg font-semibold transition-all ${n==="locked"?"bg-gradient-to-r from-slate-600 to-slate-700 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:[e.jsx(N,{className:"w-4 h-4 inline mr-2"}),"Locked (",i-x,")"]})]}),d&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"text-6xl mb-4 animate-pulse",children:"ð"}),e.jsx("div",{className:"text-xl text-white",children:"Loading achievements..."})]}),!d&&e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-6",children:p.map(m=>e.jsx(P,{achievement:m,unlocked:s.some(u=>u.id===m.id)},m.id))}),!d&&p.length===0&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"text-6xl mb-4",children:"ð¯"}),e.jsx("div",{className:"text-xl text-white mb-2",children:"No achievements here yet"}),e.jsx("div",{className:"text-slate-400",children:"Keep playing to unlock more!"})]}),e.jsx("div",{className:"mt-8 max-w-4xl mx-auto",children:e.jsx(U,{slot:"9461258590",format:"multiplex",lazy:!0,label:"Sponsored"})}),e.jsxs("div",{className:"mt-12 max-w-2xl mx-auto bg-blue-900/20 border border-blue-500/30 rounded-xl p-6 text-center",children:[e.jsx("div",{className:"text-3xl mb-3",children:"ð¡"}),e.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Pro Tip"}),e.jsx("p",{className:"text-slate-300",children:"Play games daily to build your streak and unlock special achievements. Complete daily challenges for bonus progress!"})]})]})]})}export{H 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.