@shepai/cli 1.149.0-pr466.641f985 → 1.149.1

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 (141) hide show
  1. package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts.map +1 -1
  2. package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.js +4 -0
  3. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  4. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +6 -3
  5. package/dist/tsconfig.build.tsbuildinfo +1 -1
  6. package/package.json +1 -1
  7. package/web/.next/BUILD_ID +1 -1
  8. package/web/.next/build-manifest.json +2 -2
  9. package/web/.next/fallback-build-manifest.json +2 -2
  10. package/web/.next/prerender-manifest.json +3 -3
  11. package/web/.next/required-server-files.js +2 -2
  12. package/web/.next/required-server-files.json +2 -2
  13. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  14. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +28 -28
  17. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  18. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  24. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  26. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +28 -28
  29. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  32. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  35. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  38. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  41. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/_global-error.html +2 -2
  44. package/web/.next/server/app/_global-error.rsc +1 -1
  45. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  46. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  47. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  48. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  49. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  50. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  51. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  53. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  54. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  56. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  58. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  60. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  62. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  63. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  64. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
  65. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
  66. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
  67. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  68. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
  69. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  70. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  71. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  72. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  73. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +3 -3
  74. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  75. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
  76. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
  77. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
  78. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
  79. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
  82. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
  83. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  84. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  85. package/web/.next/server/chunks/ssr/_0c5f56e3._.js +2 -2
  86. package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -1
  87. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  88. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  89. package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
  90. package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
  91. package/web/.next/server/chunks/ssr/{_ef9f3dcd._.js → _2b873e3b._.js} +2 -2
  92. package/web/.next/server/chunks/ssr/{_ef9f3dcd._.js.map → _2b873e3b._.js.map} +1 -1
  93. package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
  94. package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
  95. package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
  96. package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
  97. package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
  98. package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
  99. package/web/.next/server/chunks/ssr/_64bdfc6f._.js +2 -2
  100. package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
  102. package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
  103. package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  105. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/_ee80b25c._.js +3 -0
  107. package/web/.next/server/chunks/ssr/{_ba037519._.js.map → _ee80b25c._.js.map} +1 -1
  108. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  109. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  110. package/web/.next/server/chunks/ssr/{src_presentation_web_79626449._.js → src_presentation_web_91545e86._.js} +2 -2
  111. package/web/.next/server/chunks/ssr/{src_presentation_web_79626449._.js.map → src_presentation_web_91545e86._.js.map} +1 -1
  112. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  113. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  115. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  117. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  118. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  120. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  121. package/web/.next/server/pages/500.html +2 -2
  122. package/web/.next/server/server-reference-manifest.js +1 -1
  123. package/web/.next/server/server-reference-manifest.json +44 -44
  124. package/web/.next/static/chunks/{65071e11d54030b4.js → 213bc4d2c2c7885a.js} +1 -1
  125. package/web/.next/static/chunks/{f79833aa9cf5dd4d.js → 42a1e8928c2a8b1e.js} +1 -1
  126. package/web/.next/static/chunks/{422669378f77f511.js → 6b7b66ce14353296.js} +1 -1
  127. package/web/.next/static/chunks/{e013d723c7ef8d91.js → 70917246e2079de0.js} +1 -1
  128. package/web/.next/static/chunks/{1c5e0da50cb1366f.js → 932fdc72f19fba16.js} +1 -1
  129. package/web/.next/static/chunks/{ab7db101b5e50f7b.js → 9522b3e38757bf73.js} +1 -1
  130. package/web/.next/static/chunks/c8c503403d49f600.js +1 -0
  131. package/web/.next/static/chunks/{4fcb9f488ba9f00c.js → d3e9784c18cc85e9.js} +1 -1
  132. package/web/.next/static/chunks/{24ff1101ecf2458f.js → e23f0c8da44fe4ca.js} +1 -1
  133. package/web/.next/static/chunks/{3e9cf6594fee4b5f.js → ee210d2383098e91.js} +1 -1
  134. package/web/.next/static/chunks/faf6b0ec1cf9125c.js +5 -0
  135. package/web/.next/static/chunks/{716280710dc3644e.js → fbf933fea8dd21f4.js} +1 -1
  136. package/web/.next/server/chunks/ssr/_ba037519._.js +0 -3
  137. package/web/.next/static/chunks/2a39634bf53fef3c.js +0 -1
  138. package/web/.next/static/chunks/70d6beef40a1614c.js +0 -5
  139. /package/web/.next/static/{d72uJRFu8WCAAq0vj4iZ2 → 0-b0NgavBiu5Fo1rzdeX2}/_buildManifest.js +0 -0
  140. /package/web/.next/static/{d72uJRFu8WCAAq0vj4iZ2 → 0-b0NgavBiu5Fo1rzdeX2}/_clientMiddlewareManifest.json +0 -0
  141. /package/web/.next/static/{d72uJRFu8WCAAq0vj4iZ2 → 0-b0NgavBiu5Fo1rzdeX2}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24270,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},68304,e=>{"use strict";var t=e.i(20314),r=e.i(79054),n=e.i(91967),i=e.i(22528),o=e.i(51080),a=e.i(85995),s=e.i(87620),l=e.i(66033),u=e.i(36589),c=e.i(13123),d="Tabs",[f,p]=(0,i.createContextScope)(d,[o.createRovingFocusGroupScope]),h=(0,o.createRovingFocusGroupScope)(),[y,m]=f(d),g=r.forwardRef((e,r)=>{let{__scopeTabs:n,value:i,onValueChange:o,defaultValue:a,orientation:f="horizontal",dir:p,activationMode:h="automatic",...m}=e,g=(0,l.useDirection)(p),[v,b]=(0,u.useControllableState)({prop:i,onChange:o,defaultProp:a??"",caller:d});return(0,t.jsx)(y,{scope:n,baseId:(0,c.useId)(),value:v,onValueChange:b,orientation:f,dir:g,activationMode:h,children:(0,t.jsx)(s.Primitive.div,{dir:g,"data-orientation":f,...m,ref:r})})});g.displayName=d;var v="TabsList",b=r.forwardRef((e,r)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,l=m(v,n),u=h(n);return(0,t.jsx)(o.Root,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:(0,t.jsx)(s.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...a,ref:r})})});b.displayName=v;var x="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:a,disabled:l=!1,...u}=e,c=m(x,i),d=h(i),f=C(c.baseId,a),p=S(c.baseId,a),y=a===c.value;return(0,t.jsx)(o.Item,{asChild:!0,...d,focusable:!l,active:y,children:(0,t.jsx)(s.Primitive.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":p,"data-state":y?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...u,ref:r,onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(a)}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(a)}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;y||l||!e||c.onValueChange(a)})})})});w.displayName=x;var k="TabsContent",j=r.forwardRef((e,n)=>{let{__scopeTabs:i,value:o,forceMount:l,children:u,...c}=e,d=m(k,i),f=C(d.baseId,o),p=S(d.baseId,o),h=o===d.value,y=r.useRef(h);return r.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(a.Presence,{present:l||h,children:({present:r})=>(0,t.jsx)(s.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:p,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:y.current?"0s":void 0},children:r&&u})})});function C(e,t){return`${e}-trigger-${t}`}function S(e,t){return`${e}-content-${t}`}j.displayName=k,e.s(["Content",()=>j,"List",()=>b,"Root",()=>g,"Tabs",()=>g,"TabsContent",()=>j,"TabsList",()=>b,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>p],43133);var P=e.i(43133),P=P,R=e.i(31777);let E=P.Root,T=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(P.List,{ref:n,className:(0,R.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));T.displayName=P.List.displayName;let O=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(P.Trigger,{ref:n,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...r}));O.displayName=P.Trigger.displayName;let M=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(P.Content,{ref:n,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));M.displayName=P.Content.displayName,e.s(["Tabs",()=>E,"TabsContent",()=>M,"TabsList",()=>T,"TabsTrigger",()=>O],68304)},10942,94819,e=>{"use strict";var t=e.i(80986);e.s(["CircleCheck",()=>t.default],10942);let r=(0,e.i(3645).default)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Ban",()=>r],94819)},32494,e=>{"use strict";let t=(0,e.i(3645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},79687,e=>{"use strict";var t=e.i(14748);e.s(["AlertCircle",()=>t.default])},39443,e=>{"use strict";var t=e.i(20314),r=e.i(79054);let n=(0,e.i(18354).createLogger)("[SSE]");function i(e,t,r,n){if("u"<typeof EventSource)return()=>{};let i=null,o=!1,a=1e3,s=null,l=null;return!function u(){o||(i=new EventSource(e?`/api/agent-events?runId=${encodeURIComponent(e)}`:"/api/agent-events"),n("connecting"),i.onopen=()=>{n("connected"),l=setTimeout(()=>{l=null,a=1e3},5e3)},i.onerror=()=>{i?.close(),i=null,n("disconnected"),null!==l&&(clearTimeout(l),l=null);let e=a;a=Math.min(2*e,3e4),s=setTimeout(()=>{s=null,u()},e)},i.addEventListener("notification",e=>{let n=JSON.parse(e.data);t(e=>{let t=[...e,n];return t.length>500?t.slice(-250):t}),r(n)}))}(),()=>{o=!0,null!==s&&(clearTimeout(s),s=null),null!==l&&(clearTimeout(l),l=null),i&&(i.close(),i=null)}}let o=(0,r.createContext)(null);function a({children:e,runId:a}){let{events:s,lastEvent:l,connectionStatus:u}=function(e){let[t,o]=(0,r.useState)([]),[a,s]=(0,r.useState)(null),[l,u]=(0,r.useState)("disconnected"),c=e?.runId,d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=e.data;if(t&&"object"==typeof t)if("notification"===t.type){let e=t.data;n.debug("event received:",e.eventType,e),o(t=>{let r=[...t,e];return r.length>500?r.slice(-250):r}),s(e)}else"status"===t.type&&u(t.status)},[]);return(0,r.useEffect)(()=>{let e="u">typeof location&&new URLSearchParams(location.search).has("sse");if(!navigator.serviceWorker||e)return i(c,o,s,u);let t=!1,r={current:void 0};function n(e){t||(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}function a(){if(t)return;let e=navigator.serviceWorker.controller;e&&(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}return navigator.serviceWorker.addEventListener("message",f),navigator.serviceWorker.addEventListener("controllerchange",a),navigator.serviceWorker.register("/agent-events-sw.js",{scope:"/"}).then(e=>{if(t)return;let a=e.active??e.installing??e.waiting;if(!a){r.current=i(c,o,s,u);return}if("activated"===a.state)n(a);else{let e=()=>{"activated"===a.state&&(a.removeEventListener("statechange",e),n(a))};a.addEventListener("statechange",e)}}).catch(()=>{t||(r.current=i(c,o,s,u))}),()=>{t=!0,navigator.serviceWorker.removeEventListener("message",f),navigator.serviceWorker.removeEventListener("controllerchange",a),d.current?.postMessage({type:"unsubscribe"}),d.current=null,r.current?.()}},[c,f]),{events:t,lastEvent:a,connectionStatus:l}}({runId:a}),c=(0,r.useMemo)(()=>({events:s,lastEvent:l,connectionStatus:u}),[s,l,u]);return(0,t.jsx)(o.Provider,{value:c,children:e})}function s(){let e=(0,r.useContext)(o);if(!e)throw Error("useAgentEventsContext must be used within an <AgentEventsProvider>");return e}e.s(["AgentEventsProvider",()=>a,"useAgentEventsContext",()=>s],39443)},3214,e=>{"use strict";let t=(0,e.i(3645).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],3214)},80986,e=>{"use strict";let t=(0,e.i(3645).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",()=>t])},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t],30090),e.s(["CircleX",()=>t],54277)},51080,e=>{"use strict";var t=e.i(79054),r=e.i(91967),n=e.i(87342),i=e.i(5978),o=e.i(22528),a=e.i(13123),s=e.i(87620),l=e.i(29297),u=e.i(36589),c=e.i(66033),d=e.i(20314),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[y,m,g]=(0,n.createCollection)(h),[v,b]=(0,o.createContextScope)(h,[g]),[x,w]=v(h),k=t.forwardRef((e,t)=>(0,d.jsx)(y.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(y.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(j,{...e,ref:t})})}));k.displayName=h;var j=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:y=!1,dir:g,currentTabStopId:v,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:w,onEntryFocus:k,preventScrollOnEntryFocus:j=!1,...C}=e,S=t.useRef(null),P=(0,i.useComposedRefs)(n,S),E=(0,c.useDirection)(g),[T,O]=(0,u.useControllableState)({prop:v,defaultProp:b??null,onChange:w,caller:h}),[M,A]=t.useState(!1),_=(0,l.useCallbackRef)(k),F=m(o),L=t.useRef(!1),[I,N]=t.useState(0);return t.useEffect(()=>{let e=S.current;if(e)return e.addEventListener(f,_),()=>e.removeEventListener(f,_)},[_]),(0,d.jsx)(x,{scope:o,orientation:a,dir:E,loop:y,currentTabStopId:T,onItemFocus:t.useCallback(e=>O(e),[O]),onItemShiftTab:t.useCallback(()=>A(!0),[]),onFocusableItemAdd:t.useCallback(()=>N(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>N(e=>e-1),[]),children:(0,d.jsx)(s.Primitive.div,{tabIndex:M||0===I?-1:0,"data-orientation":a,...C,ref:P,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!M){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=F().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),j)}}L.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>A(!1))})})}),C="RovingFocusGroupItem",S=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:u,children:c,...f}=e,p=(0,a.useId)(),h=u||p,g=w(C,i),v=g.currentTabStopId===h,b=m(i),{onFocusableItemAdd:x,onFocusableItemRemove:k,currentTabStopId:j}=g;return t.useEffect(()=>{if(o)return x(),()=>k()},[o,x,k]),(0,d.jsx)(y.ItemSlot,{scope:i,id:h,focusable:o,active:l,children:(0,d.jsx)(s.Primitive.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...f,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return P[i]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=g.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>R(i))}}),children:"function"==typeof c?c({isCurrentTabStop:v,hasTabStop:null!=j}):c})})});S.displayName=C;var P={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>S,"Root",()=>k,"createRovingFocusGroupScope",()=>b])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},66033,e=>{"use strict";var t=e.i(79054);e.i(20314);var r=t.createContext(void 0);function n(e){let n=t.useContext(r);return e||n||"ltr"}e.s(["useDirection",()=>n])},87342,e=>{"use strict";var t=e.i(79054),r=e.i(22528),n=e.i(5978),i=e.i(86874),o=e.i(20314);function a(e){let a=e+"CollectionProvider",[s,l]=(0,r.createContextScope)(a),[u,c]=s(a,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,i=t.default.useRef(null),a=t.default.useRef(new Map).current;return(0,o.jsx)(u,{scope:r,itemMap:a,collectionRef:i,children:n})};d.displayName=a;let f=e+"CollectionSlot",p=(0,i.createSlot)(f),h=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e,a=c(f,r),s=(0,n.useComposedRefs)(t,a.collectionRef);return(0,o.jsx)(p,{ref:s,children:i})});h.displayName=f;let y=e+"CollectionItemSlot",m="data-radix-collection-item",g=(0,i.createSlot)(y),v=t.default.forwardRef((e,r)=>{let{scope:i,children:a,...s}=e,l=t.default.useRef(null),u=(0,n.useComposedRefs)(r,l),d=c(y,i);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...s}),()=>void d.itemMap.delete(l))),(0,o.jsx)(g,{...{[m]:""},ref:u,children:a})});return v.displayName=y,[{Provider:d,Slot:h,ItemSlot:v},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}var s=new WeakMap;function l(e,t){var r,n;let i,o,a;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,i=r.length,(a=(o=u(n))>=0?o:i+o)<0||a>=i?-1:a);return -1===s?void 0:e[s]}function u(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],s.set(this,!0)}set(e,t){return s.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),o=this.#e.length,a=u(e),s=a>=0?a:o+a,l=s<0||s>=o?-1:s;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let c=this.size+ +!i;a<0&&s++;let d=[...this.#e],f=!1;for(let e=s;e<c;e++)if(s===e){let o=d[e];d[e]===t&&(o=d[e+1]),i&&this.delete(t),n=this.get(o),this.set(t,r)}else{f||d[e-1]!==t||(f=!0);let r=d[f?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=l(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=l(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return l(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>a])},27069,e=>{"use strict";function t(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",()=>t])},81975,e=>{"use strict";let t=(0,e.i(3645).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",()=>t],81975)},82569,5147,e=>{"use strict";let t=(0,e.i(3645).default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);e.s(["Github",()=>t],82569);var r=e.i(20314),n=e.i(79054);let i={"action-required":"action-needed",running:"in-progress",done:"done",blocked:"blocked",pending:"pending",error:"error",creating:null,deleting:null,archived:null};function o(e){return i[e]}let a=(0,n.createContext)(null);function s({children:e}){let[t,i]=(0,n.useState)([]),[o,s]=(0,n.useState)(!1),l=(0,n.useMemo)(()=>({features:t,setFeatures:i,hasRepositories:o,setHasRepositories:s}),[t,o]);return(0,r.jsx)(a.Provider,{value:l,children:e})}function l(){let e=(0,n.useContext)(a);if(!e)throw Error("useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>");return e}e.s(["SidebarFeaturesProvider",()=>s,"mapNodeStateToSidebarStatus",()=>o,"useSidebarFeaturesContext",()=>l],5147)},98127,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function n({className:e,type:n,...i}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","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",e),...i})}e.s(["Input",()=>n])},66459,e=>{"use strict";let t=(0,e.i(3645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},12103,e=>{"use strict";let t=(0,e.i(3645).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",()=>t],12103)},83241,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let n=e.r(9328);function i({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},90891,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},31218,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return l}});let n=e.r(20314),i=e.r(26036),o=e.r(58988),a=e.r(90891),s=e.r(22193);function l({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let l=(0,s.getDeploymentIdQueryOrEmptyString)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${l}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},84929,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}});let n=e.r(20314),i=e.r(79054),o=e.r(83241),a=e.r(31218);function s(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},u=function(e){let t={...l,...e},r=(0,i.lazy)(()=>t.loader().then(s)),u=t.loading;function c(e){let s=u?(0,n.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,c=l?i.Suspense:i.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(c,{...l?{fallback:s}:{},children:d})}return c.displayName="LoadableComponent",c}},47901,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let n=e.r(81258)._(e.r(84929));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,n.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(20314),r=e.i(79054),n=e.i(47901),i=e.i(83428),o=e.i(60112),a=e.i(2287),s=e.i(35364);let l=(0,n.default)(()=>e.A(89305).then(e=>e.FileManager),{loadableGenerated:{modules:[15567]},ssr:!1,loading:()=>(0,t.jsx)(u,{})});function u(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(i.Loader2,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function c(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}function d({open:e,onOpenChange:n,onSelect:i,initialPath:u}){let[d,f]=(0,r.useState)([]),[p,h]=(0,r.useState)(""),[y,m]=(0,r.useState)(!1),[g,v]=(0,r.useState)(null),b=(0,r.useRef)(!1),x=(0,r.useCallback)(async e=>{m(!0),v(null);try{let t=await c(e);f(t.entries),h(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";o.toast.error(e)}finally{m(!1)}},[]);(0,r.useEffect)(()=>{e&&!b.current&&(b.current=!0,x(u)),e||(b.current=!1)},[e,u,x]);let w=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&x(t)},[x]),k=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?v(e[0].absolutePath??null):v(null)},[]);function j(){i(null),n(!1)}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||j()},children:(0,t.jsxs)(a.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(a.DialogDescription,{className:"truncate font-mono text-xs",children:p||"Loading..."})]}),(0,t.jsx)("div",{className:"shep-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(l,{files:d.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:y,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:w,onSelectionChange:k,onRefresh:()=>x(p)},p)}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:j,children:"Cancel"}),(0,t.jsx)(s.Button,{variant:"secondary",onClick:function(){p&&(i(p),n(!1))},disabled:!p,children:"Select Current Folder"}),(0,t.jsx)(s.Button,{onClick:function(){g&&(i(g),n(!1))},disabled:!g,children:"Select Folder"})]})]})})}e.s(["ReactFileManagerDialog",()=>d],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("008e12636ed5b99db9fa40acd90c3fc3fa959e57ea",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function n(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",()=>n],78521)},91925,e=>{"use strict";let t=(0,e.i(3645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],91925)},76314,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95889,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(44066)._(e.r(76314)),a=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${i}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},58464,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return y},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return k}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let y="u">typeof performance,m=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},51380,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(58464),i=e.r(53626);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},38670,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},24035,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return b}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(44066),a=e.r(20314),s=o._(e.r(79054)),l=e.r(95889),u=e.r(18152),c=e.r(80764),d=e.r(58464),f=e.r(99267);e.r(24270);let p=e.r(59624),h=e.r(51380),y=e.r(95555);function m(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function g(t){var r;let n,i,o,[l,g]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,s.useRef)(null),{href:x,as:w,children:k,prefetch:j=null,passHref:C,replace:S,shallow:P,scroll:R,onClick:E,onMouseEnter:T,onTouchStart:O,legacyBehavior:M=!1,onNavigate:A,ref:_,unstable_dynamicOnHover:F,...L}=t;n=k,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let I=s.default.useContext(u.AppRouterContext),N=!1!==j,D=!1!==j?null===(r=j)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,{href:z,as:U}=s.default.useMemo(()=>{let e=m(x);return{href:e,as:w?m(w):e}},[x,w]);if(M){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(n)}let $=M?i&&"object"==typeof i&&i.ref:_,B=s.default.useCallback(e=>(null!==I&&(b.current=(0,p.mountLinkInstance)(e,z,I,D,N,g)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[N,z,I,D,g]),K={ref:(0,c.useMergedRef)(B,$),onClick(t){M||"function"!=typeof E||E(t),M&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,i,o,a,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(81574);s.default.startTransition(()=>{d(n||r,o?"replace":"push",a??!0,i.current)})}}(t,z,U,b,S,R,A)},onMouseEnter(e){M||"function"!=typeof T||T(e),M&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),I&&N&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){M||"function"!=typeof O||O(e),M&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),I&&N&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:M&&!C&&("a"!==i.type||"href"in i.props)||(K.href=(0,f.addBasePath)(U)),o=M?s.default.cloneElement(i,K):(0,a.jsx)("a",{...L,...K,children:n}),(0,a.jsx)(v.Provider,{value:l,children:o})}e.r(38670);let v=(0,s.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},89305,e=>{e.v(t=>Promise.all(["static/chunks/6d7b999c99d6d175.js"].map(t=>e.l(t))).then(()=>t(15567)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24270,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},68304,e=>{"use strict";var t=e.i(20314),r=e.i(79054),n=e.i(91967),i=e.i(22528),o=e.i(51080),a=e.i(85995),s=e.i(87620),l=e.i(66033),u=e.i(36589),c=e.i(13123),d="Tabs",[f,p]=(0,i.createContextScope)(d,[o.createRovingFocusGroupScope]),h=(0,o.createRovingFocusGroupScope)(),[y,m]=f(d),g=r.forwardRef((e,r)=>{let{__scopeTabs:n,value:i,onValueChange:o,defaultValue:a,orientation:f="horizontal",dir:p,activationMode:h="automatic",...m}=e,g=(0,l.useDirection)(p),[v,b]=(0,u.useControllableState)({prop:i,onChange:o,defaultProp:a??"",caller:d});return(0,t.jsx)(y,{scope:n,baseId:(0,c.useId)(),value:v,onValueChange:b,orientation:f,dir:g,activationMode:h,children:(0,t.jsx)(s.Primitive.div,{dir:g,"data-orientation":f,...m,ref:r})})});g.displayName=d;var v="TabsList",b=r.forwardRef((e,r)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,l=m(v,n),u=h(n);return(0,t.jsx)(o.Root,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:(0,t.jsx)(s.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...a,ref:r})})});b.displayName=v;var x="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:a,disabled:l=!1,...u}=e,c=m(x,i),d=h(i),f=C(c.baseId,a),p=S(c.baseId,a),y=a===c.value;return(0,t.jsx)(o.Item,{asChild:!0,...d,focusable:!l,active:y,children:(0,t.jsx)(s.Primitive.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":p,"data-state":y?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...u,ref:r,onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(a)}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(a)}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;y||l||!e||c.onValueChange(a)})})})});w.displayName=x;var k="TabsContent",j=r.forwardRef((e,n)=>{let{__scopeTabs:i,value:o,forceMount:l,children:u,...c}=e,d=m(k,i),f=C(d.baseId,o),p=S(d.baseId,o),h=o===d.value,y=r.useRef(h);return r.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(a.Presence,{present:l||h,children:({present:r})=>(0,t.jsx)(s.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:p,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:y.current?"0s":void 0},children:r&&u})})});function C(e,t){return`${e}-trigger-${t}`}function S(e,t){return`${e}-content-${t}`}j.displayName=k,e.s(["Content",()=>j,"List",()=>b,"Root",()=>g,"Tabs",()=>g,"TabsContent",()=>j,"TabsList",()=>b,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>p],43133);var P=e.i(43133),P=P,R=e.i(31777);let E=P.Root,T=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(P.List,{ref:n,className:(0,R.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));T.displayName=P.List.displayName;let O=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(P.Trigger,{ref:n,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...r}));O.displayName=P.Trigger.displayName;let M=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(P.Content,{ref:n,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));M.displayName=P.Content.displayName,e.s(["Tabs",()=>E,"TabsContent",()=>M,"TabsList",()=>T,"TabsTrigger",()=>O],68304)},10942,94819,e=>{"use strict";var t=e.i(80986);e.s(["CircleCheck",()=>t.default],10942);let r=(0,e.i(3645).default)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Ban",()=>r],94819)},32494,e=>{"use strict";let t=(0,e.i(3645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},79687,e=>{"use strict";var t=e.i(14748);e.s(["AlertCircle",()=>t.default])},39443,e=>{"use strict";var t=e.i(20314),r=e.i(79054);let n=(0,e.i(18354).createLogger)("[SSE]");function i(e,t,r,n){if("u"<typeof EventSource)return()=>{};let i=null,o=!1,a=1e3,s=null,l=null;return!function u(){o||(i=new EventSource(e?`/api/agent-events?runId=${encodeURIComponent(e)}`:"/api/agent-events"),n("connecting"),i.onopen=()=>{n("connected"),l=setTimeout(()=>{l=null,a=1e3},5e3)},i.onerror=()=>{i?.close(),i=null,n("disconnected"),null!==l&&(clearTimeout(l),l=null);let e=a;a=Math.min(2*e,3e4),s=setTimeout(()=>{s=null,u()},e)},i.addEventListener("notification",e=>{let n=JSON.parse(e.data);t(e=>{let t=[...e,n];return t.length>500?t.slice(-250):t}),r(n)}))}(),()=>{o=!0,null!==s&&(clearTimeout(s),s=null),null!==l&&(clearTimeout(l),l=null),i&&(i.close(),i=null)}}let o=(0,r.createContext)(null);function a({children:e,runId:a}){let{events:s,lastEvent:l,connectionStatus:u}=function(e){let[t,o]=(0,r.useState)([]),[a,s]=(0,r.useState)(null),[l,u]=(0,r.useState)("disconnected"),c=e?.runId,d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=e.data;if(t&&"object"==typeof t)if("notification"===t.type){let e=t.data;n.debug("event received:",e.eventType,e),o(t=>{let r=[...t,e];return r.length>500?r.slice(-250):r}),s(e)}else"status"===t.type&&u(t.status)},[]);return(0,r.useEffect)(()=>{let e="u">typeof location&&new URLSearchParams(location.search).has("sse");if(!navigator.serviceWorker||e)return i(c,o,s,u);let t=!1,r={current:void 0};function n(e){t||(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}function a(){if(t)return;let e=navigator.serviceWorker.controller;e&&(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}return navigator.serviceWorker.addEventListener("message",f),navigator.serviceWorker.addEventListener("controllerchange",a),navigator.serviceWorker.register("/agent-events-sw.js",{scope:"/"}).then(e=>{if(t)return;let a=e.active??e.installing??e.waiting;if(!a){r.current=i(c,o,s,u);return}if("activated"===a.state)n(a);else{let e=()=>{"activated"===a.state&&(a.removeEventListener("statechange",e),n(a))};a.addEventListener("statechange",e)}}).catch(()=>{t||(r.current=i(c,o,s,u))}),()=>{t=!0,navigator.serviceWorker.removeEventListener("message",f),navigator.serviceWorker.removeEventListener("controllerchange",a),d.current?.postMessage({type:"unsubscribe"}),d.current=null,r.current?.()}},[c,f]),{events:t,lastEvent:a,connectionStatus:l}}({runId:a}),c=(0,r.useMemo)(()=>({events:s,lastEvent:l,connectionStatus:u}),[s,l,u]);return(0,t.jsx)(o.Provider,{value:c,children:e})}function s(){let e=(0,r.useContext)(o);if(!e)throw Error("useAgentEventsContext must be used within an <AgentEventsProvider>");return e}e.s(["AgentEventsProvider",()=>a,"useAgentEventsContext",()=>s],39443)},3214,e=>{"use strict";let t=(0,e.i(3645).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],3214)},80986,e=>{"use strict";let t=(0,e.i(3645).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",()=>t])},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t],30090),e.s(["CircleX",()=>t],54277)},51080,e=>{"use strict";var t=e.i(79054),r=e.i(91967),n=e.i(87342),i=e.i(5978),o=e.i(22528),a=e.i(13123),s=e.i(87620),l=e.i(29297),u=e.i(36589),c=e.i(66033),d=e.i(20314),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[y,m,g]=(0,n.createCollection)(h),[v,b]=(0,o.createContextScope)(h,[g]),[x,w]=v(h),k=t.forwardRef((e,t)=>(0,d.jsx)(y.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(y.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(j,{...e,ref:t})})}));k.displayName=h;var j=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:y=!1,dir:g,currentTabStopId:v,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:w,onEntryFocus:k,preventScrollOnEntryFocus:j=!1,...C}=e,S=t.useRef(null),P=(0,i.useComposedRefs)(n,S),E=(0,c.useDirection)(g),[T,O]=(0,u.useControllableState)({prop:v,defaultProp:b??null,onChange:w,caller:h}),[M,A]=t.useState(!1),_=(0,l.useCallbackRef)(k),F=m(o),L=t.useRef(!1),[I,N]=t.useState(0);return t.useEffect(()=>{let e=S.current;if(e)return e.addEventListener(f,_),()=>e.removeEventListener(f,_)},[_]),(0,d.jsx)(x,{scope:o,orientation:a,dir:E,loop:y,currentTabStopId:T,onItemFocus:t.useCallback(e=>O(e),[O]),onItemShiftTab:t.useCallback(()=>A(!0),[]),onFocusableItemAdd:t.useCallback(()=>N(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>N(e=>e-1),[]),children:(0,d.jsx)(s.Primitive.div,{tabIndex:M||0===I?-1:0,"data-orientation":a,...C,ref:P,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!M){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=F().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),j)}}L.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>A(!1))})})}),C="RovingFocusGroupItem",S=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:u,children:c,...f}=e,p=(0,a.useId)(),h=u||p,g=w(C,i),v=g.currentTabStopId===h,b=m(i),{onFocusableItemAdd:x,onFocusableItemRemove:k,currentTabStopId:j}=g;return t.useEffect(()=>{if(o)return x(),()=>k()},[o,x,k]),(0,d.jsx)(y.ItemSlot,{scope:i,id:h,focusable:o,active:l,children:(0,d.jsx)(s.Primitive.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...f,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return P[i]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=g.loop?(r=i,n=o+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(o+1)}setTimeout(()=>R(i))}}),children:"function"==typeof c?c({isCurrentTabStop:v,hasTabStop:null!=j}):c})})});S.displayName=C;var P={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>S,"Root",()=>k,"createRovingFocusGroupScope",()=>b])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},66033,e=>{"use strict";var t=e.i(79054);e.i(20314);var r=t.createContext(void 0);function n(e){let n=t.useContext(r);return e||n||"ltr"}e.s(["useDirection",()=>n])},87342,e=>{"use strict";var t=e.i(79054),r=e.i(22528),n=e.i(5978),i=e.i(86874),o=e.i(20314);function a(e){let a=e+"CollectionProvider",[s,l]=(0,r.createContextScope)(a),[u,c]=s(a,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,i=t.default.useRef(null),a=t.default.useRef(new Map).current;return(0,o.jsx)(u,{scope:r,itemMap:a,collectionRef:i,children:n})};d.displayName=a;let f=e+"CollectionSlot",p=(0,i.createSlot)(f),h=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e,a=c(f,r),s=(0,n.useComposedRefs)(t,a.collectionRef);return(0,o.jsx)(p,{ref:s,children:i})});h.displayName=f;let y=e+"CollectionItemSlot",m="data-radix-collection-item",g=(0,i.createSlot)(y),v=t.default.forwardRef((e,r)=>{let{scope:i,children:a,...s}=e,l=t.default.useRef(null),u=(0,n.useComposedRefs)(r,l),d=c(y,i);return t.default.useEffect(()=>(d.itemMap.set(l,{ref:l,...s}),()=>void d.itemMap.delete(l))),(0,o.jsx)(g,{...{[m]:""},ref:u,children:a})});return v.displayName=y,[{Provider:d,Slot:h,ItemSlot:v},function(r){let n=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}var s=new WeakMap;function l(e,t){var r,n;let i,o,a;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,i=r.length,(a=(o=u(n))>=0?o:i+o)<0||a>=i?-1:a);return -1===s?void 0:e[s]}function u(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],s.set(this,!0)}set(e,t){return s.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),o=this.#e.length,a=u(e),s=a>=0?a:o+a,l=s<0||s>=o?-1:s;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let c=this.size+ +!i;a<0&&s++;let d=[...this.#e],f=!1;for(let e=s;e<c;e++)if(s===e){let o=d[e];d[e]===t&&(o=d[e+1]),i&&this.delete(t),n=this.get(o),this.set(t,r)}else{f||d[e-1]!==t||(f=!0);let r=d[f?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=l(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=l(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return l(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>a])},27069,e=>{"use strict";function t(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",()=>t])},81975,e=>{"use strict";let t=(0,e.i(3645).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",()=>t],81975)},82569,5147,e=>{"use strict";let t=(0,e.i(3645).default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);e.s(["Github",()=>t],82569);var r=e.i(20314),n=e.i(79054);let i={"action-required":"action-needed",running:"in-progress",done:"done",blocked:"blocked",pending:"pending",error:"error",creating:null,deleting:null,archived:null};function o(e){return i[e]}let a=(0,n.createContext)(null);function s({children:e}){let[t,i]=(0,n.useState)([]),[o,s]=(0,n.useState)(!1),l=(0,n.useMemo)(()=>({features:t,setFeatures:i,hasRepositories:o,setHasRepositories:s}),[t,o]);return(0,r.jsx)(a.Provider,{value:l,children:e})}function l(){let e=(0,n.useContext)(a);if(!e)throw Error("useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>");return e}e.s(["SidebarFeaturesProvider",()=>s,"mapNodeStateToSidebarStatus",()=>o,"useSidebarFeaturesContext",()=>l],5147)},98127,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function n({className:e,type:n,...i}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","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",e),...i})}e.s(["Input",()=>n])},66459,e=>{"use strict";let t=(0,e.i(3645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},12103,e=>{"use strict";let t=(0,e.i(3645).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",()=>t],12103)},83241,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let n=e.r(9328);function i({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},90891,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},31218,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return l}});let n=e.r(20314),i=e.r(26036),o=e.r(58988),a=e.r(90891),s=e.r(22193);function l({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let l=(0,s.getDeploymentIdQueryOrEmptyString)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${l}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},84929,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}});let n=e.r(20314),i=e.r(79054),o=e.r(83241),a=e.r(31218);function s(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},u=function(e){let t={...l,...e},r=(0,i.lazy)(()=>t.loader().then(s)),u=t.loading;function c(e){let s=u?(0,n.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,c=l?i.Suspense:i.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(c,{...l?{fallback:s}:{},children:d})}return c.displayName="LoadableComponent",c}},47901,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let n=e.r(81258)._(e.r(84929));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,n.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(20314),r=e.i(79054),n=e.i(47901),i=e.i(83428),o=e.i(60112),a=e.i(2287),s=e.i(35364);let l=(0,n.default)(()=>e.A(89305).then(e=>e.FileManager),{loadableGenerated:{modules:[15567]},ssr:!1,loading:()=>(0,t.jsx)(u,{})});function u(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(i.Loader2,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function c(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}function d({open:e,onOpenChange:n,onSelect:i,initialPath:u}){let[d,f]=(0,r.useState)([]),[p,h]=(0,r.useState)(""),[y,m]=(0,r.useState)(!1),[g,v]=(0,r.useState)(null),b=(0,r.useRef)(!1),x=(0,r.useCallback)(async e=>{m(!0),v(null);try{let t=await c(e);f(t.entries),h(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";o.toast.error(e)}finally{m(!1)}},[]);(0,r.useEffect)(()=>{e&&!b.current&&(b.current=!0,x(u)),e||(b.current=!1)},[e,u,x]);let w=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&x(t)},[x]),k=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?v(e[0].absolutePath??null):v(null)},[]);function j(){i(null),n(!1)}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||j()},children:(0,t.jsxs)(a.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(a.DialogDescription,{className:"truncate font-mono text-xs",children:p||"Loading..."})]}),(0,t.jsx)("div",{className:"shep-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(l,{files:d.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:y,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:w,onSelectionChange:k,onRefresh:()=>x(p)},p)}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:j,children:"Cancel"}),(0,t.jsx)(s.Button,{variant:"secondary",onClick:function(){p&&(i(p),n(!1))},disabled:!p,children:"Select Current Folder"}),(0,t.jsx)(s.Button,{onClick:function(){g&&(i(g),n(!1))},disabled:!g,children:"Select Folder"})]})]})})}e.s(["ReactFileManagerDialog",()=>d],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("0046e8f186c74a36823191705af66dd576aa8fbcd7",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function n(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",()=>n],78521)},91925,e=>{"use strict";let t=(0,e.i(3645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],91925)},76314,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95889,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(44066)._(e.r(76314)),a=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${i}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},58464,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return y},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return k}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let y="u">typeof performance,m=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},51380,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(58464),i=e.r(53626);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},38670,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},24035,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return b}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let o=e.r(44066),a=e.r(20314),s=o._(e.r(79054)),l=e.r(95889),u=e.r(18152),c=e.r(80764),d=e.r(58464),f=e.r(99267);e.r(24270);let p=e.r(59624),h=e.r(51380),y=e.r(95555);function m(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function g(t){var r;let n,i,o,[l,g]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,s.useRef)(null),{href:x,as:w,children:k,prefetch:j=null,passHref:C,replace:S,shallow:P,scroll:R,onClick:E,onMouseEnter:T,onTouchStart:O,legacyBehavior:M=!1,onNavigate:A,ref:_,unstable_dynamicOnHover:F,...L}=t;n=k,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let I=s.default.useContext(u.AppRouterContext),N=!1!==j,D=!1!==j?null===(r=j)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,{href:z,as:U}=s.default.useMemo(()=>{let e=m(x);return{href:e,as:w?m(w):e}},[x,w]);if(M){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(n)}let $=M?i&&"object"==typeof i&&i.ref:_,B=s.default.useCallback(e=>(null!==I&&(b.current=(0,p.mountLinkInstance)(e,z,I,D,N,g)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[N,z,I,D,g]),K={ref:(0,c.useMergedRef)(B,$),onClick(t){M||"function"!=typeof E||E(t),M&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,i,o,a,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(81574);s.default.startTransition(()=>{d(n||r,o?"replace":"push",a??!0,i.current)})}}(t,z,U,b,S,R,A)},onMouseEnter(e){M||"function"!=typeof T||T(e),M&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),I&&N&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){M||"function"!=typeof O||O(e),M&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),I&&N&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:M&&!C&&("a"!==i.type||"href"in i.props)||(K.href=(0,f.addBasePath)(U)),o=M?s.default.cloneElement(i,K):(0,a.jsx)("a",{...L,...K,children:n}),(0,a.jsx)(v.Provider,{value:l,children:o})}e.r(38670);let v=(0,s.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},89305,e=>{e.v(t=>Promise.all(["static/chunks/6d7b999c99d6d175.js"].map(t=>e.l(t))).then(()=>t(15567)))}]);
@@ -1,3 +0,0 @@
1
- module.exports=[96853,71716,a=>{"use strict";var b=a.i(25700);let c=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["default",()=>c],96853);let d=(0,b.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",()=>d],71716)},98410,a=>{"use strict";let b=(0,a.i(25700).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",()=>b],98410)},4019,67075,a=>{"use strict";let b=(0,a.i(25700).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Circle",()=>b],4019);var c=a.i(2811);a.s(["CheckCircle2",()=>c.default],67075)},3195,a=>{"use strict";let b=(0,a.i(25700).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);a.s(["FolderOpen",()=>b],3195)},50488,80237,31760,65123,a=>{"use strict";let b=(0,a.i(25700).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);a.s(["Code2",()=>b],50488);var c=a.i(25674);let d=(0,c.createServerReference)("40821353c057acf532205ccd271596ecbf39d23f55",c.callServer,void 0,c.findSourceMapURL,"openIde");a.s(["openIde",()=>d],80237);let e=(0,c.createServerReference)("40a7e0ffa0be60e16751b98bb2339d0192856dd6d1",c.callServer,void 0,c.findSourceMapURL,"openShell");a.s(["openShell",()=>e],31760);let f=(0,c.createServerReference)("40baa8f002e993f3d593907f75594e573bae8eac3d",c.callServer,void 0,c.findSourceMapURL,"openFolder");a.s(["openFolder",()=>f],65123)},3942,a=>{"use strict";let b=(0,a.i(25700).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);a.s(["Zap",()=>b],3942)},64005,a=>{"use strict";var b=a.i(96960);function c(a){let c=b.useRef({value:a,previous:a});return b.useMemo(()=>(c.current.value!==a&&(c.current.previous=c.current.value,c.current.value=a),c.current.previous),[a])}a.s(["usePrevious",()=>c])},3410,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",()=>b],3410)},94132,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",()=>b],94132)},10606,a=>{"use strict";var b=a.i(51969);a.s(["CheckIcon",()=>b.default])},72016,51969,a=>{"use strict";let b=(0,a.i(25700).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["default",()=>b],51969),a.s(["Check",()=>b],72016)},71238,a=>{"use strict";let b=(0,a.i(25700).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",()=>b],71238)},63698,a=>{"use strict";let b=(0,a.i(25700).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",()=>b],63698)},78454,a=>{"use strict";a.i(24255),a.s([])},38702,16223,a=>{"use strict";var b=a.i(10973),c=a.i(85536);function d({icon:a,title:d,description:e,action:f,className:g,...h}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",g),...h,children:[a?(0,b.jsx)("div",{className:"text-muted-foreground",children:a}):null,(0,b.jsx)("h3",{className:"text-lg font-semibold",children:d}),e?(0,b.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:e}):null,f?(0,b.jsx)("div",{className:"mt-2",children:f}):null]})}a.s(["EmptyState",()=>d],16223),a.s([],38702)},84587,73590,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("00e44cf80802ff5a47636c52f079cfa728891a73de",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],84587);let d=(0,b.createServerReference)("6067ebf1616f5eea48ecda937f9c50216d8f2b6cde",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],73590)},85237,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("40d6e21be9b19d3be4739b1a30f950154c0cae42f9",b.callServer,void 0,b.findSourceMapURL,"addRepository");a.s(["addRepository",()=>c])},55628,a=>{"use strict";var b=a.i(96960),c=a.i(80237),d=a.i(31760),e=a.i(65123),f=a.i(25674);let g=(0,f.createServerReference)("401ff068440fa0360634ca437fb867eeae6e5ed127",f.callServer,void 0,f.findSourceMapURL,"syncRepository");function h(a){let[f,h]=(0,b.useState)(!1),[i,j]=(0,b.useState)(!1),[k,l]=(0,b.useState)(!1),[m,n]=(0,b.useState)(!1),[o,p]=(0,b.useState)(null),[q,r]=(0,b.useState)(null),[s,t]=(0,b.useState)(null),[u,v]=(0,b.useState)(null),w=(0,b.useRef)(null),x=(0,b.useRef)(null),y=(0,b.useRef)(null),z=(0,b.useRef)(null);(0,b.useEffect)(()=>()=>{w.current&&clearTimeout(w.current),x.current&&clearTimeout(x.current),y.current&&clearTimeout(y.current),z.current&&clearTimeout(z.current)},[]);let A=(0,b.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let a=await b();if(!a.success){let b=a.error??"An unexpected error occurred";d(b),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,b.useCallback)(()=>A(()=>(0,c.openIde)({repositoryPath:a.repositoryPath}),h,p,w,f),[A,f,a]),openInShell:(0,b.useCallback)(()=>A(()=>(0,d.openShell)({repositoryPath:a.repositoryPath}),j,r,x,i),[A,i,a]),openFolder:(0,b.useCallback)(()=>A(()=>(0,e.openFolder)(a.repositoryPath),l,t,y,k),[A,k,a]),syncMain:(0,b.useCallback)(()=>A(()=>g(a.repositoryId??""),n,v,z,m),[A,m,a]),ideLoading:f,shellLoading:i,folderLoading:k,syncLoading:m,ideError:o,shellError:q,folderError:s,syncError:u}}a.s(["useRepositoryActions",()=>h],55628)}];
2
-
3
- //# sourceMappingURL=_ba037519._.js.map
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17840,e=>{"use strict";var t=e.i(79054),r=e.i(31406),n=e.i(60112),a=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),o=a((e,t)=>{var r=Object.defineProperty,n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),a=(e,t,n)=>{let a;return(a="symbol"!=typeof t?t+"":t)in e?r(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n},o=n((e,t)=>{function r(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function o(e,t,r,n){var a=""+t,o=""+r;if(!e&&a>o){var s=a;a=o,o=s}return a+"\x01"+o+"\x01"+(void 0===n?"\0":n)}function s(e,t){return o(e,t.v,t.w,t.name)}t.exports=class{constructor(e){a(this,"_isDirected",!0),a(this,"_isMultigraph",!1),a(this,"_isCompound",!1),a(this,"_label"),a(this,"_defaultNodeLabelFn",()=>{}),a(this,"_defaultEdgeLabelFn",()=>{}),a(this,"_nodes",{}),a(this,"_in",{}),a(this,"_preds",{}),a(this,"_out",{}),a(this,"_sucs",{}),a(this,"_edgeObjs",{}),a(this,"_edgeLabels",{}),a(this,"_nodeCount",0),a(this,"_edgeCount",0),a(this,"_parent"),a(this,"_children"),e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(a){var o=r.parent(a);return void 0===o||t.hasNode(o)?(n[a]=o,o):o in n?n[o]:e(o)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,a){return n.length>1?r.setEdge(e,a,t):r.setEdge(e,a),a}),this}setEdge(){var e,t,n,a,s=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,t=i.w,n=i.name,2==arguments.length&&(a=arguments[1],s=!0)):(e=i,t=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),e=""+e,t=""+t,void 0!==n&&(n=""+n);var l=o(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return s&&(this._edgeLabels[l]=a),this;if(void 0!==n&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?a:this._defaultEdgeLabelFn(e,t,n);var d=function(e,t,r,n){var a=""+t,o=""+r;if(!e&&a>o){var s=a;a=o,o=s}var i={v:a,w:o};return n&&(i.name=n),i}(this._isDirected,e,t,n);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[l]=d,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][l]=d,this._out[e][l]=d,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?s(this._isDirected,arguments[0]):o(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?s(this._isDirected,arguments[0]):o(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var a=1==arguments.length?s(this._isDirected,arguments[0]):o(this._isDirected,e,t,r),i=this._edgeObjs[a];return i&&(e=i.v,t=i.w,delete this._edgeLabels[a],delete this._edgeObjs[a],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][a],delete this._out[e][a],this._edgeCount--),this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}filterEdges(e,t,r){if(e){var n=Object.values(e);return r?n.filter(function(e){return e.v===t&&e.w===r||e.v===r&&e.w===t}):n}}}}),s=n((e,t)=>{t.exports="3.0.2"}),i=n((e,t)=>{t.exports={Graph:o(),version:s()}}),l=n((e,t)=>{var r=o();t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),a={v:e};return void 0!==r&&(a.value=r),void 0!==n&&(a.parent=n),a}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}}),d=n((e,t)=>{t.exports=function(e,t,n,a){return function(e,t,r,n){var a={},o=!0,s=0,i=e.nodes(),l=function(e){var t=r(e);a[e.v].distance+t<a[e.w].distance&&(a[e.w]={distance:a[e.v].distance+t,predecessor:e.v},o=!0)},d=function(){i.forEach(function(e){n(e).forEach(function(t){var r=t.v===e?t.v:t.w,n=r===t.v?t.w:t.v;l({v:r,w:n})})})};i.forEach(function(e){a[e]={distance:e===t?0:1/0}});for(var c=i.length,u=1;u<c&&(o=!1,s++,d(),o);u++);if(s===c-1&&(o=!1,d(),o))throw Error("The graph contains a negative weight cycle");return a}(e,String(t),n||r,a||function(t){return e.outEdges(t)})};var r=()=>1}),c=n((e,t)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(a){t=[],function n(a){Object.hasOwn(r,a)||(r[a]=!0,t.push(a),e.successors(a).forEach(n),e.predecessors(a).forEach(n))}(a),t.length&&n.push(t)}),n}}),u=n((e,t)=>{t.exports=class{constructor(){a(this,"_arr",[]),a(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,a=n.length;return r[e]=a,n.push({key:e,priority:t}),this._decrease(a),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,a=e;r<t.length&&(a=t[r].priority<t[a].priority?r:a,n<t.length&&(a=t[n].priority<t[a].priority?n:a),a!==e&&(this._swap(e,a),this._heapify(a)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,a=r[e],o=r[t];r[e]=o,r[t]=a,n[o.key]=e,n[a.key]=t}}}),h=n((e,t)=>{var r=u();t.exports=function(e,t,a,o){return function(e,t,n,a){var o,s,i={},l=new r,d=function(e){var t=e.v!==o?e.v:e.w,r=i[t],a=n(e),d=s.distance+a;if(a<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+a);d<r.distance&&(r.distance=d,r.predecessor=o,l.decrease(t,d))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;i[e]={distance:r},l.add(e,r)});l.size()>0&&(s=i[o=l.removeMin()]).distance!==1/0;)a(o).forEach(d);return i}(e,String(t),a||n,o||function(t){return e.outEdges(t)})};var n=()=>1}),f=n((e,t)=>{var r=h();t.exports=function(e,t,n){return e.nodes().reduce(function(a,o){return a[o]=r(e,o,t,n),a},{})}}),p=n((e,t)=>{t.exports=function(e,t,r){if(void 0!==e[t].predecessor)throw Error("Invalid source vertex");if(void 0===e[r].predecessor&&r!==t)throw Error("Invalid destination vertex");return{weight:e[r].distance,path:function(e,t,r){for(var n=[],a=r;a!==t;)n.push(a),a=e[a].predecessor;return n.push(t),n.reverse()}(e,t,r)}}}),g=n((e,t)=>{t.exports=function(e){var t=0,r=[],n={},a=[];return e.nodes().forEach(function(o){Object.hasOwn(n,o)||function o(s){var i=n[s]={onStack:!0,lowlink:t,index:t++};if(r.push(s),e.successors(s).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(i.lowlink=Math.min(i.lowlink,n[e].index)):(o(e),i.lowlink=Math.min(i.lowlink,n[e].lowlink))}),i.lowlink===i.index){var l,d=[];do n[l=r.pop()].onStack=!1,d.push(l);while(s!==l)a.push(d)}}(o)}),a}}),m=n((e,t)=>{var r=g();t.exports=function(e){return r(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}}),x=n((e,t)=>{t.exports=function(e,t,n){var a,o,s,i,l;return a=e,o=t||r,s=n||function(t){return e.outEdges(t)},i={},(l=a.nodes()).forEach(function(e){i[e]={},i[e][e]={distance:0},l.forEach(function(t){e!==t&&(i[e][t]={distance:1/0})}),s(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=o(t);i[e][r]={distance:n,predecessor:e}})}),l.forEach(function(e){var t=i[e];l.forEach(function(r){var n=i[r];l.forEach(function(r){var a=n[e],o=t[r],s=n[r],i=a.distance+o.distance;i<s.distance&&(s.distance=i,s.predecessor=o.predecessor)})})}),i};var r=()=>1}),v=n((e,t)=>{function r(e){var t={},r={},a=[];if(e.sinks().forEach(function o(s){if(Object.hasOwn(r,s))throw new n;Object.hasOwn(t,s)||(r[s]=!0,t[s]=!0,e.predecessors(s).forEach(o),delete r[s],a.push(s))}),Object.keys(t).length!==e.nodeCount())throw new n;return a}var n=class extends Error{constructor(){super(...arguments)}};t.exports=r,r.CycleException=n}),b=n((e,t)=>{var r=v();t.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}}),y=n((e,t)=>{t.exports=function(e,t,r,n,a){Array.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),s={};return t.forEach(function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);a=function e(t,r,n,a,o,s,i){return Object.hasOwn(a,r)||(a[r]=!0,n||(i=s(i,r)),o(r).forEach(function(r){i=e(t,r,n,a,o,s,i)}),n&&(i=s(i,r))),i}(e,t,"post"===r,s,o,n,a)}),a}}),w=n((e,t)=>{var r=y();t.exports=function(e,t,n){return r(e,t,n,function(e,t){return e.push(t),e},[])}}),k=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"post")}}),j=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"pre")}}),E=n((e,t)=>{var r=o(),n=u();t.exports=function(e,t){var a,o=new r,s={},i=new n;function l(e){var r=e.v===a?e.w:e.v,n=i.priority(r);if(void 0!==n){var o=t(e);o<n&&(s[r]=a,i.decrease(r,o))}}if(0===e.nodeCount())return o;e.nodes().forEach(function(e){i.add(e,1/0),o.setNode(e)}),i.decrease(e.nodes()[0],0);for(var d=!1;i.size()>0;){if(Object.hasOwn(s,a=i.removeMin()))o.setEdge(a,s[a]);else{if(d)throw Error("Input graph is not connected: "+e);d=!0}e.nodeEdges(a).forEach(l)}return o}}),N=n((e,t)=>{var r=h(),n=d();t.exports=function(e,t,a,o){return function(e,t,a,o){if(void 0===a)return r(e,t,a,o);for(var s=!1,i=e.nodes(),l=0;l<i.length;l++){for(var d=o(i[l]),c=0;c<d.length;c++){var u=d[c],h=u.v===i[l]?u.v:u.w,f=h===u.v?u.w:u.v;0>a({v:h,w:f})&&(s=!0)}if(s)return n(e,t,a,o)}return r(e,t,a,o)}(e,t,a,o||function(t){return e.outEdges(t)})}}),C=n((e,t)=>{t.exports={bellmanFord:d(),components:c(),dijkstra:h(),dijkstraAll:f(),extractPath:p(),findCycles:m(),floydWarshall:x(),isAcyclic:b(),postorder:k(),preorder:j(),prim:E(),shortestPaths:N(),reduce:y(),tarjan:g(),topsort:v()}}),_=i();t.exports={Graph:_.Graph,json:l(),alg:C(),version:_.version}}),s=a((e,t)=>{function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}}}),i=a((e,t)=>{var r=o().Graph,n=s();t.exports=function(e,t){var o,s;let d,c,u,h,f;if(1>=e.nodeCount())return[];let p=(o=e,s=t||a,d=new r,c=0,u=0,o.nodes().forEach(e=>{d.setNode(e,{v:e,in:0,out:0})}),o.edges().forEach(e=>{let t=d.edge(e.v,e.w)||0,r=s(e);d.setEdge(e.v,e.w,t+r),u=Math.max(u,d.node(e.v).out+=r),c=Math.max(c,d.node(e.w).in+=r)}),h=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(u+c+3).map(()=>new n),f=c+1,d.nodes().forEach(e=>{l(h,f,d.node(e))}),{graph:d,buckets:h,zeroIdx:f});return(function(e,t,r){let n=[],a=t[t.length-1],o=t[0],s;for(;e.nodeCount();){for(;s=o.dequeue();)i(e,t,r,s);for(;s=a.dequeue();)i(e,t,r,s);if(e.nodeCount()){for(let a=t.length-2;a>0;--a)if(s=t[a].dequeue()){n=n.concat(i(e,t,r,s,!0));break}}}return n})(p.graph,p.buckets,p.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};var a=()=>1;function i(e,t,r,n,a){let o=a?[]:void 0;return e.inEdges(n.v).forEach(n=>{let s=e.edge(n),i=e.node(n.v);a&&o.push({v:n.v,w:n.w}),i.out-=s,l(t,r,i)}),e.outEdges(n.v).forEach(n=>{let a=e.edge(n),o=n.w,s=e.node(o);s.in-=a,l(t,r,s)}),e.removeNode(n.v),o}function l(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)}}),l=a((e,t)=>{var r=o().Graph;function n(e,t,r,n){for(var a=n;e.hasNode(a);)a=l(n);return r.dummy=t,e.setNode(a,r),a}t.exports={addBorderNode:function(e,t,r,a){let o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=a),n(e,"border",o,t)},addDummyNode:n,applyWithChunking:a,asNonCompoundGraph:function(e){let t=new r({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},buildLayerMatrix:function(e){let t=d(s(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),a=n.rank;void 0!==a&&(t[a][n.order]=r)}),t},intersectRect:function(e,t){let r,n,a=e.x,o=e.y,s=t.x-a,i=t.y-o,l=e.width/2,d=e.height/2;if(!s&&!i)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(i)*l>Math.abs(s)*d?(i<0&&(d=-d),r=d*s/i,n=d):(s<0&&(l=-l),r=l,n=l*i/s),{x:a+r,y:o+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:s,normalizeRanks:function(e){let t=a(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},range:d,removeEmptyRanks:function(e){let t=a(Math.min,e.nodes().map(t=>e.node(t).rank).filter(e=>void 0!==e)),r=[];e.nodes().forEach(n=>{let a=e.node(n).rank-t;r[a]||(r[a]=[]),r[a].push(n)});let n=0,o=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%o!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new r().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},a=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+a.weight,minlen:Math.max(n.minlen,a.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return c(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:l,zipObject:c};function a(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let a=e.slice(n,n+t);r.push(a)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function s(e){return a(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}var i=0;function l(e){return e+""+ ++i}function d(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let a=[];for(let t=e;n(t);t+=r)a.push(t);return a}function c(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}}),d=a((e,t)=>{var r=i(),n=l().uniqueId;t.exports={run:function(e){var t,a;let o,s,i;("greedy"===e.graph().acyclicer?r(e,(t=e,e=>t.edge(e).weight)):(o=[],s={},i={},(a=e).nodes().forEach(function e(t){Object.hasOwn(i,t)||(i[t]=!0,s[t]=!0,a.outEdges(t).forEach(t=>{Object.hasOwn(s,t.w)?o.push(t):e(t.w)}),delete s[t])}),o)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n("rev"))})},undo:function(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)}})}}}),c=a((e,t)=>{var r=l();t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let n,a,o,s=t.v,i=e.node(s).rank,l=t.w,d=e.node(l).rank,c=t.name,u=e.edge(t),h=u.labelRank;if(d!==i+1){for(e.removeEdge(t),o=0,++i;i<d;++o,++i)u.points=[],a={width:0,height:0,edgeLabel:u,edgeObj:t,rank:i},n=r.addDummyNode(e,"edge",a,"_d"),i===h&&(a.width=u.width,a.height=u.height,a.dummy="edge-label",a.labelpos=u.labelpos),e.setEdge(s,n,{weight:u.weight},c),0===o&&e.graph().dummyChains.push(n),s=n;e.setEdge(s,l,{weight:u.weight},c)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,a;for(e.setEdge(r.edgeObj,n);r.dummy;)a=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=a,r=e.node(t)})}}}),u=a((e,t)=>{var{applyWithChunking:r}=l();t.exports={longestPath:function(e){var t={};e.sources().forEach(function n(a){var o=e.node(a);if(Object.hasOwn(t,a))return o.rank;t[a]=!0;var s=r(Math.min,e.outEdges(a).map(t=>null==t?1/0:n(t.w)-e.edge(t).minlen));return s===1/0&&(s=0),o.rank=s})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}),h=a((e,t)=>{var r=o().Graph,n=u().slack;t.exports=function(e){var t,a,o,s,i=new r({directed:!1}),l=e.nodes()[0],d=e.nodeCount();for(i.setNode(l,{});t=i,a=e,t.nodes().forEach(function e(r){a.nodeEdges(r).forEach(o=>{var s=o.v,i=r===s?o.w:s;t.hasNode(i)||n(a,o)||(t.setNode(i,{}),t.setEdge(r,i,{}),e(i))})}),t.nodeCount()<d;)o=function(e,t){return t.edges().reduce((r,a)=>{let o=1/0;return e.hasNode(a.v)!==e.hasNode(a.w)&&(o=n(t,a)),o<r[0]?[o,a]:r},[1/0,null])[1]}(i,e),s=i.hasNode(o.v)?n(e,o):-n(e,o),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(i,e,s);return i}}),f=a((e,t)=>{var r=h(),n=u().slack,a=u().longestPath,s=o().alg.preorder,i=o().alg.postorder,d=l().simplify;function c(e){a(e=d(e));var t,n,o=r(e);for(g(o),f(o,e);t=m(o);)n=x(o,e,t),v(o,e,t,n)}function f(e,t){var r=i(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,a,o,s;return n=e,a=t,o=r,s=n.node(o).parent,void(n.edge(o,s).cutvalue=p(n,a,o))})}function p(e,t,r){var n=e.node(r).parent,a=!0,o=t.edge(r,n),s=0;return o||(a=!1,o=t.edge(n,r)),s=o.weight,t.nodeEdges(r).forEach(o=>{var i=o.v===r,l=i?o.w:o.v;if(l!==n){var d,c,u,h=i===a,f=t.edge(o).weight;if(s+=h?f:-f,d=e,c=r,u=l,d.hasEdge(c,u)){var p=e.edge(r,l).cutvalue;s+=h?-p:p}}}),s}function g(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,a,o){var s=n,i=t.node(a);return r[a]=!0,t.neighbors(a).forEach(o=>{Object.hasOwn(r,o)||(n=e(t,r,n,o,a))}),i.low=s,i.lim=n++,o?i.parent=o:delete i.parent,n}(e,{},1,t)}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function x(e,t,r){var a=r.v,o=r.w;t.hasEdge(a,o)||(a=r.w,o=r.v);var s=e.node(a),i=e.node(o),l=s,d=!1;return s.lim>i.lim&&(l=i,d=!0),t.edges().filter(t=>d===b(e,e.node(t.v),l)&&d!==b(e,e.node(t.w),l)).reduce((e,r)=>n(t,r)<n(t,e)?r:e)}function v(e,t,r,n){var a,o,i,l,d=r.v,c=r.w;e.removeEdge(d,c),e.setEdge(n.v,n.w,{}),g(e),f(e,t),a=e,o=t,i=a.nodes().find(e=>!o.node(e).parent),(l=(l=s(a,i)).slice(1)).forEach(e=>{var t=a.node(e).parent,r=o.edge(e,t),n=!1;r||(r=o.edge(t,e),n=!0),o.node(e).rank=o.node(t).rank+(n?r.minlen:-r.minlen)})}function b(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=c,c.initLowLimValues=g,c.initCutValues=f,c.calcCutValue=p,c.leaveEdge=m,c.enterEdge=x,c.exchangeEdges=v}),p=a((e,t)=>{var r=u().longestPath,n=h(),a=f();t.exports=function(e){var t,s=e.graph().ranker;if(s instanceof Function)return s(e);switch(e.graph().ranker){case"network-simplex":default:a(e);break;case"tight-tree":r(t=e),n(t);break;case"longest-path":o(e);case"none":}};var o=r}),g=a((e,t)=>{t.exports=function(e){var t;let r,n,a=(r={},n=0,(t=e).children().forEach(function e(a){let o=n;t.children(a).forEach(e),r[a]={low:o,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,o=function(e,t,r,n){let a=[],o=[],s=Math.min(t[r].low,t[n].low),i=Math.max(t[r].lim,t[n].lim),l,d;l=r;do a.push(l=e.parent(l));while(l&&(t[l].low>s||i>t[l].lim))for(d=l,l=n;(l=e.parent(l))!==d;)o.push(l);return{path:a.concat(o.reverse()),lca:d}}(e,a,n.v,n.w),s=o.path,i=o.lca,l=0,d=s[0],c=!0;for(;t!==n.w;){if(r=e.node(t),c){for(;(d=s[l])!==i&&e.node(d).maxRank<r.rank;)l++;d===i&&(c=!1)}if(!c){for(;l<s.length-1&&e.node(d=s[l+1]).minRank<=r.rank;)l++;d=s[l]}e.setParent(t,d),t=e.successors(t)[0]}})}}),m=a((e,t)=>{var r=l();t.exports={run:function(e){var t,n,a;let o=r.addDummyNode(e,"root",{},"_root"),s=(n={},(t=e).children().forEach(e=>(function e(r,a){var o=t.children(r);o&&o.length&&o.forEach(t=>e(t,a+1)),n[r]=a})(e,1)),n),i=Object.values(s),l=r.applyWithChunking(Math.max,i)-1,d=2*l+1;e.graph().nestingRoot=o,e.edges().forEach(t=>e.edge(t).minlen*=d);let c=(a=e).edges().reduce((e,t)=>e+a.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,n,a,o,s,i,l){let d=t.children(l);if(!d.length){l!==n&&t.setEdge(n,l,{weight:0,minlen:a});return}let c=r.addBorderNode(t,"_bt"),u=r.addBorderNode(t,"_bb"),h=t.node(l);t.setParent(c,l),h.borderTop=c,t.setParent(u,l),h.borderBottom=u,d.forEach(r=>{e(t,n,a,o,s,i,r);let d=t.node(r),h=d.borderTop?d.borderTop:r,f=d.borderBottom?d.borderBottom:r,p=d.borderTop?o:2*o,g=h!==f?1:s-i[l]+1;t.setEdge(c,h,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(f,u,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(l)||t.setEdge(n,c,{weight:0,minlen:s+i[l]})})(e,o,d,c,l,s,t)),e.graph().nodeRankFactor=d},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}),x=a((e,t)=>{var r=l();function n(e,t,n,a,o,s){let i=o[t][s-1],l=r.addDummyNode(e,"border",{width:0,height:0,rank:s,borderType:t},n);o[t][s]=l,e.setParent(l,a),i&&e.setEdge(i,l,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let a=e.children(r),o=e.node(r);if(a.length&&a.forEach(t),Object.hasOwn(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(let t=o.minRank,a=o.maxRank+1;t<a;++t)n(e,"borderLeft","_bl",r,o,t),n(e,"borderRight","_br",r,o,t)}})}}),v=a((e,t)=>{function r(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>n(e.edge(t)))}function n(e){let t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function o(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&r(e)},undo:function(e){var t,n;let s=e.graph().rankdir.toLowerCase();("bt"===s||"rl"===s)&&((t=e).nodes().forEach(e=>a(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(a),Object.hasOwn(r,"y")&&a(r)})),("lr"===s||"rl"===s)&&((n=e).nodes().forEach(e=>o(n.node(e))),n.edges().forEach(e=>{let t=n.edge(e);t.points.forEach(o),Object.hasOwn(t,"x")&&o(t)}),r(e))}}}),b=a((e,t)=>{var r=l();t.exports=function(e){let t={},n=e.nodes().filter(t=>!e.children(t).length),a=n.map(t=>e.node(t).rank),o=r.applyWithChunking(Math.max,a),s=r.range(o+1).map(()=>[]);return n.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,s[e.node(n).rank].push(n),e.successors(n).forEach(r))}),s}}),y=a((e,t)=>{var r=l().zipObject;t.exports=function(e,t){let n=0;for(let a=1;a<t.length;++a)n+=function(e,t,n){let a=r(n,n.map((e,t)=>t)),o=t.flatMap(t=>e.outEdges(t).map(t=>({pos:a[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),s=1;for(;s<n.length;)s<<=1;let i=2*s-1;s-=1;let l=Array(i).fill(0),d=0;return o.forEach(e=>{let t=e.pos+s;l[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=l[t+1]),t=t-1>>1,l[t]+=e.weight;d+=e.weight*r}),d}(e,t[a-1],t[a]);return n}}),w=a((e,t)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),a=e.node(r.v);return{sum:t.sum+n.weight*a.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}}),k=a((e,t)=>{var r=l();t.exports=function(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];void 0!==t&&void 0!==r&&(r.indegree++,t.out.push(n[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(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=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>r.pick(e,["vs","i","barycenter","weight"]))}(Object.values(n).filter(e=>!e.indegree))}}),j=a((e,t)=>{var r=l();function n(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var a;let o=r.partition(e,e=>Object.hasOwn(e,"barycenter")),s=o.lhs,i=o.rhs.sort((e,t)=>t.i-e.i),l=[],d=0,c=0,u=0;s.sort((a=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:a?t.i-e.i:e.i-t.i)),u=n(l,i,u),s.forEach(e=>{u+=e.vs.length,l.push(e.vs),d+=e.barycenter*e.weight,c+=e.weight,u=n(l,i,u)});let h={vs:l.flat(!0)};return c&&(h.barycenter=d/c,h.weight=c),h}}),E=a((e,t)=>{var r=w(),n=k(),a=j();t.exports=function e(t,o,s,i){var l,d;let c=t.children(o),u=t.node(o),h=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};h&&(c=c.filter(e=>e!==h&&e!==f));let g=r(t,c);g.forEach(r=>{if(t.children(r.v).length){var n,a;let o=e(t,r.v,s,i);p[r.v]=o,Object.hasOwn(o,"barycenter")&&(n=r,a=o,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+a.barycenter*a.weight)/(n.weight+a.weight),n.weight+=a.weight):(n.barycenter=a.barycenter,n.weight=a.weight))}});let m=n(g,s);l=m,d=p,l.forEach(e=>{e.vs=e.vs.flatMap(e=>d[e]?d[e].vs:e)});let x=a(m,i);if(h&&(x.vs=[h,x.vs,f].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),r=t.node(t.predecessors(f)[0]);Object.hasOwn(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+e.order+r.order)/(x.weight+2),x.weight+=2}return x}}),N=a((e,t)=>{var r=o().Graph,n=l();t.exports=function(e,t,a,o){o||(o=e.nodes());let s=function(e){for(var t;e.hasNode(t=n.uniqueId("_root")););return t}(e),i=new r({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(t=>e.node(t));return o.forEach(r=>{let n=e.node(r),o=e.parent(r);(n.rank===t||n.minRank<=t&&t<=n.maxRank)&&(i.setNode(r),i.setParent(r,o||s),e[a](r).forEach(t=>{let n=t.v===r?t.w:t.v,a=i.edge(n,r),o=void 0!==a?a.weight:0;i.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(n,"minRank")&&i.setNode(r,{borderLeft:n.borderLeft[t],borderRight:n.borderRight[t]}))}),i}}),C=a((e,t)=>{t.exports=function(e,t,r){let n={},a;r.forEach(r=>{let o=e.parent(r),s,i;for(;o;){if((s=e.parent(o))?(i=n[s],n[s]=o):(i=a,a=o),i&&i!==o)return void t.setEdge(i,o);o=s}})}}),_=a((e,t)=>{var r=b(),n=y(),a=E(),s=N(),i=C(),d=o().Graph,c=l();function u(e,t,r){let n=new Map,a=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&a(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&a(e,t)}return t.map(function(t){return s(e,t,r,n.get(t)||[])})}function h(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,o={}){if("function"==typeof o.customOrder)return void o.customOrder(t,e);let s=c.maxRank(t),l=u(t,c.range(1,s+1),"inEdges"),f=u(t,c.range(s-1,-1,-1),"outEdges"),p=r(t);if(h(t,p),o.disableOptimalOrderHeuristic)return;let g=1/0,m,x=o.constraints||[];for(let e=0,r=0;r<4;++e,++r){(function(e,t,r){let n=new d;e.forEach(function(e){r.forEach(e=>n.setEdge(e.left,e.right));let o=e.graph().root,s=a(e,o,n,t);s.vs.forEach((t,r)=>e.node(t).order=r),i(e,n,s.vs)})})(e%2?l:f,e%4>=2,x),p=c.buildLayerMatrix(t);let o=n(t,p);o<g?(r=0,m=Object.assign({},p),g=o):o===g&&(m=structuredClone(p))}h(t,m)}}),O=a((e,t)=>{var r=o().Graph,n=l();function a(e,t){let r={};return t.length&&t.reduce(function(t,n){let a=0,o=0,s=t.length,l=n[n.length-1];return n.forEach((t,d)=>{let c=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),u=c?e.node(c).order:s;(c||t===l)&&(n.slice(o,d+1).forEach(t=>{e.predecessors(t).forEach(n=>{let o=e.node(n),s=o.order;(s<a||u<s)&&!(o.dummy&&e.node(t).dummy)&&i(r,n,t)})}),o=d+1,a=u)}),n}),r}function s(e,t){let r={};function a(t,a,o,s,l){let d;n.range(a,o).forEach(n=>{d=t[n],e.node(d).dummy&&e.predecessors(d).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<s||n.order>l)&&i(r,t,d)})})}return t.length&&t.reduce(function(t,r){let n=-1,o,s=0;return r.forEach((i,l)=>{if("border"===e.node(i).dummy){let t=e.predecessors(i);t.length&&(o=e.node(t[0]).order,a(r,s,l,n,o),s=l,n=o)}a(r,s,r.length,o,t.length)}),r}),r}function i(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function d(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function c(e,t,r,n){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let i=n(e);if(i.length){let n=((i=i.sort((e,t)=>s[e]-s[t])).length-1)/2;for(let l=Math.floor(n),c=Math.ceil(n);l<=c;++l){let n=i[l];o[e]===e&&t<s[n]&&!d(r,e,n)&&(o[n]=e,o[e]=a[e]=a[n],t=s[n])}}})}),{root:a,align:o}}function u(e,t,n,a,o){var s,i,l,d,c,u,h;let f,p,g,m={},x=(s=e,i=t,l=n,d=o,f=new r,g=(c=(p=s.graph()).nodesep,u=p.edgesep,h=d,(e,t,r)=>{let n=e.node(t),a=e.node(r),o,s;if(o=0+n.width/2,Object.hasOwn(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":s=-n.width/2;break;case"r":s=n.width/2}if(s&&(o+=h?s:-s),s=0,o+=(n.dummy?u:c)/2,o+=(a.dummy?u:c)/2,o+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=a.width/2;break;case"r":s=-a.width/2}return s&&(o+=h?s:-s),s=0,o}),i.forEach(e=>{let t;e.forEach(e=>{let r=l[e];if(f.setNode(r),t){var n=l[t],a=f.edge(n,r);f.setEdge(n,r,Math.max(g(s,e,t),a||0))}t=e})}),f),v=o?"borderLeft":"borderRight";function b(e,t){let r=x.nodes().slice(),n={},a=r.pop();for(;a;){if(n[a])e(a);else for(let e of(n[a]=!0,r.push(a),t(a)))r.push(e);a=r.pop()}}return b(function(e){m[e]=x.inEdges(e).reduce((e,t)=>Math.max(e,m[t.v]+x.edge(t)),0)},x.predecessors.bind(x)),b(function(t){let r=x.outEdges(t).reduce((e,t)=>Math.min(e,m[t.w]-x.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==v&&(m[t]=Math.max(m[t],r))},x.successors.bind(x)),Object.keys(a).forEach(e=>m[e]=m[n[e]]),m}function h(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,a=1/0;Object.entries(r).forEach(([t,r])=>{var o,s;let i=(o=e,s=t,o.node(s).width/2);n=Math.max(r+i,n),a=Math.min(r-i,a)});let o=n-a;return o<t[0]&&(t=[o,r]),t},[1/0,null])[1]}function f(e,t){let r=Object.values(t),a=n.applyWithChunking(Math.min,r),o=n.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(s=>{let i=r+s,l=e[i];if(l===t)return;let d=Object.values(l),c=a-n.applyWithChunking(Math.min,d);"l"!==s&&(c=o-n.applyWithChunking(Math.max,d)),c&&(e[i]=n.mapValues(l,e=>e+c))})})}function p(e,t){return n.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t=n.buildLayerMatrix(e),r=Object.assign(a(e,t),s(e,t)),o={},i;["u","d"].forEach(a=>{i="u"===a?t:Object.values(t).reverse(),["l","r"].forEach(t=>{"r"===t&&(i=i.map(e=>Object.values(e).reverse()));let s=("u"===a?e.predecessors:e.successors).bind(e),l=c(e,i,r,s),d=u(e,i,l.root,l.align,"r"===t);"r"===t&&(d=n.mapValues(d,e=>-e)),o[a+t]=d})});let l=h(e,o);return f(o,l),p(o,e.graph().align)},findType1Conflicts:a,findType2Conflicts:s,addConflict:i,hasConflict:d,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:f,findSmallestWidthAlignment:h,balance:p}}),S=a((e,t)=>{var r=l(),n=O().positionX;t.exports=function(e){var t;let a,o,s,i;t=e=r.asNonCompoundGraph(e),a=r.buildLayerMatrix(t),o=t.graph().ranksep,s=t.graph().rankalign,i=0,a.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>{let n=t.node(e);"top"===s?n.y=i+n.height/2:"bottom"===s?n.y=i+r-n.height/2:n.y=i+r/2}),i+=r+o}),Object.entries(n(e)).forEach(([t,r])=>e.node(t).x=r)}}),R=a((e,t)=>{var r=d(),n=c(),a=p(),s=l().normalizeRanks,i=g(),u=l().removeEmptyRanks,h=m(),f=x(),b=v(),y=_(),w=S(),k=l(),j=o().Graph;t.exports=function(e,t={}){let o=t.debugTiming?k.time:k.notime;return o("layout",()=>{let l=o(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new j({multigraph:!0,compound:!0}),n=L(t.graph()),r.setGraph(Object.assign({},N,T(n,E),k.pick(n,C))),t.nodes().forEach(e=>{let n=T(L(t.node(e)),O);Object.keys(R).forEach(e=>{void 0===n[e]&&(n[e]=R[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=L(t.edge(e));r.setEdge(e,Object.assign({},P,T(n,M),k.pick(n,F)))}),r});return o(" runLayout",()=>{var e,d,c;return e=l,d=o,c=t,void(d(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),d(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),d(" acyclic",()=>r.run(e)),d(" nestingGraph.run",()=>h.run(e)),d(" rank",()=>a(k.asNonCompoundGraph(e))),d(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};k.addDummyNode(t,"edge-proxy",n,"_ep")}})}),d(" removeEmptyRanks",()=>u(e)),d(" nestingGraph.cleanup",()=>h.cleanup(e)),d(" normalizeRanks",()=>s(e)),d(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),d(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),d(" normalize.run",()=>n.run(e)),d(" parentDummyChains",()=>i(e)),d(" addBorderSegments",()=>f(e)),d(" order",()=>y(e,c)),d(" insertSelfEdges",()=>{var t;return t=e,void k.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var a=t.node(e);a.order=n+r,(a.selfEdges||[]).forEach(e=>{k.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete a.selfEdges})})}),d(" adjustCoordinateSystem",()=>b.adjust(e)),d(" position",()=>w(e)),d(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),a=n.x+n.width/2,o=n.y,s=r.x-a,i=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:a+2*s/3,y:o-i},{x:a+5*s/6,y:o-i},{x:a+s,y:o},{x:a+5*s/6,y:o+i},{x:a+2*s/3,y:o+i}],r.label.x=r.x,r.label.y=r.y}})}),d(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),a=t.node(r.borderBottom),o=t.node(r.borderLeft[r.borderLeft.length-1]),s=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(s.x-o.x),r.height=Math.abs(a.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),d(" normalize.undo",()=>n.undo(e)),d(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(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}})}),d(" undoCoordinateSystem",()=>b.undo(e)),d(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,a=0,o=e.graph(),s=o.marginx||0,i=o.marginy||0;function l(e){let o=e.x,s=e.y,i=e.width,l=e.height;t=Math.min(t,o-i/2),r=Math.max(r,o+i/2),n=Math.min(n,s-l/2),a=Math.max(a,s+l/2)}e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&l(r)}),t-=s,n-=i,e.nodes().forEach(r=>{let a=e.node(r);a.x-=t,a.y-=n}),e.edges().forEach(r=>{let a=e.edge(r);a.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(a,"x")&&(a.x-=t),Object.hasOwn(a,"y")&&(a.y-=n)}),o.width=r-t+s,o.height=a-n+i})(e)),d(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e),n=t.node(e.v),a=t.node(e.w),o,s;r.points?(o=r.points[0],s=r.points[r.points.length-1]):(r.points=[],o=a,s=n),r.points.unshift(k.intersectRect(n,o)),r.points.push(k.intersectRect(a,s))})}),d(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),d(" acyclic.undo",()=>r.undo(e)))}),o(" updateInputGraph",()=>{var t,r;return t=e,r=l,void(t.nodes().forEach(e=>{let n=t.node(e),a=r.node(e);n&&(n.x=a.x,n.y=a.y,n.order=a.order,n.rank=a.rank,r.children(e).length&&(n.width=a.width,n.height=a.height))}),t.edges().forEach(e=>{let n=t.edge(e),a=r.edge(e);n.points=a.points,Object.hasOwn(a,"x")&&(n.x=a.x,n.y=a.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)}),l})};var E=["nodesep","edgesep","ranksep","marginx","marginy"],N={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},C=["acyclicer","ranker","rankdir","align","rankalign"],O=["width","height","rank"],R={width:0,height:0},M=["minlen","weight","width","height","labeloffset"],P={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},F=["labelpos"];function T(e,t){return k.mapValues(k.pick(e,t),Number)}function L(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}}),M=a((e,t)=>{var r=l(),n=o().Graph;t.exports={debugOrdering:function(e){let t=r.buildLayerMatrix(e),a=new n({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{a.setNode(t,{label:t}),a.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>a.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{a.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(a.setEdge(e,t,{style:"invis"}),t))}),a}}}),P=a((e,t)=>{t.exports="2.0.4"});let F=a((e,t)=>{t.exports={graphlib:o(),layout:R(),debug:M(),util:{time:l().time,notime:l().notime},version:P()}})(),T={direction:"LR",ranksep:200,nodesep:30},L={featureNode:{width:388,height:140},repositoryNode:{width:400,height:140}};function A(e,t){let r=e.data;return r&&"number"==typeof r.width&&"number"==typeof r.height?{width:r.width,height:r.height}:L[e.type??""]??t}function D(e,t,r={}){let{direction:n="TB",nodeSize:a={width:172,height:36},ranksep:o=80,nodesep:s=30}=r;if(0===e.length)return{nodes:[],edges:[]};let i=new F.graphlib.Graph({multigraph:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:n,ranksep:o,nodesep:s});let l=new Set;for(let e of t)l.add(e.source),l.add(e.target);let d=e.filter(e=>l.has(e.id)),c=e.filter(e=>!l.has(e.id));for(let e of d){let t=A(e,a);i.setNode(e.id,{width:t.width,height:t.height})}for(let e of t)i.hasNode(e.source)&&i.hasNode(e.target)&&i.setEdge(e.source,e.target,{},e.id);F.layout(i);let{targetPosition:u,sourcePosition:h}=function(e){switch(e){case"LR":return{targetPosition:"left",sourcePosition:"right"};case"RL":return{targetPosition:"right",sourcePosition:"left"};case"BT":return{targetPosition:"bottom",sourcePosition:"top"};default:return{targetPosition:"top",sourcePosition:"bottom"}}}(n),f="LR"===n||"RL"===n,p=new Map;for(let e of d){let t=i.node(e.id),r=A(e,a);p.set(e.id,{cx:t.x,cy:t.y,w:r.width,h:r.height})}let g=0;for(let e of p.values()){g=f?e.cx:e.cy;break}for(let e of c){let t=A(e,a);p.set(e.id,{cx:f?g:0,cy:f?0:g,w:t.width,h:t.height})}let m=new Map;for(let e of t)p.has(e.source)&&p.has(e.target)&&(m.has(e.source)||m.set(e.source,[]),m.get(e.source).push(e.target));let x=new Map;for(let t=0;t<e.length;t++)x.set(e[t].id,t);for(let[,e]of m)e.sort((e,t)=>(x.get(e)??0)-(x.get(t)??0));let v=new Set;for(let e of m.values())for(let t of e)v.add(t);let b=[...[...l].filter(e=>p.has(e)&&!v.has(e)),...c.map(e=>e.id)];b.sort((e,t)=>(x.get(e)??0)-(x.get(t)??0));let y=new Map;for(let e of b)!function e(t){if(y.has(t))return y.get(t);let r=p.get(t),n=f?r.h:r.w,a=m.get(t);if(!a||0===a.length)return y.set(t,n),n;let o=0;for(let t of a)o+=e(t);let i=Math.max(n,o+=(a.length-1)*s);return y.set(t,i),i}(e);let w=0;for(let e of b){let t=y.get(e)??0;!function e(t,r){let n=p.get(t);f?n.cy=r:n.cx=r;let a=m.get(t);if(!a||0===a.length)return;let o=0;for(let e of a)o+=y.get(e)??0;let i=r-(o+=(a.length-1)*s)/2;for(let t of a){let r=y.get(t)??0;e(t,i+r/2),i+=r+s}}(e,w+t/2),w+=t+s}let k=[];for(let t of e){let e=p.get(t.id);e&&k.push({...t,targetPosition:u,sourcePosition:h,position:{x:e.cx-e.w/2,y:e.cy-e.h/2}})}return{nodes:k,edges:[...t]}}var I=e.i(21023);let $=(0,I.createServerReference)("40fdb38d3d2e33cf80d498d42b563985469b7a7cef",I.callServer,void 0,I.findSourceMapURL,"archiveFeature"),z=(0,I.createServerReference)("78c9e436d2276c777ee6cb07881c566bf4cf53728c",I.callServer,void 0,I.findSourceMapURL,"deleteFeature");var G=e.i(45333),B=e.i(34706);let U=(0,I.createServerReference)("4085f67871244178ec722f490bebaddaff442f5ced",I.callServer,void 0,I.findSourceMapURL,"stopFeature"),q=(0,I.createServerReference)("401ee11cc3fd9d48028468e67b3dc798037f273d19",I.callServer,void 0,I.findSourceMapURL,"unarchiveFeature");var W=e.i(22967);let H=(0,I.createServerReference)("40a26029f876e2f8e1552a6d213c2e35144d9f8b35",I.callServer,void 0,I.findSourceMapURL,"deleteRepository"),V=(0,I.createServerReference)("40e9ccec537c165e257834a9e26aba1d98baedf1b2",I.callServer,void 0,I.findSourceMapURL,"getFeatureMetadata");var X=e.i(39443),J=e.i(8361),K=e.i(18354),Y=e.i(99045);function Q(e,t){let r=new Map;for(let e of t)"dependencyEdge"===e.type&&r.set(e.target,e.source);let n=new Map,a=new Map;for(let t of e)"featureNode"===t.type?n.set(t.id,{nodeId:t.id,data:t.data,parentNodeId:r.get(t.id)}):"repositoryNode"===t.type&&a.set(t.id,{nodeId:t.id,data:t.data});return{featureMap:n,repoMap:a}}function Z(e,t){return(void 0===t.state||t.state===e.state)&&(void 0===t.lifecycle||t.lifecycle===e.lifecycle)&&(void 0===t.name||t.name===e.name)&&(void 0===t.description||t.description===e.description)}function ee(e,t){if(e.size!==t.size)return!1;for(let[r,n]of e){let e=t.get(r);if(!e||n.parentNodeId!==e.parentNodeId||n.data!==e.data&&JSON.stringify(n.data)!==JSON.stringify(e.data))return!1}return!0}let et=(0,K.createLogger)("[Polling]"),er=0,en=0;function ea(e,a){let o=(0,r.useRouter)(),s=(0,J.useSoundAction)("delete"),i=(0,J.useSoundAction)("create"),[l,d]=(0,t.useState)(!1),{nodes:c,edges:u,reconcile:h,updateFeature:f,addPendingFeature:p,removeFeature:g,restoreFeature:m,addRepository:x,removeRepository:v,replaceRepository:b,getFeatureRepositoryPath:y,getRepositoryData:w,getRepoMapSize:k,setCallbacks:j,beginMutation:E,endMutation:N,isMutating:C}=function(e,r,n=!1){let a=(0,t.useMemo)(()=>Q(e,r),[]),[o,s]=(0,t.useState)(a.featureMap),[i,l]=(0,t.useState)(a.repoMap),[d,c]=(0,t.useState)(new Map),u=(0,t.useRef)(new Map),h=(0,t.useRef)(new Set),f=(0,t.useRef)(0),p=(0,t.useRef)(new Set),g=(0,t.useRef)(new Set),m=(0,t.useRef)({}),x=(0,t.useMemo)(()=>({onNodeAction:e=>m.current.onNodeAction?.(e),onNodeSettings:e=>m.current.onNodeSettings?.(e),onFeatureDelete:(e,t,r,n)=>m.current.onFeatureDelete?.(e,t,r,n),onRepositoryAdd:e=>m.current.onRepositoryAdd?.(e),onRepositoryClick:e=>m.current.onRepositoryClick?.(e),onRepositoryDelete:e=>m.current.onRepositoryDelete?.(e),onRetryFeature:e=>m.current.onRetryFeature?.(e),onStartFeature:e=>m.current.onStartFeature?.(e),onArchiveFeature:e=>m.current.onArchiveFeature?.(e),onUnarchiveFeature:e=>m.current.onUnarchiveFeature?.(e)}),[]),v=(0,t.useRef)(o);v.current=o;let b=(0,t.useRef)(i);b.current=i;let y=(0,t.useMemo)(()=>{if(n)return o;let e=new Map;for(let[t,r]of o)"archived"!==r.data.state&&e.set(t,r);return e.size===o.size?o:e},[o,n]),w=(0,t.useMemo)(()=>(function(e,t,r,n){let a=[],o=[],s=e=>e.replace(/\\/g,"/"),i=new Map;for(let[e,r]of t)r.data.repositoryPath&&i.set(s(r.data.repositoryPath),e);let l=new Map;for(let[e,r]of[...t.entries()].sort((e,t)=>{let r=e[1].data.createdAt,n=t[1].data.createdAt;return("number"!=typeof r||Number.isNaN(r)?1/0:r)-("number"!=typeof n||Number.isNaN(n)?1/0:n)})){let t={...r.data,...n?.onRepositoryAdd&&{onAdd:()=>n.onRepositoryAdd(e)},...n?.onRepositoryClick&&{onClick:()=>n.onRepositoryClick(e)},...n?.onRepositoryDelete&&{onDelete:n.onRepositoryDelete}};a.push({id:e,type:"repositoryNode",position:{x:0,y:0},data:t})}for(let[t,d,c]of[...[...e.entries()].map(([e,t])=>[e,t,!1]),...[...r.entries()].filter(([t])=>!e.has(t)).map(([e,t])=>[e,t,!0])]){let u="creating"===d.data.state||c,h={...d.data,...!u&&n?.onNodeAction&&{onAction:()=>n.onNodeAction(t)},...!u&&n?.onNodeSettings&&{onSettings:()=>n.onNodeSettings(t)},...!u&&n?.onFeatureDelete&&{onDelete:n.onFeatureDelete},...!u&&"error"===d.data.state&&n?.onRetryFeature&&{onRetry:n.onRetryFeature},...!u&&"pending"===d.data.state&&n?.onStartFeature&&{onStart:n.onStartFeature},...!u&&("running"===d.data.state||"action-required"===d.data.state)&&n?.onStopFeature&&{onStop:n.onStopFeature},...!u&&"archived"!==d.data.state&&"deleting"!==d.data.state&&n?.onArchiveFeature&&{onArchive:n.onArchiveFeature},...!u&&"archived"===d.data.state&&n?.onUnarchiveFeature&&{onUnarchive:n.onUnarchiveFeature}};if(a.push({id:t,type:"featureNode",position:{x:0,y:0},data:h}),d.parentNodeId&&(e.has(d.parentNodeId)||r.has(d.parentNodeId)))o.push({id:`dep-${d.parentNodeId}-${t}`,source:d.parentNodeId,target:t,type:"dependencyEdge"});else{let e=s(d.data.repositoryPath),r=i.get(e)??function(e){if(l.has(e))return l.get(e);let t=`virtual-repo-${e}`,r=e.split("/").filter(Boolean).at(-1)??e;return a.push({id:t,type:"repositoryNode",position:{x:0,y:0},data:{name:r,repositoryPath:e}}),l.set(e,t),t}(e);o.push({id:`edge-${r}-${t}`,source:r,target:t,style:{strokeDasharray:"5 5"}})}}let d=new Set;for(let e of o)"dependencyEdge"===e.type&&d.add(e.source);let c=o.length>0;for(let e of a){let t=e.data;t.showHandles=c,"featureNode"===e.type&&(t.hasChildren=d.has(e.id))}return{nodes:a,edges:o}})(y,i,d,x),[y,i,d,x]),k=(0,t.useRef)({key:"",positions:new Map}),{nodes:j,edges:E}=(0,t.useMemo)(()=>{let e=w.nodes.map(e=>e.id).sort().join(","),t=w.edges.map(e=>`${e.source}-${e.target}`).sort().join(","),r=`${e}|${t}`;if(r!==k.current.key){let e=D(w.nodes,w.edges,T),t=new Map;for(let r of e.nodes)t.set(r.id,{position:r.position,targetPosition:r.targetPosition,sourcePosition:r.sourcePosition});let n=k.current.positions;if(n.size>0){let r=0,a=0;for(let[e,o]of t){let t=n.get(e);if(t){r=t.position.x-o.position.x,a=t.position.y-o.position.y;break}}if(0!==r||0!==a){for(let e of t.values())e.position={x:e.position.x+r,y:e.position.y+a};for(let t of e.nodes)t.position={x:t.position.x+r,y:t.position.y+a}}}return k.current={key:r,positions:t},e}let{positions:n}=k.current;return{nodes:w.nodes.map(e=>{let t=n.get(e.id);return t?{...e,...t}:e}),edges:w.edges}},[w]),N=(0,t.useCallback)((e,t)=>{if(f.current>0)return;let{featureMap:r,repoMap:n}=Q(e,t),a=new Set([...r.values()].map(e=>`${e.data.name}\0${e.data.repositoryPath}`));s(e=>{let t=[...e.entries()].filter(([,e])=>"creating"===e.data.state),n=new Map(r);for(let[e,r]of t){let t=`${r.data.name}\0${r.data.repositoryPath}`;a.has(t)||n.set(e,r)}let o=new Set;for(let[t,r]of e)"deleting"===r.data.state&&(n.has(t)?n.set(t,{...n.get(t),data:{...n.get(t).data,state:"deleting"}}):g.current.has(t)||(n.set(t,r),o.add(t)));for(let[e,t]of(g.current=o,u.current)){let r=n.get(e);r&&(n.set(e,{...r,data:{...r.data,...t}}),u.current.delete(e))}return ee(e,n)?e:n}),c(e=>{if(0===e.size)return e;let t=!1,r=new Map(e);for(let[n,o]of e){let e=`${o.data.name}\0${o.data.repositoryPath}`;a.has(e)&&(r.delete(n),t=!0)}return t?r:e}),l(e=>{let t=new Map(n),r=new Set([...n.values()].map(e=>e.data.repositoryPath));for(let[n,a]of e){if(t.has(n)||r.has(a.data.repositoryPath)){h.current.delete(n);continue}(n.startsWith("repo-temp-")||h.current.has(n))&&t.set(n,a)}return ee(e,t)?e:t})},[]),C=(0,t.useCallback)((e,t)=>{s(r=>{let n=r.get(e);if(!n)return u.current.set(e,{...u.current.get(e),...t}),r;if(u.current.delete(e),Z(n.data,t))return r;let a=new Map(r);return a.set(e,{...n,data:{...n.data,...t}}),a}),c(r=>{let n=r.get(e);if(!n||Z(n.data,t))return r;let a=new Map(r);return a.set(e,{...n,data:{...n.data,...t}}),a})},[]),_=(0,t.useCallback)((e,t,r)=>{c(n=>{let a=new Map(n);return a.set(e,{nodeId:e,data:t,parentNodeId:r}),a})},[]),O=(0,t.useCallback)(e=>{c(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),S=(0,t.useCallback)(e=>{s(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),R=(0,t.useCallback)((e,t)=>{s(r=>{let n=new Map(r);return n.set(e,t),n})},[]),M=(0,t.useCallback)((e,t)=>{h.current.add(e),l(r=>{let n=new Map(r);return n.set(e,{nodeId:e,data:t}),n})},[]),P=(0,t.useCallback)(e=>{h.current.delete(e),l(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r})},[]),F=(0,t.useCallback)((e,t,r)=>{h.current.delete(e),h.current.add(t),l(n=>{if(!n.has(e))return n;let a=new Map(n);return a.delete(e),a.set(t,{nodeId:t,data:r}),a})},[]),L=(0,t.useCallback)(e=>v.current.get(e)?.data.repositoryPath,[]),A=(0,t.useCallback)(e=>b.current.get(e)?.data,[]),I=(0,t.useCallback)(()=>b.current.size,[]),$=(0,t.useCallback)(e=>{m.current=e},[]),z=(0,t.useCallback)(()=>{f.current++},[]),G=(0,t.useCallback)((e=3e3)=>{let t=setTimeout(()=>{f.current=Math.max(0,f.current-1),p.current.delete(t)},e);p.current.add(t)},[]),B=(0,t.useCallback)(()=>f.current>0,[]);return(0,t.useEffect)(()=>{let e=p.current;return()=>{for(let t of e)clearTimeout(t);e.clear()}},[]),{nodes:j,edges:E,reconcile:N,updateFeature:C,addPendingFeature:_,removePendingFeature:O,removeFeature:S,restoreFeature:R,addRepository:M,removeRepository:P,replaceRepository:F,getFeatureRepositoryPath:L,getRepositoryData:A,getRepoMapSize:I,setCallbacks:$,beginMutation:z,endMutation:G,isMutating:B}}(e,a,l),_=(0,t.useRef)(c),O=(0,t.useRef)(u);(0,t.useEffect)(()=>{_.current=c,O.current=u},[c,u]);let S=(0,t.useMemo)(()=>e.map(e=>e.id).sort().join(","),[e]),R=(0,t.useMemo)(()=>e.filter(e=>"featureNode"===e.type).map(e=>{let t=e.data;return`${e.id}:${t.state}:${t.lifecycle}`}).sort().join(","),[e]),M=(0,t.useRef)("");(0,t.useEffect)(()=>{let t=`${S}|${R}`;t!==M.current&&(M.current=t,h(e,a))},[S,R,e,a,h]);let P=(0,t.useRef)(new Map),{events:F}=(0,X.useAgentEventsContext)();(0,t.useEffect)(()=>{let t=P.current;for(let r of e){if("featureNode"!==r.type)continue;let e=r.data,a=t.get(r.id);void 0!==a&&a!==e.state&&(F.some(t=>t.featureId===e.featureId&&(0,Y.mapEventTypeToState)(t.eventType)===e.state)||("done"===e.state?n.toast.success(e.name,{description:"Feature completed!"}):"action-required"===e.state?n.toast.warning(e.name,{description:"Waiting for your approval",action:{label:"Review",onClick:()=>o.push(`/feature/${e.featureId}`)}}):"error"===e.state&&n.toast.error(e.name,{description:e.errorMessage??"Agent failed"}))),t.set(r.id,e.state)}},[R,e,F,o]);let L=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(L.current>F.length&&(L.current=0),F.length<=L.current)return;let e=F.slice(L.current);for(let{featureId:t,state:r,lifecycle:n}of(L.current=F.length,(0,Y.resolveSseEventUpdates)(e)))if(void 0!==r||void 0!==n){let e=`feat-${t}`,a=_.current.find(t=>t.id===e),o=a?a.data.state:void 0;if("deleting"===o||"error"===r&&C()&&"running"===o)continue;f(e,{...void 0!==r&&{state:r},...void 0!==n&&{lifecycle:n}})}},[F,f,C]),(0,t.useEffect)(()=>{let e=e=>{let{featureId:t}=e.detail;E(),f(`feat-${t}`,{state:"running"}),N()};return window.addEventListener("shep:feature-approved",e),()=>window.removeEventListener("shep:feature-approved",e)},[f,E,N]);let A=(0,t.useRef)(new Set),I=(0,t.useRef)(0);(0,t.useEffect)(()=>{if(I.current>F.length&&(I.current=0),F.length<=I.current)return;let e=F.slice(I.current);for(let t of(I.current=F.length,e)){if("Feature metadata updated"!==t.message||A.current.has(t.featureId))continue;A.current.add(t.featureId);let e=`feat-${t.featureId}`;V(t.featureId).then(t=>{t&&f(e,{name:t.name,description:t.description})}).catch(()=>{})}},[F,f]),(0,t.useEffect)(()=>{et.debug("polling enabled (15000ms interval)");let e=setInterval(async()=>{if(!document.hidden&&!C())try{let e=await fetch("/api/graph-data");if(!e.ok)throw Error(`status ${e.status}`);let{nodes:t,edges:r}=await e.json();h(t,r)}catch{et.warn("poll fetch failed — will retry next interval")}},15e3);return()=>{et.debug("polling disabled"),clearInterval(e)}},[h,C]);let K=(0,t.useCallback)(e=>{},[]),ea=(0,t.useCallback)(e=>{},[]),eo=(0,t.useCallback)((e,t,r)=>{let n=t?.featureId?`feat-${t.featureId}`:`feature-${Date.now()}-${er++}`,a={name:t?.name??"New Feature",description:t?.description??"Describe what this feature does",featureId:t?.featureId??`#${n.slice(-4)}`,lifecycle:"requirements",state:t?.state??"running",progress:0,repositoryPath:t?.repositoryPath??"",branch:t?.branch??""};return p(n,a,"dependencyEdge"===r&&e?e:void 0),n},[p]),es=(0,t.useCallback)(e=>{let t=`feat-${e}`;E(),f(t,{state:"running"}),(0,G.resumeFeature)(e).then(e=>{e.error?(f(t,{state:"error"}),n.toast.error(e.error)):n.toast.success("Feature resumed")}).catch(()=>{f(t,{state:"error"}),n.toast.error("Failed to resume feature")}).finally(()=>N())},[f,E,N]),ei=(0,t.useCallback)(e=>{let t=`feat-${e}`;E(),f(t,{state:"running"}),(0,B.startFeature)(e).then(e=>{e.error?(f(t,{state:"pending"}),n.toast.error(e.error)):n.toast.success("Feature started")}).catch(()=>{f(t,{state:"pending"}),n.toast.error("Failed to start feature")}).finally(()=>N())},[f,E,N]),el=(0,t.useCallback)(e=>{E(),U(e).then(e=>{e.error?n.toast.error(e.error):n.toast.success("Agent stopped")}).catch(()=>{n.toast.error("Failed to stop agent")}).finally(()=>N())},[E,N]),ed=(0,t.useCallback)(e=>{let t=`feat-${e}`;E(),f(t,{state:"archived"}),$(e).then(e=>{e.error?(f(t,{state:"done"}),n.toast.error(e.error)):n.toast.success("Feature archived")}).catch(()=>{f(t,{state:"done"}),n.toast.error("Failed to archive feature")}).finally(()=>N())},[f,E,N]),ec=(0,t.useCallback)(e=>{let t=`feat-${e}`;E(),f(t,{state:"done"}),q(e).then(e=>{e.error?(f(t,{state:"archived"}),n.toast.error(e.error)):n.toast.success("Feature unarchived")}).catch(()=>{f(t,{state:"archived"}),n.toast.error("Failed to unarchive feature")}).finally(()=>N())},[f,E,N]),eu=(0,t.useCallback)((e,t,r,a)=>{let i=`feat-${e}`,l=[];if(!0===r){let e=[i];for(;e.length>0;){let t=e.shift();for(let r of O.current)"dependencyEdge"===r.type&&r.source===t&&(l.push(r.target),e.push(r.target))}}let d=new Map;for(let e of[i,...l]){let t=_.current.find(t=>t.id===e);t&&d.set(e,t.data.state)}for(let e of(E(),f(i,{state:"deleting"}),l))f(e,{state:"deleting"});s.play(),o.push("/"),z(e,t,r,a).then(e=>{if(e.error){for(let[e,t]of d)t&&f(e,{state:t});n.toast.error(e.error)}else for(let e of(g(i),l))g(e)}).catch(()=>{for(let[e,t]of d)t&&f(e,{state:t});n.toast.error("Failed to delete feature")}).finally(()=>N())},[o,s,f,g,E,N]),eh=(0,t.useCallback)(async e=>{let t=`repo-${e}`,r=new Set(O.current.filter(e=>e.source===t).map(e=>e.target)),a=w(t),o=new Map;for(let e of r){let t=_.current.find(t=>t.id===e);t&&o.set(e,{nodeId:e,data:t.data})}let i=()=>{for(let[e,r]of(a&&x(t,a),o))m(e,r)};for(let e of(E(),v(t),r))g(e);try{let t=await H(e);if(!t.success){n.toast.error(t.error??"Failed to remove repository"),i();return}s.play()}catch{n.toast.error("Failed to remove repository"),i()}finally{N()}},[s,v,g,x,m,w,E,N]),ef=(0,t.useCallback)(e=>{let t=D(_.current,O.current,{...T,direction:e});h(t.nodes,t.edges)},[h]);return{nodes:c,edges:u,onNodesChange:K,handleConnect:ea,handleAddRepository:(0,t.useCallback)(e=>{let t=0===k(),r=`repo-temp-${++en}`,a=e.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??e;return E(),x(r,{name:a,repositoryPath:e,id:r,createdAt:Date.now(),gitInfoStatus:"loading"}),(0,W.addRepository)({path:e,name:a}).then(e=>{if(e.error){v(r),n.toast.error(e.error);return}let t=e.repository;b(r,`repo-${t.id}`,{name:t.name,repositoryPath:t.path,id:t.id,createdAt:t.createdAt instanceof Date?t.createdAt.getTime():Number(t.createdAt)}),i.play()}).catch(()=>{v(r),n.toast.error("Failed to add repository")}).finally(()=>N()),{wasEmpty:t,repoPath:e}},[x,v,b,i,k,E,N]),handleArchiveFeature:ed,handleLayout:ef,handleDeleteFeature:eu,handleRetryFeature:es,handleStartFeature:ei,handleStopFeature:el,handleUnarchiveFeature:ec,handleDeleteRepository:eh,createFeatureNode:eo,showArchived:l,setShowArchived:d,getFeatureRepositoryPath:y,getRepositoryData:w,setCallbacks:j}}e.s(["useControlCenterState",()=>ea],17840)},48246,e=>{"use strict";var t=e.i(20314),r=e.i(53271),n=e.i(92786),a=e.i(79054),o=e.i(31406),s=e.i(87889),i=e.i(3645);let l=(0,i.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var d=e.i(31777),c=e.i(3214),u=e.i(38227),h=e.i(35364);e.i(54793);var f=e.i(7729);e.i(47506);var p=e.i(89313),g=e.i(92002),m=e.i(82569),x=e.i(8986),v=e.i(38573),b=e.i(19933),y=e.i(67669),w=e.i(24042),k=e.i(64970),j=e.i(49228),E=e.i(65530),N=e.i(7311);let C=(0,i.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.i(81803);var _=e.i(72714),O=e.i(2287),S=e.i(2828),R=e.i(8537),M=e.i(75921),P=e.i(76852),F=e.i(80519);function T({data:e,selected:n}){let s=(0,o.useRouter)(),i=(0,M.useFeatureFlags)(),[l,f]=(0,a.useState)(!1),p=(0,P.useRepositoryActions)(e.repositoryPath?{repositoryId:e.id,repositoryPath:e.repositoryPath}:null),T=(0,R.useDeployAction)(e.repositoryPath?{targetId:e.repositoryPath,targetType:"repository",repositoryPath:e.repositoryPath}:null),L="Booting"===T.status||"Ready"===T.status,A=(0,a.useCallback)((t,r)=>{if(!e.repositoryPath)return;let n=t.preview?t.preview.slice(0,200):"Unknown conversation",a=["Continue work from a previous agent session.","","## Session Context",`- Session ID: ${t.id}`,`- Messages: ${t.messageCount}`,t.lastMessageAt?`- Last active: ${t.lastMessageAt}`:"",`- Conversation file: ${r}`,"","## Session Preview",`> ${n}`,"","## Instructions","1. Read the full conversation history from the file above",`2. Analyze the current state of the repository — what was done, what remains`,"3. Create or update spec files to accurately reflect the current state and remaining work","4. Continue implementing any unfinished work from the conversation"].filter(Boolean).join("\n"),o=new URLSearchParams({repo:e.repositoryPath,prompt:a});s.push(`/create?${o.toString()}`)},[e.repositoryPath,s]);return(0,t.jsxs)("div",{className:(0,d.cn)("group relative",e.onDelete&&e.id&&"pl-10"),children:[e.showHandles?(0,t.jsx)(r.Handle,{type:"target",position:g.Position.Left,isConnectable:!1,className:"opacity-0!",style:{top:70}}):null,e.onDelete&&e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute top-1/2 left-0 -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(S.TooltipProvider,{children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{"aria-label":"Remove repository","data-testid":"repository-node-delete-button",onClick:e=>{e.stopPropagation(),f(!0)},className:"bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors",children:(0,t.jsx)(y.Trash2,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(S.TooltipContent,{children:"Remove repository"})]})})}),(0,t.jsx)(O.Dialog,{open:l,onOpenChange:f,children:(0,t.jsxs)(O.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(O.DialogHeader,{children:[(0,t.jsx)(O.DialogTitle,{children:"Remove repository?"}),(0,t.jsxs)(O.DialogDescription,{children:["This will remove ",(0,t.jsx)("strong",{children:e.name})," and all its features from your workspace. The repository files on disk won't be affected."]})]}),(0,t.jsxs)(O.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(O.DialogClose,{asChild:!0,children:(0,t.jsx)(h.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(h.Button,{variant:"destructive",onClick:()=>{f(!1),e.onDelete?.(e.id)},children:"Remove"})]})]})})]}):null,(0,t.jsxs)("div",{role:"button",tabIndex:0,"data-testid":"repository-node-card","data-repo-name":e.name,onClick:t=>{t.stopPropagation(),e.onClick?.()},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),t.stopPropagation(),e.onClick?.())},className:(0,d.cn)("nodrag bg-card flex w-[26rem] cursor-pointer flex-col overflow-hidden rounded-xl border shadow-sm transition-[border-color,box-shadow] duration-200 dark:bg-neutral-800/80",n&&"border-blue-400 dark:border-amber-500/60"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3",children:[(0,t.jsx)(m.Github,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("span",{"data-testid":"repository-node-name",className:"min-w-0 truncate text-sm font-medium",children:e.name}),(0,t.jsxs)("div",{className:(0,d.cn)("flex shrink-0 items-center gap-2",(e.repositoryPath??e.onAdd)&&"ml-auto"),onClick:e=>e.stopPropagation(),children:[e.repositoryPath?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.TooltipProvider,{children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(_.ActionButton,{label:"Open in IDE",onClick:p.openInIde,loading:p.ideLoading,error:!!p.ideError,icon:x.Code2,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(S.TooltipContent,{children:"Open in IDE"})]})}),(0,t.jsx)(S.TooltipProvider,{children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(_.ActionButton,{label:"Open in Shell",onClick:p.openInShell,loading:p.shellLoading,error:!!p.shellError,icon:v.Terminal,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(S.TooltipContent,{children:"Open in Shell"})]})}),(0,t.jsx)(S.TooltipProvider,{children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"flex items-center",children:(0,t.jsx)(_.ActionButton,{label:"Open Folder",onClick:p.openFolder,loading:p.folderLoading,error:!!p.folderError,icon:b.FolderOpen,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(S.TooltipContent,{children:"Open Folder"})]})}),(0,t.jsx)(F.FeatureSessionsDropdown,{repositoryPath:e.repositoryPath,includeWorktrees:!0,onCreateFromSession:A})]}):null,e.onAdd?(0,t.jsx)("div",{className:"ml-1.5"}):null,e.onAdd?(0,t.jsx)(S.TooltipProvider,{children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("button",{"aria-label":"New feature","data-testid":"repository-node-add-button",onClick:t=>{t.stopPropagation(),e.onAdd?.()},className:(0,d.cn)("flex h-6 shrink-0 cursor-pointer items-center gap-0.5 rounded bg-blue-500 px-1.5 text-[11px] font-bold text-white transition-colors hover:bg-blue-600 dark:bg-amber-500 dark:hover:bg-amber-400",e.pulseAdd&&"animate-pulse-cta"),children:[(0,t.jsx)(c.Plus,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"translate-y-px",children:"New"})]})}),(0,t.jsx)(S.TooltipContent,{side:"top",children:"New feature"})]})}):null]})]}),e.branch?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{"data-testid":"repository-node-git-info",className:"text-muted-foreground border-border/50 border-t px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1 truncate","data-testid":"repository-node-branch",children:[(0,t.jsx)(j.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.branch})]}),null!=e.behindCount&&e.behindCount>0?(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 whitespace-nowrap text-amber-500","data-testid":"repository-node-behind",children:[(0,t.jsx)(N.ArrowDown,{className:"h-3 w-3 shrink-0"}),e.behindCount," behind"]}):null]})}),e.commitMessage?(0,t.jsx)("div",{"data-testid":"repository-node-commit-info",className:"text-muted-foreground border-border/50 border-t px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(E.GitCommitHorizontal,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate","data-testid":"repository-node-commit-message",children:e.commitMessage}),e.committer?(0,t.jsxs)("span",{className:"text-muted-foreground/70 ml-auto flex shrink-0 items-center gap-1","data-testid":"repository-node-committer",children:[(0,t.jsx)(C,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.committer})]}):null]})}):null]}):"not-a-repo"===e.gitInfoStatus?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{"data-testid":"repository-node-not-repo",className:"text-muted-foreground border-border/50 border-t px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(b.FolderOpen,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate opacity-60",children:e.repositoryPath??"Unknown path"})]})}),(0,t.jsx)("div",{className:"text-muted-foreground border-border/50 border-t px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs opacity-40",children:[(0,t.jsx)(j.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:"Not a git repository"})]})})]}):"ready"!==e.gitInfoStatus?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{"data-testid":"repository-node-git-loading",className:"border-border/50 border-t px-4 py-2",children:(0,t.jsxs)("div",{className:"flex h-4 items-center gap-2 text-xs",children:[(0,t.jsx)(j.GitBranch,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"bg-muted h-3 w-20 animate-pulse rounded"})]})}),(0,t.jsx)("div",{className:"border-border/50 border-t px-4 py-2",children:(0,t.jsxs)("div",{className:"flex h-4 items-center gap-2 text-xs",children:[(0,t.jsx)(E.GitCommitHorizontal,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"bg-muted h-3 w-36 animate-pulse rounded"})]})})]}):null,i.envDeploy&&e.repositoryPath?(0,t.jsx)("div",{"data-testid":"repository-node-dev-preview",className:"border-border/50 border-t px-4 py-2",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[T.deployError?(0,t.jsx)("span",{className:"truncate text-xs text-red-500",children:T.deployError}):L?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mr-0.5 inline-block h-2 w-2 shrink-0 rounded-full bg-green-500"}),T.url?(0,t.jsx)("a",{href:T.url,target:"_blank",rel:"noopener noreferrer",className:"truncate text-green-700 hover:underline dark:text-green-400",children:T.url}):(0,t.jsx)("span",{className:"text-muted-foreground",children:"Starting..."})]}):(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Run",(0,t.jsx)("span",{className:"text-muted-foreground/50 ml-2 text-[10px]",children:"start local environment"})]}),(0,t.jsx)(S.TooltipProvider,{children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:(0,d.cn)("ml-auto flex items-center",!L&&!T.deployError&&"[&_button]:text-green-600 [&_button]:hover:text-green-700 dark:[&_button]:text-green-400 dark:[&_button]:hover:text-green-300"),children:(0,t.jsx)(_.ActionButton,{label:T.deployError?"Retry":L?"Stop Dev Server":"Start Dev Server",onClick:L?T.stop:T.deploy,loading:T.deployLoading||T.stopLoading,error:!1,icon:T.deployError?u.RotateCcw:L?k.Square:w.Play,iconOnly:!0,variant:"ghost",size:"icon-xs"})})}),(0,t.jsx)(S.TooltipContent,{children:L?"Stop Dev Server":"Start Dev Server"})]})})]})}):null]}),e.onAdd||e.showHandles?(0,t.jsx)(r.Handle,{type:"source",position:g.Position.Right,isConnectable:!e.showHandles,className:"opacity-0!",style:{top:70}}):null]})}function L(e){let[n]=(0,g.getBezierPath)({sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition});return(0,t.jsx)(r.BaseEdge,{id:e.id,path:n,style:{strokeDasharray:"5 5"}})}e.i(1650),e.i(45811),e.i(25235);let A={x:30,y:30,zoom:.85};function D({onResetViewport:e}){let{setViewport:n}=(0,r.useReactFlow)(),o=(0,a.useCallback)(()=>{n(e(),{duration:400})},[e,n]);return(0,t.jsx)(r.ControlButton,{onClick:o,title:"Reset view","aria-label":"Reset view",children:(0,t.jsx)(u.RotateCcw,{style:{fill:"none"}})})}function I({nodes:e,edges:n,selectedFeatureId:o,selectedRepository:s,defaultViewport:i,onNodesChange:l,onAddFeature:u,onConnect:g,onNodeClick:m,onPaneClick:x,onCanvasDrag:v,onMoveEnd:b,onResetViewport:y,toolbar:w,emptyState:k}){let j=(0,a.useMemo)(()=>({featureNode:p.FeatureNode,repositoryNode:T}),[]),E=(0,a.useMemo)(()=>({dependencyEdge:L}),[]),N=(0,a.useMemo)(()=>{let t=null!=o,r=null!=s&&(null!=s.id||null!=s.path);return t||r?e.map(e=>{if(t&&"featureNode"===e.type&&e.data.featureId===o)return{...e,selected:!0};if(r&&"repositoryNode"===e.type){let t=e.data,r=null!=s.id&&(e.id===s.id||t.id===s.id),n=null!=s.path&&t.repositoryPath===s.path;if(r||n)return{...e,selected:!0}}return e}):e},[e,o,s]),C=0===e.length,[_,O]=(0,a.useState)(C),[S,R]=(0,a.useState)(!1),M=(0,a.useRef)(C);(0,a.useEffect)(()=>{if(M.current&&!C){R(!0);let e=setTimeout(()=>{O(!1),R(!1)},300);return M.current=C,()=>clearTimeout(e)}!M.current&&C&&O(!0),M.current=C},[C]);let P=C&&!k?(0,t.jsx)(f.EmptyState,{title:"No features yet",description:"Get started by creating your first feature.",action:(0,t.jsxs)(h.Button,{onClick:u,children:[(0,t.jsx)(c.Plus,{className:"mr-2 h-4 w-4"}),"New Feature"]})}):null,F=k??P;return(0,t.jsxs)("div",{"data-testid":C?"features-canvas-empty":"features-canvas","data-no-drawer-close":!0,className:"dark:bg-background pointer-events-auto relative h-full w-full bg-[#f6f7f8]",children:[(0,t.jsxs)(r.ReactFlow,{nodes:N,edges:n,nodeTypes:j,edgeTypes:E,onConnect:g,onNodesChange:l,onNodeClick:m,onPaneClick:x,onMoveStart:v,onMoveEnd:b,defaultViewport:i??A,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},className:"[&_.react-flow__pane]:!cursor-default",children:[(0,t.jsx)(r.Background,{variant:r.BackgroundVariant.Dots,gap:24,size:1,color:"#b8bcc4",className:"dark:[&_circle]:!fill-white/[0.1]"}),!C&&(0,t.jsx)(r.Controls,{showInteractive:!1,children:y?(0,t.jsx)(D,{onResetViewport:y}):null}),w]}),_&&F?(0,t.jsx)("div",{className:(0,d.cn)("pointer-events-none absolute inset-0 z-10 flex items-center justify-center transition-opacity duration-300",S?"opacity-0":"animate-in fade-in opacity-100 duration-200"),children:(0,t.jsx)("div",{className:"pointer-events-auto h-full w-full",children:F})}):null]})}var $=e.i(5147),z=e.i(8361),G=e.i(30153);let B="shep-canvas-viewport",U={x:30,y:30,zoom:.85};var q=e.i(33548),W=e.i(23925),H=e.i(83428),V=e.i(35e3),X=e.i(79687),J=e.i(99105),K=e.i(30702),Y=e.i(78521);e.i(13322);var Q=e.i(61201),Z=e.i(21023);let ee=(0,Z.createServerReference)("00d07362b3e1a68c948f0c69f46f29e6125be3849d",Z.callServer,void 0,Z.findSourceMapURL,"isAgentSetupComplete"),et=(0,Z.createServerReference)("00c511930b25e4bcbe2dbd1e9137bbe549be9fd0e4",Z.callServer,void 0,Z.findSourceMapURL,"checkAgentAuth"),er=(0,Z.createServerReference)("0008458957fa982cec9ce0719bdf4e159584e5f09e",Z.callServer,void 0,Z.findSourceMapURL,"checkToolStatus");var en=e.i(11345),ea=e.i(58481),eo=e.i(28487),es=e.i(89362),ei=e.i(86782),el=e.i(29847);let ed=["select-agent","select-model"];function ec({onComplete:e,className:r}){let[n,o]=(0,a.useState)([]),[s,i]=(0,a.useState)(!0),[l,c]=(0,a.useState)("select-agent"),[u,h]=(0,a.useState)(null),[f,p]=(0,a.useState)(!1),[g,m]=(0,a.useState)(!1),[x,v]=(0,a.useState)(!0),b=(0,a.useRef)(void 0);(0,a.useEffect)(()=>{(0,eo.getAllAgentModels)().then(o).finally(()=>i(!1))},[]);let y=u?n.find(e=>e.agentType===u):null,w=(0,a.useCallback)((e,t)=>{m(!0),v(!1),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{t?.(),c(e),requestAnimationFrame(()=>{v(!0),m(!1)})},150)},[]);(0,a.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let k=(0,a.useCallback)(async(t,r)=>{p(!0);try{await (0,es.updateAgentAndModel)(t,r),v(!1),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{e()},200)}catch{p(!1)}},[e]),j=(0,a.useCallback)(e=>{let t=n.find(t=>t.agentType===e);t&&t.models.length>0?w("select-model",()=>{h(e)}):k(e,null)},[n,w,k]),E=(0,a.useCallback)(e=>{u&&k(u,e)},[u,k]),N=(0,a.useCallback)(()=>{"select-model"===l&&w("select-agent",()=>{h(null)})},[l,w]);if(s)return(0,t.jsxs)("div",{"data-testid":"welcome-agent-setup",className:(0,d.cn)("flex flex-col items-center justify-center gap-4",r),children:[(0,t.jsx)(H.Loader2,{className:"text-muted-foreground h-5 w-5 animate-spin"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Loading agents…"})]});let C=ed.indexOf(l),_="select-agent"===l?"Choose your agent":"Pick a model",O="select-agent"===l?"Select the AI coding agent you want Shep to use.":y?`Choose which ${y.label} model to run.`:"";return(0,t.jsxs)("div",{"data-testid":"welcome-agent-setup",className:(0,d.cn)("flex w-full flex-col items-center",r),children:[(0,t.jsx)("div",{className:"mb-8 flex w-full max-w-xs items-center gap-1.5",children:ed.map((e,r)=>(0,t.jsx)("div",{className:(0,d.cn)("h-[3px] flex-1 rounded-full transition-colors duration-300",r<=C?"bg-foreground/60":"bg-muted")},e))}),(0,t.jsxs)("div",{className:(0,d.cn)("flex w-full flex-col items-center transition-opacity duration-200",x&&!g?"opacity-100":"opacity-0"),children:[(0,t.jsx)("h1",{className:"text-foreground/90 text-center text-5xl font-extralight tracking-tight",children:_}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 text-center text-lg leading-relaxed font-light",children:O}),"select-agent"===l&&(0,t.jsxs)("div",{"data-testid":"gh-cli-notice",className:"mt-5 flex items-start gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 dark:border-amber-900 dark:bg-amber-950/40",children:[(0,t.jsx)(ea.AlertTriangle,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-500"}),(0,t.jsxs)("p",{className:"text-sm leading-relaxed text-amber-800 dark:text-amber-300",children:[(0,t.jsx)("span",{className:"font-medium",children:"GitHub CLI (gh)"})," is required for full CI/CD self-healing capabilities."," ",(0,t.jsx)("a",{href:"https://cli.github.com/",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 hover:text-amber-900 dark:hover:text-amber-200",children:"Install it here"}),"."]})]}),(0,t.jsxs)("div",{className:"mt-8 flex w-full flex-col items-center",children:["select-agent"===l&&(0,t.jsx)("div",{"data-testid":"agent-list",className:"grid w-full max-w-lg gap-3",style:{gridTemplateColumns:`repeat(${Math.min(n.length,4)}, minmax(0, 1fr))`},children:n.map(e=>{let r=(0,ei.getAgentTypeIcon)(e.agentType);return(0,t.jsxs)("button",{type:"button",disabled:f,"data-testid":`agent-option-${e.agentType}`,className:"border-border hover:bg-accent hover:border-foreground/20 flex cursor-pointer flex-col items-center gap-3 rounded-2xl border px-4 py-5 transition-all duration-150 active:scale-[0.97] disabled:opacity-50",onClick:()=>j(e.agentType),children:[(0,t.jsx)(r,{className:"text-foreground/70 h-7 w-7"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:e.label})]},e.agentType)})}),"select-model"===l&&y?(0,t.jsxs)("div",{"data-testid":"model-list",className:"flex w-full max-w-lg flex-col items-center gap-4",children:[(0,t.jsxs)("button",{type:"button",disabled:f,className:"text-muted-foreground hover:text-foreground flex cursor-pointer items-center gap-1.5 self-start text-sm transition-colors",onClick:N,children:[(0,t.jsx)(en.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,t.jsx)("div",{className:"grid w-full gap-3",style:{gridTemplateColumns:`repeat(${Math.min(y.models.length,3)}, minmax(0, 1fr))`},children:y.models.map(e=>{let r=(0,el.getModelMeta)(e.id);return(0,t.jsxs)("button",{type:"button",disabled:f,"data-testid":`model-option-${e.id}`,className:"border-border hover:bg-accent hover:border-foreground/20 flex cursor-pointer flex-col items-center gap-2 rounded-2xl border px-4 py-5 text-center transition-all duration-150 active:scale-[0.97] disabled:opacity-50",onClick:()=>E(e.id),children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:r.displayName||e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs leading-tight",children:r.description||e.description})]},e.id)})})]}):null]})]})]})}let eu=["cd ~/my-repo",'shep feat new "sleek dashboard"'];function eh({onRepositorySelect:e,className:r}){let[n,o]=(0,a.useState)(!1),[s,i]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1),[u,h]=(0,a.useState)(null),[f,p]=(0,a.useState)(null),[g,m]=(0,a.useState)(!1),[x,y]=(0,a.useState)(null),{reactFileManager:w}=(0,M.useFeatureFlags)();async function k(){if(!s){if(w)return void c(!0);i(!0);try{let t=await (0,Y.pickFolder)();t&&e?.(t)}catch{c(!0)}finally{i(!1)}}}(0,a.useEffect)(()=>{ee().then(e=>{h(e)})},[]),(0,a.useEffect)(()=>{u&&(et().then(p),er().then(y))},[u]);let j=(0,a.useCallback)(async()=>{await navigator.clipboard.writeText(eu.join("\n")),o(!0),setTimeout(()=>o(!1),2e3)},[]),E=(0,a.useCallback)(()=>{h(!0)},[]),N=(0,a.useCallback)(()=>{p(null),et().then(p)},[]);return null===u?null:(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,d.cn)("relative flex h-full w-full flex-col items-center justify-center px-8",r),children:[u?(0,t.jsxs)("div",{className:"animate-in fade-in flex w-full max-w-md flex-col items-center duration-300",children:[(0,t.jsx)("h1",{className:"text-foreground/90 text-center text-5xl font-extralight tracking-tight",children:"Add a project"}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-3 text-center text-lg leading-relaxed font-light",children:["Add your project folder to unlock feature creation.",(0,t.jsx)("br",{}),"Describe what you need — Shep handles the rest."]}),(0,t.jsxs)("div",{className:"mt-8 flex w-full flex-col gap-3",children:[(0,t.jsx)(ef,{status:f,onRetry:N}),(0,t.jsx)(ep,{label:"Git",status:x?.git??null,missingHint:"Required for all phases"}),(0,t.jsx)(ep,{label:"GitHub CLI",status:x?.gh??null,missingHint:"Required for pull requests"})]}),(0,t.jsxs)("button",{type:"button","data-testid":"empty-state-add-repository",onClick:k,disabled:s,className:"bg-foreground text-background hover:bg-foreground/90 mt-10 flex w-full cursor-pointer items-center justify-center gap-2.5 rounded-xl px-6 py-4 text-base font-medium shadow-lg transition-all duration-200 hover:shadow-xl active:scale-[0.98] disabled:cursor-wait disabled:opacity-50",children:[s?(0,t.jsx)(H.Loader2,{className:"h-5 w-5 animate-spin"}):(0,t.jsx)(b.FolderOpen,{className:"h-5 w-5"}),s?"Opening…":"Choose a Folder"]}),(0,t.jsx)("p",{className:"text-muted-foreground/60 mt-3 text-center text-sm",children:"Any folder works — git will be initialized automatically if needed."})]}):(0,t.jsx)(ec,{onComplete:E}),u?(0,t.jsxs)("div",{className:"absolute bottom-8 flex flex-col items-center",style:{animationDelay:"400ms",animationDuration:"600ms",animationFillMode:"both"},children:[(0,t.jsxs)("button",{type:"button",onClick:()=>m(!g),className:"text-muted-foreground hover:text-foreground flex cursor-pointer items-center gap-1.5 transition-colors duration-200",children:[(0,t.jsx)(v.Terminal,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-sm",children:"or use the CLI"}),(0,t.jsx)(J.ChevronDown,{className:(0,d.cn)("h-3.5 w-3.5 transition-transform duration-200",g?"":"rotate-180")})]}),g?(0,t.jsx)("div",{className:"animate-in fade-in slide-in-from-top-1 mt-3 w-80 duration-200",children:(0,t.jsxs)("div",{"data-testid":"cli-code-block",className:"relative rounded-xl bg-zinc-900 px-5 py-4 font-mono text-[13px] leading-relaxed text-zinc-400",children:[(0,t.jsx)("button",{type:"button","data-testid":"cli-code-block-copy",onClick:j,className:"absolute top-3 right-3 cursor-pointer rounded-md p-1.5 text-zinc-600 transition-colors hover:bg-zinc-800 hover:text-zinc-300","aria-label":"Copy commands",children:n?(0,t.jsx)(W.Check,{className:"h-3.5 w-3.5 text-emerald-400"}):(0,t.jsx)(q.Copy,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("div",{className:"space-y-1",children:eu.map(e=>(0,t.jsxs)("div",{className:"whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-zinc-600 select-none",children:"$ "}),(0,t.jsx)("span",{className:"text-zinc-300",children:e})]},e))})]})}):null]}):null,(0,t.jsx)(Q.ReactFileManagerDialog,{open:l,onOpenChange:e=>{e||c(!1)},onSelect:function(t){t&&e?.(t),c(!1)}})]})}function ef({status:e,onRetry:r}){return e?e.installed&&e.authenticated?(0,t.jsx)(eg,{icon:(0,t.jsx)(V.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}),children:(0,t.jsxs)("span",{className:"text-sm text-emerald-600 dark:text-emerald-400",children:[e.label," ready"]})}):e.installed?(0,t.jsxs)(eg,{icon:(0,t.jsx)(X.AlertCircle,{className:"h-4 w-4 text-amber-500"}),children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:[e.label," needs authentication"]}),e.authCommand?(0,t.jsx)(em,{command:e.authCommand}):null,(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.binaryName?(0,t.jsxs)("button",{type:"button","data-testid":"auth-banner-open-terminal",onClick:async()=>{try{let t="claude-code"===e.agentType?"claude-code":e.agentType;await fetch(`/api/tools/${t}/launch`,{method:"POST"})}catch{}},className:"flex items-center gap-1 text-xs font-medium text-amber-600 underline underline-offset-2 hover:text-amber-800 dark:text-amber-400",children:[(0,t.jsx)(v.Terminal,{className:"h-3 w-3"}),"Open ",e.label]}):null,(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs text-amber-600 underline underline-offset-2 hover:text-amber-800 dark:text-amber-400",children:"Re-check"})]})]}):(0,t.jsxs)(eg,{icon:(0,t.jsx)(X.AlertCircle,{className:"h-4 w-4 text-amber-500"}),children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:[e.label," not installed"]}),e.installCommand?(0,t.jsx)(em,{command:e.installCommand}):null,(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs text-amber-600 underline underline-offset-2 hover:text-amber-800 dark:text-amber-400",children:"Re-check"})]}):(0,t.jsx)(eg,{icon:(0,t.jsx)(H.Loader2,{className:"text-muted-foreground/50 h-4 w-4 animate-spin"}),children:(0,t.jsx)("span",{className:"text-muted-foreground/50 text-sm",children:"Checking setup…"})})}function ep({label:e,status:r,missingHint:n}){return r?r.installed?(0,t.jsx)(eg,{icon:(0,t.jsx)(V.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}),children:(0,t.jsxs)("span",{className:"flex items-baseline gap-2",children:[(0,t.jsxs)("span",{className:"text-sm text-emerald-600 dark:text-emerald-400",children:[e," ready"]}),r.version?(0,t.jsxs)("span",{className:"text-muted-foreground/40 text-xs",children:["v",r.version]}):null]})}):(0,t.jsxs)(eg,{icon:(0,t.jsx)(X.AlertCircle,{className:"h-4 w-4 text-amber-500"}),children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:[e," not found"]}),(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:n}),r.installCommand?(0,t.jsx)(em,{command:r.installCommand}):null,r.installUrl?(0,t.jsxs)("a",{href:r.installUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-amber-600 underline underline-offset-2 hover:text-amber-800 dark:text-amber-400",children:["Docs ",(0,t.jsx)(K.ExternalLink,{className:"h-3 w-3"})]}):null]}):(0,t.jsx)(eg,{icon:(0,t.jsx)(H.Loader2,{className:"text-muted-foreground/50 h-4 w-4 animate-spin"}),children:(0,t.jsxs)("span",{className:"text-muted-foreground/50 text-sm",children:["Checking ",e,"…"]})})}function eg({icon:e,children:r}){return(0,t.jsxs)("div",{className:"animate-in fade-in flex items-start gap-2.5",children:[(0,t.jsx)("div",{className:"mt-0.5 shrink-0",children:e}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:r})]})}function em({command:e}){let[r,n]=(0,a.useState)(!1);return(0,t.jsxs)("button",{type:"button",onClick:async()=>{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},className:"group/cmd flex cursor-pointer items-center justify-between gap-2 rounded-md bg-zinc-100 py-1 pr-2 pl-2.5 text-left transition-colors hover:bg-zinc-200 dark:bg-zinc-800 dark:hover:bg-zinc-700",children:[(0,t.jsx)("code",{className:"min-w-0 truncate text-[11px] leading-relaxed text-zinc-600 dark:text-zinc-300",children:e}),r?(0,t.jsx)(W.Check,{className:"h-3 w-3 shrink-0 text-emerald-500"}):(0,t.jsx)(q.Copy,{className:"h-3 w-3 shrink-0 text-zinc-400 opacity-0 transition-opacity group-hover/cmd:opacity-100"})]})}var ex=e.i(17840);let ev={maxZoom:1,padding:.5,duration:500};function eb({initialNodes:e,initialEdges:n}){let i,c,u,h,f,p,g=(0,o.useRouter)(),m=(0,o.usePathname)(),x=(i=(0,o.usePathname)().match(/^\/feature\/([^/]+)/),i?.[1]??null),v=(c=(0,o.usePathname)(),u=(0,o.useSearchParams)(),h=c.match(/^\/repository\/([^/]+)/),{id:h?.[1]??null,path:c.startsWith("/create")?u.get("repo"):null}),b=(0,z.useSoundAction)("click"),{guardedNavigate:y}=(0,G.useDrawerCloseGuard)(),{fitView:w}=(0,r.useReactFlow)(),k=(0,a.useRef)(null),{defaultViewport:j,onMoveEnd:E,resetViewport:N}=(f=(0,a.useRef)(function(){try{let e=localStorage.getItem(B);if(null==e)return U;let t=JSON.parse(e);return!(null==t||"object"!=typeof t||Array.isArray(t))&&"number"==typeof t.x&&"number"==typeof t.y&&"number"==typeof t.zoom&&Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.zoom)&&t.zoom>0?t:U}catch{return U}}()).current,p=(0,a.useRef)(null),(0,a.useEffect)(()=>()=>{null!=p.current&&clearTimeout(p.current)},[]),{defaultViewport:f,onMoveEnd:(0,a.useCallback)(e=>{null!=p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{try{localStorage.setItem(B,JSON.stringify(e))}catch{}},500)},[]),resetViewport:(0,a.useCallback)(()=>{try{localStorage.removeItem(B)}catch{}return U},[])}),{nodes:C,edges:_,onNodesChange:O,handleConnect:S,handleAddRepository:R,handleArchiveFeature:M,handleDeleteFeature:P,handleRetryFeature:F,handleStartFeature:T,handleStopFeature:L,handleUnarchiveFeature:A,handleDeleteRepository:D,createFeatureNode:q,showArchived:W,setShowArchived:H,setCallbacks:V}=(0,ex.useControlCenterState)(e,n),{setFeatures:X,setHasRepositories:J}=(0,$.useSidebarFeaturesContext)(),K=(0,a.useMemo)(()=>C.filter(e=>"featureNode"===e.type),[C]),Y=(0,a.useMemo)(()=>K.map(e=>{let t=e.data;return`${t.featureId}:${t.state}:${t.name}`}).sort().join(","),[K]);(0,a.useEffect)(()=>{X(K.map(e=>{let t=e.data,r=(0,$.mapNodeStateToSidebarStatus)(t.state);return r?{featureId:t.featureId,name:t.name,status:r,...null!=t.startedAt&&{startedAt:t.startedAt},...null!=t.runtime&&{duration:t.runtime},...t.agentType&&{agentType:t.agentType},...t.modelId&&{modelId:t.modelId}}:null}).filter(Boolean))},[Y,K,X]);let Q=(0,a.useCallback)((e,t)=>{if("featureNode"===t.type){let r=t.data;"creating"!==r.state&&"deleting"!==r.state&&e.target.closest('[data-testid="feature-node-card"]')&&y(()=>{b.play(),g.push(`/feature/${r.featureId}`)})}},[g,b,y]),Z=(0,a.useCallback)(()=>{b.play(),g.push("/create")},[g,b]),ee=(0,a.useCallback)(e=>{b.play();let t=C.find(t=>t.id===e),r=t?.data?.repositoryPath;r?g.push(`/create?repo=${encodeURIComponent(r)}`):g.push("/create")},[C,g,b]),et=(0,a.useCallback)(e=>{let t=e.startsWith("feat-")?e.slice(5):e,r=_.find(t=>t.target===e),n=r?C.find(e=>e.id===r.source):null,a=n?.data?.repositoryPath;b.play();let o=new URLSearchParams;a&&o.set("repo",a),o.set("parent",t),g.push(`/create?${o.toString()}`)},[C,_,g,b]),er=(0,a.useCallback)(e=>{let t=C.find(t=>t.id===e);if(t?.type==="repositoryNode"){let e=t.data;e.id&&y(()=>g.push(`/repository/${e.id}`))}},[C,g,y]),en=(0,a.useCallback)(()=>{"/"!==m&&y(()=>g.push("/"))},[g,m,y]),ea=(0,a.useCallback)(e=>{setTimeout(()=>{w(ev),k.current=setTimeout(()=>{y(()=>g.push(`/create?repo=${encodeURIComponent(e)}`))},600)},0)},[w,y,g]),eo=(0,a.useCallback)(e=>{let{wasEmpty:t,repoPath:r}=R(e);t&&ea(r)},[R,ea]);(0,a.useEffect)(()=>{let e=e=>{eo(e.detail.path)};return window.addEventListener("shep:add-repository",e),()=>{window.removeEventListener("shep:add-repository",e),null!=k.current&&clearTimeout(k.current)}},[eo]),(0,a.useEffect)(()=>{let e=e=>{let t=e.detail;if(t.parentId)return void q(`feat-${t.parentId}`,{state:"creating",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath},"dependencyEdge");let r=C.find(e=>"repositoryNode"===e.type&&e.data.repositoryPath===t.repositoryPath);q(r?.id??null,{state:"running",featureId:t.featureId,name:t.name,description:t.description,repositoryPath:t.repositoryPath})};return window.addEventListener("shep:feature-created",e),()=>window.removeEventListener("shep:feature-created",e)},[C,q]),(0,a.useEffect)(()=>{let e=e=>{let{featureId:t,cleanup:r,cascadeDelete:n,closePr:a}=e.detail;P(t,r,n,a)};return window.addEventListener("shep:feature-delete-requested",e),()=>window.removeEventListener("shep:feature-delete-requested",e)},[P]),(0,a.useEffect)(()=>{V({onNodeAction:et,onFeatureDelete:P,onRetryFeature:F,onStartFeature:T,onStopFeature:L,onArchiveFeature:M,onUnarchiveFeature:A,onRepositoryAdd:ee,onRepositoryClick:er,onRepositoryDelete:D})},[V,et,M,P,F,T,L,A,ee,er,D]);let es=(0,a.useCallback)((e,t)=>{E(t)},[E]),ei=C.some(e=>"repositoryNode"===e.type);(0,a.useEffect)(()=>{J(ei)},[ei,J]);let[el,ed]=(0,a.useState)(ei),ec=(0,a.useRef)(null);(0,a.useEffect)(()=>(ei?(ec.current&&(clearTimeout(ec.current),ec.current=null),ed(!0)):el&&(N(),ec.current=setTimeout(()=>{ed(!1),ec.current=null},500)),()=>{ec.current&&clearTimeout(ec.current)}),[ei,el,N]);let eu=m.startsWith("/create"),ef=(0,a.useMemo)(()=>{let e=C.filter(e=>"repositoryNode"===e.type),t=C.some(e=>"featureNode"===e.type);return 1!==e.length||t||eu?C:C.map(e=>"repositoryNode"===e.type?{...e,data:{...e.data,pulseAdd:!0}}:e)},[C,eu]),ep=(0,t.jsx)(r.Panel,{position:"top-right",children:(0,t.jsxs)("button",{type:"button","aria-label":W?"Hide archived features":"Show archived features","data-testid":"archive-toggle-button",onClick:()=>H(!W),className:(0,d.cn)("bg-card flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium shadow-sm transition-colors",W?"border-primary/30 text-primary":"text-muted-foreground hover:text-foreground"),children:[W?(0,t.jsx)(s.Eye,{className:"h-3.5 w-3.5"}):(0,t.jsx)(l,{className:"h-3.5 w-3.5"}),W?"Archived visible":"Show archived"]})});return(0,t.jsx)(I,{nodes:el?ef:[],edges:el?_:[],selectedFeatureId:x,selectedRepository:v,defaultViewport:j,onNodesChange:O,onConnect:S,onAddFeature:Z,onNodeClick:Q,onPaneClick:en,onMoveEnd:es,onResetViewport:N,toolbar:ep,emptyState:(0,t.jsx)(eh,{onRepositorySelect:eo})})}function ey({initialNodes:e,initialEdges:a,drawer:o}){return(0,t.jsxs)("div",{"data-testid":"control-center",className:"h-full w-full",children:[(0,t.jsx)(n.SessionsProvider,{children:(0,t.jsx)(r.ReactFlowProvider,{children:(0,t.jsx)(eb,{initialNodes:e,initialEdges:a})})}),(0,t.jsx)("div",{children:o},"drawer")]})}e.s(["ControlCenter",()=>ey],48246)}]);