{"version":3,"sources":["teamView/TeamView.tsx","matchCard/MatchCard.tsx","App.tsx","reportWebVitals.ts","index.tsx"],"names":["TeamView","props","match","team","users","Object","keys","accountIds","map","Number","forEach","entityId","accountId","hasOwnProperty","push","_jsx","React","Fragment","children","user","User","addStats","sort","user1","user2","atkDamageDealt","defDamageDealt","kastCount","reverse","userInfo","name","userNames","length","substring","kills","assists","deaths","openingKills","openingKillAttempts","favoriteWeapon","getFavoriteWeapon","atkRoundsPlayed","defRoundsPlayed","_jsxs","style","verticalAlign","width","fontWeight","Math","floor","toFixed","MatchCard","getVariant","winning","teamNumber","team1","wins","team2","getColor","TipADR","OverlayTrigger","placement","overlay","Tooltip","id","QuestionCircleFill","className","TipKAST","TipOpeningDuels","TipBestGun","currentEventKey","useContext","AccordionContext","Card","background","borderRadius","Accordion","Toggle","as","Header","variant","eventKey","matchId","toString","cursor","Container","Row","marginTop","Col","xs","sm","Badge","fontSize","color","marginBottom","Collapse","Body","roundCount","Alert","Table","striped","bordered","hover","height","borderBottom","backgroundColor","colSpan","border","App","fileName","setFilename","useState","matches","setMatches","fileDataCache","setFileDataCache","playerLogFileHandle","setPlayerLogFileHandle","handleParse","useEffect","interval","setInterval","reader","FileReader","onload","res","result","LogParser","parseFileData","getFile","then","file","readAsText","clearInterval","backgroundImage","backgroundSize","overflowY","fontFamily","textShadow","Dropzone","onDrop","acceptedFiles","handleUpload","files","parseFile","_ref","getRootProps","getInputProps","_objectSpread","Figure","Image","src","Caption","Button","onClick","async","filehandle","window","showOpenFilePicker","types","description","accept","text","enableDynamicFileLoad","defaultActiveKey","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"qWAGO,SAASA,EAASC,GACrB,IAAIC,EAAeD,EAAMC,MACrBC,EAAaF,EAAME,KAEnBC,EAAa,CAAC,EAUlB,OATAC,OAAOC,KAAKH,EAAKI,YAAYC,IAAIC,QAAQC,SAASC,IAC9C,IAA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AAY,qBAAsBxH,SAAE2F,MAE1FG,EAAQxG,KAAIN,GAASa,cAACoC,EAAS,CAAqBjD,MAAOA,EAAO2G,SAAUA,GAAvC3G,EAAMgF,kBAMpE,EC7HemF,MAZUC,IACnBA,GAAeA,aAAuBC,UACxC,6BAAqBrC,MAAKe,IAAkD,IAAjD,OAAEuB,EAAM,OAAEC,EAAM,OAAEC,EAAM,OAAEC,EAAM,QAAEC,GAAS3B,EACpEuB,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,EAAY,GAExB,ECLFO,IAASC,OACP/J,cAACC,IAAM+J,WAAU,CAAA7J,SACfH,cAAC6F,EAAG,MAENoE,SAASC,eAAe,SAM1BZ,G","file":"static/js/main.f06af252.chunk.js","sourcesContent":["import React from \"react\";\nimport {Match, Team, User} from \"@austenke/due-process-stat-parser\";\n\nexport function TeamView(props: any) {\n let match: Match = props.match;\n let team: Team = props.team;\n\n let users: any = {};\n Object.keys(team.accountIds).map(Number).forEach((entityId: number) => {\n let accountId = team.accountIds[entityId];\n if (users.hasOwnProperty(accountId)) {\n users[accountId].push(entityId);\n } else {\n users[accountId] = [entityId];\n }\n });\n\n return (\n \n {Object.keys(users)\n .map((accountId: string) => {\n let user = new User();\n users[accountId].forEach((entityId: number) => user.addStats(match.users[entityId]));\n return {\n user: user,\n entityId: users[accountId][0]\n }\n })\n .sort((user1, user2) => {\n let user1Damage = user1.user.atkDamageDealt + user1.user.defDamageDealt;\n let user2Damage = user2.user.atkDamageDealt + user2.user.defDamageDealt;\n return user1Damage - user2Damage || user1.user.kastCount - user2.user.kastCount;\n })\n .reverse()\n .map((userInfo: any) => {\n let user: User = userInfo.user;\n let name = team.userNames[userInfo.entityId];\n if (name.length > 33) {\n name = name.substring(0, 30) + \"...\";\n }\n let kills = user?.kills || 0;\n let assists = user?.assists || 0;\n let deaths = user?.deaths || 0;\n let atkDamageDealt = user?.atkDamageDealt || 0;\n let defDamageDealt = user?.defDamageDealt || 0;\n let kastCount = user?.kastCount || 0;\n let openingKills = user?.openingKills || 0;\n let openingKillAttempts = user?.openingKillAttempts || 0;\n let favoriteWeapon = User.getFavoriteWeapon(user) || \"N/A\";\n let atkRoundsPlayed = user?.atkRoundsPlayed || 1;\n let defRoundsPlayed = user?.defRoundsPlayed || 1;\n return (\n \n {name}\n {Math.floor(atkDamageDealt + defDamageDealt)}\n {Math.floor(atkDamageDealt / atkRoundsPlayed)} - {Math.floor(defDamageDealt / defRoundsPlayed)}\n {kills} - {deaths} - {assists}\n {((kastCount / (atkRoundsPlayed + defRoundsPlayed)) * 100).toFixed(0)}%\n {openingKills} / {openingKillAttempts}\n {favoriteWeapon}\n \n )\n })}\n \n )\n}","import {\n Badge,\n Card,\n Col,\n Container,\n Row,\n Accordion,\n AccordionContext, Alert, Table, OverlayTrigger, Tooltip,\n} from \"react-bootstrap\";\nimport React, {useContext} from \"react\";\nimport {TeamView} from \"../teamView/TeamView\";\nimport {QuestionCircleFill} from \"react-bootstrap-icons\";\nimport {Team, Match} from \"@austenke/due-process-stat-parser\";\n\nexport function MatchCard(props: any) {\n\n const match: Match = props.match;\n\n function getVariant(team: Team) {\n let winning;\n if (team.teamNumber === 1) {\n winning = match.team1.wins > match.team2.wins;\n } else {\n winning = match.team2.wins > match.team1.wins;\n }\n return winning ? \"success\" : \"danger\";\n }\n\n function getColor(team: Team) {\n let winning;\n if (team.teamNumber === 1) {\n winning = match.team1.wins > match.team2.wins;\n } else {\n winning = match.team2.wins > match.team1.wins;\n }\n return winning ? \"green\" : \"red\";\n }\n\n function TipADR() {\n return (\n \n Attack ADR - Defense ADR\n \n }\n >\n \n \n )\n }\n\n function TipKAST() {\n return (\n \n Percentage of rounds in which player got a kill, assist, saved, or was traded\n \n }\n >\n \n \n )\n }\n\n function TipOpeningDuels() {\n return (\n \n Opening Kills / Attempts\n \n }\n >\n \n \n )\n }\n\n function TipBestGun() {\n return (\n \n Determined by accumulating the damage dealt by player with each weapon as a\n percentage of the enemy's total health (100 or 150)\n \n }\n >\n \n \n )\n }\n\n const currentEventKey = useContext(AccordionContext);\n\n return (\n \n \n \n \n \n {match.team1.wins}\n \n \n \n

{match.team1.name}

\n
\n \n \n \n

{match.team2.name}

\n
\n \n \n {match.team2.wins}\n \n
\n

Click to {currentEventKey === match.matchId.toString() ? \"minimize\" : \"expand\"}

\n
\n
\n \n \n { props.match.roundCount !== (props.match.team1.wins + props.match.team2.wins) &&\n \n Incomplete match detected. Your log file only contains stats\n for {props.match.roundCount}/{props.match.team1.wins + props.match.team2.wins} rounds.\n \n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {match.team1.wins}\n \n \n

{match.team1.name}

\n \n \n \n \n \n \n {match.team2.wins}\n \n \n

{match.team2.name}

\n \n \n \n \n \n \n
Name
Damage
ADR
K - D - A
KAST
Opening Duels
Best Weapon
\n \n
\n \n
\n
\n
\n
\n )\n}\n","import React, { useEffect, useState } from 'react';\nimport './App.css';\nimport 'bootstrap/dist/css/bootstrap.css';\n\nimport {\n Accordion,\n Alert,\n Button,\n Col,\n Container,\n Figure,\n OverlayTrigger,\n Row,\n Tooltip\n} from \"react-bootstrap\";\nimport Dropzone from \"react-dropzone\";\nimport { QuestionCircleFill } from \"react-bootstrap-icons\";\nimport { MatchCard } from \"./matchCard/MatchCard\";\nimport { LogParser, Match } from \"@austenke/due-process-stat-parser\";\n\nfunction App() {\n\n const [fileName, setFilename] = useState('');\n const [matches, setMatches] = React.useState([]);\n const [fileDataCache, setFileDataCache] = React.useState('');\n const [playerLogFileHandle, setPlayerLogFileHandle] = React.useState(null);\n\n useEffect(() => {\n const interval = setInterval(() => {\n if (playerLogFileHandle) {\n const reader = new FileReader();\n reader.onload = function () {\n var res = (reader.result as string);\n LogParser.parseFileData(res, fileName, handleParse);\n };\n playerLogFileHandle.getFile().then(file => reader.readAsText(file));\n }\n }, 1000);\n\n return () => clearInterval(interval);\n }, [playerLogFileHandle, fileName, fileDataCache]);\n\n function handleUpload(files: File[]) {\n LogParser.parseFile(files[0], handleParse);\n }\n\n function handleParse(fileName: string, matches: Match[]) {\n setMatches(matches);\n setFilename(fileName);\n }\n\n async function enableDynamicFileLoad() {\n var [filehandle] = await window.showOpenFilePicker({\n types: [\n {\n description: 'Player.log',\n accept: {\n 'text/plain': ['.log']\n },\n }\n ],\n });\n\n const file = await filehandle.getFile();\n setFileDataCache(await file.text());\n setPlayerLogFileHandle(filehandle);\n LogParser.parseFileData(await file.text(), fileName, handleParse);\n setFilename(file.name);\n }\n\n return (\n
\n
\n {matches.length === 0 &&\n \n \n

Due Process Stats Tool

\n
\n \n \n handleUpload(acceptedFiles)}>\n {({ getRootProps, getInputProps }) => (\n
\n \n
\n \n Drag and drop Player.log file, or click to select\n
\n
\n )}\n
\n \n
\n \n \n \n \n
\n If you run into issues, ping @Index\n
\n
\n {matches.length === 0 && fileName &&\n \n \n
\n File '{fileName}' does not contain any matches\n \n A new log file is generated each time you start the game.\n Have you played a match yet this session?

\n If this error persists, message @Index\n \n }>\n \n
\n
\n
\n
\n }\n
\n }\n {matches.length > 0 && fileName &&\n \n
\n

{fileName}

\n
\n {matches.map(match => )}\n
\n }\n
\n
\n );\n}\n\nexport default App;\n","import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}