@xcpcio/board-app 0.58.0 → 0.59.0
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/LICENSE +1 -1
- package/dist/404.html +1 -1
- package/dist/assets/Balloon.vue_vue_type_script_setup_true_lang-C6oZahdv.js +1 -0
- package/dist/assets/{Board-bfV2AXzG.css → Board-DXbI9neC.css} +1 -1
- package/dist/assets/Board-DovAO4Mu.js +160 -0
- package/dist/assets/ContestStateBadge-soRqulZS.js +1 -0
- package/dist/assets/Countdown-D2ppGGLX.js +1 -0
- package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-CGhT--lJ.js → DataSourceInput.vue_vue_type_script_setup_true_lang-kJJ5LcaD.js} +1 -1
- package/dist/assets/Footer.vue_vue_type_script_setup_true_lang-h_cLHQgz.js +1 -0
- package/dist/assets/NavBar-CcnJ2cge.css +1 -0
- package/dist/assets/NavBar-Db-2bUQa.js +1 -0
- package/dist/assets/Resolver-CT8TRsWI.js +22 -0
- package/dist/assets/{RightArrowIcon-BLV8NR0m.js → RightArrowIcon-wpNsrEjv.js} +1 -1
- package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-Ddz_v2EA.js → TheInput.vue_vue_type_script_setup_true_lang-Eo--8z_e.js} +1 -1
- package/dist/assets/{Tooltip.vue_vue_type_script_setup_true_lang-DARa9iXY.js → Tooltip.vue_vue_type_script_setup_true_lang-YFiK3KHD.js} +1 -1
- package/dist/assets/_...all_-f8Z5ZdeB.js +1 -0
- package/dist/assets/_...all_-kxYzml7z.js +6 -0
- package/dist/assets/{_name_-yx7_Srtc.js → _name_-IhHUMucH.js} +1 -1
- package/dist/assets/{about-CVnED1Jx.js → about-Bi56EKqb.js} +1 -1
- package/dist/assets/board-2imHcuqa.js +1 -0
- package/dist/assets/board-layout-Dv9kVbfh.js +1 -0
- package/dist/assets/{constant-DSpXS9EB.js → constant-DAnT2gcW.js} +1 -1
- package/dist/assets/contest-CmhGi5GX.js +39 -0
- package/dist/assets/dayjs-CJBmrKAq.js +1 -0
- package/dist/assets/default-B2tsSga6.js +1 -0
- package/dist/assets/{headless-BuviTyFh.js → headless-D7YRIgg8.js} +1 -1
- package/dist/assets/home-BToYn0H2.js +1 -0
- package/dist/assets/index-B2VET1_I.js +1 -0
- package/dist/assets/{index-Ady3dPWW.js → index-BNOo90nu.js} +4 -4
- package/dist/assets/index-CHBwbgGj.js +1 -0
- package/dist/assets/{index-kywOXmCz.css → index-CREIPGSZ.css} +1 -1
- package/dist/assets/index-DhTVZZ9u.js +1 -0
- package/dist/assets/{index-CTrXc_ad.js → index-RxxNhn0e.js} +3 -3
- package/dist/assets/index-layout-78wTk6Fj.js +1 -0
- package/dist/assets/{index-NAFopKNk.js → index-q3HWYEPg.js} +1 -1
- package/dist/assets/{pagination-BDMRouio.js → pagination-Dnx4Nats.js} +3 -3
- package/dist/assets/query-D9FW_Yec.js +1 -0
- package/dist/assets/rank-DrF0MN_o.js +1 -0
- package/dist/assets/{test-Dv9hiwbh.js → test-yIsv8BB-.js} +1 -1
- package/dist/assets/{use-vmodel-BMopcTKl.js → use-vmodel-c-1x5v4Y.js} +1 -1
- package/dist/assets/{user-CIQVqsnh.js → user-LMkuYIst.js} +1 -1
- package/dist/assets/{virtual_pwa-register-FrtDMHns.js → virtual_pwa-register-CVvHW-l_.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/manifest.webmanifest +1 -1
- package/dist/sw.js +1 -1
- package/package.json +11 -14
- package/src/components/Balloon.vue +2 -2
- package/src/components/ContestIndexUI.vue +2 -2
- package/src/components/CustomBalloon.vue +1 -1
- package/src/components/CustomBoard.vue +1 -1
- package/src/components/CustomCountdown.vue +1 -1
- package/src/components/CustomResolver.vue +1 -1
- package/src/components/DataSourceInput.vue +1 -1
- package/src/components/NavBar.vue +1 -1
- package/src/components/board/AnimatedSubmissionBlock.vue +3 -3
- package/src/components/board/AnimatedSubmissionsModal.vue +2 -2
- package/src/components/board/Board.vue +5 -5
- package/src/components/board/SubmissionsTable.vue +3 -3
- package/src/components/rating/RatingTable.vue +2 -2
- package/src/components/table/TablePagination.vue +1 -1
- package/src/modules/README.md +2 -2
- package/src/modules/i18n.ts +1 -1
- package/src/modules/nprogress.ts +1 -1
- package/src/modules/pinia.ts +1 -1
- package/src/modules/pwa.ts +1 -1
- package/src/modules/toast.ts +1 -1
- package/src/pages/index.vue +4 -4
- package/tsconfig.json +3 -15
- package/vite.config.ts +2 -3
- package/dist/assets/Balloon.vue_vue_type_script_setup_true_lang-DnE4noY3.js +0 -1
- package/dist/assets/Board-DO5BNw67.js +0 -1
- package/dist/assets/ContestStateBadge-qPGuwMbg.js +0 -1
- package/dist/assets/Countdown-VgT-6NFn.js +0 -1
- package/dist/assets/Footer.vue_vue_type_script_setup_true_lang-CQ8Zcd0R.js +0 -1
- package/dist/assets/NavBar-5RI6vTLB.js +0 -1
- package/dist/assets/NavBar-C0cqpBnK.css +0 -1
- package/dist/assets/Resolver-BN7iimhj.js +0 -22
- package/dist/assets/_...all_-CKcEVvv_.js +0 -1
- package/dist/assets/_...all_-teHz4X5J.js +0 -6
- package/dist/assets/board-DakR4pDi.js +0 -1
- package/dist/assets/board-layout-DdM3lob2.js +0 -1
- package/dist/assets/default-FditJscA.js +0 -1
- package/dist/assets/home-Bf8_tY2r.js +0 -1
- package/dist/assets/index--yZky3Ya.js +0 -1
- package/dist/assets/index-Ce2B_0l4.js +0 -1
- package/dist/assets/index-CztAyAip.js +0 -1
- package/dist/assets/index-DSPkSuvh.js +0 -198
- package/dist/assets/index-ZdhxhYDN.js +0 -1
- package/dist/assets/index-fbkuToK_.js +0 -1
- package/dist/assets/index-layout-_UytqIdy.js +0 -1
- package/dist/assets/query-Bg4AFX8l.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a5 as V,a6 as j,a7 as d,a8 as D,a9 as w,aa as z,ab as k,ac as M,ad as H,ae as T,af as K,ag as G,ah as L,ai as Y,aj as J,ak as X,al as Z,f as W,am as q,an as tt,ao as et,C as Q,ap as $,aq as st,ar as A,as as it,at as nt,au as rt}from"./index-BNOo90nu.js";import{a as at}from"./constant-DAnT2gcW.js";import{u as B}from"./contest-CmhGi5GX.js";var ot=class extends V{constructor(t,e){super(),this.options=e,this.#s=t,this.#n=null,this.#i=j(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#a;#l;#i;#n;#b;#c;#f;#o;#h;#r;#d=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_(this.#t,this.options)?this.#u():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return U(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return U(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#O(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,i=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof d(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),e._defaulted&&!D(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&N(this.#t,i,this.options,e)&&this.#u(),this.updateResult(),s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||w(this.options.staleTime,this.#t)!==w(e.staleTime,this.#t))&&this.#v();const n=this.#m();s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||n!==this.#r)&&this.#R(n)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),i=this.createResult(e,t);return ut(this,i)&&(this.#e=i,this.#l=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(i,s)=>(this.trackProp(s),e?.(s),s==="promise"&&!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(i,s))})}trackProp(t){this.#d.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),i=this.#s.getQueryCache().build(this.#s,e);return i.fetch().then(()=>this.createResult(i,e))}fetch(t){return this.#u({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#u(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(z)),e}#v(){this.#g();const t=w(this.options.staleTime,this.#t);if(k||this.#e.isStale||!M(t))return;const i=H(this.#e.dataUpdatedAt,t)+1;this.#o=T.setTimeout(()=>{this.#e.isStale||this.updateResult()},i)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#R(t){this.#O(),this.#r=t,!(k||d(this.options.enabled,this.#t)===!1||!M(this.#r)||this.#r===0)&&(this.#h=T.setInterval(()=>{(this.options.refetchIntervalInBackground||K.isFocused())&&this.#u()},this.#r))}#y(){this.#v(),this.#R(this.#m())}#g(){this.#o&&(T.clearTimeout(this.#o),this.#o=void 0)}#O(){this.#h&&(T.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const i=this.#t,s=this.options,n=this.#e,a=this.#a,u=this.#l,v=t!==i?t.state:this.#p,{state:g}=t;let r={...g},S=!1,h;if(e._optimisticResults){const c=this.hasListeners(),C=!c&&_(t,e),y=c&&N(t,i,e,s);(C||y)&&(r={...r,...G(g.data,t.options)}),e._optimisticResults==="isRestoring"&&(r.fetchStatus="idle")}let{error:o,errorUpdatedAt:b,status:f}=r;h=r.data;let O=!1;if(e.placeholderData!==void 0&&h===void 0&&f==="pending"){let c;n?.isPlaceholderData&&e.placeholderData===u?.placeholderData?(c=n.data,O=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,c!==void 0&&(f="success",h=L(n?.data,c,e),S=!0)}if(e.select&&h!==void 0&&!O)if(n&&h===a?.data&&e.select===this.#b)h=this.#c;else try{this.#b=e.select,h=e.select(h),h=L(n?.data,h,e),this.#c=h,this.#n=null}catch(c){this.#n=c}this.#n&&(o=this.#n,h=this.#c,b=Date.now(),f="error");const m=r.fetchStatus==="fetching",R=f==="pending",E=f==="error",P=R&&m,x=h!==void 0,p={status:f,fetchStatus:r.fetchStatus,isPending:R,isSuccess:f==="success",isError:E,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:r.dataUpdatedAt,error:o,errorUpdatedAt:b,failureCount:r.fetchFailureCount,failureReason:r.fetchFailureReason,errorUpdateCount:r.errorUpdateCount,isFetched:r.dataUpdateCount>0||r.errorUpdateCount>0,isFetchedAfterMount:r.dataUpdateCount>v.dataUpdateCount||r.errorUpdateCount>v.errorUpdateCount,isFetching:m,isRefetching:m&&!R,isLoadingError:E&&!x,isPaused:r.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:E&&x,isStale:F(t,e),refetch:this.refetch,promise:this.#i,isEnabled:d(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=I=>{p.status==="error"?I.reject(p.error):p.data!==void 0&&I.resolve(p.data)},C=()=>{const I=this.#i=p.promise=j();c(I)},y=this.#i;switch(y.status){case"pending":t.queryHash===i.queryHash&&c(y);break;case"fulfilled":(p.status==="error"||p.data!==y.value)&&C();break;case"rejected":(p.status!=="error"||p.error!==y.reason)&&C();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#l=this.options,this.#a.data!==void 0&&(this.#f=this.#t),D(e,t))return;this.#e=e;const i=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,n=typeof s=="function"?s():s;if(n==="all"||!n&&!this.#d.size)return!0;const a=new Set(n??this.#d);return this.options.throwOnError&&a.add("error"),Object.keys(this.#e).some(u=>{const l=u;return this.#e[l]!==t[l]&&a.has(l)})};this.#S({listeners:i()})}#w(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(t){Y.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function ht(t,e){return d(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function _(t,e){return ht(t,e)||t.state.data!==void 0&&U(t,e,e.refetchOnMount)}function U(t,e,i){if(d(e.enabled,t)!==!1&&w(e.staleTime,t)!=="static"){const s=typeof i=="function"?i(t):i;return s==="always"||s!==!1&&F(t,e)}return!1}function N(t,e,i,s){return(t!==e||d(s.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&F(t,i)}function F(t,e){return d(e.enabled,t)!==!1&&t.isStaleByTime(w(e.staleTime,t))}function ut(t,e){return!D(t.getCurrentResult(),e)}function lt(t=""){if(!J())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const e=Z(t),i=X(e);if(!i)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return i}function ct(t,e,i){const s=lt(),n=W(()=>{const o=q(e);typeof o.enabled=="function"&&(o.enabled=o.enabled());const b=s.defaultQueryOptions(o);return b._optimisticResults=s.isRestoring?.value?"isRestoring":"optimistic",b}),a=new t(s,n.value),u=n.value.shallow?tt(a.getCurrentResult()):et(a.getCurrentResult());let l=()=>{};s.isRestoring&&Q(s.isRestoring,o=>{o||(l(),l=a.subscribe(b=>{$(u,b)}))},{immediate:!0});const v=()=>{a.setOptions(n.value),$(u,a.getCurrentResult())};Q(n,v),st(()=>{l()});const g=(...o)=>(v(),u.refetch(...o)),r=()=>new Promise((o,b)=>{let f=()=>{};const O=()=>{if(n.value.enabled!==!1){a.setOptions(n.value);const m=a.getOptimisticResult(n.value);m.isStale?(f(),a.fetchOptimistic(n.value).then(o,R=>{A(n.value.throwOnError,[R,a.getCurrentQuery()])?b(R):o(a.getCurrentResult())})):(f(),o(m))}};O(),f=Q(n,O)});Q(()=>u.error,o=>{if(u.isError&&!u.isFetching&&A(n.value.throwOnError,[o,a.getCurrentQuery()]))throw o});const S=n.value.shallow?it(u):nt(u),h=rt(S);for(const o in u)typeof u[o]=="function"&&(h[o]=u[o]);return h.suspense=r,h.refetch=g,h}function ft(t,e){return ct(ot,t)}const dt=3;async function pt(t,e){const i=t.startsWith("/")?t.slice(1):t;let s=`${window.DATA_HOST}${i}`;const n={allInOne:!1};if(s.includes("#")){const r=new URLSearchParams(s.split("#")[1]);n.allInOne=r.get("allInOne")==="true",s=s.split("#")[0]}t.startsWith("http")&&(s=t),s.endsWith("/")&&(s=s.slice(0,-1));const a=r=>r.includes("?")?`${r}&t=${e??0}`:`${r}?t=${e??0}`,u=n.allInOne?[await fetch(a(s))]:[await fetch(a(`${s}/config.json`)),await fetch(a(`${s}/team.json`)),await fetch(a(`${s}/run.json`))],{status:l,statusText:v}=u[0];if(l>=300||l<200)throw new Error(`fetch data failed. [status=${l}] [statusText=${v}]`);return Promise.all(u.map(r=>r.json())).then(r=>n.allInOne?r[0]:{contest:r[0],teams:r[1],submissions:r[2]})}function yt(t,e,i=!1){let s=3e4,n=s;const a=W(()=>Math.floor(e.value.getTime()/1e3/10));return at.value==="I18N"&&(s=10*1e3,n=s),i&&(s=Number.POSITIVE_INFINITY,n=!1),ft({queryKey:[t,a.value],queryFn:()=>pt(t,a.value),retry:dt,staleTime:s,refetchInterval:n})}function gt(){return B("data-source","",{transform:String})}function Ot(){return B("battle-of-giants","",{transform:String})}export{Ot as a,gt as g,yt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as V,_ as f,P as Z,T as H,M as T,A as R}from"./contest-CmhGi5GX.js";var n=(t=>(t.PENDING="PENDING",t.WAITING="WAITING",t.PREPARING="PREPARING",t.COMPILING="COMPILING",t.RUNNING="RUNNING",t.JUDGING="JUDGING",t.FROZEN="FROZEN",t.ACCEPTED="ACCEPTED",t.CORRECT="CORRECT",t.PARTIALLY_CORRECT="PARTIALLY_CORRECT",t.REJECTED="REJECTED",t.WRONG_ANSWER="WRONG_ANSWER",t.NO_OUTPUT="NO_OUTPUT",t.COMPILATION_ERROR="COMPILATION_ERROR",t.PRESENTATION_ERROR="PRESENTATION_ERROR",t.RUNTIME_ERROR="RUNTIME_ERROR",t.TIME_LIMIT_EXCEEDED="TIME_LIMIT_EXCEEDED",t.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",t.OUTPUT_LIMIT_EXCEEDED="OUTPUT_LIMIT_EXCEEDED",t.IDLENESS_LIMIT_EXCEEDED="IDLENESS_LIMIT_EXCEEDED",t.HACKED="HACKED",t.JUDGEMENT_FAILED="JUDGEMENT_FAILED",t.CONFIGURATION_ERROR="CONFIGURATION_ERROR",t.FILE_ERROR="FILE_ERROR",t.SYSTEM_ERROR="SYSTEM_ERROR",t.CANCELED="CANCELED",t.SKIPPED="SKIPPED",t.SECURITY_VIOLATED="SECURITY_VIOLATED",t.DENIAL_OF_JUDGEMENT="DENIAL_OF_JUDGEMENT",t.UNKNOWN="UNKNOWN",t.UNDEFINED="UNDEFINED",t))(n||{});const It={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"},gt={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 $(t){return t=t.toUpperCase().replace(" ","_"),["OK","AC",n.ACCEPTED.toString()].includes(t)||[n.CORRECT.toString()].includes(t)?n.ACCEPTED:[n.PARTIALLY_CORRECT.toString()].includes(t)?n.PARTIALLY_CORRECT:["WA",n.WRONG_ANSWER.toString()].includes(t)?n.WRONG_ANSWER:["RJ","INCORRECT",n.REJECTED.toString()].includes(t)?n.REJECTED:["NO",n.NO_OUTPUT.toString()].includes(t)?n.NO_OUTPUT:["PD",n.PENDING.toString()].includes(t)?n.PENDING:[n.WAITING.toString()].includes(t)?n.WAITING:[n.JUDGING.toString()].includes(t)?n.JUDGING:[n.FROZEN.toString()].includes(t)?n.FROZEN:["CE",n.COMPILATION_ERROR.toString()].includes(t)?n.COMPILATION_ERROR:["PE",n.PRESENTATION_ERROR.toString()].includes(t)?n.PRESENTATION_ERROR:["TL","TLE",n.TIME_LIMIT_EXCEEDED.toString()].includes(t)?n.TIME_LIMIT_EXCEEDED:["ML","MLE",n.MEMORY_LIMIT_EXCEEDED.toString()].includes(t)?n.MEMORY_LIMIT_EXCEEDED:["OL","OLE",n.OUTPUT_LIMIT_EXCEEDED.toString()].includes(t)?n.OUTPUT_LIMIT_EXCEEDED:["IL","ILE",n.IDLENESS_LIMIT_EXCEEDED.toString()].includes(t)?n.IDLENESS_LIMIT_EXCEEDED:["RT","RE","RTE",n.RUNTIME_ERROR.toString()].includes(t)?n.RUNTIME_ERROR:["JE",n.JUDGEMENT_FAILED.toString()].includes(t)?n.JUDGEMENT_FAILED:["SE",n.SYSTEM_ERROR.toString()].includes(t)?n.SYSTEM_ERROR:[n.HACKED.toString()].includes(t)?n.HACKED:[n.CONFIGURATION_ERROR.toString()].includes(t)?n.CONFIGURATION_ERROR:[n.CANCELED.toString()].includes(t)?n.CANCELED:[n.SKIPPED.toString()].includes(t)?n.SKIPPED:[n.SECURITY_VIOLATED.toString()].includes(t)?n.SECURITY_VIOLATED:[n.DENIAL_OF_JUDGEMENT.toString()].includes(t)?n.DENIAL_OF_JUDGEMENT:n.UNKNOWN}function q(t){return[n.ACCEPTED,n.CORRECT].includes(t)}function Q(t){return[n.RUNTIME_ERROR,n.TIME_LIMIT_EXCEEDED,n.MEMORY_LIMIT_EXCEEDED,n.OUTPUT_LIMIT_EXCEEDED,n.IDLENESS_LIMIT_EXCEEDED,n.WRONG_ANSWER,n.REJECTED,n.NO_OUTPUT,n.JUDGEMENT_FAILED,n.HACKED].includes(t)}function tt(t){return[n.PENDING,n.WAITING,n.COMPILING,n.JUDGING,n.FROZEN].includes(t)}function et(t){return[n.COMPILATION_ERROR,n.PRESENTATION_ERROR,n.CONFIGURATION_ERROR,n.SYSTEM_ERROR,n.CANCELED,n.SKIPPED,n.UNKNOWN,n.UNDEFINED].includes(t)}class b{constructor(){this.status=n.UNKNOWN,this.isIgnore=!1,this.isSolved=!1,this.isFirstSolved=!1,this.id="",this.teamId="",this.problemId="",this.timestamp=0,this.timestampUnit="second"}isAccepted(){return q(this.status)}isRejected(){return Q(this.status)}isPending(){return tt(this.status)}isNotCalculatedPenaltyStatus(){return et(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 e=this.timestampToSecond,i=Math.floor(e/3600),s=Math.floor(e%3600/60),r=e%60,a=m=>m.toString().padStart(2,"0");return`${a(i)}:${a(s)}:${a(r)}`}get timestampDisplayFormatWithMilliSecond(){let e=this.timestampDisplayFormatWithSecond;if(this.timestampUnit==="millisecond"){const i=(this.timestamp%1e3).toString().padStart(3,"0");e+=`.${i}`}return e}static compare(e,i){if(e.timestamp!==i.timestamp)return e.timestamp-i.timestamp;if(e.teamId===i.teamId){if(e.isAccepted()&&!i.isAccepted())return-1;if(!e.isAccepted()&&i.isAccepted())return 1}return e.id<i.id?-1:e.id===i.id?0:1}}function P(t,e){const i=new b;return i.id=String(t.id??t.submission_id??""),i.teamId=String(t.team_id),i.problemId=String(t.problem_id),i.timestamp=t.timestamp,i.status=$(t.status),i.isIgnore=t.is_ignore??!1,t.time&&(i.time=t.time),t.language&&(i.language=t.language),t.reaction?i.reaction=t.reaction:e?.options.reactionVideoUrlTemplate&&(i.reaction={url:e.options.reactionVideoUrlTemplate.replace(/\$\{submission_id\}/,i.id)}),i}function Nt(t,e){return Array.isArray(t)?t.map((i,s)=>P({...i,id:i.submission_id??String(s)},e)):Object.entries(t).map(([s,r])=>P({...r,id:r.submission_id??s},e))}class p{constructor(){this.id="",this.name="",this.organization="",this.group=[],this.tag=[],this.rank=0,this.originalRank=0,this.organizationRank=-1,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}reset(){this.rank=0,this.originalRank=0,this.organizationRank=-1,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 membersToArray(){if(Array.isArray(this.members))return this.members;if(typeof this.members=="string"){if(this.members.includes(", "))return this.members.split(", ");if(this.members.includes("、"))return this.members.split("、")}return[]}get membersToString(){return typeof this.members=="string"?this.members:this.members?.join(", ")}get isEffectiveTeam(){return this.solvedProblemNum>0}get dirt(){const e=this.attemptedProblemNum,i=this.solvedProblemNum;return V(e,i)}calcSE(e){let i=0,s=0;if(this.problemStatistics.forEach(a=>{a.isSolved&&(i+=1,s+=a.problem.statistics.acceptedNum)}),e===0||i===0)return 0;const r=(i*e-s)/e/i;return this.se=Math.round(r*100)/100,this.se}calcSolvedData(e){this.solvedProblemNum=0,this.attemptedProblemNum=0,this.penalty=0;for(const i of this.problemStatistics)i.isAccepted&&(this.solvedProblemNum++,this.attemptedProblemNum+=i.failedCount+1,e?.calculationOfPenalty==="in_seconds"||e?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"?this.penalty+=i.penaltyInSecond:this.penalty+=i.penalty);e?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"&&(this.penalty=Math.floor(this.penalty/60)*60)}calcAwards(e){if(e)for(const i of e)this.rank>=i.minRank&&this.rank<=i.maxRank&&this.awards.push(i.medalType)}isEqualRank(e){return this.solvedProblemNum===e.solvedProblemNum&&this.penalty===e.penalty}postProcessPlaceChartPoints(){if(this.placeChartPoints.length===0)return;const e=[];e.push(this.placeChartPoints[0]);for(let i=1;i<this.placeChartPoints.length-1;i++){const s=this.placeChartPoints[i],r=e[e.length-1];(s.rank!==r.rank||s.lastSolvedProblem!==r.lastSolvedProblem)&&e.push(s)}this.placeChartPoints.length>1&&e.push(this.placeChartPoints[this.placeChartPoints.length-1]),this.placeChartPoints=e}static compare(e,i){return e.solvedProblemNum!==i.solvedProblemNum?i.solvedProblemNum-e.solvedProblemNum:e.penalty!==i.penalty?e.penalty-i.penalty:e.lastSolvedProblemStatistics&&i.lastSolvedProblemStatistics?e.lastSolvedProblemStatistics.solvedTimestampToMinute-i.lastSolvedProblemStatistics.solvedTimestampToMinute:e.name<i.name?-1:e.name>i.name?1:0}}function O(t){const e=new p;e.id=t.id??t.team_id??"",e.name=t.name??t.team_name??"",e.organization=t.organization??"",e.badge=t.badge,e.group=f.cloneDeep(t.group??[]),e.tag=f.cloneDeep(t.tag??[]),e.coach=t.coach,e.members=t.members,t.official&&e.group.push("official"),t.unofficial&&e.group.push("unofficial"),t.girl&&e.group.push("girl");{const i=t;for(const s of Object.keys(i))(i[s]===1||i[s]===!0)&&e.group.push(s)}return e.group=[...new Set(e.group)],e.group.sort(),t.location&&(e.location=t.location),t.icpc_id&&(e.icpcID=t.icpc_id),e}function bt(t){return Array.isArray(t)?t.map(e=>O(e)):Object.entries(t).map(([i,s])=>O({...s,team_id:s.team_id??i}))}class it{constructor(){this.problem=new Z,this.team=new p,this.submission=new b}get key(){return`balloon-${this.team.id}-${this.problem.id}`}static compare(e,i){return b.compare(e.submission,i.submission)}}const x="3.7.8",st=x,h=typeof Buffer=="function",M=typeof TextDecoder=="function"?new TextDecoder:void 0,y=typeof TextEncoder=="function"?new TextEncoder:void 0,rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=Array.prototype.slice.call(rt),I=(t=>{let e={};return t.forEach((i,s)=>e[i]=s),e})(d),nt=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),U=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),F=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),G=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),k=t=>{let e,i,s,r,a="";const l=t.length%3;for(let m=0;m<t.length;){if((i=t.charCodeAt(m++))>255||(s=t.charCodeAt(m++))>255||(r=t.charCodeAt(m++))>255)throw new TypeError("invalid character found");e=i<<16|s<<8|r,a+=d[e>>18&63]+d[e>>12&63]+d[e>>6&63]+d[e&63]}return l?a.slice(0,l-3)+"===".substring(l):a},A=typeof btoa=="function"?t=>btoa(t):h?t=>Buffer.from(t,"binary").toString("base64"):k,D=h?t=>Buffer.from(t).toString("base64"):t=>{let i=[];for(let s=0,r=t.length;s<r;s+=4096)i.push(u.apply(null,t.subarray(s,s+4096)));return A(i.join(""))},N=(t,e=!1)=>e?F(D(t)):D(t),at=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?u(192|e>>>6)+u(128|e&63):u(224|e>>>12&15)+u(128|e>>>6&63)+u(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return u(240|e>>>18&7)+u(128|e>>>12&63)+u(128|e>>>6&63)+u(128|e&63)}},ot=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,w=t=>t.replace(ot,at),L=h?t=>Buffer.from(t,"utf8").toString("base64"):y?t=>D(y.encode(t)):t=>A(w(t)),E=(t,e=!1)=>e?F(L(t)):L(t),v=t=>E(t,!0),lt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,mt=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),i=e-65536;return u((i>>>10)+55296)+u((i&1023)+56320);case 3:return u((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return u((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},B=t=>t.replace(lt,mt),z=t=>{if(t=t.replace(/\s+/g,""),!nt.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,i,s,r=[];for(let a=0;a<t.length;)e=I[t.charAt(a++)]<<18|I[t.charAt(a++)]<<12|(i=I[t.charAt(a++)])<<6|(s=I[t.charAt(a++)]),i===64?r.push(u(e>>16&255)):s===64?r.push(u(e>>16&255,e>>8&255)):r.push(u(e>>16&255,e>>8&255,e&255));return r.join("")},S=typeof atob=="function"?t=>atob(G(t)):h?t=>Buffer.from(t,"base64").toString("binary"):z,W=h?t=>U(Buffer.from(t,"base64")):t=>U(S(t).split("").map(e=>e.charCodeAt(0))),X=t=>W(Y(t)),ct=h?t=>Buffer.from(t,"base64").toString("utf8"):M?t=>M.decode(W(t)):t=>B(S(t)),Y=t=>G(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),C=t=>ct(Y(t)),ut=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},K=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),j=function(){const t=(e,i)=>Object.defineProperty(String.prototype,e,K(i));t("fromBase64",function(){return C(this)}),t("toBase64",function(e){return E(this,e)}),t("toBase64URI",function(){return E(this,!0)}),t("toBase64URL",function(){return E(this,!0)}),t("toUint8Array",function(){return X(this)})},J=function(){const t=(e,i)=>Object.defineProperty(Uint8Array.prototype,e,K(i));t("toBase64",function(e){return N(this,e)}),t("toBase64URI",function(){return N(this,!0)}),t("toBase64URL",function(){return N(this,!0)})},Et=()=>{j(),J()},_={version:x,VERSION:st,atob:S,atobPolyfill:z,btoa:A,btoaPolyfill:k,fromBase64:C,toBase64:E,encode:E,encodeURI:v,encodeURL:v,utob:w,btou:B,decode:C,isValid:ut,fromUint8Array:N,toUint8Array:X,extendString:j,extendUint8Array:J,extendBuiltins:Et};var ht=(t=>(t[t.BLUE=0]="BLUE",t[t.RED=1]="RED",t))(ht||{});class g{constructor(e=0){this.type=e,this.name=`${e===0?"Blue":"Red"} Team`,this.teams=[],this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map}setFilterOrganizations(e){const i=new Map;e.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=e,this.filterOrganizationMap=i}setFilterTeams(e){const i=new Map;e.forEach(s=>{i.set(s.value,s)}),this.filterTeams=e,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 e=0;return this.teams.forEach(i=>{e+=i.solvedProblemNum}),e}get totalPenalty(){let e=0;return this.teams.forEach(i=>{e+=i.penaltyToMinute}),e}get totalPenaltyToString(){const e=this.totalPenalty,i=a=>a<10?`0${a}`:String(a),s=Math.floor(e/60),r=Math.floor(e%60);return[i(s),i(r)].join(":")}toJSON(){return{type:this.type,name:this.name,filterOrganizations:this.filterOrganizations,filterTeams:this.filterTeams}}}class dt{constructor(){this.enable=!1,this.topX=5,this.equalTeams=!0,this.persist=!1,this.blueTeam=new g(0),this.redTeam=new g(1)}ToBase64(){return _.encode(JSON.stringify(this))}FromBase64(e){if(e.length===0||_.isValid(e)===!1)return;const i=JSON.parse(_.decode(e));this.enable=i.enable,this.topX=i.topX,this.equalTeams=i.equalTeams,this.persist=i.persist,this.blueTeam=new g(0),this.blueTeam.name=i.blueTeam.name,this.blueTeam.setFilterOrganizations(i.blueTeam.filterOrganizations),this.blueTeam.setFilterTeams(i.blueTeam.filterTeams),this.redTeam=new g(1),this.redTeam.name=i.redTeam.name,this.redTeam.setFilterOrganizations(i.redTeam.filterOrganizations),this.redTeam.setFilterTeams(i.redTeam.filterTeams)}}class ft{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(e){return this.teamSolvedNumIndex[e]??0}}class pt{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 dt}setSelf(e){this.enableFilterSubmissionsByTimestamp=e.enableFilterSubmissionsByTimestamp,this.width=e.width,this.timestamp=e.timestamp,this.enableFilterTeamsByGroup=e.enableFilterTeamsByGroup,this.group=e.group,this.filterOrganizations=e.filterOrganizations,this.filterOrganizationMap=e.filterOrganizationMap,this.filterTeams=e.filterTeams,this.filterTeamMap=e.filterTeamMap,this.enableAnimatedSubmissions=e.enableAnimatedSubmissions,this.battleOfGiants=e.battleOfGiants}setWidth(e,i){this.width=e,this.timestamp=Math.floor((i.getEndTime().unix()-i.getStartTime().unix())*this.width*1e-4),this.enableFilterSubmissionsByTimestamp=!0}disableFilterSubmissionByTimestamp(){this.enableFilterSubmissionsByTimestamp=!1}setGroup(e){this.group=e,this.enableFilterTeamsByGroup=!0,this.group==="all"&&this.disableFilterTeamsByGroup()}disableFilterTeamsByGroup(){this.enableFilterTeamsByGroup=!1,this.group="all"}setFilterOrganizations(e){const i=new Map;e.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=e,this.filterOrganizationMap=i}setFilterTeams(e){const i=new Map;e.forEach(s=>{i.set(s.value,s)}),this.filterTeams=e,this.filterTeamMap=i}isNeedReBuildRank(e){return this.enableFilterSubmissionsByTimestamp!==e.enableFilterSubmissionsByTimestamp||this.width!==e.width||this.timestamp!==e.timestamp||this.enableFilterTeamsByGroup!==e.enableFilterTeamsByGroup||this.group!==e.group}}class _t{constructor(e,i,s){this.contest=e,this.teams=f.cloneDeep(i),this.teamsMap=new Map(this.teams.map(r=>[r.id,r])),this.submissions=f.cloneDeep(s).sort(b.compare);{const r=this.contest.options,a=f.cloneDeep(r.submissionTimestampUnit);this.submissions.forEach(l=>{l.timestampUnit=a,l.time&&(r.submissionHasTimeField=!0),l.language&&(r.submissionHasLanguageField=!0)})}this.submissionsMap=new Map(this.submissions.map(r=>[r.id,r])),this.organizations=this.buildOrganizations(),this.originTeams=this.teams.map(r=>r),this.originTeams.sort(p.compare),this.rankStatistics=new ft,this.options=new pt,this.balloons=[];{const r=new Set;this.submissions.forEach(a=>{a.language&&r.add(a.language)}),this.languages=[...r].sort()}{const r=new Set;this.submissions.forEach(a=>{r.add(a.status)}),this.statuses=[...r].sort()}}cleanRank(){(()=>{this.teams=[];for(const[e,i]of this.teamsMap)this.filterTeamByOrg(i)||this.teams.push(i)})();for(const e of this.teams)e.reset(),e.problemStatistics=this.contest.problems.map(i=>{const s=new H;return s.problem=i,s.contestPenalty=this.contest.penalty,s}),e.problemStatisticsMap=new Map(e.problemStatistics.map(i=>[i.problem.id,i]));this.contest.problems.forEach(e=>{e.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 e=0;const i=this.getSubmissions();for(let s=0;s<i.length;s++){const r=i[s],a=r.teamId,l=r.problemId,m=this.teamsMap.get(a),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(r),m.submissions.push(r),c.statistics.submittedNum++,o.isSolved){r.isSolved=!1,r.isFirstSolved=!1;return}if(r.isIgnore||r.isNotCalculatedPenaltyStatus()){c.statistics.ignoreNum++,o.ignoreCount++;return}if(o.isSubmitted=!0,o.lastSubmitTimestamp=r.timestampToSecond,o.totalCount++,r.isAccepted()){for(r.isSolved=!0,o.isSolved=!0,o.solvedTimestamp=r.timestampToSecond,c.statistics.acceptedNum++,c.statistics.attemptedNum+=o.failedCount+1,(c.statistics.firstSolveSubmissions.length===0||c.statistics.firstSolveSubmissions[c.statistics.firstSolveSubmissions.length-1].timestamp===r.timestamp)&&(r.isFirstSolved=!0,o.isFirstSolved=!0,c.statistics.firstSolveSubmissions.push(r));c.statistics.lastSolveSubmissions.length>0;)c.statistics.lastSolveSubmissions.pop();c.statistics.lastSolveSubmissions.push(r),m.lastSolvedProblem=c,m.lastSolvedProblemStatistics=o}r.isRejected()&&(o.failedCount++,c.statistics.rejectedNum++),r.isPending()&&(o.pendingCount++,c.statistics.pendingNum++)})(),(r.timestampToMinute>e||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:r.timestampToMinute,rank:o.rank,lastSolvedProblem:o.lastSolvedProblem}))),e=r.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 e of this.teams)this.rankStatistics.teamSolvedNum[e.solvedProblemNum]++;{let e=0;const i=this.rankStatistics.teamSolvedNum,s=this.rankStatistics.teamSolvedNumIndex;for(let r=s.length-1;r>=0;r--)e+=i[r]>0?1:0,s[r]=e}this.teams.length>0&&(this.rankStatistics.maxSolvedProblems=this.teams[0].solvedProblemNum)})(),this}buildTeamRank(){let e=1,i=1,s=null;for(const r of this.teams)r.rank=e++,r.originalRank=i++,s!==null&&r.isEqualRank(s)&&(r.rank=s.rank),s=r}buildOrgRank(){if(!this.contest.organization)return;let e=1,i=null;const s=new Set;for(const r of this.teams){const a=r.organization;s.has(a)||(s.add(a),r.organizationRank=e++,i!==null&&r.isEqualRank(i)&&(r.organizationRank=i.organizationRank),i=r)}}buildOrganizations(){if(!this.contest.organization)return[];const e=new Array,i=new Set;return this.teams.forEach(s=>{const r=s.organization;i.has(r)||(e.push(r),i.add(r))}),e.sort(),e}buildAwards(){if(this.contest.medal==="ccpc"){this.contest.awards=new Map;const e=this.rankStatistics.effectiveTeamNum,i=[],s=new R,r=new R,a=new R,l=new R;s.medalType=T.GOLD,s.minRank=1,s.maxRank=Math.ceil(e*.1),s.maxRank>=s.minRank&&i.push(s),r.medalType=T.SILVER,r.minRank=s.maxRank+1,r.maxRank=Math.ceil(e*.3),r.maxRank>=r.minRank&&i.push(r),a.medalType=T.BRONZE,a.minRank=r.maxRank+1,a.maxRank=Math.ceil(e*.6),a.maxRank>=a.minRank&&i.push(a),l.medalType=T.HONORABLE,l.minRank=a.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(e){const i=this.options;return!!(i.enableFilterTeamsByGroup&&!e.group?.includes(i.group))}getSubmissions(){return this.contest.replayContestStartTimestamp===void 0&&this.options.enableFilterSubmissionsByTimestamp===!1?this.submissions:this.submissions.filter(e=>!(this.contest.replayContestStartTimestamp!==void 0&&e.timestampToSecond>this.contest.replayContestStartTimestamp||this.options.enableFilterSubmissionsByTimestamp&&e.timestampToSecond>this.options.timestamp))}buildBalloons(){this.balloons=[],this.cleanRank();const e=this.getSubmissions();for(let i=0;i<e.length;i++){const s=e[i],r=s.teamId,a=s.problemId,l=this.teamsMap.get(r),m=this.contest.problemsMap.get(a);(()=>{if(l===void 0||m===void 0)return;const c=l.problemStatisticsMap.get(a);if(!c.isSolved&&s.isAccepted()){c.isSolved=!0,c.solvedTimestamp=s.timestampToSecond;const o=new it;o.team=l,o.problem=m,o.submission=s,this.balloons.push(o)}})()}}setReplayTime(e){this.contest.setReplayTime(e)}}export{it as B,ht as G,_t as R,n as S,p as T,Nt as a,et as b,bt as c,tt as d,gt as e,b as f,Q as g,It as h,q as i,pt as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-Eo--8z_e.js";import{d as c,m as f,H as _,u as b,c as h,o as v,b as e,k as a,h as s,a as x,X as y,z as g}from"./index-BNOo90nu.js";import{u as k}from"./user-LMkuYIst.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./use-vmodel-c-1x5v4Y.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},w={"text-sm":"","opacity-75":""},I={"w-48":""},B={class:"hidden",for:"input"},C=["disabled"],N=c({name:"IndexPage",__name:"test",setup(R){const i=k(),o=f(i.savedName),u=_();function r(){o.value&&u.push(`/hi/${encodeURIComponent(o.value)}`)}const{t:n}=b();return(U,t)=>{const d=p;return v(),h("div",V,[t[1]||(t[1]=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1)),t[2]||(t[2]=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1)),e("p",null,[e("em",w,a(s(n)("intro.desc")),1)]),t[3]||(t[3]=e("div",{"py-4":""},null,-1)),e("div",I,[x(d,{modelValue:s(o),"onUpdate:modelValue":t[0]||(t[0]=m=>g(o)?o.value=m:null),placeholder:s(n)("intro.whats-your-name"),autocomplete:"false",onKeydown:y(r,["enter"])},null,8,["modelValue","placeholder"]),e("label",B,a(s(n)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!s(o),onClick:r},a(s(n)("button.go")),9,C)])])}}});typeof l=="function"&&l(N);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as c,aB as r}from"./index-
|
|
1
|
+
import{aA as c,aB as r}from"./index-BNOo90nu.js";const d=(...p)=>{const s=c().proxy.$props,t=Object.create(null);for(const e of p)if(typeof e=="string")t[e]=r(s,e,void 0,{eventName:`update:${e}`,passive:!0});else{const[o,n=o,a=`update:${o}`,u={}]=e;t[o]=r(s,n,void 0,{eventName:a,passive:!0,...u})}return t};export{d as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ay as n,m as r,f as t}from"./index-
|
|
1
|
+
import{ay as n,m as r,f as t}from"./index-BNOo90nu.js";const f=n("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function m(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:m,otherNames:u,savedName:e}});export{f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as f}from"./index-
|
|
1
|
+
import{_ as f}from"./index-BNOo90nu.js";function p(n={}){const{immediate:s=!1,onNeedRefresh:u,onOfflineReady:o,onRegistered:d,onRegisteredSW:r,onRegisterError:i}=n;let t,a;const c=async(e=!0)=>{await a};async function l(){if("serviceWorker"in navigator){if(t=await f(async()=>{const{Workbox:e}=await import("./workbox-window.prod.es5-CwtvwXb3.js");return{Workbox:e}},[],import.meta.url).then(({Workbox:e})=>new e("/sw.js",{scope:"/",type:"classic"})).catch(e=>{i?.(e)}),!t)return;t.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),t.addEventListener("installed",e=>{e.isUpdate||o?.()}),t.register({immediate:s}).then(e=>{r?r("/sw.js",e):d?.(e)}).catch(e=>{i?.(e)})}}return a=l(),c}export{p as registerSW};
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.59.0/dist/balloon-192x192.png"/><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.59.0/dist/balloon-512x512.svg" color="#00aba9"/><meta name="msapplication-TileColor" content="#00aba9"/><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.59.0/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.59.0/dist/assets/index-BNOo90nu.js"></script><link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.59.0/dist/assets/index-DqMOf7dN.css"><link rel="manifest" href="/manifest.webmanifest"></head><body class="font-sans"><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 plausibleJSUrl=__PLAUSIBLE_JS_URL__,plausibleDataDomain=__PLAUSIBLE_DATA_DOMAIN__;!function(){var e=document.createElement("script");e.src=plausibleJSUrl,e.defer=!0,e.setAttribute("data-domain",plausibleDataDomain);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){}try{var googleAnalyticsId=__GOOGLE_ANALYTICS_ID__;!function(){var e,t,a,r,c,n;location.port||(e=window,t=document,a="script",r="ga",e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,c=t.createElement(a),n=t.getElementsByTagName(a)[0],c.async=1,c.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(c,n),ga("create",`${googleAnalyticsId}`,"auto"),ga("send","pageview"))}()}catch(e){}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"Board","short_name":"Board","description":"
|
|
1
|
+
{"name":"Board","short_name":"Board","description":"The ICPC Series Competition Leaderboard Visualization Engine","start_url":"/","display":"standalone","background_color":"#ffffff","theme_color":"#ffffff","lang":"en","scope":"/","icons":[{"src":"/balloon2-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/balloon2-512x512.png","sizes":"512x512","type":"image/png"},{"src":"/balloon2-512x512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]}
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,
|
|
1
|
+
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,r)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const t=s=>l(s,i),o={module:{uri:i},exports:u,require:t};e[i]=Promise.all(n.map((s=>o[s]||t(s)))).then((s=>(r(...s),u)))}}define(["./workbox-7ee6f867"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_..-5I0UWqRG.css",revision:null},{url:"assets/_...all_-f8Z5ZdeB.js",revision:null},{url:"assets/_...all_-kxYzml7z.js",revision:null},{url:"assets/_name_-IhHUMucH.js",revision:null},{url:"assets/_plugin-vue_export-helper-DlAUqK2U.js",revision:null},{url:"assets/about-Bi56EKqb.js",revision:null},{url:"assets/Balloon.vue_vue_type_script_setup_true_lang-C6oZahdv.js",revision:null},{url:"assets/board-2imHcuqa.js",revision:null},{url:"assets/Board-DovAO4Mu.js",revision:null},{url:"assets/Board-DXbI9neC.css",revision:null},{url:"assets/board-layout-Dv9kVbfh.js",revision:null},{url:"assets/constant-DAnT2gcW.js",revision:null},{url:"assets/contest-CmhGi5GX.js",revision:null},{url:"assets/ContestStateBadge-BqhxSQpe.css",revision:null},{url:"assets/ContestStateBadge-soRqulZS.js",revision:null},{url:"assets/Countdown-CGwMuG9S.css",revision:null},{url:"assets/Countdown-D2ppGGLX.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-kJJ5LcaD.js",revision:null},{url:"assets/dayjs-CJBmrKAq.js",revision:null},{url:"assets/default-B2tsSga6.js",revision:null},{url:"assets/en-C8WQ1AP4.js",revision:null},{url:"assets/Footer.vue_vue_type_script_setup_true_lang-h_cLHQgz.js",revision:null},{url:"assets/headless-D7YRIgg8.js",revision:null},{url:"assets/home-BToYn0H2.js",revision:null},{url:"assets/index-B2VET1_I.js",revision:null},{url:"assets/index-BNOo90nu.js",revision:null},{url:"assets/index-CD2Bzcv5.css",revision:null},{url:"assets/index-CHBwbgGj.js",revision:null},{url:"assets/index-CREIPGSZ.css",revision:null},{url:"assets/index-DhTVZZ9u.js",revision:null},{url:"assets/index-DqMOf7dN.css",revision:null},{url:"assets/index-layout-78wTk6Fj.js",revision:null},{url:"assets/index-q3HWYEPg.js",revision:null},{url:"assets/index-RxxNhn0e.js",revision:null},{url:"assets/NavBar-CcnJ2cge.css",revision:null},{url:"assets/NavBar-Db-2bUQa.js",revision:null},{url:"assets/pagination-Dnx4Nats.js",revision:null},{url:"assets/query-D9FW_Yec.js",revision:null},{url:"assets/rank-DrF0MN_o.js",revision:null},{url:"assets/Resolver-BTlxgfNF.css",revision:null},{url:"assets/Resolver-CT8TRsWI.js",revision:null},{url:"assets/RightArrowIcon-wpNsrEjv.js",revision:null},{url:"assets/route-block-B_A1xBdJ.js",revision:null},{url:"assets/test-yIsv8BB-.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-Eo--8z_e.js",revision:null},{url:"assets/Tooltip-DzyPDwbo.css",revision:null},{url:"assets/Tooltip.vue_vue_type_script_setup_true_lang-YFiK3KHD.js",revision:null},{url:"assets/use-vmodel-c-1x5v4Y.js",revision:null},{url:"assets/user-LMkuYIst.js",revision:null},{url:"assets/virtual_pwa-register-CVvHW-l_.js",revision:null},{url:"assets/workbox-window.prod.es5-CwtvwXb3.js",revision:null},{url:"assets/zh-CN-Bs0tKfN4.js",revision:null},{url:"index.html",revision:"7954a22bd8970cbba9ea9fe8cb7cf5bf"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"manifest.webmanifest",revision:"2a3579b4def3b981643d514aab210ae8"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/board-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"description": "
|
|
6
|
-
"author": "Dup4 <
|
|
4
|
+
"version": "0.59.0",
|
|
5
|
+
"description": "The ICPC Series Competition Leaderboard Visualization Engine",
|
|
6
|
+
"author": "Dup4 <hi@dup4.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"
|
|
8
|
+
"funding": "https://github.com/sponsors/Dup4",
|
|
9
|
+
"homepage": "https://xcpcio.com",
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/xcpcio/xcpcio.git"
|
|
12
|
+
"url": "git+https://github.com/xcpcio/xcpcio.git",
|
|
13
|
+
"directory": "packages/apps/board"
|
|
12
14
|
},
|
|
13
15
|
"bugs": {
|
|
14
16
|
"url": "https://github.com/xcpcio/xcpcio/issues"
|
|
@@ -16,9 +18,8 @@
|
|
|
16
18
|
"keywords": [
|
|
17
19
|
"ICPC",
|
|
18
20
|
"CCPC",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"Standings"
|
|
21
|
+
"Leaderboard",
|
|
22
|
+
"Visualization"
|
|
22
23
|
],
|
|
23
24
|
"files": [
|
|
24
25
|
"./*.{js,ts,json}",
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
"vue-router": "^4.5.1",
|
|
55
56
|
"vue-search-select": "^3.2.0",
|
|
56
57
|
"vue-toast-notification": "^3.1.3",
|
|
57
|
-
"@xcpcio/
|
|
58
|
-
"@xcpcio/
|
|
58
|
+
"@xcpcio/types": "0.59.0",
|
|
59
|
+
"@xcpcio/core": "0.59.0"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@iconify/json": "^2.2.381",
|
|
@@ -109,11 +110,7 @@
|
|
|
109
110
|
"preview": "vite preview",
|
|
110
111
|
"preview-https": "serve dist",
|
|
111
112
|
"start": "npm run preview",
|
|
112
|
-
"lint": "eslint .",
|
|
113
|
-
"lint:fix": "eslint --fix .",
|
|
114
|
-
"test": "vitest",
|
|
115
113
|
"test:e2e": "cypress open",
|
|
116
|
-
"test:unit": "vitest",
|
|
117
114
|
"typecheck": "vue-tsc --noEmit",
|
|
118
115
|
"sizecheck": "npx vite-bundle-visualizer"
|
|
119
116
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Contest, Submissions, Teams } from "@xcpcio/core";
|
|
3
3
|
import type { Contest as IContest, Submissions as ISubmissions, Teams as ITeams } from "@xcpcio/types";
|
|
4
|
-
import {
|
|
4
|
+
import { BALLOON_TITLE_SUFFIX } from "@board/composables/constant";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { Balloon, createContest, createSubmissions, createTeams, Rank } from "@xcpcio/core";
|
|
7
7
|
|
|
8
8
|
const props = defineProps<{
|
|
9
9
|
dataSourceUrl: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { ContestIndex } from "@xcpcio/core";
|
|
3
3
|
|
|
4
|
+
import { getLogoFromPreset } from "@board/composables/logo";
|
|
4
5
|
import { useElementVisibility } from "@vueuse/core";
|
|
5
|
-
import { getImageSource } from "@xcpcio/core";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { getImageSource } from "@xcpcio/core";
|
|
8
8
|
|
|
9
9
|
const props = defineProps<{
|
|
10
10
|
data: ContestIndex;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { availableLocales, loadLanguageAsync } from "@board/modules/i18n";
|
|
2
3
|
import { GITHUB_URL, XCPCIO_HOME } from "@xcpcio/types";
|
|
3
|
-
import { availableLocales, loadLanguageAsync } from "~/modules/i18n";
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
width?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { AnimatedSubmissionBlockItem } from "
|
|
2
|
+
import type { AnimatedSubmissionBlockItem } from "@board/composables/type";
|
|
3
3
|
|
|
4
|
+
import { getMedalColor } from "@board/composables/color";
|
|
5
|
+
import { LastBlockDisplayType } from "@board/composables/type";
|
|
4
6
|
import { SubmissionStatusToSimpleString } from "@xcpcio/types";
|
|
5
|
-
import { getMedalColor } from "~/composables/color";
|
|
6
|
-
import { LastBlockDisplayType } from "~/composables/type";
|
|
7
7
|
|
|
8
8
|
const props = defineProps<{
|
|
9
9
|
item: AnimatedSubmissionBlockItem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { AnimatedSubmissionBlockItem } from "@board/composables/type";
|
|
2
3
|
import type { Rank } from "@xcpcio/core";
|
|
3
|
-
import type { AnimatedSubmissionBlockItem } from "~/composables/type";
|
|
4
4
|
|
|
5
|
+
import { LastBlockDisplayType } from "@board/composables/type";
|
|
5
6
|
import { Submission } from "@xcpcio/core";
|
|
6
|
-
import { LastBlockDisplayType } from "~/composables/type";
|
|
7
7
|
|
|
8
8
|
const props = defineProps<{
|
|
9
9
|
rank: Rank;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { Item } from "@board/components/board/SecondLevelMenu.vue";
|
|
2
3
|
import type { Contest, Submissions, Teams } from "@xcpcio/core";
|
|
3
4
|
import type { Contest as IContest, Submissions as ISubmissions, Teams as ITeams } from "@xcpcio/types";
|
|
4
|
-
import type { Item } from "~/components/board/SecondLevelMenu.vue";
|
|
5
5
|
|
|
6
|
+
import FilterModal from "@board/components/board/FilterModal.vue";
|
|
7
|
+
|
|
8
|
+
import { TITLE_SUFFIX } from "@board/composables/constant";
|
|
6
9
|
import { onKeyStroke, useDocumentVisibility, useIntervalFn, useNow } from "@vueuse/core";
|
|
7
10
|
|
|
8
11
|
import { useRouteQuery } from "@vueuse/router";
|
|
9
12
|
import { createContest, createSubmissions, createTeams, getImageSource, getTimeDiff, Rank, RankOptions } from "@xcpcio/core";
|
|
10
|
-
|
|
11
13
|
import { ContestState } from "@xcpcio/types";
|
|
12
|
-
import _ from "lodash";
|
|
13
|
-
import FilterModal from "~/components/board/FilterModal.vue";
|
|
14
14
|
|
|
15
|
-
import
|
|
15
|
+
import _ from "lodash";
|
|
16
16
|
|
|
17
17
|
const props = defineProps<{
|
|
18
18
|
dataSourceUrl?: string;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import type { Rank, SelectOptionItem, Submissions } from "@xcpcio/core";
|
|
3
3
|
|
|
4
4
|
import type { SubmissionReaction, SubmissionStatus } from "@xcpcio/types";
|
|
5
|
+
import { Pagination } from "@board/composables/pagination";
|
|
5
6
|
import { Submission } from "@xcpcio/core";
|
|
6
7
|
import { SubmissionStatusToString } from "@xcpcio/types";
|
|
7
|
-
import { MultiSelect } from "vue-search-select";
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { MultiSelect } from "vue-search-select";
|
|
10
10
|
|
|
11
|
-
import "
|
|
11
|
+
import "@board/styles/submission-status-filter.css";
|
|
12
12
|
|
|
13
13
|
interface FilterOptions {
|
|
14
14
|
orgNames: string[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Rating, SelectOptionItem } from "@xcpcio/core";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Pagination } from "@board/composables/pagination";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { MultiSelect } from "vue-search-select";
|
|
7
7
|
|
|
8
8
|
interface FilterOptions {
|
|
9
9
|
organizations: string[];
|
package/src/modules/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# Modules
|
|
2
2
|
|
|
3
3
|
A custom user module system. Place a `.ts` file with the following template, it will be installed automatically.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
import type { UserModule } from "
|
|
6
|
+
import type { UserModule } from "@board/types";
|
|
7
7
|
|
|
8
8
|
export const install: UserModule = ({ app, router, isClient }) => {
|
|
9
9
|
// do something
|
package/src/modules/i18n.ts
CHANGED
package/src/modules/nprogress.ts
CHANGED
package/src/modules/pinia.ts
CHANGED
package/src/modules/pwa.ts
CHANGED
package/src/modules/toast.ts
CHANGED
package/src/pages/index.vue
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { ContestIndexList } from "@xcpcio/core";
|
|
3
3
|
|
|
4
|
+
import ContestIndexUI from "@board/components/ContestIndexUI.vue";
|
|
5
|
+
import SearchInput from "@board/components/SearchInput.vue";
|
|
6
|
+
import { TITLE_SUFFIX } from "@board/composables/constant";
|
|
7
|
+
|
|
4
8
|
import { useFetch } from "@vueuse/core";
|
|
5
9
|
import { useRouteQuery } from "@vueuse/router";
|
|
6
10
|
import { createContestIndexList } from "@xcpcio/core";
|
|
7
11
|
|
|
8
|
-
import ContestIndexUI from "~/components/ContestIndexUI.vue";
|
|
9
|
-
import SearchInput from "~/components/SearchInput.vue";
|
|
10
|
-
import { TITLE_SUFFIX } from "~/composables/constant";
|
|
11
|
-
|
|
12
12
|
const { t } = useI18n();
|
|
13
13
|
useTitle(TITLE_SUFFIX);
|
|
14
14
|
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../../../tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"jsx": "preserve",
|
|
5
|
-
"lib": ["DOM", "ESNext"],
|
|
6
|
-
"baseUrl": ".",
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"moduleResolution": "Bundler",
|
|
9
|
-
"paths": {
|
|
10
|
-
"~/*": ["src/*"]
|
|
11
|
-
},
|
|
12
|
-
"resolveJsonModule": true,
|
|
4
|
+
"lib": ["dom", "esnext"],
|
|
13
5
|
"types": [
|
|
14
6
|
"vitest",
|
|
15
7
|
"vite/client",
|
|
@@ -19,14 +11,10 @@
|
|
|
19
11
|
"unplugin-vue-router/client"
|
|
20
12
|
],
|
|
21
13
|
"allowJs": true,
|
|
22
|
-
"strict": true,
|
|
23
|
-
"strictNullChecks": true,
|
|
24
14
|
"noUnusedLocals": true,
|
|
25
15
|
"noEmit": true,
|
|
26
|
-
"esModuleInterop": true,
|
|
27
16
|
"forceConsistentCasingInFileNames": true,
|
|
28
|
-
"isolatedModules": true
|
|
29
|
-
"skipLibCheck": true
|
|
17
|
+
"isolatedModules": true
|
|
30
18
|
},
|
|
31
19
|
"vueCompilerOptions": {
|
|
32
20
|
"plugins": [
|
package/vite.config.ts
CHANGED
|
@@ -20,6 +20,7 @@ import VueDevTools from "vite-plugin-vue-devtools";
|
|
|
20
20
|
import Layouts from "vite-plugin-vue-layouts";
|
|
21
21
|
import WebfontDownload from "vite-plugin-webfont-dl";
|
|
22
22
|
import generateSitemap from "vite-ssg-sitemap";
|
|
23
|
+
import { alias } from "../../../alias";
|
|
23
24
|
import "vitest/config";
|
|
24
25
|
|
|
25
26
|
const proxyConfig = {
|
|
@@ -29,9 +30,7 @@ const proxyConfig = {
|
|
|
29
30
|
|
|
30
31
|
export default defineConfig({
|
|
31
32
|
resolve: {
|
|
32
|
-
alias
|
|
33
|
-
"~/": `${path.resolve(__dirname, "src")}/`,
|
|
34
|
-
},
|
|
33
|
+
alias,
|
|
35
34
|
},
|
|
36
35
|
|
|
37
36
|
plugins: [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as w,f as _,m as i,p as D,c as n,o as s,q as g,h as e,n as E,b as o,K as h,k as d,A as L,u as N,C as F,F as V,E as z,G as I,s as R}from"./index-Ady3dPWW.js";import{a as U,b as A,d as O,B as q,R as G}from"./index-DSPkSuvh.js";import{B}from"./constant-DSpXS9EB.js";import{u as K}from"./query-Bg4AFX8l.js";const M={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},Q={class:"resolver-team-name",truncate:"","overflow-hidden":""},X={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},H=w({__name:"BalloonBlock",props:{index:null,balloon:null},setup(x){const f=x,b=_(()=>f.index),l=_(()=>f.balloon),c=i(null),a=D(c);function v(t){return[t.location,t.organization,t.name].filter(p=>p).join(" - ")}const u=_(()=>l.value.problem.balloonColor);return(t,m)=>(s(),n("div",{ref_key:"el",ref:c,"h-24":""},[e(a)?(s(),n("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:E([e(b)%2===0?"bg-resolver-bg-0":"bg-resolver-bg-1"])},[o("div",{"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":"",style:h({backgroundColor:e(u).background_color})},[o("div",{style:h({color:e(u).color})},d(e(l).problem.label),5)],4),o("div",M,[o("div",Q,d(v(e(l).team)),1),m[0]||(m[0]=o("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1))]),o("div",X,d(e(l).submission.timestampToMinute),1)],2)):g("",!0)],512))}}),J={class:"bg-[#323443]","text-gray-200":"","w-screen":"","h-screen":""},P={key:0},W={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},Y={key:0},Z={key:1},ee={flex:"","flex-col":"","justify-between":""},ae=w({__name:"Balloon",props:{dataSourceUrl:null},setup(x){const f=x,b=L(B),{t:l}=N(),c=i(!1),a=i({}),v=i([]),u=i([]),t=i({}),m=R();function p(){const k=new G(a.value,v.value,u.value);k.buildBalloons(),t.value=k}const{data:r,isError:C,error:j}=K(f.dataSourceUrl,m);F(r,async()=>{r.value===null||r.value===void 0||(a.value=U(r.value?.contest),b.value=`${a.value.name} | ${B}`,v.value=A(r.value?.teams),u.value=O(r.value?.submissions,a.value),p(),c.value=!0)},{immediate:!0});const S=_(()=>t.value.balloons.sort(q.compare).reverse().slice(0,256));return(k,oe)=>{const T=H;return s(),n("div",J,[e(c)?(s(),n("div",Z,[o("div",ee,[(s(!0),n(V,null,z(e(S),(y,$)=>(s(),I(T,{key:y.key,index:$,balloon:y},null,8,["index","balloon"]))),128))])])):(s(),n("div",P,[o("div",W,[o("div",null,d(e(l)("common.loading"))+"... ",1),e(C)?(s(),n("div",Y,d(e(j)),1)):g("",!0)])]))])}}});export{ae as _};
|