tods-competition-factory 0.52.1 → 0.53.2

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.
@@ -3767,7 +3767,7 @@ function validateTieFormat({
3767
3767
  return false;
3768
3768
  }
3769
3769
 
3770
- if (matchUpFormat && !scoreGovernor.isValidMatchUpFormat(matchUpFormat)) {
3770
+ if (matchUpFormat && !matchUpFormatCode.isValid(matchUpFormat)) {
3771
3771
  errors.push(`Invalid matchUpFormat: ${matchUpFormat}`);
3772
3772
  return false;
3773
3773
  }
@@ -7015,7 +7015,7 @@ const countries = [{
7015
7015
  phone: '263'
7016
7016
  }];
7017
7017
 
7018
- var collectionDefinitions$3 = [
7018
+ var collectionDefinitions$4 = [
7019
7019
  {
7020
7020
  collectionName: "Doubles",
7021
7021
  matchUpCount: 3,
@@ -7031,11 +7031,37 @@ var collectionDefinitions$3 = [
7031
7031
  matchUpValue: 1
7032
7032
  }
7033
7033
  ];
7034
- var tieFormatName$2 = "COLLEGE_D3";
7034
+ var tieFormatName$3 = "COLLEGE_D3";
7035
+ var winCriteria$4 = {
7036
+ valueGoal: 5
7037
+ };
7038
+ var COLLEGE_D3$1 = {
7039
+ collectionDefinitions: collectionDefinitions$4,
7040
+ tieFormatName: tieFormatName$3,
7041
+ winCriteria: winCriteria$4
7042
+ };
7043
+
7044
+ var collectionDefinitions$3 = [
7045
+ {
7046
+ collectionName: "Doubles",
7047
+ collectionValue: 1,
7048
+ matchUpCount: 3,
7049
+ matchUpFormat: "SET1-S:6NOAD/TB7",
7050
+ matchUpType: "DOUBLES"
7051
+ },
7052
+ {
7053
+ collectionName: "Singles",
7054
+ matchUpCount: 6,
7055
+ matchUpFormat: "SET3-S:6NOAD/TB7",
7056
+ matchUpType: "SINGLES",
7057
+ matchUpValue: 1
7058
+ }
7059
+ ];
7060
+ var tieFormatName$2 = "COLLEGE_DEFAULT";
7035
7061
  var winCriteria$3 = {
7036
7062
  valueGoal: 5
7037
7063
  };
7038
- var COLLEGE_D3 = {
7064
+ var COLLEGE_DEFAULT$1 = {
7039
7065
  collectionDefinitions: collectionDefinitions$3,
7040
7066
  tieFormatName: tieFormatName$2,
7041
7067
  winCriteria: winCriteria$3
@@ -7044,24 +7070,24 @@ var COLLEGE_D3 = {
7044
7070
  var collectionDefinitions$2 = [
7045
7071
  {
7046
7072
  collectionName: "Doubles",
7047
- collectionValue: 1,
7048
7073
  matchUpCount: 3,
7049
- matchUpFormat: "SET1-S:6NOAD/TB7",
7050
- matchUpType: "DOUBLES"
7074
+ matchUpFormat: "SET1-S:8/TB7",
7075
+ matchUpType: "DOUBLES",
7076
+ matchUpValue: 1
7051
7077
  },
7052
7078
  {
7053
7079
  collectionName: "Singles",
7054
7080
  matchUpCount: 6,
7055
- matchUpFormat: "SET3-S:6NOAD/TB7",
7081
+ matchUpFormat: "SET3-S:6/TB7",
7056
7082
  matchUpType: "SINGLES",
7057
7083
  matchUpValue: 1
7058
7084
  }
7059
7085
  ];
7060
- var tieFormatName$1 = "COLLEGE_DEFAULT";
7086
+ var tieFormatName$1 = "COLLEGE_JUCO";
7061
7087
  var winCriteria$2 = {
7062
7088
  valueGoal: 5
7063
7089
  };
7064
- var COLLEGE_DEFAULT = {
7090
+ var COLLEGE_JUCO$1 = {
7065
7091
  collectionDefinitions: collectionDefinitions$2,
7066
7092
  tieFormatName: tieFormatName$1,
7067
7093
  winCriteria: winCriteria$2
@@ -7070,24 +7096,24 @@ var COLLEGE_DEFAULT = {
7070
7096
  var collectionDefinitions$1 = [
7071
7097
  {
7072
7098
  collectionName: "Doubles",
7073
- matchUpCount: 3,
7074
- matchUpFormat: "SET1-S:8/TB7",
7099
+ matchUpCount: 1,
7100
+ matchUpFormat: "SET1-S:6/TB10",
7075
7101
  matchUpType: "DOUBLES",
7076
7102
  matchUpValue: 1
7077
7103
  },
7078
7104
  {
7079
7105
  collectionName: "Singles",
7080
- matchUpCount: 6,
7081
- matchUpFormat: "SET3-S:6/TB7",
7106
+ matchUpCount: 2,
7107
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7082
7108
  matchUpType: "SINGLES",
7083
7109
  matchUpValue: 1
7084
7110
  }
7085
7111
  ];
7086
- var tieFormatName = "COLLEGE_JUCO";
7112
+ var tieFormatName = "DOMINANT_DUO";
7087
7113
  var winCriteria$1 = {
7088
- valueGoal: 5
7114
+ valueGoal: 2
7089
7115
  };
7090
- var COLLEGE_JUCO = {
7116
+ var DOMINANT_DUO_TIE_FORMAT = {
7091
7117
  collectionDefinitions: collectionDefinitions$1,
7092
7118
  tieFormatName: tieFormatName,
7093
7119
  winCriteria: winCriteria$1
@@ -7154,17 +7180,18 @@ var collectionGroups = [
7154
7180
  groupName: "Day 3"
7155
7181
  }
7156
7182
  ];
7157
- var LAVER = {
7183
+ var LAVER_CUP_TIE_FORMAT = {
7158
7184
  winCriteria: winCriteria,
7159
7185
  collectionDefinitions: collectionDefinitions,
7160
7186
  collectionGroups: collectionGroups
7161
7187
  };
7162
7188
 
7163
7189
  const tieFormats = {
7164
- COLLEGE_D3,
7165
- COLLEGE_DEFAULT,
7166
- COLLEGE_JUCO,
7167
- LAVER
7190
+ COLLEGE_D3: COLLEGE_D3$1,
7191
+ COLLEGE_DEFAULT: COLLEGE_DEFAULT$1,
7192
+ COLLEGE_JUCO: COLLEGE_JUCO$1,
7193
+ DOMINANT_DUO: DOMINANT_DUO_TIE_FORMAT,
7194
+ LAVER_CUP: LAVER_CUP_TIE_FORMAT
7168
7195
  };
7169
7196
 
7170
7197
  const POLICY_AVOIDANCE_COUNTRY = {
@@ -23747,10 +23774,10 @@ function getMatchUpFormat({
23747
23774
  const eventDefaultMatchUpFormat = event === null || event === void 0 ? void 0 : event.matchUpFormat;
23748
23775
  const matchUpFormat = (matchUpResult === null || matchUpResult === void 0 ? void 0 : (_matchUpResult$matchU = matchUpResult.matchUp) === null || _matchUpResult$matchU === void 0 ? void 0 : _matchUpResult$matchU.matchUpFormat) || structureDefaultMatchUpFormat || drawDefaultMatchUpFormat || eventDefaultMatchUpFormat;
23749
23776
  return {
23750
- matchUpFormat,
23751
23777
  structureDefaultMatchUpFormat,
23778
+ eventDefaultMatchUpFormat,
23752
23779
  drawDefaultMatchUpFormat,
23753
- eventDefaultMatchUpFormat
23780
+ matchUpFormat
23754
23781
  };
23755
23782
  }
23756
23783
 
@@ -27456,7 +27483,7 @@ const scheduleGovernor$1 = {
27456
27483
  };
27457
27484
 
27458
27485
  function factoryVersion() {
27459
- return '0.52.1';
27486
+ return '0.53.2';
27460
27487
  }
27461
27488
 
27462
27489
  function attachPolicies$2({
@@ -31264,6 +31291,11 @@ function addEvent({
31264
31291
  endDate,
31265
31292
  eventType: SINGLES
31266
31293
  }, event);
31294
+
31295
+ if (event.tieFormatName && tieFormats[event.tieFormatName]) {
31296
+ eventRecord.tieFormat = tieFormats[event.tieFormatName];
31297
+ }
31298
+
31267
31299
  if (!eventRecord.eventId) eventRecord.eventId = UUID();
31268
31300
  const eventExists = tournamentRecord.events.reduce((exists, event) => {
31269
31301
  return exists || event.eventId === eventRecord.eventId;
@@ -37871,8 +37903,22 @@ function newDrawDefinition({
37871
37903
  });
37872
37904
  }
37873
37905
 
37906
+ const COLLEGE_DEFAULT = 'COLLEGE_DEFAULT';
37907
+ const COLLEGE_JUCO = 'COLLEGE_JUCO';
37908
+ const COLLEGE_D3 = 'COLLEGE_D3';
37909
+ const DOMINANT_DUO = 'DOMINANT_DUO';
37910
+ const LAVER_CUP = 'LAVER_CUP';
37911
+ const tieFormatConstants = {
37912
+ COLLEGE_D3,
37913
+ COLLEGE_DEFAULT,
37914
+ COLLEGE_JUCO,
37915
+ DOMINANT_DUO,
37916
+ LAVER_CUP
37917
+ };
37918
+
37874
37919
  const namedFormats = {
37875
37920
  STANDARD: {
37921
+ hydrate: true,
37876
37922
  doubles: {
37877
37923
  matchUpCount: 3,
37878
37924
  matchUpValue: 1
@@ -37883,7 +37929,8 @@ const namedFormats = {
37883
37929
  },
37884
37930
  valueGoal: 5
37885
37931
  },
37886
- COLLEGE_D3: {
37932
+ [COLLEGE_D3]: {
37933
+ hydrate: true,
37887
37934
  doubles: {
37888
37935
  matchUpCount: 3,
37889
37936
  matchUpValue: 1,
@@ -37897,7 +37944,8 @@ const namedFormats = {
37897
37944
  tieFormatName: 'COLLEGE_D3',
37898
37945
  valueGoal: 5
37899
37946
  },
37900
- COLLEGE_DEFAULT: {
37947
+ [COLLEGE_DEFAULT]: {
37948
+ hydrate: true,
37901
37949
  doubles: {
37902
37950
  matchUpCount: 3,
37903
37951
  collectionValue: 1,
@@ -37911,7 +37959,8 @@ const namedFormats = {
37911
37959
  tieFormatName: 'COLLEGE_DEFAULT',
37912
37960
  valueGoal: 4
37913
37961
  },
37914
- COLLEGE_JUCO: {
37962
+ [COLLEGE_JUCO]: {
37963
+ hydrate: true,
37915
37964
  doubles: {
37916
37965
  matchUpCount: 3,
37917
37966
  matchUpValue: 1,
@@ -37920,11 +37969,13 @@ const namedFormats = {
37920
37969
  singles: {
37921
37970
  matchUpCount: 6,
37922
37971
  matchUpValue: 1,
37923
- matchUpFormat: 'SET3-S:6'
37972
+ matchUpFormat: 'SET3-S:6/TB7'
37924
37973
  },
37925
37974
  tieFormatName: 'COLLEGE_JUCO',
37926
37975
  valueGoal: 5
37927
- }
37976
+ },
37977
+ [LAVER_CUP]: LAVER_CUP_TIE_FORMAT,
37978
+ [DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT
37928
37979
  };
37929
37980
  const tieFormatDefaults = ({
37930
37981
  namedFormat,
@@ -37935,6 +37986,7 @@ const tieFormatDefaults = ({
37935
37986
  if (!Object.keys(namedFormats).includes(namedFormat)) namedFormat = 'STANDARD';
37936
37987
  if (!Array.isArray(uuids)) uuids = [];
37937
37988
  const template = namedFormats[namedFormat];
37989
+ if (!template.hydrate) return template;
37938
37990
  const tieFormat = {
37939
37991
  winCriteria: {
37940
37992
  valueGoal: template.valueGoal
@@ -38033,9 +38085,9 @@ function generateDrawDefinition(params) {
38033
38085
  matchUpType = matchUpType || eventType;
38034
38086
 
38035
38087
  if (matchUpType === TEAM$3 && eventType === TEAM$3) {
38036
- tieFormat = (tieFormat || tieFormatName) && (typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
38088
+ tieFormat = (tieFormat || (event === null || event === void 0 ? void 0 : event.tieFormat) || tieFormatName) && (typeof tieFormat === 'object' ? tieFormat : tieFormatName ? tieFormatDefaults({
38037
38089
  namedFormat: tieFormatName
38038
- }));
38090
+ }) : typeof (event === null || event === void 0 ? void 0 : event.tieFormat) === 'object' ? event.tieFormat : tieFormatDefaults());
38039
38091
  matchUpFormat = undefined;
38040
38092
  } else if (!matchUpFormat) {
38041
38093
  tieFormat = undefined;
@@ -42310,6 +42362,74 @@ function getParticipantSignInStatus({
42310
42362
  return timeItem && timeItem.itemValue === SIGNED_IN && SIGNED_IN;
42311
42363
  }
42312
42364
 
42365
+ /**
42366
+ *
42367
+ * @param {object} tournamentRecord - passed in automatically by tournamentEngine
42368
+ * @param {string} drawId - optional - avoid brute force search for matchUp
42369
+ * @param {object} drawDefinition - passed in automatically by tournamentEngine when drawId provided
42370
+ * @param {string} eventId - optional - if only the default matchUpFormat for an event is required
42371
+ * @param {object} event - passed in automatically by tournamentEngine when drawId or eventId provided
42372
+ * @param {string} structureId - optional - if only the default matchUpFormat for a structure is required
42373
+ * @param {string} matchUpId - id of matchUp for which the scoped matchUpFormat(s) are desired
42374
+ *
42375
+ */
42376
+
42377
+ function getTieFormat({
42378
+ tournamentRecord,
42379
+ drawDefinition,
42380
+ structureId,
42381
+ matchUpId,
42382
+ drawId,
42383
+ event
42384
+ }) {
42385
+ var _structure, _drawDefinition, _matchUpResult$matchU;
42386
+
42387
+ if (!tournamentRecord) return {
42388
+ error: MISSING_TOURNAMENT_RECORD
42389
+ };
42390
+ if (!drawId && !event && !structureId && !matchUpId) return {
42391
+ error: MISSING_VALUE
42392
+ };
42393
+ const matchUpResult = findMatchUp({
42394
+ tournamentRecord,
42395
+ drawDefinition,
42396
+ matchUpId,
42397
+ drawId,
42398
+ event
42399
+ });
42400
+
42401
+ if (matchUpId && matchUpResult !== null && matchUpResult !== void 0 && matchUpResult.error) {
42402
+ return matchUpResult;
42403
+ } else if (!drawDefinition && matchUpResult !== null && matchUpResult !== void 0 && matchUpResult.drawDefinition) {
42404
+ drawDefinition = matchUpResult === null || matchUpResult === void 0 ? void 0 : matchUpResult.drawDefinition;
42405
+ }
42406
+
42407
+ let structure = matchUpResult === null || matchUpResult === void 0 ? void 0 : matchUpResult.structure;
42408
+
42409
+ if (!structure && structureId && !matchUpId) {
42410
+ if (!drawDefinition) return {
42411
+ error: MISSING_DRAW_ID
42412
+ };
42413
+ const structureResult = findStructure({
42414
+ drawDefinition,
42415
+ structureId
42416
+ });
42417
+ if (structureResult.error) return structureResult;
42418
+ structure = structureResult.structure;
42419
+ }
42420
+
42421
+ const structureDefaultTieFormat = (_structure = structure) === null || _structure === void 0 ? void 0 : _structure.tieFormat;
42422
+ const drawDefaultTieFormat = (_drawDefinition = drawDefinition) === null || _drawDefinition === void 0 ? void 0 : _drawDefinition.tieFormat;
42423
+ const eventDefaultTieFormat = event === null || event === void 0 ? void 0 : event.tieFormat;
42424
+ const tieFormat = (matchUpResult === null || matchUpResult === void 0 ? void 0 : (_matchUpResult$matchU = matchUpResult.matchUp) === null || _matchUpResult$matchU === void 0 ? void 0 : _matchUpResult$matchU.tieFormat) || structureDefaultTieFormat || drawDefaultTieFormat || eventDefaultTieFormat;
42425
+ return {
42426
+ structureDefaultTieFormat,
42427
+ eventDefaultTieFormat,
42428
+ drawDefaultTieFormat,
42429
+ tieFormat
42430
+ };
42431
+ }
42432
+
42313
42433
  function getEventProperties({
42314
42434
  tournamentRecord,
42315
42435
  event
@@ -43379,6 +43499,7 @@ const queryGovernor$1 = {
43379
43499
  findTournamentExtension,
43380
43500
  findParticipantExtension,
43381
43501
  findDrawDefinitionExtension,
43502
+ getTieFormat,
43382
43503
  getMatchUpFormat,
43383
43504
  getDrawDefinition,
43384
43505
  getEventProperties,
@@ -47867,54 +47988,68 @@ function personMocks({
47867
47988
  }
47868
47989
 
47869
47990
  var teamsData = [
47991
+ "Ace Academy",
47870
47992
  "Avengers",
47871
- "Predators",
47872
- "Dynamos",
47873
- "Warriors",
47993
+ "Ball Bouncers",
47994
+ "Baseliners",
47874
47995
  "Captivators",
47875
- "Dragons",
47876
- "Explosive Win Machine",
47877
- "Pirates",
47996
+ "Civil Disobedients",
47997
+ "Continentals",
47998
+ "Court Royal",
47999
+ "Court Sharks",
48000
+ "Diamond Dogs",
48001
+ "Danger Zone",
48002
+ "Doubles Dominators",
48003
+ "Double Faults",
48004
+ "Tricksters",
48005
+ "Eliminators",
48006
+ "Court Crusaders",
48007
+ "Fuzz Busters",
48008
+ "Game Changers",
48009
+ "Goal Gurus",
48010
+ "Good Volley",
48011
+ "Green Machine",
47878
48012
  "Hawk Eyes",
48013
+ "Inside Outers",
47879
48014
  "Killer Instinct",
48015
+ "Line Toers",
47880
48016
  "Masters of Mayhem",
47881
48017
  "Matter Catchers",
48018
+ "Cheap Shot",
48019
+ "Mean Machines",
47882
48020
  "Mindspace Invaders",
47883
- "Goal Gurus",
47884
- "Raiders",
47885
- "Seekers",
48021
+ "Net Centric",
48022
+ "Net Positive",
48023
+ "Over Your Head",
48024
+ "Spin Meisters",
48025
+ "Aggressors",
48026
+ "Racket Machine",
48027
+ "Slice Happy",
48028
+ "Refs Nightmare",
48029
+ "Sandeaters",
48030
+ "Sun Seekers",
48031
+ "Slicer Dicers",
47886
48032
  "Sparkle Soul Tribe",
47887
- "The Achievers",
47888
- "The Blazers",
47889
- "The Breezers",
47890
- "The Bruisers",
47891
- "The Civil Disobedients",
47892
- "The Eliminators",
47893
- "The Mavericks",
47894
- "The Mean Machines",
47895
- "The Punters",
47896
- "The Sandeaters",
47897
- "The Visual Spectacle",
48033
+ "Stacked Deck",
48034
+ "Cross Stringers",
48035
+ "The Emergence",
47898
48036
  "Total Demolition",
47899
48037
  "Touch and Go",
48038
+ "Upside Downers",
47900
48039
  "Vertically Challenged",
47901
- "Win Machines",
47902
- "Wind Chasers",
47903
- "Worker Bees",
47904
- "Razorbacks",
47905
- "Rebels",
47906
- "Fighting Crusaders",
47907
- "Comets",
47908
- "Commodores",
47909
- "Green Machine",
47910
- "Continentals"
48040
+ "Visual Spectacle"
47911
48041
  ];
47912
48042
 
47913
48043
  function teamMocks({
47914
48044
  count = 1
47915
48045
  } = {}) {
47916
- const shuffledCities = shuffleArray(teamsData);
47917
- const teams = shuffledCities.slice(0, count);
48046
+ const shuffledTeamNames = shuffleArray(teamsData);
48047
+ const teams = shuffledTeamNames.slice(0, count);
48048
+
48049
+ if (teams.length < count) {
48050
+ generateRange(0, count - teams.length).forEach(i => teams.push(`Team ${i + 1}`));
48051
+ }
48052
+
47918
48053
  return {
47919
48054
  teams
47920
48055
  };
@@ -48009,6 +48144,9 @@ function generateParticipants({
48009
48144
  const isoMin = getMin(nationalityCodesCount);
48010
48145
  const isoList = isoMin ? shuffleArray(isoCountries).slice(0, nationalityCodesCount) : nationalityCodes ? isoCountries.filter(isoCountry => nationalityCodes.includes(isoCountry.key)) : isoCountries;
48011
48146
  const countriesList = shuffleArray(generateRange(0, Math.ceil(individualParticipantsCount / (isoMin || 1))).map(() => isoList).flat(Infinity));
48147
+ const teamNames = teamMocks({
48148
+ count: participantsCount
48149
+ }).teams;
48012
48150
  const participants = generateRange(0, participantsCount).map(i => {
48013
48151
  const sideParticipantsCount = doubles ? 2 : team ? 8 : 1;
48014
48152
  const individualParticipants = generateRange(0, sideParticipantsCount).map(j => {
@@ -48021,7 +48159,7 @@ function generateParticipants({
48021
48159
  participantId: (uuids === null || uuids === void 0 ? void 0 : uuids.pop()) || UUID(),
48022
48160
  participantType: doubles ? PAIR$1 : TEAM$1,
48023
48161
  participantRole: COMPETITOR,
48024
- participantName: doubles ? pairName : teamMocks().teams[0],
48162
+ participantName: doubles ? pairName : teamNames[i],
48025
48163
  individualParticipantIds
48026
48164
  };
48027
48165
  if (inContext) groupParticipant.individualParticipants = individualParticipants;
@@ -48561,12 +48699,15 @@ function generateEventWithFlights({
48561
48699
  drawProfiles = [],
48562
48700
  eventExtensions,
48563
48701
  surfaceCategory,
48702
+ tieFormatName,
48564
48703
  discipline,
48565
48704
  eventLevel,
48566
48705
  ballType,
48567
48706
  category
48568
48707
  } = eventProfile;
48569
- const tieFormat = eventProfile.tieFormat || (eventType === TEAM$2 ? tieFormatDefaults() : undefined);
48708
+ const tieFormat = eventProfile.tieFormat || (eventType === TEAM$2 ? tieFormatDefaults({
48709
+ namedFormat: tieFormatName
48710
+ }) : undefined);
48570
48711
  let targetParticipants = tournamentRecord.participants;
48571
48712
  let uniqueDrawParticipants = [];
48572
48713
 
@@ -49354,15 +49495,15 @@ function generateTournamentRecord({
49354
49495
  const isTeam = eventType === TEAM$2;
49355
49496
 
49356
49497
  if (isTeam) {
49357
- var _tieFormat$collection;
49498
+ var _tieFormat, _tieFormat$collection;
49358
49499
 
49359
49500
  let teamDoublesCount = 0,
49360
49501
  teamSinglesCount = 0;
49361
49502
  largestTeamDraw = Math.max(largestTeamDraw, drawSize + alternatesCount);
49362
- typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
49503
+ tieFormat = typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
49363
49504
  namedFormat: tieFormatName
49364
49505
  });
49365
- tieFormat === null || tieFormat === void 0 ? void 0 : (_tieFormat$collection = tieFormat.collectionDefinitions) === null || _tieFormat$collection === void 0 ? void 0 : _tieFormat$collection.forEach(collectionDefinition => {
49506
+ (_tieFormat = tieFormat) === null || _tieFormat === void 0 ? void 0 : (_tieFormat$collection = _tieFormat.collectionDefinitions) === null || _tieFormat$collection === void 0 ? void 0 : _tieFormat$collection.forEach(collectionDefinition => {
49366
49507
  // ensure every collectionDefinition has a collectionId
49367
49508
  if (!collectionDefinition.collectionId) collectionDefinition.collectionId = UUID();
49368
49509
 
@@ -49386,10 +49527,14 @@ function generateTournamentRecord({
49386
49527
  if (!isDoubles && !isTeam && drawSize && drawSize > largestSinglesDraw) largestSinglesDraw = drawSize + alternatesCount;
49387
49528
  };
49388
49529
 
49389
- eventProfiles === null || eventProfiles === void 0 ? void 0 : eventProfiles.forEach(({
49390
- eventType,
49391
- drawProfiles
49392
- }) => {
49530
+ eventProfiles === null || eventProfiles === void 0 ? void 0 : eventProfiles.forEach(eventProfile => {
49531
+ const {
49532
+ tieFormatName: eventTieFormatName,
49533
+ tieFormat: eventTieFormat,
49534
+ drawProfiles,
49535
+ eventType
49536
+ } = eventProfile;
49537
+
49393
49538
  if (drawProfiles) {
49394
49539
  for (const drawProfile of drawProfiles) {
49395
49540
  const {
@@ -49399,10 +49544,10 @@ function generateTournamentRecord({
49399
49544
  tieFormatName
49400
49545
  } = drawProfile;
49401
49546
  processDrawProfile({
49547
+ tieFormatName: tieFormatName || eventTieFormatName,
49548
+ tieFormat: tieFormat || eventTieFormat,
49402
49549
  alternatesCount,
49403
- tieFormatName,
49404
49550
  eventType,
49405
- tieFormat,
49406
49551
  drawSize
49407
49552
  });
49408
49553
  }
@@ -49738,6 +49883,7 @@ const factoryConstants = {
49738
49883
  scaleConstants,
49739
49884
  scheduleConstants,
49740
49885
  surfaceConstants,
49886
+ tieFormatConstants,
49741
49887
  timeItemConstants,
49742
49888
  topicConstants,
49743
49889
  venueConstants