"use strict";(()=>{var e={};e.id=799,e.ids=[799],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},7561:e=>{e.exports=require("node:fs")},9411:e=>{e.exports=require("node:path")},9237:(e,t,n)=>{n.r(t),n.d(t,{originalPathname:()=>S,patchFetch:()=>g,requestAsyncStorage:()=>x,routeModule:()=>v,serverHooks:()=>j,staticGenerationAsyncStorage:()=>m});var r={};n.r(r),n.d(r,{GET:()=>y,dynamic:()=>f});var a=n(3277),i=n(5265),o=n(5356);let c=require("chokidar");var u=n.n(c),l=n(9411),s=n.n(l);let d=null,p=new Set;var h=n(1760);let f="force-dynamic";async function y(){var e;let t,n;e=(0,h.ZN)(),d||((d=u().watch(s().join(e,"**/*.{json,md,mmd}"),{ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:300,pollInterval:100}})).on("change",t=>{let n=s().relative(e,t).replace(/\\/g,"/");for(let e of p)e(n)}),d.on("add",t=>{let n=s().relative(e,t).replace(/\\/g,"/");for(let e of p)e(n)}));let r=new TextEncoder;return new Response(new ReadableStream({start(e){var a;e.enqueue(r.encode(": connected\n\n")),a=t=>{try{e.enqueue(r.encode(`data: ${JSON.stringify({file:t})}

`))}catch{}},p.add(a),t=()=>p.delete(a),n=setInterval(()=>{try{e.enqueue(r.encode(": ping\n\n"))}catch{}},3e4)},cancel(){n&&clearInterval(n),t&&t()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"}})}let v=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/watch/route",pathname:"/api/watch",filename:"route",bundlePath:"app/api/watch/route"},resolvedPagePath:"/home/dx/Work/hex/dashboard/app/api/watch/route.ts",nextConfigOutput:"",userland:r}),{requestAsyncStorage:x,staticGenerationAsyncStorage:m,serverHooks:j}=v,S="/api/watch/route";function g(){return(0,o.patchFetch)({serverHooks:j,staticGenerationAsyncStorage:m})}},1760:(e,t,n)=>{n.d(t,{J1:()=>h,V9:()=>f,ZN:()=>p,au:()=>s,gn:()=>u,ki:()=>d,ws:()=>l});var r=n(7561),a=n.n(r),i=n(9411),o=n.n(i);function c(){let e=process.env.HEX_PROJECT_DIR??process.env.SOLAUDIT_PROJECT_DIR??process.cwd();try{let t=o().join(e,".hex","config.json");if(a().existsSync(t))return o().join(e,".hex");let n=o().join(e,".solaudit","config.json");if(a().existsSync(n))return o().join(e,".solaudit")}catch{}return o().join(e,".hex")}function u(e){try{let t=o().join(c(),e),n=a().readFileSync(t,"utf-8");return JSON.parse(n)}catch{return null}}function l(e){try{let t=o().join(c(),e);return a().readFileSync(t,"utf-8")}catch{return null}}function s(e,t){let n=o().join(c(),e);a().writeFileSync(n,JSON.stringify(t,null,2),"utf-8")}function d(e){try{let t=o().join(c(),e);return a().existsSync(t)}catch{return!1}}function p(){return c()}function h(e){try{let t=o().join(c(),e);if(!a().existsSync(t))return[];return a().readdirSync(t,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name)}catch{return[]}}function f(e){try{let t=o().join(c(),e),n=a().readFileSync(t,"utf-8");return JSON.parse(n)}catch{return null}}},3277:(e,t,n)=>{e.exports=n(517)}};var t=require("../../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),r=t.X(0,[916],()=>n(9237));module.exports=r})();