courthive-components 0.8.2 → 0.8.4

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.
@@ -7,7 +7,7 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
7
7
  }, hd = /* @__PURE__ */ Symbol.for("sxs.internal"), sg = (e, t) => Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)), VS = (e) => {
8
8
  for (const t in e) return !0;
9
9
  return !1;
10
- }, { hasOwnProperty: y0 } = Object.prototype, ah = (e) => e.includes("-") ? e : e.replace(/[A-Z]/g, ((t) => "-" + t.toLowerCase())), U0 = /\s+(?![^()]*\))/, Mo = (e) => (t) => e(...typeof t == "string" ? String(t).split(U0) : [t]), jS = { appearance: (e) => ({ WebkitAppearance: e, appearance: e }), backfaceVisibility: (e) => ({ WebkitBackfaceVisibility: e, backfaceVisibility: e }), backdropFilter: (e) => ({ WebkitBackdropFilter: e, backdropFilter: e }), backgroundClip: (e) => ({ WebkitBackgroundClip: e, backgroundClip: e }), boxDecorationBreak: (e) => ({ WebkitBoxDecorationBreak: e, boxDecorationBreak: e }), clipPath: (e) => ({ WebkitClipPath: e, clipPath: e }), content: (e) => ({ content: e.includes('"') || e.includes("'") || /^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e) ? e : `"${e}"` }), hyphens: (e) => ({ WebkitHyphens: e, hyphens: e }), maskImage: (e) => ({ WebkitMaskImage: e, maskImage: e }), maskSize: (e) => ({ WebkitMaskSize: e, maskSize: e }), tabSize: (e) => ({ MozTabSize: e, tabSize: e }), textSizeAdjust: (e) => ({ WebkitTextSizeAdjust: e, textSizeAdjust: e }), userSelect: (e) => ({ WebkitUserSelect: e, userSelect: e }), marginBlock: Mo(((e, t) => ({ marginBlockStart: e, marginBlockEnd: t || e }))), marginInline: Mo(((e, t) => ({ marginInlineStart: e, marginInlineEnd: t || e }))), maxSize: Mo(((e, t) => ({ maxBlockSize: e, maxInlineSize: t || e }))), minSize: Mo(((e, t) => ({ minBlockSize: e, minInlineSize: t || e }))), paddingBlock: Mo(((e, t) => ({ paddingBlockStart: e, paddingBlockEnd: t || e }))), paddingInline: Mo(((e, t) => ({ paddingInlineStart: e, paddingInlineEnd: t || e }))) }, Ef = /([\d.]+)([^]*)/, S0 = (e, t) => e.length ? e.reduce(((r, i) => (r.push(...t.map(((n) => n.includes("&") ? n.replace(/&/g, /[ +>|~]/.test(i) && /&.*&/.test(n) ? `:is(${i})` : i) : i + " " + n))), r)), []) : t, v0 = (e, t) => e in w0 && typeof t == "string" ? t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/, ((r, i, n, a) => i + (n === "stretch" ? `-moz-available${a};${ah(e)}:${i}-webkit-fill-available` : `-moz-fit-content${a};${ah(e)}:${i}fit-content`) + a)) : String(t), w0 = { blockSize: 1, height: 1, inlineSize: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, width: 1 }, ha = (e) => e ? e + "-" : "", Fw = (e, t, r) => e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g, ((i, n, a, s, o) => s == "$" == !!a ? i : (n || s == "--" ? "calc(" : "") + "var(--" + (s === "$" ? ha(t) + (o.includes("$") ? "" : ha(r)) + o.replace(/\$/g, "-") : o) + ")" + (n || s == "--" ? "*" + (n || "") + (a || "1") + ")" : ""))), D0 = /\s*,\s*(?![^()]*\))/, T0 = Object.prototype.toString, Fo = (e, t, r, i, n) => {
10
+ }, { hasOwnProperty: y0 } = Object.prototype, ah = (e) => e.includes("-") ? e : e.replace(/[A-Z]/g, ((t) => "-" + t.toLowerCase())), U0 = /\s+(?![^()]*\))/, Ro = (e) => (t) => e(...typeof t == "string" ? String(t).split(U0) : [t]), jS = { appearance: (e) => ({ WebkitAppearance: e, appearance: e }), backfaceVisibility: (e) => ({ WebkitBackfaceVisibility: e, backfaceVisibility: e }), backdropFilter: (e) => ({ WebkitBackdropFilter: e, backdropFilter: e }), backgroundClip: (e) => ({ WebkitBackgroundClip: e, backgroundClip: e }), boxDecorationBreak: (e) => ({ WebkitBoxDecorationBreak: e, boxDecorationBreak: e }), clipPath: (e) => ({ WebkitClipPath: e, clipPath: e }), content: (e) => ({ content: e.includes('"') || e.includes("'") || /^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e) ? e : `"${e}"` }), hyphens: (e) => ({ WebkitHyphens: e, hyphens: e }), maskImage: (e) => ({ WebkitMaskImage: e, maskImage: e }), maskSize: (e) => ({ WebkitMaskSize: e, maskSize: e }), tabSize: (e) => ({ MozTabSize: e, tabSize: e }), textSizeAdjust: (e) => ({ WebkitTextSizeAdjust: e, textSizeAdjust: e }), userSelect: (e) => ({ WebkitUserSelect: e, userSelect: e }), marginBlock: Ro(((e, t) => ({ marginBlockStart: e, marginBlockEnd: t || e }))), marginInline: Ro(((e, t) => ({ marginInlineStart: e, marginInlineEnd: t || e }))), maxSize: Ro(((e, t) => ({ maxBlockSize: e, maxInlineSize: t || e }))), minSize: Ro(((e, t) => ({ minBlockSize: e, minInlineSize: t || e }))), paddingBlock: Ro(((e, t) => ({ paddingBlockStart: e, paddingBlockEnd: t || e }))), paddingInline: Ro(((e, t) => ({ paddingInlineStart: e, paddingInlineEnd: t || e }))) }, Ef = /([\d.]+)([^]*)/, S0 = (e, t) => e.length ? e.reduce(((r, i) => (r.push(...t.map(((n) => n.includes("&") ? n.replace(/&/g, /[ +>|~]/.test(i) && /&.*&/.test(n) ? `:is(${i})` : i) : i + " " + n))), r)), []) : t, v0 = (e, t) => e in w0 && typeof t == "string" ? t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/, ((r, i, n, a) => i + (n === "stretch" ? `-moz-available${a};${ah(e)}:${i}-webkit-fill-available` : `-moz-fit-content${a};${ah(e)}:${i}fit-content`) + a)) : String(t), w0 = { blockSize: 1, height: 1, inlineSize: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, width: 1 }, ha = (e) => e ? e + "-" : "", Fw = (e, t, r) => e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g, ((i, n, a, s, o) => s == "$" == !!a ? i : (n || s == "--" ? "calc(" : "") + "var(--" + (s === "$" ? ha(t) + (o.includes("$") ? "" : ha(r)) + o.replace(/\$/g, "-") : o) + ")" + (n || s == "--" ? "*" + (n || "") + (a || "1") + ")" : ""))), D0 = /\s*,\s*(?![^()]*\))/, T0 = Object.prototype.toString, Fo = (e, t, r, i, n) => {
11
11
  let a, s, o;
12
12
  const c = (u, l, d) => {
13
13
  let p, m;
@@ -43,7 +43,7 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
43
43
  f(u), a !== void 0 && n(GS(...a)), a = void 0;
44
44
  };
45
45
  c(e, t, r);
46
- }, GS = (e, t, r) => `${r.map(((i) => `${i}{`)).join("")}${t.length ? `${t.join(",")}{` : ""}${e.join(";")}${t.length ? "}" : ""}${Array(r.length ? r.length + 1 : 0).join("}")}`, P0 = { animationDelay: 1, animationDuration: 1, backgroundSize: 1, blockSize: 1, border: 1, borderBlock: 1, borderBlockEnd: 1, borderBlockEndWidth: 1, borderBlockStart: 1, borderBlockStartWidth: 1, borderBlockWidth: 1, borderBottom: 1, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, borderBottomWidth: 1, borderEndEndRadius: 1, borderEndStartRadius: 1, borderInlineEnd: 1, borderInlineEndWidth: 1, borderInlineStart: 1, borderInlineStartWidth: 1, borderInlineWidth: 1, borderLeft: 1, borderLeftWidth: 1, borderRadius: 1, borderRight: 1, borderRightWidth: 1, borderSpacing: 1, borderStartEndRadius: 1, borderStartStartRadius: 1, borderTop: 1, borderTopLeftRadius: 1, borderTopRightRadius: 1, borderTopWidth: 1, borderWidth: 1, bottom: 1, columnGap: 1, columnRule: 1, columnRuleWidth: 1, columnWidth: 1, containIntrinsicSize: 1, flexBasis: 1, fontSize: 1, gap: 1, gridAutoColumns: 1, gridAutoRows: 1, gridTemplateColumns: 1, gridTemplateRows: 1, height: 1, inlineSize: 1, inset: 1, insetBlock: 1, insetBlockEnd: 1, insetBlockStart: 1, insetInline: 1, insetInlineEnd: 1, insetInlineStart: 1, left: 1, letterSpacing: 1, margin: 1, marginBlock: 1, marginBlockEnd: 1, marginBlockStart: 1, marginBottom: 1, marginInline: 1, marginInlineEnd: 1, marginInlineStart: 1, marginLeft: 1, marginRight: 1, marginTop: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, offsetDistance: 1, offsetRotate: 1, outline: 1, outlineOffset: 1, outlineWidth: 1, overflowClipMargin: 1, padding: 1, paddingBlock: 1, paddingBlockEnd: 1, paddingBlockStart: 1, paddingBottom: 1, paddingInline: 1, paddingInlineEnd: 1, paddingInlineStart: 1, paddingLeft: 1, paddingRight: 1, paddingTop: 1, perspective: 1, right: 1, rowGap: 1, scrollMargin: 1, scrollMarginBlock: 1, scrollMarginBlockEnd: 1, scrollMarginBlockStart: 1, scrollMarginBottom: 1, scrollMarginInline: 1, scrollMarginInlineEnd: 1, scrollMarginInlineStart: 1, scrollMarginLeft: 1, scrollMarginRight: 1, scrollMarginTop: 1, scrollPadding: 1, scrollPaddingBlock: 1, scrollPaddingBlockEnd: 1, scrollPaddingBlockStart: 1, scrollPaddingBottom: 1, scrollPaddingInline: 1, scrollPaddingInlineEnd: 1, scrollPaddingInlineStart: 1, scrollPaddingLeft: 1, scrollPaddingRight: 1, scrollPaddingTop: 1, shapeMargin: 1, textDecoration: 1, textDecorationThickness: 1, textIndent: 1, textUnderlineOffset: 1, top: 1, transitionDelay: 1, transitionDuration: 1, verticalAlign: 1, width: 1, wordSpacing: 1 }, $S = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), Ps = (e) => ((t) => {
46
+ }, GS = (e, t, r) => `${r.map(((i) => `${i}{`)).join("")}${t.length ? `${t.join(",")}{` : ""}${e.join(";")}${t.length ? "}" : ""}${Array(r.length ? r.length + 1 : 0).join("}")}`, P0 = { animationDelay: 1, animationDuration: 1, backgroundSize: 1, blockSize: 1, border: 1, borderBlock: 1, borderBlockEnd: 1, borderBlockEndWidth: 1, borderBlockStart: 1, borderBlockStartWidth: 1, borderBlockWidth: 1, borderBottom: 1, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, borderBottomWidth: 1, borderEndEndRadius: 1, borderEndStartRadius: 1, borderInlineEnd: 1, borderInlineEndWidth: 1, borderInlineStart: 1, borderInlineStartWidth: 1, borderInlineWidth: 1, borderLeft: 1, borderLeftWidth: 1, borderRadius: 1, borderRight: 1, borderRightWidth: 1, borderSpacing: 1, borderStartEndRadius: 1, borderStartStartRadius: 1, borderTop: 1, borderTopLeftRadius: 1, borderTopRightRadius: 1, borderTopWidth: 1, borderWidth: 1, bottom: 1, columnGap: 1, columnRule: 1, columnRuleWidth: 1, columnWidth: 1, containIntrinsicSize: 1, flexBasis: 1, fontSize: 1, gap: 1, gridAutoColumns: 1, gridAutoRows: 1, gridTemplateColumns: 1, gridTemplateRows: 1, height: 1, inlineSize: 1, inset: 1, insetBlock: 1, insetBlockEnd: 1, insetBlockStart: 1, insetInline: 1, insetInlineEnd: 1, insetInlineStart: 1, left: 1, letterSpacing: 1, margin: 1, marginBlock: 1, marginBlockEnd: 1, marginBlockStart: 1, marginBottom: 1, marginInline: 1, marginInlineEnd: 1, marginInlineStart: 1, marginLeft: 1, marginRight: 1, marginTop: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, offsetDistance: 1, offsetRotate: 1, outline: 1, outlineOffset: 1, outlineWidth: 1, overflowClipMargin: 1, padding: 1, paddingBlock: 1, paddingBlockEnd: 1, paddingBlockStart: 1, paddingBottom: 1, paddingInline: 1, paddingInlineEnd: 1, paddingInlineStart: 1, paddingLeft: 1, paddingRight: 1, paddingTop: 1, perspective: 1, right: 1, rowGap: 1, scrollMargin: 1, scrollMarginBlock: 1, scrollMarginBlockEnd: 1, scrollMarginBlockStart: 1, scrollMarginBottom: 1, scrollMarginInline: 1, scrollMarginInlineEnd: 1, scrollMarginInlineStart: 1, scrollMarginLeft: 1, scrollMarginRight: 1, scrollMarginTop: 1, scrollPadding: 1, scrollPaddingBlock: 1, scrollPaddingBlockEnd: 1, scrollPaddingBlockStart: 1, scrollPaddingBottom: 1, scrollPaddingInline: 1, scrollPaddingInlineEnd: 1, scrollPaddingInlineStart: 1, scrollPaddingLeft: 1, scrollPaddingRight: 1, scrollPaddingTop: 1, shapeMargin: 1, textDecoration: 1, textDecorationThickness: 1, textIndent: 1, textUnderlineOffset: 1, top: 1, transitionDelay: 1, transitionDuration: 1, verticalAlign: 1, width: 1, wordSpacing: 1 }, $S = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), bs = (e) => ((t) => {
47
47
  let r, i = "";
48
48
  for (r = Math.abs(t); r > 52; r = r / 52 | 0) i = $S(r % 52) + i;
49
49
  return $S(r % 52) + i;
@@ -133,7 +133,7 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
133
133
  } else n.constructor !== Object || n.$$typeof ? i.type == null && (i.type = n) : i.composers.add(A0(n, e));
134
134
  return i.type == null && (i.type = "span"), i.composers.size || i.composers.add(["PJLV", {}, [], [], {}, []]), C0(e, i, t);
135
135
  })), A0 = ({ variants: e, compoundVariants: t, defaultVariants: r, ...i }, n) => {
136
- const a = `${ha(n.prefix)}c-${Ps(i)}`, s = [], o = [], c = /* @__PURE__ */ Object.create(null), u = [];
136
+ const a = `${ha(n.prefix)}c-${bs(i)}`, s = [], o = [], c = /* @__PURE__ */ Object.create(null), u = [];
137
137
  for (const p in r) c[p] = String(r[p]);
138
138
  if (typeof e == "object" && e) for (const p in e) {
139
139
  l = c, d = p, y0.call(l, d) || (c[p] = "undefined");
@@ -178,7 +178,7 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
178
178
  })));
179
179
  const v = WS(U, f, e.media), w = WS(D, f, e.media, !0);
180
180
  for (const S of v) if (S !== void 0) for (const [T, b, P] of S) {
181
- const M = `${I}-${Ps(b)}-${T}`;
181
+ const M = `${I}-${bs(b)}-${T}`;
182
182
  h.add(M);
183
183
  const R = (P ? r.rules.resonevar : r.rules.onevar).cache, E = P ? c.resonevar : c.onevar;
184
184
  R.has(M) || (R.add(M), Fo(b, [`.${M}`], [], e, ((A) => {
@@ -186,14 +186,14 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
186
186
  })));
187
187
  }
188
188
  for (const S of w) if (S !== void 0) for (const [T, b] of S) {
189
- const P = `${I}-${Ps(b)}-${T}`;
189
+ const P = `${I}-${bs(b)}-${T}`;
190
190
  h.add(P), r.rules.allvar.cache.has(P) || (r.rules.allvar.cache.add(P), Fo(b, [`.${P}`], [], e, ((M) => {
191
191
  c.allvar.apply(M);
192
192
  })));
193
193
  }
194
194
  }
195
195
  if (typeof p == "object" && p) {
196
- const I = `${i}-i${Ps(p)}-css`;
196
+ const I = `${i}-i${bs(p)}-css`;
197
197
  h.add(I), r.rules.inline.cache.has(I) || (r.rules.inline.cache.add(I), Fo(p, [`.${I}`], [], e, ((y) => {
198
198
  c.inline.apply(y);
199
199
  })));
@@ -247,7 +247,7 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
247
247
  const i = () => {
248
248
  for (let n of r) {
249
249
  n = typeof n == "object" && n || {};
250
- let a = Ps(n);
250
+ let a = bs(n);
251
251
  if (!t.rules.global.cache.has(a)) {
252
252
  if (t.rules.global.cache.add(a), "@import" in n) {
253
253
  let s = [].indexOf.call(t.sheet.cssRules, t.rules.themed.group) - 1;
@@ -263,7 +263,7 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
263
263
  };
264
264
  return sg(i, { toString: i });
265
265
  })), L0 = Hu(), _0 = (e, t) => L0(e, (() => (r) => {
266
- const i = `${ha(e.prefix)}k-${Ps(r)}`, n = () => {
266
+ const i = `${ha(e.prefix)}k-${bs(r)}`, n = () => {
267
267
  if (!t.rules.global.cache.has(i)) {
268
268
  t.rules.global.cache.add(i);
269
269
  const a = [];
@@ -291,7 +291,7 @@ var BS, Nt = "colors", si = "sizes", fe = "space", g0 = { gap: fe, gridGap: fe,
291
291
  }
292
292
  }, V0 = Hu(), j0 = (e, t) => V0(e, (() => (r, i) => {
293
293
  i = typeof r == "object" && r || Object(i);
294
- const n = `.${r = (r = typeof r == "string" ? r : "") || `${ha(e.prefix)}t-${Ps(i)}`}`, a = {}, s = [];
294
+ const n = `.${r = (r = typeof r == "string" ? r : "") || `${ha(e.prefix)}t-${bs(i)}`}`, a = {}, s = [];
295
295
  for (const c in i) {
296
296
  a[c] = {};
297
297
  for (const u in i[c]) {
@@ -744,7 +744,7 @@ var _w = {};
744
744
  Te(_w, { getLinkedTournamentIds: () => dl, getTournamentIds: () => ul, linkTournaments: () => NP, mutate: () => Bw, query: () => CP, unlinkTournament: () => AP, unlinkTournaments: () => EP });
745
745
  var Bw = {};
746
746
  Te(Bw, { linkTournaments: () => NP, unlinkTournament: () => AP, unlinkTournaments: () => EP });
747
- var bs = "SINGLES", ze = "SINGLES", Wa = "DOUBLES", We = "DOUBLES", Jr = "TEAM", rt = "TEAM", h1 = { SINGLES_MATCHUP: bs, SINGLES: ze, DOUBLES_MATCHUP: Wa, DOUBLES: We, TEAM_MATCHUP: Jr, TEAM: rt }, Vw = { [ze]: [ze, "S"], [We]: [We, "D"], [rt]: [rt, "T"], S: [ze, "S"], D: [We, "D"], T: [rt, "T"] };
747
+ var Ms = "SINGLES", ze = "SINGLES", Wa = "DOUBLES", We = "DOUBLES", Jr = "TEAM", rt = "TEAM", h1 = { SINGLES_MATCHUP: Ms, SINGLES: ze, DOUBLES_MATCHUP: Wa, DOUBLES: We, TEAM_MATCHUP: Jr, TEAM: rt }, Vw = { [ze]: [ze, "S"], [We]: [We, "D"], [rt]: [rt, "T"], S: [ze, "S"], D: [We, "D"], T: [rt, "T"] };
748
748
  function At(e, t) {
749
749
  return (e ?? 0) - (t ?? 0);
750
750
  }
@@ -947,8 +947,8 @@ function Xw({ collectionValueProfiles: e, matchUpCount: t }) {
947
947
  return i.length !== ye(i).length ? (r.push("collectionPositions are not unique"), { errors: r }) : { ...x };
948
948
  }
949
949
  var E1 = {};
950
- Te(E1, { addNotice: () => Ue, callListener: () => Sh, createInstanceState: () => pO, cycleMutationStatus: () => jg, deepCopyEnabled: () => Vg, deleteNotice: () => Gg, deleteNotices: () => el, disableNotifications: () => cT, enableNotifications: () => Ud, getDevContext: () => ei, getMethods: () => dT, getNotices: () => pT, getProvider: () => vh, getTopics: () => fi, getTournamentId: () => Zs, getTournamentRecord: () => $g, getTournamentRecords: () => eo, globalLog: () => hT, handleCaughtError: () => Vp, hasTopic: () => _p, removeTournamentRecord: () => fT, setDeepCopy: () => Iu, setDevContext: () => gu, setGlobalLog: () => oT, setGlobalMethods: () => uT, setGlobalSubscriptions: () => fO, setMethods: () => lT, setStateMethods: () => gT, setStateProvider: () => dO, setSubscriptions: () => hO, setTournamentId: () => yu, setTournamentRecord: () => mT, setTournamentRecords: () => Bp, timeKeeper: () => mO });
951
- var dh = { message: "Chronological error; time violation.", code: "ANACHRONISM" }, fu = { message: "Duplicate entry", code: "DUPLICATE_ENTRY" }, Qw = { message: "Cannot remove main structure", code: "ERR_CANNOT_REMOVE_MAIN_STRUCTURE" }, ph = { message: "records must be an object with tournamentId keys", code: "ERR_INVALID_TOURNAMENTS" }, mt = { message: "Missing tournamentRecords", code: "ERR_MISSING_TOURNAMENTS" }, J = { message: "Missing tournamentRecord", code: "ERR_MISSING_TOURNAMENT" }, zu = { message: "Invalid tournamentRecord", code: "ERR_INVALID_TOURNAMENT" }, $o = { message: "Missing tournamentId", code: "ERR_MISSING_TOURNAMENT_ID" }, Ms = { message: "Invalid drawDefinition", code: "ERR_INVALID_DRAWDEF" }, ne = { message: "Missing drawDefinition", code: "ERR_MISSING_DRAWDEF" }, Jw = { message: "Existing drawDefinition(s)", code: "ERR_EXISTING_DRAWDEFS" }, Zr = { message: "drawDefinition not found", code: "ERR_NOT_FOUND_DRAWDEF" }, as = { message: "Invalid structure", code: "ERR_INVALID_STRUCTURE" }, pg = { message: "Incomplete source structure", code: "ERR_INCOMPLETE_STRUCTURE" }, mg = { message: "Invalid drawPosition for seedAssignment", code: "ERR_INVALID_SEEDING_POSITION" }, Wo = { message: "drawPosition already assigned", code: "ERR_EXISTING_POSITION_ASSIGNMENT" }, Zw = { message: "Schedule not cleared", code: "ERR_UNCHANGED_SCHEDULE_NOT_CLEARED" }, eD = { message: "drawPosition not cleared", code: "ERR_FAILURE_POSITION_NOT_CLEARED" }, A1 = { message: "drawPosition not found", code: "ERR_NOT_FOUND_DRAW_POSITION" }, fg = { message: "Unrecognized drawType", code: "ERR_UNRECOGNIZED_DRAW_TYPE" }, Yu = { message: "Missing drawPositions", code: "ERR_MISSING_DRAW_POSITIONS" }, Pp = { message: "drawPosition is active", code: "ERR_ACTIVE_DRAW_POSITION" }, C1 = { message: "drawPosition is occupied", code: "ERR_OCCUPIED_DRAW_POSITION" }, mc = { message: "Invlid drawPosition", code: "ERR_INVALID_DRAW_POSITION" }, fc = { message: "Missing drawPosition", code: "ERR_MISSING_DRAW_POSITION" }, hg = { message: "Invalid drawType", code: "ERR_INVALID_DRAW_TYPE" }, bp = { message: "Invalid drawSize", code: "ERR_INVALID_DRAW_SIZE" }, tD = { message: "Cannot set drawSize to be less than existing entries", code: "ERR_INVALID_DRAW_SIZE_MISMATCH" }, Ku = { message: "Missing drawSize", code: "ERR_MISSING_DRAW_SIZE" }, zi = { message: "Missing drawId", code: "ERR_MISSING_DRAW_ID" }, rD = { message: "drawId exists", code: "ERR_EXISTING_DRAW_ID" }, iD = { message: "participantId cannot be assigned to multiple seedNumbers", code: "INVALID_PARTICIPANT_SEEDING" }, nD = { message: "seedsCount greater than drawSize", code: "ERR_INVALID_SEED_COUNT" }, aD = { message: "Missing seedCountThresholds", code: "ERR_MISSING_SEED_COUNT_THRESHOLD" }, sD = { message: "Invalid action", code: "ERR_INVALID_ACTION" }, mh = { message: "Invalid assignment", code: "ERR_INVALID_ASSIGNMENT" }, oD = { message: "Missing seedAssignments", code: "ERR_MISSING_SEED_ASSIGNMENTS" }, cD = { message: "Invalid seedNumber", code: "ERR_INVALID_SEED_NUMBER" }, uD = { message: "Invalid seedPosition", code: "ERR_INVALID_SEED_POSITION" }, gg = { message: "Missing targetLink", code: "ERR_MISSING_LINK_TARGET" }, lD = { message: "Existing round", code: "ERR_EXISTING_ROUND" }, O1 = { message: "Missing roundNumber", code: "ERR_MISSING_ROUND_NUMBER" }, ri = { message: "Missing structureId", code: "ERR_MISSING_STRUCTURE_ID" }, lt = { message: "structure not found", code: "ERR_NOT_FOUND_STRUCTURE" }, Ig = { message: "Missing structures", code: "ERR_MISSING_STRUCTURES" }, ss = { message: "Missing structure", code: "ERR_MISSING_STRUCTURE" }, yg = { message: "Missing MAIN structure", code: "ERR_MISSING_MAIN_STRUCTURE" }, dD = { message: "drawDefinition contains unlinked structures", code: "ERR_MISSING_STRUCTURE_LINKS" }, Tn = { message: "Invalid eventType", code: "ERR_INVALID_EVENT_TYPE" }, it = { message: "Missing event / eventId", code: "ERR_MISSING_EVENT_ID" }, li = { message: "Event not found", code: "ERR_NOT_FOUND_EVENT" }, pD = { message: "Event exists", code: "ERR_EXISTING_EVENT" }, mD = { message: "Missing entries", code: "ERR_MISSING_ENTRIES" }, fD = { message: "Invalid entries", code: "ERR_INVALID_ENTRIES" }, Ug = { message: "Missing assignments", code: "ERR_MISSING_ASSIGNMENTS" }, hD = { message: "Missing stage", code: "ERR_MISSING_STAGE" }, os = { message: "Invalid stage", code: "ERR_INVALID_STAGE" }, gD = { message: "stageSequence limit", code: "ERR_LIMIT_STAGE_SEQUENCE" }, ID = { message: "Missing positionAssignments", code: "ERR_MISSING_POSITION_ASSIGNMENTS" }, yD = { message: "Cannot Assign BYE status if no assignment: { bye: true }", code: "ERR_UNCHANGED_CANNOT_ASSIGN_BYE" }, fh = { message: "Unrecognized matchUpStatus", code: "ERR_UNRECOGNIZED_MATCHUP_STATUS" }, Xu = { message: "Unrecognized matchUpFormat", code: "ERR_UNRECOGNIZED_MATCHUP_FORMAT" }, Id = { message: "Incompatible matchUpStatus", code: "ERR_INCOMPATIBLE_MATCHUP_STATUS" }, k1 = { message: "Propagated exits downstream", code: "ERR_PROPAGATED_EXITS_DOWNSTREAM" }, hc = { message: "Invalid matchUpStatus", code: "ERR_INVALID_MATCHUP_STATUS" }, In = { message: "Invalid tieFormat", code: "ERR_INVALID_TIE_FORMAT" }, Sg = { message: "Invalid matchUpFormat", code: "ERR_INVALID_MATCHUP_FORMAT" }, vg = { message: "Missing matchUpFormat", code: "ERR_MISSING_MATCHUP_FORMAT" }, UD = { message: "Missing collectionDefinition", code: "ERR_MISSING_COLLECTION_DEFINITION" }, gc = { message: "Missing tieFormat", code: "ERR_MISSING_TIE_FORMAT" }, hr = { message: "Missing matchUpId", code: "ERR_MISSING_MATCHUP_ID" }, Ys = { message: "Missing matchUpIds", code: "ERR_MISSING_MATCHUP_IDS" }, dr = { message: "matchUp not found", code: "ERR_NOT_FOUND_MATCHUP" }, ea = { message: "Missing matchUps", code: "ERR_MISSING_MATCHUPS" }, br = { message: "Missing matchUp", code: "ERR_MISSING_MATCHUP" }, xr = { message: "Invalid matchUp", code: "ERR_INVALID_MATCHUP" }, wg = { message: "Missing policyType", code: "ERR_MISSING_POLICY_TYPE" }, Mp = { message: "Missing policyDefinitions", code: "ERR_MISSING_POLICY_DEFINITIONS" }, x1 = { message: "Missing seeding policy", code: "ERR_MISSING_POLICY_SEEDING" }, SD = { message: "Missing avoidance policy", code: "ERR_MISSING_POLICY_AVOIDANCE" }, Dg = { message: "Missing policy attributes", code: "ERR_MISSING_POLICY_ATTRIBUTES" }, vD = { message: "Invalid policyDefinitions", code: "ERR_INVALID_POLICY_DEFINITIONS" }, Tg = { message: "existing policyType", code: "ERR_EXISTING_POLICY_TYPE" }, F1 = { message: "Policy not attached", code: "ERR_FAILURE_POLICY_NOT_ATTACHED" }, Qu = { message: "Policy not found", code: "ERR_NOT_FOUND_POLICY" }, L1 = { message: "Missing scoring policy / matchUpFormats", code: "ERR_MISSING_POLICY_SCORING_MATCHUP_FORMATS" }, Pg = { message: "Invalid sideNumber", code: "ERR_INVALID_SIDE_NUMBER" }, _1 = { message: "Invalid setNumber", code: "ERR_INVALID_SET_NUMBER" }, Rp = { message: "Missing setObject", code: "ERR_MISSING_SET_ATTRIBUTE" }, B1 = { message: "Missing setNumber", code: "ERR_MISSING_SET_NUMBER" }, V1 = { message: "Missing sideNumber", code: "ERR_MISSING_SIDE_NUMBER" }, Ks = { message: "Missing courtId", code: "ERR_MISSING_COURT_ID" }, ce = { message: "Missing value", code: "ERR_MISSING_VALUE" }, wD = { message: "Missing birthdate", code: "ERR_MISSING_BIRTH_DATE" }, DD = { message: "Missing date", code: "ERR_MISSING_DATE" }, TD = { message: "No valid dates", code: "ERR_NO_VALID_DATES" }, Ld = { message: "Invalid bookings", code: "ERR_INVALID_BOOKINGS" }, yd = { message: "Invalid dateAvailability", code: "ERR_INVALID_DATE_AVAILABILITY" }, PD = { message: "Missing dateAvailability", code: "ERR_MISSING_DATE_AVAILABILITY" }, Ht = { message: "Invalid Date", code: "ERR_INVALID_DATE" }, Si = { message: "Invalid time", code: "ERR_INVALID_TIME" }, bD = { message: "Invalid tournament dates", code: "ERR_INVALID_DATES_TOURNAMENT" }, hh = { message: "Invalid game scores", code: "ERR_INVALID_SCORES_GAME" }, MD = { message: "Invalid score", code: "ERR_INVALID_SCORE" }, Np = { message: "Invalid winningSide", code: "ERR_INVALID_WINNING_SIDE" }, j1 = { message: "No participants generated", code: "ERR_NO_PARTICIPANTS_GENERATED" }, bg = { message: "Cannot modify tieFormat", code: "ERR_UNCHANGED_CANNOT_MODIFY_TIEFORMAT" }, RD = { message: "Cannot modify participantType", code: "ERR_UNCHANGED_CANNOT_MODIFY_PARTICIPANT_TYPE" }, Ep = { message: "Cannot remove participants", code: "ERR_UNCHANGED_CANNOT_REMOVE_PARTICIPANTS" }, gh = { message: "Participant category mismatch", code: "ERR_CATEGORY_MISMATCH" }, Ap = { message: "Cannot change winningSide", code: "ERR_UNCHANGED_CANNOT_CHANGE_WINNING_SIDE" }, Xs = { message: "Invalid participant", code: "ERR_INVALID_PARTICIPANT" }, Wi = { message: "Invalid participantId", code: "ERR_INVALID_PARTICIPANT_ID" }, Gr = { message: "Invalid participantIds", code: "ERR_INVALID_PARTICIPANT_IDS" }, ND = { message: "Invalid participantRole", code: "ERR_INVALID_PARTICIPANT_ROLE" }, qi = { message: "Invalid participantType", code: "ERR_INVALID_PARTICIPANT_TYPE" }, ED = { message: "Missing participantRole", code: "ERR_MISSING_PARTICIPANT_ROLE" }, Qs = { message: "Missing participant", code: "ERR_MISSING_PARTICIPANT" }, Ju = { message: "Missing participants", code: "ERR_MISSING_PARTICIPANTS" }, kt = { message: "Missing participantId", code: "ERR_MISSING_PARTICIPANT_ID" }, AD = { message: "Missing qualified participants", code: "ERR_MISSING_QUALIFIED_PARTICIPANTS" }, Dt = { message: "Participant Not Found", code: "ERR_NOT_FOUND_PARTICIPANT" }, CD = { message: "participantId exists", code: "ERR_EXISTING_PARTICIPANT_ID" }, G1 = { message: "participant pair exists", code: "ERR_EXISTING_PARTICIPANT_PAIR" }, OD = { message: "No participant removed", code: "ERR_UNCHANGED_NO_PARTICIPANT_REMOVED" }, Pa = { message: "Missing participantIds", code: "ERR_MISSING_PARTICIPANT_IDS" }, kD = { message: "Missing participantsCount", code: "ERR_MISSING_PARTICIPANT_COUNT" }, xD = { message: "Participant not checked in", code: "ERR_UNCHANGED_PARTICIPANT_NOT_CHECKED_IN" }, FD = { message: "Missing person details", code: "ERR_MISSING_PERSON_DETAILS" }, Ic = { message: "Existing participant drawPosition assignment", code: "ERR_EXISTING_PARTICIPANT_DRAW_POSITION_ASSIGNMENT" }, Cp = { message: "Existing participant", code: "ERR_EXISTING_PARTICIPANT" }, Mg = { message: "participantsCount exceeds drawSize", code: "ERR_INVALID_PARTICIPANT_COUNT" }, Ih = { message: "Invalid entry status", code: "ERR_INVALID_ENTRY_STATUS" }, LD = { message: "Participant Entry Not Found", code: "ERR_NOT_FOUND_PARTICIPANT_ENTRY" }, $1 = { message: "Participant not entered in stage", code: "ERR_UNCHANGED_PARTICIPANT_NOT_ENTERED" }, W1 = { message: "Participant not found in stageSequence", code: "ERR_NOT_FOUND_PARTICIPANT_IN_STAGE" }, _D = { message: "entryStatus not allowed in stage", code: "ERR_INVALID_ENTRY_STATUS_IN_STAGE" }, BD = { message: "entryStatus not allowed for event", code: "ERR_INVALID_ENTRY_STATUS_IN_EVENT" }, yh = { message: "No stage space available for entryStatus", code: "ERR_UNCHANGED_NO_AVAILABLE_STAGE_SPACE" }, Rg = { message: "Insufficient drawPositions to accommodate qualifiers", code: "ERR_UNCHANGED_NO_DRAW_POSITIONS_FOR_QUALIFIERS" }, Ng = { message: "Insufficient drawPositions to accommodate entries", code: "ERR_INSUFFICIENT_DRAW_POSITIONS" }, VD = { message: "Missing penaltyType", code: "ERR_MISSING_PENALTY_TYPE" }, Eg = { message: "Missing penaltyId", code: "ERR_MISSING_PENALTY_ID" }, qo = { message: "Penalty not found", code: "ERR_NOT_FOUND_PENALTY" }, jD = { message: "Missing courtsCount/courtNames", code: "ERR_MISSING_COURTS_INFO" }, yc = { message: "Court not found", code: "ERR_NOT_FOUND_COURT" }, GD = { message: "Court exists", code: "ERR_EXISTING_COURT" }, $D = { message: "Venue exists", code: "ERR_EXISTING_VENUE" }, Js = { message: "Venue not found", code: "ERR_NOT_FOUND_VENUE" }, ba = { message: "Missing venueId", code: "ERR_MISSING_VENUE_ID" }, WD = { message: "Invalid endTime", code: "ERR_INVALID_END_TIME" }, Ag = { message: "Existing endTime", code: "ERR_EXISTING_END_TIME" }, qD = { message: "Invalid stopTime", code: "ERR_INVALID_STOP_TIME" }, HD = { message: "Invalid startTime", code: "ERR_INVALID_START_TIME" }, q1 = { message: "Invalid resumeTime", code: "ERR_INVALID_RESUME_TIME" }, Cg = { message: "Invalid timeItem", code: "ERR_INVALID_TIME_ITEMS" }, zD = { message: "Missing async state provider", code: "ERR_MISSING_ASYNC_STATE_PROVIDER" }, Og = { message: "Missing timeItem", code: "ERR_MISSING_TIME_ITEM" }, kg = { message: "Missing timeItems", code: "ERR_MISSING_TIME_ITEMS" }, Op = { message: "Missing context", code: "ERR_MISSING_CONTEXT" }, YD = { message: "Missing schedule", code: "ERR_MISSING_SCHEDULE" }, Fs = { message: "Invalid scaleItem", code: "ERR_INVALID_SCALE_ITEM" }, KD = { message: "Modifications failed", code: "ERR_FAILURE_MODIFICATIONS" }, Uc = { message: "No modifications applied", code: "ERR_UNCHANGED_NO_MODIFICATIONS_APPLIED" }, XD = { message: "Unable to assign court", code: "ERR_UNCHANGED_COURT_NOT_ASSIGNED" }, kp = { message: "No Candidates", code: "ERR_UNCHANGED_NO_CANDIDATES" }, QD = { message: "Invalid configuration", code: "ERR_INVALID_CONFIG" }, JD = { message: "Invalid collectionDefinition", code: "ERR_INVALID_COLLECTION_DEFINITION" }, ta = { message: "Invalid object", code: "ERR_INVALID_OBJECT" }, tu = { message: "Invalid gender", code: "ERR_INVALID_GENDER" }, hu = { message: "Invalid category", code: "ERR_INVALID_CATEGORY" }, z = { message: "Invalid values", code: "ERR_INVALID_VALUES" }, ZD = { message: "Duplicate value", code: "ERR_DUPLICATE_VALUE" }, xg = { message: "Team not found", code: "ERR_NOT_FOUND_TEAM" }, eT = { message: "No valid actions", code: "ERR_NO_VALID_ACTIONS" }, xp = { message: "No valid attributes", code: "ERR_NO_VALID_ATTRIBUTES" }, Fg = { message: "Value unchanged", code: "ABORT_UNCHANGED" }, Kt = { message: "Not found", code: "ERR_NOT_FOUND" }, Fp = { message: "Not implemented", code: "ERR_NOT_IMPLEMENTED" }, tT = { message: "Existing flight", code: "ERR_EXISTING_FLIGHT" }, Lg = { message: "Existing flight profile", code: "ERR_EXISTING_FLIGHT_PROFILE" }, rT = { message: "Existing outcome", code: "ERR_EXISTING_OUTCOME" }, iT = { message: "Existing matchUpId", code: "ERR_EXISTING_MATCHUP_ID" }, Uh = { message: "Existing stage", code: "ERR_EXISTING_STAGE" }, _g = { message: "Existing structure", code: "ERR_EXISTING_STRUCTURE" }, Lp = { message: "Method not found", code: "ERR_NOT_FOUND_METHOD" }, nT = { message: "Scheduled matchUps", code: "ERR_SCHEDULED_MATCHUPS" }, Zu = { message: "Scores present", code: "ERR_SCORES_PRESENT" }, H1 = { ANACHRONISM: dh, CANNOT_CHANGE_WINNING_SIDE: Ap, CANNOT_MODIFY_TIEFORMAT: bg, CANNOT_MODIFY_PARTICIPANT_TYPE: RD, CANNOT_REMOVE_MAIN_STRUCTURE: Qw, CANNOT_REMOVE_PARTICIPANTS: Ep, CATEGORY_MISMATCH: gh, COURT_EXISTS: GD, COURT_NOT_FOUND: yc, DRAW_DEFINITION_NOT_FOUND: Zr, DRAW_ID_EXISTS: rD, DRAW_POSITION_ACTIVE: Pp, DRAW_POSITION_ASSIGNED: Wo, DRAW_POSITION_NOT_CLEARED: eD, DRAW_POSITION_NOT_FOUND: A1, DRAW_SIZE_MISMATCH: tD, DUPLICATE_ENTRY: fu, DUPLICATE_VALUE: ZD, ENTRY_STATUS_NOT_ALLOWED_FOR_EVENT: BD, ENTRY_STATUS_NOT_ALLOWED_IN_STAGE: _D, EVENT_EXISTS: pD, EVENT_NOT_FOUND: li, EXISTING_DRAW_DEFINITIONS: Jw, EXISTING_END_TIME: Ag, EXISTING_FLIGHT: tT, EXISTING_MATCHUP_ID: iT, EXISTING_OUTCOME: rT, EXISTING_PARTICIPANT_DRAW_POSITION_ASSIGNMENT: Ic, EXISTING_PARTICIPANT: Cp, EXISTING_POLICY_TYPE: Tg, EXISTING_PROFILE: Lg, EXISTING_ROUND: lD, EXISTING_STAGE: Uh, EXISTING_STRUCTURE: _g, INCOMPATIBLE_MATCHUP_STATUS: Id, INCOMPLETE_SOURCE_STRUCTURE: pg, INSUFFICIENT_DRAW_POSITIONS: Ng, INVALID_ACTION: sD, INVALID_ASSIGNMENT: mh, INVALID_BOOKINGS: Ld, INVALID_CATEGORY: hu, INVALID_COLLECTION_DEFINITION: JD, INVALID_CONFIGURATION: QD, INVALID_DATE_AVAILABILITY: yd, INVALID_DATE: Ht, INVALID_DRAW_DEFINITION: Ms, INVALID_DRAW_POSITION_FOR_SEEDING: mg, INVALID_DRAW_POSITION: mc, INVALID_DRAW_SIZE: bp, INVALID_END_TIME: WD, INVALID_ENTRIES: fD, INVALID_EVENT_TYPE: Tn, INVALID_GAME_SCORES: hh, INVALID_GENDER: tu, INVALID_MATCHUP_FORMAT: Sg, INVALID_MATCHUP_STATUS: hc, INVALID_MATCHUP_STATUS_BYE: yD, INVALID_MATCHUP: xr, INVALID_OBJECT: ta, INVALID_PARTICIPANT_ID: Wi, INVALID_PARTICIPANT_IDS: Gr, INVALID_PARTICIPANT_ROLE: ND, INVALID_PARTICIPANT_SEEDING: iD, INVALID_PARTICIPANT_TYPE: qi, INVALID_PARTICIPANT: Xs, INVALID_POLICY_DEFINITION: vD, INVALID_RECORDS: ph, INVALID_SCALE_ITEM: Fs, INVALID_SEED_NUMBER: cD, INVALID_SEED_POSITION: uD, INVALID_SET_NUMBER: _1, INVALID_SIDE_NUMBER: Pg, INVALID_SCORE: MD, INVALID_STAGE: os, INVALID_START_TIME: HD, INVALID_STRUCTURE: as, INVALID_STOP_TIME: qD, INVALID_TIE_FORMAT: In, INVALID_TIME: Si, INVALID_TIME_ITEM: Cg, INVALID_TOURNAMENT_DATES: bD, INVALID_TOURNAMENT_RECORD: zu, INVALID_VALUES: z, INVALID_WINNING_SIDE: Np, MATCHUP_NOT_FOUND: dr, METHOD_NOT_FOUND: Lp, MISSING_ASSIGNMENTS: Ug, MISSING_ASYNC_STATE_PROVIDER: zD, MISSING_AVOIDANCE_POLICY: SD, MISSING_BIRTH_DATE: wD, MISSING_COLLECTION_DEFINITION: UD, MISSING_COURT_ID: Ks, MISSING_COURTS_INFO: jD, MISSING_DATE_AVAILABILITY: PD, MISSING_DATE: DD, MISSING_DRAW_DEFINITION: ne, MISSING_DRAW_ID: zi, MISSING_DRAW_POSITION: fc, MISSING_DRAW_POSITIONS: Yu, MISSING_DRAW_SIZE: Ku, MISSING_ENTRIES: mD, MISSING_EVENT: it, MISSING_QUALIFIED_PARTICIPANTS: AD, MISSING_MATCHUP_FORMAT: vg, MISSING_MATCHUP_ID: hr, MISSING_MATCHUP_IDS: Ys, MISSING_MATCHUP: br, MISSING_MATCHUPS: ea, MISSING_PARTICIPANT_COUNT: kD, MISSING_PARTICIPANT_ID: kt, MISSING_PARTICIPANT_IDS: Pa, MISSING_PARTICIPANT_ROLE: ED, MISSING_PARTICIPANT: Qs, MISSING_PARTICIPANTS: Ju, MISSING_PENALTY_ID: Eg, MISSING_PENALTY_TYPE: VD, MISSING_PERSON_DETAILS: FD, MISSING_POLICY_ATTRIBUTES: Dg, MISSING_POLICY_DEFINITION: Mp, MISSING_POLICY_TYPE: wg, MISSING_POSITION_ASSIGNMENTS: ID, MISSING_ROUND_NUMBER: O1, MISSING_SCHEDULE: YD, MISSING_SCORING_POLICY: L1, MISSING_SEED_ASSIGNMENTS: oD, MISSING_SEEDCOUNT_THRESHOLDS: aD, MISSING_SEEDING_POLICY: x1, MISSING_SET_NUMBER: B1, MISSING_SET_OBJECT: Rp, MISSING_SIDE_NUMBER: V1, MISSING_STAGE: hD, MISSING_STRUCTURE_ID: ri, MISSING_STRUCTURE: ss, MISSING_MAIN_STRUCTURE: yg, MISSING_STRUCTURES: Ig, MISSING_TARGET_LINK: gg, MISSING_TIE_FORMAT: gc, MISSING_TIME_ITEM: Og, MISSING_TIME_ITEMS: kg, MISSING_TOURNAMENT_ID: $o, MISSING_TOURNAMENT_RECORD: J, MISSING_TOURNAMENT_RECORDS: mt, MISSING_VALUE: ce, MISSING_VENUE_ID: ba, MODIFICATIONS_FAILED: KD, NO_CANDIDATES: kp, NO_DRAW_POSITIONS_AVAILABLE_FOR_QUALIFIERS: Rg, NO_MODIFICATIONS_APPLIED: Uc, NO_STAGE_SPACE_AVAILABLE_FOR_ENTRY_STATUS: yh, NO_PARTICIPANT_REMOVED: OD, NO_VALID_ACTIONS: eT, NO_VALID_ATTRIBUTES: xp, NO_VALID_DATES: TD, NOT_FOUND: Kt, NOT_IMPLEMENTED: Fp, PARTICIPANT_COUNT_EXCEEDS_DRAW_SIZE: Mg, PARTICIPANT_ID_EXISTS: CD, PARTICIPANT_NOT_CHECKED_IN: xD, PARTICIPANT_NOT_FOUND: Dt, PARTICIPANT_PAIR_EXISTS: G1, PENALTY_NOT_FOUND: qo, POLICY_NOT_ATTACHED: F1, POLICY_NOT_FOUND: Qu, SCHEDULE_NOT_CLEARED: Zw, SCHEDULED_MATCHUPS: nT, SCORES_PRESENT: Zu, SEEDSCOUNT_GREATER_THAN_DRAW_SIZE: nD, STAGE_SEQUENCE_LIMIT: gD, STRUCTURE_NOT_FOUND: lt, TEAM_NOT_FOUND: xg, UNABLE_TO_ASSIGN_COURT: XD, UNLINKED_STRUCTURES: dD, UNRECOGNIZED_DRAW_TYPE: fg, UNRECOGNIZED_MATCHUP_FORMAT: Xu, UNRECOGNIZED_MATCHUP_STATUS: fh, VALUE_UNCHANGED: Fg, VENUE_EXISTS: $D }, ut = { disableNotifications: !1, tournamentId: void 0, tournamentRecords: {}, subscriptions: {}, modified: !1, methods: {}, notices: [] }, aT = { addNotice: nO, callListener: uO, cycleMutationStatus: iO, deleteNotice: oO, deleteNotices: sO, disableNotifications: z1, enableNotifications: Y1, getMethods: Bg, getNotices: aO, getTopics: cO, getTournamentId: sT, getTournamentRecord: K1, getTournamentRecords: X1, removeTournamentRecord: eO, setMethods: rO, setSubscriptions: tO, setTournamentId: J1, setTournamentRecord: Q1, setTournamentRecords: Z1, handleCaughtError: lO };
950
+ Te(E1, { addNotice: () => Ue, callListener: () => Sh, createInstanceState: () => pO, cycleMutationStatus: () => jg, deepCopyEnabled: () => Vg, deleteNotice: () => Gg, deleteNotices: () => el, disableNotifications: () => cT, enableNotifications: () => Ud, getDevContext: () => ei, getMethods: () => dT, getNotices: () => pT, getProvider: () => vh, getTopics: () => fi, getTournamentId: () => eo, getTournamentRecord: () => $g, getTournamentRecords: () => to, globalLog: () => hT, handleCaughtError: () => Vp, hasTopic: () => _p, removeTournamentRecord: () => fT, setDeepCopy: () => Iu, setDevContext: () => gu, setGlobalLog: () => oT, setGlobalMethods: () => uT, setGlobalSubscriptions: () => fO, setMethods: () => lT, setStateMethods: () => gT, setStateProvider: () => dO, setSubscriptions: () => hO, setTournamentId: () => yu, setTournamentRecord: () => mT, setTournamentRecords: () => Bp, timeKeeper: () => mO });
951
+ var dh = { message: "Chronological error; time violation.", code: "ANACHRONISM" }, fu = { message: "Duplicate entry", code: "DUPLICATE_ENTRY" }, Qw = { message: "Cannot remove main structure", code: "ERR_CANNOT_REMOVE_MAIN_STRUCTURE" }, ph = { message: "records must be an object with tournamentId keys", code: "ERR_INVALID_TOURNAMENTS" }, mt = { message: "Missing tournamentRecords", code: "ERR_MISSING_TOURNAMENTS" }, J = { message: "Missing tournamentRecord", code: "ERR_MISSING_TOURNAMENT" }, zu = { message: "Invalid tournamentRecord", code: "ERR_INVALID_TOURNAMENT" }, $o = { message: "Missing tournamentId", code: "ERR_MISSING_TOURNAMENT_ID" }, Rs = { message: "Invalid drawDefinition", code: "ERR_INVALID_DRAWDEF" }, ne = { message: "Missing drawDefinition", code: "ERR_MISSING_DRAWDEF" }, Jw = { message: "Existing drawDefinition(s)", code: "ERR_EXISTING_DRAWDEFS" }, Zr = { message: "drawDefinition not found", code: "ERR_NOT_FOUND_DRAWDEF" }, as = { message: "Invalid structure", code: "ERR_INVALID_STRUCTURE" }, pg = { message: "Incomplete source structure", code: "ERR_INCOMPLETE_STRUCTURE" }, mg = { message: "Invalid drawPosition for seedAssignment", code: "ERR_INVALID_SEEDING_POSITION" }, Wo = { message: "drawPosition already assigned", code: "ERR_EXISTING_POSITION_ASSIGNMENT" }, Zw = { message: "Schedule not cleared", code: "ERR_UNCHANGED_SCHEDULE_NOT_CLEARED" }, eD = { message: "drawPosition not cleared", code: "ERR_FAILURE_POSITION_NOT_CLEARED" }, A1 = { message: "drawPosition not found", code: "ERR_NOT_FOUND_DRAW_POSITION" }, fg = { message: "Unrecognized drawType", code: "ERR_UNRECOGNIZED_DRAW_TYPE" }, Yu = { message: "Missing drawPositions", code: "ERR_MISSING_DRAW_POSITIONS" }, Pp = { message: "drawPosition is active", code: "ERR_ACTIVE_DRAW_POSITION" }, C1 = { message: "drawPosition is occupied", code: "ERR_OCCUPIED_DRAW_POSITION" }, mc = { message: "Invlid drawPosition", code: "ERR_INVALID_DRAW_POSITION" }, fc = { message: "Missing drawPosition", code: "ERR_MISSING_DRAW_POSITION" }, hg = { message: "Invalid drawType", code: "ERR_INVALID_DRAW_TYPE" }, bp = { message: "Invalid drawSize", code: "ERR_INVALID_DRAW_SIZE" }, tD = { message: "Cannot set drawSize to be less than existing entries", code: "ERR_INVALID_DRAW_SIZE_MISMATCH" }, Ku = { message: "Missing drawSize", code: "ERR_MISSING_DRAW_SIZE" }, zi = { message: "Missing drawId", code: "ERR_MISSING_DRAW_ID" }, rD = { message: "drawId exists", code: "ERR_EXISTING_DRAW_ID" }, iD = { message: "participantId cannot be assigned to multiple seedNumbers", code: "INVALID_PARTICIPANT_SEEDING" }, nD = { message: "seedsCount greater than drawSize", code: "ERR_INVALID_SEED_COUNT" }, aD = { message: "Missing seedCountThresholds", code: "ERR_MISSING_SEED_COUNT_THRESHOLD" }, sD = { message: "Invalid action", code: "ERR_INVALID_ACTION" }, mh = { message: "Invalid assignment", code: "ERR_INVALID_ASSIGNMENT" }, oD = { message: "Missing seedAssignments", code: "ERR_MISSING_SEED_ASSIGNMENTS" }, cD = { message: "Invalid seedNumber", code: "ERR_INVALID_SEED_NUMBER" }, uD = { message: "Invalid seedPosition", code: "ERR_INVALID_SEED_POSITION" }, gg = { message: "Missing targetLink", code: "ERR_MISSING_LINK_TARGET" }, lD = { message: "Existing round", code: "ERR_EXISTING_ROUND" }, O1 = { message: "Missing roundNumber", code: "ERR_MISSING_ROUND_NUMBER" }, ri = { message: "Missing structureId", code: "ERR_MISSING_STRUCTURE_ID" }, lt = { message: "structure not found", code: "ERR_NOT_FOUND_STRUCTURE" }, Ig = { message: "Missing structures", code: "ERR_MISSING_STRUCTURES" }, ss = { message: "Missing structure", code: "ERR_MISSING_STRUCTURE" }, yg = { message: "Missing MAIN structure", code: "ERR_MISSING_MAIN_STRUCTURE" }, dD = { message: "drawDefinition contains unlinked structures", code: "ERR_MISSING_STRUCTURE_LINKS" }, Tn = { message: "Invalid eventType", code: "ERR_INVALID_EVENT_TYPE" }, it = { message: "Missing event / eventId", code: "ERR_MISSING_EVENT_ID" }, li = { message: "Event not found", code: "ERR_NOT_FOUND_EVENT" }, pD = { message: "Event exists", code: "ERR_EXISTING_EVENT" }, mD = { message: "Missing entries", code: "ERR_MISSING_ENTRIES" }, fD = { message: "Invalid entries", code: "ERR_INVALID_ENTRIES" }, Ug = { message: "Missing assignments", code: "ERR_MISSING_ASSIGNMENTS" }, hD = { message: "Missing stage", code: "ERR_MISSING_STAGE" }, os = { message: "Invalid stage", code: "ERR_INVALID_STAGE" }, gD = { message: "stageSequence limit", code: "ERR_LIMIT_STAGE_SEQUENCE" }, ID = { message: "Missing positionAssignments", code: "ERR_MISSING_POSITION_ASSIGNMENTS" }, yD = { message: "Cannot Assign BYE status if no assignment: { bye: true }", code: "ERR_UNCHANGED_CANNOT_ASSIGN_BYE" }, fh = { message: "Unrecognized matchUpStatus", code: "ERR_UNRECOGNIZED_MATCHUP_STATUS" }, Xu = { message: "Unrecognized matchUpFormat", code: "ERR_UNRECOGNIZED_MATCHUP_FORMAT" }, Id = { message: "Incompatible matchUpStatus", code: "ERR_INCOMPATIBLE_MATCHUP_STATUS" }, k1 = { message: "Propagated exits downstream", code: "ERR_PROPAGATED_EXITS_DOWNSTREAM" }, hc = { message: "Invalid matchUpStatus", code: "ERR_INVALID_MATCHUP_STATUS" }, In = { message: "Invalid tieFormat", code: "ERR_INVALID_TIE_FORMAT" }, Sg = { message: "Invalid matchUpFormat", code: "ERR_INVALID_MATCHUP_FORMAT" }, vg = { message: "Missing matchUpFormat", code: "ERR_MISSING_MATCHUP_FORMAT" }, UD = { message: "Missing collectionDefinition", code: "ERR_MISSING_COLLECTION_DEFINITION" }, gc = { message: "Missing tieFormat", code: "ERR_MISSING_TIE_FORMAT" }, hr = { message: "Missing matchUpId", code: "ERR_MISSING_MATCHUP_ID" }, Ks = { message: "Missing matchUpIds", code: "ERR_MISSING_MATCHUP_IDS" }, dr = { message: "matchUp not found", code: "ERR_NOT_FOUND_MATCHUP" }, ea = { message: "Missing matchUps", code: "ERR_MISSING_MATCHUPS" }, br = { message: "Missing matchUp", code: "ERR_MISSING_MATCHUP" }, xr = { message: "Invalid matchUp", code: "ERR_INVALID_MATCHUP" }, wg = { message: "Missing policyType", code: "ERR_MISSING_POLICY_TYPE" }, Mp = { message: "Missing policyDefinitions", code: "ERR_MISSING_POLICY_DEFINITIONS" }, x1 = { message: "Missing seeding policy", code: "ERR_MISSING_POLICY_SEEDING" }, SD = { message: "Missing avoidance policy", code: "ERR_MISSING_POLICY_AVOIDANCE" }, Dg = { message: "Missing policy attributes", code: "ERR_MISSING_POLICY_ATTRIBUTES" }, vD = { message: "Invalid policyDefinitions", code: "ERR_INVALID_POLICY_DEFINITIONS" }, Tg = { message: "existing policyType", code: "ERR_EXISTING_POLICY_TYPE" }, F1 = { message: "Policy not attached", code: "ERR_FAILURE_POLICY_NOT_ATTACHED" }, Qu = { message: "Policy not found", code: "ERR_NOT_FOUND_POLICY" }, L1 = { message: "Missing scoring policy / matchUpFormats", code: "ERR_MISSING_POLICY_SCORING_MATCHUP_FORMATS" }, Pg = { message: "Invalid sideNumber", code: "ERR_INVALID_SIDE_NUMBER" }, _1 = { message: "Invalid setNumber", code: "ERR_INVALID_SET_NUMBER" }, Rp = { message: "Missing setObject", code: "ERR_MISSING_SET_ATTRIBUTE" }, B1 = { message: "Missing setNumber", code: "ERR_MISSING_SET_NUMBER" }, V1 = { message: "Missing sideNumber", code: "ERR_MISSING_SIDE_NUMBER" }, Xs = { message: "Missing courtId", code: "ERR_MISSING_COURT_ID" }, ce = { message: "Missing value", code: "ERR_MISSING_VALUE" }, wD = { message: "Missing birthdate", code: "ERR_MISSING_BIRTH_DATE" }, DD = { message: "Missing date", code: "ERR_MISSING_DATE" }, TD = { message: "No valid dates", code: "ERR_NO_VALID_DATES" }, Ld = { message: "Invalid bookings", code: "ERR_INVALID_BOOKINGS" }, yd = { message: "Invalid dateAvailability", code: "ERR_INVALID_DATE_AVAILABILITY" }, PD = { message: "Missing dateAvailability", code: "ERR_MISSING_DATE_AVAILABILITY" }, Ht = { message: "Invalid Date", code: "ERR_INVALID_DATE" }, Si = { message: "Invalid time", code: "ERR_INVALID_TIME" }, bD = { message: "Invalid tournament dates", code: "ERR_INVALID_DATES_TOURNAMENT" }, hh = { message: "Invalid game scores", code: "ERR_INVALID_SCORES_GAME" }, MD = { message: "Invalid score", code: "ERR_INVALID_SCORE" }, Np = { message: "Invalid winningSide", code: "ERR_INVALID_WINNING_SIDE" }, j1 = { message: "No participants generated", code: "ERR_NO_PARTICIPANTS_GENERATED" }, bg = { message: "Cannot modify tieFormat", code: "ERR_UNCHANGED_CANNOT_MODIFY_TIEFORMAT" }, RD = { message: "Cannot modify participantType", code: "ERR_UNCHANGED_CANNOT_MODIFY_PARTICIPANT_TYPE" }, Ep = { message: "Cannot remove participants", code: "ERR_UNCHANGED_CANNOT_REMOVE_PARTICIPANTS" }, gh = { message: "Participant category mismatch", code: "ERR_CATEGORY_MISMATCH" }, Ap = { message: "Cannot change winningSide", code: "ERR_UNCHANGED_CANNOT_CHANGE_WINNING_SIDE" }, Qs = { message: "Invalid participant", code: "ERR_INVALID_PARTICIPANT" }, Wi = { message: "Invalid participantId", code: "ERR_INVALID_PARTICIPANT_ID" }, Gr = { message: "Invalid participantIds", code: "ERR_INVALID_PARTICIPANT_IDS" }, ND = { message: "Invalid participantRole", code: "ERR_INVALID_PARTICIPANT_ROLE" }, qi = { message: "Invalid participantType", code: "ERR_INVALID_PARTICIPANT_TYPE" }, ED = { message: "Missing participantRole", code: "ERR_MISSING_PARTICIPANT_ROLE" }, Js = { message: "Missing participant", code: "ERR_MISSING_PARTICIPANT" }, Ju = { message: "Missing participants", code: "ERR_MISSING_PARTICIPANTS" }, kt = { message: "Missing participantId", code: "ERR_MISSING_PARTICIPANT_ID" }, AD = { message: "Missing qualified participants", code: "ERR_MISSING_QUALIFIED_PARTICIPANTS" }, Dt = { message: "Participant Not Found", code: "ERR_NOT_FOUND_PARTICIPANT" }, CD = { message: "participantId exists", code: "ERR_EXISTING_PARTICIPANT_ID" }, G1 = { message: "participant pair exists", code: "ERR_EXISTING_PARTICIPANT_PAIR" }, OD = { message: "No participant removed", code: "ERR_UNCHANGED_NO_PARTICIPANT_REMOVED" }, Pa = { message: "Missing participantIds", code: "ERR_MISSING_PARTICIPANT_IDS" }, kD = { message: "Missing participantsCount", code: "ERR_MISSING_PARTICIPANT_COUNT" }, xD = { message: "Participant not checked in", code: "ERR_UNCHANGED_PARTICIPANT_NOT_CHECKED_IN" }, FD = { message: "Missing person details", code: "ERR_MISSING_PERSON_DETAILS" }, Ic = { message: "Existing participant drawPosition assignment", code: "ERR_EXISTING_PARTICIPANT_DRAW_POSITION_ASSIGNMENT" }, Cp = { message: "Existing participant", code: "ERR_EXISTING_PARTICIPANT" }, Mg = { message: "participantsCount exceeds drawSize", code: "ERR_INVALID_PARTICIPANT_COUNT" }, Ih = { message: "Invalid entry status", code: "ERR_INVALID_ENTRY_STATUS" }, LD = { message: "Participant Entry Not Found", code: "ERR_NOT_FOUND_PARTICIPANT_ENTRY" }, $1 = { message: "Participant not entered in stage", code: "ERR_UNCHANGED_PARTICIPANT_NOT_ENTERED" }, W1 = { message: "Participant not found in stageSequence", code: "ERR_NOT_FOUND_PARTICIPANT_IN_STAGE" }, _D = { message: "entryStatus not allowed in stage", code: "ERR_INVALID_ENTRY_STATUS_IN_STAGE" }, BD = { message: "entryStatus not allowed for event", code: "ERR_INVALID_ENTRY_STATUS_IN_EVENT" }, yh = { message: "No stage space available for entryStatus", code: "ERR_UNCHANGED_NO_AVAILABLE_STAGE_SPACE" }, Rg = { message: "Insufficient drawPositions to accommodate qualifiers", code: "ERR_UNCHANGED_NO_DRAW_POSITIONS_FOR_QUALIFIERS" }, Ng = { message: "Insufficient drawPositions to accommodate entries", code: "ERR_INSUFFICIENT_DRAW_POSITIONS" }, VD = { message: "Missing penaltyType", code: "ERR_MISSING_PENALTY_TYPE" }, Eg = { message: "Missing penaltyId", code: "ERR_MISSING_PENALTY_ID" }, qo = { message: "Penalty not found", code: "ERR_NOT_FOUND_PENALTY" }, jD = { message: "Missing courtsCount/courtNames", code: "ERR_MISSING_COURTS_INFO" }, yc = { message: "Court not found", code: "ERR_NOT_FOUND_COURT" }, GD = { message: "Court exists", code: "ERR_EXISTING_COURT" }, $D = { message: "Venue exists", code: "ERR_EXISTING_VENUE" }, Zs = { message: "Venue not found", code: "ERR_NOT_FOUND_VENUE" }, ba = { message: "Missing venueId", code: "ERR_MISSING_VENUE_ID" }, WD = { message: "Invalid endTime", code: "ERR_INVALID_END_TIME" }, Ag = { message: "Existing endTime", code: "ERR_EXISTING_END_TIME" }, qD = { message: "Invalid stopTime", code: "ERR_INVALID_STOP_TIME" }, HD = { message: "Invalid startTime", code: "ERR_INVALID_START_TIME" }, q1 = { message: "Invalid resumeTime", code: "ERR_INVALID_RESUME_TIME" }, Cg = { message: "Invalid timeItem", code: "ERR_INVALID_TIME_ITEMS" }, zD = { message: "Missing async state provider", code: "ERR_MISSING_ASYNC_STATE_PROVIDER" }, Og = { message: "Missing timeItem", code: "ERR_MISSING_TIME_ITEM" }, kg = { message: "Missing timeItems", code: "ERR_MISSING_TIME_ITEMS" }, Op = { message: "Missing context", code: "ERR_MISSING_CONTEXT" }, YD = { message: "Missing schedule", code: "ERR_MISSING_SCHEDULE" }, Ls = { message: "Invalid scaleItem", code: "ERR_INVALID_SCALE_ITEM" }, KD = { message: "Modifications failed", code: "ERR_FAILURE_MODIFICATIONS" }, Uc = { message: "No modifications applied", code: "ERR_UNCHANGED_NO_MODIFICATIONS_APPLIED" }, XD = { message: "Unable to assign court", code: "ERR_UNCHANGED_COURT_NOT_ASSIGNED" }, kp = { message: "No Candidates", code: "ERR_UNCHANGED_NO_CANDIDATES" }, QD = { message: "Invalid configuration", code: "ERR_INVALID_CONFIG" }, JD = { message: "Invalid collectionDefinition", code: "ERR_INVALID_COLLECTION_DEFINITION" }, ta = { message: "Invalid object", code: "ERR_INVALID_OBJECT" }, tu = { message: "Invalid gender", code: "ERR_INVALID_GENDER" }, hu = { message: "Invalid category", code: "ERR_INVALID_CATEGORY" }, z = { message: "Invalid values", code: "ERR_INVALID_VALUES" }, ZD = { message: "Duplicate value", code: "ERR_DUPLICATE_VALUE" }, xg = { message: "Team not found", code: "ERR_NOT_FOUND_TEAM" }, eT = { message: "No valid actions", code: "ERR_NO_VALID_ACTIONS" }, xp = { message: "No valid attributes", code: "ERR_NO_VALID_ATTRIBUTES" }, Fg = { message: "Value unchanged", code: "ABORT_UNCHANGED" }, Kt = { message: "Not found", code: "ERR_NOT_FOUND" }, Fp = { message: "Not implemented", code: "ERR_NOT_IMPLEMENTED" }, tT = { message: "Existing flight", code: "ERR_EXISTING_FLIGHT" }, Lg = { message: "Existing flight profile", code: "ERR_EXISTING_FLIGHT_PROFILE" }, rT = { message: "Existing outcome", code: "ERR_EXISTING_OUTCOME" }, iT = { message: "Existing matchUpId", code: "ERR_EXISTING_MATCHUP_ID" }, Uh = { message: "Existing stage", code: "ERR_EXISTING_STAGE" }, _g = { message: "Existing structure", code: "ERR_EXISTING_STRUCTURE" }, Lp = { message: "Method not found", code: "ERR_NOT_FOUND_METHOD" }, nT = { message: "Scheduled matchUps", code: "ERR_SCHEDULED_MATCHUPS" }, Zu = { message: "Scores present", code: "ERR_SCORES_PRESENT" }, H1 = { ANACHRONISM: dh, CANNOT_CHANGE_WINNING_SIDE: Ap, CANNOT_MODIFY_TIEFORMAT: bg, CANNOT_MODIFY_PARTICIPANT_TYPE: RD, CANNOT_REMOVE_MAIN_STRUCTURE: Qw, CANNOT_REMOVE_PARTICIPANTS: Ep, CATEGORY_MISMATCH: gh, COURT_EXISTS: GD, COURT_NOT_FOUND: yc, DRAW_DEFINITION_NOT_FOUND: Zr, DRAW_ID_EXISTS: rD, DRAW_POSITION_ACTIVE: Pp, DRAW_POSITION_ASSIGNED: Wo, DRAW_POSITION_NOT_CLEARED: eD, DRAW_POSITION_NOT_FOUND: A1, DRAW_SIZE_MISMATCH: tD, DUPLICATE_ENTRY: fu, DUPLICATE_VALUE: ZD, ENTRY_STATUS_NOT_ALLOWED_FOR_EVENT: BD, ENTRY_STATUS_NOT_ALLOWED_IN_STAGE: _D, EVENT_EXISTS: pD, EVENT_NOT_FOUND: li, EXISTING_DRAW_DEFINITIONS: Jw, EXISTING_END_TIME: Ag, EXISTING_FLIGHT: tT, EXISTING_MATCHUP_ID: iT, EXISTING_OUTCOME: rT, EXISTING_PARTICIPANT_DRAW_POSITION_ASSIGNMENT: Ic, EXISTING_PARTICIPANT: Cp, EXISTING_POLICY_TYPE: Tg, EXISTING_PROFILE: Lg, EXISTING_ROUND: lD, EXISTING_STAGE: Uh, EXISTING_STRUCTURE: _g, INCOMPATIBLE_MATCHUP_STATUS: Id, INCOMPLETE_SOURCE_STRUCTURE: pg, INSUFFICIENT_DRAW_POSITIONS: Ng, INVALID_ACTION: sD, INVALID_ASSIGNMENT: mh, INVALID_BOOKINGS: Ld, INVALID_CATEGORY: hu, INVALID_COLLECTION_DEFINITION: JD, INVALID_CONFIGURATION: QD, INVALID_DATE_AVAILABILITY: yd, INVALID_DATE: Ht, INVALID_DRAW_DEFINITION: Rs, INVALID_DRAW_POSITION_FOR_SEEDING: mg, INVALID_DRAW_POSITION: mc, INVALID_DRAW_SIZE: bp, INVALID_END_TIME: WD, INVALID_ENTRIES: fD, INVALID_EVENT_TYPE: Tn, INVALID_GAME_SCORES: hh, INVALID_GENDER: tu, INVALID_MATCHUP_FORMAT: Sg, INVALID_MATCHUP_STATUS: hc, INVALID_MATCHUP_STATUS_BYE: yD, INVALID_MATCHUP: xr, INVALID_OBJECT: ta, INVALID_PARTICIPANT_ID: Wi, INVALID_PARTICIPANT_IDS: Gr, INVALID_PARTICIPANT_ROLE: ND, INVALID_PARTICIPANT_SEEDING: iD, INVALID_PARTICIPANT_TYPE: qi, INVALID_PARTICIPANT: Qs, INVALID_POLICY_DEFINITION: vD, INVALID_RECORDS: ph, INVALID_SCALE_ITEM: Ls, INVALID_SEED_NUMBER: cD, INVALID_SEED_POSITION: uD, INVALID_SET_NUMBER: _1, INVALID_SIDE_NUMBER: Pg, INVALID_SCORE: MD, INVALID_STAGE: os, INVALID_START_TIME: HD, INVALID_STRUCTURE: as, INVALID_STOP_TIME: qD, INVALID_TIE_FORMAT: In, INVALID_TIME: Si, INVALID_TIME_ITEM: Cg, INVALID_TOURNAMENT_DATES: bD, INVALID_TOURNAMENT_RECORD: zu, INVALID_VALUES: z, INVALID_WINNING_SIDE: Np, MATCHUP_NOT_FOUND: dr, METHOD_NOT_FOUND: Lp, MISSING_ASSIGNMENTS: Ug, MISSING_ASYNC_STATE_PROVIDER: zD, MISSING_AVOIDANCE_POLICY: SD, MISSING_BIRTH_DATE: wD, MISSING_COLLECTION_DEFINITION: UD, MISSING_COURT_ID: Xs, MISSING_COURTS_INFO: jD, MISSING_DATE_AVAILABILITY: PD, MISSING_DATE: DD, MISSING_DRAW_DEFINITION: ne, MISSING_DRAW_ID: zi, MISSING_DRAW_POSITION: fc, MISSING_DRAW_POSITIONS: Yu, MISSING_DRAW_SIZE: Ku, MISSING_ENTRIES: mD, MISSING_EVENT: it, MISSING_QUALIFIED_PARTICIPANTS: AD, MISSING_MATCHUP_FORMAT: vg, MISSING_MATCHUP_ID: hr, MISSING_MATCHUP_IDS: Ks, MISSING_MATCHUP: br, MISSING_MATCHUPS: ea, MISSING_PARTICIPANT_COUNT: kD, MISSING_PARTICIPANT_ID: kt, MISSING_PARTICIPANT_IDS: Pa, MISSING_PARTICIPANT_ROLE: ED, MISSING_PARTICIPANT: Js, MISSING_PARTICIPANTS: Ju, MISSING_PENALTY_ID: Eg, MISSING_PENALTY_TYPE: VD, MISSING_PERSON_DETAILS: FD, MISSING_POLICY_ATTRIBUTES: Dg, MISSING_POLICY_DEFINITION: Mp, MISSING_POLICY_TYPE: wg, MISSING_POSITION_ASSIGNMENTS: ID, MISSING_ROUND_NUMBER: O1, MISSING_SCHEDULE: YD, MISSING_SCORING_POLICY: L1, MISSING_SEED_ASSIGNMENTS: oD, MISSING_SEEDCOUNT_THRESHOLDS: aD, MISSING_SEEDING_POLICY: x1, MISSING_SET_NUMBER: B1, MISSING_SET_OBJECT: Rp, MISSING_SIDE_NUMBER: V1, MISSING_STAGE: hD, MISSING_STRUCTURE_ID: ri, MISSING_STRUCTURE: ss, MISSING_MAIN_STRUCTURE: yg, MISSING_STRUCTURES: Ig, MISSING_TARGET_LINK: gg, MISSING_TIE_FORMAT: gc, MISSING_TIME_ITEM: Og, MISSING_TIME_ITEMS: kg, MISSING_TOURNAMENT_ID: $o, MISSING_TOURNAMENT_RECORD: J, MISSING_TOURNAMENT_RECORDS: mt, MISSING_VALUE: ce, MISSING_VENUE_ID: ba, MODIFICATIONS_FAILED: KD, NO_CANDIDATES: kp, NO_DRAW_POSITIONS_AVAILABLE_FOR_QUALIFIERS: Rg, NO_MODIFICATIONS_APPLIED: Uc, NO_STAGE_SPACE_AVAILABLE_FOR_ENTRY_STATUS: yh, NO_PARTICIPANT_REMOVED: OD, NO_VALID_ACTIONS: eT, NO_VALID_ATTRIBUTES: xp, NO_VALID_DATES: TD, NOT_FOUND: Kt, NOT_IMPLEMENTED: Fp, PARTICIPANT_COUNT_EXCEEDS_DRAW_SIZE: Mg, PARTICIPANT_ID_EXISTS: CD, PARTICIPANT_NOT_CHECKED_IN: xD, PARTICIPANT_NOT_FOUND: Dt, PARTICIPANT_PAIR_EXISTS: G1, PENALTY_NOT_FOUND: qo, POLICY_NOT_ATTACHED: F1, POLICY_NOT_FOUND: Qu, SCHEDULE_NOT_CLEARED: Zw, SCHEDULED_MATCHUPS: nT, SCORES_PRESENT: Zu, SEEDSCOUNT_GREATER_THAN_DRAW_SIZE: nD, STAGE_SEQUENCE_LIMIT: gD, STRUCTURE_NOT_FOUND: lt, TEAM_NOT_FOUND: xg, UNABLE_TO_ASSIGN_COURT: XD, UNLINKED_STRUCTURES: dD, UNRECOGNIZED_DRAW_TYPE: fg, UNRECOGNIZED_MATCHUP_FORMAT: Xu, UNRECOGNIZED_MATCHUP_STATUS: fh, VALUE_UNCHANGED: Fg, VENUE_EXISTS: $D }, ut = { disableNotifications: !1, tournamentId: void 0, tournamentRecords: {}, subscriptions: {}, modified: !1, methods: {}, notices: [] }, aT = { addNotice: nO, callListener: uO, cycleMutationStatus: iO, deleteNotice: oO, deleteNotices: sO, disableNotifications: z1, enableNotifications: Y1, getMethods: Bg, getNotices: aO, getTopics: cO, getTournamentId: sT, getTournamentRecord: K1, getTournamentRecords: X1, removeTournamentRecord: eO, setMethods: rO, setSubscriptions: tO, setTournamentId: J1, setTournamentRecord: Q1, setTournamentRecords: Z1, handleCaughtError: lO };
952
952
  function z1() {
953
953
  ut.disableNotifications = !0;
954
954
  }
@@ -1125,13 +1125,13 @@ function _p(e) {
1125
1125
  async function Sh(e) {
1126
1126
  return Xt.callListener(e, Xe.globalSubscriptions);
1127
1127
  }
1128
- function Zs() {
1128
+ function eo() {
1129
1129
  return Xt.getTournamentId();
1130
1130
  }
1131
1131
  function $g(e) {
1132
1132
  return Xt.getTournamentRecord(e);
1133
1133
  }
1134
- function eo() {
1134
+ function to() {
1135
1135
  return Xt.getTournamentRecords();
1136
1136
  }
1137
1137
  function mT(e) {
@@ -1185,15 +1185,15 @@ function ae(e, t, r, i) {
1185
1185
  function F({ context: e, result: t, stack: r, info: i }) {
1186
1186
  return t && !Array.isArray(t?.stack) && (t.stack = []), t && Array.isArray(t?.stack) && typeof r == "string" && t.stack.push(r), t && i && (t.info = i), t && typeof e == "object" && Object.keys(e).length && (t.context || (t.context = {}), Object.assign(t.context, ae(e))), t && !t?.error && !t?.success && Object.assign(t, { ...x }), t ?? { success: !0 };
1187
1187
  }
1188
- var rr = "FEMALE", Bn = "OTHER", to = "MIXED", Et = "MALE", Wg = { FEMALE_ABBR: "F", OTHER_ABBR: "O", MIXED_ABBR: "X", MALE_ABBR: "M", ANY_ABBR: "A", FEMALE: rr, MIXED: to, OTHER: Bn, MALE: Et, ANY: "ANY" };
1188
+ var rr = "FEMALE", Bn = "OTHER", ro = "MIXED", Et = "MALE", Wg = { FEMALE_ABBR: "F", OTHER_ABBR: "O", MIXED_ABBR: "X", MALE_ABBR: "M", ANY_ABBR: "A", FEMALE: rr, MIXED: ro, OTHER: Bn, MALE: Et, ANY: "ANY" };
1189
1189
  function _a(e) {
1190
1190
  return [rr, "F"].includes(e);
1191
1191
  }
1192
- function Ts(e) {
1192
+ function Ps(e) {
1193
1193
  return [Et, "M"].includes(e);
1194
1194
  }
1195
1195
  function Qr(e) {
1196
- return [to, "X"].includes(e);
1196
+ return [ro, "X"].includes(e);
1197
1197
  }
1198
1198
  function yn(e) {
1199
1199
  return ["ANY", "A"].includes(e);
@@ -1201,14 +1201,14 @@ function yn(e) {
1201
1201
  function ur(e) {
1202
1202
  if (e) {
1203
1203
  if (_a(e)) return rr;
1204
- if (Qr(e)) return to;
1205
- if (Ts(e)) return Et;
1204
+ if (Qr(e)) return ro;
1205
+ if (Ps(e)) return Et;
1206
1206
  if (yn(e)) return "ANY";
1207
1207
  }
1208
1208
  return Bn;
1209
1209
  }
1210
1210
  function rn(e) {
1211
- return _a(e) || Ts(e);
1211
+ return _a(e) || Ps(e);
1212
1212
  }
1213
1213
  var IO = "MIXED events can not contain mixed singles or { gender: ANY } collections", yO = "events with { gender: ANY } can not contain MIXED singles collections";
1214
1214
  function jp(e) {
@@ -1326,7 +1326,7 @@ function TO(e) {
1326
1326
  }
1327
1327
  function Sc(e) {
1328
1328
  let t = typeof e == "string" ? e?.split(" ") : [];
1329
- return e && t?.length > 1 && !["AM", "PM"].includes(t[1].toUpperCase()) ? !1 : !!(!e || Ba.test(ro(e, !0, !0)));
1329
+ return e && t?.length > 1 && !["AM", "PM"].includes(t[1].toUpperCase()) ? !1 : !!(!e || Ba.test(io(e, !0, !0)));
1330
1330
  }
1331
1331
  function kr(e) {
1332
1332
  return qa(e) || _d.test(e);
@@ -1422,7 +1422,7 @@ function CO(e) {
1422
1422
  let t = Gd(e);
1423
1423
  if (!(typeof t == "object" && !Object.keys(t).length)) return t.ampm ? e : (t.hours > 12 ? (t.hours -= 12, t.ampm = "PM") : t.hours === "12" ? t.ampm = "PM" : (t.hours === "00" && (t.hours = "12"), t.ampm = "AM"), t.hours?.[0] === "0" && (t.hours = t.hours.slice(1)), `${t.hours || "12"}:${t.minutes || "00"} ${t.ampm}`);
1424
1424
  }
1425
- function ro(e, t, r) {
1425
+ function io(e, t, r) {
1426
1426
  let i = ve(e), n = nt(e), a = i ? n : e;
1427
1427
  return e ? t && (i && r && e || AO(a)) || CO(a) : void 0;
1428
1428
  }
@@ -1476,8 +1476,8 @@ function Pn(e, t) {
1476
1476
  let r = new Date(e), i = new Date(t);
1477
1477
  return r.getFullYear() === i.getFullYear() && r.getMonth() === i.getMonth() && r.getDate() === i.getDate();
1478
1478
  }
1479
- var DT = { addDays: Yg, addWeek: OO, addMinutesToTimeString: Or, convertTime: ro, getIsoDateString: Bd, getUTCdateString: Hg, DateHHMM: PO, extractDate: ve, extractTime: nt, formatDate: Pi, getDateByWeek: kO, isISODateString: qa, isDate: Su, isTimeString: zg, offsetDate: Vd, offsetTime: RO, sameDay: Pn, timeStringMinutes: ke, timeToDate: Mt, timeUTC: MO, validTimeValue: Sc, validDateString: _d, timeValidation: Ba, dateValidation: nn }, FO = (e, t) => e.filter(Boolean).every((r) => typeof r === t), LO = (e) => e.filter(Boolean).every(ft);
1480
- function Ls(e) {
1479
+ var DT = { addDays: Yg, addWeek: OO, addMinutesToTimeString: Or, convertTime: io, getIsoDateString: Bd, getUTCdateString: Hg, DateHHMM: PO, extractDate: ve, extractTime: nt, formatDate: Pi, getDateByWeek: kO, isISODateString: qa, isDate: Su, isTimeString: zg, offsetDate: Vd, offsetTime: RO, sameDay: Pn, timeStringMinutes: ke, timeToDate: Mt, timeUTC: MO, validTimeValue: Sc, validDateString: _d, timeValidation: Ba, dateValidation: nn }, FO = (e, t) => e.filter(Boolean).every((r) => typeof r === t), LO = (e) => e.filter(Boolean).every(ft);
1480
+ function _s(e) {
1481
1481
  let t = e.category;
1482
1482
  if (typeof t != "object") return { error: hu };
1483
1483
  let { ageCategoryCode: r, ageMaxDate: i, ageMinDate: n, ageMax: a, ageMin: s } = t, o = t.categoryName, c;
@@ -1520,7 +1520,7 @@ function Ls(e) {
1520
1520
  }
1521
1521
  function vu({ category: e }) {
1522
1522
  if (!Ce(e)) return { error: z };
1523
- let t = Ls({ category: e });
1523
+ let t = _s({ category: e });
1524
1524
  if (t.error) return { error: t };
1525
1525
  let { ratingMax: r, ratingMin: i } = e;
1526
1526
  return r && !ft(r) ? F({ result: { error: z }, context: { ratingMax: r } }) : i && !ft(i) ? F({ result: { error: z }, context: { ratingMin: i } }) : { ...t };
@@ -1607,7 +1607,7 @@ var PT = { collectionDefinitions: [{ collectionName: "Male Singles", matchUpForm
1607
1607
  return s.hydrate ? (i = { winCriteria: { valueGoal: s.valueGoal }, collectionDefinitions: [{ collectionId: o(0), matchUpFormat: xT, collectionName: "Doubles", matchUpType: We, ...s.doubles }, { collectionId: o(1), matchUpFormat: bi, collectionName: "Singles", matchUpType: ze, ...s.singles }] }, s.tieFormatName && (i.tieFormatName = s.tieFormatName)) : (s.collectionDefinitions.forEach((c, u) => c.collectionId = o(u)), i = s), e?.hydrateCollections && i.collectionDefinitions.forEach((c) => {
1608
1608
  n && !c.category && (c.category = n), a && !c.gender && (c.gender = a);
1609
1609
  }), i;
1610
- }, qn = YO, an = "SINGLES", _s = "SINGLES", di = "DOUBLES", Hn = "DOUBLES", Ct = "TEAM", Hr = "TEAM", KO = "RATING", XO = "BOTH", QO = { AGE: "AGE", BOTH: XO, DOUBLES: di, DOUBLES_EVENT: Hn, RATING: KO, SINGLES: an, SINGLES_EVENT: _s, TEAM_EVENT: Hr, TEAM: Ct }, re = "MAIN", oe = "QUALIFYING", sr = "CONSOLATION", zt = "VOLUNTARY_CONSOLATION", yt = "PLAY_OFF", $p = [re, oe, sr, yt, zt], Bs = { [oe]: 1, [re]: 2, [yt]: 3, [sr]: 3, [zt]: 4 }, oP = "finishingPositions", cP = "aggregateEventStructures", uP = { [re]: 1, [yt]: 2, [sr]: 3, [oe]: 4, [zt]: 5 }, JO = { [yt]: 1, [re]: 2, [sr]: 3, [oe]: 4, [zt]: 5 }, Wp = "CLUSTER", ZO = "SEPARATE", Ha = "WATERFALL", qp = "ITEM", Tr = "CONTAINER", Di = "DRAW", Hp = "RANDOM", Ti = "TOP_DOWN", za = "BOTTOM_UP", bn = "POSITION", Mn = "WINNER", Rn = "LOSER", sn = "FIRST_MATCHUP", zr = "AD_HOC", ek = "AD_HOC", vc = "FEED_IN", Xo = "COMPASS", Qo = "OLYMPIC", tk = "SINGLE_ELIMINATION", Zi = "SINGLE_ELIMINATION", al = "DOUBLE_ELIMINATION", Jo = "FIRST_MATCH_LOSER_CONSOLATION", sl = "FIRST_ROUND_LOSER_CONSOLATION", cs = "LUCKY_DRAW", zp = "CURTIS_CONSOLATION", rk = "CURTIS_CONSOLATION", Qg = "FEED_IN_CHAMPIONSHIP_TO_SF", wu = "FEED_IN_CHAMPIONSHIP_TO_SF", Jg = "FEED_IN_CHAMPIONSHIP_TO_QF", Du = "FEED_IN_CHAMPIONSHIP_TO_QF", Zg = "FEED_IN_CHAMPIONSHIP_TO_R16", Tu = "FEED_IN_CHAMPIONSHIP_TO_R16", lP = "MODIFIED_FEED_IN_CHAMPIONSHIP", Pu = "MODIFIED_FEED_IN_CHAMPIONSHIP", ol = "FEED_IN_CHAMPIONSHIP", ik = "DOUBLE_ROUND_ROBIN", Ei = "ROUND_ROBIN", Nn = "ROUND_ROBIN_WITH_PLAYOFF", dP = "DECIDER", pP = "BACKDRAW", eI = { 0: { name: "East", abbreviation: "E" }, "0-1": { name: "West", abbreviation: "W" }, "0-2": { name: "North", abbreviation: "N" }, "0-3": { name: "Northeast", abbreviation: "NE" }, "0-1-1": { name: "South", abbreviation: "S" }, "0-1-2": { name: "Southwest", abbreviation: "SW" }, "0-2-1": { name: "Northwest", abbreviation: "NW" }, "0-1-1-1": { name: "Southeast", abbreviation: "SE" } }, tI = { 0: { name: "East", abbreviation: "E" }, "0-1": { name: "West", abbreviation: "W" }, "0-2": { name: "North", abbreviation: "N" }, "0-1-1": { name: "South", abbreviation: "S" } }, Ya = "WIN_RATIO", io = "ROUND_OUTCOME", mP = [Xo, zp, Du, Tu, wu, ol, Jg, Zg, Qg, Jo, sl, cs, Pu, Qo, yt, Nn], nk = [zr, Xo, zp, al, Du, Tu, wu, ol, vc, Jo, sl, cs, Pu, Qo, yt, Ei, Nn, Zi], fP = { MAIN: re, QUALIFYING: oe, CONSOLATION: sr, ITEM: qp, CONTAINER: Tr, FIRST_MATCHUP: sn, WINNER: Mn, LOSER: Rn, AD_HOC: zr, FEED_IN: vc, FLEX_ROUNDS: ek, COMPASS: Xo, PLAY_OFF: yt, OLYMPIC: Qo, KNOCKOUT: tk, SINGLE_ELIMINATION: Zi, DOUBLE_ELIMINATION: al, CURTIS: zp, FICSF: Qg, FICQF: Jg, FICR16: Zg, MFIC: lP, VOLUNTARY_CONSOLATION: zt, FIRST_MATCH_LOSER_CONSOLATION: Jo, FIRST_ROUND_LOSER_CONSOLATION: sl, MODIFIED_FEED_IN_CHAMPIONSHIP: Pu, FEED_IN_CHAMPIONSHIP_TO_R16: Tu, FEED_IN_CHAMPIONSHIP_TO_QF: Du, FEED_IN_CHAMPIONSHIP_TO_SF: wu, FEED_IN_CHAMPIONSHIP: ol, LUCKY_DRAW: cs, ROUND_ROBIN_WITH_PLAYOFF: Nn, ROUND_ROBIN: Ei, DECIDER: dP, BACKDRAW: pP, COMPASS_ATTRIBUTES: eI, OLYMPIC_ATTRIBUTES: tI, DRAW: Di, RANDOM: Hp, TOP_DOWN: Ti, BOTTOM_UP: za, WATERFALL: Ha, WIN_RATIO: Ya, ROUND_OUTCOME: io, MULTI_STRUCTURE_DRAWS: mP, generatedDrawTypes: nk, stageOrder: Bs, finishOrder: uP, AGGREGATE_EVENT_STRUCTURES: cP, FINISHING_POSITIONS: oP }, ak = fP, pr = "tournamentRecords", rI = "policyDefinitions", _t = "tournamentRecord", iI = "onlineResource", mr = "drawDefinition", hP = "tieFormatName", nI = "matchUpFormat", En = "participantId", gP = "scheduleDates", sk = "tournamentId", ok = "scheduleDate", ck = "roundNumber", Yp = "structureId", aI = "participant", cl = "matchUpIds", IP = "entryStage", uk = "policyType", yP = "structures", sI = "eventType", dn = "matchUpId", Kp = "tieFormat", Xp = "inContext", Qp = "structure", Jp = "courtIds", lk = "personId", Zp = "venueIds", oI = "matchUps", UP = "courtId", SP = "eventId", xn = "matchUp", vP = "drawId", Mi = "error", ra = "event", wc = "param", cI = "uuids", dk = "averageMatchUpMinutes", pk = "recoveryMinutes", mk = "periodLength", fk = "number", Cr = "object", cr = "array", ir = "_validate", wP = "_message", ti = "_invalid", Er = "_ofType", uI = "_anyOf", Zo = "_oneOf", nv = { [iI]: (e) => St(Object.keys(e), [zo, Yo, Ko]).length === 3, [hP]: (e) => e && qn({ namedFormat: e }), [cI]: (e) => !e || Array.isArray(e) && e.every(ct), [Kp]: (e) => !Mr({ tieFormat: e }).error, [sI]: (e) => [an, di, Ct].includes(e), [IP]: (e) => $p.includes(e) }, hk = { [pr]: mt, [_t]: J, [rI]: Mp, [mr]: ne, [En]: kt, [nI]: vg, [sk]: $o, [Yp]: ri, [cl]: Ys, [aI]: Qs, [iI]: ta, [sI]: Tn, [yP]: Ig, [dn]: hr, [Kp]: In, [Qp]: ss, [UP]: Ks, [oI]: ea, [SP]: li, [xn]: br, [Jp]: ce, [Zp]: ce, [vP]: zi, [ra]: it }, gk = { [pr]: Cr, [rI]: Cr, [_t]: Cr, [mr]: Cr, [iI]: Cr, [gP]: cr, [aI]: Cr, [cl]: cr, [yP]: cr, [Kp]: Cr, [Qp]: Cr, [Jp]: cr, [Zp]: cr, [oI]: cr, [xn]: Cr, [ra]: Cr, [cI]: cr };
1610
+ }, qn = YO, an = "SINGLES", Bs = "SINGLES", di = "DOUBLES", Hn = "DOUBLES", Ct = "TEAM", Hr = "TEAM", KO = "RATING", XO = "BOTH", QO = { AGE: "AGE", BOTH: XO, DOUBLES: di, DOUBLES_EVENT: Hn, RATING: KO, SINGLES: an, SINGLES_EVENT: Bs, TEAM_EVENT: Hr, TEAM: Ct }, re = "MAIN", oe = "QUALIFYING", sr = "CONSOLATION", zt = "VOLUNTARY_CONSOLATION", yt = "PLAY_OFF", $p = [re, oe, sr, yt, zt], Vs = { [oe]: 1, [re]: 2, [yt]: 3, [sr]: 3, [zt]: 4 }, oP = "finishingPositions", cP = "aggregateEventStructures", uP = { [re]: 1, [yt]: 2, [sr]: 3, [oe]: 4, [zt]: 5 }, JO = { [yt]: 1, [re]: 2, [sr]: 3, [oe]: 4, [zt]: 5 }, Wp = "CLUSTER", ZO = "SEPARATE", Ha = "WATERFALL", qp = "ITEM", Tr = "CONTAINER", Di = "DRAW", Hp = "RANDOM", Ti = "TOP_DOWN", za = "BOTTOM_UP", bn = "POSITION", Mn = "WINNER", Rn = "LOSER", sn = "FIRST_MATCHUP", zr = "AD_HOC", ek = "AD_HOC", vc = "FEED_IN", Xo = "COMPASS", Qo = "OLYMPIC", tk = "SINGLE_ELIMINATION", Zi = "SINGLE_ELIMINATION", al = "DOUBLE_ELIMINATION", Jo = "FIRST_MATCH_LOSER_CONSOLATION", sl = "FIRST_ROUND_LOSER_CONSOLATION", cs = "LUCKY_DRAW", zp = "CURTIS_CONSOLATION", rk = "CURTIS_CONSOLATION", Qg = "FEED_IN_CHAMPIONSHIP_TO_SF", wu = "FEED_IN_CHAMPIONSHIP_TO_SF", Jg = "FEED_IN_CHAMPIONSHIP_TO_QF", Du = "FEED_IN_CHAMPIONSHIP_TO_QF", Zg = "FEED_IN_CHAMPIONSHIP_TO_R16", Tu = "FEED_IN_CHAMPIONSHIP_TO_R16", lP = "MODIFIED_FEED_IN_CHAMPIONSHIP", Pu = "MODIFIED_FEED_IN_CHAMPIONSHIP", ol = "FEED_IN_CHAMPIONSHIP", ik = "DOUBLE_ROUND_ROBIN", Ei = "ROUND_ROBIN", Nn = "ROUND_ROBIN_WITH_PLAYOFF", dP = "DECIDER", pP = "BACKDRAW", eI = { 0: { name: "East", abbreviation: "E" }, "0-1": { name: "West", abbreviation: "W" }, "0-2": { name: "North", abbreviation: "N" }, "0-3": { name: "Northeast", abbreviation: "NE" }, "0-1-1": { name: "South", abbreviation: "S" }, "0-1-2": { name: "Southwest", abbreviation: "SW" }, "0-2-1": { name: "Northwest", abbreviation: "NW" }, "0-1-1-1": { name: "Southeast", abbreviation: "SE" } }, tI = { 0: { name: "East", abbreviation: "E" }, "0-1": { name: "West", abbreviation: "W" }, "0-2": { name: "North", abbreviation: "N" }, "0-1-1": { name: "South", abbreviation: "S" } }, Ya = "WIN_RATIO", no = "ROUND_OUTCOME", mP = [Xo, zp, Du, Tu, wu, ol, Jg, Zg, Qg, Jo, sl, cs, Pu, Qo, yt, Nn], nk = [zr, Xo, zp, al, Du, Tu, wu, ol, vc, Jo, sl, cs, Pu, Qo, yt, Ei, Nn, Zi], fP = { MAIN: re, QUALIFYING: oe, CONSOLATION: sr, ITEM: qp, CONTAINER: Tr, FIRST_MATCHUP: sn, WINNER: Mn, LOSER: Rn, AD_HOC: zr, FEED_IN: vc, FLEX_ROUNDS: ek, COMPASS: Xo, PLAY_OFF: yt, OLYMPIC: Qo, KNOCKOUT: tk, SINGLE_ELIMINATION: Zi, DOUBLE_ELIMINATION: al, CURTIS: zp, FICSF: Qg, FICQF: Jg, FICR16: Zg, MFIC: lP, VOLUNTARY_CONSOLATION: zt, FIRST_MATCH_LOSER_CONSOLATION: Jo, FIRST_ROUND_LOSER_CONSOLATION: sl, MODIFIED_FEED_IN_CHAMPIONSHIP: Pu, FEED_IN_CHAMPIONSHIP_TO_R16: Tu, FEED_IN_CHAMPIONSHIP_TO_QF: Du, FEED_IN_CHAMPIONSHIP_TO_SF: wu, FEED_IN_CHAMPIONSHIP: ol, LUCKY_DRAW: cs, ROUND_ROBIN_WITH_PLAYOFF: Nn, ROUND_ROBIN: Ei, DECIDER: dP, BACKDRAW: pP, COMPASS_ATTRIBUTES: eI, OLYMPIC_ATTRIBUTES: tI, DRAW: Di, RANDOM: Hp, TOP_DOWN: Ti, BOTTOM_UP: za, WATERFALL: Ha, WIN_RATIO: Ya, ROUND_OUTCOME: no, MULTI_STRUCTURE_DRAWS: mP, generatedDrawTypes: nk, stageOrder: Vs, finishOrder: uP, AGGREGATE_EVENT_STRUCTURES: cP, FINISHING_POSITIONS: oP }, ak = fP, pr = "tournamentRecords", rI = "policyDefinitions", _t = "tournamentRecord", iI = "onlineResource", mr = "drawDefinition", hP = "tieFormatName", nI = "matchUpFormat", En = "participantId", gP = "scheduleDates", sk = "tournamentId", ok = "scheduleDate", ck = "roundNumber", Yp = "structureId", aI = "participant", cl = "matchUpIds", IP = "entryStage", uk = "policyType", yP = "structures", sI = "eventType", dn = "matchUpId", Kp = "tieFormat", Xp = "inContext", Qp = "structure", Jp = "courtIds", lk = "personId", Zp = "venueIds", oI = "matchUps", UP = "courtId", SP = "eventId", xn = "matchUp", vP = "drawId", Mi = "error", ra = "event", wc = "param", cI = "uuids", dk = "averageMatchUpMinutes", pk = "recoveryMinutes", mk = "periodLength", fk = "number", Cr = "object", cr = "array", ir = "_validate", wP = "_message", ti = "_invalid", Er = "_ofType", uI = "_anyOf", Zo = "_oneOf", nv = { [iI]: (e) => St(Object.keys(e), [zo, Yo, Ko]).length === 3, [hP]: (e) => e && qn({ namedFormat: e }), [cI]: (e) => !e || Array.isArray(e) && e.every(ct), [Kp]: (e) => !Mr({ tieFormat: e }).error, [sI]: (e) => [an, di, Ct].includes(e), [IP]: (e) => $p.includes(e) }, hk = { [pr]: mt, [_t]: J, [rI]: Mp, [mr]: ne, [En]: kt, [nI]: vg, [sk]: $o, [Yp]: ri, [cl]: Ks, [aI]: Js, [iI]: ta, [sI]: Tn, [yP]: Ig, [dn]: hr, [Kp]: In, [Qp]: ss, [UP]: Xs, [oI]: ea, [SP]: li, [xn]: br, [Jp]: ce, [Zp]: ce, [vP]: zi, [ra]: it }, gk = { [pr]: Cr, [rI]: Cr, [_t]: Cr, [mr]: Cr, [iI]: Cr, [gP]: cr, [aI]: Cr, [cl]: cr, [yP]: cr, [Kp]: Cr, [Qp]: Cr, [Jp]: cr, [Zp]: cr, [oI]: cr, [xn]: Cr, [ra]: Cr, [cI]: cr };
1611
1611
  function se(e, t, r) {
1612
1612
  if (!e && !Ce(e)) return { error: z };
1613
1613
  if (!t?.length || e?._bypassParamCheck) return { valid: !0 };
@@ -1670,7 +1670,7 @@ function Dc(e) {
1670
1670
  }
1671
1671
  return { ...x, ...i };
1672
1672
  }
1673
- function Vs(e) {
1673
+ function js(e) {
1674
1674
  if (e === null) return {};
1675
1675
  let { source: t, template: r } = e || {};
1676
1676
  if (!r) return t;
@@ -1705,7 +1705,7 @@ function Ia({ tournamentParticipants: e = [], policyDefinitions: t = {}, context
1705
1705
  let { ratings: u, rankings: l } = Dc({ participant: o });
1706
1706
  o.rankings = l, o.ratings = u;
1707
1707
  }
1708
- if (c?.participant) return Vs({ template: c.participant, source: o });
1708
+ if (c?.participant) return js({ template: c.participant, source: o });
1709
1709
  }
1710
1710
  return o;
1711
1711
  }
@@ -1798,7 +1798,7 @@ function De({ discover: e, element: t, name: r, ...i }) {
1798
1798
  let n = t.extensions.find((a) => a?.name === r);
1799
1799
  return { extension: n, info: n ? void 0 : Kt };
1800
1800
  }
1801
- var Ek = "activeSuspension", Ru = "appliedPolicies", MP = "context", rm = "delegatedOutcome", ji = "disabled", js = "disableAutoCalc", im = "disableLinks", qd = "display", ja = "drawDeletions", Ak = "drawProfile", Hd = "entryProfile", Ck = "eventProfile", Ok = "eventWithdrawalRequests", kk = "factory", Ai = "flightProfile", Ph = "groupingAttribute", Yn = "lineUps", Xa = "linkedTournamentsIds", nm = "matchUpHistory", fI = "participantRepresentatives", Pc = "personRequests", Bo = "positionActions", xk = "rankingPoints", Fk = "registration", pn = "roundTarget", ll = "scheduleLimits", Kn = "scheduleTiming", Gs = "schedulingProfile", Lk = "statusDetail", tc = "subOrder", Xn = "tally", ru = "tieFormatModification", RP = { ACTIVE_SUSPENSION: Ek, APPLIED_POLICIES: Ru, CONTEXT: MP, DELEGATED_OUTCOME: rm, DISABLED: ji, DISABLE_LINKS: im, DISABLE_AUTO_CALC: js, DISPLAY: qd, DRAW_DELETIONS: ja, DRAW_PROFILE: Ak, ENTRY_PROFILE: Hd, EVENT_PROFILE: Ck, EVENT_WITHDRAWAL_REQUESTS: Ok, FLIGHT_PROFILE: Ai, GROUPING_ATTRIBUTE: Ph, LINEUPS: Yn, LINKED_TOURNAMENTS: Xa, MATCHUP_HISTORY: nm, PARTICIPANT_REPRESENTATIVES: fI, PERSON_REQUESTS: Pc, POSITION_ACTIONS: Bo, RANKING_POINTS: xk, REGISTRATION: Fk, ROUND_TARGET: pn, SCHEDULE_LIMITS: ll, SCHEDULE_TIMING: Kn, SCHEDULING_PROFILE: Gs, STATUS_DETAIL: Lk, SUB_ORDER: tc, TALLY: Xn, TIE_FORMAT_MODIFICATIONS: ru, FACTORY: kk }, av = [rm, ji, js, im, Ai, Yn, Xa, nm, fI, Pc, pn, ll, Kn, Gs, tc, Xn, ru];
1801
+ var Ek = "activeSuspension", Ru = "appliedPolicies", MP = "context", rm = "delegatedOutcome", ji = "disabled", Gs = "disableAutoCalc", im = "disableLinks", qd = "display", ja = "drawDeletions", Ak = "drawProfile", Hd = "entryProfile", Ck = "eventProfile", Ok = "eventWithdrawalRequests", kk = "factory", Ai = "flightProfile", Ph = "groupingAttribute", Yn = "lineUps", Xa = "linkedTournamentsIds", nm = "matchUpHistory", fI = "participantRepresentatives", Pc = "personRequests", Bo = "positionActions", xk = "rankingPoints", Fk = "registration", pn = "roundTarget", ll = "scheduleLimits", Kn = "scheduleTiming", $s = "schedulingProfile", Lk = "statusDetail", tc = "subOrder", Xn = "tally", ru = "tieFormatModification", RP = { ACTIVE_SUSPENSION: Ek, APPLIED_POLICIES: Ru, CONTEXT: MP, DELEGATED_OUTCOME: rm, DISABLED: ji, DISABLE_LINKS: im, DISABLE_AUTO_CALC: Gs, DISPLAY: qd, DRAW_DELETIONS: ja, DRAW_PROFILE: Ak, ENTRY_PROFILE: Hd, EVENT_PROFILE: Ck, EVENT_WITHDRAWAL_REQUESTS: Ok, FLIGHT_PROFILE: Ai, GROUPING_ATTRIBUTE: Ph, LINEUPS: Yn, LINKED_TOURNAMENTS: Xa, MATCHUP_HISTORY: nm, PARTICIPANT_REPRESENTATIVES: fI, PERSON_REQUESTS: Pc, POSITION_ACTIONS: Bo, RANKING_POINTS: xk, REGISTRATION: Fk, ROUND_TARGET: pn, SCHEDULE_LIMITS: ll, SCHEDULE_TIMING: Kn, SCHEDULING_PROFILE: $s, STATUS_DETAIL: Lk, SUB_ORDER: tc, TALLY: Xn, TIE_FORMAT_MODIFICATIONS: ru, FACTORY: kk }, av = [rm, ji, Gs, im, Ai, Yn, Xa, nm, fI, Pc, pn, ll, Kn, $s, tc, Xn, ru];
1802
1802
  function NP({ tournamentRecords: e }) {
1803
1803
  if (typeof e != "object" || !Object.keys(e).length) return { error: mt };
1804
1804
  let t = ul({ tournamentRecords: e }), { tournamentIds: r } = t;
@@ -1838,9 +1838,9 @@ function dl({ tournamentRecords: e }) {
1838
1838
  })) };
1839
1839
  }
1840
1840
  var OP = {};
1841
- Te(OP, { adHocPositionSwap: () => bM, addAdHocMatchUps: () => Cm, addDrawDefinitionTimeItem: () => gy, addFinishingRounds: () => bl, addGoesTo: () => Ja, addPlayoffStructures: () => Am, addQualifyingStructure: () => PM, addVoluntaryConsolationStage: () => yM, addVoluntaryConsolationStructure: () => iy, allPlayoffPositionsFilled: () => my, alternateDrawPositionAssignment: () => sM, assignDrawPosition: () => QM, assignDrawPositionBye: () => ai, attachConsolationStructures: () => zM, attachPlayoffStructures: () => Cy, attachQualifyingStructure: () => hy, attachStructures: () => Em, autoSeeding: () => _V, automatedPlayoffPositioning: () => Oc, automatedPositioning: () => Fl, checkValidEntries: () => xm, deleteAdHocMatchUps: () => ZM, drawMatic: () => rU, findDrawDefinition: () => Ly, generateAdHocMatchUps: () => Fm, generateAdHocRounds: () => tU, generateAndPopulatePlayoffStructures: () => Ey, generateDrawDefinition: () => Zl, generateDrawMaticRound: () => qy, generateDrawStructuresAndLinks: () => Gy, generateDrawTypeAndModifyDrawDefinition: () => $y, generateQualifyingStructure: () => wy, generateVoluntaryConsolation: () => TR, getAssignedParticipantIds: () => gs, getAvailableMatchUpsCount: () => Om, getAvailablePlayoffProfiles: () => Bl, getDrawDefinitionTimeItem: () => kI, getDrawParticipantRepresentativeIds: () => xy, getDrawStructures: () => Ci, getDrawTypeCoercion: () => ql, getEligibleVoluntaryConsolationParticipants: () => ky, getMatchUpsMap: () => er, getParticipantIdFinishingPositions: () => Fy, getPositionAssignments: () => Fu, getPositionsPlayedOff: () => kc, getRandomQualifierList: () => Vy, getSeedingThresholds: () => oy, getSeedsCount: () => Hl, getStructureSeedAssignments: () => mi, getTeamLineUp: () => Qa, getValidGroupSizes: () => kl, isAdHoc: () => Rr, isCompletedStructure: () => kn, isValidForQualifying: () => jy, luckyLoserDrawPositionAssignment: () => eM, modifyDrawDefinition: () => YM, modifyDrawName: () => Oy, modifySeedAssignment: () => dM, mutate: () => kP, positionActions: () => By, pruneDrawDefinition: () => XM, qualifierDrawPositionAssignment: () => fy, qualifierProgression: () => pM, query: () => rR, removeDrawPositionAssignment: () => Ou, removeRoundMatchUps: () => eR, removeSeededParticipant: () => TM, removeStructure: () => gM, renameStructures: () => hM, resetDrawDefinition: () => KM, resetQualifyingStructure: () => UM, resetVoluntaryConsolationStructure: () => QP, setDrawParticipantRepresentativeIds: () => xP, setPositionAssignments: () => nM, setStructureOrder: () => mM, setSubOrder: () => tR, shiftAdHocRounds: () => iM, swapAdHocRounds: () => aM, swapDrawPositionAssignments: () => wM, updateTeamLineUp: () => yo, withdrawParticipantAtDrawPosition: () => Hb });
1841
+ Te(OP, { adHocPositionSwap: () => bM, addAdHocMatchUps: () => Cm, addDrawDefinitionTimeItem: () => gy, addFinishingRounds: () => bl, addGoesTo: () => Ja, addPlayoffStructures: () => Am, addQualifyingStructure: () => PM, addVoluntaryConsolationStage: () => yM, addVoluntaryConsolationStructure: () => iy, allPlayoffPositionsFilled: () => my, alternateDrawPositionAssignment: () => sM, assignDrawPosition: () => QM, assignDrawPositionBye: () => ai, attachConsolationStructures: () => zM, attachPlayoffStructures: () => Cy, attachQualifyingStructure: () => hy, attachStructures: () => Em, autoSeeding: () => _V, automatedPlayoffPositioning: () => Oc, automatedPositioning: () => Fl, checkValidEntries: () => xm, deleteAdHocMatchUps: () => ZM, drawMatic: () => rU, findDrawDefinition: () => Ly, generateAdHocMatchUps: () => Fm, generateAdHocRounds: () => tU, generateAndPopulatePlayoffStructures: () => Ey, generateDrawDefinition: () => Zl, generateDrawMaticRound: () => qy, generateDrawStructuresAndLinks: () => Gy, generateDrawTypeAndModifyDrawDefinition: () => $y, generateQualifyingStructure: () => wy, generateVoluntaryConsolation: () => TR, getAssignedParticipantIds: () => gs, getAvailableMatchUpsCount: () => Om, getAvailablePlayoffProfiles: () => Bl, getDrawDefinitionTimeItem: () => kI, getDrawParticipantRepresentativeIds: () => xy, getDrawStructures: () => Ci, getDrawTypeCoercion: () => ql, getEligibleVoluntaryConsolationParticipants: () => ky, getMatchUpsMap: () => er, getParticipantIdFinishingPositions: () => Fy, getPositionAssignments: () => Fu, getPositionsPlayedOff: () => kc, getRandomQualifierList: () => Vy, getSeedingThresholds: () => oy, getSeedsCount: () => Hl, getStructureSeedAssignments: () => mi, getTeamLineUp: () => Qa, getValidGroupSizes: () => kl, isAdHoc: () => Rr, isCompletedStructure: () => kn, isValidForQualifying: () => jy, luckyLoserDrawPositionAssignment: () => eM, modifyDrawDefinition: () => YM, modifyDrawName: () => Oy, modifySeedAssignment: () => dM, mutate: () => kP, positionActions: () => By, pruneDrawDefinition: () => XM, qualifierDrawPositionAssignment: () => fy, qualifierProgression: () => pM, query: () => rR, removeDrawPositionAssignment: () => Ou, removeRoundMatchUps: () => eR, removeSeededParticipant: () => TM, removeStructure: () => gM, renameStructures: () => hM, resetDrawDefinition: () => KM, resetQualifyingStructure: () => UM, resetVoluntaryConsolationStructure: () => QP, setDrawParticipantRepresentativeIds: () => xP, setPositionAssignments: () => nM, setStructureOrder: () => mM, setSubOrder: () => tR, shiftAdHocRounds: () => iM, swapAdHocRounds: () => aM, swapDrawPositionAssignments: () => wM, updateTeamLineUp: () => Uo, withdrawParticipantAtDrawPosition: () => Hb });
1842
1842
  var kP = {};
1843
- Te(kP, { adHocPositionSwap: () => bM, addAdHocMatchUps: () => Cm, addDrawDefinitionTimeItem: () => gy, addPlayoffStructures: () => Am, addQualifyingStructure: () => PM, addVoluntaryConsolationStage: () => yM, addVoluntaryConsolationStructure: () => iy, alternateDrawPositionAssignment: () => sM, assignDrawPosition: () => QM, assignDrawPositionBye: () => ai, attachConsolationStructures: () => zM, attachPlayoffStructures: () => Cy, attachQualifyingStructure: () => hy, attachStructures: () => Em, automatedPlayoffPositioning: () => Oc, automatedPositioning: () => Fl, deleteAdHocMatchUps: () => ZM, luckyLoserDrawPositionAssignment: () => eM, modifyDrawDefinition: () => YM, modifyDrawName: () => Oy, modifySeedAssignment: () => dM, pruneDrawDefinition: () => XM, qualifierDrawPositionAssignment: () => fy, qualifierProgression: () => pM, removeDrawPositionAssignment: () => Ou, removeRoundMatchUps: () => eR, removeSeededParticipant: () => TM, removeStructure: () => gM, renameStructures: () => hM, resetDrawDefinition: () => KM, resetQualifyingStructure: () => UM, resetVoluntaryConsolationStructure: () => QP, setDrawParticipantRepresentativeIds: () => xP, setPositionAssignments: () => nM, setStructureOrder: () => mM, setSubOrder: () => tR, shiftAdHocRounds: () => iM, swapAdHocRounds: () => aM, swapDrawPositionAssignments: () => wM, updateTeamLineUp: () => yo, withdrawParticipantAtDrawPosition: () => Hb });
1843
+ Te(kP, { adHocPositionSwap: () => bM, addAdHocMatchUps: () => Cm, addDrawDefinitionTimeItem: () => gy, addPlayoffStructures: () => Am, addQualifyingStructure: () => PM, addVoluntaryConsolationStage: () => yM, addVoluntaryConsolationStructure: () => iy, alternateDrawPositionAssignment: () => sM, assignDrawPosition: () => QM, assignDrawPositionBye: () => ai, attachConsolationStructures: () => zM, attachPlayoffStructures: () => Cy, attachQualifyingStructure: () => hy, attachStructures: () => Em, automatedPlayoffPositioning: () => Oc, automatedPositioning: () => Fl, deleteAdHocMatchUps: () => ZM, luckyLoserDrawPositionAssignment: () => eM, modifyDrawDefinition: () => YM, modifyDrawName: () => Oy, modifySeedAssignment: () => dM, pruneDrawDefinition: () => XM, qualifierDrawPositionAssignment: () => fy, qualifierProgression: () => pM, removeDrawPositionAssignment: () => Ou, removeRoundMatchUps: () => eR, removeSeededParticipant: () => TM, removeStructure: () => gM, renameStructures: () => hM, resetDrawDefinition: () => KM, resetQualifyingStructure: () => UM, resetVoluntaryConsolationStructure: () => QP, setDrawParticipantRepresentativeIds: () => xP, setPositionAssignments: () => nM, setStructureOrder: () => mM, setSubOrder: () => tR, shiftAdHocRounds: () => iM, swapAdHocRounds: () => aM, swapDrawPositionAssignments: () => wM, updateTeamLineUp: () => Uo, withdrawParticipantAtDrawPosition: () => Hb });
1844
1844
  var hI = (e) => (t) => e[t], gI = (e = []) => e.map(Gt).filter(Boolean), bh = (e = []) => e.map(Pe).filter(Boolean), Pe = (e = {}) => hI(e)("participantId"), Gt = (e = {}) => hI(e)("matchUpId"), Nu = (e = {}) => hI(e)("drawId");
1845
1845
  function xP({ representativeParticipantIds: e, drawDefinition: t }) {
1846
1846
  if (!t) return { error: Zr };
@@ -1848,9 +1848,9 @@ function xP({ representativeParticipantIds: e, drawDefinition: t }) {
1848
1848
  let r = bh(t?.entries || []);
1849
1849
  return e.length && St(e, r).length < e.length ? { error: z } : em({ drawDefinition: t, extension: { name: fI, value: e } });
1850
1850
  }
1851
- var Fr = "ABANDONED", no = "AWAITING_RESULT", mn = "CANCELLED", Ut = "COMPLETED", bc = "DEAD_RUBBER", Qe = "DEFAULTED", Ot = "DOUBLE_DEFAULT", dt = "DOUBLE_WALKOVER", xi = "IN_PROGRESS", Yr = "INCOMPLETE", II = "NOT_PLAYED", Wt = "RETIRED", Na = "SUSPENDED", vt = "TO_BE_PLAYED", st = "WALKOVER", _k = [no, Ut, Qe, xi, Yr, Wt, Na], FP = [no, Ut, Qe, dt, Ot, xi, Yr, Wt, Na, st], LP = [Fr, no, "BYE", mn, Ut, bc, Qe, dt, Ot, xi, Yr, II, Wt, Na, vt, st], _P = ["BYE", dt, Ot, Ut, Qe, Wt, st], BP = [Fr, no, mn, bc, xi, Yr, II, Na, vt, void 0], xt = [mn, Fr, Ut, bc, Qe, dt, Ot, Wt, st], yI = [Fr, Ut, Qe, dt, Ot, xi, Wt, st], VP = [xi, Yr, Na, vt], jP = { ABANDONED: Fr, AWAITING_RESULT: no, BYE: "BYE", CANCELLED: mn, COMPLETED: Ut, DEAD_RUBBER: bc, DEFAULTED: Qe, DOUBLE_WALKOVER: dt, DOUBLE_DEFAULT: Ot, IN_PROGRESS: xi, INCOMPLETE: Yr, NOT_PLAYED: II, RETIRED: Wt, SUSPENDED: Na, TO_BE_PLAYED: vt, WALKOVER: st };
1852
- function ao(e, t, r) {
1853
- let i = (d) => De({ element: d, name: pn })?.extension?.value, n = r?.deprioritizeCompleted, a = r?.mode === cP && JO, s = r?.mode === oP && uP, o = s || a || Bs, c = (d) => d?.stage === re && d?.stageSequence === 1, u = (d) => c(d) ? -1 : o[d?.stage], l = (d) => d?.matchUps.every(({ matchUpStatus: p }) => xt.includes(p) ? 1 : -1);
1851
+ var Fr = "ABANDONED", ao = "AWAITING_RESULT", mn = "CANCELLED", Ut = "COMPLETED", bc = "DEAD_RUBBER", Qe = "DEFAULTED", Ot = "DOUBLE_DEFAULT", dt = "DOUBLE_WALKOVER", xi = "IN_PROGRESS", Yr = "INCOMPLETE", II = "NOT_PLAYED", Wt = "RETIRED", Na = "SUSPENDED", vt = "TO_BE_PLAYED", st = "WALKOVER", _k = [ao, Ut, Qe, xi, Yr, Wt, Na], FP = [ao, Ut, Qe, dt, Ot, xi, Yr, Wt, Na, st], LP = [Fr, ao, "BYE", mn, Ut, bc, Qe, dt, Ot, xi, Yr, II, Wt, Na, vt, st], _P = ["BYE", dt, Ot, Ut, Qe, Wt, st], BP = [Fr, ao, mn, bc, xi, Yr, II, Na, vt, void 0], xt = [mn, Fr, Ut, bc, Qe, dt, Ot, Wt, st], yI = [Fr, Ut, Qe, dt, Ot, xi, Wt, st], VP = [xi, Yr, Na, vt], jP = { ABANDONED: Fr, AWAITING_RESULT: ao, BYE: "BYE", CANCELLED: mn, COMPLETED: Ut, DEAD_RUBBER: bc, DEFAULTED: Qe, DOUBLE_WALKOVER: dt, DOUBLE_DEFAULT: Ot, IN_PROGRESS: xi, INCOMPLETE: Yr, NOT_PLAYED: II, RETIRED: Wt, SUSPENDED: Na, TO_BE_PLAYED: vt, WALKOVER: st };
1852
+ function so(e, t, r) {
1853
+ let i = (d) => De({ element: d, name: pn })?.extension?.value, n = r?.deprioritizeCompleted, a = r?.mode === cP && JO, s = r?.mode === oP && uP, o = s || a || Vs, c = (d) => d?.stage === re && d?.stageSequence === 1, u = (d) => c(d) ? -1 : o[d?.stage], l = (d) => d?.matchUps.every(({ matchUpStatus: p }) => xt.includes(p) ? 1 : -1);
1854
1854
  return n && l(e) - l(t) || a && u(e) - u(t) || (e?.stage && o[e.stage] || 0) - (t?.stage && o[t.stage] || 0) || (i(e) || 0) - (i(t) || 0) || !s && !a && (t?.positionAssignments?.length ?? 1 / 0) - (e?.positionAssignments?.length ?? 1 / 0) || (e?.stageSequence ?? 0) - (t?.stageSequence ?? 0) || (zd(e) || 0) - (zd(t) || 0);
1855
1855
  }
1856
1856
  function zd(e) {
@@ -1873,7 +1873,7 @@ function Ci({ withStageGrouping: e, drawDefinition: t, stageSequences: r, stageS
1873
1873
  let u = (f) => {
1874
1874
  let h = De({ element: f, name: pn })?.extension?.value;
1875
1875
  return !n || n === h;
1876
- }, l = t?.structures?.filter(p).filter(m).filter(u).sort((f, h) => ao(f, h, a)) ?? [], d = e ? Object.assign({}, ...$p.map((f) => {
1876
+ }, l = t?.structures?.filter(p).filter(m).filter(u).sort((f, h) => so(f, h, a)) ?? [], d = e ? Object.assign({}, ...$p.map((f) => {
1877
1877
  let h = l?.filter((g) => g.stage === f);
1878
1878
  return h?.length && { [f]: h };
1879
1879
  }).filter(Boolean)) : {};
@@ -2044,7 +2044,7 @@ function qk({ participantMap: e, template: t }) {
2044
2044
  n.individualParticipants = [];
2045
2045
  for (let a of n.individualParticipantIds) {
2046
2046
  let s = e[a].participant;
2047
- n.individualParticipants.push(t ? Vs({ template: t, source: s }) : s);
2047
+ n.individualParticipants.push(t ? js({ template: t, source: s }) : s);
2048
2048
  }
2049
2049
  }
2050
2050
  }
@@ -2247,7 +2247,7 @@ function tx({ stage: e, drawDefinition: t }) {
2247
2247
  function Nh({ stage: e, drawDefinition: t, entryStatus: r }) {
2248
2248
  return t.entries.reduce((i, n) => n.entryStage === e && n.entryStatus === r ? i + 1 : i, 0);
2249
2249
  }
2250
- function so({ provisionalPositioning: e, placementGroup: t, drawDefinition: r, stageSequence: i, entryStatuses: n, structureId: a, roundTarget: s, stages: o, stage: c }) {
2250
+ function oo({ provisionalPositioning: e, placementGroup: t, drawDefinition: r, stageSequence: i, entryStatuses: n, structureId: a, roundTarget: s, stages: o, stage: c }) {
2251
2251
  let u = r.entries?.reduce((l, d) => {
2252
2252
  let p = De({ name: pn, element: d })?.extension?.value, m = c && d.entryStage === c || o?.length && d.entryStage && o.includes(d.entryStage), f = !n || d.entryStatus && n.includes(d.entryStatus), h = d.entryStageSequence ?? 1;
2253
2253
  return m && (!i || h === i) && f && (!s || !p || s === p) ? l.concat(d) : l;
@@ -2290,7 +2290,7 @@ function mi({ provisionalPositioning: e, returnAllProxies: t, drawDefinition: r,
2290
2290
  let o = Ye({ structure: n }).positionAssignments;
2291
2291
  if (a || !n) return { seedAssignments: [], error: lt };
2292
2292
  i || (i = n.structureId);
2293
- let { stage: c, stageSequence: u } = n, l = c === yt && r && so({ provisionalPositioning: e, drawDefinition: r, stageSequence: u, structureId: i, stage: c }), d = l ? l.filter((f) => f.placementGroup === 1).sort((f, h) => f.GEMscore < h.GEMscore && 1 || f.GEMscore > h.GEMscore && -1 || 0).map((f, h) => {
2293
+ let { stage: c, stageSequence: u } = n, l = c === yt && r && oo({ provisionalPositioning: e, drawDefinition: r, stageSequence: u, structureId: i, stage: c }), d = l ? l.filter((f) => f.placementGroup === 1).sort((f, h) => f.GEMscore < h.GEMscore && 1 || f.GEMscore > h.GEMscore && -1 || 0).map((f, h) => {
2294
2294
  let g = h + 1;
2295
2295
  return { participantId: f.participantId, seedValue: g, seedProxy: !0, seedNumber: g };
2296
2296
  }) : [], p = d?.slice(0, t ? d.length : o.length / 2);
@@ -2455,7 +2455,7 @@ function ax({ drawDefinition: e, structureId: t, matchUpsMap: r }) {
2455
2455
  }), { sourceDrawPositionRanges: l };
2456
2456
  }
2457
2457
  function ob({ drawDefinition: e }) {
2458
- if (typeof e != "object") return { error: Ms };
2458
+ if (typeof e != "object") return { error: Rs };
2459
2459
  let t = {}, { structures: r = [], links: i = [] } = e || {}, n = r.reduce((s, o) => {
2460
2460
  let { stage: c } = o;
2461
2461
  return s[c] ? s[c].push(o) : s[c] = [o], s;
@@ -2552,8 +2552,8 @@ function pb({ matchUp: e }) {
2552
2552
  let t = (e.sides ?? [])?.map((s) => s?.participantId).filter(Boolean), r = e.sides?.filter((s) => s.participant?.participantType === be).map((s) => s.participantId).filter(Boolean) ?? [], i = ((e.sides ?? [])?.map((s) => s.participant?.individualParticipants).filter(Boolean) ?? []).map((s) => (s ?? []).map((o) => o?.participantId).filter(Boolean)), n = [...r, ...i.flat()].filter(Boolean) ?? [], a = ye(n.concat(t)).filter(Boolean) ?? [];
2553
2553
  return { nestedIndividualParticipantIds: i, allRelevantParticipantIds: a, individualParticipantIds: n, sideParticipantIds: t, ...x };
2554
2554
  }
2555
- var Yd = "CHECK_IN", Kd = "CHECK_OUT", lx = "SCHEDULE", oo = "SCHEDULE.ASSIGNMENT.VENUE", On = "SCHEDULE.ALLOCATION.COURTS", wa = "SCHEDULE.ASSIGNMENT.COURT", mm = "SCHEDULE.COURT.ORDER", co = "SCHEDULE.DATE", dx = "COMPLETED.DATE", GI = "HOME_PARTICIPANT_ID", $I = "SCHEDULE.ASSIGN.OFFICIAL", uo = "SCHEDULE.TIME.SCHEDULED", Bi = "SCHEDULE.TIME.START", Wn = "SCHEDULE.TIME.STOP", Sn = "SCHEDULE.TIME.RESUME", Jn = "SCHEDULE.TIME.END", fm = "SCHEDULE.TIME.MODIFIERS", mb = "TO_BE_ANNOUNCED", fb = "NEXT_AVAILABLE", hb = "FOLLOWED_BY", gb = "AFTER_REST", Ib = "RAIN_DELAY", px = "NOT_BEFORE", Eh = [mb, fb, hb, gb, Ib], mx = "ELIGIBILITY", fx = "REGISTRATION", hx = "SUSPENSION", gx = "MEDICAL", Ix = "PENALTY", yb = "SCALE", Ub = "RATING", Sb = "RANKING", WI = "SEEDING", Aa = "PUBLISH", ni = "PUBLIC", Ca = "STATUS", yx = "MODIFICATION", Ux = "RETRIEVAL", Sx = "other", vx = { MUTUALLY_EXCLUSIVE_TIME_MODIFIERS: Eh, AFTER_REST: gb, ALLOCATE_COURTS: On, ASSIGN_COURT: wa, ASSIGN_OFFICIAL: $I, ASSIGN_VENUE: oo, CHECK_IN: Yd, CHECK_OUT: Kd, COMPLETED_DATE: dx, COURT_ORDER: mm, ELIGIBILITY: mx, END_TIME: Jn, FOLLOWED_BY: hb, MEDICAL: gx, MODIFICATION: yx, NEXT_AVAILABLE: fb, NOT_BEFORE: px, OTHER: Sx, PENALTY: Ix, PUBLIC: ni, PUBLISH: Aa, RANKING: Sb, RATING: Ub, RAIN_DELAY: Ib, REGISTRATION: fx, RESUME_TIME: Sn, RETRIEVAL: Ux, SCALE: yb, SCHEDULE: lx, SCHEDULED_DATE: co, SCHEDULED_TIME: uo, SEEDING: WI, START_TIME: Bi, STATUS: Ca, STOP_TIME: Wn, SUSPENSION: hx, TIME_MODIFIERS: fm, TO_BE_ANNOUNCED: mb };
2556
- function lo({ matchUp: e }) {
2555
+ var Yd = "CHECK_IN", Kd = "CHECK_OUT", lx = "SCHEDULE", co = "SCHEDULE.ASSIGNMENT.VENUE", On = "SCHEDULE.ALLOCATION.COURTS", wa = "SCHEDULE.ASSIGNMENT.COURT", mm = "SCHEDULE.COURT.ORDER", uo = "SCHEDULE.DATE", dx = "COMPLETED.DATE", GI = "HOME_PARTICIPANT_ID", $I = "SCHEDULE.ASSIGN.OFFICIAL", lo = "SCHEDULE.TIME.SCHEDULED", Bi = "SCHEDULE.TIME.START", Wn = "SCHEDULE.TIME.STOP", Sn = "SCHEDULE.TIME.RESUME", Jn = "SCHEDULE.TIME.END", fm = "SCHEDULE.TIME.MODIFIERS", mb = "TO_BE_ANNOUNCED", fb = "NEXT_AVAILABLE", hb = "FOLLOWED_BY", gb = "AFTER_REST", Ib = "RAIN_DELAY", px = "NOT_BEFORE", Eh = [mb, fb, hb, gb, Ib], mx = "ELIGIBILITY", fx = "REGISTRATION", hx = "SUSPENSION", gx = "MEDICAL", Ix = "PENALTY", yb = "SCALE", Ub = "RATING", Sb = "RANKING", WI = "SEEDING", Aa = "PUBLISH", ni = "PUBLIC", Ca = "STATUS", yx = "MODIFICATION", Ux = "RETRIEVAL", Sx = "other", vx = { MUTUALLY_EXCLUSIVE_TIME_MODIFIERS: Eh, AFTER_REST: gb, ALLOCATE_COURTS: On, ASSIGN_COURT: wa, ASSIGN_OFFICIAL: $I, ASSIGN_VENUE: co, CHECK_IN: Yd, CHECK_OUT: Kd, COMPLETED_DATE: dx, COURT_ORDER: mm, ELIGIBILITY: mx, END_TIME: Jn, FOLLOWED_BY: hb, MEDICAL: gx, MODIFICATION: yx, NEXT_AVAILABLE: fb, NOT_BEFORE: px, OTHER: Sx, PENALTY: Ix, PUBLIC: ni, PUBLISH: Aa, RANKING: Sb, RATING: Ub, RAIN_DELAY: Ib, REGISTRATION: fx, RESUME_TIME: Sn, RETRIEVAL: Ux, SCALE: yb, SCHEDULE: lx, SCHEDULED_DATE: uo, SCHEDULED_TIME: lo, SEEDING: WI, START_TIME: Bi, STATUS: Ca, STOP_TIME: Wn, SUSPENSION: hx, TIME_MODIFIERS: fm, TO_BE_ANNOUNCED: mb };
2556
+ function po({ matchUp: e }) {
2557
2557
  if (!e) return { error: br };
2558
2558
  if (!e.hasContext) return { error: Op };
2559
2559
  if (!e.sides || e.sides.filter(Boolean).length !== 2) return { error: xr };
@@ -2601,12 +2601,12 @@ function Dx({ matchUpFormat: e, categoryName: t, categoryType: r, defaultTiming:
2601
2601
  var wb = "DOUBLES_SINGLES", Db = "SINGLES_DOUBLES", Ni = "total", Ah = "participantConflict", ua = "matchUpConflict", Tb = "ISSUE_IDS", xa = "CONFLICT", Fa = "WARNING", Ch = "ERROR", Oh = "ISSUE", Td = "STATE", Tx = { SINGLES_DOUBLES: Db, DOUBLES_SINGLES: wb, TOTAL: Ni, CONFLICT_MATCHUP_ORDER: ua, CONFLICT_PARTICIPANTS: Ah, SCHEDULE_ISSUE_IDS: Tb, SCHEDULE_CONFLICT: xa, SCHEDULE_WARNING: Fa, SCHEDULE_ERROR: Ch, SCHEDULE_ISSUE: Oh, SCHEDULE_STATE: Td };
2602
2602
  function Tl({ defaultAverageMinutes: e = 90, defaultRecoveryMinutes: t = 0, tournamentRecord: r, matchUpFormat: i, categoryName: n, categoryType: a, eventType: s, event: o }) {
2603
2603
  if (!r) return { error: J };
2604
- s = s ?? o?.eventType ?? _s;
2604
+ s = s ?? o?.eventType ?? Bs;
2605
2605
  let c = { averageTimes: [{ minutes: { default: e } }], recoveryTimes: [{ minutes: { default: t } }] }, { scheduleTiming: u } = hl({ tournamentRecord: r, categoryName: n, categoryType: a, event: o }), l = { ...u, matchUpFormat: i, categoryType: a, defaultTiming: c };
2606
2606
  return hm({ eventType: s, timingDetails: l });
2607
2607
  }
2608
2608
  function hm({ timingDetails: e, eventType: t }) {
2609
- let r = Dx(e), i = Object.keys(r?.minutes || {}), n = r?.minutes && (i?.includes(t) && r.minutes[t] || r.minutes.default), a = wx({ ...e, averageMinutes: n }), s = Object.keys(a?.minutes || {}), o = a?.minutes && (s?.includes(t) && a.minutes[t] || a.minutes.default), c = Tt(_s)(t) ? Db : wb, u = a?.minutes && (s?.includes(c) && a.minutes[c] || o);
2609
+ let r = Dx(e), i = Object.keys(r?.minutes || {}), n = r?.minutes && (i?.includes(t) && r.minutes[t] || r.minutes.default), a = wx({ ...e, averageMinutes: n }), s = Object.keys(a?.minutes || {}), o = a?.minutes && (s?.includes(t) && a.minutes[t] || a.minutes.default), c = Tt(Bs)(t) ? Db : wb, u = a?.minutes && (s?.includes(c) && a.minutes[c] || o);
2610
2610
  return { averageMinutes: n, recoveryMinutes: o, typeChangeRecoveryMinutes: u };
2611
2611
  }
2612
2612
  function Cf(e) {
@@ -2617,11 +2617,11 @@ function hs({ timeItems: e, itemType: t }) {
2617
2617
  return { itemValue: r?.itemValue, timeStamp: i };
2618
2618
  }
2619
2619
  function Pb({ timeStamp: e, schedule: t, matchUp: r }) {
2620
- let { itemValue: i, timeStamp: n } = hs({ timeItems: r?.timeItems || [], itemType: uo });
2620
+ let { itemValue: i, timeStamp: n } = hs({ timeItems: r?.timeItems || [], itemType: lo });
2621
2621
  return !t || n && e && new Date(n).getTime() > new Date(e).getTime() ? { scheduledTime: i } : t;
2622
2622
  }
2623
- function po({ timeStamp: e, schedule: t, matchUp: r }) {
2624
- let { itemValue: i, timeStamp: n } = hs({ timeItems: r?.timeItems || [], itemType: co });
2623
+ function mo({ timeStamp: e, schedule: t, matchUp: r }) {
2624
+ let { itemValue: i, timeStamp: n } = hs({ timeItems: r?.timeItems || [], itemType: uo });
2625
2625
  return !t || n && e && new Date(n).getTime() > new Date(e).getTime() ? { scheduledDate: i } : t;
2626
2626
  }
2627
2627
  function Ss(e) {
@@ -2701,15 +2701,15 @@ function Ln({ tournamentRecords: e, tournamentRecord: t, venueId: r }) {
2701
2701
  if (o.success && o.venue) return Pl({ tournamentRecord: t, venue: o.venue }), { ...x, venue: i };
2702
2702
  }
2703
2703
  }
2704
- return i ? { ...x, venue: i } : { error: Js };
2704
+ return i ? { ...x, venue: i } : { error: Zs };
2705
2705
  }
2706
2706
  function qI({ convertExtensions: e, ...t }) {
2707
2707
  let { tournamentRecords: r, tournamentRecord: i, venueId: n } = t, a = Ln({ tournamentRecords: r, tournamentRecord: i, venueId: n });
2708
2708
  return ie(a, e, !0);
2709
2709
  }
2710
- function mo({ tournamentRecords: e, tournamentRecord: t, courtId: r }) {
2710
+ function fo({ tournamentRecords: e, tournamentRecord: t, courtId: r }) {
2711
2711
  if (!t) return { error: J };
2712
- if (!r) return { error: Ks };
2712
+ if (!r) return { error: Xs };
2713
2713
  let i = "findCourt", n, a;
2714
2714
  if ((t.venues ?? []).forEach((s) => {
2715
2715
  (s.courts ?? []).forEach((o) => {
@@ -2719,19 +2719,19 @@ function mo({ tournamentRecords: e, tournamentRecord: t, courtId: r }) {
2719
2719
  if (e) {
2720
2720
  let s = (dl({ tournamentRecords: e }).linkedTournamentIds ?? [])[t.tournamentId];
2721
2721
  for (let o of s) {
2722
- let c = e[o], u = mo({ tournamentRecord: c, courtId: r });
2722
+ let c = e[o], u = fo({ tournamentRecord: c, courtId: r });
2723
2723
  if (u.success) return u.venue && Pl({ tournamentRecord: t, venue: u.venue }), { ...x, court: n, venue: a };
2724
2724
  }
2725
2725
  }
2726
2726
  return F({ result: { error: yc }, stack: i });
2727
2727
  }
2728
2728
  function HI(e) {
2729
- return ie(mo(e), !1, !0);
2729
+ return ie(fo(e), !1, !0);
2730
2730
  }
2731
2731
  function gm({ tournamentRecord: e, internalUse: t, courtId: r }) {
2732
2732
  if (!e) return { error: J };
2733
- if (!r) return { error: Ks };
2734
- let i = mo({ tournamentRecord: e, courtId: r });
2733
+ if (!r) return { error: Xs };
2734
+ let i = fo({ tournamentRecord: e, courtId: r });
2735
2735
  if (i.error) return i;
2736
2736
  let n = i.court && (({ altitude: a, courtId: s, courtName: o, courtDimensions: c, latitude: u, longitude: l, surfaceCategory: d, surfaceType: p, surfacedDate: m, pace: f, notes: h }) => ({ altitude: a, courtId: s, courtName: o, courtDimensions: c, latitude: u, longitude: l, surfaceCategory: d, surfaceType: p, surfacedDate: m, pace: f, notes: h }))(i.court);
2737
2737
  return { ...x, courtInfo: ie(n, !1, t) };
@@ -2797,7 +2797,7 @@ function Im(e) {
2797
2797
  if ((!g || g.includes(l.eventId)) && (!I || I.includes(l.drawId))) {
2798
2798
  let v = (K) => K.createdAt ? new Date(K.createdAt).getTime() : 0, w = /* @__PURE__ */ new Map(), S = l.timeItems?.toSorted((K, X) => v(K) - v(X)) ?? [];
2799
2799
  for (let K of S) w.set(K.itemType, K.itemValue);
2800
- let T = w.get(GI), b = w.get(On), P = w.get(uo), M = w.get(fm), R = w.get(co), E = w.get($I), A = w.get(mm), N = w.get(oo), C = w.get(wa), k, O, L, _, B, G = l.matchUpType ?? r;
2800
+ let T = w.get(GI), b = w.get(On), P = w.get(lo), M = w.get(fm), R = w.get(uo), E = w.get($I), A = w.get(mm), N = w.get(co), C = w.get(wa), k, O, L, _, B, G = l.matchUpType ?? r;
2801
2801
  if (o && P && n && G) {
2802
2802
  let K = { matchUpFormat: l.matchUpFormat ?? c, ...o };
2803
2803
  ({ averageMinutes: O = 0, recoveryMinutes: L = 0, typeChangeRecoveryMinutes: _ = 0 } = hm({ timingDetails: K, eventType: G })), (O || L) && (k = f ? Or(nt(f), L) : Or(P, O + L)), _ && (B = f ? Or(nt(f), _) : Or(P, O + _));
@@ -2816,14 +2816,14 @@ function Im(e) {
2816
2816
  }
2817
2817
  h = ae({ typeChangeTimeAfterRecovery: B, timeAfterRecovery: k, scheduledDate: R, scheduledTime: P, isoDateString: $, homeParticipantId: T, venueAbbreviation: W, allocatedCourts: b, timeModifiers: M, venueName: H, venueId: N, courtOrder: A, courtName: q, courtId: C, official: E, typeChangeRecoveryMinutes: _, recoveryMinutes: L, averageMinutes: O, milliseconds: d, startTime: m, endTime: f, time: p });
2818
2818
  } else h = ae({ milliseconds: d, startTime: m, endTime: f, time: p });
2819
- let { scheduledDate: y } = po({ matchUp: l }), { scheduledTime: U } = Pb({ matchUp: l });
2819
+ let { scheduledDate: y } = mo({ matchUp: l }), { scheduledTime: U } = Pb({ matchUp: l });
2820
2820
  if (s && u?.displaySettings?.draws) {
2821
2821
  let v = u.displaySettings.draws, w = (v?.[l.drawId] ?? v?.default)?.scheduleDetails;
2822
2822
  if (w) {
2823
2823
  let S = (w.find((T) => y && T.dates?.includes(y)) ?? w.find((T) => !T.dates?.length))?.attributes;
2824
2824
  if (S) {
2825
2825
  let T = Object.assign({}, ...Object.keys(h).map((b) => ({ [b]: !0 })), S);
2826
- h = Vs({ source: h, template: T });
2826
+ h = js({ source: h, template: T });
2827
2827
  }
2828
2828
  }
2829
2829
  }
@@ -2948,7 +2948,7 @@ function bb({ scheduleVisibilityFilters: e, sourceDrawPositionRanges: t, tournam
2948
2948
  if (r && ge.sides) {
2949
2949
  let Se = p?.[Tc], He = (Ne) => {
2950
2950
  let Oe = g?.[Ne]?.participant;
2951
- return Oe && Vs({ template: Se?.participant, source: Oe });
2951
+ return Oe && js({ template: Se?.participant, source: Oe });
2952
2952
  };
2953
2953
  if (ge.sides.filter(Boolean).forEach((Ne) => {
2954
2954
  if (Ne.participantId) {
@@ -2970,7 +2970,7 @@ function bb({ scheduleVisibilityFilters: e, sourceDrawPositionRanges: t, tournam
2970
2970
  let { matchUpType: Ne } = ym({ matchUp: ge });
2971
2971
  Ne && Object.assign(ge, { matchUpType: Ne });
2972
2972
  }
2973
- if (U?.inferGender && (!ge.gender || ge.gender === to) && ge.sides?.length === 2 && ge.matchUpType !== Ct) {
2973
+ if (U?.inferGender && (!ge.gender || ge.gender === ro) && ge.sides?.length === 2 && ge.matchUpType !== Ct) {
2974
2974
  let Ne = ge.sides.map((Oe) => {
2975
2975
  if (Tt(ze)(ge.matchUpType)) return Oe.participant?.person?.sex;
2976
2976
  if (Oe.participant?.individualParticipants?.length === 2) {
@@ -2996,7 +2996,7 @@ function bb({ scheduleVisibilityFilters: e, sourceDrawPositionRanges: t, tournam
2996
2996
  }
2997
2997
  let tt = ge.sides && ge.sides.filter((Se) => Se?.participantId).length === 2, ht = !ge.winningSide;
2998
2998
  if (Object.assign(ge, { readyToScore: w && tt && ht, hasContext: !0 }), tt) {
2999
- let { allParticipantsCheckedIn: Se, checkedInParticipantIds: He } = lo({ matchUp: ge });
2999
+ let { allParticipantsCheckedIn: Se, checkedInParticipantIds: He } = po({ matchUp: ge });
3000
3000
  Object.assign(ge, { allParticipantsCheckedIn: Se, checkedInParticipantIds: He });
3001
3001
  }
3002
3002
  return Array.isArray(U?.exclude) && U?.exclude.forEach((Se) => delete ge[Se]), ge;
@@ -3010,7 +3010,7 @@ function Fx({ timeStamp: e, schedule: t, matchUp: r }) {
3010
3010
  return !t || n && e && new Date(n).getTime() > new Date(e).getTime() ? { courtId: i } : t;
3011
3011
  }
3012
3012
  function Lx({ timeStamp: e, schedule: t, matchUp: r }) {
3013
- let { itemValue: i, timeStamp: n } = hs({ timeItems: r?.timeItems || [], itemType: oo });
3013
+ let { itemValue: i, timeStamp: n } = hs({ timeItems: r?.timeItems || [], itemType: co });
3014
3014
  return !t || n && e && new Date(n).getTime() > new Date(e).getTime() ? { venueId: i } : t;
3015
3015
  }
3016
3016
  function jn(e) {
@@ -3019,7 +3019,7 @@ function jn(e) {
3019
3019
  return t.filter((ee) => {
3020
3020
  if (b && !Tt(Jr)(ee) && !ee.readyToScore || ee.winningSide && s && ![1, 2].includes(ee.winningSide) || d !== void 0 && (d && !ee.tieMatchUps || !d && ee.tieMatchUps) || n !== void 0 && (n && !ee.collectionId || !n && ee.collectionId) || O.length && !O.includes(ee.stage) || L.length && !L.includes(ee.stageSequence) || _.length && (!ee.collectionId || !_.includes(ee.collectionId)) || B.length && (!ee.roundName || !B.includes(ee.roundName)) || G.length && (!ee.roundNumber || !G.includes(ee.roundNumber)) || $.length && (!ee.roundPosition || !$.includes(ee.roundPosition)) || C.length && (!ee.matchUpStatus || !C.includes(ee.matchUpStatus)) || k.length && ee.matchUpStatus && k.includes(ee.matchUpStatus) || j.length && !j.includes(ee.matchUpId) || V.length && (!ee.matchUpType || !Tp(V, ee.matchUpType)) || Y.length && (!ee.matchUpFormat || !Y.includes(ee.matchUpFormat))) return !1;
3021
3021
  if (q?.length) {
3022
- let { scheduledTime: ue } = Pb({ matchUp: ee }), { scheduledDate: he } = po({ matchUp: ee }), qe = ve(ue) || he;
3022
+ let { scheduledTime: ue } = Pb({ matchUp: ee }), { scheduledDate: he } = mo({ matchUp: ee }), qe = ve(ue) || he;
3023
3023
  if (!q.find((Fe) => Pn(Fe, qe))) return !1;
3024
3024
  }
3025
3025
  if (H.length) {
@@ -3134,7 +3134,7 @@ function wr({ inContextDrawMatchUps: e = [], useTargetMatchUpIds: t, inContextMa
3134
3134
  let a = r;
3135
3135
  e.length && !a && (a = e.find((o) => o.matchUpId === n));
3136
3136
  let { structure: s } = me({ structureId: a?.structureId, drawDefinition: i });
3137
- return s?.finishingPosition === io ? Vx({ inContextDrawMatchUps: e, useTargetMatchUpIds: t, drawDefinition: i, structure: s, matchUp: a }) : jx({ matchUp: a });
3137
+ return s?.finishingPosition === no ? Vx({ inContextDrawMatchUps: e, useTargetMatchUpIds: t, drawDefinition: i, structure: s, matchUp: a }) : jx({ matchUp: a });
3138
3138
  }
3139
3139
  function Vx({ inContextDrawMatchUps: e, useTargetMatchUpIds: t, drawDefinition: r, structure: i, matchUp: n }) {
3140
3140
  let { winnerMatchUpId: a, loserMatchUpId: s } = n, { links: o } = _x({ roundNumber: n.roundNumber, structureId: i.structureId, drawDefinition: r }), c = o?.source, u = Of({ source: c, linkType: Mn }), l = Of({ linkCondition: sn, linkType: Rn, source: c }), d = Of({ source: c, linkType: Rn }), p = l && d;
@@ -3260,17 +3260,17 @@ function Hi({ scheduleVisibilityFilters: e, afterRecoveryTimes: t, participantsP
3260
3260
  }).flat();
3261
3261
  return { ...x, matchUps: l };
3262
3262
  }
3263
- function fo(e, t) {
3263
+ function ho(e, t) {
3264
3264
  return Wx(e, t) || (e?.stageSequence || 0) - (t?.stageSequence || 0) || e?.roundNumber && t.roundNumber && e?.roundNumber - t?.roundNumber || (e?.roundPosition ?? 0) - (t?.roundPosition ?? 0);
3265
3265
  }
3266
3266
  function Wx(e, t) {
3267
- return (Bs[e?.stage] || 0) - (Bs[t?.stage] || 0);
3267
+ return (Vs[e?.stage] || 0) - (Vs[t?.stage] || 0);
3268
3268
  }
3269
3269
  function Ur(e) {
3270
3270
  let { participants: t, participantMap: r, contextContent: i } = e, { scheduleVisibilityFilters: n, tournamentAppliedPolicies: a, participantsProfile: s, afterRecoveryTimes: o, policyDefinitions: c, useParticipantMap: u, tournamentRecord: l, matchUpFilters: d, contextFilters: p, contextProfile: m, drawDefinition: f, nextMatchUps: h, inContext: g, context: I, event: y } = e, { eventId: U, eventName: D, endDate: v, eventType: w, category: S, gender: T, matchUpFormat: b } = y ?? {}, P = { ...I, surfaceCategory: y?.surfaceCategory ?? l?.surfaceCategory, indoorOutDoor: y?.indoorOutdoor ?? l?.indoorOutdoor, matchUpFormat: b, eventType: w, eventName: D, category: S, eventId: U, endDate: v, gender: T }, M;
3271
3271
  return !t?.length && !r && l && ({ participants: t = [], participantMap: r, groupInfo: M } = ds({ participantsProfile: s, useParticipantMap: u, tournamentRecord: l, contextProfile: m, inContext: g })), m && !i && (i = na({ policyDefinitions: c, tournamentRecord: l, contextProfile: m, drawDefinition: f, event: y })), { ...Rt({ context: P, tournamentAppliedPolicies: a, scheduleVisibilityFilters: n, tournamentParticipants: t, participantsProfile: s, afterRecoveryTimes: o, policyDefinitions: c, tournamentRecord: l, drawDefinition: f, contextContent: i, contextFilters: p, contextProfile: m, matchUpFilters: d, participantMap: r, nextMatchUps: h, inContext: g, event: y }), groupInfo: M };
3272
3272
  }
3273
- function Rs({ element: e, accessor: t }) {
3273
+ function Ns({ element: e, accessor: t }) {
3274
3274
  if (typeof t != "string") return { values: [] };
3275
3275
  let r = ie(e), i = t.split("."), n = [], a;
3276
3276
  o({ targetElement: r, attributes: i });
@@ -3289,7 +3289,7 @@ function Rs({ element: e, accessor: t }) {
3289
3289
  }
3290
3290
  }
3291
3291
  }
3292
- var Rb = (e) => (t) => !e || typeof t != "object" ? void 0 : Array.isArray(e) && e.map((r) => ({ [r]: Rs({ element: t, accessor: r })?.value })) || typeof e == "object" && Object.keys(e).map((r) => ({ [r]: Rs({ element: t, accessor: r })?.value })) || (typeof e == "string" && Rs({ element: t, accessor: e }))?.value, Kr = Rb;
3292
+ var Rb = (e) => (t) => !e || typeof t != "object" ? void 0 : Array.isArray(e) && e.map((r) => ({ [r]: Ns({ element: t, accessor: r })?.value })) || typeof e == "object" && Object.keys(e).map((r) => ({ [r]: Ns({ element: t, accessor: r })?.value })) || (typeof e == "string" && Ns({ element: t, accessor: e }))?.value, Kr = Rb;
3293
3293
  function bl({ finishingPositionOffset: e = 0, finishingPositionLimit: t, positionsFed: r, roundsCount: i, roundLimit: n, matchUps: a, lucky: s, fmlc: o }) {
3294
3294
  if (!yi(a)) return [];
3295
3295
  let { roundProfile: c, roundNumbers: u = [] } = vr({ interpolate: !0, matchUps: a });
@@ -3328,7 +3328,7 @@ function Li(e) {
3328
3328
  if (!Array.isArray(r)) return { error: ea };
3329
3329
  if (!Array.isArray(i)) return { error: zi };
3330
3330
  let o = e.matchUpIds?.length ? e.matchUpIds : r.map((y) => y.matchUpId);
3331
- if (!Array.isArray(o)) return { error: Ys };
3331
+ if (!Array.isArray(o)) return { error: Ks };
3332
3332
  let c = {}, u = {}, l = {}, d = {};
3333
3333
  a && !Object.keys(t).length && (t = { [a.tournamentId]: a });
3334
3334
  let p = Object.values(t), m = p.reduce((y, U) => y.concat(U.events ?? []).map((D) => (D.drawDefinitions || []).map((v) => v.links || [])).flat(1 / 0), []).filter(({ linkType: y }) => y === bn), f = r;
@@ -3375,7 +3375,7 @@ function Li(e) {
3375
3375
  y && (i = y);
3376
3376
  }
3377
3377
  for (let y of i) {
3378
- let U = f?.filter((D) => D.drawId === y).sort(fo);
3378
+ let U = f?.filter((D) => D.drawId === y).sort(ho);
3379
3379
  if (!U?.find(({ roundPosition: D }) => !D)) {
3380
3380
  let D = U?.find(({ tournamentId: w }) => w), { drawDefinition: v } = Nr({ tournamentRecord: t[D?.tournamentId], drawId: y });
3381
3381
  v && Ja({ drawDefinition: v });
@@ -3422,7 +3422,7 @@ function Rl(e) {
3422
3422
  let g = ye(m.filter(Boolean)).sort(At), I = ye(p), y = ye(l?.map(({ matchUpId: S, drawPositions: T }) => I.includes(S) ? T : []).flat().filter(Boolean)).sort(At), { positionAssignments: U } = Ye({ drawDefinition: t, structure: a }), D = U?.filter((S) => S.bye).map((S) => S.drawPosition), v = U?.filter((S) => S.qualifier).map((S) => S.drawPosition), w = g?.filter((S) => !y.includes(S)) || [];
3423
3423
  return { allDrawPositions: g, inContextStructureMatchUps: l, drawPositionInitialRounds: f, activeDependentMatchUpIds: I, qualifyingDrawPositions: v, inactiveDrawPositions: w, positionAssignments: U, activeDrawPositions: y, byeDrawPositions: D, activeMatchUps: h, structure: a };
3424
3424
  }
3425
- function $s({ drawPosition: e, matchUps: t = [] }) {
3425
+ function Ws({ drawPosition: e, matchUps: t = [] }) {
3426
3426
  return { initialRoundNumber: t.filter(({ drawPositions: r }) => e && r?.includes(e)).map(({ roundNumber: r }) => r).sort(At)[0] };
3427
3427
  }
3428
3428
  var ca = { reset: "\x1B[0m", bright: "\x1B[1m", dim: "\x1B[2m", red: "\x1B[31m", brightred: "\x1B[91m", green: "\x1B[32m", brightgreen: "\x1B[92m", yellow: "\x1B[33m", brightyellow: "\x1B[93m", blue: "\x1B[34m", brightblue: "\x1B[94m", lightblue: "\x1B[105m", magenta: "\x1B[35m", brightmagenta: "\x1B[95m", cyan: "\x1B[36m", brightcyan: "\x1B[96m", white: "\x1B[37m", brightwhite: "\x1B[97m" }, YI = [];
@@ -3528,7 +3528,7 @@ function Qx({ drawPositionToAdvance: e, inContextDrawMatchUps: t, sourceDrawPosi
3528
3528
  function Eb({ loserTargetDrawPosition: e, tournamentRecord: t, loserTargetLink: r, drawDefinition: i, loserMatchUp: n, matchUpsMap: a, event: s }) {
3529
3529
  let { roundNumber: o } = n;
3530
3530
  $r({ method: "assignFedDrawPositionBye", color: "cyan", loserTargetDrawPosition: e });
3531
- let c = (a?.mappedMatchUps || {})[n.structureId].matchUps, { initialRoundNumber: u } = $s({ drawPosition: e, matchUps: c });
3531
+ let c = (a?.mappedMatchUps || {})[n.structureId].matchUps, { initialRoundNumber: u } = Ws({ drawPosition: e, matchUps: c });
3532
3532
  if (u === o) {
3533
3533
  let l = ai({ structureId: r.target.structureId, drawPosition: e, tournamentRecord: t, drawDefinition: i, event: s });
3534
3534
  if (l.error) return l;
@@ -3572,13 +3572,13 @@ function Jx({ inContextDrawMatchUps: e, targetDrawPosition: t, tournamentRecord:
3572
3572
  if (!o) return { error: lt };
3573
3573
  if (o.structureType === Tr) return;
3574
3574
  n = n || er({ drawDefinition: i });
3575
- let c = (n?.mappedMatchUps || {})[s].matchUps, { initialRoundNumber: u } = $s({ drawPosition: t, matchUps: c }), l = c?.filter((p) => p.roundNumber >= a && p.roundNumber !== u && p.drawPositions?.includes(t)), d = Ye({ drawDefinition: i, structureId: s }).positionAssignments ?? [];
3575
+ let c = (n?.mappedMatchUps || {})[s].matchUps, { initialRoundNumber: u } = Ws({ drawPosition: t, matchUps: c }), l = c?.filter((p) => p.roundNumber >= a && p.roundNumber !== u && p.drawPositions?.includes(t)), d = Ye({ drawDefinition: i, structureId: s }).positionAssignments ?? [];
3576
3576
  return l?.forEach((p) => Cb({ drawPosition: t, targetMatchUp: p, inContextDrawMatchUps: e, positionAssignments: d, tournamentRecord: r, drawDefinition: i, matchUpsMap: n, structure: o })), { ...x };
3577
3577
  }
3578
3578
  function Cb({ inContextDrawMatchUps: e, positionAssignments: t, tournamentRecord: r, drawDefinition: i, targetMatchUp: n, drawPosition: a, matchUpsMap: s, structure: o, event: c }) {
3579
3579
  let u = "removeDrawPosition", l = n.drawPositions?.slice(), d = n.matchUpStatus, p = n.winningSide;
3580
3580
  s = s ?? er({ drawDefinition: i });
3581
- let m = s.mappedMatchUps[o.structureId].matchUps, { initialRoundNumber: f } = $s({ drawPosition: a, matchUps: m });
3581
+ let m = s.mappedMatchUps[o.structureId].matchUps, { initialRoundNumber: f } = Ws({ drawPosition: a, matchUps: m });
3582
3582
  if (n.roundNumber && f && n.roundNumber > f) {
3583
3583
  let S = (n.drawPositions ?? []).map((T) => T === a ? void 0 : T);
3584
3584
  n.drawPositions = S;
@@ -3598,7 +3598,7 @@ function Cb({ inContextDrawMatchUps: e, positionAssignments: t, tournamentRecord
3598
3598
  } else {
3599
3599
  let b = Math.min(...S.filter(Boolean)), P = Zx({ loserMatchUpDrawPosition: b, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: i, loserMatchUp: I, matchUpsMap: s, event: c });
3600
3600
  if (P.error) return F({ result: P, stack: u });
3601
- let M = (s?.mappedMatchUps || {})[I.structureId].matchUps, { initialRoundNumber: R } = $s({ drawPosition: b, matchUps: M });
3601
+ let M = (s?.mappedMatchUps || {})[I.structureId].matchUps, { initialRoundNumber: R } = Ws({ drawPosition: b, matchUps: M });
3602
3602
  R === 1 && ($r({ method: u, color: "brightyellow", loserMatchUpDrawPosition: b }), xh({ structureId: I.structureId, drawPosition: b, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: i, matchUpsMap: s }));
3603
3603
  }
3604
3604
  }
@@ -3697,14 +3697,14 @@ function Qd({ autoEntryPositions: e = !0, ignoreAssignment: t, tournamentRecord:
3697
3697
  return { ...x };
3698
3698
  }
3699
3699
  function vn({ requireTimeStamp: e, scaleAttributes: t, participant: r }) {
3700
- if (!r) return { error: Qs };
3700
+ if (!r) return { error: Js };
3701
3701
  if (!Ce(t)) return { error: z };
3702
3702
  if (r.timeItems || (r.timeItems = []), Array.isArray(r.timeItems)) {
3703
3703
  let { accessor: i, scaleType: n, eventType: a, scaleName: s } = t, o = [Ka, n, a, s].join("."), c = r.timeItems.filter((u) => u?.itemType === o).filter((u) => !e || u?.itemDate).sort((u, l) => (u.createdAt ? new Date(u.createdAt).getTime() : 0) - (l.createdAt ? new Date(l.createdAt).getTime() : 0)).pop();
3704
3704
  if (c) {
3705
3705
  let [u, l, d, p] = c.itemType?.split(".") ?? [];
3706
- if (u !== Ka) return { error: Fs };
3707
- let m = (i && Rs({ element: c.itemValue, accessor: i }))?.value || c.itemValue, f = { eventType: d, scaleDate: c.itemDate, scaleValue: m, scaleName: p, scaleType: l };
3706
+ if (u !== Ka) return { error: Ls };
3707
+ let m = (i && Ns({ element: c.itemValue, accessor: i }))?.value || c.itemValue, f = { eventType: d, scaleDate: c.itemDate, scaleValue: m, scaleName: p, scaleType: l };
3708
3708
  return { ...x, scaleItem: f };
3709
3709
  }
3710
3710
  }
@@ -3766,7 +3766,7 @@ function Ui({ event: e, status: t = ni }) {
3766
3766
  function XI({ drawDetails: e, drawId: t }) {
3767
3767
  return e?.[t]?.publishingDetail?.published;
3768
3768
  }
3769
- function ho(e) {
3769
+ function go(e) {
3770
3770
  let { tournamentRecord: t, drawDefinition: r, eventIds: i, eventId: n, drawIds: a, drawId: s, event: o } = e ?? {};
3771
3771
  if (t && !rF(t)) return { error: z };
3772
3772
  if (n && !o) return { error: li };
@@ -3904,7 +3904,7 @@ function nF(e) {
3904
3904
  }, S = { withMatchUps: I || d, withEvents: U || d, withDraws: D || d, withPotentialMatchUps: l, withRankingProfile: d, withScheduleItems: p, scheduleAnalysis: m, withTeamMatchUps: f, withStatistics: h, participantMap: c, withOpponents: g, withSeeding: y }, T = [], b = {}, P = [], M = {}, R = {}, E = {}, A = ({ eventType: N, scaleNames: C, participantId: k }) => c[k]?.participant?.rankings?.[N]?.find((O) => C.includes(O.scaleName))?.scaleValue;
3905
3905
  for (let N of n?.events || []) {
3906
3906
  if (t?.eventIds && !t.eventIds.includes(N.eventId)) continue;
3907
- let { drawDefinitions: C = [], extensions: k = [], eventType: O, eventName: L, category: _, entries: B, eventId: G, gender: $ } = N, { flightProfile: j } = wt({ event: N }), V = j?.flights ?? [], H = ho({ event: N }).publishState;
3907
+ let { drawDefinitions: C = [], extensions: k = [], eventType: O, eventName: L, category: _, entries: B, eventId: G, gender: $ } = N, { flightProfile: j } = wt({ event: N }), V = j?.flights ?? [], H = go({ event: N }).publishState;
3908
3908
  H && (M[G] = H);
3909
3909
  let W = H?.status?.publishedSeeding;
3910
3910
  if (U || y || d) {
@@ -3931,7 +3931,7 @@ function nF(e) {
3931
3931
  if (D || d || y) {
3932
3932
  let q = (X) => X ? Object.assign({}, ...X.map(({ participantId: Q, seedValue: Z, seedNumber: ee }) => ({ [Q]: { seedValue: Z, seedNumber: ee } }))) : void 0, K = ye([...C.map(Nu), ...V.map(Nu)]);
3933
3933
  for (let X of K) {
3934
- let Q = C.find((Se) => Se.drawId === X), Z = [_?.categoryName, _?.ageCategoryCode].filter(Boolean), { structures: ee = [], drawOrder: ue, drawName: he, drawType: qe } = Q ?? {}, Fe = V?.find((Se) => Se.drawId === X), Ke = Q?.entries || Fe?.drawEntries, bt = Fe?.flightNumber, Jt = (Q?.structures || []).sort((Se, He) => ao(Se, He)).map(({ structureId: Se, structures: He }) => [Se, ...(He || []).map(({ structureId: Ne }) => Ne)]).flat(1 / 0), Pt, de, ot, le, $e = 0, Re = ee.filter(({ stage: Se, stageSequence: He }) => Se === re && He === 1 || Se === oe).flatMap((Se) => {
3934
+ let Q = C.find((Se) => Se.drawId === X), Z = [_?.categoryName, _?.ageCategoryCode].filter(Boolean), { structures: ee = [], drawOrder: ue, drawName: he, drawType: qe } = Q ?? {}, Fe = V?.find((Se) => Se.drawId === X), Ke = Q?.entries || Fe?.drawEntries, bt = Fe?.flightNumber, Jt = (Q?.structures || []).sort((Se, He) => so(Se, He)).map(({ structureId: Se, structures: He }) => [Se, ...(He || []).map(({ structureId: Ne }) => Ne)]).flat(1 / 0), Pt, de, ot, le, $e = 0, Re = ee.filter(({ stage: Se, stageSequence: He }) => Se === re && He === 1 || Se === oe).flatMap((Se) => {
3935
3935
  let { positionAssignments: He } = Ye({ structure: Se }), { seedAssignments: Ne, stageSequence: Oe, stage: Ae } = Se;
3936
3936
  return Ae === re ? ($e = He?.length ?? 0, ot = He, le = Ne) : Oe === 1 && (Pt = He, de = Ne), He;
3937
3937
  }).map(({ participantId: Se }) => Se).filter(Boolean), et = q(le), Me = q(de), Ze = Q ? Ke.filter(({ participantId: Se }) => Re.includes(Se)) : Ke, ge = !a || Y?.published && (Y?.drawIds?.length === 0 || Y?.drawIds?.includes(X));
@@ -4020,7 +4020,7 @@ function nF(e) {
4020
4020
  function Al({ participantFilters: e = {}, tournamentRecord: t, participants: r = [] }) {
4021
4021
  if (!Object.keys(e).length) return r;
4022
4022
  let { accessorValues: i, drawEntryStatuses: n, positionedParticipants: a, eventEntryStatuses: s, participantRoles: o, participantRoleResponsibilities: c, participantTypes: u, participantIds: l, signInStatus: d, enableOrFiltering: p, eventIds: m, genders: f } = e, h = gn(m) && t?.events?.filter((D) => m?.includes(D.eventId)) || t?.events || [], g = n && aF({ drawEntryStatuses: n, tournamentEvents: h }), I = s && sF({ eventEntryStatuses: s, tournamentEvents: h }), y = a !== void 0 && [!0, !1].includes(a) && h.reduce((D, v) => D.concat(...(v.drawDefinitions || []).map((w) => GP({ drawDefinition: w }).allPositionedParticipantIds).filter(Boolean)), []), U = (D) => i?.reduce((v, w) => {
4023
- let { accessor: S, value: T } = w, { values: b } = Rs({ element: D, accessor: S });
4023
+ let { accessor: S, value: T } = w, { values: b } = Ns({ element: D, accessor: S });
4024
4024
  return v && b?.includes(T);
4025
4025
  }, !0);
4026
4026
  if (r = r?.filter((D) => {
@@ -4071,14 +4071,14 @@ function pt(e) {
4071
4071
  let H = Ce(t) ? t : void 0;
4072
4072
  for (let W of j) for (let Y of W.individualParticipantIds ?? []) {
4073
4073
  W.individualParticipants || (W.individualParticipants = []);
4074
- let q = B.get(Y), K = H ? Vs({ template: H, source: q }) : q;
4074
+ let q = B.get(Y), K = H ? js({ template: H, source: q }) : q;
4075
4075
  W.individualParticipants.push(K);
4076
4076
  }
4077
4077
  }
4078
- let V = $ ? j.map((H) => Vs({ source: H, template: $ })) : j;
4078
+ let V = $ ? j.map((H) => js({ source: H, template: $ })) : j;
4079
4079
  return { participantMap: e.returnParticipantMap !== !1 ? M : void 0, mappedMatchUps: e.returnMatchUps !== !1 ? k : void 0, matchUps: e.returnMatchUps !== !1 ? O : void 0, missingParticipantIds: P.missingParticipantIds, participantIdsWithConflicts: E, eventsPublishStatuses: A, derivedEventInfo: N, derivedDrawInfo: C, participants: V, ...x };
4080
4080
  }
4081
- function Ns({ participantId: e, drawDefinition: t, entryStatus: r, entryStage: i }) {
4081
+ function Es({ participantId: e, drawDefinition: t, entryStatus: r, entryStage: i }) {
4082
4082
  if (!t) return { error: ne };
4083
4083
  let n = t.entries?.find((a) => a.participantId === e && (!r || r === a.entryStatus) && (!i || i === a.entryStage));
4084
4084
  return e && n;
@@ -4133,7 +4133,7 @@ function QI(e) {
4133
4133
  if (p && !on({ extension: p })) return F({ result: { error: z }, info: "Invalid extension", context: { extension: p }, stack: h });
4134
4134
  let I = e.participantId || u?.participantId;
4135
4135
  if (!I) return F({ result: { error: kt }, stack: h });
4136
- let y = i === Qn && Ns({ participantId: I, drawDefinition: o, entryStatus: i }), U = a === zt && Ns({ participantId: I, drawDefinition: o, entryStage: a }), D = Ns({ participantId: I, drawDefinition: o }), v = i !== Qn && a !== zt && D;
4136
+ let y = i === Qn && Es({ participantId: I, drawDefinition: o, entryStatus: i }), U = a === zt && Es({ participantId: I, drawDefinition: o, entryStage: a }), D = Es({ participantId: I, drawDefinition: o }), v = i !== Qn && a !== zt && D;
4137
4137
  if (v) return r ? (Ue({ payload: { drawId: o.drawId, eventId: f?.eventId, error: fu, participantId: I }, topic: vI }), { ...x }) : F({ result: { error: fu }, context: { participantId: I }, stack: h });
4138
4138
  if (y || U) return F({ context: { invalidEntry: v, invalidLuckyLoser: y, invalidVoluntaryConsolation: U }, result: { error: Cp }, stack: h });
4139
4139
  let w = ae({ entryStageSequence: n, participantId: I, entryPosition: c, entryStatus: i, entryStage: a, extensions: d });
@@ -4151,7 +4151,7 @@ function cF(e) {
4151
4151
  let h = f.positionsAvailable ?? 0;
4152
4152
  if (!a && !m && u !== zt && h < s.length) return { error: Mg };
4153
4153
  let g = [], I = o.drawId, y = p?.eventId, U = s.reduce((D, v) => {
4154
- let w = i === Qn && Ns({ participantId: v, drawDefinition: o, entryStatus: i }), S = u === zt && Ns({ entryStage: u, drawDefinition: o, participantId: v }), T = Ns({ participantId: v, drawDefinition: o });
4154
+ let w = i === Qn && Es({ participantId: v, drawDefinition: o, entryStatus: i }), S = u === zt && Es({ entryStage: u, drawDefinition: o, participantId: v }), T = Es({ participantId: v, drawDefinition: o });
4155
4155
  return i !== Qn && u !== zt && T && (g.push(v), r && Ue({ payload: { error: fu, participantId: v, eventId: y, drawId: I }, topic: vI })), w || S ? D.concat(v) : D;
4156
4156
  }, []);
4157
4157
  return g.length && !r ? F({ context: { eventId: y, drawId: I, duplicateEntries: g }, result: { error: fu }, stack: t }) : (s.filter((D) => D && !U.includes(D)).forEach((D) => {
@@ -4288,7 +4288,7 @@ function vm({ participantRole: e = nr, individualParticipantIds: t = [], groupin
4288
4288
  u && o++;
4289
4289
  }), o ? x : { error: OD };
4290
4290
  }
4291
- function go(e) {
4291
+ function Io(e) {
4292
4292
  let t = se(e, [{ [_t]: !0 }, { participantIds: !0, [Er]: cr, [Mi]: Pa }]);
4293
4293
  if (t.error) return t;
4294
4294
  let { addIndividualParticipantsToEvents: r, tournamentRecord: i, participantIds: n } = e, a = i.participants?.length || 0;
@@ -4339,7 +4339,7 @@ function Wb({ removeGroupParticipant: e, tournamentRecord: t, drawDefinition: r,
4339
4339
  let { stageEntries: d } = $b({ selected: !1, drawDefinition: r, drawId: n, event: s, stage: a }), p = d.map(Pe), m = c.filter(({ participantId: I }) => p.includes(I)).map(({ individualParticipantIds: I }) => I).flat().filter(Boolean), f = u.individualParticipantIds?.filter((I) => Ji(I, m).length === 1), h = Cl({ participantIds: [i], event: s });
4340
4340
  if (h.error || f?.length && (h = en({ participantIds: f, entryStatus: Ii, entryStage: l.entryStage, tournamentRecord: t, drawDefinition: r, drawId: n, event: s }), h.error)) return h;
4341
4341
  let g;
4342
- return e && go({ participantIds: [i], tournamentRecord: t }).success && (g = !0), { ...x, participantRemoved: g };
4342
+ return e && Io({ participantIds: [i], tournamentRecord: t }).success && (g = !0), { ...x, participantRemoved: g };
4343
4343
  }
4344
4344
  function ry({ removeGroupParticipant: e, tournamentRecord: t, drawDefinition: r, participantId: i, drawId: n, event: a }) {
4345
4345
  return Wb({ removeGroupParticipant: e, tournamentRecord: t, drawDefinition: r, participantId: i, drawId: n, event: a });
@@ -4375,7 +4375,7 @@ function Ou(e) {
4375
4375
  function Hb(e) {
4376
4376
  return Object.assign(e, { entryStatus: Cn }), Ou(e);
4377
4377
  }
4378
- var fa = ({ finishingPosition: e = io, hasExistingDrawDefinition: t, qualifyingRoundNumber: r, structureAbbreviation: i, seedAssignments: n = [], stageSequence: a = 1, qualifyingOnly: s, structureOrder: o, seedingProfile: c, matchUpFormat: u, structureType: l, structureName: d, matchUps: p = [], matchUpType: m, structureId: f, roundOffset: h, roundLimit: g, stageOrder: I, structures: y, tieFormat: U, stage: D }) => {
4378
+ var fa = ({ finishingPosition: e = no, hasExistingDrawDefinition: t, qualifyingRoundNumber: r, structureAbbreviation: i, seedAssignments: n = [], stageSequence: a = 1, qualifyingOnly: s, structureOrder: o, seedingProfile: c, matchUpFormat: u, structureType: l, structureName: d, matchUps: p = [], matchUpType: m, structureId: f, roundOffset: h, roundLimit: g, stageOrder: I, structures: y, tieFormat: U, stage: D }) => {
4379
4379
  let v = { structureId: f ?? Be(), structureAbbreviation: i, finishingPosition: e, seedAssignments: n, matchUpFormat: u, stageSequence: a, structureName: d };
4380
4380
  (s || t && U) && (v.tieFormat = U), o && (v.structureOrder = o), l && (v.structureType = l), c && (typeof c == "string" ? v.seedingProfile = c : typeof c == "object" && typeof c.positioning == "string" && (v.seedingProfile = c.positioning)), m && (v.matchUpType = m), h && (v.roundOffset = h), I && (v.stageOrder = I), g && (v.roundLimit = g), D && (v.stage = D), r && (v.qualifyingRoundNumber = r);
4381
4381
  let w = p.flatMap(({ drawPositions: S }) => S).filter(Boolean);
@@ -4558,7 +4558,7 @@ function yF({ positioning: e, size: t }) {
4558
4558
  }
4559
4559
  return { divisions: r, divisionGroupings: i };
4560
4560
  }
4561
- function Io({ provisionalPositioning: e, returnAllProxies: t, appliedPolicies: r, seedingProfile: i, drawDefinition: n, allPositions: a, structure: s }) {
4561
+ function yo({ provisionalPositioning: e, returnAllProxies: t, appliedPolicies: r, seedingProfile: i, drawDefinition: n, allPositions: a, structure: s }) {
4562
4562
  let o = [];
4563
4563
  if (!s) return { error: ss };
4564
4564
  let { matchUps: c, roundMatchUps: u } = _e({ matchUpFilters: { roundNumbers: [1] }, provisionalPositioning: e, structure: s }), { seedAssignments: l } = mi({ provisionalPositioning: e, returnAllProxies: t, drawDefinition: n, structure: s }), { positionAssignments: d } = Ft({ structure: s }), p = d?.length, m = l?.length ?? 0, f = [], h = Object.keys(u).map((C) => parseInt(C)).sort((C, k) => C - k).map((C) => {
@@ -4617,10 +4617,10 @@ function Zd({ appliedPolicies: e, drawDefinition: t, seedBlockInfo: r, drawPosit
4617
4617
  let { structure: s } = me({ drawDefinition: t, structureId: n });
4618
4618
  e || (e = xe({ drawDefinition: t }).appliedPolicies);
4619
4619
  let o = r?.validSeedBlocks;
4620
- return !o && s && (o = Io({ appliedPolicies: e, drawDefinition: t, structure: s })?.validSeedBlocks), e?.seeding?.validSeedPositions?.ignore ? !0 : e?.seeding?.validSeedPositions?.strict ? (o.find((c) => c.seedNumbers.includes(a))?.drawPositions || []).includes(i) : [].concat(...o.map((c) => c.drawPositions)).includes(i);
4620
+ return !o && s && (o = yo({ appliedPolicies: e, drawDefinition: t, structure: s })?.validSeedBlocks), e?.seeding?.validSeedPositions?.ignore ? !0 : e?.seeding?.validSeedPositions?.strict ? (o.find((c) => c.seedNumbers.includes(a))?.drawPositions || []).includes(i) : [].concat(...o.map((c) => c.drawPositions)).includes(i);
4621
4621
  }
4622
4622
  function Kb(e) {
4623
- let { provisionalPositioning: t, drawDefinition: r, seedingProfile: i, seedBlockInfo: n, structureId: a, randomize: s } = e, { structure: o } = me({ drawDefinition: r, structureId: a }), { seedAssignments: c } = mi({ returnAllProxies: e.returnAllProxies, provisionalPositioning: t, drawDefinition: r, structure: o }), { positionAssignments: u } = Ft({ structure: o }), l = u?.filter((R) => R.participantId ?? R.bye ?? R.qualifier)?.map((R) => R.drawPosition).filter(Boolean), { appliedPolicies: d } = xe({ drawDefinition: r }), p = (n?.validSeedBlocks || o && Io({ returnAllProxies: e.returnAllProxies, provisionalPositioning: t, appliedPolicies: d, drawDefinition: r, seedingProfile: i, structure: o })?.validSeedBlocks || []).filter((R) => R.drawPositions.filter((E) => !l?.includes(E)).length)[0], m = c?.map((R) => R.participantId).filter(Boolean), f = u?.map((R) => R.participantId).filter(Boolean), h = m?.filter((R) => f?.includes(R)), g = m?.filter((R) => !f?.includes(R)), I = c?.filter((R) => g?.includes(R.participantId)), y = c?.filter((R) => !R.participantId), U = (I?.length && I.length > 0 ? I.length : y?.length ?? 0) && p?.drawPositions.filter((R) => !l?.includes(R)) || [], D = s ? Ir(U) : U, v = [], w = D.map(() => {
4623
+ let { provisionalPositioning: t, drawDefinition: r, seedingProfile: i, seedBlockInfo: n, structureId: a, randomize: s } = e, { structure: o } = me({ drawDefinition: r, structureId: a }), { seedAssignments: c } = mi({ returnAllProxies: e.returnAllProxies, provisionalPositioning: t, drawDefinition: r, structure: o }), { positionAssignments: u } = Ft({ structure: o }), l = u?.filter((R) => R.participantId ?? R.bye ?? R.qualifier)?.map((R) => R.drawPosition).filter(Boolean), { appliedPolicies: d } = xe({ drawDefinition: r }), p = (n?.validSeedBlocks || o && yo({ returnAllProxies: e.returnAllProxies, provisionalPositioning: t, appliedPolicies: d, drawDefinition: r, seedingProfile: i, structure: o })?.validSeedBlocks || []).filter((R) => R.drawPositions.filter((E) => !l?.includes(E)).length)[0], m = c?.map((R) => R.participantId).filter(Boolean), f = u?.map((R) => R.participantId).filter(Boolean), h = m?.filter((R) => f?.includes(R)), g = m?.filter((R) => !f?.includes(R)), I = c?.filter((R) => g?.includes(R.participantId)), y = c?.filter((R) => !R.participantId), U = (I?.length && I.length > 0 ? I.length : y?.length ?? 0) && p?.drawPositions.filter((R) => !l?.includes(R)) || [], D = s ? Ir(U) : U, v = [], w = D.map(() => {
4624
4624
  let R = M(I, v)?.participantId;
4625
4625
  return R && v.push(R), R;
4626
4626
  }).filter(Boolean), S = c?.filter((R) => h?.includes(R.participantId)).map((R) => R.seedNumber), T = (p?.seedNumbers || []).filter((R) => !S?.includes(R)), b = c?.filter((R) => T.includes(R.seedNumber)).map((R) => R.participantId), P = d?.seeding?.duplicateSeedNumbers;
@@ -4635,7 +4635,7 @@ function xl(e) {
4635
4635
  if (typeof e == "object") return e.positioning;
4636
4636
  }
4637
4637
  function Cc({ provisionalPositioning: e, tournamentRecord: t, drawDefinition: r, seedingProfile: i, participantId: n, seedBlockInfo: a, structureId: s, seedNumber: o, seedValue: c, eventId: u, event: l }) {
4638
- let d = "assignSeed", { structure: p } = me({ drawDefinition: r, structureId: s }), { positionAssignments: m } = Ft({ structure: p }), f = mi({ provisionalPositioning: e, drawDefinition: r, structure: p }).seedAssignments, h = f.map((v) => v.seedNumber), g = Ns({ drawDefinition: r, participantId: n });
4638
+ let d = "assignSeed", { structure: p } = me({ drawDefinition: r, structureId: s }), { positionAssignments: m } = Ft({ structure: p }), f = mi({ provisionalPositioning: e, drawDefinition: r, structure: p }).seedAssignments, h = f.map((v) => v.seedNumber), g = Es({ drawDefinition: r, participantId: n });
4639
4639
  if (n && !g) return F({ result: { error: Wi }, context: { participantId: n }, stack: d });
4640
4640
  let I = l ? wt({ event: l }).flightProfile?.flights?.length : 0, y = I && I > 1, U = m?.find((v) => v.participantId === n)?.drawPosition;
4641
4641
  if (U && !Zd({ drawPosition: U, drawDefinition: r, seedBlockInfo: a, structureId: s, seedNumber: o })) return F({ result: { error: mg }, context: { assignedDrawPosition: U }, info: "invalid seed position", stack: d });
@@ -4685,7 +4685,7 @@ function Pd({ inContextDrawMatchUps: e, drawPosition: t, matchUpId: r }) {
4685
4685
  let i = e.filter(({ winnerMatchUpId: n, loserMatchUpId: a }) => a === r || n === r).sort((n, a) => n.roundPosition - a.roundPosition);
4686
4686
  return e.find((n) => n.matchUpId === r).feedRound ? 1 : i.reduce((n, a, s) => a.drawPositions?.includes(t) ? s + 1 : n, void 0);
4687
4687
  }
4688
- function Es({ inContextDrawMatchUps: e, sourceMatchUpStatus: t, tournamentRecord: r, sourceMatchUpId: i, drawDefinition: n, matchUpStatus: a, drawPosition: s, matchUpsMap: o, matchUpId: c, event: u }) {
4688
+ function As({ inContextDrawMatchUps: e, sourceMatchUpStatus: t, tournamentRecord: r, sourceMatchUpId: i, drawDefinition: n, matchUpStatus: a, drawPosition: s, matchUpsMap: o, matchUpId: c, event: u }) {
4689
4689
  let l = "assignMatchUpDrawPosition";
4690
4690
  o || (o = er({ drawDefinition: n })), e || (e = Rt({ inContext: !0, drawDefinition: n, matchUpsMap: o }).matchUps ?? []);
4691
4691
  let d = e.find((E) => E.matchUpId === c), p = d?.structureId, m = n?.structures?.find((E) => E.structureId === p);
@@ -4701,7 +4701,7 @@ function Es({ inContextDrawMatchUps: e, sourceMatchUpStatus: t, tournamentRecord
4701
4701
  let S = wr({ inContextDrawMatchUps: e, inContextMatchUp: d, drawDefinition: n, matchUpId: c }), { targetMatchUps: { winnerMatchUp: T, loserMatchUp: b, loserTargetDrawPosition: P }, targetLinks: { loserTargetLink: M } } = S, R = va({ structureId: m.structureId, matchUpsMap: o });
4702
4702
  if (I && D) {
4703
4703
  if (T) if (["BYE", dt, Ot].includes(a)) {
4704
- let E = Es({ matchUpId: T.matchUpId, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: n, drawPosition: s, matchUpsMap: o });
4704
+ let E = As({ matchUpId: T.matchUpId, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: n, drawPosition: s, matchUpsMap: o });
4705
4705
  if (E.error) return E;
4706
4706
  } else {
4707
4707
  let { structureId: E } = T;
@@ -4709,13 +4709,13 @@ function Es({ inContextDrawMatchUps: e, sourceMatchUpStatus: t, tournamentRecord
4709
4709
  }
4710
4710
  } else if (I && w) {
4711
4711
  if (T) {
4712
- let E = Es({ matchUpId: T.matchUpId, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: n, drawPosition: s, matchUpsMap: o });
4712
+ let E = As({ matchUpId: T.matchUpId, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: n, drawPosition: s, matchUpsMap: o });
4713
4713
  if (E.error) return E;
4714
4714
  }
4715
4715
  } else if (T && d && !d.feedRound) {
4716
4716
  let { pairedPreviousMatchUpIsDoubleExit: E } = Xb({ targetMatchUp: f, drawPosition: s, matchUpsMap: o, structure: m });
4717
4717
  if (E) {
4718
- let A = Es({ matchUpId: T.matchUpId, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: n, drawPosition: s, matchUpsMap: o });
4718
+ let A = As({ matchUpId: T.matchUpId, inContextDrawMatchUps: e, tournamentRecord: r, drawDefinition: n, drawPosition: s, matchUpsMap: o });
4719
4719
  if (A.error) return A;
4720
4720
  }
4721
4721
  }
@@ -4762,7 +4762,7 @@ function Dm({ lineUp: e, tieFormat: t }) {
4762
4762
  }), n = ye(e.map(Pe)).length === e.length;
4763
4763
  return n || r.push("Duplicated participantId(s)"), { valid: i && n, errors: r, error: r.length ? z : void 0 };
4764
4764
  }
4765
- function yo({ drawDefinition: e, participantId: t, tieFormat: r, lineUp: i }) {
4765
+ function Uo({ drawDefinition: e, participantId: t, tieFormat: r, lineUp: i }) {
4766
4766
  if (typeof e != "object") return { error: ne };
4767
4767
  if (typeof t != "string") return { error: kt };
4768
4768
  let n = Dm({ lineUp: i, tieFormat: r });
@@ -4779,7 +4779,7 @@ function ly({ inContextDrawMatchUps: e, inheritance: t = !0, tournamentRecord: r
4779
4779
  if (f?.sides?.[m]) {
4780
4780
  if (delete f.sides[m].lineUp, t === !1) {
4781
4781
  let h = d.tieFormat, g = p.participantId;
4782
- h && g && yo({ drawDefinition: i, participantId: g, lineUp: [], tieFormat: h });
4782
+ h && g && Uo({ drawDefinition: i, participantId: g, lineUp: [], tieFormat: h });
4783
4783
  }
4784
4784
  Ee({ tournamentId: r?.tournamentId, context: "resetLineUps", eventId: o?.eventId, drawDefinition: i, matchUp: f });
4785
4785
  }
@@ -4835,9 +4835,9 @@ function cn({ provisionalPositioning: e, inContextDrawMatchUps: t, isQualifierPo
4835
4835
  }
4836
4836
  }
4837
4837
  function wF({ provisionalPositioning: e, inContextDrawMatchUps: t, sourceMatchUpStatus: r, tournamentRecord: i, drawDefinition: n, drawPosition: a, matchUpsMap: s, structure: o, event: c }) {
4838
- let u = { isCollectionMatchUp: !1 }, { matchUps: l } = _e({ provisionalPositioning: e, matchUpFilters: u, drawDefinition: n, matchUpsMap: s, structure: o, event: c }), { roundMatchUps: d } = vr({ matchUps: l }), { initialRoundNumber: p } = $s({ drawPosition: a, matchUps: l }), m = p && d?.[p].find((f) => f.drawPositions?.includes(a));
4838
+ let u = { isCollectionMatchUp: !1 }, { matchUps: l } = _e({ provisionalPositioning: e, matchUpFilters: u, drawDefinition: n, matchUpsMap: s, structure: o, event: c }), { roundMatchUps: d } = vr({ matchUps: l }), { initialRoundNumber: p } = Ws({ drawPosition: a, matchUps: l }), m = p && d?.[p].find((f) => f.drawPositions?.includes(a));
4839
4839
  if (m) {
4840
- let f = Es({ matchUpId: m.matchUpId, inContextDrawMatchUps: t, sourceMatchUpStatus: r, tournamentRecord: i, drawDefinition: n, drawPosition: a, matchUpsMap: s });
4840
+ let f = As({ matchUpId: m.matchUpId, inContextDrawMatchUps: t, sourceMatchUpStatus: r, tournamentRecord: i, drawDefinition: n, drawPosition: a, matchUpsMap: s });
4841
4841
  if (f.error) return F({ stack: "assignDrawPositionToMatchUps", context: { drawPosition: a }, result: f });
4842
4842
  }
4843
4843
  return { ...x };
@@ -5011,7 +5011,7 @@ function TF({ targetParticipantIds: e, policyAttributes: t, idCollections: r, pa
5011
5011
  }
5012
5012
  function cM({ policyAttributes: e, idCollections: t, participants: r, participant: i }) {
5013
5013
  if (!Array.isArray(e)) return { error: Dg };
5014
- if (!i) return { error: Qs };
5014
+ if (!i) return { error: Js };
5015
5015
  let n = [];
5016
5016
  return e.forEach((a) => {
5017
5017
  let { directive: s, groupings: o, key: c, significantCharacters: u } = a || {};
@@ -5205,7 +5205,7 @@ function FF({ allDrawPositions: e, roundsToSeparate: t, matchUps: r }) {
5205
5205
  function LF({ provisionalPositioning: e, inContextDrawMatchUps: t, unseededByePositions: r, multipleStructures: i, tournamentRecord: n, drawDefinition: a, seedBlockInfo: s, participants: o, matchUpsMap: c, structureId: u, structure: l, drawSize: d, event: p }) {
5206
5206
  let m = "positionUnseededParticipants";
5207
5207
  l || ({ structure: l } = me({ drawDefinition: a, structureId: u })), u || ({ structureId: u } = l);
5208
- let { positionAssignments: f } = Ft({ structure: l }), { seedAssignments: h } = mi({ provisionalPositioning: e, drawDefinition: a, structure: l }), g = h?.map((b) => b.participantId).filter(Boolean), { stage: I, stageSequence: y } = l, U = I === oe ? De({ element: l, name: pn })?.extension?.value : void 0, D = so({ provisionalPositioning: e, drawDefinition: a, stageSequence: y, entryStatuses: fs, structureId: u, roundTarget: U, stage: I }), v = D.filter((b) => !g?.includes(b.participantId)).map((b) => b.participantId), w = f?.filter((b) => !b.participantId && !b.bye && !b.qualifier).map((b) => b.drawPosition);
5208
+ let { positionAssignments: f } = Ft({ structure: l }), { seedAssignments: h } = mi({ provisionalPositioning: e, drawDefinition: a, structure: l }), g = h?.map((b) => b.participantId).filter(Boolean), { stage: I, stageSequence: y } = l, U = I === oe ? De({ element: l, name: pn })?.extension?.value : void 0, D = oo({ provisionalPositioning: e, drawDefinition: a, stageSequence: y, entryStatuses: fs, structureId: u, roundTarget: U, stage: I }), v = D.filter((b) => !g?.includes(b.participantId)).map((b) => b.participantId), w = f?.filter((b) => !b.participantId && !b.bye && !b.qualifier).map((b) => b.drawPosition);
5209
5209
  if (!i && v.length > (w?.length || 0)) return F({ result: { error: Ng }, context: { unseededParticipantsCount: v.length, unfilledDrawPositionsCount: w?.length }, stack: m });
5210
5210
  let { appliedPolicies: S } = xe({ tournamentRecord: n, drawDefinition: a, event: p }), T = S?.[Mu];
5211
5211
  if (l.stage === yt) {
@@ -5252,7 +5252,7 @@ function VF({ drawDefinition: e, structure: t, structureId: r }) {
5252
5252
  function pv({ provisionalPositioning: e, inContextDrawMatchUps: t, tournamentRecord: r, appliedPolicies: i, validSeedBlocks: n, drawDefinition: a, seedingProfile: s, seedBlockInfo: o, participants: c, groupsCount: u, structureId: l, matchUpsMap: d, structure: p, event: m }) {
5253
5253
  let f = [], h = [], g = 0;
5254
5254
  if (p || ({ structure: p } = me({ drawDefinition: a, structureId: l })), l || (l = p?.structureId), i || (i = xe({ drawDefinition: a }).appliedPolicies), !n) {
5255
- let I = p && Io({ provisionalPositioning: e, appliedPolicies: i, drawDefinition: a, seedingProfile: s, structure: p });
5255
+ let I = p && yo({ provisionalPositioning: e, appliedPolicies: i, drawDefinition: a, seedingProfile: s, structure: p });
5256
5256
  I?.error && h.push(I.error), n = I?.validSeedBlocks;
5257
5257
  }
5258
5258
  return u = u ?? n?.length ?? 0, te(0, u).forEach(() => {
@@ -5315,7 +5315,7 @@ function _h(e) {
5315
5315
  return e.length > 2 ? [_h(e.slice(0, t)), _h(e.slice(t))] : e;
5316
5316
  }
5317
5317
  function YF({ provisionalPositioning: e, relevantMatchUps: t, appliedPolicies: r, drawDefinition: i, seedingProfile: n, seedBlockInfo: a, byesToPlace: s, structure: o }) {
5318
- a || (a = Io({ provisionalPositioning: e, appliedPolicies: r, drawDefinition: i, seedingProfile: n, structure: o }));
5318
+ a || (a = yo({ provisionalPositioning: e, appliedPolicies: r, drawDefinition: i, seedingProfile: n, structure: o }));
5319
5319
  let { isFeedIn: c, isLuckyStructure: u, isContainer: l } = a, { validSeedBlocks: d } = a;
5320
5320
  r?.seeding?.containerByesIgnoreSeeding && (d = []);
5321
5321
  let p = GF({ provisionalPositioning: e, drawDefinition: i, structure: o }) ?? [], m = ye([].concat(...t.map((D) => D.drawPositions))), f = p.filter((D) => m.includes(D.drawPosition)), h = (D, v) => nc(D.seedValue) - nc(v.seedValue), g = d.reduce((D, v) => {
@@ -5342,7 +5342,7 @@ function KF({ provisionalPositioning: e, seedOrderByePositions: t, isLuckyStruct
5342
5342
  O.push(B), C = _;
5343
5343
  }
5344
5344
  return O;
5345
- }, { validSeedBlocks: b } = Io({ provisionalPositioning: e, allPositions: !0, appliedPolicies: i, drawDefinition: n, structure: s }), P = b?.map((N) => N.drawPositions?.map((C) => C + y)), M;
5345
+ }, { validSeedBlocks: b } = yo({ provisionalPositioning: e, allPositions: !0, appliedPolicies: i, drawDefinition: n, structure: s }), P = b?.map((N) => N.drawPositions?.map((C) => C + y)), M;
5346
5346
  if (o) {
5347
5347
  let N = I.length, { seedBlocks: C } = ay({ cluster: xl(c) === Wp, participantsCount: N });
5348
5348
  M = C.map((k) => k.map((O) => O + y)).map(T).filter((k) => k.length);
@@ -5355,7 +5355,7 @@ function KF({ provisionalPositioning: e, seedOrderByePositions: t, isLuckyStruct
5355
5355
  return { unseededByePositions: A };
5356
5356
  }
5357
5357
  function XF({ provisionalPositioning: e, drawDefinition: t, matchUpsMap: r, structure: i, event: n }) {
5358
- let a = { isCollectionMatchUp: !1 }, { matchUps: s, roundMatchUps: o } = _e({ afterRecoveryTimes: !1, provisionalPositioning: e, drawDefinition: t, matchUpFilters: a, matchUpsMap: r, structure: i, event: n }), c = o?.[1] || [], u = i?.structureType === Tr, l = u ? s : c, d = u ? i?.structures?.length || 0 : s.length, { structureId: p, stage: m, stageSequence: f } = i, h = so({ entryStatuses: Fi, provisionalPositioning: e, drawDefinition: t, stageSequence: f, structureId: p, stage: m }), { qualifiersCount: g } = Ec({ provisionalPositioning: e, drawDefinition: t, stageSequence: f, structureId: p, stage: m }), I = h.length + g, { positionAssignments: y, unassignedPositions: U } = Ft({ structure: i }), D = U?.map((P) => P.drawPosition), v = y?.filter((P) => P.bye).length, w = y?.filter((P) => P.bye).map((P) => P.drawPosition), S = l.map((P) => P.drawPositions).filter((P) => P?.reduce((M, R) => !w?.includes(R) && M, !0)).flat(1 / 0).filter((P) => D?.includes(P)), T = y?.length, b = T ? T - I : 0;
5358
+ let a = { isCollectionMatchUp: !1 }, { matchUps: s, roundMatchUps: o } = _e({ afterRecoveryTimes: !1, provisionalPositioning: e, drawDefinition: t, matchUpFilters: a, matchUpsMap: r, structure: i, event: n }), c = o?.[1] || [], u = i?.structureType === Tr, l = u ? s : c, d = u ? i?.structures?.length || 0 : s.length, { structureId: p, stage: m, stageSequence: f } = i, h = oo({ entryStatuses: Fi, provisionalPositioning: e, drawDefinition: t, stageSequence: f, structureId: p, stage: m }), { qualifiersCount: g } = Ec({ provisionalPositioning: e, drawDefinition: t, stageSequence: f, structureId: p, stage: m }), I = h.length + g, { positionAssignments: y, unassignedPositions: U } = Ft({ structure: i }), D = U?.map((P) => P.drawPosition), v = y?.filter((P) => P.bye).length, w = y?.filter((P) => P.bye).map((P) => P.drawPosition), S = l.map((P) => P.drawPositions).filter((P) => P?.reduce((M, R) => !w?.includes(R) && M, !0)).flat(1 / 0).filter((P) => D?.includes(P)), T = y?.length, b = T ? T - I : 0;
5359
5359
  return b > d && i.stageSequence === 1 && i.stage !== sr && (b = d), { placedByes: v, byesCount: b, relevantMatchUps: l, placedByePositions: w, roundMatchUps: o, positionsToAvoidDoubleBye: S };
5360
5360
  }
5361
5361
  function fv({ provisionalPositioning: e, tournamentRecord: t, appliedPolicies: r, drawDefinition: i, seedBlockInfo: n, seedingProfile: a, matchUpsMap: s, structureId: o, structure: c, seedLimit: u, seedsOnly: l, event: d }) {
@@ -5383,8 +5383,8 @@ function Fl(e) {
5383
5383
  let U = y.structure;
5384
5384
  if (!U) return { error: lt };
5385
5385
  let D = e.appliedPolicies || xe({ drawDefinition: t, structure: U, event: f })?.appliedPolicies, { qualifiersCount: v } = Ec({ stageSequence: U.stageSequence, provisionalPositioning: i, stage: U.stage, drawDefinition: t, structureId: u }), w = fs;
5386
- if (!so({ stageSequence: U.stageSequence, provisionalPositioning: i, stage: U.stage, placementGroup: o, drawDefinition: t, entryStatuses: w, structureId: u })?.length && !v) return I({ ...x });
5387
- let S = e.matchUpsMap ?? er({ drawDefinition: t }), T = e.inContextDrawMatchUps ?? Rt({ inContext: !0, drawDefinition: t, matchUpsMap: S })?.matchUps, b = [], P = Io({ provisionalPositioning: i, appliedPolicies: D, drawDefinition: t, seedingProfile: c, structure: U });
5386
+ if (!oo({ stageSequence: U.stageSequence, provisionalPositioning: i, stage: U.stage, placementGroup: o, drawDefinition: t, entryStatuses: w, structureId: u })?.length && !v) return I({ ...x });
5387
+ let S = e.matchUpsMap ?? er({ drawDefinition: t }), T = e.inContextDrawMatchUps ?? Rt({ inContext: !0, drawDefinition: t, matchUpsMap: S })?.matchUps, b = [], P = yo({ provisionalPositioning: i, appliedPolicies: D, drawDefinition: t, seedingProfile: c, structure: U });
5388
5388
  if (P.error) return P;
5389
5389
  let { validSeedBlocks: M } = P;
5390
5390
  h.push({ validSeedBlocks: M });
@@ -5713,7 +5713,7 @@ function UM({ tournamentRecord: e, drawDefinition: t, event: r, structureId: i }
5713
5713
  let a = n.matchUps?.map(({ matchUpId: s }) => s) || [];
5714
5714
  return n.positionAssignments = [], n.seedAssignments = [], n.matchUps = [], Fn({ tournamentId: e?.tournamentId, action: "resetVoluntaryConsolationStructure", matchUpIds: a, drawDefinition: t }), Je({ tournamentId: e?.tournamentId, eventId: r?.eventId, drawDefinition: t, structureIds: [n.structureId] }), { ...x };
5715
5715
  }
5716
- var oL = "qualifierDrawPositionAssignment", cL = "withdrawParticipantAtDrawPosition", uL = "alternateDrawPositionAssignment", lL = "luckyLoserDrawPositionAssignment", hv = "removeDrawPositionAssignment", SM = "swapDrawPositionAssignments", dL = "modifyPairAssignment", pL = "adHocPositionSwap", mL = "modifyParticipantOtherName", gv = "assignDrawPosition", fL = "removeSeededParticipant", hL = "assignDrawPositionBye", gL = "modifySeedAssignment", vM = "addPenalty", Iy = "MODIFY_PAIR", bm = "QUALIFIER", yy = "ALTERNATE", Uy = "WITHDRAW", Ws = "ASSIGN", Bh = "REMOVE", Sy = "LUCKY", ou = "REMOVE_SEED", Mm = "SWAP", xu = "NICKNAME", As = "SEED_VALUE", qs = "PENALTY", IL = { MODIFY_PAIR_ASSIGNMENT: Iy, QUALIFYING_PARTICIPANT: bm, ALTERNATE_PARTICIPANT: yy, WITHDRAW_PARTICIPANT: Uy, ASSIGN_PARTICIPANT: Ws, LUCKY_PARTICIPANT: Sy, REMOVE_ASSIGNMENT: Bh, SWAP_PARTICIPANTS: Mm, ADD_NICKNAME: xu, REMOVE_SEED: ou, ADD_PENALTY: qs, ASSIGN_BYE: "BYE", SEED_VALUE: As };
5716
+ var oL = "qualifierDrawPositionAssignment", cL = "withdrawParticipantAtDrawPosition", uL = "alternateDrawPositionAssignment", lL = "luckyLoserDrawPositionAssignment", hv = "removeDrawPositionAssignment", SM = "swapDrawPositionAssignments", dL = "modifyPairAssignment", pL = "adHocPositionSwap", mL = "modifyParticipantOtherName", gv = "assignDrawPosition", fL = "removeSeededParticipant", hL = "assignDrawPositionBye", gL = "modifySeedAssignment", vM = "addPenalty", Iy = "MODIFY_PAIR", bm = "QUALIFIER", yy = "ALTERNATE", Uy = "WITHDRAW", qs = "ASSIGN", Bh = "REMOVE", Sy = "LUCKY", ou = "REMOVE_SEED", Mm = "SWAP", xu = "NICKNAME", Cs = "SEED_VALUE", Hs = "PENALTY", IL = { MODIFY_PAIR_ASSIGNMENT: Iy, QUALIFYING_PARTICIPANT: bm, ALTERNATE_PARTICIPANT: yy, WITHDRAW_PARTICIPANT: Uy, ASSIGN_PARTICIPANT: qs, LUCKY_PARTICIPANT: Sy, REMOVE_ASSIGNMENT: Bh, SWAP_PARTICIPANTS: Mm, ADD_NICKNAME: xu, REMOVE_SEED: ou, ADD_PENALTY: Hs, ASSIGN_BYE: "BYE", SEED_VALUE: Cs };
5717
5717
  function wM({ tournamentRecord: e, drawDefinition: t, drawPositions: r, structureId: i, event: n }) {
5718
5718
  if (!t) return { error: ne };
5719
5719
  if (!i) return { error: ri };
@@ -5784,7 +5784,7 @@ function TM({ tournamentRecord: e, drawDefinition: t, participantId: r, structur
5784
5784
  function Ll({ targetEntryRound: e = 1, finishingPositions: t, sourceRoundNumber: r, sourceStructureId: i, targetStructureId: n, linkType: a = Mn }) {
5785
5785
  return !i || !n ? { error: ri } : { link: ae({ linkType: a, source: { roundNumber: r, structureId: i, finishingPositions: t }, target: { feedProfile: Di, roundNumber: e, structureId: n } }) };
5786
5786
  }
5787
- function Uo({ matchUp: e, tieFormat: t, isMock: r, uuids: i }) {
5787
+ function So({ matchUp: e, tieFormat: t, isMock: r, uuids: i }) {
5788
5788
  let { collectionDefinitions: n } = t ?? {};
5789
5789
  return { tieMatchUps: (n ?? []).map((a) => _l({ matchUp: e, collectionDefinition: a, uuids: i, isMock: r })).filter(Boolean).flat() };
5790
5790
  }
@@ -5844,7 +5844,7 @@ function wy(e) {
5844
5844
  } else ({ drawSize: r, matchUps: S, roundLimit: D, roundsCount: v } = un({ qualifyingRoundNumber: n, qualifyingPositions: a, matchUpType: E, idPrefix: I, drawSize: r, isMock: y, uuids: U })), D || (D = v), w = ui({ structureName: p ?? O, structureId: m ?? U?.pop(), qualifyingRoundNumber: D, stage: oe, matchUpFormat: d, stageSequence: P, matchUpType: E, roundLimit: D, matchUps: S }), f && Le({ extension: { name: pn, value: f }, element: w }), T = S?.filter((B) => B.roundNumber === D)?.length;
5845
5845
  let L = g === Ei ? bn : Mn, _ = w && D && Ll({ sourceStructureId: w.structureId, sourceRoundNumber: D, targetStructureId: s, finishingPositions: b, linkType: L })?.link;
5846
5846
  return h && (S = _e({ structure: w })?.matchUps || [], S?.forEach((B) => {
5847
- let { tieMatchUps: G } = Uo({ tieFormat: h, matchUp: B, isMock: y });
5847
+ let { tieMatchUps: G } = So({ tieFormat: h, matchUp: B, isMock: y });
5848
5848
  Object.assign(B, { tieMatchUps: G, matchUpType: E });
5849
5849
  })), { qualifyingDrawPositionsCount: r, qualifiersCount: T, ...x, structure: w, link: _ };
5850
5850
  }
@@ -6112,7 +6112,7 @@ function CM({ requireSequential: e = !0, playoffMatchUpFormat: t, playoffAttribu
6112
6112
  P === Xo ? Object.assign(N, { playoffAttributes: v?.playoffAttributes ?? r ?? eI, roundOffsetLimit: 3 }) : P === Qo && Object.assign(N, { playoffAttributes: v?.playoffAttributes ?? r ?? tI, roundOffsetLimit: 2 });
6113
6113
  let C = Vo(N);
6114
6114
  if (C.error) return C;
6115
- if (C.links?.length && y.push(...C.links), C.structures?.length && I.push(...C.structures), I.sort(ao), C.structureId) {
6115
+ if (C.links?.length && y.push(...C.links), C.structures?.length && I.push(...C.structures), I.sort(so), C.structureId) {
6116
6116
  let k = cd({ playoffStructureId: C.structureId, finishingPositions: w, sourceStructureId: i });
6117
6117
  y.push(k), g.push({ structureId: C.structureId, finishingPositions: w });
6118
6118
  }
@@ -6152,7 +6152,7 @@ function EL(e) {
6152
6152
  if (D?.length) {
6153
6153
  let T = fr({ drawDefinition: a, event: u })?.tieFormat;
6154
6154
  T && D.forEach((b) => {
6155
- let { tieMatchUps: P } = Uo({ isMock: e.isMock, tieFormat: T, matchUp: b });
6155
+ let { tieMatchUps: P } = So({ isMock: e.isMock, tieFormat: T, matchUp: b });
6156
6156
  Object.assign(b, { tieMatchUps: P, matchUpType: Jr });
6157
6157
  });
6158
6158
  }
@@ -6524,7 +6524,7 @@ function tn(e) {
6524
6524
  } else i.matchUpId !== d && console.log("!!!!!");
6525
6525
  c && [st, dt].includes(c) || u ? Object.assign(i, { ...Nm }) : f && (i.score = f);
6526
6526
  let I = c && i?.matchUpStatus === Qe && c !== Qe;
6527
- c && (i.matchUpStatus = c), r && (i.matchUpFormat = r), a && (i.matchUpStatusCodes = a), l && (i.winningSide = l), e.removeWinningSide && (i.winningSide = void 0), !n && o && ({ structure: n } = at({ drawDefinition: o, matchUpId: d, event: p })), c && !i.winningSide && Lt(i) && !xt.includes(c) && ![no, Na, Yr].includes(c) && (i.matchUpStatus = xi);
6527
+ c && (i.matchUpStatus = c), r && (i.matchUpFormat = r), a && (i.matchUpStatusCodes = a), l && (i.winningSide = l), e.removeWinningSide && (i.winningSide = void 0), !n && o && ({ structure: n } = at({ drawDefinition: o, matchUpId: d, event: p })), c && !i.winningSide && Lt(i) && !xt.includes(c) && ![ao, Na, Yr].includes(c) && (i.matchUpStatus = xi);
6528
6528
  let y;
6529
6529
  if ((I && i?.processCodes?.length || c === Qe) && (y = h?.[pi]?.processCodes?.incompleteAssignmentsOnDefault), !i.collectionId) {
6530
6530
  let S = n?.structureType === Tr, T = Rr({ structure: n });
@@ -6670,8 +6670,8 @@ function aa(e) {
6670
6670
  let { matchUp: p, structure: m } = d;
6671
6671
  if (!p.tieMatchUps) return { error: xr };
6672
6672
  Gl({ tournamentId: l?.tournamentId, eventId: o?.eventId, dualMatchUp: p, drawDefinition: r });
6673
- let { extension: f } = De({ name: js, element: p });
6674
- if (f?.value) if (n) yr({ element: p, name: js });
6673
+ let { extension: f } = De({ name: Gs, element: p });
6674
+ if (f?.value) if (n) yr({ element: p, name: Gs });
6675
6675
  else return { ...x, score: p.score };
6676
6676
  let h = fr({ drawDefinition: r, structure: m, matchUp: p, event: o })?.tieFormat;
6677
6677
  p.tieFormat = tr(h);
@@ -6698,7 +6698,7 @@ function KL({ winnerMatchUpDrawPositionIndex: e, inContextDrawMatchUps: t, proje
6698
6698
  let P = T.pop();
6699
6699
  P && cn({ participantId: D, structureId: v, inContextDrawMatchUps: t, sourceMatchUpStatus: i, tournamentRecord: a, drawDefinition: c, drawPosition: P, matchUpsMap: d, event: p });
6700
6700
  } else if (S) {
6701
- let P = Es({ drawPosition: S, matchUpId: u.matchUpId, inContextDrawMatchUps: t, sourceMatchUpStatus: i, tournamentRecord: a, sourceMatchUpId: o, drawDefinition: c, matchUpsMap: d });
6701
+ let P = As({ drawPosition: S, matchUpId: u.matchUpId, inContextDrawMatchUps: t, sourceMatchUpStatus: i, tournamentRecord: a, sourceMatchUpId: o, drawDefinition: c, matchUpsMap: d });
6702
6702
  if (P.error) return F({ result: P, stack: m });
6703
6703
  } else if (y?.stage !== oe) {
6704
6704
  let P = "winner target position unavaiallble";
@@ -6709,7 +6709,7 @@ function KL({ winnerMatchUpDrawPositionIndex: e, inContextDrawMatchUps: t, proje
6709
6709
  P && M && Cc({ eventId: u?.eventId, structureId: v, ...P, tournamentRecord: a, drawDefinition: c, participantId: M });
6710
6710
  }
6711
6711
  } else {
6712
- let f = Es({ matchUpId: u.matchUpId, drawPosition: n, inContextDrawMatchUps: t, sourceMatchUpStatus: i, tournamentRecord: a, sourceMatchUpId: o, drawDefinition: c, matchUpsMap: d });
6712
+ let f = As({ matchUpId: u.matchUpId, drawPosition: n, inContextDrawMatchUps: t, sourceMatchUpStatus: i, tournamentRecord: a, sourceMatchUpId: o, drawDefinition: c, matchUpsMap: d });
6713
6713
  if (f.error) return f;
6714
6714
  }
6715
6715
  if (l && r) {
@@ -6839,7 +6839,7 @@ function Ey(e) {
6839
6839
  if (G?.length) {
6840
6840
  let W = fr({ drawDefinition: U, event: I })?.tieFormat;
6841
6841
  W && G.forEach((Y) => {
6842
- let { tieMatchUps: q } = Uo({ matchUp: Y, tieFormat: W, isMock: g });
6842
+ let { tieMatchUps: q } = So({ matchUp: Y, tieFormat: W, isMock: g });
6843
6843
  Object.assign(Y, { tieMatchUps: q, matchUpType: rt });
6844
6844
  });
6845
6845
  }
@@ -6908,7 +6908,7 @@ function $l(e) {
6908
6908
  let o = HM({ element: r });
6909
6909
  return Ue({ payload: { parentOrganisation: r.parentOrganisation, tournamentId: r.tournamentId, timeItemValues: o }, topic: us }), s;
6910
6910
  }
6911
- function So(e) {
6911
+ function vo(e) {
6912
6912
  let { removePriorValues: t, duplicateValues: r, creationTime: i, timeItem: n, event: a } = e;
6913
6913
  return a ? fn({ removePriorValues: t, duplicateValues: r, element: a, creationTime: i, timeItem: n }) : { error: li };
6914
6914
  }
@@ -7042,7 +7042,7 @@ function KM({ tournamentRecord: e, removeScheduling: t, drawDefinition: r }) {
7042
7042
  let I = h?.map(({ drawPosition: U, participantFed: D }) => !D && U).filter(Boolean), y = g.drawPositions.map((U) => I.includes(U) ? void 0 : U);
7043
7043
  g.drawPositions = y;
7044
7044
  }
7045
- t ? delete g.timeItems : g.timeItems?.length && (g.timeItems = g.timeItems.filter((I) => I.itemType && ![On, wa, oo, $I, co, uo].includes(I.itemType))), Ee({ tournamentId: e?.tournamentId, context: "resetDrawDefiniton", drawDefinition: r, matchUp: g });
7045
+ t ? delete g.timeItems : g.timeItems?.length && (g.timeItems = g.timeItems.filter((I) => I.itemType && ![On, wa, co, $I, uo, lo].includes(I.itemType))), Ee({ tournamentId: e?.tournamentId, context: "resetDrawDefiniton", drawDefinition: r, matchUp: g });
7046
7046
  }
7047
7047
  }
7048
7048
  }
@@ -7058,7 +7058,7 @@ function Wl({ tournamentRecord: e }) {
7058
7058
  return r[n] = i, (i?.drawDefinitions || []).map((a) => ({ drawDefinition: a, eventId: n }));
7059
7059
  }).flat().filter(Boolean)).forEach(({ drawDefinition: i, eventId: n }) => {
7060
7060
  let a = 0, s = 0, o = 0, { allStructuresLinked: c } = Pm({ drawDefinition: i }), u = r[n], l = (i?.structures || []).map((U) => {
7061
- let { stage: D, stageSequence: v, structureId: w } = U, S = Bs[D], { inContextStructureMatchUps: T } = Rl({ drawDefinition: i, structure: U, event: u }), b = T?.filter(({ winningSide: G }) => G), P = b.filter(Boolean).length || 0;
7061
+ let { stage: D, stageSequence: v, structureId: w } = U, S = Vs[D], { inContextStructureMatchUps: T } = Rl({ drawDefinition: i, structure: U, event: u }), b = T?.filter(({ winningSide: G }) => G), P = b.filter(Boolean).length || 0;
7062
7062
  s += P, o += T.length - s;
7063
7063
  let M = Math.max(b.filter(({ roundNumber: G }) => G === 1).map(({ roundPosition: G }) => G)), { positionAssignments: R } = Ye({ structure: U }), E = R?.filter(({ participantId: G }) => G);
7064
7064
  a += E?.length ?? 0;
@@ -7116,7 +7116,7 @@ function JM(e) {
7116
7116
  let n = r.structures?.find((c) => c.structureId === i);
7117
7117
  if (!n) return { error: lt };
7118
7118
  let a = n?.matchUps, s = a?.find((c) => !!c.roundPosition);
7119
- if (n.structures || s || n.finishingPosition === io) return { error: as };
7119
+ if (n.structures || s || n.finishingPosition === no) return { error: as };
7120
7120
  let o = a.filter(({ roundNumber: c }) => e.roundNumbers?.includes(c)).map(Gt);
7121
7121
  return t = t.filter((c) => !o.includes(c)), e.roundNumbers && !t.length && (t = o), { existingMatchUps: a, matchUpIds: t, structureId: i, structure: n };
7122
7122
  }
@@ -7187,7 +7187,7 @@ function Cm(e) {
7187
7187
  let o = i.structures?.find((p) => p.structureId === s);
7188
7188
  if (!o) return { error: lt };
7189
7189
  let c = (o?.matchUps).find((p) => !!p.roundPosition);
7190
- if (o.structures || c || o.finishingPosition === io) return { error: as };
7190
+ if (o.structures || c || o.finishingPosition === no) return { error: as };
7191
7191
  let u = Qt({ tournamentRecord: r, inContext: !1 })?.matchUps?.map(Gt) ?? [], l = n.map(Gt);
7192
7192
  if (Sr(u, l)) return { error: iT, info: "One or more matchUpIds already present in tournamentRecord" };
7193
7193
  o.matchUps.push(...n);
@@ -7213,7 +7213,7 @@ function ky({ excludedMatchUpStatuses: e = [], includeEventParticipants: t, incl
7213
7213
  if (!o) return { error: ne };
7214
7214
  let f = [re, yt];
7215
7215
  r && f.push(oe);
7216
- let h = m?.eventType ? { matchUpTypes: [m.eventType] } : void 0, g = o?.matchUpType ? { matchUpTypes: [o.matchUpType] } : void 0, I = t && m ? _n({ contextFilters: { stages: f }, matchUpFilters: h, tournamentRecord: s, inContext: !0, event: m })?.matchUps ?? [] : Ur({ contextFilters: { stages: f }, matchUpFilters: g, tournamentRecord: s, inContext: !0, drawDefinition: o })?.matchUps ?? [], y = so({ stage: zt, drawDefinition: o }).map(({ participantId: k }) => k), U = {}, D = {}, v = {}, w = {};
7216
+ let h = m?.eventType ? { matchUpTypes: [m.eventType] } : void 0, g = o?.matchUpType ? { matchUpTypes: [o.matchUpType] } : void 0, I = t && m ? _n({ contextFilters: { stages: f }, matchUpFilters: h, tournamentRecord: s, inContext: !0, event: m })?.matchUps ?? [] : Ur({ contextFilters: { stages: f }, matchUpFilters: g, tournamentRecord: s, inContext: !0, drawDefinition: o })?.matchUps ?? [], y = oo({ stage: zt, drawDefinition: o }).map(({ participantId: k }) => k), U = {}, D = {}, v = {}, w = {};
7217
7217
  n || (n = ia({ policyTypes: [Th], tournamentRecord: s, drawDefinition: o, event: m }).policyDefinitions);
7218
7218
  let S = n?.[Th];
7219
7219
  e = e.length && e || S?.excludedMatchUpStatuses || [], t = t ?? S?.includeEventParticipants, d = d ?? S?.allEntries, i = i ?? S?.finishingRoundLimit, a = a ?? S?.roundNumberLimit, c = c ?? S?.matchUpsLimit, u === void 0 && (u = S?.requirePlay !== void 0 ? S.requirePlay : !0), l === void 0 && (l = S?.requireLoss !== void 0 ? S.requireLoss : !0), p = p ?? S?.winsLimit;
@@ -7243,7 +7243,7 @@ function Om(e) {
7243
7243
  let a = r.structures?.find((f) => f.structureId === n);
7244
7244
  if (!a) return { error: lt };
7245
7245
  let s, o = (a.matchUps ?? [])?.reduce((f, h) => (h.roundPosition && (s = !0), (h?.roundNumber || 0) > f ? h.roundNumber : f), 0);
7246
- if (a.structures || s || a.finishingPosition === io) return { error: as };
7246
+ if (a.structures || s || a.finishingPosition === no) return { error: as };
7247
7247
  let c = r?.entries?.filter((f) => {
7248
7248
  let h = f.entryStatus;
7249
7249
  return Fi.includes(h);
@@ -7303,7 +7303,7 @@ function ts(e) {
7303
7303
  let I = s && wr({ matchUpId: s.matchUpId, inContextDrawMatchUps: t, drawDefinition: i }), y = c && ts({ relevantLink: o?.loserTargetLink, targetData: c, inContextDrawMatchUps: t, drawDefinition: i });
7304
7304
  return !!(I && ts({ targetData: I, inContextDrawMatchUps: t, drawDefinition: i }) || y);
7305
7305
  }
7306
- var iR = { [An]: { policyName: "positionActionsDefault", enabledStructures: [{ stages: [oe, re], stageSequences: [1], enabledActions: [], disabledActions: [] }, { stages: [], stageSequences: [], enabledActions: [xu, qs, bm, As], disabledActions: [] }], disbledStructures: [], otherFlightEntries: !1, activePositionOverrides: [] } }, Md = "positionAction", Vh = "matchUpAction";
7306
+ var iR = { [An]: { policyName: "positionActionsDefault", enabledStructures: [{ stages: [oe, re], stageSequences: [1], enabledActions: [], disabledActions: [] }, { stages: [], stageSequences: [], enabledActions: [xu, Hs, bm, Cs], disabledActions: [] }], disbledStructures: [], otherFlightEntries: !1, activePositionOverrides: [] } }, Md = "positionAction", Vh = "matchUpAction";
7307
7307
  function nR({ actionType: e = Md, appliedPolicies: t, drawDefinition: r, structure: i }) {
7308
7308
  let n = e === Md && An || e === Vh && Yt, a = e === Md && iR || e === Vh && Fb, s = n && (t?.[n] || a?.[n]), o = r.links?.filter((d) => d?.target?.structureId === i?.structureId)?.map(({ target: d }) => d.feedProfile) ?? [], { enabledStructures: c, disabledStructures: u } = s || {}, l = u?.find((d) => {
7309
7309
  let { stages: p, stageSequences: m, structureTypes: f, feedProfiles: h } = d;
@@ -7329,8 +7329,8 @@ function Ar({ action: e, policyActions: t }) {
7329
7329
  }
7330
7330
  var sR = "replaceTieMatchUpParticipantId", oR = "assignTieMatchUpParticipantId", jh = "removeTieMatchUpParticipantId", Pv = "assignMatchUpSideParticipant", t_ = "removeMatchUpSideParticipant", cR = "substituteParticipant", Gh = "REMOVE_SUBSTITUTION", uR = "REPLACE_PARTICIPANT", _y = "REMOVE_PARTICIPANT", $h = "setMatchUpStatus", Wh = "SUBSTITUTION", lR = "SCHEDULE", r_ = "PENALTY", qh = "REFEREE", dR = "STATUS", Hh = "START", pR = "SCORE", i_ = { REPLACE_TEAM_POSITION_METHOD: sR, ASSIGN_TEAM_POSITION_METHOD: oR, REMOVE_TEAM_POSITION_METHOD: jh, REPLACE_PARTICIPANT: uR, SUBSTITUTION_METHOD: cR, REMOVE_SUBSTITUTION: Gh, REMOVE_PARTICIPANT: _y, SCHEDULE_METHOD: $h, SUBSTITUTION: Wh, SCHEDULE: lR, PENALTY: r_, REFEREE: qh, STATUS: dR, SCORE: pR, START: Hh, END: "END" };
7331
7331
  function n_({ specifiedPolicyDefinitions: e, inContextDrawMatchUps: t, matchUpParticipantIds: r, matchUpActionsPolicy: i, inContextMatchUp: n, policyActions: a, enforceGender: s, participantId: o, sideNumber: c, matchUpId: u, matchUp: l, drawId: d, side: p }) {
7332
- let m = [], f = n.sides?.find((A) => A.participant), h = Qr(n.gender) && n.sideNumber && n.sides?.filter((A) => A.particiapntId).length === 1 && f?.participant?.person?.sex, g = n.matchUpType, I = (s ?? i?.participants?.enforceGender) !== !1 ? n.gender : void 0, y = n.sides?.flatMap((A) => A.participant?.individualParticipants || A.participant).filter(Boolean)?.map(Pe), U = n.sides?.filter((A) => !c || A.sideNumber === c).flatMap((A) => A.participant?.individualParticipants || A.participant).filter(Boolean), D = U?.map(Pe), v = t?.find((A) => A.matchUpId === n.matchUpTieId)?.sides?.map((A) => A?.participant?.individualParticipants?.filter(({ participantId: N, person: C }) => !D?.includes(N) && (!I || yn(I) || C.sex === I || Qr(I) && !h || h && C.sex !== h))), w = c ? v?.[c - 1] : v?.map((A, N) => ({ participants: A, sideNumber: N + 1 })), S = c ? v?.[c - 1]?.map(Pe) : v?.map((A, N) => ({ participants: A?.map(Pe), sideNumber: N + 1 })), T = c && (Tt(bs)(g) && !D?.length || Tt(Wa)(g) && (D?.length ?? 0) < 2) || !c && (Tt(bs)(g) && (D?.length ?? 0) < 2 || Tt(Wa)(g) && (D?.length ?? 0) < 4), b = S?.filter((A) => !y?.includes(A)), P = w?.filter(({ participantId: A }) => b.includes(A));
7333
- if (T && b?.length && m.push({ availableParticipantIds: b, method: oR, availableParticipants: P, type: Ws, payload: { participantId: void 0, tieMatchUpId: u, sideNumber: c, drawId: d } }), D?.length && (!Lt(l) || p?.substitutions?.length) && m.push({ method: jh, type: _y, existingParticipantIds: D, payload: { participantId: void 0, tieMatchUpId: u, drawId: d } }), P?.length && (!c && D?.length || c && p?.participant) && m.push({ availableParticipantIds: b, method: sR, availableParticipants: P, type: uR, existingParticipantIds: D, payload: { existingParticipantId: void 0, participantId: void 0, tieMatchUpId: u, drawId: d } }), Ar({ policyActions: a, action: Gh }) && p?.substitutions?.length) {
7332
+ let m = [], f = n.sides?.find((A) => A.participant), h = Qr(n.gender) && n.sideNumber && n.sides?.filter((A) => A.particiapntId).length === 1 && f?.participant?.person?.sex, g = n.matchUpType, I = (s ?? i?.participants?.enforceGender) !== !1 ? n.gender : void 0, y = n.sides?.flatMap((A) => A.participant?.individualParticipants || A.participant).filter(Boolean)?.map(Pe), U = n.sides?.filter((A) => !c || A.sideNumber === c).flatMap((A) => A.participant?.individualParticipants || A.participant).filter(Boolean), D = U?.map(Pe), v = t?.find((A) => A.matchUpId === n.matchUpTieId)?.sides?.map((A) => A?.participant?.individualParticipants?.filter(({ participantId: N, person: C }) => !D?.includes(N) && (!I || yn(I) || C.sex === I || Qr(I) && !h || h && C.sex !== h))), w = c ? v?.[c - 1] : v?.map((A, N) => ({ participants: A, sideNumber: N + 1 })), S = c ? v?.[c - 1]?.map(Pe) : v?.map((A, N) => ({ participants: A?.map(Pe), sideNumber: N + 1 })), T = c && (Tt(Ms)(g) && !D?.length || Tt(Wa)(g) && (D?.length ?? 0) < 2) || !c && (Tt(Ms)(g) && (D?.length ?? 0) < 2 || Tt(Wa)(g) && (D?.length ?? 0) < 4), b = S?.filter((A) => !y?.includes(A)), P = w?.filter(({ participantId: A }) => b.includes(A));
7333
+ if (T && b?.length && m.push({ availableParticipantIds: b, method: oR, availableParticipants: P, type: qs, payload: { participantId: void 0, tieMatchUpId: u, sideNumber: c, drawId: d } }), D?.length && (!Lt(l) || p?.substitutions?.length) && m.push({ method: jh, type: _y, existingParticipantIds: D, payload: { participantId: void 0, tieMatchUpId: u, drawId: d } }), P?.length && (!c && D?.length || c && p?.participant) && m.push({ availableParticipantIds: b, method: sR, availableParticipants: P, type: uR, existingParticipantIds: D, payload: { existingParticipantId: void 0, participantId: void 0, tieMatchUpId: u, drawId: d } }), Ar({ policyActions: a, action: Gh }) && p?.substitutions?.length) {
7334
7334
  let A = p.participant?.participantType === be && [p.participantId] || p.participant?.participantType === we && p.participant.individualParticipantIds || [], N = p.substitutions.map((C) => C.participantId).filter((C) => A.includes(C));
7335
7335
  (!o || N.includes(o)) && m.push({ method: jh, type: Gh, substitutedParticipantIds: N, payload: { participantId: void 0, tieMatchUpId: u, drawId: d } });
7336
7336
  }
@@ -7343,7 +7343,7 @@ function n_({ specifiedPolicyDefinitions: e, inContextDrawMatchUps: t, matchUpPa
7343
7343
  }
7344
7344
  function a_({ tournamentParticipants: e = [], possiblyDisablingAction: t, activeDrawPositions: r, positionAssignments: i, returnParticipants: n, appliedPolicies: a, drawDefinition: s, drawPosition: o, validActions: c, structureId: u, structure: l, drawId: d, event: p }) {
7345
7345
  if (r.includes(o)) return {};
7346
- let m = c.find((S) => S.type === Ws)?.availableParticipantIds, f = a?.[An]?.otherFlightEntries, h = a?.[An]?.restrictQualifyingAlternates, g = (s.entries ?? []).filter(({ entryStage: S }) => !h || (l.stage === oe ? S === oe : S !== oe)).sort((S, T) => (S.entryPosition ?? 1 / 0) - (T.entryPosition ?? 1 / 0)).map(({ participantId: S }) => S).filter(Boolean), { allPositionedParticipantIds: I } = GP({ drawDefinition: s }), y = i.map((S) => S.participantId).filter(Boolean), U = g.filter((S) => l.stage && [oe, re, yt].includes(l.stage) ? !I?.includes(S) : !y.includes(S)), D = (p?.entries ?? []).filter((S) => S.entryStatus === Ri && mR({ restrictQualifyingAlternates: h, structure: l, entry: S }) && (l.stage && [oe, re, yt].includes(l.stage) ? !I?.includes(S.participantId) : !y.includes(S.participantId))).sort((S, T) => (S.entryPosition ?? 1 / 0) - (T.entryPosition ?? 1 / 0)).map((S) => S.participantId), v = ye(U.concat(D));
7346
+ let m = c.find((S) => S.type === qs)?.availableParticipantIds, f = a?.[An]?.otherFlightEntries, h = a?.[An]?.restrictQualifyingAlternates, g = (s.entries ?? []).filter(({ entryStage: S }) => !h || (l.stage === oe ? S === oe : S !== oe)).sort((S, T) => (S.entryPosition ?? 1 / 0) - (T.entryPosition ?? 1 / 0)).map(({ participantId: S }) => S).filter(Boolean), { allPositionedParticipantIds: I } = GP({ drawDefinition: s }), y = i.map((S) => S.participantId).filter(Boolean), U = g.filter((S) => l.stage && [oe, re, yt].includes(l.stage) ? !I?.includes(S) : !y.includes(S)), D = (p?.entries ?? []).filter((S) => S.entryStatus === Ri && mR({ restrictQualifyingAlternates: h, structure: l, entry: S }) && (l.stage && [oe, re, yt].includes(l.stage) ? !I?.includes(S.participantId) : !y.includes(S.participantId))).sort((S, T) => (S.entryPosition ?? 1 / 0) - (T.entryPosition ?? 1 / 0)).map((S) => S.participantId), v = ye(U.concat(D));
7347
7347
  if (f) {
7348
7348
  let S = (p ? wt({ event: p }).flightProfile : void 0)?.flights?.filter((T) => T.drawId !== d).map((T) => T.drawEntries.filter((b) => b.participantId && ![Cn, Ii, ms].includes(b.entryStatus) && !g.includes(b.participantId)).map(({ participantId: b }) => b)).flat().filter(Boolean);
7349
7349
  S?.length && v.push(...S);
@@ -7368,7 +7368,7 @@ function o_({ restrictAdHocRoundParticipants: e, tournamentParticipants: t, matc
7368
7368
  U?.forEach((T) => {
7369
7369
  let b = (n.entries ?? []).find((P) => P.participantId === T.participantId);
7370
7370
  T.entryPosition = b?.entryPosition;
7371
- }), y.length && p.push({ payload: { drawId: l, matchUpId: o, structureId: a, sideNumber: s }, method: Pv, type: Ws, availableParticipantIds: y, participantsAvailable: U });
7371
+ }), y.length && p.push({ payload: { drawId: l, matchUpId: o, structureId: a, sideNumber: s }, method: Pv, type: qs, availableParticipantIds: y, participantsAvailable: U });
7372
7372
  let D = d?.entries ?? [], v = s_({ eventEntries: D, structure: c }), w = ye(g.concat(v));
7373
7373
  if (i) {
7374
7374
  let T = (d ? wt({ event: d }) : void 0)?.flights?.filter((b) => b.drawId !== l).flatMap((b) => b.drawEntries.filter((P) => P.participantId && ![Cn, Ii, ms].includes(P.entryStatus)).map(({ participantId: P }) => P)).filter(Boolean);
@@ -7416,8 +7416,8 @@ function km(e) {
7416
7416
  let A = kn({ drawDefinition: t, structure: m }), N = T?.filter((q) => q.participantId).map((q) => q.drawPosition), C = T?.filter((q) => q.bye).map((q) => q.drawPosition), k = p.matchUpStatus === "BYE" || !E && p.drawPositions?.reduce((q, K) => C?.includes(K) || q, !1);
7417
7417
  if (k) return { validActions: M, isByeMatchUp: k };
7418
7418
  Ar({ policyActions: y, action: qh }) && M.push({ type: qh, payload: { matchUpId: c } });
7419
- let O = !Ml({ matchUpStatus: p.matchUpStatus }), L = f?.scoring?.structures, _ = m?.stage && L?.stage && L?.stage[m.stage], B = m?.stageSequence && _?.stageSequence && _.stageSequence[m.stageSequence], G = !(f?.scoring?.requireAllPositionsAssigned || _?.requireAllPositionsAssigned || B?.requireAllPositionsAssigned) || b, $ = p.sides && p.sides.filter((q) => q?.participantId).length === 2, j = p.matchUpStatus && [dt, Ot].includes(p.matchUpStatus), V = wr({ inContextDrawMatchUps: D, drawDefinition: t, matchUpId: c }), H = ts({ inContextDrawMatchUps: D, drawDefinition: t, targetData: V }), W = (v?.drawPositions?.length === 2 && v.drawPositions.every((q) => N?.includes(q)) && v?.sides?.length === 2 && v.sides.every(({ participantId: q }) => q) || $) && !(j && H), Y = { method: vM, type: qs, payload: { drawId: d, matchUpId: c, penaltyCode: void 0, penaltyType: void 0, participantIds: [], notes: void 0 } };
7420
- if (O && M.push({ payload: { drawId: d, matchUpId: c, schedule: {} }, method: $h, type: lR }), Ar({ policyActions: y, action: qs }) && (w?.participant || !o && S?.length) && M.push(Y), O && W && M.push({ type: dR }), G && W) {
7419
+ let O = !Ml({ matchUpStatus: p.matchUpStatus }), L = f?.scoring?.structures, _ = m?.stage && L?.stage && L?.stage[m.stage], B = m?.stageSequence && _?.stageSequence && _.stageSequence[m.stageSequence], G = !(f?.scoring?.requireAllPositionsAssigned || _?.requireAllPositionsAssigned || B?.requireAllPositionsAssigned) || b, $ = p.sides && p.sides.filter((q) => q?.participantId).length === 2, j = p.matchUpStatus && [dt, Ot].includes(p.matchUpStatus), V = wr({ inContextDrawMatchUps: D, drawDefinition: t, matchUpId: c }), H = ts({ inContextDrawMatchUps: D, drawDefinition: t, targetData: V }), W = (v?.drawPositions?.length === 2 && v.drawPositions.every((q) => N?.includes(q)) && v?.sides?.length === 2 && v.sides.every(({ participantId: q }) => q) || $) && !(j && H), Y = { method: vM, type: Hs, payload: { drawId: d, matchUpId: c, penaltyCode: void 0, penaltyType: void 0, participantIds: [], notes: void 0 } };
7420
+ if (O && M.push({ payload: { drawId: d, matchUpId: c, schedule: {} }, method: $h, type: lR }), Ar({ policyActions: y, action: Hs }) && (w?.participant || !o && S?.length) && M.push(Y), O && W && M.push({ type: dR }), G && W) {
7421
7421
  let { matchUpId: q, matchUpFormat: K } = p, X = { drawId: d, matchUpId: q, matchUpFormat: K, outcome: { scoreStringSide1: void 0, scoreStringSide2: void 0, sets: [] }, winningSide: void 0 };
7422
7422
  M.push({ info: "set outcome and winningSide", method: $h, type: pR, payload: X }), Ar({ policyActions: y, action: Hh }) && M.push({ type: Hh }), Ar({ policyActions: y, action: "END" }) && M.push({ type: "END" });
7423
7423
  }
@@ -7434,9 +7434,9 @@ function c_({ tournamentParticipants: e = [], sourceStructuresComplete: t, possi
7434
7434
  return I.sourceStructureIds.includes(U) || I.sourceStructureIds.push(U), I.targetStructureIds.includes(D) || I.targetStructureIds.push(D), I;
7435
7435
  }, { sourceStructureIds: [], targetStructureIds: [] }) || {}, f = [], h = s.links?.filter((I) => I.target?.structureId === u.structureId) ?? [];
7436
7436
  for (let I of h) {
7437
- let y = I?.source?.structureId, { structure: U } = me({ structureId: y, drawDefinition: s }), D = U?.finishingPosition === io && (p?.length !== 1 || m?.length !== 1), v = {};
7437
+ let y = I?.source?.structureId, { structure: U } = me({ structureId: y, drawDefinition: s }), D = U?.finishingPosition === no && (p?.length !== 1 || m?.length !== 1), v = {};
7438
7438
  if (D) {
7439
- let { matchUps: T } = _e({ drawDefinition: s, structure: u, event: d }), { initialRoundNumber: b } = $s({ drawPosition: o, matchUps: T }), P = s.links?.find((M) => M.target?.structureId === u?.structureId && M.target.roundNumber === b)?.source?.roundNumber;
7439
+ let { matchUps: T } = _e({ drawDefinition: s, structure: u, event: d }), { initialRoundNumber: b } = Ws({ drawPosition: o, matchUps: T }), P = s.links?.find((M) => M.target?.structureId === u?.structureId && M.target.roundNumber === b)?.source?.roundNumber;
7440
7440
  v.roundNumbers = [P];
7441
7441
  }
7442
7442
  let { completedMatchUps: w } = Um({ structureId: y, inContext: !0, matchUpFilters: v, drawDefinition: s }), S = a.map((T) => T.participantId).filter(Boolean);
@@ -7457,7 +7457,7 @@ function u_({ positionSourceStructureIds: e, unassignedParticipantIds: t, possib
7457
7457
  return b?.forEach((P) => {
7458
7458
  let M = (u.entries ?? []).find((R) => R.participantId === P.participantId);
7459
7459
  P.entryPosition = M?.entryPosition;
7460
- }), b?.length && g.push(ae({ payload: { drawId: h, structureId: m, drawPosition: p }, willDisableLinks: r, method: gv, type: Ws, availableParticipantIds: T, participantsAvailable: b })), { validAssignmentActions: g };
7460
+ }), b?.length && g.push(ae({ payload: { drawId: h, structureId: m, drawPosition: p }, willDisableLinks: r, method: gv, type: qs, availableParticipantIds: T, participantsAvailable: b })), { validAssignmentActions: g };
7461
7461
  }
7462
7462
  if (U.includes(p) || d) {
7463
7463
  let v;
@@ -7466,7 +7466,7 @@ function u_({ positionSourceStructureIds: e, unassignedParticipantIds: t, possib
7466
7466
  S.sort(l_), v = S.map((T) => T.participantId);
7467
7467
  } else v = t;
7468
7468
  let w = o ? n?.filter((S) => v.includes(S.participantId)).map((S) => ie(S, void 0, !0)) : void 0;
7469
- w?.length && g.push(ae({ payload: { drawId: h, structureId: m, drawPosition: p }, willDisableLinks: r, method: gv, type: Ws, availableParticipantIds: v, participantsAvailable: w }));
7469
+ w?.length && g.push(ae({ payload: { drawId: h, structureId: m, drawPosition: p }, willDisableLinks: r, method: gv, type: qs, availableParticipantIds: v, participantsAvailable: w }));
7470
7470
  }
7471
7471
  return { validAssignmentActions: g };
7472
7472
  }
@@ -7537,9 +7537,9 @@ function By(e) {
7537
7537
  if (!N?.map((Y) => Y.drawPosition)?.includes(o)) return { error: mc };
7538
7538
  let { stage: O, stageSequence: L } = d, _ = [O];
7539
7539
  O === sr && _.push(re), O === re && _.push(sr);
7540
- let B = so({ entryStatuses: fs, provisionalPositioning: n, drawDefinition: s, stageSequence: L, structureId: p, stages: _ }), G = gs({ drawDefinition: s, stages: _ }).assignedParticipantIds ?? [], $ = B.filter((Y) => !G.includes(Y.participantId)).map((Y) => Y.participantId), j = g.includes(o), V = h.includes(o);
7540
+ let B = oo({ entryStatuses: fs, provisionalPositioning: n, drawDefinition: s, stageSequence: L, structureId: p, stages: _ }), G = gs({ drawDefinition: s, stages: _ }).assignedParticipantIds ?? [], $ = B.filter((Y) => !G.includes(Y.participantId)).map((Y) => Y.participantId), j = g.includes(o), V = h.includes(o);
7541
7541
  if (D) return { info: "Actions Disabled for structure", isActiveDrawPosition: V, isDrawPosition: !0, hasPositionAssigned: k, validActions: [], isByePosition: j };
7542
- if (Ar({ policyActions: P, action: Ws }) && !V && N && !b && (!C || j)) {
7542
+ if (Ar({ policyActions: P, action: qs }) && !V && N && !b && (!C || j)) {
7543
7543
  let { validAssignmentActions: Y } = u_({ positionSourceStructureIds: w, unassignedParticipantIds: $, possiblyDisablingAction: M, isWinRatioFedStructure: T, tournamentParticipants: u, positionAssignments: N, returnParticipants: i, appliedPolicies: I, drawDefinition: s, isByePosition: j, drawPosition: o, structureId: p, event: c });
7544
7544
  Y?.forEach((q) => E.push(q));
7545
7545
  }
@@ -7551,17 +7551,17 @@ function By(e) {
7551
7551
  if (C) {
7552
7552
  Ar({ policyActions: P, action: Bh }) && !V && (E.push({ type: Bh, method: hv, payload: { drawId: R, structureId: p, drawPosition: o }, willDisableLinks: M }), j || E.push({ type: Uy, method: cL, payload: { drawId: R, structureId: p, drawPosition: o }, willDisableLinks: M }), Ar({ policyActions: P, action: "BYE" }) && !j && E.push({ type: "BYE", method: hv, payload: { drawId: R, structureId: p, drawPosition: o, replaceWithBye: !0 }, willDisableLinks: M }));
7553
7553
  let Y = d.stage === oe || d.stage === re && d.stageSequence === 1;
7554
- if (!j && Tv({ activePositionOverrides: v, activeDrawPositions: h, action: As }) && Ar({ policyActions: P, action: As }) && Zd({ drawDefinition: s, structureId: p, drawPosition: o }) && Y) {
7554
+ if (!j && Tv({ activePositionOverrides: v, activeDrawPositions: h, action: Cs }) && Ar({ policyActions: P, action: Cs }) && Zd({ drawDefinition: s, structureId: p, drawPosition: o }) && Y) {
7555
7555
  let { seedAssignments: q } = mi({ returnAllProxies: !0, drawDefinition: s, structure: d }), { seedNumber: K, seedValue: X } = q?.find((Q) => Q.participantId === H) ?? {};
7556
- E.push({ type: As, method: gL, participant: W, seedNumber: K, payload: { drawId: R, structureId: p, participantId: H, seedValue: X } });
7556
+ E.push({ type: Cs, method: gL, participant: W, seedNumber: K, payload: { drawId: R, structureId: p, participantId: H, seedValue: X } });
7557
7557
  }
7558
7558
  if (!j && Tv({ activePositionOverrides: v, activeDrawPositions: h, action: ou }) && Ar({ policyActions: P, action: ou }) && Zd({ drawDefinition: s, structureId: p, drawPosition: o }) && Y) {
7559
7559
  let { seedAssignments: q } = mi({ returnAllProxies: !0, drawDefinition: s, structure: d }), { seedNumber: K } = q?.find((X) => X.participantId === H) ?? {};
7560
7560
  E.push({ method: fL, type: ou, participant: W, seedNumber: K, payload: { participantId: H, structureId: p, drawId: R } });
7561
7561
  }
7562
7562
  if (!j && H) {
7563
- if (Ar({ policyActions: P, action: qs })) {
7564
- let q = { type: qs, method: vM, participant: W, payload: { penaltyCode: void 0, penaltyType: void 0, participantIds: [], notes: void 0, drawId: R } };
7563
+ if (Ar({ policyActions: P, action: Hs })) {
7564
+ let q = { type: Hs, method: vM, participant: W, payload: { penaltyCode: void 0, penaltyType: void 0, participantIds: [], notes: void 0, drawId: R } };
7565
7565
  E.push(q);
7566
7566
  }
7567
7567
  if (Ar({ policyActions: P, action: xu })) {
@@ -7680,7 +7680,7 @@ function hR({ hasExistingDrawDefinition: e, qualifyingProfiles: t, appliedPolici
7680
7680
  d.push(V), f += (P || 0) - v;
7681
7681
  } else f += P || 0;
7682
7682
  T = C === Ei ? bn : Mn, S = _.structureId, w = L, n && (B = _e({ structure: _ })?.matchUps || [], B?.forEach((V) => {
7683
- let { tieMatchUps: H } = Uo({ tieFormat: n, matchUp: V, isMock: s });
7683
+ let { tieMatchUps: H } = So({ tieFormat: n, matchUp: V, isMock: s });
7684
7684
  Object.assign(V, { tieMatchUps: H, matchUpType: k });
7685
7685
  })), l.push(_), D += 1;
7686
7686
  }
@@ -7814,7 +7814,7 @@ function Gy(e) {
7814
7814
  }
7815
7815
  h.push(..._);
7816
7816
  }
7817
- h.sort(ao), B?.length && g.push(...B);
7817
+ h.sort(so), B?.length && g.push(...B);
7818
7818
  let G = L.structures.find(({ stage: $, stageSequence: j }) => $ === re && j === 1);
7819
7819
  for (let $ of E || []) {
7820
7820
  let { finalQualifyingRoundNumber: j, finalQualifyingStructureId: V, roundTarget: H, finishingPositions: W, linkType: Y } = $, q = G && Ll({ targetStructureId: G.structureId, sourceStructureId: V, sourceRoundNumber: j, finishingPositions: W, targetEntryRound: H, linkType: Y })?.link;
@@ -7852,7 +7852,7 @@ function $y(e) {
7852
7852
  let { matchUps: g, matchUpsMap: I } = Rt({ drawDefinition: a });
7853
7853
  s && g?.forEach((U) => {
7854
7854
  if (!u.includes(U.matchUpId)) {
7855
- let { tieMatchUps: D } = Uo({ tieFormat: s, matchUp: U, isMock: i });
7855
+ let { tieMatchUps: D } = So({ tieFormat: s, matchUp: U, isMock: i });
7856
7856
  Object.assign(U, { tieMatchUps: D, matchUpType: o });
7857
7857
  }
7858
7858
  });
@@ -7861,9 +7861,9 @@ function $y(e) {
7861
7861
  }
7862
7862
  function zl(e) {
7863
7863
  let { removePriorValues: t, tournamentRecord: r, participantId: i, scaleItem: n } = e, a, s;
7864
- if (!UR({ scaleItem: n })) return { error: Fs };
7864
+ if (!UR({ scaleItem: n })) return { error: Ls };
7865
7865
  if (i && Array.isArray(r.participants) && (s = r.participants.find((o) => o.participantId === i), s)) {
7866
- if (s.participantType === Pr && n?.eventType !== Hr) return { error: Fs };
7866
+ if (s.participantType === Pr && n?.eventType !== Hr) return { error: Ls };
7867
7867
  let o = SR({ removePriorValues: t, participant: s, scaleItem: n });
7868
7868
  if (o.error) return o;
7869
7869
  a = !o.valueChanged;
@@ -7880,12 +7880,12 @@ function yR(e) {
7880
7880
  for (let d of t) {
7881
7881
  let p = d?.participantId;
7882
7882
  if (Array.isArray(d?.scaleItems)) for (let m of d.scaleItems) if (UR({ scaleItem: m })) Array.isArray(o[p]) || (o[p] = []), o[p].push(m);
7883
- else return { error: Fs };
7883
+ else return { error: Ls };
7884
7884
  }
7885
7885
  for (let d of i.participants) {
7886
7886
  let { participantId: p } = d || {};
7887
7887
  if (Array.isArray(o[p])) for (let m of o[p]) {
7888
- if (d.participantType === Pr && m?.eventType !== Hr) return F({ context: { participantId: p, scaleItem: m, participantType: d.participantType }, info: "Invalid participantType for eventType", result: { error: Fs } });
7888
+ if (d.participantType === Pr && m?.eventType !== Hr) return F({ context: { participantId: p, scaleItem: m, participantType: d.participantType }, info: "Invalid participantType for eventType", result: { error: Ls } });
7889
7889
  SR({ participant: d, scaleItem: m, removePriorValues: r }), c.push(d), s++;
7890
7890
  }
7891
7891
  }
@@ -7896,7 +7896,7 @@ function yR(e) {
7896
7896
  let h = { itemType: SI, itemValue: m };
7897
7897
  if (f && (h.itemSubTypes = f), p || d) {
7898
7898
  let { drawDefinition: g, event: I } = Nr({ tournamentRecord: i, eventId: d, drawId: p });
7899
- p && gy({ drawDefinition: g, timeItem: h }), d && So({ event: I, timeItem: h });
7899
+ p && gy({ drawDefinition: g, timeItem: h }), d && vo({ event: I, timeItem: h });
7900
7900
  } else $l({ tournamentRecord: i, timeItem: h });
7901
7901
  }
7902
7902
  }
@@ -7907,9 +7907,9 @@ function UR({ scaleItem: e }) {
7907
7907
  return r.filter((i) => t?.includes(i)).length === r.length;
7908
7908
  }
7909
7909
  function SR({ removePriorValues: e, participant: t, scaleItem: r }) {
7910
- if (!t) return { error: Qs };
7910
+ if (!t) return { error: Js };
7911
7911
  let i = r && Object.keys(r), n = ["scaleType", "eventType", "scaleName"];
7912
- if (n.filter((u) => i.includes(u) && r[u]).length !== n.length) return { error: Fs };
7912
+ if (n.filter((u) => i.includes(u) && r[u]).length !== n.length) return { error: Ls };
7913
7913
  let a = (/* @__PURE__ */ new Date()).toISOString();
7914
7914
  t.timeItems || (t.timeItems = []);
7915
7915
  let { scaleItem: s } = vn({ scaleAttributes: r, participant: t }), o = (u) => [void 0, null, ""].includes(u), c = !(o(s?.scaleValue) && o(r.scaleValue)) && JSON.stringify(s?.scaleValue) !== JSON.stringify(r.scaleValue);
@@ -7937,9 +7937,9 @@ function ac(e) {
7937
7937
  var v_ = (e = 0) => 250 / Math.pow(e + 5, 0.4), w_ = () => 1;
7938
7938
  function D_(e = 3, t = 2) {
7939
7939
  let r = e / t;
7940
- return isNaN(r) ? Oo.kDefault() : r;
7940
+ return isNaN(r) ? ko.kDefault() : r;
7941
7941
  }
7942
- var Oo = { nSpread: 400, diffThreshold: 0.125, kCalc: v_, kMultiplier: D_, kDefault: w_ };
7942
+ var ko = { nSpread: 400, diffThreshold: 0.125, kCalc: v_, kMultiplier: D_, kDefault: w_ };
7943
7943
  function vR(e) {
7944
7944
  let { winnerRating: t, loserRating: r } = e, { ratings: i = jt, winnerCountables: n = 1, loserCountables: a = 0, ratingType: s = "ELO", maxCountables: o, countables: c } = e || {}, u = i?.[s];
7945
7945
  if (!u) return { error: ce };
@@ -7947,15 +7947,15 @@ function vR(e) {
7947
7947
  t = t || u.defaultInitialization, r = r || u.defaultInitialization;
7948
7948
  let d = l[0] > l[1], p = u.decimalsCount || 0, m = d ? l.slice().reverse() : l, f = (C, k) => parseFloat(k) >= Math.min(...C) && parseFloat(k) <= Math.max(...C);
7949
7949
  (!f(l, t) || !f(l, r)) && (f(l, t) || (t = u.defaultInitialization), f(l, r) || (r = u.defaultInitialization));
7950
- let h = Lo({ targetRange: jt.ELO.range, sourceRange: m, value: d ? l[0] - t : t }), g = Lo({ targetRange: jt.ELO.range, sourceRange: m, value: d ? l[0] - r : r }), I = (C, k) => 1 / (1 + Math.pow(10, (k - C) / Oo.nSpread)), y = I(h, g), U = I(g, h), D = Oo.kCalc(n), v = Oo.kCalc(a), w = Oo.kMultiplier(o, c), S = h + w * D * (1 - y), T = g + w * v * (0 - U), b = Lo({ sourceRange: jt.ELO.range, value: S, targetRange: m }), P = Lo({ sourceRange: jt.ELO.range, value: T, targetRange: m }), M = d ? l[0] - b : b, R = parseFloat(M.toFixed(p)), E = d ? l[0] - P : P, A = parseFloat(E.toFixed(p)), N = Math.max(...l) ? Math.abs(t - r) / Math.max(...l) : 0;
7951
- return (b > P && N > Oo.diffThreshold || R < 0 || A < 0) && (R = t, A = r), { newWinnerRating: R, newLoserRating: A };
7950
+ let h = Lo({ targetRange: jt.ELO.range, sourceRange: m, value: d ? l[0] - t : t }), g = Lo({ targetRange: jt.ELO.range, sourceRange: m, value: d ? l[0] - r : r }), I = (C, k) => 1 / (1 + Math.pow(10, (k - C) / ko.nSpread)), y = I(h, g), U = I(g, h), D = ko.kCalc(n), v = ko.kCalc(a), w = ko.kMultiplier(o, c), S = h + w * D * (1 - y), T = g + w * v * (0 - U), b = Lo({ sourceRange: jt.ELO.range, value: S, targetRange: m }), P = Lo({ sourceRange: jt.ELO.range, value: T, targetRange: m }), M = d ? l[0] - b : b, R = parseFloat(M.toFixed(p)), E = d ? l[0] - P : P, A = parseFloat(E.toFixed(p)), N = Math.max(...l) ? Math.abs(t - r) / Math.max(...l) : 0;
7951
+ return (b > P && N > ko.diffThreshold || R < 0 || A < 0) && (R = t, A = r), { newWinnerRating: R, newLoserRating: A };
7952
7952
  }
7953
7953
  var T_ = (e) => e?.reduce((t, r) => (r.winningSide && (t[r.winningSide - 1] += 1), t), [0, 0]) || [0, 0];
7954
7954
  function wR(e) {
7955
- let t = se(e, [{ [_t]: !0 }, { matchUpIds: !0, [Er]: cr, [Mi]: Ys }, { ratingType: !1, [ir]: (y) => jt[y] }]);
7955
+ let t = se(e, [{ [_t]: !0 }, { matchUpIds: !0, [Er]: cr, [Mi]: Ks }, { ratingType: !1, [ir]: (y) => jt[y] }]);
7956
7956
  if (t.error) return t;
7957
7957
  let { updateParticipantRatings: r, removePriorValues: i = !0, tournamentRecord: n, ratingType: a = "ELO", refreshDynamic: s, considerGames: o, drawDefinition: c, matchUpIds: u, asDynamic: l } = e, d = jt[a], { accessor: p } = d, m = {}, f = (e.matchUps || s && Ur({ drawDefinition: c, tournamentRecord: n, inContext: !0, matchUpFilters: { matchUpStatuses: xt } }).matchUps || Qt({ matchUpFilters: { matchUpIds: u, matchUpStatuses: xt }, tournamentRecord: n, inContext: !0 }).matchUps) ?? [], h = `${a}.${lI}`, g = l ? h : a;
7958
- f.sort(fo);
7958
+ f.sort(ho);
7959
7959
  for (let y of f) {
7960
7960
  let { endDate: U, matchUpFormat: D, score: v, sides: w, winningSide: S } = y, T = y.matchUpType, b = { eventType: T, scaleName: a, scaleType: pa }, P = { scaleName: h, eventType: T, scaleType: pa }, M = Object.assign({}, ...(w ?? []).map((_) => {
7961
7961
  let { sideNumber: B, participant: G } = _;
@@ -8002,7 +8002,7 @@ function Fm(e) {
8002
8002
  if (h?.length) {
8003
8003
  let g = fr({ drawDefinition: r, event: s })?.tieFormat;
8004
8004
  g && h.forEach((I) => {
8005
- let { tieMatchUps: y } = Uo({ tieFormat: g, matchUp: I, isMock: a });
8005
+ let { tieMatchUps: y } = So({ tieFormat: g, matchUp: I, isMock: a });
8006
8006
  Object.assign(I, { tieMatchUps: y, matchUpType: rt });
8007
8007
  });
8008
8008
  }
@@ -8019,7 +8019,7 @@ function P_({ maxIterations: e = 4e3, valueSortedPairings: t, pairingValues: r,
8019
8019
  s.forEach((y) => {
8020
8020
  r[y].slice(0, f).forEach((U) => {
8021
8021
  m += 1;
8022
- let D = Cs(y, U.opponent);
8022
+ let D = Os(y, U.opponent);
8023
8023
  if (!g.includes(D)) {
8024
8024
  let v = bv({ stipulated: [[y, U.opponent]], actorsCount: s.length, valueSortedPairings: t, pairingValueMap: a, deltaObjects: n, valueObjects: i });
8025
8025
  if (!u.includes(Bf(v))) {
@@ -8039,7 +8039,7 @@ function Bf(e) {
8039
8039
  function bv({ valueSortedPairings: e, stipulated: t = [], pairingValueMap: r, deltaObjects: i, valueObjects: n, actorsCount: a }) {
8040
8040
  let s = [].concat(...t), o = [], c = 0;
8041
8041
  t.filter(Boolean).forEach((d) => {
8042
- let [p, m] = d, f = Cs(p, m), h = r[f];
8042
+ let [p, m] = d, f = Os(p, m), h = r[f];
8043
8043
  o.push({ participantIds: d, value: h }), c += r[f];
8044
8044
  }), $t(e, a).map((d) => Ir(d).map((p) => ({ ...p, value: p.value + Math.random() * Math.round(Math.random()) }))).flat().forEach((d) => {
8045
8045
  let p = d.pairing.split("|");
@@ -8050,22 +8050,22 @@ function bv({ valueSortedPairings: e, stipulated: t = [], pairingValueMap: r, de
8050
8050
  }
8051
8051
  }), o.sort((d, p) => d.value - p.value);
8052
8052
  let u = o.reduce((d, p) => {
8053
- let [m, f] = p.participantIds, h = Cs(m, f), g = i[h];
8053
+ let [m, f] = p.participantIds, h = Os(m, f), g = i[h];
8054
8054
  return g > d ? g : d;
8055
8055
  }, 0), l = o.reduce((d, p) => {
8056
- let [m, f] = p.participantIds, h = Cs(m, f), g = n[h];
8056
+ let [m, f] = p.participantIds, h = Os(m, f), g = n[h];
8057
8057
  return g > d ? g : d;
8058
8058
  }, 0);
8059
8059
  return { value: c, participantIdPairings: o, maxDelta: u, maxDiff: l };
8060
8060
  }
8061
- function Cs(e, t) {
8061
+ function Os(e, t) {
8062
8062
  return [e, t].sort(Sm).join("|");
8063
8063
  }
8064
8064
  function DR({ participantIds: e }) {
8065
8065
  let t = {}, r = [];
8066
8066
  e.forEach((n) => {
8067
8067
  t[n] = e.filter((a) => a !== n), t[n].forEach((a) => {
8068
- let s = Cs(a, n);
8068
+ let s = Os(a, n);
8069
8069
  r.includes(s) || r.push(s);
8070
8070
  });
8071
8071
  });
@@ -8077,7 +8077,7 @@ function b_({ matchUps: e }) {
8077
8077
  for (let r of e) {
8078
8078
  let i = r.sides.map(Pe);
8079
8079
  if (i.length === 2) {
8080
- let [n, a] = i, s = Cs(n, a);
8080
+ let [n, a] = i, s = Os(n, a);
8081
8081
  t.includes(s) || t.push(s);
8082
8082
  }
8083
8083
  }
@@ -8090,7 +8090,7 @@ function M_({ possiblePairings: e, valueObjects: t }) {
8090
8090
  r[n] = a.sort((s, o) => s.value - o.value);
8091
8091
  }
8092
8092
  function i(n, a) {
8093
- let s = Cs(n, a);
8093
+ let s = Os(n, a);
8094
8094
  return { opponent: a, value: t[s] };
8095
8095
  }
8096
8096
  return { pairingValues: r };
@@ -8155,7 +8155,7 @@ function k_({ encounters: e, tournamentParticipants: t, encounterValue: r, sameT
8155
8155
  function TR(e) {
8156
8156
  let { drawType: t = Zi, attachConsolation: r = !0, applyPositioning: i = !0, tournamentRecord: n, staggeredEntry: a, automated: s, placeByes: o, isMock: c, event: u } = e, l = e?.drawDefinition;
8157
8157
  if (!l) return { error: ne };
8158
- let d = zt, p = so({ stageSequence: 1, drawDefinition: l, stage: d }), m = [Ei, al, Nn].includes(t) ? p.length : pc(p.length);
8158
+ let d = zt, p = oo({ stageSequence: 1, drawDefinition: l, stage: d }), m = [Ei, al, Nn].includes(t) ? p.length : pc(p.length);
8159
8159
  if (!a && t === vc && p.length < 2 || t === Ei && p.length < 3) return { error: bp };
8160
8160
  let { tieFormat: f, matchUpType: h } = e;
8161
8161
  if (f) {
@@ -8176,7 +8176,7 @@ function TR(e) {
8176
8176
  if (D.error) return D;
8177
8177
  let { structures: v, links: w } = D, S = v.map((M) => _e({ structure: M }).matchUps).flat();
8178
8178
  f && S.forEach((M) => {
8179
- let { tieMatchUps: R } = Uo({ matchUp: M, tieFormat: f, isMock: c });
8179
+ let { tieMatchUps: R } = So({ matchUp: M, tieFormat: f, isMock: c });
8180
8180
  Object.assign(M, { tieMatchUps: R, matchUpType: h });
8181
8181
  }), (!i || !r) && (l = ie(l, !1, !0)), l.links || (l.links = []), w.length && l.links.push(...w);
8182
8182
  let T = v.map(({ structureId: M }) => M);
@@ -8325,8 +8325,8 @@ function FR({ matchUp: e }) {
8325
8325
  }
8326
8326
  var LR = {}, _R = {};
8327
8327
  Te(_R, { keyValueScore: () => aN, parseMatchUpFormat: () => Dr, stringifyMatchUpFormat: () => Gp, tidyScore: () => uN });
8328
- var L_ = "COMPLETED", __ = "WO/WO", BR = ["RET", "DEF", "WO", __, "ABN", "SUS", "INT"], zh = "DEFAULTED", VR = "WALKOVER", jR = "ABANDONED", GR = "SUSPENDED", $R = "RETIRED", WR = "INTERRUPTED", B_ = [$R, zh, VR], V_ = "Enter Score", Hs = "()", rs = "[]", zy = ["up", "left", "shift+tab"], Yy = ["enter", "down", "tab", "right"], ip = "backspace", qR = "r", HR = "s", zR = "a", YR = "d", KR = "w", XR = "i", Lm = [qR, YR, KR, zR, HR, XR], _m = "space", Vf = ["[", "("], np = [...zy, ...Yy, _m, "]"], QR = "-", j_ = "/", Os = QR, Dn = QR, JR = [j_], G_ = 0, $_ = ["=", "+", "num_1", "num_2", "shift+=", "shift+-"], Ky = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"].concat(Lm), ZR = Ky.map((e) => `shift+${e}`), eN = [Os, ip].concat(np, JR), tN = [Ky, ZR, eN].join(","), W_ = [tN, zy, Yy, $_].join(","), q_ = { OUTCOMEKEYS: Lm, SIDE1KEYS: Ky, SIDE2KEYS: ZR, MODIFIERS: eN, PROMPT: V_, MOVEUP: zy, MOVEDOWN: Yy, HOTKEYS: W_ };
8329
- function Ro({ scoreString: e, lowSide: t, outcome: r }) {
8328
+ var L_ = "COMPLETED", __ = "WO/WO", BR = ["RET", "DEF", "WO", __, "ABN", "SUS", "INT"], zh = "DEFAULTED", VR = "WALKOVER", jR = "ABANDONED", GR = "SUSPENDED", $R = "RETIRED", WR = "INTERRUPTED", B_ = [$R, zh, VR], V_ = "Enter Score", zs = "()", rs = "[]", zy = ["up", "left", "shift+tab"], Yy = ["enter", "down", "tab", "right"], ip = "backspace", qR = "r", HR = "s", zR = "a", YR = "d", KR = "w", XR = "i", Lm = [qR, YR, KR, zR, HR, XR], _m = "space", Vf = ["[", "("], np = [...zy, ...Yy, _m, "]"], QR = "-", j_ = "/", ks = QR, Dn = QR, JR = [j_], G_ = 0, $_ = ["=", "+", "num_1", "num_2", "shift+=", "shift+-"], Ky = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"].concat(Lm), ZR = Ky.map((e) => `shift+${e}`), eN = [ks, ip].concat(np, JR), tN = [Ky, ZR, eN].join(","), W_ = [tN, zy, Yy, $_].join(","), q_ = { OUTCOMEKEYS: Lm, SIDE1KEYS: Ky, SIDE2KEYS: ZR, MODIFIERS: eN, PROMPT: V_, MOVEUP: zy, MOVEDOWN: Yy, HOTKEYS: W_ };
8329
+ function No({ scoreString: e, lowSide: t, outcome: r }) {
8330
8330
  if ({ scoreString: e } = rN({ scoreString: e }), t === 2) {
8331
8331
  let i = (e && e[e.length - 1]) !== " " ? " " : "";
8332
8332
  return e + i + r;
@@ -8351,7 +8351,7 @@ function Yh({ analysis: e, scoreString: t, sets: r, lowSide: i }) {
8351
8351
  let { tiebreakSet: l } = e.setFormat, { tiebreakTo: d, NoAD: p } = l || {}, { isTiebreakEntry: m } = jo({ brackets: rs, scoreString: t }), f = z_(t);
8352
8352
  if (f >= 0) {
8353
8353
  n = t.slice(0, f);
8354
- let { isTiebreakEntry: h } = jo({ brackets: Hs, scoreString: n }), { lastOpenBracketIndex: g, isTiebreakEntry: I } = jo({ brackets: rs, scoreString: n }), y = n && n[n.length - 1].trim(), U = n && !isNaN(y), D = e.isIncompleteSetScore;
8354
+ let { isTiebreakEntry: h } = jo({ brackets: zs, scoreString: n }), { lastOpenBracketIndex: g, isTiebreakEntry: I } = jo({ brackets: rs, scoreString: n }), y = n && n[n.length - 1].trim(), U = n && !isNaN(y), D = e.isIncompleteSetScore;
8355
8355
  if (m && I) {
8356
8356
  let v = n.slice(g + 1).split(Dn), w = v?.length > 0 && v[0] !== void 0 && !isNaN(parseInt(v[0])) && parseInt(v[0]) || void 0, S = v?.length > 1 && v[1] !== void 0 && parseInt(v[1]) || void 0, T = [w, S];
8357
8357
  if (S) {
@@ -8382,7 +8382,7 @@ function Yh({ analysis: e, scoreString: t, sets: r, lowSide: i }) {
8382
8382
  }
8383
8383
  return { scoreString: t, sets: r };
8384
8384
  }
8385
- function jo({ brackets: e = Hs, scoreString: t }) {
8385
+ function jo({ brackets: e = zs, scoreString: t }) {
8386
8386
  if (!t) return {};
8387
8387
  let [r, i] = e.split(""), n = t.split(""), a = Math.max(...Ji(r, n)), s = Math.max(...Ji(i, n));
8388
8388
  return { isTiebreakEntry: a > s, lastOpenBracketIndex: a };
@@ -8435,7 +8435,7 @@ function Y_({ analysis: e, scoreString: t, sets: r, value: i }) {
8435
8435
  n = !0, t = (t || "") + i, a.side2Score = i;
8436
8436
  let c = Xy({ analysis: e, set: r[r.length - 1] });
8437
8437
  if (a.winningSide = c || void 0, o) {
8438
- let u = Hs.split("")[0];
8438
+ let u = zs.split("")[0];
8439
8439
  t += u;
8440
8440
  } else e.isDecidingSet || (t += " ");
8441
8441
  }
@@ -8447,7 +8447,7 @@ function K_({ analysis: e, set: t = {}, value: r }) {
8447
8447
  }
8448
8448
  function nN({ lowSide: e, value: t, sets: r, scoreString: i, winningSide: n, matchUpStatus: a }) {
8449
8449
  let s;
8450
- return t === qR ? i ? (s = !0, i = Ro({ scoreString: i, lowSide: e, outcome: "RET" }), n = e === 2 ? 1 : 2, a = $R) : (s = !0, i = Ro({ scoreString: i, lowSide: e, outcome: "DEF" }), n = e === 2 ? 1 : 2, a = zh) : t === YR ? (s = !0, i = Ro({ scoreString: i, lowSide: e, outcome: "DEF" }), n = e === 2 ? 1 : 2, a = zh) : t === KR ? (s = !0, r = [], i = "WO", n = e === 2 ? 1 : 2, a = VR) : t === HR && i ? (s = !0, i = Ro({ scoreString: i, lowSide: e, outcome: "SUS" }), a = GR, n = void 0) : t === zR ? (s = !0, i = Ro({ scoreString: i, lowSide: e, outcome: "ABN" }), a = jR, n = void 0) : t === XR && i && (s = !0, i = Ro({ scoreString: i, lowSide: e, outcome: "INT" }), a = WR, n = void 0), { updated: s, sets: r, scoreString: i, matchUpStatus: a, winningSide: n };
8450
+ return t === qR ? i ? (s = !0, i = No({ scoreString: i, lowSide: e, outcome: "RET" }), n = e === 2 ? 1 : 2, a = $R) : (s = !0, i = No({ scoreString: i, lowSide: e, outcome: "DEF" }), n = e === 2 ? 1 : 2, a = zh) : t === YR ? (s = !0, i = No({ scoreString: i, lowSide: e, outcome: "DEF" }), n = e === 2 ? 1 : 2, a = zh) : t === KR ? (s = !0, r = [], i = "WO", n = e === 2 ? 1 : 2, a = VR) : t === HR && i ? (s = !0, i = No({ scoreString: i, lowSide: e, outcome: "SUS" }), a = GR, n = void 0) : t === zR ? (s = !0, i = No({ scoreString: i, lowSide: e, outcome: "ABN" }), a = jR, n = void 0) : t === XR && i && (s = !0, i = No({ scoreString: i, lowSide: e, outcome: "INT" }), a = WR, n = void 0), { updated: s, sets: r, scoreString: i, matchUpStatus: a, winningSide: n };
8451
8451
  }
8452
8452
  function X_(e) {
8453
8453
  let { sets: t, info: r, scoreString: i, winningSide: n, matchUpStatus: a } = e, { analysis: s, lowSide: o, value: c } = e, u, l;
@@ -8471,7 +8471,7 @@ function X_(e) {
8471
8471
  if (c === _m) {
8472
8472
  let p = t[t.length - 1] || {}, { side1Score: m, side2Score: f } = p, h = m > f && 1 || f > m && 2 || void 0;
8473
8473
  h && !n && !s.isIncompleteSetScore && (t[t.length - 1].winningSide = h, t.push({ setNumber: t.length + 1 }), i += " ", u = !0);
8474
- } else if (c === Os && t[d].side1Score !== void 0 && t[d].side2Score === void 0 && i && s.isNumericEnding) i += "-", t[d].side2Score = 0, a = void 0, n = void 0, u = !0;
8474
+ } else if (c === ks && t[d].side1Score !== void 0 && t[d].side2Score === void 0 && i && s.isNumericEnding) i += "-", t[d].side2Score = 0, a = void 0, n = void 0, u = !0;
8475
8475
  else if (!isNaN(c)) {
8476
8476
  let p;
8477
8477
  if (t[d].side2Score === void 0) {
@@ -8521,7 +8521,7 @@ function J_({ analysis: e, lowSide: t, scoreString: r, value: i }) {
8521
8521
  if (s && i === n || i > n) return { scoreString: r };
8522
8522
  let c = f(), u = [i, c];
8523
8523
  t === 2 && u.reverse();
8524
- let l = Hs.split("")[0], d = u.join(Os) + (o ? l : " ");
8524
+ let l = zs.split("")[0], d = u.join(ks) + (o ? l : " ");
8525
8525
  r = (r || "") + d;
8526
8526
  let p = { side1Score: u[0], side2Score: u[1] }, m = Xy({ analysis: e, set: p });
8527
8527
  return p.winningSide = m || void 0, { scoreString: r, set: p };
@@ -8530,7 +8530,7 @@ function J_({ analysis: e, lowSide: t, scoreString: r, value: i }) {
8530
8530
  }
8531
8531
  }
8532
8532
  function Z_({ matchUpFormat: e, scoreString: t, winningSide: r, value: i, sets: n }) {
8533
- let a = (n?.filter((L) => L?.winningSide)?.length || 0) + (r ? 0 : 1), s = Dr(e), o = a === s?.bestOf, c = o && s?.finalSetFormat || s?.setFormat || {}, u = c?.timed, l = o && n[s?.bestOf - 1], d = l?.winningSide, { isTiebreakEntry: p } = jo({ brackets: Hs, scoreString: t }), { isTiebreakEntry: m } = jo({ brackets: rs, scoreString: t }), f = p || m, h = !!c.tiebreakSet, g = t?.[t.length - 1]?.trim(), I = t && !isNaN(g), y = !f && g === Os, U = p && Vf.includes(g), D = m && Vf.includes(g), v = m && g === Dn, w = t?.split(""), [S] = rs.split(""), T = w && Math.max(...Ji(S, w)), b = w && Math.max(...Ji(Dn, w)), P = w && b > T, M = n[n.length - 1]?.winningSide, R = n?.length && !M, E = BR.find((L) => t?.indexOf(L) >= 0), A = !isNaN(i), N = i === _m, C = np.includes(i), k = t?.split("").find((L) => Vf.includes(L)), O = C && m && !D && (v || !H_({ scoreString: t }));
8533
+ let a = (n?.filter((L) => L?.winningSide)?.length || 0) + (r ? 0 : 1), s = Dr(e), o = a === s?.bestOf, c = o && s?.finalSetFormat || s?.setFormat || {}, u = c?.timed, l = o && n[s?.bestOf - 1], d = l?.winningSide, { isTiebreakEntry: p } = jo({ brackets: zs, scoreString: t }), { isTiebreakEntry: m } = jo({ brackets: rs, scoreString: t }), f = p || m, h = !!c.tiebreakSet, g = t?.[t.length - 1]?.trim(), I = t && !isNaN(g), y = !f && g === ks, U = p && Vf.includes(g), D = m && Vf.includes(g), v = m && g === Dn, w = t?.split(""), [S] = rs.split(""), T = w && Math.max(...Ji(S, w)), b = w && Math.max(...Ji(Dn, w)), P = w && b > T, M = n[n.length - 1]?.winningSide, R = n?.length && !M, E = BR.find((L) => t?.indexOf(L) >= 0), A = !isNaN(i), N = i === _m, C = np.includes(i), k = t?.split("").find((L) => Vf.includes(L)), O = C && m && !D && (v || !H_({ scoreString: t }));
8534
8534
  return { isTiebreakSetValue: h && A, matchUpScoringFormat: s, setNumber: a, setFormat: c, matchTiebreakHasJoiner: P, isGameScoreEntry: R, isSpace: N, isCloser: C, isTiebreakCloser: C && k && f && I, isDecidingSet: o, isTiebreakSet: h, isTimedSet: u, isNumericEnding: I, isNumericValue: A, hasOpener: k, hasOutcome: E, finalSet: l, finalSetIsComplete: d, lastSetIsComplete: M, isInvalidSetTiebreakValue: N && f && U, isInvalidMatchTiebreakValue: O, isTiebreakEntry: f, isSetTiebreakEntry: p, isMatchTiebreakEntry: m, isIncompleteSetScore: y, isIncompleteSetTiebreak: U, isIncompleteMatchTiebreak: D, isPartialMatchTiebreakValue: v };
8535
8535
  }
8536
8536
  function aN(e) {
@@ -8540,7 +8540,7 @@ function aN(e) {
8540
8540
  let { matchUpWinningSide: m } = Mv({ sets: n, winningSide: a, matchUpStatus: s, matchUpFormat: o });
8541
8541
  a = m;
8542
8542
  let f = Z_({ value: r, winningSide: a, scoreString: i, sets: n, matchUpFormat: o });
8543
- if (JR.includes(r) && (r = Os), f.hasOpener && f.isTiebreakEntry && !f.isTiebreakSet && p && pe(r) === 0 && (f.isTiebreakCloser = !0), np.includes(r) && f.hasOpener && (r = ""), np.includes(r) && (r = _m), f.lastSetIsComplete) {
8543
+ if (JR.includes(r) && (r = ks), f.hasOpener && f.isTiebreakEntry && !f.isTiebreakSet && p && pe(r) === 0 && (f.isTiebreakCloser = !0), np.includes(r) && f.hasOpener && (r = ""), np.includes(r) && (r = _m), f.lastSetIsComplete) {
8544
8544
  let h = i?.length && i[i.length - 1];
8545
8545
  i && h !== " " && (i += " ");
8546
8546
  }
@@ -8548,16 +8548,16 @@ function aN(e) {
8548
8548
  else if (Lm.includes(r)) f.finalSetIsComplete || a ? d = "final set is already complete" : !f.isTiebreakEntry && !f.isIncompleteSetScore ? { sets: n, scoreString: i, matchUpStatus: s, winningSide: a, updated: l } = nN({ lowSide: t, sets: n, scoreString: i, matchUpStatus: s, winningSide: a, value: r }) : f.isTiebreakEntry || f.isIncompleteSetScore ? d = "incomplete set scoreString or tiebreak entry" : console.log("handle case", { value: r });
8549
8549
  else if (r === ip) l = !0, { scoreString: i, sets: n } = Yh({ analysis: f, scoreString: i, sets: n, lowSide: t }), i || (n = []), s = void 0, a = void 0;
8550
8550
  else if (f.hasOutcome) d = "has outcome";
8551
- else if (r === Os && !f.isMatchTiebreakEntry) (!f.isSetTiebreakEntry || f.isSetTiebreakEntry && !f.isNumericEnding) && (l = !0, { scoreString: i, sets: n } = Yh({ analysis: f, scoreString: i, sets: n, lowSide: t }), s = void 0);
8551
+ else if (r === ks && !f.isMatchTiebreakEntry) (!f.isSetTiebreakEntry || f.isSetTiebreakEntry && !f.isNumericEnding) && (l = !0, { scoreString: i, sets: n } = Yh({ analysis: f, scoreString: i, sets: n, lowSide: t }), s = void 0);
8552
8552
  else if (r === Dn && f.isMatchTiebreakEntry && !f.isSetTiebreakEntry) f.matchTiebreakHasJoiner ? d = "existing joiner" : f.isNumericEnding && (l = !0, i += Dn);
8553
- else if ([Os, Dn].includes(r)) d = "invalid location for joiner";
8553
+ else if ([ks, Dn].includes(r)) d = "invalid location for joiner";
8554
8554
  else {
8555
8555
  if (a) return { updated: !1, info: "matchUp is complete" };
8556
8556
  if (f.isIncompleteSetScore) f.isNumericValue && ({ sets: n, scoreString: i, updated: l } = Y_({ analysis: f, scoreString: i, sets: n, value: r }));
8557
8557
  else if (f.isInvalidMatchTiebreakValue) d = "invalid matchUp tiebreak character";
8558
8558
  else if (f.isInvalidSetTiebreakValue) d = "invalid set tiebreak character";
8559
8559
  else if (f.isTiebreakCloser) {
8560
- let h = f.isSetTiebreakEntry ? Hs : rs, g = h.split("").reverse()[0], I = h.split("")[0], y = n[n.length - 1], { tiebreakFormat: U } = f.setFormat, { tiebreakTo: D, NoAD: v } = U || {}, w = Vm({ set: y });
8560
+ let h = f.isSetTiebreakEntry ? zs : rs, g = h.split("").reverse()[0], I = h.split("")[0], y = n[n.length - 1], { tiebreakFormat: U } = f.setFormat, { tiebreakTo: D, NoAD: v } = U || {}, w = Vm({ set: y });
8561
8561
  if (!f.isTiebreakSet) {
8562
8562
  let T = parseInt(i.split(I).reverse()[0]), b = iN({ lowValue: T, tiebreakTo: D, NoAD: v });
8563
8563
  w === 1 ? (y.side1TiebreakScore = b, y.side2TiebreakScore = T) : (y.side1TiebreakScore = T, y.side2TiebreakScore = b);
@@ -8567,7 +8567,7 @@ function aN(e) {
8567
8567
  y.winningSide = S || void 0, l = !0;
8568
8568
  } else if (f.isTiebreakSetValue) ({ info: d, scoreString: i, sets: n, updated: l } = Q_({ analysis: f, auto: u, lowSide: t, scoreString: i, sets: n, value: r }));
8569
8569
  else if (f.isSetTiebreakEntry) {
8570
- let [h] = Hs.split(""), g = Math.max(...Ji(h, i.split(""))), I = i.slice(g + 1), y = I && pe(I) === G_, U = pe(I ? I + r : r), { tiebreakFormat: D } = f.setFormat, { tiebreakTo: v, NoAD: w } = D || {};
8570
+ let [h] = zs.split(""), g = Math.max(...Ji(h, i.split(""))), I = i.slice(g + 1), y = I && pe(I) === G_, U = pe(I ? I + r : r), { tiebreakFormat: D } = f.setFormat, { tiebreakTo: v, NoAD: w } = D || {};
8571
8571
  !y && I.length < 2 ? w && U > v - 1 ? d = "invalid low value for NoAD tiebreak" : (l = !0, i = (i || "") + r) : d = y ? "tiebreak begins with zero" : "tiebreak digit limit";
8572
8572
  } else if (f.isCloser) d = `invalid key: ${r}`;
8573
8573
  else if (f.isGameScoreEntry) d = "game scoreString entry";
@@ -9501,7 +9501,7 @@ function VB(e) {
9501
9501
  return a;
9502
9502
  }
9503
9503
  function Ev({ scaleType: e = pa, scaleAccessor: t, participant: r, scaleName: i, eventType: n }) {
9504
- let a = (r && vn({ scaleAttributes: { eventType: n ?? _s, scaleType: e, scaleName: i }, participant: r }))?.scaleItem?.scaleValue;
9504
+ let a = (r && vn({ scaleAttributes: { eventType: n ?? Bs, scaleType: e, scaleName: i }, participant: r }))?.scaleItem?.scaleValue;
9505
9505
  return t && Ce(a) ? a[t] : a;
9506
9506
  }
9507
9507
  function rU(e) {
@@ -9523,13 +9523,13 @@ function rU(e) {
9523
9523
  function jB(e) {
9524
9524
  if (e.structureId) return e.structureId;
9525
9525
  let t = e.drawDefinition, r = t?.structures?.filter((n) => n.stageSequence === 1)?.reduce((n, a) => {
9526
- let s = a.stage && Bs[a.stage];
9527
- return Rr({ structure: a }) && s > (Bs[n?.stage] || 1) ? a : n;
9526
+ let s = a.stage && Vs[a.stage];
9527
+ return Rr({ structure: a }) && s > (Vs[n?.stage] || 1) ? a : n;
9528
9528
  }, void 0), i = t?.structures?.find((n) => n.structureId === r?.structureId);
9529
- return i ? Rr({ structure: i }) ? { structure: i } : { error: Ms } : { error: lt };
9529
+ return i ? Rr({ structure: i }) ? { structure: i } : { error: Rs } : { error: lt };
9530
9530
  }
9531
9531
  function GB(e) {
9532
- return e.roundsCount && typeof e.roundsCount != "number" ? { error: z, info: "roundsCount must be a number" } : typeof e.drawDefinition != "object" || e.drawDefinition.drawType && e.drawDefinition.drawType !== zr ? { error: Ms } : !Array.isArray(e.drawDefinition?.entries) && e.participantIds && !Array.isArray(e.participantIds) ? { error: z, info: "Missing Entries" } : { error: void 0 };
9532
+ return e.roundsCount && typeof e.roundsCount != "number" ? { error: z, info: "roundsCount must be a number" } : typeof e.drawDefinition != "object" || e.drawDefinition.drawType && e.drawDefinition.drawType !== zr ? { error: Rs } : !Array.isArray(e.drawDefinition?.entries) && e.participantIds && !Array.isArray(e.participantIds) ? { error: z, info: "Missing Entries" } : { error: void 0 };
9533
9533
  }
9534
9534
  function $B(e) {
9535
9535
  let { tournamentRecord: t, drawDefinition: r, structureId: i, idPrefix: n, isMock: a, event: s } = e, o = s?.entries?.filter(({ entryStage: l, entryStatus: d }) => (!l || l === re) && d && Fi.includes(d)), c = o?.map(Pe), u = o ? Math.floor(o.length / 2) : 0;
@@ -9559,7 +9559,7 @@ function qB({ requireParticipantCount: e = !0, enforcePolicyLimits: t = !0, draw
9559
9559
  return { participantId: void 0, seedNumber: y, seedValue: v };
9560
9560
  }), Je({ drawDefinition: s, structureIds: [c] }), { ...x, seedLimit: u };
9561
9561
  }
9562
- function vo({ sortDescending: e = !1, tournamentRecord: t, scaleAttributes: r, scaleSortMethod: i, stageSequence: n, entries: a, event: s, stage: o }) {
9562
+ function wo({ sortDescending: e = !1, tournamentRecord: t, scaleAttributes: r, scaleSortMethod: i, stageSequence: n, entries: a, event: s, stage: o }) {
9563
9563
  if (!t) return { error: J };
9564
9564
  return a = a ?? s?.entries ?? [], { scaledEntries: a.filter((l) => (!o || !l.entryStage || l.entryStage === o) && (!n || !l.entryStageSequence || l.entryStageSequence === n) && Fi.includes(l.entryStatus)).map((l) => {
9565
9565
  let { participantId: d } = l, { scaleItem: p } = ac({ tournamentRecord: t, scaleAttributes: r, participantId: d });
@@ -9600,7 +9600,7 @@ function YB(e) {
9600
9600
  t ? KB({ ...e, enteredParticipantIds: a }) : (n || r) && XB({ ...e, enteredParticipantIds: a });
9601
9601
  }
9602
9602
  function KB(e) {
9603
- let { provisionalPositioning: t, enteredParticipantIds: r, seededParticipants: i, tournamentRecord: n, appliedPolicies: a, drawDefinition: s, seedingProfile: o, structureId: c, structure: u, event: l } = e, d = u ? Io({ provisionalPositioning: t, appliedPolicies: a, drawDefinition: s, seedingProfile: o, structure: u }) : void 0;
9603
+ let { provisionalPositioning: t, enteredParticipantIds: r, seededParticipants: i, tournamentRecord: n, appliedPolicies: a, drawDefinition: s, seedingProfile: o, structureId: c, structure: u, event: l } = e, d = u ? yo({ provisionalPositioning: t, appliedPolicies: a, drawDefinition: s, seedingProfile: o, structure: u }) : void 0;
9604
9604
  i.filter(({ participantId: p }) => r.includes(p)).filter((p) => !p.seedNumber || p.seedNumber <= i.length).sort((p, m) => p.seedNumber < m.seedNumber ? -1 : p.seedNumber < m.seedNumber ? 1 : 0).forEach((p) => {
9605
9605
  let { participantId: m, seedNumber: f, seedValue: h } = p;
9606
9606
  Cc({ provisionalPositioning: t, tournamentRecord: n, drawDefinition: s, seedingProfile: o, participantId: m, seedBlockInfo: d, structureId: c, seedNumber: f, seedValue: h, event: l });
@@ -9617,11 +9617,11 @@ function XB(e) {
9617
9617
  }
9618
9618
  function QB(e) {
9619
9619
  let { tournamentRecord: t, seedingScaleName: r, stageSequence: i, entries: n, stage: a, event: s } = e, { categoryName: o, ageCategoryCode: c } = s?.category || {}, u = s?.eventType, l = { scaleName: r || o || c || s.eventId, scaleType: Un, eventType: u };
9620
- return vo({ scaleAttributes: l, tournamentRecord: t, stageSequence: i, entries: n, stage: a }).scaledEntries;
9620
+ return wo({ scaleAttributes: l, tournamentRecord: t, stageSequence: i, entries: n, stage: a }).scaledEntries;
9621
9621
  }
9622
9622
  function JB(e) {
9623
9623
  let { tournamentRecord: t, stageSequence: r, event: i, entries: n, stage: a } = e, { categoryName: s, ageCategoryCode: o } = i?.category || {}, c = i?.eventType;
9624
- return vo({ scaleAttributes: { scaleName: s || o, scaleType: ga, eventType: c }, tournamentRecord: t, stageSequence: r, entries: n, stage: a }).scaledEntries;
9624
+ return wo({ scaleAttributes: { scaleName: s || o, scaleType: ga, eventType: c }, tournamentRecord: t, stageSequence: r, entries: n, stage: a }).scaledEntries;
9625
9625
  }
9626
9626
  function ZB(e) {
9627
9627
  let { seedsCount: t } = e;
@@ -9776,7 +9776,7 @@ function dV(e) {
9776
9776
  return { qualifyingConflicts: h, error: void 0 };
9777
9777
  }
9778
9778
  var yN = {};
9779
- Te(yN, { addGoesTo: () => Ja, allCompetitionMatchUps: () => Hi, allDrawMatchUps: () => Ur, allEventMatchUps: () => _n, allPlayoffPositionsFilled: () => my, allTournamentMatchUps: () => Qt, analyzeDraws: () => Wl, analyzeMatchUp: () => Vu, analyzeTournament: () => mU, bulkUpdatePublishedEventIds: () => hU, calculateWinCriteria: () => Do, categoryCanContain: () => il, checkMatchUpIsComplete: () => Ga, checkValidEntries: () => xm, compareTieFormats: () => Zn, competitionScheduleMatchUps: () => Jl, courtGridRows: () => tf, credits: () => pV, drawMatchUps: () => NU, eventMatchUps: () => af, filterMatchUps: () => jn, filterParticipants: () => Al, findDrawDefinition: () => Ly, findExtension: () => De, findVenue: () => Ln, getAggregateTeamResults: () => pU, getAllDrawMatchUps: () => Rt, getAllEventData: () => gU, getAllStructureMatchUps: () => _e, getAllowedDrawTypes: () => Wm, getAllowedMatchUpFormats: () => uU, getAppliedPolicies: () => xe, getAssignedParticipantIds: () => gs, getAvailableMatchUpsCount: () => Om, getAvailablePlayoffProfiles: () => Bl, getCategoryAgeDetails: () => Ls, getCheckedInParticipantIds: () => lo, getCompetitionDateRange: () => Hm, getCompetitionMatchUps: () => Bu, getCompetitionParticipants: () => nU, getCompetitionPenalties: () => lU, getCompetitionVenues: () => Yl, getCourtInfo: () => gm, getCourts: () => EU, getDrawData: () => Km, getDrawDefinitionTimeItem: () => kI, getDrawParticipantRepresentativeIds: () => xy, getDrawStructures: () => Ci, getDrawTypeCoercion: () => ql, getEligibleVoluntaryConsolationParticipants: () => ky, getEntriesAndSeedsCount: () => rf, getEvent: () => OU, getEventData: () => Xm, getEventMatchUpFormatTiming: () => SU, getEventProperties: () => AU, getEventPublishStatus: () => Ui, getEventStructures: () => Tm, getEventTimeItem: () => fl, getEvents: () => CU, getFlightProfile: () => wt, getHomeParticipantId: () => TU, getLinkedTournamentIds: () => dl, getMatchUpCompetitiveProfile: () => Dl, getMatchUpContextIds: () => PU, getMatchUpDailyLimits: () => of, getMatchUpDailyLimitsUpdate: () => vU, getMatchUpDependencies: () => Li, getMatchUpFormat: () => bU, getMatchUpFormatTiming: () => Tl, getMatchUpFormatTimingUpdate: () => UU, getMatchUpScheduleDetails: () => Im, getMatchUpType: () => ym, getMatchUpsMap: () => er, getMatchUpsStats: () => MU, getMatchUpsToSchedule: () => Qm, getMaxEntryPosition: () => yU, getModifiedMatchUpFormatTiming: () => nf, getPairedParticipant: () => Oi, getParticipantEventDetails: () => aU, getParticipantIdFinishingPositions: () => Fy, getParticipantMembership: () => sU, getParticipantResults: () => Vl, getParticipantScaleItem: () => ac, getParticipantSchedules: () => oU, getParticipantSignInStatus: () => cU, getParticipantTimeItem: () => xI, getParticipants: () => pt, getPersonRequests: () => Us, getPolicyDefinitions: () => ia, getPositionAssignments: () => Fu, getPositionsPlayedOff: () => kc, getPredictiveAccuracy: () => DU, getProfileRounds: () => ef, getPublishState: () => ho, getRandomQualifierList: () => Vy, getRoundMatchUps: () => vr, getRounds: () => RU, getScaleValues: () => Dc, getScaledEntries: () => vo, getScheduledRoundsDetails: () => Kl, getSchedulingProfile: () => oa, getSchedulingProfileIssues: () => IU, getSeedingThresholds: () => oy, getSeedsCount: () => Hl, getStructureSeedAssignments: () => mi, getTeamLineUp: () => Qa, getTieFormat: () => Ym, getTimeItem: () => gi, getTournamentIds: () => ul, getTournamentInfo: () => wo, getTournamentPenalties: () => qm, getTournamentPersons: () => dU, getTournamentPoints: () => zm, getTournamentPublishStatus: () => El, getTournamentStructures: () => py, getTournamentTimeItem: () => dm, getValidGroupSizes: () => kl, getVenueData: () => ic, getVenuesAndCourts: () => sa, isAdHoc: () => Rr, isCompletedStructure: () => kn, isValidForQualifying: () => jy, isValidMatchUpFormat: () => qr, matchUpActions: () => km, participantScaleItem: () => vn, participantScheduledMatchUps: () => wU, positionActions: () => By, publicFindCourt: () => HI, publicFindVenue: () => qI, tallyParticipantResults: () => xc, tieFormatGenderValidityCheck: () => jp, tournamentMatchUps: () => sf, validMatchUp: () => pm, validMatchUps: () => yi, validateCollectionDefinition: () => nl, validateLineUp: () => Dm });
9779
+ Te(yN, { addGoesTo: () => Ja, allCompetitionMatchUps: () => Hi, allDrawMatchUps: () => Ur, allEventMatchUps: () => _n, allPlayoffPositionsFilled: () => my, allTournamentMatchUps: () => Qt, analyzeDraws: () => Wl, analyzeMatchUp: () => Vu, analyzeTournament: () => mU, bulkUpdatePublishedEventIds: () => hU, calculateWinCriteria: () => To, categoryCanContain: () => il, checkMatchUpIsComplete: () => Ga, checkValidEntries: () => xm, compareTieFormats: () => Zn, competitionScheduleMatchUps: () => Jl, courtGridRows: () => tf, credits: () => pV, drawMatchUps: () => NU, eventMatchUps: () => af, filterMatchUps: () => jn, filterParticipants: () => Al, findDrawDefinition: () => Ly, findExtension: () => De, findVenue: () => Ln, getAggregateTeamResults: () => pU, getAllDrawMatchUps: () => Rt, getAllEventData: () => gU, getAllStructureMatchUps: () => _e, getAllowedDrawTypes: () => Wm, getAllowedMatchUpFormats: () => uU, getAppliedPolicies: () => xe, getAssignedParticipantIds: () => gs, getAvailableMatchUpsCount: () => Om, getAvailablePlayoffProfiles: () => Bl, getCategoryAgeDetails: () => _s, getCheckedInParticipantIds: () => po, getCompetitionDateRange: () => Hm, getCompetitionMatchUps: () => Bu, getCompetitionParticipants: () => nU, getCompetitionPenalties: () => lU, getCompetitionVenues: () => Yl, getCourtInfo: () => gm, getCourts: () => EU, getDrawData: () => Km, getDrawDefinitionTimeItem: () => kI, getDrawParticipantRepresentativeIds: () => xy, getDrawStructures: () => Ci, getDrawTypeCoercion: () => ql, getEligibleVoluntaryConsolationParticipants: () => ky, getEntriesAndSeedsCount: () => rf, getEvent: () => OU, getEventData: () => Xm, getEventMatchUpFormatTiming: () => SU, getEventProperties: () => AU, getEventPublishStatus: () => Ui, getEventStructures: () => Tm, getEventTimeItem: () => fl, getEvents: () => CU, getFlightProfile: () => wt, getHomeParticipantId: () => TU, getLinkedTournamentIds: () => dl, getMatchUpCompetitiveProfile: () => Dl, getMatchUpContextIds: () => PU, getMatchUpDailyLimits: () => of, getMatchUpDailyLimitsUpdate: () => vU, getMatchUpDependencies: () => Li, getMatchUpFormat: () => bU, getMatchUpFormatTiming: () => Tl, getMatchUpFormatTimingUpdate: () => UU, getMatchUpScheduleDetails: () => Im, getMatchUpType: () => ym, getMatchUpsMap: () => er, getMatchUpsStats: () => MU, getMatchUpsToSchedule: () => Qm, getMaxEntryPosition: () => yU, getModifiedMatchUpFormatTiming: () => nf, getPairedParticipant: () => Oi, getParticipantEventDetails: () => aU, getParticipantIdFinishingPositions: () => Fy, getParticipantMembership: () => sU, getParticipantResults: () => Vl, getParticipantScaleItem: () => ac, getParticipantSchedules: () => oU, getParticipantSignInStatus: () => cU, getParticipantTimeItem: () => xI, getParticipants: () => pt, getPersonRequests: () => Us, getPolicyDefinitions: () => ia, getPositionAssignments: () => Fu, getPositionsPlayedOff: () => kc, getPredictiveAccuracy: () => DU, getProfileRounds: () => ef, getPublishState: () => go, getRandomQualifierList: () => Vy, getRoundMatchUps: () => vr, getRounds: () => RU, getScaleValues: () => Dc, getScaledEntries: () => wo, getScheduledRoundsDetails: () => Kl, getSchedulingProfile: () => oa, getSchedulingProfileIssues: () => IU, getSeedingThresholds: () => oy, getSeedsCount: () => Hl, getStructureSeedAssignments: () => mi, getTeamLineUp: () => Qa, getTieFormat: () => Ym, getTimeItem: () => gi, getTournamentIds: () => ul, getTournamentInfo: () => Do, getTournamentPenalties: () => qm, getTournamentPersons: () => dU, getTournamentPoints: () => zm, getTournamentPublishStatus: () => El, getTournamentStructures: () => py, getTournamentTimeItem: () => dm, getValidGroupSizes: () => kl, getVenueData: () => ic, getVenuesAndCourts: () => sa, isAdHoc: () => Rr, isCompletedStructure: () => kn, isValidForQualifying: () => jy, isValidMatchUpFormat: () => qr, matchUpActions: () => km, participantScaleItem: () => vn, participantScheduledMatchUps: () => wU, positionActions: () => By, publicFindCourt: () => HI, publicFindVenue: () => qI, tallyParticipantResults: () => xc, tieFormatGenderValidityCheck: () => jp, tournamentMatchUps: () => sf, validMatchUp: () => pm, validMatchUps: () => yi, validateCollectionDefinition: () => nl, validateLineUp: () => Dm });
9780
9780
  function pV() {
9781
9781
  return `
9782
9782
  This project would not have been possible without the generous input and patience
@@ -9861,7 +9861,7 @@ function cU({ tournamentRecord: e, participantId: t }) {
9861
9861
  return i && i.itemValue === Eu && Eu;
9862
9862
  }
9863
9863
  var SN = {};
9864
- Te(SN, { analyzeDraws: () => Wl, analyzeTournament: () => mU, getAggregateTeamResults: () => pU, getAllowedDrawTypes: () => Wm, getAllowedMatchUpFormats: () => uU, getAppliedPolicies: () => xe, getCompetitionDateRange: () => Hm, getCompetitionPenalties: () => lU, getPolicyDefinitions: () => ia, getTournamentInfo: () => wo, getTournamentPenalties: () => qm, getTournamentPersons: () => dU, getTournamentPoints: () => zm, getTournamentStructures: () => py, getTournamentTimeItem: () => dm });
9864
+ Te(SN, { analyzeDraws: () => Wl, analyzeTournament: () => mU, getAggregateTeamResults: () => pU, getAllowedDrawTypes: () => Wm, getAllowedMatchUpFormats: () => uU, getAppliedPolicies: () => xe, getCompetitionDateRange: () => Hm, getCompetitionPenalties: () => lU, getPolicyDefinitions: () => ia, getTournamentInfo: () => Do, getTournamentPenalties: () => qm, getTournamentPersons: () => dU, getTournamentPoints: () => zm, getTournamentStructures: () => py, getTournamentTimeItem: () => dm });
9865
9865
  function uU({ tournamentRecord: e, categoryName: t, categoryType: r }) {
9866
9866
  if (!e) return { error: J };
9867
9867
  let { appliedPolicies: i } = xe({ tournamentRecord: e });
@@ -9896,12 +9896,12 @@ function vN({ event: e }) {
9896
9896
  return { eventInfo: (({ eventId: t, eventName: r, eventType: i, eventLevel: n, surfaceCategory: a, matchUpFormat: s, category: o, gender: c, startDate: u, endDate: l, ballType: d, discipline: p, onlineResources: m, notes: f }) => ({ eventId: t, eventName: r, eventType: i, eventLevel: n, surfaceCategory: a, matchUpFormat: s, category: o, gender: c, startDate: u, endDate: l, ballType: d, discipline: p, onlineResources: m, notes: f }))(e) };
9897
9897
  }
9898
9898
  var mV = { [Tc]: { policyName: "Staff Privacy Policy", participant: { contacts: !1, individualParticipants: !1, individualParticipantIds: !1, onlineResources: !1, participantName: !0, participantOtherName: !0, participantId: !0, participantRole: !0, participantRoleResponsibilities: !0, participantStatus: !0, penalties: !1, representing: !0, participantType: !0, person: { addresses: !1, biographicalInformation: !1, birthDate: !1, contacts: !1, nationalityCode: !0, nativeFamilyName: !1, nativeGivenName: !1, onlineResources: !1, otherNames: !0, parentOrganisationId: !1, passportFamilyName: !1, passportGivenName: !1, personId: !1, personOtherIds: !1, previousNames: !1, sex: !1, standardFamilyName: !0, standardGivenName: !0, status: !1, tennisId: !1, wheelchair: !0 } } } }, fV = mV;
9899
- function wo(e) {
9899
+ function Do(e) {
9900
9900
  let { tournamentRecord: t } = e ?? {};
9901
9901
  if (!t) return { error: J };
9902
9902
  let r = (({ tournamentId: o, tournamentRank: c, tournamentStatus: u, formalName: l, tournamentName: d, promotionalName: p, onlineResources: m, localTimeZone: f, activeDates: h, startDate: g, endDate: I, hostCountryCode: y, venues: U, notes: D, updatedAt: v }) => ({ tournamentId: o, tournamentRank: c, tournamentStatus: u, formalName: l, tournamentName: d, promotionalName: p, onlineResources: m, localTimeZone: f, activeDates: h, startDate: g, endDate: I, hostCountryCode: y, venues: U, notes: D, updatedAt: v }))(t), i = pt({ participantFilters: { participantRoles: [Lb, ZI, _b, Bb, jb] }, policyDefinitions: fV, tournamentRecord: t })?.participants ?? [];
9903
9903
  i && (r.tournamentContacts = i);
9904
- let n = ho({ tournamentRecord: t })?.publishState, a = n?.tournament?.status?.publishedEventIds || [], s = [];
9904
+ let n = go({ tournamentRecord: t })?.publishState, a = n?.tournament?.status?.publishedEventIds || [], s = [];
9905
9905
  for (let o of t.events ?? []) if (!e?.usePublishState || a.includes(o.eventId)) {
9906
9906
  let c = vN({ event: o }).eventInfo;
9907
9907
  c && s.push(c);
@@ -9911,7 +9911,7 @@ function wo(e) {
9911
9911
  function Hm({ tournamentRecords: e }) {
9912
9912
  if (!Ce(e)) return { error: mt };
9913
9913
  let t = Object.keys(e ?? {}).reduce((n, a) => {
9914
- let s = e[a], { tournamentInfo: { startDate: o, endDate: c } } = wo({ tournamentRecord: s }), u = o && new Date(ve(o));
9914
+ let s = e[a], { tournamentInfo: { startDate: o, endDate: c } } = Do({ tournamentRecord: s }), u = o && new Date(ve(o));
9915
9915
  (!n.startDate || u && u < n.startDate) && (n.startDate = u);
9916
9916
  let l = c && new Date(ve(c));
9917
9917
  return (!n.endDate || l && l > n.endDate) && (n.endDate = l), n;
@@ -10151,7 +10151,7 @@ function Ym({ tournamentRecord: e, drawDefinition: t, structureId: r, matchUpId:
10151
10151
  return { ...x, matchUp: c?.matchUp, structureDefaultTieFormat: tr(u), eventDefaultTieFormat: tr(d), drawDefaultTieFormat: tr(l), tieFormat: tr(p), structure: n };
10152
10152
  }
10153
10153
  var PN = {};
10154
- Te(PN, { bulkUpdatePublishedEventIds: () => hU, getAllEventData: () => gU, getCourtInfo: () => gm, getDrawData: () => Km, getEventData: () => Xm, getEventPublishStatus: () => Ui, getPublishState: () => ho, getTournamentPublishStatus: () => El, getVenueData: () => ic });
10154
+ Te(PN, { bulkUpdatePublishedEventIds: () => hU, getAllEventData: () => gU, getCourtInfo: () => gm, getDrawData: () => Km, getEventData: () => Xm, getEventPublishStatus: () => Ui, getPublishState: () => go, getTournamentPublishStatus: () => El, getVenueData: () => ic });
10155
10155
  function hU({ tournamentRecord: e, outcomes: t }) {
10156
10156
  if (!e) return { error: J };
10157
10157
  if (!t?.length) return { error: ce, info: "Missing outcomes" };
@@ -10236,7 +10236,7 @@ function Yl({ tournamentRecords: e, requireCourts: t, dates: r }) {
10236
10236
  }
10237
10237
  function gU({ tournamentRecord: e, policyDefinitions: t }) {
10238
10238
  if (!e) return { error: J };
10239
- let r = e.events || [], i = e?.participants || [], { tournamentInfo: n } = wo({ tournamentRecord: e }), { venues: a } = sa({ tournamentRecord: e }), s = r.map((o) => {
10239
+ let r = e.events || [], i = e?.participants || [], { tournamentInfo: n } = Do({ tournamentRecord: e }), { venues: a } = sa({ tournamentRecord: e }), s = r.map((o) => {
10240
10240
  let { eventId: c } = o, u = vN({ event: o }).eventInfo, l = hl({ tournamentRecord: e, event: o }).scheduleTiming, d = (o.drawDefinitions || []).map((m) => {
10241
10241
  let f = (({ drawId: U, drawName: D, matchUpFormat: v, updatedAt: w }) => ({ matchUpFormat: v, updatedAt: w, drawName: D, drawId: U }))(m), { abandonedMatchUps: h, completedMatchUps: g, upcomingMatchUps: I, pendingMatchUps: y } = Nc({ requireParticipants: !0, tournamentParticipants: i, context: { eventId: c }, policyDefinitions: t, tournamentRecord: e, inContext: !0, scheduleTiming: l, drawDefinition: m, event: o });
10242
10242
  return { drawInfo: f, matchUps: { abandonedMatchUps: h, completedMatchUps: g, upcomingMatchUps: I, pendingMatchUps: y } };
@@ -10256,11 +10256,11 @@ function Km(e) {
10256
10256
  g.display = De({ element: d, name: qd }).extension?.value;
10257
10257
  let I = {}, y, U, { allStructuresLinked: D, sourceStructureIds: v, hasDrawFeedProfile: w, structureGroups: S } = Pm({ drawDefinition: d });
10258
10258
  if (!D) return { error: dD };
10259
- let T = e?.eventPublishState ?? ho({ event: h }).publishState, b = e?.publishStatus ?? Ui({ event: h, status: o }), P = T?.status?.drawDetails?.[d.drawId], M = !!T?.status?.published, R = P?.structureDetails, E = !1, A = !1, N = S.map((C) => {
10259
+ let T = e?.eventPublishState ?? go({ event: h }).publishState, b = e?.publishStatus ?? Ui({ event: h, status: o }), P = T?.status?.drawDetails?.[d.drawId], M = !!T?.status?.published, R = P?.structureDetails, E = !1, A = !1, N = S.map((C) => {
10260
10260
  let k = {}, O = C.map((L) => {
10261
10261
  let { structure: _ } = me({ drawDefinition: d, structureId: L }), { seedAssignments: B } = mi({ drawDefinition: d, structure: _ });
10262
10262
  return _?.stage === re && _.stageSequence === 1 && (y = B), _?.stage === oe && (I[_.stageSequence ?? 0] = B), _;
10263
- }).sort((L, _) => ao(L, _, m)).map((L) => {
10263
+ }).sort((L, _) => so(L, _, m)).map((L) => {
10264
10264
  if (!L) return;
10265
10265
  let _ = L?.structureId, B = [];
10266
10266
  L.stage && [re, sr, yt].includes(L.stage) && (B = y), L?.stage === oe && (B = I[L.stageSequence ?? 0]);
@@ -10294,7 +10294,7 @@ function Xm(e) {
10294
10294
  if (c.error) return c;
10295
10295
  let u = ie(e.tournamentRecord, !1, !0), l = e.event ? void 0 : Nr({ tournamentRecord: u, eventId: e.eventId }).event, d = e.event ? ie(e.event, !1, !0) : l && ie(l, !1, !0) || void 0;
10296
10296
  if (!d) return { error: li };
10297
- let { eventId: p } = d, { tournamentId: m, endDate: f } = u, h = Ui({ event: d, status: a }), g = ho({ event: d }).publishState ?? {}, I = !!g?.status?.published, { participants: y } = pt({ withEvents: !1, withDraws: !1, policyDefinitions: i, ...r, tournamentRecord: u }), U = ({ stage: E, drawId: A }) => {
10297
+ let { eventId: p } = d, { tournamentId: m, endDate: f } = u, h = Ui({ event: d, status: a }), g = go({ event: d }).publishState ?? {}, I = !!g?.status?.published, { participants: y } = pt({ withEvents: !1, withDraws: !1, policyDefinitions: i, ...r, tournamentRecord: u }), U = ({ stage: E, drawId: A }) => {
10298
10298
  if (!n) return !0;
10299
10299
  let N = h?.drawDetails?.[A]?.stageDetails;
10300
10300
  return !N || !Object.keys(N).length ? !0 : N[E]?.published;
@@ -10316,7 +10316,7 @@ function Xm(e) {
10316
10316
  return { ...A, structures: N };
10317
10317
  }).filter((E) => E.structures?.length) : void 0, b = (Array.isArray(u.venues) ? u.venues : []).map((E) => (({ venueData: A }) => ({ ...A }))(ic({ venueId: E.venueId, tournamentRecord: u }))), P = (({ eventId: E, eventName: A, eventType: N, eventLevel: C, surfaceCategory: k, matchUpFormat: O, category: L, gender: _, startDate: B, endDate: G, ballType: $, discipline: j }) => ({ eventId: E, eventName: A, eventType: N, eventLevel: C, surfaceCategory: k, matchUpFormat: O, category: L, gender: _, startDate: B, endDate: G, ballType: $, discipline: j }))(d);
10318
10318
  P.display = De({ element: d, name: qd }).extension?.value;
10319
- let { tournamentInfo: M } = wo({ tournamentRecord: u }), R = { tournamentInfo: M, venuesData: b, eventInfo: P, drawsData: T };
10319
+ let { tournamentInfo: M } = Do({ tournamentRecord: u }), R = { tournamentInfo: M, venuesData: b, eventInfo: P, drawsData: T };
10320
10320
  return R.eventInfo.publishState = g, R.eventInfo.published = g?.status?.published, { ...x, eventData: R, participants: y };
10321
10321
  }
10322
10322
  var EN = {};
@@ -10365,7 +10365,7 @@ function Kl(e) {
10365
10365
  return { scheduledRoundsDetails: o.flatMap((f) => {
10366
10366
  let h = f.periodLength || i, g = [];
10367
10367
  c?.[f.structureId] ? g.push(...c[f.structureId]) : g.push(f.structureId);
10368
- let I = u ? jn({ tournamentIds: [f.tournamentId], roundNumbers: [f.roundNumber], matchUpIds: f.matchUpIds, eventIds: [f.eventId], drawIds: [f.drawId], processContext: !0, structureIds: g, matchUps: u }).sort(fo) : [], { segmentNumber: y, segmentsCount: U } = f.roundSegment || {};
10368
+ let I = u ? jn({ tournamentIds: [f.tournamentId], roundNumbers: [f.roundNumber], matchUpIds: f.matchUpIds, eventIds: [f.eventId], drawIds: [f.drawId], processContext: !0, structureIds: g, matchUps: u }).sort(ho) : [], { segmentNumber: y, segmentsCount: U } = f.roundSegment || {};
10369
10369
  if (Ie(y) && $i(I?.length) && $i(U) && y > 0 && y <= U && U < I?.length && !f.matchUpIds?.length) {
10370
10370
  let S = I.length / U, T = S * (y - 1);
10371
10371
  I = I.slice(T, T + S);
@@ -10423,7 +10423,7 @@ function Zm({ tournamentRecords: e, schedulingProfile: t }) {
10423
10423
  D || (a = "Invalid rounds");
10424
10424
  let { segmentNumber: v, segmentsCount: w } = f || {}, S = !f || Ie(v) && $i(w) && v <= w;
10425
10425
  return S || (a = "Invalid segment"), D && S;
10426
- }) : (n = Js, !1) : (a = "rounds should be an array", !1);
10426
+ }) : (n = Zs, !1) : (a = "rounds should be an array", !1);
10427
10427
  }) : !1;
10428
10428
  });
10429
10429
  return !s && !n && (n = z), { valid: !!s, error: n, info: a };
@@ -10461,7 +10461,7 @@ function vV(e) {
10461
10461
  }
10462
10462
  function oa({ tournamentRecords: e, tournamentRecord: t }) {
10463
10463
  if (typeof e != "object" || !Object.keys(e).length) return { error: mt };
10464
- let { extension: r } = De({ element: t, name: Gs, tournamentRecords: e, discover: !0 }), i = r?.value || [];
10464
+ let { extension: r } = De({ element: t, name: $s, tournamentRecords: e, discover: !0 }), i = r?.value || [];
10465
10465
  if (i.length) {
10466
10466
  let { venueIds: n } = Yl({ requireCourts: !0, tournamentRecords: e }), { eventIds: a, drawIds: s } = Ny({ tournamentRecords: e }), { updatedSchedulingProfile: o, modifications: c, issues: u } = AN({ schedulingProfile: i, venueIds: n, eventIds: a, drawIds: s });
10467
10467
  if (c) {
@@ -10474,7 +10474,7 @@ function oa({ tournamentRecords: e, tournamentRecord: t }) {
10474
10474
  }
10475
10475
  function Fc({ tournamentRecords: e, tournamentRecord: t, schedulingProfile: r }) {
10476
10476
  let i = Zm({ tournamentRecords: e, schedulingProfile: r });
10477
- return i.error ? i : r ? Le({ tournamentRecords: e, discover: !0, extension: { name: Gs, value: r } }) : yr({ element: t, name: Gs, tournamentRecords: e, discover: !0 });
10477
+ return i.error ? i : r ? Le({ tournamentRecords: e, discover: !0, extension: { name: $s, value: r } }) : yr({ element: t, name: $s, tournamentRecords: e, discover: !0 });
10478
10478
  }
10479
10479
  function Xl(e) {
10480
10480
  let { tournamentRecord: t } = e, r = e.tournamentRecords || t && { [t.tournamentId]: t } || {};
@@ -10614,7 +10614,7 @@ function yU(e) {
10614
10614
  return Math.max(...t.filter((n) => (!i || i === n.entryStage) && (!r || n.entryStatus === r) && !isNaN(n.entryPosition)).map(({ entryPosition: n }) => pe(n || 0)), 0);
10615
10615
  }
10616
10616
  var ON = {};
10617
- Te(ON, { allCompetitionMatchUps: () => Hi, allDrawMatchUps: () => Ur, allEventMatchUps: () => _n, allTournamentMatchUps: () => Qt, analyzeMatchUp: () => Vu, calculateWinCriteria: () => Do, checkMatchUpIsComplete: () => Ga, competitionScheduleMatchUps: () => Jl, drawMatchUps: () => NU, eventMatchUps: () => af, filterMatchUps: () => jn, getAllDrawMatchUps: () => Rt, getAllStructureMatchUps: () => _e, getCheckedInParticipantIds: () => lo, getCompetitionMatchUps: () => Bu, getEventMatchUpFormatTiming: () => SU, getHomeParticipantId: () => TU, getMatchUpCompetitiveProfile: () => Dl, getMatchUpContextIds: () => PU, getMatchUpDailyLimits: () => of, getMatchUpDailyLimitsUpdate: () => vU, getMatchUpDependencies: () => Li, getMatchUpFormat: () => bU, getMatchUpFormatTiming: () => Tl, getMatchUpFormatTimingUpdate: () => UU, getMatchUpScheduleDetails: () => Im, getMatchUpType: () => ym, getMatchUpsStats: () => MU, getModifiedMatchUpFormatTiming: () => nf, getParticipantResults: () => Vl, getPredictiveAccuracy: () => DU, getRoundMatchUps: () => vr, getRounds: () => RU, isValidMatchUpFormat: () => qr, matchUpActions: () => km, participantScheduledMatchUps: () => wU, tallyParticipantResults: () => xc, tournamentMatchUps: () => sf, validMatchUp: () => pm, validMatchUps: () => yi });
10617
+ Te(ON, { allCompetitionMatchUps: () => Hi, allDrawMatchUps: () => Ur, allEventMatchUps: () => _n, allTournamentMatchUps: () => Qt, analyzeMatchUp: () => Vu, calculateWinCriteria: () => To, checkMatchUpIsComplete: () => Ga, competitionScheduleMatchUps: () => Jl, drawMatchUps: () => NU, eventMatchUps: () => af, filterMatchUps: () => jn, getAllDrawMatchUps: () => Rt, getAllStructureMatchUps: () => _e, getCheckedInParticipantIds: () => po, getCompetitionMatchUps: () => Bu, getEventMatchUpFormatTiming: () => SU, getHomeParticipantId: () => TU, getMatchUpCompetitiveProfile: () => Dl, getMatchUpContextIds: () => PU, getMatchUpDailyLimits: () => of, getMatchUpDailyLimitsUpdate: () => vU, getMatchUpDependencies: () => Li, getMatchUpFormat: () => bU, getMatchUpFormatTiming: () => Tl, getMatchUpFormatTimingUpdate: () => UU, getMatchUpScheduleDetails: () => Im, getMatchUpType: () => ym, getMatchUpsStats: () => MU, getModifiedMatchUpFormatTiming: () => nf, getParticipantResults: () => Vl, getPredictiveAccuracy: () => DU, getRoundMatchUps: () => vr, getRounds: () => RU, isValidMatchUpFormat: () => qr, matchUpActions: () => km, participantScheduledMatchUps: () => wU, tallyParticipantResults: () => xc, tournamentMatchUps: () => sf, validMatchUp: () => pm, validMatchUps: () => yi });
10618
10618
  function kN({ tournamentRecords: e, extensionName: t }) {
10619
10619
  if (typeof e != "object" || !Object.keys(e).length) return { error: mt };
10620
10620
  let r = [], i;
@@ -10761,7 +10761,7 @@ function Bu({ scheduleVisibilityFilters: e, hydrateParticipants: t, participants
10761
10761
  }
10762
10762
  function Jl(e) {
10763
10763
  if (typeof e?.tournamentRecords != "object" || !Object.keys(e?.tournamentRecords).length) return { error: mt };
10764
- let { courts: t, venues: r } = sa(e), i = oa(e).schedulingProfile, { sortDateMatchUps: n = !0, courtCompletedMatchUps: a, alwaysReturnCompleted: s, activeTournamentId: o, tournamentRecords: c, withCourtGridRows: u, minCourtGridRows: l, usePublishState: d, status: p = ni, sortCourtsData: m } = e, f = o ?? Zs() ?? Object.keys(c)[0], h = d ? El({ tournamentRecord: c[f], status: p }) : void 0, g = s ? Bu({ ...e, matchUpFilters: { ...e.matchUpFilters, matchUpStatuses: [Ut] }, contextFilters: e.contextFilters }).completedMatchUps : [];
10764
+ let { courts: t, venues: r } = sa(e), i = oa(e).schedulingProfile, { sortDateMatchUps: n = !0, courtCompletedMatchUps: a, alwaysReturnCompleted: s, activeTournamentId: o, tournamentRecords: c, withCourtGridRows: u, minCourtGridRows: l, usePublishState: d, status: p = ni, sortCourtsData: m } = e, f = o ?? eo() ?? Object.keys(c)[0], h = d ? El({ tournamentRecord: c[f], status: p }) : void 0, g = s ? Bu({ ...e, matchUpFilters: { ...e.matchUpFilters, matchUpStatuses: [Ut] }, contextFilters: e.contextFilters }).completedMatchUps : [];
10765
10765
  if (d && !h?.orderOfPlay?.published) return { completedMatchUps: g, dateMatchUps: [], courtsData: [], venues: r };
10766
10766
  let I, y;
10767
10767
  d && ({ drawIds: I, detailsMap: y } = TV({ tournamentRecords: c })), I?.length && (e.contextFilters || (e.contextFilters = {}), e.contextFilters?.drawIds ? e.contextFilters.drawIds = e.contextFilters.drawIds.filter((E) => I.includes(E)) : e.contextFilters.drawIds = I), h?.eventIds?.length && (e.matchUpFilters || (e.matchUpFilters = {}), e.matchUpFilters?.eventIds && e.matchUpFilters.eventIds.length ? e.matchUpFilters.eventIds = e.matchUpFilters.eventIds.filter((E) => h.eventIds.includes(E)) : e.matchUpFilters.eventIds = h.eventIds), h?.scheduledDates?.length && (e.matchUpFilters || (e.matchUpFilters = {}), e.matchUpFilters.scheduledDates && e.matchUpFilters.scheduledDates.length ? e.matchUpFilters.scheduledDates = e.matchUpFilters.scheduledDates.filter((E) => h.scheduledDates.includes(E)) : e.matchUpFilters.scheduledDates = h.scheduledDates), s && (e.matchUpFilters || (e.matchUpFilters = {}), e.matchUpFilters?.excludeMatchUpStatuses?.length ? e.matchUpFilters.excludeMatchUpStatuses.includes(Ut) || e.matchUpFilters.excludeMatchUpStatuses.push(Ut) : e.matchUpFilters.excludeMatchUpStatuses = [Ut]);
@@ -10883,7 +10883,7 @@ function MV({ excludeMargin: e, exclusionRule: t, valueAccessor: r, ascending: i
10883
10883
  let o = s.affirmative.length + s.negative.length, c = o && s.affirmative.length / o * 100;
10884
10884
  return s.percent = c ? Math.round(100 * c) / 100 : 0, s;
10885
10885
  }
10886
- function Do({ collectionDefinitions: e = [], collectionGroups: t = [] }) {
10886
+ function To({ collectionDefinitions: e = [], collectionGroups: t = [] }) {
10887
10887
  let r = 0, { groupValueNumbers: i } = $M({ collectionGroups: t }), n;
10888
10888
  for (let a of e || []) {
10889
10889
  let { collectionValueProfiles: s, collectionGroupNumber: o, collectionValue: c, matchUpCount: u, matchUpValue: l, scoreValue: d, setValue: p } = a, m = o && i.includes(o);
@@ -11017,7 +11017,7 @@ function EU({ tournamentRecord: e, venueId: t, venueIds: r }) {
11017
11017
  }).flat() } : { error: J };
11018
11018
  }
11019
11019
  var _N = {};
11020
- Te(_N, { categoryCanContain: () => il, getCategoryAgeDetails: () => Ls, getEvent: () => OU, getEventProperties: () => AU, getEventStructures: () => Tm, getEventTimeItem: () => fl, getEvents: () => CU, getFlightProfile: () => wt, getScaledEntries: () => vo });
11020
+ Te(_N, { categoryCanContain: () => il, getCategoryAgeDetails: () => _s, getEvent: () => OU, getEventProperties: () => AU, getEventStructures: () => Tm, getEventTimeItem: () => fl, getEvents: () => CU, getFlightProfile: () => wt, getScaledEntries: () => wo });
11021
11021
  function AU({ tournamentRecord: e, event: t }) {
11022
11022
  if (!e) return { error: J };
11023
11023
  if (!t) return { error: it };
@@ -11218,7 +11218,7 @@ function _V({ tournamentRecord: e, drawDefinition: t, policyDefinitions: r, scal
11218
11218
  if (d.error) return d;
11219
11219
  let { entries: p, seedsCount: m, stageEntries: f } = d;
11220
11220
  if (!f || !m) return { error: z };
11221
- let h = vo({ tournamentRecord: e, scaleAttributes: i, scaleSortMethod: l, sortDescending: u, entries: p, stage: c }).scaledEntries ?? [], { scaleItemsWithParticipantIds: g } = jN({ scaleAttributes: i, scaledEntries: h, stageEntries: f, seedsCount: m, scaleName: n });
11221
+ let h = wo({ tournamentRecord: e, scaleAttributes: i, scaleSortMethod: l, sortDescending: u, entries: p, stage: c }).scaledEntries ?? [], { scaleItemsWithParticipantIds: g } = jN({ scaleAttributes: i, scaledEntries: h, stageEntries: f, seedsCount: m, scaleName: n });
11222
11222
  return { scaleItemsWithParticipantIds: g };
11223
11223
  }
11224
11224
  var GN = {};
@@ -11308,7 +11308,7 @@ function HN({ autoEntryPositions: e = !0, participantIds: t, drawDefinition: r,
11308
11308
  function ln(e) {
11309
11309
  let t = "addParticipant", { allowDuplicateParticipantIdPairs: r, returnParticipant: i, disableNotice: n, pairOverride: a, participant: s } = e, o = e.tournamentId ? e.tournamentRecords?.[e.tournamentId] : e.tournamentRecord ?? (e.activeTournamentId && e.tournamentRecords?.[e.activeTournamentId]);
11310
11310
  if (!o) return { error: J };
11311
- if (!s) return F({ result: { error: Qs }, stack: t });
11311
+ if (!s) return F({ result: { error: Js }, stack: t });
11312
11312
  s.participantId || (s.participantId = Be()), o.participants || (o.participants = []);
11313
11313
  let { participantId: c, individualParticipantIds: u } = s;
11314
11314
  if (o.participants.reduce((h, g) => g.participantId === c || h, !1)) return { error: CD };
@@ -11383,8 +11383,8 @@ function zN(e) {
11383
11383
  if (D.length !== 2) return !0;
11384
11384
  if (!c.gender || yn(c.gender)) return !1;
11385
11385
  if (!d.has(D[0]) || !d.has(D[1])) return !0;
11386
- let v = D.map((S) => d.get(S)), w = Ts(c.gender) && (!Ts(v[0]) || !Ts(v[1])) || _a(c.gender) && (!_a(v[0]) || !_a(v[1]));
11387
- return Qr(c.gender) && (v.sort(Sm), (!_a(v[0]) || !Ts(v[1])) && (w = !0)), w;
11386
+ let v = D.map((S) => d.get(S)), w = Ps(c.gender) && (!Ps(v[0]) || !Ps(v[1])) || _a(c.gender) && (!_a(v[0]) || !_a(v[1]));
11387
+ return Qr(c.gender) && (v.sort(Sm), (!_a(v[0]) || !Ps(v[1])) && (w = !0)), w;
11388
11388
  });
11389
11389
  if (p.length) return { error: Gr, invalidParticipantIdPairs: p };
11390
11390
  let m = n.map((D) => ({ participantId: u?.pop() ?? Be(), participantRole: nr, individualParticipantIds: D, participantType: we })), f = r ? m : m.filter((D) => !l.find((v) => St(v, D.individualParticipantIds).length === 2)), h, g = [];
@@ -11419,7 +11419,7 @@ function YN({ entryStatus: e = Lr, unpairedParticipantIds: t = [], participantId
11419
11419
  return a.entries = (a.entries ?? []).filter((h) => h.entryStage === i), a.entries = a.entries.concat(...m, ...f), { ...x };
11420
11420
  }
11421
11421
  var KN = {};
11422
- Te(KN, { addDrawDefinition: () => ed, addEvent: () => _c, addFlight: () => df, assignSeedPositions: () => cE, attachFlightProfile: () => GU, categoryCanContain: () => il, deleteDrawDefinitions: () => cf, deleteEvents: () => lE, deleteFlightAndFlightDraw: () => sE, deleteFlightProfileAndFlightDraws: () => tE, generate: () => XN, generateEventsFromTieFormat: () => JN, getCategoryAgeDetails: () => Ls, getEvent: () => OU, getEventProperties: () => AU, getEventStructures: () => Tm, getEventTimeItem: () => fl, getEvents: () => CU, getFlightProfile: () => wt, getScaledEntries: () => vo, modifyEvent: () => dE, modifyEventMatchUpFormatTiming: () => rE, modifyPairAssignment: () => oE, mutate: () => ZN, query: () => _N, refreshEventDrawOrder: () => jU, removeEventMatchUpFormatTiming: () => uf, removeScaleValues: () => $U, removeSeeding: () => uE, setEventDates: () => BU, setEventDisplay: () => lf, setEventEndDate: () => _U, setEventStartDate: () => LU, updateDrawIdsOrder: () => VU, validateCategory: () => vu });
11422
+ Te(KN, { addDrawDefinition: () => ed, addEvent: () => _c, addFlight: () => df, assignSeedPositions: () => cE, attachFlightProfile: () => GU, categoryCanContain: () => il, deleteDrawDefinitions: () => cf, deleteEvents: () => lE, deleteFlightAndFlightDraw: () => sE, deleteFlightProfileAndFlightDraws: () => tE, generate: () => XN, generateEventsFromTieFormat: () => JN, getCategoryAgeDetails: () => _s, getEvent: () => OU, getEventProperties: () => AU, getEventStructures: () => Tm, getEventTimeItem: () => fl, getEvents: () => CU, getFlightProfile: () => wt, getScaledEntries: () => wo, modifyEvent: () => dE, modifyEventMatchUpFormatTiming: () => rE, modifyPairAssignment: () => oE, mutate: () => ZN, query: () => _N, refreshEventDrawOrder: () => jU, removeEventMatchUpFormatTiming: () => uf, removeScaleValues: () => $U, removeSeeding: () => uE, setEventDates: () => BU, setEventDisplay: () => lf, setEventEndDate: () => _U, setEventStartDate: () => LU, updateDrawIdsOrder: () => VU, validateCategory: () => vu });
11423
11423
  var XN = {};
11424
11424
  Te(XN, { generateEventsFromTieFormat: () => JN });
11425
11425
  function BV({ tournamentId: e, event: t }) {
@@ -11434,7 +11434,7 @@ function _c({ suppressNotifications: e, tournamentRecord: t, internalUse: r, eve
11434
11434
  let o = ae({ drawDefinitions: !!i.drawDefinitions?.length, entries: !!i.entries?.length });
11435
11435
  return { info: "entries/drawDefinitions cannot exist", error: z, context: o };
11436
11436
  }
11437
- let s = { eventType: _s, drawDefinitions: [], entries: [], startDate: n, endDate: a, ...i };
11437
+ let s = { eventType: Bs, drawDefinitions: [], entries: [], startDate: n, endDate: a, ...i };
11438
11438
  if (i.eventType === Hr) {
11439
11439
  if (i.tieFormat) {
11440
11440
  let o = Mr({ tieFormat: i.tieFormat });
@@ -11497,7 +11497,7 @@ Te(ZN, { addDrawDefinition: () => ed, addEvent: () => _c, addFlight: () => df, a
11497
11497
  function Bc({ removePriorValues: e = !0, status: t = ni, statusObject: r, event: i }) {
11498
11498
  if (!Ce(r)) return { error: z };
11499
11499
  let n = Ui({ event: i, status: t }), a = `${Aa}.${Ca}`, s = { itemValue: { [t]: { ...n, ...r } }, itemType: a };
11500
- return So({ timeItem: s, removePriorValues: e, event: i });
11500
+ return vo({ timeItem: s, removePriorValues: e, event: i });
11501
11501
  }
11502
11502
  function Vc(e) {
11503
11503
  let t = se(e, [{ [_t]: !0, [ra]: !0 }, { eventDataParams: !1, [Er]: Cr }]);
@@ -11752,7 +11752,7 @@ function oE(e) {
11752
11752
  if (o?.eventType !== di) return { error: Tn };
11753
11753
  if (!(o?.entries?.filter(({ entryStatus: g }) => [Ii, ms].includes(g)).map(({ participantId: g }) => g) || []).includes(r)) return { error: Wi };
11754
11754
  let u = (n.participants || []).find((g) => g.participantId === s);
11755
- if (u?.participantType !== we) return { error: Xs, participant: u };
11755
+ if (u?.participantType !== we) return { error: Qs, participant: u };
11756
11756
  let l = u.individualParticipantIds, d = [r, ...l.filter((g) => g !== i)], { participant: p } = Oi({ participantIds: d, tournamentRecord: n }), m;
11757
11757
  if (p) m = p.participantId;
11758
11758
  else {
@@ -11772,7 +11772,7 @@ function oE(e) {
11772
11772
  o.entries = o.entries.map((g) => g.participantId === s && { ...g, participantId: m } || g.participantId === r && { ...g, participantId: i } || g);
11773
11773
  let h = n.events.some(({ entries: g, eventId: I, drawDefinitions: y }) => o.eventId === I ? y.some(({ drawId: U, entries: D }) => U === a?.drawId ? !1 : D?.find((v) => v.participantId === s)) : g?.find((U) => U.participantId === s));
11774
11774
  if (!h) {
11775
- let g = go({ addIndividualParticipantsToEvents: !1, participantIds: [s], tournamentRecord: n });
11775
+ let g = Io({ addIndividualParticipantsToEvents: !1, participantIds: [s], tournamentRecord: n });
11776
11776
  if (g.error) return g;
11777
11777
  }
11778
11778
  return { ...x, participantOtherEntries: h, newPairParticipantId: m };
@@ -11786,18 +11786,18 @@ function ed(e) {
11786
11786
  if (n !== void 0 && n !== u.drawDefinitions.length) return { error: z, info: "drawDefintions count mismatch" };
11787
11787
  let { flightProfile: h } = wt({ event: u }), g = t && h?.flights?.find((R) => R.flightNumber === t.flightNumber), I = h?.links?.find((R) => R?.target?.drawId === l)?.source?.drawId;
11788
11788
  if (I && !u.drawDefinitions.find((R) => R.drawId === I)) return F({ result: { error: ne }, info: { sourceDrawId: I } });
11789
- if (g && g.drawId !== c.drawId) return F({ result: { error: Ms }, info: { relevantFlight: g } });
11789
+ if (g && g.drawId !== c.drawId) return F({ result: { error: Rs }, info: { relevantFlight: g } });
11790
11790
  let y = p?.every(({ participantId: R, entryStatus: E }) => {
11791
11791
  let A = g?.drawEntries.find((N) => N.participantId === R);
11792
11792
  return !E || A?.entryStatus === E;
11793
11793
  }), U = !s || m && p?.every(({ participantId: R, entryStatus: E, entryStage: A }) => m.find((N) => N.participantId === R && (!N.entryStage || N.entryStage === A))?.entryStatus === E);
11794
- if (g && !y) return F({ result: { error: Ms }, context: { drawEntriesPresentInFlight: y, matchingEventEntries: U, relevantFlight: g }, info: "Draw entries are not present in flight or do not match entryStatuses" });
11794
+ if (g && !y) return F({ result: { error: Rs }, context: { drawEntriesPresentInFlight: y, matchingEventEntries: U, relevantFlight: g }, info: "Draw entries are not present in flight or do not match entryStatuses" });
11795
11795
  if (i && p?.filter(Boolean).forEach((R) => {
11796
11796
  if (R?.entryStatus && Fi.includes(R?.entryStatus)) {
11797
11797
  let E = m?.filter(Boolean).find((A) => A.participantId === R.participantId);
11798
11798
  E && R.entryStatus && E?.entryStatus !== R.entryStatus && (E.entryStatus = R.entryStatus, f += 1);
11799
11799
  }
11800
- }), m && !U) return F({ result: { info: "Draw entries do not match event entryStatuses", context: { matchingEventEntries: U, eventEntries: m }, error: Ms } });
11800
+ }), m && !U) return F({ result: { info: "Draw entries do not match event entryStatuses", context: { matchingEventEntries: U, eventEntries: m }, error: Rs } });
11801
11801
  let D = h?.flights?.map(({ flightNumber: R }) => !isNaN(R) && pe(R))?.filter(Boolean) || [], v = u.drawDefinitions.map(({ drawOrder: R }) => R && pe(R))?.filter(Boolean) || [], w = Math.max(0, ...v, ...D) + 1, S = h?.flights?.find((R) => R.drawId === l), T;
11802
11802
  if (S) {
11803
11803
  S.drawName = c.drawName, T = { name: Ai, value: { ...h, flights: h.flights } };
@@ -11939,7 +11939,7 @@ function zV(e) {
11939
11939
  if (![n, ...i, ...a].filter(Boolean).every((s) => s.collectionDefinitions.every((o) => !o.category || il({ category: e.eventUpdates.category, childCategory: o.category })))) return F({ result: { error: hu }, stack: e.stack });
11940
11940
  }
11941
11941
  if (e.enteredParticipants?.length) {
11942
- let i = e.eventUpdates.startDate || e.event.startDate || e.tournamentRecord.startDate, n = e.eventUpdates.endDate || e.event.endDate || e.tournamentRecord.endDate, a = e.enteredParticipants.map((c) => c.participantType === be ? c : c.individualParticpants ?? []).flat(), s = Ls({ category: t, consideredDate: i }), o = Ls({ category: t, consideredDate: n });
11942
+ let i = e.eventUpdates.startDate || e.event.startDate || e.tournamentRecord.startDate, n = e.eventUpdates.endDate || e.event.endDate || e.tournamentRecord.endDate, a = e.enteredParticipants.map((c) => c.participantType === be ? c : c.individualParticpants ?? []).flat(), s = _s({ category: t, consideredDate: i }), o = _s({ category: t, consideredDate: n });
11943
11943
  if (s?.ageMinDate || s?.ageMaxDate || o?.ageMinDate || o?.ageMaxDate) for (let c of a) {
11944
11944
  let u = c.person?.birthDate;
11945
11945
  if (!u) return F({ result: { error: wD }, stack: e.stack });
@@ -12007,7 +12007,7 @@ function t2(e) {
12007
12007
  if (!p) return { error: it };
12008
12008
  let f = p.entries ?? [], { flightProfile: h } = wt({ event: p });
12009
12009
  if (h && r && !s) return { error: Lg };
12010
- let g = e.scaledEntries ?? vo({ tournamentRecord: i, scaleAttributes: n, scaleSortMethod: a, sortDescending: o, event: p, stage: m }).scaledEntries, I = g.map(Pe), y = Ir(f.filter(({ participantId: P }) => !I.includes(P)).filter((P) => (!m || !P.entryStage || P.entryStage === m) && (!P.entryStatus || fs.includes(P.entryStatus)))), U = g.concat(...y), D = U.length, v = Math.ceil(D / u), w = $t(U, v);
12010
+ let g = e.scaledEntries ?? wo({ tournamentRecord: i, scaleAttributes: n, scaleSortMethod: a, sortDescending: o, event: p, stage: m }).scaledEntries, I = g.map(Pe), y = Ir(f.filter(({ participantId: P }) => !I.includes(P)).filter((P) => (!m || !P.entryStage || P.entryStage === m) && (!P.entryStatus || fs.includes(P.entryStatus)))), U = g.concat(...y), D = U.length, v = Math.ceil(D / u), w = $t(U, v);
12011
12011
  l === mE ? w = ch(U, u) : l === fE && (w = ch(U, u, !0));
12012
12012
  function S(P) {
12013
12013
  return (P || []).map(({ participantId: M, scaleValue: R }) => {
@@ -12121,7 +12121,7 @@ function IE(e) {
12121
12121
  if (typeof a != "object" && !r) return { error: z, context: { scaleAccessor: a } };
12122
12122
  let u = {}, l = (n?.entries ?? c?.entries ?? []).filter((M) => M?.entryStatus === Lr).map(Pe), { participants: d = [] } = pt({ withIndividualParticipants: !0, withScaleValues: !0, tournamentRecord: i }), p = d.filter(({ participantId: M }) => l.includes(M)), m = (M) => M === ga ? "rankings" : "ratings", f = c?.category?.categoryName ?? c?.category?.ageCategoryCode, { scaleName: h = f, scaleType: g = ga, sortOrder: I, accessor: y } = a || {}, U = m(g), D = (M, R) => {
12123
12123
  let E = M[U]?.[R];
12124
- if (!E && r && (E = M[U]?.[bs]), Array.isArray(E)) {
12124
+ if (!E && r && (E = M[U]?.[Ms]), Array.isArray(E)) {
12125
12125
  let A = E.find((N) => N.scaleName === h)?.scaleValue;
12126
12126
  if (ft(A)) return A;
12127
12127
  if (y && typeof A == "object") return A[y];
@@ -12130,11 +12130,11 @@ function IE(e) {
12130
12130
  }, v = (M, R, E) => {
12131
12131
  let A = I === Zh ? R : M, N = I === Zh ? M : R;
12132
12132
  return D(A, E) - D(N, E);
12133
- }, w = (M, R) => v(M, R, bs), S = (M, R) => v(M, R, Wa), T = [], b = t?.collectionDefinitions ?? [];
12133
+ }, w = (M, R) => v(M, R, Ms), S = (M, R) => v(M, R, Wa), T = [], b = t?.collectionDefinitions ?? [];
12134
12134
  for (let M of p) {
12135
12135
  let R = M.individualParticipants?.sort(w) ?? [], E = s ? R : M.individualParticipants?.sort(S) ?? [], A = {};
12136
12136
  for (let C of b) {
12137
- let k = [], { collectionId: O, matchUpCount: L, matchUpType: _, gender: B } = C, G = Tt(bs)(_);
12137
+ let k = [], { collectionId: O, matchUpCount: L, matchUpType: _, gender: B } = C, G = Tt(Ms)(_);
12138
12138
  te(0, L).forEach(($) => {
12139
12139
  let j = G ? R : E ?? [], V = $ + 1, H = [];
12140
12140
  te(0, G ? 1 : 2).forEach((W) => {
@@ -12304,7 +12304,7 @@ function qU(e) {
12304
12304
  var vE = { getCourtsAvailableAtPeriodStart: UE, generateTimeSlots: jc, getScheduleTimes: qU, courtGenerator: SE }, l2 = vE, up = {};
12305
12305
  Te(up, { isValid: () => qr, isValidMatchUpFormat: () => qr, parse: () => Dr, stringify: () => Gp });
12306
12306
  var wE = {};
12307
- Te(wE, { allCompetitionMatchUps: () => Hi, allDrawMatchUps: () => Ur, allEventMatchUps: () => _n, allTournamentMatchUps: () => Qt, analyzeMatchUp: () => Vu, applyLineUps: () => qE, assignMatchUpSideParticipant: () => TE, assignTieMatchUpParticipantId: () => lp, bulkMatchUpStatusUpdate: () => jE, calculateWinCriteria: () => Do, checkInParticipant: () => zU, checkMatchUpIsComplete: () => Ga, checkOutParticipant: () => HU, competitionScheduleMatchUps: () => Jl, disableTieAutoCalc: () => _E, drawMatchUps: () => NU, enableTieAutoCalc: () => xE, eventMatchUps: () => af, filterMatchUps: () => jn, findMatchUp: () => fU, getAllDrawMatchUps: () => Rt, getAllStructureMatchUps: () => _e, getCheckedInParticipantIds: () => lo, getCompetitionMatchUps: () => Bu, getEventMatchUpFormatTiming: () => SU, getHomeParticipantId: () => TU, getMatchUpCompetitiveProfile: () => Dl, getMatchUpContextIds: () => PU, getMatchUpDailyLimits: () => of, getMatchUpDailyLimitsUpdate: () => vU, getMatchUpDependencies: () => Li, getMatchUpFormat: () => bU, getMatchUpFormatTiming: () => Tl, getMatchUpFormatTimingUpdate: () => UU, getMatchUpScheduleDetails: () => Im, getMatchUpType: () => ym, getMatchUpsStats: () => MU, getModifiedMatchUpFormatTiming: () => nf, getParticipantResults: () => Vl, getPredictiveAccuracy: () => DU, getRoundMatchUps: () => vr, getRounds: () => RU, isValidMatchUpFormat: () => qr, matchUpActions: () => km, mutate: () => DE, participantScheduledMatchUps: () => wU, query: () => ON, removeDelegatedOutcome: () => FE, removeMatchUpSideParticipant: () => XU, removeTieMatchUpParticipantId: () => bE, replaceTieMatchUpParticipantId: () => KU, resetAdHocMatchUps: () => $E, resetMatchUpLineUps: () => iS, resetScorecard: () => aS, resetTieFormat: () => nS, setDelegatedOutcome: () => GE, setMatchUpFormat: () => BE, setMatchUpStatus: () => rd, setOrderOfFinish: () => WE, substituteParticipant: () => LE, tallyParticipantResults: () => xc, toggleParticipantCheckInState: () => ff, tournamentMatchUps: () => sf, updateTieMatchUpScore: () => aa, validMatchUp: () => pm, validMatchUps: () => yi });
12307
+ Te(wE, { allCompetitionMatchUps: () => Hi, allDrawMatchUps: () => Ur, allEventMatchUps: () => _n, allTournamentMatchUps: () => Qt, analyzeMatchUp: () => Vu, applyLineUps: () => qE, assignMatchUpSideParticipant: () => TE, assignTieMatchUpParticipantId: () => lp, bulkMatchUpStatusUpdate: () => jE, calculateWinCriteria: () => To, checkInParticipant: () => zU, checkMatchUpIsComplete: () => Ga, checkOutParticipant: () => HU, competitionScheduleMatchUps: () => Jl, disableTieAutoCalc: () => _E, drawMatchUps: () => NU, enableTieAutoCalc: () => xE, eventMatchUps: () => af, filterMatchUps: () => jn, findMatchUp: () => fU, getAllDrawMatchUps: () => Rt, getAllStructureMatchUps: () => _e, getCheckedInParticipantIds: () => po, getCompetitionMatchUps: () => Bu, getEventMatchUpFormatTiming: () => SU, getHomeParticipantId: () => TU, getMatchUpCompetitiveProfile: () => Dl, getMatchUpContextIds: () => PU, getMatchUpDailyLimits: () => of, getMatchUpDailyLimitsUpdate: () => vU, getMatchUpDependencies: () => Li, getMatchUpFormat: () => bU, getMatchUpFormatTiming: () => Tl, getMatchUpFormatTimingUpdate: () => UU, getMatchUpScheduleDetails: () => Im, getMatchUpType: () => ym, getMatchUpsStats: () => MU, getModifiedMatchUpFormatTiming: () => nf, getParticipantResults: () => Vl, getPredictiveAccuracy: () => DU, getRoundMatchUps: () => vr, getRounds: () => RU, isValidMatchUpFormat: () => qr, matchUpActions: () => km, mutate: () => DE, participantScheduledMatchUps: () => wU, query: () => ON, removeDelegatedOutcome: () => FE, removeMatchUpSideParticipant: () => XU, removeTieMatchUpParticipantId: () => bE, replaceTieMatchUpParticipantId: () => KU, resetAdHocMatchUps: () => $E, resetMatchUpLineUps: () => iS, resetScorecard: () => aS, resetTieFormat: () => nS, setDelegatedOutcome: () => GE, setMatchUpFormat: () => BE, setMatchUpStatus: () => rd, setOrderOfFinish: () => WE, substituteParticipant: () => LE, tallyParticipantResults: () => xc, toggleParticipantCheckInState: () => ff, tournamentMatchUps: () => sf, updateTieMatchUpScore: () => aa, validMatchUp: () => pm, validMatchUps: () => yi });
12308
12308
  var DE = {};
12309
12309
  Te(DE, { applyLineUps: () => qE, assignMatchUpSideParticipant: () => TE, assignTieMatchUpParticipantId: () => lp, bulkMatchUpStatusUpdate: () => jE, checkInParticipant: () => zU, checkOutParticipant: () => HU, disableTieAutoCalc: () => _E, enableTieAutoCalc: () => xE, findMatchUp: () => fU, removeDelegatedOutcome: () => FE, removeMatchUpSideParticipant: () => XU, removeTieMatchUpParticipantId: () => bE, replaceTieMatchUpParticipantId: () => KU, resetAdHocMatchUps: () => $E, resetMatchUpLineUps: () => iS, resetScorecard: () => aS, resetTieFormat: () => nS, setDelegatedOutcome: () => GE, setMatchUpFormat: () => BE, setMatchUpStatus: () => rd, setOrderOfFinish: () => WE, substituteParticipant: () => LE, toggleParticipantCheckInState: () => ff, updateTieMatchUpScore: () => aa });
12310
12310
  function TE({ tournamentRecord: e, drawDefinition: t, participantId: r, sideNumber: i, matchUpId: n, event: a }) {
@@ -12339,7 +12339,7 @@ function HU(e) {
12339
12339
  if (i.error) return i;
12340
12340
  let { tournamentRecord: n, drawDefinition: a, participantId: s, matchUpId: o } = e, c = i?.matchUp?.matchUp, { matchUpStatus: u, score: l } = c ?? {};
12341
12341
  if (u && yI.includes(u) || u && xt.includes(u) || Lt({ score: l })) return { error: sD };
12342
- let d = lo({ matchUp: c });
12342
+ let d = po({ matchUp: c });
12343
12343
  if (d?.error) return d;
12344
12344
  let { checkedInParticipantIds: p, allRelevantParticipantIds: m } = d ?? {};
12345
12345
  if (!m?.includes(s)) return { error: Wi };
@@ -12356,7 +12356,7 @@ function zU(e) {
12356
12356
  if (r[Mi]) return r;
12357
12357
  let i = Lc(e, [{ [wc]: xn, attr: { [Xp]: !0 } }]);
12358
12358
  if (i[Mi]) return i;
12359
- let { tournamentRecord: n, drawDefinition: a, participantId: s, matchUpId: o } = e, c = lo({ matchUp: i?.matchUp?.matchUp });
12359
+ let { tournamentRecord: n, drawDefinition: a, participantId: s, matchUpId: o } = e, c = po({ matchUp: i?.matchUp?.matchUp });
12360
12360
  if (c?.error) return c;
12361
12361
  let { checkedInParticipantIds: u, allRelevantParticipantIds: l } = c ?? {};
12362
12362
  if (!l?.includes(s)) return { [Mi]: Wi };
@@ -12370,7 +12370,7 @@ function ff(e) {
12370
12370
  if (!i) return { error: J };
12371
12371
  let n = Lc(e, [{ [wc]: xn, attr: { [Xp]: !0 }, [Mi]: dr }]).matchUp?.matchUp;
12372
12372
  if (!n) return { error: dr };
12373
- let { checkedInParticipantIds: a = [] } = lo({ matchUp: n }), { participantId: s, matchUpId: o, drawDefinition: c } = e;
12373
+ let { checkedInParticipantIds: a = [] } = po({ matchUp: n }), { participantId: s, matchUpId: o, drawDefinition: c } = e;
12374
12374
  return s && a.includes(s) ? HU({ tournamentRecord: i, drawDefinition: c, participantId: s, matchUpId: o, matchUp: n }) : zU({ tournamentRecord: i, drawDefinition: c, participantId: s, matchUpId: o, matchUp: n });
12375
12375
  }
12376
12376
  function YU({ tournamentRecord: e, drawDefinition: t, tieMatchUpId: r, event: i }) {
@@ -12398,7 +12398,7 @@ function KU(e) {
12398
12398
  if (y.length !== 2) return F({ result: { error: kt }, stack: r });
12399
12399
  if (y[0].participantType !== y[1].participantType) return F({ result: { error: qi }, stack: r });
12400
12400
  let { appliedPolicies: U } = xe({ tournamentRecord: n, drawDefinition: s, event: c }), D = e.policyDefinitions?.[Yt] ?? U?.[Yt] ?? Ac[Yt], v = y.find(({ participantId: O }) => O === a);
12401
- if ((e.enforceGender ?? D?.participants?.enforceGender) !== !1 && rn(l?.gender) && ur(l?.gender) !== ur(v?.person?.sex)) return { error: Xs, info: "Gender mismatch" };
12401
+ if ((e.enforceGender ?? D?.participants?.enforceGender) !== !1 && rn(l?.gender) && ur(l?.gender) !== ur(v?.person?.sex)) return { error: Qs, info: "Gender mismatch" };
12402
12402
  let w = D?.processCodes?.substitution;
12403
12403
  Gl({ tournamentId: n.tournamentId, eventId: c.eventId, inContextDualMatchUp: u, drawDefinition: s, dualMatchUp: m });
12404
12404
  let S = m?.sides?.find(({ sideNumber: O }) => O === I.sideNumber);
@@ -12422,7 +12422,7 @@ function KU(e) {
12422
12422
  }
12423
12423
  let E = g === We, { assignedParticipantIds: A } = Xd({ lineUp: b, collectionPosition: d, collectionId: p }), { assignedParticipantIds: N } = Xd({ lineUp: R, collectionPosition: d, collectionId: p });
12424
12424
  if (S.lineUp = R, T && h) {
12425
- let O = yo({ participantId: T, lineUp: R, drawDefinition: s, tieFormat: h });
12425
+ let O = Uo({ participantId: T, lineUp: R, drawDefinition: s, tieFormat: h });
12426
12426
  if (O.error) return F({ result: O, stack: r });
12427
12427
  } else console.log("team participantId not found");
12428
12428
  let C, k;
@@ -12435,7 +12435,7 @@ function KU(e) {
12435
12435
  }
12436
12436
  L = Oi({ participantIds: A, tournamentRecord: O });
12437
12437
  let _ = L.participant?.participantId;
12438
- _ && go({ participantIds: [_], tournamentRecord: O }).success && (k = _);
12438
+ _ && Io({ participantIds: [_], tournamentRecord: O }).success && (k = _);
12439
12439
  }
12440
12440
  if (o || I.substitutions?.length === 1) {
12441
12441
  if (o) w && f && (f.processCodes = ye([...f?.processCodes ?? [], ...w]));
@@ -12494,7 +12494,7 @@ function hf({ individualParticipantIds: e, groupingParticipantId: t, removeFromO
12494
12494
  function gf(e) {
12495
12495
  let { updateParticipantName: t = !0, groupingParticipantId: r, removeFromOtherTeams: i, tournamentRecord: n, pairOverride: a, participant: s } = e;
12496
12496
  if (!n) return { error: J };
12497
- if (!s) return { error: Qs };
12497
+ if (!s) return { error: Js };
12498
12498
  if (!s.participantId) return ln({ tournamentRecord: n, participant: s });
12499
12499
  let { participant: o } = Ea({ participantId: s.participantId, tournamentRecord: n });
12500
12500
  if (!o) return ln({ tournamentRecord: n, participant: s });
@@ -12539,7 +12539,7 @@ function lp(e) {
12539
12539
  let I = pt({ participantFilters: { participantIds: [s] }, tournamentRecord: n })?.participants?.[0];
12540
12540
  if (!I) return F({ result: { error: Dt }, stack: r });
12541
12541
  let { appliedPolicies: y } = xe({ tournamentRecord: n, drawDefinition: a, event: o }), U = e.policyDefinitions?.[Yt] ?? y?.[Yt] ?? Ac[Yt];
12542
- if ((e.enforceGender ?? U?.participants?.enforceGender) !== !1 && rn(u?.gender) && ur(u?.gender) !== ur(I.person?.sex)) return { error: Xs, info: "Gender mismatch" };
12542
+ if ((e.enforceGender ?? U?.participants?.enforceGender) !== !1 && rn(u?.gender) && ur(u?.gender) !== ur(I.person?.sex)) return { error: Qs, info: "Gender mismatch" };
12543
12543
  let { individualParticipantIds: D, participantType: v } = I;
12544
12544
  if (Tt(ze)(f) && v !== be) return { error: qi };
12545
12545
  let w = v === be ? [s] : D, S = i && p?.find(({ participantId: _ }) => _ === i) || p?.find(({ individualParticipantIds: _ }) => Sr(w, _));
@@ -12564,7 +12564,7 @@ function lp(e) {
12564
12564
  if (_?.error) return _;
12565
12565
  }
12566
12566
  if (R && (R.lineUp = k), h && Ee({ tournamentId: n?.tournamentId, matchUp: h, context: r, drawDefinition: a }), O) {
12567
- let { error: _ } = go({ participantIds: [O], tournamentRecord: n });
12567
+ let { error: _ } = Io({ participantIds: [O], tournamentRecord: n });
12568
12568
  _ && console.log("cleanup");
12569
12569
  }
12570
12570
  return { ...x, modifiedLineUp: k };
@@ -12596,7 +12596,7 @@ function Wf({ collectionPosition: e, teamParticipantId: t, drawDefinition: r, mo
12596
12596
  let l = { collectionAssignments: [u], participantId: n };
12597
12597
  i.push(l);
12598
12598
  }
12599
- return yo({ participantId: t, lineUp: i, drawDefinition: r, tieFormat: s });
12599
+ return Uo({ participantId: t, lineUp: i, drawDefinition: r, tieFormat: s });
12600
12600
  }
12601
12601
  function bE(e) {
12602
12602
  let { tournamentRecord: t, drawDefinition: r, participantId: i, event: n } = e, a = "removeTieMatchUpParticiapantId";
@@ -12613,7 +12613,7 @@ function bE(e) {
12613
12613
  if (!v) return F({ result: { error: Dt }, stack: a });
12614
12614
  let w = pt({ participantFilters: { participantIds: [i] }, tournamentRecord: t })?.participants?.[0];
12615
12615
  if (!w) return F({ result: { error: Dt }, stack: a });
12616
- if (h === ze && w.participantType === we) return F({ result: { error: Xs }, stack: a });
12616
+ if (h === ze && w.participantType === we) return F({ result: { error: Qs }, stack: a });
12617
12617
  let S = w.participantType === be ? [i] : w.individualParticipantIds;
12618
12618
  Gl({ tournamentId: t.tournamentId, eventId: n.eventId, inContextDualMatchUp: u, drawDefinition: r, dualMatchUp: g });
12619
12619
  let T = g.sides?.find(({ sideNumber: M }) => M === U.sideNumber);
@@ -12623,7 +12623,7 @@ function bE(e) {
12623
12623
  }
12624
12624
  if (!T) return F({ result: { error: Dt, context: { participantId: i } } });
12625
12625
  let { modifiedLineUp: b, previousParticipantIds: P } = PE({ collectionPosition: p, teamParticipantId: v, dualMatchUpSide: T, participantIds: S, drawDefinition: r, collectionId: f });
12626
- if (T.lineUp = b, v && y && yo({ participantId: v, lineUp: b, drawDefinition: r, tieFormat: y }), h === We && w.participantType === be) {
12626
+ if (T.lineUp = b, v && y && Uo({ participantId: v, lineUp: b, drawDefinition: r, tieFormat: y }), h === We && w.participantType === be) {
12627
12627
  let M = l?.sides?.find((A) => A.sideNumber === T?.sideNumber), { participantId: R } = M ?? {}, E = R && pt({ participantFilters: { participantIds: [R] }, tournamentRecord: t, withDraws: !0 })?.participants?.[0];
12628
12628
  if (E) {
12629
12629
  let A = E?.individualParticipantIds?.filter((N) => N !== i) ?? [];
@@ -12641,7 +12641,7 @@ function bE(e) {
12641
12641
  let N = gf({ participant: E, pairOverride: !0, tournamentRecord: t });
12642
12642
  if (N.error) return F({ result: N, stack: a });
12643
12643
  } else {
12644
- let N = go({ participantIds: [R], tournamentRecord: t });
12644
+ let N = Io({ participantIds: [R], tournamentRecord: t });
12645
12645
  N.error && console.log("cleanup", { result: N });
12646
12646
  }
12647
12647
  } else return F({ result: { error: Dt }, stack: a });
@@ -12673,7 +12673,7 @@ function g2({ inContextDrawMatchUps: e, sourceMatchUpStatus: t, targetDrawPositi
12673
12673
  let { structure: d } = me({ drawDefinition: a, structureId: s });
12674
12674
  if (d?.structureType === Tr) return { ...x };
12675
12675
  u = u ?? er({ drawDefinition: a });
12676
- let p = (u?.mappedMatchUps || {})[s].matchUps, { initialRoundNumber: m } = $s({ drawPosition: r, matchUps: p }), f = p?.filter((g) => g.roundNumber >= c && g.roundNumber !== m && g.drawPositions?.includes(r)), { positionAssignments: h } = Ye({ drawDefinition: a, structureId: s });
12676
+ let p = (u?.mappedMatchUps || {})[s].matchUps, { initialRoundNumber: m } = Ws({ drawPosition: r, matchUps: p }), f = p?.filter((g) => g.roundNumber >= c && g.roundNumber !== m && g.drawPositions?.includes(r)), { positionAssignments: h } = Ye({ drawDefinition: a, structureId: s });
12677
12677
  for (let g of f ?? []) I2({ inContextDrawMatchUps: e, sourceMatchUpStatus: t, positionAssignments: h, targetDrawPosition: r, tournamentRecord: i, sourceMatchUpId: n, drawDefinition: a, dualMatchUp: o, matchUpsMap: u, matchUp: g, event: l });
12678
12678
  return { ...x };
12679
12679
  }
@@ -12819,7 +12819,7 @@ function $v(e) {
12819
12819
  }
12820
12820
  return F({ result: { ...x }, stack: l });
12821
12821
  }
12822
- return Es({ matchUpId: v.matchUpId, drawPosition: L, inContextDrawMatchUps: t, drawDefinition: i });
12822
+ return As({ matchUpId: v.matchUpId, drawPosition: L, inContextDrawMatchUps: t, drawDefinition: i });
12823
12823
  } else if (h) {
12824
12824
  if (!G) return { error: br };
12825
12825
  if (j) {
@@ -13070,13 +13070,13 @@ function ka(e) {
13070
13070
  if (m.error) return F({ result: m, stack: t });
13071
13071
  r = m.matchUp;
13072
13072
  }
13073
- let u = ve(o), l = po({ matchUp: r }).scheduledDate, d = u && !l;
13073
+ let u = ve(o), l = mo({ matchUp: r }).scheduledDate, d = u && !l;
13074
13074
  if ((AE({ matchUp: r }).timeModifiers || [])?.length) {
13075
13075
  let m = CE({ disableNotice: !0, removePriorValues: i, tournamentRecord: n, timeModifiers: [], drawDefinition: a, matchUpId: c, matchUp: r });
13076
13076
  if (m?.error) return F({ result: m, stack: t });
13077
13077
  }
13078
- let p = ro(o, !0, d);
13079
- return Xr({ duplicateValues: !1, removePriorValues: i, tournamentRecord: n, drawDefinition: a, disableNotice: s, matchUpId: c, timeItem: { itemType: uo, itemValue: p } });
13078
+ let p = io(o, !0, d);
13079
+ return Xr({ duplicateValues: !1, removePriorValues: i, tournamentRecord: n, drawDefinition: a, disableNotice: s, matchUpId: c, timeItem: { itemType: lo, itemValue: p } });
13080
13080
  }
13081
13081
  function CE({ removePriorValues: e, tournamentRecord: t, drawDefinition: r, disableNotice: i, timeModifiers: n, matchUpId: a, matchUp: s }) {
13082
13082
  let o = "addMatchUpTimeModifiers";
@@ -13101,7 +13101,7 @@ function If({ scheduledDate: e, removePriorValues: t, tournamentRecord: r, drawD
13101
13101
  if (!a) return { error: hr };
13102
13102
  let s = e && nn.test(e);
13103
13103
  if (e && !s) return { error: Ht };
13104
- let o = { itemValue: ve(e), itemType: co };
13104
+ let o = { itemValue: ve(e), itemType: uo };
13105
13105
  return Xr({ duplicateValues: !1, removePriorValues: t, tournamentRecord: r, drawDefinition: i, disableNotice: n, matchUpId: a, timeItem: o });
13106
13106
  }
13107
13107
  function yf({ removePriorValues: e, tournamentRecords: t, tournamentRecord: r, drawDefinition: i, disableNotice: n, courtDayDate: a, matchUpId: s, courtIds: o }) {
@@ -13128,13 +13128,13 @@ function $c({ removePriorValues: e, tournamentRecords: t, tournamentRecord: r, d
13128
13128
  let o = Ln({ tournamentRecords: t, tournamentRecord: r, venueId: s });
13129
13129
  if (o.error) return o;
13130
13130
  }
13131
- return Xr({ duplicateValues: !1, removePriorValues: e, tournamentRecord: r, drawDefinition: i, disableNotice: n, matchUpId: a, timeItem: { itemType: oo, itemValue: s } });
13131
+ return Xr({ duplicateValues: !1, removePriorValues: e, tournamentRecord: r, drawDefinition: i, disableNotice: n, matchUpId: a, timeItem: { itemType: co, itemValue: s } });
13132
13132
  }
13133
- function To({ removePriorValues: e, tournamentRecords: t, tournamentRecord: r, drawDefinition: i, disableNotice: n, courtDayDate: a, matchUpId: s, courtId: o }) {
13133
+ function Po({ removePriorValues: e, tournamentRecords: t, tournamentRecord: r, drawDefinition: i, disableNotice: n, courtDayDate: a, matchUpId: s, courtId: o }) {
13134
13134
  if (!r && !t) return { error: J };
13135
13135
  if (!s) return { error: hr };
13136
13136
  if (o) {
13137
- let c = mo({ tournamentRecords: t, tournamentRecord: r, courtId: o });
13137
+ let c = fo({ tournamentRecords: t, tournamentRecord: r, courtId: o });
13138
13138
  if (c.error) return c;
13139
13139
  let u = c.venue?.venueId;
13140
13140
  $c({ tournamentRecords: t, tournamentRecord: r, drawDefinition: i, disableNotice: n, matchUpId: s, venueId: u });
@@ -13200,7 +13200,7 @@ function Uf(e) {
13200
13200
  if (N?.error) return F({ result: N, stack: t, context: { courtIds: D } });
13201
13201
  }
13202
13202
  if (U !== void 0 && T !== void 0) {
13203
- let N = To({ courtDayDate: T, disableNotice: !0, removePriorValues: o, tournamentRecords: c, tournamentRecord: u, drawDefinition: l, matchUpId: m, courtId: U });
13203
+ let N = Po({ courtDayDate: T, disableNotice: !0, removePriorValues: o, tournamentRecords: c, tournamentRecord: u, drawDefinition: l, matchUpId: m, courtId: U });
13204
13204
  if (N?.error) return F({ result: N, stack: t, context: { courtId: U } });
13205
13205
  }
13206
13206
  if (E !== void 0) {
@@ -13236,27 +13236,27 @@ function OE({ removePriorValues: e, tournamentRecord: t, drawDefinition: r, disa
13236
13236
  function ZU({ removePriorValues: e, tournamentRecord: t, drawDefinition: r, disableNotice: i, matchUpId: n, startTime: a, event: s }) {
13237
13237
  if (!n) return { error: hr };
13238
13238
  if (!Sc(a)) return { error: Si };
13239
- let { matchUp: o } = at({ drawDefinition: r, event: s, matchUpId: n }), { scheduledDate: c } = po({ matchUp: o }), u = (o?.timeItems ?? []).filter((l) => [Wn, Sn, Jn].includes(l?.itemType)).map((l) => Qi(l.itemValue, c)).reduce((l, d) => !l || d < l ? d : l, void 0);
13239
+ let { matchUp: o } = at({ drawDefinition: r, event: s, matchUpId: n }), { scheduledDate: c } = mo({ matchUp: o }), u = (o?.timeItems ?? []).filter((l) => [Wn, Sn, Jn].includes(l?.itemType)).map((l) => Qi(l.itemValue, c)).reduce((l, d) => !l || d < l ? d : l, void 0);
13240
13240
  if (!u || Qi(a, c) < u) {
13241
13241
  o?.timeItems && (o.timeItems = o.timeItems.filter((d) => d.itemType !== Bi));
13242
- let l = ro(a, !0, !0);
13242
+ let l = io(a, !0, !0);
13243
13243
  return Xr({ duplicateValues: !1, removePriorValues: e, tournamentRecord: t, drawDefinition: r, disableNotice: i, matchUpId: n, timeItem: { itemType: Bi, itemValue: l } });
13244
13244
  } else return { error: HD };
13245
13245
  }
13246
13246
  function eS({ validateTimeSeries: e = !0, removePriorValues: t, tournamentRecord: r, drawDefinition: i, disableNotice: n, matchUpId: a, endTime: s, event: o }) {
13247
13247
  if (!a) return { error: hr };
13248
13248
  if (!Sc(s)) return { error: Si };
13249
- let { matchUp: c } = at({ drawDefinition: i, event: o, matchUpId: a }), { scheduledDate: u } = po({ matchUp: c }), l = (c?.timeItems ?? []).filter((d) => [Bi, Sn, Wn].includes(d?.itemType)).map((d) => Qi(d.itemValue, u)).reduce((d, p) => !d || p > d ? p : d, void 0);
13249
+ let { matchUp: c } = at({ drawDefinition: i, event: o, matchUpId: a }), { scheduledDate: u } = mo({ matchUp: c }), l = (c?.timeItems ?? []).filter((d) => [Bi, Sn, Wn].includes(d?.itemType)).map((d) => Qi(d.itemValue, u)).reduce((d, p) => !d || p > d ? p : d, void 0);
13250
13250
  if (!e || !l || Qi(s, u) > l) {
13251
13251
  c?.timeItems && (c.timeItems = c.timeItems.filter((p) => p.itemType !== Jn));
13252
- let d = ro(s, !0, !0);
13252
+ let d = io(s, !0, !0);
13253
13253
  return Xr({ duplicateValues: !1, removePriorValues: t, tournamentRecord: r, drawDefinition: i, disableNotice: n, matchUpId: a, timeItem: { itemType: Jn, itemValue: d } });
13254
13254
  } else return { error: WD };
13255
13255
  }
13256
13256
  function tS({ removePriorValues: e, tournamentRecord: t, drawDefinition: r, disableNotice: i, matchUpId: n, stopTime: a, event: s }) {
13257
13257
  if (!n) return { error: hr };
13258
13258
  if (!Sc(a)) return { error: Si };
13259
- let { matchUp: o } = at({ drawDefinition: r, event: s, matchUpId: n }), { scheduledDate: c } = po({ matchUp: o }), u = o?.timeItems ?? [];
13259
+ let { matchUp: o } = at({ drawDefinition: r, event: s, matchUpId: n }), { scheduledDate: c } = mo({ matchUp: o }), u = o?.timeItems ?? [];
13260
13260
  if (u.reduce((f, h) => h.itemType === Jn || f, void 0)) return { error: Ag };
13261
13261
  let l = u.filter((f) => [Bi, Sn, Wn].includes(f?.itemType)).sort((f, h) => Qi(f.itemValue, c) - Qi(h.itemValue, c)), d = l[l.length - 1], p = d && d.itemType === Wn, m = l.filter((f) => !p || f.createdAt !== d.createdAt).map((f) => Qi(f.itemValue, c)).reduce((f, h) => !f || h > f ? h : f, void 0);
13262
13262
  if (Qi(a, c) > m) {
@@ -13264,14 +13264,14 @@ function tS({ removePriorValues: e, tournamentRecord: t, drawDefinition: r, disa
13264
13264
  let h = d.createdAt;
13265
13265
  o.timeItems = o.timeItems.filter((g) => g.createdAt !== h);
13266
13266
  }
13267
- let f = { itemValue: ro(a, !0, !0), itemType: Wn };
13267
+ let f = { itemValue: io(a, !0, !0), itemType: Wn };
13268
13268
  return Xr({ duplicateValues: !0, removePriorValues: e, tournamentRecord: t, drawDefinition: r, disableNotice: i, matchUpId: n, timeItem: f });
13269
13269
  } else return { error: qD };
13270
13270
  }
13271
13271
  function rS({ removePriorValues: e, tournamentRecord: t, drawDefinition: r, disableNotice: i, resumeTime: n, matchUpId: a, event: s }) {
13272
13272
  if (!a) return { error: hr };
13273
13273
  if (!Sc(n)) return { error: Si };
13274
- let { matchUp: o } = at({ drawDefinition: r, event: s, matchUpId: a }), { scheduledDate: c } = po({ matchUp: o }), u = o?.timeItems ?? [];
13274
+ let { matchUp: o } = at({ drawDefinition: r, event: s, matchUpId: a }), { scheduledDate: c } = mo({ matchUp: o }), u = o?.timeItems ?? [];
13275
13275
  if (u.reduce((f, h) => h.itemType === Jn || f, void 0)) return { error: Ag };
13276
13276
  let l = u.filter((f) => [Bi, Sn, Wn].includes(f?.itemType)).sort((f, h) => Qi(f.itemValue, c) - Qi(h.itemValue, c)), d = l[l.length - 1], p = d && d.itemType === Sn, m = l.filter((f) => !p || f.createdAt !== d.createdAt).map((f) => Qi(f.itemValue, c)).reduce((f, h) => !f || h > f ? h : f, void 0);
13277
13277
  if (Qi(n, c) > m) {
@@ -13279,7 +13279,7 @@ function rS({ removePriorValues: e, tournamentRecord: t, drawDefinition: r, disa
13279
13279
  let h = d.createdAt;
13280
13280
  o.timeItems = o.timeItems.filter((g) => g.createdAt !== h);
13281
13281
  }
13282
- let f = { itemValue: ro(n, !0, !0), itemType: Sn };
13282
+ let f = { itemValue: io(n, !0, !0), itemType: Sn };
13283
13283
  return Xr({ duplicateValues: !0, removePriorValues: e, tournamentRecord: t, drawDefinition: r, disableNotice: i, matchUpId: a, timeItem: f });
13284
13284
  } else return { error: q1 };
13285
13285
  }
@@ -13325,15 +13325,15 @@ function Wc(e) {
13325
13325
  if (A2(e) && b) return { error: k1 };
13326
13326
  let P = ts(e), M;
13327
13327
  if (v) {
13328
- if (o) Le({ extension: { name: js, value: !0 }, element: I });
13328
+ if (o) Le({ extension: { name: Gs, value: !0 }, element: I });
13329
13329
  else if (c) {
13330
13330
  let $ = I.winningSide, { winningSide: j, scoreStringSide1: V, scoreStringSide2: H, set: W } = jl({ drawDefinition: u, matchUpsMap: h, structure: D, matchUp: I, event: m }), Y = { scoreStringSide1: V, scoreStringSide2: H, sets: W ? [W] : [] };
13331
13331
  if (M = j !== $, P && M) return F({ stack: "winningSideWithDownstreamDependencies", result: { error: Ap }, context: { winningSide: d, matchUp: I } });
13332
- yr({ name: js, element: I }), Object.assign(e, { winningSide: j, dualWinningSideChange: M, projectedWinningSide: j, score: Y });
13332
+ yr({ name: Gs, element: I }), Object.assign(e, { winningSide: j, dualWinningSideChange: M, projectedWinningSide: j, score: Y });
13333
13333
  }
13334
13334
  Gl({ tournamentId: s?.tournamentId, inContextDualMatchUp: y, eventId: m?.eventId, dualMatchUp: I, drawDefinition: u });
13335
13335
  }
13336
- if (v && l && [no].includes(l)) return { info: "Not supported for matchUpType: TEAM", error: z };
13336
+ if (v && l && [ao].includes(l)) return { info: "Not supported for matchUpType: TEAM", error: z };
13337
13337
  if (f && !v && !i) {
13338
13338
  let $ = I.matchUpFormat ?? D?.matchUpFormat ?? u?.matchUpFormat ?? m?.matchUpFormat, j = Zy({ existingMatchUpStatus: I.matchUpStatus, matchUpFormat: $, matchUpStatus: l, winningSide: d, score: f });
13339
13339
  if (j.error) return j;
@@ -13416,7 +13416,7 @@ function LE(e) {
13416
13416
  function _E({ drawDefinition: e, matchUpId: t, event: r }) {
13417
13417
  if (!e) return { error: ne };
13418
13418
  let { matchUp: i } = at({ drawDefinition: e, matchUpId: t, event: r });
13419
- return Le({ extension: { name: js, value: !0 }, element: i });
13419
+ return Le({ extension: { name: Gs, value: !0 }, element: i });
13420
13420
  }
13421
13421
  function BE(e) {
13422
13422
  let t = "setMatchUpFormat", r = se(e, [{ tournamentRecord: !0 }, { [ir]: (v) => qr({ matchUpFormat: v }), [ti]: Xu, matchUpFormat: !0 }]);
@@ -13462,7 +13462,7 @@ function iS({ inheritance: e = !0, tournamentRecord: t, drawDefinition: r, match
13462
13462
  }), (s?.sides || []).forEach((c) => {
13463
13463
  if (o += 1, e === !1) {
13464
13464
  let u = s?.tieFormat, l = c.participantId;
13465
- u && l && yo({ drawDefinition: r, participantId: l, lineUp: [], tieFormat: u });
13465
+ u && l && Uo({ drawDefinition: r, participantId: l, lineUp: [], tieFormat: u });
13466
13466
  }
13467
13467
  Ee({ tournamentId: t?.tournamentId, context: "resetMatchUpLineUps", eventId: n?.eventId, drawDefinition: r, matchUp: a });
13468
13468
  }), { ...x, modificationsCount: o };
@@ -13901,7 +13901,7 @@ function dS({ matchUpPotentialParticipantIds: e, individualParticipantProfiles:
13901
13901
  }
13902
13902
  function Gu({ scheduleCompletedMatchUps: e = !1, scheduleByeMatchUps: t = !1, errorOnAnachronism: r = !1, checkChronology: i = !0, matchUpDependencies: n, removePriorValues: a, tournamentRecords: s, tournamentRecord: o, matchUpDetails: c, matchUpIds: u, schedule: l }) {
13903
13903
  if (!o) return { error: J };
13904
- if (!c && (!u || !Array.isArray(u))) return { error: Ys };
13904
+ if (!c && (!u || !Array.isArray(u))) return { error: Ks };
13905
13905
  if (!c && (!l || typeof l != "object")) return { error: YD };
13906
13906
  let d, p = [], m = 0;
13907
13907
  if (i && !n) {
@@ -14100,7 +14100,7 @@ function K2({ schedulingProfileModifications: e, checkPotentialRequestConflicts:
14100
14100
  let Fe = D[qe], Ke = U[qe];
14101
14101
  if (Fe) {
14102
14102
  let bt = Fe.split(":").map(ci).join(":"), Jt = `${ve(R)}T${bt}`;
14103
- h || (ka({ drawDefinition: he, scheduledTime: Jt, matchUpId: qe }), To({ courtDayDate: R, tournamentRecords: u, tournamentRecord: ee, drawDefinition: he, matchUpId: qe, courtId: Ke })), v[R].push(qe);
14103
+ h || (ka({ drawDefinition: he, scheduledTime: Jt, matchUpId: qe }), Po({ courtDayDate: R, tournamentRecords: u, tournamentRecord: ee, drawDefinition: he, matchUpId: qe, courtId: Ke })), v[R].push(qe);
14104
14104
  }
14105
14105
  });
14106
14106
  });
@@ -14142,7 +14142,7 @@ function X2({ scheduleAttributes: e = ["scheduledDate", "scheduledTime", "courtO
14142
14142
  for (let m of p) {
14143
14143
  let f = !1;
14144
14144
  m.timeItems = (m.timeItems ?? []).filter((h) => {
14145
- let g = h?.itemType && ![On, wa, oo, mm, co, uo].includes(h?.itemType);
14145
+ let g = h?.itemType && ![On, wa, co, mm, uo, lo].includes(h?.itemType);
14146
14146
  return g || (f = !0), g;
14147
14147
  }), f && (Ee({ context: "clear schedules", eventId: l?.eventId, drawDefinition: d, tournamentId: o, matchUp: m }), c += 1);
14148
14148
  }
@@ -14177,7 +14177,7 @@ function pS({ addParticipants: e = !0, participantAttribute: t, tournamentRecord
14177
14177
  if (!r) return { error: J };
14178
14178
  let o = {}, c = (r.participants ?? []).filter(({ participantType: f, participantRole: h }) => f === be && h === nr), u = 0;
14179
14179
  for (let f of c) {
14180
- let h = a && Rs({ element: f, accessor: a })?.value || i && f.person?.[i] || t && f[t];
14180
+ let h = a && Ns({ element: f, accessor: a })?.value || i && f.person?.[i] || t && f[t];
14181
14181
  if (h) {
14182
14182
  if (!Object.keys(o).includes(h)) {
14183
14183
  o[h] = { participantName: n?.[u] ?? h, participantId: s?.pop() ?? Be(), individualParticipantIds: [], participantRole: nr, participantType: Ge };
@@ -14241,7 +14241,7 @@ function qf(e) {
14241
14241
  function eA(e) {
14242
14242
  let t = e?.count || 1, { personExtensions: r, consideredDate: i, isMock: n = !0, gendersCount: a, personData: s, category: o, sex: c } = e || {};
14243
14243
  if (isNaN(t)) return { error: z };
14244
- let u = a?.[Et] || Ts(c) && t || 0, l = a?.[rr] || _a(c) && t || 0;
14244
+ let u = a?.[Et] || Ps(c) && t || 0, l = a?.[rr] || _a(c) && t || 0;
14245
14245
  t = Math.max(t, u + l);
14246
14246
  let d = t - (u + l), p = u && qf({ count: u, sex: Et }).personData || [], m = l && qf({ count: l, sex: rr }).personData || [], f = [...p, ...m, ...d && qf({ count: d }).personData || []], h = f.filter((T) => !c || u && l || T.sex === c), g = [];
14247
14247
  if (Array.isArray(s)) {
@@ -14260,7 +14260,7 @@ function eA(e) {
14260
14260
  I.push(k);
14261
14261
  });
14262
14262
  }
14263
- let { ageMinDate: y, ageMaxDate: U } = Ls({ consideredDate: i, category: o }), D = pe(y?.slice(0, 4) || 0) || pe(U?.slice(0, 4) || 0) - 3, v = pe(U?.slice(0, 4) || 0) || pe(y?.slice(0, 4) || 0) + 3, w = (y || U) && [D, v], S = I.slice(0, t).map((T, b) => {
14263
+ let { ageMinDate: y, ageMaxDate: U } = _s({ consideredDate: i, category: o }), D = pe(y?.slice(0, 4) || 0) || pe(U?.slice(0, 4) || 0) - 3, v = pe(U?.slice(0, 4) || 0) || pe(y?.slice(0, 4) || 0) + 3, w = (y || U) && [D, v], S = I.slice(0, t).map((T, b) => {
14264
14264
  let [P, M] = w || [], R = w && jr(te(P, M)), E = jr(te(0, 365)), A = R && xO(R, E);
14265
14265
  return Object.assign(ae({ extensions: r || [{ name: "regionCode", value: b + 1 }], birthDate: A, isMock: n }), T);
14266
14266
  });
@@ -14316,9 +14316,9 @@ function qc(e) {
14316
14316
  }
14317
14317
  let It = (je) => {
14318
14318
  let Bt = je.categoryName || je.ratingType || je.ageCategoryCode, Yi = B[Bt]?.[de], Zt = _[Bt]?.[de];
14319
- dd({ scaleValue: Yi, eventType: _s, scaleType: ga, participant: gt, category: je }), dd({ scaleValue: Zt, eventType: Hn, scaleType: ga, participant: gt, category: je });
14319
+ dd({ scaleValue: Yi, eventType: Bs, scaleType: ga, participant: gt, category: je }), dd({ scaleValue: Zt, eventType: Hn, scaleType: ga, participant: gt, category: je });
14320
14320
  let _i = G[Bt]?.[de], hn = $[Bt]?.[de];
14321
- dd({ scaleValue: _i, eventType: _s, scaleType: pa, participant: gt, category: je }), dd({ scaleValue: hn, eventType: Hn, scaleType: pa, participant: gt, category: je });
14321
+ dd({ scaleValue: _i, eventType: Bs, scaleType: pa, participant: gt, category: je }), dd({ scaleValue: hn, eventType: Hn, scaleType: pa, participant: gt, category: je });
14322
14322
  };
14323
14323
  return Array.isArray(o) ? o.forEach((je) => It(je)) : c && It(c), gt;
14324
14324
  }
@@ -14353,7 +14353,7 @@ function zv(e) {
14353
14353
  return { singlesRankings: c, doublesRankings: o, singlesRatings: u, doublesRatings: l };
14354
14354
  }
14355
14355
  function mS(e) {
14356
- let { alternatesCount: t = 0, tieFormatName: r, drawSize: i } = e, n = 0, a = 0, s = 0, o = 0, c = {}, u = { [Et]: 0, [rr]: 0, [to]: 0, [Bn]: 0, ANY: 0 };
14356
+ let { alternatesCount: t = 0, tieFormatName: r, drawSize: i } = e, n = 0, a = 0, s = 0, o = 0, c = {}, u = { [Et]: 0, [rr]: 0, [ro]: 0, [Bn]: 0, ANY: 0 };
14357
14357
  (Ce(e.tieFormat) ? e.tieFormat : qn({ namedFormat: r }))?.collectionDefinitions?.filter(Boolean).forEach((m) => {
14358
14358
  let { category: f, collectionId: h, matchUpType: g, matchUpCount: I, gender: y } = m;
14359
14359
  if (rn(y)) {
@@ -14377,7 +14377,7 @@ function mS(e) {
14377
14377
  return { maxDoublesDraw: d, maxSinglesDraw: p, teamSize: l, genders: u };
14378
14378
  }
14379
14379
  function tj({ participantsProfile: e, eventProfiles: t, drawProfiles: r }) {
14380
- let { participantsCount: i, participantType: n = be } = e || {}, a = i || 0, s = { [rr]: 0, [to]: 0, [Bn]: 0, [Et]: 0, ANY: 0 }, o = 0, c = 0, u = 0, l = 0, d = 0, p = ({ alternatesCount: f = 0, uniqueParticipants: h, tieFormatName: g, drawSize: I = 0, eventType: y, tieFormat: U, category: D, gender: v, stage: w }) => {
14380
+ let { participantsCount: i, participantType: n = be } = e || {}, a = i || 0, s = { [rr]: 0, [ro]: 0, [Bn]: 0, [Et]: 0, ANY: 0 }, o = 0, c = 0, u = 0, l = 0, d = 0, p = ({ alternatesCount: f = 0, uniqueParticipants: h, tieFormatName: g, drawSize: I = 0, eventType: y, tieFormat: U, category: D, gender: v, stage: w }) => {
14381
14381
  let S = y === di, T = y === Ct, b = !!(h || w === oe || D || v);
14382
14382
  if (T) {
14383
14383
  l = Math.max(l, I + f), U = typeof U == "object" ? U : qn({ namedFormat: g });
@@ -14493,7 +14493,7 @@ function ij({ weightedRange: e = [0, 1], pointsPerMinute: t, matchUpStatus: r, i
14493
14493
  function mp(e) {
14494
14494
  let { matchUpStatusProfile: t, completeAllMatchUps: r, randomWinningSide: i, tournamentRecord: n, completionGoal: a, drawDefinition: s, event: o } = e;
14495
14495
  if (!s) return { error: ne };
14496
- let c = e.matchUpFormat || s.matchUpFormat || o?.matchUpFormat, u = s.structures.slice().sort(ao), l = 0, { matchUps: d, matchUpsMap: p } = Rt({ matchUpFilters: { matchUpTypes: [rt], roundNumbers: [1] }, contextFilters: { stages: [re, oe] }, inContext: !0, drawDefinition: s });
14496
+ let c = e.matchUpFormat || s.matchUpFormat || o?.matchUpFormat, u = s.structures.slice().sort(so), l = 0, { matchUps: d, matchUpsMap: p } = Rt({ matchUpFilters: { matchUpTypes: [rt], roundNumbers: [1] }, contextFilters: { stages: [re, oe] }, inContext: !0, drawDefinition: s });
14497
14497
  if (d?.length) {
14498
14498
  let I = o?.category?.ageCategoryCode || o?.category?.categoryName;
14499
14499
  if (I) {
@@ -14540,7 +14540,7 @@ function mp(e) {
14540
14540
  if (l >= a) break;
14541
14541
  let y = s.structures.find((v) => v.structureId === I), U = _e({ contextFilters: { matchUpTypes: [We, ze] }, afterRecoveryTimes: !1, tournamentRecord: n, inContext: !0, drawDefinition: s, matchUpsMap: p, structure: y, event: o }).matchUps;
14542
14542
  U.length;
14543
- let D = U.filter(({ winningSide: v }) => !v).sort(fo).map(Gt);
14543
+ let D = U.filter(({ winningSide: v }) => !v).sort(ho).map(Gt);
14544
14544
  for (let v of D) {
14545
14545
  if (!isNaN(a) && l >= a) break;
14546
14546
  let { matchUps: w } = _e({ matchUpFilters: { matchUpTypes: [We, ze] }, afterRecoveryTimes: !1, tournamentRecord: n, inContext: !0, drawDefinition: s, matchUpsMap: p, structure: y, event: o }), S = w.find((b) => b.matchUpId === v), T = [dt, Ot].includes(S.matchUpStatus);
@@ -14643,7 +14643,7 @@ function cA(e) {
14643
14643
  let q = D.filter(on);
14644
14644
  q?.length && Object.assign(j, { extensions: q });
14645
14645
  }
14646
- if (Array.isArray(P) && P.forEach((q) => So({ event: W, timeItem: q })), typeof y == "object") for (let q of Object.keys(y)) es({ policyDefinitions: { [q]: y[q] }, event: j });
14646
+ if (Array.isArray(P) && P.forEach((q) => vo({ event: W, timeItem: q })), typeof y == "object") for (let q of Object.keys(y)) es({ policyDefinitions: { [q]: y[q] }, event: j });
14647
14647
  j.category && (j.category.categoryName = $);
14648
14648
  let V, H = _c({ suppressNotifications: !1, internalUse: !0, tournamentRecord: u, event: j });
14649
14649
  if (H.error) return H;
@@ -14665,7 +14665,7 @@ function cA(e) {
14665
14665
  }
14666
14666
  function hS({ tournamentRecords: e, scheduleDate: t, venueId: r, round: i }) {
14667
14667
  if (!kr(t)) return { error: Ht };
14668
- let n = "addSchedulingProfileRound", { extension: a } = De({ name: Gs, tournamentRecords: e, discover: !0 }), s = a?.value || [], o = s.find((p) => Pn(t, p.scheduleDate));
14668
+ let n = "addSchedulingProfileRound", { extension: a } = De({ name: $s, tournamentRecords: e, discover: !0 }), s = a?.value || [], o = s.find((p) => Pn(t, p.scheduleDate));
14669
14669
  if (!o) {
14670
14670
  let { startDate: p, endDate: m } = Hm({ tournamentRecords: e }), f = new Date(t);
14671
14671
  if (p && f < new Date(p) || m && f > new Date(m)) return { error: Ht };
@@ -14710,7 +14710,7 @@ function Tf(e) {
14710
14710
  let Re = !$e.participantsCount || $e.participantsCount > $e.drawSize ? $e.drawSize : $e.participantsCount || 0;
14711
14711
  return le + Re;
14712
14712
  }, 0) || 0) * (V === we ? 2 : 1), X = (!p.participantsCount || p.participantsCount > G ? G : p.participantsCount) || 0, Q = { eventName: Y, eventType: j, tieFormat: H, category: k, eventId: $, gender: _ };
14713
- Array.isArray(N) && N.forEach((le) => So({ event: Q, timeItem: le }));
14713
+ Array.isArray(N) && N.forEach((le) => vo({ event: Q, timeItem: le }));
14714
14714
  let { eventAttributes: Z } = p;
14715
14715
  if (typeof Z != "object" && (Z = {}), Object.assign(Q, Z), b?.length && Array.isArray(b)) {
14716
14716
  let le = b.filter(on);
@@ -14858,7 +14858,7 @@ function lA({ dateAvailability: e }) {
14858
14858
  }
14859
14859
  function Pf({ tournamentRecord: e, disableNotice: t, venueId: r, courtId: i, court: n }) {
14860
14860
  let { venue: a } = Ln({ tournamentRecord: e, venueId: r });
14861
- if (!a) return { error: Js };
14861
+ if (!a) return { error: Zs };
14862
14862
  a.courts || (a.courts = []);
14863
14863
  let s = { ...uA(), venueId: r, courtId: i };
14864
14864
  if (s.courtId || (s.courtId = Be()), a.courts.some((o) => o.courtId === s.courtId)) return { error: GD };
@@ -14886,7 +14886,7 @@ function gS(e) {
14886
14886
  a = !0;
14887
14887
  }
14888
14888
  }
14889
- return a ? { ...x, courtIds: n } : { error: Js };
14889
+ return a ? { ...x, courtIds: n } : { error: Zs };
14890
14890
  }
14891
14891
  function uj({ courtNameRoot: e = "Court", dateAvailability: t = [], venueAbbreviationRoot: r, tournamentRecord: i, courtNames: n = [], courtTimings: a, courtsCount: s, startTime: o, courtIds: c, endTime: u, idPrefix: l, venueId: d, dates: p }) {
14892
14892
  if (!d) return { error: ba };
@@ -14928,7 +14928,7 @@ function lj(e) {
14928
14928
  i.push(U);
14929
14929
  let D = Ce(l.tieFormat) && l.tieFormat || qn({ event: { eventId: U, category: h, gender: I }, namedFormat: p, isMock: e.isMock }) || void 0;
14930
14930
  if (!D) return { error: gc };
14931
- let v = Math.max(f, m.length), w = te(0, v), { genders: S, teamSize: T } = mS({ tieFormat: D, drawSize: v }), b = { [rr]: 0, [to]: 0, [Bn]: 0, [Et]: 0, ANY: 0 };
14931
+ let v = Math.max(f, m.length), w = te(0, v), { genders: S, teamSize: T } = mS({ tieFormat: D, drawSize: v }), b = { [rr]: 0, [ro]: 0, [Bn]: 0, [Et]: 0, ANY: 0 };
14932
14932
  Object.keys(S).forEach((M) => b[M] += S[M]);
14933
14933
  for (let M of w) {
14934
14934
  let R = m?.[M]?.teamName ?? `Team ${M + 1}`, E = m?.[M]?.teamId || o?.pop() || Be(), A = l.startDate ?? e.startDate, N = qc({ ...l?.participantsProfile, participantsCount: T, consideredDate: A, gendersCount: b, category: h, uuids: o }).participants, C = N.map((G) => G.participantId), k = Ge, O = E ?? dp({ participantType: k, idPrefix: g, index: M, uuids: o });
@@ -15106,7 +15106,7 @@ function mA({ keepExtensions: e = [], anonymizeParticipantNames: t = !0, tournam
15106
15106
  E.forEach((O, L) => {
15107
15107
  O.participantName = N[L];
15108
15108
  });
15109
- let { extension: C } = De({ element: r, name: Gs });
15109
+ let { extension: C } = De({ element: r, name: $s });
15110
15110
  Array.isArray(C?.value) && C?.value.forEach((O) => {
15111
15111
  O.tournamentId = c[O.tournamentId], O.structureId = c[O.structureId], O.eventId = c[O.eventId], O.drawId = c[O.drawId];
15112
15112
  });
@@ -15175,9 +15175,9 @@ function fA(e) {
15175
15175
  return { totalParticipantsCount: u.participants.length, scheduledRounds: S, schedulerResult: T, ...x, eventIds: y, venueIds: w, drawIds: U };
15176
15176
  }
15177
15177
  var hA = {};
15178
- Te(hA, { addDynamicRatings: () => Wy, addIndividualParticipantIds: () => hf, addParticipant: () => ln, addParticipants: () => ki, addPenalty: () => FA, addPersonRequests: () => vA, addPersons: () => LA, createGroupParticipant: () => MA, createTeamsFromParticipantAttributes: () => pS, deleteParticipants: () => go, filterParticipants: () => Al, findParticipant: () => bA, getCompetitionParticipants: () => nU, getPairedParticipant: () => Oi, getParticipantEventDetails: () => aU, getParticipantMembership: () => sU, getParticipantScaleItem: () => ac, getParticipantSchedules: () => oU, getParticipantSignInStatus: () => cU, getParticipantTimeItem: () => xI, getParticipants: () => pt, getScaleValues: () => Dc, mergeParticipants: () => xA, modifyIndividualParticipantIds: () => wA, modifyParticipant: () => gf, modifyParticipantName: () => RA, modifyParticipantOtherName: () => TA, modifyParticipantsSignInStatus: () => DA, modifyPenalty: () => OA, modifyPersonRequests: () => UA, mutate: () => gA, participantScaleItem: () => vn, query: () => UN, regenerateParticipantNames: () => PA, removeIndividualParticipantIds: () => ty, removeParticipantIdsFromAllTeams: () => vm, removePenalty: () => AA, removePersonRequests: () => SA, removeRatings: () => EA, scaledTeamAssignment: () => NA, setParticipantScaleItem: () => zl, setParticipantScaleItems: () => yR, validateLineUp: () => Dm });
15178
+ Te(hA, { addDynamicRatings: () => Wy, addIndividualParticipantIds: () => hf, addParticipant: () => ln, addParticipants: () => ki, addPenalty: () => FA, addPersonRequests: () => vA, addPersons: () => LA, createGroupParticipant: () => MA, createTeamsFromParticipantAttributes: () => pS, deleteParticipants: () => Io, filterParticipants: () => Al, findParticipant: () => bA, getCompetitionParticipants: () => nU, getPairedParticipant: () => Oi, getParticipantEventDetails: () => aU, getParticipantMembership: () => sU, getParticipantScaleItem: () => ac, getParticipantSchedules: () => oU, getParticipantSignInStatus: () => cU, getParticipantTimeItem: () => xI, getParticipants: () => pt, getScaleValues: () => Dc, mergeParticipants: () => xA, modifyIndividualParticipantIds: () => wA, modifyParticipant: () => gf, modifyParticipantName: () => RA, modifyParticipantOtherName: () => TA, modifyParticipantsSignInStatus: () => DA, modifyPenalty: () => OA, modifyPersonRequests: () => UA, mutate: () => gA, participantScaleItem: () => vn, query: () => UN, regenerateParticipantNames: () => PA, removeIndividualParticipantIds: () => ty, removeParticipantIdsFromAllTeams: () => vm, removePenalty: () => AA, removePersonRequests: () => SA, removeRatings: () => EA, scaledTeamAssignment: () => NA, setParticipantScaleItem: () => zl, setParticipantScaleItems: () => yR, validateLineUp: () => Dm });
15179
15179
  var gA = {};
15180
- Te(gA, { addDynamicRatings: () => Wy, addIndividualParticipantIds: () => hf, addParticipant: () => ln, addParticipants: () => ki, addPenalty: () => FA, addPersonRequests: () => vA, addPersons: () => LA, createGroupParticipant: () => MA, createTeamsFromParticipantAttributes: () => pS, deleteParticipants: () => go, findParticipant: () => bA, mergeParticipants: () => xA, modifyIndividualParticipantIds: () => wA, modifyParticipant: () => gf, modifyParticipantName: () => RA, modifyParticipantOtherName: () => TA, modifyParticipantsSignInStatus: () => DA, modifyPenalty: () => OA, modifyPersonRequests: () => UA, regenerateParticipantNames: () => PA, removeIndividualParticipantIds: () => ty, removeParticipantIdsFromAllTeams: () => vm, removePenalty: () => AA, removePersonRequests: () => SA, removeRatings: () => EA, scaledTeamAssignment: () => NA, setParticipantScaleItem: () => zl, setParticipantScaleItems: () => yR });
15180
+ Te(gA, { addDynamicRatings: () => Wy, addIndividualParticipantIds: () => hf, addParticipant: () => ln, addParticipants: () => ki, addPenalty: () => FA, addPersonRequests: () => vA, addPersons: () => LA, createGroupParticipant: () => MA, createTeamsFromParticipantAttributes: () => pS, deleteParticipants: () => Io, findParticipant: () => bA, mergeParticipants: () => xA, modifyIndividualParticipantIds: () => wA, modifyParticipant: () => gf, modifyParticipantName: () => RA, modifyParticipantOtherName: () => TA, modifyParticipantsSignInStatus: () => DA, modifyPenalty: () => OA, modifyPersonRequests: () => UA, regenerateParticipantNames: () => PA, removeIndividualParticipantIds: () => ty, removeParticipantIdsFromAllTeams: () => vm, removePenalty: () => AA, removePersonRequests: () => SA, removeRatings: () => EA, scaledTeamAssignment: () => NA, setParticipantScaleItem: () => zl, setParticipantScaleItems: () => yR });
15181
15181
  function IA(e = 0) {
15182
15182
  (typeof e != "number" || isNaN(e)) && (e = 0);
15183
15183
  let t = /* @__PURE__ */ new Date();
@@ -15532,7 +15532,7 @@ function LA({ participantRole: e = nr, tournamentRecord: t, persons: r }) {
15532
15532
  return { ...x, addedCount: m, newPersonIds: n };
15533
15533
  }
15534
15534
  var _A = {};
15535
- Te(_A, { bulkUpdatePublishedEventIds: () => hU, getAllEventData: () => gU, getCourtInfo: () => gm, getDrawData: () => Km, getEventData: () => Xm, getEventPublishStatus: () => Ui, getPublishState: () => ho, getTournamentPublishStatus: () => El, getVenueData: () => ic, mutate: () => BA, publishEvent: () => Vc, publishEventSeeding: () => VA, publishOrderOfPlay: () => qA, publishParticipants: () => WA, query: () => PN, setEventDisplay: () => lf, unPublishEvent: () => HA, unPublishEventSeeding: () => jA, unPublishOrderOfPlay: () => $A, unPublishParticipants: () => GA });
15535
+ Te(_A, { bulkUpdatePublishedEventIds: () => hU, getAllEventData: () => gU, getCourtInfo: () => gm, getDrawData: () => Km, getEventData: () => Xm, getEventPublishStatus: () => Ui, getPublishState: () => go, getTournamentPublishStatus: () => El, getVenueData: () => ic, mutate: () => BA, publishEvent: () => Vc, publishEventSeeding: () => VA, publishOrderOfPlay: () => qA, publishParticipants: () => WA, query: () => PN, setEventDisplay: () => lf, unPublishEvent: () => HA, unPublishEventSeeding: () => jA, unPublishOrderOfPlay: () => $A, unPublishParticipants: () => GA });
15536
15536
  var BA = {};
15537
15537
  Te(BA, { publishEvent: () => Vc, publishEventSeeding: () => VA, publishOrderOfPlay: () => qA, publishParticipants: () => WA, setEventDisplay: () => lf, unPublishEvent: () => HA, unPublishEventSeeding: () => jA, unPublishOrderOfPlay: () => $A, unPublishParticipants: () => GA });
15538
15538
  function VA({ removePriorValues: e = !0, stageSeedingScaleNames: t, seedingScaleNames: r, tournamentRecord: i, status: n = ni, drawIds: a = [], event: s }) {
@@ -15612,7 +15612,7 @@ function HA({ removePriorValues: e = !0, tournamentRecord: t, status: r = ni, ev
15612
15612
  if (!t) return { error: J };
15613
15613
  if (!i) return { error: it };
15614
15614
  let n = `${Aa}.${Ca}`, { timeItem: a } = fl({ itemType: n, event: i }), s = a?.itemValue || { [r]: {} };
15615
- return delete s[r].structureIds, delete s[r].drawDetails, delete s[r].drawIds, So({ event: i, timeItem: { itemValue: s, itemType: n }, removePriorValues: e }), Bc({ statusObject: { structureIds: void 0, drawIds: void 0, seeding: void 0 }, removePriorValues: e, status: r, event: i }), Ue({ topic: EI, payload: { tournamentId: t.tournamentId, eventId: i.eventId } }), { eventId: i.eventId, ...x };
15615
+ return delete s[r].structureIds, delete s[r].drawDetails, delete s[r].drawIds, vo({ event: i, timeItem: { itemValue: s, itemType: n }, removePriorValues: e }), Bc({ statusObject: { structureIds: void 0, drawIds: void 0, seeding: void 0 }, removePriorValues: e, status: r, event: i }), Ue({ topic: EI, payload: { tournamentId: t.tournamentId, eventId: i.eventId } }), { eventId: i.eventId, ...x };
15616
15616
  }
15617
15617
  var zA = {};
15618
15618
  Te(zA, { getEntryStatusReports: () => bj, getParticipantStats: () => Pj, getStructureReports: () => Rj, getVenuesReport: () => Ej });
@@ -15736,7 +15736,7 @@ function hp({ participant: e, eventType: t }) {
15736
15736
  }
15737
15737
  function bj({ tournamentRecord: e }) {
15738
15738
  if (!e) return { error: J };
15739
- let t = e.tournamentId, { participantMap: r } = pt({ withScaleValues: !0, withEvents: !0, withSeeding: !0, tournamentRecord: e, withDraws: !0 }), i = (Qt({ matchUpFilters: { matchUpTypes: [bs, Wa] }, tournamentRecord: e }).matchUps ?? []).flatMap(({ sides: m, matchUpType: f }) => m?.flatMap((h) => f === Wa ? h?.participant?.individualParticipantIds : h?.participant?.participantId || h.participantId).filter(Boolean)).filter(Boolean), n = [], a = {}, s = {}, o = {}, c = 0, u = ({ id: m, entry: f, eventId: h, eventType: g }) => {
15739
+ let t = e.tournamentId, { participantMap: r } = pt({ withScaleValues: !0, withEvents: !0, withSeeding: !0, tournamentRecord: e, withDraws: !0 }), i = (Qt({ matchUpFilters: { matchUpTypes: [Ms, Wa] }, tournamentRecord: e }).matchUps ?? []).flatMap(({ sides: m, matchUpType: f }) => m?.flatMap((h) => f === Wa ? h?.participant?.individualParticipantIds : h?.participant?.participantId || h.participantId).filter(Boolean)).filter(Boolean), n = [], a = {}, s = {}, o = {}, c = 0, u = ({ id: m, entry: f, eventId: h, eventType: g }) => {
15740
15740
  let { qualifyingSeeding: I, mainSeeding: y, entryStatus: U, entryStage: D, drawId: v } = f;
15741
15741
  a[m] || (a[m] = []);
15742
15742
  let { participant: w, events: S } = r?.[m] ?? {}, T = hp({ participant: w, eventType: g }), b = S?.[h]?.ranking;
@@ -15793,7 +15793,7 @@ function Rj(e) {
15793
15793
  let { tournamentRecord: t, extensionProfiles: r, firstFlightOnly: i, firstStageSequenceOnly: n = !0 } = e;
15794
15794
  if (!t) return { error: $o };
15795
15795
  let a = [], s = {}, o = {}, c = [], u = Object.assign({}, ...(r ?? []).map(({ name: h, label: g, accessor: I }) => {
15796
- let y = De({ element: t, name: h })?.extension?.value, U = I ? Rs({ element: y, accessor: I })?.value : y;
15796
+ let y = De({ element: t, name: h })?.extension?.value, U = I ? Ns({ element: y, accessor: I })?.value : y;
15797
15797
  return { [g ?? h]: U };
15798
15798
  })), l = t?.tournamentId, d = Qt({ participantsProfile: { withScaleValues: !0 }, tournamentRecord: t }).matchUps ?? [], p = (h) => gi({ itemType: SI, itemSubTypes: [Un], element: { timeItems: h } })?.timeItem?.itemValue?.scaleBasis, m = ({ positionManipulations: h }) => {
15799
15799
  h?.forEach((g) => {
@@ -15853,9 +15853,9 @@ function Aj(e, t, r) {
15853
15853
  }), { venueId: i, venueName: a, venueReport: s };
15854
15854
  }
15855
15855
  var YA = {};
15856
- Te(YA, { addMatchUpCourtOrder: () => JU, addMatchUpEndTime: () => eS, addMatchUpOfficial: () => OE, addMatchUpResumeTime: () => rS, addMatchUpScheduleItems: () => Uf, addMatchUpScheduledDate: () => If, addMatchUpScheduledTime: () => ka, addMatchUpStartTime: () => ZU, addMatchUpStopTime: () => tS, addSchedulingProfileRound: () => hS, allocateTeamMatchUpCourts: () => yf, assignMatchUpCourt: () => To, assignMatchUpVenue: () => $c, bulkRescheduleMatchUps: () => rC, bulkScheduleMatchUps: () => ad, bulkScheduleTournamentMatchUps: () => Gu, bulkUpdateCourtAssignments: () => JA, calculateScheduleTimes: () => US, clearMatchUpSchedule: () => nC, clearScheduledMatchUps: () => vf, courtGridRows: () => tf, findMatchUpFormatTiming: () => Jm, findVenue: () => Ln, generateBookings: () => Sf, generateVirtualCourts: () => pf, getMatchUpsToSchedule: () => Qm, getPersonRequests: () => Us, getProfileRounds: () => ef, getScheduledRoundsDetails: () => Kl, getSchedulingProfile: () => oa, getSchedulingProfileIssues: () => IU, matchUpScheduleChange: () => iC, modifyMatchUpFormatTiming: () => FU, mutate: () => KA, proAutoSchedule: () => QA, proConflicts: () => eC, publicFindCourt: () => HI, query: () => EN, removeEventMatchUpFormatTiming: () => uf, removeMatchUpCourtAssignment: () => XA, reorderUpcomingMatchUps: () => tC, scheduleMatchUps: () => ZA, scheduleProfileRounds: () => wf, setMatchUpDailyLimits: () => aC, setMatchUpHomeParticipantId: () => QU, setSchedulingProfile: () => Fc, toggleParticipantCheckInState: () => ff, validateSchedulingProfile: () => Zm });
15856
+ Te(YA, { addMatchUpCourtOrder: () => JU, addMatchUpEndTime: () => eS, addMatchUpOfficial: () => OE, addMatchUpResumeTime: () => rS, addMatchUpScheduleItems: () => Uf, addMatchUpScheduledDate: () => If, addMatchUpScheduledTime: () => ka, addMatchUpStartTime: () => ZU, addMatchUpStopTime: () => tS, addSchedulingProfileRound: () => hS, allocateTeamMatchUpCourts: () => yf, assignMatchUpCourt: () => Po, assignMatchUpVenue: () => $c, bulkRescheduleMatchUps: () => rC, bulkScheduleMatchUps: () => ad, bulkScheduleTournamentMatchUps: () => Gu, bulkUpdateCourtAssignments: () => JA, calculateScheduleTimes: () => US, clearMatchUpSchedule: () => nC, clearScheduledMatchUps: () => vf, courtGridRows: () => tf, findMatchUpFormatTiming: () => Jm, findVenue: () => Ln, generateBookings: () => Sf, generateVirtualCourts: () => pf, getMatchUpsToSchedule: () => Qm, getPersonRequests: () => Us, getProfileRounds: () => ef, getScheduledRoundsDetails: () => Kl, getSchedulingProfile: () => oa, getSchedulingProfileIssues: () => IU, matchUpScheduleChange: () => iC, modifyMatchUpFormatTiming: () => FU, mutate: () => KA, proAutoSchedule: () => QA, proConflicts: () => eC, publicFindCourt: () => HI, query: () => EN, removeEventMatchUpFormatTiming: () => uf, removeMatchUpCourtAssignment: () => XA, reorderUpcomingMatchUps: () => tC, scheduleMatchUps: () => ZA, scheduleProfileRounds: () => wf, setMatchUpDailyLimits: () => aC, setMatchUpHomeParticipantId: () => QU, setSchedulingProfile: () => Fc, toggleParticipantCheckInState: () => ff, validateSchedulingProfile: () => Zm });
15857
15857
  var KA = {};
15858
- Te(KA, { addMatchUpCourtOrder: () => JU, addMatchUpEndTime: () => eS, addMatchUpOfficial: () => OE, addMatchUpResumeTime: () => rS, addMatchUpScheduleItems: () => Uf, addMatchUpScheduledDate: () => If, addMatchUpScheduledTime: () => ka, addMatchUpStartTime: () => ZU, addMatchUpStopTime: () => tS, addSchedulingProfileRound: () => hS, allocateTeamMatchUpCourts: () => yf, assignMatchUpCourt: () => To, assignMatchUpVenue: () => $c, bulkRescheduleMatchUps: () => rC, bulkScheduleMatchUps: () => ad, bulkScheduleTournamentMatchUps: () => Gu, bulkUpdateCourtAssignments: () => JA, calculateScheduleTimes: () => US, clearMatchUpSchedule: () => nC, clearScheduledMatchUps: () => vf, findMatchUpFormatTiming: () => Jm, generateBookings: () => Sf, generateVirtualCourts: () => pf, matchUpScheduleChange: () => iC, modifyMatchUpFormatTiming: () => FU, proAutoSchedule: () => QA, proConflicts: () => eC, removeEventMatchUpFormatTiming: () => uf, removeMatchUpCourtAssignment: () => XA, reorderUpcomingMatchUps: () => tC, scheduleMatchUps: () => ZA, scheduleProfileRounds: () => wf, setMatchUpDailyLimits: () => aC, setMatchUpHomeParticipantId: () => QU, setSchedulingProfile: () => Fc, toggleParticipantCheckInState: () => ff, validateSchedulingProfile: () => Zm });
15858
+ Te(KA, { addMatchUpCourtOrder: () => JU, addMatchUpEndTime: () => eS, addMatchUpOfficial: () => OE, addMatchUpResumeTime: () => rS, addMatchUpScheduleItems: () => Uf, addMatchUpScheduledDate: () => If, addMatchUpScheduledTime: () => ka, addMatchUpStartTime: () => ZU, addMatchUpStopTime: () => tS, addSchedulingProfileRound: () => hS, allocateTeamMatchUpCourts: () => yf, assignMatchUpCourt: () => Po, assignMatchUpVenue: () => $c, bulkRescheduleMatchUps: () => rC, bulkScheduleMatchUps: () => ad, bulkScheduleTournamentMatchUps: () => Gu, bulkUpdateCourtAssignments: () => JA, calculateScheduleTimes: () => US, clearMatchUpSchedule: () => nC, clearScheduledMatchUps: () => vf, findMatchUpFormatTiming: () => Jm, generateBookings: () => Sf, generateVirtualCourts: () => pf, matchUpScheduleChange: () => iC, modifyMatchUpFormatTiming: () => FU, proAutoSchedule: () => QA, proConflicts: () => eC, removeEventMatchUpFormatTiming: () => uf, removeMatchUpCourtAssignment: () => XA, reorderUpcomingMatchUps: () => tC, scheduleMatchUps: () => ZA, scheduleProfileRounds: () => wf, setMatchUpDailyLimits: () => aC, setMatchUpHomeParticipantId: () => QU, setSchedulingProfile: () => Fc, toggleParticipantCheckInState: () => ff, validateSchedulingProfile: () => Zm });
15859
15859
  function US({ calculateStartTimeFromCourts: e = !0, defaultRecoveryMinutes: t = 0, averageMatchUpMinutes: r = 90, remainingScheduleTimes: i, clearScheduleDates: n, tournamentRecords: a, periodLength: s, scheduleDate: o, startTime: c, venueIds: u, endTime: l }) {
15860
15860
  if (typeof a != "object" || !Object.keys(a).length) return { error: mt };
15861
15861
  s = s ?? mf({ recoveryMinutes: t, averageMatchUpMinutes: r });
@@ -15890,7 +15890,7 @@ function XA(e) {
15890
15890
  if (p?.matchUp?.matchUpType === Jr) {
15891
15891
  let { itemValue: m } = hs({ timeItems: p.matchUp.timeItems ?? [], itemType: On }), f = o && m.filter((h) => h.courtId !== o);
15892
15892
  return Xr({ duplicateValues: !1, removePriorValues: r, tournamentRecord: u, drawDefinition: l, matchUpId: s, timeItem: { itemType: On, itemValue: f } });
15893
- } else return To({ tournamentRecord: u, drawDefinition: l, courtDayDate: a, courtId: "", matchUpId: s });
15893
+ } else return Po({ tournamentRecord: u, drawDefinition: l, courtDayDate: a, courtId: "", matchUpId: s });
15894
15894
  }
15895
15895
  function QA({ scheduleCompletedMatchUps: e, tournamentRecords: t, scheduledDate: r, matchUps: i }) {
15896
15896
  if (!yi(i)) return { error: z };
@@ -15908,7 +15908,7 @@ function QA({ scheduleCompletedMatchUps: e, tournamentRecords: t, scheduledDate:
15908
15908
  let I = Object.values(f).filter((y) => Ce(y) && !y.matchUpId);
15909
15909
  return m.concat({ matchUpIds: h, availableCourts: I, rowId: f.rowId, participantIds: g });
15910
15910
  }, []);
15911
- i.filter(({ matchUpStatus: m }) => m && m !== "BYE" && (e || !xt.includes(m))).sort(fo);
15911
+ i.filter(({ matchUpStatus: m }) => m && m !== "BYE" && (e || !xt.includes(m))).sort(ho);
15912
15912
  let u = Li({ matchUps: i.concat(s), includeParticipantDependencies: !0, tournamentRecords: t }).matchUpDependencies, l = [], d = [];
15913
15913
  for (; i.length && c.length; ) {
15914
15914
  let m = c.shift(), f = [];
@@ -15941,7 +15941,7 @@ function JA(e) {
15941
15941
  Object.keys(o).every((c) => {
15942
15942
  let { drawDefinition: u } = Nr({ tournamentRecord: s, drawId: c });
15943
15943
  return u ? (o[c].every((l) => {
15944
- let { matchUpId: d, courtId: p } = l, m = To({ tournamentRecord: s, drawDefinition: u, courtDayDate: t, matchUpId: d, courtId: p });
15944
+ let { matchUpId: d, courtId: p } = l, m = Po({ tournamentRecord: s, drawDefinition: u, courtDayDate: t, matchUpId: d, courtId: p });
15945
15945
  if (m.success) return m?.success;
15946
15946
  n = { error: XD };
15947
15947
  }), !0) : (n = { error: ne }, !1);
@@ -16016,7 +16016,7 @@ function eC({ tournamentRecords: e, matchUps: t }) {
16016
16016
  if (!yi(t)) return { error: ea };
16017
16017
  if (t.some(({ matchUpId: m, hasContext: f }) => m && !f)) return { info: "matchUps must have { inContext: true, nextMatchUps: true }", error: Op };
16018
16018
  let r = Math.max(...t.map(({ schedule: m }) => m?.courtOrder || 1).map((m) => pe(m))), i = te(1, r + 1).map((m) => t.filter((f) => pe(f.schedule?.courtOrder) === m)), n = {}, a = {}, s = {};
16019
- i.flat().filter(Boolean).sort(fo).forEach(({ schedule: m }) => delete m[Td]);
16019
+ i.flat().filter(Boolean).sort(ho).forEach(({ schedule: m }) => delete m[Td]);
16020
16020
  let o = ye(t.map(({ drawId: m }) => m)), c = Li({ includeParticipantDependencies: !0, tournamentRecords: e, drawIds: o }).matchUpDependencies, u = i.map((m, f) => m.reduce((h, g) => {
16021
16021
  if (!g.matchUpId) return h;
16022
16022
  let { matchUpId: I, winnerMatchUpId: y, loserMatchUpId: U, schedule: D, sides: v, potentialParticipants: w } = g, S = D?.courtId;
@@ -16083,7 +16083,7 @@ function tC(e) {
16083
16083
  }
16084
16084
  function rC(e) {
16085
16085
  let { scheduleChange: t, matchUpIds: r, dryRun: i } = e;
16086
- if (!r || !Array.isArray(r)) return { error: Ys };
16086
+ if (!r || !Array.isArray(r)) return { error: Ks };
16087
16087
  if (typeof t != "object") return { error: z };
16088
16088
  let n = hi(e), a = [], s = [];
16089
16089
  for (let c of Object.values(n)) {
@@ -16101,7 +16101,7 @@ function rC(e) {
16101
16101
  }
16102
16102
  function Cj({ tournamentRecord: e, scheduleChange: t, matchUpIds: r, dryRun: i }) {
16103
16103
  if (!e) return { error: J };
16104
- if (!r || !Array.isArray(r)) return { error: Ys };
16104
+ if (!r || !Array.isArray(r)) return { error: Ks };
16105
16105
  if (typeof t != "object") return { error: z };
16106
16106
  let n = [], a = [], { minutesChange: s, daysChange: o } = t;
16107
16107
  if (!s && !o) return { ...x };
@@ -16109,7 +16109,7 @@ function Cj({ tournamentRecord: e, scheduleChange: t, matchUpIds: r, dryRun: i }
16109
16109
  if (o && isNaN(o)) return { error: z };
16110
16110
  let { matchUps: c } = Qt({ matchUpFilters: { matchUpIds: r }, tournamentRecord: e }), u = ({ matchUpStatus: D }) => !xt.includes(D), l = c?.filter((D) => Ql({ schedule: D.schedule })).filter((D) => u({ matchUpStatus: D.matchUpStatus }));
16111
16111
  if (!l?.length) return { ...x };
16112
- let { tournamentInfo: d } = wo({ tournamentRecord: e }), { startDate: p, endDate: m } = d, f = l?.reduce((D, v) => {
16112
+ let { tournamentInfo: d } = Do({ tournamentRecord: e }), { startDate: p, endDate: m } = d, f = l?.reduce((D, v) => {
16113
16113
  let { matchUpId: w, drawId: S } = v;
16114
16114
  return D[S] ? D[S].push(w) : D[S] = [w], D;
16115
16115
  }, {}), h = 1440;
@@ -16167,14 +16167,14 @@ function iC(e) {
16167
16167
  return I ? x : F({ result: { error: Uc }, stack: t });
16168
16168
  function y(D) {
16169
16169
  let { tournamentRecords: v, tournamentId: w, matchUp: S, drawId: T } = D, b = v[w], { drawDefinition: P } = Oa({ tournamentRecord: b, drawId: T });
16170
- return S.matchUpType === rt ? U({ ...D, tournamentRecord: b, drawDefinition: P }) : To({ ...D, tournamentRecord: b, drawDefinition: P });
16170
+ return S.matchUpType === rt ? U({ ...D, tournamentRecord: b, drawDefinition: P }) : Po({ ...D, tournamentRecord: b, drawDefinition: P });
16171
16171
  }
16172
16172
  function U({ removePriorValues: D, tournamentRecords: v, tournamentRecord: w, drawDefinition: S, sourceCourtId: T, courtDayDate: b, matchUpId: P, matchUp: M, courtId: R }) {
16173
16173
  let E = [R].concat(M.schedule.allocatedCourts.map(({ courtId: A }) => A).filter((A) => A !== T));
16174
16174
  return yf({ removePriorValues: D, tournamentRecords: v, tournamentRecord: w, drawDefinition: S, courtDayDate: b, matchUpId: P, courtIds: E });
16175
16175
  }
16176
16176
  }
16177
- function nC({ scheduleAttributes: e = [On, wa, oo, co, uo, Bi, Jn, Sn, Wn], tournamentRecord: t, drawDefinition: r, matchUpId: i }) {
16177
+ function nC({ scheduleAttributes: e = [On, wa, co, uo, lo, Bi, Jn, Sn, Wn], tournamentRecord: t, drawDefinition: r, matchUpId: i }) {
16178
16178
  let n = "clearMatchUpSchedule", a = r ? Ur({ matchUpFilters: { matchUpIds: [i] }, inContext: !1, drawDefinition: r }).matchUps?.[0] : Qt({ matchUpFilters: { matchUpIds: [i] }, tournamentRecord: t, inContext: !1 }).matchUps?.[0];
16179
16179
  if (!a) return { error: dr };
16180
16180
  let s = (a.timeItems ?? []).filter((o) => o?.itemType && !e.includes(o?.itemType));
@@ -16329,7 +16329,7 @@ function SS({ updateInProgressMatchUps: e = !1, tournamentRecord: t, collectionO
16329
16329
  return V === $ ? H : j;
16330
16330
  }), M.collectionGroups = M.collectionGroups.filter(({ groupNumber: j }) => j !== $), O.push({ collectionId: c, change: "collectionGroupNumber removed" });
16331
16331
  }
16332
- let { aggregateValue: L, valueGoal: _ } = Do(M), B = ae({ aggregateValue: L, valueGoal: _ });
16332
+ let { aggregateValue: L, valueGoal: _ } = To(M), B = ae({ aggregateValue: L, valueGoal: _ });
16333
16333
  if ((B.aggregateValue !== P?.winCriteria.aggregateValue || B.valueGoal !== P?.winCriteria.valueGoal) && (M.winCriteria = B, O.push({ collectionId: c, winCriteria: B })), Ie(r) && R.collectionOrder !== r && (E.collectionOrder = r, O.push({ collectionId: c, collectionOrder: r })), i && R.collectionName !== i && (E.collectionName = i, O.push({ collectionId: c, collectionName: i })), s && R.matchUpFormat !== s && (E.matchUpFormat = s, O.push({ collectionId: c, matchUpFormat: s })), Ie(o) && R.matchUpCount !== o && (E.matchUpCount = o, O.push({ collectionId: c, matchUpCount: o })), u && R.matchUpType !== u) return F({ result: { error: Fp }, context: { matchUpType: u }, stack: v });
16334
16334
  p && R.category !== p && (E.category = p, O.push({ collectionId: c, category: p })), f && R.gender !== f && (E.gender = f, O.push({ collectionId: c, gender: f }));
16335
16335
  let G = ae(M);
@@ -16360,7 +16360,7 @@ function xj({ updateInProgressMatchUps: e, tournamentRecord: t, drawDefinition:
16360
16360
  return { ...x };
16361
16361
  }
16362
16362
  function cC({ updateInProgressMatchUps: e, originalValueGoal: t, tournamentRecord: r, wasAggregateValue: i, tieFormatName: n, drawDefinition: a, structureId: s, structure: o, tieFormat: c, matchUpId: u, matchUp: l, eventId: d, event: p }) {
16363
- let { aggregateValue: m, valueGoal: f } = Do(c);
16363
+ let { aggregateValue: m, valueGoal: f } = To(c);
16364
16364
  c.winCriteria = ae({ aggregateValue: m, valueGoal: f }), (t && t !== f || m && !i) && (n ? c.tieFormatName = n : delete c.tieFormatName);
16365
16365
  let { targetMatchUps: h } = kj({ updateInProgressMatchUps: e, drawDefinition: a, structureId: s, structure: o, matchUpId: u, matchUp: l });
16366
16366
  xj({ updateInProgressMatchUps: e, tournamentRecord: r, targetMatchUps: h, drawDefinition: a, tieFormat: c, event: p });
@@ -16448,7 +16448,7 @@ function vS({ updateInProgressMatchUps: e = !0, tieFormatComparison: t, tourname
16448
16448
  let { collectionGroupNumber: R, ...E } = M;
16449
16449
  return E;
16450
16450
  }), h.collectionGroups = h.collectionGroups.filter(({ groupNumber: M }) => M !== g.collectionGroupNumber));
16451
- let { aggregateValue: I, valueGoal: y } = Do(h);
16451
+ let { aggregateValue: I, valueGoal: y } = To(h);
16452
16452
  h.winCriteria = ae({ aggregateValue: I, valueGoal: y });
16453
16453
  let U = f?.winCriteria.valueGoal, D = f?.winCriteria.aggregateValue;
16454
16454
  (U && U !== y || I && !D) && (n ? h.tieFormatName = n : delete h.tieFormatName);
@@ -16522,7 +16522,7 @@ function wS({ updateInProgressMatchUps: e = !0, collectionDefinition: t, referen
16522
16522
  if (!t.collectionId) t.collectionId = Be();
16523
16523
  else if (P.collectionDefinitions.map(({ collectionId: _ }) => _).includes(t.collectionId)) return F({ context: { collectionId: t.collectionId }, result: { error: ZD } });
16524
16524
  P.collectionDefinitions.push(t), P.collectionDefinitions.sort((_, B) => (_.collectionOrder || 0) - (B.collectionOrder || 0)).forEach((_, B) => _.collectionOrder = B + 1);
16525
- let { aggregateValue: M, valueGoal: R } = Do(P);
16525
+ let { aggregateValue: M, valueGoal: R } = To(P);
16526
16526
  P.winCriteria = ae({ aggregateValue: M, valueGoal: R });
16527
16527
  let E = b?.winCriteria.valueGoal, A = b?.winCriteria.aggregateValue;
16528
16528
  (E && E !== R || M && !A) && (c ? P.tieFormatName = c : delete P.tieFormatName);
@@ -16632,7 +16632,7 @@ function fC({ tournamentRecord: e }) {
16632
16632
  return { ...x, addedCount: t };
16633
16633
  }
16634
16634
  var hC = {};
16635
- Te(hC, { addDrawDefinitionExtension: () => em, addEventExtension: () => Ra, addEventTimeItem: () => So, addExtension: () => Le, addNotes: () => Rm, addOnlineResource: () => DC, addParticipantExtension: () => TP, addParticipantTimeItem: () => Ay, addTimeItem: () => fn, addTournamentExtension: () => pI, addTournamentTimeItem: () => $l, analyzeDraws: () => Wl, analyzeTournament: () => mU, copyTournamentRecord: () => IC, createTournamentRecord: () => Df, generate: () => gC, getAggregateTeamResults: () => pU, getAllowedDrawTypes: () => Wm, getAllowedMatchUpFormats: () => uU, getAppliedPolicies: () => xe, getCompetitionDateRange: () => Hm, getCompetitionPenalties: () => lU, getPolicyDefinitions: () => ia, getTournamentInfo: () => wo, getTournamentPenalties: () => qm, getTournamentPersons: () => dU, getTournamentPoints: () => zm, getTournamentStructures: () => py, getTournamentTimeItem: () => dm, hydrateTournamentRecord: () => UC, mutate: () => yC, query: () => SN, removeDrawDefinitionExtension: () => PP, removeEventExtension: () => tm, removeExtension: () => yr, removeNotes: () => My, removeOnlineResource: () => wC, removeParticipantExtension: () => bP, removeTournamentExtension: () => mI, setTournamentCategories: () => bC, setTournamentDates: () => Mf, setTournamentEndDate: () => RC, setTournamentName: () => TC, setTournamentNotes: () => PC, setTournamentStartDate: () => MC, setTournamentStatus: () => vC });
16635
+ Te(hC, { addDrawDefinitionExtension: () => em, addEventExtension: () => Ra, addEventTimeItem: () => vo, addExtension: () => Le, addNotes: () => Rm, addOnlineResource: () => DC, addParticipantExtension: () => TP, addParticipantTimeItem: () => Ay, addTimeItem: () => fn, addTournamentExtension: () => pI, addTournamentTimeItem: () => $l, analyzeDraws: () => Wl, analyzeTournament: () => mU, copyTournamentRecord: () => IC, createTournamentRecord: () => Df, generate: () => gC, getAggregateTeamResults: () => pU, getAllowedDrawTypes: () => Wm, getAllowedMatchUpFormats: () => uU, getAppliedPolicies: () => xe, getCompetitionDateRange: () => Hm, getCompetitionPenalties: () => lU, getPolicyDefinitions: () => ia, getTournamentInfo: () => Do, getTournamentPenalties: () => qm, getTournamentPersons: () => dU, getTournamentPoints: () => zm, getTournamentStructures: () => py, getTournamentTimeItem: () => dm, hydrateTournamentRecord: () => UC, mutate: () => yC, query: () => SN, removeDrawDefinitionExtension: () => PP, removeEventExtension: () => tm, removeExtension: () => yr, removeNotes: () => My, removeOnlineResource: () => wC, removeParticipantExtension: () => bP, removeTournamentExtension: () => mI, setTournamentCategories: () => bC, setTournamentDates: () => Mf, setTournamentEndDate: () => RC, setTournamentName: () => TC, setTournamentNotes: () => PC, setTournamentStartDate: () => MC, setTournamentStatus: () => vC });
16636
16636
  var gC = {};
16637
16637
  Te(gC, { copyTournamentRecord: () => IC, createTournamentRecord: () => Df });
16638
16638
  function IC(e) {
@@ -16648,7 +16648,7 @@ function IC(e) {
16648
16648
  return { ...x, tournamentRecord: d };
16649
16649
  }
16650
16650
  var yC = {};
16651
- Te(yC, { addDrawDefinitionExtension: () => em, addEventExtension: () => Ra, addEventTimeItem: () => So, addExtension: () => Le, addNotes: () => Rm, addOnlineResource: () => DC, addParticipantExtension: () => TP, addParticipantTimeItem: () => Ay, addTimeItem: () => fn, addTournamentExtension: () => pI, addTournamentTimeItem: () => $l, hydrateTournamentRecord: () => UC, removeDrawDefinitionExtension: () => PP, removeEventExtension: () => tm, removeExtension: () => yr, removeNotes: () => My, removeOnlineResource: () => wC, removeParticipantExtension: () => bP, removeTournamentExtension: () => mI, setTournamentCategories: () => bC, setTournamentDates: () => Mf, setTournamentEndDate: () => RC, setTournamentName: () => TC, setTournamentNotes: () => PC, setTournamentStartDate: () => MC, setTournamentStatus: () => vC });
16651
+ Te(yC, { addDrawDefinitionExtension: () => em, addEventExtension: () => Ra, addEventTimeItem: () => vo, addExtension: () => Le, addNotes: () => Rm, addOnlineResource: () => DC, addParticipantExtension: () => TP, addParticipantTimeItem: () => Ay, addTimeItem: () => fn, addTournamentExtension: () => pI, addTournamentTimeItem: () => $l, hydrateTournamentRecord: () => UC, removeDrawDefinitionExtension: () => PP, removeEventExtension: () => tm, removeExtension: () => yr, removeNotes: () => My, removeOnlineResource: () => wC, removeParticipantExtension: () => bP, removeTournamentExtension: () => mI, setTournamentCategories: () => bC, setTournamentDates: () => Mf, setTournamentEndDate: () => RC, setTournamentName: () => TC, setTournamentNotes: () => PC, setTournamentStartDate: () => MC, setTournamentStatus: () => vC });
16652
16652
  function UC(e) {
16653
16653
  let { tournamentRecord: t, eventProfiles: r = [], directives: i, policyDefinitions: n } = e;
16654
16654
  return t ? ((t.events || []).forEach((a) => {
@@ -16668,26 +16668,26 @@ function wC(e) {
16668
16668
  let { tournamentRecord: r, onlineResource: i, organisationId: n, participantId: a, personId: s, courtId: o, venueId: c } = e;
16669
16669
  if (n) {
16670
16670
  if (r.parentOrganisation?.parentOrganisationId !== n) return F({ result: { error: Kt } });
16671
- No({ element: r.parentOrganisation, onlineResource: i });
16671
+ Eo({ element: r.parentOrganisation, onlineResource: i });
16672
16672
  } else if (a || s) {
16673
16673
  let u = (r.participants ?? []).find((l) => s && l.person?.personId === s || l.participantId === a);
16674
16674
  if (!u) return F(s ? { result: { error: Kt } } : { result: { error: Dt } });
16675
16675
  if (s) {
16676
- if (u.person?.personId !== s) return F({ result: { error: Xs } });
16677
- No({ element: u.person, onlineResource: i });
16678
- } else No({ element: u, onlineResource: i });
16676
+ if (u.person?.personId !== s) return F({ result: { error: Qs } });
16677
+ Eo({ element: u.person, onlineResource: i });
16678
+ } else Eo({ element: u, onlineResource: i });
16679
16679
  } else if (o) {
16680
16680
  let u = (r.venues ?? []).filter((l) => !c || l.venueId === c).flatMap((l) => (l.courts ?? []).filter((d) => d.courtId === o))?.[0];
16681
16681
  if (!u) return F({ result: { error: yc } });
16682
- No({ element: u, onlineResource: i });
16682
+ Eo({ element: u, onlineResource: i });
16683
16683
  } else if (c) {
16684
16684
  let u = (r.venues ?? []).find((l) => l.venueId === c);
16685
- if (!u) return F({ result: { error: Js } });
16686
- No({ element: u, onlineResource: i });
16687
- } else No({ element: r, onlineResource: i }), Ue({ payload: { parentOrganisation: r.parentOrganisation, onlineResources: r.onlineResources, tournamentId: r.tournamentId }, topic: us });
16685
+ if (!u) return F({ result: { error: Zs } });
16686
+ Eo({ element: u, onlineResource: i });
16687
+ } else Eo({ element: r, onlineResource: i }), Ue({ payload: { parentOrganisation: r.parentOrganisation, onlineResources: r.onlineResources, tournamentId: r.tournamentId }, topic: us });
16688
16688
  return { ...x };
16689
16689
  }
16690
- function No({ element: e, onlineResource: t }) {
16690
+ function Eo({ element: e, onlineResource: t }) {
16691
16691
  let r = (e.onlineResources ?? []).filter((i) => !(i?.[zo] === t[zo] && i?.[Yo] === t[Yo] && i?.[Ko] === t[Ko]));
16692
16692
  e.onlineResources = r;
16693
16693
  }
@@ -16697,26 +16697,26 @@ function DC(e) {
16697
16697
  let { tournamentRecord: r, onlineResource: i, organisationId: n, participantId: a, personId: s, courtId: o, venueId: c } = e;
16698
16698
  if (n) {
16699
16699
  if (r.parentOrganisation?.parentOrganisationId !== n) return F({ result: { error: Kt } });
16700
- Eo({ element: r.parentOrganisation, onlineResource: i });
16700
+ Ao({ element: r.parentOrganisation, onlineResource: i });
16701
16701
  } else if (a || s) {
16702
16702
  let u = (r.participants ?? []).find((l) => s && l.person?.personId === s || l.participantId === a);
16703
16703
  if (!u) return F(s ? { result: { error: Kt } } : { result: { error: Dt } });
16704
16704
  if (s) {
16705
- if (u.person?.personId !== s) return F({ result: { error: Xs } });
16706
- Eo({ element: u.person, onlineResource: i });
16707
- } else Eo({ element: u, onlineResource: i });
16705
+ if (u.person?.personId !== s) return F({ result: { error: Qs } });
16706
+ Ao({ element: u.person, onlineResource: i });
16707
+ } else Ao({ element: u, onlineResource: i });
16708
16708
  } else if (o) {
16709
16709
  let u = (r.venues ?? []).filter((l) => !c || l.venueId === c).flatMap((l) => (l.courts ?? []).filter((d) => d.courtId === o))?.[0];
16710
16710
  if (!u) return F({ result: { error: yc } });
16711
- Eo({ element: u, onlineResource: i });
16711
+ Ao({ element: u, onlineResource: i });
16712
16712
  } else if (c) {
16713
16713
  let u = (r.venues ?? []).find((l) => l.venueId === c);
16714
- if (!u) return F({ result: { error: Js } });
16715
- Eo({ element: u, onlineResource: i });
16716
- } else Eo({ element: r, onlineResource: i }), Ue({ payload: { parentOrganisation: r.parentOrganisation, onlineResources: r.onlineResources, tournamentId: r.tournamentId }, topic: us });
16714
+ if (!u) return F({ result: { error: Zs } });
16715
+ Ao({ element: u, onlineResource: i });
16716
+ } else Ao({ element: r, onlineResource: i }), Ue({ payload: { parentOrganisation: r.parentOrganisation, onlineResources: r.onlineResources, tournamentId: r.tournamentId }, topic: us });
16717
16717
  return { ...x };
16718
16718
  }
16719
- function Eo({ element: e, onlineResource: t }) {
16719
+ function Ao({ element: e, onlineResource: t }) {
16720
16720
  let r = (e.onlineResources ?? []).filter((i) => i?.[zo] !== t[zo] && i?.[Yo] !== t[Yo] && i?.[Ko] !== t[Ko]);
16721
16721
  return r.push(t), e.onlineResources = r, { ...x };
16722
16722
  }
@@ -16790,7 +16790,7 @@ var AC = {};
16790
16790
  Te(AC, { addCourt: () => Pf, addCourts: () => gS, addVenue: () => Pl, deleteCourt: () => _C, deleteVenue: () => bS, deleteVenues: () => OC, disableCourts: () => kC, disableVenues: () => xC, enableCourts: () => FC, enableVenues: () => LC, modifyCourt: () => MS, modifyCourtAvailability: () => TS, modifyVenue: () => BC });
16791
16791
  function DS(e) {
16792
16792
  if (!e?.tournamentRecord && !Array.isArray(e?.venueMatchUps)) return { error: J };
16793
- if (!e?.courtId) return { error: Ks };
16793
+ if (!e?.courtId) return { error: Xs };
16794
16794
  let { scheduleVisibilityFilters: t, tournamentRecord: r, matchUpFilters: i, venueMatchUps: n, courtId: a } = e, { schedulingProfile: s } = oa({ tournamentRecord: r });
16795
16795
  if (Array.isArray(n)) return { matchUps: c({ matchUps: n, courtId: a }) };
16796
16796
  let { matchUps: o } = Qt({ scheduleVisibilityFilters: t, tournamentRecord: r, matchUpFilters: i });
@@ -16818,12 +16818,12 @@ function $j({ scheduleVisibilityFilters: e, tournamentRecord: t, matchUpFilters:
16818
16818
  }
16819
16819
  function TS({ tournamentRecord: e, dateAvailability: t, disableNotice: r, venueMatchUps: i, courtId: n, force: a }) {
16820
16820
  if (!e) return { error: J };
16821
- if (!n) return { error: Ks };
16821
+ if (!n) return { error: Xs };
16822
16822
  let s = lA({ dateAvailability: t });
16823
16823
  if (s.error) return s;
16824
16824
  let { updatedDateAvailability: o, totalMergeCount: c } = Wj(t);
16825
16825
  t = o;
16826
- let u = mo({ tournamentRecord: e, courtId: n });
16826
+ let u = fo({ tournamentRecord: e, courtId: n });
16827
16827
  if (u.error) return u;
16828
16828
  let { court: l, venue: d } = u, { matchUps: p } = DS({ tournamentRecord: e, venueMatchUps: i, courtId: n });
16829
16829
  if (p?.length) {
@@ -16975,7 +16975,7 @@ function _C(e) {
16975
16975
  return s ? { ...x } : o;
16976
16976
  }
16977
16977
  function Kj({ tournamentRecord: e, disableNotice: t, courtId: r, force: i }) {
16978
- let n = mo({ tournamentRecord: e, courtId: r });
16978
+ let n = fo({ tournamentRecord: e, courtId: r });
16979
16979
  if (n.error) return n;
16980
16980
  let a = n.venue, { matchUps: s } = DS({ tournamentRecord: e, courtId: r }), o = xe({ tournamentRecord: e })?.appliedPolicies, c = i ?? o?.[Ma]?.allowDeletionWithScoresPresent?.courts;
16981
16981
  if (!s?.length || c) {
@@ -17000,9 +17000,9 @@ function MS(e) {
17000
17000
  }
17001
17001
  function Xj({ tournamentRecord: e, disableNotice: t, venueMatchUps: r, modifications: i, courtId: n, force: a }) {
17002
17002
  if (!e) return { error: J };
17003
- if (!n) return { error: Ks };
17003
+ if (!n) return { error: Xs };
17004
17004
  if (!i || typeof i != "object") return { error: ta };
17005
- let s = mo({ tournamentRecord: e, courtId: n });
17005
+ let s = fo({ tournamentRecord: e, courtId: n });
17006
17006
  if (s.error) return s;
17007
17007
  let { venue: o, court: c } = s, u = Object.keys(oj()).filter((p) => p !== "courtId");
17008
17008
  if (!Object.keys(i).filter((p) => u.includes(p)).length) return { error: xp };
@@ -17021,7 +17021,7 @@ function BC(e) {
17021
17021
  let a, s;
17022
17022
  for (let o of Object.values(n)) {
17023
17023
  let c = Zj({ tournamentRecord: o, modifications: t, venueId: r, force: i });
17024
- if (c.success && (s = !0), c.error && (a = c.error), c.error && c.error !== Js) return c;
17024
+ if (c.success && (s = !0), c.error && (a = c.error), c.error && c.error !== Zs) return c;
17025
17025
  }
17026
17026
  return Xl({ tournamentRecords: n }), s ? { ...x } : { error: a };
17027
17027
  }
@@ -17052,7 +17052,7 @@ function Zj({ tournamentRecord: e, modifications: t, venueId: r, force: i }) {
17052
17052
  return Xl({ tournamentRecord: e }), c && Ue({ payload: { venue: c, tournamentId: e.tournamentId }, topic: ls, key: c?.venueId }), { ...x, venue: ie(c) };
17053
17053
  }
17054
17054
  var RS = {};
17055
- Te(RS, { JSON2CSV: () => sG, UUID: () => Be, UUIDS: () => TT, allNumeric: () => Hw, attributeFilter: () => Vs, chunkArray: () => $t, chunkByNth: () => ch, chunkSizeProfile: () => qw, constantToString: () => ar, countValues: () => S1, createMap: () => Yw, dateTime: () => DT, definedAttributes: () => ae, dehydrateMatchUps: () => rG, extractAttributes: () => Rb, flattenJSON: () => NS, generateDateRange: () => Ho, generateHashCode: () => R1, generateRange: () => te, generateTimeCode: () => IA, groupValues: () => $w, hasAttributeValues: () => M1, instanceCount: () => Wr, intersection: () => St, isConvertableInteger: () => Ie, isNumeric: () => ft, isOdd: () => jw, isPowerOf2: () => $i, makeDeepCopy: () => ie, matchUpScheduleSort: () => tG, matchUpSort: () => fo, nearestPowerOf2: () => dg, nextPowerOf2: () => pc, noNulls: () => U1, noNumeric: () => zw, numericSort: () => At, occurrences: () => w1, overlap: () => Sr, randomMember: () => Br, randomPop: () => jr, shuffleArray: () => Ir, structureSort: () => ao, subSort: () => D1, undefinedToNull: () => uh, unique: () => ye, visualizeScheduledMatchUps: () => eG });
17055
+ Te(RS, { JSON2CSV: () => sG, UUID: () => Be, UUIDS: () => TT, allNumeric: () => Hw, attributeFilter: () => js, chunkArray: () => $t, chunkByNth: () => ch, chunkSizeProfile: () => qw, constantToString: () => ar, countValues: () => S1, createMap: () => Yw, dateTime: () => DT, definedAttributes: () => ae, dehydrateMatchUps: () => rG, extractAttributes: () => Rb, flattenJSON: () => NS, generateDateRange: () => Ho, generateHashCode: () => R1, generateRange: () => te, generateTimeCode: () => IA, groupValues: () => $w, hasAttributeValues: () => M1, instanceCount: () => Wr, intersection: () => St, isConvertableInteger: () => Ie, isNumeric: () => ft, isOdd: () => jw, isPowerOf2: () => $i, makeDeepCopy: () => ie, matchUpScheduleSort: () => tG, matchUpSort: () => ho, nearestPowerOf2: () => dg, nextPowerOf2: () => pc, noNulls: () => U1, noNumeric: () => zw, numericSort: () => At, occurrences: () => w1, overlap: () => Sr, randomMember: () => Br, randomPop: () => jr, shuffleArray: () => Ir, structureSort: () => so, subSort: () => D1, undefinedToNull: () => uh, unique: () => ye, visualizeScheduledMatchUps: () => eG });
17056
17056
  function eG({ scheduledMatchUps: e, showGlobalLog: t }) {
17057
17057
  Yx();
17058
17058
  let r = e?.reduce((n, { structureId: a }) => n.includes(a) ? n : n.concat(a), []), i = Array.isArray(r) && { ...r.map((n) => {
@@ -17158,7 +17158,7 @@ function oG({ tournamentRecord: e, value: t }) {
17158
17158
  Le({ element: e, extension: i });
17159
17159
  }
17160
17160
  function VC({ timeStamp: e }) {
17161
- let t = eo(), r = jg();
17161
+ let t = to(), r = jg();
17162
17162
  return r && Object.values(t).forEach((i) => {
17163
17163
  oG({ tournamentRecord: i, value: { version: Dp(), timeStamp: e } });
17164
17164
  }), r;
@@ -17186,16 +17186,16 @@ function cG(e, t) {
17186
17186
  if (!a) return { error: li };
17187
17187
  t.tournamentId = s, t.event = a;
17188
17188
  }
17189
- let i = t.tournamentId ?? Zs();
17189
+ let i = t.tournamentId ?? eo();
17190
17190
  if (!i && t) return t;
17191
17191
  let n = e[i];
17192
17192
  return i && !n ? { error: J } : (n && (t.tournamentRecord = n), t);
17193
17193
  }
17194
17194
  function AS(e, t, r, i, n) {
17195
17195
  delete e.success, delete e.error;
17196
- let a = Date.now(), s = Zs();
17196
+ let a = Date.now(), s = eo();
17197
17197
  r && (r.activeTournamentId = s);
17198
- let o = r?.tournamentRecord || $g(s), c = typeof r?.tournamentRecord == "object" && { [r?.tournamentRecord.tournamentId]: r.tournamentRecord } || eo(), u = r ? ie(r, void 0, !0) : void 0, l = r ? cG(c, r) : void 0;
17198
+ let o = r?.tournamentRecord || $g(s), c = typeof r?.tournamentRecord == "object" && { [r?.tournamentRecord.tournamentId]: r.tournamentRecord } || to(), u = r ? ie(r, void 0, !0) : void 0, l = r ? cG(c, r) : void 0;
17199
17199
  if (l?.error) return l;
17200
17200
  let d = uG({ params: l, tournamentRecords: c, tournamentRecord: o, methodName: i, method: t }), p = Date.now() - a;
17201
17201
  return jC({ result: d, methodName: i, elapsed: p, params: u, engineType: n }), d;
@@ -17221,17 +17221,17 @@ function lG(e, t) {
17221
17221
  return (tw[t] || 0) - (tw[e] || 0);
17222
17222
  }
17223
17223
  function dG({ convertExtensions: e, removeExtensions: t }) {
17224
- let r = eo();
17225
- return { tournamentId: Zs(), tournamentRecords: ie(r, e, !1, t) };
17224
+ let r = to();
17225
+ return { tournamentId: eo(), tournamentRecords: ie(r, e, !1, t) };
17226
17226
  }
17227
17227
  function pG(e) {
17228
- let { convertExtensions: t = !1, removeExtensions: r = !1 } = e ?? {}, i = e?.tournamentId ?? Zs();
17228
+ let { convertExtensions: t = !1, removeExtensions: r = !1 } = e ?? {}, i = e?.tournamentId ?? eo();
17229
17229
  if (typeof i != "string") return {};
17230
17230
  let n = $g(i);
17231
17231
  return { tournamentRecord: ie(n, t, !1, r) };
17232
17232
  }
17233
17233
  function mG() {
17234
- let e = eo(), { extension: t } = De({ name: Xa, tournamentRecords: e, discover: !0 }), r = t?.value?.tournamentIds || [];
17234
+ let e = to(), { extension: t } = De({ name: Xa, tournamentRecords: e, discover: !0 }), r = t?.value?.tournamentIds || [];
17235
17235
  return Object.keys(e).forEach((i) => {
17236
17236
  r.includes(i) || delete e[i];
17237
17237
  }), Bp(e);
@@ -17264,32 +17264,32 @@ function fG(e, t, r, i, n, a) {
17264
17264
  };
17265
17265
  }), { ...x, ...e };
17266
17266
  }
17267
- function Ao(e, t) {
17267
+ function Co(e, t) {
17268
17268
  return t?.error ? (e.error = t.error, e.success = !1) : (e.error = void 0, e.success = !0), e;
17269
17269
  }
17270
17270
  function GC(e, t) {
17271
- e.importMethods = (r, i, n, a) => fG(e, t, r, i, n, a), e.getTournament = (r) => pG(r), e.getState = (r) => dG({ convertExtensions: r?.convertExtensions, removeExtensions: r?.removeExtensions }), e.version = () => Dp(), e.reset = () => (Bp({}), Ao(e)), e.devContext = (r) => (gu(r), Ao(e)), e.getDevContext = (r) => ei(r), e.newTournamentRecord = (r = {}) => {
17271
+ e.importMethods = (r, i, n, a) => fG(e, t, r, i, n, a), e.getTournament = (r) => pG(r), e.getState = (r) => dG({ convertExtensions: r?.convertExtensions, removeExtensions: r?.removeExtensions }), e.version = () => Dp(), e.reset = () => (Bp({}), Co(e)), e.devContext = (r) => (gu(r), Co(e)), e.getDevContext = (r) => ei(r), e.newTournamentRecord = (r = {}) => {
17272
17272
  let i = Df(r), n = i.tournamentId;
17273
17273
  return i.error ? i : (rw(i), yu(n), { ...x, tournamentId: n });
17274
17274
  }, e.setState = (r, i, n) => {
17275
17275
  Iu(i, n);
17276
17276
  let a = $u(r, i);
17277
- return Ao(e, a);
17278
- }, e.setTournamentId = (r) => yu(r), e.getTournamentId = () => Zs(), e.setTournamentRecord = (r, i, n) => {
17277
+ return Co(e, a);
17278
+ }, e.setTournamentId = (r) => yu(r), e.getTournamentId = () => eo(), e.setTournamentRecord = (r, i, n) => {
17279
17279
  Iu(i, n);
17280
17280
  let a = rw(r, i);
17281
- return Ao(e, a);
17281
+ return Co(e, a);
17282
17282
  }, e.removeTournamentRecord = (r) => {
17283
17283
  let i = fT(r);
17284
- return Ao(e, i);
17284
+ return Co(e, i);
17285
17285
  }, e.removeUnlinkedTournamentRecords = () => {
17286
17286
  let r = mG();
17287
- return Ao(e, r);
17287
+ return Co(e, r);
17288
17288
  };
17289
17289
  }
17290
17290
  function hG(e, t, r) {
17291
17291
  if (!Array.isArray(t)) return { error: z, message: "directives must be an array" };
17292
- let i = dT(), n = Date.now(), a = r && ie(eo(), !1, !0), s = [];
17292
+ let i = dT(), n = Date.now(), a = r && ie(to(), !1, !0), s = [];
17293
17293
  for (let u of t) {
17294
17294
  if (typeof u != "object") return { error: z, message: "directive must be an object" };
17295
17295
  if (u.params && typeof u.params != "object") return { error: z, message: "params must be an object" };
@@ -17312,7 +17312,7 @@ function iw(e, t) {
17312
17312
  if (r > 1) return { message: "there must be only one arg with typeof function", error: z };
17313
17313
  let i = r ? Object.keys(t).find((m) => Vr(t[m])) : ct(t.method) && t.method;
17314
17314
  if (!i) return { error: Lp };
17315
- let { [i]: n, ...a } = t, s = t?.params ? { ...t.params } : { ...a }, o = s.rollbackOnError && ie(eo(), !1, !0), c = n || e[i] || Bg()[i];
17315
+ let { [i]: n, ...a } = t, s = t?.params ? { ...t.params } : { ...a }, o = s.rollbackOnError && ie(to(), !1, !0), c = n || e[i] || Bg()[i];
17316
17316
  if (!c) return ES({ methodName: i, params: s });
17317
17317
  let u = AS(e, c, s, i, "sync") ?? {};
17318
17318
  u?.error && o && $u(o);
@@ -17336,26 +17336,26 @@ function nw(e, t) {
17336
17336
  let e = { execute: (t) => nw(e, t) };
17337
17337
  return GC(e, nw), e;
17338
17338
  })();
17339
- var ks = {}, da;
17339
+ var xs = {}, da;
17340
17340
  function $C(e, t = !0) {
17341
17341
  if (!e) return { error: ce };
17342
17342
  if (typeof e != "object") return { error: ta };
17343
- if (e.matchUpId) da = e.matchUpId, ks[da] = t ? ie(e) : e;
17344
- else if (Array.isArray(e)) for (let r of e.reverse()) r.matchUpId && (ks[r.matchUpId] = t ? ie(r) : r, da || (da = r.matchUpId));
17345
- else for (let r of Object.values(e)) r.matchUpId && (ks[r.matchUpId] = t ? ie(r) : r, da || (da = r.matchUpId));
17343
+ if (e.matchUpId) da = e.matchUpId, xs[da] = t ? ie(e) : e;
17344
+ else if (Array.isArray(e)) for (let r of e.reverse()) r.matchUpId && (xs[r.matchUpId] = t ? ie(r) : r, da || (da = r.matchUpId));
17345
+ else for (let r of Object.values(e)) r.matchUpId && (xs[r.matchUpId] = t ? ie(r) : r, da || (da = r.matchUpId));
17346
17346
  return t ? ie(e) : e;
17347
17347
  }
17348
17348
  function IG() {
17349
- return ks[da];
17349
+ return xs[da];
17350
17350
  }
17351
17351
  function yG() {
17352
- return Object.values(ks);
17352
+ return Object.values(xs);
17353
17353
  }
17354
17354
  function UG() {
17355
- da = void 0, ks = {};
17355
+ da = void 0, xs = {};
17356
17356
  }
17357
17357
  function SG(e) {
17358
- return ie(ks[da], e?.convertExtensions, !1, e?.removeExtensions);
17358
+ return ie(xs[da], e?.convertExtensions, !1, e?.removeExtensions);
17359
17359
  }
17360
17360
  (() => {
17361
17361
  let e = { getState: (r) => SG(r), version: () => Dp(), reset: () => (UG(), { ...x }), drawId: void 0, error: void 0, success: !1, devContext: (r) => (gu(r), e), setState: (r, i, n) => {
@@ -17421,7 +17421,7 @@ var Yf = !1;
17421
17421
  CS.importMethods(ug, !0, 1);
17422
17422
  var WC = CS, wG = { getTournamentPoints: zm }, DG = wG, TG = { calculateNewRatings: vR, generateDynamicRatings: wR }, PG = TG, bG = { ...DG, ...PG };
17423
17423
  CS.importMethods(bG);
17424
- var MG = { [Mu]: { roundsToSeparate: void 0, policyName: "Nationality Code", policyAttributes: [{ key: "person.nationalityCode" }, { key: "individualParticipants.person.nationalityCode" }] } }, RG = { [An]: { policyName: "positionActionsUnrestricted", enabledStructures: [], otherFlightEntries: !0, disableRoundRestrictions: !0, activePositionOverrides: [As, ou] } }, NG = { [An]: { policyName: "positionActionsNoMovement", enabledStructures: [{ stages: [], stageSequences: [], enabledActions: [As, xu, qs], disabledActions: [] }] } }, EG = { [An]: { policyName: "positionActionsDisabled", enabledStructures: !1 } }, AG = { [Tc]: { policyName: "Participant Privacy Policy", participant: { contacts: !1, individualParticipants: { onlineResources: !1, participantName: !0, participantOtherName: !0, participantId: !0, participantRole: !0, participantStatus: !0, penalties: !1, rankings: !0, ratings: !0, representing: !0, participantRoleResponsibilities: !1, participantType: !0, person: { addresses: !1, biographicalInformation: !1, birthDate: !1, contacts: !1, nationalityCode: !0, nativeFamilyName: !1, nativeGivenName: !1, onlineResources: !1, otherNames: !0, parentOrganisationId: !1, passportFamilyName: !1, passportGivenName: !1, personId: !1, personOtherIds: !1, previousNames: !1, sex: !1, standardFamilyName: !0, standardGivenName: !0, status: !1, tennisId: !1, wheelchair: !0 } }, individualParticipantIds: !0, onlineResources: !1, participantName: !0, participantOtherName: !0, participantId: !0, participantRole: !0, participantStatus: !0, penalties: !1, rankings: !0, ratings: !0, representing: !0, participantRoleResponsibilities: !1, participantType: !0, person: { addresses: !1, biographicalInformation: !1, birthDate: !1, contacts: !1, nationalityCode: !0, nativeFamilyName: !1, nativeGivenName: !1, onlineResources: !1, otherNames: !0, parentOrganisationId: !1, passportFamilyName: !1, passportGivenName: !1, personId: !1, personOtherIds: !1, previousNames: !1, sex: !1, standardFamilyName: !0, standardGivenName: !0, status: !1, tennisId: !1, wheelchair: !0 } } } }, CG = { [pi]: { processCodes: { incompleteAssignmentsOnDefault: ["RANKING.IGNORE"] }, defaultMatchUpFormat: bi, allowDeletionWithScoresPresent: { drawDefinitions: !1, structures: !1 }, requireParticipantsForScoring: !1, requireAllPositionsAssigned: void 0, allowChangePropagation: !1, stage: { [re]: { stageSequence: { 1: { requireAllPositionsAssigned: !0 } } } }, matchUpFormats: [], matchUpStatusCodes: { [Fr]: [], [mn]: [], [Qe]: [], [Yr]: [], [Wt]: [], [st]: [] } } }, Kf = "Personal circumstance", OG = { [pi]: { requireAllPositionsAssigned: !1, stage: { [re]: { stageSequence: { 1: { requireAllPositionsAssigned: !0 } } } }, defaultMatchUpFormat: bi, matchUpFormats: [{ description: "Best of 3 tiebreak sets", matchUpFormat: bi, categoryNames: [], categoryTypes: [] }, { description: "Two tiebreak sets, 7-point match tiebreak at one set all", matchUpFormat: "SET3-S:6/TB7-F:TB7" }, { description: "Two tiebreak sets, 10-point match tiebreak at one set all", matchUpFormat: "SET3-S:6/TB7-F:TB10" }, { description: "One standard tiebreak set to 6, 7-point tiebreak at 6 games all", matchUpFormat: "SET1-S:6/TB7" }, { description: "Best of 3 sets to 4", matchUpFormat: "SET3-S:4/TB7" }, { description: "Two out of three short sets to 4 with 5-point tiebreak at 3 games all", matchUpFormat: "SET3-S:4/TB5@3" }, { description: "One short set to 4, 7-point tiebreak at 4 games all", matchUpFormat: "SET1-S:4/TB7" }, { description: "One short set to 4, 5-point tiebreak at 3 games all", matchUpFormat: "SET1-S:4/TB5@3" }, { description: "Two short sets to 4, 10-point match tiebreak at one set all", matchUpFormat: "SET3-S:4/TB7-F:TB10" }, { description: "Two short sets to 4, 7-point match tiebreak at one set all", matchUpFormat: "SET3-S:4/TB7-F:TB7" }, { description: "One no advantage set to 5, tiebreak to 9 at 4-4", matchUpFormat: "SET1-S:5/TB9@4" }, { description: "One set to 6 with deciding game at 5 games all", matchUpFormat: "SET1-S:6NOAD" }, { description: "One short set to 4, deciding game is played at 3 games all", matchUpFormat: "SET1-S:4NOAD" }, { description: "Two short sets to 4 with deciding game at 3-3, 7-point match tiebreak at one set all", matchUpFormat: "SET3-S:4NOAD-F:TB7" }, { description: "8 game pro-set with 7 point tiebreak at 8 games all", matchUpFormat: "SET1-S:8/TB7" }, { description: "8 game pro-set with 7 point tiebreak at 7 games all", matchUpFormat: "SET1-S:8/TB7@7" }, { description: "Best of 3 10-point tiebreak games", matchUpFormat: "SET3-S:TB10" }, { description: "One 10-point tiebreak game", matchUpFormat: "SET1-S:TB10" }, { description: "Timed 20 minute game - game based", matchUpFormat: "SET1-S:T20" }], matchUpStatusCodes: { [Fr]: [{ matchUpStatusCodeDisplay: "Abandoned", label: "Abandoned match", matchUpStatusCode: "OA" }], [mn]: [{ matchUpStatusCodeDisplay: "Unplayed or Cancelled", label: "Cancelled match", matchUpStatusCode: "OC" }], [Yr]: [{ matchUpStatusCodeDisplay: "Incomplete", label: "Incomplete match", matchUpStatusCode: "OI" }], [Qe]: [{ description: "Disqualification for cause or ineligibility", label: "Disqualification (ineligibility)", matchUpStatusCodeDisplay: "Def [dq]", matchUpStatusCode: "DQ" }, { description: "Misconduct before or between matches", label: "Misconduct", matchUpStatusCodeDisplay: "Def [cond]", matchUpStatusCode: "DM" }, { description: "Failure to start match because of adult discipline", label: "Fail. (adult discipline)", matchUpStatusCodeDisplay: "Def [ad]", matchUpStatusCode: "D5" }, { description: "Refusal to start match for reason other than adult discipline, injury, illness, or personal circumstance. (After the Referee has conclusively confirmed that a player refuses to play a match, the Referee need not wait until the scheduled time of the match to records the result.)", label: "Refusal to start match", matchUpStatusCodeDisplay: "Def [refsl]", matchUpStatusCode: "D4" }, { label: "Not showing up", matchUpStatusCodeDisplay: "Def [ns]", matchUpStatusCode: "D6" }, { description: "Lateness for match including, but not limited to, intending to play but mistakenly arriving at the wrong time, location, or without proper equipment", label: "Lateness for match", matchUpStatusCodeDisplay: "Score + Def [late]", matchUpStatusCode: "D7" }, { label: "Double default", matchUpStatusCodeDisplay: "Def/Def", matchUpStatusCode: "DD" }, { description: "Refusal to continue playing a match for reason other than injury, illness, personal circumstance, or adult discipline", label: "Refusal to continue match", matchUpStatusCodeDisplay: "Def [refsl]", matchUpStatusCode: "D9" }, { description: "Default for receiving an injection, IV, or supplemental oxygen", label: "Default (PEDs)", matchUpStatusCodeDisplay: "Def [med]", matchUpStatusCode: "DI" }, { description: "Default under Point Penalty System", label: "Default (Point Penalty System)", matchUpStatusCodeDisplay: "Def [pps]", matchUpStatusCode: "DP" }], [st]: [{ matchUpStatusCodeDisplay: "Wo [inj]", matchUpStatusCode: "W1", label: "Injury" }, { matchUpStatusCodeDisplay: "Wo [ill]", matchUpStatusCode: "W2", label: "Illness" }, { matchUpStatusCodeDisplay: "Wo [pc]", label: Kf, matchUpStatusCode: "W3" }, { matchUpStatusCodeDisplay: "Wo/Wo", matchUpStatusCode: "WOWO", label: "Double walkover" }, { matchUpStatusCodeDisplay: "Wo [Tae]", label: "Tournament Administrative Error", matchUpStatusCode: "W4" }, { matchUpStatusCodeDisplay: "Wo/Withdrawn", matchUpStatusCode: "W5", label: "Withdrawn" }], [Wt]: [{ matchUpStatusCodeDisplay: "Ret [inj]", matchUpStatusCode: "RJ", label: "Injury" }, { matchUpStatusCodeDisplay: "Ret [ill]", matchUpStatusCode: "RI", label: "Illness" }, { matchUpStatusCodeDisplay: "Ret [pc]", label: Kf, matchUpStatusCode: "RC" }, { description: "Retirement because of adult discipline", label: "Ret. (adult discipline)", matchUpStatusCodeDisplay: "Ret [ad]", matchUpStatusCode: "RD" }, { description: "A player who retires from a match remains eligible for consolations, place playoffs, doubles and subsequent round robin matches", matchUpStatusCodeDisplay: "Ret [elg]", label: "Ret. (eligible)", matchUpStatusCode: "RU" }], [Cn]: [{ matchUpStatusCodeDisplay: "Wd [inj]", matchUpStatusCode: "WD.INJ", label: "Injury" }, { matchUpStatusCodeDisplay: "Wd [ill]", matchUpStatusCode: "WD.ILL", label: "Illness" }, { matchUpStatusCodeDisplay: "Wd [pc]", label: Kf, matchUpStatusCode: "WD.PC" }, { matchUpStatusCodeDisplay: "Wd/Wd", matchUpStatusCode: "WD.WD", label: "Double withdrawal" }, { label: "Tournament Administrative Error", matchUpStatusCodeDisplay: "Wd [Tae]", matchUpStatusCode: "WD.TAE" }] } } }, kG = { [wi]: { seedingProfile: { positioning: Wp }, validSeedPositions: { ignore: !0 }, duplicateSeedNumbers: !0, drawSizeProgression: !0, policyName: "ITF SEEDING", seedsCountThresholds: [{ drawSize: 4, minimumParticipantCount: 3, seedsCount: 2 }, { drawSize: 16, minimumParticipantCount: 12, seedsCount: 4 }, { drawSize: 32, minimumParticipantCount: 24, seedsCount: 8 }, { drawSize: 64, minimumParticipantCount: 48, seedsCount: 16 }, { drawSize: 128, minimumParticipantCount: 97, seedsCount: 32 }, { drawSize: 256, minimumParticipantCount: 192, seedsCount: 64 }] } }, xG = { POLICY_AVOIDANCE_COUNTRY: MG, POLICY_POSITION_ACTIONS_DEFAULT: iR, POLICY_POSITION_ACTIONS_DISABLED: EG, POLICY_POSITION_ACTIONS_NO_MOVEMENT: NG, POLICY_POSITION_ACTIONS_UNRESTRICTED: RG, POLICY_PRIVACY_DEFAULT: AG, POLICY_ROUND_NAMING_DEFAULT: jI, POLICY_SCHEDULING_DEFAULT: xN, POLICY_SCORING_DEFAULT: CG, POLICY_SCORING_USTA: OG, POLICY_SEEDING_ITF: kG, POLICY_SEEDING_DEFAULT: IN }, FG = { ratingsParameters: jt, matchUpFormats: HO, countryToFlag: ZP, tieFormats: QN, countries: ma, policies: xG, flagIOC: Wk }, LG = {};
17424
+ var MG = { [Mu]: { roundsToSeparate: void 0, policyName: "Nationality Code", policyAttributes: [{ key: "person.nationalityCode" }, { key: "individualParticipants.person.nationalityCode" }] } }, RG = { [An]: { policyName: "positionActionsUnrestricted", enabledStructures: [], otherFlightEntries: !0, disableRoundRestrictions: !0, activePositionOverrides: [Cs, ou] } }, NG = { [An]: { policyName: "positionActionsNoMovement", enabledStructures: [{ stages: [], stageSequences: [], enabledActions: [Cs, xu, Hs], disabledActions: [] }] } }, EG = { [An]: { policyName: "positionActionsDisabled", enabledStructures: !1 } }, AG = { [Tc]: { policyName: "Participant Privacy Policy", participant: { contacts: !1, individualParticipants: { onlineResources: !1, participantName: !0, participantOtherName: !0, participantId: !0, participantRole: !0, participantStatus: !0, penalties: !1, rankings: !0, ratings: !0, representing: !0, participantRoleResponsibilities: !1, participantType: !0, person: { addresses: !1, biographicalInformation: !1, birthDate: !1, contacts: !1, nationalityCode: !0, nativeFamilyName: !1, nativeGivenName: !1, onlineResources: !1, otherNames: !0, parentOrganisationId: !1, passportFamilyName: !1, passportGivenName: !1, personId: !1, personOtherIds: !1, previousNames: !1, sex: !1, standardFamilyName: !0, standardGivenName: !0, status: !1, tennisId: !1, wheelchair: !0 } }, individualParticipantIds: !0, onlineResources: !1, participantName: !0, participantOtherName: !0, participantId: !0, participantRole: !0, participantStatus: !0, penalties: !1, rankings: !0, ratings: !0, representing: !0, participantRoleResponsibilities: !1, participantType: !0, person: { addresses: !1, biographicalInformation: !1, birthDate: !1, contacts: !1, nationalityCode: !0, nativeFamilyName: !1, nativeGivenName: !1, onlineResources: !1, otherNames: !0, parentOrganisationId: !1, passportFamilyName: !1, passportGivenName: !1, personId: !1, personOtherIds: !1, previousNames: !1, sex: !1, standardFamilyName: !0, standardGivenName: !0, status: !1, tennisId: !1, wheelchair: !0 } } } }, CG = { [pi]: { processCodes: { incompleteAssignmentsOnDefault: ["RANKING.IGNORE"] }, defaultMatchUpFormat: bi, allowDeletionWithScoresPresent: { drawDefinitions: !1, structures: !1 }, requireParticipantsForScoring: !1, requireAllPositionsAssigned: void 0, allowChangePropagation: !1, stage: { [re]: { stageSequence: { 1: { requireAllPositionsAssigned: !0 } } } }, matchUpFormats: [], matchUpStatusCodes: { [Fr]: [], [mn]: [], [Qe]: [], [Yr]: [], [Wt]: [], [st]: [] } } }, Kf = "Personal circumstance", OG = { [pi]: { requireAllPositionsAssigned: !1, stage: { [re]: { stageSequence: { 1: { requireAllPositionsAssigned: !0 } } } }, defaultMatchUpFormat: bi, matchUpFormats: [{ description: "Best of 3 tiebreak sets", matchUpFormat: bi, categoryNames: [], categoryTypes: [] }, { description: "Two tiebreak sets, 7-point match tiebreak at one set all", matchUpFormat: "SET3-S:6/TB7-F:TB7" }, { description: "Two tiebreak sets, 10-point match tiebreak at one set all", matchUpFormat: "SET3-S:6/TB7-F:TB10" }, { description: "One standard tiebreak set to 6, 7-point tiebreak at 6 games all", matchUpFormat: "SET1-S:6/TB7" }, { description: "Best of 3 sets to 4", matchUpFormat: "SET3-S:4/TB7" }, { description: "Two out of three short sets to 4 with 5-point tiebreak at 3 games all", matchUpFormat: "SET3-S:4/TB5@3" }, { description: "One short set to 4, 7-point tiebreak at 4 games all", matchUpFormat: "SET1-S:4/TB7" }, { description: "One short set to 4, 5-point tiebreak at 3 games all", matchUpFormat: "SET1-S:4/TB5@3" }, { description: "Two short sets to 4, 10-point match tiebreak at one set all", matchUpFormat: "SET3-S:4/TB7-F:TB10" }, { description: "Two short sets to 4, 7-point match tiebreak at one set all", matchUpFormat: "SET3-S:4/TB7-F:TB7" }, { description: "One no advantage set to 5, tiebreak to 9 at 4-4", matchUpFormat: "SET1-S:5/TB9@4" }, { description: "One set to 6 with deciding game at 5 games all", matchUpFormat: "SET1-S:6NOAD" }, { description: "One short set to 4, deciding game is played at 3 games all", matchUpFormat: "SET1-S:4NOAD" }, { description: "Two short sets to 4 with deciding game at 3-3, 7-point match tiebreak at one set all", matchUpFormat: "SET3-S:4NOAD-F:TB7" }, { description: "8 game pro-set with 7 point tiebreak at 8 games all", matchUpFormat: "SET1-S:8/TB7" }, { description: "8 game pro-set with 7 point tiebreak at 7 games all", matchUpFormat: "SET1-S:8/TB7@7" }, { description: "Best of 3 10-point tiebreak games", matchUpFormat: "SET3-S:TB10" }, { description: "One 10-point tiebreak game", matchUpFormat: "SET1-S:TB10" }, { description: "Timed 20 minute game - game based", matchUpFormat: "SET1-S:T20" }], matchUpStatusCodes: { [Fr]: [{ matchUpStatusCodeDisplay: "Abandoned", label: "Abandoned match", matchUpStatusCode: "OA" }], [mn]: [{ matchUpStatusCodeDisplay: "Unplayed or Cancelled", label: "Cancelled match", matchUpStatusCode: "OC" }], [Yr]: [{ matchUpStatusCodeDisplay: "Incomplete", label: "Incomplete match", matchUpStatusCode: "OI" }], [Qe]: [{ description: "Disqualification for cause or ineligibility", label: "Disqualification (ineligibility)", matchUpStatusCodeDisplay: "Def [dq]", matchUpStatusCode: "DQ" }, { description: "Misconduct before or between matches", label: "Misconduct", matchUpStatusCodeDisplay: "Def [cond]", matchUpStatusCode: "DM" }, { description: "Failure to start match because of adult discipline", label: "Fail. (adult discipline)", matchUpStatusCodeDisplay: "Def [ad]", matchUpStatusCode: "D5" }, { description: "Refusal to start match for reason other than adult discipline, injury, illness, or personal circumstance. (After the Referee has conclusively confirmed that a player refuses to play a match, the Referee need not wait until the scheduled time of the match to records the result.)", label: "Refusal to start match", matchUpStatusCodeDisplay: "Def [refsl]", matchUpStatusCode: "D4" }, { label: "Not showing up", matchUpStatusCodeDisplay: "Def [ns]", matchUpStatusCode: "D6" }, { description: "Lateness for match including, but not limited to, intending to play but mistakenly arriving at the wrong time, location, or without proper equipment", label: "Lateness for match", matchUpStatusCodeDisplay: "Score + Def [late]", matchUpStatusCode: "D7" }, { label: "Double default", matchUpStatusCodeDisplay: "Def/Def", matchUpStatusCode: "DD" }, { description: "Refusal to continue playing a match for reason other than injury, illness, personal circumstance, or adult discipline", label: "Refusal to continue match", matchUpStatusCodeDisplay: "Def [refsl]", matchUpStatusCode: "D9" }, { description: "Default for receiving an injection, IV, or supplemental oxygen", label: "Default (PEDs)", matchUpStatusCodeDisplay: "Def [med]", matchUpStatusCode: "DI" }, { description: "Default under Point Penalty System", label: "Default (Point Penalty System)", matchUpStatusCodeDisplay: "Def [pps]", matchUpStatusCode: "DP" }], [st]: [{ matchUpStatusCodeDisplay: "Wo [inj]", matchUpStatusCode: "W1", label: "Injury" }, { matchUpStatusCodeDisplay: "Wo [ill]", matchUpStatusCode: "W2", label: "Illness" }, { matchUpStatusCodeDisplay: "Wo [pc]", label: Kf, matchUpStatusCode: "W3" }, { matchUpStatusCodeDisplay: "Wo/Wo", matchUpStatusCode: "WOWO", label: "Double walkover" }, { matchUpStatusCodeDisplay: "Wo [Tae]", label: "Tournament Administrative Error", matchUpStatusCode: "W4" }, { matchUpStatusCodeDisplay: "Wo/Withdrawn", matchUpStatusCode: "W5", label: "Withdrawn" }], [Wt]: [{ matchUpStatusCodeDisplay: "Ret [inj]", matchUpStatusCode: "RJ", label: "Injury" }, { matchUpStatusCodeDisplay: "Ret [ill]", matchUpStatusCode: "RI", label: "Illness" }, { matchUpStatusCodeDisplay: "Ret [pc]", label: Kf, matchUpStatusCode: "RC" }, { description: "Retirement because of adult discipline", label: "Ret. (adult discipline)", matchUpStatusCodeDisplay: "Ret [ad]", matchUpStatusCode: "RD" }, { description: "A player who retires from a match remains eligible for consolations, place playoffs, doubles and subsequent round robin matches", matchUpStatusCodeDisplay: "Ret [elg]", label: "Ret. (eligible)", matchUpStatusCode: "RU" }], [Cn]: [{ matchUpStatusCodeDisplay: "Wd [inj]", matchUpStatusCode: "WD.INJ", label: "Injury" }, { matchUpStatusCodeDisplay: "Wd [ill]", matchUpStatusCode: "WD.ILL", label: "Illness" }, { matchUpStatusCodeDisplay: "Wd [pc]", label: Kf, matchUpStatusCode: "WD.PC" }, { matchUpStatusCodeDisplay: "Wd/Wd", matchUpStatusCode: "WD.WD", label: "Double withdrawal" }, { label: "Tournament Administrative Error", matchUpStatusCodeDisplay: "Wd [Tae]", matchUpStatusCode: "WD.TAE" }] } } }, kG = { [wi]: { seedingProfile: { positioning: Wp }, validSeedPositions: { ignore: !0 }, duplicateSeedNumbers: !0, drawSizeProgression: !0, policyName: "ITF SEEDING", seedsCountThresholds: [{ drawSize: 4, minimumParticipantCount: 3, seedsCount: 2 }, { drawSize: 16, minimumParticipantCount: 12, seedsCount: 4 }, { drawSize: 32, minimumParticipantCount: 24, seedsCount: 8 }, { drawSize: 64, minimumParticipantCount: 48, seedsCount: 16 }, { drawSize: 128, minimumParticipantCount: 97, seedsCount: 32 }, { drawSize: 256, minimumParticipantCount: 192, seedsCount: 64 }] } }, xG = { POLICY_AVOIDANCE_COUNTRY: MG, POLICY_POSITION_ACTIONS_DEFAULT: iR, POLICY_POSITION_ACTIONS_DISABLED: EG, POLICY_POSITION_ACTIONS_NO_MOVEMENT: NG, POLICY_POSITION_ACTIONS_UNRESTRICTED: RG, POLICY_PRIVACY_DEFAULT: AG, POLICY_ROUND_NAMING_DEFAULT: jI, POLICY_SCHEDULING_DEFAULT: xN, POLICY_SCORING_DEFAULT: CG, POLICY_SCORING_USTA: OG, POLICY_SEEDING_ITF: kG, POLICY_SEEDING_DEFAULT: IN }, FG = { ratingsParameters: jt, matchUpFormats: HO, countryToFlag: ZP, tieFormats: QN, countries: ma, policies: xG, flagIOC: Wk }, LG = {};
17425
17425
  Te(LG, { activeMatchUpStatuses: () => yI, auditConstants: () => $V, completedMatchUpStatuses: () => xt, directingMatchUpStatuses: () => _P, displayConstants: () => UV, drawDefinitionConstants: () => fP, entryStatusConstants: () => Zk, errorConditionConstants: () => H1, eventConstants: () => QO, extensionConstants: () => RP, flightConstants: () => e2, genderConstants: () => Wg, keyValueConstants: () => q_, matchUpActionConstants: () => i_, matchUpStatusConstants: () => jP, matchUpTypes: () => h1, nonDirectingMatchUpStatuses: () => BP, particicipantsRequiredMatchUpStatuses: () => FP, participantConstants: () => $k, participantRoles: () => ey, participantTypes: () => iu, penaltyConstants: () => t$, policyConstants: () => bk, positionActionConstants: () => IL, ratingConstants: () => AL, recoveryTimeRequiredMatchUpStatuses: () => _k, requestConstants: () => $2, resourceContants: () => BO, resultConstants: () => N1, scaleConstants: () => wk, scheduleConstants: () => Tx, sortingConstants: () => o2, surfaceConstants: () => o$, tieFormatConstants: () => zO, timeItemConstants: () => vx, topicConstants: () => Vk, tournamentConstants: () => SC, upcomingMatchUpStatuses: () => VP, validMatchUpStatuses: () => LP, venueConstants: () => l$, weekdayConstants: () => iE });
17426
17426
  var _G = "Coaching", BG = "Ball Abuse", VG = "Racket Abuse", jG = "Verbal Abuse", GG = "INELIGIBILITY", $G = "Physical Abuse", WG = "Unsportmanlike Conduct", qG = "Dress Code Violation", HG = "Equipment Violation", zG = "Leaving the court", YG = "Failure to complete", KG = "No Show", XG = "Other", QG = "REFUSAL_TO_PLAY", JG = "PROHIBITED_SUBSTANCE", ZG = "Puncuality", e$ = "Failure to sign in", t$ = { COACHING: _G, BALL_ABUSE: BG, RACKET_ABUSE: VG, VERBAL_ABUSE: jG, PHYSICAL_ABUSE: $G, INELIGIBILITY: GG, UNSPORTSMANLIKE_CONDUCT: WG, PROHIBITED_SUBSTANCE: JG, DRESS_CODE_VIOLATION: qG, EQUIMENT_VIOLATION: HG, LEAVING_THE_COURT: zG, REFUSAL_TO_PLAY: QG, FAILURE_TO_COMPLETE: YG, NO_SHOW: KG, OTHER: XG, PUNCTUALITY: ZG, FAILUIRE_TO_SIGN_IN: e$ }, r$ = "CLAY", i$ = "HARD", n$ = "GRASS", a$ = "CARPET", s$ = "ARTIFICIAL", o$ = { CLAY: r$, HARD: i$, GRASS: n$, CARPET: a$, ARTIFICIAL: s$ }, c$ = "INDOOR", u$ = "OUTDOOR", l$ = { INDOOR: c$, OUTDOOR: u$ };
17427
17427
  const d$ = Ve({
@@ -18578,7 +18578,7 @@ function KW({ content: e, theme: t }) {
18578
18578
  const r = document.createElement("div");
18579
18579
  return r.className = t ? ns(dw(), t) : dw(), t && r.classList.add(t), typeof e == "string" ? r.innerHTML = e : r.appendChild(e), r;
18580
18580
  }
18581
- const { createTheme: Po } = Lw({
18581
+ const { createTheme: bo } = Lw({
18582
18582
  theme: {
18583
18583
  lineHeights: {
18584
18584
  scheduleInfo: `${uu.scheduleInfo}rem`,
@@ -18614,12 +18614,12 @@ const { createTheme: Po } = Lw({
18614
18614
  setWidth: "1.3rem"
18615
18615
  }
18616
18616
  }
18617
- }), pw = Po("australian-theme", {
18617
+ }), pw = bo("australian-theme", {
18618
18618
  colors: {
18619
18619
  borderHover: "#0091d2",
18620
18620
  connector: "#999"
18621
18621
  }
18622
- }), eW = Po("wimbledon-theme", {
18622
+ }), eW = bo("wimbledon-theme", {
18623
18623
  borderWidths: {
18624
18624
  borderInlineStart: "10px"
18625
18625
  },
@@ -18632,7 +18632,7 @@ const { createTheme: Po } = Lw({
18632
18632
  participant: {
18633
18633
  textTransform: "uppercase"
18634
18634
  }
18635
- }), tW = Po("french-theme", {
18635
+ }), tW = bo("french-theme", {
18636
18636
  colors: {
18637
18637
  winnerName: "#01503d!important",
18638
18638
  winner: "#01503d!important",
@@ -18642,14 +18642,14 @@ const { createTheme: Po } = Lw({
18642
18642
  matchUp: {
18643
18643
  boxShadow: "0 0 30px 0 hsla(0,0%,89%,9)"
18644
18644
  }
18645
- }), rW = Po("usopen-theme", {
18645
+ }), rW = bo("usopen-theme", {
18646
18646
  colors: {
18647
18647
  matchUpBackgroundColor: "#F8F9F9",
18648
18648
  internalDividers: "darkgray",
18649
18649
  borderHover: "#0091d2",
18650
18650
  connector: "#999"
18651
18651
  }
18652
- }), mw = Po("basic-theme", {
18652
+ }), mw = bo("basic-theme", {
18653
18653
  colors: {
18654
18654
  internalDividers: "transparent",
18655
18655
  winner: "#50B649!important",
@@ -18665,7 +18665,7 @@ const { createTheme: Po } = Lw({
18665
18665
  fontSizes: {
18666
18666
  1: "1.5rem"
18667
18667
  }
18668
- }), iW = Po("dark-theme", {
18668
+ }), iW = bo("dark-theme", {
18669
18669
  colors: {
18670
18670
  backgroundColor: "#333333",
18671
18671
  borderHover: "#0091d2",
@@ -18674,7 +18674,7 @@ const { createTheme: Po } = Lw({
18674
18674
  participant: {
18675
18675
  seed: "cyan"
18676
18676
  }
18677
- }), nW = Po("itf-theme", {
18677
+ }), nW = bo("itf-theme", {
18678
18678
  colors: {
18679
18679
  borderHover: "#0091d2",
18680
18680
  connector: "#999",
@@ -18919,7 +18919,7 @@ function Va(e) {
18919
18919
  const t = e || XC(), r = document.getElementById("matchUpFormatString");
18920
18920
  r && (r.innerHTML = t);
18921
18921
  }
18922
- const ws = (e, t) => t && e.finalSetFormat || e.setFormat, ko = [
18922
+ const ws = (e, t) => t && e.finalSetFormat || e.setFormat, Ts = [
18923
18923
  {
18924
18924
  getValue: (e) => e.bestOf > 1 ? "Best of" : "Exactly",
18925
18925
  options: ["Best of", "Exactly"],
@@ -18927,7 +18927,15 @@ const ws = (e, t) => t && e.finalSetFormat || e.setFormat, ko = [
18927
18927
  value: "Best of",
18928
18928
  finalSet: !1
18929
18929
  },
18930
- { getValue: (e) => e.bestOf, finalSet: !1, id: "bestOf", options: [1, 3, 5], onChange: "pluralize", onChangeCallback: "updateFinalSetVisibility", value: 3 },
18930
+ {
18931
+ getValue: (e) => e.bestOf,
18932
+ finalSet: !1,
18933
+ id: "bestOf",
18934
+ options: [1, 3, 5],
18935
+ onChange: "pluralize",
18936
+ onChangeCallback: "updateFinalSetVisibility",
18937
+ value: 3
18938
+ },
18931
18939
  {
18932
18940
  getValue: (e, t) => {
18933
18941
  const r = ws(e, t), i = r?.NoAD ? ig : lu;
@@ -19014,7 +19022,7 @@ const ws = (e, t) => t && e.finalSetFormat || e.setFormat, ko = [
19014
19022
  ], Yc = {
19015
19023
  changeWhat: (e, t, r) => {
19016
19024
  const i = r === vi, n = t ? "finalSetTiebreakToggle" : "setTiebreakToggle", a = document.getElementById(n);
19017
- a.style.display = i ? "" : _r, ko.forEach((s) => {
19025
+ a.style.display = i ? "" : _r, Ts.forEach((s) => {
19018
19026
  if (s.whats) {
19019
19027
  const { prefix: o = "", suffix: c = "", pluralize: u } = s, l = s.whats.includes(r), d = t ? `${s.id}-${t}` : s.id, p = document.getElementById(d);
19020
19028
  if (p.style.display === _r && l) {
@@ -19047,7 +19055,7 @@ function QW({
19047
19055
  config: r,
19048
19056
  modalConfig: i
19049
19057
  } = {}) {
19050
- vs = e, Vt = up.parse(vs);
19058
+ console.log("[getMatchUpFormatModal] DEBUG MARKER 12345 - Function called with format:", e), console.log("[getMatchUpFormatModal] modalConfig:", i), vs = e, Vt = up.parse(vs), console.log("[getMatchUpFormatModal] parsedMatchUpFormat.bestOf:", Vt.bestOf), console.log("[getMatchUpFormatModal] setComponents[1] (bestOf config):", Ts[1]);
19051
19059
  const a = [
19052
19060
  {
19053
19061
  onClick: () => t?.(""),
@@ -19081,7 +19089,7 @@ function QW({
19081
19089
  d.onchange = (P) => {
19082
19090
  vs = P.target.value, Va(vs), Vt = up.parse(vs), gr.setFormat = Vt.setFormat, gr.setFormat.bestOf = Vt.bestOf, Vt.finalSetFormat && (gr.finalSetFormat = Vt.finalSetFormat);
19083
19091
  const M = Vt.finalSetFormat;
19084
- U.style.display = M ? "" : _r, D.style.display = M ? "" : _r, I.checked = M, v.checked = !!M?.tiebreakFormat, f.checked = Vt.setFormat.tiebreakFormat, ko.forEach((R) => {
19092
+ U.style.display = M ? "" : _r, D.style.display = M ? "" : _r, I.checked = M, v.checked = !!M?.tiebreakFormat, f.checked = Vt.setFormat.tiebreakFormat, Ts.forEach((R) => {
19085
19093
  if (R.getValue) {
19086
19094
  const E = R.getValue(Vt), A = document.getElementById(R.id);
19087
19095
  if (A && E) {
@@ -19099,7 +19107,7 @@ function QW({
19099
19107
  });
19100
19108
  }, u.appendChild(d), o.appendChild(u);
19101
19109
  const p = document.createElement("div");
19102
- p.style.display = "flex", p.style.flexWrap = "wrap", p.style.gap = "0.5em", p.style.marginBottom = "1em", ko.map((P) => {
19110
+ p.style.display = "flex", p.style.flexWrap = "wrap", p.style.gap = "0.5em", p.style.marginBottom = "1em", Ts.map((P) => {
19103
19111
  const M = P.getValue ? P.getValue(Vt) : void 0;
19104
19112
  return hw({ ...P, value: M });
19105
19113
  }).forEach((P) => p.appendChild(P)), p.id = "setFormat", o.appendChild(p);
@@ -19108,7 +19116,7 @@ function QW({
19108
19116
  const f = document.createElement("input");
19109
19117
  f.className = s, f.name = "setTiebreak", f.id = "setTiebreak", f.type = "checkbox", f.checked = !!Vt.setFormat.tiebreakFormat, f.onchange = (P) => {
19110
19118
  const M = P.target.checked;
19111
- ko.filter(({ tb: R }) => R).forEach((R) => {
19119
+ Ts.filter(({ tb: R }) => R).forEach((R) => {
19112
19120
  const E = document.getElementById(R.id);
19113
19121
  if (E) {
19114
19122
  if (E.style.display === _r && M) {
@@ -19130,7 +19138,7 @@ function QW({
19130
19138
  y.setAttribute("for", "finalSetOption"), y.innerHTML = "Final set", y.style.display = g ? "" : "none", m.appendChild(y), o.appendChild(m);
19131
19139
  const U = document.createElement("div");
19132
19140
  U.style.display = Vt.finalSetFormat ? "flex" : _r, U.style.flexWrap = "wrap", U.style.gap = "0.5em", U.style.marginBottom = "1em", U.id = "finalSetFormat", [{ label: "<div style='font-weight: bold'>Final set</div>", options: [], finalSet: !0 }].concat(
19133
- ko.map((P) => {
19141
+ Ts.map((P) => {
19134
19142
  const M = P.getValue ? P.getValue(Vt, !0) : void 0;
19135
19143
  return { ...P, value: M };
19136
19144
  })
@@ -19140,7 +19148,7 @@ function QW({
19140
19148
  const v = document.createElement("input");
19141
19149
  v.className = s, v.name = "finalSetTiebreak", v.id = "finalSetTiebreak", v.type = "checkbox", v.checked = Vt.finalSetFormat?.tiebreakFormat, D.onchange = (P) => {
19142
19150
  const M = P.target.checked;
19143
- ko.filter(({ tb: R }) => R).forEach((R) => {
19151
+ Ts.filter(({ tb: R }) => R).forEach((R) => {
19144
19152
  const E = document.getElementById(`${R.id}-1`);
19145
19153
  if (E.style.display === _r && M) {
19146
19154
  const { prefix: A = "", suffix: N = "", pluralize: C, defaultValue: k } = R, O = Vt.bestOf, L = C && O > 1 ? "s" : "";
@@ -19550,13 +19558,13 @@ function xS(e) {
19550
19558
  function ng(e) {
19551
19559
  return new Date(e).setHours(0, 0, 0, 0);
19552
19560
  }
19553
- function bo() {
19561
+ function Mo() {
19554
19562
  return (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0);
19555
19563
  }
19556
19564
  function dc(...e) {
19557
19565
  switch (e.length) {
19558
19566
  case 0:
19559
- return bo();
19567
+ return Mo();
19560
19568
  case 1:
19561
19569
  return ng(e[0]);
19562
19570
  }
@@ -19584,7 +19592,7 @@ function qu(e, t) {
19584
19592
  function Uw(e, t) {
19585
19593
  return (e - t + 7) % 7;
19586
19594
  }
19587
- function xs(e, t, r = 0) {
19595
+ function Fs(e, t, r = 0) {
19588
19596
  const i = new Date(e).getDay();
19589
19597
  return Wu(e, Uw(t, r) - Uw(i, r));
19590
19598
  }
@@ -19592,14 +19600,14 @@ function JC(e, t) {
19592
19600
  return Math.round((e - t) / 6048e5) + 1;
19593
19601
  }
19594
19602
  function mW(e) {
19595
- const t = xs(e, 4, 1), r = xs(new Date(t).setMonth(0, 4), 4, 1);
19603
+ const t = Fs(e, 4, 1), r = Fs(new Date(t).setMonth(0, 4), 4, 1);
19596
19604
  return JC(t, r);
19597
19605
  }
19598
19606
  function ZC(e, t) {
19599
- const r = xs(new Date(e).setMonth(0, 1), t, t), i = xs(e, t, t), n = JC(i, r);
19607
+ const r = Fs(new Date(e).setMonth(0, 1), t, t), i = Fs(e, t, t), n = JC(i, r);
19600
19608
  if (n < 53)
19601
19609
  return n;
19602
- const a = xs(new Date(e).setDate(32), t, t);
19610
+ const a = Fs(new Date(e).setDate(32), t, t);
19603
19611
  return i === a ? 1 : n;
19604
19612
  }
19605
19613
  function fW(e) {
@@ -19608,7 +19616,7 @@ function fW(e) {
19608
19616
  function hW(e) {
19609
19617
  return ZC(e, 6);
19610
19618
  }
19611
- function Co(e, t) {
19619
+ function Oo(e, t) {
19612
19620
  const r = new Date(e).getFullYear();
19613
19621
  return Math.floor(r / t) * t;
19614
19622
  }
@@ -19701,7 +19709,7 @@ function t0(e) {
19701
19709
  return n.reduce((c, u) => {
19702
19710
  const l = Sw[u](c, o[u], s);
19703
19711
  return isNaN(l) ? c : l;
19704
- }, bo());
19712
+ }, Mo());
19705
19713
  },
19706
19714
  formatter(a, s) {
19707
19715
  let o = i.reduce((c, u, l) => c += `${t[l]}${u(a, s)}`, "");
@@ -19709,14 +19717,14 @@ function t0(e) {
19709
19717
  }
19710
19718
  };
19711
19719
  }
19712
- function zs(e, t, r) {
19720
+ function Ys(e, t, r) {
19713
19721
  if (e instanceof Date || typeof e == "number") {
19714
19722
  const i = ng(e);
19715
19723
  return isNaN(i) ? void 0 : i;
19716
19724
  }
19717
19725
  if (e) {
19718
19726
  if (e === "today")
19719
- return bo();
19727
+ return Mo();
19720
19728
  if (t && t.toValue) {
19721
19729
  const i = t.toValue(e, t, r);
19722
19730
  return isNaN(i) ? void 0 : ng(i);
@@ -19857,7 +19865,7 @@ function ww(e, t, r) {
19857
19865
  return t.weekStart = e, t.weekEnd = (e + 6) % 7, r === 4 && (t.getWeekNumber = s0(4, e)), e;
19858
19866
  }
19859
19867
  function Dw(e, t, r, i) {
19860
- const n = zs(e, t, r);
19868
+ const n = Ys(e, t, r);
19861
19869
  return n !== void 0 ? n : i;
19862
19870
  }
19863
19871
  function eh(e, t, r = 3) {
@@ -19914,7 +19922,7 @@ function th(e, t) {
19914
19922
  );
19915
19923
  else {
19916
19924
  const S = i.datesDisabled = w.reduce((T, b) => {
19917
- const P = zs(b, o, u);
19925
+ const P = Ys(b, o, u);
19918
19926
  return P !== void 0 ? sd(T, $a(P, m, a)) : T;
19919
19927
  }, []);
19920
19928
  i.checkDisabled = (T) => S.includes(T);
@@ -19922,7 +19930,7 @@ function th(e, t) {
19922
19930
  delete r.datesDisabled;
19923
19931
  }
19924
19932
  if ("defaultViewDate" in r) {
19925
- const w = zs(r.defaultViewDate, o, u);
19933
+ const w = Ys(r.defaultViewDate, o, u);
19926
19934
  w !== void 0 && (i.defaultViewDate = w), delete r.defaultViewDate;
19927
19935
  }
19928
19936
  if ("weekStart" in r) {
@@ -20121,7 +20129,7 @@ class RW extends LS {
20121
20129
  }
20122
20130
  // Apply update on the focused date to view's settings
20123
20131
  updateFocus() {
20124
- const t = new Date(this.picker.viewDate), r = t.getFullYear(), i = t.getMonth(), n = dc(r, i, 1), a = xs(n, this.weekStart, this.weekStart);
20132
+ const t = new Date(this.picker.viewDate), r = t.getFullYear(), i = t.getMonth(), n = dc(r, i, 1), a = Fs(n, this.weekStart, this.weekStart);
20125
20133
  this.first = n, this.last = dc(r, i + 1, 0), this.start = a, this.focused = this.picker.viewDate;
20126
20134
  }
20127
20135
  // Apply update on the selected dates to view's settings
@@ -20131,12 +20139,12 @@ class RW extends LS {
20131
20139
  }
20132
20140
  // Update the entire view UI
20133
20141
  render() {
20134
- if (this.today = this.todayHighlight ? bo() : void 0, this.prepareForRender(
20142
+ if (this.today = this.todayHighlight ? Mo() : void 0, this.prepareForRender(
20135
20143
  od(this.focused, this.switchLabelFormat, this.locale),
20136
20144
  this.first <= this.minDate,
20137
20145
  this.last >= this.maxDate
20138
20146
  ), this.weekNumbers) {
20139
- const t = this.weekStart, r = xs(this.first, t, t);
20147
+ const t = this.weekStart, r = Fs(this.first, t, t);
20140
20148
  Array.from(this.weekNumbers.weeks.children).forEach((i, n) => {
20141
20149
  const a = pW(r, n);
20142
20150
  i.textContent = this.getWeekNumber(a, t), n > 3 && i.classList[a > this.last ? "add" : "remove"]("next");
@@ -20264,22 +20272,22 @@ class Mw extends LS {
20264
20272
  r && (this.navStep = this.step * 10, this.beforeShowOption = `beforeShow${EW(this.cellClass)}`, this.grid = this.element, this.element.classList.add(this.name, "datepicker-grid"), this.grid.appendChild(Ta(lc("span", 12)))), super.init(t);
20265
20273
  }
20266
20274
  setOptions(t) {
20267
- if ("minDate" in t && (t.minDate === void 0 ? this.minYear = this.minDate = void 0 : (this.minYear = Co(t.minDate, this.step), this.minDate = dc(this.minYear, 0, 1))), "maxDate" in t && (t.maxDate === void 0 ? this.maxYear = this.maxDate = void 0 : (this.maxYear = Co(t.maxDate, this.step), this.maxDate = dc(this.maxYear, 11, 31))), t.checkDisabled && (this.checkDisabled = this.isMinView || t.datesDisabled === null ? t.checkDisabled : () => !1), this.beforeShowOption in t) {
20275
+ if ("minDate" in t && (t.minDate === void 0 ? this.minYear = this.minDate = void 0 : (this.minYear = Oo(t.minDate, this.step), this.minDate = dc(this.minYear, 0, 1))), "maxDate" in t && (t.maxDate === void 0 ? this.maxYear = this.maxDate = void 0 : (this.maxYear = Oo(t.maxDate, this.step), this.maxDate = dc(this.maxYear, 11, 31))), t.checkDisabled && (this.checkDisabled = this.isMinView || t.datesDisabled === null ? t.checkDisabled : () => !1), this.beforeShowOption in t) {
20268
20276
  const r = t[this.beforeShowOption];
20269
20277
  this.beforeShow = typeof r == "function" ? r : void 0;
20270
20278
  }
20271
20279
  }
20272
20280
  // Update view's settings to reflect the viewDate set on the picker
20273
20281
  updateFocus() {
20274
- const t = new Date(this.picker.viewDate), r = Co(t, this.navStep), i = r + 9 * this.step;
20275
- this.first = r, this.last = i, this.start = r - this.step, this.focused = Co(t, this.step);
20282
+ const t = new Date(this.picker.viewDate), r = Oo(t, this.navStep), i = r + 9 * this.step;
20283
+ this.first = r, this.last = i, this.start = r - this.step, this.focused = Oo(t, this.step);
20276
20284
  }
20277
20285
  // Update view's settings to reflect the selected dates
20278
20286
  updateSelection() {
20279
20287
  const { dates: t, rangepicker: r } = this.picker.datepicker;
20280
- this.selected = t.reduce((i, n) => sd(i, Co(n, this.step)), []), r && r.dates && (this.range = r.dates.map((i) => {
20288
+ this.selected = t.reduce((i, n) => sd(i, Oo(n, this.step)), []), r && r.dates && (this.range = r.dates.map((i) => {
20281
20289
  if (i !== void 0)
20282
- return Co(i, this.step);
20290
+ return Oo(i, this.step);
20283
20291
  }));
20284
20292
  }
20285
20293
  // Update the entire view UI
@@ -20348,7 +20356,7 @@ function c0(e) {
20348
20356
  e.setDate({ clear: !0 });
20349
20357
  }
20350
20358
  function u0(e) {
20351
- const t = bo();
20359
+ const t = Mo();
20352
20360
  e.config.todayButtonMode === 1 ? e.setDate(t, { forceRefresh: !0, viewDate: t }) : e.setFocusedDate(t, !0);
20353
20361
  }
20354
20362
  function l0(e) {
@@ -20396,7 +20404,7 @@ function Ew(e, t) {
20396
20404
  }
20397
20405
  if (t.locale && (e.controls.todayButton.textContent = t.locale.today, e.controls.clearButton.textContent = t.locale.clear), "todayButton" in t && (t.todayButton ? mu(e.controls.todayButton) : pu(e.controls.todayButton)), "minDate" in t || "maxDate" in t) {
20398
20406
  const { minDate: r, maxDate: i } = e.datepicker.config;
20399
- e.controls.todayButton.disabled = !kS(bo(), r, i);
20407
+ e.controls.todayButton.disabled = !kS(Mo(), r, i);
20400
20408
  }
20401
20409
  "clearButton" in t && (t.clearButton ? mu(e.controls.clearButton) : pu(e.controls.clearButton));
20402
20410
  }
@@ -20642,7 +20650,7 @@ function f0(e, t, r = !1) {
20642
20650
  return r ? [] : void 0;
20643
20651
  const { config: i, dates: n, rangeSideIndex: a } = e, { pickLevel: s, maxNumberOfDates: o } = i;
20644
20652
  let c = t.reduce((u, l) => {
20645
- let d = zs(l, i.format, i.locale);
20653
+ let d = Ys(l, i.format, i.locale);
20646
20654
  return d === void 0 || (d = $a(d, s, a), kS(d, i.minDate, i.maxDate) && !u.includes(d) && !i.checkDisabled(d, s) && (s > 0 || !i.daysOfWeekDisabled.includes(new Date(d).getDay())) && u.push(d)), u;
20647
20655
  }, []);
20648
20656
  if (c.length !== 0)
@@ -20659,7 +20667,7 @@ function wp(e, t = 3, r = !0, i = void 0) {
20659
20667
  function Ow(e, t, r) {
20660
20668
  const i = e.config;
20661
20669
  let { clear: n, render: a, autohide: s, revert: o, forceRefresh: c, viewDate: u } = r;
20662
- a === void 0 && (a = !0), a ? s === void 0 && (s = i.autohide) : s = c = !1, u = zs(u, i.format, i.locale);
20670
+ a === void 0 && (a = !0), a ? s === void 0 && (s = i.autohide) : s = c = !1, u = Ys(u, i.format, i.locale);
20663
20671
  const l = f0(e, t, n);
20664
20672
  !l && !o || (l && l.toString() !== e.dates.toString() ? (e.dates = l, wp(e, a ? 3 : 1, !0, u), xo(e, "changeDate")) : wp(e, c ? 3 : 1, !0, u), s && e.hide());
20665
20673
  }
@@ -20680,7 +20688,7 @@ class h0 {
20680
20688
  const n = this.config = Object.assign({
20681
20689
  buttonClass: r.buttonClass && String(r.buttonClass) || "button",
20682
20690
  container: null,
20683
- defaultViewDate: bo(),
20691
+ defaultViewDate: Mo(),
20684
20692
  maxDate: void 0,
20685
20693
  minDate: void 0
20686
20694
  }, th(FS, this));
@@ -20749,7 +20757,7 @@ class h0 {
20749
20757
  * @return {Number} time value of parsed date
20750
20758
  */
20751
20759
  static parseDate(t, r, i) {
20752
- return zs(t, r, i && Kc[i] || Kc.en);
20760
+ return Ys(t, r, i && Kc[i] || Kc.en);
20753
20761
  }
20754
20762
  /**
20755
20763
  * @type {Object} - Installed locales in `[languageCode]: localeObject` format
@@ -20953,7 +20961,7 @@ class h0 {
20953
20961
  * hidden
20954
20962
  */
20955
20963
  setFocusedDate(t, r = !1) {
20956
- const { config: i, picker: n, active: a, rangeSideIndex: s } = this, o = i.pickLevel, c = zs(t, i.format, i.locale);
20964
+ const { config: i, picker: n, active: a, rangeSideIndex: s } = this, o = i.pickLevel, c = Ys(t, i.format, i.locale);
20957
20965
  c !== void 0 && (n.changeFocus($a(c, o, s)), a && r && n.changeView(o), n.render());
20958
20966
  }
20959
20967
  /**