@wral/hsot-data 0.1.14 → 0.1.15

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