@thxgg/steward 0.1.13 → 0.1.14

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 (84) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-k8zG74W.js +61 -0
  3. package/.output/public/_nuxt/B-5VWizU.js +1 -0
  4. package/.output/public/_nuxt/{Bq6edYSd.js → BDqHART1.js} +1 -1
  5. package/.output/public/_nuxt/BMAq0QVD.js +42 -0
  6. package/.output/public/_nuxt/BPeTf9dd.js +1 -0
  7. package/.output/public/_nuxt/{dOaEkD-3.js → BubpH_wW.js} +1 -1
  8. package/.output/public/_nuxt/C2HGkiSP.js +1 -0
  9. package/.output/public/_nuxt/CMu9GKTH.js +4 -0
  10. package/.output/public/_nuxt/{BZ1iIOYp.js → CVvrkZkq.js} +1 -1
  11. package/.output/public/_nuxt/C_NevjZD.js +3 -0
  12. package/.output/public/_nuxt/Detail.CzXXlavD.css +1 -0
  13. package/.output/public/_nuxt/_prd_.KTotLoF_.css +1 -0
  14. package/.output/public/_nuxt/builds/latest.json +1 -1
  15. package/.output/public/_nuxt/builds/meta/b57a8fc3-6a38-4f58-b2ae-54768412ea40.json +1 -0
  16. package/.output/public/_nuxt/entry.LcDOtJnR.css +1 -0
  17. package/.output/public/_nuxt/{BFv4l3hn.js → nYTZJhvT.js} +1 -1
  18. package/.output/public/_nuxt/{kTT8NKtq.js → qKRNa41x.js} +1 -1
  19. package/.output/public/_nuxt/qt5OEWHC.js +1 -0
  20. package/.output/public/_nuxt/{C897Egk9.js → uTyw4SRK.js} +1 -1
  21. package/.output/public/_nuxt/{DoNqd8jQ.js → wbj-mIhK.js} +1 -1
  22. package/.output/server/chunks/_/task-graph.mjs +196 -0
  23. package/.output/server/chunks/_/task-graph.mjs.map +1 -0
  24. package/.output/server/chunks/build/{_prd_-CkKfJB6U.mjs → Detail-DC-KJQ1f.mjs} +911 -1688
  25. package/.output/server/chunks/build/Detail-DC-KJQ1f.mjs.map +1 -0
  26. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-D0sb4vsK.mjs +4 -0
  27. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-D0sb4vsK.mjs.map +1 -0
  28. package/.output/server/chunks/build/DiffViewer-styles.CkSjCQ0r.mjs +10 -0
  29. package/.output/server/chunks/build/DiffViewer-styles.CkSjCQ0r.mjs.map +1 -0
  30. package/.output/server/chunks/build/DiffViewer-styles.FJJuYjYB.mjs +8 -0
  31. package/.output/server/chunks/build/DiffViewer-styles.FJJuYjYB.mjs.map +1 -0
  32. package/.output/server/chunks/build/_prd_-C1C4GAhW.mjs +1596 -0
  33. package/.output/server/chunks/build/_prd_-C1C4GAhW.mjs.map +1 -0
  34. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  35. package/.output/server/chunks/build/{default-B5nw9_Xg.mjs → default-DWCOHHTE.mjs} +32 -20
  36. package/.output/server/chunks/build/default-DWCOHHTE.mjs.map +1 -0
  37. package/.output/server/chunks/build/{index-CTpuP9Mj.mjs → index-CckL_NBD.mjs} +2 -2
  38. package/.output/server/chunks/build/index-CckL_NBD.mjs.map +1 -0
  39. package/.output/server/chunks/build/{index-D21S97KB.mjs → index-QVeSHT3L.mjs} +3 -3
  40. package/.output/server/chunks/build/index-QVeSHT3L.mjs.map +1 -0
  41. package/.output/server/chunks/build/repo-graph-CTEkxiYd.mjs +205 -0
  42. package/.output/server/chunks/build/repo-graph-CTEkxiYd.mjs.map +1 -0
  43. package/.output/server/chunks/build/server.mjs +12 -3
  44. package/.output/server/chunks/build/styles.mjs +2 -2
  45. package/.output/server/chunks/build/{usePrd-YhvN6Ary.mjs → usePrd-SqcxGyFU.mjs} +20 -2
  46. package/.output/server/chunks/build/usePrd-SqcxGyFU.mjs.map +1 -0
  47. package/.output/server/chunks/nitro/nitro.mjs +566 -534
  48. package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs +41 -0
  49. package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs.map +1 -0
  50. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/graph.get.mjs +42 -0
  51. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/graph.get.mjs.map +1 -0
  52. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/progress.get.mjs +1 -1
  53. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks/_taskId/commits.get.mjs +1 -1
  54. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks.get.mjs +1 -1
  55. package/.output/server/chunks/routes/api/repos/_repoId/prds.get.mjs +1 -1
  56. package/.output/server/node_modules/@vue-flow/background/dist/vue-flow-background.mjs +126 -0
  57. package/.output/server/node_modules/@vue-flow/background/package.json +73 -0
  58. package/.output/server/node_modules/@vue-flow/controls/dist/vue-flow-controls.mjs +207 -0
  59. package/.output/server/node_modules/@vue-flow/controls/package.json +77 -0
  60. package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +10186 -0
  61. package/.output/server/node_modules/@vue-flow/core/package.json +95 -0
  62. package/.output/server/package.json +4 -1
  63. package/dist/app/types/graph.js +1 -0
  64. package/dist/server/utils/task-graph.js +190 -0
  65. package/package.json +5 -1
  66. package/.output/public/_nuxt/BuQdImno.js +0 -1
  67. package/.output/public/_nuxt/CMUOpExW.js +0 -3
  68. package/.output/public/_nuxt/DE885CbX.js +0 -1
  69. package/.output/public/_nuxt/DomrzX-T.js +0 -76
  70. package/.output/public/_nuxt/R2cvz8mH.js +0 -4
  71. package/.output/public/_nuxt/_prd_.DYvuV73Q.css +0 -1
  72. package/.output/public/_nuxt/builds/meta/2ad99048-24f9-4cf6-8622-6c088fe0a244.json +0 -1
  73. package/.output/public/_nuxt/entry.Dk19PK4d.css +0 -1
  74. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-ZdBUa15f.mjs +0 -4
  75. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-ZdBUa15f.mjs.map +0 -1
  76. package/.output/server/chunks/build/DiffViewer-styles.CoMVrk_N.mjs +0 -8
  77. package/.output/server/chunks/build/DiffViewer-styles.CoMVrk_N.mjs.map +0 -1
  78. package/.output/server/chunks/build/DiffViewer-styles.cLfMOdMh.mjs +0 -10
  79. package/.output/server/chunks/build/DiffViewer-styles.cLfMOdMh.mjs.map +0 -1
  80. package/.output/server/chunks/build/_prd_-CkKfJB6U.mjs.map +0 -1
  81. package/.output/server/chunks/build/default-B5nw9_Xg.mjs.map +0 -1
  82. package/.output/server/chunks/build/index-CTpuP9Mj.mjs.map +0 -1
  83. package/.output/server/chunks/build/index-D21S97KB.mjs.map +0 -1
  84. package/.output/server/chunks/build/usePrd-YhvN6Ary.mjs.map +0 -1
@@ -1,41 +1,22 @@
1
- import { _ as __nuxt_component_0$4 } from './nuxt-link-SvT1nf8Z.mjs';
2
- import { defineComponent, computed, ref, watch, inject, mergeProps, unref, withCtx, createVNode, createTextVNode, isRef, openBlock, createBlock, toDisplayString, createCommentVNode, renderSlot, useModel, resolveDynamicComponent, Fragment, renderList, mergeModels, readonly, useSSRContext } from 'vue';
3
- import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrRenderSlot, ssrRenderList, ssrRenderVNode, ssrRenderClass, ssrRenderStyle } from 'vue/server-renderer';
4
- import { Loader2, AlertCircle, RefreshCw, FileText, LayoutGrid, User, Calendar, CircleDot, ExternalLink, Circle, CheckCircle2, Clock, ArrowLeft, Tag, AlertTriangle, ListOrdered, CheckSquare, Check, Link2, Diff, PlayCircle, X, Keyboard, FileDiff, FileCode, GitCommit, Plus, Minus, FolderGit2, ArrowDown, ArrowUp, ArrowRight, FileWarning, ChevronDown, Link, Link2Off, FileEdit, FileX, FilePlus } from 'lucide-vue-next';
5
- import { cva } from 'class-variance-authority';
6
- import { reactiveOmit } from '@vueuse/core';
7
- import { useForwardPropsEmits, TabsRoot, TabsList as TabsList$1, useForwardProps, TabsTrigger as TabsTrigger$1, TabsContent as TabsContent$1, Primitive, DialogRoot, DialogPortal, DialogContent, DialogClose, DialogTitle, DialogDescription, Separator as Separator$1, DialogOverlay, TooltipProvider as TooltipProvider$1, TooltipRoot, TooltipTrigger as TooltipTrigger$1, TooltipPortal, TooltipContent as TooltipContent$1, TooltipArrow, ScrollAreaRoot, ScrollAreaViewport, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaThumb, DialogTrigger } from 'reka-ui';
8
- import { u as useRepos, a as usePrd, b as useToast, c as cn } from './usePrd-YhvN6Ary.mjs';
9
- import { marked } from 'marked';
10
- import { codeToHtml } from 'shiki';
11
- import DOMPurify from 'dompurify';
1
+ import { defineComponent, markRaw, ref, watch, computed, mergeProps, unref, withCtx, createVNode, useModel, createTextVNode, toDisplayString, openBlock, createBlock, createCommentVNode, resolveDynamicComponent, Fragment, renderList, mergeModels, renderSlot, readonly, useSSRContext } from 'vue';
2
+ import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderVNode, ssrRenderList, ssrRenderClass, ssrRenderSlot, ssrRenderAttr, ssrRenderStyle } from 'vue/server-renderer';
3
+ import { useMediaQuery, reactiveOmit } from '@vueuse/core';
4
+ import { Background } from '@vue-flow/background';
5
+ import { Controls } from '@vue-flow/controls';
6
+ import { MarkerType, VueFlow, Position, Handle } from '@vue-flow/core';
7
+ import { Loader2, AlertCircle, GitBranch, Circle, Clock3, CheckCircle2, AlertTriangle, Clock, ArrowLeft, Tag, ListOrdered, CheckSquare, Check, Link2, Diff, Calendar, ExternalLink, X, RefreshCw, Keyboard, FileDiff, FileCode, GitCommit, FileText, Plus, Minus, FolderGit2, ArrowRight, FileWarning, ChevronDown, Link, Link2Off, FileEdit, FileX, FilePlus } from 'lucide-vue-next';
8
+ import { codeToHtml } from 'shiki/bundle/web';
9
+ import { B as Button } from './index-CckL_NBD.mjs';
12
10
  import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
13
- import { codeToHtml as codeToHtml$1 } from 'shiki/bundle/web';
14
- import { B as Button } from './index-CTpuP9Mj.mjs';
15
- import { b as useRoute } from './server.mjs';
16
- import '../nitro/nitro.mjs';
17
- import 'node:http';
18
- import 'node:https';
19
- import 'node:events';
20
- import 'node:buffer';
21
- import 'node:fs';
22
- import 'node:path';
23
- import 'node:crypto';
24
- import 'node:os';
25
- import 'node:url';
26
- import 'clsx';
27
- import 'tailwind-merge';
28
- import 'vue-sonner';
29
- import '@vue/shared';
30
- import 'perfect-debounce';
31
- import '../routes/renderer.mjs';
32
- import 'vue-bundle-renderer/runtime';
33
- import 'unhead/server';
34
- import 'devalue';
35
- import 'unhead/utils';
36
- import 'vue-router';
11
+ import { Primitive, useForwardPropsEmits, DialogRoot, DialogPortal, DialogContent, DialogClose, DialogTitle, DialogDescription, Separator as Separator$1, DialogOverlay, TooltipProvider as TooltipProvider$1, TooltipRoot, TooltipTrigger as TooltipTrigger$1, TooltipPortal, TooltipContent as TooltipContent$1, TooltipArrow, ScrollAreaRoot, ScrollAreaViewport, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaThumb, DialogTrigger } from 'reka-ui';
12
+ import { c as cn, b as useToast } from './usePrd-SqcxGyFU.mjs';
13
+ import { cva } from 'class-variance-authority';
14
+ import { _ as __nuxt_component_0$3 } from './nuxt-link-SvT1nf8Z.mjs';
37
15
 
38
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
16
+ var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var y=v((Fi,ee)=>{var Vt=Object.defineProperty,At=(e,t,r)=>t in e?Vt(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),k=(e,t,r)=>At(e,typeof t!="symbol"?t+"":t,r),R=E((e,t)=>{var r="\0",n="\0",i="",o=class{constructor(d){k(this,"_isDirected",true),k(this,"_isMultigraph",false),k(this,"_isCompound",false),k(this,"_label"),k(this,"_defaultNodeLabelFn",()=>{}),k(this,"_defaultEdgeLabelFn",()=>{}),k(this,"_nodes",{}),k(this,"_in",{}),k(this,"_preds",{}),k(this,"_out",{}),k(this,"_sucs",{}),k(this,"_edgeObjs",{}),k(this,"_edgeLabels",{}),k(this,"_nodeCount",0),k(this,"_edgeCount",0),k(this,"_parent"),k(this,"_children"),d&&(this._isDirected=Object.hasOwn(d,"directed")?d.directed:true,this._isMultigraph=Object.hasOwn(d,"multigraph")?d.multigraph:false,this._isCompound=Object.hasOwn(d,"compound")?d.compound:false),this._isCompound&&(this._parent={},this._children={},this._children[n]={});}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(d){return this._label=d,this}graph(){return this._label}setDefaultNodeLabel(d){return this._defaultNodeLabelFn=d,typeof d!="function"&&(this._defaultNodeLabelFn=()=>d),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var d=this;return this.nodes().filter(h=>Object.keys(d._in[h]).length===0)}sinks(){var d=this;return this.nodes().filter(h=>Object.keys(d._out[h]).length===0)}setNodes(d,h){var f=arguments,m=this;return d.forEach(function(p){f.length>1?m.setNode(p,h):m.setNode(p);}),this}setNode(d,h){return Object.hasOwn(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=n,this._children[d]={},this._children[n][d]=true),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)}node(d){return this._nodes[d]}hasNode(d){return Object.hasOwn(this._nodes,d)}removeNode(d){var h=this;if(Object.hasOwn(this._nodes,d)){var f=m=>h.removeEdge(h._edgeObjs[m]);delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],this.children(d).forEach(function(m){h.setParent(m);}),delete this._children[d]),Object.keys(this._in[d]).forEach(f),delete this._in[d],delete this._preds[d],Object.keys(this._out[d]).forEach(f),delete this._out[d],delete this._sucs[d],--this._nodeCount;}return this}setParent(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h===void 0)h=n;else {h+="";for(var f=h;f!==void 0;f=this.parent(f))if(f===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h);}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=true,this}_removeFromParentsChildList(d){delete this._children[this._parent[d]][d];}parent(d){if(this._isCompound){var h=this._parent[d];if(h!==n)return h}}children(d=n){if(this._isCompound){var h=this._children[d];if(h)return Object.keys(h)}else {if(d===n)return this.nodes();if(this.hasNode(d))return []}}predecessors(d){var h=this._preds[d];if(h)return Object.keys(h)}successors(d){var h=this._sucs[d];if(h)return Object.keys(h)}neighbors(d){var h=this.predecessors(d);if(h){let m=new Set(h);for(var f of this.successors(d))m.add(f);return Array.from(m.values())}}isLeaf(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0}filterNodes(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var f=this;Object.entries(this._nodes).forEach(function([w,b]){d(w)&&h.setNode(w,b);}),Object.values(this._edgeObjs).forEach(function(w){h.hasNode(w.v)&&h.hasNode(w.w)&&h.setEdge(w,f.edge(w));});var m={};function p(w){var b=f.parent(w);return b===void 0||h.hasNode(b)?(m[w]=b,b):b in m?m[b]:p(b)}return this._isCompound&&h.nodes().forEach(w=>h.setParent(w,p(w))),h}setDefaultEdgeLabel(d){return this._defaultEdgeLabelFn=d,typeof d!="function"&&(this._defaultEdgeLabelFn=()=>d),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(d,h){var f=this,m=arguments;return d.reduce(function(p,w){return m.length>1?f.setEdge(p,w,h):f.setEdge(p,w),w}),this}setEdge(){var d,h,f,m,p=false,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(d=w.v,h=w.w,f=w.name,arguments.length===2&&(m=arguments[1],p=true)):(d=w,h=arguments[1],f=arguments[3],arguments.length>2&&(m=arguments[2],p=true)),d=""+d,h=""+h,f!==void 0&&(f=""+f);var b=l(this._isDirected,d,h,f);if(Object.hasOwn(this._edgeLabels,b))return p&&(this._edgeLabels[b]=m),this;if(f!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[b]=p?m:this._defaultEdgeLabelFn(d,h,f);var g=u(this._isDirected,d,h,f);return d=g.v,h=g.w,Object.freeze(g),this._edgeObjs[b]=g,s(this._preds[h],d),s(this._sucs[d],h),this._in[h][b]=g,this._out[d][b]=g,this._edgeCount++,this}edge(d,h,f){var m=arguments.length===1?c(this._isDirected,arguments[0]):l(this._isDirected,d,h,f);return this._edgeLabels[m]}edgeAsObj(){let d=this.edge(...arguments);return typeof d!="object"?{label:d}:d}hasEdge(d,h,f){var m=arguments.length===1?c(this._isDirected,arguments[0]):l(this._isDirected,d,h,f);return Object.hasOwn(this._edgeLabels,m)}removeEdge(d,h,f){var m=arguments.length===1?c(this._isDirected,arguments[0]):l(this._isDirected,d,h,f),p=this._edgeObjs[m];return p&&(d=p.v,h=p.w,delete this._edgeLabels[m],delete this._edgeObjs[m],a(this._preds[h],d),a(this._sucs[d],h),delete this._in[h][m],delete this._out[d][m],this._edgeCount--),this}inEdges(d,h){return this.isDirected()?this.filterEdges(this._in[d],d,h):this.nodeEdges(d,h)}outEdges(d,h){return this.isDirected()?this.filterEdges(this._out[d],d,h):this.nodeEdges(d,h)}nodeEdges(d,h){if(d in this._nodes)return this.filterEdges({...this._in[d],...this._out[d]},d,h)}filterEdges(d,h,f){if(d){var m=Object.values(d);return f?m.filter(function(p){return p.v===h&&p.w===f||p.v===f&&p.w===h}):m}}};function s(d,h){d[h]?d[h]++:d[h]=1;}function a(d,h){--d[h]||delete d[h];}function l(d,h,f,m){var p=""+h,w=""+f;if(!d&&p>w){var b=p;p=w,w=b;}return p+i+w+i+(m===void 0?r:m)}function u(d,h,f,m){var p=""+h,w=""+f;if(!d&&p>w){var b=p;p=w,w=b;}var g={v:p,w};return m&&(g.name=m),g}function c(d,h){return l(d,h.v,h.w,h.name)}t.exports=o;}),Yt=E((e,t)=>{t.exports="3.0.2";}),Bt=E((e,t)=>{t.exports={Graph:R(),version:Yt()};}),Wt=E((e,t)=>{var r=R();t.exports={write:n,read:s};function n(a){var l={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:i(a),edges:o(a)};return a.graph()!==void 0&&(l.value=structuredClone(a.graph())),l}function i(a){return a.nodes().map(function(l){var u=a.node(l),c=a.parent(l),d={v:l};return u!==void 0&&(d.value=u),c!==void 0&&(d.parent=c),d})}function o(a){return a.edges().map(function(l){var u=a.edge(l),c={v:l.v,w:l.w};return l.name!==void 0&&(c.name=l.name),u!==void 0&&(c.value=u),c})}function s(a){var l=new r(a.options).setGraph(a.value);return a.nodes.forEach(function(u){l.setNode(u.v,u.value),u.parent&&l.setParent(u.v,u.parent);}),a.edges.forEach(function(u){l.setEdge({v:u.v,w:u.w,name:u.name},u.value);}),l}}),U=E((e,t)=>{t.exports=n;var r=()=>1;function n(o,s,a,l){return i(o,String(s),a||r,l||function(u){return o.outEdges(u)})}function i(o,s,a,l){var u={},c=true,d=0,h=o.nodes(),f=function(b){var g=a(b);u[b.v].distance+g<u[b.w].distance&&(u[b.w]={distance:u[b.v].distance+g,predecessor:b.v},c=true);},m=function(){h.forEach(function(b){l(b).forEach(function(g){var I=g.v===b?g.v:g.w,Gt=I===g.v?g.w:g.v;f({v:I,w:Gt});});});};h.forEach(function(b){var g=b===s?0:Number.POSITIVE_INFINITY;u[b]={distance:g};});for(var p=h.length,w=1;w<p&&(c=false,d++,m(),!!c);w++);if(d===p-1&&(c=false,m(),c))throw new Error("The graph contains a negative weight cycle");return u}}),zt=E((e,t)=>{t.exports=r;function r(n){var i={},o=[],s;function a(l){Object.hasOwn(i,l)||(i[l]=true,s.push(l),n.successors(l).forEach(a),n.predecessors(l).forEach(a));}return n.nodes().forEach(function(l){s=[],a(l),s.length&&o.push(s);}),o}}),K=E((e,t)=>{var r=class{constructor(){k(this,"_arr",[]),k(this,"_keyIndices",{});}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var i=this._keyIndices[n];if(i!==void 0)return this._arr[i].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,i){var o=this._keyIndices;if(n=String(n),!Object.hasOwn(o,n)){var s=this._arr,a=s.length;return o[n]=a,s.push({key:n,priority:i}),this._decrease(a),true}return false}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,i){var o=this._keyIndices[n];if(i>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+i);this._arr[o].priority=i,this._decrease(o);}_heapify(n){var i=this._arr,o=2*n,s=o+1,a=n;o<i.length&&(a=i[o].priority<i[a].priority?o:a,s<i.length&&(a=i[s].priority<i[a].priority?s:a),a!==n&&(this._swap(n,a),this._heapify(a)));}_decrease(n){for(var i=this._arr,o=i[n].priority,s;n!==0&&(s=n>>1,!(i[s].priority<o));)this._swap(n,s),n=s;}_swap(n,i){var o=this._arr,s=this._keyIndices,a=o[n],l=o[i];o[n]=l,o[i]=a,s[l.key]=n,s[a.key]=i;}};t.exports=r;}),T=E((e,t)=>{var r=K();t.exports=i;var n=()=>1;function i(s,a,l,u){var c=function(d){return s.outEdges(d)};return o(s,String(a),l||n,u||c)}function o(s,a,l,u){var c={},d=new r,h,f,m=function(p){var w=p.v!==h?p.v:p.w,b=c[w],g=l(p),I=f.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+p+" Weight: "+g);I<b.distance&&(b.distance=I,b.predecessor=h,d.decrease(w,I));};for(s.nodes().forEach(function(p){var w=p===a?0:Number.POSITIVE_INFINITY;c[p]={distance:w},d.add(p,w);});d.size()>0&&(h=d.removeMin(),f=c[h],f.distance!==Number.POSITIVE_INFINITY);)u(h).forEach(m);return c}}),Xt=E((e,t)=>{var r=T();t.exports=n;function n(i,o,s){return i.nodes().reduce(function(a,l){return a[l]=r(i,l,o,s),a},{})}}),Ht=E((e,t)=>{t.exports=r;function r(i,o,s){if(i[o].predecessor!==void 0)throw new Error("Invalid source vertex");if(i[s].predecessor===void 0&&s!==o)throw new Error("Invalid destination vertex");return {weight:i[s].distance,path:n(i,o,s)}}function n(i,o,s){for(var a=[],l=s;l!==o;)a.push(l),l=i[l].predecessor;return a.push(o),a.reverse()}}),Q=E((e,t)=>{t.exports=r;function r(n){var i=0,o=[],s={},a=[];function l(u){var c=s[u]={onStack:true,lowlink:i,index:i++};if(o.push(u),n.successors(u).forEach(function(f){Object.hasOwn(s,f)?s[f].onStack&&(c.lowlink=Math.min(c.lowlink,s[f].index)):(l(f),c.lowlink=Math.min(c.lowlink,s[f].lowlink));}),c.lowlink===c.index){var d=[],h;do h=o.pop(),s[h].onStack=false,d.push(h);while(u!==h);a.push(d);}}return n.nodes().forEach(function(u){Object.hasOwn(s,u)||l(u);}),a}}),Ut=E((e,t)=>{var r=Q();t.exports=n;function n(i){return r(i).filter(function(o){return o.length>1||o.length===1&&i.hasEdge(o[0],o[0])})}}),Kt=E((e,t)=>{t.exports=n;var r=()=>1;function n(o,s,a){return i(o,s||r,a||function(l){return o.outEdges(l)})}function i(o,s,a){var l={},u=o.nodes();return u.forEach(function(c){l[c]={},l[c][c]={distance:0},u.forEach(function(d){c!==d&&(l[c][d]={distance:Number.POSITIVE_INFINITY});}),a(c).forEach(function(d){var h=d.v===c?d.w:d.v,f=s(d);l[c][h]={distance:f,predecessor:c};});}),u.forEach(function(c){var d=l[c];u.forEach(function(h){var f=l[h];u.forEach(function(m){var p=f[c],w=d[m],b=f[m],g=p.distance+w.distance;g<b.distance&&(b.distance=g,b.predecessor=w.predecessor);});});}),l}}),J=E((e,t)=>{function r(i){var o={},s={},a=[];function l(u){if(Object.hasOwn(s,u))throw new n;Object.hasOwn(o,u)||(s[u]=true,o[u]=true,i.predecessors(u).forEach(l),delete s[u],a.push(u));}if(i.sinks().forEach(l),Object.keys(o).length!==i.nodeCount())throw new n;return a}var n=class extends Error{constructor(){super(...arguments);}};t.exports=r,r.CycleException=n;}),Qt=E((e,t)=>{var r=J();t.exports=n;function n(i){try{r(i);}catch(o){if(o instanceof r.CycleException)return false;throw o}return true}}),Z=E((e,t)=>{t.exports=r;function r(i,o,s,a,l){Array.isArray(o)||(o=[o]);var u=(i.isDirected()?i.successors:i.neighbors).bind(i),c={};return o.forEach(function(d){if(!i.hasNode(d))throw new Error("Graph does not have node: "+d);l=n(i,d,s==="post",c,u,a,l);}),l}function n(i,o,s,a,l,u,c){return Object.hasOwn(a,o)||(a[o]=true,s||(c=u(c,o)),l(o).forEach(function(d){c=n(i,d,s,a,l,u,c);}),s&&(c=u(c,o))),c}}),$=E((e,t)=>{var r=Z();t.exports=n;function n(i,o,s){return r(i,o,s,function(a,l){return a.push(l),a},[])}}),Jt=E((e,t)=>{var r=$();t.exports=n;function n(i,o){return r(i,o,"post")}}),Zt=E((e,t)=>{var r=$();t.exports=n;function n(i,o){return r(i,o,"pre")}}),$t=E((e,t)=>{var r=R(),n=K();t.exports=i;function i(o,s){var a=new r,l={},u=new n,c;function d(f){var m=f.v===c?f.w:f.v,p=u.priority(m);if(p!==void 0){var w=s(f);w<p&&(l[m]=c,u.decrease(m,w));}}if(o.nodeCount()===0)return a;o.nodes().forEach(function(f){u.add(f,Number.POSITIVE_INFINITY),a.setNode(f);}),u.decrease(o.nodes()[0],0);for(var h=false;u.size()>0;){if(c=u.removeMin(),Object.hasOwn(l,c))a.setEdge(c,l[c]);else {if(h)throw new Error("Input graph is not connected: "+o);h=true;}o.nodeEdges(c).forEach(d);}return a}}),er=E((e,t)=>{var r=T(),n=U();t.exports=i;function i(s,a,l,u){return o(s,a,l,u||function(c){return s.outEdges(c)})}function o(s,a,l,u){if(l===void 0)return r(s,a,l,u);for(var c=false,d=s.nodes(),h=0;h<d.length;h++){for(var f=u(d[h]),m=0;m<f.length;m++){var p=f[m],w=p.v===d[h]?p.v:p.w,b=w===p.v?p.w:p.v;l({v:w,w:b})<0&&(c=true);}if(c)return n(s,a,l,u)}return r(s,a,l,u)}}),tr=E((e,t)=>{t.exports={bellmanFord:U(),components:zt(),dijkstra:T(),dijkstraAll:Xt(),extractPath:Ht(),findCycles:Ut(),floydWarshall:Kt(),isAcyclic:Qt(),postorder:Jt(),preorder:Zt(),prim:$t(),shortestPaths:er(),reduce:Z(),tarjan:Q(),topsort:J()};}),H=Bt();ee.exports={Graph:H.Graph,json:Wt(),alg:tr(),version:H.version};});var ne=v((Ai,re)=>{var S=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t;}dequeue(){let t=this._sentinel,r=t._prev;if(r!==t)return te(r),r}enqueue(t){let r=this._sentinel;t._prev&&t._next&&te(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r;}toString(){let t=[],r=this._sentinel,n=r._prev;for(;n!==r;)t.push(JSON.stringify(n,rr)),n=n._prev;return "["+t.join(", ")+"]"}};function te(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev;}function rr(e,t){if(e!=="_next"&&e!=="_prev")return t}re.exports=S;});var oe=v((Yi,ie)=>{var nr=y().Graph,ir=ne();ie.exports=sr;var or=()=>1;function sr(e,t){if(e.nodeCount()<=1)return [];let r=dr(e,t||or);return ar(r.graph,r.buckets,r.zeroIdx).flatMap(i=>e.outEdges(i.v,i.w))}function ar(e,t,r){let n=[],i=t[t.length-1],o=t[0],s;for(;e.nodeCount();){for(;s=o.dequeue();)P(e,t,r,s);for(;s=i.dequeue();)P(e,t,r,s);if(e.nodeCount()){for(let a=t.length-2;a>0;--a)if(s=t[a].dequeue(),s){n=n.concat(P(e,t,r,s,true));break}}}return n}function P(e,t,r,n,i){let o=i?[]:void 0;return e.inEdges(n.v).forEach(s=>{let a=e.edge(s),l=e.node(s.v);i&&o.push({v:s.v,w:s.w}),l.out-=a,F(t,r,l);}),e.outEdges(n.v).forEach(s=>{let a=e.edge(s),l=s.w,u=e.node(l);u.in-=a,F(t,r,u);}),e.removeNode(n.v),o}function dr(e,t){let r=new nr,n=0,i=0;e.nodes().forEach(a=>{r.setNode(a,{v:a,in:0,out:0});}),e.edges().forEach(a=>{let l=r.edge(a.v,a.w)||0,u=t(a),c=l+u;r.setEdge(a.v,a.w,c),i=Math.max(i,r.node(a.v).out+=u),n=Math.max(n,r.node(a.w).in+=u);});let o=lr(i+n+3).map(()=>new ir),s=n+1;return r.nodes().forEach(a=>{F(o,s,r.node(a));}),{graph:r,buckets:o,zeroIdx:s}}function F(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r);}function lr(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t}});var _=v((Bi,ce)=>{var se=y().Graph;ce.exports={addBorderNode:vr,addDummyNode:ae,applyWithChunking:C,asNonCompoundGraph:hr,buildLayerMatrix:mr,intersectRect:pr,mapValues:Or,maxRank:le,normalizeRanks:wr,notime:kr,partition:Er,pick:xr,predecessorWeights:fr,range:he,removeEmptyRanks:br,simplify:ur,successorWeights:cr,time:_r,uniqueId:ue,zipObject:D};function ae(e,t,r,n){for(var i=n;e.hasNode(i);)i=ue(n);return r.dummy=t,e.setNode(i,r),i}function ur(e){let t=new se().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)});}),t}function hr(e){let t=new se({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r));}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r));}),t}function cr(e){let t=e.nodes().map(r=>{let n={};return e.outEdges(r).forEach(i=>{n[i.w]=(n[i.w]||0)+e.edge(i).weight;}),n});return D(e.nodes(),t)}function fr(e){let t=e.nodes().map(r=>{let n={};return e.inEdges(r).forEach(i=>{n[i.v]=(n[i.v]||0)+e.edge(i).weight;}),n});return D(e.nodes(),t)}function pr(e,t){let r=e.x,n=e.y,i=t.x-r,o=t.y-n,s=e.width/2,a=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");let l,u;return Math.abs(o)*s>Math.abs(i)*a?(o<0&&(a=-a),l=a*i/o,u=a):(i<0&&(s=-s),l=s,u=s*o/i),{x:r+l,y:n+u}}function mr(e){let t=he(le(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),i=n.rank;i!==void 0&&(t[i][n.order]=r);}),t}function wr(e){let t=e.nodes().map(n=>{let i=e.node(n).rank;return i===void 0?Number.MAX_VALUE:i}),r=C(Math.min,t);e.nodes().forEach(n=>{let i=e.node(n);Object.hasOwn(i,"rank")&&(i.rank-=r);});}function br(e){let t=e.nodes().map(s=>e.node(s).rank).filter(s=>s!==void 0),r=C(Math.min,t),n=[];e.nodes().forEach(s=>{let a=e.node(s).rank-r;n[a]||(n[a]=[]),n[a].push(s);});let i=0,o=e.graph().nodeRankFactor;Array.from(n).forEach((s,a)=>{s===void 0&&a%o!==0?--i:s!==void 0&&i&&s.forEach(l=>e.node(l).rank+=i);});}function vr(e,t,r,n){let i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),ae(e,"border",i,t)}function gr(e,t=de){let r=[];for(let n=0;n<e.length;n+=t){let i=e.slice(n,n+t);r.push(i);}return r}var de=65535;function C(e,t){if(t.length>de){let r=gr(t);return e.apply(null,r.map(n=>e.apply(null,n)))}else return e.apply(null,t)}function le(e){let r=e.nodes().map(n=>{let i=e.node(n).rank;return i===void 0?Number.MIN_VALUE:i});return C(Math.max,r)}function Er(e,t){let r={lhs:[],rhs:[]};return e.forEach(n=>{t(n)?r.lhs.push(n):r.rhs.push(n);}),r}function _r(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms");}}function kr(e,t){return t()}var yr=0;function ue(e){var t=++yr;return e+(""+t)}function he(e,t,r=1){t==null&&(t=e,e=0);let n=o=>o<t;r<0&&(n=o=>t<o);let i=[];for(let o=e;n(o);o+=r)i.push(o);return i}function xr(e,t){let r={};for(let n of t)e[n]!==void 0&&(r[n]=e[n]);return r}function Or(e,t){let r=t;return typeof t=="string"&&(r=n=>n[t]),Object.entries(e).reduce((n,[i,o])=>(n[i]=r(o,i),n),{})}function D(e,t){return e.reduce((r,n,i)=>(r[n]=t[i],r),{})}});var pe=v((Wi,fe)=>{var Nr=oe(),Ir=_().uniqueId;fe.exports={run:jr,undo:Lr};function jr(e){(e.graph().acyclicer==="greedy"?Nr(e,r(e)):Cr(e)).forEach(n=>{let i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=true,e.setEdge(n.w,n.v,i,Ir("rev"));});function r(n){return i=>n.edge(i).weight}}function Cr(e){let t=[],r={},n={};function i(o){Object.hasOwn(n,o)||(n[o]=true,r[o]=true,e.outEdges(o).forEach(s=>{Object.hasOwn(r,s.w)?t.push(s):i(s.w);}),delete r[o]);}return e.nodes().forEach(i),t}function Lr(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n);}});}});var we=v((zi,me)=>{var qr=_();me.exports={run:Mr,undo:Tr};function Mr(e){e.graph().dummyChains=[],e.edges().forEach(t=>Rr(e,t));}function Rr(e,t){let r=t.v,n=e.node(r).rank,i=t.w,o=e.node(i).rank,s=t.name,a=e.edge(t),l=a.labelRank;if(o===n+1)return;e.removeEdge(t);let u,c,d;for(d=0,++n;n<o;++d,++n)a.points=[],c={width:0,height:0,edgeLabel:a,edgeObj:t,rank:n},u=qr.addDummyNode(e,"edge",c,"_d"),n===l&&(c.width=a.width,c.height=a.height,c.dummy="edge-label",c.labelpos=a.labelpos),e.setEdge(r,u,{weight:a.weight},s),d===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,i,{weight:a.weight},s);}function Tr(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t);});}});var j=v((Xi,be)=>{var{applyWithChunking:Sr}=_();be.exports={longestPath:Pr,slack:Fr};function Pr(e){var t={};function r(n){var i=e.node(n);if(Object.hasOwn(t,n))return i.rank;t[n]=true;let o=e.outEdges(n).map(a=>a==null?Number.POSITIVE_INFINITY:r(a.w)-e.edge(a).minlen);var s=Sr(Math.min,o);return s===Number.POSITIVE_INFINITY&&(s=0),i.rank=s}e.sources().forEach(r);}function Fr(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var G=v((Hi,ve)=>{var Dr=y().Graph,L=j().slack;ve.exports=Gr;function Gr(e){var t=new Dr({directed:false}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,o;Vr(t,e)<n;)i=Ar(t,e),o=t.hasNode(i.v)?L(e,i):-L(e,i),Yr(t,e,o);return t}function Vr(e,t){function r(n){t.nodeEdges(n).forEach(i=>{var o=i.v,s=n===o?i.w:o;!e.hasNode(s)&&!L(t,i)&&(e.setNode(s,{}),e.setEdge(n,s,{}),r(s));});}return e.nodes().forEach(r),e.nodeCount()}function Ar(e,t){return t.edges().reduce((n,i)=>{let o=Number.POSITIVE_INFINITY;return e.hasNode(i.v)!==e.hasNode(i.w)&&(o=L(t,i)),o<n[0]?[o,i]:n},[Number.POSITIVE_INFINITY,null])[1]}function Yr(e,t,r){e.nodes().forEach(n=>t.node(n).rank+=r);}});var Ie=v((Ui,Ne)=>{var Br=G(),ge=j().slack,Wr=j().longestPath,zr=y().alg.preorder,Xr=y().alg.postorder,Hr=_().simplify;Ne.exports=N;N.initLowLimValues=A;N.initCutValues=V;N.calcCutValue=_e;N.leaveEdge=ye;N.enterEdge=xe;N.exchangeEdges=Oe;function N(e){e=Hr(e),Wr(e);var t=Br(e);A(t),V(t,e);for(var r,n;r=ye(t);)n=xe(t,e,r),Oe(t,e,r,n);}function V(e,t){var r=Xr(e,e.nodes());r=r.slice(0,r.length-1),r.forEach(n=>Ur(e,t,n));}function Ur(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=_e(e,t,r);}function _e(e,t,r){var n=e.node(r),i=n.parent,o=true,s=t.edge(r,i),a=0;return s||(o=false,s=t.edge(i,r)),a=s.weight,t.nodeEdges(r).forEach(l=>{var u=l.v===r,c=u?l.w:l.v;if(c!==i){var d=u===o,h=t.edge(l).weight;if(a+=d?h:-h,Qr(e,r,c)){var f=e.edge(r,c).cutvalue;a+=d?-f:f;}}}),a}function A(e,t){arguments.length<2&&(t=e.nodes()[0]),ke(e,{},1,t);}function ke(e,t,r,n,i){var o=r,s=e.node(n);return t[n]=true,e.neighbors(n).forEach(a=>{Object.hasOwn(t,a)||(r=ke(e,t,r,a,n));}),s.low=o,s.lim=r++,i?s.parent=i:delete s.parent,r}function ye(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function xe(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var o=e.node(n),s=e.node(i),a=o,l=false;o.lim>s.lim&&(a=s,l=true);var u=t.edges().filter(c=>l===Ee(e,e.node(c.v),a)&&l!==Ee(e,e.node(c.w),a));return u.reduce((c,d)=>ge(t,d)<ge(t,c)?d:c)}function Oe(e,t,r,n){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),A(e),V(e,t),Kr(e,t);}function Kr(e,t){var r=e.nodes().find(i=>!t.node(i).parent),n=zr(e,r);n=n.slice(1),n.forEach(i=>{var o=e.node(i).parent,s=t.edge(i,o),a=false;s||(s=t.edge(o,i),a=true),t.node(i).rank=t.node(o).rank+(a?s.minlen:-s.minlen);});}function Qr(e,t,r){return e.hasEdge(t,r)}function Ee(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}});var qe=v((Ki,Le)=>{var Jr=j(),Ce=Jr.longestPath,Zr=G(),$r=Ie();Le.exports=en;function en(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case "network-simplex":je(e);break;case "tight-tree":rn(e);break;case "longest-path":tn(e);break;case "none":break;default:je(e);}}var tn=Ce;function rn(e){Ce(e),Zr(e);}function je(e){$r(e);}});var Re=v((Qi,Me)=>{Me.exports=nn;function nn(e){let t=sn(e);e.graph().dummyChains.forEach(r=>{let n=e.node(r),i=n.edgeObj,o=on(e,t,i.v,i.w),s=o.path,a=o.lca,l=0,u=s[l],c=true;for(;r!==i.w;){if(n=e.node(r),c){for(;(u=s[l])!==a&&e.node(u).maxRank<n.rank;)l++;u===a&&(c=false);}if(!c){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=n.rank;)l++;u=s[l];}e.setParent(r,u),r=e.successors(r)[0];}});}function on(e,t,r,n){let i=[],o=[],s=Math.min(t[r].low,t[n].low),a=Math.max(t[r].lim,t[n].lim),l,u;l=r;do l=e.parent(l),i.push(l);while(l&&(t[l].low>s||a>t[l].lim));for(u=l,l=n;(l=e.parent(l))!==u;)o.push(l);return {path:i.concat(o.reverse()),lca:u}}function sn(e){let t={},r=0;function n(i){let o=r;e.children(i).forEach(n),t[i]={low:o,lim:r++};}return e.children().forEach(n),t}});var Pe=v((Ji,Se)=>{var q=_();Se.exports={run:an,cleanup:un};function an(e){let t=q.addDummyNode(e,"root",{},"_root"),r=dn(e),n=Object.values(r),i=q.applyWithChunking(Math.max,n)-1,o=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(a=>e.edge(a).minlen*=o);let s=ln(e)+1;e.children().forEach(a=>Te(e,t,o,s,i,r,a)),e.graph().nodeRankFactor=o;}function Te(e,t,r,n,i,o,s){let a=e.children(s);if(!a.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}let l=q.addBorderNode(e,"_bt"),u=q.addBorderNode(e,"_bb"),c=e.node(s);e.setParent(l,s),c.borderTop=l,e.setParent(u,s),c.borderBottom=u,a.forEach(d=>{Te(e,t,r,n,i,o,d);let h=e.node(d),f=h.borderTop?h.borderTop:d,m=h.borderBottom?h.borderBottom:d,p=h.borderTop?n:2*n,w=f!==m?1:i-o[s]+1;e.setEdge(l,f,{weight:p,minlen:w,nestingEdge:true}),e.setEdge(m,u,{weight:p,minlen:w,nestingEdge:true});}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:i+o[s]});}function dn(e){var t={};function r(n,i){var o=e.children(n);o&&o.length&&o.forEach(s=>r(s,i+1)),t[n]=i;}return e.children().forEach(n=>r(n,1)),t}function ln(e){return e.edges().reduce((t,r)=>t+e.edge(r).weight,0)}function un(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(r=>{var n=e.edge(r);n.nestingEdge&&e.removeEdge(r);});}});var Ge=v((Zi,De)=>{var hn=_();De.exports=cn;function cn(e){function t(r){let n=e.children(r),i=e.node(r);if(n.length&&n.forEach(t),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let o=i.minRank,s=i.maxRank+1;o<s;++o)Fe(e,"borderLeft","_bl",r,i,o),Fe(e,"borderRight","_br",r,i,o);}}e.children().forEach(t);}function Fe(e,t,r,n,i,o){let s={width:0,height:0,rank:o,borderType:t},a=i[t][o-1],l=hn.addDummyNode(e,"border",s,r);i[t][o]=l,e.setParent(l,n),a&&e.setEdge(a,l,{weight:1});}});var Be=v(($i,Ye)=>{Ye.exports={adjust:fn,undo:pn};function fn(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Ae(e);}function pn(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&mn(e),(t==="lr"||t==="rl")&&(wn(e),Ae(e));}function Ae(e){e.nodes().forEach(t=>Ve(e.node(t))),e.edges().forEach(t=>Ve(e.edge(t)));}function Ve(e){let t=e.width;e.width=e.height,e.height=t;}function mn(e){e.nodes().forEach(t=>Y(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(Y),Object.hasOwn(r,"y")&&Y(r);});}function Y(e){e.y=-e.y;}function wn(e){e.nodes().forEach(t=>B(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(B),Object.hasOwn(r,"x")&&B(r);});}function B(e){let t=e.x;e.x=e.y,e.y=t;}});var Xe=v((eo,ze)=>{var We=_();ze.exports=bn;function bn(e){let t={},r=e.nodes().filter(l=>!e.children(l).length),n=r.map(l=>e.node(l).rank),i=We.applyWithChunking(Math.max,n),o=We.range(i+1).map(()=>[]);function s(l){if(t[l])return;t[l]=true;let u=e.node(l);o[u.rank].push(l),e.successors(l).forEach(s);}return r.sort((l,u)=>e.node(l).rank-e.node(u).rank).forEach(s),o}});var Ue=v((to,He)=>{var vn=_().zipObject;He.exports=gn;function gn(e,t){let r=0;for(let n=1;n<t.length;++n)r+=En(e,t[n-1],t[n]);return r}function En(e,t,r){let n=vn(r,r.map((u,c)=>c)),i=t.flatMap(u=>e.outEdges(u).map(c=>({pos:n[c.w],weight:e.edge(c).weight})).sort((c,d)=>c.pos-d.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;o-=1;let a=new Array(s).fill(0),l=0;return i.forEach(u=>{let c=u.pos+o;a[c]+=u.weight;let d=0;for(;c>0;)c%2&&(d+=a[c+1]),c=c-1>>1,a[c]+=u.weight;l+=u.weight*d;}),l}});var Qe=v((ro,Ke)=>{Ke.exports=_n;function _n(e,t=[]){return t.map(r=>{let n=e.inEdges(r);if(n.length){let i=n.reduce((o,s)=>{let a=e.edge(s),l=e.node(s.v);return {sum:o.sum+a.weight*l.order,weight:o.weight+a.weight}},{sum:0,weight:0});return {v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return {v:r}})}});var Ze=v((no,Je)=>{var kn=_();Je.exports=yn;function yn(e,t){let r={};e.forEach((i,o)=>{let s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};i.barycenter!==void 0&&(s.barycenter=i.barycenter,s.weight=i.weight);}),t.edges().forEach(i=>{let o=r[i.v],s=r[i.w];o!==void 0&&s!==void 0&&(s.indegree++,o.out.push(r[i.w]));});let n=Object.values(r).filter(i=>!i.indegree);return xn(n)}function xn(e){let t=[];function r(i){return o=>{o.merged||(o.barycenter===void 0||i.barycenter===void 0||o.barycenter>=i.barycenter)&&On(i,o);}}function n(i){return o=>{o.in.push(i),--o.indegree===0&&e.push(o);}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(r(i)),i.out.forEach(n(i));}return t.filter(i=>!i.merged).map(i=>kn.pick(i,["vs","i","barycenter","weight"]))}function On(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=true;}});var tt=v((io,et)=>{var Nn=_();et.exports=In;function In(e,t){let r=Nn.partition(e,c=>Object.hasOwn(c,"barycenter")),n=r.lhs,i=r.rhs.sort((c,d)=>d.i-c.i),o=[],s=0,a=0,l=0;n.sort(jn(!!t)),l=$e(o,i,l),n.forEach(c=>{l+=c.vs.length,o.push(c.vs),s+=c.barycenter*c.weight,a+=c.weight,l=$e(o,i,l);});let u={vs:o.flat(true)};return a&&(u.barycenter=s/a,u.weight=a),u}function $e(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}function jn(e){return (t,r)=>t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}});var it=v((oo,nt)=>{var Cn=Qe(),Ln=Ze(),qn=tt();nt.exports=rt;function rt(e,t,r,n){let i=e.children(t),o=e.node(t),s=o?o.borderLeft:void 0,a=o?o.borderRight:void 0,l={};s&&(i=i.filter(h=>h!==s&&h!==a));let u=Cn(e,i);u.forEach(h=>{if(e.children(h.v).length){let f=rt(e,h.v,r,n);l[h.v]=f,Object.hasOwn(f,"barycenter")&&Rn(h,f);}});let c=Ln(u,r);Mn(c,l);let d=qn(c,n);if(s&&(d.vs=[s,d.vs,a].flat(true),e.predecessors(s).length)){let h=e.node(e.predecessors(s)[0]),f=e.node(e.predecessors(a)[0]);Object.hasOwn(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+h.order+f.order)/(d.weight+2),d.weight+=2;}return d}function Mn(e,t){e.forEach(r=>{r.vs=r.vs.flatMap(n=>t[n]?t[n].vs:n);});}function Rn(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight);}});var st=v((so,ot)=>{var Tn=y().Graph,Sn=_();ot.exports=Pn;function Pn(e,t,r,n){n||(n=e.nodes());let i=Fn(e),o=new Tn({compound:true}).setGraph({root:i}).setDefaultNodeLabel(s=>e.node(s));return n.forEach(s=>{let a=e.node(s),l=e.parent(s);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(o.setNode(s),o.setParent(s,l||i),e[r](s).forEach(u=>{let c=u.v===s?u.w:u.v,d=o.edge(c,s),h=d!==void 0?d.weight:0;o.setEdge(c,s,{weight:e.edge(u).weight+h});}),Object.hasOwn(a,"minRank")&&o.setNode(s,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}));}),o}function Fn(e){for(var t;e.hasNode(t=Sn.uniqueId("_root")););return t}});var dt=v((ao,at)=>{at.exports=Dn;function Dn(e,t,r){let n={},i;r.forEach(o=>{let s=e.parent(o),a,l;for(;s;){if(a=e.parent(s),a?(l=n[a],n[a]=s):(l=i,i=s),l&&l!==s){t.setEdge(l,s);return}s=a;}});}});var ft=v((lo,ct)=>{var Gn=Xe(),Vn=Ue(),An=it(),Yn=st(),Bn=dt(),Wn=y().Graph,M=_();ct.exports=ht;function ht(e,t={}){if(typeof t.customOrder=="function"){t.customOrder(e,ht);return}let r=M.maxRank(e),n=lt(e,M.range(1,r+1),"inEdges"),i=lt(e,M.range(r-1,-1,-1),"outEdges"),o=Gn(e);if(ut(e,o),t.disableOptimalOrderHeuristic)return;let s=Number.POSITIVE_INFINITY,a,l=t.constraints||[];for(let u=0,c=0;c<4;++u,++c){zn(u%2?n:i,u%4>=2,l),o=M.buildLayerMatrix(e);let d=Vn(e,o);d<s?(c=0,a=Object.assign({},o),s=d):d===s&&(a=structuredClone(o));}ut(e,a);}function lt(e,t,r){let n=new Map,i=(o,s)=>{n.has(o)||n.set(o,[]),n.get(o).push(s);};for(let o of e.nodes()){let s=e.node(o);if(typeof s.rank=="number"&&i(s.rank,o),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let a=s.minRank;a<=s.maxRank;a++)a!==s.rank&&i(a,o);}return t.map(function(o){return Yn(e,o,r,n.get(o)||[])})}function zn(e,t,r){let n=new Wn;e.forEach(function(i){r.forEach(a=>n.setEdge(a.left,a.right));let o=i.graph().root,s=An(i,o,n,t);s.vs.forEach((a,l)=>i.node(a).order=l),Bn(i,n,s.vs);});}function ut(e,t){Object.values(t).forEach(r=>r.forEach((n,i)=>e.node(n).order=i));}});var yt=v((uo,kt)=>{var Xn=y().Graph,O=_();kt.exports={positionX:Kn,findType1Conflicts:pt,findType2Conflicts:mt,addConflict:W,hasConflict:wt,verticalAlignment:bt,horizontalCompaction:vt,alignCoordinates:Et,findSmallestWidthAlignment:gt,balance:_t};function pt(e,t){let r={};function n(i,o){let s=0,a=0,l=i.length,u=o[o.length-1];return o.forEach((c,d)=>{let h=Hn(e,c),f=h?e.node(h).order:l;(h||c===u)&&(o.slice(a,d+1).forEach(m=>{e.predecessors(m).forEach(p=>{let w=e.node(p),b=w.order;(b<s||f<b)&&!(w.dummy&&e.node(m).dummy)&&W(r,p,m);});}),a=d+1,s=f);}),o}return t.length&&t.reduce(n),r}function mt(e,t){let r={};function n(o,s,a,l,u){let c;O.range(s,a).forEach(d=>{c=o[d],e.node(c).dummy&&e.predecessors(c).forEach(h=>{let f=e.node(h);f.dummy&&(f.order<l||f.order>u)&&W(r,h,c);});});}function i(o,s){let a=-1,l,u=0;return s.forEach((c,d)=>{if(e.node(c).dummy==="border"){let h=e.predecessors(c);h.length&&(l=e.node(h[0]).order,n(s,u,d,a,l),u=d,a=l);}n(s,u,s.length,l,o.length);}),s}return t.length&&t.reduce(i),r}function Hn(e,t){if(e.node(t).dummy)return e.predecessors(t).find(r=>e.node(r).dummy)}function W(e,t,r){if(t>r){let i=t;t=r,r=i;}let n=e[t];n||(e[t]=n={}),n[r]=true;}function wt(e,t,r){if(t>r){let n=t;t=r,r=n;}return !!e[t]&&Object.hasOwn(e[t],r)}function bt(e,t,r,n){let i={},o={},s={};return t.forEach(a=>{a.forEach((l,u)=>{i[l]=l,o[l]=l,s[l]=u;});}),t.forEach(a=>{let l=-1;a.forEach(u=>{let c=n(u);if(c.length){c=c.sort((h,f)=>s[h]-s[f]);let d=(c.length-1)/2;for(let h=Math.floor(d),f=Math.ceil(d);h<=f;++h){let m=c[h];o[u]===u&&l<s[m]&&!wt(r,u,m)&&(o[m]=u,o[u]=i[u]=i[m],l=s[m]);}}});}),{root:i,align:o}}function vt(e,t,r,n,i){let o={},s=Un(e,t,r,i),a=i?"borderLeft":"borderRight";function l(d,h){let f=s.nodes().slice(),m={},p=f.pop();for(;p;){if(m[p])d(p);else {m[p]=true,f.push(p);for(let w of h(p))f.push(w);}p=f.pop();}}function u(d){o[d]=s.inEdges(d).reduce((h,f)=>Math.max(h,o[f.v]+s.edge(f)),0);}function c(d){let h=s.outEdges(d).reduce((m,p)=>Math.min(m,o[p.w]-s.edge(p)),Number.POSITIVE_INFINITY),f=e.node(d);h!==Number.POSITIVE_INFINITY&&f.borderType!==a&&(o[d]=Math.max(o[d],h));}return l(u,s.predecessors.bind(s)),l(c,s.successors.bind(s)),Object.keys(n).forEach(d=>o[d]=o[r[d]]),o}function Un(e,t,r,n){let i=new Xn,o=e.graph(),s=Qn(o.nodesep,o.edgesep,n);return t.forEach(a=>{let l;a.forEach(u=>{let c=r[u];if(i.setNode(c),l){var d=r[l],h=i.edge(d,c);i.setEdge(d,c,Math.max(s(e,u,l),h||0));}l=u;});}),i}function gt(e,t){return Object.values(t).reduce((r,n)=>{let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([a,l])=>{let u=Jn(e,a)/2;i=Math.max(l+u,i),o=Math.min(l-u,o);});let s=i-o;return s<r[0]&&(r=[s,n]),r},[Number.POSITIVE_INFINITY,null])[1]}function Et(e,t){let r=Object.values(t),n=O.applyWithChunking(Math.min,r),i=O.applyWithChunking(Math.max,r);["u","d"].forEach(o=>{["l","r"].forEach(s=>{let a=o+s,l=e[a];if(l===t)return;let u=Object.values(l),c=n-O.applyWithChunking(Math.min,u);s!=="l"&&(c=i-O.applyWithChunking(Math.max,u)),c&&(e[a]=O.mapValues(l,d=>d+c));});});}function _t(e,t){return O.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let i=Object.values(e).map(o=>o[n]).sort((o,s)=>o-s);return (i[1]+i[2])/2}})}function Kn(e){let t=O.buildLayerMatrix(e),r=Object.assign(pt(e,t),mt(e,t)),n={},i;["u","d"].forEach(s=>{i=s==="u"?t:Object.values(t).reverse(),["l","r"].forEach(a=>{a==="r"&&(i=i.map(d=>Object.values(d).reverse()));let l=(s==="u"?e.predecessors:e.successors).bind(e),u=bt(e,i,r,l),c=vt(e,i,u.root,u.align,a==="r");a==="r"&&(c=O.mapValues(c,d=>-d)),n[s+a]=c;});});let o=gt(e,n);return Et(n,o),_t(n,e.graph().align)}function Qn(e,t,r){return (n,i,o)=>{let s=n.node(i),a=n.node(o),l=0,u;if(l+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case "l":u=-s.width/2;break;case "r":u=s.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(s.dummy?t:e)/2,l+=(a.dummy?t:e)/2,l+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case "l":u=a.width/2;break;case "r":u=-a.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function Jn(e,t){return e.node(t).width}});var Nt=v((ho,Ot)=>{var xt=_(),Zn=yt().positionX;Ot.exports=$n;function $n(e){e=xt.asNonCompoundGraph(e),ei(e),Object.entries(Zn(e)).forEach(([t,r])=>e.node(t).x=r);}function ei(e){let t=xt.buildLayerMatrix(e),r=e.graph().ranksep,n=e.graph().rankalign,i=0;t.forEach(o=>{let s=o.reduce((a,l)=>{let u=e.node(l).height;return a>u?a:u},0);o.forEach(a=>{let l=e.node(a);n==="top"?l.y=i+l.height/2:n==="bottom"?l.y=i+s-l.height/2:l.y=i+s/2;}),i+=s+r;});}});var Rt=v((co,Mt)=>{var It=pe(),jt=we(),ti=qe(),ri=_().normalizeRanks,ni=Re(),ii=_().removeEmptyRanks,Ct=Pe(),oi=Ge(),Lt=Be(),si=ft(),ai=Nt(),x=_(),di=y().Graph;Mt.exports=li;function li(e,t={}){let r=t.debugTiming?x.time:x.notime;return r("layout",()=>{let n=r(" buildLayoutGraph",()=>gi(e));return r(" runLayout",()=>ui(n,r,t)),r(" updateInputGraph",()=>hi(e,n)),n})}function ui(e,t,r){t(" makeSpaceForEdgeLabels",()=>Ei(e)),t(" removeSelfEdges",()=>Ci(e)),t(" acyclic",()=>It.run(e)),t(" nestingGraph.run",()=>Ct.run(e)),t(" rank",()=>ti(x.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>_i(e)),t(" removeEmptyRanks",()=>ii(e)),t(" nestingGraph.cleanup",()=>Ct.cleanup(e)),t(" normalizeRanks",()=>ri(e)),t(" assignRankMinMax",()=>ki(e)),t(" removeEdgeLabelProxies",()=>yi(e)),t(" normalize.run",()=>jt.run(e)),t(" parentDummyChains",()=>ni(e)),t(" addBorderSegments",()=>oi(e)),t(" order",()=>si(e,r)),t(" insertSelfEdges",()=>Li(e)),t(" adjustCoordinateSystem",()=>Lt.adjust(e)),t(" position",()=>ai(e)),t(" positionSelfEdges",()=>qi(e)),t(" removeBorderNodes",()=>ji(e)),t(" normalize.undo",()=>jt.undo(e)),t(" fixupEdgeLabelCoords",()=>Ni(e)),t(" undoCoordinateSystem",()=>Lt.undo(e)),t(" translateGraph",()=>xi(e)),t(" assignNodeIntersects",()=>Oi(e)),t(" reversePoints",()=>Ii(e)),t(" acyclic.undo",()=>It.undo(e));}function hi(e,t){e.nodes().forEach(r=>{let n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,n.order=i.order,n.rank=i.rank,t.children(r).length&&(n.width=i.width,n.height=i.height));}),e.edges().forEach(r=>{let n=e.edge(r),i=t.edge(r);n.points=i.points,Object.hasOwn(i,"x")&&(n.x=i.x,n.y=i.y);}),e.graph().width=t.graph().width,e.graph().height=t.graph().height;}var ci=["nodesep","edgesep","ranksep","marginx","marginy"],fi={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},pi=["acyclicer","ranker","rankdir","align","rankalign"],mi=["width","height","rank"],qt={width:0,height:0},wi=["minlen","weight","width","height","labeloffset"],bi={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},vi=["labelpos"];function gi(e){let t=new di({multigraph:true,compound:true}),r=X(e.graph());return t.setGraph(Object.assign({},fi,z(r,ci),x.pick(r,pi))),e.nodes().forEach(n=>{let i=X(e.node(n)),o=z(i,mi);Object.keys(qt).forEach(s=>{o[s]===void 0&&(o[s]=qt[s]);}),t.setNode(n,o),t.setParent(n,e.parent(n));}),e.edges().forEach(n=>{let i=X(e.edge(n));t.setEdge(n,Object.assign({},bi,z(i,wi),x.pick(i,vi)));}),t}function Ei(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(r=>{let n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset);});}function _i(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.width&&r.height){let n=e.node(t.v),o={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};x.addDummyNode(e,"edge-proxy",o,"_ep");}});}function ki(e){let t=0;e.nodes().forEach(r=>{let n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Math.max(t,n.maxRank));}),e.graph().maxRank=t;}function yi(e){e.nodes().forEach(t=>{let r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t));});}function xi(e){let t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,o=e.graph(),s=o.marginx||0,a=o.marginy||0;function l(u){let c=u.x,d=u.y,h=u.width,f=u.height;t=Math.min(t,c-h/2),r=Math.max(r,c+h/2),n=Math.min(n,d-f/2),i=Math.max(i,d+f/2);}e.nodes().forEach(u=>l(e.node(u))),e.edges().forEach(u=>{let c=e.edge(u);Object.hasOwn(c,"x")&&l(c);}),t-=s,n-=a,e.nodes().forEach(u=>{let c=e.node(u);c.x-=t,c.y-=n;}),e.edges().forEach(u=>{let c=e.edge(u);c.points.forEach(d=>{d.x-=t,d.y-=n;}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=n);}),o.width=r-t+s,o.height=i-n+a;}function Oi(e){e.edges().forEach(t=>{let r=e.edge(t),n=e.node(t.v),i=e.node(t.w),o,s;r.points?(o=r.points[0],s=r.points[r.points.length-1]):(r.points=[],o=i,s=n),r.points.unshift(x.intersectRect(n,o)),r.points.push(x.intersectRect(i,s));});}function Ni(e){e.edges().forEach(t=>{let r=e.edge(t);if(Object.hasOwn(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case "l":r.x-=r.width/2+r.labeloffset;break;case "r":r.x+=r.width/2+r.labeloffset;break}});}function Ii(e){e.edges().forEach(t=>{let r=e.edge(t);r.reversed&&r.points.reverse();});}function ji(e){e.nodes().forEach(t=>{if(e.children(t).length){let r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(r.borderLeft[r.borderLeft.length-1]),s=e.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(s.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2;}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t);});}function Ci(e){e.edges().forEach(t=>{if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t);}});}function Li(e){var t=x.buildLayerMatrix(e);t.forEach(r=>{var n=0;r.forEach((i,o)=>{var s=e.node(i);s.order=o+n,(s.selfEdges||[]).forEach(a=>{x.addDummyNode(e,"selfedge",{width:a.label.width,height:a.label.height,rank:s.rank,order:o+ ++n,e:a.e,label:a.label},"_se");}),delete s.selfEdges;});});}function qi(e){e.nodes().forEach(t=>{var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,o=n.y,s=r.x-i,a=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],r.label.x=r.x,r.label.y=r.y;}});}function z(e,t){return x.mapValues(x.pick(e,t),Number)}function X(e){var t={};return e&&Object.entries(e).forEach(([r,n])=>{typeof r=="string"&&(r=r.toLowerCase()),t[r]=n;}),t}});var St=v((fo,Tt)=>{var Mi=_(),Ri=y().Graph;Tt.exports={debugOrdering:Ti};function Ti(e){let t=Mi.buildLayerMatrix(e),r=new Ri({compound:true,multigraph:true}).setGraph({});return e.nodes().forEach(n=>{r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank);}),e.edges().forEach(n=>r.setEdge(n.v,n.w,{},n.name)),t.forEach((n,i)=>{let o="layer"+i;r.setNode(o,{rank:"same"}),n.reduce((s,a)=>(r.setEdge(s,a,{style:"invis"}),a));}),r}});var Ft=v((po,Pt)=>{Pt.exports="2.0.4";});var Si=v((mo,Dt)=>{Dt.exports={graphlib:y(),layout:Rt(),debug:St(),util:{time:_().time,notime:_().notime},version:Ft()};});const dagre = Si();
17
+ /*! For license information please see dagre.esm.js.LEGAL.txt */
18
+
19
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
39
20
  __name: "Badge",
40
21
  __ssrInlineRender: true,
41
22
  props: {
@@ -66,13 +47,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
66
47
  };
67
48
  }
68
49
  });
69
- const _sfc_setup$C = _sfc_main$C.setup;
70
- _sfc_main$C.setup = (props, ctx) => {
50
+ const _sfc_setup$n = _sfc_main$n.setup;
51
+ _sfc_main$n.setup = (props, ctx) => {
71
52
  const ssrContext = useSSRContext();
72
53
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/badge/Badge.vue");
73
- return _sfc_setup$C ? _sfc_setup$C(props, ctx) : void 0;
54
+ return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0;
74
55
  };
75
- const Badge = Object.assign(_sfc_main$C, { __name: "UiBadge" });
56
+ const Badge = Object.assign(_sfc_main$n, { __name: "UiBadge" });
76
57
  const badgeVariants = cva(
77
58
  "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
78
59
  {
@@ -89,835 +70,541 @@ const badgeVariants = cva(
89
70
  }
90
71
  }
91
72
  );
92
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
93
- __name: "Meta",
73
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
74
+ __name: "Node",
94
75
  __ssrInlineRender: true,
95
76
  props: {
96
- metadata: {}
77
+ id: {},
78
+ type: {},
79
+ selected: { type: Boolean },
80
+ connectable: { type: [Boolean, Number, String, Function] },
81
+ position: {},
82
+ dimensions: {},
83
+ label: {},
84
+ isValidTargetPos: { type: Function },
85
+ isValidSourcePos: { type: Function },
86
+ parent: {},
87
+ parentNodeId: {},
88
+ dragging: { type: Boolean },
89
+ resizing: { type: Boolean },
90
+ zIndex: {},
91
+ targetPosition: {},
92
+ sourcePosition: {},
93
+ dragHandle: {},
94
+ data: {},
95
+ events: {}
97
96
  },
98
97
  setup(__props) {
99
98
  const props = __props;
100
- const statusVariant = computed(() => {
101
- const status = props.metadata.status?.toLowerCase();
102
- if (!status) return "secondary";
103
- if (status.includes("complete") || status.includes("done")) return "default";
104
- if (status.includes("progress") || status.includes("active")) return "default";
105
- if (status.includes("draft")) return "secondary";
106
- if (status.includes("blocked") || status.includes("paused")) return "destructive";
107
- return "secondary";
99
+ const data = computed(() => props.data);
100
+ const taskData = computed(() => data.value.kind === "task" ? data.value : null);
101
+ const externalData = computed(() => data.value.kind === "external" ? data.value : null);
102
+ const statusConfig = computed(() => {
103
+ if (data.value.kind !== "task") {
104
+ return {
105
+ label: "Missing dependency",
106
+ icon: AlertTriangle,
107
+ class: "text-amber-600 dark:text-amber-400"
108
+ };
109
+ }
110
+ switch (data.value.status) {
111
+ case "completed":
112
+ return {
113
+ label: "Completed",
114
+ icon: CheckCircle2,
115
+ class: "text-emerald-600 dark:text-emerald-400"
116
+ };
117
+ case "in_progress":
118
+ return {
119
+ label: "In Progress",
120
+ icon: Clock3,
121
+ class: "text-blue-600 dark:text-blue-400"
122
+ };
123
+ case "pending":
124
+ default:
125
+ return {
126
+ label: "Pending",
127
+ icon: Circle,
128
+ class: "text-muted-foreground"
129
+ };
130
+ }
131
+ });
132
+ const priorityLabel = computed(() => {
133
+ if (data.value.kind !== "task") {
134
+ return null;
135
+ }
136
+ return data.value.priority.replace("_", " ");
137
+ });
138
+ const categoryLabel = computed(() => {
139
+ if (data.value.kind !== "task") {
140
+ return null;
141
+ }
142
+ return data.value.category;
143
+ });
144
+ const nodeClass = computed(() => {
145
+ if (data.value.kind === "external") {
146
+ return [
147
+ "border-amber-500/60 bg-amber-50/70 text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",
148
+ "border-dashed"
149
+ ];
150
+ }
151
+ if (data.value.status === "completed") {
152
+ return [
153
+ "border-emerald-500/40 bg-emerald-50/70 text-emerald-950 dark:border-emerald-500/40 dark:bg-emerald-500/10 dark:text-emerald-100",
154
+ "border-solid"
155
+ ];
156
+ }
157
+ if (data.value.status === "in_progress") {
158
+ return [
159
+ "border-blue-500/40 bg-blue-50/80 text-blue-950 dark:border-blue-500/40 dark:bg-blue-500/10 dark:text-blue-100",
160
+ "border-solid"
161
+ ];
162
+ }
163
+ return [
164
+ "border-border bg-card text-card-foreground",
165
+ "border-solid"
166
+ ];
108
167
  });
109
- const hasMetadata = computed(() => {
110
- return props.metadata.author || props.metadata.date || props.metadata.status || props.metadata.shortcutStory;
168
+ const repoPrdLabel = computed(() => {
169
+ if (data.value.kind !== "task" || !data.value.showPrdLabel) {
170
+ return null;
171
+ }
172
+ return data.value.prdName?.trim() || data.value.prdSlug;
111
173
  });
112
174
  return (_ctx, _push, _parent, _attrs) => {
113
- if (unref(hasMetadata)) {
114
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-wrap items-center gap-3 text-sm" }, _attrs))}>`);
115
- if (__props.metadata.author) {
116
- _push(`<div class="flex items-center gap-1.5 text-muted-foreground">`);
117
- _push(ssrRenderComponent(unref(User), { class: "size-3.5" }, null, _parent));
118
- _push(`<span>${ssrInterpolate(__props.metadata.author)}</span></div>`);
119
- } else {
120
- _push(`<!---->`);
121
- }
122
- if (__props.metadata.date) {
123
- _push(`<div class="flex items-center gap-1.5 text-muted-foreground">`);
124
- _push(ssrRenderComponent(unref(Calendar), { class: "size-3.5" }, null, _parent));
125
- _push(`<span>${ssrInterpolate(__props.metadata.date)}</span></div>`);
126
- } else {
127
- _push(`<!---->`);
128
- }
129
- if (__props.metadata.status) {
130
- _push(ssrRenderComponent(unref(Badge), {
131
- variant: unref(statusVariant),
132
- class: "gap-1"
133
- }, {
134
- default: withCtx((_, _push2, _parent2, _scopeId) => {
135
- if (_push2) {
136
- _push2(ssrRenderComponent(unref(CircleDot), { class: "size-3" }, null, _parent2, _scopeId));
137
- _push2(` ${ssrInterpolate(__props.metadata.status)}`);
138
- } else {
139
- return [
140
- createVNode(unref(CircleDot), { class: "size-3" }),
141
- createTextVNode(" " + toDisplayString(__props.metadata.status), 1)
142
- ];
143
- }
144
- }),
145
- _: 1
146
- }, _parent));
147
- } else {
148
- _push(`<!---->`);
149
- }
150
- if (__props.metadata.shortcutStory && __props.metadata.shortcutUrl) {
151
- _push(`<a${ssrRenderAttr("href", __props.metadata.shortcutUrl)} target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1.5 text-primary hover:underline">`);
152
- _push(ssrRenderComponent(unref(ExternalLink), { class: "size-3.5" }, null, _parent));
153
- _push(`<span>${ssrInterpolate(__props.metadata.shortcutStory)}</span></a>`);
154
- } else if (__props.metadata.shortcutStory) {
155
- _push(`<span class="flex items-center gap-1.5 text-muted-foreground">`);
156
- _push(ssrRenderComponent(unref(ExternalLink), { class: "size-3.5" }, null, _parent));
157
- _push(`<span>${ssrInterpolate(__props.metadata.shortcutStory)}</span></span>`);
175
+ _push(`<div${ssrRenderAttrs(mergeProps({
176
+ class: ["w-[17rem] rounded-xl border px-3 py-2 shadow-sm transition-[transform,box-shadow,border-color] duration-150 ease-[var(--ease-out-cubic)] motion-reduce:transition-none", [
177
+ unref(nodeClass),
178
+ __props.selected ? "ring-2 ring-primary/30 shadow-md" : "hover:shadow-md hover:border-primary/40"
179
+ ]]
180
+ }, _attrs))}>`);
181
+ _push(ssrRenderComponent(unref(Handle), {
182
+ type: "target",
183
+ position: unref(Position).Top,
184
+ class: "!h-2 !w-2 !border-0 !bg-transparent !opacity-0 !pointer-events-none"
185
+ }, null, _parent));
186
+ if (unref(taskData)) {
187
+ _push(`<div class="space-y-2"><div class="flex items-center justify-between gap-2 text-[11px] text-muted-foreground"><span class="shrink-0 font-mono">${ssrInterpolate(unref(taskData).taskId)}</span>`);
188
+ if (unref(repoPrdLabel)) {
189
+ _push(`<span${ssrRenderAttr("title", `${unref(taskData).prdName} (${unref(taskData).prdSlug})`)} class="max-w-[11rem] truncate rounded border border-border bg-background/60 px-1.5 py-0.5 text-[10px]">${ssrInterpolate(unref(repoPrdLabel))}</span>`);
158
190
  } else {
159
191
  _push(`<!---->`);
160
192
  }
161
- _push(`</div>`);
193
+ _push(`</div><p class="line-clamp-2 text-sm font-medium leading-snug">${ssrInterpolate(unref(taskData).title)}</p><div class="flex items-center justify-between gap-2 text-[11px] text-muted-foreground"><div class="${ssrRenderClass([unref(statusConfig).class, "flex items-center gap-1.5"])}">`);
194
+ ssrRenderVNode(_push, createVNode(resolveDynamicComponent(unref(statusConfig).icon), { class: "size-3.5" }, null), _parent);
195
+ _push(`<span>${ssrInterpolate(unref(statusConfig).label)}</span></div><div class="flex items-center gap-1.5 text-[10px] uppercase tracking-wide"><span class="rounded bg-background/60 px-1.5 py-0.5">${ssrInterpolate(unref(categoryLabel))}</span><span class="rounded bg-background/60 px-1.5 py-0.5">${ssrInterpolate(unref(priorityLabel))}</span></div></div></div>`);
196
+ } else if (unref(externalData)) {
197
+ _push(`<div class="space-y-1.5"><div class="flex items-center gap-2 text-sm font-medium">`);
198
+ _push(ssrRenderComponent(unref(AlertTriangle), { class: "size-4" }, null, _parent));
199
+ _push(`<span>${ssrInterpolate(unref(externalData).title)}</span></div><p class="font-mono text-[11px] text-muted-foreground">${ssrInterpolate(unref(externalData).dependencyRef)}</p></div>`);
162
200
  } else {
163
201
  _push(`<!---->`);
164
202
  }
203
+ _push(ssrRenderComponent(unref(Handle), {
204
+ type: "source",
205
+ position: unref(Position).Bottom,
206
+ class: "!h-2 !w-2 !border-0 !bg-transparent !opacity-0 !pointer-events-none"
207
+ }, null, _parent));
208
+ _push(`</div>`);
165
209
  };
166
210
  }
167
211
  });
168
- const _sfc_setup$B = _sfc_main$B.setup;
169
- _sfc_main$B.setup = (props, ctx) => {
212
+ const _sfc_setup$m = _sfc_main$m.setup;
213
+ _sfc_main$m.setup = (props, ctx) => {
170
214
  const ssrContext = useSSRContext();
171
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/prd/Meta.vue");
172
- return _sfc_setup$B ? _sfc_setup$B(props, ctx) : void 0;
215
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/graph/Node.vue");
216
+ return _sfc_setup$m ? _sfc_setup$m(props, ctx) : void 0;
173
217
  };
174
- const __nuxt_component_1$2 = Object.assign(_sfc_main$B, { __name: "PrdMeta" });
175
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
176
- __name: "Viewer",
218
+ const GraphNodeComponent = Object.assign(_sfc_main$m, { __name: "GraphNode" });
219
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
220
+ __name: "Explorer",
177
221
  __ssrInlineRender: true,
178
222
  props: {
179
- content: {}
223
+ payload: {},
224
+ scope: {},
225
+ loading: { type: Boolean, default: false },
226
+ error: { default: null }
180
227
  },
181
- setup(__props) {
228
+ emits: ["taskClick"],
229
+ setup(__props, { emit: __emit }) {
182
230
  const props = __props;
183
- const renderedHtml = ref("");
184
- const isLoading = ref(true);
185
- const purifyConfig = {
186
- ADD_TAGS: ["style"],
187
- ADD_ATTR: ["style", "class", "target", "rel"]
188
- };
189
- const renderer = new marked.Renderer();
190
- renderer.link = ({ href, title, text }) => {
191
- const titleAttr = title ? ` title="${title}"` : "";
192
- return `<a href="${href}"${titleAttr} target="_blank" rel="noopener noreferrer">${text}</a>`;
231
+ const emit = __emit;
232
+ const nodeTypes = {
233
+ task: markRaw(GraphNodeComponent),
234
+ external: markRaw(GraphNodeComponent)
193
235
  };
194
- async function highlightCode(code, lang) {
195
- try {
196
- return await codeToHtml(code, {
197
- lang: lang || "text",
198
- themes: {
199
- light: "github-light",
200
- dark: "github-dark"
201
- }
202
- });
203
- } catch {
204
- return `<pre><code class="language-${lang}">${escapeHtml(code)}</code></pre>`;
236
+ const prefersReducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)");
237
+ const flowVersion = ref(0);
238
+ watch(
239
+ () => [props.scope, props.payload?.scope, props.payload?.nodes.length, props.payload?.edges.length],
240
+ () => {
241
+ flowVersion.value += 1;
242
+ },
243
+ { deep: false }
244
+ );
245
+ const flowKey = computed(() => `${props.scope}-${flowVersion.value}`);
246
+ const hasTaskNodes = computed(() => {
247
+ if (!props.payload) {
248
+ return false;
205
249
  }
250
+ return props.payload.nodes.some((node) => node.kind === "task");
251
+ });
252
+ const graphStats = computed(() => props.payload?.stats);
253
+ function getNodeDimensions(node, scope) {
254
+ if (node.kind === "external") {
255
+ return { width: 272, height: 80 };
256
+ }
257
+ if (scope === "repo") {
258
+ return { width: 272, height: 116 };
259
+ }
260
+ return { width: 272, height: 96 };
206
261
  }
207
- function escapeHtml(text) {
208
- return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
262
+ function getLayoutConfig(scope) {
263
+ if (scope === "repo") {
264
+ return {
265
+ ranksep: 136,
266
+ nodesep: 88,
267
+ edgesep: 34,
268
+ marginx: 36,
269
+ marginy: 28
270
+ };
271
+ }
272
+ return {
273
+ ranksep: 102,
274
+ nodesep: 56,
275
+ edgesep: 20,
276
+ marginx: 24,
277
+ marginy: 22
278
+ };
209
279
  }
210
- async function renderMarkdown(content) {
211
- const codeBlockRegex = /```(\w*)\n([\s\S]*?)```/g;
212
- const placeholders = [];
213
- let placeholderIndex = 0;
214
- const contentWithPlaceholders = content.replace(codeBlockRegex, (_, lang, code) => {
215
- const placeholder = `CODEBLOCK${placeholderIndex++}PLACEHOLDER`;
216
- placeholders.push({ placeholder, lang: lang || "text", code: code.trim() });
217
- return placeholder;
280
+ function layoutGraph(nodes, edges) {
281
+ const graph = new dagre.graphlib.Graph();
282
+ const config = getLayoutConfig(props.scope);
283
+ graph.setDefaultEdgeLabel(() => ({}));
284
+ graph.setGraph({
285
+ rankdir: "TB",
286
+ ranker: "network-simplex",
287
+ ...config
218
288
  });
219
- marked.setOptions({
220
- renderer,
221
- gfm: true,
222
- breaks: true
223
- });
224
- let html = await marked.parse(contentWithPlaceholders);
225
- const highlightPromises = placeholders.map(async ({ placeholder, lang, code }) => {
226
- const highlighted = await highlightCode(code, lang);
227
- return { placeholder, highlighted };
228
- });
229
- const results = await Promise.all(highlightPromises);
230
- for (const { placeholder, highlighted } of results) {
231
- html = html.replace(`<p>${placeholder}</p>`, highlighted);
232
- html = html.replace(placeholder, highlighted);
289
+ for (const node of nodes) {
290
+ const dimensions = getNodeDimensions(node.data, props.scope);
291
+ graph.setNode(node.id, dimensions);
233
292
  }
234
- return DOMPurify.sanitize(html, purifyConfig);
293
+ for (const edge of edges) {
294
+ graph.setEdge(edge.source, edge.target);
295
+ }
296
+ dagre.layout(graph);
297
+ return nodes.map((node) => {
298
+ const dimensions = getNodeDimensions(node.data, props.scope);
299
+ const positioned = graph.node(node.id);
300
+ if (!positioned) {
301
+ return node;
302
+ }
303
+ return {
304
+ ...node,
305
+ targetPosition: Position.Top,
306
+ sourcePosition: Position.Bottom,
307
+ position: {
308
+ x: positioned.x - dimensions.width / 2,
309
+ y: positioned.y - dimensions.height / 2
310
+ }
311
+ };
312
+ });
235
313
  }
236
- watch(() => props.content, async (newContent) => {
237
- if (newContent) {
238
- isLoading.value = true;
239
- try {
240
- renderedHtml.value = await renderMarkdown(newContent);
241
- } finally {
242
- isLoading.value = false;
314
+ const flowEdges = computed(() => {
315
+ if (!props.payload) {
316
+ return [];
317
+ }
318
+ return props.payload.edges.map((edge) => ({
319
+ id: edge.id,
320
+ source: edge.source,
321
+ target: edge.target,
322
+ type: "step",
323
+ animated: edge.unresolved && !prefersReducedMotion.value,
324
+ markerEnd: {
325
+ type: MarkerType.ArrowClosed,
326
+ width: 16,
327
+ height: 16
328
+ },
329
+ style: {
330
+ strokeWidth: edge.unresolved ? 1.4 : 1.7,
331
+ stroke: edge.unresolved ? "var(--muted-foreground)" : "var(--border)",
332
+ strokeOpacity: edge.unresolved ? 0.62 : 0.95,
333
+ strokeDasharray: edge.unresolved ? "5 4" : void 0
243
334
  }
335
+ }));
336
+ });
337
+ const flowNodes = computed(() => {
338
+ if (!props.payload) {
339
+ return [];
340
+ }
341
+ const baseNodes = props.payload.nodes.map((node) => ({
342
+ id: node.id,
343
+ type: node.kind,
344
+ data: {
345
+ ...node,
346
+ showPrdLabel: node.kind === "task" ? props.scope === "repo" : void 0
347
+ },
348
+ draggable: false,
349
+ selectable: node.kind === "task",
350
+ connectable: false,
351
+ position: { x: 0, y: 0 }
352
+ }));
353
+ return layoutGraph(baseNodes, flowEdges.value);
354
+ });
355
+ function handleNodeClick(event) {
356
+ const node = event.node;
357
+ const data = node.data;
358
+ if (!data || data.kind !== "task") {
359
+ return;
244
360
  }
245
- }, { immediate: true });
361
+ emit("taskClick", {
362
+ prdSlug: data.prdSlug,
363
+ taskId: data.taskId
364
+ });
365
+ }
246
366
  return (_ctx, _push, _parent, _attrs) => {
247
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "prd-viewer" }, _attrs))}>`);
248
- if (unref(isLoading)) {
249
- _push(`<div class="flex items-center justify-center py-8"><div class="size-6 animate-spin rounded-full border-2 border-primary border-t-transparent"></div></div>`);
367
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "relative h-full overflow-hidden rounded-lg border border-border bg-card" }, _attrs))}>`);
368
+ if (__props.loading) {
369
+ _push(`<div class="flex h-full items-center justify-center"><div class="flex flex-col items-center gap-2 text-sm text-muted-foreground">`);
370
+ _push(ssrRenderComponent(unref(Loader2), { class: "size-5 animate-spin" }, null, _parent));
371
+ _push(`<span>Building graph...</span></div></div>`);
372
+ } else if (__props.error) {
373
+ _push(`<div class="flex h-full items-center justify-center p-6"><div class="max-w-sm text-center">`);
374
+ _push(ssrRenderComponent(unref(AlertCircle), { class: "mx-auto mb-3 size-8 text-destructive" }, null, _parent));
375
+ _push(`<p class="text-sm font-medium">Graph unavailable</p><p class="mt-1 text-sm text-muted-foreground">${ssrInterpolate(__props.error)}</p></div></div>`);
376
+ } else if (!__props.payload || !unref(hasTaskNodes)) {
377
+ _push(`<div class="flex h-full items-center justify-center p-6"><div class="max-w-sm text-center">`);
378
+ _push(ssrRenderComponent(unref(GitBranch), { class: "mx-auto mb-3 size-8 text-muted-foreground/60" }, null, _parent));
379
+ _push(`<p class="text-sm font-medium">No graphable tasks yet</p><p class="mt-1 text-sm text-muted-foreground">${ssrInterpolate(__props.scope === "repo" ? "No PRDs with task state were found in this repository." : "This PRD does not have generated tasks yet.")}</p></div></div>`);
250
380
  } else {
251
- _push(`<div class="prose prose-sm dark:prose-invert max-w-none">${unref(renderedHtml) ?? ""}</div>`);
381
+ _push(ssrRenderComponent(unref(VueFlow), {
382
+ key: unref(flowKey),
383
+ nodes: unref(flowNodes),
384
+ edges: unref(flowEdges),
385
+ "node-types": nodeTypes,
386
+ "fit-view-on-init": true,
387
+ "fit-view-on-init-options": { padding: 0.2 },
388
+ "nodes-draggable": false,
389
+ "nodes-connectable": false,
390
+ "elements-selectable": true,
391
+ "zoom-on-scroll": true,
392
+ "pan-on-drag": true,
393
+ "min-zoom": 0.2,
394
+ "max-zoom": 1.8,
395
+ class: "h-full",
396
+ onNodeClick: handleNodeClick
397
+ }, {
398
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
399
+ if (_push2) {
400
+ _push2(ssrRenderComponent(unref(Background), {
401
+ gap: 20,
402
+ size: 1.2,
403
+ variant: "dots",
404
+ color: "var(--border)"
405
+ }, null, _parent2, _scopeId));
406
+ _push2(ssrRenderComponent(unref(Controls), {
407
+ position: "bottom-left",
408
+ "show-interactive": false
409
+ }, null, _parent2, _scopeId));
410
+ } else {
411
+ return [
412
+ createVNode(unref(Background), {
413
+ gap: 20,
414
+ size: 1.2,
415
+ variant: "dots",
416
+ color: "var(--border)"
417
+ }),
418
+ createVNode(unref(Controls), {
419
+ position: "bottom-left",
420
+ "show-interactive": false
421
+ })
422
+ ];
423
+ }
424
+ }),
425
+ _: 1
426
+ }, _parent));
427
+ }
428
+ if (__props.payload && unref(hasTaskNodes)) {
429
+ _push(`<div class="pointer-events-none absolute top-3 left-3 z-10 rounded-md border border-border bg-background/95 p-2.5 shadow-sm"><p class="mb-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground">Legend</p><div class="space-y-1 text-xs"><div class="flex items-center gap-1.5 text-muted-foreground">`);
430
+ _push(ssrRenderComponent(unref(Circle), { class: "size-3.5" }, null, _parent));
431
+ _push(` Pending </div><div class="flex items-center gap-1.5 text-blue-600 dark:text-blue-400">`);
432
+ _push(ssrRenderComponent(unref(Clock3), { class: "size-3.5" }, null, _parent));
433
+ _push(` In Progress </div><div class="flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400">`);
434
+ _push(ssrRenderComponent(unref(CheckCircle2), { class: "size-3.5" }, null, _parent));
435
+ _push(` Completed </div><div class="flex items-center gap-1.5 text-amber-600 dark:text-amber-400">`);
436
+ _push(ssrRenderComponent(unref(AlertTriangle), { class: "size-3.5" }, null, _parent));
437
+ _push(` Missing dependency </div></div></div>`);
438
+ } else {
439
+ _push(`<!---->`);
440
+ }
441
+ if (unref(graphStats) && unref(hasTaskNodes)) {
442
+ _push(`<div class="pointer-events-none absolute top-3 right-3 z-10 rounded-md border border-border bg-background/95 p-2.5 shadow-sm"><div class="flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground"><span class="rounded bg-muted px-1.5 py-0.5">Total ${ssrInterpolate(unref(graphStats).total)}</span><span class="rounded bg-blue-500/10 px-1.5 py-0.5 text-blue-700 dark:text-blue-300">WIP ${ssrInterpolate(unref(graphStats).inProgress)}</span><span class="rounded bg-emerald-500/10 px-1.5 py-0.5 text-emerald-700 dark:text-emerald-300">Done ${ssrInterpolate(unref(graphStats).completed)}</span><span class="rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-700 dark:text-amber-300">Missing ${ssrInterpolate(unref(graphStats).unresolved)}</span></div></div>`);
443
+ } else {
444
+ _push(`<!---->`);
252
445
  }
253
446
  _push(`</div>`);
254
447
  };
255
448
  }
256
449
  });
257
- const _sfc_setup$A = _sfc_main$A.setup;
258
- _sfc_main$A.setup = (props, ctx) => {
259
- const ssrContext = useSSRContext();
260
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/prd/Viewer.vue");
261
- return _sfc_setup$A ? _sfc_setup$A(props, ctx) : void 0;
262
- };
263
- const __nuxt_component_2 = Object.assign(_sfc_main$A, { __name: "PrdViewer" });
264
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
265
- __name: "Card",
266
- __ssrInlineRender: true,
267
- props: {
268
- class: {}
269
- },
270
- setup(__props) {
271
- const props = __props;
272
- return (_ctx, _push, _parent, _attrs) => {
273
- _push(`<div${ssrRenderAttrs(mergeProps({
274
- "data-slot": "card",
275
- class: unref(cn)(
276
- "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
277
- props.class
278
- )
279
- }, _attrs))}>`);
280
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
281
- _push(`</div>`);
282
- };
283
- }
284
- });
285
- const _sfc_setup$z = _sfc_main$z.setup;
286
- _sfc_main$z.setup = (props, ctx) => {
450
+ const _sfc_setup$l = _sfc_main$l.setup;
451
+ _sfc_main$l.setup = (props, ctx) => {
287
452
  const ssrContext = useSSRContext();
288
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/card/Card.vue");
289
- return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0;
453
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/graph/Explorer.vue");
454
+ return _sfc_setup$l ? _sfc_setup$l(props, ctx) : void 0;
290
455
  };
291
- const Card = Object.assign(_sfc_main$z, { __name: "UiCard" });
292
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
293
- __name: "CardAction",
456
+ const __nuxt_component_0$2 = Object.assign(_sfc_main$l, { __name: "GraphExplorer" });
457
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
458
+ __name: "ChangesMinimap",
294
459
  __ssrInlineRender: true,
295
460
  props: {
296
- class: {}
461
+ files: {},
462
+ selectedFile: {}
297
463
  },
298
- setup(__props) {
464
+ emits: ["select"],
465
+ setup(__props, { emit: __emit }) {
299
466
  const props = __props;
467
+ const maxChanges = computed(() => {
468
+ if (props.files.length === 0) return 1;
469
+ return Math.max(...props.files.map((f) => f.additions + f.deletions), 1);
470
+ });
471
+ function getStatusConfig(status) {
472
+ switch (status) {
473
+ case "added":
474
+ return { icon: FilePlus, class: "text-green-600 dark:text-green-400" };
475
+ case "deleted":
476
+ return { icon: FileX, class: "text-red-600 dark:text-red-400" };
477
+ case "renamed":
478
+ return { icon: ArrowRight, class: "text-blue-600 dark:text-blue-400" };
479
+ case "modified":
480
+ default:
481
+ return { icon: FileEdit, class: "text-yellow-600 dark:text-yellow-400" };
482
+ }
483
+ }
484
+ function getBarWidths(file) {
485
+ const total = file.additions + file.deletions;
486
+ if (total === 0) return { additions: 0, deletions: 0, total: 0 };
487
+ const totalWidth = total / maxChanges.value * 100;
488
+ const additionsWidth = file.additions / total * totalWidth;
489
+ const deletionsWidth = file.deletions / total * totalWidth;
490
+ return {
491
+ additions: additionsWidth,
492
+ deletions: deletionsWidth,
493
+ total: totalWidth
494
+ };
495
+ }
496
+ function getDisplayName(file) {
497
+ if (file.status === "renamed" && file.oldPath) {
498
+ return `${file.oldPath} → ${file.path}`;
499
+ }
500
+ return file.path;
501
+ }
502
+ function getShortName(path) {
503
+ return path.split("/").pop() || path;
504
+ }
300
505
  return (_ctx, _push, _parent, _attrs) => {
301
- _push(`<div${ssrRenderAttrs(mergeProps({
302
- "data-slot": "card-action",
303
- class: unref(cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end", props.class)
304
- }, _attrs))}>`);
305
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
506
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "space-y-0.5 p-2" }, _attrs))}><!--[-->`);
507
+ ssrRenderList(__props.files, (file) => {
508
+ _push(`<button class="${ssrRenderClass([{
509
+ "bg-muted": __props.selectedFile === file.path
510
+ }, "group flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/50"])}">`);
511
+ ssrRenderVNode(_push, createVNode(resolveDynamicComponent(getStatusConfig(file.status).icon), {
512
+ class: ["size-4 shrink-0", getStatusConfig(file.status).class]
513
+ }, null), _parent);
514
+ _push(`<div class="min-w-0 flex-1"><div class="${ssrRenderClass([{
515
+ "font-medium": __props.selectedFile === file.path
516
+ }, "truncate text-xs"])}"${ssrRenderAttr("title", getDisplayName(file))}>`);
517
+ if (file.status === "renamed" && file.oldPath) {
518
+ _push(`<!--[--><span class="text-muted-foreground">${ssrInterpolate(getShortName(file.oldPath))}</span>`);
519
+ _push(ssrRenderComponent(unref(ArrowRight), { class: "mx-1 inline size-3 text-muted-foreground" }, null, _parent));
520
+ _push(`<span>${ssrInterpolate(getShortName(file.path))}</span><!--]-->`);
521
+ } else {
522
+ _push(`<!--[-->${ssrInterpolate(file.path)}<!--]-->`);
523
+ }
524
+ _push(`</div><div class="mt-1 flex h-1.5 w-full overflow-hidden rounded-full bg-muted">`);
525
+ if (getBarWidths(file).additions > 0) {
526
+ _push(`<div class="bg-green-500 dark:bg-green-400" style="${ssrRenderStyle({ width: `${getBarWidths(file).additions}%` })}"></div>`);
527
+ } else {
528
+ _push(`<!---->`);
529
+ }
530
+ if (getBarWidths(file).deletions > 0) {
531
+ _push(`<div class="bg-red-500 dark:bg-red-400" style="${ssrRenderStyle({ width: `${getBarWidths(file).deletions}%` })}"></div>`);
532
+ } else {
533
+ _push(`<!---->`);
534
+ }
535
+ _push(`</div></div><div class="flex shrink-0 items-center gap-1 text-xs">`);
536
+ if (file.additions > 0) {
537
+ _push(`<span class="text-green-600 dark:text-green-400"> +${ssrInterpolate(file.additions)}</span>`);
538
+ } else {
539
+ _push(`<!---->`);
540
+ }
541
+ if (file.deletions > 0) {
542
+ _push(`<span class="text-red-600 dark:text-red-400"> -${ssrInterpolate(file.deletions)}</span>`);
543
+ } else {
544
+ _push(`<!---->`);
545
+ }
546
+ _push(`</div></button>`);
547
+ });
548
+ _push(`<!--]-->`);
549
+ if (__props.files.length === 0) {
550
+ _push(`<div class="py-4 text-center text-sm text-muted-foreground"> No files changed </div>`);
551
+ } else {
552
+ _push(`<!---->`);
553
+ }
306
554
  _push(`</div>`);
307
555
  };
308
556
  }
309
557
  });
310
- const _sfc_setup$y = _sfc_main$y.setup;
311
- _sfc_main$y.setup = (props, ctx) => {
558
+ const _sfc_setup$k = _sfc_main$k.setup;
559
+ _sfc_main$k.setup = (props, ctx) => {
312
560
  const ssrContext = useSSRContext();
313
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/card/CardAction.vue");
314
- return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0;
561
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/git/ChangesMinimap.vue");
562
+ return _sfc_setup$k ? _sfc_setup$k(props, ctx) : void 0;
315
563
  };
316
- Object.assign(_sfc_main$y, { __name: "UiCardAction" });
317
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
318
- __name: "CardContent",
564
+ const __nuxt_component_0$1 = Object.assign(_sfc_main$k, { __name: "GitChangesMinimap" });
565
+ const LINE_LIMIT = 1e4;
566
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
567
+ __name: "DiffViewer",
319
568
  __ssrInlineRender: true,
320
569
  props: {
321
- class: {}
570
+ hunks: {},
571
+ filePath: {},
572
+ binary: { type: Boolean },
573
+ oldPath: {},
574
+ fileContent: {},
575
+ showFullFile: { type: Boolean },
576
+ isLoadingContent: { type: Boolean }
322
577
  },
323
578
  setup(__props) {
324
579
  const props = __props;
325
- return (_ctx, _push, _parent, _attrs) => {
326
- _push(`<div${ssrRenderAttrs(mergeProps({
327
- "data-slot": "card-content",
328
- class: unref(cn)("px-6", props.class)
329
- }, _attrs))}>`);
330
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
331
- _push(`</div>`);
332
- };
333
- }
334
- });
335
- const _sfc_setup$x = _sfc_main$x.setup;
336
- _sfc_main$x.setup = (props, ctx) => {
337
- const ssrContext = useSSRContext();
338
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/card/CardContent.vue");
339
- return _sfc_setup$x ? _sfc_setup$x(props, ctx) : void 0;
340
- };
341
- const CardContent = Object.assign(_sfc_main$x, { __name: "UiCardContent" });
342
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
343
- __name: "CardDescription",
344
- __ssrInlineRender: true,
345
- props: {
346
- class: {}
347
- },
348
- setup(__props) {
349
- const props = __props;
350
- return (_ctx, _push, _parent, _attrs) => {
351
- _push(`<p${ssrRenderAttrs(mergeProps({
352
- "data-slot": "card-description",
353
- class: unref(cn)("text-muted-foreground text-sm", props.class)
354
- }, _attrs))}>`);
355
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
356
- _push(`</p>`);
357
- };
358
- }
359
- });
360
- const _sfc_setup$w = _sfc_main$w.setup;
361
- _sfc_main$w.setup = (props, ctx) => {
362
- const ssrContext = useSSRContext();
363
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/card/CardDescription.vue");
364
- return _sfc_setup$w ? _sfc_setup$w(props, ctx) : void 0;
365
- };
366
- Object.assign(_sfc_main$w, { __name: "UiCardDescription" });
367
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
368
- __name: "CardFooter",
369
- __ssrInlineRender: true,
370
- props: {
371
- class: {}
372
- },
373
- setup(__props) {
374
- const props = __props;
375
- return (_ctx, _push, _parent, _attrs) => {
376
- _push(`<div${ssrRenderAttrs(mergeProps({
377
- "data-slot": "card-footer",
378
- class: unref(cn)("flex items-center px-6 [.border-t]:pt-6", props.class)
379
- }, _attrs))}>`);
380
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
381
- _push(`</div>`);
382
- };
383
- }
384
- });
385
- const _sfc_setup$v = _sfc_main$v.setup;
386
- _sfc_main$v.setup = (props, ctx) => {
387
- const ssrContext = useSSRContext();
388
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/card/CardFooter.vue");
389
- return _sfc_setup$v ? _sfc_setup$v(props, ctx) : void 0;
390
- };
391
- Object.assign(_sfc_main$v, { __name: "UiCardFooter" });
392
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
393
- __name: "CardHeader",
394
- __ssrInlineRender: true,
395
- props: {
396
- class: {}
397
- },
398
- setup(__props) {
399
- const props = __props;
400
- return (_ctx, _push, _parent, _attrs) => {
401
- _push(`<div${ssrRenderAttrs(mergeProps({
402
- "data-slot": "card-header",
403
- class: unref(cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", props.class)
404
- }, _attrs))}>`);
405
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
406
- _push(`</div>`);
407
- };
408
- }
409
- });
410
- const _sfc_setup$u = _sfc_main$u.setup;
411
- _sfc_main$u.setup = (props, ctx) => {
412
- const ssrContext = useSSRContext();
413
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/card/CardHeader.vue");
414
- return _sfc_setup$u ? _sfc_setup$u(props, ctx) : void 0;
415
- };
416
- Object.assign(_sfc_main$u, { __name: "UiCardHeader" });
417
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
418
- __name: "CardTitle",
419
- __ssrInlineRender: true,
420
- props: {
421
- class: {}
422
- },
423
- setup(__props) {
424
- const props = __props;
425
- return (_ctx, _push, _parent, _attrs) => {
426
- _push(`<h3${ssrRenderAttrs(mergeProps({
427
- "data-slot": "card-title",
428
- class: unref(cn)("leading-none font-semibold", props.class)
429
- }, _attrs))}>`);
430
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
431
- _push(`</h3>`);
432
- };
433
- }
434
- });
435
- const _sfc_setup$t = _sfc_main$t.setup;
436
- _sfc_main$t.setup = (props, ctx) => {
437
- const ssrContext = useSSRContext();
438
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/card/CardTitle.vue");
439
- return _sfc_setup$t ? _sfc_setup$t(props, ctx) : void 0;
440
- };
441
- Object.assign(_sfc_main$t, { __name: "UiCardTitle" });
442
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
443
- __name: "Card",
444
- __ssrInlineRender: true,
445
- props: {
446
- task: {},
447
- blockedBy: {}
448
- },
449
- emits: ["click"],
450
- setup(__props, { emit: __emit }) {
451
- const props = __props;
452
- const emit = __emit;
453
- const categoryConfig = computed(() => {
454
- switch (props.task.category) {
455
- case "setup":
456
- return { label: "Setup", variant: "secondary" };
457
- case "feature":
458
- return { label: "Feature", variant: "default" };
459
- case "integration":
460
- return { label: "Integration", variant: "outline" };
461
- case "testing":
462
- return { label: "Testing", variant: "secondary" };
463
- case "documentation":
464
- return { label: "Docs", variant: "secondary" };
465
- default:
466
- return { label: props.task.category, variant: "secondary" };
467
- }
468
- });
469
- const priorityConfig = computed(() => {
470
- switch (props.task.priority) {
471
- case "critical":
472
- return { icon: ArrowUp, class: "text-destructive", label: "Critical" };
473
- case "high":
474
- return { icon: ArrowUp, class: "text-orange-500", label: "High" };
475
- case "medium":
476
- return { icon: Minus, class: "text-muted-foreground", label: "Medium" };
477
- case "low":
478
- return { icon: ArrowDown, class: "text-muted-foreground", label: "Low" };
479
- default:
480
- return { icon: Minus, class: "text-muted-foreground", label: "Unknown" };
580
+ const showAll = ref(false);
581
+ const syncScrollEnabled = ref(true);
582
+ ref(null);
583
+ ref(null);
584
+ ref(false);
585
+ const totalLines = computed(() => {
586
+ let count = 0;
587
+ for (const hunk of props.hunks) {
588
+ count += hunk.lines.length;
481
589
  }
590
+ return count;
482
591
  });
483
- const isBlocked = computed(() => {
484
- return props.blockedBy && props.blockedBy.length > 0;
485
- });
486
- const taskNumber = computed(() => {
487
- const match = props.task.id.match(/(\d+)$/);
488
- const value = match?.[1];
489
- return value ? parseInt(value, 10) : 0;
490
- });
491
- const blockedCount = computed(() => {
492
- return props.blockedBy?.length ?? 0;
493
- });
494
- function handleClick() {
495
- emit("click", props.task);
496
- }
497
- return (_ctx, _push, _parent, _attrs) => {
498
- _push(ssrRenderComponent(unref(Card), mergeProps({
499
- class: ["cursor-pointer py-0 gap-0 transition-all hover:shadow-md hover:border-primary/50", { "opacity-60": unref(isBlocked) }],
500
- onClick: handleClick
501
- }, _attrs), {
502
- default: withCtx((_, _push2, _parent2, _scopeId) => {
503
- if (_push2) {
504
- _push2(ssrRenderComponent(unref(CardContent), { class: "p-2.5" }, {
505
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
506
- if (_push3) {
507
- _push3(`<div class="flex items-center justify-between gap-2 mb-1.5"${_scopeId2}>`);
508
- _push3(ssrRenderComponent(unref(Badge), {
509
- variant: unref(categoryConfig).variant,
510
- class: "text-xs"
511
- }, {
512
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
513
- if (_push4) {
514
- _push4(`${ssrInterpolate(unref(categoryConfig).label)}`);
515
- } else {
516
- return [
517
- createTextVNode(toDisplayString(unref(categoryConfig).label), 1)
518
- ];
519
- }
520
- }),
521
- _: 1
522
- }, _parent3, _scopeId2));
523
- ssrRenderVNode(_push3, createVNode(resolveDynamicComponent(unref(priorityConfig).icon), {
524
- class: ["size-4", unref(priorityConfig).class],
525
- title: unref(priorityConfig).label
526
- }, null), _parent3, _scopeId2);
527
- _push3(`</div><h4 class="text-sm font-medium leading-snug"${_scopeId2}><span class="text-muted-foreground"${_scopeId2}>#${ssrInterpolate(unref(taskNumber))}</span> ${ssrInterpolate(__props.task.title)}</h4>`);
528
- if (unref(isBlocked)) {
529
- _push3(`<div class="mt-2 flex items-center gap-1.5 text-xs text-destructive"${_scopeId2}>`);
530
- _push3(ssrRenderComponent(unref(AlertCircle), { class: "size-3.5" }, null, _parent3, _scopeId2));
531
- _push3(`<span${_scopeId2}>Blocked by ${ssrInterpolate(unref(blockedCount))} task${ssrInterpolate(unref(blockedCount) === 1 ? "" : "s")}</span></div>`);
532
- } else {
533
- _push3(`<!---->`);
534
- }
535
- } else {
536
- return [
537
- createVNode("div", { class: "flex items-center justify-between gap-2 mb-1.5" }, [
538
- createVNode(unref(Badge), {
539
- variant: unref(categoryConfig).variant,
540
- class: "text-xs"
541
- }, {
542
- default: withCtx(() => [
543
- createTextVNode(toDisplayString(unref(categoryConfig).label), 1)
544
- ]),
545
- _: 1
546
- }, 8, ["variant"]),
547
- (openBlock(), createBlock(resolveDynamicComponent(unref(priorityConfig).icon), {
548
- class: ["size-4", unref(priorityConfig).class],
549
- title: unref(priorityConfig).label
550
- }, null, 8, ["class", "title"]))
551
- ]),
552
- createVNode("h4", { class: "text-sm font-medium leading-snug" }, [
553
- createVNode("span", { class: "text-muted-foreground" }, "#" + toDisplayString(unref(taskNumber)), 1),
554
- createTextVNode(" " + toDisplayString(__props.task.title), 1)
555
- ]),
556
- unref(isBlocked) ? (openBlock(), createBlock("div", {
557
- key: 0,
558
- class: "mt-2 flex items-center gap-1.5 text-xs text-destructive"
559
- }, [
560
- createVNode(unref(AlertCircle), { class: "size-3.5" }),
561
- createVNode("span", null, "Blocked by " + toDisplayString(unref(blockedCount)) + " task" + toDisplayString(unref(blockedCount) === 1 ? "" : "s"), 1)
562
- ])) : createCommentVNode("", true)
563
- ];
564
- }
565
- }),
566
- _: 1
567
- }, _parent2, _scopeId));
568
- } else {
569
- return [
570
- createVNode(unref(CardContent), { class: "p-2.5" }, {
571
- default: withCtx(() => [
572
- createVNode("div", { class: "flex items-center justify-between gap-2 mb-1.5" }, [
573
- createVNode(unref(Badge), {
574
- variant: unref(categoryConfig).variant,
575
- class: "text-xs"
576
- }, {
577
- default: withCtx(() => [
578
- createTextVNode(toDisplayString(unref(categoryConfig).label), 1)
579
- ]),
580
- _: 1
581
- }, 8, ["variant"]),
582
- (openBlock(), createBlock(resolveDynamicComponent(unref(priorityConfig).icon), {
583
- class: ["size-4", unref(priorityConfig).class],
584
- title: unref(priorityConfig).label
585
- }, null, 8, ["class", "title"]))
586
- ]),
587
- createVNode("h4", { class: "text-sm font-medium leading-snug" }, [
588
- createVNode("span", { class: "text-muted-foreground" }, "#" + toDisplayString(unref(taskNumber)), 1),
589
- createTextVNode(" " + toDisplayString(__props.task.title), 1)
590
- ]),
591
- unref(isBlocked) ? (openBlock(), createBlock("div", {
592
- key: 0,
593
- class: "mt-2 flex items-center gap-1.5 text-xs text-destructive"
594
- }, [
595
- createVNode(unref(AlertCircle), { class: "size-3.5" }),
596
- createVNode("span", null, "Blocked by " + toDisplayString(unref(blockedCount)) + " task" + toDisplayString(unref(blockedCount) === 1 ? "" : "s"), 1)
597
- ])) : createCommentVNode("", true)
598
- ]),
599
- _: 1
600
- })
601
- ];
592
+ const isLargeFile = computed(() => totalLines.value > LINE_LIMIT);
593
+ const isEmpty = computed(() => props.hunks.length === 0 && !props.binary);
594
+ const changedLines = computed(() => {
595
+ const added = /* @__PURE__ */ new Set();
596
+ const removed = /* @__PURE__ */ new Set();
597
+ for (const hunk of props.hunks) {
598
+ for (const line of hunk.lines) {
599
+ if (line.type === "add" && line.newNumber !== void 0) {
600
+ added.add(line.newNumber);
602
601
  }
603
- }),
604
- _: 1
605
- }, _parent));
606
- };
607
- }
608
- });
609
- const _sfc_setup$s = _sfc_main$s.setup;
610
- _sfc_main$s.setup = (props, ctx) => {
611
- const ssrContext = useSSRContext();
612
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/Card.vue");
613
- return _sfc_setup$s ? _sfc_setup$s(props, ctx) : void 0;
614
- };
615
- const __nuxt_component_0$3 = Object.assign(_sfc_main$s, { __name: "TasksCard" });
616
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
617
- __name: "Column",
618
- __ssrInlineRender: true,
619
- props: {
620
- status: {},
621
- tasks: {},
622
- blockedByMap: {}
623
- },
624
- emits: ["taskClick"],
625
- setup(__props, { emit: __emit }) {
626
- const props = __props;
627
- const emit = __emit;
628
- const statusConfig = computed(() => {
629
- switch (props.status) {
630
- case "pending":
631
- return {
632
- label: "Pending",
633
- icon: Circle,
634
- headerClass: "bg-muted/50",
635
- iconClass: "text-muted-foreground"
636
- };
637
- case "in_progress":
638
- return {
639
- label: "In Progress",
640
- icon: PlayCircle,
641
- headerClass: "bg-blue-500/10",
642
- iconClass: "text-blue-500"
643
- };
644
- case "completed":
645
- return {
646
- label: "Completed",
647
- icon: CheckCircle2,
648
- headerClass: "bg-green-500/10",
649
- iconClass: "text-green-500"
650
- };
651
- default:
652
- return {
653
- label: props.status,
654
- icon: Circle,
655
- headerClass: "bg-muted/50",
656
- iconClass: "text-muted-foreground"
657
- };
658
- }
659
- });
660
- function getBlockedBy(taskId) {
661
- return props.blockedByMap?.get(taskId) ?? [];
662
- }
663
- function handleTaskClick(task) {
664
- emit("taskClick", task);
665
- }
666
- return (_ctx, _push, _parent, _attrs) => {
667
- const _component_TasksCard = __nuxt_component_0$3;
668
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex h-full min-w-56 flex-1 flex-col overflow-hidden rounded-lg border border-border bg-card" }, _attrs))} data-v-a1317eba><div class="${ssrRenderClass([unref(statusConfig).headerClass, "flex items-center gap-2 rounded-t-lg border-b border-border px-3 py-2"])}" data-v-a1317eba>`);
669
- ssrRenderVNode(_push, createVNode(resolveDynamicComponent(unref(statusConfig).icon), {
670
- class: ["size-4", unref(statusConfig).iconClass]
671
- }, null), _parent);
672
- _push(`<h3 class="text-sm font-medium" data-v-a1317eba>${ssrInterpolate(unref(statusConfig).label)}</h3><span class="ml-auto text-xs text-muted-foreground" data-v-a1317eba>${ssrInterpolate(__props.tasks.length)}</span></div><div class="scrollbar-hide min-h-0 flex-1 overflow-y-auto p-1.5" data-v-a1317eba><div class="space-y-1.5" data-v-a1317eba><!--[-->`);
673
- ssrRenderList(__props.tasks, (task) => {
674
- _push(ssrRenderComponent(_component_TasksCard, {
675
- key: task.id,
676
- task,
677
- "blocked-by": getBlockedBy(task.id),
678
- onClick: handleTaskClick
679
- }, null, _parent));
680
- });
681
- _push(`<!--]-->`);
682
- if (__props.tasks.length === 0) {
683
- _push(`<div class="py-8 text-center text-sm text-muted-foreground" data-v-a1317eba> No tasks </div>`);
684
- } else {
685
- _push(`<!---->`);
686
- }
687
- _push(`</div></div></div>`);
688
- };
689
- }
690
- });
691
- const _sfc_setup$r = _sfc_main$r.setup;
692
- _sfc_main$r.setup = (props, ctx) => {
693
- const ssrContext = useSSRContext();
694
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/Column.vue");
695
- return _sfc_setup$r ? _sfc_setup$r(props, ctx) : void 0;
696
- };
697
- const __nuxt_component_0$2 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main$r, [["__scopeId", "data-v-a1317eba"]]), { __name: "TasksColumn" });
698
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
699
- __name: "Board",
700
- __ssrInlineRender: true,
701
- props: {
702
- tasks: {}
703
- },
704
- emits: ["taskClick"],
705
- setup(__props, { emit: __emit }) {
706
- const props = __props;
707
- const emit = __emit;
708
- function getTaskNumber(task) {
709
- const match = task.id.match(/(\d+)$/);
710
- const value = match?.[1];
711
- return value ? parseInt(value, 10) : 0;
712
- }
713
- const pendingTasks = computed(
714
- () => props.tasks.filter((t) => t.status === "pending").sort((a, b) => getTaskNumber(a) - getTaskNumber(b))
715
- );
716
- const inProgressTasks = computed(
717
- () => props.tasks.filter((t) => t.status === "in_progress").sort((a, b) => getTaskNumber(a) - getTaskNumber(b))
718
- );
719
- const completedTasks = computed(
720
- () => props.tasks.filter((t) => t.status === "completed").sort((a, b) => {
721
- const aTime = a.completedAt ? new Date(a.completedAt).getTime() : 0;
722
- const bTime = b.completedAt ? new Date(b.completedAt).getTime() : 0;
723
- return bTime - aTime;
724
- })
725
- );
726
- const blockedByMap = computed(() => {
727
- const map = /* @__PURE__ */ new Map();
728
- const completedIds = new Set(completedTasks.value.map((t) => t.id));
729
- for (const task of props.tasks) {
730
- if (task.dependencies.length > 0) {
731
- const blockers = task.dependencies.filter((depId) => !completedIds.has(depId));
732
- if (blockers.length > 0) {
733
- map.set(task.id, blockers);
602
+ if (line.type === "remove" && line.oldNumber !== void 0) {
603
+ removed.add(line.oldNumber);
734
604
  }
735
605
  }
736
606
  }
737
- return map;
738
- });
739
- const columns = [
740
- { status: "pending", tasks: pendingTasks },
741
- { status: "in_progress", tasks: inProgressTasks },
742
- { status: "completed", tasks: completedTasks }
743
- ];
744
- function handleTaskClick(task) {
745
- emit("taskClick", task);
746
- }
747
- return (_ctx, _push, _parent, _attrs) => {
748
- const _component_TasksColumn = __nuxt_component_0$2;
749
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex h-full gap-3 overflow-x-auto pb-2" }, _attrs))}><!--[-->`);
750
- ssrRenderList(columns, (column) => {
751
- _push(ssrRenderComponent(_component_TasksColumn, {
752
- key: column.status,
753
- status: column.status,
754
- tasks: column.tasks.value,
755
- "blocked-by-map": unref(blockedByMap),
756
- onTaskClick: handleTaskClick
757
- }, null, _parent));
758
- });
759
- _push(`<!--]--></div>`);
760
- };
761
- }
762
- });
763
- const _sfc_setup$q = _sfc_main$q.setup;
764
- _sfc_main$q.setup = (props, ctx) => {
765
- const ssrContext = useSSRContext();
766
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/Board.vue");
767
- return _sfc_setup$q ? _sfc_setup$q(props, ctx) : void 0;
768
- };
769
- const __nuxt_component_3 = Object.assign(_sfc_main$q, { __name: "TasksBoard" });
770
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
771
- __name: "ChangesMinimap",
772
- __ssrInlineRender: true,
773
- props: {
774
- files: {},
775
- selectedFile: {}
776
- },
777
- emits: ["select"],
778
- setup(__props, { emit: __emit }) {
779
- const props = __props;
780
- const maxChanges = computed(() => {
781
- if (props.files.length === 0) return 1;
782
- return Math.max(...props.files.map((f) => f.additions + f.deletions), 1);
783
- });
784
- function getStatusConfig(status) {
785
- switch (status) {
786
- case "added":
787
- return { icon: FilePlus, class: "text-green-600 dark:text-green-400" };
788
- case "deleted":
789
- return { icon: FileX, class: "text-red-600 dark:text-red-400" };
790
- case "renamed":
791
- return { icon: ArrowRight, class: "text-blue-600 dark:text-blue-400" };
792
- case "modified":
793
- default:
794
- return { icon: FileEdit, class: "text-yellow-600 dark:text-yellow-400" };
795
- }
796
- }
797
- function getBarWidths(file) {
798
- const total = file.additions + file.deletions;
799
- if (total === 0) return { additions: 0, deletions: 0, total: 0 };
800
- const totalWidth = total / maxChanges.value * 100;
801
- const additionsWidth = file.additions / total * totalWidth;
802
- const deletionsWidth = file.deletions / total * totalWidth;
803
- return {
804
- additions: additionsWidth,
805
- deletions: deletionsWidth,
806
- total: totalWidth
807
- };
808
- }
809
- function getDisplayName(file) {
810
- if (file.status === "renamed" && file.oldPath) {
811
- return `${file.oldPath} → ${file.path}`;
812
- }
813
- return file.path;
814
- }
815
- function getShortName(path) {
816
- return path.split("/").pop() || path;
817
- }
818
- return (_ctx, _push, _parent, _attrs) => {
819
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "space-y-0.5 p-2" }, _attrs))}><!--[-->`);
820
- ssrRenderList(__props.files, (file) => {
821
- _push(`<button class="${ssrRenderClass([{
822
- "bg-muted": __props.selectedFile === file.path
823
- }, "group flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/50"])}">`);
824
- ssrRenderVNode(_push, createVNode(resolveDynamicComponent(getStatusConfig(file.status).icon), {
825
- class: ["size-4 shrink-0", getStatusConfig(file.status).class]
826
- }, null), _parent);
827
- _push(`<div class="min-w-0 flex-1"><div class="${ssrRenderClass([{
828
- "font-medium": __props.selectedFile === file.path
829
- }, "truncate text-xs"])}"${ssrRenderAttr("title", getDisplayName(file))}>`);
830
- if (file.status === "renamed" && file.oldPath) {
831
- _push(`<!--[--><span class="text-muted-foreground">${ssrInterpolate(getShortName(file.oldPath))}</span>`);
832
- _push(ssrRenderComponent(unref(ArrowRight), { class: "mx-1 inline size-3 text-muted-foreground" }, null, _parent));
833
- _push(`<span>${ssrInterpolate(getShortName(file.path))}</span><!--]-->`);
834
- } else {
835
- _push(`<!--[-->${ssrInterpolate(file.path)}<!--]-->`);
836
- }
837
- _push(`</div><div class="mt-1 flex h-1.5 w-full overflow-hidden rounded-full bg-muted">`);
838
- if (getBarWidths(file).additions > 0) {
839
- _push(`<div class="bg-green-500 dark:bg-green-400" style="${ssrRenderStyle({ width: `${getBarWidths(file).additions}%` })}"></div>`);
840
- } else {
841
- _push(`<!---->`);
842
- }
843
- if (getBarWidths(file).deletions > 0) {
844
- _push(`<div class="bg-red-500 dark:bg-red-400" style="${ssrRenderStyle({ width: `${getBarWidths(file).deletions}%` })}"></div>`);
845
- } else {
846
- _push(`<!---->`);
847
- }
848
- _push(`</div></div><div class="flex shrink-0 items-center gap-1 text-xs">`);
849
- if (file.additions > 0) {
850
- _push(`<span class="text-green-600 dark:text-green-400"> +${ssrInterpolate(file.additions)}</span>`);
851
- } else {
852
- _push(`<!---->`);
853
- }
854
- if (file.deletions > 0) {
855
- _push(`<span class="text-red-600 dark:text-red-400"> -${ssrInterpolate(file.deletions)}</span>`);
856
- } else {
857
- _push(`<!---->`);
858
- }
859
- _push(`</div></button>`);
860
- });
861
- _push(`<!--]-->`);
862
- if (__props.files.length === 0) {
863
- _push(`<div class="py-4 text-center text-sm text-muted-foreground"> No files changed </div>`);
864
- } else {
865
- _push(`<!---->`);
866
- }
867
- _push(`</div>`);
868
- };
869
- }
870
- });
871
- const _sfc_setup$p = _sfc_main$p.setup;
872
- _sfc_main$p.setup = (props, ctx) => {
873
- const ssrContext = useSSRContext();
874
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/git/ChangesMinimap.vue");
875
- return _sfc_setup$p ? _sfc_setup$p(props, ctx) : void 0;
876
- };
877
- const __nuxt_component_0$1 = Object.assign(_sfc_main$p, { __name: "GitChangesMinimap" });
878
- const LINE_LIMIT = 1e4;
879
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
880
- __name: "DiffViewer",
881
- __ssrInlineRender: true,
882
- props: {
883
- hunks: {},
884
- filePath: {},
885
- binary: { type: Boolean },
886
- oldPath: {},
887
- fileContent: {},
888
- showFullFile: { type: Boolean },
889
- isLoadingContent: { type: Boolean }
890
- },
891
- setup(__props) {
892
- const props = __props;
893
- const showAll = ref(false);
894
- const syncScrollEnabled = ref(true);
895
- ref(null);
896
- ref(null);
897
- ref(false);
898
- const totalLines = computed(() => {
899
- let count = 0;
900
- for (const hunk of props.hunks) {
901
- count += hunk.lines.length;
902
- }
903
- return count;
904
- });
905
- const isLargeFile = computed(() => totalLines.value > LINE_LIMIT);
906
- const isEmpty = computed(() => props.hunks.length === 0 && !props.binary);
907
- const changedLines = computed(() => {
908
- const added = /* @__PURE__ */ new Set();
909
- const removed = /* @__PURE__ */ new Set();
910
- for (const hunk of props.hunks) {
911
- for (const line of hunk.lines) {
912
- if (line.type === "add" && line.newNumber !== void 0) {
913
- added.add(line.newNumber);
914
- }
915
- if (line.type === "remove" && line.oldNumber !== void 0) {
916
- removed.add(line.oldNumber);
917
- }
918
- }
919
- }
920
- return { added, removed };
607
+ return { added, removed };
921
608
  });
922
609
  const fullFileLines = computed(() => {
923
610
  if (!props.fileContent) return [];
@@ -939,6 +626,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
939
626
  java: "java",
940
627
  kt: "kotlin",
941
628
  swift: "swift",
629
+ dart: "dart",
942
630
  c: "c",
943
631
  cpp: "cpp",
944
632
  h: "c",
@@ -1060,7 +748,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1060
748
  return "";
1061
749
  }
1062
750
  try {
1063
- const html = await codeToHtml$1(content, {
751
+ const html = await codeToHtml(content, {
1064
752
  lang,
1065
753
  themes: {
1066
754
  light: "catppuccin-latte",
@@ -1078,7 +766,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1078
766
  return [];
1079
767
  }
1080
768
  try {
1081
- const html = await codeToHtml$1(content, {
769
+ const html = await codeToHtml(content, {
1082
770
  lang,
1083
771
  themes: {
1084
772
  light: "catppuccin-latte",
@@ -1174,21 +862,21 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1174
862
  return "context";
1175
863
  }
1176
864
  return (_ctx, _push, _parent, _attrs) => {
1177
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "diff-viewer" }, _attrs))} data-v-2678ccde>`);
865
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "diff-viewer" }, _attrs))} data-v-13d918cc>`);
1178
866
  if ((unref(isLoading) || __props.isLoadingContent || unref(isLoadingFullFile)) && !__props.binary) {
1179
- _push(`<div class="flex items-center justify-center py-8" data-v-2678ccde><div class="size-6 animate-spin rounded-full border-2 border-primary border-t-transparent" data-v-2678ccde></div></div>`);
867
+ _push(`<div class="flex items-center justify-center py-8" data-v-13d918cc><div class="size-6 animate-spin rounded-full border-2 border-primary border-t-transparent" data-v-13d918cc></div></div>`);
1180
868
  } else if (__props.binary) {
1181
- _push(`<div class="flex flex-col items-center justify-center gap-3 py-12 text-muted-foreground" data-v-2678ccde>`);
869
+ _push(`<div class="flex flex-col items-center justify-center gap-3 py-12 text-muted-foreground" data-v-13d918cc>`);
1182
870
  _push(ssrRenderComponent(unref(FileWarning), { class: "size-10 opacity-50" }, null, _parent));
1183
- _push(`<div class="text-center" data-v-2678ccde><p class="font-medium" data-v-2678ccde>Binary file</p><p class="text-sm" data-v-2678ccde>This file cannot be displayed as a diff</p></div></div>`);
871
+ _push(`<div class="text-center" data-v-13d918cc><p class="font-medium" data-v-13d918cc>Binary file</p><p class="text-sm" data-v-13d918cc>This file cannot be displayed as a diff</p></div></div>`);
1184
872
  } else if (unref(isEmpty) && !__props.showFullFile) {
1185
- _push(`<div class="flex flex-col items-center justify-center gap-3 py-12 text-muted-foreground" data-v-2678ccde>`);
873
+ _push(`<div class="flex flex-col items-center justify-center gap-3 py-12 text-muted-foreground" data-v-13d918cc>`);
1186
874
  _push(ssrRenderComponent(unref(AlertTriangle), { class: "size-10 opacity-50" }, null, _parent));
1187
- _push(`<div class="text-center" data-v-2678ccde><p class="font-medium" data-v-2678ccde>No changes</p><p class="text-sm" data-v-2678ccde>This file was touched but has no content changes</p></div></div>`);
875
+ _push(`<div class="text-center" data-v-13d918cc><p class="font-medium" data-v-13d918cc>No changes</p><p class="text-sm" data-v-13d918cc>This file was touched but has no content changes</p></div></div>`);
1188
876
  } else if (unref(isLargeFile) && !unref(showAll) && !__props.showFullFile) {
1189
- _push(`<div class="diff-container" data-v-2678ccde><div class="flex flex-col items-center justify-center gap-3 border-b border-border bg-muted/30 py-6" data-v-2678ccde>`);
877
+ _push(`<div class="diff-container" data-v-13d918cc><div class="flex flex-col items-center justify-center gap-3 border-b border-border bg-muted/30 py-6" data-v-13d918cc>`);
1190
878
  _push(ssrRenderComponent(unref(AlertTriangle), { class: "size-8 text-yellow-500" }, null, _parent));
1191
- _push(`<div class="text-center" data-v-2678ccde><p class="font-medium" data-v-2678ccde>Large file</p><p class="text-sm text-muted-foreground" data-v-2678ccde> This file has ${ssrInterpolate(unref(totalLines).toLocaleString())} lines (threshold: ${ssrInterpolate(LINE_LIMIT.toLocaleString())}) </p></div>`);
879
+ _push(`<div class="text-center" data-v-13d918cc><p class="font-medium" data-v-13d918cc>Large file</p><p class="text-sm text-muted-foreground" data-v-13d918cc> This file has ${ssrInterpolate(unref(totalLines).toLocaleString())} lines (threshold: ${ssrInterpolate(LINE_LIMIT.toLocaleString())}) </p></div>`);
1192
880
  _push(ssrRenderComponent(unref(Button), {
1193
881
  variant: "outline",
1194
882
  size: "sm",
@@ -1209,15 +897,15 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1209
897
  }, _parent));
1210
898
  _push(`</div></div>`);
1211
899
  } else if (__props.showFullFile && __props.fileContent) {
1212
- _push(`<div class="diff-container" data-v-2678ccde><div class="full-file-view" data-v-2678ccde><!--[-->`);
900
+ _push(`<div class="diff-container" data-v-13d918cc><div class="full-file-view" data-v-13d918cc><!--[-->`);
1213
901
  ssrRenderList(unref(fullFileLines), (line, index) => {
1214
902
  _push(`<div class="${ssrRenderClass([{
1215
903
  "diff-add": getFullFileLineType(index + 1) === "add"
1216
- }, "full-file-line"])}" data-v-2678ccde><div class="diff-gutter" data-v-2678ccde><span class="line-number" data-v-2678ccde>${ssrInterpolate(index + 1)}</span></div><div class="diff-content" data-v-2678ccde><span class="diff-code" data-v-2678ccde>${(unref(highlightedFullFile)[index] || escapeHtml(line)) ?? ""}</span></div></div>`);
904
+ }, "full-file-line"])}" data-v-13d918cc><div class="diff-gutter" data-v-13d918cc><span class="line-number" data-v-13d918cc>${ssrInterpolate(index + 1)}</span></div><div class="diff-content" data-v-13d918cc><span class="diff-code" data-v-13d918cc>${(unref(highlightedFullFile)[index] || escapeHtml(line)) ?? ""}</span></div></div>`);
1217
905
  });
1218
906
  _push(`<!--]--></div></div>`);
1219
907
  } else {
1220
- _push(`<div class="diff-container" data-v-2678ccde><div class="diff-toolbar" data-v-2678ccde>`);
908
+ _push(`<div class="diff-container" data-v-13d918cc><div class="diff-toolbar" data-v-13d918cc>`);
1221
909
  _push(ssrRenderComponent(unref(Button), {
1222
910
  variant: "ghost",
1223
911
  size: "sm",
@@ -1237,25 +925,25 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1237
925
  }),
1238
926
  _: 1
1239
927
  }, _parent));
1240
- _push(`</div><div class="diff-split" data-v-2678ccde><div class="diff-column diff-column-left" data-v-2678ccde><div class="diff-column-content" data-v-2678ccde><!--[-->`);
928
+ _push(`</div><div class="diff-split" data-v-13d918cc><div class="diff-column diff-column-left" data-v-13d918cc><div class="diff-column-content" data-v-13d918cc><!--[-->`);
1241
929
  ssrRenderList(unref(displayItems), (item) => {
1242
930
  _push(`<!--[-->`);
1243
931
  if (item.type === "separator") {
1244
- _push(`<div class="diff-separator-half" data-v-2678ccde><div class="separator-line" data-v-2678ccde></div><span class="separator-text" data-v-2678ccde>···</span></div>`);
932
+ _push(`<div class="diff-separator-half" data-v-13d918cc><div class="separator-line" data-v-13d918cc></div><span class="separator-text" data-v-13d918cc>···</span></div>`);
1245
933
  } else if (item.pair) {
1246
934
  _push(`<div class="${ssrRenderClass([{
1247
935
  "diff-remove": item.pair.left.type === "remove",
1248
936
  "diff-empty": item.pair.left.type === "empty",
1249
937
  "diff-context": item.pair.left.type === "context"
1250
- }, "diff-line"])}" data-v-2678ccde><div class="diff-gutter" data-v-2678ccde>`);
938
+ }, "diff-line"])}" data-v-13d918cc><div class="diff-gutter" data-v-13d918cc>`);
1251
939
  if (item.pair.left.lineNum) {
1252
- _push(`<span class="line-number" data-v-2678ccde>${ssrInterpolate(item.pair.left.lineNum)}</span>`);
940
+ _push(`<span class="line-number" data-v-13d918cc>${ssrInterpolate(item.pair.left.lineNum)}</span>`);
1253
941
  } else {
1254
942
  _push(`<!---->`);
1255
943
  }
1256
- _push(`</div><div class="diff-content" data-v-2678ccde>`);
944
+ _push(`</div><div class="diff-content" data-v-13d918cc>`);
1257
945
  if (item.pair.left.type !== "empty") {
1258
- _push(`<span class="diff-code" data-v-2678ccde>${(getHighlightedContent(item.pair.id, "old") || escapeHtml(item.pair.left.content)) ?? ""}</span>`);
946
+ _push(`<span class="diff-code" data-v-13d918cc>${(getHighlightedContent(item.pair.id, "old") || escapeHtml(item.pair.left.content)) ?? ""}</span>`);
1259
947
  } else {
1260
948
  _push(`<!---->`);
1261
949
  }
@@ -1265,25 +953,25 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1265
953
  }
1266
954
  _push(`<!--]-->`);
1267
955
  });
1268
- _push(`<!--]--></div></div><div class="diff-column diff-column-right" data-v-2678ccde><div class="diff-column-content" data-v-2678ccde><!--[-->`);
956
+ _push(`<!--]--></div></div><div class="diff-column diff-column-right" data-v-13d918cc><div class="diff-column-content" data-v-13d918cc><!--[-->`);
1269
957
  ssrRenderList(unref(displayItems), (item) => {
1270
958
  _push(`<!--[-->`);
1271
959
  if (item.type === "separator") {
1272
- _push(`<div class="diff-separator-half" data-v-2678ccde><span class="separator-text" data-v-2678ccde>···</span><div class="separator-line" data-v-2678ccde></div></div>`);
960
+ _push(`<div class="diff-separator-half" data-v-13d918cc><span class="separator-text" data-v-13d918cc>···</span><div class="separator-line" data-v-13d918cc></div></div>`);
1273
961
  } else if (item.pair) {
1274
962
  _push(`<div class="${ssrRenderClass([{
1275
963
  "diff-add": item.pair.right.type === "add",
1276
964
  "diff-empty": item.pair.right.type === "empty",
1277
965
  "diff-context": item.pair.right.type === "context"
1278
- }, "diff-line"])}" data-v-2678ccde><div class="diff-gutter" data-v-2678ccde>`);
966
+ }, "diff-line"])}" data-v-13d918cc><div class="diff-gutter" data-v-13d918cc>`);
1279
967
  if (item.pair.right.lineNum) {
1280
- _push(`<span class="line-number" data-v-2678ccde>${ssrInterpolate(item.pair.right.lineNum)}</span>`);
968
+ _push(`<span class="line-number" data-v-13d918cc>${ssrInterpolate(item.pair.right.lineNum)}</span>`);
1281
969
  } else {
1282
970
  _push(`<!---->`);
1283
971
  }
1284
- _push(`</div><div class="diff-content" data-v-2678ccde>`);
972
+ _push(`</div><div class="diff-content" data-v-13d918cc>`);
1285
973
  if (item.pair.right.type !== "empty") {
1286
- _push(`<span class="diff-code" data-v-2678ccde>${(getHighlightedContent(item.pair.id, "new") || escapeHtml(item.pair.right.content)) ?? ""}</span>`);
974
+ _push(`<span class="diff-code" data-v-13d918cc>${(getHighlightedContent(item.pair.id, "new") || escapeHtml(item.pair.right.content)) ?? ""}</span>`);
1287
975
  } else {
1288
976
  _push(`<!---->`);
1289
977
  }
@@ -1299,14 +987,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1299
987
  };
1300
988
  }
1301
989
  });
1302
- const _sfc_setup$o = _sfc_main$o.setup;
1303
- _sfc_main$o.setup = (props, ctx) => {
990
+ const _sfc_setup$j = _sfc_main$j.setup;
991
+ _sfc_main$j.setup = (props, ctx) => {
1304
992
  const ssrContext = useSSRContext();
1305
993
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/git/DiffViewer.vue");
1306
- return _sfc_setup$o ? _sfc_setup$o(props, ctx) : void 0;
994
+ return _sfc_setup$j ? _sfc_setup$j(props, ctx) : void 0;
1307
995
  };
1308
- const __nuxt_component_1$1 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main$o, [["__scopeId", "data-v-2678ccde"]]), { __name: "GitDiffViewer" });
1309
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
996
+ const __nuxt_component_1$2 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main$j, [["__scopeId", "data-v-13d918cc"]]), { __name: "GitDiffViewer" });
997
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1310
998
  __name: "ScrollBar",
1311
999
  __ssrInlineRender: true,
1312
1000
  props: {
@@ -1348,14 +1036,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1348
1036
  };
1349
1037
  }
1350
1038
  });
1351
- const _sfc_setup$n = _sfc_main$n.setup;
1352
- _sfc_main$n.setup = (props, ctx) => {
1039
+ const _sfc_setup$i = _sfc_main$i.setup;
1040
+ _sfc_main$i.setup = (props, ctx) => {
1353
1041
  const ssrContext = useSSRContext();
1354
1042
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/scroll-area/ScrollBar.vue");
1355
- return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0;
1043
+ return _sfc_setup$i ? _sfc_setup$i(props, ctx) : void 0;
1356
1044
  };
1357
- const ScrollBar = Object.assign(_sfc_main$n, { __name: "UiScrollAreaScrollBar" });
1358
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
1045
+ const ScrollBar = Object.assign(_sfc_main$i, { __name: "UiScrollAreaScrollBar" });
1046
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1359
1047
  __name: "ScrollArea",
1360
1048
  __ssrInlineRender: true,
1361
1049
  props: {
@@ -1413,14 +1101,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1413
1101
  };
1414
1102
  }
1415
1103
  });
1416
- const _sfc_setup$m = _sfc_main$m.setup;
1417
- _sfc_main$m.setup = (props, ctx) => {
1104
+ const _sfc_setup$h = _sfc_main$h.setup;
1105
+ _sfc_main$h.setup = (props, ctx) => {
1418
1106
  const ssrContext = useSSRContext();
1419
1107
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/scroll-area/ScrollArea.vue");
1420
- return _sfc_setup$m ? _sfc_setup$m(props, ctx) : void 0;
1108
+ return _sfc_setup$h ? _sfc_setup$h(props, ctx) : void 0;
1421
1109
  };
1422
- const ScrollArea = Object.assign(_sfc_main$m, { __name: "UiScrollArea" });
1423
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
1110
+ const ScrollArea = Object.assign(_sfc_main$h, { __name: "UiScrollArea" });
1111
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1424
1112
  __name: "Tooltip",
1425
1113
  __ssrInlineRender: true,
1426
1114
  props: {
@@ -1453,14 +1141,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1453
1141
  };
1454
1142
  }
1455
1143
  });
1456
- const _sfc_setup$l = _sfc_main$l.setup;
1457
- _sfc_main$l.setup = (props, ctx) => {
1144
+ const _sfc_setup$g = _sfc_main$g.setup;
1145
+ _sfc_main$g.setup = (props, ctx) => {
1458
1146
  const ssrContext = useSSRContext();
1459
1147
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tooltip/Tooltip.vue");
1460
- return _sfc_setup$l ? _sfc_setup$l(props, ctx) : void 0;
1148
+ return _sfc_setup$g ? _sfc_setup$g(props, ctx) : void 0;
1461
1149
  };
1462
- const Tooltip = Object.assign(_sfc_main$l, { __name: "UiTooltip" });
1463
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
1150
+ const Tooltip = Object.assign(_sfc_main$g, { __name: "UiTooltip" });
1151
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1464
1152
  ...{
1465
1153
  inheritAttrs: false
1466
1154
  },
@@ -1530,14 +1218,14 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1530
1218
  };
1531
1219
  }
1532
1220
  });
1533
- const _sfc_setup$k = _sfc_main$k.setup;
1534
- _sfc_main$k.setup = (props, ctx) => {
1221
+ const _sfc_setup$f = _sfc_main$f.setup;
1222
+ _sfc_main$f.setup = (props, ctx) => {
1535
1223
  const ssrContext = useSSRContext();
1536
1224
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tooltip/TooltipContent.vue");
1537
- return _sfc_setup$k ? _sfc_setup$k(props, ctx) : void 0;
1225
+ return _sfc_setup$f ? _sfc_setup$f(props, ctx) : void 0;
1538
1226
  };
1539
- const TooltipContent = Object.assign(_sfc_main$k, { __name: "UiTooltipContent" });
1540
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1227
+ const TooltipContent = Object.assign(_sfc_main$f, { __name: "UiTooltipContent" });
1228
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1541
1229
  __name: "TooltipProvider",
1542
1230
  __ssrInlineRender: true,
1543
1231
  props: {
@@ -1566,14 +1254,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1566
1254
  };
1567
1255
  }
1568
1256
  });
1569
- const _sfc_setup$j = _sfc_main$j.setup;
1570
- _sfc_main$j.setup = (props, ctx) => {
1257
+ const _sfc_setup$e = _sfc_main$e.setup;
1258
+ _sfc_main$e.setup = (props, ctx) => {
1571
1259
  const ssrContext = useSSRContext();
1572
1260
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tooltip/TooltipProvider.vue");
1573
- return _sfc_setup$j ? _sfc_setup$j(props, ctx) : void 0;
1261
+ return _sfc_setup$e ? _sfc_setup$e(props, ctx) : void 0;
1574
1262
  };
1575
- const TooltipProvider = Object.assign(_sfc_main$j, { __name: "UiTooltipProvider" });
1576
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1263
+ const TooltipProvider = Object.assign(_sfc_main$e, { __name: "UiTooltipProvider" });
1264
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1577
1265
  __name: "TooltipTrigger",
1578
1266
  __ssrInlineRender: true,
1579
1267
  props: {
@@ -1599,13 +1287,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1599
1287
  };
1600
1288
  }
1601
1289
  });
1602
- const _sfc_setup$i = _sfc_main$i.setup;
1603
- _sfc_main$i.setup = (props, ctx) => {
1290
+ const _sfc_setup$d = _sfc_main$d.setup;
1291
+ _sfc_main$d.setup = (props, ctx) => {
1604
1292
  const ssrContext = useSSRContext();
1605
1293
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tooltip/TooltipTrigger.vue");
1606
- return _sfc_setup$i ? _sfc_setup$i(props, ctx) : void 0;
1294
+ return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0;
1607
1295
  };
1608
- const TooltipTrigger = Object.assign(_sfc_main$i, { __name: "UiTooltipTrigger" });
1296
+ const TooltipTrigger = Object.assign(_sfc_main$d, { __name: "UiTooltipTrigger" });
1609
1297
  function useGit() {
1610
1298
  const { showError } = useToast();
1611
1299
  function getErrorMessage(error) {
@@ -1724,7 +1412,7 @@ function useGit() {
1724
1412
  isLoadingFileContent: readonly(isLoadingFileContent)
1725
1413
  };
1726
1414
  }
1727
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1415
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1728
1416
  __name: "DiffPanel",
1729
1417
  __ssrInlineRender: true,
1730
1418
  props: {
@@ -1804,7 +1492,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1804
1492
  const diffViewerRef = ref(null);
1805
1493
  return (_ctx, _push, _parent, _attrs) => {
1806
1494
  const _component_GitChangesMinimap = __nuxt_component_0$1;
1807
- const _component_GitDiffViewer = __nuxt_component_1$1;
1495
+ const _component_GitDiffViewer = __nuxt_component_1$2;
1808
1496
  _push(`<div${ssrRenderAttrs(mergeProps({
1809
1497
  ref_key: "panelRef",
1810
1498
  ref: panelRef,
@@ -2197,14 +1885,14 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2197
1885
  };
2198
1886
  }
2199
1887
  });
2200
- const _sfc_setup$h = _sfc_main$h.setup;
2201
- _sfc_main$h.setup = (props, ctx) => {
1888
+ const _sfc_setup$c = _sfc_main$c.setup;
1889
+ _sfc_main$c.setup = (props, ctx) => {
2202
1890
  const ssrContext = useSSRContext();
2203
1891
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/git/DiffPanel.vue");
2204
- return _sfc_setup$h ? _sfc_setup$h(props, ctx) : void 0;
1892
+ return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0;
2205
1893
  };
2206
- const __nuxt_component_0 = Object.assign(_sfc_main$h, { __name: "GitDiffPanel" });
2207
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
1894
+ const __nuxt_component_0 = Object.assign(_sfc_main$c, { __name: "GitDiffPanel" });
1895
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2208
1896
  __name: "CommitList",
2209
1897
  __ssrInlineRender: true,
2210
1898
  props: {
@@ -2372,14 +2060,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2372
2060
  };
2373
2061
  }
2374
2062
  });
2375
- const _sfc_setup$g = _sfc_main$g.setup;
2376
- _sfc_main$g.setup = (props, ctx) => {
2063
+ const _sfc_setup$b = _sfc_main$b.setup;
2064
+ _sfc_main$b.setup = (props, ctx) => {
2377
2065
  const ssrContext = useSSRContext();
2378
2066
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/git/CommitList.vue");
2379
- return _sfc_setup$g ? _sfc_setup$g(props, ctx) : void 0;
2067
+ return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
2380
2068
  };
2381
- const __nuxt_component_1 = Object.assign(_sfc_main$g, { __name: "GitCommitList" });
2382
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2069
+ const __nuxt_component_1$1 = Object.assign(_sfc_main$b, { __name: "GitCommitList" });
2070
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2383
2071
  __name: "Sheet",
2384
2072
  __ssrInlineRender: true,
2385
2073
  props: {
@@ -2408,14 +2096,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2408
2096
  };
2409
2097
  }
2410
2098
  });
2411
- const _sfc_setup$f = _sfc_main$f.setup;
2412
- _sfc_main$f.setup = (props, ctx) => {
2099
+ const _sfc_setup$a = _sfc_main$a.setup;
2100
+ _sfc_main$a.setup = (props, ctx) => {
2413
2101
  const ssrContext = useSSRContext();
2414
2102
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/Sheet.vue");
2415
- return _sfc_setup$f ? _sfc_setup$f(props, ctx) : void 0;
2103
+ return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
2416
2104
  };
2417
- const Sheet = Object.assign(_sfc_main$f, { __name: "UiSheet" });
2418
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2105
+ const Sheet = Object.assign(_sfc_main$a, { __name: "UiSheet" });
2106
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2419
2107
  __name: "SheetClose",
2420
2108
  __ssrInlineRender: true,
2421
2109
  props: {
@@ -2440,14 +2128,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2440
2128
  };
2441
2129
  }
2442
2130
  });
2443
- const _sfc_setup$e = _sfc_main$e.setup;
2444
- _sfc_main$e.setup = (props, ctx) => {
2131
+ const _sfc_setup$9 = _sfc_main$9.setup;
2132
+ _sfc_main$9.setup = (props, ctx) => {
2445
2133
  const ssrContext = useSSRContext();
2446
2134
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetClose.vue");
2447
- return _sfc_setup$e ? _sfc_setup$e(props, ctx) : void 0;
2135
+ return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
2448
2136
  };
2449
- const SheetClose = Object.assign(_sfc_main$e, { __name: "UiSheetClose" });
2450
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
2137
+ const SheetClose = Object.assign(_sfc_main$9, { __name: "UiSheetClose" });
2138
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2451
2139
  __name: "SheetOverlay",
2452
2140
  __ssrInlineRender: true,
2453
2141
  props: {
@@ -2478,14 +2166,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2478
2166
  };
2479
2167
  }
2480
2168
  });
2481
- const _sfc_setup$d = _sfc_main$d.setup;
2482
- _sfc_main$d.setup = (props, ctx) => {
2169
+ const _sfc_setup$8 = _sfc_main$8.setup;
2170
+ _sfc_main$8.setup = (props, ctx) => {
2483
2171
  const ssrContext = useSSRContext();
2484
2172
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetOverlay.vue");
2485
- return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0;
2173
+ return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
2486
2174
  };
2487
- const SheetOverlay = Object.assign(_sfc_main$d, { __name: "UiSheetOverlay" });
2488
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2175
+ const SheetOverlay = Object.assign(_sfc_main$8, { __name: "UiSheetOverlay" });
2176
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2489
2177
  ...{
2490
2178
  inheritAttrs: false
2491
2179
  },
@@ -2587,14 +2275,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2587
2275
  };
2588
2276
  }
2589
2277
  });
2590
- const _sfc_setup$c = _sfc_main$c.setup;
2591
- _sfc_main$c.setup = (props, ctx) => {
2278
+ const _sfc_setup$7 = _sfc_main$7.setup;
2279
+ _sfc_main$7.setup = (props, ctx) => {
2592
2280
  const ssrContext = useSSRContext();
2593
2281
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetContent.vue");
2594
- return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0;
2282
+ return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
2595
2283
  };
2596
- const SheetContent = Object.assign(_sfc_main$c, { __name: "UiSheetContent" });
2597
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
2284
+ const SheetContent = Object.assign(_sfc_main$7, { __name: "UiSheetContent" });
2285
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2598
2286
  __name: "SheetDescription",
2599
2287
  __ssrInlineRender: true,
2600
2288
  props: {
@@ -2624,14 +2312,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2624
2312
  };
2625
2313
  }
2626
2314
  });
2627
- const _sfc_setup$b = _sfc_main$b.setup;
2628
- _sfc_main$b.setup = (props, ctx) => {
2315
+ const _sfc_setup$6 = _sfc_main$6.setup;
2316
+ _sfc_main$6.setup = (props, ctx) => {
2629
2317
  const ssrContext = useSSRContext();
2630
2318
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetDescription.vue");
2631
- return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
2319
+ return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
2632
2320
  };
2633
- const SheetDescription = Object.assign(_sfc_main$b, { __name: "UiSheetDescription" });
2634
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
2321
+ const SheetDescription = Object.assign(_sfc_main$6, { __name: "UiSheetDescription" });
2322
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2635
2323
  __name: "SheetFooter",
2636
2324
  __ssrInlineRender: true,
2637
2325
  props: {
@@ -2649,14 +2337,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2649
2337
  };
2650
2338
  }
2651
2339
  });
2652
- const _sfc_setup$a = _sfc_main$a.setup;
2653
- _sfc_main$a.setup = (props, ctx) => {
2340
+ const _sfc_setup$5 = _sfc_main$5.setup;
2341
+ _sfc_main$5.setup = (props, ctx) => {
2654
2342
  const ssrContext = useSSRContext();
2655
2343
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetFooter.vue");
2656
- return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
2344
+ return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
2657
2345
  };
2658
- const SheetFooter = Object.assign(_sfc_main$a, { __name: "UiSheetFooter" });
2659
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2346
+ const SheetFooter = Object.assign(_sfc_main$5, { __name: "UiSheetFooter" });
2347
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2660
2348
  __name: "SheetHeader",
2661
2349
  __ssrInlineRender: true,
2662
2350
  props: {
@@ -2674,14 +2362,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2674
2362
  };
2675
2363
  }
2676
2364
  });
2677
- const _sfc_setup$9 = _sfc_main$9.setup;
2678
- _sfc_main$9.setup = (props, ctx) => {
2365
+ const _sfc_setup$4 = _sfc_main$4.setup;
2366
+ _sfc_main$4.setup = (props, ctx) => {
2679
2367
  const ssrContext = useSSRContext();
2680
2368
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetHeader.vue");
2681
- return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
2369
+ return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
2682
2370
  };
2683
- const SheetHeader = Object.assign(_sfc_main$9, { __name: "UiSheetHeader" });
2684
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2371
+ const SheetHeader = Object.assign(_sfc_main$4, { __name: "UiSheetHeader" });
2372
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2685
2373
  __name: "SheetTitle",
2686
2374
  __ssrInlineRender: true,
2687
2375
  props: {
@@ -2711,14 +2399,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2711
2399
  };
2712
2400
  }
2713
2401
  });
2714
- const _sfc_setup$8 = _sfc_main$8.setup;
2715
- _sfc_main$8.setup = (props, ctx) => {
2402
+ const _sfc_setup$3 = _sfc_main$3.setup;
2403
+ _sfc_main$3.setup = (props, ctx) => {
2716
2404
  const ssrContext = useSSRContext();
2717
2405
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetTitle.vue");
2718
- return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
2406
+ return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
2719
2407
  };
2720
- const SheetTitle = Object.assign(_sfc_main$8, { __name: "UiSheetTitle" });
2721
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2408
+ const SheetTitle = Object.assign(_sfc_main$3, { __name: "UiSheetTitle" });
2409
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2722
2410
  __name: "SheetTrigger",
2723
2411
  __ssrInlineRender: true,
2724
2412
  props: {
@@ -2743,14 +2431,14 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2743
2431
  };
2744
2432
  }
2745
2433
  });
2746
- const _sfc_setup$7 = _sfc_main$7.setup;
2747
- _sfc_main$7.setup = (props, ctx) => {
2434
+ const _sfc_setup$2 = _sfc_main$2.setup;
2435
+ _sfc_main$2.setup = (props, ctx) => {
2748
2436
  const ssrContext = useSSRContext();
2749
2437
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/sheet/SheetTrigger.vue");
2750
- return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
2438
+ return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
2751
2439
  };
2752
- Object.assign(_sfc_main$7, { __name: "UiSheetTrigger" });
2753
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2440
+ Object.assign(_sfc_main$2, { __name: "UiSheetTrigger" });
2441
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2754
2442
  __name: "Separator",
2755
2443
  __ssrInlineRender: true,
2756
2444
  props: {
@@ -2773,21 +2461,23 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2773
2461
  };
2774
2462
  }
2775
2463
  });
2776
- const _sfc_setup$6 = _sfc_main$6.setup;
2777
- _sfc_main$6.setup = (props, ctx) => {
2464
+ const _sfc_setup$1 = _sfc_main$1.setup;
2465
+ _sfc_main$1.setup = (props, ctx) => {
2778
2466
  const ssrContext = useSSRContext();
2779
2467
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/separator/Separator.vue");
2780
- return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
2468
+ return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
2781
2469
  };
2782
- const Separator = Object.assign(_sfc_main$6, { __name: "UiSeparator" });
2783
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2470
+ const Separator = Object.assign(_sfc_main$1, { __name: "UiSeparator" });
2471
+ const _sfc_main = /* @__PURE__ */ defineComponent({
2784
2472
  __name: "Detail",
2785
2473
  __ssrInlineRender: true,
2786
2474
  props: /* @__PURE__ */ mergeModels({
2787
2475
  task: {},
2788
2476
  taskTitles: {},
2789
2477
  commits: {},
2790
- repoId: {}
2478
+ repoId: {},
2479
+ taskPrdSlug: {},
2480
+ currentPrdSlug: {}
2791
2481
  }, {
2792
2482
  "open": { type: Boolean, ...{ default: false } },
2793
2483
  "openModifiers": {}
@@ -2853,6 +2543,25 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2853
2543
  return props.taskTitles?.get(taskId) ?? taskId;
2854
2544
  }
2855
2545
  const hasCommits = computed(() => props.commits && props.commits.length > 0 && props.repoId);
2546
+ const showOpenPrdLink = computed(() => {
2547
+ if (!props.repoId || !props.taskPrdSlug) {
2548
+ return false;
2549
+ }
2550
+ if (!props.currentPrdSlug) {
2551
+ return true;
2552
+ }
2553
+ return props.taskPrdSlug !== props.currentPrdSlug;
2554
+ });
2555
+ const openPrdHref = computed(() => {
2556
+ if (!showOpenPrdLink.value || !props.repoId || !props.taskPrdSlug || !props.task) {
2557
+ return "";
2558
+ }
2559
+ const params = new URLSearchParams({
2560
+ task: props.task.id,
2561
+ taskPrd: props.taskPrdSlug
2562
+ });
2563
+ return `/${props.repoId}/${props.taskPrdSlug}?${params.toString()}`;
2564
+ });
2856
2565
  const viewMode = ref("details");
2857
2566
  const selectedCommitSha = ref(null);
2858
2567
  const selectedCommitRepo = ref(null);
@@ -2880,7 +2589,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2880
2589
  });
2881
2590
  return (_ctx, _push, _parent, _attrs) => {
2882
2591
  const _component_GitDiffPanel = __nuxt_component_0;
2883
- const _component_GitCommitList = __nuxt_component_1;
2592
+ const _component_GitCommitList = __nuxt_component_1$1;
2593
+ const _component_NuxtLink = __nuxt_component_0$3;
2884
2594
  _push(ssrRenderComponent(unref(Sheet), mergeProps({
2885
2595
  open: open.value,
2886
2596
  "onUpdate:open": ($event) => open.value = $event
@@ -2888,7 +2598,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2888
2598
  default: withCtx((_, _push2, _parent2, _scopeId) => {
2889
2599
  if (_push2) {
2890
2600
  _push2(ssrRenderComponent(unref(SheetContent), {
2891
- class: ["flex h-full w-full flex-col overflow-hidden sm:max-w-lg", { "sm:!max-w-none !max-w-none": unref(viewMode) === "diff" }]
2601
+ class: ["flex h-full w-full flex-col overflow-hidden sm:max-w-lg", unref(viewMode) === "diff" ? "sm:!max-w-[94vw] xl:!max-w-[88vw]" : ""]
2892
2602
  }, {
2893
2603
  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
2894
2604
  if (_push3) {
@@ -3129,6 +2839,53 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3129
2839
  } else {
3130
2840
  _push3(`<!---->`);
3131
2841
  }
2842
+ if (unref(showOpenPrdLink)) {
2843
+ _push3(`<div class="space-y-2"${_scopeId2}>`);
2844
+ _push3(ssrRenderComponent(unref(Separator), null, null, _parent3, _scopeId2));
2845
+ _push3(`<div class="flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-sm"${_scopeId2}><span class="text-muted-foreground"${_scopeId2}>This task belongs to ${ssrInterpolate(__props.taskPrdSlug)}.</span>`);
2846
+ _push3(ssrRenderComponent(_component_NuxtLink, { to: unref(openPrdHref) }, {
2847
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
2848
+ if (_push4) {
2849
+ _push4(ssrRenderComponent(unref(Button), {
2850
+ variant: "outline",
2851
+ size: "sm",
2852
+ class: "h-8"
2853
+ }, {
2854
+ default: withCtx((_4, _push5, _parent5, _scopeId4) => {
2855
+ if (_push5) {
2856
+ _push5(ssrRenderComponent(unref(ExternalLink), { class: "mr-1.5 size-3.5" }, null, _parent5, _scopeId4));
2857
+ _push5(` Open PRD `);
2858
+ } else {
2859
+ return [
2860
+ createVNode(unref(ExternalLink), { class: "mr-1.5 size-3.5" }),
2861
+ createTextVNode(" Open PRD ")
2862
+ ];
2863
+ }
2864
+ }),
2865
+ _: 1
2866
+ }, _parent4, _scopeId3));
2867
+ } else {
2868
+ return [
2869
+ createVNode(unref(Button), {
2870
+ variant: "outline",
2871
+ size: "sm",
2872
+ class: "h-8"
2873
+ }, {
2874
+ default: withCtx(() => [
2875
+ createVNode(unref(ExternalLink), { class: "mr-1.5 size-3.5" }),
2876
+ createTextVNode(" Open PRD ")
2877
+ ]),
2878
+ _: 1
2879
+ })
2880
+ ];
2881
+ }
2882
+ }),
2883
+ _: 1
2884
+ }, _parent3, _scopeId2));
2885
+ _push3(`</div></div>`);
2886
+ } else {
2887
+ _push3(`<!---->`);
2888
+ }
3132
2889
  _push3(`</div>`);
3133
2890
  } else {
3134
2891
  _push3(`<!---->`);
@@ -3379,6 +3136,31 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3379
3136
  createVNode("span", null, "Completed: " + toDisplayString(formatDate(__props.task.completedAt)), 1)
3380
3137
  ])) : createCommentVNode("", true)
3381
3138
  ])
3139
+ ])) : createCommentVNode("", true),
3140
+ unref(showOpenPrdLink) ? (openBlock(), createBlock("div", {
3141
+ key: 7,
3142
+ class: "space-y-2"
3143
+ }, [
3144
+ createVNode(unref(Separator)),
3145
+ createVNode("div", { class: "flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-sm" }, [
3146
+ createVNode("span", { class: "text-muted-foreground" }, "This task belongs to " + toDisplayString(__props.taskPrdSlug) + ".", 1),
3147
+ createVNode(_component_NuxtLink, { to: unref(openPrdHref) }, {
3148
+ default: withCtx(() => [
3149
+ createVNode(unref(Button), {
3150
+ variant: "outline",
3151
+ size: "sm",
3152
+ class: "h-8"
3153
+ }, {
3154
+ default: withCtx(() => [
3155
+ createVNode(unref(ExternalLink), { class: "mr-1.5 size-3.5" }),
3156
+ createTextVNode(" Open PRD ")
3157
+ ]),
3158
+ _: 1
3159
+ })
3160
+ ]),
3161
+ _: 1
3162
+ }, 8, ["to"])
3163
+ ])
3382
3164
  ])) : createCommentVNode("", true)
3383
3165
  ])) : createCommentVNode("", true),
3384
3166
  createVNode(unref(SheetFooter), { class: "px-6 pb-6" }, {
@@ -3408,7 +3190,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3408
3190
  } else {
3409
3191
  return [
3410
3192
  createVNode(unref(SheetContent), {
3411
- class: ["flex h-full w-full flex-col overflow-hidden sm:max-w-lg", { "sm:!max-w-none !max-w-none": unref(viewMode) === "diff" }]
3193
+ class: ["flex h-full w-full flex-col overflow-hidden sm:max-w-lg", unref(viewMode) === "diff" ? "sm:!max-w-[94vw] xl:!max-w-[88vw]" : ""]
3412
3194
  }, {
3413
3195
  default: withCtx(() => [
3414
3196
  __props.task ? (openBlock(), createBlock(unref(SheetHeader), {
@@ -3444,782 +3226,223 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3444
3226
  })
3445
3227
  ]),
3446
3228
  _: 1
3447
- })) : createCommentVNode("", true),
3448
- __props.task && unref(viewMode) === "diff" && unref(selectedCommitSha) && __props.repoId ? (openBlock(), createBlock("div", {
3449
- key: 1,
3450
- class: "min-h-0 flex-1 overflow-hidden"
3451
- }, [
3452
- createVNode(_component_GitDiffPanel, {
3453
- "repo-id": __props.repoId,
3454
- "commit-sha": unref(selectedCommitSha),
3455
- "repo-path": unref(selectedCommitRepo) || void 0,
3456
- class: "h-full",
3457
- onClose: handleBackToDetails
3458
- }, null, 8, ["repo-id", "commit-sha", "repo-path"])
3459
- ])) : __props.task ? (openBlock(), createBlock("div", {
3460
- key: 2,
3461
- class: "min-h-0 flex-1 space-y-4 overflow-y-auto px-6"
3462
- }, [
3463
- createVNode("div", { class: "flex flex-wrap items-center gap-2" }, [
3464
- createVNode(unref(Badge), {
3465
- variant: unref(categoryConfig).variant
3466
- }, {
3467
- default: withCtx(() => [
3468
- createVNode(unref(Tag), { class: "mr-1 size-3" }),
3469
- createTextVNode(" " + toDisplayString(unref(categoryConfig).label), 1)
3470
- ]),
3471
- _: 1
3472
- }, 8, ["variant"]),
3473
- createVNode(unref(Badge), {
3474
- variant: "outline",
3475
- class: unref(priorityConfig).class
3476
- }, {
3477
- default: withCtx(() => [
3478
- createVNode(unref(AlertTriangle), { class: "mr-1 size-3" }),
3479
- createTextVNode(" " + toDisplayString(unref(priorityConfig).label), 1)
3480
- ]),
3481
- _: 1
3482
- }, 8, ["class"]),
3483
- createVNode(unref(Badge), {
3484
- variant: "outline",
3485
- class: unref(statusConfig).class
3486
- }, {
3487
- default: withCtx(() => [
3488
- (openBlock(), createBlock(resolveDynamicComponent(unref(statusConfig).icon), { class: "mr-1 size-3" })),
3489
- createTextVNode(" " + toDisplayString(unref(statusConfig).label), 1)
3490
- ]),
3491
- _: 1
3492
- }, 8, ["class"])
3493
- ]),
3494
- createVNode("div", { class: "space-y-2" }, [
3495
- createVNode("h4", { class: "text-sm font-medium" }, "Description"),
3496
- createVNode("p", { class: "text-sm text-muted-foreground leading-relaxed" }, toDisplayString(__props.task.description), 1)
3497
- ]),
3498
- createVNode(unref(Separator)),
3499
- __props.task.steps.length > 0 ? (openBlock(), createBlock("div", {
3500
- key: 0,
3501
- class: "space-y-2"
3502
- }, [
3503
- createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3504
- createVNode(unref(ListOrdered), { class: "size-4" }),
3505
- createTextVNode(" Steps ")
3506
- ]),
3507
- createVNode("ol", { class: "ml-4 list-decimal space-y-1 text-sm text-muted-foreground" }, [
3508
- (openBlock(true), createBlock(Fragment, null, renderList(__props.task.steps, (step, index) => {
3509
- return openBlock(), createBlock("li", {
3510
- key: index,
3511
- class: "pl-1"
3512
- }, toDisplayString(step), 1);
3513
- }), 128))
3514
- ])
3515
- ])) : createCommentVNode("", true),
3516
- __props.task.steps.length > 0 && __props.task.passes.length > 0 ? (openBlock(), createBlock(unref(Separator), { key: 1 })) : createCommentVNode("", true),
3517
- __props.task.passes.length > 0 ? (openBlock(), createBlock("div", {
3518
- key: 2,
3519
- class: "space-y-2"
3520
- }, [
3521
- createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3522
- createVNode(unref(CheckSquare), { class: "size-4" }),
3523
- createTextVNode(" Pass Criteria ")
3524
- ]),
3525
- createVNode("ul", { class: "space-y-1.5 text-sm text-muted-foreground" }, [
3526
- (openBlock(true), createBlock(Fragment, null, renderList(__props.task.passes, (pass, index) => {
3527
- return openBlock(), createBlock("li", {
3528
- key: index,
3529
- class: "flex items-start gap-2"
3530
- }, [
3531
- createVNode("div", {
3532
- class: ["mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border", __props.task.status === "completed" ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/50"]
3533
- }, [
3534
- __props.task.status === "completed" ? (openBlock(), createBlock(unref(Check), {
3535
- key: 0,
3536
- class: "size-3"
3537
- })) : createCommentVNode("", true)
3538
- ], 2),
3539
- createVNode("span", null, toDisplayString(pass), 1)
3540
- ]);
3541
- }), 128))
3542
- ])
3543
- ])) : createCommentVNode("", true),
3544
- __props.task.dependencies.length > 0 ? (openBlock(), createBlock(unref(Separator), { key: 3 })) : createCommentVNode("", true),
3545
- __props.task.dependencies.length > 0 ? (openBlock(), createBlock("div", {
3546
- key: 4,
3547
- class: "space-y-2"
3548
- }, [
3549
- createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3550
- createVNode(unref(Link2), { class: "size-4" }),
3551
- createTextVNode(" Dependencies ")
3552
- ]),
3553
- createVNode("ul", { class: "space-y-1 text-sm text-muted-foreground" }, [
3554
- (openBlock(true), createBlock(Fragment, null, renderList(__props.task.dependencies, (depId) => {
3555
- return openBlock(), createBlock("li", {
3556
- key: depId,
3557
- class: "flex items-center gap-2"
3558
- }, [
3559
- createVNode("span", { class: "font-mono text-xs" }, toDisplayString(depId), 1),
3560
- createVNode("span", null, toDisplayString(getTaskTitle(depId)), 1)
3561
- ]);
3562
- }), 128))
3563
- ])
3564
- ])) : createCommentVNode("", true),
3565
- unref(hasCommits) ? (openBlock(), createBlock(Fragment, { key: 5 }, [
3566
- createVNode(unref(Separator)),
3567
- createVNode("div", { class: "space-y-2" }, [
3568
- createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3569
- createVNode(unref(Diff), { class: "size-4" }),
3570
- createTextVNode(" Changes ")
3571
- ]),
3572
- createVNode(_component_GitCommitList, {
3573
- commits: __props.commits,
3574
- "repo-id": __props.repoId,
3575
- onSelect: handleCommitSelect
3576
- }, null, 8, ["commits", "repo-id"])
3577
- ])
3578
- ], 64)) : createCommentVNode("", true),
3579
- __props.task.startedAt || __props.task.completedAt ? (openBlock(), createBlock("div", {
3580
- key: 6,
3581
- class: "space-y-2"
3582
- }, [
3583
- createVNode(unref(Separator)),
3584
- createVNode("div", { class: "flex flex-col gap-1 text-xs text-muted-foreground" }, [
3585
- __props.task.startedAt ? (openBlock(), createBlock("div", {
3586
- key: 0,
3587
- class: "flex items-center gap-2"
3588
- }, [
3589
- createVNode(unref(Calendar), { class: "size-3" }),
3590
- createVNode("span", null, "Started: " + toDisplayString(formatDate(__props.task.startedAt)), 1)
3591
- ])) : createCommentVNode("", true),
3592
- __props.task.completedAt ? (openBlock(), createBlock("div", {
3593
- key: 1,
3594
- class: "flex items-center gap-2"
3595
- }, [
3596
- createVNode(unref(CheckCircle2), { class: "size-3" }),
3597
- createVNode("span", null, "Completed: " + toDisplayString(formatDate(__props.task.completedAt)), 1)
3598
- ])) : createCommentVNode("", true)
3599
- ])
3600
- ])) : createCommentVNode("", true)
3601
- ])) : createCommentVNode("", true),
3602
- createVNode(unref(SheetFooter), { class: "px-6 pb-6" }, {
3603
- default: withCtx(() => [
3604
- createVNode(unref(SheetClose), { "as-child": "" }, {
3605
- default: withCtx(() => [
3606
- createVNode(unref(Button), {
3607
- variant: "outline",
3608
- class: "w-full"
3609
- }, {
3610
- default: withCtx(() => [
3611
- createTextVNode("Close")
3612
- ]),
3613
- _: 1
3614
- })
3615
- ]),
3616
- _: 1
3617
- })
3618
- ]),
3619
- _: 1
3620
- })
3621
- ]),
3622
- _: 1
3623
- }, 8, ["class"])
3624
- ];
3625
- }
3626
- }),
3627
- _: 1
3628
- }, _parent));
3629
- };
3630
- }
3631
- });
3632
- const _sfc_setup$5 = _sfc_main$5.setup;
3633
- _sfc_main$5.setup = (props, ctx) => {
3634
- const ssrContext = useSSRContext();
3635
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/Detail.vue");
3636
- return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
3637
- };
3638
- const __nuxt_component_4 = Object.assign(_sfc_main$5, { __name: "TasksDetail" });
3639
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3640
- __name: "Tabs",
3641
- __ssrInlineRender: true,
3642
- props: {
3643
- defaultValue: {},
3644
- orientation: {},
3645
- dir: {},
3646
- activationMode: {},
3647
- modelValue: {},
3648
- unmountOnHide: { type: Boolean },
3649
- asChild: { type: Boolean },
3650
- as: {},
3651
- class: {}
3652
- },
3653
- emits: ["update:modelValue"],
3654
- setup(__props, { emit: __emit }) {
3655
- const props = __props;
3656
- const emits = __emit;
3657
- const delegatedProps = reactiveOmit(props, "class");
3658
- const forwarded = useForwardPropsEmits(delegatedProps, emits);
3659
- return (_ctx, _push, _parent, _attrs) => {
3660
- _push(ssrRenderComponent(unref(TabsRoot), mergeProps({ "data-slot": "tabs" }, unref(forwarded), {
3661
- class: unref(cn)("flex flex-col gap-2", props.class)
3662
- }, _attrs), {
3663
- default: withCtx((slotProps, _push2, _parent2, _scopeId) => {
3664
- if (_push2) {
3665
- ssrRenderSlot(_ctx.$slots, "default", slotProps, null, _push2, _parent2, _scopeId);
3666
- } else {
3667
- return [
3668
- renderSlot(_ctx.$slots, "default", slotProps)
3669
- ];
3670
- }
3671
- }),
3672
- _: 3
3673
- }, _parent));
3674
- };
3675
- }
3676
- });
3677
- const _sfc_setup$4 = _sfc_main$4.setup;
3678
- _sfc_main$4.setup = (props, ctx) => {
3679
- const ssrContext = useSSRContext();
3680
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tabs/Tabs.vue");
3681
- return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
3682
- };
3683
- const Tabs = Object.assign(_sfc_main$4, { __name: "UiTabs" });
3684
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3685
- __name: "TabsContent",
3686
- __ssrInlineRender: true,
3687
- props: {
3688
- value: {},
3689
- forceMount: { type: Boolean },
3690
- asChild: { type: Boolean },
3691
- as: {},
3692
- class: {}
3693
- },
3694
- setup(__props) {
3695
- const props = __props;
3696
- const delegatedProps = reactiveOmit(props, "class");
3697
- return (_ctx, _push, _parent, _attrs) => {
3698
- _push(ssrRenderComponent(unref(TabsContent$1), mergeProps({
3699
- "data-slot": "tabs-content",
3700
- class: unref(cn)("flex-1 outline-none", props.class)
3701
- }, unref(delegatedProps), _attrs), {
3702
- default: withCtx((_, _push2, _parent2, _scopeId) => {
3703
- if (_push2) {
3704
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
3705
- } else {
3706
- return [
3707
- renderSlot(_ctx.$slots, "default")
3708
- ];
3709
- }
3710
- }),
3711
- _: 3
3712
- }, _parent));
3713
- };
3714
- }
3715
- });
3716
- const _sfc_setup$3 = _sfc_main$3.setup;
3717
- _sfc_main$3.setup = (props, ctx) => {
3718
- const ssrContext = useSSRContext();
3719
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tabs/TabsContent.vue");
3720
- return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
3721
- };
3722
- const TabsContent = Object.assign(_sfc_main$3, { __name: "UiTabsContent" });
3723
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3724
- __name: "TabsList",
3725
- __ssrInlineRender: true,
3726
- props: {
3727
- loop: { type: Boolean },
3728
- asChild: { type: Boolean },
3729
- as: {},
3730
- class: {}
3731
- },
3732
- setup(__props) {
3733
- const props = __props;
3734
- const delegatedProps = reactiveOmit(props, "class");
3735
- return (_ctx, _push, _parent, _attrs) => {
3736
- _push(ssrRenderComponent(unref(TabsList$1), mergeProps({ "data-slot": "tabs-list" }, unref(delegatedProps), {
3737
- class: unref(cn)(
3738
- "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
3739
- props.class
3740
- )
3741
- }, _attrs), {
3742
- default: withCtx((_, _push2, _parent2, _scopeId) => {
3743
- if (_push2) {
3744
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
3745
- } else {
3746
- return [
3747
- renderSlot(_ctx.$slots, "default")
3748
- ];
3749
- }
3750
- }),
3751
- _: 3
3752
- }, _parent));
3753
- };
3754
- }
3755
- });
3756
- const _sfc_setup$2 = _sfc_main$2.setup;
3757
- _sfc_main$2.setup = (props, ctx) => {
3758
- const ssrContext = useSSRContext();
3759
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tabs/TabsList.vue");
3760
- return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
3761
- };
3762
- const TabsList = Object.assign(_sfc_main$2, { __name: "UiTabsList" });
3763
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3764
- __name: "TabsTrigger",
3765
- __ssrInlineRender: true,
3766
- props: {
3767
- value: {},
3768
- disabled: { type: Boolean },
3769
- asChild: { type: Boolean },
3770
- as: {},
3771
- class: {}
3772
- },
3773
- setup(__props) {
3774
- const props = __props;
3775
- const delegatedProps = reactiveOmit(props, "class");
3776
- const forwardedProps = useForwardProps(delegatedProps);
3777
- return (_ctx, _push, _parent, _attrs) => {
3778
- _push(ssrRenderComponent(unref(TabsTrigger$1), mergeProps({
3779
- "data-slot": "tabs-trigger",
3780
- class: unref(cn)(
3781
- "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3782
- props.class
3783
- )
3784
- }, unref(forwardedProps), _attrs), {
3785
- default: withCtx((_, _push2, _parent2, _scopeId) => {
3786
- if (_push2) {
3787
- ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
3788
- } else {
3789
- return [
3790
- renderSlot(_ctx.$slots, "default")
3791
- ];
3792
- }
3793
- }),
3794
- _: 3
3795
- }, _parent));
3796
- };
3797
- }
3798
- });
3799
- const _sfc_setup$1 = _sfc_main$1.setup;
3800
- _sfc_main$1.setup = (props, ctx) => {
3801
- const ssrContext = useSSRContext();
3802
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/tabs/TabsTrigger.vue");
3803
- return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
3804
- };
3805
- const TabsTrigger = Object.assign(_sfc_main$1, { __name: "UiTabsTrigger" });
3806
- const _sfc_main = /* @__PURE__ */ defineComponent({
3807
- __name: "[prd]",
3808
- __ssrInlineRender: true,
3809
- setup(__props) {
3810
- const route = useRoute();
3811
- const { selectRepo } = useRepos();
3812
- const { fetchDocument, fetchTasks, fetchProgress, fetchTaskCommits } = usePrd();
3813
- const { showError } = useToast();
3814
- const repoId = computed(() => route.params.repo);
3815
- const prdSlug = computed(() => route.params.prd);
3816
- const document = ref(null);
3817
- const tasksFile = ref(null);
3818
- const progressFile = ref(null);
3819
- const isLoading = ref(true);
3820
- const error = ref(null);
3821
- const activeTab = ref("document");
3822
- watch(activeTab, (tab) => {
3823
- });
3824
- const selectedTask = ref(null);
3825
- const detailOpen = ref(false);
3826
- const taskTitles = computed(() => {
3827
- const map = /* @__PURE__ */ new Map();
3828
- if (tasksFile.value?.tasks) {
3829
- for (const task of tasksFile.value.tasks) {
3830
- map.set(task.id, task.title);
3831
- }
3832
- }
3833
- return map;
3834
- });
3835
- const fileChangeEvent = inject("fileChangeEvent", ref(null));
3836
- async function loadDocument() {
3837
- const doc = await fetchDocument(prdSlug.value);
3838
- if (doc) {
3839
- document.value = doc;
3840
- }
3841
- }
3842
- async function loadTasksAndProgress() {
3843
- const [tasks, progress] = await Promise.all([
3844
- fetchTasks(prdSlug.value),
3845
- fetchProgress(prdSlug.value)
3846
- ]);
3847
- tasksFile.value = tasks;
3848
- progressFile.value = progress;
3849
- }
3850
- async function loadData() {
3851
- isLoading.value = true;
3852
- error.value = null;
3853
- try {
3854
- selectRepo(repoId.value);
3855
- const [doc, tasks, progress] = await Promise.all([
3856
- fetchDocument(prdSlug.value),
3857
- fetchTasks(prdSlug.value),
3858
- fetchProgress(prdSlug.value)
3859
- ]);
3860
- if (!doc) {
3861
- error.value = `PRD "${prdSlug.value}" not found in this repository.`;
3862
- return;
3863
- }
3864
- document.value = doc;
3865
- tasksFile.value = tasks;
3866
- progressFile.value = progress;
3867
- if (!tasks) {
3868
- activeTab.value = "document";
3869
- }
3870
- } catch (err) {
3871
- const fetchErr = err;
3872
- if (fetchErr.statusCode === 404) {
3873
- error.value = `PRD "${prdSlug.value}" not found. Check if the file exists in docs/prd/.`;
3874
- } else if (fetchErr.statusCode === 500) {
3875
- error.value = "Server error while loading the PRD. Check the file format.";
3876
- showError("Server error", fetchErr.data?.message || "Failed to read PRD file");
3877
- } else {
3878
- error.value = "Failed to load PRD document. Please try again.";
3879
- showError("Load failed", "Could not fetch the PRD document");
3880
- }
3881
- } finally {
3882
- isLoading.value = false;
3883
- }
3884
- }
3885
- watch(
3886
- () => fileChangeEvent.value,
3887
- (event) => {
3888
- if (!event) return;
3889
- if (event.category === "prd") {
3890
- loadDocument();
3891
- } else if (event.category === "tasks" || event.category === "progress") {
3892
- loadTasksAndProgress();
3893
- }
3894
- }
3895
- );
3896
- watch([repoId, prdSlug], loadData);
3897
- async function handleTaskClick(task) {
3898
- selectedTask.value = task;
3899
- detailOpen.value = true;
3900
- selectedTaskCommits.value = await fetchTaskCommits(prdSlug.value, task.id);
3901
- }
3902
- const selectedTaskCommits = ref([]);
3903
- return (_ctx, _push, _parent, _attrs) => {
3904
- const _component_NuxtLink = __nuxt_component_0$4;
3905
- const _component_PrdMeta = __nuxt_component_1$2;
3906
- const _component_PrdViewer = __nuxt_component_2;
3907
- const _component_TasksBoard = __nuxt_component_3;
3908
- const _component_TasksDetail = __nuxt_component_4;
3909
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "h-full p-4 md:p-6" }, _attrs))}>`);
3910
- if (unref(isLoading)) {
3911
- _push(`<div class="flex h-full items-center justify-center"><div class="flex flex-col items-center gap-4">`);
3912
- _push(ssrRenderComponent(unref(Loader2), { class: "size-8 animate-spin text-primary" }, null, _parent));
3913
- _push(`<p class="text-sm text-muted-foreground">Loading PRD...</p></div></div>`);
3914
- } else if (unref(error)) {
3915
- _push(`<div class="flex h-full items-center justify-center"><div class="flex max-w-md flex-col items-center gap-4 text-center">`);
3916
- _push(ssrRenderComponent(unref(AlertCircle), { class: "size-12 text-destructive" }, null, _parent));
3917
- _push(`<h2 class="text-lg font-semibold">Error Loading PRD</h2><p class="text-sm text-muted-foreground">${ssrInterpolate(unref(error))}</p><div class="flex gap-3">`);
3918
- _push(ssrRenderComponent(unref(Button), {
3919
- variant: "outline",
3920
- size: "sm",
3921
- onClick: loadData
3922
- }, {
3923
- default: withCtx((_, _push2, _parent2, _scopeId) => {
3924
- if (_push2) {
3925
- _push2(ssrRenderComponent(unref(RefreshCw), { class: "mr-2 size-4" }, null, _parent2, _scopeId));
3926
- _push2(` Retry `);
3927
- } else {
3928
- return [
3929
- createVNode(unref(RefreshCw), { class: "mr-2 size-4" }),
3930
- createTextVNode(" Retry ")
3931
- ];
3932
- }
3933
- }),
3934
- _: 1
3935
- }, _parent));
3936
- _push(ssrRenderComponent(_component_NuxtLink, { to: "/" }, {
3937
- default: withCtx((_, _push2, _parent2, _scopeId) => {
3938
- if (_push2) {
3939
- _push2(ssrRenderComponent(unref(Button), {
3940
- variant: "ghost",
3941
- size: "sm"
3942
- }, {
3943
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
3944
- if (_push3) {
3945
- _push3(` Go back home `);
3946
- } else {
3947
- return [
3948
- createTextVNode(" Go back home ")
3949
- ];
3950
- }
3951
- }),
3952
- _: 1
3953
- }, _parent2, _scopeId));
3954
- } else {
3955
- return [
3956
- createVNode(unref(Button), {
3957
- variant: "ghost",
3958
- size: "sm"
3959
- }, {
3960
- default: withCtx(() => [
3961
- createTextVNode(" Go back home ")
3962
- ]),
3963
- _: 1
3964
- })
3965
- ];
3966
- }
3967
- }),
3968
- _: 1
3969
- }, _parent));
3970
- _push(`</div></div></div>`);
3971
- } else if (unref(document)) {
3972
- _push(`<div class="mx-auto max-w-6xl space-y-6"><div class="space-y-2"><h1 class="text-2xl font-bold tracking-tight">${ssrInterpolate(unref(document).name)}</h1>`);
3973
- _push(ssrRenderComponent(_component_PrdMeta, {
3974
- metadata: unref(document).metadata
3975
- }, null, _parent));
3976
- _push(`</div>`);
3977
- _push(ssrRenderComponent(unref(Tabs), {
3978
- modelValue: unref(activeTab),
3979
- "onUpdate:modelValue": ($event) => isRef(activeTab) ? activeTab.value = $event : null,
3980
- class: "w-full"
3981
- }, {
3982
- default: withCtx((_, _push2, _parent2, _scopeId) => {
3983
- if (_push2) {
3984
- _push2(ssrRenderComponent(unref(TabsList), null, {
3985
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
3986
- if (_push3) {
3987
- _push3(ssrRenderComponent(unref(TabsTrigger), {
3988
- value: "document",
3989
- class: "gap-2"
3990
- }, {
3991
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
3992
- if (_push4) {
3993
- _push4(ssrRenderComponent(unref(FileText), { class: "size-4" }, null, _parent4, _scopeId3));
3994
- _push4(` Document `);
3995
- } else {
3996
- return [
3997
- createVNode(unref(FileText), { class: "size-4" }),
3998
- createTextVNode(" Document ")
3999
- ];
4000
- }
4001
- }),
4002
- _: 1
4003
- }, _parent3, _scopeId2));
4004
- _push3(ssrRenderComponent(unref(TabsTrigger), {
4005
- value: "board",
4006
- class: "gap-2",
4007
- disabled: !unref(tasksFile)
4008
- }, {
4009
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
4010
- if (_push4) {
4011
- _push4(ssrRenderComponent(unref(LayoutGrid), { class: "size-4" }, null, _parent4, _scopeId3));
4012
- _push4(` Task Board `);
4013
- if (unref(tasksFile)) {
4014
- _push4(`<span class="text-xs text-muted-foreground"${_scopeId3}> (${ssrInterpolate(unref(tasksFile).tasks.length)}) </span>`);
4015
- } else {
4016
- _push4(`<!---->`);
4017
- }
4018
- } else {
4019
- return [
4020
- createVNode(unref(LayoutGrid), { class: "size-4" }),
4021
- createTextVNode(" Task Board "),
4022
- unref(tasksFile) ? (openBlock(), createBlock("span", {
4023
- key: 0,
4024
- class: "text-xs text-muted-foreground"
4025
- }, " (" + toDisplayString(unref(tasksFile).tasks.length) + ") ", 1)) : createCommentVNode("", true)
4026
- ];
4027
- }
4028
- }),
4029
- _: 1
4030
- }, _parent3, _scopeId2));
4031
- } else {
4032
- return [
4033
- createVNode(unref(TabsTrigger), {
4034
- value: "document",
4035
- class: "gap-2"
3229
+ })) : createCommentVNode("", true),
3230
+ __props.task && unref(viewMode) === "diff" && unref(selectedCommitSha) && __props.repoId ? (openBlock(), createBlock("div", {
3231
+ key: 1,
3232
+ class: "min-h-0 flex-1 overflow-hidden"
3233
+ }, [
3234
+ createVNode(_component_GitDiffPanel, {
3235
+ "repo-id": __props.repoId,
3236
+ "commit-sha": unref(selectedCommitSha),
3237
+ "repo-path": unref(selectedCommitRepo) || void 0,
3238
+ class: "h-full",
3239
+ onClose: handleBackToDetails
3240
+ }, null, 8, ["repo-id", "commit-sha", "repo-path"])
3241
+ ])) : __props.task ? (openBlock(), createBlock("div", {
3242
+ key: 2,
3243
+ class: "min-h-0 flex-1 space-y-4 overflow-y-auto px-6"
3244
+ }, [
3245
+ createVNode("div", { class: "flex flex-wrap items-center gap-2" }, [
3246
+ createVNode(unref(Badge), {
3247
+ variant: unref(categoryConfig).variant
4036
3248
  }, {
4037
3249
  default: withCtx(() => [
4038
- createVNode(unref(FileText), { class: "size-4" }),
4039
- createTextVNode(" Document ")
3250
+ createVNode(unref(Tag), { class: "mr-1 size-3" }),
3251
+ createTextVNode(" " + toDisplayString(unref(categoryConfig).label), 1)
4040
3252
  ]),
4041
3253
  _: 1
4042
- }),
4043
- createVNode(unref(TabsTrigger), {
4044
- value: "board",
4045
- class: "gap-2",
4046
- disabled: !unref(tasksFile)
3254
+ }, 8, ["variant"]),
3255
+ createVNode(unref(Badge), {
3256
+ variant: "outline",
3257
+ class: unref(priorityConfig).class
4047
3258
  }, {
4048
3259
  default: withCtx(() => [
4049
- createVNode(unref(LayoutGrid), { class: "size-4" }),
4050
- createTextVNode(" Task Board "),
4051
- unref(tasksFile) ? (openBlock(), createBlock("span", {
4052
- key: 0,
4053
- class: "text-xs text-muted-foreground"
4054
- }, " (" + toDisplayString(unref(tasksFile).tasks.length) + ") ", 1)) : createCommentVNode("", true)
3260
+ createVNode(unref(AlertTriangle), { class: "mr-1 size-3" }),
3261
+ createTextVNode(" " + toDisplayString(unref(priorityConfig).label), 1)
4055
3262
  ]),
4056
3263
  _: 1
4057
- }, 8, ["disabled"])
4058
- ];
4059
- }
4060
- }),
4061
- _: 1
4062
- }, _parent2, _scopeId));
4063
- _push2(ssrRenderComponent(unref(TabsContent), {
4064
- value: "document",
4065
- class: "mt-4"
4066
- }, {
4067
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
4068
- if (_push3) {
4069
- _push3(`<div class="rounded-lg border border-border bg-card p-4 md:p-6"${_scopeId2}>`);
4070
- _push3(ssrRenderComponent(_component_PrdViewer, {
4071
- content: unref(document).content
4072
- }, null, _parent3, _scopeId2));
4073
- _push3(`</div>`);
4074
- } else {
4075
- return [
4076
- createVNode("div", { class: "rounded-lg border border-border bg-card p-4 md:p-6" }, [
4077
- createVNode(_component_PrdViewer, {
4078
- content: unref(document).content
4079
- }, null, 8, ["content"])
3264
+ }, 8, ["class"]),
3265
+ createVNode(unref(Badge), {
3266
+ variant: "outline",
3267
+ class: unref(statusConfig).class
3268
+ }, {
3269
+ default: withCtx(() => [
3270
+ (openBlock(), createBlock(resolveDynamicComponent(unref(statusConfig).icon), { class: "mr-1 size-3" })),
3271
+ createTextVNode(" " + toDisplayString(unref(statusConfig).label), 1)
3272
+ ]),
3273
+ _: 1
3274
+ }, 8, ["class"])
3275
+ ]),
3276
+ createVNode("div", { class: "space-y-2" }, [
3277
+ createVNode("h4", { class: "text-sm font-medium" }, "Description"),
3278
+ createVNode("p", { class: "text-sm text-muted-foreground leading-relaxed" }, toDisplayString(__props.task.description), 1)
3279
+ ]),
3280
+ createVNode(unref(Separator)),
3281
+ __props.task.steps.length > 0 ? (openBlock(), createBlock("div", {
3282
+ key: 0,
3283
+ class: "space-y-2"
3284
+ }, [
3285
+ createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3286
+ createVNode(unref(ListOrdered), { class: "size-4" }),
3287
+ createTextVNode(" Steps ")
3288
+ ]),
3289
+ createVNode("ol", { class: "ml-4 list-decimal space-y-1 text-sm text-muted-foreground" }, [
3290
+ (openBlock(true), createBlock(Fragment, null, renderList(__props.task.steps, (step, index) => {
3291
+ return openBlock(), createBlock("li", {
3292
+ key: index,
3293
+ class: "pl-1"
3294
+ }, toDisplayString(step), 1);
3295
+ }), 128))
4080
3296
  ])
4081
- ];
4082
- }
4083
- }),
4084
- _: 1
4085
- }, _parent2, _scopeId));
4086
- _push2(ssrRenderComponent(unref(TabsContent), {
4087
- value: "board",
4088
- class: "mt-4"
4089
- }, {
4090
- default: withCtx((_2, _push3, _parent3, _scopeId2) => {
4091
- if (_push3) {
4092
- if (unref(tasksFile)) {
4093
- _push3(`<div class="h-[calc(100vh-280px)] min-h-[400px]"${_scopeId2}>`);
4094
- _push3(ssrRenderComponent(_component_TasksBoard, {
4095
- tasks: unref(tasksFile).tasks,
4096
- onTaskClick: handleTaskClick
4097
- }, null, _parent3, _scopeId2));
4098
- _push3(`</div>`);
4099
- } else {
4100
- _push3(`<div class="py-12 text-center"${_scopeId2}>`);
4101
- _push3(ssrRenderComponent(unref(LayoutGrid), { class: "mx-auto size-12 text-muted-foreground/50" }, null, _parent3, _scopeId2));
4102
- _push3(`<p class="mt-4 text-muted-foreground"${_scopeId2}> No tasks found for this PRD </p><p class="mt-1 text-sm text-muted-foreground/70"${_scopeId2}> Task state has not been generated for this PRD yet. </p></div>`);
4103
- }
4104
- } else {
4105
- return [
4106
- unref(tasksFile) ? (openBlock(), createBlock("div", {
4107
- key: 0,
4108
- class: "h-[calc(100vh-280px)] min-h-[400px]"
4109
- }, [
4110
- createVNode(_component_TasksBoard, {
4111
- tasks: unref(tasksFile).tasks,
4112
- onTaskClick: handleTaskClick
4113
- }, null, 8, ["tasks"])
4114
- ])) : (openBlock(), createBlock("div", {
4115
- key: 1,
4116
- class: "py-12 text-center"
4117
- }, [
4118
- createVNode(unref(LayoutGrid), { class: "mx-auto size-12 text-muted-foreground/50" }),
4119
- createVNode("p", { class: "mt-4 text-muted-foreground" }, " No tasks found for this PRD "),
4120
- createVNode("p", { class: "mt-1 text-sm text-muted-foreground/70" }, " Task state has not been generated for this PRD yet. ")
4121
- ]))
4122
- ];
4123
- }
4124
- }),
4125
- _: 1
4126
- }, _parent2, _scopeId));
4127
- } else {
4128
- return [
4129
- createVNode(unref(TabsList), null, {
4130
- default: withCtx(() => [
4131
- createVNode(unref(TabsTrigger), {
4132
- value: "document",
4133
- class: "gap-2"
4134
- }, {
4135
- default: withCtx(() => [
4136
- createVNode(unref(FileText), { class: "size-4" }),
4137
- createTextVNode(" Document ")
3297
+ ])) : createCommentVNode("", true),
3298
+ __props.task.steps.length > 0 && __props.task.passes.length > 0 ? (openBlock(), createBlock(unref(Separator), { key: 1 })) : createCommentVNode("", true),
3299
+ __props.task.passes.length > 0 ? (openBlock(), createBlock("div", {
3300
+ key: 2,
3301
+ class: "space-y-2"
3302
+ }, [
3303
+ createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3304
+ createVNode(unref(CheckSquare), { class: "size-4" }),
3305
+ createTextVNode(" Pass Criteria ")
4138
3306
  ]),
4139
- _: 1
4140
- }),
4141
- createVNode(unref(TabsTrigger), {
4142
- value: "board",
4143
- class: "gap-2",
4144
- disabled: !unref(tasksFile)
4145
- }, {
4146
- default: withCtx(() => [
4147
- createVNode(unref(LayoutGrid), { class: "size-4" }),
4148
- createTextVNode(" Task Board "),
4149
- unref(tasksFile) ? (openBlock(), createBlock("span", {
4150
- key: 0,
4151
- class: "text-xs text-muted-foreground"
4152
- }, " (" + toDisplayString(unref(tasksFile).tasks.length) + ") ", 1)) : createCommentVNode("", true)
3307
+ createVNode("ul", { class: "space-y-1.5 text-sm text-muted-foreground" }, [
3308
+ (openBlock(true), createBlock(Fragment, null, renderList(__props.task.passes, (pass, index) => {
3309
+ return openBlock(), createBlock("li", {
3310
+ key: index,
3311
+ class: "flex items-start gap-2"
3312
+ }, [
3313
+ createVNode("div", {
3314
+ class: ["mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border", __props.task.status === "completed" ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/50"]
3315
+ }, [
3316
+ __props.task.status === "completed" ? (openBlock(), createBlock(unref(Check), {
3317
+ key: 0,
3318
+ class: "size-3"
3319
+ })) : createCommentVNode("", true)
3320
+ ], 2),
3321
+ createVNode("span", null, toDisplayString(pass), 1)
3322
+ ]);
3323
+ }), 128))
3324
+ ])
3325
+ ])) : createCommentVNode("", true),
3326
+ __props.task.dependencies.length > 0 ? (openBlock(), createBlock(unref(Separator), { key: 3 })) : createCommentVNode("", true),
3327
+ __props.task.dependencies.length > 0 ? (openBlock(), createBlock("div", {
3328
+ key: 4,
3329
+ class: "space-y-2"
3330
+ }, [
3331
+ createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3332
+ createVNode(unref(Link2), { class: "size-4" }),
3333
+ createTextVNode(" Dependencies ")
4153
3334
  ]),
4154
- _: 1
4155
- }, 8, ["disabled"])
4156
- ]),
4157
- _: 1
4158
- }),
4159
- createVNode(unref(TabsContent), {
4160
- value: "document",
4161
- class: "mt-4"
4162
- }, {
4163
- default: withCtx(() => [
4164
- createVNode("div", { class: "rounded-lg border border-border bg-card p-4 md:p-6" }, [
4165
- createVNode(_component_PrdViewer, {
4166
- content: unref(document).content
4167
- }, null, 8, ["content"])
4168
- ])
4169
- ]),
4170
- _: 1
4171
- }),
4172
- createVNode(unref(TabsContent), {
4173
- value: "board",
4174
- class: "mt-4"
4175
- }, {
4176
- default: withCtx(() => [
4177
- unref(tasksFile) ? (openBlock(), createBlock("div", {
4178
- key: 0,
4179
- class: "h-[calc(100vh-280px)] min-h-[400px]"
3335
+ createVNode("ul", { class: "space-y-1 text-sm text-muted-foreground" }, [
3336
+ (openBlock(true), createBlock(Fragment, null, renderList(__props.task.dependencies, (depId) => {
3337
+ return openBlock(), createBlock("li", {
3338
+ key: depId,
3339
+ class: "flex items-center gap-2"
3340
+ }, [
3341
+ createVNode("span", { class: "font-mono text-xs" }, toDisplayString(depId), 1),
3342
+ createVNode("span", null, toDisplayString(getTaskTitle(depId)), 1)
3343
+ ]);
3344
+ }), 128))
3345
+ ])
3346
+ ])) : createCommentVNode("", true),
3347
+ unref(hasCommits) ? (openBlock(), createBlock(Fragment, { key: 5 }, [
3348
+ createVNode(unref(Separator)),
3349
+ createVNode("div", { class: "space-y-2" }, [
3350
+ createVNode("h4", { class: "flex items-center gap-2 text-sm font-medium" }, [
3351
+ createVNode(unref(Diff), { class: "size-4" }),
3352
+ createTextVNode(" Changes ")
3353
+ ]),
3354
+ createVNode(_component_GitCommitList, {
3355
+ commits: __props.commits,
3356
+ "repo-id": __props.repoId,
3357
+ onSelect: handleCommitSelect
3358
+ }, null, 8, ["commits", "repo-id"])
3359
+ ])
3360
+ ], 64)) : createCommentVNode("", true),
3361
+ __props.task.startedAt || __props.task.completedAt ? (openBlock(), createBlock("div", {
3362
+ key: 6,
3363
+ class: "space-y-2"
4180
3364
  }, [
4181
- createVNode(_component_TasksBoard, {
4182
- tasks: unref(tasksFile).tasks,
4183
- onTaskClick: handleTaskClick
4184
- }, null, 8, ["tasks"])
4185
- ])) : (openBlock(), createBlock("div", {
4186
- key: 1,
4187
- class: "py-12 text-center"
3365
+ createVNode(unref(Separator)),
3366
+ createVNode("div", { class: "flex flex-col gap-1 text-xs text-muted-foreground" }, [
3367
+ __props.task.startedAt ? (openBlock(), createBlock("div", {
3368
+ key: 0,
3369
+ class: "flex items-center gap-2"
3370
+ }, [
3371
+ createVNode(unref(Calendar), { class: "size-3" }),
3372
+ createVNode("span", null, "Started: " + toDisplayString(formatDate(__props.task.startedAt)), 1)
3373
+ ])) : createCommentVNode("", true),
3374
+ __props.task.completedAt ? (openBlock(), createBlock("div", {
3375
+ key: 1,
3376
+ class: "flex items-center gap-2"
3377
+ }, [
3378
+ createVNode(unref(CheckCircle2), { class: "size-3" }),
3379
+ createVNode("span", null, "Completed: " + toDisplayString(formatDate(__props.task.completedAt)), 1)
3380
+ ])) : createCommentVNode("", true)
3381
+ ])
3382
+ ])) : createCommentVNode("", true),
3383
+ unref(showOpenPrdLink) ? (openBlock(), createBlock("div", {
3384
+ key: 7,
3385
+ class: "space-y-2"
4188
3386
  }, [
4189
- createVNode(unref(LayoutGrid), { class: "mx-auto size-12 text-muted-foreground/50" }),
4190
- createVNode("p", { class: "mt-4 text-muted-foreground" }, " No tasks found for this PRD "),
4191
- createVNode("p", { class: "mt-1 text-sm text-muted-foreground/70" }, " Task state has not been generated for this PRD yet. ")
4192
- ]))
4193
- ]),
4194
- _: 1
4195
- })
4196
- ];
4197
- }
4198
- }),
4199
- _: 1
4200
- }, _parent));
4201
- _push(`</div>`);
4202
- } else {
4203
- _push(`<!---->`);
4204
- }
4205
- _push(ssrRenderComponent(_component_TasksDetail, {
4206
- open: unref(detailOpen),
4207
- "onUpdate:open": ($event) => isRef(detailOpen) ? detailOpen.value = $event : null,
4208
- task: unref(selectedTask),
4209
- "task-titles": unref(taskTitles),
4210
- commits: unref(selectedTaskCommits),
4211
- "repo-id": unref(repoId)
4212
- }, null, _parent));
4213
- _push(`</div>`);
3387
+ createVNode(unref(Separator)),
3388
+ createVNode("div", { class: "flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-sm" }, [
3389
+ createVNode("span", { class: "text-muted-foreground" }, "This task belongs to " + toDisplayString(__props.taskPrdSlug) + ".", 1),
3390
+ createVNode(_component_NuxtLink, { to: unref(openPrdHref) }, {
3391
+ default: withCtx(() => [
3392
+ createVNode(unref(Button), {
3393
+ variant: "outline",
3394
+ size: "sm",
3395
+ class: "h-8"
3396
+ }, {
3397
+ default: withCtx(() => [
3398
+ createVNode(unref(ExternalLink), { class: "mr-1.5 size-3.5" }),
3399
+ createTextVNode(" Open PRD ")
3400
+ ]),
3401
+ _: 1
3402
+ })
3403
+ ]),
3404
+ _: 1
3405
+ }, 8, ["to"])
3406
+ ])
3407
+ ])) : createCommentVNode("", true)
3408
+ ])) : createCommentVNode("", true),
3409
+ createVNode(unref(SheetFooter), { class: "px-6 pb-6" }, {
3410
+ default: withCtx(() => [
3411
+ createVNode(unref(SheetClose), { "as-child": "" }, {
3412
+ default: withCtx(() => [
3413
+ createVNode(unref(Button), {
3414
+ variant: "outline",
3415
+ class: "w-full"
3416
+ }, {
3417
+ default: withCtx(() => [
3418
+ createTextVNode("Close")
3419
+ ]),
3420
+ _: 1
3421
+ })
3422
+ ]),
3423
+ _: 1
3424
+ })
3425
+ ]),
3426
+ _: 1
3427
+ })
3428
+ ]),
3429
+ _: 1
3430
+ }, 8, ["class"])
3431
+ ];
3432
+ }
3433
+ }),
3434
+ _: 1
3435
+ }, _parent));
4214
3436
  };
4215
3437
  }
4216
3438
  });
4217
3439
  const _sfc_setup = _sfc_main.setup;
4218
3440
  _sfc_main.setup = (props, ctx) => {
4219
3441
  const ssrContext = useSSRContext();
4220
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/[repo]/[prd].vue");
3442
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/Detail.vue");
4221
3443
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
4222
3444
  };
3445
+ const __nuxt_component_1 = Object.assign(_sfc_main, { __name: "TasksDetail" });
4223
3446
 
4224
- export { _sfc_main as default };
4225
- //# sourceMappingURL=_prd_-CkKfJB6U.mjs.map
3447
+ export { Badge as B, __nuxt_component_0$2 as _, __nuxt_component_1 as a };
3448
+ //# sourceMappingURL=Detail-DC-KJQ1f.mjs.map