tods-competition-factory 1.8.15 → 1.8.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forge/generate.d.ts +1 -0
- package/dist/forge/generate.mjs +35 -25
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.d.ts +1 -0
- package/dist/forge/query.mjs +1 -1
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.d.ts +1 -0
- package/dist/forge/transform.mjs +35 -25
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +306 -31
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +463 -43
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +4 -6
|
@@ -2905,7 +2905,7 @@ var matchUpFormatCode = {
|
|
|
2905
2905
|
};
|
|
2906
2906
|
|
|
2907
2907
|
function factoryVersion() {
|
|
2908
|
-
return '1.8.
|
|
2908
|
+
return '1.8.17';
|
|
2909
2909
|
}
|
|
2910
2910
|
|
|
2911
2911
|
function getObjectTieFormat(obj) {
|
|
@@ -4190,12 +4190,13 @@ function countSets(_a) {
|
|
|
4190
4190
|
var _c;
|
|
4191
4191
|
var matchUpWinningSide = _a.winningSide, _d = _a.matchUpFormat, matchUpFormat = _d === void 0 ? FORMAT_STANDARD : _d, matchUpStatus = _a.matchUpStatus, tallyPolicy = _a.tallyPolicy, score = _a.score;
|
|
4192
4192
|
var setsTally = [0, 0];
|
|
4193
|
-
var sets =
|
|
4194
|
-
var matchUpWinnerIndex = matchUpWinningSide - 1;
|
|
4193
|
+
var sets = score === null || score === void 0 ? void 0 : score.sets;
|
|
4194
|
+
var matchUpWinnerIndex = typeof matchUpWinningSide === 'number' && matchUpWinningSide - 1;
|
|
4195
4195
|
var parsedMatchUpFormat = parse(matchUpFormat);
|
|
4196
4196
|
var setsToWin = getSetsToWin((_c = parsedMatchUpFormat === null || parsedMatchUpFormat === void 0 ? void 0 : parsedMatchUpFormat.bestOf) !== null && _c !== void 0 ? _c : 1);
|
|
4197
|
-
if (
|
|
4198
|
-
(matchUpStatus ===
|
|
4197
|
+
if (typeof matchUpWinnerIndex === 'number' &&
|
|
4198
|
+
((matchUpStatus === DEFAULTED && (tallyPolicy === null || tallyPolicy === void 0 ? void 0 : tallyPolicy.setsCreditForDefaults)) ||
|
|
4199
|
+
(matchUpStatus === WALKOVER$2 && (tallyPolicy === null || tallyPolicy === void 0 ? void 0 : tallyPolicy.setsCreditForWalkovers)))) {
|
|
4199
4200
|
// in the case of WALKOVER or DEFAULT, matchUp winner gets full sets to win value
|
|
4200
4201
|
setsTally[matchUpWinnerIndex] = setsToWin;
|
|
4201
4202
|
}
|
|
@@ -4216,7 +4217,7 @@ function countSets(_a) {
|
|
|
4216
4217
|
finally { if (e_1) throw e_1.error; }
|
|
4217
4218
|
}
|
|
4218
4219
|
}
|
|
4219
|
-
if (matchUpStatus === RETIRED$1) {
|
|
4220
|
+
if (typeof matchUpWinnerIndex === 'number' && matchUpStatus === RETIRED$1) {
|
|
4220
4221
|
// if the loser has setsToWin then last set was incomplete and needs to be subtracted from loser
|
|
4221
4222
|
if (+setsTally[1 - matchUpWinnerIndex] === setsToWin)
|
|
4222
4223
|
setsTally[1 - matchUpWinnerIndex] -= 1;
|
|
@@ -4232,14 +4233,15 @@ function countGames(_a) {
|
|
|
4232
4233
|
var sets = (score || {}).sets;
|
|
4233
4234
|
if (!sets)
|
|
4234
4235
|
return [0, 0];
|
|
4235
|
-
var matchUpWinnerIndex = matchUpWinningSide - 1;
|
|
4236
|
+
var matchUpWinnerIndex = typeof matchUpWinningSide === 'number' && matchUpWinningSide - 1;
|
|
4236
4237
|
var parsedMatchUpFormat = parse(matchUpFormat);
|
|
4237
4238
|
var bestOf = (_b = parsedMatchUpFormat === null || parsedMatchUpFormat === void 0 ? void 0 : parsedMatchUpFormat.bestOf) !== null && _b !== void 0 ? _b : 1;
|
|
4238
4239
|
var setsToWin = getSetsToWin(bestOf);
|
|
4239
4240
|
var tiebreakAt = ((_c = parsedMatchUpFormat === null || parsedMatchUpFormat === void 0 ? void 0 : parsedMatchUpFormat.setFormat) === null || _c === void 0 ? void 0 : _c.tiebreakAt) || 0;
|
|
4240
4241
|
var gamesTally = [[], []];
|
|
4241
|
-
if (
|
|
4242
|
-
(matchUpStatus ===
|
|
4242
|
+
if (typeof matchUpWinnerIndex === 'number' &&
|
|
4243
|
+
((matchUpStatus === DEFAULTED && (tallyPolicy === null || tallyPolicy === void 0 ? void 0 : tallyPolicy.gamesCreditForDefaults)) ||
|
|
4244
|
+
(matchUpStatus === WALKOVER$2 && (tallyPolicy === null || tallyPolicy === void 0 ? void 0 : tallyPolicy.gamesCreditForWalkovers)))) {
|
|
4243
4245
|
var gamesForSet = ((_d = parsedMatchUpFormat === null || parsedMatchUpFormat === void 0 ? void 0 : parsedMatchUpFormat.setFormat) === null || _d === void 0 ? void 0 : _d.setTo) || 0;
|
|
4244
4246
|
var minimumGameWins = setsToWin * gamesForSet;
|
|
4245
4247
|
gamesTally[matchUpWinnerIndex].push(minimumGameWins);
|
|
@@ -4258,18 +4260,6 @@ function countGames(_a) {
|
|
|
4258
4260
|
gamesTally[0].push(ensureInt(side1Score || 0));
|
|
4259
4261
|
gamesTally[1].push(ensureInt(side2Score || 0));
|
|
4260
4262
|
}
|
|
4261
|
-
// count a tiebreak as a game won
|
|
4262
|
-
/*
|
|
4263
|
-
*if (
|
|
4264
|
-
* !based &&
|
|
4265
|
-
* !isTiebreakSet &&
|
|
4266
|
-
* set.winningSide &&
|
|
4267
|
-
* (side1TiebreakScore || side2TiebreakScore) &&
|
|
4268
|
-
* tallyPolicy?.gamesCreditForTiebreaks !== false
|
|
4269
|
-
*) {
|
|
4270
|
-
* gamesTally[set.winningSide - 1].push(1);
|
|
4271
|
-
*}
|
|
4272
|
-
*/
|
|
4273
4263
|
// count a tiebreak set also as a game won
|
|
4274
4264
|
if (isTiebreakSet &&
|
|
4275
4265
|
set.winningSide &&
|
|
@@ -4278,7 +4268,7 @@ function countGames(_a) {
|
|
|
4278
4268
|
}
|
|
4279
4269
|
});
|
|
4280
4270
|
}
|
|
4281
|
-
if (matchUpStatus === RETIRED$1) {
|
|
4271
|
+
if (matchUpStatus === RETIRED$1 && typeof matchUpWinnerIndex === 'number') {
|
|
4282
4272
|
// setFormat must consider whether retirment occurred in a finalSet which has a different format
|
|
4283
4273
|
var whichFormat = sets.length > setsToWin && (parsedMatchUpFormat === null || parsedMatchUpFormat === void 0 ? void 0 : parsedMatchUpFormat.finalSetFormat)
|
|
4284
4274
|
? 'finalSetFormat'
|
|
@@ -4328,9 +4318,10 @@ function countGames(_a) {
|
|
|
4328
4318
|
function countPoints(_a) {
|
|
4329
4319
|
var _b, _c;
|
|
4330
4320
|
var matchUpFormat = _a.matchUpFormat, score = _a.score;
|
|
4331
|
-
var parsedMatchUpFormat = parse(matchUpFormat);
|
|
4321
|
+
var parsedMatchUpFormat = matchUpFormat ? parse(matchUpFormat) : undefined;
|
|
4332
4322
|
var bestOf = (_b = parsedMatchUpFormat === null || parsedMatchUpFormat === void 0 ? void 0 : parsedMatchUpFormat.bestOf) !== null && _b !== void 0 ? _b : 1;
|
|
4333
4323
|
var setsToWin = getSetsToWin(bestOf);
|
|
4324
|
+
var tiebreaksTally = [0, 0];
|
|
4334
4325
|
var pointsTally = [0, 0];
|
|
4335
4326
|
(_c = score === null || score === void 0 ? void 0 : score.sets) === null || _c === void 0 ? void 0 : _c.forEach(function (set, i) {
|
|
4336
4327
|
var _a;
|
|
@@ -4351,9 +4342,11 @@ function countPoints(_a) {
|
|
|
4351
4342
|
pointsTally[0] += ensureInt(set.side1TiebreakScore || 0);
|
|
4352
4343
|
if (set.side2TiebreakScore)
|
|
4353
4344
|
pointsTally[1] += ensureInt(set.side2TiebreakScore || 0);
|
|
4345
|
+
if ((set.side1TiebreakScore || set.side2TiebreakScore) && set.winningSide)
|
|
4346
|
+
tiebreaksTally[set.winningSide - 1] += 1;
|
|
4354
4347
|
}
|
|
4355
4348
|
});
|
|
4356
|
-
return pointsTally;
|
|
4349
|
+
return { pointsTally: pointsTally, tiebreaksTally: tiebreaksTally };
|
|
4357
4350
|
}
|
|
4358
4351
|
function getSetsToWin(bestOfGames) {
|
|
4359
4352
|
return (bestOfGames && Math.ceil(bestOfGames / 2)) || 1;
|
|
@@ -4436,7 +4429,7 @@ var matchUpTypes = {
|
|
|
4436
4429
|
|
|
4437
4430
|
function getParticipantResults(_a) {
|
|
4438
4431
|
var e_1, _b, e_2, _c, e_3, _d;
|
|
4439
|
-
var _e, _f, _g, _h;
|
|
4432
|
+
var _e, _f, _g, _h, _j, _k;
|
|
4440
4433
|
var participantIds = _a.participantIds, matchUpFormat = _a.matchUpFormat, tallyPolicy = _a.tallyPolicy, perPlayer = _a.perPlayer, matchUps = _a.matchUps;
|
|
4441
4434
|
var participantResults = {};
|
|
4442
4435
|
var excludeMatchUpStatuses = (tallyPolicy === null || tallyPolicy === void 0 ? void 0 : tallyPolicy.excludeMatchUpStatuses) || [];
|
|
@@ -4483,7 +4476,7 @@ function getParticipantResults(_a) {
|
|
|
4483
4476
|
var winningParticipantId = winningSide && getWinningSideId(matchUp);
|
|
4484
4477
|
var losingParticipantId = winningSide && getLosingSideId(matchUp);
|
|
4485
4478
|
if (!winningParticipantId && !losingParticipantId) {
|
|
4486
|
-
if (completedMatchUpStatuses.includes(matchUpStatus)) {
|
|
4479
|
+
if (matchUpStatus && completedMatchUpStatuses.includes(matchUpStatus)) {
|
|
4487
4480
|
var participantIdSide1 = getSideId(matchUp, 0);
|
|
4488
4481
|
var participantIdSide2 = getSideId(matchUp, 1);
|
|
4489
4482
|
if (participantIdSide1) {
|
|
@@ -4499,11 +4492,11 @@ function getParticipantResults(_a) {
|
|
|
4499
4492
|
perPlayer = 0; // if any matchUps are matchUpType: TEAM don't calculate perPlayer
|
|
4500
4493
|
var _loop_1 = function (tieMatchUp) {
|
|
4501
4494
|
if (tieMatchUp.winningSide) {
|
|
4502
|
-
var tieWinningParticipantId = (_e = sides.find(function (_a) {
|
|
4495
|
+
var tieWinningParticipantId = (_e = sides === null || sides === void 0 ? void 0 : sides.find(function (_a) {
|
|
4503
4496
|
var sideNumber = _a.sideNumber;
|
|
4504
4497
|
return sideNumber === tieMatchUp.winningSide;
|
|
4505
4498
|
})) === null || _e === void 0 ? void 0 : _e.participantId;
|
|
4506
|
-
var tieLosingParticipantId = (_f = sides.find(function (_a) {
|
|
4499
|
+
var tieLosingParticipantId = (_f = sides === null || sides === void 0 ? void 0 : sides.find(function (_a) {
|
|
4507
4500
|
var sideNumber = _a.sideNumber;
|
|
4508
4501
|
return sideNumber === tieMatchUp.winningSide;
|
|
4509
4502
|
})) === null || _f === void 0 ? void 0 : _f.participantId;
|
|
@@ -4645,22 +4638,26 @@ function getParticipantResults(_a) {
|
|
|
4645
4638
|
}
|
|
4646
4639
|
}
|
|
4647
4640
|
if (manualGamesOverride) {
|
|
4648
|
-
var side1participantId = (_g = sides.find(function (_a) {
|
|
4641
|
+
var side1participantId = (_g = sides === null || sides === void 0 ? void 0 : sides.find(function (_a) {
|
|
4649
4642
|
var sideNumber = _a.sideNumber;
|
|
4650
4643
|
return sideNumber === 1;
|
|
4651
4644
|
})) === null || _g === void 0 ? void 0 : _g.participantId;
|
|
4652
|
-
var side2participantId = (_h = sides.find(function (_a) {
|
|
4645
|
+
var side2participantId = (_h = sides === null || sides === void 0 ? void 0 : sides.find(function (_a) {
|
|
4653
4646
|
var sideNumber = _a.sideNumber;
|
|
4654
4647
|
return sideNumber === 2;
|
|
4655
4648
|
})) === null || _h === void 0 ? void 0 : _h.participantId;
|
|
4656
4649
|
checkInitializeParticipant(participantResults, side1participantId);
|
|
4657
4650
|
checkInitializeParticipant(participantResults, side2participantId);
|
|
4658
|
-
var gamesWonSide1 = score.sets.reduce(function (total, set) { return total + set.side1Score; }, 0);
|
|
4659
|
-
var gamesWonSide2 = score.sets.reduce(function (total, set) { return total + set.side2Score; }, 0);
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4651
|
+
var gamesWonSide1 = (_j = score === null || score === void 0 ? void 0 : score.sets) === null || _j === void 0 ? void 0 : _j.reduce(function (total, set) { var _a; return total + ((_a = set === null || set === void 0 ? void 0 : set.side1Score) !== null && _a !== void 0 ? _a : 0); }, 0);
|
|
4652
|
+
var gamesWonSide2 = (_k = score === null || score === void 0 ? void 0 : score.sets) === null || _k === void 0 ? void 0 : _k.reduce(function (total, set) { var _a; return total + ((_a = set.side2Score) !== null && _a !== void 0 ? _a : 0); }, 0);
|
|
4653
|
+
if (side1participantId) {
|
|
4654
|
+
participantResults[side1participantId].gamesWon += gamesWonSide1;
|
|
4655
|
+
participantResults[side1participantId].gamesLost += gamesWonSide2;
|
|
4656
|
+
}
|
|
4657
|
+
if (side2participantId) {
|
|
4658
|
+
participantResults[side2participantId].gamesWon += gamesWonSide2;
|
|
4659
|
+
participantResults[side2participantId].gamesLost += gamesWonSide1;
|
|
4660
|
+
}
|
|
4664
4661
|
}
|
|
4665
4662
|
}
|
|
4666
4663
|
}
|
|
@@ -4792,7 +4789,7 @@ function processMatchUp$1(_a) {
|
|
|
4792
4789
|
winningSide: winningSide,
|
|
4793
4790
|
score: score,
|
|
4794
4791
|
});
|
|
4795
|
-
var pointsTally = countPoints({ score: score, matchUpFormat: matchUpFormat });
|
|
4792
|
+
var pointsTally = countPoints({ score: score, matchUpFormat: matchUpFormat }).pointsTally;
|
|
4796
4793
|
if (winningParticipantId) {
|
|
4797
4794
|
participantResults[winningParticipantId].setsWon +=
|
|
4798
4795
|
setsTally[winningSideIndex];
|
|
@@ -5761,7 +5758,7 @@ function findPolicy(_a) {
|
|
|
5761
5758
|
}
|
|
5762
5759
|
|
|
5763
5760
|
function getMatchUpCompetitiveProfile(_a) {
|
|
5764
|
-
var
|
|
5761
|
+
var tournamentRecord = _a.tournamentRecord, profileBands = _a.profileBands, matchUp = _a.matchUp;
|
|
5765
5762
|
if (!matchUp)
|
|
5766
5763
|
return { error: MISSING_MATCHUP };
|
|
5767
5764
|
var score = matchUp.score, winningSide = matchUp.winningSide;
|
|
@@ -41205,7 +41202,7 @@ function engineLogging(_a) {
|
|
|
41205
41202
|
var result = _a.result, methodName = _a.methodName, elapsed = _a.elapsed, params = _a.params, engine = _a.engine;
|
|
41206
41203
|
var devContext = getDevContext();
|
|
41207
41204
|
var log = { method: methodName };
|
|
41208
|
-
var logError = result.error &&
|
|
41205
|
+
var logError = (result === null || result === void 0 ? void 0 : result.error) &&
|
|
41209
41206
|
(devContext.errors === true ||
|
|
41210
41207
|
(Array.isArray(devContext.errors) &&
|
|
41211
41208
|
devContext.errors.includes(methodName)));
|
|
@@ -41232,7 +41229,7 @@ function engineLogging(_a) {
|
|
|
41232
41229
|
}
|
|
41233
41230
|
if (Object.keys(log).length > 1)
|
|
41234
41231
|
console.log(engine, log);
|
|
41235
|
-
if (devContext.makeDeepCopy)
|
|
41232
|
+
if (result && devContext.makeDeepCopy)
|
|
41236
41233
|
result.deepCopyIterations = getDeepCopyIterations();
|
|
41237
41234
|
}
|
|
41238
41235
|
|
|
@@ -47018,7 +47015,7 @@ function buildDrawHierarchy(_a) {
|
|
|
47018
47015
|
var secondRoundEntries = secondRoundDrawPositions
|
|
47019
47016
|
.filter(function (drawPosition) { return !firstRoundDrawPositions.includes(drawPosition); })
|
|
47020
47017
|
.sort(drawPositionSort);
|
|
47021
|
-
var
|
|
47018
|
+
var secondRoundEntrySides = secondRoundMatchUps
|
|
47022
47019
|
.filter(function (matchUp) {
|
|
47023
47020
|
var _a;
|
|
47024
47021
|
return (_a = matchUp.drawPositions) === null || _a === void 0 ? void 0 : _a.reduce(function (p, c) { return secondRoundEntries.includes(c) || p; }, undefined);
|
|
@@ -47036,7 +47033,7 @@ function buildDrawHierarchy(_a) {
|
|
|
47036
47033
|
var missingPairs = secondRoundEntries.map(function (drawPosition, index) {
|
|
47037
47034
|
return [drawPosition, missingDrawPositions[index]].sort(drawPositionSort);
|
|
47038
47035
|
});
|
|
47039
|
-
var entrySides_1 = Object.assign.apply(Object, __spreadArray([{}], __read(
|
|
47036
|
+
var entrySides_1 = Object.assign.apply(Object, __spreadArray([{}], __read(secondRoundEntrySides), false));
|
|
47040
47037
|
var finishingRound_1 = makeDeepCopy(firstRoundMatchUps === null || firstRoundMatchUps === void 0 ? void 0 : firstRoundMatchUps[0].finishingRound, false, true);
|
|
47041
47038
|
var finishingPositionRange_1 = makeDeepCopy(firstRoundMatchUps === null || firstRoundMatchUps === void 0 ? void 0 : firstRoundMatchUps[0].finishingPositionRange, false, true);
|
|
47042
47039
|
missingMatchUps = missingPairs.map(function (drawPositions, index) {
|
|
@@ -59255,6 +59252,425 @@ function getEntryStatusReports(_a) {
|
|
|
59255
59252
|
};
|
|
59256
59253
|
}
|
|
59257
59254
|
|
|
59255
|
+
function getParticipantStats(_a) {
|
|
59256
|
+
var e_1, _b, e_2, _c, e_3, _d, e_4, _e, e_5, _f, e_6, _g, e_7, _h;
|
|
59257
|
+
var _j, _k, _l, _m, _o, _p;
|
|
59258
|
+
var withCompetitiveProfiles = _a.withCompetitiveProfiles, opponentParticipantId = _a.opponentParticipantId, withIndividualStats = _a.withIndividualStats, teamParticipantId = _a.teamParticipantId, tournamentRecord = _a.tournamentRecord, tallyPolicy = _a.tallyPolicy, matchUps = _a.matchUps;
|
|
59259
|
+
if (!tournamentRecord)
|
|
59260
|
+
return { error: MISSING_TOURNAMENT_RECORD };
|
|
59261
|
+
if (matchUps && !Array.isArray(matchUps))
|
|
59262
|
+
return { error: INVALID_MATCHUP };
|
|
59263
|
+
matchUps = matchUps || allTournamentMatchUps({ tournamentRecord: tournamentRecord }).matchUps;
|
|
59264
|
+
if (!(matchUps === null || matchUps === void 0 ? void 0 : matchUps.length))
|
|
59265
|
+
return { error: MISSING_MATCHUPS };
|
|
59266
|
+
var teamParticipantIds = [];
|
|
59267
|
+
if (opponentParticipantId)
|
|
59268
|
+
teamParticipantIds.push(opponentParticipantId);
|
|
59269
|
+
if (teamParticipantId)
|
|
59270
|
+
teamParticipantIds.push(teamParticipantId);
|
|
59271
|
+
var participantFilters = !teamParticipantIds.length
|
|
59272
|
+
? { participantTypes: [TEAM_PARTICIPANT] }
|
|
59273
|
+
: { participantIds: teamParticipantIds };
|
|
59274
|
+
var teamParticipants = (_j = getParticipants$1({ participantFilters: participantFilters, tournamentRecord: tournamentRecord }).participants) !== null && _j !== void 0 ? _j : [];
|
|
59275
|
+
if (!teamParticipants.every(function (_a) {
|
|
59276
|
+
var participantType = _a.participantType;
|
|
59277
|
+
return participantType === TEAM_PARTICIPANT;
|
|
59278
|
+
})) {
|
|
59279
|
+
return { error: INVALID_PARTICIPANT_IDS };
|
|
59280
|
+
}
|
|
59281
|
+
if (!teamParticipantIds.length)
|
|
59282
|
+
teamParticipantIds.push.apply(teamParticipantIds, __spreadArray([], __read(teamParticipants.map(extractAttributes('participantId'))), false));
|
|
59283
|
+
var participantStats = new Map();
|
|
59284
|
+
var participantNameMap = new Map();
|
|
59285
|
+
var participating = new Map();
|
|
59286
|
+
var teamMap = new Map();
|
|
59287
|
+
var initStats = function (participantId, participantName) {
|
|
59288
|
+
if (participantName === void 0) { participantName = ''; }
|
|
59289
|
+
return participantStats.get(participantId) ||
|
|
59290
|
+
(participantStats.set(participantId, {
|
|
59291
|
+
participantName: participantName,
|
|
59292
|
+
participantId: participantId,
|
|
59293
|
+
competitorIds: [],
|
|
59294
|
+
competitiveness: {},
|
|
59295
|
+
matchUpStatuses: {},
|
|
59296
|
+
tiebreaks: [0, 0],
|
|
59297
|
+
matchUps: [0, 0],
|
|
59298
|
+
points: [0, 0],
|
|
59299
|
+
games: [0, 0],
|
|
59300
|
+
sets: [0, 0],
|
|
59301
|
+
}) &&
|
|
59302
|
+
participantStats.get(participantId));
|
|
59303
|
+
};
|
|
59304
|
+
try {
|
|
59305
|
+
for (var teamParticipants_1 = __values(teamParticipants), teamParticipants_1_1 = teamParticipants_1.next(); !teamParticipants_1_1.done; teamParticipants_1_1 = teamParticipants_1.next()) {
|
|
59306
|
+
var teamParticipant = teamParticipants_1_1.value;
|
|
59307
|
+
var participantId = teamParticipant.participantId, individualParticipantIds = teamParticipant.individualParticipantIds;
|
|
59308
|
+
teamMap.set(participantId, individualParticipantIds !== null && individualParticipantIds !== void 0 ? individualParticipantIds : []);
|
|
59309
|
+
initStats(participantId, teamParticipant.participantName);
|
|
59310
|
+
}
|
|
59311
|
+
}
|
|
59312
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
59313
|
+
finally {
|
|
59314
|
+
try {
|
|
59315
|
+
if (teamParticipants_1_1 && !teamParticipants_1_1.done && (_b = teamParticipants_1.return)) _b.call(teamParticipants_1);
|
|
59316
|
+
}
|
|
59317
|
+
finally { if (e_1) throw e_1.error; }
|
|
59318
|
+
}
|
|
59319
|
+
if (teamParticipantId && !teamMap.get(teamParticipantId))
|
|
59320
|
+
return decorateResult({
|
|
59321
|
+
result: { error: PARTICIPANT_NOT_FOUND },
|
|
59322
|
+
context: { teamParticipantId: teamParticipantId },
|
|
59323
|
+
});
|
|
59324
|
+
if (opponentParticipantId && !teamMap.get(opponentParticipantId))
|
|
59325
|
+
return decorateResult({
|
|
59326
|
+
result: { error: PARTICIPANT_NOT_FOUND },
|
|
59327
|
+
context: { opponentParticipantId: opponentParticipantId },
|
|
59328
|
+
});
|
|
59329
|
+
var relevantMatchUps = [];
|
|
59330
|
+
var getSideParticipantIds = function (sides) {
|
|
59331
|
+
var e_8, _a, e_9, _b, e_10, _c;
|
|
59332
|
+
var _d;
|
|
59333
|
+
var sideParticipantIds = [[], []];
|
|
59334
|
+
try {
|
|
59335
|
+
for (var sides_1 = __values(sides), sides_1_1 = sides_1.next(); !sides_1_1.done; sides_1_1 = sides_1.next()) {
|
|
59336
|
+
var side = sides_1_1.value;
|
|
59337
|
+
if ((_d = side.participant) === null || _d === void 0 ? void 0 : _d.participantName)
|
|
59338
|
+
participantNameMap.set(side.participant.participantId, side.participant.participantName);
|
|
59339
|
+
}
|
|
59340
|
+
}
|
|
59341
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
59342
|
+
finally {
|
|
59343
|
+
try {
|
|
59344
|
+
if (sides_1_1 && !sides_1_1.done && (_a = sides_1.return)) _a.call(sides_1);
|
|
59345
|
+
}
|
|
59346
|
+
finally { if (e_8) throw e_8.error; }
|
|
59347
|
+
}
|
|
59348
|
+
var getCompetitorIds = function (_a) {
|
|
59349
|
+
var _b, _c, _d, _e, _f;
|
|
59350
|
+
var side = _a.side, individualParticipantIds = _a.individualParticipantIds;
|
|
59351
|
+
return ((side.participantId &&
|
|
59352
|
+
(!(individualParticipantIds === null || individualParticipantIds === void 0 ? void 0 : individualParticipantIds.length) ||
|
|
59353
|
+
individualParticipantIds.includes(side.participantId)) && [
|
|
59354
|
+
side.participantId,
|
|
59355
|
+
]) ||
|
|
59356
|
+
(((_c = (_b = side.participant) === null || _b === void 0 ? void 0 : _b.individualParticipantIds) === null || _c === void 0 ? void 0 : _c.length) &&
|
|
59357
|
+
(!(individualParticipantIds === null || individualParticipantIds === void 0 ? void 0 : individualParticipantIds.length) ||
|
|
59358
|
+
intersection(individualParticipantIds, (_d = side.participant) === null || _d === void 0 ? void 0 : _d.individualParticipantIds).length === ((_f = (_e = side.participant) === null || _e === void 0 ? void 0 : _e.individualParticipantIds) === null || _f === void 0 ? void 0 : _f.length)) &&
|
|
59359
|
+
side.participant.individualParticipantIds));
|
|
59360
|
+
};
|
|
59361
|
+
if (teamMap.size) {
|
|
59362
|
+
var processSides = function (thisTeamId, individualParticipantIds) {
|
|
59363
|
+
var e_11, _a, e_12, _b;
|
|
59364
|
+
try {
|
|
59365
|
+
for (var sides_3 = __values(sides), sides_3_1 = sides_3.next(); !sides_3_1.done; sides_3_1 = sides_3.next()) {
|
|
59366
|
+
var side = sides_3_1.value;
|
|
59367
|
+
if (!side.participant)
|
|
59368
|
+
continue;
|
|
59369
|
+
var competitorIds = getCompetitorIds({
|
|
59370
|
+
individualParticipantIds: individualParticipantIds,
|
|
59371
|
+
side: side,
|
|
59372
|
+
});
|
|
59373
|
+
if (competitorIds === null || competitorIds === void 0 ? void 0 : competitorIds.length) {
|
|
59374
|
+
var sideNumber = side.sideNumber;
|
|
59375
|
+
if (!sideNumber)
|
|
59376
|
+
continue;
|
|
59377
|
+
var ids = [thisTeamId];
|
|
59378
|
+
if (withIndividualStats)
|
|
59379
|
+
ids.push.apply(ids, __spreadArray([], __read(competitorIds), false));
|
|
59380
|
+
sideParticipantIds[sideNumber - 1] = ids;
|
|
59381
|
+
var stats = participantStats.get(thisTeamId);
|
|
59382
|
+
try {
|
|
59383
|
+
for (var _c = (e_12 = void 0, __values(competitorIds.filter(Boolean))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
59384
|
+
var id = _d.value;
|
|
59385
|
+
if (stats && !stats.competitorIds.includes(id))
|
|
59386
|
+
stats.competitorIds.push(id);
|
|
59387
|
+
}
|
|
59388
|
+
}
|
|
59389
|
+
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
59390
|
+
finally {
|
|
59391
|
+
try {
|
|
59392
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
59393
|
+
}
|
|
59394
|
+
finally { if (e_12) throw e_12.error; }
|
|
59395
|
+
}
|
|
59396
|
+
}
|
|
59397
|
+
}
|
|
59398
|
+
}
|
|
59399
|
+
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
59400
|
+
finally {
|
|
59401
|
+
try {
|
|
59402
|
+
if (sides_3_1 && !sides_3_1.done && (_a = sides_3.return)) _a.call(sides_3);
|
|
59403
|
+
}
|
|
59404
|
+
finally { if (e_11) throw e_11.error; }
|
|
59405
|
+
}
|
|
59406
|
+
};
|
|
59407
|
+
if (teamParticipantId) {
|
|
59408
|
+
var processForTeam = !opponentParticipantId ||
|
|
59409
|
+
sides.every(function (side) {
|
|
59410
|
+
side.participant &&
|
|
59411
|
+
(getCompetitorIds({
|
|
59412
|
+
side: side,
|
|
59413
|
+
individualParticipantIds: teamMap.get(teamParticipantId),
|
|
59414
|
+
}) ||
|
|
59415
|
+
getCompetitorIds({
|
|
59416
|
+
side: side,
|
|
59417
|
+
individualParticipantIds: teamMap.get(opponentParticipantId),
|
|
59418
|
+
}));
|
|
59419
|
+
});
|
|
59420
|
+
if (processForTeam)
|
|
59421
|
+
processSides(teamParticipantId, teamMap.get(teamParticipantId));
|
|
59422
|
+
}
|
|
59423
|
+
else {
|
|
59424
|
+
try {
|
|
59425
|
+
for (var teamMap_1 = __values(teamMap), teamMap_1_1 = teamMap_1.next(); !teamMap_1_1.done; teamMap_1_1 = teamMap_1.next()) {
|
|
59426
|
+
var _e = __read(teamMap_1_1.value, 2), thisTeamId = _e[0], individualParticipantIds = _e[1];
|
|
59427
|
+
processSides(thisTeamId, individualParticipantIds);
|
|
59428
|
+
}
|
|
59429
|
+
}
|
|
59430
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
59431
|
+
finally {
|
|
59432
|
+
try {
|
|
59433
|
+
if (teamMap_1_1 && !teamMap_1_1.done && (_b = teamMap_1.return)) _b.call(teamMap_1);
|
|
59434
|
+
}
|
|
59435
|
+
finally { if (e_9) throw e_9.error; }
|
|
59436
|
+
}
|
|
59437
|
+
}
|
|
59438
|
+
}
|
|
59439
|
+
else if (withIndividualStats) {
|
|
59440
|
+
try {
|
|
59441
|
+
// no teams so process individuals
|
|
59442
|
+
for (var sides_2 = __values(sides), sides_2_1 = sides_2.next(); !sides_2_1.done; sides_2_1 = sides_2.next()) {
|
|
59443
|
+
var side = sides_2_1.value;
|
|
59444
|
+
if (!side.participant)
|
|
59445
|
+
continue;
|
|
59446
|
+
var competitorIds = getCompetitorIds({
|
|
59447
|
+
individualParticipantIds: [],
|
|
59448
|
+
side: side,
|
|
59449
|
+
});
|
|
59450
|
+
var sideNumber = side.sideNumber;
|
|
59451
|
+
if (!sideNumber)
|
|
59452
|
+
continue;
|
|
59453
|
+
sideParticipantIds[sideNumber - 1] = competitorIds;
|
|
59454
|
+
}
|
|
59455
|
+
}
|
|
59456
|
+
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
59457
|
+
finally {
|
|
59458
|
+
try {
|
|
59459
|
+
if (sides_2_1 && !sides_2_1.done && (_c = sides_2.return)) _c.call(sides_2);
|
|
59460
|
+
}
|
|
59461
|
+
finally { if (e_10) throw e_10.error; }
|
|
59462
|
+
}
|
|
59463
|
+
}
|
|
59464
|
+
return sideParticipantIds;
|
|
59465
|
+
};
|
|
59466
|
+
var _loop_1 = function (matchUp) {
|
|
59467
|
+
if (!isObject(matchUp))
|
|
59468
|
+
return { value: { error: INVALID_MATCHUP } };
|
|
59469
|
+
var matchUpStatus = matchUp.matchUpStatus, matchUpFormat = matchUp.matchUpFormat, matchUpType = matchUp.matchUpType, winningSide = matchUp.winningSide, score = matchUp.score, sides = matchUp.sides;
|
|
59470
|
+
if (!sides ||
|
|
59471
|
+
!score ||
|
|
59472
|
+
matchUpType === TEAM_MATCHUP ||
|
|
59473
|
+
matchUpStatus === BYE)
|
|
59474
|
+
return "continue";
|
|
59475
|
+
var sideParticipantIds = getSideParticipantIds(sides);
|
|
59476
|
+
if (!sideParticipantIds.filter(Boolean).length)
|
|
59477
|
+
return "continue";
|
|
59478
|
+
var competitiveness = withCompetitiveProfiles &&
|
|
59479
|
+
winningSide &&
|
|
59480
|
+
((_k = getMatchUpCompetitiveProfile({ matchUp: matchUp })) === null || _k === void 0 ? void 0 : _k.competitiveness);
|
|
59481
|
+
relevantMatchUps.push(matchUp);
|
|
59482
|
+
var setsTally = countSets({
|
|
59483
|
+
matchUpStatus: matchUpStatus,
|
|
59484
|
+
matchUpFormat: matchUpFormat,
|
|
59485
|
+
tallyPolicy: tallyPolicy,
|
|
59486
|
+
winningSide: winningSide,
|
|
59487
|
+
score: score,
|
|
59488
|
+
});
|
|
59489
|
+
var gamesTally = countGames({
|
|
59490
|
+
matchUpStatus: matchUpStatus,
|
|
59491
|
+
matchUpFormat: matchUpFormat,
|
|
59492
|
+
tallyPolicy: tallyPolicy,
|
|
59493
|
+
winningSide: winningSide,
|
|
59494
|
+
score: score,
|
|
59495
|
+
});
|
|
59496
|
+
var _v = countPoints({
|
|
59497
|
+
matchUpFormat: matchUpFormat,
|
|
59498
|
+
score: score,
|
|
59499
|
+
}), pointsTally = _v.pointsTally, tiebreaksTally = _v.tiebreaksTally;
|
|
59500
|
+
sideParticipantIds.forEach(function (ids, index) {
|
|
59501
|
+
var e_13, _a;
|
|
59502
|
+
var _loop_2 = function (id) {
|
|
59503
|
+
var stats = initStats(id, participantNameMap.get(id));
|
|
59504
|
+
if (stats) {
|
|
59505
|
+
var teamSumTally = function (stat, tally) {
|
|
59506
|
+
return tally.forEach(function (t, i) { return (stats[stat][i] += t); });
|
|
59507
|
+
};
|
|
59508
|
+
var tiebreaks = index
|
|
59509
|
+
? __spreadArray([], __read(tiebreaksTally), false).reverse()
|
|
59510
|
+
: tiebreaksTally;
|
|
59511
|
+
var points = index ? __spreadArray([], __read(pointsTally), false).reverse() : pointsTally;
|
|
59512
|
+
var games = index ? __spreadArray([], __read(gamesTally), false).reverse() : gamesTally;
|
|
59513
|
+
var sets = index ? __spreadArray([], __read(setsTally), false).reverse() : setsTally;
|
|
59514
|
+
teamSumTally('tiebreaks', tiebreaks);
|
|
59515
|
+
teamSumTally('points', points);
|
|
59516
|
+
teamSumTally('games', games);
|
|
59517
|
+
teamSumTally('sets', sets);
|
|
59518
|
+
if (winningSide) {
|
|
59519
|
+
var tallyIndex = winningSide - 1 === index ? 0 : 1;
|
|
59520
|
+
stats.matchUps[tallyIndex] += 1;
|
|
59521
|
+
}
|
|
59522
|
+
if (competitiveness) {
|
|
59523
|
+
var attr = competitiveness.toLowerCase();
|
|
59524
|
+
if (!stats.competitiveness[attr])
|
|
59525
|
+
stats.competitiveness[attr] = [0, 0];
|
|
59526
|
+
stats.competitiveness[attr][index] += 1;
|
|
59527
|
+
}
|
|
59528
|
+
if (matchUpStatus) {
|
|
59529
|
+
var attr = matchUpStatus.toLowerCase();
|
|
59530
|
+
if (!stats.matchUpStatuses[attr])
|
|
59531
|
+
stats.matchUpStatuses[attr] = 0;
|
|
59532
|
+
stats.matchUpStatuses[attr] += 1;
|
|
59533
|
+
}
|
|
59534
|
+
}
|
|
59535
|
+
};
|
|
59536
|
+
try {
|
|
59537
|
+
for (var ids_1 = (e_13 = void 0, __values(ids)), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
|
|
59538
|
+
var id = ids_1_1.value;
|
|
59539
|
+
_loop_2(id);
|
|
59540
|
+
}
|
|
59541
|
+
}
|
|
59542
|
+
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
59543
|
+
finally {
|
|
59544
|
+
try {
|
|
59545
|
+
if (ids_1_1 && !ids_1_1.done && (_a = ids_1.return)) _a.call(ids_1);
|
|
59546
|
+
}
|
|
59547
|
+
finally { if (e_13) throw e_13.error; }
|
|
59548
|
+
}
|
|
59549
|
+
});
|
|
59550
|
+
};
|
|
59551
|
+
try {
|
|
59552
|
+
for (var matchUps_1 = __values(matchUps), matchUps_1_1 = matchUps_1.next(); !matchUps_1_1.done; matchUps_1_1 = matchUps_1.next()) {
|
|
59553
|
+
var matchUp = matchUps_1_1.value;
|
|
59554
|
+
var state_1 = _loop_1(matchUp);
|
|
59555
|
+
if (typeof state_1 === "object")
|
|
59556
|
+
return state_1.value;
|
|
59557
|
+
}
|
|
59558
|
+
}
|
|
59559
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
59560
|
+
finally {
|
|
59561
|
+
try {
|
|
59562
|
+
if (matchUps_1_1 && !matchUps_1_1.done && (_c = matchUps_1.return)) _c.call(matchUps_1);
|
|
59563
|
+
}
|
|
59564
|
+
finally { if (e_2) throw e_2.error; }
|
|
59565
|
+
}
|
|
59566
|
+
var statsattributes = ['tiebreaks', 'matchUps', 'points', 'games', 'sets'];
|
|
59567
|
+
var competitivenessAttributes = ['competitive', 'routine', 'decisive'];
|
|
59568
|
+
var ratio = new Map();
|
|
59569
|
+
var add = function (a, b) { return (a !== null && a !== void 0 ? a : 0) + (b !== null && b !== void 0 ? b : 0); };
|
|
59570
|
+
try {
|
|
59571
|
+
for (var _q = __values(participantStats.entries()), _r = _q.next(); !_r.done; _r = _q.next()) {
|
|
59572
|
+
var _s = __read(_r.value, 2), participantId = _s[0], stats = _s[1];
|
|
59573
|
+
try {
|
|
59574
|
+
for (var statsattributes_1 = (e_4 = void 0, __values(statsattributes)), statsattributes_1_1 = statsattributes_1.next(); !statsattributes_1_1.done; statsattributes_1_1 = statsattributes_1.next()) {
|
|
59575
|
+
var attr = statsattributes_1_1.value;
|
|
59576
|
+
var total = stats[attr].reduce(add);
|
|
59577
|
+
if (total) {
|
|
59578
|
+
var value = stats[attr][0] / total;
|
|
59579
|
+
var accessor = "".concat(attr, "Ratio");
|
|
59580
|
+
var fixedValue = parseFloat(value.toFixed(2));
|
|
59581
|
+
stats[accessor] = fixedValue;
|
|
59582
|
+
participating.set(participantId, true);
|
|
59583
|
+
if (!ratio.has(accessor))
|
|
59584
|
+
ratio.set(accessor, []);
|
|
59585
|
+
(_l = ratio.get(accessor)) === null || _l === void 0 ? void 0 : _l.push(fixedValue);
|
|
59586
|
+
}
|
|
59587
|
+
}
|
|
59588
|
+
}
|
|
59589
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
59590
|
+
finally {
|
|
59591
|
+
try {
|
|
59592
|
+
if (statsattributes_1_1 && !statsattributes_1_1.done && (_e = statsattributes_1.return)) _e.call(statsattributes_1);
|
|
59593
|
+
}
|
|
59594
|
+
finally { if (e_4) throw e_4.error; }
|
|
59595
|
+
}
|
|
59596
|
+
try {
|
|
59597
|
+
for (var competitivenessAttributes_1 = (e_5 = void 0, __values(competitivenessAttributes)), competitivenessAttributes_1_1 = competitivenessAttributes_1.next(); !competitivenessAttributes_1_1.done; competitivenessAttributes_1_1 = competitivenessAttributes_1.next()) {
|
|
59598
|
+
var attr = competitivenessAttributes_1_1.value;
|
|
59599
|
+
var total = (_o = (_m = stats.competitiveness) === null || _m === void 0 ? void 0 : _m[attr]) === null || _o === void 0 ? void 0 : _o.reduce(add);
|
|
59600
|
+
if (total) {
|
|
59601
|
+
var value = stats.competitiveness[attr][0] / total;
|
|
59602
|
+
var accessor = "".concat(attr, "Ratio");
|
|
59603
|
+
var fixedValue = parseFloat(value.toFixed(2));
|
|
59604
|
+
stats[accessor] = fixedValue;
|
|
59605
|
+
}
|
|
59606
|
+
}
|
|
59607
|
+
}
|
|
59608
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
59609
|
+
finally {
|
|
59610
|
+
try {
|
|
59611
|
+
if (competitivenessAttributes_1_1 && !competitivenessAttributes_1_1.done && (_f = competitivenessAttributes_1.return)) _f.call(competitivenessAttributes_1);
|
|
59612
|
+
}
|
|
59613
|
+
finally { if (e_5) throw e_5.error; }
|
|
59614
|
+
}
|
|
59615
|
+
}
|
|
59616
|
+
}
|
|
59617
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
59618
|
+
finally {
|
|
59619
|
+
try {
|
|
59620
|
+
if (_r && !_r.done && (_d = _q.return)) _d.call(_q);
|
|
59621
|
+
}
|
|
59622
|
+
finally { if (e_3) throw e_3.error; }
|
|
59623
|
+
}
|
|
59624
|
+
if (!teamParticipantId) {
|
|
59625
|
+
var highLowSort = function (a, b) { return b - a; };
|
|
59626
|
+
try {
|
|
59627
|
+
for (var _t = __values(participantStats.values()), _u = _t.next(); !_u.done; _u = _t.next()) {
|
|
59628
|
+
var stats = _u.value;
|
|
59629
|
+
try {
|
|
59630
|
+
for (var statsattributes_2 = (e_7 = void 0, __values(statsattributes)), statsattributes_2_1 = statsattributes_2.next(); !statsattributes_2_1.done; statsattributes_2_1 = statsattributes_2.next()) {
|
|
59631
|
+
var attr = statsattributes_2_1.value;
|
|
59632
|
+
// now rank each team by their ratio on each attribute
|
|
59633
|
+
var accessor = "".concat(attr, "Ratio");
|
|
59634
|
+
if (typeof stats[accessor] === 'number') {
|
|
59635
|
+
var index = (_p = ratio
|
|
59636
|
+
.get(accessor)) === null || _p === void 0 ? void 0 : _p.sort(highLowSort).indexOf(stats[accessor]);
|
|
59637
|
+
if (typeof index === 'number' && index >= 0) {
|
|
59638
|
+
var rankAccessor = "".concat(attr, "Rank");
|
|
59639
|
+
stats[rankAccessor] = index + 1;
|
|
59640
|
+
}
|
|
59641
|
+
}
|
|
59642
|
+
}
|
|
59643
|
+
}
|
|
59644
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
59645
|
+
finally {
|
|
59646
|
+
try {
|
|
59647
|
+
if (statsattributes_2_1 && !statsattributes_2_1.done && (_h = statsattributes_2.return)) _h.call(statsattributes_2);
|
|
59648
|
+
}
|
|
59649
|
+
finally { if (e_7) throw e_7.error; }
|
|
59650
|
+
}
|
|
59651
|
+
}
|
|
59652
|
+
}
|
|
59653
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
59654
|
+
finally {
|
|
59655
|
+
try {
|
|
59656
|
+
if (_u && !_u.done && (_g = _t.return)) _g.call(_t);
|
|
59657
|
+
}
|
|
59658
|
+
finally { if (e_6) throw e_6.error; }
|
|
59659
|
+
}
|
|
59660
|
+
}
|
|
59661
|
+
var result = __assign({ relevantMatchUps: relevantMatchUps }, SUCCESS);
|
|
59662
|
+
if (teamParticipantId) {
|
|
59663
|
+
result.teamStats = participantStats.get(teamParticipantId);
|
|
59664
|
+
if (opponentParticipantId)
|
|
59665
|
+
result.opponentStats = participantStats.get(opponentParticipantId);
|
|
59666
|
+
}
|
|
59667
|
+
else {
|
|
59668
|
+
result.participatingTeamsCount = participating.size;
|
|
59669
|
+
}
|
|
59670
|
+
result.allParticipantStats = __spreadArray([], __read(participantStats.values()), false);
|
|
59671
|
+
return result;
|
|
59672
|
+
}
|
|
59673
|
+
|
|
59258
59674
|
function getAvgWTN(_a) {
|
|
59259
59675
|
var eventType = _a.eventType, matchUps = _a.matchUps, eventId = _a.eventId, drawId = _a.drawId;
|
|
59260
59676
|
var matchUpFormatCounts = {};
|
|
@@ -59466,7 +59882,11 @@ function getPositionManipulations(_a) {
|
|
|
59466
59882
|
})) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.slice(1);
|
|
59467
59883
|
}
|
|
59468
59884
|
|
|
59469
|
-
var reportGovernor = {
|
|
59885
|
+
var reportGovernor = {
|
|
59886
|
+
getStructureReports: getStructureReports,
|
|
59887
|
+
getEntryStatusReports: getEntryStatusReports,
|
|
59888
|
+
getParticipantStats: getParticipantStats,
|
|
59889
|
+
};
|
|
59470
59890
|
|
|
59471
59891
|
function setDrawParticipantRepresentativeIds(_a) {
|
|
59472
59892
|
var representativeParticipantIds = _a.representativeParticipantIds, drawDefinition = _a.drawDefinition;
|