diffhub 0.1.17 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/.next/standalone/apps/cli/.next/BUILD_ID +1 -1
  2. package/.next/standalone/apps/cli/.next/build-manifest.json +3 -3
  3. package/.next/standalone/apps/cli/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/apps/cli/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/apps/cli/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/apps/cli/.next/server/app/_not-found.html +1 -1
  12. package/.next/standalone/apps/cli/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  14. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  15. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  16. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  18. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  19. package/.next/standalone/apps/cli/.next/server/app/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/apps/cli/.next/server/chunks/_0~2y9d0._.js +1 -1
  21. package/.next/standalone/apps/cli/.next/server/chunks/ssr/_07okxca._.js +3 -3
  22. package/.next/standalone/apps/cli/.next/server/middleware-build-manifest.js +3 -3
  23. package/.next/standalone/apps/cli/.next/server/pages/404.html +1 -1
  24. package/.next/standalone/apps/cli/.next/server/pages/500.html +1 -1
  25. package/.next/standalone/apps/cli/.next/server/server-reference-manifest.js +1 -1
  26. package/.next/standalone/apps/cli/.next/server/server-reference-manifest.json +1 -1
  27. package/.next/standalone/apps/cli/.next/static/chunks/{0qozxk3in_yip.js → 0bpt0-jke.pzj.js} +5 -5
  28. package/.next/standalone/apps/cli/package.json +1 -1
  29. package/package.json +1 -1
  30. /package/.next/standalone/apps/cli/.next/static/{8rORhRJDOFN7qtGNAmPym → X3k3ryHO5ngxx_6ANrAAl}/_buildManifest.js +0 -0
  31. /package/.next/standalone/apps/cli/.next/static/{8rORhRJDOFN7qtGNAmPym → X3k3ryHO5ngxx_6ANrAAl}/_clientMiddlewareManifest.js +0 -0
  32. /package/.next/standalone/apps/cli/.next/static/{8rORhRJDOFN7qtGNAmPym → X3k3ryHO5ngxx_6ANrAAl}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[37515,e=>e.a(async(t,r)=>{try{var a=e.i(2157),n=e.i(50227),i=e.i(77777),o=e.i(98355),s=e.i(34922),l=e.i(23318),u=e.i(57405),c=e.i(16781),d=t([o]);[o]=d.then?(await d)():d;let p=()=>null,h=new Set,f=null,g=[],w=null,R=null,v=!1,m=0,y=0,E=["split","stacked"],C=["dark","light"],A=async()=>{if((0,l.isCmuxRuntime)())try{let e=await (0,l.getMultiFileDiff)(),t=new Map(e.files.map(e=>[e.file,e])),r=[];for(let[a,n]of Object.entries(e.patchByFile)){let i=t.get(a);if(!i||(0,s.isLargeDiffFile)(i,Buffer.byteLength(n)))continue;let o=e.reviewKeyByFile[a];if(o)for(let e of E)for(let t of C)r.push({layout:e,patch:n,reviewKey:o,theme:t})}let a=0,n=async()=>{for(;a<r.length;){let e=a;a+=1;let t=r[e];if(!t)return;try{await (0,o.getOrPrerenderByReviewKey)(t.reviewKey,t.patch,t.layout,t.theme)}catch{}}},i=Math.min(4,r.length);await Promise.all(Array.from({length:i},()=>n()))}catch{}},T=async()=>{if(R){v=!0,await R;return}R=(async()=>{try{await (0,l.primeGitSnapshots)(),await A()}finally{R=null}})(),await R,v&&(v=!1,await T())},x=e=>{let t=(0,u.getGitDirectory)(e),r=[e].filter(a.existsSync),i="darwin"===process.platform||"win32"===process.platform,o=[],s=(t,r)=>{let a=r?(0,n.join)(t,r.toString()):t;if(!((e,t)=>{let r=(0,n.relative)(t,e).split(n.sep).join("/");if(!r||r.startsWith(".."))return!1;for(let e of[".next",".turbo","node_modules"])if(r===e||r.startsWith(`${e}/`))return!0;return!(!(".git"===r||r.startsWith(".git/"))||".git/HEAD"===r||".git/index"===r||".git/packed-refs"===r||".git/refs"===r||r.startsWith(".git/refs/"))})(a,e)){let e;e=f,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?(0,l.clearGitMemoryCache)(e??void 0):(0,l.invalidateGitCache)(e??void 0),w&&clearTimeout(w),w=setTimeout(()=>{w=null,(async()=>{try{"1"!==process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER&&await T()}catch(e){console.error("[diffhub] snapshot prime failed",{error:e})}finally{for(let e of(m+=1,y=Date.now(),h))e()}})()},150)}},c=(t,r)=>{console.error("[diffhub] file watcher error",r);let a=o.indexOf(t);-1!==a&&o.splice(a,1),0===o.length&&setTimeout(()=>{f===e&&0===g.length&&(console.log("[diffhub] attempting watcher recovery"),g=x(e))},5e3)};for(let e of r){let t=(0,a.watch)(e,{persistent:!0,recursive:i},(t,r)=>{s(e,r)});t.on("error",e=>c(t,e)),o.push(t)}{let e=[(0,n.join)(t,"HEAD"),(0,n.join)(t,"index"),(0,n.join)(t,"packed-refs")],r=[(0,n.join)(t,"refs","heads"),(0,n.join)(t,"refs","tags"),(0,n.join)(t,"refs","remotes")];for(let t of[...e,...r]){if(!(0,a.existsSync)(t))continue;let e=(0,a.watch)(t,{persistent:!0},(e,r)=>{s(t,r)});e.on("error",t=>c(e,t)),o.push(e)}}return o};e.s(["ensureFileWatch",0,()=>{let e=(0,c.getConfiguredRepoPath)();if(g.length>0&&f===e)return;let t=f;f=e,(()=>{if(w&&(clearTimeout(w),w=null),0===g.length)return;let e=g;for(let t of(g=[],e))t.close()})(),(t!==e||0===g.length)&&(g=x(e))},"getFileWatchSnapshot",0,()=>({changedAt:y,revision:m}),"waitForFileWatch",0,(e,t)=>{var r;let{promise:a,resolve:n}=(0,i.createDeferred)(),o=!1,s=null,l=p;if(e.aborted)return n("timeout"),a;let u=p,c=t=>{o||(o=!0,s&&(clearTimeout(s),s=null),l(),e.removeEventListener("abort",u),n(t))};return u=()=>{c("timeout")},e.addEventListener("abort",u,{once:!0}),r=()=>{c("change")},h.add(r),l=()=>{h.delete(r)},s=setTimeout(()=>{c("timeout")},t),a}]),r()}catch(e){r(e)}},!1),57106,e=>e.a(async(t,r)=>{try{var a=e.i(37515),n=t([a]);[a]=n.then?(await n)():n;let i=async e=>{if("1"===process.env.DIFFHUB_DISABLE_WATCH)return Response.json({error:"File watch disabled"},{status:503});try{await (0,a.ensureFileWatch)()}catch(e){return Response.json({error:String(e)},{status:500})}let t=(0,a.getFileWatchSnapshot)(),r=new URL(e.url).searchParams.get("revision"),n=null===r?null:Number.parseInt(r,10);if(!(null!==n&&Number.isFinite(n)&&n===t.revision))return Response.json({...t,changed:!1,ok:!0});let i=await (0,a.waitForFileWatch)(e.signal,25e3);return Response.json({...(0,a.getFileWatchSnapshot)(),changed:"change"===i,ok:!0})};e.s(["GET",0,i,"dynamic",0,"force-dynamic","runtime",0,"nodejs"]),r()}catch(e){r(e)}},!1),14916,e=>e.a(async(t,r)=>{try{var a=e.i(47909),n=e.i(74017),i=e.i(96250),o=e.i(59756),s=e.i(61916),l=e.i(74677),u=e.i(69741),c=e.i(16795),d=e.i(87718),p=e.i(95169),h=e.i(47587),f=e.i(66012),g=e.i(70101),w=e.i(26937),R=e.i(10372),v=e.i(93695);e.i(20232);var m=e.i(220),y=e.i(57106),E=t([y]);[y]=E.then?(await E)():E;let A=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/watch/route",pathname:"/api/watch",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/watch/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:x,serverHooks:S}=A;async function C(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),A.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/watch/route";a=a.replace(/\/index$/,"")||"/";let i=await A.prepare(e,t,{srcPage:a,multiZoneDraftMode:!1});if(!i)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:y,params:E,nextConfig:C,parsedUrl:T,isDraftMode:x,prerenderManifest:S,routerServerContext:b,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,resolvedPathname:P,clientReferenceManifest:F,serverActionsManifest:O}=i,H=(0,u.normalizeAppPath)(a),D=!!(S.dynamicRoutes[H]||S.routes[P]),I=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,T,!1):t.end("This page could not be found"),null);if(D&&!x){let e=!!S.routes[P],t=S.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await I();throw new v.NoFallbackError}}let j=null;!D||A.isDev||x||(j=P,j="/index"===j?"/":j);let U=!0===A.isDev||!D,k=D&&!U;O&&F&&(0,l.setManifestsSingleton)({page:a,clientReferenceManifest:F,serverActionsManifest:O});let M=e.method||"GET",q=(0,s.getTracer)(),W=q.getActiveScopeSpan(),B=!!(null==b?void 0:b.isWrappedByNextServer),L=!!(0,o.getRequestMeta)(e,"minimalMode"),K=(0,o.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,C,S,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let $={params:E,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:K,cacheLifeProfiles:C.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>A.onRequestError(e,t,a,n,b)},sharedContext:{buildId:y}},G=new c.NodeNextRequest(e),X=new c.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let i,o=async e=>A.handle(V,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.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 n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${M} ${a}`)}),l=async i=>{var s,l;let u=async({previousCacheEntry:n})=>{try{if(!L&&N&&_&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=$.renderOpts.fetchMetrics;let s=$.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=$.renderOpts.collectedTags;if(!D)return await (0,f.sendResponse)(G,X,a,$.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,g.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[R.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,n=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==n?void 0:n.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:a,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,b),t}},c=await A.handleResponse({req:e,nextConfig:C,cacheKey:j,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:L});if(!D)return null;if((null==c||null==(s=c.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",N?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),x&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,g.fromNodeOutgoingHttpHeaders)(c.value.headers);return L&&D||d.delete(R.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,w.getCacheControlHeader)(c.cacheControl)),await (0,f.sendResponse)(G,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&W?await l(W):(i=q.getActiveScopeSpan(),await q.withPropagatedContext(e.headers,()=>q.trace(p.BaseServerSpan.handleRequest,{spanName:`${M} ${a}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l),void 0,!B))}catch(t){if(t instanceof v.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,b),D)throw t;return await (0,f.sendResponse)(G,X,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:x})},"routeModule",0,A,"serverHooks",0,S,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,x]),r()}catch(e){r(e)}},!1)];
1
+ module.exports=[37515,e=>e.a(async(t,r)=>{try{var a=e.i(2157),n=e.i(50227),i=e.i(77777),o=e.i(98355),s=e.i(34922),l=e.i(23318),u=e.i(57405),c=e.i(16781),d=t([o]);[o]=d.then?(await d)():d;let p=()=>null,h=new Set,f=null,g=[],w=null,R=null,v=!1,m=0,y=0,E=["split","stacked"],C=["dark","light"],A=async()=>{if((0,l.isCmuxRuntime)())try{let e=await (0,l.getMultiFileDiff)(),t=new Map(e.files.map(e=>[e.file,e])),r=[];for(let[a,n]of Object.entries(e.patchByFile)){let i=t.get(a);if(!i||(0,s.isLargeDiffFile)(i,Buffer.byteLength(n)))continue;let o=e.reviewKeyByFile[a];if(o)for(let e of E)for(let t of C)r.push({layout:e,patch:n,reviewKey:o,theme:t})}let a=0,n=async()=>{for(;a<r.length;){let e=a;a+=1;let t=r[e];if(!t)return;try{await (0,o.getOrPrerenderByReviewKey)(t.reviewKey,t.patch,t.layout,t.theme)}catch{}}},i=Math.min(4,r.length);await Promise.all(Array.from({length:i},()=>n()))}catch{}},T=async()=>{if(R){v=!0,await R;return}R=(async()=>{try{await (0,l.primeGitSnapshots)(),await A()}finally{R=null}})(),await R,v&&(v=!1,await T())},x=e=>{let t=(0,u.getGitDirectory)(e),r=[e].filter(a.existsSync),i="darwin"===process.platform||"win32"===process.platform,o=[],s=(t,r)=>{let a=r?(0,n.join)(t,r.toString()):t;if(!((e,t)=>{let r=(0,n.relative)(t,e).split(n.sep).join("/");if(!r||r.startsWith(".."))return!1;for(let e of[".next",".turbo","node_modules"])if(r===e||r.startsWith(`${e}/`))return!0;return!(!(".git"===r||r.startsWith(".git/"))||".git/HEAD"===r||".git/index"===r||".git/packed-refs"===r||".git/refs"===r||r.startsWith(".git/refs/"))})(a,e)){let e;e=f,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?(0,l.clearGitMemoryCache)(e??void 0):(0,l.invalidateGitCache)(e??void 0),w&&clearTimeout(w),w=setTimeout(()=>{w=null,(async()=>{try{"1"!==process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER&&await T()}catch(e){console.error("[diffhub] snapshot prime failed",{error:e})}finally{for(let e of(m+=1,y=Date.now(),h))e()}})()},150)}},c=(t,r)=>{console.error("[diffhub] file watcher error",r);let a=o.indexOf(t);-1!==a&&o.splice(a,1),0===o.length&&setTimeout(()=>{f===e&&0===g.length&&(console.log("[diffhub] attempting watcher recovery"),g=x(e))},5e3)};for(let e of r){let t=(0,a.watch)(e,{persistent:!0,recursive:i},(t,r)=>{s(e,r)});t.on("error",e=>c(t,e)),o.push(t)}{let e=[(0,n.join)(t,"HEAD"),(0,n.join)(t,"index"),(0,n.join)(t,"packed-refs")],r=[(0,n.join)(t,"refs","heads"),(0,n.join)(t,"refs","tags"),(0,n.join)(t,"refs","remotes")];for(let t of[...e,...r]){if(!(0,a.existsSync)(t))continue;let e=(0,a.watch)(t,{persistent:!0},(e,r)=>{s(t,r)});e.on("error",t=>c(e,t)),o.push(e)}}return o};e.s(["ensureFileWatch",0,()=>{let e=(0,c.getConfiguredRepoPath)();if(g.length>0&&f===e)return;let t=f;f=e,(()=>{if(w&&(clearTimeout(w),w=null),0===g.length)return;let e=g;for(let t of(g=[],e))t.close()})(),(t!==e||0===g.length)&&(g=x(e))},"getFileWatchSnapshot",0,()=>({changedAt:y,revision:m}),"waitForFileWatch",0,(e,t)=>{var r;let{promise:a,resolve:n}=(0,i.createDeferred)(),o=!1,s=null,l=p;if(e.aborted)return n("timeout"),a;let u=p,c=t=>{o||(o=!0,s&&(clearTimeout(s),s=null),l(),e.removeEventListener("abort",u),n(t))};return u=()=>{c("timeout")},e.addEventListener("abort",u,{once:!0}),r=()=>{c("change")},h.add(r),l=()=>{h.delete(r)},s=setTimeout(()=>{c("timeout")},t),a}]),r()}catch(e){r(e)}},!1),57106,e=>e.a(async(t,r)=>{try{var a=e.i(37515),n=t([a]);[a]=n.then?(await n)():n;let i=async e=>{if("1"===process.env.DIFFHUB_DISABLE_WATCH)return Response.json({error:"File watch disabled"},{status:503});try{await (0,a.ensureFileWatch)()}catch(e){return Response.json({error:String(e)},{status:500})}let t=(0,a.getFileWatchSnapshot)(),r=new URL(e.url).searchParams.get("revision"),n=null===r?null:Number.parseInt(r,10);if(!(null!==n&&Number.isFinite(n)&&n===t.revision))return Response.json({...t,changed:null!==n&&Number.isFinite(n)&&n!==t.revision,ok:!0});let i=await (0,a.waitForFileWatch)(e.signal,25e3);return Response.json({...(0,a.getFileWatchSnapshot)(),changed:"change"===i,ok:!0})};e.s(["GET",0,i,"dynamic",0,"force-dynamic","runtime",0,"nodejs"]),r()}catch(e){r(e)}},!1),14916,e=>e.a(async(t,r)=>{try{var a=e.i(47909),n=e.i(74017),i=e.i(96250),o=e.i(59756),s=e.i(61916),l=e.i(74677),u=e.i(69741),c=e.i(16795),d=e.i(87718),p=e.i(95169),h=e.i(47587),f=e.i(66012),g=e.i(70101),w=e.i(26937),R=e.i(10372),v=e.i(93695);e.i(20232);var m=e.i(220),y=e.i(57106),E=t([y]);[y]=E.then?(await E)():E;let A=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/watch/route",pathname:"/api/watch",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/watch/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:x,serverHooks:b}=A;async function C(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),A.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/watch/route";a=a.replace(/\/index$/,"")||"/";let i=await A.prepare(e,t,{srcPage:a,multiZoneDraftMode:!1});if(!i)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:y,params:E,nextConfig:C,parsedUrl:T,isDraftMode:x,prerenderManifest:b,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,resolvedPathname:F,clientReferenceManifest:P,serverActionsManifest:O}=i,H=(0,u.normalizeAppPath)(a),D=!!(b.dynamicRoutes[H]||b.routes[F]),I=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,T,!1):t.end("This page could not be found"),null);if(D&&!x){let e=!!b.routes[F],t=b.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await I();throw new v.NoFallbackError}}let j=null;!D||A.isDev||x||(j=F,j="/index"===j?"/":j);let U=!0===A.isDev||!D,k=D&&!U;O&&P&&(0,l.setManifestsSingleton)({page:a,clientReferenceManifest:P,serverActionsManifest:O});let M=e.method||"GET",q=(0,s.getTracer)(),W=q.getActiveScopeSpan(),B=!!(null==S?void 0:S.isWrappedByNextServer),L=!!(0,o.getRequestMeta)(e,"minimalMode"),K=(0,o.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,C,b,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let $={params:E,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:K,cacheLifeProfiles:C.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>A.onRequestError(e,t,a,n,S)},sharedContext:{buildId:y}},G=new c.NodeNextRequest(e),X=new c.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let i,o=async e=>A.handle(V,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.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 n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${M} ${a}`)}),l=async i=>{var s,l;let u=async({previousCacheEntry:n})=>{try{if(!L&&N&&_&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=$.renderOpts.fetchMetrics;let s=$.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=$.renderOpts.collectedTags;if(!D)return await (0,f.sendResponse)(G,X,a,$.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,g.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[R.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,n=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==n?void 0:n.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:a,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,S),t}},c=await A.handleResponse({req:e,nextConfig:C,cacheKey:j,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:L});if(!D)return null;if((null==c||null==(s=c.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",N?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),x&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,g.fromNodeOutgoingHttpHeaders)(c.value.headers);return L&&D||d.delete(R.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,w.getCacheControlHeader)(c.cacheControl)),await (0,f.sendResponse)(G,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&W?await l(W):(i=q.getActiveScopeSpan(),await q.withPropagatedContext(e.headers,()=>q.trace(p.BaseServerSpan.handleRequest,{spanName:`${M} ${a}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l),void 0,!B))}catch(t){if(t instanceof v.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,S),D)throw t;return await (0,f.sendResponse)(G,X,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:x})},"routeModule",0,A,"serverHooks",0,b,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,x]),r()}catch(e){r(e)}},!1)];
2
2
 
3
3
  //# sourceMappingURL=_0~2y9d0._.js.map
@@ -13,7 +13,7 @@ module.exports=[47349,(a,b,c)=>{"use strict";var d=a.r(72131);d.useState,d.useEf
13
13
 
14
14
  Please address the following:
15
15
 
16
- ${b.join("\n")}`})(f);await navigator.clipboard.writeText(a),F.current&&clearTimeout(F.current),m(!0),F.current=setTimeout(()=>m(!1),2e3)}catch{}};k=()=>A(!1),(0,q.useEffect)(()=>{if(!z)return;let a=a=>{C.current&&!C.current.contains(a.target)&&k()};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[C,k,z]);let{className:J,label:K}="connecting"===d?{className:"bg-muted-foreground/50",label:"Connecting"}:"live"===d?{className:"bg-diff-green",label:"Live"}:{className:"bg-amber-500",label:"Polling"};return(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)("header",{className:"flex h-[52px] items-center gap-2 border-b border-border bg-card px-4 text-sm",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(gJ,{className:"-ml-1"})}),(0,o.jsxs)(gE,{side:"bottom",className:"flex items-center gap-2",children:[(0,o.jsx)("span",{children:"Toggle sidebar"}),(0,o.jsx)(a7,{children:"⌘B"})]})]}),(0,o.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:()=>H(a,"branch"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-secondary"}),children:[(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("transition-opacity duration-150","branch"===n?"opacity-0":"opacity-100"),children:gP(a)}),(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150","branch"===n?"opacity-100":"opacity-0"),children:(0,o.jsx)(s,{size:14})})]}),(0,o.jsx)(gE,{side:"bottom",children:"branch"===n?"Copied!":"Click to copy"})]}),(0,o.jsx)(y,{size:12,className:"text-muted-foreground/50 shrink-0"}),(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:()=>H(b,"base"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-secondary"}),children:[(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("transition-opacity duration-150","base"===n?"opacity-0":"opacity-100"),children:gP(b)}),(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150","base"===n?"opacity-100":"opacity-0"),children:(0,o.jsx)(s,{size:14})})]}),(0,o.jsx)(gE,{side:"bottom",children:"base"===n?"Copied!":"Click to copy"})]})]}),(0,o.jsx)("div",{className:"flex-1"}),(0,o.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("div",{className:"flex items-center pr-1.5"}),children:(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("mx-1 size-1.5 rounded-full",J,c&&"animate-pulse")})}),(0,o.jsx)(gE,{side:"bottom",children:K})]}),(0,o.jsx)(gQ,{syncNotice:e}),(0,o.jsxs)("div",{className:"relative",ref:C,children:[(0,o.jsxs)(a6,{variant:"ghost",size:"xs",onClick:()=>A(a=>!a),className:"text-muted-foreground hover:text-foreground hover:bg-secondary gap-1",children:["uncommitted"===g?"Uncommitted":"All",(0,o.jsx)(t,{size:10,className:((...a)=>a3(T(a)))("transition-transform duration-150",z&&"rotate-180")})]}),z&&(0,o.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[200px] rounded-lg border border-border bg-card shadow-lg dark:shadow-none py-1 overflow-hidden",children:gO.map(({value:a,label:b})=>(0,o.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-sm text-left hover:bg-secondary/50 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",onClick:()=>{h(a),A(!1)},children:[(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("text-foreground",g===a&&"font-medium"),children:b}),g===a&&(0,o.jsx)(s,{size:14,className:"text-diff-green shrink-0"})]},a))})]}),f.length>0&&(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"xs",onClick:I,className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:[l?(0,o.jsx)(s,{"data-icon":"inline-start"}):(0,o.jsx)(u,{"data-icon":"inline-start"}),l?"Copied!":`Copy ${f.length} comment${1===f.length?"":"s"}`]}),(0,o.jsx)(gE,{side:"bottom",children:"Copy all comments as AI prompt"})]}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:()=>j("split"===i?"stacked":"split"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:(0,o.jsx)(x,{size:14})}),(0,o.jsx)(gE,{side:"bottom",children:"split"===i?"Switch to unified view (S)":"Switch to split view (S)"})]}),B&&(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:()=>E("dark"===D?"light":"dark"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:"dark"===D?(0,o.jsx)(v,{size:14}):(0,o.jsx)(w,{size:14})}),(0,o.jsx)(gE,{side:"bottom",children:"dark"===D?"Switch to light mode":"Switch to dark mode"})]})]})]})})},gT=r("BubbleDotsIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,d:"M4.002 7c0-1.6568 1.3431-3 3-3h9.9999c1.6569 0 3.0001 1.3431 3.0001 3v8.0358c0 1.6568-1.3432 3-3 3h-1.6263a1 1 0 0 0-.638.2299l-2.74 2.2701-2.7037-2.2664a1 1 0 0 0-.6424-.2336H7.0019c-1.6568 0-3-1.3432-3-3z"}),q.createElement("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:.75,d:"M6.875 11.25a.875.875 0 1 0 1.75 0 .875.875 0 0 0-1.75 0Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Z"})))),gU=r("Folder1Icon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v9c0 1.6569 1.3431 3 3 3h12c1.6569 0 3-1.3431 3-3v-6c0-1.6569-1.3431-3-3-3h-4.9296a2 2 0 0 1-1.6641-.8906l-.8126-1.2188A2 2 0 0 0 8.9297 4H6C4.3431 4 3 5.3431 3 7"})))),gV=r("FolderOpenFilledIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 3C3.7909 3 2 4.7909 2 7v10.5592C2 18.9072 3.0928 20 4.4408 20H18.045a3.0002 3.0002 0 0 0 2.8487-2.1052l1.6557-5.2983c.3657-1.1701-.3952-2.3574-1.5494-2.5647V9c0-1.6569-1.3431-3-3-3h-4.9296a1 1 0 0 1-.8321-.4453l-.5157-.7735A4 4 0 0 0 8.3945 3zm13 7V9c0-.5523-.4477-1-1-1h-4.9296a3 3 0 0 1-2.4962-1.3359l-.5157-.7735A2 2 0 0 0 8.3945 5H6c-1.1046 0-2 .8954-2 2v10.5592a.4407.4407 0 0 0 .8615.1315l1.7454-5.5855A3 3 0 0 1 9.4704 10z",clipRule:"evenodd"})))),gW=r("MagnifyingGlassIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m20 20-3.95-3.95M18 11c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7Z"})))),gX=({size:a=16,...b})=>(0,o.jsx)("svg",{viewBox:"0 0 16 16",width:a,height:a,fill:"currentColor","aria-hidden":"true",focusable:"false",...b,children:(0,o.jsx)("path",{d:"M1 1.75C1 .784 1.784 0 2.75 0h7.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073ZM8 3.25a.75.75 0 0 1 .75.75v1.5h1.5a.75.75 0 0 1 0 1.5h-1.5v1.5a.75.75 0 0 1-1.5 0V7h-1.5a.75.75 0 0 1 0-1.5h1.5V4A.75.75 0 0 1 8 3.25Zm-3 8a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"})}),gY=({size:a=16,...b})=>(0,o.jsx)("svg",{viewBox:"0 0 16 16",width:a,height:a,fill:"currentColor","aria-hidden":"true",focusable:"false",...b,children:(0,o.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.48 3.758a.75.75 0 0 1 .755.745l.01 1.497h1.497a.75.75 0 0 1 0 1.5H9v1.507a.75.75 0 0 1-1.5 0V9.005l-1.502.01a.75.75 0 0 1-.01-1.5l1.507-.01-.01-1.492a.75.75 0 0 1 .745-.755Z"})}),gZ=({size:a=16,...b})=>(0,o.jsx)("svg",{viewBox:"0 0 16 16",width:a,height:a,fill:"currentColor","aria-hidden":"true",focusable:"false",...b,children:(0,o.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.5 6h2.242a.75.75 0 0 1 0 1.5h-2.24l-2.254.015a.75.75 0 0 1-.01-1.5Z"})}),g$="diffhub:file-tree:expand-all",g_="diffhub:file-tree:collapse-all",g0=a=>a.map(a=>{if("file"===a.type)return a;let b=g0(a.children);if(1===b.length&&"folder"===b[0].type){let c=b[0];return{...c,name:`${a.name}/${c.name}`}}return{...a,children:b}}),g1=(a,b=[])=>{for(let c of a)"folder"===c.type&&(b.push(c.path),g1(c.children,b));return b},g2=(0,q.memo)(function({node:a,depth:b,isSelected:c,commentCount:d,onNavigate:e}){let{insertions:f,deletions:g}=a.fileStat,h=gX;f>0&&0===g?h=gY:g>0&&0===f&&(h=gZ);let i="shrink-0 text-sidebar-foreground/40";return f>0&&0===g?i="shrink-0 text-diff-green":g>0&&0===f&&(i="shrink-0 text-destructive"),(0,o.jsxs)("button",{type:"button","aria-current":c?"true":void 0,className:((...a)=>a3(T(a)))("flex w-full cursor-pointer items-center gap-1.5 py-1 text-left transition-colors",c?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),"data-file-path":a.path,"data-selected":c?"true":void 0,style:{containIntrinsicBlockSize:"26px",contentVisibility:"auto",paddingLeft:16*b+8,paddingRight:8},onClick:()=>e(a.path),children:[(0,o.jsx)(h,{size:16,className:i}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("span",{className:"flex-1 truncate text-[12px] leading-tight text-muted-foreground"}),children:a.name}),(0,o.jsx)(gE,{side:"right",children:a.path})]}),d>0&&(0,o.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-sidebar-foreground/50",children:[(0,o.jsx)(gT,{size:10}),d]})]})}),g3=(0,q.memo)(function({node:a,depth:b,isCollapsed:c,onToggle:d,children:e}){let f=16*b+8,g=a4(a.name),h=g.split("/");return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{type:"button","aria-expanded":!c,className:"flex w-full items-center gap-1.5 py-1 text-left transition-colors hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",style:{paddingLeft:f,paddingRight:8},onClick:()=>d(a.path),children:[c?(0,o.jsx)(gU,{size:16,className:"shrink-0 text-sidebar-foreground/50"}):(0,o.jsx)(gV,{size:16,className:"shrink-0 text-sidebar-foreground/50"}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("span",{className:"truncate text-[12px] text-muted-foreground"}),children:h.map((a,b)=>{let c=h.slice(0,b+1).join("/");return(0,o.jsxs)(q.Fragment,{children:[a,b<h.length-1&&(0,o.jsx)("span",{className:"text-sidebar-foreground/30",children:"/"})]},c)})}),a.name!==g&&(0,o.jsx)(gE,{side:"right",children:a.name})]})]}),!c&&(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)("div",{className:"pointer-events-none absolute inset-y-0 border-l border-sidebar-border/60",style:{left:f+8}}),e]})]})}),g4=(0,q.memo)(function a({nodes:b,depth:c,selectedFile:d,commentsByFile:e,collapsedFolders:f,onToggleFolder:g,onNavigate:h}){return b.map(b=>"folder"===b.type?(0,o.jsx)(g3,{node:b,depth:c,isCollapsed:f.has(b.path),onToggle:g,children:(0,o.jsx)(a,{nodes:b.children,depth:c+1,selectedFile:d,commentsByFile:e,collapsedFolders:f,onToggleFolder:g,onNavigate:h})},b.path):(0,o.jsx)(g2,{node:b,depth:c,isSelected:d===b.path,commentCount:e.get(b.path)??0,onNavigate:h},b.path))}),g5=({files:a,selectedFile:b,onSelectFile:c,comments:d,filterQuery:e,onFilterChange:f,isLoading:g=!1,insertions:h,deletions:i,sidebarWidth:j,onSidebarWidthChange:k})=>{let[l,m]=(0,q.useState)(new Set),n=(0,q.useRef)(null);(0,q.useEffect)(()=>{let a=()=>{n.current=null,document.body.style.cursor="",document.body.style.userSelect=""},b=a=>{n.current&&k(Math.max(8,n.current.startWidth+a.clientX-n.current.startX))},c=()=>{n.current&&a()};return document.addEventListener("mousemove",b),document.addEventListener("mouseup",c),window.addEventListener("blur",c),()=>{a(),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",c),window.removeEventListener("blur",c)}},[k]);let p=(0,q.useCallback)(a=>{a.preventDefault(),n.current={startWidth:j,startX:a.clientX},document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[j]),r=(0,q.useMemo)(()=>e?a.filter(a=>a.file.toLowerCase().includes(e.toLowerCase())):a,[a,e]),s=(0,q.useMemo)(()=>g0((a=>{let b={files:[],folders:{}};for(let c of a){let a=c.file.split("/"),d=b;for(let b=0;b<a.length-1;b+=1){let c=a[b];d.folders[c]||(d.folders[c]={files:[],folders:{}}),d=d.folders[c]}d.files.push(c)}let c=(a,b,d)=>{let e=d?`${d}/${a}`:a,f=[];for(let[a,d]of Object.entries(b.folders).toSorted())f.push(c(a,d,e));for(let a of b.files){let b=a.file.split("/");f.push({fileStat:a,name:b.at(-1)??a.file,path:a.file,type:"file"})}return{children:f,name:a,path:e,type:"folder"}},d=[];for(let[a,e]of Object.entries(b.folders).toSorted())d.push(c(a,e,""));for(let a of b.files)d.push({fileStat:a,name:a.file,path:a.file,type:"file"});return d})(r)),[r]),t=(0,q.useMemo)(()=>g1(s),[s]);(0,q.useEffect)(()=>{let a=()=>{m(new Set)},b=()=>{m(new Set(t))};return window.addEventListener(g$,a),window.addEventListener(g_,b),()=>{window.removeEventListener(g$,a),window.removeEventListener(g_,b)}},[t]);let u=(0,q.useMemo)(()=>{let a=new Map;for(let b of d)a.set(b.file,(a.get(b.file)??0)+1);return a},[d]),v=(0,q.useCallback)(a=>{m(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),w=(0,q.useCallback)(a=>{let b=new CustomEvent("diffhub:file:navigate",{cancelable:!0,detail:{file:a,source:"sidebar"}});window.dispatchEvent(b)&&c(a,"auto")},[c]),x=null;return x=g?(0,o.jsx)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:(0,o.jsx)("p",{className:"animate-pulse text-xs text-sidebar-foreground/50",children:"Loading…"})}):0===r.length?(0,o.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[(0,o.jsx)("p",{className:"text-xs text-sidebar-foreground/50",children:"No changes"}),e&&(0,o.jsxs)("p",{className:"text-[10px] text-sidebar-foreground/30",children:["No files match “",e,"”"]})]}):(0,o.jsx)(g4,{nodes:s,depth:0,selectedFile:b,commentsByFile:u,collapsedFolders:l,onToggleFolder:v,onNavigate:w}),(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)(gI,{collapsible:"offcanvas",className:"overflow-hidden border-r border-sidebar-border",children:[(0,o.jsx)(gL,{className:"border-b border-sidebar-border h-[52px] flex-row items-center py-0 px-2",children:(0,o.jsxs)("div",{className:"relative flex w-full items-center",children:[(0,o.jsx)(gW,{size:12,className:"pointer-events-none absolute left-2.5 text-sidebar-foreground/40"}),(0,o.jsx)("input",{type:"text",value:e,onChange:a=>f(a.target.value),placeholder:"Filter files…","aria-label":"Filter files",className:"w-full rounded-md border border-sidebar-border bg-sidebar-accent py-1.5 pl-7 pr-7 text-xs text-sidebar-foreground placeholder:text-sidebar-foreground/40 transition-colors focus:border-sidebar-ring/50 focus:outline-none"}),e&&(0,o.jsx)("button",{type:"button",onClick:()=>f(""),"aria-label":"Clear filter",className:"absolute right-2 text-sm leading-none text-sidebar-foreground/40 transition-colors hover:text-sidebar-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",children:"×"})]})}),(0,o.jsx)(gN,{className:"gap-0 py-1",children:x}),(0,o.jsx)(gM,{className:"border-t border-sidebar-border px-3 py-2",children:(0,o.jsxs)("div",{className:"flex items-center gap-2 text-[12px] font-mono text-sidebar-foreground/60",children:[(0,o.jsxs)("span",{children:[a.length," ",1===a.length?"file":"files"]}),h>0&&(0,o.jsxs)("span",{className:"text-diff-green",children:["+",h]}),i>0&&(0,o.jsxs)("span",{className:"text-destructive",children:["−",i]})]})}),(0,o.jsx)("div",{"aria-hidden":!0,className:"absolute inset-y-0 right-0 z-20 w-[5px] cursor-col-resize after:absolute after:inset-y-0 after:left-1/2 after:-translate-x-1/2 after:w-px after:transition-colors hover:after:bg-sidebar-border",onMouseDown:p})]})})};var g6=a.i(19721),g7=q;let g8={dark:{addition:"#3fb950",deletion:"#f85149"},light:{addition:"#1a7f37",deletion:"#d1242f"}},g9={dark:{additionBg:"#2ea04326",additionBgNumber:"#3fb9504d",additionEmphasis:"#2ea04366",deletionBg:"#f851491a",deletionBgNumber:"#f851494d",deletionEmphasis:"#f8514966"},light:{additionBg:"#dafbe1",additionBgNumber:"#aceebb",additionEmphasis:"#aceebb",deletionBg:"#ffebe9",deletionBgNumber:"#ffcecb",deletionEmphasis:"#ffcecb"}},ha=({value:a,label:b="Copy file path",copiedLabel:c="Copied!",delay:d=400,className:e})=>{let[f,g]=(0,q.useState)(!1),h=(0,q.useCallback)(async()=>{try{await navigator.clipboard.writeText(a),g(!0),setTimeout(()=>g(!1),1500)}catch{}},[a]);return(0,o.jsx)(gB,{delay:d,children:(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:h,"aria-label":f?c:b,className:((...a)=>a3(T(a)))("size-6",f?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary",e)}),children:f?(0,o.jsx)(s,{size:12}):(0,o.jsx)(u,{size:12})}),(0,o.jsx)(gE,{side:"bottom",children:f?c:b})]})})},hb=({file:a,insertions:b,deletions:c,commentCount:d,repoPath:e,collapsed:f=!1,active:g=!1,onToggleCollapse:h,headingId:i,panelId:j})=>{let k=a4(a),l=k.lastIndexOf("/"),m=-1===l?"":k.slice(0,l),n=-1===l?k:k.slice(l+1);return(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)("div",{"data-active":g?"true":void 0,"data-state":f?"collapsed":"expanded",className:"flex items-center gap-2 px-3 h-9 border-b border-border bg-card sticky top-[52px] z-10",children:[(0,o.jsxs)("h3",{id:i,className:"flex min-w-0 flex-1 items-center gap-2 text-[12px] font-normal",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:()=>{h?h():window.dispatchEvent(new CustomEvent("diffhub:file:toggle-collapse",{detail:{file:a}}))},"aria-expanded":!f,"aria-controls":j,"aria-label":f?"Expand file section":"Collapse file section",className:"text-muted-foreground hover:bg-transparent active:bg-transparent aria-expanded:bg-transparent"}),children:(0,o.jsx)(t,{size:14,className:((...a)=>a3(T(a)))("transition-transform duration-150",f&&"-rotate-90")})}),(0,o.jsx)(gE,{side:"bottom",children:f?"Expand file section":"Collapse file section"})]}),(0,o.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)("span",{className:"flex min-w-0 items-center gap-1"}),children:[(0,o.jsxs)("span",{className:"flex min-w-0 items-baseline gap-0 font-mono",children:[m&&(0,o.jsxs)("span",{className:"text-muted-foreground truncate shrink",children:[m,"/"]}),(0,o.jsx)("span",{className:"text-muted-foreground font-normal shrink-0",children:n})]}),(0,o.jsx)(ha,{value:`${e}/${a}`})]}),a!==k&&(0,o.jsx)(gE,{side:"bottom",children:a})]}),(0,o.jsxs)("span",{className:"flex items-center gap-1 shrink-0",children:[b>0&&(0,o.jsxs)("span",{className:"font-mono text-[12px] text-diff-green",children:["+",b]}),c>0&&(0,o.jsxs)("span",{className:"font-mono text-[12px] text-destructive",children:["−",c]})]})]})]}),d>0&&(0,o.jsxs)("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-diff-purple/10 text-diff-purple text-[10px] shrink-0",children:[(0,o.jsx)(gT,{size:10}),d]})]})})},hc=r("BranchIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("circle",{cx:6.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),q.createElement("circle",{cx:6.5,cy:18,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),q.createElement("circle",{cx:17.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6.5 8v8M17.5 8v1c0 1.6569-1.3431 3-3 3h-5c-1.6569 0-3 1.3431-3 3v1"})))),hd=r("TrashCan2Icon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 6v12c0 1.6569 1.3431 3 3 3h6c1.6569 0 3-1.3431 3-3V6M6 6h12M6 6H4m14 0h2M9 6c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-1 5v5m-4-5v5"})))),he=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",a),"data-slot":"empty",...b}),hf=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("flex max-w-sm flex-col items-center gap-2 text-center",a),"data-slot":"empty-header",...b}),hg=V("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}}}),hh=({className:a,variant:b="default",...c})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))(hg({className:a,variant:b})),"data-slot":"empty-icon","data-variant":b,...c}),hi=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("font-medium text-lg tracking-tight",a),"data-slot":"empty-title",...b}),hj=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",a),"data-slot":"empty-description",...b}),hk=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",a),"data-slot":"empty-content",...b}),hl={"[must-fix]":{border:"border-l-destructive",text:"text-destructive"},"[nit]":{border:"border-l-muted-foreground/40",text:"text-muted-foreground"},"[question]":{border:"border-l-diff-purple",text:"text-diff-purple"},"[suggestion]":{border:"border-l-diff-green",text:"text-diff-green"}},hm=[],hn=null,ho=null,hp=0,hq=()=>(0,o.jsxs)("div",{className:"animate-pulse",children:[(0,o.jsx)("div",{className:"h-9 border-b border-border bg-card"}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),(0,o.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"67%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),(0,o.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"82%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-destructive/5",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-destructive/20"}),(0,o.jsx)("div",{className:"h-2 rounded bg-destructive/15",style:{width:"54%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),(0,o.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"78%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),(0,o.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"91%"}})]})]})]}),hr=({onRender:a,variant:b,changes:c})=>{let d="large"===b;return(0,o.jsxs)("div",{className:"mx-4 my-4 flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-muted/20 p-6","data-testid":"deferred-diff-placeholder","data-variant":b,children:[(0,o.jsx)(a6,{size:"sm",variant:"default",onClick:a,children:"Load diff"}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground",children:d?"Large diffs are not rendered by default.":"Diff rendering is deferred until this file becomes active or visible."}),d&&void 0!==c?(0,o.jsxs)("p",{className:"text-xs text-muted-foreground/70",children:[c.toLocaleString()," changed lines"]}):null]})};class hs extends g7.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a}}componentDidCatch(a,b){console.error("[diffhub] PatchDiff threw",{componentStack:b.componentStack,error:a.message,file:this.props.file})}render(){return this.state.error?(0,o.jsxs)("div",{className:"px-4 py-6 text-sm text-destructive",children:["Failed to render diff for this file: ",this.state.error.message]}):this.props.children}}let ht=(0,g6.default)(async()=>{},{loadableGenerated:{modules:[11251]},loading:()=>(0,o.jsx)(hq,{}),ssr:!1}),hu=({onSubmit:a,onCancel:b})=>{let[c,d]=(0,g7.useState)(""),[e,f]=(0,g7.useState)(null),[g,h]=(0,g7.useState)(!1),i=(0,g7.useCallback)(a=>{a?.focus({preventScroll:!0})},[]),j=(0,g7.useCallback)(async()=>{let b=c.trim();!b||g||(f(null),h(!0),await a(b,"").catch(()=>!1)||f("Failed to save comment."),h(!1))},[c,g,a]);return(0,o.jsxs)("div",{className:"my-1 mx-4 rounded-md border border-border bg-background p-3 shadow-lg dark:shadow-none",children:[(0,o.jsx)("textarea",{ref:i,value:c,onChange:a=>d(a.target.value),placeholder:"Add a comment for the AI",rows:3,onKeyDown:a=>{("Enter"===a.key&&a.metaKey||"Return"===a.key)&&c.trim()&&j(),"Escape"===a.key&&b()},className:"w-full resize-none rounded border-0 bg-transparent px-0 py-0 font-sans text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"}),(0,o.jsxs)("div",{className:"mt-2 flex justify-end gap-2",children:[(0,o.jsx)(a6,{variant:"ghost",size:"sm",onClick:b,children:"Cancel"}),(0,o.jsx)(a6,{size:"sm",disabled:!c.trim()||g,onClick:()=>void j(),children:g?"Saving…":"Comment"})]}),e&&(0,o.jsx)("p",{className:"mt-2 text-xs text-destructive",children:e})]})},hv=({comment:a,onDelete:b})=>{let[c,d]=(0,g7.useState)(!1),[e,f]=(0,g7.useState)(null),[g,h]=(0,g7.useState)(!1),i=(0,g7.useRef)(null);(0,g7.useEffect)(()=>()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);let j=async()=>{let b=a.tag?`${a.tag} ${a.body}`:a.body;try{await navigator.clipboard.writeText(b),i.current&&clearTimeout(i.current),d(!0),i.current=setTimeout(()=>{d(!1),i.current=null},1500)}catch{}},k=(0,g7.useCallback)(async()=>{g||(f(null),h(!0),await b().catch(()=>!1)||f("Failed to delete comment."),h(!1))},[g,b]),l=a.tag?hl[a.tag]?.border??"border-l-ring/40":"border-l-ring/40";return(0,o.jsxs)("div",{className:((...a)=>a3(T(a)))("group my-1 mx-4 rounded-md border border-border bg-card shadow-sm dark:shadow-none overflow-hidden border-l-2",l),children:[(0,o.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2.5",children:[a.tag&&(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("shrink-0 mt-0.5 text-[11px]",hl[a.tag]?.text??"text-muted-foreground"),children:a.tag}),(0,o.jsx)("p",{className:"flex-1 text-sm text-foreground leading-relaxed",children:a.body}),(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:j,"aria-label":c?"Comment copied":"Copy comment",className:((...a)=>a3(T(a)))("rounded p-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",c?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary")}),children:c?(0,o.jsx)(s,{size:12}):(0,o.jsx)(u,{size:12})}),(0,o.jsx)(gE,{side:"top",children:c?"Copied!":"Copy comment"})]}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:k,"aria-label":"Delete comment",disabled:g,className:"rounded p-1 text-muted-foreground transition-colors hover:text-destructive hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50"}),children:(0,o.jsx)(hd,{size:12})}),(0,o.jsx)(gE,{side:"top",children:"Delete comment"})]})]})})]}),(0,o.jsxs)("div",{className:"border-t border-border/40 px-3 py-1 flex items-center gap-2 text-[10px] text-muted-foreground/60",children:[(0,o.jsxs)("span",{children:["L",a.lineNumber]}),a.createdAt&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{children:"·"}),(0,o.jsx)("span",{children:(a=>{let b=Math.floor((Date.now()-new Date(a).getTime())/1e3);if(b<60)return"just now";let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);return`${e}d ago`})(a.createdAt)})]})]}),e&&(0,o.jsx)("p",{className:"px-3 pb-2 text-xs text-destructive",children:e})]})},hw=a=>`diff-${encodeURIComponent(a)}`,hx=(0,g7.memo)(function({getHoveredLine:a,onCommentTargetChange:b}){let c=(0,g7.useCallback)(()=>{let c=a();c&&b({lineNumber:c.lineNumber,side:c.side})},[a,b]);return(0,o.jsx)("button",{type:"button",className:"diffhub-gutter-btn",title:"Add comment for AI",onClick:c,children:"+"})}),hy=(0,g7.memo)(function({file:a,filePatch:b,layout:c,prerenderedHTML:d,shouldRenderPatch:e,comments:f,fileStat:g,isLargeFile:h,collapsed:i,active:j=!1,sectionId:k,onToggleCollapse:l,repoPath:m,commentTarget:n,onCommentTargetChange:q,onRenderPatch:r,onAddComment:s,onDeleteComment:t}){let{resolvedTheme:u}=(0,p.useTheme)(),v=`${k}-header`,w=`${k}-panel`,x=(0,g7.useMemo)(()=>{let b=f.map(a=>({lineNumber:a.lineNumber,metadata:{comment:a,type:"comment"},side:"left"===a.side?"deletions":"additions"}));return n&&b.push({lineNumber:n.lineNumber,metadata:{file:a,type:"input"},side:n.side}),b},[f,n,a]),y=(0,g7.useCallback)(b=>{let c=b.metadata;return c?"input"===c.type?(0,o.jsx)(hu,{onSubmit:async(c,d)=>{let e=await s(a,b.lineNumber,b.side,c,d);return e&&q(null),e},onCancel:()=>q(null)}):"comment"===c.type?(0,o.jsx)(hv,{comment:c.comment,onDelete:()=>t(c.comment.id)}):null:null},[a,s,q,t]),z=(0,g7.useCallback)(a=>(0,o.jsx)(hx,{getHoveredLine:a,onCommentTargetChange:q}),[q]),A=(0,g7.useCallback)(()=>{r()},[r]),B=i&&null===n,C=null;if(!B)if(b)if(e){var D;let e,f;C=(0,o.jsx)(hs,{file:a,children:(0,o.jsx)(ht,{patch:b,prerenderedHTML:d?.["light"===u?"light":"dark"],disableWorkerPool:!0,style:{colorScheme:"light"===u?"light":"dark"},options:{diffStyle:"split"===c?"split":"unified",disableFileHeader:!0,disableLineNumbers:!1,enableGutterUtility:!0,expansionLineCount:20,hunkSeparators:"line-info",lineDiffType:"word-alt",lineHoverHighlight:"disabled",maxLineDiffLength:500,overflow:"wrap",theme:{dark:"github-dark",light:"github-light"},themeType:"light"===u?"light":"dark",unsafeCSS:(e=g8[D=u??"dark"],f=g9[D],`
16
+ ${b.join("\n")}`})(f);await navigator.clipboard.writeText(a),F.current&&clearTimeout(F.current),m(!0),F.current=setTimeout(()=>m(!1),2e3)}catch{}};k=()=>A(!1),(0,q.useEffect)(()=>{if(!z)return;let a=a=>{C.current&&!C.current.contains(a.target)&&k()};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[C,k,z]);let{className:J,label:K}="connecting"===d?{className:"bg-muted-foreground/50",label:"Connecting"}:"live"===d?{className:"bg-diff-green",label:"Live"}:{className:"bg-amber-500",label:"Polling"};return(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)("header",{className:"flex h-[52px] items-center gap-2 border-b border-border bg-card px-4 text-sm",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(gJ,{className:"-ml-1"})}),(0,o.jsxs)(gE,{side:"bottom",className:"flex items-center gap-2",children:[(0,o.jsx)("span",{children:"Toggle sidebar"}),(0,o.jsx)(a7,{children:"⌘B"})]})]}),(0,o.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:()=>H(a,"branch"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-secondary"}),children:[(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("transition-opacity duration-150","branch"===n?"opacity-0":"opacity-100"),children:gP(a)}),(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150","branch"===n?"opacity-100":"opacity-0"),children:(0,o.jsx)(s,{size:14})})]}),(0,o.jsx)(gE,{side:"bottom",children:"branch"===n?"Copied!":"Click to copy"})]}),(0,o.jsx)(y,{size:12,className:"text-muted-foreground/50 shrink-0"}),(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:()=>H(b,"base"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-secondary"}),children:[(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("transition-opacity duration-150","base"===n?"opacity-0":"opacity-100"),children:gP(b)}),(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150","base"===n?"opacity-100":"opacity-0"),children:(0,o.jsx)(s,{size:14})})]}),(0,o.jsx)(gE,{side:"bottom",children:"base"===n?"Copied!":"Click to copy"})]})]}),(0,o.jsx)("div",{className:"flex-1"}),(0,o.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("div",{className:"flex items-center pr-1.5"}),children:(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("mx-1 size-1.5 rounded-full",J,c&&"animate-pulse")})}),(0,o.jsx)(gE,{side:"bottom",children:K})]}),(0,o.jsx)(gQ,{syncNotice:e}),(0,o.jsxs)("div",{className:"relative",ref:C,children:[(0,o.jsxs)(a6,{variant:"ghost",size:"xs",onClick:()=>A(a=>!a),className:"text-muted-foreground hover:text-foreground hover:bg-secondary gap-1",children:["uncommitted"===g?"Uncommitted":"All",(0,o.jsx)(t,{size:10,className:((...a)=>a3(T(a)))("transition-transform duration-150",z&&"rotate-180")})]}),z&&(0,o.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[200px] rounded-lg border border-border bg-card shadow-lg dark:shadow-none py-1 overflow-hidden",children:gO.map(({value:a,label:b})=>(0,o.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-sm text-left hover:bg-secondary/50 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",onClick:()=>{h(a),A(!1)},children:[(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("text-foreground",g===a&&"font-medium"),children:b}),g===a&&(0,o.jsx)(s,{size:14,className:"text-diff-green shrink-0"})]},a))})]}),f.length>0&&(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"xs",onClick:I,className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:[l?(0,o.jsx)(s,{"data-icon":"inline-start"}):(0,o.jsx)(u,{"data-icon":"inline-start"}),l?"Copied!":`Copy ${f.length} comment${1===f.length?"":"s"}`]}),(0,o.jsx)(gE,{side:"bottom",children:"Copy all comments as AI prompt"})]}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:()=>j("split"===i?"stacked":"split"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:(0,o.jsx)(x,{size:14})}),(0,o.jsx)(gE,{side:"bottom",children:"split"===i?"Switch to unified view (S)":"Switch to split view (S)"})]}),B&&(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:()=>E("dark"===D?"light":"dark"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:"dark"===D?(0,o.jsx)(v,{size:14}):(0,o.jsx)(w,{size:14})}),(0,o.jsx)(gE,{side:"bottom",children:"dark"===D?"Switch to light mode":"Switch to dark mode"})]})]})]})})},gT=r("BubbleDotsIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,d:"M4.002 7c0-1.6568 1.3431-3 3-3h9.9999c1.6569 0 3.0001 1.3431 3.0001 3v8.0358c0 1.6568-1.3432 3-3 3h-1.6263a1 1 0 0 0-.638.2299l-2.74 2.2701-2.7037-2.2664a1 1 0 0 0-.6424-.2336H7.0019c-1.6568 0-3-1.3432-3-3z"}),q.createElement("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:.75,d:"M6.875 11.25a.875.875 0 1 0 1.75 0 .875.875 0 0 0-1.75 0Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Z"})))),gU=r("Folder1Icon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v9c0 1.6569 1.3431 3 3 3h12c1.6569 0 3-1.3431 3-3v-6c0-1.6569-1.3431-3-3-3h-4.9296a2 2 0 0 1-1.6641-.8906l-.8126-1.2188A2 2 0 0 0 8.9297 4H6C4.3431 4 3 5.3431 3 7"})))),gV=r("FolderOpenFilledIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 3C3.7909 3 2 4.7909 2 7v10.5592C2 18.9072 3.0928 20 4.4408 20H18.045a3.0002 3.0002 0 0 0 2.8487-2.1052l1.6557-5.2983c.3657-1.1701-.3952-2.3574-1.5494-2.5647V9c0-1.6569-1.3431-3-3-3h-4.9296a1 1 0 0 1-.8321-.4453l-.5157-.7735A4 4 0 0 0 8.3945 3zm13 7V9c0-.5523-.4477-1-1-1h-4.9296a3 3 0 0 1-2.4962-1.3359l-.5157-.7735A2 2 0 0 0 8.3945 5H6c-1.1046 0-2 .8954-2 2v10.5592a.4407.4407 0 0 0 .8615.1315l1.7454-5.5855A3 3 0 0 1 9.4704 10z",clipRule:"evenodd"})))),gW=r("MagnifyingGlassIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m20 20-3.95-3.95M18 11c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7Z"})))),gX=({size:a=16,...b})=>(0,o.jsx)("svg",{viewBox:"0 0 16 16",width:a,height:a,fill:"currentColor","aria-hidden":"true",focusable:"false",...b,children:(0,o.jsx)("path",{d:"M1 1.75C1 .784 1.784 0 2.75 0h7.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073ZM8 3.25a.75.75 0 0 1 .75.75v1.5h1.5a.75.75 0 0 1 0 1.5h-1.5v1.5a.75.75 0 0 1-1.5 0V7h-1.5a.75.75 0 0 1 0-1.5h1.5V4A.75.75 0 0 1 8 3.25Zm-3 8a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"})}),gY=({size:a=16,...b})=>(0,o.jsx)("svg",{viewBox:"0 0 16 16",width:a,height:a,fill:"currentColor","aria-hidden":"true",focusable:"false",...b,children:(0,o.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.48 3.758a.75.75 0 0 1 .755.745l.01 1.497h1.497a.75.75 0 0 1 0 1.5H9v1.507a.75.75 0 0 1-1.5 0V9.005l-1.502.01a.75.75 0 0 1-.01-1.5l1.507-.01-.01-1.492a.75.75 0 0 1 .745-.755Z"})}),gZ=({size:a=16,...b})=>(0,o.jsx)("svg",{viewBox:"0 0 16 16",width:a,height:a,fill:"currentColor","aria-hidden":"true",focusable:"false",...b,children:(0,o.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.5 6h2.242a.75.75 0 0 1 0 1.5h-2.24l-2.254.015a.75.75 0 0 1-.01-1.5Z"})}),g$="diffhub:file-tree:expand-all",g_="diffhub:file-tree:collapse-all",g0=a=>a.map(a=>{if("file"===a.type)return a;let b=g0(a.children);if(1===b.length&&"folder"===b[0].type){let c=b[0];return{...c,name:`${a.name}/${c.name}`}}return{...a,children:b}}),g1=(a,b=[])=>{for(let c of a)"folder"===c.type&&(b.push(c.path),g1(c.children,b));return b},g2=(0,q.memo)(function({node:a,depth:b,isSelected:c,commentCount:d,onNavigate:e}){let{insertions:f,deletions:g}=a.fileStat,h=gX;f>0&&0===g?h=gY:g>0&&0===f&&(h=gZ);let i="shrink-0 text-sidebar-foreground/40";return f>0&&0===g?i="shrink-0 text-diff-green":g>0&&0===f&&(i="shrink-0 text-destructive"),(0,o.jsxs)("button",{type:"button","aria-current":c?"true":void 0,className:((...a)=>a3(T(a)))("flex w-full cursor-pointer items-center gap-1.5 py-1 text-left transition-colors",c?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),"data-file-path":a.path,"data-selected":c?"true":void 0,style:{containIntrinsicBlockSize:"26px",contentVisibility:"auto",paddingLeft:16*b+8,paddingRight:8},onClick:()=>e(a.path),children:[(0,o.jsx)(h,{size:16,className:i}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("span",{className:"flex-1 truncate text-[12px] leading-tight text-muted-foreground"}),children:a.name}),(0,o.jsx)(gE,{side:"right",children:a.path})]}),d>0&&(0,o.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-sidebar-foreground/50",children:[(0,o.jsx)(gT,{size:10}),d]})]})}),g3=(0,q.memo)(function({node:a,depth:b,isCollapsed:c,onToggle:d,children:e}){let f=16*b+8,g=a4(a.name),h=g.split("/");return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{type:"button","aria-expanded":!c,className:"flex w-full items-center gap-1.5 py-1 text-left transition-colors hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",style:{paddingLeft:f,paddingRight:8},onClick:()=>d(a.path),children:[c?(0,o.jsx)(gU,{size:16,className:"shrink-0 text-sidebar-foreground/50"}):(0,o.jsx)(gV,{size:16,className:"shrink-0 text-sidebar-foreground/50"}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("span",{className:"truncate text-[12px] text-muted-foreground"}),children:h.map((a,b)=>{let c=h.slice(0,b+1).join("/");return(0,o.jsxs)(q.Fragment,{children:[a,b<h.length-1&&(0,o.jsx)("span",{className:"text-sidebar-foreground/30",children:"/"})]},c)})}),a.name!==g&&(0,o.jsx)(gE,{side:"right",children:a.name})]})]}),!c&&(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)("div",{className:"pointer-events-none absolute inset-y-0 border-l border-sidebar-border/60",style:{left:f+8}}),e]})]})}),g4=(0,q.memo)(function a({nodes:b,depth:c,selectedFile:d,commentsByFile:e,collapsedFolders:f,onToggleFolder:g,onNavigate:h}){return b.map(b=>"folder"===b.type?(0,o.jsx)(g3,{node:b,depth:c,isCollapsed:f.has(b.path),onToggle:g,children:(0,o.jsx)(a,{nodes:b.children,depth:c+1,selectedFile:d,commentsByFile:e,collapsedFolders:f,onToggleFolder:g,onNavigate:h})},b.path):(0,o.jsx)(g2,{node:b,depth:c,isSelected:d===b.path,commentCount:e.get(b.path)??0,onNavigate:h},b.path))}),g5=({files:a,selectedFile:b,onSelectFile:c,comments:d,filterQuery:e,onFilterChange:f,isLoading:g=!1,insertions:h,deletions:i,sidebarWidth:j,onSidebarWidthChange:k})=>{let[l,m]=(0,q.useState)(new Set),n=(0,q.useRef)(null);(0,q.useEffect)(()=>{let a=()=>{n.current=null,document.body.style.cursor="",document.body.style.userSelect=""},b=a=>{n.current&&k(Math.max(8,n.current.startWidth+a.clientX-n.current.startX))},c=()=>{n.current&&a()};return document.addEventListener("mousemove",b),document.addEventListener("mouseup",c),window.addEventListener("blur",c),()=>{a(),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",c),window.removeEventListener("blur",c)}},[k]);let p=(0,q.useCallback)(a=>{a.preventDefault(),n.current={startWidth:j,startX:a.clientX},document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[j]),r=(0,q.useMemo)(()=>e?a.filter(a=>a.file.toLowerCase().includes(e.toLowerCase())):a,[a,e]),s=(0,q.useMemo)(()=>g0((a=>{let b={files:[],folders:{}};for(let c of a){let a=c.file.split("/"),d=b;for(let b=0;b<a.length-1;b+=1){let c=a[b];d.folders[c]||(d.folders[c]={files:[],folders:{}}),d=d.folders[c]}d.files.push(c)}let c=(a,b,d)=>{let e=d?`${d}/${a}`:a,f=[];for(let[a,d]of Object.entries(b.folders).toSorted())f.push(c(a,d,e));for(let a of b.files){let b=a.file.split("/");f.push({fileStat:a,name:b.at(-1)??a.file,path:a.file,type:"file"})}return{children:f,name:a,path:e,type:"folder"}},d=[];for(let[a,e]of Object.entries(b.folders).toSorted())d.push(c(a,e,""));for(let a of b.files)d.push({fileStat:a,name:a.file,path:a.file,type:"file"});return d})(r)),[r]),t=(0,q.useMemo)(()=>g1(s),[s]);(0,q.useEffect)(()=>{let a=()=>{m(new Set)},b=()=>{m(new Set(t))};return window.addEventListener(g$,a),window.addEventListener(g_,b),()=>{window.removeEventListener(g$,a),window.removeEventListener(g_,b)}},[t]);let u=(0,q.useMemo)(()=>{let a=new Map;for(let b of d)a.set(b.file,(a.get(b.file)??0)+1);return a},[d]),v=(0,q.useCallback)(a=>{m(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),w=(0,q.useCallback)(a=>{let b=new CustomEvent("diffhub:file:navigate",{cancelable:!0,detail:{file:a,source:"sidebar"}});window.dispatchEvent(b)&&c(a,"auto")},[c]),x=null;return x=g?(0,o.jsx)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:(0,o.jsx)("p",{className:"animate-pulse text-xs text-sidebar-foreground/50",children:"Loading…"})}):0===r.length?(0,o.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[(0,o.jsx)("p",{className:"text-xs text-sidebar-foreground/50",children:"No changes"}),e&&(0,o.jsxs)("p",{className:"text-[10px] text-sidebar-foreground/30",children:["No files match “",e,"”"]})]}):(0,o.jsx)(g4,{nodes:s,depth:0,selectedFile:b,commentsByFile:u,collapsedFolders:l,onToggleFolder:v,onNavigate:w}),(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)(gI,{collapsible:"offcanvas",className:"overflow-hidden border-r border-sidebar-border",children:[(0,o.jsx)(gL,{className:"border-b border-sidebar-border h-[52px] flex-row items-center py-0 px-2",children:(0,o.jsxs)("div",{className:"relative flex w-full items-center",children:[(0,o.jsx)(gW,{size:12,className:"pointer-events-none absolute left-2.5 text-sidebar-foreground/40"}),(0,o.jsx)("input",{type:"text",value:e,onChange:a=>f(a.target.value),placeholder:"Filter files…","aria-label":"Filter files",className:"w-full rounded-md border border-sidebar-border bg-sidebar-accent py-1.5 pl-7 pr-7 text-xs text-sidebar-foreground placeholder:text-sidebar-foreground/40 transition-colors focus:border-sidebar-ring/50 focus:outline-none"}),e&&(0,o.jsx)("button",{type:"button",onClick:()=>f(""),"aria-label":"Clear filter",className:"absolute right-2 text-sm leading-none text-sidebar-foreground/40 transition-colors hover:text-sidebar-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",children:"×"})]})}),(0,o.jsx)(gN,{className:"gap-0 py-1",children:x}),(0,o.jsx)(gM,{className:"border-t border-sidebar-border px-3 py-2",children:(0,o.jsxs)("div",{className:"flex items-center gap-2 text-[12px] font-mono text-sidebar-foreground/60",children:[(0,o.jsxs)("span",{children:[a.length," ",1===a.length?"file":"files"]}),h>0&&(0,o.jsxs)("span",{className:"text-diff-green",children:["+",h]}),i>0&&(0,o.jsxs)("span",{className:"text-destructive",children:["−",i]})]})}),(0,o.jsx)("div",{"aria-hidden":!0,className:"absolute inset-y-0 right-0 z-20 w-[5px] cursor-col-resize after:absolute after:inset-y-0 after:left-1/2 after:-translate-x-1/2 after:w-px after:transition-colors hover:after:bg-sidebar-border",onMouseDown:p})]})})};var g6=a.i(19721),g7=q;let g8={dark:{addition:"#3fb950",deletion:"#f85149"},light:{addition:"#1a7f37",deletion:"#d1242f"}},g9={dark:{additionBg:"#2ea04326",additionBgNumber:"#3fb9504d",additionEmphasis:"#2ea04366",deletionBg:"#f851491a",deletionBgNumber:"#f851494d",deletionEmphasis:"#f8514966"},light:{additionBg:"#dafbe1",additionBgNumber:"#aceebb",additionEmphasis:"#aceebb",deletionBg:"#ffebe9",deletionBgNumber:"#ffcecb",deletionEmphasis:"#ffcecb"}},ha=({value:a,label:b="Copy file path",copiedLabel:c="Copied!",delay:d=400,className:e})=>{let[f,g]=(0,q.useState)(!1),h=(0,q.useCallback)(async()=>{try{await navigator.clipboard.writeText(a),g(!0),setTimeout(()=>g(!1),1500)}catch{}},[a]);return(0,o.jsx)(gB,{delay:d,children:(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:h,"aria-label":f?c:b,className:((...a)=>a3(T(a)))("size-6",f?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary",e)}),children:f?(0,o.jsx)(s,{size:12}):(0,o.jsx)(u,{size:12})}),(0,o.jsx)(gE,{side:"bottom",children:f?c:b})]})})},hb=({file:a,insertions:b,deletions:c,commentCount:d,repoPath:e,collapsed:f=!1,active:g=!1,onToggleCollapse:h,headingId:i,panelId:j})=>{let k=a4(a),l=k.lastIndexOf("/"),m=-1===l?"":k.slice(0,l),n=-1===l?k:k.slice(l+1);return(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)("div",{"data-active":g?"true":void 0,"data-state":f?"collapsed":"expanded",className:"flex items-center gap-2 px-3 h-9 border-b border-border bg-card sticky top-[52px] z-10",children:[(0,o.jsxs)("h3",{id:i,className:"flex min-w-0 flex-1 items-center gap-2 text-[12px] font-normal",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)(a6,{variant:"ghost",size:"icon-xs",onClick:()=>{h?h():window.dispatchEvent(new CustomEvent("diffhub:file:toggle-collapse",{detail:{file:a}}))},"aria-expanded":!f,"aria-controls":j,"aria-label":f?"Expand file section":"Collapse file section",className:"text-muted-foreground hover:bg-transparent active:bg-transparent aria-expanded:bg-transparent"}),children:(0,o.jsx)(t,{size:14,className:((...a)=>a3(T(a)))("transition-transform duration-150",f&&"-rotate-90")})}),(0,o.jsx)(gE,{side:"bottom",children:f?"Expand file section":"Collapse file section"})]}),(0,o.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,o.jsxs)(gC,{children:[(0,o.jsxs)(gD,{render:(0,o.jsx)("span",{className:"flex min-w-0 items-center gap-1"}),children:[(0,o.jsxs)("span",{className:"flex min-w-0 items-baseline gap-0 font-mono",children:[m&&(0,o.jsxs)("span",{className:"text-muted-foreground truncate shrink",children:[m,"/"]}),(0,o.jsx)("span",{className:"text-muted-foreground font-normal shrink-0",children:n})]}),(0,o.jsx)(ha,{value:`${e}/${a}`})]}),a!==k&&(0,o.jsx)(gE,{side:"bottom",children:a})]}),(0,o.jsxs)("span",{className:"flex items-center gap-1 shrink-0",children:[b>0&&(0,o.jsxs)("span",{className:"font-mono text-[12px] text-diff-green",children:["+",b]}),c>0&&(0,o.jsxs)("span",{className:"font-mono text-[12px] text-destructive",children:["−",c]})]})]})]}),d>0&&(0,o.jsxs)("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-diff-purple/10 text-diff-purple text-[10px] shrink-0",children:[(0,o.jsx)(gT,{size:10}),d]})]})})},hc=r("BranchIcon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("circle",{cx:6.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),q.createElement("circle",{cx:6.5,cy:18,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),q.createElement("circle",{cx:17.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6.5 8v8M17.5 8v1c0 1.6569-1.3431 3-3 3h-5c-1.6569 0-3 1.3431-3 3v1"})))),hd=r("TrashCan2Icon",(0,q.forwardRef)((a,b)=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:b,...a},q.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 6v12c0 1.6569 1.3431 3 3 3h6c1.6569 0 3-1.3431 3-3V6M6 6h12M6 6H4m14 0h2M9 6c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-1 5v5m-4-5v5"})))),he=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",a),"data-slot":"empty",...b}),hf=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("flex max-w-sm flex-col items-center gap-2 text-center",a),"data-slot":"empty-header",...b}),hg=V("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}}}),hh=({className:a,variant:b="default",...c})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))(hg({className:a,variant:b})),"data-slot":"empty-icon","data-variant":b,...c}),hi=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("font-medium text-lg tracking-tight",a),"data-slot":"empty-title",...b}),hj=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",a),"data-slot":"empty-description",...b}),hk=({className:a,...b})=>(0,o.jsx)("div",{className:((...a)=>a3(T(a)))("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",a),"data-slot":"empty-content",...b}),hl={"[must-fix]":{border:"border-l-destructive",text:"text-destructive"},"[nit]":{border:"border-l-muted-foreground/40",text:"text-muted-foreground"},"[question]":{border:"border-l-diff-purple",text:"text-diff-purple"},"[suggestion]":{border:"border-l-diff-green",text:"text-diff-green"}},hm=[],hn=null,ho=null,hp=0,hq=()=>(0,o.jsxs)("div",{className:"animate-pulse",children:[(0,o.jsx)("div",{className:"h-9 border-b border-border bg-card"}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),(0,o.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"67%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),(0,o.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"82%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-destructive/5",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-destructive/20"}),(0,o.jsx)("div",{className:"h-2 rounded bg-destructive/15",style:{width:"54%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),(0,o.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"78%"}})]}),(0,o.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[(0,o.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),(0,o.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"91%"}})]})]})]}),hr=({onRender:a,variant:b,changes:c})=>{let d="large"===b;return(0,o.jsxs)("div",{className:"mx-4 my-4 flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-muted/20 p-6","data-testid":"deferred-diff-placeholder","data-variant":b,children:[(0,o.jsx)(a6,{size:"sm",variant:"default",onClick:a,children:"Load diff"}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground",children:d?"Large diffs are not rendered by default.":"Diff rendering is deferred. Load this file to render its diff."}),d&&void 0!==c?(0,o.jsxs)("p",{className:"text-xs text-muted-foreground/70",children:[c.toLocaleString()," changed lines"]}):null]})};class hs extends g7.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a}}componentDidCatch(a,b){console.error("[diffhub] PatchDiff threw",{componentStack:b.componentStack,error:a.message,file:this.props.file})}render(){return this.state.error?(0,o.jsxs)("div",{className:"px-4 py-6 text-sm text-destructive",children:["Failed to render diff for this file: ",this.state.error.message]}):this.props.children}}let ht=(0,g6.default)(async()=>{},{loadableGenerated:{modules:[11251]},loading:()=>(0,o.jsx)(hq,{}),ssr:!1}),hu=({onSubmit:a,onCancel:b})=>{let[c,d]=(0,g7.useState)(""),[e,f]=(0,g7.useState)(null),[g,h]=(0,g7.useState)(!1),i=(0,g7.useCallback)(a=>{a?.focus({preventScroll:!0})},[]),j=(0,g7.useCallback)(async()=>{let b=c.trim();!b||g||(f(null),h(!0),await a(b,"").catch(()=>!1)||f("Failed to save comment."),h(!1))},[c,g,a]);return(0,o.jsxs)("div",{className:"my-1 mx-4 rounded-md border border-border bg-background p-3 shadow-lg dark:shadow-none",children:[(0,o.jsx)("textarea",{ref:i,value:c,onChange:a=>d(a.target.value),placeholder:"Add a comment for the AI",rows:3,onKeyDown:a=>{("Enter"===a.key&&a.metaKey||"Return"===a.key)&&c.trim()&&j(),"Escape"===a.key&&b()},className:"w-full resize-none rounded border-0 bg-transparent px-0 py-0 font-sans text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"}),(0,o.jsxs)("div",{className:"mt-2 flex justify-end gap-2",children:[(0,o.jsx)(a6,{variant:"ghost",size:"sm",onClick:b,children:"Cancel"}),(0,o.jsx)(a6,{size:"sm",disabled:!c.trim()||g,onClick:()=>void j(),children:g?"Saving…":"Comment"})]}),e&&(0,o.jsx)("p",{className:"mt-2 text-xs text-destructive",children:e})]})},hv=({comment:a,onDelete:b})=>{let[c,d]=(0,g7.useState)(!1),[e,f]=(0,g7.useState)(null),[g,h]=(0,g7.useState)(!1),i=(0,g7.useRef)(null);(0,g7.useEffect)(()=>()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);let j=async()=>{let b=a.tag?`${a.tag} ${a.body}`:a.body;try{await navigator.clipboard.writeText(b),i.current&&clearTimeout(i.current),d(!0),i.current=setTimeout(()=>{d(!1),i.current=null},1500)}catch{}},k=(0,g7.useCallback)(async()=>{g||(f(null),h(!0),await b().catch(()=>!1)||f("Failed to delete comment."),h(!1))},[g,b]),l=a.tag?hl[a.tag]?.border??"border-l-ring/40":"border-l-ring/40";return(0,o.jsxs)("div",{className:((...a)=>a3(T(a)))("group my-1 mx-4 rounded-md border border-border bg-card shadow-sm dark:shadow-none overflow-hidden border-l-2",l),children:[(0,o.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2.5",children:[a.tag&&(0,o.jsx)("span",{className:((...a)=>a3(T(a)))("shrink-0 mt-0.5 text-[11px]",hl[a.tag]?.text??"text-muted-foreground"),children:a.tag}),(0,o.jsx)("p",{className:"flex-1 text-sm text-foreground leading-relaxed",children:a.body}),(0,o.jsx)(gB,{delay:400,children:(0,o.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:j,"aria-label":c?"Comment copied":"Copy comment",className:((...a)=>a3(T(a)))("rounded p-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",c?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary")}),children:c?(0,o.jsx)(s,{size:12}):(0,o.jsx)(u,{size:12})}),(0,o.jsx)(gE,{side:"top",children:c?"Copied!":"Copy comment"})]}),(0,o.jsxs)(gC,{children:[(0,o.jsx)(gD,{render:(0,o.jsx)("button",{type:"button",onClick:k,"aria-label":"Delete comment",disabled:g,className:"rounded p-1 text-muted-foreground transition-colors hover:text-destructive hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50"}),children:(0,o.jsx)(hd,{size:12})}),(0,o.jsx)(gE,{side:"top",children:"Delete comment"})]})]})})]}),(0,o.jsxs)("div",{className:"border-t border-border/40 px-3 py-1 flex items-center gap-2 text-[10px] text-muted-foreground/60",children:[(0,o.jsxs)("span",{children:["L",a.lineNumber]}),a.createdAt&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{children:"·"}),(0,o.jsx)("span",{children:(a=>{let b=Math.floor((Date.now()-new Date(a).getTime())/1e3);if(b<60)return"just now";let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);return`${e}d ago`})(a.createdAt)})]})]}),e&&(0,o.jsx)("p",{className:"px-3 pb-2 text-xs text-destructive",children:e})]})},hw=a=>`diff-${encodeURIComponent(a)}`,hx=(0,g7.memo)(function({getHoveredLine:a,onCommentTargetChange:b}){let c=(0,g7.useCallback)(()=>{let c=a();c&&b({lineNumber:c.lineNumber,side:c.side})},[a,b]);return(0,o.jsx)("button",{type:"button",className:"diffhub-gutter-btn",title:"Add comment for AI",onClick:c,children:"+"})}),hy=(0,g7.memo)(function({file:a,filePatch:b,layout:c,prerenderedHTML:d,shouldRenderPatch:e,comments:f,fileStat:g,isLargeFile:h,collapsed:i,active:j=!1,sectionId:k,onToggleCollapse:l,repoPath:m,commentTarget:n,onCommentTargetChange:q,onRenderPatch:r,onAddComment:s,onDeleteComment:t}){let{resolvedTheme:u}=(0,p.useTheme)(),v=`${k}-header`,w=`${k}-panel`,x=(0,g7.useMemo)(()=>{let b=f.map(a=>({lineNumber:a.lineNumber,metadata:{comment:a,type:"comment"},side:"left"===a.side?"deletions":"additions"}));return n&&b.push({lineNumber:n.lineNumber,metadata:{file:a,type:"input"},side:n.side}),b},[f,n,a]),y=(0,g7.useCallback)(b=>{let c=b.metadata;return c?"input"===c.type?(0,o.jsx)(hu,{onSubmit:async(c,d)=>{let e=await s(a,b.lineNumber,b.side,c,d);return e&&q(null),e},onCancel:()=>q(null)}):"comment"===c.type?(0,o.jsx)(hv,{comment:c.comment,onDelete:()=>t(c.comment.id)}):null:null},[a,s,q,t]),z=(0,g7.useCallback)(a=>(0,o.jsx)(hx,{getHoveredLine:a,onCommentTargetChange:q}),[q]),A=(0,g7.useCallback)(()=>{r()},[r]),B=i&&null===n,C=null;if(!B)if(b)if(e){var D;let e,f;C=(0,o.jsx)(hs,{file:a,children:(0,o.jsx)(ht,{patch:b,prerenderedHTML:d?.["light"===u?"light":"dark"],disableWorkerPool:!0,style:{colorScheme:"light"===u?"light":"dark"},options:{diffStyle:"split"===c?"split":"unified",disableFileHeader:!0,disableLineNumbers:!1,enableGutterUtility:!0,expansionLineCount:20,hunkSeparators:"line-info",lineDiffType:"word-alt",lineHoverHighlight:"disabled",maxLineDiffLength:500,overflow:"wrap",theme:{dark:"github-dark",light:"github-light"},themeType:"light"===u?"light":"dark",unsafeCSS:(e=g8[D=u??"dark"],f=g9[D],`
17
17
  [data-diff-span] { border-radius: 0; }
18
18
  :host {
19
19
  /* Base colors for additions/deletions */
@@ -36,7 +36,7 @@ ${b.join("\n")}`})(f);await navigator.clipboard.writeText(a),F.current&&clearTim
36
36
  --diffs-fg-number-addition-override: ${e.addition};
37
37
  --diffs-fg-number-deletion-override: ${e.deletion};
38
38
  }
39
- `)},lineAnnotations:x,renderAnnotation:y,renderGutterUtility:z},a)})}else C=(0,o.jsx)(hr,{onRender:A,variant:h?"large":"auto",changes:g?.changes});else C=(0,o.jsx)("div",{className:"px-4 py-6 text-sm text-muted-foreground",children:"No textual patch available for this file."});return(0,o.jsxs)("div",{"data-filename":a,className:"font-sans",children:[(0,o.jsx)(hb,{file:a,insertions:g?.insertions??0,deletions:g?.deletions??0,commentCount:f.length,repoPath:m,collapsed:i,active:j,onToggleCollapse:l,headingId:v,panelId:w}),(0,o.jsx)("div",{id:w,role:"region","aria-labelledby":v,hidden:B,children:C})]})}),hz=(0,g7.memo)(function({file:a,filePatch:b,layout:c,prerenderedHTML:d,deferPatchRendering:e,isLargeFile:f,comments:g,fileStat:h,collapsed:i,active:j,onToggleCollapse:k,onVisible:l,repoPath:m,onAddComment:n,onDeleteComment:p}){let q=(0,g7.useRef)(null),[r,s]=(0,g7.useState)(null),t=e||f,[u,v]=(0,g7.useState)(()=>!t||j);!u&&(j||null!==r)&&v(!0);let w=(0,g7.useCallback)(()=>{v(!0)},[]),x=(0,g7.useRef)(l);(0,g7.useEffect)(()=>{x.current=l},[l]),(0,g7.useEffect)(()=>{let b=q.current;if(!b||"u"<typeof IntersectionObserver)return;let c=new IntersectionObserver(b=>{let[c]=b;if(c){var d;c.isIntersecting&&c.intersectionRatio>=.35&&(d=x.current,hn=a,ho=d,0===hp&&(hp=requestAnimationFrame(()=>{hp=0;let a=hn,b=ho;hn=null,ho=null,a&&b&&b(a)})))}},{rootMargin:"-52px 0px -55% 0px",threshold:[.35,.6]});return c.observe(b),()=>c.disconnect()},[a]);let y=hw(a);return(0,o.jsx)("section",{ref:q,id:y,"data-file-section":a,className:"scroll-mt-[52px]",children:(0,o.jsx)(hy,{file:a,filePatch:b,layout:c,prerenderedHTML:d?.[c],shouldRenderPatch:u||!t,comments:g,fileStat:h,isLargeFile:f,collapsed:i,active:j,sectionId:y,onToggleCollapse:k,repoPath:m,commentTarget:r,onCommentTargetChange:s,onRenderPatch:w,onAddComment:n,onDeleteComment:p})})}),hA=({patchesByFile:a,prerenderedHTMLByFile:b,layout:c,comments:d,onAddComment:e,onDeleteComment:f,activeFileId:g,fileStats:h,collapsedFiles:i,onToggleCollapse:j,onActiveFileChange:k,repoPath:l})=>{let m=(0,g7.useMemo)(()=>{let a=new Map;for(let b of h)a.set(b.file,b);return a},[h]),n=(0,g7.useMemo)(()=>(a=>{let b={files:[],folders:new Map};for(let c of a){let a=c.split("/"),d=b;for(let b=0;b<a.length-1;b+=1){let c=a[b];d.folders.has(c)||d.folders.set(c,{files:[],folders:new Map});let e=d.folders.get(c);e&&(d=e)}d.files.push(c)}let c=[],d=a=>{for(let[,b]of[...a.folders.entries()].toSorted((a,b)=>a[0].localeCompare(b[0])))d(b);let b=[...a.files].toSorted((a,b)=>{let c=a.split("/").at(-1)??a,d=b.split("/").at(-1)??b;return c.localeCompare(d)});c.push(...b)};return d(b),c})([...h.map(a=>a.file),...Object.keys(a).filter(a=>!m.has(a))]),[m,h,a]),p=(0,g7.useMemo)(()=>{let a=new Map;for(let b of d){let c=a.get(b.file);c?c.push(b):a.set(b.file,[b])}return a},[d]),q=n.length>=24&&0===Object.keys(b??{}).length,r=(0,g7.useMemo)(()=>{let a=new Map;for(let b of n)a.set(b,()=>j(b));return a},[n,j]);return 0===n.length?(0,o.jsxs)(he,{className:"h-full",children:[(0,o.jsxs)(hf,{children:[(0,o.jsx)(hh,{variant:"icon",children:(0,o.jsx)(hc,{})}),(0,o.jsx)(hi,{children:"No changes"}),(0,o.jsx)(hj,{children:"The working tree is clean relative to the base branch"})]}),(0,o.jsx)(hk,{children:(0,o.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,o.jsx)(a7,{children:"r"})," to refresh"]})})]}):(0,o.jsx)("div",{id:"diff-container",children:n.map(d=>{var h;let j=m.get(d),n=a[d]??"",s=void 0!==j&&(h=n.length,!j.binary&&(j.changes>=500||void 0!==h&&h>=5e5));return(0,o.jsx)(hz,{file:d,filePatch:n,layout:c,prerenderedHTML:b?.[d],deferPatchRendering:q,isLargeFile:s,comments:p.get(d)??hm,fileStat:j,collapsed:i.has(d),active:g===d,onToggleCollapse:r.get(d),onVisible:k,repoPath:l,onAddComment:e,onDeleteComment:f},d)})})},hB=[1e3,2e3,5e3],hC=(a,b,c)=>{let[d,e]=(0,q.useState)(b);return(0,q.useEffect)(()=>{try{let b=localStorage.getItem(a);null!==b&&(!c||c.includes(b))&&e(b)}catch{}},[a,c]),[d,(0,q.useCallback)(b=>{e(c=>{let d="function"==typeof b?b(c):b;try{localStorage.setItem(a,d)}catch{}return d})},[a])]},hD=["split","stacked"],hE=["all","uncommitted"],hF=({text:a,pulse:b=!1})=>(0,o.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,o.jsx)("div",{className:`text-muted-foreground text-sm${b?" animate-pulse":""}`,children:a})}),hG=a=>{let b=hw(a).replaceAll(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,"\\$&");return`#${b}`},hH=({notice:a})=>{let b="border-border bg-muted/40 text-muted-foreground";return"destructive"===a.tone?b="border-destructive/30 bg-destructive/10 text-destructive":"warning"===a.tone&&(b="border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400"),(0,o.jsx)("div",{className:`border-b px-4 py-2 text-xs ${b}`,children:(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"font-medium",children:a.label}),a.detail&&(0,o.jsx)("span",{className:"text-xs opacity-80",children:a.detail})]})})},hI=({filesData:a,deferredDiffData:b,diffError:c,syncNotice:d,layout:e,comments:f,onAddComment:g,onDeleteComment:h,selectedFile:i,collapsedFiles:j,onToggleCollapse:k,onActiveFileChange:l,repoPath:m,diffWatchdogTripped:n,diffHintShown:p,onRetryDiff:q})=>null===a?(0,o.jsx)(hF,{text:"Loading diff…",pulse:!0}):0===a.files.length?(0,o.jsx)(hF,{text:"No changes"}):b?(0,o.jsxs)(o.Fragment,{children:[d&&(0,o.jsx)(hH,{notice:d}),(0,o.jsx)(hA,{patchesByFile:b.patchesByFile,prerenderedHTMLByFile:b.prerenderedHTMLByFile,layout:e,comments:f,onAddComment:g,onDeleteComment:h,activeFileId:i,fileStats:a.files,collapsedFiles:j,onToggleCollapse:k,onActiveFileChange:l,repoPath:m})]}):c?(0,o.jsx)(hF,{text:c}):n?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[(0,o.jsx)("div",{className:"text-muted-foreground text-sm",children:"Still loading the diff…"}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."}),(0,o.jsx)(a6,{size:"sm",variant:"default",onClick:q,children:"Retry"})]}):p?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,o.jsx)("div",{className:"text-muted-foreground animate-pulse text-sm",children:`Loading diff${a?` (${a.files.length} files)…`:"…"}`}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."})]}):(0,o.jsx)(hF,{text:`Loading diff${a?` (${a.files.length} files)…`:"…"}`,pulse:!0});a.s(["DiffApp",0,({repoPath:a,defaultSidebarOpen:b=!0})=>{let[c,d]=(0,q.useState)(null),[e,f]=(0,q.useState)([]),[g,h]=(0,q.useState)(null),i=(0,q.useRef)(null),[j,k]=(0,q.useState)(null),[l,m]=hC("diffhub-layout","stacked",hD),{resolvedTheme:n}=(0,p.useTheme)(),r="light"===n?"light":"dark",s=(0,q.useRef)(l),t=(0,q.useRef)(r),[u,v]=(0,q.useState)(""),[w,x]=(0,q.useState)(256),[y,z]=(0,q.useState)(!1),[A,B]=(0,q.useState)(null),[C,D]=(0,q.useState)(null),[E,F]=(0,q.useState)(!1),[G,H]=hC("diffhub-diffMode","all",hE),I=(0,q.useRef)(G),J=(0,q.useRef)(null),K=(0,q.useRef)(null),L=(0,q.useRef)(null),M=(0,q.useRef)(null),N=(0,q.useRef)(!1),O=(0,q.useRef)(!1),P=(0,q.useRef)(()=>Promise.resolve()),Q=(0,q.useRef)(!1),R=(0,q.useRef)(!1),S=(0,q.useRef)(0),T=(0,q.useRef)(0),U=(0,q.useRef)(null),[V,W]=(0,q.useState)(!1),[X,Y]=(0,q.useState)(!1),[,Z]=(0,q.useTransition)(),[$,_]=(0,q.useState)(()=>new Set);(0,q.useEffect)(()=>{I.current=G},[G]),(0,q.useEffect)(()=>{_(new Set([]))},[a]);let aa=(0,q.useCallback)(b=>{_(c=>{let d=b(c);if(d===c)return c;try{localStorage.setItem(`diffhub-collapsed:${a}`,JSON.stringify([...d]))}catch{}return d})},[a]),ab=(0,q.useCallback)(()=>{let a=new URLSearchParams;"uncommitted"===I.current&&a.set("mode","uncommitted");let b=a.toString();return b?`?${b}`:""},[]),ac=(0,q.useCallback)(()=>{let a=new URLSearchParams;M.current&&a.set("generation",M.current),"uncommitted"===I.current&&a.set("mode","uncommitted"),a.set("layout",s.current),a.set("theme",t.current);let b=a.toString();return b?`?${b}`:""},[]),ad=(0,q.useCallback)(async a=>{let b=M.current,c=L.current;U.current=Date.now(),W(!1),D(null),console.info("[diffhub] fetchDiff start",{fingerprint:c,generation:b,mode:I.current,requestId:a});let d=new AbortController,e=setTimeout(()=>{d.abort(Error("Diff request timed out"))},15e3);try{var f,g;let e,h,i=await fetch(`/api/diff${ac()}`,{signal:d.signal});if(!i.ok){let d=(await i.json().catch(()=>({error:"Failed to load diff"}))).error??`Failed to load diff (${i.status})`;console.error("[diffhub] fetchDiff non-ok response",{fingerprint:c,generation:b,mode:I.current,requestId:a,responseStatus:i.status,responseStatusText:i.statusText,serverError:d}),a===S.current&&D(d);return}let j=(f=await i.json(),g=c??"unknown",e=f.patchesByFile??Object.fromEntries((a=>{let b=new Map,c=/^diff --git a\/(.+?) b\/(.+)$/gm,d=[],e=c.exec(a);for(;e;)d.push({file:e[2],start:e.index}),e=c.exec(a);for(let[c,e]of d.entries()){let f=d[c+1]?.start??a.length,g=a.slice(e.start,f).trimEnd();b.set(e.file,g?`${g}
40
- `:"")}return b})(f.patch??"")),{baseBranch:f.baseBranch,branch:f.branch,generation:f.generation,mergeBase:f.mergeBase,patchesByFile:e,prerenderedHTMLByFile:f.prerenderedHTMLByFile,reviewKeysByFile:f.reviewKeysByFile??(h=f.generation,Object.fromEntries(Object.entries(e).map(([a,b])=>[a,`${h}:${(a=>{let b=0;for(let c=0;c<a.length;c+=1)b=Math.trunc(Math.imul(31,b)+(a.codePointAt(c)??0));return Math.abs(b).toString(36)})(`${a}:${b}`)}`]))),sourceFingerprint:g});if(a!==S.current||c!==L.current||b!==M.current){console.info("[diffhub] fetchDiff response stale",{fingerprint:c,generation:b,latestRequestId:S.current,requestId:a}),null!==M.current&&(T.current+=1,T.current>=3&&(console.warn("[diffhub] fetchDiff stale-drop limit reached, invalidating",{drops:T.current}),T.current=0,S.current+=1,K.current=null,k(null)),R.current=!0);return}T.current=0,console.info("[diffhub] fetchDiff success",{fileCount:Object.keys(j.patchesByFile).length,fingerprint:c,generation:j.generation,requestId:a}),Z(()=>k(j))}catch(d){console.error("[diffhub] fetchDiff threw",{error:d,fingerprint:c,generation:b,mode:I.current,requestId:a}),a===S.current&&D(d instanceof Error?d.message:String(d))}finally{clearTimeout(e)}},[ac,Z]),ae=(0,q.useCallback)(async()=>{if(R.current=!0,!Q.current){for(Q.current=!0,F(!0);R.current;)R.current=!1,S.current+=1,await ad(S.current);Q.current=!1,F(!1)}},[ad]);(0,q.useEffect)(()=>{(s.current!==l||t.current!==r)&&(s.current=l,t.current=r,S.current+=1,K.current=null,k(null),ae())},[l,r,ae]);let af=(0,q.useRef)(j),ag=(0,q.useRef)(C);(0,q.useEffect)(()=>{af.current=j},[j]),(0,q.useEffect)(()=>{ag.current=C},[C]);let ah=(0,q.useCallback)(a=>{if(L.current=a.fingerprint,M.current=a.generation,0===a.files.length){i.current=null,S.current+=1,(0,q.startTransition)(()=>{h(null),k(null)}),D(null),K.current=a.fingerprint;return}let b=i.current;b&&a.files.some(a=>a.file===b)||(i.current=b=a.files[0]?.file??null,(0,q.startTransition)(()=>h(b)));let c=a.fingerprint!==K.current,d=af.current?.generation===a.generation;(c||!d||null!==ag.current)&&(K.current=a.fingerprint,c&&(S.current+=1),ae())},[ae]),ai=(0,q.useCallback)(()=>{S.current+=1,K.current=null,L.current=null,M.current=null,k(null),D(null)},[]),aj=(0,q.useCallback)(async(a=!1)=>{let b=()=>{a||z(!1),N.current=!1,O.current&&(O.current=!1,queueMicrotask(()=>{P.current(!0)}))};if(N.current){O.current=!0;return}N.current=!0,a||z(!0),B(null);let c=await Promise.all([fetch(`/api/files${ab()}`),fetch("/api/comments").then(async a=>{if(!a.ok)throw Error(`Failed to load comments (${a.status})`);return await a.json()}).catch(a=>(console.error("[diffhub] comments refresh failed",{error:a}),null))]).catch(a=>(B(a instanceof Error?a.message:String(a)),null));if(!c)return void b();let[e,g]=c;if(!e.ok){B((await e.json().catch(()=>({error:"Network error"}))).error??"Failed to load files"),b();return}let h=await e.json();(0,q.startTransition)(()=>{d(h),null!==g&&f(g)}),ah(h),b()},[ab,ah]);(0,q.useEffect)(()=>{P.current=aj},[aj]);let ak=(0,q.useRef)(!1),al=(0,q.useRef)(!1);(0,q.useEffect)(()=>{let a=null,b=()=>{ak.current=!0,a&&clearTimeout(a),a=setTimeout(()=>{ak.current=!1,al.current&&(al.current=!1,P.current(!0))},200)};return window.addEventListener("scroll",b,{passive:!0}),()=>{window.removeEventListener("scroll",b),a&&clearTimeout(a)}},[]);let am=(0,q.useCallback)(()=>{if(ak.current){al.current=!0;return}P.current(!0)},[]),an=(a=>{let[b,c]=(0,q.useState)("connecting"),d=(0,q.useEffectEvent)(a),e=(0,q.useRef)(null);return(0,q.useEffect)(()=>{let a=!1,b=0,f=null,g=new AbortController,h=async()=>{if(!a)try{let f=null===e.current?"":`?revision=${e.current}`,i=await fetch(`/api/watch${f}`,{cache:"no-store",signal:g.signal});if(a)return;if(!i.ok)throw Error(`Watch request failed with status ${i.status}`);let j=await i.json();if(a)return;b=0,c("live");let k=e.current;e.current=j.revision,j.changed&&null!==k&&j.revision!==k&&d(),a||queueMicrotask(()=>{a||h()})}catch(d){if(a||g.signal.aborted)return;if(console.error("[diffhub] file watch failed",{error:d,failureCount:b+=1}),b>10){console.error("[diffhub] file watch: max retries exceeded, stopping"),c("fallback");return}c(b>=hB.length?"fallback":"connecting"),f=setTimeout(()=>{f=null,a||h()},hB[Math.min(b-1,hB.length-1)])}};return c("connecting"),h(),()=>{a=!0,g.abort(),f&&clearTimeout(f)}},[]),b})(am),ao=(0,q.useCallback)(()=>{aj()},[aj]),ap=(0,q.useCallback)(()=>{W(!1),Y(!1),D(null),S.current+=1,K.current=null,k(null),ae()},[ae]);(0,q.useEffect)(()=>{aj()},[aj]),(0,q.useEffect)(()=>{let a=setInterval(am,"live"===an?3e4:5e3);return()=>clearInterval(a)},[an,am]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||j||C)return void W(!1);let a=setTimeout(()=>W(!0),2e4);return()=>clearTimeout(a)},[c,j,C]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||j||C)return void Y(!1);let a=setTimeout(()=>Y(!0),1e4);return()=>clearTimeout(a)},[c,j,C]);let aq=(0,q.useCallback)((a,b=800)=>{J.current={file:a,until:Date.now()+b},i.current=a,(0,q.startTransition)(()=>h(a))},[]),ar=(0,q.useCallback)((a,b="smooth")=>{aq(a),aa(b=>{if(b.has(a)){let c=new Set(b);return c.delete(a),c}return b});let c=a=>{a.scrollIntoView({behavior:b,block:"start"})},d=document.querySelector(hG(a));if(d)return void c(d);let e=document.querySelector("#diff-container");if(!e)return;let f=new MutationObserver(()=>{let b=document.querySelector(hG(a));b&&(f.disconnect(),c(b))});f.observe(e,{childList:!0,subtree:!0}),setTimeout(()=>f.disconnect(),5e3)},[aq,aa]),as=(0,q.useCallback)(a=>{let b=J.current;if(b){if(Date.now()>b.until)J.current=null;else if(b.file!==a)return}i.current!==a&&(i.current=a,(0,q.startTransition)(()=>h(a)))},[]),at=(0,q.useCallback)(a=>{aq(a),aa(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[aq,aa]),au=(0,q.useCallback)(()=>{aa(()=>new Set((c?.files??[]).map(a=>a.file)))},[c,aa]),av=(0,q.useCallback)(()=>{aa(()=>new Set)},[aa]);(0,q.useEffect)(()=>{let a=a=>{if(!(a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLInputElement)){if("s"!==a.key||a.metaKey||a.ctrlKey||m(a=>"split"===a?"stacked":"split"),"/"!==a.key&&"t"!==a.key.toLowerCase()||a.metaKey||a.ctrlKey||(a.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"c"===a.key.toLowerCase()&&!a.metaKey&&!a.ctrlKey&&g){if(a.shiftKey)return void au();at(g)}if("e"!==a.key.toLowerCase()||!a.shiftKey||a.metaKey||a.ctrlKey||av(),"r"!==a.key||a.metaKey||a.ctrlKey||aj(),"j"===a.key||"k"===a.key){let b=c?.files??[];if(0===b.length)return;let d=b.findIndex(a=>a.file===g),e="j"===a.key?b[d+1]:b[d-1];e&&ar(e.file)}}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[au,av,c,aj,ar,g,m,at]);let aw=(0,q.useCallback)(a=>{I.current=a,H(a),ai(),aj(!1)},[ai,aj,H]),ax=(0,q.useCallback)(async(a,b,c,d,e)=>{let g=await fetch("/api/comments",{body:JSON.stringify({body:d,file:a,lineNumber:b,side:"deletions"===c?"left":"right",tag:e}),headers:{"Content-Type":"application/json"},method:"POST"});if(!g.ok)return console.error("[diffhub] add comment failed",{error:(await g.json().catch(()=>({error:"Failed to save comment"}))).error??`Failed to save comment (${g.status})`}),!1;let h=await g.json();return f(a=>[...a,h]),!0},[]),ay=(0,q.useCallback)(async a=>{let b=await fetch(`/api/comments?id=${a}`,{method:"DELETE"});return b.ok?(f(b=>b.filter(b=>b.id!==a)),!0):(console.error("[diffhub] delete comment failed",{error:(await b.json().catch(()=>({error:"Failed to delete comment"}))).error??`Failed to delete comment (${b.status})`}),!1)},[]),az=A&&null!==c?{detail:A,label:"Background refresh failed",tone:"destructive"}:C&&j?{detail:C,label:"Diff refresh failed",tone:"destructive"}:"fallback"===an?{detail:"Live watch is unavailable, so the app is polling every 5 seconds",label:"Polling fallback",tone:"warning"}:null;return A&&null===c?(0,o.jsx)(gH,{className:"min-h-svh",defaultOpen:b,children:(0,o.jsxs)(gK,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,o.jsxs)("div",{className:"rounded-lg border border-destructive/30 bg-destructive/10 px-6 py-4 text-sm text-destructive max-w-md text-center",children:[(0,o.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,o.jsx)("p",{className:"text-xs opacity-80",children:A})]}),(0,o.jsx)(a6,{variant:"outline",onClick:ao,children:"Retry"})]})}):(0,o.jsxs)(gH,{className:"min-h-svh",defaultOpen:b,style:{"--sidebar-width":`${w}px`},children:[(0,o.jsx)(g5,{files:c?.files??[],selectedFile:g,onSelectFile:ar,comments:e,filterQuery:u,onFilterChange:v,isLoading:null===c,insertions:c?.insertions??0,deletions:c?.deletions??0,sidebarWidth:w,onSidebarWidthChange:x}),(0,o.jsxs)(gK,{className:"flex flex-col min-h-svh",children:[(0,o.jsx)("div",{className:"sticky top-0 z-20",children:(0,o.jsx)(gS,{branch:c?.branch??"…",baseBranch:c?.baseBranch??"main",refreshing:y||E,fileWatchState:an,comments:e,diffMode:G,onDiffModeChange:aw,layout:l,onLayoutChange:m,syncNotice:az})}),(0,o.jsx)(hI,{filesData:c,deferredDiffData:j,diffError:C,syncNotice:az,layout:l,comments:e,onAddComment:ax,onDeleteComment:ay,selectedFile:g,collapsedFiles:$,onToggleCollapse:at,onActiveFileChange:as,repoPath:a,diffWatchdogTripped:V,diffHintShown:X,onRetryDiff:ap})]})]})}],85340)}];
39
+ `)},lineAnnotations:x,renderAnnotation:y,renderGutterUtility:z},a)})}else C=(0,o.jsx)(hr,{onRender:A,variant:h?"large":"auto",changes:g?.changes});else C=(0,o.jsx)("div",{className:"px-4 py-6 text-sm text-muted-foreground",children:"No textual patch available for this file."});return(0,o.jsxs)("div",{"data-filename":a,className:"font-sans",children:[(0,o.jsx)(hb,{file:a,insertions:g?.insertions??0,deletions:g?.deletions??0,commentCount:f.length,repoPath:m,collapsed:i,active:j,onToggleCollapse:l,headingId:v,panelId:w}),(0,o.jsx)("div",{id:w,role:"region","aria-labelledby":v,hidden:B,children:C})]})}),hz=(0,g7.memo)(function({file:a,filePatch:b,layout:c,prerenderedHTML:d,deferPatchRendering:e,isLargeFile:f,forceRender:g,comments:h,fileStat:i,collapsed:j,active:k,onToggleCollapse:l,onVisible:m,repoPath:n,onAddComment:p,onDeleteComment:q}){let r=(0,g7.useRef)(null),[s,t]=(0,g7.useState)(null),u=e||f,[v,w]=(0,g7.useState)(()=>!u||g);!v&&(g||null!==s)&&w(!0);let x=(0,g7.useCallback)(()=>{w(!0)},[]),y=v||g||null!==s||!u,z=(0,g7.useRef)(m);(0,g7.useEffect)(()=>{z.current=m},[m]),(0,g7.useEffect)(()=>{let b=r.current;if(!b||"u"<typeof IntersectionObserver)return;let c=new IntersectionObserver(b=>{let[c]=b;if(c){var d;c.isIntersecting&&c.intersectionRatio>=.35&&(d=z.current,hn=a,ho=d,0===hp&&(hp=requestAnimationFrame(()=>{hp=0;let a=hn,b=ho;hn=null,ho=null,a&&b&&b(a)})))}},{rootMargin:"-52px 0px -55% 0px",threshold:[.35,.6]});return c.observe(b),()=>c.disconnect()},[a]);let A=hw(a),B=(0,g7.useMemo)(()=>{let a=k?"auto":"none";return j||y?{overflowAnchor:a}:{minHeight:Math.min(960,Math.max(128,22*(i?.changes??1))),overflowAnchor:a}},[k,j,i,y]);return(0,o.jsx)("section",{ref:r,id:A,"data-file-section":a,className:"scroll-mt-[52px]",style:B,children:(0,o.jsx)(hy,{file:a,filePatch:b,layout:c,prerenderedHTML:d?.[c],shouldRenderPatch:y,comments:h,fileStat:i,isLargeFile:f,collapsed:j,active:k,sectionId:A,onToggleCollapse:l,repoPath:n,commentTarget:s,onCommentTargetChange:t,onRenderPatch:x,onAddComment:p,onDeleteComment:q})})}),hA=({patchesByFile:a,prerenderedHTMLByFile:b,layout:c,comments:d,onAddComment:e,onDeleteComment:f,activeFileId:g,fileStats:h,collapsedFiles:i,onToggleCollapse:j,onActiveFileChange:k,forceRenderFiles:l,repoPath:m})=>{let n=(0,g7.useMemo)(()=>{let a=new Map;for(let b of h)a.set(b.file,b);return a},[h]),p=(0,g7.useMemo)(()=>(a=>{let b={files:[],folders:new Map};for(let c of a){let a=c.split("/"),d=b;for(let b=0;b<a.length-1;b+=1){let c=a[b];d.folders.has(c)||d.folders.set(c,{files:[],folders:new Map});let e=d.folders.get(c);e&&(d=e)}d.files.push(c)}let c=[],d=a=>{for(let[,b]of[...a.folders.entries()].toSorted((a,b)=>a[0].localeCompare(b[0])))d(b);let b=[...a.files].toSorted((a,b)=>{let c=a.split("/").at(-1)??a,d=b.split("/").at(-1)??b;return c.localeCompare(d)});c.push(...b)};return d(b),c})([...h.map(a=>a.file),...Object.keys(a).filter(a=>!n.has(a))]),[n,h,a]),q=(0,g7.useMemo)(()=>{let a=new Map;for(let b of d){let c=a.get(b.file);c?c.push(b):a.set(b.file,[b])}return a},[d]),r=p.length>=24&&0===Object.keys(b??{}).length,s=(0,g7.useMemo)(()=>{let a=new Map;for(let b of p)a.set(b,()=>j(b));return a},[p,j]);return 0===p.length?(0,o.jsxs)(he,{className:"h-full",children:[(0,o.jsxs)(hf,{children:[(0,o.jsx)(hh,{variant:"icon",children:(0,o.jsx)(hc,{})}),(0,o.jsx)(hi,{children:"No changes"}),(0,o.jsx)(hj,{children:"The working tree is clean relative to the base branch"})]}),(0,o.jsx)(hk,{children:(0,o.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,o.jsx)(a7,{children:"r"})," to refresh"]})})]}):(0,o.jsx)("div",{id:"diff-container",children:p.map(d=>{var h;let j=n.get(d),p=a[d]??"",t=void 0!==j&&(h=p.length,!j.binary&&(j.changes>=500||void 0!==h&&h>=5e5));return(0,o.jsx)(hz,{file:d,filePatch:p,layout:c,prerenderedHTML:b?.[d],deferPatchRendering:r,isLargeFile:t,forceRender:l?.has(d)??!1,comments:q.get(d)??hm,fileStat:j,collapsed:i.has(d),active:g===d,onToggleCollapse:s.get(d),onVisible:k,repoPath:m,onAddComment:e,onDeleteComment:f},d)})})},hB=[1e3,2e3,5e3],hC=(a,b,c)=>{let[d,e]=(0,q.useState)(b);return(0,q.useEffect)(()=>{try{let b=localStorage.getItem(a);null!==b&&(!c||c.includes(b))&&e(b)}catch{}},[a,c]),[d,(0,q.useCallback)(b=>{e(c=>{let d="function"==typeof b?b(c):b;try{localStorage.setItem(a,d)}catch{}return d})},[a])]},hD=["split","stacked"],hE=["all","uncommitted"],hF=({text:a,pulse:b=!1})=>(0,o.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,o.jsx)("div",{className:`text-muted-foreground text-sm${b?" animate-pulse":""}`,children:a})}),hG=a=>{let b=hw(a).replaceAll(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,"\\$&");return`#${b}`},hH=({notice:a})=>{let b="border-border bg-muted/40 text-muted-foreground";return"destructive"===a.tone?b="border-destructive/30 bg-destructive/10 text-destructive":"warning"===a.tone&&(b="border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400"),(0,o.jsx)("div",{className:`border-b px-4 py-2 text-xs ${b}`,children:(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"font-medium",children:a.label}),a.detail&&(0,o.jsx)("span",{className:"text-xs opacity-80",children:a.detail})]})})},hI=({filesData:a,deferredDiffData:b,diffError:c,syncNotice:d,layout:e,comments:f,onAddComment:g,onDeleteComment:h,selectedFile:i,collapsedFiles:j,forceRenderFiles:k,onToggleCollapse:l,onActiveFileChange:m,repoPath:n,diffWatchdogTripped:p,diffHintShown:q,onRetryDiff:r})=>null===a?(0,o.jsx)(hF,{text:"Loading diff…",pulse:!0}):0===a.files.length?(0,o.jsx)(hF,{text:"No changes"}):b?(0,o.jsxs)(o.Fragment,{children:[d&&(0,o.jsx)(hH,{notice:d}),(0,o.jsx)(hA,{patchesByFile:b.patchesByFile,prerenderedHTMLByFile:b.prerenderedHTMLByFile,layout:e,comments:f,onAddComment:g,onDeleteComment:h,activeFileId:i,fileStats:a.files,collapsedFiles:j,forceRenderFiles:k,onToggleCollapse:l,onActiveFileChange:m,repoPath:n})]}):c?(0,o.jsx)(hF,{text:c}):p?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[(0,o.jsx)("div",{className:"text-muted-foreground text-sm",children:"Still loading the diff…"}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."}),(0,o.jsx)(a6,{size:"sm",variant:"default",onClick:r,children:"Retry"})]}):q?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,o.jsx)("div",{className:"text-muted-foreground animate-pulse text-sm",children:`Loading diff${a?` (${a.files.length} files)…`:"…"}`}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."})]}):(0,o.jsx)(hF,{text:`Loading diff${a?` (${a.files.length} files)…`:"…"}`,pulse:!0});a.s(["DiffApp",0,({repoPath:a,defaultSidebarOpen:b=!0})=>{let[c,d]=(0,q.useState)(null),e=(0,q.useRef)(null),[f,g]=(0,q.useState)([]),h=(0,q.useRef)([]),[i,j]=(0,q.useState)(null),k=(0,q.useRef)(null),[l,m]=(0,q.useState)(null),[n,r]=hC("diffhub-layout","stacked",hD),{resolvedTheme:s}=(0,p.useTheme)(),t="light"===s?"light":"dark",u=(0,q.useRef)(n),v=(0,q.useRef)(t),[w,x]=(0,q.useState)(""),[y,z]=(0,q.useState)(256),[A,B]=(0,q.useState)(!1),[C,D]=(0,q.useState)(null),[E,F]=(0,q.useState)(null),[G,H]=(0,q.useState)(!1),[I,J]=hC("diffhub-diffMode","all",hE),K=(0,q.useRef)(I),L=(0,q.useRef)(null),M=(0,q.useRef)(null),N=(0,q.useRef)(null),O=(0,q.useRef)(null),P=(0,q.useRef)(!1),Q=(0,q.useRef)(!1),R=(0,q.useRef)(()=>Promise.resolve()),S=(0,q.useRef)(!1),T=(0,q.useRef)(!1),U=(0,q.useRef)(0),V=(0,q.useRef)(0),W=(0,q.useRef)(null),[X,Y]=(0,q.useState)(!1),[Z,$]=(0,q.useState)(!1),[,_]=(0,q.useTransition)(),aa=(0,q.useRef)(null),[ab,ac]=(0,q.useState)(()=>new Set),[ad,ae]=(0,q.useState)(()=>new Set);(0,q.useEffect)(()=>{K.current=I},[I]),(0,q.useEffect)(()=>{e.current=c},[c]),(0,q.useEffect)(()=>{h.current=f},[f]),(0,q.useEffect)(()=>{ac(new Set([]))},[a]);let af=(0,q.useCallback)(b=>{ac(c=>{let d=b(c);if(d===c)return c;try{localStorage.setItem(`diffhub-collapsed:${a}`,JSON.stringify([...d]))}catch{}return d})},[a]),ag=(0,q.useRef)(l),ah=(0,q.useRef)(E);(0,q.useEffect)(()=>{ag.current=l},[l]),(0,q.useEffect)(()=>{ah.current=E},[E]);let ai=(0,q.useCallback)(()=>{},[]);(0,q.useLayoutEffect)(()=>{aa.current});let aj=(0,q.useCallback)(()=>{let a=new URLSearchParams;"uncommitted"===K.current&&a.set("mode","uncommitted");let b=a.toString();return b?`?${b}`:""},[]),ak=(0,q.useCallback)(()=>{let a=new URLSearchParams;O.current&&a.set("generation",O.current),"uncommitted"===K.current&&a.set("mode","uncommitted"),a.set("layout",u.current),a.set("theme",v.current);let b=a.toString();return b?`?${b}`:""},[]),al=(0,q.useCallback)(async a=>{let b=O.current,c=N.current;W.current=Date.now(),Y(!1),F(null),console.info("[diffhub] fetchDiff start",{fingerprint:c,generation:b,mode:K.current,requestId:a});let d=new AbortController,e=setTimeout(()=>{d.abort(Error("Diff request timed out"))},15e3);try{var f,g;let e,h,i=await fetch(`/api/diff${ak()}`,{signal:d.signal});if(!i.ok){let d=(await i.json().catch(()=>({error:"Failed to load diff"}))).error??`Failed to load diff (${i.status})`;console.error("[diffhub] fetchDiff non-ok response",{fingerprint:c,generation:b,mode:K.current,requestId:a,responseStatus:i.status,responseStatusText:i.statusText,serverError:d}),a===U.current&&F(d);return}let j=(f=await i.json(),g=c??"unknown",e=f.patchesByFile??Object.fromEntries((a=>{let b=new Map,c=/^diff --git a\/(.+?) b\/(.+)$/gm,d=[],e=c.exec(a);for(;e;)d.push({file:e[2],start:e.index}),e=c.exec(a);for(let[c,e]of d.entries()){let f=d[c+1]?.start??a.length,g=a.slice(e.start,f).trimEnd();b.set(e.file,g?`${g}
40
+ `:"")}return b})(f.patch??"")),{baseBranch:f.baseBranch,branch:f.branch,generation:f.generation,mergeBase:f.mergeBase,patchesByFile:e,prerenderedHTMLByFile:f.prerenderedHTMLByFile,reviewKeysByFile:f.reviewKeysByFile??(h=f.generation,Object.fromEntries(Object.entries(e).map(([a,b])=>[a,`${h}:${(a=>{let b=0;for(let c=0;c<a.length;c+=1)b=Math.trunc(Math.imul(31,b)+(a.codePointAt(c)??0));return Math.abs(b).toString(36)})(`${a}:${b}`)}`]))),sourceFingerprint:g});if(a!==U.current||c!==N.current||b!==O.current){console.info("[diffhub] fetchDiff response stale",{fingerprint:c,generation:b,latestRequestId:U.current,requestId:a}),null!==O.current&&(V.current+=1,V.current>=3&&(console.warn("[diffhub] fetchDiff stale-drop limit reached, invalidating",{drops:V.current}),V.current=0,U.current+=1,M.current=null,null===ag.current&&m(null)),T.current=!0);return}V.current=0,console.info("[diffhub] fetchDiff success",{fileCount:Object.keys(j.patchesByFile).length,fingerprint:c,generation:j.generation,requestId:a}),ai(),_(()=>m(j))}catch(d){console.error("[diffhub] fetchDiff threw",{error:d,fingerprint:c,generation:b,mode:K.current,requestId:a}),a===U.current&&F(d instanceof Error?d.message:String(d))}finally{clearTimeout(e)}},[ak,ai,_]),am=(0,q.useCallback)(async()=>{if(T.current=!0,!S.current){for(S.current=!0,H(!0);T.current;)T.current=!1,U.current+=1,await al(U.current);S.current=!1,H(!1)}},[al]);(0,q.useEffect)(()=>{(u.current!==n||v.current!==t)&&(u.current=n,v.current=t,U.current+=1,M.current=null,F(null),am())},[n,t,am]);let an=(0,q.useCallback)(a=>{ae(b=>{let c=null;for(let d of a)!d||b.has(d)||(c??=new Set(b)).add(d);return c??b})},[]),ao=(0,q.useCallback)(a=>{if(N.current=a.fingerprint,O.current=a.generation,0===a.files.length){k.current=null,U.current+=1,(0,q.startTransition)(()=>{j(null),m(null)}),F(null),M.current=a.fingerprint;return}let b=k.current;b&&a.files.some(a=>a.file===b)||(k.current=b=a.files[0]?.file??null,(0,q.startTransition)(()=>j(b))),an([b]);let c=a.fingerprint!==M.current,d=ag.current?.generation===a.generation;(c||!d||null!==ah.current)&&(M.current=a.fingerprint,c&&(U.current+=1),am())},[an,am]),ap=(0,q.useCallback)(()=>{U.current+=1,M.current=null,N.current=null,O.current=null,m(null),F(null)},[]),aq=(0,q.useCallback)(async(a=!1)=>{var b,c;let f=()=>{a||B(!1),P.current=!1,Q.current&&(Q.current=!1,queueMicrotask(()=>{R.current(!0)}))};if(P.current){Q.current=!0;return}P.current=!0,a||B(!0),D(null);let i=await Promise.all([fetch(`/api/files${aj()}`),fetch("/api/comments").then(async a=>{if(!a.ok)throw Error(`Failed to load comments (${a.status})`);return await a.json()}).catch(a=>(console.error("[diffhub] comments refresh failed",{error:a}),null))]).catch(a=>(D(a instanceof Error?a.message:String(a)),null));if(!i)return void f();let[j,k]=i;if(!j.ok){D((await j.json().catch(()=>({error:"Network error"}))).error??"Failed to load files"),f();return}let l=await j.json(),m=(b=e.current,!(b&&b.baseBranch===l.baseBranch&&b.branch===l.branch&&b.deletions===l.deletions&&b.fingerprint===l.fingerprint&&b.generation===l.generation&&b.insertions===l.insertions&&b.files.length===l.files.length&&b.files.every((a,b)=>{let c=l.files[b];return void 0!==c&&a.binary===c.binary&&a.changes===c.changes&&a.deletions===c.deletions&&a.file===c.file&&a.insertions===c.insertions}))),n=null!==k&&(c=h.current,!(c.length===k.length&&c.every((a,b)=>{let c=k[b];return void 0!==c&&a.body===c.body&&a.createdAt===c.createdAt&&a.file===c.file&&a.id===c.id&&a.lineNumber===c.lineNumber&&a.side===c.side&&a.tag===c.tag})));(m||n)&&(ai(),m&&(e.current=l),n&&null!==k&&(h.current=k),(0,q.startTransition)(()=>{m&&d(l),n&&null!==k&&g(k)})),ao(l),f()},[aj,ai,ao]);(0,q.useEffect)(()=>{R.current=aq},[aq]);let ar=(0,q.useRef)(!1),as=(0,q.useRef)(!1);(0,q.useEffect)(()=>{let a=null,b=()=>{ar.current=!0,a&&clearTimeout(a),a=setTimeout(()=>{ar.current=!1,as.current&&(as.current=!1,R.current(!0))},200)};return window.addEventListener("scroll",b,{passive:!0}),()=>{window.removeEventListener("scroll",b),a&&clearTimeout(a)}},[]);let at=(0,q.useCallback)(()=>{if(ar.current){as.current=!0;return}R.current(!0)},[]),au=(a=>{let[b,c]=(0,q.useState)("connecting"),d=(0,q.useEffectEvent)(a),e=(0,q.useRef)(null);return(0,q.useEffect)(()=>{let a=!1,b=0,f=null,g=new AbortController,h=async()=>{if(!a)try{let f=null===e.current?"":`?revision=${e.current}`,i=await fetch(`/api/watch${f}`,{cache:"no-store",signal:g.signal});if(a)return;if(!i.ok)throw Error(`Watch request failed with status ${i.status}`);let j=await i.json();if(a)return;b=0,c("live");let k=e.current;e.current=j.revision,j.changed&&null!==k&&j.revision!==k&&d(),a||queueMicrotask(()=>{a||h()})}catch(d){if(a||g.signal.aborted)return;if(console.error("[diffhub] file watch failed",{error:d,failureCount:b+=1}),b>10){console.error("[diffhub] file watch: max retries exceeded, stopping"),c("fallback");return}c(b>=hB.length?"fallback":"connecting"),f=setTimeout(()=>{f=null,a||h()},hB[Math.min(b-1,hB.length-1)])}};return c("connecting"),h(),()=>{a=!0,g.abort(),f&&clearTimeout(f)}},[]),b})(at),av=(0,q.useCallback)(()=>{aq()},[aq]),aw=(0,q.useCallback)(()=>{Y(!1),$(!1),F(null),U.current+=1,M.current=null,null===ag.current&&m(null),am()},[am]);(0,q.useEffect)(()=>{aq()},[aq]),(0,q.useEffect)(()=>{let a=setInterval(at,"live"===au?3e4:5e3);return()=>clearInterval(a)},[au,at]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||l||E)return void Y(!1);let a=setTimeout(()=>Y(!0),2e4);return()=>clearTimeout(a)},[c,l,E]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||l||E)return void $(!1);let a=setTimeout(()=>$(!0),1e4);return()=>clearTimeout(a)},[c,l,E]);let ax=(0,q.useCallback)((a,b=800)=>{L.current={file:a,until:Date.now()+b},k.current=a,(0,q.startTransition)(()=>j(a))},[]),ay=(0,q.useCallback)((a,b="smooth")=>{ax(a);let d=c?.files.map(a=>a.file)??[],e=d.indexOf(a);an([a,d[e-1],d[e+1]]),af(b=>{if(b.has(a)){let c=new Set(b);return c.delete(a),c}return b});let f=a=>{a.scrollIntoView({behavior:b,block:"start"})},g=document.querySelector(hG(a));if(g)return void f(g);let h=document.querySelector("#diff-container");if(!h)return;let i=new MutationObserver(()=>{let b=document.querySelector(hG(a));b&&(i.disconnect(),f(b))});i.observe(h,{childList:!0,subtree:!0}),setTimeout(()=>i.disconnect(),5e3)},[an,c,ax,af]),az=(0,q.useCallback)(a=>{let b=L.current;if(b){if(Date.now()>b.until)L.current=null;else if(b.file!==a)return}k.current!==a&&(k.current=a,(0,q.startTransition)(()=>j(a)))},[]),aA=(0,q.useCallback)(a=>{ax(a),af(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[ax,af]),aB=(0,q.useCallback)(()=>{af(()=>new Set((c?.files??[]).map(a=>a.file)))},[c,af]),aC=(0,q.useCallback)(()=>{af(()=>new Set)},[af]);(0,q.useEffect)(()=>{let a=a=>{if(!(a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLInputElement)){if("s"!==a.key||a.metaKey||a.ctrlKey||r(a=>"split"===a?"stacked":"split"),"/"!==a.key&&"t"!==a.key.toLowerCase()||a.metaKey||a.ctrlKey||(a.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"c"===a.key.toLowerCase()&&!a.metaKey&&!a.ctrlKey&&i){if(a.shiftKey)return void aB();aA(i)}if("e"!==a.key.toLowerCase()||!a.shiftKey||a.metaKey||a.ctrlKey||aC(),"r"!==a.key||a.metaKey||a.ctrlKey||aq(),"j"===a.key||"k"===a.key){let b=c?.files??[];if(0===b.length)return;let d=b.findIndex(a=>a.file===i),e="j"===a.key?b[d+1]:b[d-1];e&&ay(e.file)}}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[aB,aC,c,aq,ay,i,r,aA]);let aD=(0,q.useCallback)(a=>{K.current=a,J(a),ap(),aq(!1)},[ap,aq,J]),aE=(0,q.useCallback)(async(a,b,c,d,e)=>{let f=await fetch("/api/comments",{body:JSON.stringify({body:d,file:a,lineNumber:b,side:"deletions"===c?"left":"right",tag:e}),headers:{"Content-Type":"application/json"},method:"POST"});if(!f.ok)return console.error("[diffhub] add comment failed",{error:(await f.json().catch(()=>({error:"Failed to save comment"}))).error??`Failed to save comment (${f.status})`}),!1;let h=await f.json();return g(a=>[...a,h]),!0},[]),aF=(0,q.useCallback)(async a=>{let b=await fetch(`/api/comments?id=${a}`,{method:"DELETE"});return b.ok?(g(b=>b.filter(b=>b.id!==a)),!0):(console.error("[diffhub] delete comment failed",{error:(await b.json().catch(()=>({error:"Failed to delete comment"}))).error??`Failed to delete comment (${b.status})`}),!1)},[]),aG=C&&null!==c?{detail:C,label:"Background refresh failed",tone:"destructive"}:E&&l?{detail:E,label:"Diff refresh failed",tone:"destructive"}:"fallback"===au?{detail:"Live watch is unavailable, so the app is polling every 5 seconds",label:"Polling fallback",tone:"warning"}:null;return C&&null===c?(0,o.jsx)(gH,{className:"min-h-svh",defaultOpen:b,children:(0,o.jsxs)(gK,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,o.jsxs)("div",{className:"rounded-lg border border-destructive/30 bg-destructive/10 px-6 py-4 text-sm text-destructive max-w-md text-center",children:[(0,o.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,o.jsx)("p",{className:"text-xs opacity-80",children:C})]}),(0,o.jsx)(a6,{variant:"outline",onClick:av,children:"Retry"})]})}):(0,o.jsxs)(gH,{className:"min-h-svh",defaultOpen:b,style:{"--sidebar-width":`${y}px`},children:[(0,o.jsx)(g5,{files:c?.files??[],selectedFile:i,onSelectFile:ay,comments:f,filterQuery:w,onFilterChange:x,isLoading:null===c,insertions:c?.insertions??0,deletions:c?.deletions??0,sidebarWidth:y,onSidebarWidthChange:z}),(0,o.jsxs)(gK,{className:"flex flex-col min-h-svh",children:[(0,o.jsx)("div",{className:"sticky top-0 z-20",children:(0,o.jsx)(gS,{branch:c?.branch??"…",baseBranch:c?.baseBranch??"main",refreshing:A||G,fileWatchState:au,comments:f,diffMode:I,onDiffModeChange:aD,layout:n,onLayoutChange:r,syncNotice:aG})}),(0,o.jsx)(hI,{filesData:c,deferredDiffData:l,diffError:E,syncNotice:aG,layout:n,comments:f,onAddComment:aE,onDeleteComment:aF,selectedFile:i,collapsedFiles:ab,forceRenderFiles:ad,onToggleCollapse:aA,onActiveFileChange:az,repoPath:a,diffWatchdogTripped:X,diffHintShown:Z,onRetryDiff:aw})]})]})}],85340)}];
41
41
 
42
42
  //# sourceMappingURL=_07okxca._.js.map
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/8rORhRJDOFN7qtGNAmPym/_buildManifest.js",
11
- "static/8rORhRJDOFN7qtGNAmPym/_ssgManifest.js",
12
- "static/8rORhRJDOFN7qtGNAmPym/_clientMiddlewareManifest.js"
10
+ "static/X3k3ryHO5ngxx_6ANrAAl/_buildManifest.js",
11
+ "static/X3k3ryHO5ngxx_6ANrAAl/_ssgManifest.js",
12
+ "static/X3k3ryHO5ngxx_6ANrAAl/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/0ijev3dgvkfb8.js",
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0j4udl9rut-37.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/13t_ihnxxnv7q.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><script src="/_next/static/chunks/0dpr.umiw20gr.js" async=""></script><script src="/_next/static/chunks/11jy8da-iayqc.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>DiffHub</title><meta name="description" content="GitHub PR-style local diff viewer"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="bg-background antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[87710,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ThemeProvider\"]\n3:I[71249,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"DiffsWorkerProvider\",1]\n4:I[39756,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n6:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ViewportBoundary\"]\nc:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"MetadataBoundary\"]\ne:I[68027,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0j4udl9rut-37.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/029-i5m87mr_j.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0dpr.umiw20gr.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/11jy8da-iayqc.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"bg-background antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"disableTransitionOnChange\":true,\"children\":[[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],false]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"8rORhRJDOFN7qtGNAmPym\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[27201,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"DiffHub\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"GitHub PR-style local diff viewer\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0j4udl9rut-37.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/13t_ihnxxnv7q.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><script src="/_next/static/chunks/0dpr.umiw20gr.js" async=""></script><script src="/_next/static/chunks/11jy8da-iayqc.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>DiffHub</title><meta name="description" content="GitHub PR-style local diff viewer"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="bg-background antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[87710,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ThemeProvider\"]\n3:I[71249,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"DiffsWorkerProvider\",1]\n4:I[39756,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n6:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ViewportBoundary\"]\nc:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"MetadataBoundary\"]\ne:I[68027,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0j4udl9rut-37.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/029-i5m87mr_j.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0dpr.umiw20gr.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/11jy8da-iayqc.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"bg-background antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"disableTransitionOnChange\":true,\"children\":[[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],false]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"X3k3ryHO5ngxx_6ANrAAl\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[27201,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"DiffHub\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"GitHub PR-style local diff viewer\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"8rORhRJDOFN7qtGNAmPym\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"X3k3ryHO5ngxx_6ANrAAl\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"BeOhoGT9/VxVU3sjrQ/Qa3NLQ6SNiTRYBf02lGNlp2Y=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"68qj+Y+Ng0B0ZCbnmGVhcdB7Nq/o9rVvxBkJtpNhJIg=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "BeOhoGT9/VxVU3sjrQ/Qa3NLQ6SNiTRYBf02lGNlp2Y="
4
+ "encryptionKey": "68qj+Y+Ng0B0ZCbnmGVhcdB7Nq/o9rVvxBkJtpNhJIg="
5
5
  }