tods-competition-factory 0.52.2 → 0.53.3
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/tods-competition-factory.cjs.development.js +233 -79
- package/dist/tods-competition-factory.cjs.development.js.map +1 -1
- package/dist/tods-competition-factory.esm.js +233 -79
- package/dist/tods-competition-factory.esm.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +5 -5
|
@@ -3767,7 +3767,7 @@ function validateTieFormat({
|
|
|
3767
3767
|
return false;
|
|
3768
3768
|
}
|
|
3769
3769
|
|
|
3770
|
-
if (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$
|
|
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$
|
|
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
|
|
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:
|
|
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:
|
|
7081
|
+
matchUpFormat: "SET3-S:6/TB7",
|
|
7056
7082
|
matchUpType: "SINGLES",
|
|
7057
7083
|
matchUpValue: 1
|
|
7058
7084
|
}
|
|
7059
7085
|
];
|
|
7060
|
-
var tieFormatName$1 = "
|
|
7086
|
+
var tieFormatName$1 = "COLLEGE_JUCO";
|
|
7061
7087
|
var winCriteria$2 = {
|
|
7062
7088
|
valueGoal: 5
|
|
7063
7089
|
};
|
|
7064
|
-
var
|
|
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:
|
|
7074
|
-
matchUpFormat: "SET1-S:
|
|
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:
|
|
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 = "
|
|
7112
|
+
var tieFormatName = "DOMINANT_DUO";
|
|
7087
7113
|
var winCriteria$1 = {
|
|
7088
|
-
valueGoal:
|
|
7114
|
+
valueGoal: 2
|
|
7089
7115
|
};
|
|
7090
|
-
var
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
27486
|
+
return '0.53.3';
|
|
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;
|
|
@@ -36679,7 +36711,8 @@ function feedInChampionship(params = {}) {
|
|
|
36679
36711
|
|
|
36680
36712
|
function generateTieMatchUps({
|
|
36681
36713
|
tieFormat,
|
|
36682
|
-
uuids
|
|
36714
|
+
uuids,
|
|
36715
|
+
isMock
|
|
36683
36716
|
}) {
|
|
36684
36717
|
const {
|
|
36685
36718
|
collectionDefinitions
|
|
@@ -36694,7 +36727,7 @@ function generateTieMatchUps({
|
|
|
36694
36727
|
const matchUps = generateRange(0, matchUpCount || 0).map(index => {
|
|
36695
36728
|
const collectionPosition = index + 1;
|
|
36696
36729
|
const matchUp = {
|
|
36697
|
-
isMock
|
|
36730
|
+
isMock,
|
|
36698
36731
|
collectionId,
|
|
36699
36732
|
matchUpType,
|
|
36700
36733
|
matchUpFormat,
|
|
@@ -37286,6 +37319,7 @@ function generateDrawType(params = {}) {
|
|
|
37286
37319
|
structureName,
|
|
37287
37320
|
goesTo = true,
|
|
37288
37321
|
stage = MAIN,
|
|
37322
|
+
isMock,
|
|
37289
37323
|
uuids // qualifyingPositions, => passed through in params to treeMatchUps
|
|
37290
37324
|
// qualifyingRound, => passed through in params to treeMatchUps
|
|
37291
37325
|
// TODO: description => is this passed on?
|
|
@@ -37452,7 +37486,8 @@ function generateDrawType(params = {}) {
|
|
|
37452
37486
|
const {
|
|
37453
37487
|
tieMatchUps
|
|
37454
37488
|
} = generateTieMatchUps({
|
|
37455
|
-
tieFormat
|
|
37489
|
+
tieFormat,
|
|
37490
|
+
isMock
|
|
37456
37491
|
});
|
|
37457
37492
|
Object.assign(matchUp, {
|
|
37458
37493
|
tieMatchUps,
|
|
@@ -37871,8 +37906,22 @@ function newDrawDefinition({
|
|
|
37871
37906
|
});
|
|
37872
37907
|
}
|
|
37873
37908
|
|
|
37909
|
+
const COLLEGE_DEFAULT = 'COLLEGE_DEFAULT';
|
|
37910
|
+
const COLLEGE_JUCO = 'COLLEGE_JUCO';
|
|
37911
|
+
const COLLEGE_D3 = 'COLLEGE_D3';
|
|
37912
|
+
const DOMINANT_DUO = 'DOMINANT_DUO';
|
|
37913
|
+
const LAVER_CUP = 'LAVER_CUP';
|
|
37914
|
+
const tieFormatConstants = {
|
|
37915
|
+
COLLEGE_D3,
|
|
37916
|
+
COLLEGE_DEFAULT,
|
|
37917
|
+
COLLEGE_JUCO,
|
|
37918
|
+
DOMINANT_DUO,
|
|
37919
|
+
LAVER_CUP
|
|
37920
|
+
};
|
|
37921
|
+
|
|
37874
37922
|
const namedFormats = {
|
|
37875
37923
|
STANDARD: {
|
|
37924
|
+
hydrate: true,
|
|
37876
37925
|
doubles: {
|
|
37877
37926
|
matchUpCount: 3,
|
|
37878
37927
|
matchUpValue: 1
|
|
@@ -37883,7 +37932,8 @@ const namedFormats = {
|
|
|
37883
37932
|
},
|
|
37884
37933
|
valueGoal: 5
|
|
37885
37934
|
},
|
|
37886
|
-
COLLEGE_D3: {
|
|
37935
|
+
[COLLEGE_D3]: {
|
|
37936
|
+
hydrate: true,
|
|
37887
37937
|
doubles: {
|
|
37888
37938
|
matchUpCount: 3,
|
|
37889
37939
|
matchUpValue: 1,
|
|
@@ -37897,7 +37947,8 @@ const namedFormats = {
|
|
|
37897
37947
|
tieFormatName: 'COLLEGE_D3',
|
|
37898
37948
|
valueGoal: 5
|
|
37899
37949
|
},
|
|
37900
|
-
COLLEGE_DEFAULT: {
|
|
37950
|
+
[COLLEGE_DEFAULT]: {
|
|
37951
|
+
hydrate: true,
|
|
37901
37952
|
doubles: {
|
|
37902
37953
|
matchUpCount: 3,
|
|
37903
37954
|
collectionValue: 1,
|
|
@@ -37911,7 +37962,8 @@ const namedFormats = {
|
|
|
37911
37962
|
tieFormatName: 'COLLEGE_DEFAULT',
|
|
37912
37963
|
valueGoal: 4
|
|
37913
37964
|
},
|
|
37914
|
-
COLLEGE_JUCO: {
|
|
37965
|
+
[COLLEGE_JUCO]: {
|
|
37966
|
+
hydrate: true,
|
|
37915
37967
|
doubles: {
|
|
37916
37968
|
matchUpCount: 3,
|
|
37917
37969
|
matchUpValue: 1,
|
|
@@ -37920,11 +37972,13 @@ const namedFormats = {
|
|
|
37920
37972
|
singles: {
|
|
37921
37973
|
matchUpCount: 6,
|
|
37922
37974
|
matchUpValue: 1,
|
|
37923
|
-
matchUpFormat: 'SET3-S:6'
|
|
37975
|
+
matchUpFormat: 'SET3-S:6/TB7'
|
|
37924
37976
|
},
|
|
37925
37977
|
tieFormatName: 'COLLEGE_JUCO',
|
|
37926
37978
|
valueGoal: 5
|
|
37927
|
-
}
|
|
37979
|
+
},
|
|
37980
|
+
[LAVER_CUP]: LAVER_CUP_TIE_FORMAT,
|
|
37981
|
+
[DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT
|
|
37928
37982
|
};
|
|
37929
37983
|
const tieFormatDefaults = ({
|
|
37930
37984
|
namedFormat,
|
|
@@ -37935,6 +37989,7 @@ const tieFormatDefaults = ({
|
|
|
37935
37989
|
if (!Object.keys(namedFormats).includes(namedFormat)) namedFormat = 'STANDARD';
|
|
37936
37990
|
if (!Array.isArray(uuids)) uuids = [];
|
|
37937
37991
|
const template = namedFormats[namedFormat];
|
|
37992
|
+
if (!template.hydrate) return template;
|
|
37938
37993
|
const tieFormat = {
|
|
37939
37994
|
winCriteria: {
|
|
37940
37995
|
valueGoal: template.valueGoal
|
|
@@ -38033,9 +38088,9 @@ function generateDrawDefinition(params) {
|
|
|
38033
38088
|
matchUpType = matchUpType || eventType;
|
|
38034
38089
|
|
|
38035
38090
|
if (matchUpType === TEAM$3 && eventType === TEAM$3) {
|
|
38036
|
-
tieFormat = (tieFormat || tieFormatName) && (typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
|
|
38091
|
+
tieFormat = (tieFormat || (event === null || event === void 0 ? void 0 : event.tieFormat) || tieFormatName) && (typeof tieFormat === 'object' ? tieFormat : tieFormatName ? tieFormatDefaults({
|
|
38037
38092
|
namedFormat: tieFormatName
|
|
38038
|
-
}));
|
|
38093
|
+
}) : typeof (event === null || event === void 0 ? void 0 : event.tieFormat) === 'object' ? event.tieFormat : tieFormatDefaults());
|
|
38039
38094
|
matchUpFormat = undefined;
|
|
38040
38095
|
} else if (!matchUpFormat) {
|
|
38041
38096
|
tieFormat = undefined;
|
|
@@ -39735,6 +39790,7 @@ function addPlayoffStructures$1(params) {
|
|
|
39735
39790
|
roundProfiles,
|
|
39736
39791
|
roundNumbers,
|
|
39737
39792
|
idPrefix,
|
|
39793
|
+
isMock,
|
|
39738
39794
|
event,
|
|
39739
39795
|
uuids
|
|
39740
39796
|
} = params;
|
|
@@ -39802,6 +39858,7 @@ function addPlayoffStructures$1(params) {
|
|
|
39802
39858
|
stageSequence,
|
|
39803
39859
|
drawSize,
|
|
39804
39860
|
idPrefix,
|
|
39861
|
+
isMock,
|
|
39805
39862
|
uuids
|
|
39806
39863
|
});
|
|
39807
39864
|
|
|
@@ -39847,7 +39904,8 @@ function addPlayoffStructures$1(params) {
|
|
|
39847
39904
|
const {
|
|
39848
39905
|
tieMatchUps
|
|
39849
39906
|
} = generateTieMatchUps({
|
|
39850
|
-
tieFormat
|
|
39907
|
+
tieFormat,
|
|
39908
|
+
isMock
|
|
39851
39909
|
});
|
|
39852
39910
|
Object.assign(matchUp, {
|
|
39853
39911
|
tieMatchUps,
|
|
@@ -42310,6 +42368,74 @@ function getParticipantSignInStatus({
|
|
|
42310
42368
|
return timeItem && timeItem.itemValue === SIGNED_IN && SIGNED_IN;
|
|
42311
42369
|
}
|
|
42312
42370
|
|
|
42371
|
+
/**
|
|
42372
|
+
*
|
|
42373
|
+
* @param {object} tournamentRecord - passed in automatically by tournamentEngine
|
|
42374
|
+
* @param {string} drawId - optional - avoid brute force search for matchUp
|
|
42375
|
+
* @param {object} drawDefinition - passed in automatically by tournamentEngine when drawId provided
|
|
42376
|
+
* @param {string} eventId - optional - if only the default matchUpFormat for an event is required
|
|
42377
|
+
* @param {object} event - passed in automatically by tournamentEngine when drawId or eventId provided
|
|
42378
|
+
* @param {string} structureId - optional - if only the default matchUpFormat for a structure is required
|
|
42379
|
+
* @param {string} matchUpId - id of matchUp for which the scoped matchUpFormat(s) are desired
|
|
42380
|
+
*
|
|
42381
|
+
*/
|
|
42382
|
+
|
|
42383
|
+
function getTieFormat({
|
|
42384
|
+
tournamentRecord,
|
|
42385
|
+
drawDefinition,
|
|
42386
|
+
structureId,
|
|
42387
|
+
matchUpId,
|
|
42388
|
+
drawId,
|
|
42389
|
+
event
|
|
42390
|
+
}) {
|
|
42391
|
+
var _structure, _drawDefinition, _matchUpResult$matchU;
|
|
42392
|
+
|
|
42393
|
+
if (!tournamentRecord) return {
|
|
42394
|
+
error: MISSING_TOURNAMENT_RECORD
|
|
42395
|
+
};
|
|
42396
|
+
if (!drawId && !event && !structureId && !matchUpId) return {
|
|
42397
|
+
error: MISSING_VALUE
|
|
42398
|
+
};
|
|
42399
|
+
const matchUpResult = findMatchUp({
|
|
42400
|
+
tournamentRecord,
|
|
42401
|
+
drawDefinition,
|
|
42402
|
+
matchUpId,
|
|
42403
|
+
drawId,
|
|
42404
|
+
event
|
|
42405
|
+
});
|
|
42406
|
+
|
|
42407
|
+
if (matchUpId && matchUpResult !== null && matchUpResult !== void 0 && matchUpResult.error) {
|
|
42408
|
+
return matchUpResult;
|
|
42409
|
+
} else if (!drawDefinition && matchUpResult !== null && matchUpResult !== void 0 && matchUpResult.drawDefinition) {
|
|
42410
|
+
drawDefinition = matchUpResult === null || matchUpResult === void 0 ? void 0 : matchUpResult.drawDefinition;
|
|
42411
|
+
}
|
|
42412
|
+
|
|
42413
|
+
let structure = matchUpResult === null || matchUpResult === void 0 ? void 0 : matchUpResult.structure;
|
|
42414
|
+
|
|
42415
|
+
if (!structure && structureId && !matchUpId) {
|
|
42416
|
+
if (!drawDefinition) return {
|
|
42417
|
+
error: MISSING_DRAW_ID
|
|
42418
|
+
};
|
|
42419
|
+
const structureResult = findStructure({
|
|
42420
|
+
drawDefinition,
|
|
42421
|
+
structureId
|
|
42422
|
+
});
|
|
42423
|
+
if (structureResult.error) return structureResult;
|
|
42424
|
+
structure = structureResult.structure;
|
|
42425
|
+
}
|
|
42426
|
+
|
|
42427
|
+
const structureDefaultTieFormat = (_structure = structure) === null || _structure === void 0 ? void 0 : _structure.tieFormat;
|
|
42428
|
+
const drawDefaultTieFormat = (_drawDefinition = drawDefinition) === null || _drawDefinition === void 0 ? void 0 : _drawDefinition.tieFormat;
|
|
42429
|
+
const eventDefaultTieFormat = event === null || event === void 0 ? void 0 : event.tieFormat;
|
|
42430
|
+
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;
|
|
42431
|
+
return {
|
|
42432
|
+
structureDefaultTieFormat,
|
|
42433
|
+
eventDefaultTieFormat,
|
|
42434
|
+
drawDefaultTieFormat,
|
|
42435
|
+
tieFormat
|
|
42436
|
+
};
|
|
42437
|
+
}
|
|
42438
|
+
|
|
42313
42439
|
function getEventProperties({
|
|
42314
42440
|
tournamentRecord,
|
|
42315
42441
|
event
|
|
@@ -43379,6 +43505,7 @@ const queryGovernor$1 = {
|
|
|
43379
43505
|
findTournamentExtension,
|
|
43380
43506
|
findParticipantExtension,
|
|
43381
43507
|
findDrawDefinitionExtension,
|
|
43508
|
+
getTieFormat,
|
|
43382
43509
|
getMatchUpFormat,
|
|
43383
43510
|
getDrawDefinition,
|
|
43384
43511
|
getEventProperties,
|
|
@@ -47867,54 +47994,68 @@ function personMocks({
|
|
|
47867
47994
|
}
|
|
47868
47995
|
|
|
47869
47996
|
var teamsData = [
|
|
47997
|
+
"Ace Academy",
|
|
47870
47998
|
"Avengers",
|
|
47871
|
-
"
|
|
47872
|
-
"
|
|
47873
|
-
"Warriors",
|
|
47999
|
+
"Ball Bouncers",
|
|
48000
|
+
"Baseliners",
|
|
47874
48001
|
"Captivators",
|
|
47875
|
-
"
|
|
47876
|
-
"
|
|
47877
|
-
"
|
|
48002
|
+
"Civil Disobedients",
|
|
48003
|
+
"Continentals",
|
|
48004
|
+
"Court Royal",
|
|
48005
|
+
"Court Sharks",
|
|
48006
|
+
"Diamond Dogs",
|
|
48007
|
+
"Danger Zone",
|
|
48008
|
+
"Doubles Dominators",
|
|
48009
|
+
"Double Faults",
|
|
48010
|
+
"Tricksters",
|
|
48011
|
+
"Eliminators",
|
|
48012
|
+
"Court Crusaders",
|
|
48013
|
+
"Fuzz Busters",
|
|
48014
|
+
"Game Changers",
|
|
48015
|
+
"Goal Gurus",
|
|
48016
|
+
"Good Volley",
|
|
48017
|
+
"Green Machine",
|
|
47878
48018
|
"Hawk Eyes",
|
|
48019
|
+
"Inside Outers",
|
|
47879
48020
|
"Killer Instinct",
|
|
48021
|
+
"Line Toers",
|
|
47880
48022
|
"Masters of Mayhem",
|
|
47881
48023
|
"Matter Catchers",
|
|
48024
|
+
"Cheap Shot",
|
|
48025
|
+
"Mean Machines",
|
|
47882
48026
|
"Mindspace Invaders",
|
|
47883
|
-
"
|
|
47884
|
-
"
|
|
47885
|
-
"
|
|
48027
|
+
"Net Centric",
|
|
48028
|
+
"Net Positive",
|
|
48029
|
+
"Over Your Head",
|
|
48030
|
+
"Spin Meisters",
|
|
48031
|
+
"Aggressors",
|
|
48032
|
+
"Racket Machine",
|
|
48033
|
+
"Slice Happy",
|
|
48034
|
+
"Refs Nightmare",
|
|
48035
|
+
"Sandeaters",
|
|
48036
|
+
"Sun Seekers",
|
|
48037
|
+
"Slicer Dicers",
|
|
47886
48038
|
"Sparkle Soul Tribe",
|
|
47887
|
-
"
|
|
47888
|
-
"
|
|
47889
|
-
"The
|
|
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",
|
|
48039
|
+
"Stacked Deck",
|
|
48040
|
+
"Cross Stringers",
|
|
48041
|
+
"The Emergence",
|
|
47898
48042
|
"Total Demolition",
|
|
47899
48043
|
"Touch and Go",
|
|
48044
|
+
"Upside Downers",
|
|
47900
48045
|
"Vertically Challenged",
|
|
47901
|
-
"
|
|
47902
|
-
"Wind Chasers",
|
|
47903
|
-
"Worker Bees",
|
|
47904
|
-
"Razorbacks",
|
|
47905
|
-
"Rebels",
|
|
47906
|
-
"Fighting Crusaders",
|
|
47907
|
-
"Comets",
|
|
47908
|
-
"Commodores",
|
|
47909
|
-
"Green Machine",
|
|
47910
|
-
"Continentals"
|
|
48046
|
+
"Visual Spectacle"
|
|
47911
48047
|
];
|
|
47912
48048
|
|
|
47913
48049
|
function teamMocks({
|
|
47914
48050
|
count = 1
|
|
47915
48051
|
} = {}) {
|
|
47916
|
-
const
|
|
47917
|
-
const teams =
|
|
48052
|
+
const shuffledTeamNames = shuffleArray(teamsData);
|
|
48053
|
+
const teams = shuffledTeamNames.slice(0, count);
|
|
48054
|
+
|
|
48055
|
+
if (teams.length < count) {
|
|
48056
|
+
generateRange(0, count - teams.length).forEach(i => teams.push(`Team ${i + 1}`));
|
|
48057
|
+
}
|
|
48058
|
+
|
|
47918
48059
|
return {
|
|
47919
48060
|
teams
|
|
47920
48061
|
};
|
|
@@ -48009,6 +48150,9 @@ function generateParticipants({
|
|
|
48009
48150
|
const isoMin = getMin(nationalityCodesCount);
|
|
48010
48151
|
const isoList = isoMin ? shuffleArray(isoCountries).slice(0, nationalityCodesCount) : nationalityCodes ? isoCountries.filter(isoCountry => nationalityCodes.includes(isoCountry.key)) : isoCountries;
|
|
48011
48152
|
const countriesList = shuffleArray(generateRange(0, Math.ceil(individualParticipantsCount / (isoMin || 1))).map(() => isoList).flat(Infinity));
|
|
48153
|
+
const teamNames = teamMocks({
|
|
48154
|
+
count: participantsCount
|
|
48155
|
+
}).teams;
|
|
48012
48156
|
const participants = generateRange(0, participantsCount).map(i => {
|
|
48013
48157
|
const sideParticipantsCount = doubles ? 2 : team ? 8 : 1;
|
|
48014
48158
|
const individualParticipants = generateRange(0, sideParticipantsCount).map(j => {
|
|
@@ -48021,7 +48165,7 @@ function generateParticipants({
|
|
|
48021
48165
|
participantId: (uuids === null || uuids === void 0 ? void 0 : uuids.pop()) || UUID(),
|
|
48022
48166
|
participantType: doubles ? PAIR$1 : TEAM$1,
|
|
48023
48167
|
participantRole: COMPETITOR,
|
|
48024
|
-
participantName: doubles ? pairName :
|
|
48168
|
+
participantName: doubles ? pairName : teamNames[i],
|
|
48025
48169
|
individualParticipantIds
|
|
48026
48170
|
};
|
|
48027
48171
|
if (inContext) groupParticipant.individualParticipants = individualParticipants;
|
|
@@ -48561,12 +48705,15 @@ function generateEventWithFlights({
|
|
|
48561
48705
|
drawProfiles = [],
|
|
48562
48706
|
eventExtensions,
|
|
48563
48707
|
surfaceCategory,
|
|
48708
|
+
tieFormatName,
|
|
48564
48709
|
discipline,
|
|
48565
48710
|
eventLevel,
|
|
48566
48711
|
ballType,
|
|
48567
48712
|
category
|
|
48568
48713
|
} = eventProfile;
|
|
48569
|
-
const tieFormat = eventProfile.tieFormat || (eventType === TEAM$2 ? tieFormatDefaults(
|
|
48714
|
+
const tieFormat = eventProfile.tieFormat || (eventType === TEAM$2 ? tieFormatDefaults({
|
|
48715
|
+
namedFormat: tieFormatName
|
|
48716
|
+
}) : undefined);
|
|
48570
48717
|
let targetParticipants = tournamentRecord.participants;
|
|
48571
48718
|
let uniqueDrawParticipants = [];
|
|
48572
48719
|
|
|
@@ -48834,6 +48981,7 @@ function generateEventWithFlights({
|
|
|
48834
48981
|
...drawProfile.withPlayoffs,
|
|
48835
48982
|
tournamentRecord,
|
|
48836
48983
|
drawDefinition,
|
|
48984
|
+
isMock: true,
|
|
48837
48985
|
structureId,
|
|
48838
48986
|
event
|
|
48839
48987
|
});
|
|
@@ -49094,6 +49242,7 @@ function generateEventWithDraw({
|
|
|
49094
49242
|
const result = addPlayoffStructures({ ...drawProfile.withPlayoffs,
|
|
49095
49243
|
tournamentRecord,
|
|
49096
49244
|
drawDefinition,
|
|
49245
|
+
isMock: true,
|
|
49097
49246
|
structureId,
|
|
49098
49247
|
idPrefix,
|
|
49099
49248
|
event
|
|
@@ -49354,15 +49503,15 @@ function generateTournamentRecord({
|
|
|
49354
49503
|
const isTeam = eventType === TEAM$2;
|
|
49355
49504
|
|
|
49356
49505
|
if (isTeam) {
|
|
49357
|
-
var _tieFormat$collection;
|
|
49506
|
+
var _tieFormat, _tieFormat$collection;
|
|
49358
49507
|
|
|
49359
49508
|
let teamDoublesCount = 0,
|
|
49360
49509
|
teamSinglesCount = 0;
|
|
49361
49510
|
largestTeamDraw = Math.max(largestTeamDraw, drawSize + alternatesCount);
|
|
49362
|
-
typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
|
|
49511
|
+
tieFormat = typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
|
|
49363
49512
|
namedFormat: tieFormatName
|
|
49364
49513
|
});
|
|
49365
|
-
tieFormat === null ||
|
|
49514
|
+
(_tieFormat = tieFormat) === null || _tieFormat === void 0 ? void 0 : (_tieFormat$collection = _tieFormat.collectionDefinitions) === null || _tieFormat$collection === void 0 ? void 0 : _tieFormat$collection.forEach(collectionDefinition => {
|
|
49366
49515
|
// ensure every collectionDefinition has a collectionId
|
|
49367
49516
|
if (!collectionDefinition.collectionId) collectionDefinition.collectionId = UUID();
|
|
49368
49517
|
|
|
@@ -49386,10 +49535,14 @@ function generateTournamentRecord({
|
|
|
49386
49535
|
if (!isDoubles && !isTeam && drawSize && drawSize > largestSinglesDraw) largestSinglesDraw = drawSize + alternatesCount;
|
|
49387
49536
|
};
|
|
49388
49537
|
|
|
49389
|
-
eventProfiles === null || eventProfiles === void 0 ? void 0 : eventProfiles.forEach(
|
|
49390
|
-
|
|
49391
|
-
|
|
49392
|
-
|
|
49538
|
+
eventProfiles === null || eventProfiles === void 0 ? void 0 : eventProfiles.forEach(eventProfile => {
|
|
49539
|
+
const {
|
|
49540
|
+
tieFormatName: eventTieFormatName,
|
|
49541
|
+
tieFormat: eventTieFormat,
|
|
49542
|
+
drawProfiles,
|
|
49543
|
+
eventType
|
|
49544
|
+
} = eventProfile;
|
|
49545
|
+
|
|
49393
49546
|
if (drawProfiles) {
|
|
49394
49547
|
for (const drawProfile of drawProfiles) {
|
|
49395
49548
|
const {
|
|
@@ -49399,10 +49552,10 @@ function generateTournamentRecord({
|
|
|
49399
49552
|
tieFormatName
|
|
49400
49553
|
} = drawProfile;
|
|
49401
49554
|
processDrawProfile({
|
|
49555
|
+
tieFormatName: tieFormatName || eventTieFormatName,
|
|
49556
|
+
tieFormat: tieFormat || eventTieFormat,
|
|
49402
49557
|
alternatesCount,
|
|
49403
|
-
tieFormatName,
|
|
49404
49558
|
eventType,
|
|
49405
|
-
tieFormat,
|
|
49406
49559
|
drawSize
|
|
49407
49560
|
});
|
|
49408
49561
|
}
|
|
@@ -49738,6 +49891,7 @@ const factoryConstants = {
|
|
|
49738
49891
|
scaleConstants,
|
|
49739
49892
|
scheduleConstants,
|
|
49740
49893
|
surfaceConstants,
|
|
49894
|
+
tieFormatConstants,
|
|
49741
49895
|
timeItemConstants,
|
|
49742
49896
|
topicConstants,
|
|
49743
49897
|
venueConstants
|