PageSourceSearch

https://blockparty.game/assets/chunks/HistoryScreen-SRIZPJSM.js

js blockparty.game collected 2026-10-02 15:45:14 UTC 13,462 bytes, 1 lines download raw bytes

1import{a as mt}from"./chunk-ZLUGVYST.js";import{a as ft}from"./chunk-EUQTP7HW.js";import{a as gt}from"./chunk-DLK7667U.js";import{c as Xe}from"./chunk-YXWSQ7JL.js";import{a as ut}from"./chunk-BY2XTBC4.js";import{a as pt,b as He}from"./chunk-DUU7DRKT.js";import{a as Ve}from"./chunk-R5OCO5BS.js";import"./chunk-NNJHPCI5.js";import"./chunk-KERAD7SJ.js";import"./chunk-NC22ADEA.js";import"./chunk-IWDOFJ6Q.js";import{$ as xe,C as he,Ca as vt,D as $t,Ea as Qe,F as z,I as dt,J as ot,Ka as _t,N as E,P as v,R as Fe,S as Ke,T as $,U as u,Y as I,Ya as Y,_ as ct,g as x,i as l,ia as re,ja as X,l as Q,la as We,m as i,ma as Ge,n as le,pa as B,r as s,s as V,t as n,v as e,w as rt,wa as be,y as Ee}from"./chunk-ZLKLRZDC.js";import"./chunk-JJ75YLVJ.js";var Ot=v('<div class="grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-5"><select><option>Any status</option><option>Pending</option><option>Judging</option><option>Complete</option></select> <input type="date"> <input type="date"> <input type="text" placeholder="User name..."> <input type="text" placeholder="Showdown UUID or challenge..."></div>'),Rt=v('<span class="text-zinc-500">\xB7</span> <span class="text-zinc-300"> </span> <button type="button" class="text-zinc-400 underline transition hover:text-white">Clear</button>',1),At=v('<div class="flex h-20 w-20 items-center justify-center rounded-lg bg-zinc-700/50 text-xs text-zinc-500">no subs</div>'),Bt=v('<img alt="" class="h-full w-full object-cover">'),Jt=v('<div class="absolute inset-x-0 bottom-0 bg-black/60 py-0.5 text-center text-[10px] font-bold text-white"> </div>'),Kt=v("<div><!> <!></div>"),Wt=v('<span class="truncate text-sm text-zinc-200"> </span>'),Gt=v('<div><button type="button" class="flex shrink-0 cursor-pointer items-center justify-center border-r border-zinc-700 bg-zinc-900/40 px-3 select-none" aria-label="Select matchup"><input type="checkbox" tabindex="-1" readonly="" class="pointer-events-none h-4 w-4 accent-red-500"></button> <button type="button" class="flex min-w-0 flex-1 items-center gap-3 py-3 pr-4 pl-3 text-left"><div class="flex items-center gap-2"><!></div> <div class="min-w-0 flex-1"><div class="mb-1 flex items-center gap-2"><!> <!></div> <div class="text-xs text-zinc-400"> </div></div> <div class="text-right"><div class="font-mono text-lg text-white"> </div> <div class="text-xs text-zinc-500">votes</div></div></button></div>'),Qt=v('<div class="mt-6 text-center"><!></div>'),Vt=v('<div class="space-y-3"></div> <!>',1),Xt=v('<!> <div class="mb-3 flex flex-wrap items-center justify-between gap-3 text-sm"><div class="flex items-center gap-3"><label class="flex cursor-pointer items-center gap-2 text-zinc-300"><input type="checkbox" class="h-4 w-4 accent-red-500"> <span>Select all on page</span></label> <!></div> <!></div> <!>',1),Yt=v('<img alt="" class="h-full w-full object-cover">'),Zt=v('<span class="inline-flex items-center gap-1 font-mono text-xs"><span class="text-zinc-400"> </span> <span> </span></span>'),ei=v('<span class="text-xs text-zinc-500">no SR change</span>'),ti=v('<div class="flex items-start gap-3 rounded-lg bg-zinc-800/60 p-3"><div class="h-12 w-12 shrink-0 overflow-hidden rounded-lg bg-zinc-700"><!></div> <div class="min-w-0 flex-1"><div class="flex items-center gap-2"><span class="rounded bg-zinc-700 px-2 py-0.5 text-xs text-zinc-200"> </span> <span class="truncate text-sm text-zinc-200"> </span></div> <div class="mt-1"><!></div></div></div>'),ii=v('<div class="text-xs text-zinc-500">No cred rewards on this matchup</div>'),si=v('<div class="flex justify-between text-xs text-zinc-300"><span class="truncate"> </span> <span class="font-mono"> </span></div>'),ai=v('<aside class="h-full w-[480px] shrink-0 overflow-y-auto border-l border-zinc-800 bg-zinc-900"><div class="p-6"><div class="mb-4 flex items-center justify-between"><h2 class="text-lg font-semibold text-white">Matchup Detail</h2> <button class="text-zinc-400 transition hover:text-white" aria-label="Close inspector"><svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="mb-4 break-all font-mono text-xs text-zinc-500"> </div> <div class="mb-4 text-sm"><div class="text-zinc-300"> </div> <div class="text-zinc-500"> </div></div> <h3 class="mb-2 text-sm font-semibold text-zinc-300">Submissions</h3> <div class="mb-4 space-y-2"></div> <h3 class="mb-2 text-sm font-semibold text-zinc-300"> </h3> <div class="mb-6 space-y-1"><!></div> <button class="w-full rounded-lg bg-red-600/50 px-4 py-2 text-sm font-medium text-white transition hover:bg-red-500">Hide Invalid Matchup</button></div></aside>'),ni=v('<div class="flex h-full w-full min-h-0"><div class="h-full min-w-0 flex-1"><!></div> <!></div> <!>',1);function li(ht,K){dt(K,!1);let L=x(),Ye=x(),Ze=Y(K,"live",8,null),we=Y(K,"rows",24,()=>[]),ye=Y(K,"list_key",8,0),P=Y(K,"filters",24,()=>({status:"",date_from:"",date_to:"",q_user:"",q_showdown:""})),xt=Y(K,"next_cursor",8,null),F=Y(K,"selected_matchup",8,null),Z="w-full rounded-lg border border-zinc-700 bg-zinc-800/80 px-3 py-2 text-sm text-white outline-none transition focus:border-blue-500",et="Participant entry costs and generation energy will be refunded; votes, submissions, voter rewards, and ratings will be left unchanged.";function ee(t,c,g){var S;(S=Ze())!=null&&S.pushEvent&&Ze().pushEvent(t,c,g)}let te=x(P().status||""),$e=x(P().date_from||""),de=x(P().date_to||""),oe=x(P().q_user||""),ce=x(P().q_showdown||""),ze=x(null),ke=x(null),Te=x(JSON.stringify(P())),Se=null;function tt(){ee("history:filter",{filters:{status:e(te),date_from:e($e),date_to:e(de),q_user:e(oe),q_showdown:e(ce)}})}function qe(){clearTimeout(Se),tt()}function it(){clearTimeout(Se),Se=setTimeout(tt,300)}function bt(){clearTimeout(Se),l(te,""),l($e,""),l(de,""),l(oe,""),l(ce,""),ee("history:clear_filters",{})}let k=x(new Set),ie=x(null),Ne=x(ye());function wt(t,c){c.stopPropagation();let g=new Set(e(k));if(c.shiftKey&&e(ie)&&e(ie)!==t){let S=e(L).indexOf(e(ie)),U=e(L).indexOf(t);if(S>=0&&U>=0){let[O,W]=S<=U?[S,U]:[U,S];for(let M=O;M<=W;M++)g.add(e(L)[M])}else g.add(t)}else g.has(t)?g.delete(t):g.add(t);l(ie,t),l(k,g)}function yt(){let t=new Set(e(k));e(L).length>0&&e(L).every(c=>
1t.has(c))?e(L).forEach(c=>t.delete(c)):e(L).forEach(c=>t.add(c)),l(k,t)}function zt(){l(k,new Set),l(ie,null)}let H=x(null),Ce=x(!1);function st(t){l(H,t)}function kt(){!e(H)||e(Ce)||(l(Ce,!0),ee(e(H).event,e(H).payload,t=>{l(Ce,!1),l(H,null),t!=null&&t.ok?Ve("success",t.message||"Done"):Ve("error",(t==null?void 0:t.error)||"Failed")}))}function St(){let t=[...e(k)];st({title:"Hide invalid matchups",message:`Invalidate and hide ${t.length} selected matchups? ${et}`,confirmLabel:"Invalidate",danger:!0,event:"history:invalidate_selected",payload:{ids:t}})}function qt(t){st({title:"Hide invalid matchup",message:`Invalidate and hide this matchup? ${et}`,confirmLabel:"Invalidate",danger:!0,event:"history:invalidate",payload:{id:t}})}function Ct(t){ee("history:view",{id:t})}function It(){ee("history:close",{})}function Pt(){ee("history:load_more",{})}function jt(t){var c,g;return((c=t==null?void 0:t.sr_after)!=null?c:0)-((g=t==null?void 0:t.sr_before)!=null?g:0)}he(()=>(Ee(P()),e(Te),e(ze),e(ke)),()=>{let t=JSON.stringify(P());t!==e(Te)&&(l(Te,t),l(te,P().status||""),l($e,P().date_from||""),l(de,P().date_to||""),document.activeElement!==e(ze)&&l(oe,P().q_user||""),document.activeElement!==e(ke)&&l(ce,P().q_showdown||""))}),he(()=>(Ee(ye()),e(Ne)),()=>{ye()!==e(Ne)&&(l(Ne,ye()),l(k,new Set),l(ie,null))}),he(()=>Ee(we()),()=>{l(L,we().map(t=>t.id))}),he(()=>(e(L),e(k)),()=>{l(Ye,e(L).length>0&&e(L).every(t=>e(k).has(t)))}),$t(),_t();var at=ni(),Ue=V(at),De=s(Ue),Lt=s(De);pt(Lt,{title:"Matchup History",subtitle:"Snapshot browser \u2014 filters, paging, and the inspector live in the URL",backHref:"/showdowns/matchups",maxWidth:"max-w-5xl",children:(t,c)=>{var g=Xt(),S=V(g);mt(S,{title:"Filters",class:"mb-6",children:(o,T)=>{var f=Ot(),m=s(f);z(()=>{e(te),rt(()=>{})}),B(m,re(Z));var q=s(m);q.value=((q.__value="")==null,"");var r=n(q);r.value=(r.__value="pending")==null?"":"pending";var a=n(r);a.value=(a.__value="judging")==null?"":"judging";var b=n(a);b.value=(b.__value="complete")==null?"":"complete",i(m);var h=n(m,2);X(h),B(h,re(Z));var j=n(h,2);X(j),B(j,re(Z));var _=n(j,2);X(_),B(_,re(Z)),Qe(_,d=>l(ze,d),()=>e(ze));var w=n(_,2);X(w),B(w,re(Z)),Qe(w,d=>l(ke,d),()=>e(ke)),i(f),vt(m,()=>e(te),d=>l(te,d)),E("change",m,qe),be(h,()=>e($e),d=>l($e,d)),E("change",h,qe),be(j,()=>e(de),d=>l(de,d)),E("change",j,qe),be(_,()=>e(oe),d=>l(oe,d)),E("input",_,it),be(w,()=>e(ce),d=>l(ce,d)),E("input",w,it),$(o,f)},$$slots:{default:!0,actions:(o,T)=>{He(o,{size:"sm",variant:"ghost",$$events:{click:bt},children:(f,m)=>{le();var q=Fe("Clear filters");$(f,q)},$$slots:{default:!0}})}}});var U=n(S,2),O=s(U),W=s(O),M=s(W);X(M),le(2),i(W);var ve=n(W,2);{var Oe=o=>{var T=Rt(),f=n(V(T),2),m=s(f);i(f);var q=n(f,2);z(()=>{var r;return u(m,`${(r=e(k).size)!=null?r:""} selected`)}),E("click",q,zt),$(o,T)};I(ve,o=>{e(k).size>0&&o(Oe)})}i(O);var Ie=n(O,2);{var Re=o=>{He(o,{variant:"danger",$$events:{click:St},children:(T,f)=>{le();var m=Fe();z(()=>{var q;return u(m,`Hide ${(q=e(k).size)!=null?q:""}`)}),$(T,m)},$$slots:{default:!0}})};I(Ie,o=>{e(k).size>0&&o(Re)})}i(U);var _e=n(U,2);{var pe=o=>{ft(o,{icon:"\u{1F5C2}\uFE0F",title:"No matchups found",message:"Nothing matches these filters. Try widening the date range or clearing them."})},Ae=o=>{var T=Vt(),f=V(T);xe(f,5,we,r=>r.id,(r,a)=>{var b=Gt();let h=Q(()=>e(k).has(e(a).id)),j=Q(()=>F()&&F().id===e(a).id);var _=s(b),w=s(_);X(w),i(_);var d=n(_,2),D=s(d),ge=s(D);{var Pe=p=>{var C=At();$(p,C)},Be=p=>{var C=Ke(),R=V(C);xe(R,1,()=>e(a).submissions,A=>A.id,(A,J)=>{var Me=Kt(),nt=s(Me);{var Tt=G=>{var ne=Bt();z(()=>Ge(ne,"src",e(J).image)),$(G,ne)};I(nt,G=>{e(J).image&&G(Tt)})}var Nt=n(nt,2);{var Ut=G=>{var ne=Jt(),Dt=s(ne);i(ne),z(()=>{var lt;return u(Dt,`#${(lt=e(J).placement)!=null?lt:""}`)}),$(G,ne)};I(Nt,G=>{e(J).placement&&G(Ut)})}i(Me),z(()=>B(Me,`relative h-20 w-20 shrink-0 overflow-hidden rounded-lg bg-zinc-700 ${e(J).placement===1?"ring-2 ring-yellow-500/70":""}`)),$(A,Me)}),$(p,C)};I(ge,p=>{e(a).submissions.length===0?p(Pe):p(Be,!1)})}i(D);var se=n(D,2),ue=s(se),je=s(ue);gt(je,{get status(){return e(a).status}});var Je=n(je,2);{var y=p=>{var C=Wt(),R=s(C,!0);i(C),z(()=>u(R,e(a).challenge_name)),$(p,C)};I(Je,p=>{e(a).challenge_name&&p(y)})}i(ue);var N=n(ue,2),fe=s(N);i(N),i(se);var ae=n(se,2),Le=s(ae),me=s(Le);i(Le),le(2),i(ae),i(d),i(b),z(p=>{var C,R,A;B(b,`flex items-stretch overflow-hidden rounded-lg border transition-all ${e(j)?"border-blue-500 bg-blue-900/30":e(h)?"border-red-600/60 bg-red-900/20":"border-zinc-700 bg-zinc-800 hover:border-zinc-500"}`),We(w,e(h)),u(fe,`${(C=e(a).submission_count)!=null?C:""} submissions \xB7 ${p!=null?p:""}`),u(me,`${(R=e(a).vote_count)!=null?R:""}/${(A=e(a).votes_required)!=null?A:""}`)},[()=>Xe(e(a).inserted_at)],Q),E("click",_,p=>wt(e(a).id,p)),E("click",d,()=>Ct(e(a).id)),$(r,b)}),i(f);var m=n(f,2);{var q=r=>{var a=Qt(),b=s(a);He(b,{$$events:{click:Pt},children:(h,j)=>{le();var _=Fe("Load more");$(h,_)},$$slots:{default:!0}}),i(a),$(r,a)};I(m,r=>
1{xt()&&r(q)})}$(o,T)};I(_e,o=>{we().length===0?o(pe):o(Ae,!1)})}z(()=>{We(M,e(Ye)),M.disabled=e(L).length===0}),E("change",M,yt),$(t,g)},$$slots:{default:!0}}),i(De);var Mt=n(De,2);{var Et=t=>{var c=ai(),g=s(c),S=s(g),U=n(s(S),2);i(S);var O=n(S,2),W=s(O,!0);i(O);var M=n(O,2),ve=s(M),Oe=s(ve,!0);i(ve);var Ie=n(ve,2),Re=s(Ie,!0);i(Ie),i(M);var _e=n(M,4);xe(_e,5,()=>F().submissions||[],r=>r.id,(r,a)=>{var b=ti(),h=s(b),j=s(h);{var _=y=>{var N=Yt();z(()=>Ge(N,"src",e(a).image)),$(y,N)};I(j,y=>{e(a).image&&y(_)})}i(h);var w=n(h,2),d=s(w),D=s(d),ge=s(D);i(D);var Pe=n(D,2),Be=s(Pe,!0);i(Pe),i(d);var se=n(d,2),ue=s(se);{var je=y=>{var N=Zt();let fe=Q(()=>jt(e(a).trueskill));var ae=s(N),Le=s(ae);i(ae);var me=n(ae,2),p=s(me);i(me),i(N),z(()=>{var C,R,A,J;u(Le,`\u03BC ${(C=e(a).trueskill.mu_before)!=null?C:""} \u2192 ${(R=e(a).trueskill.mu_after)!=null?R:""}`),B(me,`rounded px-1.5 py-0.5 font-medium ${e(fe)>=0?"bg-green-900/40 text-green-300":"bg-red-900/40 text-red-300"}`),u(p,`${(A=e(fe)>=0?"+":"")!=null?A:""}${(J=e(fe))!=null?J:""} SR`)}),$(y,N)},Je=y=>{var N=ei();$(y,N)};I(ue,y=>{e(a).trueskill?y(je):y(Je,!1)})}i(se),i(w),i(b),z(()=>{var y;
1u(ge,`#${(y=e(a).placement)!=null?y:"?"}`),u(Be,e(a).name)}),$(r,b)}),i(_e);var pe=n(_e,2),Ae=s(pe);i(pe);var o=n(pe,2),T=s(o);{var f=r=>{var a=ii();$(r,a)},m=r=>{var a=Ke(),b=V(a);xe(b,1,()=>F().cred_rewards,ct,(h,j)=>{var _=si(),w=s(_),d=s(w,!0);i(w);var D=n(w,2),ge=s(D,!0);i(D),i(_),z(()=>{u(d,e(j).user_name),u(ge,e(j).amount)}),$(h,_)}),$(r,a)};I(T,r=>{(F().cred_rewards||[]).length===0?r(f):r(m,!1)})}i(o);var q=n(o,2);i(g),i(c),z(r=>{var a;u(W,F().id),u(Oe,F().challenge_name||"(no challenge)"),u(Re,r),u(Ae,`Cred paid out (${(a=(F().cred_rewards||[]).length)!=null?a:""})`)},[()=>Xe(F().inserted_at)],Q),E("click",U,It),E("click",q,()=>qt(F().id)),$(t,c)};I(Mt,t=>{F()&&t(Et)})}i(Ue);var Ft=n(Ue,2);{var Ht=t=>{let c=Q(()=>e(H).danger||!1);ut(t,{get title(){return e(H).title},get message(){return e(H).message},get confirmLabel(){return e(H).confirmLabel},get danger(){return e(c)},get busy(){return e(Ce)},$$events:{cancel:()=>l(H,null),confirm:kt}})};I(Ft,t=>{e(H)&&t(Ht)})}$(ht,at),ot()}export{li 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.