tods-competition-factory 1.6.23 → 1.6.24

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.
@@ -362,7 +362,7 @@ var matchUpFormatCode = {
362
362
  };
363
363
 
364
364
  function factoryVersion() {
365
- return '1.6.23';
365
+ return '1.6.24';
366
366
  }
367
367
 
368
368
  /******************************************************************************
@@ -639,6 +639,9 @@ function shuffleArray(arr) {
639
639
  .sort(function (a, b) { return a[0] - b[0]; })
640
640
  .map(function (a) { return a[1]; });
641
641
  }
642
+ function numericSortValue(v) {
643
+ return isConvertableInteger(v) ? v : Infinity;
644
+ }
642
645
  // return an object whose attributes are values and whose values are counts for values
643
646
  // e.g. values=[1,2,2,3,4,4,5] produces { 1: 1, 2: 2, 3: 1, 4: 2, 5: 1}
644
647
  function instanceCount(values) {
@@ -4827,6 +4830,7 @@ var POLICY_TYPE_PARTICIPANT = 'participant';
4827
4830
  var POLICY_TYPE_PROGRESSION = 'progression';
4828
4831
  var POLICY_TYPE_SCHEDULING = 'scheduling';
4829
4832
  var POLICY_TYPE_AVOIDANCE = 'avoidance';
4833
+ var POLICY_TYPE_DISPLAY = 'display'; // storage for client type displays, e.g. { public: {}, admin: {} }
4830
4834
  var POLICY_TYPE_SCORING = 'scoring';
4831
4835
  var POLICY_TYPE_SEEDING = 'seeding';
4832
4836
  var POLICY_TYPE_FEED_IN = 'feedIn';
@@ -4844,6 +4848,7 @@ var policyConstants = {
4844
4848
  POLICY_TYPE_PROGRESSION: POLICY_TYPE_PROGRESSION,
4845
4849
  POLICY_TYPE_SCHEDULING: POLICY_TYPE_SCHEDULING,
4846
4850
  POLICY_TYPE_AVOIDANCE: POLICY_TYPE_AVOIDANCE,
4851
+ POLICY_TYPE_DISPLAY: POLICY_TYPE_DISPLAY,
4847
4852
  POLICY_TYPE_FEED_IN: POLICY_TYPE_FEED_IN,
4848
4853
  POLICY_TYPE_SCORING: POLICY_TYPE_SCORING,
4849
4854
  POLICY_TYPE_SEEDING: POLICY_TYPE_SEEDING,
@@ -39197,7 +39202,7 @@ function addCourts$1(_a) {
39197
39202
 
39198
39203
  function modifyVenue$1(_a) {
39199
39204
  var e_1, _b;
39200
- var _c, _d, _e, _f;
39205
+ var _c, _d, _e, _f, _g;
39201
39206
  var tournamentRecord = _a.tournamentRecord, modifications = _a.modifications, venueId = _a.venueId, force = _a.force;
39202
39207
  if (!tournamentRecord)
39203
39208
  return { error: MISSING_TOURNAMENT_RECORD };
@@ -39225,25 +39230,25 @@ function modifyVenue$1(_a) {
39225
39230
  var _a;
39226
39231
  return Object.assign(venue, (_a = {}, _a[attribute] = modifications[attribute], _a));
39227
39232
  });
39228
- var existingCourtIds = ((_c = venue === null || venue === void 0 ? void 0 : venue.courts) === null || _c === void 0 ? void 0 : _c.map(function (court) { return court.courtId; })) || [];
39229
- var courtIdsToModify = ((_d = modifications.courts) === null || _d === void 0 ? void 0 : _d.map(function (court) { return court.courtId; })) || [];
39233
+ var existingCourtIds = (_d = (_c = venue === null || venue === void 0 ? void 0 : venue.courts) === null || _c === void 0 ? void 0 : _c.map(function (court) { return court.courtId; })) !== null && _d !== void 0 ? _d : [];
39234
+ var courtIdsToModify = ((_e = modifications.courts) === null || _e === void 0 ? void 0 : _e.map(function (court) { return court.courtId; })) || [];
39230
39235
  var courtIdsToDelete = existingCourtIds.filter(function (courtId) { return !courtIdsToModify.includes(courtId); });
39231
39236
  if (courtIdsToDelete.length) {
39232
- var courtsToDelete = (_e = venue === null || venue === void 0 ? void 0 : venue.courts) === null || _e === void 0 ? void 0 : _e.filter(function (court) {
39237
+ var courtsToDelete = (_f = venue === null || venue === void 0 ? void 0 : venue.courts) === null || _f === void 0 ? void 0 : _f.filter(function (court) {
39233
39238
  return courtIdsToDelete.includes(court.courtId);
39234
39239
  });
39235
39240
  var scheduleDeletionsCount = courtsToDelete === null || courtsToDelete === void 0 ? void 0 : courtsToDelete.map(function (court) {
39236
- var _a;
39241
+ var _a, _b;
39237
39242
  // check whether deleting court would remove schedule from any matchUps
39238
39243
  var result = getScheduledCourtMatchUps({
39239
39244
  courtId: court.courtId,
39240
39245
  tournamentRecord: tournamentRecord,
39241
39246
  venueMatchUps: venueMatchUps,
39242
39247
  });
39243
- return ((_a = result.matchUps) === null || _a === void 0 ? void 0 : _a.length) || 0;
39248
+ return (_b = (_a = result.matchUps) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
39244
39249
  }).reduce(function (a, b) { return a + b; });
39245
39250
  if (venue && (!scheduleDeletionsCount || force)) {
39246
- venue.courts = (_f = venue.courts) === null || _f === void 0 ? void 0 : _f.filter(function (court) {
39251
+ venue.courts = (_g = venue.courts) === null || _g === void 0 ? void 0 : _g.filter(function (court) {
39247
39252
  return courtIdsToModify.includes(court.courtId);
39248
39253
  });
39249
39254
  }
@@ -39255,8 +39260,8 @@ function modifyVenue$1(_a) {
39255
39260
  }
39256
39261
  if (modifications.courts) {
39257
39262
  try {
39258
- for (var _g = __values(modifications.courts), _h = _g.next(); !_h.done; _h = _g.next()) {
39259
- var court = _h.value;
39263
+ for (var _h = __values(modifications.courts), _j = _h.next(); !_j.done; _j = _h.next()) {
39264
+ var court = _j.value;
39260
39265
  var courtId = (court || {}).courtId;
39261
39266
  var result_1 = modifyCourt$1({
39262
39267
  modifications: court,
@@ -39281,7 +39286,7 @@ function modifyVenue$1(_a) {
39281
39286
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
39282
39287
  finally {
39283
39288
  try {
39284
- if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
39289
+ if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
39285
39290
  }
39286
39291
  finally { if (e_1) throw e_1.error; }
39287
39292
  }
@@ -45660,6 +45665,29 @@ function deleteAdHocMatchUps$1(_a) {
45660
45665
  return __assign({}, SUCCESS);
45661
45666
  }
45662
45667
 
45668
+ function setStructureOrder(_a) {
45669
+ var drawDefinition = _a.drawDefinition, orderMap = _a.orderMap;
45670
+ if (!drawDefinition)
45671
+ return { error: MISSING_DRAW_DEFINITION };
45672
+ if (typeof orderMap !== 'object' ||
45673
+ !Object.values(orderMap).every(function (val) { return isConvertableInteger(val); }))
45674
+ decorateResult({
45675
+ result: { error: INVALID_VALUES },
45676
+ context: { orderMap: orderMap },
45677
+ });
45678
+ if (!drawDefinition.structures)
45679
+ drawDefinition.structures = [];
45680
+ drawDefinition.structures.forEach(function (structure) {
45681
+ var structureOrder = orderMap[structure.structureId];
45682
+ if (structureOrder)
45683
+ structure.structureOrder = structureOrder;
45684
+ });
45685
+ drawDefinition.structures.sort(function (a, b) {
45686
+ return numericSortValue(a.structureOrder) - numericSortValue(b.structureOrder);
45687
+ });
45688
+ return __assign({}, SUCCESS);
45689
+ }
45690
+
45663
45691
  function renameStructures$1(_a) {
45664
45692
  var e_1, _b;
45665
45693
  var drawDefinition = _a.drawDefinition, structureDetails = _a.structureDetails;
@@ -45929,6 +45957,7 @@ var structureGovernor = {
45929
45957
  generateAndPopulatePlayoffStructures: generateAndPopulatePlayoffStructures,
45930
45958
  attachPlayoffStructures: attachPlayoffStructures$1,
45931
45959
  addPlayoffStructures: addPlayoffStructures$1,
45960
+ setStructureOrder: setStructureOrder,
45932
45961
  renameStructures: renameStructures$1,
45933
45962
  generateQualifyingStructure: generateQualifyingStructure$1,
45934
45963
  attachQualifyingStructure: attachQualifyingStructure$1,
@@ -48143,11 +48172,15 @@ function eliminationSwap(_a) {
48143
48172
  return qualifier;
48144
48173
  }).length === 2)
48145
48174
  return __assign({}, SUCCESS);
48175
+ var isQualifierSwap = assignments.some(function (_a) {
48176
+ var qualifier = _a.qualifier;
48177
+ return qualifier;
48178
+ });
48146
48179
  var isByeSwap = assignments.some(function (_a) {
48147
48180
  var bye = _a.bye;
48148
48181
  return bye;
48149
48182
  });
48150
- if (isByeSwap) {
48183
+ if (isByeSwap && !isQualifierSwap) {
48151
48184
  return swapParticipantIdWithBYE({
48152
48185
  inContextDrawMatchUps: inContextDrawMatchUps,
48153
48186
  tournamentRecord: tournamentRecord,
@@ -48159,7 +48192,7 @@ function eliminationSwap(_a) {
48159
48192
  });
48160
48193
  }
48161
48194
  else {
48162
- return eliminationParticipantSwap({
48195
+ return eliminationPosiitonSwap({
48163
48196
  inContextDrawMatchUps: inContextDrawMatchUps,
48164
48197
  tournamentRecord: tournamentRecord,
48165
48198
  drawDefinition: drawDefinition,
@@ -48228,7 +48261,7 @@ function swapParticipantIdWithBYE(_a) {
48228
48261
  return result;
48229
48262
  return __assign({}, SUCCESS);
48230
48263
  }
48231
- function eliminationParticipantSwap(_a) {
48264
+ function eliminationPosiitonSwap(_a) {
48232
48265
  var inContextDrawMatchUps = _a.inContextDrawMatchUps, tournamentRecord = _a.tournamentRecord, drawDefinition = _a.drawDefinition, assignments = _a.assignments, matchUpsMap = _a.matchUpsMap, structure = _a.structure, event = _a.event;
48233
48266
  // preserves order of drawPositions in original positionAssignments array
48234
48267
  // while insuring that all attributes are faithfully copied over and only drawPosition is swapped
@@ -48280,11 +48313,15 @@ function roundRobinSwap(_a) {
48280
48313
  structure: structure,
48281
48314
  event: event,
48282
48315
  });
48316
+ var isQualifierSwap = assignments.some(function (_a) {
48317
+ var qualifier = _a.qualifier;
48318
+ return qualifier;
48319
+ });
48283
48320
  var isByeSwap = assignments.some(function (_a) {
48284
48321
  var bye = _a.bye;
48285
48322
  return bye;
48286
48323
  });
48287
- if (isByeSwap) {
48324
+ if (isByeSwap && !isQualifierSwap) {
48288
48325
  swapParticipantIdWithBYE({
48289
48326
  inContextDrawMatchUps: inContextDrawMatchUps,
48290
48327
  tournamentRecord: tournamentRecord,
@@ -48541,8 +48578,8 @@ var DEFAULT_RATING = 0;
48541
48578
  var MAX_ITERATIONS = 5000;
48542
48579
  function generateDrawMaticRound(_a) {
48543
48580
  var e_1, _b, e_2, _c, e_3, _d;
48544
- var _e;
48545
- var _f = _a.maxIterations, maxIterations = _f === void 0 ? MAX_ITERATIONS : _f, _g = _a.generateMatchUps, generateMatchUps = _g === void 0 ? true : _g, tournamentParticipants = _a.tournamentParticipants, tournamentRecord = _a.tournamentRecord, participantIds = _a.participantIds, addToStructure = _a.addToStructure, drawDefinition = _a.drawDefinition, adHocRatings = _a.adHocRatings, structureId = _a.structureId, matchUpIds = _a.matchUpIds, eventType = _a.eventType, structure = _a.structure;
48581
+ var _e, _f;
48582
+ var _g = _a.maxIterations, maxIterations = _g === void 0 ? MAX_ITERATIONS : _g, _h = _a.generateMatchUps, generateMatchUps = _h === void 0 ? true : _h, tournamentParticipants = _a.tournamentParticipants, tournamentRecord = _a.tournamentRecord, participantIds = _a.participantIds, addToStructure = _a.addToStructure, drawDefinition = _a.drawDefinition, adHocRatings = _a.adHocRatings, structureId = _a.structureId, matchUpIds = _a.matchUpIds, eventType = _a.eventType, structure = _a.structure;
48546
48583
  if (!drawDefinition)
48547
48584
  return { error: MISSING_DRAW_DEFINITION };
48548
48585
  if (!structure && !structureId)
@@ -48588,7 +48625,7 @@ function generateDrawMaticRound(_a) {
48588
48625
  // add SAME_TEAM_VALUE for participants who appear on the same team
48589
48626
  for (var teamParticipants_1 = __values(teamParticipants), teamParticipants_1_1 = teamParticipants_1.next(); !teamParticipants_1_1.done; teamParticipants_1_1 = teamParticipants_1.next()) {
48590
48627
  var teamParticipant = teamParticipants_1_1.value;
48591
- var participantIds_1 = teamParticipant.individualParticipantIds || [];
48628
+ var participantIds_1 = (_f = teamParticipant.individualParticipantIds) !== null && _f !== void 0 ? _f : [];
48592
48629
  var uniquePairings_2 = getPairingsData({ participantIds: participantIds_1 }).uniquePairings;
48593
48630
  try {
48594
48631
  for (var uniquePairings_1 = (e_3 = void 0, __values(uniquePairings_2)), uniquePairings_1_1 = uniquePairings_1.next(); !uniquePairings_1_1.done; uniquePairings_1_1 = uniquePairings_1.next()) {
@@ -48621,9 +48658,9 @@ function generateDrawMaticRound(_a) {
48621
48658
  // 'P-I-0|P-I-2': 0,
48622
48659
  // 'P-I-0|P-I-3': 0
48623
48660
  // }
48624
- var _h = getPairingsData({
48661
+ var _j = getPairingsData({
48625
48662
  participantIds: participantIds,
48626
- }), uniquePairings = _h.uniquePairings, possiblePairings = _h.possiblePairings, deltaObjects = _h.deltaObjects;
48663
+ }), uniquePairings = _j.uniquePairings, possiblePairings = _j.possiblePairings, deltaObjects = _j.deltaObjects;
48627
48664
  var params = {
48628
48665
  tournamentParticipants: tournamentParticipants,
48629
48666
  possiblePairings: possiblePairings,
@@ -48637,7 +48674,7 @@ function generateDrawMaticRound(_a) {
48637
48674
  eventType: eventType,
48638
48675
  structure: structure,
48639
48676
  };
48640
- var _j = getPairings(params), candidatesCount = _j.candidatesCount, participantIdPairings = _j.participantIdPairings, iterations = _j.iterations;
48677
+ var _k = getPairings(params), candidatesCount = _k.candidatesCount, participantIdPairings = _k.participantIdPairings, iterations = _k.iterations;
48641
48678
  if (!candidatesCount)
48642
48679
  return { error: NO_CANDIDATES };
48643
48680
  var matchUps;
@@ -51239,13 +51276,19 @@ function getOrderedTieFormat(_a) {
51239
51276
  if (collectionOrder)
51240
51277
  collectionDefinition.collectionOrder = collectionOrder;
51241
51278
  });
51242
- orderedTieFormat.collectionDefinitions.sort(function (a, b) { return a.collectionOrder - b.collectionOrder; });
51279
+ orderedTieFormat.collectionDefinitions.sort(function (a, b) {
51280
+ return numericSortValue(a.collectionOrder) - numericSortValue(b.collectionOrder);
51281
+ });
51243
51282
  return orderedTieFormat;
51244
51283
  }
51245
51284
  function orderCollectionDefinitions(_a) {
51246
51285
  var tournamentRecord = _a.tournamentRecord, drawDefinition = _a.drawDefinition, structureId = _a.structureId, matchUpId = _a.matchUpId, orderMap = _a.orderMap, eventId = _a.eventId, matchUp = _a.matchUp, event = _a.event;
51247
- if (typeof orderMap !== 'object')
51248
- return { error: INVALID_VALUES, orderMap: orderMap };
51286
+ if (typeof orderMap !== 'object' ||
51287
+ !Object.values(orderMap).every(function (val) { return isConvertableInteger(val); }))
51288
+ return decorateResult({
51289
+ result: { error: INVALID_VALUES },
51290
+ context: { orderMap: orderMap },
51291
+ });
51249
51292
  if (eventId && (event === null || event === void 0 ? void 0 : event.tieFormat)) {
51250
51293
  updateEventTieFormat({ tournamentRecord: tournamentRecord, event: event, orderMap: orderMap });
51251
51294
  }
@@ -52884,7 +52927,8 @@ function modifyTieFormat(_a) {
52884
52927
  processedTieFormat.collectionDefinitions =
52885
52928
  processedTieFormat.collectionDefinitions
52886
52929
  .sort(function (a, b) {
52887
- return (a.collectionOrder || Infinity) - (b.collectionOrder || Infinity);
52930
+ return numericSortValue(a.collectionOrder) -
52931
+ numericSortValue(b.collectionOrder);
52888
52932
  })
52889
52933
  .map(function (def, i) { return (__assign(__assign({}, def), { collectionOrder: i + 1 })); });
52890
52934
  return __assign(__assign({}, SUCCESS), { processedTieFormat: processedTieFormat });
@@ -58805,19 +58849,29 @@ function removeTieMatchUpParticipantId(params) {
58805
58849
  }
58806
58850
 
58807
58851
  function getPositionAssignments(_a) {
58808
- var tournamentRecord = _a.tournamentRecord, drawDefinition = _a.drawDefinition, structureId = _a.structureId, structure = _a.structure;
58852
+ var _b;
58853
+ var tournamentRecord = _a.tournamentRecord, drawDefinition = _a.drawDefinition, _c = _a.stage, stage = _c === void 0 ? MAIN : _c, structureId = _a.structureId, structure = _a.structure;
58809
58854
  if (!tournamentRecord)
58810
58855
  return { error: MISSING_TOURNAMENT_RECORD };
58811
58856
  if (!structure && !drawDefinition)
58812
58857
  return { error: MISSING_DRAW_DEFINITION };
58858
+ if (!structure &&
58859
+ !structureId &&
58860
+ ((_b = drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.structures) === null || _b === void 0 ? void 0 : _b.filter(function (structure) { return structure.stage === stage; }).length) === 1) {
58861
+ structure = drawDefinition.structures.find(function (structure) { return structure.stage === stage; });
58862
+ }
58813
58863
  if (!structure && !structureId)
58814
58864
  return { error: MISSING_STRUCTURE_ID };
58815
- var _b = getPositionAssignments$1({
58865
+ var _d = getPositionAssignments$1({
58816
58866
  drawDefinition: drawDefinition,
58817
58867
  structureId: structureId,
58818
58868
  structure: structure,
58819
- }), error = _b.error, assignments = _b.positionAssignments;
58820
- return { error: error, positionAssignments: assignments || [] };
58869
+ }), error = _d.error, assignments = _d.positionAssignments;
58870
+ return {
58871
+ error: error,
58872
+ positionAssignments: assignments || [],
58873
+ structureId: structure === null || structure === void 0 ? void 0 : structure.structureId,
58874
+ };
58821
58875
  }
58822
58876
 
58823
58877
  function deleteDrawDefinitions(_a) {
@@ -61856,12 +61910,13 @@ function addVoluntaryConsolationStructure(params) {
61856
61910
  }
61857
61911
 
61858
61912
  function prepareStage(params) {
61913
+ var _a;
61859
61914
  var seedsCount = params.seedsCount;
61860
61915
  var preparedStructureIds = params.preparedStructureIds || [];
61861
- var provisionalPositioning = params.provisionalPositioning, inContextDrawMatchUps = params.inContextDrawMatchUps, tournamentRecord = params.tournamentRecord, appliedPolicies = params.appliedPolicies, qualifyingOnly = params.qualifyingOnly, drawDefinition = params.drawDefinition, seedingProfile = params.seedingProfile, participants = params.participants, matchUpsMap = params.matchUpsMap, automated = params.automated, placeByes = params.placeByes, drawType = params.drawType, drawSize = params.drawSize, entries = params.entries, event = params.event, _a = params.enforcePolicyLimits, enforcePolicyLimits = _a === void 0 ? true : _a, seedAssignmentProfile = params.seedAssignmentProfile, // mainly used by mocksEngine for scenario testing
61862
- _b = params.seedByRanking, // mainly used by mocksEngine for scenario testing
61863
- seedByRanking = _b === void 0 ? true : _b, seededParticipants = params.seededParticipants, assignSeedsCount = params.assignSeedsCount, // used for testing bye placement next to seeds
61864
- seedingScaleName = params.seedingScaleName, _c = params.stageSequence, stageSequence = _c === void 0 ? 1 : _c, roundTarget = params.roundTarget, stage = params.stage;
61916
+ var provisionalPositioning = params.provisionalPositioning, inContextDrawMatchUps = params.inContextDrawMatchUps, tournamentRecord = params.tournamentRecord, appliedPolicies = params.appliedPolicies, qualifyingOnly = params.qualifyingOnly, drawDefinition = params.drawDefinition, seedingProfile = params.seedingProfile, participants = params.participants, matchUpsMap = params.matchUpsMap, automated = params.automated, placeByes = params.placeByes, drawType = params.drawType, drawSize = params.drawSize, entries = params.entries, event = params.event, _b = params.enforcePolicyLimits, enforcePolicyLimits = _b === void 0 ? true : _b, seedAssignmentProfile = params.seedAssignmentProfile, // mainly used by mocksEngine for scenario testing
61917
+ _c = params.seedByRanking, // mainly used by mocksEngine for scenario testing
61918
+ seedByRanking = _c === void 0 ? true : _c, seededParticipants = params.seededParticipants, assignSeedsCount = params.assignSeedsCount, // used for testing bye placement next to seeds
61919
+ seedingScaleName = params.seedingScaleName, _d = params.stageSequence, stageSequence = _d === void 0 ? 1 : _d, roundTarget = params.roundTarget, stage = params.stage;
61865
61920
  var eventType = event === null || event === void 0 ? void 0 : event.eventType;
61866
61921
  var stageEntries = entries.filter(function (entry) {
61867
61922
  var _a, _b;
@@ -61951,7 +62006,7 @@ function prepareStage(params) {
61951
62006
  }
61952
62007
  else if (event || seedingScaleName) {
61953
62008
  // if no seededParticipants have been defined, seed by seeding scale or ranking scale, if present
61954
- var _d = (event === null || event === void 0 ? void 0 : event.category) || {}, categoryName = _d.categoryName, ageCategoryCode = _d.ageCategoryCode;
62009
+ var _e = (event === null || event === void 0 ? void 0 : event.category) || {}, categoryName = _e.categoryName, ageCategoryCode = _e.ageCategoryCode;
61955
62010
  var seedingScaleAttributes = {
61956
62011
  scaleType: SEEDING$1,
61957
62012
  scaleName: seedingScaleName || categoryName || ageCategoryCode || event.eventId,
@@ -61978,7 +62033,7 @@ function prepareStage(params) {
61978
62033
  stage: stage,
61979
62034
  }).scaledEntries);
61980
62035
  }
61981
- var scaledEntriesCount = (scaledEntries === null || scaledEntries === void 0 ? void 0 : scaledEntries.length) || 0;
62036
+ var scaledEntriesCount = (_a = scaledEntries === null || scaledEntries === void 0 ? void 0 : scaledEntries.length) !== null && _a !== void 0 ? _a : 0;
61982
62037
  if (scaledEntriesCount < seedsCount)
61983
62038
  seedsCount = scaledEntriesCount;
61984
62039
  scaledEntries === null || scaledEntries === void 0 ? void 0 : scaledEntries.filter(function (_a) {
@@ -62531,6 +62586,12 @@ function renameStructures(params) {
62531
62586
  return renameStructures$1(params);
62532
62587
  }
62533
62588
 
62589
+ function resetMatchUpLineUps(params) {
62590
+ if (!params.tournamentRecord)
62591
+ return { error: MISSING_TOURNAMENT_RECORD };
62592
+ return resetMatchUpLineUps$1(params);
62593
+ }
62594
+
62534
62595
  function aggregateTieFormats(_a) {
62535
62596
  var e_1, _b;
62536
62597
  var _c, _d, _e, _f, _g;
@@ -62706,18 +62767,13 @@ function enableTieAutoCalc(params) {
62706
62767
  return enableTieAutoCalc$1(params);
62707
62768
  }
62708
62769
 
62709
- function resetMatchUpLineUps(params) {
62710
- if (!params.tournamentRecord)
62711
- return { error: MISSING_TOURNAMENT_RECORD };
62712
- return resetMatchUpLineUps$1(params);
62713
- }
62714
-
62715
62770
  var eventGovernor = {
62716
62771
  generateQualifyingStructure: generateQualifyingStructure,
62717
62772
  attachQualifyingStructure: attachQualifyingStructure,
62718
62773
  attachPlayoffStructures: attachPlayoffStructures,
62719
- attachStructures: attachStructures,
62720
62774
  addQualifyingStructure: addQualifyingStructure,
62775
+ setStructureOrder: setStructureOrder,
62776
+ attachStructures: attachStructures,
62721
62777
  renameStructures: renameStructures,
62722
62778
  disableTieAutoCalc: disableTieAutoCalc,
62723
62779
  enableTieAutoCalc: enableTieAutoCalc,