skypilot-nightly 1.0.0.dev20250524__py3-none-any.whl → 1.0.0.dev20250527__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. sky/__init__.py +2 -2
  2. sky/check.py +32 -6
  3. sky/cli.py +17 -24
  4. sky/client/cli.py +17 -24
  5. sky/client/sdk.py +5 -2
  6. sky/clouds/cloud.py +2 -2
  7. sky/clouds/kubernetes.py +10 -5
  8. sky/clouds/service_catalog/kubernetes_catalog.py +4 -0
  9. sky/clouds/ssh.py +24 -8
  10. sky/core.py +20 -2
  11. sky/dashboard/out/404.html +1 -1
  12. sky/dashboard/out/_next/static/D5bjIfl4Ob3SV3LJz3CO0/_buildManifest.js +1 -0
  13. sky/dashboard/out/_next/static/chunks/236-e220ba0c35bf089e.js +6 -0
  14. sky/dashboard/out/_next/static/chunks/{498-d7722313e5e5b4e6.js → 320-afea3ddcc5bd1c6c.js} +1 -16
  15. sky/dashboard/out/_next/static/chunks/470-1d784f5c8750744a.js +1 -0
  16. sky/dashboard/out/_next/static/chunks/578-24f35aa98d38d638.js +6 -0
  17. sky/dashboard/out/_next/static/chunks/627-31b701e69f52db0c.js +1 -0
  18. sky/dashboard/out/_next/static/chunks/843-e35d71cf1c7f706e.js +11 -0
  19. sky/dashboard/out/_next/static/chunks/990-f85643b521f7ca65.js +1 -0
  20. sky/dashboard/out/_next/static/chunks/pages/_app-3985f074c163a856.js +1 -0
  21. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-339b59921ccfe266.js +1 -0
  22. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-e23fcddf60578a0d.js +1 -0
  23. sky/dashboard/out/_next/static/chunks/pages/{clusters-9e6d1ec6e1ac5b29.js → clusters-8afda8efa5b74997.js} +1 -1
  24. sky/dashboard/out/_next/static/chunks/pages/config-72b8c6c2edfd0e39.js +6 -0
  25. sky/dashboard/out/_next/static/chunks/pages/infra-1521baab6992916b.js +1 -0
  26. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-4d913940b4fa6f5a.js +1 -0
  27. sky/dashboard/out/_next/static/chunks/pages/jobs-ff7e8e377d02b651.js +1 -0
  28. sky/dashboard/out/_next/static/chunks/pages/users-9900af52acf8648d.js +1 -0
  29. sky/dashboard/out/_next/static/chunks/pages/workspace/new-63763ffa3edb4508.js +1 -0
  30. sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-3ede7a13caf23375.js +1 -0
  31. sky/dashboard/out/_next/static/chunks/pages/workspaces-72330c4d0fc9a4a2.js +1 -0
  32. sky/dashboard/out/_next/static/css/6a1c0d711a4bdaf1.css +3 -0
  33. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  34. sky/dashboard/out/clusters/[cluster].html +1 -1
  35. sky/dashboard/out/clusters.html +1 -1
  36. sky/dashboard/out/config.html +1 -0
  37. sky/dashboard/out/index.html +1 -1
  38. sky/dashboard/out/infra.html +1 -1
  39. sky/dashboard/out/jobs/[job].html +1 -1
  40. sky/dashboard/out/jobs.html +1 -1
  41. sky/dashboard/out/users.html +1 -1
  42. sky/dashboard/out/workspace/new.html +1 -0
  43. sky/dashboard/out/workspaces/[name].html +1 -0
  44. sky/dashboard/out/workspaces.html +1 -1
  45. sky/global_user_state.py +592 -552
  46. sky/server/constants.py +1 -1
  47. sky/server/requests/payloads.py +33 -3
  48. sky/server/requests/serializers/decoders.py +0 -11
  49. sky/server/server.py +23 -22
  50. sky/setup_files/dependencies.py +1 -0
  51. sky/skypilot_config.py +35 -9
  52. sky/utils/db_utils.py +53 -0
  53. sky/utils/kubernetes/config_map_utils.py +133 -0
  54. sky/utils/kubernetes/deploy_remote_cluster.py +20 -4
  55. sky/utils/kubernetes/exec_kubeconfig_converter.py +19 -0
  56. sky/utils/kubernetes/kubernetes_deploy_utils.py +49 -5
  57. sky/utils/kubernetes/ssh-tunnel.sh +20 -28
  58. sky/utils/schemas.py +57 -5
  59. sky/workspaces/__init__.py +0 -0
  60. sky/workspaces/core.py +431 -0
  61. sky/workspaces/server.py +87 -0
  62. {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/METADATA +2 -1
  63. {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/RECORD +69 -57
  64. {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/WHEEL +1 -1
  65. sky/dashboard/out/_next/static/aHej19bZyl4hoHgrzPCn7/_buildManifest.js +0 -1
  66. sky/dashboard/out/_next/static/chunks/480-ee58038f1a4afd5c.js +0 -1
  67. sky/dashboard/out/_next/static/chunks/578-7a4795009a56430c.js +0 -6
  68. sky/dashboard/out/_next/static/chunks/734-5f5ce8f347b7f417.js +0 -1
  69. sky/dashboard/out/_next/static/chunks/938-f347f6144075b0c8.js +0 -1
  70. sky/dashboard/out/_next/static/chunks/pages/_app-dec800f9ef1b10f4.js +0 -1
  71. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-37c042a356f8e608.js +0 -1
  72. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-9529d9e882a0e75c.js +0 -16
  73. sky/dashboard/out/_next/static/chunks/pages/infra-e690d864aa00e2ea.js +0 -1
  74. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-db6558a5ec687011.js +0 -1
  75. sky/dashboard/out/_next/static/chunks/pages/jobs-73d5e0c369d00346.js +0 -16
  76. sky/dashboard/out/_next/static/chunks/pages/users-2d319455c3f1c3e2.js +0 -1
  77. sky/dashboard/out/_next/static/chunks/pages/workspaces-02a7b60f2ead275f.js +0 -1
  78. sky/dashboard/out/_next/static/css/d2cdba64c9202dd7.css +0 -3
  79. /sky/dashboard/out/_next/static/{aHej19bZyl4hoHgrzPCn7 → D5bjIfl4Ob3SV3LJz3CO0}/_ssgManifest.js +0 -0
  80. /sky/dashboard/out/_next/static/chunks/{573-f17bd89d9f9118b3.js → 573-82bd40a37af834f1.js} +0 -0
  81. {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/entry_points.txt +0 -0
  82. {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/licenses/LICENSE +0 -0
  83. {skypilot_nightly-1.0.0.dev20250524.dist-info → skypilot_nightly-1.0.0.dev20250527.dist-info}/top_level.txt +0 -0
@@ -1,16 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[722],{8706:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/clusters/[cluster]",function(){return t(6996)}])},6521:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let a=(0,t(998).Z)("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]])},3610:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
7
- * @license lucide-react v0.407.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */let a=(0,t(998).Z)("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]])},3293:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});/**
12
- * @license lucide-react v0.407.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */let a=(0,t(998).Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},6996:function(e,s,t){"use strict";t.r(s);var a=t(5893),i=t(7294),l=t(8799),r=t(938),n=t(1163),c=t(9470),d=t(1664),x=t.n(d),h=t(9037),u=t(9307),m=t(7673),o=t(3266),j=t(3626),f=t(6989),v=t(9284),N=t(3001),b=t(9008),y=t.n(b);function p(e){let{clusterData:s,clusterJobData:t,loading:i}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)(m.Zb,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,a.jsx)("div",{className:"text-base mt-1",children:(0,a.jsx)(u.OE,{status:s.status})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Cluster"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.cluster})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.user})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.infra?(0,a.jsx)(f.Md,{content:s.full_infra||s.infra,className:"text-sm text-muted-foreground",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(x(),{href:"/infra",className:"text-blue-600 hover:underline",children:s.cloud||s.infra.split("(")[0].trim()}),s.infra.includes("(")&&(0,a.jsx)("span",{children:" "+s.infra.substring(s.infra.indexOf("("))})]})}):"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.resources_str_full||s.resources_str||"N/A"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Started"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.time?new Date(s.time).toLocaleString():"N/A"})]})]})})]})}),(0,a.jsx)("div",{children:t&&(0,a.jsx)(r.L4,{clusterName:s.cluster,clusterJobData:t,loading:i})})]})}s.default=function(){let e=(0,n.useRouter)(),{cluster:s}=e.query,[t,r]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!0),[m,b]=(0,i.useState)(!1),[g,k]=(0,i.useState)(!1),_=(0,N.X)(),{clusterData:w,clusterJobData:S,loading:M,refreshData:C}=(0,o.QL)({cluster:s});i.useEffect(()=>{!M&&d&&u(!1)},[M,d]);let Z=async()=>{r(!0),await C(),r(!1)};if(!e.isReady)return(0,a.jsx)("div",{children:"Loading..."});let L=s?"Cluster: ".concat(s," | SkyPilot Dashboard"):"Cluster Details | SkyPilot Dashboard";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y(),{children:(0,a.jsx)("title",{children:L})}),(0,a.jsxs)(c.A,{highlighted:"clusters",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,a.jsxs)("div",{className:"text-base flex items-center",children:[(0,a.jsx)(x(),{href:"/clusters",className:"text-sky-blue hover:underline",children:"Sky Clusters"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)(x(),{href:"/clusters/".concat(s),className:"text-sky-blue hover:underline",children:s})]}),(0,a.jsx)("div",{className:"text-sm flex items-center",children:(0,a.jsxs)("div",{className:"text-sm flex items-center",children:[(M||t)&&(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)(l.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),w&&(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsx)(f.WH,{content:"Refresh",className:"text-sm text-muted-foreground",children:(0,a.jsxs)("button",{onClick:Z,disabled:M||t,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,a.jsx)(j.Z,{className:"w-4 h-4 mr-1.5"}),!_&&(0,a.jsx)("span",{children:"Refresh"})]})}),(0,a.jsx)(h.GV,{withLabel:!0,cluster:w.cluster,status:w.status,onOpenSSHModal:()=>{b(!0)},onOpenVSCodeModal:()=>{k(!0)}})]})]})})]}),M&&d?(0,a.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,a.jsx)(l.Z,{size:24,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading..."})]}):w?(0,a.jsx)(p,{clusterData:w,clusterJobData:S,loading:M||t}):null,(0,a.jsx)(v.Oh,{isOpen:m,onClose:()=>b(!1),cluster:s}),(0,a.jsx)(v._R,{isOpen:g,onClose:()=>k(!1),cluster:s})]})]})}}},function(e){e.O(0,[573,488,480,734,938,578,888,774,179],function(){return e(e.s=8706)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[588],{3177:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/infra",function(){return r(1090)}])},3266:function(e,t,r){"use strict";r.d(t,{QL:function(){return d},Sl:function(){return c},zd:function(){return o}});var s=r(7294),a=r(5821),n=r(3225);let l={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function o(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(n.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),s=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),a=await s.json();return(a.return_value?JSON.parse(a.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),s=r+(t-3)%2;return 0===r?e.substring(0,s)+"...":e.substring(0,s)+"..."+e.substring(e.length-r)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function c(e){let{clusterName:t,jobId:r,onNewLog:s,workspace:l}=e;try{let e=(await fetch("".concat(n.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:l||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let a=new TextDecoder().decode(r);s(a)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,a.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(n.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),s=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(s)),l=await a.json();return JSON.parse(l.return_value).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,s=0,a=0;return e.submitted_at&&(s=r-e.submitted_at),e.start_at&&(a=r-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:s,job_duration:a,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function d(e){let{cluster:t,job:r=null}=e,[a,n]=(0,s.useState)(null),[l,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!0),f=(0,s.useCallback)(async()=>{if(t)try{u(!0);let e=await o({clusterNames:[t]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{u(!1)}return null},[t]),x=(0,s.useCallback)(async e=>{if(t)try{h(!0);let r=await i({clusterName:t,workspace:e||"default"});c(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{h(!1)}},[t]),p=(0,s.useCallback)(async()=>{let e=await f();e&&await x(e.workspace)},[f,x]);return(0,s.useEffect)(()=>{(async()=>{let e=await f();e&&await x(e.workspace)})()},[t,r,f,x]),{clusterData:a,clusterJobData:l,loading:d||m,refreshData:p}}},8969:function(e,t,r){"use strict";r.d(t,{Ce:function(){return i},NJ:function(){return c},Pr:function(){return o},Vp:function(){return l}});var s=r(7294),a=r(5821),n=r(3225);async function l(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(n.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),r=await fetch("".concat(n.f4,"/api/get?request_id=").concat(t));if(500===r.status){try{let e=await r.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let s=await r.json();return{jobs:(s.return_value?JSON.parse(s.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let r=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,s=e.cloud,a=e.cluster_resources;if(!s){if(e.cluster_resources&&"-"!==e.cluster_resources)try{s=e.cluster_resources.split("(")[0].split("x").pop().trim(),a=e.cluster_resources.replace("".concat(s,"("),"(").replace("x ","x")}catch(e){s="Unknown"}else s="Unknown"}let n="",l=n=e.zone?e.zone:e.region;n&&n.length>15&&(n=n.substring(0,15)+"...");let o=s+" ("+n+")";"-"===n&&(o=s);let c=s+" ("+l+")";return"-"===l&&(c=s),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:r,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:a,resources_str_full:e.cluster_resources_full||a,cloud:s,infra:o,full_infra:c,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,s.useState)(null),[a,n]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{(async function(){try{n(!0);let e=await l({allUsers:!0});r(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{n(!1)}})()},[e]),{jobData:t,loading:a}}async function c(e){let{jobId:t,controller:r=!1,signal:s,onNewLog:l}=e,o=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),c=(async()=>{try{let e=(await fetch("".concat(n.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:r,follow:!1,job_id:t}),...s?{signal:s}:{}})).body.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;let s=new TextDecoder().decode(r);l(s)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([c,o])).timeout){(0,a.C)("Log request for job ".concat(t," timed out after ").concat(1e4,"ms"),"error");return}}async function i(e,t,r){let s="",l="",o="",c={};if("restartcontroller"===e)s="Restarting",l="restarted",o="jobs/queue",c={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,a.C)("".concat(s," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(n.f4,"/").concat(o),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(n.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,a.C)("Job ".concat(t," ").concat(l," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let l=JSON.parse(e.detail.error);l.type&&l.type===n.Bo?(0,a.C)("".concat(s," job ").concat(t," is not supported!"),"error",1e4):l.type&&l.type===n.mF?(0,a.C)("Cluster ".concat(r," does not exist."),"error"):l.type&&l.type===n.iW?(0,a.C)("Cluster ".concat(r," is not up."),"error"):(0,a.C)("".concat(s," job ").concat(t," failed: ").concat(l.type),"error")}catch(r){(0,a.C)("".concat(s," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,a.C)("".concat(s," job ").concat(t," failed with no details."),"error")}catch(e){(0,a.C)("".concat(s," job ").concat(t," failed with parse error."),"error")}else(0,a.C)("".concat(s," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,a.C)("Network error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,a.C)("Critical error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}},1090:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return P}});var s=r(5893),a=r(7294),n=r(8799),l=r(9470),o=r(3626),c=r(3001),i=r(3225),d=r(3266),u=r(8969);async function m(){try{let[e,t]=await Promise.all([(0,d.zd)(),(0,u.Vp)()]),r=(null==t?void 0:t.jobs)||[],s=[];try{let e=await fetch("".concat(i.f4,"/enabled_clouds"),{method:"GET",headers:{"Content-Type":"application/json"}}),t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),r=await fetch("".concat(i.f4,"/api/get?request_id=").concat(t)),a=await r.json();s=a.return_value?JSON.parse(a.return_value):[],console.log("Enabled clouds:",s)}catch(e){console.error("Error fetching enabled clouds:",e),s=[]}let a={};i.$m.forEach(e=>{let t=s.includes(e);a[e]={name:e,clusters:0,jobs:0,enabled:t}}),(e||[]).forEach(e=>{if(e.cloud){let t=e.cloud;a[t]&&(a[t].clusters+=1,a[t].enabled=!0)}}),r.forEach(e=>{if(e.cloud){let t=e.cloud;a[t]&&(a[t].jobs+=1,a[t].enabled=!0)}});let n=i.$m.length,l=Object.values(a).filter(e=>e.enabled).length;return{clouds:Object.values(a).filter(e=>e.enabled).sort((e,t)=>t.clusters-e.clusters||t.jobs-e.jobs),totalClouds:n,enabledClouds:l}}catch(e){return console.error("Error fetching cloud infrastructure:",e),{clouds:[],totalClouds:i.$m.length,enabledClouds:0}}}async function h(){return await g()}async function f(){try{let e=await fetch("".concat(i.f4,"/realtime_kubernetes_gpu_availability"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:null,name_filter:null,quantity_filter:null})});if(!e.ok)return console.error("Error fetching Kubernetes context GPUs (in getKubernetesContextGPUs): ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for Kubernetes GPU availability (in getKubernetesContextGPUs)"),[];let r=await fetch("".concat(i.f4,"/api/get?request_id=").concat(t)),s=await r.text();if(500===r.status){try{let e=JSON.parse(s);if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("[infra.jsx] getKubernetesContextGPUs: Server error detail:",t.message)}catch(t){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing server error JSON:",t,"Original error text:",e.detail.error)}}catch(e){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing 500 error response JSON:",e,"Raw text was:",s)}return[]}let a=JSON.parse(s);return a.return_value?JSON.parse(a.return_value):[]}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesContextGPUs:",e),[]}}async function x(){try{let e=await fetch("".concat(i.f4,"/all_contexts"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)return console.error("Error fetching all contexts: ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for /all_contexts"),[];let r=await fetch("".concat(i.f4,"/api/get?request_id=").concat(t)),s=await r.json();return s.return_value?JSON.parse(s.return_value):[]}catch(e){return console.error("[infra.jsx] Error in getAllContexts:",e),[]}}async function p(e){try{let t=await fetch("".concat(i.f4,"/kubernetes_node_info"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("x-request-id"),s=await fetch("".concat(i.f4,"/api/get?request_id=").concat(r));if(500===s.status){try{let e=await s.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("Error fetching Kubernetes per node GPUs:",t.message)}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{}}let a=await s.json();return(a.return_value?JSON.parse(a.return_value):{}).node_info_dict||{}}catch(t){return console.error("[infra.jsx] Error in getKubernetesPerNodeGPUs for context",e,":",t),{}}}async function g(){try{let a=await x();if(!a||0===a.length)return console.log("No contexts found from /all_contexts endpoint."),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[]};let n=await f(),l=new Map;n&&n.forEach(e=>{l.set(e[0],e[1])});let o={},c={},i={};for(let n of a){c[n]||(c[n]=[]);let a=l.get(n);if(a&&a.length>0)for(let e of a){let t=e[0],r=e[1].join(", "),s=e[2],a=e[3];t in o?(o[t].gpu_total+=s,o[t].gpu_free+=a):o[t]={gpu_total:s,gpu_free:a,gpu_name:t},c[n].push({gpu_name:t,gpu_requestable_qty_per_node:r,gpu_total:s,gpu_free:a,context:n})}let d=await p(n);if(d&&Object.keys(d).length>0)for(let a in d){var e,t,r,s;let l=d[a],u=l.accelerator_type||"-",m=null!==(r=null===(e=l.total)||void 0===e?void 0:e.accelerator_count)&&void 0!==r?r:0,h=null!==(s=null===(t=l.free)||void 0===t?void 0:t.accelerators_available)&&void 0!==s?s:0;i["".concat(n,"/").concat(a)]={node_name:l.name,gpu_name:u,gpu_total:m,gpu_free:h,context:n},"-"===u||c[n].some(e=>e.gpu_name===u)||(u in o||(o[u]={gpu_total:0,gpu_free:0,gpu_name:u}),c[n].find(e=>e.gpu_name===u)||c[n].push({gpu_name:u,gpu_requestable_qty_per_node:"-",gpu_total:0,gpu_free:0,context:n}))}0===c[n].length&&d&&Object.keys(d).length}return{allContextNames:a.sort(),allGPUs:Object.values(o).sort((e,t)=>e.gpu_name.localeCompare(t.gpu_name)),perContextGPUs:Object.values(c).flat().sort((e,t)=>e.context.localeCompare(t.context)||e.gpu_name.localeCompare(t.gpu_name)),perNodeGPUs:Object.values(i).sort((e,t)=>e.context.localeCompare(t.context)||e.node_name.localeCompare(t.node_name)||e.gpu_name.localeCompare(t.gpu_name))}}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesGPUs:",e),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[]}}}var b=r(1163),j=r(1664),y=r.n(j),_=r(6989);function N(e){let{title:t,isLoading:r,isDataLoaded:a,contexts:l,gpus:o,groupedPerContextGPUs:c,groupedPerNodeGPUs:i,handleContextClick:d,isSSH:u=!1}=e;return r&&!a?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4",children:t}),(0,s.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,s.jsx)(n.Z,{size:24,className:"mr-3"}),(0,s.jsxs)("span",{className:"text-gray-500",children:["Loading ",t,"..."]})]})]})}):a&&0===l.length?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4",children:t}),(0,s.jsxs)("p",{className:"text-sm text-gray-500",children:["No ",t," found or ",t," is not configured."]})]})}):a&&l.length>0?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:t}),(0,s.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[l.length," ",1===l.length?u?"pool":"context":u?"pools":"contexts"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/3",children:u?"Node Pool":"Context"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/6",children:"Nodes"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/3",children:"GPU Types"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/6",children:"#GPUs"})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(l.length>5?"max-h-[250px] overflow-y-auto block":""),children:l.map(e=>{let t=c[e]||[],r=i[e]||[],a=t.reduce((e,t)=>e+(t.gpu_total||0),0),n=Object.keys(t.reduce((e,t)=>(e[t.gpu_name]=(e[t.gpu_name]||0)+(t.gpu_total||0),e),{})).join(", "),l=u?e.replace(/^ssh-/,""):e;return(0,s.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,s.jsx)("td",{className:"p-3",children:(0,s.jsx)(_.Md,{content:l,className:"text-sm text-muted-foreground",children:(0,s.jsx)("span",{className:"text-blue-600 hover:underline cursor-pointer",onClick:()=>d(e),children:l.length>30?"".concat(l.substring(0,Math.floor(13.5)),"...").concat(l.substring(l.length-Math.ceil(13.5))):l})})}),(0,s.jsx)("td",{className:"p-3",children:r.length}),(0,s.jsx)("td",{className:"p-3",children:n||"-"}),(0,s.jsx)("td",{className:"p-3",children:a})]},e)})})]})})}),o.length>0&&(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsxs)("tr",{children:[(0,s.jsxs)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4 whitespace-nowrap",children:["GPU",(0,s.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded-full text-xs font-medium whitespace-nowrap",children:[o.reduce((e,t)=>e+t.gpu_free,0)," ","of"," ",o.reduce((e,t)=>e+t.gpu_total,0)," ","free"]})]}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/4",children:"Requestable"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-1/2",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)("span",{children:"Utilization"})})})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200 ".concat(o.length>5?"max-h-[250px] overflow-y-auto block":""),children:o.map(e=>{let t=e.gpu_total-e.gpu_free,r=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,a=e.gpu_total>0?t/e.gpu_total*100:0,n=c?Object.values(c).flat().filter(t=>t.gpu_name===e.gpu_name&&(u?t.context.startsWith("ssh-"):!t.context.startsWith("ssh-"))).map(e=>e.gpu_requestable_qty_per_node).filter((e,t,r)=>r.indexOf(e)===t).join(", "):"-";return(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"p-3 font-medium w-24 whitespace-nowrap",children:e.gpu_name}),(0,s.jsxs)("td",{className:"p-3 text-xs text-gray-600",children:[n||"-"," / node"]}),(0,s.jsx)("td",{className:"p-3 w-2/3",children:(0,s.jsx)("div",{className:"flex items-center gap-3",children:(0,s.jsxs)("div",{className:"flex-1 bg-gray-100 rounded-md h-5 flex overflow-hidden shadow-sm min-w-[100px] w-full",children:[a>0&&(0,s.jsx)("div",{style:{width:"".concat(a,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs font-medium",children:a>15&&"".concat(t," used")}),r>0&&(0,s.jsx)("div",{style:{width:"".concat(r,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs font-medium",children:r>15&&"".concat(e.gpu_free," free")})]})})})]},e.gpu_name)})})]})})})]})]})}):null}function w(e){let{contextName:t,gpusInContext:r,nodesInContext:a}=e;return t.startsWith("ssh-"),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm h-full",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h4",{className:"text-lg font-semibold mb-4",children:"Available GPUs"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:r.map(e=>{let t=e.gpu_total-e.gpu_free,r=e.gpu_total>0?e.gpu_free/e.gpu_total*100:0,a=e.gpu_total>0?t/e.gpu_total*100:0;return(0,s.jsxs)("div",{className:"p-3 bg-gray-50 rounded-md border border-gray-200 shadow-sm",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1.5 flex-wrap",children:[(0,s.jsxs)("div",{className:"font-medium text-gray-800 text-sm",children:[e.gpu_name,(0,s.jsxs)("span",{className:"text-xs text-gray-500 ml-2",children:["(Requestable: ",e.gpu_requestable_qty_per_node," / node)"]})]}),(0,s.jsxs)("span",{className:"text-xs font-medium",children:[e.gpu_free," free / ",e.gpu_total," total"]})]}),(0,s.jsxs)("div",{className:"w-full bg-gray-100 rounded-md h-4 flex overflow-hidden shadow-sm",children:[a>0&&(0,s.jsx)("div",{style:{width:"".concat(a,"%")},className:"bg-yellow-500 h-full flex items-center justify-center text-white text-xs",children:a>15&&"".concat(t," used")}),r>0&&(0,s.jsx)("div",{style:{width:"".concat(r,"%")},className:"bg-green-700 h-full flex items-center justify-center text-white text-xs",children:r>15&&"".concat(e.gpu_free," free")})]})]},e.gpu_name)})}),a.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h4",{className:"text-lg font-semibold mb-4",children:"Nodes"}),(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-100",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"Node"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600",children:"GPU"}),(0,s.jsx)("th",{className:"p-3 text-right font-medium text-gray-600",children:"Availability"})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:a.map((e,t)=>(0,s.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,s.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.node_name}),(0,s.jsx)("td",{className:"p-3 whitespace-nowrap text-gray-700",children:e.gpu_name}),(0,s.jsx)("td",{className:"p-3 whitespace-nowrap text-right text-gray-700",children:"".concat(e.gpu_free," of ").concat(e.gpu_total," free")})]},"".concat(e.node_name,"-").concat(t)))})]})})]})]})})})}function v(){let[e,t]=(0,a.useState)(!0),[r,i]=(0,a.useState)(!0),[d,u]=(0,a.useState)(!0),f=a.useRef(null),x=(0,c.X)(),[p,g]=(0,a.useState)(!1),[j,_]=(0,a.useState)(!1),v=(0,b.useRouter)(),[C,S]=(0,a.useState)([]),[P,k]=(0,a.useState)([]),[E,O]=(0,a.useState)([]),[q,U]=(0,a.useState)([]),[G,J]=(0,a.useState)([]),[D,T]=(0,a.useState)(0),[I,R]=(0,a.useState)(0),[L,K]=(0,a.useState)(null),X=a.useCallback(async()=>{t(!0),i(!0);try{let{allContextNames:e,allGPUs:t,perContextGPUs:r,perNodeGPUs:s}=await h();S(e||[]),k(t||[]),O(r||[]),U(s||[]),g(!0)}catch(e){console.error("Error fetching Kubernetes data:",e),S([]),k([]),O([]),U([])}finally{t(!1)}try{let e=await m();J((null==e?void 0:e.clouds)||[]),T((null==e?void 0:e.totalClouds)||0),R((null==e?void 0:e.enabledClouds)||0),_(!0)}catch(e){console.error("Error fetching cloud infrastructure data:",e),J([]),T(0),R(0)}finally{i(!1),d&&u(!1)}},[d]);a.useEffect(()=>{f&&(f.current=X)},[f,X]),(0,a.useEffect)(()=>{let e=!0;X();let t=setInterval(()=>{e&&X()},6e4);return()=>{e=!1,clearInterval(t)}},[X]),P.length,P.reduce((e,t)=>e+t.gpu_total,0),P.reduce((e,t)=>e+t.gpu_free,0);let z=a.useMemo(()=>E?E.reduce((e,t)=>{let{context:r}=t;return e[r]||(e[r]=[]),e[r].push(t),e},{}):{},[E]),M=a.useMemo(()=>C.filter(e=>e.startsWith("ssh-")),[C]),A=a.useMemo(()=>C.filter(e=>!e.startsWith("ssh-")),[C]),W=a.useMemo(()=>{if(!E)return[];let e=new Set;return E.forEach(t=>{t.context.startsWith("ssh-")&&e.add(t.gpu_name)}),P.filter(t=>e.has(t.gpu_name))},[P,E]),F=a.useMemo(()=>{if(!E)return[];let e=new Set;return E.forEach(t=>{t.context.startsWith("ssh-")||e.add(t.gpu_name)}),P.filter(t=>e.has(t.gpu_name))},[P,E]),Z=a.useMemo(()=>q?q.reduce((e,t)=>{let{context:r}=t;return e[r]||(e[r]=[]),e[r].push(t),e},{}):{},[q]);(0,a.useEffect)(()=>{v.query.context&&K(decodeURIComponent(Array.isArray(v.query.context)?v.query.context[0]:v.query.context))},[v.isReady,v.query]);let H=e=>{K(e),v.replace({pathname:"/infra",query:e?{context:e}:void 0},e?"/infra/".concat(encodeURIComponent(e)):"/infra",{shallow:!0})},$=()=>{K(null),v.replace({pathname:"/infra"},"/infra",{shallow:!0})};(0,a.useEffect)(()=>{let e=e=>{let t=e.match(/\/infra\/([^\/]+)$/);t?K(decodeURIComponent(t[1])):"/infra"===e&&K(null)};return v.events.on("routeChangeComplete",e),()=>{v.events.off("routeChangeComplete",e)}},[v.events]);let V=e||r;return(0,s.jsxs)(l.A,{highlighted:"infra",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsxs)("div",{className:"text-base flex items-center",children:[(0,s.jsx)(y(),{href:"/infra",className:"text-sky-blue hover:underline ".concat(L?"":"cursor-default"),onClick:e=>{L&&(e.preventDefault(),$())},children:"Infrastructure"}),L&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),L.startsWith("ssh-")?(0,s.jsx)("span",{className:"text-sky-blue hover:underline cursor-pointer",onClick:e=>{e.preventDefault(),$()},children:"SSH Node Pool"}):(0,s.jsx)("span",{className:"text-sky-blue hover:underline cursor-pointer",onClick:e=>{e.preventDefault(),$()},children:"Kubernetes"}),(0,s.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,s.jsx)("span",{className:"text-sky-blue",children:L.startsWith("ssh-")?L.replace(/^ssh-/,""):L})]})]}),(0,s.jsxs)("div",{className:"flex items-center",children:[V&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(n.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,s.jsxs)("button",{onClick:()=>{f.current&&(u(!1),f.current())},disabled:V,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,s.jsx)(o.Z,{className:"h-4 w-4 mr-1.5"}),!x&&"Refresh"]})]})]}),L?e&&!p?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,s.jsx)(n.Z,{size:32,className:"mb-4"}),(0,s.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]}):(t=>{let r=z[t]||[],a=Z[t]||[];return e&&!p?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,s.jsx)(n.Z,{size:32,className:"mb-4"}),(0,s.jsx)("span",{className:"text-gray-500 text-lg",children:"Loading Context..."})]}):(0,s.jsx)(w,{contextName:t,gpusInContext:r,nodesInContext:a})})(L):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N,{title:"SSH Node Pool",isLoading:e,isDataLoaded:p,contexts:M,gpus:W,groupedPerContextGPUs:z,groupedPerNodeGPUs:Z,handleContextClick:H,isSSH:!0}),(0,s.jsx)(N,{title:"Kubernetes",isLoading:e,isDataLoaded:p,contexts:A,gpus:F,groupedPerContextGPUs:z,groupedPerNodeGPUs:Z,handleContextClick:H,isSSH:!1}),r&&!j?(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Cloud"}),(0,s.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,s.jsx)(n.Z,{size:24,className:"mr-3"}),(0,s.jsx)("span",{className:"text-gray-500",children:"Loading Cloud..."})]})]})}):(0,s.jsx)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm mb-6",children:(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsxs)("div",{className:"flex items-center mb-4",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:"Cloud"}),(0,s.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:[I," of ",D," enabled"]})]}),0===G.length?(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"No enabled clouds available."}):(0,s.jsx)("div",{className:"overflow-x-auto rounded-md border border-gray-200 shadow-sm bg-white",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-32",children:"Cloud"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Clusters"}),(0,s.jsx)("th",{className:"p-3 text-left font-medium text-gray-600 w-24",children:"Jobs"})]})}),(0,s.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:G.map(e=>(0,s.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,s.jsx)("td",{className:"p-3 font-medium text-gray-700",children:e.name}),(0,s.jsx)("td",{className:"p-3",children:e.clusters>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusters}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,s.jsx)("td",{className:"p-3",children:e.jobs>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobs}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.name))})]})})]})})]})]})}var C=r(9008),S=r.n(C);function P(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S(),{children:(0,s.jsx)("title",{children:"Infra | SkyPilot Dashboard"})}),(0,s.jsx)(v,{})]})}},9008:function(e,t,r){e.exports=r(7219)}},function(e){e.O(0,[573,480,888,774,179],function(){return e(e.s=3177)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[315],{479:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/[job]",function(){return s(8099)}])},9307:function(e,t,s){"use strict";s.d(t,{Cl:function(){return o},OE:function(){return d}});var r=s(5893);s(7294);var a=s(8799),n=s(6989),c=s(3850);let o=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},l=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(a.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(c.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(c.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(c.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(c.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(c.J$,{className:"w-3 h-3 mr-1"})}},i=e=>{let t=o(e),s=l(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(t),children:[s,e]})},d=e=>{let{status:t}=e;return(0,r.jsx)(n.WH,{content:t,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:i(t)})})}},7673:function(e,t,s){"use strict";s.d(t,{Ol:function(){return i},Zb:function(){return l},aY:function(){return m},eW:function(){return f},ll:function(){return d}});var r=s(5893),a=s(7294),n=s(5697),c=s.n(n),o=s(2350);let l=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...n,children:a})});l.displayName="Card",l.propTypes={className:c().string,children:c().node};let i=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",s),...n,children:a})});i.displayName="CardHeader",i.propTypes={className:c().string,children:c().node};let d=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("h3",{ref:t,className:(0,o.cn)("text-2xl font-semibold leading-none tracking-tight",s),...n,children:a})});d.displayName="CardTitle",d.propTypes={className:c().string,children:c().node};let u=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("p",{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",s),...n,children:a})});u.displayName="CardDescription",u.propTypes={className:c().string,children:c().node};let m=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("p-6 pt-0",s),...n,children:a})});m.displayName="CardContent",m.propTypes={className:c().string,children:c().node};let f=a.forwardRef((e,t)=>{let{className:s,children:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("flex items-center p-6 pt-0",s),...n,children:a})});f.displayName="CardFooter",f.propTypes={className:c().string,children:c().node}},8969:function(e,t,s){"use strict";s.d(t,{Ce:function(){return i},NJ:function(){return l},Pr:function(){return o},Vp:function(){return c}});var r=s(7294),a=s(5821),n=s(3225);async function c(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(n.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),s=await fetch("".concat(n.f4,"/api/get?request_id=").concat(t));if(500===s.status){try{let e=await s.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let r=await s.json();return{jobs:(r.return_value?JSON.parse(r.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let s=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,r=e.cloud,a=e.cluster_resources;if(!r){if(e.cluster_resources&&"-"!==e.cluster_resources)try{r=e.cluster_resources.split("(")[0].split("x").pop().trim(),a=e.cluster_resources.replace("".concat(r,"("),"(").replace("x ","x")}catch(e){r="Unknown"}else r="Unknown"}let n="",c=n=e.zone?e.zone:e.region;n&&n.length>15&&(n=n.substring(0,15)+"...");let o=r+" ("+n+")";"-"===n&&(o=r);let l=r+" ("+c+")";return"-"===c&&(l=r),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:s,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:a,resources_str_full:e.cluster_resources_full||a,cloud:r,infra:o,full_infra:l,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,s]=(0,r.useState)(null),[a,n]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async function(){try{n(!0);let e=await c({allUsers:!0});s(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{n(!1)}})()},[e]),{jobData:t,loading:a}}async function l(e){let{jobId:t,controller:s=!1,signal:r,onNewLog:c}=e,o=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),l=(async()=>{try{let e=(await fetch("".concat(n.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:s,follow:!1,job_id:t}),...r?{signal:r}:{}})).body.getReader();try{for(;;){let{done:t,value:s}=await e.read();if(t)break;let r=new TextDecoder().decode(s);c(r)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([l,o])).timeout){(0,a.C)("Log request for job ".concat(t," timed out after ").concat(1e4,"ms"),"error");return}}async function i(e,t,s){let r="",c="",o="",l={};if("restartcontroller"===e)r="Restarting",c="restarted",o="jobs/queue",l={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,a.C)("".concat(r," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(n.f4,"/").concat(o),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(n.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,a.C)("Job ".concat(t," ").concat(c," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let c=JSON.parse(e.detail.error);c.type&&c.type===n.Bo?(0,a.C)("".concat(r," job ").concat(t," is not supported!"),"error",1e4):c.type&&c.type===n.mF?(0,a.C)("Cluster ".concat(s," does not exist."),"error"):c.type&&c.type===n.iW?(0,a.C)("Cluster ".concat(s," is not up."),"error"):(0,a.C)("".concat(r," job ").concat(t," failed: ").concat(c.type),"error")}catch(s){(0,a.C)("".concat(r," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,a.C)("".concat(r," job ").concat(t," failed with no details."),"error")}catch(e){(0,a.C)("".concat(r," job ").concat(t," failed with parse error."),"error")}else(0,a.C)("".concat(r," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,a.C)("Network error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,a.C)("Critical error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}},8099:function(e,t,s){"use strict";s.r(t);var r=s(5893),a=s(7294),n=s(8799),c=s(1163),o=s(9470),l=s(7673),i=s(8969),d=s(1664),u=s.n(d),m=s(3626),f=s(6989),x=s(9307),h=s(3001),g=s(9008),j=s.n(g);function N(e){let{jobData:t,activeTab:s,setIsLoadingLogs:c,setIsLoadingControllerLogs:o,isLoadingLogs:l,isLoadingControllerLogs:d}=e,[m,h]=(0,a.useState)([]),[g,j]=(0,a.useState)([]),N=["PENDING","SUBMITTED","STARTING"].includes(t.status),b=["PENDING","SUBMITTED"].includes(t.status),p=["RECOVERING"].includes(t.status);(0,a.useEffect)(()=>{h([])},[s,t.id]),(0,a.useEffect)(()=>{j([])},[s,t.id]);let y=(0,a.useCallback)((e,t,r,a)=>{let n=!0,c=new AbortController;return"logs"===e&&(N||p)||"controllerlogs"===e&&b?(a(!1),()=>{}):(s===e&&t&&(a(!0),(0,i.NJ)({jobId:t,controller:"controllerlogs"===e,signal:c.signal,onNewLog:e=>{if(n){let t=(0,f.q8)(e);r(e=>[...e,t])}}}).then(()=>{n&&a(!1)}).catch(t=>{n&&("AbortError"!==t.name&&(console.error("Error streaming ".concat(e,":"),t),t.message&&r(e=>[...e,"Error fetching logs: ".concat(t.message)])),a(!1))})),()=>{n=!1})},[s,N,b,p]);return((0,a.useEffect)(()=>y("logs",t.id,h,c),[s,t.id,y,c]),(0,a.useEffect)(()=>y("controllerlogs",t.id,j,o),[s,t.id,y,o]),"logs"===s)?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",children:N?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):p?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to recover, please refresh after a while"})}):l?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(n.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsx)(f.$B,{logs:m.join("")})}):"controllerlogs"===s?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",children:b?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job controller process to start, please refresh after a while"})}):d?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(n.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsx)(f.$B,{logs:g.join(""),controller:!0})}):(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID (Name)"}),(0,r.jsxs)("div",{className:"text-base mt-1",children:[t.id," ",t.name?"(".concat(t.name,")"):""]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,r.jsx)("div",{className:"text-base mt-1",children:(0,r.jsx)(x.OE,{status:t.status})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.user})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.requested_resources||"N/A"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.infra?(0,r.jsx)(f.Md,{content:t.full_infra||t.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(u(),{href:"/infra",className:"text-blue-600 hover:underline",children:t.cloud||t.infra.split("(")[0].trim()}),t.infra.includes("(")&&(0,r.jsx)("span",{children:" "+t.infra.substring(t.infra.indexOf("("))})]})}):"-"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:t.resources_str_full||t.resources_str||"-"})]})]})}t.default=function(){var e;let t=(0,c.useRouter)(),{job:s,tab:d}=t.query,[x,g]=(0,a.useState)(0),{jobData:b,loading:p}=(0,i.Pr)(x),[y,v]=(0,a.useState)(!1),[E,_]=(0,a.useState)(!0),[w,C]=(0,a.useState)(!1),[L,S]=(0,a.useState)(!1),[I,D]=(0,a.useState)(!1),[T,R]=(0,a.useState)(!1),[k,O]=(0,a.useState)(!1),[A,P]=(0,a.useState)(0),[J,U]=(0,a.useState)(0),G=(0,h.X)();a.useEffect(()=>{!p&&E&&_(!1)},[p,E]);let F=e=>{let t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"})};(0,a.useEffect)(()=>{R(!0)},[]),(0,a.useEffect)(()=>{if(!k){let e=new MutationObserver(()=>{let t=document.getElementById("logs-section"),s=document.getElementById("controller-logs-section");("logs"===d&&t||"controllerlogs"===d&&s)&&(O(!0),e.disconnect())});return e.observe(document.body,{childList:!0,subtree:!0}),()=>e.disconnect()}},[k,d]),(0,a.useEffect)(()=>{if(t.isReady&&T&&k&&!I){let e=setTimeout(()=>{"logs"===d?(F("logs-section"),D(!0)):"controllerlogs"===d&&(F("controller-logs-section"),D(!0))},800);return()=>clearTimeout(e)}},[t.isReady,d,I,T,k]),(0,a.useEffect)(()=>{D(!1),O(!1)},[d]);let q=async()=>{v(!0);try{g(e=>e+1),P(e=>e+1),U(e=>e+1)}catch(e){console.error("Error refreshing data:",e)}finally{v(!1)}};if(!t.isReady)return(0,r.jsx)("div",{children:"Loading..."});let Z=null==b?void 0:null===(e=b.jobs)||void 0===e?void 0:e.find(e=>String(e.id)===String(s)),W=s?"Job: ".concat(s," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j(),{children:(0,r.jsx)("title",{children:W})}),(0,r.jsxs)(o.A,{highlighted:"managed-jobs",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(u(),{href:"/jobs",className:"text-sky-blue hover:underline",children:"Managed Jobs"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsxs)(u(),{href:"/jobs/".concat(s),className:"text-sky-blue hover:underline",children:[s," ",(null==Z?void 0:Z.name)?"(".concat(Z.name,")"):""]})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[(p||y||w||L)&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(n.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(f.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:q,disabled:p||y,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!G&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]}),p&&E?(0,r.jsxs)("div",{className:"flex items-center justify-center py-32",children:[(0,r.jsx)(n.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):Z?(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details-section",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(N,{jobData:Z,activeTab:"info",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:L})})]})}),(0,r.jsx)("div",{id:"logs-section",className:"mt-6",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(f.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{P(e=>e+1)},disabled:w,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(w?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(N,{jobData:Z,activeTab:"logs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:L},A)})]})}),(0,r.jsx)("div",{id:"controller-logs-section",className:"mt-6",children:(0,r.jsxs)(l.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Controller Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(f.WH,{content:"Refresh controller logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{U(e=>e+1)},disabled:L,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(L?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(N,{jobData:Z,activeTab:"controllerlogs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:L},J)})]})})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-32",children:(0,r.jsx)("span",{children:"Job not found"})})]})]})}},9008:function(e,t,s){e.exports=s(7219)}},function(e){e.O(0,[573,480,888,774,179],function(){return e(e.s=479)}),_N_E=e.O()}]);
@@ -1,16 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[142],{1446:function(t,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs",function(){return e(8929)}])},6521:function(t,n,e){"use strict";e.d(n,{Z:function(){return r}});/**
2
- * @license lucide-react v0.407.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */let r=(0,e(998).Z)("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]])},3610:function(t,n,e){"use strict";e.d(n,{Z:function(){return r}});/**
7
- * @license lucide-react v0.407.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */let r=(0,e(998).Z)("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]])},3293:function(t,n,e){"use strict";e.d(n,{Z:function(){return r}});/**
12
- * @license lucide-react v0.407.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */let r=(0,e(998).Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},8929:function(t,n,e){"use strict";e.r(n),e.d(n,{default:function(){return h}});var r=e(5893),i=e(9008),c=e.n(i),a=e(938);function h(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c(),{children:(0,r.jsx)("title",{children:"Managed Jobs | SkyPilot Dashboard"})}),(0,r.jsx)(a.Nk,{})]})}},9008:function(t,n,e){t.exports=e(7219)}},function(t){t.O(0,[573,488,480,734,938,888,774,179],function(){return t(t.s=1446)}),_N_E=t.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[892],{7476:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/users",function(){return r(7823)}])},803:function(e,t,r){"use strict";r.d(t,{z:function(){return i}});var s=r(5893),n=r(7294),a=r(8426),o=r(2003),c=r(2350);let l=(0,o.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),i=n.forwardRef((e,t)=>{let{className:r,variant:n,size:o,asChild:i=!1,...u}=e,d=i?a.g7:"button";return(0,s.jsx)(d,{className:(0,c.cn)(l({variant:n,size:o,className:r})),ref:t,...u})});i.displayName="Button"},7673:function(e,t,r){"use strict";r.d(t,{Ol:function(){return i},Zb:function(){return l},aY:function(){return f},eW:function(){return m},ll:function(){return u}});var s=r(5893),n=r(7294),a=r(5697),o=r.n(a),c=r(2350);let l=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...a,children:n})});l.displayName="Card",l.propTypes={className:o().string,children:o().node};let i=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",r),...a,children:n})});i.displayName="CardHeader",i.propTypes={className:o().string,children:o().node};let u=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("h3",{ref:t,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",r),...a,children:n})});u.displayName="CardTitle",u.propTypes={className:o().string,children:o().node};let d=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("p",{ref:t,className:(0,c.cn)("text-sm text-muted-foreground",r),...a,children:n})});d.displayName="CardDescription",d.propTypes={className:o().string,children:o().node};let f=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,c.cn)("p-6 pt-0",r),...a,children:n})});f.displayName="CardContent",f.propTypes={className:o().string,children:o().node};let m=n.forwardRef((e,t)=>{let{className:r,children:n,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,c.cn)("flex items-center p-6 pt-0",r),...a,children:n})});m.displayName="CardFooter",m.propTypes={className:o().string,children:o().node}},8764:function(e,t,r){"use strict";r.d(t,{RM:function(){return l},SC:function(){return i},iA:function(){return o},pj:function(){return d},ss:function(){return u},xD:function(){return c}});var s=r(5893),n=r(7294),a=r(2350);let o=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("div",{className:"relative w-full overflow-auto",children:(0,s.jsx)("table",{ref:t,className:(0,a.cn)("w-full caption-bottom text-base",r),...n})})});o.displayName="Table";let c=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("thead",{ref:t,className:(0,a.cn)("[&_tr]:border-b",r),...n})});c.displayName="TableHeader";let l=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("tbody",{ref:t,className:(0,a.cn)("[&_tr:last-child]:border-0",r),...n})});l.displayName="TableBody",n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("tfoot",{ref:t,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",r),...n})}).displayName="TableFooter";let i=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("tr",{ref:t,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...n})});i.displayName="TableRow";let u=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("th",{ref:t,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",r),...n})});u.displayName="TableHead";let d=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("td",{ref:t,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...n})});d.displayName="TableCell",n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("caption",{ref:t,className:(0,a.cn)("mt-4 text-base text-muted-foreground",r),...n})}).displayName="TableCaption"},3266:function(e,t,r){"use strict";r.d(t,{QL:function(){return u},Sl:function(){return l},zd:function(){return c}});var s=r(7294),n=r(5821),a=r(3225);let o={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=await fetch("".concat(a.f4,"/status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_names:e,all_users:!0})}),r=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("X-Request-ID"),s=await fetch("".concat(a.f4,"/api/get?request_id=").concat(r)),n=await s.json();return(n.return_value?JSON.parse(n.return_value):[]).map(e=>{let t="",r=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let r=Math.floor((t-3)/2),s=r+(t-3)%2;return 0===r?e.substring(0,s)+"...":e.substring(0,s)+"..."+e.substring(e.length-r)}(t,25)),{status:o[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:r?"".concat(e.cloud," (").concat(r,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,jobs:[],events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function l(e){let{clusterName:t,jobId:r,onNewLog:s,workspace:o}=e;try{let e=(await fetch("".concat(a.f4,"/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow:!1,cluster_name:t,job_id:r,override_skypilot_config:{active_workspace:o||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let n=new TextDecoder().decode(r);s(n)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,n.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function i(e){let{clusterName:t,workspace:r}=e;try{let e=await fetch("".concat(a.f4,"/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:r}})}),s=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),n=await fetch("".concat(a.f4,"/api/get?request_id=").concat(s)),o=await n.json();return JSON.parse(o.return_value).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,s=0,n=0;return e.submitted_at&&(s=r-e.submitted_at),e.start_at&&(n=r-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:s,job_duration:n,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function u(e){let{cluster:t,job:r=null}=e,[n,a]=(0,s.useState)(null),[o,l]=(0,s.useState)(null),[u,d]=(0,s.useState)(!0),[f,m]=(0,s.useState)(!0),p=(0,s.useCallback)(async()=>{if(t)try{d(!0);let e=await c({clusterNames:[t]});return a(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{d(!1)}return null},[t]),h=(0,s.useCallback)(async e=>{if(t)try{m(!0);let r=await i({clusterName:t,workspace:e||"default"});l(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{m(!1)}},[t]),b=(0,s.useCallback)(async()=>{let e=await p();e&&await h(e.workspace)},[p,h]);return(0,s.useEffect)(()=>{(async()=>{let e=await p();e&&await h(e.workspace)})()},[t,r,p,h]),{clusterData:n,clusterJobData:o,loading:u||f,refreshData:b}}},8969:function(e,t,r){"use strict";r.d(t,{Ce:function(){return i},NJ:function(){return l},Pr:function(){return c},Vp:function(){return o}});var s=r(7294),n=r(5821),a=r(3225);async function o(){let{allUsers:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t=(await fetch("".concat(a.f4,"/jobs/queue"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({all_users:e})})).headers.get("X-Skypilot-Request-ID"),r=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t));if(500===r.status){try{let e=await r.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===a.iW)return{jobs:[],controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],controllerStopped:!1}}let s=await r.json();return{jobs:(s.return_value?JSON.parse(s.return_value):[]).map(e=>{let t=[];e.submitted_at&&t.push({time:new Date(1e3*e.submitted_at),event:"Job submitted."}),e.start_at&&t.push({time:new Date(1e3*e.start_at),event:"Job started."}),e.end_at&&("CANCELLING"==e.status||"CANCELLED"==e.status?t.push({time:new Date(1e3*e.end_at),event:"Job cancelled."}):t.push({time:new Date(1e3*e.end_at),event:"Job completed."})),e.last_recovered_at&&e.last_recovered_at!=e.start_at&&t.push({time:new Date(1e3*e.last_recovered_at),event:"Job recovered."});let r=(e.end_at?e.end_at:Date.now()/1e3)-e.submitted_at,s=e.cloud,n=e.cluster_resources;if(!s){if(e.cluster_resources&&"-"!==e.cluster_resources)try{s=e.cluster_resources.split("(")[0].split("x").pop().trim(),n=e.cluster_resources.replace("".concat(s,"("),"(").replace("x ","x")}catch(e){s="Unknown"}else s="Unknown"}let a="",o=a=e.zone?e.zone:e.region;a&&a.length>15&&(a=a.substring(0,15)+"...");let c=s+" ("+a+")";"-"===a&&(c=s);let l=s+" ("+o+")";return"-"===o&&(l=s),{id:e.job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:r,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:n,resources_str_full:e.cluster_resources_full||n,cloud:s,infra:c,full_infra:l,recoveries:e.recovery_count,details:e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:t}}),controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],controllerStopped:!1}}}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,s.useState)(null),[n,a]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{(async function(){try{a(!0);let e=await o({allUsers:!0});r(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{a(!1)}})()},[e]),{jobData:t,loading:n}}async function l(e){let{jobId:t,controller:r=!1,signal:s,onNewLog:o}=e,c=new Promise(e=>{setTimeout(()=>{e({timeout:!0})},1e4)}),l=(async()=>{try{let e=(await fetch("".concat(a.f4,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:r,follow:!1,job_id:t}),...s?{signal:s}:{}})).body.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;let s=new TextDecoder().decode(r);o(s)}}finally{e.cancel()}return{timeout:!1}}catch(e){if("AbortError"===e.name)return{timeout:!1};throw e}})();if((await Promise.race([l,c])).timeout){(0,n.C)("Log request for job ".concat(t," timed out after ").concat(1e4,"ms"),"error");return}}async function i(e,t,r){let s="",o="",c="",l={};if("restartcontroller"===e)s="Restarting",o="restarted",c="jobs/queue",l={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,n.C)("".concat(s," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(a.f4,"/").concat(c),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(a.f4,"/api/get?request_id=").concat(e));if(200===i.status)(0,n.C)("Job ".concat(t," ").concat(o," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let o=JSON.parse(e.detail.error);o.type&&o.type===a.Bo?(0,n.C)("".concat(s," job ").concat(t," is not supported!"),"error",1e4):o.type&&o.type===a.mF?(0,n.C)("Cluster ".concat(r," does not exist."),"error"):o.type&&o.type===a.iW?(0,n.C)("Cluster ".concat(r," is not up."),"error"):(0,n.C)("".concat(s," job ").concat(t," failed: ").concat(o.type),"error")}catch(r){(0,n.C)("".concat(s," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,n.C)("".concat(s," job ").concat(t," failed with no details."),"error")}catch(e){(0,n.C)("".concat(s," job ").concat(t," failed with parse error."),"error")}else(0,n.C)("".concat(s," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,n.C)("Network error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,n.C)("Critical error ".concat(s," job ").concat(t,": ").concat(e.message),"error")}}},4545:function(e,t,r){"use strict";function s(e){return e.startsWith("sky-jobs-controller-")}function n(e,t,r){return null===t?e:[...e].sort((e,s)=>e[t]<s[t]?"ascending"===r?-1:1:e[t]>s[t]?"ascending"===r?1:-1:0)}r.d(t,{R0:function(){return n},Ym:function(){return s}})},7823:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return C}});var s=r(5893),n=r(7294),a=r(9008),o=r.n(a),c=r(8799),l=r(1664),i=r.n(l),u=r(803),d=r(8764),f=r(3225);async function m(){try{let e=await fetch("".concat(f.f4,"/users"));if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return(await e.json()).map(e=>({userId:e.id,username:e.name}))||[]}catch(e){return console.error("Failed to fetch users:",e),[]}}var p=r(3266),h=r(8969),b=r(4545),y=r(3626),g=r(9470),x=r(3001),j=r(7673);let _=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",w=e=>e&&e.includes("@")?e:"-";function N(){let[e,t]=(0,n.useState)(!1),r=(0,n.useRef)(null),a=(0,x.X)();return(0,s.jsxs)(g.A,{highlighted:"users",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,s.jsx)("div",{className:"text-base",children:(0,s.jsx)(i(),{href:"/users",className:"text-sky-blue hover:underline leading-none",children:"Users"})}),(0,s.jsxs)("div",{className:"flex items-center",children:[e&&(0,s.jsxs)("div",{className:"flex items-center mr-2",children:[(0,s.jsx)(c.Z,{size:15,className:"mt-0"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,s.jsxs)(u.z,{variant:"ghost",onClick:()=>{r.current&&r.current()},disabled:e,className:"text-sky-blue hover:text-sky-blue-bright flex items-center px-3 py-1.5 text-sm",children:[(0,s.jsx)(y.Z,{className:"h-4 w-4 mr-1.5"}),!a&&(0,s.jsx)("span",{children:"Refresh"})]})]})]}),(0,s.jsx)(v,{refreshInterval:3e4,setLoading:t,refreshDataRef:r})]})}function v(e){let{refreshInterval:t,setLoading:r,refreshDataRef:a}=e,[o,l]=(0,n.useState)([]),[i,u]=(0,n.useState)(!0),[f,y]=(0,n.useState)({key:"username",direction:"ascending"}),g=(0,n.useCallback)(async()=>{r&&r(!0),u(!0);try{let[e,t,r]=await Promise.all([m(),(0,p.zd)(),(0,h.Vp)()]),s=r.jobs||[],n=(e||[]).map(e=>{let r=(t||[]).filter(t=>t.user_hash===e.userId),n=(s||[]).filter(t=>t.user_hash===e.userId);return{...e,usernameDisplay:_(e.username),fullEmail:w(e.username),clusterCount:r.length,jobCount:n.length}});l(n)}catch(e){console.error("Failed to fetch or process user data:",e),l([])}r&&r(!1),u(!1)},[r]);(0,n.useEffect)(()=>{a&&(a.current=g)},[a,g]),(0,n.useEffect)(()=>{g();let e=setInterval(g,t);return()=>clearInterval(e)},[g,t]);let x=(0,n.useMemo)(()=>(0,b.R0)(o,f.key,f.direction),[o,f]),N=e=>{let t="ascending";f.key===e&&"ascending"===f.direction&&(t="descending"),y({key:e,direction:t})},v=e=>f.key===e?"ascending"===f.direction?" ↑":" ↓":"";return i&&0===o.length?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(c.Z,{})}):x&&0!==x.length?(0,s.jsx)(j.Zb,{children:(0,s.jsxs)(d.iA,{children:[(0,s.jsx)(d.xD,{children:(0,s.jsxs)(d.SC,{children:[(0,s.jsxs)(d.ss,{onClick:()=>N("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Name",v("usernameDisplay")]}),(0,s.jsxs)(d.ss,{onClick:()=>N("fullEmail"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Email",v("fullEmail")]}),(0,s.jsxs)(d.ss,{onClick:()=>N("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Clusters",v("clusterCount")]}),(0,s.jsxs)(d.ss,{onClick:()=>N("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/4",children:["Jobs",v("jobCount")]})]})}),(0,s.jsx)(d.RM,{children:x.map(e=>(0,s.jsxs)(d.SC,{children:[(0,s.jsx)(d.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,s.jsx)(d.pj,{className:"truncate",title:e.fullEmail,children:e.fullEmail}),(0,s.jsx)(d.pj,{children:e.clusterCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs font-medium",children:e.clusterCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})}),(0,s.jsx)(d.pj,{children:e.jobCount>0?(0,s.jsx)("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs font-medium",children:e.jobCount}):(0,s.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs font-medium",children:"0"})})]},e.userId))})]})}):(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:"No users found."}),(0,s.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:"There are currently no users to display."})]})}function C(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o(),{children:(0,s.jsx)("title",{children:"Users | SkyPilot Dashboard"})}),(0,s.jsx)(N,{})]})}},9008:function(e,t,r){e.exports=r(7219)},2003:function(e,t,r){"use strict";r.d(t,{j:function(){return o}});var s=r(512);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.W,o=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:o,defaultVariants:c}=t,l=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],s=null==c?void 0:c[e];if(null===t)return null;let a=n(t)||n(s);return o[e][a]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return a(e,l,null==t?void 0:null===(s=t.compoundVariants)||void 0===s?void 0:s.reduce((e,t)=>{let{class:r,className:s,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...c,...i}[t]):({...c,...i})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},function(e){e.O(0,[573,480,888,774,179],function(){return e(e.s=7476)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{2592:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspaces",function(){return a(9434)}])},9434:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return y}});var l=a(5893),t=a(7294),n=a(9470),r=a(1163),c=a(3266),i=a(8969),o=a(7324),d=a(7673),x=a(803),m=a(8799),u=a(3320),h=a.n(u),p=a(326),f=a(3850),g=a(3626),j=a(3001),N=a(938);function b(){let[e,s]=(0,t.useState)([]),[a,n]=(0,t.useState)(0),[u,b]=(0,t.useState)(0),[y,k]=(0,t.useState)(0),[w,C]=(0,t.useState)(0),[v,E]=(0,t.useState)(!0);(0,r.useRouter)();let[S,_]=(0,t.useState)(!1),[W,O]=(0,t.useState)(null),[R,z]=(0,t.useState)(""),[D,T]=(0,t.useState)(null),[A,J]=(0,t.useState)(!1),V=(0,j.X)(),Z=async()=>{E(!0);try{let[e,a,l]=await Promise.all([(0,o.f)(),(0,c.zd)(),(0,i.Vp)()]);console.log("[Workspaces Debug] Raw fetchedWorkspacesConfig:",e),T(e);let t=Object.keys(e);console.log("[Workspaces Debug] configuredWorkspaceNames:",t);let r=t.map(e=>(0,o.y)(e)),d=await Promise.all(r),x={};t.forEach((e,s)=>{x[e]=d[s]}),console.log("[Workspaces Debug] Enabled clouds by workspace:",x);let m={};a.forEach(e=>{m[e.cluster]=e.workspace||"default"});let u=0,h={};t.length>0&&t.forEach(e=>{h[e]={name:e,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set,hourlyCost:0}}),a.forEach(e=>{let s=e.workspace||"default";t.length>0&&h[s],h[s]||(h[s]={name:s,totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:new Set,hourlyCost:0}),h[s].totalClusterCount++,("RUNNING"===e.status||"LAUNCHING"===e.status)&&(h[s].runningClusterCount++,u++),e.cloud&&h[s].clouds.add(e.cloud)}),b(a.length),n(u);let p=l.jobs||[],f=new Set(N.x2.active),g=0;p.forEach(e=>{let s=e.cluster_name||e.resources&&e.resources.cluster_name;if(s){let a=m[s];a&&h[a]&&f.has(e.status)&&h[a].managedJobsCount++}f.has(e.status)&&g++}),k(g);let j=Object.values(h).map(e=>{let s=x[e.name]||[];return{...e,clouds:Array.isArray(s)?s.sort():[]}});t.length>0&&(j=j.filter(e=>t.includes(e.name))),j.sort((e,s)=>e.name.localeCompare(s.name)),console.log("[Workspaces Debug] finalWorkspaceDetails before setting state:",j),s(j)}catch(e){console.error("Error fetching comprehensive workspace data:",e),s([]),n(0),b(0),k(0)}E(!1)};(0,t.useEffect)(()=>{Z()},[]);let I=e=>{D&&D[e]?(O({[e]:D[e]}),z(e),_(!0)):console.error("Configuration not found for workspace: ".concat(e))},P={backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",overflowX:"auto",whiteSpace:"pre",wordBreak:"normal"};return v&&0===e.length?(0,l.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,l.jsx)(m.Z,{}),(0,l.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading workspace data..."})]}):(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,l.jsxs)("div",{className:"text-base flex items-center",children:[(0,l.jsx)("span",{className:"text-sky-blue leading-none",children:"Workspaces"}),(0,l.jsx)(x.z,{variant:"outline",size:"sm",onClick:()=>{D&&Object.keys(D).length>0?J(!0):console.warn("Raw workspaces data is not available or empty.")},className:"ml-4 px-2 py-1 text-xs",disabled:v||!D||0===Object.keys(D).length,children:"View All Configs"})]}),(0,l.jsxs)("div",{className:"flex items-center",children:[v&&(0,l.jsxs)("div",{className:"flex items-center mr-2",children:[(0,l.jsx)(m.Z,{size:15,className:"mt-0"}),(0,l.jsx)("span",{className:"ml-2 text-gray-500 text-xs",children:"Refreshing..."})]}),(0,l.jsxs)(x.z,{variant:"ghost",onClick:()=>{Z()},disabled:v,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,l.jsx)(g.Z,{className:"h-4 w-4 mr-1.5"}),!V&&(0,l.jsx)("span",{children:"Refresh"})]})]})]}),(0,l.jsx)("div",{className:"bg-sky-50 p-4 rounded-lg shadow mb-6",children:(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row justify-around items-center",children:[(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(f.E9,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Workspaces:"}),(0,l.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:e.length})]})}),(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(f.QT,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Clusters (Running / Total):"}),(0,l.jsxs)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:[a," / ",u]})]})}),(0,l.jsx)("div",{className:"p-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(f.Vp,{className:"w-5 h-5 mr-2 text-sky-600"}),(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Managed Jobs:"}),(0,l.jsx)("span",{className:"ml-1 text-xl font-semibold text-sky-700",children:y})]})})]})}),0!==e.length||v?(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(e=>(0,l.jsxs)(d.Zb,{children:[(0,l.jsx)(d.Ol,{children:(0,l.jsxs)(d.ll,{className:"text-base font-normal",children:[(0,l.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",e.name]})}),(0,l.jsxs)(d.aY,{className:"text-sm pb-2",children:[(0,l.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,l.jsx)(f.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,l.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,l.jsxs)("span",{className:"font-normal text-gray-800",children:[e.runningClusterCount," / ",e.totalClusterCount]})]}),(0,l.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,l.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,l.jsx)(f.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,l.jsx)("span",{children:"Managed Jobs"})]}),(0,l.jsx)("span",{className:"font-normal text-gray-800",children:e.managedJobsCount})]})]}),(0,l.jsxs)("div",{className:"px-6 pb-3 text-sm pt-3",children:[(0,l.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:e.clouds.map(e=>(0,l.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,l.jsx)(f.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,l.jsx)("span",{children:e})]},e))})]}),(0,l.jsx)(d.eW,{className:"flex justify-end pt-3",children:(0,l.jsx)(x.z,{variant:"outline",size:"sm",onClick:()=>I(e.name),children:"Details"})})]},e.name))}):(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-lg text-gray-600",children:"No workspaces found."}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Create a cluster to see its workspace here."})]}),W&&(0,l.jsx)(p.Vq,{open:S,onOpenChange:()=>{_(!1),O(null),z("")},children:(0,l.jsxs)(p.cZ,{className:"sm:max-w-md md:max-w-lg lg:max-w-xl xl:max-w-2xl w-full max-h-[90vh] flex flex-col",children:[(0,l.jsx)(p.fK,{children:(0,l.jsxs)(p.$N,{className:"pr-10",children:["Workspace:",(0,l.jsxs)("span",{className:"font-normal",children:[" ",R]})]})}),(0,l.jsxs)("div",{className:"flex-grow overflow-y-auto py-4",children:[W&&R&&D&&D[R]&&(0,l.jsx)(e=>{let{workspaceName:s,config:a}=e;if(!a)return null;let t="default"===s,n=0===Object.keys(a).length;if(t&&n)return(0,l.jsx)("p",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"Workspace 'default' can use all accessible infrastructure."});let r=[],c=[];for(let e in a){let s=a[e],t=e.toUpperCase();if(s&&!0===s.disabled)c.push(t);else if(s&&Object.keys(s).length>0){let a="";"gcp"===e.toLowerCase()&&s.project_id?a=" (Project ID: ".concat(s.project_id,")"):"aws"===e.toLowerCase()&&s.region&&(a=" (Region: ".concat(s.region,")")),r.push((0,l.jsxs)("span",{className:"block",children:[t,a," is enabled."]},"".concat(e,"-enabled")))}else s&&0===Object.keys(s).length&&r.push((0,l.jsxs)("span",{className:"block",children:[t," is enabled (using default settings)."]},"".concat(e,"-default-enabled")))}let i=[];if(c.length>0){let e=c.join(" and ");i.push((0,l.jsxs)("span",{className:"block",children:[e," ",1===c.length?"is":"are"," ","explicitly disabled."]},"disabled-clouds"))}return(i.push(...r),i.length>0)?(0,l.jsxs)("div",{className:"text-sm text-gray-700 mb-3 p-3 bg-sky-50 rounded border border-sky-200",children:[i,(0,l.jsxs)("p",{className:"mt-2 text-gray-500",children:["Other accessible infrastructure are enabled. See"," ",(0,l.jsx)("code",{className:"text-sky-blue",children:"Enabled Infra"}),"."]})]}):!t&&n?(0,l.jsx)("p",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"This workspace has no specific cloud resource configurations and can use all accessible infrastructure."}):null},{workspaceName:R,config:D[R]}),(0,l.jsx)("pre",{style:P,children:h().dump(W,{indent:2})})]})]})}),D&&(0,l.jsx)(p.Vq,{open:A,onOpenChange:()=>{J(!1)},children:(0,l.jsxs)(p.cZ,{className:"sm:max-w-md md:max-w-lg lg:max-w-xl xl:max-w-2xl w-full max-h-[90vh] flex flex-col",children:[(0,l.jsx)(p.fK,{children:(0,l.jsx)(p.$N,{className:"pr-10",children:"All Workspaces Configuration"})}),(0,l.jsx)("div",{className:"flex-grow overflow-y-auto py-4",children:(0,l.jsx)("pre",{style:P,children:h().dump(D,{indent:2})})})]})})]})}function y(){return(0,l.jsx)(n.A,{highlighted:"workspaces",children:(0,l.jsx)(b,{})})}}},function(e){e.O(0,[146,573,488,498,480,734,938,888,774,179],function(){return e(e.s=2592)}),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
- ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:0 0% 100%;--foreground:220 17% 27%;--card:0 0% 100%;--card-foreground:220 17% 27%;--popover:0 0% 100%;--popover-foreground:220 17% 27%;--primary:222.2 47.4% 11.2%;--primary-foreground:220 17% 27%;--secondary:210 40% 96.1%;--secondary-foreground:220 9% 46%;--muted:210 40% 96.1%;--muted-foreground:210 40% 96.1%;--accent:210 40% 96.1%;--accent-foreground:220 17% 27%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:222.2 84% 4.9%;--radius:0.5rem;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%;--text-strong:220 17% 27%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.left-full{left:100%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-10{margin-top:-2.5rem}.-mt-5{margin-top:-1.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[calc\(100vh-56px\)\]{height:calc(100vh - 56px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[250px\]{max-height:250px}.max-h-\[90vh\]{max-height:90vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-2\/3{width:66.666667%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-max{width:max-content}.min-w-5{min-width:1.25rem}.min-w-\[100px\]{min-width:100px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x:-50%}.translate-y-\[-50\%\]{--tw-translate-y:-50%}.transform,.translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.bg-\[\#f7f7f7\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity,1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/50{background-color:hsla(0,0%,100%,.5)}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.object-contain{object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-32{padding-top:8rem;padding-bottom:8rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[hsl\(var\(--text-strong\)\)\]{color:hsl(var(--text-strong))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-sky-blue{--tw-text-opacity:1;color:rgb(14 46 101/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color:#fff}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.sortable{cursor:pointer;user-select:none}.sortable:hover{text-decoration:underline}.container{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:20px}.chart{border:1px solid #ccc;padding:10px;border-radius:5px;background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1);max-height:400px;overflow:auto}.flip-card-container{display:flex;flex-wrap:wrap;gap:20px;justify-content:center}.flip-card-back,.flip-card-front{width:300px;height:350px;border:1px solid #ccc;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border-radius:10px;box-shadow:0 4px 8px rgba(0,0,0,.1)}.flip-card-back{padding:20px;text-align:center}.home-card{display:flex;flex-direction:column;justify-content:space-between;flex:1 1 0;height:100%}.home-cloud-card{background-color:#f0fff0}.chartContainer{width:200px;height:200px}.tableCellWidth{width:210px!important}.tableCellWidth-sm{width:10px!important}.items-center h3.text-xl.font-semibold.mb-4:first-of-type{font-size:0;margin-bottom:1rem}.items-center h3.text-xl.font-semibold.mb-4:first-of-type:after{content:"";font-size:1.25rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-sky-blue-bright:hover{--tw-text-opacity:1;color:rgb(30 98 204/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity,1))}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-slate-400:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\[state\=active\]\:bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\[state\=open\]\:bg-gray-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=active\]\:text-slate-950[data-state=active]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.data-\[state\=open\]\:text-gray-500[data-state=open]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.dark\:ring-offset-slate-950:is(.dark *){--tw-ring-offset-color:#020617}.dark\:focus-visible\:ring-slate-800:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity,1))}.dark\:data-\[state\=active\]\:bg-slate-950[data-state=active]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.dark\:data-\[state\=active\]\:text-slate-50[data-state=active]:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:max-w-3xl{max-width:48rem}.sm\:max-w-md{max-width:28rem}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:max-w-lg{max-width:32rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}}@media (min-width:1024px){.lg\:max-w-xl{max-width:36rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:max-w-2xl{max-width:42rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}