@wral/hsot-data 0.1.15 → 0.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.
@@ -1,15 +1,15 @@
1
- const K = globalThis, lt = K.ShadowRoot && (K.ShadyCSS === void 0 || K.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ct = /* @__PURE__ */ Symbol(), kt = /* @__PURE__ */ new WeakMap();
2
- let Ot = class {
1
+ const Z = globalThis, dt = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, pt = /* @__PURE__ */ Symbol(), St = /* @__PURE__ */ new WeakMap();
2
+ let Gt = class {
3
3
  constructor(t, e, s) {
4
- if (this._$cssResult$ = !0, s !== ct) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
4
+ if (this._$cssResult$ = !0, s !== pt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
5
  this.cssText = t, this.t = e;
6
6
  }
7
7
  get styleSheet() {
8
8
  let t = this.o;
9
9
  const e = this.t;
10
- if (lt && t === void 0) {
10
+ if (dt && t === void 0) {
11
11
  const s = e !== void 0 && e.length === 1;
12
- s && (t = kt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && kt.set(e, t));
12
+ s && (t = St.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && St.set(e, t));
13
13
  }
14
14
  return t;
15
15
  }
@@ -17,28 +17,28 @@ let Ot = class {
17
17
  return this.cssText;
18
18
  }
19
19
  };
20
- const ne = (a) => new Ot(typeof a == "string" ? a : a + "", void 0, ct), b = (a, ...t) => {
21
- const e = a.length === 1 ? a[0] : t.reduce((s, r, o) => s + ((i) => {
22
- if (i._$cssResult$ === !0) return i.cssText;
23
- if (typeof i == "number") return i;
24
- throw Error("Value passed to 'css' function must be a 'css' function result: " + i + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
20
+ const ue = (a) => new Gt(typeof a == "string" ? a : a + "", void 0, pt), y = (a, ...t) => {
21
+ const e = a.length === 1 ? a[0] : t.reduce((s, r, o) => s + ((n) => {
22
+ if (n._$cssResult$ === !0) return n.cssText;
23
+ if (typeof n == "number") return n;
24
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
25
  })(r) + a[o + 1], a[0]);
26
- return new Ot(e, a, ct);
27
- }, le = (a, t) => {
28
- if (lt) a.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
26
+ return new Gt(e, a, pt);
27
+ }, fe = (a, t) => {
28
+ if (dt) a.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
29
29
  else for (const e of t) {
30
- const s = document.createElement("style"), r = K.litNonce;
30
+ const s = document.createElement("style"), r = Z.litNonce;
31
31
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, a.appendChild(s);
32
32
  }
33
- }, St = lt ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((t) => {
33
+ }, _t = dt ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((t) => {
34
34
  let e = "";
35
35
  for (const s of t.cssRules) e += s.cssText;
36
- return ne(e);
36
+ return ue(e);
37
37
  })(a) : a;
38
- const { is: ce, defineProperty: he, getOwnPropertyDescriptor: de, getOwnPropertyNames: pe, getOwnPropertySymbols: me, getPrototypeOf: ue } = Object, et = globalThis, _t = et.trustedTypes, fe = _t ? _t.emptyScript : "", ge = et.reactiveElementPolyfillSupport, N = (a, t) => a, nt = { toAttribute(a, t) {
38
+ const { is: ge, defineProperty: ve, getOwnPropertyDescriptor: $e, getOwnPropertyNames: be, getOwnPropertySymbols: ye, getPrototypeOf: we } = Object, at = globalThis, At = at.trustedTypes, xe = At ? At.emptyScript : "", ke = at.reactiveElementPolyfillSupport, L = (a, t) => a, ht = { toAttribute(a, t) {
39
39
  switch (t) {
40
40
  case Boolean:
41
- a = a ? fe : null;
41
+ a = a ? xe : null;
42
42
  break;
43
43
  case Object:
44
44
  case Array:
@@ -63,44 +63,44 @@ const { is: ce, defineProperty: he, getOwnPropertyDescriptor: de, getOwnProperty
63
63
  }
64
64
  }
65
65
  return e;
66
- } }, Ut = (a, t) => !ce(a, t), At = { attribute: !0, type: String, converter: nt, reflect: !1, useDefault: !1, hasChanged: Ut };
67
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), et.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
- let C = class extends HTMLElement {
66
+ } }, jt = (a, t) => !ge(a, t), Tt = { attribute: !0, type: String, converter: ht, reflect: !1, useDefault: !1, hasChanged: jt };
67
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), at.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
+ let z = class extends HTMLElement {
69
69
  static addInitializer(t) {
70
70
  this._$Ei(), (this.l ??= []).push(t);
71
71
  }
72
72
  static get observedAttributes() {
73
73
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
74
  }
75
- static createProperty(t, e = At) {
75
+ static createProperty(t, e = Tt) {
76
76
  if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
77
77
  const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, e);
78
- r !== void 0 && he(this.prototype, t, r);
78
+ r !== void 0 && ve(this.prototype, t, r);
79
79
  }
80
80
  }
81
81
  static getPropertyDescriptor(t, e, s) {
82
- const { get: r, set: o } = de(this.prototype, t) ?? { get() {
82
+ const { get: r, set: o } = $e(this.prototype, t) ?? { get() {
83
83
  return this[e];
84
- }, set(i) {
85
- this[e] = i;
84
+ }, set(n) {
85
+ this[e] = n;
86
86
  } };
87
- return { get: r, set(i) {
88
- const n = r?.call(this);
89
- o?.call(this, i), this.requestUpdate(t, n, s);
87
+ return { get: r, set(n) {
88
+ const i = r?.call(this);
89
+ o?.call(this, n), this.requestUpdate(t, i, s);
90
90
  }, configurable: !0, enumerable: !0 };
91
91
  }
92
92
  static getPropertyOptions(t) {
93
- return this.elementProperties.get(t) ?? At;
93
+ return this.elementProperties.get(t) ?? Tt;
94
94
  }
95
95
  static _$Ei() {
96
- if (this.hasOwnProperty(N("elementProperties"))) return;
97
- const t = ue(this);
96
+ if (this.hasOwnProperty(L("elementProperties"))) return;
97
+ const t = we(this);
98
98
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
99
99
  }
100
100
  static finalize() {
101
- if (this.hasOwnProperty(N("finalized"))) return;
102
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
103
- const e = this.properties, s = [...pe(e), ...me(e)];
101
+ if (this.hasOwnProperty(L("finalized"))) return;
102
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(L("properties"))) {
103
+ const e = this.properties, s = [...be(e), ...ye(e)];
104
104
  for (const r of s) this.createProperty(r, e[r]);
105
105
  }
106
106
  const t = this[Symbol.metadata];
@@ -119,8 +119,8 @@ let C = class extends HTMLElement {
119
119
  const e = [];
120
120
  if (Array.isArray(t)) {
121
121
  const s = new Set(t.flat(1 / 0).reverse());
122
- for (const r of s) e.unshift(St(r));
123
- } else t !== void 0 && e.push(St(t));
122
+ for (const r of s) e.unshift(_t(r));
123
+ } else t !== void 0 && e.push(_t(t));
124
124
  return e;
125
125
  }
126
126
  static _$Eu(t, e) {
@@ -146,7 +146,7 @@ let C = class extends HTMLElement {
146
146
  }
147
147
  createRenderRoot() {
148
148
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
149
- return le(t, this.constructor.elementStyles), t;
149
+ return fe(t, this.constructor.elementStyles), t;
150
150
  }
151
151
  connectedCallback() {
152
152
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
@@ -162,29 +162,29 @@ let C = class extends HTMLElement {
162
162
  _$ET(t, e) {
163
163
  const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
164
164
  if (r !== void 0 && s.reflect === !0) {
165
- const o = (s.converter?.toAttribute !== void 0 ? s.converter : nt).toAttribute(e, s.type);
165
+ const o = (s.converter?.toAttribute !== void 0 ? s.converter : ht).toAttribute(e, s.type);
166
166
  this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
167
167
  }
168
168
  }
169
169
  _$AK(t, e) {
170
170
  const s = this.constructor, r = s._$Eh.get(t);
171
171
  if (r !== void 0 && this._$Em !== r) {
172
- const o = s.getPropertyOptions(r), i = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : nt;
172
+ const o = s.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : ht;
173
173
  this._$Em = r;
174
- const n = i.fromAttribute(e, o.type);
175
- this[r] = n ?? this._$Ej?.get(r) ?? n, this._$Em = null;
174
+ const i = n.fromAttribute(e, o.type);
175
+ this[r] = i ?? this._$Ej?.get(r) ?? i, this._$Em = null;
176
176
  }
177
177
  }
178
178
  requestUpdate(t, e, s, r = !1, o) {
179
179
  if (t !== void 0) {
180
- const i = this.constructor;
181
- if (r === !1 && (o = this[t]), s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Ut)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
180
+ const n = this.constructor;
181
+ if (r === !1 && (o = this[t]), s ??= n.getPropertyOptions(t), !((s.hasChanged ?? jt)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, s)))) return;
182
182
  this.C(t, e, s);
183
183
  }
184
184
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
185
185
  }
186
- C(t, e, { useDefault: s, reflect: r, wrapped: o }, i) {
187
- s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, i ?? e ?? this[t]), o !== !0 || i !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
186
+ C(t, e, { useDefault: s, reflect: r, wrapped: o }, n) {
187
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
188
188
  }
189
189
  async _$EP() {
190
190
  this.isUpdatePending = !0;
@@ -208,8 +208,8 @@ let C = class extends HTMLElement {
208
208
  }
209
209
  const s = this.constructor.elementProperties;
210
210
  if (s.size > 0) for (const [r, o] of s) {
211
- const { wrapped: i } = o, n = this[r];
212
- i !== !0 || this._$AL.has(r) || n === void 0 || this.C(r, void 0, o, n);
211
+ const { wrapped: n } = o, i = this[r];
212
+ n !== !0 || this._$AL.has(r) || i === void 0 || this.C(r, void 0, o, i);
213
213
  }
214
214
  }
215
215
  let t = !1;
@@ -246,54 +246,54 @@ let C = class extends HTMLElement {
246
246
  firstUpdated(t) {
247
247
  }
248
248
  };
249
- C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[N("elementProperties")] = /* @__PURE__ */ new Map(), C[N("finalized")] = /* @__PURE__ */ new Map(), ge?.({ ReactiveElement: C }), (et.reactiveElementVersions ??= []).push("2.1.2");
250
- const ht = globalThis, Tt = (a) => a, Q = ht.trustedTypes, It = Q ? Q.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ht = "$lit$", S = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + S, ve = `<${Lt}>`, I = document, F = () => I.createComment(""), M = (a) => a === null || typeof a != "object" && typeof a != "function", dt = Array.isArray, $e = (a) => dt(a) || typeof a?.[Symbol.iterator] == "function", ot = `[
251
- \f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ct = /-->/g, Et = />/g, A = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Pt = /'/g, Dt = /"/g, jt = /^(?:script|style|textarea|title)$/i, qt = (a) => (t, ...e) => ({ _$litType$: a, strings: t, values: e }), l = qt(1), zt = qt(2), D = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Bt = /* @__PURE__ */ new WeakMap(), T = I.createTreeWalker(I, 129);
253
- function Wt(a, t) {
254
- if (!dt(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
- return It !== void 0 ? It.createHTML(t) : t;
256
- }
257
- const be = (a, t) => {
249
+ z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, z[L("elementProperties")] = /* @__PURE__ */ new Map(), z[L("finalized")] = /* @__PURE__ */ new Map(), ke?.({ ReactiveElement: z }), (at.reactiveElementVersions ??= []).push("2.1.2");
250
+ const mt = globalThis, It = (a) => a, J = mt.trustedTypes, Ct = J ? J.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, qt = "$lit$", S = `lit$${Math.random().toFixed(9).slice(2)}$`, Wt = "?" + S, Se = `<${Wt}>`, I = document, G = () => I.createComment(""), j = (a) => a === null || typeof a != "object" && typeof a != "function", ut = Array.isArray, _e = (a) => ut(a) || typeof a?.[Symbol.iterator] == "function", lt = `[
251
+ \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Et = /-->/g, Pt = />/g, A = RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Dt = /'/g, Bt = /"/g, Vt = /^(?:script|style|textarea|title)$/i, Yt = (a) => (t, ...e) => ({ _$litType$: a, strings: t, values: e }), h = Yt(1), zt = Yt(2), M = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Rt = /* @__PURE__ */ new WeakMap(), T = I.createTreeWalker(I, 129);
253
+ function Kt(a, t) {
254
+ if (!ut(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
+ return Ct !== void 0 ? Ct.createHTML(t) : t;
256
+ }
257
+ const Ae = (a, t) => {
258
258
  const e = a.length - 1, s = [];
259
- let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = R;
260
- for (let n = 0; n < e; n++) {
261
- const d = a[n];
262
- let c, h, p = -1, u = 0;
263
- for (; u < d.length && (i.lastIndex = u, h = i.exec(d), h !== null); ) u = i.lastIndex, i === R ? h[1] === "!--" ? i = Ct : h[1] !== void 0 ? i = Et : h[2] !== void 0 ? (jt.test(h[2]) && (r = RegExp("</" + h[2], "g")), i = A) : h[3] !== void 0 && (i = A) : i === A ? h[0] === ">" ? (i = r ?? R, p = -1) : h[1] === void 0 ? p = -2 : (p = i.lastIndex - h[2].length, c = h[1], i = h[3] === void 0 ? A : h[3] === '"' ? Dt : Pt) : i === Dt || i === Pt ? i = A : i === Ct || i === Et ? i = R : (i = A, r = void 0);
264
- const f = i === A && a[n + 1].startsWith("/>") ? " " : "";
265
- o += i === R ? d + ve : p >= 0 ? (s.push(c), d.slice(0, p) + Ht + d.slice(p) + S + f) : d + S + (p === -2 ? n : f);
266
- }
267
- return [Wt(a, o + (a[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
259
+ let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = H;
260
+ for (let i = 0; i < e; i++) {
261
+ const l = a[i];
262
+ let c, d, p = -1, u = 0;
263
+ for (; u < l.length && (n.lastIndex = u, d = n.exec(l), d !== null); ) u = n.lastIndex, n === H ? d[1] === "!--" ? n = Et : d[1] !== void 0 ? n = Pt : d[2] !== void 0 ? (Vt.test(d[2]) && (r = RegExp("</" + d[2], "g")), n = A) : d[3] !== void 0 && (n = A) : n === A ? d[0] === ">" ? (n = r ?? H, p = -1) : d[1] === void 0 ? p = -2 : (p = n.lastIndex - d[2].length, c = d[1], n = d[3] === void 0 ? A : d[3] === '"' ? Bt : Dt) : n === Bt || n === Dt ? n = A : n === Et || n === Pt ? n = H : (n = A, r = void 0);
264
+ const f = n === A && a[i + 1].startsWith("/>") ? " " : "";
265
+ o += n === H ? l + Se : p >= 0 ? (s.push(c), l.slice(0, p) + qt + l.slice(p) + S + f) : l + S + (p === -2 ? i : f);
266
+ }
267
+ return [Kt(a, o + (a[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
268
268
  };
269
- class O {
269
+ class q {
270
270
  constructor({ strings: t, _$litType$: e }, s) {
271
271
  let r;
272
272
  this.parts = [];
273
- let o = 0, i = 0;
274
- const n = t.length - 1, d = this.parts, [c, h] = be(t, e);
275
- if (this.el = O.createElement(c, s), T.currentNode = this.el.content, e === 2 || e === 3) {
273
+ let o = 0, n = 0;
274
+ const i = t.length - 1, l = this.parts, [c, d] = Ae(t, e);
275
+ if (this.el = q.createElement(c, s), T.currentNode = this.el.content, e === 2 || e === 3) {
276
276
  const p = this.el.content.firstChild;
277
277
  p.replaceWith(...p.childNodes);
278
278
  }
279
- for (; (r = T.nextNode()) !== null && d.length < n; ) {
279
+ for (; (r = T.nextNode()) !== null && l.length < i; ) {
280
280
  if (r.nodeType === 1) {
281
- if (r.hasAttributes()) for (const p of r.getAttributeNames()) if (p.endsWith(Ht)) {
282
- const u = h[i++], f = r.getAttribute(p).split(S), v = /([.?@])?(.*)/.exec(u);
283
- d.push({ type: 1, index: o, name: v[2], strings: f, ctor: v[1] === "." ? we : v[1] === "?" ? xe : v[1] === "@" ? ke : st }), r.removeAttribute(p);
284
- } else p.startsWith(S) && (d.push({ type: 6, index: o }), r.removeAttribute(p));
285
- if (jt.test(r.tagName)) {
281
+ if (r.hasAttributes()) for (const p of r.getAttributeNames()) if (p.endsWith(qt)) {
282
+ const u = d[n++], f = r.getAttribute(p).split(S), g = /([.?@])?(.*)/.exec(u);
283
+ l.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ? Ie : g[1] === "?" ? Ce : g[1] === "@" ? Ee : rt }), r.removeAttribute(p);
284
+ } else p.startsWith(S) && (l.push({ type: 6, index: o }), r.removeAttribute(p));
285
+ if (Vt.test(r.tagName)) {
286
286
  const p = r.textContent.split(S), u = p.length - 1;
287
287
  if (u > 0) {
288
- r.textContent = Q ? Q.emptyScript : "";
289
- for (let f = 0; f < u; f++) r.append(p[f], F()), T.nextNode(), d.push({ type: 2, index: ++o });
290
- r.append(p[u], F());
288
+ r.textContent = J ? J.emptyScript : "";
289
+ for (let f = 0; f < u; f++) r.append(p[f], G()), T.nextNode(), l.push({ type: 2, index: ++o });
290
+ r.append(p[u], G());
291
291
  }
292
292
  }
293
- } else if (r.nodeType === 8) if (r.data === Lt) d.push({ type: 2, index: o });
293
+ } else if (r.nodeType === 8) if (r.data === Wt) l.push({ type: 2, index: o });
294
294
  else {
295
295
  let p = -1;
296
- for (; (p = r.data.indexOf(S, p + 1)) !== -1; ) d.push({ type: 7, index: o }), p += S.length - 1;
296
+ for (; (p = r.data.indexOf(S, p + 1)) !== -1; ) l.push({ type: 7, index: o }), p += S.length - 1;
297
297
  }
298
298
  o++;
299
299
  }
@@ -303,13 +303,13 @@ class O {
303
303
  return s.innerHTML = t, s;
304
304
  }
305
305
  }
306
- function z(a, t, e = a, s) {
307
- if (t === D) return t;
306
+ function F(a, t, e = a, s) {
307
+ if (t === M) return t;
308
308
  let r = s !== void 0 ? e._$Co?.[s] : e._$Cl;
309
- const o = M(t) ? void 0 : t._$litDirective$;
310
- return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(a), r._$AT(a, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = r : e._$Cl = r), r !== void 0 && (t = z(a, r._$AS(a, t.values), r, s)), t;
309
+ const o = j(t) ? void 0 : t._$litDirective$;
310
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(a), r._$AT(a, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = r : e._$Cl = r), r !== void 0 && (t = F(a, r._$AS(a, t.values), r, s)), t;
311
311
  }
312
- class ye {
312
+ class Te {
313
313
  constructor(t, e) {
314
314
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
315
315
  }
@@ -322,13 +322,13 @@ class ye {
322
322
  u(t) {
323
323
  const { el: { content: e }, parts: s } = this._$AD, r = (t?.creationScope ?? I).importNode(e, !0);
324
324
  T.currentNode = r;
325
- let o = T.nextNode(), i = 0, n = 0, d = s[0];
326
- for (; d !== void 0; ) {
327
- if (i === d.index) {
325
+ let o = T.nextNode(), n = 0, i = 0, l = s[0];
326
+ for (; l !== void 0; ) {
327
+ if (n === l.index) {
328
328
  let c;
329
- d.type === 2 ? c = new L(o, o.nextSibling, this, t) : d.type === 1 ? c = new d.ctor(o, d.name, d.strings, this, t) : d.type === 6 && (c = new Se(o, this, t)), this._$AV.push(c), d = s[++n];
329
+ l.type === 2 ? c = new V(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new Pe(o, this, t)), this._$AV.push(c), l = s[++i];
330
330
  }
331
- i !== d?.index && (o = T.nextNode(), i++);
331
+ n !== l?.index && (o = T.nextNode(), n++);
332
332
  }
333
333
  return T.currentNode = I, r;
334
334
  }
@@ -337,7 +337,7 @@ class ye {
337
337
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
338
338
  }
339
339
  }
340
- class L {
340
+ class V {
341
341
  get _$AU() {
342
342
  return this._$AM?._$AU ?? this._$Cv;
343
343
  }
@@ -356,7 +356,7 @@ class L {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(t, e = this) {
359
- t = z(this, t, e), M(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== D && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : $e(t) ? this.k(t) : this._(t);
359
+ t = F(this, t, e), j(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== M && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : _e(t) ? this.k(t) : this._(t);
360
360
  }
361
361
  O(t) {
362
362
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -365,38 +365,38 @@ class L {
365
365
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
366
366
  }
367
367
  _(t) {
368
- this._$AH !== m && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(I.createTextNode(t)), this._$AH = t;
368
+ this._$AH !== m && j(this._$AH) ? this._$AA.nextSibling.data = t : this.T(I.createTextNode(t)), this._$AH = t;
369
369
  }
370
370
  $(t) {
371
- const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(Wt(s.h, s.h[0]), this.options)), s);
371
+ const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = q.createElement(Kt(s.h, s.h[0]), this.options)), s);
372
372
  if (this._$AH?._$AD === r) this._$AH.p(e);
373
373
  else {
374
- const o = new ye(r, this), i = o.u(this.options);
375
- o.p(e), this.T(i), this._$AH = o;
374
+ const o = new Te(r, this), n = o.u(this.options);
375
+ o.p(e), this.T(n), this._$AH = o;
376
376
  }
377
377
  }
378
378
  _$AC(t) {
379
- let e = Bt.get(t.strings);
380
- return e === void 0 && Bt.set(t.strings, e = new O(t)), e;
379
+ let e = Rt.get(t.strings);
380
+ return e === void 0 && Rt.set(t.strings, e = new q(t)), e;
381
381
  }
382
382
  k(t) {
383
- dt(this._$AH) || (this._$AH = [], this._$AR());
383
+ ut(this._$AH) || (this._$AH = [], this._$AR());
384
384
  const e = this._$AH;
385
385
  let s, r = 0;
386
- for (const o of t) r === e.length ? e.push(s = new L(this.O(F()), this.O(F()), this, this.options)) : s = e[r], s._$AI(o), r++;
386
+ for (const o of t) r === e.length ? e.push(s = new V(this.O(G()), this.O(G()), this, this.options)) : s = e[r], s._$AI(o), r++;
387
387
  r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
388
388
  }
389
389
  _$AR(t = this._$AA.nextSibling, e) {
390
390
  for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
391
- const s = Tt(t).nextSibling;
392
- Tt(t).remove(), t = s;
391
+ const s = It(t).nextSibling;
392
+ It(t).remove(), t = s;
393
393
  }
394
394
  }
395
395
  setConnected(t) {
396
396
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
397
397
  }
398
398
  }
399
- class st {
399
+ class rt {
400
400
  get tagName() {
401
401
  return this.element.tagName;
402
402
  }
@@ -408,20 +408,20 @@ class st {
408
408
  }
409
409
  _$AI(t, e = this, s, r) {
410
410
  const o = this.strings;
411
- let i = !1;
412
- if (o === void 0) t = z(this, t, e, 0), i = !M(t) || t !== this._$AH && t !== D, i && (this._$AH = t);
411
+ let n = !1;
412
+ if (o === void 0) t = F(this, t, e, 0), n = !j(t) || t !== this._$AH && t !== M, n && (this._$AH = t);
413
413
  else {
414
- const n = t;
415
- let d, c;
416
- for (t = o[0], d = 0; d < o.length - 1; d++) c = z(this, n[s + d], e, d), c === D && (c = this._$AH[d]), i ||= !M(c) || c !== this._$AH[d], c === m ? t = m : t !== m && (t += (c ?? "") + o[d + 1]), this._$AH[d] = c;
414
+ const i = t;
415
+ let l, c;
416
+ for (t = o[0], l = 0; l < o.length - 1; l++) c = F(this, i[s + l], e, l), c === M && (c = this._$AH[l]), n ||= !j(c) || c !== this._$AH[l], c === m ? t = m : t !== m && (t += (c ?? "") + o[l + 1]), this._$AH[l] = c;
417
417
  }
418
- i && !r && this.j(t);
418
+ n && !r && this.j(t);
419
419
  }
420
420
  j(t) {
421
421
  t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
422
422
  }
423
423
  }
424
- class we extends st {
424
+ class Ie extends rt {
425
425
  constructor() {
426
426
  super(...arguments), this.type = 3;
427
427
  }
@@ -429,7 +429,7 @@ class we extends st {
429
429
  this.element[this.name] = t === m ? void 0 : t;
430
430
  }
431
431
  }
432
- class xe extends st {
432
+ class Ce extends rt {
433
433
  constructor() {
434
434
  super(...arguments), this.type = 4;
435
435
  }
@@ -437,12 +437,12 @@ class xe extends st {
437
437
  this.element.toggleAttribute(this.name, !!t && t !== m);
438
438
  }
439
439
  }
440
- class ke extends st {
440
+ class Ee extends rt {
441
441
  constructor(t, e, s, r, o) {
442
442
  super(t, e, s, r, o), this.type = 5;
443
443
  }
444
444
  _$AI(t, e = this) {
445
- if ((t = z(this, t, e, 0) ?? m) === D) return;
445
+ if ((t = F(this, t, e, 0) ?? m) === M) return;
446
446
  const s = this._$AH, r = t === m && s !== m || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== m && (s === m || r);
447
447
  r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
448
448
  }
@@ -450,7 +450,7 @@ class ke extends st {
450
450
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
451
451
  }
452
452
  }
453
- class Se {
453
+ class Pe {
454
454
  constructor(t, e, s) {
455
455
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
456
456
  }
@@ -458,22 +458,22 @@ class Se {
458
458
  return this._$AM._$AU;
459
459
  }
460
460
  _$AI(t) {
461
- z(this, t);
461
+ F(this, t);
462
462
  }
463
463
  }
464
- const _e = ht.litHtmlPolyfillSupport;
465
- _e?.(O, L), (ht.litHtmlVersions ??= []).push("3.3.3");
466
- const Ae = (a, t, e) => {
464
+ const De = mt.litHtmlPolyfillSupport;
465
+ De?.(q, V), (mt.litHtmlVersions ??= []).push("3.3.3");
466
+ const Be = (a, t, e) => {
467
467
  const s = e?.renderBefore ?? t;
468
468
  let r = s._$litPart$;
469
469
  if (r === void 0) {
470
470
  const o = e?.renderBefore ?? null;
471
- s._$litPart$ = r = new L(t.insertBefore(F(), o), o, void 0, e ?? {});
471
+ s._$litPart$ = r = new V(t.insertBefore(G(), o), o, void 0, e ?? {});
472
472
  }
473
473
  return r._$AI(a), r;
474
474
  };
475
- const pt = globalThis;
476
- class P extends C {
475
+ const ft = globalThis;
476
+ class N extends z {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
479
  }
@@ -483,7 +483,7 @@ class P extends C {
483
483
  }
484
484
  update(t) {
485
485
  const e = this.render();
486
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ae(e, this.renderRoot, this.renderOptions);
486
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Be(e, this.renderRoot, this.renderOptions);
487
487
  }
488
488
  connectedCallback() {
489
489
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -492,130 +492,131 @@ class P extends C {
492
492
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
493
493
  }
494
494
  render() {
495
- return D;
495
+ return M;
496
496
  }
497
497
  }
498
- P._$litElement$ = !0, P.finalized = !0, pt.litElementHydrateSupport?.({ LitElement: P });
499
- const Te = pt.litElementPolyfillSupport;
500
- Te?.({ LitElement: P });
501
- (pt.litElementVersions ??= []).push("4.2.2");
502
- const Ie = 50;
503
- function Ce(a = {}) {
498
+ N._$litElement$ = !0, N.finalized = !0, ft.litElementHydrateSupport?.({ LitElement: N });
499
+ const ze = ft.litElementPolyfillSupport;
500
+ ze?.({ LitElement: N });
501
+ (ft.litElementVersions ??= []).push("4.2.2");
502
+ const Re = 50;
503
+ function Ne(a = {}) {
504
504
  const t = Object.entries(a).filter(([, s]) => s != null && s !== "");
505
505
  if (!t.length) return "";
506
506
  const e = new URLSearchParams();
507
507
  return t.forEach(([s, r]) => e.set(s, String(r))), `?${e.toString()}`;
508
508
  }
509
- function Ee({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
509
+ function Me({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
510
510
  if (!a) throw new Error("createClient requires a baseUrl");
511
- const s = a.replace(/\/+$/, ""), r = e || ((...n) => fetch(...n));
512
- async function o(n) {
513
- const d = { Accept: "application/json" };
514
- t && (d.Authorization = `Bearer ${t}`);
515
- const c = await r(`${s}${n}`, { headers: d });
511
+ const s = a.replace(/\/+$/, ""), r = e || ((...i) => fetch(...i));
512
+ async function o(i) {
513
+ const l = { Accept: "application/json" };
514
+ t && (l.Authorization = `Bearer ${t}`);
515
+ const c = await r(`${s}${i}`, { headers: l });
516
516
  if (!c.ok) {
517
- const h = new Error(`api-hsot ${c.status} on ${n}`);
518
- throw h.status = c.status, h;
517
+ const d = new Error(`api-hsot ${c.status} on ${i}`);
518
+ throw d.status = c.status, d;
519
519
  }
520
520
  return c.json();
521
521
  }
522
- async function i(n, d = {}) {
522
+ async function n(i, l = {}) {
523
523
  const c = [];
524
- let h = null;
525
- for (let p = 0; p < Ie; p += 1) {
526
- const u = Ce(h ? { ...d, cursor: h } : d), f = await o(`${n}${u}`);
527
- if (c.push(...f.items || []), h = f.nextCursor || null, !h) break;
524
+ let d = null;
525
+ for (let p = 0; p < Re; p += 1) {
526
+ const u = Ne(d ? { ...l, cursor: d } : l), f = await o(`${i}${u}`);
527
+ if (c.push(...f.items || []), d = f.nextCursor || null, !d) break;
528
528
  }
529
529
  return { items: c, total: c.length, nextCursor: null };
530
530
  }
531
531
  return {
532
- listSchools: (n) => i("/schools", n),
533
- getSchool: (n) => o(`/schools/${n}`),
534
- listTeams: (n) => i("/teams", n),
535
- getTeam: (n) => o(`/teams/${n}`),
536
- listConferences: (n) => i("/conferences", n),
537
- listPlayers: (n) => i("/players", n),
538
- listRosters: (n) => i("/rosters", n),
539
- listGames: (n) => i("/games", n),
540
- getGame: (n) => o(`/games/${n}`),
541
- listTournaments: (n) => i("/tournaments", n),
542
- listSeedings: (n, d) => i(`/tournaments/${n}/seedings`, d),
543
- listRankings: (n) => i("/rankings", n),
532
+ listSchools: (i) => n("/schools", i),
533
+ getSchool: (i) => o(`/schools/${i}`),
534
+ listTeams: (i) => n("/teams", i),
535
+ getTeam: (i) => o(`/teams/${i}`),
536
+ listConferences: (i) => n("/conferences", i),
537
+ listPlayers: (i) => n("/players", i),
538
+ listRosters: (i) => n("/rosters", i),
539
+ listGames: (i) => n("/games", i),
540
+ getGame: (i) => o(`/games/${i}`),
541
+ listTournaments: (i) => n("/tournaments", i),
542
+ listSeedings: (i, l) => n(`/tournaments/${i}/seedings`, l),
543
+ listEdges: (i, l) => n(`/tournaments/${i}/edges`, l),
544
+ listRankings: (i) => n("/rankings", i),
544
545
  listSports: () => o("/sports")
545
546
  };
546
547
  }
547
- const it = {
548
+ const ct = {
548
549
  game: "/{sport}/game/{id}/",
549
550
  school: "/school/{id}/",
550
551
  section: "/{sport}/{view}/"
551
552
  };
552
- function g(a, t) {
553
+ function v(a, t) {
553
554
  return String(a).replace(/\{(\w+)\}/g, (e, s) => t[s] !== void 0 && t[s] !== null ? String(t[s]) : e);
554
555
  }
555
- function j(a) {
556
+ function O(a) {
556
557
  return {
557
- game: a.getAttribute("game-href") || it.game,
558
- school: a.getAttribute("school-href") || it.school,
559
- section: a.getAttribute("section-href") || it.section
558
+ game: a.getAttribute("game-href") || ct.game,
559
+ school: a.getAttribute("school-href") || ct.school,
560
+ section: a.getAttribute("section-href") || ct.section
560
561
  };
561
562
  }
562
563
  const B = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
563
- function y(a, t) {
564
+ function w(a, t) {
564
565
  if (!a) return "TBD";
565
566
  const [e, s, r] = String(a).split("-").map(Number);
566
567
  return !e || !s || !r ? "TBD" : new Date(e, s - 1, r).toLocaleDateString("en-US", t || { weekday: "short", month: "short", day: "numeric" });
567
568
  }
568
- function mt(a) {
569
+ function gt(a) {
569
570
  if (!a) return "";
570
571
  const [t, e] = String(a).split(":").map(Number);
571
572
  if (Number.isNaN(t)) return "";
572
573
  const s = t >= 12 ? "PM" : "AM";
573
574
  return `${(t + 11) % 12 + 1}:${String(e || 0).padStart(2, "0")} ${s}`;
574
575
  }
575
- function Pe(a) {
576
+ function Fe(a) {
576
577
  return a ? `${Math.floor(a / 12)}-${a % 12}` : "·";
577
578
  }
578
- function De(a) {
579
+ function Oe(a) {
579
580
  return (Array.isArray(a?.positions) ? a.positions : String(a?.position ?? "").split(/[/,]/)).map((e) => String(e ?? "").trim()).filter(Boolean).join("/");
580
581
  }
581
- function at(a = /* @__PURE__ */ new Date()) {
582
+ function Y(a = /* @__PURE__ */ new Date()) {
582
583
  const t = a.getFullYear();
583
584
  return a.getMonth() >= 6 ? `${t}-${t + 1}` : `${t - 1}-${t}`;
584
585
  }
585
- function ut(a = /* @__PURE__ */ new Date()) {
586
+ function vt(a = /* @__PURE__ */ new Date()) {
586
587
  const t = (e) => String(e).padStart(2, "0");
587
588
  return `${a.getFullYear()}-${t(a.getMonth() + 1)}-${t(a.getDate())}`;
588
589
  }
589
- function ze(a, t = ut()) {
590
+ function Ue(a, t = vt()) {
590
591
  const e = [...new Set((a || []).filter(Boolean))].sort();
591
592
  if (!e.length || e.includes(t)) return t;
592
593
  const s = e.filter((r) => r < t);
593
594
  return s.length ? s[s.length - 1] : e[0];
594
595
  }
595
- function ft(a) {
596
+ function $t(a) {
596
597
  return a ? (a.abbr || a.name || "?").slice(0, 4).toUpperCase() : "?";
597
598
  }
598
- function Z(a) {
599
+ function X(a) {
599
600
  if (!a || !/^#[0-9a-fA-F]{6}$/.test(a)) return "#FFFFFF";
600
601
  const t = parseInt(a.slice(1), 16), e = t >> 16 & 255, s = t >> 8 & 255, r = t & 255;
601
602
  return 0.299 * e + 0.587 * s + 0.114 * r > 150 ? "#0F1B33" : "#FFFFFF";
602
603
  }
603
- const Be = (a) => {
604
+ const He = (a) => {
604
605
  const t = ["th", "st", "nd", "rd"], e = a % 100;
605
606
  return a + (t[(e - 20) % 10] || t[e] || t[0]);
606
607
  };
607
- function Rt(a, t) {
608
+ function Nt(a, t) {
608
609
  const e = (o) => {
609
- const i = /^\d+/.exec(String(o ?? ""));
610
- return i ? Number(i[0]) : null;
610
+ const n = /^\d+/.exec(String(o ?? ""));
611
+ return n ? Number(n[0]) : null;
611
612
  }, s = e(a), r = e(t);
612
613
  return s !== null && r !== null && s !== r ? r - s : s !== null && r === null ? -1 : s === null && r !== null ? 1 : String(a ?? "").localeCompare(String(t ?? ""), "en", { sensitivity: "base" });
613
614
  }
614
- function Re(a, t) {
615
+ function Le(a, t) {
615
616
  const e = (s) => String(s?.name ?? s ?? "");
616
617
  return e(a).localeCompare(e(t), "en", { numeric: !0, sensitivity: "base" });
617
618
  }
618
- function Gt(a) {
619
+ function Qt(a) {
619
620
  if (a.state === "live") {
620
621
  const t = [a.period, a.clock].filter(Boolean).join(" ");
621
622
  return { kind: "live", label: t ? `Live · ${t}` : "Live" };
@@ -624,9 +625,9 @@ function Gt(a) {
624
625
  const t = [];
625
626
  return a.finish === "overtime" && t.push("OT"), a.finish === "shootout" && t.push("PK-SO"), a.forfeit && a.forfeit !== "none" && t.push("Forfeit"), { kind: "final", label: `Final${t.length ? ` · ${t.join(" · ")}` : ""}` };
626
627
  }
627
- return a.state === "postponed" ? { kind: "warn", label: "Postponed" } : a.state === "canceled" ? { kind: "warn", label: "Canceled" } : { kind: "sched", label: `${y(a.date, { month: "short", day: "numeric" })} · ${mt(a.time)}`.replace(/ · $/, "") };
628
+ return a.state === "postponed" ? { kind: "warn", label: "Postponed" } : a.state === "canceled" ? { kind: "warn", label: "Canceled" } : { kind: "sched", label: `${w(a.date, { month: "short", day: "numeric" })} · ${gt(a.time)}`.replace(/ · $/, "") };
628
629
  }
629
- const Ne = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
630
+ const Ge = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
630
631
  function _(a) {
631
632
  let t = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
632
633
  const e = t.indexOf("#");
@@ -635,26 +636,26 @@ function _(a) {
635
636
  let r = t.split("?")[0] + s;
636
637
  return r = r.replace(/([^:])\/{2,}/g, "$1/").replace(/^\/{2,}/, "/"), r = r.replace(/^\/(?=#)/, ""), r.length > 1 && (r = r.replace(/\/+$/, "")), r.toLowerCase();
637
638
  }
638
- function Vt() {
639
+ function Zt() {
639
640
  const a = globalThis.location;
640
641
  if (!a) return "";
641
642
  const t = (a.hash || "").startsWith("#/") ? a.hash : "";
642
643
  return _((a.pathname || "") + t);
643
644
  }
644
- function Fe(a, t, e) {
645
+ function je(a, t, e) {
645
646
  if (!e) return null;
646
647
  const s = _(a);
647
648
  if (!s) return null;
648
- const r = _(g(t.game, { sport: e, id: "" })), o = _(g(t.school, { id: "" }));
649
+ const r = _(v(t.game, { sport: e, id: "" })), o = _(v(t.school, { id: "" }));
649
650
  if (s === r || s.startsWith(`${r}/`) || s === o || s.startsWith(`${o}/`)) return null;
650
- const i = _(g(t.section, { sport: e, view: "" }));
651
- if (s === i) return "";
652
- if (!s.startsWith(`${i}/`)) return null;
653
- const n = s.slice(i.length + 1), d = n.split("/");
654
- return d.length > 2 || d.some((c) => !/^[a-z][a-z-]*$/.test(c)) || Ne.has(d[0]) ? null : n;
655
- }
656
- function Me(a, t, e) {
657
- const s = (i) => g(e.section, { sport: a, view: i }).replace(/([^:])\/{2,}/g, "$1/"), o = new Set((t || []).map((i) => i && i.gender).filter((i) => i === "boys" || i === "girls")).size === 2 ? [
651
+ const n = _(v(t.section, { sport: e, view: "" }));
652
+ if (s === n) return "";
653
+ if (!s.startsWith(`${n}/`)) return null;
654
+ const i = s.slice(n.length + 1), l = i.split("/");
655
+ return l.length > 2 || l.some((c) => !/^[a-z][a-z-]*$/.test(c)) || Ge.has(l[0]) ? null : i;
656
+ }
657
+ function qe(a, t, e) {
658
+ const s = (n) => v(e.section, { sport: a, view: n }).replace(/([^:])\/{2,}/g, "$1/"), o = new Set((t || []).map((n) => n && n.gender).filter((n) => n === "boys" || n === "girls")).size === 2 ? [
658
659
  { label: "Boys Standings", href: s("boys/standings") },
659
660
  { label: "Girls Standings", href: s("girls/standings") }
660
661
  ] : [{ label: "Standings", href: s("standings") }];
@@ -666,12 +667,12 @@ function Me(a, t, e) {
666
667
  { label: "Polls & Rankings", href: s("rankings") }
667
668
  ];
668
669
  }
669
- function Oe(a, t = Vt()) {
670
+ function We(a, t = Zt()) {
670
671
  const e = _(t);
671
672
  for (const s of a.querySelectorAll(':scope > a[slot="nav"]'))
672
673
  e && _(s.getAttribute("href")) === e ? s.setAttribute("aria-current", "page") : s.removeAttribute("aria-current");
673
674
  }
674
- class w extends P {
675
+ class b extends N {
675
676
  static properties = {
676
677
  api: { type: String },
677
678
  refreshInterval: { type: Number, attribute: "refresh-interval" },
@@ -690,7 +691,7 @@ class w extends P {
690
691
  this._client = t, this.isConnected && this.load();
691
692
  }
692
693
  get client() {
693
- return this._client ? this._client : this.api ? Ee({ baseUrl: this.api }) : null;
694
+ return this._client ? this._client : this.api ? Me({ baseUrl: this.api }) : null;
694
695
  }
695
696
  connectedCallback() {
696
697
  super.connectedCallback(), this._setupInterval();
@@ -702,7 +703,7 @@ class w extends P {
702
703
  this.load();
703
704
  }
704
705
  updated(t) {
705
- t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(), Oe(this);
706
+ t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(), We(this);
706
707
  }
707
708
  async load() {
708
709
  const t = this.client;
@@ -731,13 +732,13 @@ class w extends P {
731
732
  this._refreshId && (clearInterval(this._refreshId), this._refreshId = null);
732
733
  }
733
734
  render() {
734
- return this.error === "not-configured" ? l`<div class="error">This component needs an <code>api</code> attribute (the api-hsot public read-surface base URL) or an injected client.</div>` : this.error ? l`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : l`<div class="loading" role="status">Loading…</div>`;
735
+ return this.error === "not-configured" ? h`<div class="error">This component needs an <code>api</code> attribute (the api-hsot public read-surface base URL) or an injected client.</div>` : this.error ? h`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : h`<div class="loading" role="status">Loading…</div>`;
735
736
  }
736
737
  renderView() {
737
- return l``;
738
+ return h``;
738
739
  }
739
740
  }
740
- const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
741
+ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ve = y`
741
742
  :host {
742
743
  --hsot-red: var(--color-red, #D1232A);
743
744
  --hsot-red-deep: var(--color-red-dark, #951C21);
@@ -775,7 +776,7 @@ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
775
776
  outline-offset: 1px;
776
777
  }
777
778
  .mut { color: var(--hsot-gray-5); }
778
- `, He = b`
779
+ `, Ye = y`
779
780
  .band { background: var(--hsot-white); color: var(--hsot-black); }
780
781
  .band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
781
782
  .band h1, .band h2.bandtitle {
@@ -824,7 +825,7 @@ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
824
825
  @media (max-width: 720px) {
825
826
  .band h1, .band h2.bandtitle, .band.section h1, .band.section h2.bandtitle { font-size: 1.8rem; }
826
827
  }
827
- `, Le = b`
828
+ `, Ke = y`
828
829
  .view { max-width: 1366px; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
829
830
  /* Optional right rail (slot="rail" light-DOM children): a divided 300px
830
831
  column on desktop, stacked under the view content on smaller screens. */
@@ -888,7 +889,7 @@ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
888
889
  .error { padding: 1.2rem 1rem; color: var(--hsot-red-deep); font-size: 0.9rem; }
889
890
  .note { font-size: 0.8125rem; color: var(--hsot-gray-5); margin: 0.6rem 0 0; }
890
891
  .loading { padding: 1.2rem; color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
891
- `, je = b`
892
+ `, Qe = y`
892
893
  .pill {
893
894
  display: inline-block; font-family: var(--hsot-heading-font); font-weight: 700;
894
895
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em;
@@ -903,7 +904,7 @@ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
903
904
  .pill.champ { background: var(--hsot-straw); color: #6b5900; }
904
905
  @keyframes hsot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
905
906
  @media (prefers-reduced-motion: reduce) { .pill.live { animation: none; } }
906
- `, qe = b`
907
+ `, Ze = y`
907
908
  .tablewrap { overflow-x: auto; }
908
909
  table.data { font-family: var(--hsot-heading-font); font-size: 14px; border-collapse: collapse; width: 100%; }
909
910
  table.data th {
@@ -921,7 +922,7 @@ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
921
922
  table.data tbody tr.rowlink:hover { background: var(--hsot-gray-1); }
922
923
  table.data td.teamcell a { color: inherit; text-decoration: none; font-weight: 500; }
923
924
  table.data td.teamcell a:hover { text-decoration: underline; }
924
- `, We = b`
925
+ `, Je = y`
925
926
  .swatch {
926
927
  display: inline-flex; align-items: center; justify-content: center;
927
928
  width: 26px; height: 26px; border-radius: 50%;
@@ -945,7 +946,7 @@ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
945
946
  .dot.W { background: var(--hsot-win); }
946
947
  .dot.L { background: var(--hsot-loss); }
947
948
  .dot.T { background: var(--hsot-tie); }
948
- `, Ge = b`
949
+ `, Xe = y`
949
950
  ul.gamelist { list-style: none; margin: 0; padding: 0; }
950
951
  .gamelist li {
951
952
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem;
@@ -995,36 +996,36 @@ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
995
996
  .gamelist .ff { color: var(--hsot-gray-5); font-size: 0.78rem; font-style: italic; }
996
997
  .gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
997
998
  .gamelist a.box { font-size: 0.78rem; }
998
- `, q = [Ue, He, Le, je, qe, We, Ge];
999
- function gt(a) {
999
+ `, U = [Ve, Ye, Ke, Qe, Ze, Je, Xe];
1000
+ function ot(a) {
1000
1001
  return a.state !== "final" ? null : a.forfeit === "home" ? "away" : a.forfeit === "away" || a.homeScore > a.awayScore ? "home" : a.awayScore > a.homeScore ? "away" : a.tiebreakWinner && a.tiebreakWinner !== "none" ? a.tiebreakWinner : "tie";
1001
1002
  }
1002
- function Ve(a) {
1003
+ function ts(a) {
1003
1004
  return a && (a.forfeit === "home" || a.forfeit === "away") ? a.forfeit : null;
1004
1005
  }
1005
- function W(a, t) {
1006
- const e = {}, s = (o) => (e[o] = e[o] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, e[o]), r = a.filter((o) => o.state === "final" && o.gameType !== "scrimmage" && !0).sort((o, i) => String(o.date).localeCompare(String(i.date)));
1006
+ function K(a, t) {
1007
+ const e = {}, s = (o) => (e[o] = e[o] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, e[o]), r = a.filter((o) => o.state === "final" && o.gameType !== "scrimmage" && !0).sort((o, n) => String(o.date).localeCompare(String(n.date)));
1007
1008
  for (const o of r) {
1008
- const i = gt(o), n = o.gameType === "conference";
1009
- for (const d of ["home", "away"]) {
1010
- const c = d === "home" ? o.homeTeamId : o.awayTeamId;
1009
+ const n = ot(o), i = o.gameType === "conference";
1010
+ for (const l of ["home", "away"]) {
1011
+ const c = l === "home" ? o.homeTeamId : o.awayTeamId;
1011
1012
  if (!c) continue;
1012
- const h = s(c), p = d === "home" ? o.homeScore : o.awayScore, u = d === "home" ? o.awayScore : o.homeScore;
1013
- h.pf += p, h.pa += u;
1013
+ const d = s(c), p = l === "home" ? o.homeScore : o.awayScore, u = l === "home" ? o.awayScore : o.homeScore;
1014
+ d.pf += p, d.pa += u;
1014
1015
  let f = "T";
1015
- i === "tie" ? (h.t += 1, n && (h.ct += 1)) : i === d ? (h.w += 1, n && (h.cw += 1), f = "W") : (h.l += 1, n && (h.cl += 1), f = "L"), h.results.push({ gameId: o.id, date: o.date, mark: f, my: p, their: u, opp: d === "home" ? o.awayTeamId : o.homeTeamId, conf: n });
1016
+ n === "tie" ? (d.t += 1, i && (d.ct += 1)) : n === l ? (d.w += 1, i && (d.cw += 1), f = "W") : (d.l += 1, i && (d.cl += 1), f = "L"), d.results.push({ gameId: o.id, date: o.date, mark: f, my: p, their: u, opp: l === "home" ? o.awayTeamId : o.homeTeamId, conf: i });
1016
1017
  }
1017
1018
  }
1018
1019
  return e;
1019
1020
  }
1020
- function rt(a) {
1021
+ function nt(a) {
1021
1022
  if (!a || !a.length) return "";
1022
1023
  const t = a[a.length - 1].mark;
1023
1024
  let e = 0;
1024
1025
  for (let s = a.length - 1; s >= 0 && a[s].mark === t; s -= 1) e += 1;
1025
1026
  return t + e;
1026
1027
  }
1027
- const Nt = (a, t, e) => {
1028
+ const Mt = (a, t, e) => {
1028
1029
  const s = a + t + e;
1029
1030
  return s ? (a + e / 2) / s : 0;
1030
1031
  }, Ft = (a) => a.toFixed(3).replace("0.", ".");
@@ -1033,36 +1034,36 @@ function k(a, t = !1) {
1033
1034
  const e = t ? a.cw : a.w, s = t ? a.cl : a.l, r = t ? a.ct : a.t;
1034
1035
  return `${e}-${s}${r ? `-${r}` : ""}`;
1035
1036
  }
1036
- function Yt(a, t) {
1037
+ function Jt(a, t) {
1037
1038
  return a.map((e) => {
1038
1039
  const s = t[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] };
1039
- return { team: e, rec: s, confPct: Nt(s.cw, s.cl, s.ct), overallPct: Nt(s.w, s.l, s.t) };
1040
+ return { team: e, rec: s, confPct: Mt(s.cw, s.cl, s.ct), overallPct: Mt(s.w, s.l, s.t) };
1040
1041
  }).sort((e, s) => s.confPct - e.confPct || s.overallPct - e.overallPct || s.rec.pf - s.rec.pa - (e.rec.pf - e.rec.pa));
1041
1042
  }
1042
- function vt(a, t) {
1043
+ function bt(a, t) {
1043
1044
  return a.filter((e) => (e.homeTeamId === t || e.awayTeamId === t) && (e.state === "scheduled" || e.state === "live") && e.gameType !== "scrimmage").sort((e, s) => String(e.date).localeCompare(String(s.date)))[0] || null;
1044
1045
  }
1045
- function Mt(a, t) {
1046
+ function Ot(a, t) {
1046
1047
  const e = a[t];
1047
1048
  return e && e.results.length ? e.results[e.results.length - 1] : null;
1048
1049
  }
1049
- function $t(a, t, e, s, r) {
1050
+ function yt(a, t, e, s, r) {
1050
1051
  const o = t[e];
1051
1052
  if (!o) return null;
1052
- const i = /* @__PURE__ */ new Map();
1053
- for (const d of a || []) {
1054
- if (d.sport !== s || r && d.effectiveDate > r || d.gender && o.gender !== d.gender && o.gender !== "coed") continue;
1055
- const c = d.gender || "", h = i.get(c);
1056
- (!h || d.effectiveDate > h.effectiveDate) && i.set(c, d);
1053
+ const n = /* @__PURE__ */ new Map();
1054
+ for (const l of a || []) {
1055
+ if (l.sport !== s || r && l.effectiveDate > r || l.gender && o.gender !== l.gender && o.gender !== "coed") continue;
1056
+ const c = l.gender || "", d = n.get(c);
1057
+ (!d || l.effectiveDate > d.effectiveDate) && n.set(c, l);
1057
1058
  }
1058
- let n = null;
1059
- for (const d of i.values()) {
1060
- const c = (d.teamIds || []).indexOf(e);
1061
- c !== -1 && (!n || d.effectiveDate > n.effectiveDate) && (n = { poll: d, rank: c + 1 });
1059
+ let i = null;
1060
+ for (const l of n.values()) {
1061
+ const c = (l.teamIds || []).indexOf(e);
1062
+ c !== -1 && (!i || l.effectiveDate > i.effectiveDate) && (i = { poll: l, rank: c + 1 });
1062
1063
  }
1063
- return n ? n.rank : null;
1064
+ return i ? i.rank : null;
1064
1065
  }
1065
- function Ye(a, t, e) {
1066
+ function es(a, t, e) {
1066
1067
  if (!a) return { kind: "none", delta: 0 };
1067
1068
  const s = (a.teamIds || []).indexOf(e) + 1;
1068
1069
  if (!s) return { kind: "none", delta: 0 };
@@ -1072,100 +1073,100 @@ function Ye(a, t, e) {
1072
1073
  const o = r - s;
1073
1074
  return o > 0 ? { kind: "up", delta: o } : o < 0 ? { kind: "down", delta: -o } : { kind: "same", delta: 0 };
1074
1075
  }
1075
- function Ke(a) {
1076
+ function ss(a) {
1076
1077
  return /^https?:\/\//i.test(String(a || ""));
1077
1078
  }
1078
- function Kt(a, { w: t, h: e } = {}) {
1079
- if (!Ke(a)) return "";
1079
+ function Xt(a, { w: t, h: e } = {}) {
1080
+ if (!ss(a)) return "";
1080
1081
  const s = [];
1081
1082
  t && s.push(`w=${Math.max(1, Math.round(t))}`), e && s.push(`h=${Math.max(1, Math.round(e))}`), s.push("f=webp");
1082
1083
  const r = a.includes("?") ? "&" : "?";
1083
1084
  return `${a}${r}${s.join("&")}`;
1084
1085
  }
1085
- function J(a, t) {
1086
+ function tt(a, t) {
1086
1087
  const e = t * 2;
1087
- return Kt(a?.logoAssetId, { w: e, h: e });
1088
+ return Xt(a?.logoAssetId, { w: e, h: e });
1088
1089
  }
1089
- function Qe(a, t) {
1090
- return Kt(a?.photoAssetId, { w: t * 2 });
1090
+ function as(a, t) {
1091
+ return Xt(a?.photoAssetId, { w: t * 2 });
1091
1092
  }
1092
- function bt(a, t, { title: e, sub: s, teams: r }) {
1093
- const o = Vt(), n = !!a.querySelector(':scope > a[slot="nav"]') || Fe(o, t.hrefs, t.sport) !== null;
1094
- return l`
1093
+ function it(a, t, { title: e, sub: s, teams: r }) {
1094
+ const o = Zt(), i = !!a.querySelector(':scope > a[slot="nav"]') || je(o, t.hrefs, t.sport) !== null;
1095
+ return h`
1095
1096
  <div class="band section">
1096
1097
  <div class="inner">
1097
1098
  <h1>${e}</h1>
1098
- ${s ? l`<p class="sub">${s}</p>` : m}
1099
+ ${s ? h`<p class="sub">${s}</p>` : m}
1099
1100
  </div>
1100
- ${n ? l`
1101
+ ${i ? h`
1101
1102
  <nav class="sectionnav" aria-label="${B(t.sport)} section">
1102
1103
  <div class="navrow">
1103
1104
  <slot name="nav">
1104
- ${Me(t.sport, r, t.hrefs).map((d) => l`<a href=${d.href}
1105
- aria-current=${o && _(d.href) === o ? "page" : m}>${d.label}</a>`)}
1105
+ ${qe(t.sport, r, t.hrefs).map((l) => h`<a href=${l.href}
1106
+ aria-current=${o && _(l.href) === o ? "page" : m}>${l.label}</a>`)}
1106
1107
  </slot>
1107
1108
  </div>
1108
1109
  </nav>` : m}
1109
1110
  </div>
1110
1111
  `;
1111
1112
  }
1112
- const U = (a, t) => {
1113
+ const C = (a, t) => {
1113
1114
  const e = a.teamsById[t];
1114
1115
  return e ? a.schoolsById[e.schoolId] : null;
1115
- }, E = (a, t) => U(a, t)?.name || "TBD", X = (a, t) => U(a, t)?.abbr || "TBD";
1116
- function H(a, t = 26) {
1116
+ }, R = (a, t) => C(a, t)?.name || "TBD", et = (a, t) => C(a, t)?.abbr || "TBD";
1117
+ function E(a, t = 26) {
1117
1118
  if (!a) return m;
1118
- const e = J(a, t);
1119
+ const e = tt(a, t);
1119
1120
  if (e)
1120
- return l`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
1121
+ return h`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
1121
1122
  src=${e} style="width:${t}px;height:${t}px" />`;
1122
- const s = a.colorPrimary || "#030711", r = Z(s);
1123
- return l`<span class="swatch" aria-hidden="true"
1123
+ const s = a.colorPrimary || "#030711", r = X(s);
1124
+ return h`<span class="swatch" aria-hidden="true"
1124
1125
  style="width:${t}px;height:${t}px;background:${s};color:${r};font-size:${Math.max(8, t * 0.28)}px"
1125
- >${ft(a)}</span>`;
1126
+ >${$t(a)}</span>`;
1126
1127
  }
1127
- function yt(a, t, e) {
1128
- const s = $t(a.rankings, a.teamsById, t, a.sport, e);
1129
- return s ? l`<span class="rankbadge">#${s}</span>` : m;
1128
+ function wt(a, t, e) {
1129
+ const s = yt(a.rankings, a.teamsById, t, a.sport, e);
1130
+ return s ? h`<span class="rankbadge">#${s}</span>` : m;
1130
1131
  }
1131
- function Qt(a, t, e) {
1132
- const s = U(a, t);
1133
- return s ? l`${yt(a, t, e)}<a href=${g(a.hrefs.school, { id: s.id })}>${s.name}</a>` : l`<span class="mut">TBD</span>`;
1132
+ function st(a, t, e) {
1133
+ const s = C(a, t);
1134
+ return s ? h`${wt(a, t, e)}<a href=${v(a.hrefs.school, { id: s.id })}>${s.name}</a>` : h`<span class="mut">TBD</span>`;
1134
1135
  }
1135
- function wt(a, t, e = 5) {
1136
+ function xt(a, t, e = 5) {
1136
1137
  const s = a.records[t];
1137
- if (!s || !s.results.length) return l`<span class="mut">·</span>`;
1138
+ if (!s || !s.results.length) return h`<span class="mut">·</span>`;
1138
1139
  const r = s.results.slice(-1 * e);
1139
- return l`<span class="dots" role="img" aria-label="last ${r.length} results">
1140
- ${r.map((o) => l`<a class="dot ${o.mark}"
1141
- title="${o.mark} ${o.my}-${o.their} vs ${E(a, o.opp)}"
1142
- href=${g(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
1140
+ return h`<span class="dots" role="img" aria-label="last ${r.length} results">
1141
+ ${r.map((o) => h`<a class="dot ${o.mark}"
1142
+ title="${o.mark} ${o.my}-${o.their} vs ${R(a, o.opp)}"
1143
+ href=${v(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
1143
1144
  </span>`;
1144
1145
  }
1145
- function G(a, t) {
1146
- return a.querySelector(':scope > [slot="rail"]') ? l`<div class="view withrail">
1146
+ function P(a, t) {
1147
+ return a.querySelector(':scope > [slot="rail"]') ? h`<div class="view withrail">
1147
1148
  <div class="viewmain">${t}</div>
1148
1149
  <aside class="viewrail"><slot name="rail"></slot></aside>
1149
- </div>` : l`<div class="view">${t}</div>`;
1150
+ </div>` : h`<div class="view">${t}</div>`;
1150
1151
  }
1151
- function V(a) {
1152
+ function D(a) {
1152
1153
  if (!a.promoImage) return m;
1153
- const t = l`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
1154
- return l`<div class="promo">${a.promoHref ? l`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${t}</a>` : t}</div>`;
1154
+ const t = h`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
1155
+ return h`<div class="promo">${a.promoHref ? h`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${t}</a>` : t}</div>`;
1155
1156
  }
1156
- function tt(a) {
1157
- const t = Gt(a);
1158
- return l`<span class="pill ${t.kind}">${t.label}</span>`;
1157
+ function W(a) {
1158
+ const t = Qt(a);
1159
+ return h`<span class="pill ${t.kind}">${t.label}</span>`;
1159
1160
  }
1160
- function Zt(a, t, e) {
1161
- if (!t) return l`<span class="mut">·</span>`;
1161
+ function te(a, t, e) {
1162
+ if (!t) return h`<span class="mut">·</span>`;
1162
1163
  const s = t.homeTeamId === e ? t.awayTeamId : t.homeTeamId, r = t.homeTeamId === e ? "vs" : "at";
1163
- return l`${t.state === "live" ? l`<span class="pill live">Live</span> ` : l`${y(t.date, { month: "numeric", day: "numeric" })} `}${r} ${X(a, s)}`;
1164
+ return h`${t.state === "live" ? h`<span class="pill live">Live</span> ` : h`${w(t.date, { month: "numeric", day: "numeric" })} `}${r} ${et(a, s)}`;
1164
1165
  }
1165
- class Jt extends w {
1166
- static styles = q;
1166
+ class ee extends b {
1167
+ static styles = U;
1167
1168
  static properties = {
1168
- ...w.properties,
1169
+ ...b.properties,
1169
1170
  sport: { type: String },
1170
1171
  season: { type: String },
1171
1172
  date: { type: String }
@@ -1181,57 +1182,57 @@ class Jt extends w {
1181
1182
  this._datePinned = !!this.date;
1182
1183
  }
1183
1184
  async fetchData(t) {
1184
- const e = this.season || at(), [s, r, o, i, n] = await Promise.all([
1185
+ const e = this.season || Y(), [s, r, o, n, i] = await Promise.all([
1185
1186
  t.listSchools(),
1186
1187
  t.listTeams({ sport: this.sport }),
1187
1188
  t.listConferences(),
1188
1189
  t.listGames({ sport: this.sport, season: e }),
1189
1190
  t.listRankings({ sport: this.sport })
1190
1191
  ]);
1191
- return this._datePinned || (this.date = ze(i.items.map((d) => d.date)), this._datePinned = !0), {
1192
+ return this._datePinned || (this.date = Ue(n.items.map((l) => l.date)), this._datePinned = !0), {
1192
1193
  season: e,
1193
1194
  schools: s.items,
1194
1195
  teams: r.items,
1195
1196
  conferences: o.items,
1196
- games: i.items,
1197
- rankings: n.items
1197
+ games: n.items,
1198
+ rankings: i.items
1198
1199
  };
1199
1200
  }
1200
1201
  get ctx() {
1201
1202
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1202
1203
  teamsById: $(this.data.teams),
1203
1204
  schoolsById: $(this.data.schools),
1204
- records: W(this.data.games),
1205
+ records: K(this.data.games),
1205
1206
  rankings: this.data.rankings,
1206
- hrefs: j(this),
1207
+ hrefs: O(this),
1207
1208
  sport: this.sport
1208
1209
  }, this._ctxData = this.data), this._ctx;
1209
1210
  }
1210
1211
  renderView() {
1211
1212
  const t = this.ctx, e = $(this.data.conferences), s = [...new Set(this.data.games.map((c) => c.date).filter(Boolean))].sort(), r = Number.MAX_SAFE_INTEGER, o = (c) => {
1212
- const h = [c.awayTeamId, c.homeTeamId].map((p) => $t(t.rankings, t.teamsById, p, this.sport, c.date)).filter(Boolean);
1213
- return h.length ? Math.min(...h) : r;
1214
- }, i = this.data.games.filter((c) => c.date === this.date), n = new Map(i.map((c) => [c, o(c)]));
1215
- i.sort((c, h) => (c.state === "live" ? 0 : 1) - (h.state === "live" ? 0 : 1) || n.get(c) - n.get(h));
1216
- const d = /* @__PURE__ */ new Map();
1217
- return i.forEach((c) => {
1218
- const h = c.gameType === "conference" && c.conferenceId ? e[c.conferenceId]?.name || "Conference" : c.gameType === "playoff" ? "Playoffs" : c.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
1219
- d.has(h) || d.set(h, []), d.get(h).push(c);
1220
- }), l`
1221
- ${bt(this, t, {
1222
- title: l`${B(this.sport)} scores &amp; schedules`,
1223
- sub: l`${y(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${i.length} games`,
1213
+ const d = [c.awayTeamId, c.homeTeamId].map((p) => yt(t.rankings, t.teamsById, p, this.sport, c.date)).filter(Boolean);
1214
+ return d.length ? Math.min(...d) : r;
1215
+ }, n = this.data.games.filter((c) => c.date === this.date), i = new Map(n.map((c) => [c, o(c)]));
1216
+ n.sort((c, d) => (c.state === "live" ? 0 : 1) - (d.state === "live" ? 0 : 1) || i.get(c) - i.get(d));
1217
+ const l = /* @__PURE__ */ new Map();
1218
+ return n.forEach((c) => {
1219
+ const d = c.gameType === "conference" && c.conferenceId ? e[c.conferenceId]?.name || "Conference" : c.gameType === "playoff" ? "Playoffs" : c.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
1220
+ l.has(d) || l.set(d, []), l.get(d).push(c);
1221
+ }), h`
1222
+ ${it(this, t, {
1223
+ title: h`${B(this.sport)} scores &amp; schedules`,
1224
+ sub: h`${w(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${n.length} games`,
1224
1225
  teams: this.data.teams
1225
1226
  })}
1226
- ${G(this, l`
1227
- ${V(this)}
1227
+ ${P(this, h`
1228
+ ${D(this)}
1228
1229
  <div class="toolbar">
1229
1230
  <label class="asof" for="datesel">Date</label>
1230
1231
  <select id="datesel" @change=${(c) => {
1231
1232
  this.date = c.target.value;
1232
1233
  }}>
1233
- ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((c) => l`<option value=${c} ?selected=${c === this.date}>
1234
- ${y(c, { weekday: "short", month: "short", day: "numeric" })}${c === ut() ? " · today" : ""}
1234
+ ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((c) => h`<option value=${c} ?selected=${c === this.date}>
1235
+ ${w(c, { weekday: "short", month: "short", day: "numeric" })}${c === vt() ? " · today" : ""}
1235
1236
  </option>`)}
1236
1237
  </select>
1237
1238
  <button class="chip" ?disabled=${s.indexOf(this.date) <= 0}
@@ -1245,11 +1246,11 @@ class Jt extends w {
1245
1246
  <span class="spacer"></span>
1246
1247
  <span class="asof">Live games first · report a score to see it update here</span>
1247
1248
  </div>
1248
- ${i.length ? m : l`<p class="empty">No ${this.sport} games on this date.</p>`}
1249
- ${[...d.entries()].map(([c, h]) => l`
1249
+ ${n.length ? m : h`<p class="empty">No ${this.sport} games on this date.</p>`}
1250
+ ${[...l.entries()].map(([c, d]) => h`
1250
1251
  <div class="section-title">${c}</div>
1251
1252
  <div class="card"><ul class="gamelist">
1252
- ${h.map((p) => this.renderGame(t, p))}
1253
+ ${d.map((p) => this.renderGame(t, p))}
1253
1254
  </ul></div>
1254
1255
  `)}
1255
1256
  `)}
@@ -1259,24 +1260,24 @@ class Jt extends w {
1259
1260
  // a lone score column on the far right read as detached from the teams).
1260
1261
  // Scheduled games carry their start time on the status pill alone.
1261
1262
  renderGame(t, e) {
1262
- const s = e.state === "final" || e.state === "live", r = (i, n, d = m) => l`<span class="side">${Qt(t, i, e.date)}${s ? l`<span class="score">${n}</span>` : m}${d}</span>`, o = Ve(e);
1263
- return l`
1263
+ const s = e.state === "final" || e.state === "live", r = (n, i, l = m) => h`<span class="side">${st(t, n, e.date)}${s ? h`<span class="score">${i}</span>` : m}${l}</span>`, o = ts(e);
1264
+ return h`
1264
1265
  <li>
1265
- ${tt(e)}
1266
- <span class="opp matchup">${r(e.awayTeamId, e.awayScore, l`<span class="at">at</span>`)}${r(e.homeTeamId, e.homeScore)}</span>
1267
- ${o ? l`<span class="ff">${E(t, o === "home" ? e.homeTeamId : e.awayTeamId)} forfeited</span>` : m}
1266
+ ${W(e)}
1267
+ <span class="opp matchup">${r(e.awayTeamId, e.awayScore, h`<span class="at">at</span>`)}${r(e.homeTeamId, e.homeScore)}</span>
1268
+ ${o ? h`<span class="ff">${R(t, o === "home" ? e.homeTeamId : e.awayTeamId)} forfeited</span>` : m}
1268
1269
  <span class="where">${e.venue || ""}</span>
1269
- ${e.broadcast ? l`<span class="pill class">${e.broadcast}</span>` : m}
1270
- <a class="box" href=${g(t.hrefs.game, { sport: this.sport, id: e.id })}>Box score →</a>
1270
+ ${e.broadcast ? h`<span class="pill class">${e.broadcast}</span>` : m}
1271
+ <a class="box" href=${v(t.hrefs.game, { sport: this.sport, id: e.id })}>Box score →</a>
1271
1272
  </li>
1272
1273
  `;
1273
1274
  }
1274
1275
  }
1275
- globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Jt);
1276
- class Xt extends w {
1277
- static styles = q;
1276
+ globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", ee);
1277
+ class se extends b {
1278
+ static styles = U;
1278
1279
  static properties = {
1279
- ...w.properties,
1280
+ ...b.properties,
1280
1281
  sport: { type: String },
1281
1282
  season: { type: String },
1282
1283
  classFilter: { state: !0 },
@@ -1286,7 +1287,7 @@ class Xt extends w {
1286
1287
  super(), this.sport = "football", this.season = "", this.classFilter = "All", this.query = "";
1287
1288
  }
1288
1289
  async fetchData(t) {
1289
- const e = this.season || at(), [s, r, o, i, n] = await Promise.all([
1290
+ const e = this.season || Y(), [s, r, o, n, i] = await Promise.all([
1290
1291
  t.listConferences({ active: !0 }),
1291
1292
  t.listSchools(),
1292
1293
  t.listTeams({ sport: this.sport }),
@@ -1298,33 +1299,33 @@ class Xt extends w {
1298
1299
  conferences: s.items,
1299
1300
  schools: r.items,
1300
1301
  teams: o.items,
1301
- games: i.items,
1302
- rankings: n.items
1302
+ games: n.items,
1303
+ rankings: i.items
1303
1304
  };
1304
1305
  }
1305
1306
  get ctx() {
1306
1307
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1307
1308
  teamsById: $(this.data.teams),
1308
1309
  schoolsById: $(this.data.schools),
1309
- records: W(this.data.games),
1310
+ records: K(this.data.games),
1310
1311
  rankings: this.data.rankings,
1311
- hrefs: j(this),
1312
+ hrefs: O(this),
1312
1313
  sport: this.sport
1313
1314
  }, this._ctxData = this.data), this._ctx;
1314
1315
  }
1315
1316
  renderView() {
1316
- const t = this.ctx, e = ["All", ...[...new Set(this.data.conferences.flatMap((r) => r.classifications || []))].sort(Rt)].slice(0, 9), s = this.data.conferences.filter((r) => r.active !== !1).filter((r) => this.classFilter === "All" || (r.classifications || []).includes(this.classFilter)).sort(Re);
1317
- return l`
1318
- ${bt(this, t, {
1319
- title: l`${B(this.sport)} standings`,
1320
- sub: l`${this.data.season} season · every conference, computed live from reported results`,
1317
+ const t = this.ctx, e = ["All", ...[...new Set(this.data.conferences.flatMap((r) => r.classifications || []))].sort(Nt)].slice(0, 9), s = this.data.conferences.filter((r) => r.active !== !1).filter((r) => this.classFilter === "All" || (r.classifications || []).includes(this.classFilter)).sort(Le);
1318
+ return h`
1319
+ ${it(this, t, {
1320
+ title: h`${B(this.sport)} standings`,
1321
+ sub: h`${this.data.season} season · every conference, computed live from reported results`,
1321
1322
  teams: this.data.teams
1322
1323
  })}
1323
- ${G(this, l`
1324
- ${V(this)}
1324
+ ${P(this, h`
1325
+ ${D(this)}
1325
1326
  <div class="toolbar">
1326
1327
  <div role="group" aria-label="Classification filter">
1327
- ${e.map((r) => l`<button class="chip ${this.classFilter === r ? "on" : ""}"
1328
+ ${e.map((r) => h`<button class="chip ${this.classFilter === r ? "on" : ""}"
1328
1329
  @click=${() => {
1329
1330
  this.classFilter = r;
1330
1331
  }}>${r}</button>`)}
@@ -1334,21 +1335,21 @@ class Xt extends w {
1334
1335
  this.query = r.target.value;
1335
1336
  }}>
1336
1337
  <span class="spacer"></span>
1337
- <span class="asof">Records through ${y(ut(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1338
+ <span class="asof">Records through ${w(vt(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1338
1339
  </div>
1339
1340
  ${s.map((r) => this.renderConference(t, r))}
1340
1341
  `)}
1341
1342
  `;
1342
1343
  }
1343
1344
  renderConference(t, e) {
1344
- const s = this.data.teams.filter((i) => i.conferenceId === e.id);
1345
+ const s = this.data.teams.filter((n) => n.conferenceId === e.id);
1345
1346
  if (!s.length) return m;
1346
- const r = this.query.trim().toLowerCase(), o = Yt(s, t.records);
1347
- return l`
1347
+ const r = this.query.trim().toLowerCase(), o = Jt(s, t.records);
1348
+ return h`
1348
1349
  <div class="card">
1349
1350
  <div class="card-head">
1350
1351
  <h2>${e.name}</h2>
1351
- ${[...e.classifications || []].sort(Rt).map((i) => l`<span class="pill class">${i}</span>`)}
1352
+ ${[...e.classifications || []].sort(Nt).map((n) => h`<span class="pill class">${n}</span>`)}
1352
1353
  <span class="meta">${o.length} teams · membership derives from teams</span>
1353
1354
  </div>
1354
1355
  <div class="tablewrap"><table class="data">
@@ -1358,26 +1359,26 @@ class Xt extends w {
1358
1359
  <th>Streak</th><th>Last 5</th><th>Next</th>
1359
1360
  </tr></thead>
1360
1361
  <tbody>
1361
- ${o.map((i, n) => this.renderRow(t, i, n, r))}
1362
+ ${o.map((n, i) => this.renderRow(t, n, i, r))}
1362
1363
  </tbody>
1363
1364
  </table></div>
1364
1365
  </div>
1365
1366
  `;
1366
1367
  }
1367
1368
  renderRow(t, e, s, r) {
1368
- const o = t.schoolsById[e.team.schoolId], i = o?.name || e.team.name || "TBD";
1369
- if (r && !i.toLowerCase().includes(r)) return m;
1370
- const n = e.rec.pf - e.rec.pa, d = vt(this.data.games, e.team.id), c = () => {
1371
- location.href = g(t.hrefs.school, { id: e.team.schoolId });
1369
+ const o = t.schoolsById[e.team.schoolId], n = o?.name || e.team.name || "TBD";
1370
+ if (r && !n.toLowerCase().includes(r)) return m;
1371
+ const i = e.rec.pf - e.rec.pa, l = bt(this.data.games, e.team.id), c = () => {
1372
+ location.href = v(t.hrefs.school, { id: e.team.schoolId });
1372
1373
  };
1373
- return l`
1374
- <tr class="rowlink" @click=${(h) => {
1375
- h.target.closest("a") || c();
1374
+ return h`
1375
+ <tr class="rowlink" @click=${(d) => {
1376
+ d.target.closest("a") || c();
1376
1377
  }}>
1377
1378
  <td class="mut">${s + 1}</td>
1378
1379
  <td class="teamcell">
1379
- ${H(o)}${yt(t, e.team.id, null)}
1380
- <a href=${g(t.hrefs.school, { id: e.team.schoolId })}>${i}</a>
1380
+ ${E(o)}${wt(t, e.team.id, null)}
1381
+ <a href=${v(t.hrefs.school, { id: e.team.schoolId })}>${n}</a>
1381
1382
  </td>
1382
1383
  <td class="num">${k(e.rec, !0)}</td>
1383
1384
  <td class="num">${Ft(e.confPct)}</td>
@@ -1385,16 +1386,16 @@ class Xt extends w {
1385
1386
  <td class="num">${Ft(e.overallPct)}</td>
1386
1387
  <td class="num">${e.rec.pf}</td>
1387
1388
  <td class="num">${e.rec.pa}</td>
1388
- <td class="num" style="color:${n >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${n > 0 ? "+" : ""}${n}</td>
1389
- <td>${rt(e.rec.results) || "·"}</td>
1390
- <td>${wt(t, e.team.id)}</td>
1391
- <td>${Zt(t, d, e.team.id)}</td>
1389
+ <td class="num" style="color:${i >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${i > 0 ? "+" : ""}${i}</td>
1390
+ <td>${nt(e.rec.results) || "·"}</td>
1391
+ <td>${xt(t, e.team.id)}</td>
1392
+ <td>${te(t, l, e.team.id)}</td>
1392
1393
  </tr>
1393
1394
  `;
1394
1395
  }
1395
1396
  }
1396
- globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", Xt);
1397
- const Ze = b`
1397
+ globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", se);
1398
+ const rs = y`
1398
1399
  .hero1 {
1399
1400
  border-radius: var(--hsot-radius-md); color: var(--hsot-white);
1400
1401
  padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1.2rem;
@@ -1411,10 +1412,10 @@ const Ze = b`
1411
1412
  .delta.new { background: var(--hsot-straw); color: #6b5900; border-radius: var(--hsot-radius-xs); padding: 0.1rem 0.3rem; font-size: 0.7rem; }
1412
1413
  .sparkline { vertical-align: middle; }
1413
1414
  `;
1414
- class te extends w {
1415
- static styles = [...q, Ze];
1415
+ class ae extends b {
1416
+ static styles = [...U, rs];
1416
1417
  static properties = {
1417
- ...w.properties,
1418
+ ...b.properties,
1418
1419
  sport: { type: String },
1419
1420
  gender: { type: String },
1420
1421
  season: { type: String },
@@ -1429,73 +1430,73 @@ class te extends w {
1429
1430
  t && (this.pollDate = t);
1430
1431
  }
1431
1432
  async fetchData(t) {
1432
- const e = this.season || at(), [s, r, o, i, n] = await Promise.all([
1433
+ const e = this.season || Y(), [s, r, o, n, i] = await Promise.all([
1433
1434
  t.listRankings({ sport: this.sport, ...this.gender ? { gender: this.gender } : {} }),
1434
1435
  t.listSchools(),
1435
1436
  t.listTeams({ sport: this.sport }),
1436
1437
  t.listConferences(),
1437
1438
  t.listGames({ sport: this.sport, season: e })
1438
- ]), d = s.items.filter((c) => !this.gender || !c.gender || c.gender === this.gender).sort((c, h) => h.effectiveDate.localeCompare(c.effectiveDate));
1439
+ ]), l = s.items.filter((c) => !this.gender || !c.gender || c.gender === this.gender).sort((c, d) => d.effectiveDate.localeCompare(c.effectiveDate));
1439
1440
  return {
1440
1441
  season: e,
1441
- polls: d,
1442
+ polls: l,
1442
1443
  schools: r.items,
1443
1444
  teams: o.items,
1444
- conferences: i.items,
1445
- games: n.items
1445
+ conferences: n.items,
1446
+ games: i.items
1446
1447
  };
1447
1448
  }
1448
1449
  get ctx() {
1449
1450
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1450
1451
  teamsById: $(this.data.teams),
1451
1452
  schoolsById: $(this.data.schools),
1452
- records: W(this.data.games),
1453
+ records: K(this.data.games),
1453
1454
  rankings: this.data.polls,
1454
- hrefs: j(this),
1455
+ hrefs: O(this),
1455
1456
  sport: this.sport
1456
1457
  }, this._ctxData = this.data), this._ctx;
1457
1458
  }
1458
1459
  sparkline(t, e, s) {
1459
- const n = e.map((p, u) => {
1460
+ const i = e.map((p, u) => {
1460
1461
  const f = (p.teamIds || []).indexOf(t);
1461
1462
  if (f === -1) return null;
1462
- const v = e.length === 1 ? 96 / 2 : u / (e.length - 1) * 90 + 3, x = 3 + f / 24 * 20;
1463
- return { x: v, y: x };
1464
- }), d = [];
1463
+ const g = e.length === 1 ? 96 / 2 : u / (e.length - 1) * 90 + 3, x = 3 + f / 24 * 20;
1464
+ return { x: g, y: x };
1465
+ }), l = [];
1465
1466
  let c = [];
1466
- if (n.forEach((p) => {
1467
- p ? c.push(p) : c.length && (d.push(c), c = []);
1468
- }), c.length && d.push(c), !d.length) return m;
1469
- const h = n[s];
1470
- return l`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1471
- ${d.map((p) => zt`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1467
+ if (i.forEach((p) => {
1468
+ p ? c.push(p) : c.length && (l.push(c), c = []);
1469
+ }), c.length && l.push(c), !l.length) return m;
1470
+ const d = i[s];
1471
+ return h`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1472
+ ${l.map((p) => zt`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1472
1473
  points=${p.map((u) => `${u.x.toFixed(1)},${u.y.toFixed(1)}`).join(" ")}></polyline>`)}
1473
- ${h ? zt`<circle cx=${h.x.toFixed(1)} cy=${h.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1474
+ ${d ? zt`<circle cx=${d.x.toFixed(1)} cy=${d.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1474
1475
  </svg>`;
1475
1476
  }
1476
1477
  movement(t, e, s) {
1477
- const r = Ye(t, e, s);
1478
- return r.kind === "up" ? l`<span class="delta up">▲ ${r.delta}</span>` : r.kind === "down" ? l`<span class="delta down">▼ ${r.delta}</span>` : r.kind === "new" ? l`<span class="delta new">NEW</span>` : r.kind === "same" ? l`<span class="delta same">—</span>` : l`<span class="delta same">·</span>`;
1478
+ const r = es(t, e, s);
1479
+ return r.kind === "up" ? h`<span class="delta up">▲ ${r.delta}</span>` : r.kind === "down" ? h`<span class="delta down">▼ ${r.delta}</span>` : r.kind === "new" ? h`<span class="delta new">NEW</span>` : r.kind === "same" ? h`<span class="delta same">—</span>` : h`<span class="delta same">·</span>`;
1479
1480
  }
1480
1481
  renderView() {
1481
1482
  const t = this.ctx, e = this.data.polls;
1482
- if (!e.length) return l`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1483
- const s = Math.max(0, e.findIndex((p) => p.effectiveDate === this.pollDate)), r = e[s] || e[0], o = e[s + 1] || null, i = e.slice().reverse(), n = i.indexOf(r), d = $(this.data.conferences), c = (r.teamIds || [])[0], h = c ? U(t, c) : null;
1484
- return l`
1485
- ${bt(this, t, {
1486
- title: l`${B(this.sport)} Top 25`,
1487
- sub: l`The HighSchoolOT poll · updated weekly · ${e.length} polls this season`,
1483
+ if (!e.length) return h`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1484
+ const s = Math.max(0, e.findIndex((p) => p.effectiveDate === this.pollDate)), r = e[s] || e[0], o = e[s + 1] || null, n = e.slice().reverse(), i = n.indexOf(r), l = $(this.data.conferences), c = (r.teamIds || [])[0], d = c ? C(t, c) : null;
1485
+ return h`
1486
+ ${it(this, t, {
1487
+ title: h`${B(this.sport)} Top 25`,
1488
+ sub: h`The HighSchoolOT poll · updated weekly · ${e.length} polls this season`,
1488
1489
  teams: this.data.teams
1489
1490
  })}
1490
- ${G(this, l`
1491
- ${V(this)}
1491
+ ${P(this, h`
1492
+ ${D(this)}
1492
1493
  <div class="toolbar">
1493
1494
  <label class="asof" for="pollsel">Poll of</label>
1494
1495
  <select id="pollsel" @change=${(p) => {
1495
1496
  this.pollDate = p.target.value;
1496
1497
  }}>
1497
- ${e.map((p, u) => l`<option value=${p.effectiveDate} ?selected=${p === r}>
1498
- ${y(p.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${u === 0 ? " · current" : ""}
1498
+ ${e.map((p, u) => h`<option value=${p.effectiveDate} ?selected=${p === r}>
1499
+ ${w(p.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${u === 0 ? " · current" : ""}
1499
1500
  </option>`)}
1500
1501
  </select>
1501
1502
  <button class="chip" ?disabled=${s >= e.length - 1}
@@ -1509,65 +1510,65 @@ class te extends w {
1509
1510
  <span class="spacer"></span>
1510
1511
  <span class="asof">Movement vs. the previous poll · sparkline = season rank history</span>
1511
1512
  </div>
1512
- ${h ? this.renderHero(t, r, o, c, h, d) : m}
1513
+ ${d ? this.renderHero(t, r, o, c, d, l) : m}
1513
1514
  <div class="card"><div class="tablewrap"><table class="data">
1514
1515
  <thead><tr>
1515
1516
  <th class="num">Rk</th><th>Mvmt</th><th>Team</th><th class="num">Record</th>
1516
1517
  <th>Conference</th><th>Last result</th><th>Next</th><th>Season</th>
1517
1518
  </tr></thead>
1518
1519
  <tbody>
1519
- ${(r.teamIds || []).map((p, u) => u === 0 || !p ? m : this.renderRow(t, r, o, i, n, d, p, u + 1))}
1520
+ ${(r.teamIds || []).map((p, u) => u === 0 || !p ? m : this.renderRow(t, r, o, n, i, l, p, u + 1))}
1520
1521
  </tbody>
1521
1522
  </table></div></div>
1522
1523
  <p class="note">Ranks elsewhere on the site resolve the poll in effect on the game date, so past box scores keep the ranks they were played under.</p>
1523
1524
  `)}
1524
1525
  `;
1525
1526
  }
1526
- renderHero(t, e, s, r, o, i) {
1527
- const n = t.records[r], d = Mt(t.records, r), c = i[t.teamsById[r]?.conferenceId], h = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1528
- return l`
1529
- <div class="hero1" style="background:${h}">
1527
+ renderHero(t, e, s, r, o, n) {
1528
+ const i = t.records[r], l = Ot(t.records, r), c = n[t.teamsById[r]?.conferenceId], d = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1529
+ return h`
1530
+ <div class="hero1" style="background:${d}">
1530
1531
  <div class="bigrank">#1</div>
1531
- ${H(o, 64)}
1532
+ ${E(o, 64)}
1532
1533
  <div>
1533
- <h2><a href=${g(t.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1534
+ <h2><a href=${v(t.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1534
1535
  <div class="facts">
1535
- ${k(n)} overall${c ? l` · ${k(n, !0)} ${c.name}` : m}
1536
- · streak ${rt(n?.results) || "·"}
1537
- ${d ? l` · last: ${d.mark} ${d.my}-${d.their} vs ${X(t, d.opp)}` : m}
1536
+ ${k(i)} overall${c ? h` · ${k(i, !0)} ${c.name}` : m}
1537
+ · streak ${nt(i?.results) || "·"}
1538
+ ${l ? h` · last: ${l.mark} ${l.my}-${l.their} vs ${et(t, l.opp)}` : m}
1538
1539
  &nbsp;${this.movement(e, s, r)}
1539
1540
  </div>
1540
1541
  </div>
1541
1542
  </div>
1542
1543
  `;
1543
1544
  }
1544
- renderRow(t, e, s, r, o, i, n, d) {
1545
- const c = U(t, n);
1545
+ renderRow(t, e, s, r, o, n, i, l) {
1546
+ const c = C(t, i);
1546
1547
  if (!c) return m;
1547
- const h = t.records[n], p = Mt(t.records, n), u = vt(this.data.games, n), f = i[t.teamsById[n]?.conferenceId], v = () => {
1548
- location.href = g(t.hrefs.school, { id: c.id });
1548
+ const d = t.records[i], p = Ot(t.records, i), u = bt(this.data.games, i), f = n[t.teamsById[i]?.conferenceId], g = () => {
1549
+ location.href = v(t.hrefs.school, { id: c.id });
1549
1550
  };
1550
- return l`
1551
+ return h`
1551
1552
  <tr class="rowlink" @click=${(x) => {
1552
- x.target.closest("a") || v();
1553
+ x.target.closest("a") || g();
1553
1554
  }}>
1554
- <td class="num" style="font-weight:700">${d}</td>
1555
- <td>${this.movement(e, s, n)}</td>
1556
- <td class="teamcell">${H(c)}<a href=${g(t.hrefs.school, { id: c.id })}>${c.name}</a>
1555
+ <td class="num" style="font-weight:700">${l}</td>
1556
+ <td>${this.movement(e, s, i)}</td>
1557
+ <td class="teamcell">${E(c)}<a href=${v(t.hrefs.school, { id: c.id })}>${c.name}</a>
1557
1558
  <span class="mut" style="font-size:0.78rem">${c.mascot || ""}</span></td>
1558
- <td class="num">${k(h)}</td>
1559
+ <td class="num">${k(d)}</td>
1559
1560
  <td class="mut">${f?.name || "Independent"}</td>
1560
- <td>${p ? l`<a class="box" style="text-decoration:none" href=${g(t.hrefs.game, { sport: this.sport, id: p.gameId })}>
1561
+ <td>${p ? h`<a class="box" style="text-decoration:none" href=${v(t.hrefs.game, { sport: this.sport, id: p.gameId })}>
1561
1562
  <b style="color:${p.mark === "W" ? "var(--hsot-win)" : p.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${p.mark}</b>
1562
- ${p.my}-${p.their} vs ${X(t, p.opp)}</a>` : l`<span class="mut">·</span>`}</td>
1563
- <td>${Zt(t, u, n)}</td>
1564
- <td>${this.sparkline(n, r, o)}</td>
1563
+ ${p.my}-${p.their} vs ${et(t, p.opp)}</a>` : h`<span class="mut">·</span>`}</td>
1564
+ <td>${te(t, u, i)}</td>
1565
+ <td>${this.sparkline(i, r, o)}</td>
1565
1566
  </tr>
1566
1567
  `;
1567
1568
  }
1568
1569
  }
1569
- globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", te);
1570
- const Je = b`
1570
+ globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", ae);
1571
+ const os = y`
1571
1572
  .schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
1572
1573
  .schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
1573
1574
  .schoolhero .crest {
@@ -1621,10 +1622,10 @@ const Je = b`
1621
1622
  table.data.roster .sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--hsot-gray-5); }
1622
1623
  }
1623
1624
  `;
1624
- class ee extends w {
1625
- static styles = [...q, Je];
1625
+ class re extends b {
1626
+ static styles = [...U, os];
1626
1627
  static properties = {
1627
- ...w.properties,
1628
+ ...b.properties,
1628
1629
  schoolId: { type: String, attribute: "school-id" },
1629
1630
  sport: { type: String },
1630
1631
  season: { type: String },
@@ -1639,28 +1640,28 @@ class ee extends w {
1639
1640
  t && !this.sport && (this.sport = t);
1640
1641
  }
1641
1642
  async fetchData(t) {
1642
- const e = this.season || at(), s = await t.getSchool(this.schoolId), o = (await t.listTeams({ schoolId: this.schoolId })).items, i = o.find((v) => v.sport === (this.sport || "football")) || o[0] || null, [n, d, c, h, p, u, f] = await Promise.all([
1643
- i ? t.listGames({ sport: i.sport, season: e }) : Promise.resolve({ items: [] }),
1644
- i ? t.listTeams({ sport: i.sport }) : Promise.resolve({ items: [] }),
1643
+ const e = this.season || Y(), s = await t.getSchool(this.schoolId), o = (await t.listTeams({ schoolId: this.schoolId })).items, n = o.find((g) => g.sport === (this.sport || "football")) || o[0] || null, [i, l, c, d, p, u, f] = await Promise.all([
1644
+ n ? t.listGames({ sport: n.sport, season: e }) : Promise.resolve({ items: [] }),
1645
+ n ? t.listTeams({ sport: n.sport }) : Promise.resolve({ items: [] }),
1645
1646
  t.listSchools(),
1646
1647
  t.listConferences(),
1647
- i ? t.listRankings({ sport: i.sport }) : Promise.resolve({ items: [] }),
1648
- i ? t.listRosters({ teamId: i.id }) : Promise.resolve({ items: [] }),
1648
+ n ? t.listRankings({ sport: n.sport }) : Promise.resolve({ items: [] }),
1649
+ n ? t.listRosters({ teamId: n.id }) : Promise.resolve({ items: [] }),
1649
1650
  // teamId is the public surface's one players filter (roster
1650
1651
  // membership) — never fetch the whole collection.
1651
- i ? t.listPlayers({ teamId: i.id }) : Promise.resolve({ items: [] })
1652
+ n ? t.listPlayers({ teamId: n.id }) : Promise.resolve({ items: [] })
1652
1653
  ]);
1653
1654
  return {
1654
1655
  season: e,
1655
1656
  school: s,
1656
1657
  teams: o,
1657
- active: i,
1658
- games: n.items,
1659
- allTeams: d.items,
1658
+ active: n,
1659
+ games: i.items,
1660
+ allTeams: l.items,
1660
1661
  schools: c.items,
1661
- conferences: h.items,
1662
+ conferences: d.items,
1662
1663
  rankings: p.items,
1663
- roster: u.items.find((v) => v.season === e) || null,
1664
+ roster: u.items.find((g) => g.season === e) || null,
1664
1665
  players: f.items
1665
1666
  };
1666
1667
  }
@@ -1668,9 +1669,9 @@ class ee extends w {
1668
1669
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1669
1670
  teamsById: $(this.data.allTeams.length ? this.data.allTeams : this.data.teams),
1670
1671
  schoolsById: $(this.data.schools),
1671
- records: W(this.data.games),
1672
+ records: K(this.data.games),
1672
1673
  rankings: this.data.rankings,
1673
- hrefs: j(this),
1674
+ hrefs: O(this),
1674
1675
  sport: this.data.active?.sport || "football"
1675
1676
  }, this._ctxData = this.data), this._ctx;
1676
1677
  }
@@ -1679,61 +1680,61 @@ class ee extends w {
1679
1680
  }
1680
1681
  renderView() {
1681
1682
  const { school: t, teams: e, active: s, season: r } = this.data;
1682
- if (!t) return l`<div class="view"><p class="empty">School not found.</p></div>`;
1683
- const o = this.ctx, i = Z(t.colorPrimary || "#030711"), n = (t.adm || [])[0], d = $(this.data.conferences), c = s ? d[s.conferenceId] : null;
1684
- return l`
1685
- <div class="schoolhero" style="background:linear-gradient(115deg, ${t.colorPrimary || "#030711"} 0%, ${t.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${i}">
1683
+ if (!t) return h`<div class="view"><p class="empty">School not found.</p></div>`;
1684
+ const o = this.ctx, n = X(t.colorPrimary || "#030711"), i = (t.adm || [])[0], l = $(this.data.conferences), c = s ? l[s.conferenceId] : null;
1685
+ return h`
1686
+ <div class="schoolhero" style="background:linear-gradient(115deg, ${t.colorPrimary || "#030711"} 0%, ${t.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${n}">
1686
1687
  <div class="inner">
1687
- ${J(t, 84) ? l`<img class="crest logo" alt="" loading="lazy" src=${J(t, 84)} />` : l`<div class="crest" style="background:${t.colorSecondary || "#7C7C7C"};color:${Z(t.colorSecondary || "#7C7C7C")}">${ft(t)}</div>`}
1688
+ ${tt(t, 84) ? h`<img class="crest logo" alt="" loading="lazy" src=${tt(t, 84)} />` : h`<div class="crest" style="background:${t.colorSecondary || "#7C7C7C"};color:${X(t.colorSecondary || "#7C7C7C")}">${$t(t)}</div>`}
1688
1689
  <div style="min-width:260px">
1689
1690
  <h1>${t.name} <span class="mascot">${t.mascot || ""}</span></h1>
1690
1691
  <div class="facts">
1691
- ${t.location ? l`<span><b>Location</b>${t.location}${t.county ? l` · ${t.county} County` : m}</span>` : m}
1692
- ${t.association ? l`<span><b>League</b>${t.association}${t.classification ? l` · ${t.classification}` : m}</span>` : m}
1693
- ${c ? l`<span><b>Conference</b>${c.name}</span>` : m}
1694
- ${n ? l`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : m}
1695
- ${t.openingYear ? l`<span><b>Opened</b>${t.openingYear}</span>` : m}
1696
- ${t.areaCode ? l`<span><b>Area</b>${t.areaCode}</span>` : m}
1692
+ ${t.location ? h`<span><b>Location</b>${t.location}${t.county ? h` · ${t.county} County` : m}</span>` : m}
1693
+ ${t.association ? h`<span><b>League</b>${t.association}${t.classification ? h` · ${t.classification}` : m}</span>` : m}
1694
+ ${c ? h`<span><b>Conference</b>${c.name}</span>` : m}
1695
+ ${i ? h`<span><b>Enrollment</b>${i.value.toLocaleString()} (${i.season} ADM)</span>` : m}
1696
+ ${t.openingYear ? h`<span><b>Opened</b>${t.openingYear}</span>` : m}
1697
+ ${t.areaCode ? h`<span><b>Area</b>${t.areaCode}</span>` : m}
1697
1698
  </div>
1698
1699
  </div>
1699
1700
  </div>
1700
1701
  </div>
1701
1702
  <div class="band">
1702
1703
  <nav class="tabs" aria-label="Teams">
1703
- ${e.map((h) => h.id === s?.id ? l`<a class="on" href="#" @click=${(p) => p.preventDefault()}>${h.name}</a>` : l`<a href="#" @click=${(p) => {
1704
- p.preventDefault(), this.switchSport(h.sport);
1705
- }}>${h.name}</a>`)}
1704
+ ${e.map((d) => d.id === s?.id ? h`<a class="on" href="#" @click=${(p) => p.preventDefault()}>${d.name}</a>` : h`<a href="#" @click=${(p) => {
1705
+ p.preventDefault(), this.switchSport(d.sport);
1706
+ }}>${d.name}</a>`)}
1706
1707
  </nav>
1707
1708
  </div>
1708
- ${G(this, l`
1709
- ${V(this)}
1710
- ${s ? this.renderTeam(o, s, c, r) : l`<p class="empty">No teams recorded for this school yet.</p>`}
1709
+ ${P(this, h`
1710
+ ${D(this)}
1711
+ ${s ? this.renderTeam(o, s, c, r) : h`<p class="empty">No teams recorded for this school yet.</p>`}
1711
1712
  `)}
1712
1713
  `;
1713
1714
  }
1714
1715
  renderTeam(t, e, s, r) {
1715
- const o = t.records[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, i = o.w + o.l + o.t, n = s ? this.data.allTeams.filter((p) => p.conferenceId === s.id) : [], d = s ? Yt(n, t.records).findIndex((p) => p.team.id === e.id) + 1 : 0, c = $t(t.rankings, t.teamsById, e.id, e.sport, null), h = this.data.games.filter((p) => p.homeTeamId === e.id || p.awayTeamId === e.id).sort((p, u) => String(p.date).localeCompare(String(u.date)));
1716
- return l`
1716
+ const o = t.records[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, n = o.w + o.l + o.t, i = s ? this.data.allTeams.filter((p) => p.conferenceId === s.id) : [], l = s ? Jt(i, t.records).findIndex((p) => p.team.id === e.id) + 1 : 0, c = yt(t.rankings, t.teamsById, e.id, e.sport, null), d = this.data.games.filter((p) => p.homeTeamId === e.id || p.awayTeamId === e.id).sort((p, u) => String(p.date).localeCompare(String(u.date)));
1717
+ return h`
1717
1718
  <div class="tiles">
1718
- <div class="tile"><div class="k">Overall</div><div class="v">${k(o)}</div><div class="s">${i} games played</div></div>
1719
+ <div class="tile"><div class="k">Overall</div><div class="v">${k(o)}</div><div class="s">${n} games played</div></div>
1719
1720
  <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${k(o, !0)}</div>
1720
- <div class="s">${d ? `${Be(d)} of ${n.length}` : "·"}</div></div>
1721
- <div class="tile"><div class="k">Points</div><div class="v">${i ? (o.pf / i).toFixed(1) : "0.0"}</div>
1722
- <div class="s">scored per game · ${i ? (o.pa / i).toFixed(1) : "0.0"} allowed</div></div>
1723
- <div class="tile"><div class="k">Streak</div><div class="v">${rt(o.results) || "·"}</div>
1724
- <div class="s">last 5: ${wt(t, e.id)}</div></div>
1721
+ <div class="s">${l ? `${He(l)} of ${i.length}` : "·"}</div></div>
1722
+ <div class="tile"><div class="k">Points</div><div class="v">${n ? (o.pf / n).toFixed(1) : "0.0"}</div>
1723
+ <div class="s">scored per game · ${n ? (o.pa / n).toFixed(1) : "0.0"} allowed</div></div>
1724
+ <div class="tile"><div class="k">Streak</div><div class="v">${nt(o.results) || "·"}</div>
1725
+ <div class="s">last 5: ${xt(t, e.id)}</div></div>
1725
1726
  <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${c ? `#${c}` : "NR"}</div>
1726
- <div class="s"><a href=${g(t.hrefs.section, { sport: e.sport, view: "rankings" })}>full poll</a></div></div>
1727
+ <div class="s"><a href=${v(t.hrefs.section, { sport: e.sport, view: "rankings" })}>full poll</a></div></div>
1727
1728
  </div>
1728
- ${(e.championships || []).length ? l`
1729
+ ${(e.championships || []).length ? h`
1729
1730
  <div style="margin:-0.2rem 0 1rem;display:flex;gap:0.4rem;flex-wrap:wrap">
1730
- ${e.championships.map((p) => l`<span class="pill champ">★ ${p.season} ${p.title} champion${p.classification ? ` · ${p.classification}` : ""}${p.region ? ` · ${p.region}` : ""}</span>`)}
1731
+ ${e.championships.map((p) => h`<span class="pill champ">★ ${p.season} ${p.title} champion${p.classification ? ` · ${p.classification}` : ""}${p.region ? ` · ${p.region}` : ""}</span>`)}
1731
1732
  </div>` : m}
1732
1733
  <div class="cols">
1733
1734
  <div>
1734
1735
  <div class="section-title">Schedule &amp; results</div>
1735
1736
  <div class="card">
1736
- ${h.length ? l`<ul class="gamelist">${h.map((p) => this.renderGameRow(t, e, p))}</ul>` : l`<p class="empty">No ${e.sport} games recorded for ${r}.</p>`}
1737
+ ${d.length ? h`<ul class="gamelist">${d.map((p) => this.renderGameRow(t, e, p))}</ul>` : h`<p class="empty">No ${e.sport} games recorded for ${r}.</p>`}
1737
1738
  </div>
1738
1739
  </div>
1739
1740
  <div>
@@ -1744,50 +1745,50 @@ class ee extends w {
1744
1745
  `;
1745
1746
  }
1746
1747
  renderGameRow(t, e, s) {
1747
- const r = s.homeTeamId === e.id, o = r ? s.awayTeamId : s.homeTeamId, i = r ? s.homeScore : s.awayScore, n = r ? s.awayScore : s.homeScore;
1748
- let d = l`<span class="mut">${mt(s.time)}</span>`;
1748
+ const r = s.homeTeamId === e.id, o = r ? s.awayTeamId : s.homeTeamId, n = r ? s.homeScore : s.awayScore, i = r ? s.awayScore : s.homeScore;
1749
+ let l = h`<span class="mut">${gt(s.time)}</span>`;
1749
1750
  if (s.state === "final") {
1750
- const h = gt(s), p = h === "tie" ? "T" : h === (r ? "home" : "away") ? "W" : "L";
1751
- d = l`<span class=${p}>${p}</span> ${i}-${n}${s.finish === "overtime" ? l` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? l` <span class="mut">FF</span>` : m}`;
1752
- } else s.state === "live" && (d = l`<span style="color:var(--hsot-red)">${i}-${n}</span>`);
1751
+ const d = ot(s), p = d === "tie" ? "T" : d === (r ? "home" : "away") ? "W" : "L";
1752
+ l = h`<span class=${p}>${p}</span> ${n}-${i}${s.finish === "overtime" ? h` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? h` <span class="mut">FF</span>` : m}`;
1753
+ } else s.state === "live" && (l = h`<span style="color:var(--hsot-red)">${n}-${i}</span>`);
1753
1754
  const c = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1754
- return l`
1755
+ return h`
1755
1756
  <li>
1756
- <span class="d">${y(s.date)}</span>
1757
- ${Gt(s).kind === "sched" ? m : tt(s)}
1758
- <span class="res">${d}</span>
1759
- <span class="opp">${r ? "vs" : "at"} ${Qt(t, o, s.date)}
1757
+ <span class="d">${w(s.date)}</span>
1758
+ ${Qt(s).kind === "sched" ? m : W(s)}
1759
+ <span class="res">${l}</span>
1760
+ <span class="opp">${r ? "vs" : "at"} ${st(t, o, s.date)}
1760
1761
  <span class="pill type">${c}</span>
1761
- ${s.broadcast ? l`<span class="pill class">${s.broadcast}</span>` : m}
1762
+ ${s.broadcast ? h`<span class="pill class">${s.broadcast}</span>` : m}
1762
1763
  </span>
1763
1764
  <span class="where">${s.venue || ""}</span>
1764
- <a class="box" href=${g(t.hrefs.game, { sport: e.sport, id: s.id })}>Box score →</a>
1765
+ <a class="box" href=${v(t.hrefs.game, { sport: e.sport, id: s.id })}>Box score →</a>
1765
1766
  </li>
1766
1767
  `;
1767
1768
  }
1768
1769
  renderRoster(t, e) {
1769
1770
  const s = this.data.roster;
1770
1771
  if (!s)
1771
- return l`<p class="empty">Roster not published for ${e}.</p>`;
1772
- const r = Qe(s, 560), o = this.data.school?.name || "", i = $(this.data.players), n = s.entries.slice().sort((c, h) => (c.number || 0) - (h.number || 0)), d = n.some((c) => i[c.playerId]?.college);
1773
- return l`
1774
- ${r ? l`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
1772
+ return h`<p class="empty">Roster not published for ${e}.</p>`;
1773
+ const r = as(s, 560), o = this.data.school?.name || "", n = $(this.data.players), i = s.entries.slice().sort((c, d) => (c.number || 0) - (d.number || 0)), l = i.some((c) => n[c.playerId]?.college);
1774
+ return h`
1775
+ ${r ? h`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
1775
1776
  alt="${o} ${t.name} ${e} team photo" />` : m}
1776
1777
  <div class="tablewrap"><table class="data roster">
1777
- <thead><tr><th class="num">No.</th><th>Player</th><th class="pos">Pos</th><th class="cls">Class</th><th class="num">Ht</th><th class="num">Wt</th>${d ? l`<th>College</th>` : m}</tr></thead>
1778
+ <thead><tr><th class="num">No.</th><th>Player</th><th class="pos">Pos</th><th class="cls">Class</th><th class="num">Ht</th><th class="num">Wt</th>${l ? h`<th>College</th>` : m}</tr></thead>
1778
1779
  <tbody>
1779
- ${n.map((c) => {
1780
- const h = i[c.playerId];
1781
- if (!h) return m;
1782
- const p = De(c), u = [p, h.classOf].filter(Boolean).join(" · ") || "·";
1783
- return l`<tr>
1780
+ ${i.map((c) => {
1781
+ const d = n[c.playerId];
1782
+ if (!d) return m;
1783
+ const p = Oe(c), u = [p, d.classOf].filter(Boolean).join(" · ") || "·";
1784
+ return h`<tr>
1784
1785
  <td class="num mut">${c.number ?? "·"}</td>
1785
- <td class="player" style="font-weight:500">${h.firstName} ${h.lastName}<span class="sub">${u}</span></td>
1786
+ <td class="player" style="font-weight:500">${d.firstName} ${d.lastName}<span class="sub">${u}</span></td>
1786
1787
  <td class="pos">${p || "·"}</td>
1787
- <td class="cls mut">${h.classOf || "·"}</td>
1788
- <td class="num">${Pe(h.heightIn)}</td>
1789
- <td class="num">${h.weightLb || "·"}</td>
1790
- ${d ? l`<td class="college">${h.college || "·"}</td>` : m}
1788
+ <td class="cls mut">${d.classOf || "·"}</td>
1789
+ <td class="num">${Fe(d.heightIn)}</td>
1790
+ <td class="num">${d.weightLb || "·"}</td>
1791
+ ${l ? h`<td class="college">${d.college || "·"}</td>` : m}
1791
1792
  </tr>`;
1792
1793
  })}
1793
1794
  </tbody>
@@ -1795,8 +1796,8 @@ class ee extends w {
1795
1796
  `;
1796
1797
  }
1797
1798
  }
1798
- globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", ee);
1799
- const se = {
1799
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", re);
1800
+ const oe = {
1800
1801
  football: ["quarters", 4],
1801
1802
  flag_football: ["quarters", 4],
1802
1803
  basketball: ["quarters", 4],
@@ -1807,57 +1808,57 @@ const se = {
1807
1808
  softball: ["innings", 7],
1808
1809
  volleyball: ["sets", 3]
1809
1810
  };
1810
- function ae(a) {
1811
- return (se[a] || ["quarters", 4])[0];
1811
+ function ne(a) {
1812
+ return (oe[a] || ["quarters", 4])[0];
1812
1813
  }
1813
- function xt(a) {
1814
- return (se[a] || ["quarters", 4])[1];
1814
+ function kt(a) {
1815
+ return (oe[a] || ["quarters", 4])[1];
1815
1816
  }
1816
- function Xe(a, t) {
1817
- const e = ae(a), s = xt(a);
1817
+ function ns(a, t) {
1818
+ const e = ne(a), s = kt(a);
1818
1819
  if (t <= s || e === "innings" || e === "sets") return String(t);
1819
1820
  const r = t - s;
1820
1821
  return `OT${r > 1 ? r : ""}`;
1821
1822
  }
1822
- function ts(a, t) {
1823
+ function is(a, t) {
1823
1824
  const e = String(a ?? "").trim();
1824
1825
  let s;
1825
- return (s = /^(\d+)Q$/i.exec(e)) || (s = /^(\d+)H$/i.exec(e)) ? Number(s[1]) : /^half$/i.test(e) ? ae(t) === "halves" ? 1 : 2 : (s = /^(\d*)OT(\d*)$/i.exec(e)) ? xt(t) + Number(s[1] || s[2] || 1) : (s = /^[TB](\d+)$/i.exec(e)) || (s = /^(\d+)(?:st|nd|rd|th)\s*set$/i.exec(e)) || (s = /^set\s*(\d+)$/i.exec(e)) ? Number(s[1]) : null;
1826
+ return (s = /^(\d+)Q$/i.exec(e)) || (s = /^(\d+)H$/i.exec(e)) ? Number(s[1]) : /^half$/i.test(e) ? ne(t) === "halves" ? 1 : 2 : (s = /^(\d*)OT(\d*)$/i.exec(e)) ? kt(t) + Number(s[1] || s[2] || 1) : (s = /^[TB](\d+)$/i.exec(e)) || (s = /^(\d+)(?:st|nd|rd|th)\s*set$/i.exec(e)) || (s = /^set\s*(\d+)$/i.exec(e)) ? Number(s[1]) : null;
1826
1827
  }
1827
- const Y = (a) => Number.isInteger(a) && a >= 0 ? a : null;
1828
- function es(a) {
1828
+ const Q = (a) => Number.isInteger(a) && a >= 0 ? a : null;
1829
+ function ls(a) {
1829
1830
  const t = Array.isArray(a?.scoringPlays) ? a.scoringPlays : [];
1830
1831
  if (!t.length) return null;
1831
1832
  const e = a.sport, s = /* @__PURE__ */ new Map();
1832
1833
  for (const p of t) {
1833
- const u = ts(p?.period, e), f = Y(p?.homeScore), v = Y(p?.awayScore);
1834
- if (!u || f === null || v === null) return null;
1834
+ const u = is(p?.period, e), f = Q(p?.homeScore), g = Q(p?.awayScore);
1835
+ if (!u || f === null || g === null) return null;
1835
1836
  const x = s.get(u) || { home: 0, away: 0 };
1836
- x.home = Math.max(x.home, f), x.away = Math.max(x.away, v), s.set(u, x);
1837
+ x.home = Math.max(x.home, f), x.away = Math.max(x.away, g), s.set(u, x);
1837
1838
  }
1838
1839
  const r = Math.max(...s.keys()), o = [];
1839
- let i = !0, n = { home: 0, away: 0 };
1840
+ let n = !0, i = { home: 0, away: 0 };
1840
1841
  for (let p = 1; p <= r; p += 1) {
1841
- const u = s.get(p) || n, f = u.home - n.home, v = u.away - n.away;
1842
- (f < 0 || v < 0) && (i = !1), o.push({ period: p, home: Math.max(f, 0), away: Math.max(v, 0) }), n = { home: Math.max(u.home, n.home), away: Math.max(u.away, n.away) };
1842
+ const u = s.get(p) || i, f = u.home - i.home, g = u.away - i.away;
1843
+ (f < 0 || g < 0) && (n = !1), o.push({ period: p, home: Math.max(f, 0), away: Math.max(g, 0) }), i = { home: Math.max(u.home, i.home), away: Math.max(u.away, i.away) };
1843
1844
  }
1844
- const d = Y(a.homeScore) ?? 0, c = Y(a.awayScore) ?? 0, h = i && n.home === d && n.away === c;
1845
- return i = i && n.home <= d && n.away <= c, { periods: o, reconciled: h, consistent: i };
1845
+ const l = Q(a.homeScore) ?? 0, c = Q(a.awayScore) ?? 0, d = n && i.home === l && i.away === c;
1846
+ return n = n && i.home <= l && i.away <= c, { periods: o, reconciled: d, consistent: n };
1846
1847
  }
1847
- function ss(a) {
1848
+ function cs(a) {
1848
1849
  if (Array.isArray(a?.periodScores) && a.periodScores.length) return a.periodScores;
1849
- const t = es(a);
1850
+ const t = ls(a);
1850
1851
  return t ? a.state === "final" ? t.reconciled ? t.periods : null : t.consistent ? t.periods : null : null;
1851
1852
  }
1852
- const as = "https://api.wral.com/search";
1853
- function rs(a) {
1853
+ const hs = "https://api.wral.com/search";
1854
+ function ds(a) {
1854
1855
  return a.map((t) => `uri:"${t}"`).join(" OR ");
1855
1856
  }
1856
- function os(a, t) {
1857
- const e = String(a || as).replace(/\/+$/, ""), s = new URLSearchParams({ query: rs(t), sort: "score", lang: "en" });
1857
+ function ps(a, t) {
1858
+ const e = String(a || hs).replace(/\/+$/, ""), s = new URLSearchParams({ query: ds(t), sort: "score", lang: "en" });
1858
1859
  return `${e}/v1/query?${s}`;
1859
1860
  }
1860
- function re(a) {
1861
+ function ie(a) {
1861
1862
  try {
1862
1863
  const t = new URL(a);
1863
1864
  if (/(^|\.)smugmug\.com$/i.test(t.hostname)) {
@@ -1872,13 +1873,13 @@ function re(a) {
1872
1873
  }
1873
1874
  return { uri: a, title: a };
1874
1875
  }
1875
- async function is(a, t, e) {
1876
- const r = await ((...n) => fetch(...n))(os(a, t));
1876
+ async function ms(a, t, e) {
1877
+ const r = await ((...i) => fetch(...i))(ps(a, t));
1877
1878
  if (!r.ok) throw new Error(`search answered ${r.status}`);
1878
- const o = await r.json(), i = new Map((o.items || []).map((n) => [n.uri, n]));
1879
- return t.map((n) => i.get(n) || re(n));
1879
+ const o = await r.json(), n = new Map((o.items || []).map((i) => [i.uri, i]));
1880
+ return t.map((i) => n.get(i) || ie(i));
1880
1881
  }
1881
- const ns = b`
1882
+ const us = y`
1882
1883
  .breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
1883
1884
  .breadcrumbs a { text-decoration: none; }
1884
1885
  .scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
@@ -1931,10 +1932,10 @@ const ns = b`
1931
1932
  .cols { grid-template-columns: 1fr; }
1932
1933
  }
1933
1934
  `;
1934
- class oe extends w {
1935
- static styles = [...q, ns];
1935
+ class le extends b {
1936
+ static styles = [...U, us];
1936
1937
  static properties = {
1937
- ...w.properties,
1938
+ ...b.properties,
1938
1939
  gameId: { type: String, attribute: "game-id" },
1939
1940
  // The public site search that resolves Game.coverageUrls into cards
1940
1941
  // (DEV-1236). Shared cross-stage by design — see the studio host's
@@ -1946,7 +1947,7 @@ class oe extends w {
1946
1947
  super(), this.gameId = "", this.searchApi = "";
1947
1948
  }
1948
1949
  async fetchData(t) {
1949
- const e = await t.getGame(this.gameId), s = Array.isArray(e.coverageUrls) ? e.coverageUrls : [], [r, o, i, n, d, c] = await Promise.all([
1950
+ const e = await t.getGame(this.gameId), s = Array.isArray(e.coverageUrls) ? e.coverageUrls : [], [r, o, n, i, l, c] = await Promise.all([
1950
1951
  t.listSchools(),
1951
1952
  t.listTeams({ sport: e.sport }),
1952
1953
  t.listConferences(),
@@ -1954,15 +1955,15 @@ class oe extends w {
1954
1955
  t.listGames({ sport: e.sport, season: e.season }),
1955
1956
  // A search outage must not blank the box score — degrade to bare
1956
1957
  // links (fetchCoverage already degrades per-URL index misses).
1957
- s.length ? is(this.searchApi, s).catch(() => s.map(re)) : Promise.resolve([])
1958
+ s.length ? ms(this.searchApi, s).catch(() => s.map(ie)) : Promise.resolve([])
1958
1959
  ]);
1959
1960
  return {
1960
1961
  game: e,
1961
1962
  schools: r.items,
1962
1963
  teams: o.items,
1963
- conferences: i.items,
1964
- rankings: n.items,
1965
- games: d.items,
1964
+ conferences: n.items,
1965
+ rankings: i.items,
1966
+ games: l.items,
1966
1967
  coverage: c
1967
1968
  };
1968
1969
  }
@@ -1970,59 +1971,59 @@ class oe extends w {
1970
1971
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1971
1972
  teamsById: $(this.data.teams),
1972
1973
  schoolsById: $(this.data.schools),
1973
- records: W(this.data.games),
1974
+ records: K(this.data.games),
1974
1975
  rankings: this.data.rankings,
1975
- hrefs: j(this),
1976
+ hrefs: O(this),
1976
1977
  sport: this.data.game.sport
1977
1978
  }, this._ctxData = this.data), this._ctx;
1978
1979
  }
1979
1980
  renderView() {
1980
1981
  const t = this.data.game;
1981
- if (!t) return l`<div class="view"><p class="empty">Game not found.</p></div>`;
1982
- const e = this.ctx, s = $(this.data.conferences), r = e.teamsById[t.awayTeamId] ? e.schoolsById[e.teamsById[t.awayTeamId].schoolId] : null, o = e.teamsById[t.homeTeamId] ? e.schoolsById[e.teamsById[t.homeTeamId].schoolId] : null, i = gt(t), n = (h) => t.state === "final" && i !== h && i !== "tie" ? "opacity:0.45" : "", d = t.conferenceId ? s[t.conferenceId] : null, c = this.data.games.filter((h) => h.id !== t.id && h.state === "final" && h.gameType !== "scrimmage" && (h.homeTeamId === t.homeTeamId && h.awayTeamId === t.awayTeamId || h.homeTeamId === t.awayTeamId && h.awayTeamId === t.homeTeamId));
1983
- return l`
1984
- ${G(this, l`
1985
- ${V(this)}
1982
+ if (!t) return h`<div class="view"><p class="empty">Game not found.</p></div>`;
1983
+ const e = this.ctx, s = $(this.data.conferences), r = e.teamsById[t.awayTeamId] ? e.schoolsById[e.teamsById[t.awayTeamId].schoolId] : null, o = e.teamsById[t.homeTeamId] ? e.schoolsById[e.teamsById[t.homeTeamId].schoolId] : null, n = ot(t), i = (d) => t.state === "final" && n !== d && n !== "tie" ? "opacity:0.45" : "", l = t.conferenceId ? s[t.conferenceId] : null, c = this.data.games.filter((d) => d.id !== t.id && d.state === "final" && d.gameType !== "scrimmage" && (d.homeTeamId === t.homeTeamId && d.awayTeamId === t.awayTeamId || d.homeTeamId === t.awayTeamId && d.awayTeamId === t.homeTeamId));
1984
+ return h`
1985
+ ${P(this, h`
1986
+ ${D(this)}
1986
1987
  <p class="breadcrumbs">
1987
- <a href=${g(e.hrefs.section, { sport: t.sport, view: "scores" })}>${B(t.sport)}</a> /
1988
- <a href=${g(e.hrefs.section, { sport: t.sport, view: "scores" })}>Scores/Schedules</a> /
1989
- ${E(e, t.awayTeamId)} at ${E(e, t.homeTeamId)}
1988
+ <a href=${v(e.hrefs.section, { sport: t.sport, view: "scores" })}>${B(t.sport)}</a> /
1989
+ <a href=${v(e.hrefs.section, { sport: t.sport, view: "scores" })}>Scores/Schedules</a> /
1990
+ ${R(e, t.awayTeamId)} at ${R(e, t.homeTeamId)}
1990
1991
  </p>
1991
1992
  <div class="card">
1992
1993
  <div class="scorehead">
1993
1994
  ${this.teamBlock(e, t, t.awayTeamId, r, !1)}
1994
1995
  <div class="mid">
1995
1996
  <div class="bigscore">
1996
- <span style=${n("away")}>${t.awayScore}</span>
1997
+ <span style=${i("away")}>${t.awayScore}</span>
1997
1998
  <span class="mut" style="font-size:1.6rem">–</span>
1998
- <span style=${n("home")}>${t.homeScore}</span>
1999
+ <span style=${i("home")}>${t.homeScore}</span>
1999
2000
  </div>
2000
- <div class="status">${tt(t)}</div>
2001
- <div class="status">${y(t.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${t.state === "scheduled" && t.time ? l` · ${mt(t.time)}` : m} · ${t.venue || "Venue TBD"}
2002
- ${t.broadcast ? l` · <span class="pill class">${t.broadcast}</span>` : m}</div>
2001
+ <div class="status">${W(t)}</div>
2002
+ <div class="status">${w(t.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${t.state === "scheduled" && t.time ? h` · ${gt(t.time)}` : m} · ${t.venue || "Venue TBD"}
2003
+ ${t.broadcast ? h` · <span class="pill class">${t.broadcast}</span>` : m}</div>
2003
2004
  <div class="status">
2004
- <span class="pill type">${t.gameType === "conference" ? `${d?.name || "Conference"} game` : t.gameType}</span>
2005
- ${t.label ? l`<span class="pill type">Bracket ${t.label}</span>` : m}
2006
- ${(t.tags || []).map((h) => l`<span class="pill type">${h}</span>`)}
2005
+ <span class="pill type">${t.gameType === "conference" ? `${l?.name || "Conference"} game` : t.gameType}</span>
2006
+ ${t.label ? h`<span class="pill type">Bracket ${t.label}</span>` : m}
2007
+ ${(t.tags || []).map((d) => h`<span class="pill type">${d}</span>`)}
2007
2008
  </div>
2008
2009
  </div>
2009
2010
  ${this.teamBlock(e, t, t.homeTeamId, o, !0)}
2010
2011
  </div>
2011
2012
  ${this.renderLineScore(t, r, o)}
2012
2013
  ${this.renderScoringPlays(t, r, o)}
2013
- ${t.notes ? l`<p class="note gamenote">${t.notes}</p>` : m}
2014
+ ${t.notes ? h`<p class="note gamenote">${t.notes}</p>` : m}
2014
2015
  </div>
2015
- ${(this.data.coverage || []).length ? l`
2016
+ ${(this.data.coverage || []).length ? h`
2016
2017
  <div class="section-title">Coverage</div>
2017
2018
  <div class="covgrid">
2018
- ${this.data.coverage.map((h) => l`
2019
- <a class="card covcard" href=${h.uri}>
2020
- ${h.image ? l`<img class="covimg" src=${h.image} alt="" loading="lazy" />` : m}
2019
+ ${this.data.coverage.map((d) => h`
2020
+ <a class="card covcard" href=${d.uri}>
2021
+ ${d.image ? h`<img class="covimg" src=${d.image} alt="" loading="lazy" />` : m}
2021
2022
  <div class="covbody">
2022
- <div class="covtitle">${h.videoDuration ? l`<span class="pill live" style="animation:none">Video</span> ` : m}${h.photos ? l`<span class="pill live" style="animation:none">Photos</span> ` : m}${h.title || h.uri}</div>
2023
- ${h.description ? l`<p class="covdesc">${h.description}</p>` : m}
2024
- ${h.author || h.publishedTime ? l`
2025
- <div class="covmeta">${[h.author, h.publishedTime ? new Date(h.publishedTime).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : ""].filter(Boolean).join(" · ")}</div>
2023
+ <div class="covtitle">${d.videoDuration ? h`<span class="pill live" style="animation:none">Video</span> ` : m}${d.photos ? h`<span class="pill live" style="animation:none">Photos</span> ` : m}${d.title || d.uri}</div>
2024
+ ${d.description ? h`<p class="covdesc">${d.description}</p>` : m}
2025
+ ${d.author || d.publishedTime ? h`
2026
+ <div class="covmeta">${[d.author, d.publishedTime ? new Date(d.publishedTime).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : ""].filter(Boolean).join(" · ")}</div>
2026
2027
  ` : m}
2027
2028
  </div>
2028
2029
  </a>
@@ -2030,53 +2031,53 @@ class oe extends w {
2030
2031
  </div>` : m}
2031
2032
  <div class="section-title">Season context</div>
2032
2033
  <div class="cols">
2033
- ${[[t.awayTeamId, r], [t.homeTeamId, o]].map(([h, p]) => this.renderContext(e, h, p))}
2034
+ ${[[t.awayTeamId, r], [t.homeTeamId, o]].map(([d, p]) => this.renderContext(e, d, p))}
2034
2035
  </div>
2035
- ${c.length ? l`
2036
+ ${c.length ? h`
2036
2037
  <div class="section-title">Head to head this season</div>
2037
2038
  <div class="card"><ul class="gamelist">
2038
- ${c.map((h) => l`<li>
2039
- <span class="d">${y(h.date)}</span>${tt(h)}
2040
- <span class="opp">${E(e, h.awayTeamId)} ${h.awayScore}, ${E(e, h.homeTeamId)} ${h.homeScore}</span>
2041
- <a class="box" href=${g(e.hrefs.game, { sport: t.sport, id: h.id })}>Box score →</a>
2039
+ ${c.map((d) => h`<li>
2040
+ <span class="d">${w(d.date)}</span>${W(d)}
2041
+ <span class="opp">${R(e, d.awayTeamId)} ${d.awayScore}, ${R(e, d.homeTeamId)} ${d.homeScore}</span>
2042
+ <a class="box" href=${v(e.hrefs.game, { sport: t.sport, id: d.id })}>Box score →</a>
2042
2043
  </li>`)}
2043
2044
  </ul></div>` : m}
2044
2045
  `)}
2045
2046
  `;
2046
2047
  }
2047
2048
  teamBlock(t, e, s, r, o) {
2048
- if (!r) return l`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
2049
- const i = t.teamsById[s], n = t.records[s], d = J(r, 58);
2050
- return l`
2049
+ if (!r) return h`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
2050
+ const n = t.teamsById[s], i = t.records[s], l = tt(r, 58);
2051
+ return h`
2051
2052
  <div class="teamblock ${o ? "right" : ""}">
2052
- ${d ? l`<img class="crest logo" alt="" loading="lazy" src=${d} />` : l`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${Z(r.colorPrimary || "#030711")}">${ft(r)}</span>`}
2053
+ ${l ? h`<img class="crest logo" alt="" loading="lazy" src=${l} />` : h`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${X(r.colorPrimary || "#030711")}">${$t(r)}</span>`}
2053
2054
  <div>
2054
- <div class="tname">${yt(t, s, e.date)}<a href=${g(t.hrefs.school, { id: r.id })}>${r.name}</a></div>
2055
- <div class="trec">${r.mascot || ""} · ${k(n)}${i?.conferenceId ? l` · ${k(n, !0)} conf` : m}</div>
2055
+ <div class="tname">${wt(t, s, e.date)}<a href=${v(t.hrefs.school, { id: r.id })}>${r.name}</a></div>
2056
+ <div class="trec">${r.mascot || ""} · ${k(i)}${n?.conferenceId ? h` · ${k(i, !0)} conf` : m}</div>
2056
2057
  </div>
2057
2058
  </div>
2058
2059
  `;
2059
2060
  }
2060
2061
  renderLineScore(t, e, s) {
2061
- const r = ss(t);
2062
+ const r = cs(t);
2062
2063
  if (!r)
2063
- return t.state === "scheduled" ? l`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>` : m;
2064
- const o = Math.max(xt(t.sport), ...r.map((c) => c.period)), i = (c) => Xe(t.sport, c), n = (c, h) => {
2065
- const p = r.find((u) => u.period === h);
2064
+ return t.state === "scheduled" ? h`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>` : m;
2065
+ const o = Math.max(kt(t.sport), ...r.map((c) => c.period)), n = (c) => ns(t.sport, c), i = (c, d) => {
2066
+ const p = r.find((u) => u.period === d);
2066
2067
  return p ? p[c] : t.state === "final" ? 0 : "·";
2067
- }, d = (c, h, p) => l`
2068
+ }, l = (c, d, p) => h`
2068
2069
  <tr>
2069
- <td class="teamcell">${H(c, 20)}${c?.abbr || "TBD"}</td>
2070
- ${Array.from({ length: o }, (u, f) => l`<td class="num">${n(h, f + 1)}</td>`)}
2070
+ <td class="teamcell">${E(c, 20)}${c?.abbr || "TBD"}</td>
2071
+ ${Array.from({ length: o }, (u, f) => h`<td class="num">${i(d, f + 1)}</td>`)}
2071
2072
  <td class="num" style="font-weight:700">${p}</td>
2072
2073
  </tr>`;
2073
- return l`
2074
+ return h`
2074
2075
  <div class="tablewrap" style="border-top:1px solid var(--hsot-gray-2)">
2075
2076
  <table class="data" style="max-width:560px;margin:0.6rem auto 0.9rem">
2076
- <thead><tr><th>Team</th>${Array.from({ length: o }, (c, h) => l`<th class="num">${i(h + 1)}</th>`)}<th class="num">T</th></tr></thead>
2077
+ <thead><tr><th>Team</th>${Array.from({ length: o }, (c, d) => h`<th class="num">${n(d + 1)}</th>`)}<th class="num">T</th></tr></thead>
2077
2078
  <tbody>
2078
- ${d(e, "away", t.awayScore)}
2079
- ${d(s, "home", t.homeScore)}
2079
+ ${l(e, "away", t.awayScore)}
2080
+ ${l(s, "home", t.homeScore)}
2080
2081
  </tbody>
2081
2082
  </table>
2082
2083
  </div>
@@ -2085,8 +2086,8 @@ class oe extends w {
2085
2086
  renderScoringPlays(t, e, s) {
2086
2087
  const r = Array.isArray(t.scoringPlays) ? t.scoringPlays : [];
2087
2088
  if (!r.length) return m;
2088
- const o = (i) => [i.period, i.clock].filter(Boolean).join(" ");
2089
- return l`
2089
+ const o = (n) => [n.period, n.clock].filter(Boolean).join(" ");
2090
+ return h`
2090
2091
  <div class="plays">
2091
2092
  <div class="plays-title">Scoring plays</div>
2092
2093
  <div class="tablewrap">
@@ -2096,11 +2097,11 @@ class oe extends w {
2096
2097
  <th class="num">${e?.abbr || "Away"}</th><th class="num">${s?.abbr || "Home"}</th>
2097
2098
  </tr></thead>
2098
2099
  <tbody>
2099
- ${r.map((i) => l`<tr>
2100
- <td class="when">${o(i) || "·"}</td>
2101
- <td class="play">${i.description || "·"}</td>
2102
- <td class="num">${i.awayScore}</td>
2103
- <td class="num">${i.homeScore}</td>
2100
+ ${r.map((n) => h`<tr>
2101
+ <td class="when">${o(n) || "·"}</td>
2102
+ <td class="play">${n.description || "·"}</td>
2103
+ <td class="num">${n.awayScore}</td>
2104
+ <td class="num">${n.homeScore}</td>
2104
2105
  </tr>`)}
2105
2106
  </tbody>
2106
2107
  </table>
@@ -2110,24 +2111,24 @@ class oe extends w {
2110
2111
  }
2111
2112
  renderContext(t, e, s) {
2112
2113
  if (!s) return m;
2113
- const r = t.records[e], o = vt(this.data.games, e);
2114
- return l`
2114
+ const r = t.records[e], o = bt(this.data.games, e);
2115
+ return h`
2115
2116
  <div class="card ctxcard">
2116
- <div class="who">${H(s)}${s.name}</div>
2117
+ <div class="who">${E(s)}${s.name}</div>
2117
2118
  <div class="row">
2118
- <span>Last 5: ${wt(t, e)}</span>
2119
- <span>Streak: <b>${r ? rt(r.results) : "·"}</b></span>
2119
+ <span>Last 5: ${xt(t, e)}</span>
2120
+ <span>Streak: <b>${r ? nt(r.results) : "·"}</b></span>
2120
2121
  <span>PF/PA: <b>${r ? `${r.pf} / ${r.pa}` : "·"}</b></span>
2121
- <span>Next: ${o ? l`${y(o.date, { month: "numeric", day: "numeric" })}
2122
- ${o.homeTeamId === e ? "vs" : "at"} ${X(t, o.homeTeamId === e ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
2122
+ <span>Next: ${o ? h`${w(o.date, { month: "numeric", day: "numeric" })}
2123
+ ${o.homeTeamId === e ? "vs" : "at"} ${et(t, o.homeTeamId === e ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
2123
2124
  </div>
2124
2125
  </div>
2125
2126
  `;
2126
2127
  }
2127
2128
  }
2128
- globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", oe);
2129
- const ls = 250, cs = 2;
2130
- class ie extends P {
2129
+ globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", le);
2130
+ const fs = 250, gs = 2;
2131
+ class ce extends N {
2131
2132
  static properties = {
2132
2133
  api: { type: String },
2133
2134
  schoolHref: { type: String, attribute: "school-href" },
@@ -2138,7 +2139,7 @@ class ie extends P {
2138
2139
  activeIndex: { state: !0 },
2139
2140
  searched: { state: !0 }
2140
2141
  };
2141
- static styles = b`
2142
+ static styles = y`
2142
2143
  :host {
2143
2144
  display: block;
2144
2145
  position: relative;
@@ -2207,11 +2208,11 @@ class ie extends P {
2207
2208
  }
2208
2209
  onInput(t) {
2209
2210
  const e = t.target.value.trim();
2210
- if (clearTimeout(this.debounceTimer), e.length < cs) {
2211
+ if (clearTimeout(this.debounceTimer), e.length < gs) {
2211
2212
  this.abortController?.abort(), this.results = [], this.open = !1, this.searched = !1;
2212
2213
  return;
2213
2214
  }
2214
- this.debounceTimer = setTimeout(() => this.search(e), ls);
2215
+ this.debounceTimer = setTimeout(() => this.search(e), fs);
2215
2216
  }
2216
2217
  async search(t) {
2217
2218
  this.abortController?.abort(), this.abortController = new AbortController();
@@ -2259,7 +2260,7 @@ class ie extends P {
2259
2260
  const s = this.where(t), r = (o) => {
2260
2261
  o.preventDefault(), this.go(t);
2261
2262
  };
2262
- return l`
2263
+ return h`
2263
2264
  <li
2264
2265
  id="school-option-${e}"
2265
2266
  role="option"
@@ -2270,13 +2271,13 @@ class ie extends P {
2270
2271
  }}"
2271
2272
  >
2272
2273
  <span class="name">${t.name}</span>
2273
- ${s ? l`<span class="where">${s}</span>` : m}
2274
+ ${s ? h`<span class="where">${s}</span>` : m}
2274
2275
  </li>
2275
2276
  `;
2276
2277
  }
2277
2278
  renderListbox() {
2278
- const t = this.searched && !this.results.length, e = l`<li class="empty">No schools found</li>`;
2279
- return l`
2279
+ const t = this.searched && !this.results.length, e = h`<li class="empty">No schools found</li>`;
2280
+ return h`
2280
2281
  <ul id="school-search-listbox" role="listbox" aria-label="Schools">
2281
2282
  ${this.results.map((s, r) => this.renderOption(s, r))}
2282
2283
  ${t ? e : m}
@@ -2285,7 +2286,7 @@ class ie extends P {
2285
2286
  }
2286
2287
  render() {
2287
2288
  const t = this.activeIndex >= 0 ? `school-option-${this.activeIndex}` : "";
2288
- return l`
2289
+ return h`
2289
2290
  <input
2290
2291
  type="text"
2291
2292
  role="combobox"
@@ -2304,22 +2305,302 @@ class ie extends P {
2304
2305
  `;
2305
2306
  }
2306
2307
  }
2307
- globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", ie);
2308
- const hs = {
2309
- "hsot-scores": Jt,
2310
- "hsot-standings": Xt,
2311
- "hsot-rankings": te,
2312
- "hsot-school": ee,
2313
- "hsot-boxscore": oe,
2314
- "hsot-school-search": ie
2308
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", ce);
2309
+ function he(a, t) {
2310
+ const e = new Map(a.map((l) => [l.id, l])), s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
2311
+ for (const l of t || [])
2312
+ l.outcome === "winner" && (s.has(l.targetGameId) || s.set(l.targetGameId, []), s.get(l.targetGameId).push(l), r.has(l.sourceGameId) || r.set(l.sourceGameId, []), r.get(l.sourceGameId).push(l));
2313
+ const o = a.filter((l) => !r.has(l.id)), n = (l) => l.targetSlot === "home" ? 0 : 1;
2314
+ function i(l) {
2315
+ const c = e.get(l);
2316
+ if (!c) return null;
2317
+ const p = [...s.get(l) || []].sort((u, f) => n(u) - n(f)).map((u) => i(u.sourceGameId)).filter(Boolean);
2318
+ return { game: c, children: p, bracketGroup: c.bracketGroup };
2319
+ }
2320
+ return o.length === 1 ? i(o[0].id) : o.map((l) => i(l.id));
2321
+ }
2322
+ function de(a, t = [], e = 0) {
2323
+ if (!a) return t;
2324
+ t[e] || (t[e] = []), t[e].push(a.game);
2325
+ for (const s of a.children || []) de(s, t, e + 1);
2326
+ return t;
2327
+ }
2328
+ const vs = (a) => Math.max(1, Math.round(Math.log2(a || 2)));
2329
+ function $s({ round: a, perGroup: t, groupCount: e = 1 }) {
2330
+ const s = vs(t), o = (e === 4 ? s + 2 : e === 2 ? s + 1 : s) - a;
2331
+ return o === 0 ? e > 1 ? "Championship" : "Final" : o === 1 ? "Semifinal" : `Round ${a}`;
2332
+ }
2333
+ function bs(a) {
2334
+ if (!a || !a.length) return "setup";
2335
+ const t = Math.max(...a.map((s) => s.round ?? 0)), e = a.filter((s) => (s.round ?? 0) === t);
2336
+ return e.length && e.every((s) => s.state === "final") ? "complete" : a.some((s) => s.state !== "scheduled" || s.homeScore || s.awayScore || s.round === 1 && (s.homeTeamId || s.awayTeamId)) ? "active" : "setup";
2337
+ }
2338
+ function ys(a, t) {
2339
+ const e = a?.groupNames || [];
2340
+ if (e.length >= 2) {
2341
+ const r = e.map((o) => ({ key: o, name: o }));
2342
+ return (t || []).some((o) => o.bracketGroup === "Championship") && r.push({ key: "Championship", name: "Championship" }), r;
2343
+ }
2344
+ const s = [...new Set((t || []).map((r) => r.bracketGroup).filter(Boolean))];
2345
+ return [{ key: null, name: s.length === 1 ? s[0] : "Bracket" }];
2346
+ }
2347
+ const ws = (a, t) => t?.key == null ? [...a || []] : (a || []).filter((e) => e.bracketGroup === t.key), Ut = (a) => {
2348
+ const t = /(\d+)\s*$/.exec(a.label || "");
2349
+ return t ? Number(t[1]) : 1 / 0;
2350
+ }, Ht = (a, t) => Ut(a) - Ut(t) || String(a.id).localeCompare(String(t.id));
2351
+ function xs(a, t) {
2352
+ if (a.every((r) => Number.isInteger(r.round))) return (r) => r.round;
2353
+ const e = he(a, t), s = /* @__PURE__ */ new Map();
2354
+ for (const r of Array.isArray(e) ? e : [e]) {
2355
+ const o = de(r), n = o.length - 1;
2356
+ o.forEach((i, l) => i.forEach((c) => s.set(c.id, n - l + 1)));
2357
+ }
2358
+ return (r) => Number.isInteger(r.round) ? r.round : s.get(r.id) || 1;
2359
+ }
2360
+ function ks(a, t, e) {
2361
+ const s = ws(a, e);
2362
+ if (!s.length) return [];
2363
+ const r = xs(a || [], t || []), o = /* @__PURE__ */ new Map();
2364
+ for (const c of s) {
2365
+ const d = r(c);
2366
+ o.has(d) || o.set(d, []), o.get(d).push(c);
2367
+ }
2368
+ const n = /* @__PURE__ */ new Map();
2369
+ for (const c of t || [])
2370
+ c.outcome === "winner" && (n.has(c.targetGameId) || n.set(c.targetGameId, []), n.get(c.targetGameId).push(c.sourceGameId));
2371
+ const i = [];
2372
+ let l = null;
2373
+ for (const c of [...o.keys()].sort((d, p) => d - p)) {
2374
+ let d = [...o.get(c)];
2375
+ if (l) {
2376
+ const p = (u) => {
2377
+ const f = (n.get(u.id) || []).map((g) => l.get(g)).filter((g) => g !== void 0);
2378
+ return f.length ? Math.min(...f) : 1 / 0;
2379
+ };
2380
+ d.sort((u, f) => p(u) - p(f) || Ht(u, f));
2381
+ } else
2382
+ d.sort(Ht);
2383
+ l = new Map(d.map((p, u) => [p.id, u])), i.push({ round: c, games: d });
2384
+ }
2385
+ return i;
2386
+ }
2387
+ function Ss(a, t, e) {
2388
+ const s = a[`${t}TeamId`] || null, r = (e || []).find((n) => n.gameId === a.id && n.slot === t), o = a[`${t}Seed`] ?? r?.seed ?? null;
2389
+ return { teamId: s, seed: o, bye: !s && !!r?.isBye };
2390
+ }
2391
+ function pe(a) {
2392
+ const t = ot(a);
2393
+ return t === "home" || t === "away" ? t : null;
2394
+ }
2395
+ function _s(a, t) {
2396
+ const e = he(a || [], t || []);
2397
+ if (!e || Array.isArray(e)) return null;
2398
+ const s = pe(e.game);
2399
+ return s && e.game[`${s}TeamId`] || null;
2400
+ }
2401
+ const Lt = { active: 0, setup: 1, complete: 2 };
2402
+ function As(a, { id: t, param: e } = {}) {
2403
+ const s = a || [];
2404
+ if (!s.length) return null;
2405
+ for (const r of [t, e]) {
2406
+ if (!r) continue;
2407
+ const o = s.find((n) => n.id === r);
2408
+ if (o) return o;
2409
+ }
2410
+ return [...s].sort((r, o) => (Lt[r.status] ?? 3) - (Lt[o.status] ?? 3) || String(r.name || "").localeCompare(String(o.name || "")))[0];
2411
+ }
2412
+ const Ts = y`
2413
+ .bracket { display: flex; gap: 1rem; align-items: stretch; overflow-x: auto; padding-bottom: 0.5rem; }
2414
+ .round { flex: 0 0 250px; display: flex; flex-direction: column; min-width: 0; }
2415
+ .roundhead {
2416
+ margin: 0 0 0.6rem; padding-bottom: 0.35rem; border-bottom: 3px solid var(--hsot-gray-2);
2417
+ font-family: var(--hsot-heading-font); font-weight: 700; font-size: 0.8rem;
2418
+ text-transform: uppercase; letter-spacing: 0.04em; color: var(--hsot-gray-6);
2419
+ }
2420
+ /* Equal-flex bands center each matchup between the two that feed it. */
2421
+ .games { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 0.6rem; }
2422
+ .matchup {
2423
+ background: var(--hsot-white); border: 1px solid var(--hsot-gray-2);
2424
+ border-radius: var(--hsot-radius-md); overflow: hidden;
2425
+ }
2426
+ .matchup.live { border-color: var(--hsot-red); }
2427
+ .slot { display: flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.6rem; font-size: 0.9rem; min-height: 2.1rem; box-sizing: border-box; }
2428
+ .slot + .slot { border-top: 1px solid var(--hsot-gray-2); }
2429
+ .slot .seed {
2430
+ flex: none; width: 1.3rem; text-align: right; font-family: var(--hsot-heading-font);
2431
+ font-size: 0.75rem; color: var(--hsot-gray-5); font-variant-numeric: tabular-nums;
2432
+ }
2433
+ .slot .swatch { margin-right: 0; }
2434
+ .slot .tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2435
+ .slot .tname a { color: inherit; text-decoration: none; font-weight: 500; }
2436
+ .slot .tname a:hover { text-decoration: underline; }
2437
+ .slot .tname.bye { font-style: italic; color: var(--hsot-gray-5); }
2438
+ .slot .score {
2439
+ flex: none; min-width: 1.6rem; text-align: right; font-family: var(--hsot-heading-font);
2440
+ font-weight: 700; font-variant-numeric: tabular-nums;
2441
+ }
2442
+ .slot.winner .tname a, .slot.winner .tname { font-weight: 700; }
2443
+ .slot.winner .score { color: var(--hsot-red-deep); }
2444
+ .slot.loser { color: var(--hsot-gray-5); }
2445
+ .mfoot {
2446
+ display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.6rem;
2447
+ background: var(--hsot-gray-1); border-top: 1px solid var(--hsot-gray-2); font-size: 0.75rem;
2448
+ }
2449
+ .mfoot .spacer { flex: 1; }
2450
+ .mfoot .label { color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
2451
+ .champ {
2452
+ display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem;
2453
+ font-family: var(--hsot-heading-font); font-size: 1.05rem;
2454
+ }
2455
+ .champ .tname a { color: inherit; text-decoration: none; font-weight: 700; }
2456
+ @media (max-width: 720px) { .round { flex-basis: 215px; } }
2457
+ `;
2458
+ class me extends b {
2459
+ static styles = [U, Ts];
2460
+ static properties = {
2461
+ ...b.properties,
2462
+ sport: { type: String },
2463
+ season: { type: String },
2464
+ tournamentId: { type: String, attribute: "tournament-id" },
2465
+ picked: { state: !0 },
2466
+ group: { state: !0 }
2467
+ };
2468
+ constructor() {
2469
+ super(), this.sport = "football", this.season = "", this.tournamentId = "", this.picked = "", this.group = null;
2470
+ }
2471
+ async fetchData(t) {
2472
+ const e = this.season || Y(), s = (await t.listTournaments({ sport: this.sport, season: e })).items, r = new URLSearchParams(globalThis.location?.search || "").get("tournament"), o = As(s, { id: this.picked || this.tournamentId, param: r });
2473
+ if (!o) return { season: e, tournaments: s, tournament: null };
2474
+ const [n, i, l, c, d] = await Promise.all([
2475
+ t.listSeedings(o.id),
2476
+ t.listEdges(o.id),
2477
+ t.listGames({ tournamentId: o.id }),
2478
+ t.listSchools(),
2479
+ t.listTeams({ sport: this.sport })
2480
+ ]);
2481
+ return {
2482
+ season: e,
2483
+ tournaments: s,
2484
+ tournament: o,
2485
+ seedings: n.items,
2486
+ edges: i.items,
2487
+ games: l.items,
2488
+ schools: c.items,
2489
+ teams: d.items
2490
+ };
2491
+ }
2492
+ get ctx() {
2493
+ return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
2494
+ teamsById: $(this.data.teams),
2495
+ schoolsById: $(this.data.schools),
2496
+ records: {},
2497
+ rankings: [],
2498
+ hrefs: O(this),
2499
+ sport: this.sport
2500
+ }, this._ctxData = this.data), this._ctx;
2501
+ }
2502
+ /** Switch tournaments: remember the pick, deep-link it, reload the scoped data. */
2503
+ pick(t) {
2504
+ if (t !== this.data?.tournament?.id) {
2505
+ this.picked = t, this.group = null;
2506
+ try {
2507
+ const e = new URL(globalThis.location.href);
2508
+ e.searchParams.set("tournament", t), globalThis.history?.replaceState(null, "", e);
2509
+ } catch {
2510
+ }
2511
+ this.load();
2512
+ }
2513
+ }
2514
+ renderView() {
2515
+ const t = this.data, e = this.ctx, s = it(this, e, {
2516
+ title: h`${B(this.sport)} playoff brackets`,
2517
+ sub: t.tournament ? h`${t.tournament.name} · ${t.season} season` : h`${t.season} season`,
2518
+ teams: t.teams
2519
+ });
2520
+ if (!t.tournament)
2521
+ return h`${s}${P(this, h`
2522
+ ${D(this)}
2523
+ <div class="card"><div class="empty">No ${this.sport} brackets have been published for the ${t.season} season yet.</div></div>
2524
+ `)}`;
2525
+ const r = ys(t.tournament, t.games), o = r.find((p) => p.key === this.group) || r[0], n = (t.tournament.groupNames || []).length >= 2 ? t.tournament.groupNames.length : 1, i = (Number(t.tournament.size) || 0) / n, l = ks(t.games, t.edges, o), c = bs(t.games), d = _s(t.games, t.edges);
2526
+ return h`
2527
+ ${s}
2528
+ ${P(this, h`
2529
+ ${D(this)}
2530
+ <div class="toolbar">
2531
+ ${t.tournaments.length > 1 ? h`
2532
+ <div role="group" aria-label="Tournament">
2533
+ ${t.tournaments.map((p) => h`<button class="chip ${p.id === t.tournament.id ? "on" : ""}"
2534
+ @click=${() => this.pick(p.id)}>${p.name}</button>`)}
2535
+ </div>` : m}
2536
+ ${r.length > 1 ? h`
2537
+ <div role="tablist" aria-label="Bracket group">
2538
+ ${r.map((p) => h`<button class="chip ${p.key === o.key ? "on" : ""}" role="tab"
2539
+ aria-selected=${p.key === o.key ? "true" : "false"}
2540
+ @click=${() => {
2541
+ this.group = p.key;
2542
+ }}>${p.name}</button>`)}
2543
+ </div>` : m}
2544
+ <span class="spacer"></span>
2545
+ <span class="pill ${c === "complete" ? "final" : c === "active" ? "class" : "type"}">${c === "complete" ? "Complete" : c === "active" ? "In progress" : "Bracket set"}</span>
2546
+ <span class="asof">${t.tournament.size}-team ${String(t.tournament.format || "").replace(/_/g, " ")}</span>
2547
+ </div>
2548
+ ${d ? h`<div class="champ"><span class="pill champ">Champion</span>
2549
+ ${E(C(e, d), 26)}<span class="tname">${st(e, d)}</span></div>` : m}
2550
+ ${l.length ? h`
2551
+ <div class="bracket" role="region" aria-label="${o.name} bracket">
2552
+ ${l.map((p) => h`
2553
+ <section class="round">
2554
+ <h3 class="roundhead">${$s({ round: p.round, perGroup: i, groupCount: n })}</h3>
2555
+ <div class="games">${p.games.map((u) => this.renderMatchup(e, u))}</div>
2556
+ </section>`)}
2557
+ </div>` : h`<div class="card"><div class="empty">This bracket has no games yet.</div></div>`}
2558
+ `)}
2559
+ `;
2560
+ }
2561
+ renderMatchup(t, e) {
2562
+ const s = e.homeTeamId && e.awayTeamId || e.state === "final" || e.state === "live";
2563
+ return h`
2564
+ <article class="matchup ${e.state}" aria-label="${e.label || "Matchup"}">
2565
+ ${this.renderSlot(t, e, "home")}
2566
+ ${this.renderSlot(t, e, "away")}
2567
+ <footer class="mfoot">
2568
+ ${W(e)}
2569
+ ${e.label ? h`<span class="label">${e.label}</span>` : m}
2570
+ <span class="spacer"></span>
2571
+ ${s ? h`<a class="box" href=${v(t.hrefs.game, { sport: this.sport, id: e.id })}>Box score</a>` : m}
2572
+ </footer>
2573
+ </article>
2574
+ `;
2575
+ }
2576
+ renderSlot(t, e, s) {
2577
+ const { teamId: r, seed: o, bye: n } = Ss(e, s, this.data.seedings), i = pe(e), l = e.state === "live" || e.state === "final";
2578
+ return h`
2579
+ <div class="slot ${i ? i === s ? "winner" : "loser" : ""}">
2580
+ <span class="seed">${o ?? ""}</span>
2581
+ ${r ? h`${E(C(t, r), 22)}<span class="tname">${st(t, r, e.date)}</span>` : n ? h`<span class="tname bye">Bye</span>` : h`<span class="tname mut">TBD</span>`}
2582
+ ${l ? h`<span class="score">${e[`${s}Score`] ?? 0}</span>` : m}
2583
+ </div>
2584
+ `;
2585
+ }
2586
+ }
2587
+ globalThis?.customElements && !globalThis.customElements.get("hsot-brackets") && globalThis.customElements.define("hsot-brackets", me);
2588
+ const Is = {
2589
+ "hsot-scores": ee,
2590
+ "hsot-standings": se,
2591
+ "hsot-rankings": ae,
2592
+ "hsot-school": re,
2593
+ "hsot-boxscore": le,
2594
+ "hsot-school-search": ce,
2595
+ "hsot-brackets": me
2315
2596
  };
2316
- function ds() {
2597
+ function Cs() {
2317
2598
  const a = globalThis?.customElements;
2318
2599
  if (a)
2319
- for (const [t, e] of Object.entries(hs))
2600
+ for (const [t, e] of Object.entries(Is))
2320
2601
  a.get(t) || a.define(t, e);
2321
2602
  }
2322
- typeof window < "u" && globalThis.customElements && ds();
2603
+ typeof window < "u" && globalThis.customElements && Cs();
2323
2604
  export {
2324
- ds as defineAll
2605
+ Cs as defineAll
2325
2606
  };