tods-competition-factory 2.0.0 → 2.0.1
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 +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.d.ts +2 -0
- package/dist/tods-competition-factory.development.cjs.js +144 -109
- package/dist/tods-competition-factory.development.cjs.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 +2 -2
|
@@ -3686,6 +3686,7 @@ type DrawMaticArgs = {
|
|
|
3686
3686
|
restrictEntryStatus?: boolean;
|
|
3687
3687
|
tournamentRecord: Tournament;
|
|
3688
3688
|
drawDefinition: DrawDefinition;
|
|
3689
|
+
enableDoubleRobin?: boolean;
|
|
3689
3690
|
generateMatchUps?: boolean;
|
|
3690
3691
|
eventType?: EventTypeUnion;
|
|
3691
3692
|
salted?: number | boolean;
|
|
@@ -3719,6 +3720,7 @@ type GenerateDrawDefinitionArgs = {
|
|
|
3719
3720
|
structureName?: string;
|
|
3720
3721
|
structureId?: string;
|
|
3721
3722
|
};
|
|
3723
|
+
enforceMinimumDrawSize?: boolean;
|
|
3722
3724
|
ignoreAllowedDrawTypes?: boolean;
|
|
3723
3725
|
qualifyingPlaceholder?: boolean;
|
|
3724
3726
|
considerEventEntries?: boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.0.
|
|
6
|
+
return '2.0.1';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/******************************************************************************
|
|
@@ -214,7 +214,9 @@ function numericSort(a, b) {
|
|
|
214
214
|
function ensureInt(val) {
|
|
215
215
|
if (typeof val === 'number')
|
|
216
216
|
return parseInt(val.toString());
|
|
217
|
-
|
|
217
|
+
if (typeof val === 'string')
|
|
218
|
+
return parseInt(val);
|
|
219
|
+
return 0;
|
|
218
220
|
}
|
|
219
221
|
|
|
220
222
|
function isPowerOf2(n) {
|
|
@@ -29429,6 +29431,35 @@ function deriveQualifyingPositions(_a) {
|
|
|
29429
29431
|
return qualifyingPositions;
|
|
29430
29432
|
}
|
|
29431
29433
|
|
|
29434
|
+
function getCoercedDrawType(params) {
|
|
29435
|
+
var drawTypeCoercion = params.drawTypeCoercion, enforceMinimumDrawSize = params.enforceMinimumDrawSize;
|
|
29436
|
+
var drawSize = ensureInt(params.drawSize);
|
|
29437
|
+
var drawType = (drawTypeCoercion &&
|
|
29438
|
+
(typeof drawTypeCoercion === 'boolean' || drawTypeCoercion <= 2) &&
|
|
29439
|
+
drawSize === 2 &&
|
|
29440
|
+
SINGLE_ELIMINATION) ||
|
|
29441
|
+
params.drawType ||
|
|
29442
|
+
SINGLE_ELIMINATION;
|
|
29443
|
+
var multiStructure = MULTI_STRUCTURE_DRAWS.includes(drawType);
|
|
29444
|
+
if (drawSize && multiStructure) {
|
|
29445
|
+
if (drawTypeCoercion && ((typeof drawTypeCoercion === 'boolean' && drawSize < 4) || drawSize <= drawTypeCoercion)) {
|
|
29446
|
+
drawType = SINGLE_ELIMINATION;
|
|
29447
|
+
}
|
|
29448
|
+
else if (drawSize < 4 && enforceMinimumDrawSize) {
|
|
29449
|
+
return __assign(__assign({}, decorateResult({
|
|
29450
|
+
context: {
|
|
29451
|
+
enforceMinimumDrawSize: enforceMinimumDrawSize,
|
|
29452
|
+
drawSize: drawSize,
|
|
29453
|
+
drawType: drawType,
|
|
29454
|
+
},
|
|
29455
|
+
result: { error: INVALID_DRAW_SIZE },
|
|
29456
|
+
stack: 'getCoercedDrawType',
|
|
29457
|
+
})), { drawType: drawType });
|
|
29458
|
+
}
|
|
29459
|
+
}
|
|
29460
|
+
return { drawType: drawType };
|
|
29461
|
+
}
|
|
29462
|
+
|
|
29432
29463
|
// first iteration only links to a single playoff structure
|
|
29433
29464
|
// future iteration should allow structureOptions to specify
|
|
29434
29465
|
// groups of finishing drawPositions which playoff
|
|
@@ -29792,10 +29823,19 @@ function generateDrawStructuresAndLinks(params) {
|
|
|
29792
29823
|
var e_1, _a, e_2, _b;
|
|
29793
29824
|
var _c, _d, _e, _f, _g, _h, _j;
|
|
29794
29825
|
var _k = params || {}, _l = _k.enforceMinimumDrawSize, enforceMinimumDrawSize = _l === void 0 ? true : _l, overwriteExisting = _k.overwriteExisting, appliedPolicies = _k.appliedPolicies, staggeredEntry = _k.staggeredEntry, // optional - specifies main structure FEED_IN for drawTypes CURTIS_CONSOLATION, FEED_IN_CHAMPIONSHIPS, FMLC
|
|
29795
|
-
drawDefinition = _k.drawDefinition, tieFormat = _k.tieFormat,
|
|
29826
|
+
drawDefinition = _k.drawDefinition, tieFormat = _k.tieFormat, isMock = _k.isMock, uuids = _k.uuids;
|
|
29827
|
+
var drawSize = ensureInt(params.drawSize);
|
|
29796
29828
|
var drawTypeCoercion = (_c = params.drawTypeCoercion) !== null && _c !== void 0 ? _c : getDrawTypeCoercion({ appliedPolicies: appliedPolicies, drawType: params.drawType });
|
|
29797
29829
|
var stack = 'generateDrawStructuresAndLinks';
|
|
29798
|
-
var
|
|
29830
|
+
var coercedDrawType = getCoercedDrawType({
|
|
29831
|
+
drawType: params.drawType,
|
|
29832
|
+
enforceMinimumDrawSize: enforceMinimumDrawSize,
|
|
29833
|
+
drawTypeCoercion: drawTypeCoercion,
|
|
29834
|
+
drawSize: drawSize,
|
|
29835
|
+
});
|
|
29836
|
+
if (coercedDrawType.error)
|
|
29837
|
+
return coercedDrawType;
|
|
29838
|
+
var drawType = coercedDrawType.drawType;
|
|
29799
29839
|
var structures = [], links = [];
|
|
29800
29840
|
var matchUpType = (_d = params === null || params === void 0 ? void 0 : params.matchUpType) !== null && _d !== void 0 ? _d : SINGLES;
|
|
29801
29841
|
var existingQualifyingStructures = (_e = drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.structures) === null || _e === void 0 ? void 0 : _e.filter(function (_a) {
|
|
@@ -29881,7 +29921,6 @@ function generateDrawStructuresAndLinks(params) {
|
|
|
29881
29921
|
// check that drawSize is a valid value
|
|
29882
29922
|
var invalidDrawSize = drawType !== AD_HOC &&
|
|
29883
29923
|
(!drawSize ||
|
|
29884
|
-
isNaN(drawSize) ||
|
|
29885
29924
|
drawSize < 2 ||
|
|
29886
29925
|
(!staggeredEntry &&
|
|
29887
29926
|
![FEED_IN$1, LUCKY_DRAW].includes(drawType) &&
|
|
@@ -29894,24 +29933,6 @@ function generateDrawStructuresAndLinks(params) {
|
|
|
29894
29933
|
stack: stack,
|
|
29895
29934
|
});
|
|
29896
29935
|
}
|
|
29897
|
-
var multiStructure = MULTI_STRUCTURE_DRAWS.includes(drawType);
|
|
29898
|
-
if (drawSize && ensureInt(drawSize) < 4 && multiStructure) {
|
|
29899
|
-
if (drawTypeCoercion) {
|
|
29900
|
-
drawType = SINGLE_ELIMINATION;
|
|
29901
|
-
}
|
|
29902
|
-
else if (enforceMinimumDrawSize) {
|
|
29903
|
-
return decorateResult({
|
|
29904
|
-
context: {
|
|
29905
|
-
enforceMinimumDrawSize: enforceMinimumDrawSize,
|
|
29906
|
-
invalidDrawSize: invalidDrawSize,
|
|
29907
|
-
drawSize: drawSize,
|
|
29908
|
-
drawType: drawType,
|
|
29909
|
-
},
|
|
29910
|
-
result: { error: INVALID_DRAW_SIZE },
|
|
29911
|
-
stack: stack,
|
|
29912
|
-
});
|
|
29913
|
-
}
|
|
29914
|
-
}
|
|
29915
29936
|
var _o = getGenerators(params), generators = _o.generators, error = _o.error;
|
|
29916
29937
|
if (error) {
|
|
29917
29938
|
return { error: error };
|
|
@@ -32109,8 +32130,8 @@ var tieFormatDefaults = function (params) {
|
|
|
32109
32130
|
|
|
32110
32131
|
function drawMatic(params) {
|
|
32111
32132
|
var e_1, _a, e_2, _b;
|
|
32112
|
-
var _c, _d, _e, _f, _g, _h, _j, _k;
|
|
32113
|
-
var restrictEntryStatus = params.restrictEntryStatus,
|
|
32133
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
32134
|
+
var restrictEntryStatus = params.restrictEntryStatus, enableDoubleRobin = params.enableDoubleRobin, _m = params.adHocRatings, adHocRatings = _m === void 0 ? {} : _m, generateMatchUps = params.generateMatchUps, tournamentRecord = params.tournamentRecord, encounterValue = params.encounterValue, sameTeamValue = params.sameTeamValue, drawDefinition = params.drawDefinition, scaleAccessor = params.scaleAccessor, maxIterations = params.maxIterations, roundsCount = params.roundsCount, matchUpIds = params.matchUpIds, scaleName = params.scaleName, // custom rating name to seed dynamic ratings
|
|
32114
32135
|
idPrefix = params.idPrefix, salted = params.salted, event = params.event;
|
|
32115
32136
|
if (roundsCount && typeof roundsCount !== 'number') {
|
|
32116
32137
|
return { error: INVALID_VALUES, info: 'roundsCount must be a number' };
|
|
@@ -32140,7 +32161,9 @@ function drawMatic(params) {
|
|
|
32140
32161
|
else {
|
|
32141
32162
|
participantIds = enteredParticipantIds;
|
|
32142
32163
|
}
|
|
32143
|
-
if (roundsCount &&
|
|
32164
|
+
if (roundsCount &&
|
|
32165
|
+
roundsCount > participantIds.length - 1 &&
|
|
32166
|
+
(!enableDoubleRobin || roundsCount > (participantIds.length - 1) * 2)) {
|
|
32144
32167
|
return { error: INVALID_VALUES, info: 'Not enough participants for roundsCount' };
|
|
32145
32168
|
}
|
|
32146
32169
|
// if no structureId is specified find the latest AD_HOC stage which has matchUps
|
|
@@ -32184,15 +32207,15 @@ function drawMatic(params) {
|
|
|
32184
32207
|
adHocRatings[participantId] = scaleValue;
|
|
32185
32208
|
};
|
|
32186
32209
|
try {
|
|
32187
|
-
for (var
|
|
32188
|
-
var participantId =
|
|
32210
|
+
for (var _o = __values(participantIds !== null && participantIds !== void 0 ? participantIds : []), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
32211
|
+
var participantId = _p.value;
|
|
32189
32212
|
_loop_1(participantId);
|
|
32190
32213
|
}
|
|
32191
32214
|
}
|
|
32192
32215
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
32193
32216
|
finally {
|
|
32194
32217
|
try {
|
|
32195
|
-
if (
|
|
32218
|
+
if (_p && !_p.done && (_a = _o.return)) _a.call(_o);
|
|
32196
32219
|
}
|
|
32197
32220
|
finally { if (e_1) throw e_1.error; }
|
|
32198
32221
|
}
|
|
@@ -32202,8 +32225,8 @@ function drawMatic(params) {
|
|
|
32202
32225
|
var roundResults = [];
|
|
32203
32226
|
var roundNumber;
|
|
32204
32227
|
try {
|
|
32205
|
-
for (var
|
|
32206
|
-
var iteration =
|
|
32228
|
+
for (var _q = __values(generateRange(1, (roundsCount !== null && roundsCount !== void 0 ? roundsCount : 1) + 1)), _r = _q.next(); !_r.done; _r = _q.next()) {
|
|
32229
|
+
var iteration = _r.value;
|
|
32207
32230
|
var result = generateDrawMaticRound({
|
|
32208
32231
|
ignoreLastRoundNumber: true,
|
|
32209
32232
|
tournamentParticipants: tournamentParticipants,
|
|
@@ -32227,7 +32250,7 @@ function drawMatic(params) {
|
|
|
32227
32250
|
return result;
|
|
32228
32251
|
var roundMatchUps = result.matchUps, roundResult = __rest(result, ["matchUps"]);
|
|
32229
32252
|
roundResults.push(__assign(__assign({}, roundResult), { iteration: iteration, matchUpsCount: roundMatchUps === null || roundMatchUps === void 0 ? void 0 : roundMatchUps.length }));
|
|
32230
|
-
roundNumber = ((roundResult === null || roundResult === void 0 ? void 0 : roundResult.roundNumber)
|
|
32253
|
+
roundNumber = ((_l = roundResult === null || roundResult === void 0 ? void 0 : roundResult.roundNumber) !== null && _l !== void 0 ? _l : 1) + 1;
|
|
32231
32254
|
if (roundMatchUps === null || roundMatchUps === void 0 ? void 0 : roundMatchUps.length) {
|
|
32232
32255
|
matchUps.push.apply(matchUps, __spreadArray([], __read(roundMatchUps), false));
|
|
32233
32256
|
}
|
|
@@ -32236,7 +32259,7 @@ function drawMatic(params) {
|
|
|
32236
32259
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
32237
32260
|
finally {
|
|
32238
32261
|
try {
|
|
32239
|
-
if (
|
|
32262
|
+
if (_r && !_r.done && (_b = _q.return)) _b.call(_q);
|
|
32240
32263
|
}
|
|
32241
32264
|
finally { if (e_2) throw e_2.error; }
|
|
32242
32265
|
}
|
|
@@ -32544,7 +32567,7 @@ function generateDrawDefinition(params) {
|
|
|
32544
32567
|
var _a, e_1, _b, e_2, _c, e_3, _d, e_4, _e, _f, e_5, _g, e_6, _h, _j;
|
|
32545
32568
|
var _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34;
|
|
32546
32569
|
var stack = 'generateDrawDefinition';
|
|
32547
|
-
var _35 = params.
|
|
32570
|
+
var _35 = params.enforceMinimumDrawSize, enforceMinimumDrawSize = _35 === void 0 ? true : _35, _36 = params.considerEventEntries, considerEventEntries = _36 === void 0 ? true : _36, // in the absence of drawSize and drawEntries, look to event.entries
|
|
32548
32571
|
ignoreAllowedDrawTypes = params.ignoreAllowedDrawTypes, voluntaryConsolation = params.voluntaryConsolation, hydrateCollections = params.hydrateCollections, ignoreStageSpace = params.ignoreStageSpace, tournamentRecord = params.tournamentRecord, qualifyingOnly = params.qualifyingOnly, tieFormatName = params.tieFormatName, drawEntries = params.drawEntries, placeByes = params.placeByes, event = params.event;
|
|
32549
32572
|
var isMock = (_k = params.isMock) !== null && _k !== void 0 ? _k : true;
|
|
32550
32573
|
var idPrefix = params.idPrefix;
|
|
@@ -32553,49 +32576,23 @@ function generateDrawDefinition(params) {
|
|
|
32553
32576
|
event: event,
|
|
32554
32577
|
}).appliedPolicies) !== null && _l !== void 0 ? _l : {};
|
|
32555
32578
|
var policyDefinitions = makeDeepCopy((_m = params.policyDefinitions) !== null && _m !== void 0 ? _m : {}, false, true);
|
|
32556
|
-
var drawTypeCoercion = (_o = params.drawTypeCoercion) !== null && _o !== void 0 ? _o : getDrawTypeCoercion({
|
|
32557
|
-
drawType: params.drawType,
|
|
32558
|
-
policyDefinitions: policyDefinitions,
|
|
32559
|
-
appliedPolicies: appliedPolicies,
|
|
32560
|
-
});
|
|
32561
|
-
var drawType = (drawTypeCoercion && params.drawSize === 2 && SINGLE_ELIMINATION) || params.drawType || SINGLE_ELIMINATION;
|
|
32562
|
-
var seedingPolicy = (_p = policyDefinitions === null || policyDefinitions === void 0 ? void 0 : policyDefinitions[POLICY_TYPE_SEEDING]) !== null && _p !== void 0 ? _p : appliedPolicies === null || appliedPolicies === void 0 ? void 0 : appliedPolicies[POLICY_TYPE_SEEDING];
|
|
32563
|
-
var seedingProfile = (_t = (_q = params.seedingProfile) !== null && _q !== void 0 ? _q : (_s = (_r = seedingPolicy === null || seedingPolicy === void 0 ? void 0 : seedingPolicy.seedingProfile) === null || _r === void 0 ? void 0 : _r.drawTypes) === null || _s === void 0 ? void 0 : _s[drawType]) !== null && _t !== void 0 ? _t : seedingPolicy === null || seedingPolicy === void 0 ? void 0 : seedingPolicy.seedingProfile;
|
|
32564
|
-
// extend policyDefinitions only if a seedingProfile was specified in params
|
|
32565
|
-
if (params.seedingProfile) {
|
|
32566
|
-
if (!policyDefinitions[POLICY_TYPE_SEEDING]) {
|
|
32567
|
-
policyDefinitions[POLICY_TYPE_SEEDING] = __assign({}, POLICY_SEEDING_DEFAULT[POLICY_TYPE_SEEDING]);
|
|
32568
|
-
}
|
|
32569
|
-
policyDefinitions[POLICY_TYPE_SEEDING].seedingProfile = seedingProfile;
|
|
32570
|
-
}
|
|
32571
32579
|
// get participants both for entry validation and for automated placement
|
|
32572
32580
|
// automated placement requires them to be "inContext" for avoidance policies to work
|
|
32573
|
-
var
|
|
32581
|
+
var _37 = getParticipants({
|
|
32574
32582
|
withIndividualParticipants: true,
|
|
32575
32583
|
convertExtensions: true,
|
|
32576
32584
|
internalUse: true,
|
|
32577
32585
|
tournamentRecord: tournamentRecord,
|
|
32578
|
-
}), participants =
|
|
32579
|
-
var
|
|
32580
|
-
//
|
|
32581
|
-
// check for restrictions on allowed drawTypes
|
|
32582
|
-
var allowedDrawTypes = !ignoreAllowedDrawTypes &&
|
|
32583
|
-
tournamentRecord &&
|
|
32584
|
-
getAllowedDrawTypes({
|
|
32585
|
-
tournamentRecord: tournamentRecord,
|
|
32586
|
-
categoryType: (_0 = event === null || event === void 0 ? void 0 : event.category) === null || _0 === void 0 ? void 0 : _0.categoryType,
|
|
32587
|
-
categoryName: (_1 = event === null || event === void 0 ? void 0 : event.category) === null || _1 === void 0 ? void 0 : _1.categoryName,
|
|
32588
|
-
});
|
|
32589
|
-
if ((allowedDrawTypes === null || allowedDrawTypes === void 0 ? void 0 : allowedDrawTypes.length) && !allowedDrawTypes.includes(drawType)) {
|
|
32590
|
-
return decorateResult({ result: { error: INVALID_DRAW_TYPE }, stack: stack });
|
|
32591
|
-
}
|
|
32592
|
-
var eventEntries = (_3 = (_2 = event === null || event === void 0 ? void 0 : event.entries) === null || _2 === void 0 ? void 0 : _2.filter(function (entry) { return entry.entryStatus && __spreadArray(__spreadArray([], __read(STRUCTURE_SELECTED_STATUSES), false), [QUALIFIER], false).includes(entry.entryStatus); })) !== null && _3 !== void 0 ? _3 : [];
|
|
32586
|
+
}), participants = _37.participants, participantMap = _37.participantMap;
|
|
32587
|
+
var eventEntries = (_p = (_o = event === null || event === void 0 ? void 0 : event.entries) === null || _o === void 0 ? void 0 : _o.filter(function (entry) { return entry.entryStatus && __spreadArray(__spreadArray([], __read(STRUCTURE_SELECTED_STATUSES), false), [QUALIFIER], false).includes(entry.entryStatus); })) !== null && _p !== void 0 ? _p : [];
|
|
32588
|
+
// -------------------- BEGIN PARAMETER DERIVATION AND VALIDATION -------------------------
|
|
32593
32589
|
var consideredEntries = ((qualifyingOnly && []) ||
|
|
32594
32590
|
drawEntries ||
|
|
32595
32591
|
(considerEventEntries ? eventEntries : [])).filter(function (_a) {
|
|
32596
32592
|
var entryStage = _a.entryStage;
|
|
32597
32593
|
return !entryStage || entryStage === MAIN;
|
|
32598
32594
|
});
|
|
32595
|
+
var enforceGender = (_t = (_q = params.enforceGender) !== null && _q !== void 0 ? _q : (_s = (_r = policyDefinitions === null || policyDefinitions === void 0 ? void 0 : policyDefinitions[POLICY_TYPE_MATCHUP_ACTIONS]) === null || _r === void 0 ? void 0 : _r.participants) === null || _s === void 0 ? void 0 : _s.enforceGender) !== null && _t !== void 0 ? _t : (_v = (_u = appliedPolicies === null || appliedPolicies === void 0 ? void 0 : appliedPolicies[POLICY_TYPE_MATCHUP_ACTIONS]) === null || _u === void 0 ? void 0 : _u.participants) === null || _v === void 0 ? void 0 : _v.enforceGender;
|
|
32599
32596
|
// entries participantTypes must correspond with eventType
|
|
32600
32597
|
// this is only possible if the event is provided
|
|
32601
32598
|
var validEntriesResult = event &&
|
|
@@ -32612,23 +32609,56 @@ function generateDrawDefinition(params) {
|
|
|
32612
32609
|
return decorateResult({ result: validEntriesResult, stack: stack });
|
|
32613
32610
|
var derivedDrawSize = !params.drawSize &&
|
|
32614
32611
|
consideredEntries.length &&
|
|
32615
|
-
![AD_HOC, DOUBLE_ELIMINATION, FEED_IN$1, ROUND_ROBIN, ROUND_ROBIN_WITH_PLAYOFF].includes(drawType) &&
|
|
32612
|
+
![AD_HOC, DOUBLE_ELIMINATION, FEED_IN$1, ROUND_ROBIN, ROUND_ROBIN_WITH_PLAYOFF].includes((_w = params.drawType) !== null && _w !== void 0 ? _w : '') &&
|
|
32616
32613
|
nextPowerOf2(consideredEntries.length);
|
|
32617
32614
|
// coersion of drawSize and seedsCount to integers
|
|
32618
|
-
var drawSize = derivedDrawSize ||
|
|
32619
|
-
|
|
32620
|
-
|
|
32615
|
+
var drawSize = derivedDrawSize || (params.drawSize && ensureInt(params.drawSize)) || false; // required for isNaN check
|
|
32616
|
+
var drawTypeCoercion = (_x = params.drawTypeCoercion) !== null && _x !== void 0 ? _x : getDrawTypeCoercion({
|
|
32617
|
+
drawType: params.drawType,
|
|
32618
|
+
policyDefinitions: policyDefinitions,
|
|
32619
|
+
appliedPolicies: appliedPolicies,
|
|
32620
|
+
});
|
|
32621
|
+
var coercedDrawType = getCoercedDrawType({
|
|
32622
|
+
drawType: params.drawType,
|
|
32623
|
+
enforceMinimumDrawSize: enforceMinimumDrawSize,
|
|
32624
|
+
drawTypeCoercion: drawTypeCoercion,
|
|
32625
|
+
drawSize: drawSize,
|
|
32626
|
+
});
|
|
32627
|
+
if (coercedDrawType.error)
|
|
32628
|
+
return coercedDrawType;
|
|
32629
|
+
var drawType = coercedDrawType.drawType;
|
|
32630
|
+
var seedingPolicy = (_y = policyDefinitions === null || policyDefinitions === void 0 ? void 0 : policyDefinitions[POLICY_TYPE_SEEDING]) !== null && _y !== void 0 ? _y : appliedPolicies === null || appliedPolicies === void 0 ? void 0 : appliedPolicies[POLICY_TYPE_SEEDING];
|
|
32631
|
+
var seedingProfile = (_2 = (_z = params.seedingProfile) !== null && _z !== void 0 ? _z : (_1 = (_0 = seedingPolicy === null || seedingPolicy === void 0 ? void 0 : seedingPolicy.seedingProfile) === null || _0 === void 0 ? void 0 : _0.drawTypes) === null || _1 === void 0 ? void 0 : _1[drawType]) !== null && _2 !== void 0 ? _2 : seedingPolicy === null || seedingPolicy === void 0 ? void 0 : seedingPolicy.seedingProfile;
|
|
32632
|
+
// extend policyDefinitions only if a seedingProfile was specified in params
|
|
32633
|
+
if (params.seedingProfile) {
|
|
32634
|
+
if (!policyDefinitions[POLICY_TYPE_SEEDING]) {
|
|
32635
|
+
policyDefinitions[POLICY_TYPE_SEEDING] = __assign({}, POLICY_SEEDING_DEFAULT[POLICY_TYPE_SEEDING]);
|
|
32636
|
+
}
|
|
32637
|
+
policyDefinitions[POLICY_TYPE_SEEDING].seedingProfile = seedingProfile;
|
|
32638
|
+
}
|
|
32639
|
+
// if tournamentRecord is provided, and unless instructed to ignore valid types,
|
|
32640
|
+
// check for restrictions on allowed drawTypes
|
|
32641
|
+
var allowedDrawTypes = !ignoreAllowedDrawTypes &&
|
|
32642
|
+
tournamentRecord &&
|
|
32643
|
+
getAllowedDrawTypes({
|
|
32644
|
+
tournamentRecord: tournamentRecord,
|
|
32645
|
+
categoryType: (_3 = event === null || event === void 0 ? void 0 : event.category) === null || _3 === void 0 ? void 0 : _3.categoryType,
|
|
32646
|
+
categoryName: (_4 = event === null || event === void 0 ? void 0 : event.category) === null || _4 === void 0 ? void 0 : _4.categoryName,
|
|
32647
|
+
});
|
|
32648
|
+
if ((allowedDrawTypes === null || allowedDrawTypes === void 0 ? void 0 : allowedDrawTypes.length) && !allowedDrawTypes.includes(drawType)) {
|
|
32649
|
+
return decorateResult({ result: { error: INVALID_DRAW_TYPE }, stack: stack });
|
|
32650
|
+
}
|
|
32621
32651
|
if (isNaN(drawSize) && drawType !== AD_HOC) {
|
|
32622
32652
|
return decorateResult({
|
|
32623
32653
|
result: { error: MISSING_DRAW_SIZE },
|
|
32624
32654
|
stack: stack,
|
|
32625
32655
|
});
|
|
32626
32656
|
}
|
|
32627
|
-
|
|
32657
|
+
// -------------------- END OF PARAMETER DERIVATION AND VALIDATION -------------------------
|
|
32628
32658
|
var eventType = event === null || event === void 0 ? void 0 : event.eventType;
|
|
32629
|
-
var matchUpType = (
|
|
32659
|
+
var matchUpType = (_5 = params.matchUpType) !== null && _5 !== void 0 ? _5 : eventType;
|
|
32630
32660
|
var existingDrawDefinition = params.drawId
|
|
32631
|
-
? (
|
|
32661
|
+
? (_6 = event === null || event === void 0 ? void 0 : event.drawDefinitions) === null || _6 === void 0 ? void 0 : _6.find(function (d) { return d.drawId === params.drawId; })
|
|
32632
32662
|
: undefined;
|
|
32633
32663
|
// drawDefinition cannot have both tieFormat and matchUpFormat
|
|
32634
32664
|
var tieFormat = params.tieFormat, matchUpFormat = params.matchUpFormat;
|
|
@@ -32636,15 +32666,15 @@ function generateDrawDefinition(params) {
|
|
|
32636
32666
|
if (matchUpType === TEAM$1 && eventType === TEAM$1) {
|
|
32637
32667
|
// if there is an existingDrawDefinition which has a tieFormat on MAIN structure
|
|
32638
32668
|
// use this tieFormat ONLY when no tieFormat is specified in params
|
|
32639
|
-
var existingMainTieFormat = (
|
|
32669
|
+
var existingMainTieFormat = (_8 = (_7 = existingDrawDefinition === null || existingDrawDefinition === void 0 ? void 0 : existingDrawDefinition.structures) === null || _7 === void 0 ? void 0 : _7.find(function (_a) {
|
|
32640
32670
|
var stage = _a.stage;
|
|
32641
32671
|
return stage === MAIN;
|
|
32642
|
-
})) === null ||
|
|
32672
|
+
})) === null || _8 === void 0 ? void 0 : _8.tieFormat;
|
|
32643
32673
|
tieFormat =
|
|
32644
32674
|
tieFormat ||
|
|
32645
32675
|
existingMainTieFormat ||
|
|
32646
32676
|
// if tieFormatName is provided and it matches the name of the tieFormat attached to parent event...
|
|
32647
|
-
(tieFormatName && ((
|
|
32677
|
+
(tieFormatName && ((_9 = event === null || event === void 0 ? void 0 : event.tieFormat) === null || _9 === void 0 ? void 0 : _9.tieFormatName) === tieFormatName && event.tieFormat) ||
|
|
32648
32678
|
// if the tieFormatName is not found in the factory then will use default
|
|
32649
32679
|
(tieFormatName &&
|
|
32650
32680
|
tieFormatDefaults({
|
|
@@ -32698,7 +32728,7 @@ function generateDrawDefinition(params) {
|
|
|
32698
32728
|
var result = checkTieFormat({ tieFormat: tieFormat });
|
|
32699
32729
|
if (result.error)
|
|
32700
32730
|
return decorateResult({ result: result, stack: stack });
|
|
32701
|
-
drawDefinition.tieFormat = (
|
|
32731
|
+
drawDefinition.tieFormat = (_10 = result.tieFormat) !== null && _10 !== void 0 ? _10 : tieFormat;
|
|
32702
32732
|
}
|
|
32703
32733
|
else if (matchUpFormat) {
|
|
32704
32734
|
var result = setMatchUpMatchUpFormat({
|
|
@@ -32736,8 +32766,8 @@ function generateDrawDefinition(params) {
|
|
|
32736
32766
|
}
|
|
32737
32767
|
else {
|
|
32738
32768
|
try {
|
|
32739
|
-
for (var
|
|
32740
|
-
var key =
|
|
32769
|
+
for (var _38 = __values(Object.keys(policyDefinitions)), _39 = _38.next(); !_39.done; _39 = _38.next()) {
|
|
32770
|
+
var key = _39.value;
|
|
32741
32771
|
if (JSON.stringify(appliedPolicies === null || appliedPolicies === void 0 ? void 0 : appliedPolicies[key]) !== JSON.stringify(policyDefinitions[key])) {
|
|
32742
32772
|
policiesToAttach[key] = policyDefinitions[key];
|
|
32743
32773
|
}
|
|
@@ -32746,7 +32776,7 @@ function generateDrawDefinition(params) {
|
|
|
32746
32776
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
32747
32777
|
finally {
|
|
32748
32778
|
try {
|
|
32749
|
-
if (
|
|
32779
|
+
if (_39 && !_39.done && (_b = _38.return)) _b.call(_38);
|
|
32750
32780
|
}
|
|
32751
32781
|
finally { if (e_1) throw e_1.error; }
|
|
32752
32782
|
}
|
|
@@ -32772,17 +32802,17 @@ function generateDrawDefinition(params) {
|
|
|
32772
32802
|
}
|
|
32773
32803
|
// ---------------------------------------------------------------------------
|
|
32774
32804
|
// find existing MAIN structureId if existingDrawDefinition
|
|
32775
|
-
var structureId = (
|
|
32805
|
+
var structureId = (_12 = (_11 = existingDrawDefinition === null || existingDrawDefinition === void 0 ? void 0 : existingDrawDefinition.structures) === null || _11 === void 0 ? void 0 : _11.find(function (structure) { return structure.stage === MAIN && structure.stageSequence === 1; })) === null || _12 === void 0 ? void 0 : _12.structureId;
|
|
32776
32806
|
var entries = drawEntries !== null && drawEntries !== void 0 ? drawEntries : eventEntries;
|
|
32777
32807
|
var positioningReports = [];
|
|
32778
32808
|
var drawTypeResult;
|
|
32779
32809
|
var conflicts = [];
|
|
32780
|
-
var generateQualifyingPlaceholder = params.qualifyingPlaceholder && !((
|
|
32810
|
+
var generateQualifyingPlaceholder = params.qualifyingPlaceholder && !((_13 = params.qualifyingProfiles) === null || _13 === void 0 ? void 0 : _13.length) && !existingDrawDefinition;
|
|
32781
32811
|
var existingQualifyingStructures = existingDrawDefinition
|
|
32782
|
-
? (
|
|
32812
|
+
? (_14 = existingDrawDefinition.structures) === null || _14 === void 0 ? void 0 : _14.filter(function (structure) { return structure.stage === QUALIFYING; })
|
|
32783
32813
|
: [];
|
|
32784
32814
|
var existingQualifyingPlaceholderStructureId = (existingQualifyingStructures === null || existingQualifyingStructures === void 0 ? void 0 : existingQualifyingStructures.length) === 1 &&
|
|
32785
|
-
!((
|
|
32815
|
+
!((_15 = existingQualifyingStructures[0].matchUps) === null || _15 === void 0 ? void 0 : _15.length) &&
|
|
32786
32816
|
existingQualifyingStructures[0].structureId;
|
|
32787
32817
|
if (existingQualifyingPlaceholderStructureId) {
|
|
32788
32818
|
var qualifyingProfiles = params.qualifyingProfiles;
|
|
@@ -32798,24 +32828,24 @@ function generateDrawDefinition(params) {
|
|
|
32798
32828
|
if (qualifyingResult === null || qualifyingResult === void 0 ? void 0 : qualifyingResult.error) {
|
|
32799
32829
|
return qualifyingResult;
|
|
32800
32830
|
}
|
|
32801
|
-
drawDefinition.structures = (
|
|
32831
|
+
drawDefinition.structures = (_16 = drawDefinition.structures) === null || _16 === void 0 ? void 0 : _16.filter(function (_a) {
|
|
32802
32832
|
var structureId = _a.structureId;
|
|
32803
32833
|
return structureId !== existingQualifyingPlaceholderStructureId;
|
|
32804
32834
|
});
|
|
32805
|
-
drawDefinition.links = (
|
|
32835
|
+
drawDefinition.links = (_17 = drawDefinition.links) === null || _17 === void 0 ? void 0 : _17.filter(function (_a) {
|
|
32806
32836
|
var source = _a.source;
|
|
32807
32837
|
return source.structureId !== existingQualifyingPlaceholderStructureId;
|
|
32808
32838
|
});
|
|
32809
|
-
var
|
|
32839
|
+
var _40 = qualifyingResult !== null && qualifyingResult !== void 0 ? qualifyingResult : {}, qualifiersCount = _40.qualifiersCount, qualifyingDrawPositionsCount = _40.qualifyingDrawPositionsCount, qualifyingDetails = _40.qualifyingDetails;
|
|
32810
32840
|
if (qualifyingDrawPositionsCount) {
|
|
32811
32841
|
if (qualifyingResult === null || qualifyingResult === void 0 ? void 0 : qualifyingResult.structures) {
|
|
32812
|
-
(
|
|
32842
|
+
(_18 = drawDefinition.structures) === null || _18 === void 0 ? void 0 : _18.push.apply(_18, __spreadArray([], __read(qualifyingResult.structures), false));
|
|
32813
32843
|
}
|
|
32814
32844
|
if (qualifyingResult === null || qualifyingResult === void 0 ? void 0 : qualifyingResult.links) {
|
|
32815
|
-
(
|
|
32845
|
+
(_19 = drawDefinition.links) === null || _19 === void 0 ? void 0 : _19.push.apply(_19, __spreadArray([], __read(qualifyingResult.links), false));
|
|
32816
32846
|
}
|
|
32817
32847
|
}
|
|
32818
|
-
var mainStructure = (
|
|
32848
|
+
var mainStructure = (_20 = drawDefinition.structures) === null || _20 === void 0 ? void 0 : _20.find(function (_a) {
|
|
32819
32849
|
var stage = _a.stage, stageSequence = _a.stageSequence;
|
|
32820
32850
|
return stage === MAIN && stageSequence === 1;
|
|
32821
32851
|
});
|
|
@@ -32841,12 +32871,12 @@ function generateDrawDefinition(params) {
|
|
|
32841
32871
|
if (result.error)
|
|
32842
32872
|
return result;
|
|
32843
32873
|
try {
|
|
32844
|
-
for (var
|
|
32874
|
+
for (var _41 = __values((drawEntries !== null && drawEntries !== void 0 ? drawEntries : []).filter(function (_a) {
|
|
32845
32875
|
var entryStage = _a.entryStage;
|
|
32846
32876
|
return entryStage === QUALIFYING;
|
|
32847
|
-
})),
|
|
32848
|
-
var entry =
|
|
32849
|
-
var entryData = __assign(__assign({}, entry), { entryStage: (
|
|
32877
|
+
})), _42 = _41.next(); !_42.done; _42 = _41.next()) {
|
|
32878
|
+
var entry = _42.value;
|
|
32879
|
+
var entryData = __assign(__assign({}, entry), { entryStage: (_21 = entry.entryStage) !== null && _21 !== void 0 ? _21 : MAIN, drawDefinition: drawDefinition });
|
|
32850
32880
|
// ignore errors (EXITING_PARTICIPANT)
|
|
32851
32881
|
addDrawEntry(entryData);
|
|
32852
32882
|
}
|
|
@@ -32854,23 +32884,23 @@ function generateDrawDefinition(params) {
|
|
|
32854
32884
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
32855
32885
|
finally {
|
|
32856
32886
|
try {
|
|
32857
|
-
if (
|
|
32887
|
+
if (_42 && !_42.done && (_c = _41.return)) _c.call(_41);
|
|
32858
32888
|
}
|
|
32859
32889
|
finally { if (e_2) throw e_2.error; }
|
|
32860
32890
|
}
|
|
32861
32891
|
try {
|
|
32862
|
-
for (var
|
|
32863
|
-
var qualifyingDetail =
|
|
32892
|
+
for (var _43 = __values(qualifyingDetails || []), _44 = _43.next(); !_44.done; _44 = _43.next()) {
|
|
32893
|
+
var qualifyingDetail = _44.value;
|
|
32864
32894
|
var qualifyingRoundNumber = qualifyingDetail.finalQualifyingRoundNumber, qualifyingStructureId = qualifyingDetail.finalQualifyingStructureId, targetEntryRound = qualifyingDetail.roundTarget, finishingPositions = qualifyingDetail.finishingPositions, linkType = qualifyingDetail.linkType;
|
|
32865
32895
|
var link = mainStructure &&
|
|
32866
|
-
((
|
|
32896
|
+
((_22 = generateQualifyingLink({
|
|
32867
32897
|
targetStructureId: mainStructure.structureId,
|
|
32868
32898
|
sourceStructureId: qualifyingStructureId,
|
|
32869
32899
|
sourceRoundNumber: qualifyingRoundNumber,
|
|
32870
32900
|
finishingPositions: finishingPositions,
|
|
32871
32901
|
targetEntryRound: targetEntryRound,
|
|
32872
32902
|
linkType: linkType,
|
|
32873
|
-
})) === null ||
|
|
32903
|
+
})) === null || _22 === void 0 ? void 0 : _22.link);
|
|
32874
32904
|
if (link === null || link === void 0 ? void 0 : link.error)
|
|
32875
32905
|
return link;
|
|
32876
32906
|
if (link) {
|
|
@@ -32883,7 +32913,7 @@ function generateDrawDefinition(params) {
|
|
|
32883
32913
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
32884
32914
|
finally {
|
|
32885
32915
|
try {
|
|
32886
|
-
if (
|
|
32916
|
+
if (_44 && !_44.done && (_d = _43.return)) _d.call(_43);
|
|
32887
32917
|
}
|
|
32888
32918
|
finally { if (e_3) throw e_3.error; }
|
|
32889
32919
|
}
|
|
@@ -32902,7 +32932,7 @@ function generateDrawDefinition(params) {
|
|
|
32902
32932
|
// if drawEntries and entryStage !== stage ignore
|
|
32903
32933
|
if (drawEntries && entry.entryStage && entry.entryStage !== MAIN)
|
|
32904
32934
|
continue;
|
|
32905
|
-
var entryData = __assign(__assign({}, entry), { ignoreStageSpace: ignoreStageSpace !== null && ignoreStageSpace !== void 0 ? ignoreStageSpace : drawType === AD_HOC, entryStage: (
|
|
32935
|
+
var entryData = __assign(__assign({}, entry), { ignoreStageSpace: ignoreStageSpace !== null && ignoreStageSpace !== void 0 ? ignoreStageSpace : drawType === AD_HOC, entryStage: (_23 = entry.entryStage) !== null && _23 !== void 0 ? _23 : MAIN, drawDefinition: drawDefinition, drawType: drawType });
|
|
32906
32936
|
var result = addDrawEntry(entryData);
|
|
32907
32937
|
if (drawEntries && result.error) {
|
|
32908
32938
|
// only report errors with drawEntries
|
|
@@ -32919,8 +32949,7 @@ function generateDrawDefinition(params) {
|
|
|
32919
32949
|
finally { if (e_4) throw e_4.error; }
|
|
32920
32950
|
}
|
|
32921
32951
|
// temporary until seeding is supported in LUCKY_DRAW
|
|
32922
|
-
|
|
32923
|
-
seedsCount = 0;
|
|
32952
|
+
var seedsCount = drawType === LUCKY_DRAW ? 0 : ensureInt((_24 = params.seedsCount) !== null && _24 !== void 0 ? _24 : 0);
|
|
32924
32953
|
var structureResult = prepareStage(__assign(__assign(__assign({}, drawTypeResult), params), { qualifyingOnly: !drawSize || qualifyingOnly, // ooo!! If there is no drawSize then MAIN is not being generated
|
|
32925
32954
|
appliedPolicies: appliedPolicies, drawDefinition: drawDefinition, seedingProfile: seedingProfile, participants: participants, stage: MAIN, seedsCount: seedsCount, placeByes: placeByes, drawSize: drawSize, entries: entries }));
|
|
32926
32955
|
if (structureResult.error && !structureResult.conflicts) {
|
|
@@ -32939,7 +32968,7 @@ function generateDrawDefinition(params) {
|
|
|
32939
32968
|
var participantIds = entries_2 === null || entries_2 === void 0 ? void 0 : entries_2.map(getParticipantId);
|
|
32940
32969
|
var matchUpsCount_1 = entries_2 ? Math.floor(entries_2.length / 2) : 0;
|
|
32941
32970
|
if (params.automated) {
|
|
32942
|
-
var
|
|
32971
|
+
var _45 = (_27 = params.drawMatic) !== null && _27 !== void 0 ? _27 : {}, restrictEntryStatus = _45.restrictEntryStatus, generateMatchUps = _45.generateMatchUps, structureId_1 = _45.structureId, matchUpIds = _45.matchUpIds, scaleName = _45.scaleName;
|
|
32943
32972
|
var result = drawMatic({
|
|
32944
32973
|
eventType: (_29 = (_28 = params.drawMatic) === null || _28 === void 0 ? void 0 : _28.eventType) !== null && _29 !== void 0 ? _29 : matchUpType,
|
|
32945
32974
|
generateMatchUps: generateMatchUps !== null && generateMatchUps !== void 0 ? generateMatchUps : true,
|
|
@@ -32991,8 +33020,8 @@ function generateDrawDefinition(params) {
|
|
|
32991
33020
|
var roundTarget = 1;
|
|
32992
33021
|
params.qualifyingProfiles.sort(roundTargetSort);
|
|
32993
33022
|
try {
|
|
32994
|
-
for (var
|
|
32995
|
-
var roundTargetProfile =
|
|
33023
|
+
for (var _46 = __values(params.qualifyingProfiles), _47 = _46.next(); !_47.done; _47 = _46.next()) {
|
|
33024
|
+
var roundTargetProfile = _47.value;
|
|
32996
33025
|
if (!Array.isArray(roundTargetProfile.structureProfiles))
|
|
32997
33026
|
return decorateResult({
|
|
32998
33027
|
info: mustBeAnArray('structureProfiles'),
|
|
@@ -33005,8 +33034,8 @@ function generateDrawDefinition(params) {
|
|
|
33005
33034
|
try {
|
|
33006
33035
|
for (var sortedStructureProfiles_1 = (e_6 = void 0, __values(sortedStructureProfiles)), sortedStructureProfiles_1_1 = sortedStructureProfiles_1.next(); !sortedStructureProfiles_1_1.done; sortedStructureProfiles_1_1 = sortedStructureProfiles_1.next()) {
|
|
33007
33036
|
var structureProfile = sortedStructureProfiles_1_1.value;
|
|
33008
|
-
var qualifyingRoundNumber = structureProfile.qualifyingRoundNumber, qualifyingPositions = structureProfile.qualifyingPositions, seededParticipants = structureProfile.seededParticipants, seedingScaleName = structureProfile.seedingScaleName,
|
|
33009
|
-
var qualifyingStageResult = prepareStage(__assign(__assign(__assign({}, drawTypeResult), params), { seedingProfile: (_31 = structureProfile.seedingProfile) !== null && _31 !== void 0 ? _31 : seedingProfile, stageSequence: sequence, qualifyingRoundNumber: qualifyingRoundNumber, preparedStructureIds: preparedStructureIds, qualifyingPositions: qualifyingPositions, seededParticipants: seededParticipants, stage: QUALIFYING, seedingScaleName: seedingScaleName, appliedPolicies: appliedPolicies, drawDefinition: drawDefinition, qualifyingOnly: qualifyingOnly, seedByRanking: seedByRanking, participants: participants, roundTarget: roundTarget, seedsCount:
|
|
33037
|
+
var qualifyingRoundNumber = structureProfile.qualifyingRoundNumber, qualifyingPositions = structureProfile.qualifyingPositions, seededParticipants = structureProfile.seededParticipants, seedingScaleName = structureProfile.seedingScaleName, _48 = structureProfile.seedsCount, seedsCount = _48 === void 0 ? 0 : _48, seedByRanking = structureProfile.seedByRanking, placeByes_1 = structureProfile.placeByes, drawSize_1 = structureProfile.drawSize;
|
|
33038
|
+
var qualifyingStageResult = prepareStage(__assign(__assign(__assign({}, drawTypeResult), params), { seedingProfile: (_31 = structureProfile.seedingProfile) !== null && _31 !== void 0 ? _31 : seedingProfile, stageSequence: sequence, qualifyingRoundNumber: qualifyingRoundNumber, preparedStructureIds: preparedStructureIds, qualifyingPositions: qualifyingPositions, seededParticipants: seededParticipants, stage: QUALIFYING, seedingScaleName: seedingScaleName, appliedPolicies: appliedPolicies, drawDefinition: drawDefinition, qualifyingOnly: qualifyingOnly, seedByRanking: seedByRanking, participants: participants, roundTarget: roundTarget, seedsCount: seedsCount, placeByes: placeByes_1, drawSize: drawSize_1, entries: entries }));
|
|
33010
33039
|
if (qualifyingStageResult.error) {
|
|
33011
33040
|
return qualifyingStageResult;
|
|
33012
33041
|
}
|
|
@@ -33035,7 +33064,7 @@ function generateDrawDefinition(params) {
|
|
|
33035
33064
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
33036
33065
|
finally {
|
|
33037
33066
|
try {
|
|
33038
|
-
if (
|
|
33067
|
+
if (_47 && !_47.done && (_g = _46.return)) _g.call(_46);
|
|
33039
33068
|
}
|
|
33040
33069
|
finally { if (e_5) throw e_5.error; }
|
|
33041
33070
|
}
|
|
@@ -48595,9 +48624,11 @@ function generateAddress(addressAttributes) {
|
|
|
48595
48624
|
|
|
48596
48625
|
var lastNames = [
|
|
48597
48626
|
"Abbey",
|
|
48598
|
-
"Assange",
|
|
48599
48627
|
"Ahern",
|
|
48600
48628
|
"Ampleforth",
|
|
48629
|
+
"Ananiadis",
|
|
48630
|
+
"Andelic",
|
|
48631
|
+
"Assange",
|
|
48601
48632
|
"Atreides",
|
|
48602
48633
|
"Austen",
|
|
48603
48634
|
"Bach",
|
|
@@ -48634,6 +48665,7 @@ var lastNames = [
|
|
|
48634
48665
|
"Escher",
|
|
48635
48666
|
"Eyre",
|
|
48636
48667
|
"Faulkner",
|
|
48668
|
+
"Fulcher",
|
|
48637
48669
|
"Fukuoka",
|
|
48638
48670
|
"Godel",
|
|
48639
48671
|
"Goldstein",
|
|
@@ -48699,6 +48731,7 @@ var lastNames = [
|
|
|
48699
48731
|
"Watson",
|
|
48700
48732
|
"Wolin",
|
|
48701
48733
|
"Wirt",
|
|
48734
|
+
"Waschuk",
|
|
48702
48735
|
"Wormwood"
|
|
48703
48736
|
];
|
|
48704
48737
|
var firstFemale = [
|
|
@@ -48777,10 +48810,12 @@ var firstMale = [
|
|
|
48777
48810
|
"August",
|
|
48778
48811
|
"Axel",
|
|
48779
48812
|
"Barda",
|
|
48813
|
+
"Barry",
|
|
48780
48814
|
"Bill",
|
|
48781
48815
|
"Bruce",
|
|
48782
48816
|
"Charles",
|
|
48783
48817
|
"Chris",
|
|
48818
|
+
"Constantine",
|
|
48784
48819
|
"Darwin",
|
|
48785
48820
|
"David",
|
|
48786
48821
|
"Derrick",
|