tods-competition-factory 2.2.25 → 2.2.27

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.2.25';
6
+ return '2.2.27';
7
7
  }
8
8
 
9
9
  const SINGLES_MATCHUP = 'SINGLES';
@@ -113,7 +113,7 @@ function stepRound(value, step) {
113
113
  function skewedDistribution(min, max, skew, step, significantDecimals = 2) {
114
114
  const u = 1 - Math.random();
115
115
  const v = 1 - Math.random();
116
- let num = Math.sqrt(-2.0 * Math.log(u)) * Math.cos(2.0 * Math.PI * v);
116
+ let num = Math.sqrt(-2 * Math.log(u)) * Math.cos(2.0 * Math.PI * v);
117
117
  num = num / 10.0 + 0.5;
118
118
  if (num > 1 || num < 0) {
119
119
  num = skewedDistribution(min, max, skew);
@@ -9559,12 +9559,6 @@ function venueAdd({ tournamentRecord, disableNotice, context, venue }) {
9559
9559
  addExtension({ element: venue, extension });
9560
9560
  }
9561
9561
  tournamentRecord.venues.push(venue);
9562
- if (!disableNotice) {
9563
- addNotice({
9564
- payload: { venue, tournamentId: tournamentRecord.tournamentId },
9565
- topic: ADD_VENUE,
9566
- });
9567
- }
9568
9562
  return { ...SUCCESS, venue: makeDeepCopy(venue) };
9569
9563
  }
9570
9564
  else {
@@ -11589,7 +11583,6 @@ function allEventMatchUps(params) {
11589
11583
  const hydratedParticipantResult = hydrateParticipants({
11590
11584
  participantsProfile,
11591
11585
  useParticipantMap,
11592
- policyDefinitions,
11593
11586
  tournamentRecord,
11594
11587
  contextProfile,
11595
11588
  inContext,
@@ -11644,7 +11637,6 @@ function allTournamentMatchUps(params) {
11644
11637
  ({ participants, participantMap } = hydrateParticipants({
11645
11638
  participantsProfile,
11646
11639
  useParticipantMap,
11647
- policyDefinitions,
11648
11640
  tournamentRecord,
11649
11641
  contextProfile,
11650
11642
  inContext,
@@ -11751,7 +11743,6 @@ function allDrawMatchUps(params) {
11751
11743
  } = hydrateParticipants({
11752
11744
  participantsProfile,
11753
11745
  useParticipantMap,
11754
- policyDefinitions,
11755
11746
  tournamentRecord,
11756
11747
  contextProfile,
11757
11748
  inContext,
@@ -18164,7 +18155,6 @@ function randomUnseededSeparation({ provisionalPositioning, unseededParticipantI
18164
18155
  const result = assignDrawPositionBye({
18165
18156
  tournamentRecord,
18166
18157
  drawDefinition,
18167
- seedBlockInfo,
18168
18158
  structureId,
18169
18159
  matchUpsMap,
18170
18160
  event,
@@ -18175,7 +18165,6 @@ function randomUnseededSeparation({ provisionalPositioning, unseededParticipantI
18175
18165
  }
18176
18166
  else if (assignment.participantId) {
18177
18167
  const result = assignDrawPosition$1({
18178
- automaticPlacement: true,
18179
18168
  inContextDrawMatchUps,
18180
18169
  tournamentRecord,
18181
18170
  drawDefinition,
@@ -18291,9 +18280,7 @@ function positionUnseededParticipants({ provisionalPositioning, inContextDrawMat
18291
18280
  matchUpsMap,
18292
18281
  structureId,
18293
18282
  avoidance,
18294
- drawSize,
18295
- entries,
18296
- });
18283
+ drawSize});
18297
18284
  }
18298
18285
  else {
18299
18286
  return randomUnseededDistribution({
@@ -18480,9 +18467,7 @@ function positionSeedBlock({ provisionalPositioning, inContextDrawMatchUps, tour
18480
18467
  drawDefinition,
18481
18468
  seedingProfile,
18482
18469
  seedBlockInfo,
18483
- structureId,
18484
- event,
18485
- });
18470
+ structureId});
18486
18471
  const { appliedPolicies } = getAppliedPolicies({ drawDefinition });
18487
18472
  const { avoidance } = appliedPolicies ?? {};
18488
18473
  if (avoidance && participants && unplacedSeedParticipantIds?.length > 2) ;
@@ -19266,7 +19251,32 @@ function getSourceStructureIdsAndRelevantLinks({ targetRoundNumber, finishingPos
19266
19251
  return { sourceStructureIds, relevantLinks };
19267
19252
  }
19268
19253
 
19269
- function qualifierProgression({ targetRoundNumber = 1, tournamentRecord, drawDefinition, event, }) {
19254
+ const mapNumbersToIndexes = (indexArray, randNumberArray) => {
19255
+ const uniqueRandomList = [...new Set(randNumberArray.slice(0, indexArray.length))];
19256
+ const sortedRandomList = [...uniqueRandomList].sort((a, b) => a - b);
19257
+ const usedIndexes = new Set();
19258
+ const mappedNumbersToIndexes = [];
19259
+ uniqueRandomList.forEach((item) => {
19260
+ const randNumberIndex = indexArray.indexOf(item);
19261
+ if (randNumberIndex !== -1 && !usedIndexes.has(randNumberIndex)) {
19262
+ mappedNumbersToIndexes.push(randNumberIndex);
19263
+ usedIndexes.add(randNumberIndex);
19264
+ }
19265
+ else {
19266
+ const sortedIndex = sortedRandomList.indexOf(item);
19267
+ let nextAvailableIndex = indexArray.findIndex((_, i) => !usedIndexes.has(i));
19268
+ while (usedIndexes.has(nextAvailableIndex) && nextAvailableIndex === -1 && usedIndexes.size < indexArray.length) {
19269
+ nextAvailableIndex = indexArray.findIndex((_, i) => !usedIndexes.has(i) && i > nextAvailableIndex);
19270
+ }
19271
+ mappedNumbersToIndexes.push(sortedIndex);
19272
+ usedIndexes.add(sortedIndex);
19273
+ }
19274
+ });
19275
+ const remainingIndexes = indexArray.filter((_, index) => !usedIndexes.has(index));
19276
+ return [...mappedNumbersToIndexes, ...remainingIndexes];
19277
+ };
19278
+
19279
+ function qualifierProgression({ targetRoundNumber = 1, tournamentRecord, drawDefinition, event, randomList, }) {
19270
19280
  const paramsCheck = checkRequiredParameters({ drawDefinition, event, tournamentRecord }, [
19271
19281
  { [DRAW_DEFINITION]: true, [EVENT]: true, [TOURNAMENT_RECORD]: true },
19272
19282
  ]);
@@ -19280,9 +19290,13 @@ function qualifierProgression({ targetRoundNumber = 1, tournamentRecord, drawDef
19280
19290
  const appliedPolicies = getAppliedPolicies({ tournamentRecord, drawDefinition, structure: mainStructure, event }).appliedPolicies ?? {};
19281
19291
  const policy = appliedPolicies[POLICY_TYPE_POSITION_ACTIONS];
19282
19292
  const requireCompletedStructures = policy?.requireCompletedStructures;
19283
- const { qualifierPositions, positionAssignments } = structureAssignedDrawPositions({ structure: mainStructure });
19293
+ const { qualifierPositions, positionAssignments, } = structureAssignedDrawPositions({ structure: mainStructure });
19284
19294
  if (!qualifierPositions.length)
19285
19295
  return decorateResult({ result: { error: NO_DRAW_POSITIONS_AVAILABLE_FOR_QUALIFIERS } });
19296
+ let qualifierPositionIndexes = generateRange(0, qualifierPositions.length);
19297
+ if (randomList) {
19298
+ qualifierPositionIndexes = mapNumbersToIndexes(qualifierPositionIndexes, randomList);
19299
+ }
19286
19300
  const assignedParticipantIds = positionAssignments.map((assignment) => assignment.participantId).filter(Boolean);
19287
19301
  const { relevantLinks: eliminationSourceLinks } = getSourceStructureIdsAndRelevantLinks({
19288
19302
  structureId: mainStructure.structureId,
@@ -19349,18 +19363,19 @@ function qualifierProgression({ targetRoundNumber = 1, tournamentRecord, drawDef
19349
19363
  }
19350
19364
  if (!qualifyingParticipantIds.length)
19351
19365
  return decorateResult({ result: { error: MISSING_QUALIFIED_PARTICIPANTS } });
19352
- qualifierPositions.forEach((position) => {
19353
- const randomParticipantId = randomPop(qualifyingParticipantIds);
19354
- if (randomParticipantId) {
19366
+ qualifierPositionIndexes.forEach((positionIndex, index) => {
19367
+ const participantToAssign = qualifyingParticipantIds[index];
19368
+ const drawPosition = qualifierPositions[positionIndex].drawPosition;
19369
+ if (participantToAssign) {
19355
19370
  const positionAssignmentResult = qualifierDrawPositionAssignment({
19356
- qualifyingParticipantId: randomParticipantId,
19371
+ qualifyingParticipantId: participantToAssign,
19357
19372
  structureId: mainStructure.structureId,
19358
- drawPosition: position.drawPosition,
19373
+ drawPosition,
19359
19374
  tournamentRecord,
19360
19375
  drawDefinition,
19361
19376
  });
19362
19377
  positionAssignmentResult?.success &&
19363
- assignedParticipants.push({ participantId: randomParticipantId, drawPosition: position.drawPosition });
19378
+ assignedParticipants.push({ participantId: participantToAssign, drawPosition });
19364
19379
  }
19365
19380
  });
19366
19381
  return decorateResult({
@@ -19839,12 +19854,6 @@ function setStageQualifiersCount({ qualifiersCount = 0, drawDefinition, stage })
19839
19854
  if (!stageExists({ drawDefinition, stage })) {
19840
19855
  return { error: INVALID_STAGE };
19841
19856
  }
19842
- if (stage !== MAIN) {
19843
- return {
19844
- error: DRAW_SIZE_MISMATCH,
19845
- info: 'qualifiersCount can only be set for main stage',
19846
- };
19847
- }
19848
19857
  modifyEntryProfile({
19849
19858
  attributes: [{ [stage]: { qualifiersCount } }],
19850
19859
  drawDefinition,
@@ -21723,7 +21732,6 @@ function generateAndPopulateRRplayoffStructures(params) {
21723
21732
  sourceStructureId,
21724
21733
  playoffGroups,
21725
21734
  groupCount,
21726
- groupSize,
21727
21735
  ...params,
21728
21736
  });
21729
21737
  if (processResult.error)
@@ -22084,7 +22092,7 @@ function calculatePercentages({ participantResults, groupingTotal, matchUpFormat
22084
22092
  const setsLost = participantResults[participantId].setsLost;
22085
22093
  const setsTotal = tallyPolicy?.groupTotalSetsPlayed || groupingTotal === 'setsPct'
22086
22094
  ? totalSets
22087
- : perPlayer * (bracketSetsToWin || 0) || setsWon + setsLost;
22095
+ : perPlayer * (bracketSetsToWin) || setsWon + setsLost;
22088
22096
  let setsPct = Math.round((setsWon / setsTotal) * precision) / precision;
22089
22097
  if (setsPct === Infinity || isNaN(setsPct))
22090
22098
  setsPct = setsTotal;
@@ -22102,7 +22110,7 @@ function calculatePercentages({ participantResults, groupingTotal, matchUpFormat
22102
22110
  matchUpsPct = matchUpsWon;
22103
22111
  const gamesWon = participantResults[participantId].gamesWon || 0;
22104
22112
  const gamesLost = participantResults[participantId].gamesLost || 0;
22105
- const minimumExpectedGames = (perPlayer || 0) * (bracketSetsToWin || 0) * (bracketGamesForSet || 0);
22113
+ const minimumExpectedGames = (perPlayer || 0) * (bracketSetsToWin) * (bracketGamesForSet || 0);
22106
22114
  const gamesTotal = tallyPolicy?.groupTotalGamesPlayed || groupingTotal === 'gamesPct'
22107
22115
  ? totalGames
22108
22116
  : Math.max(minimumExpectedGames, gamesWon + gamesLost);
@@ -23199,7 +23207,6 @@ function attemptToModifyScore(params) {
23199
23207
  ...params,
23200
23208
  matchUpStatusCodes: (matchUpStatusIsValid && matchUpStatusCodes) || [],
23201
23209
  matchUpStatus: updatedMatchUpStatus,
23202
- context: stack,
23203
23210
  removeScore,
23204
23211
  });
23205
23212
  return decorateResult({ result, stack });
@@ -24005,7 +24012,6 @@ function directParticipants(params) {
24005
24012
  const result = directLoser({
24006
24013
  sourceMatchUpStatus: (matchUpStatusIsValid && matchUpStatus) || COMPLETED$1,
24007
24014
  loserMatchUpDrawPositionIndex,
24008
- sourceMatchUpId: matchUpId,
24009
24015
  inContextDrawMatchUps,
24010
24016
  projectedWinningSide,
24011
24017
  loserDrawPosition,
@@ -24013,7 +24019,6 @@ function directParticipants(params) {
24013
24019
  loserTargetLink,
24014
24020
  drawDefinition,
24015
24021
  loserMatchUp,
24016
- winningSide,
24017
24022
  matchUpsMap,
24018
24023
  dualMatchUp,
24019
24024
  event,
@@ -26397,9 +26402,7 @@ function getValidAssignmentActions({ positionSourceStructureIds, unassignedParti
26397
26402
  randomize: true,
26398
26403
  drawDefinition,
26399
26404
  seedingProfile,
26400
- structureId,
26401
- event,
26402
- });
26405
+ structureId});
26403
26406
  ({ unplacedSeedParticipantIds, unplacedSeedAssignments, unfilledPositions } = result);
26404
26407
  }
26405
26408
  if (!unfilledPositions?.length) {
@@ -26988,6 +26991,33 @@ function getDrawTypeCoercion({ policyDefinitions, appliedPolicies, drawType }) {
26988
26991
  true);
26989
26992
  }
26990
26993
 
26994
+ const getRandomQualifierList = ({ drawDefinition }) => {
26995
+ const paramsCheck = checkRequiredParameters({ drawDefinition }, [{ [DRAW_DEFINITION]: true }]);
26996
+ if (paramsCheck.error)
26997
+ return paramsCheck;
26998
+ const mainStructure = drawDefinition.structures?.find((structure) => structure.stage === MAIN && structure.stageSequence === 1);
26999
+ if (!mainStructure)
27000
+ return decorateResult({ result: { error: MISSING_MAIN_STRUCTURE } });
27001
+ const { qualifierPositions, } = structureAssignedDrawPositions({ structure: mainStructure });
27002
+ return generateRange(0, qualifierPositions.length).sort(() => Math.random() - 0.5);
27003
+ };
27004
+
27005
+ function isValidForQualifying({ structureId, drawDefinition }) {
27006
+ if (!drawDefinition)
27007
+ return { error: MISSING_DRAW_DEFINITION };
27008
+ if (!isString(structureId))
27009
+ return { error: INVALID_VALUES };
27010
+ const result = getStructureLinks({
27011
+ drawDefinition,
27012
+ structureId,
27013
+ });
27014
+ if (result.error)
27015
+ return result;
27016
+ const targetFeedProfiles = result.links.target.flatMap((t) => t.target.feedProfile).filter(Boolean);
27017
+ const valid = !intersection([BOTTOM_UP, TOP_DOWN, RANDOM, WATERFALL], targetFeedProfiles).length;
27018
+ return { ...SUCCESS, valid };
27019
+ }
27020
+
26991
27021
  function getPositionAssignments({ tournamentRecord, drawDefinition, stage = MAIN, structureId, structure, }) {
26992
27022
  if (!tournamentRecord)
26993
27023
  return { error: MISSING_TOURNAMENT_RECORD };
@@ -27012,22 +27042,6 @@ function getPositionAssignments({ tournamentRecord, drawDefinition, stage = MAIN
27012
27042
  };
27013
27043
  }
27014
27044
 
27015
- function isValidForQualifying({ structureId, drawDefinition }) {
27016
- if (!drawDefinition)
27017
- return { error: MISSING_DRAW_DEFINITION };
27018
- if (!isString(structureId))
27019
- return { error: INVALID_VALUES };
27020
- const result = getStructureLinks({
27021
- drawDefinition,
27022
- structureId,
27023
- });
27024
- if (result.error)
27025
- return result;
27026
- const targetFeedProfiles = result.links.target.flatMap((t) => t.target.feedProfile).filter(Boolean);
27027
- const valid = !intersection([BOTTOM_UP, TOP_DOWN, RANDOM, WATERFALL], targetFeedProfiles).length;
27028
- return { ...SUCCESS, valid };
27029
- }
27030
-
27031
27045
  function getEliminationDrawSize({ participantsCount, participantCount, }) {
27032
27046
  participantsCount = participantsCount ?? participantCount;
27033
27047
  if (!participantsCount)
@@ -27191,6 +27205,7 @@ var query$b = {
27191
27205
  getParticipantIdFinishingPositions: getParticipantIdFinishingPositions,
27192
27206
  getPositionAssignments: getPositionAssignments,
27193
27207
  getPositionsPlayedOff: getPositionsPlayedOff,
27208
+ getRandomQualifierList: getRandomQualifierList,
27194
27209
  getSeedingThresholds: getSeedingThresholds,
27195
27210
  getSeedsCount: getSeedsCount,
27196
27211
  getStructureSeedAssignments: getStructureSeedAssignments,
@@ -27398,7 +27413,6 @@ function generateRoundRobinWithPlayOff(params) {
27398
27413
  drawDefinition,
27399
27414
  playoffGroups,
27400
27415
  groupCount,
27401
- groupSize,
27402
27416
  ...params,
27403
27417
  });
27404
27418
  if (playoffStructures)
@@ -28756,16 +28770,13 @@ function generateDrawMaticRound(params) {
28756
28770
  const paringParams = {
28757
28771
  tournamentParticipants,
28758
28772
  possiblePairings,
28759
- participantIds,
28760
28773
  uniquePairings,
28761
- drawDefinition,
28762
28774
  maxIterations,
28763
28775
  adHocRatings,
28764
28776
  deltaObjects,
28765
28777
  valueObjects,
28766
28778
  eventType,
28767
28779
  scaleName,
28768
- structure,
28769
28780
  salted,
28770
28781
  };
28771
28782
  const { candidatesCount, participantIdPairings, deltaCandidate, iterations, candidate } = getPairings(paringParams);
@@ -31391,7 +31402,7 @@ function handleNumeric(params) {
31391
31402
  if (allNumeric)
31392
31403
  score = onlyNumbers.join('');
31393
31404
  const numbers = allNumeric ? onlyNumbers.map((n) => parseInt(n)) : score.split('').map((n) => parseInt(n));
31394
- setBuilder({ score });
31405
+ const { sets } = setBuilder({ score });
31395
31406
  if (numbers.length === 6) ;
31396
31407
  if (score.length === 3 && getDiff(numbers.slice(0, 2)) === 1) {
31397
31408
  const [s1, s2, tb] = numbers;
@@ -33050,9 +33061,9 @@ function scaledEntriesSeeding(params) {
33050
33061
  let seedsCount = params.seedsCount;
33051
33062
  const { provisionalPositioning, enteredParticipantIds, seedAssignmentProfile, assignSeedsCount, tournamentRecord, drawDefinition, seedByRanking, seedingProfile, structureId, event, } = params;
33052
33063
  const { categoryName, ageCategoryCode } = event?.category || {};
33053
- const eventType = event?.eventType;
33054
- const scaledEntries = getSeedingScaleEntries({ ...params, ageCategoryCode, categoryName, eventType }) ||
33055
- (seedByRanking && getRankingScaleEntries({ ...params, ageCategoryCode, categoryName, eventType }));
33064
+ event?.eventType;
33065
+ const scaledEntries = getSeedingScaleEntries({ ...params}) ||
33066
+ (seedByRanking && getRankingScaleEntries({ ...params}));
33056
33067
  const scaledEntriesCount = scaledEntries?.length ?? 0;
33057
33068
  if (scaledEntriesCount < seedsCount)
33058
33069
  seedsCount = scaledEntriesCount;
@@ -33145,7 +33156,6 @@ function generateNewDrawDefinition(params) {
33145
33156
  const positioningReports = [];
33146
33157
  let conflicts = [];
33147
33158
  const addResult = addEntries({
33148
- suppressDuplicateEntries,
33149
33159
  ignoreStageSpace,
33150
33160
  drawDefinition,
33151
33161
  drawEntries,
@@ -33633,7 +33643,7 @@ function credits() {
33633
33643
  This project would not have been possible without the generous input and patience
33634
33644
  of tournament organizers and directors who worked with early versions of CourtHive/TMX.
33635
33645
 
33636
- Thanks to Pavel, Ivan, Mladen, Zdenko, Antonia, Jakov, Kreso, Barry, Jeff, Bobby... to name just a few.
33646
+ Thanks to Miro, Pavel, Ivan, Mladen, Zdenko, Antonia, Jakov, Kreso, Barry, Jeff, Bobby... to name just a few.
33637
33647
 
33638
33648
  The project would not have even begun without the support of Miro, or the introduction by Sretchko.
33639
33649
  The project would not have succeeded without the enthusiasm of Randy and Bruce.
@@ -35236,7 +35246,6 @@ function getEventData(params) {
35236
35246
  const eventPublishState = getPublishState({ event }).publishState ?? {};
35237
35247
  const eventPublished = !!eventPublishState?.status?.published;
35238
35248
  const { participants: tournamentParticipants } = getParticipants({
35239
- withGroupings: true,
35240
35249
  withEvents: false,
35241
35250
  withDraws: false,
35242
35251
  policyDefinitions,
@@ -36677,7 +36686,6 @@ function eventMatchUps(params) {
36677
36686
  groupInfo,
36678
36687
  } = hydrateParticipants({
36679
36688
  participantsProfile,
36680
- policyDefinitions,
36681
36689
  useParticipantMap,
36682
36690
  tournamentRecord,
36683
36691
  contextProfile,
@@ -36738,7 +36746,6 @@ function tournamentMatchUps(params) {
36738
36746
  const events = tournamentRecord?.events ?? [];
36739
36747
  const { participants, participantMap, groupInfo } = hydrateParticipants({
36740
36748
  participantsProfile,
36741
- policyDefinitions,
36742
36749
  tournamentRecord,
36743
36750
  contextProfile,
36744
36751
  inContext,
@@ -36813,7 +36820,6 @@ function getCompetitionMatchUps({ scheduleVisibilityFilters, hydrateParticipants
36813
36820
  scheduleVisibilityFilters,
36814
36821
  hydrateParticipants,
36815
36822
  participantsProfile,
36816
- useParticipantMap,
36817
36823
  policyDefinitions,
36818
36824
  tournamentRecord,
36819
36825
  usePublishState,
@@ -37754,7 +37760,6 @@ function drawMatchUps({ participants: tournamentParticipants, tournamentAppliedP
37754
37760
  groupInfo,
37755
37761
  } = hydrateParticipants({
37756
37762
  participantsProfile,
37757
- policyDefinitions,
37758
37763
  useParticipantMap,
37759
37764
  tournamentRecord,
37760
37765
  contextProfile,
@@ -38206,6 +38211,7 @@ var index$f = {
38206
38211
  getPredictiveAccuracy: getPredictiveAccuracy,
38207
38212
  getProfileRounds: getProfileRounds,
38208
38213
  getPublishState: getPublishState,
38214
+ getRandomQualifierList: getRandomQualifierList,
38209
38215
  getRoundMatchUps: getRoundMatchUps,
38210
38216
  getRounds: getRounds,
38211
38217
  getScaleValues: getScaleValues,
@@ -38545,6 +38551,7 @@ var index$e = {
38545
38551
  getParticipantIdFinishingPositions: getParticipantIdFinishingPositions,
38546
38552
  getPositionAssignments: getPositionAssignments,
38547
38553
  getPositionsPlayedOff: getPositionsPlayedOff,
38554
+ getRandomQualifierList: getRandomQualifierList,
38548
38555
  getSeedingThresholds: getSeedingThresholds,
38549
38556
  getSeedsCount: getSeedsCount,
38550
38557
  getStructureSeedAssignments: getStructureSeedAssignments,
@@ -39957,9 +39964,7 @@ function modifyEventMatchUpFormatTiming(params) {
39957
39964
  recoveryTimes: validRecoveryMinutes && newRecoveryTimes,
39958
39965
  tournamentRecord,
39959
39966
  matchUpFormat,
39960
- eventId,
39961
- event,
39962
- });
39967
+ eventId});
39963
39968
  }
39964
39969
 
39965
39970
  function removeEventMatchUpFormatTiming(params) {
@@ -43265,7 +43270,6 @@ function removeDirectedParticipants(params) {
43265
43270
  if (byeMatchUp) {
43266
43271
  const drawPosition = Math.min(...byeMatchUp.drawPositions);
43267
43272
  removeDirectedBye({
43268
- sourceMatchUpId: matchUpId,
43269
43273
  targetLink: byeTargetLink,
43270
43274
  inContextDrawMatchUps,
43271
43275
  drawDefinition,
@@ -43455,7 +43459,6 @@ function doubleExitAdvancement(params) {
43455
43459
  tournamentRecord,
43456
43460
  loserTargetLink,
43457
43461
  drawDefinition,
43458
- loserMatchUp,
43459
43462
  matchUpsMap,
43460
43463
  event,
43461
43464
  });
@@ -43519,7 +43522,6 @@ function conditionallyAdvanceDrawPosition(params) {
43519
43522
  const { loserTargetLink } = targetLinks;
43520
43523
  const result = advanceByeToLoserMatchUp({
43521
43524
  loserTargetDrawPosition: nextLoserTargetDrawPosition,
43522
- loserMatchUp: nextLoserMatchUp,
43523
43525
  tournamentRecord,
43524
43526
  loserTargetLink,
43525
43527
  drawDefinition,
@@ -43601,7 +43603,6 @@ function conditionallyAdvanceDrawPosition(params) {
43601
43603
  winningSide: walkoverWinningSide,
43602
43604
  matchUp: noContextTargetMatchUp,
43603
43605
  matchUpStatusCodes,
43604
- context: stack,
43605
43606
  matchUpStatus,
43606
43607
  });
43607
43608
  if (result.error)
@@ -43644,7 +43645,6 @@ function conditionallyAdvanceDrawPosition(params) {
43644
43645
  matchUpStatus: EXIT,
43645
43646
  matchUpStatusCodes: [],
43646
43647
  removeScore: true,
43647
- context: stack,
43648
43648
  drawDefinition,
43649
43649
  winningSide,
43650
43650
  });
@@ -43698,7 +43698,6 @@ function conditionallyAdvanceDrawPosition(params) {
43698
43698
  matchUp: noContextNextWinnerMatchUp,
43699
43699
  matchUpStatusCodes: [],
43700
43700
  removeScore: true,
43701
- context: stack,
43702
43701
  drawDefinition,
43703
43702
  matchUpStatus,
43704
43703
  });
@@ -43800,7 +43799,7 @@ function scoreModification$1(params) {
43800
43799
  return decorateResult({ result, stack });
43801
43800
  }
43802
43801
  const isCollectionMatchUp = Boolean(params.matchUp.collectionId);
43803
- const result = modifyMatchUpScore({ ...params, context: stack });
43802
+ const result = modifyMatchUpScore({ ...params});
43804
43803
  if (isCollectionMatchUp) {
43805
43804
  const { matchUpTieId, drawDefinition, matchUpsMap } = params;
43806
43805
  const tieMatchUpResult = updateTieMatchUpScore({
@@ -44201,7 +44200,6 @@ function conditionallyRemoveDrawPosition(params) {
44201
44200
  matchUp: noContextTargetMatchUp,
44202
44201
  removeWinningSide: true,
44203
44202
  matchUpStatusCodes: [],
44204
- context: stack,
44205
44203
  matchUpStatus,
44206
44204
  removeScore,
44207
44205
  score: {
@@ -44347,7 +44345,7 @@ function scoreModification(params) {
44347
44345
  if (result.error)
44348
44346
  return result;
44349
44347
  }
44350
- const result = modifyMatchUpScore({ ...params, context: stack });
44348
+ const result = modifyMatchUpScore({ ...params});
44351
44349
  if (params.isCollectionMatchUp) {
44352
44350
  const { matchUpTieId, drawDefinition, event, matchUpsMap } = params;
44353
44351
  const { removeWinningSide } = updateTieMatchUpScore({
@@ -45152,7 +45150,7 @@ function swapWinnerLoser(params) {
45152
45150
  if (existingLoserAssignment)
45153
45151
  existingLoserAssignment.participantId = existingWinnerParticipantId;
45154
45152
  });
45155
- return modifyMatchUpScore({ ...params, context: stack });
45153
+ return modifyMatchUpScore({ ...params});
45156
45154
  }
45157
45155
 
45158
45156
  function setMatchUpState(params) {
@@ -45442,7 +45440,6 @@ function applyMatchUpValues(params) {
45442
45440
  ...params,
45443
45441
  matchUpStatus: newMatchUpStatus,
45444
45442
  removeWinningSide,
45445
- context: 'sms',
45446
45443
  removeScore,
45447
45444
  });
45448
45445
  if (result.error)
@@ -46975,17 +46972,8 @@ function getGroupedRounds({ scheduledRoundsDetails, greatestAverageMinutes, garm
46975
46972
  if (roundDetails.hash === lastHash || garmanSinglePass) {
46976
46973
  groupedMatchUpIds = groupedMatchUpIds.concat(roundDetails.matchUpIds);
46977
46974
  }
46978
- if (roundDetails.hash !== lastHash && !garmanSinglePass) {
46979
- lastHash = roundDetails.hash;
46980
- groupedRounds.push({
46981
- averageMinutes,
46982
- recoveryMinutes,
46983
- roundPeriodLength,
46984
- matchUpIds: groupedMatchUpIds,
46985
- });
46986
- groupedMatchUpIds = roundDetails.matchUpIds;
46987
- }
46988
- averageMinutes = garmanSinglePass ? greatestAverageMinutes : roundDetails.averageMinutes;
46975
+ if (roundDetails.hash !== lastHash && false) ;
46976
+ averageMinutes = greatestAverageMinutes ;
46989
46977
  recoveryMinutes = roundDetails.recoveryMinutes;
46990
46978
  roundPeriodLength = roundDetails.roundPeriodLength;
46991
46979
  }
@@ -48182,7 +48170,6 @@ function scheduleProfileRounds(params) {
48182
48170
  schedulingProfile,
48183
48171
  personRequests,
48184
48172
  periodLength,
48185
- useGarman,
48186
48173
  matchUps,
48187
48174
  dryRun,
48188
48175
  courts,
@@ -48696,7 +48683,8 @@ var lastNames = [
48696
48683
  "Wolin",
48697
48684
  "Wirt",
48698
48685
  "Waschuk",
48699
- "Wormwood"
48686
+ "Wormwood",
48687
+ "Zecic"
48700
48688
  ];
48701
48689
  var firstFemale = [
48702
48690
  "Ada",
@@ -48816,6 +48804,7 @@ var firstMale = [
48816
48804
  "Masanobu",
48817
48805
  "Maurits",
48818
48806
  "Michael",
48807
+ "Miro",
48819
48808
  "Mustapha",
48820
48809
  "Neil",
48821
48810
  "Nikola",
@@ -50149,9 +50138,7 @@ function generateFlightDrawDefinitions({ matchUpStatusProfile, completeAllMatchU
50149
50138
  let result = automatedPlayoffPositioning({
50150
50139
  structureId: mainStructure.structureId,
50151
50140
  tournamentRecord,
50152
- drawDefinition,
50153
- event,
50154
- });
50141
+ drawDefinition});
50155
50142
  if (result.error)
50156
50143
  return { error: result.error, drawIds: [] };
50157
50144
  const playoffCompletionGoal = completionGoal ? completionGoal - (completedCount ?? 0) : undefined;
@@ -50827,9 +50814,7 @@ function generateEventWithDraw(params) {
50827
50814
  automatedPlayoffPositioning({
50828
50815
  structureId: mainStructure.structureId,
50829
50816
  tournamentRecord,
50830
- drawDefinition,
50831
- event,
50832
- });
50817
+ drawDefinition});
50833
50818
  const playoffCompletionGoal = completionGoal ? completionGoal - (completedCount ?? 0) : undefined;
50834
50819
  const result = completeDrawMatchUps({
50835
50820
  completionGoal: completionGoal ? playoffCompletionGoal : undefined,
@@ -51268,7 +51253,6 @@ function processLeagueProfiles(params) {
51268
51253
  consideredDate,
51269
51254
  gendersCount,
51270
51255
  category,
51271
- gender,
51272
51256
  uuids,
51273
51257
  }).participants;
51274
51258
  const individualParticipantIds = participants.map((participant) => participant.participantId);
@@ -51676,7 +51660,6 @@ function anonymizeTournamentRecord({ keepExtensions = [], anonymizeParticipantNa
51676
51660
  [gender]: generatePersons({
51677
51661
  category: { ageCategoryCode: 'O18' },
51678
51662
  count: gendersCount[gender],
51679
- addressProps: { citiesCount: 10 },
51680
51663
  personExtensions: [],
51681
51664
  consideredDate,
51682
51665
  sex: gender,
@@ -56278,9 +56261,7 @@ function removeCollectionDefinition({ updateInProgressMatchUps = true, tieFormat
56278
56261
  else if (event) {
56279
56262
  matchUps =
56280
56263
  allEventMatchUps({
56281
- matchUpFilters: { matchUpTypes: [TEAM$2] },
56282
- drawDefinition,
56283
- })?.matchUps ?? [];
56264
+ matchUpFilters: { matchUpTypes: [TEAM$2] }})?.matchUps ?? [];
56284
56265
  }
56285
56266
  const targetMatchUps = (matchUps || []).filter((matchUp) => {
56286
56267
  const collectionMatchUps = matchUp.tieMatchUps?.filter((tieMatchUp) => tieMatchUp.collectionId === collectionId);
@@ -56859,12 +56840,12 @@ function aggregateTieFormats({ tournamentRecord, }) {
56859
56840
  addedCount += 1;
56860
56841
  }
56861
56842
  };
56862
- const eventType = event.eventType;
56863
- checkTieFormat({ tieFormat: event.tieFormat, eventType });
56843
+ event.eventType;
56844
+ checkTieFormat({ tieFormat: event.tieFormat});
56864
56845
  for (const drawDefinition of event.drawDefinitions ?? []) {
56865
- checkTieFormat({ tieFormat: drawDefinition.tieFormat, eventType });
56846
+ checkTieFormat({ tieFormat: drawDefinition.tieFormat});
56866
56847
  for (const structure of drawDefinition.structures ?? []) {
56867
- checkTieFormat({ tieFormat: structure.tieFormat, eventType });
56848
+ checkTieFormat({ tieFormat: structure.tieFormat});
56868
56849
  }
56869
56850
  }
56870
56851
  const setTieFormatId = (matchUpId, tieFormatId) => {