"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3948],{16536:(e,r,t)=>{t.d(r,{Fq:()=>a,M4:()=>c,Tb:()=>o,W9:()=>x,dM:()=>d});let a=["تهران","اصفهان","مشهد","شیراز","تبریز","کرج","اهواز","قم","کرمانشاه","ارومیه","رشت","زاهدان","یزد","همدان","کرمان","بندرعباس","قزوین","ساری","گرگان","بوشهر","زنجان","سنندج","خرم‌آباد","اراک"],s={تهران:"Tehran",اصفهان:"Isfahan",مشهد:"Mashhad",شیراز:"Shiraz",تبریز:"Tabriz",کرج:"Karaj",قم:"Qom",اهواز:"Ahvaz",کرمانشاه:"Kermanshah",ارومیه:"Urmia",رشت:"Rasht",زاهدان:"Zahedan",یزد:"Yazd",همدان:"Hamedan",کرمان:"Kerman",بندرعباس:"Bandar Abbas",قزوین:"Qazvin",ساری:"Sari",گرگان:"Gorgan",بوشهر:"Bushehr",زنجان:"Zanjan",سنندج:"Sanandaj",خرم‌آباد:"Khorramabad",اراک:"Arak"},l={Tehran:"تهران",Isfahan:"اصفهان",Mashhad:"مشهد",Shiraz:"شیراز",Tabriz:"تبریز",Karaj:"کرج",Qom:"قم",Ahvaz:"اهواز",Kermanshah:"کرمانشاه",Urmia:"ارومیه",Rasht:"رشت",Zahedan:"زاهدان",Yazd:"یزد",Hamedan:"همدان",Kerman:"کرمان","Bandar Abbas":"بندرعباس",Qazvin:"قزوین",Sari:"ساری",Gorgan:"گرگان",Bushehr:"بوشهر",Zanjan:"زنجان",Sanandaj:"سنندج",Khorramabad:"خرم‌آباد",Arak:"اراک"},n=Object.entries(l).reduce((e,r)=>{let[t,a]=r;return e[t.toLowerCase()]=a,e},{}),i=Object.keys(l).reduce((e,r)=>(e[r.toLowerCase()]=r,e),{});function o(e){if(!e||"string"!=typeof e)return e;let r=e.trim();if(r in s)return s[r];let t=r.toLowerCase();return t in i?i[t]:e}function d(e){if(!e||"string"!=typeof e)return e;let r=e.trim(),t=r.toLowerCase();return t in n?n[t]:r in s?r:e}function c(e){return!!e&&"string"==typeof e&&e.trim()in s}function x(e){return!!e&&"string"==typeof e&&e.trim().toLowerCase()in i}},77733:(e,r,t)=>{t.d(r,{V:()=>k});var a=t(95155),s=t(12115),l=t(36489),n=t(51834),i=t(3998),o=t(35299),d=t(8198),c=t(68854),x=t(12181),m=t(5917),h=t(1473),u=t(26983),p=t(90368),f=t(20508),g=t(61362),b=t(52987),w=t(75426),j=t(18720),y=t(51950),v=t(41751);function k(e){var r,t,k,N,C,z,A,M,_,L,S,T,O,W;let{open:F,onOpenChange:K,onOpenCreateTable:q,onOpenQuiz:B,onOpenUsernamePrompt:P}=e,{data:R}=(0,l.useSession)(),[Z,D]=(0,s.useState)(null),[E,Q]=(0,s.useState)(!0),[G,I]=(0,s.useState)(!1),[U,X]=(0,s.useState)(0),[H,Y]=(0,s.useState)(0);(0,s.useEffect)(()=>{if(!F)return;let e=!0;return Q(!0),fetch("/api/user/gamification-progress").then(e=>e.json()).then(r=>{e&&r.success&&r.data&&D(r.data)}).catch(e=>{console.error("Failed to load gamification progress:",e),j.o.error("خطا در بارگذاری اطلاعات پیشرفت")}).finally(()=>{e&&Q(!1)}),()=>{e=!1}},[F]);let $=()=>{K(!1),setTimeout(()=>null==B?void 0:B(),150)},V=()=>{K(!1),setTimeout(()=>null==P?void 0:P(),150)},J=null!=(A=null==Z?void 0:Z.hostedSuccessTables)?A:0,ee=null!=(M=null==Z||null==(r=Z.requirements)?void 0:r.minSuccessTables)?M:3,er=Math.min(100,Math.round(J/ee*100)),et=Math.max(null!=(_=null==Z?void 0:Z.hostedPlaymatesCount)?_:0,null!=(L=null==Z?void 0:Z.uniquePlaymatesCount)?L:0),ea=null!=(S=null==Z||null==(t=Z.requirements)?void 0:t.minPlaymates)?S:10,es=Math.min(100,Math.round(et/ea*100)),el=Math.min(55,Math.round(55*Math.min(1,Math.max(ee>0?J/ee:0,ea>0?et/ea:0)))),en=(null!=(T=null==Z?void 0:Z.level)?T:0)>=1,ei=J>=ee||et>=ea,eo=!!(null==R||null==(k=R.user)?void 0:k.archetype),ed=null!=(O=null==Z?void 0:Z.gender)?O:null==R||null==(N=R.user)?void 0:N.gender,ec=null!=(W=null==Z?void 0:Z.ageRange)?W:null==R||null==(C=R.user)?void 0:C.ageRange,ex=!!((0,v.x)(null==Z?void 0:Z.username,null==R||null==(z=R.user)?void 0:z.username)&&ed&&ec),em=15+15*!!eo+15*!!ex+el,eh=en||ei?100:Math.min(100,Math.max(15,em));(0,s.useEffect)(()=>{if(!F){X(0),Y(0);return}if(!E){let e=setTimeout(()=>{if(X(eh),eh>0){let e=performance.now(),r=t=>{let a=Math.min((t-e)/1e3,1);Y(Math.round((1-Math.pow(1-a,3))*eh)),a<1?requestAnimationFrame(r):Y(eh)};requestAnimationFrame(r)}},200);return()=>clearTimeout(e)}},[F,E,eh]);let eu=Math.max(.55,Number((2.4-(H>0?H:E?0:eh)/100*1.85).toFixed(2)));return(0,a.jsx)(n.lG,{open:F,onOpenChange:K,children:(0,a.jsxs)(n.Cf,{dir:"rtl",onOpenAutoFocus:e=>e.preventDefault(),className:"w-[calc(100vw-2.5rem)] max-w-[calc(100vw-2.5rem)] sm:w-full sm:max-w-md p-3 sm:p-4 rounded-3xl bg-white/95 dark:bg-gray-900/95 backdrop-blur-2xl border border-gray-100 dark:border-gray-800 shadow-2xl text-right sm:text-right max-h-[88vh] overflow-y-auto overflow-x-hidden no-scrollbar [scrollbar-width:none] [&::-webkit-scrollbar]:hidden font-vazir box-border [&_[data-slot=dialog-close]]:focus:ring-0 [&_[data-slot=dialog-close]]:focus:ring-offset-0 [&_[data-slot=dialog-close]]:focus:outline-none [&_[data-slot=dialog-close]]:focus-visible:ring-0 [&_[data-slot=dialog-close]]:focus-visible:outline-none [&_[data-slot=dialog-close]]:outline-none [&_[data-slot=dialog-close]]:ring-0",children:[(0,a.jsxs)(n.c7,{className:"text-right sm:text-right space-y-1 pb-0 items-start sm:items-start w-full max-w-full min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 w-full min-w-0",children:[(0,a.jsx)("div",{className:"w-9 h-9 sm:w-10 sm:h-10 rounded-xl bg-gradient-to-br from-slate-900 via-gray-900 to-zinc-950 border border-amber-500/40 shadow-md shadow-orange-500/20 text-white flex items-center justify-center text-lg sm:text-xl shrink-0",children:en?"\uD83D\uDC51":"\uD83D\uDD25"}),(0,a.jsx)("span",{className:"text-[11px] px-2.5 py-0.5 rounded-full font-bold bg-amber-100 dark:bg-amber-950/60 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-800/60 shrink-0 font-vazir",children:en?"سطح ۱ (پلی‌مستر)":"سطح ۰ (میزبان)"})]}),(0,a.jsx)(n.L3,{className:"text-base sm:text-lg font-extrabold text-gray-900 dark:text-white tracking-tight pt-0.5 text-right sm:text-right font-vazir break-words w-full",children:en?"\uD83D\uDC51 شما پلی‌مستر رسمی پلیمو هستید!":"\uD83D\uDC51 مسیر صعود به پلی‌مستر (سطح ۱)"}),(0,a.jsx)(n.rr,{className:"text-[10.5px] sm:text-xs text-gray-600 dark:text-gray-400 leading-snug text-right sm:text-right font-vazir break-words w-full",children:en?(0,a.jsxs)(a.Fragment,{children:["شما به نشان رسمی پلی‌مستر دست یافته‌اید. با ایجاد میزهای بازی جدید، نشان تاج شما در مرکز کره ۳بعدی می‌درخشد و از پاداش"," ",(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400 font-black text-[12px] sm:text-[13.5px]",children:"\xabاعتبار پلیمو\xbb"})," ","بهره‌مند می‌شوید."]}):(0,a.jsxs)(a.Fragment,{children:["فقط کافیه به یکی از دو هدف زیر (\xab۳ میز موفق\xbb یا \xab۱۰ همبازی\xbb) برسی تا به سطح ۱ صعود کنی، تاج طلایی رو به دست بیاری و"," ",(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400 font-black text-[12px] sm:text-[13.5px]",children:"\xabاعتبار پلیمو\xbb"})," ","برات از"," ",(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400 font-black text-[12px] sm:text-[13.5px]",children:"کف ۲٪"})," ","فعال بشه! \uD83D\uDC51"]})})]}),E?(0,a.jsxs)("div",{className:"py-8 flex flex-col items-center justify-center gap-2 text-gray-400 font-vazir",children:[(0,a.jsx)(o.A,{className:"w-7 h-7 animate-spin text-playmo-purple-600"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"در حال دریافت وضعیت پیشرفت..."})]}):(0,a.jsxs)("div",{className:"space-y-1.5 my-0.5 font-vazir w-full max-w-full min-w-0 overflow-hidden box-border",children:[(0,a.jsx)("style",{children:"\n              @keyframes crown-pulse {\n                0%, 100% {\n                  transform: scale(1);\n                  filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.3));\n                }\n                50% {\n                  transform: scale(1.25);\n                  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.85));\n                }\n              }\n            "}),(0,a.jsx)("div",{className:"pt-7 pb-2.5 w-[86%] sm:w-[82%] max-w-xs mx-auto min-w-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 w-full min-w-0",children:[(0,a.jsx)("div",{className:"shrink-0 flex items-center justify-center",title:"نقطه شروع مسیر",children:(0,a.jsx)(d.A,{className:"w-4.5 h-4.5 text-orange-500 fill-orange-400 drop-shadow-xs"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 relative",children:[(0,a.jsxs)("div",{className:"absolute -top-[25px] flex flex-col items-center pointer-events-none z-10",style:{right:"".concat(U,"%"),opacity:U<3?0:1,transform:U<8?"translateX(20%)":U>92?"translateX(80%)":"translateX(50%)",transition:"right 1000ms ease-out, opacity 400ms ease-out"},children:[(0,a.jsxs)("span",{className:"font-vazir font-bold text-[10px] px-2 py-0.5 rounded-full bg-gradient-to-r from-playmo-purple-600 to-indigo-600 text-white shadow-md shadow-playmo-purple-600/30 whitespace-nowrap leading-tight",children:[(0,y.ub)(H),"٪"]}),(0,a.jsx)("div",{className:"w-0 h-0 border-x-4 border-x-transparent border-t-4 border-t-indigo-600 -mt-[1px]"})]}),(0,a.jsx)("div",{dir:"rtl",role:"progressbar","aria-valuenow":eh,"aria-valuemin":0,"aria-valuemax":100,className:"w-full h-3 sm:h-3.5 bg-slate-200/90 dark:bg-slate-800 rounded-full overflow-hidden p-0.5 border border-slate-300/90 dark:border-slate-700 shadow-[inset_0_1.5px_3px_rgba(0,0,0,0.12)] dark:shadow-[inset_0_1.5px_4px_rgba(0,0,0,0.5)] relative",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-1000 ease-out relative shadow-xs ".concat(en||ei?"bg-gradient-to-r from-amber-400 via-orange-500 to-emerald-500":"bg-gradient-to-r from-playmo-purple-600 via-indigo-500 to-playmo-blue-500"),style:{width:"".concat(U,"%")},children:(0,a.jsx)("div",{className:"absolute top-0 bottom-0 left-0 w-2 bg-white/70 blur-[1px] rounded-full shadow-[0_0_8px_rgba(255,255,255,0.9)]"})})})]}),(0,a.jsx)("div",{className:"shrink-0 flex items-center justify-center",style:{animation:"crown-pulse ".concat(eu,"s ease-in-out infinite")},title:"هدف: صعود به پلی‌مستر (سطح ۱)",children:(0,a.jsx)(c.A,{className:"w-4.5 h-4.5 fill-amber-400 text-amber-500 drop-shadow-xs"})})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-2 w-full min-w-0 py-2",children:[(0,a.jsxs)("div",{title:"عضویت در پلیمو",className:"flex flex-col items-center justify-start min-w-0 text-center",children:[(0,a.jsx)("div",{className:"h-8 flex items-center justify-center mb-1.5",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-emerald-50 dark:bg-emerald-950/60 border border-emerald-200/90 dark:border-emerald-800/60 text-emerald-600 dark:text-emerald-400 flex items-center justify-center shadow-2xs",children:(0,a.jsx)(x.A,{className:"w-4 h-4"})}),(0,a.jsx)("div",{className:"absolute -bottom-0.5 -left-0.5 w-3 h-3 rounded-full bg-emerald-500 text-white flex items-center justify-center ring-1.5 ring-white dark:ring-gray-900 shadow-2xs",children:(0,a.jsx)(m.A,{className:"w-2 h-2 stroke-[3]"})})]})}),(0,a.jsx)("div",{className:"h-5 flex items-center justify-center w-full",children:(0,a.jsx)("span",{className:"font-bold text-gray-700 dark:text-gray-300 text-[10.5px] sm:text-[11px] leading-tight font-vazir",children:"عضویت"})})]}),(0,a.jsxs)("div",{title:en||eo?"آزمون آرکیتایپ تکمیل شد":"شروع آزمون آرکیتایپ",onClick:en||eo?void 0:$,className:"flex flex-col items-center justify-start min-w-0 text-center ".concat(en||eo?"":"cursor-pointer"),children:[(0,a.jsx)("div",{className:"h-8 flex items-center justify-center mb-1.5",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full flex items-center justify-center shadow-2xs ".concat(en||eo?"bg-emerald-50 dark:bg-emerald-950/60 border border-emerald-200/90 dark:border-emerald-800/60 text-emerald-600 dark:text-emerald-400":"bg-amber-50 dark:bg-amber-950/60 border border-amber-200/90 dark:border-amber-800/60 text-amber-600 dark:text-amber-400"),children:(0,a.jsx)(h.A,{className:"w-4 h-4"})}),(0,a.jsx)("div",{className:"absolute -bottom-0.5 -left-0.5 w-3 h-3 rounded-full flex items-center justify-center ring-1.5 ring-white dark:ring-gray-900 shadow-2xs ".concat(en||eo?"bg-emerald-500 text-white":"bg-amber-500 text-white"),children:en||eo?(0,a.jsx)(m.A,{className:"w-2 h-2 stroke-[3]"}):(0,a.jsx)(u.A,{className:"w-2 h-2 stroke-[2.5]"})})]})}),(0,a.jsx)("div",{className:"h-5 flex items-center justify-center w-full",children:en||eo?(0,a.jsx)("span",{className:"font-bold text-gray-700 dark:text-gray-300 text-[10.5px] sm:text-[11px] leading-tight font-vazir",children:"آرکیتایپ"}):(0,a.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),$()},className:"p-0 m-0 border-0 bg-transparent font-bold text-playmo-purple-600 hover:text-playmo-purple-700 dark:text-playmo-purple-400 flex items-center justify-center gap-0.5 hover:underline cursor-pointer text-[10.5px] sm:text-[11px] leading-tight font-vazir",children:[(0,a.jsx)("span",{children:"آرکیتایپ"}),(0,a.jsx)(p.A,{className:"w-2.5 h-2.5 shrink-0"})]})})]}),(0,a.jsxs)("div",{title:en||ex?"پروفایل تکمیل شد":"تکمیل پروفایل",onClick:en||ex?void 0:V,className:"flex flex-col items-center justify-start min-w-0 text-center ".concat(en||ex?"":"cursor-pointer"),children:[(0,a.jsx)("div",{className:"h-8 flex items-center justify-center mb-1.5",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full flex items-center justify-center shadow-2xs ".concat(en||ex?"bg-emerald-50 dark:bg-emerald-950/60 border border-emerald-200/90 dark:border-emerald-800/60 text-emerald-600 dark:text-emerald-400":"bg-playmo-purple-50 dark:bg-purple-950/60 border border-playmo-purple-200/90 dark:border-purple-800/60 text-playmo-purple-600 dark:text-playmo-purple-400"),children:(0,a.jsx)(f.A,{className:"w-4 h-4"})}),(0,a.jsx)("div",{className:"absolute -bottom-0.5 -left-0.5 w-3 h-3 rounded-full flex items-center justify-center ring-1.5 ring-white dark:ring-gray-900 shadow-2xs ".concat(en||ex?"bg-emerald-500 text-white":"bg-playmo-purple-500 text-white"),children:en||ex?(0,a.jsx)(m.A,{className:"w-2 h-2 stroke-[3]"}):(0,a.jsx)(u.A,{className:"w-2 h-2 stroke-[2.5]"})})]})}),(0,a.jsx)("div",{className:"h-5 flex items-center justify-center w-full",children:en||ex?(0,a.jsx)("span",{className:"font-bold text-gray-700 dark:text-gray-300 text-[10.5px] sm:text-[11px] leading-tight font-vazir",children:"پروفایل"}):(0,a.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),V()},className:"p-0 m-0 border-0 bg-transparent font-bold text-playmo-purple-600 hover:text-playmo-purple-700 dark:text-playmo-purple-400 flex items-center justify-center gap-0.5 hover:underline cursor-pointer text-[10.5px] sm:text-[11px] leading-tight font-vazir whitespace-nowrap",children:[(0,a.jsx)("span",{children:"تکمیل پروفایل"}),(0,a.jsx)(p.A,{className:"w-2.5 h-2.5 shrink-0"})]})})]})]}),(0,a.jsx)("div",{className:"flex items-center justify-between py-1 px-2 sm:py-1.5 sm:px-2.5 rounded-xl w-full min-w-0 gap-2 transition-all ".concat(en||ei?"bg-emerald-50/70 dark:bg-emerald-950/30 border border-emerald-200/80 dark:border-emerald-800/50":"bg-gray-50/90 dark:bg-gray-800/60 border border-gray-200/80 dark:border-gray-700/60"),children:(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[en||ei?(0,a.jsx)(g.A,{className:"w-3.5 h-3.5 text-emerald-500 shrink-0"}):(0,a.jsx)(u.A,{className:"w-3.5 h-3.5 text-playmo-purple-500 shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-gray-700 dark:text-gray-300 truncate text-[11px] sm:text-xs",children:en||ei?"مأموریت نهایی تکمیل شد!":"گام نهایی: ۳ میز موفق یا ۱۰ همبازی"})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-1.5 sm:gap-2 w-full min-w-0",children:[(0,a.jsxs)("div",{className:"p-2 sm:p-2.5 rounded-2xl border transition-all flex flex-col justify-between gap-1.5 ".concat(J>=ee?"bg-emerald-50/80 dark:bg-emerald-950/40 border-emerald-300/80 dark:border-emerald-700/60 shadow-xs":"bg-white/80 dark:bg-gray-800/80 border-gray-200/90 dark:border-gray-700/70 shadow-2xs"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 w-full min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-col items-start min-w-0 flex-1 text-right",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsxs)("span",{className:"font-vazir font-black text-base sm:text-lg text-gray-900 dark:text-white tracking-tight leading-none",children:[(0,y.ub)(J)," / ",(0,y.ub)(ee)]}),J>=ee&&(0,a.jsx)(m.A,{className:"w-3.5 h-3.5 text-emerald-600 dark:text-emerald-400 stroke-[3]"})]}),(0,a.jsx)("span",{className:"text-[10px] sm:text-[10.5px] font-bold text-gray-500 dark:text-gray-400 mt-1 truncate font-vazir leading-none",children:"۳ میز موفق"})]}),(0,a.jsx)("div",{className:"w-10 h-10 sm:w-11 sm:h-11 rounded-xl bg-gradient-to-br from-emerald-500/15 via-emerald-500/10 to-teal-500/5 border border-emerald-500/25 dark:border-emerald-500/30 flex items-center justify-center shrink-0 shadow-xs shadow-emerald-500/10",children:(0,a.jsxs)("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400 drop-shadow-xs",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{x:"2.5",y:"3.5",width:"6.5",height:"10",rx:"1.2",transform:"rotate(-26 5.75 13.5)",fill:"currentColor",fillOpacity:"0.18",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,a.jsx)("rect",{x:"6.5",y:"2.5",width:"6.5",height:"10",rx:"1.2",transform:"rotate(-4 9.75 12.5)",fill:"currentColor",fillOpacity:"0.32",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,a.jsx)("rect",{x:"10.5",y:"3",width:"6.5",height:"10",rx:"1.2",transform:"rotate(18 13.75 13)",fill:"currentColor",fillOpacity:"0.22",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M9.8 5.3L11 7L9.8 8.7L8.6 7Z",fill:"currentColor",fillOpacity:"0.85"}),(0,a.jsxs)("g",{transform:"rotate(-10 17.1 17.1)",children:[(0,a.jsx)("rect",{x:"13.2",y:"13.2",width:"7.8",height:"7.8",rx:"2",fill:"currentColor",fillOpacity:"0.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,a.jsx)("circle",{cx:"15.1",cy:"15.1",r:"0.8",fill:"white"}),(0,a.jsx)("circle",{cx:"17.1",cy:"17.1",r:"0.8",fill:"white"}),(0,a.jsx)("circle",{cx:"19.1",cy:"19.1",r:"0.8",fill:"white"})]})]})})]}),(0,a.jsx)("div",{className:"w-full h-1 bg-gray-100 dark:bg-gray-700/80 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-gradient-to-r from-emerald-500 to-teal-500 rounded-full transition-all duration-500",style:{width:"".concat(er,"%")}})})]}),(0,a.jsxs)("div",{className:"p-2 sm:p-2.5 rounded-2xl border transition-all flex flex-col justify-between gap-1.5 ".concat(et>=ea?"bg-emerald-50/80 dark:bg-emerald-950/40 border-emerald-300/80 dark:border-emerald-700/60 shadow-xs":"bg-white/80 dark:bg-gray-800/80 border-gray-200/90 dark:border-gray-700/70 shadow-2xs"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 w-full min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-col items-start min-w-0 flex-1 text-right",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsxs)("span",{className:"font-vazir font-black text-base sm:text-lg text-gray-900 dark:text-white tracking-tight leading-none",children:[(0,y.ub)(et)," / ",(0,y.ub)(ea)]}),et>=ea&&(0,a.jsx)(m.A,{className:"w-3.5 h-3.5 text-emerald-600 dark:text-emerald-400 stroke-[3]"})]}),(0,a.jsx)("span",{className:"text-[10px] sm:text-[10.5px] font-bold text-gray-500 dark:text-gray-400 mt-1 truncate font-vazir leading-none",children:"۱۰ همبازی"})]}),(0,a.jsx)("div",{className:"w-10 h-10 sm:w-11 sm:h-11 rounded-xl bg-gradient-to-br from-playmo-purple-500/15 via-purple-500/10 to-indigo-500/5 border border-playmo-purple-500/25 dark:border-purple-500/30 flex items-center justify-center shrink-0 shadow-xs shadow-purple-500/10",children:(0,a.jsxs)("svg",{className:"w-6 h-6 text-playmo-purple-600 dark:text-playmo-purple-400 drop-shadow-xs",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("circle",{cx:"12",cy:"7",r:"3",fill:"currentColor",fillOpacity:"0.3",stroke:"currentColor",strokeWidth:"1.75"}),(0,a.jsx)("path",{d:"M7 19C7 15.5 9 13.5 12 13.5C15 13.5 17 15.5 17 19",fill:"currentColor",fillOpacity:"0.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,a.jsx)("circle",{cx:"5",cy:"9.5",r:"2.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M1.5 19C1.5 16.5 3 15 5 15C6.2 15 7.1 15.5 7.8 16.3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,a.jsx)("circle",{cx:"19",cy:"9.5",r:"2.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M22.5 19C22.5 16.5 21 15 19 15C17.8 15 16.9 15.5 16.2 16.3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})]}),(0,a.jsx)("div",{className:"w-full h-1 bg-gray-100 dark:bg-gray-700/80 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-gradient-to-r from-playmo-purple-600 to-indigo-500 rounded-full transition-all duration-500",style:{width:"".concat(es,"%")}})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-3 sm:pt-4 w-full min-w-0",children:[(0,a.jsxs)(i.$,{onClick:()=>{K(!1),setTimeout(()=>q(),150)},className:"w-full h-9 sm:h-10 py-1.5 sm:py-2 px-3 rounded-xl bg-gradient-to-r from-playmo-purple-600 to-playmo-blue-600 hover:from-playmo-purple-700 hover:to-playmo-blue-700 text-white font-bold shadow-md shadow-playmo-purple-500/20 active:scale-95 transition-all flex items-center justify-center gap-2 border-0 cursor-pointer font-vazir text-xs whitespace-normal text-center leading-normal",children:[(0,a.jsx)("span",{children:en?"\uD83C\uDFB2 ساخت میز جدید (دریافت پاداش نقدی)":"\uD83C\uDFB2 همین حالا اولین میزت رو بچین!"}),(0,a.jsx)(b.A,{className:"w-3.5 h-3.5 rotate-180 shrink-0"})]}),(0,a.jsxs)(i.$,{type:"button",variant:"outline",onClick:()=>{var e;let r=window.location.origin,t=(null==Z?void 0:Z.referralCode)||(null==R||null==(e=R.user)?void 0:e.referralCode)||null;if(!t)return void j.o.error("کد معرف شما در حال آماده‌سازی است. لطفاً چند لحظه دیگر امتحان کنید.");let a="".concat(r,"/invite/").concat(encodeURIComponent(t));"undefined"!=typeof navigator&&navigator.clipboard&&(navigator.clipboard.writeText(a),I(!0),j.o.success("لینک دعوت کپی شد!",{description:"این لینک را برای دوستانت بفرست تا با پیوستن به میزهای تو، همبازی ثبت شود."}),setTimeout(()=>I(!1),2500))},className:"w-full h-8.5 sm:h-9 py-1 px-3 rounded-xl border-gray-200 dark:border-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 flex items-center justify-center gap-1.5 text-[11px] font-semibold cursor-pointer font-vazir whitespace-normal text-center leading-normal",children:[G?(0,a.jsx)(m.A,{className:"w-3.5 h-3.5 text-emerald-600 shrink-0"}):(0,a.jsx)(w.A,{className:"w-3.5 h-3.5 shrink-0"}),(0,a.jsx)("span",{children:G?"کپی شد":"\uD83D\uDD17 با لینک دعوت، دوستاتو به بازی بیار"})]})]})]})]})})}}}]);