@wral/hsot-data 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const j = globalThis, nt = j.ShadowRoot && (j.ShadyCSS === void 0 || j.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lt = /* @__PURE__ */ Symbol(), $t = /* @__PURE__ */ new WeakMap();
1
+ const j = globalThis, nt = j.ShadowRoot && (j.ShadyCSS === void 0 || j.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lt = /* @__PURE__ */ Symbol(), vt = /* @__PURE__ */ new WeakMap();
2
2
  let Dt = class {
3
3
  constructor(t, e, s) {
4
4
  if (this._$cssResult$ = !0, s !== lt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -9,7 +9,7 @@ let Dt = class {
9
9
  const e = this.t;
10
10
  if (nt && t === void 0) {
11
11
  const s = e !== void 0 && e.length === 1;
12
- s && (t = $t.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && $t.set(e, t));
12
+ s && (t = vt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && vt.set(e, t));
13
13
  }
14
14
  return t;
15
15
  }
@@ -30,12 +30,12 @@ const qt = (r) => new Dt(typeof r == "string" ? r : r + "", void 0, lt), w = (r,
30
30
  const s = document.createElement("style"), a = j.litNonce;
31
31
  a !== void 0 && s.setAttribute("nonce", a), s.textContent = e.cssText, r.appendChild(s);
32
32
  }
33
- }, vt = nt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
33
+ }, $t = nt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
34
34
  let e = "";
35
35
  for (const s of t.cssRules) e += s.cssText;
36
36
  return qt(e);
37
37
  })(r) : r;
38
- const { is: Kt, defineProperty: Zt, getOwnPropertyDescriptor: Jt, getOwnPropertyNames: Qt, getOwnPropertySymbols: Xt, getPrototypeOf: te } = Object, K = globalThis, yt = K.trustedTypes, ee = yt ? yt.emptyScript : "", se = K.reactiveElementPolyfillSupport, D = (r, t) => r, rt = { toAttribute(r, t) {
38
+ const { is: Kt, defineProperty: Qt, getOwnPropertyDescriptor: Zt, getOwnPropertyNames: Jt, getOwnPropertySymbols: Xt, getPrototypeOf: te } = Object, K = globalThis, yt = K.trustedTypes, ee = yt ? yt.emptyScript : "", se = K.reactiveElementPolyfillSupport, D = (r, t) => r, rt = { toAttribute(r, t) {
39
39
  switch (t) {
40
40
  case Boolean:
41
41
  r = r ? ee : null;
@@ -75,11 +75,11 @@ let T = class extends HTMLElement {
75
75
  static createProperty(t, e = bt) {
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(), a = this.getPropertyDescriptor(t, s, e);
78
- a !== void 0 && Zt(this.prototype, t, a);
78
+ a !== void 0 && Qt(this.prototype, t, a);
79
79
  }
80
80
  }
81
81
  static getPropertyDescriptor(t, e, s) {
82
- const { get: a, set: o } = Jt(this.prototype, t) ?? { get() {
82
+ const { get: a, set: o } = Zt(this.prototype, t) ?? { get() {
83
83
  return this[e];
84
84
  }, set(i) {
85
85
  this[e] = i;
@@ -100,7 +100,7 @@ let T = class extends HTMLElement {
100
100
  static finalize() {
101
101
  if (this.hasOwnProperty(D("finalized"))) return;
102
102
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(D("properties"))) {
103
- const e = this.properties, s = [...Qt(e), ...Xt(e)];
103
+ const e = this.properties, s = [...Jt(e), ...Xt(e)];
104
104
  for (const a of s) this.createProperty(a, e[a]);
105
105
  }
106
106
  const t = this[Symbol.metadata];
@@ -119,8 +119,8 @@ let T = 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 a of s) e.unshift(vt(a));
123
- } else t !== void 0 && e.push(vt(t));
122
+ for (const a of s) e.unshift($t(a));
123
+ } else t !== void 0 && e.push($t(t));
124
124
  return e;
125
125
  }
126
126
  static _$Eu(t, e) {
@@ -247,10 +247,10 @@ let T = class extends HTMLElement {
247
247
  }
248
248
  };
249
249
  T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[D("elementProperties")] = /* @__PURE__ */ new Map(), T[D("finalized")] = /* @__PURE__ */ new Map(), se?.({ ReactiveElement: T }), (K.reactiveElementVersions ??= []).push("2.1.2");
250
- const ct = globalThis, wt = (r) => r, G = ct.trustedTypes, xt = G ? G.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, zt = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, Bt = "?" + _, ae = `<${Bt}>`, A = document, z = () => A.createComment(""), B = (r) => r === null || typeof r != "object" && typeof r != "function", dt = Array.isArray, re = (r) => dt(r) || typeof r?.[Symbol.iterator] == "function", st = `[
250
+ const ct = globalThis, wt = (r) => r, W = ct.trustedTypes, xt = W ? W.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, zt = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, Bt = "?" + _, ae = `<${Bt}>`, A = document, z = () => A.createComment(""), B = (r) => r === null || typeof r != "object" && typeof r != "function", dt = Array.isArray, re = (r) => dt(r) || typeof r?.[Symbol.iterator] == "function", st = `[
251
251
  \f\r]`, E = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _t = /-->/g, kt = />/g, k = RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, At = /"/g, Ot = /^(?:script|style|textarea|title)$/i, Nt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), c = Nt(1), Tt = Nt(2), I = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), It = /* @__PURE__ */ new WeakMap(), S = A.createTreeWalker(A, 129);
253
- function Ut(r, t) {
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, At = /"/g, Ut = /^(?:script|style|textarea|title)$/i, Ot = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), d = Ot(1), Tt = Ot(2), I = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), It = /* @__PURE__ */ new WeakMap(), S = A.createTreeWalker(A, 129);
253
+ function Ft(r, t) {
254
254
  if (!dt(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
255
  return xt !== void 0 ? xt.createHTML(t) : t;
256
256
  }
@@ -258,42 +258,42 @@ const oe = (r, t) => {
258
258
  const e = r.length - 1, s = [];
259
259
  let a, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = E;
260
260
  for (let n = 0; n < e; n++) {
261
- const l = r[n];
262
- let p, h, d = -1, f = 0;
263
- for (; f < l.length && (i.lastIndex = f, h = i.exec(l), h !== null); ) f = i.lastIndex, i === E ? h[1] === "!--" ? i = _t : h[1] !== void 0 ? i = kt : h[2] !== void 0 ? (Ot.test(h[2]) && (a = RegExp("</" + h[2], "g")), i = k) : h[3] !== void 0 && (i = k) : i === k ? h[0] === ">" ? (i = a ?? E, d = -1) : h[1] === void 0 ? d = -2 : (d = i.lastIndex - h[2].length, p = h[1], i = h[3] === void 0 ? k : h[3] === '"' ? At : St) : i === At || i === St ? i = k : i === _t || i === kt ? i = E : (i = k, a = void 0);
261
+ const c = r[n];
262
+ let p, l, h = -1, f = 0;
263
+ for (; f < c.length && (i.lastIndex = f, l = i.exec(c), l !== null); ) f = i.lastIndex, i === E ? l[1] === "!--" ? i = _t : l[1] !== void 0 ? i = kt : l[2] !== void 0 ? (Ut.test(l[2]) && (a = RegExp("</" + l[2], "g")), i = k) : l[3] !== void 0 && (i = k) : i === k ? l[0] === ">" ? (i = a ?? E, h = -1) : l[1] === void 0 ? h = -2 : (h = i.lastIndex - l[2].length, p = l[1], i = l[3] === void 0 ? k : l[3] === '"' ? At : St) : i === At || i === St ? i = k : i === _t || i === kt ? i = E : (i = k, a = void 0);
264
264
  const u = i === k && r[n + 1].startsWith("/>") ? " " : "";
265
- o += i === E ? l + ae : d >= 0 ? (s.push(p), l.slice(0, d) + zt + l.slice(d) + _ + u) : l + _ + (d === -2 ? n : u);
265
+ o += i === E ? c + ae : h >= 0 ? (s.push(p), c.slice(0, h) + zt + c.slice(h) + _ + u) : c + _ + (h === -2 ? n : u);
266
266
  }
267
- return [Ut(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
267
+ return [Ft(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
268
268
  };
269
- class O {
269
+ class U {
270
270
  constructor({ strings: t, _$litType$: e }, s) {
271
271
  let a;
272
272
  this.parts = [];
273
273
  let o = 0, i = 0;
274
- const n = t.length - 1, l = this.parts, [p, h] = oe(t, e);
275
- if (this.el = O.createElement(p, s), S.currentNode = this.el.content, e === 2 || e === 3) {
276
- const d = this.el.content.firstChild;
277
- d.replaceWith(...d.childNodes);
274
+ const n = t.length - 1, c = this.parts, [p, l] = oe(t, e);
275
+ if (this.el = U.createElement(p, s), S.currentNode = this.el.content, e === 2 || e === 3) {
276
+ const h = this.el.content.firstChild;
277
+ h.replaceWith(...h.childNodes);
278
278
  }
279
- for (; (a = S.nextNode()) !== null && l.length < n; ) {
279
+ for (; (a = S.nextNode()) !== null && c.length < n; ) {
280
280
  if (a.nodeType === 1) {
281
- if (a.hasAttributes()) for (const d of a.getAttributeNames()) if (d.endsWith(zt)) {
282
- const f = h[i++], u = a.getAttribute(d).split(_), v = /([.?@])?(.*)/.exec(f);
283
- l.push({ type: 1, index: o, name: v[2], strings: u, ctor: v[1] === "." ? ne : v[1] === "?" ? le : v[1] === "@" ? ce : Z }), a.removeAttribute(d);
284
- } else d.startsWith(_) && (l.push({ type: 6, index: o }), a.removeAttribute(d));
285
- if (Ot.test(a.tagName)) {
286
- const d = a.textContent.split(_), f = d.length - 1;
281
+ if (a.hasAttributes()) for (const h of a.getAttributeNames()) if (h.endsWith(zt)) {
282
+ const f = l[i++], u = a.getAttribute(h).split(_), $ = /([.?@])?(.*)/.exec(f);
283
+ c.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? ne : $[1] === "?" ? le : $[1] === "@" ? ce : Q }), a.removeAttribute(h);
284
+ } else h.startsWith(_) && (c.push({ type: 6, index: o }), a.removeAttribute(h));
285
+ if (Ut.test(a.tagName)) {
286
+ const h = a.textContent.split(_), f = h.length - 1;
287
287
  if (f > 0) {
288
- a.textContent = G ? G.emptyScript : "";
289
- for (let u = 0; u < f; u++) a.append(d[u], z()), S.nextNode(), l.push({ type: 2, index: ++o });
290
- a.append(d[f], z());
288
+ a.textContent = W ? W.emptyScript : "";
289
+ for (let u = 0; u < f; u++) a.append(h[u], z()), S.nextNode(), c.push({ type: 2, index: ++o });
290
+ a.append(h[f], z());
291
291
  }
292
292
  }
293
- } else if (a.nodeType === 8) if (a.data === Bt) l.push({ type: 2, index: o });
293
+ } else if (a.nodeType === 8) if (a.data === Bt) c.push({ type: 2, index: o });
294
294
  else {
295
- let d = -1;
296
- for (; (d = a.data.indexOf(_, d + 1)) !== -1; ) l.push({ type: 7, index: o }), d += _.length - 1;
295
+ let h = -1;
296
+ for (; (h = a.data.indexOf(_, h + 1)) !== -1; ) c.push({ type: 7, index: o }), h += _.length - 1;
297
297
  }
298
298
  o++;
299
299
  }
@@ -322,13 +322,13 @@ class ie {
322
322
  u(t) {
323
323
  const { el: { content: e }, parts: s } = this._$AD, a = (t?.creationScope ?? A).importNode(e, !0);
324
324
  S.currentNode = a;
325
- let o = S.nextNode(), i = 0, n = 0, l = s[0];
326
- for (; l !== void 0; ) {
327
- if (i === l.index) {
325
+ let o = S.nextNode(), i = 0, n = 0, c = s[0];
326
+ for (; c !== void 0; ) {
327
+ if (i === c.index) {
328
328
  let p;
329
- l.type === 2 ? p = new F(o, o.nextSibling, this, t) : l.type === 1 ? p = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (p = new de(o, this, t)), this._$AV.push(p), l = s[++n];
329
+ c.type === 2 ? p = new N(o, o.nextSibling, this, t) : c.type === 1 ? p = new c.ctor(o, c.name, c.strings, this, t) : c.type === 6 && (p = new de(o, this, t)), this._$AV.push(p), c = s[++n];
330
330
  }
331
- i !== l?.index && (o = S.nextNode(), i++);
331
+ i !== c?.index && (o = S.nextNode(), i++);
332
332
  }
333
333
  return S.currentNode = A, a;
334
334
  }
@@ -337,7 +337,7 @@ class ie {
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 F {
340
+ class N {
341
341
  get _$AU() {
342
342
  return this._$AM?._$AU ?? this._$Cv;
343
343
  }
@@ -368,7 +368,7 @@ class F {
368
368
  this._$AH !== m && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
369
369
  }
370
370
  $(t) {
371
- const { values: e, _$litType$: s } = t, a = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(Ut(s.h, s.h[0]), this.options)), s);
371
+ const { values: e, _$litType$: s } = t, a = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = U.createElement(Ft(s.h, s.h[0]), this.options)), s);
372
372
  if (this._$AH?._$AD === a) this._$AH.p(e);
373
373
  else {
374
374
  const o = new ie(a, this), i = o.u(this.options);
@@ -377,13 +377,13 @@ class F {
377
377
  }
378
378
  _$AC(t) {
379
379
  let e = It.get(t.strings);
380
- return e === void 0 && It.set(t.strings, e = new O(t)), e;
380
+ return e === void 0 && It.set(t.strings, e = new U(t)), e;
381
381
  }
382
382
  k(t) {
383
383
  dt(this._$AH) || (this._$AH = [], this._$AR());
384
384
  const e = this._$AH;
385
385
  let s, a = 0;
386
- for (const o of t) a === e.length ? e.push(s = new F(this.O(z()), this.O(z()), this, this.options)) : s = e[a], s._$AI(o), a++;
386
+ for (const o of t) a === e.length ? e.push(s = new N(this.O(z()), this.O(z()), this, this.options)) : s = e[a], s._$AI(o), a++;
387
387
  a < e.length && (this._$AR(s && s._$AB.nextSibling, a), e.length = a);
388
388
  }
389
389
  _$AR(t = this._$AA.nextSibling, e) {
@@ -396,7 +396,7 @@ class F {
396
396
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
397
397
  }
398
398
  }
399
- class Z {
399
+ class Q {
400
400
  get tagName() {
401
401
  return this.element.tagName;
402
402
  }
@@ -412,8 +412,8 @@ class Z {
412
412
  if (o === void 0) t = C(this, t, e, 0), i = !B(t) || t !== this._$AH && t !== I, i && (this._$AH = t);
413
413
  else {
414
414
  const n = t;
415
- let l, p;
416
- for (t = o[0], l = 0; l < o.length - 1; l++) p = C(this, n[s + l], e, l), p === I && (p = this._$AH[l]), i ||= !B(p) || p !== this._$AH[l], p === m ? t = m : t !== m && (t += (p ?? "") + o[l + 1]), this._$AH[l] = p;
415
+ let c, p;
416
+ for (t = o[0], c = 0; c < o.length - 1; c++) p = C(this, n[s + c], e, c), p === I && (p = this._$AH[c]), i ||= !B(p) || p !== this._$AH[c], p === m ? t = m : t !== m && (t += (p ?? "") + o[c + 1]), this._$AH[c] = p;
417
417
  }
418
418
  i && !a && this.j(t);
419
419
  }
@@ -421,7 +421,7 @@ class Z {
421
421
  t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
422
422
  }
423
423
  }
424
- class ne extends Z {
424
+ class ne extends Q {
425
425
  constructor() {
426
426
  super(...arguments), this.type = 3;
427
427
  }
@@ -429,7 +429,7 @@ class ne extends Z {
429
429
  this.element[this.name] = t === m ? void 0 : t;
430
430
  }
431
431
  }
432
- class le extends Z {
432
+ class le extends Q {
433
433
  constructor() {
434
434
  super(...arguments), this.type = 4;
435
435
  }
@@ -437,7 +437,7 @@ class le extends Z {
437
437
  this.element.toggleAttribute(this.name, !!t && t !== m);
438
438
  }
439
439
  }
440
- class ce extends Z {
440
+ class ce extends Q {
441
441
  constructor(t, e, s, a, o) {
442
442
  super(t, e, s, a, o), this.type = 5;
443
443
  }
@@ -462,13 +462,13 @@ class de {
462
462
  }
463
463
  }
464
464
  const he = ct.litHtmlPolyfillSupport;
465
- he?.(O, F), (ct.litHtmlVersions ??= []).push("3.3.3");
465
+ he?.(U, N), (ct.litHtmlVersions ??= []).push("3.3.3");
466
466
  const pe = (r, t, e) => {
467
467
  const s = e?.renderBefore ?? t;
468
468
  let a = s._$litPart$;
469
469
  if (a === void 0) {
470
470
  const o = e?.renderBefore ?? null;
471
- s._$litPart$ = a = new F(t.insertBefore(z(), o), o, void 0, e ?? {});
471
+ s._$litPart$ = a = new N(t.insertBefore(z(), o), o, void 0, e ?? {});
472
472
  }
473
473
  return a._$AI(r), a;
474
474
  };
@@ -510,21 +510,21 @@ function ge({ baseUrl: r, token: t = "", fetchFn: e } = {}) {
510
510
  if (!r) throw new Error("createClient requires a baseUrl");
511
511
  const s = r.replace(/\/+$/, ""), a = e || ((...n) => fetch(...n));
512
512
  async function o(n) {
513
- const l = { Accept: "application/json" };
514
- t && (l.Authorization = `Bearer ${t}`);
515
- const p = await a(`${s}${n}`, { headers: l });
513
+ const c = { Accept: "application/json" };
514
+ t && (c.Authorization = `Bearer ${t}`);
515
+ const p = await a(`${s}${n}`, { headers: c });
516
516
  if (!p.ok) {
517
- const h = new Error(`api-hsot ${p.status} on ${n}`);
518
- throw h.status = p.status, h;
517
+ const l = new Error(`api-hsot ${p.status} on ${n}`);
518
+ throw l.status = p.status, l;
519
519
  }
520
520
  return p.json();
521
521
  }
522
- async function i(n, l = {}) {
522
+ async function i(n, c = {}) {
523
523
  const p = [];
524
- let h = null;
525
- for (let d = 0; d < fe; d += 1) {
526
- const f = ue(h ? { ...l, cursor: h } : l), u = await o(`${n}${f}`);
527
- if (p.push(...u.items || []), h = u.nextCursor || null, !h) break;
524
+ let l = null;
525
+ for (let h = 0; h < fe; h += 1) {
526
+ const f = ue(l ? { ...c, cursor: l } : c), u = await o(`${n}${f}`);
527
+ if (p.push(...u.items || []), l = u.nextCursor || null, !l) break;
528
528
  }
529
529
  return { items: p, total: p.length, nextCursor: null };
530
530
  }
@@ -539,7 +539,7 @@ function ge({ baseUrl: r, token: t = "", fetchFn: e } = {}) {
539
539
  listGames: (n) => i("/games", n),
540
540
  getGame: (n) => o(`/games/${n}`),
541
541
  listTournaments: (n) => i("/tournaments", n),
542
- listSeedings: (n, l) => i(`/tournaments/${n}/seedings`, l),
542
+ listSeedings: (n, c) => i(`/tournaments/${n}/seedings`, c),
543
543
  listRankings: (n) => i("/rankings", n),
544
544
  listSports: () => o("/sports")
545
545
  };
@@ -601,13 +601,13 @@ class b extends R {
601
601
  this._refreshId && (clearInterval(this._refreshId), this._refreshId = null);
602
602
  }
603
603
  render() {
604
- return this.error === "not-configured" ? c`<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 ? c`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : c`<div class="loading" role="status">Loading…</div>`;
604
+ return this.error === "not-configured" ? d`<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 ? d`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : d`<div class="loading" role="status">Loading…</div>`;
605
605
  }
606
606
  renderView() {
607
- return c``;
607
+ return d``;
608
608
  }
609
609
  }
610
- const g = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), $e = w`
610
+ const g = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), ve = w`
611
611
  :host {
612
612
  --hsot-red: var(--color-red, #D1232A);
613
613
  --hsot-red-deep: var(--color-red-dark, #951C21);
@@ -641,7 +641,7 @@ const g = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), $e = w`
641
641
  outline-offset: 1px;
642
642
  }
643
643
  .mut { color: var(--hsot-gray-5); }
644
- `, ve = w`
644
+ `, $e = w`
645
645
  .band { background: var(--hsot-white); color: var(--hsot-black); }
646
646
  .band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
647
647
  .band h1, .band h2.bandtitle {
@@ -778,7 +778,7 @@ const g = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), $e = w`
778
778
  .gamelist .opp a:hover { text-decoration: underline; }
779
779
  .gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
780
780
  .gamelist a.box { font-size: 0.78rem; }
781
- `, H = [$e, ve, ye, be, we, xe, _e];
781
+ `, H = [ve, $e, ye, be, we, xe, _e];
782
782
  function pt(r) {
783
783
  return r.state !== "final" ? null : r.forfeit && r.forfeit !== "none" ? r.forfeit : r.homeScore > r.awayScore ? "home" : r.awayScore > r.homeScore ? "away" : r.tiebreakWinner && r.tiebreakWinner !== "none" ? r.tiebreakWinner : "tie";
784
784
  }
@@ -786,18 +786,18 @@ function M(r, t) {
786
786
  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]), a = r.filter((o) => o.state === "final" && o.gameType !== "scrimmage" && !0).sort((o, i) => String(o.date).localeCompare(String(i.date)));
787
787
  for (const o of a) {
788
788
  const i = pt(o), n = o.gameType === "conference";
789
- for (const l of ["home", "away"]) {
790
- const p = l === "home" ? o.homeTeamId : o.awayTeamId;
789
+ for (const c of ["home", "away"]) {
790
+ const p = c === "home" ? o.homeTeamId : o.awayTeamId;
791
791
  if (!p) continue;
792
- const h = s(p), d = l === "home" ? o.homeScore : o.awayScore, f = l === "home" ? o.awayScore : o.homeScore;
793
- h.pf += d, h.pa += f;
792
+ const l = s(p), h = c === "home" ? o.homeScore : o.awayScore, f = c === "home" ? o.awayScore : o.homeScore;
793
+ l.pf += h, l.pa += f;
794
794
  let u = "T";
795
- i === "tie" ? (h.t += 1, n && (h.ct += 1)) : i === l ? (h.w += 1, n && (h.cw += 1), u = "W") : (h.l += 1, n && (h.cl += 1), u = "L"), h.results.push({ gameId: o.id, date: o.date, mark: u, my: d, their: f, opp: l === "home" ? o.awayTeamId : o.homeTeamId, conf: n });
795
+ i === "tie" ? (l.t += 1, n && (l.ct += 1)) : i === c ? (l.w += 1, n && (l.cw += 1), u = "W") : (l.l += 1, n && (l.cl += 1), u = "L"), l.results.push({ gameId: o.id, date: o.date, mark: u, my: h, their: f, opp: c === "home" ? o.awayTeamId : o.homeTeamId, conf: n });
796
796
  }
797
797
  }
798
798
  return e;
799
799
  }
800
- function J(r) {
800
+ function Z(r) {
801
801
  if (!r || !r.length) return "";
802
802
  const t = r[r.length - 1].mark;
803
803
  let e = 0;
@@ -813,7 +813,7 @@ function x(r, t = !1) {
813
813
  const e = t ? r.cw : r.w, s = t ? r.cl : r.l, a = t ? r.ct : r.t;
814
814
  return `${e}-${s}${a ? `-${a}` : ""}`;
815
815
  }
816
- function Ft(r, t) {
816
+ function Nt(r, t) {
817
817
  return r.map((e) => {
818
818
  const s = t[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] };
819
819
  return { team: e, rec: s, confPct: Ct(s.cw, s.cl, s.ct), overallPct: Ct(s.w, s.l, s.t) };
@@ -831,7 +831,7 @@ const at = {
831
831
  school: "/school/{id}/",
832
832
  section: "/{sport}/{view}/"
833
833
  };
834
- function $(r, t) {
834
+ function v(r, t) {
835
835
  return String(r).replace(/\{(\w+)\}/g, (e, s) => t[s] !== void 0 && t[s] !== null ? String(t[s]) : e);
836
836
  }
837
837
  function L(r) {
@@ -841,7 +841,7 @@ function L(r) {
841
841
  section: r.getAttribute("section-href") || at.section
842
842
  };
843
843
  }
844
- const Q = (r) => r ? r.charAt(0).toUpperCase() + r.slice(1) : "";
844
+ const J = (r) => r ? r.charAt(0).toUpperCase() + r.slice(1) : "";
845
845
  function y(r, t) {
846
846
  if (!r) return "TBD";
847
847
  const [e, s, a] = String(r).split("-").map(Number);
@@ -868,7 +868,7 @@ function ot(r = /* @__PURE__ */ new Date()) {
868
868
  function ft(r) {
869
869
  return r ? (r.abbr || r.name || "?").slice(0, 4).toUpperCase() : "?";
870
870
  }
871
- function W(r) {
871
+ function V(r) {
872
872
  if (!r || !/^#[0-9a-fA-F]{6}$/.test(r)) return "#FFFFFF";
873
873
  const t = parseInt(r.slice(1), 16), e = t >> 16 & 255, s = t >> 8 & 255, a = t & 255;
874
874
  return 0.299 * e + 0.587 * s + 0.114 * a > 150 ? "#0F1B33" : "#FFFFFF";
@@ -889,15 +889,15 @@ function Ht(r, t, e, s, a) {
889
889
  const o = t[e];
890
890
  if (!o) return null;
891
891
  const i = /* @__PURE__ */ new Map();
892
- for (const l of r || []) {
893
- if (l.sport !== s || a && l.effectiveDate > a || l.gender && o.gender !== l.gender && o.gender !== "coed") continue;
894
- const p = l.gender || "", h = i.get(p);
895
- (!h || l.effectiveDate > h.effectiveDate) && i.set(p, l);
892
+ for (const c of r || []) {
893
+ if (c.sport !== s || a && c.effectiveDate > a || c.gender && o.gender !== c.gender && o.gender !== "coed") continue;
894
+ const p = c.gender || "", l = i.get(p);
895
+ (!l || c.effectiveDate > l.effectiveDate) && i.set(p, c);
896
896
  }
897
897
  let n = null;
898
- for (const l of i.values()) {
899
- const p = (l.teamIds || []).indexOf(e);
900
- p !== -1 && (!n || l.effectiveDate > n.effectiveDate) && (n = { poll: l, rank: p + 1 });
898
+ for (const c of i.values()) {
899
+ const p = (c.teamIds || []).indexOf(e);
900
+ p !== -1 && (!n || c.effectiveDate > n.effectiveDate) && (n = { poll: c, rank: p + 1 });
901
901
  }
902
902
  return n ? n.rank : null;
903
903
  }
@@ -914,53 +914,53 @@ function Te(r, t, e) {
914
914
  function Ie(r) {
915
915
  return /^https?:\/\//i.test(String(r || ""));
916
916
  }
917
- function V(r, t) {
917
+ function G(r, t) {
918
918
  const e = r?.logoAssetId;
919
919
  if (!Ie(e)) return "";
920
920
  const s = Math.max(1, Math.round(t * 2)), a = e.includes("?") ? "&" : "?";
921
921
  return `${e}${a}w=${s}&h=${s}&f=webp`;
922
922
  }
923
- const N = (r, t) => {
923
+ const O = (r, t) => {
924
924
  const e = r.teamsById[t];
925
925
  return e ? r.schoolsById[e.schoolId] : null;
926
- }, P = (r, t) => N(r, t)?.name || "TBD", q = (r, t) => N(r, t)?.abbr || "TBD";
927
- function U(r, t = 26) {
926
+ }, P = (r, t) => O(r, t)?.name || "TBD", q = (r, t) => O(r, t)?.abbr || "TBD";
927
+ function F(r, t = 26) {
928
928
  if (!r) return m;
929
- const e = V(r, t);
929
+ const e = G(r, t);
930
930
  if (e)
931
- return c`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
931
+ return d`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
932
932
  src=${e} style="width:${t}px;height:${t}px" />`;
933
- const s = r.colorPrimary || "#030711", a = W(s);
934
- return c`<span class="swatch" aria-hidden="true"
933
+ const s = r.colorPrimary || "#030711", a = V(s);
934
+ return d`<span class="swatch" aria-hidden="true"
935
935
  style="width:${t}px;height:${t}px;background:${s};color:${a};font-size:${Math.max(8, t * 0.28)}px"
936
936
  >${ft(r)}</span>`;
937
937
  }
938
938
  function ut(r, t, e) {
939
939
  const s = Ht(r.rankings, r.teamsById, t, r.sport, e);
940
- return s ? c`<span class="rankbadge">#${s}</span>` : m;
940
+ return s ? d`<span class="rankbadge">#${s}</span>` : m;
941
941
  }
942
942
  function it(r, t, e) {
943
- const s = N(r, t);
944
- return s ? c`${ut(r, t, e)}<a href=${$(r.hrefs.school, { id: s.id })}>${s.name}</a>` : c`<span class="mut">TBD</span>`;
943
+ const s = O(r, t);
944
+ return s ? d`${ut(r, t, e)}<a href=${v(r.hrefs.school, { id: s.id })}>${s.name}</a>` : d`<span class="mut">TBD</span>`;
945
945
  }
946
946
  function gt(r, t, e = 5) {
947
947
  const s = r.records[t];
948
- if (!s || !s.results.length) return c`<span class="mut">·</span>`;
948
+ if (!s || !s.results.length) return d`<span class="mut">·</span>`;
949
949
  const a = s.results.slice(-1 * e);
950
- return c`<span class="dots" role="img" aria-label="last ${a.length} results">
951
- ${a.map((o) => c`<a class="dot ${o.mark}"
950
+ return d`<span class="dots" role="img" aria-label="last ${a.length} results">
951
+ ${a.map((o) => d`<a class="dot ${o.mark}"
952
952
  title="${o.mark} ${o.my}-${o.their} vs ${P(r, o.opp)}"
953
- href=${$(r.hrefs.game, { sport: r.sport, id: o.gameId })}>${o.mark}</a>`)}
953
+ href=${v(r.hrefs.game, { sport: r.sport, id: o.gameId })}>${o.mark}</a>`)}
954
954
  </span>`;
955
955
  }
956
956
  function Y(r) {
957
957
  const t = Ae(r);
958
- return c`<span class="pill ${t.kind}">${t.label}</span>`;
958
+ return d`<span class="pill ${t.kind}">${t.label}</span>`;
959
959
  }
960
960
  function Mt(r, t, e) {
961
- if (!t) return c`<span class="mut">·</span>`;
961
+ if (!t) return d`<span class="mut">·</span>`;
962
962
  const s = t.homeTeamId === e ? t.awayTeamId : t.homeTeamId, a = t.homeTeamId === e ? "vs" : "at";
963
- return c`${t.state === "live" ? c`<span class="pill live">Live</span> ` : c`${y(t.date, { month: "numeric", day: "numeric" })} `}${a} ${q(r, s)}`;
963
+ return d`${t.state === "live" ? d`<span class="pill live">Live</span> ` : d`${y(t.date, { month: "numeric", day: "numeric" })} `}${a} ${q(r, s)}`;
964
964
  }
965
965
  class Lt extends b {
966
966
  static styles = H;
@@ -1011,10 +1011,10 @@ class Lt extends b {
1011
1011
  return a.forEach((i) => {
1012
1012
  const n = i.gameType === "conference" && i.conferenceId ? e[i.conferenceId]?.name || "Conference" : i.gameType === "playoff" ? "Playoffs" : i.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
1013
1013
  o.has(n) || o.set(n, []), o.get(n).push(i);
1014
- }), c`
1014
+ }), d`
1015
1015
  <div class="band">
1016
1016
  <div class="inner">
1017
- <h1>${Q(this.sport)} scores &amp; schedules</h1>
1017
+ <h1>${J(this.sport)} scores &amp; schedules</h1>
1018
1018
  <p class="sub">${y(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${a.length} games</p>
1019
1019
  </div>
1020
1020
  </div>
@@ -1024,7 +1024,7 @@ class Lt extends b {
1024
1024
  <select id="datesel" @change=${(i) => {
1025
1025
  this.date = i.target.value;
1026
1026
  }}>
1027
- ${s.map((i) => c`<option value=${i} ?selected=${i === this.date}>
1027
+ ${s.map((i) => d`<option value=${i} ?selected=${i === this.date}>
1028
1028
  ${y(i, { weekday: "short", month: "short", day: "numeric" })}${i === ot() ? " · today" : ""}
1029
1029
  </option>`)}
1030
1030
  </select>
@@ -1039,11 +1039,11 @@ class Lt extends b {
1039
1039
  <span class="spacer"></span>
1040
1040
  <span class="asof">Live games first · report a score to see it update here</span>
1041
1041
  </div>
1042
- ${a.length ? m : c`<p class="empty">No ${this.sport} games on this date.</p>`}
1043
- ${[...o.entries()].map(([i, n]) => c`
1042
+ ${a.length ? m : d`<p class="empty">No ${this.sport} games on this date.</p>`}
1043
+ ${[...o.entries()].map(([i, n]) => d`
1044
1044
  <div class="section-title">${i}</div>
1045
1045
  <div class="card"><ul class="gamelist">
1046
- ${n.map((l) => this.renderGame(t, l))}
1046
+ ${n.map((c) => this.renderGame(t, c))}
1047
1047
  </ul></div>
1048
1048
  `)}
1049
1049
  </div>
@@ -1051,14 +1051,14 @@ class Lt extends b {
1051
1051
  }
1052
1052
  renderGame(t, e) {
1053
1053
  const s = e.state === "final" || e.state === "live" ? `${e.awayScore}-${e.homeScore}` : X(e.time);
1054
- return c`
1054
+ return d`
1055
1055
  <li>
1056
1056
  ${Y(e)}
1057
1057
  <span class="opp">${it(t, e.awayTeamId, e.date)} at ${it(t, e.homeTeamId, e.date)}</span>
1058
1058
  <span class="res" style="width:auto">${s}</span>
1059
1059
  <span class="where">${e.venue || ""}</span>
1060
- ${e.broadcast ? c`<span class="pill class">${e.broadcast}</span>` : m}
1061
- <a class="box" href=${$(t.hrefs.game, { sport: this.sport, id: e.id })}>Box score →</a>
1060
+ ${e.broadcast ? d`<span class="pill class">${e.broadcast}</span>` : m}
1061
+ <a class="box" href=${v(t.hrefs.game, { sport: this.sport, id: e.id })}>Box score →</a>
1062
1062
  </li>
1063
1063
  `;
1064
1064
  }
@@ -1105,17 +1105,17 @@ class jt extends b {
1105
1105
  }
1106
1106
  renderView() {
1107
1107
  const t = this.ctx, e = ["All", ...new Set(this.data.conferences.flatMap((a) => a.classifications || []))].slice(0, 9), s = this.data.conferences.filter((a) => a.active !== !1).filter((a) => this.classFilter === "All" || (a.classifications || []).includes(this.classFilter));
1108
- return c`
1108
+ return d`
1109
1109
  <div class="band">
1110
1110
  <div class="inner">
1111
- <h1>${Q(this.sport)} standings</h1>
1111
+ <h1>${J(this.sport)} standings</h1>
1112
1112
  <p class="sub">${this.data.season} season · every conference, computed live from reported results</p>
1113
1113
  </div>
1114
1114
  </div>
1115
1115
  <div class="view">
1116
1116
  <div class="toolbar">
1117
1117
  <div role="group" aria-label="Classification filter">
1118
- ${e.map((a) => c`<button class="chip ${this.classFilter === a ? "on" : ""}"
1118
+ ${e.map((a) => d`<button class="chip ${this.classFilter === a ? "on" : ""}"
1119
1119
  @click=${() => {
1120
1120
  this.classFilter = a;
1121
1121
  }}>${a}</button>`)}
@@ -1134,12 +1134,12 @@ class jt extends b {
1134
1134
  renderConference(t, e) {
1135
1135
  const s = this.data.teams.filter((i) => i.conferenceId === e.id);
1136
1136
  if (!s.length) return m;
1137
- const a = this.query.trim().toLowerCase(), o = Ft(s, t.records);
1138
- return c`
1137
+ const a = this.query.trim().toLowerCase(), o = Nt(s, t.records);
1138
+ return d`
1139
1139
  <div class="card">
1140
1140
  <div class="card-head">
1141
1141
  <h2>${e.name}</h2>
1142
- ${(e.classifications || []).map((i) => c`<span class="pill class">${i}</span>`)}
1142
+ ${(e.classifications || []).map((i) => d`<span class="pill class">${i}</span>`)}
1143
1143
  <span class="meta">${o.length} teams · membership derives from teams</span>
1144
1144
  </div>
1145
1145
  <div class="tablewrap"><table class="data">
@@ -1158,18 +1158,18 @@ class jt extends b {
1158
1158
  renderRow(t, e, s, a) {
1159
1159
  const o = t.schoolsById[e.team.schoolId], i = o?.name || e.team.name || "TBD";
1160
1160
  if (a && !i.toLowerCase().includes(a)) return m;
1161
- const n = e.rec.pf - e.rec.pa, l = mt(this.data.games, e.team.id), p = (e.team.championships || []).map((d) => c`
1162
- <span class="pill champ" title="${d.season} ${d.title} champion">★ ${d.season} ${d.title}</span>`), h = () => {
1163
- location.href = $(t.hrefs.school, { id: e.team.schoolId });
1161
+ const n = e.rec.pf - e.rec.pa, c = mt(this.data.games, e.team.id), p = (e.team.championships || []).map((h) => d`
1162
+ <span class="pill champ" title="${h.season} ${h.title} champion">★ ${h.season} ${h.title}</span>`), l = () => {
1163
+ location.href = v(t.hrefs.school, { id: e.team.schoolId });
1164
1164
  };
1165
- return c`
1166
- <tr class="rowlink" @click=${(d) => {
1167
- d.target.closest("a") || h();
1165
+ return d`
1166
+ <tr class="rowlink" @click=${(h) => {
1167
+ h.target.closest("a") || l();
1168
1168
  }}>
1169
1169
  <td class="mut">${s + 1}</td>
1170
1170
  <td class="teamcell">
1171
- ${U(o)}${ut(t, e.team.id, null)}
1172
- <a href=${$(t.hrefs.school, { id: e.team.schoolId })}>${i}</a> ${p}
1171
+ ${F(o)}${ut(t, e.team.id, null)}
1172
+ <a href=${v(t.hrefs.school, { id: e.team.schoolId })}>${i}</a> ${p}
1173
1173
  </td>
1174
1174
  <td class="num">${x(e.rec, !0)}</td>
1175
1175
  <td class="num">${Et(e.confPct)}</td>
@@ -1178,9 +1178,9 @@ class jt extends b {
1178
1178
  <td class="num">${e.rec.pf}</td>
1179
1179
  <td class="num">${e.rec.pa}</td>
1180
1180
  <td class="num" style="color:${n >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${n > 0 ? "+" : ""}${n}</td>
1181
- <td>${J(e.rec.results) || "·"}</td>
1181
+ <td>${Z(e.rec.results) || "·"}</td>
1182
1182
  <td>${gt(t, e.team.id)}</td>
1183
- <td>${Mt(t, l, e.team.id)}</td>
1183
+ <td>${Mt(t, c, e.team.id)}</td>
1184
1184
  </tr>
1185
1185
  `;
1186
1186
  }
@@ -1203,7 +1203,7 @@ const Ce = w`
1203
1203
  .delta.new { background: var(--hsot-straw); color: #6b5900; border-radius: var(--hsot-radius-xs); padding: 0.1rem 0.3rem; font-size: 0.7rem; }
1204
1204
  .sparkline { vertical-align: middle; }
1205
1205
  `;
1206
- class Gt extends b {
1206
+ class Wt extends b {
1207
1207
  static styles = [...H, Ce];
1208
1208
  static properties = {
1209
1209
  ...b.properties,
@@ -1227,10 +1227,10 @@ class Gt extends b {
1227
1227
  t.listTeams({ sport: this.sport }),
1228
1228
  t.listConferences(),
1229
1229
  t.listGames({ sport: this.sport, season: e })
1230
- ]), l = s.items.filter((p) => !this.gender || !p.gender || p.gender === this.gender).sort((p, h) => h.effectiveDate.localeCompare(p.effectiveDate));
1230
+ ]), c = s.items.filter((p) => !this.gender || !p.gender || p.gender === this.gender).sort((p, l) => l.effectiveDate.localeCompare(p.effectiveDate));
1231
1231
  return {
1232
1232
  season: e,
1233
- polls: l,
1233
+ polls: c,
1234
1234
  schools: a.items,
1235
1235
  teams: o.items,
1236
1236
  conferences: i.items,
@@ -1248,46 +1248,46 @@ class Gt extends b {
1248
1248
  }, this._ctxData = this.data), this._ctx;
1249
1249
  }
1250
1250
  sparkline(t, e, s) {
1251
- const n = e.map((d, f) => {
1252
- const u = (d.teamIds || []).indexOf(t);
1251
+ const n = e.map((h, f) => {
1252
+ const u = (h.teamIds || []).indexOf(t);
1253
1253
  if (u === -1) return null;
1254
- const v = e.length === 1 ? 96 / 2 : f / (e.length - 1) * 90 + 3, et = 3 + u / 24 * 20;
1255
- return { x: v, y: et };
1256
- }), l = [];
1254
+ const $ = e.length === 1 ? 96 / 2 : f / (e.length - 1) * 90 + 3, et = 3 + u / 24 * 20;
1255
+ return { x: $, y: et };
1256
+ }), c = [];
1257
1257
  let p = [];
1258
- if (n.forEach((d) => {
1259
- d ? p.push(d) : p.length && (l.push(p), p = []);
1260
- }), p.length && l.push(p), !l.length) return m;
1261
- const h = n[s];
1262
- return c`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1263
- ${l.map((d) => Tt`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1264
- points=${d.map((f) => `${f.x.toFixed(1)},${f.y.toFixed(1)}`).join(" ")}></polyline>`)}
1265
- ${h ? Tt`<circle cx=${h.x.toFixed(1)} cy=${h.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1258
+ if (n.forEach((h) => {
1259
+ h ? p.push(h) : p.length && (c.push(p), p = []);
1260
+ }), p.length && c.push(p), !c.length) return m;
1261
+ const l = n[s];
1262
+ return d`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1263
+ ${c.map((h) => Tt`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1264
+ points=${h.map((f) => `${f.x.toFixed(1)},${f.y.toFixed(1)}`).join(" ")}></polyline>`)}
1265
+ ${l ? Tt`<circle cx=${l.x.toFixed(1)} cy=${l.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1266
1266
  </svg>`;
1267
1267
  }
1268
1268
  movement(t, e, s) {
1269
1269
  const a = Te(t, e, s);
1270
- return a.kind === "up" ? c`<span class="delta up">▲ ${a.delta}</span>` : a.kind === "down" ? c`<span class="delta down">▼ ${a.delta}</span>` : a.kind === "new" ? c`<span class="delta new">NEW</span>` : a.kind === "same" ? c`<span class="delta same">—</span>` : c`<span class="delta same">·</span>`;
1270
+ return a.kind === "up" ? d`<span class="delta up">▲ ${a.delta}</span>` : a.kind === "down" ? d`<span class="delta down">▼ ${a.delta}</span>` : a.kind === "new" ? d`<span class="delta new">NEW</span>` : a.kind === "same" ? d`<span class="delta same">—</span>` : d`<span class="delta same">·</span>`;
1271
1271
  }
1272
1272
  renderView() {
1273
1273
  const t = this.ctx, e = this.data.polls;
1274
- if (!e.length) return c`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1275
- const s = Math.max(0, e.findIndex((d) => d.effectiveDate === this.pollDate)), a = e[s] || e[0], o = e[s + 1] || null, i = e.slice().reverse(), n = i.indexOf(a), l = g(this.data.conferences), p = (a.teamIds || [])[0], h = p ? N(t, p) : null;
1276
- return c`
1274
+ if (!e.length) return d`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1275
+ const s = Math.max(0, e.findIndex((h) => h.effectiveDate === this.pollDate)), a = e[s] || e[0], o = e[s + 1] || null, i = e.slice().reverse(), n = i.indexOf(a), c = g(this.data.conferences), p = (a.teamIds || [])[0], l = p ? O(t, p) : null;
1276
+ return d`
1277
1277
  <div class="band">
1278
1278
  <div class="inner">
1279
- <h1>${Q(this.sport)} Top 25</h1>
1279
+ <h1>${J(this.sport)} Top 25</h1>
1280
1280
  <p class="sub">The HighSchoolOT poll · updated weekly · ${e.length} polls this season</p>
1281
1281
  </div>
1282
1282
  </div>
1283
1283
  <div class="view">
1284
1284
  <div class="toolbar">
1285
1285
  <label class="asof" for="pollsel">Poll of</label>
1286
- <select id="pollsel" @change=${(d) => {
1287
- this.pollDate = d.target.value;
1286
+ <select id="pollsel" @change=${(h) => {
1287
+ this.pollDate = h.target.value;
1288
1288
  }}>
1289
- ${e.map((d, f) => c`<option value=${d.effectiveDate} ?selected=${d === a}>
1290
- ${y(d.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${f === 0 ? " · current" : ""}
1289
+ ${e.map((h, f) => d`<option value=${h.effectiveDate} ?selected=${h === a}>
1290
+ ${y(h.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${f === 0 ? " · current" : ""}
1291
1291
  </option>`)}
1292
1292
  </select>
1293
1293
  <button class="chip" ?disabled=${s >= e.length - 1}
@@ -1301,14 +1301,14 @@ class Gt extends b {
1301
1301
  <span class="spacer"></span>
1302
1302
  <span class="asof">Movement vs. the previous poll · sparkline = season rank history</span>
1303
1303
  </div>
1304
- ${h ? this.renderHero(t, a, o, p, h, l) : m}
1304
+ ${l ? this.renderHero(t, a, o, p, l, c) : m}
1305
1305
  <div class="card"><div class="tablewrap"><table class="data">
1306
1306
  <thead><tr>
1307
1307
  <th class="num">Rk</th><th>Mvmt</th><th>Team</th><th class="num">Record</th>
1308
1308
  <th>Conference</th><th>Last result</th><th>Next</th><th>Season</th>
1309
1309
  </tr></thead>
1310
1310
  <tbody>
1311
- ${(a.teamIds || []).map((d, f) => f === 0 || !d ? m : this.renderRow(t, a, o, i, n, l, d, f + 1))}
1311
+ ${(a.teamIds || []).map((h, f) => f === 0 || !h ? m : this.renderRow(t, a, o, i, n, c, h, f + 1))}
1312
1312
  </tbody>
1313
1313
  </table></div></div>
1314
1314
  <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>
@@ -1316,49 +1316,49 @@ class Gt extends b {
1316
1316
  `;
1317
1317
  }
1318
1318
  renderHero(t, e, s, a, o, i) {
1319
- const n = t.records[a], l = Pt(t.records, a), p = i[t.teamsById[a]?.conferenceId], h = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1320
- return c`
1321
- <div class="hero1" style="background:${h}">
1319
+ const n = t.records[a], c = Pt(t.records, a), p = i[t.teamsById[a]?.conferenceId], l = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1320
+ return d`
1321
+ <div class="hero1" style="background:${l}">
1322
1322
  <div class="bigrank">#1</div>
1323
- ${U(o, 64)}
1323
+ ${F(o, 64)}
1324
1324
  <div>
1325
- <h2><a href=${$(t.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1325
+ <h2><a href=${v(t.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1326
1326
  <div class="facts">
1327
- ${x(n)} overall${p ? c` · ${x(n, !0)} ${p.name}` : m}
1328
- · streak ${J(n?.results) || "·"}
1329
- ${l ? c` · last: ${l.mark} ${l.my}-${l.their} vs ${q(t, l.opp)}` : m}
1327
+ ${x(n)} overall${p ? d` · ${x(n, !0)} ${p.name}` : m}
1328
+ · streak ${Z(n?.results) || "·"}
1329
+ ${c ? d` · last: ${c.mark} ${c.my}-${c.their} vs ${q(t, c.opp)}` : m}
1330
1330
  &nbsp;${this.movement(e, s, a)}
1331
1331
  </div>
1332
1332
  </div>
1333
1333
  </div>
1334
1334
  `;
1335
1335
  }
1336
- renderRow(t, e, s, a, o, i, n, l) {
1337
- const p = N(t, n);
1336
+ renderRow(t, e, s, a, o, i, n, c) {
1337
+ const p = O(t, n);
1338
1338
  if (!p) return m;
1339
- const h = t.records[n], d = Pt(t.records, n), f = mt(this.data.games, n), u = i[t.teamsById[n]?.conferenceId], v = () => {
1340
- location.href = $(t.hrefs.school, { id: p.id });
1339
+ const l = t.records[n], h = Pt(t.records, n), f = mt(this.data.games, n), u = i[t.teamsById[n]?.conferenceId], $ = () => {
1340
+ location.href = v(t.hrefs.school, { id: p.id });
1341
1341
  };
1342
- return c`
1342
+ return d`
1343
1343
  <tr class="rowlink" @click=${(et) => {
1344
- et.target.closest("a") || v();
1344
+ et.target.closest("a") || $();
1345
1345
  }}>
1346
- <td class="num" style="font-weight:700">${l}</td>
1346
+ <td class="num" style="font-weight:700">${c}</td>
1347
1347
  <td>${this.movement(e, s, n)}</td>
1348
- <td class="teamcell">${U(p)}<a href=${$(t.hrefs.school, { id: p.id })}>${p.name}</a>
1348
+ <td class="teamcell">${F(p)}<a href=${v(t.hrefs.school, { id: p.id })}>${p.name}</a>
1349
1349
  <span class="mut" style="font-size:0.78rem">${p.mascot || ""}</span></td>
1350
- <td class="num">${x(h)}</td>
1350
+ <td class="num">${x(l)}</td>
1351
1351
  <td class="mut">${u?.name || "Independent"}</td>
1352
- <td>${d ? c`<a class="box" style="text-decoration:none" href=${$(t.hrefs.game, { sport: this.sport, id: d.gameId })}>
1353
- <b style="color:${d.mark === "W" ? "var(--hsot-win)" : d.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${d.mark}</b>
1354
- ${d.my}-${d.their} vs ${q(t, d.opp)}</a>` : c`<span class="mut">·</span>`}</td>
1352
+ <td>${h ? d`<a class="box" style="text-decoration:none" href=${v(t.hrefs.game, { sport: this.sport, id: h.gameId })}>
1353
+ <b style="color:${h.mark === "W" ? "var(--hsot-win)" : h.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${h.mark}</b>
1354
+ ${h.my}-${h.their} vs ${q(t, h.opp)}</a>` : d`<span class="mut">·</span>`}</td>
1355
1355
  <td>${Mt(t, f, n)}</td>
1356
1356
  <td>${this.sparkline(n, a, o)}</td>
1357
1357
  </tr>
1358
1358
  `;
1359
1359
  }
1360
1360
  }
1361
- globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", Gt);
1361
+ globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", Wt);
1362
1362
  const Ee = w`
1363
1363
  .schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
1364
1364
  .schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
@@ -1384,7 +1384,7 @@ const Ee = w`
1384
1384
  .cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.25rem; }
1385
1385
  @media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .schoolhero h1 { font-size: 1.9rem; } }
1386
1386
  `;
1387
- class Wt extends b {
1387
+ class Vt extends b {
1388
1388
  static styles = [...H, Ee];
1389
1389
  static properties = {
1390
1390
  ...b.properties,
@@ -1402,7 +1402,7 @@ class Wt extends b {
1402
1402
  t && !this.sport && (this.sport = t);
1403
1403
  }
1404
1404
  async fetchData(t) {
1405
- const e = this.season || tt(), 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, l, p, h, d, f, u] = await Promise.all([
1405
+ const e = this.season || tt(), s = await t.getSchool(this.schoolId), o = (await t.listTeams({ schoolId: this.schoolId })).items, i = o.find(($) => $.sport === (this.sport || "football")) || o[0] || null, [n, c, p, l, h, f, u] = await Promise.all([
1406
1406
  i ? t.listGames({ sport: i.sport, season: e }) : Promise.resolve({ items: [] }),
1407
1407
  i ? t.listTeams({ sport: i.sport }) : Promise.resolve({ items: [] }),
1408
1408
  t.listSchools(),
@@ -1419,11 +1419,11 @@ class Wt extends b {
1419
1419
  teams: o,
1420
1420
  active: i,
1421
1421
  games: n.items,
1422
- allTeams: l.items,
1422
+ allTeams: c.items,
1423
1423
  schools: p.items,
1424
- conferences: h.items,
1425
- rankings: d.items,
1426
- roster: f.items.find((v) => v.season === e) || null,
1424
+ conferences: l.items,
1425
+ rankings: h.items,
1426
+ roster: f.items.find(($) => $.season === e) || null,
1427
1427
  players: u.items
1428
1428
  };
1429
1429
  }
@@ -1442,61 +1442,61 @@ class Wt extends b {
1442
1442
  }
1443
1443
  renderView() {
1444
1444
  const { school: t, teams: e, active: s, season: a } = this.data;
1445
- if (!t) return c`<div class="view"><p class="empty">School not found.</p></div>`;
1446
- const o = this.ctx, i = W(t.colorPrimary || "#030711"), n = (t.adm || [])[0], l = g(this.data.conferences), p = s ? l[s.conferenceId] : null;
1447
- return c`
1445
+ if (!t) return d`<div class="view"><p class="empty">School not found.</p></div>`;
1446
+ const o = this.ctx, i = V(t.colorPrimary || "#030711"), n = (t.adm || [])[0], c = g(this.data.conferences), p = s ? c[s.conferenceId] : null;
1447
+ return d`
1448
1448
  <div class="schoolhero" style="background:linear-gradient(115deg, ${t.colorPrimary || "#030711"} 0%, ${t.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${i}">
1449
1449
  <div class="inner">
1450
- ${V(t, 84) ? c`<img class="crest logo" alt="" loading="lazy" src=${V(t, 84)} />` : c`<div class="crest" style="background:${t.colorSecondary || "#7C7C7C"};color:${W(t.colorSecondary || "#7C7C7C")}">${ft(t)}</div>`}
1450
+ ${G(t, 84) ? d`<img class="crest logo" alt="" loading="lazy" src=${G(t, 84)} />` : d`<div class="crest" style="background:${t.colorSecondary || "#7C7C7C"};color:${V(t.colorSecondary || "#7C7C7C")}">${ft(t)}</div>`}
1451
1451
  <div style="min-width:260px">
1452
1452
  <h1>${t.name} <span class="mascot">${t.mascot || ""}</span></h1>
1453
1453
  <div class="facts">
1454
- ${t.location ? c`<span><b>Location</b>${t.location}${t.county ? c` · ${t.county} County` : m}</span>` : m}
1455
- ${t.association ? c`<span><b>League</b>${t.association}${t.classification ? c` · ${t.classification}` : m}</span>` : m}
1456
- ${p ? c`<span><b>Conference</b>${p.name}</span>` : m}
1457
- ${n ? c`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : m}
1458
- ${t.openingYear ? c`<span><b>Opened</b>${t.openingYear}</span>` : m}
1459
- ${t.areaCode ? c`<span><b>Area</b>${t.areaCode}</span>` : m}
1460
- ${t.tagSlug ? c`<span><b>Tag</b>#${t.tagSlug}</span>` : m}
1454
+ ${t.location ? d`<span><b>Location</b>${t.location}${t.county ? d` · ${t.county} County` : m}</span>` : m}
1455
+ ${t.association ? d`<span><b>League</b>${t.association}${t.classification ? d` · ${t.classification}` : m}</span>` : m}
1456
+ ${p ? d`<span><b>Conference</b>${p.name}</span>` : m}
1457
+ ${n ? d`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : m}
1458
+ ${t.openingYear ? d`<span><b>Opened</b>${t.openingYear}</span>` : m}
1459
+ ${t.areaCode ? d`<span><b>Area</b>${t.areaCode}</span>` : m}
1460
+ ${t.tagSlug ? d`<span><b>Tag</b>#${t.tagSlug}</span>` : m}
1461
1461
  </div>
1462
1462
  </div>
1463
1463
  </div>
1464
1464
  </div>
1465
1465
  <div class="band">
1466
1466
  <nav class="tabs" aria-label="Teams">
1467
- ${e.map((h) => h.id === s?.id ? c`<a class="on" href="#" @click=${(d) => d.preventDefault()}>${h.name}</a>` : c`<a href="#" @click=${(d) => {
1468
- d.preventDefault(), this.switchSport(h.sport);
1469
- }}>${h.name}</a>`)}
1467
+ ${e.map((l) => l.id === s?.id ? d`<a class="on" href="#" @click=${(h) => h.preventDefault()}>${l.name}</a>` : d`<a href="#" @click=${(h) => {
1468
+ h.preventDefault(), this.switchSport(l.sport);
1469
+ }}>${l.name}</a>`)}
1470
1470
  </nav>
1471
1471
  </div>
1472
1472
  <div class="view">
1473
- ${s ? this.renderTeam(o, s, p, a) : c`<p class="empty">No teams recorded for this school yet.</p>`}
1473
+ ${s ? this.renderTeam(o, s, p, a) : d`<p class="empty">No teams recorded for this school yet.</p>`}
1474
1474
  </div>
1475
1475
  `;
1476
1476
  }
1477
1477
  renderTeam(t, e, s, a) {
1478
- 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((d) => d.conferenceId === s.id) : [], l = s ? Ft(n, t.records).findIndex((d) => d.team.id === e.id) + 1 : 0, p = Ht(t.rankings, t.teamsById, e.id, e.sport, null), h = this.data.games.filter((d) => d.homeTeamId === e.id || d.awayTeamId === e.id).sort((d, f) => String(d.date).localeCompare(String(f.date)));
1479
- return c`
1478
+ 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((h) => h.conferenceId === s.id) : [], c = s ? Nt(n, t.records).findIndex((h) => h.team.id === e.id) + 1 : 0, p = Ht(t.rankings, t.teamsById, e.id, e.sport, null), l = this.data.games.filter((h) => h.homeTeamId === e.id || h.awayTeamId === e.id).sort((h, f) => String(h.date).localeCompare(String(f.date)));
1479
+ return d`
1480
1480
  <div class="tiles">
1481
1481
  <div class="tile"><div class="k">Overall</div><div class="v">${x(o)}</div><div class="s">${i} games played</div></div>
1482
1482
  <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${x(o, !0)}</div>
1483
- <div class="s">${l ? `${Se(l)} of ${n.length}` : "·"}</div></div>
1483
+ <div class="s">${c ? `${Se(c)} of ${n.length}` : "·"}</div></div>
1484
1484
  <div class="tile"><div class="k">Points</div><div class="v">${i ? (o.pf / i).toFixed(1) : "0.0"}</div>
1485
1485
  <div class="s">scored per game · ${i ? (o.pa / i).toFixed(1) : "0.0"} allowed</div></div>
1486
- <div class="tile"><div class="k">Streak</div><div class="v">${J(o.results) || "·"}</div>
1486
+ <div class="tile"><div class="k">Streak</div><div class="v">${Z(o.results) || "·"}</div>
1487
1487
  <div class="s">last 5: ${gt(t, e.id)}</div></div>
1488
1488
  <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${p ? `#${p}` : "NR"}</div>
1489
- <div class="s"><a href=${$(t.hrefs.section, { sport: e.sport, view: "rankings" })}>full poll</a></div></div>
1489
+ <div class="s"><a href=${v(t.hrefs.section, { sport: e.sport, view: "rankings" })}>full poll</a></div></div>
1490
1490
  </div>
1491
- ${(e.championships || []).length ? c`
1491
+ ${(e.championships || []).length ? d`
1492
1492
  <div style="margin:-0.2rem 0 1rem;display:flex;gap:0.4rem;flex-wrap:wrap">
1493
- ${e.championships.map((d) => c`<span class="pill champ">★ ${d.season} ${d.title} champion${d.classification ? ` · ${d.classification}` : ""}${d.region ? ` · ${d.region}` : ""}</span>`)}
1493
+ ${e.championships.map((h) => d`<span class="pill champ">★ ${h.season} ${h.title} champion${h.classification ? ` · ${h.classification}` : ""}${h.region ? ` · ${h.region}` : ""}</span>`)}
1494
1494
  </div>` : m}
1495
1495
  <div class="cols">
1496
1496
  <div>
1497
1497
  <div class="section-title">Schedule &amp; results</div>
1498
1498
  <div class="card">
1499
- ${h.length ? c`<ul class="gamelist">${h.map((d) => this.renderGameRow(t, e, d))}</ul>` : c`<p class="empty">No ${e.sport} games recorded for ${a}.</p>`}
1499
+ ${l.length ? d`<ul class="gamelist">${l.map((h) => this.renderGameRow(t, e, h))}</ul>` : d`<p class="empty">No ${e.sport} games recorded for ${a}.</p>`}
1500
1500
  </div>
1501
1501
  </div>
1502
1502
  <div>
@@ -1508,38 +1508,38 @@ class Wt extends b {
1508
1508
  }
1509
1509
  renderGameRow(t, e, s) {
1510
1510
  const a = s.homeTeamId === e.id, o = a ? s.awayTeamId : s.homeTeamId, i = a ? s.homeScore : s.awayScore, n = a ? s.awayScore : s.homeScore;
1511
- let l = c`<span class="mut">${X(s.time)}</span>`;
1511
+ let c = d`<span class="mut">${X(s.time)}</span>`;
1512
1512
  if (s.state === "final") {
1513
- const h = pt(s), d = h === "tie" ? "T" : h === (a ? "home" : "away") ? "W" : "L";
1514
- l = c`<span class=${d}>${d}</span> ${i}-${n}${s.finish === "overtime" ? c` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? c` <span class="mut">FF</span>` : m}`;
1515
- } else s.state === "live" && (l = c`<span style="color:var(--hsot-red)">${i}-${n}</span>`);
1513
+ const l = pt(s), h = l === "tie" ? "T" : l === (a ? "home" : "away") ? "W" : "L";
1514
+ c = d`<span class=${h}>${h}</span> ${i}-${n}${s.finish === "overtime" ? d` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? d` <span class="mut">FF</span>` : m}`;
1515
+ } else s.state === "live" && (c = d`<span style="color:var(--hsot-red)">${i}-${n}</span>`);
1516
1516
  const p = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1517
- return c`
1517
+ return d`
1518
1518
  <li>
1519
1519
  <span class="d">${y(s.date)}</span>
1520
1520
  ${Y(s)}
1521
- <span class="res">${l}</span>
1521
+ <span class="res">${c}</span>
1522
1522
  <span class="opp">${a ? "vs" : "at"} ${it(t, o, s.date)}
1523
1523
  <span class="pill type">${p}</span>
1524
- ${s.broadcast ? c`<span class="pill class">${s.broadcast}</span>` : m}
1524
+ ${s.broadcast ? d`<span class="pill class">${s.broadcast}</span>` : m}
1525
1525
  </span>
1526
1526
  <span class="where">${s.venue || ""}</span>
1527
- <a class="box" href=${$(t.hrefs.game, { sport: e.sport, id: s.id })}>Box score →</a>
1527
+ <a class="box" href=${v(t.hrefs.game, { sport: e.sport, id: s.id })}>Box score →</a>
1528
1528
  </li>
1529
1529
  `;
1530
1530
  }
1531
1531
  renderRoster(t) {
1532
1532
  const e = this.data.roster;
1533
1533
  if (!e)
1534
- return c`<p class="empty">Roster not published for ${t}.</p>`;
1534
+ return d`<p class="empty">Roster not published for ${t}.</p>`;
1535
1535
  const s = g(this.data.players), a = e.entries.slice().sort((o, i) => (o.number || 0) - (i.number || 0));
1536
- return c`
1536
+ return d`
1537
1537
  <div class="tablewrap"><table class="data">
1538
1538
  <thead><tr><th class="num">No.</th><th>Player</th><th>Pos</th><th>Class</th><th class="num">Ht</th><th class="num">Wt</th></tr></thead>
1539
1539
  <tbody>
1540
1540
  ${a.map((o) => {
1541
1541
  const i = s[o.playerId];
1542
- return i ? c`<tr>
1542
+ return i ? d`<tr>
1543
1543
  <td class="num mut">${o.number ?? "·"}</td>
1544
1544
  <td style="font-weight:500">${i.firstName} ${i.lastName}</td>
1545
1545
  <td>${o.position || "·"}</td>
@@ -1553,8 +1553,22 @@ class Wt extends b {
1553
1553
  `;
1554
1554
  }
1555
1555
  }
1556
- globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Wt);
1557
- const Pe = w`
1556
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Vt);
1557
+ const Pe = "https://api.wral.com/search";
1558
+ function De(r) {
1559
+ return r.map((t) => `uri:"${t}"`).join(" OR ");
1560
+ }
1561
+ function Re(r, t) {
1562
+ const e = String(r || Pe).replace(/\/+$/, ""), s = new URLSearchParams({ query: De(t), sort: "score", lang: "en" });
1563
+ return `${e}/v1/query?${s}`;
1564
+ }
1565
+ async function ze(r, t, e) {
1566
+ const a = await ((...n) => fetch(...n))(Re(r, t));
1567
+ if (!a.ok) throw new Error(`search answered ${a.status}`);
1568
+ const o = await a.json(), i = new Map((o.items || []).map((n) => [n.uri, n]));
1569
+ return t.map((n) => i.get(n) || { uri: n, title: n });
1570
+ }
1571
+ const Be = w`
1558
1572
  .breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
1559
1573
  .breadcrumbs a { text-decoration: none; }
1560
1574
  .scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
@@ -1575,6 +1589,14 @@ const Pe = w`
1575
1589
  .scorehead .mid { text-align: center; }
1576
1590
  .scorehead .bigscore { font-family: var(--hsot-heading-font); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--hsot-black); white-space: nowrap; }
1577
1591
  .scorehead .status { margin-top: 0.3rem; font-size: 0.8rem; color: var(--hsot-gray-5); }
1592
+ .covgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
1593
+ .covcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; margin-bottom: 0; }
1594
+ .covcard:hover .covtitle { color: var(--hsot-red-deep); }
1595
+ .covimg { width: 100%; aspect-ratio: 1.91; object-fit: cover; display: block; background: var(--hsot-gray-1); }
1596
+ .covbody { padding: 0.75rem 0.9rem 0.85rem; }
1597
+ .covtitle { font-family: var(--hsot-heading-font); font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
1598
+ .covdesc { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--hsot-gray-5); line-height: 1.4; }
1599
+ .covmeta { margin-top: 0.45rem; font-size: 0.78rem; color: var(--hsot-gray-5); }
1578
1600
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
1579
1601
  .ctxcard { padding: 0.85rem 1rem; }
1580
1602
  .ctxcard .who { font-family: var(--hsot-heading-font); font-weight: 700; margin-bottom: 0.4rem; }
@@ -1585,30 +1607,39 @@ const Pe = w`
1585
1607
  .cols { grid-template-columns: 1fr; }
1586
1608
  }
1587
1609
  `;
1588
- class Vt extends b {
1589
- static styles = [...H, Pe];
1610
+ class Gt extends b {
1611
+ static styles = [...H, Be];
1590
1612
  static properties = {
1591
1613
  ...b.properties,
1592
- gameId: { type: String, attribute: "game-id" }
1614
+ gameId: { type: String, attribute: "game-id" },
1615
+ // The public site search that resolves Game.coverageUrls into cards
1616
+ // (DEV-1236). Shared cross-stage by design — see the studio host's
1617
+ // registry — so the prod default is right everywhere; the attribute
1618
+ // exists for the same reason the href templates do.
1619
+ searchApi: { type: String, attribute: "search-api" }
1593
1620
  };
1594
1621
  constructor() {
1595
- super(), this.gameId = "";
1622
+ super(), this.gameId = "", this.searchApi = "";
1596
1623
  }
1597
1624
  async fetchData(t) {
1598
- const e = await t.getGame(this.gameId), [s, a, o, i, n] = await Promise.all([
1625
+ const e = await t.getGame(this.gameId), s = Array.isArray(e.coverageUrls) ? e.coverageUrls : [], [a, o, i, n, c, p] = await Promise.all([
1599
1626
  t.listSchools(),
1600
1627
  t.listTeams({ sport: e.sport }),
1601
1628
  t.listConferences(),
1602
1629
  t.listRankings({ sport: e.sport }),
1603
- t.listGames({ sport: e.sport, season: e.season })
1630
+ t.listGames({ sport: e.sport, season: e.season }),
1631
+ // A search outage must not blank the box score — degrade to bare
1632
+ // links (fetchCoverage already degrades per-URL index misses).
1633
+ s.length ? ze(this.searchApi, s).catch(() => s.map((l) => ({ uri: l, title: l }))) : Promise.resolve([])
1604
1634
  ]);
1605
1635
  return {
1606
1636
  game: e,
1607
- schools: s.items,
1608
- teams: a.items,
1609
- conferences: o.items,
1610
- rankings: i.items,
1611
- games: n.items
1637
+ schools: a.items,
1638
+ teams: o.items,
1639
+ conferences: i.items,
1640
+ rankings: n.items,
1641
+ games: c.items,
1642
+ coverage: p
1612
1643
  };
1613
1644
  }
1614
1645
  get ctx() {
@@ -1623,13 +1654,13 @@ class Vt extends b {
1623
1654
  }
1624
1655
  renderView() {
1625
1656
  const t = this.data.game;
1626
- if (!t) return c`<div class="view"><p class="empty">Game not found.</p></div>`;
1627
- const e = this.ctx, s = g(this.data.conferences), a = 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 = pt(t), n = (h) => t.state === "final" && i !== h && i !== "tie" ? "opacity:0.45" : "", l = t.conferenceId ? s[t.conferenceId] : null, p = 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));
1628
- return c`
1657
+ if (!t) return d`<div class="view"><p class="empty">Game not found.</p></div>`;
1658
+ const e = this.ctx, s = g(this.data.conferences), a = 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 = pt(t), n = (l) => t.state === "final" && i !== l && i !== "tie" ? "opacity:0.45" : "", c = t.conferenceId ? s[t.conferenceId] : null, p = this.data.games.filter((l) => l.id !== t.id && l.state === "final" && l.gameType !== "scrimmage" && (l.homeTeamId === t.homeTeamId && l.awayTeamId === t.awayTeamId || l.homeTeamId === t.awayTeamId && l.awayTeamId === t.homeTeamId));
1659
+ return d`
1629
1660
  <div class="view">
1630
1661
  <p class="breadcrumbs">
1631
- <a href=${$(e.hrefs.section, { sport: t.sport, view: "scores" })}>${Q(t.sport)}</a> /
1632
- <a href=${$(e.hrefs.section, { sport: t.sport, view: "scores" })}>Scores/Schedules</a> /
1662
+ <a href=${v(e.hrefs.section, { sport: t.sport, view: "scores" })}>${J(t.sport)}</a> /
1663
+ <a href=${v(e.hrefs.section, { sport: t.sport, view: "scores" })}>Scores/Schedules</a> /
1633
1664
  ${P(e, t.awayTeamId)} at ${P(e, t.homeTeamId)}
1634
1665
  </p>
1635
1666
  <div class="card">
@@ -1642,51 +1673,60 @@ class Vt extends b {
1642
1673
  <span style=${n("home")}>${t.homeScore}</span>
1643
1674
  </div>
1644
1675
  <div class="status">${Y(t)}</div>
1645
- <div class="status">${y(t.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${t.state === "scheduled" && t.time ? c` · ${X(t.time)}` : m} · ${t.venue || "Venue TBD"}
1646
- ${t.broadcast ? c` · <span class="pill class">${t.broadcast}</span>` : m}</div>
1676
+ <div class="status">${y(t.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${t.state === "scheduled" && t.time ? d` · ${X(t.time)}` : m} · ${t.venue || "Venue TBD"}
1677
+ ${t.broadcast ? d` · <span class="pill class">${t.broadcast}</span>` : m}</div>
1647
1678
  <div class="status">
1648
- <span class="pill type">${t.gameType === "conference" ? `${l?.name || "Conference"} game` : t.gameType}</span>
1649
- ${t.label ? c`<span class="pill type">Bracket ${t.label}</span>` : m}
1650
- ${(t.tags || []).map((h) => c`<span class="pill type">${h}</span>`)}
1679
+ <span class="pill type">${t.gameType === "conference" ? `${c?.name || "Conference"} game` : t.gameType}</span>
1680
+ ${t.label ? d`<span class="pill type">Bracket ${t.label}</span>` : m}
1681
+ ${(t.tags || []).map((l) => d`<span class="pill type">${l}</span>`)}
1651
1682
  </div>
1652
1683
  </div>
1653
1684
  ${this.teamBlock(e, t, t.homeTeamId, o, !0)}
1654
1685
  </div>
1655
1686
  ${this.renderLineScore(t, a, o)}
1656
- ${t.notes ? c`<p class="note" style="padding:0 1rem 0.9rem;text-align:center">${t.notes}</p>` : m}
1687
+ ${t.notes ? d`<p class="note" style="padding:0 1rem 0.9rem;text-align:center">${t.notes}</p>` : m}
1657
1688
  </div>
1658
- ${t.storyAssetId || t.videoAssetId ? c`
1689
+ ${(this.data.coverage || []).length ? d`
1659
1690
  <div class="section-title">Coverage</div>
1660
- <div class="card" style="padding:0.8rem 1rem;display:flex;gap:0.5rem;flex-wrap:wrap;align-items:center">
1661
- ${t.storyAssetId ? c`<span class="pill class" title="Game.storyAssetId">Game story · ${t.storyAssetId}</span>` : m}
1662
- ${t.videoAssetId ? c`<span class="pill class" title="Game.videoAssetId">Highlights · ${t.videoAssetId}</span>` : m}
1663
- <span class="asof">Story and video ride the Game resource as Studio asset references.</span>
1691
+ <div class="covgrid">
1692
+ ${this.data.coverage.map((l) => d`
1693
+ <a class="card covcard" href=${l.uri}>
1694
+ ${l.image ? d`<img class="covimg" src=${l.image} alt="" loading="lazy" />` : m}
1695
+ <div class="covbody">
1696
+ <div class="covtitle">${l.videoDuration ? d`<span class="pill live" style="animation:none">Video</span> ` : m}${l.title || l.uri}</div>
1697
+ ${l.description ? d`<p class="covdesc">${l.description}</p>` : m}
1698
+ ${l.author || l.publishedTime ? d`
1699
+ <div class="covmeta">${[l.author, l.publishedTime ? new Date(l.publishedTime).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : ""].filter(Boolean).join(" · ")}</div>
1700
+ ` : m}
1701
+ </div>
1702
+ </a>
1703
+ `)}
1664
1704
  </div>` : m}
1665
1705
  <div class="section-title">Season context</div>
1666
1706
  <div class="cols">
1667
- ${[[t.awayTeamId, a], [t.homeTeamId, o]].map(([h, d]) => this.renderContext(e, h, d))}
1707
+ ${[[t.awayTeamId, a], [t.homeTeamId, o]].map(([l, h]) => this.renderContext(e, l, h))}
1668
1708
  </div>
1669
- ${p.length ? c`
1709
+ ${p.length ? d`
1670
1710
  <div class="section-title">Head to head this season</div>
1671
1711
  <div class="card"><ul class="gamelist">
1672
- ${p.map((h) => c`<li>
1673
- <span class="d">${y(h.date)}</span>${Y(h)}
1674
- <span class="opp">${P(e, h.awayTeamId)} ${h.awayScore}, ${P(e, h.homeTeamId)} ${h.homeScore}</span>
1675
- <a class="box" href=${$(e.hrefs.game, { sport: t.sport, id: h.id })}>Box score →</a>
1712
+ ${p.map((l) => d`<li>
1713
+ <span class="d">${y(l.date)}</span>${Y(l)}
1714
+ <span class="opp">${P(e, l.awayTeamId)} ${l.awayScore}, ${P(e, l.homeTeamId)} ${l.homeScore}</span>
1715
+ <a class="box" href=${v(e.hrefs.game, { sport: t.sport, id: l.id })}>Box score →</a>
1676
1716
  </li>`)}
1677
1717
  </ul></div>` : m}
1678
1718
  </div>
1679
1719
  `;
1680
1720
  }
1681
1721
  teamBlock(t, e, s, a, o) {
1682
- if (!a) return c`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
1683
- const i = t.teamsById[s], n = t.records[s], l = V(a, 58);
1684
- return c`
1722
+ if (!a) return d`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
1723
+ const i = t.teamsById[s], n = t.records[s], c = G(a, 58);
1724
+ return d`
1685
1725
  <div class="teamblock ${o ? "right" : ""}">
1686
- ${l ? c`<img class="crest logo" alt="" loading="lazy" src=${l} />` : c`<span class="crest" style="background:${a.colorPrimary || "#030711"};color:${W(a.colorPrimary || "#030711")}">${ft(a)}</span>`}
1726
+ ${c ? d`<img class="crest logo" alt="" loading="lazy" src=${c} />` : d`<span class="crest" style="background:${a.colorPrimary || "#030711"};color:${V(a.colorPrimary || "#030711")}">${ft(a)}</span>`}
1687
1727
  <div>
1688
- <div class="tname">${ut(t, s, e.date)}<a href=${$(t.hrefs.school, { id: a.id })}>${a.name}</a></div>
1689
- <div class="trec">${a.mascot || ""} · ${x(n)}${i?.conferenceId ? c` · ${x(n, !0)} conf` : m}</div>
1728
+ <div class="tname">${ut(t, s, e.date)}<a href=${v(t.hrefs.school, { id: a.id })}>${a.name}</a></div>
1729
+ <div class="trec">${a.mascot || ""} · ${x(n)}${i?.conferenceId ? d` · ${x(n, !0)} conf` : m}</div>
1690
1730
  </div>
1691
1731
  </div>
1692
1732
  `;
@@ -1694,23 +1734,23 @@ class Vt extends b {
1694
1734
  renderLineScore(t, e, s) {
1695
1735
  const a = t.periodScores || [];
1696
1736
  if (!a.length)
1697
- return c`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>`;
1698
- const o = Math.max(4, ...a.map((p) => p.period)), i = (p) => p <= 4 ? String(p) : `OT${p > 5 ? p - 4 : ""}`, n = (p, h) => {
1699
- const d = a.find((f) => f.period === h);
1700
- return d ? d[p] : t.state === "final" ? 0 : "·";
1701
- }, l = (p, h, d) => c`
1737
+ return d`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>`;
1738
+ const o = Math.max(4, ...a.map((p) => p.period)), i = (p) => p <= 4 ? String(p) : `OT${p > 5 ? p - 4 : ""}`, n = (p, l) => {
1739
+ const h = a.find((f) => f.period === l);
1740
+ return h ? h[p] : t.state === "final" ? 0 : "·";
1741
+ }, c = (p, l, h) => d`
1702
1742
  <tr>
1703
- <td class="teamcell">${U(p, 20)}${p?.abbr || "TBD"}</td>
1704
- ${Array.from({ length: o }, (f, u) => c`<td class="num">${n(h, u + 1)}</td>`)}
1705
- <td class="num" style="font-weight:700">${d}</td>
1743
+ <td class="teamcell">${F(p, 20)}${p?.abbr || "TBD"}</td>
1744
+ ${Array.from({ length: o }, (f, u) => d`<td class="num">${n(l, u + 1)}</td>`)}
1745
+ <td class="num" style="font-weight:700">${h}</td>
1706
1746
  </tr>`;
1707
- return c`
1747
+ return d`
1708
1748
  <div class="tablewrap" style="border-top:1px solid var(--hsot-gray-2)">
1709
1749
  <table class="data" style="max-width:560px;margin:0.6rem auto 0.9rem">
1710
- <thead><tr><th>Team</th>${Array.from({ length: o }, (p, h) => c`<th class="num">${i(h + 1)}</th>`)}<th class="num">T</th></tr></thead>
1750
+ <thead><tr><th>Team</th>${Array.from({ length: o }, (p, l) => d`<th class="num">${i(l + 1)}</th>`)}<th class="num">T</th></tr></thead>
1711
1751
  <tbody>
1712
- ${l(e, "away", t.awayScore)}
1713
- ${l(s, "home", t.homeScore)}
1752
+ ${c(e, "away", t.awayScore)}
1753
+ ${c(s, "home", t.homeScore)}
1714
1754
  </tbody>
1715
1755
  </table>
1716
1756
  </div>
@@ -1719,35 +1759,35 @@ class Vt extends b {
1719
1759
  renderContext(t, e, s) {
1720
1760
  if (!s) return m;
1721
1761
  const a = t.records[e], o = mt(this.data.games, e);
1722
- return c`
1762
+ return d`
1723
1763
  <div class="card ctxcard">
1724
- <div class="who">${U(s)}${s.name}</div>
1764
+ <div class="who">${F(s)}${s.name}</div>
1725
1765
  <div class="row">
1726
1766
  <span>Last 5: ${gt(t, e)}</span>
1727
- <span>Streak: <b>${a ? J(a.results) : "·"}</b></span>
1767
+ <span>Streak: <b>${a ? Z(a.results) : "·"}</b></span>
1728
1768
  <span>PF/PA: <b>${a ? `${a.pf} / ${a.pa}` : "·"}</b></span>
1729
- <span>Next: ${o ? c`${y(o.date, { month: "numeric", day: "numeric" })}
1769
+ <span>Next: ${o ? d`${y(o.date, { month: "numeric", day: "numeric" })}
1730
1770
  ${o.homeTeamId === e ? "vs" : "at"} ${q(t, o.homeTeamId === e ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
1731
1771
  </div>
1732
1772
  </div>
1733
1773
  `;
1734
1774
  }
1735
1775
  }
1736
- globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", Vt);
1737
- const De = {
1776
+ globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", Gt);
1777
+ const Ue = {
1738
1778
  "hsot-scores": Lt,
1739
1779
  "hsot-standings": jt,
1740
- "hsot-rankings": Gt,
1741
- "hsot-school": Wt,
1742
- "hsot-boxscore": Vt
1780
+ "hsot-rankings": Wt,
1781
+ "hsot-school": Vt,
1782
+ "hsot-boxscore": Gt
1743
1783
  };
1744
- function Re() {
1784
+ function Oe() {
1745
1785
  const r = globalThis?.customElements;
1746
1786
  if (r)
1747
- for (const [t, e] of Object.entries(De))
1787
+ for (const [t, e] of Object.entries(Ue))
1748
1788
  r.get(t) || r.define(t, e);
1749
1789
  }
1750
- typeof window < "u" && globalThis.customElements && Re();
1790
+ typeof window < "u" && globalThis.customElements && Oe();
1751
1791
  export {
1752
- Re as defineAll
1792
+ Oe as defineAll
1753
1793
  };