"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{23359:function(e,t,r){r.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,r(60998).Z)("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]])},88507:function(e,t,r){r.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,r(60998).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},26409:function(e,t,r){r.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,r(60998).Z)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},6021:function(e,t,r){r.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,r(60998).Z)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},28586:function(e,t,r){r.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,r(60998).Z)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},33872:function(e,t,r){r.r(t),r.d(t,{Layout:function(){return k}});var s=r(85893),a=r(67294),n=r(29071),l=r(23001),i=r(43767),o=r(60998);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let c=(0,o.Z)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);var d=r(26409),u=r(94849),x=r(6556);function h(){let{startTour:e}=(0,u.r)(),{shouldShowTourPrompt:t,markTourCompleted:r}=(0,x.n)(),[n,l]=(0,a.useState)(!1),[o,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(h(!0),t){let e=setTimeout(()=>{l(!0)},2e3);return()=>clearTimeout(e)}},[t]);let m=()=>{l(!1),r()};return o&&t&&n?(0,s.jsx)("div",{className:"fixed top-20 right-6 z-50 max-w-sm",children:(0,s.jsxs)("div",{className:"bg-white rounded-md shadow-lg border border-gray-200 p-4 transform transition-all duration-300 ease-out",children:[(0,s.jsx)("button",{onClick:m,className:"absolute top-3 right-3 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full p-1 transition-all duration-150","aria-label":"Dismiss notification",children:(0,s.jsx)(i.Z,{className:"w-3 h-3"})}),(0,s.jsxs)("div",{className:"pr-6",children:[(0,s.jsxs)("div",{className:"flex items-start mb-3",children:[(0,s.jsx)("div",{className:"flex items-center justify-center w-7 h-7 bg-blue-50 rounded-full mr-3 mt-0.5",children:(0,s.jsx)(c,{className:"w-3.5 h-3.5 text-blue-600"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"Welcome to SkyPilot!"}),(0,s.jsx)("p",{className:"text-sm text-gray-600 leading-relaxed",children:"New to the dashboard? Take a quick guided tour to discover all the features."})]})]}),(0,s.jsxs)("div",{className:"flex space-x-2 ml-10",children:[(0,s.jsxs)("button",{onClick:()=>{l(!1),e()},className:"flex items-center px-3 py-1.5 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors duration-150",children:[(0,s.jsx)(d.Z,{className:"w-3 h-3 mr-1.5"}),"Start Tour"]}),(0,s.jsx)("button",{onClick:m,className:"px-3 py-1.5 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 rounded transition-colors duration-150",children:"Maybe Later"})]})]})]})}):null}/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let m=(0,o.Z)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function p(e){let{children:t,text:r}=e,[n,l]=(0,a.useState)(!1);return(0,s.jsxs)("div",{className:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[t,n&&(0,s.jsx)("div",{className:"absolute top-0 right-0 transform -translate-y-full -translate-x-2 mb-2 px-2 py-1 bg-gray-700 text-white text-xs rounded-md shadow-lg whitespace-nowrap z-50",children:r})]})}function f(){let{startTour:e}=(0,u.r)();return(0,s.jsx)(p,{text:"Start a tour",children:(0,s.jsx)("button",{onClick:e,className:"fixed bottom-4 right-4 bg-transparent text-gray-400 p-2 rounded-full hover:text-gray-500 focus:outline-none","aria-label":"Start Tour",children:(0,s.jsx)(m,{className:"h-5 w-5"})})})}let g=(0,a.createContext)(void 0);function b(e){let{children:t}=e,[r,n]=(0,a.useState)(!1),l=(0,a.useCallback)(()=>{n(!0)},[]),i=(0,a.useCallback)(()=>{n(!1)},[]);return(0,s.jsx)(g.Provider,{value:{isUpgrading:r,reportUpgrade:l,clearUpgrade:i},children:t})}function y(){let e=(0,a.useContext)(g);if(!e)throw Error("useUpgradeDetection must be used within UpgradeDetectionProvider");return e}function j(){let{isUpgrading:e}=y(),t=(0,l.X)();return e?(0,s.jsx)("div",{className:"fixed z-40 bg-yellow-50 border-b border-yellow-200 ".concat(t?"top-[56px] left-0 right-0":"top-0 left-56 right-0"),children:(0,s.jsx)("div",{className:"max-w-7xl mx-auto py-3 px-4 sm:px-6 lg:px-8",children:(0,s.jsx)("div",{className:"flex items-center justify-center",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsxs)("svg",{className:"h-5 w-5 text-yellow-600 mr-2 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,s.jsx)("span",{className:"text-sm font-medium text-yellow-800",children:"Your SkyPilot deployment is undergoing upgrades. Refresh in a few moments."})]})})})}):null}var v=r(55988);function N(e){let{children:t,isUpgrading:r}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed top-0 left-0 right-0 z-50 shadow-sm",children:(0,s.jsx)(n.Du,{})}),(0,s.jsx)(j,{}),(0,s.jsx)("div",{className:"transition-all duration-200 ease-in-out min-h-screen",style:{paddingTop:r?"112px":"56px"},children:(0,s.jsx)("main",{className:"p-6",children:t})})]})}function w(e){let{children:t,highlighted:r}=e,n=(0,l.X)(),{reportUpgrade:i,clearUpgrade:o,isUpgrading:c}=y(),[d,u]=(0,a.useState)(!1);return((0,a.useEffect)(()=>{window.__upgradeInterceptorInstalled||(window.fetch=function(e,t){let r=window.fetch;return async function(s,a){let n;try{n=await r(s,a)}catch(e){throw e}try{if(function(e){let t;try{t="string"==typeof e?e:e.url}catch(e){return!1}return["/_next/static/","/_next/image",".js",".mjs",".css",".woff",".woff2",".ttf",".eot",".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].some(e=>t.includes(e))}(s))return n;if(503===n.status){let t=n.clone();try{let r=await t.json();r.detail&&(r.detail.includes("shutting down")||r.detail.includes("try again later"))&&e()}catch(e){console.debug("Non-JSON 503 response, ignoring.")}}else(n.ok||n.status>=200&&n.status<300)&&t()}catch(e){console.error("Error in upgrade detection interceptor:",e)}return n}}(i,o),window.__upgradeInterceptorInstalled=!0)},[i,o]),(0,a.useEffect)(()=>{let e=setTimeout(()=>u(!0),200),t=()=>u(!0);return window.addEventListener("skydashboard:navigation-ready",t),()=>{clearTimeout(e),window.removeEventListener("skydashboard:navigation-ready",t)}},[]),d)?(0,s.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,s.jsx)(v.j,{name:"layout.navigation",context:{children:t,isUpgrading:c,isMobile:n},fallback:(0,s.jsx)(N,{isUpgrading:c,children:t})}),(0,s.jsx)(h,{}),(0,s.jsx)(f,{})]}):(0,s.jsx)("div",{className:"min-h-screen bg-gray-50"})}function k(e){return(0,s.jsx)(b,{children:(0,s.jsx)(n.Hn,{children:(0,s.jsx)(w,{...e})})})}},29071:function(e,t,r){r.d(t,{Hn:function(){return C},Du:function(){return M},Ap:function(){return S}});var s=r(85893),a=r(67294),n=r(25675),l=r.n(n),i=r(11163),o=r(41664),c=r.n(o),d=r(53850),u=r(60998);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let x=(0,u.Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var h=r(23359);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let m=(0,u.Z)("Activity",[["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",key:"169zse"}]]),p=(0,u.Z)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var f=r(6021),g=r(93225),b=r(470),y=r(23001),j=r(91623),v=r(23800),N=r(55988);let w={key:d._m,shield:d.b7,server:d.QT,briefcase:d.Vp,chip:d.PC,book:d.E9,users:d.oy,volume:d.eU,clock:x,kueue:d.KueueIcon,filecode:h.Z,repeat:d.ny,piechart:d.ng,activity:m},k=(0,a.createContext)(null);function C(e){let{children:t}=e,[r,n]=(0,a.useState)(!0),[l,i]=(0,a.useState)(!1),[o,c]=(0,a.useState)(null),[d,u]=(0,a.useState)(null),x=window.location.origin,h="".concat(x).concat(g.f4);return(0,a.useEffect)(()=>{fetch("".concat(h,"/api/health")).then(e=>e.json()).then(e=>{e.user&&e.user.name&&(c(e.user.name),(async()=>{try{let e=await fetch("".concat(h,"/users/role"));if(e.ok){let t=await e.json();t.role&&u(t.role)}}catch(e){console.log("Could not fetch user role:",e)}})())}).catch(e=>{console.error("Error fetching user data:",e)})},[h]),(0,s.jsx)(k.Provider,{value:{isSidebarOpen:r,toggleSidebar:()=>{n(e=>!e)},isMobileSidebarOpen:l,toggleMobileSidebar:()=>{i(e=>!e)},userEmail:o,userRole:d},children:t})}function S(){let e=(0,a.useContext)(k);if(!e)throw Error("useSidebar must be used within a SidebarProvider");return e}function M(){let e,t;let r=(0,i.useRouter)(),n=(0,y.X)(),{userEmail:o,userRole:u,isMobileSidebarOpen:x,toggleMobileSidebar:m}=S(),[k,C]=(0,a.useState)(!1),[M,E]=(0,a.useState)(null),{ungrouped:z,groups:L}=(0,v.d7)(),Z=(0,v.x1)(),H=(0,a.useRef)(null),_=(0,a.useRef)(null),U=(0,a.useRef)(null);(0,a.useEffect)(()=>{function e(e){H.current&&!H.current.contains(e.target)&&C(!1),_.current&&!_.current.contains(e.target)&&!e.target.closest(".mobile-menu-button")&&x&&m(),U.current&&!U.current.contains(e.target)&&E(null)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[H,x,m]);let W=e=>"/workspaces"===e?r.pathname.startsWith("/workspaces")||r.pathname.startsWith("/workspace"):r.pathname.startsWith(e),P=e=>{let t=W(e);return"inline-flex items-center border-b-2 ".concat(t?"border-transparent text-blue-600":"border-transparent hover:text-blue-600"," ").concat(n?"px-2 py-1":"px-1 pt-1 space-x-2")},T=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!t&&W(e);return"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(r?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600")},D=(e,t)=>{if(a.isValidElement(e)){var r;return a.cloneElement(e,{className:[null===(r=e.props)||void 0===r?void 0:r.className,t].filter(Boolean).join(" ")})}let s=w[e];return s?a.createElement(s,{className:t}):e},V=e=>(0,s.jsxs)(s.Fragment,{children:[e.icon&&(0,s.jsx)("span",{className:"text-base leading-none mr-1","aria-hidden":"true",children:D(e.icon,"w-4 h-4")}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,s.jsx)("span",{children:e.label}),e.badge&&(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded-full",children:e.badge})]})]}),A=e=>{if("string"!=typeof e)return e;let t=Z.find(t=>t.path===e);if(!t||!t.path.startsWith("/plugins"))return e;let r=t.path.replace(/^\/+/,"").split("/").slice(1).filter(Boolean);return{pathname:"/plugins/[...slug]",query:r.length?{slug:r}:{}}},F=e=>e.external?(0,s.jsx)("a",{href:e.href,target:e.target,rel:e.rel,className:"inline-flex items-center border-b-2 border-transparent px-1 pt-1 space-x-2 text-gray-700 hover:text-blue-600",children:V(e)},e.id):(0,s.jsx)(c(),{href:A(e.href),className:P(e.href),prefetch:!1,children:V(e)},e.id),R=e=>{let t=(0,s.jsxs)(s.Fragment,{children:[e.icon&&(0,s.jsx)("span",{className:"text-base leading-none mr-2","aria-hidden":"true",children:D(e.icon,"w-5 h-5")}),(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:e.label}),e.badge&&(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded-full",children:e.badge})]})]});return e.external?(0,s.jsx)("a",{href:e.href,target:e.target,rel:e.rel,className:T(e.href,!0),onClick:m,children:t},e.id):(0,s.jsx)(c(),{href:A(e.href),className:T(e.href),onClick:m,prefetch:!1,children:t},e.id)},q=(e,t)=>{let r=M===e;return(0,s.jsxs)("div",{className:"relative",ref:U,children:[(0,s.jsxs)("button",{onClick:()=>E(r?null:e),className:"inline-flex items-center align-middle border-b-2 px-1 pt-1 space-x-1 ".concat(r?"text-blue-600 border-blue-600":"border-transparent text-gray-700 hover:text-blue-600"),children:[(0,s.jsx)("span",{children:e}),(0,s.jsx)("svg",{className:"w-4 h-4 transition-transform ".concat(r?"rotate-180":""),fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),r&&(0,s.jsx)("div",{className:"absolute top-full left-0 mt-1 min-w-[8rem] bg-white rounded-md shadow-lg border border-gray-200 z-50",children:(0,s.jsx)("div",{className:"py-1",children:t.map(e=>(0,s.jsx)(c(),{href:A(e.href),className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors",onClick:()=>E(null),prefetch:!1,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[e.icon&&(0,s.jsx)("span",{className:"text-base leading-none",children:D(e.icon,"w-4 h-4")}),(0,s.jsx)("span",{children:e.label})]})},e.id))})})]},e)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm",children:(0,s.jsxs)("div",{className:"flex items-center justify-between h-full",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-4 mr-4 md:mr-6",children:[n&&(0,s.jsx)("button",{onClick:m,className:"mobile-menu-button p-2 rounded-md text-gray-600 hover:text-blue-600 hover:bg-gray-100 transition-colors","aria-label":"Toggle mobile menu",children:(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:x?"M6 18L18 6M6 6l12 12":"M4 6h16M4 12h16M4 18h16"})})}),(0,s.jsx)(c(),{href:"/",className:"flex items-center px-1 pt-1 h-full",prefetch:!1,children:(0,s.jsx)("div",{className:"h-20 w-20 flex items-center justify-center",children:(0,s.jsx)(l(),{src:"".concat(g.GW,"/skypilot.svg"),alt:"SkyPilot Logo",width:80,height:80,priority:!0,className:"w-full h-full object-contain"})})})]}),!n&&(0,s.jsxs)("div",{className:"flex items-center space-x-2 md:space-x-4 mr-6",children:[(0,s.jsxs)(c(),{href:"/clusters",className:P("/clusters"),prefetch:!1,children:[(0,s.jsx)(d.QT,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Clusters"})]}),(0,s.jsxs)(c(),{href:"/jobs",className:P("/jobs"),prefetch:!1,children:[(0,s.jsx)(d.Vp,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Jobs"})]}),(0,s.jsxs)(c(),{href:"/volumes",className:P("/volumes"),prefetch:!1,children:[(0,s.jsx)(d.eU,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Volumes"})]}),(0,s.jsx)("div",{className:"border-l border-gray-200 h-6 mx-1"}),(0,s.jsxs)(c(),{href:"/recipes",className:P("/recipes"),prefetch:!1,children:[(0,s.jsx)(h.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Recipes"})]}),(0,s.jsxs)(c(),{href:"/infra",className:P("/infra"),prefetch:!1,children:[(0,s.jsx)(d.PC,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Infra"})]}),(0,s.jsxs)(c(),{href:"/workspaces",className:P("/workspaces"),prefetch:!1,children:[(0,s.jsx)(d.E9,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Workspaces"})]}),(0,s.jsxs)(c(),{href:"/users",className:P("/users"),prefetch:!1,children:[(0,s.jsx)(d.oy,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Users"})]})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-1 ml-auto",children:[!n&&(0,s.jsxs)(s.Fragment,{children:[z.map(e=>F(e)),Object.entries(L).map(e=>{let[t,r]=e;return q(t,r)}),(0,s.jsx)(b.WH,{content:"Documentation",className:"text-sm text-muted-foreground",children:(0,s.jsxs)("a",{href:"https://docs.skypilot.co/en/latest/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center align-middle border-b-2 border-transparent px-1 pt-1 space-x-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer",title:"Docs",children:[(0,s.jsx)("span",{className:"leading-none",children:"Docs"}),(0,s.jsx)(d.h0,{className:"w-3.5 h-3.5"})]})}),(0,s.jsx)(b.WH,{content:"GitHub Repository",className:"text-sm text-muted-foreground",children:(0,s.jsx)("a",{href:"https://github.com/skypilot-org/skypilot",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center align-middle p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"GitHub",children:(0,s.jsx)(d.fy,{className:"w-5 h-5"})})}),(0,s.jsx)(b.WH,{content:"Join Slack",className:"text-sm text-muted-foreground",children:(0,s.jsx)("a",{href:"https://slack.skypilot.co/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center align-middle p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Slack",children:(0,s.jsx)(d.mU,{className:"w-5 h-5"})})}),(0,s.jsx)(b.WH,{content:"Leave Feedback",className:"text-sm text-muted-foreground",children:(0,s.jsx)("a",{href:"https://github.com/skypilot-org/skypilot/issues/new",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center align-middle p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Leave Feedback",children:(0,s.jsx)(d.aD,{className:"w-5 h-5"})})}),(0,s.jsx)("div",{className:"border-l border-gray-200 h-6"}),(0,s.jsx)(j.on,{}),(0,s.jsx)(b.WH,{content:"Configuration",className:"text-sm text-muted-foreground",children:(0,s.jsx)(c(),{href:"/config",className:"inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer ".concat(W("/config")?"text-blue-600 hover:bg-gray-100":"text-gray-600 hover:bg-gray-100"),title:"Configuration",prefetch:!1,children:(0,s.jsx)(p,{className:"w-5 h-5"})})})]}),o&&(0,s.jsxs)("div",{className:"relative",ref:H,children:[(0,s.jsx)("button",{onClick:()=>C(!k),className:"inline-flex items-center justify-center rounded-full transition-colors duration-150 cursor-pointer hover:ring-2 hover:ring-blue-200",title:"User Profile",children:(0,s.jsx)("div",{className:"".concat(n?"w-6 h-6 text-xs":"w-7 h-7 text-sm"," bg-blue-600 text-white rounded-full flex items-center justify-center font-medium hover:bg-blue-700 transition-colors"),children:o?o.includes("@")?o.split("@")[0].charAt(0).toUpperCase():o.charAt(0).toUpperCase():"?"})}),k&&(0,s.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-50 border border-gray-200",children:[(e=o,t=null,o&&o.includes("@")&&(e=o.split("@")[0],t=o),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"px-4 pt-2 pb-1 text-sm font-medium text-gray-900",children:e}),t&&(0,s.jsx)("div",{className:"px-4 pt-0 pb-1 text-xs text-gray-500",children:t}),u&&(0,s.jsx)("div",{className:"px-4 pt-0 pb-2 text-xs",children:"admin"===u?(0,s.jsxs)("span",{className:"inline-flex items-center text-blue-600",children:[(0,s.jsx)(d.r7,{className:"w-3 h-3 mr-1"}),"Admin"]}):(0,s.jsxs)("span",{className:"inline-flex items-center text-gray-600",children:[(0,s.jsx)(f.Z,{className:"w-3 h-3 mr-1"}),"User"]})})]})),(0,s.jsx)("div",{className:"border-t border-gray-200 mx-1 my-1"}),(0,s.jsx)(c(),{href:"/users",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-blue-600",onClick:()=>C(!1),prefetch:!1,children:"See all users"}),(0,s.jsx)(N.j,{name:"user-menu",wrapperClassName:"contents",context:{closeDropdown:()=>C(!1)}})]})]})]})]})}),n&&(0,s.jsxs)(s.Fragment,{children:[x&&(0,s.jsx)("div",{className:"fixed top-14 left-0 right-0 bottom-0 bg-black bg-opacity-50 z-40",onClick:m}),(0,s.jsx)("div",{ref:_,className:"fixed top-14 left-0 h-[calc(100vh-56px)] w-64 bg-white border-r border-gray-200 shadow-lg z-50 transform transition-transform duration-300 ease-in-out ".concat(x?"translate-x-0":"-translate-x-full"),children:(0,s.jsx)("nav",{className:"flex-1 overflow-y-auto py-6",children:(0,s.jsxs)("div",{className:"px-4 space-y-1",children:[(0,s.jsxs)(c(),{href:"/clusters",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/clusters")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(d.QT,{className:"w-5 h-5 mr-3"}),"Clusters"]}),(0,s.jsxs)(c(),{href:"/jobs",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/jobs")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(d.Vp,{className:"w-5 h-5 mr-3"}),"Jobs"]}),(0,s.jsxs)(c(),{href:"/volumes",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/volumes")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(d.eU,{className:"w-5 h-5 mr-3"}),"Volumes"]}),(0,s.jsx)("div",{className:"border-t border-gray-200 my-4"}),(0,s.jsxs)(c(),{href:"/recipes",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/recipes")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(h.Z,{className:"w-5 h-5 mr-3"}),"Recipes"]}),(0,s.jsxs)(c(),{href:"/infra",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/infra")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(d.PC,{className:"w-5 h-5 mr-3"}),"Infra"]}),(0,s.jsxs)(c(),{href:"/workspaces",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/workspaces")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(d.E9,{className:"w-5 h-5 mr-3"}),"Workspaces"]}),(0,s.jsxs)(c(),{href:"/users",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/users")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(d.oy,{className:"w-5 h-5 mr-3"}),"Users"]}),(0,s.jsx)("div",{className:"border-t border-gray-200 my-4"}),z.map(e=>R(e)),Object.entries(L).map(e=>{let[t,r]=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"px-4 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wider",children:t}),r.map(e=>R(e))]},t)}),(z.length>0||Object.keys(L).length>0)&&(0,s.jsx)("div",{className:"border-t border-gray-200 my-4"}),(0,s.jsxs)("a",{href:"https://docs.skypilot.co/en/latest/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center px-4 py-3 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-blue-600 rounded-md transition-colors",onClick:m,children:[(0,s.jsx)(d.h0,{className:"w-5 h-5 mr-3"}),"Documentation"]}),(0,s.jsxs)("a",{href:"https://github.com/skypilot-org/skypilot",target:"_blank",rel:"noopener noreferrer",className:"flex items-center px-4 py-3 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-blue-600 rounded-md transition-colors",onClick:m,children:[(0,s.jsx)(d.fy,{className:"w-5 h-5 mr-3"}),"GitHub"]}),(0,s.jsxs)("a",{href:"https://slack.skypilot.co/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center px-4 py-3 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-blue-600 rounded-md transition-colors",onClick:m,children:[(0,s.jsx)(d.mU,{className:"w-5 h-5 mr-3"}),"Slack"]}),(0,s.jsxs)(c(),{href:"/config",className:"flex items-center px-4 py-3 text-sm font-medium rounded-md transition-colors ".concat(W("/config")?"bg-blue-50 text-blue-600":"text-gray-700 hover:bg-gray-100 hover:text-blue-600"),onClick:m,prefetch:!1,children:[(0,s.jsx)(p,{className:"w-5 h-5 mr-3"}),"Configuration"]})]})})})]})]})}},23001:function(e,t,r){r.d(t,{X:function(){return a}});var s=r(67294);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[t,r]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let t=()=>{r(window.innerWidth<e)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),t}},55988:function(e,t,r){r.d(t,{j:function(){return n}});var s=r(85893);r(67294);var a=r(23800);function n(e){let{name:t,context:r={},fallback:n=null,wrapperClassName:l=""}=e,i=(0,a.dL)(t);return 0===i.length?n:(0,s.jsx)("div",{className:l||void 0,children:i.map(e=>{let t=e.component;return(0,s.jsx)(t,{...r},e.id)})})}}}]);