|
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},23862,e=>e.a(async(t,r)=>{try{var a=await e.y("pg-587764f78a6c7a9c");e.n(a),r()}catch(e){r(e)}},!0),80998,e=>e.a(async(t,r)=>{try{var a=e.i(23862),n=t([a]);[a]=n.then?(await n)():n;let s=!!process.env.VERCEL||!!process.env.AWS_LAMBDA_FUNCTION_NAME||!!process.env.CF_PAGES,i=new a.Pool({connectionString:process.env.DATABASE_URL||"postgresql://forumlify:123456@localhost:5432/forumlify",...s?{max:1,idleTimeoutMillis:5e3,connectionTimeoutMillis:1e4,maxUses:7500}:{}}),o=s?i:globalThis.__forumlifyPool||i;e.s(["default",0,o]),r()}catch(e){r(e)}},!1),50278,e=>e.a(async(t,r)=>{try{var a=e.i(80998),n=e.i(95492),s=t([a]);async function i(e,{params:t}){let{username:r}=await t;if(!r)return Response.json({error:"缺少用户名"},{status:400});try{let t=await a.default.query("SELECT id, username, avatar_url, bio, role, signature, created_at FROM users WHERE username = $1",[r]);if(0===t.rows.length)return Response.json({error:"用户不存在"},{status:404});return(0,n.jsonWithEtag)(e,t.rows[0])}catch{return Response.json({error:"服务器错误"},{status:500})}}[a]=s.then?(await s)():s,e.s(["GET",0,i]),r()}catch(e){r(e)}},!1),25400,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),m=e.i(26937),x=e.i(10372),R=e.i(93695);e.i(52474);var v=e.i(220);let f=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/users/profile/[username]/route",pathname:"/api/users/profile/[username]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/users/profile/[username]/route.js",nextConfigOutput:"",userland:()=>e.r(50278),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:w,serverHooks:E}=f;async function y(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),f.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/users/profile/[username]/route";g=g.replace(/\/index$/,"")||"/";let w=await f.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:y,params:C,nextConfig:A,parsedUrl:T,isDraftMode:S,prerenderManifest:b,routerServerContext:_,isOnDemandRevalidate:P,revalidateOnlyGenerated:q,resolvedPathname:N,clientReferenceManifest:j,serverActionsManifest:O}=w,H=(0,o.normalizeAppPath)(g),M=!!(b.dynamicRoutes[H]||b.routes[N]),k=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,T,!1):t.end("This page could not be found"),null);if(M&&!S){let e=!!b.routes[N],t=b.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await k();throw new R.NoFallbackError}}let U=null;!M||f.isDev||S||(U="/index"===(U=N)?"/":U);let I=!0===f.isDev||!M,D=M&&!I;O&&j&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:j,serverActionsManifest:O});let F=e.method||"GET",L=(0,s.getTracer)(),$=L.getActiveScopeSpan(),B=!!(null==_?void 0:_.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),W=(0,n.getRequestMeta)(e,"incrementalCache")||await f.getIncrementalCache(e,A,b,K);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let G={params:C,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,supportsDynamicResponse:I,incrementalCache:W,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>f.onRequestError(e,t,a,n,_)},sharedContext:{buildId:E,deploymentId:y}},V=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:r})=>{try{if(!K&&P&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await f.handle(z,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let s=G.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let i=G.renderOpts.collectedTags;if(!M)return await (0,c.sendResponse)(V,X,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[x.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=x.INFINITE_CACHE?!1!==r&&r>0?A.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await f.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,_),t}},Z=async(n,i)=>{try{var o,l;let n=await f.handleResponse({req:e,nextConfig:A,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:q,responseGenerator:J,waitUntil:a.waitUntil,isMinimalMode:K});if(!M)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",P?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);K&&M||s.delete(x.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,m.getCacheControlHeader)(n.cacheControl)),await (0,c.sendResponse)(V,X,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await f.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,_),M)throw t;await (0,c.sendResponse)(V,X,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||H,o=`${F} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",a),i.updateName(o))})()}};if(B&&$)await Z($,void 0);else{let t=L.getActiveScopeSpan();await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Z(e,t)),void 0,!B)}}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:w})},"routeModule",0,f,"serverHooks",0,E,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,w])},95492,e=>{"use strict";async function t(e){let t=new TextEncoder().encode(e),r=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t)),e=>e.toString(16).padStart(2,"0")).join("");return`"${r}"`}async function r(e,a,n={}){let s=JSON.stringify(a),i=await t(s),o=new Headers(n.headers);return(o.set("Cache-Control","public, max-age=0, must-revalidate"),o.set("ETag",i),function(e,t){if(!e)return!1;let r=t.replace(/^W\//,"");return e.split(",").some(e=>{let t=e.trim();return"*"===t||t.replace(/^W\//,"")===r})}(e.headers.get("if-none-match"),i))?new Response(null,{status:304,headers:o}):(o.set("Content-Type","application/json; charset=utf-8"),new Response(s,{...n,headers:o}))}e.s(["jsonWithEtag",0,r])}];
|