PageSourceSearch

https://anitrek.com/_next/static/chunks/pages/upload/manga/[id]-2b406572f027aa1d.js

js anitrek.com collected 2026-10-04 00:45:07 UTC 9,454 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8094],{41223:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/upload/manga/[id]",function(){return s(43274)}])},83339:function(e,n,s){"use strict";var t=s(4637),r=s(58765),a=s(77926),i=s(40730),c=s(58761),l=s(90883),o=s(31824),u=s(2204),d=s(28708),m=s(31505),f=s(59496),x=s(77129),h=s(10478),p=function(e){var n=e.media,s=(0,d.$G)().t,p=(0,m.useRouter)().locale,j=(0,f.useMemo)(function(){return(0,u.YQ)(n,p)},[n,p]),g=(0,f.useMemo)(function(){return(0,u.Eb)(n,p)},[n,p]);return(0,t.jsxs)("div",{className:"p-8 bg-background-900 text-center md:text-left flex flex-col md:flex-row items-start gap-4",children:[(0,t.jsx)("div",{className:"w-[183px] shrink-0 mx-auto md:mx-0",children:(0,t.jsx)(c.Z,{src:n.coverImage.extraLarge,alt:j})}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:j}),(0,t.jsx)("p",{className:"text-gray-300",children:n.title.native}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center text-lg gap-x-8",children:[n.averageScore&&(0,t.jsx)(l.Z,{LeftIcon:h.xHl,iconClassName:"text-green-300",children:(0,t.jsxs)("p",{children:[n.averageScore,"%"]})}),(0,t.jsx)(l.Z,{LeftIcon:x.M_L,iconClassName:"text-sky-400",children:(0,t.jsx)("p",{children:(0,o.x6)(n.favourites)})}),(0,t.jsx)(a.Z,{children:n.genres.map(function(e){return(0,t.jsx)("span",{children:(0,u.OQ)(e,"genre")},e)})})]}),(0,t.jsxs)("div",{className:"flex space-x-8 overflow-x-auto snap-x snap-mandatory md:space-x-16",children:[(0,t.jsx)(i.Z,{title:s("common:country"),value:n.countryOfOrigin}),n.episodes&&(0,t.jsx)(i.Z,{title:s("common:total_episodes"),value:n.episodes}),n.chapters&&(0,t.jsx)(i.Z,{title:s("common:total_chapters"),value:n.chapters}),n.duration&&(0,t.jsx)(i.Z,{title:s("common:duration"),value:"".concat(n.duration," ").concat(s("common:minutes"))}),(0,t.jsx)(i.Z,{title:s("common:status"),value:(0,u.OQ)(n.status,"status",{locale:p})}),(0,t.jsx)(i.Z,{title:s("common:age_rated"),value:n.isAdult?"18+":""})]}),(0,t.jsx)(r.Z,{description:g,className:"text-gray-300 line-clamp-5"})]})]})};n.Z=p},39377:function(e,n,s){"use strict";var t=s(72006),r=s(4405),a=s(77637),i=s(4637),c=s(49192),l=s(93495),o=s(59496),u=function(e){var n=e.isVerified,s=e.children,u=(0,a.Z)(e,["isVerified","children"]);return(0,i.jsx)(c.Z,(0,r.Z)((0,t.Z)({},u),{children:n?(0,i.jsx)(o.Fragment,{children:s}):(0,i.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 space-y-2",children:(0,i.jsxs)("p",{className:"text-center text-3xl",children:["You need to"," ",(0,i.jsx)("a",{href:l.eW,className:"hover:underline text-primary-300",target:"_blank",rel:"noreferrer",children:"sign up to"})," ","to be an uploader."]})})}))};n.Z=u},51936:function(e,n,s){"use strict";var t=s(4637),r=s(35944),a=s(17537),i=s(29843),c=s(53752),l=s(82187),o=s.n(l),u=s(29267),d=s(89880),m=s(21604),f=s.n(m),x=s(59496),h=s(77129),p=s(93520),j=s(54078),g=s(5567),v=s(63233),b=[{title:"Upload",href:"/upload",icon:h.iqr},{title:"Anime",href:"/upload/anime",icon:h.tI3}],y={animate:{x:0},initial:{x:"-100%"}},N=function(e){var n=e.children,s=(0,c.Z)().isMobile,l=(0,x.useState)(!1),m=l[0],N=l[1];return(0,t.jsxs)("div",{className:"w-full min-h-screen flex justify-end",children:[(0,t.jsx)(r.Z,{title:"Upload - AniTrek"}),s&&m&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60 z-40",onClick:function(){return N(!1)}}),(0,t.jsx)(u.M,{initial:s,children:(0,t.jsxs)(d.E.div,{variants:y,transition:{ease:"linear"},animate:!s||m?"animate":"",initial:"initial",className:"h-full w-[70vw] md:w-[20vw] fixed top-0 left-0 bottom-0 z-50 flex flex-col justify-between bg-background-900 p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Z,{}),(0,t.jsxs)("ul",{children:[(0,t.jsx)(v.Z,{type:"click",placement:"bottom-end",showArrow:!0,reference:(0,t.jsx)(g.Z,{className:"w-full mb-4",iconClassName:"w-8 h-8",primary:!0,LeftIcon:h.Lfi,children:"Upload"}),children:(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(f(),{href:"/upload/anime/create",children:(0,t.jsx)("a",{children:(0,t.jsx)(g.Z,{secondary:!0,children:"Post anime"})})})})}),b.map(function(e){return(0,t.jsx)(i.Z,{className:"block mb-2",href:e.href,children:function(n){var s=n.isActive;return(0,t.jsxs)("li",{className:o()("flex items-center space-x-2 transition duration-200 font-semibold px-3 py-2 cursor-pointer rounded-md",s?"bg-white/20":"hover:bg-white/20"),onClick:function(){return N(!1)},children:[(0,t.jsx)(e.icon,{className:"w-6 h-6"}),(0,t.jsx)("p",{children:e.title})]})}},e.href)})]})]}),(0,t.jsx)(f(),{href:"/",children:(0,t.jsx)("a",{className:"w-full",children:(0,t.jsxs)("li",{className:o()("flex items-center space-x-2 hover:bg-white/20 transition duration-200 font-semibold px-3 py-2 cursor-pointer rounded-md"),children:[(0,t.jsx)(p.TPb,{className:"w-6 h-6"}),(0,t.jsx)("p",{children:"Back to home page"})]})})})]})}),(0,t.jsxs)("div",{className:"w-full md:w-4/5 pt-16 pb-4 md:py-12",children:[s&&(0,t.jsx)(j.vHB,{className:"absolute top-4 left-4 w-8 h-8",onClick:function(){N(!m)}}),(0,t.jsx)("div",{className:"relative w-full h-full",children:n})]})]})};n.Z=N},1069:function(e,n,s){"use strict";s.d(n,{Z:function(){return i},s:function(){return c}});var t=s(4637),r=s(59496),a=r.createContext(null),i=function(e){var n=e.children,s=e.value;return(0,t.jsx)(a.Provider,{value:s,children:n})},c=function(){return r.useContext(a)}},91948:function(e,n,s){"use strict";var t=s(75533),r=s(9102),a=function(e,n){return(0,r.useQuery)(["media-details",{args:e}],function(){return(0,t.Ig)(e)},n)};n.Z=a},43274:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return M},default:function(){return E}});var t=s(4637),r=s(59496),a=s(83339),i=s(39377),c=s(51936),l=s(70169),o=s(5567),u=s(8342),d=s(45111),m=s(49192),f=s(1069),x=s(91948),h=s(57135),p=s(15767),j=s(76717),g=s(9102),v=function(e){var n=e.mediaId,s=e.sourceId,t=(0,g.useQueryClient)();return(0,g.useQuery)(["uploaded-chapters",{mediaId:n,sourceId:s}],(0,h.Z)(function(){var e,t,r;return(0,p.__generator)(this,function(r){switch(r.label){case 0:return[4,j.supabaseClient.from("kaguya_manga_source").select("\n            mediaId,\n            chapters:kaguya_chapters(\n                *,\n                image:kaguya_images(*)\n            )\n        ").eq("sourceId",s).eq("mediaId",n).single()];case 1:if(t=(e=r.sent()).data,e.error)return[2,[]];return[2,(null==t?void 0:t.chapters)||[]]}})}),{onSuccess:function(e){e.forEach(function(e){t.setQueryData(["uploaded-chapter",e.slug],e)})},refetchOnMount:!0})},b=s(80938),y=s(2204),N=s(21604),w=s.n(N),Z=s(10412),_=s(68893),k=s(72224),I=s(31505),C=function(e){var n,s=e.user,c=e.sourceId,N=e.mediaId,C=(0,x.Z)({type:b.DD.Manga,id:N}),M=C.data,E=C.isLoading,L=(0,g.useQueryClient)(),Q=(0,I.useRouter)().locale,S=(n="".concat(c,"-").concat(N),(0,g.useMutation)((0,h.Z)(function(){var e;return(0,p.__generator)(this,function(s){switch(s.label){case 0:return[4,j.supabaseClient.from("kaguya_manga_source").delete({returning:"minimal"}).match({sourceMediaId:n})];case 1:if(e=s.sent().error)throw Error(e.message);return[2]}})}),{onSuccess:function(){_.Am.success("Manga source deleted successfully")},onError:function(e){_.Am.error(e.message)}})),A=S.mutate;S.isLoading;var O=v({mediaId:N,sourceId:c}),T=O.data,P=O.isLoading,D=(0,r.useMemo)(function(){return P?[]:(0,y.rw)(T)},[P,T]),U=(0,r.useMemo)(function(){return(0,y.YQ)(M,Q)},[M,Q]),V=(0,r.useMemo)(function(){return(0,y.Eb)(M,Q)},[M,Q]),q=function(){A(null,{onSuccess:function(){L.invalidateQueries(["uploaded-chapters",{mediaId:N,sourceId:c},])}})};return(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(i.Z,{className:"pb-12",isVerified:s.isVerified,children:E||P?(0,t.jsx)(d.Z,{}):(0,t.jsx)(f.Z,{value:{sourceId:c,mediaId:N},children:(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsx)(a.Z,{media:M}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"w-full flex justify-end items-center gap-x-2 [&>*]:w-max mb-8",children:[(0,t.jsx)(w(),{href:"/upload/manga/".concat(N,"/chapters/create"),children:(0,t.jsx)("a",{children:(0,t.jsx)(o.Z,{LeftIcon:Z.zUF,primary:!0,children:"Chapter mới"})})}),(0,t.jsx)(k.Z,{mediaId:N,mediaType:b.DD.Manga,defaultDescription:V,defaultTitle:U})]}),(0,t.jsx)("div",{className:"space-y-2",children:D.map(function(e){return(0,t.jsx)(w(),{href:"/upload/manga/".concat(N,"/chapters/").concat(e.slug),children:(0,t.jsx)("a",{className:"block",children:(0,t.jsx)(l.Z,{className:"text-left p-3 w-full !bg-background-900 hover:!bg-white/20 rounded-md",children:e.name})})},e.slug)})})]})]})})}),!E&&(0,t.jsx)(m.Z,{className:"fixed bottom-0 py-3 flex justify-end gap-2 items-center bg-background-800 w-full md:w-4/5",children:(0,t.jsxs)(u.Z,{onConfirm:q,className:"space-y-4",confirmString:M.title.userPreferred,children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:"Are you sure delete?"}),(0,t.jsx)("p",{children:"Once deleted, you cannot restore it. This will delete absolutely any data related to this manga."})]})})]})},M=!0,E=C;C.getLayout=function(e){return(0,t.jsx)(c.Z,{children:e})}},32461:function(e,n,s){e.exports=s(12729)},66091:function(e,n,s){"use strict";function t(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}s.d(n,{Z:function(){return t}})}},function(e){e.O(0,[2580,3027,9786,7574,4119,3421,6052,7459,9774,2888,179],function(){return e(e.s=41223)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.