jinn-cli 0.7.3 → 0.7.5
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.
- package/dist/src/connectors/slack/__tests__/format.test.d.ts +2 -0
- package/dist/src/connectors/slack/__tests__/format.test.d.ts.map +1 -0
- package/dist/src/connectors/slack/__tests__/format.test.js +115 -0
- package/dist/src/connectors/slack/__tests__/format.test.js.map +1 -0
- package/dist/src/connectors/slack/format.d.ts +7 -0
- package/dist/src/connectors/slack/format.d.ts.map +1 -1
- package/dist/src/connectors/slack/format.js +33 -3
- package/dist/src/connectors/slack/format.js.map +1 -1
- package/dist/src/connectors/whatsapp/__tests__/format.test.d.ts +2 -0
- package/dist/src/connectors/whatsapp/__tests__/format.test.d.ts.map +1 -0
- package/dist/src/connectors/whatsapp/__tests__/format.test.js +70 -0
- package/dist/src/connectors/whatsapp/__tests__/format.test.js.map +1 -0
- package/dist/src/connectors/whatsapp/format.d.ts +10 -0
- package/dist/src/connectors/whatsapp/format.d.ts.map +1 -1
- package/dist/src/connectors/whatsapp/format.js +34 -3
- package/dist/src/connectors/whatsapp/format.js.map +1 -1
- package/dist/src/gateway/api.d.ts.map +1 -1
- package/dist/src/gateway/api.js +39 -7
- package/dist/src/gateway/api.js.map +1 -1
- package/dist/src/gateway/files.d.ts.map +1 -1
- package/dist/src/gateway/files.js +9 -1
- package/dist/src/gateway/files.js.map +1 -1
- package/dist/src/shared/types.d.ts +1 -0
- package/dist/src/shared/types.d.ts.map +1 -1
- package/dist/web/404.html +1 -1
- package/dist/web/_next/static/chunks/155-5843f8840f40f6f8.js +1 -0
- package/dist/web/_next/static/chunks/192-f566317c5713c743.js +1 -0
- package/dist/web/_next/static/chunks/660-7b281827cf68988a.js +1 -0
- package/dist/web/_next/static/chunks/943.c30215b2dbec402b.js +1 -0
- package/dist/web/_next/static/chunks/app/chat/page-4cd139bb21a2bfd2.js +1 -0
- package/dist/web/_next/static/chunks/app/org/page-b14614ed22c7a80d.js +1 -0
- package/dist/web/_next/static/chunks/app/settings/page-c2b014fb0706aa88.js +1 -0
- package/dist/web/_next/static/chunks/c967e59e-8414f3fe827ed369.js +1 -0
- package/dist/web/_next/static/chunks/{webpack-e7350efbcf65db9c.js → webpack-2e375360ad2078fe.js} +1 -1
- package/dist/web/_next/static/css/a2080d6b6696080a.css +1 -0
- package/dist/web/chat.html +1 -1
- package/dist/web/chat.txt +4 -4
- package/dist/web/cron.html +1 -1
- package/dist/web/cron.txt +4 -4
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +4 -4
- package/dist/web/kanban.html +1 -1
- package/dist/web/kanban.txt +4 -4
- package/dist/web/logs.html +2 -2
- package/dist/web/logs.txt +4 -4
- package/dist/web/org.html +1 -1
- package/dist/web/org.txt +4 -4
- package/dist/web/sessions.html +1 -1
- package/dist/web/sessions.txt +3 -3
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +4 -4
- package/dist/web/skills.html +1 -1
- package/dist/web/skills.txt +4 -4
- package/package.json +1 -1
- package/dist/web/_next/static/chunks/155-277bf3022d16e74f.js +0 -1
- package/dist/web/_next/static/chunks/192-3064c98adfeef88c.js +0 -1
- package/dist/web/_next/static/chunks/865-b4eb9a132b937321.js +0 -1
- package/dist/web/_next/static/chunks/943.1c6d37432bcad8e8.js +0 -1
- package/dist/web/_next/static/chunks/app/chat/page-d9b12d7effe66c59.js +0 -1
- package/dist/web/_next/static/chunks/app/org/page-e51ef93389a23de8.js +0 -1
- package/dist/web/_next/static/chunks/app/settings/page-8d1048b944663524.js +0 -1
- package/dist/web/_next/static/css/92635e77ae2cd8fd.css +0 -1
- /package/dist/web/_next/static/{astVwZfaNwQEC0C3qtVHe → H5hpAyftmmiG3FRvwixYw}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{astVwZfaNwQEC0C3qtVHe → H5hpAyftmmiG3FRvwixYw}/_ssgManifest.js +0 -0
package/dist/web/skills.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--astVwZfaNwQEC0C3qtVHe--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/92635e77ae2cd8fd.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-e7350efbcf65db9c.js"/><script src="/_next/static/chunks/6d25620b-d9f90746a7f2178c.js" async=""></script><script src="/_next/static/chunks/144-548cab85cf18301a.js" async=""></script><script src="/_next/static/chunks/main-app-637478e5d2259005.js" async=""></script><script src="/_next/static/chunks/625-93dc90080662b8f4.js" async=""></script><script src="/_next/static/chunks/155-277bf3022d16e74f.js" async=""></script><script src="/_next/static/chunks/app/layout-45d8b9cc84f9443f.js" async=""></script><script src="/_next/static/chunks/51-43ce350b707e6b06.js" async=""></script><script src="/_next/static/chunks/192-3064c98adfeef88c.js" async=""></script><script src="/_next/static/chunks/app/skills/page-6d9c1d5b03aa86bb.js" async=""></script><meta name="description" content="AI Gateway Dashboard"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div class="flex h-dvh overflow-hidden bg-background"><aside class="fixed inset-y-0 left-0 z-[60] hidden overflow-hidden border-r border-border bg-[var(--bg-secondary)] transition-[width] duration-200 ease-out lg:flex lg:flex-col w-14"><div class="flex min-h-14 shrink-0 items-center gap-2.5 px-3.5 pb-3 pt-4"><span class="w-7 shrink-0 text-center text-2xl leading-none">🤖</span><span class="whitespace-nowrap text-[17px] font-semibold text-foreground transition-opacity duration-200 opacity-0">Jinn</span></div><nav class="flex flex-1 flex-col gap-0.5 px-2"><a href="/" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Home"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-house shrink-0" aria-hidden="true"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"></path><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path></svg><span class="transition-opacity duration-200 opacity-0">Home</span></a><a href="/chat" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Chat"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square shrink-0" aria-hidden="true"><path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"></path></svg><span class="transition-opacity duration-200 opacity-0">Chat</span></a><a href="/org" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Organization"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users shrink-0" aria-hidden="true"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><path d="M16 3.128a4 4 0 0 1 0 7.744"></path><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><circle cx="9" cy="7" r="4"></circle></svg><span class="transition-opacity duration-200 opacity-0">Organization</span></a><a href="/kanban" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Kanban"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-grid shrink-0" aria-hidden="true"><rect width="7" height="7" x="3" y="3" rx="1"></rect><rect width="7" height="7" x="14" y="3" rx="1"></rect><rect width="7" height="7" x="14" y="14" rx="1"></rect><rect width="7" height="7" x="3" y="14" rx="1"></rect></svg><span class="transition-opacity duration-200 opacity-0">Kanban</span></a><a href="/cron" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Cron"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock shrink-0" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 6v6l4 2"></path></svg><span class="transition-opacity duration-200 opacity-0">Cron</span></a><a href="/logs" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Activity"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity shrink-0" aria-hidden="true"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"></path></svg><span class="transition-opacity duration-200 opacity-0">Activity</span></a><a href="/skills" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors bg-[var(--accent-fill)] font-semibold text-[var(--accent)]" aria-label="Skills" aria-current="page"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-zap shrink-0" aria-hidden="true"><path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"></path></svg><span class="transition-opacity duration-200 opacity-0">Skills</span></a><a href="/settings" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Settings"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings shrink-0" aria-hidden="true"><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"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="transition-opacity duration-200 opacity-0">Settings</span></a></nav><div class="shrink-0 px-2 pb-3 pt-2"><button aria-label="Theme: dark. Click to cycle." class="flex h-10 w-full items-center gap-2.5 rounded-md px-3 text-[13px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"><span class="shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><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"></path></svg></span><span class="capitalize transition-opacity duration-200 opacity-0">dark</span></button></div></aside><main class="flex-1 overflow-hidden flex flex-col lg:ml-[56px]"><div class="jsx-906cbf20b7aa1777 relative z-60 flex h-12 shrink-0 items-center border-b border-border bg-[var(--material-thick)] px-3 lg:hidden"><button aria-label="Open menu" class="jsx-906cbf20b7aa1777 inline-flex size-9 items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu" aria-hidden="true"><path d="M4 5h16"></path><path d="M4 12h16"></path><path d="M4 19h16"></path></svg></button><div class="jsx-906cbf20b7aa1777 flex flex-1 items-center justify-center text-center"><span class="jsx-906cbf20b7aa1777 mr-1.5 text-lg">🤖</span><span class="jsx-906cbf20b7aa1777 text-sm font-semibold text-foreground">Jinn</span></div><div class="jsx-906cbf20b7aa1777 flex items-center gap-1"><div class="relative"><button data-slot="button" data-variant="ghost" data-size="icon-sm" class="inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 size-8 relative text-muted-foreground" aria-label="Notifications"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bell" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg></button></div></div></div><div class="flex-1 overflow-hidden"><div class="h-full overflow-y-auto p-[var(--space-6)]"><div class="flex items-center justify-between mb-[var(--space-6)]"><div><h2 class="text-[length:var(--text-title2)] font-[var(--weight-bold)] text-[var(--text-primary)] mb-[var(--space-1)]">Skills</h2><p class="text-[length:var(--text-body)] text-[var(--text-tertiary)]">Capabilities and learned behaviors</p></div><button class="py-[var(--space-2)] px-[var(--space-4)] rounded-[var(--radius-md,12px)] text-[var(--accent)] border-none cursor-pointer text-[length:var(--text-body)] font-[var(--weight-medium)]" style="background:color-mix(in srgb, var(--accent) 12%, transparent)">+ Create Skill</button></div><div class="text-center p-[var(--space-8)] text-[var(--text-tertiary)] text-[length:var(--text-body)]">Loading...</div></div></div></main></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-e7350efbcf65db9c.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[4874,[\"625\",\"static/chunks/625-93dc90080662b8f4.js\",\"155\",\"static/chunks/155-277bf3022d16e74f.js\",\"177\",\"static/chunks/app/layout-45d8b9cc84f9443f.js\"],\"ClientProviders\"]\n3:I[1015,[],\"\"]\n4:I[3912,[],\"\"]\n5:I[3538,[],\"ClientPageRoot\"]\n6:I[2886,[\"625\",\"static/chunks/625-93dc90080662b8f4.js\",\"51\",\"static/chunks/51-43ce350b707e6b06.js\",\"155\",\"static/chunks/155-277bf3022d16e74f.js\",\"192\",\"static/chunks/192-3064c98adfeef88c.js\",\"501\",\"static/chunks/app/skills/page-6d9c1d5b03aa86bb.js\"],\"default\"]\n9:I[6862,[],\"OutletBoundary\"]\nb:I[1475,[],\"AsyncMetadataOutlet\"]\nd:I[6862,[],\"ViewportBoundary\"]\nf:I[6862,[],\"MetadataBoundary\"]\n10:\"$Sreact.suspense\"\n12:I[1389,[],\"\"]\n:HL[\"/_next/static/css/92635e77ae2cd8fd.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"astVwZfaNwQEC0C3qtVHe\",\"p\":\"\",\"c\":[\"\",\"skills\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"skills\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/92635e77ae2cd8fd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[\"skills\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}],null,[\"$\",\"$L9\",null,{\"children\":[\"$La\",[\"$\",\"$Lb\",null,{\"promise\":\"$@c\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],null],[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$10\",null,{\"fallback\":null,\"children\":\"$L11\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"7:{}\n8:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\na:null\n"])</script><script>self.__next_f.push([1,"c:{\"metadata\":[[\"$\",\"meta\",\"0\",{\"name\":\"description\",\"content\":\"AI Gateway Dashboard\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"11:\"$c:metadata\"\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--H5hpAyftmmiG3FRvwixYw--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/a2080d6b6696080a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-2e375360ad2078fe.js"/><script src="/_next/static/chunks/6d25620b-d9f90746a7f2178c.js" async=""></script><script src="/_next/static/chunks/144-548cab85cf18301a.js" async=""></script><script src="/_next/static/chunks/main-app-637478e5d2259005.js" async=""></script><script src="/_next/static/chunks/625-93dc90080662b8f4.js" async=""></script><script src="/_next/static/chunks/155-5843f8840f40f6f8.js" async=""></script><script src="/_next/static/chunks/app/layout-45d8b9cc84f9443f.js" async=""></script><script src="/_next/static/chunks/51-43ce350b707e6b06.js" async=""></script><script src="/_next/static/chunks/192-f566317c5713c743.js" async=""></script><script src="/_next/static/chunks/app/skills/page-6d9c1d5b03aa86bb.js" async=""></script><meta name="description" content="AI Gateway Dashboard"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div class="flex h-dvh overflow-hidden bg-background"><aside class="fixed inset-y-0 left-0 hidden overflow-hidden border-r border-border bg-[var(--bg-secondary)] transition-[width,z-index] duration-200 ease-out lg:flex lg:flex-col z-[60] w-14"><div class="flex min-h-14 shrink-0 items-center gap-2.5 px-3.5 pb-3 pt-4"><span class="w-7 shrink-0 text-center text-2xl leading-none">🧞</span><span class="whitespace-nowrap text-[17px] font-semibold text-foreground transition-opacity duration-200 opacity-0">Jinn</span></div><nav class="flex flex-1 flex-col gap-0.5 px-2"><a href="/" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Home"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-house shrink-0" aria-hidden="true"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"></path><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path></svg><span class="transition-opacity duration-200 opacity-0">Home</span></a><a href="/chat" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Chat"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square shrink-0" aria-hidden="true"><path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"></path></svg><span class="transition-opacity duration-200 opacity-0">Chat</span></a><a href="/org" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Organization"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users shrink-0" aria-hidden="true"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><path d="M16 3.128a4 4 0 0 1 0 7.744"></path><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><circle cx="9" cy="7" r="4"></circle></svg><span class="transition-opacity duration-200 opacity-0">Organization</span></a><a href="/kanban" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Kanban"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-grid shrink-0" aria-hidden="true"><rect width="7" height="7" x="3" y="3" rx="1"></rect><rect width="7" height="7" x="14" y="3" rx="1"></rect><rect width="7" height="7" x="14" y="14" rx="1"></rect><rect width="7" height="7" x="3" y="14" rx="1"></rect></svg><span class="transition-opacity duration-200 opacity-0">Kanban</span></a><a href="/cron" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Cron"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock shrink-0" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 6v6l4 2"></path></svg><span class="transition-opacity duration-200 opacity-0">Cron</span></a><a href="/logs" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Activity"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity shrink-0" aria-hidden="true"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"></path></svg><span class="transition-opacity duration-200 opacity-0">Activity</span></a><a href="/skills" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors bg-[var(--accent-fill)] font-semibold text-[var(--accent)]" aria-label="Skills" aria-current="page"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-zap shrink-0" aria-hidden="true"><path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"></path></svg><span class="transition-opacity duration-200 opacity-0">Skills</span></a><a href="/settings" class="group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="Settings"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings shrink-0" aria-hidden="true"><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"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="transition-opacity duration-200 opacity-0">Settings</span></a></nav><div class="shrink-0 px-2 pb-3 pt-2"><button aria-label="Theme: dark. Click to cycle." class="flex h-10 w-full items-center gap-2.5 rounded-md px-3 text-[13px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"><span class="shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><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"></path></svg></span><span class="capitalize transition-opacity duration-200 opacity-0">dark</span></button></div></aside><main class="flex-1 overflow-hidden flex flex-col lg:ml-[56px]"><div class="jsx-906cbf20b7aa1777 relative z-60 flex h-12 shrink-0 items-center border-b border-border bg-[var(--material-thick)] px-3 lg:hidden"><button aria-label="Open menu" class="jsx-906cbf20b7aa1777 inline-flex size-9 items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu" aria-hidden="true"><path d="M4 5h16"></path><path d="M4 12h16"></path><path d="M4 19h16"></path></svg></button><div class="jsx-906cbf20b7aa1777 flex flex-1 items-center justify-center text-center"><span class="jsx-906cbf20b7aa1777 mr-1.5 text-lg">🧞</span><span class="jsx-906cbf20b7aa1777 text-sm font-semibold text-foreground">Jinn</span></div><div class="jsx-906cbf20b7aa1777 flex items-center gap-1"><div class="relative"><button data-slot="button" data-variant="ghost" data-size="icon-sm" class="inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 size-8 relative text-muted-foreground" aria-label="Notifications"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bell" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg></button></div></div></div><div class="flex-1 overflow-hidden"><div class="h-full overflow-y-auto p-[var(--space-6)]"><div class="flex items-center justify-between mb-[var(--space-6)]"><div><h2 class="text-[length:var(--text-title2)] font-[var(--weight-bold)] text-[var(--text-primary)] mb-[var(--space-1)]">Skills</h2><p class="text-[length:var(--text-body)] text-[var(--text-tertiary)]">Capabilities and learned behaviors</p></div><button class="py-[var(--space-2)] px-[var(--space-4)] rounded-[var(--radius-md,12px)] text-[var(--accent)] border-none cursor-pointer text-[length:var(--text-body)] font-[var(--weight-medium)]" style="background:color-mix(in srgb, var(--accent) 12%, transparent)">+ Create Skill</button></div><div class="text-center p-[var(--space-8)] text-[var(--text-tertiary)] text-[length:var(--text-body)]">Loading...</div></div></div></main></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-2e375360ad2078fe.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[4874,[\"625\",\"static/chunks/625-93dc90080662b8f4.js\",\"155\",\"static/chunks/155-5843f8840f40f6f8.js\",\"177\",\"static/chunks/app/layout-45d8b9cc84f9443f.js\"],\"ClientProviders\"]\n3:I[1015,[],\"\"]\n4:I[3912,[],\"\"]\n5:I[3538,[],\"ClientPageRoot\"]\n6:I[2886,[\"625\",\"static/chunks/625-93dc90080662b8f4.js\",\"51\",\"static/chunks/51-43ce350b707e6b06.js\",\"155\",\"static/chunks/155-5843f8840f40f6f8.js\",\"192\",\"static/chunks/192-f566317c5713c743.js\",\"501\",\"static/chunks/app/skills/page-6d9c1d5b03aa86bb.js\"],\"default\"]\n9:I[6862,[],\"OutletBoundary\"]\nb:I[1475,[],\"AsyncMetadataOutlet\"]\nd:I[6862,[],\"ViewportBoundary\"]\nf:I[6862,[],\"MetadataBoundary\"]\n10:\"$Sreact.suspense\"\n12:I[1389,[],\"\"]\n:HL[\"/_next/static/css/a2080d6b6696080a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"H5hpAyftmmiG3FRvwixYw\",\"p\":\"\",\"c\":[\"\",\"skills\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"skills\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a2080d6b6696080a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[\"skills\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}],null,[\"$\",\"$L9\",null,{\"children\":[\"$La\",[\"$\",\"$Lb\",null,{\"promise\":\"$@c\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],null],[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$10\",null,{\"fallback\":null,\"children\":\"$L11\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"7:{}\n8:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\na:null\n"])</script><script>self.__next_f.push([1,"c:{\"metadata\":[[\"$\",\"meta\",\"0\",{\"name\":\"description\",\"content\":\"AI Gateway Dashboard\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"11:\"$c:metadata\"\n"])</script></body></html>
|
package/dist/web/skills.txt
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[4874,["625","static/chunks/625-93dc90080662b8f4.js","155","static/chunks/155-
|
|
2
|
+
2:I[4874,["625","static/chunks/625-93dc90080662b8f4.js","155","static/chunks/155-5843f8840f40f6f8.js","177","static/chunks/app/layout-45d8b9cc84f9443f.js"],"ClientProviders"]
|
|
3
3
|
3:I[1015,[],""]
|
|
4
4
|
4:I[3912,[],""]
|
|
5
5
|
5:I[3538,[],"ClientPageRoot"]
|
|
6
|
-
6:I[2886,["625","static/chunks/625-93dc90080662b8f4.js","51","static/chunks/51-43ce350b707e6b06.js","155","static/chunks/155-
|
|
6
|
+
6:I[2886,["625","static/chunks/625-93dc90080662b8f4.js","51","static/chunks/51-43ce350b707e6b06.js","155","static/chunks/155-5843f8840f40f6f8.js","192","static/chunks/192-f566317c5713c743.js","501","static/chunks/app/skills/page-6d9c1d5b03aa86bb.js"],"default"]
|
|
7
7
|
9:I[6862,[],"OutletBoundary"]
|
|
8
8
|
b:I[1475,[],"AsyncMetadataOutlet"]
|
|
9
9
|
d:I[6862,[],"ViewportBoundary"]
|
|
10
10
|
f:I[6862,[],"MetadataBoundary"]
|
|
11
11
|
10:"$Sreact.suspense"
|
|
12
12
|
12:I[1389,[],""]
|
|
13
|
-
:HL["/_next/static/css/
|
|
14
|
-
0:{"P":null,"b":"
|
|
13
|
+
:HL["/_next/static/css/a2080d6b6696080a.css","style"]
|
|
14
|
+
0:{"P":null,"b":"H5hpAyftmmiG3FRvwixYw","p":"","c":["","skills"],"i":false,"f":[[["",{"children":["skills",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/a2080d6b6696080a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["skills",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","searchParams":{},"params":{},"promises":["$@7","$@8"]}],null,["$","$L9",null,{"children":["$La",["$","$Lb",null,{"promise":"$@c"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Ld",null,{"children":"$Le"}],null],["$","$Lf",null,{"children":["$","div",null,{"hidden":true,"children":["$","$10",null,{"fallback":null,"children":"$L11"}]}]}]]}],false]],"m":"$undefined","G":["$12",[]],"s":false,"S":true}
|
|
15
15
|
7:{}
|
|
16
16
|
8:"$0:f:0:1:2:children:2:children:1:props:children:0:props:params"
|
|
17
17
|
e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[155],{2845:(e,t,n)=>{n.d(t,{G:()=>r});var o=n(7946),a=n(3828);function r(){let[e,t]=(0,o.useState)([]),[n,r]=(0,o.useState)(!1),[s,l]=(0,o.useState)(0),[c,i]=(0,o.useState)(0),u=(0,o.useRef)(new Set);return(0,o.useEffect)(()=>{let e=(0,a.E)((e,n)=>{for(let o of(t(t=>[...t.slice(-99),{event:e,payload:n}]),"skills:changed"===e&&i(e=>e+1),u.current))o(e,n)},{onOpen:()=>{r(!0),l(e=>e+1)},onClose:()=>{r(!1)}});return()=>e.close()},[]),{events:e,connected:n,connectionSeq:s,skillsVersion:c,subscribe:(0,o.useCallback)(e=>(u.current.add(e),()=>{u.current.delete(e)}),[])}}},3828:(e,t,n)=>{n.d(t,{E:()=>o});function o(e,t){let n="".concat("https:"===window.location.protocol?"wss:":"ws:","//").concat(window.location.host,"/ws"),o=null,a=null,r=!1;return!function s(){r||((o=new WebSocket(n)).onopen=()=>{var e;null==t||null==(e=t.onOpen)||e.call(t)},o.onmessage=t=>{try{let n=JSON.parse(t.data);e(n.event,n.payload)}catch(e){}},o.onclose=()=>{var e;null==t||null==(e=t.onClose)||e.call(t),r||(a=setTimeout(s,3e3))},o.onerror=()=>null==o?void 0:o.close())}(),{close:()=>{r=!0,a&&clearTimeout(a),null==o||o.close()}}}},4722:(e,t,n)=>{n.d(t,{Qc:()=>m,Z6:()=>u,t0:()=>p});var o=n(4130),a=n(7946);let r={accentColor:null,portalName:null,portalSubtitle:null,portalEmoji:null,portalIcon:null,iconBgHidden:!1,emojiOnly:!1,operatorName:null,language:"English",employeeOverrides:{}},s="jinn-settings";function l(e){localStorage.setItem(s,JSON.stringify(e))}var c=n(6654);let i=(0,a.createContext)({settings:{accentColor:null,portalName:null,portalSubtitle:null,portalEmoji:null,portalIcon:null,iconBgHidden:!1,emojiOnly:!1,operatorName:null,language:"English",employeeOverrides:{}},setAccentColor:()=>{},setPortalName:()=>{},setPortalSubtitle:()=>{},setPortalEmoji:()=>{},setPortalIcon:()=>{},setIconBgHidden:()=>{},setEmojiOnly:()=>{},setOperatorName:()=>{},setLanguage:()=>{},setEmployeeOverride:()=>{},clearEmployeeOverride:()=>{},getEmployeeDisplay:e=>({emoji:e.emoji}),resetAll:()=>{}});function u(e){let{children:t}=e,[n,u]=(0,a.useState)({...r});(0,a.useEffect)(()=>{let e=function(){try{let e=localStorage.getItem(s);if(!e)return{...r};let t=JSON.parse(e);return{...r,...t}}catch(e){return{...r}}}();u(e),c.F.getOnboarding().then(t=>{if(t.portalName||t.operatorName){let n={...e,...t.portalName&&{portalName:t.portalName},...t.operatorName&&{operatorName:t.operatorName}};u(n),l(n)}}).catch(()=>{})},[]),(0,a.useEffect)(()=>{let e=document.documentElement.style;n.accentColor?(e.setProperty("--accent",n.accentColor),e.setProperty("--accent-fill",function(e){let t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return"rgba(".concat(t,",").concat(n,",").concat(o,",0.15)")}(n.accentColor)),e.setProperty("--accent-contrast",function(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255,a=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return .2126*a(t)+.7152*a(n)+.0722*a(o)>.4?"#000":"#fff"}(n.accentColor))):(e.removeProperty("--accent"),e.removeProperty("--accent-fill"),e.removeProperty("--accent-contrast"))},[n.accentColor]);let p=(0,a.useCallback)(e=>{u(t=>{let n=e(t);return l(n),n})},[]),m=(0,a.useCallback)(e=>{p(t=>({...t,accentColor:e}))},[p]),d=(0,a.useCallback)(e=>{p(t=>({...t,portalName:e||null}))},[p]),g=(0,a.useCallback)(e=>{p(t=>({...t,portalSubtitle:e||null}))},[p]),f=(0,a.useCallback)(e=>{p(t=>({...t,portalEmoji:e||null}))},[p]),h=(0,a.useCallback)(e=>{p(t=>({...t,portalIcon:e}))},[p]),b=(0,a.useCallback)(e=>{p(t=>({...t,iconBgHidden:e}))},[p]),y=(0,a.useCallback)(e=>{p(t=>({...t,emojiOnly:e}))},[p]),C=(0,a.useCallback)(e=>{p(t=>({...t,operatorName:e||null}))},[p]),S=(0,a.useCallback)(e=>{p(t=>({...t,language:e||"English"}))},[p]),k=(0,a.useCallback)((e,t)=>{p(n=>{let o=n.employeeOverrides[e]||{};return{...n,employeeOverrides:{...n.employeeOverrides,[e]:{...o,...t}}}})},[p]),E=(0,a.useCallback)(e=>{p(t=>{let{[e]:n,...o}=t.employeeOverrides;return{...t,employeeOverrides:o}})},[p]),v=(0,a.useCallback)(e=>{let t=n.employeeOverrides[e.id];return{emoji:(null==t?void 0:t.emoji)||e.emoji,profileImage:null==t?void 0:t.profileImage,emojiOnly:n.emojiOnly}},[n.employeeOverrides,n.emojiOnly]),w=(0,a.useCallback)(()=>{p(()=>({accentColor:null,portalName:null,portalSubtitle:null,portalEmoji:null,portalIcon:null,iconBgHidden:!1,emojiOnly:!1,operatorName:null,language:"English",employeeOverrides:{}}))},[p]);return(0,o.jsx)(i.Provider,{value:{settings:n,setAccentColor:m,setPortalName:d,setPortalSubtitle:g,setPortalEmoji:f,setPortalIcon:h,setIconBgHidden:b,setEmojiOnly:y,setOperatorName:C,setLanguage:S,setEmployeeOverride:k,clearEmployeeOverride:E,getEmployeeDisplay:v,resetAll:w},children:t})}let p=()=>(0,a.useContext)(i);function m(){let{settings:e}=p(),t=(0,a.useRef)(e.portalName);return t.current=e.portalName,(0,a.useEffect)(()=>{function e(){let e=t.current||"Jinn",n="".concat(e," - AI Gateway");document.title!==n&&(document.title=n)}e();let n=document.querySelector("title");if(!n)return;let o=new MutationObserver(()=>e());return o.observe(n,{childList:!0,characterData:!0,subtree:!0}),()=>o.disconnect()},[e.portalName]),null}},4723:(e,t,n)=>{n.d(t,{E:()=>r,V:()=>a});var o=n(7946);let a=(0,o.createContext)({notifications:[],unreadCount:0,toasts:[],pushFromEvent:()=>{},dismissToast:()=>{},markAllRead:()=>{},markRead:()=>{},clearAll:()=>{}});function r(){return(0,o.useContext)(a)}},5465:(e,t,n)=>{n.d(t,{l:()=>o});let o={sessions:{all:["sessions"],detail:e=>["sessions",e],children:e=>["sessions",e,"children"],transcript:e=>["sessions",e,"transcript"],queue:e=>["sessions",e,"queue"]},org:{all:["org"],employee:e=>["org","employees",e],board:e=>["org","departments",e,"board"]},cron:{all:["cron"],runs:e=>["cron",e,"runs"]},skills:{all:["skills"],detail:e=>["skills",e]},config:["config"],status:["status"],onboarding:["onboarding"]}},6654:(e,t,n)=>{n.d(t,{F:()=>i});let o=window.location.origin;async function a(e){try{let t=await e.json();if(t.error)return String(t.error);if(t.message)return String(t.message)}catch(e){}return"API error: ".concat(e.status)}async function r(e){let t=await fetch("".concat(o).concat(e));if(!t.ok)throw Error(await a(t));return t.json()}async function s(e,t){let n=await fetch("".concat(o).concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:t?JSON.stringify(t):void 0});if(!n.ok)throw Error(await a(n));return n.json()}async function l(e){let t=await fetch("".concat(o).concat(e),{method:"DELETE"});if(!t.ok)throw Error(await a(t));return t.json()}async function c(e,t){let n=await fetch("".concat(o).concat(e),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await a(n));return n.json()}let i={getStatus:()=>r("/api/status"),getSessions:()=>r("/api/sessions"),getSession:e=>r("/api/sessions/".concat(e)),getSessionChildren:e=>r("/api/sessions/".concat(e,"/children")),deleteSession:e=>l("/api/sessions/".concat(e)),bulkDeleteSessions:e=>s("/api/sessions/bulk-delete",{ids:e}),createSession:e=>s("/api/sessions",e),createStubSession:e=>s("/api/sessions/stub",e),sendMessage:(e,t)=>s("/api/sessions/".concat(e,"/message"),t),stopSession:e=>s("/api/sessions/".concat(e,"/stop"),{}),resetSession:e=>s("/api/sessions/".concat(e,"/reset"),{}),getCronJobs:()=>r("/api/cron"),getCronRuns:e=>r("/api/cron/".concat(e,"/runs")),updateCronJob:(e,t)=>c("/api/cron/".concat(e),t),triggerCronJob:e=>s("/api/cron/".concat(e,"/trigger"),{}),getOrg:()=>r("/api/org"),getEmployee:e=>r("/api/org/employees/".concat(e)),getDepartmentBoard:e=>r("/api/org/departments/".concat(e,"/board")),getSkills:()=>r("/api/skills"),getSkill:e=>r("/api/skills/".concat(e)),getConfig:()=>r("/api/config"),updateConfig:e=>c("/api/config",e),getLogs:e=>r("/api/logs".concat(e?"?n=".concat(e):"")),getOnboarding:()=>r("/api/onboarding"),completeOnboarding:e=>s("/api/onboarding",e),getActivity:()=>r("/api/activity"),updateDepartmentBoard:(e,t)=>c("/api/org/departments/".concat(e,"/board"),t),sttStatus:()=>r("/api/stt/status"),sttDownload:()=>s("/api/stt/download",{}),sttTranscribe:async(e,t)=>{let n=t?"?language=".concat(encodeURIComponent(t)):"",a=new AbortController,r=setTimeout(()=>a.abort(),3e5);try{let t=await fetch("".concat(o,"/api/stt/transcribe").concat(n),{method:"POST",headers:{"Content-Type":e.type||"audio/webm"},body:e,signal:a.signal});if(!t.ok)throw Error("API error: ".concat(t.status));return t.json()}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)throw Error("Transcription timed out (5 min)");throw e}finally{clearTimeout(r)}},sttUpdateConfig:e=>c("/api/stt/config",{languages:e}),getSessionQueue:e=>r("/api/sessions/".concat(e,"/queue")),cancelQueueItem:(e,t)=>l("/api/sessions/".concat(e,"/queue/").concat(t)),clearSessionQueue:e=>l("/api/sessions/".concat(e,"/queue")),pauseSessionQueue:e=>s("/api/sessions/".concat(e,"/queue/pause"),{}),resumeSessionQueue:e=>s("/api/sessions/".concat(e,"/queue/resume"),{}),getSessionTranscript:e=>r("/api/sessions/".concat(e,"/transcript"))}},8565:(e,t,n)=>{n.d(t,{i:()=>l,t:()=>s});var o=n(4130),a=n(7946);let r=(0,a.createContext)({items:[],setItems:()=>{}});function s(e){let{children:t}=e,[n,s]=(0,a.useState)([]);return(0,a.useEffect)(()=>{if(n.length>0){let e=n.map(e=>e.label).join(" > ");document.title="".concat(e," - Jinn")}},[n]),(0,o.jsx)(r.Provider,{value:{items:n,setItems:s},children:t})}function l(e){let t=(0,a.useContext)(r),n=e?JSON.stringify(e):"";return(0,a.useEffect)(()=>{e&&t.setItems(e)},[n]),t}},8838:(e,t,n)=>{n.d(t,{D:()=>l,N:()=>s});var o=n(4130),a=n(7946);let r=(0,a.createContext)({theme:"dark",setTheme:()=>{}});function s(e){let{children:t}=e,[n,s]=(0,a.useState)("dark"),l=(0,a.useCallback)(e=>{s(e),localStorage.setItem("jinn-theme",e);let t=document.documentElement;if(t.removeAttribute("data-theme"),"system"===e){let e=window.matchMedia("(prefers-color-scheme: dark)").matches;t.setAttribute("data-theme",e?"dark":"light")}else t.setAttribute("data-theme",e)},[]);return(0,a.useEffect)(()=>{let e=localStorage.getItem("jinn-theme");e&&l(e)},[l]),(0,a.useEffect)(()=>{let e=window.matchMedia("(prefers-color-scheme: dark)");function t(){"system"===localStorage.getItem("jinn-theme")&&document.documentElement.setAttribute("data-theme",e.matches?"dark":"light")}return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,o.jsx)(r.Provider,{value:{theme:n,setTheme:l},children:t})}function l(){return(0,a.useContext)(r)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[192],{129:(e,t,a)=>{a.d(t,{r:()=>g});var r=a(4130),s=a(7946),n=a(9919),l=a(4052),i=a(262),o=a(4641),c=a(9152),d=a(4139),x=a(8574),u=a(4723),p=a(6960),m=a(6063);let h={success:n.A,error:l.A,warning:i.A,info:o.A},v={success:"text-[var(--system-green)]",error:"text-[var(--system-red)]",warning:"text-[var(--system-orange)]",info:"text-[var(--system-blue)]"};function g(){let{notifications:e,unreadCount:t,markAllRead:a,markRead:n,clearAll:l}=(0,u.E)(),[i,o]=(0,s.useState)(!1),g=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(i)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){g.current&&!g.current.contains(e.target)&&o(!1)}},[i]),(0,r.jsxs)("div",{ref:g,className:"relative",children:[(0,r.jsxs)(p.$,{onClick:()=>o(e=>!e),"aria-label":"Notifications".concat(t>0?" (".concat(t," unread)"):""),variant:"ghost",size:"icon-sm",className:"relative text-muted-foreground",children:[(0,r.jsx)(c.A,{size:18}),t>0&&(0,r.jsx)("span",{className:"absolute right-0.5 top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-[var(--system-red)] px-1 text-[10px] font-bold leading-none text-white",children:t>99?"99+":t})]}),i&&(0,r.jsxs)("div",{className:"animate-scale-up absolute right-0 top-[calc(100%+8px)] z-[200] flex max-h-[480px] w-[360px] max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-[var(--radius-lg)] border border-border bg-[var(--material-thick)] shadow-[var(--shadow-overlay)] backdrop-blur-[40px]",children:[(0,r.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-3",children:[(0,r.jsx)("span",{className:"text-[15px] font-semibold text-foreground",children:"Notifications"}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[t>0&&(0,r.jsxs)("button",{onClick:a,title:"Mark all as read",className:"flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-[var(--system-blue)] transition-colors hover:bg-accent",children:[(0,r.jsx)(d.A,{size:14}),"Read all"]}),e.length>0&&(0,r.jsx)("button",{onClick:()=>{l(),o(!1)},title:"Clear all",className:"flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:(0,r.jsx)(x.A,{size:14})})]})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:0===e.length?(0,r.jsx)("div",{className:"px-4 py-8 text-center text-[13px] text-muted-foreground",children:"No notifications yet"}):e.map(e=>{let t=h[e.type];return(0,r.jsxs)("div",{onClick:()=>n(e.id),className:(0,m.cn)("flex cursor-pointer items-start gap-2.5 border-b border-border px-4 py-2.5 transition-colors hover:bg-accent",e.read?"bg-transparent":"bg-[var(--material-ultra-thin)]"),children:[(0,r.jsx)(t,{size:16,className:(0,m.cn)("mt-0.5 shrink-0",v[e.type])}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:(0,m.cn)("text-[13px] leading-[1.3] text-foreground",e.read?"font-normal":"font-semibold"),children:e.title}),(0,r.jsx)("div",{className:"mt-0.5 truncate text-xs leading-[1.3] text-[var(--text-secondary)]",children:e.message})]}),(0,r.jsx)("span",{className:"mt-0.5 shrink-0 whitespace-nowrap text-[11px] text-[var(--text-quaternary)]",children:function(e){let t=Math.floor((Date.now()-e)/1e3);return t<60?"just now":t<3600?"".concat(Math.floor(t/60),"m ago"):t<86400?"".concat(Math.floor(t/3600),"h ago"):"".concat(Math.floor(t/86400),"d ago")}(e.timestamp)}),!e.read&&(0,r.jsx)("span",{className:"mt-[5px] size-2 shrink-0 rounded-full bg-[var(--system-blue)]"})]},e.id)})})]})]})}},280:(e,t,a)=>{a.d(t,{z:()=>r});let r=[{id:"dark",label:"Dark",emoji:"\uD83C\uDF11"},{id:"glass",label:"Glass",emoji:"\uD83E\uDE9F"},{id:"color",label:"Color",emoji:"\uD83C\uDFA8"},{id:"light",label:"Light",emoji:"☀️"},{id:"system",label:"System",emoji:"⚙️"}]},3160:(e,t,a)=>{a.d(t,{Q6:()=>d,tS:()=>c,te:()=>o});var r=a(7459),s=a(7122),n=a(8045),l=a(5465),i=a(6654);function o(){return(0,r.I)({queryKey:l.l.sessions.all,queryFn:()=>i.F.getSessions()})}function c(){let e=(0,s.jE)();return(0,n.n)({mutationFn:e=>i.F.deleteSession(e),onSuccess:()=>e.invalidateQueries({queryKey:l.l.sessions.all})})}function d(){let e=(0,s.jE)();return(0,n.n)({mutationFn:e=>i.F.bulkDeleteSessions(e),onSuccess:()=>e.invalidateQueries({queryKey:l.l.sessions.all})})}},6063:(e,t,a)=>{a.d(t,{cn:()=>n});var r=a(451),s=a(1287);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,s.QP)((0,r.$)(t))}},6960:(e,t,a)=>{a.d(t,{$:()=>o});var r=a(4130);a(7946);var s=a(4322),n=a(1271),l=a(6063);let i=(0,s.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:a="default",size:s="default",asChild:o=!1,...c}=e,d=o?n.bL:"button";return(0,r.jsx)(d,{"data-slot":"button","data-variant":a,"data-size":s,className:(0,l.cn)(i({variant:a,size:s,className:t})),...c})}},7192:(e,t,a)=>{a.d(t,{M:()=>e_,v:()=>eE});var r=a(4130),s=a(7053),n=a.n(s),l=a(7946),i=a(7614),o=a.n(i),c=a(2467),d=a(4722),x=a(597),u=a(1360),p=a(208),m=a(2231),h=a(8838),v=a(280),g=a(483),f=a(1004),b=a(8831),j=a(5254),y=a(4481),N=a(216),k=a(6088),w=a(1428);let A=[{href:"/",label:"Home",icon:g.A},{href:"/chat",label:"Chat",icon:f.A},{href:"/org",label:"Organization",icon:b.A},{href:"/kanban",label:"Kanban",icon:j.A},{href:"/cron",label:"Cron",icon:y.A},{href:"/logs",label:"Activity",icon:N.A},{href:"/skills",label:"Skills",icon:k.A},{href:"/settings",label:"Settings",icon:w.A}];var z=a(6063);function C(e){let{theme:t}=e;switch(t){case"light":return(0,r.jsx)(x.A,{size:18});case"dark":return(0,r.jsx)(u.A,{size:18});default:return(0,r.jsx)(p.A,{size:18})}}function S(){var e,t;let a=(0,c.usePathname)(),{theme:s,setTheme:n}=(0,h.D)(),{settings:i}=(0,d.t0)(),[o,x]=(0,l.useState)(!1),[u,p]=(0,l.useState)([]),[g,f]=(0,l.useState)(!1),b=null!=(e=i.portalEmoji)?e:"\uD83E\uDD16",j=null!=(t=i.portalName)?t:"Jinn";return(0,l.useEffect)(()=>{fetch("/api/instances").then(e=>e.json()).then(p).catch(()=>{})},[]),(0,r.jsxs)("aside",{onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:(0,z.cn)("fixed inset-y-0 left-0 z-[60] hidden overflow-hidden border-r border-border bg-[var(--bg-secondary)] transition-[width] duration-200 ease-out lg:flex lg:flex-col",o?"w-[200px]":"w-14"),children:[(0,r.jsxs)("div",{className:"flex min-h-14 shrink-0 items-center gap-2.5 px-3.5 pb-3 pt-4",children:[(0,r.jsx)("span",{className:"w-7 shrink-0 text-center text-2xl leading-none",children:b}),(0,r.jsx)("span",{className:(0,z.cn)("whitespace-nowrap text-[17px] font-semibold text-foreground transition-opacity duration-200",o?"opacity-100":"opacity-0"),children:j})]}),(0,r.jsx)("nav",{className:"flex flex-1 flex-col gap-0.5 px-2",children:A.map(e=>{let t="/"===e.href?"/"===a:a.startsWith(e.href),s=e.icon;return(0,r.jsxs)("a",{href:e.href,className:(0,z.cn)("group flex h-10 items-center gap-2.5 rounded-md px-3 text-[13px] whitespace-nowrap transition-colors",t?"bg-[var(--accent-fill)] font-semibold text-[var(--accent)]":"text-muted-foreground hover:bg-accent hover:text-foreground"),"aria-label":e.label,"aria-current":t?"page":void 0,children:[(0,r.jsx)(s,{size:18,className:"shrink-0"}),(0,r.jsx)("span",{className:(0,z.cn)("transition-opacity duration-200",o?"opacity-100":"opacity-0"),children:e.label})]},e.href)})}),u.length>1&&(0,r.jsxs)("div",{className:"relative shrink-0 px-2 pt-1",children:[(0,r.jsxs)("button",{onClick:()=>f(e=>!e),"aria-label":"Switch instance",className:"flex h-10 w-full items-center gap-2.5 rounded-md px-3 text-[13px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,r.jsx)(m.A,{size:18,className:"shrink-0"}),(0,r.jsx)("span",{className:(0,z.cn)("transition-opacity duration-200",o?"opacity-100":"opacity-0"),children:"Switch"})]}),g&&o&&(0,r.jsx)("div",{className:"absolute bottom-full left-2 z-100 mb-1 min-w-[180px] rounded-xl border border-border bg-[var(--material-thick)] p-1 shadow-[var(--shadow-overlay)] backdrop-blur-xl",children:u.map(e=>(0,r.jsxs)("button",{onClick:()=>{!e.current&&e.running&&(window.location.href="http://localhost:".concat(e.port,"/chat")),f(!1)},className:(0,z.cn)("flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-[13px] transition-colors",e.current?"bg-[var(--accent-fill)] font-semibold text-[var(--accent)]":e.running?"text-foreground hover:bg-accent":"cursor-default text-[var(--text-quaternary)]"),children:[(0,r.jsx)("span",{children:e.name}),(0,r.jsx)("span",{className:"size-2 shrink-0 rounded-full",style:{background:e.running?"var(--system-green)":"var(--text-quaternary)"}})]},e.port))})]}),(0,r.jsx)("div",{className:"shrink-0 px-2 pb-3 pt-2",children:(0,r.jsxs)("button",{onClick:function(){let e=v.z.map(e=>e.id),t=e.indexOf(s);n(e[(t+1)%e.length])},"aria-label":"Theme: ".concat(s,". Click to cycle."),className:"flex h-10 w-full items-center gap-2.5 rounded-md px-3 text-[13px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,r.jsx)("span",{className:"shrink-0",children:(0,r.jsx)(C,{theme:s})}),(0,r.jsx)("span",{className:(0,z.cn)("capitalize transition-opacity duration-200",o?"opacity-100":"opacity-0"),children:s})]})})]})}var E=a(7103),F=a(6532),_=a(9309),L=a(841),B=a(1977),D=a(6429),I=a(7632);function q(e){let{className:t,...a}=e;return(0,r.jsx)(B.uB,{"data-slot":"command",className:(0,z.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...a})}function R(e){let{className:t,...a}=e;return(0,r.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,r.jsx)(D.A,{className:"size-4 shrink-0 opacity-50"}),(0,r.jsx)(B.uB.Input,{"data-slot":"command-input",className:(0,z.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...a})]})}function W(e){let{className:t,...a}=e;return(0,r.jsx)(B.uB.List,{"data-slot":"command-list",className:(0,z.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...a})}function K(e){let{...t}=e;return(0,r.jsx)(B.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function J(e){let{className:t,...a}=e;return(0,r.jsx)(B.uB.Group,{"data-slot":"command-group",className:(0,z.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...a})}function O(e){let{className:t,...a}=e;return(0,r.jsx)(B.uB.Separator,{"data-slot":"command-separator",className:(0,z.cn)("-mx-1 h-px bg-border",t),...a})}function P(e){let{className:t,...a}=e;return(0,r.jsx)(B.uB.Item,{"data-slot":"command-item",className:(0,z.cn)("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...a})}var G=a(7459),M=a(5465),T=a(6654),H=a(3160);let Y="jinn-command-recent";function $(){try{let e=localStorage.getItem(Y);return e?JSON.parse(e):[]}catch(e){return[]}}let Q=[{id:"page-home",label:"Dashboard",icon:g.A,href:"/"},{id:"page-chat",label:"Chat",icon:f.A,href:"/chat"},{id:"page-org",label:"Organization",icon:b.A,href:"/org"},{id:"page-kanban",label:"Kanban",icon:j.A,href:"/kanban"},{id:"page-cron",label:"Cron",icon:y.A,href:"/cron"},{id:"page-costs",label:"Costs",icon:E.A,href:"/costs"},{id:"page-logs",label:"Activity",icon:N.A,href:"/logs"},{id:"page-skills",label:"Skills",icon:k.A,href:"/skills"},{id:"page-settings",label:"Settings",icon:w.A,href:"/settings"},{id:"page-goals",label:"Goals",icon:F.A,href:"/goals"}];function V(){var e;let{settings:t}=(0,d.t0)(),a=null!=(e=t.portalName)?e:"Jinn",[s,n]=(0,l.useState)(!1),[i,o]=(0,l.useState)([]),x=(0,c.useRouter)(),{data:u}=(0,G.I)({queryKey:M.l.org.all,queryFn:()=>T.F.getOrg()}),{data:p}=(0,G.I)({queryKey:M.l.cron.all,queryFn:()=>T.F.getCronJobs()}),{data:m}=(0,H.te)(),{data:h}=(0,G.I)({queryKey:M.l.skills.all,queryFn:()=>T.F.getSkills()});(0,l.useEffect)(()=>{function e(e){(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),n(e=>!e))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,l.useEffect)(()=>{s&&o($())},[s]);let v=(0,l.useCallback)((e,t)=>{let a=$().filter(e=>e.id!==t.id);a.unshift(t),localStorage.setItem(Y,JSON.stringify(a.slice(0,5))),n(!1),x.push(e)},[x]),g=Array.isArray(null==u?void 0:u.employees)?u.employees:[],j=Array.isArray(p)?p:[],N=Array.isArray(m)?m.slice(0,10):[],w=Array.isArray(h)?h.slice(0,10):[];return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(I.lG,{open:s,onOpenChange:n,children:(0,r.jsx)(I.Cf,{className:"p-0 gap-0 max-w-[560px]",children:(0,r.jsxs)(q,{className:"rounded-lg",children:[(0,r.jsx)(R,{placeholder:"Search ".concat(a,"...")}),(0,r.jsxs)(W,{children:[(0,r.jsx)(K,{children:"No results found."}),i.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(J,{heading:"Recent",children:i.map(e=>(0,r.jsxs)(P,{onSelect:()=>v(e.href,e),children:[(0,r.jsx)(_.A,{size:16,className:"mr-2 opacity-50"}),e.label]},e.id))}),(0,r.jsx)(O,{})]}),(0,r.jsx)(J,{heading:"Pages",children:Q.map(e=>(0,r.jsxs)(P,{onSelect:()=>v(e.href,{id:e.id,label:e.label,href:e.href,type:"page"}),children:[(0,r.jsx)(e.icon,{size:16,className:"mr-2 opacity-50"}),e.label]},e.id))}),(0,r.jsx)(J,{heading:"Actions",children:(0,r.jsxs)(P,{onSelect:()=>{n(!1),x.push("/chat")},children:[(0,r.jsx)(L.A,{size:16,className:"mr-2 opacity-50"}),"New Chat"]})}),g.length>0&&(0,r.jsx)(J,{heading:"Employees",children:g.slice(0,8).map(e=>(0,r.jsxs)(P,{onSelect:()=>v("/org",{id:"emp-".concat(e),label:e,href:"/org",type:"employee"}),children:[(0,r.jsx)(b.A,{size:16,className:"mr-2 opacity-50"}),e]},e))}),N.length>0&&(0,r.jsx)(J,{heading:"Recent Sessions",children:N.map(e=>{var t,a,s;let n=String(null!=(t=e.id)?t:""),l=String(null!=(s=null!=(a=e.title)?a:e.id)?s:"").slice(0,50);return(0,r.jsxs)(P,{onSelect:()=>v("/chat",{id:"session-".concat(n),label:l,href:"/chat",type:"session"}),children:[(0,r.jsx)(f.A,{size:16,className:"mr-2 opacity-50"}),l]},n)})}),j.length>0&&(0,r.jsx)(J,{heading:"Cron Jobs",children:j.slice(0,6).map(e=>{var t,a;let s=String(null!=(t=e.id)?t:""),n=String(null!=(a=e.name)?a:s);return(0,r.jsxs)(P,{onSelect:()=>v("/cron",{id:"cron-".concat(s),label:n,href:"/cron",type:"cron"}),children:[(0,r.jsx)(y.A,{size:16,className:"mr-2 opacity-50"}),n]},s)})}),w.length>0&&(0,r.jsx)(J,{heading:"Skills",children:w.map(e=>{var t;let a=String(null!=(t=e.name)?t:"");return(0,r.jsxs)(P,{onSelect:()=>v("/skills",{id:"skill-".concat(a),label:a,href:"/skills",type:"skill"}),children:[(0,r.jsx)(k.A,{size:16,className:"mr-2 opacity-50"}),a]},a)})})]})]})})})})}var U=a(9864),Z=a(1362),X=a(4535),ee=a(2845),et=a(8064);let ea="open-live-stream",er={info:{bg:"rgba(48,209,88,0.12)",color:"var(--system-green)",label:"INF"},warn:{bg:"rgba(255,159,10,0.12)",color:"var(--system-orange)",label:"WRN"},error:{bg:"rgba(255,69,58,0.12)",color:"var(--system-red)",label:"ERR"},debug:{bg:"var(--fill-secondary)",color:"var(--text-tertiary)",label:"DBG"}};function es(e){return"[".concat(e.timestamp,"] [").concat(e.level.toUpperCase(),"] ").concat(e.message)}function en(e){var t;let{entry:a}=e,[s,n]=(0,l.useState)(!1),i=null!=(t=er[a.level])?t:er.debug,o=a.message.length>100;return(0,r.jsxs)("div",{className:"border-b border-[var(--separator)] ".concat("error"===a.level?"bg-[rgba(255,69,58,0.03)]":""),children:[(0,r.jsxs)("button",{onClick:()=>o&&n(e=>!e),className:"flex items-center w-full px-3 py-[5px] gap-2 border-none bg-transparent text-left ".concat(o?"cursor-pointer":"cursor-default"),children:[o?(0,r.jsx)("span",{className:"text-[10px] text-[var(--text-tertiary)] shrink-0 inline-block transition-transform duration-150 ".concat(s?"rotate-90":"rotate-0"),children:"›"}):(0,r.jsx)("span",{className:"w-[10px] shrink-0"}),(0,r.jsx)("span",{className:"font-mono text-[var(--text-tertiary)] text-[10px] shrink-0 min-w-[58px]",children:function(e){if(!e)return"";let t=e.split(" ");return t.length>1?t[1]:e}(a.timestamp)}),(0,r.jsx)("span",{className:"text-[9px] font-bold tracking-wide px-[5px] py-px rounded-[3px] shrink-0 leading-[14px]",style:{background:i.bg,color:i.color},children:i.label}),(0,r.jsx)("span",{className:"font-mono text-[10px] leading-snug overflow-hidden text-ellipsis whitespace-nowrap flex-1 min-w-0 ".concat("error"===a.level?"text-[var(--system-red)]":"text-[var(--text-secondary)]"),children:a.message})]}),s&&o&&(0,r.jsx)("div",{className:"px-3 pt-1.5 pb-2 pl-[30px] border-t border-[var(--separator)] bg-[var(--fill-secondary)]",children:(0,r.jsx)("pre",{className:"font-mono text-[9px] leading-normal text-[var(--text-secondary)] whitespace-pre-wrap break-words m-0",children:a.message})})]})}function el(){let[e,t]=(0,l.useState)("hidden"),[a,s]=(0,l.useState)([]),[n,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(!1),[d,x]=(0,l.useState)(null),u=(0,l.useRef)(null),p=(0,l.useRef)(0),{events:m}=(0,ee.G)();(0,l.useEffect)(()=>{n&&u.current&&(u.current.scrollTop=u.current.scrollHeight)},[a,n]);let h=(0,l.useCallback)(()=>{if(!u.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:a}=u.current;t-e-a<40?i(!0):i(!1)},[]);(0,l.useEffect)(()=>{"expanded"===e&&T.F.getLogs(50).then(e=>{var t;s((null!=(t=e.lines)?t:[]).map(et.w)),x(null)}).catch(e=>{x(e instanceof Error?e.message:"Failed to load logs")})},[e]),(0,l.useEffect)(()=>{if("hidden"===e||0===m.length)return;let t=m[m.length-1];if("log"===t.event&&"object"==typeof t.payload&&null!==t.payload){let e=t.payload,a=e.line||e.message||JSON.stringify(t.payload),r=(0,et.w)(a,p.current++);s(e=>[...e,r].slice(-500))}},[m,e]);let v=(0,l.useCallback)(()=>{t("hidden")},[]),g=(0,l.useCallback)(async()=>{let e=a.map(es).join("\n");await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),1500)},[a]);return((0,l.useEffect)(()=>{function e(){t("expanded")}return window.addEventListener(ea,e),()=>window.removeEventListener(ea,e)},[]),"hidden"===e)?null:"collapsed"===e?(0,r.jsxs)("button",{onClick:()=>t("expanded"),className:"focus-ring flex items-center fixed bottom-5 right-5 z-50 px-3.5 py-2 rounded-[var(--radius-pill)] border border-[var(--separator)] bg-[var(--material-regular)] cursor-pointer gap-2 backdrop-blur-[40px] backdrop-saturate-[1.8] shadow-[0_4px_24px_rgba(0,0,0,0.25)]",style:{WebkitBackdropFilter:"blur(40px) saturate(180%)"},children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-[var(--system-green)] shrink-0 animate-[lsw-pulse_2s_ease-in-out_infinite]"}),(0,r.jsx)("span",{className:"text-[length:var(--text-caption1)] text-[var(--text-secondary)] font-[var(--weight-medium)]",children:"Live Stream"}),a.length>0&&(0,r.jsx)("span",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] bg-[var(--fill-secondary)] px-1.5 py-px rounded-[var(--radius-sm)]",children:a.length}),(0,r.jsx)("style",{children:"@keyframes lsw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }"})]}):(0,r.jsxs)("div",{className:"panel-slide-in fixed bottom-5 right-5 z-50 w-[440px] h-[400px] rounded-[var(--radius-lg)] border border-[var(--separator)] bg-[var(--material-regular)] flex flex-col overflow-hidden backdrop-blur-[40px] backdrop-saturate-[1.8] shadow-[0_8px_40px_rgba(0,0,0,0.35)]",style:{WebkitBackdropFilter:"blur(40px) saturate(180%)"},children:[(0,r.jsxs)("div",{className:"flex items-center shrink-0 px-3.5 py-2.5 border-b border-[var(--separator)] gap-2",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-[var(--system-green)] shrink-0 animate-[lsw-pulse_2s_ease-in-out_infinite]"}),(0,r.jsx)("span",{className:"text-[length:var(--text-footnote)] font-[var(--weight-semibold)] text-[var(--text-primary)]",children:"Live Stream"}),a.length>0&&(0,r.jsxs)("span",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)]",children:[a.length," line",1!==a.length?"s":""]}),(0,r.jsxs)("div",{className:"ml-auto flex gap-1",children:[(0,r.jsx)("button",{onClick:g,title:"Copy all logs",disabled:0===a.length,className:"focus-ring w-7 h-7 flex items-center justify-center rounded-[var(--radius-sm)] border-none transition-all duration-150 ".concat(o?"bg-[var(--accent-fill)] text-[var(--accent)]":"bg-transparent text-[var(--text-tertiary)]"," ").concat(0===a.length?"cursor-default opacity-30":"cursor-pointer opacity-100"),children:(0,r.jsx)(U.A,{size:14})}),(0,r.jsx)("button",{onClick:()=>t("collapsed"),className:"focus-ring w-7 h-7 flex items-center justify-center rounded-[var(--radius-sm)] border-none bg-transparent text-[var(--text-tertiary)] cursor-pointer transition-colors duration-150",title:"Minimize",children:(0,r.jsx)(Z.A,{size:14})}),(0,r.jsx)("button",{onClick:v,className:"focus-ring w-7 h-7 flex items-center justify-center rounded-[var(--radius-sm)] border-none bg-transparent text-[var(--text-tertiary)] cursor-pointer transition-colors duration-150",title:"Close",children:(0,r.jsx)(X.A,{size:14})})]})]}),d&&(0,r.jsx)("div",{className:"px-3.5 py-1.5 bg-[rgba(255,69,58,0.06)] border-b border-[rgba(255,69,58,0.15)] text-[length:var(--text-caption2)] text-[var(--system-red)] shrink-0",children:d}),(0,r.jsx)("div",{ref:u,onScroll:h,className:"flex-1 min-h-0 overflow-y-auto overflow-x-hidden",children:0===a.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-[var(--text-secondary)] gap-[var(--space-2)] p-[var(--space-4)]",children:[(0,r.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-[var(--text-tertiary)]",children:(0,r.jsx)("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})}),(0,r.jsx)("span",{className:"text-[length:var(--text-caption1)] font-[var(--weight-medium)]",children:"Waiting for log data..."})]}):(0,r.jsx)("div",{children:a.map(e=>(0,r.jsx)(en,{entry:e},e.id))})}),(0,r.jsx)("div",{className:"flex items-center shrink-0 px-3.5 py-2 border-t border-[var(--separator)] gap-2",children:!n&&a.length>0&&(0,r.jsx)("button",{onClick:()=>i(!0),className:"focus-ring px-2.5 py-1 rounded-[var(--radius-sm)] border-none cursor-pointer text-[length:var(--text-caption2)] font-[var(--weight-medium)] bg-[var(--fill-secondary)] text-[var(--text-secondary)]",children:"Scroll to bottom"})}),(0,r.jsx)("style",{children:"@keyframes lsw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }"})]})}var ei=a(9444),eo=a(4139),ec=a(1100),ed=a(9357),ex=a(9605);let eu=[{label:"Red",value:"#EF4444"},{label:"Orange",value:"#F97316"},{label:"Amber",value:"#F59E0B"},{label:"Yellow",value:"#EAB308"},{label:"Lime",value:"#84CC16"},{label:"Green",value:"#22C55E"},{label:"Emerald",value:"#10B981"},{label:"Cyan",value:"#06B6D4"},{label:"Blue",value:"#3B82F6"},{label:"Indigo",value:"#6366F1"},{label:"Violet",value:"#8B5CF6"},{label:"Pink",value:"#EC4899"}],ep=[{icon:f.A,name:"Chat",desc:"Direct conversations with any employee"},{icon:b.A,name:"Organization",desc:"Visual org chart of your AI team"},{icon:ei.A,name:"Kanban",desc:"Task boards for work management"},{icon:y.A,name:"Cron",desc:"Scheduled jobs with status monitoring"},{icon:E.A,name:"Costs",desc:"Token usage and cost tracking"},{icon:N.A,name:"Activity",desc:"Real-time logs and event stream"}];function em(e){var t;let{forceOpen:a,onClose:s}=e,{settings:n,setPortalName:i,setOperatorName:o,setAccentColor:x,setLanguage:u}=(0,d.t0)(),{theme:p,setTheme:m}=(0,h.D)(),g=(0,c.useRouter)(),[f,b]=(0,l.useState)(!1),[j,y]=(0,l.useState)(0),[N,k]=(0,l.useState)("forward"),[w,A]=(0,l.useState)(""),[z,C]=(0,l.useState)(""),[S,E]=(0,l.useState)(null!=(t=n.language)?t:"English");(0,l.useEffect)(()=>{if(a){var e,t;A(null!=(e=n.portalName)?e:""),C(null!=(t=n.operatorName)?t:""),b(!0);return}localStorage.getItem("jinn-onboarded")||b(!0)},[a]);let F=(0,l.useCallback)(()=>{0===j&&(i(w||null),o(z||null),u(S||"English")),j<3?(k("forward"),y(j+1)):(T.F.completeOnboarding({portalName:w||void 0,operatorName:z||void 0,language:S||void 0}).catch(()=>{}),a||localStorage.setItem("jinn-onboarded","true"),b(!1),null==s||s(),g.push("/chat"))},[j,w,z,a,s,i,o,g]),_=(0,l.useCallback)(()=>{j>0&&(k("back"),y(j-1))},[j]);return f?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",style:{backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},children:(0,r.jsxs)("div",{className:"animate-fade-in w-full max-w-[520px] mx-[var(--space-4)] bg-[var(--material-regular)] rounded-[var(--radius-lg)] border border-[var(--separator)] overflow-hidden flex flex-col max-h-[90vh]",style:{boxShadow:"0 24px 48px rgba(0,0,0,0.3)"},children:[(0,r.jsx)("div",{className:"flex justify-center gap-2 pt-[var(--space-4)] px-[var(--space-4)]",children:Array.from({length:4}).map((e,t)=>(0,r.jsx)("div",{className:"h-2 rounded-full transition-all duration-200",style:{width:t===j?24:8,background:t===j||t<j?"var(--accent)":"var(--fill-tertiary)",opacity:t<j?.5:1}},t))}),(0,r.jsxs)("div",{className:"px-[var(--space-5)] pt-[var(--space-5)] pb-[var(--space-4)] overflow-y-auto flex-1",children:[0===j&&(0,r.jsxs)("div",{className:"animate-fade-in text-center",children:[(0,r.jsx)("div",{className:"text-[56px] mb-[var(--space-3)] leading-none",children:"\ud83e\udd16"}),(0,r.jsxs)("h2",{className:"text-[length:var(--text-large-title)] font-[var(--weight-bold)] tracking-[var(--tracking-tight)] text-[var(--text-primary)] mb-[var(--space-2)]",children:["Welcome to ",w||"Jinn"]}),(0,r.jsx)("p",{className:"text-[length:var(--text-body)] text-[var(--text-secondary)] leading-[var(--leading-relaxed)] max-w-[400px] mx-auto mb-[var(--space-5)]",children:"Your AI team management portal. Let's get you set up."}),(0,r.jsxs)("div",{className:"flex flex-col gap-[var(--space-3)] text-left",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Portal Name"}),(0,r.jsx)("input",{type:"text",className:"apple-input w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-3 py-2 text-[length:var(--text-body)] text-[var(--text-primary)]",placeholder:"Jinn",value:w,onChange:e=>A(e.target.value),autoFocus:!0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"What should we call you?"}),(0,r.jsx)("input",{type:"text",className:"apple-input w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-3 py-2 text-[length:var(--text-body)] text-[var(--text-primary)]",placeholder:"Your Name",value:z,onChange:e=>C(e.target.value)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Preferred Language"}),(0,r.jsxs)("select",{value:S,onChange:e=>E(e.target.value),className:"w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-3 py-2 text-[length:var(--text-body)] text-[var(--text-primary)] cursor-pointer",children:[(0,r.jsx)("option",{value:"English",children:"English"}),(0,r.jsx)("option",{value:"Spanish",children:"Spanish"}),(0,r.jsx)("option",{value:"French",children:"French"}),(0,r.jsx)("option",{value:"German",children:"German"}),(0,r.jsx)("option",{value:"Portuguese",children:"Portuguese"}),(0,r.jsx)("option",{value:"Italian",children:"Italian"}),(0,r.jsx)("option",{value:"Dutch",children:"Dutch"}),(0,r.jsx)("option",{value:"Russian",children:"Russian"}),(0,r.jsx)("option",{value:"Chinese",children:"Chinese"}),(0,r.jsx)("option",{value:"Japanese",children:"Japanese"}),(0,r.jsx)("option",{value:"Korean",children:"Korean"}),(0,r.jsx)("option",{value:"Arabic",children:"Arabic"}),(0,r.jsx)("option",{value:"Hindi",children:"Hindi"}),(0,r.jsx)("option",{value:"Bulgarian",children:"Bulgarian"})]})]})]})]},"step-0"),1===j&&(0,r.jsxs)("div",{className:"animate-fade-in",children:[(0,r.jsx)("h2",{className:"text-[length:var(--text-title1)] font-[var(--weight-bold)] tracking-[var(--tracking-tight)] text-[var(--text-primary)] mb-[var(--space-1)]",children:"Choose your theme"}),(0,r.jsx)("p",{className:"text-[length:var(--text-subheadline)] text-[var(--text-tertiary)] mb-[var(--space-4)]",children:"Pick the look that suits you. This applies live."}),(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(130px,1fr))] gap-[var(--space-3)]",children:v.z.map(e=>{let t=p===e.id;return(0,r.jsxs)("button",{onClick:()=>m(e.id),className:"flex flex-col items-center gap-[var(--space-2)] px-[var(--space-3)] py-[var(--space-4)] rounded-[var(--radius-md)] bg-[var(--fill-quaternary)] cursor-pointer transition-all duration-150",style:{border:t?"2px solid var(--accent)":"2px solid var(--separator)"},children:[(0,r.jsx)("span",{className:"text-[28px]",children:e.emoji}),(0,r.jsx)("span",{className:"text-[length:var(--text-footnote)]",style:{fontWeight:t?"var(--weight-semibold)":"var(--weight-medium)",color:t?"var(--accent)":"var(--text-secondary)"},children:e.label})]},e.id)})})]},"step-1"),2===j&&(0,r.jsxs)("div",{className:"animate-fade-in",children:[(0,r.jsx)("h2",{className:"text-[length:var(--text-title1)] font-[var(--weight-bold)] tracking-[var(--tracking-tight)] text-[var(--text-primary)] mb-[var(--space-1)]",children:"Pick an accent color"}),(0,r.jsx)("p",{className:"text-[length:var(--text-subheadline)] text-[var(--text-tertiary)] mb-[var(--space-4)]",children:"Personalize with your favorite color."}),(0,r.jsx)("div",{className:"grid grid-cols-6 gap-[var(--space-3)] justify-items-center",children:eu.map(e=>{let t=n.accentColor===e.value;return(0,r.jsx)("button",{onClick:()=>x(e.value),"aria-label":e.label,title:e.label,className:"w-10 h-10 rounded-full border-none cursor-pointer flex items-center justify-center transition-all duration-100",style:{background:e.value,outline:t?"3px solid ".concat(e.value):"none",outlineOffset:3},children:t&&(0,r.jsx)(eo.A,{size:18,color:"#fff",strokeWidth:3})},e.value)})})]},"step-2"),3===j&&(0,r.jsxs)("div",{className:"animate-fade-in",children:[(0,r.jsx)("h2",{className:"text-[length:var(--text-title1)] font-[var(--weight-bold)] tracking-[var(--tracking-tight)] text-[var(--text-primary)] mb-[var(--space-1)]",children:"You're all set!"}),(0,r.jsx)("p",{className:"text-[length:var(--text-subheadline)] text-[var(--text-tertiary)] mb-[var(--space-4)]",children:"Here's what you can do."}),(0,r.jsx)("div",{className:"flex flex-col gap-[var(--space-2)]",children:ep.map(e=>{let t=e.icon;return(0,r.jsxs)("div",{className:"flex items-center gap-[var(--space-3)] p-[var(--space-3)] rounded-[var(--radius-md)] bg-[var(--fill-quaternary)] border border-[var(--separator)]",children:[(0,r.jsx)("div",{className:"w-9 h-9 rounded-lg bg-[var(--accent-fill)] flex items-center justify-center shrink-0",children:(0,r.jsx)(t,{size:18,className:"text-[var(--accent)]"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[length:var(--text-subheadline)] font-[var(--weight-semibold)] text-[var(--text-primary)]",children:e.name}),(0,r.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)]",children:e.desc})]})]},e.name)})})]},"step-3")]}),(0,r.jsxs)("div",{className:"flex justify-between items-center px-[var(--space-5)] pb-[var(--space-5)] pt-[var(--space-3)] gap-[var(--space-3)]",children:[j>0?(0,r.jsxs)("button",{onClick:_,className:"px-[var(--space-4)] py-[var(--space-2)] rounded-[var(--radius-md)] bg-[var(--fill-tertiary)] text-[var(--text-secondary)] border-none cursor-pointer text-[length:var(--text-subheadline)] font-[var(--weight-medium)] transition-all duration-150 inline-flex items-center gap-1.5",children:[(0,r.jsx)(ec.A,{size:16}),"Back"]}):(0,r.jsx)("div",{}),(0,r.jsxs)("button",{onClick:F,className:"px-[var(--space-6)] py-[var(--space-2)] rounded-[var(--radius-md)] bg-[var(--accent)] text-[var(--accent-contrast)] border-none cursor-pointer text-[length:var(--text-subheadline)] font-[var(--weight-semibold)] transition-all duration-150 inline-flex items-center gap-1.5",children:[0===j?"Next":3===j?"Get Started":"Next",3===j?(0,r.jsx)(ed.A,{size:16}):(0,r.jsx)(ex.A,{size:16})]})]})]})}):null}var eh=a(129),ev=a(4723),eg=a(9919),ef=a(4052),eb=a(262),ej=a(4641);let ey={success:eg.A,error:ef.A,warning:eb.A,info:ej.A},eN={success:"var(--system-green)",error:"var(--system-red)",warning:"var(--system-orange)",info:"var(--system-blue)"};function ek(){let{toasts:e,dismissToast:t}=(0,ev.E)();return 0===e.length?null:(0,r.jsx)("div",{className:"fixed top-4 right-4 z-[9999] flex flex-col gap-2 max-w-[380px] w-full pointer-events-none",children:e.map(e=>{let a=ey[e.type],s=eN[e.type];return(0,r.jsxs)("div",{className:"animate-slide-down pointer-events-auto flex items-start gap-2.5 px-3.5 py-3 bg-[var(--material-thick)] backdrop-blur-[40px] backdrop-saturate-[1.8] border border-[var(--separator)] rounded-[var(--radius-md)] shadow-[var(--shadow-overlay)]",style:{WebkitBackdropFilter:"blur(40px) saturate(180%)"},children:[(0,r.jsx)(a,{size:18,className:"shrink-0 mt-px",style:{color:s}}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("div",{className:"text-[13px] font-semibold text-[var(--text-primary)] leading-[1.3]",children:e.title}),(0,r.jsx)("div",{className:"text-xs text-[var(--text-secondary)] mt-0.5 leading-[1.3] overflow-hidden text-ellipsis whitespace-nowrap",children:e.message}),(0,r.jsx)("div",{className:"text-[11px] text-[var(--text-quaternary)] mt-1",children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),(0,r.jsx)("button",{onClick:()=>t(e.id),"aria-label":"Dismiss",className:"bg-transparent border-none cursor-pointer text-[var(--text-tertiary)] p-0.5 shrink-0",children:(0,r.jsx)(X.A,{size:14})})]},e.id)})})}var ew=a(9327),eA=a(8565);function ez(){let{items:e}=(0,eA.i)();return 0===e.length?null:1===e.length?(0,r.jsx)("h1",{className:"text-lg font-semibold text-[var(--text-primary)] tracking-tight",children:e[0].label}):(0,r.jsx)("nav",{className:"flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb",children:e.map((t,a)=>{let s=a===e.length-1;return(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[a>0&&(0,r.jsx)(ew.A,{size:14,className:"text-[var(--text-quaternary)]"}),s||!t.href?(0,r.jsx)("span",{className:s?"text-[var(--text-primary)] font-medium":"text-[var(--text-tertiary)]",children:t.label}):(0,r.jsx)(o(),{href:t.href,className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)] transition-colors",children:t.label})]},a)})})}var eC=a(3198);function eS(e){var t,a;let{actions:s}=e,[i,x]=(0,l.useState)(!1),u=(0,c.usePathname)(),{settings:p}=(0,d.t0)(),m=null!=(t=p.portalEmoji)?t:"\uD83E\uDD16",h=null!=(a=p.portalName)?a:"Jinn";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"jsx-906cbf20b7aa1777 relative z-60 flex h-12 shrink-0 items-center border-b border-border bg-[var(--material-thick)] px-3 lg:hidden",children:[(0,r.jsx)("button",{onClick:()=>x(!0),"aria-label":"Open menu",className:"jsx-906cbf20b7aa1777 inline-flex size-9 items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent",children:(0,r.jsx)(eC.A,{size:20})}),(0,r.jsxs)("div",{className:"jsx-906cbf20b7aa1777 flex flex-1 items-center justify-center text-center",children:[(0,r.jsx)("span",{className:"jsx-906cbf20b7aa1777 mr-1.5 text-lg",children:m}),(0,r.jsx)("span",{className:"jsx-906cbf20b7aa1777 text-sm font-semibold text-foreground",children:h})]}),(0,r.jsxs)("div",{className:"jsx-906cbf20b7aa1777 flex items-center gap-1",children:[s,(0,r.jsx)(eh.r,{})]})]}),i&&(0,r.jsxs)("div",{className:"jsx-906cbf20b7aa1777 fixed inset-0 z-100 lg:hidden",children:[(0,r.jsx)("div",{onClick:()=>x(!1),className:"jsx-906cbf20b7aa1777 absolute inset-0 bg-black/50 backdrop-blur-[1px]"}),(0,r.jsxs)("nav",{className:"jsx-906cbf20b7aa1777 absolute inset-y-0 left-0 flex w-[260px] animate-slide-in flex-col border-r border-border bg-[var(--bg-secondary)]",children:[(0,r.jsxs)("div",{className:"jsx-906cbf20b7aa1777 flex items-center justify-between border-b border-border px-3.5 py-3",children:[(0,r.jsxs)("div",{className:"jsx-906cbf20b7aa1777 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"jsx-906cbf20b7aa1777 text-[22px]",children:m}),(0,r.jsx)("span",{className:"jsx-906cbf20b7aa1777 text-base font-semibold text-foreground",children:h})]}),(0,r.jsx)("button",{onClick:()=>x(!1),"aria-label":"Close menu",className:"jsx-906cbf20b7aa1777 inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:(0,r.jsx)(X.A,{size:18})})]}),(0,r.jsx)("div",{className:"jsx-906cbf20b7aa1777 flex flex-1 flex-col gap-1 p-2",children:A.map(e=>{let t="/"===e.href?"/"===u:u.startsWith(e.href),a=e.icon;return(0,r.jsxs)(o(),{href:e.href,onClick:()=>x(!1),className:(0,z.cn)("flex h-11 items-center gap-3 rounded-[10px] px-3.5 text-[15px] transition-colors",t?"bg-[var(--accent-fill)] font-semibold text-[var(--accent)]":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[(0,r.jsx)(a,{size:18,className:"jsx-906cbf20b7aa1777 shrink-0"}),e.label]},e.href)})})]})]}),(0,r.jsx)(n(),{id:"906cbf20b7aa1777",children:"@keyframes slideInLeft{from{transform:translatex(-100%)}to{transform:translatex(0)}}"})]})}function eE(e){let{children:t}=e;return(0,r.jsxs)("div",{className:"hidden items-center gap-2 lg:flex",children:[t,(0,r.jsx)(eh.r,{})]})}function eF(){let{items:e}=(0,eA.i)();return 0===e.length?null:(0,r.jsx)("div",{className:"hidden h-12 shrink-0 items-center border-b border-border bg-[var(--material-thick)] px-5 lg:flex",children:(0,r.jsx)(ez,{})})}function e_(e){let{children:t,mobileHeaderActions:a}=e;return(0,r.jsxs)("div",{className:"flex h-dvh overflow-hidden bg-background",children:[(0,r.jsx)(S,{}),(0,r.jsx)(V,{}),(0,r.jsxs)("main",{className:"flex-1 overflow-hidden flex flex-col lg:ml-[56px]",children:[(0,r.jsx)(eS,{actions:a}),(0,r.jsx)(eF,{}),(0,r.jsx)("div",{className:"flex-1 overflow-hidden",children:t})]}),(0,r.jsx)(ek,{}),(0,r.jsx)(el,{}),(0,r.jsx)(em,{})]})}},7632:(e,t,a)=>{a.d(t,{Cf:()=>x,Es:()=>p,L3:()=>m,c7:()=>u,lG:()=>o,rr:()=>h});var r=a(4130);a(7946);var s=a(4535),n=a(2535),l=a(6063),i=a(6960);function o(e){let{...t}=e;return(0,r.jsx)(n.bL,{"data-slot":"dialog",...t})}function c(e){let{...t}=e;return(0,r.jsx)(n.ZL,{"data-slot":"dialog-portal",...t})}function d(e){let{className:t,...a}=e;return(0,r.jsx)(n.hJ,{"data-slot":"dialog-overlay",className:(0,l.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",t),...a})}function x(e){let{className:t,children:a,showCloseButton:i=!0,...o}=e;return(0,r.jsxs)(c,{"data-slot":"dialog-portal",children:[(0,r.jsx)(d,{}),(0,r.jsxs)(n.UC,{"data-slot":"dialog-content",className:(0,l.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",t),...o,children:[a,i&&(0,r.jsxs)(n.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,r.jsx)(s.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function u(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"dialog-header",className:(0,l.cn)("flex flex-col gap-2 text-center sm:text-left",t),...a})}function p(e){let{className:t,showCloseButton:a=!1,children:s,...o}=e;return(0,r.jsxs)("div",{"data-slot":"dialog-footer",className:(0,l.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...o,children:[s,a&&(0,r.jsx)(n.bm,{asChild:!0,children:(0,r.jsx)(i.$,{variant:"outline",children:"Close"})})]})}function m(e){let{className:t,...a}=e;return(0,r.jsx)(n.hE,{"data-slot":"dialog-title",className:(0,l.cn)("text-lg leading-none font-semibold",t),...a})}function h(e){let{className:t,...a}=e;return(0,r.jsx)(n.VY,{"data-slot":"dialog-description",className:(0,l.cn)("text-sm text-muted-foreground",t),...a})}},8064:(e,t,a)=>{a.d(t,{b:()=>c,w:()=>o});var r=a(4130),s=a(7946);let n={info:"var(--system-green)",warn:"var(--system-orange)",error:"var(--system-red)",debug:"var(--text-tertiary)"},l={info:"rgba(48,209,88,0.12)",warn:"rgba(255,159,10,0.12)",error:"rgba(255,69,58,0.12)",debug:"var(--fill-secondary)"},i=[{key:"all",label:"All"},{key:"info",label:"Info"},{key:"warn",label:"Warn"},{key:"error",label:"Errors"}];function o(e,t){let a=e.match(/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+\[(\w+)\]\s*(.*)$/);return a?{id:"log-".concat(t),timestamp:a[1],level:a[2].toLowerCase(),message:a[3]}:{id:"log-".concat(t),timestamp:"",level:"info",message:e}}function c(e){let{lines:t}=e,[a,c]=(0,s.useState)("all"),[d,x]=(0,s.useState)(""),[u,p]=(0,s.useState)(null),m=t.map(o),h=m.filter(e=>("all"===a||e.level===a)&&(!d||!!e.message.toLowerCase().includes(d.toLowerCase()))),v={all:m.length,info:m.filter(e=>"info"===e.level).length,warn:m.filter(e=>"warn"===e.level).length,error:m.filter(e=>"error"===e.level).length};return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center flex-wrap gap-[var(--space-2)] mb-[var(--space-3)]",children:[i.map(e=>{let t=a===e.key;return(0,r.jsxs)("button",{onClick:()=>c(e.key),className:"focus-ring flex items-center flex-shrink-0 rounded-[20px] py-[6px] px-[14px] text-[length:var(--text-footnote)] font-[var(--weight-medium)] border-none cursor-pointer gap-[var(--space-2)] transition-all duration-200 ease-[var(--ease-smooth)]",style:{...t?{background:"var(--accent-fill)",color:"var(--accent)",boxShadow:"0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent)"}:{background:"var(--fill-secondary)",color:"var(--text-primary)"}},children:[(0,r.jsx)("span",{children:e.label}),(0,r.jsx)("span",{className:"font-[var(--weight-semibold)]",style:{color:t?"var(--accent)":"var(--text-secondary)"},children:v[e.key]})]},e.key)}),(0,r.jsx)("input",{type:"text",placeholder:"Search logs...",value:d,onChange:e=>x(e.target.value),className:"focus-ring ml-auto py-[6px] px-3 text-[length:var(--text-footnote)] rounded-[var(--radius-sm)] border border-[var(--separator)] bg-[var(--fill-secondary)] text-[var(--text-primary)] outline-none min-w-40 max-w-60"})]}),0===h.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-[200px] text-[var(--text-secondary)] gap-[var(--space-2)]",children:[(0,r.jsx)("span",{className:"text-[length:var(--text-subheadline)] font-[var(--weight-medium)]",children:0===m.length?"No log entries found":"No entries match this filter"}),(0,r.jsx)("span",{className:"text-[length:var(--text-footnote)] text-[var(--text-tertiary)]",children:0===m.length?"Log entries will appear here when available":"Try adjusting your filter or search"})]}):(0,r.jsx)("div",{className:"rounded-[var(--radius-md)] overflow-hidden bg-[var(--material-regular)]",style:{backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)"},children:h.map((e,t)=>{var a,s;let i=u===e.id,o=null!=(a=n[e.level])?a:"var(--text-tertiary)",c=e.message.length>120;return(0,r.jsxs)("div",{children:[t>0&&(0,r.jsx)("div",{className:"h-px bg-[var(--separator)] mx-[var(--space-4)]"}),(0,r.jsxs)("div",{role:"button",tabIndex:0,"aria-expanded":c?i:void 0,onClick:()=>c&&p(i?null:e.id),onKeyDown:t=>{c&&("Enter"===t.key||" "===t.key)&&(t.preventDefault(),p(i?null:e.id))},className:"flex items-center hover-bg focus-ring min-h-11 px-[var(--space-4)]",style:{cursor:c?"pointer":"default",background:"error"===e.level?"rgba(255,69,58,0.06)":void 0},children:[(0,r.jsx)("span",{className:"flex-shrink-0 rounded-full w-2 h-2",style:{background:o}}),e.timestamp&&(0,r.jsx)("span",{className:"flex-shrink-0 font-mono text-[length:var(--text-caption1)] text-[var(--text-tertiary)] ml-[var(--space-3)] min-w-[130px]",children:e.timestamp}),(0,r.jsx)("span",{className:"flex-shrink-0 text-[length:var(--text-caption2)] font-[var(--weight-semibold)] py-px px-1.5 rounded ml-[var(--space-2)] tracking-[0.04em] uppercase",style:{background:null!=(s=l[e.level])?s:"var(--fill-secondary)",color:o},children:e.level}),(0,r.jsx)("span",{className:"truncate text-[length:var(--text-footnote)] text-[var(--text-primary)] ml-[var(--space-3)] flex-1 min-w-0",children:c&&!i?e.message.slice(0,117)+"...":e.message}),c&&(0,r.jsx)("span",{"aria-hidden":"true",className:"text-[length:var(--text-footnote)] text-[var(--text-tertiary)] inline-block ml-[var(--space-2)] transition-transform duration-200 ease-[var(--ease-smooth)]",style:{transform:i?"rotate(90deg)":"rotate(0deg)"},children:"›"})]}),i&&c&&(0,r.jsx)("div",{className:"animate-slide-down px-[var(--space-4)] pb-[var(--space-4)]",children:(0,r.jsx)("div",{className:"rounded-[var(--radius-sm)] bg-[var(--fill-secondary)] p-[var(--space-3)] mt-[var(--space-2)]",children:(0,r.jsx)("pre",{className:"font-mono text-[length:var(--text-caption2)] text-[var(--text-secondary)] whitespace-pre-wrap break-words m-0 max-h-[300px] overflow-auto leading-[var(--leading-relaxed)]",children:e.message})})})]},e.id)})})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[865],{263:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(3250).A)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]])},687:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(3250).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},937:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(3250).A)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]])},2784:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(3250).A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},4607:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(3250).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},6790:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(3250).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},7181:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(3250).A)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},8689:(e,t,n)=>{let r;n.d(t,{UC:()=>nf,q7:()=>nd,ZL:()=>ns,bL:()=>nu,wv:()=>np,l9:()=>nc});var o=n(7946),i=n(3397),l=n(5773),a=n(5822),u=n(3188),c=n(9289),s=n(7058),f=n(4753),d=n(3526),p=n(1164),h=n(5380);let m=["top","right","bottom","left"],g=Math.min,v=Math.max,x=Math.round,y=Math.floor,w=e=>({x:e,y:e}),b={left:"right",right:"left",bottom:"top",top:"bottom"};function C(e,t){return"function"==typeof e?e(t):e}function R(e){return e.split("-")[0]}function M(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function k(e){return"y"===e?"height":"width"}function P(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function j(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let O=["left","right"],S=["right","left"],T=["top","bottom"],E=["bottom","top"];function L(e){let t=R(e);return b[t]+e.slice(t.length)}function _(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function D(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function N(e,t,n){let r,{reference:o,floating:i}=e,l=P(t),a=A(P(t)),u=k(a),c=R(t),s="y"===l,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(c){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(M(t)){case"start":r[a]-=p*(n&&s?-1:1);break;case"end":r[a]+=p*(n&&s?-1:1)}return r}async function K(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=C(t,e),h=_(p),m=a[d?"floating"===f?"reference":"floating":f],g=D(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),v="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,x=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await (null==i.isElement?void 0:i.isElement(x))&&await (null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},w=D(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:u}):v);return{top:(g.top-w.top+h.top)/y.y,bottom:(w.bottom-g.bottom+h.bottom)/y.y,left:(g.left-w.left+h.left)/y.x,right:(w.right-g.right+h.right)/y.x}}let F=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:K},u=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:f}=N(c,r,u),d=r,p=0,h={};for(let n=0;n<i.length;n++){let m=i[n];if(!m)continue;let{name:g,fn:v}=m,{x:x,y:y,data:w,reset:b}=await v({x:s,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});s=null!=x?x:s,f=null!=y?y:f,h[g]={...h[g],...w},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:s,y:f}=N(c,d,u)),n=-1)}return{x:s,y:f,placement:d,strategy:o,middlewareData:h}};function I(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function H(e){return m.some(t=>e[t]>=0)}let G=new Set(["left","top"]);async function W(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=R(n),a=M(n),u="y"===P(n),c=G.has(l)?-1:1,s=i&&u?-1:1,f=C(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),u?{x:p*s,y:d*c}:{x:d*c,y:p*s}}function V(){return"undefined"!=typeof window}function z(e){return X(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function U(e){var t;return null==(t=(X(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function X(e){return!!V()&&(e instanceof Node||e instanceof B(e).Node)}function Y(e){return!!V()&&(e instanceof Element||e instanceof B(e).Element)}function q(e){return!!V()&&(e instanceof HTMLElement||e instanceof B(e).HTMLElement)}function $(e){return!!V()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof B(e).ShadowRoot)}function Z(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=ei(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function J(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let Q=/transform|translate|scale|rotate|perspective|filter/,ee=/paint|layout|strict|content/,et=e=>!!e&&"none"!==e;function en(e){let t=Y(e)?ei(e):e;return et(t.transform)||et(t.translate)||et(t.scale)||et(t.rotate)||et(t.perspective)||!er()&&(et(t.backdropFilter)||et(t.filter))||Q.test(t.willChange||"")||ee.test(t.contain||"")}function er(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function eo(e){return/^(html|body|#document)$/.test(z(e))}function ei(e){return B(e).getComputedStyle(e)}function el(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ea(e){if("html"===z(e))return e;let t=e.assignedSlot||e.parentNode||$(e)&&e.host||U(e);return $(t)?t.host:t}function eu(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=ea(t);return eo(n)?t.ownerDocument?t.ownerDocument.body:t.body:q(n)&&Z(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=B(o);if(!i)return t.concat(o,eu(o,[],n));{let e=ec(l);return t.concat(l,l.visualViewport||[],Z(o)?o:[],e&&n?eu(e):[])}}function ec(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function es(e){let t=ei(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=q(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=x(n)!==i||x(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function ef(e){return Y(e)?e:e.contextElement}function ed(e){let t=ef(e);if(!q(t))return w(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=es(t),l=(i?x(n.width):n.width)/r,a=(i?x(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}let ep=w(0);function eh(e){let t=B(e);return er()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ep}function em(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=ef(e),a=w(1);t&&(r?Y(r)&&(a=ed(r)):a=ed(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===B(l))&&o)?eh(l):w(0),c=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(l){let e=B(l),t=r&&Y(r)?B(r):r,n=e,o=ec(n);for(;o&&r&&t!==n;){let e=ed(o),t=o.getBoundingClientRect(),r=ei(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,f*=e.x,d*=e.y,c+=i,s+=l,o=ec(n=B(o))}}return D({width:f,height:d,x:c,y:s})}function eg(e,t){let n=el(e).scrollLeft;return t?t.left+n:em(U(e)).left+n}function ev(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eg(e,n),y:n.top+t.scrollTop}}function ex(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=B(e),r=U(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,u=0;if(o){i=o.width,l=o.height;let e=er();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}let c=eg(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)r=function(e){let t=U(e),n=el(e),r=e.ownerDocument.body,o=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),l=-n.scrollLeft+eg(e),a=-n.scrollTop;return"rtl"===ei(r).direction&&(l+=v(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(U(e));else if(Y(t))r=function(e,t){let n=em(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=q(e)?ed(e):w(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y;return{width:l,height:a,x:o*i.x,y:r*i.y}}(t,n);else{let n=eh(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return D(r)}function ey(e){return"static"===ei(e).position}function ew(e,t){if(!q(e)||"fixed"===ei(e).position)return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function eb(e,t){var n;let r=B(e);if(J(e))return r;if(!q(e)){let t=ea(e);for(;t&&!eo(t);){if(Y(t)&&!ey(t))return t;t=ea(t)}return r}let o=ew(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(z(n)))&&ey(o);)o=ew(o,t);return o&&eo(o)&&ey(o)&&!en(o)?r:o||function(e){let t=ea(e);for(;q(t)&&!eo(t);){if(en(t))return t;if(J(t))break;t=ea(t)}return null}(e)||r}let eC=async function(e){let t=this.getOffsetParent||eb,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=q(t),o=U(t),i="fixed"===n,l=em(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=w(0);if(r||!r&&!i)if(("body"!==z(t)||Z(o))&&(a=el(t)),r){let e=em(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=eg(o));i&&!r&&o&&(u.x=eg(o));let c=!o||r||i?w(0):ev(o,a);return{x:l.left+a.scrollLeft-u.x-c.x,y:l.top+a.scrollTop-u.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eR={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=U(r),a=!!t&&J(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=w(1),s=w(0),f=q(r);if((f||!f&&!i)&&(("body"!==z(r)||Z(l))&&(u=el(r)),f)){let e=em(r);c=ed(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let d=!l||f||i?w(0):ev(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+s.x+d.x,y:n.y*c.y-u.scrollTop*c.y+s.y+d.y}},getDocumentElement:U,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?J(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eu(e,[],!1).filter(e=>Y(e)&&"body"!==z(e)),o=null,i="fixed"===ei(e).position,l=i?ea(e):e;for(;Y(l)&&!eo(l);){let t=ei(l),n=en(l);n||"fixed"!==t.position||(o=null),(i?n||o:!(!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Z(l)&&!n&&function e(t,n){let r=ea(t);return!(r===n||!Y(r)||eo(r))&&("fixed"===ei(r).position||e(r,n))}(e,l)))?o=t:r=r.filter(e=>e!==l),l=ea(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=ex(t,i[0],o),a=l.top,u=l.right,c=l.bottom,s=l.left;for(let e=1;e<i.length;e++){let n=ex(t,i[e],o);a=v(n.top,a),u=g(n.right,u),c=g(n.bottom,c),s=v(n.left,s)}return{width:u-s,height:c-a,x:s,y:a}},getOffsetParent:eb,getElementRects:eC,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=es(e);return{width:t,height:n}},getScale:ed,isElement:Y,isRTL:function(e){return"rtl"===ei(e).direction}};function eM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let eA=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:u}=t,{element:c,padding:s=0}=C(e,t)||{};if(null==c)return{};let f=_(s),d={x:n,y:r},p=A(P(o)),h=k(p),m=await l.getDimensions(c),x="y"===p,y=x?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-d[p]-i.floating[h],b=d[p]-i.reference[p],R=await (null==l.getOffsetParent?void 0:l.getOffsetParent(c)),j=R?R[y]:0;j&&await (null==l.isElement?void 0:l.isElement(R))||(j=a.floating[y]||i.floating[h]);let O=j/2-m[h]/2-1,S=g(f[x?"top":"left"],O),T=g(f[x?"bottom":"right"],O),E=j-m[h]-T,L=j/2-m[h]/2+(w/2-b/2),D=v(S,g(L,E)),N=!u.arrow&&null!=M(o)&&L!==D&&i.reference[h]/2-(L<S?S:T)-m[h]/2<0,K=N?L<S?L-S:L-E:0;return{[p]:d[p]+K,data:{[p]:D,centerOffset:L-D-K,...N&&{alignmentOffset:K}},reset:N}}});var ek=n(1383),eP="undefined"!=typeof document?o.useLayoutEffect:function(){};function ej(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!ej(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ej(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eO(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eS(e,t){let n=eO(e);return Math.round(t*n)/n}function eT(e){let t=o.useRef(e);return eP(()=>{t.current=e}),t}var eE=n(4130),eL=o.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,eE.jsx)(a.sG.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eE.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eL.displayName="Arrow";var e_=n(3316),eD=n(344),eN="Popper",[eK,eF]=(0,l.A)(eN),[eI,eH]=eK(eN),eG=e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null);return(0,eE.jsx)(eI,{scope:t,anchor:r,onAnchorChange:i,children:n})};eG.displayName=eN;var eW="PopperAnchor",eV=o.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,l=eH(eW,n),u=o.useRef(null),s=(0,c.s)(t,u),f=o.useRef(null);return o.useEffect(()=>{let e=f.current;f.current=(null==r?void 0:r.current)||u.current,e!==f.current&&l.onAnchorChange(f.current)}),r?null:(0,eE.jsx)(a.sG.div,{...i,ref:s})});eV.displayName=eW;var ez="PopperContent",[eB,eU]=eK(ez),eX=o.forwardRef((e,t)=>{var n,r,i,l,u,s,f,d;let{__scopePopper:p,side:h="bottom",sideOffset:m=0,align:x="center",alignOffset:w=0,arrowPadding:b=0,avoidCollisions:_=!0,collisionBoundary:D=[],collisionPadding:N=0,sticky:K="partial",hideWhenDetached:V=!1,updatePositionStrategy:z="optimized",onPlaced:B,...X}=e,Y=eH(ez,p),[q,$]=o.useState(null),Z=(0,c.s)(t,e=>$(e)),[J,Q]=o.useState(null),ee=function(e){let[t,n]=o.useState(void 0);return(0,eD.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(J),et=null!=(f=null==ee?void 0:ee.width)?f:0,en=null!=(d=null==ee?void 0:ee.height)?d:0,er="number"==typeof N?N:{top:0,right:0,bottom:0,left:0,...N},eo=Array.isArray(D)?D:[D],ei=eo.length>0,el={padding:er,boundary:eo.filter(eZ),altBoundary:ei},{refs:ea,floatingStyles:ec,placement:es,isPositioned:ed,middlewareData:ep}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:l,floating:a}={},transform:u=!0,whileElementsMounted:c,open:s}=e,[f,d]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=o.useState(r);ej(p,r)||h(r);let[m,g]=o.useState(null),[v,x]=o.useState(null),y=o.useCallback(e=>{e!==R.current&&(R.current=e,g(e))},[]),w=o.useCallback(e=>{e!==M.current&&(M.current=e,x(e))},[]),b=l||m,C=a||v,R=o.useRef(null),M=o.useRef(null),A=o.useRef(f),k=null!=c,P=eT(c),j=eT(i),O=eT(s),S=o.useCallback(()=>{if(!R.current||!M.current)return;let e={placement:t,strategy:n,middleware:p};j.current&&(e.platform=j.current),((e,t,n)=>{let r=new Map,o={platform:eR,...n},i={...o.platform,_c:r};return F(e,t,{...o,platform:i})})(R.current,M.current,e).then(e=>{let t={...e,isPositioned:!1!==O.current};T.current&&!ej(A.current,t)&&(A.current=t,ek.flushSync(()=>{d(t)}))})},[p,t,n,j,O]);eP(()=>{!1===s&&A.current.isPositioned&&(A.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[s]);let T=o.useRef(!1);eP(()=>(T.current=!0,()=>{T.current=!1}),[]),eP(()=>{if(b&&(R.current=b),C&&(M.current=C),b&&C){if(P.current)return P.current(b,C,S);S()}},[b,C,S,P,k]);let E=o.useMemo(()=>({reference:R,floating:M,setReference:y,setFloating:w}),[y,w]),L=o.useMemo(()=>({reference:b,floating:C}),[b,C]),_=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!L.floating)return e;let t=eS(L.floating,f.x),r=eS(L.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...eO(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,L.floating,f.x,f.y]);return o.useMemo(()=>({...f,update:S,refs:E,elements:L,floatingStyles:_}),[f,S,E,L,_])}({strategy:"fixed",placement:h+("center"!==x?"-"+x:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=ef(e),f=i||l?[...s?eu(s):[],...t?eu(t):[]]:[];f.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let d=s&&u?function(e,t){let n,r=null,o=U(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();let c=e.getBoundingClientRect(),{left:s,top:f,width:d,height:p}=c;if(a||t(),!d||!p)return;let h=y(f),m=y(o.clientWidth-(s+d)),x={rootMargin:-h+"px "+-m+"px "+-y(o.clientHeight-(f+p))+"px "+-y(s)+"px",threshold:v(0,g(1,u))||1},w=!0;function b(t){let r=t[0].intersectionRatio;if(r!==u){if(!w)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||eM(c,e.getBoundingClientRect())||l(),w=!1}try{r=new IntersectionObserver(b,{...x,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(b,x)}r.observe(e)}(!0),i}(s,n):null,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),s&&!c&&h.observe(s),t&&h.observe(t));let m=c?em(e):null;return c&&function t(){let r=em(e);m&&!eM(m,r)&&n(),m=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===z})},elements:{reference:Y.anchor},middleware:[((e,t)=>{let n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:a}=t,u=await W(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({mainAxis:m+en,alignmentAxis:w}),_&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=C(e,t),s={x:n,y:r},f=await i.detectOverflow(t,c),d=P(R(o)),p=A(d),h=s[p],m=s[d];if(l){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=h+f[e],r=h-f[t];h=v(n,g(h,r))}if(a){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=m+f[e],r=m-f[t];m=v(n,g(m,r))}let x=u.fn({...t,[p]:h,[d]:m});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:l,[d]:a}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({mainAxis:!0,crossAxis:!1,limiter:"partial"===K?((e,t)=>({fn:function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=C(e,t),s={x:n,y:r},f=P(o),d=A(f),p=s[d],h=s[f],m=C(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){let e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,x;let e="y"===d?"width":"height",t=G.has(R(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(v=l.offset)?void 0:v[f])||0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(x=l.offset)?void 0:x[f])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}}(e).fn,options:[e,t]}))():void 0,...el}),_&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:a,middlewareData:u,rects:c,initialPlacement:s,platform:f,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...y}=C(e,t);if(null!=(n=u.arrow)&&n.alignmentOffset)return{};let w=R(a),b=P(s),_=R(s)===s,D=await (null==f.isRTL?void 0:f.isRTL(d.floating)),N=m||(_||!x?[L(s)]:function(e){let t=L(e);return[j(e),t,j(t)]}(s)),K="none"!==v;!m&&K&&N.push(...function(e,t,n,r){let o=M(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?S:O;return t?O:S;case"left":case"right":return t?T:E;default:return[]}}(R(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(j)))),i}(s,x,v,D));let F=[s,...N],I=await f.detectOverflow(t,y),H=[],G=(null==(r=u.flip)?void 0:r.overflows)||[];if(p&&H.push(I[w]),h){let e=function(e,t,n){void 0===n&&(n=!1);let r=M(e),o=A(P(e)),i=k(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=L(l)),[l,L(l)]}(a,c,D);H.push(I[e[0]],I[e[1]])}if(G=[...G,{placement:a,overflows:H}],!H.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=F[e];if(t&&("alignment"!==h||b===P(t)||G.every(e=>P(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:G},reset:{placement:t}};let n=null==(i=G.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(g){case"bestFit":{let e=null==(l=G.filter(e=>{if(K){let t=P(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...el}),((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,i,{placement:l,rects:a,platform:u,elements:c}=t,{apply:s=()=>{},...f}=C(e,t),d=await u.detectOverflow(t,f),p=R(l),h=M(l),m="y"===P(l),{width:x,height:y}=a.floating;"top"===p||"bottom"===p?(o=p,i=h===(await (null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(i=p,o="end"===h?"top":"bottom");let w=y-d.top-d.bottom,b=x-d.left-d.right,A=g(y-d[o],w),k=g(x-d[i],b),j=!t.middlewareData.shift,O=A,S=k;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(O=w),j&&!h){let e=v(d.left,0),t=v(d.right,0),n=v(d.top,0),r=v(d.bottom,0);m?S=x-2*(0!==e||0!==t?e+t:v(d.left,d.right)):O=y-2*(0!==n||0!==r?n+r:v(d.top,d.bottom))}await s({...t,availableWidth:S,availableHeight:O});let T=await u.getDimensions(c.floating);return x!==T.width||y!==T.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...el,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),J&&((e,t)=>{let n=(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eA({element:n.current,padding:r}).fn(t):{}:n?eA({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}})({element:J,padding:b}),eJ({arrowWidth:et,arrowHeight:en}),V&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=C(e,t);switch(o){case"referenceHidden":{let e=I(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:H(e)}}}case"escaped":{let e=I(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:H(e)}}}default:return{}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({strategy:"referenceHidden",...el})]}),[eh,eg]=eQ(es),ev=(0,e_.c)(B);(0,eD.N)(()=>{ed&&(null==ev||ev())},[ed,ev]);let ex=null==(n=ep.arrow)?void 0:n.x,ey=null==(r=ep.arrow)?void 0:r.y,ew=(null==(i=ep.arrow)?void 0:i.centerOffset)!==0,[eb,eC]=o.useState();return(0,eD.N)(()=>{q&&eC(window.getComputedStyle(q).zIndex)},[q]),(0,eE.jsx)("div",{ref:ea.setFloating,"data-radix-popper-content-wrapper":"",style:{...ec,transform:ed?ec.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eb,"--radix-popper-transform-origin":[null==(l=ep.transformOrigin)?void 0:l.x,null==(u=ep.transformOrigin)?void 0:u.y].join(" "),...(null==(s=ep.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eE.jsx)(eB,{scope:p,placedSide:eh,onArrowChange:Q,arrowX:ex,arrowY:ey,shouldHideArrow:ew,children:(0,eE.jsx)(a.sG.div,{"data-side":eh,"data-align":eg,...X,ref:Z,style:{...X.style,animation:ed?void 0:"none"}})})})});eX.displayName=ez;var eY="PopperArrow",eq={top:"bottom",right:"left",bottom:"top",left:"right"},e$=o.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=eU(eY,n),i=eq[o.placedSide];return(0,eE.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,eE.jsx)(eL,{...r,ref:t,style:{...r.style,display:"block"}})})});function eZ(e){return null!==e}e$.displayName=eY;var eJ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:u,middlewareData:c}=t,s=(null==(n=c.arrow)?void 0:n.centerOffset)!==0,f=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[p,h]=eQ(a),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!=(i=null==(r=c.arrow)?void 0:r.x)?i:0)+f/2,v=(null!=(l=null==(o=c.arrow)?void 0:o.y)?l:0)+d/2,x="",y="";return"bottom"===p?(x=s?m:"".concat(g,"px"),y="".concat(-d,"px")):"top"===p?(x=s?m:"".concat(g,"px"),y="".concat(u.floating.height+d,"px")):"right"===p?(x="".concat(-d,"px"),y=s?m:"".concat(v,"px")):"left"===p&&(x="".concat(u.floating.width+d,"px"),y=s?m:"".concat(v,"px")),{data:{x,y}}}});function eQ(e){let[t,n="center"]=e.split("-");return[t,n]}var e0=n(6406),e1=n(4127),e2=n(9458),e5=n(1271),e3=n(7377),e7=n(6722),e6=["Enter"," "],e8=["ArrowUp","PageDown","End"],e9=["ArrowDown","PageUp","Home",...e8],e4={ltr:[...e6,"ArrowRight"],rtl:[...e6,"ArrowLeft"]},te={ltr:["ArrowLeft"],rtl:["ArrowRight"]},tt="Menu",[tn,tr,to]=(0,u.N)(tt),[ti,tl]=(0,l.A)(tt,[to,eF,e2.RG]),ta=eF(),tu=(0,e2.RG)(),[tc,ts]=ti(tt),[tf,td]=ti(tt),tp=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:l,modal:a=!0}=e,u=ta(t),[c,f]=o.useState(null),d=o.useRef(!1),p=(0,e_.c)(l),h=(0,s.jH)(i);return o.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,eE.jsx)(eG,{...u,children:(0,eE.jsx)(tc,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:f,children:(0,eE.jsx)(tf,{scope:t,onClose:o.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:h,modal:a,children:r})})})};tp.displayName=tt;var th=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,o=ta(n);return(0,eE.jsx)(eV,{...o,...r,ref:t})});th.displayName="MenuAnchor";var tm="MenuPortal",[tg,tv]=ti(tm,{forceMount:void 0}),tx=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=ts(tm,t);return(0,eE.jsx)(tg,{scope:t,forceMount:n,children:(0,eE.jsx)(e1.C,{present:n||i.open,children:(0,eE.jsx)(e0.Z,{asChild:!0,container:o,children:r})})})};tx.displayName=tm;var ty="MenuContent",[tw,tb]=ti(ty),tC=o.forwardRef((e,t)=>{let n=tv(ty,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=ts(ty,e.__scopeMenu),l=td(ty,e.__scopeMenu);return(0,eE.jsx)(tn.Provider,{scope:e.__scopeMenu,children:(0,eE.jsx)(e1.C,{present:r||i.open,children:(0,eE.jsx)(tn.Slot,{scope:e.__scopeMenu,children:l.modal?(0,eE.jsx)(tR,{...o,ref:t}):(0,eE.jsx)(tM,{...o,ref:t})})})})}),tR=o.forwardRef((e,t)=>{let n=ts(ty,e.__scopeMenu),r=o.useRef(null),l=(0,c.s)(t,r);return o.useEffect(()=>{let e=r.current;if(e)return(0,e3.Eq)(e)},[]),(0,eE.jsx)(tk,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,i.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),tM=o.forwardRef((e,t)=>{let n=ts(ty,e.__scopeMenu);return(0,eE.jsx)(tk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),tA=(0,e5.TL)("MenuContent.ScrollLock"),tk=o.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:l,onOpenAutoFocus:a,onCloseAutoFocus:u,disableOutsidePointerEvents:s,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:x,onDismiss:y,disableOutsideScroll:w,...b}=e,C=ts(ty,n),R=td(ty,n),M=ta(n),A=tu(n),k=tr(n),[P,j]=o.useState(null),O=o.useRef(null),S=(0,c.s)(t,O,C.onContentChange),T=o.useRef(0),E=o.useRef(""),L=o.useRef(0),_=o.useRef(null),D=o.useRef("right"),N=o.useRef(0),K=w?e7.A:o.Fragment;o.useEffect(()=>()=>window.clearTimeout(T.current),[]),(0,d.Oh)();let F=o.useCallback(e=>{var t,n;return D.current===(null==(t=_.current)?void 0:t.side)&&function(e,t){return!!t&&function(e,t){let{x:n,y:r}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let l=t[e],a=t[i],u=l.x,c=l.y,s=a.x,f=a.y;c>r!=f>r&&n<(s-u)*(r-c)/(f-c)+u&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,null==(n=_.current)?void 0:n.area)},[]);return(0,eE.jsx)(tw,{scope:n,searchRef:E,onItemEnter:o.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:o.useCallback(e=>{var t;F(e)||(null==(t=O.current)||t.focus(),j(null))},[F]),onTriggerLeave:o.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:L,onPointerGraceIntentChange:o.useCallback(e=>{_.current=e},[]),children:(0,eE.jsx)(K,{...w?{as:tA,allowPinchZoom:!0}:void 0,children:(0,eE.jsx)(p.n,{asChild:!0,trapped:l,onMountAutoFocus:(0,i.mK)(a,e=>{var t;e.preventDefault(),null==(t=O.current)||t.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:(0,eE.jsx)(f.qW,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:x,onDismiss:y,children:(0,eE.jsx)(e2.bL,{asChild:!0,...A,dir:R.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:j,onEntryFocus:(0,i.mK)(h,e=>{R.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,eE.jsx)(eX,{role:"menu","aria-orientation":"vertical","data-state":tQ(C.open),"data-radix-menu-content":"",dir:R.dir,...M,...b,ref:S,style:{outline:"none",...b.style},onKeyDown:(0,i.mK)(b.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;let r=E.current+e,o=k().filter(e=>!e.disabled),i=document.activeElement,l=null==(t=o.find(e=>e.ref.current===i))?void 0:t.textValue,a=function(e,t,n){var r;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,l=(r=Math.max(i,0),e.map((t,n)=>e[(r+n)%e.length]));1===o.length&&(l=l.filter(e=>e!==n));let a=l.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}(o.map(e=>e.textValue),r,l),u=null==(n=o.find(e=>e.textValue===a))?void 0:n.ref.current;!function e(t){E.current=t,window.clearTimeout(T.current),""!==t&&(T.current=window.setTimeout(()=>e(""),1e3))}(r),u&&setTimeout(()=>u.focus())})(e.key));let o=O.current;if(e.target!==o||!e9.includes(e.key))return;e.preventDefault();let i=k().filter(e=>!e.disabled).map(e=>e.ref.current);e8.includes(e.key)&&i.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(i)}),onBlur:(0,i.mK)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current="")}),onPointerMove:(0,i.mK)(e.onPointerMove,t2(e=>{let t=e.target,n=N.current!==e.clientX;e.currentTarget.contains(t)&&n&&(D.current=e.clientX>N.current?"right":"left",N.current=e.clientX)}))})})})})})})});tC.displayName=ty;var tP=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,eE.jsx)(a.sG.div,{role:"group",...r,ref:t})});tP.displayName="MenuGroup";var tj=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,eE.jsx)(a.sG.div,{...r,ref:t})});tj.displayName="MenuLabel";var tO="MenuItem",tS="menu.itemSelect",tT=o.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...l}=e,u=o.useRef(null),s=td(tO,e.__scopeMenu),f=tb(tO,e.__scopeMenu),d=(0,c.s)(t,u),p=o.useRef(!1);return(0,eE.jsx)(tE,{...l,ref:d,disabled:n,onClick:(0,i.mK)(e.onClick,()=>{let e=u.current;if(!n&&e){let t=new CustomEvent(tS,{bubbles:!0,cancelable:!0});e.addEventListener(tS,e=>null==r?void 0:r(e),{once:!0}),(0,a.hO)(e,t),t.defaultPrevented?p.current=!1:s.onClose()}}),onPointerDown:t=>{var n;null==(n=e.onPointerDown)||n.call(e,t),p.current=!0},onPointerUp:(0,i.mK)(e.onPointerUp,e=>{var t;p.current||null==(t=e.currentTarget)||t.click()}),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{let t=""!==f.searchRef.current;n||t&&" "===e.key||e6.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});tT.displayName=tO;var tE=o.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:l,...u}=e,s=tb(tO,n),f=tu(n),d=o.useRef(null),p=(0,c.s)(t,d),[h,m]=o.useState(!1),[g,v]=o.useState("");return o.useEffect(()=>{let e=d.current;if(e){var t;v((null!=(t=e.textContent)?t:"").trim())}},[u.children]),(0,eE.jsx)(tn.ItemSlot,{scope:n,disabled:r,textValue:null!=l?l:g,children:(0,eE.jsx)(e2.q7,{asChild:!0,...f,focusable:!r,children:(0,eE.jsx)(a.sG.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...u,ref:p,onPointerMove:(0,i.mK)(e.onPointerMove,t2(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,i.mK)(e.onPointerLeave,t2(e=>s.onItemLeave(e))),onFocus:(0,i.mK)(e.onFocus,()=>m(!0)),onBlur:(0,i.mK)(e.onBlur,()=>m(!1))})})})}),tL=o.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...o}=e;return(0,eE.jsx)(tG,{scope:e.__scopeMenu,checked:n,children:(0,eE.jsx)(tT,{role:"menuitemcheckbox","aria-checked":t0(n)?"mixed":n,...o,ref:t,"data-state":t1(n),onSelect:(0,i.mK)(o.onSelect,()=>null==r?void 0:r(!!t0(n)||!n),{checkForDefaultPrevented:!1})})})});tL.displayName="MenuCheckboxItem";var t_="MenuRadioGroup",[tD,tN]=ti(t_,{value:void 0,onValueChange:()=>{}}),tK=o.forwardRef((e,t)=>{let{value:n,onValueChange:r,...o}=e,i=(0,e_.c)(r);return(0,eE.jsx)(tD,{scope:e.__scopeMenu,value:n,onValueChange:i,children:(0,eE.jsx)(tP,{...o,ref:t})})});tK.displayName=t_;var tF="MenuRadioItem",tI=o.forwardRef((e,t)=>{let{value:n,...r}=e,o=tN(tF,e.__scopeMenu),l=n===o.value;return(0,eE.jsx)(tG,{scope:e.__scopeMenu,checked:l,children:(0,eE.jsx)(tT,{role:"menuitemradio","aria-checked":l,...r,ref:t,"data-state":t1(l),onSelect:(0,i.mK)(r.onSelect,()=>{var e;return null==(e=o.onValueChange)?void 0:e.call(o,n)},{checkForDefaultPrevented:!1})})})});tI.displayName=tF;var tH="MenuItemIndicator",[tG,tW]=ti(tH,{checked:!1}),tV=o.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...o}=e,i=tW(tH,n);return(0,eE.jsx)(e1.C,{present:r||t0(i.checked)||!0===i.checked,children:(0,eE.jsx)(a.sG.span,{...o,ref:t,"data-state":t1(i.checked)})})});tV.displayName=tH;var tz=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,eE.jsx)(a.sG.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});tz.displayName="MenuSeparator";var tB=o.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,o=ta(n);return(0,eE.jsx)(e$,{...o,...r,ref:t})});tB.displayName="MenuArrow";var tU="MenuSub",[tX,tY]=ti(tU),tq="MenuSubTrigger",t$=o.forwardRef((e,t)=>{let n=ts(tq,e.__scopeMenu),r=td(tq,e.__scopeMenu),l=tY(tq,e.__scopeMenu),a=tb(tq,e.__scopeMenu),u=o.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:f}=a,d={__scopeMenu:e.__scopeMenu},p=o.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return o.useEffect(()=>p,[p]),o.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),f(null)}},[s,f]),(0,eE.jsx)(th,{asChild:!0,...d,children:(0,eE.jsx)(tE,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":tQ(n.open),...e,ref:(0,c.t)(t,l.onTriggerChange),onClick:t=>{var r;null==(r=e.onClick)||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:(0,i.mK)(e.onPointerMove,t2(t=>{a.onItemEnter(t),!t.defaultPrevented&&(e.disabled||n.open||u.current||(a.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100)))})),onPointerLeave:(0,i.mK)(e.onPointerLeave,t2(e=>{var t,r;p();let o=null==(t=n.content)?void 0:t.getBoundingClientRect();if(o){let t=null==(r=n.content)?void 0:r.dataset.side,i="right"===t,l=o[i?"left":"right"],u=o[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+(i?-5:5),y:e.clientY},{x:l,y:o.top},{x:u,y:o.top},{x:u,y:o.bottom},{x:l,y:o.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:(0,i.mK)(e.onKeyDown,t=>{let o=""!==a.searchRef.current;if(!e.disabled&&(!o||" "!==t.key)&&e4[r.dir].includes(t.key)){var i;n.onOpenChange(!0),null==(i=n.content)||i.focus(),t.preventDefault()}})})})});t$.displayName=tq;var tZ="MenuSubContent",tJ=o.forwardRef((e,t)=>{let n=tv(ty,e.__scopeMenu),{forceMount:r=n.forceMount,...l}=e,a=ts(ty,e.__scopeMenu),u=td(ty,e.__scopeMenu),s=tY(tZ,e.__scopeMenu),f=o.useRef(null),d=(0,c.s)(t,f);return(0,eE.jsx)(tn.Provider,{scope:e.__scopeMenu,children:(0,eE.jsx)(e1.C,{present:r||a.open,children:(0,eE.jsx)(tn.Slot,{scope:e.__scopeMenu,children:(0,eE.jsx)(tk,{id:s.contentId,"aria-labelledby":s.triggerId,...l,ref:d,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;u.isUsingKeyboardRef.current&&(null==(t=f.current)||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,i.mK)(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:(0,i.mK)(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=te[u.dir].includes(e.key);if(t&&n){var r;a.onOpenChange(!1),null==(r=s.trigger)||r.focus(),e.preventDefault()}})})})})})});function tQ(e){return e?"open":"closed"}function t0(e){return"indeterminate"===e}function t1(e){return t0(e)?"indeterminate":e?"checked":"unchecked"}function t2(e){return t=>"mouse"===t.pointerType?e(t):void 0}tJ.displayName=tZ,n(4068);var t5="ContextMenu",[t3,t7]=(0,l.A)(t5,[tl]),t6=tl(),[t8,t9]=t3(t5),t4=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:l=!0}=e,[a,u]=o.useState(!1),c=t6(t),s=(0,e_.c)(r),f=o.useCallback(e=>{u(e),s(e)},[s]);return(0,eE.jsx)(t8,{scope:t,open:a,onOpenChange:f,modal:l,children:(0,eE.jsx)(tp,{...c,dir:i,open:a,onOpenChange:f,modal:l,children:n})})};t4.displayName=t5;var ne="ContextMenuTrigger",nt=o.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...l}=e,u=t9(ne,n),c=t6(n),s=o.useRef({x:0,y:0}),f=o.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),d=o.useRef(0),p=o.useCallback(()=>window.clearTimeout(d.current),[]),h=e=>{s.current={x:e.clientX,y:e.clientY},u.onOpenChange(!0)};return o.useEffect(()=>p,[p]),o.useEffect(()=>void(r&&p()),[r,p]),(0,eE.jsxs)(eE.Fragment,{children:[(0,eE.jsx)(th,{...c,virtualRef:f}),(0,eE.jsx)(a.sG.span,{"data-state":u.open?"open":"closed","data-disabled":r?"":void 0,...l,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:(0,i.mK)(e.onContextMenu,e=>{p(),h(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:(0,i.mK)(e.onPointerDown,na(e=>{p(),d.current=window.setTimeout(()=>h(e),700)})),onPointerMove:r?e.onPointerMove:(0,i.mK)(e.onPointerMove,na(p)),onPointerCancel:r?e.onPointerCancel:(0,i.mK)(e.onPointerCancel,na(p)),onPointerUp:r?e.onPointerUp:(0,i.mK)(e.onPointerUp,na(p))})]})});nt.displayName=ne;var nn=e=>{let{__scopeContextMenu:t,...n}=e,r=t6(t);return(0,eE.jsx)(tx,{...r,...n})};nn.displayName="ContextMenuPortal";var nr="ContextMenuContent",no=o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=t9(nr,n),l=t6(n),a=o.useRef(!1);return(0,eE.jsx)(tC,{...l,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:t=>{var n;null==(n=e.onCloseAutoFocus)||n.call(e,t),!t.defaultPrevented&&a.current&&t.preventDefault(),a.current=!1},onInteractOutside:t=>{var n;null==(n=e.onInteractOutside)||n.call(e,t),t.defaultPrevented||i.modal||(a.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});no.displayName=nr,o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tP,{...o,...r,ref:t})}).displayName="ContextMenuGroup",o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tj,{...o,...r,ref:t})}).displayName="ContextMenuLabel";var ni=o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tT,{...o,...r,ref:t})});ni.displayName="ContextMenuItem",o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tL,{...o,...r,ref:t})}).displayName="ContextMenuCheckboxItem",o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tK,{...o,...r,ref:t})}).displayName="ContextMenuRadioGroup",o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tI,{...o,...r,ref:t})}).displayName="ContextMenuRadioItem",o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tV,{...o,...r,ref:t})}).displayName="ContextMenuItemIndicator";var nl=o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tz,{...o,...r,ref:t})});nl.displayName="ContextMenuSeparator",o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tB,{...o,...r,ref:t})}).displayName="ContextMenuArrow";function na(e){return t=>"mouse"!==t.pointerType?e(t):void 0}o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(t$,{...o,...r,ref:t})}).displayName="ContextMenuSubTrigger",o.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,o=t6(n);return(0,eE.jsx)(tJ,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="ContextMenuSubContent";var nu=t4,nc=nt,ns=nn,nf=no,nd=ni,np=nl}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[943],{7943:(e,t,a)=>{a.r(t),a.d(t,{OrgMap:()=>m});var n=a(4130),r=a(4941),o=a(2916),l=a(7946),i=a(8039);let s={executive:"\uD83C\uDFAF",manager:"\uD83D\uDCCB",senior:"⭐",employee:"\uD83D\uDC64"},d={employeeNode:function(e){let{data:t,selected:a}=e,l=s[t.rank]||s.employee;return(0,n.jsxs)("div",{className:"bg-[var(--material-regular)] backdrop-blur-[20px] backdrop-saturate-[180%] [-webkit-backdrop-filter:blur(20px)_saturate(180%)] rounded-[var(--radius-md,12px)] py-[var(--space-3)] px-[var(--space-4)] w-[240px] cursor-pointer relative transition-shadow duration-150 ease-in-out",style:{border:"1px solid ".concat(a?"var(--accent)":"var(--separator)"),boxShadow:a?"0 0 0 1px var(--accent), var(--shadow-card)":"var(--shadow-card)"},children:[(0,n.jsxs)("div",{className:"flex items-center gap-[var(--space-2)] mb-[var(--space-1)]",children:[(0,n.jsx)("span",{className:"text-[20px] leading-none shrink-0",children:l}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"text-[length:var(--text-body)] font-[var(--weight-semibold)] text-[var(--text-primary)] whitespace-nowrap overflow-hidden text-ellipsis leading-[var(--leading-tight)]",children:t.displayName||t.name}),(0,n.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] whitespace-nowrap overflow-hidden text-ellipsis mt-px",children:t.department})]})]}),(0,n.jsx)("div",{className:"flex items-center gap-[var(--space-2)] mt-[var(--space-2)]",children:(0,n.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] text-[var(--accent)] bg-[var(--accent-fill)] py-px px-[7px] rounded-[10px]",children:t.engine})}),(0,n.jsx)(r.h7,{type:"target",position:o.yX.Top,style:{opacity:0}}),(0,n.jsx)(r.h7,{type:"source",position:o.yX.Bottom,style:{opacity:0}})]})},departmentGroup:function(e){let{data:t}=e,{label:a}=t;return(0,n.jsx)("div",{className:"w-full h-full relative",children:(0,n.jsx)("div",{className:"absolute top-[10px] left-0 right-0 text-center text-[length:var(--text-caption2)] font-[var(--weight-semibold)] tracking-[var(--tracking-wide)] uppercase text-[var(--text-tertiary)] select-none pointer-events-none",children:a})})}};function p(e,t){var a,n,r;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=new i.A.graphlib.Graph().setDefaultEdgeLabel(()=>({}));for(let t of(l.setGraph({rankdir:null!=(a=o.rankdir)?a:"TB",nodesep:null!=(n=o.nodesep)?n:60,ranksep:null!=(r=o.ranksep)?r:120,marginx:20,marginy:20}),e))l.setNode(t,{width:240,height:90});for(let[e,a]of t)l.setEdge(e,a);i.A.layout(l);let s=new Map;for(let t of e){let e=l.node(t);s.set(t,{x:e.x-120,y:e.y-45})}return s}function c(e,t){if(0===e.length)return{nodes:[],edges:[]};let a=new Map,n=[];for(let t of e)if(t.department){let e=a.get(t.department)||[];e.push(t),a.set(t.department,e)}else n.push(t);let r=e.find(e=>"executive"===e.rank),o=[],l=0,i=160*!!r,s=[],d=0;for(let[e,n]of a){let a=n.filter(e=>e.name!==(null==r?void 0:r.name));if(0===a.length){d++;continue}let o=p(a.map(e=>e.name),[],{nodesep:40,ranksep:90}),c=1/0,m=-1/0,u=1/0,h=-1/0;for(let e of o.values())c=Math.min(c,e.x),m=Math.max(m,e.x+240),u=Math.min(u,e.y),h=Math.max(h,e.y+90);let x=m-c+60,f=36+(h-u)+24,g="group-".concat(d),v={id:g,type:"departmentGroup",data:{label:e},position:{x:l,y:i},style:{width:x,height:f,background:"var(--fill-quaternary)",borderRadius:12,border:"1px solid var(--separator)",padding:0},selectable:!1,draggable:!1},y=[];for(let e of a){let a=o.get(e.name);a&&y.push({id:e.name,type:"employeeNode",data:e,position:{x:a.x-c+30,y:a.y-u+36},parentId:g,extent:"parent",selected:e.name===t})}s.push({groupNode:v,childNodes:y,width:x}),l+=x+80,d++}if(n.length>0){let e=n.filter(e=>e.name!==(null==r?void 0:r.name));if(e.length>0){let a=p(e.map(e=>e.name),[],{nodesep:40,ranksep:90}),n=1/0,r=-1/0,o=1/0,d=-1/0;for(let e of a.values())n=Math.min(n,e.x),r=Math.max(r,e.x+240),o=Math.min(o,e.y),d=Math.max(d,e.y+90);let c=r-n+60,m="group-ungrouped",u={id:m,type:"departmentGroup",data:{label:"Unassigned"},position:{x:l,y:i},style:{width:c,height:36+(d-o)+24,background:"var(--fill-quaternary)",borderRadius:12,border:"1px solid var(--separator)",padding:0},selectable:!1,draggable:!1},h=[];for(let r of e){let e=a.get(r.name);e&&h.push({id:r.name,type:"employeeNode",data:r,position:{x:e.x-n+30,y:e.y-o+36},parentId:m,extent:"parent",selected:r.name===t})}s.push({groupNode:u,childNodes:h,width:c}),l+=c+80}}let c=l-80;for(let e of(r&&o.push({id:r.name,type:"employeeNode",data:r,position:{x:Math.max(0,c/2-120),y:0},selected:r.name===t}),s))o.push(e.groupNode),o.push(...e.childNodes);let m=[];if(r)for(let[,e]of a){let a=e.filter(e=>e.name!==r.name).sort((e,t)=>{var a,n;let r={executive:0,manager:1,senior:2,employee:3};return(null!=(a=r[e.rank])?a:3)-(null!=(n=r[t.rank])?n:3)});if(a.length>0){let e=a[0],n=t===r.name||t===e.name;m.push({id:"".concat(r.name,"-").concat(e.name),source:r.name,target:e.name,type:"smoothstep",style:{stroke:n?"var(--accent)":"var(--text-quaternary)",strokeWidth:n?2.5:1.5,opacity:n?1:.7},animated:n})}}return{nodes:o,edges:m}}function m(e){let{employees:t,selectedName:a,onNodeClick:i}=e,{nodes:s,edges:p}=c(t,a),[m,u,h]=(0,r.ck)(s),[x,f,g]=(0,r.fM)(p);(0,l.useEffect)(()=>{let{nodes:e,edges:n}=c(t,a);u(e),f(n)},[t,a,u,f]);let v=(0,l.useCallback)((e,a)=>{let n=t.find(e=>e.name===a.id);n&&i(n)},[t,i]);return(0,n.jsx)(r.Gc,{nodes:m,edges:x,onNodesChange:h,onEdgesChange:g,onNodeClick:v,nodeTypes:d,connectionLineType:o.Do.SmoothStep,fitView:!0,fitViewOptions:{padding:.2},minZoom:.2,maxZoom:2,proOptions:{hideAttribution:!0},children:(0,n.jsx)(r.H2,{position:"bottom-left",style:{left:16,bottom:16}})})}}}]);
|