@wral/hsot-data 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- const J = globalThis, me = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ue = /* @__PURE__ */ Symbol(), Ae = /* @__PURE__ */ new WeakMap();
2
- let qe = class {
1
+ const J = globalThis, me = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ue = /* @__PURE__ */ Symbol(), Te = /* @__PURE__ */ new WeakMap();
2
+ let We = class {
3
3
  constructor(e, t, s) {
4
4
  if (this._$cssResult$ = !0, s !== ue) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
5
  this.cssText = e, this.t = t;
@@ -9,7 +9,7 @@ let qe = class {
9
9
  const t = this.t;
10
10
  if (me && e === void 0) {
11
11
  const s = t !== void 0 && t.length === 1;
12
- s && (e = Ae.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Ae.set(t, e));
12
+ s && (e = Te.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Te.set(t, e));
13
13
  }
14
14
  return e;
15
15
  }
@@ -17,28 +17,28 @@ let qe = class {
17
17
  return this.cssText;
18
18
  }
19
19
  };
20
- const kt = (a) => new qe(typeof a == "string" ? a : a + "", void 0, ue), y = (a, ...e) => {
20
+ const St = (a) => new We(typeof a == "string" ? a : a + "", void 0, ue), b = (a, ...e) => {
21
21
  const t = a.length === 1 ? a[0] : e.reduce((s, r, o) => s + ((n) => {
22
22
  if (n._$cssResult$ === !0) return n.cssText;
23
23
  if (typeof n == "number") return n;
24
24
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
25
  })(r) + a[o + 1], a[0]);
26
- return new qe(t, a, ue);
27
- }, St = (a, e) => {
26
+ return new We(t, a, ue);
27
+ }, _t = (a, e) => {
28
28
  if (me) a.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
29
29
  else for (const t of e) {
30
30
  const s = document.createElement("style"), r = J.litNonce;
31
31
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, a.appendChild(s);
32
32
  }
33
- }, Te = me ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((e) => {
33
+ }, Ie = me ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((e) => {
34
34
  let t = "";
35
35
  for (const s of e.cssRules) t += s.cssText;
36
- return kt(t);
36
+ return St(t);
37
37
  })(a) : a;
38
- const { is: _t, defineProperty: At, getOwnPropertyDescriptor: Tt, getOwnPropertyNames: It, getOwnPropertySymbols: Ct, getPrototypeOf: Et } = Object, re = globalThis, Ie = re.trustedTypes, Pt = Ie ? Ie.emptyScript : "", Bt = re.reactiveElementPolyfillSupport, G = (a, e) => a, he = { toAttribute(a, e) {
38
+ const { is: At, defineProperty: Tt, getOwnPropertyDescriptor: It, getOwnPropertyNames: Ct, getOwnPropertySymbols: Et, getPrototypeOf: Pt } = Object, re = globalThis, Ce = re.trustedTypes, Bt = Ce ? Ce.emptyScript : "", Dt = re.reactiveElementPolyfillSupport, j = (a, e) => a, he = { toAttribute(a, e) {
39
39
  switch (e) {
40
40
  case Boolean:
41
- a = a ? Pt : null;
41
+ a = a ? Bt : null;
42
42
  break;
43
43
  case Object:
44
44
  case Array:
@@ -63,23 +63,23 @@ const { is: _t, defineProperty: At, getOwnPropertyDescriptor: Tt, getOwnProperty
63
63
  }
64
64
  }
65
65
  return t;
66
- } }, We = (a, e) => !_t(a, e), Ce = { attribute: !0, type: String, converter: he, reflect: !1, useDefault: !1, hasChanged: We };
66
+ } }, Ve = (a, e) => !At(a, e), Ee = { attribute: !0, type: String, converter: he, reflect: !1, useDefault: !1, hasChanged: Ve };
67
67
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), re.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
- let R = class extends HTMLElement {
68
+ let z = class extends HTMLElement {
69
69
  static addInitializer(e) {
70
70
  this._$Ei(), (this.l ??= []).push(e);
71
71
  }
72
72
  static get observedAttributes() {
73
73
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
74
  }
75
- static createProperty(e, t = Ce) {
75
+ static createProperty(e, t = Ee) {
76
76
  if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
77
77
  const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(e, s, t);
78
- r !== void 0 && At(this.prototype, e, r);
78
+ r !== void 0 && Tt(this.prototype, e, r);
79
79
  }
80
80
  }
81
81
  static getPropertyDescriptor(e, t, s) {
82
- const { get: r, set: o } = Tt(this.prototype, e) ?? { get() {
82
+ const { get: r, set: o } = It(this.prototype, e) ?? { get() {
83
83
  return this[t];
84
84
  }, set(n) {
85
85
  this[t] = n;
@@ -90,17 +90,17 @@ let R = class extends HTMLElement {
90
90
  }, configurable: !0, enumerable: !0 };
91
91
  }
92
92
  static getPropertyOptions(e) {
93
- return this.elementProperties.get(e) ?? Ce;
93
+ return this.elementProperties.get(e) ?? Ee;
94
94
  }
95
95
  static _$Ei() {
96
- if (this.hasOwnProperty(G("elementProperties"))) return;
97
- const e = Et(this);
96
+ if (this.hasOwnProperty(j("elementProperties"))) return;
97
+ const e = Pt(this);
98
98
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
99
99
  }
100
100
  static finalize() {
101
- if (this.hasOwnProperty(G("finalized"))) return;
102
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(G("properties"))) {
103
- const t = this.properties, s = [...It(t), ...Ct(t)];
101
+ if (this.hasOwnProperty(j("finalized"))) return;
102
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(j("properties"))) {
103
+ const t = this.properties, s = [...Ct(t), ...Et(t)];
104
104
  for (const r of s) this.createProperty(r, t[r]);
105
105
  }
106
106
  const e = this[Symbol.metadata];
@@ -119,8 +119,8 @@ let R = class extends HTMLElement {
119
119
  const t = [];
120
120
  if (Array.isArray(e)) {
121
121
  const s = new Set(e.flat(1 / 0).reverse());
122
- for (const r of s) t.unshift(Te(r));
123
- } else e !== void 0 && t.push(Te(e));
122
+ for (const r of s) t.unshift(Ie(r));
123
+ } else e !== void 0 && t.push(Ie(e));
124
124
  return t;
125
125
  }
126
126
  static _$Eu(e, t) {
@@ -146,7 +146,7 @@ let R = class extends HTMLElement {
146
146
  }
147
147
  createRenderRoot() {
148
148
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
149
- return St(e, this.constructor.elementStyles), e;
149
+ return _t(e, this.constructor.elementStyles), e;
150
150
  }
151
151
  connectedCallback() {
152
152
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
@@ -178,7 +178,7 @@ let R = class extends HTMLElement {
178
178
  requestUpdate(e, t, s, r = !1, o) {
179
179
  if (e !== void 0) {
180
180
  const n = this.constructor;
181
- if (r === !1 && (o = this[e]), s ??= n.getPropertyOptions(e), !((s.hasChanged ?? We)(o, t) || s.useDefault && s.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, s)))) return;
181
+ if (r === !1 && (o = this[e]), s ??= n.getPropertyOptions(e), !((s.hasChanged ?? Ve)(o, t) || s.useDefault && s.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, s)))) return;
182
182
  this.C(e, t, s);
183
183
  }
184
184
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -246,70 +246,70 @@ let R = class extends HTMLElement {
246
246
  firstUpdated(e) {
247
247
  }
248
248
  };
249
- R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[G("elementProperties")] = /* @__PURE__ */ new Map(), R[G("finalized")] = /* @__PURE__ */ new Map(), Bt?.({ ReactiveElement: R }), (re.reactiveElementVersions ??= []).push("2.1.2");
250
- const fe = globalThis, Ee = (a) => a, X = fe.trustedTypes, Pe = X ? X.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ve = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, Ke = "?" + _, Dt = `<${Ke}>`, C = document, j = () => C.createComment(""), q = (a) => a === null || typeof a != "object" && typeof a != "function", ge = Array.isArray, Rt = (a) => ge(a) || typeof a?.[Symbol.iterator] == "function", ce = `[
251
- \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Be = /-->/g, De = />/g, T = RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Re = /'/g, ze = /"/g, Ye = /^(?:script|style|textarea|title)$/i, Qe = (a) => (e, ...t) => ({ _$litType$: a, strings: e, values: t }), l = Qe(1), Ne = Qe(2), F = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Fe = /* @__PURE__ */ new WeakMap(), I = C.createTreeWalker(C, 129);
253
- function Ze(a, e) {
249
+ z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, z[j("elementProperties")] = /* @__PURE__ */ new Map(), z[j("finalized")] = /* @__PURE__ */ new Map(), Dt?.({ ReactiveElement: z }), (re.reactiveElementVersions ??= []).push("2.1.2");
250
+ const fe = globalThis, Pe = (a) => a, X = fe.trustedTypes, Be = X ? X.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ke = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, Ye = "?" + _, Rt = `<${Ye}>`, E = document, q = () => E.createComment(""), W = (a) => a === null || typeof a != "object" && typeof a != "function", ge = Array.isArray, zt = (a) => ge(a) || typeof a?.[Symbol.iterator] == "function", ce = `[
251
+ \f\r]`, L = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, De = /-->/g, Re = />/g, I = RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ze = /'/g, Ne = /"/g, Qe = /^(?:script|style|textarea|title)$/i, Ze = (a) => (e, ...t) => ({ _$litType$: a, strings: e, values: t }), c = Ze(1), Me = Ze(2), F = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Fe = /* @__PURE__ */ new WeakMap(), C = E.createTreeWalker(E, 129);
253
+ function Je(a, e) {
254
254
  if (!ge(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
- return Pe !== void 0 ? Pe.createHTML(e) : e;
255
+ return Be !== void 0 ? Be.createHTML(e) : e;
256
256
  }
257
- const zt = (a, e) => {
257
+ const Nt = (a, e) => {
258
258
  const t = a.length - 1, s = [];
259
- let r, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = H;
259
+ let r, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = L;
260
260
  for (let i = 0; i < t; i++) {
261
- const c = a[i];
261
+ const l = a[i];
262
262
  let p, d, h = -1, u = 0;
263
- for (; u < c.length && (n.lastIndex = u, d = n.exec(c), d !== null); ) u = n.lastIndex, n === H ? d[1] === "!--" ? n = Be : d[1] !== void 0 ? n = De : d[2] !== void 0 ? (Ye.test(d[2]) && (r = RegExp("</" + d[2], "g")), n = T) : d[3] !== void 0 && (n = T) : n === T ? d[0] === ">" ? (n = r ?? H, h = -1) : d[1] === void 0 ? h = -2 : (h = n.lastIndex - d[2].length, p = d[1], n = d[3] === void 0 ? T : d[3] === '"' ? ze : Re) : n === ze || n === Re ? n = T : n === Be || n === De ? n = H : (n = T, r = void 0);
264
- const f = n === T && a[i + 1].startsWith("/>") ? " " : "";
265
- o += n === H ? c + Dt : h >= 0 ? (s.push(p), c.slice(0, h) + Ve + c.slice(h) + _ + f) : c + _ + (h === -2 ? i : f);
263
+ for (; u < l.length && (n.lastIndex = u, d = n.exec(l), d !== null); ) u = n.lastIndex, n === L ? d[1] === "!--" ? n = De : d[1] !== void 0 ? n = Re : d[2] !== void 0 ? (Qe.test(d[2]) && (r = RegExp("</" + d[2], "g")), n = I) : d[3] !== void 0 && (n = I) : n === I ? d[0] === ">" ? (n = r ?? L, h = -1) : d[1] === void 0 ? h = -2 : (h = n.lastIndex - d[2].length, p = d[1], n = d[3] === void 0 ? I : d[3] === '"' ? Ne : ze) : n === Ne || n === ze ? n = I : n === De || n === Re ? n = L : (n = I, r = void 0);
264
+ const f = n === I && a[i + 1].startsWith("/>") ? " " : "";
265
+ o += n === L ? l + Rt : h >= 0 ? (s.push(p), l.slice(0, h) + Ke + l.slice(h) + _ + f) : l + _ + (h === -2 ? i : f);
266
266
  }
267
- return [Ze(a, o + (a[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
267
+ return [Je(a, o + (a[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
268
268
  };
269
- class W {
269
+ class V {
270
270
  constructor({ strings: e, _$litType$: t }, s) {
271
271
  let r;
272
272
  this.parts = [];
273
273
  let o = 0, n = 0;
274
- const i = e.length - 1, c = this.parts, [p, d] = zt(e, t);
275
- if (this.el = W.createElement(p, s), I.currentNode = this.el.content, t === 2 || t === 3) {
274
+ const i = e.length - 1, l = this.parts, [p, d] = Nt(e, t);
275
+ if (this.el = V.createElement(p, s), C.currentNode = this.el.content, t === 2 || t === 3) {
276
276
  const h = this.el.content.firstChild;
277
277
  h.replaceWith(...h.childNodes);
278
278
  }
279
- for (; (r = I.nextNode()) !== null && c.length < i; ) {
279
+ for (; (r = C.nextNode()) !== null && l.length < i; ) {
280
280
  if (r.nodeType === 1) {
281
- if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(Ve)) {
281
+ if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(Ke)) {
282
282
  const u = d[n++], f = r.getAttribute(h).split(_), g = /([.?@])?(.*)/.exec(u);
283
- c.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ? Ft : g[1] === "?" ? Mt : g[1] === "@" ? Ot : oe }), r.removeAttribute(h);
284
- } else h.startsWith(_) && (c.push({ type: 6, index: o }), r.removeAttribute(h));
285
- if (Ye.test(r.tagName)) {
283
+ l.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ? Ft : g[1] === "?" ? Ot : g[1] === "@" ? Ut : oe }), r.removeAttribute(h);
284
+ } else h.startsWith(_) && (l.push({ type: 6, index: o }), r.removeAttribute(h));
285
+ if (Qe.test(r.tagName)) {
286
286
  const h = r.textContent.split(_), u = h.length - 1;
287
287
  if (u > 0) {
288
288
  r.textContent = X ? X.emptyScript : "";
289
- for (let f = 0; f < u; f++) r.append(h[f], j()), I.nextNode(), c.push({ type: 2, index: ++o });
290
- r.append(h[u], j());
289
+ for (let f = 0; f < u; f++) r.append(h[f], q()), C.nextNode(), l.push({ type: 2, index: ++o });
290
+ r.append(h[u], q());
291
291
  }
292
292
  }
293
- } else if (r.nodeType === 8) if (r.data === Ke) c.push({ type: 2, index: o });
293
+ } else if (r.nodeType === 8) if (r.data === Ye) l.push({ type: 2, index: o });
294
294
  else {
295
295
  let h = -1;
296
- for (; (h = r.data.indexOf(_, h + 1)) !== -1; ) c.push({ type: 7, index: o }), h += _.length - 1;
296
+ for (; (h = r.data.indexOf(_, h + 1)) !== -1; ) l.push({ type: 7, index: o }), h += _.length - 1;
297
297
  }
298
298
  o++;
299
299
  }
300
300
  }
301
301
  static createElement(e, t) {
302
- const s = C.createElement("template");
302
+ const s = E.createElement("template");
303
303
  return s.innerHTML = e, s;
304
304
  }
305
305
  }
306
- function M(a, e, t = a, s) {
306
+ function O(a, e, t = a, s) {
307
307
  if (e === F) return e;
308
308
  let r = s !== void 0 ? t._$Co?.[s] : t._$Cl;
309
- const o = q(e) ? void 0 : e._$litDirective$;
310
- return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(a), r._$AT(a, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = r : t._$Cl = r), r !== void 0 && (e = M(a, r._$AS(a, e.values), r, s)), e;
309
+ const o = W(e) ? void 0 : e._$litDirective$;
310
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(a), r._$AT(a, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = r : t._$Cl = r), r !== void 0 && (e = O(a, r._$AS(a, e.values), r, s)), e;
311
311
  }
312
- class Nt {
312
+ class Mt {
313
313
  constructor(e, t) {
314
314
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
315
315
  }
@@ -320,24 +320,24 @@ class Nt {
320
320
  return this._$AM._$AU;
321
321
  }
322
322
  u(e) {
323
- const { el: { content: t }, parts: s } = this._$AD, r = (e?.creationScope ?? C).importNode(t, !0);
324
- I.currentNode = r;
325
- let o = I.nextNode(), n = 0, i = 0, c = s[0];
326
- for (; c !== void 0; ) {
327
- if (n === c.index) {
323
+ const { el: { content: t }, parts: s } = this._$AD, r = (e?.creationScope ?? E).importNode(t, !0);
324
+ C.currentNode = r;
325
+ let o = C.nextNode(), n = 0, i = 0, l = s[0];
326
+ for (; l !== void 0; ) {
327
+ if (n === l.index) {
328
328
  let p;
329
- c.type === 2 ? p = new K(o, o.nextSibling, this, e) : c.type === 1 ? p = new c.ctor(o, c.name, c.strings, this, e) : c.type === 6 && (p = new Ut(o, this, e)), this._$AV.push(p), c = s[++i];
329
+ l.type === 2 ? p = new Y(o, o.nextSibling, this, e) : l.type === 1 ? p = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (p = new Ht(o, this, e)), this._$AV.push(p), l = s[++i];
330
330
  }
331
- n !== c?.index && (o = I.nextNode(), n++);
331
+ n !== l?.index && (o = C.nextNode(), n++);
332
332
  }
333
- return I.currentNode = C, r;
333
+ return C.currentNode = E, r;
334
334
  }
335
335
  p(e) {
336
336
  let t = 0;
337
337
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
338
338
  }
339
339
  }
340
- class K {
340
+ class Y {
341
341
  get _$AU() {
342
342
  return this._$AM?._$AU ?? this._$Cv;
343
343
  }
@@ -356,7 +356,7 @@ class K {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(e, t = this) {
359
- e = M(this, e, t), q(e) ? e === m || e == null || e === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : e !== this._$AH && e !== F && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Rt(e) ? this.k(e) : this._(e);
359
+ e = O(this, e, t), W(e) ? e === m || e == null || e === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : e !== this._$AH && e !== F && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : zt(e) ? this.k(e) : this._(e);
360
360
  }
361
361
  O(e) {
362
362
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -365,31 +365,31 @@ class K {
365
365
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
366
366
  }
367
367
  _(e) {
368
- this._$AH !== m && q(this._$AH) ? this._$AA.nextSibling.data = e : this.T(C.createTextNode(e)), this._$AH = e;
368
+ this._$AH !== m && W(this._$AH) ? this._$AA.nextSibling.data = e : this.T(E.createTextNode(e)), this._$AH = e;
369
369
  }
370
370
  $(e) {
371
- const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = W.createElement(Ze(s.h, s.h[0]), this.options)), s);
371
+ const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = V.createElement(Je(s.h, s.h[0]), this.options)), s);
372
372
  if (this._$AH?._$AD === r) this._$AH.p(t);
373
373
  else {
374
- const o = new Nt(r, this), n = o.u(this.options);
374
+ const o = new Mt(r, this), n = o.u(this.options);
375
375
  o.p(t), this.T(n), this._$AH = o;
376
376
  }
377
377
  }
378
378
  _$AC(e) {
379
379
  let t = Fe.get(e.strings);
380
- return t === void 0 && Fe.set(e.strings, t = new W(e)), t;
380
+ return t === void 0 && Fe.set(e.strings, t = new V(e)), t;
381
381
  }
382
382
  k(e) {
383
383
  ge(this._$AH) || (this._$AH = [], this._$AR());
384
384
  const t = this._$AH;
385
385
  let s, r = 0;
386
- for (const o of e) r === t.length ? t.push(s = new K(this.O(j()), this.O(j()), this, this.options)) : s = t[r], s._$AI(o), r++;
386
+ for (const o of e) r === t.length ? t.push(s = new Y(this.O(q()), this.O(q()), this, this.options)) : s = t[r], s._$AI(o), r++;
387
387
  r < t.length && (this._$AR(s && s._$AB.nextSibling, r), t.length = r);
388
388
  }
389
389
  _$AR(e = this._$AA.nextSibling, t) {
390
390
  for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
391
- const s = Ee(e).nextSibling;
392
- Ee(e).remove(), e = s;
391
+ const s = Pe(e).nextSibling;
392
+ Pe(e).remove(), e = s;
393
393
  }
394
394
  }
395
395
  setConnected(e) {
@@ -409,11 +409,11 @@ class oe {
409
409
  _$AI(e, t = this, s, r) {
410
410
  const o = this.strings;
411
411
  let n = !1;
412
- if (o === void 0) e = M(this, e, t, 0), n = !q(e) || e !== this._$AH && e !== F, n && (this._$AH = e);
412
+ if (o === void 0) e = O(this, e, t, 0), n = !W(e) || e !== this._$AH && e !== F, n && (this._$AH = e);
413
413
  else {
414
414
  const i = e;
415
- let c, p;
416
- for (e = o[0], c = 0; c < o.length - 1; c++) p = M(this, i[s + c], t, c), p === F && (p = this._$AH[c]), n ||= !q(p) || p !== this._$AH[c], p === m ? e = m : e !== m && (e += (p ?? "") + o[c + 1]), this._$AH[c] = p;
415
+ let l, p;
416
+ for (e = o[0], l = 0; l < o.length - 1; l++) p = O(this, i[s + l], t, l), p === F && (p = this._$AH[l]), n ||= !W(p) || p !== this._$AH[l], p === m ? e = m : e !== m && (e += (p ?? "") + o[l + 1]), this._$AH[l] = p;
417
417
  }
418
418
  n && !r && this.j(e);
419
419
  }
@@ -429,7 +429,7 @@ class Ft extends oe {
429
429
  this.element[this.name] = e === m ? void 0 : e;
430
430
  }
431
431
  }
432
- class Mt extends oe {
432
+ class Ot extends oe {
433
433
  constructor() {
434
434
  super(...arguments), this.type = 4;
435
435
  }
@@ -437,12 +437,12 @@ class Mt extends oe {
437
437
  this.element.toggleAttribute(this.name, !!e && e !== m);
438
438
  }
439
439
  }
440
- class Ot extends oe {
440
+ class Ut extends oe {
441
441
  constructor(e, t, s, r, o) {
442
442
  super(e, t, s, r, o), this.type = 5;
443
443
  }
444
444
  _$AI(e, t = this) {
445
- if ((e = M(this, e, t, 0) ?? m) === F) return;
445
+ if ((e = O(this, e, t, 0) ?? m) === F) return;
446
446
  const s = this._$AH, r = e === m && s !== m || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, o = e !== m && (s === m || r);
447
447
  r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
448
448
  }
@@ -450,7 +450,7 @@ class Ot extends oe {
450
450
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
451
451
  }
452
452
  }
453
- class Ut {
453
+ class Ht {
454
454
  constructor(e, t, s) {
455
455
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
456
456
  }
@@ -458,22 +458,22 @@ class Ut {
458
458
  return this._$AM._$AU;
459
459
  }
460
460
  _$AI(e) {
461
- M(this, e);
461
+ O(this, e);
462
462
  }
463
463
  }
464
- const Ht = fe.litHtmlPolyfillSupport;
465
- Ht?.(W, K), (fe.litHtmlVersions ??= []).push("3.3.3");
466
- const Lt = (a, e, t) => {
464
+ const Lt = fe.litHtmlPolyfillSupport;
465
+ Lt?.(V, Y), (fe.litHtmlVersions ??= []).push("3.3.3");
466
+ const Gt = (a, e, t) => {
467
467
  const s = t?.renderBefore ?? e;
468
468
  let r = s._$litPart$;
469
469
  if (r === void 0) {
470
470
  const o = t?.renderBefore ?? null;
471
- s._$litPart$ = r = new K(e.insertBefore(j(), o), o, void 0, t ?? {});
471
+ s._$litPart$ = r = new Y(e.insertBefore(q(), o), o, void 0, t ?? {});
472
472
  }
473
473
  return r._$AI(a), r;
474
474
  };
475
475
  const ve = globalThis;
476
- class N extends R {
476
+ class M extends z {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
479
  }
@@ -483,7 +483,7 @@ class N extends R {
483
483
  }
484
484
  update(e) {
485
485
  const t = this.render();
486
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Lt(t, this.renderRoot, this.renderOptions);
486
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Gt(t, this.renderRoot, this.renderOptions);
487
487
  }
488
488
  connectedCallback() {
489
489
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -495,35 +495,35 @@ class N extends R {
495
495
  return F;
496
496
  }
497
497
  }
498
- N._$litElement$ = !0, N.finalized = !0, ve.litElementHydrateSupport?.({ LitElement: N });
499
- const Gt = ve.litElementPolyfillSupport;
500
- Gt?.({ LitElement: N });
498
+ M._$litElement$ = !0, M.finalized = !0, ve.litElementHydrateSupport?.({ LitElement: M });
499
+ const jt = ve.litElementPolyfillSupport;
500
+ jt?.({ LitElement: M });
501
501
  (ve.litElementVersions ??= []).push("4.2.2");
502
- const jt = 50;
503
- function qt(a = {}) {
502
+ const qt = 50;
503
+ function Wt(a = {}) {
504
504
  const e = Object.entries(a).filter(([, s]) => s != null && s !== "");
505
505
  if (!e.length) return "";
506
506
  const t = new URLSearchParams();
507
507
  return e.forEach(([s, r]) => t.set(s, String(r))), `?${t.toString()}`;
508
508
  }
509
- function Wt({ baseUrl: a, token: e = "", fetchFn: t } = {}) {
509
+ function Vt({ baseUrl: a, token: e = "", fetchFn: t } = {}) {
510
510
  if (!a) throw new Error("createClient requires a baseUrl");
511
511
  const s = a.replace(/\/+$/, ""), r = t || ((...i) => fetch(...i));
512
512
  async function o(i) {
513
- const c = { Accept: "application/json" };
514
- e && (c.Authorization = `Bearer ${e}`);
515
- const p = await r(`${s}${i}`, { headers: c });
513
+ const l = { Accept: "application/json" };
514
+ e && (l.Authorization = `Bearer ${e}`);
515
+ const p = await r(`${s}${i}`, { headers: l });
516
516
  if (!p.ok) {
517
517
  const d = new Error(`api-hsot ${p.status} on ${i}`);
518
518
  throw d.status = p.status, d;
519
519
  }
520
520
  return p.json();
521
521
  }
522
- async function n(i, c = {}) {
522
+ async function n(i, l = {}) {
523
523
  const p = [];
524
524
  let d = null;
525
- for (let h = 0; h < jt; h += 1) {
526
- const u = qt(d ? { ...c, cursor: d } : c), f = await o(`${i}${u}`);
525
+ for (let h = 0; h < qt; h += 1) {
526
+ const u = Wt(d ? { ...l, cursor: d } : l), f = await o(`${i}${u}`);
527
527
  if (p.push(...f.items || []), d = f.nextCursor || null, !d) break;
528
528
  }
529
529
  return { items: p, total: p.length, nextCursor: null };
@@ -539,13 +539,13 @@ function Wt({ baseUrl: a, token: e = "", fetchFn: t } = {}) {
539
539
  listGames: (i) => n("/games", i),
540
540
  getGame: (i) => o(`/games/${i}`),
541
541
  listTournaments: (i) => n("/tournaments", i),
542
- listSeedings: (i, c) => n(`/tournaments/${i}/seedings`, c),
543
- listEdges: (i, c) => n(`/tournaments/${i}/edges`, c),
542
+ listSeedings: (i, l) => n(`/tournaments/${i}/seedings`, l),
543
+ listEdges: (i, l) => n(`/tournaments/${i}/edges`, l),
544
544
  listRankings: (i) => n("/rankings", i),
545
545
  listSports: () => o("/sports")
546
546
  };
547
547
  }
548
- const L = {
548
+ const G = {
549
549
  game: "/{sport}/game/{id}/",
550
550
  school: "/school/{id}/",
551
551
  section: "/{sport}/{view}/",
@@ -556,16 +556,16 @@ const L = {
556
556
  function v(a, e) {
557
557
  return String(a).replace(/\{(\w+)\}/g, (t, s) => e[s] !== void 0 && e[s] !== null ? String(e[s]) : t);
558
558
  }
559
- function O(a) {
559
+ function U(a) {
560
560
  return {
561
- game: a.getAttribute("game-href") || L.game,
562
- school: a.getAttribute("school-href") || L.school,
563
- section: a.getAttribute("section-href") || L.section,
564
- report: a.getAttribute("report-href") || L.report
561
+ game: a.getAttribute("game-href") || G.game,
562
+ school: a.getAttribute("school-href") || G.school,
563
+ section: a.getAttribute("section-href") || G.section,
564
+ report: a.getAttribute("report-href") || G.report
565
565
  };
566
566
  }
567
- function Je(a, e = "") {
568
- const t = v(a.report || L.report, { id: e || "" });
567
+ function Xe(a, e = "") {
568
+ const t = v(a.report || G.report, { id: e || "" });
569
569
  return e ? t : t.replace(/([?&])game=(?=&|$)/, "$1").replace(/[?&]$/, "").replace(/\?&/, "?");
570
570
  }
571
571
  const k = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
@@ -581,27 +581,27 @@ function $e(a) {
581
581
  const s = e >= 12 ? "PM" : "AM";
582
582
  return `${(e + 11) % 12 + 1}:${String(t || 0).padStart(2, "0")} ${s}`;
583
583
  }
584
- function Vt(a) {
584
+ function Kt(a) {
585
585
  return a ? `${Math.floor(a / 12)}-${a % 12}` : "·";
586
586
  }
587
- function Kt(a) {
587
+ function Yt(a) {
588
588
  return (Array.isArray(a?.positions) ? a.positions : String(a?.position ?? "").split(/[/,]/)).map((t) => String(t ?? "").trim()).filter(Boolean).join("/");
589
589
  }
590
- function Y(a = /* @__PURE__ */ new Date()) {
590
+ function Q(a = /* @__PURE__ */ new Date()) {
591
591
  const e = a.getFullYear();
592
592
  return a.getMonth() >= 6 ? `${e}-${e + 1}` : `${e - 1}-${e}`;
593
593
  }
594
- function be(a = /* @__PURE__ */ new Date()) {
594
+ function ye(a = /* @__PURE__ */ new Date()) {
595
595
  const e = (t) => String(t).padStart(2, "0");
596
596
  return `${a.getFullYear()}-${e(a.getMonth() + 1)}-${e(a.getDate())}`;
597
597
  }
598
- function Yt(a, e = be()) {
598
+ function Qt(a, e = ye()) {
599
599
  const t = [...new Set((a || []).filter(Boolean))].sort();
600
600
  if (!t.length || t.includes(e)) return e;
601
601
  const s = t.filter((r) => r < e);
602
602
  return s.length ? s[s.length - 1] : t[0];
603
603
  }
604
- function ye(a) {
604
+ function be(a) {
605
605
  return a ? (a.abbr || a.name || "?").slice(0, 4).toUpperCase() : "?";
606
606
  }
607
607
  function ee(a) {
@@ -609,7 +609,7 @@ function ee(a) {
609
609
  const e = parseInt(a.slice(1), 16), t = e >> 16 & 255, s = e >> 8 & 255, r = e & 255;
610
610
  return 0.299 * t + 0.587 * s + 0.114 * r > 150 ? "#0F1B33" : "#FFFFFF";
611
611
  }
612
- const Qt = (a) => {
612
+ const Zt = (a) => {
613
613
  const e = ["th", "st", "nd", "rd"], t = a % 100;
614
614
  return a + (e[(t - 20) % 10] || e[t] || e[0]);
615
615
  };
@@ -620,11 +620,11 @@ function de(a, e) {
620
620
  }, s = t(a), r = t(e);
621
621
  return s !== null && r !== null && s !== r ? r - s : s !== null && r === null ? -1 : s === null && r !== null ? 1 : String(a ?? "").localeCompare(String(e ?? ""), "en", { sensitivity: "base" });
622
622
  }
623
- function Xe(a, e) {
623
+ function et(a, e) {
624
624
  const t = (s) => String(s?.name ?? s ?? "");
625
625
  return t(a).localeCompare(t(e), "en", { numeric: !0, sensitivity: "base" });
626
626
  }
627
- function et(a) {
627
+ function tt(a) {
628
628
  if (a.state === "live") {
629
629
  const e = [a.period, a.clock].filter(Boolean).join(" ");
630
630
  return { kind: "live", label: e ? `Live · ${e}` : "Live" };
@@ -635,18 +635,18 @@ function et(a) {
635
635
  }
636
636
  return a.state === "postponed" ? { kind: "warn", label: "Postponed" } : a.state === "canceled" ? { kind: "warn", label: "Canceled" } : { kind: "sched", label: `${x(a.date, { month: "short", day: "numeric" })} · ${$e(a.time)}`.replace(/ · $/, "") };
637
637
  }
638
- const Zt = ["boys", "girls"];
639
- function tt(a, e) {
638
+ const Jt = ["boys", "girls"];
639
+ function st(a, e) {
640
640
  return e ? a ? a.gender === e || a.gender === "coed" : !1 : !0;
641
641
  }
642
- function st(a, e) {
643
- return e ? (a || []).filter((t) => tt(t, e)) : a || [];
642
+ function at(a, e) {
643
+ return e ? (a || []).filter((t) => st(t, e)) : a || [];
644
644
  }
645
645
  function pe(a) {
646
646
  const e = new Set((a || []).map((t) => t && t.gender));
647
- return Zt.filter((t) => e.has(t));
647
+ return Jt.filter((t) => e.has(t));
648
648
  }
649
- const Jt = (a) => pe(a).length === 2, Xt = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
649
+ const Xt = (a) => pe(a).length === 2, es = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
650
650
  function A(a) {
651
651
  let e = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
652
652
  const t = e.indexOf("#");
@@ -655,13 +655,13 @@ function A(a) {
655
655
  let r = e.split("?")[0] + s;
656
656
  return r = r.replace(/([^:])\/{2,}/g, "$1/").replace(/^\/{2,}/, "/"), r = r.replace(/^\/(?=#)/, ""), r.length > 1 && (r = r.replace(/\/+$/, "")), r.toLowerCase();
657
657
  }
658
- function at() {
658
+ function rt() {
659
659
  const a = globalThis.location;
660
660
  if (!a) return "";
661
661
  const e = (a.hash || "").startsWith("#/") ? a.hash : "";
662
662
  return A((a.pathname || "") + e);
663
663
  }
664
- function es(a, e, t) {
664
+ function ts(a, e, t) {
665
665
  if (!t) return null;
666
666
  const s = A(a);
667
667
  if (!s) return null;
@@ -670,11 +670,11 @@ function es(a, e, t) {
670
670
  const n = A(v(e.section, { sport: t, view: "" }));
671
671
  if (s === n) return "";
672
672
  if (!s.startsWith(`${n}/`)) return null;
673
- const i = s.slice(n.length + 1), c = i.split("/");
674
- return c.length > 2 || c.some((p) => !/^[a-z][a-z-]*$/.test(p)) || Xt.has(c[0]) ? null : i;
673
+ const i = s.slice(n.length + 1), l = i.split("/");
674
+ return l.length > 2 || l.some((p) => !/^[a-z][a-z-]*$/.test(p)) || es.has(l[0]) ? null : i;
675
675
  }
676
- function ts(a, e, t) {
677
- const s = (o) => v(t.section, { sport: a, view: o }).replace(/([^:])\/{2,}/g, "$1/"), r = Jt(e) ? [
676
+ function ss(a, e, t) {
677
+ const s = (o) => v(t.section, { sport: a, view: o }).replace(/([^:])\/{2,}/g, "$1/"), r = Xt(e) ? [
678
678
  { label: "Boys Standings", href: s("boys/standings") },
679
679
  { label: "Girls Standings", href: s("girls/standings") }
680
680
  ] : [{ label: "Standings", href: s("standings") }];
@@ -686,12 +686,12 @@ function ts(a, e, t) {
686
686
  { label: "Polls & Rankings", href: s("rankings") }
687
687
  ];
688
688
  }
689
- function ss(a, e = at()) {
689
+ function as(a, e = rt()) {
690
690
  const t = A(e);
691
691
  for (const s of a.querySelectorAll(':scope > a[slot="nav"]'))
692
692
  t && A(s.getAttribute("href")) === t ? s.setAttribute("aria-current", "page") : s.removeAttribute("aria-current");
693
693
  }
694
- class w extends N {
694
+ class w extends M {
695
695
  static properties = {
696
696
  api: { type: String },
697
697
  refreshInterval: { type: Number, attribute: "refresh-interval" },
@@ -710,7 +710,7 @@ class w extends N {
710
710
  this._client = e, this.isConnected && this.load();
711
711
  }
712
712
  get client() {
713
- return this._client ? this._client : this.api ? Wt({ baseUrl: this.api }) : null;
713
+ return this._client ? this._client : this.api ? Vt({ baseUrl: this.api }) : null;
714
714
  }
715
715
  connectedCallback() {
716
716
  super.connectedCallback(), this._setupInterval();
@@ -722,7 +722,7 @@ class w extends N {
722
722
  this.load();
723
723
  }
724
724
  updated(e) {
725
- e.has("api") && e.get("api") !== void 0 && e.get("api") !== this.api && this.load(), e.has("refreshInterval") && this._setupInterval(), ss(this);
725
+ e.has("api") && e.get("api") !== void 0 && e.get("api") !== this.api && this.load(), e.has("refreshInterval") && this._setupInterval(), as(this);
726
726
  }
727
727
  async load() {
728
728
  const e = this.client;
@@ -751,13 +751,13 @@ class w extends N {
751
751
  this._refreshId && (clearInterval(this._refreshId), this._refreshId = null);
752
752
  }
753
753
  render() {
754
- 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>`;
754
+ return this.error === "not-configured" ? c`<div class="error">This component needs an <code>api</code> attribute (the api-hsot public read-surface base URL) or an injected client.</div>` : this.error ? c`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : c`<div class="loading" role="status">Loading…</div>`;
755
755
  }
756
756
  renderView() {
757
- return l``;
757
+ return c``;
758
758
  }
759
759
  }
760
- const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
760
+ const y = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), rs = b`
761
761
  :host {
762
762
  --hsot-red: var(--color-red, #D1232A);
763
763
  --hsot-red-deep: var(--color-red-dark, #951C21);
@@ -795,7 +795,7 @@ const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
795
795
  outline-offset: 1px;
796
796
  }
797
797
  .mut { color: var(--hsot-gray-5); }
798
- `, rs = y`
798
+ `, os = b`
799
799
  .band { background: var(--hsot-white); color: var(--hsot-black); }
800
800
  .band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
801
801
  .band h1, .band h2.bandtitle {
@@ -844,7 +844,7 @@ const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
844
844
  @media (max-width: 720px) {
845
845
  .band h1, .band h2.bandtitle, .band.section h1, .band.section h2.bandtitle { font-size: 1.8rem; }
846
846
  }
847
- `, os = y`
847
+ `, ns = b`
848
848
  .view { max-width: 1366px; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
849
849
  /* Optional right rail (slot="rail" light-DOM children): a divided 300px
850
850
  column on desktop, stacked under the view content on smaller screens. */
@@ -908,7 +908,7 @@ const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
908
908
  .error { padding: 1.2rem 1rem; color: var(--hsot-red-deep); font-size: 0.9rem; }
909
909
  .note { font-size: 0.8125rem; color: var(--hsot-gray-5); margin: 0.6rem 0 0; }
910
910
  .loading { padding: 1.2rem; color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
911
- `, ns = y`
911
+ `, is = b`
912
912
  .pill {
913
913
  display: inline-block; font-family: var(--hsot-heading-font); font-weight: 700;
914
914
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em;
@@ -923,7 +923,7 @@ const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
923
923
  .pill.champ { background: var(--hsot-straw); color: #6b5900; }
924
924
  @keyframes hsot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
925
925
  @media (prefers-reduced-motion: reduce) { .pill.live { animation: none; } }
926
- `, is = y`
926
+ `, ls = b`
927
927
  .tablewrap { overflow-x: auto; }
928
928
  table.data { font-family: var(--hsot-heading-font); font-size: 14px; border-collapse: collapse; width: 100%; }
929
929
  table.data th {
@@ -941,7 +941,7 @@ const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
941
941
  table.data tbody tr.rowlink:hover { background: var(--hsot-gray-1); }
942
942
  table.data td.teamcell a { color: inherit; text-decoration: none; font-weight: 500; }
943
943
  table.data td.teamcell a:hover { text-decoration: underline; }
944
- `, ls = y`
944
+ `, cs = b`
945
945
  .swatch {
946
946
  display: inline-flex; align-items: center; justify-content: center;
947
947
  width: 26px; height: 26px; border-radius: 50%;
@@ -965,7 +965,7 @@ const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
965
965
  .dot.W { background: var(--hsot-win); }
966
966
  .dot.L { background: var(--hsot-loss); }
967
967
  .dot.T { background: var(--hsot-tie); }
968
- `, cs = y`
968
+ `, hs = b`
969
969
  ul.gamelist { list-style: none; margin: 0; padding: 0; }
970
970
  .gamelist li {
971
971
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem;
@@ -1015,24 +1015,24 @@ const b = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), as = y`
1015
1015
  .gamelist .ff { color: var(--hsot-gray-5); font-size: 0.78rem; font-style: italic; }
1016
1016
  .gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
1017
1017
  .gamelist a.box { font-size: 0.78rem; }
1018
- `, U = [as, rs, os, ns, is, ls, cs];
1018
+ `, H = [rs, os, ns, is, ls, cs, hs];
1019
1019
  function ne(a) {
1020
1020
  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";
1021
1021
  }
1022
- function hs(a) {
1022
+ function ds(a) {
1023
1023
  return a && (a.forfeit === "home" || a.forfeit === "away") ? a.forfeit : null;
1024
1024
  }
1025
- function Q(a, e) {
1025
+ function Z(a, e) {
1026
1026
  const t = {}, s = (o) => (t[o] = t[o] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, t[o]), r = a.filter((o) => o.state === "final" && o.gameType !== "scrimmage" && !0).sort((o, n) => String(o.date).localeCompare(String(n.date)));
1027
1027
  for (const o of r) {
1028
1028
  const n = ne(o), i = o.gameType === "conference";
1029
- for (const c of ["home", "away"]) {
1030
- const p = c === "home" ? o.homeTeamId : o.awayTeamId;
1029
+ for (const l of ["home", "away"]) {
1030
+ const p = l === "home" ? o.homeTeamId : o.awayTeamId;
1031
1031
  if (!p) continue;
1032
- const d = s(p), h = c === "home" ? o.homeScore : o.awayScore, u = c === "home" ? o.awayScore : o.homeScore;
1032
+ const d = s(p), h = l === "home" ? o.homeScore : o.awayScore, u = l === "home" ? o.awayScore : o.homeScore;
1033
1033
  d.pf += h, d.pa += u;
1034
1034
  let f = "T";
1035
- n === "tie" ? (d.t += 1, i && (d.ct += 1)) : n === c ? (d.w += 1, i && (d.cw += 1), f = "W") : (d.l += 1, i && (d.cl += 1), f = "L"), d.results.push({ gameId: o.id, date: o.date, mark: f, my: h, their: u, opp: c === "home" ? o.awayTeamId : o.homeTeamId, conf: i });
1035
+ n === "tie" ? (d.t += 1, i && (d.ct += 1)) : n === l ? (d.w += 1, i && (d.cw += 1), f = "W") : (d.l += 1, i && (d.cl += 1), f = "L"), d.results.push({ gameId: o.id, date: o.date, mark: f, my: h, their: u, opp: l === "home" ? o.awayTeamId : o.homeTeamId, conf: i });
1036
1036
  }
1037
1037
  }
1038
1038
  return t;
@@ -1044,25 +1044,25 @@ function ie(a) {
1044
1044
  for (let s = a.length - 1; s >= 0 && a[s].mark === e; s -= 1) t += 1;
1045
1045
  return e + t;
1046
1046
  }
1047
- const Me = (a, e, t) => {
1047
+ const Oe = (a, e, t) => {
1048
1048
  const s = a + e + t;
1049
1049
  return s ? (a + t / 2) / s : 0;
1050
- }, Oe = (a) => a.toFixed(3).replace("0.", ".");
1050
+ }, Ue = (a) => a.toFixed(3).replace("0.", ".");
1051
1051
  function S(a, e = !1) {
1052
1052
  if (!a) return "0-0";
1053
1053
  const t = e ? a.cw : a.w, s = e ? a.cl : a.l, r = e ? a.ct : a.t;
1054
1054
  return `${t}-${s}${r ? `-${r}` : ""}`;
1055
1055
  }
1056
- function rt(a, e) {
1056
+ function ot(a, e) {
1057
1057
  return a.map((t) => {
1058
1058
  const s = e[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] };
1059
- return { team: t, rec: s, confPct: Me(s.cw, s.cl, s.ct), overallPct: Me(s.w, s.l, s.t) };
1059
+ return { team: t, rec: s, confPct: Oe(s.cw, s.cl, s.ct), overallPct: Oe(s.w, s.l, s.t) };
1060
1060
  }).sort((t, s) => s.confPct - t.confPct || s.overallPct - t.overallPct || s.rec.pf - s.rec.pa - (t.rec.pf - t.rec.pa));
1061
1061
  }
1062
1062
  function we(a, e) {
1063
1063
  return a.filter((t) => (t.homeTeamId === e || t.awayTeamId === e) && (t.state === "scheduled" || t.state === "live") && t.gameType !== "scrimmage").sort((t, s) => String(t.date).localeCompare(String(s.date)))[0] || null;
1064
1064
  }
1065
- function Ue(a, e) {
1065
+ function He(a, e) {
1066
1066
  const t = a[e];
1067
1067
  return t && t.results.length ? t.results[t.results.length - 1] : null;
1068
1068
  }
@@ -1070,19 +1070,19 @@ function xe(a, e, t, s, r) {
1070
1070
  const o = e[t];
1071
1071
  if (!o) return null;
1072
1072
  const n = /* @__PURE__ */ new Map();
1073
- for (const c of a || []) {
1074
- if (c.sport !== s || r && c.effectiveDate > r || c.gender && o.gender !== c.gender && o.gender !== "coed") continue;
1075
- const p = c.gender || "", d = n.get(p);
1076
- (!d || c.effectiveDate > d.effectiveDate) && n.set(p, c);
1073
+ for (const l of a || []) {
1074
+ if (l.sport !== s || r && l.effectiveDate > r || l.gender && o.gender !== l.gender && o.gender !== "coed") continue;
1075
+ const p = l.gender || "", d = n.get(p);
1076
+ (!d || l.effectiveDate > d.effectiveDate) && n.set(p, l);
1077
1077
  }
1078
1078
  let i = null;
1079
- for (const c of n.values()) {
1080
- const p = (c.teamIds || []).indexOf(t);
1081
- p !== -1 && (!i || c.effectiveDate > i.effectiveDate) && (i = { poll: c, rank: p + 1 });
1079
+ for (const l of n.values()) {
1080
+ const p = (l.teamIds || []).indexOf(t);
1081
+ p !== -1 && (!i || l.effectiveDate > i.effectiveDate) && (i = { poll: l, rank: p + 1 });
1082
1082
  }
1083
1083
  return i ? i.rank : null;
1084
1084
  }
1085
- function ds(a, e, t) {
1085
+ function ps(a, e, t) {
1086
1086
  if (!a) return { kind: "none", delta: 0 };
1087
1087
  const s = (a.teamIds || []).indexOf(t) + 1;
1088
1088
  if (!s) return { kind: "none", delta: 0 };
@@ -1092,11 +1092,11 @@ function ds(a, e, t) {
1092
1092
  const o = r - s;
1093
1093
  return o > 0 ? { kind: "up", delta: o } : o < 0 ? { kind: "down", delta: -o } : { kind: "same", delta: 0 };
1094
1094
  }
1095
- function ps(a) {
1095
+ function ms(a) {
1096
1096
  return /^https?:\/\//i.test(String(a || ""));
1097
1097
  }
1098
- function ot(a, { w: e, h: t } = {}) {
1099
- if (!ps(a)) return "";
1098
+ function nt(a, { w: e, h: t } = {}) {
1099
+ if (!ms(a)) return "";
1100
1100
  const s = [];
1101
1101
  e && s.push(`w=${Math.max(1, Math.round(e))}`), t && s.push(`h=${Math.max(1, Math.round(t))}`), s.push("f=webp");
1102
1102
  const r = a.includes("?") ? "&" : "?";
@@ -1104,93 +1104,93 @@ function ot(a, { w: e, h: t } = {}) {
1104
1104
  }
1105
1105
  function te(a, e) {
1106
1106
  const t = e * 2;
1107
- return ot(a?.logoAssetId, { w: t, h: t });
1107
+ return nt(a?.logoAssetId, { w: t, h: t });
1108
1108
  }
1109
- function ms(a, e) {
1110
- return ot(a?.photoAssetId, { w: e * 2 });
1109
+ function us(a, e) {
1110
+ return nt(a?.photoAssetId, { w: e * 2 });
1111
1111
  }
1112
1112
  function le(a, e, { title: t, sub: s, teams: r }) {
1113
- const o = at(), i = !!a.querySelector(':scope > a[slot="nav"]') || es(o, e.hrefs, e.sport) !== null;
1114
- return l`
1113
+ const o = rt(), i = !!a.querySelector(':scope > a[slot="nav"]') || ts(o, e.hrefs, e.sport) !== null;
1114
+ return c`
1115
1115
  <div class="band section">
1116
1116
  <div class="inner">
1117
1117
  <h1>${t}</h1>
1118
- ${s ? l`<p class="sub">${s}</p>` : m}
1118
+ ${s ? c`<p class="sub">${s}</p>` : m}
1119
1119
  </div>
1120
- ${i ? l`
1120
+ ${i ? c`
1121
1121
  <nav class="sectionnav" aria-label="${k(e.sport)} section">
1122
1122
  <div class="navrow">
1123
1123
  <slot name="nav">
1124
- ${ts(e.sport, r, e.hrefs).map((c) => l`<a href=${c.href}
1125
- aria-current=${o && A(c.href) === o ? "page" : m}>${c.label}</a>`)}
1124
+ ${ss(e.sport, r, e.hrefs).map((l) => c`<a href=${l.href}
1125
+ aria-current=${o && A(l.href) === o ? "page" : m}>${l.label}</a>`)}
1126
1126
  </slot>
1127
1127
  </div>
1128
1128
  </nav>` : m}
1129
1129
  </div>
1130
1130
  `;
1131
1131
  }
1132
- const E = (a, e) => {
1132
+ const P = (a, e) => {
1133
1133
  const t = a.teamsById[e];
1134
1134
  return t ? a.schoolsById[t.schoolId] : null;
1135
- }, z = (a, e) => E(a, e)?.name || "TBD", se = (a, e) => E(a, e)?.abbr || "TBD";
1136
- function P(a, e = 26) {
1135
+ }, N = (a, e) => P(a, e)?.name || "TBD", se = (a, e) => P(a, e)?.abbr || "TBD";
1136
+ function B(a, e = 26) {
1137
1137
  if (!a) return m;
1138
1138
  const t = te(a, e);
1139
1139
  if (t)
1140
- return l`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
1140
+ return c`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
1141
1141
  src=${t} style="width:${e}px;height:${e}px" />`;
1142
1142
  const s = a.colorPrimary || "#030711", r = ee(s);
1143
- return l`<span class="swatch" aria-hidden="true"
1143
+ return c`<span class="swatch" aria-hidden="true"
1144
1144
  style="width:${e}px;height:${e}px;background:${s};color:${r};font-size:${Math.max(8, e * 0.28)}px"
1145
- >${ye(a)}</span>`;
1145
+ >${be(a)}</span>`;
1146
1146
  }
1147
1147
  function ke(a, e, t) {
1148
1148
  const s = xe(a.rankings, a.teamsById, e, a.sport, t);
1149
- return s ? l`<span class="rankbadge">#${s}</span>` : m;
1149
+ return s ? c`<span class="rankbadge">#${s}</span>` : m;
1150
1150
  }
1151
1151
  function ae(a, e, t) {
1152
- const s = E(a, e);
1153
- return s ? l`${ke(a, e, t)}<a href=${v(a.hrefs.school, { id: s.id })}>${s.name}</a>` : l`<span class="mut">TBD</span>`;
1152
+ const s = P(a, e);
1153
+ return s ? c`${ke(a, e, t)}<a href=${v(a.hrefs.school, { id: s.id })}>${s.name}</a>` : c`<span class="mut">TBD</span>`;
1154
1154
  }
1155
1155
  function Se(a, e, t = 5) {
1156
1156
  const s = a.records[e];
1157
- if (!s || !s.results.length) return l`<span class="mut">·</span>`;
1157
+ if (!s || !s.results.length) return c`<span class="mut">·</span>`;
1158
1158
  const r = s.results.slice(-1 * t);
1159
- return l`<span class="dots" role="img" aria-label="last ${r.length} results">
1160
- ${r.map((o) => l`<a class="dot ${o.mark}"
1161
- title="${o.mark} ${o.my}-${o.their} vs ${z(a, o.opp)}"
1159
+ return c`<span class="dots" role="img" aria-label="last ${r.length} results">
1160
+ ${r.map((o) => c`<a class="dot ${o.mark}"
1161
+ title="${o.mark} ${o.my}-${o.their} vs ${N(a, o.opp)}"
1162
1162
  href=${v(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
1163
1163
  </span>`;
1164
1164
  }
1165
- function B(a, e) {
1166
- return a.querySelector(':scope > [slot="rail"]') ? l`<div class="view withrail">
1165
+ function D(a, e) {
1166
+ return a.querySelector(':scope > [slot="rail"]') ? c`<div class="view withrail">
1167
1167
  <div class="viewmain">${e}</div>
1168
1168
  <aside class="viewrail"><slot name="rail"></slot></aside>
1169
- </div>` : l`<div class="view">${e}</div>`;
1169
+ </div>` : c`<div class="view">${e}</div>`;
1170
1170
  }
1171
- function D(a) {
1171
+ function R(a) {
1172
1172
  if (!a.promoImage) return m;
1173
- const e = l`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
1174
- return l`<div class="promo">${a.promoHref ? l`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${e}</a>` : e}</div>`;
1173
+ const e = c`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
1174
+ return c`<div class="promo">${a.promoHref ? c`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${e}</a>` : e}</div>`;
1175
1175
  }
1176
- function V(a) {
1177
- const e = et(a);
1178
- return l`<span class="pill ${e.kind}">${e.label}</span>`;
1176
+ function K(a) {
1177
+ const e = tt(a);
1178
+ return c`<span class="pill ${e.kind}">${e.label}</span>`;
1179
1179
  }
1180
- function nt(a, e, t) {
1181
- if (!e) return l`<span class="mut">·</span>`;
1180
+ function it(a, e, t) {
1181
+ if (!e) return c`<span class="mut">·</span>`;
1182
1182
  const s = e.homeTeamId === t ? e.awayTeamId : e.homeTeamId, r = e.homeTeamId === t ? "vs" : "at";
1183
- return l`${e.state === "live" ? l`<span class="pill live">Live</span> ` : l`${x(e.date, { month: "numeric", day: "numeric" })} `}${r} ${se(a, s)}`;
1183
+ return c`${e.state === "live" ? c`<span class="pill live">Live</span> ` : c`${x(e.date, { month: "numeric", day: "numeric" })} `}${r} ${se(a, s)}`;
1184
1184
  }
1185
- const us = "https://api.wral.com/search";
1186
- function fs(a) {
1185
+ const fs = "https://api.wral.com/search";
1186
+ function gs(a) {
1187
1187
  return a.map((e) => `uri:"${e}"`).join(" OR ");
1188
1188
  }
1189
- function gs(a, e) {
1190
- const t = String(a || us).replace(/\/+$/, ""), s = new URLSearchParams({ query: fs(e), sort: "score", lang: "en" });
1189
+ function vs(a, e) {
1190
+ const t = String(a || fs).replace(/\/+$/, ""), s = new URLSearchParams({ query: gs(e), sort: "score", lang: "en" });
1191
1191
  return `${t}/v1/query?${s}`;
1192
1192
  }
1193
- function it(a) {
1193
+ function lt(a) {
1194
1194
  try {
1195
1195
  const e = new URL(a);
1196
1196
  if (/(^|\.)smugmug\.com$/i.test(e.hostname)) {
@@ -1205,13 +1205,13 @@ function it(a) {
1205
1205
  }
1206
1206
  return { uri: a, title: a };
1207
1207
  }
1208
- async function vs(a, e, t) {
1209
- const r = await ((...i) => fetch(...i))(gs(a, e));
1208
+ async function $s(a, e, t) {
1209
+ const r = await ((...i) => fetch(...i))(vs(a, e));
1210
1210
  if (!r.ok) throw new Error(`search answered ${r.status}`);
1211
1211
  const o = await r.json(), n = new Map((o.items || []).map((i) => [i.uri, i]));
1212
- return e.map((i) => n.get(i) || it(i));
1212
+ return e.map((i) => n.get(i) || lt(i));
1213
1213
  }
1214
- function $s(a) {
1214
+ function ys(a) {
1215
1215
  try {
1216
1216
  const e = new URL(a);
1217
1217
  if (/(^|\.)smugmug\.com$/i.test(e.hostname)) return "Photos";
@@ -1225,51 +1225,51 @@ function $s(a) {
1225
1225
  function bs(a) {
1226
1226
  const e = /* @__PURE__ */ new Map();
1227
1227
  return (Array.isArray(a) ? a : []).filter((t) => /^https?:\/\//i.test(String(t || ""))).map((t) => {
1228
- const s = $s(t), r = (e.get(s) || 0) + 1;
1228
+ const s = ys(t), r = (e.get(s) || 0) + 1;
1229
1229
  return e.set(s, r), { href: t, label: r > 1 ? `${s} ${r}` : s };
1230
1230
  });
1231
1231
  }
1232
- const ys = ["all", "conferences"], lt = "all", He = (a) => ys.includes(a) ? a : lt, ct = Number.MAX_SAFE_INTEGER, ht = (a, e, t) => {
1232
+ const ws = ["all", "conferences"], ct = "all", Le = (a) => ws.includes(a) ? a : ct, ht = Number.MAX_SAFE_INTEGER, dt = (a, e, t) => {
1233
1233
  const s = a[t];
1234
1234
  return s && e[s.schoolId] || null;
1235
1235
  };
1236
- function ws(a, e) {
1236
+ function xs(a, e) {
1237
1237
  const t = (a || []).map((s) => e[s.schoolId]?.areaCode).filter(Boolean);
1238
1238
  return [...new Set(t)].sort();
1239
1239
  }
1240
- function xs(a, e, t, s) {
1241
- return e ? [a.awayTeamId, a.homeTeamId].some((r) => ht(t, s, r)?.areaCode === e) : !0;
1242
- }
1243
1240
  function ks(a, e, t, s) {
1244
- const r = (i) => ht(t, s, i)?.name || "", o = (i, c) => !i - !c || Xe(i, c), n = new Map((a || []).map((i) => [i, {
1245
- rank: e(i) || ct,
1241
+ return e ? [a.awayTeamId, a.homeTeamId].some((r) => dt(t, s, r)?.areaCode === e) : !0;
1242
+ }
1243
+ function Ss(a, e, t, s) {
1244
+ const r = (i) => dt(t, s, i)?.name || "", o = (i, l) => !i - !l || et(i, l), n = new Map((a || []).map((i) => [i, {
1245
+ rank: e(i) || ht,
1246
1246
  away: r(i.awayTeamId),
1247
1247
  home: r(i.homeTeamId)
1248
1248
  }]));
1249
- return [...n.keys()].sort((i, c) => {
1250
- const p = n.get(i), d = n.get(c);
1251
- return p.rank - d.rank || o(p.away, d.away) || o(p.home, d.home) || String(i.time || "").localeCompare(String(c.time || ""));
1249
+ return [...n.keys()].sort((i, l) => {
1250
+ const p = n.get(i), d = n.get(l);
1251
+ return p.rank - d.rank || o(p.away, d.away) || o(p.home, d.home) || String(i.time || "").localeCompare(String(l.time || ""));
1252
1252
  });
1253
1253
  }
1254
- function Ss(a, e) {
1255
- const t = new Map((a || []).map((r) => [r, e(r) || ct])), s = (r) => r.state === "live" ? 0 : 1;
1254
+ function _s(a, e) {
1255
+ const t = new Map((a || []).map((r) => [r, e(r) || ht])), s = (r) => r.state === "live" ? 0 : 1;
1256
1256
  return [...t.keys()].sort((r, o) => s(r) - s(o) || t.get(r) - t.get(o));
1257
1257
  }
1258
- function _s(a, e) {
1258
+ function As(a, e) {
1259
1259
  if (a.gameType === "conference" && a.conferenceId) {
1260
1260
  const t = e[a.conferenceId] || null;
1261
1261
  return { name: t?.name || "Conference", conference: t };
1262
1262
  }
1263
1263
  return a.gameType === "playoff" ? { name: "Playoffs", conference: null } : a.gameType === "scrimmage" ? { name: "Scrimmages", conference: null } : { name: "Nonconference", conference: null };
1264
1264
  }
1265
- function As(a, e) {
1265
+ function Ts(a, e) {
1266
1266
  const t = /* @__PURE__ */ new Map();
1267
1267
  return (a || []).forEach((s) => {
1268
- const { name: r, conference: o } = _s(s, e);
1268
+ const { name: r, conference: o } = As(s, e);
1269
1269
  t.has(r) || t.set(r, { name: r, conference: o, games: [] }), t.get(r).games.push(s);
1270
1270
  }), [...t.values()];
1271
1271
  }
1272
- const Ts = y`
1272
+ const Is = b`
1273
1273
  .toolbar.filters { gap: 0.5rem 1.1rem; }
1274
1274
  .filters [role="group"] { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
1275
1275
  .filters .asof { margin-right: 0.1rem; }
@@ -1284,8 +1284,8 @@ const Ts = y`
1284
1284
  .gamelist .links { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
1285
1285
  .gamelist .links a { font-size: 0.78rem; }
1286
1286
  `;
1287
- class dt extends w {
1288
- static styles = [...U, Ts];
1287
+ class pt extends w {
1288
+ static styles = [...H, Is];
1289
1289
  static properties = {
1290
1290
  ...w.properties,
1291
1291
  sport: { type: String },
@@ -1303,14 +1303,14 @@ class dt extends w {
1303
1303
  !this.date && e.get("date") && (this.date = e.get("date")), !this.view && e.get("view") && (this.view = e.get("view")), !this.areaCode && e.get("area") && (this.areaCode = e.get("area")), this._datePinned = !!this.date;
1304
1304
  }
1305
1305
  async fetchData(e) {
1306
- const t = this.season || Y(), [s, r, o, n, i] = await Promise.all([
1306
+ const t = this.season || Q(), [s, r, o, n, i] = await Promise.all([
1307
1307
  e.listSchools(),
1308
1308
  e.listTeams({ sport: this.sport }),
1309
1309
  e.listConferences(),
1310
1310
  e.listGames({ sport: this.sport, season: t }),
1311
1311
  e.listRankings({ sport: this.sport })
1312
1312
  ]);
1313
- return this._datePinned || (this.date = Yt(n.items.map((c) => c.date)), this._datePinned = !0), {
1313
+ return this._datePinned || (this.date = Qt(n.items.map((l) => l.date)), this._datePinned = !0), {
1314
1314
  season: t,
1315
1315
  schools: s.items,
1316
1316
  teams: r.items,
@@ -1321,11 +1321,11 @@ class dt extends w {
1321
1321
  }
1322
1322
  get ctx() {
1323
1323
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1324
- teamsById: b(this.data.teams),
1325
- schoolsById: b(this.data.schools),
1326
- records: Q(this.data.games),
1324
+ teamsById: y(this.data.teams),
1325
+ schoolsById: y(this.data.schools),
1326
+ records: Z(this.data.games),
1327
1327
  rankings: this.data.rankings,
1328
- hrefs: O(this),
1328
+ hrefs: U(this),
1329
1329
  sport: this.sport
1330
1330
  }, this._ctxData = this.data), this._ctx;
1331
1331
  }
@@ -1334,34 +1334,34 @@ class dt extends w {
1334
1334
  e !== null && (this.view = e), t !== null && (this.areaCode = t);
1335
1335
  try {
1336
1336
  const s = new URL(globalThis.location.href), r = (o, n, i) => n && n !== i ? s.searchParams.set(o, n) : s.searchParams.delete(o);
1337
- r("view", He(this.view), lt), r("area", this.areaCode, ""), globalThis.history?.replaceState(null, "", s);
1337
+ r("view", Le(this.view), ct), r("area", this.areaCode, ""), globalThis.history?.replaceState(null, "", s);
1338
1338
  } catch {
1339
1339
  }
1340
1340
  }
1341
1341
  renderView() {
1342
- const e = this.ctx, t = b(this.data.conferences), s = [...new Set(this.data.games.map((h) => h.date).filter(Boolean))].sort(), r = He(this.view), o = ws(this.data.teams, e.schoolsById), n = o.includes(this.areaCode) ? this.areaCode : "", i = (h) => {
1342
+ const e = this.ctx, t = y(this.data.conferences), s = [...new Set(this.data.games.map((h) => h.date).filter(Boolean))].sort(), r = Le(this.view), o = xs(this.data.teams, e.schoolsById), n = o.includes(this.areaCode) ? this.areaCode : "", i = (h) => {
1343
1343
  const u = [h.awayTeamId, h.homeTeamId].map((f) => xe(e.rankings, e.teamsById, f, this.sport, h.date)).filter(Boolean);
1344
1344
  return u.length ? Math.min(...u) : null;
1345
- }, c = this.data.games.filter((h) => h.date === this.date), p = c.filter((h) => xs(h, n, e.teamsById, e.schoolsById)), d = r === "conferences" ? As(Ss(p, i), t) : p.length ? [{
1345
+ }, l = this.data.games.filter((h) => h.date === this.date), p = l.filter((h) => ks(h, n, e.teamsById, e.schoolsById)), d = r === "conferences" ? Ts(_s(p, i), t) : p.length ? [{
1346
1346
  name: n ? `All games · ${n}` : "All games",
1347
1347
  conference: null,
1348
- games: ks(p, i, e.teamsById, e.schoolsById)
1348
+ games: Ss(p, i, e.teamsById, e.schoolsById)
1349
1349
  }] : [];
1350
- return l`
1350
+ return c`
1351
1351
  ${le(this, e, {
1352
- title: l`${k(this.sport)} scores &amp; schedules`,
1353
- sub: l`${x(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${c.length} games`,
1352
+ title: c`${k(this.sport)} scores &amp; schedules`,
1353
+ sub: c`${x(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${l.length} games`,
1354
1354
  teams: this.data.teams
1355
1355
  })}
1356
- ${B(this, l`
1357
- ${D(this)}
1356
+ ${D(this, c`
1357
+ ${R(this)}
1358
1358
  <div class="toolbar">
1359
1359
  <label class="asof" for="datesel">Date</label>
1360
1360
  <select id="datesel" @change=${(h) => {
1361
1361
  this.date = h.target.value;
1362
1362
  }}>
1363
- ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((h) => l`<option value=${h} ?selected=${h === this.date}>
1364
- ${x(h, { weekday: "short", month: "short", day: "numeric" })}${h === be() ? " · today" : ""}
1363
+ ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((h) => c`<option value=${h} ?selected=${h === this.date}>
1364
+ ${x(h, { weekday: "short", month: "short", day: "numeric" })}${h === ye() ? " · today" : ""}
1365
1365
  </option>`)}
1366
1366
  </select>
1367
1367
  <button class="chip" ?disabled=${s.indexOf(this.date) <= 0}
@@ -1374,27 +1374,27 @@ class dt extends w {
1374
1374
  }}>Next →</button>
1375
1375
  <span class="spacer"></span>
1376
1376
  <span class="asof">${r === "conferences" ? "Live games first" : "Ranked matchups first, then A–Z by road team"}
1377
- · <a href=${Je(e.hrefs)}>report a score</a> to see it update here</span>
1377
+ · <a href=${Xe(e.hrefs)}>report a score</a> to see it update here</span>
1378
1378
  </div>
1379
1379
  <div class="toolbar filters">
1380
1380
  <div role="group" aria-label="Scoreboard view">
1381
- ${[["all", "All games"], ["conferences", "Conferences view"]].map(([h, u]) => l`<button
1381
+ ${[["all", "All games"], ["conferences", "Conferences view"]].map(([h, u]) => c`<button
1382
1382
  class="chip ${r === h ? "on" : ""}" aria-pressed=${r === h ? "true" : "false"}
1383
1383
  @click=${() => this.pick({ view: h })}>${u}</button>`)}
1384
1384
  </div>
1385
- ${o.length ? l`
1385
+ ${o.length ? c`
1386
1386
  <div role="group" aria-label="Filter by area code">
1387
1387
  <span class="asof">Area code</span>
1388
- ${o.map((h) => l`<button class="chip ${n === h ? "on" : ""}"
1388
+ ${o.map((h) => c`<button class="chip ${n === h ? "on" : ""}"
1389
1389
  aria-pressed=${n === h ? "true" : "false"}
1390
1390
  @click=${() => this.pick({ area: n === h ? "" : h })}>${h}</button>`)}
1391
1391
  </div>` : m}
1392
1392
  </div>
1393
- ${c.length ? m : l`<p class="empty">No ${this.sport} games on this date.</p>`}
1394
- ${c.length && !p.length ? l`<p class="empty">No ${this.sport} games in the ${n} area code on this date.
1393
+ ${l.length ? m : c`<p class="empty">No ${this.sport} games on this date.</p>`}
1394
+ ${l.length && !p.length ? c`<p class="empty">No ${this.sport} games in the ${n} area code on this date.
1395
1395
  <button class="chip" @click=${() => this.pick({ area: "" })}>Every area</button></p>` : m}
1396
- ${d.map(({ name: h, conference: u, games: f }) => l`
1397
- <div class="section-title">${h}${[...u?.classifications || []].sort(de).map((g) => l`<span class="pill class">${g}</span>`)}</div>
1396
+ ${d.map(({ name: h, conference: u, games: f }) => c`
1397
+ <div class="section-title">${h}${[...u?.classifications || []].sort(de).map((g) => c`<span class="pill class">${g}</span>`)}</div>
1398
1398
  <div class="card"><ul class="gamelist">
1399
1399
  ${f.map((g) => this.renderGame(e, g))}
1400
1400
  </ul></div>
@@ -1410,25 +1410,25 @@ class dt extends w {
1410
1410
  // from each URL's shape (lib/search.mjs) rather than the site search the
1411
1411
  // box score's coverage cards query.
1412
1412
  renderGame(e, t) {
1413
- const s = t.state === "final" || t.state === "live", r = (n, i, c = m) => l`<span class="side">${ae(e, n, t.date)}${s ? l`<span class="score">${i}</span>` : m}${c}</span>`, o = hs(t);
1414
- return l`
1413
+ const s = t.state === "final" || t.state === "live", r = (n, i, l = m) => c`<span class="side">${ae(e, n, t.date)}${s ? c`<span class="score">${i}</span>` : m}${l}</span>`, o = ds(t);
1414
+ return c`
1415
1415
  <li>
1416
- ${V(t)}
1417
- <span class="opp matchup">${r(t.awayTeamId, t.awayScore, l`<span class="at">at</span>`)}${r(t.homeTeamId, t.homeScore)}</span>
1418
- ${o ? l`<span class="ff">${z(e, o === "home" ? t.homeTeamId : t.awayTeamId)} forfeited</span>` : m}
1416
+ ${K(t)}
1417
+ <span class="opp matchup">${r(t.awayTeamId, t.awayScore, c`<span class="at">at</span>`)}${r(t.homeTeamId, t.homeScore)}</span>
1418
+ ${o ? c`<span class="ff">${N(e, o === "home" ? t.homeTeamId : t.awayTeamId)} forfeited</span>` : m}
1419
1419
  <span class="where">${t.venue || ""}</span>
1420
- ${t.broadcast ? l`<span class="pill class">${t.broadcast}</span>` : m}
1420
+ ${t.broadcast ? c`<span class="pill class">${t.broadcast}</span>` : m}
1421
1421
  <span class="links">
1422
- ${bs(t.coverageUrls).map((n) => l`<a href=${n.href}>${n.label}</a>`)}
1422
+ ${bs(t.coverageUrls).map((n) => c`<a href=${n.href}>${n.label}</a>`)}
1423
1423
  <a class="box" href=${v(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score →</a>
1424
1424
  </span>
1425
1425
  </li>
1426
1426
  `;
1427
1427
  }
1428
1428
  }
1429
- globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", dt);
1430
- class pt extends w {
1431
- static styles = U;
1429
+ globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", pt);
1430
+ class mt extends w {
1431
+ static styles = H;
1432
1432
  static properties = {
1433
1433
  ...w.properties,
1434
1434
  sport: { type: String },
@@ -1452,7 +1452,7 @@ class pt extends w {
1452
1452
  return e.length < 2 ? "" : e.includes(this.pickedGender) ? this.pickedGender : e[0];
1453
1453
  }
1454
1454
  async fetchData(e) {
1455
- const t = this.season || Y(), [s, r, o, n, i] = await Promise.all([
1455
+ const t = this.season || Q(), [s, r, o, n, i] = await Promise.all([
1456
1456
  e.listConferences({ active: !0 }),
1457
1457
  e.listSchools(),
1458
1458
  // Deliberately NOT gender-filtered: the sub-nav decides whether to
@@ -1476,41 +1476,41 @@ class pt extends w {
1476
1476
  }
1477
1477
  get ctx() {
1478
1478
  return (!this._ctx || this._ctxData !== this.data || this._ctxGender !== this.viewGender) && (this._ctx = {
1479
- teamsById: b(this.data.teams),
1480
- schoolsById: b(this.data.schools),
1481
- records: Q(this.data.games),
1479
+ teamsById: y(this.data.teams),
1480
+ schoolsById: y(this.data.schools),
1481
+ records: Z(this.data.games),
1482
1482
  rankings: this.data.rankings,
1483
- hrefs: O(this),
1483
+ hrefs: U(this),
1484
1484
  sport: this.sport,
1485
1485
  // The teams this view stands for — one side of a gendered
1486
1486
  // sport, or all of them when the sport fields only one.
1487
- teams: st(this.data.teams, this.viewGender)
1487
+ teams: at(this.data.teams, this.viewGender)
1488
1488
  }, this._ctxData = this.data, this._ctxGender = this.viewGender), this._ctx;
1489
1489
  }
1490
1490
  renderView() {
1491
- const e = this.ctx, t = this.viewGender, s = this.gender ? [] : pe(this.data.teams), r = ["All", ...[...new Set(this.data.conferences.flatMap((n) => n.classifications || []))].sort(de)].slice(0, 9), o = this.data.conferences.filter((n) => n.active !== !1).filter((n) => this.classFilter === "All" || (n.classifications || []).includes(this.classFilter)).sort(Xe);
1492
- return l`
1491
+ const e = this.ctx, t = this.viewGender, s = this.gender ? [] : pe(this.data.teams), r = ["All", ...[...new Set(this.data.conferences.flatMap((n) => n.classifications || []))].sort(de)].slice(0, 9), o = this.data.conferences.filter((n) => n.active !== !1).filter((n) => this.classFilter === "All" || (n.classifications || []).includes(this.classFilter)).sort(et);
1492
+ return c`
1493
1493
  ${le(this, e, {
1494
- title: l`${t ? `${k(t)} ` : ""}${k(this.sport)} standings`,
1495
- sub: l`${this.data.season} season · every conference, computed live from reported results`,
1494
+ title: c`${t ? `${k(t)} ` : ""}${k(this.sport)} standings`,
1495
+ sub: c`${this.data.season} season · every conference, computed live from reported results`,
1496
1496
  // The WHOLE sport, not this view's side: the sub-nav offers the
1497
1497
  // Boys/Girls split only when both are fielded, and a
1498
1498
  // gender-scoped list would always look like one side.
1499
1499
  teams: this.data.teams
1500
1500
  })}
1501
- ${B(this, l`
1502
- ${D(this)}
1501
+ ${D(this, c`
1502
+ ${R(this)}
1503
1503
  <div class="toolbar">
1504
- ${s.length === 2 ? l`
1504
+ ${s.length === 2 ? c`
1505
1505
  <div role="group" aria-label="Boys or girls standings">
1506
- ${s.map((n) => l`<button class="chip ${t === n ? "on" : ""}"
1506
+ ${s.map((n) => c`<button class="chip ${t === n ? "on" : ""}"
1507
1507
  aria-pressed=${t === n ? "true" : "false"}
1508
1508
  @click=${() => {
1509
1509
  this.pickedGender = n;
1510
1510
  }}>${k(n)}</button>`)}
1511
1511
  </div>` : m}
1512
1512
  <div role="group" aria-label="Classification filter">
1513
- ${r.map((n) => l`<button class="chip ${this.classFilter === n ? "on" : ""}"
1513
+ ${r.map((n) => c`<button class="chip ${this.classFilter === n ? "on" : ""}"
1514
1514
  @click=${() => {
1515
1515
  this.classFilter = n;
1516
1516
  }}>${n}</button>`)}
@@ -1520,7 +1520,7 @@ class pt extends w {
1520
1520
  this.query = n.target.value;
1521
1521
  }}>
1522
1522
  <span class="spacer"></span>
1523
- <span class="asof">Records through ${x(be(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1523
+ <span class="asof">Records through ${x(ye(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1524
1524
  </div>
1525
1525
  ${o.map((n) => this.renderConference(e, n))}
1526
1526
  `)}
@@ -1529,12 +1529,12 @@ class pt extends w {
1529
1529
  renderConference(e, t) {
1530
1530
  const s = e.teams.filter((n) => n.conferenceId === t.id);
1531
1531
  if (!s.length) return m;
1532
- const r = this.query.trim().toLowerCase(), o = rt(s, e.records);
1533
- return l`
1532
+ const r = this.query.trim().toLowerCase(), o = ot(s, e.records);
1533
+ return c`
1534
1534
  <div class="card">
1535
1535
  <div class="card-head">
1536
1536
  <h2>${t.name}</h2>
1537
- ${[...t.classifications || []].sort(de).map((n) => l`<span class="pill class">${n}</span>`)}
1537
+ ${[...t.classifications || []].sort(de).map((n) => c`<span class="pill class">${n}</span>`)}
1538
1538
  <span class="meta">${o.length} teams · membership derives from teams</span>
1539
1539
  </div>
1540
1540
  <div class="tablewrap"><table class="data">
@@ -1553,34 +1553,34 @@ class pt extends w {
1553
1553
  renderRow(e, t, s, r) {
1554
1554
  const o = e.schoolsById[t.team.schoolId], n = o?.name || t.team.name || "TBD";
1555
1555
  if (r && !n.toLowerCase().includes(r)) return m;
1556
- const i = t.rec.pf - t.rec.pa, c = we(this.data.games, t.team.id), p = () => {
1556
+ const i = t.rec.pf - t.rec.pa, l = we(this.data.games, t.team.id), p = () => {
1557
1557
  location.href = v(e.hrefs.school, { id: t.team.schoolId });
1558
1558
  };
1559
- return l`
1559
+ return c`
1560
1560
  <tr class="rowlink" @click=${(d) => {
1561
1561
  d.target.closest("a") || p();
1562
1562
  }}>
1563
1563
  <td class="mut">${s + 1}</td>
1564
1564
  <td class="teamcell">
1565
- ${P(o)}${ke(e, t.team.id, null)}
1565
+ ${B(o)}${ke(e, t.team.id, null)}
1566
1566
  <a href=${v(e.hrefs.school, { id: t.team.schoolId })}>${n}</a>
1567
1567
  </td>
1568
1568
  <td class="num">${S(t.rec, !0)}</td>
1569
- <td class="num">${Oe(t.confPct)}</td>
1569
+ <td class="num">${Ue(t.confPct)}</td>
1570
1570
  <td class="num">${S(t.rec)}</td>
1571
- <td class="num">${Oe(t.overallPct)}</td>
1571
+ <td class="num">${Ue(t.overallPct)}</td>
1572
1572
  <td class="num">${t.rec.pf}</td>
1573
1573
  <td class="num">${t.rec.pa}</td>
1574
1574
  <td class="num" style="color:${i >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${i > 0 ? "+" : ""}${i}</td>
1575
1575
  <td>${ie(t.rec.results) || "·"}</td>
1576
1576
  <td>${Se(e, t.team.id)}</td>
1577
- <td>${nt(e, c, t.team.id)}</td>
1577
+ <td>${it(e, l, t.team.id)}</td>
1578
1578
  </tr>
1579
1579
  `;
1580
1580
  }
1581
1581
  }
1582
- globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", pt);
1583
- const Is = y`
1582
+ globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", mt);
1583
+ const Cs = b`
1584
1584
  .hero1 {
1585
1585
  border-radius: var(--hsot-radius-md); color: var(--hsot-white);
1586
1586
  padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1.2rem;
@@ -1597,8 +1597,8 @@ const Is = y`
1597
1597
  .delta.new { background: var(--hsot-straw); color: #6b5900; border-radius: var(--hsot-radius-xs); padding: 0.1rem 0.3rem; font-size: 0.7rem; }
1598
1598
  .sparkline { vertical-align: middle; }
1599
1599
  `;
1600
- class mt extends w {
1601
- static styles = [...U, Is];
1600
+ class ut extends w {
1601
+ static styles = [...H, Cs];
1602
1602
  static properties = {
1603
1603
  ...w.properties,
1604
1604
  sport: { type: String },
@@ -1615,16 +1615,16 @@ class mt extends w {
1615
1615
  e && (this.pollDate = e);
1616
1616
  }
1617
1617
  async fetchData(e) {
1618
- const t = this.season || Y(), [s, r, o, n, i] = await Promise.all([
1618
+ const t = this.season || Q(), [s, r, o, n, i] = await Promise.all([
1619
1619
  e.listRankings({ sport: this.sport, ...this.gender ? { gender: this.gender } : {} }),
1620
1620
  e.listSchools(),
1621
1621
  e.listTeams({ sport: this.sport }),
1622
1622
  e.listConferences(),
1623
1623
  e.listGames({ sport: this.sport, season: t })
1624
- ]), c = s.items.filter((p) => !this.gender || !p.gender || p.gender === this.gender).sort((p, d) => d.effectiveDate.localeCompare(p.effectiveDate));
1624
+ ]), l = s.items.filter((p) => !this.gender || !p.gender || p.gender === this.gender).sort((p, d) => d.effectiveDate.localeCompare(p.effectiveDate));
1625
1625
  return {
1626
1626
  season: t,
1627
- polls: c,
1627
+ polls: l,
1628
1628
  schools: r.items,
1629
1629
  teams: o.items,
1630
1630
  conferences: n.items,
@@ -1633,11 +1633,11 @@ class mt extends w {
1633
1633
  }
1634
1634
  get ctx() {
1635
1635
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1636
- teamsById: b(this.data.teams),
1637
- schoolsById: b(this.data.schools),
1638
- records: Q(this.data.games),
1636
+ teamsById: y(this.data.teams),
1637
+ schoolsById: y(this.data.schools),
1638
+ records: Z(this.data.games),
1639
1639
  rankings: this.data.polls,
1640
- hrefs: O(this),
1640
+ hrefs: U(this),
1641
1641
  sport: this.sport
1642
1642
  }, this._ctxData = this.data), this._ctx;
1643
1643
  }
@@ -1647,40 +1647,40 @@ class mt extends w {
1647
1647
  if (f === -1) return null;
1648
1648
  const g = t.length === 1 ? 96 / 2 : u / (t.length - 1) * 90 + 3, $ = 3 + f / 24 * 20;
1649
1649
  return { x: g, y: $ };
1650
- }), c = [];
1650
+ }), l = [];
1651
1651
  let p = [];
1652
1652
  if (i.forEach((h) => {
1653
- h ? p.push(h) : p.length && (c.push(p), p = []);
1654
- }), p.length && c.push(p), !c.length) return m;
1653
+ h ? p.push(h) : p.length && (l.push(p), p = []);
1654
+ }), p.length && l.push(p), !l.length) return m;
1655
1655
  const d = i[s];
1656
- return l`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1657
- ${c.map((h) => Ne`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1656
+ return c`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1657
+ ${l.map((h) => Me`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1658
1658
  points=${h.map((u) => `${u.x.toFixed(1)},${u.y.toFixed(1)}`).join(" ")}></polyline>`)}
1659
- ${d ? Ne`<circle cx=${d.x.toFixed(1)} cy=${d.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1659
+ ${d ? Me`<circle cx=${d.x.toFixed(1)} cy=${d.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1660
1660
  </svg>`;
1661
1661
  }
1662
1662
  movement(e, t, s) {
1663
- const r = ds(e, t, s);
1664
- 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>`;
1663
+ const r = ps(e, t, s);
1664
+ return r.kind === "up" ? c`<span class="delta up">▲ ${r.delta}</span>` : r.kind === "down" ? c`<span class="delta down">▼ ${r.delta}</span>` : r.kind === "new" ? c`<span class="delta new">NEW</span>` : r.kind === "same" ? c`<span class="delta same">—</span>` : c`<span class="delta same">·</span>`;
1665
1665
  }
1666
1666
  renderView() {
1667
1667
  const e = this.ctx, t = this.data.polls;
1668
- if (!t.length) return l`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1669
- const s = Math.max(0, t.findIndex((h) => h.effectiveDate === this.pollDate)), r = t[s] || t[0], o = t[s + 1] || null, n = t.slice().reverse(), i = n.indexOf(r), c = b(this.data.conferences), p = (r.teamIds || [])[0], d = p ? E(e, p) : null;
1670
- return l`
1668
+ if (!t.length) return c`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1669
+ const s = Math.max(0, t.findIndex((h) => h.effectiveDate === this.pollDate)), r = t[s] || t[0], o = t[s + 1] || null, n = t.slice().reverse(), i = n.indexOf(r), l = y(this.data.conferences), p = (r.teamIds || [])[0], d = p ? P(e, p) : null;
1670
+ return c`
1671
1671
  ${le(this, e, {
1672
- title: l`${k(this.sport)} Top 25`,
1673
- sub: l`The HighSchoolOT poll · updated weekly · ${t.length} polls this season`,
1672
+ title: c`${k(this.sport)} Top 25`,
1673
+ sub: c`The HighSchoolOT poll · updated weekly · ${t.length} polls this season`,
1674
1674
  teams: this.data.teams
1675
1675
  })}
1676
- ${B(this, l`
1677
- ${D(this)}
1676
+ ${D(this, c`
1677
+ ${R(this)}
1678
1678
  <div class="toolbar">
1679
1679
  <label class="asof" for="pollsel">Poll of</label>
1680
1680
  <select id="pollsel" @change=${(h) => {
1681
1681
  this.pollDate = h.target.value;
1682
1682
  }}>
1683
- ${t.map((h, u) => l`<option value=${h.effectiveDate} ?selected=${h === r}>
1683
+ ${t.map((h, u) => c`<option value=${h.effectiveDate} ?selected=${h === r}>
1684
1684
  ${x(h.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${u === 0 ? " · current" : ""}
1685
1685
  </option>`)}
1686
1686
  </select>
@@ -1695,14 +1695,14 @@ class mt extends w {
1695
1695
  <span class="spacer"></span>
1696
1696
  <span class="asof">Movement vs. the previous poll · sparkline = season rank history</span>
1697
1697
  </div>
1698
- ${d ? this.renderHero(e, r, o, p, d, c) : m}
1698
+ ${d ? this.renderHero(e, r, o, p, d, l) : m}
1699
1699
  <div class="card"><div class="tablewrap"><table class="data">
1700
1700
  <thead><tr>
1701
1701
  <th class="num">Rk</th><th>Mvmt</th><th>Team</th><th class="num">Record</th>
1702
1702
  <th>Conference</th><th>Last result</th><th>Next</th><th>Season</th>
1703
1703
  </tr></thead>
1704
1704
  <tbody>
1705
- ${(r.teamIds || []).map((h, u) => u === 0 || !h ? m : this.renderRow(e, r, o, n, i, c, h, u + 1))}
1705
+ ${(r.teamIds || []).map((h, u) => u === 0 || !h ? m : this.renderRow(e, r, o, n, i, l, h, u + 1))}
1706
1706
  </tbody>
1707
1707
  </table></div></div>
1708
1708
  <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>
@@ -1710,50 +1710,50 @@ class mt extends w {
1710
1710
  `;
1711
1711
  }
1712
1712
  renderHero(e, t, s, r, o, n) {
1713
- const i = e.records[r], c = Ue(e.records, r), p = n[e.teamsById[r]?.conferenceId], d = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1714
- return l`
1713
+ const i = e.records[r], l = He(e.records, r), p = n[e.teamsById[r]?.conferenceId], d = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1714
+ return c`
1715
1715
  <div class="hero1" style="background:${d}">
1716
1716
  <div class="bigrank">#1</div>
1717
- ${P(o, 64)}
1717
+ ${B(o, 64)}
1718
1718
  <div>
1719
1719
  <h2><a href=${v(e.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1720
1720
  <div class="facts">
1721
- ${S(i)} overall${p ? l` · ${S(i, !0)} ${p.name}` : m}
1721
+ ${S(i)} overall${p ? c` · ${S(i, !0)} ${p.name}` : m}
1722
1722
  · streak ${ie(i?.results) || "·"}
1723
- ${c ? l` · last: ${c.mark} ${c.my}-${c.their} vs ${se(e, c.opp)}` : m}
1723
+ ${l ? c` · last: ${l.mark} ${l.my}-${l.their} vs ${se(e, l.opp)}` : m}
1724
1724
  &nbsp;${this.movement(t, s, r)}
1725
1725
  </div>
1726
1726
  </div>
1727
1727
  </div>
1728
1728
  `;
1729
1729
  }
1730
- renderRow(e, t, s, r, o, n, i, c) {
1731
- const p = E(e, i);
1730
+ renderRow(e, t, s, r, o, n, i, l) {
1731
+ const p = P(e, i);
1732
1732
  if (!p) return m;
1733
- const d = e.records[i], h = Ue(e.records, i), u = we(this.data.games, i), f = n[e.teamsById[i]?.conferenceId], g = () => {
1733
+ const d = e.records[i], h = He(e.records, i), u = we(this.data.games, i), f = n[e.teamsById[i]?.conferenceId], g = () => {
1734
1734
  location.href = v(e.hrefs.school, { id: p.id });
1735
1735
  };
1736
- return l`
1736
+ return c`
1737
1737
  <tr class="rowlink" @click=${($) => {
1738
1738
  $.target.closest("a") || g();
1739
1739
  }}>
1740
- <td class="num" style="font-weight:700">${c}</td>
1740
+ <td class="num" style="font-weight:700">${l}</td>
1741
1741
  <td>${this.movement(t, s, i)}</td>
1742
- <td class="teamcell">${P(p)}<a href=${v(e.hrefs.school, { id: p.id })}>${p.name}</a>
1742
+ <td class="teamcell">${B(p)}<a href=${v(e.hrefs.school, { id: p.id })}>${p.name}</a>
1743
1743
  <span class="mut" style="font-size:0.78rem">${p.mascot || ""}</span></td>
1744
1744
  <td class="num">${S(d)}</td>
1745
1745
  <td class="mut">${f?.name || "Independent"}</td>
1746
- <td>${h ? l`<a class="box" style="text-decoration:none" href=${v(e.hrefs.game, { sport: this.sport, id: h.gameId })}>
1746
+ <td>${h ? c`<a class="box" style="text-decoration:none" href=${v(e.hrefs.game, { sport: this.sport, id: h.gameId })}>
1747
1747
  <b style="color:${h.mark === "W" ? "var(--hsot-win)" : h.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${h.mark}</b>
1748
- ${h.my}-${h.their} vs ${se(e, h.opp)}</a>` : l`<span class="mut">·</span>`}</td>
1749
- <td>${nt(e, u, i)}</td>
1748
+ ${h.my}-${h.their} vs ${se(e, h.opp)}</a>` : c`<span class="mut">·</span>`}</td>
1749
+ <td>${it(e, u, i)}</td>
1750
1750
  <td>${this.sparkline(i, r, o)}</td>
1751
1751
  </tr>
1752
1752
  `;
1753
1753
  }
1754
1754
  }
1755
- globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", mt);
1756
- const Cs = y`
1755
+ globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", ut);
1756
+ const Es = b`
1757
1757
  .schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
1758
1758
  .schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
1759
1759
  .schoolhero .crest {
@@ -1807,8 +1807,8 @@ const Cs = y`
1807
1807
  table.data.roster .sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--hsot-gray-5); }
1808
1808
  }
1809
1809
  `;
1810
- class ut extends w {
1811
- static styles = [...U, Cs];
1810
+ class ft extends w {
1811
+ static styles = [...H, Es];
1812
1812
  static properties = {
1813
1813
  ...w.properties,
1814
1814
  schoolId: { type: String, attribute: "school-id" },
@@ -1826,7 +1826,7 @@ class ut extends w {
1826
1826
  t && !this.sport && (this.sport = t), s && !this.gender && (this.gender = s);
1827
1827
  }
1828
1828
  async fetchData(e) {
1829
- const t = this.season || Y(), s = await e.getSchool(this.schoolId), o = (await e.listTeams({ schoolId: this.schoolId })).items, n = this.sport || "football", i = o.find(($) => $.id === this.activeTeamId) || o.find(($) => $.sport === n && tt($, this.gender)) || o.find(($) => $.sport === n) || o[0] || null, [c, p, d, h, u, f, g] = await Promise.all([
1829
+ const t = this.season || Q(), s = await e.getSchool(this.schoolId), o = (await e.listTeams({ schoolId: this.schoolId })).items, n = this.sport || "football", i = o.find(($) => $.id === this.activeTeamId) || o.find(($) => $.sport === n && st($, this.gender)) || o.find(($) => $.sport === n) || o[0] || null, [l, p, d, h, u, f, g] = await Promise.all([
1830
1830
  i ? e.listGames({ sport: i.sport, season: t }) : Promise.resolve({ items: [] }),
1831
1831
  i ? e.listTeams({ sport: i.sport }) : Promise.resolve({ items: [] }),
1832
1832
  e.listSchools(),
@@ -1842,7 +1842,7 @@ class ut extends w {
1842
1842
  school: s,
1843
1843
  teams: o,
1844
1844
  active: i,
1845
- games: c.items,
1845
+ games: l.items,
1846
1846
  allTeams: p.items,
1847
1847
  schools: d.items,
1848
1848
  conferences: h.items,
@@ -1853,11 +1853,11 @@ class ut extends w {
1853
1853
  }
1854
1854
  get ctx() {
1855
1855
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1856
- teamsById: b(this.data.allTeams.length ? this.data.allTeams : this.data.teams),
1857
- schoolsById: b(this.data.schools),
1858
- records: Q(this.data.games),
1856
+ teamsById: y(this.data.allTeams.length ? this.data.allTeams : this.data.teams),
1857
+ schoolsById: y(this.data.schools),
1858
+ records: Z(this.data.games),
1859
1859
  rankings: this.data.rankings,
1860
- hrefs: O(this),
1860
+ hrefs: U(this),
1861
1861
  sport: this.data.active?.sport || "football"
1862
1862
  }, this._ctxData = this.data), this._ctx;
1863
1863
  }
@@ -1871,45 +1871,45 @@ class ut extends w {
1871
1871
  }
1872
1872
  renderView() {
1873
1873
  const { school: e, teams: t, active: s, season: r } = this.data;
1874
- if (!e) return l`<div class="view"><p class="empty">School not found.</p></div>`;
1875
- const o = this.ctx, n = ee(e.colorPrimary || "#030711"), i = (e.adm || [])[0], c = b(this.data.conferences), p = s ? c[s.conferenceId] : null;
1876
- return l`
1874
+ if (!e) return c`<div class="view"><p class="empty">School not found.</p></div>`;
1875
+ const o = this.ctx, n = ee(e.colorPrimary || "#030711"), i = (e.adm || [])[0], l = y(this.data.conferences), p = s ? l[s.conferenceId] : null;
1876
+ return c`
1877
1877
  <div class="schoolhero" style="background:linear-gradient(115deg, ${e.colorPrimary || "#030711"} 0%, ${e.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${n}">
1878
1878
  <div class="inner">
1879
- ${te(e, 84) ? l`<img class="crest logo" alt="" loading="lazy" src=${te(e, 84)} />` : l`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${ee(e.colorSecondary || "#7C7C7C")}">${ye(e)}</div>`}
1879
+ ${te(e, 84) ? c`<img class="crest logo" alt="" loading="lazy" src=${te(e, 84)} />` : c`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${ee(e.colorSecondary || "#7C7C7C")}">${be(e)}</div>`}
1880
1880
  <div style="min-width:260px">
1881
1881
  <h1>${e.name} <span class="mascot">${e.mascot || ""}</span></h1>
1882
1882
  <div class="facts">
1883
- ${e.location ? l`<span><b>Location</b>${e.location}${e.county ? l` · ${e.county} County` : m}</span>` : m}
1884
- ${e.association ? l`<span><b>League</b>${e.association}${e.classification ? l` · ${e.classification}` : m}</span>` : m}
1885
- ${p ? l`<span><b>Conference</b>${p.name}</span>` : m}
1886
- ${i ? l`<span><b>Enrollment</b>${i.value.toLocaleString()} (${i.season} ADM)</span>` : m}
1887
- ${e.openingYear ? l`<span><b>Opened</b>${e.openingYear}</span>` : m}
1888
- ${e.areaCode ? l`<span><b>Area</b>${e.areaCode}</span>` : m}
1883
+ ${e.location ? c`<span><b>Location</b>${e.location}${e.county ? c` · ${e.county} County` : m}</span>` : m}
1884
+ ${e.association ? c`<span><b>League</b>${e.association}${e.classification ? c` · ${e.classification}` : m}</span>` : m}
1885
+ ${p ? c`<span><b>Conference</b>${p.name}</span>` : m}
1886
+ ${i ? c`<span><b>Enrollment</b>${i.value.toLocaleString()} (${i.season} ADM)</span>` : m}
1887
+ ${e.openingYear ? c`<span><b>Opened</b>${e.openingYear}</span>` : m}
1888
+ ${e.areaCode ? c`<span><b>Area</b>${e.areaCode}</span>` : m}
1889
1889
  </div>
1890
1890
  </div>
1891
1891
  </div>
1892
1892
  </div>
1893
1893
  <div class="band">
1894
1894
  <nav class="tabs" aria-label="Teams">
1895
- ${t.map((d) => d.id === s?.id ? l`<a class="on" href="#" aria-current="page" @click=${(h) => h.preventDefault()}>${d.name}</a>` : l`<a href="#" @click=${(h) => {
1895
+ ${t.map((d) => d.id === s?.id ? c`<a class="on" href="#" aria-current="page" @click=${(h) => h.preventDefault()}>${d.name}</a>` : c`<a href="#" @click=${(h) => {
1896
1896
  h.preventDefault(), this.switchTeam(d);
1897
1897
  }}>${d.name}</a>`)}
1898
1898
  </nav>
1899
1899
  </div>
1900
- ${B(this, l`
1901
- ${D(this)}
1902
- ${s ? this.renderTeam(o, s, p, r) : l`<p class="empty">No teams recorded for this school yet.</p>`}
1900
+ ${D(this, c`
1901
+ ${R(this)}
1902
+ ${s ? this.renderTeam(o, s, p, r) : c`<p class="empty">No teams recorded for this school yet.</p>`}
1903
1903
  `)}
1904
1904
  `;
1905
1905
  }
1906
1906
  renderTeam(e, t, s, r) {
1907
- const o = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, n = o.w + o.l + o.t, i = s ? st(this.data.allTeams.filter((h) => h.conferenceId === s.id), t.gender) : [], c = s ? rt(i, e.records).findIndex((h) => h.team.id === t.id) + 1 : 0, p = xe(e.rankings, e.teamsById, t.id, t.sport, null), d = this.data.games.filter((h) => h.homeTeamId === t.id || h.awayTeamId === t.id).sort((h, u) => String(h.date).localeCompare(String(u.date)));
1908
- return l`
1907
+ const o = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, n = o.w + o.l + o.t, i = s ? at(this.data.allTeams.filter((h) => h.conferenceId === s.id), t.gender) : [], l = s ? ot(i, e.records).findIndex((h) => h.team.id === t.id) + 1 : 0, p = xe(e.rankings, e.teamsById, t.id, t.sport, null), d = this.data.games.filter((h) => h.homeTeamId === t.id || h.awayTeamId === t.id).sort((h, u) => String(h.date).localeCompare(String(u.date)));
1908
+ return c`
1909
1909
  <div class="tiles">
1910
1910
  <div class="tile"><div class="k">Overall</div><div class="v">${S(o)}</div><div class="s">${n} games played</div></div>
1911
1911
  <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${S(o, !0)}</div>
1912
- <div class="s">${c ? `${Qt(c)} of ${i.length}` : "·"}</div></div>
1912
+ <div class="s">${l ? `${Zt(l)} of ${i.length}` : "·"}</div></div>
1913
1913
  <div class="tile"><div class="k">Points</div><div class="v">${n ? (o.pf / n).toFixed(1) : "0.0"}</div>
1914
1914
  <div class="s">scored per game · ${n ? (o.pa / n).toFixed(1) : "0.0"} allowed</div></div>
1915
1915
  <div class="tile"><div class="k">Streak</div><div class="v">${ie(o.results) || "·"}</div>
@@ -1917,15 +1917,15 @@ class ut extends w {
1917
1917
  <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${p ? `#${p}` : "NR"}</div>
1918
1918
  <div class="s"><a href=${v(e.hrefs.section, { sport: t.sport, view: "rankings" })}>full poll</a></div></div>
1919
1919
  </div>
1920
- ${(t.championships || []).length ? l`
1920
+ ${(t.championships || []).length ? c`
1921
1921
  <div style="margin:-0.2rem 0 1rem;display:flex;gap:0.4rem;flex-wrap:wrap">
1922
- ${t.championships.map((h) => l`<span class="pill champ">★ ${h.season} ${h.title} champion${h.classification ? ` · ${h.classification}` : ""}${h.region ? ` · ${h.region}` : ""}</span>`)}
1922
+ ${t.championships.map((h) => c`<span class="pill champ">★ ${h.season} ${h.title} champion${h.classification ? ` · ${h.classification}` : ""}${h.region ? ` · ${h.region}` : ""}</span>`)}
1923
1923
  </div>` : m}
1924
1924
  <div class="cols">
1925
1925
  <div>
1926
1926
  <div class="section-title">Schedule &amp; results</div>
1927
1927
  <div class="card">
1928
- ${d.length ? l`<ul class="gamelist">${d.map((h) => this.renderGameRow(e, t, h))}</ul>` : l`<p class="empty">No ${t.sport} games recorded for ${r}.</p>`}
1928
+ ${d.length ? c`<ul class="gamelist">${d.map((h) => this.renderGameRow(e, t, h))}</ul>` : c`<p class="empty">No ${t.sport} games recorded for ${r}.</p>`}
1929
1929
  </div>
1930
1930
  </div>
1931
1931
  <div>
@@ -1937,20 +1937,20 @@ class ut extends w {
1937
1937
  }
1938
1938
  renderGameRow(e, t, s) {
1939
1939
  const r = s.homeTeamId === t.id, o = r ? s.awayTeamId : s.homeTeamId, n = r ? s.homeScore : s.awayScore, i = r ? s.awayScore : s.homeScore;
1940
- let c = l`<span class="mut">${$e(s.time)}</span>`;
1940
+ let l = c`<span class="mut">${$e(s.time)}</span>`;
1941
1941
  if (s.state === "final") {
1942
1942
  const d = ne(s), h = d === "tie" ? "T" : d === (r ? "home" : "away") ? "W" : "L";
1943
- c = l`<span class=${h}>${h}</span> ${n}-${i}${s.finish === "overtime" ? l` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? l` <span class="mut">FF</span>` : m}`;
1944
- } else s.state === "live" && (c = l`<span style="color:var(--hsot-red)">${n}-${i}</span>`);
1943
+ l = c`<span class=${h}>${h}</span> ${n}-${i}${s.finish === "overtime" ? c` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? c` <span class="mut">FF</span>` : m}`;
1944
+ } else s.state === "live" && (l = c`<span style="color:var(--hsot-red)">${n}-${i}</span>`);
1945
1945
  const p = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1946
- return l`
1946
+ return c`
1947
1947
  <li>
1948
1948
  <span class="d">${x(s.date)}</span>
1949
- ${et(s).kind === "sched" ? m : V(s)}
1950
- <span class="res">${c}</span>
1949
+ ${tt(s).kind === "sched" ? m : K(s)}
1950
+ <span class="res">${l}</span>
1951
1951
  <span class="opp">${r ? "vs" : "at"} ${ae(e, o, s.date)}
1952
1952
  <span class="pill type">${p}</span>
1953
- ${s.broadcast ? l`<span class="pill class">${s.broadcast}</span>` : m}
1953
+ ${s.broadcast ? c`<span class="pill class">${s.broadcast}</span>` : m}
1954
1954
  </span>
1955
1955
  <span class="where">${s.venue || ""}</span>
1956
1956
  <a class="box" href=${v(e.hrefs.game, { sport: t.sport, id: s.id })}>Box score →</a>
@@ -1960,26 +1960,26 @@ class ut extends w {
1960
1960
  renderRoster(e, t) {
1961
1961
  const s = this.data.roster;
1962
1962
  if (!s)
1963
- return l`<p class="empty">Roster not published for ${t}.</p>`;
1964
- const r = ms(s, 560), o = this.data.school?.name || "", n = b(this.data.players), i = s.entries.slice().sort((p, d) => (p.number || 0) - (d.number || 0)), c = i.some((p) => n[p.playerId]?.college);
1965
- return l`
1966
- ${r ? l`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
1963
+ return c`<p class="empty">Roster not published for ${t}.</p>`;
1964
+ const r = us(s, 560), o = this.data.school?.name || "", n = y(this.data.players), i = s.entries.slice().sort((p, d) => (p.number || 0) - (d.number || 0)), l = i.some((p) => n[p.playerId]?.college);
1965
+ return c`
1966
+ ${r ? c`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
1967
1967
  alt="${o} ${e.name} ${t} team photo" />` : m}
1968
1968
  <div class="tablewrap"><table class="data roster">
1969
- <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>${c ? l`<th>College</th>` : m}</tr></thead>
1969
+ <thead><tr><th class="num">No.</th><th>Player</th><th class="pos">Pos</th><th class="cls">Class</th><th class="num">Ht</th><th class="num">Wt</th>${l ? c`<th>College</th>` : m}</tr></thead>
1970
1970
  <tbody>
1971
1971
  ${i.map((p) => {
1972
1972
  const d = n[p.playerId];
1973
1973
  if (!d) return m;
1974
- const h = Kt(p), u = [h, d.classOf].filter(Boolean).join(" · ") || "·";
1975
- return l`<tr>
1974
+ const h = Yt(p), u = [h, d.classOf].filter(Boolean).join(" · ") || "·";
1975
+ return c`<tr>
1976
1976
  <td class="num mut">${p.number ?? "·"}</td>
1977
1977
  <td class="player" style="font-weight:500">${d.firstName} ${d.lastName}<span class="sub">${u}</span></td>
1978
1978
  <td class="pos">${h || "·"}</td>
1979
1979
  <td class="cls mut">${d.classOf || "·"}</td>
1980
- <td class="num">${Vt(d.heightIn)}</td>
1980
+ <td class="num">${Kt(d.heightIn)}</td>
1981
1981
  <td class="num">${d.weightLb || "·"}</td>
1982
- ${c ? l`<td class="college">${d.college || "·"}</td>` : m}
1982
+ ${l ? c`<td class="college">${d.college || "·"}</td>` : m}
1983
1983
  </tr>`;
1984
1984
  })}
1985
1985
  </tbody>
@@ -1987,8 +1987,8 @@ class ut extends w {
1987
1987
  `;
1988
1988
  }
1989
1989
  }
1990
- globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", ut);
1991
- const ft = {
1990
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", ft);
1991
+ const gt = {
1992
1992
  football: ["quarters", 4],
1993
1993
  flag_football: ["quarters", 4],
1994
1994
  basketball: ["quarters", 4],
@@ -1999,30 +1999,32 @@ const ft = {
1999
1999
  softball: ["innings", 7],
2000
2000
  volleyball: ["sets", 3]
2001
2001
  };
2002
- function gt(a) {
2003
- return (ft[a] || ["quarters", 4])[0];
2004
- }
2005
2002
  function _e(a) {
2006
- return (ft[a] || ["quarters", 4])[1];
2003
+ return (gt[a] || ["quarters", 4])[0];
2004
+ }
2005
+ function Ae(a) {
2006
+ return (gt[a] || ["quarters", 4])[1];
2007
2007
  }
2008
- function Es(a, e) {
2009
- const t = gt(a), s = _e(a);
2008
+ function Ps(a, e) {
2009
+ const t = _e(a), s = Ae(a);
2010
2010
  if (e <= s || t === "innings" || t === "sets") return String(e);
2011
2011
  const r = e - s;
2012
2012
  return `OT${r > 1 ? r : ""}`;
2013
2013
  }
2014
- function Ps(a, e) {
2014
+ function vt(a, e) {
2015
2015
  const t = String(a ?? "").trim();
2016
2016
  let s;
2017
- return (s = /^(\d+)Q$/i.exec(t)) || (s = /^(\d+)H$/i.exec(t)) ? Number(s[1]) : /^half$/i.test(t) ? gt(e) === "halves" ? 1 : 2 : (s = /^(\d*)OT(\d*)$/i.exec(t)) ? _e(e) + Number(s[1] || s[2] || 1) : (s = /^[TB](\d+)$/i.exec(t)) || (s = /^(\d+)(?:st|nd|rd|th)\s*set$/i.exec(t)) || (s = /^set\s*(\d+)$/i.exec(t)) ? Number(s[1]) : null;
2017
+ return (s = /^(\d+)Q$/i.exec(t)) || (s = /^(\d+)H$/i.exec(t)) ? Number(s[1]) : /^half$/i.test(t) ? _e(e) === "halves" ? 1 : 2 : (s = /^(\d*)OT(\d*)$/i.exec(t)) ? Ae(e) + Number(s[1] || s[2] || 1) : (s = /^[TB](\d+)$/i.exec(t)) || (s = /^(\d+)(?:st|nd|rd|th)\s*set$/i.exec(t)) || (s = /^set\s*(\d+)$/i.exec(t)) ? Number(s[1]) : null;
2018
2018
  }
2019
- const Z = (a) => Number.isInteger(a) && a >= 0 ? a : null;
2019
+ const T = (a) => Number.isInteger(a) && a >= 0 ? a : null;
2020
2020
  function Bs(a) {
2021
2021
  const e = Array.isArray(a?.scoringPlays) ? a.scoringPlays : [];
2022
2022
  if (!e.length) return null;
2023
- const t = a.sport, s = /* @__PURE__ */ new Map();
2023
+ const t = a.sport;
2024
+ if (_e(t) === "sets") return Ds(a, e);
2025
+ const s = /* @__PURE__ */ new Map();
2024
2026
  for (const h of e) {
2025
- const u = Ps(h?.period, t), f = Z(h?.homeScore), g = Z(h?.awayScore);
2027
+ const u = vt(h?.period, t), f = T(h?.homeScore), g = T(h?.awayScore);
2026
2028
  if (!u || f === null || g === null) return null;
2027
2029
  const $ = s.get(u) || { home: 0, away: 0 };
2028
2030
  $.home = Math.max($.home, f), $.away = Math.max($.away, g), s.set(u, $);
@@ -2033,15 +2035,36 @@ function Bs(a) {
2033
2035
  const u = s.get(h) || i, f = u.home - i.home, g = u.away - i.away;
2034
2036
  (f < 0 || g < 0) && (n = !1), o.push({ period: h, home: Math.max(f, 0), away: Math.max(g, 0) }), i = { home: Math.max(u.home, i.home), away: Math.max(u.away, i.away) };
2035
2037
  }
2036
- const c = Z(a.homeScore) ?? 0, p = Z(a.awayScore) ?? 0, d = n && i.home === c && i.away === p;
2037
- return n = n && i.home <= c && i.away <= p, { periods: o, reconciled: d, consistent: n };
2038
+ const l = T(a.homeScore) ?? 0, p = T(a.awayScore) ?? 0, d = n && i.home === l && i.away === p;
2039
+ return n = n && i.home <= l && i.away <= p, { periods: o, reconciled: d, consistent: n };
2038
2040
  }
2039
- function Ds(a) {
2041
+ function Ds(a, e) {
2042
+ const t = /* @__PURE__ */ new Map();
2043
+ for (const d of e) {
2044
+ const h = vt(d?.period, a.sport), u = T(d?.homeScore), f = T(d?.awayScore);
2045
+ if (!h || u === null || f === null) return null;
2046
+ const g = t.get(h) || { home: 0, away: 0 };
2047
+ t.set(h, { home: Math.max(g.home, u), away: Math.max(g.away, f) });
2048
+ }
2049
+ const s = Math.max(...t.keys()), r = Array.from({ length: s }, (d, h) => ({ period: h + 1, ...t.get(h + 1) || { home: 0, away: 0 } })), o = (d) => ({
2050
+ home: d.filter((h) => h.home > h.away).length,
2051
+ away: d.filter((h) => h.away > h.home).length
2052
+ }), n = T(a.homeScore) ?? 0, i = T(a.awayScore) ?? 0, l = o(r), p = o(r.slice(0, -1));
2053
+ return {
2054
+ periods: r,
2055
+ reconciled: l.home === n && l.away === i,
2056
+ consistent: p.home <= n && p.away <= i
2057
+ };
2058
+ }
2059
+ function Rs(a) {
2060
+ return (Array.isArray(a?.scoringPlays) ? a.scoringPlays : []).some((t) => String(t?.description ?? "").trim() !== "");
2061
+ }
2062
+ function zs(a) {
2040
2063
  if (Array.isArray(a?.periodScores) && a.periodScores.length) return a.periodScores;
2041
2064
  const e = Bs(a);
2042
2065
  return e ? a.state === "final" ? e.reconciled ? e.periods : null : e.consistent ? e.periods : null : null;
2043
2066
  }
2044
- const Rs = y`
2067
+ const Ns = b`
2045
2068
  .breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
2046
2069
  .breadcrumbs a { text-decoration: none; }
2047
2070
  .scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
@@ -2097,8 +2120,8 @@ const Rs = y`
2097
2120
  .cols { grid-template-columns: 1fr; }
2098
2121
  }
2099
2122
  `;
2100
- class vt extends w {
2101
- static styles = [...U, Rs];
2123
+ class $t extends w {
2124
+ static styles = [...H, Ns];
2102
2125
  static properties = {
2103
2126
  ...w.properties,
2104
2127
  gameId: { type: String, attribute: "game-id" },
@@ -2118,7 +2141,7 @@ class vt extends w {
2118
2141
  super(), this.gameId = "", this.searchApi = "", this.embed = !1;
2119
2142
  }
2120
2143
  async fetchData(e) {
2121
- const t = await e.getGame(this.gameId), s = Array.isArray(t.coverageUrls) ? t.coverageUrls : [], [r, o, n, i, c, p] = await Promise.all([
2144
+ const t = await e.getGame(this.gameId), s = Array.isArray(t.coverageUrls) ? t.coverageUrls : [], [r, o, n, i, l, p] = await Promise.all([
2122
2145
  e.listSchools(),
2123
2146
  e.listTeams({ sport: t.sport }),
2124
2147
  e.listConferences(),
@@ -2128,7 +2151,7 @@ class vt extends w {
2128
2151
  // links (fetchCoverage already degrades per-URL index misses).
2129
2152
  // The embed drops the Coverage grid, so it skips the search
2130
2153
  // round-trip entirely rather than fetching cards it will not render.
2131
- s.length && !this.embed ? vs(this.searchApi, s).catch(() => s.map(it)) : Promise.resolve([])
2154
+ s.length && !this.embed ? $s(this.searchApi, s).catch(() => s.map(lt)) : Promise.resolve([])
2132
2155
  ]);
2133
2156
  return {
2134
2157
  game: t,
@@ -2136,32 +2159,32 @@ class vt extends w {
2136
2159
  teams: o.items,
2137
2160
  conferences: n.items,
2138
2161
  rankings: i.items,
2139
- games: c.items,
2162
+ games: l.items,
2140
2163
  coverage: p
2141
2164
  };
2142
2165
  }
2143
2166
  get ctx() {
2144
2167
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
2145
- teamsById: b(this.data.teams),
2146
- schoolsById: b(this.data.schools),
2147
- records: Q(this.data.games),
2168
+ teamsById: y(this.data.teams),
2169
+ schoolsById: y(this.data.schools),
2170
+ records: Z(this.data.games),
2148
2171
  rankings: this.data.rankings,
2149
- hrefs: O(this),
2172
+ hrefs: U(this),
2150
2173
  sport: this.data.game.sport
2151
2174
  }, this._ctxData = this.data), this._ctx;
2152
2175
  }
2153
2176
  renderView() {
2154
2177
  const e = this.data.game;
2155
- if (!e) return l`<div class="view"><p class="empty">Game not found.</p></div>`;
2156
- const t = this.ctx, s = b(this.data.conferences), r = t.teamsById[e.awayTeamId] ? t.schoolsById[t.teamsById[e.awayTeamId].schoolId] : null, o = t.teamsById[e.homeTeamId] ? t.schoolsById[t.teamsById[e.homeTeamId].schoolId] : null, n = ne(e), i = (d) => e.state === "final" && n !== d && n !== "tie" ? "opacity:0.45" : "", c = e.conferenceId ? s[e.conferenceId] : null, p = this.data.games.filter((d) => d.id !== e.id && d.state === "final" && d.gameType !== "scrimmage" && (d.homeTeamId === e.homeTeamId && d.awayTeamId === e.awayTeamId || d.homeTeamId === e.awayTeamId && d.awayTeamId === e.homeTeamId));
2157
- return l`
2158
- ${B(this, l`
2159
- ${D(this)}
2160
- ${this.embed ? m : l`
2178
+ if (!e) return c`<div class="view"><p class="empty">Game not found.</p></div>`;
2179
+ const t = this.ctx, s = y(this.data.conferences), r = t.teamsById[e.awayTeamId] ? t.schoolsById[t.teamsById[e.awayTeamId].schoolId] : null, o = t.teamsById[e.homeTeamId] ? t.schoolsById[t.teamsById[e.homeTeamId].schoolId] : null, n = ne(e), i = (d) => e.state === "final" && n !== d && n !== "tie" ? "opacity:0.45" : "", l = e.conferenceId ? s[e.conferenceId] : null, p = this.data.games.filter((d) => d.id !== e.id && d.state === "final" && d.gameType !== "scrimmage" && (d.homeTeamId === e.homeTeamId && d.awayTeamId === e.awayTeamId || d.homeTeamId === e.awayTeamId && d.awayTeamId === e.homeTeamId));
2180
+ return c`
2181
+ ${D(this, c`
2182
+ ${R(this)}
2183
+ ${this.embed ? m : c`
2161
2184
  <p class="breadcrumbs">
2162
2185
  <a href=${v(t.hrefs.section, { sport: e.sport, view: "scores" })}>${k(e.sport)}</a> /
2163
2186
  <a href=${v(t.hrefs.section, { sport: e.sport, view: "scores" })}>Scores/Schedules</a> /
2164
- ${z(t, e.awayTeamId)} at ${z(t, e.homeTeamId)}
2187
+ ${N(t, e.awayTeamId)} at ${N(t, e.homeTeamId)}
2165
2188
  </p>`}
2166
2189
  <div class="card">
2167
2190
  <div class="scorehead">
@@ -2172,39 +2195,39 @@ class vt extends w {
2172
2195
  <span class="mut" style="font-size:1.6rem">–</span>
2173
2196
  <span style=${i("home")}>${e.homeScore}</span>
2174
2197
  </div>
2175
- <div class="status">${V(e)}</div>
2176
- <div class="status">${x(e.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${e.state === "scheduled" && e.time ? l` · ${$e(e.time)}` : m} · ${e.venue || "Venue TBD"}
2177
- ${e.broadcast ? l` · <span class="pill class">${e.broadcast}</span>` : m}</div>
2198
+ <div class="status">${K(e)}</div>
2199
+ <div class="status">${x(e.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${e.state === "scheduled" && e.time ? c` · ${$e(e.time)}` : m} · ${e.venue || "Venue TBD"}
2200
+ ${e.broadcast ? c` · <span class="pill class">${e.broadcast}</span>` : m}</div>
2178
2201
  <div class="status">
2179
- <span class="pill type">${e.gameType === "conference" ? `${c?.name || "Conference"} game` : e.gameType}</span>
2180
- ${e.label ? l`<span class="pill type">Bracket ${e.label}</span>` : m}
2181
- ${(e.tags || []).map((d) => l`<span class="pill type">${d}</span>`)}
2202
+ <span class="pill type">${e.gameType === "conference" ? `${l?.name || "Conference"} game` : e.gameType}</span>
2203
+ ${e.label ? c`<span class="pill type">Bracket ${e.label}</span>` : m}
2204
+ ${(e.tags || []).map((d) => c`<span class="pill type">${d}</span>`)}
2182
2205
  </div>
2183
- ${this.embed ? m : l`
2206
+ ${this.embed ? m : c`
2184
2207
  <div class="status">
2185
- <a href=${Je(t.hrefs, e.id)}>Report a score for this game</a>
2208
+ <a href=${Xe(t.hrefs, e.id)}>Report a score for this game</a>
2186
2209
  </div>`}
2187
2210
  </div>
2188
2211
  ${this.teamBlock(t, e, e.homeTeamId, o, !0)}
2189
2212
  </div>
2190
2213
  ${this.renderLineScore(e, r, o)}
2191
2214
  ${this.renderScoringPlays(e, r, o)}
2192
- ${e.notes ? l`<p class="note gamenote">${e.notes}</p>` : m}
2215
+ ${e.notes ? c`<p class="note gamenote">${e.notes}</p>` : m}
2193
2216
  </div>
2194
- ${this.embed ? l`
2217
+ ${this.embed ? c`
2195
2218
  <p class="fullbox">
2196
2219
  <a href=${v(t.hrefs.game, { sport: e.sport, id: e.id })}>Full box score &rarr;</a>
2197
- </p>` : l`
2198
- ${(this.data.coverage || []).length ? l`
2220
+ </p>` : c`
2221
+ ${(this.data.coverage || []).length ? c`
2199
2222
  <div class="section-title">Coverage</div>
2200
2223
  <div class="covgrid">
2201
- ${this.data.coverage.map((d) => l`
2224
+ ${this.data.coverage.map((d) => c`
2202
2225
  <a class="card covcard" href=${d.uri}>
2203
- ${d.image ? l`<img class="covimg" src=${d.image} alt="" loading="lazy" />` : m}
2226
+ ${d.image ? c`<img class="covimg" src=${d.image} alt="" loading="lazy" />` : m}
2204
2227
  <div class="covbody">
2205
- <div class="covtitle">${d.videoDuration ? l`<span class="pill live" style="animation:none">Video</span> ` : m}${d.photos ? l`<span class="pill live" style="animation:none">Photos</span> ` : m}${d.title || d.uri}</div>
2206
- ${d.description ? l`<p class="covdesc">${d.description}</p>` : m}
2207
- ${d.author || d.publishedTime ? l`
2228
+ <div class="covtitle">${d.videoDuration ? c`<span class="pill live" style="animation:none">Video</span> ` : m}${d.photos ? c`<span class="pill live" style="animation:none">Photos</span> ` : m}${d.title || d.uri}</div>
2229
+ ${d.description ? c`<p class="covdesc">${d.description}</p>` : m}
2230
+ ${d.author || d.publishedTime ? c`
2208
2231
  <div class="covmeta">${[d.author, d.publishedTime ? new Date(d.publishedTime).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : ""].filter(Boolean).join(" · ")}</div>
2209
2232
  ` : m}
2210
2233
  </div>
@@ -2215,12 +2238,12 @@ class vt extends w {
2215
2238
  <div class="cols">
2216
2239
  ${[[e.awayTeamId, r], [e.homeTeamId, o]].map(([d, h]) => this.renderContext(t, d, h))}
2217
2240
  </div>
2218
- ${p.length ? l`
2241
+ ${p.length ? c`
2219
2242
  <div class="section-title">Head to head this season</div>
2220
2243
  <div class="card"><ul class="gamelist">
2221
- ${p.map((d) => l`<li>
2222
- <span class="d">${x(d.date)}</span>${V(d)}
2223
- <span class="opp">${z(t, d.awayTeamId)} ${d.awayScore}, ${z(t, d.homeTeamId)} ${d.homeScore}</span>
2244
+ ${p.map((d) => c`<li>
2245
+ <span class="d">${x(d.date)}</span>${K(d)}
2246
+ <span class="opp">${N(t, d.awayTeamId)} ${d.awayScore}, ${N(t, d.homeTeamId)} ${d.homeScore}</span>
2224
2247
  <a class="box" href=${v(t.hrefs.game, { sport: e.sport, id: d.id })}>Box score →</a>
2225
2248
  </li>`)}
2226
2249
  </ul></div>` : m}`}
@@ -2228,48 +2251,47 @@ class vt extends w {
2228
2251
  `;
2229
2252
  }
2230
2253
  teamBlock(e, t, s, r, o) {
2231
- if (!r) return l`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
2232
- const n = e.teamsById[s], i = e.records[s], c = te(r, 58);
2233
- return l`
2254
+ if (!r) return c`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
2255
+ const n = e.teamsById[s], i = e.records[s], l = te(r, 58);
2256
+ return c`
2234
2257
  <div class="teamblock ${o ? "right" : ""}">
2235
- ${c ? l`<img class="crest logo" alt="" loading="lazy" src=${c} />` : l`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${ee(r.colorPrimary || "#030711")}">${ye(r)}</span>`}
2258
+ ${l ? c`<img class="crest logo" alt="" loading="lazy" src=${l} />` : c`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${ee(r.colorPrimary || "#030711")}">${be(r)}</span>`}
2236
2259
  <div>
2237
2260
  <div class="tname">${ke(e, s, t.date)}<a href=${v(e.hrefs.school, { id: r.id })}>${r.name}</a></div>
2238
- <div class="trec">${r.mascot || ""} · ${S(i)}${n?.conferenceId ? l` · ${S(i, !0)} conf` : m}</div>
2261
+ <div class="trec">${r.mascot || ""} · ${S(i)}${n?.conferenceId ? c` · ${S(i, !0)} conf` : m}</div>
2239
2262
  </div>
2240
2263
  </div>
2241
2264
  `;
2242
2265
  }
2243
2266
  renderLineScore(e, t, s) {
2244
- const r = Ds(e);
2267
+ const r = zs(e);
2245
2268
  if (!r)
2246
- return e.state === "scheduled" ? l`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>` : m;
2247
- const o = Math.max(_e(e.sport), ...r.map((p) => p.period)), n = (p) => Es(e.sport, p), i = (p, d) => {
2269
+ return e.state === "scheduled" ? c`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>` : m;
2270
+ const o = Math.max(Ae(e.sport), ...r.map((p) => p.period)), n = (p) => Ps(e.sport, p), i = (p, d) => {
2248
2271
  const h = r.find((u) => u.period === d);
2249
2272
  return h ? h[p] : e.state === "final" ? 0 : "·";
2250
- }, c = (p, d, h) => l`
2273
+ }, l = (p, d, h) => c`
2251
2274
  <tr>
2252
- <td class="teamcell">${P(p, 20)}${p?.abbr || "TBD"}</td>
2253
- ${Array.from({ length: o }, (u, f) => l`<td class="num">${i(d, f + 1)}</td>`)}
2275
+ <td class="teamcell">${B(p, 20)}${p?.abbr || "TBD"}</td>
2276
+ ${Array.from({ length: o }, (u, f) => c`<td class="num">${i(d, f + 1)}</td>`)}
2254
2277
  <td class="num" style="font-weight:700">${h}</td>
2255
2278
  </tr>`;
2256
- return l`
2279
+ return c`
2257
2280
  <div class="tablewrap" style="border-top:1px solid var(--hsot-gray-2)">
2258
2281
  <table class="data" style="max-width:560px;margin:0.6rem auto 0.9rem">
2259
- <thead><tr><th>Team</th>${Array.from({ length: o }, (p, d) => l`<th class="num">${n(d + 1)}</th>`)}<th class="num">T</th></tr></thead>
2282
+ <thead><tr><th>Team</th>${Array.from({ length: o }, (p, d) => c`<th class="num">${n(d + 1)}</th>`)}<th class="num">T</th></tr></thead>
2260
2283
  <tbody>
2261
- ${c(t, "away", e.awayScore)}
2262
- ${c(s, "home", e.homeScore)}
2284
+ ${l(t, "away", e.awayScore)}
2285
+ ${l(s, "home", e.homeScore)}
2263
2286
  </tbody>
2264
2287
  </table>
2265
2288
  </div>
2266
2289
  `;
2267
2290
  }
2268
2291
  renderScoringPlays(e, t, s) {
2269
- const r = Array.isArray(e.scoringPlays) ? e.scoringPlays : [];
2270
- if (!r.length) return m;
2271
- const o = (n) => [n.period, n.clock].filter(Boolean).join(" ");
2272
- return l`
2292
+ if (!Rs(e)) return m;
2293
+ const r = e.scoringPlays, o = (n) => [n.period, n.clock].filter(Boolean).join(" ");
2294
+ return c`
2273
2295
  <div class="plays">
2274
2296
  <div class="plays-title">Scoring plays</div>
2275
2297
  <div class="tablewrap">
@@ -2279,7 +2301,7 @@ class vt extends w {
2279
2301
  <th class="num">${t?.abbr || "Away"}</th><th class="num">${s?.abbr || "Home"}</th>
2280
2302
  </tr></thead>
2281
2303
  <tbody>
2282
- ${r.map((n) => l`<tr>
2304
+ ${r.map((n) => c`<tr>
2283
2305
  <td class="when">${o(n) || "·"}</td>
2284
2306
  <td class="play">${n.description || "·"}</td>
2285
2307
  <td class="num">${n.awayScore}</td>
@@ -2294,23 +2316,23 @@ class vt extends w {
2294
2316
  renderContext(e, t, s) {
2295
2317
  if (!s) return m;
2296
2318
  const r = e.records[t], o = we(this.data.games, t);
2297
- return l`
2319
+ return c`
2298
2320
  <div class="card ctxcard">
2299
- <div class="who">${P(s)}${s.name}</div>
2321
+ <div class="who">${B(s)}${s.name}</div>
2300
2322
  <div class="row">
2301
2323
  <span>Last 5: ${Se(e, t)}</span>
2302
2324
  <span>Streak: <b>${r ? ie(r.results) : "·"}</b></span>
2303
2325
  <span>PF/PA: <b>${r ? `${r.pf} / ${r.pa}` : "·"}</b></span>
2304
- <span>Next: ${o ? l`${x(o.date, { month: "numeric", day: "numeric" })}
2326
+ <span>Next: ${o ? c`${x(o.date, { month: "numeric", day: "numeric" })}
2305
2327
  ${o.homeTeamId === t ? "vs" : "at"} ${se(e, o.homeTeamId === t ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
2306
2328
  </div>
2307
2329
  </div>
2308
2330
  `;
2309
2331
  }
2310
2332
  }
2311
- globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", vt);
2312
- const zs = 250, Ns = 2;
2313
- class $t extends N {
2333
+ globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", $t);
2334
+ const Ms = 250, Fs = 2;
2335
+ class yt extends M {
2314
2336
  static properties = {
2315
2337
  api: { type: String },
2316
2338
  schoolHref: { type: String, attribute: "school-href" },
@@ -2321,7 +2343,7 @@ class $t extends N {
2321
2343
  activeIndex: { state: !0 },
2322
2344
  searched: { state: !0 }
2323
2345
  };
2324
- static styles = y`
2346
+ static styles = b`
2325
2347
  :host {
2326
2348
  display: block;
2327
2349
  position: relative;
@@ -2390,11 +2412,11 @@ class $t extends N {
2390
2412
  }
2391
2413
  onInput(e) {
2392
2414
  const t = e.target.value.trim();
2393
- if (clearTimeout(this.debounceTimer), t.length < Ns) {
2415
+ if (clearTimeout(this.debounceTimer), t.length < Fs) {
2394
2416
  this.abortController?.abort(), this.results = [], this.open = !1, this.searched = !1;
2395
2417
  return;
2396
2418
  }
2397
- this.debounceTimer = setTimeout(() => this.search(t), zs);
2419
+ this.debounceTimer = setTimeout(() => this.search(t), Ms);
2398
2420
  }
2399
2421
  async search(e) {
2400
2422
  this.abortController?.abort(), this.abortController = new AbortController();
@@ -2442,7 +2464,7 @@ class $t extends N {
2442
2464
  const s = this.where(e), r = (o) => {
2443
2465
  o.preventDefault(), this.go(e);
2444
2466
  };
2445
- return l`
2467
+ return c`
2446
2468
  <li
2447
2469
  id="school-option-${t}"
2448
2470
  role="option"
@@ -2453,13 +2475,13 @@ class $t extends N {
2453
2475
  }}"
2454
2476
  >
2455
2477
  <span class="name">${e.name}</span>
2456
- ${s ? l`<span class="where">${s}</span>` : m}
2478
+ ${s ? c`<span class="where">${s}</span>` : m}
2457
2479
  </li>
2458
2480
  `;
2459
2481
  }
2460
2482
  renderListbox() {
2461
- const e = this.searched && !this.results.length, t = l`<li class="empty">No schools found</li>`;
2462
- return l`
2483
+ const e = this.searched && !this.results.length, t = c`<li class="empty">No schools found</li>`;
2484
+ return c`
2463
2485
  <ul id="school-search-listbox" role="listbox" aria-label="Schools">
2464
2486
  ${this.results.map((s, r) => this.renderOption(s, r))}
2465
2487
  ${e ? t : m}
@@ -2468,7 +2490,7 @@ class $t extends N {
2468
2490
  }
2469
2491
  render() {
2470
2492
  const e = this.activeIndex >= 0 ? `school-option-${this.activeIndex}` : "";
2471
- return l`
2493
+ return c`
2472
2494
  <input
2473
2495
  type="text"
2474
2496
  role="combobox"
@@ -2487,37 +2509,37 @@ class $t extends N {
2487
2509
  `;
2488
2510
  }
2489
2511
  }
2490
- globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", $t);
2512
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", yt);
2491
2513
  function bt(a, e) {
2492
- const t = new Map(a.map((c) => [c.id, c])), s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
2493
- for (const c of e || [])
2494
- c.outcome === "winner" && (s.has(c.targetGameId) || s.set(c.targetGameId, []), s.get(c.targetGameId).push(c), r.has(c.sourceGameId) || r.set(c.sourceGameId, []), r.get(c.sourceGameId).push(c));
2495
- const o = a.filter((c) => !r.has(c.id)), n = (c) => c.targetSlot === "home" ? 0 : 1;
2496
- function i(c) {
2497
- const p = t.get(c);
2514
+ const t = new Map(a.map((l) => [l.id, l])), s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
2515
+ for (const l of e || [])
2516
+ l.outcome === "winner" && (s.has(l.targetGameId) || s.set(l.targetGameId, []), s.get(l.targetGameId).push(l), r.has(l.sourceGameId) || r.set(l.sourceGameId, []), r.get(l.sourceGameId).push(l));
2517
+ const o = a.filter((l) => !r.has(l.id)), n = (l) => l.targetSlot === "home" ? 0 : 1;
2518
+ function i(l) {
2519
+ const p = t.get(l);
2498
2520
  if (!p) return null;
2499
- const h = [...s.get(c) || []].sort((u, f) => n(u) - n(f)).map((u) => i(u.sourceGameId)).filter(Boolean);
2521
+ const h = [...s.get(l) || []].sort((u, f) => n(u) - n(f)).map((u) => i(u.sourceGameId)).filter(Boolean);
2500
2522
  return { game: p, children: h, bracketGroup: p.bracketGroup };
2501
2523
  }
2502
- return o.length === 1 ? i(o[0].id) : o.map((c) => i(c.id));
2524
+ return o.length === 1 ? i(o[0].id) : o.map((l) => i(l.id));
2503
2525
  }
2504
- function yt(a, e = [], t = 0) {
2526
+ function wt(a, e = [], t = 0) {
2505
2527
  if (!a) return e;
2506
2528
  e[t] || (e[t] = []), e[t].push(a.game);
2507
- for (const s of a.children || []) yt(s, e, t + 1);
2529
+ for (const s of a.children || []) wt(s, e, t + 1);
2508
2530
  return e;
2509
2531
  }
2510
- const Fs = (a) => Math.max(1, Math.round(Math.log2(a || 2)));
2511
- function Ms({ round: a, perGroup: e, groupCount: t = 1 }) {
2512
- const s = Fs(e), o = (t === 4 ? s + 2 : t === 2 ? s + 1 : s) - a;
2532
+ const Os = (a) => Math.max(1, Math.round(Math.log2(a || 2)));
2533
+ function Us({ round: a, perGroup: e, groupCount: t = 1 }) {
2534
+ const s = Os(e), o = (t === 4 ? s + 2 : t === 2 ? s + 1 : s) - a;
2513
2535
  return o === 0 ? t > 1 ? "Championship" : "Final" : o === 1 ? "Semifinal" : `Round ${a}`;
2514
2536
  }
2515
- function Os(a) {
2537
+ function Hs(a) {
2516
2538
  if (!a || !a.length) return "setup";
2517
2539
  const e = Math.max(...a.map((s) => s.round ?? 0)), t = a.filter((s) => (s.round ?? 0) === e);
2518
2540
  return t.length && t.every((s) => s.state === "final") ? "complete" : a.some((s) => s.state !== "scheduled" || s.homeScore || s.awayScore || s.round === 1 && (s.homeTeamId || s.awayTeamId)) ? "active" : "setup";
2519
2541
  }
2520
- function Us(a, e) {
2542
+ function Ls(a, e) {
2521
2543
  const t = a?.groupNames || [];
2522
2544
  if (t.length >= 2) {
2523
2545
  const r = t.map((o) => ({ key: o, name: o }));
@@ -2526,23 +2548,23 @@ function Us(a, e) {
2526
2548
  const s = [...new Set((e || []).map((r) => r.bracketGroup).filter(Boolean))];
2527
2549
  return [{ key: null, name: s.length === 1 ? s[0] : "Bracket" }];
2528
2550
  }
2529
- const Hs = (a, e) => e?.key == null ? [...a || []] : (a || []).filter((t) => t.bracketGroup === e.key), Le = (a) => {
2551
+ const Gs = (a, e) => e?.key == null ? [...a || []] : (a || []).filter((t) => t.bracketGroup === e.key), Ge = (a) => {
2530
2552
  const e = /(\d+)\s*$/.exec(a.label || "");
2531
2553
  return e ? Number(e[1]) : 1 / 0;
2532
- }, Ge = (a, e) => Le(a) - Le(e) || String(a.id).localeCompare(String(e.id));
2533
- function Ls(a, e) {
2554
+ }, je = (a, e) => Ge(a) - Ge(e) || String(a.id).localeCompare(String(e.id));
2555
+ function js(a, e) {
2534
2556
  if (a.every((r) => Number.isInteger(r.round))) return (r) => r.round;
2535
2557
  const t = bt(a, e), s = /* @__PURE__ */ new Map();
2536
2558
  for (const r of Array.isArray(t) ? t : [t]) {
2537
- const o = yt(r), n = o.length - 1;
2538
- o.forEach((i, c) => i.forEach((p) => s.set(p.id, n - c + 1)));
2559
+ const o = wt(r), n = o.length - 1;
2560
+ o.forEach((i, l) => i.forEach((p) => s.set(p.id, n - l + 1)));
2539
2561
  }
2540
2562
  return (r) => Number.isInteger(r.round) ? r.round : s.get(r.id) || 1;
2541
2563
  }
2542
- function Gs(a, e, t) {
2543
- const s = Hs(a, t);
2564
+ function qs(a, e, t) {
2565
+ const s = Gs(a, t);
2544
2566
  if (!s.length) return [];
2545
- const r = Ls(a || [], e || []), o = /* @__PURE__ */ new Map();
2567
+ const r = js(a || [], e || []), o = /* @__PURE__ */ new Map();
2546
2568
  for (const p of s) {
2547
2569
  const d = r(p);
2548
2570
  o.has(d) || o.set(d, []), o.get(d).push(p);
@@ -2551,37 +2573,37 @@ function Gs(a, e, t) {
2551
2573
  for (const p of e || [])
2552
2574
  p.outcome === "winner" && (n.has(p.targetGameId) || n.set(p.targetGameId, []), n.get(p.targetGameId).push(p.sourceGameId));
2553
2575
  const i = [];
2554
- let c = null;
2576
+ let l = null;
2555
2577
  for (const p of [...o.keys()].sort((d, h) => d - h)) {
2556
2578
  let d = [...o.get(p)];
2557
- if (c) {
2579
+ if (l) {
2558
2580
  const h = (u) => {
2559
- const f = (n.get(u.id) || []).map((g) => c.get(g)).filter((g) => g !== void 0);
2581
+ const f = (n.get(u.id) || []).map((g) => l.get(g)).filter((g) => g !== void 0);
2560
2582
  return f.length ? Math.min(...f) : 1 / 0;
2561
2583
  };
2562
- d.sort((u, f) => h(u) - h(f) || Ge(u, f));
2584
+ d.sort((u, f) => h(u) - h(f) || je(u, f));
2563
2585
  } else
2564
- d.sort(Ge);
2565
- c = new Map(d.map((h, u) => [h.id, u])), i.push({ round: p, games: d });
2586
+ d.sort(je);
2587
+ l = new Map(d.map((h, u) => [h.id, u])), i.push({ round: p, games: d });
2566
2588
  }
2567
2589
  return i;
2568
2590
  }
2569
- function js(a, e, t) {
2591
+ function Ws(a, e, t) {
2570
2592
  const s = a[`${e}TeamId`] || null, r = (t || []).find((n) => n.gameId === a.id && n.slot === e), o = a[`${e}Seed`] ?? r?.seed ?? null;
2571
2593
  return { teamId: s, seed: o, bye: !s && !!r?.isBye };
2572
2594
  }
2573
- function wt(a) {
2595
+ function xt(a) {
2574
2596
  const e = ne(a);
2575
2597
  return e === "home" || e === "away" ? e : null;
2576
2598
  }
2577
- function qs(a, e) {
2599
+ function Vs(a, e) {
2578
2600
  const t = bt(a || [], e || []);
2579
2601
  if (!t || Array.isArray(t)) return null;
2580
- const s = wt(t.game);
2602
+ const s = xt(t.game);
2581
2603
  return s && t.game[`${s}TeamId`] || null;
2582
2604
  }
2583
- const je = { active: 0, setup: 1, complete: 2 };
2584
- function Ws(a, { id: e, param: t } = {}) {
2605
+ const qe = { active: 0, setup: 1, complete: 2 };
2606
+ function Ks(a, { id: e, param: t } = {}) {
2585
2607
  const s = a || [];
2586
2608
  if (!s.length) return null;
2587
2609
  for (const r of [e, t]) {
@@ -2589,9 +2611,9 @@ function Ws(a, { id: e, param: t } = {}) {
2589
2611
  const o = s.find((n) => n.id === r);
2590
2612
  if (o) return o;
2591
2613
  }
2592
- return [...s].sort((r, o) => (je[r.status] ?? 3) - (je[o.status] ?? 3) || String(r.name || "").localeCompare(String(o.name || "")))[0];
2614
+ return [...s].sort((r, o) => (qe[r.status] ?? 3) - (qe[o.status] ?? 3) || String(r.name || "").localeCompare(String(o.name || "")))[0];
2593
2615
  }
2594
- const Vs = y`
2616
+ const Ys = b`
2595
2617
  .bracket { display: flex; gap: 1rem; align-items: stretch; overflow-x: auto; padding-bottom: 0.5rem; }
2596
2618
  .round { flex: 0 0 250px; display: flex; flex-direction: column; min-width: 0; }
2597
2619
  .roundhead {
@@ -2637,8 +2659,8 @@ const Vs = y`
2637
2659
  .champ .tname a { color: inherit; text-decoration: none; font-weight: 700; }
2638
2660
  @media (max-width: 720px) { .round { flex-basis: 215px; } }
2639
2661
  `;
2640
- class xt extends w {
2641
- static styles = [U, Vs];
2662
+ class kt extends w {
2663
+ static styles = [H, Ys];
2642
2664
  static properties = {
2643
2665
  ...w.properties,
2644
2666
  sport: { type: String },
@@ -2651,9 +2673,9 @@ class xt extends w {
2651
2673
  super(), this.sport = "football", this.season = "", this.tournamentId = "", this.picked = "", this.group = null;
2652
2674
  }
2653
2675
  async fetchData(e) {
2654
- const t = this.season || Y(), s = (await e.listTournaments({ sport: this.sport, season: t })).items, r = new URLSearchParams(globalThis.location?.search || "").get("tournament"), o = Ws(s, { id: this.picked || this.tournamentId, param: r });
2676
+ const t = this.season || Q(), s = (await e.listTournaments({ sport: this.sport, season: t })).items, r = new URLSearchParams(globalThis.location?.search || "").get("tournament"), o = Ks(s, { id: this.picked || this.tournamentId, param: r });
2655
2677
  if (!o) return { season: t, tournaments: s, tournament: null };
2656
- const [n, i, c, p, d] = await Promise.all([
2678
+ const [n, i, l, p, d] = await Promise.all([
2657
2679
  e.listSeedings(o.id),
2658
2680
  e.listEdges(o.id),
2659
2681
  e.listGames({ tournamentId: o.id }),
@@ -2666,18 +2688,18 @@ class xt extends w {
2666
2688
  tournament: o,
2667
2689
  seedings: n.items,
2668
2690
  edges: i.items,
2669
- games: c.items,
2691
+ games: l.items,
2670
2692
  schools: p.items,
2671
2693
  teams: d.items
2672
2694
  };
2673
2695
  }
2674
2696
  get ctx() {
2675
2697
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
2676
- teamsById: b(this.data.teams),
2677
- schoolsById: b(this.data.schools),
2698
+ teamsById: y(this.data.teams),
2699
+ schoolsById: y(this.data.schools),
2678
2700
  records: {},
2679
2701
  rankings: [],
2680
- hrefs: O(this),
2702
+ hrefs: U(this),
2681
2703
  sport: this.sport
2682
2704
  }, this._ctxData = this.data), this._ctx;
2683
2705
  }
@@ -2695,29 +2717,29 @@ class xt extends w {
2695
2717
  }
2696
2718
  renderView() {
2697
2719
  const e = this.data, t = this.ctx, s = le(this, t, {
2698
- title: l`${k(this.sport)} playoff brackets`,
2699
- sub: e.tournament ? l`${e.tournament.name} · ${e.season} season` : l`${e.season} season`,
2720
+ title: c`${k(this.sport)} playoff brackets`,
2721
+ sub: e.tournament ? c`${e.tournament.name} · ${e.season} season` : c`${e.season} season`,
2700
2722
  teams: e.teams
2701
2723
  });
2702
2724
  if (!e.tournament)
2703
- return l`${s}${B(this, l`
2704
- ${D(this)}
2725
+ return c`${s}${D(this, c`
2726
+ ${R(this)}
2705
2727
  <div class="card"><div class="empty">No ${this.sport} brackets have been published for the ${e.season} season yet.</div></div>
2706
2728
  `)}`;
2707
- const r = Us(e.tournament, e.games), o = r.find((h) => h.key === this.group) || r[0], n = (e.tournament.groupNames || []).length >= 2 ? e.tournament.groupNames.length : 1, i = (Number(e.tournament.size) || 0) / n, c = Gs(e.games, e.edges, o), p = Os(e.games), d = qs(e.games, e.edges);
2708
- return l`
2729
+ const r = Ls(e.tournament, e.games), o = r.find((h) => h.key === this.group) || r[0], n = (e.tournament.groupNames || []).length >= 2 ? e.tournament.groupNames.length : 1, i = (Number(e.tournament.size) || 0) / n, l = qs(e.games, e.edges, o), p = Hs(e.games), d = Vs(e.games, e.edges);
2730
+ return c`
2709
2731
  ${s}
2710
- ${B(this, l`
2711
- ${D(this)}
2732
+ ${D(this, c`
2733
+ ${R(this)}
2712
2734
  <div class="toolbar">
2713
- ${e.tournaments.length > 1 ? l`
2735
+ ${e.tournaments.length > 1 ? c`
2714
2736
  <div role="group" aria-label="Tournament">
2715
- ${e.tournaments.map((h) => l`<button class="chip ${h.id === e.tournament.id ? "on" : ""}"
2737
+ ${e.tournaments.map((h) => c`<button class="chip ${h.id === e.tournament.id ? "on" : ""}"
2716
2738
  @click=${() => this.pick(h.id)}>${h.name}</button>`)}
2717
2739
  </div>` : m}
2718
- ${r.length > 1 ? l`
2740
+ ${r.length > 1 ? c`
2719
2741
  <div role="tablist" aria-label="Bracket group">
2720
- ${r.map((h) => l`<button class="chip ${h.key === o.key ? "on" : ""}" role="tab"
2742
+ ${r.map((h) => c`<button class="chip ${h.key === o.key ? "on" : ""}" role="tab"
2721
2743
  aria-selected=${h.key === o.key ? "true" : "false"}
2722
2744
  @click=${() => {
2723
2745
  this.group = h.key;
@@ -2727,62 +2749,62 @@ class xt extends w {
2727
2749
  <span class="pill ${p === "complete" ? "final" : p === "active" ? "class" : "type"}">${p === "complete" ? "Complete" : p === "active" ? "In progress" : "Bracket set"}</span>
2728
2750
  <span class="asof">${e.tournament.size}-team ${String(e.tournament.format || "").replace(/_/g, " ")}</span>
2729
2751
  </div>
2730
- ${d ? l`<div class="champ"><span class="pill champ">Champion</span>
2731
- ${P(E(t, d), 26)}<span class="tname">${ae(t, d)}</span></div>` : m}
2732
- ${c.length ? l`
2752
+ ${d ? c`<div class="champ"><span class="pill champ">Champion</span>
2753
+ ${B(P(t, d), 26)}<span class="tname">${ae(t, d)}</span></div>` : m}
2754
+ ${l.length ? c`
2733
2755
  <div class="bracket" role="region" aria-label="${o.name} bracket">
2734
- ${c.map((h) => l`
2756
+ ${l.map((h) => c`
2735
2757
  <section class="round">
2736
- <h3 class="roundhead">${Ms({ round: h.round, perGroup: i, groupCount: n })}</h3>
2758
+ <h3 class="roundhead">${Us({ round: h.round, perGroup: i, groupCount: n })}</h3>
2737
2759
  <div class="games">${h.games.map((u) => this.renderMatchup(t, u))}</div>
2738
2760
  </section>`)}
2739
- </div>` : l`<div class="card"><div class="empty">This bracket has no games yet.</div></div>`}
2761
+ </div>` : c`<div class="card"><div class="empty">This bracket has no games yet.</div></div>`}
2740
2762
  `)}
2741
2763
  `;
2742
2764
  }
2743
2765
  renderMatchup(e, t) {
2744
2766
  const s = t.homeTeamId && t.awayTeamId || t.state === "final" || t.state === "live";
2745
- return l`
2767
+ return c`
2746
2768
  <article class="matchup ${t.state}" aria-label="${t.label || "Matchup"}">
2747
2769
  ${this.renderSlot(e, t, "home")}
2748
2770
  ${this.renderSlot(e, t, "away")}
2749
2771
  <footer class="mfoot">
2750
- ${V(t)}
2751
- ${t.label ? l`<span class="label">${t.label}</span>` : m}
2772
+ ${K(t)}
2773
+ ${t.label ? c`<span class="label">${t.label}</span>` : m}
2752
2774
  <span class="spacer"></span>
2753
- ${s ? l`<a class="box" href=${v(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score</a>` : m}
2775
+ ${s ? c`<a class="box" href=${v(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score</a>` : m}
2754
2776
  </footer>
2755
2777
  </article>
2756
2778
  `;
2757
2779
  }
2758
2780
  renderSlot(e, t, s) {
2759
- const { teamId: r, seed: o, bye: n } = js(t, s, this.data.seedings), i = wt(t), c = t.state === "live" || t.state === "final";
2760
- return l`
2781
+ const { teamId: r, seed: o, bye: n } = Ws(t, s, this.data.seedings), i = xt(t), l = t.state === "live" || t.state === "final";
2782
+ return c`
2761
2783
  <div class="slot ${i ? i === s ? "winner" : "loser" : ""}">
2762
2784
  <span class="seed">${o ?? ""}</span>
2763
- ${r ? l`${P(E(e, r), 22)}<span class="tname">${ae(e, r, t.date)}</span>` : n ? l`<span class="tname bye">Bye</span>` : l`<span class="tname mut">TBD</span>`}
2764
- ${c ? l`<span class="score">${t[`${s}Score`] ?? 0}</span>` : m}
2785
+ ${r ? c`${B(P(e, r), 22)}<span class="tname">${ae(e, r, t.date)}</span>` : n ? c`<span class="tname bye">Bye</span>` : c`<span class="tname mut">TBD</span>`}
2786
+ ${l ? c`<span class="score">${t[`${s}Score`] ?? 0}</span>` : m}
2765
2787
  </div>
2766
2788
  `;
2767
2789
  }
2768
2790
  }
2769
- globalThis?.customElements && !globalThis.customElements.get("hsot-brackets") && globalThis.customElements.define("hsot-brackets", xt);
2770
- const Ks = {
2771
- "hsot-scores": dt,
2772
- "hsot-standings": pt,
2773
- "hsot-rankings": mt,
2774
- "hsot-school": ut,
2775
- "hsot-boxscore": vt,
2776
- "hsot-school-search": $t,
2777
- "hsot-brackets": xt
2791
+ globalThis?.customElements && !globalThis.customElements.get("hsot-brackets") && globalThis.customElements.define("hsot-brackets", kt);
2792
+ const Qs = {
2793
+ "hsot-scores": pt,
2794
+ "hsot-standings": mt,
2795
+ "hsot-rankings": ut,
2796
+ "hsot-school": ft,
2797
+ "hsot-boxscore": $t,
2798
+ "hsot-school-search": yt,
2799
+ "hsot-brackets": kt
2778
2800
  };
2779
- function Ys() {
2801
+ function Zs() {
2780
2802
  const a = globalThis?.customElements;
2781
2803
  if (a)
2782
- for (const [e, t] of Object.entries(Ks))
2804
+ for (const [e, t] of Object.entries(Qs))
2783
2805
  a.get(e) || a.define(e, t);
2784
2806
  }
2785
- typeof window < "u" && globalThis.customElements && Ys();
2807
+ typeof window < "u" && globalThis.customElements && Zs();
2786
2808
  export {
2787
- Ys as defineAll
2809
+ Zs as defineAll
2788
2810
  };