{"version":3,"sources":["assets/images/esl-logo-on-white.png","hooks/version.js","components/Certificates.js","hooks/certificates.js","hooks/helpers.js","components/RefetchButton.js","components/AxiosLoadingOrError.js","components/Organizers.js","hooks/organizers.js","components/Webhooks.js","hooks/webhooks.js","components/Organizer.js","assets/images/draggable.svg","components/TournamentBundleModal.js","hooks/tiebreak.js","hooks/tournamentBundles.js","components/Season.js","hooks/seasons.js","components/SquadModal.js","hooks/squads.js","components/Tournament.js","hooks/standings.js","hooks/tournaments.js","modules/authheader/token.js","components/ProDBRequest.js","components/StandingsTable.js","components/TournamentBundle.js","components/IFrame.js","components/Footer.js","App.js","index.js","modules/authheader/registerInterceptor.js"],"names":["useGetVersion","useQuery","axios","get","process","withCredentials","then","res","data","staleTime","retry","Form","withTheme","SemanticUITheme","schema","type","required","properties","email","title","password","format","uiSchema","Certificates","isLoading","error","version","React","useState","showModal","setShowModal","disabled","setDisabled","firstCert","setFirstCert","formData","setFormData","createError","setCreateError","formRef","createRef","queryClient","useQueryClient","Dimmer","active","Loader","Message","information","Header","message","Modal","open","onClose","Content","scrolling","Description","onSubmit","fetch","method","body","JSON","stringify","credentials","headers","Accept","a","blob","file","window","URL","createObjectURL","document","createElement","href","download","appendChild","click","remove","refetchQueries","catch","err","finally","onChange","style","display","ref","Actions","Button","onClick","current","primary","Icon","name","first","as","className","Subheader","Table","Row","HeaderCell","Body","sort","b","serial","map","item","cursor","Cell","emails","expires","useForceableQuery","key","url","opts","options","valid","isForceFetching","setForceIsFetching","forceError","setForceError","query","refetchOnWindowFocus","isFetching","force","params","invalidateQueries","setQueryData","RefetchButton","float","Transition","visible","animation","duration","Label","basic","color","pointing","loading","icon","labelPosition","AxiosLoadingOrError","response","error_message","request","responseURL","Organizers","showAll","setShowAll","history","useHistory","handleRowClick","orgKey","gameKey","e","push","Checkbox","toggle","event","checked","label","filter","count_tournaments","localeCompare","verticalAlign","count_live","count_open","games","Object","entries","game","JsonOrText","atob","theme","src","parse","padding","collapsed","Webhooks","useGetWebhooks","alignItems","Group","circular","marginLeft","length","moment","created_at","diff","fromNow","response_status","ID","Organizer","useParams","useGetOrganizer","bySeason","tournaments","reduce","acc","gamePlatform","gameVersion","seasonKey","gamePlatformKey","season","status","finished","undefined","values","end","Fragment","competition","start","platform","whiteSpace","marginRight","proposeGroupName","tournamentName","knownRegions","EU","Europe","Asia","CIS","NA","Oceania","SA","keys","indexOf","TournamentBundleModal","id","setOpen","bundleID","seasonID","useMutation","patch","onSuccess","resp","useSetTournamentBundle","mutate","isError","gamerules","handleChange","field","value","split","parent","child","useEffect","tournament","calculationModuleOptions","text","r","payload","tournament_id","tournament_bundle","season_key","game_rule","game_id","game_key","Input","fluid","placeholder","Select","Segment","ribbon","Popup","trigger","size","content","widths","wr_quality","wr_size","min","max","step","parseFloat","target","toFixed","wr_offline_multiplier","published","form","inline","UNBUNDLED","GlobalSeason","DndProvider","backend","HTML5Backend","Season","useGetSeason","tournamentList","prev_published","prev_tournament_bundle_id","tournament_bundle_id","prev_tournament_bundle_order","tournament_bundle_order","groupBy","bundle","find","bundles","forEach","TournamentBundles","items","setItems","dragID","setDragID","bundlesMutation","useSetTournamentBundles","bundleModalID","setBundleModalID","modified","row","index","findRow","useCallback","g","i","c","Boolean","moveRow","toIndex","toBundle","newBundle","fromIndex","fromBundle","newItems","update","$splice","setPublished","tournament_key","onSave","bundleMap","Date","time","tournament_start_time","floated","clear","firstBundleId","secondBundleId","marginTop","flex","marginBottom","to","gamerule","inverted","public_id","rel","animated","hidden","TournamentTable","onDrag","useDrop","accept","drop","order","hover","draggedId","t1","t2","Ref","innerRef","role","colSpan","images","image","height","alt","withTitle","tournamentVariant","tournamentType","groupStage","singleElimination","doubleElimination","matches","flexDirection","DraggableTableRow","children","outerRef","useRef","originalIndex","originalBundleID","useDrag","monitor","draggedID","didDrop","getDropResult","droppedID","cuid","collect","isDragging","drag","preview","overIndex","opacity","background","DraggableIcon","CreateBundleDropzone","isOver","canDrop","isActive","raised","SquadModal","squadKey","setKey","contestants","playerRoles","contestant","players","acc2","player","playerKey","gamePlayerRole","roleColors","Player","Substitute","Coach","team","location","shortName","margin","squad","validTo","nick","width","position","textAlign","overflow","top","left","right","bottom","Tournament","tournamentKey","matchModal","setMatchModal","squadModal","setSquadModal","standings","useGetStandings","useGetTournament","t","tournamentContestant","join","verticalPosition","group","index2","rowSpan","score","games_left","points","wins","losses","ties","tbwins","tblosses","tbties","games_won","games_lost","match","startTime","gameResult","prev","curr","metaDataMappings","meta","metaData","matchMetaDataType","postdecessors","predecessorResult","storedToken","getToken","localStorage","getItem","prompt","alert","setItem","IFrame","setMethod","path","setPath","setBody","setLoading","setError","setResponse","Container","minHeight","Field","Dropdown","onKeyDown","preventDefault","action","Authorization","mode","fromEntries","rawBody","TextArea","fontFamily","border","squads","squadsLoading","Array","isArray","fileName","TournamentBundle","useGetUnifiedStandings","tournamentBundle","useGetTournamentBundle","tg","isLoaded","Footer","source_ip","App","useLocation","handleItemClick","Menu","secondary","Item","header","logo","pathname","exact","dividing","QueryClient","defaultOptions","queries","failureCount","interceptors","use","config","token","Promise","reject","ReactDOM","render","StrictMode","QueryClientProvider","client","getElementById"],"mappings":"yPAAe,2+I,oICGR,SAASA,IACd,OAAOC,YACL,WACA,kBACEC,IACGC,IADH,UACUC,IADV,cACqD,CACjDC,iBAAiB,IAElBC,MAAK,SAACC,GAAD,OAASA,EAAIC,IAAb,GALV,GAMA,CACEC,UAAW,IACXC,OAAO,GAGZ,C,WCEKC,EAAOC,YAAUC,KAEjBC,EAAS,CACbC,KAAM,SACNC,SAAU,CAAC,SACXC,WAAY,CACVC,MAAO,CACLH,KAAM,SACNI,MAAO,qCAETC,SAAU,CACRL,KAAM,SACNI,MAAO,2CACPE,OAAQ,cAKRC,EAAW,CAAC,EAEH,SAASC,EAAT,GAAgC,EAARR,KAAS,IAC9C,ECpCOd,YAAS,gBAAgB,kBAC9BC,IACGC,IADH,UACUC,IADV,mBAC0D,CACtDC,iBAAiB,IAElBC,MAAK,SAACC,GAAD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iADe2LkhJqzRaKR9+/YREVFbWxslJSVJNlxcXKwq9mjPnj1S55FZcNnXouFfXAqh9XeoEYHlSaA0NaEFCg+GBYsIAJd7/7pUhUKhFpiRs+jw4cOKD+S/9957lJ+f7+2XucqvOf2Z758BdyPNKZ0IguU3UJZucuYmYHM4EAHgjjl+oqaxp59+mlwul9dl0MTEBLndbhoeHqb6+no5V8my4G6YDzSq+NnPM4eJMMG7Rz9RuBSSwnfA5Xb1BJoISpYSbj5GZDeAA3JfslqtqK6uxrlz55CXlweLxYLoaK5ZIoLdbkdXVxdaW1tx8eJFdHZ2oqOjAyzLevPiMHw4yOEgEOEsP4utBvAMgApwRyCjA9R+DMQv6xvj193+AAvgNoArvM10DUCPhvUfAfA7cEdKKwGsAXec1J/w8GNbFZ7k7YZgzYbd/CDUoSPoiOHVc6BJ8BKUZ6PQocPvSAR3bZHNj4O/B1xOzQS9u3WEA54Bl0yKhQ+Jhfl1GwvgUwDlerfq8Df85W60gAttXQUut+qX4D0l+wNwfvpmcEmsPgVwR/9EOsKZCGJIA7cnMeldGQcX739X/xQ6gon/AxMRRIxD4MeDAAAAAElFTkSuQmCC\"","import { useQuery } from \"react-query\";\nimport axios from \"axios\";\n\nexport function useGetVersion() {\n return useQuery(\n \"version\",\n () =>\n axios\n .get(`${process.env.REACT_APP_API_URL}v1/version`, {\n withCredentials: true,\n })\n .then((res) => res.data),\n {\n staleTime: 300000, // 5 min (300s)\n retry: false,\n }\n );\n}\n","import React from \"react\";\nimport {\n Message,\n Table,\n Dimmer,\n Loader,\n Header,\n Icon,\n Modal,\n Button,\n} from \"semantic-ui-react\";\n//import { useHistory } from \"react-router-dom\";\nimport { useQueryClient } from \"react-query\";\nimport { withTheme } from \"@rjsf/core\";\nimport { Theme as SemanticUITheme } from \"@rjsf/semantic-ui\";\n\nimport { useGetCertificates } from \"../hooks/certificates\";\nimport { useGetVersion } from \"../hooks/version\";\n\nconst Form = withTheme(SemanticUITheme);\n\nconst schema = {\n type: \"object\",\n required: [\"email\"],\n properties: {\n email: {\n type: \"string\",\n title: \"Email address to the trusted user\",\n },\n password: {\n type: \"string\",\n title: \"Password for the certificate bundle file\",\n format: \"password\",\n },\n },\n};\n\nconst uiSchema = {};\n\nexport default function Certificates({ type }) {\n const { isLoading, error, data } = useGetCertificates();\n const { data: version } = useGetVersion();\n //const history = useHistory();\n const [showModal, setShowModal] = React.useState(false);\n const [disabled, setDisabled] = React.useState(false);\n const [firstCert, setFirstCert] = React.useState(false);\n const [formData, setFormData] = React.useState({});\n const [createError, setCreateError] = React.useState(null);\n const formRef = React.createRef();\n const queryClient = useQueryClient();\n\n //const handleRowClick = key => e => history.push(`/auth/${key}`);\n const onSubmit = ({ formData }) => {\n setDisabled(true);\n\n fetch(`${process.env.REACT_APP_API_URL}v1/certificates`, {\n method: \"post\",\n body: JSON.stringify(formData),\n credentials: \"include\",\n headers: {\n Accept: \"application/json\",\n },\n })\n .then(async (res) => {\n const blob = await res.blob();\n var file = window.URL.createObjectURL(blob);\n //window.location.assign(file);\n var a = document.createElement(\"a\");\n a.href = file;\n a.download = \"filename.p12\";\n document.body.appendChild(a);\n a.click();\n a.remove();\n /*var element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(blob)\n );\n element.setAttribute(\"download\", res.headers.get(\"content-filename\"));\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);*/\n\n setShowModal(false);\n setFirstCert(true);\n await queryClient.refetchQueries([\"version\"], { active: true });\n\n return res;\n })\n .catch((err) => {\n setCreateError(err);\n })\n .finally(() => setDisabled(false));\n };\n\n if (isLoading) {\n return (\n \n Loading\n \n );\n }\n\n if (firstCert) {\n return (\n \n Certificate created\n

\n Great, now install this new certificate in your browser and then\n reload this page\n

\n
\n );\n }\n\n if (error) {\n return (\n \n Failed to load data\n

{error?.message}

\n
\n );\n }\n\n return (\n <>\n setShowModal(false)}>\n Issue a new certificate\n \n \n {createError && (\n \n Failed to load data\n

{createError?.message}

\n
\n )}\n\n setFormData(formData)}\n >\n \n \n
\n\n {!version?.first && (\n \n First setup\n

\n This is the first time you start the server. Issue a new certificate\n for youself and install it in your browser. Then reload this page.\n

\n
\n )}\n\n
\n setShowModal(true)}\n >\n Issue a new certificate\n \n \n \n Certificates\n \n Used to authorize clients to access the admin console\n \n \n
\n \n \n \n Name\n Type\n Serial\n Expires\n \n \n \n \n {data &&\n data\n .sort((a, b) => a.serial - b.serial)\n .map((item) => (\n \n {item.emails || item.name}\n \n {item.type === \"ca\" && (\n
CA
\n )}\n {item.type === \"server\" && (\n
Server
\n )}\n {item.type === \"client\" && (\n
Client
\n )}\n
\n {item.serial || \"-\"}\n {item.expires || \"-\"}\n \n {item.type === \"client\" && (\n \n )}\n \n
\n ))}\n
\n
\n \n );\n}\n","import { useQuery } from \"react-query\";\nimport axios from \"axios\";\n\nexport function useGetCertificates() {\n return useQuery(\"certificates\", () =>\n axios\n .get(`${process.env.REACT_APP_API_URL}v1/certificates`, {\n withCredentials: true,\n })\n .then((res) => res.data)\n );\n}\n","import React from \"react\";\nimport { useQuery, useQueryClient } from \"react-query\";\nimport axios from \"axios\";\n\nexport function useForceableQuery(key, url, opts = {}) {\n const options = {\n valid: true,\n ...opts,\n };\n const [isForceFetching, setForceIsFetching] = React.useState(false);\n const [forceError, setForceError] = React.useState(null);\n const queryClient = useQueryClient();\n\n const query = useQuery(\n key,\n () => {\n if (!options.valid) {\n return false;\n }\n\n return axios.get(url).then((res) => res.data);\n },\n { refetchOnWindowFocus: false }\n );\n\n return {\n ...query,\n isFetching: query.isFetching || isForceFetching,\n isForceFetching,\n forceError,\n force: () => {\n setForceError(null);\n setForceIsFetching(true);\n axios\n .get(`${url}`, {\n withCredentials: true,\n params: { force: true }\n })\n .then((res) => res.data)\n .then((res) => {\n queryClient.invalidateQueries();\n return queryClient.setQueryData(key, res);\n })\n .catch((err) => setForceError(err))\n .finally(() => setForceIsFetching(false));\n },\n };\n}\n","import React from \"react\";\nimport { Button, Icon, Label, Transition } from \"semantic-ui-react\";\n\nexport default function RefetchButton({\n isLoading,\n isForceFetching,\n force,\n forceError,\n style,\n}) {\n return (\n
\n \n \n \n force()}\n >\n \n Refetch from ProDB\n \n
\n );\n}\n","import React from \"react\";\nimport { Message, Dimmer, Loader } from \"semantic-ui-react\";\n\nexport default function AxiosLoadingOrError({\n isLoading,\n isForceFetching,\n error,\n data,\n}) {\n if (isLoading) {\n return (\n \n Loading\n \n );\n } else if (isForceFetching) {\n return (\n \n Fetching new data from ProDB\n \n );\n }\n\n if (error || data.error) {\n return (\n \n \n {error?.message || \"Failed to load data\"}\n \n

\n {data?.error ||\n error?.response?.data?.error_message ||\n error?.response?.data?.error ||\n error?.request?.responseURL}\n

\n
\n );\n }\n\n return null;\n}\n","import React, { Fragment } from \"react\";\nimport { Table, Checkbox } from \"semantic-ui-react\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useGetOrganizers } from \"../hooks/organizers\";\nimport RefetchButton from \"./RefetchButton\";\nimport AxiosLoadingOrError from \"./AxiosLoadingOrError\";\n\nexport default function Organizers({ type }) {\n const { isLoading, error, data, isForceFetching, force, forceError } =\n useGetOrganizers();\n const [showAll, setShowAll] = React.useState(false);\n const history = useHistory();\n const handleRowClick = (orgKey, gameKey) => (e) => {\n gameKey\n ? history.push(`/organizers/${orgKey}/${gameKey}`)\n : history.push(`/organizers/${orgKey}`);\n };\n\n if (isLoading || error || data.error) {\n return (\n \n );\n }\n\n return (\n <>\n \n

Organizers

\n {\n setShowAll(checked);\n }}\n checked={showAll}\n label=\"Show all\"\n />\n \n \n \n Name\n \n Game\n \n \n \n {data &&\n data\n .filter(\n (item) =>\n item.type === type && (showAll || item.count_tournaments > 0)\n )\n .sort((a, b) => a.name.localeCompare(b.name))\n .map((item) => (\n \n 0 ? \"\" : \"rgba(40,40,40,.3)\",\n }}\n >\n \n {item.name}\n \n \n {item.count_live > 0 && (\n
Live
\n )}\n {item.count_open > 0 && (\n
Open
\n )}\n \n \n {item.games\n ? Object.entries(item.games)\n .sort(([, a], [, b]) => a.localeCompare(b))\n .map(([gameKey, game]) => (\n \n {game}\n \n ))\n : \"-\"}\n \n \n
\n ))}\n
\n
\n \n );\n}\n","import { useForceableQuery } from \"./helpers\";\n\nexport function useGetOrganizers() {\n const url = `${process.env.REACT_APP_API_URL}v1/organizers`;\n const key = [\"organizers\"];\n\n return useForceableQuery(key, url);\n}\n\nexport function useGetOrganizer(orgKey, gameKey) {\n const url = gameKey\n ? `${process.env.REACT_APP_API_URL}v1/organizer/${orgKey}/game/${gameKey}`\n : `${process.env.REACT_APP_API_URL}v1/organizer/${orgKey}`;\n const key = [\"organizers\", orgKey];\n\n if (gameKey) {\n key.push(gameKey);\n }\n\n return useForceableQuery(key, url);\n}\n","import React from \"react\";\nimport { Table, Label } from \"semantic-ui-react\";\nimport { useHistory } from \"react-router-dom\";\nimport moment from \"moment\";\nimport Moment from \"react-moment\";\nimport ReactJson from \"react-json-view\";\n\nimport AxiosLoadingOrError from \"./AxiosLoadingOrError\";\nimport { useGetWebhooks } from \"../hooks/webhooks\";\n\nfunction JsonOrText({ item }) {\n const body = atob(item.body);\n try {\n return (\n \n );\n } catch (e) {\n return
{body}
;\n }\n}\n\nexport default function Webhooks({ type }) {\n const { isLoading, error, data } = useGetWebhooks();\n const history = useHistory();\n // eslint-disable-next-line no-unused-vars\n const handleRowClick = (key, game_id) => (e) =>\n game_id\n ? history.push(`/organizers/${key}/${game_id}`)\n : history.push(`/organizers/${key}`);\n\n if (isLoading || error || data.error) {\n return (\n \n );\n }\n\n return (\n <>\n
\n

Webhooks

\n \n \n \n
\n \n \n \n Timestamp\n Response status\n Body\n \n \n \n {data &&\n data\n .sort((a, b) => -moment(a.created_at).diff(moment(b.created_at)))\n .map((item) => (\n <>\n \n \n {item.created_at}\n \n \n {item.response_status}\n \n \n \n \n \n \n ))}\n \n
\n \n );\n}\n","import axios from \"axios\";\nimport { useQuery } from \"react-query\";\n\nexport function useGetWebhooks() {\n const url = `${process.env.REACT_APP_API_URL}v1/prodb/webhooks`;\n const key = [\"webhooks\"];\n\n return useQuery(key, () => axios.get(url).then((res) => res.data));\n}\n","import React from \"react\";\nimport { Table } from \"semantic-ui-react\";\nimport { useHistory, useParams } from \"react-router-dom\";\nimport moment from \"moment\";\n\nimport { useGetOrganizer } from \"../hooks/organizers\";\nimport RefetchButton from \"./RefetchButton\";\nimport AxiosLoadingOrError from \"./AxiosLoadingOrError\";\n\nexport default function Organizer({ type }) {\n const { orgKey, gameKey } = useParams();\n const { isLoading, error, data, isForceFetching, force, forceError } =\n useGetOrganizer(orgKey, gameKey);\n const history = useHistory();\n const handleRowClick = (orgKey, gameKey) => (e) =>\n history.push(`/season/${orgKey}/game/${gameKey}`);\n\n if (isLoading || error || data.error) {\n return (\n \n );\n }\n\n const bySeason =\n data &&\n data.tournaments?.reduce((acc, item) => {\n if (gameKey && item.gamePlatform.gameVersion.gameKey !== gameKey) {\n return acc;\n }\n\n const key = item.seasonKey + item.gamePlatformKey;\n\n return {\n ...acc,\n [key]: {\n ...item.season,\n gamePlatform: item.gamePlatform,\n count_open:\n (acc[key]?.count_open || 0) + (item.status === \"open\" ? 1 : 0),\n count_live:\n (acc[key]?.count_live || 0) + (item.status === \"live\" ? 1 : 0),\n finished:\n item.status !== \"finished\"\n ? false\n : acc[key]?.finished === undefined\n ? true\n : acc[key]?.finished,\n tournaments: [...(acc[key]?.tournaments || []), item],\n },\n };\n }, {});\n\n return (\n <>\n \n

{data.name}

\n \n \n \n Competition\n Season\n Dates\n Game\n Tournaments\n \n \n \n {bySeason &&\n Object.values(bySeason)\n .sort((a, b) => -moment(a.end).diff(b.end))\n .map((item, key) => (\n \n \n {item?.competition?.name || \"-\"}\n {item?.name || \"-\"}\n \n {item.start || \"-\"}\n {item.end ? ` - ${item.end}` : \"\"}\n \n \n {item.gamePlatform?.gameVersion?.game?.name}{\" \"}\n ({item.gamePlatform?.platform?.label})\n \n \n \n {item.tournaments.length}\n \n {item.count_live > 0 && (\n
Live
\n )}\n {item.count_open > 0 && (\n
Open
\n )}\n {item.finished && (\n
Finished
\n )}\n
\n \n \n ))}\n
\n
\n \n );\n}\n","export default __webpack_public_path__ + \"static/media/draggable.3d14d7e8.svg\";","import React from \"react\";\nimport {\n Modal,\n Form,\n Button,\n Loader,\n Segment,\n Label,\n Icon,\n Popup,\n} from \"semantic-ui-react\";\nimport { useGetGamerules } from \"../hooks/tiebreak\";\nimport { useSetTournamentBundle } from \"../hooks/tournamentBundles\";\n\nconst proposeGroupName = (tournamentName) => {\n const knownRegions = {\n EU: \"Europe\",\n Europe: \"Europe\",\n Asia: \"Asia\",\n CIS: \"CIS\",\n NA: \"North America\",\n \"North America\": \"North America\",\n Oceania: \"Oceania\",\n SA: \"South America\",\n \"South America\": \"South America\",\n };\n\n for (const key of Object.keys(knownRegions)) {\n if (tournamentName.indexOf(key) !== -1) {\n return knownRegions[key];\n }\n }\n\n return \"\";\n};\n\nexport default function TournamentBundleModal({\n open,\n setOpen,\n bundleID,\n item,\n tournaments,\n seasonID,\n gameKey,\n}) {\n const { mutate, isLoading, error, isError } = useSetTournamentBundle(\n bundleID,\n seasonID,\n gameKey\n );\n const { data: gamerules } = useGetGamerules(gameKey);\n const [formData, setFormData] = React.useState(item);\n const handleChange =\n (field) =>\n (e, { value }) => {\n const [parent, child] = field.split(\".\");\n\n setFormData({\n ...formData, \n [parent]: {\n ...formData[parent],\n [child]: value \n }\n });\n }\n const handleChangeCheckbox =\n (field) =>\n (e, { checked }) => {\n const [parent, child] = field.split(\".\");\n\n setFormData({\n ...formData, \n [parent]: {\n ...formData[parent],\n [child]: checked \n }\n });\n }\n // Automatically try to propose a name if the group dont have a name\n React.useEffect(() => {\n if (\n open &&\n formData === item &&\n !formData?.name &&\n tournaments?.[0]?.tournament?.name\n ) {\n setFormData({\n ...formData,\n name: proposeGroupName(tournaments[0]?.tournament?.name),\n });\n }\n }, [open, item, tournaments, formData]);\n\n const onSubmit = () => {\n const payload = {\n ...formData,\n tournament_id: tournaments[0]?.tournament?.key,\n tournament_bundle: {\n ...formData.tournament_bundle,\n season_key: seasonID,\n game_rule: {\n id: formData.tournament_bundle?.game_id,\n game_key: gameKey,\n },\n }\n }\n\n mutate(\n {\n ...payload,\n },\n {\n onSuccess: (data) => {\n setOpen(false);\n },\n }\n );\n };\n\n const calculationModuleOptions = [\n {\n value: \"\",\n text: \"-\",\n },\n ...Object.entries(gamerules || {}).map((r) => ({\n value: r[0],\n text: r[1],\n })),\n ];\n\n return (\n setOpen(false)}>\n \n {item?.name || \"[Unnamed tournament group]\"}{\" \"}\n (tournament group)\n \n \n
\n \n \n \n \n \n \n \n {\n handleChange(\"tournament_bundle.wr_offline_multiplier\")(e, {\n value: parseFloat(e.target.value / 100).toFixed(2) * 1,\n });\n }}\n value={parseFloat(\n (formData?.tournament_bundle?.wr_offline_multiplier || 1) * 100\n ).toFixed(0)}\n />\n \n \n\n \n \n
\n \n \n {error?.response?.data?.error_message || error?.message}\n \n \n {isLoading && }\n {!isLoading && \"Save\"}\n \n \n
\n );\n}\n","import { useForceableQuery } from \"./helpers\";\n\nexport function useGetGamerules(id) {\n const url = `${process.env.REACT_APP_API_URL}v1/games/${id}/gamerules`;\n const key = [\"games\", id, \"gamerules\"];\n\n return useForceableQuery(key, url, { valid: !!id });\n}\n","import { useMutation, useQueryClient, useQuery } from \"react-query\";\nimport axios from \"axios\";\n\nexport function useGetTournamentBundle(id) {\n const url = `${process.env.REACT_APP_API_URL}v1/tournament-bundles/${id}`;\n const key = [\"bundle\", id];\n\n return useQuery(key, () => axios.get(url).then((res) => res.data));\n}\n\nexport function useSetTournamentBundle(id, season, game) {\n const queryClient = useQueryClient();\n\n return useMutation(\n (data) => {\n const url = `${process.env.REACT_APP_API_URL}v1/tournament-bundles/${\n id || data.id\n }`;\n\n return axios.patch(url, data).then((res) => res.data);\n },\n {\n onSuccess: (resp) => {\n // queryClient.invalidateQueries([\"tournaments\"]);\n queryClient.invalidateQueries([\"season\", season, game]);\n },\n }\n );\n}\n\nexport function useSetTournamentBundles(season, game) {\n const queryClient = useQueryClient();\n\n return useMutation(\n (data) => {\n const url = `${process.env.REACT_APP_API_URL}v2/tournament-bundles`;\n\n return axios.patch(url, data).then((res) => res.data);\n },\n {\n onSuccess: (resp) => {\n queryClient.invalidateQueries([\"season\", season, game]);\n },\n }\n );\n}\n","import React from \"react\";\nimport {\n Table,\n Checkbox,\n Segment,\n Ref,\n Button,\n Icon,\n Popup,\n} from \"semantic-ui-react\";\nimport { useHistory, useParams, Link } from \"react-router-dom\";\nimport { DndProvider, useDrag, useDrop } from \"react-dnd\";\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\nimport groupBy from \"lodash.groupby\";\nimport find from \"lodash.find\";\nimport cuid from \"cuid\";\nimport update from \"immutability-helper\";\nimport Moment from \"react-moment\";\n\nimport { useGetSeason } from \"../hooks/seasons\";\nimport { useSetTournamentBundles } from \"../hooks/tournamentBundles\";\nimport DraggableIcon from \"../assets/images/draggable.svg\";\n\nimport AxiosLoadingOrError from \"./AxiosLoadingOrError\";\nimport RefetchButton from \"./RefetchButton\";\nimport TournamentBundleModal from \"./TournamentBundleModal\";\n\nconst UNBUNDLED = \"[unbundled]\";\n\nexport default function GlobalSeason({ type }) {\n return (\n \n \n \n );\n}\n\nfunction Season({ type }) {\n const { seasonKey, gameKey } = useParams();\n const { isLoading, error, data, isForceFetching, force, forceError } =\n useGetSeason(seasonKey, gameKey);\n\n if (isLoading || error || data.error || isForceFetching) {\n return (\n \n );\n }\n\n // This sort is just to keep the order of the bundles the same each time\n const tournamentList =\n data?.tournaments &&\n Object.values(data.tournaments)\n .sort((a, b) => a.tournament.name.localeCompare(b.tournament.name))\n .map((item) => ({\n //change this\n ...item,\n prev_published: item.tournament.published,\n prev_tournament_bundle_id: item.tournament.tournament_bundle_id,\n prev_tournament_bundle_order: item.tournament.tournament_bundle_order,\n }));\n\n // Group all tournaments by the bundle id\n const tournaments = groupBy(tournamentList, ({ tournament }) => {\n const bundle = find(data?.bundles, { tournament_id: tournament.key });\n if (bundle) {\n return bundle.tournament_bundle?.id;\n } else {\n return UNBUNDLED;\n }\n });\n const bundles = data?.bundles.reduce(\n (acc, bundle) => ({\n ...acc,\n [bundle.tournament_bundle?.id]: bundle,\n }),\n []\n );\n\n // Sort each tournament bundle by order, then name\n Object.keys(tournaments).forEach((bundleID) => {\n tournaments[bundleID] = tournaments[bundleID].sort(\n (\n a,\n b //change this\n ) =>\n a?.tournament?.tournament_bundle_order -\n b?.tournament?.tournament_bundle_order ||\n a?.tournament?.name.localeCompare(b?.tournament?.name)\n );\n });\n\n return (\n <>\n \n\n

\n {data?.season?.competition?.name || \"\"} - {data?.season?.name || \"\"}\n

\n \n Drag a stage here to create a new Standings bundle\n \n \n \n );\n}\n\nfunction TournamentBundles({ tournaments, bundles }) {\n const { seasonKey, gameKey } = useParams();\n const [items, setItems] = React.useState(tournaments);\n const [dragID, setDragID] = React.useState(null);\n const bundlesMutation = useSetTournamentBundles();\n const [bundleModalID, setBundleModalID] = React.useState(false);\n\n let modified = false;\n\n // Make sure each bundle always is sorted by order and then name\n Object.keys(items).forEach((bundleID) => {\n // Assign order\n items[bundleID] = items[bundleID].map((row, index) => {\n row.tournament.tournament_bundle_order = index + 1;\n\n row.modified = //change this\n row.prev_published !== row.tournament.published ||\n row.prev_tournament_bundle_id !== row.tournament.tournament_bundle_id ||\n row.prev_tournament_bundle_order !==\n row.tournament.tournament_bundle_order;\n\n if (row.modified) {\n modified = true;\n }\n\n return row;\n });\n\n // Sort by order, then name\n items[bundleID] = items[bundleID].sort(\n (a, b) =>\n a?.tournament?.tournament_bundle_order -\n b?.tournament?.tournament_bundle_order ||\n a?.tournament?.name.localeCompare(b?.tournament?.name)\n );\n });\n\n // Find a specific row id and return row and current index\n const findRow = React.useCallback(\n (id) => {\n const row = Object.keys(items)\n .map((g) => {\n const i = items[g].find((c) => c?.tournament?.key === id);\n if (i) {\n i.tournament.tournament_bundle_id = g;\n }\n return i;\n })\n .find(Boolean);\n\n return {\n row,\n index: items[row?.tournament?.tournament_bundle_id].indexOf(row),\n bundleID: row?.tournament?.tournament_bundle_id,\n };\n },\n [items]\n );\n\n // Move a specific row id to any bundle and index\n const moveRow = React.useCallback(\n (id, toIndex, toBundle, newBundle) => {\n const { row, index: fromIndex, bundleID: fromBundle } = findRow(id);\n\n let newItems = {\n ...items,\n [toBundle]: items[toBundle] || [], // Make sure the new bundle actually exist in our list\n };\n\n if (fromBundle === toBundle) {\n // Move within the same bundle\n newItems = update(newItems, {\n [fromBundle]: {\n $splice: [\n [fromIndex, 1],\n [toIndex, 0, row],\n ],\n },\n });\n } else {\n // Move between two bundles\n newItems = update(newItems, {\n [fromBundle]: {\n $splice: [[fromIndex, 1]],\n },\n [toBundle]: {\n $splice: [[toIndex, 0, row]],\n },\n });\n\n // update the sorting indexes\n newItems[toBundle].map((row, index) => {\n //change this\n if (\n row.prev_tournament_bundle_order === undefined &&\n row.tournament.tournament_bundle_order !== index + 1\n ) {\n // Save the previous order\n row.prev_tournament_bundle_order =\n row.tournament.tournament_bundle_order;\n }\n if (\n row.prev_tournament_bundle_id === undefined &&\n row.tournament.tournament_bundle_id !== toBundle\n ) {\n // Save the previous bundle\n row.prev_tournament_bundle_id = row.tournament.tournament_bundle_id;\n }\n row.tournament.tournament_bundle_order = index + 1;\n return row;\n });\n }\n\n // update the sorting indexes\n newItems[fromBundle].map((row, index) => {\n //change this\n if (\n row.prev_tournament_bundle_order === undefined &&\n row.tournament.tournament_bundle_order !== index + 1\n ) {\n // Save the previous order\n row.prev_tournament_bundle_order =\n row.tournament.tournament_bundle_order;\n }\n if (\n row.prev_tournament_bundle_id === undefined &&\n row.tournament.tournament_bundle_id !== fromBundle\n ) {\n // Save the previous bundle\n row.prev_tournament_bundle_id = row.tournament.tournament_bundle_id;\n }\n\n row.tournament.tournament_bundle_order = index + 1;\n return row;\n });\n\n setItems(newItems);\n if (newBundle) {\n setBundleModalID(toBundle);\n }\n },\n [findRow, items, setItems]\n );\n\n const setPublished = React.useCallback(\n (tournament_key, published) => {\n const newItems = { ...items };\n\n Object.keys(newItems).forEach((bundle) => {\n newItems[bundle].map((item) => {\n if (item.tournament.key === tournament_key) {\n item.tournament.published = published;\n }\n return item;\n });\n });\n\n setItems(newItems);\n },\n [items, setItems]\n );\n\n const onSave = React.useCallback(() => {\n let bundleMap = [];\n Object.values(bundles).forEach((bundle) => {\n const bundleID = bundle?.tournament_bundle?.id;\n if (bundleID === UNBUNDLED) {\n //never send unbundled to the server\n return;\n }\n\n return items[bundleID]\n .sort(\n (a, b) =>\n new Date(a?.tournament?.time) - new Date(b?.tournament?.time)\n )\n .forEach((item) => {\n bundleMap.push({\n ...bundle,\n tournament_id: item?.tournament?.key,\n tournament_start_time: item?.tournament?.time,\n });\n });\n }, []);\n\n bundlesMutation.mutate(bundleMap, {\n onSuccess: (data) => {\n const newItems = items;\n\n // Remove the unsaved flag from each row, because now its successfully saved\n Object.keys(items).forEach((bundleID) => {\n newItems[bundleID] = newItems[bundleID].map((row, index) => {\n return {\n //change this\n ...row,\n prev_published: row.tournament.published,\n prev_tournament_bundle_id: row.tournament.tournament_bundle_id,\n prev_tournament_bundle_order:\n row.tournament.tournament_bundle_order,\n };\n });\n });\n\n setItems(newItems);\n },\n });\n }, [items, bundlesMutation, bundles]);\n\n return (\n <>\n {bundleModalID && (\n \n )}\n <>\n \n Save changes\n \n
\n \n {Object.entries(items)\n // The following sort will keep the unbundled events at the end\n .sort(([firstBundleId], [secondBundleId]) => {\n if (firstBundleId === \"\") return 1;\n if (secondBundleId === \"\") return -1;\n return 0;\n })\n .map(([bundleID, tournaments]) => {\n return (\n \n <>\n {bundleID !== \"\" ? (\n \n \n

\n \n {bundles[bundleID]?.tournament_bundle?.name &&\n !bundles[bundleID]?.tournament_bundle?.gamerule && (\n \n }\n />\n )}\n {bundles[bundleID]?.tournament_bundle?.name ||\n \"[Unnamed tournament bundle]\"}\n \n

\n\n {bundles[bundleID]?.tournament_bundle?.public_id && (\n \n Public ID\n
\n {bundles[bundleID]?.tournament_bundle?.public_id}\n
\n
\n )}\n \n\n
\n \n Standings\n \n setBundleModalID(bundleID)}\n >\n \n \n \n \n \n
\n \n ) : (\n

[Default tournament bundle]

\n )}\n\n \n \n \n );\n })}\n \n );\n}\n\nfunction TournamentTable({\n tournamentList,\n bundleID,\n dragID,\n findRow,\n moveRow,\n setPublished,\n onDrag,\n}) {\n const history = useHistory();\n const handleRowClick = (key) => (e) => history.push(`/tournament/${key}`);\n\n const [, drop] = useDrop(\n () => ({\n accept: \"tournament\",\n drop: () => ({\n bundleID,\n order: 0,\n }),\n hover({ id: draggedId, bundleID: draggedBundleId }) {\n moveRow(\n draggedId, // Row to move\n 0, // Index to replace\n bundleID // BundleID of the target\n );\n },\n }),\n [findRow, moveRow]\n );\n\n tournamentList.sort(\n (t1, t2) => new Date(t2.tournament?.time) - new Date(t1.tournament?.time)\n );\n\n return (\n \n \n \n \n Status\n \n Stage\n Variant\n Type\n Matches\n Published\n \n \n \n {tournamentList.length === 0 ? (\n \n \n \n \n \n ) : null}\n {tournamentList.map(\n (item) =>\n item?.tournament && (\n \n \n {item?.tournament?.status === \"live\" && (\n
Live
\n )}\n {item?.tournament?.status === \"open\" && (\n
Open
\n )}\n {item?.tournament?.status === \"finished\" && (\n
Finished
\n )}\n \n \n {item.images?.length && item.images[0].image.url ? (\n \"\"\n ) : (\n
\n )}\n \n \n
{item.tournament.name || \"-\"}
\n \n \n {item.tournament.time}\n \n \n
\n \n {item.tournament?.tournamentVariant?.label || \"-\"}\n \n \n {item.tournament?.tournamentType?.groupStage && (\n
Group stage
\n )}\n {item.tournament?.tournamentType?.singleElimination && (\n
\n Single elimination\n
\n )}\n {item.tournament?.tournamentType?.doubleElimination && (\n
\n Double elimination\n
\n )}\n {!item.tournament?.tournamentType?.groupStage &&\n !item.tournament?.tournamentType?.singleElimination &&\n !item.tournament?.tournamentType?.doubleElimination && (\n \n {item.tournament?.tournamentType?.label || \"-\"}\n \n )}\n
\n \n {item?.matches?.length || \"-\"}\n \n \n \n {\n setPublished(item.tournament.key, checked);\n }}\n checked={item.tournament.published}\n />\n\n \n Public ID\n
\n {item?.tournament?.public_id}\n
\n
\n \n \n \n )\n )}\n
\n
\n );\n}\n\nexport const DraggableTableRow = function DraggableTableRow({\n children,\n item,\n dragID,\n moveRow,\n findRow,\n onDrag,\n modified,\n}) {\n const outerRef = React.useRef(null);\n const ref = React.useRef(null);\n const id = item.tournament.key;\n const { index: originalIndex, bundleID: originalBundleID } = findRow(id);\n\n const [, drag, preview] = useDrag(\n () => ({\n type: \"tournament\",\n item: () => {\n // isDragging does not work when moving between bundles, so we keep that state manually by writing the id to a shared state with onDrag\n onDrag(id);\n\n return { id, originalIndex, originalBundleID };\n },\n end: (item, monitor) => {\n // isDragging does not work when moving between bundles, so we keep that state manually by writing the id to a shared state with onDrag\n onDrag(null);\n const { id: draggedID, originalIndex, originalBundleID } = item;\n\n if (monitor.didDrop()) {\n // Dropped! Trigger the onDrop callback to save the new order\n const { id: droppedID, bundleID: droppedBundleID } =\n monitor.getDropResult();\n\n if (droppedBundleID === \"\" && droppedID !== draggedID) {\n // Create a new bundle\n moveRow(\n draggedID, // Row to move\n 0, // Index to replace\n cuid(), // BundleID of the target,\n true // Signal that its a new bundle\n );\n }\n } else {\n // Did not drop on a droppable area, restore it to the original position again\n moveRow(\n draggedID, // Row to move\n originalIndex, // Index to replace\n originalBundleID // BundleID of the target\n );\n }\n },\n collect: (monitor) => ({\n isDragging: monitor.isDragging(),\n }),\n }),\n [id, originalIndex, moveRow]\n );\n\n const [, drop] = useDrop(\n () => ({\n accept: \"tournament\",\n drop: () => ({\n //change this\n bundleID: item?.tournament?.tournament_bundle_id,\n order: item?.tournament?.tournament_bundle_order,\n id,\n }),\n hover({ id: draggedId, bundleID: draggedBundleId }) {\n // If we not hover over our selvs\n if (draggedId !== id) {\n const { index: overIndex, bundleID } = findRow(id);\n moveRow(\n draggedId, // Row to move\n overIndex, // Index to replace\n bundleID // BundleID of the target\n );\n }\n },\n }),\n [findRow, moveRow]\n );\n\n // isDragging does not work when moving between bundles, so we keep that state manually by writing the id to a shared state with onDrag\n const opacity = dragID === id ? 0.4 : 1;\n\n preview(drop(outerRef));\n drag(ref);\n\n return (\n \n \n \n \n \"drag\n \n \n {children}\n \n \n );\n};\n\nexport const CreateBundleDropzone = ({ children }) => {\n const [{ canDrop, isOver }, drop] = useDrop(\n () => ({\n accept: \"tournament\",\n drop: () => ({\n bundleID: \"\",\n order: 0,\n }),\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n }),\n }),\n []\n );\n\n const isActive = canDrop && isOver;\n\n return (\n \n \n {children}\n \n \n );\n};\n","import { useForceableQuery } from \"./helpers\";\n\nexport function useGetSeason(seasonKey, gameKey) {\n const url = `${process.env.REACT_APP_API_URL}v1/seasons/${seasonKey}/games/${gameKey}`;\n const key = [\"season\", seasonKey, gameKey];\n\n return useForceableQuery(key, url);\n}\n","import React from \"react\";\nimport { Modal } from \"semantic-ui-react\";\nimport { useGetSquad } from \"../hooks/squads\";\nimport ReactJson from \"react-json-view\";\n\nimport RefetchButton from \"./RefetchButton\";\n\nexport default function SquadModal({ key, setKey, contestants }) {\n const { data, isLoading, isForceFetching, force, forceError } =\n useGetSquad(key);\n\n const playerRoles = contestants?.reduce((acc, contestant) => {\n return {\n ...acc,\n ...contestant?.players.reduce(\n (acc2, player) => ({\n ...acc2,\n [player.playerKey]: player?.gamePlayerRole,\n }),\n {}\n ),\n };\n }, {});\n\n const roleColors = {\n Player: \"#090\",\n Substitute: \"#880\",\n Coach: \"#900\",\n };\n\n return (\n setKey(false)}>\n \n \n {data?.team?.team?.name || key}\n \n \n \n
Location: {data?.team?.team?.location || \"-\"}
\n
Short name: {data?.team?.team?.shortName}
\n

Images

\n {data?.team?.images?.map((image) => (\n \n \"\"\n \n ))}\n\n

Squad

\n
Name: {data?.squad?.name || \"-\"}
\n
Location: {data?.squad?.location || \"-\"}
\n\n {data?.players\n ?.sort(\n (a, b) =>\n !!a?.squad.validTo - !!b?.squad.validTo ||\n (playerRoles?.[a?.player?.key]?.order || 99) -\n (playerRoles?.[b?.player?.key]?.order || 99) ||\n a.player?.nick?.localeCompare(b.player?.nick)\n )\n .map((player) => (\n \n \n \n {player?.player?.nick || \"-\"}\n \n {player?.images?.[0]?.image?.url && (\n \n )}\n\n {playerRoles?.[player?.player?.key] &&\n !player?.squad?.validTo && (\n <>\n \n \n {playerRoles?.[player?.player?.key]?.name || \"-\"}\n \n \n )}\n \n ))}\n\n {data?.squad?.images?.map((image) => (\n \n \"\"\n \n ))}\n\n
\n \n
\n
\n
\n );\n}\n","import { useForceableQuery } from \"./helpers\";\n\nexport function useGetSquad(squadKey) {\n const url = `${process.env.REACT_APP_API_URL}v1/squads/${squadKey}`;\n const key = [\"squads\", squadKey];\n\n return useForceableQuery(key, url, { valid: !!squadKey });\n}\n","import React from \"react\";\nimport { Table, Modal, Loader } from \"semantic-ui-react\";\nimport { useParams } from \"react-router-dom\";\nimport { useGetStandings } from \"../hooks/standings\";\nimport { useGetTournament } from \"../hooks/tournaments\";\nimport Moment from \"react-moment\";\nimport moment from \"moment\";\nimport ReactJson from \"react-json-view\";\n\nimport AxiosLoadingOrError from \"./AxiosLoadingOrError\";\nimport RefetchButton from \"./RefetchButton\";\nimport SquadModal from \"./SquadModal\";\n\nexport default function Tournament({ type }) {\n const { tournamentKey } = useParams();\n const [matchModal, setMatchModal] = React.useState(false);\n const [squadModal, setSquadModal] = React.useState(false);\n const standings = useGetStandings(tournamentKey);\n const tournament = useGetTournament(tournamentKey);\n\n if (tournament.isLoading || tournament.isError) {\n ;\n }\n\n const t = tournament?.data?.tournament || {};\n\n return (\n <>\n setMatchModal(false)}>\n \n {matchModal?.contestants\n ?.map((a) => a.tournamentContestant.name)\n .join(\" vs \")}\n \n \n \n \n \n \n \n \n\n \n

\n {tournament.isLoading ? (\n \n ) : (\n t?.name || \"-\"\n )}\n

\n \n Public ID\n
{t?.public_id}
\n \n {t?.tournamentType?.groupStage && (\n
Group stage
\n )}\n {t?.tournamentType?.singleElimination && (\n
Single elimination
\n )}\n {t?.tournamentType?.doubleElimination && (\n
Double elimination
\n )}\n {!t?.tournamentType?.groupStage &&\n !t?.tournamentType?.singleElimination &&\n !t?.tournamentType?.doubleElimination && (\n \n {t?.tournamentType?.label || \"-\"}\n \n )}\n\n

Standings

\n \n \n \n Pos\n \n Contestants\n Group\n Matches/Left\n Score\n W-L\n Tiebreak\n Games\n \n \n \n {standings?.data &&\n Object.values(standings.data)\n .sort((a, b) => a.verticalPosition - b.verticalPosition)\n .map((group, index) =>\n group.map((item, index2) => (\n \n \n {index2 === 0 && (\n \n {item.position}\n \n )}\n\n \n item?.tournamentContestant?.squadKey &&\n setSquadModal(item?.tournamentContestant?.squadKey)\n }\n >\n -\n \n \n item?.tournamentContestant?.squadKey &&\n setSquadModal(item?.tournamentContestant?.squadKey)\n }\n >\n {item.tournamentContestant.name || \"TBD\"}\n \n {item.group || \"-\"}\n \n {item?.score?.games || \"-\"}/\n {item?.score?.games_left || \"-\"}\n \n {item?.score?.points || \"-\"}\n \n {item?.score?.wins || \"0\"}-{item?.score?.losses || \"0\"}\n {item?.score?.ties ? ` (${item?.score?.ties})` : \"\"}\n \n \n {item?.score?.tbwins +\n item?.score?.tblosses +\n item?.score?.tbties >\n 0 ? (\n <>\n {item?.score?.tbwins || \"0\"}-\n {item?.score?.tblosses || \"0\"}\n \n ) : null}\n \n \n {item.games_won || \"-\"}/{item.games_lost || \"-\"}\n \n \n \n ))\n )}\n \n
\n \n\n

Matches

\n \n \n \n Score\n Status\n Start\n Contestants\n Position\n Winner\n Looser\n \n \n \n {tournament.data?.matches &&\n Object.values(tournament.data.matches)\n .sort(\n (a, b) =>\n // a.verticalPosition - b.verticalPosition ||\n moment(a.match.startTime).diff(moment(b.match.startTime)) ||\n a.contestants?.[0]?.tournamentContestant.name.localeCompare(\n b.contestants?.[0]?.tournamentContestant.name\n )\n )\n .map((item) => (\n \n setMatchModal(item)}\n >\n \n {item?.contestants?.map((a) => a?.score).join(\" - \")}\n \n {item.match.status}\n \n \n {item.match.startTime}\n \n \n \n {item?.contestants?.length > 0 &&\n item.contestants\n .map((a) => (\n <>\n {a.tournamentContestant.name}{\" \"}\n \n {a?.gameResult?.key}\n \n \n ))\n .reduce((prev, curr) => [prev, \" - \", curr])}\n \n \n {item?.metaDataMappings?.find(\n (meta) => meta.metaData.matchMetaDataType === \"BRACKET\"\n )?.metaData.name ||\n item?.metaDataMappings?.find(\n (meta) => meta.metaData.name === \"Regular\"\n )?.metaData.name ||\n item?.metaDataMappings?.find(\n (meta) => meta.metaData.name === \"Gamerule\"\n )?.metaData.name ||\n \"-\"}\n
\n {item?.metaDataMappings?.find(\n (meta) => meta.metaData.matchMetaDataType === \"ROUND\"\n )?.metaData.name || \"\"}\n
\n \n {item?.postdecessors?.find(\n (a) => a.predecessorResult === \"winner\"\n ) ? (\n (proceeds)\n ) : (\n item?.contestants?.find(\n (a) =>\n a.gameResult.key === \"win\" ||\n a.gameResult.key === \"defaultwin\"\n )?.tournamentContestant.name || (\n (TBD)\n )\n )}\n \n \n {item?.postdecessors?.find(\n (a) => a.predecessorResult === \"loser\"\n ) ? (\n (proceeds)\n ) : (\n item?.contestants?.find(\n (a) =>\n a.gameResult.key === \"lose\" ||\n a.gameResult.key === \"defaultloss\"\n )?.tournamentContestant.name || (\n (TBD)\n )\n )}\n \n \n
\n ))}\n
\n
\n \n );\n}\n","import { useForceableQuery } from \"./helpers\";\n\nexport function useGetStandings(tournamentKey) {\n const url = `${process.env.REACT_APP_API_URL}v1/standings/tournament/${tournamentKey}`;\n const key = [\"standings\", tournamentKey];\n\n return useForceableQuery(key, url);\n}\n\nexport function useGetUnifiedStandings(bundleID) {\n const url = `${process.env.REACT_APP_API_URL}v1/standings/bundle/${bundleID}`;\n const key = [\"standings\", bundleID];\n\n return useForceableQuery(key, url);\n}\n","import { useForceableQuery } from \"./helpers\";\n\nexport function useGetTournament(tournamentKey) {\n const url = `${process.env.REACT_APP_API_URL}v1/tournaments/${tournamentKey}`;\n const key = [\"tournaments\", tournamentKey];\n\n return useForceableQuery(key, url);\n}\n\nexport function useGetTournamentSquads(tournamentKey) {\n const url = `${process.env.REACT_APP_API_URL}v1/tournaments/${tournamentKey}/squads`;\n const key = [\"tournament\", tournamentKey, \"squads\"];\n\n return useForceableQuery(key, url);\n}\n","let storedToken = \"\";\n\nexport function getToken() {\n storedToken = localStorage.getItem(\"token\");\n if (storedToken === \"\" || storedToken === null) {\n storedToken = askForToken();\n alert(\n \"This authentication method is implemented temporary. Delete token from localstorage via browser dev tools\"\n );\n //store the token in browser localstorage to avoid providing it everytime\n localStorage.setItem(\"token\", storedToken);\n }\n\n return storedToken;\n}\n\nfunction askForToken() {\n return prompt(\"Please enter your token to access this website:\");\n}\n","import { Container } from \"semantic-ui-react\";\nimport React from \"react\";\nimport ReactJson from \"react-json-view\";\nimport { Dropdown, Input, TextArea, Form } from \"semantic-ui-react\";\n\nimport { getToken } from \"../modules/authheader/token\";\n\nconst options = [\n { key: \"get\", text: \"GET\", value: \"get\" },\n { key: \"post\", text: \"POST\", value: \"post\" },\n { key: \"put\", text: \"PUT\", value: \"put\" },\n { key: \"patch\", text: \"PATCH\", value: \"patch\" },\n { key: \"delete\", text: \"DELETE\", value: \"delete\" },\n];\n\nexport default function IFrame({ src }) {\n const [method, setMethod] = React.useState(\"get\");\n const [path, setPath] = React.useState(\"\");\n const [body, setBody] = React.useState(\"\");\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState(null);\n const [response, setResponse] = React.useState(null);\n\n const placeholder = \"/api/matches\";\n\n const onSubmit = () => {\n setLoading(true);\n setResponse(null);\n setError(null);\n\n fetch(`${process.env.REACT_APP_API_URL}v1/prodb/request`, {\n method: \"post\",\n body: JSON.stringify({\n method,\n path,\n body,\n }),\n // credentials: \"include\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${getToken()}`,\n },\n mode: \"cors\",\n })\n .then(async (resp) => {\n const r = {\n headers: Object.fromEntries(resp.headers.entries()),\n status: resp.status,\n rawBody: await resp.text(),\n };\n\n try {\n r.body = JSON.parse(r.rawBody);\n } catch (err) {\n r.body = null;\n setError(err);\n }\n\n setResponse(r);\n })\n .catch((err) => {\n setError(err);\n })\n .finally(() => setLoading(false));\n };\n\n return (\n \n

Manual request to ProDB

\n
\n \n setMethod(value)}\n />\n }\n placeholder={placeholder}\n value={path}\n onKeyDown={(e) => {\n if (e.key === \"Tab\") {\n e.preventDefault();\n setPath(placeholder);\n return false;\n } //fill input with placeholder on tab\n }}\n onChange={(e, { value }) => {\n setPath(value);\n }}\n action={{\n loading: loading,\n color: \"teal\",\n content: \"Submit\",\n onClick: onSubmit,\n }}\n />\n \n {method !== \"get\" && method !== \"delete\" && (\n \n \n setBody(value)}\n />\n \n )}\n
\n\n {error && (\n <>\n

Failure: {error.message}

\n \n )}\n\n {response && (\n <>\n

Response {response.status}

\n

Headers

\n \n

Body

\n {response.body !== null && (\n \n )}\n {response.body === null && (\n \n {response.rawBody}\n \n )}\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { Table, Loader } from \"semantic-ui-react\";\nimport AxiosLoadingOrError from \"./AxiosLoadingOrError\";\n\nexport default function Tournament({ standings, squads, squadsLoading }) {\n return (\n <>\n \n \n \n Pos\n \n Contestants\n Group\n Matches/Left\n Score\n W-L\n Tiebreak\n \n \n \n {Array.isArray(standings?.data) &&\n Object.values(standings.data).map((group, index) =>\n group.map((item, index2) => (\n \n \n {index2 === 0 && (\n \n {item.position}\n \n )}\n\n \n {squadsLoading && }\n\n {!squadsLoading &&\n (squads?.[item?.tournamentContestant?.squadKey]?.team\n ?.images?.[0]?.fileName ? (\n \n ) : (\n \"-\"\n ))}\n \n \n {item.tournamentContestant.name || \"TBD\"}\n \n {item.group || \"-\"}\n \n {item?.score?.games || \"-\"}/\n {item?.score?.games_left || \"-\"}\n \n {item?.score?.points || \"-\"}\n \n {item?.score?.wins || \"\"}-{item?.score?.losses || \"\"}\n {item?.score?.ties ? ` (${item?.score?.ties})` : \"\"}\n \n \n {item?.score?.tbwins +\n item?.score?.tblosses +\n item?.score?.tbties >\n 0 ? (\n <>\n {item?.score?.tbwins || \"0\"}-\n {item?.score?.tblosses || \"0\"}\n \n ) : null}\n \n \n \n ))\n )}\n \n
\n \n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"semantic-ui-react\";\nimport { useParams } from \"react-router-dom\";\nimport { useGetUnifiedStandings } from \"../hooks/standings\";\nimport { useGetTournamentBundle } from \"../hooks/tournamentBundles\";\nimport ReactJson from \"react-json-view\";\n\nimport AxiosLoadingOrError from \"./AxiosLoadingOrError\";\nimport StandingsTable from \"./StandingsTable\";\n\nexport default function TournamentBundle() {\n const { bundleID } = useParams();\n const [matchModal, setMatchModal] = React.useState(false);\n const standings = useGetUnifiedStandings(bundleID);\n const tournamentBundle = useGetTournamentBundle(bundleID);\n\n if (tournamentBundle.isLoading || tournamentBundle.isError) {\n ;\n }\n\n const tg = tournamentBundle?.data?.tournamentBundle || {};\n const squads = tournamentBundle?.data?.squads;\n\n return (\n <>\n setMatchModal(false)}>\n \n {matchModal?.contestants\n ?.map((a) => a.tournamentContestant.name)\n .join(\" - \")}\n \n \n \n \n \n \n \n\n {tournamentBundle.isLoaded && (\n <>\n

{tg?.name || \"-\"}

\n \n Public ID\n
{tg?.public_id}
\n \n \n )}\n\n \n\n

Standings

\n \n \n \n );\n}\n","import { Container } from \"semantic-ui-react\";\n\nexport default function IFrame({ src }) {\n return (\n \n
\n {`${process.env.REACT_APP_API_URL}${src}`}\n
\n \n \n );\n}\n","import React from \"react\";\nimport { useGetVersion } from \"../hooks/version\";\n\nexport default function Footer() {\n const { data: version } = useGetVersion();\n\n return (\n
\n \n {version?.version} ({version?.source_ip})\n \n
\n );\n}\n","import React from \"react\";\nimport {\n Message,\n Header,\n Menu,\n Container,\n Dimmer,\n Loader,\n} from \"semantic-ui-react\";\nimport {\n Switch,\n Route,\n useHistory,\n useLocation,\n Redirect,\n} from \"react-router-dom\";\nimport logo from \"./assets/images/esl-logo-on-white.png\";\nimport \"./App.css\";\n\nimport Certificates from \"./components/Certificates\";\nimport Organizers from \"./components/Organizers\";\nimport Webhooks from \"./components/Webhooks\";\nimport Organizer from \"./components/Organizer\";\nimport Season from \"./components/Season\";\nimport Tournament from \"./components/Tournament\";\nimport ProDBRequest from \"./components/ProDBRequest\";\nimport TournamentBundle from \"./components/TournamentBundle\";\nimport IFrame from \"./components/IFrame\";\nimport Footer from \"./components/Footer\";\nimport { useGetVersion } from \"./hooks/version\";\n\nfunction App() {\n const history = useHistory();\n const location = useLocation();\n const handleItemClick = (e, { name }) => history.push(`/${name}`);\n const handleLogoutClick = () => (window.location.href = \"/logout\");\n const { isLoading, data: version, error } = useGetVersion();\n\n if (isLoading) {\n return (\n \n Starting up\n \n );\n }\n\n if (!isLoading && version?.first === false) {\n return (\n
\n \n
\n Setup\n
\n \n
\n
\n );\n }\n\n if (error) {\n return (\n
\n \n \n Failed to start\n

{error?.message}

\n
\n
\n
\n );\n }\n\n return (\n
\n \n \n \n \n <>\n \n Standings\n \n \n Webhooks\n \n\n \n \n ProDB\n \n \n Authorization\n \n \n API\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n