@xcpcio/board-app 0.32.0 → 0.33.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.
Files changed (42) hide show
  1. package/dist/assets/{Board-a9988a0d.js → Board-5815574f.js} +3 -3
  2. package/dist/assets/{Board-5181d383.css → Board-99a6e425.css} +1 -1
  3. package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-7ca3c000.js → DataSourceInput.vue_vue_type_script_setup_true_lang-3a011309.js} +1 -1
  4. package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-2682b2e3.js → TheInput.vue_vue_type_script_setup_true_lang-c4669f90.js} +1 -1
  5. package/dist/assets/{_...all_-c4727646.js → _...all_-9575471a.js} +1 -1
  6. package/dist/assets/{_name_-8853f4a2.js → _name_-c49901a2.js} +1 -1
  7. package/dist/assets/{about-b984181a.js → about-9ae6988f.js} +1 -1
  8. package/dist/assets/{board-ce33013d.js → board-039c3f4a.js} +1 -1
  9. package/dist/assets/{board-layout-ccb8d7e4.js → board-layout-b556ae6f.js} +1 -1
  10. package/dist/assets/{headless-be8dd44c.js → headless-c2f93337.js} +1 -1
  11. package/dist/assets/{home-bc4084e9.js → home-281261c3.js} +1 -1
  12. package/dist/assets/index-39ee8a2c.css +1 -0
  13. package/dist/assets/index-a501b47e.js +1 -0
  14. package/dist/assets/index-b8d0230b.js +338 -0
  15. package/dist/assets/index-ca39a150.js +1 -0
  16. package/dist/assets/{index-bbe8c4f8.css → index-e63239d5.css} +1 -1
  17. package/dist/assets/{index-layout-95eb074e.js → index-layout-7e38f172.js} +1 -1
  18. package/dist/assets/{test-fa217a0f.js → test-b15602ea.js} +1 -1
  19. package/dist/assets/{useQueryBoardData-95ed94f9.js → useQueryBoardData-fc6b78c1.js} +1 -1
  20. package/dist/assets/{user-c1e9292b.js → user-5cfcf268.js} +1 -1
  21. package/dist/assets/{virtual_pwa-register-f8259b1b.js → virtual_pwa-register-7426d7cc.js} +1 -1
  22. package/dist/index.html +1 -122
  23. package/dist/sw.js +1 -1
  24. package/package.json +4 -3
  25. package/src/auto-imports.d.ts +4 -1
  26. package/src/components/Balloon.vue +2 -2
  27. package/src/components/BalloonBlock.vue +3 -14
  28. package/src/components/Countdown.vue +0 -7
  29. package/src/components/board/{DynamicSubmissionsModal.vue → AnimatedSubmissionsModal.vue} +19 -6
  30. package/src/components/board/Board.vue +2 -2
  31. package/src/components/board/OptionsModal.vue +4 -4
  32. package/src/components/board/ProblemBlock.vue +4 -2
  33. package/src/components/board/SubmissionsTable.vue +2 -4
  34. package/src/components/board/TeamUI.vue +4 -4
  35. package/src/components/board/Utility.vue +15 -15
  36. package/src/components.d.ts +1 -1
  37. package/src/composables/color.ts +31 -0
  38. package/vite.config.ts +16 -0
  39. package/dist/assets/index-181beaa6.js +0 -1
  40. package/dist/assets/index-622de38d.css +0 -1
  41. package/dist/assets/index-6c4a0937.js +0 -205
  42. package/dist/assets/index-d882800e.js +0 -1
@@ -38,7 +38,6 @@ declare global {
38
38
  const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
39
39
  const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
40
40
  const defineComponent: typeof import('vue')['defineComponent']
41
- const downloadSingleFile: typeof import('./composables/utils')['downloadSingleFile']
42
41
  const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
43
42
  const effectScope: typeof import('vue')['effectScope']
44
43
  const extendRef: typeof import('@vueuse/core')['extendRef']
@@ -47,10 +46,12 @@ declare global {
47
46
  const getDataSourceUrl: typeof import('./composables/query')['getDataSourceUrl']
48
47
  const getLocalStorageKeyForFilterOrganizations: typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterOrganizations']
49
48
  const getLocalStorageKeyForFilterTeams: typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterTeams']
49
+ const getMedalColor: typeof import('./composables/color')['getMedalColor']
50
50
  const getProblemChart: typeof import('./composables/statistics')['getProblemChart']
51
51
  const getSubmitChart: typeof import('./composables/statistics')['getSubmitChart']
52
52
  const getTeamChart: typeof import('./composables/statistics')['getTeamChart']
53
53
  const getTeamPlaceChart: typeof import('./composables/statistics')['getTeamPlaceChart']
54
+ const getWhiteOrBlackColor: typeof import('./composables/color')['getWhiteOrBlackColor']
54
55
  const h: typeof import('vue')['h']
55
56
  const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
56
57
  const inject: typeof import('vue')['inject']
@@ -357,6 +358,7 @@ declare module 'vue' {
357
358
  readonly getDataSourceUrl: UnwrapRef<typeof import('./composables/query')['getDataSourceUrl']>
358
359
  readonly getLocalStorageKeyForFilterOrganizations: UnwrapRef<typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterOrganizations']>
359
360
  readonly getLocalStorageKeyForFilterTeams: UnwrapRef<typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterTeams']>
361
+ readonly getMedalColor: UnwrapRef<typeof import('./composables/color')['getMedalColor']>
360
362
  readonly getProblemChart: UnwrapRef<typeof import('./composables/statistics')['getProblemChart']>
361
363
  readonly getSubmitChart: UnwrapRef<typeof import('./composables/statistics')['getSubmitChart']>
362
364
  readonly getTeamChart: UnwrapRef<typeof import('./composables/statistics')['getTeamChart']>
@@ -658,6 +660,7 @@ declare module '@vue/runtime-core' {
658
660
  readonly getDataSourceUrl: UnwrapRef<typeof import('./composables/query')['getDataSourceUrl']>
659
661
  readonly getLocalStorageKeyForFilterOrganizations: UnwrapRef<typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterOrganizations']>
660
662
  readonly getLocalStorageKeyForFilterTeams: UnwrapRef<typeof import('./composables/useLocalStorage')['getLocalStorageKeyForFilterTeams']>
663
+ readonly getMedalColor: UnwrapRef<typeof import('./composables/color')['getMedalColor']>
661
664
  readonly getProblemChart: UnwrapRef<typeof import('./composables/statistics')['getProblemChart']>
662
665
  readonly getSubmitChart: UnwrapRef<typeof import('./composables/statistics')['getSubmitChart']>
663
666
  readonly getTeamChart: UnwrapRef<typeof import('./composables/statistics')['getTeamChart']>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { Rank, createContest, createSubmissions, createTeams } from "@xcpcio/core";
2
+ import { Balloon, Rank, createContest, createSubmissions, createTeams } from "@xcpcio/core";
3
3
  import type { Contest, Submissions, Teams } from "@xcpcio/core";
4
4
  import type { Contest as IContest, Submissions as ISubmissions, Teams as ITeams } from "@xcpcio/types";
5
5
 
@@ -43,7 +43,7 @@ watch(data, async () => {
43
43
  });
44
44
 
45
45
  const balloons = computed(() => {
46
- return rank.value.balloons;
46
+ return rank.value.balloons.sort(Balloon.compare).reverse().slice(0, 256);
47
47
  });
48
48
 
49
49
  const setNowIntervalId = setInterval(() => {
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import type { Balloon, Team } from "@xcpcio/core";
3
- import type { ThemeColor } from "@xcpcio/types";
4
3
 
5
4
  const props = defineProps<{
6
5
  index: number;
@@ -18,17 +17,7 @@ function showTeamName(team: Team) {
18
17
  return sections.filter(s => s).join(" - ");
19
18
  }
20
19
 
21
- function getColor(c: ThemeColor): string {
22
- if (typeof c === "string") {
23
- return c;
24
- }
25
-
26
- if (isDark && c?.dark) {
27
- return c.dark;
28
- }
29
-
30
- return c.light;
31
- }
20
+ const balloonColor = computed(() => balloon.value.problem.balloonColor);
32
21
  </script>
33
22
 
34
23
  <template>
@@ -47,12 +36,12 @@ function getColor(c: ThemeColor): string {
47
36
  w-20
48
37
  flex flex-shrink-0 justify-center items-center
49
38
  :style="{
50
- backgroundColor: getColor(balloon.problem?.balloonColor?.background_color ?? 'rgba(0, 0, 0, 0.5)'),
39
+ backgroundColor: balloonColor.background_color,
51
40
  }"
52
41
  >
53
42
  <div
54
43
  :style="{
55
- color: getColor(balloon.problem?.balloonColor?.color ?? '#fff'),
44
+ color: balloonColor.color,
56
45
  }"
57
46
  >
58
47
  {{ balloon.problem.label }}
@@ -68,13 +68,6 @@ onUnmounted(() => {
68
68
  items-center justify-center
69
69
  font-mono
70
70
  >
71
- <div
72
- mt-20
73
- text-5xl
74
- >
75
- {{ contest.name }}
76
- </div>
77
-
78
71
  <div
79
72
  mt-20
80
73
  text-6xl
@@ -3,6 +3,8 @@ import type { Problem, Rank, Team } from "@xcpcio/core";
3
3
  import { Submission } from "@xcpcio/core";
4
4
  import { SubmissionStatusToSimpleString } from "@xcpcio/types";
5
5
 
6
+ import { getMedalColor } from "~/composables/color";
7
+
6
8
  const props = defineProps<{
7
9
  rank: Rank,
8
10
  }>();
@@ -33,6 +35,10 @@ const submissions = computed(() => {
33
35
  continue;
34
36
  }
35
37
 
38
+ if (rank.value.filterTeamByOrg(team)) {
39
+ continue;
40
+ }
41
+
36
42
  const problem = rank.value.contest.problemsMap.get(problemId);
37
43
  if (!problem) {
38
44
  continue;
@@ -78,16 +84,21 @@ const submissions = computed(() => {
78
84
  bg-slate-800 text-gray-200
79
85
  font-mono
80
86
  flex flex-row
81
- pl-2
87
+ justify-center items-center
82
88
  >
83
89
  <div
84
- w-8
90
+ w-10
91
+ :style="getMedalColor(s.team)"
92
+ flex
93
+ justify-center items-center
85
94
  >
86
- {{ s.team.rank }}
95
+ <div>
96
+ {{ s.team.rank }}
97
+ </div>
87
98
  </div>
88
99
 
89
100
  <div
90
- pl-2
101
+ pl-1
91
102
  w-80
92
103
  truncate
93
104
  >
@@ -105,7 +116,7 @@ const submissions = computed(() => {
105
116
  border-b-4
106
117
  flex justify-center
107
118
  :style="{
108
- 'border-color': s.problem.balloonColor?.background_color.toString() ?? '#fff',
119
+ borderColor: s.problem.balloonColor.background_color,
109
120
  }"
110
121
  >
111
122
  {{ s.problem.label }}
@@ -115,7 +126,9 @@ const submissions = computed(() => {
115
126
  w-10
116
127
  flex justify-center
117
128
  :class="[s.submission.status]"
118
- opacity-100
129
+ :style="{
130
+ color: '#000',
131
+ }"
119
132
  >
120
133
  {{ SubmissionStatusToSimpleString[s.submission.status] }}
121
134
  </div>
@@ -460,9 +460,9 @@ const widthClass = "sm:w-[1260px] xl:w-screen";
460
460
  </div>
461
461
 
462
462
  <div
463
- v-if="rankOptions.enableDynamicSubmissions"
463
+ v-if="rankOptions.enableAnimatedSubmissions"
464
464
  >
465
- <DynamicSubmissionsModal
465
+ <AnimatedSubmissionsModal
466
466
  :rank="rank"
467
467
  />
468
468
  </div>
@@ -40,7 +40,7 @@ const title = computed(() => {
40
40
  return t("type_menu.options");
41
41
  });
42
42
 
43
- const enableDynamicSubmissions = ref(rankOptions.value.enableDynamicSubmissions);
43
+ const enableAnimatedSubmissions = ref(rankOptions.value.enableAnimatedSubmissions);
44
44
 
45
45
  const orgOptions = computed(() => {
46
46
  const res = rank.value.organizations.map((o) => {
@@ -95,7 +95,7 @@ function onConfirm() {
95
95
  localStorage.setItem(localStorageKeyForFilterOrganizations, JSON.stringify(orgSelectedItems.value));
96
96
  localStorage.setItem(localStorageKeyForFilterTeams, JSON.stringify(teamsSelectedItems.value));
97
97
 
98
- rankOptions.value.enableDynamicSubmissions = enableDynamicSubmissions.value;
98
+ rankOptions.value.enableAnimatedSubmissions = enableAnimatedSubmissions.value;
99
99
 
100
100
  onCancel();
101
101
  }
@@ -170,12 +170,12 @@ function onConfirm() {
170
170
  >
171
171
  <label class="relative inline-flex items-center cursor-pointer">
172
172
  <input
173
- v-model="enableDynamicSubmissions"
173
+ v-model="enableAnimatedSubmissions"
174
174
  type="checkbox"
175
175
  class="sr-only peer"
176
176
  >
177
177
  <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" />
178
- <span class="ml-3 text-sm font-medium text-gray-900 dark:text-gray-300">Dynamic Submissions</span>
178
+ <span class="ml-3 text-sm font-medium text-gray-900 dark:text-gray-300">Animated Submissions</span>
179
179
  </label>
180
180
  </div>
181
181
  </div>
@@ -13,6 +13,8 @@ function onClick() {
13
13
 
14
14
  const rank = computed(() => props.rank);
15
15
  const problem = computed(() => props.problem);
16
+
17
+ const balloonColor = computed(() => problem.value.balloonColor);
16
18
  </script>
17
19
 
18
20
  <template>
@@ -22,8 +24,8 @@ const problem = computed(() => props.problem);
22
24
  text-center
23
25
  style="width: 3rem;"
24
26
  :style="{
25
- 'background-color': problem.balloonColor?.background_color,
26
- 'color': problem.balloonColor?.color,
27
+ 'background-color': balloonColor.background_color,
28
+ 'color': balloonColor.color,
27
29
  }"
28
30
  >
29
31
  <div
@@ -244,11 +244,9 @@ function getProblemLabelColorStyle(s: Submission) {
244
244
  return undefined;
245
245
  }
246
246
 
247
- const b = p.balloonColor;
248
-
249
247
  return {
250
- backgroundColor: b.background_color as string,
251
- color: b.color as string,
248
+ backgroundColor: p.balloonColor.background_color,
249
+ color: p.balloonColor.color,
252
250
  };
253
251
  }
254
252
  </script>
@@ -21,10 +21,6 @@ const rank = computed(() => props.rank);
21
21
  const team = computed(() => props.team);
22
22
 
23
23
  function getStandClassName(t: Team, isRankField = false): string {
24
- if (props.isFilter) {
25
- return "filter-team";
26
- }
27
-
28
24
  if (isRankField) {
29
25
  if (t.awards.includes(MedalType.GOLD)) {
30
26
  return "gold";
@@ -43,6 +39,10 @@ function getStandClassName(t: Team, isRankField = false): string {
43
39
  }
44
40
  }
45
41
 
42
+ if (props.isFilter) {
43
+ return "filter-team";
44
+ }
45
+
46
46
  const solvedProblemIndex = (rank.value.rankStatistics.getTeamSolvedNumIndex(t.solvedProblemNum) - 1) % 2;
47
47
  const rankIndex = (t.rank - 1) % 2;
48
48
 
@@ -26,15 +26,6 @@ function goCountdown() {
26
26
  w-full
27
27
  flex mt-4 gap-4
28
28
  >
29
- <a
30
- btn
31
- :href="resolverUrl"
32
- target="_blank"
33
- title="Resolver"
34
- >
35
- {{ t("type_menu.resolver") }}
36
- </a>
37
-
38
29
  <button
39
30
  btn
40
31
  title="Balloon"
@@ -45,10 +36,10 @@ function goCountdown() {
45
36
 
46
37
  <button
47
38
  btn
48
- title="Countdown"
49
- @click="goCountdown"
39
+ title="Submissions"
40
+ disabled="true"
50
41
  >
51
- {{ t('type_menu.countdown') }}
42
+ {{ t('type_menu.submissions') }}
52
43
  </button>
53
44
  </div>
54
45
 
@@ -56,12 +47,21 @@ function goCountdown() {
56
47
  w-full
57
48
  flex mt-4 gap-4
58
49
  >
50
+ <a
51
+ btn
52
+ :href="resolverUrl"
53
+ target="_blank"
54
+ title="Resolver"
55
+ >
56
+ {{ t("type_menu.resolver") }}
57
+ </a>
58
+
59
59
  <button
60
60
  btn
61
- title="Submissions"
62
- disabled="true"
61
+ title="Countdown"
62
+ @click="goCountdown"
63
63
  >
64
- {{ t('type_menu.submissions') }}
64
+ {{ t('type_menu.countdown') }}
65
65
  </button>
66
66
  </div>
67
67
  </template>
@@ -7,6 +7,7 @@ export {}
7
7
 
8
8
  declare module 'vue' {
9
9
  export interface GlobalComponents {
10
+ AnimatedSubmissionsModal: typeof import('./components/board/AnimatedSubmissionsModal.vue')['default']
10
11
  Badge: typeof import('./components/board/Badge.vue')['default']
11
12
  Balloon: typeof import('./components/Balloon.vue')['default']
12
13
  BalloonBlock: typeof import('./components/BalloonBlock.vue')['default']
@@ -20,7 +21,6 @@ declare module 'vue' {
20
21
  CustomBoard: typeof import('./components/CustomBoard.vue')['default']
21
22
  CustomCountdown: typeof import('./components/CustomCountdown.vue')['default']
22
23
  DataSourceInput: typeof import('./components/DataSourceInput.vue')['default']
23
- DynamicSubmissionsModal: typeof import('./components/board/DynamicSubmissionsModal.vue')['default']
24
24
  Export: typeof import('./components/board/Export.vue')['default']
25
25
  Footer: typeof import('./components/Footer.vue')['default']
26
26
  GirlIcon: typeof import('./components/icon/GirlIcon.vue')['default']
@@ -0,0 +1,31 @@
1
+ import { MedalType } from "@xcpcio/core";
2
+ import type { Team } from "@xcpcio/core";
3
+
4
+ export function getMedalColor(team: Team): { backgroundColor: string, color: string } | undefined {
5
+ const color = {
6
+ backgroundColor: "#fff",
7
+ color: "#000",
8
+ };
9
+
10
+ if (team.awards.includes(MedalType.GOLD)) {
11
+ color.backgroundColor = "#fff566";
12
+ return color;
13
+ }
14
+
15
+ if (team.awards.includes(MedalType.SILVER)) {
16
+ color.backgroundColor = "#ffadd2";
17
+ return color;
18
+ }
19
+
20
+ if (team.awards.includes(MedalType.BRONZE)) {
21
+ color.backgroundColor = "#f0c0a0";
22
+ return color;
23
+ }
24
+
25
+ if (team.awards.includes(MedalType.HONORABLE)) {
26
+ color.backgroundColor = "#e6f7ff";
27
+ return color;
28
+ }
29
+
30
+ return undefined;
31
+ }
package/vite.config.ts CHANGED
@@ -16,6 +16,7 @@ import Unocss from "unocss/vite";
16
16
  import Shiki from "markdown-it-shiki";
17
17
  import VueMacros from "unplugin-vue-macros/vite";
18
18
  import WebfontDownload from "vite-plugin-webfont-dl";
19
+ import { createHtmlPlugin } from "vite-plugin-html";
19
20
 
20
21
  import packageJSON from "./package.json";
21
22
 
@@ -138,6 +139,21 @@ export default defineConfig({
138
139
 
139
140
  // https://github.com/webfansplz/vite-plugin-vue-devtools
140
141
  VueDevTools(),
142
+
143
+ // https://github.com/vbenjs/vite-plugin-html
144
+ createHtmlPlugin({
145
+ minify: {
146
+ collapseWhitespace: true,
147
+ keepClosingSlash: true,
148
+ removeComments: true,
149
+ removeRedundantAttributes: true,
150
+ removeScriptTypeAttributes: true,
151
+ removeStyleLinkTypeAttributes: true,
152
+ useShortDoctype: true,
153
+ minifyCSS: true,
154
+ minifyJS: true,
155
+ },
156
+ }),
141
157
  ],
142
158
 
143
159
  // https://github.com/vitest-dev/vitest
@@ -1 +0,0 @@
1
- import{g as D,s as w,i as u,v as L,o,c as n,l as t,n as V,d as s,x as S,t as p,m as g,y as F,h as R,B as I,u as A,w as O,j as q,z as M,A as Q,k as X,F as N,D as G,E as H,R as J,b as $,a as K,q as j}from"./index-6c4a0937.js";import{u as P}from"./useQueryBoardData-95ed94f9.js";import{g as W,_ as Y}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-7ca3c000.js";import"./TheInput.vue_vue_type_script_setup_true_lang-2682b2e3.js";const Z={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},ee={class:"resolver-team-name",truncate:"","overflow-hidden":""},te=s("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1),oe={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},ne=D({__name:"BalloonBlock",props:{index:null,balloon:null},setup(f){const a=f,_=w(()=>a.index),r=w(()=>a.balloon),c=u(null),i=L(c);function x(e){return[e.location,e.organization,e.name].filter(d=>d).join(" - ")}function v(e){return typeof e=="string"?e:F&&(e!=null&&e.dark)?e.dark:e.light}return(e,b)=>{var d,l,h,k;return o(),n("div",{ref_key:"el",ref:c,"h-24":""},[t(i)?(o(),n("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:V([t(_)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one"])},[s("div",{"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":"",style:S({backgroundColor:v(((l=(d=t(r).problem)==null?void 0:d.balloonColor)==null?void 0:l.background_color)??"rgba(0, 0, 0, 0.5)")})},[s("div",{style:S({color:v(((k=(h=t(r).problem)==null?void 0:h.balloonColor)==null?void 0:k.color)??"#fff")})},p(t(r).problem.label),5)],4),s("div",Z,[s("div",ee,p(x(t(r).team)),1),te]),s("div",oe,p(t(r).submission.timestampToMinute),1)],2)):g("",!0)],512)}}}),se={class:"bg-[#323443]","text-gray-200":""},ae={key:0},le={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},re={key:0},ce={key:1},ie={flex:"","flex-col":"","justify-between":""},ue=D({__name:"Balloon",props:{dataSourceUrl:null},setup(f){const a=f,_=R(I),{t:r}=A(),c=u(!1),i=u({}),x=u([]),v=u([]),e=u({}),b=u(new Date);function d(){const m=new J(i.value,x.value,v.value);m.buildBalloons(),e.value=m}const{data:l,isError:h,error:k}=P(a.dataSourceUrl,b);O(l,async()=>{var m,B,y;l.value===null||l.value===void 0||(i.value=q((m=l.value)==null?void 0:m.contest),_.value=`${i.value.name} | ${I}`,x.value=M((B=l.value)==null?void 0:B.teams),v.value=Q((y=l.value)==null?void 0:y.submissions),d(),c.value=!0)});const U=w(()=>e.value.balloons),z=setInterval(()=>{b.value=new Date},1e3);return X(()=>{clearInterval(z)}),(m,B)=>{const y=ne;return o(),n("div",se,[t(c)?(o(),n("div",ce,[s("div",ie,[(o(!0),n(N,null,G(t(U),(C,E)=>(o(),H(y,{key:C.key,index:E,balloon:C},null,8,["index","balloon"]))),128))])])):(o(),n("div",ae,[s("div",le,[s("div",null,p(t(r)("common.loading"))+"... ",1),t(h)?(o(),n("div",re,p(t(k)),1)):g("",!0)])]))])}}}),_e={key:0},de={"mt-20":""},me={key:1},fe=D({__name:"CustomBalloon",setup(f){const a=W();return(_,r)=>{const c=Y,i=ue;return o(),n(N,null,[t(a).length===0?(o(),n("div",_e,[s("div",de,[$(c)])])):g("",!0),t(a).length>0?(o(),n("div",me,[$(i,{"data-source-url":t(a)},null,8,["data-source-url"])])):g("",!0)],64)}}}),T={};function ve(f,a){const _=fe;return o(),n("div",null,[$(_)])}typeof j=="function"&&j(T);const ke=K(T,[["render",ve]]);export{ke as default};
@@ -1 +0,0 @@
1
- .background[data-v-07b734a0]{background-color:#333443}.PENDING[data-v-07b734a0]{color:#3bb4f2}.RUNNING[data-v-07b734a0]{color:#5eb95e}.FROZEN[data-v-07b734a0]{color:#dd514c}.FINISHED[data-v-07b734a0]{color:#0e90d2}.PAUSED[data-v-07b734a0]{color:#3bb4f2}