@xcpcio/board-app 0.74.1 → 0.74.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404.html +1 -1
- package/dist/assets/{Balloon.vue_vue_type_script_setup_true_lang-Ds4ljgE5.js → Balloon.vue_vue_type_script_setup_true_lang-BVfUciQ-.js} +1 -1
- package/dist/assets/{Board-CDmVknLp.js → Board-Czrq4DtS.js} +1 -1
- package/dist/assets/{ContestStateBadge-2-IqOHtS.js → ContestStateBadge-BiHZXi73.js} +1 -1
- package/dist/assets/{Countdown-behPk5oB.js → Countdown-Dpt0MI7P.js} +1 -1
- package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-2RH0qEnY.js → DataSourceInput.vue_vue_type_script_setup_true_lang-D_o9JwYS.js} +1 -1
- package/dist/assets/{NavBar-Cyd_3B6z.js → NavBar-DPNugPx9.js} +1 -1
- package/dist/assets/{Resolver-CrD0lAgS.js → Resolver-Di5gzWKf.js} +1 -1
- package/dist/assets/{RightArrowIcon-BCtV5NaN.js → RightArrowIcon-CAcphpMB.js} +1 -1
- package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-CMFAx4px.js → TheInput.vue_vue_type_script_setup_true_lang-4EASslBu.js} +1 -1
- package/dist/assets/{Tooltip.vue_vue_type_script_setup_true_lang-BnfvXkQl.js → Tooltip.vue_vue_type_script_setup_true_lang-DqsW-ncZ.js} +1 -1
- package/dist/assets/{_...all_-BAHZYr8d.js → _...all_-BwXneS2r.js} +1 -1
- package/dist/assets/{_...all_-CJ-wCFRG.js → _...all_-CHhcrOv6.js} +1 -1
- package/dist/assets/{board-layout-CeOh-ZCs.js → board-layout-h2COplO6.js} +1 -1
- package/dist/assets/constant-hbYXej-M.js +1 -0
- package/dist/assets/{dayjs-BTtDHzxO.js → dayjs-Crt-XxG9.js} +1 -1
- package/dist/assets/default-mCPNjTt4.js +1 -0
- package/dist/assets/{headless-B9z-UUTO.js → headless-CKpo5hWl.js} +1 -1
- package/dist/assets/{index-C_1MUfam.js → index-BX7NLYCU.js} +1 -1
- package/dist/assets/index-CGO5s095.js +1 -0
- package/dist/assets/{index-B1073arl.js → index-Cl8ui4U3.js} +3 -3
- package/dist/assets/{index-_fMCJNi3.js → index-DUsX43ur.js} +1 -1
- package/dist/assets/index-D_cZ1LCV.js +1 -0
- package/dist/assets/{index-CUCowXSF.js → index-DdX8qtp6.js} +1 -1
- package/dist/assets/{index-BR1Jeymt.js → index-DoPOjLrQ.js} +1 -1
- package/dist/assets/{index-layout-CWkCP9X6.js → index-layout-pjrmzbp0.js} +1 -1
- package/dist/assets/{pagination-D1x1HgQB.js → pagination-CeQCwn68.js} +1 -1
- package/dist/assets/{person-BZPbTU5K.js → person-DeEVCAi-.js} +1 -1
- package/dist/assets/{rank-D-r3krAA.js → rank-CmURXpVL.js} +1 -1
- package/dist/assets/{use-vmodel-BtnCl86J.js → use-vmodel-B-AJYPXB.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/constant-DcnmUm-i.js +0 -1
- package/dist/assets/default-Cmhn5CHv.js +0 -1
- package/dist/assets/index-DOBgzkLx.js +0 -1
- package/dist/assets/index-DQeCOqY8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as n}from"./dayjs-
|
|
1
|
+
import{I as n}from"./dayjs-Crt-XxG9.js";class e{constructor(r){this.name=r??new n}toIPerson(){return{name:this.name.toI18NStringSet(),cf_id:this.cfID,icpc_id:this.icpcID}}static fromIPerson(r){const c=new e;return c.name=n.fromIText(r.name),c.cfID=r.cf_id,c.icpcID=r.icpc_id,c}}function m(t){if(!t)return[];if(typeof t=="string"){for(const r of" ,、|")if(t.includes(r))return t.split(r).map(c=>new e(n.fromIText(c)));return[new e(n.fromIText(t))]}return Array.isArray(t)?t.length>0&&typeof t[0]=="object"&&"name"in t[0]?t.map(r=>e.fromIPerson(r)):t.map(r=>new e(n.fromIText(r))):[new e(n.fromIText(t))]}export{e as P,m as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as J,d as f,P as q,T as Q,M as T,A as R}from"./use-vmodel-BtnCl86J.js";import{I as _}from"./dayjs-BTtDHzxO.js";import{c as D}from"./person-BZPbTU5K.js";var a=(e=>(e.PENDING="PENDING",e.WAITING="WAITING",e.PREPARING="PREPARING",e.COMPILING="COMPILING",e.RUNNING="RUNNING",e.JUDGING="JUDGING",e.FROZEN="FROZEN",e.ACCEPTED="ACCEPTED",e.CORRECT="CORRECT",e.PARTIALLY_CORRECT="PARTIALLY_CORRECT",e.REJECTED="REJECTED",e.WRONG_ANSWER="WRONG_ANSWER",e.NO_OUTPUT="NO_OUTPUT",e.COMPILATION_ERROR="COMPILATION_ERROR",e.PRESENTATION_ERROR="PRESENTATION_ERROR",e.RUNTIME_ERROR="RUNTIME_ERROR",e.TIME_LIMIT_EXCEEDED="TIME_LIMIT_EXCEEDED",e.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",e.OUTPUT_LIMIT_EXCEEDED="OUTPUT_LIMIT_EXCEEDED",e.IDLENESS_LIMIT_EXCEEDED="IDLENESS_LIMIT_EXCEEDED",e.HACKED="HACKED",e.JUDGEMENT_FAILED="JUDGEMENT_FAILED",e.CONFIGURATION_ERROR="CONFIGURATION_ERROR",e.FILE_ERROR="FILE_ERROR",e.SYSTEM_ERROR="SYSTEM_ERROR",e.CANCELED="CANCELED",e.SKIPPED="SKIPPED",e.SECURITY_VIOLATED="SECURITY_VIOLATED",e.DENIAL_OF_JUDGEMENT="DENIAL_OF_JUDGEMENT",e.UNKNOWN="UNKNOWN",e.UNDEFINED="UNDEFINED",e))(a||{});const Dt={PENDING:"Pending",WAITING:"Waiting",PREPARING:"Preparing",COMPILING:"Compiling",RUNNING:"Running",JUDGING:"Judging",FROZEN:"Frozen",ACCEPTED:"Accepted",CORRECT:"Correct",PARTIALLY_CORRECT:"Partially Correct",REJECTED:"Rejected",WRONG_ANSWER:"Wrong Answer",NO_OUTPUT:"No Output",COMPILATION_ERROR:"Compilation Error",PRESENTATION_ERROR:"Presentation Error",RUNTIME_ERROR:"Runtime Error",TIME_LIMIT_EXCEEDED:"Time Limit Exceeded",MEMORY_LIMIT_EXCEEDED:"Memory Limit Exceeded",OUTPUT_LIMIT_EXCEEDED:"Output Limit Exceeded",IDLENESS_LIMIT_EXCEEDED:"Idleness Limit Exceeded",HACKED:"Hacked",JUDGEMENT_FAILED:"Judgement Failed",CONFIGURATION_ERROR:"Configuration Error",FILE_ERROR:"File Error",SYSTEM_ERROR:"System Error",CANCELED:"Canceled",SKIPPED:"Skipped",SECURITY_VIOLATED:"Security Violated",DENIAL_OF_JUDGEMENT:"Denial Of Judgement",UNKNOWN:"Unknown",UNDEFINED:"Undefined"},Ct={PENDING:"PD",WAITING:"PD",PREPARING:"PD",COMPILING:"PD",RUNNING:"PD",JUDGING:"PD",FROZEN:"?",ACCEPTED:"AC",CORRECT:"AC",PARTIALLY_CORRECT:"RJ",REJECTED:"RJ",WRONG_ANSWER:"WA",NO_OUTPUT:"NO",COMPILATION_ERROR:"CE",PRESENTATION_ERROR:"PE",RUNTIME_ERROR:"RTE",TIME_LIMIT_EXCEEDED:"TLE",MEMORY_LIMIT_EXCEEDED:"MLE",OUTPUT_LIMIT_EXCEEDED:"OLE",IDLENESS_LIMIT_EXCEEDED:"ILE",HACKED:"RJ",JUDGEMENT_FAILED:"RJ",CONFIGURATION_ERROR:"RJ",FILE_ERROR:"RJ",SYSTEM_ERROR:"RJ",CANCELED:"RJ",SKIPPED:"RJ",SECURITY_VIOLATED:"RJ",DENIAL_OF_JUDGEMENT:"RJ",UNKNOWN:"RJ",UNDEFINED:"RJ"};function tt(e){return e=e.toUpperCase().replace(" ","_"),["OK","AC",a.ACCEPTED.toString()].includes(e)||[a.CORRECT.toString()].includes(e)?a.ACCEPTED:[a.PARTIALLY_CORRECT.toString()].includes(e)?a.PARTIALLY_CORRECT:["WA",a.WRONG_ANSWER.toString()].includes(e)?a.WRONG_ANSWER:["RJ","INCORRECT",a.REJECTED.toString()].includes(e)?a.REJECTED:["NO",a.NO_OUTPUT.toString()].includes(e)?a.NO_OUTPUT:["PD",a.PENDING.toString()].includes(e)?a.PENDING:[a.WAITING.toString()].includes(e)?a.WAITING:[a.JUDGING.toString()].includes(e)?a.JUDGING:[a.FROZEN.toString()].includes(e)?a.FROZEN:["CE",a.COMPILATION_ERROR.toString()].includes(e)?a.COMPILATION_ERROR:["PE",a.PRESENTATION_ERROR.toString()].includes(e)?a.PRESENTATION_ERROR:["TL","TLE",a.TIME_LIMIT_EXCEEDED.toString()].includes(e)?a.TIME_LIMIT_EXCEEDED:["ML","MLE",a.MEMORY_LIMIT_EXCEEDED.toString()].includes(e)?a.MEMORY_LIMIT_EXCEEDED:["OL","OLE",a.OUTPUT_LIMIT_EXCEEDED.toString()].includes(e)?a.OUTPUT_LIMIT_EXCEEDED:["IL","ILE",a.IDLENESS_LIMIT_EXCEEDED.toString()].includes(e)?a.IDLENESS_LIMIT_EXCEEDED:["RT","RE","RTE",a.RUNTIME_ERROR.toString()].includes(e)?a.RUNTIME_ERROR:["JE",a.JUDGEMENT_FAILED.toString()].includes(e)?a.JUDGEMENT_FAILED:["SE",a.SYSTEM_ERROR.toString()].includes(e)?a.SYSTEM_ERROR:[a.HACKED.toString()].includes(e)?a.HACKED:[a.CONFIGURATION_ERROR.toString()].includes(e)?a.CONFIGURATION_ERROR:[a.CANCELED.toString()].includes(e)?a.CANCELED:[a.SKIPPED.toString()].includes(e)?a.SKIPPED:[a.SECURITY_VIOLATED.toString()].includes(e)?a.SECURITY_VIOLATED:[a.DENIAL_OF_JUDGEMENT.toString()].includes(e)?a.DENIAL_OF_JUDGEMENT:a.UNKNOWN}function et(e){return[a.ACCEPTED,a.CORRECT].includes(e)}function it(e){return[a.RUNTIME_ERROR,a.TIME_LIMIT_EXCEEDED,a.MEMORY_LIMIT_EXCEEDED,a.OUTPUT_LIMIT_EXCEEDED,a.IDLENESS_LIMIT_EXCEEDED,a.WRONG_ANSWER,a.REJECTED,a.NO_OUTPUT,a.JUDGEMENT_FAILED,a.HACKED].includes(e)}function st(e){return[a.PENDING,a.WAITING,a.COMPILING,a.JUDGING,a.FROZEN].includes(e)}function nt(e){return[a.COMPILATION_ERROR,a.PRESENTATION_ERROR,a.CONFIGURATION_ERROR,a.SYSTEM_ERROR,a.CANCELED,a.SKIPPED,a.UNKNOWN,a.UNDEFINED].includes(e)}class b{constructor(){this.status=a.UNKNOWN,this.isIgnore=!1,this.isSolved=!1,this.isFirstSolved=!1,this.id="",this.teamId="",this.problemId="",this.timestamp=0,this.timestampUnit="second"}isAccepted(){return et(this.status)}isRejected(){return it(this.status)}isPending(){return st(this.status)}isNotCalculatedPenaltyStatus(){return nt(this.status)}get timestampToMinute(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/60/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/60/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/60/1e3):Math.floor(this.timestamp/60)}get timestampToSecond(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/1e3):this.timestamp}get timestampDisplayFormatWithSecond(){const t=this.timestampToSecond,i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=m=>m.toString().padStart(2,"0");return`${r(i)}:${r(s)}:${r(n)}`}get timestampDisplayFormatWithMilliSecond(){let t=this.timestampDisplayFormatWithSecond;if(this.timestampUnit==="millisecond"){const i=(this.timestamp%1e3).toString().padStart(3,"0");t+=`.${i}`}return t}static compare(t,i){if(t.timestamp!==i.timestamp)return t.timestamp-i.timestamp;if(t.teamId===i.teamId){if(t.isAccepted()&&!i.isAccepted())return-1;if(!t.isAccepted()&&i.isAccepted())return 1}return t.id<i.id?-1:t.id===i.id?0:1}}function M(e,t){const i=new b;return i.id=String(e.id??e.submission_id??""),i.teamId=String(e.team_id),i.problemId=String(e.problem_id),i.timestamp=e.timestamp,i.status=tt(e.status),i.isIgnore=e.is_ignore??!1,e.time&&(i.time=e.time),e.language&&(i.language=e.language),e.reaction?i.reaction=e.reaction:t?.options.reactionVideoUrlTemplate&&(i.reaction={url:t.options.reactionVideoUrlTemplate.replace(/\$\{submission_id\}/,i.id)}),i}function Pt(e,t){return Array.isArray(e)?e.map((i,s)=>M({...i,id:i.submission_id??String(s)},t)):Object.entries(e).map(([s,n])=>M({...n,id:n.submission_id??s},t))}class p{constructor(){this.id="",this.name=new _,this.isFirstRankOfOrganization=!1,this.group=[],this.tag=[],this.coaches=[],this.members=[],this.rank=0,this.originalRank=0,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.missingPhoto=!1,this.se=0}reset(){this.isFirstRankOfOrganization=!1,this.rank=0,this.originalRank=0,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.se=0}get penaltyToMinute(){return Math.floor(this.penalty/60)}get isUnofficial(){return this.group.includes("unofficial")}get isGirl(){return this.group.includes("girl")}get isEffectiveTeam(){return this.solvedProblemNum>0}get dirt(){const t=this.attemptedProblemNum,i=this.solvedProblemNum;return J(t,i)}membersToString(t){return this.members.map(i=>i.name.getOrDefault(t)).join(", ")}coachesToString(t){return this.coaches.map(i=>i.name.getOrDefault(t)).join(", ")}calcSE(t){let i=0,s=0;if(this.problemStatistics.forEach(r=>{r.isSolved&&(i+=1,s+=r.problem.statistics.acceptedNum)}),t===0||i===0)return 0;const n=(i*t-s)/t/i;return this.se=Math.round(n*100)/100,this.se}calcSolvedData(t){this.solvedProblemNum=0,this.attemptedProblemNum=0,this.penalty=0;for(const i of this.problemStatistics)i.isAccepted&&(this.solvedProblemNum++,this.attemptedProblemNum+=i.failedCount+1,t?.calculationOfPenalty==="in_seconds"||t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"?this.penalty+=i.penaltyInSecond:this.penalty+=i.penalty);t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"&&(this.penalty=Math.floor(this.penalty/60)*60)}calcAwards(t){if(t)for(const i of t)this.rank>=i.minRank&&this.rank<=i.maxRank&&this.awards.push(i.medalType)}isEqualRank(t){return this.solvedProblemNum===t.solvedProblemNum&&this.penalty===t.penalty&&this.lastSolvedProblemStatistics?.solvedTimestampToMinute===t.lastSolvedProblemStatistics?.solvedTimestampToMinute}postProcessPlaceChartPoints(){if(this.placeChartPoints.length===0)return;const t=[];t.push(this.placeChartPoints[0]);for(let i=1;i<this.placeChartPoints.length-1;i++){const s=this.placeChartPoints[i],n=t[t.length-1];(s.rank!==n.rank||s.lastSolvedProblem!==n.lastSolvedProblem)&&t.push(s)}this.placeChartPoints.length>1&&t.push(this.placeChartPoints[this.placeChartPoints.length-1]),this.placeChartPoints=t}static compare(t,i){return t.solvedProblemNum!==i.solvedProblemNum?i.solvedProblemNum-t.solvedProblemNum:t.penalty!==i.penalty?t.penalty-i.penalty:t.lastSolvedProblemStatistics&&i.lastSolvedProblemStatistics?t.lastSolvedProblemStatistics.solvedTimestampToMinute-i.lastSolvedProblemStatistics.solvedTimestampToMinute:t.name<i.name?-1:t.name>i.name?1:0}}function y(e){const t=new p;t.id=e.id??e.team_id??"",t.name=_.fromIText(e.name??e.team_name??""),e.organization?(t.organizationId=e.organization,t.organizationName=e.organization):t.organizationId=e.organization_id,t.group=f.cloneDeep(e.group??[]),t.tag=f.cloneDeep(e.tag??[]),t.members=D(e.members),e.coach?t.coaches=D(e.coach):t.coaches=D(e.coaches),e.official&&t.group.push("official"),e.unofficial&&t.group.push("unofficial"),e.girl&&t.group.push("girl");{const i=e;for(const s of Object.keys(i))s!=="missing_photo"&&(i[s]===1||i[s]===!0)&&t.group.push(s)}return t.group=[...new Set(t.group)],t.group.sort(),t.badge=e.badge,e.missing_photo&&(t.missingPhoto=!0),t.photo=e.photo,e.location&&(t.location=e.location),e.icpc_id&&(t.icpcID=e.icpc_id),t}function At(e){return Array.isArray(e)?e.map(t=>y(t)):Object.entries(e).map(([i,s])=>y({...s,team_id:s.team_id??i}))}class at{constructor(){this.problem=new q,this.team=new p,this.submission=new b}get key(){return`balloon-${this.team.id}-${this.problem.id}`}static compare(t,i){return b.compare(t.submission,i.submission)}}const G="3.7.8",rt=G,E=typeof Buffer=="function",U=typeof TextDecoder=="function"?new TextDecoder:void 0,L=typeof TextEncoder=="function"?new TextEncoder:void 0,ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=Array.prototype.slice.call(ot),g=(e=>{let t={};return e.forEach((i,s)=>t[i]=s),t})(d),lt=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),v=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),w=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),B=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),z=e=>{let t,i,s,n,r="";const l=e.length%3;for(let m=0;m<e.length;){if((i=e.charCodeAt(m++))>255||(s=e.charCodeAt(m++))>255||(n=e.charCodeAt(m++))>255)throw new TypeError("invalid character found");t=i<<16|s<<8|n,r+=d[t>>18&63]+d[t>>12&63]+d[t>>6&63]+d[t&63]}return l?r.slice(0,l-3)+"===".substring(l):r},O=typeof btoa=="function"?e=>btoa(e):E?e=>Buffer.from(e,"binary").toString("base64"):z,P=E?e=>Buffer.from(e).toString("base64"):e=>{let i=[];for(let s=0,n=e.length;s<n;s+=4096)i.push(u.apply(null,e.subarray(s,s+4096)));return O(i.join(""))},N=(e,t=!1)=>t?w(P(e)):P(e),mt=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u(192|t>>>6)+u(128|t&63):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|t&63)}},ct=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,W=e=>e.replace(ct,mt),x=E?e=>Buffer.from(e,"utf8").toString("base64"):L?e=>P(L.encode(e)):e=>O(W(e)),h=(e,t=!1)=>t?w(x(e)):x(e),F=e=>h(e,!0),ut=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ht=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),i=t-65536;return u((i>>>10)+55296)+u((i&1023)+56320);case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},X=e=>e.replace(ut,ht),Y=e=>{if(e=e.replace(/\s+/g,""),!lt.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,i,s,n=[];for(let r=0;r<e.length;)t=g[e.charAt(r++)]<<18|g[e.charAt(r++)]<<12|(i=g[e.charAt(r++)])<<6|(s=g[e.charAt(r++)]),i===64?n.push(u(t>>16&255)):s===64?n.push(u(t>>16&255,t>>8&255)):n.push(u(t>>16&255,t>>8&255,t&255));return n.join("")},S=typeof atob=="function"?e=>atob(B(e)):E?e=>Buffer.from(e,"base64").toString("binary"):Y,K=E?e=>v(Buffer.from(e,"base64")):e=>v(S(e).split("").map(t=>t.charCodeAt(0))),j=e=>K(V(e)),Et=E?e=>Buffer.from(e,"base64").toString("utf8"):U?e=>U.decode(K(e)):e=>X(S(e)),V=e=>B(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),A=e=>Et(V(e)),dt=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},Z=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),H=function(){const e=(t,i)=>Object.defineProperty(String.prototype,t,Z(i));e("fromBase64",function(){return A(this)}),e("toBase64",function(t){return h(this,t)}),e("toBase64URI",function(){return h(this,!0)}),e("toBase64URL",function(){return h(this,!0)}),e("toUint8Array",function(){return j(this)})},$=function(){const e=(t,i)=>Object.defineProperty(Uint8Array.prototype,t,Z(i));e("toBase64",function(t){return N(this,t)}),e("toBase64URI",function(){return N(this,!0)}),e("toBase64URL",function(){return N(this,!0)})},ft=()=>{H(),$()},C={version:G,VERSION:rt,atob:S,atobPolyfill:Y,btoa:O,btoaPolyfill:z,fromBase64:A,toBase64:h,encode:h,encodeURI:F,encodeURL:F,utob:W,btou:X,decode:A,isValid:dt,fromUint8Array:N,toUint8Array:j,extendString:H,extendUint8Array:$,extendBuiltins:ft};var pt=(e=>(e[e.BLUE=0]="BLUE",e[e.RED=1]="RED",e))(pt||{});class I{constructor(t=0){this.type=t,this.name=`${t===0?"Blue":"Red"} Team`,this.teams=[],this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}refreshName(){return this.filterOrganizations.length>0?this.name=this.filterOrganizations[0].text:this.name=`${this.type===0?"Blue":"Red"} Team`,this.name}get totalSolvedProblemNum(){let t=0;return this.teams.forEach(i=>{t+=i.solvedProblemNum}),t}get totalPenalty(){let t=0;return this.teams.forEach(i=>{t+=i.penaltyToMinute}),t}get totalPenaltyToString(){const t=this.totalPenalty,i=r=>r<10?`0${r}`:String(r),s=Math.floor(t/60),n=Math.floor(t%60);return[i(s),i(n)].join(":")}toJSON(){return{type:this.type,name:this.name,filterOrganizations:this.filterOrganizations,filterTeams:this.filterTeams}}}class Tt{constructor(){this.enable=!1,this.topX=5,this.equalTeams=!0,this.persist=!1,this.blueTeam=new I(0),this.redTeam=new I(1)}ToBase64(){return C.encode(JSON.stringify(this))}FromBase64(t){if(t.length===0||C.isValid(t)===!1)return;const i=JSON.parse(C.decode(t));this.enable=i.enable,this.topX=i.topX,this.equalTeams=i.equalTeams,this.persist=i.persist,this.blueTeam=new I(0),this.blueTeam.name=i.blueTeam.name,this.blueTeam.setFilterOrganizations(i.blueTeam.filterOrganizations),this.blueTeam.setFilterTeams(i.blueTeam.filterTeams),this.redTeam=new I(1),this.redTeam.name=i.redTeam.name,this.redTeam.setFilterOrganizations(i.redTeam.filterOrganizations),this.redTeam.setFilterTeams(i.redTeam.filterTeams)}}class k{constructor(){this.id="",this.name=new _,this.teams=[],this.rank=-1}reset(){this.rank=-1}static compare(t,i){return t.id<i.id?-1:t.id>i.id?1:0}}class Rt{constructor(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}reset(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}getTeamSolvedNumIndex(t){return this.teamSolvedNumIndex[t]??0}}class gt{constructor(){this.enableFilterSubmissionsByTimestamp=!1,this.width=0,this.timestamp=0,this.enableFilterTeamsByGroup=!1,this.group="all",this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map,this.enableAnimatedSubmissions=!1,this.battleOfGiants=new Tt}setSelf(t){this.enableFilterSubmissionsByTimestamp=t.enableFilterSubmissionsByTimestamp,this.width=t.width,this.timestamp=t.timestamp,this.enableFilterTeamsByGroup=t.enableFilterTeamsByGroup,this.group=t.group,this.filterOrganizations=t.filterOrganizations,this.filterOrganizationMap=t.filterOrganizationMap,this.filterTeams=t.filterTeams,this.filterTeamMap=t.filterTeamMap,this.enableAnimatedSubmissions=t.enableAnimatedSubmissions,this.battleOfGiants=t.battleOfGiants}setWidth(t,i){this.width=t,this.timestamp=Math.floor((i.getEndTime().unix()-i.getStartTime().unix())*this.width*1e-4),this.enableFilterSubmissionsByTimestamp=!0}disableFilterSubmissionByTimestamp(){this.enableFilterSubmissionsByTimestamp=!1}setGroup(t){this.group=t,this.enableFilterTeamsByGroup=!0,this.group==="all"&&this.disableFilterTeamsByGroup()}disableFilterTeamsByGroup(){this.enableFilterTeamsByGroup=!1,this.group="all"}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}isNeedReBuildRank(t){return this.enableFilterSubmissionsByTimestamp!==t.enableFilterSubmissionsByTimestamp||this.width!==t.width||this.timestamp!==t.timestamp||this.enableFilterTeamsByGroup!==t.enableFilterTeamsByGroup||this.group!==t.group}}class Ot{constructor(t,i,s){this.contest=t,this.teams=f.cloneDeep(i),this.teamsMap=new Map(this.teams.map(n=>[n.id,n])),this.submissions=f.cloneDeep(s).sort(b.compare);{const n=this.contest.options,r=f.cloneDeep(n.submissionTimestampUnit);this.submissions.forEach(l=>{l.timestampUnit=r,l.time&&(n.submissionHasTimeField=!0),l.language&&(n.submissionHasLanguageField=!0)})}this.submissionsMap=new Map(this.submissions.map(n=>[n.id,n])),this.organizationsMap=this.buildOrganizationsMap(),this.organizations=[...this.organizationsMap.values()],this.organizations.sort(k.compare),this.originTeams=this.teams.map(n=>n),this.originTeams.sort(p.compare),this.rankStatistics=new Rt,this.options=new gt,this.balloons=[];{const n=new Set;this.submissions.forEach(r=>{r.language&&n.add(r.language)}),this.languages=[...n].sort()}{const n=new Set;this.submissions.forEach(r=>{n.add(r.status)}),this.statuses=[...n].sort()}}buildOrganizationsMap(){if(!this.contest.organization)return new Map;const t=new Map;return this.teams.forEach(i=>{if(!i.organizationId)return;if(t.has(i.organizationId)){const n=t.get(i.organizationId);n?.teams.push(i),i.organization=n;return}const s=new k;s.id=i.organizationId,s.name=new _,s.name.fallback=i.organizationName,s.teams.push(i),i.organization=s,t.set(s.id,s)}),t}cleanRank(){(()=>{this.teams=[];for(const[t,i]of this.teamsMap)this.filterTeamByOrg(i)||this.teams.push(i)})();for(const t of this.organizations)t.reset();for(const t of this.teams)t.reset(),t.problemStatistics=this.contest.problems.map(i=>{const s=new Q;return s.problem=i,s.contestPenalty=this.contest.penalty,s}),t.problemStatisticsMap=new Map(t.problemStatistics.map(i=>[i.problem.id,i]));this.contest.problems.forEach(t=>{t.statistics.reset()})}buildRank(){return(()=>{this.cleanRank(),this.teams.forEach(s=>s.placeChartPoints.push({timePoint:0,rank:1,lastSolvedProblem:null})),this.rankStatistics.reset(),this.rankStatistics.teamSolvedNum=Array.from({length:this.contest.problems.length+1}).fill(0),this.rankStatistics.teamSolvedNumIndex=Array.from({length:this.contest.problems.length+1}).fill(0);let t=0;const i=this.getSubmissions();for(let s=0;s<i.length;s++){const n=i[s],r=n.teamId,l=n.problemId,m=this.teamsMap.get(r),c=this.contest.problemsMap.get(l);(()=>{if(m===void 0||this.filterTeamByOrg(m)||c===void 0)return;const o=m.problemStatisticsMap.get(l);if(o.submissions.push(n),m.submissions.push(n),c.statistics.submittedNum++,o.isSolved){n.isSolved=!1,n.isFirstSolved=!1;return}if(n.isIgnore||n.isNotCalculatedPenaltyStatus()){c.statistics.ignoreNum++,o.ignoreCount++;return}if(o.isSubmitted=!0,o.lastSubmitTimestamp=n.timestampToSecond,o.totalCount++,n.isAccepted()){for(n.isSolved=!0,o.isSolved=!0,o.solvedTimestamp=n.timestampToSecond,c.statistics.acceptedNum++,c.statistics.attemptedNum+=o.failedCount+1,(c.statistics.firstSolveSubmissions.length===0||c.statistics.firstSolveSubmissions[c.statistics.firstSolveSubmissions.length-1].timestamp===n.timestamp)&&(n.isFirstSolved=!0,o.isFirstSolved=!0,c.statistics.firstSolveSubmissions.push(n));c.statistics.lastSolveSubmissions.length>0;)c.statistics.lastSolveSubmissions.pop();c.statistics.lastSolveSubmissions.push(n),m.lastSolvedProblem=c,m.lastSolvedProblemStatistics=o}n.isRejected()&&(o.failedCount++,c.statistics.rejectedNum++),n.isPending()&&(o.pendingCount++,c.statistics.pendingNum++)})(),(n.timestampToMinute>t||s===i.length-1)&&(this.teams.forEach(o=>o.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.teams.forEach(o=>o.placeChartPoints.push({timePoint:n.timestampToMinute,rank:o.rank,lastSolvedProblem:o.lastSolvedProblem}))),t=n.timestampToMinute}this.teams.forEach(s=>s.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.buildOrgRank(),this.rankStatistics.effectiveTeamNum=this.teams.filter(s=>s.isEffectiveTeam).length,this.rankStatistics.totalTeamNum=this.teams.length,this.teams.forEach(s=>s.calcSE(this.rankStatistics.totalTeamNum)),this.contest.problems.forEach(s=>s.statistics.calcSE(this.rankStatistics.totalTeamNum)),this.buildAwards(),this.teams.forEach(s=>s.calcAwards(this.contest.awards?.get(this.options.group))),this.teams.forEach(s=>s.postProcessPlaceChartPoints())})(),(()=>{for(const t of this.teams)this.rankStatistics.teamSolvedNum[t.solvedProblemNum]++;{let t=0;const i=this.rankStatistics.teamSolvedNum,s=this.rankStatistics.teamSolvedNumIndex;for(let n=s.length-1;n>=0;n--)t+=i[n]>0?1:0,s[n]=t}this.teams.length>0&&(this.rankStatistics.maxSolvedProblems=this.teams[0].solvedProblemNum)})(),this}buildTeamRank(){let t=1,i=1,s=null;for(const n of this.teams)n.rank=t++,n.originalRank=i++,s!==null&&n.isEqualRank(s)&&(n.rank=s.rank),s=n}buildOrgRank(){if(!this.contest.organization)return;let t=1,i=null;for(const s of this.teams){const n=s.organization;!n||n.rank>-1||(n.rank=t++,s.isFirstRankOfOrganization=!0,i&&s.isEqualRank(i)&&(n.rank=i.organization.rank),i=s)}}buildAwards(){if(this.contest.medal==="ccpc"){this.contest.awards=new Map;const t=this.rankStatistics.effectiveTeamNum,i=[],s=new R,n=new R,r=new R,l=new R;s.medalType=T.GOLD,s.minRank=1,s.maxRank=Math.ceil(t*.1),s.maxRank>=s.minRank&&i.push(s),n.medalType=T.SILVER,n.minRank=s.maxRank+1,n.maxRank=Math.ceil(t*.3),n.maxRank>=n.minRank&&i.push(n),r.medalType=T.BRONZE,r.minRank=n.maxRank+1,r.maxRank=Math.ceil(t*.6),r.maxRank>=r.minRank&&i.push(r),l.medalType=T.HONORABLE,l.minRank=r.maxRank+1,this.teams.forEach(m=>{m.solvedProblemNum>0&&(l.maxRank=Math.max(l.maxRank,m.rank))}),l.maxRank>=l.minRank&&i.push(l),this.contest.awards.set("official",i)}}filterTeamByOrg(t){const i=this.options;return!!(i.enableFilterTeamsByGroup&&!t.group?.includes(i.group))}getSubmissions(){return this.contest.replayContestStartTimestamp===void 0&&this.options.enableFilterSubmissionsByTimestamp===!1?this.submissions:this.submissions.filter(t=>!(this.contest.replayContestStartTimestamp!==void 0&&t.timestampToSecond>this.contest.replayContestStartTimestamp||this.options.enableFilterSubmissionsByTimestamp&&t.timestampToSecond>this.options.timestamp))}buildBalloons(){this.balloons=[],this.cleanRank();const t=this.getSubmissions();for(let i=0;i<t.length;i++){const s=t[i],n=s.teamId,r=s.problemId,l=this.teamsMap.get(n),m=this.contest.problemsMap.get(r);(()=>{if(l===void 0||m===void 0)return;const c=l.problemStatisticsMap.get(r);if(!c.isSolved&&s.isAccepted()){c.isSolved=!0,c.solvedTimestamp=s.timestampToSecond;const o=new at;o.team=l,o.problem=m,o.submission=s,this.balloons.push(o)}})()}}setReplayTime(t){this.contest.setReplayTime(t)}}export{at as B,pt as G,Ot as R,a as S,p as T,Pt as a,nt as b,At as c,st as d,Ct as e,b as f,it as g,Dt as h,et as i,gt as j};
|
|
1
|
+
import{l as J,d as f,P as q,T as Q,M as T,A as R}from"./use-vmodel-B-AJYPXB.js";import{I as _}from"./dayjs-Crt-XxG9.js";import{c as D}from"./person-DeEVCAi-.js";var a=(e=>(e.PENDING="PENDING",e.WAITING="WAITING",e.PREPARING="PREPARING",e.COMPILING="COMPILING",e.RUNNING="RUNNING",e.JUDGING="JUDGING",e.FROZEN="FROZEN",e.ACCEPTED="ACCEPTED",e.CORRECT="CORRECT",e.PARTIALLY_CORRECT="PARTIALLY_CORRECT",e.REJECTED="REJECTED",e.WRONG_ANSWER="WRONG_ANSWER",e.NO_OUTPUT="NO_OUTPUT",e.COMPILATION_ERROR="COMPILATION_ERROR",e.PRESENTATION_ERROR="PRESENTATION_ERROR",e.RUNTIME_ERROR="RUNTIME_ERROR",e.TIME_LIMIT_EXCEEDED="TIME_LIMIT_EXCEEDED",e.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",e.OUTPUT_LIMIT_EXCEEDED="OUTPUT_LIMIT_EXCEEDED",e.IDLENESS_LIMIT_EXCEEDED="IDLENESS_LIMIT_EXCEEDED",e.HACKED="HACKED",e.JUDGEMENT_FAILED="JUDGEMENT_FAILED",e.CONFIGURATION_ERROR="CONFIGURATION_ERROR",e.FILE_ERROR="FILE_ERROR",e.SYSTEM_ERROR="SYSTEM_ERROR",e.CANCELED="CANCELED",e.SKIPPED="SKIPPED",e.SECURITY_VIOLATED="SECURITY_VIOLATED",e.DENIAL_OF_JUDGEMENT="DENIAL_OF_JUDGEMENT",e.UNKNOWN="UNKNOWN",e.UNDEFINED="UNDEFINED",e))(a||{});const Dt={PENDING:"Pending",WAITING:"Waiting",PREPARING:"Preparing",COMPILING:"Compiling",RUNNING:"Running",JUDGING:"Judging",FROZEN:"Frozen",ACCEPTED:"Accepted",CORRECT:"Correct",PARTIALLY_CORRECT:"Partially Correct",REJECTED:"Rejected",WRONG_ANSWER:"Wrong Answer",NO_OUTPUT:"No Output",COMPILATION_ERROR:"Compilation Error",PRESENTATION_ERROR:"Presentation Error",RUNTIME_ERROR:"Runtime Error",TIME_LIMIT_EXCEEDED:"Time Limit Exceeded",MEMORY_LIMIT_EXCEEDED:"Memory Limit Exceeded",OUTPUT_LIMIT_EXCEEDED:"Output Limit Exceeded",IDLENESS_LIMIT_EXCEEDED:"Idleness Limit Exceeded",HACKED:"Hacked",JUDGEMENT_FAILED:"Judgement Failed",CONFIGURATION_ERROR:"Configuration Error",FILE_ERROR:"File Error",SYSTEM_ERROR:"System Error",CANCELED:"Canceled",SKIPPED:"Skipped",SECURITY_VIOLATED:"Security Violated",DENIAL_OF_JUDGEMENT:"Denial Of Judgement",UNKNOWN:"Unknown",UNDEFINED:"Undefined"},Ct={PENDING:"PD",WAITING:"PD",PREPARING:"PD",COMPILING:"PD",RUNNING:"PD",JUDGING:"PD",FROZEN:"?",ACCEPTED:"AC",CORRECT:"AC",PARTIALLY_CORRECT:"RJ",REJECTED:"RJ",WRONG_ANSWER:"WA",NO_OUTPUT:"NO",COMPILATION_ERROR:"CE",PRESENTATION_ERROR:"PE",RUNTIME_ERROR:"RTE",TIME_LIMIT_EXCEEDED:"TLE",MEMORY_LIMIT_EXCEEDED:"MLE",OUTPUT_LIMIT_EXCEEDED:"OLE",IDLENESS_LIMIT_EXCEEDED:"ILE",HACKED:"RJ",JUDGEMENT_FAILED:"RJ",CONFIGURATION_ERROR:"RJ",FILE_ERROR:"RJ",SYSTEM_ERROR:"RJ",CANCELED:"RJ",SKIPPED:"RJ",SECURITY_VIOLATED:"RJ",DENIAL_OF_JUDGEMENT:"RJ",UNKNOWN:"RJ",UNDEFINED:"RJ"};function tt(e){return e=e.toUpperCase().replace(" ","_"),["OK","AC",a.ACCEPTED.toString()].includes(e)||[a.CORRECT.toString()].includes(e)?a.ACCEPTED:[a.PARTIALLY_CORRECT.toString()].includes(e)?a.PARTIALLY_CORRECT:["WA",a.WRONG_ANSWER.toString()].includes(e)?a.WRONG_ANSWER:["RJ","INCORRECT",a.REJECTED.toString()].includes(e)?a.REJECTED:["NO",a.NO_OUTPUT.toString()].includes(e)?a.NO_OUTPUT:["PD",a.PENDING.toString()].includes(e)?a.PENDING:[a.WAITING.toString()].includes(e)?a.WAITING:[a.JUDGING.toString()].includes(e)?a.JUDGING:[a.FROZEN.toString()].includes(e)?a.FROZEN:["CE",a.COMPILATION_ERROR.toString()].includes(e)?a.COMPILATION_ERROR:["PE",a.PRESENTATION_ERROR.toString()].includes(e)?a.PRESENTATION_ERROR:["TL","TLE",a.TIME_LIMIT_EXCEEDED.toString()].includes(e)?a.TIME_LIMIT_EXCEEDED:["ML","MLE",a.MEMORY_LIMIT_EXCEEDED.toString()].includes(e)?a.MEMORY_LIMIT_EXCEEDED:["OL","OLE",a.OUTPUT_LIMIT_EXCEEDED.toString()].includes(e)?a.OUTPUT_LIMIT_EXCEEDED:["IL","ILE",a.IDLENESS_LIMIT_EXCEEDED.toString()].includes(e)?a.IDLENESS_LIMIT_EXCEEDED:["RT","RE","RTE",a.RUNTIME_ERROR.toString()].includes(e)?a.RUNTIME_ERROR:["JE",a.JUDGEMENT_FAILED.toString()].includes(e)?a.JUDGEMENT_FAILED:["SE",a.SYSTEM_ERROR.toString()].includes(e)?a.SYSTEM_ERROR:[a.HACKED.toString()].includes(e)?a.HACKED:[a.CONFIGURATION_ERROR.toString()].includes(e)?a.CONFIGURATION_ERROR:[a.CANCELED.toString()].includes(e)?a.CANCELED:[a.SKIPPED.toString()].includes(e)?a.SKIPPED:[a.SECURITY_VIOLATED.toString()].includes(e)?a.SECURITY_VIOLATED:[a.DENIAL_OF_JUDGEMENT.toString()].includes(e)?a.DENIAL_OF_JUDGEMENT:a.UNKNOWN}function et(e){return[a.ACCEPTED,a.CORRECT].includes(e)}function it(e){return[a.RUNTIME_ERROR,a.TIME_LIMIT_EXCEEDED,a.MEMORY_LIMIT_EXCEEDED,a.OUTPUT_LIMIT_EXCEEDED,a.IDLENESS_LIMIT_EXCEEDED,a.WRONG_ANSWER,a.REJECTED,a.NO_OUTPUT,a.JUDGEMENT_FAILED,a.HACKED].includes(e)}function st(e){return[a.PENDING,a.WAITING,a.COMPILING,a.JUDGING,a.FROZEN].includes(e)}function nt(e){return[a.COMPILATION_ERROR,a.PRESENTATION_ERROR,a.CONFIGURATION_ERROR,a.SYSTEM_ERROR,a.CANCELED,a.SKIPPED,a.UNKNOWN,a.UNDEFINED].includes(e)}class b{constructor(){this.status=a.UNKNOWN,this.isIgnore=!1,this.isSolved=!1,this.isFirstSolved=!1,this.id="",this.teamId="",this.problemId="",this.timestamp=0,this.timestampUnit="second"}isAccepted(){return et(this.status)}isRejected(){return it(this.status)}isPending(){return st(this.status)}isNotCalculatedPenaltyStatus(){return nt(this.status)}get timestampToMinute(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/60/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/60/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/60/1e3):Math.floor(this.timestamp/60)}get timestampToSecond(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/1e3):this.timestamp}get timestampDisplayFormatWithSecond(){const t=this.timestampToSecond,i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=m=>m.toString().padStart(2,"0");return`${r(i)}:${r(s)}:${r(n)}`}get timestampDisplayFormatWithMilliSecond(){let t=this.timestampDisplayFormatWithSecond;if(this.timestampUnit==="millisecond"){const i=(this.timestamp%1e3).toString().padStart(3,"0");t+=`.${i}`}return t}static compare(t,i){if(t.timestamp!==i.timestamp)return t.timestamp-i.timestamp;if(t.teamId===i.teamId){if(t.isAccepted()&&!i.isAccepted())return-1;if(!t.isAccepted()&&i.isAccepted())return 1}return t.id<i.id?-1:t.id===i.id?0:1}}function M(e,t){const i=new b;return i.id=String(e.id??e.submission_id??""),i.teamId=String(e.team_id),i.problemId=String(e.problem_id),i.timestamp=e.timestamp,i.status=tt(e.status),i.isIgnore=e.is_ignore??!1,e.time&&(i.time=e.time),e.language&&(i.language=e.language),e.reaction?i.reaction=e.reaction:t?.options.reactionVideoUrlTemplate&&(i.reaction={url:t.options.reactionVideoUrlTemplate.replace(/\$\{submission_id\}/,i.id)}),i}function Pt(e,t){return Array.isArray(e)?e.map((i,s)=>M({...i,id:i.submission_id??String(s)},t)):Object.entries(e).map(([s,n])=>M({...n,id:n.submission_id??s},t))}class p{constructor(){this.id="",this.name=new _,this.isFirstRankOfOrganization=!1,this.group=[],this.tag=[],this.coaches=[],this.members=[],this.rank=0,this.originalRank=0,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.missingPhoto=!1,this.se=0}reset(){this.isFirstRankOfOrganization=!1,this.rank=0,this.originalRank=0,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.se=0}get penaltyToMinute(){return Math.floor(this.penalty/60)}get isUnofficial(){return this.group.includes("unofficial")}get isGirl(){return this.group.includes("girl")}get isEffectiveTeam(){return this.solvedProblemNum>0}get dirt(){const t=this.attemptedProblemNum,i=this.solvedProblemNum;return J(t,i)}membersToString(t){return this.members.map(i=>i.name.getOrDefault(t)).join(", ")}coachesToString(t){return this.coaches.map(i=>i.name.getOrDefault(t)).join(", ")}calcSE(t){let i=0,s=0;if(this.problemStatistics.forEach(r=>{r.isSolved&&(i+=1,s+=r.problem.statistics.acceptedNum)}),t===0||i===0)return 0;const n=(i*t-s)/t/i;return this.se=Math.round(n*100)/100,this.se}calcSolvedData(t){this.solvedProblemNum=0,this.attemptedProblemNum=0,this.penalty=0;for(const i of this.problemStatistics)i.isAccepted&&(this.solvedProblemNum++,this.attemptedProblemNum+=i.failedCount+1,t?.calculationOfPenalty==="in_seconds"||t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"?this.penalty+=i.penaltyInSecond:this.penalty+=i.penalty);t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"&&(this.penalty=Math.floor(this.penalty/60)*60)}calcAwards(t){if(t)for(const i of t)this.rank>=i.minRank&&this.rank<=i.maxRank&&this.awards.push(i.medalType)}isEqualRank(t){return this.solvedProblemNum===t.solvedProblemNum&&this.penalty===t.penalty&&this.lastSolvedProblemStatistics?.solvedTimestampToMinute===t.lastSolvedProblemStatistics?.solvedTimestampToMinute}postProcessPlaceChartPoints(){if(this.placeChartPoints.length===0)return;const t=[];t.push(this.placeChartPoints[0]);for(let i=1;i<this.placeChartPoints.length-1;i++){const s=this.placeChartPoints[i],n=t[t.length-1];(s.rank!==n.rank||s.lastSolvedProblem!==n.lastSolvedProblem)&&t.push(s)}this.placeChartPoints.length>1&&t.push(this.placeChartPoints[this.placeChartPoints.length-1]),this.placeChartPoints=t}static compare(t,i){return t.solvedProblemNum!==i.solvedProblemNum?i.solvedProblemNum-t.solvedProblemNum:t.penalty!==i.penalty?t.penalty-i.penalty:t.lastSolvedProblemStatistics&&i.lastSolvedProblemStatistics?t.lastSolvedProblemStatistics.solvedTimestampToMinute-i.lastSolvedProblemStatistics.solvedTimestampToMinute:t.name<i.name?-1:t.name>i.name?1:0}}function y(e){const t=new p;t.id=e.id??e.team_id??"",t.name=_.fromIText(e.name??e.team_name??""),e.organization?(t.organizationId=e.organization,t.organizationName=e.organization):t.organizationId=e.organization_id,t.group=f.cloneDeep(e.group??[]),t.tag=f.cloneDeep(e.tag??[]),t.members=D(e.members),e.coach?t.coaches=D(e.coach):t.coaches=D(e.coaches),e.official&&t.group.push("official"),e.unofficial&&t.group.push("unofficial"),e.girl&&t.group.push("girl");{const i=e;for(const s of Object.keys(i))s!=="missing_photo"&&(i[s]===1||i[s]===!0)&&t.group.push(s)}return t.group=[...new Set(t.group)],t.group.sort(),t.badge=e.badge,e.missing_photo&&(t.missingPhoto=!0),t.photo=e.photo,e.location&&(t.location=e.location),e.icpc_id&&(t.icpcID=e.icpc_id),t}function At(e){return Array.isArray(e)?e.map(t=>y(t)):Object.entries(e).map(([i,s])=>y({...s,team_id:s.team_id??i}))}class at{constructor(){this.problem=new q,this.team=new p,this.submission=new b}get key(){return`balloon-${this.team.id}-${this.problem.id}`}static compare(t,i){return b.compare(t.submission,i.submission)}}const G="3.7.8",rt=G,E=typeof Buffer=="function",U=typeof TextDecoder=="function"?new TextDecoder:void 0,L=typeof TextEncoder=="function"?new TextEncoder:void 0,ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=Array.prototype.slice.call(ot),g=(e=>{let t={};return e.forEach((i,s)=>t[i]=s),t})(d),lt=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),v=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),w=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),B=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),z=e=>{let t,i,s,n,r="";const l=e.length%3;for(let m=0;m<e.length;){if((i=e.charCodeAt(m++))>255||(s=e.charCodeAt(m++))>255||(n=e.charCodeAt(m++))>255)throw new TypeError("invalid character found");t=i<<16|s<<8|n,r+=d[t>>18&63]+d[t>>12&63]+d[t>>6&63]+d[t&63]}return l?r.slice(0,l-3)+"===".substring(l):r},O=typeof btoa=="function"?e=>btoa(e):E?e=>Buffer.from(e,"binary").toString("base64"):z,P=E?e=>Buffer.from(e).toString("base64"):e=>{let i=[];for(let s=0,n=e.length;s<n;s+=4096)i.push(u.apply(null,e.subarray(s,s+4096)));return O(i.join(""))},N=(e,t=!1)=>t?w(P(e)):P(e),mt=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u(192|t>>>6)+u(128|t&63):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|t&63)}},ct=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,W=e=>e.replace(ct,mt),x=E?e=>Buffer.from(e,"utf8").toString("base64"):L?e=>P(L.encode(e)):e=>O(W(e)),h=(e,t=!1)=>t?w(x(e)):x(e),F=e=>h(e,!0),ut=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ht=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),i=t-65536;return u((i>>>10)+55296)+u((i&1023)+56320);case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},X=e=>e.replace(ut,ht),Y=e=>{if(e=e.replace(/\s+/g,""),!lt.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,i,s,n=[];for(let r=0;r<e.length;)t=g[e.charAt(r++)]<<18|g[e.charAt(r++)]<<12|(i=g[e.charAt(r++)])<<6|(s=g[e.charAt(r++)]),i===64?n.push(u(t>>16&255)):s===64?n.push(u(t>>16&255,t>>8&255)):n.push(u(t>>16&255,t>>8&255,t&255));return n.join("")},S=typeof atob=="function"?e=>atob(B(e)):E?e=>Buffer.from(e,"base64").toString("binary"):Y,K=E?e=>v(Buffer.from(e,"base64")):e=>v(S(e).split("").map(t=>t.charCodeAt(0))),j=e=>K(V(e)),Et=E?e=>Buffer.from(e,"base64").toString("utf8"):U?e=>U.decode(K(e)):e=>X(S(e)),V=e=>B(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),A=e=>Et(V(e)),dt=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},Z=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),H=function(){const e=(t,i)=>Object.defineProperty(String.prototype,t,Z(i));e("fromBase64",function(){return A(this)}),e("toBase64",function(t){return h(this,t)}),e("toBase64URI",function(){return h(this,!0)}),e("toBase64URL",function(){return h(this,!0)}),e("toUint8Array",function(){return j(this)})},$=function(){const e=(t,i)=>Object.defineProperty(Uint8Array.prototype,t,Z(i));e("toBase64",function(t){return N(this,t)}),e("toBase64URI",function(){return N(this,!0)}),e("toBase64URL",function(){return N(this,!0)})},ft=()=>{H(),$()},C={version:G,VERSION:rt,atob:S,atobPolyfill:Y,btoa:O,btoaPolyfill:z,fromBase64:A,toBase64:h,encode:h,encodeURI:F,encodeURL:F,utob:W,btou:X,decode:A,isValid:dt,fromUint8Array:N,toUint8Array:j,extendString:H,extendUint8Array:$,extendBuiltins:ft};var pt=(e=>(e[e.BLUE=0]="BLUE",e[e.RED=1]="RED",e))(pt||{});class I{constructor(t=0){this.type=t,this.name=`${t===0?"Blue":"Red"} Team`,this.teams=[],this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}refreshName(){return this.filterOrganizations.length>0?this.name=this.filterOrganizations[0].text:this.name=`${this.type===0?"Blue":"Red"} Team`,this.name}get totalSolvedProblemNum(){let t=0;return this.teams.forEach(i=>{t+=i.solvedProblemNum}),t}get totalPenalty(){let t=0;return this.teams.forEach(i=>{t+=i.penaltyToMinute}),t}get totalPenaltyToString(){const t=this.totalPenalty,i=r=>r<10?`0${r}`:String(r),s=Math.floor(t/60),n=Math.floor(t%60);return[i(s),i(n)].join(":")}toJSON(){return{type:this.type,name:this.name,filterOrganizations:this.filterOrganizations,filterTeams:this.filterTeams}}}class Tt{constructor(){this.enable=!1,this.topX=5,this.equalTeams=!0,this.persist=!1,this.blueTeam=new I(0),this.redTeam=new I(1)}ToBase64(){return C.encode(JSON.stringify(this))}FromBase64(t){if(t.length===0||C.isValid(t)===!1)return;const i=JSON.parse(C.decode(t));this.enable=i.enable,this.topX=i.topX,this.equalTeams=i.equalTeams,this.persist=i.persist,this.blueTeam=new I(0),this.blueTeam.name=i.blueTeam.name,this.blueTeam.setFilterOrganizations(i.blueTeam.filterOrganizations),this.blueTeam.setFilterTeams(i.blueTeam.filterTeams),this.redTeam=new I(1),this.redTeam.name=i.redTeam.name,this.redTeam.setFilterOrganizations(i.redTeam.filterOrganizations),this.redTeam.setFilterTeams(i.redTeam.filterTeams)}}class k{constructor(){this.id="",this.name=new _,this.teams=[],this.rank=-1}reset(){this.rank=-1}static compare(t,i){return t.id<i.id?-1:t.id>i.id?1:0}}class Rt{constructor(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}reset(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}getTeamSolvedNumIndex(t){return this.teamSolvedNumIndex[t]??0}}class gt{constructor(){this.enableFilterSubmissionsByTimestamp=!1,this.width=0,this.timestamp=0,this.enableFilterTeamsByGroup=!1,this.group="all",this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map,this.enableAnimatedSubmissions=!1,this.battleOfGiants=new Tt}setSelf(t){this.enableFilterSubmissionsByTimestamp=t.enableFilterSubmissionsByTimestamp,this.width=t.width,this.timestamp=t.timestamp,this.enableFilterTeamsByGroup=t.enableFilterTeamsByGroup,this.group=t.group,this.filterOrganizations=t.filterOrganizations,this.filterOrganizationMap=t.filterOrganizationMap,this.filterTeams=t.filterTeams,this.filterTeamMap=t.filterTeamMap,this.enableAnimatedSubmissions=t.enableAnimatedSubmissions,this.battleOfGiants=t.battleOfGiants}setWidth(t,i){this.width=t,this.timestamp=Math.floor((i.getEndTime().unix()-i.getStartTime().unix())*this.width*1e-4),this.enableFilterSubmissionsByTimestamp=!0}disableFilterSubmissionByTimestamp(){this.enableFilterSubmissionsByTimestamp=!1}setGroup(t){this.group=t,this.enableFilterTeamsByGroup=!0,this.group==="all"&&this.disableFilterTeamsByGroup()}disableFilterTeamsByGroup(){this.enableFilterTeamsByGroup=!1,this.group="all"}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}isNeedReBuildRank(t){return this.enableFilterSubmissionsByTimestamp!==t.enableFilterSubmissionsByTimestamp||this.width!==t.width||this.timestamp!==t.timestamp||this.enableFilterTeamsByGroup!==t.enableFilterTeamsByGroup||this.group!==t.group}}class Ot{constructor(t,i,s){this.contest=t,this.teams=f.cloneDeep(i),this.teamsMap=new Map(this.teams.map(n=>[n.id,n])),this.submissions=f.cloneDeep(s).sort(b.compare);{const n=this.contest.options,r=f.cloneDeep(n.submissionTimestampUnit);this.submissions.forEach(l=>{l.timestampUnit=r,l.time&&(n.submissionHasTimeField=!0),l.language&&(n.submissionHasLanguageField=!0)})}this.submissionsMap=new Map(this.submissions.map(n=>[n.id,n])),this.organizationsMap=this.buildOrganizationsMap(),this.organizations=[...this.organizationsMap.values()],this.organizations.sort(k.compare),this.originTeams=this.teams.map(n=>n),this.originTeams.sort(p.compare),this.rankStatistics=new Rt,this.options=new gt,this.balloons=[];{const n=new Set;this.submissions.forEach(r=>{r.language&&n.add(r.language)}),this.languages=[...n].sort()}{const n=new Set;this.submissions.forEach(r=>{n.add(r.status)}),this.statuses=[...n].sort()}}buildOrganizationsMap(){if(!this.contest.organization)return new Map;const t=new Map;return this.teams.forEach(i=>{if(!i.organizationId)return;if(t.has(i.organizationId)){const n=t.get(i.organizationId);n?.teams.push(i),i.organization=n;return}const s=new k;s.id=i.organizationId,s.name=new _,s.name.fallback=i.organizationName,s.teams.push(i),i.organization=s,t.set(s.id,s)}),t}cleanRank(){(()=>{this.teams=[];for(const[t,i]of this.teamsMap)this.filterTeamByOrg(i)||this.teams.push(i)})();for(const t of this.organizations)t.reset();for(const t of this.teams)t.reset(),t.problemStatistics=this.contest.problems.map(i=>{const s=new Q;return s.problem=i,s.contestPenalty=this.contest.penalty,s}),t.problemStatisticsMap=new Map(t.problemStatistics.map(i=>[i.problem.id,i]));this.contest.problems.forEach(t=>{t.statistics.reset()})}buildRank(){return(()=>{this.cleanRank(),this.teams.forEach(s=>s.placeChartPoints.push({timePoint:0,rank:1,lastSolvedProblem:null})),this.rankStatistics.reset(),this.rankStatistics.teamSolvedNum=Array.from({length:this.contest.problems.length+1}).fill(0),this.rankStatistics.teamSolvedNumIndex=Array.from({length:this.contest.problems.length+1}).fill(0);let t=0;const i=this.getSubmissions();for(let s=0;s<i.length;s++){const n=i[s],r=n.teamId,l=n.problemId,m=this.teamsMap.get(r),c=this.contest.problemsMap.get(l);(()=>{if(m===void 0||this.filterTeamByOrg(m)||c===void 0)return;const o=m.problemStatisticsMap.get(l);if(o.submissions.push(n),m.submissions.push(n),c.statistics.submittedNum++,o.isSolved){n.isSolved=!1,n.isFirstSolved=!1;return}if(n.isIgnore||n.isNotCalculatedPenaltyStatus()){c.statistics.ignoreNum++,o.ignoreCount++;return}if(o.isSubmitted=!0,o.lastSubmitTimestamp=n.timestampToSecond,o.totalCount++,n.isAccepted()){for(n.isSolved=!0,o.isSolved=!0,o.solvedTimestamp=n.timestampToSecond,c.statistics.acceptedNum++,c.statistics.attemptedNum+=o.failedCount+1,(c.statistics.firstSolveSubmissions.length===0||c.statistics.firstSolveSubmissions[c.statistics.firstSolveSubmissions.length-1].timestamp===n.timestamp)&&(n.isFirstSolved=!0,o.isFirstSolved=!0,c.statistics.firstSolveSubmissions.push(n));c.statistics.lastSolveSubmissions.length>0;)c.statistics.lastSolveSubmissions.pop();c.statistics.lastSolveSubmissions.push(n),m.lastSolvedProblem=c,m.lastSolvedProblemStatistics=o}n.isRejected()&&(o.failedCount++,c.statistics.rejectedNum++),n.isPending()&&(o.pendingCount++,c.statistics.pendingNum++)})(),(n.timestampToMinute>t||s===i.length-1)&&(this.teams.forEach(o=>o.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.teams.forEach(o=>o.placeChartPoints.push({timePoint:n.timestampToMinute,rank:o.rank,lastSolvedProblem:o.lastSolvedProblem}))),t=n.timestampToMinute}this.teams.forEach(s=>s.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.buildOrgRank(),this.rankStatistics.effectiveTeamNum=this.teams.filter(s=>s.isEffectiveTeam).length,this.rankStatistics.totalTeamNum=this.teams.length,this.teams.forEach(s=>s.calcSE(this.rankStatistics.totalTeamNum)),this.contest.problems.forEach(s=>s.statistics.calcSE(this.rankStatistics.totalTeamNum)),this.buildAwards(),this.teams.forEach(s=>s.calcAwards(this.contest.awards?.get(this.options.group))),this.teams.forEach(s=>s.postProcessPlaceChartPoints())})(),(()=>{for(const t of this.teams)this.rankStatistics.teamSolvedNum[t.solvedProblemNum]++;{let t=0;const i=this.rankStatistics.teamSolvedNum,s=this.rankStatistics.teamSolvedNumIndex;for(let n=s.length-1;n>=0;n--)t+=i[n]>0?1:0,s[n]=t}this.teams.length>0&&(this.rankStatistics.maxSolvedProblems=this.teams[0].solvedProblemNum)})(),this}buildTeamRank(){let t=1,i=1,s=null;for(const n of this.teams)n.rank=t++,n.originalRank=i++,s!==null&&n.isEqualRank(s)&&(n.rank=s.rank),s=n}buildOrgRank(){if(!this.contest.organization)return;let t=1,i=null;for(const s of this.teams){const n=s.organization;!n||n.rank>-1||(n.rank=t++,s.isFirstRankOfOrganization=!0,i&&s.isEqualRank(i)&&(n.rank=i.organization.rank),i=s)}}buildAwards(){if(this.contest.medal==="ccpc"){this.contest.awards=new Map;const t=this.rankStatistics.effectiveTeamNum,i=[],s=new R,n=new R,r=new R,l=new R;s.medalType=T.GOLD,s.minRank=1,s.maxRank=Math.ceil(t*.1),s.maxRank>=s.minRank&&i.push(s),n.medalType=T.SILVER,n.minRank=s.maxRank+1,n.maxRank=Math.ceil(t*.3),n.maxRank>=n.minRank&&i.push(n),r.medalType=T.BRONZE,r.minRank=n.maxRank+1,r.maxRank=Math.ceil(t*.6),r.maxRank>=r.minRank&&i.push(r),l.medalType=T.HONORABLE,l.minRank=r.maxRank+1,this.teams.forEach(m=>{m.solvedProblemNum>0&&(l.maxRank=Math.max(l.maxRank,m.rank))}),l.maxRank>=l.minRank&&i.push(l),this.contest.awards.set("official",i)}}filterTeamByOrg(t){const i=this.options;return!!(i.enableFilterTeamsByGroup&&!t.group?.includes(i.group))}getSubmissions(){return this.contest.replayContestStartTimestamp===void 0&&this.options.enableFilterSubmissionsByTimestamp===!1?this.submissions:this.submissions.filter(t=>!(this.contest.replayContestStartTimestamp!==void 0&&t.timestampToSecond>this.contest.replayContestStartTimestamp||this.options.enableFilterSubmissionsByTimestamp&&t.timestampToSecond>this.options.timestamp))}buildBalloons(){this.balloons=[],this.cleanRank();const t=this.getSubmissions();for(let i=0;i<t.length;i++){const s=t[i],n=s.teamId,r=s.problemId,l=this.teamsMap.get(n),m=this.contest.problemsMap.get(r);(()=>{if(l===void 0||m===void 0)return;const c=l.problemStatisticsMap.get(r);if(!c.isSolved&&s.isAccepted()){c.isSolved=!0,c.solvedTimestamp=s.timestampToSecond;const o=new at;o.team=l,o.problem=m,o.submission=s,this.balloons.push(o)}})()}}setReplayTime(t){this.contest.setReplayTime(t)}}export{at as B,pt as G,Ot as R,a as S,p as T,Pt as a,nt as b,At as c,st as d,Ct as e,b as f,it as g,Dt as h,et as i,gt as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as fi,c as Un,d as Xr,g as Pf}from"./dayjs-
|
|
1
|
+
import{I as fi,c as Un,d as Xr,g as Pf}from"./dayjs-Crt-XxG9.js";import{P as Qr,K as bp,i as mp,H as vp,at as wp,au as yp,av as Vr,N as xp,C as Ap,aw as Tp,ax as No}from"./index-Cl8ui4U3.js";var je=(i=>(i.UNKNOWN="Unknown",i.GOLD="Gold",i.SILVER="Silver",i.BRONZE="Bronze",i.HONORABLE="Honorable",i))(je||{});class ko{constructor(){this.medalType="Unknown",this.minRank=0,this.maxRank=0}}function W_(i){return["Gold","Silver","Bronze","Honorable"].includes(i)}var nr={exports:{}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Lodash <https://lodash.com/>
|
|
4
4
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en-US" dir="ltr"><head><meta charset="UTF-8"/><title>Board - XCPCIO</title><script>!function(e,t,a,n){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var g=t.getElementsByTagName(a)[0],m=t.createElement(a);m.async=!0,m.src="https://www.googletagmanager.com/gtm.js?id=GTM-WHLF55BJ",g.parentNode.insertBefore(m,g)}(window,document,"script","dataLayer")</script><link rel="icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.74.
|
|
1
|
+
<!doctype html><html lang="en-US" dir="ltr"><head><meta charset="UTF-8"/><title>Board - XCPCIO</title><script>!function(e,t,a,n){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var g=t.getElementsByTagName(a)[0],m=t.createElement(a);m.async=!0,m.src="https://www.googletagmanager.com/gtm.js?id=GTM-WHLF55BJ",g.parentNode.insertBefore(m,g)}(window,document,"script","dataLayer")</script><link rel="icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.74.2/dist/balloon-512x512.svg" type="image/svg+xml"/><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.74.2/dist/balloon-512x512.svg" color="#00aba9"/><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.74.2/dist/balloon-192x192.png"/><meta name="msapplication-TileColor" content="#00aba9"/><meta name="author" content="Dup4"/><meta name="title" content="Board - XCPCIO"/><meta name="description" content="The ICPC Series Competition Leaderboard Visualization Engine."/><meta name="keywords" content="ICPC, Rank, Board, Leaderboard, ScoreBoard, Standings"/><meta property="og:site_name" content="XCPCIO"/><meta property="og:title" content="Board - XCPCIO"/><meta property="og:description" content="The ICPC Series Competition Leaderboard Visualization Engine."/><meta property="og:type" content="website"/><meta property="og:image" content="https://xcpcio.com/og.png"/><meta property="og:image:type" content="image/png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta name="twitter:title" content="Board - XCPCIO"/><meta name="twitter:description" content="The ICPC Series Competition Leaderboard Visualization Engine."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://xcpcio.com/og.png"/><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.74.2/dist";_=normalizePath(_),window.CDN_HOST=_,window.__toAssetUrl=_=>window.CDN_HOST+_}try{let _=__DATA_HOST__;_=normalizePath(_),window.DATA_HOST=_}catch(_){window.DATA_HOST="/data/"}try{let _=__DATA_REGION__;window.DATA_REGION=_}catch(_){window.DATA_REGION="CN"}try{let _=__DEFAULT_LANG__;window.DEFAULT_LANG=_}catch(_){window.DEFAULT_LANG="en"}</script><script>!function(){localStorage.getItem("vueuse-color-scheme")||localStorage.setItem("vueuse-color-scheme","light");const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("vueuse-color-scheme")||"auto";("dark"===o||e&&"light"!==o)&&document.documentElement.classList.toggle("dark",!0)}()</script><script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.74.2/dist/assets/index-Cl8ui4U3.js"></script><link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.74.2/dist/assets/index-B1MSy4n9.css"></head><body class="font-sans"><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WHLF55BJ" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><div id="app"></div><noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript><script>try{var umamiJSUrl=__UMAMI_JS_URL__,umamiWebsiteId=__UMAMI_WEBSITE_ID__;!function(){var e=document.createElement("script");e.src=umamiJSUrl,e.defer=!0,e.setAttribute("data-website-id",umamiWebsiteId);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var baiduAnalyticsId=__BAIDU_ANALYTICS_ID__,_hmt=_hmt||[];!function(){var e=document.createElement("script");e.src=`https://hm.baidu.com/hm.js?${baiduAnalyticsId}`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/board-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.74.
|
|
4
|
+
"version": "0.74.2",
|
|
5
5
|
"description": "The ICPC Series Competition Leaderboard Visualization Engine",
|
|
6
6
|
"author": "Dup4 <hi@dup4.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vue-router": "^4.6.3",
|
|
54
54
|
"vue-search-select": "^3.2.0",
|
|
55
55
|
"vue-toast-notification": "^3.1.3",
|
|
56
|
-
"@xcpcio/core": "0.74.
|
|
57
|
-
"@xcpcio/types": "0.74.
|
|
56
|
+
"@xcpcio/core": "0.74.2",
|
|
57
|
+
"@xcpcio/types": "0.74.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@iconify/json": "^2.2.401",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t}from"./index-B1073arl.js";const a="0.74.1",T="https://github.com/xcpcio/xcpcio",c="956501b5a3",I="https://xcpcio.com",r="Board - XCPCIO",_="Rating - XCPCIO",O="Balloon - XCPCIO",C="Resolver - XCPCIO",i="Countdown - XCPCIO",A=t(()=>window?window.CDN_HOST:""),o=t(()=>window?window.DATA_HOST:""),e=t(()=>o.value.replace("/data/","/rating-data/")),d=t(()=>window?window.DATA_REGION:"");export{a as A,O as B,A as C,o as D,T as G,e as R,r as T,I as X,c as a,d as b,i as c,_ as d,C as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as r,a}from"./NavBar-Cyd_3B6z.js";import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c,o as s,a as o,b as m,r as p,F as i}from"./index-B1073arl.js";import"./Tooltip.vue_vue_type_script_setup_true_lang-BnfvXkQl.js";import"./constant-DcnmUm-i.js";const u={},l={"py-10":"","text-gray-700":"","dark:text-gray-200":""};function f(d,g){const e=r,t=p("RouterView"),n=a;return s(),c(i,null,[o(e),m("main",l,[o(t),o(n)])],64)}const F=_(u,[["render",f]]);export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as u}from"./Board-CDmVknLp.js";import{_ as i}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-2RH0qEnY.js";import{b as f}from"./use-vmodel-BtnCl86J.js";import{e as l,c as e,o as t,a as n,q as d,u as a,F as B,G as k}from"./index-B1073arl.js";import{b as c}from"./route-block-B_A1xBdJ.js";import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./pagination-D1x1HgQB.js";import"./Tooltip.vue_vue_type_script_setup_true_lang-BnfvXkQl.js";import"./TheInput.vue_vue_type_script_setup_true_lang-CMFAx4px.js";import"./constant-DcnmUm-i.js";import"./rank-D-r3krAA.js";import"./dayjs-BTtDHzxO.js";import"./person-BZPbTU5K.js";import"./ContestStateBadge-2-IqOHtS.js";const h={key:0},C=l({__name:"CustomBoard",setup(m){const o=f();return(r,g)=>{const _=i,p=u;return t(),e(B,null,[n(_),a(o).length>0?(t(),e("div",h,[n(p,{"data-source-url":a(o)},null,8,["data-source-url"])])):d("",!0)],64)}}}),s={};function b(m,o){const r=C;return t(),k(r)}typeof c=="function"&&c(s);const j=x(s,[["render",b]]);export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as p}from"./Resolver-CrD0lAgS.js";import{_ as l}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-2RH0qEnY.js";import{b as d}from"./use-vmodel-BtnCl86J.js";import{e as f,c as e,o as t,F as h,q as c,u as r,b as v,a as n}from"./index-B1073arl.js";import{b as a}from"./route-block-B_A1xBdJ.js";import{_ as k}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./rank-D-r3krAA.js";import"./dayjs-BTtDHzxO.js";import"./person-BZPbTU5K.js";import"./constant-DcnmUm-i.js";import"./TheInput.vue_vue_type_script_setup_true_lang-CMFAx4px.js";const x={key:0},b={"mt-20":""},g={key:1},y=f({__name:"CustomResolver",setup(m){const o=d();return(s,B)=>{const u=l,i=p;return t(),e(h,null,[r(o).length===0?(t(),e("div",x,[v("div",b,[n(u)])])):c("",!0),r(o).length>0?(t(),e("div",g,[n(i,{"data-source-url":r(o)},null,8,["data-source-url"])])):c("",!0)],64)}}}),_={};function C(m,o){const s=y;return t(),e("div",null,[n(s)])}typeof a=="function"&&a(_);const Q=k(_,[["render",C]]);export{Q as default};
|