@banou/stub 0.0.51 → 0.0.52

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.
package/build/index.js CHANGED
@@ -5910,6 +5910,20 @@ var tu = (e, t) => t.toLowerCase().indexOf(e.toLowerCase()) ? "~" + t : t.slice(
5910
5910
  value: "categories"
5911
5911
  }
5912
5912
  },
5913
+ {
5914
+ kind: "Field",
5915
+ name: {
5916
+ kind: "Name",
5917
+ value: "startDate"
5918
+ }
5919
+ },
5920
+ {
5921
+ kind: "Field",
5922
+ name: {
5923
+ kind: "Name",
5924
+ value: "genres"
5925
+ }
5926
+ },
5913
5927
  {
5914
5928
  kind: "Field",
5915
5929
  name: {
@@ -6180,6 +6194,13 @@ var tu = (e, t) => t.toLowerCase().indexOf(e.toLowerCase()) ? "~" + t : t.slice(
6180
6194
  value: "releaseDate"
6181
6195
  }
6182
6196
  },
6197
+ {
6198
+ kind: "Field",
6199
+ name: {
6200
+ kind: "Name",
6201
+ value: "runtime"
6202
+ }
6203
+ },
6183
6204
  {
6184
6205
  kind: "Field",
6185
6206
  name: {
@@ -12773,14 +12794,14 @@ var Xv = H`
12773
12794
  }),
12774
12795
  /* @__PURE__ */ X("span", {
12775
12796
  className: "version",
12776
- title: "stub v0.0.51, commit 4aec3f2",
12797
+ title: "stub v0.0.52, commit 4bae3cc",
12777
12798
  children: [
12778
12799
  "v",
12779
- "0.0.51",
12800
+ "0.0.52",
12780
12801
  " ",
12781
12802
  /* @__PURE__ */ Y("span", {
12782
12803
  className: "commit",
12783
- children: "4aec3f2"
12804
+ children: "4bae3cc"
12784
12805
  })
12785
12806
  ]
12786
12807
  })
@@ -12970,7 +12991,7 @@ var ey = H`
12970
12991
  "\n subscription StubTrackerStorage {\n stubTrackerStorage {\n location\n signedIn\n locked\n waiting\n held\n error\n }\n }\n": Wu,
12971
12992
  "\n mutation AddHeldStubEntries {\n addHeldStubEntries {\n location\n signedIn\n locked\n waiting\n held\n error\n }\n }\n": Gu,
12972
12993
  "\n subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n }\n": Ku,
12973
- "\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n": qu,
12994
+ "\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n startDate\n genres\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n runtime\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n": qu,
12974
12995
  "\n subscription GetMediaModalOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n ...OriginFragment\n }\n }\n }\n": Ju,
12975
12996
  "\n subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n color\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n genres\n tags\n averageScore\n status\n type\n season\n seasonYear\n nextAiringEpisode {\n episodeNumber\n airingAt\n }\n }\n }\n }\n": Yu,
12976
12997
  "\n subscription GetWatchMedia($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n titles {\n title\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n titles {\n title\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n embedUrl\n mediaUri\n episodeNumber\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n }\n }\n }\n }\n }\n": Xu,
@@ -23821,6 +23842,10 @@ var fF = {
23821
23842
  /* the width "Plan to watch" gave it, so offering Remove from list never widens it and wraps the row */
23822
23843
  select { width: 14rem; }
23823
23844
 
23845
+ button.watched svg { opacity: 0.35; }
23846
+ button.watched.on { border-color: rgba(74, 222, 128, 0.5); background: rgba(74, 222, 128, 0.12); color: #4ade80; }
23847
+ button.watched.on svg { opacity: 1; }
23848
+
23824
23849
  .progress-field {
23825
23850
  input {
23826
23851
  width: 4.4ch;
@@ -23943,15 +23968,17 @@ var fF = {
23943
23968
  src: e.tracker.icon,
23944
23969
  alt: ""
23945
23970
  }) : e.tracker.name.slice(0, 1)
23946
- }), xF = ({ name: e, shown: t, scale: n, mixed: r, disabled: i, disabledTitle: a, listed: o, removable: s, onChange: c, dots: l = {} }) => {
23947
- let [u, d] = I(), f = R(void 0), p = R(() => {}), m = t.total, h = () => {
23948
- if (clearTimeout(f.current), u === void 0) return;
23949
- let e = Number(u);
23950
- if (d(void 0), u.trim() === "" || !Number.isFinite(e)) return;
23951
- let n = Math.max(0, Math.min(m ?? Infinity, Math.floor(e)));
23971
+ }), xF = ({ name: e, shown: t, scale: n, mixed: r, disabled: i, disabledTitle: a, listed: o, removable: s, onChange: c, dots: l = {}, movie: u = !1 }) => {
23972
+ let [d, f] = I(), p = R(void 0), m = R(() => {}), h = t.total, g = () => {
23973
+ if (clearTimeout(p.current), d === void 0) return;
23974
+ let e = Number(d);
23975
+ if (f(void 0), d.trim() === "" || !Number.isFinite(e)) return;
23976
+ let n = Math.max(0, Math.min(h ?? Infinity, Math.floor(e)));
23952
23977
  n !== t.progress && c({ progress: n }, !0);
23953
23978
  };
23954
- return p.current = h, /* @__PURE__ */ X("div", {
23979
+ m.current = g;
23980
+ let _ = t.status === "COMPLETED" || t.progress >= (h ?? 1);
23981
+ return /* @__PURE__ */ X("div", {
23955
23982
  className: "group edit",
23956
23983
  children: [
23957
23984
  /* @__PURE__ */ Y(dF, {
@@ -23989,7 +24016,23 @@ var fF = {
23989
24016
  ]
23990
24017
  }),
23991
24018
  l.STATUS,
23992
- /* @__PURE__ */ X("span", {
24019
+ u ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("button", {
24020
+ type: "button",
24021
+ className: `watched${_ ? " on" : ""}`,
24022
+ "aria-pressed": _,
24023
+ disabled: i,
24024
+ onClick: () => c(_ ? {
24025
+ progress: 0,
24026
+ ...t.status === "COMPLETED" ? { status: "PLANNING" } : {}
24027
+ } : {
24028
+ progress: h ?? 1,
24029
+ status: "COMPLETED"
24030
+ }, !0),
24031
+ children: [/* @__PURE__ */ Y(cf, {
24032
+ size: 14,
24033
+ "aria-hidden": "true"
24034
+ }), "Watched"]
24035
+ }), l.PROGRESS] }) : /* @__PURE__ */ X("span", {
23993
24036
  className: "progress-field",
23994
24037
  children: [
23995
24038
  /* @__PURE__ */ Y("label", {
@@ -24003,27 +24046,27 @@ var fF = {
24003
24046
  inputMode: "numeric",
24004
24047
  name: `${e}-progress`,
24005
24048
  min: 0,
24006
- max: m ?? void 0,
24049
+ max: h ?? void 0,
24007
24050
  disabled: i,
24008
- value: u ?? t.progress,
24051
+ value: d ?? t.progress,
24009
24052
  onInput: (e) => {
24010
- d(e.currentTarget.value), clearTimeout(f.current), f.current = setTimeout(() => p.current(), 1e3);
24053
+ f(e.currentTarget.value), clearTimeout(p.current), p.current = setTimeout(() => m.current(), 1e3);
24011
24054
  },
24012
- onBlur: h,
24055
+ onBlur: g,
24013
24056
  onKeyDown: (e) => {
24014
- e.key === "Enter" && h(), e.key === "Escape" && (clearTimeout(f.current), d(void 0), e.stopPropagation());
24057
+ e.key === "Enter" && g(), e.key === "Escape" && (clearTimeout(p.current), f(void 0), e.stopPropagation());
24015
24058
  }
24016
24059
  }),
24017
- m ? /* @__PURE__ */ X("span", {
24060
+ h ? /* @__PURE__ */ X("span", {
24018
24061
  className: "of",
24019
- children: ["/ ", m]
24062
+ children: ["/ ", h]
24020
24063
  }) : void 0,
24021
24064
  l.PROGRESS,
24022
24065
  /* @__PURE__ */ Y("button", {
24023
24066
  type: "button",
24024
24067
  className: "more",
24025
24068
  "aria-label": "One episode more",
24026
- disabled: i || m != null && t.progress >= m,
24069
+ disabled: i || h != null && t.progress >= h,
24027
24070
  onClick: () => c({ progress: t.progress + 1 }, !1),
24028
24071
  children: /* @__PURE__ */ Y(Ef, {
24029
24072
  size: 14,
@@ -24032,19 +24075,19 @@ var fF = {
24032
24075
  })
24033
24076
  ]
24034
24077
  }),
24035
- !i && m && t.progress === m && t.status !== "COMPLETED" ? /* @__PURE__ */ Y("button", {
24078
+ !u && !i && h && t.progress === h && t.status !== "COMPLETED" ? /* @__PURE__ */ Y("button", {
24036
24079
  type: "button",
24037
24080
  onClick: () => c({ status: "COMPLETED" }, !0),
24038
24081
  children: "Mark completed"
24039
24082
  }) : void 0,
24040
- !i && m && t.status === "COMPLETED" && t.progress < m ? /* @__PURE__ */ X("button", {
24083
+ !u && !i && h && t.status === "COMPLETED" && t.progress < h ? /* @__PURE__ */ X("button", {
24041
24084
  type: "button",
24042
- onClick: () => c({ progress: m }, !0),
24085
+ onClick: () => c({ progress: h }, !0),
24043
24086
  children: [
24044
24087
  "Set ",
24045
- m,
24088
+ h,
24046
24089
  " / ",
24047
- m
24090
+ h
24048
24091
  ]
24049
24092
  }) : void 0
24050
24093
  ]
@@ -24103,125 +24146,125 @@ var fF = {
24103
24146
  }) : void 0
24104
24147
  ]
24105
24148
  });
24106
- }, CF = ({ tracking: e, episodeCount: t, onSaveFields: n, onRemove: r, signIns: i = {}, prefs: a, onPrefs: o }) => {
24107
- let [, s] = I(0), [c, l] = I({}), [u, d] = I(""), [f, p] = I(/* @__PURE__ */ new Set()), [m, h] = I({}), [g, _] = I(), v = R({
24108
- onSaveFields: n,
24109
- onRemove: r,
24149
+ }, CF = ({ tracking: e, episodeCount: t, movie: n = !1, onSaveFields: r, onRemove: i, signIns: a = {}, prefs: o, onPrefs: s }) => {
24150
+ let [, c] = I(0), [l, u] = I({}), [d, f] = I(""), [p, m] = I(/* @__PURE__ */ new Set()), [h, g] = I({}), [_, v] = I(), y = R({
24151
+ onSaveFields: r,
24152
+ onRemove: i,
24110
24153
  tracking: e
24111
24154
  });
24112
- v.current = {
24113
- onSaveFields: n,
24114
- onRemove: r,
24155
+ y.current = {
24156
+ onSaveFields: r,
24157
+ onRemove: i,
24115
24158
  tracking: e
24116
24159
  };
24117
- let y = z(() => iF({
24160
+ let b = z(() => iF({
24118
24161
  send: async (e, t) => {
24119
- let n = await (t.remove ? v.current.onRemove([e]) : v.current.onSaveFields([e], t));
24162
+ let n = await (t.remove ? y.current.onRemove([e]) : y.current.onSaveFields([e], t));
24120
24163
  return n.find((t) => t.tracker === e) ?? n[0] ?? {
24121
24164
  outcome: "FAILED",
24122
24165
  error: "The write did not reach the trackers"
24123
24166
  };
24124
24167
  },
24125
24168
  onChange: (e) => {
24126
- if (s((e) => e + 1), !e) return;
24127
- let t = v.current.tracking?.answers.find((t) => t.tracker.id === e.tracker)?.tracker.name ?? e.tracker, n = e.outcome === "SAVED" || e.outcome === "QUEUED";
24128
- d(n ? `${e.fields.remove ? "Removed from" : "Saved to"} ${t}` : `${t} did not save: ${e.error ?? e.outcome.toLowerCase()}`), !n && y.idle() && l({});
24169
+ if (c((e) => e + 1), !e) return;
24170
+ let t = y.current.tracking?.answers.find((t) => t.tracker.id === e.tracker)?.tracker.name ?? e.tracker, n = e.outcome === "SAVED" || e.outcome === "QUEUED";
24171
+ f(n ? `${e.fields.remove ? "Removed from" : "Saved to"} ${t}` : `${t} did not save: ${e.error ?? e.outcome.toLowerCase()}`), !n && b.idle() && u({});
24129
24172
  }
24130
24173
  }), []);
24131
24174
  L(() => {
24132
24175
  let e = () => {
24133
- document.visibilityState === "hidden" && y.flush();
24176
+ document.visibilityState === "hidden" && b.flush();
24134
24177
  };
24135
24178
  return document.addEventListener("visibilitychange", e), () => {
24136
- document.removeEventListener("visibilitychange", e), y.flush();
24179
+ document.removeEventListener("visibilitychange", e), b.flush();
24137
24180
  };
24138
24181
  }, []);
24139
- let b = KP(e, t), x = (t) => {
24182
+ let x = KP(e, t), S = (t) => {
24140
24183
  let n = e?.answers.find((e) => e.tracker.id === t);
24141
- return n && JP(n, b.total);
24184
+ return n && JP(n, x.total);
24142
24185
  };
24143
24186
  if (L(() => {
24144
- l((e) => y.idle() ? {} : Object.fromEntries(Object.entries(e).flatMap(([e, t]) => {
24145
- let n = e === vF ? b : x(e);
24187
+ u((e) => b.idle() ? {} : Object.fromEntries(Object.entries(e).flatMap(([e, t]) => {
24188
+ let n = e === vF ? x : S(e);
24146
24189
  return n ? [[e, XP(t, n)]] : [];
24147
24190
  })));
24148
24191
  }, [e]), !e?.answers.length) return null;
24149
- let S = YP(b, c[vF]), C = e.answers, w = C.map((e) => ({
24192
+ let C = YP(x, l[vF]), w = e.answers, T = w.map((e) => ({
24150
24193
  answer: e,
24151
- target: ZP(e, a.targets[e.tracker.id])
24152
- })), T = w.filter(({ target: e }) => e.kind === "check" && e.sendable).map(({ answer: e }) => e), E = !T.length, D = tF(T.map((e) => e.tracker.scoreScale)), O = (e, t) => {
24153
- t.remove || l((n) => ({
24194
+ target: ZP(e, o.targets[e.tracker.id])
24195
+ })), E = T.filter(({ target: e }) => e.kind === "check" && e.sendable).map(({ answer: e }) => e), D = !E.length, O = tF(E.map((e) => e.tracker.scoreScale)), k = (e, t) => {
24196
+ t.remove || u((n) => ({
24154
24197
  ...n,
24155
24198
  [e]: {
24156
24199
  ...n[e],
24157
24200
  ...t
24158
24201
  }
24159
24202
  }));
24160
- }, k = (e, t) => {
24161
- O(vF, e);
24203
+ }, A = (e, t) => {
24204
+ k(vF, e);
24162
24205
  let n = {
24163
- ...S,
24206
+ ...C,
24164
24207
  ...e
24165
24208
  }, r = {};
24166
- for (let { answer: t, target: i } of w) {
24209
+ for (let { answer: t, target: i } of T) {
24167
24210
  if (i.kind !== "check" || !i.checked) continue;
24168
24211
  let a = t.tracker.id;
24169
24212
  if (!GP(t)) {
24170
- y.fail(a, e, gF(t));
24213
+ b.fail(a, e, gF(t));
24171
24214
  continue;
24172
24215
  }
24173
24216
  let o = $P(t, e, n);
24174
24217
  o && (r[a] = o);
24175
24218
  }
24176
- y.stage(r, t);
24177
- }, A = (e, t, n) => {
24178
- let r = e.tracker.id, i = YP(JP(e, b.total), c[r]);
24179
- O(r, t);
24219
+ b.stage(r, t);
24220
+ }, j = (e, t, n) => {
24221
+ let r = e.tracker.id, i = YP(JP(e, x.total), l[r]);
24222
+ k(r, t);
24180
24223
  let a = $P(e, t, {
24181
24224
  ...i,
24182
24225
  ...t
24183
24226
  });
24184
- a && y.stage({ [r]: a }, n, !0);
24185
- }, j = (e) => {
24186
- let t = y.state(e.tracker.id);
24227
+ a && b.stage({ [r]: a }, n, !0);
24228
+ }, M = (e) => {
24229
+ let t = b.state(e.tracker.id);
24187
24230
  return t.failed?.fields.remove && e.state === "NOT_LISTED" ? {
24188
24231
  ...t,
24189
24232
  failed: void 0
24190
24233
  } : t;
24191
- }, M = (e, t) => {
24192
- t || y.drop(e), o({
24193
- ...a,
24234
+ }, ee = (e, t) => {
24235
+ t || b.drop(e), s({
24236
+ ...o,
24194
24237
  targets: {
24195
- ...a.targets,
24238
+ ...o.targets,
24196
24239
  [e]: t
24197
24240
  }
24198
24241
  });
24199
- }, ee = (e) => {
24200
- let t = i[e.tracker.id], n = e.tracker.id;
24201
- if (!t || f.has(n)) return;
24242
+ }, N = (e) => {
24243
+ let t = a[e.tracker.id], n = e.tracker.id;
24244
+ if (!t || p.has(n)) return;
24202
24245
  let r = t();
24203
- p((e) => new Set(e).add(n)), h(({ [n]: e, ...t }) => t), r.then((t) => fF[t]?.(e.tracker.name), (e) => e instanceof Error ? e.message : String(e)).then((e) => {
24204
- e && h((t) => ({
24246
+ m((e) => new Set(e).add(n)), g(({ [n]: e, ...t }) => t), r.then((t) => fF[t]?.(e.tracker.name), (e) => e instanceof Error ? e.message : String(e)).then((e) => {
24247
+ e && g((t) => ({
24205
24248
  ...t,
24206
24249
  [n]: e
24207
- })), p((e) => {
24250
+ })), m((e) => {
24208
24251
  let t = new Set(e);
24209
24252
  return t.delete(n), t;
24210
24253
  });
24211
24254
  });
24212
- }, N = (e, t) => /* @__PURE__ */ Y("button", {
24255
+ }, te = (e, t) => /* @__PURE__ */ Y("button", {
24213
24256
  type: "button",
24214
24257
  className: t,
24215
24258
  "aria-label": `Log in to ${e.tracker.name}`,
24216
- disabled: !i[e.tracker.id] || f.has(e.tracker.id),
24217
- onClick: () => ee(e),
24218
- children: f.has(e.tracker.id) ? "Logging in" : "Log in"
24219
- }), te = (e) => `${e.tracker.name} counts ${JP(e, b.total).total} episodes, so the row leaves its progress alone`, ne = (e, t) => {
24220
- let n = e.tracker.id, r = e.tracker.name, i = /* @__PURE__ */ X("div", {
24259
+ disabled: !a[e.tracker.id] || p.has(e.tracker.id),
24260
+ onClick: () => N(e),
24261
+ children: p.has(e.tracker.id) ? "Logging in" : "Log in"
24262
+ }), ne = (e) => `${e.tracker.name} counts ${JP(e, x.total).total} episodes, so the row leaves its progress alone`, re = (e, t) => {
24263
+ let r = e.tracker.id, i = e.tracker.name, a = /* @__PURE__ */ X("div", {
24221
24264
  className: "head",
24222
24265
  children: [
24223
24266
  /* @__PURE__ */ Y(bF, { answer: e }),
24224
- r,
24267
+ i,
24225
24268
  e.tracker.account ? /* @__PURE__ */ Y("span", {
24226
24269
  className: "account",
24227
24270
  children: e.tracker.account
@@ -24229,36 +24272,37 @@ var fF = {
24229
24272
  ]
24230
24273
  });
24231
24274
  if (t.kind === "login") return /* @__PURE__ */ X(J, { children: [
24232
- i,
24275
+ a,
24233
24276
  /* @__PURE__ */ Y("span", {
24234
24277
  className: "why",
24235
24278
  children: "Signed out"
24236
24279
  }),
24237
- N(e)
24280
+ te(e)
24238
24281
  ] });
24239
- if (t.kind === "cannot") return /* @__PURE__ */ X(J, { children: [i, /* @__PURE__ */ X("span", {
24282
+ if (t.kind === "cannot") return /* @__PURE__ */ X(J, { children: [a, /* @__PURE__ */ X("span", {
24240
24283
  className: "why",
24241
24284
  children: [
24242
- r,
24285
+ i,
24243
24286
  " cannot track this media: ",
24244
24287
  t.reason
24245
24288
  ]
24246
24289
  })] });
24247
- let a = GP(e), o = JP(e, b.total), s = tF([e.tracker.scoreScale]);
24290
+ let o = GP(e), s = JP(e, x.total), c = tF([e.tracker.scoreScale]);
24248
24291
  return /* @__PURE__ */ X(J, { children: [
24249
- i,
24292
+ a,
24250
24293
  /* @__PURE__ */ Y(xF, {
24251
- name: `card-${n}`,
24252
- shown: YP(o, c[n]),
24253
- scale: s.scale,
24294
+ name: `card-${r}`,
24295
+ movie: n,
24296
+ shown: YP(s, l[r]),
24297
+ scale: c.scale,
24254
24298
  mixed: !1,
24255
- disabled: !a,
24299
+ disabled: !o,
24256
24300
  disabledTitle: gF(e),
24257
24301
  listed: e.state === "LISTED",
24258
- removable: a && e.state === "LISTED",
24259
- onChange: (t, n) => A(e, t, n)
24302
+ removable: o && e.state === "LISTED",
24303
+ onChange: (t, n) => j(e, t, n)
24260
24304
  }),
24261
- a ? void 0 : /* @__PURE__ */ Y("span", {
24305
+ o ? void 0 : /* @__PURE__ */ Y("span", {
24262
24306
  className: "why",
24263
24307
  children: gF(e)
24264
24308
  }),
@@ -24266,15 +24310,15 @@ var fF = {
24266
24310
  className: "why",
24267
24311
  children: e.tracker.writeNotice
24268
24312
  }) : void 0,
24269
- QP(e, b.total) ? /* @__PURE__ */ X("span", {
24313
+ QP(e, x.total) ? /* @__PURE__ */ X("span", {
24270
24314
  className: "why",
24271
- children: [te(e), ": set it here."]
24315
+ children: [ne(e), ": set it here."]
24272
24316
  }) : void 0
24273
24317
  ] });
24274
- }, re = (e) => C.filter((e) => e.state === "LISTED").map((t) => `${t.tracker.name} ${e(t) ?? "none"}`).join(", "), ie = (e, t) => b.differs.includes(e) ? /* @__PURE__ */ Y("span", {
24318
+ }, ie = (e) => w.filter((e) => e.state === "LISTED").map((t) => `${t.tracker.name} ${e(t) ?? "none"}`).join(", "), P = (e, t) => x.differs.includes(e) ? /* @__PURE__ */ Y("span", {
24275
24319
  className: "differs",
24276
24320
  "data-differs": e,
24277
- title: re(t)
24321
+ title: ie(t)
24278
24322
  }) : void 0;
24279
24323
  return /* @__PURE__ */ X("section", {
24280
24324
  css: pF,
@@ -24285,32 +24329,33 @@ var fF = {
24285
24329
  className: "row",
24286
24330
  children: [/* @__PURE__ */ Y(xF, {
24287
24331
  name: "compact",
24288
- shown: S,
24289
- scale: D?.scale ?? "POINT_100",
24290
- mixed: D?.mixed ?? !1,
24291
- disabled: E,
24332
+ movie: n,
24333
+ shown: C,
24334
+ scale: O?.scale ?? "POINT_100",
24335
+ mixed: O?.mixed ?? !1,
24336
+ disabled: D,
24292
24337
  disabledTitle: "Check a list to save to",
24293
- listed: C.some((e) => e.state === "LISTED"),
24294
- removable: T.some((e) => e.state === "LISTED"),
24295
- onChange: k,
24338
+ listed: w.some((e) => e.state === "LISTED"),
24339
+ removable: E.some((e) => e.state === "LISTED"),
24340
+ onChange: A,
24296
24341
  dots: {
24297
- SCORE: ie("SCORE", (e) => qo(e.entry?.score) ? hF(e.entry.score, e.tracker.scoreScale) : void 0),
24298
- STATUS: ie("STATUS", (e) => e.entry?.status ? UP[e.entry.status] : void 0),
24299
- PROGRESS: ie("PROGRESS", (e) => e.entry?.progress == null ? void 0 : String(e.entry.progress))
24342
+ SCORE: P("SCORE", (e) => qo(e.entry?.score) ? hF(e.entry.score, e.tracker.scoreScale) : void 0),
24343
+ STATUS: P("STATUS", (e) => e.entry?.status ? UP[e.entry.status] : void 0),
24344
+ PROGRESS: P("PROGRESS", (e) => e.entry?.progress == null ? void 0 : String(e.entry.progress))
24300
24345
  }
24301
24346
  }), /* @__PURE__ */ Y("div", {
24302
24347
  className: "group platforms",
24303
- children: w.map(({ answer: e, target: t }) => {
24348
+ children: T.map(({ answer: e, target: t }) => {
24304
24349
  let n = e.tracker.id, r = e.tracker.name, i = {
24305
24350
  answer: e,
24306
- open: g === n,
24307
- onOpen: (e) => _((t) => e ? n : t === n ? void 0 : t),
24308
- card: () => ne(e, t)
24351
+ open: _ === n,
24352
+ onOpen: (e) => v((t) => e ? n : t === n ? void 0 : t),
24353
+ card: () => re(e, t)
24309
24354
  };
24310
24355
  if (t.kind === "login") return /* @__PURE__ */ Y(SF, {
24311
24356
  ...i,
24312
24357
  className: "chip login",
24313
- children: N(e, "login-button")
24358
+ children: te(e, "login-button")
24314
24359
  }, n);
24315
24360
  if (t.kind === "cannot") return /* @__PURE__ */ Y(SF, {
24316
24361
  ...i,
@@ -24325,7 +24370,7 @@ var fF = {
24325
24370
  })
24326
24371
  })
24327
24372
  }, n);
24328
- let { busy: a, failed: o } = j(e), s = e.state === "PAUSED" || e.state === "ERROR" ? gF(e) : void 0;
24373
+ let { busy: a, failed: o } = M(e), s = e.state === "PAUSED" || e.state === "ERROR" ? gF(e) : void 0;
24329
24374
  return /* @__PURE__ */ X(SF, {
24330
24375
  ...i,
24331
24376
  className: `chip${t.checked ? "" : " off"}`,
@@ -24338,7 +24383,7 @@ var fF = {
24338
24383
  "aria-label": `Save to ${r}`,
24339
24384
  "aria-describedby": s ? `compact-hint-${n}` : void 0,
24340
24385
  checked: t.checked,
24341
- onChange: (e) => M(n, e.currentTarget.checked)
24386
+ onChange: (e) => ee(n, e.currentTarget.checked)
24342
24387
  }), /* @__PURE__ */ Y("span", {
24343
24388
  className: "slot",
24344
24389
  children: a ? /* @__PURE__ */ Y(vf, {
@@ -24372,13 +24417,13 @@ var fF = {
24372
24417
  }),
24373
24418
  /* @__PURE__ */ Y("div", {
24374
24419
  className: "notes",
24375
- children: w.flatMap(({ answer: e, target: t }) => {
24376
- let n = e.tracker.id, r = e.tracker.name, { failed: i, refused: a } = j(e);
24420
+ children: T.flatMap(({ answer: e, target: t }) => {
24421
+ let n = e.tracker.id, r = e.tracker.name, { failed: i, refused: a } = M(e);
24377
24422
  return [
24378
- m[n] && e.state === "SIGNED_OUT" ? /* @__PURE__ */ Y("div", {
24423
+ h[n] && e.state === "SIGNED_OUT" ? /* @__PURE__ */ Y("div", {
24379
24424
  className: "note",
24380
24425
  "data-note": n,
24381
- children: m[n]
24426
+ children: h[n]
24382
24427
  }, `${n}-sign-in`) : void 0,
24383
24428
  i ? /* @__PURE__ */ X("div", {
24384
24429
  className: "note problem",
@@ -24392,7 +24437,7 @@ var fF = {
24392
24437
  /* @__PURE__ */ Y("button", {
24393
24438
  type: "button",
24394
24439
  disabled: !GP(e),
24395
- onClick: () => y.retry(n),
24440
+ onClick: () => b.retry(n),
24396
24441
  children: "Retry"
24397
24442
  })
24398
24443
  ]
@@ -24406,16 +24451,16 @@ var fF = {
24406
24451
  a,
24407
24452
  /* @__PURE__ */ Y("button", {
24408
24453
  type: "button",
24409
- onClick: () => y.dismiss(n),
24454
+ onClick: () => b.dismiss(n),
24410
24455
  children: "Dismiss"
24411
24456
  })
24412
24457
  ]
24413
24458
  }, `${n}-refused`) : void 0,
24414
- t.kind === "check" && t.sendable && QP(e, b.total) ? /* @__PURE__ */ X("div", {
24459
+ t.kind === "check" && t.sendable && QP(e, x.total) ? /* @__PURE__ */ X("div", {
24415
24460
  className: "note",
24416
24461
  "data-note": n,
24417
24462
  children: [
24418
- te(e),
24463
+ ne(e),
24419
24464
  ": set it on ",
24420
24465
  r,
24421
24466
  "'s card, from its logo."
@@ -24427,7 +24472,7 @@ var fF = {
24427
24472
  /* @__PURE__ */ Y("div", {
24428
24473
  className: "sr-only",
24429
24474
  role: "status",
24430
- children: u
24475
+ children: d
24431
24476
  })
24432
24477
  ]
24433
24478
  });
@@ -24439,24 +24484,25 @@ var wF = iy("\n subscription MediaTracking($input: TrackingInput!) {\n track
24439
24484
  tracker: "",
24440
24485
  outcome: "FAILED",
24441
24486
  error: e ?? "The write did not reach the trackers"
24442
- }], jF = ({ uri: e, title: t, cover: n, episodeCount: r, prefsStore: i = kF }) => {
24443
- let [{ data: a }] = Ho({
24487
+ }], jF = ({ uri: e, title: t, cover: n, episodeCount: r, movie: i, prefsStore: a = kF }) => {
24488
+ let [{ data: o }] = Ho({
24444
24489
  query: wF,
24445
24490
  variables: { input: { uri: e } },
24446
24491
  pause: !e
24447
- }), [, o] = Bo(TF), [, s] = Bo(EF), [{ data: c }] = Ho({ query: DF }), [, u] = Bo(OF), [f, p] = I(i.read), m = a?.tracking?.answers;
24492
+ }), [, s] = Bo(TF), [, c] = Bo(EF), [{ data: u }] = Ho({ query: DF }), [, f] = Bo(OF), [p, m] = I(a.read), h = o?.tracking?.answers;
24448
24493
  return L(() => {
24449
- m && d(m, b, pe);
24450
- }, [m]), L(() => {
24494
+ h && d(h, b, pe);
24495
+ }, [h]), L(() => {
24451
24496
  let e = (e) => {
24452
- e.key === "stub.tracking.compact" && p(i.read());
24497
+ e.key === "stub.tracking.compact" && m(a.read());
24453
24498
  };
24454
24499
  return globalThis.addEventListener?.("storage", e), () => globalThis.removeEventListener?.("storage", e);
24455
- }, [i]), /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(CF, {
24456
- tracking: a?.tracking,
24500
+ }, [a]), /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(CF, {
24501
+ tracking: o?.tracking,
24457
24502
  episodeCount: r,
24503
+ movie: i,
24458
24504
  onSaveFields: async (i, a) => {
24459
- let s = await o({ input: {
24505
+ let o = await s({ input: {
24460
24506
  uri: e,
24461
24507
  trackers: i,
24462
24508
  entry: a,
@@ -24464,26 +24510,26 @@ var wF = iy("\n subscription MediaTracking($input: TrackingInput!) {\n track
24464
24510
  cover: n ?? null,
24465
24511
  episodeCount: r ?? null
24466
24512
  } });
24467
- return s.data?.saveListEntry ?? AF(s.error?.message);
24513
+ return o.data?.saveListEntry ?? AF(o.error?.message);
24468
24514
  },
24469
24515
  onRemove: async (t) => {
24470
- let n = await s({ input: {
24516
+ let n = await c({ input: {
24471
24517
  uri: e,
24472
24518
  trackers: t
24473
24519
  } });
24474
24520
  return n.data?.deleteListEntry ?? AF(n.error?.message);
24475
24521
  },
24476
24522
  signIns: l,
24477
- prefs: f,
24523
+ prefs: p,
24478
24524
  onPrefs: (e) => {
24479
- i.write(e), p(e);
24525
+ a.write(e), m(e);
24480
24526
  }
24481
24527
  }), /* @__PURE__ */ Y(HP, {
24482
- storage: c?.stubTrackerStorage,
24528
+ storage: u?.stubTrackerStorage,
24483
24529
  onUnlock: async () => {
24484
24530
  await zP() && await M();
24485
24531
  },
24486
- onAdd: () => u({})
24532
+ onAdd: () => f({})
24487
24533
  })] });
24488
24534
  }, MF = ({ onClose: e, children: t, ...n }) => {
24489
24535
  let { refs: r, context: i } = M_({
@@ -24532,35 +24578,65 @@ var wF = iy("\n subscription MediaTracking($input: TrackingInput!) {\n track
24532
24578
  if (!n.length) return !1;
24533
24579
  let r = new Set(FF(t));
24534
24580
  return n.some((e) => r.has(e));
24535
- }, LF = (e, t) => t?.find((t) => IF(t.uri, e)), RF = (e, t) => e?.find((e) => !t.has(e.url))?.url, zF = /^\d{4}-\d{2}-\d{2}$/, BF = 1900, VF = (e) => {
24581
+ }, LF = (e, t) => t?.find((t) => IF(t.uri, e)), RF = /^\d{4}-\d{2}-\d{2}$/, zF = 1900, BF = (e) => {
24536
24582
  if (!e) return;
24537
24583
  let t = new Date(e);
24538
- if (!Number.isNaN(t.getTime()) && !(t.getUTCFullYear() < BF)) return t;
24539
- }, HF = (e, { locale: t } = {}) => {
24540
- let n = VF(e);
24584
+ if (!Number.isNaN(t.getTime()) && !(t.getUTCFullYear() < zF)) return t;
24585
+ }, VF = (e, { locale: t } = {}) => {
24586
+ let n = BF(e);
24541
24587
  if (n) try {
24542
24588
  return new Intl.DateTimeFormat(t, {
24543
24589
  year: "numeric",
24544
24590
  month: "short",
24545
24591
  day: "numeric",
24546
- ...zF.test(e) ? { timeZone: "UTC" } : {}
24592
+ ...RF.test(e) ? { timeZone: "UTC" } : {}
24547
24593
  }).format(n);
24548
24594
  } catch {
24549
24595
  return;
24550
24596
  }
24551
- }, UF = (e, t) => t ? Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) : Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), WF = 864e5, GF = (e, { locale: t, now: n = /* @__PURE__ */ new Date() } = {}) => {
24552
- let r = VF(e);
24597
+ }, HF = (e, t) => t ? Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) : Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), UF = 864e5, WF = (e, { locale: t, now: n = /* @__PURE__ */ new Date() } = {}) => {
24598
+ let r = BF(e);
24553
24599
  if (!r) return;
24554
- let i = Math.round((UF(n, !1) - UF(r, zF.test(e))) / WF);
24555
- return i === 0 ? "today" : i === 1 ? "yesterday" : i > 1 && i < 30 ? `${i} days ago` : HF(e, { locale: t });
24600
+ let i = Math.round((HF(n, !1) - HF(r, RF.test(e))) / UF);
24601
+ return i === 0 ? "today" : i === 1 ? "yesterday" : i > 1 && i < 30 ? `${i} days ago` : VF(e, { locale: t });
24602
+ }, GF = (e) => {
24603
+ let t = BF(e);
24604
+ if (t) return RF.test(e) ? e : t.toISOString();
24556
24605
  }, KF = (e) => {
24557
- let t = VF(e);
24558
- if (t) return zF.test(e) ? e : t.toISOString();
24559
- }, qF = /* @__PURE__ */ new Set(["cr", "nf"]), JF = (e) => qF.has(e) && !ee().includes(e);
24606
+ if (!e || e <= 0) return;
24607
+ let t = Math.floor(e / 60), n = Math.round(e % 60);
24608
+ return t ? n ? `${t}h ${n}m` : `${t}h` : `${n}m`;
24609
+ }, qF = ({ released: e, runtime: t, genres: n }) => {
24610
+ let r = BF(e)?.getUTCFullYear();
24611
+ return [
24612
+ "Movie",
24613
+ r ? String(r) : void 0,
24614
+ KF(t),
24615
+ n?.length ? n.slice(0, 3).join(", ") : void 0
24616
+ ].filter((e) => !!e);
24617
+ }, JF = (e, t = /* @__PURE__ */ new Date()) => {
24618
+ let n = BF(e);
24619
+ return n ? Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()) > Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : !1;
24620
+ }, YF = (e, t) => e?.find((e) => !t.has(e.url))?.url, XF = /* @__PURE__ */ new Set(["cr", "nf"]), ZF = (e) => XF.has(e) && !ee().includes(e);
24621
+ //#endregion
24622
+ //#region src/components/origin-icon.tsx
24623
+ V();
24624
+ var QF = ({ icon: e, name: t }) => {
24625
+ let [n, r] = I(!1);
24626
+ return n ? /* @__PURE__ */ Y("span", {
24627
+ className: "letter",
24628
+ "aria-hidden": "true",
24629
+ children: t.charAt(0)
24630
+ }) : /* @__PURE__ */ Y("img", {
24631
+ src: e,
24632
+ alt: "",
24633
+ onError: () => r(!0)
24634
+ });
24635
+ };
24560
24636
  //#endregion
24561
24637
  //#region src/components/source-popup.tsx
24562
24638
  V();
24563
- var YF = H`
24639
+ var $F = H`
24564
24640
  position: fixed;
24565
24641
  inset: 0;
24566
24642
  z-index: ${$_.sourcePopup};
@@ -24628,7 +24704,7 @@ var YF = H`
24628
24704
  color: rgba(255, 255, 255, 0.55);
24629
24705
  font-size: 1.4rem;
24630
24706
  }
24631
- `, XF = ({ pluginUri: e, origin: t, name: n, uris: r, onPick: i, onClose: a }) => {
24707
+ `, eI = ({ pluginUri: e, origin: t, name: n, uris: r, onPick: i, onClose: a }) => {
24632
24708
  let o = R(null), [s, l] = I("");
24633
24709
  return L(() => {
24634
24710
  let n = o.current;
@@ -24656,7 +24732,7 @@ var YF = H`
24656
24732
  };
24657
24733
  return addEventListener("keydown", e), () => removeEventListener("keydown", e);
24658
24734
  }, [a]), /* @__PURE__ */ Y("div", {
24659
- css: YF,
24735
+ css: $F,
24660
24736
  role: "dialog",
24661
24737
  "aria-modal": "true",
24662
24738
  "aria-label": `Choose a source from ${n}`,
@@ -24689,7 +24765,7 @@ var YF = H`
24689
24765
  //#endregion
24690
24766
  //#region src/components/source-selector.tsx
24691
24767
  V();
24692
- var ZF = {
24768
+ var tI = {
24693
24769
  cr: "#f47521",
24694
24770
  nf: "#e50914",
24695
24771
  jw: "#fcd53f",
@@ -24701,7 +24777,7 @@ var ZF = {
24701
24777
  peacock: "#069de0",
24702
24778
  paramount: "#0064ff",
24703
24779
  fubo: "#fa4616"
24704
- }, QF = "#9aa0a6", $F = (e) => e.color || ZF[e.id] || QF, eI = H`
24780
+ }, nI = "#9aa0a6", rI = (e) => e.color || tI[e.id] || nI, iI = H`
24705
24781
  display: flex;
24706
24782
  flex-direction: column;
24707
24783
  gap: 1.1rem;
@@ -24721,7 +24797,7 @@ var ZF = {
24721
24797
  }
24722
24798
 
24723
24799
  .source {
24724
- --brand: ${QF};
24800
+ --brand: ${nI};
24725
24801
  position: relative;
24726
24802
  display: flex;
24727
24803
  align-items: center;
@@ -24932,13 +25008,13 @@ var ZF = {
24932
25008
  0%, 100% { transform: scaleY(0.35); }
24933
25009
  50% { transform: scaleY(1); }
24934
25010
  }
24935
- `, tI = H`
25011
+ `, aI = H`
24936
25012
  display: flex;
24937
25013
  align-items: center;
24938
25014
  gap: 0.7rem;
24939
25015
 
24940
25016
  .src {
24941
- --brand: ${QF};
25017
+ --brand: ${nI};
24942
25018
  display: flex;
24943
25019
  text-decoration: none;
24944
25020
  border-radius: 0.6rem;
@@ -24978,7 +25054,7 @@ var ZF = {
24978
25054
  background: color-mix(in srgb, var(--brand) 30%, rgba(255, 255, 255, 0.05));
24979
25055
  }
24980
25056
  }
24981
- `, nI = ({ source: e }) => {
25057
+ `, oI = ({ source: e }) => {
24982
25058
  let [t, n] = I(!1);
24983
25059
  return /* @__PURE__ */ Y("span", {
24984
25060
  className: "icon",
@@ -24988,21 +25064,21 @@ var ZF = {
24988
25064
  onError: () => n(!0)
24989
25065
  }) : e.name.charAt(0)
24990
25066
  });
24991
- }, rI = ({ sources: e, compact: t = !1, onPickRelease: n }) => {
25067
+ }, sI = ({ sources: e, compact: t = !1, onPickRelease: n }) => {
24992
25068
  let [r, i] = I(null);
24993
25069
  return e.length ? t ? /* @__PURE__ */ Y("div", {
24994
- css: tI,
25070
+ css: aI,
24995
25071
  children: e.map((e) => /* @__PURE__ */ Y("a", {
24996
25072
  className: "src",
24997
- style: { "--brand": $F(e) },
25073
+ style: { "--brand": rI(e) },
24998
25074
  href: e.href,
24999
25075
  target: e.external ? "_blank" : void 0,
25000
25076
  rel: e.external ? "noreferrer" : void 0,
25001
25077
  title: `Watch on ${e.name}`,
25002
- children: /* @__PURE__ */ Y(nI, { source: e })
25078
+ children: /* @__PURE__ */ Y(oI, { source: e })
25003
25079
  }, e.id))
25004
25080
  }) : /* @__PURE__ */ X("div", {
25005
- css: eI,
25081
+ css: iI,
25006
25082
  children: [
25007
25083
  /* @__PURE__ */ Y("div", {
25008
25084
  className: "label",
@@ -25010,18 +25086,18 @@ var ZF = {
25010
25086
  }),
25011
25087
  /* @__PURE__ */ Y("div", {
25012
25088
  className: "list",
25013
- children: e.map((e) => e.releases && e.releases.length > 1 ? /* @__PURE__ */ Y(iI, {
25089
+ children: e.map((e) => e.releases && e.releases.length > 1 ? /* @__PURE__ */ Y(cI, {
25014
25090
  source: e,
25015
25091
  onOpenPicker: () => i(e)
25016
25092
  }, e.id) : /* @__PURE__ */ X("a", {
25017
25093
  className: `source${e.active ? " active" : ""}`,
25018
- style: { "--brand": $F(e) },
25094
+ style: { "--brand": rI(e) },
25019
25095
  href: e.href,
25020
25096
  target: e.external ? "_blank" : void 0,
25021
25097
  rel: e.external ? "noreferrer" : void 0,
25022
25098
  title: e.name,
25023
25099
  children: [
25024
- /* @__PURE__ */ Y(nI, { source: e }),
25100
+ /* @__PURE__ */ Y(oI, { source: e }),
25025
25101
  /* @__PURE__ */ Y("span", {
25026
25102
  className: "name",
25027
25103
  children: e.name
@@ -25043,7 +25119,7 @@ var ZF = {
25043
25119
  ]
25044
25120
  }, e.id))
25045
25121
  }),
25046
- r?.picker ? /* @__PURE__ */ Y(XF, {
25122
+ r?.picker ? /* @__PURE__ */ Y(eI, {
25047
25123
  pluginUri: r.picker.pluginUri,
25048
25124
  origin: r.id,
25049
25125
  name: r.name,
@@ -25055,21 +25131,21 @@ var ZF = {
25055
25131
  }) : void 0
25056
25132
  ]
25057
25133
  }) : null;
25058
- }, iI = ({ source: e, onOpenPicker: t }) => {
25134
+ }, cI = ({ source: e, onOpenPicker: t }) => {
25059
25135
  let n = e.releases ?? [], [r, i] = I(n.some((e) => e.active)), a = !!e.picker;
25060
25136
  return /* @__PURE__ */ X("div", {
25061
25137
  className: "source-group",
25062
- style: { "--brand": $F(e) },
25138
+ style: { "--brand": rI(e) },
25063
25139
  children: [/* @__PURE__ */ X("button", {
25064
25140
  type: "button",
25065
25141
  className: `source${e.active ? " active" : ""}`,
25066
- style: { "--brand": $F(e) },
25142
+ style: { "--brand": rI(e) },
25067
25143
  onClick: () => a ? t() : i((e) => !e),
25068
25144
  title: `${n.length} releases on ${e.name}`,
25069
25145
  "aria-expanded": a ? void 0 : r,
25070
25146
  "aria-haspopup": a ? "dialog" : void 0,
25071
25147
  children: [
25072
- /* @__PURE__ */ Y(nI, { source: e }),
25148
+ /* @__PURE__ */ Y(oI, { source: e }),
25073
25149
  /* @__PURE__ */ Y("span", {
25074
25150
  className: "name",
25075
25151
  children: e.name
@@ -25111,11 +25187,11 @@ var ZF = {
25111
25187
  }, e.uri))
25112
25188
  }) : void 0]
25113
25189
  });
25114
- }, aI = (e) => [...new Set((e?.handles ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node.origin))];
25190
+ }, lI = (e) => [...new Set((e?.handles ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node.origin))];
25115
25191
  //#endregion
25116
25192
  //#region src/router/home/media-modal.tsx
25117
25193
  V();
25118
- var oI = H`
25194
+ var uI = H`
25119
25195
  z-index: ${$_.mediaModal};
25120
25196
  padding: 5rem 1rem;
25121
25197
  background-color: hsla(0, 0%, 0%, 0.439);
@@ -25216,6 +25292,58 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25216
25292
  height: 4rem;
25217
25293
  width: 4rem;
25218
25294
  }
25295
+ & > .letter {
25296
+ display: flex;
25297
+ align-items: center;
25298
+ justify-content: center;
25299
+ height: 4rem;
25300
+ width: 4rem;
25301
+ border-radius: 0.6rem;
25302
+ background: rgba(255, 255, 255, 0.1);
25303
+ font-size: 1.8rem;
25304
+ font-weight: 700;
25305
+ }
25306
+ }
25307
+ }
25308
+ }
25309
+
25310
+ & > .movie {
25311
+ display: flex;
25312
+ flex-direction: column;
25313
+ gap: 1.4rem;
25314
+ margin: 1rem 0 2rem;
25315
+
25316
+ & > .facts {
25317
+ font-size: 1.5rem;
25318
+ color: rgba(255, 255, 255, 0.65);
25319
+ }
25320
+
25321
+ & > .play-bar {
25322
+ display: flex;
25323
+ flex-wrap: wrap;
25324
+ align-items: center;
25325
+ gap: 1rem 1.6rem;
25326
+
25327
+ & > .play {
25328
+ display: inline-flex;
25329
+ align-items: center;
25330
+ gap: 0.8rem;
25331
+ height: 4.4rem;
25332
+ padding: 0 2.4rem 0 2rem;
25333
+ border-radius: 0.6rem;
25334
+ background: #fff;
25335
+ color: #000;
25336
+ font-size: 1.7rem;
25337
+ font-weight: 700;
25338
+ text-decoration: none;
25339
+ }
25340
+
25341
+ & > .play:hover { background: rgba(255, 255, 255, 0.85); }
25342
+ & > .play:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }
25343
+
25344
+ & > .when {
25345
+ font-size: 1.5rem;
25346
+ color: rgba(255, 255, 255, 0.8);
25219
25347
  }
25220
25348
  }
25221
25349
  }
@@ -25397,33 +25525,74 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25397
25525
  }
25398
25526
  }
25399
25527
  }
25400
- `, sI = iy("\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n"), cI = iy("\n subscription GetMediaModalOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n ...OriginFragment\n }\n }\n }\n"), lI = ({ episode: e, index: t, mediaUri: n, isMovie: r }) => {
25401
- let [i, a] = I(() => /* @__PURE__ */ new Set()), o = RF(e.thumbnails, i), s = e.releaseDate ?? e.handles?.find((e) => e.node.releaseDate)?.node.releaseDate, c = GF(s), l = aI(e), [{ data: u }] = Ho({
25402
- query: cI,
25528
+ `, dI = iy("\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n startDate\n genres\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n runtime\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n"), fI = iy("\n subscription GetMediaModalOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n ...OriginFragment\n }\n }\n }\n"), pI = (e) => e?.releaseDate ?? e?.handles?.find((e) => e.node.releaseDate)?.node.releaseDate, mI = (e, t) => {
25529
+ let n = e ? lI(e) : void 0, [{ data: r }] = Ho({
25530
+ query: fI,
25403
25531
  variables: { input: {
25404
- ids: l,
25532
+ ids: n ?? [],
25405
25533
  filters: [Lu.IsNotApiOnly]
25406
25534
  } },
25407
- pause: !l
25408
- }), d = (u?.originPage?.nodes ?? []).map((t) => {
25409
- let r = (e?.handles ?? []).filter((e) => e.relation === "SAME_AS" && e.node.origin === t.id).map((e) => e.node), i = r.at(0), a = i?.uri, o = !!(JF(t.id) && i?.url), s = e.uri ? r.length > 1 ? Au(K.WATCH, {
25410
- mediaUri: n,
25535
+ pause: !n
25536
+ });
25537
+ return e ? (r?.originPage?.nodes ?? []).map((n) => {
25538
+ let r = (e?.handles ?? []).filter((e) => e.relation === "SAME_AS" && e.node.origin === n.id).map((e) => e.node), i = r.at(0), a = i?.uri, o = !!(ZF(n.id) && i?.url), s = e.uri ? r.length > 1 ? Au(K.WATCH, {
25539
+ mediaUri: t,
25411
25540
  episodeUri: e.uri
25412
25541
  }) : a ? Au(K.WATCH, {
25413
- mediaUri: n,
25542
+ mediaUri: t,
25414
25543
  episodeUri: e.uri,
25415
25544
  sourceUri: a
25416
25545
  }) : void 0 : void 0, c = r.length > 1;
25417
25546
  return {
25418
- id: t.id,
25419
- name: t.name ?? t.id,
25420
- icon: t.icon,
25421
- color: t.color,
25547
+ id: n.id,
25548
+ name: n.name ?? n.id,
25549
+ icon: n.icon,
25550
+ color: n.color,
25422
25551
  href: c || o ? s : i?.url ?? void 0,
25423
25552
  external: !c && !o,
25424
25553
  active: !1
25425
25554
  };
25426
- }).filter((e) => e.href).sort((e, t) => Number(e.external) - Number(t.external)).slice(0, 5);
25555
+ }).filter((e) => e.href).sort((e, t) => Number(e.external) - Number(t.external)).slice(0, 5) : [];
25556
+ }, hI = ({ episode: e, mediaUri: t, startDate: n, genres: r }) => {
25557
+ let i = mI(e, t), a = pI(e) ?? n, o = JF(a), s = o ? void 0 : i.find((e) => !e.external && e.href), c = VF(a);
25558
+ return /* @__PURE__ */ X("div", {
25559
+ className: "movie",
25560
+ children: [/* @__PURE__ */ Y("div", {
25561
+ className: "facts",
25562
+ children: qF({
25563
+ released: a,
25564
+ runtime: e?.runtime,
25565
+ genres: r
25566
+ }).join(" · ")
25567
+ }), /* @__PURE__ */ X("div", {
25568
+ className: "play-bar",
25569
+ children: [
25570
+ s?.href ? /* @__PURE__ */ X(Cu, {
25571
+ className: "play",
25572
+ href: s.href,
25573
+ children: [/* @__PURE__ */ Y(Tf, {
25574
+ size: 20,
25575
+ fill: "currentColor",
25576
+ "aria-hidden": "true"
25577
+ }), "Play"]
25578
+ }) : void 0,
25579
+ i.length ? /* @__PURE__ */ Y(sI, {
25580
+ compact: !0,
25581
+ sources: i
25582
+ }) : void 0,
25583
+ o && c ? /* @__PURE__ */ X("span", {
25584
+ className: "when",
25585
+ children: ["Releases ", c]
25586
+ }) : void 0,
25587
+ !o && !i.length ? /* @__PURE__ */ Y("span", {
25588
+ className: "when",
25589
+ children: "No source stub knows of plays it yet"
25590
+ }) : void 0
25591
+ ]
25592
+ })]
25593
+ });
25594
+ }, gI = ({ episode: e, index: t, mediaUri: n }) => {
25595
+ let [r, i] = I(() => /* @__PURE__ */ new Set()), a = YF(e.thumbnails, r), o = pI(e), s = WF(o), c = mI(e, n);
25427
25596
  return /* @__PURE__ */ X("div", {
25428
25597
  className: "episode",
25429
25598
  children: [
@@ -25434,31 +25603,16 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25434
25603
  episodeUri: e.uri
25435
25604
  })
25436
25605
  }) : void 0,
25437
- r ? void 0 : /* @__PURE__ */ Y("div", {
25606
+ /* @__PURE__ */ Y("div", {
25438
25607
  className: "number",
25439
25608
  children: e.episodeNumber
25440
25609
  }),
25441
- o ? /* @__PURE__ */ Y("img", {
25610
+ a ? /* @__PURE__ */ Y("img", {
25442
25611
  className: "thumbnail",
25443
- src: o,
25444
- onError: () => a((e) => new Set(e).add(o))
25612
+ src: a,
25613
+ onError: () => i((e) => new Set(e).add(a))
25445
25614
  }) : /* @__PURE__ */ Y("div", { className: "thumbnail" }),
25446
- r ? /* @__PURE__ */ Y("div", {
25447
- className: "content",
25448
- children: /* @__PURE__ */ X("div", {
25449
- className: "header",
25450
- children: [/* @__PURE__ */ Y("div", {
25451
- className: "title",
25452
- children: "Play"
25453
- }), /* @__PURE__ */ Y("span", {
25454
- className: "origins",
25455
- children: /* @__PURE__ */ Y(rI, {
25456
- compact: !0,
25457
- sources: d
25458
- })
25459
- })]
25460
- })
25461
- }) : e.titles?.length ? /* @__PURE__ */ X("div", {
25615
+ e.titles?.length ? /* @__PURE__ */ X("div", {
25462
25616
  className: "content",
25463
25617
  children: [/* @__PURE__ */ X("div", {
25464
25618
  className: "header",
@@ -25467,9 +25621,9 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25467
25621
  children: e.titles.at(0)?.title
25468
25622
  }), /* @__PURE__ */ Y("span", {
25469
25623
  className: "origins",
25470
- children: /* @__PURE__ */ Y(rI, {
25624
+ children: /* @__PURE__ */ Y(sI, {
25471
25625
  compact: !0,
25472
- sources: d
25626
+ sources: c
25473
25627
  })
25474
25628
  })]
25475
25629
  }), e.shortDescriptions?.at(0) ? /* @__PURE__ */ Y("div", {
@@ -25491,15 +25645,15 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25491
25645
  }),
25492
25646
  /* @__PURE__ */ Y("div", {
25493
25647
  className: "side",
25494
- children: c ? /* @__PURE__ */ Y("time", {
25648
+ children: s ? /* @__PURE__ */ Y("time", {
25495
25649
  className: "date",
25496
- dateTime: KF(s),
25497
- children: c
25650
+ dateTime: GF(o),
25651
+ children: s
25498
25652
  }) : void 0
25499
25653
  })
25500
25654
  ]
25501
25655
  });
25502
- }, uI = ({ mediaNodes: e }) => {
25656
+ }, _I = ({ mediaNodes: e }) => {
25503
25657
  let t = pu(), n = {
25504
25658
  ...t,
25505
25659
  uri: Ib(t.uri)
@@ -25508,78 +25662,78 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25508
25662
  o((e) => e && Bb(Pb(e), Pb(n.uri ?? "")) ? e : n.uri);
25509
25663
  }, [n.uri]);
25510
25664
  let [{ data: s }] = Ho({
25511
- query: sI,
25665
+ query: dI,
25512
25666
  variables: {
25513
25667
  input: { uri: a },
25514
25668
  descriptionInput: { type: Mu.Html }
25515
25669
  },
25516
25670
  pause: !a
25517
25671
  }), c = s?.media ?? i, l = s?.media?.uri ? zb(s.media.uri)?.handleUrisValues : void 0, u = [.../* @__PURE__ */ new Set([...l?.map((e) => e.origin) ?? [], ...c?.handles?.map((e) => e.node.origin) ?? []])], [{ data: d }] = Ho({
25518
- query: cI,
25672
+ query: fI,
25519
25673
  variables: { input: {
25520
25674
  ids: u,
25521
25675
  filters: [Lu.IsNotApiOnly]
25522
25676
  } },
25523
25677
  pause: !u
25524
- }), f = z(() => c?.titles?.at(0)?.title, [c]), p = z(() => c && "descriptions" in c && c.descriptions.sort((e, t) => t.description.length - e.description.length)?.at(0)?.description, [c]), m = ky(c?.covers), [h, g] = I([]), [_, v] = I(), y = z(() => {
25525
- let e = (c?.trailers ?? []).filter((e) => !h.includes(e.uri));
25526
- return e.find((e) => e.uri === _) ?? e.at(0);
25678
+ }), f = z(() => c?.titles?.at(0)?.title, [c]), p = !!(c && "categories" in c && c.categories?.includes(ju.Movie) && ("episodes" in c ? c.episodes?.length ?? 0 : 0) <= 1), m = z(() => c && "descriptions" in c && c.descriptions.sort((e, t) => t.description.length - e.description.length)?.at(0)?.description, [c]), h = ky(c?.covers), [g, _] = I([]), [v, y] = I(), b = z(() => {
25679
+ let e = (c?.trailers ?? []).filter((e) => !g.includes(e.uri));
25680
+ return e.find((e) => e.uri === v) ?? e.at(0);
25527
25681
  }, [
25528
25682
  c?.trailers,
25529
- h,
25530
- _
25683
+ g,
25684
+ v
25531
25685
  ]);
25532
25686
  L(() => {
25533
- y?.uri && y.uri !== _ && v(y.uri);
25534
- }, [y?.uri, _]);
25535
- let b = B(() => {
25536
- y && g([...h, y.uri]);
25537
- }, [y, h]), [x, S] = I(!0), [C, w] = I(!1), [T, E] = I(!0), [D, O] = I(.25);
25687
+ b?.uri && b.uri !== v && y(b.uri);
25688
+ }, [b?.uri, v]);
25689
+ let x = B(() => {
25690
+ b && _([...g, b.uri]);
25691
+ }, [b, g]), [S, C] = I(!0), [w, T] = I(!1), [E, D] = I(!0), [O, k] = I(.25);
25538
25692
  return L(() => {
25539
25693
  Fb(c?.uri, n.uri) && r(`${Au(K.MEDIA, { uri: c.uri })}${location.search}`, { replace: !0 });
25540
- }, [c?.uri, n.uri]), x ? /* @__PURE__ */ X(MF, {
25694
+ }, [c?.uri, n.uri]), S ? /* @__PURE__ */ X(MF, {
25541
25695
  "data-party-scroll": !0,
25542
- css: oI,
25543
- onClose: () => S(!1),
25696
+ css: uI,
25697
+ onClose: () => C(!1),
25544
25698
  children: [/* @__PURE__ */ X("div", {
25545
25699
  className: "trailer",
25546
- style: !y?.url && m ? { backgroundImage: `url(${m})` } : {},
25547
- children: [y?.url ? /* @__PURE__ */ Y(my, {
25548
- url: y.url,
25700
+ style: !b?.url && h ? { backgroundImage: `url(${h})` } : {},
25701
+ children: [b?.url ? /* @__PURE__ */ Y(my, {
25702
+ url: b.url,
25549
25703
  className: "player",
25550
- onError: b,
25551
- paused: C,
25552
- volume: T ? 0 : D
25553
- }, y.url) : void 0, /* @__PURE__ */ X("div", {
25554
- className: `player-controls ${y?.url ? "" : "hidden"}`,
25704
+ onError: x,
25705
+ paused: w,
25706
+ volume: E ? 0 : O
25707
+ }, b.url) : void 0, /* @__PURE__ */ X("div", {
25708
+ className: `player-controls ${b?.url ? "" : "hidden"}`,
25555
25709
  children: [/* @__PURE__ */ X("span", {
25556
25710
  className: "playback",
25557
- children: [C ? /* @__PURE__ */ Y(Tf, {
25711
+ children: [w ? /* @__PURE__ */ Y(Tf, {
25558
25712
  className: "icon-outline",
25559
25713
  size: 30,
25560
25714
  strokeWidth: 3,
25561
25715
  color: "black",
25562
- onClick: () => w(!1)
25716
+ onClick: () => T(!1)
25563
25717
  }) : /* @__PURE__ */ Y(wf, {
25564
25718
  className: "icon-outline",
25565
25719
  size: 30,
25566
25720
  strokeWidth: 3,
25567
25721
  color: "black",
25568
- onClick: () => w(!0)
25569
- }), C ? /* @__PURE__ */ Y(Tf, {
25722
+ onClick: () => T(!0)
25723
+ }), w ? /* @__PURE__ */ Y(Tf, {
25570
25724
  className: "icon-body",
25571
25725
  size: 30,
25572
- onClick: () => w(!1)
25726
+ onClick: () => T(!1)
25573
25727
  }) : /* @__PURE__ */ Y(wf, {
25574
25728
  className: "icon-body",
25575
25729
  size: 30,
25576
- onClick: () => w(!0)
25730
+ onClick: () => T(!0)
25577
25731
  })]
25578
25732
  }), /* @__PURE__ */ Y(_y, {
25579
- defaultMuted: T,
25580
- onMutedUpdate: E,
25581
- defaultVolume: D,
25582
- onVolumeUpdate: (e) => O(e)
25733
+ defaultMuted: E,
25734
+ onMutedUpdate: D,
25735
+ defaultVolume: O,
25736
+ onVolumeUpdate: (e) => k(e)
25583
25737
  })]
25584
25738
  })]
25585
25739
  }), /* @__PURE__ */ X("div", {
@@ -25603,25 +25757,39 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25603
25757
  target: "_blank",
25604
25758
  rel: "noreferrer",
25605
25759
  title: e.name,
25606
- children: /* @__PURE__ */ Y("img", { src: e.icon })
25760
+ children: /* @__PURE__ */ Y(QF, {
25761
+ icon: e.icon,
25762
+ name: e.name ?? e.id
25763
+ })
25607
25764
  }) : /* @__PURE__ */ Y("div", {
25608
25765
  className: "origin",
25609
- children: /* @__PURE__ */ Y("img", { src: e.icon })
25766
+ title: e.name,
25767
+ children: /* @__PURE__ */ Y(QF, {
25768
+ icon: e.icon,
25769
+ name: e.name ?? e.id
25770
+ })
25610
25771
  });
25611
25772
  }).filter(Boolean)
25612
25773
  })
25613
25774
  ]
25614
25775
  }),
25776
+ p && c ? /* @__PURE__ */ Y(hI, {
25777
+ episode: "episodes" in c ? c.episodes?.at(0) : void 0,
25778
+ mediaUri: c.uri,
25779
+ startDate: "startDate" in c ? c.startDate : void 0,
25780
+ genres: "genres" in c ? c.genres : void 0
25781
+ }) : void 0,
25615
25782
  /* @__PURE__ */ Y(jF, {
25616
25783
  uri: s?.media?.uri,
25617
25784
  title: f,
25618
- cover: m,
25619
- episodeCount: s?.media?.episodeCount
25785
+ cover: h,
25786
+ episodeCount: s?.media?.episodeCount,
25787
+ movie: p
25620
25788
  }),
25621
- p ? /* @__PURE__ */ Y(ub, {
25789
+ m ? /* @__PURE__ */ Y(ub, {
25622
25790
  collapsedHeight: 200,
25623
25791
  className: "description",
25624
- children: /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: p } })
25792
+ children: /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: m } })
25625
25793
  }) : void 0,
25626
25794
  /* @__PURE__ */ Y(dx, {
25627
25795
  relations: c && "relations" in c ? c.relations ?? [] : [],
@@ -25630,19 +25798,18 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25630
25798
  currentUris: c?.handles?.map((e) => e.node.uri) ?? []
25631
25799
  })
25632
25800
  }),
25633
- /* @__PURE__ */ Y("div", {
25801
+ p ? void 0 : /* @__PURE__ */ Y("div", {
25634
25802
  className: "episodes",
25635
- children: c && "episodes" in c && c.episodes?.map((e, t) => /* @__PURE__ */ Y(lI, {
25803
+ children: c && "episodes" in c && c.episodes?.map((e, t) => /* @__PURE__ */ Y(gI, {
25636
25804
  episode: e,
25637
25805
  index: t,
25638
- mediaUri: c.uri,
25639
- isMovie: "categories" in c && c.categories?.includes(ju.Movie)
25806
+ mediaUri: c.uri
25640
25807
  }, e.episodeNumber ?? e.uri ?? t))
25641
25808
  })
25642
25809
  ]
25643
25810
  })]
25644
25811
  }) : /* @__PURE__ */ Y(Eu, { to: "/" });
25645
- }, dI = [
25812
+ }, vI = [
25646
25813
  {
25647
25814
  label: "All",
25648
25815
  value: null
@@ -25659,7 +25826,7 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25659
25826
  label: "Movies",
25660
25827
  value: ju.Movie
25661
25828
  }
25662
- ], fI = H`
25829
+ ], yI = H`
25663
25830
  display: flex;
25664
25831
  gap: 0.6rem;
25665
25832
 
@@ -25681,37 +25848,37 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25681
25848
  color: #000;
25682
25849
  border-color: #fff;
25683
25850
  }
25684
- `, pI = ({ value: e, onChange: t }) => /* @__PURE__ */ Y("div", {
25685
- css: fI,
25686
- children: dI.map((n) => /* @__PURE__ */ Y("button", {
25851
+ `, bI = ({ value: e, onChange: t }) => /* @__PURE__ */ Y("div", {
25852
+ css: yI,
25853
+ children: vI.map((n) => /* @__PURE__ */ Y("button", {
25687
25854
  className: e === n.value ? "tab active" : "tab",
25688
25855
  onClick: () => t(n.value),
25689
25856
  children: n.label
25690
25857
  }, n.label))
25691
- }), mI = (e) => e._id ?? e.uri ?? "", hI = (e, t) => {
25858
+ }), xI = (e) => e._id ?? e.uri ?? "", SI = (e, t) => {
25692
25859
  let n = new Map(t.map((e, t) => [e, t])), r = [], i = [];
25693
- for (let t of e) (n.has(mI(t)) ? r : i).push(t);
25694
- return r.sort((e, t) => n.get(mI(e)) - n.get(mI(t))), [...r, ...i];
25695
- }, gI = (e) => e.map(mI).filter(Boolean);
25860
+ for (let t of e) (n.has(xI(t)) ? r : i).push(t);
25861
+ return r.sort((e, t) => n.get(xI(e)) - n.get(xI(t))), [...r, ...i];
25862
+ }, CI = (e) => e.map(xI).filter(Boolean);
25696
25863
  //#endregion
25697
25864
  //#region src/router/home/index.tsx
25698
25865
  V();
25699
- var _I = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n }\n"), vI = H`
25866
+ var wI = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n }\n"), TI = H`
25700
25867
  .category-bar {
25701
25868
  position: relative;
25702
25869
  z-index: ${$_.categoryBar};
25703
25870
  padding: 1.5rem 3rem 0.5rem;
25704
25871
  }
25705
- `, yI = kP(), bI = {
25706
- season: cd(yI.season),
25707
- year: yI.year
25708
- }, xI = bd(bI), SI = () => {
25872
+ `, EI = kP(), DI = {
25873
+ season: cd(EI.season),
25874
+ year: EI.year
25875
+ }, OI = bd(DI), kI = () => {
25709
25876
  let [e] = vu(ku(K.MEDIA)), [t, n] = I(null), [{ data: r }] = Ho({
25710
- query: _I,
25877
+ query: wI,
25711
25878
  variables: {
25712
25879
  input: {
25713
- season: bI.season,
25714
- seasonYear: bI.year,
25880
+ season: DI.season,
25881
+ seasonYear: DI.year,
25715
25882
  sorts: [Pu.PopularityDesc],
25716
25883
  ...t ? { categories: [t] } : {}
25717
25884
  },
@@ -25719,52 +25886,52 @@ var _I = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $sh
25719
25886
  }
25720
25887
  }), i = r?.mediaPage?.nodes, a = R([]), o = z(() => {
25721
25888
  if (!i?.length) return i || [];
25722
- let e = hI(i, a.current);
25723
- return a.current = gI(e), e;
25889
+ let e = SI(i, a.current);
25890
+ return a.current = CI(e), e;
25724
25891
  }, [i]);
25725
25892
  return /* @__PURE__ */ X("div", {
25726
- css: vI,
25893
+ css: TI,
25727
25894
  children: [
25728
25895
  /* @__PURE__ */ Y(jy, { mediaNodes: o }),
25729
25896
  /* @__PURE__ */ Y("div", {
25730
25897
  className: "category-bar",
25731
- children: /* @__PURE__ */ Y(pI, {
25898
+ children: /* @__PURE__ */ Y(bI, {
25732
25899
  value: t,
25733
25900
  onChange: n
25734
25901
  })
25735
25902
  }),
25736
25903
  /* @__PURE__ */ Y(cb, {
25737
25904
  title: "Current season",
25738
- titleTo: xI,
25905
+ titleTo: OI,
25739
25906
  mediaNodes: o
25740
25907
  }),
25741
- e && /* @__PURE__ */ Y(uI, { mediaNodes: o })
25908
+ e && /* @__PURE__ */ Y(_I, { mediaNodes: o })
25742
25909
  ]
25743
25910
  });
25744
- }, CI = (e, t) => {
25911
+ }, AI = (e, t) => {
25745
25912
  let n = e.nextAiringEpisode?.airingAt;
25746
25913
  if (!n) return;
25747
25914
  let r = new Date(n).getTime();
25748
25915
  return Number.isFinite(r) ? r - t : void 0;
25749
- }, wI = (e) => e == null ? void 0 : `${e} episode${e === 1 ? "" : "s"}`, TI = (e, t) => {
25916
+ }, jI = (e) => e == null ? void 0 : `${e} episode${e === 1 ? "" : "s"}`, MI = (e, t) => {
25750
25917
  if (!e) return;
25751
25918
  let n = e.trim().replace(/^#/, ""), r = n.length === 3 ? n.split("").map((e) => e + e).join("") : n.length === 6 ? n : void 0;
25752
25919
  if (!r || !/^[0-9a-f]{6}$/i.test(r)) return;
25753
25920
  let i = parseInt(r, 16);
25754
25921
  return `rgba(${i >> 16 & 255}, ${i >> 8 & 255}, ${i & 255}, ${t})`;
25755
- }, EI = (e) => ({
25756
- "--accent": TI(e, 1) ?? "rgba(255, 255, 255, 0.75)",
25757
- "--accent-soft": TI(e, .18) ?? "rgba(255, 255, 255, 0.08)",
25758
- "--accent-wash": TI(e, .07) ?? "rgba(255, 255, 255, 0.03)"
25759
- }), DI = (e, t = 2) => {
25922
+ }, NI = (e) => ({
25923
+ "--accent": MI(e, 1) ?? "rgba(255, 255, 255, 0.75)",
25924
+ "--accent-soft": MI(e, .18) ?? "rgba(255, 255, 255, 0.08)",
25925
+ "--accent-wash": MI(e, .07) ?? "rgba(255, 255, 255, 0.03)"
25926
+ }), PI = (e, t = 2) => {
25760
25927
  if (!Number.isFinite(e) || e <= 0) return;
25761
25928
  let n = [], r = e;
25762
- for (let e of OI) {
25929
+ for (let e of FI) {
25763
25930
  let i = Math.floor(r / e.ms);
25764
25931
  if (r -= i * e.ms, i && (n.push(`${i} ${i === 1 ? e.singular : e.plural}`), n.length >= t)) break;
25765
25932
  }
25766
25933
  return n.length ? n.join(", ") : void 0;
25767
- }, OI = [
25934
+ }, FI = [
25768
25935
  {
25769
25936
  ms: 864e5,
25770
25937
  singular: "day",
@@ -25789,23 +25956,23 @@ var _I = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $sh
25789
25956
  //#endregion
25790
25957
  //#region src/utils/use-now.ts
25791
25958
  V();
25792
- var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25959
+ var II = 3e4, LI = /* @__PURE__ */ new Set(), RI, zI = () => {
25793
25960
  let [e, t] = I(() => Date.now());
25794
- return L(() => (AI.add(t), jI ??= setInterval(() => {
25961
+ return L(() => (LI.add(t), RI ??= setInterval(() => {
25795
25962
  let e = Date.now();
25796
- for (let t of AI) t(e);
25797
- }, kI), () => {
25798
- AI.delete(t), !AI.size && jI && (clearInterval(jI), jI = void 0);
25963
+ for (let t of LI) t(e);
25964
+ }, II), () => {
25965
+ LI.delete(t), !LI.size && RI && (clearInterval(RI), RI = void 0);
25799
25966
  }), []), e;
25800
- }, NI = (e) => e >= 75 ? "good" : e >= 60 ? "mixed" : "poor", PI = {
25967
+ }, BI = (e) => e >= 75 ? "good" : e >= 60 ? "mixed" : "poor", VI = {
25801
25968
  good: jf,
25802
25969
  mixed: bf,
25803
25970
  poor: mf
25804
- }, FI = {
25971
+ }, HI = {
25805
25972
  good: "#4ade80",
25806
25973
  mixed: "#fb923c",
25807
25974
  poor: "#f87171"
25808
- }, II = H`
25975
+ }, UI = H`
25809
25976
  display: inline-flex;
25810
25977
  align-items: center;
25811
25978
  gap: 0.6rem;
@@ -25814,21 +25981,21 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25814
25981
  .face {
25815
25982
  display: flex;
25816
25983
  }
25817
- `, LI = ({ percent: e, size: t = 18 }) => {
25818
- let n = PI[NI(e)];
25984
+ `, WI = ({ percent: e, size: t = 18 }) => {
25985
+ let n = VI[BI(e)];
25819
25986
  return /* @__PURE__ */ X("span", {
25820
- css: II,
25987
+ css: UI,
25821
25988
  "aria-label": `Rated ${e} percent`,
25822
25989
  children: [/* @__PURE__ */ Y("span", {
25823
25990
  className: "face",
25824
- style: { color: FI[NI(e)] },
25991
+ style: { color: HI[BI(e)] },
25825
25992
  children: /* @__PURE__ */ Y(n, { size: t })
25826
25993
  }), /* @__PURE__ */ X("span", {
25827
25994
  className: "value",
25828
25995
  children: [e, "%"]
25829
25996
  })]
25830
25997
  });
25831
- }, RI = H`
25998
+ }, GI = H`
25832
25999
  display: grid;
25833
26000
  grid-template-columns: 15rem minmax(0, 1fr);
25834
26001
  height: 23rem;
@@ -25948,12 +26115,12 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25948
26115
  .description { -webkit-line-clamp: 3; }
25949
26116
  .chips { display: none; }
25950
26117
  }
25951
- `, zI = ({ media: e, to: t }) => {
25952
- let n = MI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = DI(CI(e, n) ?? 0), o = e.nextAiringEpisode?.episodeNumber, s = Sd(e.type), c = wd(e.season, e.seasonYear), l = [s, wI(e.episodeCount)].filter(Boolean).join(" • ");
26118
+ `, KI = ({ media: e, to: t }) => {
26119
+ let n = zI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = PI(AI(e, n) ?? 0), o = e.nextAiringEpisode?.episodeNumber, s = Sd(e.type), c = wd(e.season, e.seasonYear), l = [s, jI(e.episodeCount)].filter(Boolean).join(" • ");
25953
26120
  return /* @__PURE__ */ X(Cu, {
25954
26121
  to: t,
25955
- css: RI,
25956
- style: EI(i),
26122
+ css: GI,
26123
+ style: NI(i),
25957
26124
  children: [/* @__PURE__ */ Y("div", {
25958
26125
  className: "cover",
25959
26126
  style: r ? { backgroundImage: `url(${r})` } : void 0,
@@ -25985,7 +26152,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25985
26152
  })] }) : /* @__PURE__ */ Y("div", {
25986
26153
  className: "airing-value",
25987
26154
  children: Cd(e.status) ?? "Unknown status"
25988
- }) }), e.averageScore != null && /* @__PURE__ */ Y(LI, { percent: e.averageScore })]
26155
+ }) }), e.averageScore != null && /* @__PURE__ */ Y(WI, { percent: e.averageScore })]
25989
26156
  }),
25990
26157
  l && /* @__PURE__ */ Y("div", {
25991
26158
  className: "meta",
@@ -26005,7 +26172,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26005
26172
  ]
26006
26173
  })]
26007
26174
  });
26008
- }, BI = H`
26175
+ }, qI = H`
26009
26176
  display: grid;
26010
26177
  grid-template-columns: 5rem minmax(0, 1fr) 11rem 11rem 17rem;
26011
26178
  align-items: center;
@@ -26084,12 +26251,12 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26084
26251
  .score { display: none; }
26085
26252
  .chips { display: none; }
26086
26253
  }
26087
- `, VI = ({ media: e, to: t }) => {
26088
- let n = MI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = DI(CI(e, n) ?? 0, 1), o = e.nextAiringEpisode?.episodeNumber;
26254
+ `, JI = ({ media: e, to: t }) => {
26255
+ let n = zI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = PI(AI(e, n) ?? 0, 1), o = e.nextAiringEpisode?.episodeNumber;
26089
26256
  return /* @__PURE__ */ X(Cu, {
26090
26257
  to: t,
26091
- css: BI,
26092
- style: EI(i),
26258
+ css: qI,
26259
+ style: NI(i),
26093
26260
  children: [
26094
26261
  /* @__PURE__ */ Y("div", {
26095
26262
  className: "cover",
@@ -26110,7 +26277,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26110
26277
  }),
26111
26278
  /* @__PURE__ */ X("div", {
26112
26279
  className: "column score",
26113
- children: [e.averageScore != null && /* @__PURE__ */ Y(LI, {
26280
+ children: [e.averageScore != null && /* @__PURE__ */ Y(WI, {
26114
26281
  percent: e.averageScore,
26115
26282
  size: 17
26116
26283
  }), e.popularity != null && /* @__PURE__ */ X("span", {
@@ -26122,7 +26289,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26122
26289
  className: "column format",
26123
26290
  children: [/* @__PURE__ */ Y("span", { children: Sd(e.type) }), e.episodeCount != null && /* @__PURE__ */ Y("span", {
26124
26291
  className: "secondary",
26125
- children: wI(e.episodeCount)
26292
+ children: jI(e.episodeCount)
26126
26293
  })]
26127
26294
  }),
26128
26295
  /* @__PURE__ */ X("div", {
@@ -26139,7 +26306,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26139
26306
  })
26140
26307
  ]
26141
26308
  });
26142
- }, HI = [
26309
+ }, YI = [
26143
26310
  {
26144
26311
  value: "grid",
26145
26312
  label: "Covers"
@@ -26152,27 +26319,27 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26152
26319
  value: "list",
26153
26320
  label: "List"
26154
26321
  }
26155
- ], UI = "grid", WI = "stub-search-display-mode", GI = HI.map((e) => e.value), KI = (e) => GI.includes(e) ? e : UI, qI = () => {
26322
+ ], XI = "grid", ZI = "stub-search-display-mode", QI = YI.map((e) => e.value), $I = (e) => QI.includes(e) ? e : XI, eL = () => {
26156
26323
  try {
26157
26324
  return globalThis.localStorage;
26158
26325
  } catch {
26159
26326
  return;
26160
26327
  }
26161
- }, JI = (e = qI()) => {
26328
+ }, tL = (e = eL()) => {
26162
26329
  try {
26163
- return KI(e?.getItem(WI));
26330
+ return $I(e?.getItem(ZI));
26164
26331
  } catch {
26165
- return UI;
26332
+ return XI;
26166
26333
  }
26167
- }, YI = (e, t = qI()) => {
26334
+ }, nL = (e, t = eL()) => {
26168
26335
  try {
26169
- t?.setItem(WI, e);
26336
+ t?.setItem(ZI, e);
26170
26337
  } catch {}
26171
- }, XI = {
26338
+ }, rL = {
26172
26339
  grid: gf,
26173
26340
  card: hf,
26174
26341
  list: _f
26175
- }, ZI = H`
26342
+ }, iL = H`
26176
26343
  display: inline-flex;
26177
26344
  gap: 0.4rem;
26178
26345
  padding: 0.4rem;
@@ -26199,12 +26366,12 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26199
26366
  background: rgba(255, 255, 255, 0.12);
26200
26367
  color: #fff;
26201
26368
  }
26202
- `, QI = ({ mode: e, onChange: t }) => /* @__PURE__ */ Y("div", {
26203
- css: ZI,
26369
+ `, aL = ({ mode: e, onChange: t }) => /* @__PURE__ */ Y("div", {
26370
+ css: iL,
26204
26371
  role: "group",
26205
26372
  "aria-label": "Result layout",
26206
- children: HI.map((n) => {
26207
- let r = XI[n.value];
26373
+ children: YI.map((n) => {
26374
+ let r = rL[n.value];
26208
26375
  return /* @__PURE__ */ Y("button", {
26209
26376
  type: "button",
26210
26377
  title: n.label,
@@ -26218,7 +26385,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26218
26385
  //#endregion
26219
26386
  //#region src/components/filter-select.tsx
26220
26387
  V();
26221
- var $I = H`
26388
+ var oL = H`
26222
26389
  display: flex;
26223
26390
  flex-direction: column;
26224
26391
  gap: 0.7rem;
@@ -26267,7 +26434,7 @@ var $I = H`
26267
26434
  }
26268
26435
 
26269
26436
  .control.open .chevron { transform: rotate(180deg); }
26270
- `, eL = H`
26437
+ `, sL = H`
26271
26438
  z-index: ${$_.filterMenu};
26272
26439
  width: max-content;
26273
26440
  min-width: 22rem;
@@ -26341,7 +26508,7 @@ var $I = H`
26341
26508
  font-size: 1.4rem;
26342
26509
  color: rgba(255, 255, 255, 0.4);
26343
26510
  }
26344
- `, tL = ({ label: e, placeholder: t = "Any", options: n, selected: r, onChange: i, multiple: a = !1, searchable: o = !1, allowCustom: s = !1 }) => {
26511
+ `, cL = ({ label: e, placeholder: t = "Any", options: n, selected: r, onChange: i, multiple: a = !1, searchable: o = !1, allowCustom: s = !1 }) => {
26345
26512
  let [c, l] = I(!1), [u, d] = I(""), f = `filter-${e.toLowerCase().replace(/[^a-z]+/g, "-")}`, { refs: p, floatingStyles: m, context: h } = M_({
26346
26513
  open: c,
26347
26514
  onOpenChange: (e) => {
@@ -26382,7 +26549,7 @@ var $I = H`
26382
26549
  i(r.includes(e) ? r.filter((t) => t !== e) : [...r, e]);
26383
26550
  };
26384
26551
  return /* @__PURE__ */ X("div", {
26385
- css: $I,
26552
+ css: oL,
26386
26553
  children: [
26387
26554
  /* @__PURE__ */ Y("span", {
26388
26555
  className: "label",
@@ -26409,7 +26576,7 @@ var $I = H`
26409
26576
  initialFocus: o ? 0 : -1,
26410
26577
  children: /* @__PURE__ */ X("div", {
26411
26578
  ref: p.setFloating,
26412
- css: eL,
26579
+ css: sL,
26413
26580
  style: m,
26414
26581
  ..._(),
26415
26582
  children: [o && /* @__PURE__ */ X("div", {
@@ -26446,8 +26613,8 @@ var $I = H`
26446
26613
  }) })
26447
26614
  ]
26448
26615
  });
26449
- }, nL = ({ label: e, children: t }) => /* @__PURE__ */ X("div", {
26450
- css: $I,
26616
+ }, lL = ({ label: e, children: t }) => /* @__PURE__ */ X("div", {
26617
+ css: oL,
26451
26618
  children: [/* @__PURE__ */ Y("span", {
26452
26619
  className: "label",
26453
26620
  children: e
@@ -26456,7 +26623,7 @@ var $I = H`
26456
26623
  //#endregion
26457
26624
  //#region src/router/search/index.tsx
26458
26625
  V();
26459
- var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n color\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n genres\n tags\n averageScore\n status\n type\n season\n seasonYear\n nextAiringEpisode {\n episodeNumber\n airingAt\n }\n }\n }\n }\n"), iL = H`
26626
+ var uL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n color\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n genres\n tags\n averageScore\n status\n type\n season\n seasonYear\n nextAiringEpisode {\n episodeNumber\n airingAt\n }\n }\n }\n }\n"), dL = H`
26460
26627
  padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
26461
26628
  min-height: 100vh;
26462
26629
 
@@ -26593,14 +26760,14 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26593
26760
  gap: 1.2rem;
26594
26761
  }
26595
26762
  }
26596
- `, aL = (() => {
26763
+ `, fL = (() => {
26597
26764
  let e = [];
26598
26765
  for (let t = md(); t >= pd; t--) e.push({
26599
26766
  value: String(t),
26600
26767
  label: String(t)
26601
26768
  });
26602
26769
  return e;
26603
- })(), oL = (e) => ({
26770
+ })(), pL = (e) => ({
26604
26771
  ...e.query ? { search: e.query } : { sorts: [Pu.PopularityDesc] },
26605
26772
  ...e.category ? { categories: [e.category] } : {},
26606
26773
  ...e.status ? { status: e.status } : {},
@@ -26609,7 +26776,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26609
26776
  ...e.formats.length ? { formats: e.formats } : {},
26610
26777
  ...e.genres.length ? { genres: e.genres } : {},
26611
26778
  ...e.tags.length ? { tags: e.tags } : {}
26612
- }), sL = () => {
26779
+ }), mL = () => {
26613
26780
  let e = gu(), [, t] = hu(), n = z(() => gd(e), [e]), r = Td(n), i = Ed(n), a = (e) => t(bd({
26614
26781
  ...n,
26615
26782
  ...e
@@ -26621,15 +26788,15 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26621
26788
  let e = setTimeout(() => a({ query: o }), 350);
26622
26789
  return () => clearTimeout(e);
26623
26790
  }, [o, e]);
26624
- let l = z(() => oL(n), [n]), [{ data: u }] = Ho({
26625
- query: rL,
26791
+ let l = z(() => pL(n), [n]), [{ data: u }] = Ho({
26792
+ query: uL,
26626
26793
  variables: {
26627
26794
  input: l,
26628
26795
  shortDescriptionInput: { count: 1 }
26629
26796
  },
26630
26797
  pause: !i
26631
- }), [d, f] = I(JI), p = (e) => {
26632
- f(e), YI(e);
26798
+ }), [d, f] = I(tL), p = (e) => {
26799
+ f(e), nL(e);
26633
26800
  }, [m, h] = I(!1);
26634
26801
  L(() => {
26635
26802
  h(!1);
@@ -26676,14 +26843,14 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26676
26843
  },
26677
26844
  card: {
26678
26845
  className: "cards",
26679
- item: (e) => /* @__PURE__ */ Y(zI, {
26846
+ item: (e) => /* @__PURE__ */ Y(KI, {
26680
26847
  media: e,
26681
26848
  to: Au(K.MEDIA, { uri: e.uri })
26682
26849
  }, e._id)
26683
26850
  },
26684
26851
  list: {
26685
26852
  className: "rows",
26686
- item: (e) => /* @__PURE__ */ Y(VI, {
26853
+ item: (e) => /* @__PURE__ */ Y(JI, {
26687
26854
  media: e,
26688
26855
  to: Au(K.MEDIA, { uri: e.uri })
26689
26856
  }, e._id)
@@ -26726,14 +26893,14 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26726
26893
  }))
26727
26894
  ];
26728
26895
  return /* @__PURE__ */ X("div", {
26729
- css: iL,
26896
+ css: dL,
26730
26897
  children: [
26731
26898
  /* @__PURE__ */ X("div", {
26732
26899
  className: "heading-row",
26733
26900
  children: [/* @__PURE__ */ Y("div", {
26734
26901
  className: "heading",
26735
26902
  children: xd(n)
26736
- }), /* @__PURE__ */ Y(QI, {
26903
+ }), /* @__PURE__ */ Y(aL, {
26737
26904
  mode: d,
26738
26905
  onChange: p
26739
26906
  })]
@@ -26741,7 +26908,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26741
26908
  /* @__PURE__ */ X("div", {
26742
26909
  className: "filters",
26743
26910
  children: [
26744
- /* @__PURE__ */ Y(nL, {
26911
+ /* @__PURE__ */ Y(lL, {
26745
26912
  label: "Search",
26746
26913
  children: /* @__PURE__ */ X("div", {
26747
26914
  className: "text-field",
@@ -26755,7 +26922,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26755
26922
  })]
26756
26923
  })
26757
26924
  }),
26758
- /* @__PURE__ */ Y(tL, {
26925
+ /* @__PURE__ */ Y(cL, {
26759
26926
  label: "Genres & Tags",
26760
26927
  options: [...y, ...b],
26761
26928
  selected: S,
@@ -26764,33 +26931,33 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26764
26931
  searchable: !0,
26765
26932
  allowCustom: !0
26766
26933
  }),
26767
- /* @__PURE__ */ Y(tL, {
26934
+ /* @__PURE__ */ Y(cL, {
26768
26935
  label: "Year",
26769
- options: aL,
26936
+ options: fL,
26770
26937
  selected: n.year ? [String(n.year)] : [],
26771
26938
  onChange: (e) => a({ year: e.length ? Number(e[0]) : null }),
26772
26939
  searchable: !0
26773
26940
  }),
26774
- /* @__PURE__ */ Y(tL, {
26941
+ /* @__PURE__ */ Y(cL, {
26775
26942
  label: "Season",
26776
26943
  options: td,
26777
26944
  selected: n.season ? [n.season] : [],
26778
26945
  onChange: (e) => a({ season: e[0] ?? null })
26779
26946
  }),
26780
- /* @__PURE__ */ Y(tL, {
26947
+ /* @__PURE__ */ Y(cL, {
26781
26948
  label: "Format",
26782
26949
  options: $u,
26783
26950
  selected: n.formats,
26784
26951
  onChange: (e) => a({ formats: e }),
26785
26952
  multiple: !0
26786
26953
  }),
26787
- /* @__PURE__ */ Y(tL, {
26954
+ /* @__PURE__ */ Y(cL, {
26788
26955
  label: "Airing Status",
26789
26956
  options: ed,
26790
26957
  selected: n.status ? [n.status] : [],
26791
26958
  onChange: (e) => a({ status: e[0] ?? null })
26792
26959
  }),
26793
- /* @__PURE__ */ Y(tL, {
26960
+ /* @__PURE__ */ Y(cL, {
26794
26961
  label: "Category",
26795
26962
  options: nd,
26796
26963
  selected: n.category ? [n.category] : [],
@@ -26836,7 +27003,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26836
27003
  })
26837
27004
  ]
26838
27005
  });
26839
- }, cL = H`
27006
+ }, hL = H`
26840
27007
  max-width: 72rem;
26841
27008
  margin: 0 auto;
26842
27009
  padding: calc(var(--stub-header-height) + 3rem) 3rem 6rem;
@@ -26875,10 +27042,10 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26875
27042
  color: #ff8a3d;
26876
27043
  }
26877
27044
  }
26878
- `, lL = ({ children: e }) => /* @__PURE__ */ Y("div", {
26879
- css: cL,
27045
+ `, gL = ({ children: e }) => /* @__PURE__ */ Y("div", {
27046
+ css: hL,
26880
27047
  children: e
26881
- }), uL = () => /* @__PURE__ */ X(lL, { children: [
27048
+ }), _L = () => /* @__PURE__ */ X(gL, { children: [
26882
27049
  /* @__PURE__ */ Y("h1", { children: "Legal & Terms" }),
26883
27050
  /* @__PURE__ */ Y("div", {
26884
27051
  className: "updated",
@@ -26913,12 +27080,12 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26913
27080
  ] }),
26914
27081
  /* @__PURE__ */ Y("h2", { children: "Liability" }),
26915
27082
  /* @__PURE__ */ Y("p", { children: "stub is provided without warranty of any kind. The maintainer is not liable for any damages arising from its use, or for the availability, accuracy, or legality of any third-party service it connects to." })
26916
- ] }), dL = "stub.player.volume", fL = "This browser, in its storage for stub at this address", pL = "This tab, in its storage for stub", mL = [
27083
+ ] }), vL = "stub.player.volume", yL = "This browser, in its storage for stub at this address", bL = "This tab, in its storage for stub", xL = [
26917
27084
  {
26918
27085
  id: "added-sources",
26919
27086
  title: "Added sources",
26920
27087
  what: "The source packages you added from npm, installed for stub through FKN.",
26921
- where: fL,
27088
+ where: yL,
26922
27089
  lasts: "Until you remove them",
26923
27090
  keys: {
26924
27091
  store: "local",
@@ -26929,7 +27096,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26929
27096
  id: "turned-off-sources",
26930
27097
  title: "Sources turned off",
26931
27098
  what: "Which of the sources stub ships with you turned off, so stub does not ask them.",
26932
- where: fL,
27099
+ where: yL,
26933
27100
  lasts: "Until you turn them back on",
26934
27101
  keys: {
26935
27102
  store: "local",
@@ -26940,18 +27107,18 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26940
27107
  id: "search-layout",
26941
27108
  title: "Search layout",
26942
27109
  what: "Whether search shows covers, cards or a list.",
26943
- where: fL,
27110
+ where: yL,
26944
27111
  lasts: "Until you clear this site's data in your browser",
26945
27112
  keys: {
26946
27113
  store: "local",
26947
- names: [WI]
27114
+ names: [ZI]
26948
27115
  }
26949
27116
  },
26950
27117
  {
26951
27118
  id: "quick-tracking",
26952
27119
  title: "Quick tracking choices",
26953
27120
  what: "The trackers you chose not to save to from the tracking row.",
26954
- where: fL,
27121
+ where: yL,
26955
27122
  lasts: "Until you clear this site's data in your browser",
26956
27123
  keys: {
26957
27124
  store: "local",
@@ -26962,7 +27129,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26962
27129
  id: "connected-sites",
26963
27130
  title: "Connected tracking sites",
26964
27131
  what: "Which of AniList and MyAnimeList you signed in to through stub on this device, so stub reaches only those.",
26965
- where: fL,
27132
+ where: yL,
26966
27133
  lasts: "Until you sign out of them",
26967
27134
  keys: {
26968
27135
  store: "local",
@@ -26973,7 +27140,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26973
27140
  id: "site-status",
26974
27141
  title: "Site sign-in states",
26975
27142
  what: "Whether you were signed in to Crunchyroll, AniList and MyAnimeList when stub last learned it, and when. Never your name there.",
26976
- where: fL,
27143
+ where: yL,
26977
27144
  lasts: "Until stub learns it again, or you clear this site's data in your browser",
26978
27145
  keys: {
26979
27146
  store: "local",
@@ -26984,7 +27151,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26984
27151
  id: "party-name",
26985
27152
  title: "Party name",
26986
27153
  what: "The name you gave yourself in a watch party.",
26987
- where: pL,
27154
+ where: bL,
26988
27155
  lasts: "Until you close the tab",
26989
27156
  keys: {
26990
27157
  store: "session",
@@ -26995,7 +27162,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26995
27162
  id: "party-invite",
26996
27163
  title: "Party you are in",
26997
27164
  what: "The watch party this tab is in, so a reload rejoins it.",
26998
- where: pL,
27165
+ where: bL,
26999
27166
  lasts: "Until you leave the party or close the tab",
27000
27167
  keys: {
27001
27168
  store: "session",
@@ -27027,11 +27194,11 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27027
27194
  id: "player",
27028
27195
  title: "Player volume",
27029
27196
  what: "The volume you last left the episode player at, and whether it was muted, so the next episode starts the same. Speed and captions are not kept.",
27030
- where: fL,
27197
+ where: yL,
27031
27198
  lasts: "Until you clear this site's data in your browser",
27032
27199
  keys: {
27033
27200
  store: "local",
27034
- names: [dL]
27201
+ names: [vL]
27035
27202
  }
27036
27203
  },
27037
27204
  {
@@ -27041,7 +27208,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27041
27208
  where: "Memory, in this tab",
27042
27209
  lasts: "Until you refresh or close the tab"
27043
27210
  }
27044
- ], hL = H`
27211
+ ], SL = H`
27045
27212
  display: flex;
27046
27213
  flex-direction: column;
27047
27214
  gap: 1rem;
@@ -27056,7 +27223,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27056
27223
 
27057
27224
  strong { color: #fff; }
27058
27225
  .facts { color: rgba(255, 255, 255, 0.55); }
27059
- `, gL = (e) => e.endsWith(".") ? e : `${e}.`, _L = () => /* @__PURE__ */ X(lL, { children: [
27226
+ `, CL = (e) => e.endsWith(".") ? e : `${e}.`, wL = () => /* @__PURE__ */ X(gL, { children: [
27060
27227
  /* @__PURE__ */ Y("h1", { children: "Privacy" }),
27061
27228
  /* @__PURE__ */ Y("div", {
27062
27229
  className: "updated",
@@ -27080,8 +27247,8 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27080
27247
  ". Clearing this site's data in your browser removes everything stub keeps in this browser."
27081
27248
  ] }),
27082
27249
  /* @__PURE__ */ Y("ul", {
27083
- css: hL,
27084
- children: mL.map((e) => /* @__PURE__ */ X("li", { children: [
27250
+ css: SL,
27251
+ children: xL.map((e) => /* @__PURE__ */ X("li", { children: [
27085
27252
  /* @__PURE__ */ X("strong", { children: [e.title, "."] }),
27086
27253
  " ",
27087
27254
  e.what,
@@ -27090,9 +27257,9 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27090
27257
  className: "facts",
27091
27258
  children: [
27092
27259
  "Where: ",
27093
- gL(e.where),
27260
+ CL(e.where),
27094
27261
  " How long: ",
27095
- gL(e.lasts)
27262
+ CL(e.lasts)
27096
27263
  ]
27097
27264
  })
27098
27265
  ] }, e.id))
@@ -27140,7 +27307,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27140
27307
  //#endregion
27141
27308
  //#region src/router/settings/confirm.tsx
27142
27309
  V();
27143
- var vL = ({ label: e, name: t = e, confirmLabel: n, busyLabel: r, question: i, onConfirm: a, home: o }) => {
27310
+ var TL = ({ label: e, name: t = e, confirmLabel: n, busyLabel: r, question: i, onConfirm: a, home: o }) => {
27144
27311
  let [s, c] = I(!1), [l, u] = I(!1), d = R(null), f = R(null), p = R(null), m = R(!1), h = R(!0), g = ht(), _ = () => {
27145
27312
  let e = document.activeElement;
27146
27313
  return !e || e === document.body || !!p.current?.contains(e);
@@ -27196,7 +27363,7 @@ var vL = ({ label: e, name: t = e, confirmLabel: n, busyLabel: r, question: i, o
27196
27363
  //#endregion
27197
27364
  //#region src/router/settings/accounts.tsx
27198
27365
  V();
27199
- var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27366
+ var EL = (e) => e instanceof Error ? e.message : String(e), DL = (e, t) => {
27200
27367
  switch (t) {
27201
27368
  case "authed": return { text: `Signed in to ${e}.` };
27202
27369
  case "closed": return { text: "The sign-in window closed. If you finished signing in there, stub reads it from now on." };
@@ -27206,17 +27373,17 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27206
27373
  };
27207
27374
  case "unsupported": return { text: `Connected to your browser's own ${e} session.` };
27208
27375
  }
27209
- }, xL = {
27376
+ }, OL = {
27210
27377
  "signed-in": "Signed in",
27211
27378
  "signed-out": "Signed out"
27212
- }, SL = (e, t) => {
27213
- let n = DI(t - e.checkedAt, 1);
27214
- return `${xL[e.state]}, checked ${n ? `${n} ago` : "just now"}`;
27215
- }, CL = (e, t) => {
27379
+ }, kL = (e, t) => {
27380
+ let n = PI(t - e.checkedAt, 1);
27381
+ return `${OL[e.state]}, checked ${n ? `${n} ago` : "just now"}`;
27382
+ }, AL = (e, t) => {
27216
27383
  let [, n] = I(0);
27217
27384
  return L(() => e.watch(t, () => n((e) => e + 1)), [e, t]), e.read(t);
27218
- }, wL = ({ site: e, name: t, backend: n, status: r, onNote: i }) => {
27219
- let [a, o] = I(!1), s = DL();
27385
+ }, jL = ({ site: e, name: t, backend: n, status: r, onNote: i }) => {
27386
+ let [a, o] = I(!1), s = PL();
27220
27387
  return /* @__PURE__ */ Y("button", {
27221
27388
  type: "button",
27222
27389
  className: "secondary",
@@ -27225,7 +27392,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27225
27392
  onClick: () => {
27226
27393
  o(!0), i(void 0), r.check(e, n).catch((e) => {
27227
27394
  s.current && i({
27228
- text: `stub could not tell whether you are signed in to ${t}: ${yL(e)}`,
27395
+ text: `stub could not tell whether you are signed in to ${t}: ${EL(e)}`,
27229
27396
  error: !0
27230
27397
  });
27231
27398
  }).finally(() => {
@@ -27234,7 +27401,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27234
27401
  },
27235
27402
  children: a ? "Checking..." : "Check now"
27236
27403
  });
27237
- }, TL = ({ id: e, title: t, state: n, on: r, heading: i, children: a }) => /* @__PURE__ */ X("div", {
27404
+ }, ML = ({ id: e, title: t, state: n, on: r, heading: i, children: a }) => /* @__PURE__ */ X("div", {
27238
27405
  className: "row account",
27239
27406
  "data-account": e,
27240
27407
  children: [/* @__PURE__ */ X("div", {
@@ -27248,32 +27415,32 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27248
27415
  children: n
27249
27416
  }) : void 0]
27250
27417
  }), a]
27251
- }), EL = ({ note: e }) => /* @__PURE__ */ Y("p", {
27418
+ }), NL = ({ note: e }) => /* @__PURE__ */ Y("p", {
27252
27419
  className: `note${e?.error ? " error" : ""}`,
27253
27420
  role: "status",
27254
27421
  children: e?.text
27255
- }), DL = () => {
27422
+ }), PL = () => {
27256
27423
  let e = R(!0);
27257
27424
  return L(() => () => {
27258
27425
  e.current = !1;
27259
27426
  }, []), e;
27260
- }, OL = "Without the FKN extension, the session is kept by FKN, in the cookie jar every fkn.app app shares, and not by stub.", kL = (e) => `${e} itself is not told, so the session stays valid there until it expires, held by nobody.`, AL = ({ backend: e, crunchyroll: t, status: n, now: r }) => {
27261
- let [i, a] = I(!1), [o, s] = I(), c = DL(), l = R(null), u = CL(n, "crunchyroll"), d = e ? /* @__PURE__ */ Y(wL, {
27427
+ }, FL = "Without the FKN extension, the session is kept by FKN, in the cookie jar every fkn.app app shares, and not by stub.", IL = (e) => `${e} itself is not told, so the session stays valid there until it expires, held by nobody.`, LL = ({ backend: e, crunchyroll: t, status: n, now: r }) => {
27428
+ let [i, a] = I(!1), [o, s] = I(), c = PL(), l = R(null), u = AL(n, "crunchyroll"), d = e ? /* @__PURE__ */ Y(jL, {
27262
27429
  site: "crunchyroll",
27263
27430
  name: "Crunchyroll",
27264
27431
  backend: e,
27265
27432
  status: n,
27266
27433
  onNote: s
27267
27434
  }) : void 0;
27268
- return /* @__PURE__ */ X(TL, {
27435
+ return /* @__PURE__ */ X(ML, {
27269
27436
  id: "crunchyroll",
27270
27437
  title: "Crunchyroll",
27271
- state: u ? SL(u, r()) : "Not checked yet",
27438
+ state: u ? kL(u, r()) : "Not checked yet",
27272
27439
  on: u?.state === "signed-in",
27273
27440
  heading: l,
27274
27441
  children: [
27275
27442
  /* @__PURE__ */ Y("p", { children: "Plays Crunchyroll episodes on your own Crunchyroll account." }),
27276
- e === "cloud" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("p", { children: [OL, " Check now asks Crunchyroll whether that session is signed in, without loading a Crunchyroll page."] }), /* @__PURE__ */ X("div", {
27443
+ e === "cloud" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("p", { children: [FL, " Check now asks Crunchyroll whether that session is signed in, without loading a Crunchyroll page."] }), /* @__PURE__ */ X("div", {
27277
27444
  className: "actions",
27278
27445
  children: [
27279
27446
  u?.state === "signed-in" ? void 0 : /* @__PURE__ */ Y("button", {
@@ -27282,10 +27449,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27282
27449
  onClick: () => {
27283
27450
  let e = t.signIn();
27284
27451
  a(!0), s(void 0), e.then((e) => {
27285
- c.current && s(bL("Crunchyroll", e));
27452
+ c.current && s(DL("Crunchyroll", e));
27286
27453
  }).catch((e) => {
27287
27454
  c.current && s({
27288
- text: yL(e),
27455
+ text: EL(e),
27289
27456
  error: !0
27290
27457
  });
27291
27458
  }).finally(() => {
@@ -27294,18 +27461,18 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27294
27461
  },
27295
27462
  children: i ? "Signing in..." : "Sign in"
27296
27463
  }),
27297
- u?.state === "signed-out" ? void 0 : /* @__PURE__ */ Y(vL, {
27464
+ u?.state === "signed-out" ? void 0 : /* @__PURE__ */ Y(TL, {
27298
27465
  label: "Sign out",
27299
27466
  name: "Sign out of Crunchyroll",
27300
27467
  home: l,
27301
27468
  confirmLabel: "Yes, sign out",
27302
27469
  busyLabel: "Signing out...",
27303
- question: `Sign out of Crunchyroll? This removes its cookies from FKN's jar, which signs every fkn.app app out of Crunchyroll. ${kL("Crunchyroll")}`,
27470
+ question: `Sign out of Crunchyroll? This removes its cookies from FKN's jar, which signs every fkn.app app out of Crunchyroll. ${IL("Crunchyroll")}`,
27304
27471
  onConfirm: () => t.signOut().then(() => {
27305
27472
  c.current && s({ text: "Signed out. FKN no longer holds a Crunchyroll session for fkn.app apps." });
27306
27473
  }, (e) => {
27307
27474
  c.current && s({
27308
- text: `FKN could not remove the Crunchyroll cookies: ${yL(e)}. Try again.`,
27475
+ text: `FKN could not remove the Crunchyroll cookies: ${EL(e)}. Try again.`,
27309
27476
  error: !0
27310
27477
  });
27311
27478
  })
@@ -27322,10 +27489,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27322
27489
  children: "Open crunchyroll.com"
27323
27490
  }), d]
27324
27491
  })] }) : /* @__PURE__ */ Y("p", { children: "Checking whether the FKN extension runs here..." }),
27325
- /* @__PURE__ */ Y(EL, { note: o })
27492
+ /* @__PURE__ */ Y(NL, { note: o })
27326
27493
  ]
27327
27494
  });
27328
- }, jL = [{
27495
+ }, RL = [{
27329
27496
  site: "anilist",
27330
27497
  name: "AniList",
27331
27498
  host: "anilist.co"
@@ -27333,8 +27500,8 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27333
27500
  site: "mal",
27334
27501
  name: "MyAnimeList",
27335
27502
  host: "myanimelist.net"
27336
- }], ML = ({ site: e, name: t, host: n, backend: r, sites: i, status: a, now: o }) => {
27337
- let [s, c] = I(() => i.isConnected(e)), [l, u] = I(!1), [d, f] = I(), p = DL(), m = R(null), h = CL(a, e);
27503
+ }], zL = ({ site: e, name: t, host: n, backend: r, sites: i, status: a, now: o }) => {
27504
+ let [s, c] = I(() => i.isConnected(e)), [l, u] = I(!1), [d, f] = I(), p = PL(), m = R(null), h = AL(a, e);
27338
27505
  L(() => (c(i.isConnected(e)), i.watch(e, () => {
27339
27506
  p.current && c(i.isConnected(e));
27340
27507
  })), [i, e]);
@@ -27343,10 +27510,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27343
27510
  }, _ = () => {
27344
27511
  let n = i.signIn(e);
27345
27512
  u(!0), f(void 0), n.then((e) => {
27346
- p.current && f(bL(t, e));
27513
+ p.current && f(DL(t, e));
27347
27514
  }).catch((e) => {
27348
27515
  p.current && f({
27349
- text: yL(e),
27516
+ text: EL(e),
27350
27517
  error: !0
27351
27518
  });
27352
27519
  }).finally(() => {
@@ -27356,14 +27523,14 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27356
27523
  p.current && f({ text: r === "cloud" ? `Signed out. stub no longer uses ${t} on this device, and FKN no longer holds its session.` : `Disconnected. To sign out of ${t} itself, sign out on ${n}.` }), g();
27357
27524
  }, (e) => {
27358
27525
  p.current && f({
27359
- text: `Disconnected on this device, but FKN could not remove the ${t} cookies: ${yL(e)}. Sign in and out again to retry.`,
27526
+ text: `Disconnected on this device, but FKN could not remove the ${t} cookies: ${EL(e)}. Sign in and out again to retry.`,
27360
27527
  error: !0
27361
27528
  }), g();
27362
27529
  });
27363
- return /* @__PURE__ */ X(TL, {
27530
+ return /* @__PURE__ */ X(ML, {
27364
27531
  id: e,
27365
27532
  title: t,
27366
- state: s ? h ? SL(h, o()) : "Connected on this device" : "Not connected",
27533
+ state: s ? h ? kL(h, o()) : "Connected on this device" : "Not connected",
27367
27534
  on: s && h?.state !== "signed-out",
27368
27535
  heading: m,
27369
27536
  children: [
@@ -27374,24 +27541,24 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27374
27541
  n,
27375
27542
  " session.",
27376
27543
  " ",
27377
- r === "cloud" ? OL : r === "extension" ? `With the FKN extension, stub uses your browser's own ${n} session.` : ""
27544
+ r === "cloud" ? FL : r === "extension" ? `With the FKN extension, stub uses your browser's own ${n} session.` : ""
27378
27545
  ] }),
27379
27546
  r ? /* @__PURE__ */ X("div", {
27380
27547
  className: "actions",
27381
- children: [s ? /* @__PURE__ */ Y(vL, {
27548
+ children: [s ? /* @__PURE__ */ Y(TL, {
27382
27549
  label: r === "cloud" ? "Sign out" : "Disconnect",
27383
27550
  name: r === "cloud" ? `Sign out of ${t}` : `Disconnect ${t}`,
27384
27551
  home: m,
27385
27552
  confirmLabel: r === "cloud" ? "Yes, sign out" : "Yes, disconnect",
27386
27553
  busyLabel: r === "cloud" ? "Signing out..." : "Disconnecting...",
27387
- question: r === "cloud" ? `Sign out of ${t}? stub stops using it on this device, and its cookies leave FKN's jar, which signs every fkn.app app out of ${t}. ${kL(t)}` : `Disconnect ${t}? stub stops using your ${n} session on this device. You stay signed in on ${n}.`,
27554
+ question: r === "cloud" ? `Sign out of ${t}? stub stops using it on this device, and its cookies leave FKN's jar, which signs every fkn.app app out of ${t}. ${IL(t)}` : `Disconnect ${t}? stub stops using your ${n} session on this device. You stay signed in on ${n}.`,
27388
27555
  onConfirm: () => v(r)
27389
27556
  }) : /* @__PURE__ */ Y("button", {
27390
27557
  type: "button",
27391
27558
  disabled: l,
27392
27559
  onClick: _,
27393
27560
  children: l ? "Signing in..." : r === "cloud" ? "Sign in" : "Connect"
27394
- }), s ? /* @__PURE__ */ Y(wL, {
27561
+ }), s ? /* @__PURE__ */ Y(jL, {
27395
27562
  site: e,
27396
27563
  name: t,
27397
27564
  backend: r,
@@ -27399,10 +27566,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27399
27566
  onNote: f
27400
27567
  }) : void 0]
27401
27568
  }) : void 0,
27402
- /* @__PURE__ */ Y(EL, { note: d })
27569
+ /* @__PURE__ */ Y(NL, { note: d })
27403
27570
  ]
27404
27571
  });
27405
- }, NL = ({ backend: e }) => /* @__PURE__ */ Y(TL, {
27572
+ }, BL = ({ backend: e }) => /* @__PURE__ */ Y(ML, {
27406
27573
  id: "netflix",
27407
27574
  title: "Netflix",
27408
27575
  children: e === "extension" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("p", { children: "stub plays Netflix on your browser's own netflix.com session, through the FKN extension, and keeps nothing of it. Sign in and out on netflix.com." }), /* @__PURE__ */ Y("div", {
@@ -27415,25 +27582,25 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27415
27582
  children: "Open netflix.com"
27416
27583
  })
27417
27584
  })] }) : /* @__PURE__ */ Y("p", { children: "Netflix needs the FKN browser extension: stub plays it on your browser's own netflix.com session, and keeps nothing of it." })
27418
- }), PL = ({ backend: e, crunchyroll: t, sites: n, status: r, now: i = Date.now }) => /* @__PURE__ */ X("div", {
27585
+ }), VL = ({ backend: e, crunchyroll: t, sites: n, status: r, now: i = Date.now }) => /* @__PURE__ */ X("div", {
27419
27586
  className: "rows",
27420
27587
  children: [
27421
- /* @__PURE__ */ Y(AL, {
27588
+ /* @__PURE__ */ Y(LL, {
27422
27589
  backend: e,
27423
27590
  crunchyroll: t,
27424
27591
  status: r,
27425
27592
  now: i
27426
27593
  }),
27427
- jL.map((t) => /* @__PURE__ */ Y(ML, {
27594
+ RL.map((t) => /* @__PURE__ */ Y(zL, {
27428
27595
  ...t,
27429
27596
  backend: e,
27430
27597
  sites: n,
27431
27598
  status: r,
27432
27599
  now: i
27433
27600
  }, t.site)),
27434
- /* @__PURE__ */ Y(NL, { backend: e })
27601
+ /* @__PURE__ */ Y(BL, { backend: e })
27435
27602
  ]
27436
- }), FL = [{
27603
+ }), HL = [{
27437
27604
  id: "accounts",
27438
27605
  title: "Accounts",
27439
27606
  intro: "The sites where stub uses your own account, what each one is for, and how to sign out."
@@ -27441,7 +27608,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27441
27608
  id: "sources",
27442
27609
  title: "Sources",
27443
27610
  intro: "Where stub gets titles, artwork and streams: the sources it ships with, and the ones you add."
27444
- }], IL = (e) => FL.find((t) => `#${t.id}` === e)?.id ?? "accounts", LL = [
27611
+ }], UL = (e) => HL.find((t) => `#${t.id}` === e)?.id ?? "accounts", WL = [
27445
27612
  {
27446
27613
  origin: "mal",
27447
27614
  name: "MyAnimeList",
@@ -27566,7 +27733,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27566
27733
  //#endregion
27567
27734
  //#region src/router/settings/sources.tsx
27568
27735
  V();
27569
- var RL = H`
27736
+ var GL = H`
27570
27737
  h3.part {
27571
27738
  font-size: 1.3rem;
27572
27739
  font-weight: 700;
@@ -27809,11 +27976,11 @@ var RL = H`
27809
27976
 
27810
27977
  .hint { font-size: 1.25rem; color: rgba(255, 255, 255, 0.5); }
27811
27978
  .by-address .note { font-size: 1.35rem; overflow-wrap: anywhere; }
27812
- `, zL = {
27979
+ `, KL = {
27813
27980
  connected: "Connected",
27814
27981
  connecting: "Connecting",
27815
27982
  error: "Error"
27816
- }, BL = (e) => e instanceof Error ? e.message : String(e), VL = ({ plugin: e, onRemove: t }) => {
27983
+ }, qL = (e) => e instanceof Error ? e.message : String(e), JL = ({ plugin: e, onRemove: t }) => {
27817
27984
  let n = e.sources ?? [], r = n.length ? n.map((e) => e.name).join(", ") : e.uri.replace(/^npm:/, "");
27818
27985
  return /* @__PURE__ */ X("li", {
27819
27986
  className: "row plugin",
@@ -27842,7 +28009,7 @@ var RL = H`
27842
28009
  children: [/* @__PURE__ */ Y("span", {
27843
28010
  className: "dot",
27844
28011
  "aria-hidden": "true"
27845
- }), zL[e.state]]
28012
+ }), KL[e.state]]
27846
28013
  }),
27847
28014
  /* @__PURE__ */ Y("button", {
27848
28015
  type: "button",
@@ -27857,13 +28024,13 @@ var RL = H`
27857
28024
  }) : void 0
27858
28025
  ]
27859
28026
  });
27860
- }, HL = (e) => {
28027
+ }, YL = (e) => {
27861
28028
  let { host: t, pathname: n } = new URL(e);
27862
28029
  return t.replace(/^www\./, "") + n.replace(/\/$/, "");
27863
- }, UL = () => {
28030
+ }, XL = () => {
27864
28031
  let [e, t] = I(() => new Set(ee()));
27865
28032
  L(() => me(() => t(new Set(ee()))), []);
27866
- let n = LL.filter((t) => e.has(t.origin)).length;
28033
+ let n = WL.filter((t) => e.has(t.origin)).length;
27867
28034
  return /* @__PURE__ */ X(J, { children: [
27868
28035
  /* @__PURE__ */ X("div", {
27869
28036
  className: "part-head",
@@ -27874,7 +28041,7 @@ var RL = H`
27874
28041
  }),
27875
28042
  /* @__PURE__ */ Y("span", {
27876
28043
  className: "count",
27877
- children: n ? `${LL.length - n} of ${LL.length} on` : `All ${LL.length} on`
28044
+ children: n ? `${WL.length - n} of ${WL.length} on` : `All ${WL.length} on`
27878
28045
  }),
27879
28046
  /* @__PURE__ */ Y("button", {
27880
28047
  type: "button",
@@ -27893,7 +28060,7 @@ var RL = H`
27893
28060
  }),
27894
28061
  /* @__PURE__ */ Y("ul", {
27895
28062
  className: "built-in",
27896
- children: LL.map((t) => {
28063
+ children: WL.map((t) => {
27897
28064
  let n = !e.has(t.origin);
27898
28065
  return /* @__PURE__ */ Y("li", {
27899
28066
  "data-source": t.origin,
@@ -27906,7 +28073,7 @@ var RL = H`
27906
28073
  children: t.name
27907
28074
  }), /* @__PURE__ */ Y("span", {
27908
28075
  className: "host",
27909
- children: HL(t.url)
28076
+ children: YL(t.url)
27910
28077
  })]
27911
28078
  }), /* @__PURE__ */ Y("input", {
27912
28079
  type: "checkbox",
@@ -27920,12 +28087,12 @@ var RL = H`
27920
28087
  })
27921
28088
  })
27922
28089
  ] });
27923
- }, WL = () => {
28090
+ }, ZL = () => {
27924
28091
  let [e, t] = I(ss), [n, r] = I(""), [i, a] = I(!1), [o, s] = I(""), c = ht(), l = () => t(ss());
27925
28092
  return L(() => (l(), os(l)), []), /* @__PURE__ */ X("div", {
27926
- css: RL,
28093
+ css: GL,
27927
28094
  children: [
27928
- /* @__PURE__ */ Y(UL, {}),
28095
+ /* @__PURE__ */ Y(XL, {}),
27929
28096
  /* @__PURE__ */ Y("h3", {
27930
28097
  className: "part",
27931
28098
  children: "Added"
@@ -27936,7 +28103,7 @@ var RL = H`
27936
28103
  }),
27937
28104
  e.length ? /* @__PURE__ */ Y("ul", {
27938
28105
  className: "rows",
27939
- children: e.map((e) => /* @__PURE__ */ Y(VL, {
28106
+ children: e.map((e) => /* @__PURE__ */ Y(JL, {
27940
28107
  plugin: e,
27941
28108
  onRemove: () => {
27942
28109
  xs(e.uri).then(l);
@@ -27964,7 +28131,7 @@ var RL = H`
27964
28131
  let t = n.trim();
27965
28132
  t && !i && (a(!0), s(""), ys(t).then((e) => {
27966
28133
  e && r("");
27967
- }).catch((e) => s(BL(e))).finally(() => {
28134
+ }).catch((e) => s(qL(e))).finally(() => {
27968
28135
  a(!1), l();
27969
28136
  }));
27970
28137
  },
@@ -28007,7 +28174,7 @@ var RL = H`
28007
28174
  })
28008
28175
  ]
28009
28176
  });
28010
- }, GL = H`
28177
+ }, QL = H`
28011
28178
  min-width: 0;
28012
28179
 
28013
28180
  & > h2 {
@@ -28140,21 +28307,21 @@ var RL = H`
28140
28307
  }
28141
28308
 
28142
28309
  .confirm p { color: rgba(255, 255, 255, 0.9); }
28143
- `, KL = [
28310
+ `, $L = [
28144
28311
  "www.crunchyroll.com",
28145
28312
  "crunchyroll.com",
28146
28313
  "sso.crunchyroll.com",
28147
28314
  "static.crunchyroll.com"
28148
- ], qL = "https://www.crunchyroll.com", JL = "noaihdevm_6iyg0a8l0q", YL = `https://sso.crunchyroll.com/authorize?${new URLSearchParams({
28149
- client_id: JL,
28150
- redirect_uri: `${qL}/callback`,
28315
+ ], eR = "https://www.crunchyroll.com", tR = "noaihdevm_6iyg0a8l0q", nR = `https://sso.crunchyroll.com/authorize?${new URLSearchParams({
28316
+ client_id: tR,
28317
+ redirect_uri: `${eR}/callback`,
28151
28318
  response_type: "cookie",
28152
28319
  state: "/"
28153
- })}`, XL = (e) => e.locator("#user-menu-authenticated").exists(), ZL = {
28154
- url: `${qL}/auth/v1/token`,
28155
- authorization: `Basic ${btoa(`${JL}:`)}`,
28320
+ })}`, rR = (e) => e.locator("#user-menu-authenticated").exists(), iR = {
28321
+ url: `${eR}/auth/v1/token`,
28322
+ authorization: `Basic ${btoa(`${tR}:`)}`,
28156
28323
  deviceType: "stub on FKN"
28157
- }, QL = async ({ url: e, authorization: t, deviceType: n }, r = fetch) => {
28324
+ }, aR = async ({ url: e, authorization: t, deviceType: n }, r = fetch) => {
28158
28325
  let i = globalThis.location?.origin === new URL(e).origin ? globalThis.document?.cookie ?? "" : "", a = /(?:^|;\s*)device_id=([^;]+)/.exec(i)?.[1] ?? crypto.randomUUID(), o = await r(`${e}?_=${crypto.randomUUID()}`, {
28159
28326
  method: "POST",
28160
28327
  credentials: "include",
@@ -28172,44 +28339,44 @@ var RL = H`
28172
28339
  status: o.status,
28173
28340
  body: o.ok ? null : s
28174
28341
  };
28175
- }, $L = (e) => (e?.context ?? []).some((e) => e.field === "etp_rt" && e.code === "auth.obtain_access_token.missing_required_field"), eR = ({ status: e, body: t }) => {
28342
+ }, oR = (e) => (e?.context ?? []).some((e) => e.field === "etp_rt" && e.code === "auth.obtain_access_token.missing_required_field"), sR = ({ status: e, body: t }) => {
28176
28343
  if (e === 200) return "signed-in";
28177
- if (e === 400 && $L(t)) return "signed-out";
28344
+ if (e === 400 && oR(t)) return "signed-out";
28178
28345
  throw Error(`Crunchyroll answered ${e}`);
28179
- }, tR = "Ask crunchyroll.com whether you are signed in, without loading any of its pages", nR = async (e, { attach: t, mount: n, fetch: r, settle: i = () => new Promise((e) => setTimeout(e, 2e3)) }) => {
28180
- if (e === "extension") return eR(await QL(ZL, r));
28346
+ }, cR = "Ask crunchyroll.com whether you are signed in, without loading any of its pages", lR = async (e, { attach: t, mount: n, fetch: r, settle: i = () => new Promise((e) => setTimeout(e, 2e3)) }) => {
28347
+ if (e === "extension") return sR(await aR(iR, r));
28181
28348
  let { iframe: a, remove: o } = n();
28182
28349
  try {
28183
28350
  let e = await (await t({
28184
28351
  iframe: a,
28185
- blank: { url: `${qL}/` },
28352
+ blank: { url: `${eR}/` },
28186
28353
  cookies: "persistent",
28187
28354
  permissions: [{
28188
28355
  category: "evaluation",
28189
- reason: tR
28356
+ reason: cR
28190
28357
  }]
28191
- })).evaluate(QL, ZL);
28192
- return e.status === 200 && await i(), eR(e);
28358
+ })).evaluate(aR, iR);
28359
+ return e.status === 200 && await i(), sR(e);
28193
28360
  } finally {
28194
28361
  o();
28195
28362
  }
28196
- }, rR = {
28363
+ }, uR = {
28197
28364
  signIn: () => s({
28198
- url: YL,
28199
- domains: KL,
28200
- isSignedIn: XL
28365
+ url: nR,
28366
+ domains: $L,
28367
+ isSignedIn: rR
28201
28368
  }).then(u(b, "crunchyroll")),
28202
- signOut: () => v(KL).then(() => b.record("crunchyroll", "signed-out"))
28203
- }, iR = {
28369
+ signOut: () => v($L).then(() => b.record("crunchyroll", "signed-out"))
28370
+ }, dR = {
28204
28371
  isConnected: pe,
28205
28372
  watch: fe,
28206
28373
  signIn: (e) => l[e](),
28207
28374
  signOut: C
28208
- }, aR = {
28375
+ }, fR = {
28209
28376
  read: b.read,
28210
28377
  watch: b.watch,
28211
28378
  check: async (e, t) => {
28212
- let n = e === "crunchyroll" ? await nR(t, {
28379
+ let n = e === "crunchyroll" ? await lR(t, {
28213
28380
  attach: S,
28214
28381
  mount: () => y("Sign-in check"),
28215
28382
  fetch: E
@@ -28220,7 +28387,7 @@ var RL = H`
28220
28387
  //#endregion
28221
28388
  //#region src/router/settings/index.tsx
28222
28389
  V();
28223
- var oR = H`
28390
+ var pR = H`
28224
28391
  display: grid;
28225
28392
  grid-template-columns: 17rem minmax(0, 1fr);
28226
28393
  column-gap: 4rem;
@@ -28281,8 +28448,8 @@ var oR = H`
28281
28448
 
28282
28449
  .index a[aria-current='true'] { background: #fff; color: #000; border-color: #fff; }
28283
28450
  }
28284
- `, sR = () => location.hash, cR = () => {
28285
- let [e, t] = I(), n = IL(ql(sR)), r = FL.find((e) => e.id === n);
28451
+ `, mR = () => location.hash, hR = () => {
28452
+ let [e, t] = I(), n = UL(ql(mR)), r = HL.find((e) => e.id === n);
28286
28453
  return L(() => {
28287
28454
  let e = !1;
28288
28455
  return ne().then((n) => {
@@ -28291,13 +28458,13 @@ var oR = H`
28291
28458
  e = !0;
28292
28459
  };
28293
28460
  }, []), /* @__PURE__ */ X("div", {
28294
- css: oR,
28461
+ css: pR,
28295
28462
  children: [
28296
28463
  /* @__PURE__ */ Y("h1", { children: "Settings" }),
28297
28464
  /* @__PURE__ */ Y("nav", {
28298
28465
  className: "index",
28299
28466
  "aria-label": "Settings categories",
28300
- children: FL.map((e) => /* @__PURE__ */ Y("a", {
28467
+ children: HL.map((e) => /* @__PURE__ */ Y("a", {
28301
28468
  href: `#${e.id}`,
28302
28469
  "aria-current": r === e ? "true" : void 0,
28303
28470
  onClick: Hf,
@@ -28305,7 +28472,7 @@ var oR = H`
28305
28472
  }, e.id))
28306
28473
  }),
28307
28474
  /* @__PURE__ */ X("section", {
28308
- css: GL,
28475
+ css: QL,
28309
28476
  "data-section": r.id,
28310
28477
  "aria-labelledby": "settings-section-title",
28311
28478
  children: [
@@ -28317,17 +28484,17 @@ var oR = H`
28317
28484
  className: "intro",
28318
28485
  children: r.intro
28319
28486
  }),
28320
- r.id === "accounts" ? /* @__PURE__ */ Y(PL, {
28487
+ r.id === "accounts" ? /* @__PURE__ */ Y(VL, {
28321
28488
  backend: e,
28322
- crunchyroll: rR,
28323
- sites: iR,
28324
- status: aR
28325
- }) : /* @__PURE__ */ Y(WL, {})
28489
+ crunchyroll: uR,
28490
+ sites: dR,
28491
+ status: fR
28492
+ }) : /* @__PURE__ */ Y(ZL, {})
28326
28493
  ]
28327
28494
  })
28328
28495
  ]
28329
28496
  });
28330
- }, lR = (e) => {
28497
+ }, gR = (e) => {
28331
28498
  let { onPlayback: t, applyPlayback: n } = e;
28332
28499
  if (!t || !n) return;
28333
28500
  let r = /* @__PURE__ */ new Set(), i = !1, a = (e) => {
@@ -28350,7 +28517,7 @@ var oR = H`
28350
28517
  //#endregion
28351
28518
  //#region src/components/plugin-player.tsx
28352
28519
  V();
28353
- var uR = H`
28520
+ var _R = H`
28354
28521
  position: relative;
28355
28522
  width: 100%;
28356
28523
  flex: 1;
@@ -28376,7 +28543,7 @@ var uR = H`
28376
28543
  color: rgba(255, 255, 255, 0.55);
28377
28544
  font-size: 1.4rem;
28378
28545
  }
28379
- `, dR = ({ pluginUri: e, release: t, onUnplayable: n, onPlayback: r }) => {
28546
+ `, vR = ({ pluginUri: e, release: t, onUnplayable: n, onPlayback: r }) => {
28380
28547
  let i = R(null), [a, o] = I(""), s = R({
28381
28548
  onUnplayable: n,
28382
28549
  onPlayback: r
@@ -28408,7 +28575,7 @@ var uR = H`
28408
28575
  i.unmount(), a = void 0, s.current.onUnplayable();
28409
28576
  return;
28410
28577
  }
28411
- l = lR(d), l && s.current.onPlayback?.(l);
28578
+ l = gR(d), l && s.current.onPlayback?.(l);
28412
28579
  } catch (e) {
28413
28580
  if (r) return;
28414
28581
  o(e instanceof Error ? e.message : String(e));
@@ -28421,7 +28588,7 @@ var uR = H`
28421
28588
  t.uri,
28422
28589
  t.url
28423
28590
  ]), /* @__PURE__ */ X("div", {
28424
- css: uR,
28591
+ css: _R,
28425
28592
  children: [/* @__PURE__ */ Y("iframe", {
28426
28593
  ref: i,
28427
28594
  sandbox: "allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",
@@ -28435,7 +28602,7 @@ var uR = H`
28435
28602
  //#endregion
28436
28603
  //#region src/components/party-playback.tsx
28437
28604
  V();
28438
- var fR = ({ link: e }) => {
28605
+ var yR = ({ link: e }) => {
28439
28606
  let t = Uv(), n = t.status === "active" ? t.role : void 0, r = R(void 0);
28440
28607
  return L(() => {
28441
28608
  if (r.current = void 0, !e || !n) return;
@@ -28464,12 +28631,12 @@ var fR = ({ link: e }) => {
28464
28631
  measured: !!o
28465
28632
  }, e?.apply(s, !!o);
28466
28633
  }), null;
28467
- }, pR = [
28634
+ }, bR = [
28468
28635
  "currentTime",
28469
28636
  "volume",
28470
28637
  "muted",
28471
28638
  "playbackRate"
28472
- ], mR = (e) => [
28639
+ ], xR = (e) => [
28473
28640
  "loadstart",
28474
28641
  ...e.readyState >= 1 ? ["loadedmetadata", "durationchange"] : [],
28475
28642
  ...e.readyState >= 2 ? ["loadeddata"] : [],
@@ -28481,7 +28648,7 @@ var fR = ({ link: e }) => {
28481
28648
  e.paused ? "pause" : "playing",
28482
28649
  ...e.ended ? ["ended"] : [],
28483
28650
  ...e.error ? ["error"] : []
28484
- ], hR = {
28651
+ ], SR = {
28485
28652
  currentTime: 0,
28486
28653
  duration: 0,
28487
28654
  paused: !0,
@@ -28498,14 +28665,14 @@ var fR = ({ link: e }) => {
28498
28665
  error: null,
28499
28666
  videoWidth: 0,
28500
28667
  videoHeight: 0
28501
- }, gR = (e) => ({
28668
+ }, CR = (e) => ({
28502
28669
  length: e.length,
28503
28670
  start: (t) => e[t]?.[0] ?? 0,
28504
28671
  end: (t) => e[t]?.[1] ?? 0
28505
- }), _R = 1e4, vR = 1500, yR = () => new DOMException("the far player did not start playing", "NotAllowedError"), bR = /* @__PURE__ */ new WeakMap(), xR = (e, t) => {
28506
- let n = t.channel ?? "banou-media-player", r = `${n}|${t.origin ?? "*"}`, i = bR.get(e) ?? (bR.set(e, /* @__PURE__ */ new Map()), bR.get(e)), o = i.get(r);
28672
+ }), wR = 1e4, TR = 1500, ER = () => new DOMException("the far player did not start playing", "NotAllowedError"), DR = /* @__PURE__ */ new WeakMap(), OR = (e, t) => {
28673
+ let n = t.channel ?? "banou-media-player", r = `${n}|${t.origin ?? "*"}`, i = DR.get(e) ?? (DR.set(e, /* @__PURE__ */ new Map()), DR.get(e)), o = i.get(r);
28507
28674
  if (o) return o;
28508
- let s = DR(e, t.origin), c = /* @__PURE__ */ new Set(), l = new AbortController(), u, d = (e) => {
28675
+ let s = PR(e, t.origin), c = /* @__PURE__ */ new Set(), l = new AbortController(), u, d = (e) => {
28509
28676
  try {
28510
28677
  e.port?.postMessage("close");
28511
28678
  } catch {}
@@ -28518,7 +28685,7 @@ var fR = ({ link: e }) => {
28518
28685
  let { port1: t, port2: n } = new MessageChannel();
28519
28686
  e.port = t, t.onmessage = ({ data: t }) => {
28520
28687
  l.signal.aborted || e.update(t);
28521
- }, await CR(() => u.subscribe(e.id, n)).catch((t) => {
28688
+ }, await AR(() => u.subscribe(e.id, n)).catch((t) => {
28522
28689
  throw d(e), t;
28523
28690
  });
28524
28691
  }, p = () => {
@@ -28555,16 +28722,16 @@ var fR = ({ link: e }) => {
28555
28722
  }
28556
28723
  };
28557
28724
  return i.set(r, m), m;
28558
- }, SR = (e, t = {}) => {
28559
- wR(t.origin);
28560
- let n = new AbortController(), r = t.signal ? AbortSignal.any([t.signal, n.signal]) : n.signal, i = t.id ?? "default", a = { ...hR }, o = new EventTarget(), s = (e) => o.dispatchEvent(new Event(e)), c, l, u = new Promise((e, t) => {
28725
+ }, kR = (e, t = {}) => {
28726
+ jR(t.origin);
28727
+ let n = new AbortController(), r = t.signal ? AbortSignal.any([t.signal, n.signal]) : n.signal, i = t.id ?? "default", a = { ...SR }, o = new EventTarget(), s = (e) => o.dispatchEvent(new Event(e)), c, l, u = new Promise((e, t) => {
28561
28728
  c = e, l = t;
28562
28729
  });
28563
28730
  u.catch(() => {});
28564
28731
  let d = () => new DOMException("the remote player was closed", "AbortError"), f = /* @__PURE__ */ new Set(), p = () => {
28565
28732
  for (let e of [...f]) e(d());
28566
28733
  f.clear();
28567
- }, m = /* @__PURE__ */ new Map(), h = !1, g = xR(e, t).attach({
28734
+ }, m = /* @__PURE__ */ new Map(), h = !1, g = OR(e, t).attach({
28568
28735
  id: i,
28569
28736
  reset: () => {
28570
28737
  h = !1, p();
@@ -28577,7 +28744,7 @@ var fR = ({ link: e }) => {
28577
28744
  s(e);
28578
28745
  return;
28579
28746
  }
28580
- for (let e of mR(a)) s(e);
28747
+ for (let e of xR(a)) s(e);
28581
28748
  c();
28582
28749
  }
28583
28750
  }), _ = () => {
@@ -28600,9 +28767,9 @@ var fR = ({ link: e }) => {
28600
28767
  "videoWidth",
28601
28768
  "videoHeight"
28602
28769
  ]) v(e);
28603
- v("buffered", gR), v("seekable", gR);
28604
- let y = (e) => u.then(() => r.aborted ? void 0 : e()).catch(() => {}), b = xR(e, t);
28605
- for (let e of pR) Object.defineProperty(o, e, {
28770
+ v("buffered", CR), v("seekable", CR);
28771
+ let y = (e) => u.then(() => r.aborted ? void 0 : e()).catch(() => {}), b = OR(e, t);
28772
+ for (let e of bR) Object.defineProperty(o, e, {
28606
28773
  get: () => a[e],
28607
28774
  set: (t) => {
28608
28775
  a[e] = t, m.set(e, t), y(async () => {
@@ -28630,7 +28797,7 @@ var fR = ({ link: e }) => {
28630
28797
  clearTimeout(r), o.removeEventListener("playing", n), o.removeEventListener("play", n), e(t);
28631
28798
  }, n = () => t(!0);
28632
28799
  o.addEventListener("playing", n), o.addEventListener("play", n);
28633
- let r = setTimeout(() => t(!a.paused), vR);
28800
+ let r = setTimeout(() => t(!a.paused), TR);
28634
28801
  }), C = async () => {
28635
28802
  let e = !a.paused, t;
28636
28803
  try {
@@ -28649,11 +28816,11 @@ var fR = ({ link: e }) => {
28649
28816
  return o.autoplay = async () => {
28650
28817
  let e = await C();
28651
28818
  if (e.started) return { muted: o.muted };
28652
- if (o.muted || r.aborted) throw e.refusal ?? yR();
28819
+ if (o.muted || r.aborted) throw e.refusal ?? ER();
28653
28820
  o.muted = !0;
28654
28821
  let t = await C();
28655
28822
  if (t.started) return { muted: !0 };
28656
- throw o.muted = !1, e.refusal ?? t.refusal ?? yR();
28823
+ throw o.muted = !1, e.refusal ?? t.refusal ?? ER();
28657
28824
  }, o.pause = () => {
28658
28825
  a.paused = !0, x("pause").catch(() => {});
28659
28826
  }, o.load = () => {
@@ -28662,16 +28829,16 @@ var fR = ({ link: e }) => {
28662
28829
  value: u,
28663
28830
  enumerable: !1
28664
28831
  }), o.destroy = () => n.abort(), o;
28665
- }, CR = async (e) => {
28832
+ }, AR = async (e) => {
28666
28833
  let t;
28667
28834
  try {
28668
28835
  return await Promise.race([e(), new Promise((e, n) => {
28669
- t = setTimeout(() => n(/* @__PURE__ */ Error("the player did not answer")), _R);
28836
+ t = setTimeout(() => n(/* @__PURE__ */ Error("the player did not answer")), wR);
28670
28837
  })]);
28671
28838
  } finally {
28672
28839
  t && clearTimeout(t);
28673
28840
  }
28674
- }, wR = (e) => {
28841
+ }, jR = (e) => {
28675
28842
  if (e === void 0 || e === "*") return;
28676
28843
  if (e === "null") throw TypeError("an opaque origin (\"null\") cannot be spoken to; leave `origin` unset and the sender check stands alone");
28677
28844
  let t;
@@ -28681,47 +28848,47 @@ var fR = ({ link: e }) => {
28681
28848
  throw TypeError(`\`origin\` must be an origin like https://example.com, not ${e}`);
28682
28849
  }
28683
28850
  if (t.origin !== e) throw TypeError(`\`origin\` must be an origin like ${t.origin}, not ${e}`);
28684
- }, TR = (e) => {
28851
+ }, MR = (e) => {
28685
28852
  try {
28686
28853
  return !!e && typeof e == "object" && e.window === e;
28687
28854
  } catch {
28688
28855
  return !1;
28689
28856
  }
28690
- }, ER = (e) => {
28691
- if (TR(e)) return !1;
28857
+ }, NR = (e) => {
28858
+ if (MR(e)) return !1;
28692
28859
  try {
28693
28860
  return !!e && typeof e == "object" && "contentWindow" in e;
28694
28861
  } catch {
28695
28862
  return !1;
28696
28863
  }
28697
- }, DR = (e, t) => {
28698
- if (TR(e)) {
28699
- let n = OR(t);
28864
+ }, PR = (e, t) => {
28865
+ if (MR(e)) {
28866
+ let n = FR(t);
28700
28867
  return {
28701
28868
  emit: (t, r) => {
28702
28869
  e.postMessage(t, n.target(), r ?? []);
28703
28870
  },
28704
- receive: kR(() => e, t, n)
28871
+ receive: IR(() => e, t, n)
28705
28872
  };
28706
28873
  }
28707
- if (ER(e)) {
28874
+ if (NR(e)) {
28708
28875
  if (!e.contentWindow) throw TypeError("mediaPlayer: the iframe has no window yet; append it to a document first");
28709
- let n = () => e.contentWindow, r = OR(t);
28876
+ let n = () => e.contentWindow, r = FR(t);
28710
28877
  return {
28711
28878
  emit: (e, t) => {
28712
28879
  n()?.postMessage(e, r.target(), t ?? []);
28713
28880
  },
28714
- receive: kR(n, t, r)
28881
+ receive: IR(n, t, r)
28715
28882
  };
28716
28883
  }
28717
28884
  return e;
28718
- }, OR = (e) => {
28885
+ }, FR = (e) => {
28719
28886
  let t = e && e !== "*" ? e : void 0;
28720
28887
  return {
28721
28888
  target: () => t && t !== "null" ? t : "*",
28722
28889
  admits: (e) => t ? e === t : (e && (t = e), !0)
28723
28890
  };
28724
- }, kR = (e, t, n = OR(t)) => (t) => {
28891
+ }, IR = (e, t, n = FR(t)) => (t) => {
28725
28892
  let r = (r) => {
28726
28893
  r.source === e() && n.admits(r.origin) && t(r.data, {
28727
28894
  source: r.source,
@@ -28730,54 +28897,54 @@ var fR = ({ link: e }) => {
28730
28897
  });
28731
28898
  };
28732
28899
  return window.addEventListener("message", r), () => window.removeEventListener("message", r);
28733
- }, AR = [
28900
+ }, LR = [
28734
28901
  "play",
28735
28902
  "pause",
28736
28903
  "seeked",
28737
28904
  "ratechange"
28738
- ], jR = (e) => ({
28905
+ ], RR = (e) => ({
28739
28906
  paused: e.paused,
28740
28907
  time: e.currentTime,
28741
28908
  rate: e.playbackRate ?? 1,
28742
28909
  at: Date.now()
28743
- }), MR = (e, t = () => {}) => {
28910
+ }), zR = (e, t = () => {}) => {
28744
28911
  let n = /* @__PURE__ */ new Set(), r = () => {
28745
- let t = jR(e);
28912
+ let t = RR(e);
28746
28913
  for (let e of n) e(t);
28747
28914
  };
28748
- for (let t of AR) e.addEventListener(t, r);
28915
+ for (let t of LR) e.addEventListener(t, r);
28749
28916
  let i = setInterval(() => {
28750
28917
  e.paused || r();
28751
28918
  }, vv);
28752
28919
  return {
28753
28920
  apply: (t, n) => {
28754
- let r = xv(jR(e), t, Date.now(), n);
28921
+ let r = xv(RR(e), t, Date.now(), n);
28755
28922
  r.seek !== void 0 && (e.currentTime = r.seek), r.rate !== void 0 && (e.playbackRate = r.rate), r.pause && e.pause(), r.play && (e.autoplay ? e.autoplay() : e.play()).catch(() => {});
28756
28923
  },
28757
28924
  onReport: (e) => (n.add(e), queueMicrotask(r), () => {
28758
28925
  n.delete(e);
28759
28926
  }),
28760
28927
  dispose: () => {
28761
- for (let t of AR) e.removeEventListener(t, r);
28928
+ for (let t of LR) e.removeEventListener(t, r);
28762
28929
  clearInterval(i), n.clear(), t();
28763
28930
  }
28764
28931
  };
28765
- }, NR = (e) => {
28766
- let t = SR(e, { origin: location.origin });
28767
- return MR(t, () => t.destroy());
28768
- }, PR = "stub:embed-title", FR = "stub:embed-title?", IR = (e, t, n = window) => {
28932
+ }, BR = (e) => {
28933
+ let t = kR(e, { origin: location.origin });
28934
+ return zR(t, () => t.destroy());
28935
+ }, VR = "stub:embed-title", HR = "stub:embed-title?", UR = (e, t, n = window) => {
28769
28936
  let r = () => e.contentWindow?.postMessage({
28770
- type: PR,
28937
+ type: VR,
28771
28938
  title: t
28772
28939
  }, n.location.origin), i = (t) => {
28773
- t.source === e.contentWindow && t.origin === n.location.origin && t.data?.type === FR && r();
28940
+ t.source === e.contentWindow && t.origin === n.location.origin && t.data?.type === HR && r();
28774
28941
  };
28775
28942
  return n.addEventListener("message", i), r(), () => n.removeEventListener("message", i);
28776
- }, LR = (e, t) => t ? `${e == null ? "" : `E${e} - `}${t}` : e == null ? void 0 : `Episode ${e}`;
28943
+ }, WR = (e, t) => t ? `${e == null ? "" : `E${e} - `}${t}` : e == null ? void 0 : `Episode ${e}`;
28777
28944
  //#endregion
28778
28945
  //#region src/router/watch/index.tsx
28779
28946
  V();
28780
- var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node), zR = iy("\n subscription GetWatchMedia($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n titles {\n title\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n titles {\n title\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n embedUrl\n mediaUri\n episodeNumber\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n }\n }\n }\n }\n }\n"), BR = iy("\n subscription GetWatchOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n id\n url\n name\n icon\n color\n isApiOnly\n }\n }\n }\n"), VR = H`
28947
+ var GR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node), KR = iy("\n subscription GetWatchMedia($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n titles {\n title\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n titles {\n title\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n embedUrl\n mediaUri\n episodeNumber\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n }\n }\n }\n }\n }\n"), qR = iy("\n subscription GetWatchOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n id\n url\n name\n icon\n color\n isApiOnly\n }\n }\n }\n"), JR = H`
28781
28948
  display: flex;
28782
28949
  flex-direction: column;
28783
28950
  height: 100vh;
@@ -28839,30 +29006,30 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28839
29006
  opacity: 0.6;
28840
29007
  }
28841
29008
  }
28842
- `, HR = () => {
29009
+ `, YR = () => {
28843
29010
  let e = pu(), t = {
28844
29011
  ...e,
28845
29012
  mediaUri: Ib(e.mediaUri),
28846
29013
  episodeUri: Ib(e.episodeUri),
28847
29014
  sourceUri: Ib(e.sourceUri)
28848
29015
  }, [, n] = hu(), r = R(null), [i, a] = I(void 0), [{ data: o }] = Ho({
28849
- query: zR,
29016
+ query: KR,
28850
29017
  variables: { input: { uri: t.mediaUri } },
28851
29018
  pause: !t.mediaUri
28852
29019
  }), s = o?.media, c = z(() => s?.episodes?.find((e) => e.uri && t.episodeUri ? Bb(Pb(e.uri), Pb(t.episodeUri)) : !1), [s?.episodes, t.episodeUri]), l = z(() => c?.uri ? zb(c.uri)?.handleUrisValues : void 0, [c?.uri]), u = z(() => l && [...new Set(l.map((e) => e.origin))], [l]), [{ data: d }] = Ho({
28853
- query: BR,
29020
+ query: qR,
28854
29021
  variables: { input: {
28855
29022
  ids: u,
28856
29023
  filters: [Lu.IsNotApiOnly]
28857
29024
  } },
28858
29025
  pause: !u
28859
- }), f = t.sourceUri, p = s?.titles?.at(0)?.title, m = c?.titles?.at(0)?.title, h = c?.episodeNumber, g = LR(h, m), _ = z(() => {
29026
+ }), f = t.sourceUri, p = s?.titles?.at(0)?.title, m = c?.titles?.at(0)?.title, h = c?.episodeNumber, g = WR(h, m), _ = z(() => {
28860
29027
  if (!f) return;
28861
- let e = RR(c?.handles).find((e) => e.uri === f);
29028
+ let e = GR(c?.handles).find((e) => e.uri === f);
28862
29029
  if (!e) return;
28863
29030
  if (e.embedUrl) return e.embedUrl;
28864
29031
  let { origin: n } = wb(f);
28865
- if (!JF(n) || !e.url) return;
29032
+ if (!ZF(n) || !e.url) return;
28866
29033
  let r = new URLSearchParams({
28867
29034
  mediaUri: t.mediaUri,
28868
29035
  episodeUri: t.episodeUri,
@@ -28888,7 +29055,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28888
29055
  if (!f) return;
28889
29056
  let { origin: e } = wb(f), t = x[e];
28890
29057
  if (!t) return;
28891
- let n = RR(c?.handles).find((e) => e.uri === f);
29058
+ let n = GR(c?.handles).find((e) => e.uri === f);
28892
29059
  return {
28893
29060
  pluginUri: t,
28894
29061
  release: {
@@ -28908,20 +29075,20 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28908
29075
  L(() => {
28909
29076
  let e = r.current;
28910
29077
  if (E || !_ || !e) return;
28911
- let t = NR(e);
29078
+ let t = BR(e);
28912
29079
  return a(t), () => {
28913
29080
  t.dispose(), a(void 0);
28914
29081
  };
28915
29082
  }, [E, _]), L(() => {
28916
29083
  let e = r.current;
28917
- if (!E && _ && e && g) return IR(e, g);
29084
+ if (!E && _ && e && g) return UR(e, g);
28918
29085
  }, [
28919
29086
  E,
28920
29087
  _,
28921
29088
  g
28922
29089
  ]);
28923
29090
  let D = z(() => (d?.originPage?.nodes ?? []).map((e) => {
28924
- let n = RR(c?.handles).filter((t) => t.origin === e.id), r = !!x[e.id], i = (t) => !!(t?.embedUrl || r || JF(e.id) && t?.url), a = (e) => Au(K.WATCH, {
29091
+ let n = GR(c?.handles).filter((t) => t.origin === e.id), r = !!x[e.id], i = (t) => !!(t?.embedUrl || r || ZF(e.id) && t?.url), a = (e) => Au(K.WATCH, {
28925
29092
  mediaUri: t.mediaUri,
28926
29093
  episodeUri: t.episodeUri,
28927
29094
  sourceUri: e
@@ -28953,11 +29120,11 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28953
29120
  x
28954
29121
  ]);
28955
29122
  return /* @__PURE__ */ Y("div", {
28956
- css: VR,
29123
+ css: JR,
28957
29124
  children: /* @__PURE__ */ X("div", {
28958
29125
  className: "watch-container",
28959
29126
  children: [
28960
- E && C ? /* @__PURE__ */ Y(dR, {
29127
+ E && C ? /* @__PURE__ */ Y(vR, {
28961
29128
  pluginUri: C.pluginUri,
28962
29129
  release: C.release,
28963
29130
  onUnplayable: () => T(f),
@@ -28975,7 +29142,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28975
29142
  min-height: 0;
28976
29143
  `
28977
29144
  }) : void 0,
28978
- /* @__PURE__ */ Y(fR, { link: i }),
29145
+ /* @__PURE__ */ Y(yR, { link: i }),
28979
29146
  /* @__PURE__ */ X("div", {
28980
29147
  className: "watch-info",
28981
29148
  children: [/* @__PURE__ */ X("div", {
@@ -28987,7 +29154,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28987
29154
  className: "media-title",
28988
29155
  children: p
28989
29156
  }) : void 0]
28990
- }), /* @__PURE__ */ Y(rI, {
29157
+ }), /* @__PURE__ */ Y(sI, {
28991
29158
  sources: D,
28992
29159
  onPickRelease: (e) => n(Au(K.WATCH, {
28993
29160
  mediaUri: t.mediaUri,
@@ -29003,7 +29170,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
29003
29170
  //#endregion
29004
29171
  //#region src/router/party/index.tsx
29005
29172
  V();
29006
- var UR = H`
29173
+ var XR = H`
29007
29174
  padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
29008
29175
  min-height: 100vh;
29009
29176
  max-width: 72rem;
@@ -29117,14 +29284,14 @@ var UR = H`
29117
29284
  }
29118
29285
 
29119
29286
  .field input:focus { border-color: rgba(255, 255, 255, 0.4); }
29120
- `, WR = {
29287
+ `, ZR = {
29121
29288
  "not-found": "That party has ended.",
29122
29289
  "bad-key": "The invite link is not valid.",
29123
29290
  invalid: "The invite link is broken.",
29124
29291
  full: "The party is full.",
29125
29292
  blocked: "You cannot join this party.",
29126
29293
  unavailable: "Parties are not available right now. Is FKN connected?"
29127
- }, GR = () => {
29294
+ }, QR = () => {
29128
29295
  let e = Uv(), [t] = I(() => Lv(location.hash, location.origin)), [n] = I(() => location.hash.length > 1 && !Lv(location.hash, location.origin)), [r, i] = I([]), [a, o] = I(() => Z.name() ?? ""), [s, c] = I(!1), l = e.status === "active";
29129
29296
  L(() => {
29130
29297
  if (!t) return;
@@ -29154,7 +29321,7 @@ var UR = H`
29154
29321
  } catch {}
29155
29322
  };
29156
29323
  return /* @__PURE__ */ X("div", {
29157
- css: UR,
29324
+ css: XR,
29158
29325
  children: [
29159
29326
  /* @__PURE__ */ Y("div", {
29160
29327
  className: "heading",
@@ -29162,7 +29329,7 @@ var UR = H`
29162
29329
  }),
29163
29330
  /* @__PURE__ */ X("div", {
29164
29331
  className: "status",
29165
- children: [n ? /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : !t && !l && e.status !== "joining" ? e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", WR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "You are not in a party. Start one from the header, or open an invite link." }) : !t && e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : t && !l ? e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", WR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : l && e.role === "guest" && t ? /* @__PURE__ */ Y(J, { children: "You are in. Waiting for the host…" }) : l && e.role === "guest" ? /* @__PURE__ */ X(J, { children: [
29332
+ children: [n ? /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : !t && !l && e.status !== "joining" ? e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", ZR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "You are not in a party. Start one from the header, or open an invite link." }) : !t && e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : t && !l ? e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", ZR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : l && e.role === "guest" && t ? /* @__PURE__ */ Y(J, { children: "You are in. Waiting for the host…" }) : l && e.role === "guest" ? /* @__PURE__ */ X(J, { children: [
29166
29333
  "You are following the host. ",
29167
29334
  /* @__PURE__ */ Y(Cu, {
29168
29335
  to: Au(K.HOME),
@@ -29288,11 +29455,11 @@ var UR = H`
29288
29455
  ] })
29289
29456
  ]
29290
29457
  });
29291
- }, KR = (e) => e.owned ? "owned" : "placeholder", qR = (e) => {
29458
+ }, $R = (e) => e.owned ? "owned" : "placeholder", ez = (e) => {
29292
29459
  let t = [], n = /* @__PURE__ */ new Set();
29293
29460
  for (let r of e.members ?? []) r.uri && !n.has(r.uri) && (n.add(r.uri), t.push({
29294
29461
  uri: r.uri,
29295
- kind: KR(r),
29462
+ kind: $R(r),
29296
29463
  origin: r.origin,
29297
29464
  scope: r.scope,
29298
29465
  title: r.title,
@@ -29312,8 +29479,8 @@ var UR = H`
29312
29479
  member: null
29313
29480
  }));
29314
29481
  return t;
29315
- }, JR = (e) => {
29316
- let t = qR(e), n = Qb({
29482
+ }, tz = (e) => {
29483
+ let t = ez(e), n = Qb({
29317
29484
  nodes: t.map((e) => ({
29318
29485
  uri: e.uri,
29319
29486
  titles: [{ title: e.title ?? e.uri }],
@@ -29334,10 +29501,10 @@ var UR = H`
29334
29501
  columns: n.columns,
29335
29502
  rows: n.rows
29336
29503
  };
29337
- }, YR = (e, t) => [e, t].sort().join(" "), XR = (e) => {
29504
+ }, nz = (e, t) => [e, t].sort().join(" "), rz = (e) => {
29338
29505
  let t = /* @__PURE__ */ new Map();
29339
29506
  for (let n of e) {
29340
- let e = YR(n.fromUri, n.toUri), r = t.get(e) ?? [];
29507
+ let e = nz(n.fromUri, n.toUri), r = t.get(e) ?? [];
29341
29508
  r.push(n.key), t.set(e, r);
29342
29509
  }
29343
29510
  let n = /* @__PURE__ */ new Map();
@@ -29346,7 +29513,7 @@ var UR = H`
29346
29513
  lanes: e.length
29347
29514
  }));
29348
29515
  return n;
29349
- }, ZR = (e) => {
29516
+ }, iz = (e) => {
29350
29517
  let t = /* @__PURE__ */ new Map();
29351
29518
  for (let n of e.links ?? []) t.set(n.key, {
29352
29519
  kind: "link",
@@ -29369,14 +29536,14 @@ var UR = H`
29369
29536
  row: n
29370
29537
  });
29371
29538
  return t;
29372
- }, QR = /^[0-9a-f]{64}$/, $R = (e, t) => (t ?? []).map((t) => {
29539
+ }, az = /^[0-9a-f]{64}$/, oz = (e, t) => (t ?? []).map((t) => {
29373
29540
  let n = e.get(t) ?? null;
29374
29541
  return {
29375
29542
  key: t,
29376
29543
  ref: n,
29377
- gap: n ? null : QR.test(t) ? "missing" : "not-an-edge-key"
29544
+ gap: n ? null : az.test(t) ? "missing" : "not-an-edge-key"
29378
29545
  };
29379
- }), ez = (e, t) => (e.answers ?? []).find((e) => e.seq === t) ?? null, tz = (e) => e === null ? null : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : JSON.stringify(e), nz = (e) => {
29546
+ }), sz = (e, t) => (e.answers ?? []).find((e) => e.seq === t) ?? null, cz = (e) => e === null ? null : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : JSON.stringify(e), lz = (e) => {
29380
29547
  if (e == null || e === "") return { kind: "absent" };
29381
29548
  let t;
29382
29549
  try {
@@ -29397,16 +29564,16 @@ var UR = H`
29397
29564
  kind: "fields",
29398
29565
  fields: Object.entries(t).map(([e, t]) => ({
29399
29566
  field: e,
29400
- value: tz(t)
29567
+ value: cz(t)
29401
29568
  }))
29402
29569
  } : {
29403
29570
  kind: "fields",
29404
29571
  fields: [{
29405
29572
  field: Array.isArray(t) ? "values" : "value",
29406
- value: tz(t)
29573
+ value: cz(t)
29407
29574
  }]
29408
29575
  };
29409
- }, rz = (e) => e === "not-enabled" ? "The graph engine is switched off for this page, so there is nothing to read. Reloading with ?graph=1 turns it on, and this page then asks the sources about the uri itself. The only way a page gets here now is ?store=legacy, which pins it to the old store; dropping that flag puts the whole app back on the graph, which is the default." : e === "graph-empty" ? "The engine is on and the graph is empty. A graph is built inside one tab and never outlives it, so a link opened cold always starts here: what fills it is a page asking the sources, which is what this page does with the uri it was given." : e === "no-row" ? "No media row exists for that uri, so there is nothing to cluster. Either no source has answered for it in this tab yet, or the uri is not one any source recognises." : e === "no-cluster" ? "A media row exists for that uri, but no cluster holds it yet: either a pass has not run since it arrived, or it is a placeholder no pass will ever cluster on its own." : "That uri reached no cluster, and the bundle carries no reason for it.", iz = (e) => e === "active", az = async (e, t, n = {}, r = {}) => {
29576
+ }, uz = (e) => e === "not-enabled" ? "The graph engine is switched off for this page, so there is nothing to read. Reloading with ?graph=1 turns it on, and this page then asks the sources about the uri itself. The only way a page gets here now is ?store=legacy, which pins it to the old store; dropping that flag puts the whole app back on the graph, which is the default." : e === "graph-empty" ? "The engine is on and the graph is empty. A graph is built inside one tab and never outlives it, so a link opened cold always starts here: what fills it is a page asking the sources, which is what this page does with the uri it was given." : e === "no-row" ? "No media row exists for that uri, so there is nothing to cluster. Either no source has answered for it in this tab yet, or the uri is not one any source recognises." : e === "no-cluster" ? "A media row exists for that uri, but no cluster holds it yet: either a pass has not run since it arrived, or it is a placeholder no pass will ever cluster on its own." : "That uri reached no cluster, and the bundle carries no reason for it.", dz = (e) => e === "active", fz = async (e, t, n = {}, r = {}) => {
29410
29577
  let i = r.settleMs ?? 2e4, a = await e("http://d/graphql", {
29411
29578
  method: "POST",
29412
29579
  headers: {
@@ -29454,7 +29621,7 @@ var UR = H`
29454
29621
  payloads: u,
29455
29622
  last: d
29456
29623
  };
29457
- }, oz = "\n subscription TraceWarm($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n url\n episodeCount\n startDate\n status\n titles {\n language\n title\n score\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n }\n }\n episodes {\n uri\n origin\n episodeNumber\n releaseDate\n }\n }\n }\n", sz = (e, t) => {
29624
+ }, pz = "\n subscription TraceWarm($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n url\n episodeCount\n startDate\n status\n titles {\n language\n title\n score\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n }\n }\n episodes {\n uri\n origin\n episodeNumber\n releaseDate\n }\n }\n }\n", mz = (e, t) => {
29458
29625
  let n = e?.data?.media;
29459
29626
  return {
29460
29627
  payloads: t,
@@ -29462,7 +29629,7 @@ var UR = H`
29462
29629
  handles: Array.isArray(n?.handles) ? n.handles.length : 0,
29463
29630
  episodes: Array.isArray(n?.episodes) ? n.episodes.length : 0
29464
29631
  };
29465
- }, cz = async (e, { onProgress: t, settleMs: n = 25e3 } = {}) => {
29632
+ }, hz = async (e, { onProgress: t, settleMs: n = 25e3 } = {}) => {
29466
29633
  let r = {
29467
29634
  payloads: 0,
29468
29635
  uri: null,
@@ -29473,37 +29640,37 @@ var UR = H`
29473
29640
  try {
29474
29641
  let i = await import("./assets/lib-worker-CvSIFpg3.js");
29475
29642
  if (typeof i.handleRequest != "function") return r;
29476
- await az(i.handleRequest, oz, { input: { uri: e } }, {
29643
+ await fz(i.handleRequest, pz, { input: { uri: e } }, {
29477
29644
  settleMs: n,
29478
29645
  onPayload: (e, n) => {
29479
- r = sz(e, n), t?.(r);
29646
+ r = mz(e, n), t?.(r);
29480
29647
  }
29481
29648
  });
29482
29649
  } catch (e) {
29483
29650
  console.error(Error("graph trace: the warm could not ask the sources", { cause: e }));
29484
29651
  }
29485
29652
  return r;
29486
- }, lz = H`
29653
+ }, gz = H`
29487
29654
  &.nothing {
29488
29655
  color: rgb(250, 204, 21);
29489
29656
  font-style: italic;
29490
29657
  }
29491
- `, uz = ({ value: e }) => e === null ? /* @__PURE__ */ Y("span", {
29492
- css: lz,
29658
+ `, _z = ({ value: e }) => e === null ? /* @__PURE__ */ Y("span", {
29659
+ css: gz,
29493
29660
  className: "nothing",
29494
29661
  children: "null"
29495
29662
  }) : e === void 0 ? /* @__PURE__ */ Y("span", {
29496
- css: lz,
29663
+ css: gz,
29497
29664
  className: "nothing",
29498
29665
  children: "absent"
29499
29666
  }) : e === "" ? /* @__PURE__ */ Y("span", {
29500
- css: lz,
29667
+ css: gz,
29501
29668
  className: "nothing",
29502
29669
  children: "empty"
29503
29670
  }) : /* @__PURE__ */ Y("span", {
29504
- css: lz,
29671
+ css: gz,
29505
29672
  children: String(e)
29506
- }), dz = H`
29673
+ }), vz = H`
29507
29674
  .fields {
29508
29675
  width: 100%;
29509
29676
  border-collapse: collapse;
@@ -29536,14 +29703,14 @@ var UR = H`
29536
29703
  white-space: pre-wrap;
29537
29704
  overflow-wrap: anywhere;
29538
29705
  }
29539
- `, fz = ({ blob: e, label: t }) => /* @__PURE__ */ X("div", {
29540
- css: dz,
29706
+ `, yz = ({ blob: e, label: t }) => /* @__PURE__ */ X("div", {
29707
+ css: vz,
29541
29708
  className: "blob",
29542
29709
  "data-blob": t,
29543
29710
  children: [
29544
29711
  e.kind === "absent" && /* @__PURE__ */ Y("div", {
29545
29712
  className: "absent",
29546
- children: /* @__PURE__ */ Y(uz, { value: null })
29713
+ children: /* @__PURE__ */ Y(_z, { value: null })
29547
29714
  }),
29548
29715
  e.kind === "raw" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
29549
29716
  className: "note",
@@ -29559,26 +29726,26 @@ var UR = H`
29559
29726
  children: [/* @__PURE__ */ Y("th", {
29560
29727
  scope: "row",
29561
29728
  children: e.field
29562
- }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.value }) })]
29729
+ }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.value }) })]
29563
29730
  }, e.field)) })
29564
29731
  })
29565
29732
  ]
29566
- }), pz = 88, mz = 20, hz = 36, gz = 266, _z = 76, vz = (e) => [
29733
+ }), bz = 88, xz = 20, Sz = 36, Cz = 266, wz = 76, Tz = (e) => [
29567
29734
  e.member ? `${e.kind} ${e.member.via === "member" ? "member" : "claimed"}` : "named by an edge",
29568
29735
  e.origin ?? "no origin",
29569
29736
  e.scope ?? "no scope"
29570
- ].join(" · "), yz = (e, t) => {
29737
+ ].join(" · "), Ez = (e, t) => {
29571
29738
  let n = e.find((e) => e.key === t);
29572
29739
  return new Set(n ? [n.fromUri, n.toUri] : []);
29573
- }, bz = (e, t) => {
29574
- let n = JR(e), r = e.links ?? [], i = XR(r), a = yz(r, t), o = new Set(n.nodes.map((e) => e.uri));
29740
+ }, Dz = (e, t) => {
29741
+ let n = tz(e), r = e.links ?? [], i = rz(r), a = Ez(r, t), o = new Set(n.nodes.map((e) => e.uri));
29575
29742
  return {
29576
29743
  nodes: n.nodes.map((e) => ({
29577
29744
  id: e.uri,
29578
29745
  type: "trace",
29579
29746
  position: {
29580
- x: hz + e.column * gz,
29581
- y: hz + e.row * _z
29747
+ x: Sz + e.column * Cz,
29748
+ y: Sz + e.row * wz
29582
29749
  },
29583
29750
  width: 178,
29584
29751
  height: 56,
@@ -29588,7 +29755,7 @@ var UR = H`
29588
29755
  uri: e.uri,
29589
29756
  kind: e.kind,
29590
29757
  title: e.title,
29591
- meta: vz(e),
29758
+ meta: Tz(e),
29592
29759
  lit: a.has(e.uri)
29593
29760
  }
29594
29761
  })),
@@ -29605,21 +29772,21 @@ var UR = H`
29605
29772
  selected: e.key === t,
29606
29773
  data: {
29607
29774
  spread: (n.lane - (n.lanes - 1) / 2) * 26,
29608
- active: iz(e.status),
29775
+ active: dz(e.status),
29609
29776
  status: e.status,
29610
29777
  label: e.kind,
29611
29778
  tooltip: `${e.kind} ${e.status} by ${e.by}: ${e.reason}`
29612
29779
  }
29613
29780
  };
29614
29781
  }),
29615
- width: Math.max(1, n.columns) * gz - pz + 72,
29616
- height: Math.max(1, n.rows) * _z - mz + 72
29782
+ width: Math.max(1, n.columns) * Cz - bz + 72,
29783
+ height: Math.max(1, n.rows) * wz - xz + 72
29617
29784
  };
29618
29785
  };
29619
29786
  //#endregion
29620
29787
  //#region src/router/debug/graph.tsx
29621
29788
  V();
29622
- var xz = H`
29789
+ var Oz = H`
29623
29790
  position: relative;
29624
29791
  height: 46rem;
29625
29792
  border: 1px solid rgba(255, 255, 255, 0.12);
@@ -29691,7 +29858,7 @@ var xz = H`
29691
29858
  .edge-label.active { fill: rgb(134, 239, 172); }
29692
29859
  .edge-label.refused { fill: rgb(252, 165, 165); }
29693
29860
  .cross { stroke: rgb(248, 113, 113); stroke-width: 1.5; }
29694
- `, Sz = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, Cz = ({ data: e }) => /* @__PURE__ */ X("div", {
29861
+ `, kz = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, Az = ({ data: e }) => /* @__PURE__ */ X("div", {
29695
29862
  className: `trace-node ${e.kind}${e.lit ? " lit" : ""}`,
29696
29863
  "data-node": e.uri,
29697
29864
  "data-kind": e.kind,
@@ -29703,19 +29870,19 @@ var xz = H`
29703
29870
  }),
29704
29871
  /* @__PURE__ */ Y("div", {
29705
29872
  className: "uri",
29706
- children: Sz(e.uri, 26)
29873
+ children: kz(e.uri, 26)
29707
29874
  }),
29708
- /* @__PURE__ */ Y("div", { children: e.title === null ? "no title" : Sz(e.title, 28) }),
29875
+ /* @__PURE__ */ Y("div", { children: e.title === null ? "no title" : kz(e.title, 28) }),
29709
29876
  /* @__PURE__ */ Y("div", {
29710
29877
  className: "meta",
29711
- children: Sz(e.meta, 34)
29878
+ children: kz(e.meta, 34)
29712
29879
  }),
29713
29880
  /* @__PURE__ */ Y(xj, {
29714
29881
  type: "source",
29715
29882
  position: Q.Right
29716
29883
  })
29717
29884
  ]
29718
- }), wz = ({ data: e, selected: t, sourceX: n, sourceY: r, targetX: i, targetY: a }) => {
29885
+ }), jz = ({ data: e, selected: t, sourceX: n, sourceY: r, targetX: i, targetY: a }) => {
29719
29886
  let o = e?.spread ?? 0, s = e?.active ? "active" : "refused", c = i >= n, l = Math.max(20, Math.abs(i - n) / 2) * (c ? 1 : -1), u = `M ${n} ${r} C ${n + l} ${r + o}, ${i - l} ${a + o}, ${i} ${a}`, d = (n + i) / 2, f = (r + a) / 2 + o * .75;
29720
29887
  return /* @__PURE__ */ X(J, { children: [
29721
29888
  /* @__PURE__ */ Y("path", {
@@ -29742,13 +29909,13 @@ var xz = H`
29742
29909
  x: d,
29743
29910
  y: f - 9,
29744
29911
  textAnchor: "middle",
29745
- children: Sz(e?.label ?? "", 22)
29912
+ children: kz(e?.label ?? "", 22)
29746
29913
  })
29747
29914
  ] });
29748
- }, Tz = { trace: Cz }, Ez = { trace: wz }, Dz = ({ bundle: e, selected: t, onSelect: n }) => {
29749
- let { nodes: r, edges: i } = z(() => bz(e, t), [e, t]), a = B((e, t) => n(t.id), [n]);
29915
+ }, Mz = { trace: Az }, Nz = { trace: jz }, Pz = ({ bundle: e, selected: t, onSelect: n }) => {
29916
+ let { nodes: r, edges: i } = z(() => Dz(e, t), [e, t]), a = B((e, t) => n(t.id), [n]);
29750
29917
  return /* @__PURE__ */ X("div", {
29751
- css: xz,
29918
+ css: Oz,
29752
29919
  "data-trace-graph": !0,
29753
29920
  children: [/* @__PURE__ */ X("div", {
29754
29921
  className: "legend",
@@ -29762,8 +29929,8 @@ var xz = H`
29762
29929
  }), /* @__PURE__ */ Y(eN, {
29763
29930
  nodes: r,
29764
29931
  edges: i,
29765
- nodeTypes: Tz,
29766
- edgeTypes: Ez,
29932
+ nodeTypes: Mz,
29933
+ edgeTypes: Nz,
29767
29934
  onEdgeClick: a,
29768
29935
  nodesDraggable: !1,
29769
29936
  nodesConnectable: !1,
@@ -29784,7 +29951,7 @@ var xz = H`
29784
29951
  //#endregion
29785
29952
  //#region src/router/debug/inspector.tsx
29786
29953
  V();
29787
- var Oz = H`
29954
+ var Fz = H`
29788
29955
  border: 1px solid rgba(255, 255, 255, 0.12);
29789
29956
  border-radius: 0.5rem;
29790
29957
  padding: 1rem 1.2rem;
@@ -29884,7 +30051,7 @@ var Oz = H`
29884
30051
  }
29885
30052
 
29886
30053
  .empty { color: rgba(255, 255, 255, 0.5); }
29887
- `, kz = (e) => e.kind === "link" ? `link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "episode-link" ? `episode link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "claim" ? `claim ${e.row.kind} from ${e.row.claimer}` : e.kind === "episode-source" ? `episode list from ${e.row.claimer}` : `episode claim ${e.row.kind} from ${e.row.claimer}`, Az = (e) => e === "not-an-edge-key" ? "not an edge key" : "not in this bundle", jz = (e) => {
30054
+ `, Iz = (e) => e.kind === "link" ? `link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "episode-link" ? `episode link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "claim" ? `claim ${e.row.kind} from ${e.row.claimer}` : e.kind === "episode-source" ? `episode list from ${e.row.claimer}` : `episode claim ${e.row.kind} from ${e.row.claimer}`, Lz = (e) => e === "not-an-edge-key" ? "not an edge key" : "not in this bundle", Rz = (e) => {
29888
30055
  if (e == null) return "";
29889
30056
  if (typeof e == "string") return e;
29890
30057
  if (e instanceof Uint8Array) return new TextDecoder().decode(e);
@@ -29895,20 +30062,20 @@ var Oz = H`
29895
30062
  } catch {
29896
30063
  return String(e);
29897
30064
  }
29898
- }, Mz = ({ rows: e }) => /* @__PURE__ */ Y("table", {
30065
+ }, zz = ({ rows: e }) => /* @__PURE__ */ Y("table", {
29899
30066
  className: "facts",
29900
30067
  children: /* @__PURE__ */ Y("tbody", { children: e.map(([e, t]) => /* @__PURE__ */ X("tr", {
29901
30068
  "data-fact": e,
29902
30069
  children: [/* @__PURE__ */ Y("th", {
29903
30070
  scope: "row",
29904
30071
  children: e
29905
- }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: t }) })]
30072
+ }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: t }) })]
29906
30073
  }, e)) })
29907
- }), Nz = ({ bundle: e, seq: t, answer: n, onLoad: r }) => {
29908
- let i = ez(e, t);
30074
+ }), Bz = ({ bundle: e, seq: t, answer: n, onLoad: r }) => {
30075
+ let i = sz(e, t);
29909
30076
  return /* @__PURE__ */ X(J, { children: [
29910
30077
  /* @__PURE__ */ X("h4", { children: ["answer ", t] }),
29911
- i ? /* @__PURE__ */ Y(Mz, { rows: [
30078
+ i ? /* @__PURE__ */ Y(zz, { rows: [
29912
30079
  ["uri", i.uri],
29913
30080
  ["origin", i.origin],
29914
30081
  ["operation", i.operation],
@@ -29943,8 +30110,8 @@ var Oz = H`
29943
30110
  ]
29944
30111
  })
29945
30112
  ] });
29946
- }, Pz = ({ bundle: e, index: t, trail: n, onFollow: r, onTrailTo: i, loadAnswerBytes: a }) => {
29947
- let [o, s] = I(void 0), c = n[n.length - 1], l = c === void 0 ? void 0 : t.get(c), u = $R(t, l && (l.kind === "link" || l.kind === "episode-link") ? l.row.supports : []), d = (e) => {
30113
+ }, Vz = ({ bundle: e, index: t, trail: n, onFollow: r, onTrailTo: i, loadAnswerBytes: a }) => {
30114
+ let [o, s] = I(void 0), c = n[n.length - 1], l = c === void 0 ? void 0 : t.get(c), u = oz(t, l && (l.kind === "link" || l.kind === "episode-link") ? l.row.supports : []), d = (e) => {
29948
30115
  s({
29949
30116
  seq: e,
29950
30117
  state: "loading",
@@ -29952,7 +30119,7 @@ var Oz = H`
29952
30119
  }), a(e).then((t) => s({
29953
30120
  seq: e,
29954
30121
  state: "done",
29955
- text: jz(t)
30122
+ text: Rz(t)
29956
30123
  })).catch((t) => s({
29957
30124
  seq: e,
29958
30125
  state: "failed",
@@ -29960,7 +30127,7 @@ var Oz = H`
29960
30127
  }));
29961
30128
  };
29962
30129
  return /* @__PURE__ */ X("div", {
29963
- css: Oz,
30130
+ css: Fz,
29964
30131
  "data-inspector": !0,
29965
30132
  children: [/* @__PURE__ */ Y("h3", { children: "Edge inspector" }), c === void 0 ? /* @__PURE__ */ Y("p", {
29966
30133
  className: "empty",
@@ -29970,10 +30137,10 @@ var Oz = H`
29970
30137
  children: [n.slice(0, -1).map((e, n) => /* @__PURE__ */ Y("button", {
29971
30138
  type: "button",
29972
30139
  onClick: () => i(n),
29973
- children: t.get(e) ? kz(t.get(e)) : e
30140
+ children: t.get(e) ? Iz(t.get(e)) : e
29974
30141
  }, e)), /* @__PURE__ */ Y("span", {
29975
30142
  className: "here",
29976
- children: l ? kz(l) : c
30143
+ children: l ? Iz(l) : c
29977
30144
  })]
29978
30145
  }), l === void 0 ? /* @__PURE__ */ X("p", {
29979
30146
  className: "empty",
@@ -29985,7 +30152,7 @@ var Oz = H`
29985
30152
  ]
29986
30153
  }) : /* @__PURE__ */ X(J, { children: [
29987
30154
  (l.kind === "link" || l.kind === "episode-link") && /* @__PURE__ */ X(J, { children: [
29988
- /* @__PURE__ */ Y(Mz, { rows: [
30155
+ /* @__PURE__ */ Y(zz, { rows: [
29989
30156
  ["from", l.row.fromUri],
29990
30157
  ["to", l.row.toUri],
29991
30158
  ["kind", l.row.kind],
@@ -29996,22 +30163,22 @@ var Oz = H`
29996
30163
  "status",
29997
30164
  " ",
29998
30165
  /* @__PURE__ */ Y("span", {
29999
- className: `status ${iz(l.row.status) ? "active" : "refused"}`,
30166
+ className: `status ${dz(l.row.status) ? "active" : "refused"}`,
30000
30167
  children: l.row.status
30001
30168
  })
30002
30169
  ] }),
30003
- /* @__PURE__ */ Y(Mz, { rows: l.kind === "link" ? [["confidence", l.row.confidence], ["version", l.row.version]] : [["from number", l.row.fromNumber], ["to number", l.row.toNumber]] }),
30170
+ /* @__PURE__ */ Y(zz, { rows: l.kind === "link" ? [["confidence", l.row.confidence], ["version", l.row.version]] : [["from number", l.row.fromNumber], ["to number", l.row.toNumber]] }),
30004
30171
  /* @__PURE__ */ Y("h4", { children: "evidence" }),
30005
- /* @__PURE__ */ Y(fz, {
30006
- blob: nz(l.row.evidence),
30172
+ /* @__PURE__ */ Y(yz, {
30173
+ blob: lz(l.row.evidence),
30007
30174
  label: "evidence"
30008
30175
  }),
30009
- l.kind === "link" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("h4", { children: "gates" }), /* @__PURE__ */ Y(fz, {
30010
- blob: nz(l.row.gates),
30176
+ l.kind === "link" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("h4", { children: "gates" }), /* @__PURE__ */ Y(yz, {
30177
+ blob: lz(l.row.gates),
30011
30178
  label: "gates"
30012
30179
  })] })
30013
30180
  ] }),
30014
- (l.kind === "claim" || l.kind === "episode-claim") && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Mz, { rows: [
30181
+ (l.kind === "claim" || l.kind === "episode-claim") && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(zz, { rows: [
30015
30182
  ["from", l.row.fromUri],
30016
30183
  ["to", l.row.toUri],
30017
30184
  ["kind", l.row.kind],
@@ -30019,18 +30186,18 @@ var Oz = H`
30019
30186
  ["provenance", l.row.provenance],
30020
30187
  ["answer seq", l.row.answerSeq],
30021
30188
  ...l.kind === "claim" ? [["target scope", l.row.targetScope]] : []
30022
- ] }), /* @__PURE__ */ Y(Nz, {
30189
+ ] }), /* @__PURE__ */ Y(Bz, {
30023
30190
  bundle: e,
30024
30191
  seq: l.row.answerSeq,
30025
30192
  answer: o,
30026
30193
  onLoad: d
30027
30194
  })] }),
30028
- l.kind === "episode-source" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Mz, { rows: [
30195
+ l.kind === "episode-source" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(zz, { rows: [
30029
30196
  ["media", l.row.fromUri],
30030
30197
  ["episode", l.row.toUri],
30031
30198
  ["listed by", l.row.claimer],
30032
30199
  ["answer seq", l.row.answerSeq]
30033
- ] }), /* @__PURE__ */ Y(Nz, {
30200
+ ] }), /* @__PURE__ */ Y(Bz, {
30034
30201
  bundle: e,
30035
30202
  seq: l.row.answerSeq,
30036
30203
  answer: o,
@@ -30055,11 +30222,11 @@ var Oz = H`
30055
30222
  children: "Follow"
30056
30223
  }) : /* @__PURE__ */ Y("span", {
30057
30224
  className: "unresolved",
30058
- children: Az(e.gap)
30225
+ children: Lz(e.gap)
30059
30226
  }),
30060
30227
  /* @__PURE__ */ Y("span", {
30061
30228
  className: "what",
30062
- children: e.ref ? kz(e.ref) : "unresolved"
30229
+ children: e.ref ? Iz(e.ref) : "unresolved"
30063
30230
  }),
30064
30231
  /* @__PURE__ */ Y("span", {
30065
30232
  className: "key",
@@ -30070,7 +30237,7 @@ var Oz = H`
30070
30237
  })
30071
30238
  ] })] })]
30072
30239
  });
30073
- }, Fz = H`
30240
+ }, Hz = H`
30074
30241
  table {
30075
30242
  width: 100%;
30076
30243
  border-collapse: collapse;
@@ -30123,8 +30290,8 @@ var Oz = H`
30123
30290
  .status.active { color: rgb(74, 222, 128); }
30124
30291
  .status.refused { color: rgb(248, 113, 113); }
30125
30292
  .empty { color: rgba(255, 255, 255, 0.5); font-size: 1.2rem; }
30126
- `, Iz = ({ fill: e, index: t, onSelect: n }) => {
30127
- let r = $R(t, e.supports);
30293
+ `, Uz = ({ fill: e, index: t, onSelect: n }) => {
30294
+ let r = oz(t, e.supports);
30128
30295
  return r.length === 0 ? /* @__PURE__ */ Y("div", {
30129
30296
  className: "proof",
30130
30297
  children: /* @__PURE__ */ Y("span", {
@@ -30147,20 +30314,20 @@ var Oz = H`
30147
30314
  children: `${t.fromUri} #${t.fromNumber ?? "null"} to ${t.toUri} #${t.toNumber ?? "null"}`
30148
30315
  }) : /* @__PURE__ */ Y("span", {
30149
30316
  className: "pair",
30150
- children: e.ref ? `${kz(e.ref)} ${e.key}` : /* @__PURE__ */ Y("span", {
30317
+ children: e.ref ? `${Iz(e.ref)} ${e.key}` : /* @__PURE__ */ Y("span", {
30151
30318
  className: "missing",
30152
- children: `${e.key}: ${Az(e.gap)}`
30319
+ children: `${e.key}: ${Lz(e.gap)}`
30153
30320
  })
30154
30321
  }),
30155
30322
  t && /* @__PURE__ */ Y("span", {
30156
- className: `status ${iz(t.status) ? "active" : "refused"}`,
30323
+ className: `status ${dz(t.status) ? "active" : "refused"}`,
30157
30324
  children: t.status
30158
30325
  })
30159
30326
  ]
30160
30327
  }, e.key);
30161
30328
  }) });
30162
- }, Lz = ({ bundle: e, index: t, selected: n, onSelect: r }) => /* @__PURE__ */ X("div", {
30163
- css: Fz,
30329
+ }, Wz = ({ bundle: e, index: t, selected: n, onSelect: r }) => /* @__PURE__ */ X("div", {
30330
+ css: Hz,
30164
30331
  "data-episodes": !0,
30165
30332
  children: [
30166
30333
  (e.episodes ?? []).length === 0 ? /* @__PURE__ */ Y("p", {
@@ -30180,8 +30347,8 @@ var Oz = H`
30180
30347
  className: "slot",
30181
30348
  children: e.slotId
30182
30349
  }),
30183
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.number }) }),
30184
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.title }) }),
30350
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.number }) }),
30351
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.title }) }),
30185
30352
  /* @__PURE__ */ Y("td", { children: e.fills.length === 0 ? /* @__PURE__ */ Y("span", {
30186
30353
  className: "empty",
30187
30354
  children: "nothing fills this slot"
@@ -30194,7 +30361,7 @@ var Oz = H`
30194
30361
  className: "uri",
30195
30362
  children: e.episodeUri
30196
30363
  }),
30197
- /* @__PURE__ */ X("span", { children: ["#", /* @__PURE__ */ Y(uz, { value: e.number })] }),
30364
+ /* @__PURE__ */ X("span", { children: ["#", /* @__PURE__ */ Y(_z, { value: e.number })] }),
30198
30365
  /* @__PURE__ */ Y("span", { children: e.origin }),
30199
30366
  /* @__PURE__ */ Y("span", {
30200
30367
  className: "via",
@@ -30205,7 +30372,7 @@ var Oz = H`
30205
30372
  children: e.by
30206
30373
  })
30207
30374
  ]
30208
- }), /* @__PURE__ */ Y(Iz, {
30375
+ }), /* @__PURE__ */ Y(Uz, {
30209
30376
  fill: e,
30210
30377
  index: t,
30211
30378
  onSelect: r
@@ -30243,7 +30410,7 @@ var Oz = H`
30243
30410
  }),
30244
30411
  /* @__PURE__ */ Y("td", { children: e.kind }),
30245
30412
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("span", {
30246
- className: `status ${iz(e.status) ? "active" : "refused"}`,
30413
+ className: `status ${dz(e.status) ? "active" : "refused"}`,
30247
30414
  children: e.status
30248
30415
  }) }),
30249
30416
  /* @__PURE__ */ Y("td", { children: e.by }),
@@ -30299,7 +30466,7 @@ var Oz = H`
30299
30466
  //#endregion
30300
30467
  //#region src/router/debug/index.tsx
30301
30468
  V();
30302
- var Rz = H`
30469
+ var Gz = H`
30303
30470
  max-width: 150rem;
30304
30471
  margin: calc(var(--stub-header-height) + 2rem) auto 6rem;
30305
30472
  padding: 0 1.5rem;
@@ -30409,14 +30576,14 @@ var Rz = H`
30409
30576
 
30410
30577
  .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
30411
30578
  @media (max-width: 900px) { .columns { grid-template-columns: 1fr; } }
30412
- `, zz = 1500, Bz = ({ label: e, value: t }) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("span", {
30579
+ `, Kz = 1500, qz = ({ label: e, value: t }) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("span", {
30413
30580
  className: "label",
30414
30581
  children: e
30415
- }), /* @__PURE__ */ Y("code", { children: /* @__PURE__ */ Y(uz, { value: t }) })] }), Vz = ({ reason: e }) => e === "null" ? /* @__PURE__ */ Y("code", {
30582
+ }), /* @__PURE__ */ Y("code", { children: /* @__PURE__ */ Y(_z, { value: t }) })] }), Jz = ({ reason: e }) => e === "null" ? /* @__PURE__ */ Y("code", {
30416
30583
  className: "token",
30417
30584
  "data-token-reason": !0,
30418
30585
  children: "\"null\""
30419
- }) : /* @__PURE__ */ Y(uz, { value: e }), Hz = ({ load: e = pb, loadAnswerBytes: t = mb, warm: n = cz }) => {
30586
+ }) : /* @__PURE__ */ Y(_z, { value: e }), Yz = ({ load: e = pb, loadAnswerBytes: t = mb, warm: n = hz }) => {
30420
30587
  let r = gu(), [, i] = hu(), a = Cb(r), [o, s] = I(a), [c, l] = I({ kind: "idle" }), [u, d] = I(0), [f, p] = I({ kind: "off" }), [m, h] = I([]), g = R(""), _ = R(void 0);
30421
30588
  L(() => {
30422
30589
  s(a), h([]), p({ kind: "off" }), g.current = "", _.current !== void 0 && clearTimeout(_.current), _.current = void 0;
@@ -30440,14 +30607,14 @@ var Rz = H`
30440
30607
  t = !1;
30441
30608
  };
30442
30609
  }, [a, u]);
30443
- let v = c.kind === "done" ? c.bundle : void 0, y = z(() => v ? ZR(v) : /* @__PURE__ */ new Map(), [v]), b = m[m.length - 1], x = !(!v || v.resolved || v.reason === "not-enabled");
30610
+ let v = c.kind === "done" ? c.bundle : void 0, y = z(() => v ? iz(v) : /* @__PURE__ */ new Map(), [v]), b = m[m.length - 1], x = !(!v || v.resolved || v.reason === "not-enabled");
30444
30611
  return L(() => {
30445
30612
  if (!a || !x || g.current === a) return;
30446
30613
  g.current = a;
30447
30614
  let e = a, t = () => g.current === e, r = () => {
30448
30615
  _.current === void 0 && (_.current = setTimeout(() => {
30449
30616
  _.current = void 0, t() && d((e) => e + 1);
30450
- }, zz));
30617
+ }, Kz));
30451
30618
  };
30452
30619
  p({
30453
30620
  kind: "asking",
@@ -30473,7 +30640,7 @@ var Rz = H`
30473
30640
  }, [a, x]), L(() => () => {
30474
30641
  g.current = "", _.current !== void 0 && clearTimeout(_.current);
30475
30642
  }, []), /* @__PURE__ */ X("div", {
30476
- css: Rz,
30643
+ css: Gz,
30477
30644
  "data-debug-trace": !0,
30478
30645
  children: [
30479
30646
  /* @__PURE__ */ Y("h1", { children: "Graph trace" }),
@@ -30531,23 +30698,23 @@ var Rz = H`
30531
30698
  children: [/* @__PURE__ */ X("div", {
30532
30699
  className: "pairs",
30533
30700
  children: [
30534
- /* @__PURE__ */ Y(Bz, {
30701
+ /* @__PURE__ */ Y(qz, {
30535
30702
  label: "asked",
30536
30703
  value: v.asked
30537
30704
  }),
30538
- /* @__PURE__ */ Y(Bz, {
30705
+ /* @__PURE__ */ Y(qz, {
30539
30706
  label: "cluster",
30540
30707
  value: v.resolved.clusterId
30541
30708
  }),
30542
- /* @__PURE__ */ Y(Bz, {
30709
+ /* @__PURE__ */ Y(qz, {
30543
30710
  label: "aggregate",
30544
30711
  value: v.resolved.aggUri
30545
30712
  }),
30546
- /* @__PURE__ */ Y(Bz, {
30713
+ /* @__PURE__ */ Y(qz, {
30547
30714
  label: "scope",
30548
30715
  value: v.resolved.scope
30549
30716
  }),
30550
- /* @__PURE__ */ Y(Bz, {
30717
+ /* @__PURE__ */ Y(qz, {
30551
30718
  label: "kind",
30552
30719
  value: v.resolved.kind
30553
30720
  })
@@ -30577,7 +30744,7 @@ var Rz = H`
30577
30744
  children: [
30578
30745
  /* @__PURE__ */ Y("div", {
30579
30746
  className: "why",
30580
- children: rz(v.reason)
30747
+ children: uz(v.reason)
30581
30748
  }),
30582
30749
  v.reason === "not-enabled" && /* @__PURE__ */ X("div", {
30583
30750
  className: "advice",
@@ -30598,10 +30765,10 @@ var Rz = H`
30598
30765
  }),
30599
30766
  /* @__PURE__ */ X("div", {
30600
30767
  className: "pairs",
30601
- children: [/* @__PURE__ */ Y(Bz, {
30768
+ children: [/* @__PURE__ */ Y(qz, {
30602
30769
  label: "asked",
30603
30770
  value: v.asked
30604
- }), /* @__PURE__ */ Y(Bz, {
30771
+ }), /* @__PURE__ */ Y(qz, {
30605
30772
  label: "reason",
30606
30773
  value: v.reason ?? null
30607
30774
  })]
@@ -30612,19 +30779,19 @@ var Rz = H`
30612
30779
  className: "pairs",
30613
30780
  "data-run-length": !0,
30614
30781
  children: [
30615
- /* @__PURE__ */ Y(Bz, {
30782
+ /* @__PURE__ */ Y(qz, {
30616
30783
  label: "run length",
30617
30784
  value: v.runLength?.value ?? null
30618
30785
  }),
30619
- /* @__PURE__ */ Y(Bz, {
30786
+ /* @__PURE__ */ Y(qz, {
30620
30787
  label: "from",
30621
30788
  value: v.runLength?.from ?? null
30622
30789
  }),
30623
- /* @__PURE__ */ Y(Bz, {
30790
+ /* @__PURE__ */ Y(qz, {
30624
30791
  label: "tier",
30625
30792
  value: v.runLength?.tier ?? null
30626
30793
  }),
30627
- /* @__PURE__ */ Y(Bz, {
30794
+ /* @__PURE__ */ Y(qz, {
30628
30795
  label: "witnesses",
30629
30796
  value: v.runLength?.witnesses ?? null
30630
30797
  })
@@ -30633,10 +30800,10 @@ var Rz = H`
30633
30800
  /* @__PURE__ */ X("div", {
30634
30801
  className: "pairs",
30635
30802
  "data-cost": !0,
30636
- children: [/* @__PURE__ */ Y(Bz, {
30803
+ children: [/* @__PURE__ */ Y(qz, {
30637
30804
  label: "statements",
30638
30805
  value: v.cost?.statements ?? null
30639
- }), /* @__PURE__ */ Y(Bz, {
30806
+ }), /* @__PURE__ */ Y(qz, {
30640
30807
  label: "ms to build",
30641
30808
  value: v.cost?.ms ?? null
30642
30809
  })]
@@ -30674,16 +30841,16 @@ var Rz = H`
30674
30841
  ] }) }), /* @__PURE__ */ Y("tbody", { children: v.asks.map((e, t) => /* @__PURE__ */ X("tr", {
30675
30842
  "data-ask": e.origin,
30676
30843
  children: [
30677
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.seq ?? null }) }),
30844
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.seq ?? null }) }),
30678
30845
  /* @__PURE__ */ Y("td", { children: e.origin }),
30679
30846
  /* @__PURE__ */ Y("td", { children: e.outcome }),
30680
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(Vz, { reason: e.reason }) })
30847
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(Jz, { reason: e.reason }) })
30681
30848
  ]
30682
30849
  }, `${e.origin} ${e.seq ?? t}`)) })]
30683
30850
  })] })]
30684
30851
  }),
30685
30852
  /* @__PURE__ */ Y("h2", { children: "Media graph" }),
30686
- /* @__PURE__ */ Y(Dz, {
30853
+ /* @__PURE__ */ Y(Pz, {
30687
30854
  bundle: v,
30688
30855
  selected: b,
30689
30856
  onSelect: (e) => h([e])
@@ -30718,12 +30885,12 @@ var Rz = H`
30718
30885
  }),
30719
30886
  /* @__PURE__ */ Y("td", { children: e.kind }),
30720
30887
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("span", {
30721
- className: `status ${iz(e.status) ? "active" : "refused"}`,
30888
+ className: `status ${dz(e.status) ? "active" : "refused"}`,
30722
30889
  children: e.status
30723
30890
  }) }),
30724
30891
  /* @__PURE__ */ Y("td", { children: e.by }),
30725
30892
  /* @__PURE__ */ Y("td", { children: e.reason }),
30726
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.confidence }) }),
30893
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.confidence }) }),
30727
30894
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("button", {
30728
30895
  type: "button",
30729
30896
  className: "inspect",
@@ -30764,7 +30931,7 @@ var Rz = H`
30764
30931
  /* @__PURE__ */ Y("td", { children: e.claimer }),
30765
30932
  /* @__PURE__ */ Y("td", { children: e.provenance }),
30766
30933
  /* @__PURE__ */ Y("td", { children: e.answerSeq }),
30767
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.targetScope }) }),
30934
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.targetScope }) }),
30768
30935
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("button", {
30769
30936
  type: "button",
30770
30937
  className: "inspect",
@@ -30800,9 +30967,9 @@ var Rz = H`
30800
30967
  /* @__PURE__ */ Y("td", { children: e.by }),
30801
30968
  /* @__PURE__ */ Y("td", {
30802
30969
  className: "uri",
30803
- children: /* @__PURE__ */ Y(uz, { value: e.evidence })
30970
+ children: /* @__PURE__ */ Y(_z, { value: e.evidence })
30804
30971
  }),
30805
- /* @__PURE__ */ Y("td", { children: (e.supports ?? []).length === 0 ? /* @__PURE__ */ Y(uz, { value: null }) : e.supports.map((e) => /* @__PURE__ */ Y("button", {
30972
+ /* @__PURE__ */ Y("td", { children: (e.supports ?? []).length === 0 ? /* @__PURE__ */ Y(_z, { value: null }) : e.supports.map((e) => /* @__PURE__ */ Y("button", {
30806
30973
  type: "button",
30807
30974
  className: "inspect",
30808
30975
  "data-attachment-support": e,
@@ -30812,14 +30979,14 @@ var Rz = H`
30812
30979
  ] }, `${e.runUri} ${e.containerUri} ${e.via} ${e.by}`)) })]
30813
30980
  }),
30814
30981
  /* @__PURE__ */ Y("h2", { children: "Episodes" }),
30815
- /* @__PURE__ */ Y(Lz, {
30982
+ /* @__PURE__ */ Y(Wz, {
30816
30983
  bundle: v,
30817
30984
  index: y,
30818
30985
  selected: b,
30819
30986
  onSelect: (e) => h([e])
30820
30987
  }),
30821
30988
  /* @__PURE__ */ Y("h2", { children: "Inspector" }),
30822
- /* @__PURE__ */ Y(Pz, {
30989
+ /* @__PURE__ */ Y(Vz, {
30823
30990
  bundle: v,
30824
30991
  index: y,
30825
30992
  trail: m,
@@ -30830,52 +30997,52 @@ var Rz = H`
30830
30997
  ] })
30831
30998
  ]
30832
30999
  });
30833
- }, Uz = "[data-party-scroll]", Wz = () => {
30834
- let e = document.querySelectorAll(Uz);
31000
+ }, Xz = "[data-party-scroll]", Zz = () => {
31001
+ let e = document.querySelectorAll(Xz);
30835
31002
  for (let t = e.length - 1; t >= 0; t--) {
30836
31003
  let n = e[t];
30837
31004
  if (n.scrollHeight - n.clientHeight > 0) return n;
30838
31005
  }
30839
- }, Gz = (e, t) => t > 0 ? Math.min(1, Math.max(0, e / t)) : 0, Kz = () => {
30840
- let e = Wz();
31006
+ }, Qz = (e, t) => t > 0 ? Math.min(1, Math.max(0, e / t)) : 0, $z = () => {
31007
+ let e = Zz();
30841
31008
  return e ? Math.max(0, e.scrollHeight - e.clientHeight) : Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
30842
- }, qz = () => {
30843
- let e = Wz();
30844
- return e ? Gz(e.scrollTop, e.scrollHeight - e.clientHeight) : Gz(window.scrollY, document.documentElement.scrollHeight - window.innerHeight);
30845
- }, Jz = () => {
31009
+ }, eB = () => {
31010
+ let e = Zz();
31011
+ return e ? Qz(e.scrollTop, e.scrollHeight - e.clientHeight) : Qz(window.scrollY, document.documentElement.scrollHeight - window.innerHeight);
31012
+ }, tB = () => {
30846
31013
  try {
30847
31014
  return window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches === !0;
30848
31015
  } catch {
30849
31016
  return !1;
30850
31017
  }
30851
- }, Yz = (e, t, n) => !e || Jz() ? "instant" : t <= n * 2 ? "smooth" : "instant", Xz = (e, { smooth: t } = {}) => {
30852
- let n = Wz();
31018
+ }, nB = (e, t, n) => !e || tB() ? "instant" : t <= n * 2 ? "smooth" : "instant", rB = (e, { smooth: t } = {}) => {
31019
+ let n = Zz();
30853
31020
  if (n) {
30854
31021
  let r = n.scrollHeight - n.clientHeight, i = r > 0 ? e * r : 0;
30855
31022
  n.scrollTo({
30856
31023
  top: i,
30857
- behavior: Yz(t, Math.abs(i - n.scrollTop), n.clientHeight)
31024
+ behavior: nB(t, Math.abs(i - n.scrollTop), n.clientHeight)
30858
31025
  });
30859
31026
  return;
30860
31027
  }
30861
31028
  let r = document.documentElement.scrollHeight - window.innerHeight, i = r > 0 ? e * r : 0;
30862
31029
  window.scrollTo({
30863
31030
  top: i,
30864
- behavior: Yz(t, Math.abs(i - window.scrollY), window.innerHeight)
31031
+ behavior: nB(t, Math.abs(i - window.scrollY), window.innerHeight)
30865
31032
  });
30866
31033
  };
30867
31034
  //#endregion
30868
31035
  //#region src/components/party-sync.tsx
30869
31036
  V();
30870
- var Zz = 2, Qz = 8e3, $z = [
31037
+ var iB = 2, aB = 8e3, oB = [
30871
31038
  "wheel",
30872
31039
  "touchstart",
30873
31040
  "keydown",
30874
31041
  "pointerdown"
30875
- ], eB = 60, tB = () => {
31042
+ ], sB = 60, cB = () => {
30876
31043
  let e = Uv(), [t, n] = hu(), r = gu(), i = r ? `${t}?${r}` : t, a = e.status === "active" ? e.role : void 0, o = t === Fv;
30877
31044
  L(() => {
30878
- a !== "host" || o || (Z.setLocation(i, qz()), Z.send({
31045
+ a !== "host" || o || (Z.setLocation(i, eB()), Z.send({
30879
31046
  t: "nav",
30880
31047
  path: i
30881
31048
  }));
@@ -30887,14 +31054,14 @@ var Zz = 2, Qz = 8e3, $z = [
30887
31054
  if (a !== "host" || o) return;
30888
31055
  let e = 0, t, n = () => {
30889
31056
  t = void 0, e = Date.now();
30890
- let n = qz();
31057
+ let n = eB();
30891
31058
  Z.setLocation(i, n), Z.send({
30892
31059
  t: "scroll",
30893
31060
  y: n
30894
31061
  });
30895
31062
  }, r = () => {
30896
31063
  if (t) return;
30897
- let r = Math.max(0, 1e3 / Zz - (Date.now() - e));
31064
+ let r = Math.max(0, 1e3 / iB - (Date.now() - e));
30898
31065
  t = setTimeout(n, r);
30899
31066
  };
30900
31067
  return document.addEventListener("scroll", r, {
@@ -30909,21 +31076,21 @@ var Zz = 2, Qz = 8e3, $z = [
30909
31076
  if (s.current === void 0) return;
30910
31077
  let e = s.current;
30911
31078
  s.current = void 0;
30912
- let t = 0, n = -1, r = 0, i = !1, a = c.current, o = Date.now() + Qz, l = () => {
31079
+ let t = 0, n = -1, r = 0, i = !1, a = c.current, o = Date.now() + aB, l = () => {
30913
31080
  i = !0;
30914
31081
  };
30915
- for (let e of $z) document.addEventListener(e, l, { passive: !0 });
31082
+ for (let e of oB) document.addEventListener(e, l, { passive: !0 });
30916
31083
  let u = () => {
30917
31084
  cancelAnimationFrame(t);
30918
- for (let e of $z) document.removeEventListener(e, l);
31085
+ for (let e of oB) document.removeEventListener(e, l);
30919
31086
  };
30920
- if (Gf(), e === 0) return Xz(0), u;
31087
+ if (Gf(), e === 0) return rB(0), u;
30921
31088
  let d = () => {
30922
- let s = Kz();
31089
+ let s = $z();
30923
31090
  s === n ? r += 1 : (r = 0, n = s);
30924
- let l = s > 0 && r >= eB;
31091
+ let l = s > 0 && r >= sB;
30925
31092
  if (i || c.current !== a || l || Date.now() > o) return u();
30926
- Xz(e), t = requestAnimationFrame(d);
31093
+ rB(e), t = requestAnimationFrame(d);
30927
31094
  };
30928
31095
  return t = requestAnimationFrame(d), u;
30929
31096
  }, [i]);
@@ -30932,7 +31099,7 @@ var Zz = 2, Qz = 8e3, $z = [
30932
31099
  l.current = !1;
30933
31100
  }, [e.status === "active" ? e.invite : void 0]);
30934
31101
  let u = (e, t) => {
30935
- l.current = !0, e === i ? (Gf(), c.current += 1, Xz(t, { smooth: !0 })) : (s.current = t, n(e));
31102
+ l.current = !0, e === i ? (Gf(), c.current += 1, rB(t, { smooth: !0 })) : (s.current = t, n(e));
30936
31103
  };
30937
31104
  return Wv((e, { replayed: t }) => {
30938
31105
  if (a === "guest") switch (e.t) {
@@ -30940,7 +31107,7 @@ var Zz = 2, Qz = 8e3, $z = [
30940
31107
  l.current = !0, e.path !== i && n(e.path);
30941
31108
  return;
30942
31109
  case "scroll":
30943
- Z.hostPath() === i && (Gf(), c.current += 1, Xz(e.y, { smooth: !0 }));
31110
+ Z.hostPath() === i && (Gf(), c.current += 1, rB(e.y, { smooth: !0 }));
30944
31111
  return;
30945
31112
  case "state":
30946
31113
  (!l.current || t) && u(e.path, e.y);
@@ -30951,7 +31118,7 @@ var Zz = 2, Qz = 8e3, $z = [
30951
31118
  //#endregion
30952
31119
  //#region src/components/party-cursor.tsx
30953
31120
  V();
30954
- var nB = 4, rB = 2500, iB = H`
31121
+ var lB = 4, uB = 2500, dB = H`
30955
31122
  position: fixed;
30956
31123
  left: 0;
30957
31124
  top: 0;
@@ -30978,7 +31145,7 @@ var nB = 4, rB = 2500, iB = H`
30978
31145
  font-weight: 600;
30979
31146
  white-space: nowrap;
30980
31147
  }
30981
- `, aB = () => {
31148
+ `, fB = () => {
30982
31149
  let e = Uv(), t = e.status === "active" ? e.role : void 0, [n] = hu(), r = gu(), i = r ? `${n}?${r}` : n;
30983
31150
  L(() => {
30984
31151
  if (t !== "host") return;
@@ -30992,7 +31159,7 @@ var nB = 4, rB = 2500, iB = H`
30992
31159
  r = {
30993
31160
  x: Math.min(1, Math.max(0, t.clientX / window.innerWidth)),
30994
31161
  y: Math.min(1, Math.max(0, t.clientY / window.innerHeight))
30995
- }, !n && (n = setTimeout(i, Math.max(0, 1e3 / nB - (Date.now() - e))));
31162
+ }, !n && (n = setTimeout(i, Math.max(0, 1e3 / lB - (Date.now() - e))));
30996
31163
  };
30997
31164
  return window.addEventListener("pointermove", a, { passive: !0 }), () => {
30998
31165
  window.removeEventListener("pointermove", a), n && clearTimeout(n);
@@ -31016,10 +31183,10 @@ var nB = 4, rB = 2500, iB = H`
31016
31183
  if (!a) return;
31017
31184
  let e = setInterval(() => c(Date.now()), 500);
31018
31185
  return () => clearInterval(e);
31019
- }, [a]), t !== "guest" || !a || s - a.at > rB) return null;
31186
+ }, [a]), t !== "guest" || !a || s - a.at > uB) return null;
31020
31187
  let u = e.status === "active" ? Z.nameOf(e.owner) : void 0;
31021
31188
  return /* @__PURE__ */ X("div", {
31022
- css: iB,
31189
+ css: dB,
31023
31190
  style: {
31024
31191
  "--x": `${a.x * 100}vw`,
31025
31192
  "--y": `${a.y * 100}vh`
@@ -31046,7 +31213,7 @@ var nB = 4, rB = 2500, iB = H`
31046
31213
  //#endregion
31047
31214
  //#region src/components/party-chat.tsx
31048
31215
  V();
31049
- var oB = H`
31216
+ var pB = H`
31050
31217
  position: fixed;
31051
31218
  right: 2rem;
31052
31219
  bottom: 2rem;
@@ -31173,7 +31340,7 @@ var oB = H`
31173
31340
  color: #fff;
31174
31341
  cursor: pointer;
31175
31342
  }
31176
- `, sB = (e, t) => e.self ? "you" : e.name ?? (e.from === t ? "host" : e.from.slice(0, 6)), cB = () => {
31343
+ `, mB = (e, t) => e.self ? "you" : e.name ?? (e.from === t ? "host" : e.from.slice(0, 6)), hB = () => {
31177
31344
  let e = Uv(), t = e.status === "active", [n, r] = I(!1), [i, a] = I(() => Z.chat()), [o, s] = I(0), [c, l] = I(""), u = R(null);
31178
31345
  if (Wv((e, t) => {
31179
31346
  (e.t === "chat" || e.t === "name") && (a(Z.chat()), e.t === "chat" && !n && !t.self && s((e) => e + 1));
@@ -31186,7 +31353,7 @@ var oB = H`
31186
31353
  }, [i, n]), !t) return null;
31187
31354
  let d = e.owner;
31188
31355
  return /* @__PURE__ */ X("div", {
31189
- css: oB,
31356
+ css: pB,
31190
31357
  children: [n && /* @__PURE__ */ X("div", {
31191
31358
  className: "panel",
31192
31359
  role: "dialog",
@@ -31211,7 +31378,7 @@ var oB = H`
31211
31378
  className: `line${e.self ? " self" : ""}`,
31212
31379
  children: [/* @__PURE__ */ Y("span", {
31213
31380
  className: "who",
31214
- children: sB(e, d)
31381
+ children: mB(e, d)
31215
31382
  }), /* @__PURE__ */ Y("span", {
31216
31383
  className: "text",
31217
31384
  children: e.text
@@ -31255,21 +31422,21 @@ var oB = H`
31255
31422
  //#endregion
31256
31423
  //#region src/components/scroll-reset.tsx
31257
31424
  V();
31258
- var lB = () => ({
31425
+ var gB = () => ({
31259
31426
  pathname: location.pathname,
31260
31427
  search: location.search
31261
- }), uB = [
31428
+ }), _B = [
31262
31429
  ["pushState", "push"],
31263
31430
  ["replaceState", "replace"],
31264
31431
  ["popstate", "pop"]
31265
- ], dB = () => {
31266
- let e = R(lB());
31432
+ ], vB = () => {
31433
+ let e = R(gB());
31267
31434
  return L(() => {
31268
- let t = uB.map(([t, n]) => {
31435
+ let t = _B.map(([t, n]) => {
31269
31436
  let r = () => {
31270
31437
  let t = {
31271
31438
  from: e.current,
31272
- to: lB(),
31439
+ to: gB(),
31273
31440
  kind: n,
31274
31441
  asked: Jf()
31275
31442
  };
@@ -31286,15 +31453,15 @@ var lB = () => ({
31286
31453
  //#endregion
31287
31454
  //#region src/router/index.tsx
31288
31455
  V();
31289
- var fB = () => {
31456
+ var yB = () => {
31290
31457
  let { query: e } = pu();
31291
31458
  return /* @__PURE__ */ Y(Eu, {
31292
31459
  to: bd({ query: yd(e) }),
31293
31460
  replace: !0
31294
31461
  });
31295
- }, pB = () => (L(() => {
31462
+ }, bB = () => (L(() => {
31296
31463
  globalThis.close();
31297
- }, []), /* @__PURE__ */ Y("div", { children: "Logging in... this window will close automatically." })), mB = H`
31464
+ }, []), /* @__PURE__ */ Y("div", { children: "Logging in... this window will close automatically." })), xB = H`
31298
31465
  display: flex;
31299
31466
  flex-direction: column;
31300
31467
  min-height: 100vh;
@@ -31302,12 +31469,12 @@ var fB = () => {
31302
31469
  & > .content {
31303
31470
  flex: 1;
31304
31471
  }
31305
- `, hB = H`
31472
+ `, SB = H`
31306
31473
  padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
31307
- `, gB = () => /* @__PURE__ */ Y(yu, {
31474
+ `, CB = () => /* @__PURE__ */ Y(yu, {
31308
31475
  hrefs: Yd,
31309
31476
  children: /* @__PURE__ */ X("div", {
31310
- css: mB,
31477
+ css: xB,
31311
31478
  children: [
31312
31479
  /* @__PURE__ */ Y(Zv, {}),
31313
31480
  /* @__PURE__ */ Y("div", {
@@ -31315,65 +31482,65 @@ var fB = () => {
31315
31482
  children: /* @__PURE__ */ X(Tu, { children: [
31316
31483
  /* @__PURE__ */ Y(Su, {
31317
31484
  path: ku(K.HOME),
31318
- component: SI
31485
+ component: kI
31319
31486
  }),
31320
31487
  /* @__PURE__ */ Y(Su, {
31321
31488
  path: ku(K.MEDIA),
31322
- component: SI
31489
+ component: kI
31323
31490
  }),
31324
31491
  /* @__PURE__ */ Y(Su, {
31325
31492
  path: ku(K.SEARCH),
31326
- component: sL
31493
+ component: mL
31327
31494
  }),
31328
31495
  /* @__PURE__ */ Y(Su, {
31329
31496
  path: ku(K.SEARCH_LEGACY),
31330
- component: fB
31497
+ component: yB
31331
31498
  }),
31332
31499
  /* @__PURE__ */ Y(Su, {
31333
31500
  path: ku(K.LEGAL),
31334
- component: uL
31501
+ component: _L
31335
31502
  }),
31336
31503
  /* @__PURE__ */ Y(Su, {
31337
31504
  path: ku(K.PRIVACY),
31338
- component: _L
31505
+ component: wL
31339
31506
  }),
31340
31507
  /* @__PURE__ */ Y(Su, {
31341
31508
  path: ku(K.SETTINGS),
31342
- component: cR
31509
+ component: hR
31343
31510
  }),
31344
31511
  /* @__PURE__ */ Y(Su, {
31345
31512
  path: ku(K.WATCH),
31346
- component: HR
31513
+ component: YR
31347
31514
  }),
31348
31515
  /* @__PURE__ */ Y(Su, {
31349
31516
  path: ku(K.PARTY),
31350
- component: GR
31517
+ component: QR
31351
31518
  }),
31352
31519
  /* @__PURE__ */ Y(Su, {
31353
31520
  path: ku(K.DEBUG_TRACE),
31354
- component: Hz
31521
+ component: Yz
31355
31522
  }),
31356
31523
  /* @__PURE__ */ Y(Su, {
31357
31524
  path: ku(K.LOGIN_CALLBACK),
31358
- component: pB
31525
+ component: bB
31359
31526
  }),
31360
31527
  /* @__PURE__ */ Y(Su, { component: () => /* @__PURE__ */ Y("div", {
31361
- css: hB,
31528
+ css: SB,
31362
31529
  children: "404 No page found"
31363
31530
  }) })
31364
31531
  ] })
31365
31532
  }),
31366
31533
  /* @__PURE__ */ Y($v, {}),
31367
31534
  /* @__PURE__ */ Y(ny, {}),
31368
- /* @__PURE__ */ Y(tB, {}),
31369
- /* @__PURE__ */ Y(aB, {}),
31370
31535
  /* @__PURE__ */ Y(cB, {}),
31371
- /* @__PURE__ */ Y(dB, {})
31536
+ /* @__PURE__ */ Y(fB, {}),
31537
+ /* @__PURE__ */ Y(hB, {}),
31538
+ /* @__PURE__ */ Y(vB, {})
31372
31539
  ]
31373
31540
  })
31374
31541
  });
31375
31542
  st(), V();
31376
- var _B = H`
31543
+ var wB = H`
31377
31544
  display: flex;
31378
31545
  align-items: center;
31379
31546
  justify-content: center;
@@ -31422,10 +31589,10 @@ var _B = H`
31422
31589
  background: rgba(255, 255, 255, 0.08);
31423
31590
  }
31424
31591
  }
31425
- `, vB = (e, t) => `route: ${t}\nmessage: ${e.message}\nstack: ${e.stack ?? "(no stack)"}`, yB = ({ error: e, route: t }) => {
31592
+ `, TB = (e, t) => `route: ${t}\nmessage: ${e.message}\nstack: ${e.stack ?? "(no stack)"}`, EB = ({ error: e, route: t }) => {
31426
31593
  let [n, r] = I(!1);
31427
31594
  return /* @__PURE__ */ Y("div", {
31428
- css: _B,
31595
+ css: wB,
31429
31596
  children: /* @__PURE__ */ X("div", {
31430
31597
  className: "panel",
31431
31598
  children: [
@@ -31443,7 +31610,7 @@ var _B = H`
31443
31610
  }), /* @__PURE__ */ Y("button", {
31444
31611
  type: "button",
31445
31612
  onClick: () => {
31446
- let n = navigator.clipboard?.writeText(vB(e, t));
31613
+ let n = navigator.clipboard?.writeText(TB(e, t));
31447
31614
  n && n.then(() => r(!0)).catch((e) => console.error(Error("the failure details could not be copied", { cause: e })));
31448
31615
  },
31449
31616
  children: n ? "Copied" : "Copy details"
@@ -31452,7 +31619,7 @@ var _B = H`
31452
31619
  ]
31453
31620
  })
31454
31621
  });
31455
- }, bB = class extends xe {
31622
+ }, DB = class extends xe {
31456
31623
  state = {
31457
31624
  error: null,
31458
31625
  route: this.props.route
@@ -31470,14 +31637,14 @@ var _B = H`
31470
31637
  console.error(Error(`the ${this.props.route} route failed to render`, { cause: e }));
31471
31638
  }
31472
31639
  render() {
31473
- return this.state.error ? /* @__PURE__ */ Y(yB, {
31640
+ return this.state.error ? /* @__PURE__ */ Y(EB, {
31474
31641
  error: this.state.error,
31475
31642
  route: this.props.route
31476
31643
  }) : this.props.children;
31477
31644
  }
31478
- }, xB = ({ children: e }) => {
31645
+ }, OB = ({ children: e }) => {
31479
31646
  let [t] = hu();
31480
- return /* @__PURE__ */ Y(bB, {
31647
+ return /* @__PURE__ */ Y(DB, {
31481
31648
  route: t,
31482
31649
  children: e
31483
31650
  });
@@ -31487,14 +31654,14 @@ var _B = H`
31487
31654
  f(location.href) && (window.__stubExportStore = (e) => ce(e ?? { excludeOrigins: [] }));
31488
31655
  //#endregion
31489
31656
  //#region src/answers-export.ts
31490
- var SB = async (e, t = {}, n = {}) => az(k, e, t, { settleMs: n.settleMs });
31491
- x(location.href) && (window.__stubExportAnswers = () => ue(), window.__stubExportAsks = () => ae(), window.__stubGraphCounts = () => te()), h(location.href) && (window.__stubGraphQL = (e, t, n) => SB(e, t, n));
31657
+ var kB = async (e, t = {}, n = {}) => fz(k, e, t, { settleMs: n.settleMs });
31658
+ x(location.href) && (window.__stubExportAnswers = () => ue(), window.__stubExportAsks = () => ae(), window.__stubGraphCounts = () => te()), h(location.href) && (window.__stubGraphQL = (e, t, n) => kB(e, t, n));
31492
31659
  //#endregion
31493
31660
  //#region src/utils/forget-api-keys.ts
31494
- var CB = "stub.apikeys";
31661
+ var AB = "stub.apikeys";
31495
31662
  st(), ((e = () => localStorage) => {
31496
31663
  try {
31497
- e().removeItem(CB);
31664
+ e().removeItem(AB);
31498
31665
  } catch {}
31499
31666
  })(), (({ check: e, focused: t, page: n = globalThis, document: r = globalThis.document, intervalMs: i = 6e4 }) => {
31500
31667
  let a = (e) => () => {
@@ -31511,7 +31678,7 @@ st(), ((e = () => localStorage) => {
31511
31678
  check: M,
31512
31679
  focused: se
31513
31680
  });
31514
- var wB = H`
31681
+ var jB = H`
31515
31682
  @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,500;1,600;1,700;1,800;1,900&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
31516
31683
 
31517
31684
  :root {
@@ -31573,9 +31740,9 @@ var wB = H`
31573
31740
  }
31574
31741
  `;
31575
31742
  Z.resume();
31576
- var TB = document.createElement("div");
31577
- TB.id = "stub-root", He(/* @__PURE__ */ X(No, {
31743
+ var MB = document.createElement("div");
31744
+ MB.id = "stub-root", He(/* @__PURE__ */ X(No, {
31578
31745
  value: Nl,
31579
- children: [/* @__PURE__ */ Y(Mi, { styles: wB }), /* @__PURE__ */ Y(xB, { children: /* @__PURE__ */ Y(gB, {}) })]
31580
- }), document.body.appendChild(TB));
31746
+ children: [/* @__PURE__ */ Y(Mi, { styles: jB }), /* @__PURE__ */ Y(OB, { children: /* @__PURE__ */ Y(CB, {}) })]
31747
+ }), document.body.appendChild(MB));
31581
31748
  //#endregion