refactoring: server actions => tmdb proxy
This commit is contained in:
1 parent
dfdfb79169
commit
97d55b24a1
13 files changed
+131
-113
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
|
|
||||||
import { MOVIE_DB_TOKEN } from '@/env';
|
import { MOVIE_DB_API_URL, MOVIE_DB_TOKEN } from '@/env';
|
||||||
|
|
||||||
type TMDBParams = {
|
type TMDBParams = {
|
||||||
params: {
|
params: {
|
||||||
@@ -8,9 +8,9 @@ type TMDBParams = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function GET({ nextUrl: { searchParams } }: NextRequest, { params: { path } }: TMDBParams) {
|
export async function GET({ nextUrl: { searchParams }, headers }: NextRequest, { params: { path } }: TMDBParams) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`https://api.themoviedb.org/3/${path.join('/')}?${searchParams.toString()}`, {
|
const response = await fetch(`${MOVIE_DB_API_URL}/${path.join('/')}?${searchParams.toString()}`, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: `Bearer ${MOVIE_DB_TOKEN}`
|
Authorization: `Bearer ${MOVIE_DB_TOKEN}`
|
||||||
@@ -28,3 +28,29 @@ export async function GET({ nextUrl: { searchParams } }: NextRequest, { params:
|
|||||||
return NextResponse.json({ error: 'An error occurred' }, { status: 500 });
|
return NextResponse.json({ error: 'An error occurred' }, { status: 500 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function POST(request: NextRequest, { params: { path } }: TMDBParams) {
|
||||||
|
try {
|
||||||
|
const requestBody = await request.json();
|
||||||
|
const searchParams = request.nextUrl.searchParams.toString();
|
||||||
|
|
||||||
|
const response = await fetch(`${MOVIE_DB_API_URL}/${path.join('/')}?${searchParams}`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
Authorization: `Bearer ${MOVIE_DB_TOKEN}`
|
||||||
|
},
|
||||||
|
body: JSON.stringify(requestBody)
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
return NextResponse.json({ error: 'Failed to post data to TMDb' }, { status: response.status });
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
return NextResponse.json(data);
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json({ error: 'An error occurred' }, { status: 500 });
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import { useMutation } from '@tanstack/react-query';
|
import { useMutation } from '@tanstack/react-query';
|
||||||
|
|
||||||
import { useSetSession } from '@/hooks/useSession';
|
import { useSetSession } from '@/hooks/useSession';
|
||||||
@@ -8,12 +8,19 @@ import { createRequestToken, createSession } from '../../../../data';
|
|||||||
const useAuth = () => {
|
const useAuth = () => {
|
||||||
const setSession = useSetSession();
|
const setSession = useSetSession();
|
||||||
const tabRef = useRef<Window | null>(null);
|
const tabRef = useRef<Window | null>(null);
|
||||||
|
const intervalRef = useRef<NodeJS.Timeout>();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const interval = intervalRef.current;
|
||||||
|
return () => clearInterval(interval);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const session = useMutation({
|
const session = useMutation({
|
||||||
retry: 5,
|
|
||||||
mutationFn: createSession,
|
mutationFn: createSession,
|
||||||
onSuccess({ session_id }) {
|
onSuccess({ session_id }) {
|
||||||
setSession(session_id);
|
setSession(session_id);
|
||||||
|
clearInterval(intervalRef.current);
|
||||||
|
|
||||||
tabRef.current?.close();
|
tabRef.current?.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -29,7 +36,7 @@ const useAuth = () => {
|
|||||||
|
|
||||||
tabRef.current.location = redirectUrl;
|
tabRef.current.location = redirectUrl;
|
||||||
|
|
||||||
session.mutate({ requestToken });
|
intervalRef.current = setInterval(() => session.mutate({ requestToken }), 2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+14
-21
@@ -1,36 +1,29 @@
|
|||||||
import * as React from 'react'
|
import * as React from 'react';
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority';
|
||||||
|
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
const badgeVariants = cva(
|
const badgeVariants = cva(
|
||||||
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default:
|
default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
|
||||||
'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
|
secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
||||||
secondary:
|
destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
||||||
'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
outline: 'text-foreground'
|
||||||
destructive:
|
}
|
||||||
'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
||||||
outline: 'text-foreground',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: 'default',
|
variant: 'default'
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
|
|
||||||
export interface BadgeProps
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
||||||
extends React.HTMLAttributes<HTMLDivElement>,
|
|
||||||
VariantProps<typeof badgeVariants> {}
|
|
||||||
|
|
||||||
function Badge({ className, variant, ...props }: BadgeProps) {
|
function Badge({ className, variant, ...props }: BadgeProps) {
|
||||||
return (
|
return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
|
||||||
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Badge, badgeVariants }
|
export { Badge, badgeVariants };
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
import { isServer } from '@tanstack/react-query';
|
||||||
|
|
||||||
|
import { SITE_URL } from '@/env';
|
||||||
|
|
||||||
type Search = Record<string, string | number | boolean | null | undefined>;
|
type Search = Record<string, string | number | boolean | null | undefined>;
|
||||||
|
|
||||||
class Http {
|
class Http {
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
|
import { isServer } from '@tanstack/react-query';
|
||||||
|
|
||||||
import Http from './Http';
|
import Http from './Http';
|
||||||
|
|
||||||
const BASE =
|
const BASE =
|
||||||
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'
|
process.env.NEXT_VERCEL_ENV === 'production'
|
||||||
? process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
|
? process.env.NEXT_VERCEL_PROJECT_PRODUCTION_URL
|
||||||
: process.env.NEXT_PUBLIC_VERCEL_URL;
|
: process.env.NEXT_VERCEL_URL;
|
||||||
|
|
||||||
const movieAdvisor = new Http(`${BASE?.startsWith('http') ? BASE : `https://${BASE}`}/api/tmdb`);
|
const ROOT = isServer ? `${BASE?.startsWith('http') ? BASE : `https://${BASE}`}` : '';
|
||||||
|
|
||||||
|
const movieAdvisor = new Http(`${ROOT}/api/tmdb`);
|
||||||
|
|
||||||
export default movieAdvisor;
|
export default movieAdvisor;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { MOVIE_DB_TOKEN } from '@/env';
|
import { MOVIE_DB_API_URL, MOVIE_DB_TOKEN } from '@/env';
|
||||||
|
|
||||||
import Http from './Http';
|
import Http from './Http';
|
||||||
|
|
||||||
const theMovieDb = new Http('https://api.themoviedb.org/3', `Bearer ${MOVIE_DB_TOKEN}`);
|
const theMovieDB = new Http(MOVIE_DB_API_URL, `Bearer ${MOVIE_DB_TOKEN}`);
|
||||||
|
|
||||||
export default theMovieDb;
|
export default theMovieDB;
|
||||||
+8
-60
@@ -2,74 +2,22 @@
|
|||||||
|
|
||||||
import { cookies } from 'next/headers';
|
import { cookies } from 'next/headers';
|
||||||
|
|
||||||
import http from './clients/theMovieDb';
|
import theMovieDB from './clients/theMovieDB';
|
||||||
import mapMoviesSeriesResponseToShows from './dto/Show';
|
|
||||||
|
|
||||||
export const session = async () => cookies().get('session')?.value;
|
export const session = async () => cookies().get('session')?.value;
|
||||||
|
|
||||||
export const createRequestToken = async () => {
|
export const createRequestToken = async () => {
|
||||||
return http.get<RequestToken>('/authentication/token/new', { preventCache: true }).then(({ request_token }) => ({
|
return theMovieDB
|
||||||
redirectUrl: `https://www.themoviedb.org/authenticate/${request_token}`,
|
.get<RequestToken>('/authentication/token/new', { preventCache: true })
|
||||||
requestToken: request_token
|
.then(({ request_token }) => ({
|
||||||
}));
|
redirectUrl: `https://www.themoviedb.org/authenticate/${request_token}`,
|
||||||
|
requestToken: request_token
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createSession = async ({ requestToken }: { requestToken: string }) => {
|
export const createSession = async ({ requestToken }: { requestToken: string }) => {
|
||||||
return http.post<Session>('/authentication/session/new', {
|
return theMovieDB.post<Session>('/authentication/session/new', {
|
||||||
params: { request_token: requestToken },
|
params: { request_token: requestToken },
|
||||||
preventCache: true
|
preventCache: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const account = async () => {
|
|
||||||
return http.get<Account>('/account/null', {
|
|
||||||
params: { session_id: await session() },
|
|
||||||
preventCache: true
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const accountStates = async ({ showId, showType }: { showId: Show['id']; showType: Show['type'] }) => {
|
|
||||||
return http.get<ShowState>(`/${showType}/${showId}/account_states`, {
|
|
||||||
params: { session_id: await session() },
|
|
||||||
preventCache: true
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const updateAccountStates = async ({
|
|
||||||
showId,
|
|
||||||
showType,
|
|
||||||
list,
|
|
||||||
value
|
|
||||||
}: {
|
|
||||||
showId: Show['id'];
|
|
||||||
showType: Show['type'];
|
|
||||||
list: 'favorite' | 'watchlist';
|
|
||||||
value: boolean;
|
|
||||||
}) => {
|
|
||||||
http.post(
|
|
||||||
`/account/null/${list}`,
|
|
||||||
{ params: { session_id: await session() }, preventCache: true },
|
|
||||||
{
|
|
||||||
media_id: showId,
|
|
||||||
media_type: showType,
|
|
||||||
[list]: value
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const usersShows = async ({
|
|
||||||
showType,
|
|
||||||
list,
|
|
||||||
page
|
|
||||||
}: {
|
|
||||||
showType: Show['type'];
|
|
||||||
list: 'favorite' | 'watchlist';
|
|
||||||
page: string;
|
|
||||||
}): Promise<Pagination<Show>> => {
|
|
||||||
return http
|
|
||||||
.get<TMDBPagination<Movie>>(`/account/null/${list}/${showType === 'tv' ? 'tv' : 'movies'}`, {
|
|
||||||
params: { page, sort_by: 'created_at.desc', session_id: await session() },
|
|
||||||
preventCache: true
|
|
||||||
})
|
|
||||||
.then((response) => mapMoviesSeriesResponseToShows(response, showType));
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import movieAdvisor from '../clients/movieAdvisor';
|
||||||
|
|
||||||
|
export type StatesMutationProps = {
|
||||||
|
session?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type StatesMutationFnProps = {
|
||||||
|
showId: Show['id'];
|
||||||
|
showType: Show['type'];
|
||||||
|
list: 'favorite' | 'watchlist';
|
||||||
|
value: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
const statesMutation = ({ session }: StatesMutationProps) => ({
|
||||||
|
retry: 2,
|
||||||
|
mutationFn: ({ showId, showType, list, value }: StatesMutationFnProps) =>
|
||||||
|
movieAdvisor.post(
|
||||||
|
`/account/null/${list}`,
|
||||||
|
{ params: { session_id: session }, preventCache: true },
|
||||||
|
{
|
||||||
|
media_id: showId,
|
||||||
|
media_type: showType,
|
||||||
|
[list]: value
|
||||||
|
}
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
export default statesMutation;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import movieAdvisor from '../clients/movieAdvisor';
|
||||||
|
|
||||||
|
export type StatesQueryProps = { showId?: Show['id']; showType?: Show['type']; session?: string };
|
||||||
|
|
||||||
|
const statesQuery = ({ showId, showType, session }: StatesQueryProps) => ({
|
||||||
|
enabled: Boolean(showId),
|
||||||
|
queryKey: ['states', showId, showType, session],
|
||||||
|
staleTime: Infinity,
|
||||||
|
queryFn: () =>
|
||||||
|
movieAdvisor.get<ShowState>(`/${showType}/${showId}/account_states`, {
|
||||||
|
params: { session_id: session },
|
||||||
|
preventCache: true
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
export default statesQuery;
|
||||||
@@ -5,7 +5,10 @@ const BASE =
|
|||||||
? process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
|
? process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
|
||||||
: process.env.NEXT_PUBLIC_VERCEL_URL;
|
: process.env.NEXT_PUBLIC_VERCEL_URL;
|
||||||
export const SITE_URL = `${BASE?.startsWith('http') ? BASE : `https://${BASE}`}`;
|
export const SITE_URL = `${BASE?.startsWith('http') ? BASE : `https://${BASE}`}`;
|
||||||
|
|
||||||
export const MOVIE_DB_TOKEN = process.env.MOVIE_DB_TOKEN;
|
export const MOVIE_DB_TOKEN = process.env.MOVIE_DB_TOKEN;
|
||||||
|
export const MOVIE_DB_API_URL = process.env.MOVIE_DB_API_URL || 'https://api.themoviedb.org/3';
|
||||||
|
|
||||||
export const STREAM_URL = `${process.env.NEXT_PUBLIC_TORRENT_PROXY}/stream`;
|
export const STREAM_URL = `${process.env.NEXT_PUBLIC_TORRENT_PROXY}/stream`;
|
||||||
|
|
||||||
export const TOLOKA_HOST = process.env.TOLOKA_HOST;
|
export const TOLOKA_HOST = process.env.TOLOKA_HOST;
|
||||||
|
|||||||
+6
-14
@@ -1,27 +1,19 @@
|
|||||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
||||||
|
|
||||||
|
import statesMutation from '@/data/mutations/accountStates';
|
||||||
|
import statesQuery from '@/data/queries/accountStates';
|
||||||
import { KEY as USERS_SHOWS_KEY } from '@/data/queries/usersShows';
|
import { KEY as USERS_SHOWS_KEY } from '@/data/queries/usersShows';
|
||||||
|
|
||||||
import { accountStates, updateAccountStates } from '../data';
|
|
||||||
|
|
||||||
import { useFavorites, useFavoritesStateToggle, useWatchList, useWatchListStateToggle } from './useLocalUsersLists';
|
import { useFavorites, useFavoritesStateToggle, useWatchList, useWatchListStateToggle } from './useLocalUsersLists';
|
||||||
import { useSession } from './useSession';
|
import { useSession } from './useSession';
|
||||||
|
|
||||||
const KEY = ['show-state'];
|
|
||||||
|
|
||||||
const useShowState = ({ showId, showType = 'movie' }: { showId?: Show['id']; showType?: Show['type'] }) => {
|
const useShowState = ({ showId, showType = 'movie' }: { showId?: Show['id']; showType?: Show['type'] }) => {
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
|
|
||||||
const { map: favorites } = useFavorites();
|
const { map: favorites } = useFavorites();
|
||||||
const { map: watchList } = useWatchList();
|
const { map: watchList } = useWatchList();
|
||||||
|
|
||||||
const query = useQuery({
|
const query = useQuery(statesQuery({ showId, showType, session }));
|
||||||
enabled: Boolean(session && showId && showType),
|
|
||||||
queryKey: KEY.concat(showId!.toString(), showType),
|
|
||||||
queryFn: () => accountStates({ showId: showId!, showType }),
|
|
||||||
notifyOnChangeProps: ['data'],
|
|
||||||
staleTime: Infinity
|
|
||||||
});
|
|
||||||
|
|
||||||
return session ? query.data : { id: showId, watchlist: watchList.has(showId!), favorite: favorites.has(showId!) };
|
return session ? query.data : { id: showId, watchlist: watchList.has(showId!), favorite: favorites.has(showId!) };
|
||||||
};
|
};
|
||||||
@@ -35,9 +27,9 @@ export const useMutateShowState = (show: Show) => {
|
|||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
const mutation = useMutation({
|
const mutation = useMutation({
|
||||||
mutationFn: updateAccountStates,
|
...statesMutation({ session }),
|
||||||
onMutate({ showId, showType, list, value }) {
|
onMutate({ showId, showType, list, value }) {
|
||||||
const key = KEY.concat(showId.toString(), showType);
|
const key = statesQuery({ showId, showType, session }).queryKey;
|
||||||
|
|
||||||
const snapshot = queryClient.getQueryData<ShowState>(key);
|
const snapshot = queryClient.getQueryData<ShowState>(key);
|
||||||
|
|
||||||
@@ -46,7 +38,7 @@ export const useMutateShowState = (show: Show) => {
|
|||||||
return snapshot;
|
return snapshot;
|
||||||
},
|
},
|
||||||
onError(_, { showId, showType }, snapshot) {
|
onError(_, { showId, showType }, snapshot) {
|
||||||
const key = KEY.concat(showId.toString(), showType);
|
const key = statesQuery({ showId, showType, session }).queryKey;
|
||||||
|
|
||||||
queryClient.setQueryData<ShowState>(key, snapshot);
|
queryClient.setQueryData<ShowState>(key, snapshot);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,10 +24,7 @@ const useUsersShows = ({
|
|||||||
const { shows: favorite } = useFavorites();
|
const { shows: favorite } = useFavorites();
|
||||||
const { shows: watchlist } = useWatchList();
|
const { shows: watchlist } = useWatchList();
|
||||||
|
|
||||||
const query = useInfiniteList({
|
const query = useInfiniteList(usersShowsQuery({ showType, list, session }));
|
||||||
...usersShowsQuery({ showType, list, session }),
|
|
||||||
enabled: Boolean(session)
|
|
||||||
});
|
|
||||||
|
|
||||||
return session
|
return session
|
||||||
? query
|
? query
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
if(!self.define){let e,s={};const a=(a,i)=>(a=new URL(a+".js",i).href,s[a]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=a,e.onload=s,document.head.appendChild(e)}else e=a,importScripts(a),s()})).then((()=>{let e=s[a];if(!e)throw new Error(`Module ${a} didn’t register its module`);return e})));self.define=(i,n)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let c={};const r=e=>a(e,t),o={module:{uri:t},exports:c,require:r};s[t]=Promise.all(i.map((e=>o[e]||r(e)))).then((e=>(n(...e),c)))}}define(["./workbox-4754cb34"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"f415a7ade9051b0c1537acf9ed55a083"},{url:"/_next/static/chunks/152.f47729bb9b123937.js",revision:"f47729bb9b123937"},{url:"/_next/static/chunks/18-10b5aadb2f65dcdd.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/209-122137a04eb2adce.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/23-e95fe3862375276d.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/26.286553a5ff2812fc.js",revision:"286553a5ff2812fc"},{url:"/_next/static/chunks/276.c3c1130f2adade69.js",revision:"c3c1130f2adade69"},{url:"/_next/static/chunks/305-b973937e3a05106a.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/344.05938a041227e582.js",revision:"05938a041227e582"},{url:"/_next/static/chunks/383.78d47f7582340f53.js",revision:"78d47f7582340f53"},{url:"/_next/static/chunks/43-1b27b4a4ece03023.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/460.ac20021c7496f1d6.js",revision:"ac20021c7496f1d6"},{url:"/_next/static/chunks/497.48f1dfd129122432.js",revision:"48f1dfd129122432"},{url:"/_next/static/chunks/61.e269d4a699fba0b6.js",revision:"e269d4a699fba0b6"},{url:"/_next/static/chunks/621-fa4d2ff1cf645813.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/673.362c29137dd3e968.js",revision:"362c29137dd3e968"},{url:"/_next/static/chunks/695.156d21364de6e419.js",revision:"156d21364de6e419"},{url:"/_next/static/chunks/755.5cd959eac5682527.js",revision:"5cd959eac5682527"},{url:"/_next/static/chunks/792.b51012549074b93f.js",revision:"b51012549074b93f"},{url:"/_next/static/chunks/810.6105e84414768b0d.js",revision:"6105e84414768b0d"},{url:"/_next/static/chunks/922.9ce4bf0553cfb724.js",revision:"9ce4bf0553cfb724"},{url:"/_next/static/chunks/app/(site)/favorites/page-0dcef32535bf7681.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/(site)/loading-96645736797edde7.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/(site)/page-391352edf67d4bf1.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/(site)/popular/page-047d9b7c4949d909.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/(site)/similar/page-0b2f61ca98aff38e.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/(site)/starring/page-a30349fc64784ca7.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/(site)/top/page-8ed26b82343f54cf.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/(site)/watch-list/page-526c511ac32b4e16.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/_not-found/page-aa0c8e90320336c2.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/app/layout-aa70c1250bb51638.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/c8bcbd21.63daf74955ffea8b.js",revision:"63daf74955ffea8b"},{url:"/_next/static/chunks/fd9d1056-bdf7d185613ab264.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/framework-f66176bb897dc684.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/main-a339d49e77d6dbd3.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/main-app-51cdaff1a81e6b49.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/pages/_app-6a626577ffa902a4.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/pages/_error-1be831200e60c5c0.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-0c8c94a0b2c005e4.js",revision:"y3saS9mrX4-jigNe-MjDa"},{url:"/_next/static/css/0d5f6452b2682b9b.css",revision:"0d5f6452b2682b9b"},{url:"/_next/static/css/30fc28b4ca88767d.css",revision:"30fc28b4ca88767d"},{url:"/_next/static/media/a9b1453781eac9e6-s.p.woff2",revision:"c754cf60aba699077f00948285bf54b5"},{url:"/_next/static/media/dd843ebd3ff03195-s.p.woff2",revision:"333341dc4117f45b7fcee6b5223a56db"},{url:"/_next/static/media/e9ecf55e71a874cd-s.woff2",revision:"62348655e2d5baed97a39f0590491d09"},{url:"/_next/static/y3saS9mrX4-jigNe-MjDa/_buildManifest.js",revision:"2ec694eb52ae4f523f265a46bae4d768"},{url:"/_next/static/y3saS9mrX4-jigNe-MjDa/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/apple-touch-icon.png",revision:"6ed7ad78bLine truncated
|
if(!self.define){let e,s={};const n=(n,a)=>(n=new URL(n+".js",a).href,s[n]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()})).then((()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(a,t)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(s[i])return;let c={};const r=e=>n(e,i),o={module:{uri:i},exports:c,require:r};s[i]=Promise.all(a.map((e=>o[e]||r(e)))).then((e=>(t(...e),c)))}}define(["./workbox-4754cb34"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"59a16d04bfb517ba448006e887fc052b"},{url:"/_next/static/chunks/152.b96372f7a5392cef.js",revision:"b96372f7a5392cef"},{url:"/_next/static/chunks/18-28d875ee028d040c.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/209-a28b87ccff6a966d.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/23-e95fe3862375276d.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/26.286553a5ff2812fc.js",revision:"286553a5ff2812fc"},{url:"/_next/static/chunks/276.c3c1130f2adade69.js",revision:"c3c1130f2adade69"},{url:"/_next/static/chunks/344.05938a041227e582.js",revision:"05938a041227e582"},{url:"/_next/static/chunks/383.78d47f7582340f53.js",revision:"78d47f7582340f53"},{url:"/_next/static/chunks/460.ac20021c7496f1d6.js",revision:"ac20021c7496f1d6"},{url:"/_next/static/chunks/497.48f1dfd129122432.js",revision:"48f1dfd129122432"},{url:"/_next/static/chunks/61.e269d4a699fba0b6.js",revision:"e269d4a699fba0b6"},{url:"/_next/static/chunks/621-fa4d2ff1cf645813.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/671-a5dd76385a5ca3dc.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/673.362c29137dd3e968.js",revision:"362c29137dd3e968"},{url:"/_next/static/chunks/695.156d21364de6e419.js",revision:"156d21364de6e419"},{url:"/_next/static/chunks/734-18050d0326d4613b.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/755.5cd959eac5682527.js",revision:"5cd959eac5682527"},{url:"/_next/static/chunks/792.b51012549074b93f.js",revision:"b51012549074b93f"},{url:"/_next/static/chunks/810.6105e84414768b0d.js",revision:"6105e84414768b0d"},{url:"/_next/static/chunks/922.9ce4bf0553cfb724.js",revision:"9ce4bf0553cfb724"},{url:"/_next/static/chunks/app/(site)/favorites/page-af6260f0ceafa9de.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/(site)/loading-96645736797edde7.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/(site)/page-3a033d739c48d7a8.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/(site)/popular/page-0ed5b2a9fc6cea8d.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/(site)/similar/page-b9ebe2e6e227ec5b.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/(site)/starring/page-fc1156f9976df849.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/(site)/top/page-2c9b5df6a2dfaeef.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/(site)/watch-list/page-7f447e5a42b09a54.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/_not-found/page-aa0c8e90320336c2.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/app/layout-c04cc3ba56f24f68.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/c8bcbd21.63daf74955ffea8b.js",revision:"63daf74955ffea8b"},{url:"/_next/static/chunks/fd9d1056-bdf7d185613ab264.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/framework-f66176bb897dc684.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/main-a339d49e77d6dbd3.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/main-app-51cdaff1a81e6b49.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/pages/_app-6a626577ffa902a4.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/pages/_error-1be831200e60c5c0.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-c50673da9d5d6a15.js",revision:"yk9rNjWmbZr4TZ8mBjIkJ"},{url:"/_next/static/css/0d5f6452b2682b9b.css",revision:"0d5f6452b2682b9b"},{url:"/_next/static/css/30fc28b4ca88767d.css",revision:"30fc28b4ca88767d"},{url:"/_next/static/media/a9b1453781eac9e6-s.p.woff2",revision:"c754cf60aba699077f00948285bf54b5"},{url:"/_next/static/media/dd843ebd3ff03195-s.p.woff2",revision:"333341dc4117f45b7fcee6b5223a56db"},{url:"/_next/static/media/e9ecf55e71a874cd-s.woff2",revision:"62348655e2d5baed97a39f0590491d09"},{url:"/_next/static/yk9rNjWmbZr4TZ8mBjIkJ/_buildManifest.js",revision:"2ec694eb52ae4f523f265a46bae4d768"},{url:"/_next/static/yk9rNjWmbZr4TZ8mBjIkJ/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/apple-touch-icon.png",revision:"6ed7ad78Line truncated
|
||||||
Reference in new issue
Block a user