@minimalcorp/tsunagi 0.1.43 → 0.1.45

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 (48) hide show
  1. package/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  2. package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
  3. package/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  12. package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  14. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  15. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  16. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  18. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  19. package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
  20. package/.next/standalone/apps/web/.next/server/app/index.rsc +2 -2
  21. package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  22. package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +2 -2
  23. package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  24. package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  25. package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  26. package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/apps/web/.next/server/app/settings.html +1 -1
  28. package/.next/standalone/apps/web/.next/server/app/settings.rsc +1 -1
  29. package/.next/standalone/apps/web/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  30. package/.next/standalone/apps/web/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  31. package/.next/standalone/apps/web/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  32. package/.next/standalone/apps/web/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  33. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  34. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  35. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0g.cd6a._.js +2 -2
  36. package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
  37. package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
  38. package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  39. package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
  40. package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  41. package/.next/standalone/apps/web/.next/static/chunks/{0u_07wgcigiqu.js → 1058etup1xz7n.js} +2 -2
  42. package/dist/cli.js +4 -2
  43. package/dist/server/routes/repos.js +20 -15
  44. package/npm-shrinkwrap.json +193 -5
  45. package/package.json +3 -2
  46. /package/.next/standalone/apps/web/.next/static/{oMoJ6ksWSsDkoV7dPvxim → _UgZlh-9t1rlWoj3jUZz0}/_buildManifest.js +0 -0
  47. /package/.next/standalone/apps/web/.next/static/{oMoJ6ksWSsDkoV7dPvxim → _UgZlh-9t1rlWoj3jUZz0}/_clientMiddlewareManifest.js +0 -0
  48. /package/.next/standalone/apps/web/.next/static/{oMoJ6ksWSsDkoV7dPvxim → _UgZlh-9t1rlWoj3jUZz0}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0apjd6p1xsnc3.js"/><script src="/_next/static/chunks/02i7dfk78~t~2.js" async=""></script><script src="/_next/static/chunks/0.76ju_ex-wmx.js" async=""></script><script src="/_next/static/chunks/11rs2-0jl1rzr.js" async=""></script><script src="/_next/static/chunks/turbopack-07pr2uza0.4cp.js" async=""></script><script src="/_next/static/chunks/0fsi8lw5utejl.js" async=""></script><script src="/_next/static/chunks/04ygsac3q3ar..js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0apjd6p1xsnc3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"oMoJ6ksWSsDkoV7dPvxim\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0apjd6p1xsnc3.js"/><script src="/_next/static/chunks/02i7dfk78~t~2.js" async=""></script><script src="/_next/static/chunks/0.76ju_ex-wmx.js" async=""></script><script src="/_next/static/chunks/11rs2-0jl1rzr.js" async=""></script><script src="/_next/static/chunks/turbopack-07pr2uza0.4cp.js" async=""></script><script src="/_next/static/chunks/0fsi8lw5utejl.js" async=""></script><script src="/_next/static/chunks/04ygsac3q3ar..js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0apjd6p1xsnc3.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0fsi8lw5utejl.js\",\"/_next/static/chunks/04ygsac3q3ar..js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_UgZlh-9t1rlWoj3jUZz0\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"xk3gXSfyUpWpNV4ZetwTGG4XO+XoXMO99+tfluuWvy0=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"WJXxkt4RPJ26cTJmimIEdzqr5oE4BJ9CdTzGZOdi6iQ=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "xk3gXSfyUpWpNV4ZetwTGG4XO+XoXMO99+tfluuWvy0="
4
+ "encryptionKey": "WJXxkt4RPJ26cTJmimIEdzqr5oE4BJ9CdTzGZOdi6iQ="
5
5
  }
@@ -1,6 +1,6 @@
1
1
  (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88143,(e,t,r)=>{"use strict";function n({widthInt:e,heightInt:t,blurWidth:r,blurHeight:l,blurDataURL:i,objectFit:a}){let o=r?40*r:e,s=l?40*l:t,d=o&&s?`viewBox='0 0 ${o} ${s}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${d}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${d?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${i}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return a}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let i=["default","imgix","cloudinary","akamai","custom"],a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return d}}),e.r(33525);let n=e.r(43369),l=e.r(88143),i=e.r(87690),a=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function s(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function d({src:e,sizes:t,unoptimized:r=!1,priority:u=!1,preload:c=!1,loading:p,className:f,quality:m,width:g,height:h,fill:b=!1,style:x,overrideSrc:y,onLoad:v,onLoadingComplete:w,placeholder:N="empty",blurDataURL:I,fetchPriority:E,decoding:D="async",layout:C,objectFit:S,objectPosition:P,lazyBoundary:O,lazyRoot:j,...R},A){var k;let T,B,_,{imgConf:M,showAltText:L,blurComplete:G,defaultLoader:$}=A,F=M||i.imageConfigDefault;if("allSizes"in F)T=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);T={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===$)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let z=R.loader||$;delete R.loader,delete R.srcSet;let U="__next_img_default"in z;if(U){if("custom"===T.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2
2
  Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=z;z=t=>{let{config:r,...n}=t;return e(n)}}if(C){"fill"===C&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[C];e&&(x={...x,...e});let r={responsive:"100vw",fill:"100vw"}[C];r&&!t&&(t=r)}let W="",H=s(g),V=s(h);if((k=e)&&"object"==typeof k&&(o(k)||void 0!==k.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(B=t.blurWidth,_=t.blurHeight,I=I||t.blurDataURL,W=t.src,!b)if(H||V){if(H&&!V){let e=H/t.width;V=Math.round(t.height*e)}else if(!H&&V){let e=V/t.height;H=Math.round(t.width*e)}}else H=t.width,V=t.height}let q=!u&&!c&&("lazy"===p||void 0===p);(!(e="string"==typeof e?e:W)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,q=!1),T.unoptimized&&(r=!0),U&&!T.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let Y=s(m),J=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:P}:{},L?{}:{color:"transparent"},x),X=G||"empty"===N?null:"blur"===N?`url("data:image/svg+xml;charset=utf-8,${(0,l.getImageBlurSvg)({widthInt:H,heightInt:V,blurWidth:B,blurHeight:_,blurDataURL:I||"",objectFit:J.objectFit})}")`:`url("${N}")`,K=a.includes(J.objectFit)?"fill"===J.objectFit?"100% 100%":"cover":J.objectFit,Q=X?{backgroundSize:K,backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},Z=function({config:e,src:t,unoptimized:r,width:l,quality:i,sizes:a,loader:o}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,n.getDeploymentId)();if(e){let r=t.indexOf("?");if(-1!==r){let n=new URLSearchParams(t.slice(r+1));n.get("dpl")||(n.append("dpl",e),t=t.slice(0,r)+"?"+n.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:s,kind:d}=function({deviceSizes:e,allSizes:t},r,n){if(n){let r=/(^|\s)(1?\d?\d)vw/g,l=[];for(let e;e=r.exec(n);)l.push(parseInt(e[2]));if(l.length){let r=.01*Math.min(...l);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,l,a),u=s.length-1;return{sizes:a||"w"!==d?a:"100vw",srcSet:s.map((r,n)=>`${o({config:e,src:t,quality:i,width:r})} ${"w"===d?r:n+1}${d}`).join(", "),src:o({config:e,src:t,quality:i,width:s[u]})}}({config:T,src:e,unoptimized:r,width:H,quality:Y,sizes:t,loader:z}),ee=q?"lazy":p;return{props:{...R,loading:ee,fetchPriority:E,width:H,height:V,decoding:D,className:f,style:{...J,...Q},sizes:Z.sizes,srcSet:Z.srcSet,src:y||Z.src},meta:{unoptimized:r,preload:c||u,placeholder:N,fill:b}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(71645),l="u"<typeof window,i=l?()=>{}:n.useLayoutEffect,a=l?()=>{}:n.useEffect;function o(e){let{headManager:t,reduceComponentsToState:r}=e;function o(){if(t&&t.mountedInstances){let e=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return l&&(t?.mountedInstances?.add(e.children),o()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},defaultHead:function(){return c}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let i=e.r(55682),a=e.r(90809),o=e.r(18050),s=a._(e.r(71645)),d=i._(e.r(98879)),u=e.r(42732);function c(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===s.default.Fragment?e.concat(s.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let f=["name","httpEquiv","charSet","itemProp"];function m(e){let t,r,n,l;return e.reduce(p,[]).reverse().concat(c().reverse()).filter((t=new Set,r=new Set,n=new Set,l={},e=>{let i=!0,a=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){a=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=f.length;t<r;t++){let r=f[t];if(e.props.hasOwnProperty(r))if("charSet"===r)n.has(r)?i=!1:n.add(r);else{let t=e.props[r],n=l[r]||new Set;("name"!==r||!a)&&n.has(t)?i=!1:(n.add(t),l[r]=n)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return s.default.cloneElement(e,{key:r})})}let g=function({children:e}){let t=(0,s.useContext)(u.HeadManagerContext);return(0,o.jsx)(d.default,{reduceComponentsToState:m,headManager:t,children:e})};("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)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let n=e.r(55682)._(e.r(71645)),l=e.r(87690),i=n.default.createContext(l.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return n}});let n=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,r)=>{"use strict";function n(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return n}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let n=e.r(70965),l=e.r(43369);function i({config:e,src:t,width:r,quality:a}){let o=(0,l.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),n=r.get("dpl");if(n){o=n,r.delete("dpl");let l=r.toString();t=t.slice(0,e)+(l?"?"+l:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
- Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let s=(0,n.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${s}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}i.__next_img_default=!0;let a=i},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t){let r=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=i(e,n)),t&&(l.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("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)},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let n=e.r(55682),l=e.r(90809),i=e.r(18050),a=l._(e.r(71645)),o=n._(e.r(74080)),s=n._(e.r(25633)),d=e.r(8927),u=e.r(87690),c=e.r(18556);e.r(33525);let p=e.r(65856),f=n._(e.r(1948)),m=e.r(18581),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function h(e,t,r,n,l,i,a){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&l(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,l=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>l,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{l=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function b(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let x=(0,a.forwardRef)(({src:e,srcSet:t,sizes:r,height:n,width:l,decoding:o,className:s,style:d,fetchPriority:u,placeholder:c,loading:p,unoptimized:f,fill:g,onLoadRef:x,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:w,sizesInput:N,onLoad:I,onError:E,...D},C)=>{let S=(0,a.useCallback)(e=>{e&&(E&&(e.src=e.src),e.complete&&h(e,c,x,y,v,f,N))},[e,c,x,y,v,E,f,N]),P=(0,m.useMergedRef)(C,S);return(0,i.jsx)("img",{...D,...b(u),loading:p,width:l,height:n,decoding:o,"data-nimg":g?"fill":"1",className:s,style:d,sizes:r,srcSet:t,src:e,ref:P,onLoad:e=>{h(e.currentTarget,c,x,y,v,f,N)},onError:e=>{w(!0),"empty"!==c&&v(!0),E&&E(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...b(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,r),null):(0,i.jsx)(s.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,a.forwardRef)((e,t)=>{let r=(0,a.useContext)(p.RouterContext),n=(0,a.useContext)(c.ImageConfigContext),l=(0,a.useMemo)(()=>{let e=g||n||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),l=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:l,localPatterns:"u"<typeof window?n?.localPatterns:e.localPatterns}},[n]),{onLoad:o,onLoadingComplete:s}=e,m=(0,a.useRef)(o);(0,a.useEffect)(()=>{m.current=o},[o]);let h=(0,a.useRef)(s);(0,a.useEffect)(()=>{h.current=s},[s]);let[b,v]=(0,a.useState)(!1),[w,N]=(0,a.useState)(!1),{props:I,meta:E}=(0,d.getImgProps)(e,{defaultLoader:f.default,imgConf:l,blurComplete:b,showAltText:w});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x,{...I,unoptimized:E.unoptimized,placeholder:E.placeholder,fill:E.fill,onLoadRef:m,onLoadingCompleteRef:h,setBlurComplete:v,setShowAltText:N,sizesInput:e.sizes,ref:t}),E.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:I}):null]})});("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)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return u},getImageProps:function(){return d}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let i=e.r(55682),a=e.r(8927),o=e.r(5500),s=i._(e.r(1948));function d(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let u=o.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},14595,(e,t,r)=>{"use strict";var n=e.r(71645),l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useSyncExternalStore,a=n.useRef,o=n.useEffect,s=n.useMemo,d=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,u){var c=a(null);if(null===c.current){var p={hasValue:!1,value:null};c.current=p}else p=c.current;var f=i(e,(c=s(function(){function e(e){if(!o){if(o=!0,i=e,e=n(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return a=t}return a=e}if(t=a,l(i,e))return t;var r=n(e);return void 0!==u&&u(t,r)?(i=e,t):(i=e,a=r)}var i,a,o=!1,s=void 0===r?null:r;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,r,n,u]))[0],c[1]);return o(function(){p.hasValue=!0,p.value=f},[f]),d(f),f}},13027,(e,t,r)=>{"use strict";t.exports=e.r(14595)},39798,e=>{"use strict";let t,r,n,l,i,a;var o=e.i(18050),s=e.i(71645),d=e.i(18566),u=e.i(75254);let c=(0,u.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var p=e.i(16715),f=e.i(57688);let m=(0,u.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),g=(0,u.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),h=(0,u.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var b=e.i(627),x=e.i(85902);function y(){let{theme:e,setTheme:t}=(0,b.useTheme)();return(0,o.jsx)("div",{className:"flex items-center gap-0.5 bg-input/20 dark:bg-input/30 rounded-md p-0.5",children:[{value:"light",icon:m,label:"Light"},{value:"dark",icon:g,label:"Dark"},{value:"system",icon:h,label:"System"}].map(({value:r,icon:n,label:l})=>(0,o.jsx)(x.Button,{variant:"ghost",size:"icon-lg",onClick:()=>t(r),className:e===r?"bg-primary text-primary-foreground shadow-sm hover:bg-primary/80 hover:text-primary-foreground dark:hover:bg-primary/80":"text-muted-foreground hover:text-foreground",title:l,children:(0,o.jsx)(n,{})},r))})}let v={src:e.i(50160).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAxElEQVR42o2OSwsBUQBG7x0lFxkyt1uETDKeGaSM8tgpLDxShBBZKBajbMeGlSkW0zQleSz8TcaG5Zz6VmfxHQCMACEFkYMQZMOYtjDYhQiBH77SZEYoXBlPhO5RLhSl/TyvaIusfC4HhhOzyYKAnQmyfP2guHE80S5eblPheg84U3wrJCnY6meBlfZ4hcZJjcQGo2b58erntGfJV+us+J3qRsSr/1MuhuPSmbWYTa421fBy24vORJZmOd39h1K/QQoY5Q2cnyKUZdwhkQAAAABJRU5ErkJggg=="};function w({onSettingsClick:e,onReload:t,nextStep:r="complete"}){return(0,o.jsxs)("header",{className:"h-14 border-b border-border flex items-center gap-3 px-4 bg-card",children:[(0,o.jsx)("h1",{className:"flex-shrink-0 flex items-center",children:(0,o.jsx)(f.default,{src:v,alt:"Tsunagi",width:32,height:32,priority:!0})}),(0,o.jsx)("div",{className:"flex-1"}),(0,o.jsx)(y,{}),(0,o.jsxs)("div",{className:"flex gap-1 flex-shrink-0",children:[(0,o.jsx)(x.Button,{variant:"outline",size:"icon-lg",onClick:t,className:"active:scale-95",title:"Reload",children:(0,o.jsx)(p.RefreshCw,{})}),(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)(x.Button,{variant:"outline",size:"icon-lg",onClick:e,className:`active:scale-95 ${"env"===r?"bg-primary text-primary-foreground border-primary shadow-lg ring-2 ring-primary hover:bg-primary/80 dark:hover:bg-primary/80":""}`,title:"Environment Settings",children:(0,o.jsx)(c,{})}),"env"===r&&(0,o.jsxs)("div",{className:"absolute top-full mt-2 right-[-2px] bg-tooltip backdrop-blur-sm border-2 border-warning text-foreground px-4 py-2 rounded text-base whitespace-nowrap animate-subtle-bounce z-[60] shadow-lg",children:["Set up tokens or a local LLM",(0,o.jsx)("div",{className:"absolute -top-1 right-[21px] w-2 h-2 bg-tooltip backdrop-blur-sm border-l-2 border-t-2 border-warning rotate-45"})]})]})]})]})}let N=(0,u.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var I=e.i(43531);function E({hasRepositories:e=!1,hasEnvVars:t=!1,hasTasks:r=!1}){return(0,o.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm z-40 flex items-center justify-center",children:(0,o.jsxs)("div",{className:"bg-card rounded-xl p-8 shadow-2xl max-w-xs text-center",children:[(0,o.jsx)("div",{className:"flex justify-center mb-4",children:(0,o.jsx)(N,{className:"w-12 h-12 text-primary"})}),(0,o.jsx)("h2",{className:"text-lg font-semibold leading-none text-foreground mb-6",children:"セットアップ"}),(0,o.jsxs)("div",{className:"space-y-2 mb-6 text-sm",children:[(0,o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded border ${t?"bg-success/10 border-success/30":"bg-warning/10 border-warning/30"}`,children:[(0,o.jsx)("span",{className:`w-5 h-5 rounded-full text-white text-xs flex items-center justify-center font-bold ${t?"bg-success":"bg-warning"}`,children:t?(0,o.jsx)(I.Check,{className:"w-3 h-3"}):"1"}),(0,o.jsx)("span",{className:t?"text-success":"font-medium text-muted-foreground",children:"認証設定(トークン or ローカルLLM)"})]}),(0,o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded border ${e?"bg-success/10 border-success/30":"bg-muted border-border"}`,children:[(0,o.jsx)("span",{className:`w-5 h-5 rounded-full text-white text-xs flex items-center justify-center ${e?"bg-success font-bold":"bg-muted-foreground"}`,children:e?(0,o.jsx)(I.Check,{className:"w-3 h-3"}):"2"}),(0,o.jsx)("span",{className:e?"text-success":"text-muted-foreground",children:"リポジトリクローン"})]}),(0,o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded border ${r?"bg-success/10 border-success/30":"bg-muted border-border"}`,children:[(0,o.jsx)("span",{className:`w-5 h-5 rounded-full text-white text-xs flex items-center justify-center ${r?"bg-success font-bold":"bg-muted-foreground"}`,children:r?(0,o.jsx)(I.Check,{className:"w-3 h-3"}):"3"}),(0,o.jsx)("span",{className:r?"text-success":"text-muted-foreground",children:"タスク作成"})]})]}),(0,o.jsx)("div",{className:"flex items-center justify-center gap-1 text-xs text-muted-foreground",children:(0,o.jsx)("span",{children:"上部の「Settings」ボタンをクリック"})})]})})}var D=e.i(10483),C=e.i(76165),S=e.i(68995),P=e.i(10012);function O({isOpen:e,onClose:t,onClone:r,isOnboarding:n=!1}){let[l,i]=(0,s.useState)(""),a=(0,C.useToast)(),d=async e=>{e.preventDefault(),t(),i("");let n=a.loading("Cloning repository...",l);try{let e=await r({gitUrl:l});a.success(n,"Successfully cloned repository",e.fallbackToSsh?`HTTPSでは認証できなかったため、SSHでcloneしました: ${e.cloneUrl}`:l)}catch(t){let e=t instanceof Error?t.message:"Unknown error";a.error(n,"Failed to clone repository",e)}};return(0,o.jsx)(S.Dialog,{open:e,onOpenChange:e=>{e.open||n||t()},title:"Clone Repository",maxWidth:"md",showCloseButton:!n,children:(0,o.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Git URL *"}),(0,o.jsx)(P.Input,{type:"text",required:!0,placeholder:"https://github.com/owner/repo.git",value:l,onChange:e=>i(e.target.value),className:"w-full"}),(0,o.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"HTTPS or SSH形式のGit URLを入力してください"})]}),(0,o.jsxs)("div",{className:"flex justify-end gap-2",children:[!n&&(0,o.jsx)(x.Button,{type:"button",variant:"outline",size:"lg",onClick:t,className:"active:scale-95",children:"Cancel"}),(0,o.jsx)(x.Button,{type:"submit",size:"lg",className:"active:scale-95",children:"Clone"})]})]})})}var j=e.i(69068);function R({isOpen:e,onClose:t,onConfirm:r,defaultDays:n=7}){let[l,i]=(0,s.useState)(n);return(0,o.jsx)(S.Dialog,{open:e,onOpenChange:e=>!e.open&&t(),title:"Delete Old Tasks",maxWidth:"md",showCloseButton:!1,children:(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("p",{className:"text-foreground",children:["Delete tasks completed more than"," ",(0,o.jsx)(P.Input,{type:"number",min:"1",value:l,onChange:e=>i(Number(e.target.value)),className:"w-16 mx-1 text-center inline-block"})," ","days ago?"]}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground",children:"This action will permanently delete the selected tasks and their associated worktrees."}),(0,o.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,o.jsx)(j.DialogClose,{render:(0,o.jsx)(x.Button,{variant:"outline",className:"cursor-pointer"}),children:"Cancel"}),(0,o.jsx)(x.Button,{variant:"destructive",onClick:()=>{r(l),t()},className:"cursor-pointer",children:"Delete"})]})]})})}let A=(0,u.default)("folder-down",[["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"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m15 13-3 3-3-3",key:"6j2sf0"}]]);var k=e.i(52088);function T({onCloneClick:e,isOnboarding:t=!1,isCloneDialogOpen:r=!1}){return(0,o.jsx)("div",{className:"flex h-full flex-col px-4 py-4",children:(0,o.jsxs)("div",{className:"relative flex-1",children:[(0,o.jsxs)("button",{type:"button",onClick:e,className:(0,k.cn)("flex h-full w-full flex-col items-center justify-center gap-2 rounded-lg","border-2 border-dashed border-border text-muted-foreground","transition-colors hover:bg-accent hover:text-foreground active:scale-95",t&&"border-primary text-primary ring-2 ring-primary"),title:"Clone Repository",children:[(0,o.jsx)(A,{className:"size-6"}),(0,o.jsx)("span",{className:"text-xs font-medium",children:"Clone repository"})]}),t&&!r&&(0,o.jsxs)("div",{className:"absolute left-1/2 top-1/2 z-[60] mt-12 -translate-x-1/2 animate-subtle-bounce whitespace-nowrap rounded border-2 border-warning bg-tooltip px-4 py-2 text-base text-foreground shadow-lg backdrop-blur-sm",children:["Clone a repository",(0,o.jsx)("div",{className:"absolute -top-1 left-1/2 size-2 -translate-x-1/2 rotate-45 border-l-2 border-t-2 border-warning bg-tooltip backdrop-blur-sm"})]})]})})}let B=(0,u.default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);var _=e.i(54943),_=_;let M=(0,u.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var L=e.i(37727),G=e.i(27612),$=e.i(7233),F=e.i(5352);let z=["backlog","planning","coding","reviewing","done"],U={backlog:{active:"bg-muted text-foreground ring-1 ring-foreground/20",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},planning:{active:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},coding:{active:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},reviewing:{active:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},done:{active:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"}};function W({repositories:e,filters:t,onFilterChange:r,onAddTask:n}){let[l,i]=(0,s.useState)(!1),a=t.statuses.length>0||t.repos.length>0,d=(0,s.useCallback)(e=>{r({...t,search:e.target.value})},[t,r]),u=(0,s.useCallback)(()=>{r({...t,search:""})},[t,r]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsxs)("div",{className:"relative flex-1",children:[(0,o.jsx)(_.default,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 size-3.5 text-muted-foreground"}),(0,o.jsx)(P.Input,{value:t.search,onChange:d,placeholder:"Search tasks...",className:"h-8 pl-8 pr-8 text-xs"}),t.search&&(0,o.jsx)("button",{onClick:u,className:"absolute right-2 top-1/2 -translate-y-1/2 size-4 inline-flex items-center justify-center rounded-sm hover:bg-accent",children:(0,o.jsx)(L.X,{className:"size-3 text-muted-foreground"})})]}),(0,o.jsx)(x.Button,{variant:"outline",size:"icon",onClick:()=>i(!0),className:(0,k.cn)("size-8 flex-shrink-0",a&&"border-primary text-primary"),title:"Filters",children:(0,o.jsx)(M,{className:"size-3.5"})}),n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"h-5 w-px bg-border flex-shrink-0"}),(0,o.jsx)(x.Button,{variant:"outline",size:"icon",onClick:n,className:"size-8 flex-shrink-0",title:"Add task",children:(0,o.jsx)($.Plus,{className:"size-3.5"})})]})]}),l&&(0,o.jsx)(H,{repositories:e,filters:t,onFilterChange:r,onClose:()=>i(!1)})]})}function H({repositories:e,filters:t,onFilterChange:r,onClose:n}){let l=(0,s.useCallback)(e=>{let n=t.statuses.includes(e)?t.statuses.filter(t=>t!==e):[...t.statuses,e];r({...t,statuses:n})},[t,r]),i=(0,s.useCallback)(e=>{let n=t.repos.includes(e)?t.repos.filter(t=>t!==e):[...t.repos,e];r({...t,repos:n})},[t,r]),a=(0,s.useCallback)(()=>{r({...t,statuses:[],repos:[]})},[t,r]),d=t.statuses.length>0||t.repos.length>0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"fixed inset-0 z-50 bg-black/40",onClick:n}),(0,o.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-20 px-4 pointer-events-none",children:(0,o.jsxs)("div",{className:"pointer-events-auto w-full max-w-sm rounded-lg border border-border bg-card p-4 shadow-lg",onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,o.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Filters"}),(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[d&&(0,o.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:a,className:"h-7 text-xs gap-1",children:[(0,o.jsx)(G.Trash2,{className:"size-3"}),"Clear all"]}),(0,o.jsx)("button",{onClick:n,className:"size-6 inline-flex items-center justify-center rounded-sm hover:bg-accent",children:(0,o.jsx)(L.X,{className:"size-4 text-muted-foreground"})})]})]}),(0,o.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,o.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:"Status"}),(0,o.jsx)("div",{className:"flex flex-wrap gap-1",children:z.map(e=>{let r=t.statuses.includes(e),n=U[e];return(0,o.jsx)("button",{onClick:()=>l(e),className:(0,k.cn)("inline-flex h-7 items-center rounded-full px-3 text-xs font-medium transition-colors",r?n.active:n.inactive),children:e},e)})})]}),e.length>0&&(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:"Repository"}),(0,o.jsx)("div",{className:"flex flex-wrap gap-1",children:e.map(e=>{let r=`${e.owner}/${e.repo}`,n=t.repos.includes(r),l=(0,F.getRepoColor)(e.owner,e.repo);return(0,o.jsx)("button",{onClick:()=>i(r),className:(0,k.cn)("inline-flex h-7 items-center rounded-full px-3 text-xs font-medium transition-colors",n?`${l.bg} ${l.text}`:"bg-transparent text-muted-foreground hover:bg-muted/50"),children:r},e.id)})})]})]})})]})}e.i(47167);var V=s,q=e.i(74080);function Y(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var J="function"==typeof Symbol&&Symbol.observable||"@@observable",X=()=>Math.random().toString(36).substring(7).split("").join("."),K={INIT:`@@redux/INIT${X()}`,REPLACE:`@@redux/REPLACE${X()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${X()}`};function Q(e,t){return function(...r){return t(e.apply(this,r))}}function Z(e,t){if("function"==typeof e)return Q(e,t);if("object"!=typeof e||null===e)throw Error(Y(16));let r={};for(let n in e){let l=e[n];"function"==typeof l&&(r[n]=Q(l,t))}return r}function ee(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}e.i(13027);var et=Symbol.for(s.version.startsWith("19")?"react.transitional.element":"react.element"),er=Symbol.for("react.portal"),en=Symbol.for("react.fragment"),el=Symbol.for("react.strict_mode"),ei=Symbol.for("react.profiler"),ea=Symbol.for("react.consumer"),eo=Symbol.for("react.context"),es=Symbol.for("react.forward_ref"),ed=Symbol.for("react.suspense"),eu=Symbol.for("react.suspense_list"),ec=Symbol.for("react.memo"),ep=Symbol.for("react.lazy");function ef(e){return function(t){let r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function em(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function eg(e,t){return function(t,{displayName:r}){let n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=em(e);let l=n(t,r);return"function"==typeof l&&(n.mapToProps=l,n.dependsOnOwnProps=em(l),l=n(t,r)),l},n}}function eh(e,t){return(r,n)=>{throw Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function eb(e,t,r){return{...r,...e,...t}}var ex={notify(){},get:()=>[]};function ey(e,t){let r,n=ex,l=0,i=!1;function a(){d.onStateChange&&d.onStateChange()}function o(){if(l++,!r){let l,i;r=t?t.addNestedSub(a):e.subscribe(a),l=null,i=null,n={clear(){l=null,i=null},notify(){let e=l;for(;e;)e.callback(),e=e.next},get(){let e=[],t=l;for(;t;)e.push(t),t=t.next;return e},subscribe(e){let t=!0,r=i={callback:e,next:null,prev:i};return r.prev?r.prev.next=r:l=r,function(){t&&null!==l&&(t=!1,r.next?r.next.prev=r.prev:i=r.prev,r.prev?r.prev.next=r.next:l=r.next)}}}}}function s(){l--,r&&0===l&&(r(),r=void 0,n.clear(),n=ex)}let d={addNestedSub:function(e){o();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,o())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return d}var ev="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ew="u">typeof navigator&&"ReactNative"===navigator.product,eN=ev||ew?s.useLayoutEffect:s.useEffect;function eI(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function eE(e,t){if(eI(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!eI(e[r[n]],t[r[n]]))return!1;return!0}var eD={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},eS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eP={[es]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[ec]:eS};function eO(e){return function(e){if("object"==typeof e&&null!==e){let{$$typeof:t}=e;switch(t){case et:switch(e=e.type){case en:case ei:case el:case ed:case eu:return e;default:switch(e=e&&e.$$typeof){case eo:case es:case ep:case ec:case ea:return e;default:return t}}case er:return t}}}(e)===ec?eS:eP[e.$$typeof]||eD}var ej=Object.defineProperty,eR=Object.getOwnPropertyNames,eA=Object.getOwnPropertySymbols,ek=Object.getOwnPropertyDescriptor,eT=Object.getPrototypeOf,eB=Object.prototype;function e_(e,t){if("string"!=typeof t){if(eB){let r=eT(t);r&&r!==eB&&e_(e,r)}let r=eR(t);eA&&(r=r.concat(eA(t)));let n=eO(e),l=eO(t);for(let i=0;i<r.length;++i){let a=r[i];if(!eC[a]&&!(l&&l[a])&&!(n&&n[a])){let r=ek(t,a);try{ej(e,a,r)}catch(e){}}}}return e}var eM=Symbol.for("react-redux-context"),eL="u">typeof globalThis?globalThis:{},eG=function(){if(!s.createContext)return{};let e=eL[eM]??=new Map,t=e.get(s.createContext);return t||(t=s.createContext(null),e.set(s.createContext,t)),t}(),e$=[null,null];function eF(e,t,r,n,l,i){e.current=n,r.current=!1,l.current&&(l.current=null,i())}function ez(e,t){return e===t}var eU=function(e,t,r,{pure:n,areStatesEqual:l=ez,areOwnPropsEqual:i=eE,areStatePropsEqual:a=eE,areMergedPropsEqual:o=eE,forwardRef:d=!1,context:u=eG}={}){let c=e?"function"==typeof e?eg(e,"mapStateToProps"):eh(e,"mapStateToProps"):ef(()=>({})),p=t&&"object"==typeof t?ef(e=>(function(e,t){let r={};for(let n in e){let l=e[n];"function"==typeof l&&(r[n]=(...e)=>t(l(...e)))}return r})(t,e)):t?"function"==typeof t?eg(t,"mapDispatchToProps"):eh(t,"mapDispatchToProps"):ef(e=>({dispatch:e})),f=r?"function"==typeof r?function(e,{displayName:t,areMergedPropsEqual:n}){let l,i=!1;return function(e,t,a){let o=r(e,t,a);return i?n(o,l)||(l=o):(i=!0,l=o),l}}:eh(r,"mergeProps"):()=>eb,m=!!e;return e=>{let t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:m,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:c,initMapDispatchToProps:p,initMergeProps:f,areStatesEqual:l,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:o};function g(t){var r;let l,[i,a,o]=s.useMemo(()=>{let{reactReduxForwardedRef:e,...r}=t;return[t.context,e,r]},[t]),d=s.useMemo(()=>(i?.Consumer,u),[i,u]),c=s.useContext(d),p=!!t.store&&!!t.store.getState&&!!t.store.dispatch,f=!!c&&!!c.store,g=p?t.store:c.store,h=f?c.getServerState:g.getState,b=s.useMemo(()=>(function(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...l}){return function(e,t,r,n,{areStatesEqual:l,areOwnPropsEqual:i,areStatePropsEqual:a}){let o,s,d,u,c,p=!1;return function(f,m){return p?function(p,f){let m=!i(f,s),g=!l(p,o,f,s);if(o=p,s=f,m&&g)return d=e(o,s),t.dependsOnOwnProps&&(u=t(n,s)),c=r(d,u,s);if(m)return e.dependsOnOwnProps&&(d=e(o,s)),t.dependsOnOwnProps&&(u=t(n,s)),c=r(d,u,s);if(g){let t,n;return n=!a(t=e(o,s),d),d=t,n&&(c=r(d,u,s)),c}return c}(f,m):(d=e(o=f,s=m),u=t(n,s),c=r(d,u,s),p=!0,c)}}(t(e,l),r(e,l),n(e,l),e,l)})(g.dispatch,n),[g]),[x,y]=s.useMemo(()=>{if(!m)return e$;let e=ey(g,p?void 0:c.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[g,p,c]),v=s.useMemo(()=>p?c:{...c,subscription:x},[p,c,x]),w=s.useRef(void 0),N=s.useRef(o),I=s.useRef(void 0),E=s.useRef(!1),D=s.useRef(!1),C=s.useRef(void 0);eN(()=>(D.current=!0,()=>{D.current=!1}),[]);let S=s.useMemo(()=>()=>I.current&&o===N.current?I.current:b(g.getState(),o),[g,o]),P=s.useMemo(()=>e=>{if(!x)return()=>{};if(!m)return()=>{};let t=!1,r=null,n=()=>{let n,l;if(t||!D.current)return;let i=g.getState();try{n=b(i,N.current)}catch(e){l=e,r=e}l||(r=null),n===w.current?E.current||y():(w.current=n,I.current=n,E.current=!0,e())};return x.onStateChange=n,x.trySubscribe(),n(),()=>{if(t=!0,x.tryUnsubscribe(),x.onStateChange=null,r)throw r}},[x]);r=[N,w,E,o,I,y],eN(()=>eF(...r),void 0);try{l=s.useSyncExternalStore(P,S,h?()=>b(h(),o):S)}catch(e){throw C.current&&(e.message+=`
3
+ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let s=(0,n.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${s}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}i.__next_img_default=!0;let a=i},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t){let r=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=i(e,n)),t&&(l.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("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)},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let n=e.r(55682),l=e.r(90809),i=e.r(18050),a=l._(e.r(71645)),o=n._(e.r(74080)),s=n._(e.r(25633)),d=e.r(8927),u=e.r(87690),c=e.r(18556);e.r(33525);let p=e.r(65856),f=n._(e.r(1948)),m=e.r(18581),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function h(e,t,r,n,l,i,a){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&l(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,l=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>l,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{l=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function b(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let x=(0,a.forwardRef)(({src:e,srcSet:t,sizes:r,height:n,width:l,decoding:o,className:s,style:d,fetchPriority:u,placeholder:c,loading:p,unoptimized:f,fill:g,onLoadRef:x,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:w,sizesInput:N,onLoad:I,onError:E,...D},C)=>{let S=(0,a.useCallback)(e=>{e&&(E&&(e.src=e.src),e.complete&&h(e,c,x,y,v,f,N))},[e,c,x,y,v,E,f,N]),P=(0,m.useMergedRef)(C,S);return(0,i.jsx)("img",{...D,...b(u),loading:p,width:l,height:n,decoding:o,"data-nimg":g?"fill":"1",className:s,style:d,sizes:r,srcSet:t,src:e,ref:P,onLoad:e=>{h(e.currentTarget,c,x,y,v,f,N)},onError:e=>{w(!0),"empty"!==c&&v(!0),E&&E(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...b(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,r),null):(0,i.jsx)(s.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,a.forwardRef)((e,t)=>{let r=(0,a.useContext)(p.RouterContext),n=(0,a.useContext)(c.ImageConfigContext),l=(0,a.useMemo)(()=>{let e=g||n||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),l=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:l,localPatterns:"u"<typeof window?n?.localPatterns:e.localPatterns}},[n]),{onLoad:o,onLoadingComplete:s}=e,m=(0,a.useRef)(o);(0,a.useEffect)(()=>{m.current=o},[o]);let h=(0,a.useRef)(s);(0,a.useEffect)(()=>{h.current=s},[s]);let[b,v]=(0,a.useState)(!1),[w,N]=(0,a.useState)(!1),{props:I,meta:E}=(0,d.getImgProps)(e,{defaultLoader:f.default,imgConf:l,blurComplete:b,showAltText:w});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x,{...I,unoptimized:E.unoptimized,placeholder:E.placeholder,fill:E.fill,onLoadRef:m,onLoadingCompleteRef:h,setBlurComplete:v,setShowAltText:N,sizesInput:e.sizes,ref:t}),E.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:I}):null]})});("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)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return u},getImageProps:function(){return d}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let i=e.r(55682),a=e.r(8927),o=e.r(5500),s=i._(e.r(1948));function d(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let u=o.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},14595,(e,t,r)=>{"use strict";var n=e.r(71645),l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useSyncExternalStore,a=n.useRef,o=n.useEffect,s=n.useMemo,d=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,u){var c=a(null);if(null===c.current){var p={hasValue:!1,value:null};c.current=p}else p=c.current;var f=i(e,(c=s(function(){function e(e){if(!o){if(o=!0,i=e,e=n(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return a=t}return a=e}if(t=a,l(i,e))return t;var r=n(e);return void 0!==u&&u(t,r)?(i=e,t):(i=e,a=r)}var i,a,o=!1,s=void 0===r?null:r;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,r,n,u]))[0],c[1]);return o(function(){p.hasValue=!0,p.value=f},[f]),d(f),f}},13027,(e,t,r)=>{"use strict";t.exports=e.r(14595)},39798,e=>{"use strict";let t,r,n,l,i,a;var o=e.i(18050),s=e.i(71645),d=e.i(18566),u=e.i(75254);let c=(0,u.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var p=e.i(16715),f=e.i(57688);let m=(0,u.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),g=(0,u.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),h=(0,u.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var b=e.i(627),x=e.i(85902);function y(){let{theme:e,setTheme:t}=(0,b.useTheme)();return(0,o.jsx)("div",{className:"flex items-center gap-0.5 bg-input/20 dark:bg-input/30 rounded-md p-0.5",children:[{value:"light",icon:m,label:"Light"},{value:"dark",icon:g,label:"Dark"},{value:"system",icon:h,label:"System"}].map(({value:r,icon:n,label:l})=>(0,o.jsx)(x.Button,{variant:"ghost",size:"icon-lg",onClick:()=>t(r),className:e===r?"bg-primary text-primary-foreground shadow-sm hover:bg-primary/80 hover:text-primary-foreground dark:hover:bg-primary/80":"text-muted-foreground hover:text-foreground",title:l,children:(0,o.jsx)(n,{})},r))})}let v={src:e.i(50160).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAxElEQVR42o2OSwsBUQBG7x0lFxkyt1uETDKeGaSM8tgpLDxShBBZKBajbMeGlSkW0zQleSz8TcaG5Zz6VmfxHQCMACEFkYMQZMOYtjDYhQiBH77SZEYoXBlPhO5RLhSl/TyvaIusfC4HhhOzyYKAnQmyfP2guHE80S5eblPheg84U3wrJCnY6meBlfZ4hcZJjcQGo2b58erntGfJV+us+J3qRsSr/1MuhuPSmbWYTa421fBy24vORJZmOd39h1K/QQoY5Q2cnyKUZdwhkQAAAABJRU5ErkJggg=="};function w({onSettingsClick:e,onReload:t,nextStep:r="complete"}){return(0,o.jsxs)("header",{className:"h-14 border-b border-border flex items-center gap-3 px-4 bg-card",children:[(0,o.jsx)("h1",{className:"flex-shrink-0 flex items-center",children:(0,o.jsx)(f.default,{src:v,alt:"Tsunagi",width:32,height:32,priority:!0})}),(0,o.jsx)("div",{className:"flex-1"}),(0,o.jsx)(y,{}),(0,o.jsxs)("div",{className:"flex gap-1 flex-shrink-0",children:[(0,o.jsx)(x.Button,{variant:"outline",size:"icon-lg",onClick:t,className:"active:scale-95",title:"Reload",children:(0,o.jsx)(p.RefreshCw,{})}),(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsx)(x.Button,{variant:"outline",size:"icon-lg",onClick:e,className:`active:scale-95 ${"env"===r?"bg-primary text-primary-foreground border-primary shadow-lg ring-2 ring-primary hover:bg-primary/80 dark:hover:bg-primary/80":""}`,title:"Environment Settings",children:(0,o.jsx)(c,{})}),"env"===r&&(0,o.jsxs)("div",{className:"absolute top-full mt-2 right-[-2px] bg-tooltip backdrop-blur-sm border-2 border-warning text-foreground px-4 py-2 rounded text-base whitespace-nowrap animate-subtle-bounce z-[60] shadow-lg",children:["Set up tokens or a local LLM",(0,o.jsx)("div",{className:"absolute -top-1 right-[21px] w-2 h-2 bg-tooltip backdrop-blur-sm border-l-2 border-t-2 border-warning rotate-45"})]})]})]})]})}let N=(0,u.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var I=e.i(43531);function E({hasRepositories:e=!1,hasEnvVars:t=!1,hasTasks:r=!1}){return(0,o.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm z-40 flex items-center justify-center",children:(0,o.jsxs)("div",{className:"bg-card rounded-xl p-8 shadow-2xl max-w-xs text-center",children:[(0,o.jsx)("div",{className:"flex justify-center mb-4",children:(0,o.jsx)(N,{className:"w-12 h-12 text-primary"})}),(0,o.jsx)("h2",{className:"text-lg font-semibold leading-none text-foreground mb-6",children:"セットアップ"}),(0,o.jsxs)("div",{className:"space-y-2 mb-6 text-sm",children:[(0,o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded border ${t?"bg-success/10 border-success/30":"bg-warning/10 border-warning/30"}`,children:[(0,o.jsx)("span",{className:`w-5 h-5 rounded-full text-white text-xs flex items-center justify-center font-bold ${t?"bg-success":"bg-warning"}`,children:t?(0,o.jsx)(I.Check,{className:"w-3 h-3"}):"1"}),(0,o.jsx)("span",{className:t?"text-success":"font-medium text-muted-foreground",children:"認証設定(トークン or ローカルLLM)"})]}),(0,o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded border ${e?"bg-success/10 border-success/30":"bg-muted border-border"}`,children:[(0,o.jsx)("span",{className:`w-5 h-5 rounded-full text-white text-xs flex items-center justify-center ${e?"bg-success font-bold":"bg-muted-foreground"}`,children:e?(0,o.jsx)(I.Check,{className:"w-3 h-3"}):"2"}),(0,o.jsx)("span",{className:e?"text-success":"text-muted-foreground",children:"リポジトリクローン"})]}),(0,o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded border ${r?"bg-success/10 border-success/30":"bg-muted border-border"}`,children:[(0,o.jsx)("span",{className:`w-5 h-5 rounded-full text-white text-xs flex items-center justify-center ${r?"bg-success font-bold":"bg-muted-foreground"}`,children:r?(0,o.jsx)(I.Check,{className:"w-3 h-3"}):"3"}),(0,o.jsx)("span",{className:r?"text-success":"text-muted-foreground",children:"タスク作成"})]})]}),(0,o.jsx)("div",{className:"flex items-center justify-center gap-1 text-xs text-muted-foreground",children:(0,o.jsx)("span",{children:"上部の「Settings」ボタンをクリック"})})]})})}var D=e.i(10483),C=e.i(76165),S=e.i(68995),P=e.i(10012);function O({isOpen:e,onClose:t,onClone:r,isOnboarding:n=!1}){let[l,i]=(0,s.useState)(""),a=(0,C.useToast)(),d=async e=>{e.preventDefault(),t(),i("");let n=a.loading("Cloning repository...",l);try{let e=await r({gitUrl:l});a.success(n,"Successfully cloned repository","ssh"===e.fallbackProtocol?`HTTPSでは認証できなかったため、SSHでcloneしました: ${e.cloneUrl}`:"https"===e.fallbackProtocol?`SSHでは認証できなかったため、HTTPSでcloneしました: ${e.cloneUrl}`:l)}catch(t){let e=t instanceof Error?t.message:"Unknown error";a.error(n,"Failed to clone repository",e)}};return(0,o.jsx)(S.Dialog,{open:e,onOpenChange:e=>{e.open||n||t()},title:"Clone Repository",maxWidth:"md",showCloseButton:!n,children:(0,o.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"block text-sm font-medium mb-1 text-foreground",children:"Git URL *"}),(0,o.jsx)(P.Input,{type:"text",required:!0,placeholder:"https://github.com/owner/repo.git",value:l,onChange:e=>i(e.target.value),className:"w-full"}),(0,o.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"HTTPS or SSH形式のGit URLを入力してください"})]}),(0,o.jsxs)("div",{className:"flex justify-end gap-2",children:[!n&&(0,o.jsx)(x.Button,{type:"button",variant:"outline",size:"lg",onClick:t,className:"active:scale-95",children:"Cancel"}),(0,o.jsx)(x.Button,{type:"submit",size:"lg",className:"active:scale-95",children:"Clone"})]})]})})}var j=e.i(69068);function R({isOpen:e,onClose:t,onConfirm:r,defaultDays:n=7}){let[l,i]=(0,s.useState)(n);return(0,o.jsx)(S.Dialog,{open:e,onOpenChange:e=>!e.open&&t(),title:"Delete Old Tasks",maxWidth:"md",showCloseButton:!1,children:(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("p",{className:"text-foreground",children:["Delete tasks completed more than"," ",(0,o.jsx)(P.Input,{type:"number",min:"1",value:l,onChange:e=>i(Number(e.target.value)),className:"w-16 mx-1 text-center inline-block"})," ","days ago?"]}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground",children:"This action will permanently delete the selected tasks and their associated worktrees."}),(0,o.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,o.jsx)(j.DialogClose,{render:(0,o.jsx)(x.Button,{variant:"outline",className:"cursor-pointer"}),children:"Cancel"}),(0,o.jsx)(x.Button,{variant:"destructive",onClick:()=>{r(l),t()},className:"cursor-pointer",children:"Delete"})]})]})})}let A=(0,u.default)("folder-down",[["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"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m15 13-3 3-3-3",key:"6j2sf0"}]]);var k=e.i(52088);function T({onCloneClick:e,isOnboarding:t=!1,isCloneDialogOpen:r=!1}){return(0,o.jsx)("div",{className:"flex h-full flex-col px-4 py-4",children:(0,o.jsxs)("div",{className:"relative flex-1",children:[(0,o.jsxs)("button",{type:"button",onClick:e,className:(0,k.cn)("flex h-full w-full flex-col items-center justify-center gap-2 rounded-lg","border-2 border-dashed border-border text-muted-foreground","transition-colors hover:bg-accent hover:text-foreground active:scale-95",t&&"border-primary text-primary ring-2 ring-primary"),title:"Clone Repository",children:[(0,o.jsx)(A,{className:"size-6"}),(0,o.jsx)("span",{className:"text-xs font-medium",children:"Clone repository"})]}),t&&!r&&(0,o.jsxs)("div",{className:"absolute left-1/2 top-1/2 z-[60] mt-12 -translate-x-1/2 animate-subtle-bounce whitespace-nowrap rounded border-2 border-warning bg-tooltip px-4 py-2 text-base text-foreground shadow-lg backdrop-blur-sm",children:["Clone a repository",(0,o.jsx)("div",{className:"absolute -top-1 left-1/2 size-2 -translate-x-1/2 rotate-45 border-l-2 border-t-2 border-warning bg-tooltip backdrop-blur-sm"})]})]})})}let B=(0,u.default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);var _=e.i(54943),_=_;let M=(0,u.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var L=e.i(37727),G=e.i(27612),$=e.i(7233),F=e.i(5352);let z=["backlog","planning","coding","reviewing","done"],U={backlog:{active:"bg-muted text-foreground ring-1 ring-foreground/20",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},planning:{active:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},coding:{active:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},reviewing:{active:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"},done:{active:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",inactive:"bg-transparent text-muted-foreground hover:bg-muted/50"}};function W({repositories:e,filters:t,onFilterChange:r,onAddTask:n}){let[l,i]=(0,s.useState)(!1),a=t.statuses.length>0||t.repos.length>0,d=(0,s.useCallback)(e=>{r({...t,search:e.target.value})},[t,r]),u=(0,s.useCallback)(()=>{r({...t,search:""})},[t,r]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsxs)("div",{className:"relative flex-1",children:[(0,o.jsx)(_.default,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 size-3.5 text-muted-foreground"}),(0,o.jsx)(P.Input,{value:t.search,onChange:d,placeholder:"Search tasks...",className:"h-8 pl-8 pr-8 text-xs"}),t.search&&(0,o.jsx)("button",{onClick:u,className:"absolute right-2 top-1/2 -translate-y-1/2 size-4 inline-flex items-center justify-center rounded-sm hover:bg-accent",children:(0,o.jsx)(L.X,{className:"size-3 text-muted-foreground"})})]}),(0,o.jsx)(x.Button,{variant:"outline",size:"icon",onClick:()=>i(!0),className:(0,k.cn)("size-8 flex-shrink-0",a&&"border-primary text-primary"),title:"Filters",children:(0,o.jsx)(M,{className:"size-3.5"})}),n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"h-5 w-px bg-border flex-shrink-0"}),(0,o.jsx)(x.Button,{variant:"outline",size:"icon",onClick:n,className:"size-8 flex-shrink-0",title:"Add task",children:(0,o.jsx)($.Plus,{className:"size-3.5"})})]})]}),l&&(0,o.jsx)(H,{repositories:e,filters:t,onFilterChange:r,onClose:()=>i(!1)})]})}function H({repositories:e,filters:t,onFilterChange:r,onClose:n}){let l=(0,s.useCallback)(e=>{let n=t.statuses.includes(e)?t.statuses.filter(t=>t!==e):[...t.statuses,e];r({...t,statuses:n})},[t,r]),i=(0,s.useCallback)(e=>{let n=t.repos.includes(e)?t.repos.filter(t=>t!==e):[...t.repos,e];r({...t,repos:n})},[t,r]),a=(0,s.useCallback)(()=>{r({...t,statuses:[],repos:[]})},[t,r]),d=t.statuses.length>0||t.repos.length>0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"fixed inset-0 z-50 bg-black/40",onClick:n}),(0,o.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-20 px-4 pointer-events-none",children:(0,o.jsxs)("div",{className:"pointer-events-auto w-full max-w-sm rounded-lg border border-border bg-card p-4 shadow-lg",onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,o.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Filters"}),(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[d&&(0,o.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:a,className:"h-7 text-xs gap-1",children:[(0,o.jsx)(G.Trash2,{className:"size-3"}),"Clear all"]}),(0,o.jsx)("button",{onClick:n,className:"size-6 inline-flex items-center justify-center rounded-sm hover:bg-accent",children:(0,o.jsx)(L.X,{className:"size-4 text-muted-foreground"})})]})]}),(0,o.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,o.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:"Status"}),(0,o.jsx)("div",{className:"flex flex-wrap gap-1",children:z.map(e=>{let r=t.statuses.includes(e),n=U[e];return(0,o.jsx)("button",{onClick:()=>l(e),className:(0,k.cn)("inline-flex h-7 items-center rounded-full px-3 text-xs font-medium transition-colors",r?n.active:n.inactive),children:e},e)})})]}),e.length>0&&(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:"Repository"}),(0,o.jsx)("div",{className:"flex flex-wrap gap-1",children:e.map(e=>{let r=`${e.owner}/${e.repo}`,n=t.repos.includes(r),l=(0,F.getRepoColor)(e.owner,e.repo);return(0,o.jsx)("button",{onClick:()=>i(r),className:(0,k.cn)("inline-flex h-7 items-center rounded-full px-3 text-xs font-medium transition-colors",n?`${l.bg} ${l.text}`:"bg-transparent text-muted-foreground hover:bg-muted/50"),children:r},e.id)})})]})]})})]})}e.i(47167);var V=s,q=e.i(74080);function Y(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var J="function"==typeof Symbol&&Symbol.observable||"@@observable",X=()=>Math.random().toString(36).substring(7).split("").join("."),K={INIT:`@@redux/INIT${X()}`,REPLACE:`@@redux/REPLACE${X()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${X()}`};function Q(e,t){return function(...r){return t(e.apply(this,r))}}function Z(e,t){if("function"==typeof e)return Q(e,t);if("object"!=typeof e||null===e)throw Error(Y(16));let r={};for(let n in e){let l=e[n];"function"==typeof l&&(r[n]=Q(l,t))}return r}function ee(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}e.i(13027);var et=Symbol.for(s.version.startsWith("19")?"react.transitional.element":"react.element"),er=Symbol.for("react.portal"),en=Symbol.for("react.fragment"),el=Symbol.for("react.strict_mode"),ei=Symbol.for("react.profiler"),ea=Symbol.for("react.consumer"),eo=Symbol.for("react.context"),es=Symbol.for("react.forward_ref"),ed=Symbol.for("react.suspense"),eu=Symbol.for("react.suspense_list"),ec=Symbol.for("react.memo"),ep=Symbol.for("react.lazy");function ef(e){return function(t){let r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function em(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function eg(e,t){return function(t,{displayName:r}){let n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=em(e);let l=n(t,r);return"function"==typeof l&&(n.mapToProps=l,n.dependsOnOwnProps=em(l),l=n(t,r)),l},n}}function eh(e,t){return(r,n)=>{throw Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function eb(e,t,r){return{...r,...e,...t}}var ex={notify(){},get:()=>[]};function ey(e,t){let r,n=ex,l=0,i=!1;function a(){d.onStateChange&&d.onStateChange()}function o(){if(l++,!r){let l,i;r=t?t.addNestedSub(a):e.subscribe(a),l=null,i=null,n={clear(){l=null,i=null},notify(){let e=l;for(;e;)e.callback(),e=e.next},get(){let e=[],t=l;for(;t;)e.push(t),t=t.next;return e},subscribe(e){let t=!0,r=i={callback:e,next:null,prev:i};return r.prev?r.prev.next=r:l=r,function(){t&&null!==l&&(t=!1,r.next?r.next.prev=r.prev:i=r.prev,r.prev?r.prev.next=r.next:l=r.next)}}}}}function s(){l--,r&&0===l&&(r(),r=void 0,n.clear(),n=ex)}let d={addNestedSub:function(e){o();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,o())},tryUnsubscribe:function(){i&&(i=!1,s())},getListeners:()=>n};return d}var ev="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ew="u">typeof navigator&&"ReactNative"===navigator.product,eN=ev||ew?s.useLayoutEffect:s.useEffect;function eI(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function eE(e,t){if(eI(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!eI(e[r[n]],t[r[n]]))return!1;return!0}var eD={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},eS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eP={[es]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[ec]:eS};function eO(e){return function(e){if("object"==typeof e&&null!==e){let{$$typeof:t}=e;switch(t){case et:switch(e=e.type){case en:case ei:case el:case ed:case eu:return e;default:switch(e=e&&e.$$typeof){case eo:case es:case ep:case ec:case ea:return e;default:return t}}case er:return t}}}(e)===ec?eS:eP[e.$$typeof]||eD}var ej=Object.defineProperty,eR=Object.getOwnPropertyNames,eA=Object.getOwnPropertySymbols,ek=Object.getOwnPropertyDescriptor,eT=Object.getPrototypeOf,eB=Object.prototype;function e_(e,t){if("string"!=typeof t){if(eB){let r=eT(t);r&&r!==eB&&e_(e,r)}let r=eR(t);eA&&(r=r.concat(eA(t)));let n=eO(e),l=eO(t);for(let i=0;i<r.length;++i){let a=r[i];if(!eC[a]&&!(l&&l[a])&&!(n&&n[a])){let r=ek(t,a);try{ej(e,a,r)}catch(e){}}}}return e}var eM=Symbol.for("react-redux-context"),eL="u">typeof globalThis?globalThis:{},eG=function(){if(!s.createContext)return{};let e=eL[eM]??=new Map,t=e.get(s.createContext);return t||(t=s.createContext(null),e.set(s.createContext,t)),t}(),e$=[null,null];function eF(e,t,r,n,l,i){e.current=n,r.current=!1,l.current&&(l.current=null,i())}function ez(e,t){return e===t}var eU=function(e,t,r,{pure:n,areStatesEqual:l=ez,areOwnPropsEqual:i=eE,areStatePropsEqual:a=eE,areMergedPropsEqual:o=eE,forwardRef:d=!1,context:u=eG}={}){let c=e?"function"==typeof e?eg(e,"mapStateToProps"):eh(e,"mapStateToProps"):ef(()=>({})),p=t&&"object"==typeof t?ef(e=>(function(e,t){let r={};for(let n in e){let l=e[n];"function"==typeof l&&(r[n]=(...e)=>t(l(...e)))}return r})(t,e)):t?"function"==typeof t?eg(t,"mapDispatchToProps"):eh(t,"mapDispatchToProps"):ef(e=>({dispatch:e})),f=r?"function"==typeof r?function(e,{displayName:t,areMergedPropsEqual:n}){let l,i=!1;return function(e,t,a){let o=r(e,t,a);return i?n(o,l)||(l=o):(i=!0,l=o),l}}:eh(r,"mergeProps"):()=>eb,m=!!e;return e=>{let t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:m,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:c,initMapDispatchToProps:p,initMergeProps:f,areStatesEqual:l,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:o};function g(t){var r;let l,[i,a,o]=s.useMemo(()=>{let{reactReduxForwardedRef:e,...r}=t;return[t.context,e,r]},[t]),d=s.useMemo(()=>(i?.Consumer,u),[i,u]),c=s.useContext(d),p=!!t.store&&!!t.store.getState&&!!t.store.dispatch,f=!!c&&!!c.store,g=p?t.store:c.store,h=f?c.getServerState:g.getState,b=s.useMemo(()=>(function(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...l}){return function(e,t,r,n,{areStatesEqual:l,areOwnPropsEqual:i,areStatePropsEqual:a}){let o,s,d,u,c,p=!1;return function(f,m){return p?function(p,f){let m=!i(f,s),g=!l(p,o,f,s);if(o=p,s=f,m&&g)return d=e(o,s),t.dependsOnOwnProps&&(u=t(n,s)),c=r(d,u,s);if(m)return e.dependsOnOwnProps&&(d=e(o,s)),t.dependsOnOwnProps&&(u=t(n,s)),c=r(d,u,s);if(g){let t,n;return n=!a(t=e(o,s),d),d=t,n&&(c=r(d,u,s)),c}return c}(f,m):(d=e(o=f,s=m),u=t(n,s),c=r(d,u,s),p=!0,c)}}(t(e,l),r(e,l),n(e,l),e,l)})(g.dispatch,n),[g]),[x,y]=s.useMemo(()=>{if(!m)return e$;let e=ey(g,p?void 0:c.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[g,p,c]),v=s.useMemo(()=>p?c:{...c,subscription:x},[p,c,x]),w=s.useRef(void 0),N=s.useRef(o),I=s.useRef(void 0),E=s.useRef(!1),D=s.useRef(!1),C=s.useRef(void 0);eN(()=>(D.current=!0,()=>{D.current=!1}),[]);let S=s.useMemo(()=>()=>I.current&&o===N.current?I.current:b(g.getState(),o),[g,o]),P=s.useMemo(()=>e=>{if(!x)return()=>{};if(!m)return()=>{};let t=!1,r=null,n=()=>{let n,l;if(t||!D.current)return;let i=g.getState();try{n=b(i,N.current)}catch(e){l=e,r=e}l||(r=null),n===w.current?E.current||y():(w.current=n,I.current=n,E.current=!0,e())};return x.onStateChange=n,x.trySubscribe(),n(),()=>{if(t=!0,x.tryUnsubscribe(),x.onStateChange=null,r)throw r}},[x]);r=[N,w,E,o,I,y],eN(()=>eF(...r),void 0);try{l=s.useSyncExternalStore(P,S,h?()=>b(h(),o):S)}catch(e){throw C.current&&(e.message+=`
4
4
  The error may be correlated with this previous error:
5
5
  ${C.current.stack}
6
6
 
@@ -61,4 +61,4 @@ ${C.current.stack}
61
61
  -moz-user-select: none;
62
62
  -ms-user-select: none;
63
63
  overflow-anchor: none;
64
- `}}],"always"),resting:nf(i,"resting"),dragging:nf(i,"dragging"),dropAnimating:nf(i,"dropAnimating"),userCancel:nf(i,"userCancel")}},[N]),i=(0,V.useRef)(null),a=(0,V.useRef)(null),o=tc(tD(e=>{let t=a.current;t||te(),t.textContent=e}),[]),nm(()=>{(i.current||a.current)&&te();let e=nh(D),t=nh(D);return i.current=e,a.current=t,e.setAttribute(`${ns}-always`,N),t.setAttribute(`${ns}-dynamic`,N),ng().appendChild(e),ng().appendChild(t),s(l.always),o(l.resting),()=>{let e=e=>{let t=e.current;t||te(),ng().removeChild(t),e.current=null};e(i),e(a)}},[D,s=tc(e=>{let t=i.current;t||te(),t.textContent=e},[]),o,l.always,l.resting,N]),d=tc(()=>o(l.dragging),[o,l.dragging]),u=tc(e=>{"DROP"===e?o(l.dropAnimating):o(l.userCancel)},[o,l.dropAnimating,l.userCancel]),tu(()=>({dragging:d,dropping:u,resting:c}),[d,u,c=tc(()=>{a.current&&o(l.resting)},[o,l.resting])])),T=tc(e=>{nq(S).dispatch(e)},[]),B=tu(()=>Z({publishWhileDragging:rx,updateDroppableScroll:rv,updateDroppableIsEnabled:rw,updateDroppableIsCombineEnabled:rN,collectionStarting:ry},T),[T]),_=(p=tu(nw,[]),(0,V.useEffect)(()=>function(){p.clean()},[p]),p),M=tu(()=>{let e,t,r;return e=null,t=function({registry:e,callbacks:t}){let r=rQ(),n=null,l=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null,rc();let{additions:l,removals:i,modified:a}=r,o=Object.keys(l).map(t=>e.draggable.getById(t).getDimension(tp)).sort((e,t)=>e.descriptor.index-t.descriptor.index),s=Object.keys(a).map(t=>{let r=e.droppable.getById(t).callbacks.getScrollWhileDragging();return{droppableId:t,scroll:r}}),d={additions:o,removals:Object.keys(i),modified:s};r=rQ(),rp(),t.publish(d)}))};return{add:e=>{let t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],l()},remove:e=>{let t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],l()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r=rQ())}}}({callbacks:{publish:B.publishWhileDragging,collectionStarting:B.collectionStarting},registry:_}),r=r=>{e||te();let n=e.critical.draggable;"ADDITION"===r.type&&r2(_,n,r.value)&&t.add(r.value),"REMOVAL"===r.type&&r2(_,n,r.value)&&t.remove(r.value)},{updateDroppableIsEnabled:(t,r)=>{_.droppable.exists(t)||te(),e&&B.updateDroppableIsEnabled({id:t,isEnabled:r})},updateDroppableIsCombineEnabled:(t,r)=>{e&&(_.droppable.exists(t)||te(),B.updateDroppableIsCombineEnabled({id:t,isCombineEnabled:r}))},scrollDroppable:(t,r)=>{e&&_.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(t,r)=>{e&&(_.droppable.exists(t)||te(),B.updateDroppableScroll({id:t,newScroll:r}))},startPublishing:t=>{e&&te();let n=_.draggable.getById(t.draggableId),l=_.droppable.getById(n.descriptor.droppableId),i={draggable:n.descriptor,droppable:l.descriptor};return e={critical:i,unsubscribe:_.subscribe(r)},(({critical:e,scrollOptions:t,registry:r})=>{let n,l,i,a,o,s;rc();let d=(n=rW(),l=r1(),i=n.y,a=n.x,s=(o=r0()).clientWidth,{frame:eq({top:i,left:a,right:a+s,bottom:i+o.clientHeight}),scroll:{initial:n,current:n,max:l,diff:{value:tp,displacement:tp}}}),u=d.scroll.current,c=e.droppable,p=r.droppable.getAllByType(c.type).map(e=>e.callbacks.getDimensionAndWatchScroll(u,t)),f={draggables:tS(r.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(u))),droppables:tC(p)};return rp(),{dimensions:f,critical:e,viewport:d}})({critical:i,registry:_,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!e)return;t.stop();let r=e.critical.droppable;_.droppable.getAllByType(r.type).forEach(e=>e.callbacks.dragStopped()),e.unsubscribe(),e=null}}},[_,B]),L=tu(()=>(({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{let l=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>r8})=>{let n=e3(e),l=e3(t),i=null,a=e=>{i||te();let{shouldUseTimeDampening:t,dragStartTime:a}=i;no({state:e,scrollWindow:n,scrollDroppable:l,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{rc(),i&&te();let t=Date.now(),n=!1,l=()=>{n=!0};no({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:l,scrollDroppable:l,getAutoScrollerOptions:r}),i={dragStartTime:t,shouldUseTimeDampening:n},rp(),n&&a(e)},stop:()=>{i&&(n.cancel(),l.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=(({move:e,scrollDroppable:t,scrollWindow:r})=>n=>{let l=n.scrollJumpRequest;if(!l)return;let i=re(n.impact);i||te();let a=((e,r)=>{let n;if(!na(e,r))return r;let l=(n=e.frame)&&na(e,r)?nn({current:n.scroll.current,max:n.scroll.max,change:r}):null;if(!l)return t(e.descriptor.id,r),null;let i=tm(r,l);return t(e.descriptor.id,i),tm(r,i)})(n.dimensions.droppables[i],l);if(!a)return;let o=n.viewport,s=((e,t,n)=>{if(!e||!ni(t,n))return n;let l=((e,t)=>{if(!ni(e,t))return null;let r=e.scroll.max;return nn({current:e.scroll.current,max:r,change:t})})(t,n);if(!l)return r(n),null;let i=tm(n,l);return r(i),tm(n,i)})(n.isWindowScrollAllowed,o,a);s&&e({client:tf(n.current.client.selection,s)})})({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{n().disabled||"DRAGGING"!==e.phase||("FLUID"===e.movementMode?l.scroll(e):e.scrollJumpRequest&&i(e))},start:l.start,stop:l.stop}})({scrollWindow:r5,scrollDroppable:M.scrollDroppable,getAutoScrollerOptions:j,...Z({move:rI},T)}),[M.scrollDroppable,T,j]),G=(f=(0,V.useRef)({}),m=(0,V.useRef)(null),g=(0,V.useRef)(null),h=(0,V.useRef)(!1),b=tc(function(e,t){let r={id:e,focus:t};return f.current[e]=r,function(){let t=f.current;t[e]!==r&&delete t[e]}},[]),x=tc(function(e){let t=nv(N,e);t&&t!==document.activeElement&&t.focus()},[N]),y=tc(function(e,t){m.current===e&&(m.current=t)},[]),v=tc(function(){g.current||h.current&&(g.current=requestAnimationFrame(()=>{g.current=null;let e=m.current;e&&x(e)}))},[x]),w=tc(function(e){m.current=null;let t=document.activeElement;t&&t.getAttribute(nd.draggableId)===e&&(m.current=e)},[]),nm(()=>(h.current=!0,function(){h.current=!1;let e=g.current;e&&cancelAnimationFrame(e)}),[]),tu(()=>({register:b,tryRecordFocus:w,tryRestoreFocusRecorded:v,tryShiftRecord:y}),[b,w,v,y])),$=tu(()=>(({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:l,autoScroller:i})=>{let a,o,s,d,u,c;return function e(t,r,n){if("function"!=typeof t)throw Error(Y(2));if("function"==typeof r&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw Error(Y(0));if("function"==typeof r&&void 0===n&&(n=r,r=void 0),void 0!==n){if("function"!=typeof n)throw Error(Y(1));return n(e)(t,r)}let l=t,i=r,a=new Map,o=a,s=0,d=!1;function u(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function c(){if(d)throw Error(Y(3));return i}function p(e){if("function"!=typeof e)throw Error(Y(4));if(d)throw Error(Y(5));let t=!0;u();let r=s++;return o.set(r,e),function(){if(t){if(d)throw Error(Y(6));t=!1,u(),o.delete(r),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw Error(Y(7));if(void 0===e.type)throw Error(Y(8));if("string"!=typeof e.type)throw Error(Y(17));if(d)throw Error(Y(9));try{d=!0,i=l(i,e)}finally{d=!1}return(a=o).forEach(e=>{e()}),e}return f({type:K.INIT}),{dispatch:f,subscribe:p,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw Error(Y(10));l=e,f({type:K.REPLACE})},[J]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(Y(11));function t(){e.next&&e.next(c())}return t(),{unsubscribe:p(t)}},[J](){return this}}}}}(rh,ee(function(...e){return t=>(r,n)=>{let l=t(r,n),i=()=>{throw Error(Y(15))},a={getState:l.getState,dispatch:(e,...t)=>i(e,...t)};return i=ee(...e.map(e=>e(a)))(l.dispatch),{...l,dispatch:i}}}(()=>e=>t=>{rb(t,"INITIAL_PUBLISH")&&r.dragging(),rb(t,"DROP_ANIMATE")&&r.dropping(t.payload.completed.result.reason),(rb(t,"FLUSH")||rb(t,"DROP_COMPLETE"))&&r.resting(),e(t)},()=>t=>r=>{(rb(r,"DROP_COMPLETE")||rb(r,"FLUSH")||rb(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)},({getState:t,dispatch:r})=>n=>l=>{if(!rb(l,"LIFT"))return void n(l);let{id:i,clientSelection:a,movementMode:o}=l.payload,s=t();"DROP_ANIMATING"===s.phase&&r(rO({completed:s.completed})),"IDLE"!==t().phase&&te(),r(rP()),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:o}});let{critical:d,dimensions:u,viewport:c}=e.startPublishing({draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===o}});r({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:u,clientSelection:a,movementMode:o,viewport:c}})},rU,rJ,rX,rK,e=>t=>r=>{if(rb(r,"DROP_COMPLETE")||rb(r,"DROP_ANIMATE")||rb(r,"FLUSH")){i.stop(),t(r);return}if(rb(r,"INITIAL_PUBLISH")){t(r);let n=e.getState();"DRAGGING"!==n.phase&&te(),i.start(n);return}t(r),i.scroll(e.getState())},rH,(a=!1,()=>e=>r=>{if(rb(r,"INITIAL_PUBLISH")){a=!0,t.tryRecordFocus(r.payload.critical.draggable.id),e(r),t.tryRestoreFocusRecorded();return}if(e(r),a){if(rb(r,"FLUSH")){a=!1,t.tryRestoreFocusRecorded();return}if(rb(r,"DROP_COMPLETE")){a=!1;let e=r.payload.completed.result;e.combine&&t.tryShiftRecord(e.draggableId,e.combine.draggableId),t.tryRestoreFocusRecorded()}}}),(o=[],s={add:e=>{let t=setTimeout(()=>(e=>{let t=o.findIndex(t=>t.timerId===e);-1===t&&te();let[r]=o.splice(t,1);r.callback()})(t));o.push({timerId:t,callback:e})},flush:()=>{if(!o.length)return;let e=[...o];o.length=0,e.forEach(e=>{clearTimeout(e.timerId),e.callback()})}},d=null,c={beforeCapture:(e,t)=>{d&&te(),rV("onBeforeCapture",()=>{let r=n().onBeforeCapture;r&&r({draggableId:e,mode:t})})},beforeStart:(e,t)=>{d&&te(),rV("onBeforeDragStart",()=>{let r=n().onBeforeDragStart;r&&r(rq(e,t))})},start:(e,t)=>{d&&te();let r=rq(e,t);d={mode:t,lastCritical:e,lastLocation:r.source,lastCombine:null},s.add(()=>{rV("onDragStart",()=>rY(n().onDragStart,r,l,ta))})},update:(e,t)=>{var r,i;let a=tR(t),o=tA(t);d||te();let u=!((e,t)=>{if(e===t)return!0;let r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n})(e,d.lastCritical);u&&(d.lastCritical=e);let c=(r=d.lastLocation,(null!=r||null!=a)&&(null==r||null==a||r.droppableId!==a.droppableId||r.index!==a.index));c&&(d.lastLocation=a);let p=(i=d.lastCombine,(null!=i||null!=o)&&(null==i||null==o||i.draggableId!==o.draggableId||i.droppableId!==o.droppableId));if(p&&(d.lastCombine=o),!u&&!c&&!p)return;let f={...rq(e,d.mode),combine:o,destination:a};s.add(()=>{rV("onDragUpdate",()=>rY(n().onDragUpdate,f,l,to))})},flush:()=>{d||te(),s.flush()},drop:u=e=>{d||te(),d=null,rV("onDragEnd",()=>rY(n().onDragEnd,e,l,ts))},abort:()=>{d&&u({...rq(d.lastCritical,d.mode),combine:null,destination:null,reason:"CANCEL"})}},e=>t=>r=>{if(rb(r,"BEFORE_INITIAL_CAPTURE"))return void c.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(rb(r,"INITIAL_PUBLISH")){let e=r.payload.critical;c.beforeStart(e,r.payload.movementMode),t(r),c.start(e,r.payload.movementMode);return}if(rb(r,"DROP_COMPLETE")){let e=r.payload.completed.result;c.flush(),t(r),c.drop(e);return}if(t(r),rb(r,"FLUSH"))return void c.abort();let n=e.getState();"DRAGGING"===n.phase&&c.update(n.critical,n.impact)}))))})({announce:R,autoScroller:L,dimensionMarshal:M,focusMarshal:G,getResponders:O,styleMarshal:k}),[R,L,M,G,O,k]);S.current=$;let F=tc(()=>{let e=nq(S);"IDLE"!==e.getState().phase&&e.dispatch(rP())},[]),z=tc(()=>{let e=nq(S).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);I(tu(()=>({isDragging:z,tryAbort:F}),[z,F]));let U=tc(e=>r3(nq(S).getState(),e),[]),W=tc(()=>rt(nq(S).getState()),[]),H=tu(()=>({marshal:M,focus:G,contextId:N,canLift:U,isMovementAllowed:W,dragHandleUsageInstructionsId:A,registry:_}),[N,M,A,G,U,W,_]);return!function({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:l}){let i=[...l?nV:[],...n||[]],a=(0,V.useState)(()=>(function(){let e=null;function t(){e||te(),e=null}return{isClaimed:function(){return!!e},isActive:function(t){return t===e},claim:function(t){e&&te();let r={abandon:t};return e=r,r},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}})())[0],o=tc(function(e,t){nk(e)&&!nk(t)&&a.tryAbandon()},[a]);nm(function(){let e=t.getState();return t.subscribe(()=>{let r=t.getState();o(e,r),e=r})},[a,t,o]),nm(()=>a.tryAbandon,[a.tryAbandon]);let s=tc(e=>nH({lockAPI:a,registry:r,store:t,draggableId:e}),[a,r,t]),d=tc((n,l,i)=>(function({lockAPI:e,contextId:t,store:r,registry:n,draggableId:l,forceSensorStop:i,sourceEvent:a}){var o;let s,d;if(!nH({lockAPI:e,store:r,registry:n,draggableId:l}))return null;let u=n.draggable.getById(l),c=(o=u.descriptor.id,(s=nb(document,`[${nu.contextId}="${t}"]`).find(e=>e.getAttribute(nu.id)===o))&&ny(s)?s:null);if(!c||a&&!u.options.canDragInteractiveElements&&ny(d=a.target)&&function e(t,r){if(null==r)return!1;if(nF.includes(r.tagName.toLowerCase()))return!0;let n=r.getAttribute("contenteditable");return"true"===n||""===n||r!==t&&e(t,r.parentElement)}(c,d))return null;let p=e.claim(i||e6),f="PRE_DRAG";function m(){return u.options.shouldRespectForcePress}function g(){return e.isActive(p)}let h=(function(e,t){nW({expected:e,phase:f,isLockActive:g,shouldWarn:!0})&&r.dispatch(t())}).bind(null,"DRAGGING");function b(t){function n(){e.release(),f="COMPLETED"}function l(e,i={shouldBlockNextClick:!1}){t.cleanup(),i.shouldBlockNextClick&&setTimeout(e7(window,[{eventName:"click",fn:nU,options:{once:!0,passive:!1,capture:!0}}])),n(),r.dispatch(rj({reason:e}))}return"PRE_DRAG"!==f&&(n(),te()),r.dispatch({type:"LIFT",payload:t.liftActionArgs}),f="DRAGGING",{isActive:()=>nW({expected:"DRAGGING",phase:f,isLockActive:g,shouldWarn:!1}),shouldRespectForcePress:m,drop:e=>l("DROP",e),cancel:e=>l("CANCEL",e),...t.actions}}return{isActive:()=>nW({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!1}),shouldRespectForcePress:m,fluidLift:function(e){let t=e3(e=>{h(()=>rI({client:e}))});return{...b({liftActionArgs:{id:l,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){return b({liftActionArgs:{id:l,clientSelection:eq(c.getBoundingClientRect()).center,movementMode:"SNAP"},cleanup:e6,actions:{moveUp:()=>h(rE),moveRight:()=>h(rC),moveDown:()=>h(rD),moveLeft:()=>h(rS)}})},abort:function(){nW({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!0})&&e.release()}}})({lockAPI:a,registry:r,contextId:e,store:t,draggableId:n,forceSensorStop:l||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,r,t]),u=tc(t=>{let r;return(r=function(e,t){let r=t.target;if(!(r instanceof nx(r).Element))return null;let n=`[${nd.contextId}="${e}"]`,l=r.closest?r.closest(n):function e(t,r){return null==t?null:t[nz](r)?t:e(t.parentElement,r)}(r,n);return l&&ny(l)?l:null}(e,t))?r.getAttribute(nd.draggableId):null},[e]),c=tc(e=>{let t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),p=tc(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch(rP()))},[a,t]),f=tc(()=>a.isClaimed(),[a]),m=tu(()=>({canGetLock:s,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:c,tryReleaseLock:p,isLockClaimed:f}),[s,d,u,c,p,f]);nj(()=>{let e=nA(i);nR(()=>{e.current.length!==i.length&&te(!1)})});for(let e=0;e<i.length;e++)i[e](m)}({contextId:N,store:$,registry:_,customSensors:E||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,V.useEffect)(()=>F,[F]),V.default.createElement(nS.Provider,{value:H},V.default.createElement(eW,{context:nN,store:$},e.children))}function nJ(e){let t=V.default.useId(),r=e.dragHandleUsageInstructions||tr;return V.default.createElement(tt,null,n=>V.default.createElement(nY,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:r,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}var nX=V.default.createContext(null);function nK(e){e&&ny(e)||te()}function nQ(e){let t=(0,V.useContext)(e);return t||te(),t}function nZ(e){e.preventDefault()}var n0=(e,t)=>e===t,n1=e=>{let{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};function n2(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}let n3={mapped:{type:"SECONDARY",offset:tp,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:n2(null)}},n5=eU(()=>{let e,t,r,n,l,i,a,o,s=(e=tD((e,t)=>({x:e,y:t})),t=tD((e,t,r=null,n=null,l=null)=>({isDragging:!0,isClone:t,isDropAnimating:!!l,dropAnimation:l,mode:e,draggingOver:r,combineWith:n,combineTargetFor:null})),r=tD((e,r,n,l,i=null,a=null,o=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:r,offset:e,dimension:n,forceShouldAnimate:o,snapshot:t(r,l,i,a,null)}})),(n,l)=>{if(nk(n)){let t;if(n.critical.draggable.id!==l.draggableId)return null;let i=n.current.client.offset,a=n.dimensions.draggables[l.draggableId],o=re(n.impact),s=(t=n.impact).at&&"COMBINE"===t.at.type?t.at.combine.draggableId:null,d=n.forceShouldAnimate;return r(e(i.x,i.y),n.movementMode,a,l.isClone,o,s,d)}if("DROP_ANIMATING"===n.phase){let e=n.completed;if(e.result.draggableId!==l.draggableId)return null;let r=l.isClone,i=n.dimensions.draggables[l.draggableId],a=e.result,o=a.mode,s=n1(a),d=a.combine?a.combine.draggableId:null,u={duration:n.dropDuration,curve:rA,moveTo:n.newHomeClientOffset,opacity:d?rk:null,scale:d?rB:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:i,dropping:u,draggingOver:s,combineWith:d,mode:o,forceShouldAnimate:null,snapshot:t(o,r,s,d,u)}}}return null}),d=(n=tD((e,t)=>({x:e,y:t})),l=tD(n2),i=tD((e,t=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:t,shouldAnimateDisplacement:r,snapshot:l(t)}})),a=e=>e?i(tp,e,!0):null,o=(e,t,r,l)=>{let o=r.displaced.visible[e],s=!!(l.inVirtualList&&l.effected[e]),d=tA(r),u=d&&d.draggableId===e?t:null;if(!o){if(!s)return a(u);if(r.displaced.invisible[e])return null;let t=th(l.displacedBy.point);return i(n(t.x,t.y),u,!0)}if(s)return a(u);let c=r.displacedBy.point;return i(n(c.x,c.y),u,o.shouldAnimate)},(e,t)=>{if(nk(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){let r=e.completed;return r.result.draggableId===t.draggableId?null:o(t.draggableId,r.result.draggableId,r.impact,r.afterCritical)}return null});return(e,t)=>s(e,t)||d(e,t)||n3},{dropAnimationFinished:rR},null,{context:nN,areStatePropsEqual:n0})(e=>{let t=(0,V.useRef)(null),r=tc((e=null)=>{t.current=e},[]),n=tc(()=>t.current,[]),{contextId:l,dragHandleUsageInstructionsId:i,registry:a}=nQ(nS),{type:o,droppableId:s}=nQ(nX),d=tu(()=>({id:e.draggableId,index:e.index,type:o,droppableId:s}),[e.draggableId,e.index,o,s]),{children:u,draggableId:c,isEnabled:p,shouldRespectForcePress:f,canDragInteractiveElements:m,isClone:g,mapped:h,dropAnimationFinished:b}=e;nR(()=>{let t=e.draggableId;t||te(!1),"string"!=typeof t&&te(!1),Number.isInteger(e.index)||te(!1),"DRAGGING"!==e.mapped.type&&(nK(n()),e.isEnabled&&(nv(l,t)||te(!1)))}),nj(()=>{let e=(0,V.useRef)(g);nR(()=>{g!==e.current&&te(!1)},[g])}),g||function(e){let t=nC("draggable"),{descriptor:r,registry:n,getDraggableRef:l,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:o}=e,s=tu(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:o}),[i,o,a]),d=tc(e=>{let t=l();return t||te(),function(e,t,r=tp){let n=window.getComputedStyle(t),l=e1(t.getBoundingClientRect(),n),i=e0(l,r),a={client:l,tagName:t.tagName.toLowerCase(),display:n.display};return{descriptor:e,placeholder:a,displaceBy:{x:l.marginBox.width,y:l.marginBox.height},client:l,page:i}}(r,t,e)},[r,l]),u=tu(()=>({uniqueId:t,descriptor:r,options:s,getDimension:d}),[r,d,s,t]),c=(0,V.useRef)(u),p=(0,V.useRef)(!0);nm(()=>(n.draggable.register(c.current),()=>n.draggable.unregister(c.current)),[n.draggable]),nm(()=>{if(p.current){p.current=!1;return}let e=c.current;c.current=u,n.draggable.update(u,e)},[u,n.draggable])}(tu(()=>({descriptor:d,registry:a,getDraggableRef:n,canDragInteractiveElements:m,shouldRespectForcePress:f,isEnabled:p}),[d,a,n,m,f,p]));let x=tu(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":c,"data-rfd-drag-handle-context-id":l,draggable:!1,onDragStart:nZ}:null,[l,i,c,p]),y=tc(e=>{"DRAGGING"===h.type&&h.dropping&&"transform"===e.propertyName&&(0,q.flushSync)(b)},[b,h]),v=tu(()=>{let e="DRAGGING"===h.type?function(e){let t=e.dimension.client,{offset:r,combineWith:n,dropping:l}=e,i=!!n,a=null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode,o=!!l,s=o?((e,t)=>{let r=rG(e);if(r)return t?`${r} scale(${rB})`:r})(r,i):rG(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:l?rL.drop(l.duration):a?rL.snap:rL.fluid,transform:s,opacity:((e,t)=>{if(e)return t?rk:rT})(i,o),zIndex:o?4500:5e3,pointerEvents:"none"}}(h):{transform:rG(h.offset),transition:h.shouldAnimateDisplacement?void 0:"none"};return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":l,"data-rfd-draggable-id":c,style:e,onTransitionEnd:"DRAGGING"===h.type&&h.dropping?y:void 0},dragHandleProps:x}},[l,x,c,h,y,r]),w=tu(()=>({draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}),[d.droppableId,d.id,d.index,d.type]);return V.default.createElement(V.default.Fragment,null,u(v,h.snapshot,w))});function n4(e){return nQ(nX).isUsingCloneFor!==e.draggableId||e.isClone?V.default.createElement(n5,e):null}function n8(e){let t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=!!e.disableInteractiveElementBlocking,n=!!e.shouldRespectForcePress;return V.default.createElement(n4,e5({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}let n6=e=>t=>e===t,n7=n6("scroll"),n9=n6("auto");n6("visible");let le=(e,t)=>t(e.overflowX)||t(e.overflowY),lt=e=>{let t,r;return null==e||e===document.body||e===document.documentElement?null:le(r={overflowX:(t=window.getComputedStyle(e)).overflowX,overflowY:t.overflowY},n7)||le(r,n9)?e:lt(e.parentElement)};var lr=e=>({x:e.scrollLeft,y:e.scrollTop});let ln=e=>!!e&&("fixed"===window.getComputedStyle(e).position||ln(e.parentElement)),ll={passive:!1},li={passive:!0};var la=e=>e.shouldPublishImmediately?ll:li;let lo=e=>e&&e.env.closestScrollable||null;function ls(){}let ld={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var lu=V.default.memo(e=>{let t=(0,V.useRef)(null),r=tc(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:l,onClose:i,contextId:a}=e,[o,s]=(0,V.useState)("open"===e.animate);(0,V.useEffect)(()=>o?"open"!==n?(r(),s(!1),ls):t.current?ls:(t.current=setTimeout(()=>{t.current=null,s(!1)}),r):ls,[n,o,r]);let d=tc(e=>{"height"===e.propertyName&&(l(),"close"===n&&i())},[n,i,l]),u=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{let n=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||"close"===r?ld:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?rL.placeholder:null}})({isAnimatingOpenOnMount:o,animate:e.animate,placeholder:e.placeholder});return V.default.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:d,ref:e.innerRef})});function lc(e){return"boolean"==typeof e}function lp(e,t){t.forEach(t=>t(e))}let lf=[function({props:e}){e.droppableId||te(),"string"!=typeof e.droppableId&&te()},function({props:e}){lc(e.isDropDisabled)||te(),lc(e.isCombineEnabled)||te(),lc(e.ignoreContainerClipping)||te()},function({getDroppableRef:e}){nK(e())}],lm=[function({props:e,getPlaceholderRef:t}){if(!e.placeholder||t())return}],lg=[function({props:e}){e.renderClone||te()},function({getPlaceholderRef:e}){e()&&te()}];class lh extends V.default.PureComponent{constructor(...e){super(...e),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!e.on,data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;let e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}let lb={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||te(),document.body}},lx=e=>{let t,r={...e};for(t in lb)void 0===e[t]&&(r={...r,[t]:lb[t]});return r},ly=(e,t)=>t.draggables[e.draggable.id],lv=eU(()=>{let e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=tD(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),n=tD((n,l,i,a,o,s)=>{let d=o.descriptor.id;if(o.descriptor.droppableId===n){let e=s?{render:s,dragging:r(o.descriptor)}:null;return{placeholder:o.placeholder,shouldAnimatePlaceholder:!1,snapshot:{isDraggingOver:i,draggingOverWith:i?d:null,draggingFromThisWith:d,isUsingPlaceholder:!0},useClone:e}}return l?a?{placeholder:o.placeholder,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:i,draggingOverWith:d,draggingFromThisWith:null,isUsingPlaceholder:!0},useClone:null}:e:t});return(r,l)=>{let i=lx(l),a=i.droppableId,o=i.type,s=!i.isDropDisabled,d=i.renderClone;if(nk(r)){let e=r.critical;if(o!==e.droppable.type)return t;let l=ly(e,r.dimensions),i=re(r.impact)===a;return n(a,s,i,i,l,d)}if("DROP_ANIMATING"===r.phase){let e=r.completed;if(o!==e.critical.droppable.type)return t;let l=ly(e.critical,r.dimensions);return n(a,s,n1(e.result)===a,re(e.impact)===a,l,d)}if("IDLE"===r.phase&&r.completed&&!r.shouldFlush){let n=r.completed;if(o!==n.critical.droppable.type)return t;let l=re(n.impact)===a,i=!!(n.impact.at&&"COMBINE"===n.impact.at.type),s=n.critical.droppable.id===a;if(l)return i?e:t;if(s)return e}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},(e,t,r)=>({...lx(r),...e,...t}),{context:nN,areStatePropsEqual:n0})(e=>{var t;let r=(0,V.useContext)(nS);r||te();let{contextId:n,isMovementAllowed:l}=r,i=(0,V.useRef)(null),a=(0,V.useRef)(null),{children:o,droppableId:s,type:d,mode:u,direction:c,ignoreContainerClipping:p,isDropDisabled:f,isCombineEnabled:m,snapshot:g,useClone:h,updateViewportMaxScroll:b,getContainerForClone:x}=e,y=tc(()=>i.current,[]),v=tc((e=null)=>{i.current=e},[]),w=tc(()=>a.current,[]),N=tc((e=null)=>{a.current=e},[]);t={props:e,getDroppableRef:y,getPlaceholderRef:w},nR(()=>{lp(t,lf),"standard"===t.props.mode&&lp(t,lm),"virtual"===t.props.mode&&lp(t,lg)});let I=tc(()=>{l()&&b({maxScroll:r1()})},[l,b]);!function(e){let t=(0,V.useRef)(null),r=nQ(nS),n=nC("droppable"),{registry:l,marshal:i}=r,a=nA(e),o=tu(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),s=(0,V.useRef)(o),d=tu(()=>tD((e,r)=>{t.current||te(),i.updateDroppableScroll(o.id,{x:e,y:r})}),[o.id,i]),u=tc(()=>{let e=t.current;return e&&e.env.closestScrollable?lr(e.env.closestScrollable):tp},[]),c=tc(()=>{let e=u();d(e.x,e.y)},[u,d]),p=tu(()=>e3(c),[c]),f=tc(()=>{let e=t.current,r=lo(e);(e&&r||te(),e.scrollOptions.shouldPublishImmediately)?c():p()},[p,c]),m=tc((e,n)=>{t.current&&te();let l=a.current,i=l.getDroppableRef();i||te();let s={closestScrollable:lt(i),isFixedOnPage:ln(i)},d={ref:i,descriptor:o,env:s,scrollOptions:n};t.current=d;let u=(({ref:e,descriptor:t,env:r,windowScroll:n,direction:l,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:o})=>{let s=r.closestScrollable,d=((e,t)=>{let r=e2(e);if(!t||e!==t)return r;let n=r.paddingBox.top-t.scrollTop,l=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight;return eK({borderBox:eY({top:n,right:l+t.scrollWidth,bottom:i,left:l},r.border),margin:r.margin,border:r.border,padding:r.padding})})(e,s),u=e0(d,n),c=(()=>{if(!s)return null;let e=e2(s),t={scrollHeight:s.scrollHeight,scrollWidth:s.scrollWidth};return{client:e,page:e0(e,n),scroll:lr(s),scrollSize:t,shouldClipSubject:o}})();return(({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:l,client:i,page:a,closest:o})=>{let s=(()=>{if(!o)return null;let{scrollSize:e,client:t}=o,r=rZ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:o.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:o.shouldClipSubject,scroll:{initial:o.scroll,current:o.scroll,max:r,diff:{value:tp,displacement:tp}}}})(),d="vertical"===l?tF:tz,u=tI({page:a,withPlaceholder:null,axis:d,frame:s});return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:d,isEnabled:t,client:i,page:a,frame:s,subject:u}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:l,client:d,page:u,closest:c})})({ref:i,descriptor:o,env:s,windowScroll:e,direction:l.direction,isDropDisabled:l.isDropDisabled,isCombineEnabled:l.isCombineEnabled,shouldClipSubject:!l.ignoreContainerClipping}),c=s.closestScrollable;return c&&(c.setAttribute(np.contextId,r.contextId),c.addEventListener("scroll",f,la(d.scrollOptions))),u},[r.contextId,o,f,a]),g=tc(()=>{let e=t.current,r=lo(e);return e&&r||te(),lr(r)},[]),h=tc(()=>{let e=t.current;e||te();let r=lo(e);t.current=null,r&&(p.cancel(),r.removeAttribute(np.contextId),r.removeEventListener("scroll",f,la(e.scrollOptions)))},[f,p]),b=tc(e=>{let r=t.current;r||te();let n=lo(r);n||te(),n.scrollTop+=e.y,n.scrollLeft+=e.x},[]),x=tu(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:g,dragStopped:h,scroll:b}),[h,m,g,b]),y=tu(()=>({uniqueId:n,descriptor:o,callbacks:x}),[x,o,n]);nm(()=>(s.current=y.descriptor,l.droppable.register(y),()=>{t.current&&h(),l.droppable.unregister(y)}),[x,o,h,y,i,l.droppable]),nm(()=>{t.current&&i.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),nm(()=>{t.current&&i.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}({droppableId:s,type:d,mode:u,direction:c,isDropDisabled:f,isCombineEnabled:m,ignoreContainerClipping:p,getDroppableRef:y});let E=tu(()=>V.default.createElement(lh,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>V.default.createElement(lu,{placeholder:t,onClose:e,innerRef:N,animate:r,contextId:n,onTransitionEnd:I})),[n,I,e.placeholder,e.shouldAnimatePlaceholder,N]),D=tu(()=>({innerRef:v,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,v]),C=h?h.dragging.draggableId:null,S=tu(()=>({droppableId:s,type:d,isUsingCloneFor:C}),[s,C,d]);return V.default.createElement(nX.Provider,{value:S},o(D,g),function(){if(!h)return null;let{dragging:e,render:t}=h,r=V.default.createElement(n4,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(r,n)=>t(r,n,e));return q.default.createPortal(r,x())}())});var lw=e.i(74886),lN=e.i(55716);let lI=(0,u.default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var lE=e.i(31278),lD=e.i(86311),lC=e.i(95468),lS=e.i(73884);function lP(e){let t=e.tabs??[];if(0===t.length||t.some(e=>"running"===e.status))return null;if(t.some(e=>"waiting"===e.status))return"waiting";let r=t.filter(e=>e.unread);return r.some(e=>"error"===e.status)?"error":r.some(e=>"success"===e.status)?"success":null}function lO(e){return null!==lP(e)}var lj=e.i(77814),lR=e.i(63337);let lA={backlog:"bg-muted text-muted-foreground",planning:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",coding:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",reviewing:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",done:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300"},lk={success:{className:"bg-unread-success",label:"Finished, not opened yet"},error:{className:"bg-unread-error",label:"Failed, not opened yet"},waiting:{className:"bg-unread-waiting",label:"Waiting for your input"}};function lT({tabs:e}){if(!e||0===e.length)return null;let t=e.some(e=>"running"===e.status),r=e.some(e=>"waiting"===e.status),n=e.some(e=>"error"===e.status),l=e.length>0&&e.every(e=>"success"===e.status);return t?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-primary",children:(0,o.jsx)(lE.Loader2,{className:"size-3 animate-spin"})}):r?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:(0,o.jsx)(lD.MessageSquare,{className:"size-3"})}):n?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-destructive",children:(0,o.jsx)(lS.XCircle,{className:"size-3"})}):l?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-success",children:(0,o.jsx)(lC.CheckCircle2,{className:"size-3"})}):null}function lB({task:e,dragHandleProps:t,tabTodosMap:r}){let n=(0,d.useRouter)(),[l,i]=(0,s.useState)(!1),a=(0,F.getRepoColor)(e.owner,e.repo),u=e.tabs??[],c=u.some(e=>"running"===e.status),p=lP(e),f=(0,lR.sumTodoProgress)(u.map(e=>r?.get(e.tab_id)??e.todos??[])),m=e.id.slice(0,5)+"…",g=(0,s.useCallback)(t=>{t.stopPropagation(),navigator.clipboard.writeText(e.id).then(()=>{i(!0),setTimeout(()=>i(!1),2e3)})},[e.id]);return(0,o.jsxs)("div",{...t,onClick:()=>n.push(`/tasks/${e.id}`),className:(0,k.cn)("relative rounded-lg border border-border bg-card p-3 shadow-sm transition-shadow hover:shadow-md cursor-pointer",c&&"opacity-50"),children:[p&&(0,o.jsx)("span",{role:"img","aria-label":lk[p].label,title:lk[p].label,className:(0,k.cn)("absolute left-0 top-2.5 bottom-2.5 w-[3px] rounded-r-[3px]",lk[p].className)}),(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,o.jsx)(lT,{tabs:e.tabs}),(0,o.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:m}),(0,o.jsx)("button",{onClick:g,className:"size-5 inline-flex items-center justify-center rounded-sm hover:bg-accent transition-colors",title:"Copy task ID",children:l?(0,o.jsx)(I.Check,{className:"size-3 text-success"}):(0,o.jsx)(lw.Copy,{className:"size-3 text-muted-foreground"})})]}),(0,o.jsx)("span",{className:(0,k.cn)("inline-flex h-5 items-center rounded-full px-2 text-[0.625rem] font-medium",lA[e.status]),children:e.status})]}),(0,o.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.title}),e.description&&(0,o.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.description}),f.total>0&&(0,o.jsxs)("div",{className:"space-y-0.5",children:[(0,o.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,o.jsx)(lj.Progress,{value:f.completed,max:f.total,className:"flex-1 gap-0 [&_[data-slot=progress-track]]:h-[3px]"}),(0,o.jsxs)("span",{className:"text-[10px] text-muted-foreground tabular-nums shrink-0",children:[f.completed,"/",f.total]})]}),f.current&&(0,o.jsx)("p",{className:"truncate text-[10px] text-muted-foreground",title:f.current,children:f.current})]}),(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,o.jsxs)("span",{className:(0,k.cn)("inline-flex h-5 items-center rounded-full px-2 text-[0.625rem] font-medium",a.bg,a.text),children:[e.owner,"/",e.repo]}),e.branch&&(0,o.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[(0,o.jsx)(lN.GitBranch,{className:"size-3"}),(0,o.jsx)("span",{className:"truncate max-w-[120px]",children:e.branch})]}),null!=e.effort&&e.effort>0&&(0,o.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[(0,o.jsx)(lI,{className:"size-3"}),e.effort,"h"]})]})]})]})}function l_({droppableId:e,tasks:t,onReorder:r,onDragStateChange:n,tabTodosMap:l}){let i=(0,s.useCallback)(()=>{n?.(!0)},[n]),a=(0,s.useCallback)(e=>{if(n?.(!1),!e.destination)return;let{source:l,destination:i}=e;if(l.index===i.index)return;let a=[...t],[o]=a.splice(l.index,1);a.splice(i.index,0,o),r(a.map((e,t)=>({...e,order:t})))},[t,r,n]);return(0,o.jsx)(nJ,{onDragStart:i,onDragEnd:a,children:(0,o.jsx)(lv,{droppableId:e,children:e=>(0,o.jsxs)("div",{ref:e.innerRef,...e.droppableProps,className:"space-y-2",children:[t.map((e,t)=>(0,o.jsx)(n8,{draggableId:e.id,index:t,children:t=>(0,o.jsx)("div",{ref:t.innerRef,...t.draggableProps,children:(0,o.jsx)(lB,{task:e,dragHandleProps:t.dragHandleProps,tabTodosMap:l})})},e.id)),e.placeholder]})})})}function lM({owner:e,repo:t,tasks:r,filters:n,onFilterChange:l,onReorder:i,onAddTask:a,onMoveToFront:s,onDragStateChange:d,tabTodosMap:u}){let c=(0,F.getRepoColor)(e,t),p=r.filter(lO).length;return(0,o.jsxs)("div",{className:"flex h-full flex-col",children:[(0,o.jsxs)("div",{className:"flex-shrink-0 flex items-center gap-2 px-4 pt-4",children:[(0,o.jsx)("span",{className:(0,k.cn)("inline-flex h-6 min-w-0 items-center rounded-full px-2.5 text-xs font-medium",c.bg,c.text),title:`${e}/${t}`,"data-repo":`${e}/${t}`,children:(0,o.jsxs)("span",{className:"truncate",children:[e,"/",t]})}),(0,o.jsx)("span",{className:"text-xs tabular-nums text-muted-foreground",children:r.length}),p>0&&(0,o.jsx)("span",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-[0.625rem] font-medium tabular-nums text-primary-foreground",title:`${p} unopened result${p>1?"s":""}`,children:p}),s&&(0,o.jsx)(x.Button,{variant:"ghost",size:"icon",onClick:s,className:"ml-auto size-6 flex-shrink-0 text-muted-foreground",title:"Move to front",children:(0,o.jsx)(B,{className:"size-3.5"})})]}),(0,o.jsx)("div",{className:"flex-shrink-0 px-4 pt-2",children:(0,o.jsx)(W,{repositories:[],filters:n,onFilterChange:l,onAddTask:a})}),(0,o.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-4",children:r.length>0?(0,o.jsx)(l_,{droppableId:`planner-task-list-${e}/${t}`,tasks:r,onReorder:i,onDragStateChange:d,tabTodosMap:u}):(0,o.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No tasks found"})})]})}let lL={statuses:[],repos:[],search:""},lG="h-full w-full flex-shrink-0 snap-start border-r border-border lg:w-[22.5rem]";function l$({repositories:e,tasksByRepo:t,filtersByRepo:r,onFilterChange:n,onReorder:l,onMoveRepositoryToFront:i,onAddTask:a,onCloneClick:d,isCloneOnboarding:u=!1,isCloneDialogOpen:c=!1,tabTodosMap:p}){let[f,m]=(0,s.useState)(!1),g=(0,s.useMemo)(()=>[...e].sort((e,t)=>e.order-t.order),[e]);return(0,o.jsxs)("div",{className:(0,k.cn)("flex flex-1 overflow-x-auto overflow-y-hidden overscroll-x-contain",!f&&"snap-x snap-mandatory"),children:[g.map((e,s)=>{var d,u;let c=(d=e.owner,u=e.repo,`${d}/${u}`);return(0,o.jsx)("div",{className:lG,children:(0,o.jsx)(lM,{owner:e.owner,repo:e.repo,tasks:t.get(c)??[],filters:r[c]??lL,onFilterChange:e=>n(c,e),onReorder:l,onAddTask:()=>a({owner:e.owner,repo:e.repo}),onMoveToFront:0===s?void 0:()=>i(e.id),onDragStateChange:m,tabTodosMap:p})},e.id)}),(0,o.jsx)("div",{className:lG,children:(0,o.jsx)(T,{onCloneClick:d,isOnboarding:u,isCloneDialogOpen:c})})]})}var lF=e.i(70935),lz=e.i(96085),lU=e.i(2576),lW=e.i(51846),lH=e.i(57024);let lV="tsunagi:column-filters",lq={statuses:[],repos:[],search:""};e.s(["default",0,function(){var e;let t,r,n,l,i,a=(0,d.useRouter)(),[u,c]=(0,s.useState)([]),[p,f]=(0,s.useState)([]),[m,g]=(0,s.useState)(!1),[h,b]=(0,s.useState)(!0),[x,y]=(0,s.useState)(!1),[v,N]=(0,s.useState)(null),[I,C]=(0,s.useState)(!1),[S,P]=(0,s.useState)(()=>{try{let e=sessionStorage.getItem(lV);if(e)return JSON.parse(e)}catch{}return{}}),j=(0,s.useMemo)(()=>u.filter(lO).length,[u]);(0,lW.useDocumentTitle)((t=Object.entries(S).filter(([,e])=>e.statuses.length>0||!!e.search.trim()).map(([e,t])=>{let r=[];return t.search.trim()&&r.push(`"${t.search.trim()}"`),t.statuses.length&&r.push(t.statuses.join(", ")),`${e.split("/").pop()??e}: ${r.join(" / ")}`})).length?t.join(" | "):void 0,j),(0,s.useEffect)(()=>{try{sessionStorage.setItem(lV,JSON.stringify(S))}catch{}},[S]);let A=(0,s.useCallback)((e,t)=>{P(r=>({...r,[e]:t}))},[]),k=(0,s.useMemo)(()=>{let e,t={hasRepositories:p.length>0,hasAuth:m,hasTasks:u.length>0};return e=t.hasAuth?t.hasRepositories?t.hasTasks?"complete":"task":"clone":"env",{state:t,nextStep:e}},[p,m,u]),T=(0,s.useMemo)(()=>{let e=new Map;for(let n of u){var t,r;let l=(t=n.owner,r=n.repo,`${t}/${r}`),i=S[l]??lq;if(i.statuses.length>0&&!i.statuses.includes(n.status)||i.search&&!n.title.toLowerCase().includes(i.search.toLowerCase()))continue;let a=e.get(l);a?a.push(n):e.set(l,[n])}for(let t of e.values())t.sort((e,t)=>e.order-t.order);return e},[u,S]),B=async()=>{b(!0);try{let[e,t,r]=await Promise.all([fetch((0,lF.apiUrl)("/api/tasks")).then(e=>e.json()),fetch((0,lF.apiUrl)("/api/owners")).then(e=>e.json()),fetch((0,lF.apiUrl)("/api/onboarding/status")).then(e=>e.json())]);c(e.data.tasks);let n=t.data.owners.flatMap(e=>e.repositories);f(n),g(!!r.data?.completed)}catch(e){console.error("Failed to load data:",e)}finally{b(!1)}},[_,M]=(0,s.useState)(!0);(0,s.useEffect)(()=>{_&&(B(),M(!1))},[]);let L=(0,s.useMemo)(()=>u.flatMap(e=>(e.tabs??[]).map(e=>e.tab_id)),[u]),G=function(e){let[t,r]=(0,s.useState)(new Map),n=(0,s.useRef)(null),l=(0,s.useRef)(new Set);return(0,s.useEffect)(()=>{if(!n.current){let e=(0,lz.io)((0,lF.getServerUrl)(),{transports:["polling","websocket"]});n.current=e,e.on("todos-updated",({sessionId:e,todos:t})=>{r(r=>{let n=new Map(r);return n.set(e,t),n})}),e.on("connect",()=>{for(let t of l.current)e.emit("join",{room:t,mode:"subscribe"})})}let t=n.current;for(let r of e){let e=`tab:${r}`;l.current.has(e)||(t.emit("join",{room:e,mode:"subscribe"}),l.current.add(e))}for(let r of l.current){let n=r.replace("tab:","");e.includes(n)||(t.emit("leave",{room:r}),l.current.delete(r))}},[e]),(0,s.useEffect)(()=>{let e=l.current;return()=>{n.current?.disconnect(),n.current=null,e.clear()}},[]),t}((0,s.useMemo)(()=>u.flatMap(e=>(e.tabs??[]).filter(e=>"running"===e.status).map(e=>e.tab_id)),[u]));e=(e,t)=>{let r="success"===t||"error"===t||"running"!==t&&"idle"!==t&&void 0;c(n=>n.map(n=>({...n,tabs:(n.tabs??[]).map(n=>n.tab_id===e?{...n,status:t,...void 0!==r&&{unread:r}}:n)})))},r=(0,s.useRef)(null),n=(0,s.useRef)(new Set),l=(0,s.useRef)(e),(0,s.useEffect)(()=>{l.current=e}),i=(0,s.useCallback)(()=>{if(!r.current){let e=(0,lz.io)((0,lF.getServerUrl)(),{transports:["polling","websocket"]});r.current=e,e.on("status-changed",({sessionId:e,status:t})=>{let r=function(e){switch(e){case"running":return"running";case"waiting":return"waiting";case"success":return"success";case"failure":case"error":return"error";case"idle":return"idle";default:return null}}(t);null!==r&&l.current(e,r)}),e.on("connect",()=>{for(let t of n.current)e.emit("join",{room:t,mode:"subscribe"})})}return r.current},[]),(0,s.useEffect)(()=>{if(0===L.length)return;let e=i();for(let t of L){let r=`tab:${t}`;n.current.has(r)||(e.emit("join",{room:r,mode:"subscribe"}),n.current.add(r))}let t=new Set(L);for(let r of n.current){let l=r.replace("tab:","");t.has(l)||(e.emit("leave",{room:r}),n.current.delete(r))}},[L,i]),(0,s.useEffect)(()=>{let e=n.current;return()=>{r.current?.disconnect(),r.current=null,e.clear()}},[]),(0,lU.useTaskEvents)({onTaskCreated:e=>{c(t=>t.some(t=>t.id===e.id)?t:[...t,e]),lH.toaster.create({type:"success",title:"Task created",description:e.title,duration:5e3})},onTaskUpdated:e=>{c(t=>t.map(t=>t.id===e.id?e:t)),lH.toaster.create({type:"info",title:"Task updated",description:e.title,duration:5e3})},onTaskDeleted:e=>{let t=u.find(t=>t.id===e)?.title;c(t=>t.filter(t=>t.id!==e)),t&&lH.toaster.create({type:"info",title:"Task deleted",description:t,duration:5e3})}});let{isDeleting:$,deletedCount:F,errorCount:z,totalCount:U,isCompleted:W,startBatchDelete:H,reset:V}=function(){let[e,t]=(0,s.useState)({batchId:null,totalCount:0,deletedCount:0,errorCount:0,isDeleting:!1,isCompleted:!1}),r=(0,s.useCallback)(async(e=7)=>{try{let r=await fetch((0,lF.apiUrl)("/api/tasks/batch-delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({daysAgo:e})});if(!r.ok)throw Error("Failed to start batch delete");let{batchId:n,totalCount:l}=(await r.json()).data;if(0===l)return{batchId:n,totalCount:l};return t({batchId:n,totalCount:l,deletedCount:l,errorCount:0,isDeleting:!1,isCompleted:!0}),{batchId:n,totalCount:l}}catch(e){throw console.error("Batch delete error:",e),e}},[]),n=(0,s.useCallback)(()=>{t({batchId:null,totalCount:0,deletedCount:0,errorCount:0,isDeleting:!1,isCompleted:!1})},[]);return{...e,startBatchDelete:r,reset:n}}();(0,s.useEffect)(()=>{($||W)&&queueMicrotask(()=>{if($){let e=z>0?`${F} / ${U} (${z} failed)`:`${F} / ${U}`;lH.toaster.update("batch-delete-progress",{type:"loading",title:"Deleting tasks...",description:e,duration:1/0})}if(W){lH.toaster.dismiss("batch-delete-progress");let e=z>0?`Deleted ${F} tasks (${z} failed)`:`Deleted ${F} tasks`;lH.toaster.create({type:z>0?"warning":"success",title:e,duration:5e3}),setTimeout(()=>{V()},5e3)}})},[$,W,F,z,U,V]);let q=(0,s.useCallback)(async e=>{c(t=>{let r=new Map(e.map(e=>[e.id,e]));return t.map(e=>r.get(e.id)??e)});try{await Promise.all(e.map((e,t)=>fetch((0,lF.apiUrl)(`/api/tasks/${e.id}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:t})})))}catch(e){console.error("Failed to update task order:",e)}},[]),Y=(0,s.useCallback)(async e=>{let t=p.find(t=>t.id===e);if(!t)return;let r=[t,...p.filter(t=>t.id!==e).sort((e,t)=>e.order-t.order)].map((e,t)=>({...e,order:t}));f(r);try{await fetch((0,lF.apiUrl)("/api/repos/reorder"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repoIds:r.map(e=>e.id)})})}catch(e){console.error("Failed to update repository order:",e)}},[p]),J=async e=>{try{let t=await fetch((0,lF.apiUrl)("/api/clone"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().then(e=>e?.error).catch(()=>void 0);throw Error(e||`Failed to clone repository (HTTP ${t.status})`)}let r=await t.json();return f(e=>[...e,r.data.repository]),await B(),{cloneUrl:r.data.repository.cloneUrl,fallbackToSsh:!!r.data.fallbackToSsh}}catch(e){throw console.error("Failed to clone repository:",e),e}},X=async e=>{try{let t=await H(e);if(!t||0===t.totalCount)return void lH.toaster.create({type:"info",title:"No tasks to delete",description:`No tasks completed more than ${e} days ago`,duration:3e3});lH.toaster.create({id:"batch-delete-progress",type:"loading",title:"Deleting tasks...",description:`0 / ${t.totalCount}`,duration:1/0})}catch(e){console.error("Failed to start batch delete:",e),lH.toaster.create({type:"error",title:"Failed to delete tasks",description:String(e),duration:5e3})}};return h&&0===u.length?(0,o.jsx)("div",{className:"h-screen flex items-center justify-center bg-background",children:(0,o.jsx)("div",{className:"text-center",children:(0,o.jsx)("div",{className:"text-2xl text-foreground",children:"Loading..."})})}):(0,o.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,o.jsx)(w,{onSettingsClick:()=>a.push("/settings"),onReload:B,nextStep:k.nextStep}),(0,o.jsxs)("div",{className:"relative flex-1 overflow-hidden flex",children:[(0,o.jsx)(l$,{repositories:p,tasksByRepo:T,filtersByRepo:S,onFilterChange:A,onReorder:q,onMoveRepositoryToFront:Y,onAddTask:N,onCloneClick:()=>y(!0),isCloneOnboarding:"clone"===k.nextStep,isCloneDialogOpen:x,tabTodosMap:G}),"env"===k.nextStep&&(0,o.jsx)(E,{hasRepositories:k.state.hasRepositories,hasEnvVars:k.state.hasAuth,hasTasks:k.state.hasTasks})]}),(0,o.jsx)(O,{isOpen:x,onClose:()=>y(!1),onClone:J,isOnboarding:"clone"===k.nextStep}),(0,o.jsx)(D.TaskDialog,{mode:"create",isOpen:null!==v,onClose:()=>N(null),repositories:p,defaultRepo:v??void 0}),(0,o.jsx)(R,{isOpen:I,onClose:()=>C(!1),onConfirm:X})]})}],39798)}]);
64
+ `}}],"always"),resting:nf(i,"resting"),dragging:nf(i,"dragging"),dropAnimating:nf(i,"dropAnimating"),userCancel:nf(i,"userCancel")}},[N]),i=(0,V.useRef)(null),a=(0,V.useRef)(null),o=tc(tD(e=>{let t=a.current;t||te(),t.textContent=e}),[]),nm(()=>{(i.current||a.current)&&te();let e=nh(D),t=nh(D);return i.current=e,a.current=t,e.setAttribute(`${ns}-always`,N),t.setAttribute(`${ns}-dynamic`,N),ng().appendChild(e),ng().appendChild(t),s(l.always),o(l.resting),()=>{let e=e=>{let t=e.current;t||te(),ng().removeChild(t),e.current=null};e(i),e(a)}},[D,s=tc(e=>{let t=i.current;t||te(),t.textContent=e},[]),o,l.always,l.resting,N]),d=tc(()=>o(l.dragging),[o,l.dragging]),u=tc(e=>{"DROP"===e?o(l.dropAnimating):o(l.userCancel)},[o,l.dropAnimating,l.userCancel]),tu(()=>({dragging:d,dropping:u,resting:c}),[d,u,c=tc(()=>{a.current&&o(l.resting)},[o,l.resting])])),T=tc(e=>{nq(S).dispatch(e)},[]),B=tu(()=>Z({publishWhileDragging:rx,updateDroppableScroll:rv,updateDroppableIsEnabled:rw,updateDroppableIsCombineEnabled:rN,collectionStarting:ry},T),[T]),_=(p=tu(nw,[]),(0,V.useEffect)(()=>function(){p.clean()},[p]),p),M=tu(()=>{let e,t,r;return e=null,t=function({registry:e,callbacks:t}){let r=rQ(),n=null,l=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null,rc();let{additions:l,removals:i,modified:a}=r,o=Object.keys(l).map(t=>e.draggable.getById(t).getDimension(tp)).sort((e,t)=>e.descriptor.index-t.descriptor.index),s=Object.keys(a).map(t=>{let r=e.droppable.getById(t).callbacks.getScrollWhileDragging();return{droppableId:t,scroll:r}}),d={additions:o,removals:Object.keys(i),modified:s};r=rQ(),rp(),t.publish(d)}))};return{add:e=>{let t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],l()},remove:e=>{let t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],l()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r=rQ())}}}({callbacks:{publish:B.publishWhileDragging,collectionStarting:B.collectionStarting},registry:_}),r=r=>{e||te();let n=e.critical.draggable;"ADDITION"===r.type&&r2(_,n,r.value)&&t.add(r.value),"REMOVAL"===r.type&&r2(_,n,r.value)&&t.remove(r.value)},{updateDroppableIsEnabled:(t,r)=>{_.droppable.exists(t)||te(),e&&B.updateDroppableIsEnabled({id:t,isEnabled:r})},updateDroppableIsCombineEnabled:(t,r)=>{e&&(_.droppable.exists(t)||te(),B.updateDroppableIsCombineEnabled({id:t,isCombineEnabled:r}))},scrollDroppable:(t,r)=>{e&&_.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(t,r)=>{e&&(_.droppable.exists(t)||te(),B.updateDroppableScroll({id:t,newScroll:r}))},startPublishing:t=>{e&&te();let n=_.draggable.getById(t.draggableId),l=_.droppable.getById(n.descriptor.droppableId),i={draggable:n.descriptor,droppable:l.descriptor};return e={critical:i,unsubscribe:_.subscribe(r)},(({critical:e,scrollOptions:t,registry:r})=>{let n,l,i,a,o,s;rc();let d=(n=rW(),l=r1(),i=n.y,a=n.x,s=(o=r0()).clientWidth,{frame:eq({top:i,left:a,right:a+s,bottom:i+o.clientHeight}),scroll:{initial:n,current:n,max:l,diff:{value:tp,displacement:tp}}}),u=d.scroll.current,c=e.droppable,p=r.droppable.getAllByType(c.type).map(e=>e.callbacks.getDimensionAndWatchScroll(u,t)),f={draggables:tS(r.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(u))),droppables:tC(p)};return rp(),{dimensions:f,critical:e,viewport:d}})({critical:i,registry:_,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!e)return;t.stop();let r=e.critical.droppable;_.droppable.getAllByType(r.type).forEach(e=>e.callbacks.dragStopped()),e.unsubscribe(),e=null}}},[_,B]),L=tu(()=>(({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{let l=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>r8})=>{let n=e3(e),l=e3(t),i=null,a=e=>{i||te();let{shouldUseTimeDampening:t,dragStartTime:a}=i;no({state:e,scrollWindow:n,scrollDroppable:l,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{rc(),i&&te();let t=Date.now(),n=!1,l=()=>{n=!0};no({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:l,scrollDroppable:l,getAutoScrollerOptions:r}),i={dragStartTime:t,shouldUseTimeDampening:n},rp(),n&&a(e)},stop:()=>{i&&(n.cancel(),l.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=(({move:e,scrollDroppable:t,scrollWindow:r})=>n=>{let l=n.scrollJumpRequest;if(!l)return;let i=re(n.impact);i||te();let a=((e,r)=>{let n;if(!na(e,r))return r;let l=(n=e.frame)&&na(e,r)?nn({current:n.scroll.current,max:n.scroll.max,change:r}):null;if(!l)return t(e.descriptor.id,r),null;let i=tm(r,l);return t(e.descriptor.id,i),tm(r,i)})(n.dimensions.droppables[i],l);if(!a)return;let o=n.viewport,s=((e,t,n)=>{if(!e||!ni(t,n))return n;let l=((e,t)=>{if(!ni(e,t))return null;let r=e.scroll.max;return nn({current:e.scroll.current,max:r,change:t})})(t,n);if(!l)return r(n),null;let i=tm(n,l);return r(i),tm(n,i)})(n.isWindowScrollAllowed,o,a);s&&e({client:tf(n.current.client.selection,s)})})({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{n().disabled||"DRAGGING"!==e.phase||("FLUID"===e.movementMode?l.scroll(e):e.scrollJumpRequest&&i(e))},start:l.start,stop:l.stop}})({scrollWindow:r5,scrollDroppable:M.scrollDroppable,getAutoScrollerOptions:j,...Z({move:rI},T)}),[M.scrollDroppable,T,j]),G=(f=(0,V.useRef)({}),m=(0,V.useRef)(null),g=(0,V.useRef)(null),h=(0,V.useRef)(!1),b=tc(function(e,t){let r={id:e,focus:t};return f.current[e]=r,function(){let t=f.current;t[e]!==r&&delete t[e]}},[]),x=tc(function(e){let t=nv(N,e);t&&t!==document.activeElement&&t.focus()},[N]),y=tc(function(e,t){m.current===e&&(m.current=t)},[]),v=tc(function(){g.current||h.current&&(g.current=requestAnimationFrame(()=>{g.current=null;let e=m.current;e&&x(e)}))},[x]),w=tc(function(e){m.current=null;let t=document.activeElement;t&&t.getAttribute(nd.draggableId)===e&&(m.current=e)},[]),nm(()=>(h.current=!0,function(){h.current=!1;let e=g.current;e&&cancelAnimationFrame(e)}),[]),tu(()=>({register:b,tryRecordFocus:w,tryRestoreFocusRecorded:v,tryShiftRecord:y}),[b,w,v,y])),$=tu(()=>(({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:l,autoScroller:i})=>{let a,o,s,d,u,c;return function e(t,r,n){if("function"!=typeof t)throw Error(Y(2));if("function"==typeof r&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw Error(Y(0));if("function"==typeof r&&void 0===n&&(n=r,r=void 0),void 0!==n){if("function"!=typeof n)throw Error(Y(1));return n(e)(t,r)}let l=t,i=r,a=new Map,o=a,s=0,d=!1;function u(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function c(){if(d)throw Error(Y(3));return i}function p(e){if("function"!=typeof e)throw Error(Y(4));if(d)throw Error(Y(5));let t=!0;u();let r=s++;return o.set(r,e),function(){if(t){if(d)throw Error(Y(6));t=!1,u(),o.delete(r),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw Error(Y(7));if(void 0===e.type)throw Error(Y(8));if("string"!=typeof e.type)throw Error(Y(17));if(d)throw Error(Y(9));try{d=!0,i=l(i,e)}finally{d=!1}return(a=o).forEach(e=>{e()}),e}return f({type:K.INIT}),{dispatch:f,subscribe:p,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw Error(Y(10));l=e,f({type:K.REPLACE})},[J]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(Y(11));function t(){e.next&&e.next(c())}return t(),{unsubscribe:p(t)}},[J](){return this}}}}}(rh,ee(function(...e){return t=>(r,n)=>{let l=t(r,n),i=()=>{throw Error(Y(15))},a={getState:l.getState,dispatch:(e,...t)=>i(e,...t)};return i=ee(...e.map(e=>e(a)))(l.dispatch),{...l,dispatch:i}}}(()=>e=>t=>{rb(t,"INITIAL_PUBLISH")&&r.dragging(),rb(t,"DROP_ANIMATE")&&r.dropping(t.payload.completed.result.reason),(rb(t,"FLUSH")||rb(t,"DROP_COMPLETE"))&&r.resting(),e(t)},()=>t=>r=>{(rb(r,"DROP_COMPLETE")||rb(r,"FLUSH")||rb(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)},({getState:t,dispatch:r})=>n=>l=>{if(!rb(l,"LIFT"))return void n(l);let{id:i,clientSelection:a,movementMode:o}=l.payload,s=t();"DROP_ANIMATING"===s.phase&&r(rO({completed:s.completed})),"IDLE"!==t().phase&&te(),r(rP()),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:o}});let{critical:d,dimensions:u,viewport:c}=e.startPublishing({draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===o}});r({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:u,clientSelection:a,movementMode:o,viewport:c}})},rU,rJ,rX,rK,e=>t=>r=>{if(rb(r,"DROP_COMPLETE")||rb(r,"DROP_ANIMATE")||rb(r,"FLUSH")){i.stop(),t(r);return}if(rb(r,"INITIAL_PUBLISH")){t(r);let n=e.getState();"DRAGGING"!==n.phase&&te(),i.start(n);return}t(r),i.scroll(e.getState())},rH,(a=!1,()=>e=>r=>{if(rb(r,"INITIAL_PUBLISH")){a=!0,t.tryRecordFocus(r.payload.critical.draggable.id),e(r),t.tryRestoreFocusRecorded();return}if(e(r),a){if(rb(r,"FLUSH")){a=!1,t.tryRestoreFocusRecorded();return}if(rb(r,"DROP_COMPLETE")){a=!1;let e=r.payload.completed.result;e.combine&&t.tryShiftRecord(e.draggableId,e.combine.draggableId),t.tryRestoreFocusRecorded()}}}),(o=[],s={add:e=>{let t=setTimeout(()=>(e=>{let t=o.findIndex(t=>t.timerId===e);-1===t&&te();let[r]=o.splice(t,1);r.callback()})(t));o.push({timerId:t,callback:e})},flush:()=>{if(!o.length)return;let e=[...o];o.length=0,e.forEach(e=>{clearTimeout(e.timerId),e.callback()})}},d=null,c={beforeCapture:(e,t)=>{d&&te(),rV("onBeforeCapture",()=>{let r=n().onBeforeCapture;r&&r({draggableId:e,mode:t})})},beforeStart:(e,t)=>{d&&te(),rV("onBeforeDragStart",()=>{let r=n().onBeforeDragStart;r&&r(rq(e,t))})},start:(e,t)=>{d&&te();let r=rq(e,t);d={mode:t,lastCritical:e,lastLocation:r.source,lastCombine:null},s.add(()=>{rV("onDragStart",()=>rY(n().onDragStart,r,l,ta))})},update:(e,t)=>{var r,i;let a=tR(t),o=tA(t);d||te();let u=!((e,t)=>{if(e===t)return!0;let r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n})(e,d.lastCritical);u&&(d.lastCritical=e);let c=(r=d.lastLocation,(null!=r||null!=a)&&(null==r||null==a||r.droppableId!==a.droppableId||r.index!==a.index));c&&(d.lastLocation=a);let p=(i=d.lastCombine,(null!=i||null!=o)&&(null==i||null==o||i.draggableId!==o.draggableId||i.droppableId!==o.droppableId));if(p&&(d.lastCombine=o),!u&&!c&&!p)return;let f={...rq(e,d.mode),combine:o,destination:a};s.add(()=>{rV("onDragUpdate",()=>rY(n().onDragUpdate,f,l,to))})},flush:()=>{d||te(),s.flush()},drop:u=e=>{d||te(),d=null,rV("onDragEnd",()=>rY(n().onDragEnd,e,l,ts))},abort:()=>{d&&u({...rq(d.lastCritical,d.mode),combine:null,destination:null,reason:"CANCEL"})}},e=>t=>r=>{if(rb(r,"BEFORE_INITIAL_CAPTURE"))return void c.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(rb(r,"INITIAL_PUBLISH")){let e=r.payload.critical;c.beforeStart(e,r.payload.movementMode),t(r),c.start(e,r.payload.movementMode);return}if(rb(r,"DROP_COMPLETE")){let e=r.payload.completed.result;c.flush(),t(r),c.drop(e);return}if(t(r),rb(r,"FLUSH"))return void c.abort();let n=e.getState();"DRAGGING"===n.phase&&c.update(n.critical,n.impact)}))))})({announce:R,autoScroller:L,dimensionMarshal:M,focusMarshal:G,getResponders:O,styleMarshal:k}),[R,L,M,G,O,k]);S.current=$;let F=tc(()=>{let e=nq(S);"IDLE"!==e.getState().phase&&e.dispatch(rP())},[]),z=tc(()=>{let e=nq(S).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);I(tu(()=>({isDragging:z,tryAbort:F}),[z,F]));let U=tc(e=>r3(nq(S).getState(),e),[]),W=tc(()=>rt(nq(S).getState()),[]),H=tu(()=>({marshal:M,focus:G,contextId:N,canLift:U,isMovementAllowed:W,dragHandleUsageInstructionsId:A,registry:_}),[N,M,A,G,U,W,_]);return!function({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:l}){let i=[...l?nV:[],...n||[]],a=(0,V.useState)(()=>(function(){let e=null;function t(){e||te(),e=null}return{isClaimed:function(){return!!e},isActive:function(t){return t===e},claim:function(t){e&&te();let r={abandon:t};return e=r,r},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}})())[0],o=tc(function(e,t){nk(e)&&!nk(t)&&a.tryAbandon()},[a]);nm(function(){let e=t.getState();return t.subscribe(()=>{let r=t.getState();o(e,r),e=r})},[a,t,o]),nm(()=>a.tryAbandon,[a.tryAbandon]);let s=tc(e=>nH({lockAPI:a,registry:r,store:t,draggableId:e}),[a,r,t]),d=tc((n,l,i)=>(function({lockAPI:e,contextId:t,store:r,registry:n,draggableId:l,forceSensorStop:i,sourceEvent:a}){var o;let s,d;if(!nH({lockAPI:e,store:r,registry:n,draggableId:l}))return null;let u=n.draggable.getById(l),c=(o=u.descriptor.id,(s=nb(document,`[${nu.contextId}="${t}"]`).find(e=>e.getAttribute(nu.id)===o))&&ny(s)?s:null);if(!c||a&&!u.options.canDragInteractiveElements&&ny(d=a.target)&&function e(t,r){if(null==r)return!1;if(nF.includes(r.tagName.toLowerCase()))return!0;let n=r.getAttribute("contenteditable");return"true"===n||""===n||r!==t&&e(t,r.parentElement)}(c,d))return null;let p=e.claim(i||e6),f="PRE_DRAG";function m(){return u.options.shouldRespectForcePress}function g(){return e.isActive(p)}let h=(function(e,t){nW({expected:e,phase:f,isLockActive:g,shouldWarn:!0})&&r.dispatch(t())}).bind(null,"DRAGGING");function b(t){function n(){e.release(),f="COMPLETED"}function l(e,i={shouldBlockNextClick:!1}){t.cleanup(),i.shouldBlockNextClick&&setTimeout(e7(window,[{eventName:"click",fn:nU,options:{once:!0,passive:!1,capture:!0}}])),n(),r.dispatch(rj({reason:e}))}return"PRE_DRAG"!==f&&(n(),te()),r.dispatch({type:"LIFT",payload:t.liftActionArgs}),f="DRAGGING",{isActive:()=>nW({expected:"DRAGGING",phase:f,isLockActive:g,shouldWarn:!1}),shouldRespectForcePress:m,drop:e=>l("DROP",e),cancel:e=>l("CANCEL",e),...t.actions}}return{isActive:()=>nW({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!1}),shouldRespectForcePress:m,fluidLift:function(e){let t=e3(e=>{h(()=>rI({client:e}))});return{...b({liftActionArgs:{id:l,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){return b({liftActionArgs:{id:l,clientSelection:eq(c.getBoundingClientRect()).center,movementMode:"SNAP"},cleanup:e6,actions:{moveUp:()=>h(rE),moveRight:()=>h(rC),moveDown:()=>h(rD),moveLeft:()=>h(rS)}})},abort:function(){nW({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!0})&&e.release()}}})({lockAPI:a,registry:r,contextId:e,store:t,draggableId:n,forceSensorStop:l||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,a,r,t]),u=tc(t=>{let r;return(r=function(e,t){let r=t.target;if(!(r instanceof nx(r).Element))return null;let n=`[${nd.contextId}="${e}"]`,l=r.closest?r.closest(n):function e(t,r){return null==t?null:t[nz](r)?t:e(t.parentElement,r)}(r,n);return l&&ny(l)?l:null}(e,t))?r.getAttribute(nd.draggableId):null},[e]),c=tc(e=>{let t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),p=tc(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch(rP()))},[a,t]),f=tc(()=>a.isClaimed(),[a]),m=tu(()=>({canGetLock:s,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:c,tryReleaseLock:p,isLockClaimed:f}),[s,d,u,c,p,f]);nj(()=>{let e=nA(i);nR(()=>{e.current.length!==i.length&&te(!1)})});for(let e=0;e<i.length;e++)i[e](m)}({contextId:N,store:$,registry:_,customSensors:E||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,V.useEffect)(()=>F,[F]),V.default.createElement(nS.Provider,{value:H},V.default.createElement(eW,{context:nN,store:$},e.children))}function nJ(e){let t=V.default.useId(),r=e.dragHandleUsageInstructions||tr;return V.default.createElement(tt,null,n=>V.default.createElement(nY,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:r,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}var nX=V.default.createContext(null);function nK(e){e&&ny(e)||te()}function nQ(e){let t=(0,V.useContext)(e);return t||te(),t}function nZ(e){e.preventDefault()}var n0=(e,t)=>e===t,n1=e=>{let{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};function n2(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}let n3={mapped:{type:"SECONDARY",offset:tp,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:n2(null)}},n5=eU(()=>{let e,t,r,n,l,i,a,o,s=(e=tD((e,t)=>({x:e,y:t})),t=tD((e,t,r=null,n=null,l=null)=>({isDragging:!0,isClone:t,isDropAnimating:!!l,dropAnimation:l,mode:e,draggingOver:r,combineWith:n,combineTargetFor:null})),r=tD((e,r,n,l,i=null,a=null,o=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:r,offset:e,dimension:n,forceShouldAnimate:o,snapshot:t(r,l,i,a,null)}})),(n,l)=>{if(nk(n)){let t;if(n.critical.draggable.id!==l.draggableId)return null;let i=n.current.client.offset,a=n.dimensions.draggables[l.draggableId],o=re(n.impact),s=(t=n.impact).at&&"COMBINE"===t.at.type?t.at.combine.draggableId:null,d=n.forceShouldAnimate;return r(e(i.x,i.y),n.movementMode,a,l.isClone,o,s,d)}if("DROP_ANIMATING"===n.phase){let e=n.completed;if(e.result.draggableId!==l.draggableId)return null;let r=l.isClone,i=n.dimensions.draggables[l.draggableId],a=e.result,o=a.mode,s=n1(a),d=a.combine?a.combine.draggableId:null,u={duration:n.dropDuration,curve:rA,moveTo:n.newHomeClientOffset,opacity:d?rk:null,scale:d?rB:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:i,dropping:u,draggingOver:s,combineWith:d,mode:o,forceShouldAnimate:null,snapshot:t(o,r,s,d,u)}}}return null}),d=(n=tD((e,t)=>({x:e,y:t})),l=tD(n2),i=tD((e,t=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:t,shouldAnimateDisplacement:r,snapshot:l(t)}})),a=e=>e?i(tp,e,!0):null,o=(e,t,r,l)=>{let o=r.displaced.visible[e],s=!!(l.inVirtualList&&l.effected[e]),d=tA(r),u=d&&d.draggableId===e?t:null;if(!o){if(!s)return a(u);if(r.displaced.invisible[e])return null;let t=th(l.displacedBy.point);return i(n(t.x,t.y),u,!0)}if(s)return a(u);let c=r.displacedBy.point;return i(n(c.x,c.y),u,o.shouldAnimate)},(e,t)=>{if(nk(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){let r=e.completed;return r.result.draggableId===t.draggableId?null:o(t.draggableId,r.result.draggableId,r.impact,r.afterCritical)}return null});return(e,t)=>s(e,t)||d(e,t)||n3},{dropAnimationFinished:rR},null,{context:nN,areStatePropsEqual:n0})(e=>{let t=(0,V.useRef)(null),r=tc((e=null)=>{t.current=e},[]),n=tc(()=>t.current,[]),{contextId:l,dragHandleUsageInstructionsId:i,registry:a}=nQ(nS),{type:o,droppableId:s}=nQ(nX),d=tu(()=>({id:e.draggableId,index:e.index,type:o,droppableId:s}),[e.draggableId,e.index,o,s]),{children:u,draggableId:c,isEnabled:p,shouldRespectForcePress:f,canDragInteractiveElements:m,isClone:g,mapped:h,dropAnimationFinished:b}=e;nR(()=>{let t=e.draggableId;t||te(!1),"string"!=typeof t&&te(!1),Number.isInteger(e.index)||te(!1),"DRAGGING"!==e.mapped.type&&(nK(n()),e.isEnabled&&(nv(l,t)||te(!1)))}),nj(()=>{let e=(0,V.useRef)(g);nR(()=>{g!==e.current&&te(!1)},[g])}),g||function(e){let t=nC("draggable"),{descriptor:r,registry:n,getDraggableRef:l,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:o}=e,s=tu(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:o}),[i,o,a]),d=tc(e=>{let t=l();return t||te(),function(e,t,r=tp){let n=window.getComputedStyle(t),l=e1(t.getBoundingClientRect(),n),i=e0(l,r),a={client:l,tagName:t.tagName.toLowerCase(),display:n.display};return{descriptor:e,placeholder:a,displaceBy:{x:l.marginBox.width,y:l.marginBox.height},client:l,page:i}}(r,t,e)},[r,l]),u=tu(()=>({uniqueId:t,descriptor:r,options:s,getDimension:d}),[r,d,s,t]),c=(0,V.useRef)(u),p=(0,V.useRef)(!0);nm(()=>(n.draggable.register(c.current),()=>n.draggable.unregister(c.current)),[n.draggable]),nm(()=>{if(p.current){p.current=!1;return}let e=c.current;c.current=u,n.draggable.update(u,e)},[u,n.draggable])}(tu(()=>({descriptor:d,registry:a,getDraggableRef:n,canDragInteractiveElements:m,shouldRespectForcePress:f,isEnabled:p}),[d,a,n,m,f,p]));let x=tu(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":c,"data-rfd-drag-handle-context-id":l,draggable:!1,onDragStart:nZ}:null,[l,i,c,p]),y=tc(e=>{"DRAGGING"===h.type&&h.dropping&&"transform"===e.propertyName&&(0,q.flushSync)(b)},[b,h]),v=tu(()=>{let e="DRAGGING"===h.type?function(e){let t=e.dimension.client,{offset:r,combineWith:n,dropping:l}=e,i=!!n,a=null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode,o=!!l,s=o?((e,t)=>{let r=rG(e);if(r)return t?`${r} scale(${rB})`:r})(r,i):rG(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:l?rL.drop(l.duration):a?rL.snap:rL.fluid,transform:s,opacity:((e,t)=>{if(e)return t?rk:rT})(i,o),zIndex:o?4500:5e3,pointerEvents:"none"}}(h):{transform:rG(h.offset),transition:h.shouldAnimateDisplacement?void 0:"none"};return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":l,"data-rfd-draggable-id":c,style:e,onTransitionEnd:"DRAGGING"===h.type&&h.dropping?y:void 0},dragHandleProps:x}},[l,x,c,h,y,r]),w=tu(()=>({draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}),[d.droppableId,d.id,d.index,d.type]);return V.default.createElement(V.default.Fragment,null,u(v,h.snapshot,w))});function n4(e){return nQ(nX).isUsingCloneFor!==e.draggableId||e.isClone?V.default.createElement(n5,e):null}function n8(e){let t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=!!e.disableInteractiveElementBlocking,n=!!e.shouldRespectForcePress;return V.default.createElement(n4,e5({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}let n6=e=>t=>e===t,n7=n6("scroll"),n9=n6("auto");n6("visible");let le=(e,t)=>t(e.overflowX)||t(e.overflowY),lt=e=>{let t,r;return null==e||e===document.body||e===document.documentElement?null:le(r={overflowX:(t=window.getComputedStyle(e)).overflowX,overflowY:t.overflowY},n7)||le(r,n9)?e:lt(e.parentElement)};var lr=e=>({x:e.scrollLeft,y:e.scrollTop});let ln=e=>!!e&&("fixed"===window.getComputedStyle(e).position||ln(e.parentElement)),ll={passive:!1},li={passive:!0};var la=e=>e.shouldPublishImmediately?ll:li;let lo=e=>e&&e.env.closestScrollable||null;function ls(){}let ld={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var lu=V.default.memo(e=>{let t=(0,V.useRef)(null),r=tc(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:l,onClose:i,contextId:a}=e,[o,s]=(0,V.useState)("open"===e.animate);(0,V.useEffect)(()=>o?"open"!==n?(r(),s(!1),ls):t.current?ls:(t.current=setTimeout(()=>{t.current=null,s(!1)}),r):ls,[n,o,r]);let d=tc(e=>{"height"===e.propertyName&&(l(),"close"===n&&i())},[n,i,l]),u=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{let n=(({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||"close"===r?ld:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?rL.placeholder:null}})({isAnimatingOpenOnMount:o,animate:e.animate,placeholder:e.placeholder});return V.default.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:d,ref:e.innerRef})});function lc(e){return"boolean"==typeof e}function lp(e,t){t.forEach(t=>t(e))}let lf=[function({props:e}){e.droppableId||te(),"string"!=typeof e.droppableId&&te()},function({props:e}){lc(e.isDropDisabled)||te(),lc(e.isCombineEnabled)||te(),lc(e.ignoreContainerClipping)||te()},function({getDroppableRef:e}){nK(e())}],lm=[function({props:e,getPlaceholderRef:t}){if(!e.placeholder||t())return}],lg=[function({props:e}){e.renderClone||te()},function({getPlaceholderRef:e}){e()&&te()}];class lh extends V.default.PureComponent{constructor(...e){super(...e),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!e.on,data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;let e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}let lb={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||te(),document.body}},lx=e=>{let t,r={...e};for(t in lb)void 0===e[t]&&(r={...r,[t]:lb[t]});return r},ly=(e,t)=>t.draggables[e.draggable.id],lv=eU(()=>{let e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=tD(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),n=tD((n,l,i,a,o,s)=>{let d=o.descriptor.id;if(o.descriptor.droppableId===n){let e=s?{render:s,dragging:r(o.descriptor)}:null;return{placeholder:o.placeholder,shouldAnimatePlaceholder:!1,snapshot:{isDraggingOver:i,draggingOverWith:i?d:null,draggingFromThisWith:d,isUsingPlaceholder:!0},useClone:e}}return l?a?{placeholder:o.placeholder,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:i,draggingOverWith:d,draggingFromThisWith:null,isUsingPlaceholder:!0},useClone:null}:e:t});return(r,l)=>{let i=lx(l),a=i.droppableId,o=i.type,s=!i.isDropDisabled,d=i.renderClone;if(nk(r)){let e=r.critical;if(o!==e.droppable.type)return t;let l=ly(e,r.dimensions),i=re(r.impact)===a;return n(a,s,i,i,l,d)}if("DROP_ANIMATING"===r.phase){let e=r.completed;if(o!==e.critical.droppable.type)return t;let l=ly(e.critical,r.dimensions);return n(a,s,n1(e.result)===a,re(e.impact)===a,l,d)}if("IDLE"===r.phase&&r.completed&&!r.shouldFlush){let n=r.completed;if(o!==n.critical.droppable.type)return t;let l=re(n.impact)===a,i=!!(n.impact.at&&"COMBINE"===n.impact.at.type),s=n.critical.droppable.id===a;if(l)return i?e:t;if(s)return e}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},(e,t,r)=>({...lx(r),...e,...t}),{context:nN,areStatePropsEqual:n0})(e=>{var t;let r=(0,V.useContext)(nS);r||te();let{contextId:n,isMovementAllowed:l}=r,i=(0,V.useRef)(null),a=(0,V.useRef)(null),{children:o,droppableId:s,type:d,mode:u,direction:c,ignoreContainerClipping:p,isDropDisabled:f,isCombineEnabled:m,snapshot:g,useClone:h,updateViewportMaxScroll:b,getContainerForClone:x}=e,y=tc(()=>i.current,[]),v=tc((e=null)=>{i.current=e},[]),w=tc(()=>a.current,[]),N=tc((e=null)=>{a.current=e},[]);t={props:e,getDroppableRef:y,getPlaceholderRef:w},nR(()=>{lp(t,lf),"standard"===t.props.mode&&lp(t,lm),"virtual"===t.props.mode&&lp(t,lg)});let I=tc(()=>{l()&&b({maxScroll:r1()})},[l,b]);!function(e){let t=(0,V.useRef)(null),r=nQ(nS),n=nC("droppable"),{registry:l,marshal:i}=r,a=nA(e),o=tu(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),s=(0,V.useRef)(o),d=tu(()=>tD((e,r)=>{t.current||te(),i.updateDroppableScroll(o.id,{x:e,y:r})}),[o.id,i]),u=tc(()=>{let e=t.current;return e&&e.env.closestScrollable?lr(e.env.closestScrollable):tp},[]),c=tc(()=>{let e=u();d(e.x,e.y)},[u,d]),p=tu(()=>e3(c),[c]),f=tc(()=>{let e=t.current,r=lo(e);(e&&r||te(),e.scrollOptions.shouldPublishImmediately)?c():p()},[p,c]),m=tc((e,n)=>{t.current&&te();let l=a.current,i=l.getDroppableRef();i||te();let s={closestScrollable:lt(i),isFixedOnPage:ln(i)},d={ref:i,descriptor:o,env:s,scrollOptions:n};t.current=d;let u=(({ref:e,descriptor:t,env:r,windowScroll:n,direction:l,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:o})=>{let s=r.closestScrollable,d=((e,t)=>{let r=e2(e);if(!t||e!==t)return r;let n=r.paddingBox.top-t.scrollTop,l=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight;return eK({borderBox:eY({top:n,right:l+t.scrollWidth,bottom:i,left:l},r.border),margin:r.margin,border:r.border,padding:r.padding})})(e,s),u=e0(d,n),c=(()=>{if(!s)return null;let e=e2(s),t={scrollHeight:s.scrollHeight,scrollWidth:s.scrollWidth};return{client:e,page:e0(e,n),scroll:lr(s),scrollSize:t,shouldClipSubject:o}})();return(({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:l,client:i,page:a,closest:o})=>{let s=(()=>{if(!o)return null;let{scrollSize:e,client:t}=o,r=rZ({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:o.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:o.shouldClipSubject,scroll:{initial:o.scroll,current:o.scroll,max:r,diff:{value:tp,displacement:tp}}}})(),d="vertical"===l?tF:tz,u=tI({page:a,withPlaceholder:null,axis:d,frame:s});return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:d,isEnabled:t,client:i,page:a,frame:s,subject:u}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:l,client:d,page:u,closest:c})})({ref:i,descriptor:o,env:s,windowScroll:e,direction:l.direction,isDropDisabled:l.isDropDisabled,isCombineEnabled:l.isCombineEnabled,shouldClipSubject:!l.ignoreContainerClipping}),c=s.closestScrollable;return c&&(c.setAttribute(np.contextId,r.contextId),c.addEventListener("scroll",f,la(d.scrollOptions))),u},[r.contextId,o,f,a]),g=tc(()=>{let e=t.current,r=lo(e);return e&&r||te(),lr(r)},[]),h=tc(()=>{let e=t.current;e||te();let r=lo(e);t.current=null,r&&(p.cancel(),r.removeAttribute(np.contextId),r.removeEventListener("scroll",f,la(e.scrollOptions)))},[f,p]),b=tc(e=>{let r=t.current;r||te();let n=lo(r);n||te(),n.scrollTop+=e.y,n.scrollLeft+=e.x},[]),x=tu(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:g,dragStopped:h,scroll:b}),[h,m,g,b]),y=tu(()=>({uniqueId:n,descriptor:o,callbacks:x}),[x,o,n]);nm(()=>(s.current=y.descriptor,l.droppable.register(y),()=>{t.current&&h(),l.droppable.unregister(y)}),[x,o,h,y,i,l.droppable]),nm(()=>{t.current&&i.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),nm(()=>{t.current&&i.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}({droppableId:s,type:d,mode:u,direction:c,isDropDisabled:f,isCombineEnabled:m,ignoreContainerClipping:p,getDroppableRef:y});let E=tu(()=>V.default.createElement(lh,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>V.default.createElement(lu,{placeholder:t,onClose:e,innerRef:N,animate:r,contextId:n,onTransitionEnd:I})),[n,I,e.placeholder,e.shouldAnimatePlaceholder,N]),D=tu(()=>({innerRef:v,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,E,v]),C=h?h.dragging.draggableId:null,S=tu(()=>({droppableId:s,type:d,isUsingCloneFor:C}),[s,C,d]);return V.default.createElement(nX.Provider,{value:S},o(D,g),function(){if(!h)return null;let{dragging:e,render:t}=h,r=V.default.createElement(n4,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(r,n)=>t(r,n,e));return q.default.createPortal(r,x())}())});var lw=e.i(74886),lN=e.i(55716);let lI=(0,u.default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var lE=e.i(31278),lD=e.i(86311),lC=e.i(95468),lS=e.i(73884);function lP(e){let t=e.tabs??[];if(0===t.length||t.some(e=>"running"===e.status))return null;if(t.some(e=>"waiting"===e.status))return"waiting";let r=t.filter(e=>e.unread);return r.some(e=>"error"===e.status)?"error":r.some(e=>"success"===e.status)?"success":null}function lO(e){return null!==lP(e)}var lj=e.i(77814),lR=e.i(63337);let lA={backlog:"bg-muted text-muted-foreground",planning:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",coding:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",reviewing:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",done:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300"},lk={success:{className:"bg-unread-success",label:"Finished, not opened yet"},error:{className:"bg-unread-error",label:"Failed, not opened yet"},waiting:{className:"bg-unread-waiting",label:"Waiting for your input"}};function lT({tabs:e}){if(!e||0===e.length)return null;let t=e.some(e=>"running"===e.status),r=e.some(e=>"waiting"===e.status),n=e.some(e=>"error"===e.status),l=e.length>0&&e.every(e=>"success"===e.status);return t?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-primary",children:(0,o.jsx)(lE.Loader2,{className:"size-3 animate-spin"})}):r?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:(0,o.jsx)(lD.MessageSquare,{className:"size-3"})}):n?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-destructive",children:(0,o.jsx)(lS.XCircle,{className:"size-3"})}):l?(0,o.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-success",children:(0,o.jsx)(lC.CheckCircle2,{className:"size-3"})}):null}function lB({task:e,dragHandleProps:t,tabTodosMap:r}){let n=(0,d.useRouter)(),[l,i]=(0,s.useState)(!1),a=(0,F.getRepoColor)(e.owner,e.repo),u=e.tabs??[],c=u.some(e=>"running"===e.status),p=lP(e),f=(0,lR.sumTodoProgress)(u.map(e=>r?.get(e.tab_id)??e.todos??[])),m=e.id.slice(0,5)+"…",g=(0,s.useCallback)(t=>{t.stopPropagation(),navigator.clipboard.writeText(e.id).then(()=>{i(!0),setTimeout(()=>i(!1),2e3)})},[e.id]);return(0,o.jsxs)("div",{...t,onClick:()=>n.push(`/tasks/${e.id}`),className:(0,k.cn)("relative rounded-lg border border-border bg-card p-3 shadow-sm transition-shadow hover:shadow-md cursor-pointer",c&&"opacity-50"),children:[p&&(0,o.jsx)("span",{role:"img","aria-label":lk[p].label,title:lk[p].label,className:(0,k.cn)("absolute left-0 top-2.5 bottom-2.5 w-[3px] rounded-r-[3px]",lk[p].className)}),(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,o.jsx)(lT,{tabs:e.tabs}),(0,o.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:m}),(0,o.jsx)("button",{onClick:g,className:"size-5 inline-flex items-center justify-center rounded-sm hover:bg-accent transition-colors",title:"Copy task ID",children:l?(0,o.jsx)(I.Check,{className:"size-3 text-success"}):(0,o.jsx)(lw.Copy,{className:"size-3 text-muted-foreground"})})]}),(0,o.jsx)("span",{className:(0,k.cn)("inline-flex h-5 items-center rounded-full px-2 text-[0.625rem] font-medium",lA[e.status]),children:e.status})]}),(0,o.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.title}),e.description&&(0,o.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.description}),f.total>0&&(0,o.jsxs)("div",{className:"space-y-0.5",children:[(0,o.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,o.jsx)(lj.Progress,{value:f.completed,max:f.total,className:"flex-1 gap-0 [&_[data-slot=progress-track]]:h-[3px]"}),(0,o.jsxs)("span",{className:"text-[10px] text-muted-foreground tabular-nums shrink-0",children:[f.completed,"/",f.total]})]}),f.current&&(0,o.jsx)("p",{className:"truncate text-[10px] text-muted-foreground",title:f.current,children:f.current})]}),(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,o.jsxs)("span",{className:(0,k.cn)("inline-flex h-5 items-center rounded-full px-2 text-[0.625rem] font-medium",a.bg,a.text),children:[e.owner,"/",e.repo]}),e.branch&&(0,o.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[(0,o.jsx)(lN.GitBranch,{className:"size-3"}),(0,o.jsx)("span",{className:"truncate max-w-[120px]",children:e.branch})]}),null!=e.effort&&e.effort>0&&(0,o.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[(0,o.jsx)(lI,{className:"size-3"}),e.effort,"h"]})]})]})]})}function l_({droppableId:e,tasks:t,onReorder:r,onDragStateChange:n,tabTodosMap:l}){let i=(0,s.useCallback)(()=>{n?.(!0)},[n]),a=(0,s.useCallback)(e=>{if(n?.(!1),!e.destination)return;let{source:l,destination:i}=e;if(l.index===i.index)return;let a=[...t],[o]=a.splice(l.index,1);a.splice(i.index,0,o),r(a.map((e,t)=>({...e,order:t})))},[t,r,n]);return(0,o.jsx)(nJ,{onDragStart:i,onDragEnd:a,children:(0,o.jsx)(lv,{droppableId:e,children:e=>(0,o.jsxs)("div",{ref:e.innerRef,...e.droppableProps,className:"space-y-2",children:[t.map((e,t)=>(0,o.jsx)(n8,{draggableId:e.id,index:t,children:t=>(0,o.jsx)("div",{ref:t.innerRef,...t.draggableProps,children:(0,o.jsx)(lB,{task:e,dragHandleProps:t.dragHandleProps,tabTodosMap:l})})},e.id)),e.placeholder]})})})}function lM({owner:e,repo:t,tasks:r,filters:n,onFilterChange:l,onReorder:i,onAddTask:a,onMoveToFront:s,onDragStateChange:d,tabTodosMap:u}){let c=(0,F.getRepoColor)(e,t),p=r.filter(lO).length;return(0,o.jsxs)("div",{className:"flex h-full flex-col",children:[(0,o.jsxs)("div",{className:"flex-shrink-0 flex items-center gap-2 px-4 pt-4",children:[(0,o.jsx)("span",{className:(0,k.cn)("inline-flex h-6 min-w-0 items-center rounded-full px-2.5 text-xs font-medium",c.bg,c.text),title:`${e}/${t}`,"data-repo":`${e}/${t}`,children:(0,o.jsxs)("span",{className:"truncate",children:[e,"/",t]})}),(0,o.jsx)("span",{className:"text-xs tabular-nums text-muted-foreground",children:r.length}),p>0&&(0,o.jsx)("span",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-[0.625rem] font-medium tabular-nums text-primary-foreground",title:`${p} unopened result${p>1?"s":""}`,children:p}),s&&(0,o.jsx)(x.Button,{variant:"ghost",size:"icon",onClick:s,className:"ml-auto size-6 flex-shrink-0 text-muted-foreground",title:"Move to front",children:(0,o.jsx)(B,{className:"size-3.5"})})]}),(0,o.jsx)("div",{className:"flex-shrink-0 px-4 pt-2",children:(0,o.jsx)(W,{repositories:[],filters:n,onFilterChange:l,onAddTask:a})}),(0,o.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-4",children:r.length>0?(0,o.jsx)(l_,{droppableId:`planner-task-list-${e}/${t}`,tasks:r,onReorder:i,onDragStateChange:d,tabTodosMap:u}):(0,o.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No tasks found"})})]})}let lL={statuses:[],repos:[],search:""},lG="h-full w-full flex-shrink-0 snap-start border-r border-border lg:w-[22.5rem]";function l$({repositories:e,tasksByRepo:t,filtersByRepo:r,onFilterChange:n,onReorder:l,onMoveRepositoryToFront:i,onAddTask:a,onCloneClick:d,isCloneOnboarding:u=!1,isCloneDialogOpen:c=!1,tabTodosMap:p}){let[f,m]=(0,s.useState)(!1),g=(0,s.useMemo)(()=>[...e].sort((e,t)=>e.order-t.order),[e]);return(0,o.jsxs)("div",{className:(0,k.cn)("flex flex-1 overflow-x-auto overflow-y-hidden overscroll-x-contain",!f&&"snap-x snap-mandatory"),children:[g.map((e,s)=>{var d,u;let c=(d=e.owner,u=e.repo,`${d}/${u}`);return(0,o.jsx)("div",{className:lG,children:(0,o.jsx)(lM,{owner:e.owner,repo:e.repo,tasks:t.get(c)??[],filters:r[c]??lL,onFilterChange:e=>n(c,e),onReorder:l,onAddTask:()=>a({owner:e.owner,repo:e.repo}),onMoveToFront:0===s?void 0:()=>i(e.id),onDragStateChange:m,tabTodosMap:p})},e.id)}),(0,o.jsx)("div",{className:lG,children:(0,o.jsx)(T,{onCloneClick:d,isOnboarding:u,isCloneDialogOpen:c})})]})}var lF=e.i(70935),lz=e.i(96085),lU=e.i(2576),lW=e.i(51846),lH=e.i(57024);let lV="tsunagi:column-filters",lq={statuses:[],repos:[],search:""};e.s(["default",0,function(){var e;let t,r,n,l,i,a=(0,d.useRouter)(),[u,c]=(0,s.useState)([]),[p,f]=(0,s.useState)([]),[m,g]=(0,s.useState)(!1),[h,b]=(0,s.useState)(!0),[x,y]=(0,s.useState)(!1),[v,N]=(0,s.useState)(null),[I,C]=(0,s.useState)(!1),[S,P]=(0,s.useState)(()=>{try{let e=sessionStorage.getItem(lV);if(e)return JSON.parse(e)}catch{}return{}}),j=(0,s.useMemo)(()=>u.filter(lO).length,[u]);(0,lW.useDocumentTitle)((t=Object.entries(S).filter(([,e])=>e.statuses.length>0||!!e.search.trim()).map(([e,t])=>{let r=[];return t.search.trim()&&r.push(`"${t.search.trim()}"`),t.statuses.length&&r.push(t.statuses.join(", ")),`${e.split("/").pop()??e}: ${r.join(" / ")}`})).length?t.join(" | "):void 0,j),(0,s.useEffect)(()=>{try{sessionStorage.setItem(lV,JSON.stringify(S))}catch{}},[S]);let A=(0,s.useCallback)((e,t)=>{P(r=>({...r,[e]:t}))},[]),k=(0,s.useMemo)(()=>{let e,t={hasRepositories:p.length>0,hasAuth:m,hasTasks:u.length>0};return e=t.hasAuth?t.hasRepositories?t.hasTasks?"complete":"task":"clone":"env",{state:t,nextStep:e}},[p,m,u]),T=(0,s.useMemo)(()=>{let e=new Map;for(let n of u){var t,r;let l=(t=n.owner,r=n.repo,`${t}/${r}`),i=S[l]??lq;if(i.statuses.length>0&&!i.statuses.includes(n.status)||i.search&&!n.title.toLowerCase().includes(i.search.toLowerCase()))continue;let a=e.get(l);a?a.push(n):e.set(l,[n])}for(let t of e.values())t.sort((e,t)=>e.order-t.order);return e},[u,S]),B=async()=>{b(!0);try{let[e,t,r]=await Promise.all([fetch((0,lF.apiUrl)("/api/tasks")).then(e=>e.json()),fetch((0,lF.apiUrl)("/api/owners")).then(e=>e.json()),fetch((0,lF.apiUrl)("/api/onboarding/status")).then(e=>e.json())]);c(e.data.tasks);let n=t.data.owners.flatMap(e=>e.repositories);f(n),g(!!r.data?.completed)}catch(e){console.error("Failed to load data:",e)}finally{b(!1)}},[_,M]=(0,s.useState)(!0);(0,s.useEffect)(()=>{_&&(B(),M(!1))},[]);let L=(0,s.useMemo)(()=>u.flatMap(e=>(e.tabs??[]).map(e=>e.tab_id)),[u]),G=function(e){let[t,r]=(0,s.useState)(new Map),n=(0,s.useRef)(null),l=(0,s.useRef)(new Set);return(0,s.useEffect)(()=>{if(!n.current){let e=(0,lz.io)((0,lF.getServerUrl)(),{transports:["polling","websocket"]});n.current=e,e.on("todos-updated",({sessionId:e,todos:t})=>{r(r=>{let n=new Map(r);return n.set(e,t),n})}),e.on("connect",()=>{for(let t of l.current)e.emit("join",{room:t,mode:"subscribe"})})}let t=n.current;for(let r of e){let e=`tab:${r}`;l.current.has(e)||(t.emit("join",{room:e,mode:"subscribe"}),l.current.add(e))}for(let r of l.current){let n=r.replace("tab:","");e.includes(n)||(t.emit("leave",{room:r}),l.current.delete(r))}},[e]),(0,s.useEffect)(()=>{let e=l.current;return()=>{n.current?.disconnect(),n.current=null,e.clear()}},[]),t}((0,s.useMemo)(()=>u.flatMap(e=>(e.tabs??[]).filter(e=>"running"===e.status).map(e=>e.tab_id)),[u]));e=(e,t)=>{let r="success"===t||"error"===t||"running"!==t&&"idle"!==t&&void 0;c(n=>n.map(n=>({...n,tabs:(n.tabs??[]).map(n=>n.tab_id===e?{...n,status:t,...void 0!==r&&{unread:r}}:n)})))},r=(0,s.useRef)(null),n=(0,s.useRef)(new Set),l=(0,s.useRef)(e),(0,s.useEffect)(()=>{l.current=e}),i=(0,s.useCallback)(()=>{if(!r.current){let e=(0,lz.io)((0,lF.getServerUrl)(),{transports:["polling","websocket"]});r.current=e,e.on("status-changed",({sessionId:e,status:t})=>{let r=function(e){switch(e){case"running":return"running";case"waiting":return"waiting";case"success":return"success";case"failure":case"error":return"error";case"idle":return"idle";default:return null}}(t);null!==r&&l.current(e,r)}),e.on("connect",()=>{for(let t of n.current)e.emit("join",{room:t,mode:"subscribe"})})}return r.current},[]),(0,s.useEffect)(()=>{if(0===L.length)return;let e=i();for(let t of L){let r=`tab:${t}`;n.current.has(r)||(e.emit("join",{room:r,mode:"subscribe"}),n.current.add(r))}let t=new Set(L);for(let r of n.current){let l=r.replace("tab:","");t.has(l)||(e.emit("leave",{room:r}),n.current.delete(r))}},[L,i]),(0,s.useEffect)(()=>{let e=n.current;return()=>{r.current?.disconnect(),r.current=null,e.clear()}},[]),(0,lU.useTaskEvents)({onTaskCreated:e=>{c(t=>t.some(t=>t.id===e.id)?t:[...t,e]),lH.toaster.create({type:"success",title:"Task created",description:e.title,duration:5e3})},onTaskUpdated:e=>{c(t=>t.map(t=>t.id===e.id?e:t)),lH.toaster.create({type:"info",title:"Task updated",description:e.title,duration:5e3})},onTaskDeleted:e=>{let t=u.find(t=>t.id===e)?.title;c(t=>t.filter(t=>t.id!==e)),t&&lH.toaster.create({type:"info",title:"Task deleted",description:t,duration:5e3})}});let{isDeleting:$,deletedCount:F,errorCount:z,totalCount:U,isCompleted:W,startBatchDelete:H,reset:V}=function(){let[e,t]=(0,s.useState)({batchId:null,totalCount:0,deletedCount:0,errorCount:0,isDeleting:!1,isCompleted:!1}),r=(0,s.useCallback)(async(e=7)=>{try{let r=await fetch((0,lF.apiUrl)("/api/tasks/batch-delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({daysAgo:e})});if(!r.ok)throw Error("Failed to start batch delete");let{batchId:n,totalCount:l}=(await r.json()).data;if(0===l)return{batchId:n,totalCount:l};return t({batchId:n,totalCount:l,deletedCount:l,errorCount:0,isDeleting:!1,isCompleted:!0}),{batchId:n,totalCount:l}}catch(e){throw console.error("Batch delete error:",e),e}},[]),n=(0,s.useCallback)(()=>{t({batchId:null,totalCount:0,deletedCount:0,errorCount:0,isDeleting:!1,isCompleted:!1})},[]);return{...e,startBatchDelete:r,reset:n}}();(0,s.useEffect)(()=>{($||W)&&queueMicrotask(()=>{if($){let e=z>0?`${F} / ${U} (${z} failed)`:`${F} / ${U}`;lH.toaster.update("batch-delete-progress",{type:"loading",title:"Deleting tasks...",description:e,duration:1/0})}if(W){lH.toaster.dismiss("batch-delete-progress");let e=z>0?`Deleted ${F} tasks (${z} failed)`:`Deleted ${F} tasks`;lH.toaster.create({type:z>0?"warning":"success",title:e,duration:5e3}),setTimeout(()=>{V()},5e3)}})},[$,W,F,z,U,V]);let q=(0,s.useCallback)(async e=>{c(t=>{let r=new Map(e.map(e=>[e.id,e]));return t.map(e=>r.get(e.id)??e)});try{await Promise.all(e.map((e,t)=>fetch((0,lF.apiUrl)(`/api/tasks/${e.id}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:t})})))}catch(e){console.error("Failed to update task order:",e)}},[]),Y=(0,s.useCallback)(async e=>{let t=p.find(t=>t.id===e);if(!t)return;let r=[t,...p.filter(t=>t.id!==e).sort((e,t)=>e.order-t.order)].map((e,t)=>({...e,order:t}));f(r);try{await fetch((0,lF.apiUrl)("/api/repos/reorder"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repoIds:r.map(e=>e.id)})})}catch(e){console.error("Failed to update repository order:",e)}},[p]),J=async e=>{try{let t=await fetch((0,lF.apiUrl)("/api/clone"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().then(e=>e?.error).catch(()=>void 0);throw Error(e||`Failed to clone repository (HTTP ${t.status})`)}let r=await t.json();return f(e=>[...e,r.data.repository]),await B(),{cloneUrl:r.data.repository.cloneUrl,fallbackProtocol:r.data.fallbackProtocol??null}}catch(e){throw console.error("Failed to clone repository:",e),e}},X=async e=>{try{let t=await H(e);if(!t||0===t.totalCount)return void lH.toaster.create({type:"info",title:"No tasks to delete",description:`No tasks completed more than ${e} days ago`,duration:3e3});lH.toaster.create({id:"batch-delete-progress",type:"loading",title:"Deleting tasks...",description:`0 / ${t.totalCount}`,duration:1/0})}catch(e){console.error("Failed to start batch delete:",e),lH.toaster.create({type:"error",title:"Failed to delete tasks",description:String(e),duration:5e3})}};return h&&0===u.length?(0,o.jsx)("div",{className:"h-screen flex items-center justify-center bg-background",children:(0,o.jsx)("div",{className:"text-center",children:(0,o.jsx)("div",{className:"text-2xl text-foreground",children:"Loading..."})})}):(0,o.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,o.jsx)(w,{onSettingsClick:()=>a.push("/settings"),onReload:B,nextStep:k.nextStep}),(0,o.jsxs)("div",{className:"relative flex-1 overflow-hidden flex",children:[(0,o.jsx)(l$,{repositories:p,tasksByRepo:T,filtersByRepo:S,onFilterChange:A,onReorder:q,onMoveRepositoryToFront:Y,onAddTask:N,onCloneClick:()=>y(!0),isCloneOnboarding:"clone"===k.nextStep,isCloneDialogOpen:x,tabTodosMap:G}),"env"===k.nextStep&&(0,o.jsx)(E,{hasRepositories:k.state.hasRepositories,hasEnvVars:k.state.hasAuth,hasTasks:k.state.hasTasks})]}),(0,o.jsx)(O,{isOpen:x,onClose:()=>y(!1),onClone:J,isOnboarding:"clone"===k.nextStep}),(0,o.jsx)(D.TaskDialog,{mode:"create",isOpen:null!==v,onClose:()=>N(null),repositories:p,defaultRepo:v??void 0}),(0,o.jsx)(R,{isOpen:I,onClose:()=>C(!1),onConfirm:X})]})}],39798)}]);
package/dist/cli.js CHANGED
@@ -4,6 +4,7 @@ import * as fs from 'node:fs';
4
4
  import * as http from 'node:http';
5
5
  import * as path from 'node:path';
6
6
  import { fileURLToPath } from 'node:url';
7
+ import openBrowser from 'open';
7
8
  import { cleanupPluginState, ensureCleanPluginState } from './plugin-lifecycle.js';
8
9
  import { acquireSingleInstanceLock } from './single-instance-lock.js';
9
10
  /**
@@ -262,8 +263,9 @@ Promise.all([pollHealth(Number(PORT)), pollHealth(Number(NEXT_PORT))]).then(() =
262
263
  console.log(TSUNAGI_AA);
263
264
  const url = `http://localhost:${PORT}`;
264
265
  if (!isDocker) {
265
- const cmd = process.platform === 'darwin' ? 'open' : 'xdg-open';
266
- spawn(cmd, [url], { stdio: 'ignore', detached: true }).unref();
266
+ // macOS / Linux / WSL(Windows 側ブラウザ)の差異は open パッケージが吸収する。
267
+ // ブラウザを開けなくてもサーバーは継続する(URL は下で案内する)
268
+ openBrowser(url).catch(() => { });
267
269
  }
268
270
  console.log(`Open ${url}`);
269
271
  if (docsServer) {