@wral/hsot-data 0.1.12 → 0.1.14

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.
@@ -8,39 +8,39 @@ function de(a = {}) {
8
8
  }
9
9
  function he({ baseUrl: a, token: e = "", fetchFn: t } = {}) {
10
10
  if (!a) throw new Error("createClient requires a baseUrl");
11
- const s = a.replace(/\/+$/, ""), o = t || ((...l) => fetch(...l));
12
- async function r(l) {
11
+ const s = a.replace(/\/+$/, ""), o = t || ((...n) => fetch(...n));
12
+ async function r(n) {
13
13
  const h = { Accept: "application/json" };
14
14
  e && (h.Authorization = `Bearer ${e}`);
15
- const n = await o(`${s}${l}`, { headers: h });
16
- if (!n.ok) {
17
- const c = new Error(`api-hsot ${n.status} on ${l}`);
18
- throw c.status = n.status, c;
15
+ const l = await o(`${s}${n}`, { headers: h });
16
+ if (!l.ok) {
17
+ const c = new Error(`api-hsot ${l.status} on ${n}`);
18
+ throw c.status = l.status, c;
19
19
  }
20
- return n.json();
20
+ return l.json();
21
21
  }
22
- async function d(l, h = {}) {
23
- const n = [];
22
+ async function d(n, h = {}) {
23
+ const l = [];
24
24
  let c = null;
25
25
  for (let m = 0; m < ce; m += 1) {
26
- const f = de(c ? { ...h, cursor: c } : h), g = await r(`${l}${f}`);
27
- if (n.push(...g.items || []), c = g.nextCursor || null, !c) break;
26
+ const f = de(c ? { ...h, cursor: c } : h), g = await r(`${n}${f}`);
27
+ if (l.push(...g.items || []), c = g.nextCursor || null, !c) break;
28
28
  }
29
- return { items: n, total: n.length, nextCursor: null };
29
+ return { items: l, total: l.length, nextCursor: null };
30
30
  }
31
31
  return {
32
- listSchools: (l) => d("/schools", l),
33
- getSchool: (l) => r(`/schools/${l}`),
34
- listTeams: (l) => d("/teams", l),
35
- getTeam: (l) => r(`/teams/${l}`),
36
- listConferences: (l) => d("/conferences", l),
37
- listPlayers: (l) => d("/players", l),
38
- listRosters: (l) => d("/rosters", l),
39
- listGames: (l) => d("/games", l),
40
- getGame: (l) => r(`/games/${l}`),
41
- listTournaments: (l) => d("/tournaments", l),
42
- listSeedings: (l, h) => d(`/tournaments/${l}/seedings`, h),
43
- listRankings: (l) => d("/rankings", l),
32
+ listSchools: (n) => d("/schools", n),
33
+ getSchool: (n) => r(`/schools/${n}`),
34
+ listTeams: (n) => d("/teams", n),
35
+ getTeam: (n) => r(`/teams/${n}`),
36
+ listConferences: (n) => d("/conferences", n),
37
+ listPlayers: (n) => d("/players", n),
38
+ listRosters: (n) => d("/rosters", n),
39
+ listGames: (n) => d("/games", n),
40
+ getGame: (n) => r(`/games/${n}`),
41
+ listTournaments: (n) => d("/tournaments", n),
42
+ listSeedings: (n, h) => d(`/tournaments/${n}/seedings`, h),
43
+ listRankings: (n) => d("/rankings", n),
44
44
  listSports: () => r("/sports")
45
45
  };
46
46
  }
@@ -59,7 +59,7 @@ function D(a) {
59
59
  section: a.getAttribute("section-href") || H.section
60
60
  };
61
61
  }
62
- const I = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
62
+ const T = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
63
63
  function y(a, e) {
64
64
  if (!a) return "TBD";
65
65
  const [t, s, o] = String(a).split("-").map(Number);
@@ -75,6 +75,9 @@ function U(a) {
75
75
  function me(a) {
76
76
  return a ? `${Math.floor(a / 12)}-${a % 12}` : "·";
77
77
  }
78
+ function pe(a) {
79
+ return (Array.isArray(a?.positions) ? a.positions : String(a?.position ?? "").split(/[/,]/)).map((t) => String(t ?? "").trim()).filter(Boolean).join("/");
80
+ }
78
81
  function N(a = /* @__PURE__ */ new Date()) {
79
82
  const e = a.getFullYear();
80
83
  return a.getMonth() >= 6 ? `${e}-${e + 1}` : `${e - 1}-${e}`;
@@ -83,7 +86,7 @@ function M(a = /* @__PURE__ */ new Date()) {
83
86
  const e = (t) => String(t).padStart(2, "0");
84
87
  return `${a.getFullYear()}-${e(a.getMonth() + 1)}-${e(a.getDate())}`;
85
88
  }
86
- function pe(a, e = M()) {
89
+ function fe(a, e = M()) {
87
90
  const t = [...new Set((a || []).filter(Boolean))].sort();
88
91
  if (!t.length || t.includes(e)) return e;
89
92
  const s = t.filter((o) => o < e);
@@ -92,12 +95,12 @@ function pe(a, e = M()) {
92
95
  function j(a) {
93
96
  return a ? (a.abbr || a.name || "?").slice(0, 4).toUpperCase() : "?";
94
97
  }
95
- function E(a) {
98
+ function A(a) {
96
99
  if (!a || !/^#[0-9a-fA-F]{6}$/.test(a)) return "#FFFFFF";
97
100
  const e = parseInt(a.slice(1), 16), t = e >> 16 & 255, s = e >> 8 & 255, o = e & 255;
98
101
  return 0.299 * t + 0.587 * s + 0.114 * o > 150 ? "#0F1B33" : "#FFFFFF";
99
102
  }
100
- const fe = (a) => {
103
+ const ue = (a) => {
101
104
  const e = ["th", "st", "nd", "rd"], t = a % 100;
102
105
  return a + (e[(t - 20) % 10] || e[t] || e[0]);
103
106
  };
@@ -108,19 +111,22 @@ function X(a, e) {
108
111
  }, s = t(a), o = t(e);
109
112
  return s !== null && o !== null && s !== o ? o - s : s !== null && o === null ? -1 : s === null && o !== null ? 1 : String(a ?? "").localeCompare(String(e ?? ""), "en", { sensitivity: "base" });
110
113
  }
111
- function ue(a, e) {
114
+ function ge(a, e) {
112
115
  const t = (s) => String(s?.name ?? s ?? "");
113
116
  return t(a).localeCompare(t(e), "en", { numeric: !0, sensitivity: "base" });
114
117
  }
115
118
  function se(a) {
116
- if (a.state === "live") return { kind: "live", label: `Live · ${a.period || ""}`.replace(/ · $/, "") };
119
+ if (a.state === "live") {
120
+ const e = [a.period, a.clock].filter(Boolean).join(" ");
121
+ return { kind: "live", label: e ? `Live · ${e}` : "Live" };
122
+ }
117
123
  if (a.state === "final") {
118
124
  const e = [];
119
125
  return a.finish === "overtime" && e.push("OT"), a.finish === "shootout" && e.push("PK-SO"), a.forfeit && a.forfeit !== "none" && e.push("Forfeit"), { kind: "final", label: `Final${e.length ? ` · ${e.join(" · ")}` : ""}` };
120
126
  }
121
127
  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" })} · ${U(a.time)}`.replace(/ · $/, "") };
122
128
  }
123
- const ge = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
129
+ const ve = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
124
130
  function x(a) {
125
131
  let e = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
126
132
  const t = e.indexOf("#");
@@ -135,7 +141,7 @@ function ae() {
135
141
  const e = (a.hash || "").startsWith("#/") ? a.hash : "";
136
142
  return x((a.pathname || "") + e);
137
143
  }
138
- function ve(a, e, t) {
144
+ function be(a, e, t) {
139
145
  if (!t) return null;
140
146
  const s = x(a);
141
147
  if (!s) return null;
@@ -144,23 +150,23 @@ function ve(a, e, t) {
144
150
  const d = x(u(e.section, { sport: t, view: "" }));
145
151
  if (s === d) return "";
146
152
  if (!s.startsWith(`${d}/`)) return null;
147
- const l = s.slice(d.length + 1), h = l.split("/");
148
- return h.length > 2 || h.some((n) => !/^[a-z][a-z-]*$/.test(n)) || ge.has(h[0]) ? null : l;
153
+ const n = s.slice(d.length + 1), h = n.split("/");
154
+ return h.length > 2 || h.some((l) => !/^[a-z][a-z-]*$/.test(l)) || ve.has(h[0]) ? null : n;
149
155
  }
150
- function be(a, e, t) {
156
+ function ye(a, e, t) {
151
157
  const s = (d) => u(t.section, { sport: a, view: d }).replace(/([^:])\/{2,}/g, "$1/"), r = new Set((e || []).map((d) => d && d.gender).filter((d) => d === "boys" || d === "girls")).size === 2 ? [
152
158
  { label: "Boys Standings", href: s("boys/standings") },
153
159
  { label: "Girls Standings", href: s("girls/standings") }
154
160
  ] : [{ label: "Standings", href: s("standings") }];
155
161
  return [
156
- { label: `${I(a)} Home`, href: s("") },
162
+ { label: `${T(a)} Home`, href: s("") },
157
163
  { label: "Scores/Schedule", href: s("scores") },
158
164
  { label: "Playoff Brackets", href: s("brackets") },
159
165
  ...r,
160
166
  { label: "Polls & Rankings", href: s("rankings") }
161
167
  ];
162
168
  }
163
- function ye(a, e = ae()) {
169
+ function $e(a, e = ae()) {
164
170
  const t = x(e);
165
171
  for (const s of a.querySelectorAll(':scope > a[slot="nav"]'))
166
172
  t && x(s.getAttribute("href")) === t ? s.setAttribute("aria-current", "page") : s.removeAttribute("aria-current");
@@ -196,7 +202,7 @@ class $ extends te {
196
202
  this.load();
197
203
  }
198
204
  updated(e) {
199
- e.has("api") && e.get("api") !== void 0 && e.get("api") !== this.api && this.load(), e.has("refreshInterval") && this._setupInterval(), ye(this);
205
+ e.has("api") && e.get("api") !== void 0 && e.get("api") !== this.api && this.load(), e.has("refreshInterval") && this._setupInterval(), $e(this);
200
206
  }
201
207
  async load() {
202
208
  const e = this.client;
@@ -231,7 +237,7 @@ class $ extends te {
231
237
  return i``;
232
238
  }
233
239
  }
234
- const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), $e = b`
240
+ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), we = b`
235
241
  :host {
236
242
  --hsot-red: var(--color-red, #D1232A);
237
243
  --hsot-red-deep: var(--color-red-dark, #951C21);
@@ -269,7 +275,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), $e = b`
269
275
  outline-offset: 1px;
270
276
  }
271
277
  .mut { color: var(--hsot-gray-5); }
272
- `, we = b`
278
+ `, xe = b`
273
279
  .band { background: var(--hsot-white); color: var(--hsot-black); }
274
280
  .band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
275
281
  .band h1, .band h2.bandtitle {
@@ -318,7 +324,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), $e = b`
318
324
  @media (max-width: 720px) {
319
325
  .band h1, .band h2.bandtitle, .band.section h1, .band.section h2.bandtitle { font-size: 1.8rem; }
320
326
  }
321
- `, xe = b`
327
+ `, ke = b`
322
328
  .view { max-width: 1366px; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
323
329
  /* Optional right rail (slot="rail" light-DOM children): a divided 300px
324
330
  column on desktop, stacked under the view content on smaller screens. */
@@ -382,7 +388,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), $e = b`
382
388
  .error { padding: 1.2rem 1rem; color: var(--hsot-red-deep); font-size: 0.9rem; }
383
389
  .note { font-size: 0.8125rem; color: var(--hsot-gray-5); margin: 0.6rem 0 0; }
384
390
  .loading { padding: 1.2rem; color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
385
- `, ke = b`
391
+ `, Se = b`
386
392
  .pill {
387
393
  display: inline-block; font-family: var(--hsot-heading-font); font-weight: 700;
388
394
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em;
@@ -439,7 +445,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), $e = b`
439
445
  .dot.W { background: var(--hsot-win); }
440
446
  .dot.L { background: var(--hsot-loss); }
441
447
  .dot.T { background: var(--hsot-tie); }
442
- `, Se = b`
448
+ `, Ce = b`
443
449
  ul.gamelist { list-style: none; margin: 0; padding: 0; }
444
450
  .gamelist li {
445
451
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem;
@@ -489,24 +495,24 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), $e = b`
489
495
  .gamelist .ff { color: var(--hsot-gray-5); font-size: 0.78rem; font-style: italic; }
490
496
  .gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
491
497
  .gamelist a.box { font-size: 0.78rem; }
492
- `, F = [$e, we, xe, ke, Te, Ie, Se];
498
+ `, F = [we, xe, ke, Se, Te, Ie, Ce];
493
499
  function G(a) {
494
500
  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";
495
501
  }
496
- function Ce(a) {
502
+ function De(a) {
497
503
  return a && (a.forfeit === "home" || a.forfeit === "away") ? a.forfeit : null;
498
504
  }
499
505
  function z(a, e) {
500
506
  const t = {}, s = (r) => (t[r] = t[r] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, t[r]), o = a.filter((r) => r.state === "final" && r.gameType !== "scrimmage" && (!e || r.date <= e)).sort((r, d) => String(r.date).localeCompare(String(d.date)));
501
507
  for (const r of o) {
502
- const d = G(r), l = r.gameType === "conference";
508
+ const d = G(r), n = r.gameType === "conference";
503
509
  for (const h of ["home", "away"]) {
504
- const n = h === "home" ? r.homeTeamId : r.awayTeamId;
505
- if (!n) continue;
506
- const c = s(n), m = h === "home" ? r.homeScore : r.awayScore, f = h === "home" ? r.awayScore : r.homeScore;
510
+ const l = h === "home" ? r.homeTeamId : r.awayTeamId;
511
+ if (!l) continue;
512
+ const c = s(l), m = h === "home" ? r.homeScore : r.awayScore, f = h === "home" ? r.awayScore : r.homeScore;
507
513
  c.pf += m, c.pa += f;
508
514
  let g = "T";
509
- d === "tie" ? (c.t += 1, l && (c.ct += 1)) : d === h ? (c.w += 1, l && (c.cw += 1), g = "W") : (c.l += 1, l && (c.cl += 1), g = "L"), c.results.push({ gameId: r.id, date: r.date, mark: g, my: m, their: f, opp: h === "home" ? r.awayTeamId : r.homeTeamId, conf: l });
515
+ d === "tie" ? (c.t += 1, n && (c.ct += 1)) : d === h ? (c.w += 1, n && (c.cw += 1), g = "W") : (c.l += 1, n && (c.cl += 1), g = "L"), c.results.push({ gameId: r.id, date: r.date, mark: g, my: m, their: f, opp: h === "home" ? r.awayTeamId : r.homeTeamId, conf: n });
510
516
  }
511
517
  }
512
518
  return t;
@@ -540,7 +546,7 @@ function ee(a, e) {
540
546
  const t = a[e];
541
547
  return t && t.results.length ? t.results[t.results.length - 1] : null;
542
548
  }
543
- function Ve(a, e, t, s = "") {
549
+ function Ye(a, e, t, s = "") {
544
550
  let o = null;
545
551
  for (const r of a || [])
546
552
  r.sport === e && (t && r.effectiveDate > t || s && r.gender && r.gender !== s || (!o || r.effectiveDate > o.effectiveDate) && (o = r));
@@ -552,17 +558,17 @@ function W(a, e, t, s, o) {
552
558
  const d = /* @__PURE__ */ new Map();
553
559
  for (const h of a || []) {
554
560
  if (h.sport !== s || o && h.effectiveDate > o || h.gender && r.gender !== h.gender && r.gender !== "coed") continue;
555
- const n = h.gender || "", c = d.get(n);
556
- (!c || h.effectiveDate > c.effectiveDate) && d.set(n, h);
561
+ const l = h.gender || "", c = d.get(l);
562
+ (!c || h.effectiveDate > c.effectiveDate) && d.set(l, h);
557
563
  }
558
- let l = null;
564
+ let n = null;
559
565
  for (const h of d.values()) {
560
- const n = (h.teamIds || []).indexOf(t);
561
- n !== -1 && (!l || h.effectiveDate > l.effectiveDate) && (l = { poll: h, rank: n + 1 });
566
+ const l = (h.teamIds || []).indexOf(t);
567
+ l !== -1 && (!n || h.effectiveDate > n.effectiveDate) && (n = { poll: h, rank: l + 1 });
562
568
  }
563
- return l ? l.rank : null;
569
+ return n ? n.rank : null;
564
570
  }
565
- function De(a, e, t) {
571
+ function Fe(a, e, t) {
566
572
  if (!a) return { kind: "none", delta: 0 };
567
573
  const s = (a.teamIds || []).indexOf(t) + 1;
568
574
  if (!s) return { kind: "none", delta: 0 };
@@ -572,36 +578,36 @@ function De(a, e, t) {
572
578
  const r = o - s;
573
579
  return r > 0 ? { kind: "up", delta: r } : r < 0 ? { kind: "down", delta: -r } : { kind: "same", delta: 0 };
574
580
  }
575
- function Fe(a) {
581
+ function ze(a) {
576
582
  return /^https?:\/\//i.test(String(a || ""));
577
583
  }
578
584
  function re(a, { w: e, h: t } = {}) {
579
- if (!Fe(a)) return "";
585
+ if (!ze(a)) return "";
580
586
  const s = [];
581
587
  e && s.push(`w=${Math.max(1, Math.round(e))}`), t && s.push(`h=${Math.max(1, Math.round(t))}`), s.push("f=webp");
582
588
  const o = a.includes("?") ? "&" : "?";
583
589
  return `${a}${o}${s.join("&")}`;
584
590
  }
585
- function A(a, e) {
591
+ function E(a, e) {
586
592
  const t = e * 2;
587
593
  return re(a?.logoAssetId, { w: t, h: t });
588
594
  }
589
- function ze(a, e) {
595
+ function Be(a, e) {
590
596
  return re(a?.photoAssetId, { w: e * 2 });
591
597
  }
592
598
  function V(a, e, { title: t, sub: s, teams: o }) {
593
- const r = ae(), l = !!a.querySelector(':scope > a[slot="nav"]') || ve(r, e.hrefs, e.sport) !== null;
599
+ const r = ae(), n = !!a.querySelector(':scope > a[slot="nav"]') || be(r, e.hrefs, e.sport) !== null;
594
600
  return i`
595
601
  <div class="band section">
596
602
  <div class="inner">
597
603
  <h1>${t}</h1>
598
604
  ${s ? i`<p class="sub">${s}</p>` : p}
599
605
  </div>
600
- ${l ? i`
601
- <nav class="sectionnav" aria-label="${I(e.sport)} section">
606
+ ${n ? i`
607
+ <nav class="sectionnav" aria-label="${T(e.sport)} section">
602
608
  <div class="navrow">
603
609
  <slot name="nav">
604
- ${be(e.sport, o, e.hrefs).map((h) => i`<a href=${h.href}
610
+ ${ye(e.sport, o, e.hrefs).map((h) => i`<a href=${h.href}
605
611
  aria-current=${r && x(h.href) === r ? "page" : p}>${h.label}</a>`)}
606
612
  </slot>
607
613
  </div>
@@ -609,17 +615,17 @@ function V(a, e, { title: t, sub: s, teams: o }) {
609
615
  </div>
610
616
  `;
611
617
  }
612
- const S = (a, e) => {
618
+ const I = (a, e) => {
613
619
  const t = a.teamsById[e];
614
620
  return t ? a.schoolsById[t.schoolId] : null;
615
- }, T = (a, e) => S(a, e)?.name || "TBD", _ = (a, e) => S(a, e)?.abbr || "TBD";
621
+ }, S = (a, e) => I(a, e)?.name || "TBD", _ = (a, e) => I(a, e)?.abbr || "TBD";
616
622
  function C(a, e = 26) {
617
623
  if (!a) return p;
618
- const t = A(a, e);
624
+ const t = E(a, e);
619
625
  if (t)
620
626
  return i`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
621
627
  src=${t} style="width:${e}px;height:${e}px" />`;
622
- const s = a.colorPrimary || "#030711", o = E(s);
628
+ const s = a.colorPrimary || "#030711", o = A(s);
623
629
  return i`<span class="swatch" aria-hidden="true"
624
630
  style="width:${e}px;height:${e}px;background:${s};color:${o};font-size:${Math.max(8, e * 0.28)}px"
625
631
  >${j(a)}</span>`;
@@ -629,7 +635,7 @@ function Y(a, e, t) {
629
635
  return s ? i`<span class="rankbadge">#${s}</span>` : p;
630
636
  }
631
637
  function ie(a, e, t) {
632
- const s = S(a, e);
638
+ const s = I(a, e);
633
639
  return s ? i`${Y(a, e, t)}<a href=${u(a.hrefs.school, { id: s.id })}>${s.name}</a>` : i`<span class="mut">TBD</span>`;
634
640
  }
635
641
  function K(a, e, t = 5) {
@@ -638,7 +644,7 @@ function K(a, e, t = 5) {
638
644
  const o = s.results.slice(-1 * t);
639
645
  return i`<span class="dots" role="img" aria-label="last ${o.length} results">
640
646
  ${o.map((r) => i`<a class="dot ${r.mark}"
641
- title="${r.mark} ${r.my}-${r.their} vs ${T(a, r.opp)}"
647
+ title="${r.mark} ${r.my}-${r.their} vs ${S(a, r.opp)}"
642
648
  href=${u(a.hrefs.game, { sport: a.sport, id: r.gameId })}>${r.mark}</a>`)}
643
649
  </span>`;
644
650
  }
@@ -662,7 +668,7 @@ function ne(a, e, t) {
662
668
  const s = e.homeTeamId === t ? e.awayTeamId : e.homeTeamId, o = e.homeTeamId === t ? "vs" : "at";
663
669
  return i`${e.state === "live" ? i`<span class="pill live">Live</span> ` : i`${y(e.date, { month: "numeric", day: "numeric" })} `}${o} ${_(a, s)}`;
664
670
  }
665
- class Be extends $ {
671
+ class Pe extends $ {
666
672
  static styles = F;
667
673
  static properties = {
668
674
  ...$.properties,
@@ -681,20 +687,20 @@ class Be extends $ {
681
687
  this._datePinned = !!this.date;
682
688
  }
683
689
  async fetchData(e) {
684
- const t = this.season || N(), [s, o, r, d, l] = await Promise.all([
690
+ const t = this.season || N(), [s, o, r, d, n] = await Promise.all([
685
691
  e.listSchools(),
686
692
  e.listTeams({ sport: this.sport }),
687
693
  e.listConferences(),
688
694
  e.listGames({ sport: this.sport, season: t }),
689
695
  e.listRankings({ sport: this.sport })
690
696
  ]);
691
- return this._datePinned || (this.date = pe(d.items.map((h) => h.date)), this._datePinned = !0), {
697
+ return this._datePinned || (this.date = fe(d.items.map((h) => h.date)), this._datePinned = !0), {
692
698
  season: t,
693
699
  schools: s.items,
694
700
  teams: o.items,
695
701
  conferences: r.items,
696
702
  games: d.items,
697
- rankings: l.items
703
+ rankings: n.items
698
704
  };
699
705
  }
700
706
  get ctx() {
@@ -708,18 +714,18 @@ class Be extends $ {
708
714
  }, this._ctxData = this.data), this._ctx;
709
715
  }
710
716
  renderView() {
711
- const e = this.ctx, t = v(this.data.conferences), s = [...new Set(this.data.games.map((n) => n.date).filter(Boolean))].sort(), o = Number.MAX_SAFE_INTEGER, r = (n) => {
712
- const c = [n.awayTeamId, n.homeTeamId].map((m) => W(e.rankings, e.teamsById, m, this.sport, n.date)).filter(Boolean);
717
+ const e = this.ctx, t = v(this.data.conferences), s = [...new Set(this.data.games.map((l) => l.date).filter(Boolean))].sort(), o = Number.MAX_SAFE_INTEGER, r = (l) => {
718
+ const c = [l.awayTeamId, l.homeTeamId].map((m) => W(e.rankings, e.teamsById, m, this.sport, l.date)).filter(Boolean);
713
719
  return c.length ? Math.min(...c) : o;
714
- }, d = this.data.games.filter((n) => n.date === this.date), l = new Map(d.map((n) => [n, r(n)]));
715
- d.sort((n, c) => (n.state === "live" ? 0 : 1) - (c.state === "live" ? 0 : 1) || l.get(n) - l.get(c));
720
+ }, d = this.data.games.filter((l) => l.date === this.date), n = new Map(d.map((l) => [l, r(l)]));
721
+ d.sort((l, c) => (l.state === "live" ? 0 : 1) - (c.state === "live" ? 0 : 1) || n.get(l) - n.get(c));
716
722
  const h = /* @__PURE__ */ new Map();
717
- return d.forEach((n) => {
718
- const c = n.gameType === "conference" && n.conferenceId ? t[n.conferenceId]?.name || "Conference" : n.gameType === "playoff" ? "Playoffs" : n.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
719
- h.has(c) || h.set(c, []), h.get(c).push(n);
723
+ return d.forEach((l) => {
724
+ const c = l.gameType === "conference" && l.conferenceId ? t[l.conferenceId]?.name || "Conference" : l.gameType === "playoff" ? "Playoffs" : l.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
725
+ h.has(c) || h.set(c, []), h.get(c).push(l);
720
726
  }), i`
721
727
  ${V(this, e, {
722
- title: i`${I(this.sport)} scores &amp; schedules`,
728
+ title: i`${T(this.sport)} scores &amp; schedules`,
723
729
  sub: i`${y(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${d.length} games`,
724
730
  teams: this.data.teams
725
731
  })}
@@ -727,11 +733,11 @@ class Be extends $ {
727
733
  ${P(this)}
728
734
  <div class="toolbar">
729
735
  <label class="asof" for="datesel">Date</label>
730
- <select id="datesel" @change=${(n) => {
731
- this.date = n.target.value;
736
+ <select id="datesel" @change=${(l) => {
737
+ this.date = l.target.value;
732
738
  }}>
733
- ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((n) => i`<option value=${n} ?selected=${n === this.date}>
734
- ${y(n, { weekday: "short", month: "short", day: "numeric" })}${n === M() ? " · today" : ""}
739
+ ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((l) => i`<option value=${l} ?selected=${l === this.date}>
740
+ ${y(l, { weekday: "short", month: "short", day: "numeric" })}${l === M() ? " · today" : ""}
735
741
  </option>`)}
736
742
  </select>
737
743
  <button class="chip" ?disabled=${s.indexOf(this.date) <= 0}
@@ -746,8 +752,8 @@ class Be extends $ {
746
752
  <span class="asof">Live games first · report a score to see it update here</span>
747
753
  </div>
748
754
  ${d.length ? p : i`<p class="empty">No ${this.sport} games on this date.</p>`}
749
- ${[...h.entries()].map(([n, c]) => i`
750
- <div class="section-title">${n}</div>
755
+ ${[...h.entries()].map(([l, c]) => i`
756
+ <div class="section-title">${l}</div>
751
757
  <div class="card"><ul class="gamelist">
752
758
  ${c.map((m) => this.renderGame(e, m))}
753
759
  </ul></div>
@@ -759,12 +765,12 @@ class Be extends $ {
759
765
  // a lone score column on the far right read as detached from the teams).
760
766
  // Scheduled games carry their start time on the status pill alone.
761
767
  renderGame(e, t) {
762
- const s = t.state === "final" || t.state === "live", o = (d, l, h = p) => i`<span class="side">${ie(e, d, t.date)}${s ? i`<span class="score">${l}</span>` : p}${h}</span>`, r = Ce(t);
768
+ const s = t.state === "final" || t.state === "live", o = (d, n, h = p) => i`<span class="side">${ie(e, d, t.date)}${s ? i`<span class="score">${n}</span>` : p}${h}</span>`, r = De(t);
763
769
  return i`
764
770
  <li>
765
771
  ${R(t)}
766
772
  <span class="opp matchup">${o(t.awayTeamId, t.awayScore, i`<span class="at">at</span>`)}${o(t.homeTeamId, t.homeScore)}</span>
767
- ${r ? i`<span class="ff">${T(e, r === "home" ? t.homeTeamId : t.awayTeamId)} forfeited</span>` : p}
773
+ ${r ? i`<span class="ff">${S(e, r === "home" ? t.homeTeamId : t.awayTeamId)} forfeited</span>` : p}
768
774
  <span class="where">${t.venue || ""}</span>
769
775
  ${t.broadcast ? i`<span class="pill class">${t.broadcast}</span>` : p}
770
776
  <a class="box" href=${u(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score →</a>
@@ -772,8 +778,8 @@ class Be extends $ {
772
778
  `;
773
779
  }
774
780
  }
775
- globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Be);
776
- class Pe extends $ {
781
+ globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Pe);
782
+ class Ae extends $ {
777
783
  static styles = F;
778
784
  static properties = {
779
785
  ...$.properties,
@@ -786,7 +792,7 @@ class Pe extends $ {
786
792
  super(), this.sport = "football", this.season = "", this.classFilter = "All", this.query = "";
787
793
  }
788
794
  async fetchData(e) {
789
- const t = this.season || N(), [s, o, r, d, l] = await Promise.all([
795
+ const t = this.season || N(), [s, o, r, d, n] = await Promise.all([
790
796
  e.listConferences({ active: !0 }),
791
797
  e.listSchools(),
792
798
  e.listTeams({ sport: this.sport }),
@@ -799,7 +805,7 @@ class Pe extends $ {
799
805
  schools: o.items,
800
806
  teams: r.items,
801
807
  games: d.items,
802
- rankings: l.items
808
+ rankings: n.items
803
809
  };
804
810
  }
805
811
  get ctx() {
@@ -813,10 +819,10 @@ class Pe extends $ {
813
819
  }, this._ctxData = this.data), this._ctx;
814
820
  }
815
821
  renderView() {
816
- const e = this.ctx, t = ["All", ...[...new Set(this.data.conferences.flatMap((o) => o.classifications || []))].sort(X)].slice(0, 9), s = this.data.conferences.filter((o) => o.active !== !1).filter((o) => this.classFilter === "All" || (o.classifications || []).includes(this.classFilter)).sort(ue);
822
+ const e = this.ctx, t = ["All", ...[...new Set(this.data.conferences.flatMap((o) => o.classifications || []))].sort(X)].slice(0, 9), s = this.data.conferences.filter((o) => o.active !== !1).filter((o) => this.classFilter === "All" || (o.classifications || []).includes(this.classFilter)).sort(ge);
817
823
  return i`
818
824
  ${V(this, e, {
819
- title: i`${I(this.sport)} standings`,
825
+ title: i`${T(this.sport)} standings`,
820
826
  sub: i`${this.data.season} season · every conference, computed live from reported results`,
821
827
  teams: this.data.teams
822
828
  })}
@@ -858,7 +864,7 @@ class Pe extends $ {
858
864
  <th>Streak</th><th>Last 5</th><th>Next</th>
859
865
  </tr></thead>
860
866
  <tbody>
861
- ${r.map((d, l) => this.renderRow(e, d, l, o))}
867
+ ${r.map((d, n) => this.renderRow(e, d, n, o))}
862
868
  </tbody>
863
869
  </table></div>
864
870
  </div>
@@ -867,12 +873,12 @@ class Pe extends $ {
867
873
  renderRow(e, t, s, o) {
868
874
  const r = e.schoolsById[t.team.schoolId], d = r?.name || t.team.name || "TBD";
869
875
  if (o && !d.toLowerCase().includes(o)) return p;
870
- const l = t.rec.pf - t.rec.pa, h = q(this.data.games, t.team.id), n = () => {
876
+ const n = t.rec.pf - t.rec.pa, h = q(this.data.games, t.team.id), l = () => {
871
877
  location.href = u(e.hrefs.school, { id: t.team.schoolId });
872
878
  };
873
879
  return i`
874
880
  <tr class="rowlink" @click=${(c) => {
875
- c.target.closest("a") || n();
881
+ c.target.closest("a") || l();
876
882
  }}>
877
883
  <td class="mut">${s + 1}</td>
878
884
  <td class="teamcell">
@@ -885,7 +891,7 @@ class Pe extends $ {
885
891
  <td class="num">${J(t.overallPct)}</td>
886
892
  <td class="num">${t.rec.pf}</td>
887
893
  <td class="num">${t.rec.pa}</td>
888
- <td class="num" style="color:${l >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${l > 0 ? "+" : ""}${l}</td>
894
+ <td class="num" style="color:${n >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${n > 0 ? "+" : ""}${n}</td>
889
895
  <td>${L(t.rec.results) || "·"}</td>
890
896
  <td>${K(e, t.team.id)}</td>
891
897
  <td>${ne(e, h, t.team.id)}</td>
@@ -893,7 +899,7 @@ class Pe extends $ {
893
899
  `;
894
900
  }
895
901
  }
896
- globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", Pe);
902
+ globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", Ae);
897
903
  const Ee = b`
898
904
  .hero1 {
899
905
  border-radius: var(--hsot-radius-md); color: var(--hsot-white);
@@ -911,7 +917,7 @@ const Ee = b`
911
917
  .delta.new { background: var(--hsot-straw); color: #6b5900; border-radius: var(--hsot-radius-xs); padding: 0.1rem 0.3rem; font-size: 0.7rem; }
912
918
  .sparkline { vertical-align: middle; }
913
919
  `;
914
- class Ae extends $ {
920
+ class _e extends $ {
915
921
  static styles = [...F, Ee];
916
922
  static properties = {
917
923
  ...$.properties,
@@ -929,20 +935,20 @@ class Ae extends $ {
929
935
  e && (this.pollDate = e);
930
936
  }
931
937
  async fetchData(e) {
932
- const t = this.season || N(), [s, o, r, d, l] = await Promise.all([
938
+ const t = this.season || N(), [s, o, r, d, n] = await Promise.all([
933
939
  e.listRankings({ sport: this.sport, ...this.gender ? { gender: this.gender } : {} }),
934
940
  e.listSchools(),
935
941
  e.listTeams({ sport: this.sport }),
936
942
  e.listConferences(),
937
943
  e.listGames({ sport: this.sport, season: t })
938
- ]), h = s.items.filter((n) => !this.gender || !n.gender || n.gender === this.gender).sort((n, c) => c.effectiveDate.localeCompare(n.effectiveDate));
944
+ ]), h = s.items.filter((l) => !this.gender || !l.gender || l.gender === this.gender).sort((l, c) => c.effectiveDate.localeCompare(l.effectiveDate));
939
945
  return {
940
946
  season: t,
941
947
  polls: h,
942
948
  schools: o.items,
943
949
  teams: r.items,
944
950
  conferences: d.items,
945
- games: l.items
951
+ games: n.items
946
952
  };
947
953
  }
948
954
  get ctx() {
@@ -956,17 +962,17 @@ class Ae extends $ {
956
962
  }, this._ctxData = this.data), this._ctx;
957
963
  }
958
964
  sparkline(e, t, s) {
959
- const l = t.map((m, f) => {
965
+ const n = t.map((m, f) => {
960
966
  const g = (m.teamIds || []).indexOf(e);
961
967
  if (g === -1) return null;
962
968
  const k = t.length === 1 ? 96 / 2 : f / (t.length - 1) * 90 + 3, O = 3 + g / 24 * 20;
963
969
  return { x: k, y: O };
964
970
  }), h = [];
965
- let n = [];
966
- if (l.forEach((m) => {
967
- m ? n.push(m) : n.length && (h.push(n), n = []);
968
- }), n.length && h.push(n), !h.length) return p;
969
- const c = l[s];
971
+ let l = [];
972
+ if (n.forEach((m) => {
973
+ m ? l.push(m) : l.length && (h.push(l), l = []);
974
+ }), l.length && h.push(l), !h.length) return p;
975
+ const c = n[s];
970
976
  return i`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
971
977
  ${h.map((m) => Q`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
972
978
  points=${m.map((f) => `${f.x.toFixed(1)},${f.y.toFixed(1)}`).join(" ")}></polyline>`)}
@@ -974,16 +980,16 @@ class Ae extends $ {
974
980
  </svg>`;
975
981
  }
976
982
  movement(e, t, s) {
977
- const o = De(e, t, s);
983
+ const o = Fe(e, t, s);
978
984
  return o.kind === "up" ? i`<span class="delta up">▲ ${o.delta}</span>` : o.kind === "down" ? i`<span class="delta down">▼ ${o.delta}</span>` : o.kind === "new" ? i`<span class="delta new">NEW</span>` : o.kind === "same" ? i`<span class="delta same">—</span>` : i`<span class="delta same">·</span>`;
979
985
  }
980
986
  renderView() {
981
987
  const e = this.ctx, t = this.data.polls;
982
988
  if (!t.length) return i`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
983
- const s = Math.max(0, t.findIndex((m) => m.effectiveDate === this.pollDate)), o = t[s] || t[0], r = t[s + 1] || null, d = t.slice().reverse(), l = d.indexOf(o), h = v(this.data.conferences), n = (o.teamIds || [])[0], c = n ? S(e, n) : null;
989
+ const s = Math.max(0, t.findIndex((m) => m.effectiveDate === this.pollDate)), o = t[s] || t[0], r = t[s + 1] || null, d = t.slice().reverse(), n = d.indexOf(o), h = v(this.data.conferences), l = (o.teamIds || [])[0], c = l ? I(e, l) : null;
984
990
  return i`
985
991
  ${V(this, e, {
986
- title: i`${I(this.sport)} Top 25`,
992
+ title: i`${T(this.sport)} Top 25`,
987
993
  sub: i`The HighSchoolOT poll · updated weekly · ${t.length} polls this season`,
988
994
  teams: this.data.teams
989
995
  })}
@@ -1009,14 +1015,14 @@ class Ae extends $ {
1009
1015
  <span class="spacer"></span>
1010
1016
  <span class="asof">Movement vs. the previous poll · sparkline = season rank history</span>
1011
1017
  </div>
1012
- ${c ? this.renderHero(e, o, r, n, c, h) : p}
1018
+ ${c ? this.renderHero(e, o, r, l, c, h) : p}
1013
1019
  <div class="card"><div class="tablewrap"><table class="data">
1014
1020
  <thead><tr>
1015
1021
  <th class="num">Rk</th><th>Mvmt</th><th>Team</th><th class="num">Record</th>
1016
1022
  <th>Conference</th><th>Last result</th><th>Next</th><th>Season</th>
1017
1023
  </tr></thead>
1018
1024
  <tbody>
1019
- ${(o.teamIds || []).map((m, f) => f === 0 || !m ? p : this.renderRow(e, o, r, d, l, h, m, f + 1))}
1025
+ ${(o.teamIds || []).map((m, f) => f === 0 || !m ? p : this.renderRow(e, o, r, d, n, h, m, f + 1))}
1020
1026
  </tbody>
1021
1027
  </table></div></div>
1022
1028
  <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>
@@ -1024,7 +1030,7 @@ class Ae extends $ {
1024
1030
  `;
1025
1031
  }
1026
1032
  renderHero(e, t, s, o, r, d) {
1027
- const l = e.records[o], h = ee(e.records, o), n = d[e.teamsById[o]?.conferenceId], c = `linear-gradient(120deg, ${r.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1033
+ const n = e.records[o], h = ee(e.records, o), l = d[e.teamsById[o]?.conferenceId], c = `linear-gradient(120deg, ${r.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1028
1034
  return i`
1029
1035
  <div class="hero1" style="background:${c}">
1030
1036
  <div class="bigrank">#1</div>
@@ -1032,8 +1038,8 @@ class Ae extends $ {
1032
1038
  <div>
1033
1039
  <h2><a href=${u(e.hrefs.school, { id: r.id })}>${r.name} ${r.mascot || ""}</a></h2>
1034
1040
  <div class="facts">
1035
- ${w(l)} overall${n ? i` · ${w(l, !0)} ${n.name}` : p}
1036
- · streak ${L(l?.results) || "·"}
1041
+ ${w(n)} overall${l ? i` · ${w(n, !0)} ${l.name}` : p}
1042
+ · streak ${L(n?.results) || "·"}
1037
1043
  ${h ? i` · last: ${h.mark} ${h.my}-${h.their} vs ${_(e, h.opp)}` : p}
1038
1044
  &nbsp;${this.movement(t, s, o)}
1039
1045
  </div>
@@ -1041,33 +1047,33 @@ class Ae extends $ {
1041
1047
  </div>
1042
1048
  `;
1043
1049
  }
1044
- renderRow(e, t, s, o, r, d, l, h) {
1045
- const n = S(e, l);
1046
- if (!n) return p;
1047
- const c = e.records[l], m = ee(e.records, l), f = q(this.data.games, l), g = d[e.teamsById[l]?.conferenceId], k = () => {
1048
- location.href = u(e.hrefs.school, { id: n.id });
1050
+ renderRow(e, t, s, o, r, d, n, h) {
1051
+ const l = I(e, n);
1052
+ if (!l) return p;
1053
+ const c = e.records[n], m = ee(e.records, n), f = q(this.data.games, n), g = d[e.teamsById[n]?.conferenceId], k = () => {
1054
+ location.href = u(e.hrefs.school, { id: l.id });
1049
1055
  };
1050
1056
  return i`
1051
1057
  <tr class="rowlink" @click=${(O) => {
1052
1058
  O.target.closest("a") || k();
1053
1059
  }}>
1054
1060
  <td class="num" style="font-weight:700">${h}</td>
1055
- <td>${this.movement(t, s, l)}</td>
1056
- <td class="teamcell">${C(n)}<a href=${u(e.hrefs.school, { id: n.id })}>${n.name}</a>
1057
- <span class="mut" style="font-size:0.78rem">${n.mascot || ""}</span></td>
1061
+ <td>${this.movement(t, s, n)}</td>
1062
+ <td class="teamcell">${C(l)}<a href=${u(e.hrefs.school, { id: l.id })}>${l.name}</a>
1063
+ <span class="mut" style="font-size:0.78rem">${l.mascot || ""}</span></td>
1058
1064
  <td class="num">${w(c)}</td>
1059
1065
  <td class="mut">${g?.name || "Independent"}</td>
1060
1066
  <td>${m ? i`<a class="box" style="text-decoration:none" href=${u(e.hrefs.game, { sport: this.sport, id: m.gameId })}>
1061
1067
  <b style="color:${m.mark === "W" ? "var(--hsot-win)" : m.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${m.mark}</b>
1062
1068
  ${m.my}-${m.their} vs ${_(e, m.opp)}</a>` : i`<span class="mut">·</span>`}</td>
1063
- <td>${ne(e, f, l)}</td>
1064
- <td>${this.sparkline(l, o, r)}</td>
1069
+ <td>${ne(e, f, n)}</td>
1070
+ <td>${this.sparkline(n, o, r)}</td>
1065
1071
  </tr>
1066
1072
  `;
1067
1073
  }
1068
1074
  }
1069
- globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", Ae);
1070
- const _e = b`
1075
+ globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", _e);
1076
+ const Re = b`
1071
1077
  .schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
1072
1078
  .schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
1073
1079
  .schoolhero .crest {
@@ -1121,8 +1127,8 @@ const _e = b`
1121
1127
  table.data.roster .sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--hsot-gray-5); }
1122
1128
  }
1123
1129
  `;
1124
- class Re extends $ {
1125
- static styles = [...F, _e];
1130
+ class Ne extends $ {
1131
+ static styles = [...F, Re];
1126
1132
  static properties = {
1127
1133
  ...$.properties,
1128
1134
  schoolId: { type: String, attribute: "school-id" },
@@ -1139,7 +1145,7 @@ class Re extends $ {
1139
1145
  e && !this.sport && (this.sport = e);
1140
1146
  }
1141
1147
  async fetchData(e) {
1142
- const t = this.season || N(), s = await e.getSchool(this.schoolId), r = (await e.listTeams({ schoolId: this.schoolId })).items, d = r.find((k) => k.sport === (this.sport || "football")) || r[0] || null, [l, h, n, c, m, f, g] = await Promise.all([
1148
+ const t = this.season || N(), s = await e.getSchool(this.schoolId), r = (await e.listTeams({ schoolId: this.schoolId })).items, d = r.find((k) => k.sport === (this.sport || "football")) || r[0] || null, [n, h, l, c, m, f, g] = await Promise.all([
1143
1149
  d ? e.listGames({ sport: d.sport, season: t }) : Promise.resolve({ items: [] }),
1144
1150
  d ? e.listTeams({ sport: d.sport }) : Promise.resolve({ items: [] }),
1145
1151
  e.listSchools(),
@@ -1155,9 +1161,9 @@ class Re extends $ {
1155
1161
  school: s,
1156
1162
  teams: r,
1157
1163
  active: d,
1158
- games: l.items,
1164
+ games: n.items,
1159
1165
  allTeams: h.items,
1160
- schools: n.items,
1166
+ schools: l.items,
1161
1167
  conferences: c.items,
1162
1168
  rankings: m.items,
1163
1169
  roster: f.items.find((k) => k.season === t) || null,
@@ -1180,18 +1186,18 @@ class Re extends $ {
1180
1186
  renderView() {
1181
1187
  const { school: e, teams: t, active: s, season: o } = this.data;
1182
1188
  if (!e) return i`<div class="view"><p class="empty">School not found.</p></div>`;
1183
- const r = this.ctx, d = E(e.colorPrimary || "#030711"), l = (e.adm || [])[0], h = v(this.data.conferences), n = s ? h[s.conferenceId] : null;
1189
+ const r = this.ctx, d = A(e.colorPrimary || "#030711"), n = (e.adm || [])[0], h = v(this.data.conferences), l = s ? h[s.conferenceId] : null;
1184
1190
  return i`
1185
1191
  <div class="schoolhero" style="background:linear-gradient(115deg, ${e.colorPrimary || "#030711"} 0%, ${e.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${d}">
1186
1192
  <div class="inner">
1187
- ${A(e, 84) ? i`<img class="crest logo" alt="" loading="lazy" src=${A(e, 84)} />` : i`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${E(e.colorSecondary || "#7C7C7C")}">${j(e)}</div>`}
1193
+ ${E(e, 84) ? i`<img class="crest logo" alt="" loading="lazy" src=${E(e, 84)} />` : i`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${A(e.colorSecondary || "#7C7C7C")}">${j(e)}</div>`}
1188
1194
  <div style="min-width:260px">
1189
1195
  <h1>${e.name} <span class="mascot">${e.mascot || ""}</span></h1>
1190
1196
  <div class="facts">
1191
1197
  ${e.location ? i`<span><b>Location</b>${e.location}${e.county ? i` · ${e.county} County` : p}</span>` : p}
1192
1198
  ${e.association ? i`<span><b>League</b>${e.association}${e.classification ? i` · ${e.classification}` : p}</span>` : p}
1193
- ${n ? i`<span><b>Conference</b>${n.name}</span>` : p}
1194
- ${l ? i`<span><b>Enrollment</b>${l.value.toLocaleString()} (${l.season} ADM)</span>` : p}
1199
+ ${l ? i`<span><b>Conference</b>${l.name}</span>` : p}
1200
+ ${n ? i`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : p}
1195
1201
  ${e.openingYear ? i`<span><b>Opened</b>${e.openingYear}</span>` : p}
1196
1202
  ${e.areaCode ? i`<span><b>Area</b>${e.areaCode}</span>` : p}
1197
1203
  </div>
@@ -1207,22 +1213,22 @@ class Re extends $ {
1207
1213
  </div>
1208
1214
  ${B(this, i`
1209
1215
  ${P(this)}
1210
- ${s ? this.renderTeam(r, s, n, o) : i`<p class="empty">No teams recorded for this school yet.</p>`}
1216
+ ${s ? this.renderTeam(r, s, l, o) : i`<p class="empty">No teams recorded for this school yet.</p>`}
1211
1217
  `)}
1212
1218
  `;
1213
1219
  }
1214
1220
  renderTeam(e, t, s, o) {
1215
- const r = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, d = r.w + r.l + r.t, l = s ? this.data.allTeams.filter((m) => m.conferenceId === s.id) : [], h = s ? oe(l, e.records).findIndex((m) => m.team.id === t.id) + 1 : 0, n = W(e.rankings, e.teamsById, t.id, t.sport, null), c = this.data.games.filter((m) => m.homeTeamId === t.id || m.awayTeamId === t.id).sort((m, f) => String(m.date).localeCompare(String(f.date)));
1221
+ const r = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, d = r.w + r.l + r.t, n = s ? this.data.allTeams.filter((m) => m.conferenceId === s.id) : [], h = s ? oe(n, e.records).findIndex((m) => m.team.id === t.id) + 1 : 0, l = W(e.rankings, e.teamsById, t.id, t.sport, null), c = this.data.games.filter((m) => m.homeTeamId === t.id || m.awayTeamId === t.id).sort((m, f) => String(m.date).localeCompare(String(f.date)));
1216
1222
  return i`
1217
1223
  <div class="tiles">
1218
1224
  <div class="tile"><div class="k">Overall</div><div class="v">${w(r)}</div><div class="s">${d} games played</div></div>
1219
1225
  <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${w(r, !0)}</div>
1220
- <div class="s">${h ? `${fe(h)} of ${l.length}` : "·"}</div></div>
1226
+ <div class="s">${h ? `${ue(h)} of ${n.length}` : "·"}</div></div>
1221
1227
  <div class="tile"><div class="k">Points</div><div class="v">${d ? (r.pf / d).toFixed(1) : "0.0"}</div>
1222
1228
  <div class="s">scored per game · ${d ? (r.pa / d).toFixed(1) : "0.0"} allowed</div></div>
1223
1229
  <div class="tile"><div class="k">Streak</div><div class="v">${L(r.results) || "·"}</div>
1224
1230
  <div class="s">last 5: ${K(e, t.id)}</div></div>
1225
- <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${n ? `#${n}` : "NR"}</div>
1231
+ <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${l ? `#${l}` : "NR"}</div>
1226
1232
  <div class="s"><a href=${u(e.hrefs.section, { sport: t.sport, view: "rankings" })}>full poll</a></div></div>
1227
1233
  </div>
1228
1234
  ${(t.championships || []).length ? i`
@@ -1244,20 +1250,20 @@ class Re extends $ {
1244
1250
  `;
1245
1251
  }
1246
1252
  renderGameRow(e, t, s) {
1247
- const o = s.homeTeamId === t.id, r = o ? s.awayTeamId : s.homeTeamId, d = o ? s.homeScore : s.awayScore, l = o ? s.awayScore : s.homeScore;
1253
+ const o = s.homeTeamId === t.id, r = o ? s.awayTeamId : s.homeTeamId, d = o ? s.homeScore : s.awayScore, n = o ? s.awayScore : s.homeScore;
1248
1254
  let h = i`<span class="mut">${U(s.time)}</span>`;
1249
1255
  if (s.state === "final") {
1250
1256
  const c = G(s), m = c === "tie" ? "T" : c === (o ? "home" : "away") ? "W" : "L";
1251
- h = i`<span class=${m}>${m}</span> ${d}-${l}${s.finish === "overtime" ? i` <span class="mut">OT</span>` : p}${s.forfeit && s.forfeit !== "none" ? i` <span class="mut">FF</span>` : p}`;
1252
- } else s.state === "live" && (h = i`<span style="color:var(--hsot-red)">${d}-${l}</span>`);
1253
- const n = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1257
+ h = i`<span class=${m}>${m}</span> ${d}-${n}${s.finish === "overtime" ? i` <span class="mut">OT</span>` : p}${s.forfeit && s.forfeit !== "none" ? i` <span class="mut">FF</span>` : p}`;
1258
+ } else s.state === "live" && (h = i`<span style="color:var(--hsot-red)">${d}-${n}</span>`);
1259
+ const l = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1254
1260
  return i`
1255
1261
  <li>
1256
1262
  <span class="d">${y(s.date)}</span>
1257
1263
  ${se(s).kind === "sched" ? p : R(s)}
1258
1264
  <span class="res">${h}</span>
1259
1265
  <span class="opp">${o ? "vs" : "at"} ${ie(e, r, s.date)}
1260
- <span class="pill type">${n}</span>
1266
+ <span class="pill type">${l}</span>
1261
1267
  ${s.broadcast ? i`<span class="pill class">${s.broadcast}</span>` : p}
1262
1268
  </span>
1263
1269
  <span class="where">${s.venue || ""}</span>
@@ -1269,21 +1275,21 @@ class Re extends $ {
1269
1275
  const s = this.data.roster;
1270
1276
  if (!s)
1271
1277
  return i`<p class="empty">Roster not published for ${t}.</p>`;
1272
- const o = ze(s, 560), r = this.data.school?.name || "", d = v(this.data.players), l = s.entries.slice().sort((n, c) => (n.number || 0) - (c.number || 0)), h = l.some((n) => d[n.playerId]?.college);
1278
+ const o = Be(s, 560), r = this.data.school?.name || "", d = v(this.data.players), n = s.entries.slice().sort((l, c) => (l.number || 0) - (c.number || 0)), h = n.some((l) => d[l.playerId]?.college);
1273
1279
  return i`
1274
1280
  ${o ? i`<img class="rosterphoto" src=${o} loading="lazy" decoding="async"
1275
1281
  alt="${r} ${e.name} ${t} team photo" />` : p}
1276
1282
  <div class="tablewrap"><table class="data roster">
1277
1283
  <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>${h ? i`<th>College</th>` : p}</tr></thead>
1278
1284
  <tbody>
1279
- ${l.map((n) => {
1280
- const c = d[n.playerId];
1285
+ ${n.map((l) => {
1286
+ const c = d[l.playerId];
1281
1287
  if (!c) return p;
1282
- const m = [n.position, c.classOf].filter(Boolean).join(" · ") || "·";
1288
+ const m = pe(l), f = [m, c.classOf].filter(Boolean).join(" · ") || "·";
1283
1289
  return i`<tr>
1284
- <td class="num mut">${n.number ?? "·"}</td>
1285
- <td class="player" style="font-weight:500">${c.firstName} ${c.lastName}<span class="sub">${m}</span></td>
1286
- <td class="pos">${n.position || "·"}</td>
1290
+ <td class="num mut">${l.number ?? "·"}</td>
1291
+ <td class="player" style="font-weight:500">${c.firstName} ${c.lastName}<span class="sub">${f}</span></td>
1292
+ <td class="pos">${m || "·"}</td>
1287
1293
  <td class="cls mut">${c.classOf || "·"}</td>
1288
1294
  <td class="num">${me(c.heightIn)}</td>
1289
1295
  <td class="num">${c.weightLb || "·"}</td>
@@ -1295,13 +1301,13 @@ class Re extends $ {
1295
1301
  `;
1296
1302
  }
1297
1303
  }
1298
- globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Re);
1299
- const Ne = "https://api.wral.com/search";
1300
- function Le(a) {
1304
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Ne);
1305
+ const Le = "https://api.wral.com/search";
1306
+ function Oe(a) {
1301
1307
  return a.map((e) => `uri:"${e}"`).join(" OR ");
1302
1308
  }
1303
- function Oe(a, e) {
1304
- const t = String(a || Ne).replace(/\/+$/, ""), s = new URLSearchParams({ query: Le(e), sort: "score", lang: "en" });
1309
+ function He(a, e) {
1310
+ const t = String(a || Le).replace(/\/+$/, ""), s = new URLSearchParams({ query: Oe(e), sort: "score", lang: "en" });
1305
1311
  return `${t}/v1/query?${s}`;
1306
1312
  }
1307
1313
  function le(a) {
@@ -1319,13 +1325,13 @@ function le(a) {
1319
1325
  }
1320
1326
  return { uri: a, title: a };
1321
1327
  }
1322
- async function He(a, e, t) {
1323
- const o = await ((...l) => fetch(...l))(Oe(a, e));
1328
+ async function Ue(a, e, t) {
1329
+ const o = await ((...n) => fetch(...n))(He(a, e));
1324
1330
  if (!o.ok) throw new Error(`search answered ${o.status}`);
1325
- const r = await o.json(), d = new Map((r.items || []).map((l) => [l.uri, l]));
1326
- return e.map((l) => d.get(l) || le(l));
1331
+ const r = await o.json(), d = new Map((r.items || []).map((n) => [n.uri, n]));
1332
+ return e.map((n) => d.get(n) || le(n));
1327
1333
  }
1328
- const Ue = b`
1334
+ const Me = b`
1329
1335
  .breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
1330
1336
  .breadcrumbs a { text-decoration: none; }
1331
1337
  .scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
@@ -1354,6 +1360,20 @@ const Ue = b`
1354
1360
  .covtitle { font-family: var(--hsot-heading-font); font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
1355
1361
  .covdesc { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--hsot-gray-5); line-height: 1.4; }
1356
1362
  .covmeta { margin-top: 0.45rem; font-size: 0.78rem; color: var(--hsot-gray-5); }
1363
+ /* Scoring plays: a compact log under the line score. The play cell is the
1364
+ one table.data cell allowed to wrap — a 60-yard touchdown description
1365
+ must fit a phone. */
1366
+ .plays { border-top: 1px solid var(--hsot-gray-2); padding: 0.7rem 1rem 0.9rem; }
1367
+ .plays-title {
1368
+ font-family: var(--hsot-heading-font); font-weight: 700; font-size: 0.9rem;
1369
+ text-transform: uppercase; letter-spacing: 0.03em; color: var(--hsot-gray-6);
1370
+ text-align: center; margin: 0 0 0.4rem;
1371
+ }
1372
+ table.plays-table { max-width: 720px; margin: 0 auto; }
1373
+ table.plays-table td.when { color: var(--hsot-gray-5); font-variant-numeric: tabular-nums; }
1374
+ table.plays-table td.play { white-space: normal; min-width: 12rem; }
1375
+ /* Game notes are typed with line breaks the desk means to keep. */
1376
+ .gamenote { padding: 0 1rem 0.9rem; text-align: center; white-space: pre-line; }
1357
1377
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
1358
1378
  .ctxcard { padding: 0.85rem 1rem; }
1359
1379
  .ctxcard .who { font-family: var(--hsot-heading-font); font-weight: 700; margin-bottom: 0.4rem; }
@@ -1364,8 +1384,8 @@ const Ue = b`
1364
1384
  .cols { grid-template-columns: 1fr; }
1365
1385
  }
1366
1386
  `;
1367
- class Me extends $ {
1368
- static styles = [...F, Ue];
1387
+ class je extends $ {
1388
+ static styles = [...F, Me];
1369
1389
  static properties = {
1370
1390
  ...$.properties,
1371
1391
  gameId: { type: String, attribute: "game-id" },
@@ -1379,7 +1399,7 @@ class Me extends $ {
1379
1399
  super(), this.gameId = "", this.searchApi = "";
1380
1400
  }
1381
1401
  async fetchData(e) {
1382
- const t = await e.getGame(this.gameId), s = Array.isArray(t.coverageUrls) ? t.coverageUrls : [], [o, r, d, l, h, n] = await Promise.all([
1402
+ const t = await e.getGame(this.gameId), s = Array.isArray(t.coverageUrls) ? t.coverageUrls : [], [o, r, d, n, h, l] = await Promise.all([
1383
1403
  e.listSchools(),
1384
1404
  e.listTeams({ sport: t.sport }),
1385
1405
  e.listConferences(),
@@ -1387,16 +1407,16 @@ class Me extends $ {
1387
1407
  e.listGames({ sport: t.sport, season: t.season }),
1388
1408
  // A search outage must not blank the box score — degrade to bare
1389
1409
  // links (fetchCoverage already degrades per-URL index misses).
1390
- s.length ? He(this.searchApi, s).catch(() => s.map(le)) : Promise.resolve([])
1410
+ s.length ? Ue(this.searchApi, s).catch(() => s.map(le)) : Promise.resolve([])
1391
1411
  ]);
1392
1412
  return {
1393
1413
  game: t,
1394
1414
  schools: o.items,
1395
1415
  teams: r.items,
1396
1416
  conferences: d.items,
1397
- rankings: l.items,
1417
+ rankings: n.items,
1398
1418
  games: h.items,
1399
- coverage: n
1419
+ coverage: l
1400
1420
  };
1401
1421
  }
1402
1422
  get ctx() {
@@ -1412,23 +1432,23 @@ class Me extends $ {
1412
1432
  renderView() {
1413
1433
  const e = this.data.game;
1414
1434
  if (!e) return i`<div class="view"><p class="empty">Game not found.</p></div>`;
1415
- const t = this.ctx, s = v(this.data.conferences), o = t.teamsById[e.awayTeamId] ? t.schoolsById[t.teamsById[e.awayTeamId].schoolId] : null, r = t.teamsById[e.homeTeamId] ? t.schoolsById[t.teamsById[e.homeTeamId].schoolId] : null, d = G(e), l = (c) => e.state === "final" && d !== c && d !== "tie" ? "opacity:0.45" : "", h = e.conferenceId ? s[e.conferenceId] : null, n = this.data.games.filter((c) => c.id !== e.id && c.state === "final" && c.gameType !== "scrimmage" && (c.homeTeamId === e.homeTeamId && c.awayTeamId === e.awayTeamId || c.homeTeamId === e.awayTeamId && c.awayTeamId === e.homeTeamId));
1435
+ const t = this.ctx, s = v(this.data.conferences), o = t.teamsById[e.awayTeamId] ? t.schoolsById[t.teamsById[e.awayTeamId].schoolId] : null, r = t.teamsById[e.homeTeamId] ? t.schoolsById[t.teamsById[e.homeTeamId].schoolId] : null, d = G(e), n = (c) => e.state === "final" && d !== c && d !== "tie" ? "opacity:0.45" : "", h = e.conferenceId ? s[e.conferenceId] : null, l = this.data.games.filter((c) => c.id !== e.id && c.state === "final" && c.gameType !== "scrimmage" && (c.homeTeamId === e.homeTeamId && c.awayTeamId === e.awayTeamId || c.homeTeamId === e.awayTeamId && c.awayTeamId === e.homeTeamId));
1416
1436
  return i`
1417
1437
  ${B(this, i`
1418
1438
  ${P(this)}
1419
1439
  <p class="breadcrumbs">
1420
- <a href=${u(t.hrefs.section, { sport: e.sport, view: "scores" })}>${I(e.sport)}</a> /
1440
+ <a href=${u(t.hrefs.section, { sport: e.sport, view: "scores" })}>${T(e.sport)}</a> /
1421
1441
  <a href=${u(t.hrefs.section, { sport: e.sport, view: "scores" })}>Scores/Schedules</a> /
1422
- ${T(t, e.awayTeamId)} at ${T(t, e.homeTeamId)}
1442
+ ${S(t, e.awayTeamId)} at ${S(t, e.homeTeamId)}
1423
1443
  </p>
1424
1444
  <div class="card">
1425
1445
  <div class="scorehead">
1426
1446
  ${this.teamBlock(t, e, e.awayTeamId, o, !1)}
1427
1447
  <div class="mid">
1428
1448
  <div class="bigscore">
1429
- <span style=${l("away")}>${e.awayScore}</span>
1449
+ <span style=${n("away")}>${e.awayScore}</span>
1430
1450
  <span class="mut" style="font-size:1.6rem">–</span>
1431
- <span style=${l("home")}>${e.homeScore}</span>
1451
+ <span style=${n("home")}>${e.homeScore}</span>
1432
1452
  </div>
1433
1453
  <div class="status">${R(e)}</div>
1434
1454
  <div class="status">${y(e.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${e.state === "scheduled" && e.time ? i` · ${U(e.time)}` : p} · ${e.venue || "Venue TBD"}
@@ -1442,7 +1462,8 @@ class Me extends $ {
1442
1462
  ${this.teamBlock(t, e, e.homeTeamId, r, !0)}
1443
1463
  </div>
1444
1464
  ${this.renderLineScore(e, o, r)}
1445
- ${e.notes ? i`<p class="note" style="padding:0 1rem 0.9rem;text-align:center">${e.notes}</p>` : p}
1465
+ ${this.renderScoringPlays(e, o, r)}
1466
+ ${e.notes ? i`<p class="note gamenote">${e.notes}</p>` : p}
1446
1467
  </div>
1447
1468
  ${(this.data.coverage || []).length ? i`
1448
1469
  <div class="section-title">Coverage</div>
@@ -1464,12 +1485,12 @@ class Me extends $ {
1464
1485
  <div class="cols">
1465
1486
  ${[[e.awayTeamId, o], [e.homeTeamId, r]].map(([c, m]) => this.renderContext(t, c, m))}
1466
1487
  </div>
1467
- ${n.length ? i`
1488
+ ${l.length ? i`
1468
1489
  <div class="section-title">Head to head this season</div>
1469
1490
  <div class="card"><ul class="gamelist">
1470
- ${n.map((c) => i`<li>
1491
+ ${l.map((c) => i`<li>
1471
1492
  <span class="d">${y(c.date)}</span>${R(c)}
1472
- <span class="opp">${T(t, c.awayTeamId)} ${c.awayScore}, ${T(t, c.homeTeamId)} ${c.homeScore}</span>
1493
+ <span class="opp">${S(t, c.awayTeamId)} ${c.awayScore}, ${S(t, c.homeTeamId)} ${c.homeScore}</span>
1473
1494
  <a class="box" href=${u(t.hrefs.game, { sport: e.sport, id: c.id })}>Box score →</a>
1474
1495
  </li>`)}
1475
1496
  </ul></div>` : p}
@@ -1478,13 +1499,13 @@ class Me extends $ {
1478
1499
  }
1479
1500
  teamBlock(e, t, s, o, r) {
1480
1501
  if (!o) return i`<div class="teamblock ${r ? "right" : ""}"><div class="tname">TBD</div></div>`;
1481
- const d = e.teamsById[s], l = e.records[s], h = A(o, 58);
1502
+ const d = e.teamsById[s], n = e.records[s], h = E(o, 58);
1482
1503
  return i`
1483
1504
  <div class="teamblock ${r ? "right" : ""}">
1484
- ${h ? i`<img class="crest logo" alt="" loading="lazy" src=${h} />` : i`<span class="crest" style="background:${o.colorPrimary || "#030711"};color:${E(o.colorPrimary || "#030711")}">${j(o)}</span>`}
1505
+ ${h ? i`<img class="crest logo" alt="" loading="lazy" src=${h} />` : i`<span class="crest" style="background:${o.colorPrimary || "#030711"};color:${A(o.colorPrimary || "#030711")}">${j(o)}</span>`}
1485
1506
  <div>
1486
1507
  <div class="tname">${Y(e, s, t.date)}<a href=${u(e.hrefs.school, { id: o.id })}>${o.name}</a></div>
1487
- <div class="trec">${o.mascot || ""} · ${w(l)}${d?.conferenceId ? i` · ${w(l, !0)} conf` : p}</div>
1508
+ <div class="trec">${o.mascot || ""} · ${w(n)}${d?.conferenceId ? i` · ${w(n, !0)} conf` : p}</div>
1488
1509
  </div>
1489
1510
  </div>
1490
1511
  `;
@@ -1493,19 +1514,19 @@ class Me extends $ {
1493
1514
  const o = e.periodScores || [];
1494
1515
  if (!o.length)
1495
1516
  return i`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>`;
1496
- const r = Math.max(4, ...o.map((n) => n.period)), d = (n) => n <= 4 ? String(n) : `OT${n > 5 ? n - 4 : ""}`, l = (n, c) => {
1517
+ const r = Math.max(4, ...o.map((l) => l.period)), d = (l) => l <= 4 ? String(l) : `OT${l > 5 ? l - 4 : ""}`, n = (l, c) => {
1497
1518
  const m = o.find((f) => f.period === c);
1498
- return m ? m[n] : e.state === "final" ? 0 : "·";
1499
- }, h = (n, c, m) => i`
1519
+ return m ? m[l] : e.state === "final" ? 0 : "·";
1520
+ }, h = (l, c, m) => i`
1500
1521
  <tr>
1501
- <td class="teamcell">${C(n, 20)}${n?.abbr || "TBD"}</td>
1502
- ${Array.from({ length: r }, (f, g) => i`<td class="num">${l(c, g + 1)}</td>`)}
1522
+ <td class="teamcell">${C(l, 20)}${l?.abbr || "TBD"}</td>
1523
+ ${Array.from({ length: r }, (f, g) => i`<td class="num">${n(c, g + 1)}</td>`)}
1503
1524
  <td class="num" style="font-weight:700">${m}</td>
1504
1525
  </tr>`;
1505
1526
  return i`
1506
1527
  <div class="tablewrap" style="border-top:1px solid var(--hsot-gray-2)">
1507
1528
  <table class="data" style="max-width:560px;margin:0.6rem auto 0.9rem">
1508
- <thead><tr><th>Team</th>${Array.from({ length: r }, (n, c) => i`<th class="num">${d(c + 1)}</th>`)}<th class="num">T</th></tr></thead>
1529
+ <thead><tr><th>Team</th>${Array.from({ length: r }, (l, c) => i`<th class="num">${d(c + 1)}</th>`)}<th class="num">T</th></tr></thead>
1509
1530
  <tbody>
1510
1531
  ${h(t, "away", e.awayScore)}
1511
1532
  ${h(s, "home", e.homeScore)}
@@ -1514,6 +1535,32 @@ class Me extends $ {
1514
1535
  </div>
1515
1536
  `;
1516
1537
  }
1538
+ renderScoringPlays(e, t, s) {
1539
+ const o = Array.isArray(e.scoringPlays) ? e.scoringPlays : [];
1540
+ if (!o.length) return p;
1541
+ const r = (d) => [d.period, d.clock].filter(Boolean).join(" ");
1542
+ return i`
1543
+ <div class="plays">
1544
+ <div class="plays-title">Scoring plays</div>
1545
+ <div class="tablewrap">
1546
+ <table class="data plays-table">
1547
+ <thead><tr>
1548
+ <th>When</th><th>Play</th>
1549
+ <th class="num">${t?.abbr || "Away"}</th><th class="num">${s?.abbr || "Home"}</th>
1550
+ </tr></thead>
1551
+ <tbody>
1552
+ ${o.map((d) => i`<tr>
1553
+ <td class="when">${r(d) || "·"}</td>
1554
+ <td class="play">${d.description || "·"}</td>
1555
+ <td class="num">${d.awayScore}</td>
1556
+ <td class="num">${d.homeScore}</td>
1557
+ </tr>`)}
1558
+ </tbody>
1559
+ </table>
1560
+ </div>
1561
+ </div>
1562
+ `;
1563
+ }
1517
1564
  renderContext(e, t, s) {
1518
1565
  if (!s) return p;
1519
1566
  const o = e.records[t], r = q(this.data.games, t);
@@ -1531,9 +1578,9 @@ class Me extends $ {
1531
1578
  `;
1532
1579
  }
1533
1580
  }
1534
- globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", Me);
1535
- const je = 250, Ge = 2;
1536
- class qe extends te {
1581
+ globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", je);
1582
+ const Ge = 250, qe = 2;
1583
+ class We extends te {
1537
1584
  static properties = {
1538
1585
  api: { type: String },
1539
1586
  schoolHref: { type: String, attribute: "school-href" },
@@ -1613,11 +1660,11 @@ class qe extends te {
1613
1660
  }
1614
1661
  onInput(e) {
1615
1662
  const t = e.target.value.trim();
1616
- if (clearTimeout(this.debounceTimer), t.length < Ge) {
1663
+ if (clearTimeout(this.debounceTimer), t.length < qe) {
1617
1664
  this.abortController?.abort(), this.results = [], this.open = !1, this.searched = !1;
1618
1665
  return;
1619
1666
  }
1620
- this.debounceTimer = setTimeout(() => this.search(t), je);
1667
+ this.debounceTimer = setTimeout(() => this.search(t), Ge);
1621
1668
  }
1622
1669
  async search(e) {
1623
1670
  this.abortController?.abort(), this.abortController = new AbortController();
@@ -1710,22 +1757,22 @@ class qe extends te {
1710
1757
  `;
1711
1758
  }
1712
1759
  }
1713
- globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", qe);
1760
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", We);
1714
1761
  export {
1715
1762
  H as D,
1716
- Me as H,
1717
- Ae as a,
1718
- Re as b,
1719
- qe as c,
1720
- Be as d,
1721
- Pe as e,
1763
+ je as H,
1764
+ _e as a,
1765
+ Ne as b,
1766
+ We as c,
1767
+ Pe as d,
1768
+ Ae as e,
1722
1769
  z as f,
1723
1770
  he as g,
1724
1771
  u as h,
1725
1772
  G as i,
1726
- Ve as j,
1773
+ Ye as j,
1727
1774
  L as k,
1728
- De as p,
1775
+ Fe as p,
1729
1776
  w as r,
1730
1777
  oe as s,
1731
1778
  W as t