(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2265,e=>{"use strict";var t=e.i(76350),r=e.i(33209);e.s(["Card",0,function({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("rounded-lg border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900",e),...n})},"CardBody",0,function({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("px-5 py-4",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("p",{className:(0,r.cn)("text-sm text-zinc-500 dark:text-zinc-400",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("flex items-center justify-end gap-2 border-t border-zinc-200 px-5 py-3 dark:border-zinc-800",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col gap-1 border-b border-zinc-200 px-5 py-4 dark:border-zinc-800",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("h3",{className:(0,r.cn)("text-base font-semibold text-zinc-900 dark:text-zinc-100",e),...n})}])},69393,e=>{"use strict";var t=e.i(76350),r=e.i(33209);let n={neutral:"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",sky:"bg-sky-100 text-sky-700 dark:bg-sky-950 dark:text-sky-300",green:"bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300",amber:"bg-amber-100 text-amber-700 dark:bg-amber-950 dark:text-amber-300",red:"bg-red-100 text-red-700 dark:bg-red-950 dark:text-red-300",purple:"bg-purple-100 text-purple-700 dark:bg-purple-950 dark:text-purple-300"};e.s(["Badge",0,function({tone:e="neutral",className:a,...i}){return(0,t.jsx)("span",{className:(0,r.cn)("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium",n[e],a),...i})}])},51453,e=>{"use strict";var t=e.i(41645),r=e.i(92615);e.s(["getCssDimensions",0,function(e){let n=(0,r.getComputedStyle)(e),a=parseFloat(n.width)||0,i=parseFloat(n.height)||0,s=(0,r.isHTMLElement)(e),d=s?e.offsetWidth:a,l=s?e.offsetHeight:i;return((0,t.round)(a)!==d||(0,t.round)(i)!==l)&&(a=d,i=l),{width:a,height:i}}])},34461,e=>{"use strict";let t=(0,e.i(6927).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],34461)},66399,e=>{"use strict";var t=e.i(76350),r=e.i(73576),n=e.i(55367),a=e.i(84339),i=e.i(64477),s=e.i(82088),d=e.i(83079),l=e.i(69393),c=e.i(31307),o=e.i(21432);let u=new Map;e.s(["RecipeShowDialog",0,function({name:e,title:x,open:p,onOpenChange:g,running:h=!1,showLaunch:m=!0}){let[b,f]=(0,r.useState)(()=>u.get(e)??null),[k,j]=(0,r.useState)(null),[y,v]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!p)return;let t=u.get(e);if(t)return void f(t);let r=!1;return v(!0),j(null),o.rpc.recipes.show({name:e}).then(t=>{r||(u.set(e,t.text),f(t.text))}).catch(e=>{r||j(e instanceof Error?e.message:String(e))}).finally(()=>{r||v(!1)}),()=>{r=!0}},[p,e]),(0,t.jsx)(s.Dialog,{open:p,onOpenChange:g,children:(0,t.jsxs)(s.Dialog.Content,{title:x??e,size:"xl",description:"sparkrun recipe show",children:[(0,t.jsx)(s.Dialog.Body,{children:y&&!b?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-500",children:[(0,t.jsx)(a.Loader2,{size:14,className:"animate-spin"})," loading…"]}):k?(0,t.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k}):b?(0,t.jsx)(c.YamlEditor,{value:b,readOnly:!0,className:"max-h-[60vh]"}):null}),(0,t.jsxs)(s.Dialog.Footer,{children:[(0,t.jsx)(s.Dialog.Close,{render:(0,t.jsx)(d.Button,{variant:"ghost",type:"button",children:"Close"})}),h?(0,t.jsx)(l.Badge,{tone:"green",children:"already running"}):m?(0,t.jsx)(n.default,{href:`/launch?recipe=${encodeURIComponent(e)}`,children:(0,t.jsxs)(d.Button,{variant:"primary",children:[(0,t.jsx)(i.Rocket,{size:14}),"Launch"]})}):null]})]})})}])}]);