courthive-components 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/schedule-page/controller/schedulePageControl.d.ts +3 -0
- package/dist/components/schedule-page/domain/activeStrip.d.ts +72 -0
- package/dist/components/schedule-page/engine/schedulePageStore.d.ts +2 -0
- package/dist/components/schedule-page/index.d.ts +4 -0
- package/dist/components/schedule-page/types.d.ts +3 -0
- package/dist/components/schedule-page/ui/activeStrip.d.ts +46 -0
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +800 -623
- package/dist/courthive-components.umd.js +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/styles/participantStyle.d.ts +1 -1
- package/package.json +2 -2
|
@@ -48,8 +48,7 @@ function k({ variant: e }) {
|
|
|
48
48
|
}
|
|
49
49
|
var A = (e) => "chc-participant", j = (e) => (0, O.default)("chc-participant-name", e?.variant && `chc-participant-name--${e.variant}`), M = (e) => (0, O.default)("chc-participant-type", e?.variant && `chc-participant-type--${e.variant}`);
|
|
50
50
|
function N({ drawPosition: e, sideNumber: t }) {
|
|
51
|
-
|
|
52
|
-
return e ? `${n} chc-has-draw-position` : n;
|
|
51
|
+
return (0, O.default)("chc-participant-container", t === 1 && "chc-participant-container--side1");
|
|
53
52
|
}
|
|
54
53
|
//#endregion
|
|
55
54
|
//#region src/styles/getChevronStyle.ts
|
|
@@ -12707,7 +12706,7 @@ function fh(e) {
|
|
|
12707
12706
|
}
|
|
12708
12707
|
var ph = {
|
|
12709
12708
|
name: "courthive-components",
|
|
12710
|
-
version: "1.
|
|
12709
|
+
version: "1.2.0",
|
|
12711
12710
|
engines: { node: ">=22" },
|
|
12712
12711
|
description: "Components for competitions projects",
|
|
12713
12712
|
files: ["dist"],
|
|
@@ -12781,7 +12780,7 @@ var ph = {
|
|
|
12781
12780
|
"@typescript-eslint/parser": "8.59.1",
|
|
12782
12781
|
"@vitest/browser-playwright": "^4.0.16",
|
|
12783
12782
|
"@vitest/coverage-v8": "^4.0.16",
|
|
12784
|
-
eslint: "10.
|
|
12783
|
+
eslint: "10.3.0",
|
|
12785
12784
|
"eslint-plugin-sonarjs": "4.0.3",
|
|
12786
12785
|
"eslint-plugin-storybook": "^10.2.17",
|
|
12787
12786
|
"gh-pages": "6.3.0",
|
|
@@ -16164,7 +16163,7 @@ var jC = "left";
|
|
|
16164
16163
|
function MC(e) {
|
|
16165
16164
|
let { title: t, placeholder: n, options: r, selectionLimit: i, createTable: a, createFilter: o } = e, s = "selectionControl", c = "selectionTable", l, u, d = [{
|
|
16166
16165
|
label: "Cancel",
|
|
16167
|
-
intent: "
|
|
16166
|
+
intent: "none",
|
|
16168
16167
|
close: !0
|
|
16169
16168
|
}], f = () => {
|
|
16170
16169
|
u ? u() : l?.destroy && l.destroy(), l = void 0;
|
|
@@ -22788,7 +22787,8 @@ var Pj = class {
|
|
|
22788
22787
|
pendingActions: [],
|
|
22789
22788
|
hasUnsavedChanges: !1,
|
|
22790
22789
|
leftCollapsed: !!e.hideLeft,
|
|
22791
|
-
hideLeft: !!e.hideLeft
|
|
22790
|
+
hideLeft: !!e.hideLeft,
|
|
22791
|
+
activeStripVisible: e.activeStripVisible ?? !0
|
|
22792
22792
|
};
|
|
22793
22793
|
}
|
|
22794
22794
|
getState() {
|
|
@@ -22880,6 +22880,12 @@ var Pj = class {
|
|
|
22880
22880
|
toggleLeftPanel() {
|
|
22881
22881
|
this.setState({ leftCollapsed: !this.state.leftCollapsed });
|
|
22882
22882
|
}
|
|
22883
|
+
setActiveStripVisible(e) {
|
|
22884
|
+
this.state.activeStripVisible !== e && this.setState({ activeStripVisible: e });
|
|
22885
|
+
}
|
|
22886
|
+
toggleActiveStrip() {
|
|
22887
|
+
this.setState({ activeStripVisible: !this.state.activeStripVisible });
|
|
22888
|
+
}
|
|
22883
22889
|
subscribe(e) {
|
|
22884
22890
|
return this.listeners.add(e), () => {
|
|
22885
22891
|
this.listeners.delete(e);
|
|
@@ -22938,6 +22944,15 @@ var Pj = class {
|
|
|
22938
22944
|
setIssues(e) {
|
|
22939
22945
|
this.store.setIssues(e);
|
|
22940
22946
|
}
|
|
22947
|
+
setActiveStripVisible(e) {
|
|
22948
|
+
this.store.setActiveStripVisible(e);
|
|
22949
|
+
}
|
|
22950
|
+
toggleActiveStrip() {
|
|
22951
|
+
this.store.toggleActiveStrip();
|
|
22952
|
+
}
|
|
22953
|
+
get activeStripVisible() {
|
|
22954
|
+
return this.store.getState().activeStripVisible;
|
|
22955
|
+
}
|
|
22941
22956
|
save() {
|
|
22942
22957
|
return this.store.save();
|
|
22943
22958
|
}
|
|
@@ -22950,7 +22965,169 @@ var Pj = class {
|
|
|
22950
22965
|
getStore() {
|
|
22951
22966
|
return this.store;
|
|
22952
22967
|
}
|
|
22953
|
-
}, Ij = "
|
|
22968
|
+
}, Ij = new Set(["IN_PROGRESS", "SUSPENDED"]), Lj = new Set([
|
|
22969
|
+
"CANCELLED",
|
|
22970
|
+
"ABANDONED",
|
|
22971
|
+
"COMPLETED",
|
|
22972
|
+
"DEAD_RUBBER",
|
|
22973
|
+
"DEFAULTED",
|
|
22974
|
+
"DOUBLE_WALKOVER",
|
|
22975
|
+
"DOUBLE_DEFAULT",
|
|
22976
|
+
"RETIRED",
|
|
22977
|
+
"WALKOVER"
|
|
22978
|
+
]), Rj = "in-progress", zj = "pending", Bj = "completed";
|
|
22979
|
+
function Vj(e, t, n) {
|
|
22980
|
+
let r = e.matchUpStatus;
|
|
22981
|
+
return r && t.has(r) || e.hasScore && e.winningSide === void 0 && (!r || !n.has(r)) ? Rj : r && n.has(r) || e.winningSide !== void 0 ? Bj : zj;
|
|
22982
|
+
}
|
|
22983
|
+
function Hj(e, t) {
|
|
22984
|
+
let n = t?.inProgressStatuses ?? Ij, r = t?.completedStatuses ?? Lj, i = e.cells, a = -1;
|
|
22985
|
+
for (let t = 0; t < i.length; t++) {
|
|
22986
|
+
let o = i[t];
|
|
22987
|
+
if (!o) continue;
|
|
22988
|
+
let s = Vj(o, n, r);
|
|
22989
|
+
if (s === Rj) return {
|
|
22990
|
+
courtId: e.courtId,
|
|
22991
|
+
state: Rj,
|
|
22992
|
+
matchUp: o,
|
|
22993
|
+
rowIndex: t
|
|
22994
|
+
};
|
|
22995
|
+
s === zj && a === -1 && (a = t);
|
|
22996
|
+
}
|
|
22997
|
+
return a === -1 ? {
|
|
22998
|
+
courtId: e.courtId,
|
|
22999
|
+
state: "free"
|
|
23000
|
+
} : {
|
|
23001
|
+
courtId: e.courtId,
|
|
23002
|
+
state: "next",
|
|
23003
|
+
matchUp: i[a],
|
|
23004
|
+
rowIndex: a
|
|
23005
|
+
};
|
|
23006
|
+
}
|
|
23007
|
+
function Uj(e, t) {
|
|
23008
|
+
return e.columns.map((e) => Hj(e, t));
|
|
23009
|
+
}
|
|
23010
|
+
function Wj(e, t) {
|
|
23011
|
+
if (t.size === 0) return !1;
|
|
23012
|
+
for (let n of e.participantIds) if (t.has(n)) return !0;
|
|
23013
|
+
return !1;
|
|
23014
|
+
}
|
|
23015
|
+
function Gj(e, t) {
|
|
23016
|
+
return t.roundNumber !== void 0 && t.drawId !== void 0 && e.drawId === t.drawId && e.roundNumber !== void 0 && e.roundNumber < t.roundNumber;
|
|
23017
|
+
}
|
|
23018
|
+
function Kj(e, t) {
|
|
23019
|
+
let n = new Set(t.participantIds ?? []), r = -1, i = -1;
|
|
23020
|
+
for (let a of e.columns) for (let e = 0; e < a.cells.length; e++) {
|
|
23021
|
+
let o = a.cells[e];
|
|
23022
|
+
!o || o.matchUpId === t.matchUpId || (e > r && Wj(o, n) && (r = e), e > i && Gj(o, t) && (i = e));
|
|
23023
|
+
}
|
|
23024
|
+
return {
|
|
23025
|
+
participantFloor: r,
|
|
23026
|
+
earlierRoundFloor: i
|
|
23027
|
+
};
|
|
23028
|
+
}
|
|
23029
|
+
function qj(e, t, n) {
|
|
23030
|
+
let r = t;
|
|
23031
|
+
for (; r < e.cells.length;) {
|
|
23032
|
+
let t = e.cells[r];
|
|
23033
|
+
if (!t || t.matchUpId === n) return r;
|
|
23034
|
+
r++;
|
|
23035
|
+
}
|
|
23036
|
+
return r;
|
|
23037
|
+
}
|
|
23038
|
+
function Jj(e, t, n) {
|
|
23039
|
+
let r = e.columns.find((e) => e.courtId === t);
|
|
23040
|
+
if (!r) throw Error(`computeActiveStripDropTarget: court "${t}" not present in grid`);
|
|
23041
|
+
let { participantFloor: i, earlierRoundFloor: a } = Kj(e, n);
|
|
23042
|
+
return {
|
|
23043
|
+
courtId: t,
|
|
23044
|
+
rowIndex: qj(r, Math.max(0, i + 1, a + 1), n.matchUpId)
|
|
23045
|
+
};
|
|
23046
|
+
}
|
|
23047
|
+
//#endregion
|
|
23048
|
+
//#region src/components/schedule-page/ui/activeStrip.ts
|
|
23049
|
+
var Yj = "drop-over";
|
|
23050
|
+
function Xj(e, t, n, r) {
|
|
23051
|
+
e.addEventListener("dragover", (t) => {
|
|
23052
|
+
t.preventDefault(), e.classList.add(Yj), t.dataTransfer && (t.dataTransfer.dropEffect = "move");
|
|
23053
|
+
}), e.addEventListener("dragleave", () => {
|
|
23054
|
+
e.classList.remove(Yj);
|
|
23055
|
+
}), e.addEventListener("drop", (i) => {
|
|
23056
|
+
if (e.classList.remove(Yj), i.preventDefault(), !n.onMatchUpDrop) return;
|
|
23057
|
+
let a;
|
|
23058
|
+
try {
|
|
23059
|
+
a = JSON.parse(i.dataTransfer?.getData("application/json") ?? "");
|
|
23060
|
+
} catch {
|
|
23061
|
+
return;
|
|
23062
|
+
}
|
|
23063
|
+
if (a.type !== "CATALOG_MATCHUP" && a.type !== "GRID_MATCHUP") return;
|
|
23064
|
+
let o = {
|
|
23065
|
+
matchUpId: a.matchUp.matchUpId,
|
|
23066
|
+
drawId: a.matchUp.drawId,
|
|
23067
|
+
roundNumber: a.matchUp.roundNumber,
|
|
23068
|
+
participantIds: (a.matchUp.sides ?? []).map((e) => e.participantId).filter((e) => !!e)
|
|
23069
|
+
}, s = Jj(r(), t.courtId, o);
|
|
23070
|
+
n.onMatchUpDrop(a, s, i);
|
|
23071
|
+
});
|
|
23072
|
+
}
|
|
23073
|
+
function Zj(e) {
|
|
23074
|
+
return e === "in-progress" ? "LIVE" : e === "next" ? "NEXT" : null;
|
|
23075
|
+
}
|
|
23076
|
+
function Qj(e, t, n, r) {
|
|
23077
|
+
let i = document.createElement("div");
|
|
23078
|
+
if (i.className = `spl-active-strip-cell state-${e.state}`, i.dataset.courtId = e.courtId, e.rowIndex !== void 0 && (i.dataset.rowIndex = String(e.rowIndex)), r.cellHeight && (i.style.minHeight = r.cellHeight), e.state !== "free" && e.matchUp) {
|
|
23079
|
+
let t = r.renderCell?.(e.matchUp);
|
|
23080
|
+
if (t) i.appendChild(t);
|
|
23081
|
+
else {
|
|
23082
|
+
let t = document.createElement("div");
|
|
23083
|
+
t.className = "spl-active-strip-body", t.textContent = e.matchUp.participantIds.join(" – ") || e.matchUp.matchUpId, i.appendChild(t);
|
|
23084
|
+
}
|
|
23085
|
+
}
|
|
23086
|
+
let a = Zj(e.state);
|
|
23087
|
+
if (a) {
|
|
23088
|
+
let e = document.createElement("span");
|
|
23089
|
+
e.className = "spl-active-strip-state-pill", e.textContent = a, i.appendChild(e);
|
|
23090
|
+
}
|
|
23091
|
+
return Xj(i, e, t, n), i;
|
|
23092
|
+
}
|
|
23093
|
+
function $j(e) {
|
|
23094
|
+
let t = document.createElement("div");
|
|
23095
|
+
if (t.className = "spl-active-strip-spacer", e.cellHeight && (t.style.minHeight = e.cellHeight), e.spacerLabel) {
|
|
23096
|
+
let n = document.createElement("span");
|
|
23097
|
+
n.className = "spl-active-strip-spacer-label", n.textContent = e.spacerLabel, t.appendChild(n);
|
|
23098
|
+
}
|
|
23099
|
+
return t;
|
|
23100
|
+
}
|
|
23101
|
+
function eM(e = {}, t = {}) {
|
|
23102
|
+
let n = document.createElement("div");
|
|
23103
|
+
n.className = "spl-active-strip";
|
|
23104
|
+
let r = {
|
|
23105
|
+
grid: { columns: [] },
|
|
23106
|
+
courts: []
|
|
23107
|
+
};
|
|
23108
|
+
function i() {
|
|
23109
|
+
return r.grid;
|
|
23110
|
+
}
|
|
23111
|
+
function a() {
|
|
23112
|
+
n.innerHTML = "", r.gridTemplateColumns ? (n.style.display = "grid", n.style.gridTemplateColumns = r.gridTemplateColumns) : (n.style.display = "", n.style.gridTemplateColumns = ""), n.style.minWidth = r.minWidth ?? "", n.appendChild($j(t));
|
|
23113
|
+
let a = Uj(r.grid, t.statusOptions);
|
|
23114
|
+
for (let r of a) n.appendChild(Qj(r, e, i, t));
|
|
23115
|
+
}
|
|
23116
|
+
function o(e) {
|
|
23117
|
+
r = e, a();
|
|
23118
|
+
}
|
|
23119
|
+
function s(e) {
|
|
23120
|
+
n.hidden = !e.activeStripVisible;
|
|
23121
|
+
}
|
|
23122
|
+
return {
|
|
23123
|
+
element: n,
|
|
23124
|
+
setData: o,
|
|
23125
|
+
update: s
|
|
23126
|
+
};
|
|
23127
|
+
}
|
|
23128
|
+
//#endregion
|
|
23129
|
+
//#region src/components/schedule-page/ui/scheduleGridCell.ts
|
|
23130
|
+
var tM = "spl-cell--conflict-highlight", nM = "spl-cell--complete", rM = {
|
|
22954
23131
|
header: ["time"],
|
|
22955
23132
|
body: ["eventRound", "participants"],
|
|
22956
23133
|
footer: ["score"],
|
|
@@ -22963,11 +23140,11 @@ var Pj = class {
|
|
|
22963
23140
|
showPotentials: !0
|
|
22964
23141
|
}
|
|
22965
23142
|
};
|
|
22966
|
-
function
|
|
22967
|
-
let n = t ??
|
|
22968
|
-
return e.isBlocked ?
|
|
23143
|
+
function iM(e, t) {
|
|
23144
|
+
let n = t ?? rM;
|
|
23145
|
+
return e.isBlocked ? aM(e) : e.matchUpId ? sM(e, n) : oM();
|
|
22969
23146
|
}
|
|
22970
|
-
function
|
|
23147
|
+
function aM(e) {
|
|
22971
23148
|
let t = document.createElement("div");
|
|
22972
23149
|
t.className = "spl-grid-cell spl-cell--blocked";
|
|
22973
23150
|
let n = e.booking?.bookingType || "BLOCKED";
|
|
@@ -22985,57 +23162,57 @@ function Bj(e) {
|
|
|
22985
23162
|
}
|
|
22986
23163
|
return t.appendChild(r), t;
|
|
22987
23164
|
}
|
|
22988
|
-
function
|
|
23165
|
+
function oM() {
|
|
22989
23166
|
let e = document.createElement("div");
|
|
22990
23167
|
return e.className = "spl-grid-cell spl-cell--empty", e;
|
|
22991
23168
|
}
|
|
22992
|
-
function
|
|
23169
|
+
function sM(e, t) {
|
|
22993
23170
|
let n = document.createElement("div");
|
|
22994
|
-
if (n.className = "spl-grid-cell", n.dataset.matchupId = e.matchUpId, e.drawId && (n.dataset.drawId = e.drawId), e.gender && (n.dataset.gender = e.gender),
|
|
23171
|
+
if (n.className = "spl-grid-cell", n.dataset.matchupId = e.matchUpId, e.drawId && (n.dataset.drawId = e.drawId), e.gender && (n.dataset.gender = e.gender), cM(n, e), t.header.length) {
|
|
22995
23172
|
let r = document.createElement("div");
|
|
22996
|
-
r.className = "spl-grid-cell__header",
|
|
23173
|
+
r.className = "spl-grid-cell__header", lM(r, t.header, e, t), n.appendChild(r);
|
|
22997
23174
|
}
|
|
22998
23175
|
if (t.body.length) {
|
|
22999
23176
|
let r = document.createElement("div");
|
|
23000
|
-
r.className = "spl-grid-cell__body",
|
|
23177
|
+
r.className = "spl-grid-cell__body", lM(r, t.body, e, t), n.appendChild(r);
|
|
23001
23178
|
}
|
|
23002
23179
|
if (t.footer.length) {
|
|
23003
23180
|
let r = document.createElement("div");
|
|
23004
|
-
r.className = "spl-grid-cell__footer",
|
|
23181
|
+
r.className = "spl-grid-cell__footer", lM(r, t.footer, e, t), n.appendChild(r);
|
|
23005
23182
|
}
|
|
23006
23183
|
return e.issueIds?.length && (n.addEventListener("mouseenter", () => {
|
|
23007
|
-
n.classList.add(
|
|
23008
|
-
for (let t of e.issueIds) document.querySelectorAll(`[data-matchup-id="${t}"]`).forEach((e) => e.classList.add(
|
|
23184
|
+
n.classList.add(tM);
|
|
23185
|
+
for (let t of e.issueIds) document.querySelectorAll(`[data-matchup-id="${t}"]`).forEach((e) => e.classList.add(tM));
|
|
23009
23186
|
}), n.addEventListener("mouseleave", () => {
|
|
23010
|
-
n.classList.remove(
|
|
23011
|
-
for (let t of e.issueIds) document.querySelectorAll(`[data-matchup-id="${t}"]`).forEach((e) => e.classList.remove(
|
|
23187
|
+
n.classList.remove(tM);
|
|
23188
|
+
for (let t of e.issueIds) document.querySelectorAll(`[data-matchup-id="${t}"]`).forEach((e) => e.classList.remove(tM));
|
|
23012
23189
|
})), n;
|
|
23013
23190
|
}
|
|
23014
|
-
function
|
|
23191
|
+
function cM(e, t) {
|
|
23015
23192
|
let n = t.matchUpStatus?.toUpperCase();
|
|
23016
|
-
n === "COMPLETED" || n === "RETIRED" || n === "DEFAULTED" || n === "WALKOVER" ? e.classList.add(
|
|
23193
|
+
n === "COMPLETED" || n === "RETIRED" || n === "DEFAULTED" || n === "WALKOVER" ? e.classList.add(nM) : n === "IN_PROGRESS" ? e.classList.add("spl-cell--inprogress") : n === "ABANDONED" ? e.classList.add("spl-cell--abandoned") : n === "CANCELLED" ? e.classList.add("spl-cell--cancelled") : n === "DOUBLE_WALKOVER" && e.classList.add("spl-cell--double-walkover");
|
|
23017
23194
|
let r = t.scheduleState?.toUpperCase();
|
|
23018
23195
|
r === "SCHEDULE_ERROR" || r === "ERROR" ? e.classList.add("spl-cell--error") : r === "SCHEDULE_CONFLICT" || r === "CONFLICT" ? e.classList.add("spl-cell--conflict") : r === "SCHEDULE_WARNING" || r === "WARNING" ? e.classList.add("spl-cell--warning") : (r === "SCHEDULE_ISSUE" || r === "ISSUE") && e.classList.add("spl-cell--issue"), (t.issueType === "DOUBLE_BOOKING" || t.issueType === "courtDoubleBooking") && e.classList.add("spl-cell--double-booking");
|
|
23019
23196
|
}
|
|
23020
|
-
function
|
|
23197
|
+
function lM(e, t, n, r) {
|
|
23021
23198
|
for (let i of t) {
|
|
23022
|
-
let t =
|
|
23199
|
+
let t = uM(i, n, r);
|
|
23023
23200
|
t && e.appendChild(t);
|
|
23024
23201
|
}
|
|
23025
23202
|
}
|
|
23026
|
-
function
|
|
23203
|
+
function uM(e, t, n) {
|
|
23027
23204
|
switch (e) {
|
|
23028
|
-
case "time": return
|
|
23029
|
-
case "eventRound": return
|
|
23030
|
-
case "participants": return
|
|
23031
|
-
case "score": return
|
|
23032
|
-
case "matchUpStatus": return
|
|
23033
|
-
case "matchUpFormat": return
|
|
23034
|
-
case "umpire": return
|
|
23205
|
+
case "time": return dM(t);
|
|
23206
|
+
case "eventRound": return fM(t);
|
|
23207
|
+
case "participants": return pM(t, n.participantDisplay);
|
|
23208
|
+
case "score": return vM(t);
|
|
23209
|
+
case "matchUpStatus": return yM(t);
|
|
23210
|
+
case "matchUpFormat": return bM(t);
|
|
23211
|
+
case "umpire": return xM(t);
|
|
23035
23212
|
default: return null;
|
|
23036
23213
|
}
|
|
23037
23214
|
}
|
|
23038
|
-
function
|
|
23215
|
+
function dM(e) {
|
|
23039
23216
|
let t = e.schedule?.scheduledTime || e.schedule?.startTime, n = e.schedule?.timeModifiers, r = e.schedule?.courtAnnotation;
|
|
23040
23217
|
if (!t && !n?.length && !r) return null;
|
|
23041
23218
|
let i = document.createElement("div");
|
|
@@ -23047,19 +23224,19 @@ function Kj(e) {
|
|
|
23047
23224
|
}
|
|
23048
23225
|
return i;
|
|
23049
23226
|
}
|
|
23050
|
-
function
|
|
23227
|
+
function fM(e) {
|
|
23051
23228
|
let t = [e.eventName, e.roundName].filter(Boolean);
|
|
23052
23229
|
if (!t.length) return null;
|
|
23053
23230
|
let n = document.createElement("div");
|
|
23054
23231
|
return n.className = "spl-grid-cell__event-round", n.textContent = t.join(" "), n;
|
|
23055
23232
|
}
|
|
23056
|
-
function
|
|
23057
|
-
let n = t ??
|
|
23233
|
+
function pM(e, t) {
|
|
23234
|
+
let n = t ?? rM.participantDisplay, r = document.createElement("div");
|
|
23058
23235
|
r.className = "spl-grid-cell__participants";
|
|
23059
23236
|
let i = e.sides || [], a = e.matchUpStatus?.toUpperCase() === "BYE", o = i.some((e) => e.bye);
|
|
23060
23237
|
if (i.length === 0 && n.showPotentials !== !1 && e.potentialParticipants?.length) {
|
|
23061
23238
|
for (let t = 0; t < e.potentialParticipants.length; t++) {
|
|
23062
|
-
t > 0 && r.appendChild(
|
|
23239
|
+
t > 0 && r.appendChild(gM());
|
|
23063
23240
|
let n = e.potentialParticipants[t].map((e) => e?.participantName || "TBD").join(" / "), i = document.createElement("div");
|
|
23064
23241
|
i.className = "spl-grid-cell__side spl-grid-cell__potential", i.textContent = n || "TBD", r.appendChild(i);
|
|
23065
23242
|
}
|
|
@@ -23068,31 +23245,31 @@ function Jj(e, t) {
|
|
|
23068
23245
|
if (i.length === 0) return null;
|
|
23069
23246
|
for (let t = 0; t < i.length; t++) {
|
|
23070
23247
|
let a = i[t];
|
|
23071
|
-
a.bye ? r.appendChild(
|
|
23248
|
+
a.bye ? r.appendChild(hM()) : (t > 0 && !i[t - 1]?.bye && r.appendChild(gM()), r.appendChild(mM(a, e, n, a.sideNumber ?? t + 1)));
|
|
23072
23249
|
}
|
|
23073
|
-
return (a || o) && i.length === 1 && !i[0].bye && r.appendChild(
|
|
23250
|
+
return (a || o) && i.length === 1 && !i[0].bye && r.appendChild(hM()), r;
|
|
23074
23251
|
}
|
|
23075
|
-
function
|
|
23252
|
+
function mM(e, t, n, r) {
|
|
23076
23253
|
let i = document.createElement("div");
|
|
23077
23254
|
i.className = "spl-grid-cell__side";
|
|
23078
23255
|
let a = document.createElement("span");
|
|
23079
23256
|
a.className = "spl-grid-cell__name";
|
|
23080
|
-
let o =
|
|
23257
|
+
let o = _M(e.participantName, n.nameFormat) || "TBD";
|
|
23081
23258
|
if (n.showSeed && e.seedNumber && (o += ` [${e.seedNumber}]`), n.showRanking && e.ranking && (o += ` (#${e.ranking})`), n.showNationality && e.nationality && (o += ` ${e.nationality}`), a.textContent = o, n.boldWinner !== !1 && t.winningSide === r && (a.style.fontWeight = "bold"), i.appendChild(a), e.teamName) {
|
|
23082
23259
|
let t = document.createElement("div");
|
|
23083
23260
|
t.className = "spl-grid-cell__team-name", t.textContent = e.teamName, i.appendChild(t);
|
|
23084
23261
|
}
|
|
23085
23262
|
return i;
|
|
23086
23263
|
}
|
|
23087
|
-
function
|
|
23264
|
+
function hM() {
|
|
23088
23265
|
let e = document.createElement("div");
|
|
23089
23266
|
return e.className = "spl-grid-cell__bye", e.textContent = "BYE", e;
|
|
23090
23267
|
}
|
|
23091
|
-
function
|
|
23268
|
+
function gM() {
|
|
23092
23269
|
let e = document.createElement("div");
|
|
23093
23270
|
return e.className = "spl-grid-cell__vs", e.textContent = "vs.", e;
|
|
23094
23271
|
}
|
|
23095
|
-
function
|
|
23272
|
+
function _M(e, t) {
|
|
23096
23273
|
if (!e) return "";
|
|
23097
23274
|
switch (t) {
|
|
23098
23275
|
case "last": return e.includes(",") ? e.split(",")[0].trim() : e.trim().split(/\s+/).at(-1);
|
|
@@ -23109,30 +23286,30 @@ function Qj(e, t) {
|
|
|
23109
23286
|
default: return e;
|
|
23110
23287
|
}
|
|
23111
23288
|
}
|
|
23112
|
-
function
|
|
23289
|
+
function vM(e) {
|
|
23113
23290
|
let t = e.score?.scoreStringSide1, n = e.matchUpStatus?.toUpperCase(), r = n === "WALKOVER" ? "WALKOVER" : n === "DEFAULTED" ? "DEFAULT" : n === "RETIRED" ? "RET." : n === "DOUBLE_WALKOVER" ? "D.W/O" : n === "ABANDONED" ? "ABN." : null;
|
|
23114
23291
|
if (!t && !r) return null;
|
|
23115
23292
|
let i = document.createElement("div");
|
|
23116
23293
|
return i.className = "spl-grid-cell__score", i.textContent = t || r || "", i;
|
|
23117
23294
|
}
|
|
23118
|
-
function
|
|
23295
|
+
function yM(e) {
|
|
23119
23296
|
if (!e.matchUpStatus) return null;
|
|
23120
23297
|
let t = document.createElement("div");
|
|
23121
23298
|
t.className = "spl-grid-cell__status-badge";
|
|
23122
23299
|
let n = e.matchUpStatus.toUpperCase();
|
|
23123
23300
|
return n === "IN_PROGRESS" ? (t.textContent = "LIVE", t.classList.add("spl-grid-cell__status-badge--live")) : n === "COMPLETED" || n === "RETIRED" || n === "DEFAULTED" || n === "WALKOVER" ? (t.textContent = "DONE", t.classList.add("spl-grid-cell__status-badge--done")) : t.textContent = e.matchUpStatus.replaceAll("_", " "), t;
|
|
23124
23301
|
}
|
|
23125
|
-
function
|
|
23302
|
+
function bM(e) {
|
|
23126
23303
|
if (!e.matchUpFormat) return null;
|
|
23127
23304
|
let t = document.createElement("div");
|
|
23128
23305
|
return t.className = "spl-grid-cell__format", t.textContent = e.matchUpFormat, t;
|
|
23129
23306
|
}
|
|
23130
|
-
function
|
|
23307
|
+
function xM(e) {
|
|
23131
23308
|
if (!e.umpire) return null;
|
|
23132
23309
|
let t = document.createElement("div");
|
|
23133
23310
|
return t.className = "spl-grid-cell__umpire", t.textContent = e.umpire, t;
|
|
23134
23311
|
}
|
|
23135
|
-
function
|
|
23312
|
+
function SM(e) {
|
|
23136
23313
|
if (!e) return { matchUpId: "" };
|
|
23137
23314
|
if (e.isBlocked) return {
|
|
23138
23315
|
matchUpId: "",
|
|
@@ -23182,7 +23359,7 @@ function rM(e) {
|
|
|
23182
23359
|
}
|
|
23183
23360
|
//#endregion
|
|
23184
23361
|
//#region src/components/schedule-page/ui/scheduleCellTypeAhead.ts
|
|
23185
|
-
function
|
|
23362
|
+
function CM({ cell: e, listProvider: t, onSelect: n, onCancel: r }) {
|
|
23186
23363
|
let i = e.innerHTML, a = [], o = !1, s = !1;
|
|
23187
23364
|
e.classList.add("spl-cell--typeahead"), e.innerHTML = "";
|
|
23188
23365
|
let c = document.createElement("div");
|
|
@@ -23229,13 +23406,13 @@ function iM({ cell: e, listProvider: t, onSelect: n, onCancel: r }) {
|
|
|
23229
23406
|
}
|
|
23230
23407
|
//#endregion
|
|
23231
23408
|
//#region src/components/schedule-page/index.ts
|
|
23232
|
-
function
|
|
23409
|
+
function wM(e, t) {
|
|
23233
23410
|
let n = new Fj(e);
|
|
23234
23411
|
return n.render(t), n;
|
|
23235
23412
|
}
|
|
23236
23413
|
//#endregion
|
|
23237
23414
|
//#region src/components/composition-editor/compositionEditorStore.ts
|
|
23238
|
-
var
|
|
23415
|
+
var TM = class {
|
|
23239
23416
|
constructor(e) {
|
|
23240
23417
|
this.listeners = /* @__PURE__ */ new Set(), this.config = e, this.state = {
|
|
23241
23418
|
compositionName: e.compositionName || "Custom",
|
|
@@ -23322,20 +23499,20 @@ var oM = class {
|
|
|
23322
23499
|
configuration: this.state.configuration
|
|
23323
23500
|
});
|
|
23324
23501
|
}
|
|
23325
|
-
},
|
|
23502
|
+
}, EM = () => "ce-layout", DM = () => "ce-left", OM = () => "ce-right", kM = () => "ce-name-row", AM = () => "ce-name-label", jM = () => "ce-name-input", MM = () => "ce-section", NM = () => "ce-section-header", PM = () => "ce-section-chevron", FM = () => "ce-section-body", IM = () => "ce-field", LM = () => "ce-field-label", RM = () => "ce-field-control", zM = () => "ce-select", BM = () => "ce-text-input", VM = () => "ce-color-input", HM = () => "ce-toggle", UM = () => "ce-toggle-track", WM = () => "ce-preview", GM = () => "ce-preview-header", KM = () => "ce-preview-body", qM = () => "ce-preview-matchup", JM = () => "ce-subgroup", YM = () => "ce-subgroup-title";
|
|
23326
23503
|
//#endregion
|
|
23327
23504
|
//#region src/components/composition-editor/sections/sectionBuilder.ts
|
|
23328
|
-
function
|
|
23505
|
+
function XM(e, t) {
|
|
23329
23506
|
let n = document.createElement("div");
|
|
23330
|
-
n.className =
|
|
23507
|
+
n.className = MM();
|
|
23331
23508
|
let r = document.createElement("div");
|
|
23332
|
-
r.className =
|
|
23509
|
+
r.className = NM();
|
|
23333
23510
|
let i = document.createElement("span");
|
|
23334
|
-
i.className =
|
|
23511
|
+
i.className = PM();
|
|
23335
23512
|
let a = document.createElement("span");
|
|
23336
23513
|
a.textContent = e.label, r.appendChild(i), r.appendChild(a), r.addEventListener("click", () => t.toggleSection(e.id));
|
|
23337
23514
|
let o = document.createElement("div");
|
|
23338
|
-
o.className =
|
|
23515
|
+
o.className = FM();
|
|
23339
23516
|
let s = e.factory(t);
|
|
23340
23517
|
o.appendChild(s.element), n.appendChild(r), n.appendChild(o);
|
|
23341
23518
|
function c(t) {
|
|
@@ -23349,19 +23526,19 @@ function jM(e, t) {
|
|
|
23349
23526
|
}
|
|
23350
23527
|
//#endregion
|
|
23351
23528
|
//#region src/components/composition-editor/sections/fieldBuilders.ts
|
|
23352
|
-
function
|
|
23529
|
+
function ZM(e, t, n, r = !1) {
|
|
23353
23530
|
let i = document.createElement("div");
|
|
23354
|
-
i.className =
|
|
23531
|
+
i.className = IM();
|
|
23355
23532
|
let a = document.createElement("span");
|
|
23356
|
-
a.className =
|
|
23533
|
+
a.className = LM(), a.textContent = e, i.appendChild(a);
|
|
23357
23534
|
let o = document.createElement("label");
|
|
23358
|
-
o.className =
|
|
23535
|
+
o.className = HM();
|
|
23359
23536
|
let s = document.createElement("input");
|
|
23360
23537
|
s.type = "checkbox", s.checked = t, s.disabled = r, s.addEventListener("change", () => n(s.checked));
|
|
23361
23538
|
let c = document.createElement("span");
|
|
23362
|
-
c.className =
|
|
23539
|
+
c.className = UM(), o.appendChild(s), o.appendChild(c);
|
|
23363
23540
|
let l = document.createElement("div");
|
|
23364
|
-
return l.className =
|
|
23541
|
+
return l.className = RM(), l.appendChild(o), i.appendChild(l), {
|
|
23365
23542
|
element: i,
|
|
23366
23543
|
setChecked: (e) => {
|
|
23367
23544
|
s.checked = e;
|
|
@@ -23371,50 +23548,50 @@ function MM(e, t, n, r = !1) {
|
|
|
23371
23548
|
}
|
|
23372
23549
|
};
|
|
23373
23550
|
}
|
|
23374
|
-
function
|
|
23551
|
+
function QM(e, t, n, r, i = !1) {
|
|
23375
23552
|
let a = document.createElement("div");
|
|
23376
|
-
a.className =
|
|
23553
|
+
a.className = IM();
|
|
23377
23554
|
let o = document.createElement("span");
|
|
23378
|
-
o.className =
|
|
23555
|
+
o.className = LM(), o.textContent = e, a.appendChild(o);
|
|
23379
23556
|
let s = document.createElement("select");
|
|
23380
|
-
s.className =
|
|
23557
|
+
s.className = zM(), s.disabled = i;
|
|
23381
23558
|
for (let e of t) {
|
|
23382
23559
|
let t = document.createElement("option");
|
|
23383
23560
|
t.value = e.value, t.textContent = e.label, e.value === n && (t.selected = !0), s.appendChild(t);
|
|
23384
23561
|
}
|
|
23385
23562
|
s.addEventListener("change", () => r(s.value));
|
|
23386
23563
|
let c = document.createElement("div");
|
|
23387
|
-
return c.className =
|
|
23564
|
+
return c.className = RM(), c.appendChild(s), a.appendChild(c), {
|
|
23388
23565
|
element: a,
|
|
23389
23566
|
setValue: (e) => {
|
|
23390
23567
|
s.value = e;
|
|
23391
23568
|
}
|
|
23392
23569
|
};
|
|
23393
23570
|
}
|
|
23394
|
-
function
|
|
23571
|
+
function $M(e, t, n, r = "", i = !1) {
|
|
23395
23572
|
let a = document.createElement("div");
|
|
23396
|
-
a.className =
|
|
23573
|
+
a.className = IM();
|
|
23397
23574
|
let o = document.createElement("span");
|
|
23398
|
-
o.className =
|
|
23575
|
+
o.className = LM(), o.textContent = e, a.appendChild(o);
|
|
23399
23576
|
let s = document.createElement("input");
|
|
23400
|
-
s.type = "text", s.className =
|
|
23577
|
+
s.type = "text", s.className = BM(), s.value = t, s.placeholder = r, s.disabled = i, s.addEventListener("input", () => n(s.value));
|
|
23401
23578
|
let c = document.createElement("div");
|
|
23402
|
-
return c.className =
|
|
23579
|
+
return c.className = RM(), c.appendChild(s), a.appendChild(c), {
|
|
23403
23580
|
element: a,
|
|
23404
23581
|
setValue: (e) => {
|
|
23405
23582
|
s.value = e;
|
|
23406
23583
|
}
|
|
23407
23584
|
};
|
|
23408
23585
|
}
|
|
23409
|
-
function
|
|
23586
|
+
function eN(e, t, n, r = !1) {
|
|
23410
23587
|
let i = document.createElement("div");
|
|
23411
|
-
i.className =
|
|
23588
|
+
i.className = IM();
|
|
23412
23589
|
let a = document.createElement("span");
|
|
23413
|
-
a.className =
|
|
23590
|
+
a.className = LM(), a.textContent = e, i.appendChild(a);
|
|
23414
23591
|
let o = document.createElement("input");
|
|
23415
|
-
o.type = "color", o.className =
|
|
23592
|
+
o.type = "color", o.className = VM(), o.value = t || "#000000", o.disabled = r, o.addEventListener("input", () => n(o.value));
|
|
23416
23593
|
let s = document.createElement("div");
|
|
23417
|
-
return s.className =
|
|
23594
|
+
return s.className = RM(), s.appendChild(o), i.appendChild(s), {
|
|
23418
23595
|
element: i,
|
|
23419
23596
|
setValue: (e) => {
|
|
23420
23597
|
o.value = e || "#000000";
|
|
@@ -23423,17 +23600,17 @@ function FM(e, t, n, r = !1) {
|
|
|
23423
23600
|
}
|
|
23424
23601
|
//#endregion
|
|
23425
23602
|
//#region src/components/composition-editor/sections/themeSection.ts
|
|
23426
|
-
var
|
|
23427
|
-
for (let [, e] of Object.entries(yi)) if (!
|
|
23428
|
-
|
|
23603
|
+
var tN = [], nN = /* @__PURE__ */ new Set();
|
|
23604
|
+
for (let [, e] of Object.entries(yi)) if (!nN.has(e.theme)) {
|
|
23605
|
+
nN.add(e.theme);
|
|
23429
23606
|
let t = e.theme.replace("chc-theme-", "").replace(/-/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
23430
|
-
|
|
23607
|
+
tN.push({
|
|
23431
23608
|
value: e.theme,
|
|
23432
23609
|
label: t
|
|
23433
23610
|
});
|
|
23434
23611
|
}
|
|
23435
|
-
function
|
|
23436
|
-
let t = document.createElement("div"), n =
|
|
23612
|
+
function rN(e) {
|
|
23613
|
+
let t = document.createElement("div"), n = QM("Load preset", [{
|
|
23437
23614
|
value: "",
|
|
23438
23615
|
label: "— Load preset —"
|
|
23439
23616
|
}, ...Object.keys(yi).map((e) => ({
|
|
@@ -23447,7 +23624,7 @@ function RM(e) {
|
|
|
23447
23624
|
t.appendChild(n.element);
|
|
23448
23625
|
let r = document.createElement("div");
|
|
23449
23626
|
r.style.cssText = "font-size:0.7rem; color:var(--chc-text-secondary, #999); padding:0 0 0.3rem; line-height:1.3;", r.textContent = "Replaces all settings with a built-in composition.", t.appendChild(r);
|
|
23450
|
-
let i =
|
|
23627
|
+
let i = QM("Color theme", tN, e.getState().theme, (t) => e.setTheme(t), e.getState().readOnly);
|
|
23451
23628
|
t.appendChild(i.element);
|
|
23452
23629
|
let a = document.createElement("div");
|
|
23453
23630
|
a.style.cssText = "font-size:0.7rem; color:var(--chc-text-secondary, #999); padding:0 0 0.3rem; line-height:1.3;", a.textContent = "Changes only the color scheme, not the display settings.", t.appendChild(a);
|
|
@@ -23461,8 +23638,8 @@ function RM(e) {
|
|
|
23461
23638
|
}
|
|
23462
23639
|
//#endregion
|
|
23463
23640
|
//#region src/components/composition-editor/sections/displaySection.ts
|
|
23464
|
-
function
|
|
23465
|
-
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i =
|
|
23641
|
+
function iN(e) {
|
|
23642
|
+
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i = ZM("Nationality flags", !!r.flags, (t) => e.setConfigField("flags", t), n), a = QM("Seeding style", [
|
|
23466
23643
|
{
|
|
23467
23644
|
value: "",
|
|
23468
23645
|
label: "None"
|
|
@@ -23477,7 +23654,7 @@ function zM(e) {
|
|
|
23477
23654
|
}
|
|
23478
23655
|
], r.bracketedSeeds === "square" ? "square" : r.bracketedSeeds ? "true" : "", (t) => {
|
|
23479
23656
|
t === "square" ? e.setConfigField("bracketedSeeds", "square") : t === "true" ? e.setConfigField("bracketedSeeds", !0) : e.setConfigField("bracketedSeeds", void 0);
|
|
23480
|
-
}, n), o =
|
|
23657
|
+
}, n), o = QM("Seed element", [
|
|
23481
23658
|
{
|
|
23482
23659
|
value: "",
|
|
23483
23660
|
label: "Default"
|
|
@@ -23490,7 +23667,7 @@ function zM(e) {
|
|
|
23490
23667
|
value: "span",
|
|
23491
23668
|
label: "Inline"
|
|
23492
23669
|
}
|
|
23493
|
-
], r.seedingElement || "", (t) => e.setConfigField("seedingElement", t || void 0), n), s =
|
|
23670
|
+
], r.seedingElement || "", (t) => e.setConfigField("seedingElement", t || void 0), n), s = ZM("Draw positions (1st round)", !!r.drawPositions, (t) => e.setConfigField("drawPositions", t), n), c = ZM("Draw positions (all rounds)", !!r.allDrawPositions, (t) => e.setConfigField("allDrawPositions", t), n), l = ZM("Team logo", r.teamLogo !== !1, (t) => e.setConfigField("teamLogo", t), n);
|
|
23494
23671
|
t.appendChild(i.element), t.appendChild(a.element), t.appendChild(o.element), t.appendChild(s.element), t.appendChild(c.element), t.appendChild(l.element);
|
|
23495
23672
|
function u(e) {
|
|
23496
23673
|
let t = e.configuration;
|
|
@@ -23503,14 +23680,14 @@ function zM(e) {
|
|
|
23503
23680
|
}
|
|
23504
23681
|
//#endregion
|
|
23505
23682
|
//#region src/components/composition-editor/sections/scoreSection.ts
|
|
23506
|
-
function
|
|
23507
|
-
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i =
|
|
23683
|
+
function aN(e) {
|
|
23684
|
+
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i = ZM("Score box", !!r.scoreBox, (t) => e.setConfigField("scoreBox", t), n), a = ZM("Game score only", !!r.gameScoreOnly, (t) => e.setConfigField("gameScoreOnly", t), n);
|
|
23508
23685
|
t.appendChild(i.element), t.appendChild(a.element);
|
|
23509
23686
|
let o = document.createElement("div");
|
|
23510
|
-
o.className =
|
|
23687
|
+
o.className = JM();
|
|
23511
23688
|
let s = document.createElement("div");
|
|
23512
|
-
s.className =
|
|
23513
|
-
let c =
|
|
23689
|
+
s.className = YM(), s.textContent = "Game Score Display", o.appendChild(s);
|
|
23690
|
+
let c = QM("Position", [
|
|
23514
23691
|
{
|
|
23515
23692
|
value: "",
|
|
23516
23693
|
label: "Default"
|
|
@@ -23523,7 +23700,7 @@ function BM(e) {
|
|
|
23523
23700
|
value: "trailing",
|
|
23524
23701
|
label: "Trailing"
|
|
23525
23702
|
}
|
|
23526
|
-
], r.gameScore?.position || "", (t) => e.setConfigNestedField("gameScore", "position", t || void 0), n), l =
|
|
23703
|
+
], r.gameScore?.position || "", (t) => e.setConfigNestedField("gameScore", "position", t || void 0), n), l = ZM("Inverted", !!r.gameScore?.inverted, (t) => e.setConfigNestedField("gameScore", "inverted", t), n);
|
|
23527
23704
|
o.appendChild(c.element), o.appendChild(l.element), t.appendChild(o);
|
|
23528
23705
|
function u(e) {
|
|
23529
23706
|
let t = e.configuration;
|
|
@@ -23536,8 +23713,8 @@ function BM(e) {
|
|
|
23536
23713
|
}
|
|
23537
23714
|
//#endregion
|
|
23538
23715
|
//#region src/components/composition-editor/sections/participantSection.ts
|
|
23539
|
-
function
|
|
23540
|
-
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i =
|
|
23716
|
+
function oN(e) {
|
|
23717
|
+
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i = ZM("Gender color", !!r.genderColor, (t) => e.setConfigField("genderColor", t), n), a = ZM("Winner color", !!r.winnerColor, (t) => e.setConfigField("winnerColor", t), n), o = QM("Detail", [
|
|
23541
23718
|
{
|
|
23542
23719
|
value: "",
|
|
23543
23720
|
label: "Default"
|
|
@@ -23552,7 +23729,7 @@ function VM(e) {
|
|
|
23552
23729
|
}
|
|
23553
23730
|
], r.participantDetail || "", (t) => {
|
|
23554
23731
|
e.setConfigField("participantDetail", t || void 0), e.setConfigField("showAddress", t === "ADDRESS");
|
|
23555
|
-
}, n), s =
|
|
23732
|
+
}, n), s = $M("Position color", r.drawPositionColor || "", (t) => e.setConfigField("drawPositionColor", t || void 0), "#999", n);
|
|
23556
23733
|
t.appendChild(i.element), t.appendChild(a.element), t.appendChild(o.element), t.appendChild(s.element);
|
|
23557
23734
|
function c(e) {
|
|
23558
23735
|
let t = e.configuration;
|
|
@@ -23565,8 +23742,8 @@ function VM(e) {
|
|
|
23565
23742
|
}
|
|
23566
23743
|
//#endregion
|
|
23567
23744
|
//#region src/components/composition-editor/sections/placeholderSection.ts
|
|
23568
|
-
function
|
|
23569
|
-
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i =
|
|
23745
|
+
function sN(e) {
|
|
23746
|
+
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i = $M("TBD text", r.placeHolders?.tbd || "", (t) => e.setConfigNestedField("placeHolders", "tbd", t || void 0), "TBD", n), a = $M("Bye text", r.placeHolders?.bye || "", (t) => e.setConfigNestedField("placeHolders", "bye", t || void 0), "Bye", n), o = $M("Qualifier text", r.placeHolders?.qualifier || "", (t) => e.setConfigNestedField("placeHolders", "qualifier", t || void 0), "Qualifier", n);
|
|
23570
23747
|
t.appendChild(i.element), t.appendChild(a.element), t.appendChild(o.element);
|
|
23571
23748
|
function s(e) {
|
|
23572
23749
|
let t = e.configuration;
|
|
@@ -23579,7 +23756,7 @@ function HM(e) {
|
|
|
23579
23756
|
}
|
|
23580
23757
|
//#endregion
|
|
23581
23758
|
//#region src/components/composition-editor/scaleConstants.ts
|
|
23582
|
-
var
|
|
23759
|
+
var cN = [
|
|
23583
23760
|
{
|
|
23584
23761
|
scaleName: "WTN",
|
|
23585
23762
|
accessor: "wtnRating",
|
|
@@ -23603,8 +23780,8 @@ var UM = [
|
|
|
23603
23780
|
];
|
|
23604
23781
|
//#endregion
|
|
23605
23782
|
//#region src/components/composition-editor/sections/scaleSection.ts
|
|
23606
|
-
function
|
|
23607
|
-
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration.scaleAttributes || {}, i =
|
|
23783
|
+
function lN(e) {
|
|
23784
|
+
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration.scaleAttributes || {}, i = QM("Scale type", [
|
|
23608
23785
|
{
|
|
23609
23786
|
value: "",
|
|
23610
23787
|
label: "None"
|
|
@@ -23621,17 +23798,17 @@ function WM(e) {
|
|
|
23621
23798
|
value: "SEEDING",
|
|
23622
23799
|
label: "Seeding"
|
|
23623
23800
|
}
|
|
23624
|
-
], r.scaleType || "", (t) => e.setConfigNestedField("scaleAttributes", "scaleType", t || void 0), n), a =
|
|
23801
|
+
], r.scaleType || "", (t) => e.setConfigNestedField("scaleAttributes", "scaleType", t || void 0), n), a = QM("Scale name", [{
|
|
23625
23802
|
value: "",
|
|
23626
23803
|
label: "None"
|
|
23627
|
-
}, ...
|
|
23804
|
+
}, ...cN.map((e) => ({
|
|
23628
23805
|
value: e.scaleName,
|
|
23629
23806
|
label: e.label
|
|
23630
23807
|
}))], r.scaleName || "", (t) => {
|
|
23631
23808
|
e.setConfigNestedField("scaleAttributes", "scaleName", t || void 0);
|
|
23632
|
-
let n =
|
|
23809
|
+
let n = cN.find((e) => e.scaleName === t);
|
|
23633
23810
|
e.setConfigNestedField("scaleAttributes", "accessor", n?.accessor || void 0);
|
|
23634
|
-
}, n), o =
|
|
23811
|
+
}, n), o = eN("Color", r.scaleColor || "#ff0000", (t) => e.setConfigNestedField("scaleAttributes", "scaleColor", t), n), s = QM("Event type", [
|
|
23635
23812
|
{
|
|
23636
23813
|
value: "",
|
|
23637
23814
|
label: "Any"
|
|
@@ -23644,7 +23821,7 @@ function WM(e) {
|
|
|
23644
23821
|
value: "DOUBLES",
|
|
23645
23822
|
label: "Doubles"
|
|
23646
23823
|
}
|
|
23647
|
-
], r.eventType || "", (t) => e.setConfigNestedField("scaleAttributes", "eventType", t || void 0), n), c =
|
|
23824
|
+
], r.eventType || "", (t) => e.setConfigNestedField("scaleAttributes", "eventType", t || void 0), n), c = ZM("Fallback", !!r.fallback, (t) => e.setConfigNestedField("scaleAttributes", "fallback", t), n), l = ZM("Right of name", r.scalePosition === "right", (t) => e.setConfigNestedField("scaleAttributes", "scalePosition", t ? "right" : "left"), n);
|
|
23648
23825
|
t.appendChild(i.element), t.appendChild(a.element), t.appendChild(o.element), t.appendChild(s.element), t.appendChild(c.element), t.appendChild(l.element);
|
|
23649
23826
|
function u(e) {
|
|
23650
23827
|
let t = e.configuration.scaleAttributes || {}, n = !!e.configuration.flags;
|
|
@@ -23657,8 +23834,8 @@ function WM(e) {
|
|
|
23657
23834
|
}
|
|
23658
23835
|
//#endregion
|
|
23659
23836
|
//#region src/components/composition-editor/sections/layoutSection.ts
|
|
23660
|
-
function
|
|
23661
|
-
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i =
|
|
23837
|
+
function uN(e) {
|
|
23838
|
+
let t = document.createElement("div"), n = e.getState().readOnly, r = e.getState().configuration, i = ZM("Schedule info", !!r.scheduleInfo, (t) => e.setConfigField("scheduleInfo", t), n), a = ZM("MatchUp footer", !!r.matchUpFooter, (t) => e.setConfigField("matchUpFooter", t), n), o = ZM("Center info", !!r.centerInfo, (t) => e.setConfigField("centerInfo", t), n), s = ZM("Set number", !!r.resultsInfo, (t) => e.setConfigField("resultsInfo", t), n), c = ZM("Winner chevron", !!r.winnerChevron, (t) => e.setConfigField("winnerChevron", t), n);
|
|
23662
23839
|
t.appendChild(i.element), t.appendChild(a.element), t.appendChild(o.element), t.appendChild(s.element), t.appendChild(c.element);
|
|
23663
23840
|
function l(e) {
|
|
23664
23841
|
let t = e.configuration;
|
|
@@ -23671,8 +23848,8 @@ function GM(e) {
|
|
|
23671
23848
|
}
|
|
23672
23849
|
//#endregion
|
|
23673
23850
|
//#region src/data/generateMatchUps.ts
|
|
23674
|
-
var { DOUBLES:
|
|
23675
|
-
function
|
|
23851
|
+
var { DOUBLES: dN, SINGLES: fN } = i, { AD_HOC: pN } = t, { INDIVIDUAL: mN } = p;
|
|
23852
|
+
function hN({ matchUpFormat: e = "SET5-S:6/TB7", randomWinningSide: t = !0, qualifyingProfiles: n, participantsCount: r, completionGoal: i, drawSize: a = 4, eventType: o, outcomes: s, drawType: c, withRatings: l, withAllRatings: u } = {}) {
|
|
23676
23853
|
let d = i < 100 ? Math.floor(a * .01 * i) : void 0, p = "venueId", m = [{
|
|
23677
23854
|
venueName: "Challenge Courts",
|
|
23678
23855
|
venueAbbreviation: "CC",
|
|
@@ -23697,7 +23874,7 @@ function XM({ matchUpFormat: e = "SET5-S:6/TB7", randomWinningSide: t = !0, qual
|
|
|
23697
23874
|
],
|
|
23698
23875
|
courtsCount: 8
|
|
23699
23876
|
}], h = {
|
|
23700
|
-
eventType: o ===
|
|
23877
|
+
eventType: o === dN ? dN : fN,
|
|
23701
23878
|
completionGoal: d,
|
|
23702
23879
|
qualifyingProfiles: n,
|
|
23703
23880
|
participantsCount: r,
|
|
@@ -23707,7 +23884,7 @@ function XM({ matchUpFormat: e = "SET5-S:6/TB7", randomWinningSide: t = !0, qual
|
|
|
23707
23884
|
drawType: c,
|
|
23708
23885
|
outcomes: s
|
|
23709
23886
|
};
|
|
23710
|
-
c ===
|
|
23887
|
+
c === pN && Object.assign(h, {
|
|
23711
23888
|
drawMatic: !0,
|
|
23712
23889
|
roundsCount: 3
|
|
23713
23890
|
});
|
|
@@ -23726,7 +23903,7 @@ function XM({ matchUpFormat: e = "SET5-S:6/TB7", randomWinningSide: t = !0, qual
|
|
|
23726
23903
|
accessor: l.scaleName
|
|
23727
23904
|
}] : []);
|
|
23728
23905
|
if (v.length > 0) {
|
|
23729
|
-
let { participants: e } = _.getParticipants({ participantFilters: { participantTypes: [
|
|
23906
|
+
let { participants: e } = _.getParticipants({ participantFilters: { participantTypes: [mN] } });
|
|
23730
23907
|
for (let t of v) e.forEach((e) => {
|
|
23731
23908
|
let n = +(10 + Math.random() * 6).toFixed(2);
|
|
23732
23909
|
_.setParticipantScaleItem({
|
|
@@ -23735,7 +23912,7 @@ function XM({ matchUpFormat: e = "SET5-S:6/TB7", randomWinningSide: t = !0, qual
|
|
|
23735
23912
|
scaleValue: { [t.accessor]: n },
|
|
23736
23913
|
scaleName: t.scaleName,
|
|
23737
23914
|
scaleType: t.scaleType || "RATING",
|
|
23738
|
-
eventType: t.eventType ||
|
|
23915
|
+
eventType: t.eventType || fN
|
|
23739
23916
|
}
|
|
23740
23917
|
});
|
|
23741
23918
|
});
|
|
@@ -23761,15 +23938,15 @@ function XM({ matchUpFormat: e = "SET5-S:6/TB7", randomWinningSide: t = !0, qual
|
|
|
23761
23938
|
}
|
|
23762
23939
|
//#endregion
|
|
23763
23940
|
//#region src/components/composition-editor/compositionPreview.ts
|
|
23764
|
-
var
|
|
23765
|
-
function
|
|
23766
|
-
if (!
|
|
23767
|
-
let { matchUps: e } =
|
|
23941
|
+
var gN = null;
|
|
23942
|
+
function _N() {
|
|
23943
|
+
if (!gN) {
|
|
23944
|
+
let { matchUps: e } = hN({
|
|
23768
23945
|
drawSize: 8,
|
|
23769
23946
|
eventType: "SINGLES",
|
|
23770
23947
|
randomWinningSide: !0,
|
|
23771
23948
|
matchUpFormat: "SET3-S:6/TB7",
|
|
23772
|
-
withAllRatings:
|
|
23949
|
+
withAllRatings: cN.map((e) => ({
|
|
23773
23950
|
scaleName: e.scaleName,
|
|
23774
23951
|
accessor: e.accessor
|
|
23775
23952
|
}))
|
|
@@ -23855,7 +24032,7 @@ function QM() {
|
|
|
23855
24032
|
participant: n
|
|
23856
24033
|
}]
|
|
23857
24034
|
};
|
|
23858
|
-
|
|
24035
|
+
gN = [
|
|
23859
24036
|
...t,
|
|
23860
24037
|
i,
|
|
23861
24038
|
a,
|
|
@@ -23863,15 +24040,15 @@ function QM() {
|
|
|
23863
24040
|
s
|
|
23864
24041
|
];
|
|
23865
24042
|
}
|
|
23866
|
-
return
|
|
24043
|
+
return gN;
|
|
23867
24044
|
}
|
|
23868
|
-
function
|
|
24045
|
+
function vN() {
|
|
23869
24046
|
let e = document.createElement("div");
|
|
23870
|
-
e.className =
|
|
24047
|
+
e.className = WM();
|
|
23871
24048
|
let t = document.createElement("div");
|
|
23872
|
-
t.className =
|
|
24049
|
+
t.className = GM(), t.textContent = "Preview", e.appendChild(t);
|
|
23873
24050
|
let n = document.createElement("div");
|
|
23874
|
-
n.className =
|
|
24051
|
+
n.className = KM(), e.appendChild(n);
|
|
23875
24052
|
let r = "", i = "";
|
|
23876
24053
|
function a(e) {
|
|
23877
24054
|
let t = JSON.stringify(e.configuration);
|
|
@@ -23880,10 +24057,10 @@ function $M() {
|
|
|
23880
24057
|
let a = {
|
|
23881
24058
|
theme: e.theme,
|
|
23882
24059
|
configuration: { ...e.configuration }
|
|
23883
|
-
}, o =
|
|
24060
|
+
}, o = _N();
|
|
23884
24061
|
for (let e of o) {
|
|
23885
24062
|
let t = document.createElement("div");
|
|
23886
|
-
t.className =
|
|
24063
|
+
t.className = qM();
|
|
23887
24064
|
let r = oi({
|
|
23888
24065
|
matchUp: e,
|
|
23889
24066
|
composition: a,
|
|
@@ -23899,60 +24076,60 @@ function $M() {
|
|
|
23899
24076
|
}
|
|
23900
24077
|
//#endregion
|
|
23901
24078
|
//#region src/components/composition-editor/compositionEditor.ts
|
|
23902
|
-
var
|
|
24079
|
+
var yN = [
|
|
23903
24080
|
{
|
|
23904
24081
|
id: "theme",
|
|
23905
24082
|
label: "Theme & Preset",
|
|
23906
|
-
factory:
|
|
24083
|
+
factory: rN
|
|
23907
24084
|
},
|
|
23908
24085
|
{
|
|
23909
24086
|
id: "display",
|
|
23910
24087
|
label: "Display",
|
|
23911
|
-
factory:
|
|
24088
|
+
factory: iN
|
|
23912
24089
|
},
|
|
23913
24090
|
{
|
|
23914
24091
|
id: "score",
|
|
23915
24092
|
label: "Score",
|
|
23916
|
-
factory:
|
|
24093
|
+
factory: aN
|
|
23917
24094
|
},
|
|
23918
24095
|
{
|
|
23919
24096
|
id: "participant",
|
|
23920
24097
|
label: "Participant",
|
|
23921
|
-
factory:
|
|
24098
|
+
factory: oN
|
|
23922
24099
|
},
|
|
23923
24100
|
{
|
|
23924
24101
|
id: "placeholder",
|
|
23925
24102
|
label: "Placeholders",
|
|
23926
|
-
factory:
|
|
24103
|
+
factory: sN
|
|
23927
24104
|
},
|
|
23928
24105
|
{
|
|
23929
24106
|
id: "scale",
|
|
23930
24107
|
label: "Scale Attributes",
|
|
23931
|
-
factory:
|
|
24108
|
+
factory: lN
|
|
23932
24109
|
},
|
|
23933
24110
|
{
|
|
23934
24111
|
id: "layout",
|
|
23935
24112
|
label: "Layout & Info",
|
|
23936
|
-
factory:
|
|
24113
|
+
factory: uN
|
|
23937
24114
|
}
|
|
23938
24115
|
];
|
|
23939
|
-
function
|
|
23940
|
-
let n = new
|
|
23941
|
-
r.className =
|
|
24116
|
+
function bN(e, t) {
|
|
24117
|
+
let n = new TM(t), r = document.createElement("div");
|
|
24118
|
+
r.className = EM();
|
|
23942
24119
|
let i = document.createElement("div");
|
|
23943
|
-
i.className =
|
|
24120
|
+
i.className = DM();
|
|
23944
24121
|
let a = document.createElement("div");
|
|
23945
|
-
a.className =
|
|
24122
|
+
a.className = kM();
|
|
23946
24123
|
let o = document.createElement("span");
|
|
23947
|
-
o.className =
|
|
24124
|
+
o.className = AM(), o.textContent = "Name";
|
|
23948
24125
|
let s = document.createElement("input");
|
|
23949
|
-
s.type = "text", s.className =
|
|
23950
|
-
let c =
|
|
23951
|
-
let t =
|
|
24126
|
+
s.type = "text", s.className = jM(), s.value = n.getState().compositionName, s.disabled = n.getState().readOnly, s.addEventListener("input", () => n.setCompositionName(s.value)), a.appendChild(o), a.appendChild(s), i.appendChild(a);
|
|
24127
|
+
let c = yN.map((e) => {
|
|
24128
|
+
let t = XM(e, n);
|
|
23952
24129
|
return i.appendChild(t.element), t;
|
|
23953
24130
|
}), l = document.createElement("div");
|
|
23954
|
-
l.className =
|
|
23955
|
-
let u =
|
|
24131
|
+
l.className = OM();
|
|
24132
|
+
let u = vN();
|
|
23956
24133
|
l.appendChild(u.element), r.appendChild(i), r.appendChild(l), e.appendChild(r);
|
|
23957
24134
|
let d = n.subscribe((e) => {
|
|
23958
24135
|
s.value = e.compositionName;
|
|
@@ -23977,21 +24154,21 @@ function tN(e, t) {
|
|
|
23977
24154
|
}
|
|
23978
24155
|
//#endregion
|
|
23979
24156
|
//#region src/components/print-composition-editor/printCompositionEditor.ts
|
|
23980
|
-
var
|
|
24157
|
+
var xN = [
|
|
23981
24158
|
"grand-slam",
|
|
23982
24159
|
"itf",
|
|
23983
24160
|
"minimal",
|
|
23984
24161
|
"none"
|
|
23985
|
-
],
|
|
24162
|
+
], SN = [
|
|
23986
24163
|
"standard",
|
|
23987
24164
|
"seedings",
|
|
23988
24165
|
"officials",
|
|
23989
24166
|
"none"
|
|
23990
|
-
],
|
|
24167
|
+
], CN = ["a4", "letter"], wN = [
|
|
23991
24168
|
"auto",
|
|
23992
24169
|
"portrait",
|
|
23993
24170
|
"landscape"
|
|
23994
|
-
],
|
|
24171
|
+
], TN = {
|
|
23995
24172
|
page: {
|
|
23996
24173
|
pageSize: "a4",
|
|
23997
24174
|
orientation: "auto",
|
|
@@ -24013,12 +24190,12 @@ var nN = [
|
|
|
24013
24190
|
},
|
|
24014
24191
|
content: {}
|
|
24015
24192
|
};
|
|
24016
|
-
function
|
|
24017
|
-
let n =
|
|
24193
|
+
function EN(e, t) {
|
|
24194
|
+
let n = zN(TN, t.config ?? {}), r = !!t.readOnly, i = Z("div", "pce-root"), a = Z("div", "pce-form"), o = Z("div", "pce-aside");
|
|
24018
24195
|
i.appendChild(a), i.appendChild(o);
|
|
24019
24196
|
let s = null;
|
|
24020
24197
|
function c() {
|
|
24021
|
-
a.innerHTML = "", a.appendChild(
|
|
24198
|
+
a.innerHTML = "", a.appendChild(DN(n, r, l)), a.appendChild(ON(n, r, l)), a.appendChild(kN(n, r, l)), a.appendChild(AN(n, r, t.printType, l)), !r && t.onSave && a.appendChild(jN(() => t.onSave?.(BN(n)))), o.innerHTML = "";
|
|
24022
24199
|
let e = Z("div", "pce-aside-title");
|
|
24023
24200
|
e.textContent = "Print Type", o.appendChild(e);
|
|
24024
24201
|
let i = Z("span", "pce-print-type-pill");
|
|
@@ -24029,27 +24206,27 @@ function sN(e, t) {
|
|
|
24029
24206
|
u.textContent = "Live PDF preview not yet wired — see admin-client integration.", o.appendChild(u);
|
|
24030
24207
|
}
|
|
24031
24208
|
function l() {
|
|
24032
|
-
s && (s.textContent = JSON.stringify(n, null, 2)), t.onChange?.(
|
|
24209
|
+
s && (s.textContent = JSON.stringify(n, null, 2)), t.onChange?.(BN(n));
|
|
24033
24210
|
}
|
|
24034
24211
|
return c(), e.appendChild(i), {
|
|
24035
24212
|
destroy: () => {
|
|
24036
24213
|
i.parentNode && i.parentNode.removeChild(i);
|
|
24037
24214
|
},
|
|
24038
|
-
getConfig: () =>
|
|
24215
|
+
getConfig: () => BN(n),
|
|
24039
24216
|
setConfig: (e) => {
|
|
24040
|
-
Object.assign(n,
|
|
24217
|
+
Object.assign(n, zN(TN, e)), c();
|
|
24041
24218
|
}
|
|
24042
24219
|
};
|
|
24043
24220
|
}
|
|
24044
|
-
function
|
|
24045
|
-
let { section: r, body: i } =
|
|
24046
|
-
i.appendChild(
|
|
24047
|
-
|
|
24048
|
-
})), i.appendChild(
|
|
24049
|
-
|
|
24221
|
+
function DN(e, t, n) {
|
|
24222
|
+
let { section: r, body: i } = IN("Page");
|
|
24223
|
+
i.appendChild(MN("Size", CN, e.page?.pageSize ?? "a4", t, (t) => {
|
|
24224
|
+
RN(e, "page").pageSize = t, n();
|
|
24225
|
+
})), i.appendChild(MN("Orientation", wN, e.page?.orientation ?? "auto", t, (t) => {
|
|
24226
|
+
RN(e, "page").orientation = t, n();
|
|
24050
24227
|
}));
|
|
24051
24228
|
let a = Z("div", "pce-field pce-field-full");
|
|
24052
|
-
a.appendChild(
|
|
24229
|
+
a.appendChild(LN("Margins (mm)"));
|
|
24053
24230
|
let o = Z("div");
|
|
24054
24231
|
return o.style.display = "grid", o.style.gridTemplateColumns = "repeat(4, 1fr)", o.style.gap = "6px", [
|
|
24055
24232
|
"top",
|
|
@@ -24057,52 +24234,52 @@ function cN(e, t, n) {
|
|
|
24057
24234
|
"bottom",
|
|
24058
24235
|
"left"
|
|
24059
24236
|
].forEach((r) => {
|
|
24060
|
-
o.appendChild(
|
|
24061
|
-
let i =
|
|
24237
|
+
o.appendChild(PN(r, e.page?.margins?.[r] ?? 10, t, (t) => {
|
|
24238
|
+
let i = RN(RN(e, "page"), "margins");
|
|
24062
24239
|
i[r] = t, n();
|
|
24063
24240
|
}));
|
|
24064
24241
|
}), a.appendChild(o), i.appendChild(a), r;
|
|
24065
24242
|
}
|
|
24066
|
-
function
|
|
24067
|
-
let { section: r, body: i } =
|
|
24068
|
-
return i.appendChild(
|
|
24069
|
-
|
|
24070
|
-
})), i.appendChild(
|
|
24071
|
-
|
|
24072
|
-
})), i.appendChild(
|
|
24073
|
-
|
|
24243
|
+
function ON(e, t, n) {
|
|
24244
|
+
let { section: r, body: i } = IN("Header");
|
|
24245
|
+
return i.appendChild(MN("Layout", xN, e.header?.layout ?? "itf", t, (t) => {
|
|
24246
|
+
RN(e, "header").layout = t, n();
|
|
24247
|
+
})), i.appendChild(NN("Tournament name", e.header?.tournamentName ?? "", t, (t) => {
|
|
24248
|
+
RN(e, "header").tournamentName = t, n();
|
|
24249
|
+
})), i.appendChild(NN("Subtitle", e.header?.subtitle ?? "", t, (t) => {
|
|
24250
|
+
RN(e, "header").subtitle = t || void 0, n();
|
|
24074
24251
|
})), r;
|
|
24075
24252
|
}
|
|
24076
|
-
function
|
|
24077
|
-
let { section: r, body: i } =
|
|
24078
|
-
return i.appendChild(
|
|
24079
|
-
|
|
24080
|
-
})), i.appendChild(
|
|
24081
|
-
|
|
24082
|
-
})), i.appendChild(
|
|
24083
|
-
|
|
24253
|
+
function kN(e, t, n) {
|
|
24254
|
+
let { section: r, body: i } = IN("Footer");
|
|
24255
|
+
return i.appendChild(MN("Layout", SN, e.footer?.layout ?? "standard", t, (t) => {
|
|
24256
|
+
RN(e, "footer").layout = t, n();
|
|
24257
|
+
})), i.appendChild(FN("Show timestamp", e.footer?.showTimestamp ?? !0, t, (t) => {
|
|
24258
|
+
RN(e, "footer").showTimestamp = t, n();
|
|
24259
|
+
})), i.appendChild(FN("Show page numbers", e.footer?.showPageNumbers ?? !0, t, (t) => {
|
|
24260
|
+
RN(e, "footer").showPageNumbers = t, n();
|
|
24084
24261
|
})), r;
|
|
24085
24262
|
}
|
|
24086
|
-
function
|
|
24087
|
-
let { section: i, body: a } =
|
|
24263
|
+
function AN(e, t, n, r) {
|
|
24264
|
+
let { section: i, body: a } = IN(`Content — ${n}`);
|
|
24088
24265
|
if (n === "draw") {
|
|
24089
|
-
let n =
|
|
24090
|
-
a.appendChild(
|
|
24266
|
+
let n = RN(RN(e, "content"), "draw");
|
|
24267
|
+
a.appendChild(FN("Include seedings", !!n.includeSeedings, t, (e) => {
|
|
24091
24268
|
n.includeSeedings = e, r();
|
|
24092
|
-
})), a.appendChild(
|
|
24269
|
+
})), a.appendChild(FN("Include scores", !!n.includeScores, t, (e) => {
|
|
24093
24270
|
n.includeScores = e, r();
|
|
24094
|
-
})), a.appendChild(
|
|
24271
|
+
})), a.appendChild(FN("Show byes", !!n.showByes, t, (e) => {
|
|
24095
24272
|
n.showByes = e, r();
|
|
24096
|
-
})), a.appendChild(
|
|
24273
|
+
})), a.appendChild(FN("Show draw positions", !!n.showDrawPositions, t, (e) => {
|
|
24097
24274
|
n.showDrawPositions = e, r();
|
|
24098
24275
|
}));
|
|
24099
24276
|
} else if (n === "schedule") {
|
|
24100
|
-
let n =
|
|
24101
|
-
a.appendChild(
|
|
24277
|
+
let n = RN(RN(e, "content"), "schedule");
|
|
24278
|
+
a.appendChild(MN("Cell style", ["detailed", "compact"], n.cellStyle ?? "detailed", t, (e) => {
|
|
24102
24279
|
n.cellStyle = e, r();
|
|
24103
|
-
})), a.appendChild(
|
|
24280
|
+
})), a.appendChild(FN("Show match numbers", !!n.showMatchNumbers, t, (e) => {
|
|
24104
24281
|
n.showMatchNumbers = e, r();
|
|
24105
|
-
})), a.appendChild(
|
|
24282
|
+
})), a.appendChild(NN("Alert banner", n.alertBanner ?? "", t, (e) => {
|
|
24106
24283
|
n.alertBanner = e || void 0, r();
|
|
24107
24284
|
}));
|
|
24108
24285
|
} else {
|
|
@@ -24111,41 +24288,41 @@ function dN(e, t, n, r) {
|
|
|
24111
24288
|
}
|
|
24112
24289
|
return i;
|
|
24113
24290
|
}
|
|
24114
|
-
function
|
|
24291
|
+
function jN(e) {
|
|
24115
24292
|
let t = Z("div", "pce-actions"), n = Z("button", "pce-button pce-button-primary");
|
|
24116
24293
|
return n.type = "button", n.textContent = "Save", n.addEventListener("click", e), t.appendChild(n), t;
|
|
24117
24294
|
}
|
|
24118
|
-
function
|
|
24295
|
+
function MN(e, t, n, r, i) {
|
|
24119
24296
|
let a = Z("div", "pce-field");
|
|
24120
|
-
a.appendChild(
|
|
24297
|
+
a.appendChild(LN(e));
|
|
24121
24298
|
let o = Z("select", "pce-select");
|
|
24122
24299
|
return o.disabled = r, t.forEach((e) => {
|
|
24123
24300
|
let t = document.createElement("option");
|
|
24124
24301
|
t.value = e, t.textContent = e, e === n && (t.selected = !0), o.appendChild(t);
|
|
24125
24302
|
}), o.addEventListener("change", () => i(o.value)), a.appendChild(o), a;
|
|
24126
24303
|
}
|
|
24127
|
-
function
|
|
24304
|
+
function NN(e, t, n, r) {
|
|
24128
24305
|
let i = Z("div", "pce-field");
|
|
24129
|
-
i.appendChild(
|
|
24306
|
+
i.appendChild(LN(e));
|
|
24130
24307
|
let a = Z("input", "pce-input");
|
|
24131
24308
|
return a.type = "text", a.value = t, a.disabled = n, a.addEventListener("input", () => r(a.value)), i.appendChild(a), i;
|
|
24132
24309
|
}
|
|
24133
|
-
function
|
|
24310
|
+
function PN(e, t, n, r) {
|
|
24134
24311
|
let i = Z("div", "pce-field");
|
|
24135
|
-
i.appendChild(
|
|
24312
|
+
i.appendChild(LN(e));
|
|
24136
24313
|
let a = Z("input", "pce-input");
|
|
24137
24314
|
return a.type = "number", a.value = String(t), a.disabled = n, a.addEventListener("input", () => {
|
|
24138
24315
|
let e = parseFloat(a.value);
|
|
24139
24316
|
Number.isNaN(e) || r(e);
|
|
24140
24317
|
}), i.appendChild(a), i;
|
|
24141
24318
|
}
|
|
24142
|
-
function
|
|
24319
|
+
function FN(e, t, n, r) {
|
|
24143
24320
|
let i = Z("div", "pce-field pce-checkbox-row pce-field-full"), a = Z("input");
|
|
24144
24321
|
a.type = "checkbox", a.checked = t, a.disabled = n, a.addEventListener("change", () => r(a.checked)), i.appendChild(a);
|
|
24145
|
-
let o =
|
|
24322
|
+
let o = LN(e);
|
|
24146
24323
|
return o.style.fontSize = "13px", o.style.color = "var(--chc-text-primary, #222)", i.appendChild(o), i;
|
|
24147
24324
|
}
|
|
24148
|
-
function
|
|
24325
|
+
function IN(e) {
|
|
24149
24326
|
let t = Z("div", "pce-section"), n = Z("div", "pce-section-header");
|
|
24150
24327
|
n.textContent = e;
|
|
24151
24328
|
let r = Z("div", "pce-section-body");
|
|
@@ -24158,14 +24335,14 @@ function Z(e, t) {
|
|
|
24158
24335
|
let n = document.createElement(e);
|
|
24159
24336
|
return t && (n.className = t), n;
|
|
24160
24337
|
}
|
|
24161
|
-
function
|
|
24338
|
+
function LN(e) {
|
|
24162
24339
|
let t = Z("label", "pce-field-label");
|
|
24163
24340
|
return t.textContent = e, t;
|
|
24164
24341
|
}
|
|
24165
|
-
function
|
|
24342
|
+
function RN(e, t) {
|
|
24166
24343
|
return (e[t] === void 0 || e[t] === null) && (e[t] = {}), e[t];
|
|
24167
24344
|
}
|
|
24168
|
-
function
|
|
24345
|
+
function zN(e, t) {
|
|
24169
24346
|
return {
|
|
24170
24347
|
name: t.name ?? e.name,
|
|
24171
24348
|
page: {
|
|
@@ -24190,19 +24367,19 @@ function bN(e, t) {
|
|
|
24190
24367
|
}
|
|
24191
24368
|
};
|
|
24192
24369
|
}
|
|
24193
|
-
function
|
|
24370
|
+
function BN(e) {
|
|
24194
24371
|
return JSON.parse(JSON.stringify(e));
|
|
24195
24372
|
}
|
|
24196
24373
|
//#endregion
|
|
24197
24374
|
//#region src/components/scorecard/renderScorecard.ts
|
|
24198
|
-
var
|
|
24199
|
-
function
|
|
24375
|
+
var VN = "chc-scorecard-side-score--winner";
|
|
24376
|
+
function HN({ matchUp: e, composition: t, eventHandlers: n, swapSides: r }) {
|
|
24200
24377
|
let i = document.createElement("div");
|
|
24201
24378
|
i.className = "chc-scorecard";
|
|
24202
|
-
let a = r ? 2 : 1, o = r ? 1 : 2, s =
|
|
24379
|
+
let a = r ? 2 : 1, o = r ? 1 : 2, s = ZN(e, a) || "", c = ZN(e, o) || "", l = r ? JN(e.winningSide) : e.winningSide, u = UN({
|
|
24203
24380
|
side1Name: s,
|
|
24204
24381
|
side2Name: c,
|
|
24205
|
-
sets: r ?
|
|
24382
|
+
sets: r ? YN(e.score?.sets) : e.score?.sets,
|
|
24206
24383
|
winningSide: l,
|
|
24207
24384
|
side1Id: "chc-sc-side1",
|
|
24208
24385
|
side2Id: "chc-sc-side2"
|
|
@@ -24210,7 +24387,7 @@ function CN({ matchUp: e, composition: t, eventHandlers: n, swapSides: r }) {
|
|
|
24210
24387
|
i.appendChild(u);
|
|
24211
24388
|
let d = e.tieFormat?.collectionDefinitions?.slice().sort((e, t) => (e.collectionOrder || 0) - (t.collectionOrder || 0)) || [];
|
|
24212
24389
|
for (let a of d) {
|
|
24213
|
-
let o =
|
|
24390
|
+
let o = qN({
|
|
24214
24391
|
collectionDefinition: a,
|
|
24215
24392
|
collectionMatchUps: (e.tieMatchUps || []).filter((e) => e.collectionId === a.collectionId).sort((e, t) => (e.collectionPosition || 0) - (t.collectionPosition || 0)),
|
|
24216
24393
|
composition: t,
|
|
@@ -24221,40 +24398,40 @@ function CN({ matchUp: e, composition: t, eventHandlers: n, swapSides: r }) {
|
|
|
24221
24398
|
}
|
|
24222
24399
|
return i;
|
|
24223
24400
|
}
|
|
24224
|
-
function
|
|
24401
|
+
function UN({ side1Name: e, side2Name: t, sets: n, winningSide: r, side1Id: i, side2Id: a }) {
|
|
24225
24402
|
let o = document.createElement("div");
|
|
24226
24403
|
o.className = "chc-scorecard-header";
|
|
24227
24404
|
let s = document.createElement("div");
|
|
24228
24405
|
s.className = "chc-scorecard-header-body";
|
|
24229
|
-
let c =
|
|
24406
|
+
let c = GN(e, "end"), l = GN(t, "start"), u = KN(n, 1, r, i), d = KN(n, 2, r, a), f = document.createElement("div");
|
|
24230
24407
|
f.className = "chc-scorecard-score-box";
|
|
24231
24408
|
let p = document.createElement("div");
|
|
24232
24409
|
p.className = "chc-scorecard-score-flex";
|
|
24233
24410
|
let m = document.createElement("div");
|
|
24234
24411
|
return m.className = "chc-scorecard-vs", m.textContent = "vs", p.appendChild(u), p.appendChild(m), p.appendChild(d), f.appendChild(p), s.appendChild(c), s.appendChild(f), s.appendChild(l), o.appendChild(s), o;
|
|
24235
24412
|
}
|
|
24236
|
-
function
|
|
24413
|
+
function WN(e, t = "chc-sc-side1", n = "chc-sc-side2", r) {
|
|
24237
24414
|
let i = e?.score?.sets?.[0];
|
|
24238
24415
|
if (!i) return;
|
|
24239
24416
|
let a = document.getElementById(t), o = document.getElementById(n);
|
|
24240
24417
|
if (!a || !o) return;
|
|
24241
|
-
a.classList.remove(
|
|
24418
|
+
a.classList.remove(VN), o.classList.remove(VN);
|
|
24242
24419
|
let s = r ? "side2Score" : "side1Score", c = r ? "side1Score" : "side2Score";
|
|
24243
24420
|
a.textContent = String(i[s] ?? 0), o.textContent = String(i[c] ?? 0);
|
|
24244
|
-
let l = r ?
|
|
24245
|
-
l === 1 && a.classList.add(
|
|
24421
|
+
let l = r ? JN(e.winningSide) : e.winningSide;
|
|
24422
|
+
l === 1 && a.classList.add(VN), l === 2 && o.classList.add(VN);
|
|
24246
24423
|
}
|
|
24247
|
-
function
|
|
24424
|
+
function GN(e, t) {
|
|
24248
24425
|
let n = document.createElement("div");
|
|
24249
24426
|
n.className = `chc-scorecard-side chc-scorecard-side--${t}`;
|
|
24250
24427
|
let r = document.createElement("div");
|
|
24251
24428
|
return r.className = "chc-scorecard-side-name", r.textContent = e, n.appendChild(r), n;
|
|
24252
24429
|
}
|
|
24253
|
-
function
|
|
24430
|
+
function KN(e, t, n, r) {
|
|
24254
24431
|
let i = e?.[0]?.[`side${t}Score`] ?? 0, a = document.createElement("span");
|
|
24255
|
-
return a.className = "chc-scorecard-side-score", r && (a.id = r), t === 1 ? a.style.paddingLeft = "1rem" : a.style.paddingRight = "1rem", t === n && a.classList.add(
|
|
24432
|
+
return a.className = "chc-scorecard-side-score", r && (a.id = r), t === 1 ? a.style.paddingLeft = "1rem" : a.style.paddingRight = "1rem", t === n && a.classList.add(VN), a.textContent = String(i), a;
|
|
24256
24433
|
}
|
|
24257
|
-
function
|
|
24434
|
+
function qN({ collectionDefinition: e, collectionMatchUps: t, composition: n, eventHandlers: r, swapSides: i }) {
|
|
24258
24435
|
let a = document.createElement("div");
|
|
24259
24436
|
a.className = "chc-scorecard-panel";
|
|
24260
24437
|
let o = document.createElement("div");
|
|
@@ -24271,7 +24448,7 @@ function ON({ collectionDefinition: e, collectionMatchUps: t, composition: n, ev
|
|
|
24271
24448
|
f.className = "chc-scorecard-grid";
|
|
24272
24449
|
for (let e of t) {
|
|
24273
24450
|
let t = oi({
|
|
24274
|
-
matchUp: i ?
|
|
24451
|
+
matchUp: i ? XN(e) : e,
|
|
24275
24452
|
isLucky: !0,
|
|
24276
24453
|
eventHandlers: r,
|
|
24277
24454
|
composition: n
|
|
@@ -24280,11 +24457,11 @@ function ON({ collectionDefinition: e, collectionMatchUps: t, composition: n, ev
|
|
|
24280
24457
|
}
|
|
24281
24458
|
return a.appendChild(f), a;
|
|
24282
24459
|
}
|
|
24283
|
-
function
|
|
24460
|
+
function JN(e) {
|
|
24284
24461
|
if (e === 1) return 2;
|
|
24285
24462
|
if (e === 2) return 1;
|
|
24286
24463
|
}
|
|
24287
|
-
function
|
|
24464
|
+
function YN(e) {
|
|
24288
24465
|
if (e) return e.map((e) => ({
|
|
24289
24466
|
...e,
|
|
24290
24467
|
side1Score: e.side2Score,
|
|
@@ -24293,7 +24470,7 @@ function AN(e) {
|
|
|
24293
24470
|
side2TiebreakScore: e.side1TiebreakScore
|
|
24294
24471
|
}));
|
|
24295
24472
|
}
|
|
24296
|
-
function
|
|
24473
|
+
function XN(e) {
|
|
24297
24474
|
let t = e.sides?.map((e) => ({
|
|
24298
24475
|
...e,
|
|
24299
24476
|
sideNumber: e.sideNumber === 1 ? 2 : 1
|
|
@@ -24303,17 +24480,17 @@ function jN(e) {
|
|
|
24303
24480
|
sides: t,
|
|
24304
24481
|
score: e.score ? {
|
|
24305
24482
|
...e.score,
|
|
24306
|
-
sets:
|
|
24483
|
+
sets: YN(e.score.sets)
|
|
24307
24484
|
} : e.score,
|
|
24308
|
-
winningSide:
|
|
24485
|
+
winningSide: JN(e.winningSide)
|
|
24309
24486
|
};
|
|
24310
24487
|
}
|
|
24311
|
-
function
|
|
24488
|
+
function ZN(e, t) {
|
|
24312
24489
|
return e.sides?.find((e) => e.sideNumber === t)?.participant?.participantName;
|
|
24313
24490
|
}
|
|
24314
24491
|
//#endregion
|
|
24315
24492
|
//#region src/components/inline-scoring/inlineScoringFooter.ts
|
|
24316
|
-
function
|
|
24493
|
+
function QN(e) {
|
|
24317
24494
|
let { matchUpId: t, manager: n, baseMatchUp: r, onUpdate: i, showSituation: a } = e, o = document.createElement("div");
|
|
24318
24495
|
o.className = "chc-inline-scoring-footer";
|
|
24319
24496
|
let s = document.createElement("div");
|
|
@@ -24369,11 +24546,11 @@ function NN(e) {
|
|
|
24369
24546
|
}
|
|
24370
24547
|
//#endregion
|
|
24371
24548
|
//#region src/components/interactive-scoring/buildInteractiveScoringShell.ts
|
|
24372
|
-
var
|
|
24373
|
-
function
|
|
24549
|
+
var $N = "chc-iss-score-cell";
|
|
24550
|
+
function eP(e) {
|
|
24374
24551
|
if (!e?.matchUpId) throw Error("buildInteractiveScoringShell: matchUpId is required");
|
|
24375
24552
|
if (!e?.matchUpFormat) throw Error("buildInteractiveScoringShell: matchUpFormat is required");
|
|
24376
|
-
let t = e.initialMatchUp ??
|
|
24553
|
+
let t = e.initialMatchUp ?? tP(e), n = /* @__PURE__ */ new Set(), r = new ps({
|
|
24377
24554
|
onScoreChange: ({ matchUp: e }) => {
|
|
24378
24555
|
a(e, !1);
|
|
24379
24556
|
},
|
|
@@ -24406,10 +24583,10 @@ function FN(e) {
|
|
|
24406
24583
|
r.canUndo(e.matchUpId) && (r.undo(e.matchUpId, t), l(), a(r.getMatchUp(e.matchUpId, t), r.isComplete(e.matchUpId)));
|
|
24407
24584
|
}
|
|
24408
24585
|
function c() {
|
|
24409
|
-
|
|
24586
|
+
oP() && (r.reset(e.matchUpId, t), l(), a(r.getMatchUp(e.matchUpId, t), !1));
|
|
24410
24587
|
}
|
|
24411
24588
|
function l() {
|
|
24412
|
-
i.innerHTML = "", i.append(
|
|
24589
|
+
i.innerHTML = "", i.append(nP(e), rP(r, e, t), iP(r, e, o), aP(r, e, s, c));
|
|
24413
24590
|
}
|
|
24414
24591
|
return {
|
|
24415
24592
|
element: i,
|
|
@@ -24428,7 +24605,7 @@ function FN(e) {
|
|
|
24428
24605
|
}
|
|
24429
24606
|
};
|
|
24430
24607
|
}
|
|
24431
|
-
function
|
|
24608
|
+
function tP(e) {
|
|
24432
24609
|
return {
|
|
24433
24610
|
matchUpId: e.matchUpId,
|
|
24434
24611
|
tournamentId: e.tournamentId,
|
|
@@ -24444,7 +24621,7 @@ function IN(e) {
|
|
|
24444
24621
|
}]
|
|
24445
24622
|
};
|
|
24446
24623
|
}
|
|
24447
|
-
function
|
|
24624
|
+
function nP(e) {
|
|
24448
24625
|
let t = document.createElement("div");
|
|
24449
24626
|
t.className = "chc-iss-header";
|
|
24450
24627
|
let n = document.createElement("div");
|
|
@@ -24454,7 +24631,7 @@ function LN(e) {
|
|
|
24454
24631
|
let i = document.createElement("div");
|
|
24455
24632
|
return i.className = "chc-iss-header-side chc-iss-header-side2", i.textContent = e.side2Name || "Side 2", t.append(n, r, i), t;
|
|
24456
24633
|
}
|
|
24457
|
-
function
|
|
24634
|
+
function rP(e, t, n) {
|
|
24458
24635
|
let r = document.createElement("div");
|
|
24459
24636
|
r.className = "chc-iss-score-display";
|
|
24460
24637
|
let i = e.getMatchUp(t.matchUpId, n), a = i.score?.sets ?? [], o = document.createElement("div");
|
|
@@ -24465,15 +24642,15 @@ function RN(e, t, n) {
|
|
|
24465
24642
|
c.className = "chc-iss-score-row chc-iss-score-row-side2";
|
|
24466
24643
|
for (let e of a) {
|
|
24467
24644
|
let t = document.createElement("div");
|
|
24468
|
-
t.className =
|
|
24645
|
+
t.className = $N, t.textContent = String(e.side1Score ?? 0), e.winningSide === 1 && t.classList.add("chc-iss-score-cell-won"), s.append(t);
|
|
24469
24646
|
let n = document.createElement("div");
|
|
24470
|
-
n.className =
|
|
24647
|
+
n.className = $N, n.textContent = String(e.side2Score ?? 0), e.winningSide === 2 && n.classList.add("chc-iss-score-cell-won"), c.append(n);
|
|
24471
24648
|
}
|
|
24472
24649
|
if (a.length === 0) {
|
|
24473
24650
|
let e = document.createElement("div");
|
|
24474
|
-
e.className =
|
|
24651
|
+
e.className = $N, e.textContent = "0", s.append(e);
|
|
24475
24652
|
let t = document.createElement("div");
|
|
24476
|
-
t.className =
|
|
24653
|
+
t.className = $N, t.textContent = "0", c.append(t);
|
|
24477
24654
|
}
|
|
24478
24655
|
o.append(s, c), r.append(o);
|
|
24479
24656
|
let l = a.at(-1);
|
|
@@ -24493,7 +24670,7 @@ function RN(e, t, n) {
|
|
|
24493
24670
|
}
|
|
24494
24671
|
return r;
|
|
24495
24672
|
}
|
|
24496
|
-
function
|
|
24673
|
+
function iP(e, t, n) {
|
|
24497
24674
|
let r = document.createElement("div");
|
|
24498
24675
|
r.className = "chc-iss-point-buttons";
|
|
24499
24676
|
let i = e.isComplete(t.matchUpId), a = document.createElement("button");
|
|
@@ -24509,7 +24686,7 @@ function zN(e, t, n) {
|
|
|
24509
24686
|
let u = document.createElement("span");
|
|
24510
24687
|
return u.className = "chc-iss-point-button-hint", u.textContent = "won the point", c.append(l, u), c.addEventListener("click", () => n(1)), r.append(a, c), r;
|
|
24511
24688
|
}
|
|
24512
|
-
function
|
|
24689
|
+
function aP(e, t, n, r) {
|
|
24513
24690
|
let i = document.createElement("div");
|
|
24514
24691
|
i.className = "chc-iss-control-bar";
|
|
24515
24692
|
let a = document.createElement("button");
|
|
@@ -24517,12 +24694,12 @@ function BN(e, t, n, r) {
|
|
|
24517
24694
|
let o = document.createElement("button");
|
|
24518
24695
|
return o.type = "button", o.className = "chc-iss-control-button chc-iss-control-reset", o.textContent = "Reset", o.addEventListener("click", r), i.append(a, o), i;
|
|
24519
24696
|
}
|
|
24520
|
-
function
|
|
24697
|
+
function oP() {
|
|
24521
24698
|
return typeof globalThis > "u" || typeof globalThis.confirm != "function" ? !1 : globalThis.confirm("Reset the scoring session? This will clear all points.");
|
|
24522
24699
|
}
|
|
24523
24700
|
//#endregion
|
|
24524
24701
|
//#region src/components/policy-catalog/editors/ranking/domain/emptyRankingPolicy.ts
|
|
24525
|
-
function
|
|
24702
|
+
function sP() {
|
|
24526
24703
|
return {
|
|
24527
24704
|
policyName: "New Ranking Policy",
|
|
24528
24705
|
policyVersion: "1.0",
|
|
@@ -24546,10 +24723,10 @@ function HN() {
|
|
|
24546
24723
|
function Q(e) {
|
|
24547
24724
|
return structuredClone(e);
|
|
24548
24725
|
}
|
|
24549
|
-
var
|
|
24726
|
+
var cP = class {
|
|
24550
24727
|
constructor(e) {
|
|
24551
24728
|
this.listeners = /* @__PURE__ */ new Set(), this.config = e;
|
|
24552
|
-
let t = Q(e.initialPolicy ??
|
|
24729
|
+
let t = Q(e.initialPolicy ?? sP()), n = t.awardProfiles?.length ?? 0;
|
|
24553
24730
|
this.state = {
|
|
24554
24731
|
draft: t,
|
|
24555
24732
|
expandedSections: new Set(n > 5 ? ["awardProfiles"] : [
|
|
@@ -24822,7 +24999,7 @@ var UN = class {
|
|
|
24822
24999
|
emit() {
|
|
24823
25000
|
for (let e of this.listeners) e(this.state);
|
|
24824
25001
|
}
|
|
24825
|
-
},
|
|
25002
|
+
}, lP = () => "re-section", uP = () => "re-section-header", dP = () => "re-section-chevron", fP = () => "re-section-count", pP = () => "re-section-body", mP = () => "re-field-row", hP = () => "re-field-label", gP = () => "re-field-input re-field-input--text", _P = () => "re-field-input re-field-input--number", vP = () => "re-field-input re-field-input--date", yP = () => "re-field-select", bP = () => "re-checkbox-row", xP = () => "re-points-input", SP = () => "re-profile-card", CP = () => "re-profile-header", wP = () => "re-profile-name-input", TP = () => "re-profile-body", EP = () => "re-profile-actions", DP = () => "re-icon-btn", OP = () => "re-icon-btn re-icon-btn--danger", kP = () => "re-empty", AP = () => "re-editor", jP = [
|
|
24826
25003
|
"totalPoints",
|
|
24827
25004
|
"bestResult",
|
|
24828
25005
|
"headToHead",
|
|
@@ -24831,18 +25008,18 @@ var UN = class {
|
|
|
24831
25008
|
"drawSize",
|
|
24832
25009
|
"numberOfResults"
|
|
24833
25010
|
];
|
|
24834
|
-
function
|
|
25011
|
+
function MP(e) {
|
|
24835
25012
|
let t = document.createElement("div"), n = "";
|
|
24836
25013
|
function r(t, n, r, i, a, o) {
|
|
24837
25014
|
let s = document.createElement("div");
|
|
24838
|
-
s.className =
|
|
25015
|
+
s.className = mP();
|
|
24839
25016
|
let c = document.createElement("div");
|
|
24840
|
-
if (c.className =
|
|
25017
|
+
if (c.className = hP(), c.textContent = n, s.appendChild(c), o) {
|
|
24841
25018
|
let e = document.createElement("span");
|
|
24842
25019
|
e.style.cssText = "font-size:0.85rem;color:var(--sp-text)", e.textContent = String(i), s.appendChild(e);
|
|
24843
25020
|
} else if (r === "select") {
|
|
24844
25021
|
let n = document.createElement("select");
|
|
24845
|
-
n.className =
|
|
25022
|
+
n.className = yP();
|
|
24846
25023
|
let r = document.createElement("option");
|
|
24847
25024
|
r.value = "", r.textContent = "(none)", n.appendChild(r);
|
|
24848
25025
|
for (let e of a ?? []) {
|
|
@@ -24852,7 +25029,7 @@ function pP(e) {
|
|
|
24852
25029
|
n.value = i ?? "", n.addEventListener("change", () => e.setAggregationField(t, n.value || void 0)), s.appendChild(n);
|
|
24853
25030
|
} else {
|
|
24854
25031
|
let n = document.createElement("input");
|
|
24855
|
-
n.type = "number", n.className =
|
|
25032
|
+
n.type = "number", n.className = _P(), n.value = i === void 0 ? "" : String(i), n.placeholder = "—", n.addEventListener("change", () => {
|
|
24856
25033
|
let r = n.value.trim();
|
|
24857
25034
|
e.setAggregationField(t, r ? Number.parseInt(r, 10) : void 0);
|
|
24858
25035
|
}), s.appendChild(n);
|
|
@@ -24870,21 +25047,21 @@ function pP(e) {
|
|
|
24870
25047
|
let o = document.createElement("span");
|
|
24871
25048
|
if (o.textContent = n[t], a.appendChild(o), !r) {
|
|
24872
25049
|
let n = document.createElement("span");
|
|
24873
|
-
n.className =
|
|
25050
|
+
n.className = OP(), n.textContent = "×", n.style.cursor = "pointer", n.addEventListener("click", () => e.removeTiebreakCriterion(t)), a.appendChild(n);
|
|
24874
25051
|
}
|
|
24875
25052
|
i.appendChild(a);
|
|
24876
25053
|
}
|
|
24877
25054
|
t.appendChild(i);
|
|
24878
25055
|
} else if (r) {
|
|
24879
25056
|
let e = document.createElement("div");
|
|
24880
|
-
e.className =
|
|
25057
|
+
e.className = kP(), e.textContent = "No tiebreak criteria", t.appendChild(e);
|
|
24881
25058
|
}
|
|
24882
25059
|
if (!r) {
|
|
24883
25060
|
let r = document.createElement("div");
|
|
24884
25061
|
r.style.cssText = "display:flex;align-items:center;gap:4px;margin-top:4px";
|
|
24885
25062
|
let i = document.createElement("select");
|
|
24886
|
-
i.className =
|
|
24887
|
-
let a = new Set(n), o =
|
|
25063
|
+
i.className = yP(), i.style.fontSize = "0.75rem";
|
|
25064
|
+
let a = new Set(n), o = jP.filter((e) => !a.has(e));
|
|
24888
25065
|
for (let e of o) {
|
|
24889
25066
|
let t = document.createElement("option");
|
|
24890
25067
|
t.value = e, t.textContent = e, i.appendChild(t);
|
|
@@ -24908,7 +25085,7 @@ function pP(e) {
|
|
|
24908
25085
|
let i = document.createElement("div");
|
|
24909
25086
|
i.style.flexGrow = "1", a.appendChild(i);
|
|
24910
25087
|
let o = document.createElement("span");
|
|
24911
|
-
o.className =
|
|
25088
|
+
o.className = OP(), o.textContent = "✕", o.style.cursor = "pointer", o.addEventListener("click", () => e.removeCountingBucket(n)), a.appendChild(o);
|
|
24912
25089
|
}
|
|
24913
25090
|
i.appendChild(a);
|
|
24914
25091
|
let o = [];
|
|
@@ -24917,11 +25094,11 @@ function pP(e) {
|
|
|
24917
25094
|
e.style.cssText = "color:var(--sp-muted);font-size:0.75rem", e.textContent = o.join(" | "), i.appendChild(e);
|
|
24918
25095
|
} else if (!r) {
|
|
24919
25096
|
let r = document.createElement("div");
|
|
24920
|
-
r.className =
|
|
25097
|
+
r.className = mP();
|
|
24921
25098
|
let a = document.createElement("div");
|
|
24922
|
-
a.className =
|
|
25099
|
+
a.className = hP(), a.style.cssText = "min-width:70px;font-size:0.75rem", a.textContent = "Best of", r.appendChild(a);
|
|
24923
25100
|
let o = document.createElement("input");
|
|
24924
|
-
o.type = "number", o.className =
|
|
25101
|
+
o.type = "number", o.className = _P(), o.style.fontSize = "0.75rem", o.value = t.bestOfCount === void 0 ? "" : String(t.bestOfCount), o.addEventListener("change", () => {
|
|
24925
25102
|
let t = o.value.trim();
|
|
24926
25103
|
e.setCountingBucketField(n, "bestOfCount", t ? Number.parseInt(t, 10) : void 0);
|
|
24927
25104
|
}), r.appendChild(o), i.appendChild(r);
|
|
@@ -24932,7 +25109,7 @@ function pP(e) {
|
|
|
24932
25109
|
let o = n.draft.aggregationRules;
|
|
24933
25110
|
if (t.innerHTML = "", !o && n.readonly) {
|
|
24934
25111
|
let e = document.createElement("div");
|
|
24935
|
-
e.className =
|
|
25112
|
+
e.className = kP(), e.textContent = "No aggregation rules defined (all results summed)", t.appendChild(e);
|
|
24936
25113
|
return;
|
|
24937
25114
|
}
|
|
24938
25115
|
let s = [
|
|
@@ -24980,7 +25157,7 @@ function pP(e) {
|
|
|
24980
25157
|
for (let [r, i, a] of c) {
|
|
24981
25158
|
if (a === void 0 && n.readonly) continue;
|
|
24982
25159
|
let o = document.createElement("div");
|
|
24983
|
-
o.className =
|
|
25160
|
+
o.className = bP();
|
|
24984
25161
|
let s = document.createElement("input");
|
|
24985
25162
|
s.type = "checkbox", s.checked = a ?? !1, s.disabled = n.readonly, s.addEventListener("change", () => e.setAggregationField(r, s.checked));
|
|
24986
25163
|
let c = document.createElement("label");
|
|
@@ -25009,7 +25186,7 @@ function pP(e) {
|
|
|
25009
25186
|
}
|
|
25010
25187
|
//#endregion
|
|
25011
25188
|
//#region src/components/policy-catalog/editors/ranking/sections/qualityWinSection.ts
|
|
25012
|
-
function
|
|
25189
|
+
function NP(e) {
|
|
25013
25190
|
let t = document.createElement("div"), n = "";
|
|
25014
25191
|
function r(t, n, r) {
|
|
25015
25192
|
let i = document.createElement("div");
|
|
@@ -25018,11 +25195,11 @@ function mP(e) {
|
|
|
25018
25195
|
e.style.cssText = "font-weight:600;font-size:0.85rem;color:var(--sp-text)", e.textContent = n.rankingScaleName, i.appendChild(e);
|
|
25019
25196
|
} else {
|
|
25020
25197
|
let r = document.createElement("input");
|
|
25021
|
-
r.type = "text", r.className =
|
|
25198
|
+
r.type = "text", r.className = gP(), r.style.cssText = "width:150px;font-weight:600", r.value = n.rankingScaleName, r.addEventListener("change", () => e.setQualityWinField(t, "rankingScaleName", r.value)), i.appendChild(r);
|
|
25022
25199
|
let a = document.createElement("div");
|
|
25023
25200
|
a.style.flexGrow = "1", i.appendChild(a);
|
|
25024
25201
|
let o = document.createElement("span");
|
|
25025
|
-
o.className =
|
|
25202
|
+
o.className = OP(), o.textContent = "✕", o.title = "Delete profile", o.style.cursor = "pointer", o.addEventListener("click", () => e.removeQualityWinProfile(t)), i.appendChild(o);
|
|
25026
25203
|
}
|
|
25027
25204
|
return i;
|
|
25028
25205
|
}
|
|
@@ -25039,21 +25216,21 @@ function mP(e) {
|
|
|
25039
25216
|
}
|
|
25040
25217
|
else {
|
|
25041
25218
|
let a = document.createElement("td");
|
|
25042
|
-
a.style.cssText = i, a.appendChild(
|
|
25219
|
+
a.style.cssText = i, a.appendChild(PP(r.rankRange[0], (i) => {
|
|
25043
25220
|
e.setQualityWinRange(t, n, "rankRange", [i, r.rankRange[1]]);
|
|
25044
25221
|
})), o.appendChild(a);
|
|
25045
25222
|
let s = document.createElement("td");
|
|
25046
|
-
s.style.cssText = i, s.appendChild(
|
|
25223
|
+
s.style.cssText = i, s.appendChild(PP(r.rankRange[1], (i) => {
|
|
25047
25224
|
e.setQualityWinRange(t, n, "rankRange", [r.rankRange[0], i]);
|
|
25048
25225
|
})), o.appendChild(s);
|
|
25049
25226
|
let c = document.createElement("td");
|
|
25050
|
-
c.style.cssText = i, c.appendChild(
|
|
25227
|
+
c.style.cssText = i, c.appendChild(PP(r.value, (r) => {
|
|
25051
25228
|
e.setQualityWinRange(t, n, "value", r);
|
|
25052
25229
|
})), o.appendChild(c);
|
|
25053
25230
|
let l = document.createElement("td");
|
|
25054
25231
|
l.style.cssText = "text-align:center;padding:2px";
|
|
25055
25232
|
let u = document.createElement("span");
|
|
25056
|
-
u.className =
|
|
25233
|
+
u.className = OP(), u.textContent = "×", u.style.cursor = "pointer", u.addEventListener("click", () => e.removeQualityWinRange(t, n)), l.appendChild(u), o.appendChild(l);
|
|
25057
25234
|
}
|
|
25058
25235
|
return o;
|
|
25059
25236
|
}
|
|
@@ -25080,14 +25257,14 @@ function mP(e) {
|
|
|
25080
25257
|
}
|
|
25081
25258
|
function c(t, n, r, i, a) {
|
|
25082
25259
|
let o = document.createElement("div");
|
|
25083
|
-
o.className =
|
|
25260
|
+
o.className = mP();
|
|
25084
25261
|
let s = document.createElement("div");
|
|
25085
|
-
if (s.className =
|
|
25262
|
+
if (s.className = hP(), s.style.minWidth = "100px", s.style.fontSize = "0.75rem", s.textContent = r, o.appendChild(s), a) {
|
|
25086
25263
|
let e = document.createElement("span");
|
|
25087
25264
|
e.style.cssText = "font-size:0.75rem;color:var(--sp-muted)", e.textContent = String(i), o.appendChild(e);
|
|
25088
25265
|
} else {
|
|
25089
25266
|
let r = document.createElement("input");
|
|
25090
|
-
r.type = typeof i == "number" ? "number" : "text", r.className = typeof i == "number" ?
|
|
25267
|
+
r.type = typeof i == "number" ? "number" : "text", r.className = typeof i == "number" ? _P() : gP(), r.style.fontSize = "0.75rem", r.value = i === void 0 ? "" : String(i), r.addEventListener("change", () => {
|
|
25091
25268
|
let a = r.value.trim();
|
|
25092
25269
|
typeof i == "number" || n === "maxBonusPerTournament" ? e.setQualityWinField(t, n, a ? Number.parseFloat(a) : void 0) : e.setQualityWinField(t, n, a || void 0);
|
|
25093
25270
|
}), o.appendChild(r);
|
|
@@ -25098,7 +25275,7 @@ function mP(e) {
|
|
|
25098
25275
|
let i = n.draft.qualityWinProfiles;
|
|
25099
25276
|
if (t.innerHTML = "", !i?.length) {
|
|
25100
25277
|
let r = document.createElement("div");
|
|
25101
|
-
if (r.className =
|
|
25278
|
+
if (r.className = kP(), r.textContent = "No quality win profiles defined", t.appendChild(r), !n.readonly) {
|
|
25102
25279
|
let n = document.createElement("button");
|
|
25103
25280
|
n.className = "sp-btn sp-btn--sm sp-btn--outline re-add-btn", n.textContent = "+ Add Quality Win Profile", n.addEventListener("click", () => e.addQualityWinProfile()), t.appendChild(n);
|
|
25104
25281
|
}
|
|
@@ -25122,7 +25299,7 @@ function mP(e) {
|
|
|
25122
25299
|
for (let [e, t, r] of u) r === void 0 && n.readonly || l.appendChild(c(a, e, t, r, n.readonly));
|
|
25123
25300
|
if (o.includeWalkovers !== void 0 || !n.readonly) {
|
|
25124
25301
|
let t = document.createElement("div");
|
|
25125
|
-
t.className =
|
|
25302
|
+
t.className = bP();
|
|
25126
25303
|
let r = document.createElement("input");
|
|
25127
25304
|
r.type = "checkbox", r.checked = o.includeWalkovers ?? !1, r.disabled = n.readonly, r.addEventListener("change", () => e.setQualityWinField(a, "includeWalkovers", r.checked));
|
|
25128
25305
|
let i = document.createElement("label");
|
|
@@ -25144,46 +25321,46 @@ function mP(e) {
|
|
|
25144
25321
|
update: u
|
|
25145
25322
|
};
|
|
25146
25323
|
}
|
|
25147
|
-
function
|
|
25324
|
+
function PP(e, t) {
|
|
25148
25325
|
let n = document.createElement("input");
|
|
25149
|
-
return n.type = "number", n.className =
|
|
25326
|
+
return n.type = "number", n.className = xP(), n.value = String(e), n.addEventListener("change", () => {
|
|
25150
25327
|
let e = Number.parseFloat(n.value);
|
|
25151
25328
|
Number.isNaN(e) || t(e);
|
|
25152
25329
|
}), n;
|
|
25153
25330
|
}
|
|
25154
25331
|
//#endregion
|
|
25155
25332
|
//#region src/components/policy-catalog/editors/ranking/sections/metadataSection.ts
|
|
25156
|
-
function
|
|
25333
|
+
function FP(e) {
|
|
25157
25334
|
let t = document.createElement("div"), n = document.createElement("div");
|
|
25158
|
-
n.className =
|
|
25335
|
+
n.className = mP();
|
|
25159
25336
|
let r = document.createElement("div");
|
|
25160
|
-
r.className =
|
|
25337
|
+
r.className = hP(), r.textContent = "Name";
|
|
25161
25338
|
let i = document.createElement("input");
|
|
25162
|
-
i.type = "text", i.className =
|
|
25339
|
+
i.type = "text", i.className = gP(), i.placeholder = "Policy name", i.addEventListener("change", () => e.setPolicyName(i.value)), n.appendChild(r), n.appendChild(i), t.appendChild(n);
|
|
25163
25340
|
let a = document.createElement("div");
|
|
25164
|
-
a.className =
|
|
25341
|
+
a.className = mP();
|
|
25165
25342
|
let o = document.createElement("div");
|
|
25166
|
-
o.className =
|
|
25343
|
+
o.className = hP(), o.textContent = "Version";
|
|
25167
25344
|
let s = document.createElement("input");
|
|
25168
|
-
s.type = "text", s.className =
|
|
25345
|
+
s.type = "text", s.className = gP(), s.placeholder = "1.0", s.style.width = "80px", s.addEventListener("change", () => e.setPolicyVersion(s.value)), a.appendChild(o), a.appendChild(s), t.appendChild(a);
|
|
25169
25346
|
let c = document.createElement("div");
|
|
25170
|
-
c.className =
|
|
25347
|
+
c.className = mP();
|
|
25171
25348
|
let l = document.createElement("div");
|
|
25172
|
-
l.className =
|
|
25349
|
+
l.className = hP(), l.textContent = "Valid from";
|
|
25173
25350
|
let u = document.createElement("input");
|
|
25174
|
-
u.type = "date", u.className =
|
|
25351
|
+
u.type = "date", u.className = vP(), u.addEventListener("change", () => e.setValidDateRange("startDate", u.value)), c.appendChild(l), c.appendChild(u), t.appendChild(c);
|
|
25175
25352
|
let d = document.createElement("div");
|
|
25176
|
-
d.className =
|
|
25353
|
+
d.className = mP();
|
|
25177
25354
|
let f = document.createElement("div");
|
|
25178
|
-
f.className =
|
|
25355
|
+
f.className = hP(), f.textContent = "Valid until";
|
|
25179
25356
|
let p = document.createElement("input");
|
|
25180
|
-
p.type = "date", p.className =
|
|
25357
|
+
p.type = "date", p.className = vP(), p.addEventListener("change", () => e.setValidDateRange("endDate", p.value)), d.appendChild(f), d.appendChild(p), t.appendChild(d);
|
|
25181
25358
|
let m = document.createElement("div");
|
|
25182
|
-
m.className =
|
|
25359
|
+
m.className = mP();
|
|
25183
25360
|
let h = document.createElement("div");
|
|
25184
|
-
h.className =
|
|
25361
|
+
h.className = hP(), h.textContent = "Doubles attribution";
|
|
25185
25362
|
let g = document.createElement("select");
|
|
25186
|
-
g.className =
|
|
25363
|
+
g.className = yP();
|
|
25187
25364
|
for (let [e, t] of [
|
|
25188
25365
|
["", "(none)"],
|
|
25189
25366
|
["fullToEach", "Full to each"],
|
|
@@ -25195,11 +25372,11 @@ function gP(e) {
|
|
|
25195
25372
|
}
|
|
25196
25373
|
g.addEventListener("change", () => e.setDoublesAttribution(g.value)), m.appendChild(h), m.appendChild(g), t.appendChild(m);
|
|
25197
25374
|
let _ = document.createElement("div");
|
|
25198
|
-
_.className =
|
|
25375
|
+
_.className = mP();
|
|
25199
25376
|
let v = document.createElement("div");
|
|
25200
|
-
v.className =
|
|
25377
|
+
v.className = hP(), v.textContent = "Category resolution";
|
|
25201
25378
|
let y = document.createElement("select");
|
|
25202
|
-
y.className =
|
|
25379
|
+
y.className = yP();
|
|
25203
25380
|
for (let [e, t] of [
|
|
25204
25381
|
["", "(none)"],
|
|
25205
25382
|
["matchCategory", "Match category"],
|
|
@@ -25210,13 +25387,13 @@ function gP(e) {
|
|
|
25210
25387
|
}
|
|
25211
25388
|
y.addEventListener("change", () => e.setCategoryResolution(y.value)), _.appendChild(v), _.appendChild(y), t.appendChild(_);
|
|
25212
25389
|
let b = document.createElement("div");
|
|
25213
|
-
b.className =
|
|
25390
|
+
b.className = bP();
|
|
25214
25391
|
let x = document.createElement("input");
|
|
25215
25392
|
x.type = "checkbox", x.id = "re-require-win";
|
|
25216
25393
|
let S = document.createElement("label");
|
|
25217
25394
|
S.htmlFor = "re-require-win", S.textContent = "Require win for points", x.addEventListener("change", () => e.setGlobalFlag("requireWinForPoints", x.checked)), b.appendChild(x), b.appendChild(S), t.appendChild(b);
|
|
25218
25395
|
let C = document.createElement("div");
|
|
25219
|
-
C.className =
|
|
25396
|
+
C.className = bP();
|
|
25220
25397
|
let w = document.createElement("input");
|
|
25221
25398
|
w.type = "checkbox", w.id = "re-require-win-r1";
|
|
25222
25399
|
let T = document.createElement("label");
|
|
@@ -25242,7 +25419,7 @@ function gP(e) {
|
|
|
25242
25419
|
}
|
|
25243
25420
|
//#endregion
|
|
25244
25421
|
//#region src/components/policy-catalog/editors/ranking/domain/rankingProjections.ts
|
|
25245
|
-
var
|
|
25422
|
+
var IP = {
|
|
25246
25423
|
1: "W",
|
|
25247
25424
|
2: "F",
|
|
25248
25425
|
4: "SF",
|
|
@@ -25252,16 +25429,16 @@ var _P = {
|
|
|
25252
25429
|
64: "R64",
|
|
25253
25430
|
128: "R128",
|
|
25254
25431
|
256: "R256"
|
|
25255
|
-
},
|
|
25256
|
-
function
|
|
25257
|
-
return
|
|
25432
|
+
}, LP = "level-keyed";
|
|
25433
|
+
function RP(e) {
|
|
25434
|
+
return IP[e] ?? `R${e}`;
|
|
25258
25435
|
}
|
|
25259
|
-
function
|
|
25436
|
+
function zP(e) {
|
|
25260
25437
|
if (!e) return { type: "flat" };
|
|
25261
25438
|
let t = Object.values(e);
|
|
25262
25439
|
if (!t.length || t.every((e) => typeof e == "number")) return { type: "flat" };
|
|
25263
|
-
let n =
|
|
25264
|
-
return n.hasConditionalArray ? { type: "conditional" } : n.hasLevelFlightNesting ?
|
|
25440
|
+
let n = BP(t);
|
|
25441
|
+
return n.hasConditionalArray ? { type: "conditional" } : n.hasLevelFlightNesting ? VP(t, n.allLevels) : n.allLevels.size > 0 ? {
|
|
25265
25442
|
type: "level-columns",
|
|
25266
25443
|
levels: [...n.allLevels].sort((e, t) => e - t)
|
|
25267
25444
|
} : n.allFlights.size > 0 ? {
|
|
@@ -25269,11 +25446,11 @@ function bP(e) {
|
|
|
25269
25446
|
flights: [...n.allFlights].sort((e, t) => e - t)
|
|
25270
25447
|
} : { type: "flat" };
|
|
25271
25448
|
}
|
|
25272
|
-
function
|
|
25449
|
+
function BP(e) {
|
|
25273
25450
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = !1, i = !1;
|
|
25274
25451
|
for (let a of e) {
|
|
25275
|
-
let e =
|
|
25276
|
-
if (e.type ===
|
|
25452
|
+
let e = HP(a);
|
|
25453
|
+
if (e.type === LP) {
|
|
25277
25454
|
for (let n of e.levels) t.add(n);
|
|
25278
25455
|
e.hasFlightNesting && (i = !0);
|
|
25279
25456
|
} else if (e.type === "flight-keyed") for (let t = 0; t < e.flightCount; t++) n.add(t + 1);
|
|
@@ -25286,11 +25463,11 @@ function xP(e) {
|
|
|
25286
25463
|
hasLevelFlightNesting: i
|
|
25287
25464
|
};
|
|
25288
25465
|
}
|
|
25289
|
-
function
|
|
25466
|
+
function VP(e, t) {
|
|
25290
25467
|
let n = {}, r = [...t].sort((e, t) => e - t);
|
|
25291
25468
|
for (let t of e) {
|
|
25292
|
-
let e =
|
|
25293
|
-
if (e.type ===
|
|
25469
|
+
let e = HP(t);
|
|
25470
|
+
if (e.type === LP && e.flightDetails) for (let [t, r] of Object.entries(e.flightDetails)) {
|
|
25294
25471
|
let e = Number(t);
|
|
25295
25472
|
n[e] || (n[e] = []);
|
|
25296
25473
|
for (let t of r) n[e].includes(t) || n[e].push(t);
|
|
@@ -25302,7 +25479,7 @@ function SP(e, t) {
|
|
|
25302
25479
|
flightsPerLevel: n
|
|
25303
25480
|
};
|
|
25304
25481
|
}
|
|
25305
|
-
function
|
|
25482
|
+
function HP(e) {
|
|
25306
25483
|
if (typeof e == "number") return {
|
|
25307
25484
|
type: "flat",
|
|
25308
25485
|
levels: [],
|
|
@@ -25323,7 +25500,7 @@ function CP(e) {
|
|
|
25323
25500
|
};
|
|
25324
25501
|
if (e.level !== void 0) {
|
|
25325
25502
|
if (Array.isArray(e.level)) return {
|
|
25326
|
-
type:
|
|
25503
|
+
type: LP,
|
|
25327
25504
|
levels: e.level.map((e, t) => t + 1),
|
|
25328
25505
|
flightCount: 0,
|
|
25329
25506
|
hasFlightNesting: !1
|
|
@@ -25332,7 +25509,7 @@ function CP(e) {
|
|
|
25332
25509
|
let t = Object.keys(e.level).map(Number).filter((e) => !Number.isNaN(e)), n = !1, r = {};
|
|
25333
25510
|
for (let [t, i] of Object.entries(e.level)) typeof i == "object" && i && i.flights && (n = !0, r[Number(t)] = i.flights.map((e, t) => t + 1));
|
|
25334
25511
|
return {
|
|
25335
|
-
type:
|
|
25512
|
+
type: LP,
|
|
25336
25513
|
levels: t,
|
|
25337
25514
|
flightCount: 0,
|
|
25338
25515
|
hasFlightNesting: n,
|
|
@@ -25357,12 +25534,12 @@ function CP(e) {
|
|
|
25357
25534
|
hasFlightNesting: !1
|
|
25358
25535
|
};
|
|
25359
25536
|
}
|
|
25360
|
-
function
|
|
25537
|
+
function UP(e, t = {}) {
|
|
25361
25538
|
if (typeof e == "number") return e;
|
|
25362
25539
|
if (e != null) {
|
|
25363
|
-
if (Array.isArray(e)) return
|
|
25540
|
+
if (Array.isArray(e)) return WP(e, t);
|
|
25364
25541
|
if (typeof e == "object") {
|
|
25365
|
-
if (e.level !== void 0 && t.level !== void 0) return
|
|
25542
|
+
if (e.level !== void 0 && t.level !== void 0) return GP(e, t);
|
|
25366
25543
|
if (t.flight !== void 0) {
|
|
25367
25544
|
let n = e.flights ?? e.f;
|
|
25368
25545
|
if (Array.isArray(n)) return n[t.flight - 1];
|
|
@@ -25371,27 +25548,27 @@ function wP(e, t = {}) {
|
|
|
25371
25548
|
}
|
|
25372
25549
|
}
|
|
25373
25550
|
}
|
|
25374
|
-
function
|
|
25551
|
+
function WP(e, t) {
|
|
25375
25552
|
for (let n of e) {
|
|
25376
|
-
if (n.drawSizes && t.drawSize && n.drawSizes.includes(t.drawSize)) return
|
|
25377
|
-
if (n.drawSize !== void 0 && t.drawSize !== void 0 && (n.threshold ? t.drawSize >= n.drawSize : t.drawSize === n.drawSize)) return
|
|
25553
|
+
if (n.drawSizes && t.drawSize && n.drawSizes.includes(t.drawSize)) return UP(n, t);
|
|
25554
|
+
if (n.drawSize !== void 0 && t.drawSize !== void 0 && (n.threshold ? t.drawSize >= n.drawSize : t.drawSize === n.drawSize)) return UP({
|
|
25378
25555
|
...n,
|
|
25379
25556
|
drawSize: void 0,
|
|
25380
25557
|
drawSizes: void 0,
|
|
25381
25558
|
threshold: void 0
|
|
25382
25559
|
}, t);
|
|
25383
|
-
if (n.drawSize === void 0 && n.drawSizes === void 0) return
|
|
25560
|
+
if (n.drawSize === void 0 && n.drawSizes === void 0) return UP(n, t);
|
|
25384
25561
|
}
|
|
25385
25562
|
}
|
|
25386
|
-
function
|
|
25563
|
+
function GP(e, t) {
|
|
25387
25564
|
let n = Array.isArray(e.level) ? e.level[t.level - 1] : e.level[t.level];
|
|
25388
|
-
if (n !== void 0) return typeof n == "object" && n ?
|
|
25565
|
+
if (n !== void 0) return typeof n == "object" && n ? UP(n, t) : typeof n == "number" ? n : void 0;
|
|
25389
25566
|
}
|
|
25390
|
-
function
|
|
25567
|
+
function KP(e) {
|
|
25391
25568
|
let t = [], n = Object.keys(e.finishingPositionRanges ?? {}).length;
|
|
25392
25569
|
return n && t.push(`${n} positions`), (e.perWinPoints || e.pointsPerWin) && t.push("per-win"), e.bonusPoints?.length && t.push(`${e.bonusPoints.length} bonus`), t.join(", ") || "empty";
|
|
25393
25570
|
}
|
|
25394
|
-
function
|
|
25571
|
+
function qP(e) {
|
|
25395
25572
|
let t = [];
|
|
25396
25573
|
for (let n of e.eventTypes ?? []) t.push({
|
|
25397
25574
|
label: n,
|
|
@@ -25414,12 +25591,12 @@ function OP(e) {
|
|
|
25414
25591
|
intent: "re-badge--info"
|
|
25415
25592
|
}), t;
|
|
25416
25593
|
}
|
|
25417
|
-
function
|
|
25594
|
+
function JP(e) {
|
|
25418
25595
|
return e == null ? "--" : e.toLocaleString();
|
|
25419
25596
|
}
|
|
25420
25597
|
//#endregion
|
|
25421
25598
|
//#region src/components/policy-catalog/editors/ranking/sections/positionPointsTable.ts
|
|
25422
|
-
var
|
|
25599
|
+
var YP = [
|
|
25423
25600
|
1,
|
|
25424
25601
|
2,
|
|
25425
25602
|
4,
|
|
@@ -25428,8 +25605,8 @@ var AP = [
|
|
|
25428
25605
|
32,
|
|
25429
25606
|
64,
|
|
25430
25607
|
128
|
|
25431
|
-
],
|
|
25432
|
-
function
|
|
25608
|
+
], XP = "font-size:0.8rem;margin-bottom:0;border-collapse:collapse", ZP = "width:3.5rem;text-align:center";
|
|
25609
|
+
function QP(e, t) {
|
|
25433
25610
|
let n = document.createElement("div");
|
|
25434
25611
|
n.style.cssText = "overflow-x:auto";
|
|
25435
25612
|
let r = "";
|
|
@@ -25437,15 +25614,15 @@ function NP(e, t) {
|
|
|
25437
25614
|
let i = r.draft.awardProfiles?.[t]?.finishingPositionRanges;
|
|
25438
25615
|
if (n.innerHTML = "", !i || !Object.keys(i).length) {
|
|
25439
25616
|
let i = document.createElement("div");
|
|
25440
|
-
if (i.className =
|
|
25617
|
+
if (i.className = kP(), i.textContent = "No finishing position points defined", !r.readonly) {
|
|
25441
25618
|
let n = document.createElement("button");
|
|
25442
25619
|
n.className = "sp-btn sp-btn--sm sp-btn--outline re-add-btn", n.textContent = "+ Add position", n.style.marginLeft = "8px", n.addEventListener("click", () => e.addPositionRow(t, 1)), i.appendChild(n);
|
|
25443
25620
|
}
|
|
25444
25621
|
n.appendChild(i);
|
|
25445
25622
|
return;
|
|
25446
25623
|
}
|
|
25447
|
-
let a =
|
|
25448
|
-
a.type === "flat" ?
|
|
25624
|
+
let a = zP(i), o = Object.keys(i).map(Number).sort((e, t) => e - t);
|
|
25625
|
+
a.type === "flat" ? $P(n, o, i, r.readonly, e, t) : a.type === "level-columns" ? eF(n, o, i, a.levels, r.readonly, e, t) : tF(n, o, i, a);
|
|
25449
25626
|
}
|
|
25450
25627
|
function a(e) {
|
|
25451
25628
|
let n = e.draft.awardProfiles?.[t], a = JSON.stringify(n?.finishingPositionRanges ?? {});
|
|
@@ -25456,25 +25633,25 @@ function NP(e, t) {
|
|
|
25456
25633
|
update: a
|
|
25457
25634
|
};
|
|
25458
25635
|
}
|
|
25459
|
-
function
|
|
25636
|
+
function $P(e, t, n, r, i, a) {
|
|
25460
25637
|
let o = document.createElement("table");
|
|
25461
|
-
o.style.cssText =
|
|
25638
|
+
o.style.cssText = XP;
|
|
25462
25639
|
let s = document.createElement("thead"), c = document.createElement("tr");
|
|
25463
|
-
|
|
25640
|
+
nF(c, "Pos", ZP), nF(c, "Points", "text-align:right"), r || nF(c, "", "width:2rem"), s.appendChild(c), o.appendChild(s);
|
|
25464
25641
|
let l = document.createElement("tbody");
|
|
25465
25642
|
for (let e of t) {
|
|
25466
25643
|
let t = document.createElement("tr");
|
|
25467
|
-
|
|
25644
|
+
rF(t, e);
|
|
25468
25645
|
let o = document.createElement("td");
|
|
25469
|
-
o.style.cssText = "text-align:right;padding:2px 4px", r ? (o.style.fontVariantNumeric = "tabular-nums", o.textContent =
|
|
25646
|
+
o.style.cssText = "text-align:right;padding:2px 4px", r ? (o.style.fontVariantNumeric = "tabular-nums", o.textContent = JP(typeof n[e] == "number" ? n[e] : UP(n[e]))) : o.appendChild(aF(typeof n[e] == "number" ? n[e] : UP(n[e]) ?? 0, (t) => i.setFlatPositionPoints(a, e, t))), t.appendChild(o), r || iF(t, () => i.removePositionRow(a, e)), l.appendChild(t);
|
|
25470
25647
|
}
|
|
25471
|
-
o.appendChild(l), e.appendChild(o), r ||
|
|
25648
|
+
o.appendChild(l), e.appendChild(o), r || oF(e, t, i, a);
|
|
25472
25649
|
}
|
|
25473
|
-
function
|
|
25650
|
+
function eF(e, t, n, r, i, a, o) {
|
|
25474
25651
|
let s = document.createElement("table");
|
|
25475
|
-
s.style.cssText =
|
|
25652
|
+
s.style.cssText = XP;
|
|
25476
25653
|
let c = document.createElement("thead"), l = document.createElement("tr");
|
|
25477
|
-
|
|
25654
|
+
nF(l, "Pos", ZP);
|
|
25478
25655
|
for (let e of r) {
|
|
25479
25656
|
let t = document.createElement("th");
|
|
25480
25657
|
if (t.style.cssText = "text-align:right;min-width:3.5rem;padding:2px 4px", i) t.textContent = `L${e}`;
|
|
@@ -25484,22 +25661,22 @@ function FP(e, t, n, r, i, a, o) {
|
|
|
25484
25661
|
let r = document.createElement("span");
|
|
25485
25662
|
r.textContent = `L${e}`, n.appendChild(r);
|
|
25486
25663
|
let i = document.createElement("span");
|
|
25487
|
-
i.className =
|
|
25664
|
+
i.className = OP(), i.textContent = "×", i.title = `Remove level ${e}`, i.style.cssText = "cursor:pointer;font-size:0.65rem", i.addEventListener("click", () => a.removeLevel(o, e)), n.appendChild(i), t.appendChild(n);
|
|
25488
25665
|
}
|
|
25489
25666
|
l.appendChild(t);
|
|
25490
25667
|
}
|
|
25491
|
-
i ||
|
|
25668
|
+
i || nF(l, "", "width:2rem"), c.appendChild(l), s.appendChild(c);
|
|
25492
25669
|
let u = document.createElement("tbody");
|
|
25493
25670
|
for (let e of t) {
|
|
25494
25671
|
let t = document.createElement("tr");
|
|
25495
|
-
|
|
25672
|
+
rF(t, e);
|
|
25496
25673
|
for (let s of r) {
|
|
25497
25674
|
let r = document.createElement("td");
|
|
25498
25675
|
r.style.cssText = "text-align:right;padding:2px 4px";
|
|
25499
|
-
let c =
|
|
25500
|
-
i ? (r.style.fontVariantNumeric = "tabular-nums", r.textContent =
|
|
25676
|
+
let c = UP(n[e], { level: s });
|
|
25677
|
+
i ? (r.style.fontVariantNumeric = "tabular-nums", r.textContent = JP(c), c === void 0 && (r.style.color = "var(--sp-muted)")) : r.appendChild(aF(c ?? 0, (t) => a.setLevelPositionPoints(o, e, s, t))), t.appendChild(r);
|
|
25501
25678
|
}
|
|
25502
|
-
i ||
|
|
25679
|
+
i || iF(t, () => a.removePositionRow(o, e)), u.appendChild(t);
|
|
25503
25680
|
}
|
|
25504
25681
|
if (s.appendChild(u), e.appendChild(s), !i) {
|
|
25505
25682
|
let n = document.createElement("div");
|
|
@@ -25507,37 +25684,37 @@ function FP(e, t, n, r, i, a, o) {
|
|
|
25507
25684
|
let i = document.createElement("div");
|
|
25508
25685
|
i.style.cssText = "display:flex;align-items:center;gap:4px";
|
|
25509
25686
|
let s = document.createElement("input");
|
|
25510
|
-
s.type = "number", s.className =
|
|
25687
|
+
s.type = "number", s.className = xP(), s.style.width = "50px", s.placeholder = "L#", s.min = "1";
|
|
25511
25688
|
let c = document.createElement("button");
|
|
25512
25689
|
c.className = "sp-btn sp-btn--sm sp-btn--outline", c.textContent = "+ Level", c.addEventListener("click", () => {
|
|
25513
25690
|
let e = Number.parseInt(s.value, 10);
|
|
25514
25691
|
!Number.isNaN(e) && e > 0 && !r.includes(e) && (a.addLevel(o, e), s.value = "");
|
|
25515
|
-
}), i.appendChild(s), i.appendChild(c), n.appendChild(i),
|
|
25692
|
+
}), i.appendChild(s), i.appendChild(c), n.appendChild(i), sF(n, t, a, o), e.appendChild(n);
|
|
25516
25693
|
}
|
|
25517
25694
|
}
|
|
25518
|
-
function
|
|
25695
|
+
function tF(e, t, n, r) {
|
|
25519
25696
|
let i = document.createElement("div");
|
|
25520
25697
|
i.style.cssText = "font-size:0.7rem;color:var(--sp-muted);margin-bottom:4px;font-style:italic", i.textContent = `(${r.type} layout — view only)`, e.appendChild(i);
|
|
25521
25698
|
let a = document.createElement("table");
|
|
25522
|
-
a.style.cssText =
|
|
25699
|
+
a.style.cssText = XP;
|
|
25523
25700
|
let o = document.createElement("thead"), s = document.createElement("tr");
|
|
25524
|
-
if (
|
|
25525
|
-
else
|
|
25701
|
+
if (nF(s, "Pos", ZP), r.type === "flight-columns") for (let e of r.flights) nF(s, `F${e}`, "text-align:right;min-width:3.5rem");
|
|
25702
|
+
else nF(s, "Points", "text-align:right");
|
|
25526
25703
|
o.appendChild(s), a.appendChild(o);
|
|
25527
25704
|
let c = document.createElement("tbody");
|
|
25528
25705
|
for (let e of t) {
|
|
25529
25706
|
let t = document.createElement("tr");
|
|
25530
|
-
|
|
25707
|
+
rF(t, e);
|
|
25531
25708
|
let i = n[e];
|
|
25532
25709
|
if (r.type === "flight-columns") for (let e of r.flights) {
|
|
25533
25710
|
let n = document.createElement("td");
|
|
25534
25711
|
n.style.cssText = "text-align:right;font-variant-numeric:tabular-nums;padding:2px 4px";
|
|
25535
|
-
let r =
|
|
25536
|
-
n.textContent =
|
|
25712
|
+
let r = UP(i, { flight: e });
|
|
25713
|
+
n.textContent = JP(r), r === void 0 && (n.style.color = "var(--sp-muted)"), t.appendChild(n);
|
|
25537
25714
|
}
|
|
25538
25715
|
else {
|
|
25539
25716
|
let e = document.createElement("td");
|
|
25540
|
-
if (e.style.cssText = "text-align:right;font-variant-numeric:tabular-nums;padding:2px 4px", e.textContent =
|
|
25717
|
+
if (e.style.cssText = "text-align:right;font-variant-numeric:tabular-nums;padding:2px 4px", e.textContent = JP(UP(i)), Array.isArray(i)) {
|
|
25541
25718
|
let t = document.createElement("span");
|
|
25542
25719
|
t.style.cssText = "margin-left:0.3rem;font-size:0.65rem;color:var(--sp-muted)", t.textContent = `${i.length} variants`, t.title = JSON.stringify(i, null, 2), e.appendChild(t);
|
|
25543
25720
|
}
|
|
@@ -25547,33 +25724,33 @@ function IP(e, t, n, r) {
|
|
|
25547
25724
|
}
|
|
25548
25725
|
a.appendChild(c), e.appendChild(a);
|
|
25549
25726
|
}
|
|
25550
|
-
function
|
|
25727
|
+
function nF(e, t, n) {
|
|
25551
25728
|
let r = document.createElement("th");
|
|
25552
25729
|
r.textContent = t, r.style.cssText = n + ";padding:2px 4px", e.appendChild(r);
|
|
25553
25730
|
}
|
|
25554
|
-
function
|
|
25731
|
+
function rF(e, t) {
|
|
25555
25732
|
let n = document.createElement("td");
|
|
25556
|
-
n.style.cssText = "text-align:center;font-weight:600;color:var(--sp-text);padding:2px 4px", n.textContent =
|
|
25733
|
+
n.style.cssText = "text-align:center;font-weight:600;color:var(--sp-text);padding:2px 4px", n.textContent = RP(t), e.appendChild(n);
|
|
25557
25734
|
}
|
|
25558
|
-
function
|
|
25735
|
+
function iF(e, t) {
|
|
25559
25736
|
let n = document.createElement("td");
|
|
25560
25737
|
n.style.cssText = "text-align:center;vertical-align:middle;padding:2px";
|
|
25561
25738
|
let r = document.createElement("span");
|
|
25562
|
-
r.className =
|
|
25739
|
+
r.className = OP(), r.textContent = "×", r.title = "Remove position", r.style.cursor = "pointer", r.addEventListener("click", t), n.appendChild(r), e.appendChild(n);
|
|
25563
25740
|
}
|
|
25564
|
-
function
|
|
25741
|
+
function aF(e, t) {
|
|
25565
25742
|
let n = document.createElement("input");
|
|
25566
|
-
return n.type = "number", n.className =
|
|
25743
|
+
return n.type = "number", n.className = xP(), n.value = String(e), n.addEventListener("change", () => {
|
|
25567
25744
|
let e = Number.parseFloat(n.value);
|
|
25568
25745
|
Number.isNaN(e) || t(e);
|
|
25569
25746
|
}), n;
|
|
25570
25747
|
}
|
|
25571
|
-
function
|
|
25748
|
+
function oF(e, t, n, r) {
|
|
25572
25749
|
let i = document.createElement("div");
|
|
25573
|
-
i.style.cssText = "display:flex;gap:8px;margin-top:6px;flex-wrap:wrap",
|
|
25750
|
+
i.style.cssText = "display:flex;gap:8px;margin-top:6px;flex-wrap:wrap", sF(i, t, n, r), e.appendChild(i);
|
|
25574
25751
|
}
|
|
25575
|
-
function
|
|
25576
|
-
let i = new Set(t), a =
|
|
25752
|
+
function sF(e, t, n, r) {
|
|
25753
|
+
let i = new Set(t), a = YP.filter((e) => !i.has(e));
|
|
25577
25754
|
if (!a.length) return;
|
|
25578
25755
|
let o = document.createElement("div");
|
|
25579
25756
|
o.style.cssText = "display:flex;align-items:center;gap:4px";
|
|
@@ -25581,7 +25758,7 @@ function HP(e, t, n, r) {
|
|
|
25581
25758
|
s.className = "re-field-select", s.style.cssText = "min-width:80px;font-size:11px;padding:4px 6px";
|
|
25582
25759
|
for (let e of a) {
|
|
25583
25760
|
let t = document.createElement("option");
|
|
25584
|
-
t.value = String(e), t.textContent =
|
|
25761
|
+
t.value = String(e), t.textContent = RP(e), s.appendChild(t);
|
|
25585
25762
|
}
|
|
25586
25763
|
let c = document.createElement("button");
|
|
25587
25764
|
c.className = "sp-btn sp-btn--sm sp-btn--outline", c.textContent = "+ Position", c.addEventListener("click", () => {
|
|
@@ -25591,15 +25768,15 @@ function HP(e, t, n, r) {
|
|
|
25591
25768
|
}
|
|
25592
25769
|
//#endregion
|
|
25593
25770
|
//#region src/components/policy-catalog/editors/ranking/sections/perWinPointsRow.ts
|
|
25594
|
-
function
|
|
25771
|
+
function cF(e, t) {
|
|
25595
25772
|
let n = document.createElement("div");
|
|
25596
25773
|
n.style.cssText = "padding:0.25rem 0;font-size:0.8rem";
|
|
25597
25774
|
let r = document.createElement("div");
|
|
25598
|
-
r.className =
|
|
25775
|
+
r.className = mP();
|
|
25599
25776
|
let i = document.createElement("div");
|
|
25600
|
-
i.className =
|
|
25777
|
+
i.className = hP(), i.textContent = "Per-Win", i.style.minWidth = "80px";
|
|
25601
25778
|
let a = document.createElement("input");
|
|
25602
|
-
a.type = "number", a.className =
|
|
25779
|
+
a.type = "number", a.className = xP(), a.placeholder = "—", a.addEventListener("change", () => {
|
|
25603
25780
|
let n = a.value.trim();
|
|
25604
25781
|
e.setPointsPerWin(t, n === "" ? void 0 : parseFloat(n));
|
|
25605
25782
|
});
|
|
@@ -25619,7 +25796,7 @@ function UP(e, t) {
|
|
|
25619
25796
|
if (n.style.display = "", a.disabled = e.readonly, s !== void 0 && typeof s == "number" ? (a.style.display = "", o.style.display = "none", document.activeElement !== a && (a.value = String(s))) : s === void 0 ? i && (a.style.display = "none", o.style.display = "", o.textContent = (Array.isArray(i) ? i : [i]).map((e) => {
|
|
25620
25797
|
let t = [];
|
|
25621
25798
|
return e.participationOrders?.length && t.push(`PO:${e.participationOrders.join(",")}`), e.value !== void 0 && t.push(`${e.value} pts/win`), e.limit !== void 0 && t.push(`limit: ${e.limit}`), t.join(" | ");
|
|
25622
|
-
}).join("; ")) : (a.style.display = "none", o.style.display = "", o.textContent = `${
|
|
25799
|
+
}).join("; ")) : (a.style.display = "none", o.style.display = "", o.textContent = `${JP(UP(s))} pts/win (complex)`), r.maxCountableMatches !== void 0) {
|
|
25623
25800
|
let e = typeof r.maxCountableMatches == "number" ? r.maxCountableMatches : "level-keyed";
|
|
25624
25801
|
o.style.display = "";
|
|
25625
25802
|
let t = o.textContent;
|
|
@@ -25633,7 +25810,7 @@ function UP(e, t) {
|
|
|
25633
25810
|
}
|
|
25634
25811
|
//#endregion
|
|
25635
25812
|
//#region src/components/policy-catalog/editors/ranking/sections/bonusPointsRow.ts
|
|
25636
|
-
function
|
|
25813
|
+
function lF(e, t) {
|
|
25637
25814
|
let n = document.createElement("div");
|
|
25638
25815
|
n.style.cssText = "padding:0.25rem 0;font-size:0.8rem";
|
|
25639
25816
|
let r = "";
|
|
@@ -25648,7 +25825,7 @@ function WP(e, t) {
|
|
|
25648
25825
|
if (a.style.cssText = "font-weight:600;color:var(--sp-text);margin-bottom:4px", a.textContent = "Bonus Points", n.appendChild(a), i?.length) for (let a = 0; a < i.length; a++) {
|
|
25649
25826
|
let o = i[a], s = document.createElement("div");
|
|
25650
25827
|
if (s.style.cssText = "display:flex;align-items:center;gap:6px;margin-bottom:4px;padding-left:0.5rem", r.readonly) {
|
|
25651
|
-
let e = o.finishingPositions.map(
|
|
25828
|
+
let e = o.finishingPositions.map(RP).join(", "), t = document.createElement("span");
|
|
25652
25829
|
t.textContent = `${e}: `, s.appendChild(t);
|
|
25653
25830
|
let n = document.createElement("span");
|
|
25654
25831
|
n.style.fontVariantNumeric = "tabular-nums", n.textContent = typeof o.value == "number" ? o.value.toLocaleString() : String(o.value ?? "—"), s.appendChild(n);
|
|
@@ -25656,19 +25833,19 @@ function WP(e, t) {
|
|
|
25656
25833
|
let n = document.createElement("span");
|
|
25657
25834
|
n.style.cssText = "font-size:0.75rem;color:var(--sp-muted);min-width:30px", n.textContent = "Pos:", s.appendChild(n);
|
|
25658
25835
|
let r = document.createElement("input");
|
|
25659
|
-
r.type = "text", r.className =
|
|
25836
|
+
r.type = "text", r.className = xP(), r.style.width = "80px", r.value = o.finishingPositions.join(", "), r.title = "Comma-separated positions (e.g. 1, 2)", r.addEventListener("change", () => {
|
|
25660
25837
|
let n = r.value.split(",").map((e) => Number.parseInt(e.trim(), 10)).filter((e) => !Number.isNaN(e) && e > 0);
|
|
25661
25838
|
n.length && e.setBonusPointPositions(t, a, n);
|
|
25662
25839
|
}), s.appendChild(r);
|
|
25663
25840
|
let i = document.createElement("span");
|
|
25664
25841
|
i.style.cssText = "font-size:0.75rem;color:var(--sp-muted)", i.textContent = "Pts:", s.appendChild(i);
|
|
25665
25842
|
let c = document.createElement("input");
|
|
25666
|
-
c.type = "number", c.className =
|
|
25843
|
+
c.type = "number", c.className = xP(), c.value = typeof o.value == "number" ? String(o.value) : "", c.addEventListener("change", () => {
|
|
25667
25844
|
let n = Number.parseFloat(c.value);
|
|
25668
25845
|
Number.isNaN(n) || e.setBonusPointValue(t, a, n);
|
|
25669
25846
|
}), s.appendChild(c);
|
|
25670
25847
|
let l = document.createElement("span");
|
|
25671
|
-
l.className =
|
|
25848
|
+
l.className = OP(), l.textContent = "×", l.title = "Remove bonus", l.style.cursor = "pointer", l.addEventListener("click", () => e.removeBonusPoint(t, a)), s.appendChild(l);
|
|
25672
25849
|
}
|
|
25673
25850
|
n.appendChild(s);
|
|
25674
25851
|
}
|
|
@@ -25688,10 +25865,10 @@ function WP(e, t) {
|
|
|
25688
25865
|
}
|
|
25689
25866
|
//#endregion
|
|
25690
25867
|
//#region src/components/policy-catalog/editors/ranking/sections/scopeBadges.ts
|
|
25691
|
-
function
|
|
25868
|
+
function uF(e) {
|
|
25692
25869
|
let t = document.createElement("div");
|
|
25693
25870
|
t.style.cssText = "display:inline-flex;gap:0.25rem;flex-wrap:wrap;margin-bottom:0";
|
|
25694
|
-
let n =
|
|
25871
|
+
let n = qP(e);
|
|
25695
25872
|
if (!n.length) {
|
|
25696
25873
|
let e = document.createElement("span");
|
|
25697
25874
|
return e.className = "re-badge re-badge--neutral", e.textContent = "All", t.appendChild(e), t;
|
|
@@ -25704,7 +25881,7 @@ function GP(e) {
|
|
|
25704
25881
|
}
|
|
25705
25882
|
//#endregion
|
|
25706
25883
|
//#region src/components/policy-catalog/editors/ranking/sections/scopeEditor.ts
|
|
25707
|
-
var
|
|
25884
|
+
var dF = [
|
|
25708
25885
|
{
|
|
25709
25886
|
field: "eventTypes",
|
|
25710
25887
|
label: "Event types",
|
|
@@ -25743,13 +25920,13 @@ var KP = [
|
|
|
25743
25920
|
options: [],
|
|
25744
25921
|
isNumeric: !0
|
|
25745
25922
|
}
|
|
25746
|
-
],
|
|
25923
|
+
], fF = [
|
|
25747
25924
|
["maxDrawSize", "Max draw size"],
|
|
25748
25925
|
["maxLevel", "Max level"],
|
|
25749
25926
|
["priority", "Priority"],
|
|
25750
25927
|
["participationOrder", "Participation order"]
|
|
25751
25928
|
];
|
|
25752
|
-
function
|
|
25929
|
+
function pF(e, t) {
|
|
25753
25930
|
let n = document.createElement("div");
|
|
25754
25931
|
n.style.cssText = "padding:0.25rem 0";
|
|
25755
25932
|
let r = document.createElement("div");
|
|
@@ -25809,22 +25986,22 @@ function JP(e, t) {
|
|
|
25809
25986
|
let a = r.draft.awardProfiles?.[t];
|
|
25810
25987
|
if (!a) return;
|
|
25811
25988
|
let o = r.readonly;
|
|
25812
|
-
for (let e of
|
|
25989
|
+
for (let e of dF) {
|
|
25813
25990
|
let t = a[e.field] ?? [];
|
|
25814
25991
|
o && !t.length || i.appendChild(s(e, t, o));
|
|
25815
25992
|
}
|
|
25816
|
-
for (let [n, r] of
|
|
25993
|
+
for (let [n, r] of fF) {
|
|
25817
25994
|
let s = a[n];
|
|
25818
25995
|
if (o && s === void 0) continue;
|
|
25819
25996
|
let c = document.createElement("div");
|
|
25820
|
-
c.className =
|
|
25997
|
+
c.className = mP();
|
|
25821
25998
|
let l = document.createElement("div");
|
|
25822
|
-
if (l.className =
|
|
25999
|
+
if (l.className = hP(), l.style.cssText = "min-width:110px;font-size:0.75rem", l.textContent = r, c.appendChild(l), o) {
|
|
25823
26000
|
let e = document.createElement("span");
|
|
25824
26001
|
e.style.cssText = "font-size:0.75rem;color:var(--sp-text)", e.textContent = String(s), c.appendChild(e);
|
|
25825
26002
|
} else {
|
|
25826
26003
|
let r = document.createElement("input");
|
|
25827
|
-
r.type = "number", r.className =
|
|
26004
|
+
r.type = "number", r.className = _P(), r.style.fontSize = "0.75rem", r.value = s === void 0 ? "" : String(s), r.placeholder = "—", r.addEventListener("change", () => {
|
|
25828
26005
|
let i = r.value.trim();
|
|
25829
26006
|
e.setProfileField(t, n, i ? Number.parseInt(i, 10) : void 0);
|
|
25830
26007
|
}), c.appendChild(r);
|
|
@@ -25835,7 +26012,7 @@ function JP(e, t) {
|
|
|
25835
26012
|
n.style.display = c ? "" : "none";
|
|
25836
26013
|
}
|
|
25837
26014
|
function l(e) {
|
|
25838
|
-
let n = e.draft.awardProfiles?.[t], r =
|
|
26015
|
+
let n = e.draft.awardProfiles?.[t], r = dF.map((e) => n?.[e.field] ?? []), i = fF.map(([e]) => n?.[e]), o = JSON.stringify([
|
|
25839
26016
|
r,
|
|
25840
26017
|
i,
|
|
25841
26018
|
e.readonly
|
|
@@ -25849,40 +26026,40 @@ function JP(e, t) {
|
|
|
25849
26026
|
}
|
|
25850
26027
|
//#endregion
|
|
25851
26028
|
//#region src/components/policy-catalog/editors/ranking/sections/profileCard.ts
|
|
25852
|
-
function
|
|
26029
|
+
function mF(e, t) {
|
|
25853
26030
|
let n = document.createElement("div");
|
|
25854
|
-
n.className =
|
|
26031
|
+
n.className = SP();
|
|
25855
26032
|
let r = document.createElement("div");
|
|
25856
|
-
r.className =
|
|
26033
|
+
r.className = CP();
|
|
25857
26034
|
let i = document.createElement("span");
|
|
25858
|
-
i.className =
|
|
26035
|
+
i.className = dP(), i.style.flexShrink = "0", r.appendChild(i);
|
|
25859
26036
|
let a = document.createElement("input");
|
|
25860
|
-
a.type = "text", a.className =
|
|
26037
|
+
a.type = "text", a.className = wP(), a.addEventListener("click", (e) => e.stopPropagation()), a.addEventListener("change", () => e.setProfileName(t, a.value)), r.appendChild(a);
|
|
25861
26038
|
let o = document.createElement("div");
|
|
25862
26039
|
o.style.cssText = "flex-grow:1;display:inline-flex;gap:0.25rem;flex-wrap:wrap", r.appendChild(o);
|
|
25863
26040
|
let s = document.createElement("span");
|
|
25864
26041
|
s.style.cssText = "font-size:0.75rem;color:var(--sp-muted);white-space:nowrap;flex-shrink:0", r.appendChild(s);
|
|
25865
26042
|
let c = document.createElement("div");
|
|
25866
|
-
c.className =
|
|
26043
|
+
c.className = EP();
|
|
25867
26044
|
let l = document.createElement("button");
|
|
25868
|
-
l.className =
|
|
26045
|
+
l.className = DP(), l.textContent = "⎘", l.title = "Duplicate profile", l.addEventListener("click", (n) => {
|
|
25869
26046
|
n.stopPropagation(), e.duplicateProfile(t);
|
|
25870
26047
|
});
|
|
25871
26048
|
let u = document.createElement("button");
|
|
25872
|
-
u.className =
|
|
26049
|
+
u.className = OP(), u.textContent = "✕", u.title = "Delete profile", u.addEventListener("click", (n) => {
|
|
25873
26050
|
n.stopPropagation(), e.removeProfile(t);
|
|
25874
26051
|
}), c.appendChild(l), c.appendChild(u), r.appendChild(c), r.addEventListener("click", () => e.toggleProfile(t)), n.appendChild(r);
|
|
25875
26052
|
let d = document.createElement("div");
|
|
25876
|
-
d.className =
|
|
26053
|
+
d.className = TP();
|
|
25877
26054
|
let f = document.createElement("div");
|
|
25878
26055
|
f.style.cssText = "font-weight:600;font-size:0.85rem;color:var(--sp-text);margin-bottom:6px", d.appendChild(f);
|
|
25879
|
-
let p =
|
|
26056
|
+
let p = QP(e, t);
|
|
25880
26057
|
d.appendChild(p.element);
|
|
25881
|
-
let m =
|
|
26058
|
+
let m = cF(e, t);
|
|
25882
26059
|
d.appendChild(m.element);
|
|
25883
|
-
let h =
|
|
26060
|
+
let h = lF(e, t);
|
|
25884
26061
|
d.appendChild(h.element);
|
|
25885
|
-
let g =
|
|
26062
|
+
let g = pF(e, t);
|
|
25886
26063
|
d.appendChild(g.element);
|
|
25887
26064
|
let _ = document.createElement("div");
|
|
25888
26065
|
_.style.cssText = "padding:0.25rem 0;font-size:0.75rem;color:var(--sp-muted)", d.appendChild(_), n.appendChild(d);
|
|
@@ -25897,8 +26074,8 @@ function YP(e, t) {
|
|
|
25897
26074
|
i.textContent = l ? "▼" : "▶";
|
|
25898
26075
|
let v = r.profileName || `Profile ${t + 1}`;
|
|
25899
26076
|
document.activeElement !== a && (a.value = v), a.title = v, a.disabled = u, o.innerHTML = "";
|
|
25900
|
-
let y =
|
|
25901
|
-
if (y.style.flexGrow = "1", o.appendChild(y), s.textContent = l ? "" :
|
|
26077
|
+
let y = uF(r);
|
|
26078
|
+
if (y.style.flexGrow = "1", o.appendChild(y), s.textContent = l ? "" : KP(r), c.style.display = u ? "none" : "flex", d.style.display = l ? "" : "none", l) {
|
|
25902
26079
|
f.textContent = v, p.update(e), m.update(e), h.update(e), g.update(e);
|
|
25903
26080
|
let t = [];
|
|
25904
26081
|
r.requireWinForPoints !== void 0 && t.push(`requireWin: ${r.requireWinForPoints}`), r.requireWinFirstRound !== void 0 && t.push(`requireWinR1: ${r.requireWinFirstRound}`), _.textContent = t.join(" | "), _.style.display = t.length ? "" : "none";
|
|
@@ -25911,10 +26088,10 @@ function YP(e, t) {
|
|
|
25911
26088
|
}
|
|
25912
26089
|
//#endregion
|
|
25913
26090
|
//#region src/components/policy-catalog/editors/ranking/rankingPointsEditorPanel.ts
|
|
25914
|
-
function
|
|
26091
|
+
function hF(e, t) {
|
|
25915
26092
|
let n = document.createElement("div");
|
|
25916
|
-
n.className =
|
|
25917
|
-
let r =
|
|
26093
|
+
n.className = AP();
|
|
26094
|
+
let r = FP(e), i = NP(e), a = MP(e), o = [
|
|
25918
26095
|
{
|
|
25919
26096
|
id: "metadata",
|
|
25920
26097
|
label: "Metadata"
|
|
@@ -25936,17 +26113,17 @@ function XP(e, t) {
|
|
|
25936
26113
|
], s = [];
|
|
25937
26114
|
for (let t of o) {
|
|
25938
26115
|
let o = document.createElement("div");
|
|
25939
|
-
o.className =
|
|
26116
|
+
o.className = lP();
|
|
25940
26117
|
let c = document.createElement("div");
|
|
25941
|
-
c.className =
|
|
26118
|
+
c.className = uP();
|
|
25942
26119
|
let l = document.createElement("span");
|
|
25943
|
-
l.className =
|
|
26120
|
+
l.className = dP();
|
|
25944
26121
|
let u = document.createElement("span");
|
|
25945
26122
|
u.textContent = t.label;
|
|
25946
26123
|
let d = document.createElement("span");
|
|
25947
|
-
d.className =
|
|
26124
|
+
d.className = fP(), c.appendChild(l), c.appendChild(u), c.appendChild(d), c.addEventListener("click", () => e.toggleSection(t.id));
|
|
25948
26125
|
let f = document.createElement("div");
|
|
25949
|
-
f.className =
|
|
26126
|
+
f.className = pP(), t.id === "metadata" && f.appendChild(r.element), t.id === "qualityWinProfiles" && f.appendChild(i.element), t.id === "aggregationRules" && f.appendChild(a.element), o.appendChild(c), o.appendChild(f), n.appendChild(o), s.push({
|
|
25950
26127
|
id: t.id,
|
|
25951
26128
|
chevron: l,
|
|
25952
26129
|
countEl: d,
|
|
@@ -25976,12 +26153,12 @@ function XP(e, t) {
|
|
|
25976
26153
|
...(o.levels ?? []).map((e) => `L${e}`),
|
|
25977
26154
|
...o.drawTypes ?? []
|
|
25978
26155
|
].join(" ").toLowerCase().includes(n)) continue;
|
|
25979
|
-
let s =
|
|
26156
|
+
let s = mF(e, t);
|
|
25980
26157
|
c.push(s), r.appendChild(s.element), a++;
|
|
25981
26158
|
}
|
|
25982
26159
|
if (!a) {
|
|
25983
26160
|
let e = document.createElement("div");
|
|
25984
|
-
e.className =
|
|
26161
|
+
e.className = kP(), e.textContent = n ? "No profiles match filter" : "No award profiles defined", r.appendChild(e);
|
|
25985
26162
|
}
|
|
25986
26163
|
t.readonly || (d = document.createElement("button"), d.className = "sp-btn sp-btn--sm sp-btn--outline re-add-btn", d.textContent = "+ Add Profile", d.addEventListener("click", () => e.addProfile()), r.appendChild(d));
|
|
25987
26164
|
}
|
|
@@ -26001,9 +26178,9 @@ function XP(e, t) {
|
|
|
26001
26178
|
}
|
|
26002
26179
|
//#endregion
|
|
26003
26180
|
//#region src/components/policy-catalog/editors/ranking/rankingPointsEditorControl.ts
|
|
26004
|
-
var
|
|
26181
|
+
var gF = class e {
|
|
26005
26182
|
constructor(e) {
|
|
26006
|
-
this.container = null, this.store = new
|
|
26183
|
+
this.container = null, this.store = new cP(e), this.panel = hF(this.store, e), this.unsubscribe = this.store.subscribe((e) => {
|
|
26007
26184
|
this.panel.update(e);
|
|
26008
26185
|
}), this.panel.update(this.store.getState());
|
|
26009
26186
|
}
|
|
@@ -26044,10 +26221,10 @@ var ZP = class e {
|
|
|
26044
26221
|
};
|
|
26045
26222
|
//#endregion
|
|
26046
26223
|
//#region src/components/policy-catalog/editors/scheduling/domain/schedulingProjections.ts
|
|
26047
|
-
function
|
|
26048
|
-
return
|
|
26224
|
+
function _F(e) {
|
|
26225
|
+
return vF[e] ?? e;
|
|
26049
26226
|
}
|
|
26050
|
-
var
|
|
26227
|
+
var vF = {
|
|
26051
26228
|
"SET3-S:6/TB7": "Best of 3 TB sets",
|
|
26052
26229
|
"SET3-S:6/TB7-F:TB10": "2 TB sets, MTB10",
|
|
26053
26230
|
"SET3-S:6/TB7-F:TB7": "2 TB sets, MTB7",
|
|
@@ -26075,7 +26252,7 @@ var $P = {
|
|
|
26075
26252
|
"SET1-S:T7": "TB7 only",
|
|
26076
26253
|
"SET1-S:T21": "TB21 only"
|
|
26077
26254
|
};
|
|
26078
|
-
function
|
|
26255
|
+
function yF() {
|
|
26079
26256
|
return {
|
|
26080
26257
|
allowModificationWhenMatchUpsScheduled: {
|
|
26081
26258
|
courts: !1,
|
|
@@ -26103,10 +26280,10 @@ function eF() {
|
|
|
26103
26280
|
function $(e) {
|
|
26104
26281
|
return structuredClone(e);
|
|
26105
26282
|
}
|
|
26106
|
-
var
|
|
26283
|
+
var bF = class {
|
|
26107
26284
|
constructor(e) {
|
|
26108
26285
|
this.listeners = /* @__PURE__ */ new Set(), this.config = e, this.state = {
|
|
26109
|
-
draft: $(e.initialPolicy ??
|
|
26286
|
+
draft: $(e.initialPolicy ?? yF()),
|
|
26110
26287
|
expandedSections: new Set([
|
|
26111
26288
|
"modificationFlags",
|
|
26112
26289
|
"dailyLimits",
|
|
@@ -26252,12 +26429,12 @@ var tF = class {
|
|
|
26252
26429
|
emit() {
|
|
26253
26430
|
for (let e of this.listeners) e(this.state);
|
|
26254
26431
|
}
|
|
26255
|
-
},
|
|
26432
|
+
}, xF = () => "se-section", SF = () => "se-section-header", CF = () => "se-section-chevron", wF = () => "se-section-body", TF = () => "se-field-row", EF = () => "se-field-label", DF = () => "se-field-input", OF = () => "se-field-unit", kF = () => "se-checkbox-row", AF = () => "se-format-group", jF = () => "se-format-group-header", MF = () => "se-format-group-label", NF = () => "se-tag-picker", PF = () => "sp-chip", FF = () => "sp-chip__remove", IF = () => "se-tag-add-wrap", LF = () => "sp-btn-icon", RF = () => "se-override-row", zF = () => "se-override-categories", BF = () => "se-override-remove", VF = () => "sp-btn sp-btn--sm sp-btn--outline se-add-btn", HF = () => "sp-btn-icon sp-btn-icon--danger", UF = () => "se-editor";
|
|
26256
26433
|
//#endregion
|
|
26257
26434
|
//#region src/components/policy-catalog/editors/scheduling/sections/modificationFlagsSection.ts
|
|
26258
|
-
function
|
|
26435
|
+
function WF(e) {
|
|
26259
26436
|
let t = document.createElement("div"), n = document.createElement("div");
|
|
26260
|
-
n.className =
|
|
26437
|
+
n.className = kF();
|
|
26261
26438
|
let r = document.createElement("input");
|
|
26262
26439
|
r.type = "checkbox", r.id = "se-mod-courts";
|
|
26263
26440
|
let i = document.createElement("label");
|
|
@@ -26265,7 +26442,7 @@ function TF(e) {
|
|
|
26265
26442
|
e.setModificationFlag("courts", r.checked);
|
|
26266
26443
|
}), n.appendChild(r), n.appendChild(i);
|
|
26267
26444
|
let a = document.createElement("div");
|
|
26268
|
-
a.className =
|
|
26445
|
+
a.className = kF();
|
|
26269
26446
|
let o = document.createElement("input");
|
|
26270
26447
|
o.type = "checkbox", o.id = "se-mod-venues";
|
|
26271
26448
|
let s = document.createElement("label");
|
|
@@ -26283,20 +26460,20 @@ function TF(e) {
|
|
|
26283
26460
|
}
|
|
26284
26461
|
//#endregion
|
|
26285
26462
|
//#region src/components/policy-catalog/editors/scheduling/sections/dailyLimitsSection.ts
|
|
26286
|
-
var
|
|
26287
|
-
function
|
|
26463
|
+
var GF = "is-success", KF = "is-danger";
|
|
26464
|
+
function qF(e) {
|
|
26288
26465
|
if (e === "") return !0;
|
|
26289
26466
|
let t = parseInt(e, 10);
|
|
26290
26467
|
return !isNaN(t) && t >= 0 && String(t) === e.trim();
|
|
26291
26468
|
}
|
|
26292
|
-
function
|
|
26469
|
+
function JF(e, t) {
|
|
26293
26470
|
if (t === "") {
|
|
26294
|
-
e.classList.remove(
|
|
26471
|
+
e.classList.remove(GF, KF);
|
|
26295
26472
|
return;
|
|
26296
26473
|
}
|
|
26297
|
-
|
|
26474
|
+
qF(t) ? (e.classList.remove(KF), e.classList.add(GF)) : (e.classList.remove(GF), e.classList.add(KF));
|
|
26298
26475
|
}
|
|
26299
|
-
function
|
|
26476
|
+
function YF(e) {
|
|
26300
26477
|
let t = document.createElement("div"), n = [];
|
|
26301
26478
|
for (let [r, i] of [
|
|
26302
26479
|
["SINGLES", "Singles limit"],
|
|
@@ -26304,12 +26481,12 @@ function AF(e) {
|
|
|
26304
26481
|
["total", "Total limit"]
|
|
26305
26482
|
]) {
|
|
26306
26483
|
let a = document.createElement("div");
|
|
26307
|
-
a.className =
|
|
26484
|
+
a.className = TF();
|
|
26308
26485
|
let o = document.createElement("div");
|
|
26309
|
-
o.className =
|
|
26486
|
+
o.className = EF(), o.textContent = i;
|
|
26310
26487
|
let s = document.createElement("input");
|
|
26311
|
-
s.type = "text", s.className =
|
|
26312
|
-
|
|
26488
|
+
s.type = "text", s.className = DF(), s.placeholder = "0", s.addEventListener("input", () => {
|
|
26489
|
+
JF(s, s.value);
|
|
26313
26490
|
}), s.addEventListener("change", () => {
|
|
26314
26491
|
let t = parseInt(s.value, 10);
|
|
26315
26492
|
!isNaN(t) && t >= 0 && e.setDailyLimit(r, t);
|
|
@@ -26333,30 +26510,30 @@ function AF(e) {
|
|
|
26333
26510
|
}
|
|
26334
26511
|
//#endregion
|
|
26335
26512
|
//#region src/components/policy-catalog/editors/scheduling/sections/defaultTimesSection.ts
|
|
26336
|
-
var
|
|
26337
|
-
function
|
|
26513
|
+
var XF = "is-success", ZF = "is-danger";
|
|
26514
|
+
function QF(e) {
|
|
26338
26515
|
if (e === "") return !0;
|
|
26339
26516
|
let t = parseInt(e, 10);
|
|
26340
26517
|
return !isNaN(t) && t >= 0 && String(t) === e.trim();
|
|
26341
26518
|
}
|
|
26342
|
-
function
|
|
26519
|
+
function $F(e, t, n) {
|
|
26343
26520
|
if (t === "" && n) {
|
|
26344
|
-
e.classList.remove(
|
|
26521
|
+
e.classList.remove(XF, ZF);
|
|
26345
26522
|
return;
|
|
26346
26523
|
}
|
|
26347
|
-
|
|
26524
|
+
QF(t) && (t !== "" || n) ? (e.classList.remove(ZF), e.classList.add(XF)) : (e.classList.remove(XF), e.classList.add(ZF));
|
|
26348
26525
|
}
|
|
26349
|
-
function
|
|
26526
|
+
function eI(e) {
|
|
26350
26527
|
let t = document.createElement("div"), n = document.createElement("div");
|
|
26351
26528
|
n.style.cssText = "font-size:11px;font-weight:700;color:var(--sp-muted);margin-bottom:6px;", n.textContent = "Default Average Times", t.appendChild(n);
|
|
26352
|
-
let r =
|
|
26529
|
+
let r = tI("Default", "min", !1), i = tI("Doubles override", "min", !0);
|
|
26353
26530
|
t.appendChild(r.row), t.appendChild(i.row), r.input.addEventListener("input", () => {
|
|
26354
|
-
|
|
26531
|
+
$F(r.input, r.input.value, !1);
|
|
26355
26532
|
}), r.input.addEventListener("change", () => {
|
|
26356
26533
|
let t = parseInt(r.input.value, 10);
|
|
26357
26534
|
!isNaN(t) && t >= 0 && e.setDefaultAverageTime(0, "default", t);
|
|
26358
26535
|
}), i.input.addEventListener("input", () => {
|
|
26359
|
-
|
|
26536
|
+
$F(i.input, i.input.value, !0);
|
|
26360
26537
|
}), i.input.addEventListener("change", () => {
|
|
26361
26538
|
let t = i.input.value.trim();
|
|
26362
26539
|
if (t === "" || t === "-") e.setDefaultAverageTime(0, "DOUBLES", void 0);
|
|
@@ -26369,14 +26546,14 @@ function FF(e) {
|
|
|
26369
26546
|
a.style.height = "12px", t.appendChild(a);
|
|
26370
26547
|
let o = document.createElement("div");
|
|
26371
26548
|
o.style.cssText = "font-size:11px;font-weight:700;color:var(--sp-muted);margin-bottom:6px;", o.textContent = "Default Recovery Times", t.appendChild(o);
|
|
26372
|
-
let s =
|
|
26549
|
+
let s = tI("Default", "min", !1), c = tI("Doubles override", "min", !0);
|
|
26373
26550
|
t.appendChild(s.row), t.appendChild(c.row), s.input.addEventListener("input", () => {
|
|
26374
|
-
|
|
26551
|
+
$F(s.input, s.input.value, !1);
|
|
26375
26552
|
}), s.input.addEventListener("change", () => {
|
|
26376
26553
|
let t = parseInt(s.input.value, 10);
|
|
26377
26554
|
!isNaN(t) && t >= 0 && e.setDefaultRecoveryTime(0, "default", t);
|
|
26378
26555
|
}), c.input.addEventListener("input", () => {
|
|
26379
|
-
|
|
26556
|
+
$F(c.input, c.input.value, !0);
|
|
26380
26557
|
}), c.input.addEventListener("change", () => {
|
|
26381
26558
|
let t = c.input.value.trim();
|
|
26382
26559
|
if (t === "" || t === "-") e.setDefaultRecoveryTime(0, "DOUBLES", void 0);
|
|
@@ -26396,50 +26573,50 @@ function FF(e) {
|
|
|
26396
26573
|
update: l
|
|
26397
26574
|
};
|
|
26398
26575
|
}
|
|
26399
|
-
function
|
|
26576
|
+
function tI(e, t, n) {
|
|
26400
26577
|
let r = document.createElement("div");
|
|
26401
|
-
r.className =
|
|
26578
|
+
r.className = TF();
|
|
26402
26579
|
let i = document.createElement("div");
|
|
26403
|
-
i.className =
|
|
26580
|
+
i.className = EF(), i.textContent = e;
|
|
26404
26581
|
let a = document.createElement("input");
|
|
26405
|
-
a.type = "text", a.className =
|
|
26582
|
+
a.type = "text", a.className = DF(), a.placeholder = n ? "—" : "0";
|
|
26406
26583
|
let o = document.createElement("div");
|
|
26407
|
-
return o.className =
|
|
26584
|
+
return o.className = OF(), o.textContent = t, r.appendChild(i), r.appendChild(a), r.appendChild(o), {
|
|
26408
26585
|
row: r,
|
|
26409
26586
|
input: a
|
|
26410
26587
|
};
|
|
26411
26588
|
}
|
|
26412
26589
|
//#endregion
|
|
26413
26590
|
//#region src/components/policy-catalog/editors/scheduling/sections/formatTimeRow.ts
|
|
26414
|
-
var
|
|
26415
|
-
function
|
|
26591
|
+
var nI = "is-success", rI = "is-danger";
|
|
26592
|
+
function iI(e) {
|
|
26416
26593
|
if (e === "") return !0;
|
|
26417
26594
|
let t = parseInt(e, 10);
|
|
26418
26595
|
return !isNaN(t) && t >= 0 && String(t) === e.trim();
|
|
26419
26596
|
}
|
|
26420
|
-
function
|
|
26597
|
+
function aI(e, t, n) {
|
|
26421
26598
|
if (t === "" && n) {
|
|
26422
|
-
e.classList.remove(
|
|
26599
|
+
e.classList.remove(nI, rI);
|
|
26423
26600
|
return;
|
|
26424
26601
|
}
|
|
26425
|
-
|
|
26602
|
+
iI(t) && (t !== "" || n) ? (e.classList.remove(rI), e.classList.add(nI)) : (e.classList.remove(nI), e.classList.add(rI));
|
|
26426
26603
|
}
|
|
26427
|
-
function
|
|
26604
|
+
function oI(e) {
|
|
26428
26605
|
let t = document.createElement("div");
|
|
26429
|
-
t.className =
|
|
26606
|
+
t.className = AF();
|
|
26430
26607
|
let n = document.createElement("div");
|
|
26431
|
-
n.className =
|
|
26608
|
+
n.className = jF();
|
|
26432
26609
|
let r = document.createElement("div");
|
|
26433
26610
|
r.style.flex = "1";
|
|
26434
26611
|
let i = document.createElement("div");
|
|
26435
|
-
i.className =
|
|
26612
|
+
i.className = MF(), i.textContent = "Formats", r.appendChild(i);
|
|
26436
26613
|
let a = document.createElement("div");
|
|
26437
|
-
a.className =
|
|
26614
|
+
a.className = NF();
|
|
26438
26615
|
for (let t of e.formatCodes) {
|
|
26439
26616
|
let n = document.createElement("span");
|
|
26440
|
-
n.className =
|
|
26617
|
+
n.className = PF(), n.title = `${t} — click to edit`;
|
|
26441
26618
|
let r = document.createElement("span");
|
|
26442
|
-
r.textContent =
|
|
26619
|
+
r.textContent = _F(t), n.addEventListener("click", () => {
|
|
26443
26620
|
za({
|
|
26444
26621
|
existingMatchUpFormat: t,
|
|
26445
26622
|
callback: (n) => {
|
|
@@ -26450,14 +26627,14 @@ function VF(e) {
|
|
|
26450
26627
|
});
|
|
26451
26628
|
});
|
|
26452
26629
|
let i = document.createElement("span");
|
|
26453
|
-
i.className =
|
|
26630
|
+
i.className = FF(), i.textContent = "×", i.addEventListener("click", (n) => {
|
|
26454
26631
|
n.stopPropagation(), e.onFormatCodesChange(e.formatCodes.filter((e) => e !== t));
|
|
26455
26632
|
}), n.appendChild(r), n.appendChild(i), a.appendChild(n);
|
|
26456
26633
|
}
|
|
26457
26634
|
let o = document.createElement("div");
|
|
26458
|
-
o.className =
|
|
26635
|
+
o.className = IF();
|
|
26459
26636
|
let s = document.createElement("button");
|
|
26460
|
-
s.className =
|
|
26637
|
+
s.className = LF(), s.textContent = "+", s.type = "button", s.title = "Add format code", s.addEventListener("click", (t) => {
|
|
26461
26638
|
t.stopPropagation(), za({
|
|
26462
26639
|
existingMatchUpFormat: "SET3-S:6/TB7",
|
|
26463
26640
|
callback: (t) => {
|
|
@@ -26466,28 +26643,28 @@ function VF(e) {
|
|
|
26466
26643
|
});
|
|
26467
26644
|
}), o.appendChild(s), a.appendChild(o), r.appendChild(a);
|
|
26468
26645
|
let c = document.createElement("button");
|
|
26469
|
-
c.className =
|
|
26646
|
+
c.className = HF(), c.textContent = "×", c.type = "button", c.title = "Remove format group", c.addEventListener("click", () => e.onRemoveGroup()), n.appendChild(r), n.appendChild(c), t.appendChild(n);
|
|
26470
26647
|
for (let n = 0; n < e.overrides.length; n++) {
|
|
26471
26648
|
let r = e.overrides[n], i = document.createElement("div");
|
|
26472
|
-
i.className =
|
|
26649
|
+
i.className = RF();
|
|
26473
26650
|
let a = document.createElement("div");
|
|
26474
|
-
a.className = `${
|
|
26651
|
+
a.className = `${zF()}${r.isDefault ? " all" : ""}`, a.textContent = r.categoryLabel;
|
|
26475
26652
|
let o = document.createElement("input");
|
|
26476
|
-
o.type = "text", o.className =
|
|
26653
|
+
o.type = "text", o.className = DF(), o.value = String(r.defaultMinutes), o.placeholder = "0";
|
|
26477
26654
|
let s = n;
|
|
26478
26655
|
o.addEventListener("input", () => {
|
|
26479
|
-
|
|
26656
|
+
aI(o, o.value, !1);
|
|
26480
26657
|
}), o.addEventListener("change", () => {
|
|
26481
26658
|
let t = parseInt(o.value, 10);
|
|
26482
26659
|
!isNaN(t) && t >= 0 && e.onTimeChange(s, "default", t);
|
|
26483
26660
|
});
|
|
26484
26661
|
let c = document.createElement("span");
|
|
26485
|
-
c.className =
|
|
26662
|
+
c.className = OF(), c.textContent = "min";
|
|
26486
26663
|
let l = document.createElement("span");
|
|
26487
26664
|
l.style.cssText = "font-size:11px;color:var(--sp-muted);margin-left:8px;", l.textContent = "Doubles:";
|
|
26488
26665
|
let u = document.createElement("input");
|
|
26489
|
-
if (u.type = "text", u.className =
|
|
26490
|
-
|
|
26666
|
+
if (u.type = "text", u.className = DF(), u.value = r.doublesMinutes === void 0 ? "" : String(r.doublesMinutes), u.placeholder = "—", u.addEventListener("input", () => {
|
|
26667
|
+
aI(u, u.value, !0);
|
|
26491
26668
|
}), u.addEventListener("change", () => {
|
|
26492
26669
|
let t = u.value.trim();
|
|
26493
26670
|
if (t === "" || t === "-") e.onTimeChange(s, "DOUBLES", void 0);
|
|
@@ -26497,20 +26674,20 @@ function VF(e) {
|
|
|
26497
26674
|
}
|
|
26498
26675
|
}), i.appendChild(a), i.appendChild(o), i.appendChild(c), i.appendChild(l), i.appendChild(u), !r.isDefault) {
|
|
26499
26676
|
let t = document.createElement("span");
|
|
26500
|
-
t.className =
|
|
26677
|
+
t.className = BF(), t.textContent = "×", t.addEventListener("click", () => e.onRemoveOverride(s)), i.appendChild(t);
|
|
26501
26678
|
}
|
|
26502
26679
|
t.appendChild(i);
|
|
26503
26680
|
}
|
|
26504
26681
|
let l = document.createElement("button");
|
|
26505
|
-
return l.className =
|
|
26682
|
+
return l.className = VF(), l.textContent = "+ Add Override", l.type = "button", l.addEventListener("click", () => e.onAddOverride()), t.appendChild(l), t;
|
|
26506
26683
|
}
|
|
26507
26684
|
//#endregion
|
|
26508
26685
|
//#region src/components/policy-catalog/editors/scheduling/sections/averageTimesSection.ts
|
|
26509
|
-
function
|
|
26686
|
+
function sI(e, t) {
|
|
26510
26687
|
let n = document.createElement("div"), r = document.createElement("div");
|
|
26511
26688
|
n.appendChild(r);
|
|
26512
26689
|
let i = document.createElement("button");
|
|
26513
|
-
i.className =
|
|
26690
|
+
i.className = VF(), i.textContent = "+ Add Format Group", i.type = "button", i.addEventListener("click", () => e.addAverageFormatGroup()), n.appendChild(i);
|
|
26514
26691
|
function a(n) {
|
|
26515
26692
|
r.innerHTML = "";
|
|
26516
26693
|
let i = n.draft.matchUpAverageTimes ?? [];
|
|
@@ -26523,10 +26700,10 @@ function HF(e, t) {
|
|
|
26523
26700
|
defaultMinutes: e.minutes.default,
|
|
26524
26701
|
doublesMinutes: e.minutes.DOUBLES
|
|
26525
26702
|
};
|
|
26526
|
-
}), s = n, c =
|
|
26703
|
+
}), s = n, c = oI({
|
|
26527
26704
|
formatCodes: a.matchUpFormatCodes,
|
|
26528
26705
|
overrides: o,
|
|
26529
|
-
availableFormats: t.matchUpFormatCodes ??
|
|
26706
|
+
availableFormats: t.matchUpFormatCodes ?? cI(),
|
|
26530
26707
|
onFormatCodesChange: (t) => e.setAverageFormatCodes(s, t),
|
|
26531
26708
|
onTimeChange: (t, n, r) => e.setAverageTime(s, t, n, r),
|
|
26532
26709
|
onAddOverride: () => e.addAverageCategoryOverride(s),
|
|
@@ -26545,7 +26722,7 @@ function HF(e, t) {
|
|
|
26545
26722
|
update: a
|
|
26546
26723
|
};
|
|
26547
26724
|
}
|
|
26548
|
-
function
|
|
26725
|
+
function cI() {
|
|
26549
26726
|
return [
|
|
26550
26727
|
"SET3-S:6/TB7",
|
|
26551
26728
|
"SET3-S:6/TB7-F:TB10",
|
|
@@ -26570,11 +26747,11 @@ function UF() {
|
|
|
26570
26747
|
}
|
|
26571
26748
|
//#endregion
|
|
26572
26749
|
//#region src/components/policy-catalog/editors/scheduling/sections/recoveryTimesSection.ts
|
|
26573
|
-
function
|
|
26750
|
+
function lI(e, t) {
|
|
26574
26751
|
let n = document.createElement("div"), r = document.createElement("div");
|
|
26575
26752
|
n.appendChild(r);
|
|
26576
26753
|
let i = document.createElement("button");
|
|
26577
|
-
i.className =
|
|
26754
|
+
i.className = VF(), i.textContent = "+ Add Format Group", i.type = "button", i.addEventListener("click", () => e.addRecoveryFormatGroup()), n.appendChild(i);
|
|
26578
26755
|
function a(n) {
|
|
26579
26756
|
r.innerHTML = "";
|
|
26580
26757
|
let i = n.draft.matchUpRecoveryTimes ?? [];
|
|
@@ -26587,10 +26764,10 @@ function WF(e, t) {
|
|
|
26587
26764
|
defaultMinutes: e.minutes.default,
|
|
26588
26765
|
doublesMinutes: e.minutes.DOUBLES
|
|
26589
26766
|
};
|
|
26590
|
-
}), s = n, c =
|
|
26767
|
+
}), s = n, c = oI({
|
|
26591
26768
|
formatCodes: a.matchUpFormatCodes,
|
|
26592
26769
|
overrides: o,
|
|
26593
|
-
availableFormats: t.matchUpFormatCodes ??
|
|
26770
|
+
availableFormats: t.matchUpFormatCodes ?? uI(),
|
|
26594
26771
|
onFormatCodesChange: (t) => e.setRecoveryFormatCodes(s, t),
|
|
26595
26772
|
onTimeChange: (t, n, r) => e.setRecoveryTime(s, t, n, r),
|
|
26596
26773
|
onAddOverride: () => e.addRecoveryCategoryOverride(s),
|
|
@@ -26609,7 +26786,7 @@ function WF(e, t) {
|
|
|
26609
26786
|
update: a
|
|
26610
26787
|
};
|
|
26611
26788
|
}
|
|
26612
|
-
function
|
|
26789
|
+
function uI() {
|
|
26613
26790
|
return [
|
|
26614
26791
|
"SET3-S:6/TB7",
|
|
26615
26792
|
"SET3-S:6/TB7-F:TB10",
|
|
@@ -26634,47 +26811,47 @@ function GF() {
|
|
|
26634
26811
|
}
|
|
26635
26812
|
//#endregion
|
|
26636
26813
|
//#region src/components/policy-catalog/editors/scheduling/schedulingEditorPanel.ts
|
|
26637
|
-
function
|
|
26814
|
+
function dI(e, t) {
|
|
26638
26815
|
let n = document.createElement("div");
|
|
26639
|
-
n.className =
|
|
26816
|
+
n.className = UF();
|
|
26640
26817
|
let r = [
|
|
26641
26818
|
{
|
|
26642
26819
|
id: "modificationFlags",
|
|
26643
26820
|
label: "Modification Flags",
|
|
26644
|
-
factory: () =>
|
|
26821
|
+
factory: () => WF(e)
|
|
26645
26822
|
},
|
|
26646
26823
|
{
|
|
26647
26824
|
id: "dailyLimits",
|
|
26648
26825
|
label: "Daily Limits",
|
|
26649
|
-
factory: () =>
|
|
26826
|
+
factory: () => YF(e)
|
|
26650
26827
|
},
|
|
26651
26828
|
{
|
|
26652
26829
|
id: "defaultTimes",
|
|
26653
26830
|
label: "Default Times",
|
|
26654
|
-
factory: () =>
|
|
26831
|
+
factory: () => eI(e)
|
|
26655
26832
|
},
|
|
26656
26833
|
{
|
|
26657
26834
|
id: "averageTimes",
|
|
26658
26835
|
label: "Match Average Times",
|
|
26659
|
-
factory: () =>
|
|
26836
|
+
factory: () => sI(e, t)
|
|
26660
26837
|
},
|
|
26661
26838
|
{
|
|
26662
26839
|
id: "recoveryTimes",
|
|
26663
26840
|
label: "Match Recovery Times",
|
|
26664
|
-
factory: () =>
|
|
26841
|
+
factory: () => lI(e, t)
|
|
26665
26842
|
}
|
|
26666
26843
|
], i = [];
|
|
26667
26844
|
for (let t of r) {
|
|
26668
26845
|
let r = document.createElement("div");
|
|
26669
|
-
r.className =
|
|
26846
|
+
r.className = xF();
|
|
26670
26847
|
let a = document.createElement("div");
|
|
26671
|
-
a.className =
|
|
26848
|
+
a.className = SF();
|
|
26672
26849
|
let o = document.createElement("span");
|
|
26673
|
-
o.className =
|
|
26850
|
+
o.className = CF();
|
|
26674
26851
|
let s = document.createElement("span");
|
|
26675
26852
|
s.textContent = t.label, a.appendChild(o), a.appendChild(s), a.addEventListener("click", () => e.toggleSection(t.id));
|
|
26676
26853
|
let c = document.createElement("div");
|
|
26677
|
-
c.className =
|
|
26854
|
+
c.className = wF();
|
|
26678
26855
|
let l = t.factory();
|
|
26679
26856
|
c.appendChild(l.element), r.appendChild(a), r.appendChild(c), n.appendChild(r), i.push({
|
|
26680
26857
|
id: t.id,
|
|
@@ -26696,9 +26873,9 @@ function KF(e, t) {
|
|
|
26696
26873
|
}
|
|
26697
26874
|
//#endregion
|
|
26698
26875
|
//#region src/components/policy-catalog/editors/scheduling/schedulingEditorControl.ts
|
|
26699
|
-
var
|
|
26876
|
+
var fI = class e {
|
|
26700
26877
|
constructor(e) {
|
|
26701
|
-
this.container = null, this.store = new
|
|
26878
|
+
this.container = null, this.store = new bF(e), this.panel = dI(this.store, e), this.unsubscribe = this.store.subscribe((e) => {
|
|
26702
26879
|
this.panel.update(e);
|
|
26703
26880
|
}), this.panel.update(this.store.getState());
|
|
26704
26881
|
}
|
|
@@ -26736,18 +26913,18 @@ var qF = class e {
|
|
|
26736
26913
|
};
|
|
26737
26914
|
}
|
|
26738
26915
|
};
|
|
26739
|
-
function
|
|
26740
|
-
let n = new
|
|
26916
|
+
function pI(e, t) {
|
|
26917
|
+
let n = new fI(e);
|
|
26741
26918
|
return n.render(t), n;
|
|
26742
26919
|
}
|
|
26743
26920
|
//#endregion
|
|
26744
26921
|
//#region src/components/policy-catalog/ui/styles.ts
|
|
26745
|
-
var
|
|
26922
|
+
var mI = () => "pc-layout", hI = () => "pc-panel", gI = () => "pc-panel-header", _I = () => "pc-panel-title", vI = () => "pc-panel-meta", yI = () => "pc-toolbar", bI = () => "pc-input", xI = () => "pc-select", SI = () => "pc-catalog", CI = () => "pc-group", wI = () => "pc-group-header", TI = () => "pc-group-chevron", EI = () => "pc-group-body", DI = () => "pc-card", OI = () => "pc-card-title", kI = () => "pc-card-meta", AI = () => "pc-type-badge", jI = () => "pc-editor", MI = () => "pc-editor-header", NI = () => "pc-editor-header-left", PI = () => "pc-editor-actions", FI = () => "sp-btn sp-btn--sm", II = () => "sp-btn sp-btn--sm sp-btn--accent", LI = () => "pc-dirty-dot", RI = () => "pc-editor-body", zI = () => "pc-empty", BI = () => "pc-json-editor", VI = () => "pc-json-error";
|
|
26746
26923
|
//#endregion
|
|
26747
26924
|
//#region src/components/policy-catalog/ui/policyCatalogLayout.ts
|
|
26748
|
-
function
|
|
26925
|
+
function HI(e) {
|
|
26749
26926
|
let t = document.createElement("div");
|
|
26750
|
-
t.className =
|
|
26927
|
+
t.className = mI(), t.appendChild(e.catalogPanel.element), t.appendChild(e.editorShell.element);
|
|
26751
26928
|
function n(t) {
|
|
26752
26929
|
e.catalogPanel.update(t), e.editorShell.update(t);
|
|
26753
26930
|
}
|
|
@@ -26758,51 +26935,51 @@ function CI(e) {
|
|
|
26758
26935
|
}
|
|
26759
26936
|
//#endregion
|
|
26760
26937
|
//#region src/components/policy-catalog/domain/policyDefaults.ts
|
|
26761
|
-
var
|
|
26938
|
+
var UI = "scheduling", WI = "scoring", GI = "seeding", KI = "draws", qI = "avoidance", JI = "feedIn", YI = "progression", XI = "roundNaming", ZI = "positionActions", QI = "matchUpActions", $I = "roundRobinTally", eL = "rankingPoints", tL = "competitiveBands", nL = "voluntaryConsolation", rL = "participant", iL = "display", aL = "audit", oL = "Tournament Operations", sL = "Scoring & Results", cL = "Ranking Points", lL = "Draw Configuration", uL = "Participants", dL = "Display & Audit", fL = (e, t, n, r, i) => ({
|
|
26762
26939
|
policyType: e,
|
|
26763
26940
|
label: t,
|
|
26764
26941
|
description: n,
|
|
26765
26942
|
group: r,
|
|
26766
26943
|
hasEditor: i
|
|
26767
|
-
}),
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
qI
|
|
26772
|
-
|
|
26773
|
-
|
|
26774
|
-
|
|
26775
|
-
|
|
26776
|
-
|
|
26777
|
-
|
|
26778
|
-
|
|
26779
|
-
|
|
26780
|
-
|
|
26781
|
-
|
|
26782
|
-
|
|
26783
|
-
|
|
26784
|
-
|
|
26944
|
+
}), pL = [
|
|
26945
|
+
fL(UI, "Scheduling", "Match scheduling, average times, recovery times, daily limits", oL, !0),
|
|
26946
|
+
fL(ZI, "Position Actions", "Allowed position actions (alternates, walkovers, withdrawals)", oL, !1),
|
|
26947
|
+
fL(QI, "MatchUp Actions", "Allowed matchUp status transitions and actions", oL, !1),
|
|
26948
|
+
fL(qI, "Avoidance", "Draw placement avoidance rules (club, nationality, region)", oL, !1),
|
|
26949
|
+
fL(WI, "Scoring", "Score entry validation and completion rules", sL, !1),
|
|
26950
|
+
fL($I, "Round Robin Tally", "Round-robin group standing calculation method", sL, !1),
|
|
26951
|
+
fL(eL, "Ranking Points", "Point allocation by draw size, round, and result", cL, !0),
|
|
26952
|
+
fL(tL, "Competitive Bands", "Rating/ranking band definitions for competitive grouping", sL, !1),
|
|
26953
|
+
fL(KI, "Draws", "Draw generation rules and structure options", lL, !1),
|
|
26954
|
+
fL(GI, "Seeding", "Seeding thresholds and placement rules by draw size", lL, !1),
|
|
26955
|
+
fL(JI, "Feed-In", "Feed-in consolation structure rules", lL, !1),
|
|
26956
|
+
fL(YI, "Progression", "Player progression between draw structures", lL, !1),
|
|
26957
|
+
fL(nL, "Voluntary Consolation", "Voluntary consolation entry rules", lL, !1),
|
|
26958
|
+
fL(XI, "Round Naming", "Custom round name labels (QF, SF, F, etc.)", lL, !1),
|
|
26959
|
+
fL(rL, "Participant", "Participant display and data rules", uL, !1),
|
|
26960
|
+
fL(iL, "Display", "Client display configuration (public vs admin views)", dL, !1),
|
|
26961
|
+
fL(aL, "Audit", "Audit trail and change logging configuration", dL, !1)
|
|
26785
26962
|
];
|
|
26786
|
-
function
|
|
26787
|
-
return
|
|
26788
|
-
}
|
|
26789
|
-
function
|
|
26790
|
-
return e === "rankingPoints" ?
|
|
26791
|
-
}
|
|
26792
|
-
var
|
|
26793
|
-
|
|
26794
|
-
|
|
26795
|
-
|
|
26796
|
-
|
|
26797
|
-
|
|
26798
|
-
|
|
26963
|
+
function mL(e) {
|
|
26964
|
+
return pL.find((t) => t.policyType === e);
|
|
26965
|
+
}
|
|
26966
|
+
function hL(e) {
|
|
26967
|
+
return e === "rankingPoints" ? sP() : e === "scheduling" ? yF() : {};
|
|
26968
|
+
}
|
|
26969
|
+
var gL = [
|
|
26970
|
+
oL,
|
|
26971
|
+
sL,
|
|
26972
|
+
cL,
|
|
26973
|
+
lL,
|
|
26974
|
+
uL,
|
|
26975
|
+
dL
|
|
26799
26976
|
];
|
|
26800
26977
|
//#endregion
|
|
26801
26978
|
//#region src/components/policy-catalog/domain/catalogProjections.ts
|
|
26802
|
-
function
|
|
26979
|
+
function _L(e, t) {
|
|
26803
26980
|
let n = t.toLowerCase().trim();
|
|
26804
26981
|
return n ? e.filter((e) => {
|
|
26805
|
-
let t =
|
|
26982
|
+
let t = mL(e.policyType);
|
|
26806
26983
|
return [
|
|
26807
26984
|
e.name,
|
|
26808
26985
|
e.description,
|
|
@@ -26812,12 +26989,12 @@ function QI(e, t) {
|
|
|
26812
26989
|
].join(" ").toLowerCase().includes(n);
|
|
26813
26990
|
}) : e;
|
|
26814
26991
|
}
|
|
26815
|
-
function
|
|
26992
|
+
function vL(e, t) {
|
|
26816
26993
|
let n = /* @__PURE__ */ new Map();
|
|
26817
26994
|
if (t === "type") {
|
|
26818
|
-
for (let e of
|
|
26995
|
+
for (let e of gL) n.set(e, []);
|
|
26819
26996
|
for (let t of e) {
|
|
26820
|
-
let e =
|
|
26997
|
+
let e = mL(t.policyType)?.group ?? "Display & Audit", r = n.get(e);
|
|
26821
26998
|
r ? r.push(t) : n.set(e, [t]);
|
|
26822
26999
|
}
|
|
26823
27000
|
for (let [e, t] of n) t.length === 0 && n.delete(e);
|
|
@@ -26829,21 +27006,21 @@ function $I(e, t) {
|
|
|
26829
27006
|
}
|
|
26830
27007
|
//#endregion
|
|
26831
27008
|
//#region src/components/policy-catalog/ui/policyCatalogPanel.ts
|
|
26832
|
-
function
|
|
27009
|
+
function yL(e) {
|
|
26833
27010
|
let t = document.createElement("div");
|
|
26834
|
-
t.className =
|
|
27011
|
+
t.className = hI(), t.style.overflowY = "auto", t.style.scrollbarWidth = "thin", t.style.scrollbarColor = "var(--sp-scrollbar) transparent";
|
|
26835
27012
|
let n = /* @__PURE__ */ new Set(), r = null, i = document.createElement("div");
|
|
26836
|
-
i.className =
|
|
27013
|
+
i.className = gI();
|
|
26837
27014
|
let a = document.createElement("div");
|
|
26838
|
-
a.className =
|
|
27015
|
+
a.className = _I(), a.textContent = "Policy Catalog";
|
|
26839
27016
|
let o = document.createElement("div");
|
|
26840
|
-
o.className =
|
|
27017
|
+
o.className = vI(), i.appendChild(a), i.appendChild(o), t.appendChild(i);
|
|
26841
27018
|
let s = document.createElement("div");
|
|
26842
|
-
s.className =
|
|
27019
|
+
s.className = yI();
|
|
26843
27020
|
let c = document.createElement("input");
|
|
26844
|
-
c.type = "text", c.placeholder = "Search policies...", c.className =
|
|
27021
|
+
c.type = "text", c.placeholder = "Search policies...", c.className = bI(), c.addEventListener("input", () => e.onSearchChange(c.value));
|
|
26845
27022
|
let l = document.createElement("select");
|
|
26846
|
-
l.className =
|
|
27023
|
+
l.className = xI();
|
|
26847
27024
|
for (let [e, t] of [["type", "By Type"], ["source", "By Source"]]) {
|
|
26848
27025
|
let n = document.createElement("option");
|
|
26849
27026
|
n.value = e, n.textContent = t, l.appendChild(n);
|
|
@@ -26855,7 +27032,7 @@ function eL(e) {
|
|
|
26855
27032
|
d.className = "sp-btn-icon", d.textContent = "+", d.title = "New policy", d.style.cssText = "font-size:1rem;font-weight:700";
|
|
26856
27033
|
let f = document.createElement("div");
|
|
26857
27034
|
f.style.cssText = "display:none;position:absolute;top:100%;right:0;z-index:100;min-width:180px;background:var(--sp-panel-bg);border:1px solid var(--sp-border);border-radius:12px;box-shadow:var(--sp-panel-shadow);padding:4px;margin-top:4px";
|
|
26858
|
-
let p =
|
|
27035
|
+
let p = pL.filter((e) => e.hasEditor);
|
|
26859
27036
|
for (let t of p) {
|
|
26860
27037
|
let n = document.createElement("div");
|
|
26861
27038
|
n.style.cssText = "padding:6px 10px;font-size:12px;border-radius:8px;cursor:pointer;color:var(--sp-text)", n.textContent = t.label, n.addEventListener("mouseenter", () => {
|
|
@@ -26872,31 +27049,31 @@ function eL(e) {
|
|
|
26872
27049
|
f.style.display = "none";
|
|
26873
27050
|
}), u.appendChild(d), u.appendChild(f), s.appendChild(c), s.appendChild(l), s.appendChild(u), t.appendChild(s);
|
|
26874
27051
|
let m = document.createElement("div");
|
|
26875
|
-
m.className =
|
|
27052
|
+
m.className = SI(), t.appendChild(m);
|
|
26876
27053
|
function h(t) {
|
|
26877
27054
|
r = t;
|
|
26878
|
-
let i =
|
|
27055
|
+
let i = _L(t.catalog, t.searchQuery), a = vL(i, t.groupBy);
|
|
26879
27056
|
o.textContent = `${i.length} policies`, c.value !== t.searchQuery && (c.value = t.searchQuery), l.value !== t.groupBy && (l.value = t.groupBy), m.innerHTML = "";
|
|
26880
27057
|
for (let [i, o] of a) {
|
|
26881
27058
|
let a = document.createElement("div");
|
|
26882
|
-
a.className =
|
|
27059
|
+
a.className = CI();
|
|
26883
27060
|
let s = n.has(i), c = document.createElement("div");
|
|
26884
|
-
c.className =
|
|
27061
|
+
c.className = wI();
|
|
26885
27062
|
let l = document.createElement("span");
|
|
26886
|
-
l.className =
|
|
27063
|
+
l.className = TI(), l.textContent = s ? "▶" : "▼";
|
|
26887
27064
|
let u = document.createElement("span");
|
|
26888
27065
|
u.textContent = `${i} (${o.length})`, c.appendChild(l), c.appendChild(u), c.addEventListener("click", () => {
|
|
26889
27066
|
n.has(i) ? n.delete(i) : n.add(i), r && h(r);
|
|
26890
27067
|
});
|
|
26891
27068
|
let d = document.createElement("div");
|
|
26892
|
-
d.className =
|
|
27069
|
+
d.className = EI(), s && (d.style.display = "none");
|
|
26893
27070
|
for (let n of o) {
|
|
26894
27071
|
let r = document.createElement("div");
|
|
26895
|
-
r.className =
|
|
27072
|
+
r.className = DI(), n.id === t.selectedId && r.classList.add("active"), r.addEventListener("click", () => e.onSelectPolicy(n.id));
|
|
26896
27073
|
let i = document.createElement("div");
|
|
26897
27074
|
i.style.cssText = "display:flex;align-items:center;gap:4px";
|
|
26898
27075
|
let a = document.createElement("div");
|
|
26899
|
-
if (a.className =
|
|
27076
|
+
if (a.className = OI(), a.style.flex = "1", a.textContent = n.name, i.appendChild(a), e.onDuplicatePolicy) {
|
|
26900
27077
|
let t = document.createElement("span");
|
|
26901
27078
|
t.style.cssText = "font-size:10px;cursor:pointer;color:var(--sp-muted);padding:2px", t.textContent = "⎘", t.title = "Duplicate", t.addEventListener("click", (t) => {
|
|
26902
27079
|
t.stopPropagation(), e.onDuplicatePolicy?.(n.id);
|
|
@@ -26910,11 +27087,11 @@ function eL(e) {
|
|
|
26910
27087
|
}
|
|
26911
27088
|
r.appendChild(i);
|
|
26912
27089
|
let o = document.createElement("div");
|
|
26913
|
-
o.className =
|
|
26914
|
-
let s =
|
|
26915
|
-
c.className =
|
|
27090
|
+
o.className = kI();
|
|
27091
|
+
let s = mL(n.policyType), c = document.createElement("span");
|
|
27092
|
+
c.className = AI(), c.textContent = s?.label ?? n.policyType;
|
|
26916
27093
|
let l = document.createElement("span");
|
|
26917
|
-
l.className = `${
|
|
27094
|
+
l.className = `${AI()} ${n.source}`, l.textContent = n.source, o.appendChild(c), o.appendChild(l), r.appendChild(o), d.appendChild(r);
|
|
26918
27095
|
}
|
|
26919
27096
|
a.appendChild(c), a.appendChild(d), m.appendChild(a);
|
|
26920
27097
|
}
|
|
@@ -26926,12 +27103,12 @@ function eL(e) {
|
|
|
26926
27103
|
}
|
|
26927
27104
|
//#endregion
|
|
26928
27105
|
//#region src/components/policy-catalog/domain/utils.ts
|
|
26929
|
-
function
|
|
27106
|
+
function bL(e) {
|
|
26930
27107
|
return structuredClone(e);
|
|
26931
27108
|
}
|
|
26932
27109
|
//#endregion
|
|
26933
27110
|
//#region src/components/policy-catalog/engine/policyCatalogStore.ts
|
|
26934
|
-
var
|
|
27111
|
+
var xL = class {
|
|
26935
27112
|
constructor(e) {
|
|
26936
27113
|
this.listeners = /* @__PURE__ */ new Set(), this.config = e;
|
|
26937
27114
|
let t = new Set((e.builtinPolicies ?? []).map((e) => e.id)), n = [...e.builtinPolicies ?? [], ...(e.userPolicies ?? []).filter((e) => !t.has(e.id))];
|
|
@@ -26961,7 +27138,7 @@ var nL = class {
|
|
|
26961
27138
|
let t = this.state.catalog.find((t) => t.id === e);
|
|
26962
27139
|
t && (this.setState({
|
|
26963
27140
|
selectedId: e,
|
|
26964
|
-
editorDraft:
|
|
27141
|
+
editorDraft: bL(t.policyData),
|
|
26965
27142
|
dirty: !1
|
|
26966
27143
|
}), this.config.onSelectionChanged?.(t));
|
|
26967
27144
|
}
|
|
@@ -26989,7 +27166,7 @@ var nL = class {
|
|
|
26989
27166
|
if (!e || !this.state.editorDraft) return;
|
|
26990
27167
|
let t = {
|
|
26991
27168
|
...e,
|
|
26992
|
-
policyData:
|
|
27169
|
+
policyData: bL(this.state.editorDraft)
|
|
26993
27170
|
}, n = this.state.catalog.map((e) => e.id === t.id ? t : e);
|
|
26994
27171
|
this.state = {
|
|
26995
27172
|
...this.state,
|
|
@@ -27000,7 +27177,7 @@ var nL = class {
|
|
|
27000
27177
|
resetDraft() {
|
|
27001
27178
|
let e = this.getSelectedItem();
|
|
27002
27179
|
e && this.setState({
|
|
27003
|
-
editorDraft:
|
|
27180
|
+
editorDraft: bL(e.policyData),
|
|
27004
27181
|
dirty: !1
|
|
27005
27182
|
});
|
|
27006
27183
|
}
|
|
@@ -27009,7 +27186,7 @@ var nL = class {
|
|
|
27009
27186
|
if (!e) return;
|
|
27010
27187
|
let t = {
|
|
27011
27188
|
...e,
|
|
27012
|
-
policyData: this.state.editorDraft ?
|
|
27189
|
+
policyData: this.state.editorDraft ? bL(this.state.editorDraft) : bL(e.policyData)
|
|
27013
27190
|
};
|
|
27014
27191
|
this.config.onPolicyApplied?.(t);
|
|
27015
27192
|
}
|
|
@@ -27020,13 +27197,13 @@ var nL = class {
|
|
|
27020
27197
|
policyType: e,
|
|
27021
27198
|
source: "user",
|
|
27022
27199
|
description: "",
|
|
27023
|
-
policyData:
|
|
27200
|
+
policyData: hL(e)
|
|
27024
27201
|
}, r = [...this.state.catalog, n];
|
|
27025
27202
|
return this.state = {
|
|
27026
27203
|
...this.state,
|
|
27027
27204
|
catalog: r,
|
|
27028
27205
|
selectedId: t,
|
|
27029
|
-
editorDraft:
|
|
27206
|
+
editorDraft: bL(n.policyData),
|
|
27030
27207
|
dirty: !1
|
|
27031
27208
|
}, this.emit(), this.config.onPolicyCreated?.(n), this.config.onSelectionChanged?.(n), t;
|
|
27032
27209
|
}
|
|
@@ -27039,13 +27216,13 @@ var nL = class {
|
|
|
27039
27216
|
policyType: t.policyType,
|
|
27040
27217
|
source: "user",
|
|
27041
27218
|
description: t.description,
|
|
27042
|
-
policyData:
|
|
27219
|
+
policyData: bL(t.policyData)
|
|
27043
27220
|
}, i = [...this.state.catalog, r];
|
|
27044
27221
|
return this.state = {
|
|
27045
27222
|
...this.state,
|
|
27046
27223
|
catalog: i,
|
|
27047
27224
|
selectedId: n,
|
|
27048
|
-
editorDraft:
|
|
27225
|
+
editorDraft: bL(r.policyData),
|
|
27049
27226
|
dirty: !1
|
|
27050
27227
|
}, this.emit(), this.config.onPolicyCreated?.(r), this.config.onSelectionChanged?.(r), n;
|
|
27051
27228
|
}
|
|
@@ -27080,48 +27257,48 @@ var nL = class {
|
|
|
27080
27257
|
};
|
|
27081
27258
|
//#endregion
|
|
27082
27259
|
//#region src/components/policy-catalog/ui/editorShell.ts
|
|
27083
|
-
function
|
|
27260
|
+
function SL(e) {
|
|
27084
27261
|
let t = document.createElement("div");
|
|
27085
|
-
t.className =
|
|
27262
|
+
t.className = hI();
|
|
27086
27263
|
let n = document.createElement("div");
|
|
27087
|
-
n.className =
|
|
27264
|
+
n.className = jI();
|
|
27088
27265
|
let r = document.createElement("div");
|
|
27089
|
-
r.className =
|
|
27266
|
+
r.className = MI();
|
|
27090
27267
|
let i = document.createElement("div");
|
|
27091
|
-
i.className =
|
|
27268
|
+
i.className = NI();
|
|
27092
27269
|
let a = document.createElement("div");
|
|
27093
|
-
a.className =
|
|
27270
|
+
a.className = _I();
|
|
27094
27271
|
let o = document.createElement("span");
|
|
27095
|
-
o.className =
|
|
27272
|
+
o.className = AI();
|
|
27096
27273
|
let s = document.createElement("span");
|
|
27097
|
-
s.className =
|
|
27274
|
+
s.className = AI(), s.textContent = "read-only", s.style.display = "none";
|
|
27098
27275
|
let c = document.createElement("div");
|
|
27099
|
-
c.className =
|
|
27276
|
+
c.className = LI(), c.style.display = "none", c.title = "Unsaved changes", i.appendChild(c), i.appendChild(a), i.appendChild(o), i.appendChild(s);
|
|
27100
27277
|
let l = document.createElement("div");
|
|
27101
|
-
l.className =
|
|
27278
|
+
l.className = PI();
|
|
27102
27279
|
let u = document.createElement("button");
|
|
27103
|
-
u.className =
|
|
27280
|
+
u.className = FI(), u.textContent = "Reset", u.addEventListener("click", () => e.onReset());
|
|
27104
27281
|
let d = document.createElement("button");
|
|
27105
|
-
d.className =
|
|
27282
|
+
d.className = II(), d.textContent = "Save", d.addEventListener("click", () => e.onSave());
|
|
27106
27283
|
let f = document.createElement("button");
|
|
27107
|
-
f.className =
|
|
27284
|
+
f.className = FI(), f.textContent = "Apply", f.addEventListener("click", () => e.onApply());
|
|
27108
27285
|
let p = document.createElement("button");
|
|
27109
|
-
p.className =
|
|
27286
|
+
p.className = FI(), p.textContent = "Duplicate", p.addEventListener("click", () => e.onDuplicate()), l.appendChild(u), l.appendChild(d), l.appendChild(f), l.appendChild(p);
|
|
27110
27287
|
let m = document.createElement("div");
|
|
27111
|
-
m.className =
|
|
27288
|
+
m.className = PI();
|
|
27112
27289
|
let h = document.createElement("button");
|
|
27113
|
-
h.className =
|
|
27290
|
+
h.className = II(), h.textContent = "Use as Template", h.addEventListener("click", () => e.onDuplicate()), m.appendChild(h), r.appendChild(i), r.appendChild(l), r.appendChild(m);
|
|
27114
27291
|
let g = document.createElement("div");
|
|
27115
|
-
g.className =
|
|
27292
|
+
g.className = RI(), n.appendChild(r), n.appendChild(g);
|
|
27116
27293
|
let _ = document.createElement("div");
|
|
27117
|
-
_.className =
|
|
27294
|
+
_.className = zI(), _.textContent = "Select a policy to edit", t.appendChild(n), t.appendChild(_);
|
|
27118
27295
|
function v(e) {
|
|
27119
27296
|
let t = e.selectedId !== null;
|
|
27120
27297
|
if (n.style.display = t ? "flex" : "none", _.style.display = t ? "none" : "flex", !t) return;
|
|
27121
27298
|
let r = e.catalog.find((t) => t.id === e.selectedId);
|
|
27122
27299
|
if (!r) return;
|
|
27123
27300
|
let i = r.source === "builtin";
|
|
27124
|
-
a.textContent = r.name, o.textContent =
|
|
27301
|
+
a.textContent = r.name, o.textContent = mL(r.policyType)?.label ?? r.policyType, s.style.display = i ? "" : "none", l.style.display = i ? "none" : "flex", m.style.display = i ? "flex" : "none", c.style.display = !i && e.dirty ? "block" : "none";
|
|
27125
27302
|
}
|
|
27126
27303
|
return {
|
|
27127
27304
|
element: t,
|
|
@@ -27131,13 +27308,13 @@ function rL(e) {
|
|
|
27131
27308
|
}
|
|
27132
27309
|
//#endregion
|
|
27133
27310
|
//#region src/components/policy-catalog/ui/jsonEditor.ts
|
|
27134
|
-
function
|
|
27311
|
+
function CL(e) {
|
|
27135
27312
|
let t = document.createElement("div");
|
|
27136
|
-
t.className =
|
|
27313
|
+
t.className = BI();
|
|
27137
27314
|
let n = document.createElement("textarea");
|
|
27138
27315
|
n.value = JSON.stringify(e.initialData, null, 2);
|
|
27139
27316
|
let r = document.createElement("div");
|
|
27140
|
-
r.className =
|
|
27317
|
+
r.className = VI(), r.style.display = "none";
|
|
27141
27318
|
let i = { ...e.initialData };
|
|
27142
27319
|
return n.addEventListener("input", () => {
|
|
27143
27320
|
try {
|
|
@@ -27161,10 +27338,10 @@ function iL(e) {
|
|
|
27161
27338
|
}
|
|
27162
27339
|
//#endregion
|
|
27163
27340
|
//#region src/components/policy-catalog/controller/policyCatalogControl.ts
|
|
27164
|
-
var
|
|
27341
|
+
var wL = class {
|
|
27165
27342
|
constructor(e) {
|
|
27166
|
-
this.currentEditor = null, this.container = null, this.store = new
|
|
27167
|
-
let t =
|
|
27343
|
+
this.currentEditor = null, this.container = null, this.store = new xL(e);
|
|
27344
|
+
let t = yL({
|
|
27168
27345
|
onSearchChange: (e) => this.store.setCatalogSearch(e),
|
|
27169
27346
|
onGroupByChange: (e) => this.store.setCatalogGroupBy(e),
|
|
27170
27347
|
onSelectPolicy: (e) => this.handleSelectPolicy(e),
|
|
@@ -27178,7 +27355,7 @@ var aL = class {
|
|
|
27178
27355
|
this.store.deletePolicy(e), this.store.getSelectedItem() || this.destroyCurrentEditor();
|
|
27179
27356
|
}
|
|
27180
27357
|
});
|
|
27181
|
-
this.editorShell =
|
|
27358
|
+
this.editorShell = SL({
|
|
27182
27359
|
onSave: () => this.store.savePolicy(),
|
|
27183
27360
|
onReset: () => {
|
|
27184
27361
|
this.store.resetDraft(), this.syncEditorFromStore();
|
|
@@ -27188,7 +27365,7 @@ var aL = class {
|
|
|
27188
27365
|
let e = this.store.getSelectedItem();
|
|
27189
27366
|
e && (this.store.duplicatePolicy(e.id), this.mountEditorForSelection());
|
|
27190
27367
|
}
|
|
27191
|
-
}), this.layout =
|
|
27368
|
+
}), this.layout = HI({
|
|
27192
27369
|
catalogPanel: t,
|
|
27193
27370
|
editorShell: this.editorShell
|
|
27194
27371
|
}), this.unsubscribe = this.store.subscribe((e) => {
|
|
@@ -27218,7 +27395,7 @@ var aL = class {
|
|
|
27218
27395
|
},
|
|
27219
27396
|
readonly: t
|
|
27220
27397
|
};
|
|
27221
|
-
e.policyType === "scheduling" ? this.currentEditor =
|
|
27398
|
+
e.policyType === "scheduling" ? this.currentEditor = fI.createEditorInstance(n) : e.policyType === "rankingPoints" ? this.currentEditor = gF.createEditorInstance(n) : this.currentEditor = CL(n), this.editorShell.bodyElement.innerHTML = "", this.editorShell.bodyElement.appendChild(this.currentEditor.element);
|
|
27222
27399
|
}
|
|
27223
27400
|
syncEditorFromStore() {
|
|
27224
27401
|
let e = this.store.getState();
|
|
@@ -27230,30 +27407,30 @@ var aL = class {
|
|
|
27230
27407
|
};
|
|
27231
27408
|
//#endregion
|
|
27232
27409
|
//#region src/components/policy-catalog/editors/scheduling/domain/schedulingValidation.ts
|
|
27233
|
-
function
|
|
27410
|
+
function TL(e, t, n, r) {
|
|
27234
27411
|
e !== void 0 && e < 0 && r.push({
|
|
27235
27412
|
severity: "error",
|
|
27236
27413
|
path: t,
|
|
27237
27414
|
message: n
|
|
27238
27415
|
});
|
|
27239
27416
|
}
|
|
27240
|
-
function
|
|
27417
|
+
function EL(e, t) {
|
|
27241
27418
|
if (!e.defaultTimes) return;
|
|
27242
27419
|
let n = e.defaultTimes.averageTimes;
|
|
27243
|
-
if (n) for (let e = 0; e < n.length; e++)
|
|
27420
|
+
if (n) for (let e = 0; e < n.length; e++) TL(n[e].minutes.default, `defaultTimes.averageTimes[${e}].minutes.default`, "Default average time must be non-negative", t), TL(n[e].minutes.DOUBLES, `defaultTimes.averageTimes[${e}].minutes.DOUBLES`, "Doubles average time must be non-negative", t);
|
|
27244
27421
|
let r = e.defaultTimes.recoveryTimes;
|
|
27245
|
-
if (r) for (let e = 0; e < r.length; e++)
|
|
27422
|
+
if (r) for (let e = 0; e < r.length; e++) TL(r[e].minutes.default, `defaultTimes.recoveryTimes[${e}].minutes.default`, "Default recovery time must be non-negative", t);
|
|
27246
27423
|
}
|
|
27247
|
-
function
|
|
27424
|
+
function DL(e, t) {
|
|
27248
27425
|
if (!e.defaultDailyLimits) return;
|
|
27249
27426
|
let n = e.defaultDailyLimits;
|
|
27250
|
-
|
|
27427
|
+
TL(n.SINGLES, "defaultDailyLimits.SINGLES", "Singles daily limit must be non-negative", t), TL(n.DOUBLES, "defaultDailyLimits.DOUBLES", "Doubles daily limit must be non-negative", t), TL(n.total, "defaultDailyLimits.total", "Total daily limit must be non-negative", t);
|
|
27251
27428
|
}
|
|
27252
|
-
function
|
|
27429
|
+
function OL(e) {
|
|
27253
27430
|
let t = [];
|
|
27254
|
-
return
|
|
27431
|
+
return EL(e, t), DL(e, t), e.matchUpAverageTimes && kL(e.matchUpAverageTimes, "matchUpAverageTimes", "averageTimes", t), e.matchUpRecoveryTimes && AL(e.matchUpRecoveryTimes, "matchUpRecoveryTimes", t), jL(e, t), t;
|
|
27255
27432
|
}
|
|
27256
|
-
function
|
|
27433
|
+
function kL(e, t, n, r) {
|
|
27257
27434
|
for (let i = 0; i < e.length; i++) {
|
|
27258
27435
|
let a = e[i];
|
|
27259
27436
|
a.matchUpFormatCodes.length || r.push({
|
|
@@ -27262,10 +27439,10 @@ function uL(e, t, n, r) {
|
|
|
27262
27439
|
message: "At least one format code is required per format group"
|
|
27263
27440
|
});
|
|
27264
27441
|
let o = a[n];
|
|
27265
|
-
if (o) for (let e = 0; e < o.length; e++)
|
|
27442
|
+
if (o) for (let e = 0; e < o.length; e++) TL(o[e].minutes.default, `${t}[${i}].${n}[${e}].minutes.default`, "Time must be non-negative", r), TL(o[e].minutes.DOUBLES, `${t}[${i}].${n}[${e}].minutes.DOUBLES`, "Doubles time must be non-negative", r);
|
|
27266
27443
|
}
|
|
27267
27444
|
}
|
|
27268
|
-
function
|
|
27445
|
+
function AL(e, t, n) {
|
|
27269
27446
|
for (let r = 0; r < e.length; r++) {
|
|
27270
27447
|
let i = e[r];
|
|
27271
27448
|
i.matchUpFormatCodes.length || n.push({
|
|
@@ -27273,10 +27450,10 @@ function dL(e, t, n) {
|
|
|
27273
27450
|
path: `${t}[${r}].matchUpFormatCodes`,
|
|
27274
27451
|
message: "At least one format code is required per format group"
|
|
27275
27452
|
});
|
|
27276
|
-
for (let e = 0; e < i.recoveryTimes.length; e++)
|
|
27453
|
+
for (let e = 0; e < i.recoveryTimes.length; e++) TL(i.recoveryTimes[e].minutes.default, `${t}[${r}].recoveryTimes[${e}].minutes.default`, "Recovery time must be non-negative", n), TL(i.recoveryTimes[e].minutes.DOUBLES, `${t}[${r}].recoveryTimes[${e}].minutes.DOUBLES`, "Doubles recovery time must be non-negative", n);
|
|
27277
27454
|
}
|
|
27278
27455
|
}
|
|
27279
|
-
function
|
|
27456
|
+
function jL(e, t) {
|
|
27280
27457
|
let n = (e, n) => {
|
|
27281
27458
|
if (!e) return;
|
|
27282
27459
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -27290,9 +27467,9 @@ function fL(e, t) {
|
|
|
27290
27467
|
}
|
|
27291
27468
|
//#endregion
|
|
27292
27469
|
//#region src/components/policy-catalog/index.ts
|
|
27293
|
-
function
|
|
27294
|
-
let n = new
|
|
27470
|
+
function ML(e, t) {
|
|
27471
|
+
let n = new wL(e);
|
|
27295
27472
|
return n.render(t), n;
|
|
27296
27473
|
}
|
|
27297
27474
|
//#endregion
|
|
27298
|
-
export {
|
|
27475
|
+
export { TM as CompositionEditorStore, rM as DEFAULT_SCHEDULE_CELL_CONFIG, Eh as DrawStateManager, ps as InlineScoringManager, hh as MATCH_FORMATS, gL as POLICY_TYPE_GROUPS, pL as POLICY_TYPE_METADATA, wL as PolicyCatalogControl, xL as PolicyCatalogStore, UT as ProfileStore, Fj as SchedulePageControl, Pj as SchedulePageStore, fI as SchedulingEditorControl, bF as SchedulingEditorStore, nE as SchedulingProfileControl, iD as TemporalGrid, oA as TopologyBuilderControl, aO as TopologyStore, CM as activateScheduleCellTypeAhead, zT as applyDropCommit, dh as badmintonCourt, FC as barButton, ch as baseballDiamond, sh as basketballCourt, eM as buildActiveStripPanel, Nj as buildCourtGridSlot, eE as buildDateStrip, ek as buildEdgeEditor, SL as buildEditorShell, pT as buildInspectorPanel, eP as buildInteractiveScoringShell, LT as buildIssueIndex, ST as buildIssuesPanel, CL as buildJsonEditor, Tj as buildMatchUpCard, Oj as buildMatchUpCatalog, HO as buildNodeEditor, HI as buildPolicyCatalogLayout, yL as buildPolicyCatalogPanel, YT as buildRoundCard, xT as buildRoundCatalog, Mj as buildScheduleDateStrip, iM as buildScheduleGridCell, yj as buildScheduleInspectorPanel, kj as buildScheduleIssueIndex, jj as buildScheduleIssuesPanel, hj as buildSchedulePageLayout, dI as buildSchedulingEditorPanel, $w as buildSchedulingProfileLayout, Hs as buildSetScore, WD as buildStructureCard, kk as buildToolbar, Ak as buildTopologyBuilderLayout, gO as buildTopologyCanvas, ZT as buildVenueBoard, cC as burstChart, z as cModal, Rs as calculateComplement, yi as compositions, $C as controlBar, mh as courthiveComponentsVersion, eT as createCardPopoverManager, bN as createCompositionEditor, QN as createInlineScoringFooter, ML as createPolicyCatalog, EN as createPrintCompositionEditor, wM as createSchedulePage, pI as createSchedulingEditor, rE as createSchedulingProfile, aD as createTemporalGrid, rh as destroyTipster, xd as drawer, AC as dropDownButton, yF as emptySchedulingPolicy, ds as engineToMatchUp, gT as filterCatalog, Cj as filterMatchUpCatalog, _L as filterPolicyCatalog, lT as findIssuesForLocator, _F as formatCodeLabel, mC as fromFactoryDrawData, _C as fromLegacyDraw, bD as generatePreviewMatchUps, Do as getAgeCategoryModal, Ao as getCategoryModal, ss as getFlightProfileModal, Ui as getGenerateTeamsModal, za as getMatchUpFormatModal, Ls as getMatchWinner, Ns as getMaxAllowedScore, Li as getMockParticipantsModal, vT as getPlannedRoundKeys, mL as getPolicyTypeMeta, GD as getPortPosition, cT as getRoundAt, gs as getScoringConfig, As as getSetFormatForIndex, Fs as getSetWinner, sT as getVenueRounds, _T as groupCatalog, wj as groupMatchUpCatalog, vL as groupPolicyCatalog, lh as hockeyRink, Sd as initDrawer, Sj as isCompletedStatus, Is as isMatchComplete, Ps as isSetComplete, js as isSetTiebreakOnly, Ms as isSetTimed, SM as mapMatchUpToCellData, gj as matchUpLabel, vj as matchUpSearchKey, dT as maxSeverity, Im as notesToolbar, Yi as openCompositionEditorModal, Zi as openScheduleCellConfigModal, fh as padelCourt, _j as participantLabel, uh as pickleballCourt, gh as renderButtons, ui as renderContainer, Tn as renderField, Ei as renderForm, ls as renderInlineMatchUp, oi as renderMatchUp, eh as renderMenu, wn as renderOptions, wr as renderParticipant, Mn as renderParticipantInput, si as renderRound, Er as renderRoundHeader, Ci as renderSchematicMatchUp, wi as renderSchematicRound, Ti as renderSchematicStructure, HN as renderScorecard, ci as renderStructure, UN as renderTeamVsHeader, vs as resetScoringConfig, xi as resolvePublishedComposition, ou as scoringModal, MC as selectItem, _s as setScoringConfig, zs as shouldApplySmartComplement, Vs as shouldCreateNextSet, Bs as shouldShowTiebreak, nD as showCourtAvailabilityModal, Xk as standardTemplates, oh as tennisCourt, ih as tipster, UC as toggleOverlay, CA as topologyToDrawOptions, Rm as updateHeadingSelect, WN as updateTieScore, Lm as updateToolbarState, ET as validateProfile, OL as validateSchedulingPolicy, uk as validateTopology, xn as validator, Th as validators };
|