skypilot-nightly 1.0.0.dev20250526__py3-none-any.whl → 1.0.0.dev20250528__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.
- sky/__init__.py +2 -2
- sky/adaptors/kubernetes.py +13 -1
- sky/backends/cloud_vm_ray_backend.py +2 -2
- sky/check.py +32 -6
- sky/cli.py +5 -22
- sky/client/cli.py +5 -22
- sky/client/sdk.py +5 -2
- sky/clouds/cloud.py +2 -2
- sky/clouds/kubernetes.py +12 -7
- sky/clouds/service_catalog/kubernetes_catalog.py +4 -0
- sky/clouds/ssh.py +24 -8
- sky/core.py +20 -2
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/Mx1iAbDQn1jMHh3UHmK3R/_buildManifest.js +1 -0
- sky/dashboard/out/_next/static/chunks/121-8f55ee3fa6301784.js +20 -0
- sky/dashboard/out/_next/static/chunks/{573-f17bd89d9f9118b3.js → 173-7db8607cefc20f70.js} +5 -5
- sky/dashboard/out/_next/static/chunks/236-d6900c828331f664.js +6 -0
- sky/dashboard/out/_next/static/chunks/293-351268365226d251.js +1 -0
- sky/dashboard/out/_next/static/chunks/{498-d7722313e5e5b4e6.js → 320-afea3ddcc5bd1c6c.js} +1 -16
- sky/dashboard/out/_next/static/chunks/470-4d003c441839094d.js +1 -0
- sky/dashboard/out/_next/static/chunks/578-9146658cead92981.js +6 -0
- sky/dashboard/out/_next/static/chunks/843-256ec920f6d5f41f.js +11 -0
- sky/dashboard/out/_next/static/chunks/856-62b87c68917b08ed.js +1 -0
- sky/dashboard/out/_next/static/chunks/973-1a09cac61cfcc1e1.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-159bffb2fa34ed54.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-9506c00257d10dbd.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/{clusters-9e6d1ec6e1ac5b29.js → clusters-943992b84fd6f4ee.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/config-41738d1896fc02fe.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/infra-881fcd902fbbd0e5.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-2c29e97a6aa50dd4.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs-a4efc09e61988f8d.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/users-b2634885d67c49a6.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/workspace/{new-bbf436f41381e169.js → new-579b3203c7c19d84.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-7733c960685b4385.js → [name]-9388e38fac73ee8f.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-610c49ae3619ee85.js +1 -0
- sky/dashboard/out/_next/static/css/ffd1cd601648c303.css +3 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -0
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/global_user_state.py +181 -134
- sky/provision/kubernetes/utils.py +4 -4
- sky/server/constants.py +1 -1
- sky/server/requests/payloads.py +18 -5
- sky/server/requests/serializers/decoders.py +0 -11
- sky/server/server.py +25 -14
- sky/setup_files/dependencies.py +1 -0
- sky/skylet/constants.py +4 -0
- sky/skypilot_config.py +4 -0
- sky/utils/db_utils.py +34 -46
- sky/utils/kubernetes/exec_kubeconfig_converter.py +19 -0
- sky/utils/schemas.py +57 -5
- sky/utils/subprocess_utils.py +2 -3
- sky/workspaces/core.py +186 -50
- sky/workspaces/server.py +25 -0
- {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/METADATA +2 -1
- {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/RECORD +71 -67
- {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/WHEEL +1 -1
- sky/dashboard/out/_next/static/7GEgRyZKRaSnYZCV1Jwol/_buildManifest.js +0 -1
- sky/dashboard/out/_next/static/chunks/25-062253ea41fb8eec.js +0 -6
- sky/dashboard/out/_next/static/chunks/480-5a0de8b6570ea105.js +0 -1
- sky/dashboard/out/_next/static/chunks/488-50d843fdb5396d32.js +0 -15
- sky/dashboard/out/_next/static/chunks/578-d351125af46c293f.js +0 -6
- sky/dashboard/out/_next/static/chunks/734-a6e01d7f98904741.js +0 -1
- sky/dashboard/out/_next/static/chunks/938-59956af3950b02ed.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-3b5aad09a25f64b7.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-9529d9e882a0e75c.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/infra-abb7d744ecf15109.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-48dc8d67d4b60be1.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs-73d5e0c369d00346.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/users-b8acf6e6735323a2.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-5ed48b3201b998c8.js +0 -1
- sky/dashboard/out/_next/static/css/28558d57108b05ae.css +0 -3
- /sky/dashboard/out/_next/static/{7GEgRyZKRaSnYZCV1Jwol → Mx1iAbDQn1jMHh3UHmK3R}/_ssgManifest.js +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/{_app-96a715a6fb01e228.js → _app-a631df412d8172de.js} +0 -0
- {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250526.dist-info → skypilot_nightly-1.0.0.dev20250528.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[236],{8236:function(e,s,t){t.d(s,{L4:function(){return D},Nk:function(){return I},x2:function(){return R}});var n=t(5893),r=t(7294),a=t(1163),l=t(1664),i=t.n(l),c=t(8799),o=t(803),d=t(7673),h=t(8764),x=t(6989),u=t(8969),m=t(3266),p=t(7324),j=t(9470),f=t(3626),g=t(998);/**
|
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 w=(0,g.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"}]]),N=(0,g.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"}]]),b=(0,g.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"}]]);var y=t(9284),v=t(4545),k=t(9307),C=t(3001),S=t(8950),E=t(6378),L=t(6856);let R={active:["PENDING","RUNNING","RECOVERING","SUBMITTED","STARTING","CANCELLING"],finished:["SUCCEEDED","FAILED","CANCELLED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER"]},M="__ALL_WORKSPACES__",_=e=>{if(!e)return"-";let s=(0,x.GV)(e);if(r.isValidElement(s)&&s.props&&s.props.children&&(s=r.isValidElement(s.props.children)&&s.props.children.props&&s.props.children.props.children?s.props.children.props.children:s.props.children),"string"!=typeof s)return s;if("just now"===s)return"now";let t=s.match(/^About\s+(\d+)\s+(\w+)\s+ago$/);if(t){let e=t[1],s=t[2],n={second:"sec",seconds:"secs",minute:"min",minutes:"mins",hour:"hr",hours:"hrs",day:"d",days:"d",month:"mo",months:"mos",year:"yr",years:"yrs"};if(n[s])return"~ ".concat(e," ").concat(n[s]," ago")}let n=s.match(/^a[n]?\s+(\w+)\s+ago$/);if(n){let e=n[1],s={second:"sec",minute:"min",hour:"hr",day:"d",month:"mo",year:"yr"};if(s[e])return"1 ".concat(s[e]," ago")}let a=s.match(/^(\d+)\s+(\w+)\s+ago$/);if(a){let e=a[1],s=a[2],t={seconds:"secs",minutes:"mins",hours:"hrs",days:"d",months:"mo",years:"yr"};if(t[s])return"".concat(e," ").concat(t[s]," ago")}return s};function I(){let e=(0,a.useRouter)(),[s,t]=(0,r.useState)(!1),l=r.useRef(null),[o,d]=(0,r.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),h=(0,C.X)(),[g,w]=(0,r.useState)(M),[N,b]=(0,r.useState)([]);return(0,r.useEffect)(()=>{e.isReady&&e.query.workspace&&w(Array.isArray(e.query.workspace)?e.query.workspace[0]:e.query.workspace)},[e.isReady,e.query.workspace]),(0,r.useEffect)(()=>{(async()=>{try{await L.ZP.preloadForPage("jobs");let e=await E.ZP.get(p.fX),s=Object.keys(e),t=(await E.ZP.get(u.getManagedJobs)).jobs||[],n=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],r=new Set(s);n.forEach(e=>r.add(e)),b(Array.from(r).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),b(["default"])}})()},[]),(0,n.jsxs)(j.A,{highlighted:"jobs",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,n.jsxs)("div",{className:"text-base flex items-center",children:[(0,n.jsx)(i(),{href:"/jobs",className:"text-sky-blue hover:underline leading-none",children:"Managed Jobs"}),(0,n.jsxs)(S.Ph,{value:g,onValueChange:w,children:[(0,n.jsx)(S.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,n.jsx)(S.ki,{placeholder:"Filter by workspace...",children:g===M?"All Workspaces":g})}),(0,n.jsxs)(S.Bw,{children:[(0,n.jsx)(S.Ql,{value:M,children:"All Workspaces"}),N.map(e=>(0,n.jsx)(S.Ql,{value:e,children:e},e))]})]})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,n.jsxs)("div",{className:"flex items-center mr-2",children:[(0,n.jsx)(c.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,n.jsxs)("button",{onClick:()=>{E.ZP.invalidate(u.getManagedJobs),E.ZP.invalidate(m.getClusters),E.ZP.invalidate(p.fX),l.current&&l.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",title:"Refresh",children:[(0,n.jsx)(f.Z,{className:"h-4 w-4 mr-1.5"}),!h&&(0,n.jsx)("span",{children:"Refresh"})]})]})]}),(0,n.jsx)(O,{refreshInterval:x.yc,setLoading:t,refreshDataRef:l,workspaceFilter:g}),(0,n.jsx)(y.cV,{isOpen:o.isOpen,onClose:()=>d({...o,isOpen:!1}),onConfirm:o.onConfirm,title:o.title,message:o.message})]})}function O(e){let{refreshInterval:s,setLoading:t,refreshDataRef:a,workspaceFilter:l}=e,[p,j]=(0,r.useState)([]),[f,g]=(0,r.useState)({key:null,direction:"ascending"}),[N,b]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!0),[L,I]=(0,r.useState)(1),[O,D]=(0,r.useState)(10),[z,F]=(0,r.useState)(null),W=(0,r.useRef)(null),[U,q]=(0,r.useState)([]),[T,V]=(0,r.useState)({}),[B,J]=(0,r.useState)(!1),[G,H]=(0,r.useState)(!1),[X,$]=(0,r.useState)(!1),[K,Q]=(0,r.useState)("active"),[Y,ee]=(0,r.useState)(!0),[es,et]=(0,r.useState)({isOpen:!1,title:"",message:"",onConfirm:null}),en=async()=>{et({isOpen:!0,title:"Restart Controller",message:"Are you sure you want to restart the controller? This will temporarily interrupt job management.",onConfirm:async()=>{try{$(!0),b(!0),await (0,u.Ce)("restartcontroller"),await er()}catch(e){console.error("Error restarting controller:",e)}finally{$(!1),b(!1)}}})},er=r.useCallback(async()=>{b(!0),t(!0);try{let[e,s]=await Promise.all([E.ZP.get(u.getManagedJobs),E.ZP.get(m.getClusters)]),{jobs:t,controllerStopped:n}=e,r=s.find(e=>(0,v.Ym)(e.cluster)),a=r?r.status:"NOT_FOUND",l=!1;"STOPPED"==a&&n&&(l=!0),"LAUNCHING"==a?H(!0):H(!1),j(t),J(l)}catch(e){console.error("Error fetching data:",e),j([])}finally{b(!1),t(!1),S(!1)}},[t]);r.useEffect(()=>{a&&(a.current=er)},[a,er]),(0,r.useEffect)(()=>{j([]);let e=!0;er();let t=setInterval(()=>{e&&er()},s);return()=>{e=!1,clearInterval(t)}},[s,er]),(0,r.useEffect)(()=>{I(1)},[K,p.length]),(0,r.useEffect)(()=>{q([]),ee(!0)},[K]);let ea=e=>{let s="ascending";f.key===e&&"ascending"===f.direction&&(s="descending"),g({key:e,direction:s})},el=e=>f.key===e?"ascending"===f.direction?" ↑":" ↓":"";r.useMemo(()=>({active:p.filter(e=>R.active.includes(e.status)).length,finished:p.filter(e=>R.finished.includes(e.status)).length}),[p]);let ei=e=>U.length>0?U.includes(e):R[K].includes(e),ec=r.useMemo(()=>{let e=l&&l!==M?p.filter(e=>(e.workspace||"default").toLowerCase()===l.toLowerCase()):p;return U.length>0?e.filter(e=>U.includes(e.status)):Y?e.filter(e=>R[K].includes(e.status)):[]},[p,K,U,Y,R,l]),eo=r.useMemo(()=>f.key?[...ec].sort((e,s)=>e[f.key]<s[f.key]?"ascending"===f.direction?-1:1:e[f.key]>s[f.key]?"ascending"===f.direction?1:-1:0):ec,[ec,f]),ed=Math.ceil(eo.length/O),eh=(L-1)*O,ex=eh+O,eu=eo.slice(eh,ex),em=e=>{if(U.includes(e)){let s=U.filter(s=>s!==e);0===s.length?(ee(!0),q([])):(q(s),ee(!1))}else q([...U,e]),ee(!1)};return(0,r.useEffect)(()=>{V(p.reduce((e,s)=>(e[s.status]=(e[s.status]||0)+1,e),{}))},[p]),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"flex flex-col space-y-1 mb-1",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center text-sm mb-1",children:[(0,n.jsx)("span",{className:"mr-2 text-sm font-medium",children:"Statuses:"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[!N&&0===p.length&&!C&&(0,n.jsx)("span",{className:"text-gray-500 mr-2",children:"No jobs found"}),Object.entries(T).map(e=>{let[s,t]=e;return(0,n.jsxs)("button",{onClick:()=>em(s),className:"px-3 py-1 rounded-full flex items-center space-x-2 ".concat(ei(s)||U.includes(s)?(0,k.Cl)(s):"bg-gray-50 text-gray-600 hover:bg-gray-100"),children:[(0,n.jsx)("span",{children:s}),(0,n.jsx)("span",{className:"text-xs ".concat(ei(s)||U.includes(s)?"bg-white/50":"bg-gray-200"," px-1.5 py-0.5 rounded"),children:t})]},s)}),p.length>0&&(0,n.jsxs)("div",{className:"flex items-center ml-2 gap-2",children:[(0,n.jsx)("span",{className:"text-gray-500",children:"("}),(0,n.jsx)("button",{onClick:()=>{Q("active"),q([]),ee(!0)},className:"text-sm font-medium ".concat("active"===K&&Y?"text-green-700 underline":"text-gray-600 hover:text-green-700 hover:underline"),children:"show all active jobs"}),(0,n.jsx)("span",{className:"text-gray-500 mx-1",children:"|"}),(0,n.jsx)("button",{onClick:()=>{Q("finished"),q([]),ee(!0)},className:"text-sm font-medium ".concat("finished"===K&&Y?"text-blue-700 underline":"text-gray-600 hover:text-blue-700 hover:underline"),children:"show all finished jobs"}),(0,n.jsx)("span",{className:"text-gray-500",children:")"})]})]})]})}),(0,n.jsx)(d.Zb,{children:(0,n.jsxs)(h.iA,{children:[(0,n.jsx)(h.xD,{children:(0,n.jsxs)(h.SC,{children:[(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("id"),children:["ID",el("id")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("name"),children:["Name",el("name")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("user"),children:["User",el("user")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("workspace"),children:["Workspace",el("workspace")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("submitted_at"),children:["Submitted",el("submitted_at")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("job_duration"),children:["Duration",el("job_duration")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("status"),children:["Status",el("status")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("resources_str"),children:["Requested",el("resources_str")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("infra"),children:["Infra",el("infra")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("cluster"),children:["Resources",el("cluster")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>ea("recoveries"),children:["Recoveries",el("recoveries")]}),(0,n.jsx)(h.ss,{children:"Details"}),(0,n.jsx)(h.ss,{children:"Logs"})]})}),(0,n.jsx)(h.RM,{children:N&&C?(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:12,className:"text-center py-6 text-gray-500",children:(0,n.jsxs)("div",{className:"flex justify-center items-center",children:[(0,n.jsx)(c.Z,{size:20,className:"mr-2"}),(0,n.jsx)("span",{children:"Loading..."})]})})}):eu.length>0?(0,n.jsx)(n.Fragment,{children:eu.map(e=>(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)(h.SC,{children:[(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.id})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/jobs/".concat(e.id),className:"text-blue-600",children:e.name})}),(0,n.jsx)(h.pj,{children:e.user}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,n.jsx)(h.pj,{children:_(e.submitted_at)}),(0,n.jsx)(h.pj,{children:(0,x.LU)(e.job_duration)}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(k.OE,{status:e.status})}),(0,n.jsx)(h.pj,{children:e.requested_resources}),(0,n.jsx)(h.pj,{children:e.infra&&"-"!==e.infra?(0,n.jsx)(x.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,n.jsxs)("span",{children:[(0,n.jsx)(i(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud||e.infra.split("(")[0].trim()}),e.infra.includes("(")&&(0,n.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})}):(0,n.jsx)("span",{children:e.infra||"-"})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(x.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,n.jsx)("span",{children:e.resources_str})})}),(0,n.jsx)(h.pj,{children:e.recoveries}),(0,n.jsx)(h.pj,{children:e.details?(0,n.jsx)(Z,{text:e.details,rowId:e.id,expandedRowId:z,setExpandedRowId:F}):"-"}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(P,{jobParent:"/jobs",jobId:e.id,managed:!0})})]}),z===e.id&&(0,n.jsx)(A,{text:e.details,colSpan:12,innerRef:W})]},e.id))}):(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:12,className:"text-center py-6",children:(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[G&&(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,n.jsx)("p",{className:"text-gray-700",children:"The managed job controller is launching. Please wait for it to be ready."}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(c.Z,{size:12,className:"mr-2"}),(0,n.jsx)("span",{className:"text-gray-500",children:"Launching..."})]})]}),!B&&!G&&(0,n.jsx)("p",{className:"text-gray-500",children:"No active jobs"}),B&&(0,n.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,n.jsx)("p",{className:"text-gray-700",children:"The managed job controller has been stopped. Please restart it to check the latest job status."}),(0,n.jsx)(o.z,{variant:"outline",size:"sm",onClick:en,className:"text-sky-blue hover:text-sky-blue-bright",disabled:N||X,children:X?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{size:12,className:"mr-2"}),"Restarting..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{className:"h-4 w-4 mr-2"}),"Restart Controller"]})})]})]})})})})]})}),eo.length>0&&(0,n.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,n.jsxs)("div",{className:"relative inline-block",children:[(0,n.jsxs)("select",{value:O,onChange:e=>{D(parseInt(e.target.value,10)),I(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,n.jsx)("option",{value:10,children:"10"}),(0,n.jsx)("option",{value:30,children:"30"}),(0,n.jsx)("option",{value:50,children:"50"}),(0,n.jsx)("option",{value:100,children:"100"}),(0,n.jsx)("option",{value:200,children:"200"})]}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,n.jsxs)("div",{children:[eh+1," – ",Math.min(ex,eo.length)," of"," ",eo.length]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{I(e=>Math.max(e-1,1))},disabled:1===L,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{I(e=>Math.min(e+1,ed))},disabled:L===ed||0===ed,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})}),(0,n.jsx)(y.cV,{isOpen:es.isOpen,onClose:()=>et({...es,isOpen:!1}),onConfirm:es.onConfirm,title:es.title,message:es.message})]})}function P(e){let{withLabel:s=!1,jobParent:t,jobId:r,managed:l}=e,i=(0,a.useRouter)(),c=(e,s)=>{e.preventDefault(),e.stopPropagation(),i.push({pathname:"".concat(t,"/").concat(r),query:{tab:s}})};return(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsx)(x.WH,{content:"View Job Logs",className:"capitalize text-sm text-muted-foreground",children:(0,n.jsxs)("button",{onClick:e=>c(e,"logs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,n.jsx)(N,{className:"w-4 h-4"}),s&&(0,n.jsx)("span",{className:"ml-1.5",children:"Logs"})]})},"logs"),l&&(0,n.jsx)(x.WH,{content:"View Controller Logs",className:"capitalize text-sm text-muted-foreground",children:(0,n.jsxs)("button",{onClick:e=>c(e,"controllerlogs"),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,n.jsx)(b,{className:"w-4 h-4"}),s&&(0,n.jsx)("span",{className:"ml-2",children:"Controller Logs"})]})},"controllerlogs")]})}function D(e){let{clusterName:s,clusterJobData:t,loading:a}=e,[l,u]=(0,r.useState)(null),[m,p]=(0,r.useState)({key:null,direction:"ascending"}),[j,f]=(0,r.useState)(1),[g,w]=(0,r.useState)(10),N=(0,r.useRef)(null),[b,y]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=e=>{l&&N.current&&!N.current.contains(e.target)&&u(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]);let v=r.useMemo(()=>t||[],[t]);(0,r.useEffect)(()=>{JSON.stringify(t)!==JSON.stringify(b)&&y(t)},[t,b]);let C=r.useMemo(()=>m.key?[...v].sort((e,s)=>e[m.key]<s[m.key]?"ascending"===m.direction?-1:1:e[m.key]>s[m.key]?"ascending"===m.direction?1:-1:0):v,[v,m]),S=e=>{let s="ascending";m.key===e&&"ascending"===m.direction&&(s="descending"),p({key:e,direction:s})},E=e=>m.key===e?"ascending"===m.direction?" ↑":" ↓":"",L=Math.ceil(C.length/g),R=(j-1)*g,M=R+g,I=C.slice(R,M);return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)(d.Zb,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold",children:"Cluster Jobs"}),a&&(0,n.jsxs)("div",{className:"flex items-center mr-2",children:[(0,n.jsx)(c.Z,{size:15,className:"mt-0"}),(0,n.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]})]}),(0,n.jsxs)(h.iA,{children:[(0,n.jsx)(h.xD,{children:(0,n.jsxs)(h.SC,{children:[(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("id"),children:["ID",E("id")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("job"),children:["Name",E("job")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("user"),children:["User",E("user")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("workspace"),children:["Workspace",E("workspace")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("submitted_at"),children:["Submitted",E("submitted_at")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("job_duration"),children:["Duration",E("job_duration")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("status"),children:["Status",E("status")]}),(0,n.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>S("resources"),children:["Resources",E("resources")]}),(0,n.jsx)(h.ss,{className:"whitespace-nowrap",children:"Logs"})]})}),(0,n.jsx)(h.RM,{children:I.length>0?I.map(e=>(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)(h.SC,{className:l===e.id?"selected-row":"",children:[(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:e.id})}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/clusters/".concat(s,"/").concat(e.id),className:"text-blue-600",children:(0,n.jsx)(Z,{text:e.job||"Unnamed job",rowId:e.id,expandedRowId:l,setExpandedRowId:u})})}),(0,n.jsx)(h.pj,{children:e.user}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(i(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,n.jsx)(h.pj,{children:_(e.submitted_at)}),(0,n.jsx)(h.pj,{children:(0,x.LU)(e.job_duration)}),(0,n.jsx)(h.pj,{children:(0,n.jsx)(k.OE,{status:e.status})}),(0,n.jsx)(h.pj,{children:e.resources}),(0,n.jsx)(h.pj,{className:"flex content-center items-center",children:(0,n.jsx)(P,{jobParent:"/clusters/".concat(s),jobId:e.id,managed:!1})})]}),l===e.id&&(0,n.jsx)(A,{text:e.job||"Unnamed job",colSpan:9,innerRef:N})]},e.id)):(0,n.jsx)(h.SC,{children:(0,n.jsx)(h.pj,{colSpan:9,className:"text-center py-6 text-gray-500",children:"No jobs found"})})})]})]}),C.length>0&&(0,n.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,n.jsxs)("div",{className:"relative inline-block",children:[(0,n.jsxs)("select",{value:g,onChange:e=>{w(parseInt(e.target.value,10)),f(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,n.jsx)("option",{value:5,children:"5"}),(0,n.jsx)("option",{value:10,children:"10"}),(0,n.jsx)("option",{value:20,children:"20"}),(0,n.jsx)("option",{value:50,children:"50"})]}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,n.jsxs)("div",{children:[R+1," – ",Math.min(M,C.length)," of"," ",C.length]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{f(e=>Math.max(e-1,1))},disabled:1===j,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,n.jsx)(o.z,{variant:"ghost",size:"icon",onClick:()=>{f(e=>Math.min(e+1,L))},disabled:j===L||0===L,className:"text-gray-500 h-8 w-8 p-0",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}function A(e){let{text:s,colSpan:t,innerRef:r}=e;return(0,n.jsx)(h.SC,{className:"expanded-details",children:(0,n.jsx)(h.pj,{colSpan:t,children:(0,n.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border border-gray-200",ref:r,children:(0,n.jsx)("div",{className:"flex justify-between items-start",children:(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Full Details"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-gray-700",style:{whiteSpace:"pre-wrap"},children:s})]})})})})})}function Z(e){let{text:s,rowId:t,expandedRowId:a,setExpandedRowId:l}=e,i=s.length>50,c=a===t,o=i?"".concat(s.substring(0,50)):s,d=(0,r.useRef)(null);return(0,n.jsxs)("div",{className:"truncated-details relative max-w-full flex items-center",children:[(0,n.jsx)("span",{className:"truncate",children:o}),i&&(0,n.jsx)("button",{ref:d,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(c?null:t)},className:"text-blue-600 hover:text-blue-800 font-medium ml-1 flex-shrink-0","data-button-type":"show-more-less",children:c?"... show less":"... show more"})]})}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[293],{7324:function(e,r,t){t.d(r,{MB:function(){return l},eA:function(){return c},fX:function(){return a},iE:function(){return u},rF:function(){return d},yz:function(){return s},zl:function(){return i}});var o=t(3225);async function a(){try{let e=await fetch("".concat(o.f4,"/workspaces"));if(!e.ok)throw Error("Error scheduling getWorkspaces: ".concat(e.statusText," (status ").concat(e.status,")"));let r=e.headers.get("X-Skypilot-Request-ID");if(!r){console.warn("X-Skypilot-Request-ID header not found in /workspaces response. Attempting to find request_id in response body as a fallback.");try{let t=await e.json();if(t&&t.request_id)r=t.request_id,console.log("Found request_id in /workspaces response body (fallback):",r);else throw Error("X-Skypilot-Request-ID header not found AND request_id not found in parsed response body from /workspaces.")}catch(r){let e=r.message||"Error processing fallback for request_id from /workspaces response body.";throw console.error("Error in /workspaces request_id fallback logic:",e),Error("X-Skypilot-Request-ID header not found, and fallback to read request_id from body failed: ".concat(e))}}if(!r)throw Error("Failed to obtain X-Skypilot-Request-ID from /workspaces response (checked header and attempted body fallback, but ID is still missing).");console.log("Fetching workspace data with request_id: ".concat(r));let t=await fetch("".concat(o.f4,"/api/get?request_id=").concat(r));if(!t.ok){let e="Error fetching workspace data for request ID ".concat(r,": ").concat(t.statusText," (status ").concat(t.status,")");try{let o=await t.json();if(o&&o.detail){let t=o.detail;try{let e=JSON.parse(t);e&&e.error?t=e.error:e&&e.result&&e.result.error&&(t=e.result.error)}catch(e){}e="Error fetching workspace data for request ID ".concat(r,": ").concat(t)}}catch(e){}throw Error(e)}let a=await t.json();if(console.log("[Connector Debug] Full resultData from /api/get:",a),"FAILED"===a.status){let e="Unknown error during task execution";if(a.error)"string"==typeof a.error?e=a.error:"object"==typeof a.error&&(e=a.error.message||a.error.detail||JSON.stringify(a.error));else if(a.result&&a.result.error)"string"==typeof a.result.error?e=a.result.error:"object"==typeof a.result.error&&(e=a.result.error.message||a.result.error.detail||JSON.stringify(a.result.error));else if(a.return_value)try{let r=JSON.parse(a.return_value);r.error&&(e="string"==typeof r.error?r.error:r.error.message||r.error.detail||JSON.stringify(r.error))}catch(r){(a.return_value.includes("Error")||a.return_value.includes("Cannot"))&&(e=a.return_value)}throw Error(e)}let s={};if("SUCCEEDED"===a.status&&a.return_value)try{s=JSON.parse(a.return_value),console.log("Successfully parsed workspace data from return_value:",s)}catch(e){throw console.error("Failed to parse workspace data from return_value:",e,"Raw return_value:",a.return_value),Error("Failed to parse workspace data for request ID ".concat(r,": ").concat(e.message))}else a.result&&(console.warn("Using resultData.result as fallback for status ".concat(a.status)),s=a.result);return console.log("Effectively fetched workspace data (to be returned):",s),s||{}}catch(e){throw console.error("Failed to fetch workspaces (in getWorkspaces function):",e.message,e.stack),e}}async function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{let t="".concat(o.f4,"/enabled_clouds"),a=new URLSearchParams;e&&a.append("workspace",e),r&&a.append("expand","true"),a.toString()&&(t+="?".concat(a.toString()));let s=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!s.ok)throw Error("Error scheduling getEnabledClouds: ".concat(s.statusText," (status ").concat(s.status,")"));let n=s.headers.get("X-Skypilot-Request-ID");if(!n){console.warn("X-Skypilot-Request-ID header not found in /enabled_clouds response. Attempting to find request_id in response body as a fallback.");try{let e=await s.json();if(e&&e.request_id)n=e.request_id,console.log("Found request_id in /enabled_clouds response body (fallback):",n);else throw Error("X-Skypilot-Request-ID header not found AND request_id not found in parsed response body from /enabled_clouds.")}catch(r){let e=r.message||"Error processing fallback for request_id from /enabled_clouds response body.";throw console.error("Error in /enabled_clouds request_id fallback logic:",e),Error("X-Skypilot-Request-ID header not found, and fallback to read request_id from body failed: ".concat(e))}}if(!n)throw Error("Failed to obtain X-Skypilot-Request-ID from /enabled_clouds response (checked header and attempted body fallback, but ID is still missing).");console.log("Fetching enabled_clouds data with request_id: ".concat(n));let c=await fetch("".concat(o.f4,"/api/get?request_id=").concat(n));if(!c.ok){let e="Error fetching enabled_clouds data for request ID ".concat(n,": ").concat(c.statusText," (status ").concat(c.status,")");try{let r=await c.json();if(r&&r.detail){let t=r.detail;try{let e=JSON.parse(t);e&&e.error?t=e.error:e&&e.result&&e.result.error&&(t=e.result.error)}catch(e){}e="Error fetching enabled_clouds data for request ID ".concat(n,": ").concat(t)}}catch(e){}throw Error(e)}let l=await c.json();if(console.log("[Connector Debug] Full resultData from /api/get for enabled_clouds:",l),"FAILED"===l.status){let e=l.error||l.result&&l.result.error||"Unknown error during task execution for enabled_clouds";throw Error("Fetching enabled_clouds data failed for request ID ".concat(n,": ").concat(e))}let i=[];if("SUCCEEDED"===l.status&&l.return_value)try{i=JSON.parse(l.return_value),console.log("Successfully parsed enabled_clouds data from return_value:",i)}catch(e){throw console.error("Failed to parse enabled_clouds data from return_value:",e,"Raw return_value:",l.return_value),Error("Failed to parse enabled_clouds data for request ID ".concat(n,": ").concat(e.message))}else l.result&&(console.warn("Using resultData.result as fallback for enabled_clouds status ".concat(l.status)),i=l.result);return Array.isArray(i)?i:[]}catch(e){throw console.error("Failed to fetch enabled_clouds (in getEnabledClouds function):",e.message,e.stack),e}}async function n(e,r){console.log("Polling for ".concat(r," task completion with request_id: ").concat(e));let t=await fetch("".concat(o.f4,"/api/get?request_id=").concat(e));if(!t.ok){let o="Error fetching ".concat(r," data for request ID ").concat(e,": ").concat(t.statusText," (status ").concat(t.status,")");try{let e=await t.json();if(console.error("[Error Debug] ".concat(r," HTTP error response:"),JSON.stringify(e,null,2)),e&&e.detail){if("object"==typeof e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t&&t.message)o="".concat(r," failed: ").concat(t.message);else if(t&&"object"==typeof t){let e=t.type||JSON.stringify(t);o="".concat(r," failed: ").concat(e)}}catch(t){o="".concat(r," failed: ").concat(e.detail.error)}else if("string"==typeof e.detail)o="".concat(r," failed: ").concat(e.detail);else{let t=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof e&&(e.includes("Cannot")||e.includes("Error")||e.includes("Failed")))return e;if("object"==typeof e&&null!==e)for(let[o,a]of Object.entries(e)){let e=t(a,r?"".concat(r,".").concat(o):o);if(e)return e}return null},a=t(e.detail);a&&(o="".concat(r," failed: ").concat(a))}}}catch(e){console.error("[Error Debug] Failed to parse error response:",e)}throw Error(o)}let a=await t.json();if(console.log("[Connector Debug] ".concat(r," resultData:"),a),"FAILED"===a.status){console.error("[Error Debug] ".concat(r," failed. Full resultData:"),JSON.stringify(a,null,2)),console.error("[Error Debug] resultData.error:",a.error),console.error("[Error Debug] resultData.result:",a.result),console.error("[Error Debug] resultData.return_value:",a.return_value);let e="Unknown error during ".concat(r," task execution");if(a.error)"string"==typeof a.error?e=a.error:"object"==typeof a.error&&(e=a.error.message||a.error.detail||JSON.stringify(a.error));else if(a.result&&a.result.error)"string"==typeof a.result.error?e=a.result.error:"object"==typeof a.result.error&&(e=a.result.error.message||a.result.error.detail||JSON.stringify(a.result.error));else if(a.return_value)try{let r=JSON.parse(a.return_value);r.error&&(e="string"==typeof r.error?r.error:r.error.message||r.error.detail||JSON.stringify(r.error))}catch(r){a.return_value&&(a.return_value.includes("Error")||a.return_value.includes("Cannot"))&&(e=a.return_value)}if(e==="Unknown error during ".concat(r," task execution")){let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof e&&(e.includes("Cannot")||e.includes("Error")||e.includes("Failed")))return e;if("object"==typeof e&&null!==e)for(let[o,a]of Object.entries(e)){let e=r(a,t?"".concat(t,".").concat(o):o);if(e)return e}return null},t=r(a);t&&(e=t)}throw Error(e)}let s={};if("SUCCEEDED"===a.status&&a.return_value)try{s=JSON.parse(a.return_value),console.log("Successfully parsed ".concat(r," data:"),s)}catch(t){throw console.error("Failed to parse ".concat(r," data from return_value:"),t,"Raw return_value:",a.return_value),Error("Failed to parse ".concat(r," data for request ID ").concat(e,": ").concat(t.message))}else a.result&&(console.warn("Using resultData.result as fallback for ".concat(r," status ").concat(a.status)),s=a.result);return s}async function c(e,r){try{console.log("Updating workspace ".concat(e," with config:"),r);let t=await fetch("".concat(o.f4,"/workspaces/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e,config:r})});if(!t.ok)throw Error("Error scheduling updateWorkspace: ".concat(t.statusText," (status ").concat(t.status,")"));let a=t.headers.get("X-Skypilot-Request-ID");if(!a)throw Error("Failed to obtain request ID for updateWorkspace");return await n(a,"updateWorkspace")}catch(e){throw console.error("Failed to update workspace:",e),e}}let l=async(e,r)=>{try{let t=await fetch("".concat(o.f4,"/workspaces/create"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e,config:r})});if(!t.ok)throw await t.text(),Error("Error scheduling createWorkspace: ".concat(t.statusText," (status ").concat(t.status,")"));let a=t.headers.get("X-Skypilot-Request-ID");if(!a)throw Error("Failed to obtain request ID for createWorkspace");return await n(a,"createWorkspace")}catch(e){throw console.error("Failed to create workspace:",e),e}};async function i(e){try{console.log("Deleting workspace ".concat(e));let r=await fetch("".concat(o.f4,"/workspaces/delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_name:e})});if(!r.ok)throw Error("Error scheduling deleteWorkspace: ".concat(r.statusText," (status ").concat(r.status,")"));let t=r.headers.get("X-Skypilot-Request-ID");if(!t)throw Error("Failed to obtain request ID for deleteWorkspace");console.log("[Delete Debug] Got request ID for deleteWorkspace: ".concat(t));try{let e=await n(t,"deleteWorkspace");return console.log("[Delete Debug] deleteWorkspace completed successfully:",e),e}catch(e){throw console.error("[Delete Debug] deleteWorkspace failed with error:",e),console.error("[Delete Debug] Error message:",e.message),e}}catch(e){throw console.error("Failed to delete workspace:",e),e}}async function u(){try{console.log("Getting entire SkyPilot configuration");let e=await fetch("".concat(o.f4,"/workspaces/config"));if(!e.ok)throw Error("Error scheduling getConfig: ".concat(e.statusText," (status ").concat(e.status,")"));let r=e.headers.get("X-Skypilot-Request-ID");if(!r)throw Error("Failed to obtain request ID for getConfig");return await n(r,"getConfig")}catch(e){throw console.error("Failed to get config:",e),e}}async function d(e){try{console.log("Updating entire SkyPilot configuration with config:",e);let r=await fetch("".concat(o.f4,"/workspaces/config"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})});if(!r.ok)throw Error("Error scheduling updateConfig: ".concat(r.statusText," (status ").concat(r.status,")"));let t=r.headers.get("X-Skypilot-Request-ID");if(!t)throw Error("Failed to obtain request ID for updateConfig");return await n(t,"updateConfig")}catch(e){throw console.error("Failed to update config:",e),e}}}}]);
|
@@ -1,19 +1,4 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[498],{3320:function(t,e,n){"use strict";var r=n(2587);t.exports=r},2587:function(t,e,n){"use strict";var r=n(28),i=n(6157);function o(t){return function(){throw Error("Function "+t+" is deprecated and cannot be used.")}}t.exports.Type=n(3899),t.exports.Schema=n(2409),t.exports.FAILSAFE_SCHEMA=n(5322),t.exports.JSON_SCHEMA=n(5796),t.exports.CORE_SCHEMA=n(7318),t.exports.DEFAULT_SAFE_SCHEMA=n(5972),t.exports.DEFAULT_FULL_SCHEMA=n(9321),t.exports.load=r.load,t.exports.loadAll=r.loadAll,t.exports.safeLoad=r.safeLoad,t.exports.safeLoadAll=r.safeLoadAll,t.exports.dump=i.dump,t.exports.safeDump=i.safeDump,t.exports.YAMLException=n(4884),t.exports.MINIMAL_SCHEMA=n(5322),t.exports.SAFE_SCHEMA=n(5972),t.exports.DEFAULT_SCHEMA=n(9321),t.exports.scan=o("scan"),t.exports.parse=o("parse"),t.exports.compose=o("compose"),t.exports.addConstructor=o("addConstructor")},5596:function(t){"use strict";function e(t){return null==t}t.exports.isNothing=e,t.exports.isObject=function(t){return"object"==typeof t&&null!==t},t.exports.toArray=function(t){return Array.isArray(t)?t:e(t)?[]:[t]},t.exports.repeat=function(t,e){var n,r="";for(n=0;n<e;n+=1)r+=t;return r},t.exports.isNegativeZero=function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},t.exports.extend=function(t,e){var n,r,i,o;if(e)for(n=0,r=(o=Object.keys(e)).length;n<r;n+=1)t[i=o[n]]=e[i];return t}},6157:function(t,e,n){"use strict";var r=n(5596),i=n(4884),o=n(9321),s=n(5972),a=Object.prototype.toString,u=Object.prototype.hasOwnProperty,c={};c[0]="\\0",c[7]="\\a",c[8]="\\b",c[9]="\\t",c[10]="\\n",c[11]="\\v",c[12]="\\f",c[13]="\\r",c[27]="\\e",c[34]='\\"',c[92]="\\\\",c[133]="\\N",c[160]="\\_",c[8232]="\\L",c[8233]="\\P";var f=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function l(t){var e,n,o;if(e=t.toString(16).toUpperCase(),t<=255)n="x",o=2;else if(t<=65535)n="u",o=4;else if(t<=4294967295)n="U",o=8;else throw new i("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+r.repeat("0",o-e.length)+e}function p(t){this.schema=t.schema||o,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=r.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(t,e){var n,r,i,o,s,a,c;if(null===e)return{};for(i=0,n={},o=(r=Object.keys(e)).length;i<o;i+=1)a=String(e[s=r[i]]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(c=t.compiledTypeMap.fallback[s])&&u.call(c.styleAliases,a)&&(a=c.styleAliases[a]),n[s]=a;return n}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function h(t,e){for(var n,i=r.repeat(" ",e),o=0,s=-1,a="",u=t.length;o<u;)-1===(s=t.indexOf("\n",o))?(n=t.slice(o),o=u):(n=t.slice(o,s+1),o=s+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function d(t,e){return"\n"+r.repeat(" ",t.indent*e)}function g(t){return 32===t||9===t}function y(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&65279!==t||65536<=t&&t<=1114111}function m(t,e){var n;return y(t)&&65279!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&58!==t&&(35!==t||e&&y(n=e)&&!g(n)&&65279!==n&&13!==n&&10!==n)}function v(t){return/^\n* /.test(t)}function b(t,e){var n=v(t)?String(e):"",r="\n"===t[t.length-1];return n+(r&&("\n"===t[t.length-2]||"\n"===t)?"+":r?"":"-")+"\n"}function A(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function w(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,o=0,s=0,a=0,u="";n=i.exec(t);)(a=n.index)-o>e&&(r=s>o?s:a,u+="\n"+t.slice(o,r),o=r+1),s=a;return u+="\n",t.length-o>e&&s>o?u+=t.slice(o,s)+"\n"+t.slice(s+1):u+=t.slice(o),u.slice(1)}function x(t,e,n){var r,o,s,c,f,l;for(s=0,c=(o=n?t.explicitTypes:t.implicitTypes).length;s<c;s+=1)if(((f=o[s]).instanceOf||f.predicate)&&(!f.instanceOf||"object"==typeof e&&e instanceof f.instanceOf)&&(!f.predicate||f.predicate(e))){if(t.tag=n?f.tag:"?",f.represent){if(l=t.styleMap[f.tag]||f.defaultStyle,"[object Function]"===a.call(f.represent))r=f.represent(e,l);else if(u.call(f.represent,l))r=f.represent[l](e,l);else throw new i("!<"+f.tag+'> tag resolver accepts not "'+l+'" style');t.dump=r}return!0}return!1}function E(t,e){var n=new p(e=e||{});return(n.noRefs||function(t,e){var n,r,i=[],o=[];for(function t(e,n,r){var i,o,s;if(null!==e&&"object"==typeof e){if(-1!==(o=n.indexOf(e)))-1===r.indexOf(o)&&r.push(o);else if(n.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)t(e[o],n,r);else for(o=0,s=(i=Object.keys(e)).length;o<s;o+=1)t(e[i[o]],n,r)}}(t,i,o),n=0,r=o.length;n<r;n+=1)e.duplicates.push(i[o[n]]);e.usedDuplicates=Array(r)}(t,n),function t(e,n,r,o,s,u){e.tag=null,e.dump=r,x(e,r,!1)||x(e,r,!0);var p=a.call(e.dump);o&&(o=e.flowLevel<0||e.flowLevel>n);var E,C,k="[object Object]"===p||"[object Array]"===p;if(k&&(C=-1!==(E=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||C||2!==e.indent&&n>0)&&(s=!1),C&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(k&&C&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),"[object Object]"===p)o&&0!==Object.keys(e.dump).length?(function(e,n,r,o){var s,a,u,c,f,l,p="",h=e.tag,g=Object.keys(r);if(!0===e.sortKeys)g.sort();else if("function"==typeof e.sortKeys)g.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(s=0,a=g.length;s<a;s+=1)l="",o&&0===s||(l+=d(e,n)),c=r[u=g[s]],t(e,n+1,u,!0,!0,!0)&&((f=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,f&&(l+=d(e,n)),t(e,n+1,c,!0,f)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",l+=e.dump,p+=l));e.tag=h,e.dump=p||"{}"}(e,n,e.dump,s),C&&(e.dump="&ref_"+E+e.dump)):(function(e,n,r){var i,o,s,a,u,c="",f=e.tag,l=Object.keys(r);for(i=0,o=l.length;i<o;i+=1)u="",0!==i&&(u+=", "),e.condenseFlow&&(u+='"'),a=r[s=l[i]],t(e,n,s,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),t(e,n,a,!1,!1)&&(u+=e.dump,c+=u));e.tag=f,e.dump="{"+c+"}"}(e,n,e.dump),C&&(e.dump="&ref_"+E+" "+e.dump));else if("[object Array]"===p){var I,S=e.noArrayIndent&&n>0?n-1:n;o&&0!==e.dump.length?(function(e,n,r,i){var o,s,a="",u=e.tag;for(o=0,s=r.length;o<s;o+=1)t(e,n+1,r[o],!0,!0)&&(i&&0===o||(a+=d(e,n)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=u,e.dump=a||"[]"}(e,S,e.dump,s),C&&(e.dump="&ref_"+E+e.dump)):(function(e,n,r){var i,o,s="",a=e.tag;for(i=0,o=r.length;i<o;i+=1)t(e,n,r[i],!1,!1)&&(0!==i&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=a,e.dump="["+s+"]"}(e,S,e.dump),C&&(e.dump="&ref_"+E+" "+e.dump))}else if("[object String]"===p)"?"!==e.tag&&(I=e.dump,e.dump=function(){if(0===I.length)return"''";if(!e.noCompatMode&&-1!==f.indexOf(I))return"'"+I+"'";var t=e.indent*Math.max(1,n),r=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t);switch(function(t,e,n,r,i){var o,s,a,u,c=!1,f=!1,l=-1!==r,p=-1,h=y(o=t.charCodeAt(0))&&65279!==o&&!g(o)&&45!==o&&63!==o&&58!==o&&44!==o&&91!==o&&93!==o&&123!==o&&125!==o&&35!==o&&38!==o&&42!==o&&33!==o&&124!==o&&61!==o&&62!==o&&39!==o&&34!==o&&37!==o&&64!==o&&96!==o&&!g(t.charCodeAt(t.length-1));if(e)for(s=0;s<t.length;s++){if(!y(a=t.charCodeAt(s)))return 5;u=s>0?t.charCodeAt(s-1):null,h=h&&m(a,u)}else{for(s=0;s<t.length;s++){if(10===(a=t.charCodeAt(s)))c=!0,l&&(f=f||s-p-1>r&&" "!==t[p+1],p=s);else if(!y(a))return 5;u=s>0?t.charCodeAt(s-1):null,h=h&&m(a,u)}f=f||l&&s-p-1>r&&" "!==t[p+1]}return c||f?n>9&&v(t)?5:f?4:3:h&&!i(t)?1:2}(I,u||e.flowLevel>-1&&n>=e.flowLevel,e.indent,r,function(t){return function(t,e){var n,r;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(t.implicitTypes[n].resolve(e))return!0;return!1}(e,t)})){case 1:return I;case 2:return"'"+I.replace(/'/g,"''")+"'";case 3:return"|"+b(I,e.indent)+A(h(I,t));case 4:return">"+b(I,e.indent)+A(h(function(t,e){for(var n,r,i,o=/(\n+)([^\n]*)/g,s=(n=-1!==(n=t.indexOf("\n"))?n:t.length,o.lastIndex=n,w(t.slice(0,n),e)),a="\n"===t[0]||" "===t[0];i=o.exec(t);){var u=i[1],c=i[2];r=" "===c[0],s+=u+(a||r||""===c?"":"\n")+w(c,e),a=r}return s}(I,r),t));case 5:return'"'+function(t){for(var e,n,r,i="",o=0;o<t.length;o++){if((e=t.charCodeAt(o))>=55296&&e<=56319&&(n=t.charCodeAt(o+1))>=56320&&n<=57343){i+=l((e-55296)*1024+n-56320+65536),o++;continue}i+=!(r=c[e])&&y(e)?t[o]:r||l(e)}return i}(I,r)+'"';default:throw new i("impossible error: invalid scalar style")}}());else{if(e.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+p)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}(n,0,t,!0,!0))?n.dump+"\n":""}t.exports.dump=E,t.exports.safeDump=function(t,e){return E(t,r.extend({schema:s},e))}},4884:function(t){"use strict";function e(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=e},28:function(t,e,n){"use strict";var r=n(5596),i=n(4884),o=n(7334),s=n(5972),a=n(9321),u=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,l=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,h=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function d(t){return Object.prototype.toString.call(t)}function g(t){return 10===t||13===t}function y(t){return 9===t||32===t}function m(t){return 9===t||32===t||10===t||13===t}function v(t){return 44===t||91===t||93===t||123===t||125===t}function b(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t?" ":9===t?" ":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}for(var A=Array(256),w=Array(256),x=0;x<256;x++)A[x]=b(x)?1:0,w[x]=b(x);function E(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||a,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function C(t,e){return new i(e,new o(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function k(t,e){throw C(t,e)}function I(t,e){t.onWarning&&t.onWarning.call(null,C(t,e))}var S={YAML:function(t,e,n){var r,i,o;null!==t.version&&k(t,"duplication of %YAML directive"),1!==n.length&&k(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&k(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&k(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&I(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var r,i;2!==n.length&&k(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||k(t,"ill-formed tag handle (first argument) of the TAG directive"),u.call(t.tagMap,r)&&k(t,'there is a previously declared suffix for "'+r+'" tag handle'),h.test(i)||k(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[r]=i}};function O(t,e,n,r){var i,o,s,a;if(e<n){if(a=t.input.slice(e,n),r)for(i=0,o=a.length;i<o;i+=1)9===(s=a.charCodeAt(i))||32<=s&&s<=1114111||k(t,"expected valid JSON character");else c.test(a)&&k(t,"the stream contains non-printable characters");t.result+=a}}function T(t,e,n,i){var o,s,a,c;for(r.isObject(n)||k(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,c=(o=Object.keys(n)).length;a<c;a+=1)s=o[a],u.call(e,s)||(e[s]=n[s],i[s]=!0)}function j(t,e,n,r,i,o,s,a){var c,f;if(Array.isArray(i))for(c=0,f=(i=Array.prototype.slice.call(i)).length;c<f;c+=1)Array.isArray(i[c])&&k(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===d(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===d(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===r){if(Array.isArray(o))for(c=0,f=o.length;c<f;c+=1)T(t,e,o[c],n);else T(t,e,o,n)}else!t.json&&!u.call(n,i)&&u.call(e,i)&&(t.line=s||t.line,t.position=a||t.position,k(t,"duplicated mapping key")),e[i]=o,delete n[i];return e}function M(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):k(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function B(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);0!==i;){for(;y(i);)i=t.input.charCodeAt(++t.position);if(e&&35===i)do i=t.input.charCodeAt(++t.position);while(10!==i&&13!==i&&0!==i);if(g(i))for(M(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return -1!==n&&0!==r&&t.lineIndent<n&&I(t,"deficient indentation"),r}function L(t){var e,n=t.position;return!!((45===(e=t.input.charCodeAt(n))||46===e)&&e===t.input.charCodeAt(n+1)&&e===t.input.charCodeAt(n+2)&&(n+=3,0===(e=t.input.charCodeAt(n))||m(e)))}function F(t,e){1===e?t.result+=" ":e>1&&(t.result+=r.repeat("\n",e-1))}function N(t,e){var n,r,i=t.tag,o=t.anchor,s=[],a=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),r=t.input.charCodeAt(t.position);0!==r&&45===r&&m(t.input.charCodeAt(t.position+1));){if(a=!0,t.position++,B(t,!0,-1)&&t.lineIndent<=e){s.push(null),r=t.input.charCodeAt(t.position);continue}if(n=t.line,U(t,e,3,!1,!0),s.push(t.result),B(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)k(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return!!a&&(t.tag=i,t.anchor=o,t.kind="sequence",t.result=s,!0)}function U(t,e,n,i,o){var s,a,c,f,d,b,x,E,C=1,I=!1,S=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=c=4===n||3===n,i&&B(t,!0,-1)&&(I=!0,t.lineIndent>e?C=1:t.lineIndent===e?C=0:t.lineIndent<e&&(C=-1)),1===C)for(;function(t){var e,n,r,i,o=!1,s=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&k(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(o=!0,i=t.input.charCodeAt(++t.position)):33===i?(s=!0,n="!!",i=t.input.charCodeAt(++t.position)):n="!",e=t.position,o){do i=t.input.charCodeAt(++t.position);while(0!==i&&62!==i);t.position<t.length?(r=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):k(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!m(i);)33===i&&(s?k(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),p.test(n)||k(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),l.test(r)&&k(t,"tag suffix cannot contain flow indicator characters")}return r&&!h.test(r)&&k(t,"tag name cannot contain such characters: "+r),o?t.tag=r:u.call(t.tagMap,n)?t.tag=t.tagMap[n]+r:"!"===n?t.tag="!"+r:"!!"===n?t.tag="tag:yaml.org,2002:"+r:k(t,'undeclared tag handle "'+n+'"'),!0}(t)||function(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&k(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!m(n)&&!v(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&k(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}(t);)B(t,!0,-1)?(I=!0,c=s,t.lineIndent>e?C=1:t.lineIndent===e?C=0:t.lineIndent<e&&(C=-1)):c=!1;if(c&&(c=I||o),(1===C||4===n)&&(x=1===n||2===n?e:e+1,E=t.position-t.lineStart,1===C?c&&(N(t,E)||function(t,e,n){var r,i,o,s,a,u=t.tag,c=t.anchor,f={},l={},p=null,h=null,d=null,g=!1,v=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=f),a=t.input.charCodeAt(t.position);0!==a;){if(r=t.input.charCodeAt(t.position+1),o=t.line,s=t.position,(63===a||58===a)&&m(r))63===a?(g&&(j(t,f,l,p,h,null),p=h=d=null),v=!0,g=!0,i=!0):g?(g=!1,i=!0):k(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,a=r;else if(U(t,n,2,!1,!0)){if(t.line===o){for(a=t.input.charCodeAt(t.position);y(a);)a=t.input.charCodeAt(++t.position);if(58===a)m(a=t.input.charCodeAt(++t.position))||k(t,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(j(t,f,l,p,h,null),p=h=d=null),v=!0,g=!1,i=!1,p=t.tag,h=t.result;else{if(!v)return t.tag=u,t.anchor=c,!0;k(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=u,t.anchor=c,!0;k(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else break;if((t.line===o||t.lineIndent>e)&&(U(t,e,4,!0,i)&&(g?h=t.result:d=t.result),g||(j(t,f,l,p,h,d,o,s),p=h=d=null),B(t,!0,-1),a=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==a)k(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return g&&j(t,f,l,p,h,null),v&&(t.tag=u,t.anchor=c,t.kind="mapping",t.result=f),v}(t,E,x))||function(t,e){var n,r,i,o,s,a,u,c,f,l,p=!0,h=t.tag,d=t.anchor,g={};if(91===(l=t.input.charCodeAt(t.position)))i=93,a=!1,r=[];else{if(123!==l)return!1;i=125,a=!0,r={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=r),l=t.input.charCodeAt(++t.position);0!==l;){if(B(t,!0,e),(l=t.input.charCodeAt(t.position))===i)return t.position++,t.tag=h,t.anchor=d,t.kind=a?"mapping":"sequence",t.result=r,!0;p||k(t,"missed comma between flow collection entries"),c=u=f=null,o=s=!1,63===l&&m(t.input.charCodeAt(t.position+1))&&(o=s=!0,t.position++,B(t,!0,e)),n=t.line,U(t,e,1,!1,!0),c=t.tag,u=t.result,B(t,!0,e),l=t.input.charCodeAt(t.position),(s||t.line===n)&&58===l&&(o=!0,l=t.input.charCodeAt(++t.position),B(t,!0,e),U(t,e,1,!1,!0),f=t.result),a?j(t,r,g,c,u,f):o?r.push(j(t,null,g,c,u,f)):r.push(u),B(t,!0,e),44===(l=t.input.charCodeAt(t.position))?(p=!0,l=t.input.charCodeAt(++t.position)):p=!1}k(t,"unexpected end of the stream within a flow collection")}(t,x)?S=!0:(a&&function(t,e){var n,i,o,s,a,u=1,c=!1,f=!1,l=e,p=0,h=!1;if(124===(a=t.input.charCodeAt(t.position)))o=!1;else{if(62!==a)return!1;o=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===u?u=43===a?3:2:k(t,"repeat of a chomping mode identifier");else if((s=48<=(n=a)&&n<=57?n-48:-1)>=0)0===s?k(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):f?k(t,"repeat of an indentation width identifier"):(l=e+s-1,f=!0);else break;if(y(a)){do a=t.input.charCodeAt(++t.position);while(y(a));if(35===a)do a=t.input.charCodeAt(++t.position);while(!g(a)&&0!==a)}for(;0!==a;){for(M(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!f||t.lineIndent<l)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!f&&t.lineIndent>l&&(l=t.lineIndent),g(a)){p++;continue}if(t.lineIndent<l){3===u?t.result+=r.repeat("\n",c?1+p:p):1===u&&c&&(t.result+="\n");break}for(o?y(a)?(h=!0,t.result+=r.repeat("\n",c?1+p:p)):h?(h=!1,t.result+=r.repeat("\n",p+1)):0===p?c&&(t.result+=" "):t.result+=r.repeat("\n",p):t.result+=r.repeat("\n",c?1+p:p),c=!0,f=!0,p=0,i=t.position;!g(a)&&0!==a;)a=t.input.charCodeAt(++t.position);O(t,i,t.position,!1)}return!0}(t,x)||function(t,e){var n,r,i;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(O(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else g(n)?(O(t,r,i,!0),F(t,B(t,!1,e)),r=i=t.position):t.position===t.lineStart&&L(t)?k(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);k(t,"unexpected end of the stream within a single quoted scalar")}(t,x)||function(t,e){var n,r,i,o,s,a,u,c;if(34!==(a=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(a=t.input.charCodeAt(t.position));){if(34===a)return O(t,n,t.position,!0),t.position++,!0;if(92===a){if(O(t,n,t.position,!0),g(a=t.input.charCodeAt(++t.position)))B(t,!1,e);else if(a<256&&A[a])t.result+=w[a],t.position++;else if((s=120===(u=a)?2:117===u?4:85===u?8:0)>0){for(i=s,o=0;i>0;i--)(s=function(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}(a=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+s:k(t,"expected hexadecimal character");t.result+=(c=o)<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320),t.position++}else k(t,"unknown escape sequence");n=r=t.position}else g(a)?(O(t,n,r,!0),F(t,B(t,!1,e)),n=r=t.position):t.position===t.lineStart&&L(t)?k(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}k(t,"unexpected end of the stream within a double quoted scalar")}(t,x)?S=!0:function(t){var e,n,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!m(r)&&!v(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&k(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),u.call(t.anchorMap,n)||k(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],B(t,!0,-1),!0}(t)?(S=!0,(null!==t.tag||null!==t.anchor)&&k(t,"alias node should not have any properties")):function(t,e,n){var r,i,o,s,a,u,c,f,l=t.kind,p=t.result;if(m(f=t.input.charCodeAt(t.position))||v(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f||(63===f||45===f)&&(m(r=t.input.charCodeAt(t.position+1))||n&&v(r)))return!1;for(t.kind="scalar",t.result="",i=o=t.position,s=!1;0!==f;){if(58===f){if(m(r=t.input.charCodeAt(t.position+1))||n&&v(r))break}else if(35===f){if(m(t.input.charCodeAt(t.position-1)))break}else if(t.position===t.lineStart&&L(t)||n&&v(f))break;else if(g(f)){if(a=t.line,u=t.lineStart,c=t.lineIndent,B(t,!1,-1),t.lineIndent>=e){s=!0,f=t.input.charCodeAt(t.position);continue}t.position=o,t.line=a,t.lineStart=u,t.lineIndent=c;break}s&&(O(t,i,o,!1),F(t,t.line-a),i=o=t.position,s=!1),y(f)||(o=t.position+1),f=t.input.charCodeAt(++t.position)}return O(t,i,o,!1),!!t.result||(t.kind=l,t.result=p,!1)}(t,x,1===n)&&(S=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===C&&(S=c&&N(t,E))),null!==t.tag&&"!"!==t.tag){if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&k(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f<d;f+=1)if((b=t.implicitTypes[f]).resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else u.call(t.typeMap[t.kind||"fallback"],t.tag)?(b=t.typeMap[t.kind||"fallback"][t.tag],null!==t.result&&b.kind!==t.kind&&k(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+b.kind+'", not "'+t.kind+'"'),b.resolve(t.result)?(t.result=b.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):k(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):k(t,"unknown tag !<"+t.tag+">")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||S}function _(t,e){t=String(t),e=e||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new E(t,e),r=t.indexOf("\0");for(-1!==r&&(n.position=r,k(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)!function(t){var e,n,r,i,o=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(i=t.input.charCodeAt(t.position))&&(B(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0)&&37===i);){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!m(i);)i=t.input.charCodeAt(++t.position);for(n=t.input.slice(e,t.position),r=[],n.length<1&&k(t,"directive name must not be less than one character in length");0!==i;){for(;y(i);)i=t.input.charCodeAt(++t.position);if(35===i){do i=t.input.charCodeAt(++t.position);while(0!==i&&!g(i));break}if(g(i))break;for(e=t.position;0!==i&&!m(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==i&&M(t),u.call(S,n)?S[n](t,n,r):I(t,'unknown document directive "'+n+'"')}if(B(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,B(t,!0,-1)):s&&k(t,"directives end mark is expected"),U(t,t.lineIndent-1,4,!1,!0),B(t,!0,-1),t.checkLineBreaks&&f.test(t.input.slice(o,t.position))&&I(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&L(t)){46===t.input.charCodeAt(t.position)&&(t.position+=3,B(t,!0,-1));return}t.position<t.length-1&&k(t,"end of the stream or a document separator is expected")}(n);return n.documents}function R(t,e,n){null!==e&&"object"==typeof e&&void 0===n&&(n=e,e=null);var r=_(t,n);if("function"!=typeof e)return r;for(var i=0,o=r.length;i<o;i+=1)e(r[i])}function D(t,e){var n=_(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new i("expected a single document in the stream, but found more")}}t.exports.loadAll=R,t.exports.load=D,t.exports.safeLoadAll=function(t,e,n){return"object"==typeof e&&null!==e&&void 0===n&&(n=e,e=null),R(t,e,r.extend({schema:s},n))},t.exports.safeLoad=function(t,e){return D(t,r.extend({schema:s},e))}},7334:function(t,e,n){"use strict";var r=n(5596);function i(t,e,n,r,i){this.name=t,this.buffer=e,this.position=n,this.line=r,this.column=i}i.prototype.getSnippet=function(t,e){var n,i,o,s,a;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",i=this.position;i>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){n=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(s));)if((s+=1)-this.position>e/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),r.repeat(" ",t)+n+a+o+"\n"+r.repeat(" ",t+this.position-i+n.length)+"^"},i.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),!t&&(e=this.getSnippet())&&(n+=":\n"+e),n},t.exports=i},2409:function(t,e,n){"use strict";var r=n(5596),i=n(4884),o=n(3899);function s(t,e,n){var r=[];return t.include.forEach(function(t){n=s(t,e,n)}),t[e].forEach(function(t){n.forEach(function(e,n){e.tag===t.tag&&e.kind===t.kind&&r.push(n)}),n.push(t)}),n.filter(function(t,e){return -1===r.indexOf(e)})}function a(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(t){n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(r);return n}(this.compiledImplicit,this.compiledExplicit)}a.DEFAULT=null,a.create=function(){var t,e;switch(arguments.length){case 1:t=a.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new i("Wrong number of arguments for Schema.create function")}if(t=r.toArray(t),e=r.toArray(e),!t.every(function(t){return t instanceof a}))throw new i("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof o}))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:t,explicit:e})},t.exports=a},7318:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({include:[n(5796)]})},9321:function(t,e,n){"use strict";var r=n(2409);t.exports=r.DEFAULT=new r({include:[n(5972)],explicit:[n(575),n(7287),n(9811)]})},5972:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({include:[n(7318)],implicit:[n(6145),n(243)],explicit:[n(8964),n(3878),n(8244),n(7300)]})},5322:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({explicit:[n(9483),n(3745),n(6553)]})},5796:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({include:[n(5322)],implicit:[n(3022),n(2648),n(5979),n(3456)]})},3899:function(t,e,n){"use strict";var r=n(4884),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.exports=function(t,e){var n,s;if(Object.keys(e=e||{}).forEach(function(e){if(-1===i.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,s={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){s[String(e)]=t})}),s),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},8964:function(t,e,n){"use strict";try{r=n(1876).Buffer}catch(t){}var r,i=n(3899),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,r=0,i=t.length;for(n=0;n<i;n++)if(!((e=o.indexOf(t.charAt(n)))>64)){if(e<0)return!1;r+=6}return r%8==0},construct:function(t){var e,n,i=t.replace(/[\r\n=]/g,""),s=i.length,a=0,u=[];for(e=0;e<s;e++)e%4==0&&e&&(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return(0==(n=s%4*6)?(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)):18===n?(u.push(a>>10&255),u.push(a>>2&255)):12===n&&u.push(a>>4&255),r)?r.from?r.from(u):new r(u):u},predicate:function(t){return r&&r.isBuffer(t)},represent:function(t){var e,n,r="",i=0,s=t.length;for(e=0;e<s;e++)e%3==0&&e&&(r+=o[i>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]),i=(i<<8)+t[e];return 0==(n=s%3)?r+=o[i>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]:2===n?r+=o[i>>10&63]+o[i>>4&63]+o[i<<2&63]+o[64]:1===n&&(r+=o[i>>2&63]+o[i<<4&63]+o[64]+o[64]),r}})},2648:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},3456:function(t,e,n){"use strict";var r=n(5596),i=n(3899),o=RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=/^[-+]?[0-9]+e/;t.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return!!(null!==t&&o.test(t)&&"_"!==t[t.length-1])},construct:function(t){var e,n,r,i;return(n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e)?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(t){i.unshift(parseFloat(t,10))}),e=0,r=1,i.forEach(function(t){e+=t*r,r*=60}),n*e):n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||r.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(t))return"-0.0";return n=t.toString(10),s.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},5979:function(t,e,n){"use strict";var r=n(5596),i=n(3899);t.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,r,i,o=t.length,s=0,a=!1;if(!o)return!1;if(("-"===(i=t[s])||"+"===i)&&(i=t[++s]),"0"===i){if(s+1===o)return!0;if("b"===(i=t[++s])){for(s++;s<o;s++)if("_"!==(i=t[s])){if("0"!==i&&"1"!==i)return!1;a=!0}return a&&"_"!==i}if("x"===i){for(s++;s<o;s++)if("_"!==(i=t[s])){if(!(48<=(e=t.charCodeAt(s))&&e<=57||65<=e&&e<=70||97<=e&&e<=102))return!1;a=!0}return a&&"_"!==i}for(;s<o;s++)if("_"!==(i=t[s])){if(!(48<=(n=t.charCodeAt(s))&&n<=55))return!1;a=!0}return a&&"_"!==i}if("_"===i)return!1;for(;s<o;s++)if("_"!==(i=t[s])){if(":"===i)break;if(!(48<=(r=t.charCodeAt(s))&&r<=57))return!1;a=!0}return!!a&&"_"!==i&&(":"!==i||/^(:[0-5]?[0-9])+$/.test(t.slice(s)))},construct:function(t){var e,n,r=t,i=1,o=[];return(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),("-"===(e=r[0])||"+"===e)&&("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)?0:"0"===e?"b"===r[1]?i*parseInt(r.slice(2),2):"x"===r[1]?i*parseInt(r,16):i*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),r=0,n=1,o.forEach(function(t){r+=t*n,n*=60}),i*r):i*parseInt(r,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!r.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},9811:function(t,e,n){"use strict";try{r=n(1072)}catch(t){"undefined"!=typeof window&&(r=window.esprima)}var r,i=n(3899);t.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(t){if(null===t)return!1;try{var e=r.parse("("+t+")",{range:!0});if("Program"!==e.type||1!==e.body.length||"ExpressionStatement"!==e.body[0].type||"ArrowFunctionExpression"!==e.body[0].expression.type&&"FunctionExpression"!==e.body[0].expression.type)return!1;return!0}catch(t){return!1}},construct:function(t){var e,n="("+t+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw Error("Failed to resolve function");return(i.body[0].expression.params.forEach(function(t){o.push(t.name)}),e=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type)?Function(o,n.slice(e[0]+1,e[1]-1)):Function(o,"return "+n.slice(e[0],e[1]))},predicate:function(t){return"[object Function]"===Object.prototype.toString.call(t)},represent:function(t){return t.toString()}})},7287:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(t){if(null===t||0===t.length)return!1;var e=/\/([gim]*)$/.exec(t),n="";return"/"!==t[0]||(e&&(n=e[1]),!(n.length>3)&&"/"===t[t.length-n.length-1])},construct:function(t){var e=t,n=/\/([gim]*)$/.exec(t),r="";return"/"===e[0]&&(n&&(r=n[1]),e=e.slice(1,e.length-r.length-1)),new RegExp(e,r)},predicate:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},represent:function(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}})},575:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(t){return void 0===t},represent:function(){return""}})},6553:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},243:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}})},3022:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},3878:function(t,e,n){"use strict";var r=n(3899),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;t.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,r,s,a,u=[];for(e=0,n=t.length;e<n;e+=1){if(r=t[e],a=!1,"[object Object]"!==o.call(r))return!1;for(s in r)if(i.call(r,s)){if(a)return!1;a=!0}if(!a||-1!==u.indexOf(s))return!1;u.push(s)}return!0},construct:function(t){return null!==t?t:[]}})},8244:function(t,e,n){"use strict";var r=n(3899),i=Object.prototype.toString;t.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){var e,n,r,o,s;if(null===t)return!0;for(e=0,s=Array(t.length),n=t.length;e<n;e+=1){if(r=t[e],"[object Object]"!==i.call(r)||1!==(o=Object.keys(r)).length)return!1;s[e]=[o[0],r[o[0]]]}return!0},construct:function(t){var e,n,r,i,o;if(null===t)return[];for(e=0,o=Array(t.length),n=t.length;e<n;e+=1)i=Object.keys(r=t[e]),o[e]=[i[0],r[i[0]]];return o}})},3745:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},7300:function(t,e,n){"use strict";var r=n(3899),i=Object.prototype.hasOwnProperty;t.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){var e;if(null===t)return!0;for(e in t)if(i.call(t,e)&&null!==t[e])return!1;return!0},construct:function(t){return null!==t?t:{}}})},9483:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},6145:function(t,e,n){"use strict";var r=n(3899),i=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==i.exec(t)||null!==o.exec(t))},construct:function(t){var e,n,r,s,a,u,c,f,l=0,p=null;if(null===(e=i.exec(t))&&(e=o.exec(t)),null===e)throw Error("Date resolve error");if(n=+e[1],r=+e[2]-1,s=+e[3],!e[4])return new Date(Date.UTC(n,r,s));if(a=+e[4],u=+e[5],c=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(p=(60*+e[10]+ +(e[11]||0))*6e4,"-"===e[9]&&(p=-p)),f=new Date(Date.UTC(n,r,s,a,u,c,l)),p&&f.setTime(f.getTime()-p),f},instanceOf:Date,represent:function(t){return t.toISOString()}})},6521:function(t,e,n){"use strict";n.d(e,{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,n(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,e,n){"use strict";n.d(e,{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,n(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,e,n){"use strict";n.d(e,{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,n(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"}]])},1876:function(t){!function(){var e={675:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return(n+r)*3/4-r},e.toByteArray=function(t){var e,n,o=u(t),s=o[0],a=o[1],c=new i((s+a)*3/4-a),f=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[f++]=255&e),1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(function(t,e,r){for(var i,o=[],s=e;s<r;s+=3)o.push(n[(i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]))>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}(t,s,s+16383>a?a:s+16383));return 1===i?o.push(n[(e=t[r-1])>>2]+n[e<<4&63]+"=="):2===i&&o.push(n[(e=(t[r-2]<<8)+t[r-1])>>10]+n[e>>4&63]+n[e<<2&63]+"="),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(t,e,n){"use strict";/*!
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[320],{3320:function(t,e,n){"use strict";var r=n(2587);t.exports=r},2587:function(t,e,n){"use strict";var r=n(28),i=n(6157);function o(t){return function(){throw Error("Function "+t+" is deprecated and cannot be used.")}}t.exports.Type=n(3899),t.exports.Schema=n(2409),t.exports.FAILSAFE_SCHEMA=n(5322),t.exports.JSON_SCHEMA=n(5796),t.exports.CORE_SCHEMA=n(7318),t.exports.DEFAULT_SAFE_SCHEMA=n(5972),t.exports.DEFAULT_FULL_SCHEMA=n(9321),t.exports.load=r.load,t.exports.loadAll=r.loadAll,t.exports.safeLoad=r.safeLoad,t.exports.safeLoadAll=r.safeLoadAll,t.exports.dump=i.dump,t.exports.safeDump=i.safeDump,t.exports.YAMLException=n(4884),t.exports.MINIMAL_SCHEMA=n(5322),t.exports.SAFE_SCHEMA=n(5972),t.exports.DEFAULT_SCHEMA=n(9321),t.exports.scan=o("scan"),t.exports.parse=o("parse"),t.exports.compose=o("compose"),t.exports.addConstructor=o("addConstructor")},5596:function(t){"use strict";function e(t){return null==t}t.exports.isNothing=e,t.exports.isObject=function(t){return"object"==typeof t&&null!==t},t.exports.toArray=function(t){return Array.isArray(t)?t:e(t)?[]:[t]},t.exports.repeat=function(t,e){var n,r="";for(n=0;n<e;n+=1)r+=t;return r},t.exports.isNegativeZero=function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},t.exports.extend=function(t,e){var n,r,i,o;if(e)for(n=0,r=(o=Object.keys(e)).length;n<r;n+=1)t[i=o[n]]=e[i];return t}},6157:function(t,e,n){"use strict";var r=n(5596),i=n(4884),o=n(9321),s=n(5972),a=Object.prototype.toString,u=Object.prototype.hasOwnProperty,c={};c[0]="\\0",c[7]="\\a",c[8]="\\b",c[9]="\\t",c[10]="\\n",c[11]="\\v",c[12]="\\f",c[13]="\\r",c[27]="\\e",c[34]='\\"',c[92]="\\\\",c[133]="\\N",c[160]="\\_",c[8232]="\\L",c[8233]="\\P";var f=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function l(t){var e,n,o;if(e=t.toString(16).toUpperCase(),t<=255)n="x",o=2;else if(t<=65535)n="u",o=4;else if(t<=4294967295)n="U",o=8;else throw new i("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+r.repeat("0",o-e.length)+e}function p(t){this.schema=t.schema||o,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=r.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(t,e){var n,r,i,o,s,a,c;if(null===e)return{};for(i=0,n={},o=(r=Object.keys(e)).length;i<o;i+=1)a=String(e[s=r[i]]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(c=t.compiledTypeMap.fallback[s])&&u.call(c.styleAliases,a)&&(a=c.styleAliases[a]),n[s]=a;return n}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function h(t,e){for(var n,i=r.repeat(" ",e),o=0,s=-1,a="",u=t.length;o<u;)-1===(s=t.indexOf("\n",o))?(n=t.slice(o),o=u):(n=t.slice(o,s+1),o=s+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function d(t,e){return"\n"+r.repeat(" ",t.indent*e)}function g(t){return 32===t||9===t}function y(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&65279!==t||65536<=t&&t<=1114111}function m(t,e){var n;return y(t)&&65279!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&58!==t&&(35!==t||e&&y(n=e)&&!g(n)&&65279!==n&&13!==n&&10!==n)}function v(t){return/^\n* /.test(t)}function b(t,e){var n=v(t)?String(e):"",r="\n"===t[t.length-1];return n+(r&&("\n"===t[t.length-2]||"\n"===t)?"+":r?"":"-")+"\n"}function A(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function w(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,o=0,s=0,a=0,u="";n=i.exec(t);)(a=n.index)-o>e&&(r=s>o?s:a,u+="\n"+t.slice(o,r),o=r+1),s=a;return u+="\n",t.length-o>e&&s>o?u+=t.slice(o,s)+"\n"+t.slice(s+1):u+=t.slice(o),u.slice(1)}function x(t,e,n){var r,o,s,c,f,l;for(s=0,c=(o=n?t.explicitTypes:t.implicitTypes).length;s<c;s+=1)if(((f=o[s]).instanceOf||f.predicate)&&(!f.instanceOf||"object"==typeof e&&e instanceof f.instanceOf)&&(!f.predicate||f.predicate(e))){if(t.tag=n?f.tag:"?",f.represent){if(l=t.styleMap[f.tag]||f.defaultStyle,"[object Function]"===a.call(f.represent))r=f.represent(e,l);else if(u.call(f.represent,l))r=f.represent[l](e,l);else throw new i("!<"+f.tag+'> tag resolver accepts not "'+l+'" style');t.dump=r}return!0}return!1}function E(t,e){var n=new p(e=e||{});return(n.noRefs||function(t,e){var n,r,i=[],o=[];for(function t(e,n,r){var i,o,s;if(null!==e&&"object"==typeof e){if(-1!==(o=n.indexOf(e)))-1===r.indexOf(o)&&r.push(o);else if(n.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)t(e[o],n,r);else for(o=0,s=(i=Object.keys(e)).length;o<s;o+=1)t(e[i[o]],n,r)}}(t,i,o),n=0,r=o.length;n<r;n+=1)e.duplicates.push(i[o[n]]);e.usedDuplicates=Array(r)}(t,n),function t(e,n,r,o,s,u){e.tag=null,e.dump=r,x(e,r,!1)||x(e,r,!0);var p=a.call(e.dump);o&&(o=e.flowLevel<0||e.flowLevel>n);var E,C,k="[object Object]"===p||"[object Array]"===p;if(k&&(C=-1!==(E=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||C||2!==e.indent&&n>0)&&(s=!1),C&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(k&&C&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),"[object Object]"===p)o&&0!==Object.keys(e.dump).length?(function(e,n,r,o){var s,a,u,c,f,l,p="",h=e.tag,g=Object.keys(r);if(!0===e.sortKeys)g.sort();else if("function"==typeof e.sortKeys)g.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(s=0,a=g.length;s<a;s+=1)l="",o&&0===s||(l+=d(e,n)),c=r[u=g[s]],t(e,n+1,u,!0,!0,!0)&&((f=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,f&&(l+=d(e,n)),t(e,n+1,c,!0,f)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",l+=e.dump,p+=l));e.tag=h,e.dump=p||"{}"}(e,n,e.dump,s),C&&(e.dump="&ref_"+E+e.dump)):(function(e,n,r){var i,o,s,a,u,c="",f=e.tag,l=Object.keys(r);for(i=0,o=l.length;i<o;i+=1)u="",0!==i&&(u+=", "),e.condenseFlow&&(u+='"'),a=r[s=l[i]],t(e,n,s,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),t(e,n,a,!1,!1)&&(u+=e.dump,c+=u));e.tag=f,e.dump="{"+c+"}"}(e,n,e.dump),C&&(e.dump="&ref_"+E+" "+e.dump));else if("[object Array]"===p){var I,S=e.noArrayIndent&&n>0?n-1:n;o&&0!==e.dump.length?(function(e,n,r,i){var o,s,a="",u=e.tag;for(o=0,s=r.length;o<s;o+=1)t(e,n+1,r[o],!0,!0)&&(i&&0===o||(a+=d(e,n)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=u,e.dump=a||"[]"}(e,S,e.dump,s),C&&(e.dump="&ref_"+E+e.dump)):(function(e,n,r){var i,o,s="",a=e.tag;for(i=0,o=r.length;i<o;i+=1)t(e,n,r[i],!1,!1)&&(0!==i&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=a,e.dump="["+s+"]"}(e,S,e.dump),C&&(e.dump="&ref_"+E+" "+e.dump))}else if("[object String]"===p)"?"!==e.tag&&(I=e.dump,e.dump=function(){if(0===I.length)return"''";if(!e.noCompatMode&&-1!==f.indexOf(I))return"'"+I+"'";var t=e.indent*Math.max(1,n),r=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-t);switch(function(t,e,n,r,i){var o,s,a,u,c=!1,f=!1,l=-1!==r,p=-1,h=y(o=t.charCodeAt(0))&&65279!==o&&!g(o)&&45!==o&&63!==o&&58!==o&&44!==o&&91!==o&&93!==o&&123!==o&&125!==o&&35!==o&&38!==o&&42!==o&&33!==o&&124!==o&&61!==o&&62!==o&&39!==o&&34!==o&&37!==o&&64!==o&&96!==o&&!g(t.charCodeAt(t.length-1));if(e)for(s=0;s<t.length;s++){if(!y(a=t.charCodeAt(s)))return 5;u=s>0?t.charCodeAt(s-1):null,h=h&&m(a,u)}else{for(s=0;s<t.length;s++){if(10===(a=t.charCodeAt(s)))c=!0,l&&(f=f||s-p-1>r&&" "!==t[p+1],p=s);else if(!y(a))return 5;u=s>0?t.charCodeAt(s-1):null,h=h&&m(a,u)}f=f||l&&s-p-1>r&&" "!==t[p+1]}return c||f?n>9&&v(t)?5:f?4:3:h&&!i(t)?1:2}(I,u||e.flowLevel>-1&&n>=e.flowLevel,e.indent,r,function(t){return function(t,e){var n,r;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(t.implicitTypes[n].resolve(e))return!0;return!1}(e,t)})){case 1:return I;case 2:return"'"+I.replace(/'/g,"''")+"'";case 3:return"|"+b(I,e.indent)+A(h(I,t));case 4:return">"+b(I,e.indent)+A(h(function(t,e){for(var n,r,i,o=/(\n+)([^\n]*)/g,s=(n=-1!==(n=t.indexOf("\n"))?n:t.length,o.lastIndex=n,w(t.slice(0,n),e)),a="\n"===t[0]||" "===t[0];i=o.exec(t);){var u=i[1],c=i[2];r=" "===c[0],s+=u+(a||r||""===c?"":"\n")+w(c,e),a=r}return s}(I,r),t));case 5:return'"'+function(t){for(var e,n,r,i="",o=0;o<t.length;o++){if((e=t.charCodeAt(o))>=55296&&e<=56319&&(n=t.charCodeAt(o+1))>=56320&&n<=57343){i+=l((e-55296)*1024+n-56320+65536),o++;continue}i+=!(r=c[e])&&y(e)?t[o]:r||l(e)}return i}(I,r)+'"';default:throw new i("impossible error: invalid scalar style")}}());else{if(e.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+p)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}(n,0,t,!0,!0))?n.dump+"\n":""}t.exports.dump=E,t.exports.safeDump=function(t,e){return E(t,r.extend({schema:s},e))}},4884:function(t){"use strict";function e(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=e},28:function(t,e,n){"use strict";var r=n(5596),i=n(4884),o=n(7334),s=n(5972),a=n(9321),u=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,l=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,h=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function d(t){return Object.prototype.toString.call(t)}function g(t){return 10===t||13===t}function y(t){return 9===t||32===t}function m(t){return 9===t||32===t||10===t||13===t}function v(t){return 44===t||91===t||93===t||123===t||125===t}function b(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t?" ":9===t?" ":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}for(var A=Array(256),w=Array(256),x=0;x<256;x++)A[x]=b(x)?1:0,w[x]=b(x);function E(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||a,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function C(t,e){return new i(e,new o(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function k(t,e){throw C(t,e)}function I(t,e){t.onWarning&&t.onWarning.call(null,C(t,e))}var S={YAML:function(t,e,n){var r,i,o;null!==t.version&&k(t,"duplication of %YAML directive"),1!==n.length&&k(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&k(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&k(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&I(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var r,i;2!==n.length&&k(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||k(t,"ill-formed tag handle (first argument) of the TAG directive"),u.call(t.tagMap,r)&&k(t,'there is a previously declared suffix for "'+r+'" tag handle'),h.test(i)||k(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[r]=i}};function O(t,e,n,r){var i,o,s,a;if(e<n){if(a=t.input.slice(e,n),r)for(i=0,o=a.length;i<o;i+=1)9===(s=a.charCodeAt(i))||32<=s&&s<=1114111||k(t,"expected valid JSON character");else c.test(a)&&k(t,"the stream contains non-printable characters");t.result+=a}}function T(t,e,n,i){var o,s,a,c;for(r.isObject(n)||k(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,c=(o=Object.keys(n)).length;a<c;a+=1)s=o[a],u.call(e,s)||(e[s]=n[s],i[s]=!0)}function j(t,e,n,r,i,o,s,a){var c,f;if(Array.isArray(i))for(c=0,f=(i=Array.prototype.slice.call(i)).length;c<f;c+=1)Array.isArray(i[c])&&k(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===d(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===d(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===r){if(Array.isArray(o))for(c=0,f=o.length;c<f;c+=1)T(t,e,o[c],n);else T(t,e,o,n)}else!t.json&&!u.call(n,i)&&u.call(e,i)&&(t.line=s||t.line,t.position=a||t.position,k(t,"duplicated mapping key")),e[i]=o,delete n[i];return e}function B(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):k(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function L(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);0!==i;){for(;y(i);)i=t.input.charCodeAt(++t.position);if(e&&35===i)do i=t.input.charCodeAt(++t.position);while(10!==i&&13!==i&&0!==i);if(g(i))for(B(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return -1!==n&&0!==r&&t.lineIndent<n&&I(t,"deficient indentation"),r}function F(t){var e,n=t.position;return!!((45===(e=t.input.charCodeAt(n))||46===e)&&e===t.input.charCodeAt(n+1)&&e===t.input.charCodeAt(n+2)&&(n+=3,0===(e=t.input.charCodeAt(n))||m(e)))}function M(t,e){1===e?t.result+=" ":e>1&&(t.result+=r.repeat("\n",e-1))}function N(t,e){var n,r,i=t.tag,o=t.anchor,s=[],a=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),r=t.input.charCodeAt(t.position);0!==r&&45===r&&m(t.input.charCodeAt(t.position+1));){if(a=!0,t.position++,L(t,!0,-1)&&t.lineIndent<=e){s.push(null),r=t.input.charCodeAt(t.position);continue}if(n=t.line,U(t,e,3,!1,!0),s.push(t.result),L(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)k(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return!!a&&(t.tag=i,t.anchor=o,t.kind="sequence",t.result=s,!0)}function U(t,e,n,i,o){var s,a,c,f,d,b,x,E,C=1,I=!1,S=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=c=4===n||3===n,i&&L(t,!0,-1)&&(I=!0,t.lineIndent>e?C=1:t.lineIndent===e?C=0:t.lineIndent<e&&(C=-1)),1===C)for(;function(t){var e,n,r,i,o=!1,s=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&k(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(o=!0,i=t.input.charCodeAt(++t.position)):33===i?(s=!0,n="!!",i=t.input.charCodeAt(++t.position)):n="!",e=t.position,o){do i=t.input.charCodeAt(++t.position);while(0!==i&&62!==i);t.position<t.length?(r=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):k(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!m(i);)33===i&&(s?k(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),p.test(n)||k(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),l.test(r)&&k(t,"tag suffix cannot contain flow indicator characters")}return r&&!h.test(r)&&k(t,"tag name cannot contain such characters: "+r),o?t.tag=r:u.call(t.tagMap,n)?t.tag=t.tagMap[n]+r:"!"===n?t.tag="!"+r:"!!"===n?t.tag="tag:yaml.org,2002:"+r:k(t,'undeclared tag handle "'+n+'"'),!0}(t)||function(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&k(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!m(n)&&!v(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&k(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}(t);)L(t,!0,-1)?(I=!0,c=s,t.lineIndent>e?C=1:t.lineIndent===e?C=0:t.lineIndent<e&&(C=-1)):c=!1;if(c&&(c=I||o),(1===C||4===n)&&(x=1===n||2===n?e:e+1,E=t.position-t.lineStart,1===C?c&&(N(t,E)||function(t,e,n){var r,i,o,s,a,u=t.tag,c=t.anchor,f={},l={},p=null,h=null,d=null,g=!1,v=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=f),a=t.input.charCodeAt(t.position);0!==a;){if(r=t.input.charCodeAt(t.position+1),o=t.line,s=t.position,(63===a||58===a)&&m(r))63===a?(g&&(j(t,f,l,p,h,null),p=h=d=null),v=!0,g=!0,i=!0):g?(g=!1,i=!0):k(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,a=r;else if(U(t,n,2,!1,!0)){if(t.line===o){for(a=t.input.charCodeAt(t.position);y(a);)a=t.input.charCodeAt(++t.position);if(58===a)m(a=t.input.charCodeAt(++t.position))||k(t,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(j(t,f,l,p,h,null),p=h=d=null),v=!0,g=!1,i=!1,p=t.tag,h=t.result;else{if(!v)return t.tag=u,t.anchor=c,!0;k(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=u,t.anchor=c,!0;k(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else break;if((t.line===o||t.lineIndent>e)&&(U(t,e,4,!0,i)&&(g?h=t.result:d=t.result),g||(j(t,f,l,p,h,d,o,s),p=h=d=null),L(t,!0,-1),a=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==a)k(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return g&&j(t,f,l,p,h,null),v&&(t.tag=u,t.anchor=c,t.kind="mapping",t.result=f),v}(t,E,x))||function(t,e){var n,r,i,o,s,a,u,c,f,l,p=!0,h=t.tag,d=t.anchor,g={};if(91===(l=t.input.charCodeAt(t.position)))i=93,a=!1,r=[];else{if(123!==l)return!1;i=125,a=!0,r={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=r),l=t.input.charCodeAt(++t.position);0!==l;){if(L(t,!0,e),(l=t.input.charCodeAt(t.position))===i)return t.position++,t.tag=h,t.anchor=d,t.kind=a?"mapping":"sequence",t.result=r,!0;p||k(t,"missed comma between flow collection entries"),c=u=f=null,o=s=!1,63===l&&m(t.input.charCodeAt(t.position+1))&&(o=s=!0,t.position++,L(t,!0,e)),n=t.line,U(t,e,1,!1,!0),c=t.tag,u=t.result,L(t,!0,e),l=t.input.charCodeAt(t.position),(s||t.line===n)&&58===l&&(o=!0,l=t.input.charCodeAt(++t.position),L(t,!0,e),U(t,e,1,!1,!0),f=t.result),a?j(t,r,g,c,u,f):o?r.push(j(t,null,g,c,u,f)):r.push(u),L(t,!0,e),44===(l=t.input.charCodeAt(t.position))?(p=!0,l=t.input.charCodeAt(++t.position)):p=!1}k(t,"unexpected end of the stream within a flow collection")}(t,x)?S=!0:(a&&function(t,e){var n,i,o,s,a,u=1,c=!1,f=!1,l=e,p=0,h=!1;if(124===(a=t.input.charCodeAt(t.position)))o=!1;else{if(62!==a)return!1;o=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===u?u=43===a?3:2:k(t,"repeat of a chomping mode identifier");else if((s=48<=(n=a)&&n<=57?n-48:-1)>=0)0===s?k(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):f?k(t,"repeat of an indentation width identifier"):(l=e+s-1,f=!0);else break;if(y(a)){do a=t.input.charCodeAt(++t.position);while(y(a));if(35===a)do a=t.input.charCodeAt(++t.position);while(!g(a)&&0!==a)}for(;0!==a;){for(B(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!f||t.lineIndent<l)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!f&&t.lineIndent>l&&(l=t.lineIndent),g(a)){p++;continue}if(t.lineIndent<l){3===u?t.result+=r.repeat("\n",c?1+p:p):1===u&&c&&(t.result+="\n");break}for(o?y(a)?(h=!0,t.result+=r.repeat("\n",c?1+p:p)):h?(h=!1,t.result+=r.repeat("\n",p+1)):0===p?c&&(t.result+=" "):t.result+=r.repeat("\n",p):t.result+=r.repeat("\n",c?1+p:p),c=!0,f=!0,p=0,i=t.position;!g(a)&&0!==a;)a=t.input.charCodeAt(++t.position);O(t,i,t.position,!1)}return!0}(t,x)||function(t,e){var n,r,i;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(O(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else g(n)?(O(t,r,i,!0),M(t,L(t,!1,e)),r=i=t.position):t.position===t.lineStart&&F(t)?k(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);k(t,"unexpected end of the stream within a single quoted scalar")}(t,x)||function(t,e){var n,r,i,o,s,a,u,c;if(34!==(a=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(a=t.input.charCodeAt(t.position));){if(34===a)return O(t,n,t.position,!0),t.position++,!0;if(92===a){if(O(t,n,t.position,!0),g(a=t.input.charCodeAt(++t.position)))L(t,!1,e);else if(a<256&&A[a])t.result+=w[a],t.position++;else if((s=120===(u=a)?2:117===u?4:85===u?8:0)>0){for(i=s,o=0;i>0;i--)(s=function(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}(a=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+s:k(t,"expected hexadecimal character");t.result+=(c=o)<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320),t.position++}else k(t,"unknown escape sequence");n=r=t.position}else g(a)?(O(t,n,r,!0),M(t,L(t,!1,e)),n=r=t.position):t.position===t.lineStart&&F(t)?k(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}k(t,"unexpected end of the stream within a double quoted scalar")}(t,x)?S=!0:function(t){var e,n,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!m(r)&&!v(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&k(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),u.call(t.anchorMap,n)||k(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],L(t,!0,-1),!0}(t)?(S=!0,(null!==t.tag||null!==t.anchor)&&k(t,"alias node should not have any properties")):function(t,e,n){var r,i,o,s,a,u,c,f,l=t.kind,p=t.result;if(m(f=t.input.charCodeAt(t.position))||v(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f||(63===f||45===f)&&(m(r=t.input.charCodeAt(t.position+1))||n&&v(r)))return!1;for(t.kind="scalar",t.result="",i=o=t.position,s=!1;0!==f;){if(58===f){if(m(r=t.input.charCodeAt(t.position+1))||n&&v(r))break}else if(35===f){if(m(t.input.charCodeAt(t.position-1)))break}else if(t.position===t.lineStart&&F(t)||n&&v(f))break;else if(g(f)){if(a=t.line,u=t.lineStart,c=t.lineIndent,L(t,!1,-1),t.lineIndent>=e){s=!0,f=t.input.charCodeAt(t.position);continue}t.position=o,t.line=a,t.lineStart=u,t.lineIndent=c;break}s&&(O(t,i,o,!1),M(t,t.line-a),i=o=t.position,s=!1),y(f)||(o=t.position+1),f=t.input.charCodeAt(++t.position)}return O(t,i,o,!1),!!t.result||(t.kind=l,t.result=p,!1)}(t,x,1===n)&&(S=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===C&&(S=c&&N(t,E))),null!==t.tag&&"!"!==t.tag){if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&k(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f<d;f+=1)if((b=t.implicitTypes[f]).resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else u.call(t.typeMap[t.kind||"fallback"],t.tag)?(b=t.typeMap[t.kind||"fallback"][t.tag],null!==t.result&&b.kind!==t.kind&&k(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+b.kind+'", not "'+t.kind+'"'),b.resolve(t.result)?(t.result=b.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):k(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):k(t,"unknown tag !<"+t.tag+">")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||S}function _(t,e){t=String(t),e=e||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new E(t,e),r=t.indexOf("\0");for(-1!==r&&(n.position=r,k(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)!function(t){var e,n,r,i,o=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(i=t.input.charCodeAt(t.position))&&(L(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0)&&37===i);){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!m(i);)i=t.input.charCodeAt(++t.position);for(n=t.input.slice(e,t.position),r=[],n.length<1&&k(t,"directive name must not be less than one character in length");0!==i;){for(;y(i);)i=t.input.charCodeAt(++t.position);if(35===i){do i=t.input.charCodeAt(++t.position);while(0!==i&&!g(i));break}if(g(i))break;for(e=t.position;0!==i&&!m(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==i&&B(t),u.call(S,n)?S[n](t,n,r):I(t,'unknown document directive "'+n+'"')}if(L(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,L(t,!0,-1)):s&&k(t,"directives end mark is expected"),U(t,t.lineIndent-1,4,!1,!0),L(t,!0,-1),t.checkLineBreaks&&f.test(t.input.slice(o,t.position))&&I(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&F(t)){46===t.input.charCodeAt(t.position)&&(t.position+=3,L(t,!0,-1));return}t.position<t.length-1&&k(t,"end of the stream or a document separator is expected")}(n);return n.documents}function R(t,e,n){null!==e&&"object"==typeof e&&void 0===n&&(n=e,e=null);var r=_(t,n);if("function"!=typeof e)return r;for(var i=0,o=r.length;i<o;i+=1)e(r[i])}function D(t,e){var n=_(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new i("expected a single document in the stream, but found more")}}t.exports.loadAll=R,t.exports.load=D,t.exports.safeLoadAll=function(t,e,n){return"object"==typeof e&&null!==e&&void 0===n&&(n=e,e=null),R(t,e,r.extend({schema:s},n))},t.exports.safeLoad=function(t,e){return D(t,r.extend({schema:s},e))}},7334:function(t,e,n){"use strict";var r=n(5596);function i(t,e,n,r,i){this.name=t,this.buffer=e,this.position=n,this.line=r,this.column=i}i.prototype.getSnippet=function(t,e){var n,i,o,s,a;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",i=this.position;i>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){n=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(s));)if((s+=1)-this.position>e/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),r.repeat(" ",t)+n+a+o+"\n"+r.repeat(" ",t+this.position-i+n.length)+"^"},i.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),!t&&(e=this.getSnippet())&&(n+=":\n"+e),n},t.exports=i},2409:function(t,e,n){"use strict";var r=n(5596),i=n(4884),o=n(3899);function s(t,e,n){var r=[];return t.include.forEach(function(t){n=s(t,e,n)}),t[e].forEach(function(t){n.forEach(function(e,n){e.tag===t.tag&&e.kind===t.kind&&r.push(n)}),n.push(t)}),n.filter(function(t,e){return -1===r.indexOf(e)})}function a(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(t){n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(r);return n}(this.compiledImplicit,this.compiledExplicit)}a.DEFAULT=null,a.create=function(){var t,e;switch(arguments.length){case 1:t=a.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new i("Wrong number of arguments for Schema.create function")}if(t=r.toArray(t),e=r.toArray(e),!t.every(function(t){return t instanceof a}))throw new i("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof o}))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:t,explicit:e})},t.exports=a},7318:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({include:[n(5796)]})},9321:function(t,e,n){"use strict";var r=n(2409);t.exports=r.DEFAULT=new r({include:[n(5972)],explicit:[n(575),n(7287),n(9811)]})},5972:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({include:[n(7318)],implicit:[n(6145),n(243)],explicit:[n(8964),n(3878),n(8244),n(7300)]})},5322:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({explicit:[n(9483),n(3745),n(6553)]})},5796:function(t,e,n){"use strict";var r=n(2409);t.exports=new r({include:[n(5322)],implicit:[n(3022),n(2648),n(5979),n(3456)]})},3899:function(t,e,n){"use strict";var r=n(4884),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.exports=function(t,e){var n,s;if(Object.keys(e=e||{}).forEach(function(e){if(-1===i.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,s={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){s[String(e)]=t})}),s),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},8964:function(t,e,n){"use strict";try{r=n(1876).Buffer}catch(t){}var r,i=n(3899),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,r=0,i=t.length;for(n=0;n<i;n++)if(!((e=o.indexOf(t.charAt(n)))>64)){if(e<0)return!1;r+=6}return r%8==0},construct:function(t){var e,n,i=t.replace(/[\r\n=]/g,""),s=i.length,a=0,u=[];for(e=0;e<s;e++)e%4==0&&e&&(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return(0==(n=s%4*6)?(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)):18===n?(u.push(a>>10&255),u.push(a>>2&255)):12===n&&u.push(a>>4&255),r)?r.from?r.from(u):new r(u):u},predicate:function(t){return r&&r.isBuffer(t)},represent:function(t){var e,n,r="",i=0,s=t.length;for(e=0;e<s;e++)e%3==0&&e&&(r+=o[i>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]),i=(i<<8)+t[e];return 0==(n=s%3)?r+=o[i>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]:2===n?r+=o[i>>10&63]+o[i>>4&63]+o[i<<2&63]+o[64]:1===n&&(r+=o[i>>2&63]+o[i<<4&63]+o[64]+o[64]),r}})},2648:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},3456:function(t,e,n){"use strict";var r=n(5596),i=n(3899),o=RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=/^[-+]?[0-9]+e/;t.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return!!(null!==t&&o.test(t)&&"_"!==t[t.length-1])},construct:function(t){var e,n,r,i;return(n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e)?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(t){i.unshift(parseFloat(t,10))}),e=0,r=1,i.forEach(function(t){e+=t*r,r*=60}),n*e):n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||r.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(t))return"-0.0";return n=t.toString(10),s.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},5979:function(t,e,n){"use strict";var r=n(5596),i=n(3899);t.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,r,i,o=t.length,s=0,a=!1;if(!o)return!1;if(("-"===(i=t[s])||"+"===i)&&(i=t[++s]),"0"===i){if(s+1===o)return!0;if("b"===(i=t[++s])){for(s++;s<o;s++)if("_"!==(i=t[s])){if("0"!==i&&"1"!==i)return!1;a=!0}return a&&"_"!==i}if("x"===i){for(s++;s<o;s++)if("_"!==(i=t[s])){if(!(48<=(e=t.charCodeAt(s))&&e<=57||65<=e&&e<=70||97<=e&&e<=102))return!1;a=!0}return a&&"_"!==i}for(;s<o;s++)if("_"!==(i=t[s])){if(!(48<=(n=t.charCodeAt(s))&&n<=55))return!1;a=!0}return a&&"_"!==i}if("_"===i)return!1;for(;s<o;s++)if("_"!==(i=t[s])){if(":"===i)break;if(!(48<=(r=t.charCodeAt(s))&&r<=57))return!1;a=!0}return!!a&&"_"!==i&&(":"!==i||/^(:[0-5]?[0-9])+$/.test(t.slice(s)))},construct:function(t){var e,n,r=t,i=1,o=[];return(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),("-"===(e=r[0])||"+"===e)&&("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)?0:"0"===e?"b"===r[1]?i*parseInt(r.slice(2),2):"x"===r[1]?i*parseInt(r,16):i*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),r=0,n=1,o.forEach(function(t){r+=t*n,n*=60}),i*r):i*parseInt(r,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!r.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},9811:function(t,e,n){"use strict";try{r=n(1072)}catch(t){"undefined"!=typeof window&&(r=window.esprima)}var r,i=n(3899);t.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(t){if(null===t)return!1;try{var e=r.parse("("+t+")",{range:!0});if("Program"!==e.type||1!==e.body.length||"ExpressionStatement"!==e.body[0].type||"ArrowFunctionExpression"!==e.body[0].expression.type&&"FunctionExpression"!==e.body[0].expression.type)return!1;return!0}catch(t){return!1}},construct:function(t){var e,n="("+t+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw Error("Failed to resolve function");return(i.body[0].expression.params.forEach(function(t){o.push(t.name)}),e=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type)?Function(o,n.slice(e[0]+1,e[1]-1)):Function(o,"return "+n.slice(e[0],e[1]))},predicate:function(t){return"[object Function]"===Object.prototype.toString.call(t)},represent:function(t){return t.toString()}})},7287:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(t){if(null===t||0===t.length)return!1;var e=/\/([gim]*)$/.exec(t),n="";return"/"!==t[0]||(e&&(n=e[1]),!(n.length>3)&&"/"===t[t.length-n.length-1])},construct:function(t){var e=t,n=/\/([gim]*)$/.exec(t),r="";return"/"===e[0]&&(n&&(r=n[1]),e=e.slice(1,e.length-r.length-1)),new RegExp(e,r)},predicate:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},represent:function(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}})},575:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(t){return void 0===t},represent:function(){return""}})},6553:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},243:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}})},3022:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},3878:function(t,e,n){"use strict";var r=n(3899),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;t.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,r,s,a,u=[];for(e=0,n=t.length;e<n;e+=1){if(r=t[e],a=!1,"[object Object]"!==o.call(r))return!1;for(s in r)if(i.call(r,s)){if(a)return!1;a=!0}if(!a||-1!==u.indexOf(s))return!1;u.push(s)}return!0},construct:function(t){return null!==t?t:[]}})},8244:function(t,e,n){"use strict";var r=n(3899),i=Object.prototype.toString;t.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){var e,n,r,o,s;if(null===t)return!0;for(e=0,s=Array(t.length),n=t.length;e<n;e+=1){if(r=t[e],"[object Object]"!==i.call(r)||1!==(o=Object.keys(r)).length)return!1;s[e]=[o[0],r[o[0]]]}return!0},construct:function(t){var e,n,r,i,o;if(null===t)return[];for(e=0,o=Array(t.length),n=t.length;e<n;e+=1)i=Object.keys(r=t[e]),o[e]=[i[0],r[i[0]]];return o}})},3745:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},7300:function(t,e,n){"use strict";var r=n(3899),i=Object.prototype.hasOwnProperty;t.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){var e;if(null===t)return!0;for(e in t)if(i.call(t,e)&&null!==t[e])return!1;return!0},construct:function(t){return null!==t?t:{}}})},9483:function(t,e,n){"use strict";var r=n(3899);t.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},6145:function(t,e,n){"use strict";var r=n(3899),i=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==i.exec(t)||null!==o.exec(t))},construct:function(t){var e,n,r,s,a,u,c,f,l=0,p=null;if(null===(e=i.exec(t))&&(e=o.exec(t)),null===e)throw Error("Date resolve error");if(n=+e[1],r=+e[2]-1,s=+e[3],!e[4])return new Date(Date.UTC(n,r,s));if(a=+e[4],u=+e[5],c=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(p=(60*+e[10]+ +(e[11]||0))*6e4,"-"===e[9]&&(p=-p)),f=new Date(Date.UTC(n,r,s,a,u,c,l)),p&&f.setTime(f.getTime()-p),f},instanceOf:Date,represent:function(t){return t.toISOString()}})},1876:function(t){!function(){var e={675:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return(n+r)*3/4-r},e.toByteArray=function(t){var e,n,o=u(t),s=o[0],a=o[1],c=new i((s+a)*3/4-a),f=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[f++]=255&e),1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(function(t,e,r){for(var i,o=[],s=e;s<r;s+=3)o.push(n[(i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]))>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}(t,s,s+16383>a?a:s+16383));return 1===i?o.push(n[(e=t[r-1])>>2]+n[e<<4&63]+"=="):2===i&&o.push(n[(e=(t[r-2]<<8)+t[r-1])>>10]+n[e>>4&63]+n[e<<2&63]+"="),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(t,e,n){"use strict";/*!
|
17
2
|
* The buffer module from node.js, for the browser.
|
18
3
|
*
|
19
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[470],{3850:function(e,t,n){n.d(t,{E9:function(){return w},J$:function(){return c},PC:function(){return f},Ps:function(){return a},QT:function(){return h},Vp:function(){return x},W2:function(){return l},Ye:function(){return d},aD:function(){return j},fp:function(){return u},fy:function(){return p},h0:function(){return m},lM:function(){return v},mU:function(){return g},oy:function(){return y}});var r=n(5893);n(7294);var s=n(8507),o=n(8586),i=n(9611);function a(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"})})}function l(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function c(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function d(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M6 12l4 4 8-8"})})}function u(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),(0,r.jsx)("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"})]})}function h(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,r.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,r.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}function x(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"}),(0,r.jsx)("rect",{width:"20",height:"14",x:"2",y:"6",rx:"2"})]})}function f(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"}),(0,r.jsx)("rect",{x:"9",y:"9",width:"6",height:"6"}),(0,r.jsx)("line",{x1:"9",y1:"1",x2:"9",y2:"4"}),(0,r.jsx)("line",{x1:"15",y1:"1",x2:"15",y2:"4"}),(0,r.jsx)("line",{x1:"9",y1:"20",x2:"9",y2:"23"}),(0,r.jsx)("line",{x1:"15",y1:"20",x2:"15",y2:"23"}),(0,r.jsx)("line",{x1:"20",y1:"9",x2:"23",y2:"9"}),(0,r.jsx)("line",{x1:"20",y1:"14",x2:"23",y2:"14"}),(0,r.jsx)("line",{x1:"1",y1:"9",x2:"4",y2:"9"}),(0,r.jsx)("line",{x1:"1",y1:"14",x2:"4",y2:"14"})]})}function m(e){return(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,r.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,r.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function p(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function g(e){return(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{transform:"scale(0.85) translate(1.8, 1.8)",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function w(e){return(0,r.jsx)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"})]})})}let j=s.Z,y=o.Z;function v(e){return(0,r.jsx)(i.Z,{...e})}},9470:function(e,t,n){n.d(t,{A:function(){return j}});var r=n(5893),s=n(7294),o=n(5675),i=n.n(o),a=n(1163),l=n(1664),c=n.n(l),d=n(3850),u=n(355),h=n(3225),x=n(6989),f=n(3001);let m=(0,s.createContext)(null);function p(e){let{children:t}=e,[n,o]=(0,s.useState)(!0),[i,a]=(0,s.useState)(null);return(0,s.useEffect)(()=>{fetch("".concat(h.f4,"/api/health")).then(e=>e.json()).then(e=>{e.user&&e.user.name&&a(e.user.name)}).catch(e=>{console.error("Error fetching user data:",e)})},[]),(0,r.jsx)(m.Provider,{value:{isSidebarOpen:n,toggleSidebar:()=>{o(e=>!e)},userEmail:i},children:t})}function g(){let e,t;let n=(0,a.useRouter)(),o=(0,f.X)(),{userEmail:l}=function(){let e=(0,s.useContext)(m);if(!e)throw Error("useSidebar must be used within a SidebarProvider");return e}(),[p,g]=(0,s.useState)(!1),w=(0,s.useRef)(null);(0,s.useEffect)(()=>{function e(e){w.current&&!w.current.contains(e.target)&&g(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[w]);let j=e=>"/workspaces"===e?n.pathname.startsWith("/workspaces")||n.pathname.startsWith("/workspace"):n.pathname.startsWith(e),y=e=>{let t=j(e);return"inline-flex items-center border-b-2 ".concat(t?"border-transparent text-blue-600":"border-transparent hover:text-blue-600"," ").concat(o?"px-2 py-1":"px-1 pt-1 space-x-2")};return(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 bg-white z-30 h-14 px-4 border-b border-gray-200 shadow-sm",children:(0,r.jsxs)("div",{className:"flex items-center h-full",children:[(0,r.jsx)("div",{className:"flex items-center ".concat(o?"space-x-2 mr-2":"space-x-4 mr-6"),children:(0,r.jsx)(c(),{href:"/",className:"flex items-center px-1 pt-1 h-full",prefetch:!1,children:(0,r.jsx)("div",{className:"h-20 w-20 flex items-center justify-center",children:(0,r.jsx)(i(),{src:"".concat(h.GW,"/skypilot.svg"),alt:"SkyPilot Logo",width:80,height:80,priority:!0,className:"w-full h-full object-contain"})})})}),(0,r.jsxs)("div",{className:"flex items-center ".concat(o?"space-x-1":"space-x-2 md:space-x-4"," ").concat(o?"mr-2":"mr-6"),children:[(0,r.jsxs)(c(),{href:"/clusters",className:y("/clusters"),prefetch:!1,children:[(0,r.jsx)(d.QT,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Clusters"})]}),(0,r.jsxs)(c(),{href:"/jobs",className:y("/jobs"),prefetch:!1,children:[(0,r.jsx)(d.Vp,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Jobs"})]}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6 mx-1"}),(0,r.jsxs)(c(),{href:"/infra",className:y("/infra"),prefetch:!1,children:[(0,r.jsx)(d.PC,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Infra"})]}),(0,r.jsxs)(c(),{href:"/workspaces",className:y("/workspaces"),prefetch:!1,children:[(0,r.jsx)(d.E9,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Workspaces"})]}),(0,r.jsxs)(c(),{href:"/users",className:y("/users"),prefetch:!1,children:[(0,r.jsx)(d.oy,{className:"w-4 h-4"}),!o&&(0,r.jsx)("span",{children:"Users"})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-1 ".concat(o?"ml-0":"ml-auto"),children:[(0,r.jsx)(x.WH,{content:"Documentation",className:"text-sm text-muted-foreground",children:(0,r.jsxs)("a",{href:"https://skypilot.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-2 py-1 text-gray-600 hover:text-blue-600 transition-colors duration-150 cursor-pointer",title:"Docs",children:[!o&&(0,r.jsx)("span",{className:"mr-1",children:"Docs"}),(0,r.jsx)(d.h0,{className:"".concat(o?"w-4 h-4":"w-3.5 h-3.5")})]})}),(0,r.jsx)(x.WH,{content:"GitHub Repository",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"GitHub",children:(0,r.jsx)(d.fy,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(x.WH,{content:"Join Slack",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://slack.skypilot.co/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Slack",children:(0,r.jsx)(d.mU,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)(x.WH,{content:"Leave Feedback",className:"text-sm text-muted-foreground",children:(0,r.jsx)("a",{href:"https://github.com/skypilot-org/skypilot/issues/new",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"Leave Feedback",children:(0,r.jsx)(d.aD,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),(0,r.jsx)("div",{className:"border-l border-gray-200 h-6"}),(0,r.jsx)(x.WH,{content:"Configuration",className:"text-sm text-muted-foreground",children:(0,r.jsx)(c(),{href:"/config",className:"inline-flex items-center justify-center p-2 rounded-full transition-colors duration-150 cursor-pointer ".concat(j("/config")?"text-blue-600 hover:bg-gray-100":"text-gray-600 hover:bg-gray-100"),title:"Configuration",prefetch:!1,children:(0,r.jsx)(u.Z,{className:"".concat(o?"w-4 h-4":"w-5 h-5")})})}),l&&(0,r.jsxs)("div",{className:"relative",ref:w,children:[(0,r.jsx)("button",{onClick:()=>g(!p),className:"inline-flex items-center justify-center p-2 rounded-full text-gray-600 hover:bg-gray-100 transition-colors duration-150 cursor-pointer",title:"User Profile",children:(0,r.jsx)(d.lM,{className:"".concat(o?"w-5 h-5":"w-6 h-6")})}),p&&(0,r.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-50 border border-gray-200",children:[(e=l,t=null,l&&l.includes("@")&&(e=l.split("@")[0],t=l),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-4 pt-2 pb-1 text-sm font-medium text-gray-900",children:e}),t&&(0,r.jsx)("div",{className:"px-4 pt-0 pb-2 text-xs text-gray-500",children:t})]})),(0,r.jsx)("div",{className:"border-t border-gray-200 mx-1 my-1"}),(0,r.jsx)(c(),{href:"/users",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-blue-600",onClick:()=>g(!1),prefetch:!1,children:"See all users"})]})]})]})]})})}function w(e){let{children:t,highlighted:n}=e;return(0,f.X)(),(0,r.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,r.jsx)("div",{className:"fixed top-0 left-0 right-0 z-50 shadow-sm",children:(0,r.jsx)(g,{})}),(0,r.jsx)("div",{className:"transition-all duration-200 ease-in-out min-h-screen",style:{paddingTop:"56px"},children:(0,r.jsx)("main",{className:"p-6",children:t})})]})}function j(e){return(0,r.jsx)(p,{children:(0,r.jsx)(w,{...e})})}},8950:function(e,t,n){n.d(t,{Bw:function(){return m},Ph:function(){return d},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var r=n(5893),s=n(7294),o=n(2067),i=n(5895),a=n(7242),l=n(282),c=n(2350);let d=o.fC;o.ZA;let u=o.B4,h=s.forwardRef((e,t)=>{let{className:n,children:s,...a}=e;return(0,r.jsxs)(o.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...a,children:[s,(0,r.jsx)(o.JO,{asChild:!0,children:(0,r.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=o.xz.displayName;let x=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(a.Z,{className:"h-4 w-4"})})});x.displayName=o.u_.displayName;let f=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",n),...s,children:(0,r.jsx)(i.Z,{className:"h-4 w-4"})})});f.displayName=o.$G.displayName;let m=s.forwardRef((e,t)=>{let{className:n,children:s,position:i="popper",...a}=e;return(0,r.jsx)(o.h_,{children:(0,r.jsxs)(o.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:i,...a,children:[(0,r.jsx)(x,{}),(0,r.jsx)(o.l_,{className:(0,c.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,r.jsx)(f,{})]})})});m.displayName=o.VY.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...s})}).displayName=o.__.displayName;let p=s.forwardRef((e,t)=>{let{className:n,children:s,...i}=e;return(0,r.jsxs)(o.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...i,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(o.wU,{children:(0,r.jsx)(l.Z,{className:"h-4 w-4"})})}),(0,r.jsx)(o.eT,{children:s})]})});p.displayName=o.ck.displayName,s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(o.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",n),...s})}).displayName=o.Z0.displayName},6989:function(e,t,n){n.d(t,{$B:function(){return g},GV:function(){return d},LU:function(){return m},Md:function(){return f},WH:function(){return x},q8:function(){return p},yc:function(){return l}});var r=n(5893),s=n(7294),o=n(3302),i=n(1886),a=n(8950);let l=n(1214).nb.REFRESH_INTERVAL;function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){if(!e)return"N/A";let t=new Date;return 7>Math.abs((t-e)/864e5)?(0,r.jsx)(x,{content:u(e),className:"capitalize text-sm text-muted-foreground",children:c((0,i.B)(e,t,{addSuffix:!0}))}):(0,r.jsx)(x,{content:c(u(e)),className:"text-sm text-muted-foreground",children:c(e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(",",""))})}function u(e){return e.toLocaleString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZoneName:"short"}).replace(",","")}let h={placement:"bottom",color:"default"},x=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm capitalize rounded",children:s}),children:t})},f=e=>{let{children:t,...n}=e,s=n.content;return n.content=void 0,(0,r.jsx)(o.e,{...h,...n,content:(0,r.jsx)("span",{className:"left-full w-max px-2 py-1 text-sm text-gray-100 bg-gray-500 text-sm rounded",children:s}),children:t})};function m(e){if(!e&&0!==e)return"-";let t=e=Math.floor(e),n="",r=0;for(let e of[{value:86400,label:"d"},{value:3600,label:"h"},{value:60,label:"m"},{value:1,label:"s"}])if(t>=e.value&&r<2){let s=Math.floor(t/e.value);n+="".concat(s).concat(e.label," "),t%=e.value,r++}return n.trim()||"0s"}function p(e){return e?(e=e.split("\n").filter(e=>!e.match(/<rich_.*?\[bold cyan\]/)&&!e.match(/<rich_.*>.*<\/rich_.*>/)&&!e.match(/├──/)&&!e.match(/└──/)).join("\n").replace(/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGKH]/g,"")).split("\n").map(e=>{let t=e.match(/^([IWED])\s+(\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+([^:]+:\d+\])(.*)/);if(t){let[e,n,r,s,o]=t,i={I:"INFO",W:"WARNING",E:"ERROR",D:"DEBUG"}[n]||"";return'<span class="log-line '.concat(i,'"><span class="level">').concat(n,'</span><span class="timestamp">').concat(r,'</span><span class="location">').concat(s,'</span><span class="message">').concat(o,"</span></span>")}let n=e.match(/^(\([^)]+\))(.*)$/);if(n){let[e,t,r]=n;return'<span class="log-line"><span class="log-prefix">'.concat(t,'</span><span class="log-rest">').concat(r,"</span></span>")}return'<span class="log-line"><span class="message">'.concat(e,"</span></span>")}).join("\n"):""}function g(e){let{logs:t,controller:n=!1}=e,[o,i]=(0,s.useState)("all"),[l,c]=(0,s.useState)(t),[d,u]=(0,s.useState)([]);return(0,s.useEffect)(()=>{u(function(e){let t;let n=/\((head|worker\d+),/g,r=new Set;for(;null!==(t=n.exec(e));)r.add(t[1]);return Array.from(r).sort((e,t)=>"head"===e?-1:"head"===t?1:e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"}))}(t))},[t]),(0,s.useEffect)(()=>{"all"===o?c(t):c(t.split("\n").filter(e=>e.includes("(".concat(o,","))).join("\n"))},[o,t]),(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{children:'\n .logs-container {\n background-color: #f7f7f7;\n padding: 16px;\n max-height: calc(100vh - 300px);\n overflow-y: auto;\n overflow-x: hidden;\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n line-height: 1.5;\n border-radius: 6px;\n min-height: fit-content;\n }\n\n .log-line {\n display: block;\n white-space: pre-wrap;\n margin: 2px 0;\n }\n\n .log-line .level {\n display: inline;\n width: 1ch;\n margin-right: 1ch;\n font-weight: bold;\n }\n\n .log-line.INFO .level {\n color: #2563eb;\n }\n\n .log-line.WARNING .level {\n color: #d97706;\n }\n\n .log-line.ERROR .level {\n color: #dc2626;\n }\n\n .log-line.DEBUG .level {\n color: #6b7280;\n }\n\n .log-line .timestamp {\n color: #059669;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .location {\n color: #6366f1;\n margin-right: 1ch;\n white-space: nowrap;\n }\n\n .log-line .message {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n\n .log-line .log-prefix {\n color: #6366f1;\n font-weight: 500;\n }\n\n .log-line .log-rest {\n color: #111827;\n word-break: break-word;\n white-space: pre-wrap;\n }\n'}),!n&&(0,r.jsx)("div",{style:{marginBottom:"1rem"},children:(0,r.jsxs)(a.Ph,{onValueChange:e=>i(e),value:o,children:[(0,r.jsx)(a.i4,{"aria-label":"Node",className:"focus:ring-0 focus:ring-offset-0",children:(0,r.jsx)(a.ki,{placeholder:"Select Node"})}),(0,r.jsxs)(a.Bw,{children:[(0,r.jsx)(a.Ql,{value:"all",children:"All Nodes"}),d.map(e=>(0,r.jsx)(a.Ql,{value:e,children:e},e))]})]})}),(0,r.jsx)("div",{className:"logs-container",dangerouslySetInnerHTML:{__html:p(l)}})]})}},3001:function(e,t,n){n.d(t,{X:function(){return s}});var r=n(7294);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=()=>{n(window.innerWidth<e)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),t}},1214:function(e,t,n){n.d(t,{MO:function(){return o},ej:function(){return r},nb:function(){return s}});let r={DEFAULT_TTL:12e4},s={REFRESH_INTERVAL:3e4,GPU_REFRESH_INTERVAL:3e4},o={NAME_TRUNCATE_LENGTH:20}},2350:function(e,t,n){n.d(t,{cn:function(){return o}});var r=n(512),s=n(8388);function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m6)((0,r.W)(t))}}}]);
|
@@ -0,0 +1,6 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[578],{9037:function(e,s,t){"use strict";t.d(s,{Cc:function(){return M},GV:function(){return V}});var r=t(5893),n=t(7294),l=t(1163),a=t(8799),c=t(6989),i=t(1664),o=t.n(i),d=t(803),h=t(7673),x=t(8764),u=t(3266),p=t(7324),j=t(4545),m=t(3626),f=t(998);/**
|
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 w=(0,f.Z)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),k=(0,f.Z)("SquareCode",[["path",{d:"M10 9.5 8 12l2 2.5",key:"3mjy60"}],["path",{d:"m14 9.5 2 2.5-2 2.5",key:"1bir2l"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var g=t(9470),y=t(9284),N=t(9307),v=t(3001),C=t(8950),b=t(6378),S=t(6856);let _="__ALL_WORKSPACES__";function M(){let e=(0,l.useRouter)(),[s,t]=(0,n.useState)(!1),i=n.useRef(null),[d,h]=(0,n.useState)(!1),[x,j]=(0,n.useState)(!1),[f,w]=(0,n.useState)(null),[k,N]=(0,n.useState)(_),[M,O]=(0,n.useState)([]),R=(0,v.X)();return(0,n.useEffect)(()=>{e.isReady&&e.query.workspace&&N(Array.isArray(e.query.workspace)?e.query.workspace[0]:e.query.workspace)},[e.isReady,e.query.workspace]),(0,n.useEffect)(()=>{(async()=>{try{await S.ZP.preloadForPage("clusters");let e=await b.ZP.get(p.fX),s=Object.keys(e),t=await b.ZP.get(u.getClusters),r=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],n=new Set(s);r.includes("default")&&n.has("default"),r.forEach(e=>n.add(e)),O(Array.from(n).sort())}catch(e){console.error("Error fetching data for workspace filter:",e),O(["default"])}})()},[]),(0,r.jsxs)(g.A,{highlighted:"clusters",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(o(),{href:"/clusters",className:"text-sky-blue hover:underline leading-none",children:"Sky Clusters"}),(0,r.jsxs)(C.Ph,{value:k,onValueChange:N,children:[(0,r.jsx)(C.i4,{className:"h-8 w-48 ml-4 mr-2 text-sm border-none focus:ring-0 focus:outline-none",children:(0,r.jsx)(C.ki,{placeholder:"Filter by workspace...",children:k===_?"All Workspaces":k})}),(0,r.jsxs)(C.Bw,{children:[(0,r.jsx)(C.Ql,{value:_,children:"All Workspaces"}),M.map(e=>(0,r.jsx)(C.Ql,{value:e,children:e},e))]})]})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[s&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(a.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsxs)("button",{onClick:()=>{b.ZP.invalidate(u.getClusters),b.ZP.invalidate(p.fX),i.current&&i.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(m.Z,{className:"h-4 w-4 mr-1.5"}),!R&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(L,{refreshInterval:c.yc,setLoading:t,refreshDataRef:i,workspaceFilter:k,onOpenSSHModal:e=>{w(e),h(!0)},onOpenVSCodeModal:e=>{w(e),j(!0)}}),(0,r.jsx)(y.Oh,{isOpen:d,onClose:()=>h(!1),cluster:f}),(0,r.jsx)(y._R,{isOpen:x,onClose:()=>j(!1),cluster:f})]})}function L(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l,workspaceFilter:i,onOpenSSHModal:p,onOpenVSCodeModal:m}=e,[f,w]=(0,n.useState)([]),[k,g]=(0,n.useState)({key:null,direction:"ascending"}),[y,v]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!0),[M,L]=(0,n.useState)(1),[O,R]=(0,n.useState)(10),Z=n.useCallback(async()=>{t(!0),v(!0),w(await b.ZP.get(u.getClusters)),t(!1),v(!1),S(!1)},[t]),E=n.useMemo(()=>{let e=f;return i&&i!==_&&(e=f.filter(e=>(e.workspace||"default").toLowerCase()===i.toLowerCase())),(0,j.R0)(e,k.key,k.direction)},[f,k,i]);n.useEffect(()=>{l&&(l.current=Z)},[l,Z]),(0,n.useEffect)(()=>{w([]);let e=!0;Z();let t=setInterval(()=>{e&&Z()},s);return()=>{e=!1,clearInterval(t)}},[s,Z]),(0,n.useEffect)(()=>{L(1)},[f.length]);let A=e=>{let s="ascending";k.key===e&&"ascending"===k.direction&&(s="descending"),g({key:e,direction:s})},W=e=>k.key===e?"ascending"===k.direction?" ↑":" ↓":"",q=Math.ceil(E.length/O),P=(M-1)*O,z=P+O,I=E.slice(P,z);return(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Zb,{children:(0,r.jsxs)(x.iA,{children:[(0,r.jsx)(x.xD,{children:(0,r.jsxs)(x.SC,{children:[(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>A("status"),children:["Status",W("status")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>A("cluster"),children:["Cluster",W("cluster")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>A("user"),children:["User",W("user")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>A("workspace"),children:["Workspace",W("workspace")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>A("infra"),children:["Infra",W("infra")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>A("resources_str"),children:["Resources",W("resources_str")]}),(0,r.jsxs)(x.ss,{className:"sortable whitespace-nowrap",onClick:()=>A("time"),children:["Started",W("time")]}),(0,r.jsx)(x.ss,{children:"Actions"})]})}),(0,r.jsx)(x.RM,{children:y&&C?(0,r.jsx)(x.SC,{children:(0,r.jsx)(x.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(a.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):I.length>0?I.map((e,s)=>(0,r.jsxs)(x.SC,{children:[(0,r.jsx)(x.pj,{children:(0,r.jsx)(N.OE,{status:e.status})}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(o(),{href:"/clusters/".concat(e.cluster),className:"text-blue-600",children:e.cluster})}),(0,r.jsx)(x.pj,{children:e.user}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(o(),{href:"/workspaces",className:"text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(c.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(o(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})})}),(0,r.jsx)(x.pj,{children:(0,r.jsx)(c.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(x.pj,{children:(0,c.GV)(e.time)}),(0,r.jsx)(x.pj,{className:"text-left",children:(0,r.jsx)(V,{cluster:e.cluster,status:e.status,onOpenSSHModal:p,onOpenVSCodeModal:m})})]},s)):(0,r.jsx)(x.SC,{children:(0,r.jsx)(x.pj,{colSpan:8,className:"text-center py-6 text-gray-500",children:"No active clusters"})})})]})}),f.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:O,onChange:e=>{R(parseInt(e.target.value,10)),L(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:30,children:"30"}),(0,r.jsx)("option",{value:50,children:"50"}),(0,r.jsx)("option",{value:100,children:"100"}),(0,r.jsx)("option",{value:200,children:"200"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsxs)("div",{children:[P+1," – ",Math.min(z,f.length)," of"," ",f.length]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(d.z,{variant:"ghost",size:"icon",onClick:()=>{L(e=>Math.max(e-1,1))},disabled:1===M,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(d.z,{variant:"ghost",size:"icon",onClick:()=>{L(e=>Math.min(e+1,q))},disabled:M===q||0===q,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}let O=(e,s)=>{s&&s(e)},R=(e,s)=>{s?s(e):window.open("ssh://".concat(e))},Z=e=>"RUNNING"===e?["connect","VSCode"]:[],E={connect:(0,r.jsx)(w,{className:"w-4 h-4 text-gray-500 inline-block"}),VSCode:(0,r.jsx)(k,{className:"w-4 h-4 text-gray-500 inline-block"})};function V(e){let{withLabel:s=!1,cluster:t,status:n,onOpenSSHModal:l,onOpenVSCodeModal:a}=e,i=Z(n),o=(0,v.X)(),d=e=>{switch(e){case"connect":R(t,l);break;case"VSCode":O(t,a);break;default:return}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"flex items-center space-x-4",children:Object.entries(E).map(e=>{let t,n,[l,a]=e;switch(l){case"connect":t="Connect",n="Connect with SSH";break;case"VSCode":t="VSCode",n="Open in VS Code"}return(s||(t=""),i.includes(l))?(0,r.jsx)(c.WH,{content:n,className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:()=>d(l),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[a,!o&&(0,r.jsx)("span",{className:"ml-1.5",children:t})]})},l):(0,r.jsx)(c.WH,{content:n,className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("span",{className:"opacity-30 flex items-center cursor-not-allowed text-sm",title:l,children:[a,!o&&(0,r.jsx)("span",{className:"ml-1.5",children:t})]})},l)})})})}},9008:function(e,s,t){e.exports=t(7219)}}]);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[843],{9333:function(e,s,l){"use strict";l.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,l(998).Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},1812:function(e,s,l){"use strict";l.d(s,{X:function(){return n}});var a=l(5893),t=l(7294);let r=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s.charAt(0).toUpperCase()+s.slice(1)},n=e=>{let{error:s,title:l="Error",onDismiss:n}=e,[c,i]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{s&&i(!1)},[s]),!s||c)return null;let o="string"==typeof s?s:r(s);return(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,a.jsx)("div",{className:"ml-3",children:(0,a.jsxs)("div",{className:"text-sm text-red-800",children:[(0,a.jsxs)("strong",{children:[l,":"]})," ",o]})})]}),(0,a.jsx)("button",{onClick:()=>{i(!0),n&&n()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,a.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},5843:function(e,s,l){"use strict";l.d(s,{I:function(){return z}});var a=l(5893),t=l(7294),r=l(1163),n=l(7324),c=l(3266),i=l(8969),o=l(9470),d=l(1664),u=l.n(d),x=l(9008),h=l.n(x),m=l(7673),f=l(803),g=l(2350);let p=t.forwardRef((e,s)=>{let{className:l,...t}=e;return(0,a.jsx)("textarea",{className:(0,g.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",l),ref:s,...t})});p.displayName="Textarea";var b=l(8799),j=l(282),y=l(3626);/**
|
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 N=(0,l(998).Z)("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);var k=l(9333),v=l(326);let w=e=>{let{className:s="",variant:l="default",children:t,...r}=e;return(0,a.jsx)("div",{role:"alert",className:"".concat("relative w-full rounded-lg border p-4 flex items-start space-x-2"," ").concat({default:"bg-blue-50 border-blue-200 text-blue-800",destructive:"bg-red-50 border-red-200 text-red-800"}[l]," ").concat(s),...r,children:t})},C=e=>{let{className:s="",children:l,...t}=e;return(0,a.jsx)("div",{className:"text-sm leading-relaxed ".concat(s),...t,children:l})};var L=l(3850),E=l(1812),S=l(8236),M=l(3320),D=l.n(M),A=l(3225);let W=e=>{let{message:s}=e;return s?(0,a.jsxs)(w,{className:"border-green-200 bg-green-50",children:[(0,a.jsx)(j.Z,{className:"h-4 w-4 text-green-600"}),(0,a.jsx)(C,{className:"text-green-800",children:s})]}):null},R=e=>{let{workspaceName:s,config:l,enabledClouds:t=[]}=e;if(!l)return null;let r="default"===s,n=0===Object.keys(l).length;if(r&&n)return(0,a.jsx)("div",{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 c=[],i=[],o=[],d=new Set(t.map(e=>e.toLowerCase()));Object.entries(l).forEach(e=>{let[s,l]=e,t=A.MN[s.toLowerCase()],r=d.has(null==t?void 0:t.toLowerCase());if((null==l?void 0:l.disabled)===!0)i.push(t);else if(l&&Object.keys(l).length>0){let e="";"gcp"===s.toLowerCase()&&l.project_id?e=" (Project ID: ".concat(l.project_id,")"):"aws"===s.toLowerCase()&&l.region&&(e=" (Region: ".concat(l.region,")")),r?c.push((0,a.jsxs)("span",{className:"block",children:[t,e," is enabled."]},"".concat(s,"-enabled"))):o.push((0,a.jsxs)("span",{className:"block text-amber-700",children:[t,e," is configured but not currently available."]},"".concat(s,"-configured-not-enabled")))}else r?c.push((0,a.jsxs)("span",{className:"block",children:[t," is enabled (using default settings)."]},"".concat(s,"-default-enabled"))):o.push((0,a.jsxs)("span",{className:"block text-amber-700",children:[t," is configured but not currently available."]},"".concat(s,"-default-not-enabled")))});let u=[];if(i.length>0){let e=i.join(" and ");u.push((0,a.jsxs)("span",{className:"block",children:[e," ",1===i.length?"is":"are"," explicitly disabled."]},"disabled-clouds"))}return(u.push(...c),u.push(...o),u.length>0)?(0,a.jsx)("div",{className:"text-sm text-gray-700 mb-3 p-3 bg-sky-50 rounded border border-sky-200",children:u}):!r&&n?(0,a.jsx)("div",{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};function z(e){let{workspaceName:s,isNewWorkspace:l=!1}=e,d=(0,r.useRouter)(),[x,g]=(0,t.useState)({}),[j,w]=(0,t.useState)({}),[C,M]=(0,t.useState)(""),[A,z]=(0,t.useState)(!0),[O,Z]=(0,t.useState)(!1),[_,T]=(0,t.useState)(!1),[Y,I]=(0,t.useState)(null),[J,P]=(0,t.useState)(null),[V,H]=(0,t.useState)(null),[X,B]=(0,t.useState)({showDialog:!1,deleting:!1,error:null}),[F,U]=(0,t.useState)({totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:[]}),[G,q]=(0,t.useState)(!1),K=(0,t.useCallback)(async()=>{z(!0),I(null);try{let e;let l=(await (0,n.fX)())[s]||{};g(l),w(l),e=0===Object.keys(l).length?"".concat(s,":\n # Empty workspace configuration - uses all accessible infrastructure\n"):D().dump({[s]:l},{indent:2,lineWidth:-1,noRefs:!0,skipInvalid:!0,flowLevel:-1}),M(e)}catch(e){console.error("Error fetching workspace config:",e),I(e)}finally{z(!1)}},[s]),Q=(0,t.useCallback)(async()=>{if(!l){q(!0);try{let[e,l,a]=await Promise.all([(0,c.getClusters)(),(0,i.getManagedJobs)(),(0,n.yz)(s,!0)]),t=e.filter(e=>(e.workspace||"default")===s),r=t.filter(e=>"RUNNING"===e.status||"LAUNCHING"===e.status),o={};e.forEach(e=>{o[e.cluster]=e.workspace||"default"});let d=l.jobs||[],u=new Set(S.x2.active),x=0;d.forEach(e=>{let l=e.cluster_name||e.resources&&e.resources.cluster_name;l&&o[l]===s&&u.has(e.status)&&x++}),U({totalClusterCount:t.length,runningClusterCount:r.length,managedJobsCount:x,clouds:Array.isArray(a)?a:[]})}catch(e){console.error("Failed to fetch workspace stats:",e)}finally{q(!1)}}},[s,l]);(0,t.useEffect)(()=>{l?(z(!1),M("".concat(s,":\n # New workspace configuration\n # Leave empty to use all accessible infrastructure\n"))):(K(),Q())},[s,l,K,Q]),(0,t.useEffect)(()=>{T(JSON.stringify(x)!==JSON.stringify(j))},[x,j]);let $=e=>{M(e),H(null);try{let l=D().load(e)||{},a=Object.keys(l);if(0===a.length)g({});else if(1===a.length){let e=a[0];if(e!==s){H('Workspace name cannot be changed. Expected "'.concat(s,'" but found "').concat(e,'".'));return}let t=l[s]||{};g(t)}else H("Configuration must contain only one workspace. Found: ".concat(a.join(", ")))}catch(e){H("Invalid YAML: ".concat(e.message))}},ee=async()=>{Z(!0),I(null),P(null);try{if(V)throw Error("Please fix YAML errors before saving");let e=D().load(C)||{},a=Object.keys(e);if(a.length>0&&a[0]!==s)throw Error('Workspace name cannot be changed. Expected "'.concat(s,'".'));l?(await (0,n.MB)(s,x),P("Workspace created successfully!"),setTimeout(()=>{d.push("/workspaces/".concat(s))},1500)):(await (0,n.eA)(s,x),P("Workspace updated successfully!"),w(x),Q())}catch(e){console.error("Error saving workspace:",e),I(e)}finally{Z(!1)}},es=async()=>{B(e=>({...e,deleting:!0,error:null}));try{await (0,n.zl)(s),P("Workspace deleted successfully!"),setTimeout(()=>{d.push("/workspaces")},1500)}catch(e){console.error("Error deleting workspace:",e),B(s=>({...s,deleting:!1,error:e}))}},el=()=>{B({showDialog:!1,deleting:!1,error:null})},ea=async()=>{await Promise.all([K(),Q()])};if(!d.isReady)return(0,a.jsx)("div",{children:"Loading..."});let et=l?"Create New Workspace | SkyPilot Dashboard":"Workspace: ".concat(s," | SkyPilot Dashboard");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h(),{children:(0,a.jsx)("title",{children:et})}),(0,a.jsxs)(o.A,{highlighted:"workspaces",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)(u(),{href:"/workspaces",className:"text-sky-blue hover:underline",children:"Workspaces"}),(0,a.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,a.jsx)(u(),{href:l?"/workspace/new":"/workspaces/".concat(s),className:"text-sky-blue hover:underline",children:l?"New Workspace":s}),_&&(0,a.jsx)("span",{className:"ml-3 px-2 py-1 bg-yellow-100 text-yellow-800 text-xs rounded",children:"Unsaved changes"})]}),(0,a.jsxs)("div",{className:"text-sm flex items-center",children:[(A||O||G)&&(0,a.jsxs)("div",{className:"flex items-center mr-4",children:[(0,a.jsx)(b.Z,{size:15,className:"mt-0"}),(0,a.jsx)("span",{className:"ml-2 text-gray-500",children:O?"Saving...":"Loading..."})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[!l&&(0,a.jsxs)("button",{onClick:ea,disabled:A||O||G,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,a.jsx)(y.Z,{className:"w-4 h-4 mr-1.5"}),"Refresh"]}),!l&&"default"!==s&&(0,a.jsxs)("button",{onClick:()=>B({...X,showDialog:!0}),disabled:X.deleting||O,className:"text-red-600 hover:text-red-700 font-medium inline-flex items-center",children:[(0,a.jsx)(N,{className:"w-4 h-4 mr-1.5"}),"Delete"]})]})]})]}),A?(0,a.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,a.jsx)(b.Z,{size:24,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading workspace configuration..."})]}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(E.X,{error:Y,title:"Error",onDismiss:()=>I(null)}),(0,a.jsx)(W,{message:J}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[!l&&(0,a.jsx)("div",{className:"lg:col-span-1",children:(0,a.jsxs)(m.Zb,{className:"h-full",children:[(0,a.jsx)(m.Ol,{children:(0,a.jsxs)(m.ll,{className:"text-base font-normal",children:[(0,a.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s]})}),(0,a.jsxs)(m.aY,{className:"text-sm pb-2 flex-1",children:[(0,a.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,a.jsx)(L.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,a.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,a.jsx)("span",{className:"font-normal text-gray-800",children:G?"...":"".concat(F.runningClusterCount," / ").concat(F.totalClusterCount)})]}),(0,a.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,a.jsx)(L.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,a.jsx)("span",{children:"Managed Jobs"})]}),(0,a.jsx)("span",{className:"font-normal text-gray-800",children:G?"...":F.managedJobsCount})]})]}),(0,a.jsxs)("div",{className:"px-6 pb-6 text-sm pt-3",children:[(0,a.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:G?(0,a.jsx)("span",{className:"text-gray-500",children:"Loading..."}):F.clouds.length>0?F.clouds.map(e=>(0,a.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,a.jsx)(L.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,a.jsx)("span",{children:e})]},e)):(0,a.jsx)("span",{className:"text-gray-500 italic",children:"No enabled infrastructure"})}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(R,{workspaceName:s,config:j,enabledClouds:F.clouds})})]})]})}),(0,a.jsx)("div",{className:l?"lg:col-span-3":"lg:col-span-2",children:(0,a.jsxs)(m.Zb,{className:"h-full flex flex-col",children:[(0,a.jsx)(m.Ol,{children:(0,a.jsx)(m.ll,{className:"text-base font-normal",children:l?"New Workspace YAML":"Edit Workspace YAML"})}),(0,a.jsx)(m.aY,{className:"flex-1 flex flex-col",children:(0,a.jsxs)("div",{className:"space-y-4 flex-1 flex flex-col",children:[V&&(0,a.jsx)(E.X,{error:V,onDismiss:()=>H(null)}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Configure infra-specific settings for this workspace. Leave empty to use all accessible infrastructure. Refer to"," ",(0,a.jsx)("a",{href:"https://docs.skypilot.co/en/latest/admin/workspaces.html#configuration",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600",children:"SkyPilot Docs"})," ","for more details."]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Example configuration:"}),(0,a.jsx)("div",{className:"p-3 bg-gray-50 border rounded-lg",children:(0,a.jsx)("pre",{className:"text-xs font-mono text-gray-600 whitespace-pre-wrap",children:"".concat(s||"my-workspace",":\n gcp:\n project_id: xxx\n disabled: false\n kubernetes:\n allowed_contexts:\n - context-1")})})]}),(0,a.jsx)(p,{value:C,onChange:e=>$(e.target.value),className:"font-mono text-sm flex-1 resize-none",style:{minHeight:"350px"},spellCheck:!1,placeholder:"# Enter workspace configuration in YAML format"}),(0,a.jsx)("div",{className:"flex justify-end space-x-3 pt-3 border-gray-200",children:(0,a.jsxs)(f.z,{onClick:ee,disabled:O||V||A,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:[(0,a.jsx)(k.Z,{className:"w-4 h-4 mr-1.5"}),O?"Applying...":"Apply"]})})]})]})})]})})]})]}),(0,a.jsx)(v.Vq,{open:X.showDialog,onOpenChange:el,children:(0,a.jsxs)(v.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(v.fK,{className:"",children:[(0,a.jsx)(v.$N,{children:"Delete Workspace"}),(0,a.jsxs)(v.Be,{children:['Are you sure you want to delete workspace "',s,'"? This action cannot be undone.']})]}),X.error&&(0,a.jsx)(E.X,{error:X.error,title:"Deletion Failed",onDismiss:()=>B(e=>({...e,error:null}))}),(0,a.jsxs)(v.cN,{className:"",children:[(0,a.jsx)(f.z,{variant:"outline",onClick:el,disabled:X.deleting,children:"Cancel"}),(0,a.jsx)(f.z,{variant:"destructive",onClick:es,disabled:X.deleting,children:X.deleting?"Deleting...":"Delete"})]})]})})]})]})}},9008:function(e,s,l){e.exports=l(7219)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[856],{3266:function(e,t,r){r.d(t,{QL:function(){return u},Sl:function(){return l},getClusters:function(){return c}});var a=r(7294),o=r(5821),n=r(3225);let s={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(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"),a=await fetch("".concat(n.f4,"/api/get?request_id=").concat(r)),o=await a.json();return(o.return_value?JSON.parse(o.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),a=r+(t-3)%2;return 0===r?e.substring(0,a)+"...":e.substring(0,a)+"..."+e.substring(e.length-r)}(t,25)),{status:s[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,region:e.region,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:a,workspace:s}=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:s||"default"}})})).body.getReader();for(;;){let{done:t,value:r}=await e.read();if(t)break;let o=new TextDecoder().decode(r);a(o)}}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,o.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}})}),a=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(n.f4,"/api/get?request_id=").concat(a)),s=await o.json();return JSON.parse(s.return_value).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,a=0,o=0;return e.submitted_at&&(a=r-e.submitted_at),e.start_at&&(o=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:a,job_duration:o,infra:"",logs:""}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function u(e){let{cluster:t,job:r=null}=e,[o,n]=(0,a.useState)(null),[s,l]=(0,a.useState)(null),[u,d]=(0,a.useState)(!0),[g,h]=(0,a.useState)(!0),f=(0,a.useCallback)(async()=>{if(t)try{d(!0);let e=await c({clusterNames:[t]});return n(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{d(!1)}return null},[t]),p=(0,a.useCallback)(async e=>{if(t)try{h(!0);let r=await i({clusterName:t,workspace:e||"default"});l(r)}catch(e){console.error("Error fetching cluster job data:",e)}finally{h(!1)}},[t]),b=(0,a.useCallback)(async()=>{let e=await f();e&&await p(e.workspace)},[f,p]);return(0,a.useEffect)(()=>{(async()=>{let e=await f();e&&await p(e.workspace)})()},[t,r,f,p]),{clusterData:o,clusterJobData:s,loading:u||g,refreshData:b}}},2045:function(e,t,r){r.d(t,{l4:function(){return n}});var a=r(3225);async function o(e,t){try{let r=[];try{let e=await fetch("".concat(a.f4,"/enabled_clouds"),{method:"GET",headers:{"Content-Type":"application/json"}}),t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(t)),n=await o.json();r=n.return_value?JSON.parse(n.return_value):[],console.log("Enabled clouds:",r)}catch(e){console.error("Error fetching enabled clouds:",e),r=[]}let o={};a.$m.forEach(e=>{let t=r.includes(e.toLowerCase());o[e]={name:e,clusters:0,jobs:0,enabled:t}}),e.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].clusters+=1,o[t].enabled=!0)}}),t.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].jobs+=1,o[t].enabled=!0)}});let n=a.$m.length,s=Object.values(o).filter(e=>e.enabled).length;return{clouds:Object.values(o).filter(e=>e.enabled).sort((e,t)=>t.clusters-e.clusters||t.jobs-e.jobs),totalClouds:n,enabledClouds:s}}catch(e){return console.error("Error fetching cloud infrastructure:",e),{clouds:[],totalClouds:a.$m.length,enabledClouds:0}}}async function n(){let{getClusters:e}=await Promise.resolve().then(r.bind(r,3266)),{getManagedJobs:t}=await Promise.resolve().then(r.bind(r,8969)),[a,n]=await Promise.all([e(),t()]),c=a||[],l=(null==n?void 0:n.jobs)||[],[i,u]=await Promise.all([s(c,l),o(c,l)]);return{gpuData:i,cloudData:u}}async function s(e,t){return await d({clusters:e||[],jobs:t||[]})}async function c(){try{let e=await fetch("".concat(a.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(a.f4,"/api/get?request_id=").concat(t)),o=await r.text();if(500===r.status){try{let e=JSON.parse(o);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:",o)}return[]}let n=JSON.parse(o);return n.return_value?JSON.parse(n.return_value):[]}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesContextGPUs:",e),[]}}async function l(){try{let e=await fetch("".concat(a.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(a.f4,"/api/get?request_id=").concat(t)),o=await r.json();return o.return_value?JSON.parse(o.return_value):[]}catch(e){return console.error("[infra.jsx] Error in getAllContexts:",e),[]}}async function i(e){try{let t=await fetch("".concat(a.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"),o=await fetch("".concat(a.f4,"/api/get?request_id=").concat(r));if(500===o.status){try{let e=await o.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 n=await o.json();return(n.return_value?JSON.parse(n.return_value):{}).node_info_dict||{}}catch(t){return console.error("[infra.jsx] Error in getKubernetesPerNodeGPUs for context",e,":",t),{}}}async function u(e){try{let t=e.clusters,r=e.jobs,a={};return t.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].clusters+=1)}),r.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(a[t]||(a[t]={clusters:0,jobs:0}),a[t].jobs+=1)}),a}catch(e){return console.error("=== Error in getContextClustersAndJobs ===",e),{}}}async function d(e){try{let n=await l();if(!n||0===n.length)return console.log("No contexts found from /all_contexts endpoint."),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}};let s=await u(e),d=await c(),g=new Map;d&&d.forEach(e=>{g.set(e[0],e[1])});let h={},f={},p={};for(let e of n){f[e]||(f[e]=[]);let n=g.get(e);if(n&&n.length>0)for(let t of n){let r=t[0],a=t[1].join(", "),o=t[2],n=t[3];r in h?(h[r].gpu_total+=o,h[r].gpu_free+=n):h[r]={gpu_total:o,gpu_free:n,gpu_name:r},f[e].push({gpu_name:r,gpu_requestable_qty_per_node:a,gpu_total:o,gpu_free:n,context:e})}let s=await i(e);if(s&&Object.keys(s).length>0)for(let n in s){var t,r,a,o;let c=s[n],l=c.accelerator_type||"-",i=null!==(a=null===(t=c.total)||void 0===t?void 0:t.accelerator_count)&&void 0!==a?a:0,u=null!==(o=null===(r=c.free)||void 0===r?void 0:r.accelerators_available)&&void 0!==o?o:0;p["".concat(e,"/").concat(n)]={node_name:c.name,gpu_name:l,gpu_total:i,gpu_free:u,context:e},"-"===l||f[e].some(e=>e.gpu_name===l)||(l in h||(h[l]={gpu_total:0,gpu_free:0,gpu_name:l}),f[e].find(e=>e.gpu_name===l)||f[e].push({gpu_name:l,gpu_requestable_qty_per_node:"-",gpu_total:0,gpu_free:0,context:e}))}0===f[e].length&&s&&Object.keys(s).length}return{allContextNames:n.sort(),allGPUs:Object.values(h).sort((e,t)=>e.gpu_name.localeCompare(t.gpu_name)),perContextGPUs:Object.values(f).flat().sort((e,t)=>e.context.localeCompare(t.context)||e.gpu_name.localeCompare(t.gpu_name)),perNodeGPUs:Object.values(p).sort((e,t)=>e.context.localeCompare(t.context)||e.node_name.localeCompare(t.node_name)||e.gpu_name.localeCompare(t.gpu_name)),contextStats:s}}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesGPUs:",e),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}}}}r(3266),r(8969)},8969:function(e,t,r){r.d(t,{Ce:function(){return i},NJ:function(){return l},Pr:function(){return c},getManagedJobs:function(){return s}});var a=r(7294),o=r(5821),n=r(3225);async function s(){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 a=await r.json();return{jobs:(a.return_value?JSON.parse(a.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,a=e.cloud,o=e.cluster_resources;if(!a){if(e.cluster_resources&&"-"!==e.cluster_resources)try{a=e.cluster_resources.split("(")[0].split("x").pop().trim(),o=e.cluster_resources.replace("".concat(a,"("),"(").replace("x ","x")}catch(e){a="Unknown"}else a="Unknown"}let n="",s=n=e.zone?e.zone:e.region;n&&n.length>15&&(n=n.substring(0,15)+"...");let c=a+" ("+n+")";"-"===n&&(c=a);let l=a+" ("+s+")";return"-"===s&&(l=a),{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:o,resources_str_full:e.cluster_resources_full||o,cloud:a,region:e.region,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,a.useState)(null),[o,n]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{(async function(){try{n(!0);let e=await s({allUsers:!0});r(e)}catch(e){console.error("Error fetching managed job data:",e)}finally{n(!1)}})()},[e]),{jobData:t,loading:o}}async function l(e){let{jobId:t,controller:r=!1,signal:a,onNewLog:s}=e,c=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:r,follow:!1,job_id:t}),...a?{signal:a}:{}})).body.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;let a=new TextDecoder().decode(r);s(a)}}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,o.C)("Log request for job ".concat(t," timed out after ").concat(1e4,"ms"),"error");return}}async function i(e,t,r){let a="",s="",c="",l={};if("restartcontroller"===e)a="Restarting",s="restarted",c="jobs/queue",l={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,o.C)("".concat(a," job ").concat(t,"..."),"info");try{try{let e=(await fetch("".concat(n.f4,"/").concat(c),{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,o.C)("Job ".concat(t," ").concat(s," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let s=JSON.parse(e.detail.error);s.type&&s.type===n.Bo?(0,o.C)("".concat(a," job ").concat(t," is not supported!"),"error",1e4):s.type&&s.type===n.mF?(0,o.C)("Cluster ".concat(r," does not exist."),"error"):s.type&&s.type===n.iW?(0,o.C)("Cluster ".concat(r," is not up."),"error"):(0,o.C)("".concat(a," job ").concat(t," failed: ").concat(s.type),"error")}catch(r){(0,o.C)("".concat(a," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,o.C)("".concat(a," job ").concat(t," failed with no details."),"error")}catch(e){(0,o.C)("".concat(a," job ").concat(t," failed with parse error."),"error")}else(0,o.C)("".concat(a," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,o.C)("Network error ".concat(a," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,o.C)("Critical error ".concat(a," job ").concat(t,": ").concat(e.message),"error")}}},5821:function(e,t,r){r.d(t,{C:function(){return a}});function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,a=document.getElementById("toast-container");a||((a=document.createElement("div")).id="toast-container",a.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(a));let o=document.createElement("div");switch(o.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":o.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":o.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":o.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:o.className+=" bg-blue-100 border-blue-500 text-blue-800"}return o.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),a.appendChild(o),o.querySelector("button").addEventListener("click",()=>{a.removeChild(o)}),setTimeout(()=>{a.contains(o)&&a.removeChild(o)},r),o}},3081:function(e,t,r){r.d(t,{R:function(){return l},i:function(){return i}});var a=r(3225),o=r(3266),n=r(8969);let s=e=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",c=e=>e&&e.includes("@")?e:"-";async function l(){try{let e=await fetch("".concat(a.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),[]}}async function i(){let[e,t,r]=await Promise.all([l(),(0,o.getClusters)(),(0,n.getManagedJobs)()]),a=r.jobs||[];return(e||[]).map(e=>{let r=(t||[]).filter(t=>t.user_hash===e.userId),o=(a||[]).filter(t=>t.user_hash===e.userId);return{...e,usernameDisplay:s(e.username),fullEmail:c(e.username),clusterCount:r.length,jobCount:o.length}})}},6856:function(e,t,r){var a=r(6378),o=r(3266),n=r(8969),s=r(7324),c=r(3081),l=r(2045);let i={base:{getClusters:{fn:o.getClusters,args:[]},getManagedJobs:{fn:n.getManagedJobs,args:[]},getWorkspaces:{fn:s.fX,args:[]},getUsers:{fn:c.R,args:[]},getUsersWithCounts:{fn:c.i,args:[]},getInfraData:{fn:l.l4,args:[]}},dynamic:{getEnabledClouds:{fn:s.yz,requiresWorkspaces:!0}},pages:{clusters:["getClusters","getWorkspaces"],jobs:["getManagedJobs","getClusters","getWorkspaces"],infra:["getInfraData"],workspaces:["getWorkspaces","getClusters","getManagedJobs","getEnabledClouds"],users:["getUsersWithCounts"]}};class u{async preloadForPage(e,t){let{backgroundPreload:r=!0,force:a=!1}=t||{};if(!i.pages[e]){console.warn("Unknown page: ".concat(e));return}console.log("[CachePreloader] Preloading cache for page: ".concat(e));try{await this._loadPageData(e,a),r&&this._backgroundPreloadOtherPages(e)}catch(t){console.error("[CachePreloader] Error preloading for page ".concat(e,":"),t)}}async _loadPageData(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i.pages[e],o=[];for(let e of r)if(i.base[e]){let{fn:r,args:n}=i.base[e];t&&a.ZP.invalidate(r,n),o.push(a.ZP.get(r,n))}else"getEnabledClouds"===e&&o.push(this._loadEnabledCloudsForAllWorkspaces(t));await Promise.allSettled(o),console.log("[CachePreloader] Loaded data for page: ".concat(e))}async _loadEnabledCloudsForAllWorkspaces(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{e&&a.ZP.invalidate(s.fX);let t=await a.ZP.get(s.fX),r=Object.keys(t||{}).map(t=>(e&&a.ZP.invalidate(s.yz,[t]),a.ZP.get(s.yz,[t])));await Promise.allSettled(r)}catch(e){console.error("[CachePreloader] Error loading enabled clouds:",e)}}_backgroundPreloadOtherPages(e){if(this.isPreloading)return;this.isPreloading=!0;let t=Object.keys(i.pages).filter(t=>t!==e);console.log("[CachePreloader] Background preloading pages: ".concat(t.join(", "))),Promise.allSettled(t.map(async e=>{try{await this._loadPageData(e,!1),console.log("[CachePreloader] Background loaded: ".concat(e))}catch(t){console.error("[CachePreloader] Background load failed for ".concat(e,":"),t)}})).then(()=>{this.isPreloading=!1,console.log("[CachePreloader] Background preloading complete")})}async preloadBaseFunctions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.log("[CachePreloader] Preloading all base functions");let t=Object.entries(i.base).map(t=>{let[r,{fn:o,args:n}]=t;return e&&a.ZP.invalidate(o,n),a.ZP.get(o,n).catch(e=>{console.error("[CachePreloader] Failed to preload ".concat(r,":"),e)})});await Promise.allSettled(t),console.log("[CachePreloader] Base functions preloaded")}getCacheStats(){return{...a.ZP.getStats(),isPreloading:this.isPreloading,preloadPromises:this.preloadPromises.size}}clearCache(){a.ZP.clear(),this.isPreloading=!1,this.preloadPromises.clear(),console.log("[CachePreloader] Cache cleared")}constructor(){this.isPreloading=!1,this.preloadPromises=new Map}}let d=new u;t.ZP=d},6378:function(e,t,r){let a=r(1214).ej.DEFAULT_TTL;class o{async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.ttl||a,n=!1!==r.refreshOnAccess,s=this._generateKey(e,t),c=e.name||"anonymous",l=this.cache.get(s),i=Date.now();if(l&&i-l.lastUpdated<o){let r=Math.round((i-l.lastUpdated)/1e3);return this._debug("Cache HIT for ".concat(c," (age: ").concat(r,"s, TTL: ").concat(Math.round(o/1e3),"s)")),n&&(this.cache.set(s,{data:l.data,lastUpdated:i}),this._debug("Cache TTL refreshed for ".concat(c))),this.backgroundJobs.has(s)||this._refreshInBackground(e,t,s),l.data}try{let r=await e(...t);return this.cache.set(s,{data:r,lastUpdated:i}),r}catch(e){if(l)return console.warn("Failed to fetch fresh data for ".concat(s,", returning stale data:"),e),l.data;throw e}}invalidate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._generateKey(e,t);this.cache.delete(r),this.backgroundJobs.delete(r)}invalidateFunction(e){let t=e.name||"anonymous",r=[];for(let e of this.cache.keys())e.startsWith("".concat(t,"_"))&&r.push(e);r.forEach(e=>{this.cache.delete(e),this.backgroundJobs.delete(e)})}clear(){this.cache.clear(),this.backgroundJobs.clear()}getStats(){return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,keys:Array.from(this.cache.keys())}}getDetailedStats(){let e=Date.now(),t=[];for(let[r,a]of this.cache.entries()){let o=e-a.lastUpdated;t.push({key:r,age:Math.round(o/1e3),lastUpdated:new Date(a.lastUpdated).toISOString(),hasBackgroundJob:this.backgroundJobs.has(r)})}return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,entries:t.sort((e,t)=>e.age-t.age)}}setDebugMode(e){this.debugMode=e}_debug(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];this.debugMode&&console.log("[DashboardCache] ".concat(e),...r)}_refreshInBackground(e,t,r){this.backgroundJobs.set(r,!0),e(...t).then(e=>{this.cache.set(r,{data:e,lastUpdated:Date.now()})}).catch(e=>{console.warn("Background refresh failed for ".concat(r,":"),e)}).finally(()=>{this.backgroundJobs.delete(r)})}_generateKey(e,t){let r=e.name||"anonymous",a=t.length>0?JSON.stringify(t):"";return"".concat(r,"_").concat(a)}constructor(){this.cache=new Map,this.backgroundJobs=new Map,this.debugMode=!1}}let n=new o;t.ZP=n}}]);
|