@burdenoff/microfe-hookmovies 2026.706.1 → 2026.706.2
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/dist/hookmovies/HookMoviesRoutes.js +26 -6
- package/dist/hookmovies/HookMoviesRoutes.js.map +1 -1
- package/dist/hookmovies/components/index.js +7 -0
- package/dist/hookmovies/hooks/useFiles.js +54 -23
- package/dist/hookmovies/hooks/useFiles.js.map +1 -1
- package/dist/hookmovies/hooks/useHookMoviesApi.js +108 -42
- package/dist/hookmovies/hooks/useHookMoviesApi.js.map +1 -1
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js +852 -454
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js.map +1 -1
- package/dist/hookmovies/pages/consumer/DiscoveryPage.js +422 -0
- package/dist/hookmovies/pages/consumer/DiscoveryPage.js.map +1 -0
- package/dist/hookmovies/pages/consumer/HooksPage.js +252 -0
- package/dist/hookmovies/pages/consumer/HooksPage.js.map +1 -0
- package/dist/hookmovies/pages/consumer/PlayerPage.js +542 -0
- package/dist/hookmovies/pages/consumer/PlayerPage.js.map +1 -0
- package/dist/hookmovies/pages/consumer/TitleViewPage.js +424 -0
- package/dist/hookmovies/pages/consumer/TitleViewPage.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { useHookMovies as e } from "../../context/HookMoviesContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { cn as t } from "../../utils/cn.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
+
import { StatusBadge as r } from "../../components/StatusBadge.js";
|
|
5
|
+
import { useAddCredit as i, useArchiveTitle as a, useCheckEntitlement as o, useClips as s, useCreateClip as c, useCreateEpisode as l, useCreateSeason as u, useDeleteClip as ee, usePeople as te, useRecordProgress as ne, useReviews as re, useStudios as ie, useTitle as ae, useTransitionTitle as oe, useUpdateTitle as se } from "../../hooks/useHookMoviesApi.js";
|
|
6
|
+
import { formatDate as ce, formatEnumLabel as d } from "../../utils/formatters.js";
|
|
7
|
+
import { FILE_FOLDERS as f, uploadFileToFiles as le, useFileUrl as p } from "../../hooks/useFiles.js";
|
|
8
|
+
import { ErrorState as ue, LoadingState as de } from "../../components/StateViews.js";
|
|
9
|
+
import { EmptyState as fe } from "../../components/EmptyState.js";
|
|
10
|
+
import { Pagination as pe } from "../../components/Pagination.js";
|
|
11
|
+
import { RatingDisplay as me } from "../../components/RatingDisplay.js";
|
|
12
|
+
import { useRef as he, useState as m } from "react";
|
|
13
|
+
import { Archive as ge, ArrowLeft as _e, Calendar as ve, CheckCircle2 as ye, Clapperboard as h, Clock as be, Film as g, Globe as xe, Image as _, Languages as Se, Layers as Ce, Loader2 as v, Lock as we, Pencil as Te, Play as Ee, Plus as y, ShieldCheck as De, Sparkles as Oe, Star as ke, Trash2 as b, Upload as x, UserPlus as Ae, Users as je, Video as Me, X as Ne } from "lucide-react";
|
|
14
|
+
import { useParams as Pe } from "react-router-dom";
|
|
15
|
+
import { Fragment as Fe, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
16
|
+
import { GlassCard as w } from "@burdenoff/fe-libs/ui";
|
|
13
17
|
//#region src/hookmovies/pages/catalog/TitleDetailPage.tsx
|
|
14
|
-
var
|
|
18
|
+
var Ie = {
|
|
15
19
|
DRAFT: ["IN_REVIEW"],
|
|
16
20
|
IN_REVIEW: [
|
|
17
21
|
"SCHEDULED",
|
|
@@ -22,7 +26,7 @@ var u = {
|
|
|
22
26
|
PUBLISHED: ["UNPUBLISHED"],
|
|
23
27
|
UNPUBLISHED: ["PUBLISHED"],
|
|
24
28
|
ARCHIVED: []
|
|
25
|
-
},
|
|
29
|
+
}, Le = [
|
|
26
30
|
"MOVIE",
|
|
27
31
|
"SERIES",
|
|
28
32
|
"SHORT_FILM",
|
|
@@ -34,7 +38,7 @@ var u = {
|
|
|
34
38
|
"TRAILER",
|
|
35
39
|
"COLLECTION",
|
|
36
40
|
"FAST_CHANNEL"
|
|
37
|
-
],
|
|
41
|
+
], Re = [
|
|
38
42
|
"ACTOR",
|
|
39
43
|
"DIRECTOR",
|
|
40
44
|
"WRITER",
|
|
@@ -44,384 +48,624 @@ var u = {
|
|
|
44
48
|
"COMPOSER",
|
|
45
49
|
"VOICE_ACTOR",
|
|
46
50
|
"CREW"
|
|
47
|
-
],
|
|
48
|
-
|
|
51
|
+
], T = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", E = "mb-1.5 block text-xs font-medium text-text-secondary", ze = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), Be = (e) => e.trim() ? new Date(e).toISOString() : void 0, Ve = (e) => `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`, He = [
|
|
52
|
+
{
|
|
53
|
+
field: "posterFileId",
|
|
54
|
+
label: "Poster",
|
|
55
|
+
kind: "image",
|
|
56
|
+
folder: f.artwork,
|
|
57
|
+
accept: "image/*",
|
|
58
|
+
icon: _,
|
|
59
|
+
hint: "Vertical key art (2:3)."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
field: "backdropFileId",
|
|
63
|
+
label: "Backdrop",
|
|
64
|
+
kind: "image",
|
|
65
|
+
folder: f.artwork,
|
|
66
|
+
accept: "image/*",
|
|
67
|
+
icon: _,
|
|
68
|
+
hint: "Wide hero art (16:9)."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
field: "trailerFileId",
|
|
72
|
+
label: "Trailer",
|
|
73
|
+
kind: "video",
|
|
74
|
+
folder: f.masters,
|
|
75
|
+
accept: "video/*",
|
|
76
|
+
icon: g,
|
|
77
|
+
hint: "Promo trailer master."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
field: "videoFileId",
|
|
81
|
+
label: "Video master",
|
|
82
|
+
kind: "video",
|
|
83
|
+
folder: f.masters,
|
|
84
|
+
accept: "video/*",
|
|
85
|
+
icon: h,
|
|
86
|
+
hint: "Full-length feature master."
|
|
87
|
+
}
|
|
88
|
+
], Ue = ({ titleId: e, config: n, currentFileId: r }) => {
|
|
89
|
+
let i = se(), a = p(r), o = he(null), [s, c] = m(!1), [l, u] = m(null), ee = n.icon, te = async (t) => {
|
|
90
|
+
let r = t.target.files?.[0];
|
|
91
|
+
if (t.target.value = "", r) {
|
|
92
|
+
u(null), c(!0);
|
|
93
|
+
try {
|
|
94
|
+
let t = await le(r, n.folder), a = {};
|
|
95
|
+
a[n.field] = t.id, await i.mutateAsync({
|
|
96
|
+
id: e,
|
|
97
|
+
input: a
|
|
98
|
+
});
|
|
99
|
+
} catch (e) {
|
|
100
|
+
u(e instanceof Error ? e.message : "Upload failed");
|
|
101
|
+
} finally {
|
|
102
|
+
c(!1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}, ne = async () => {
|
|
106
|
+
u(null), c(!0);
|
|
107
|
+
try {
|
|
108
|
+
let t = { [n.field]: null };
|
|
109
|
+
await i.mutateAsync({
|
|
110
|
+
id: e,
|
|
111
|
+
input: t
|
|
112
|
+
});
|
|
113
|
+
} catch (e) {
|
|
114
|
+
u(e instanceof Error ? e.message : "Could not remove file");
|
|
115
|
+
} finally {
|
|
116
|
+
c(!1);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return /* @__PURE__ */ C("div", {
|
|
120
|
+
className: "rounded-xl border border-border-seam bg-bg-surface p-4",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ C("div", {
|
|
123
|
+
className: "mb-3 flex items-center justify-between gap-2",
|
|
124
|
+
children: [/* @__PURE__ */ C("div", {
|
|
125
|
+
className: "flex items-center gap-2",
|
|
126
|
+
children: [/* @__PURE__ */ S(ee, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("h3", {
|
|
127
|
+
className: "text-sm font-medium text-text-primary",
|
|
128
|
+
children: n.label
|
|
129
|
+
})]
|
|
130
|
+
}), r && /* @__PURE__ */ S("span", {
|
|
131
|
+
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[10px] font-medium text-status-success-text",
|
|
132
|
+
children: "Set"
|
|
133
|
+
})]
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ S("div", {
|
|
136
|
+
className: t("relative flex items-center justify-center overflow-hidden rounded-lg border border-border-subtle bg-bg-sunken", n.kind === "image" ? "aspect-[3/4]" : "aspect-video"),
|
|
137
|
+
children: s ? /* @__PURE__ */ C("div", {
|
|
138
|
+
className: "flex flex-col items-center gap-2 text-text-secondary",
|
|
139
|
+
children: [/* @__PURE__ */ S(v, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ S("span", {
|
|
140
|
+
className: "text-xs",
|
|
141
|
+
children: "Uploading…"
|
|
142
|
+
})]
|
|
143
|
+
}) : r ? a.isLoading ? /* @__PURE__ */ S(v, { className: "h-6 w-6 animate-spin text-text-secondary" }) : a.data ? n.kind === "image" ? /* @__PURE__ */ S("img", {
|
|
144
|
+
src: a.data,
|
|
145
|
+
alt: `${n.label} artwork`,
|
|
146
|
+
className: "h-full w-full object-cover"
|
|
147
|
+
}) : /* @__PURE__ */ S("video", {
|
|
148
|
+
src: a.data,
|
|
149
|
+
controls: !0,
|
|
150
|
+
preload: "metadata",
|
|
151
|
+
className: "h-full w-full bg-bg-canvas object-contain",
|
|
152
|
+
children: /* @__PURE__ */ S("track", { kind: "captions" })
|
|
153
|
+
}) : /* @__PURE__ */ C("div", {
|
|
154
|
+
className: "flex flex-col items-center gap-1 text-text-secondary",
|
|
155
|
+
children: [/* @__PURE__ */ S(ee, { className: "h-6 w-6" }), /* @__PURE__ */ S("span", {
|
|
156
|
+
className: "text-xs",
|
|
157
|
+
children: "Preview unavailable"
|
|
158
|
+
})]
|
|
159
|
+
}) : /* @__PURE__ */ C("button", {
|
|
160
|
+
type: "button",
|
|
161
|
+
onClick: () => o.current?.click(),
|
|
162
|
+
className: "flex h-full w-full flex-col items-center justify-center gap-2 text-text-secondary transition-colors hover:text-text-primary",
|
|
163
|
+
children: [/* @__PURE__ */ S(x, { className: "h-6 w-6" }), /* @__PURE__ */ C("span", {
|
|
164
|
+
className: "text-xs",
|
|
165
|
+
children: ["Upload ", n.label.toLowerCase()]
|
|
166
|
+
})]
|
|
167
|
+
})
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ S("p", {
|
|
170
|
+
className: "mt-2 text-[11px] text-text-secondary",
|
|
171
|
+
children: n.hint
|
|
172
|
+
}),
|
|
173
|
+
l && /* @__PURE__ */ S("p", {
|
|
174
|
+
className: "mt-2 text-xs text-status-error-text",
|
|
175
|
+
children: l
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ C("div", {
|
|
178
|
+
className: "mt-3 flex items-center gap-2",
|
|
179
|
+
children: [/* @__PURE__ */ C("button", {
|
|
180
|
+
type: "button",
|
|
181
|
+
disabled: s,
|
|
182
|
+
onClick: () => o.current?.click(),
|
|
183
|
+
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
|
|
184
|
+
children: [/* @__PURE__ */ S(x, { className: "h-3.5 w-3.5" }), r ? "Replace" : "Upload"]
|
|
185
|
+
}), r && /* @__PURE__ */ C("button", {
|
|
186
|
+
type: "button",
|
|
187
|
+
disabled: s,
|
|
188
|
+
onClick: () => void ne(),
|
|
189
|
+
className: "inline-flex items-center gap-1.5 rounded-lg border border-status-error-border px-2.5 py-1 text-xs font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-50",
|
|
190
|
+
children: [/* @__PURE__ */ S(b, { className: "h-3.5 w-3.5" }), "Remove"]
|
|
191
|
+
})]
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ S("input", {
|
|
194
|
+
ref: o,
|
|
195
|
+
type: "file",
|
|
196
|
+
accept: n.accept,
|
|
197
|
+
className: "hidden",
|
|
198
|
+
onChange: (e) => void te(e),
|
|
199
|
+
"aria-label": `Upload ${n.label}`
|
|
200
|
+
})
|
|
201
|
+
]
|
|
202
|
+
});
|
|
203
|
+
}, We = ({ clip: e, onDelete: t, deleting: n }) => {
|
|
204
|
+
let r = p(e.posterFileId), i = p(e.posterFileId ? void 0 : e.videoFileId);
|
|
205
|
+
return /* @__PURE__ */ C("div", {
|
|
206
|
+
className: "flex flex-col overflow-hidden rounded-xl border border-border-seam bg-bg-surface",
|
|
207
|
+
children: [/* @__PURE__ */ C("div", {
|
|
208
|
+
className: "relative aspect-[9/16] w-full overflow-hidden bg-bg-sunken",
|
|
209
|
+
children: [e.posterFileId ? r.isLoading ? /* @__PURE__ */ S("div", {
|
|
210
|
+
className: "flex h-full w-full items-center justify-center",
|
|
211
|
+
children: /* @__PURE__ */ S(v, { className: "h-5 w-5 animate-spin text-text-secondary" })
|
|
212
|
+
}) : r.data ? /* @__PURE__ */ S("img", {
|
|
213
|
+
src: r.data,
|
|
214
|
+
alt: e.caption ?? "Clip poster",
|
|
215
|
+
className: "h-full w-full object-cover"
|
|
216
|
+
}) : /* @__PURE__ */ S("div", {
|
|
217
|
+
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
218
|
+
children: /* @__PURE__ */ S(g, { className: "h-6 w-6" })
|
|
219
|
+
}) : i.isLoading ? /* @__PURE__ */ S("div", {
|
|
220
|
+
className: "flex h-full w-full items-center justify-center",
|
|
221
|
+
children: /* @__PURE__ */ S(v, { className: "h-5 w-5 animate-spin text-text-secondary" })
|
|
222
|
+
}) : i.data ? /* @__PURE__ */ S("video", {
|
|
223
|
+
src: i.data,
|
|
224
|
+
controls: !0,
|
|
225
|
+
preload: "metadata",
|
|
226
|
+
className: "h-full w-full bg-bg-canvas object-contain",
|
|
227
|
+
children: /* @__PURE__ */ S("track", { kind: "captions" })
|
|
228
|
+
}) : /* @__PURE__ */ S("div", {
|
|
229
|
+
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
230
|
+
children: /* @__PURE__ */ S(g, { className: "h-6 w-6" })
|
|
231
|
+
}), e.durationSeconds != null && /* @__PURE__ */ S("span", {
|
|
232
|
+
className: "absolute bottom-2 right-2 rounded bg-bg-canvas/80 px-1.5 py-0.5 text-[10px] font-medium text-text-primary",
|
|
233
|
+
children: Ve(e.durationSeconds)
|
|
234
|
+
})]
|
|
235
|
+
}), /* @__PURE__ */ C("div", {
|
|
236
|
+
className: "flex flex-1 flex-col gap-2 p-3",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ S("p", {
|
|
239
|
+
className: "line-clamp-2 text-sm text-text-primary",
|
|
240
|
+
children: e.caption ?? "Untitled clip"
|
|
241
|
+
}),
|
|
242
|
+
e.language && /* @__PURE__ */ S("span", {
|
|
243
|
+
className: "w-fit rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] uppercase tracking-wide text-text-secondary",
|
|
244
|
+
children: e.language
|
|
245
|
+
}),
|
|
246
|
+
/* @__PURE__ */ C("button", {
|
|
247
|
+
type: "button",
|
|
248
|
+
disabled: n,
|
|
249
|
+
onClick: () => t(e),
|
|
250
|
+
className: "mt-auto inline-flex items-center justify-center gap-1.5 rounded-lg border border-status-error-border px-2.5 py-1 text-xs font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-50",
|
|
251
|
+
children: [/* @__PURE__ */ S(b, { className: "h-3.5 w-3.5" }), n ? "Deleting…" : "Delete"]
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
})]
|
|
255
|
+
});
|
|
256
|
+
}, Ge = 12, Ke = () => {
|
|
257
|
+
let { id: t } = Pe(), { navigateTo: p } = e(), { data: h, isLoading: g, isError: v, refetch: b } = ae(t), Ve = oe(), Ke = a(), qe = re({ titleId: t }, {
|
|
49
258
|
limit: 10,
|
|
50
259
|
offset: 0
|
|
51
|
-
}),
|
|
260
|
+
}), D = se(), O = i(), k = u(), A = l(), j = ne(), M = o(t), Je = ie({
|
|
52
261
|
limit: 200,
|
|
53
262
|
offset: 0
|
|
54
|
-
}), [
|
|
263
|
+
}), [Ye, Xe] = m(0), N = s(t, void 0, {
|
|
264
|
+
limit: Ge,
|
|
265
|
+
offset: Ye * Ge
|
|
266
|
+
}), Ze = c(), Qe = ee(), [$e, P] = m(null), [et, F] = m(!1), [I, tt] = m(null), [nt, rt] = m(""), [L, it] = m(""), [at, ot] = m(""), [st, ct] = m(!1), [lt, R] = m(null), [ut, dt] = m(null), z = he(null), [B, V] = m("none"), [H, ft] = m(""), [pt, mt] = m("MOVIE"), [ht, gt] = m(""), [_t, vt] = m(""), [yt, bt] = m(""), [xt, St] = m(""), [Ct, wt] = m(""), [U, Tt] = m(""), [W, Et] = m(""), [Dt, Ot] = m(""), [kt, At] = m(""), [jt, Mt] = m(!1), [Nt, Pt] = m(""), [G, Ft] = m(""), [It, Lt] = m("ACTOR"), [Rt, zt] = m(""), [K, Bt] = m(""), Vt = te({
|
|
55
267
|
limit: 50,
|
|
56
268
|
offset: 0
|
|
57
|
-
},
|
|
58
|
-
if (
|
|
269
|
+
}, Nt), [q, Ht] = m(""), [Ut, Wt] = m(""), [Gt, Kt] = m(""), [qt, Jt] = m(""), [Yt, Xt] = m(""), [J, Zt] = m(""), [Qt, $t] = m(""), [en, tn] = m(""), [nn, rn] = m(""), [an, on] = m(""), [sn, cn] = m(!1);
|
|
270
|
+
if (g) return /* @__PURE__ */ S(n, {
|
|
59
271
|
title: "Title",
|
|
60
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: /* @__PURE__ */ S(de, { label: "Loading title…" })
|
|
61
273
|
});
|
|
62
|
-
if (
|
|
274
|
+
if (v || !h) return /* @__PURE__ */ S(n, {
|
|
63
275
|
title: "Title",
|
|
64
|
-
children: /* @__PURE__ */
|
|
276
|
+
children: /* @__PURE__ */ S(ue, {
|
|
65
277
|
title: "Title not found",
|
|
66
278
|
message: "This title may have been archived or you may not have access.",
|
|
67
|
-
onRetry: () => void
|
|
279
|
+
onRetry: () => void b()
|
|
68
280
|
})
|
|
69
281
|
});
|
|
70
|
-
let
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
282
|
+
let Y = h.type === "SERIES", X = () => V("none"), ln = () => {
|
|
283
|
+
P(null), ft(h.title), mt(h.type), gt(h.synopsis ?? ""), vt(h.genres.join(", ")), bt(h.tags.join(", ")), St(h.originalLanguage ?? ""), wt(h.originCountry ?? ""), Tt(h.releaseYear ? String(h.releaseYear) : ""), Et(h.runtimeMinutes ? String(h.runtimeMinutes) : ""), Ot(h.certification ?? ""), At(h.studioId ?? ""), Mt(h.aiDisclosure), V("edit");
|
|
284
|
+
}, un = async (e) => {
|
|
285
|
+
P(null);
|
|
74
286
|
try {
|
|
75
|
-
await
|
|
76
|
-
id:
|
|
287
|
+
await Ve.mutateAsync({
|
|
288
|
+
id: h.id,
|
|
77
289
|
status: e
|
|
78
290
|
});
|
|
79
291
|
} catch (e) {
|
|
80
|
-
|
|
292
|
+
P(e instanceof Error ? e.message : "Transition failed");
|
|
81
293
|
}
|
|
82
|
-
},
|
|
83
|
-
|
|
294
|
+
}, dn = async () => {
|
|
295
|
+
P(null);
|
|
84
296
|
try {
|
|
85
|
-
await
|
|
297
|
+
await Ke.mutateAsync(h.id), p("catalog/titles");
|
|
86
298
|
} catch (e) {
|
|
87
|
-
|
|
299
|
+
P(e instanceof Error ? e.message : "Archive failed");
|
|
88
300
|
}
|
|
89
|
-
},
|
|
90
|
-
if (e.preventDefault(),
|
|
91
|
-
|
|
301
|
+
}, fn = async (e) => {
|
|
302
|
+
if (e.preventDefault(), P(null), !H.trim()) {
|
|
303
|
+
P("Title is required.");
|
|
92
304
|
return;
|
|
93
305
|
}
|
|
94
306
|
let t = {
|
|
95
|
-
title:
|
|
96
|
-
type:
|
|
97
|
-
synopsis:
|
|
98
|
-
genres:
|
|
99
|
-
tags:
|
|
100
|
-
originalLanguage:
|
|
101
|
-
originCountry:
|
|
102
|
-
releaseYear:
|
|
103
|
-
runtimeMinutes:
|
|
104
|
-
certification:
|
|
105
|
-
studioId:
|
|
106
|
-
aiDisclosure:
|
|
307
|
+
title: H.trim(),
|
|
308
|
+
type: pt,
|
|
309
|
+
synopsis: ht.trim() || void 0,
|
|
310
|
+
genres: ze(_t),
|
|
311
|
+
tags: ze(yt),
|
|
312
|
+
originalLanguage: xt.trim() || void 0,
|
|
313
|
+
originCountry: Ct.trim() || void 0,
|
|
314
|
+
releaseYear: U.trim() ? Number(U) : void 0,
|
|
315
|
+
runtimeMinutes: W.trim() ? Number(W) : void 0,
|
|
316
|
+
certification: Dt.trim() || void 0,
|
|
317
|
+
studioId: kt || void 0,
|
|
318
|
+
aiDisclosure: jt
|
|
107
319
|
};
|
|
108
320
|
try {
|
|
109
|
-
await
|
|
110
|
-
id:
|
|
321
|
+
await D.mutateAsync({
|
|
322
|
+
id: h.id,
|
|
111
323
|
input: t
|
|
112
|
-
}),
|
|
324
|
+
}), X();
|
|
113
325
|
} catch (e) {
|
|
114
|
-
|
|
326
|
+
P(e instanceof Error ? e.message : "Failed to update title");
|
|
115
327
|
}
|
|
116
|
-
},
|
|
117
|
-
if (e.preventDefault(),
|
|
118
|
-
|
|
328
|
+
}, pn = async (e) => {
|
|
329
|
+
if (e.preventDefault(), P(null), !G) {
|
|
330
|
+
P("Select a person to credit.");
|
|
119
331
|
return;
|
|
120
332
|
}
|
|
121
333
|
try {
|
|
122
|
-
await
|
|
123
|
-
personId:
|
|
124
|
-
titleId:
|
|
125
|
-
role:
|
|
126
|
-
characterName:
|
|
127
|
-
billingOrder:
|
|
128
|
-
}),
|
|
334
|
+
await O.mutateAsync({
|
|
335
|
+
personId: G,
|
|
336
|
+
titleId: h.id,
|
|
337
|
+
role: It,
|
|
338
|
+
characterName: Rt.trim() || void 0,
|
|
339
|
+
billingOrder: K.trim() ? Number(K) : void 0
|
|
340
|
+
}), Ft(""), zt(""), Bt(""), Pt(""), X();
|
|
129
341
|
} catch (e) {
|
|
130
|
-
|
|
342
|
+
P(e instanceof Error ? e.message : "Failed to add credit");
|
|
131
343
|
}
|
|
132
|
-
},
|
|
133
|
-
if (e.preventDefault(),
|
|
134
|
-
|
|
344
|
+
}, mn = async (e) => {
|
|
345
|
+
if (e.preventDefault(), P(null), !q.trim()) {
|
|
346
|
+
P("Season number is required.");
|
|
135
347
|
return;
|
|
136
348
|
}
|
|
137
349
|
try {
|
|
138
|
-
await
|
|
139
|
-
titleId:
|
|
140
|
-
number: Number(
|
|
141
|
-
name:
|
|
142
|
-
synopsis:
|
|
143
|
-
airDate:
|
|
144
|
-
}),
|
|
350
|
+
await k.mutateAsync({
|
|
351
|
+
titleId: h.id,
|
|
352
|
+
number: Number(q),
|
|
353
|
+
name: Ut.trim() || void 0,
|
|
354
|
+
synopsis: Gt.trim() || void 0,
|
|
355
|
+
airDate: Be(qt)
|
|
356
|
+
}), Ht(""), Wt(""), Kt(""), Jt(""), X();
|
|
145
357
|
} catch (e) {
|
|
146
|
-
|
|
358
|
+
P(e instanceof Error ? e.message : "Failed to add season");
|
|
147
359
|
}
|
|
148
|
-
},
|
|
149
|
-
if (e.preventDefault(),
|
|
150
|
-
|
|
360
|
+
}, hn = async (e) => {
|
|
361
|
+
if (e.preventDefault(), P(null), !J.trim()) {
|
|
362
|
+
P("Episode number is required.");
|
|
151
363
|
return;
|
|
152
364
|
}
|
|
153
|
-
if (!
|
|
154
|
-
|
|
365
|
+
if (!Qt.trim()) {
|
|
366
|
+
P("Episode name is required.");
|
|
155
367
|
return;
|
|
156
368
|
}
|
|
157
369
|
try {
|
|
158
|
-
await
|
|
159
|
-
titleId:
|
|
160
|
-
number: Number(
|
|
161
|
-
name:
|
|
162
|
-
seasonId:
|
|
163
|
-
synopsis:
|
|
164
|
-
runtimeMinutes:
|
|
165
|
-
airDate:
|
|
166
|
-
}),
|
|
370
|
+
await A.mutateAsync({
|
|
371
|
+
titleId: h.id,
|
|
372
|
+
number: Number(J),
|
|
373
|
+
name: Qt.trim(),
|
|
374
|
+
seasonId: Yt || void 0,
|
|
375
|
+
synopsis: en.trim() || void 0,
|
|
376
|
+
runtimeMinutes: nn.trim() ? Number(nn) : void 0,
|
|
377
|
+
airDate: Be(an)
|
|
378
|
+
}), Xt(""), Zt(""), $t(""), tn(""), rn(""), on(""), X();
|
|
167
379
|
} catch (e) {
|
|
168
|
-
|
|
380
|
+
P(e instanceof Error ? e.message : "Failed to add episode");
|
|
169
381
|
}
|
|
170
|
-
},
|
|
171
|
-
if (
|
|
172
|
-
|
|
382
|
+
}, gn = async () => {
|
|
383
|
+
if (P(null), cn(!1), !M.data?.entitled) {
|
|
384
|
+
P("You are not entitled to watch this title.");
|
|
173
385
|
return;
|
|
174
386
|
}
|
|
175
387
|
try {
|
|
176
|
-
await
|
|
177
|
-
titleId:
|
|
178
|
-
positionSeconds: (
|
|
388
|
+
await j.mutateAsync({
|
|
389
|
+
titleId: h.id,
|
|
390
|
+
positionSeconds: (h.runtimeMinutes ?? 0) * 60,
|
|
179
391
|
completed: !0,
|
|
180
392
|
lastDevice: "web"
|
|
181
|
-
}),
|
|
393
|
+
}), cn(!0);
|
|
394
|
+
} catch (e) {
|
|
395
|
+
P(e instanceof Error ? e.message : "Failed to record progress");
|
|
396
|
+
}
|
|
397
|
+
}, _n = async (e) => {
|
|
398
|
+
if (e.preventDefault(), R(null), !I) {
|
|
399
|
+
R("Select a clip video to upload.");
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
ct(!0);
|
|
403
|
+
try {
|
|
404
|
+
let e = await le(I, f.clips);
|
|
405
|
+
await Ze.mutateAsync({
|
|
406
|
+
titleId: h.id,
|
|
407
|
+
videoFileId: e.id,
|
|
408
|
+
caption: nt.trim() || void 0,
|
|
409
|
+
durationSeconds: L.trim() ? Number(L) : void 0,
|
|
410
|
+
language: at.trim() || void 0
|
|
411
|
+
}), tt(null), rt(""), it(""), ot(""), z.current && (z.current.value = ""), F(!1), Xe(0);
|
|
412
|
+
} catch (e) {
|
|
413
|
+
R(e instanceof Error ? e.message : "Failed to add clip");
|
|
414
|
+
} finally {
|
|
415
|
+
ct(!1);
|
|
416
|
+
}
|
|
417
|
+
}, vn = async (e) => {
|
|
418
|
+
P(null), dt(e.id);
|
|
419
|
+
try {
|
|
420
|
+
await Qe.mutateAsync({
|
|
421
|
+
id: e.id,
|
|
422
|
+
titleId: h.id
|
|
423
|
+
});
|
|
182
424
|
} catch (e) {
|
|
183
|
-
|
|
425
|
+
P(e instanceof Error ? e.message : "Failed to delete clip");
|
|
426
|
+
} finally {
|
|
427
|
+
dt(null);
|
|
184
428
|
}
|
|
185
|
-
}, Q =
|
|
186
|
-
|
|
429
|
+
}, Z = qe.data?.items ?? [], Q = N.data?.items ?? [], yn = Z.length > 0 ? Z.reduce((e, t) => e + t.score, 0) / Z.length : null, $ = [];
|
|
430
|
+
h.releaseDate ? $.push({
|
|
187
431
|
icon: ve,
|
|
188
432
|
label: "Release",
|
|
189
|
-
value:
|
|
190
|
-
}) :
|
|
433
|
+
value: ce(h.releaseDate)
|
|
434
|
+
}) : h.releaseYear && $.push({
|
|
191
435
|
icon: ve,
|
|
192
436
|
label: "Year",
|
|
193
|
-
value: String(
|
|
194
|
-
}),
|
|
437
|
+
value: String(h.releaseYear)
|
|
438
|
+
}), h.runtimeMinutes && $.push({
|
|
195
439
|
icon: be,
|
|
196
440
|
label: "Runtime",
|
|
197
|
-
value: `${
|
|
198
|
-
}),
|
|
441
|
+
value: `${h.runtimeMinutes} min`
|
|
442
|
+
}), h.originalLanguage && $.push({
|
|
199
443
|
icon: Se,
|
|
200
444
|
label: "Language",
|
|
201
|
-
value:
|
|
202
|
-
}),
|
|
445
|
+
value: h.originalLanguage
|
|
446
|
+
}), h.originCountry && $.push({
|
|
203
447
|
icon: xe,
|
|
204
448
|
label: "Country",
|
|
205
|
-
value:
|
|
206
|
-
}),
|
|
449
|
+
value: h.originCountry
|
|
450
|
+
}), h.certification && $.push({
|
|
207
451
|
icon: De,
|
|
208
452
|
label: "Certification",
|
|
209
|
-
value:
|
|
453
|
+
value: h.certification
|
|
210
454
|
});
|
|
211
|
-
let
|
|
212
|
-
return /* @__PURE__ */
|
|
213
|
-
title: /* @__PURE__ */
|
|
455
|
+
let bn = Vt.data?.items ?? [];
|
|
456
|
+
return /* @__PURE__ */ C(n, {
|
|
457
|
+
title: /* @__PURE__ */ C("span", {
|
|
214
458
|
className: "flex items-center gap-3",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ S("button", {
|
|
216
460
|
type: "button",
|
|
217
|
-
onClick: () =>
|
|
461
|
+
onClick: () => p("catalog/titles"),
|
|
218
462
|
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
219
463
|
"aria-label": "Back to catalog",
|
|
220
|
-
children: /* @__PURE__ */
|
|
221
|
-
}),
|
|
464
|
+
children: /* @__PURE__ */ S(_e, { className: "h-5 w-5" })
|
|
465
|
+
}), h.title]
|
|
222
466
|
}),
|
|
223
|
-
description: `${
|
|
224
|
-
actions: /* @__PURE__ */
|
|
467
|
+
description: `${d(h.type)}${h.studio ? ` · ${h.studio.name}` : ""}`,
|
|
468
|
+
actions: /* @__PURE__ */ C("div", {
|
|
225
469
|
className: "flex items-center gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ C("button", {
|
|
227
471
|
type: "button",
|
|
228
|
-
onClick:
|
|
472
|
+
onClick: ln,
|
|
229
473
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
231
|
-
}), /* @__PURE__ */
|
|
474
|
+
children: [/* @__PURE__ */ S(Te, { className: "h-3.5 w-3.5" }), "Edit"]
|
|
475
|
+
}), /* @__PURE__ */ S(r, { status: h.status })]
|
|
232
476
|
}),
|
|
233
477
|
children: [
|
|
234
|
-
|
|
478
|
+
$e && /* @__PURE__ */ S("div", {
|
|
235
479
|
className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
236
|
-
children:
|
|
480
|
+
children: $e
|
|
237
481
|
}),
|
|
238
|
-
|
|
482
|
+
B === "edit" && /* @__PURE__ */ C(w, {
|
|
239
483
|
treatment: "metric",
|
|
240
484
|
className: "mb-6 border-border-seam p-5",
|
|
241
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ C("div", {
|
|
242
486
|
className: "mb-4 flex items-center justify-between",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
244
488
|
className: "text-sm font-semibold text-text-primary",
|
|
245
489
|
children: "Edit title"
|
|
246
|
-
}), /* @__PURE__ */
|
|
490
|
+
}), /* @__PURE__ */ S("button", {
|
|
247
491
|
type: "button",
|
|
248
|
-
onClick:
|
|
492
|
+
onClick: X,
|
|
249
493
|
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
250
494
|
"aria-label": "Close edit form",
|
|
251
|
-
children: /* @__PURE__ */
|
|
495
|
+
children: /* @__PURE__ */ S(Ne, { className: "h-4 w-4" })
|
|
252
496
|
})]
|
|
253
|
-
}), /* @__PURE__ */
|
|
254
|
-
onSubmit:
|
|
497
|
+
}), /* @__PURE__ */ C("form", {
|
|
498
|
+
onSubmit: fn,
|
|
255
499
|
className: "space-y-5",
|
|
256
500
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
258
502
|
htmlFor: "edit-title",
|
|
259
|
-
className:
|
|
503
|
+
className: E,
|
|
260
504
|
children: "Title *"
|
|
261
|
-
}), /* @__PURE__ */
|
|
505
|
+
}), /* @__PURE__ */ S("input", {
|
|
262
506
|
id: "edit-title",
|
|
263
507
|
type: "text",
|
|
264
|
-
value:
|
|
265
|
-
onChange: (e) =>
|
|
266
|
-
className:
|
|
508
|
+
value: H,
|
|
509
|
+
onChange: (e) => ft(e.target.value),
|
|
510
|
+
className: T,
|
|
267
511
|
required: !0
|
|
268
512
|
})] }),
|
|
269
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ C("div", {
|
|
270
514
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
272
516
|
htmlFor: "edit-type",
|
|
273
|
-
className:
|
|
517
|
+
className: E,
|
|
274
518
|
children: "Type"
|
|
275
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ S("select", {
|
|
276
520
|
id: "edit-type",
|
|
277
|
-
value:
|
|
278
|
-
onChange: (e) =>
|
|
279
|
-
className:
|
|
280
|
-
children:
|
|
521
|
+
value: pt,
|
|
522
|
+
onChange: (e) => mt(e.target.value),
|
|
523
|
+
className: T,
|
|
524
|
+
children: Le.map((e) => /* @__PURE__ */ S("option", {
|
|
281
525
|
value: e,
|
|
282
|
-
children:
|
|
526
|
+
children: d(e)
|
|
283
527
|
}, e))
|
|
284
|
-
})] }), /* @__PURE__ */
|
|
528
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
285
529
|
htmlFor: "edit-studio",
|
|
286
|
-
className:
|
|
530
|
+
className: E,
|
|
287
531
|
children: "Studio"
|
|
288
|
-
}), /* @__PURE__ */
|
|
532
|
+
}), /* @__PURE__ */ C("select", {
|
|
289
533
|
id: "edit-studio",
|
|
290
|
-
value:
|
|
291
|
-
onChange: (e) =>
|
|
292
|
-
className:
|
|
293
|
-
children: [/* @__PURE__ */
|
|
534
|
+
value: kt,
|
|
535
|
+
onChange: (e) => At(e.target.value),
|
|
536
|
+
className: T,
|
|
537
|
+
children: [/* @__PURE__ */ S("option", {
|
|
294
538
|
value: "",
|
|
295
539
|
children: "No studio"
|
|
296
|
-
}), (
|
|
540
|
+
}), (Je.data?.items ?? []).map((e) => /* @__PURE__ */ S("option", {
|
|
297
541
|
value: e.id,
|
|
298
542
|
children: e.name
|
|
299
543
|
}, e.id))]
|
|
300
544
|
})] })]
|
|
301
545
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
303
547
|
htmlFor: "edit-synopsis",
|
|
304
|
-
className:
|
|
548
|
+
className: E,
|
|
305
549
|
children: "Synopsis"
|
|
306
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ S("textarea", {
|
|
307
551
|
id: "edit-synopsis",
|
|
308
|
-
value:
|
|
309
|
-
onChange: (e) =>
|
|
552
|
+
value: ht,
|
|
553
|
+
onChange: (e) => gt(e.target.value),
|
|
310
554
|
rows: 4,
|
|
311
|
-
className:
|
|
555
|
+
className: T
|
|
312
556
|
})] }),
|
|
313
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ C("div", {
|
|
314
558
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
316
560
|
htmlFor: "edit-genres",
|
|
317
|
-
className:
|
|
561
|
+
className: E,
|
|
318
562
|
children: "Genres (comma-separated)"
|
|
319
|
-
}), /* @__PURE__ */
|
|
563
|
+
}), /* @__PURE__ */ S("input", {
|
|
320
564
|
id: "edit-genres",
|
|
321
565
|
type: "text",
|
|
322
|
-
value:
|
|
323
|
-
onChange: (e) =>
|
|
566
|
+
value: _t,
|
|
567
|
+
onChange: (e) => vt(e.target.value),
|
|
324
568
|
placeholder: "Drama, Thriller",
|
|
325
|
-
className:
|
|
326
|
-
})] }), /* @__PURE__ */
|
|
569
|
+
className: T
|
|
570
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
327
571
|
htmlFor: "edit-tags",
|
|
328
|
-
className:
|
|
572
|
+
className: E,
|
|
329
573
|
children: "Tags (comma-separated)"
|
|
330
|
-
}), /* @__PURE__ */
|
|
574
|
+
}), /* @__PURE__ */ S("input", {
|
|
331
575
|
id: "edit-tags",
|
|
332
576
|
type: "text",
|
|
333
|
-
value:
|
|
334
|
-
onChange: (e) =>
|
|
577
|
+
value: yt,
|
|
578
|
+
onChange: (e) => bt(e.target.value),
|
|
335
579
|
placeholder: "award-winner, indie",
|
|
336
|
-
className:
|
|
580
|
+
className: T
|
|
337
581
|
})] })]
|
|
338
582
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ C("div", {
|
|
340
584
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
341
585
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
343
587
|
htmlFor: "edit-language",
|
|
344
|
-
className:
|
|
588
|
+
className: E,
|
|
345
589
|
children: "Original Language"
|
|
346
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ S("input", {
|
|
347
591
|
id: "edit-language",
|
|
348
592
|
type: "text",
|
|
349
|
-
value:
|
|
350
|
-
onChange: (e) =>
|
|
593
|
+
value: xt,
|
|
594
|
+
onChange: (e) => St(e.target.value),
|
|
351
595
|
placeholder: "en",
|
|
352
|
-
className:
|
|
596
|
+
className: T
|
|
353
597
|
})] }),
|
|
354
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
355
599
|
htmlFor: "edit-country",
|
|
356
|
-
className:
|
|
600
|
+
className: E,
|
|
357
601
|
children: "Origin Country"
|
|
358
|
-
}), /* @__PURE__ */
|
|
602
|
+
}), /* @__PURE__ */ S("input", {
|
|
359
603
|
id: "edit-country",
|
|
360
604
|
type: "text",
|
|
361
|
-
value:
|
|
362
|
-
onChange: (e) =>
|
|
605
|
+
value: Ct,
|
|
606
|
+
onChange: (e) => wt(e.target.value),
|
|
363
607
|
placeholder: "US",
|
|
364
|
-
className:
|
|
608
|
+
className: T
|
|
365
609
|
})] }),
|
|
366
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
367
611
|
htmlFor: "edit-certification",
|
|
368
|
-
className:
|
|
612
|
+
className: E,
|
|
369
613
|
children: "Certification"
|
|
370
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ S("input", {
|
|
371
615
|
id: "edit-certification",
|
|
372
616
|
type: "text",
|
|
373
|
-
value:
|
|
374
|
-
onChange: (e) =>
|
|
617
|
+
value: Dt,
|
|
618
|
+
onChange: (e) => Ot(e.target.value),
|
|
375
619
|
placeholder: "PG-13",
|
|
376
|
-
className:
|
|
620
|
+
className: T
|
|
377
621
|
})] })
|
|
378
622
|
]
|
|
379
623
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ C("div", {
|
|
381
625
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
383
627
|
htmlFor: "edit-year",
|
|
384
|
-
className:
|
|
628
|
+
className: E,
|
|
385
629
|
children: "Release Year"
|
|
386
|
-
}), /* @__PURE__ */
|
|
630
|
+
}), /* @__PURE__ */ S("input", {
|
|
387
631
|
id: "edit-year",
|
|
388
632
|
type: "number",
|
|
389
|
-
value:
|
|
390
|
-
onChange: (e) =>
|
|
633
|
+
value: U,
|
|
634
|
+
onChange: (e) => Tt(e.target.value),
|
|
391
635
|
placeholder: "2026",
|
|
392
|
-
className:
|
|
393
|
-
})] }), /* @__PURE__ */
|
|
636
|
+
className: T
|
|
637
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
394
638
|
htmlFor: "edit-runtime",
|
|
395
|
-
className:
|
|
639
|
+
className: E,
|
|
396
640
|
children: "Runtime (minutes)"
|
|
397
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ S("input", {
|
|
398
642
|
id: "edit-runtime",
|
|
399
643
|
type: "number",
|
|
400
|
-
value:
|
|
401
|
-
onChange: (e) =>
|
|
644
|
+
value: W,
|
|
645
|
+
onChange: (e) => Et(e.target.value),
|
|
402
646
|
placeholder: "120",
|
|
403
|
-
className:
|
|
647
|
+
className: T
|
|
404
648
|
})] })]
|
|
405
649
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ C("label", {
|
|
407
651
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
408
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ S("input", {
|
|
409
653
|
type: "checkbox",
|
|
410
|
-
checked:
|
|
411
|
-
onChange: (e) =>
|
|
654
|
+
checked: jt,
|
|
655
|
+
onChange: (e) => Mt(e.target.checked),
|
|
412
656
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
413
657
|
}), "This title contains AI-generated or AI-altered content"]
|
|
414
658
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ C("div", {
|
|
416
660
|
className: "flex items-center gap-3 pt-1",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
661
|
+
children: [/* @__PURE__ */ S("button", {
|
|
418
662
|
type: "submit",
|
|
419
|
-
disabled:
|
|
663
|
+
disabled: D.isPending,
|
|
420
664
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
421
|
-
children:
|
|
422
|
-
}), /* @__PURE__ */
|
|
665
|
+
children: D.isPending ? "Saving…" : "Save changes"
|
|
666
|
+
}), /* @__PURE__ */ S("button", {
|
|
423
667
|
type: "button",
|
|
424
|
-
onClick:
|
|
668
|
+
onClick: X,
|
|
425
669
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
426
670
|
children: "Cancel"
|
|
427
671
|
})]
|
|
@@ -429,385 +673,406 @@ var u = {
|
|
|
429
673
|
]
|
|
430
674
|
})]
|
|
431
675
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ C("div", {
|
|
433
677
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
678
|
+
children: [/* @__PURE__ */ C("div", {
|
|
435
679
|
className: "space-y-6 lg:col-span-2",
|
|
436
680
|
children: [
|
|
437
|
-
|
|
681
|
+
/* @__PURE__ */ C(w, {
|
|
682
|
+
treatment: "metric",
|
|
683
|
+
className: "border-border-seam p-5",
|
|
684
|
+
children: [/* @__PURE__ */ C("div", {
|
|
685
|
+
className: "mb-4",
|
|
686
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
687
|
+
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
688
|
+
children: [/* @__PURE__ */ S(_, { className: "h-4 w-4" }), "Artwork & Media"]
|
|
689
|
+
}), /* @__PURE__ */ S("p", {
|
|
690
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
691
|
+
children: "Poster and backdrop art, plus the trailer and full-length video master. Files are stored in the workspace files service; the title keeps only a reference."
|
|
692
|
+
})]
|
|
693
|
+
}), /* @__PURE__ */ S("div", {
|
|
694
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
695
|
+
children: He.map((e) => /* @__PURE__ */ S(Ue, {
|
|
696
|
+
titleId: h.id,
|
|
697
|
+
config: e,
|
|
698
|
+
currentFileId: h[e.field]
|
|
699
|
+
}, e.field))
|
|
700
|
+
})]
|
|
701
|
+
}),
|
|
702
|
+
h.synopsis && /* @__PURE__ */ C(w, {
|
|
438
703
|
treatment: "metric",
|
|
439
704
|
className: "border-border-seam p-5",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
705
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
441
706
|
className: "mb-2 text-sm font-semibold text-text-primary",
|
|
442
707
|
children: "Synopsis"
|
|
443
|
-
}), /* @__PURE__ */
|
|
708
|
+
}), /* @__PURE__ */ S("p", {
|
|
444
709
|
className: "text-sm leading-relaxed text-text-secondary",
|
|
445
|
-
children:
|
|
710
|
+
children: h.synopsis
|
|
446
711
|
})]
|
|
447
712
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ C(w, {
|
|
449
714
|
treatment: "metric",
|
|
450
715
|
className: "border-border-seam p-5",
|
|
451
716
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ C("div", {
|
|
453
718
|
className: "mb-3 flex items-center justify-between gap-3",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
455
720
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
456
721
|
children: [
|
|
457
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ S(je, { className: "h-4 w-4" }),
|
|
458
723
|
"Cast & Crew (",
|
|
459
|
-
|
|
724
|
+
h.credits.length,
|
|
460
725
|
")"
|
|
461
726
|
]
|
|
462
|
-
}), /* @__PURE__ */
|
|
727
|
+
}), /* @__PURE__ */ C("button", {
|
|
463
728
|
type: "button",
|
|
464
729
|
onClick: () => {
|
|
465
|
-
|
|
730
|
+
P(null), V(B === "credit" ? "none" : "credit");
|
|
466
731
|
},
|
|
467
732
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
733
|
+
children: [/* @__PURE__ */ S(Ae, { className: "h-3.5 w-3.5" }), "Add credit"]
|
|
469
734
|
})]
|
|
470
735
|
}),
|
|
471
|
-
|
|
472
|
-
onSubmit:
|
|
736
|
+
B === "credit" && /* @__PURE__ */ C("form", {
|
|
737
|
+
onSubmit: pn,
|
|
473
738
|
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
474
739
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
476
741
|
htmlFor: "credit-search",
|
|
477
|
-
className:
|
|
742
|
+
className: E,
|
|
478
743
|
children: "Search people"
|
|
479
|
-
}), /* @__PURE__ */
|
|
744
|
+
}), /* @__PURE__ */ S("input", {
|
|
480
745
|
id: "credit-search",
|
|
481
746
|
type: "text",
|
|
482
|
-
value:
|
|
483
|
-
onChange: (e) =>
|
|
747
|
+
value: Nt,
|
|
748
|
+
onChange: (e) => Pt(e.target.value),
|
|
484
749
|
placeholder: "Type a name to filter…",
|
|
485
|
-
className:
|
|
750
|
+
className: T
|
|
486
751
|
})] }),
|
|
487
|
-
/* @__PURE__ */
|
|
752
|
+
/* @__PURE__ */ C("div", {
|
|
488
753
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
754
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
490
755
|
htmlFor: "credit-person",
|
|
491
|
-
className:
|
|
756
|
+
className: E,
|
|
492
757
|
children: "Person *"
|
|
493
|
-
}), /* @__PURE__ */
|
|
758
|
+
}), /* @__PURE__ */ C("select", {
|
|
494
759
|
id: "credit-person",
|
|
495
|
-
value:
|
|
496
|
-
onChange: (e) =>
|
|
497
|
-
className:
|
|
760
|
+
value: G,
|
|
761
|
+
onChange: (e) => Ft(e.target.value),
|
|
762
|
+
className: T,
|
|
498
763
|
required: !0,
|
|
499
|
-
children: [/* @__PURE__ */
|
|
764
|
+
children: [/* @__PURE__ */ S("option", {
|
|
500
765
|
value: "",
|
|
501
|
-
children:
|
|
502
|
-
}),
|
|
766
|
+
children: Vt.isLoading ? "Loading people…" : bn.length === 0 ? "No people found" : "Select a person"
|
|
767
|
+
}), bn.map((e) => /* @__PURE__ */ C("option", {
|
|
503
768
|
value: e.id,
|
|
504
769
|
children: [e.name, e.knownFor ? ` — ${e.knownFor}` : ""]
|
|
505
770
|
}, e.id))]
|
|
506
|
-
})] }), /* @__PURE__ */
|
|
771
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
507
772
|
htmlFor: "credit-role",
|
|
508
|
-
className:
|
|
773
|
+
className: E,
|
|
509
774
|
children: "Role"
|
|
510
|
-
}), /* @__PURE__ */
|
|
775
|
+
}), /* @__PURE__ */ S("select", {
|
|
511
776
|
id: "credit-role",
|
|
512
|
-
value:
|
|
513
|
-
onChange: (e) =>
|
|
514
|
-
className:
|
|
515
|
-
children:
|
|
777
|
+
value: It,
|
|
778
|
+
onChange: (e) => Lt(e.target.value),
|
|
779
|
+
className: T,
|
|
780
|
+
children: Re.map((e) => /* @__PURE__ */ S("option", {
|
|
516
781
|
value: e,
|
|
517
|
-
children:
|
|
782
|
+
children: d(e)
|
|
518
783
|
}, e))
|
|
519
784
|
})] })]
|
|
520
785
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
786
|
+
/* @__PURE__ */ C("div", {
|
|
522
787
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
523
|
-
children: [/* @__PURE__ */
|
|
788
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
524
789
|
htmlFor: "credit-character",
|
|
525
|
-
className:
|
|
790
|
+
className: E,
|
|
526
791
|
children: "Character name"
|
|
527
|
-
}), /* @__PURE__ */
|
|
792
|
+
}), /* @__PURE__ */ S("input", {
|
|
528
793
|
id: "credit-character",
|
|
529
794
|
type: "text",
|
|
530
|
-
value:
|
|
531
|
-
onChange: (e) =>
|
|
795
|
+
value: Rt,
|
|
796
|
+
onChange: (e) => zt(e.target.value),
|
|
532
797
|
placeholder: "e.g. Captain Rao",
|
|
533
|
-
className:
|
|
534
|
-
})] }), /* @__PURE__ */
|
|
798
|
+
className: T
|
|
799
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
535
800
|
htmlFor: "credit-billing",
|
|
536
|
-
className:
|
|
801
|
+
className: E,
|
|
537
802
|
children: "Billing order"
|
|
538
|
-
}), /* @__PURE__ */
|
|
803
|
+
}), /* @__PURE__ */ S("input", {
|
|
539
804
|
id: "credit-billing",
|
|
540
805
|
type: "number",
|
|
541
|
-
value:
|
|
542
|
-
onChange: (e) =>
|
|
806
|
+
value: K,
|
|
807
|
+
onChange: (e) => Bt(e.target.value),
|
|
543
808
|
placeholder: "1",
|
|
544
|
-
className:
|
|
809
|
+
className: T
|
|
545
810
|
})] })]
|
|
546
811
|
}),
|
|
547
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ C("div", {
|
|
548
813
|
className: "flex items-center gap-3",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
814
|
+
children: [/* @__PURE__ */ C("button", {
|
|
550
815
|
type: "submit",
|
|
551
|
-
disabled:
|
|
816
|
+
disabled: O.isPending,
|
|
552
817
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
553
|
-
children: [/* @__PURE__ */
|
|
554
|
-
}), /* @__PURE__ */
|
|
818
|
+
children: [/* @__PURE__ */ S(y, { className: "h-4 w-4" }), O.isPending ? "Adding…" : "Add credit"]
|
|
819
|
+
}), /* @__PURE__ */ S("button", {
|
|
555
820
|
type: "button",
|
|
556
|
-
onClick:
|
|
821
|
+
onClick: X,
|
|
557
822
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
558
823
|
children: "Cancel"
|
|
559
824
|
})]
|
|
560
825
|
})
|
|
561
826
|
]
|
|
562
827
|
}),
|
|
563
|
-
|
|
828
|
+
h.credits.length === 0 ? /* @__PURE__ */ S("p", {
|
|
564
829
|
className: "text-sm text-text-secondary",
|
|
565
830
|
children: "No credits recorded yet."
|
|
566
|
-
}) : /* @__PURE__ */
|
|
831
|
+
}) : /* @__PURE__ */ S("ul", {
|
|
567
832
|
className: "divide-y divide-border-seam",
|
|
568
|
-
children: [...
|
|
833
|
+
children: [...h.credits].sort((e, t) => e.billingOrder - t.billingOrder).map((e) => /* @__PURE__ */ C("li", {
|
|
569
834
|
className: "flex items-center justify-between py-2",
|
|
570
|
-
children: [/* @__PURE__ */
|
|
835
|
+
children: [/* @__PURE__ */ C("div", {
|
|
571
836
|
className: "min-w-0",
|
|
572
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ S("p", {
|
|
573
838
|
className: "truncate text-sm font-medium text-text-primary",
|
|
574
839
|
children: e.person?.name ?? "Unknown person"
|
|
575
|
-
}), e.characterName && /* @__PURE__ */
|
|
840
|
+
}), e.characterName && /* @__PURE__ */ C("p", {
|
|
576
841
|
className: "text-xs text-text-secondary",
|
|
577
842
|
children: ["as ", e.characterName]
|
|
578
843
|
})]
|
|
579
|
-
}), /* @__PURE__ */
|
|
844
|
+
}), /* @__PURE__ */ S("span", {
|
|
580
845
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
581
|
-
children:
|
|
846
|
+
children: d(e.role)
|
|
582
847
|
})]
|
|
583
848
|
}, e.id))
|
|
584
849
|
})
|
|
585
850
|
]
|
|
586
851
|
}),
|
|
587
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ C(w, {
|
|
588
853
|
treatment: "metric",
|
|
589
854
|
className: "border-border-seam p-5",
|
|
590
855
|
children: [
|
|
591
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ C("div", {
|
|
592
857
|
className: "mb-3 flex flex-wrap items-center justify-between gap-3",
|
|
593
|
-
children: [/* @__PURE__ */
|
|
858
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
594
859
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
595
860
|
children: [
|
|
596
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ S(Ce, { className: "h-4 w-4" }),
|
|
597
862
|
"Episodes (",
|
|
598
|
-
|
|
863
|
+
h.episodes.length,
|
|
599
864
|
")"
|
|
600
865
|
]
|
|
601
|
-
}),
|
|
866
|
+
}), Y && /* @__PURE__ */ C("div", {
|
|
602
867
|
className: "flex items-center gap-2",
|
|
603
|
-
children: [/* @__PURE__ */
|
|
868
|
+
children: [/* @__PURE__ */ C("button", {
|
|
604
869
|
type: "button",
|
|
605
870
|
onClick: () => {
|
|
606
|
-
|
|
871
|
+
P(null), V(B === "season" ? "none" : "season");
|
|
607
872
|
},
|
|
608
873
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
609
|
-
children: [/* @__PURE__ */
|
|
610
|
-
}), /* @__PURE__ */
|
|
874
|
+
children: [/* @__PURE__ */ S(y, { className: "h-3.5 w-3.5" }), "Add season"]
|
|
875
|
+
}), /* @__PURE__ */ C("button", {
|
|
611
876
|
type: "button",
|
|
612
877
|
onClick: () => {
|
|
613
|
-
|
|
878
|
+
P(null), V(B === "episode" ? "none" : "episode");
|
|
614
879
|
},
|
|
615
880
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
616
|
-
children: [/* @__PURE__ */
|
|
881
|
+
children: [/* @__PURE__ */ S(y, { className: "h-3.5 w-3.5" }), "Add episode"]
|
|
617
882
|
})]
|
|
618
883
|
})]
|
|
619
884
|
}),
|
|
620
|
-
|
|
621
|
-
onSubmit:
|
|
885
|
+
Y && B === "season" && /* @__PURE__ */ C("form", {
|
|
886
|
+
onSubmit: mn,
|
|
622
887
|
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
623
888
|
children: [
|
|
624
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ C("div", {
|
|
625
890
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
626
|
-
children: [/* @__PURE__ */
|
|
891
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
627
892
|
htmlFor: "season-number",
|
|
628
|
-
className:
|
|
893
|
+
className: E,
|
|
629
894
|
children: "Season number *"
|
|
630
|
-
}), /* @__PURE__ */
|
|
895
|
+
}), /* @__PURE__ */ S("input", {
|
|
631
896
|
id: "season-number",
|
|
632
897
|
type: "number",
|
|
633
|
-
value:
|
|
634
|
-
onChange: (e) =>
|
|
898
|
+
value: q,
|
|
899
|
+
onChange: (e) => Ht(e.target.value),
|
|
635
900
|
placeholder: "1",
|
|
636
|
-
className:
|
|
901
|
+
className: T,
|
|
637
902
|
required: !0
|
|
638
|
-
})] }), /* @__PURE__ */
|
|
903
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
639
904
|
htmlFor: "season-name",
|
|
640
|
-
className:
|
|
905
|
+
className: E,
|
|
641
906
|
children: "Name"
|
|
642
|
-
}), /* @__PURE__ */
|
|
907
|
+
}), /* @__PURE__ */ S("input", {
|
|
643
908
|
id: "season-name",
|
|
644
909
|
type: "text",
|
|
645
|
-
value:
|
|
646
|
-
onChange: (e) =>
|
|
910
|
+
value: Ut,
|
|
911
|
+
onChange: (e) => Wt(e.target.value),
|
|
647
912
|
placeholder: "Season 1",
|
|
648
|
-
className:
|
|
913
|
+
className: T
|
|
649
914
|
})] })]
|
|
650
915
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
652
917
|
htmlFor: "season-synopsis",
|
|
653
|
-
className:
|
|
918
|
+
className: E,
|
|
654
919
|
children: "Synopsis"
|
|
655
|
-
}), /* @__PURE__ */
|
|
920
|
+
}), /* @__PURE__ */ S("textarea", {
|
|
656
921
|
id: "season-synopsis",
|
|
657
|
-
value:
|
|
658
|
-
onChange: (e) =>
|
|
922
|
+
value: Gt,
|
|
923
|
+
onChange: (e) => Kt(e.target.value),
|
|
659
924
|
rows: 3,
|
|
660
|
-
className:
|
|
925
|
+
className: T
|
|
661
926
|
})] }),
|
|
662
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
663
928
|
htmlFor: "season-airdate",
|
|
664
|
-
className:
|
|
929
|
+
className: E,
|
|
665
930
|
children: "Air date"
|
|
666
|
-
}), /* @__PURE__ */
|
|
931
|
+
}), /* @__PURE__ */ S("input", {
|
|
667
932
|
id: "season-airdate",
|
|
668
933
|
type: "date",
|
|
669
|
-
value:
|
|
670
|
-
onChange: (e) =>
|
|
671
|
-
className:
|
|
934
|
+
value: qt,
|
|
935
|
+
onChange: (e) => Jt(e.target.value),
|
|
936
|
+
className: T
|
|
672
937
|
})] }),
|
|
673
|
-
/* @__PURE__ */
|
|
938
|
+
/* @__PURE__ */ C("div", {
|
|
674
939
|
className: "flex items-center gap-3",
|
|
675
|
-
children: [/* @__PURE__ */
|
|
940
|
+
children: [/* @__PURE__ */ C("button", {
|
|
676
941
|
type: "submit",
|
|
677
|
-
disabled:
|
|
942
|
+
disabled: k.isPending,
|
|
678
943
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
679
|
-
children: [/* @__PURE__ */
|
|
680
|
-
}), /* @__PURE__ */
|
|
944
|
+
children: [/* @__PURE__ */ S(y, { className: "h-4 w-4" }), k.isPending ? "Adding…" : "Add season"]
|
|
945
|
+
}), /* @__PURE__ */ S("button", {
|
|
681
946
|
type: "button",
|
|
682
|
-
onClick:
|
|
947
|
+
onClick: X,
|
|
683
948
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
684
949
|
children: "Cancel"
|
|
685
950
|
})]
|
|
686
951
|
})
|
|
687
952
|
]
|
|
688
953
|
}),
|
|
689
|
-
|
|
690
|
-
onSubmit:
|
|
954
|
+
Y && B === "episode" && /* @__PURE__ */ C("form", {
|
|
955
|
+
onSubmit: hn,
|
|
691
956
|
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
692
957
|
children: [
|
|
693
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ C("div", {
|
|
694
959
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
695
|
-
children: [/* @__PURE__ */
|
|
960
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
696
961
|
htmlFor: "episode-season",
|
|
697
|
-
className:
|
|
962
|
+
className: E,
|
|
698
963
|
children: "Season"
|
|
699
|
-
}), /* @__PURE__ */
|
|
964
|
+
}), /* @__PURE__ */ C("select", {
|
|
700
965
|
id: "episode-season",
|
|
701
|
-
value:
|
|
702
|
-
onChange: (e) =>
|
|
703
|
-
className:
|
|
704
|
-
children: [/* @__PURE__ */
|
|
966
|
+
value: Yt,
|
|
967
|
+
onChange: (e) => Xt(e.target.value),
|
|
968
|
+
className: T,
|
|
969
|
+
children: [/* @__PURE__ */ S("option", {
|
|
705
970
|
value: "",
|
|
706
971
|
children: "No season"
|
|
707
|
-
}), [...
|
|
972
|
+
}), [...h.seasons].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */ S("option", {
|
|
708
973
|
value: e.id,
|
|
709
974
|
children: e.name ? `${e.number}. ${e.name}` : `Season ${e.number}`
|
|
710
975
|
}, e.id))]
|
|
711
|
-
})] }), /* @__PURE__ */
|
|
976
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
712
977
|
htmlFor: "episode-number",
|
|
713
|
-
className:
|
|
978
|
+
className: E,
|
|
714
979
|
children: "Episode number *"
|
|
715
|
-
}), /* @__PURE__ */
|
|
980
|
+
}), /* @__PURE__ */ S("input", {
|
|
716
981
|
id: "episode-number",
|
|
717
982
|
type: "number",
|
|
718
|
-
value:
|
|
719
|
-
onChange: (e) =>
|
|
983
|
+
value: J,
|
|
984
|
+
onChange: (e) => Zt(e.target.value),
|
|
720
985
|
placeholder: "1",
|
|
721
|
-
className:
|
|
986
|
+
className: T,
|
|
722
987
|
required: !0
|
|
723
988
|
})] })]
|
|
724
989
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
726
991
|
htmlFor: "episode-name",
|
|
727
|
-
className:
|
|
992
|
+
className: E,
|
|
728
993
|
children: "Name *"
|
|
729
|
-
}), /* @__PURE__ */
|
|
994
|
+
}), /* @__PURE__ */ S("input", {
|
|
730
995
|
id: "episode-name",
|
|
731
996
|
type: "text",
|
|
732
|
-
value:
|
|
733
|
-
onChange: (e) =>
|
|
997
|
+
value: Qt,
|
|
998
|
+
onChange: (e) => $t(e.target.value),
|
|
734
999
|
placeholder: "Pilot",
|
|
735
|
-
className:
|
|
1000
|
+
className: T,
|
|
736
1001
|
required: !0
|
|
737
1002
|
})] }),
|
|
738
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
739
1004
|
htmlFor: "episode-synopsis",
|
|
740
|
-
className:
|
|
1005
|
+
className: E,
|
|
741
1006
|
children: "Synopsis"
|
|
742
|
-
}), /* @__PURE__ */
|
|
1007
|
+
}), /* @__PURE__ */ S("textarea", {
|
|
743
1008
|
id: "episode-synopsis",
|
|
744
|
-
value:
|
|
745
|
-
onChange: (e) =>
|
|
1009
|
+
value: en,
|
|
1010
|
+
onChange: (e) => tn(e.target.value),
|
|
746
1011
|
rows: 3,
|
|
747
|
-
className:
|
|
1012
|
+
className: T
|
|
748
1013
|
})] }),
|
|
749
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ C("div", {
|
|
750
1015
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
751
|
-
children: [/* @__PURE__ */
|
|
1016
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
752
1017
|
htmlFor: "episode-runtime",
|
|
753
|
-
className:
|
|
1018
|
+
className: E,
|
|
754
1019
|
children: "Runtime (minutes)"
|
|
755
|
-
}), /* @__PURE__ */
|
|
1020
|
+
}), /* @__PURE__ */ S("input", {
|
|
756
1021
|
id: "episode-runtime",
|
|
757
1022
|
type: "number",
|
|
758
|
-
value:
|
|
759
|
-
onChange: (e) =>
|
|
1023
|
+
value: nn,
|
|
1024
|
+
onChange: (e) => rn(e.target.value),
|
|
760
1025
|
placeholder: "45",
|
|
761
|
-
className:
|
|
762
|
-
})] }), /* @__PURE__ */
|
|
1026
|
+
className: T
|
|
1027
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
763
1028
|
htmlFor: "episode-airdate",
|
|
764
|
-
className:
|
|
1029
|
+
className: E,
|
|
765
1030
|
children: "Air date"
|
|
766
|
-
}), /* @__PURE__ */
|
|
1031
|
+
}), /* @__PURE__ */ S("input", {
|
|
767
1032
|
id: "episode-airdate",
|
|
768
1033
|
type: "date",
|
|
769
|
-
value:
|
|
770
|
-
onChange: (e) =>
|
|
771
|
-
className:
|
|
1034
|
+
value: an,
|
|
1035
|
+
onChange: (e) => on(e.target.value),
|
|
1036
|
+
className: T
|
|
772
1037
|
})] })]
|
|
773
1038
|
}),
|
|
774
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ C("div", {
|
|
775
1040
|
className: "flex items-center gap-3",
|
|
776
|
-
children: [/* @__PURE__ */
|
|
1041
|
+
children: [/* @__PURE__ */ C("button", {
|
|
777
1042
|
type: "submit",
|
|
778
|
-
disabled:
|
|
1043
|
+
disabled: A.isPending,
|
|
779
1044
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
780
|
-
children: [/* @__PURE__ */
|
|
781
|
-
}), /* @__PURE__ */
|
|
1045
|
+
children: [/* @__PURE__ */ S(y, { className: "h-4 w-4" }), A.isPending ? "Adding…" : "Add episode"]
|
|
1046
|
+
}), /* @__PURE__ */ S("button", {
|
|
782
1047
|
type: "button",
|
|
783
|
-
onClick:
|
|
1048
|
+
onClick: X,
|
|
784
1049
|
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
785
1050
|
children: "Cancel"
|
|
786
1051
|
})]
|
|
787
1052
|
})
|
|
788
1053
|
]
|
|
789
1054
|
}),
|
|
790
|
-
|
|
1055
|
+
h.episodes.length === 0 ? /* @__PURE__ */ S("p", {
|
|
791
1056
|
className: "text-sm text-text-secondary",
|
|
792
|
-
children:
|
|
793
|
-
}) : /* @__PURE__ */
|
|
1057
|
+
children: Y ? "No episodes yet. Add a season, then episodes, to build out this series." : "No episodes recorded for this title."
|
|
1058
|
+
}) : /* @__PURE__ */ S("ul", {
|
|
794
1059
|
className: "divide-y divide-border-seam",
|
|
795
|
-
children: [...
|
|
1060
|
+
children: [...h.episodes].sort((e, t) => e.number - t.number).map((e) => /* @__PURE__ */ C("li", {
|
|
796
1061
|
className: "flex items-center justify-between py-2",
|
|
797
|
-
children: [/* @__PURE__ */
|
|
1062
|
+
children: [/* @__PURE__ */ C("div", {
|
|
798
1063
|
className: "min-w-0",
|
|
799
|
-
children: [/* @__PURE__ */
|
|
1064
|
+
children: [/* @__PURE__ */ C("p", {
|
|
800
1065
|
className: "truncate text-sm font-medium text-text-primary",
|
|
801
1066
|
children: [
|
|
802
1067
|
e.number,
|
|
803
1068
|
". ",
|
|
804
1069
|
e.name
|
|
805
1070
|
]
|
|
806
|
-
}), e.synopsis && /* @__PURE__ */
|
|
1071
|
+
}), e.synopsis && /* @__PURE__ */ S("p", {
|
|
807
1072
|
className: "line-clamp-1 text-xs text-text-secondary",
|
|
808
1073
|
children: e.synopsis
|
|
809
1074
|
})]
|
|
810
|
-
}), e.runtimeMinutes && /* @__PURE__ */
|
|
1075
|
+
}), e.runtimeMinutes && /* @__PURE__ */ C("span", {
|
|
811
1076
|
className: "text-xs text-text-secondary",
|
|
812
1077
|
children: [e.runtimeMinutes, " min"]
|
|
813
1078
|
})]
|
|
@@ -815,173 +1080,306 @@ var u = {
|
|
|
815
1080
|
})
|
|
816
1081
|
]
|
|
817
1082
|
}),
|
|
818
|
-
/* @__PURE__ */
|
|
1083
|
+
/* @__PURE__ */ C(w, {
|
|
819
1084
|
treatment: "metric",
|
|
820
1085
|
className: "border-border-seam p-5",
|
|
821
|
-
children: [/* @__PURE__ */
|
|
1086
|
+
children: [/* @__PURE__ */ C("div", {
|
|
822
1087
|
className: "mb-3 flex items-center justify-between",
|
|
823
|
-
children: [/* @__PURE__ */
|
|
1088
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
824
1089
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
825
1090
|
children: [
|
|
826
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ S(ke, { className: "h-4 w-4" }),
|
|
827
1092
|
"Reviews (",
|
|
828
|
-
|
|
1093
|
+
Z.length,
|
|
829
1094
|
")"
|
|
830
1095
|
]
|
|
831
|
-
}),
|
|
832
|
-
value:
|
|
833
|
-
count:
|
|
1096
|
+
}), yn !== null && /* @__PURE__ */ S(me, {
|
|
1097
|
+
value: yn / 2,
|
|
1098
|
+
count: Z.length
|
|
834
1099
|
})]
|
|
835
|
-
}),
|
|
1100
|
+
}), Z.length === 0 ? /* @__PURE__ */ S("p", {
|
|
836
1101
|
className: "text-sm text-text-secondary",
|
|
837
1102
|
children: "No reviews yet."
|
|
838
|
-
}) : /* @__PURE__ */
|
|
1103
|
+
}) : /* @__PURE__ */ S("ul", {
|
|
839
1104
|
className: "space-y-3",
|
|
840
|
-
children:
|
|
1105
|
+
children: Z.map((e) => /* @__PURE__ */ C("li", {
|
|
841
1106
|
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
842
|
-
children: [/* @__PURE__ */
|
|
1107
|
+
children: [/* @__PURE__ */ C("div", {
|
|
843
1108
|
className: "flex items-center justify-between",
|
|
844
|
-
children: [/* @__PURE__ */
|
|
1109
|
+
children: [/* @__PURE__ */ C("span", {
|
|
845
1110
|
className: "text-sm font-semibold text-text-primary",
|
|
846
1111
|
children: [e.score, "/10"]
|
|
847
|
-
}), /* @__PURE__ */
|
|
1112
|
+
}), /* @__PURE__ */ C("div", {
|
|
848
1113
|
className: "flex items-center gap-2",
|
|
849
|
-
children: [e.verifiedWatch && /* @__PURE__ */
|
|
1114
|
+
children: [e.verifiedWatch && /* @__PURE__ */ S("span", {
|
|
850
1115
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[10px] text-status-success-text",
|
|
851
1116
|
children: "Verified"
|
|
852
|
-
}), /* @__PURE__ */
|
|
1117
|
+
}), /* @__PURE__ */ S(r, { status: e.status })]
|
|
853
1118
|
})]
|
|
854
|
-
}), e.body && /* @__PURE__ */
|
|
1119
|
+
}), e.body && /* @__PURE__ */ S("p", {
|
|
855
1120
|
className: "mt-1 text-sm text-text-secondary",
|
|
856
1121
|
children: e.body
|
|
857
1122
|
})]
|
|
858
1123
|
}, e.id))
|
|
859
1124
|
})]
|
|
1125
|
+
}),
|
|
1126
|
+
/* @__PURE__ */ C(w, {
|
|
1127
|
+
treatment: "metric",
|
|
1128
|
+
className: "border-border-seam p-5",
|
|
1129
|
+
children: [
|
|
1130
|
+
/* @__PURE__ */ C("div", {
|
|
1131
|
+
className: "mb-3 flex flex-wrap items-center justify-between gap-3",
|
|
1132
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
1133
|
+
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
1134
|
+
children: [
|
|
1135
|
+
/* @__PURE__ */ S(Me, { className: "h-4 w-4" }),
|
|
1136
|
+
"Clips (",
|
|
1137
|
+
N.data?.totalCount ?? Q.length,
|
|
1138
|
+
")"
|
|
1139
|
+
]
|
|
1140
|
+
}), /* @__PURE__ */ C("button", {
|
|
1141
|
+
type: "button",
|
|
1142
|
+
onClick: () => {
|
|
1143
|
+
R(null), F((e) => !e);
|
|
1144
|
+
},
|
|
1145
|
+
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-2.5 py-1 text-xs font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
1146
|
+
children: [/* @__PURE__ */ S(y, { className: "h-3.5 w-3.5" }), "Add clip"]
|
|
1147
|
+
})]
|
|
1148
|
+
}),
|
|
1149
|
+
et && /* @__PURE__ */ C("form", {
|
|
1150
|
+
onSubmit: _n,
|
|
1151
|
+
className: "mb-4 space-y-4 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
1152
|
+
children: [
|
|
1153
|
+
/* @__PURE__ */ C("div", { children: [
|
|
1154
|
+
/* @__PURE__ */ S("label", {
|
|
1155
|
+
htmlFor: "clip-file",
|
|
1156
|
+
className: E,
|
|
1157
|
+
children: "Clip video * (short vertical MP4)"
|
|
1158
|
+
}),
|
|
1159
|
+
/* @__PURE__ */ S("input", {
|
|
1160
|
+
id: "clip-file",
|
|
1161
|
+
ref: z,
|
|
1162
|
+
type: "file",
|
|
1163
|
+
accept: "video/*",
|
|
1164
|
+
onChange: (e) => tt(e.target.files?.[0] ?? null),
|
|
1165
|
+
className: T
|
|
1166
|
+
}),
|
|
1167
|
+
I && /* @__PURE__ */ C("p", {
|
|
1168
|
+
className: "mt-1 truncate text-xs text-text-secondary",
|
|
1169
|
+
children: ["Selected: ", I.name]
|
|
1170
|
+
})
|
|
1171
|
+
] }),
|
|
1172
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
1173
|
+
htmlFor: "clip-caption",
|
|
1174
|
+
className: E,
|
|
1175
|
+
children: "Caption"
|
|
1176
|
+
}), /* @__PURE__ */ S("input", {
|
|
1177
|
+
id: "clip-caption",
|
|
1178
|
+
type: "text",
|
|
1179
|
+
value: nt,
|
|
1180
|
+
onChange: (e) => rt(e.target.value),
|
|
1181
|
+
placeholder: "e.g. Official teaser",
|
|
1182
|
+
className: T
|
|
1183
|
+
})] }),
|
|
1184
|
+
/* @__PURE__ */ C("div", {
|
|
1185
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1186
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
1187
|
+
htmlFor: "clip-duration",
|
|
1188
|
+
className: E,
|
|
1189
|
+
children: "Duration (seconds)"
|
|
1190
|
+
}), /* @__PURE__ */ S("input", {
|
|
1191
|
+
id: "clip-duration",
|
|
1192
|
+
type: "number",
|
|
1193
|
+
min: 0,
|
|
1194
|
+
value: L,
|
|
1195
|
+
onChange: (e) => it(e.target.value),
|
|
1196
|
+
placeholder: "30",
|
|
1197
|
+
className: T
|
|
1198
|
+
})] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
|
|
1199
|
+
htmlFor: "clip-language",
|
|
1200
|
+
className: E,
|
|
1201
|
+
children: "Language"
|
|
1202
|
+
}), /* @__PURE__ */ S("input", {
|
|
1203
|
+
id: "clip-language",
|
|
1204
|
+
type: "text",
|
|
1205
|
+
value: at,
|
|
1206
|
+
onChange: (e) => ot(e.target.value),
|
|
1207
|
+
placeholder: "en",
|
|
1208
|
+
className: T
|
|
1209
|
+
})] })]
|
|
1210
|
+
}),
|
|
1211
|
+
lt && /* @__PURE__ */ S("p", {
|
|
1212
|
+
className: "text-xs text-status-error-text",
|
|
1213
|
+
children: lt
|
|
1214
|
+
}),
|
|
1215
|
+
/* @__PURE__ */ C("div", {
|
|
1216
|
+
className: "flex items-center gap-3",
|
|
1217
|
+
children: [/* @__PURE__ */ C("button", {
|
|
1218
|
+
type: "submit",
|
|
1219
|
+
disabled: st,
|
|
1220
|
+
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-50",
|
|
1221
|
+
children: [/* @__PURE__ */ S(x, { className: "h-4 w-4" }), st ? "Uploading…" : "Add clip"]
|
|
1222
|
+
}), /* @__PURE__ */ S("button", {
|
|
1223
|
+
type: "button",
|
|
1224
|
+
onClick: () => {
|
|
1225
|
+
F(!1), R(null);
|
|
1226
|
+
},
|
|
1227
|
+
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
1228
|
+
children: "Cancel"
|
|
1229
|
+
})]
|
|
1230
|
+
})
|
|
1231
|
+
]
|
|
1232
|
+
}),
|
|
1233
|
+
N.isLoading ? /* @__PURE__ */ S(de, {
|
|
1234
|
+
label: "Loading clips…",
|
|
1235
|
+
className: "min-h-[20vh]"
|
|
1236
|
+
}) : N.isError ? /* @__PURE__ */ S(ue, {
|
|
1237
|
+
title: "Could not load clips",
|
|
1238
|
+
message: "Something went wrong fetching this title's clips.",
|
|
1239
|
+
onRetry: () => void N.refetch(),
|
|
1240
|
+
className: "min-h-[20vh]"
|
|
1241
|
+
}) : Q.length === 0 ? /* @__PURE__ */ S(fe, {
|
|
1242
|
+
title: "No clips yet",
|
|
1243
|
+
description: "Upload a short vertical clip to promote this title."
|
|
1244
|
+
}) : /* @__PURE__ */ C(Fe, { children: [/* @__PURE__ */ S("div", {
|
|
1245
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4",
|
|
1246
|
+
children: Q.map((e) => /* @__PURE__ */ S(We, {
|
|
1247
|
+
clip: e,
|
|
1248
|
+
deleting: ut === e.id,
|
|
1249
|
+
onDelete: (e) => void vn(e)
|
|
1250
|
+
}, e.id))
|
|
1251
|
+
}), /* @__PURE__ */ S(pe, {
|
|
1252
|
+
page: Ye,
|
|
1253
|
+
hasMore: N.data?.pageInfo.hasMore ?? !1,
|
|
1254
|
+
shownCount: Q.length,
|
|
1255
|
+
onPageChange: Xe
|
|
1256
|
+
})] })
|
|
1257
|
+
]
|
|
860
1258
|
})
|
|
861
1259
|
]
|
|
862
|
-
}), /* @__PURE__ */
|
|
1260
|
+
}), /* @__PURE__ */ C("div", {
|
|
863
1261
|
className: "space-y-6",
|
|
864
1262
|
children: [
|
|
865
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ C(w, {
|
|
866
1264
|
treatment: "metric",
|
|
867
1265
|
className: "border-border-seam p-5",
|
|
868
|
-
children: [/* @__PURE__ */
|
|
1266
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
869
1267
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
870
|
-
children: [/* @__PURE__ */
|
|
871
|
-
}),
|
|
1268
|
+
children: [/* @__PURE__ */ S(Ee, { className: "h-4 w-4" }), "Watch"]
|
|
1269
|
+
}), M.isLoading ? /* @__PURE__ */ S("p", {
|
|
872
1270
|
className: "text-sm text-text-secondary",
|
|
873
1271
|
children: "Checking access…"
|
|
874
|
-
}) :
|
|
1272
|
+
}) : M.isError ? /* @__PURE__ */ C("div", {
|
|
875
1273
|
className: "space-y-2",
|
|
876
|
-
children: [/* @__PURE__ */
|
|
1274
|
+
children: [/* @__PURE__ */ S("p", {
|
|
877
1275
|
className: "text-sm text-status-error-text",
|
|
878
1276
|
children: "Could not check entitlement."
|
|
879
|
-
}), /* @__PURE__ */
|
|
1277
|
+
}), /* @__PURE__ */ S("button", {
|
|
880
1278
|
type: "button",
|
|
881
|
-
onClick: () => void
|
|
1279
|
+
onClick: () => void M.refetch(),
|
|
882
1280
|
className: "rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
883
1281
|
children: "Retry"
|
|
884
1282
|
})]
|
|
885
|
-
}) :
|
|
1283
|
+
}) : M.data?.entitled ? /* @__PURE__ */ C("div", {
|
|
886
1284
|
className: "space-y-3",
|
|
887
|
-
children: [
|
|
1285
|
+
children: [M.data.modes.length > 0 && /* @__PURE__ */ S("div", {
|
|
888
1286
|
className: "flex flex-wrap gap-1.5",
|
|
889
|
-
children:
|
|
1287
|
+
children: M.data.modes.map((e) => /* @__PURE__ */ S("span", {
|
|
890
1288
|
className: "rounded-full bg-status-success-bg-subtle px-2.5 py-0.5 text-xs text-status-success-text",
|
|
891
|
-
children:
|
|
1289
|
+
children: d(e)
|
|
892
1290
|
}, e))
|
|
893
|
-
}),
|
|
1291
|
+
}), sn ? /* @__PURE__ */ C("p", {
|
|
894
1292
|
className: "flex items-center gap-2 text-sm text-status-success-text",
|
|
895
|
-
children: [/* @__PURE__ */
|
|
896
|
-
}) : /* @__PURE__ */
|
|
1293
|
+
children: [/* @__PURE__ */ S(ye, { className: "h-4 w-4" }), "Marked as watched — see Continue Watching."]
|
|
1294
|
+
}) : /* @__PURE__ */ C("button", {
|
|
897
1295
|
type: "button",
|
|
898
|
-
disabled:
|
|
899
|
-
onClick: () => void
|
|
1296
|
+
disabled: j.isPending,
|
|
1297
|
+
onClick: () => void gn(),
|
|
900
1298
|
className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
901
|
-
children: [/* @__PURE__ */
|
|
1299
|
+
children: [/* @__PURE__ */ S(Ee, { className: "h-4 w-4" }), j.isPending ? "Saving…" : "Mark as watched"]
|
|
902
1300
|
})]
|
|
903
|
-
}) : /* @__PURE__ */
|
|
1301
|
+
}) : /* @__PURE__ */ C("div", {
|
|
904
1302
|
className: "flex items-start gap-2 rounded-lg border border-border-seam bg-bg-sunken px-3 py-2.5",
|
|
905
|
-
children: [/* @__PURE__ */
|
|
1303
|
+
children: [/* @__PURE__ */ S(we, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("p", {
|
|
906
1304
|
className: "text-sm text-text-secondary",
|
|
907
1305
|
children: "You are not entitled to watch this title. Grant an entitlement or add a rights window to enable playback."
|
|
908
1306
|
})]
|
|
909
1307
|
})]
|
|
910
1308
|
}),
|
|
911
|
-
/* @__PURE__ */
|
|
1309
|
+
/* @__PURE__ */ C(w, {
|
|
912
1310
|
treatment: "metric",
|
|
913
1311
|
className: "border-border-seam p-5",
|
|
914
1312
|
children: [
|
|
915
|
-
/* @__PURE__ */
|
|
1313
|
+
/* @__PURE__ */ S("h2", {
|
|
916
1314
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
917
1315
|
children: "Publication"
|
|
918
1316
|
}),
|
|
919
|
-
/* @__PURE__ */
|
|
1317
|
+
/* @__PURE__ */ C("div", {
|
|
920
1318
|
className: "flex flex-wrap gap-2",
|
|
921
|
-
children: [
|
|
1319
|
+
children: [Ie[h.status].map((e) => /* @__PURE__ */ S("button", {
|
|
922
1320
|
type: "button",
|
|
923
|
-
disabled:
|
|
924
|
-
onClick: () => void
|
|
1321
|
+
disabled: Ve.isPending,
|
|
1322
|
+
onClick: () => void un(e),
|
|
925
1323
|
className: "rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
926
|
-
children:
|
|
927
|
-
}, e)),
|
|
1324
|
+
children: d(e)
|
|
1325
|
+
}, e)), Ie[h.status].length === 0 && /* @__PURE__ */ S("p", {
|
|
928
1326
|
className: "text-xs text-text-secondary",
|
|
929
1327
|
children: "No further transitions available."
|
|
930
1328
|
})]
|
|
931
1329
|
}),
|
|
932
|
-
|
|
1330
|
+
h.status !== "ARCHIVED" && /* @__PURE__ */ C("button", {
|
|
933
1331
|
type: "button",
|
|
934
|
-
disabled:
|
|
935
|
-
onClick: () => void
|
|
1332
|
+
disabled: Ke.isPending,
|
|
1333
|
+
onClick: () => void dn(),
|
|
936
1334
|
className: "mt-3 inline-flex items-center gap-2 rounded-lg border border-status-error-border px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:opacity-50 transition-colors",
|
|
937
|
-
children: [/* @__PURE__ */
|
|
1335
|
+
children: [/* @__PURE__ */ S(ge, { className: "h-3.5 w-3.5" }), "Archive Title"]
|
|
938
1336
|
})
|
|
939
1337
|
]
|
|
940
1338
|
}),
|
|
941
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ C(w, {
|
|
942
1340
|
treatment: "metric",
|
|
943
1341
|
className: "border-border-seam p-5",
|
|
944
|
-
children: [/* @__PURE__ */
|
|
1342
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
945
1343
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
946
1344
|
children: "Details"
|
|
947
|
-
}), /* @__PURE__ */
|
|
1345
|
+
}), /* @__PURE__ */ C("dl", {
|
|
948
1346
|
className: "space-y-2",
|
|
949
1347
|
children: [$.map((e) => {
|
|
950
1348
|
let t = e.icon;
|
|
951
|
-
return /* @__PURE__ */
|
|
1349
|
+
return /* @__PURE__ */ C("div", {
|
|
952
1350
|
className: "flex items-center justify-between text-sm",
|
|
953
|
-
children: [/* @__PURE__ */
|
|
1351
|
+
children: [/* @__PURE__ */ C("dt", {
|
|
954
1352
|
className: "flex items-center gap-2 text-text-secondary",
|
|
955
|
-
children: [/* @__PURE__ */
|
|
956
|
-
}), /* @__PURE__ */
|
|
1353
|
+
children: [/* @__PURE__ */ S(t, { className: "h-3.5 w-3.5" }), e.label]
|
|
1354
|
+
}), /* @__PURE__ */ S("dd", {
|
|
957
1355
|
className: "font-medium text-text-primary",
|
|
958
1356
|
children: e.value
|
|
959
1357
|
})]
|
|
960
1358
|
}, e.label);
|
|
961
|
-
}),
|
|
1359
|
+
}), h.aiDisclosure && /* @__PURE__ */ C("div", {
|
|
962
1360
|
className: "flex items-center gap-2 pt-1 text-sm text-text-secondary",
|
|
963
|
-
children: [/* @__PURE__ */
|
|
1361
|
+
children: [/* @__PURE__ */ S(Oe, { className: "h-3.5 w-3.5" }), "Contains AI-generated content"]
|
|
964
1362
|
})]
|
|
965
1363
|
})]
|
|
966
1364
|
}),
|
|
967
|
-
(
|
|
1365
|
+
(h.genres.length > 0 || h.tags.length > 0) && /* @__PURE__ */ C(w, {
|
|
968
1366
|
treatment: "metric",
|
|
969
1367
|
className: "border-border-seam p-5",
|
|
970
|
-
children: [
|
|
1368
|
+
children: [h.genres.length > 0 && /* @__PURE__ */ C(Fe, { children: [/* @__PURE__ */ S("h3", {
|
|
971
1369
|
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
972
1370
|
children: "Genres"
|
|
973
|
-
}), /* @__PURE__ */
|
|
1371
|
+
}), /* @__PURE__ */ S("div", {
|
|
974
1372
|
className: "mb-3 flex flex-wrap gap-1.5",
|
|
975
|
-
children:
|
|
1373
|
+
children: h.genres.map((e) => /* @__PURE__ */ S("span", {
|
|
976
1374
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-primary",
|
|
977
1375
|
children: e
|
|
978
1376
|
}, e))
|
|
979
|
-
})] }),
|
|
1377
|
+
})] }), h.tags.length > 0 && /* @__PURE__ */ C(Fe, { children: [/* @__PURE__ */ S("h3", {
|
|
980
1378
|
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
981
1379
|
children: "Tags"
|
|
982
|
-
}), /* @__PURE__ */
|
|
1380
|
+
}), /* @__PURE__ */ S("div", {
|
|
983
1381
|
className: "flex flex-wrap gap-1.5",
|
|
984
|
-
children:
|
|
1382
|
+
children: h.tags.map((e) => /* @__PURE__ */ S("span", {
|
|
985
1383
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
986
1384
|
children: e
|
|
987
1385
|
}, e))
|
|
@@ -994,6 +1392,6 @@ var u = {
|
|
|
994
1392
|
});
|
|
995
1393
|
};
|
|
996
1394
|
//#endregion
|
|
997
|
-
export {
|
|
1395
|
+
export { Ke as TitleDetailPage };
|
|
998
1396
|
|
|
999
1397
|
//# sourceMappingURL=TitleDetailPage.js.map
|