module.exports=[918622,(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"))},556704,(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"))},832319,(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"))},193695,(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"))},340060,e=>{"use strict";e.s(["resolve",0,function(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}])},360931,e=>{"use strict";var t=e.i(616881),r=e.i(423705),a=e.i(259355),n=e.i(445367),i=e.i(536661),s=e.i(669355),o=e.i(716632),l=e.i(403966),d=e.i(991885),u=e.i(740322),c=e.i(209383),p=e.i(35916),v=e.i(300984),h=e.i(431820),f=e.i(91357),g=e.i(193695);e.i(605063);var R=e.i(539271),x=e.i(340060);async function w(e,{params:t}){let{featureId:r}=await t;try{let t=(0,x.resolve)("IInteractiveSessionService"),a=new TextEncoder,n=new ReadableStream({start(n){let i=!1;function s(e){if(!i)try{n.enqueue(a.encode(e))}catch{}}s(": connected\n\n");let o=setInterval(()=>{s(": heartbeat\n\n")},15e3),l=t.subscribeByFeature(r,e=>{e.message&&s(`event: message
data: ${JSON.stringify({message:e.message,featureId:r})}

`),e.sessionStatus&&s(`event: session_status
data: ${JSON.stringify({sessionStatus:e.sessionStatus,featureId:r})}

`),e.turnStatus&&s(`event: turn_status
data: ${JSON.stringify({turnStatus:e.turnStatus,featureId:r})}

`),e.interaction&&s(`event: interaction
data: ${JSON.stringify({interaction:e.interaction,featureId:r})}

`),e.activity&&s(`event: activity
data: ${JSON.stringify({activity:e.activity,featureId:r})}

`),e.log&&s(`event: log
data: ${JSON.stringify({log:e.log,featureId:r})}

`),e.delta&&s(`event: delta
data: ${JSON.stringify({delta:e.delta,featureId:r})}

`),e.done&&s(`event: done
data: ${JSON.stringify({done:!0,featureId:r})}

`),e.workflowStep&&s(`event: workflow_step
data: ${JSON.stringify({step:e.workflowStep,featureId:r})}

`)});e.signal.addEventListener("abort",function(){if(!i){i=!0,clearInterval(o),l();try{n.close()}catch{}}},{once:!0})}});return new Response(n,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(e){return console.error("[GET /api/interactive/chat/:featureId/stream]",e),new Response(JSON.stringify({error:String(e)}),{status:500,headers:{"Content-Type":"application/json"}})}}e.s(["GET",0,w,"dynamic",0,"force-dynamic"],237267);var y=e.i(237267);let m=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/interactive/chat/[featureId]/stream/route",pathname:"/api/interactive/chat/[featureId]/stream",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:E,workUnitAsyncStorage:C,serverHooks:S}=m;async function b(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),m.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/api/interactive/chat/[featureId]/stream/route";x=x.replace(/\/index$/,"")||"/";let w=await m.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,deploymentId:E,params:C,nextConfig:S,parsedUrl:b,isDraftMode:N,prerenderManifest:A,routerServerContext:O,isOnDemandRevalidate:T,revalidateOnlyGenerated:I,resolvedPathname:_,clientReferenceManifest:P,serverActionsManifest:k}=w,q=(0,o.normalizeAppPath)(x),$=!!(A.dynamicRoutes[q]||A.routes[_]),H=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,b,!1):t.end("This page could not be found"),null);if($&&!N){let e=!!A.routes[_],t=A.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await H();throw new g.NoFallbackError}}let j=null;!$||m.isDev||N||(j="/index"===(j=_)?"/":j);let U=!0===m.isDev||!$,M=$&&!U;k&&P&&(0,s.setManifestsSingleton)({page:x,clientReferenceManifest:P,serverActionsManifest:k});let D=e.method||"GET",J=(0,i.getTracer)(),F=J.getActiveScopeSpan(),K=!!(null==O?void 0:O.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await m.getIncrementalCache(e,S,A,B);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let G={params:C,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts},cacheComponents:!!S.cacheComponents,supportsDynamicResponse:U,incrementalCache:L,cacheLifeProfiles:S.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>m.onRequestError(e,t,a,n,O)},sharedContext:{buildId:y,deploymentId:E}},V=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest(V,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>m.handle(X,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=J.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void 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");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${D} ${x}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!B&&T&&I&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!$)return await (0,p.sendResponse)(V,W,i,G.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,v.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await m.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:T})},!1,O),t}},d=await m.handleResponse({req:e,nextConfig:S,cacheKey:j,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:I,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:B});if(!$)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",T?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,v.fromNodeOutgoingHttpHeaders)(d.value.headers);return B&&$||u.delete(f.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(V,W,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};K&&F?await o(F):(n=J.getActiveScopeSpan(),await J.withPropagatedContext(e.headers,()=>J.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${x}`,kind:i.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof g.NoFallbackError||await m.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:T})},!1,O),$)throw t;return await (0,p.sendResponse)(V,W,new Response(null,{status:500})),null}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:C})},"routeModule",0,m,"serverHooks",0,S,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,C],360931)}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0jxnyf.._.js.map