try{constresults=candidates.length?awaitenv.DB.batch(candidates.map(r=>env.DB!.prepare('INSERT OR IGNORE INTO transactions (id,date,player,reason,amount,imported_at,imported_by) VALUES (?,?,?,?,?,?,?)').bind(r.id,r.date,r.player,r.reason,r.amount,newDate().toISOString(),user!.userId))):[];constadded=results.reduce((n,r)=>n+(r.meta.changes||0),0);returnResponse.json({added,duplicates:rows.length-added,total:rows.length});}catch{returnResponse.json({error:'ذخیره انجام نشد؛ دوباره تلاش کنید.'},{status:503});}
{adminMode&&<section className="admin-panel"><div className="section-title"><div><div className="eyebrow">KEEP THE VAULT UP TO DATE</div><h2>ورود لاگ خزانه</h2></div><Lock size={23}/></div><p>خروجی بازی را همراه عنوان ستونها اینجا پیست کن. پیشنمایش را بررسی و سپس ثبت کن.</p><textarea aria-label="لاگ تراکنشها" dir="ltr" placeholder={'"Date"\t"Player"\t"Reason"\t"Amount"'} value={log} onChange={e=>setLog(e.target.value)}/>{preview&&<div className={preview.error?'noticeerror':'notice'}>{preview.error||`${preview.total} ردیف · ${preview.fresh} جدید · ${preview.duplicates} تکراری`}</div>}<button className="primary" disabled={!preview||!!preview.error||saving||loading||!!error} onClick={importLog}><Upload size={17}/>{saving?'درحالثبت…':'ادغاموثبتتراکنشها'}</button>{message&&<p role="status">{message}</p>}<small>تشخیص تکرار: زمان، نام بازیکن، نوع و مقدار. لاگ ناقص یا نامعتبر بهطور کامل رد میشود.</small></section>}
<section className="action-banner"><div className="action-icon"><Flame size={23}/></div><div><strong>برای نبرد بعدی، آمادهای؟</strong><p>حداقل {minimum} Siphoned نگه دار. حساب منفی یعنی وقت جبران سهم خزانه است.</p></div><button onClick={()=>{setTab('low');setView('leaderboard');document.getElementById('leaderboard')?.scrollIntoView({behavior:'smooth'});}}>بررسی حسابهای کمموجودی <ChevronLeft size={17}/></button></section>
<footer><span><span className="live-dot"/> {loading?'درحالدریافت…':`آخرین تراکنش: ${rows[0]?.date||'—'}`}</span><button onClick={refresh} disabled={loading}><RefreshCw size={13}/> تازهسازی</button><p>بالانس بر اساس لاگهای ثبتشده است؛ موجودی پیش از اولین لاگ لحاظ نشده است.</p><span dir="ltr">BUILT FOR THE GUILD. POWERED BY YOU.</span></footer></div></main>
{profile&&<div className="modal-backdrop" onClick={()=>setSelected(null)}><section className="modal panel" role="dialog" aria-modal="true" aria-label={'حساب'+profile.name} onClick={e=>e.stopPropagation()}><button className="close" onClick={()=>setSelected(null)} aria-label="بستن"><X/></button><div className="eyebrow">YOUR CONTRIBUTION. YOUR IMPACT.</div><h2 dir="ltr">{profile.name}</h2><span className={'badge'+(profile.balance<0?'bad':profile.balance<minimum?'warn':'good')}>{status(profile.balance)}</span><div className="profile-balance" dir="ltr">{num(profile.balance)} <small>Siphoned</small></div><div className="profile-advice">{profile.balance<minimum?<><AlertTriangle size={20}/><p>برای رسیدن به حداقل مطلوب، <strong>{minimum-profile.balance} Siphoned</strong> به بانک گیلد واریز کن.</p></>:<><CheckCircle2 size={20}/><p>حسابت برای نبرد بعدی آماده است. ممنون از سهمت در خزانه!</p></>}</div><div className="profile-stats"><span>واریز <b className="green">{profile.deposits}</b></span><span>برداشت <b>{profile.withdrawals}</b></span><span>تراکنش <b>{profile.count}</b></span></div><h3>تاریخچهٔ بازیکن</h3><div className="profile-history">{rows.filter(r=>r.player.toLowerCase()===profile.name.toLowerCase()).map(r=><div key={identity(r)}><span>{r.reason==='Deposit'?'واریز':'برداشت'}<small dir="ltr">{r.date}</small></span><b className={r.amount>0?'green':'red'} dir="ltr">{r.amount>0?'+':''}{r.amount}</b></div>)}</div><button className="primary" onClick={async()=>{try{await navigator.clipboard.writeText(`${profile.name} | Balance: ${profile.balance} Siphoned | Target: ${minimum}`);setMessage('خلاصهکپیشد.');}catch{setMessage('امکانکپیدراینمرورگرنیست.');}}}><Copysize={15}/>کپیخلاصهٔحساب</button>{message&&<smallrole="status">{message}</small>}</section></div>}</div>;
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.