tods-competition-factory 1.6.10 → 1.6.12

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 CHANGED
@@ -329,7 +329,7 @@ const matchUpFormatCode = {
329
329
  };
330
330
 
331
331
  function factoryVersion() {
332
- return "1.6.10";
332
+ return "1.6.12";
333
333
  }
334
334
 
335
335
  function getObjectTieFormat(obj) {
@@ -3054,7 +3054,7 @@ function getParticipantResults({
3054
3054
  const manualGamesOverride = tieFormat && matchUp._disableAutoCalc && tieFormat.collectionDefinitions.every(({ scoreValue }) => scoreValue);
3055
3055
  const winningParticipantId = winningSide && getWinningSideId(matchUp);
3056
3056
  const losingParticipantId = winningSide && getLosingSideId(matchUp);
3057
- if (!winningParticipantId || !losingParticipantId) {
3057
+ if (!winningParticipantId && !losingParticipantId) {
3058
3058
  if (completedMatchUpStatuses.includes(matchUpStatus)) {
3059
3059
  const participantIdSide1 = getSideId(matchUp, 0);
3060
3060
  const participantIdSide2 = getSideId(matchUp, 1);
@@ -3066,53 +3066,51 @@ function getParticipantResults({
3066
3066
  checkInitializeParticipant(participantResults, participantIdSide2);
3067
3067
  participantResults[participantIdSide2].matchUpsCancelled += 1;
3068
3068
  }
3069
- } else {
3070
- if (tieMatchUps?.length) {
3071
- perPlayer = 0;
3072
- for (const tieMatchUp of tieMatchUps) {
3073
- if (tieMatchUp.winningSide) {
3074
- const tieWinningParticipantId = sides.find(
3075
- ({ sideNumber }) => sideNumber === tieMatchUp.winningSide
3076
- )?.participantId;
3077
- const tieLosingParticipantId = sides.find(
3078
- ({ sideNumber }) => sideNumber === tieMatchUp.winningSide
3079
- )?.participantId;
3080
- if (tieWinningParticipantId && tieLosingParticipantId) {
3081
- checkInitializeParticipant(
3082
- participantResults,
3083
- tieWinningParticipantId
3084
- );
3085
- checkInitializeParticipant(
3086
- participantResults,
3087
- tieLosingParticipantId
3088
- );
3089
- participantResults[tieWinningParticipantId].tieMatchUpsWon += 1;
3090
- participantResults[tieLosingParticipantId].tieMatchUpsLost += 1;
3091
- if (tieMatchUp.matchUpType === SINGLES$1) {
3092
- participantResults[tieWinningParticipantId].tieSinglesWon += 1;
3093
- participantResults[tieLosingParticipantId].tieSinglesLost += 1;
3094
- } else if (tieMatchUp.matchUpType === DOUBLES$1) {
3095
- participantResults[tieWinningParticipantId].tieDoublesWon += 1;
3096
- participantResults[tieLosingParticipantId].tieDoublesLost += 1;
3097
- }
3069
+ } else if (tieMatchUps?.length) {
3070
+ perPlayer = 0;
3071
+ for (const tieMatchUp of tieMatchUps) {
3072
+ if (tieMatchUp.winningSide) {
3073
+ const tieWinningParticipantId = sides.find(
3074
+ ({ sideNumber }) => sideNumber === tieMatchUp.winningSide
3075
+ )?.participantId;
3076
+ const tieLosingParticipantId = sides.find(
3077
+ ({ sideNumber }) => sideNumber === tieMatchUp.winningSide
3078
+ )?.participantId;
3079
+ if (tieWinningParticipantId && tieLosingParticipantId) {
3080
+ checkInitializeParticipant(
3081
+ participantResults,
3082
+ tieWinningParticipantId
3083
+ );
3084
+ checkInitializeParticipant(
3085
+ participantResults,
3086
+ tieLosingParticipantId
3087
+ );
3088
+ participantResults[tieWinningParticipantId].tieMatchUpsWon += 1;
3089
+ participantResults[tieLosingParticipantId].tieMatchUpsLost += 1;
3090
+ if (tieMatchUp.matchUpType === SINGLES$1) {
3091
+ participantResults[tieWinningParticipantId].tieSinglesWon += 1;
3092
+ participantResults[tieLosingParticipantId].tieSinglesLost += 1;
3093
+ } else if (tieMatchUp.matchUpType === DOUBLES$1) {
3094
+ participantResults[tieWinningParticipantId].tieDoublesWon += 1;
3095
+ participantResults[tieLosingParticipantId].tieDoublesLost += 1;
3098
3096
  }
3099
3097
  }
3100
- processScore({
3101
- score: tieMatchUp.score,
3102
- manualGamesOverride,
3103
- participantResults,
3104
- sides
3105
- // use sides from the TEAM matchUp
3106
- });
3107
3098
  }
3108
- } else {
3109
3099
  processScore({
3100
+ score: tieMatchUp.score,
3110
3101
  manualGamesOverride,
3111
3102
  participantResults,
3112
- score,
3113
3103
  sides
3104
+ // use sides from the TEAM matchUp
3114
3105
  });
3115
3106
  }
3107
+ } else {
3108
+ processScore({
3109
+ manualGamesOverride,
3110
+ participantResults,
3111
+ score,
3112
+ sides
3113
+ });
3116
3114
  }
3117
3115
  } else {
3118
3116
  checkInitializeParticipant(participantResults, winningParticipantId);
@@ -6452,7 +6450,7 @@ function structureSort(a, b, config) {
6452
6450
  const completedStructure = (s) => s?.matchUps.every(
6453
6451
  ({ matchUpStatus }) => completedMatchUpStatuses.includes(matchUpStatus) ? 1 : -1
6454
6452
  );
6455
- return completed && completedStructure(a) - completedStructure(b) || aggregate && protocolSequence(a) - protocolSequence(b) || (a?.stage && orderProtocol[a.stage] || 0) - (b?.stage && orderProtocol[b.stage] || 0) || (getRoundTarget(a) || 0) - (getRoundTarget(b) || 0) || !finish && !aggregate && (b?.positionAssignments?.length || Infinity) - (a?.positionAssignments?.length || Infinity) || (a?.stageSequence || 0) - (b?.stageSequence || 0) || (getMinFinishingPositionRange(a) || 0) - (getMinFinishingPositionRange(b) || 0);
6453
+ return completed && completedStructure(a) - completedStructure(b) || aggregate && protocolSequence(a) - protocolSequence(b) || (a?.stage && orderProtocol[a.stage] || 0) - (b?.stage && orderProtocol[b.stage] || 0) || (getRoundTarget(a) || 0) - (getRoundTarget(b) || 0) || !finish && !aggregate && (b?.positionAssignments?.length ?? Infinity) - (a?.positionAssignments?.length ?? Infinity) || (a?.stageSequence ?? 0) - (b?.stageSequence ?? 0) || (getMinFinishingPositionRange(a) || 0) - (getMinFinishingPositionRange(b) || 0);
6456
6454
  }
6457
6455
  function getMinFinishingPositionRange(structure) {
6458
6456
  return (structure?.matchUps || []).reduce((rangeSum, matchUp) => {
@@ -6641,6 +6639,7 @@ function getStageEntryTypeCount({ stage, drawDefinition, entryStatus }) {
6641
6639
  }
6642
6640
  function getStageEntries$1({
6643
6641
  provisionalPositioning,
6642
+ placementGroup,
6644
6643
  drawDefinition,
6645
6644
  stageSequence,
6646
6645
  entryStatuses,
@@ -6670,7 +6669,9 @@ function getStageEntries$1({
6670
6669
  if (error) {
6671
6670
  console.log("playoff entries error");
6672
6671
  }
6673
- return playoffEntries?.length ? playoffEntries : entries;
6672
+ return (playoffEntries?.length ? playoffEntries : entries).filter(
6673
+ (entry) => !placementGroup || entry.placementGroup === placementGroup
6674
+ );
6674
6675
  }
6675
6676
  return entries;
6676
6677
  }
@@ -9649,9 +9650,8 @@ function modifyMatchUpScore({
9649
9650
  return { error: MATCHUP_NOT_FOUND };
9650
9651
  ({ matchUp, structure } = findResult);
9651
9652
  }
9652
- } else {
9653
- if (matchUp.matchUpId !== matchUpId)
9654
- console.log("!!!!!");
9653
+ } else if (matchUp.matchUpId !== matchUpId) {
9654
+ console.log("!!!!!");
9655
9655
  }
9656
9656
  if (matchUpStatus && [WALKOVER$2, DOUBLE_WALKOVER].includes(matchUpStatus) || removeScore) {
9657
9657
  Object.assign(matchUp, { ...toBePlayed });
@@ -9689,31 +9689,45 @@ function modifyMatchUpScore({
9689
9689
  })?.appliedPolicies;
9690
9690
  defaultedProcessCodes = appliedPolicies?.[POLICY_TYPE_SCORING]?.processCodes?.incompleteAssignmentsOnDefault;
9691
9691
  }
9692
- if (structure?.structureType === CONTAINER && !matchUp.collectionId) {
9693
- matchUpFormat = isDualMatchUp ? "SET1-S:T100" : matchUpFormat || matchUp.matchUpFormat || structure?.matchUpFormat || drawDefinition?.matchUpFormat || event?.matchUpFormat;
9694
- const itemStructure = structure.structures.find((itemStructure2) => {
9695
- return itemStructure2?.matchUps.find(
9696
- (matchUp2) => matchUp2.matchUpId === matchUpId
9697
- );
9698
- });
9699
- const matchUpFilters = isDualMatchUp ? { matchUpTypes: [TEAM$2] } : void 0;
9700
- const { matchUps } = getAllStructureMatchUps({
9701
- afterRecoveryTimes: false,
9702
- structure: itemStructure,
9703
- inContext: true,
9704
- matchUpFilters,
9705
- event
9706
- });
9707
- const result = updateAssignmentParticipantResults({
9708
- positionAssignments: itemStructure.positionAssignments,
9709
- tournamentRecord,
9710
- drawDefinition,
9711
- matchUpFormat,
9712
- matchUps,
9713
- event
9714
- });
9715
- if (result.error)
9716
- return decorateResult({ result, stack });
9692
+ if (!matchUp.collectionId) {
9693
+ const isRoundRobin = structure?.structureType === CONTAINER;
9694
+ const isAdHocStructure = isAdHoc({ drawDefinition, structure });
9695
+ if (isLucky({ drawDefinition, structure }) || isAdHocStructure || isRoundRobin) {
9696
+ const updateTally = (structure2) => {
9697
+ matchUpFormat = isDualMatchUp ? "SET1-S:T100" : matchUpFormat ?? matchUp.matchUpFormat ?? structure2?.matchUpFormat ?? drawDefinition?.matchUpFormat ?? event?.matchUpFormat;
9698
+ const matchUpFilters = isDualMatchUp ? { matchUpTypes: [TEAM$2] } : void 0;
9699
+ const { matchUps } = getAllStructureMatchUps({
9700
+ afterRecoveryTimes: false,
9701
+ inContext: true,
9702
+ matchUpFilters,
9703
+ structure: structure2,
9704
+ event
9705
+ });
9706
+ if (isAdHocStructure) {
9707
+ structure2.positionAssignments = unique(
9708
+ matchUps.flatMap(
9709
+ (matchUp2) => (matchUp2.sides ?? []).map((side) => side.participantId)
9710
+ ).filter(Boolean)
9711
+ ).map((participantId) => ({ participantId }));
9712
+ }
9713
+ return updateAssignmentParticipantResults({
9714
+ positionAssignments: structure2.positionAssignments,
9715
+ tournamentRecord,
9716
+ drawDefinition,
9717
+ matchUpFormat,
9718
+ matchUps,
9719
+ event
9720
+ });
9721
+ };
9722
+ const itemStructure = isRoundRobin && structure.structures.find((itemStructure2) => {
9723
+ return itemStructure2?.matchUps.find(
9724
+ (matchUp2) => matchUp2.matchUpId === matchUpId
9725
+ );
9726
+ });
9727
+ const result = updateTally(itemStructure || structure);
9728
+ if (result.error)
9729
+ return decorateResult({ result, stack });
9730
+ }
9717
9731
  }
9718
9732
  if (notes) {
9719
9733
  const result = addNotes({ element: matchUp, notes });
@@ -14603,7 +14617,7 @@ const POLICY_SCHEDULING_USTA = {
14603
14617
  },
14604
14618
  matchUpAverageTimes: [
14605
14619
  {
14606
- matchUpFormatCodes: ["SET3-S:6/TB7"],
14620
+ matchUpFormatCodes: [FORMAT_STANDARD],
14607
14621
  // Best of 3 tiebreak sets
14608
14622
  averageTimes: [
14609
14623
  {
@@ -14790,11 +14804,11 @@ const POLICY_SCORING_USTA = {
14790
14804
  }
14791
14805
  }
14792
14806
  },
14793
- defaultMatchUpFormat: "SET3-S:6/TB7",
14807
+ defaultMatchUpFormat: FORMAT_STANDARD,
14794
14808
  matchUpFormats: [
14795
14809
  {
14796
14810
  description: "Best of 3 tiebreak sets",
14797
- matchUpFormat: "SET3-S:6/TB7",
14811
+ matchUpFormat: FORMAT_STANDARD,
14798
14812
  categoryNames: [],
14799
14813
  categoryTypes: []
14800
14814
  },
@@ -14876,7 +14890,7 @@ const POLICY_SCORING_USTA = {
14876
14890
 
14877
14891
  const POLICY_SCORING_DEFAULT = {
14878
14892
  [POLICY_TYPE_SCORING]: {
14879
- defaultMatchUpFormat: "SET3-S:6/TB7",
14893
+ defaultMatchUpFormat: FORMAT_STANDARD,
14880
14894
  requireAllPositionsAssigned: false,
14881
14895
  processCodes: {
14882
14896
  incompleteAssignmentsOnDefault: ["RANKING.IGNORE"]
@@ -23017,7 +23031,7 @@ function getValidSeedBlocks({
23017
23031
  });
23018
23032
  const { positionAssignments } = structureAssignedDrawPositions({ structure });
23019
23033
  const positionsCount = positionAssignments?.length;
23020
- const seedsCount = seedAssignments?.length || 0;
23034
+ const seedsCount = seedAssignments?.length ?? 0;
23021
23035
  let allDrawPositions = [];
23022
23036
  const roundNumbers = Object.keys(roundMatchUps).map((n) => parseInt(n)).sort((a, b) => a - b);
23023
23037
  const uniqueDrawPositionsByRound = roundNumbers.map((roundNumber) => {
@@ -23279,7 +23293,7 @@ function getNextSeedBlock(params) {
23279
23293
  const seedsWithoutDrawPositions = seedAssignments?.filter(
23280
23294
  (assignment) => !assignment.participantId
23281
23295
  );
23282
- const seedsLeftToAssign = unplacedSeedAssignments?.length || seedsWithoutDrawPositions?.length;
23296
+ const seedsLeftToAssign = unplacedSeedAssignments?.length && unplacedSeedAssignments.length > 0 ? unplacedSeedAssignments.length : seedsWithoutDrawPositions?.length ?? 0;
23283
23297
  const unfilled = seedsLeftToAssign && nextSeedBlock?.drawPositions.filter(
23284
23298
  (drawPosition) => !assignedDrawPositions?.includes(drawPosition)
23285
23299
  ) || [];
@@ -28480,7 +28494,7 @@ function getParticipantEntries(params) {
28480
28494
  }));
28481
28495
  }
28482
28496
  const addEventEntry = (id) => {
28483
- if (participantMap[id]?.events[eventId])
28497
+ if (participantMap[id]?.events?.[eventId])
28484
28498
  return;
28485
28499
  const participant = participantMap[id];
28486
28500
  processEventEntry({
@@ -28549,7 +28563,7 @@ function getParticipantEntries(params) {
28549
28563
  const relevantEntries = entries2.filter(
28550
28564
  ({ participantId }) => assignedParticipantIds.includes(participantId)
28551
28565
  );
28552
- const publishedSeeding2 = eventsPublishStatuses[eventId]?.publishedSeeding;
28566
+ const publishedSeeding2 = eventsPublishStatuses?.[eventId]?.publishedSeeding;
28553
28567
  const seedingPublished = !usePublishState || publishedSeeding2?.published && (publishedSeeding2?.drawIds?.length === 0 || publishedSeeding2?.drawIds?.includes(drawId));
28554
28568
  for (const entry of relevantEntries) {
28555
28569
  const { entryStatus, entryStage, entryPosition, participantId } = entry;
@@ -28559,7 +28573,7 @@ function getParticipantEntries(params) {
28559
28573
  eventType
28560
28574
  });
28561
28575
  const addDrawEntry = (id) => {
28562
- if (participantMap[id].draws[drawId])
28576
+ if (participantMap[id].draws?.[drawId])
28563
28577
  return;
28564
28578
  const includeSeeding = withSeeding && seedingPublished;
28565
28579
  const seedAssignments = includeSeeding ? {} : void 0;
@@ -28891,9 +28905,9 @@ function getParticipants$1(params) {
28891
28905
  withIOC
28892
28906
  });
28893
28907
  const entriesResult = getParticipantEntries({
28894
- withMatchUps: withMatchUps || withRankingProfile,
28895
- withEvents: withEvents || withRankingProfile,
28896
- withDraws: withDraws || withRankingProfile,
28908
+ withMatchUps: withMatchUps ?? withRankingProfile,
28909
+ withEvents: withEvents ?? withRankingProfile,
28910
+ withDraws: withDraws ?? withRankingProfile,
28897
28911
  withPotentialMatchUps,
28898
28912
  participantFilters,
28899
28913
  withRankingProfile,
@@ -28919,7 +28933,7 @@ function getParticipants$1(params) {
28919
28933
  } = entriesResult;
28920
28934
  const matchUps = entriesResult.matchUps;
28921
28935
  participantMap = entriesResult.participantMap;
28922
- const nextMatchUps = scheduleAnalysis || withPotentialMatchUps;
28936
+ const nextMatchUps = scheduleAnalysis ?? withPotentialMatchUps;
28923
28937
  const processedParticipants = Object.values(participantMap).map(
28924
28938
  ({
28925
28939
  potentialMatchUps,
@@ -38113,10 +38127,10 @@ function processPlayoffGroups({
38113
38127
  finishingPositionOffset = Math.min(...positionsPlayedOff) - 1;
38114
38128
  }
38115
38129
  const params = {
38130
+ structureId: playoffGroup.structureId ?? uuids?.pop(),
38116
38131
  structureName: playoffGroup.structureName,
38117
38132
  idPrefix: idPrefix && `${idPrefix}-po`,
38118
38133
  appliedPolicies: policyDefinitions,
38119
- structureId: uuids?.pop(),
38120
38134
  finishingPositionOffset,
38121
38135
  stage: PLAY_OFF,
38122
38136
  stageSequence,
@@ -38152,9 +38166,9 @@ function processPlayoffGroups({
38152
38166
  uuids
38153
38167
  });
38154
38168
  const playoffStructure = structureTemplate({
38169
+ structureId: playoffGroup.structureId ?? uuids?.pop(),
38155
38170
  structureName: playoffGroup.structureName,
38156
38171
  matchUpFormat: playoffMatchUpFormat,
38157
- structureId: uuids?.pop(),
38158
38172
  stage: PLAY_OFF,
38159
38173
  stageSequence,
38160
38174
  matchUps
@@ -38174,6 +38188,7 @@ function processPlayoffGroups({
38174
38188
  } else if ([COMPASS, OLYMPIC, PLAY_OFF].includes(playoffDrawType)) {
38175
38189
  const { structureName } = playoffGroup;
38176
38190
  const params2 = {
38191
+ structureId: playoffGroup.structureId ?? uuids?.pop(),
38177
38192
  playoffStructureNameBase: structureName,
38178
38193
  idPrefix: idPrefix && `${idPrefix}-po`,
38179
38194
  addNameBaseToAttributeName: true,
@@ -38227,6 +38242,7 @@ function processPlayoffGroups({
38227
38242
  ].includes(playoffDrawType)) {
38228
38243
  const uuidsFMLC = [uuids?.pop(), uuids?.pop()];
38229
38244
  const params2 = {
38245
+ structureId: playoffGroup.structureId ?? uuids?.pop(),
38230
38246
  structureName: playoffGroup.structureName,
38231
38247
  idPrefix: idPrefix && `${idPrefix}-po`,
38232
38248
  finishingPositionOffset,
@@ -38274,9 +38290,9 @@ function processPlayoffGroups({
38274
38290
  updateStructureAndLinks({ playoffStructures, playoffLinks });
38275
38291
  } else if ([AD_HOC].includes(playoffDrawType)) {
38276
38292
  const structure = structureTemplate({
38293
+ structureId: playoffGroup.structureId ?? uuids?.pop(),
38277
38294
  structureName: playoffGroup.structureName,
38278
38295
  finishingPosition: WIN_RATIO$1,
38279
- structureId: uuids?.pop(),
38280
38296
  stage: PLAY_OFF,
38281
38297
  stageSequence,
38282
38298
  matchUps: []
@@ -40823,6 +40839,7 @@ function automatedPositioning$1({
40823
40839
  placeByes = true,
40824
40840
  tournamentRecord,
40825
40841
  appliedPolicies,
40842
+ placementGroup,
40826
40843
  drawDefinition,
40827
40844
  seedingProfile,
40828
40845
  participants,
@@ -40874,6 +40891,7 @@ function automatedPositioning$1({
40874
40891
  stageSequence: structure.stageSequence,
40875
40892
  provisionalPositioning,
40876
40893
  stage: structure.stage,
40894
+ placementGroup,
40877
40895
  drawDefinition,
40878
40896
  entryStatuses,
40879
40897
  structureId
@@ -41089,10 +41107,12 @@ function automatedPlayoffPositioning(params) {
41089
41107
  if (!structureIsComplete && !provisionalPositioning) {
41090
41108
  return { error: INCOMPLETE_SOURCE_STRUCTURE };
41091
41109
  }
41092
- const { playoffStructures } = getPlayoffStructures({
41110
+ const playoffStructures = getPlayoffStructures({
41093
41111
  drawDefinition,
41094
41112
  structureId
41095
- });
41113
+ }).playoffStructures?.sort(
41114
+ (a, b) => getMinFinishingPositionRange(a) - getMinFinishingPositionRange(b)
41115
+ );
41096
41116
  const structurePositionAssignments = [];
41097
41117
  const participants = tournamentRecord?.participants;
41098
41118
  if (playoffStructures) {
@@ -41237,9 +41257,9 @@ function generateAndPopulatePlayoffStructures(params) {
41237
41257
  structureId: sourceStructureId,
41238
41258
  addNameBaseToAttributeName,
41239
41259
  playoffStructureNameBase,
41240
- tournamentRecord,
41241
41260
  playoffAttributes,
41242
41261
  playoffPositions,
41262
+ tournamentRecord,
41243
41263
  exitProfileLimit,
41244
41264
  roundProfiles,
41245
41265
  roundNumbers,
@@ -41314,7 +41334,7 @@ function generateAndPopulatePlayoffStructures(params) {
41314
41334
  const roundsRanges = validRoundNumbers ? availablePlayoffRoundsRanges : playoffRoundsRanges;
41315
41335
  const newStructures = [];
41316
41336
  const newLinks = [];
41317
- for (const roundNumber of sourceRounds || []) {
41337
+ for (const roundNumber of sourceRounds ?? []) {
41318
41338
  const roundInfo = roundsRanges?.find(
41319
41339
  (roundInfo2) => roundInfo2.roundNumber === roundNumber
41320
41340
  );
@@ -54031,7 +54051,6 @@ const tieFormatConstants = {
54031
54051
  USTA_ZONAL
54032
54052
  };
54033
54053
 
54034
- const bestOf3tbSets = "SET3-S:6/TB7";
54035
54054
  const STANDARD = "STANDARD";
54036
54055
  const namedFormats = {
54037
54056
  [STANDARD]: {
@@ -54048,9 +54067,9 @@ const namedFormats = {
54048
54067
  matchUpFormat: "SET1-S:8/TB7@7"
54049
54068
  },
54050
54069
  singles: {
54070
+ matchUpFormat: FORMAT_STANDARD,
54051
54071
  matchUpCount: 6,
54052
- matchUpValue: 1,
54053
- matchUpFormat: bestOf3tbSets
54072
+ matchUpValue: 1
54054
54073
  },
54055
54074
  tieFormatName: COLLEGE_D3,
54056
54075
  valueGoal: 5
@@ -54060,12 +54079,12 @@ const namedFormats = {
54060
54079
  doubles: {
54061
54080
  matchUpCount: 3,
54062
54081
  collectionValue: 1,
54063
- matchUpFormat: bestOf3tbSets
54082
+ matchUpFormat: FORMAT_STANDARD
54064
54083
  },
54065
54084
  singles: {
54066
54085
  matchUpCount: 6,
54067
54086
  matchUpValue: 1,
54068
- matchUpFormat: bestOf3tbSets
54087
+ matchUpFormat: FORMAT_STANDARD
54069
54088
  },
54070
54089
  tieFormatName: COLLEGE_DEFAULT,
54071
54090
  valueGoal: 4
@@ -54080,7 +54099,7 @@ const namedFormats = {
54080
54099
  singles: {
54081
54100
  matchUpCount: 6,
54082
54101
  matchUpValue: 1,
54083
- matchUpFormat: bestOf3tbSets
54102
+ matchUpFormat: FORMAT_STANDARD
54084
54103
  },
54085
54104
  tieFormatName: COLLEGE_JUCO,
54086
54105
  valueGoal: 5
@@ -54120,7 +54139,7 @@ const tieFormatDefaults = (params) => {
54120
54139
  collectionDefinitions: [
54121
54140
  {
54122
54141
  collectionId: uuids?.pop() || UUID(),
54123
- matchUpFormat: "SET3-S:6/TB7-F:TB10",
54142
+ matchUpFormat: FORMAT_ATP_DOUBLES,
54124
54143
  matchUpType: TypeEnum.Doubles,
54125
54144
  collectionName: "Doubles",
54126
54145
  ...template.doubles
@@ -54128,7 +54147,7 @@ const tieFormatDefaults = (params) => {
54128
54147
  {
54129
54148
  collectionId: uuids?.pop() || UUID(),
54130
54149
  matchUpType: TypeEnum.Singles,
54131
- matchUpFormat: bestOf3tbSets,
54150
+ matchUpFormat: FORMAT_STANDARD,
54132
54151
  collectionName: "Singles",
54133
54152
  ...template.singles
54134
54153
  }
@@ -56657,7 +56676,7 @@ function generateDrawDefinition(params) {
56657
56676
  } else if (!matchUpFormat) {
56658
56677
  tieFormat = void 0;
56659
56678
  if (!event?.matchUpFormat) {
56660
- matchUpFormat = "SET3-S:6/TB7";
56679
+ matchUpFormat = FORMAT_STANDARD;
56661
56680
  }
56662
56681
  }
56663
56682
  const invalidDrawId = params.drawId && typeof params.drawId !== "string";
@@ -60038,9 +60057,9 @@ const defaultStatusProfile = {
60038
60057
  function generateOutcome(params) {
60039
60058
  let { defaultWithScorePercent = 2, winningSide } = params;
60040
60059
  const {
60041
- matchUpFormat = "SET3-S:6/TB7",
60042
60060
  matchUpStatusProfile = defaultStatusProfile,
60043
60061
  // { matchUpStatusProfile: {} } will always return only { matchUpStatus: COMPLETED }
60062
+ matchUpFormat = FORMAT_STANDARD,
60044
60063
  pointsPerMinute = 1,
60045
60064
  sideWeight = 4
60046
60065
  } = params;