tods-competition-factory 1.8.28 → 1.8.29
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/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +100 -99
- 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 +6 -6
|
@@ -2929,7 +2929,7 @@ var matchUpFormatCode = {
|
|
|
2929
2929
|
};
|
|
2930
2930
|
|
|
2931
2931
|
function factoryVersion() {
|
|
2932
|
-
return '1.8.
|
|
2932
|
+
return '1.8.29';
|
|
2933
2933
|
}
|
|
2934
2934
|
|
|
2935
2935
|
function getObjectTieFormat(obj) {
|
|
@@ -4187,8 +4187,8 @@ var validMatchUpStatuses = [
|
|
|
4187
4187
|
];
|
|
4188
4188
|
var directingMatchUpStatuses = [
|
|
4189
4189
|
BYE,
|
|
4190
|
-
DOUBLE_WALKOVER,
|
|
4191
|
-
DOUBLE_DEFAULT,
|
|
4190
|
+
DOUBLE_WALKOVER, // directing because of a produced WALKOVER
|
|
4191
|
+
DOUBLE_DEFAULT, // directing because of a produced WALKOVER
|
|
4192
4192
|
COMPLETED$1,
|
|
4193
4193
|
DEFAULTED,
|
|
4194
4194
|
RETIRED$1,
|
|
@@ -5506,31 +5506,31 @@ var TIE_FORMAT_MODIFICATIONS = 'tieFormatModification';
|
|
|
5506
5506
|
var extensionConstants = {
|
|
5507
5507
|
APPLIED_POLICIES: APPLIED_POLICIES,
|
|
5508
5508
|
AUDIT_POSITION_ACTIONS: AUDIT_POSITION_ACTIONS,
|
|
5509
|
-
CONTEXT: CONTEXT,
|
|
5509
|
+
CONTEXT: CONTEXT, // used to capture, e.g. context in which a venue was added
|
|
5510
5510
|
DELEGATED_OUTCOME: DELEGATED_OUTCOME,
|
|
5511
5511
|
DISABLED: DISABLED,
|
|
5512
5512
|
DISABLE_LINKS: DISABLE_LINKS,
|
|
5513
5513
|
DISABLE_AUTO_CALC: DISABLE_AUTO_CALC,
|
|
5514
5514
|
DRAW_DELETIONS: DRAW_DELETIONS,
|
|
5515
5515
|
DRAW_PROFILE: DRAW_PROFILE,
|
|
5516
|
-
ENTRY_PROFILE: ENTRY_PROFILE,
|
|
5516
|
+
ENTRY_PROFILE: ENTRY_PROFILE, // used for drawGeneration; not relevant for anonymized tournaments
|
|
5517
5517
|
EVENT_PROFILE: EVENT_PROFILE,
|
|
5518
5518
|
FLIGHT_PROFILE: FLIGHT_PROFILE,
|
|
5519
|
-
GROUPING_ATTRIBUTE: GROUPING_ATTRIBUTE,
|
|
5519
|
+
GROUPING_ATTRIBUTE: GROUPING_ATTRIBUTE, // for generating teams; not relevant for anonymized tournaments
|
|
5520
5520
|
LINEUPS: LINEUPS,
|
|
5521
5521
|
LINKED_TOURNAMENTS: LINKED_TOURNAMENTS,
|
|
5522
5522
|
MATCHUP_HISTORY: MATCHUP_HISTORY,
|
|
5523
5523
|
PARTICIPANT_REPRESENTATIVES: PARTICIPANT_REPRESENTATIVES,
|
|
5524
5524
|
PERSON_REQUESTS: PERSON_REQUESTS,
|
|
5525
|
-
RANKING_POINTS: RANKING_POINTS,
|
|
5525
|
+
RANKING_POINTS: RANKING_POINTS, // for attaching points awarded to tournamentRecord
|
|
5526
5526
|
ROUND_TARGET: ROUND_TARGET,
|
|
5527
5527
|
SCHEDULE_LIMITS: SCHEDULE_LIMITS,
|
|
5528
5528
|
SCHEDULE_TIMING: SCHEDULE_TIMING,
|
|
5529
5529
|
SCHEDULING_PROFILE: SCHEDULING_PROFILE,
|
|
5530
|
-
STATUS_DETAIL: STATUS_DETAIL,
|
|
5530
|
+
STATUS_DETAIL: STATUS_DETAIL, // attached to event.entries
|
|
5531
5531
|
SUB_ORDER: SUB_ORDER,
|
|
5532
5532
|
TALLY: TALLY,
|
|
5533
|
-
TIE_FORMAT_MODIFICATIONS: TIE_FORMAT_MODIFICATIONS,
|
|
5533
|
+
TIE_FORMAT_MODIFICATIONS: TIE_FORMAT_MODIFICATIONS, // for auditing, not important when anonymized
|
|
5534
5534
|
FACTORY: FACTORY$1,
|
|
5535
5535
|
};
|
|
5536
5536
|
var internalExtensions = [
|
|
@@ -6638,8 +6638,8 @@ var topicConstants = {
|
|
|
6638
6638
|
DELETED_DRAW_IDS: DELETED_DRAW_IDS,
|
|
6639
6639
|
DELETED_MATCHUP_IDS: DELETED_MATCHUP_IDS,
|
|
6640
6640
|
MODIFY_DRAW_DEFINITION: MODIFY_DRAW_DEFINITION,
|
|
6641
|
-
MODIFY_DRAW_ENTRIES: MODIFY_DRAW_ENTRIES,
|
|
6642
|
-
MODIFY_EVENT_ENTRIES: MODIFY_EVENT_ENTRIES,
|
|
6641
|
+
MODIFY_DRAW_ENTRIES: MODIFY_DRAW_ENTRIES, // TODO
|
|
6642
|
+
MODIFY_EVENT_ENTRIES: MODIFY_EVENT_ENTRIES, // TODO
|
|
6643
6643
|
MODIFY_MATCHUP: MODIFY_MATCHUP,
|
|
6644
6644
|
MODIFY_PARTICIPANTS: MODIFY_PARTICIPANTS,
|
|
6645
6645
|
MODIFY_POSITION_ASSIGNMENTS: MODIFY_POSITION_ASSIGNMENTS,
|
|
@@ -8526,7 +8526,7 @@ function getStructureSeedAssignments(_a) {
|
|
|
8526
8526
|
return {
|
|
8527
8527
|
participantId: entry.participantId,
|
|
8528
8528
|
seedValue: seedNumber,
|
|
8529
|
-
seedProxy: true,
|
|
8529
|
+
seedProxy: true, // flag so that proxy seeding information doesn't get used externally
|
|
8530
8530
|
seedNumber: seedNumber,
|
|
8531
8531
|
};
|
|
8532
8532
|
})
|
|
@@ -11197,7 +11197,7 @@ function targetByRoundOutcome(_a) {
|
|
|
11197
11197
|
function targetByWinRatio(_a) {
|
|
11198
11198
|
var matchUp = _a.matchUp;
|
|
11199
11199
|
return {
|
|
11200
|
-
targetLinks: { loserTargetLink: undefined, winnerTargetLink: undefined },
|
|
11200
|
+
targetLinks: { loserTargetLink: undefined, winnerTargetLink: undefined }, // returned for testing
|
|
11201
11201
|
targetMatchUps: { loserMatchUp: undefined, winnerMatchUp: undefined },
|
|
11202
11202
|
matchUp: matchUp,
|
|
11203
11203
|
};
|
|
@@ -11749,7 +11749,7 @@ function modifyMatchUpScore(_a) {
|
|
|
11749
11749
|
// participantsProfile: { withGroupings: true },
|
|
11750
11750
|
matchUpFilters: { matchUpIds: [matchUpId] },
|
|
11751
11751
|
nextMatchUps: true,
|
|
11752
|
-
tournamentRecord: tournamentRecord,
|
|
11752
|
+
tournamentRecord: tournamentRecord, // required to hydrate participants
|
|
11753
11753
|
inContext: true,
|
|
11754
11754
|
drawDefinition: drawDefinition,
|
|
11755
11755
|
matchUpsMap: matchUpsMap,
|
|
@@ -16693,14 +16693,14 @@ var POLICY_POSITION_ACTIONS_DEFAULT = (_a$e = {},
|
|
|
16693
16693
|
// enabledStructures: [] => all structures are enabled
|
|
16694
16694
|
enabledStructures: [
|
|
16695
16695
|
{
|
|
16696
|
-
stages: [QUALIFYING, MAIN],
|
|
16697
|
-
stageSequences: [1],
|
|
16698
|
-
enabledActions: [],
|
|
16696
|
+
stages: [QUALIFYING, MAIN], // stages to which this policy applies
|
|
16697
|
+
stageSequences: [1], // stageSequences to which this policy applies
|
|
16698
|
+
enabledActions: [], // enabledActions: [] => all actions are enabled
|
|
16699
16699
|
disabledActions: [], // disabledActions: [] => no actions are disabled
|
|
16700
16700
|
},
|
|
16701
16701
|
{
|
|
16702
|
-
stages: [],
|
|
16703
|
-
stageSequences: [],
|
|
16702
|
+
stages: [], // stages: [] => applies to all stages
|
|
16703
|
+
stageSequences: [], // stageSequences: [] => applies to all stageSequences
|
|
16704
16704
|
enabledActions: [
|
|
16705
16705
|
ADD_NICKNAME,
|
|
16706
16706
|
ADD_PENALTY,
|
|
@@ -16738,8 +16738,8 @@ var POLICY_POSITION_ACTIONS_NO_MOVEMENT = (_a$c = {},
|
|
|
16738
16738
|
// enabledStructures: [] => all structures are enabled
|
|
16739
16739
|
enabledStructures: [
|
|
16740
16740
|
{
|
|
16741
|
-
stages: [],
|
|
16742
|
-
stageSequences: [],
|
|
16741
|
+
stages: [], // stages: [] => applies to all stages
|
|
16742
|
+
stageSequences: [], // stageSequences: [] => applies to all stageSequences
|
|
16743
16743
|
enabledActions: [SEED_VALUE, ADD_NICKNAME, ADD_PENALTY],
|
|
16744
16744
|
disabledActions: [], // disabledActions: [] => no actions are disabled
|
|
16745
16745
|
},
|
|
@@ -16863,7 +16863,7 @@ var POLICY_SCHEDULING_DEFAULT = (_a$9 = {},
|
|
|
16863
16863
|
_c),
|
|
16864
16864
|
matchUpAverageTimes: [
|
|
16865
16865
|
{
|
|
16866
|
-
matchUpFormatCodes: [FORMAT_STANDARD],
|
|
16866
|
+
matchUpFormatCodes: [FORMAT_STANDARD], // Best of 3 tiebreak sets
|
|
16867
16867
|
averageTimes: [
|
|
16868
16868
|
{
|
|
16869
16869
|
categoryNames: [],
|
|
@@ -16876,31 +16876,31 @@ var POLICY_SCHEDULING_DEFAULT = (_a$9 = {},
|
|
|
16876
16876
|
],
|
|
16877
16877
|
},
|
|
16878
16878
|
{
|
|
16879
|
-
matchUpFormatCodes: ['SET3-S:6/TB7-F:TB10'],
|
|
16879
|
+
matchUpFormatCodes: ['SET3-S:6/TB7-F:TB10'], // Two tiebreak sets, 10-point match tiebreak at one set all
|
|
16880
16880
|
averageTimes: [{ categoryNames: [], minutes: { default: 85 } }],
|
|
16881
16881
|
},
|
|
16882
16882
|
{
|
|
16883
|
-
matchUpFormatCodes: ['SET3-S:6/TB7-F:TB7'],
|
|
16883
|
+
matchUpFormatCodes: ['SET3-S:6/TB7-F:TB7'], // Two tiebreak sets, 7-point match tiebreak at one set all
|
|
16884
16884
|
averageTimes: [{ categoryNames: [], minutes: { default: 70 } }],
|
|
16885
16885
|
},
|
|
16886
16886
|
{
|
|
16887
|
-
matchUpFormatCodes: ['SET3-S:4NOAD-F:TB7'],
|
|
16887
|
+
matchUpFormatCodes: ['SET3-S:4NOAD-F:TB7'], // Two short sets to 4 with deciding game at 3-3, 7-point match tiebreak at one set all
|
|
16888
16888
|
averageTimes: [{ categoryNames: [], minutes: { default: 55 } }],
|
|
16889
16889
|
},
|
|
16890
16890
|
{
|
|
16891
|
-
matchUpFormatCodes: ['SET3-S:4/TB7'],
|
|
16891
|
+
matchUpFormatCodes: ['SET3-S:4/TB7'], // Best of 3 sets to 4
|
|
16892
16892
|
averageTimes: [{ categoryNames: [], minutes: { default: 60 } }],
|
|
16893
16893
|
},
|
|
16894
16894
|
{
|
|
16895
|
-
matchUpFormatCodes: ['SET3-S:4/TB7-F:TB7'],
|
|
16895
|
+
matchUpFormatCodes: ['SET3-S:4/TB7-F:TB7'], // Two short sets to 4, 7-point match tiebreak at one set all
|
|
16896
16896
|
averageTimes: [{ categoryNames: [], minutes: { default: 50 } }],
|
|
16897
16897
|
},
|
|
16898
16898
|
{
|
|
16899
|
-
matchUpFormatCodes: ['SET3-S:4/TB7-F:TB10'],
|
|
16899
|
+
matchUpFormatCodes: ['SET3-S:4/TB7-F:TB10'], // Two short sets to 4, 10-point match tiebreak at one set all
|
|
16900
16900
|
averageTimes: [{ categoryNames: [], minutes: { default: 55 } }],
|
|
16901
16901
|
},
|
|
16902
16902
|
{
|
|
16903
|
-
matchUpFormatCodes: ['SET3-S:4/TB5@3'],
|
|
16903
|
+
matchUpFormatCodes: ['SET3-S:4/TB5@3'], // Two out of three short sets to 4 with 5-point tiebreak at 3 games all
|
|
16904
16904
|
averageTimes: [{ categoryNames: [], minutes: { default: 45 } }],
|
|
16905
16905
|
},
|
|
16906
16906
|
{
|
|
@@ -16911,15 +16911,15 @@ var POLICY_SCHEDULING_DEFAULT = (_a$9 = {},
|
|
|
16911
16911
|
averageTimes: [{ categoryNames: [], minutes: { default: 40 } }],
|
|
16912
16912
|
},
|
|
16913
16913
|
{
|
|
16914
|
-
matchUpFormatCodes: ['SET1-S:5/TB9@4'],
|
|
16914
|
+
matchUpFormatCodes: ['SET1-S:5/TB9@4'], // One no advantage set to 5, tiebreak to 9 at 4-4
|
|
16915
16915
|
averageTimes: [{ categoryNames: [], minutes: { default: 30 } }],
|
|
16916
16916
|
},
|
|
16917
16917
|
{
|
|
16918
|
-
matchUpFormatCodes: ['SET1-S:6/TB7'],
|
|
16918
|
+
matchUpFormatCodes: ['SET1-S:6/TB7'], // One standard tiebreak set to 6, 7-point tiebreak at 6 games all
|
|
16919
16919
|
averageTimes: [{ categoryNames: [], minutes: { default: 30 } }],
|
|
16920
16920
|
},
|
|
16921
16921
|
{
|
|
16922
|
-
matchUpFormatCodes: ['SET1-S:6NOAD'],
|
|
16922
|
+
matchUpFormatCodes: ['SET1-S:6NOAD'], // One set to 6 with deciding game at 5 games all
|
|
16923
16923
|
averageTimes: [{ categoryNames: [], minutes: { default: 30 } }],
|
|
16924
16924
|
},
|
|
16925
16925
|
{
|
|
@@ -16932,11 +16932,11 @@ var POLICY_SCHEDULING_DEFAULT = (_a$9 = {},
|
|
|
16932
16932
|
averageTimes: [{ categoryNames: [], minutes: { default: 20 } }],
|
|
16933
16933
|
},
|
|
16934
16934
|
{
|
|
16935
|
-
matchUpFormatCodes: ['SET1-S:4NOAD'],
|
|
16935
|
+
matchUpFormatCodes: ['SET1-S:4NOAD'], // One short set to 4, deciding game is played at 3 games all
|
|
16936
16936
|
averageTimes: [{ categoryNames: [], minutes: { default: 20 } }],
|
|
16937
16937
|
},
|
|
16938
16938
|
{
|
|
16939
|
-
matchUpFormatCodes: ['SET1-S:TB10'],
|
|
16939
|
+
matchUpFormatCodes: ['SET1-S:TB10'], // One 10-point tiebreak game
|
|
16940
16940
|
averageTimes: [{ categoryNames: [], minutes: { default: 10 } }],
|
|
16941
16941
|
},
|
|
16942
16942
|
],
|
|
@@ -16997,7 +16997,7 @@ var POLICY_SCHEDULING_DEFAULT = (_a$9 = {},
|
|
|
16997
16997
|
],
|
|
16998
16998
|
},
|
|
16999
16999
|
{
|
|
17000
|
-
matchUpFormatCodes: ['SET1-S:4/TB5@3'],
|
|
17000
|
+
matchUpFormatCodes: ['SET1-S:4/TB5@3'], // One short set to 4, 5-point tiebreak at 3 games all
|
|
17001
17001
|
recoveryTimes: [
|
|
17002
17002
|
{
|
|
17003
17003
|
categoryTypes: [ADULT, JUNIOR],
|
|
@@ -17010,7 +17010,7 @@ var POLICY_SCHEDULING_DEFAULT = (_a$9 = {},
|
|
|
17010
17010
|
],
|
|
17011
17011
|
},
|
|
17012
17012
|
{
|
|
17013
|
-
matchUpFormatCodes: ['SET1-S:TB10'],
|
|
17013
|
+
matchUpFormatCodes: ['SET1-S:TB10'], // One 10-point tiebreak game
|
|
17014
17014
|
recoveryTimes: [
|
|
17015
17015
|
{
|
|
17016
17016
|
categoryNames: [],
|
|
@@ -18122,7 +18122,7 @@ function addFinishingRounds(_a) {
|
|
|
18122
18122
|
if (!validMatchUps(matchUps))
|
|
18123
18123
|
return [];
|
|
18124
18124
|
var _d = getRoundMatchUps$1({
|
|
18125
|
-
interpolate: true,
|
|
18125
|
+
interpolate: true, // for structures which do not contain a final round of one matchUps (structure winner)
|
|
18126
18126
|
matchUps: matchUps,
|
|
18127
18127
|
}), roundProfile = _d.roundProfile, _e = _d.roundNumbers, roundNumbers = _e === void 0 ? [] : _e;
|
|
18128
18128
|
roundsCount = roundsCount || Math.max.apply(Math, __spreadArray(__spreadArray([], __read(roundNumbers), false), [0], false));
|
|
@@ -19080,7 +19080,7 @@ var baseAttributeKeys = [
|
|
|
19080
19080
|
'tieMatchUps',
|
|
19081
19081
|
'roundPosition',
|
|
19082
19082
|
'score',
|
|
19083
|
-
'sides',
|
|
19083
|
+
'sides', // can be removed only if drawPositions is present and is not a TEAM matchUp
|
|
19084
19084
|
'winnerMatchUpId',
|
|
19085
19085
|
'loserMatchUpId',
|
|
19086
19086
|
'matchUpDuration',
|
|
@@ -21586,8 +21586,8 @@ function tidyScore(params) {
|
|
|
21586
21586
|
var doProcess = function (methods) {
|
|
21587
21587
|
methods.forEach(function (method) {
|
|
21588
21588
|
result = transforms[method]({
|
|
21589
|
-
profile: profile,
|
|
21590
|
-
identifier: identifier,
|
|
21589
|
+
profile: profile, // config object compatible with provider profiles
|
|
21590
|
+
identifier: identifier, // optional identifier (used in test harness)
|
|
21591
21591
|
matchUpStatus: matchUpStatus,
|
|
21592
21592
|
attributes: attributes,
|
|
21593
21593
|
applied: applied,
|
|
@@ -25716,7 +25716,7 @@ function roundRobinMatchUps(_a) {
|
|
|
25716
25716
|
matchUpStatus: roundNumber
|
|
25717
25717
|
? MatchUpStatusEnum.ToBePlayed
|
|
25718
25718
|
: MatchUpStatusEnum.Bye,
|
|
25719
|
-
matchUpType: matchUpType,
|
|
25719
|
+
matchUpType: matchUpType, // does not (perhaps) need to be included; but because structures[].structure unsure about derivation inContext
|
|
25720
25720
|
// finishingPositionRange in RR is not very useful, but provided for consistency
|
|
25721
25721
|
finishingPositionRange: { winner: range, loser: range },
|
|
25722
25722
|
drawPositions: drawPositions,
|
|
@@ -28047,7 +28047,7 @@ function setMatchUpStatus$2(params) {
|
|
|
28047
28047
|
var matchUpTieId = inContextMatchUp === null || inContextMatchUp === void 0 ? void 0 : inContextMatchUp.matchUpTieId;
|
|
28048
28048
|
// Get winner/loser position targets ----------------------------------------
|
|
28049
28049
|
var targetData = positionTargets({
|
|
28050
|
-
matchUpId: matchUpTieId || matchUpId,
|
|
28050
|
+
matchUpId: matchUpTieId || matchUpId, // get targets for TEAM matchUp if tieMatchUp
|
|
28051
28051
|
inContextDrawMatchUps: inContextDrawMatchUps,
|
|
28052
28052
|
drawDefinition: drawDefinition,
|
|
28053
28053
|
});
|
|
@@ -28755,7 +28755,7 @@ function addDrawDefinition$1(params) {
|
|
|
28755
28755
|
else {
|
|
28756
28756
|
var flights = (flightProfile === null || flightProfile === void 0 ? void 0 : flightProfile.flights) || [];
|
|
28757
28757
|
flights.push({
|
|
28758
|
-
manuallyAdded: true,
|
|
28758
|
+
manuallyAdded: true, // this drawDefinition was not part of automated split
|
|
28759
28759
|
flightNumber: drawOrder,
|
|
28760
28760
|
drawEntries: drawEntries,
|
|
28761
28761
|
drawName: drawName,
|
|
@@ -29101,7 +29101,7 @@ function getEventPublishStatuses(_a) {
|
|
|
29101
29101
|
if ((_b = timeItem === null || timeItem === void 0 ? void 0 : timeItem.itemValue) === null || _b === void 0 ? void 0 : _b.PUBLIC) {
|
|
29102
29102
|
var _c = timeItem.itemValue.PUBLIC || {}, _d = _c.drawIds, publishedDrawIds = _d === void 0 ? [] : _d, seeding = _c.seeding;
|
|
29103
29103
|
var publishedSeeding = {
|
|
29104
|
-
published: undefined,
|
|
29104
|
+
published: undefined, // seeding can be present for all entries in an event when no flights have been defined
|
|
29105
29105
|
seedingScaleNames: [],
|
|
29106
29106
|
drawIds: [], // seeding can be specific to drawIds
|
|
29107
29107
|
};
|
|
@@ -33210,7 +33210,7 @@ var competitionGovernor = {
|
|
|
33210
33210
|
unlinkTournament: unlinkTournament,
|
|
33211
33211
|
unlinkTournaments: unlinkTournaments,
|
|
33212
33212
|
getLinkedTournamentIds: getLinkedTournamentIds,
|
|
33213
|
-
addDrawDefinition: addDrawDefinition,
|
|
33213
|
+
addDrawDefinition: addDrawDefinition, // test
|
|
33214
33214
|
getCompetitionParticipants: getCompetitionParticipants,
|
|
33215
33215
|
getParticipants: getParticipants,
|
|
33216
33216
|
addParticipant: addParticipant,
|
|
@@ -33218,10 +33218,10 @@ var competitionGovernor = {
|
|
|
33218
33218
|
setMatchUpStatus: setMatchUpStatus,
|
|
33219
33219
|
bulkMatchUpStatusUpdate: bulkMatchUpStatusUpdate,
|
|
33220
33220
|
bulkScheduleMatchUps: bulkScheduleMatchUps,
|
|
33221
|
-
addPenalty: addPenalty,
|
|
33222
|
-
removePenalty: removePenalty,
|
|
33223
|
-
modifyPenalty: modifyPenalty,
|
|
33224
|
-
getCompetitionPenalties: getCompetitionPenalties,
|
|
33221
|
+
addPenalty: addPenalty, // test
|
|
33222
|
+
removePenalty: removePenalty, // test
|
|
33223
|
+
modifyPenalty: modifyPenalty, // test
|
|
33224
|
+
getCompetitionPenalties: getCompetitionPenalties, // test
|
|
33225
33225
|
findParticipant: publicFindParticipant,
|
|
33226
33226
|
};
|
|
33227
33227
|
|
|
@@ -34522,8 +34522,8 @@ function competitionScheduleMatchUps(params) {
|
|
|
34522
34522
|
courtsData: courtsData,
|
|
34523
34523
|
completedMatchUps: alwaysReturnCompleted
|
|
34524
34524
|
? allCompletedMatchUps
|
|
34525
|
-
: completedMatchUps,
|
|
34526
|
-
dateMatchUps: dateMatchUps,
|
|
34525
|
+
: completedMatchUps, // completed matchUps for the filter date
|
|
34526
|
+
dateMatchUps: dateMatchUps, // all incomplete matchUps for the filter date
|
|
34527
34527
|
venues: venues,
|
|
34528
34528
|
};
|
|
34529
34529
|
if (withCourtGridRows) {
|
|
@@ -34677,7 +34677,7 @@ function calculateScheduleTimes(_a) {
|
|
|
34677
34677
|
// need to reduce courts available for a given time period by the number of matchUps scheduled at a given venue
|
|
34678
34678
|
var matchUpFilters = { scheduledDate: scheduleDate, venueIds: venueIds };
|
|
34679
34679
|
var matchUpsWithSchedule = competitionScheduleMatchUps({
|
|
34680
|
-
sortDateMatchUps: false,
|
|
34680
|
+
sortDateMatchUps: false, // unnecessary for extracting bookings; reduce processing overhead;
|
|
34681
34681
|
tournamentRecords: tournamentRecords,
|
|
34682
34682
|
matchUpFilters: matchUpFilters,
|
|
34683
34683
|
});
|
|
@@ -34797,8 +34797,8 @@ function checkParticipantProfileInitialization(_a) {
|
|
|
34797
34797
|
typeChangeTimeAfterRecovery: undefined,
|
|
34798
34798
|
timeAfterRecovery: undefined,
|
|
34799
34799
|
priorMatchUpType: undefined,
|
|
34800
|
-
potentialRecovery: {},
|
|
34801
|
-
potentialCounted: {},
|
|
34800
|
+
potentialRecovery: {}, // { [drawId]: [timeString] } - timeAfterRecovery for potential matchUps by drawId
|
|
34801
|
+
potentialCounted: {}, // whether a potential matchUp has been counted for daily limits for a specific drawId
|
|
34802
34802
|
potentialBookings: {},
|
|
34803
34803
|
bookings: [],
|
|
34804
34804
|
counters: {},
|
|
@@ -35406,7 +35406,7 @@ function getVenueSchedulingDetails(_a) {
|
|
|
35406
35406
|
}), matchUpsToSchedule = _g.matchUpsToSchedule, matchUpMap = _g.matchUpMap;
|
|
35407
35407
|
var venueCourts = courts.filter(function (court) { return court.venueId === venueId; });
|
|
35408
35408
|
venueScheduledRoundDetails[venueId] = {
|
|
35409
|
-
previousRemainingScheduleTimes: [],
|
|
35409
|
+
previousRemainingScheduleTimes: [], // keep track of sheduleTimes not used on previous iteration
|
|
35410
35410
|
courtsCount: venueCourts.length,
|
|
35411
35411
|
greatestAverageMinutes: greatestAverageMinutes,
|
|
35412
35412
|
scheduledRoundsDetails: scheduledRoundsDetails,
|
|
@@ -37671,10 +37671,10 @@ function getRoundId(obj) {
|
|
|
37671
37671
|
var relevantStructureId = isRoundRobin ? containerStructureId : structureId;
|
|
37672
37672
|
// retain order
|
|
37673
37673
|
var id = [
|
|
37674
|
-
tournamentId,
|
|
37675
|
-
eventId,
|
|
37676
|
-
drawId,
|
|
37677
|
-
relevantStructureId,
|
|
37674
|
+
tournamentId, // 1
|
|
37675
|
+
eventId, // 2
|
|
37676
|
+
drawId, // 3
|
|
37677
|
+
relevantStructureId, // 4
|
|
37678
37678
|
roundNumber, // 5
|
|
37679
37679
|
].join('|');
|
|
37680
37680
|
return definedAttributes({
|
|
@@ -38827,7 +38827,7 @@ var scheduleGovernor$1 = {
|
|
|
38827
38827
|
getMatchUpFormatTimingUpdate: getMatchUpFormatTimingUpdate$1,
|
|
38828
38828
|
getEventMatchUpFormatTiming: getEventMatchUpFormatTiming,
|
|
38829
38829
|
removeEventMatchUpFormatTiming: removeEventMatchUpFormatTiming,
|
|
38830
|
-
getMatchUpDailyLimitsUpdate: getMatchUpDailyLimitsUpdate$1,
|
|
38830
|
+
getMatchUpDailyLimitsUpdate: getMatchUpDailyLimitsUpdate$1, // document
|
|
38831
38831
|
getMatchUpDailyLimits: getMatchUpDailyLimits,
|
|
38832
38832
|
setMatchUpDailyLimits: setMatchUpDailyLimits,
|
|
38833
38833
|
getProfileRounds: getProfileRounds,
|
|
@@ -38835,7 +38835,7 @@ var scheduleGovernor$1 = {
|
|
|
38835
38835
|
assignMatchUpVenue: assignMatchUpVenue,
|
|
38836
38836
|
assignMatchUpCourt: assignMatchUpCourt,
|
|
38837
38837
|
allocateTeamMatchUpCourts: allocateTeamMatchUpCourts,
|
|
38838
|
-
addMatchUpScheduleItems: addMatchUpScheduleItems,
|
|
38838
|
+
addMatchUpScheduleItems: addMatchUpScheduleItems, // test
|
|
38839
38839
|
addMatchUpScheduledDate: addMatchUpScheduledDate,
|
|
38840
38840
|
addMatchUpScheduledTime: addMatchUpScheduledTime,
|
|
38841
38841
|
addMatchUpCourtOrder: addMatchUpCourtOrder,
|
|
@@ -38843,7 +38843,7 @@ var scheduleGovernor$1 = {
|
|
|
38843
38843
|
addMatchUpStopTime: addMatchUpStopTime,
|
|
38844
38844
|
addMatchUpResumeTime: addMatchUpResumeTime,
|
|
38845
38845
|
addMatchUpEndTime: addMatchUpEndTime,
|
|
38846
|
-
addMatchUpOfficial: addMatchUpOfficial,
|
|
38846
|
+
addMatchUpOfficial: addMatchUpOfficial, // test
|
|
38847
38847
|
getSchedulingProfile: getSchedulingProfile$1,
|
|
38848
38848
|
setSchedulingProfile: setSchedulingProfile$1,
|
|
38849
38849
|
addSchedulingProfileRound: addSchedulingProfileRound,
|
|
@@ -39235,14 +39235,14 @@ var POLICY_MATCHUP_ACTIONS_DEFAULT = (_a$2 = {},
|
|
|
39235
39235
|
// enabledStructures: [] => all structures are enabled
|
|
39236
39236
|
enabledStructures: [
|
|
39237
39237
|
{
|
|
39238
|
-
stages: [],
|
|
39239
|
-
stageSequences: [],
|
|
39238
|
+
stages: [], // stages: [] => applies to all stages
|
|
39239
|
+
stageSequences: [], // stageSequences: [] => applies to all stageSequences
|
|
39240
39240
|
enabledActions: [],
|
|
39241
39241
|
disabledActions: [], // disabledActions: [] => no actions are disabled
|
|
39242
39242
|
},
|
|
39243
39243
|
],
|
|
39244
39244
|
participants: {
|
|
39245
|
-
enforceCategory: true,
|
|
39245
|
+
enforceCategory: true, // validate collectionDefinition.category against event.category
|
|
39246
39246
|
enforceGender: true, // disallow placing FEMALEs in MALE events and vice versa
|
|
39247
39247
|
},
|
|
39248
39248
|
processCodes: {
|
|
@@ -39628,7 +39628,7 @@ function matchUpActions$2(_a) {
|
|
|
39628
39628
|
};
|
|
39629
39629
|
validActions.push({
|
|
39630
39630
|
info: 'set outcome and winningSide',
|
|
39631
|
-
method: SCHEDULE_METHOD,
|
|
39631
|
+
method: SCHEDULE_METHOD, // setMatchUpStatus
|
|
39632
39632
|
type: SCORE,
|
|
39633
39633
|
payload: payload,
|
|
39634
39634
|
});
|
|
@@ -41921,7 +41921,7 @@ function generateQualifyingLink(_a) {
|
|
|
41921
41921
|
finishingPositions: finishingPositions,
|
|
41922
41922
|
},
|
|
41923
41923
|
target: {
|
|
41924
|
-
feedProfile: DRAW,
|
|
41924
|
+
feedProfile: DRAW, // positions are not automatically placed
|
|
41925
41925
|
roundNumber: targetEntryRound,
|
|
41926
41926
|
structureId: targetStructureId,
|
|
41927
41927
|
},
|
|
@@ -42139,7 +42139,7 @@ function generateQualifyingStructures(_a) {
|
|
|
42139
42139
|
matchUpFormat: matchUpFormat,
|
|
42140
42140
|
stageSequence: stageSequence,
|
|
42141
42141
|
matchUpType: matchUpType,
|
|
42142
|
-
roundLimit: roundLimit,
|
|
42142
|
+
roundLimit: roundLimit, // redundant
|
|
42143
42143
|
matchUps: matchUps,
|
|
42144
42144
|
});
|
|
42145
42145
|
if (roundTarget) {
|
|
@@ -42450,7 +42450,7 @@ function getAvailablePlayoffProfiles$1(_a) {
|
|
|
42450
42450
|
else {
|
|
42451
42451
|
return {
|
|
42452
42452
|
availablePlayoffProfiles: Object.values(available),
|
|
42453
|
-
availablePlayoffRounds: Object.values(available),
|
|
42453
|
+
availablePlayoffRounds: Object.values(available), // to be deprecated
|
|
42454
42454
|
positionsPlayedOff: positionsPlayedOff,
|
|
42455
42455
|
};
|
|
42456
42456
|
}
|
|
@@ -47248,7 +47248,7 @@ function generateQualifyingStructure$1(params) {
|
|
|
47248
47248
|
matchUpFormat: matchUpFormat,
|
|
47249
47249
|
stageSequence: stageSequence,
|
|
47250
47250
|
matchUpType: matchUpType,
|
|
47251
|
-
roundLimit: roundLimit,
|
|
47251
|
+
roundLimit: roundLimit, // redundant
|
|
47252
47252
|
matchUps: matchUps,
|
|
47253
47253
|
});
|
|
47254
47254
|
if (roundTarget) {
|
|
@@ -48144,7 +48144,7 @@ var structureGovernor = {
|
|
|
48144
48144
|
generateQualifyingStructure: generateQualifyingStructure$1,
|
|
48145
48145
|
attachQualifyingStructure: attachQualifyingStructure$1,
|
|
48146
48146
|
addQualifyingStructure: addQualifyingStructure$1,
|
|
48147
|
-
getAvailablePlayoffRounds: getAvailablePlayoffProfiles$1,
|
|
48147
|
+
getAvailablePlayoffRounds: getAvailablePlayoffProfiles$1, // to be deprecated,
|
|
48148
48148
|
getAvailablePlayoffProfiles: getAvailablePlayoffProfiles$1,
|
|
48149
48149
|
getSourceRounds: getSourceRounds,
|
|
48150
48150
|
getDrawStructures: getDrawStructures,
|
|
@@ -48157,7 +48157,7 @@ var structureGovernor = {
|
|
|
48157
48157
|
addVoluntaryConsolationStage: addVoluntaryConsolationStage$1,
|
|
48158
48158
|
addVoluntaryConsolationStructure: addVoluntaryConsolationStructure$1,
|
|
48159
48159
|
generateVoluntaryConsolation: generateVoluntaryConsolation$1,
|
|
48160
|
-
buildDrawHierarchy: buildDrawHierarchy,
|
|
48160
|
+
buildDrawHierarchy: buildDrawHierarchy, // obsolete
|
|
48161
48161
|
generateDrawTypeAndModifyDrawDefinition: generateDrawTypeAndModifyDrawDefinition$1,
|
|
48162
48162
|
generateDrawStructuresAndLinks: generateDrawStructuresAndLinks$1,
|
|
48163
48163
|
};
|
|
@@ -49551,7 +49551,7 @@ function addEventEntries(params) {
|
|
|
49551
49551
|
removedEntries.push.apply(removedEntries, __spreadArray([], __read(ungroupedParticipantIdsToRemove), false));
|
|
49552
49552
|
removeEventEntries({
|
|
49553
49553
|
participantIds: ungroupedParticipantIdsToRemove,
|
|
49554
|
-
autoEntryPositions: false,
|
|
49554
|
+
autoEntryPositions: false, // because the method will be called below if necessary
|
|
49555
49555
|
event: event,
|
|
49556
49556
|
});
|
|
49557
49557
|
}
|
|
@@ -52169,16 +52169,16 @@ function getValidQualifiersAction(_a) {
|
|
|
52169
52169
|
// disallow placing qualifiers until source structure is completed
|
|
52170
52170
|
var requireCompletedStructures = policy === null || policy === void 0 ? void 0 : policy.requireCompletedStructures;
|
|
52171
52171
|
var _h = getSourceStructureIdsAndRelevantLinks({
|
|
52172
|
-
targetRoundNumber: targetRoundNumber,
|
|
52173
|
-
linkType: WINNER,
|
|
52172
|
+
targetRoundNumber: targetRoundNumber, // look for soure structrues targeting roundNumber
|
|
52173
|
+
linkType: WINNER, // WINNER of qualifying structures will traverse link
|
|
52174
52174
|
drawDefinition: drawDefinition,
|
|
52175
52175
|
structureId: structureId,
|
|
52176
52176
|
}) || {}, eliminationSoureStructureIds = _h.sourceStructureIds, eliminationSourceLinks = _h.relevantLinks;
|
|
52177
52177
|
if (eliminationSoureStructureIds === null || eliminationSoureStructureIds === void 0 ? void 0 : eliminationSoureStructureIds.length)
|
|
52178
52178
|
sourceStructureIds.push.apply(sourceStructureIds, __spreadArray([], __read(eliminationSoureStructureIds), false));
|
|
52179
52179
|
var _j = getSourceStructureIdsAndRelevantLinks({
|
|
52180
|
-
targetRoundNumber: targetRoundNumber,
|
|
52181
|
-
linkType: POSITION,
|
|
52180
|
+
targetRoundNumber: targetRoundNumber, // look for soure structrues targeting roundNumber
|
|
52181
|
+
linkType: POSITION, // link will define how many finishingPositions traverse the link
|
|
52182
52182
|
drawDefinition: drawDefinition,
|
|
52183
52183
|
structureId: structureId,
|
|
52184
52184
|
}) || {}, roundRobinSourceStructureIds = _j.sourceStructureIds, roundRobinSourceLinks = _j.relevantLinks;
|
|
@@ -52307,7 +52307,7 @@ function getValidQualifiersAction(_a) {
|
|
|
52307
52307
|
if (qualifyingParticipantIds.length) {
|
|
52308
52308
|
validAssignmentActions.push(definedAttributes({
|
|
52309
52309
|
payload: {
|
|
52310
|
-
qualifyingParticipantId: undefined,
|
|
52310
|
+
qualifyingParticipantId: undefined, // to be provided by client
|
|
52311
52311
|
drawPosition: drawPosition,
|
|
52312
52312
|
structureId: structureId,
|
|
52313
52313
|
drawId: drawId,
|
|
@@ -54969,7 +54969,7 @@ function addParticipantContext(params) {
|
|
|
54969
54969
|
if ((event === null || event === void 0 ? void 0 : event.eventType) === TEAM$2) {
|
|
54970
54970
|
// add back lineUps extension for team resolution when { matchUpType: TEAM } is missing side.lineUps
|
|
54971
54971
|
var extension = findExtension$2({
|
|
54972
|
-
element: rawEvent.drawDefinitions[i],
|
|
54972
|
+
element: rawEvent.drawDefinitions[i], // rawEvent because deepCopy has converted extensions
|
|
54973
54973
|
name: LINEUPS,
|
|
54974
54974
|
}).extension;
|
|
54975
54975
|
if (extension)
|
|
@@ -54989,7 +54989,7 @@ function addParticipantContext(params) {
|
|
|
54989
54989
|
if ((_c = timeItem === null || timeItem === void 0 ? void 0 : timeItem.itemValue) === null || _c === void 0 ? void 0 : _c.PUBLIC) {
|
|
54990
54990
|
var _h = timeItem.itemValue.PUBLIC || {}, _j = _h.drawIds, publishedDrawIds = _j === void 0 ? [] : _j, seeding = _h.seeding;
|
|
54991
54991
|
var publishedSeeding = {
|
|
54992
|
-
published: undefined,
|
|
54992
|
+
published: undefined, // seeding can be present for all entries in an event when no flights have been defined
|
|
54993
54993
|
seedingScaleNames: [],
|
|
54994
54994
|
drawIds: [], // seeding can be specific to drawIds
|
|
54995
54995
|
};
|
|
@@ -58752,9 +58752,9 @@ function analyzeDraws(_a) {
|
|
|
58752
58752
|
if (!tournamentRecord)
|
|
58753
58753
|
return { error: MISSING_TOURNAMENT_RECORD };
|
|
58754
58754
|
var drawsAnalysis = {
|
|
58755
|
-
positionsNoOutcomes: [],
|
|
58756
|
-
canBePruned: [],
|
|
58757
|
-
matchPlay: [],
|
|
58755
|
+
positionsNoOutcomes: [], // all positions assigned and no outcomes
|
|
58756
|
+
canBePruned: [], // partially assigned positions with outcomes => drawSizes can be reduced
|
|
58757
|
+
matchPlay: [], // only first round has active matchUps; some unassigned positions
|
|
58758
58758
|
inactive: [],
|
|
58759
58759
|
drawAnalysis: {},
|
|
58760
58760
|
};
|
|
@@ -59293,9 +59293,9 @@ var scheduleGovernor = {
|
|
|
59293
59293
|
removeEventMatchUpFormatTiming: removeEventMatchUpFormatTiming$1,
|
|
59294
59294
|
getMatchUpFormatTimingUpdate: getMatchUpFormatTimingUpdate,
|
|
59295
59295
|
getMatchUpDependencies: getMatchUpDependencies,
|
|
59296
|
-
getMatchUpDailyLimits: getMatchUpDailyLimits$1,
|
|
59297
|
-
setMatchUpDailyLimits: setMatchUpDailyLimits$1,
|
|
59298
|
-
getMatchUpDailyLimitsUpdate: getMatchUpDailyLimitsUpdate,
|
|
59296
|
+
getMatchUpDailyLimits: getMatchUpDailyLimits$1, // document
|
|
59297
|
+
setMatchUpDailyLimits: setMatchUpDailyLimits$1, // document
|
|
59298
|
+
getMatchUpDailyLimitsUpdate: getMatchUpDailyLimitsUpdate, // document
|
|
59299
59299
|
validateSchedulingProfile: validateSchedulingProfile,
|
|
59300
59300
|
setSchedulingProfile: setSchedulingProfile,
|
|
59301
59301
|
getSchedulingProfile: getSchedulingProfile,
|
|
@@ -59402,7 +59402,7 @@ function getEntryStatusReports(_a) {
|
|
|
59402
59402
|
var tournamentId = tournamentRecord.tournamentId;
|
|
59403
59403
|
var participantMap = getParticipants$1({
|
|
59404
59404
|
withScaleValues: true,
|
|
59405
|
-
withEvents: true,
|
|
59405
|
+
withEvents: true, // so that event rankings will be present
|
|
59406
59406
|
withSeeding: true,
|
|
59407
59407
|
tournamentRecord: tournamentRecord,
|
|
59408
59408
|
withDraws: true,
|
|
@@ -59757,18 +59757,19 @@ function getParticipantStats(_a) {
|
|
|
59757
59757
|
if (teamParticipantId) {
|
|
59758
59758
|
var processForTeam = !opponentParticipantId ||
|
|
59759
59759
|
sides.every(function (side) {
|
|
59760
|
-
side.participant &&
|
|
59760
|
+
return (side.participant &&
|
|
59761
59761
|
(getCompetitorIds({
|
|
59762
|
-
side: side,
|
|
59763
59762
|
individualParticipantIds: teamMap.get(teamParticipantId),
|
|
59763
|
+
side: side,
|
|
59764
59764
|
}) ||
|
|
59765
59765
|
getCompetitorIds({
|
|
59766
|
-
side: side,
|
|
59767
59766
|
individualParticipantIds: teamMap.get(opponentParticipantId),
|
|
59768
|
-
|
|
59767
|
+
side: side,
|
|
59768
|
+
})));
|
|
59769
59769
|
});
|
|
59770
|
-
if (processForTeam)
|
|
59770
|
+
if (processForTeam) {
|
|
59771
59771
|
processSides(teamParticipantId, teamMap.get(teamParticipantId));
|
|
59772
|
+
}
|
|
59772
59773
|
}
|
|
59773
59774
|
else {
|
|
59774
59775
|
try {
|
|
@@ -62493,7 +62494,7 @@ function setEntryPositions(_a) {
|
|
|
62493
62494
|
var positioning = entryPositions_1_1.value;
|
|
62494
62495
|
var participantId = positioning.participantId, entryPosition = positioning.entryPosition;
|
|
62495
62496
|
var result = setEntryPosition({
|
|
62496
|
-
skipRefresh: true,
|
|
62497
|
+
skipRefresh: true, // avoid redundant processing
|
|
62497
62498
|
tournamentRecord: tournamentRecord,
|
|
62498
62499
|
drawDefinition: drawDefinition,
|
|
62499
62500
|
participantId: participantId,
|
|
@@ -65033,7 +65034,7 @@ var eventGovernor = {
|
|
|
65033
65034
|
addDrawEntries: addDrawEntries,
|
|
65034
65035
|
removeSeeding: removeSeeding,
|
|
65035
65036
|
autoSeeding: autoSeeding,
|
|
65036
|
-
getAvailablePlayoffRounds: getAvailablePlayoffProfiles,
|
|
65037
|
+
getAvailablePlayoffRounds: getAvailablePlayoffProfiles, // to be deprecated
|
|
65037
65038
|
getAvailablePlayoffProfiles: getAvailablePlayoffProfiles,
|
|
65038
65039
|
getAssignedParticipantIds: getAssignedParticipantIds,
|
|
65039
65040
|
deleteDrawDefinitions: deleteDrawDefinitions,
|
|
@@ -66045,7 +66046,7 @@ function getEventProperties(_a) {
|
|
|
66045
66046
|
hasRatedParticipants = !!(hasRatedParticipants || rating);
|
|
66046
66047
|
return {
|
|
66047
66048
|
participantId: participantId,
|
|
66048
|
-
participantName: participantName || name,
|
|
66049
|
+
participantName: participantName || name, // support legacy
|
|
66049
66050
|
seed: seed,
|
|
66050
66051
|
ranking: ranking,
|
|
66051
66052
|
rating: rating,
|
|
@@ -67034,10 +67035,10 @@ function kSet(maxCountables, counted) {
|
|
|
67034
67035
|
return isNaN(kset) ? eloConfig.kDefault() : kset;
|
|
67035
67036
|
}
|
|
67036
67037
|
var eloConfig = {
|
|
67037
|
-
nSpread: 400,
|
|
67038
|
+
nSpread: 400, // determines the 'spread' of the scale
|
|
67038
67039
|
diffThreshold: 0.125,
|
|
67039
|
-
kCalc: k538,
|
|
67040
|
-
kMultiplier: kSet,
|
|
67040
|
+
kCalc: k538, // use calculation defined by FiveThirtyEight.com
|
|
67041
|
+
kMultiplier: kSet, // change to kDefault for value of 1
|
|
67041
67042
|
kDefault: kDefault,
|
|
67042
67043
|
};
|
|
67043
67044
|
function calculateNewRatings(params) {
|
|
@@ -68665,7 +68666,7 @@ function anonymizeTournamentRecord(_a) {
|
|
|
68665
68666
|
var _b;
|
|
68666
68667
|
return (_a = {},
|
|
68667
68668
|
_a[gender] = ((_b = generatePersons({
|
|
68668
|
-
category: { ageCategoryCode: 'O18' },
|
|
68669
|
+
category: { ageCategoryCode: 'O18' }, // ageCategoryCode is unimportant since birthYear will be replaced
|
|
68669
68670
|
count: gendersCount[gender],
|
|
68670
68671
|
addressProps: { citiesCount: 10 },
|
|
68671
68672
|
personExtensions: [],
|