"use strict";(()=>{var e={};e.id=6717,e.ids=[6717],e.modules={53524:e=>{e.exports=require("@prisma/client")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},15885:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>x,patchFetch:()=>$,requestAsyncStorage:()=>h,routeModule:()=>v,serverHooks:()=>w,staticGenerationAsyncStorage:()=>A});var a={};r.r(a),r.d(a,{default:()=>m});var n={};r.r(n),r.d(n,{GET:()=>g});var i=r(49303),o=r(88716),s=r(60670),l=r(55661),u=r(53524);let p=globalThis.prisma??new u.PrismaClient({datasources:{db:{url:(()=>{if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.DB_USER||"root",t=process.env.DB_PASSWORD||"",r=process.env.DB_HOST||"127.0.0.1",a=process.env.DB_PORT||"3306",n=process.env.DB_NAME||"amanenime_topup";return`mysql://${e}:${t}@${r}:${a}/${n}`})()}},log:["error"]});async function m(){let e=process.env.NEXT_PUBLIC_APP_URL||"https://store.amanenime.my.id",t=["","/games","/pterodactyl","/smm","/login","/register"].map(t=>({url:`${e}${t}`,lastModified:new Date,changeFrequency:"daily",priority:""===t?1:.8})),r=[];try{r=(await p.gameCategory.findMany({where:{isActive:!0},select:{slug:!0,updatedAt:!0}})).map(t=>({url:`${e}/games/${t.slug}`,lastModified:t.updatedAt,changeFrequency:"weekly",priority:.9}))}catch(e){console.error("Sitemap Error (Games):",e)}let a=[];try{a=(await p.digitalProduct.findMany({where:{isActive:!0},select:{id:!0,updatedAt:!0}})).map(t=>({url:`${e}/digital/${t.id}`,lastModified:t.updatedAt,changeFrequency:"weekly",priority:.8}))}catch(e){console.error("Sitemap Error (Digital):",e)}return[...t,...r,...a]}var c=r(60707);let d={...a},f=d.default,y=d.generateSitemaps;if("function"!=typeof f)throw Error('Default export is missing in "C:\\Users\\akmal\\OneDrive\\Documents\\AmaneNime Topup\\amanenime-topup\\app\\sitemap.ts"');async function g(e,t){let r;let{__metadata_id__:a,...n}=t.params||{},i=y?await y():null;if(i&&null==(r=i.find(e=>{let t=e.id.toString();return(t+=".xml")===a})?.id))return new l.NextResponse("Not Found",{status:404});let o=await f({id:r}),s=(0,c.resolveRouteData)(o,"sitemap");return new l.NextResponse(s,{headers:{"Content-Type":"application/xml","Cache-Control":"public, max-age=0, must-revalidate"}})}let v=new i.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/sitemap.xml/route",pathname:"/sitemap.xml",filename:"sitemap",bundlePath:"app/sitemap.xml/route"},resolvedPagePath:"next-metadata-route-loader?page=%2Fsitemap.xml%2Froute&filePath=C%3A%5CUsers%5Cakmal%5COneDrive%5CDocuments%5CAmaneNime%20Topup%5Camanenime-topup%5Capp%5Csitemap.ts&isDynamic=1!?__next_metadata_route__",nextConfigOutput:"standalone",userland:n}),{requestAsyncStorage:h,staticGenerationAsyncStorage:A,serverHooks:w}=v,x="/sitemap.xml/route";function $(){return(0,s.patchFetch)({serverHooks:w,staticGenerationAsyncStorage:A})}},60707:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{resolveManifest:function(){return o},resolveRobots:function(){return n},resolveRouteData:function(){return s},resolveSitemap:function(){return i}});let a=r(91389);function n(e){let t="";for(let r of Array.isArray(e.rules)?e.rules:[e.rules]){for(let e of(0,a.resolveArray)(r.userAgent||["*"]))t+=`User-Agent: ${e}
`;if(r.allow)for(let e of(0,a.resolveArray)(r.allow))t+=`Allow: ${e}
`;if(r.disallow)for(let e of(0,a.resolveArray)(r.disallow))t+=`Disallow: ${e}
`;r.crawlDelay&&(t+=`Crawl-delay: ${r.crawlDelay}
`),t+="\n"}return e.host&&(t+=`Host: ${e.host}
`),e.sitemap&&(0,a.resolveArray)(e.sitemap).forEach(e=>{t+=`Sitemap: ${e}
`}),t}function i(e){let t=e.some(e=>Object.keys(e.alternates??{}).length>0),r="";for(let n of(r+='<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"',t?r+=' xmlns:xhtml="http://www.w3.org/1999/xhtml">\n':r+=">\n",e)){var a;r+=`<url>
<loc>${n.url}</loc>
`;let e=null==(a=n.alternates)?void 0:a.languages;if(e&&Object.keys(e).length)for(let t in e)r+=`<xhtml:link rel="alternate" hreflang="${t}" href="${e[t]}" />
`;if(n.lastModified){let e=n.lastModified instanceof Date?n.lastModified.toISOString():n.lastModified;r+=`<lastmod>${e}</lastmod>
`}n.changeFrequency&&(r+=`<changefreq>${n.changeFrequency}</changefreq>
`),"number"==typeof n.priority&&(r+=`<priority>${n.priority}</priority>
`),r+="</url>\n"}return r+"</urlset>\n"}function o(e){return JSON.stringify(e)}function s(e,t){return"robots"===t?n(e):"sitemap"===t?i(e):"manifest"===t?o(e):""}},91389:(e,t)=>{function r(e){return Array.isArray(e)?e:[e]}function a(e){if(null!=e)return r(e)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{resolveArray:function(){return r},resolveAsArrayOrUndefined:function(){return a}})}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8948,2518],()=>r(15885));module.exports=a})();