@wral/hsot-data 0.1.10 → 0.1.12
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
1
|
const V = globalThis, nt = V.ShadowRoot && (V.ShadyCSS === void 0 || V.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lt = /* @__PURE__ */ Symbol(), wt = /* @__PURE__ */ new WeakMap();
|
|
2
|
-
let
|
|
2
|
+
let Nt = class {
|
|
3
3
|
constructor(t, e, s) {
|
|
4
4
|
if (this._$cssResult$ = !0, s !== lt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
5
5
|
this.cssText = t, this.t = e;
|
|
@@ -17,14 +17,14 @@ let Ft = class {
|
|
|
17
17
|
return this.cssText;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
const
|
|
20
|
+
const ae = (a) => new Nt(typeof a == "string" ? a : a + "", void 0, lt), b = (a, ...t) => {
|
|
21
21
|
const e = a.length === 1 ? a[0] : t.reduce((s, r, o) => s + ((i) => {
|
|
22
22
|
if (i._$cssResult$ === !0) return i.cssText;
|
|
23
23
|
if (typeof i == "number") return i;
|
|
24
24
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + i + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
25
25
|
})(r) + a[o + 1], a[0]);
|
|
26
|
-
return new
|
|
27
|
-
},
|
|
26
|
+
return new Nt(e, a, lt);
|
|
27
|
+
}, re = (a, t) => {
|
|
28
28
|
if (nt) a.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
29
29
|
else for (const e of t) {
|
|
30
30
|
const s = document.createElement("style"), r = V.litNonce;
|
|
@@ -33,12 +33,12 @@ const se = (a) => new Ft(typeof a == "string" ? a : a + "", void 0, lt), b = (a,
|
|
|
33
33
|
}, xt = nt ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((t) => {
|
|
34
34
|
let e = "";
|
|
35
35
|
for (const s of t.cssRules) e += s.cssText;
|
|
36
|
-
return
|
|
36
|
+
return ae(e);
|
|
37
37
|
})(a) : a;
|
|
38
|
-
const { is:
|
|
38
|
+
const { is: oe, defineProperty: ie, getOwnPropertyDescriptor: ne, getOwnPropertyNames: le, getOwnPropertySymbols: ce, getPrototypeOf: he } = Object, X = globalThis, kt = X.trustedTypes, de = kt ? kt.emptyScript : "", pe = X.reactiveElementPolyfillSupport, B = (a, t) => a, it = { toAttribute(a, t) {
|
|
39
39
|
switch (t) {
|
|
40
40
|
case Boolean:
|
|
41
|
-
a = a ?
|
|
41
|
+
a = a ? de : null;
|
|
42
42
|
break;
|
|
43
43
|
case Object:
|
|
44
44
|
case Array:
|
|
@@ -63,7 +63,7 @@ const { is: re, defineProperty: oe, getOwnPropertyDescriptor: ie, getOwnProperty
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return e;
|
|
66
|
-
} },
|
|
66
|
+
} }, Ut = (a, t) => !oe(a, t), _t = { attribute: !0, type: String, converter: it, reflect: !1, useDefault: !1, hasChanged: Ut };
|
|
67
67
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), X.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
68
|
let I = class extends HTMLElement {
|
|
69
69
|
static addInitializer(t) {
|
|
@@ -75,11 +75,11 @@ let I = class extends HTMLElement {
|
|
|
75
75
|
static createProperty(t, e = _t) {
|
|
76
76
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
77
77
|
const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
78
|
-
r !== void 0 &&
|
|
78
|
+
r !== void 0 && ie(this.prototype, t, r);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
static getPropertyDescriptor(t, e, s) {
|
|
82
|
-
const { get: r, set: o } =
|
|
82
|
+
const { get: r, set: o } = ne(this.prototype, t) ?? { get() {
|
|
83
83
|
return this[e];
|
|
84
84
|
}, set(i) {
|
|
85
85
|
this[e] = i;
|
|
@@ -94,13 +94,13 @@ let I = class extends HTMLElement {
|
|
|
94
94
|
}
|
|
95
95
|
static _$Ei() {
|
|
96
96
|
if (this.hasOwnProperty(B("elementProperties"))) return;
|
|
97
|
-
const t =
|
|
97
|
+
const t = he(this);
|
|
98
98
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
99
99
|
}
|
|
100
100
|
static finalize() {
|
|
101
101
|
if (this.hasOwnProperty(B("finalized"))) return;
|
|
102
102
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(B("properties"))) {
|
|
103
|
-
const e = this.properties, s = [...
|
|
103
|
+
const e = this.properties, s = [...le(e), ...ce(e)];
|
|
104
104
|
for (const r of s) this.createProperty(r, e[r]);
|
|
105
105
|
}
|
|
106
106
|
const t = this[Symbol.metadata];
|
|
@@ -146,7 +146,7 @@ let I = class extends HTMLElement {
|
|
|
146
146
|
}
|
|
147
147
|
createRenderRoot() {
|
|
148
148
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
149
|
-
return
|
|
149
|
+
return re(t, this.constructor.elementStyles), t;
|
|
150
150
|
}
|
|
151
151
|
connectedCallback() {
|
|
152
152
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
|
|
@@ -178,7 +178,7 @@ let I = class extends HTMLElement {
|
|
|
178
178
|
requestUpdate(t, e, s, r = !1, o) {
|
|
179
179
|
if (t !== void 0) {
|
|
180
180
|
const i = this.constructor;
|
|
181
|
-
if (r === !1 && (o = this[t]), s ??= i.getPropertyOptions(t), !((s.hasChanged ??
|
|
181
|
+
if (r === !1 && (o = this[t]), s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Ut)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
|
|
182
182
|
this.C(t, e, s);
|
|
183
183
|
}
|
|
184
184
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -246,43 +246,43 @@ let I = class extends HTMLElement {
|
|
|
246
246
|
firstUpdated(t) {
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[B("elementProperties")] = /* @__PURE__ */ new Map(), I[B("finalized")] = /* @__PURE__ */ new Map(),
|
|
250
|
-
const ct = globalThis, St = (a) => a, Y = ct.trustedTypes, At = Y ? Y.createPolicy("lit-html", { createHTML: (a) => a }) : void 0,
|
|
249
|
+
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[B("elementProperties")] = /* @__PURE__ */ new Map(), I[B("finalized")] = /* @__PURE__ */ new Map(), pe?.({ ReactiveElement: I }), (X.reactiveElementVersions ??= []).push("2.1.2");
|
|
250
|
+
const ct = globalThis, St = (a) => a, Y = ct.trustedTypes, At = Y ? Y.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ot = "$lit$", k = `lit$${Math.random().toFixed(9).slice(2)}$`, Ht = "?" + k, me = `<${Ht}>`, T = document, F = () => T.createComment(""), N = (a) => a === null || typeof a != "object" && typeof a != "function", ht = Array.isArray, fe = (a) => ht(a) || typeof a?.[Symbol.iterator] == "function", rt = `[
|
|
251
251
|
\f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, It = />/g, S = RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ct = /'/g, Et = /"/g,
|
|
253
|
-
function
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ct = /'/g, Et = /"/g, Mt = /^(?:script|style|textarea|title)$/i, Lt = (a) => (t, ...e) => ({ _$litType$: a, strings: t, values: e }), c = Lt(1), Pt = Lt(2), P = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), A = T.createTreeWalker(T, 129);
|
|
253
|
+
function jt(a, t) {
|
|
254
254
|
if (!ht(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
255
|
return At !== void 0 ? At.createHTML(t) : t;
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const ue = (a, t) => {
|
|
258
258
|
const e = a.length - 1, s = [];
|
|
259
259
|
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = R;
|
|
260
260
|
for (let n = 0; n < e; n++) {
|
|
261
261
|
const d = a[n];
|
|
262
262
|
let l, h, p = -1, f = 0;
|
|
263
|
-
for (; f < d.length && (i.lastIndex = f, h = i.exec(d), h !== null); ) f = i.lastIndex, i === R ? h[1] === "!--" ? i = Tt : h[1] !== void 0 ? i = It : h[2] !== void 0 ? (
|
|
263
|
+
for (; f < d.length && (i.lastIndex = f, h = i.exec(d), h !== null); ) f = i.lastIndex, i === R ? h[1] === "!--" ? i = Tt : h[1] !== void 0 ? i = It : h[2] !== void 0 ? (Mt.test(h[2]) && (r = RegExp("</" + h[2], "g")), i = S) : h[3] !== void 0 && (i = S) : i === S ? h[0] === ">" ? (i = r ?? R, p = -1) : h[1] === void 0 ? p = -2 : (p = i.lastIndex - h[2].length, l = h[1], i = h[3] === void 0 ? S : h[3] === '"' ? Et : Ct) : i === Et || i === Ct ? i = S : i === Tt || i === It ? i = R : (i = S, r = void 0);
|
|
264
264
|
const u = i === S && a[n + 1].startsWith("/>") ? " " : "";
|
|
265
|
-
o += i === R ? d +
|
|
265
|
+
o += i === R ? d + me : p >= 0 ? (s.push(l), d.slice(0, p) + Ot + d.slice(p) + k + u) : d + k + (p === -2 ? n : u);
|
|
266
266
|
}
|
|
267
|
-
return [
|
|
267
|
+
return [jt(a, o + (a[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
268
268
|
};
|
|
269
269
|
class U {
|
|
270
270
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
271
271
|
let r;
|
|
272
272
|
this.parts = [];
|
|
273
273
|
let o = 0, i = 0;
|
|
274
|
-
const n = t.length - 1, d = this.parts, [l, h] =
|
|
274
|
+
const n = t.length - 1, d = this.parts, [l, h] = ue(t, e);
|
|
275
275
|
if (this.el = U.createElement(l, s), A.currentNode = this.el.content, e === 2 || e === 3) {
|
|
276
276
|
const p = this.el.content.firstChild;
|
|
277
277
|
p.replaceWith(...p.childNodes);
|
|
278
278
|
}
|
|
279
279
|
for (; (r = A.nextNode()) !== null && d.length < n; ) {
|
|
280
280
|
if (r.nodeType === 1) {
|
|
281
|
-
if (r.hasAttributes()) for (const p of r.getAttributeNames()) if (p.endsWith(
|
|
281
|
+
if (r.hasAttributes()) for (const p of r.getAttributeNames()) if (p.endsWith(Ot)) {
|
|
282
282
|
const f = h[i++], u = r.getAttribute(p).split(k), $ = /([.?@])?(.*)/.exec(f);
|
|
283
|
-
d.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ?
|
|
283
|
+
d.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? ve : $[1] === "?" ? $e : $[1] === "@" ? be : tt }), r.removeAttribute(p);
|
|
284
284
|
} else p.startsWith(k) && (d.push({ type: 6, index: o }), r.removeAttribute(p));
|
|
285
|
-
if (
|
|
285
|
+
if (Mt.test(r.tagName)) {
|
|
286
286
|
const p = r.textContent.split(k), f = p.length - 1;
|
|
287
287
|
if (f > 0) {
|
|
288
288
|
r.textContent = Y ? Y.emptyScript : "";
|
|
@@ -290,7 +290,7 @@ class U {
|
|
|
290
290
|
r.append(p[f], F());
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
293
|
+
} else if (r.nodeType === 8) if (r.data === Ht) d.push({ type: 2, index: o });
|
|
294
294
|
else {
|
|
295
295
|
let p = -1;
|
|
296
296
|
for (; (p = r.data.indexOf(k, p + 1)) !== -1; ) d.push({ type: 7, index: o }), p += k.length - 1;
|
|
@@ -309,7 +309,7 @@ function D(a, t, e = a, s) {
|
|
|
309
309
|
const o = N(t) ? void 0 : t._$litDirective$;
|
|
310
310
|
return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(a), r._$AT(a, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = r : e._$Cl = r), r !== void 0 && (t = D(a, r._$AS(a, t.values), r, s)), t;
|
|
311
311
|
}
|
|
312
|
-
class
|
|
312
|
+
class ge {
|
|
313
313
|
constructor(t, e) {
|
|
314
314
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
315
315
|
}
|
|
@@ -326,7 +326,7 @@ class ue {
|
|
|
326
326
|
for (; d !== void 0; ) {
|
|
327
327
|
if (i === d.index) {
|
|
328
328
|
let l;
|
|
329
|
-
d.type === 2 ? l = new M(o, o.nextSibling, this, t) : d.type === 1 ? l = new d.ctor(o, d.name, d.strings, this, t) : d.type === 6 && (l = new
|
|
329
|
+
d.type === 2 ? l = new M(o, o.nextSibling, this, t) : d.type === 1 ? l = new d.ctor(o, d.name, d.strings, this, t) : d.type === 6 && (l = new ye(o, this, t)), this._$AV.push(l), d = s[++n];
|
|
330
330
|
}
|
|
331
331
|
i !== d?.index && (o = A.nextNode(), i++);
|
|
332
332
|
}
|
|
@@ -356,7 +356,7 @@ class M {
|
|
|
356
356
|
return this._$AB;
|
|
357
357
|
}
|
|
358
358
|
_$AI(t, e = this) {
|
|
359
|
-
t = D(this, t, e), N(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
359
|
+
t = D(this, t, e), N(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : fe(t) ? this.k(t) : this._(t);
|
|
360
360
|
}
|
|
361
361
|
O(t) {
|
|
362
362
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -368,10 +368,10 @@ class M {
|
|
|
368
368
|
this._$AH !== m && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(T.createTextNode(t)), this._$AH = t;
|
|
369
369
|
}
|
|
370
370
|
$(t) {
|
|
371
|
-
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = U.createElement(
|
|
371
|
+
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = U.createElement(jt(s.h, s.h[0]), this.options)), s);
|
|
372
372
|
if (this._$AH?._$AD === r) this._$AH.p(e);
|
|
373
373
|
else {
|
|
374
|
-
const o = new
|
|
374
|
+
const o = new ge(r, this), i = o.u(this.options);
|
|
375
375
|
o.p(e), this.T(i), this._$AH = o;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
@@ -421,7 +421,7 @@ class tt {
|
|
|
421
421
|
t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class ve extends tt {
|
|
425
425
|
constructor() {
|
|
426
426
|
super(...arguments), this.type = 3;
|
|
427
427
|
}
|
|
@@ -429,7 +429,7 @@ class ge extends tt {
|
|
|
429
429
|
this.element[this.name] = t === m ? void 0 : t;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
class
|
|
432
|
+
class $e extends tt {
|
|
433
433
|
constructor() {
|
|
434
434
|
super(...arguments), this.type = 4;
|
|
435
435
|
}
|
|
@@ -437,7 +437,7 @@ class ve extends tt {
|
|
|
437
437
|
this.element.toggleAttribute(this.name, !!t && t !== m);
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
class
|
|
440
|
+
class be extends tt {
|
|
441
441
|
constructor(t, e, s, r, o) {
|
|
442
442
|
super(t, e, s, r, o), this.type = 5;
|
|
443
443
|
}
|
|
@@ -450,7 +450,7 @@ class $e extends tt {
|
|
|
450
450
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class ye {
|
|
454
454
|
constructor(t, e, s) {
|
|
455
455
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
456
456
|
}
|
|
@@ -461,9 +461,9 @@ class be {
|
|
|
461
461
|
D(this, t);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
const
|
|
464
|
+
const we = ct.litHtmlPolyfillSupport;
|
|
465
|
+
we?.(U, M), (ct.litHtmlVersions ??= []).push("3.3.3");
|
|
466
|
+
const xe = (a, t, e) => {
|
|
467
467
|
const s = e?.renderBefore ?? t;
|
|
468
468
|
let r = s._$litPart$;
|
|
469
469
|
if (r === void 0) {
|
|
@@ -483,7 +483,7 @@ class E extends I {
|
|
|
483
483
|
}
|
|
484
484
|
update(t) {
|
|
485
485
|
const e = this.render();
|
|
486
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
486
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = xe(e, this.renderRoot, this.renderOptions);
|
|
487
487
|
}
|
|
488
488
|
connectedCallback() {
|
|
489
489
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -496,17 +496,17 @@ class E extends I {
|
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
E._$litElement$ = !0, E.finalized = !0, dt.litElementHydrateSupport?.({ LitElement: E });
|
|
499
|
-
const
|
|
500
|
-
|
|
499
|
+
const ke = dt.litElementPolyfillSupport;
|
|
500
|
+
ke?.({ LitElement: E });
|
|
501
501
|
(dt.litElementVersions ??= []).push("4.2.2");
|
|
502
|
-
const
|
|
503
|
-
function
|
|
502
|
+
const _e = 50;
|
|
503
|
+
function Se(a = {}) {
|
|
504
504
|
const t = Object.entries(a).filter(([, s]) => s != null && s !== "");
|
|
505
505
|
if (!t.length) return "";
|
|
506
506
|
const e = new URLSearchParams();
|
|
507
507
|
return t.forEach(([s, r]) => e.set(s, String(r))), `?${e.toString()}`;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Ae({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
|
|
510
510
|
if (!a) throw new Error("createClient requires a baseUrl");
|
|
511
511
|
const s = a.replace(/\/+$/, ""), r = e || ((...n) => fetch(...n));
|
|
512
512
|
async function o(n) {
|
|
@@ -522,8 +522,8 @@ function Se({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
|
|
|
522
522
|
async function i(n, d = {}) {
|
|
523
523
|
const l = [];
|
|
524
524
|
let h = null;
|
|
525
|
-
for (let p = 0; p <
|
|
526
|
-
const f =
|
|
525
|
+
for (let p = 0; p < _e; p += 1) {
|
|
526
|
+
const f = Se(h ? { ...d, cursor: h } : d), u = await o(`${n}${f}`);
|
|
527
527
|
if (l.push(...u.items || []), h = u.nextCursor || null, !h) break;
|
|
528
528
|
}
|
|
529
529
|
return { items: l, total: l.length, nextCursor: null };
|
|
@@ -572,7 +572,7 @@ function pt(a) {
|
|
|
572
572
|
const s = t >= 12 ? "PM" : "AM";
|
|
573
573
|
return `${(t + 11) % 12 + 1}:${String(e || 0).padStart(2, "0")} ${s}`;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Te(a) {
|
|
576
576
|
return a ? `${Math.floor(a / 12)}-${a % 12}` : "·";
|
|
577
577
|
}
|
|
578
578
|
function et(a = /* @__PURE__ */ new Date()) {
|
|
@@ -583,7 +583,7 @@ function mt(a = /* @__PURE__ */ new Date()) {
|
|
|
583
583
|
const t = (e) => String(e).padStart(2, "0");
|
|
584
584
|
return `${a.getFullYear()}-${t(a.getMonth() + 1)}-${t(a.getDate())}`;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Ie(a, t = mt()) {
|
|
587
587
|
const e = [...new Set((a || []).filter(Boolean))].sort();
|
|
588
588
|
if (!e.length || e.includes(t)) return t;
|
|
589
589
|
const s = e.filter((r) => r < t);
|
|
@@ -597,11 +597,22 @@ function K(a) {
|
|
|
597
597
|
const t = parseInt(a.slice(1), 16), e = t >> 16 & 255, s = t >> 8 & 255, r = t & 255;
|
|
598
598
|
return 0.299 * e + 0.587 * s + 0.114 * r > 150 ? "#0F1B33" : "#FFFFFF";
|
|
599
599
|
}
|
|
600
|
-
const
|
|
600
|
+
const Ce = (a) => {
|
|
601
601
|
const t = ["th", "st", "nd", "rd"], e = a % 100;
|
|
602
602
|
return a + (t[(e - 20) % 10] || t[e] || t[0]);
|
|
603
603
|
};
|
|
604
|
-
function
|
|
604
|
+
function zt(a, t) {
|
|
605
|
+
const e = (o) => {
|
|
606
|
+
const i = /^\d+/.exec(String(o ?? ""));
|
|
607
|
+
return i ? Number(i[0]) : null;
|
|
608
|
+
}, s = e(a), r = e(t);
|
|
609
|
+
return s !== null && r !== null && s !== r ? r - s : s !== null && r === null ? -1 : s === null && r !== null ? 1 : String(a ?? "").localeCompare(String(t ?? ""), "en", { sensitivity: "base" });
|
|
610
|
+
}
|
|
611
|
+
function Ee(a, t) {
|
|
612
|
+
const e = (s) => String(s?.name ?? s ?? "");
|
|
613
|
+
return e(a).localeCompare(e(t), "en", { numeric: !0, sensitivity: "base" });
|
|
614
|
+
}
|
|
615
|
+
function Wt(a) {
|
|
605
616
|
if (a.state === "live") return { kind: "live", label: `Live · ${a.period || ""}`.replace(/ · $/, "") };
|
|
606
617
|
if (a.state === "final") {
|
|
607
618
|
const t = [];
|
|
@@ -609,7 +620,7 @@ function jt(a) {
|
|
|
609
620
|
}
|
|
610
621
|
return a.state === "postponed" ? { kind: "warn", label: "Postponed" } : a.state === "canceled" ? { kind: "warn", label: "Canceled" } : { kind: "sched", label: `${y(a.date, { month: "short", day: "numeric" })} · ${pt(a.time)}`.replace(/ · $/, "") };
|
|
611
622
|
}
|
|
612
|
-
const
|
|
623
|
+
const Pe = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
|
|
613
624
|
function _(a) {
|
|
614
625
|
let t = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
|
|
615
626
|
const e = t.indexOf("#");
|
|
@@ -618,13 +629,13 @@ function _(a) {
|
|
|
618
629
|
let r = t.split("?")[0] + s;
|
|
619
630
|
return r = r.replace(/([^:])\/{2,}/g, "$1/").replace(/^\/{2,}/, "/"), r = r.replace(/^\/(?=#)/, ""), r.length > 1 && (r = r.replace(/\/+$/, "")), r.toLowerCase();
|
|
620
631
|
}
|
|
621
|
-
function
|
|
632
|
+
function qt() {
|
|
622
633
|
const a = globalThis.location;
|
|
623
634
|
if (!a) return "";
|
|
624
635
|
const t = (a.hash || "").startsWith("#/") ? a.hash : "";
|
|
625
636
|
return _((a.pathname || "") + t);
|
|
626
637
|
}
|
|
627
|
-
function
|
|
638
|
+
function De(a, t, e) {
|
|
628
639
|
if (!e) return null;
|
|
629
640
|
const s = _(a);
|
|
630
641
|
if (!s) return null;
|
|
@@ -634,9 +645,9 @@ function Ee(a, t, e) {
|
|
|
634
645
|
if (s === i) return "";
|
|
635
646
|
if (!s.startsWith(`${i}/`)) return null;
|
|
636
647
|
const n = s.slice(i.length + 1), d = n.split("/");
|
|
637
|
-
return d.length > 2 || d.some((l) => !/^[a-z][a-z-]*$/.test(l)) ||
|
|
648
|
+
return d.length > 2 || d.some((l) => !/^[a-z][a-z-]*$/.test(l)) || Pe.has(d[0]) ? null : n;
|
|
638
649
|
}
|
|
639
|
-
function
|
|
650
|
+
function ze(a, t, e) {
|
|
640
651
|
const s = (i) => g(e.section, { sport: a, view: i }).replace(/([^:])\/{2,}/g, "$1/"), o = new Set((t || []).map((i) => i && i.gender).filter((i) => i === "boys" || i === "girls")).size === 2 ? [
|
|
641
652
|
{ label: "Boys Standings", href: s("boys/standings") },
|
|
642
653
|
{ label: "Girls Standings", href: s("girls/standings") }
|
|
@@ -649,7 +660,7 @@ function Pe(a, t, e) {
|
|
|
649
660
|
{ label: "Polls & Rankings", href: s("rankings") }
|
|
650
661
|
];
|
|
651
662
|
}
|
|
652
|
-
function
|
|
663
|
+
function Re(a, t = qt()) {
|
|
653
664
|
const e = _(t);
|
|
654
665
|
for (const s of a.querySelectorAll(':scope > a[slot="nav"]'))
|
|
655
666
|
e && _(s.getAttribute("href")) === e ? s.setAttribute("aria-current", "page") : s.removeAttribute("aria-current");
|
|
@@ -673,7 +684,7 @@ class w extends E {
|
|
|
673
684
|
this._client = t, this.isConnected && this.load();
|
|
674
685
|
}
|
|
675
686
|
get client() {
|
|
676
|
-
return this._client ? this._client : this.api ?
|
|
687
|
+
return this._client ? this._client : this.api ? Ae({ baseUrl: this.api }) : null;
|
|
677
688
|
}
|
|
678
689
|
connectedCallback() {
|
|
679
690
|
super.connectedCallback(), this._setupInterval();
|
|
@@ -685,7 +696,7 @@ class w extends E {
|
|
|
685
696
|
this.load();
|
|
686
697
|
}
|
|
687
698
|
updated(t) {
|
|
688
|
-
t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(),
|
|
699
|
+
t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(), Re(this);
|
|
689
700
|
}
|
|
690
701
|
async load() {
|
|
691
702
|
const t = this.client;
|
|
@@ -720,7 +731,7 @@ class w extends E {
|
|
|
720
731
|
return c``;
|
|
721
732
|
}
|
|
722
733
|
}
|
|
723
|
-
const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])),
|
|
734
|
+
const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Be = b`
|
|
724
735
|
:host {
|
|
725
736
|
--hsot-red: var(--color-red, #D1232A);
|
|
726
737
|
--hsot-red-deep: var(--color-red-dark, #951C21);
|
|
@@ -758,7 +769,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), ze = b`
|
|
|
758
769
|
outline-offset: 1px;
|
|
759
770
|
}
|
|
760
771
|
.mut { color: var(--hsot-gray-5); }
|
|
761
|
-
`,
|
|
772
|
+
`, Fe = b`
|
|
762
773
|
.band { background: var(--hsot-white); color: var(--hsot-black); }
|
|
763
774
|
.band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
|
|
764
775
|
.band h1, .band h2.bandtitle {
|
|
@@ -807,7 +818,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), ze = b`
|
|
|
807
818
|
@media (max-width: 720px) {
|
|
808
819
|
.band h1, .band h2.bandtitle, .band.section h1, .band.section h2.bandtitle { font-size: 1.8rem; }
|
|
809
820
|
}
|
|
810
|
-
`,
|
|
821
|
+
`, Ne = b`
|
|
811
822
|
.view { max-width: 1366px; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
|
|
812
823
|
/* Optional right rail (slot="rail" light-DOM children): a divided 300px
|
|
813
824
|
column on desktop, stacked under the view content on smaller screens. */
|
|
@@ -871,7 +882,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), ze = b`
|
|
|
871
882
|
.error { padding: 1.2rem 1rem; color: var(--hsot-red-deep); font-size: 0.9rem; }
|
|
872
883
|
.note { font-size: 0.8125rem; color: var(--hsot-gray-5); margin: 0.6rem 0 0; }
|
|
873
884
|
.loading { padding: 1.2rem; color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
|
|
874
|
-
`,
|
|
885
|
+
`, Ue = b`
|
|
875
886
|
.pill {
|
|
876
887
|
display: inline-block; font-family: var(--hsot-heading-font); font-weight: 700;
|
|
877
888
|
font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em;
|
|
@@ -886,7 +897,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), ze = b`
|
|
|
886
897
|
.pill.champ { background: var(--hsot-straw); color: #6b5900; }
|
|
887
898
|
@keyframes hsot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
|
|
888
899
|
@media (prefers-reduced-motion: reduce) { .pill.live { animation: none; } }
|
|
889
|
-
`,
|
|
900
|
+
`, Oe = b`
|
|
890
901
|
.tablewrap { overflow-x: auto; }
|
|
891
902
|
table.data { font-family: var(--hsot-heading-font); font-size: 14px; border-collapse: collapse; width: 100%; }
|
|
892
903
|
table.data th {
|
|
@@ -904,7 +915,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), ze = b`
|
|
|
904
915
|
table.data tbody tr.rowlink:hover { background: var(--hsot-gray-1); }
|
|
905
916
|
table.data td.teamcell a { color: inherit; text-decoration: none; font-weight: 500; }
|
|
906
917
|
table.data td.teamcell a:hover { text-decoration: underline; }
|
|
907
|
-
`,
|
|
918
|
+
`, He = b`
|
|
908
919
|
.swatch {
|
|
909
920
|
display: inline-flex; align-items: center; justify-content: center;
|
|
910
921
|
width: 26px; height: 26px; border-radius: 50%;
|
|
@@ -928,7 +939,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), ze = b`
|
|
|
928
939
|
.dot.W { background: var(--hsot-win); }
|
|
929
940
|
.dot.L { background: var(--hsot-loss); }
|
|
930
941
|
.dot.T { background: var(--hsot-tie); }
|
|
931
|
-
`,
|
|
942
|
+
`, Me = b`
|
|
932
943
|
ul.gamelist { list-style: none; margin: 0; padding: 0; }
|
|
933
944
|
.gamelist li {
|
|
934
945
|
display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem;
|
|
@@ -978,11 +989,11 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), ze = b`
|
|
|
978
989
|
.gamelist .ff { color: var(--hsot-gray-5); font-size: 0.78rem; font-style: italic; }
|
|
979
990
|
.gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
|
|
980
991
|
.gamelist a.box { font-size: 0.78rem; }
|
|
981
|
-
`, j = [
|
|
992
|
+
`, j = [Be, Fe, Ne, Ue, Oe, He, Me];
|
|
982
993
|
function ut(a) {
|
|
983
994
|
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";
|
|
984
995
|
}
|
|
985
|
-
function
|
|
996
|
+
function Le(a) {
|
|
986
997
|
return a && (a.forfeit === "home" || a.forfeit === "away") ? a.forfeit : null;
|
|
987
998
|
}
|
|
988
999
|
function W(a, t) {
|
|
@@ -1007,25 +1018,25 @@ function st(a) {
|
|
|
1007
1018
|
for (let s = a.length - 1; s >= 0 && a[s].mark === t; s -= 1) e += 1;
|
|
1008
1019
|
return t + e;
|
|
1009
1020
|
}
|
|
1010
|
-
const
|
|
1021
|
+
const Rt = (a, t, e) => {
|
|
1011
1022
|
const s = a + t + e;
|
|
1012
1023
|
return s ? (a + e / 2) / s : 0;
|
|
1013
|
-
},
|
|
1024
|
+
}, Bt = (a) => a.toFixed(3).replace("0.", ".");
|
|
1014
1025
|
function x(a, t = !1) {
|
|
1015
1026
|
if (!a) return "0-0";
|
|
1016
1027
|
const e = t ? a.cw : a.w, s = t ? a.cl : a.l, r = t ? a.ct : a.t;
|
|
1017
1028
|
return `${e}-${s}${r ? `-${r}` : ""}`;
|
|
1018
1029
|
}
|
|
1019
|
-
function
|
|
1030
|
+
function Gt(a, t) {
|
|
1020
1031
|
return a.map((e) => {
|
|
1021
1032
|
const s = t[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] };
|
|
1022
|
-
return { team: e, rec: s, confPct:
|
|
1033
|
+
return { team: e, rec: s, confPct: Rt(s.cw, s.cl, s.ct), overallPct: Rt(s.w, s.l, s.t) };
|
|
1023
1034
|
}).sort((e, s) => s.confPct - e.confPct || s.overallPct - e.overallPct || s.rec.pf - s.rec.pa - (e.rec.pf - e.rec.pa));
|
|
1024
1035
|
}
|
|
1025
1036
|
function gt(a, t) {
|
|
1026
1037
|
return a.filter((e) => (e.homeTeamId === t || e.awayTeamId === t) && (e.state === "scheduled" || e.state === "live") && e.gameType !== "scrimmage").sort((e, s) => String(e.date).localeCompare(String(s.date)))[0] || null;
|
|
1027
1038
|
}
|
|
1028
|
-
function
|
|
1039
|
+
function Ft(a, t) {
|
|
1029
1040
|
const e = a[t];
|
|
1030
1041
|
return e && e.results.length ? e.results[e.results.length - 1] : null;
|
|
1031
1042
|
}
|
|
@@ -1045,7 +1056,7 @@ function vt(a, t, e, s, r) {
|
|
|
1045
1056
|
}
|
|
1046
1057
|
return n ? n.rank : null;
|
|
1047
1058
|
}
|
|
1048
|
-
function
|
|
1059
|
+
function je(a, t, e) {
|
|
1049
1060
|
if (!a) return { kind: "none", delta: 0 };
|
|
1050
1061
|
const s = (a.teamIds || []).indexOf(e) + 1;
|
|
1051
1062
|
if (!s) return { kind: "none", delta: 0 };
|
|
@@ -1055,11 +1066,11 @@ function Me(a, t, e) {
|
|
|
1055
1066
|
const o = r - s;
|
|
1056
1067
|
return o > 0 ? { kind: "up", delta: o } : o < 0 ? { kind: "down", delta: -o } : { kind: "same", delta: 0 };
|
|
1057
1068
|
}
|
|
1058
|
-
function
|
|
1069
|
+
function We(a) {
|
|
1059
1070
|
return /^https?:\/\//i.test(String(a || ""));
|
|
1060
1071
|
}
|
|
1061
|
-
function
|
|
1062
|
-
if (!
|
|
1072
|
+
function Vt(a, { w: t, h: e } = {}) {
|
|
1073
|
+
if (!We(a)) return "";
|
|
1063
1074
|
const s = [];
|
|
1064
1075
|
t && s.push(`w=${Math.max(1, Math.round(t))}`), e && s.push(`h=${Math.max(1, Math.round(e))}`), s.push("f=webp");
|
|
1065
1076
|
const r = a.includes("?") ? "&" : "?";
|
|
@@ -1067,13 +1078,13 @@ function Gt(a, { w: t, h: e } = {}) {
|
|
|
1067
1078
|
}
|
|
1068
1079
|
function Q(a, t) {
|
|
1069
1080
|
const e = t * 2;
|
|
1070
|
-
return
|
|
1081
|
+
return Vt(a?.logoAssetId, { w: e, h: e });
|
|
1071
1082
|
}
|
|
1072
|
-
function
|
|
1073
|
-
return
|
|
1083
|
+
function qe(a, t) {
|
|
1084
|
+
return Vt(a?.photoAssetId, { w: t * 2 });
|
|
1074
1085
|
}
|
|
1075
1086
|
function $t(a, t, { title: e, sub: s, teams: r }) {
|
|
1076
|
-
const o =
|
|
1087
|
+
const o = qt(), n = !!a.querySelector(':scope > a[slot="nav"]') || De(o, t.hrefs, t.sport) !== null;
|
|
1077
1088
|
return c`
|
|
1078
1089
|
<div class="band section">
|
|
1079
1090
|
<div class="inner">
|
|
@@ -1084,7 +1095,7 @@ function $t(a, t, { title: e, sub: s, teams: r }) {
|
|
|
1084
1095
|
<nav class="sectionnav" aria-label="${z(t.sport)} section">
|
|
1085
1096
|
<div class="navrow">
|
|
1086
1097
|
<slot name="nav">
|
|
1087
|
-
${
|
|
1098
|
+
${ze(t.sport, r, t.hrefs).map((d) => c`<a href=${d.href}
|
|
1088
1099
|
aria-current=${o && _(d.href) === o ? "page" : m}>${d.label}</a>`)}
|
|
1089
1100
|
</slot>
|
|
1090
1101
|
</div>
|
|
@@ -1111,7 +1122,7 @@ function bt(a, t, e) {
|
|
|
1111
1122
|
const s = vt(a.rankings, a.teamsById, t, a.sport, e);
|
|
1112
1123
|
return s ? c`<span class="rankbadge">#${s}</span>` : m;
|
|
1113
1124
|
}
|
|
1114
|
-
function
|
|
1125
|
+
function Yt(a, t, e) {
|
|
1115
1126
|
const s = O(a, t);
|
|
1116
1127
|
return s ? c`${bt(a, t, e)}<a href=${g(a.hrefs.school, { id: s.id })}>${s.name}</a>` : c`<span class="mut">TBD</span>`;
|
|
1117
1128
|
}
|
|
@@ -1137,15 +1148,15 @@ function G(a) {
|
|
|
1137
1148
|
return c`<div class="promo">${a.promoHref ? c`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${t}</a>` : t}</div>`;
|
|
1138
1149
|
}
|
|
1139
1150
|
function J(a) {
|
|
1140
|
-
const t =
|
|
1151
|
+
const t = Wt(a);
|
|
1141
1152
|
return c`<span class="pill ${t.kind}">${t.label}</span>`;
|
|
1142
1153
|
}
|
|
1143
|
-
function
|
|
1154
|
+
function Kt(a, t, e) {
|
|
1144
1155
|
if (!t) return c`<span class="mut">·</span>`;
|
|
1145
1156
|
const s = t.homeTeamId === e ? t.awayTeamId : t.homeTeamId, r = t.homeTeamId === e ? "vs" : "at";
|
|
1146
1157
|
return c`${t.state === "live" ? c`<span class="pill live">Live</span> ` : c`${y(t.date, { month: "numeric", day: "numeric" })} `}${r} ${Z(a, s)}`;
|
|
1147
1158
|
}
|
|
1148
|
-
class
|
|
1159
|
+
class Qt extends w {
|
|
1149
1160
|
static styles = j;
|
|
1150
1161
|
static properties = {
|
|
1151
1162
|
...w.properties,
|
|
@@ -1171,7 +1182,7 @@ class Kt extends w {
|
|
|
1171
1182
|
t.listGames({ sport: this.sport, season: e }),
|
|
1172
1183
|
t.listRankings({ sport: this.sport })
|
|
1173
1184
|
]);
|
|
1174
|
-
return this._datePinned || (this.date =
|
|
1185
|
+
return this._datePinned || (this.date = Ie(i.items.map((d) => d.date)), this._datePinned = !0), {
|
|
1175
1186
|
season: e,
|
|
1176
1187
|
schools: s.items,
|
|
1177
1188
|
teams: r.items,
|
|
@@ -1242,7 +1253,7 @@ class Kt extends w {
|
|
|
1242
1253
|
// a lone score column on the far right read as detached from the teams).
|
|
1243
1254
|
// Scheduled games carry their start time on the status pill alone.
|
|
1244
1255
|
renderGame(t, e) {
|
|
1245
|
-
const s = e.state === "final" || e.state === "live", r = (i, n, d = m) => c`<span class="side">${
|
|
1256
|
+
const s = e.state === "final" || e.state === "live", r = (i, n, d = m) => c`<span class="side">${Yt(t, i, e.date)}${s ? c`<span class="score">${n}</span>` : m}${d}</span>`, o = Le(e);
|
|
1246
1257
|
return c`
|
|
1247
1258
|
<li>
|
|
1248
1259
|
${J(e)}
|
|
@@ -1255,8 +1266,8 @@ class Kt extends w {
|
|
|
1255
1266
|
`;
|
|
1256
1267
|
}
|
|
1257
1268
|
}
|
|
1258
|
-
globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores",
|
|
1259
|
-
class
|
|
1269
|
+
globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Qt);
|
|
1270
|
+
class Zt extends w {
|
|
1260
1271
|
static styles = j;
|
|
1261
1272
|
static properties = {
|
|
1262
1273
|
...w.properties,
|
|
@@ -1296,7 +1307,7 @@ class Qt extends w {
|
|
|
1296
1307
|
}, this._ctxData = this.data), this._ctx;
|
|
1297
1308
|
}
|
|
1298
1309
|
renderView() {
|
|
1299
|
-
const t = this.ctx, e = ["All", ...new Set(this.data.conferences.flatMap((r) => r.classifications || []))].slice(0, 9), s = this.data.conferences.filter((r) => r.active !== !1).filter((r) => this.classFilter === "All" || (r.classifications || []).includes(this.classFilter));
|
|
1310
|
+
const t = this.ctx, e = ["All", ...[...new Set(this.data.conferences.flatMap((r) => r.classifications || []))].sort(zt)].slice(0, 9), s = this.data.conferences.filter((r) => r.active !== !1).filter((r) => this.classFilter === "All" || (r.classifications || []).includes(this.classFilter)).sort(Ee);
|
|
1300
1311
|
return c`
|
|
1301
1312
|
${$t(this, t, {
|
|
1302
1313
|
title: c`${z(this.sport)} standings`,
|
|
@@ -1326,12 +1337,12 @@ class Qt extends w {
|
|
|
1326
1337
|
renderConference(t, e) {
|
|
1327
1338
|
const s = this.data.teams.filter((i) => i.conferenceId === e.id);
|
|
1328
1339
|
if (!s.length) return m;
|
|
1329
|
-
const r = this.query.trim().toLowerCase(), o =
|
|
1340
|
+
const r = this.query.trim().toLowerCase(), o = Gt(s, t.records);
|
|
1330
1341
|
return c`
|
|
1331
1342
|
<div class="card">
|
|
1332
1343
|
<div class="card-head">
|
|
1333
1344
|
<h2>${e.name}</h2>
|
|
1334
|
-
${
|
|
1345
|
+
${[...e.classifications || []].sort(zt).map((i) => c`<span class="pill class">${i}</span>`)}
|
|
1335
1346
|
<span class="meta">${o.length} teams · membership derives from teams</span>
|
|
1336
1347
|
</div>
|
|
1337
1348
|
<div class="tablewrap"><table class="data">
|
|
@@ -1363,21 +1374,21 @@ class Qt extends w {
|
|
|
1363
1374
|
<a href=${g(t.hrefs.school, { id: e.team.schoolId })}>${i}</a>
|
|
1364
1375
|
</td>
|
|
1365
1376
|
<td class="num">${x(e.rec, !0)}</td>
|
|
1366
|
-
<td class="num">${
|
|
1377
|
+
<td class="num">${Bt(e.confPct)}</td>
|
|
1367
1378
|
<td class="num">${x(e.rec)}</td>
|
|
1368
|
-
<td class="num">${
|
|
1379
|
+
<td class="num">${Bt(e.overallPct)}</td>
|
|
1369
1380
|
<td class="num">${e.rec.pf}</td>
|
|
1370
1381
|
<td class="num">${e.rec.pa}</td>
|
|
1371
1382
|
<td class="num" style="color:${n >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${n > 0 ? "+" : ""}${n}</td>
|
|
1372
1383
|
<td>${st(e.rec.results) || "·"}</td>
|
|
1373
1384
|
<td>${yt(t, e.team.id)}</td>
|
|
1374
|
-
<td>${
|
|
1385
|
+
<td>${Kt(t, d, e.team.id)}</td>
|
|
1375
1386
|
</tr>
|
|
1376
1387
|
`;
|
|
1377
1388
|
}
|
|
1378
1389
|
}
|
|
1379
|
-
globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings",
|
|
1380
|
-
const
|
|
1390
|
+
globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", Zt);
|
|
1391
|
+
const Ge = b`
|
|
1381
1392
|
.hero1 {
|
|
1382
1393
|
border-radius: var(--hsot-radius-md); color: var(--hsot-white);
|
|
1383
1394
|
padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1.2rem;
|
|
@@ -1394,8 +1405,8 @@ const We = b`
|
|
|
1394
1405
|
.delta.new { background: var(--hsot-straw); color: #6b5900; border-radius: var(--hsot-radius-xs); padding: 0.1rem 0.3rem; font-size: 0.7rem; }
|
|
1395
1406
|
.sparkline { vertical-align: middle; }
|
|
1396
1407
|
`;
|
|
1397
|
-
class
|
|
1398
|
-
static styles = [...j,
|
|
1408
|
+
class Jt extends w {
|
|
1409
|
+
static styles = [...j, Ge];
|
|
1399
1410
|
static properties = {
|
|
1400
1411
|
...w.properties,
|
|
1401
1412
|
sport: { type: String },
|
|
@@ -1457,7 +1468,7 @@ class Zt extends w {
|
|
|
1457
1468
|
</svg>`;
|
|
1458
1469
|
}
|
|
1459
1470
|
movement(t, e, s) {
|
|
1460
|
-
const r =
|
|
1471
|
+
const r = je(t, e, s);
|
|
1461
1472
|
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>`;
|
|
1462
1473
|
}
|
|
1463
1474
|
renderView() {
|
|
@@ -1507,7 +1518,7 @@ class Zt extends w {
|
|
|
1507
1518
|
`;
|
|
1508
1519
|
}
|
|
1509
1520
|
renderHero(t, e, s, r, o, i) {
|
|
1510
|
-
const n = t.records[r], d =
|
|
1521
|
+
const n = t.records[r], d = Ft(t.records, r), l = i[t.teamsById[r]?.conferenceId], h = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
|
|
1511
1522
|
return c`
|
|
1512
1523
|
<div class="hero1" style="background:${h}">
|
|
1513
1524
|
<div class="bigrank">#1</div>
|
|
@@ -1527,7 +1538,7 @@ class Zt extends w {
|
|
|
1527
1538
|
renderRow(t, e, s, r, o, i, n, d) {
|
|
1528
1539
|
const l = O(t, n);
|
|
1529
1540
|
if (!l) return m;
|
|
1530
|
-
const h = t.records[n], p =
|
|
1541
|
+
const h = t.records[n], p = Ft(t.records, n), f = gt(this.data.games, n), u = i[t.teamsById[n]?.conferenceId], $ = () => {
|
|
1531
1542
|
location.href = g(t.hrefs.school, { id: l.id });
|
|
1532
1543
|
};
|
|
1533
1544
|
return c`
|
|
@@ -1543,14 +1554,14 @@ class Zt extends w {
|
|
|
1543
1554
|
<td>${p ? c`<a class="box" style="text-decoration:none" href=${g(t.hrefs.game, { sport: this.sport, id: p.gameId })}>
|
|
1544
1555
|
<b style="color:${p.mark === "W" ? "var(--hsot-win)" : p.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${p.mark}</b>
|
|
1545
1556
|
${p.my}-${p.their} vs ${Z(t, p.opp)}</a>` : c`<span class="mut">·</span>`}</td>
|
|
1546
|
-
<td>${
|
|
1557
|
+
<td>${Kt(t, f, n)}</td>
|
|
1547
1558
|
<td>${this.sparkline(n, r, o)}</td>
|
|
1548
1559
|
</tr>
|
|
1549
1560
|
`;
|
|
1550
1561
|
}
|
|
1551
1562
|
}
|
|
1552
|
-
globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings",
|
|
1553
|
-
const
|
|
1563
|
+
globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", Jt);
|
|
1564
|
+
const Ve = b`
|
|
1554
1565
|
.schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
|
|
1555
1566
|
.schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
|
|
1556
1567
|
.schoolhero .crest {
|
|
@@ -1572,15 +1583,40 @@ const qe = b`
|
|
|
1572
1583
|
.tile .k { font-family: var(--hsot-heading-font); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; font-weight: 700; color: var(--hsot-red-deep); }
|
|
1573
1584
|
.tile .v { font-family: var(--hsot-heading-font); font-weight: 700; font-size: 1.7rem; line-height: 1.15; color: var(--hsot-black); }
|
|
1574
1585
|
.tile .s { font-size: 0.78rem; color: var(--hsot-gray-5); }
|
|
1575
|
-
|
|
1586
|
+
/* Schedule and roster split the width evenly. The roster used to get
|
|
1587
|
+
5/12 (~393px beside the rail), which held six columns; the season
|
|
1588
|
+
photo and the College column (2026-09) took its table to ~480px and
|
|
1589
|
+
gave the card a horizontal scrollbar on desktop while the schedule
|
|
1590
|
+
sat in white space. Both tracks are minmax(0, …) so a table that is
|
|
1591
|
+
still too wide scrolls inside its card instead of stretching the
|
|
1592
|
+
grid — and the page — past the viewport. */
|
|
1593
|
+
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
|
|
1576
1594
|
/* The season roster photo heads the roster card, above the table. Natural
|
|
1577
1595
|
height: a team photo is never cropped to a box — the card's overflow
|
|
1578
1596
|
rounds its top corners. */
|
|
1579
1597
|
.rosterphoto { display: block; width: 100%; height: auto; background: var(--hsot-gray-1); border-bottom: 1px solid var(--hsot-gray-2); }
|
|
1580
|
-
|
|
1598
|
+
/* Roster table: a little less side padding than the shared table so all
|
|
1599
|
+
seven columns fit the card beside the rail. */
|
|
1600
|
+
table.data.roster th, table.data.roster td { padding-left: 10px; padding-right: 10px; }
|
|
1601
|
+
table.data.roster .sub { display: none; }
|
|
1602
|
+
/* A bare 1fr here was the mobile bug: its implicit minimum is the
|
|
1603
|
+
content's width, so the nowrap roster table widened the single column
|
|
1604
|
+
past the phone and the whole page scrolled sideways. */
|
|
1605
|
+
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } .schoolhero h1 { font-size: 1.9rem; } }
|
|
1606
|
+
@media (max-width: 720px) {
|
|
1607
|
+
/* Phone: the roster fits the screen instead of scrolling. Position
|
|
1608
|
+
and class fold under the player's name, names and colleges may
|
|
1609
|
+
wrap, and cells tighten. Five columns come to ~330px, inside a
|
|
1610
|
+
360px phone's view padding. */
|
|
1611
|
+
table.data.roster { font-size: 13px; }
|
|
1612
|
+
table.data.roster th, table.data.roster td { padding: 7px 8px; }
|
|
1613
|
+
table.data.roster .pos, table.data.roster .cls { display: none; }
|
|
1614
|
+
table.data.roster td.player, table.data.roster td.college { white-space: normal; }
|
|
1615
|
+
table.data.roster .sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--hsot-gray-5); }
|
|
1616
|
+
}
|
|
1581
1617
|
`;
|
|
1582
|
-
class
|
|
1583
|
-
static styles = [...j,
|
|
1618
|
+
class Xt extends w {
|
|
1619
|
+
static styles = [...j, Ve];
|
|
1584
1620
|
static properties = {
|
|
1585
1621
|
...w.properties,
|
|
1586
1622
|
schoolId: { type: String, attribute: "school-id" },
|
|
@@ -1670,12 +1706,12 @@ class Jt extends w {
|
|
|
1670
1706
|
`;
|
|
1671
1707
|
}
|
|
1672
1708
|
renderTeam(t, e, s, r) {
|
|
1673
|
-
const o = t.records[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, i = o.w + o.l + o.t, n = s ? this.data.allTeams.filter((p) => p.conferenceId === s.id) : [], d = s ?
|
|
1709
|
+
const o = t.records[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, i = o.w + o.l + o.t, n = s ? this.data.allTeams.filter((p) => p.conferenceId === s.id) : [], d = s ? Gt(n, t.records).findIndex((p) => p.team.id === e.id) + 1 : 0, l = vt(t.rankings, t.teamsById, e.id, e.sport, null), h = this.data.games.filter((p) => p.homeTeamId === e.id || p.awayTeamId === e.id).sort((p, f) => String(p.date).localeCompare(String(f.date)));
|
|
1674
1710
|
return c`
|
|
1675
1711
|
<div class="tiles">
|
|
1676
1712
|
<div class="tile"><div class="k">Overall</div><div class="v">${x(o)}</div><div class="s">${i} games played</div></div>
|
|
1677
1713
|
<div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${x(o, !0)}</div>
|
|
1678
|
-
<div class="s">${d ? `${
|
|
1714
|
+
<div class="s">${d ? `${Ce(d)} of ${n.length}` : "·"}</div></div>
|
|
1679
1715
|
<div class="tile"><div class="k">Points</div><div class="v">${i ? (o.pf / i).toFixed(1) : "0.0"}</div>
|
|
1680
1716
|
<div class="s">scored per game · ${i ? (o.pa / i).toFixed(1) : "0.0"} allowed</div></div>
|
|
1681
1717
|
<div class="tile"><div class="k">Streak</div><div class="v">${st(o.results) || "·"}</div>
|
|
@@ -1712,9 +1748,9 @@ class Jt extends w {
|
|
|
1712
1748
|
return c`
|
|
1713
1749
|
<li>
|
|
1714
1750
|
<span class="d">${y(s.date)}</span>
|
|
1715
|
-
${
|
|
1751
|
+
${Wt(s).kind === "sched" ? m : J(s)}
|
|
1716
1752
|
<span class="res">${d}</span>
|
|
1717
|
-
<span class="opp">${r ? "vs" : "at"} ${
|
|
1753
|
+
<span class="opp">${r ? "vs" : "at"} ${Yt(t, o, s.date)}
|
|
1718
1754
|
<span class="pill type">${l}</span>
|
|
1719
1755
|
${s.broadcast ? c`<span class="pill class">${s.broadcast}</span>` : m}
|
|
1720
1756
|
</span>
|
|
@@ -1727,40 +1763,42 @@ class Jt extends w {
|
|
|
1727
1763
|
const s = this.data.roster;
|
|
1728
1764
|
if (!s)
|
|
1729
1765
|
return c`<p class="empty">Roster not published for ${e}.</p>`;
|
|
1730
|
-
const r =
|
|
1766
|
+
const r = qe(s, 560), o = this.data.school?.name || "", i = v(this.data.players), n = s.entries.slice().sort((l, h) => (l.number || 0) - (h.number || 0)), d = n.some((l) => i[l.playerId]?.college);
|
|
1731
1767
|
return c`
|
|
1732
1768
|
${r ? c`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
|
|
1733
1769
|
alt="${o} ${t.name} ${e} team photo" />` : m}
|
|
1734
|
-
<div class="tablewrap"><table class="data">
|
|
1735
|
-
<thead><tr><th class="num">No.</th><th>Player</th><th>Pos</th><th>Class</th><th class="num">Ht</th><th class="num">Wt</th>${d ? c`<th>College</th>` : m}</tr></thead>
|
|
1770
|
+
<div class="tablewrap"><table class="data roster">
|
|
1771
|
+
<thead><tr><th class="num">No.</th><th>Player</th><th class="pos">Pos</th><th class="cls">Class</th><th class="num">Ht</th><th class="num">Wt</th>${d ? c`<th>College</th>` : m}</tr></thead>
|
|
1736
1772
|
<tbody>
|
|
1737
1773
|
${n.map((l) => {
|
|
1738
1774
|
const h = i[l.playerId];
|
|
1739
|
-
|
|
1775
|
+
if (!h) return m;
|
|
1776
|
+
const p = [l.position, h.classOf].filter(Boolean).join(" · ") || "·";
|
|
1777
|
+
return c`<tr>
|
|
1740
1778
|
<td class="num mut">${l.number ?? "·"}</td>
|
|
1741
|
-
<td style="font-weight:500">${h.firstName} ${h.lastName}</td>
|
|
1742
|
-
<td>${l.position || "·"}</td>
|
|
1743
|
-
<td class="mut">${h.classOf || "·"}</td>
|
|
1744
|
-
<td class="num">${
|
|
1779
|
+
<td class="player" style="font-weight:500">${h.firstName} ${h.lastName}<span class="sub">${p}</span></td>
|
|
1780
|
+
<td class="pos">${l.position || "·"}</td>
|
|
1781
|
+
<td class="cls mut">${h.classOf || "·"}</td>
|
|
1782
|
+
<td class="num">${Te(h.heightIn)}</td>
|
|
1745
1783
|
<td class="num">${h.weightLb || "·"}</td>
|
|
1746
|
-
${d ? c`<td>${h.college || "·"}</td>` : m}
|
|
1747
|
-
</tr
|
|
1784
|
+
${d ? c`<td class="college">${h.college || "·"}</td>` : m}
|
|
1785
|
+
</tr>`;
|
|
1748
1786
|
})}
|
|
1749
1787
|
</tbody>
|
|
1750
1788
|
</table></div>
|
|
1751
1789
|
`;
|
|
1752
1790
|
}
|
|
1753
1791
|
}
|
|
1754
|
-
globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school",
|
|
1755
|
-
const
|
|
1756
|
-
function
|
|
1792
|
+
globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Xt);
|
|
1793
|
+
const Ye = "https://api.wral.com/search";
|
|
1794
|
+
function Ke(a) {
|
|
1757
1795
|
return a.map((t) => `uri:"${t}"`).join(" OR ");
|
|
1758
1796
|
}
|
|
1759
|
-
function
|
|
1760
|
-
const e = String(a ||
|
|
1797
|
+
function Qe(a, t) {
|
|
1798
|
+
const e = String(a || Ye).replace(/\/+$/, ""), s = new URLSearchParams({ query: Ke(t), sort: "score", lang: "en" });
|
|
1761
1799
|
return `${e}/v1/query?${s}`;
|
|
1762
1800
|
}
|
|
1763
|
-
function
|
|
1801
|
+
function te(a) {
|
|
1764
1802
|
try {
|
|
1765
1803
|
const t = new URL(a);
|
|
1766
1804
|
if (/(^|\.)smugmug\.com$/i.test(t.hostname)) {
|
|
@@ -1775,13 +1813,13 @@ function Xt(a) {
|
|
|
1775
1813
|
}
|
|
1776
1814
|
return { uri: a, title: a };
|
|
1777
1815
|
}
|
|
1778
|
-
async function
|
|
1779
|
-
const r = await ((...n) => fetch(...n))(
|
|
1816
|
+
async function Ze(a, t, e) {
|
|
1817
|
+
const r = await ((...n) => fetch(...n))(Qe(a, t));
|
|
1780
1818
|
if (!r.ok) throw new Error(`search answered ${r.status}`);
|
|
1781
1819
|
const o = await r.json(), i = new Map((o.items || []).map((n) => [n.uri, n]));
|
|
1782
|
-
return t.map((n) => i.get(n) ||
|
|
1820
|
+
return t.map((n) => i.get(n) || te(n));
|
|
1783
1821
|
}
|
|
1784
|
-
const
|
|
1822
|
+
const Je = b`
|
|
1785
1823
|
.breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
|
|
1786
1824
|
.breadcrumbs a { text-decoration: none; }
|
|
1787
1825
|
.scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
|
|
@@ -1820,8 +1858,8 @@ const Qe = b`
|
|
|
1820
1858
|
.cols { grid-template-columns: 1fr; }
|
|
1821
1859
|
}
|
|
1822
1860
|
`;
|
|
1823
|
-
class
|
|
1824
|
-
static styles = [...j,
|
|
1861
|
+
class ee extends w {
|
|
1862
|
+
static styles = [...j, Je];
|
|
1825
1863
|
static properties = {
|
|
1826
1864
|
...w.properties,
|
|
1827
1865
|
gameId: { type: String, attribute: "game-id" },
|
|
@@ -1843,7 +1881,7 @@ class te extends w {
|
|
|
1843
1881
|
t.listGames({ sport: e.sport, season: e.season }),
|
|
1844
1882
|
// A search outage must not blank the box score — degrade to bare
|
|
1845
1883
|
// links (fetchCoverage already degrades per-URL index misses).
|
|
1846
|
-
s.length ?
|
|
1884
|
+
s.length ? Ze(this.searchApi, s).catch(() => s.map(te)) : Promise.resolve([])
|
|
1847
1885
|
]);
|
|
1848
1886
|
return {
|
|
1849
1887
|
game: e,
|
|
@@ -1987,9 +2025,9 @@ class te extends w {
|
|
|
1987
2025
|
`;
|
|
1988
2026
|
}
|
|
1989
2027
|
}
|
|
1990
|
-
globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore",
|
|
1991
|
-
const
|
|
1992
|
-
class
|
|
2028
|
+
globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", ee);
|
|
2029
|
+
const Xe = 250, ts = 2;
|
|
2030
|
+
class se extends E {
|
|
1993
2031
|
static properties = {
|
|
1994
2032
|
api: { type: String },
|
|
1995
2033
|
schoolHref: { type: String, attribute: "school-href" },
|
|
@@ -2069,11 +2107,11 @@ class ee extends E {
|
|
|
2069
2107
|
}
|
|
2070
2108
|
onInput(t) {
|
|
2071
2109
|
const e = t.target.value.trim();
|
|
2072
|
-
if (clearTimeout(this.debounceTimer), e.length <
|
|
2110
|
+
if (clearTimeout(this.debounceTimer), e.length < ts) {
|
|
2073
2111
|
this.abortController?.abort(), this.results = [], this.open = !1, this.searched = !1;
|
|
2074
2112
|
return;
|
|
2075
2113
|
}
|
|
2076
|
-
this.debounceTimer = setTimeout(() => this.search(e),
|
|
2114
|
+
this.debounceTimer = setTimeout(() => this.search(e), Xe);
|
|
2077
2115
|
}
|
|
2078
2116
|
async search(t) {
|
|
2079
2117
|
this.abortController?.abort(), this.abortController = new AbortController();
|
|
@@ -2166,22 +2204,22 @@ class ee extends E {
|
|
|
2166
2204
|
`;
|
|
2167
2205
|
}
|
|
2168
2206
|
}
|
|
2169
|
-
globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search",
|
|
2170
|
-
const
|
|
2171
|
-
"hsot-scores":
|
|
2172
|
-
"hsot-standings":
|
|
2173
|
-
"hsot-rankings":
|
|
2174
|
-
"hsot-school":
|
|
2175
|
-
"hsot-boxscore":
|
|
2176
|
-
"hsot-school-search":
|
|
2207
|
+
globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", se);
|
|
2208
|
+
const es = {
|
|
2209
|
+
"hsot-scores": Qt,
|
|
2210
|
+
"hsot-standings": Zt,
|
|
2211
|
+
"hsot-rankings": Jt,
|
|
2212
|
+
"hsot-school": Xt,
|
|
2213
|
+
"hsot-boxscore": ee,
|
|
2214
|
+
"hsot-school-search": se
|
|
2177
2215
|
};
|
|
2178
|
-
function
|
|
2216
|
+
function ss() {
|
|
2179
2217
|
const a = globalThis?.customElements;
|
|
2180
2218
|
if (a)
|
|
2181
|
-
for (const [t, e] of Object.entries(
|
|
2219
|
+
for (const [t, e] of Object.entries(es))
|
|
2182
2220
|
a.get(t) || a.define(t, e);
|
|
2183
2221
|
}
|
|
2184
|
-
typeof window < "u" && globalThis.customElements &&
|
|
2222
|
+
typeof window < "u" && globalThis.customElements && ss();
|
|
2185
2223
|
export {
|
|
2186
|
-
|
|
2224
|
+
ss as defineAll
|
|
2187
2225
|
};
|