@samyx/preview-stacks-ui 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-Cd_ENfdu.js → ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-Cd_ENfdu.js.map → ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js.map} +1 -1
- package/dist/assets/{AxesTab-PIPODUl8.js → AxesTab-BZZXKEC0.js} +2 -2
- package/dist/assets/{AxesTab-PIPODUl8.js.map → AxesTab-BZZXKEC0.js.map} +1 -1
- package/dist/assets/ConfigTab-CFbS48D0.js +2 -0
- package/dist/assets/ConfigTab-CFbS48D0.js.map +1 -0
- package/dist/assets/{DangerTab-DTiS6xB0.js → DangerTab-Nyebdr6k.js} +2 -2
- package/dist/assets/{DangerTab-DTiS6xB0.js.map → DangerTab-Nyebdr6k.js.map} +1 -1
- package/dist/assets/{DashboardView-Bss76wHt.js → DashboardView-CFwb63EX.js} +2 -2
- package/dist/assets/{DashboardView-Bss76wHt.js.map → DashboardView-CFwb63EX.js.map} +1 -1
- package/dist/assets/{DeploymentDetailView-kyClP0y4.js → DeploymentDetailView-DKCUbiGG.js} +2 -2
- package/dist/assets/{DeploymentDetailView-kyClP0y4.js.map → DeploymentDetailView-DKCUbiGG.js.map} +1 -1
- package/dist/assets/DeploymentsView-BX4GOb2A.js +2 -0
- package/dist/assets/DeploymentsView-BX4GOb2A.js.map +1 -0
- package/dist/assets/{EquivalentCommand-DRkXOe18.js → EquivalentCommand-w1nGowVi.js} +3 -3
- package/dist/assets/{EquivalentCommand-DRkXOe18.js.map → EquivalentCommand-w1nGowVi.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BZ9OIXGB.js → ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BZ9OIXGB.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js.map} +1 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js +2 -0
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js.map +1 -0
- package/dist/assets/JobDetailView-ow1_d8lc.js +2 -0
- package/dist/assets/{JobDetailView-C8y-1Gk0.js.map → JobDetailView-ow1_d8lc.js.map} +1 -1
- package/dist/assets/JobsView-Boi9Cmdc.js +2 -0
- package/dist/assets/JobsView-Boi9Cmdc.js.map +1 -0
- package/dist/assets/{LoginView-w9pB4KOG.js → LoginView-1ZpxP8a9.js} +2 -2
- package/dist/assets/{LoginView-w9pB4KOG.js.map → LoginView-1ZpxP8a9.js.map} +1 -1
- package/dist/assets/LoginView-BFIG7vGw.css +1 -0
- package/dist/assets/LogsTab-Bgev0F7g.js +4 -0
- package/dist/assets/LogsTab-Bgev0F7g.js.map +1 -0
- package/dist/assets/{NotFoundView-B01q_-mC.js → NotFoundView-BhCKBrlY.js} +2 -2
- package/dist/assets/{NotFoundView-B01q_-mC.js.map → NotFoundView-BhCKBrlY.js.map} +1 -1
- package/dist/assets/NotifiersView-DN9UiqDs.js +2 -0
- package/dist/assets/NotifiersView-DN9UiqDs.js.map +1 -0
- package/dist/assets/{OverviewTab-Blf-Az3p.js → OverviewTab-DzZG0moV.js} +2 -2
- package/dist/assets/{OverviewTab-Blf-Az3p.js.map → OverviewTab-DzZG0moV.js.map} +1 -1
- package/dist/assets/RegistriesView-CPyfKKWJ.js +2 -0
- package/dist/assets/RegistriesView-CPyfKKWJ.js.map +1 -0
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js +2 -0
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-DHneomCg.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js.map} +1 -1
- package/dist/assets/{RequiresTab-DQg43NYf.js → RequiresTab-CjNRorI5.js} +2 -2
- package/dist/assets/{RequiresTab-DQg43NYf.js.map → RequiresTab-CjNRorI5.js.map} +1 -1
- package/dist/assets/RoutingView-Br16pPwF.js +9 -0
- package/dist/assets/RoutingView-Br16pPwF.js.map +1 -0
- package/dist/assets/RuntimeTab-BssqRUYz.js +2 -0
- package/dist/assets/{RuntimeTab-DDOtdkb1.js.map → RuntimeTab-BssqRUYz.js.map} +1 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js +2 -0
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js.map +1 -0
- package/dist/assets/SettingsView-Cqsv0chw.js +2 -0
- package/dist/assets/SettingsView-Cqsv0chw.js.map +1 -0
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-Bko4Bp5e.js → SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-Bko4Bp5e.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js.map} +1 -1
- package/dist/assets/{SpecDetailView-DItY-dvv.js → SpecDetailView-P6Kk7cwx.js} +2 -2
- package/dist/assets/{SpecDetailView-DItY-dvv.js.map → SpecDetailView-P6Kk7cwx.js.map} +1 -1
- package/dist/assets/{SpecsView-BOyfeFiw.js → SpecsView-DogEWlyZ.js} +2 -2
- package/dist/assets/{SpecsView-BOyfeFiw.js.map → SpecsView-DogEWlyZ.js.map} +1 -1
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-C0jjaI2w.js → StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js} +2 -2
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-C0jjaI2w.js.map → StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js.map} +1 -1
- package/dist/assets/SubmitView-CufYXtWD.js +45 -0
- package/dist/assets/SubmitView-CufYXtWD.js.map +1 -0
- package/dist/assets/Teleport-0BmaJsBF.js +4 -0
- package/dist/assets/Teleport-0BmaJsBF.js.map +1 -0
- package/dist/assets/{TerminalTab-Bqulz6Eb.css → TerminalTab-4vbfGB2S.css} +1 -1
- package/dist/assets/TerminalTab-DndloIiD.js +3 -0
- package/dist/assets/TerminalTab-DndloIiD.js.map +1 -0
- package/dist/assets/{UsersView-DyqtgK5V.js → UsersView-KHRd16sV.js} +2 -2
- package/dist/assets/{UsersView-DyqtgK5V.js.map → UsersView-KHRd16sV.js.map} +1 -1
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-CDXij21z.js → VarEditor.vue_vue_type_script_setup_true_lang-FaBOeld_.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-CDXij21z.js.map → VarEditor.vue_vue_type_script_setup_true_lang-FaBOeld_.js.map} +1 -1
- package/dist/assets/index-BnwKLRM7.css +1 -0
- package/dist/assets/index-D8OAewba.js +134 -0
- package/dist/assets/index-D8OAewba.js.map +1 -0
- package/dist/assets/{useDeployment-Cm0bIOKD.js → useDeployment-DplTFu7s.js} +2 -2
- package/dist/assets/{useDeployment-Cm0bIOKD.js.map → useDeployment-DplTFu7s.js.map} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -1
- package/dist/assets/ConfigTab-YvlHNuMd.js +0 -2
- package/dist/assets/ConfigTab-YvlHNuMd.js.map +0 -1
- package/dist/assets/DeploymentsView-C2H6D6of.js +0 -2
- package/dist/assets/DeploymentsView-C2H6D6of.js.map +0 -1
- package/dist/assets/JobDetailView-C8y-1Gk0.js +0 -2
- package/dist/assets/JobsView-Wa28PKmj.js +0 -2
- package/dist/assets/JobsView-Wa28PKmj.js.map +0 -1
- package/dist/assets/LoginView-DhMeluqJ.css +0 -1
- package/dist/assets/LogsTab-BA-imxfQ.js +0 -4
- package/dist/assets/LogsTab-BA-imxfQ.js.map +0 -1
- package/dist/assets/NotifiersView-DuvX0P6t.js +0 -2
- package/dist/assets/NotifiersView-DuvX0P6t.js.map +0 -1
- package/dist/assets/RegistriesView-Cnlw2YCk.js +0 -2
- package/dist/assets/RegistriesView-Cnlw2YCk.js.map +0 -1
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-DHneomCg.js +0 -2
- package/dist/assets/RoutingView-DSkMdPwp.js +0 -9
- package/dist/assets/RoutingView-DSkMdPwp.js.map +0 -1
- package/dist/assets/RuntimeTab-DDOtdkb1.js +0 -2
- package/dist/assets/SettingsView-DKeXVJ5c.js +0 -2
- package/dist/assets/SettingsView-DKeXVJ5c.js.map +0 -1
- package/dist/assets/SubmitView-DJHNoMy8.js +0 -45
- package/dist/assets/SubmitView-DJHNoMy8.js.map +0 -1
- package/dist/assets/TerminalTab-BAzAYOEa.js +0 -3
- package/dist/assets/TerminalTab-BAzAYOEa.js.map +0 -1
- package/dist/assets/index-I3zdQqtI.css +0 -1
- package/dist/assets/index-zMwxPFi6.js +0 -134
- package/dist/assets/index-zMwxPFi6.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as $,o as l,c as n,a as t,f as o,t as a,u as d,z as g,e as u,w as k,i as w,v as N,g as h,G as B,y as p,x as R,F as b,s as C,r as f,C as x,j as S,D,E as U}from"./index-D8OAewba.js";import{_ as z}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js";import{_ as E}from"./RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js";import{_ as q}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./useFormat-CKJxQp_i.js";import"./Teleport-0BmaJsBF.js";const A={key:0,class:"badge busy"},F={key:1,class:"badge ok"},I={key:2,class:"badge unknown",title:"the server could not determine this — it is not the same as idle"},M={key:3,class:"badge"},T=$({__name:"RunStateBadge",props:{busy:{type:[Boolean,null]},running:{type:[Boolean,null]}},setup(m){return(y,i)=>m.busy===!0?(l(),n("span",A,[...i[0]||(i[0]=[t("span",{class:"dot pulse"},null,-1),o("busy",-1)])])):m.running===!0?(l(),n("span",F,[...i[1]||(i[1]=[t("span",{class:"dot"},null,-1),o("running",-1)])])):m.busy===null||m.running===null?(l(),n("span",I,"unknown")):(l(),n("span",M,"idle"))}}),j={class:"page-head"},G={class:"sub"},H={class:"panel"},J={class:"phead"},K={class:"searchbox"},O={key:0},P={class:"check"},Q={key:0,class:"s-failed"},W={class:"cards"},X={class:"stagger"},Y={"data-label":"id"},Z={key:0,class:"mute",style:{"font-size":"var(--t-xs)"}},ee={"data-label":"kind"},te={class:"name dim","data-label":"stack"},se={key:0},le={key:1,class:"badge warn",title:"the spec could not be resolved without variables"},ne={"data-label":"state"},oe={class:"dim nowrap","data-label":"updated"},ae={key:0},ie={colspan:"5",class:"mute"},re={class:"mono"},ve=$({__name:"DeploymentsView",setup(m){const y=f(""),i=f("all"),c=f(!1),_=x(()=>{const r=y.value.trim().toLowerCase();return p.deployments.filter(e=>i.value!=="all"&&e.kind!==i.value||c.value&&!(e.running===!0||e.busy===!0)?!1:r?e.id.toLowerCase().includes(r)||(e.stack??"").toLowerCase().includes(r)||(e.specName??"").toLowerCase().includes(r):!0)}),V=x(()=>p.deployments.filter(r=>r.unresolved));return(r,e)=>{const v=S("RouterLink");return l(),n("div",null,[t("div",j,[t("div",null,[e[3]||(e[3]=t("h1",null,"Deployments",-1)),t("div",G,a(d(g).total)+" submitted · "+a(d(g).running)+" running · "+a(d(g).busy)+" busy ",1)]),e[5]||(e[5]=t("span",{class:"grow"},null,-1)),u(v,{to:"/submit",class:"btn"},{default:k(()=>[...e[4]||(e[4]=[o("+ Submit",-1)])]),_:1})]),t("section",H,[t("div",J,[t("div",K,[e[6]||(e[6]=t("svg",{viewBox:"0 0 24 24",width:"15",height:"15","aria-hidden":"true"},[t("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),t("path",{d:"M16.5 16.5 21 21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),w(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=s=>y.value=s),"data-search":"",type:"search","aria-label":"Search deployments",placeholder:"Search by id, stack or spec",spellcheck:"false"},null,512),[[N,y.value]]),y.value?h("",!0):(l(),n("kbd",O,"/"))]),u(q,{modelValue:i.value,"onUpdate:modelValue":e[1]||(e[1]=s=>i.value=s),label:"Filter by kind",options:[{value:"all",label:"All kinds"},{value:"isolated",label:"Isolated"},{value:"shared",label:"Shared"}]},null,8,["modelValue"]),t("label",P,[w(t("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>c.value=s),type:"checkbox"},null,512),[[B,c.value]]),e[7]||(e[7]=o(" Running or busy only ",-1))])]),d(p).deploymentsError?(l(),n("p",Q,a(d(p).deploymentsError),1)):d(p).deploymentsLoaded?(l(),n(b,{key:2},[t("table",W,[e[11]||(e[11]=t("thead",null,[t("tr",null,[t("th",null,"id"),t("th",null,"kind"),t("th",null,"stack"),t("th",null,"state"),t("th",null,"updated")])],-1)),t("tbody",X,[(l(!0),n(b,null,C(_.value,(s,L)=>(l(),n("tr",{key:s.id,style:D({"--i":L})},[t("td",Y,[u(v,{to:`/deployments/${encodeURIComponent(s.id)}`},{default:k(()=>[o(a(s.id),1)]),_:2},1032,["to"]),s.specName?(l(),n("div",Z," spec: "+a(s.specName),1)):h("",!0)]),t("td",ee,[t("span",{class:U(["badge",s.kind])},a(s.kind),3)]),t("td",te,[s.stack?(l(),n("span",se,a(s.stack),1)):(l(),n("span",le," needs variables "))]),t("td",ne,[u(T,{busy:s.busy,running:s.running},null,8,["busy","running"])]),t("td",oe,[u(E,{at:s.updatedAt},null,8,["at"])])],4))),128)),_.value.length?h("",!0):(l(),n("tr",ae,[t("td",ie,[d(p).deployments.length?(l(),n(b,{key:0},[o(" Nothing matches this filter. ")],64)):(l(),n(b,{key:1},[e[9]||(e[9]=o(" Nothing submitted yet — ",-1)),u(v,{to:"/submit"},{default:k(()=>[...e[8]||(e[8]=[o("submit a spec",-1)])]),_:1}),e[10]||(e[10]=o(" to put a deployment in the registry. ",-1))],64))])]))])]),(l(!0),n(b,null,C(V.value,s=>(l(),n("div",{key:`u-${s.id}`,class:"banner warn"},[t("b",null,a(s.id),1),e[19]||(e[19]=o(" could not be resolved: ",-1)),t("span",re,a(s.unresolved),1),t("p",null,[e[13]||(e[13]=o(" This listing resolves every spec with the ",-1)),e[14]||(e[14]=t("em",null,"same",-1)),e[15]||(e[15]=o(" (empty) request variables, so a spec with a ",-1)),e[16]||(e[16]=t("code",null,"${VAR}",-1)),e[17]||(e[17]=o(" the server does not already hold will always appear here. ",-1)),u(v,{to:`/deployments/${encodeURIComponent(s.id)}/config`},{default:k(()=>[...e[12]||(e[12]=[o(" Set its variables ",-1)])]),_:1},8,["to"]),e[18]||(e[18]=o(" and the detail view will resolve. ",-1))])]))),128))],64)):(l(),R(z,{key:1,rows:4,tall:""}))])])}}});export{ve as default};
|
|
2
|
+
//# sourceMappingURL=DeploymentsView-BX4GOb2A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeploymentsView-BX4GOb2A.js","sources":["../../src/components/RunStateBadge.vue","../../src/views/DeploymentsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A deployment's live state, from the two TRI-STATE fields the server sends.\n *\n * `busy` and `running` are `boolean | null`, and `null` means \"the server could not determine\n * this\": an unresolved spec has no stack name to look up, and a docker that did not answer is not\n * the same fact as \"nothing is running\". Rendering either as \"idle\" would be a guess presented as\n * a fact — that is how a live stack gets reported as torn down and someone forgets it.\n *\n * So unknown says unknown, and it gets its own colour.\n */\ndefineProps<{ busy: boolean | null; running: boolean | null }>();\n</script>\n\n<template>\n <span v-if=\"busy === true\" class=\"badge busy\"><span class=\"dot pulse\" />busy</span>\n <span v-else-if=\"running === true\" class=\"badge ok\"><span class=\"dot\" />running</span>\n <span\n v-else-if=\"busy === null || running === null\"\n class=\"badge unknown\"\n title=\"the server could not determine this — it is not the same as idle\"\n >unknown</span\n >\n <span v-else class=\"badge\">idle</span>\n</template>\n","<script setup lang=\"ts\">\n/**\n * The deployment list: searchable, filterable, and honest about what could not be resolved.\n *\n * Filtering is client-side because the API has no query parameters for it and the list is one\n * host's worth of previews — a few dozen rows, already in memory from the shell's poll.\n */\nimport { computed, ref } from 'vue';\nimport { state, summary } from '../composables/useControlPlane';\n\nimport RunStateBadge from '../components/RunStateBadge.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst q = ref('');\nconst kind = ref<'all' | 'isolated' | 'shared'>('all');\nconst onlyLive = ref(false);\n\nconst rows = computed(() => {\n const needle = q.value.trim().toLowerCase();\n return state.deployments.filter((d) => {\n if (kind.value !== 'all' && d.kind !== kind.value) return false;\n // \"Live\" means DEMONSTRABLY live. An unknown is not evidence of either state, so it is not\n // silently included here — the filter says what it filters.\n if (onlyLive.value && !(d.running === true || d.busy === true)) return false;\n if (!needle) return true;\n return (\n d.id.toLowerCase().includes(needle) ||\n (d.stack ?? '').toLowerCase().includes(needle) ||\n (d.specName ?? '').toLowerCase().includes(needle)\n );\n });\n});\n\nconst unresolvedRows = computed(() => state.deployments.filter((d) => d.unresolved));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Deployments</h1>\n <div class=\"sub\">\n {{ summary.total }} submitted · {{ summary.running }} running · {{ summary.busy }} busy\n </div>\n </div>\n <span class=\"grow\" />\n <RouterLink to=\"/submit\" class=\"btn\">+ Submit</RouterLink>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <!--\n One row of equal-height controls. Each used to sit under its own stacked label, which cost\n a line of vertical space per control, put \"Search — press /\" on screen as a permanent\n instruction, and left the two fields 8px out of vertical alignment because a `select` and\n an `input` do not have the same intrinsic height. A placeholder says the same thing in the\n place you are already looking, and the select's own options say what it filters.\n -->\n <div class=\"searchbox\">\n <svg viewBox=\"0 0 24 24\" width=\"15\" height=\"15\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M16.5 16.5 21 21\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n <input\n id=\"q\"\n v-model=\"q\"\n data-search\n type=\"search\"\n aria-label=\"Search deployments\"\n placeholder=\"Search by id, stack or spec\"\n spellcheck=\"false\"\n />\n <kbd v-if=\"!q\">/</kbd>\n </div>\n <SelectMenu\n v-model=\"kind\"\n label=\"Filter by kind\"\n :options=\"[\n { value: 'all', label: 'All kinds' },\n { value: 'isolated', label: 'Isolated' },\n { value: 'shared', label: 'Shared' },\n ]\"\n />\n <label class=\"check\">\n <input v-model=\"onlyLive\" type=\"checkbox\" />\n Running or busy only\n </label>\n </div>\n\n <p v-if=\"state.deploymentsError\" class=\"s-failed\">{{ state.deploymentsError }}</p>\n <SkeletonList v-else-if=\"!state.deploymentsLoaded\" :rows=\"4\" tall />\n\n <template v-else>\n <table class=\"cards\">\n <thead>\n <tr>\n <th>id</th>\n <th>kind</th>\n <th>stack</th>\n <th>state</th>\n <th>updated</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(d, i) in rows\" :key=\"d.id\" :style=\"{ '--i': i }\">\n <td data-label=\"id\">\n <RouterLink :to=\"`/deployments/${encodeURIComponent(d.id)}`\">\n {{ d.id }}\n </RouterLink>\n <div v-if=\"d.specName\" class=\"mute\" style=\"font-size: var(--t-xs)\">\n spec: {{ d.specName }}\n </div>\n </td>\n <td data-label=\"kind\"><span class=\"badge\" :class=\"d.kind\">{{ d.kind }}</span></td>\n <td class=\"name dim\" data-label=\"stack\">\n <span v-if=\"d.stack\">{{ d.stack }}</span>\n <!--\n No stack name means the spec could not be resolved with the variables this\n listing had. It is not an error state for the deployment — it is a missing input.\n -->\n <span v-else class=\"badge warn\" title=\"the spec could not be resolved without variables\">\n needs variables\n </span>\n </td>\n <td data-label=\"state\"><RunStateBadge :busy=\"d.busy\" :running=\"d.running\" /></td>\n <td class=\"dim nowrap\" data-label=\"updated\"><RelativeTime :at=\"d.updatedAt\" /></td>\n </tr>\n <tr v-if=\"!rows.length\">\n <td colspan=\"5\" class=\"mute\">\n <template v-if=\"state.deployments.length\">\n Nothing matches this filter.\n </template>\n <template v-else>\n Nothing submitted yet — <RouterLink to=\"/submit\">submit a spec</RouterLink> to\n put a deployment in the registry.\n </template>\n </td>\n </tr>\n </tbody>\n </table>\n\n <!-- One message per unresolved row, verbatim: it names the missing variable. -->\n <div v-for=\"d in unresolvedRows\" :key=\"`u-${d.id}`\" class=\"banner warn\">\n <b>{{ d.id }}</b> could not be resolved:\n <span class=\"mono\">{{ d.unresolved }}</span>\n <p>\n This listing resolves every spec with the <em>same</em> (empty) request variables, so a\n spec with a <code>${VAR}</code> the server does not already hold will always appear\n here.\n <RouterLink :to=\"`/deployments/${encodeURIComponent(d.id)}/config`\">\n Set its variables\n </RouterLink>\n and the detail view will resolve.\n </p>\n </div>\n </template>\n </section>\n </div>\n</template>\n"],"names":["__props","_openBlock","_createElementBlock","_hoisted_1","_cache","_createElementVNode","_hoisted_2","_hoisted_3","_hoisted_4","q","ref","kind","onlyLive","rows","computed","needle","state","d","unresolvedRows","_toDisplayString","_unref","_createVNode","_component_RouterLink","_hoisted_5","$event","SelectMenu","_hoisted_7","_hoisted_8","_Fragment","_hoisted_9","_hoisted_10","_renderList","i","_hoisted_11","_createTextVNode","_hoisted_12","_hoisted_13","_normalizeClass","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","RunStateBadge","_hoisted_18","RelativeTime","_hoisted_19","_hoisted_20","_hoisted_21","_createBlock","SkeletonList"],"mappings":"qyBAecA,EAAA,OAAI,IAAhBC,EAAA,EAAAC,EAAmF,OAAnFC,EAAmF,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CAArCC,EAA0B,OAAA,CAApB,MAAM,WAAA,EA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E1C,CAAA,YACA1B,EAGW0B,EAAA,CAAA,IAAA,GAAA,eAHM,4BACS,EAAA,GAAAP,EAAmDC,EAAA,CAAvC,GAAG,WAAS,WAAC,IAAa,CAAA,GAAAlB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAb,gBAAa,EAAA,CAAA,2BAAa,yCAE7E,EAAA,EAAA,uBAORF,EAYM0B,EAAA,KAAAG,EAZWb,EAAA,MAALD,QAAZf,EAYM,MAAA,CAZ4B,IAAG,KAAOe,EAAE,EAAE,GAAI,MAAM,aAAA,GACxDZ,EAAiB,IAAA,KAAAc,EAAXF,EAAE,EAAE,EAAA,CAAA,kBAAO,2BACjB,EAAA,GAAAZ,EAA4C,OAA5C0C,GAA4C5B,EAAtBF,EAAE,UAAU,EAAA,CAAA,EAClCZ,EAQI,IAAA,KAAA,iBARD,8CACyC,EAAA,GAAAD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAa,UAAT,OAAI,EAAA,mBAAK,gDAC3C,EAAA,GAAAD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAmB,YAAb,SAAM,EAAA,mBAAO,8DAE/B,EAAA,GAAAgB,EAEaC,EAAA,CAFA,GAAE,gBAAkB,mBAAmBL,EAAE,EAAE,CAAA,SAAA,aAAY,IAEpE,CAAA,GAAAb,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFoE,sBAEpE,EAAA,CAAA,oCAAa,sCAEf,EAAA,EAAA,wBA/DJ4C,EAAoEC,EAAA,OAAhB,KAAM,EAAG,KAAA,EAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d as f,c as i,a as e,f as r,t as c,e as w,T as _,w as g,r as h,o as d,g as m,C as u,
|
|
2
|
-
`)}),p=u(()=>o.value==="curl"?k.value:s.cli??"");async function y(){try{await navigator.clipboard.writeText(p.value),b("ok","Copied.")}catch{b("error","Could not copy — your browser blocked clipboard access.")}}return(a,t)=>(d(),i("div",x,[e("button",{class:"ghost sm","aria-expanded":n.value,onClick:t[0]||(t[0]=v=>n.value=!n.value)},[t[3]||(t[3]=e("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"m7 8-4 4 4 4"}),e("path",{d:"m17 8 4 4-4 4"}),e("path",{d:"M14 4 10 20"})],-1)),r(" "+c(n.value?"Hide":"Show")+" equivalent command ",1)],8,T),w(_,{name:"fade"},{default:g(()=>[n.value?(d(),i("div",
|
|
3
|
-
//# sourceMappingURL=EquivalentCommand-
|
|
1
|
+
import{d as f,c as i,a as e,f as r,t as c,e as w,T as _,w as g,r as h,o as d,g as m,C as u,N as b}from"./index-D8OAewba.js";import{_ as $}from"./_plugin-vue_export-helper-DlAUqK2U.js";const x={class:"eqc"},T=["aria-expanded"],N={key:0,class:"eqc-panel"},q={class:"eqc-tabs",role:"tablist"},E=["aria-selected","data-on"],B=["aria-selected","data-on"],K={class:"eqc-code"},S={class:"eqc-note"},j=f({__name:"EquivalentCommand",props:{what:{},method:{},path:{},body:{},cli:{}},setup(l){const s=l,n=h(!1),o=h("curl"),C=u(()=>`${location.protocol}//${location.host}`),k=u(()=>{const a=[`curl -X ${s.method} ${C.value}${s.path} \\`];if(a.push(" -H 'Authorization: Bearer $PSTACK_TOKEN' \\"),s.body!==void 0){a.push(" -H 'Content-Type: application/json' \\");const t=JSON.stringify(s.body,null,2).split("'").join("'\\''");a.push(` -d '${t}'`)}else a[a.length-1]=" -H 'Authorization: Bearer $PSTACK_TOKEN'";return a.join(`
|
|
2
|
+
`)}),p=u(()=>o.value==="curl"?k.value:s.cli??"");async function y(){try{await navigator.clipboard.writeText(p.value),b("ok","Copied.")}catch{b("error","Could not copy — your browser blocked clipboard access.")}}return(a,t)=>(d(),i("div",x,[e("button",{class:"ghost sm","aria-expanded":n.value,onClick:t[0]||(t[0]=v=>n.value=!n.value)},[t[3]||(t[3]=e("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"m7 8-4 4 4 4"}),e("path",{d:"m17 8 4 4-4 4"}),e("path",{d:"M14 4 10 20"})],-1)),r(" "+c(n.value?"Hide":"Show")+" equivalent command ",1)],8,T),w(_,{name:"fade"},{default:g(()=>[n.value?(d(),i("div",N,[e("div",q,[e("button",{class:"ghost sm",role:"tab","aria-selected":o.value==="curl","data-on":o.value==="curl",onClick:t[1]||(t[1]=v=>o.value="curl")}," curl ",8,E),l.cli?(d(),i("button",{key:0,class:"ghost sm",role:"tab","aria-selected":o.value==="cli","data-on":o.value==="cli",onClick:t[2]||(t[2]=v=>o.value="cli")}," pstack ",8,B)):m("",!0),t[4]||(t[4]=e("span",{class:"grow"},null,-1)),e("button",{class:"ghost sm",onClick:y},"Copy")]),e("pre",K,c(p.value),1),e("p",S,[r(" Runs "+c(l.what)+" exactly as the button above does. ",1),t[5]||(t[5]=e("b",null,"$PSTACK_TOKEN",-1)),t[6]||(t[6]=r(" is left as a shell variable on purpose — a real token in a screenshot or a shell history is the whole host. ",-1))])])):m("",!0)]),_:1})]))}}),O=$(j,[["__scopeId","data-v-0e7a9878"]]);export{O as E};
|
|
3
|
+
//# sourceMappingURL=EquivalentCommand-w1nGowVi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EquivalentCommand-
|
|
1
|
+
{"version":3,"file":"EquivalentCommand-w1nGowVi.js","sources":["../../src/components/EquivalentCommand.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * \"Show equivalent command\" — the GCP pattern.\n *\n * WHY THIS EXISTS RATHER THAN A SNIPPET ON THE PAGE. A `curl` line printed next to a form is read by\n * everyone and needed by almost nobody: it is permanent clutter charged to every operator so that\n * the occasional scripter does not have to look something up. Behind a button it costs one click\n * when you want it and nothing when you do not — and, unlike a static snippet in the docs, it is\n * generated from what is actually in the form right now, so it cannot drift from the request the\n * button next to it would send.\n *\n * IT IS NOT A SECOND SOURCE OF TRUTH. The caller passes the same values it is about to POST. If the\n * form changes, this changes with it, because there is nothing here to keep in sync by hand.\n *\n * THE TOKEN IS NEVER INTERPOLATED. `$PSTACK_TOKEN` stays a shell variable: a rendered command lands\n * in screenshots, pasted messages and shell history, and a control-plane token in any of those is\n * the whole host. The panel says so rather than silently omitting it.\n */\nimport { computed, ref } from 'vue';\nimport { toast } from '../composables/useToasts';\n\nconst props = defineProps<{\n /** Shown as the button label's object, e.g. \"this registration\". */\n what: string;\n /** The HTTP request the adjacent action performs. */\n method: string;\n /** Path only — the host is filled in from where the UI is served. */\n path: string;\n body?: unknown;\n /** The `pstack` invocation that does the same thing, when one exists. */\n cli?: string;\n}>();\n\nconst open = ref(false);\nconst tab = ref<'curl' | 'cli'>('curl');\n\nconst base = computed(() => `${location.protocol}//${location.host}`);\n\nconst curl = computed(() => {\n const lines = [`curl -X ${props.method} ${base.value}${props.path} \\\\`];\n lines.push(` -H 'Authorization: Bearer $PSTACK_TOKEN' \\\\`);\n if (props.body !== undefined) {\n lines.push(` -H 'Content-Type: application/json' \\\\`);\n // Single-quoted so nothing in a value is expanded by the shell; embedded quotes are escaped\n // the only way that works inside single quotes.\n const json = JSON.stringify(props.body, null, 2).split(\"'\").join(`'\\\\''`);\n lines.push(` -d '${json}'`);\n } else {\n lines[lines.length - 1] = ` -H 'Authorization: Bearer $PSTACK_TOKEN'`;\n }\n return lines.join('\\n');\n});\n\nconst text = computed(() => (tab.value === 'curl' ? curl.value : (props.cli ?? '')));\n\nasync function copy(): Promise<void> {\n try {\n await navigator.clipboard.writeText(text.value);\n toast('ok', 'Copied.');\n } catch {\n toast('error', 'Could not copy — your browser blocked clipboard access.');\n }\n}\n</script>\n\n<template>\n <div class=\"eqc\">\n <button class=\"ghost sm\" :aria-expanded=\"open\" @click=\"open = !open\">\n <svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m7 8-4 4 4 4\" /><path d=\"m17 8 4 4-4 4\" /><path d=\"M14 4 10 20\" />\n </svg>\n {{ open ? 'Hide' : 'Show' }} equivalent command\n </button>\n\n <Transition name=\"fade\">\n <div v-if=\"open\" class=\"eqc-panel\">\n <div class=\"eqc-tabs\" role=\"tablist\">\n <button\n class=\"ghost sm\"\n role=\"tab\"\n :aria-selected=\"tab === 'curl'\"\n :data-on=\"tab === 'curl'\"\n @click=\"tab = 'curl'\"\n >\n curl\n </button>\n <button\n v-if=\"cli\"\n class=\"ghost sm\"\n role=\"tab\"\n :aria-selected=\"tab === 'cli'\"\n :data-on=\"tab === 'cli'\"\n @click=\"tab = 'cli'\"\n >\n pstack\n </button>\n <span class=\"grow\" />\n <button class=\"ghost sm\" @click=\"copy\">Copy</button>\n </div>\n\n <pre class=\"eqc-code\">{{ text }}</pre>\n\n <p class=\"eqc-note\">\n Runs {{ what }} exactly as the button above does.\n <b>$PSTACK_TOKEN</b> is left as a shell variable on purpose — a real token in a screenshot\n or a shell history is the whole host.\n </p>\n </div>\n </Transition>\n </div>\n</template>\n\n<style scoped>\n.eqc {\n min-width: 0;\n}\n.eqc-panel {\n margin-top: var(--s3);\n border: 1px solid var(--line);\n border-radius: var(--r2);\n background: var(--sunk);\n overflow: hidden;\n}\n.eqc-tabs {\n display: flex;\n align-items: center;\n gap: var(--s1);\n padding: var(--s2);\n border-bottom: 1px solid var(--line-soft);\n}\n.eqc-tabs [data-on='true'] {\n background: var(--accent-soft);\n color: var(--accent);\n}\n.eqc-code {\n margin: 0;\n padding: var(--s3);\n font: var(--t-sm) / 1.6 var(--mono);\n white-space: pre;\n overflow-x: auto;\n color: var(--fg-dim);\n}\n.eqc-note {\n padding: 0 var(--s3) var(--s3);\n font-size: var(--t-xs);\n color: var(--fg-mute);\n}\n</style>\n"],"names":["props","__props","open","ref","tab","base","computed","curl","lines","json","text","copy","toast","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_cache","$event","_toDisplayString","_createVNode","_Transition","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8"],"mappings":"keAqBA,MAAMA,EAAQC,EAYRC,EAAOC,EAAI,EAAK,EAChBC,EAAMD,EAAoB,MAAM,EAEhCE,EAAOC,EAAS,IAAM,GAAG,SAAS,QAAQ,KAAK,SAAS,IAAI,EAAE,EAE9DC,EAAOD,EAAS,IAAM,CAC1B,MAAME,EAAQ,CAAC,WAAWR,EAAM,MAAM,IAAIK,EAAK,KAAK,GAAGL,EAAM,IAAI,KAAK,EAEtE,GADAQ,EAAM,KAAK,+CAA+C,EACtDR,EAAM,OAAS,OAAW,CAC5BQ,EAAM,KAAK,0CAA0C,EAGrD,MAAMC,EAAO,KAAK,UAAUT,EAAM,KAAM,KAAM,CAAC,EAAE,MAAM,GAAG,EAAE,KAAK,OAAO,EACxEQ,EAAM,KAAK,SAASC,CAAI,GAAG,CAC7B,MACED,EAAMA,EAAM,OAAS,CAAC,EAAI,6CAE5B,OAAOA,EAAM,KAAK;AAAA,CAAI,CACxB,CAAC,EAEKE,EAAOJ,EAAS,IAAOF,EAAI,QAAU,OAASG,EAAK,MAASP,EAAM,KAAO,EAAI,EAEnF,eAAeW,GAAsB,CACnC,GAAI,CACF,MAAM,UAAU,UAAU,UAAUD,EAAK,KAAK,EAC9CE,EAAM,KAAM,SAAS,CACvB,MAAQ,CACNA,EAAM,QAAS,yDAAyD,CAC1E,CACF,eAIEC,EAAA,EAAAC,EA2CM,MA3CNC,EA2CM,CA1CJC,EAKS,SAAA,CALD,MAAM,WAAY,gBAAed,EAAA,MAAO,QAAKe,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEhB,EAAA,MAAI,CAAIA,EAAA,MAAA,eAC7Dc,EAEM,MAAA,CAFD,QAAQ,YAAY,MAAM,KAAK,OAAO,KAAK,cAAY,OAAO,KA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
import{d as r,c as a,a as t,t as s,o}from"./index-D8OAewba.js";const n={class:"banner failed",role:"alert"},c={class:"raw"},d=r({__name:"ErrorNote",props:{text:{},title:{}},setup(e){return(l,i)=>(o(),a("div",n,[t("b",null,s(e.title??"The server refused this."),1),t("pre",c,s(e.text),1)]))}});export{d as _};
|
|
2
|
+
//# sourceMappingURL=ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorNote.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js","sources":["../../src/components/ErrorNote.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The server's own words, rendered whole.\n *\n * A pstack error message IS the documentation: a 400 from `PUT /api/deployments/:id` carries the\n * SpecError, which names the offending key or variable, prints the corrected form, and includes\n * the assert-lint warnings about an `assert_gone` that fails open. That text is the tool's main\n * teaching surface.\n *\n * So: never truncate it, never collapse it to one line, never replace it with \"invalid spec\".\n * Newlines and indentation are preserved, and it is the one element allowed to scroll sideways —\n * re-wrapping a shell snippet changes what it says.\n */\ndefineProps<{ text: string; title?: string }>();\n</script>\n\n<template>\n <div class=\"banner failed\" role=\"alert\">\n <b>{{ title ?? 'The server refused this.' }}</b>\n <pre class=\"raw\">{{ text }}</pre>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","__props","_hoisted_2","_toDisplayString"],"mappings":"oMAiBEA,EAAA,EAAAC,EAGM,MAHNC,EAGM,CAFJC,EAAgD,WAA1CC,EAAA,OAAK,0BAAA,EAAA,CAAA,EACXD,EAAiC,MAAjCE,EAAiCC,EAAbF,EAAA,IAAI,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as $,c as R,a as D,P as B,b as w,g as F,D as T,d as K,F as N,e as E,f as V,h as M,i as S,T as L}from"./Teleport-0BmaJsBF.js";import{d as g,U as H,V as v,u as e,r as b,o as c,x as _,w as u,W as m,X as A,e as O,h as U,g as j,Y as z,Z as W,a as q,f as I,t as X}from"./index-D8OAewba.js";const[C,Y]=R("DialogRoot");var Z=g({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(r,{emit:l}){const t=r,o=$(t,"open",l,{defaultValue:t.defaultOpen,passive:t.open===void 0}),d=b(),f=b(),{modal:i}=H(t);return Y({open:o,modal:i,openModal:()=>{o.value=!0},onOpenChange:n=>{o.value=n},onOpenToggle:()=>{o.value=!o.value},contentId:"",titleId:"",descriptionId:"",triggerElement:d,contentElement:f}),(n,s)=>v(n.$slots,"default",{open:e(o),close:()=>o.value=!1})}}),G=Z,J=g({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const l=r;D();const t=C();return(a,o)=>(c(),_(e(B),m(l,{type:a.as==="button"?"button":void 0,onClick:o[0]||(o[0]=d=>e(t).onOpenChange(!1))}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["type"]))}}),Q=J,x=g({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),{forwardRef:d,currentElement:f}=D();return o.titleId||(o.titleId=w(void 0,"reka-dialog-title")),o.descriptionId||(o.descriptionId=w(void 0,"reka-dialog-description")),A(()=>{o.contentElement=f,F()!==document.body&&(o.triggerElement.value=F())}),(i,n)=>(c(),_(e(N),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:n[5]||(n[5]=s=>a("openAutoFocus",s)),onUnmountAutoFocus:n[6]||(n[6]=s=>a("closeAutoFocus",s))},{default:u(()=>[O(e(T),m({id:e(o).contentId,ref:e(d),as:i.as,"as-child":i.asChild,"disable-outside-pointer-events":i.disableOutsidePointerEvents,role:"dialog","aria-describedby":e(o).descriptionId,"aria-labelledby":e(o).titleId,"data-state":e(K)(e(o).open.value)},i.$attrs,{onDismiss:n[0]||(n[0]=s=>e(o).onOpenChange(!1)),onEscapeKeyDown:n[1]||(n[1]=s=>a("escapeKeyDown",s)),onFocusOutside:n[2]||(n[2]=s=>a("focusOutside",s)),onInteractOutside:n[3]||(n[3]=s=>a("interactOutside",s)),onPointerDownOutside:n[4]||(n[4]=s=>a("pointerDownOutside",s))}),{default:u(()=>[v(i.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),k=x,ee=g({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),d=E(a),{forwardRef:f,currentElement:i}=D();return V(i),(n,s)=>(c(),_(k,m({...t,...e(d)},{ref:e(f),"trap-focus":e(o).open.value,"disable-outside-pointer-events":t.disableOutsidePointerEvents,onCloseAutoFocus:s[0]||(s[0]=p=>{var y;p.defaultPrevented||(p.preventDefault(),(y=e(o).triggerElement.value)==null||y.focus())}),onPointerDownOutside:s[1]||(s[1]=p=>{const y=p.detail.originalEvent,P=y.button===0&&y.ctrlKey===!0;(y.button===2||P)&&p.preventDefault()}),onFocusOutside:s[2]||(s[2]=p=>{p.preventDefault()})}),{default:u(()=>[v(n.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),te=ee,oe=g({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,o=E(l);D();const d=C(),f=b(!1),i=b(!1);return(n,s)=>(c(),_(k,m({...t,...e(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:s[0]||(s[0]=p=>{var y;p.defaultPrevented||(f.value||(y=e(d).triggerElement.value)==null||y.focus(),p.preventDefault()),f.value=!1,i.value=!1}),onInteractOutside:s[1]||(s[1]=p=>{var h;p.defaultPrevented||(f.value=!0,p.detail.originalEvent.type==="pointerdown"&&(i.value=!0));const y=p.target;((h=e(d).triggerElement.value)==null?void 0:h.contains(y))&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&i.value&&p.preventDefault()})}),{default:u(()=>[v(n.$slots,"default")]),_:3},16))}}),ae=oe,se=g({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:l}){const t=r,a=l,o=C(),d=E(a),{forwardRef:f}=D();return(i,n)=>(c(),_(e(M),{present:i.forceMount||e(o).open.value},{default:u(()=>[e(o).modal.value?(c(),_(te,m({key:0,ref:e(f)},{...t,...e(d),...i.$attrs}),{default:u(()=>[v(i.$slots,"default")]),_:3},16)):(c(),_(ae,m({key:1,ref:e(f)},{...t,...e(d),...i.$attrs}),{default:u(()=>[v(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),le=se,re=g({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const l=C();return S(!0),D(),(t,a)=>(c(),_(e(B),{as:t.as,"as-child":t.asChild,"data-state":e(l).open.value?"open":"closed",style:{"pointer-events":"auto"},onPointerdown:a[0]||(a[0]=U(()=>{},["left","self","prevent"]))},{default:u(()=>[v(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),ne=re,ue=g({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const l=C(),{forwardRef:t}=D();return(a,o)=>{var d;return(d=e(l))!=null&&d.modal.value?(c(),_(e(M),{key:0,present:a.forceMount||e(l).open.value},{default:u(()=>[O(ne,m(a.$attrs,{ref:e(t),as:a.as,"as-child":a.asChild}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):j("v-if",!0)}}}),ie=ue,de=g({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const l=r;return(t,a)=>(c(),_(e(L),z(W(l)),{default:u(()=>[v(t.$slots,"default")]),_:3},16))}}),pe=de,fe=g({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(r){const l=r,t=C();return D(),(a,o)=>(c(),_(e(B),m(l,{id:e(t).titleId}),{default:u(()=>[v(a.$slots,"default")]),_:3},16,["id"]))}}),ce=fe,_e=g({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const l=r,t=C(),{forwardRef:a,currentElement:o}=D();return t.contentId||(t.contentId=w(void 0,"reka-dialog-content")),A(()=>{t.triggerElement.value=o.value}),(d,f)=>(c(),_(e(B),m(l,{ref:e(a),type:d.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":e(t).open.value||!1,"aria-controls":e(t).open.value?e(t).contentId:void 0,"data-state":e(t).open.value?"open":"closed",onClick:e(t).onOpenToggle}),{default:u(()=>[v(d.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),ve=_e;const ge={class:"help-head"},ye={class:"help-body"},Ce=g({__name:"HelpModal",props:{title:{},label:{}},setup(r){return(l,t)=>(c(),_(e(G),null,{default:u(()=>[O(e(ve),{class:"helpq","aria-label":r.label??r.title},{default:u(()=>[...t[0]||(t[0]=[q("svg",{viewBox:"0 0 24 24",width:"13",height:"13","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round"},[q("path",{d:"M9.2 9a2.9 2.9 0 1 1 3.8 2.8c-.7.3-1 .9-1 1.6v.4"}),q("circle",{cx:"12",cy:"17.6",r:"0.9",fill:"currentColor",stroke:"none"})],-1)])]),_:1},8,["aria-label"]),O(e(pe),null,{default:u(()=>[O(e(ie),{class:"scrim help-scrim"}),O(e(le),{class:"help-modal"},{default:u(()=>[q("div",ge,[O(e(ce),{class:"help-title"},{default:u(()=>[I(X(r.title),1)]),_:1}),O(e(Q),{class:"ghost sm","aria-label":"Close"},{default:u(()=>[...t[1]||(t[1]=[I("Close",-1)])]),_:1})]),q("div",ye,[v(l.$slots,"default")])]),_:3})]),_:3})]),_:3}))}});export{Ce as _};
|
|
2
|
+
//# sourceMappingURL=HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js","sources":["../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogRoot.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogClose.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentImpl.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentModal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContentNonModal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogContent.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogOverlayImpl.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogOverlay.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogPortal.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogTitle.js","../../../../node_modules/.bun/reka-ui@2.9.10+6aac64ae34cef4e6/node_modules/reka-ui/dist/Dialog/DialogTrigger.js","../../src/components/HelpModal.vue"],"sourcesContent":["import { createContext } from \"../shared/createContext.js\";\nimport { defineComponent, ref, renderSlot, toRefs, unref } from \"vue\";\nimport { useVModel } from \"@vueuse/core\";\n\n//#region src/Dialog/DialogRoot.vue?vue&type=script&setup=true&lang.ts\nconst [injectDialogRootContext, provideDialogRootContext] = /*#__PURE__*/ createContext(\"DialogRoot\");\nvar DialogRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\tinheritAttrs: false,\n\t__name: \"DialogRoot\",\n\tprops: {\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t},\n\t\tdefaultOpen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false\n\t\t},\n\t\tmodal: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: true\n\t\t}\n\t},\n\temits: [\"update:open\"],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emit = __emit;\n\t\tconst open = useVModel(props, \"open\", emit, {\n\t\t\tdefaultValue: props.defaultOpen,\n\t\t\tpassive: props.open === void 0\n\t\t});\n\t\tconst triggerElement = ref();\n\t\tconst contentElement = ref();\n\t\tconst { modal } = toRefs(props);\n\t\tprovideDialogRootContext({\n\t\t\topen,\n\t\t\tmodal,\n\t\t\topenModal: () => {\n\t\t\t\topen.value = true;\n\t\t\t},\n\t\t\tonOpenChange: (value) => {\n\t\t\t\topen.value = value;\n\t\t\t},\n\t\t\tonOpenToggle: () => {\n\t\t\t\topen.value = !open.value;\n\t\t\t},\n\t\t\tcontentId: \"\",\n\t\t\ttitleId: \"\",\n\t\t\tdescriptionId: \"\",\n\t\t\ttriggerElement,\n\t\t\tcontentElement\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn renderSlot(_ctx.$slots, \"default\", {\n\t\t\t\topen: unref(open),\n\t\t\t\tclose: () => open.value = false\n\t\t\t});\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogRoot.vue\nvar DialogRoot_default = DialogRoot_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogRoot_default, injectDialogRootContext };\n//# sourceMappingURL=DialogRoot.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogClose.vue?vue&type=script&setup=true&lang.ts\nvar DialogClose_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogClose\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"button\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tuseForwardExpose();\n\t\tconst rootContext = injectDialogRootContext();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n\t\t\t\ttype: _ctx.as === \"button\" ? \"button\" : void 0,\n\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false))\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"type\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogClose.vue\nvar DialogClose_default = DialogClose_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogClose_default };\n//# sourceMappingURL=DialogClose.js.map","import { getActiveElement } from \"../shared/getActiveElement.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useId } from \"../shared/useId.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DismissableLayer_default } from \"../DismissableLayer/DismissableLayer.js\";\nimport { FocusScope_default } from \"../FocusScope/FocusScope.js\";\nimport { getOpenState } from \"../Menu/utils.js\";\nimport { useWarning } from \"./utils.js\";\nimport { createBlock, createVNode, defineComponent, mergeProps, onMounted, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentImpl.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentImpl\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef, currentElement: contentElement } = useForwardExpose();\n\t\trootContext.titleId ||= useId(void 0, \"reka-dialog-title\");\n\t\trootContext.descriptionId ||= useId(void 0, \"reka-dialog-description\");\n\t\tonMounted(() => {\n\t\t\trootContext.contentElement = contentElement;\n\t\t\tif (getActiveElement() !== document.body) rootContext.triggerElement.value = getActiveElement();\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\") useWarning({\n\t\t\ttitleName: \"DialogTitle\",\n\t\t\tcontentName: \"DialogContent\",\n\t\t\tcomponentLink: \"dialog.html#title\",\n\t\t\ttitleId: rootContext.titleId,\n\t\t\tdescriptionId: rootContext.descriptionId,\n\t\t\tcontentElement\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(FocusScope_default), {\n\t\t\t\t\"as-child\": \"\",\n\t\t\t\tloop: \"\",\n\t\t\t\ttrapped: props.trapFocus,\n\t\t\t\tonMountAutoFocus: _cache[5] || (_cache[5] = ($event) => emits(\"openAutoFocus\", $event)),\n\t\t\t\tonUnmountAutoFocus: _cache[6] || (_cache[6] = ($event) => emits(\"closeAutoFocus\", $event))\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [createVNode(unref(DismissableLayer_default), mergeProps({\n\t\t\t\t\tid: unref(rootContext).contentId,\n\t\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\tas: _ctx.as,\n\t\t\t\t\t\"as-child\": _ctx.asChild,\n\t\t\t\t\t\"disable-outside-pointer-events\": _ctx.disableOutsidePointerEvents,\n\t\t\t\t\trole: \"dialog\",\n\t\t\t\t\t\"aria-describedby\": unref(rootContext).descriptionId,\n\t\t\t\t\t\"aria-labelledby\": unref(rootContext).titleId,\n\t\t\t\t\t\"data-state\": unref(getOpenState)(unref(rootContext).open.value)\n\t\t\t\t}, _ctx.$attrs, {\n\t\t\t\t\tonDismiss: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false)),\n\t\t\t\t\tonEscapeKeyDown: _cache[1] || (_cache[1] = ($event) => emits(\"escapeKeyDown\", $event)),\n\t\t\t\t\tonFocusOutside: _cache[2] || (_cache[2] = ($event) => emits(\"focusOutside\", $event)),\n\t\t\t\t\tonInteractOutside: _cache[3] || (_cache[3] = ($event) => emits(\"interactOutside\", $event)),\n\t\t\t\t\tonPointerDownOutside: _cache[4] || (_cache[4] = ($event) => emits(\"pointerDownOutside\", $event))\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16, [\n\t\t\t\t\t\"id\",\n\t\t\t\t\t\"as\",\n\t\t\t\t\t\"as-child\",\n\t\t\t\t\t\"disable-outside-pointer-events\",\n\t\t\t\t\t\"aria-describedby\",\n\t\t\t\t\t\"aria-labelledby\",\n\t\t\t\t\t\"data-state\"\n\t\t\t\t])]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"trapped\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentImpl.vue\nvar DialogContentImpl_default = DialogContentImpl_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentImpl_default };\n//# sourceMappingURL=DialogContentImpl.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useHideOthers } from \"../shared/useHideOthers.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentImpl_default } from \"./DialogContentImpl.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentModal.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentModal\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: true\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tconst { forwardRef, currentElement } = useForwardExpose();\n\t\tuseHideOthers(currentElement);\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(DialogContentImpl_default, mergeProps({\n\t\t\t\t...props,\n\t\t\t\t...unref(emitsAsProps)\n\t\t\t}, {\n\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\"trap-focus\": unref(rootContext).open.value,\n\t\t\t\t\"disable-outside-pointer-events\": props.disableOutsidePointerEvents,\n\t\t\t\tonCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tunref(rootContext).triggerElement.value?.focus();\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: _cache[1] || (_cache[1] = (event) => {\n\t\t\t\t\tconst originalEvent = event.detail.originalEvent;\n\t\t\t\t\tconst ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n\t\t\t\t\tconst isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\t\t\t\t\tif (isRightClick) event.preventDefault();\n\t\t\t\t}),\n\t\t\t\tonFocusOutside: _cache[2] || (_cache[2] = (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t})\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"trap-focus\", \"disable-outside-pointer-events\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentModal.vue\nvar DialogContentModal_default = DialogContentModal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentModal_default };\n//# sourceMappingURL=DialogContentModal.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentImpl_default } from \"./DialogContentImpl.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, ref, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContentNonModal.vue?vue&type=script&setup=true&lang.ts\nvar DialogContentNonModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContentNonModal\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\ttrapFocus: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tuseForwardExpose();\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst hasInteractedOutsideRef = ref(false);\n\t\tconst hasPointerDownOutsideRef = ref(false);\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(DialogContentImpl_default, mergeProps({\n\t\t\t\t...props,\n\t\t\t\t...unref(emitsAsProps)\n\t\t\t}, {\n\t\t\t\t\"trap-focus\": false,\n\t\t\t\t\"disable-outside-pointer-events\": false,\n\t\t\t\tonCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\tif (!hasInteractedOutsideRef.value) unref(rootContext).triggerElement.value?.focus();\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\thasInteractedOutsideRef.value = false;\n\t\t\t\t\thasPointerDownOutsideRef.value = false;\n\t\t\t\t}),\n\t\t\t\tonInteractOutside: _cache[1] || (_cache[1] = (event) => {\n\t\t\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t\t\thasInteractedOutsideRef.value = true;\n\t\t\t\t\t\tif (event.detail.originalEvent.type === \"pointerdown\") hasPointerDownOutsideRef.value = true;\n\t\t\t\t\t}\n\t\t\t\t\tconst target = event.target;\n\t\t\t\t\tconst targetIsTrigger = unref(rootContext).triggerElement.value?.contains(target);\n\t\t\t\t\tif (targetIsTrigger) event.preventDefault();\n\t\t\t\t\tif (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.value) event.preventDefault();\n\t\t\t\t})\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContentNonModal.vue\nvar DialogContentNonModal_default = DialogContentNonModal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContentNonModal_default };\n//# sourceMappingURL=DialogContentNonModal.js.map","import { useEmitAsProps } from \"../shared/useEmitAsProps.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Presence_default } from \"../Presence/Presence.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogContentModal_default } from \"./DialogContentModal.js\";\nimport { DialogContentNonModal_default } from \"./DialogContentNonModal.js\";\nimport { createBlock, createCommentVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogContent.vue?vue&type=script&setup=true&lang.ts\nvar DialogContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogContent\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdisableOutsidePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\temits: [\n\t\t\"escapeKeyDown\",\n\t\t\"pointerDownOutside\",\n\t\t\"focusOutside\",\n\t\t\"interactOutside\",\n\t\t\"openAutoFocus\",\n\t\t\"closeAutoFocus\"\n\t],\n\tsetup(__props, { emit: __emit }) {\n\t\tconst props = __props;\n\t\tconst emits = __emit;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst emitsAsProps = useEmitAsProps(emits);\n\t\tconst { forwardRef } = useForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Presence_default), { present: _ctx.forceMount || unref(rootContext).open.value }, {\n\t\t\t\tdefault: withCtx(() => [unref(rootContext).modal.value ? (openBlock(), createBlock(DialogContentModal_default, mergeProps({\n\t\t\t\t\tkey: 0,\n\t\t\t\t\tref: unref(forwardRef)\n\t\t\t\t}, {\n\t\t\t\t\t...props,\n\t\t\t\t\t...unref(emitsAsProps),\n\t\t\t\t\t..._ctx.$attrs\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16)) : (openBlock(), createBlock(DialogContentNonModal_default, mergeProps({\n\t\t\t\t\tkey: 1,\n\t\t\t\t\tref: unref(forwardRef)\n\t\t\t\t}, {\n\t\t\t\t\t...props,\n\t\t\t\t\t...unref(emitsAsProps),\n\t\t\t\t\t..._ctx.$attrs\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16))]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"present\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogContent.vue\nvar DialogContent_default = DialogContent_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogContent_default };\n//# sourceMappingURL=DialogContent.js.map","import { useBodyScrollLock } from \"../shared/useBodyScrollLock.js\";\nimport { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, openBlock, renderSlot, unref, withCtx, withModifiers } from \"vue\";\n\n//#region src/Dialog/DialogOverlayImpl.vue?vue&type=script&setup=true&lang.ts\nvar DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogOverlayImpl\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst rootContext = injectDialogRootContext();\n\t\tuseBodyScrollLock(true);\n\t\tuseForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), {\n\t\t\t\tas: _ctx.as,\n\t\t\t\t\"as-child\": _ctx.asChild,\n\t\t\t\t\"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n\t\t\t\tstyle: { \"pointer-events\": \"auto\" },\n\t\t\t\tonPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {}, [\n\t\t\t\t\t\"left\",\n\t\t\t\t\t\"self\",\n\t\t\t\t\t\"prevent\"\n\t\t\t\t]))\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\n\t\t\t\t\"as\",\n\t\t\t\t\"as-child\",\n\t\t\t\t\"data-state\"\n\t\t\t]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogOverlayImpl.vue\nvar DialogOverlayImpl_default = DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogOverlayImpl_default };\n//# sourceMappingURL=DialogOverlayImpl.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Presence_default } from \"../Presence/Presence.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { DialogOverlayImpl_default } from \"./DialogOverlayImpl.js\";\nimport { createBlock, createCommentVNode, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogOverlay.vue?vue&type=script&setup=true&lang.ts\nvar DialogOverlay_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogOverlay\",\n\tprops: {\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef } = useForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn unref(rootContext)?.modal.value ? (openBlock(), createBlock(unref(Presence_default), {\n\t\t\t\tkey: 0,\n\t\t\t\tpresent: _ctx.forceMount || unref(rootContext).open.value\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [createVNode(DialogOverlayImpl_default, mergeProps(_ctx.$attrs, {\n\t\t\t\t\tref: unref(forwardRef),\n\t\t\t\t\tas: _ctx.as,\n\t\t\t\t\t\"as-child\": _ctx.asChild\n\t\t\t\t}), {\n\t\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t\t_: 3\n\t\t\t\t}, 16, [\"as\", \"as-child\"])]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\"present\"])) : createCommentVNode(\"v-if\", true);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogOverlay.vue\nvar DialogOverlay_default = DialogOverlay_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogOverlay_default };\n//# sourceMappingURL=DialogOverlay.js.map","import { Teleport_default } from \"../Teleport/Teleport.js\";\nimport { createBlock, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogPortal.vue?vue&type=script&setup=true&lang.ts\nvar DialogPortal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogPortal\",\n\tprops: {\n\t\tto: {\n\t\t\ttype: null,\n\t\t\trequired: false\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tdefer: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tforceMount: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Teleport_default), normalizeProps(guardReactiveProps(props)), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogPortal.vue\nvar DialogPortal_default = DialogPortal_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogPortal_default };\n//# sourceMappingURL=DialogPortal.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogTitle.vue?vue&type=script&setup=true&lang.ts\nvar DialogTitle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogTitle\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"h2\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tuseForwardExpose();\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, { id: unref(rootContext).titleId }), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\"id\"]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogTitle.vue\nvar DialogTitle_default = DialogTitle_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogTitle_default };\n//# sourceMappingURL=DialogTitle.js.map","import { useForwardExpose } from \"../shared/useForwardExpose.js\";\nimport { useId } from \"../shared/useId.js\";\nimport { Primitive } from \"../Primitive/Primitive.js\";\nimport { injectDialogRootContext } from \"./DialogRoot.js\";\nimport { createBlock, defineComponent, mergeProps, onMounted, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/Dialog/DialogTrigger.vue?vue&type=script&setup=true&lang.ts\nvar DialogTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"DialogTrigger\",\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"button\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tconst rootContext = injectDialogRootContext();\n\t\tconst { forwardRef, currentElement } = useForwardExpose();\n\t\trootContext.contentId ||= useId(void 0, \"reka-dialog-content\");\n\t\tonMounted(() => {\n\t\t\trootContext.triggerElement.value = currentElement.value;\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n\t\t\t\tref: unref(forwardRef),\n\t\t\t\ttype: _ctx.as === \"button\" ? \"button\" : void 0,\n\t\t\t\t\"aria-haspopup\": \"dialog\",\n\t\t\t\t\"aria-expanded\": unref(rootContext).open.value || false,\n\t\t\t\t\"aria-controls\": unref(rootContext).open.value ? unref(rootContext).contentId : void 0,\n\t\t\t\t\"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n\t\t\t\tonClick: unref(rootContext).onOpenToggle\n\t\t\t}), {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 16, [\n\t\t\t\t\"type\",\n\t\t\t\t\"aria-expanded\",\n\t\t\t\t\"aria-controls\",\n\t\t\t\t\"data-state\",\n\t\t\t\t\"onClick\"\n\t\t\t]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/Dialog/DialogTrigger.vue\nvar DialogTrigger_default = DialogTrigger_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { DialogTrigger_default };\n//# sourceMappingURL=DialogTrigger.js.map","<script setup lang=\"ts\">\n/**\n * A `?` that opens a modal.\n *\n * WHY THIS AND NOT `InfoHint`. `InfoHint` is a small `[i]` popover for a sentence or two — the right\n * shape for \"what does this field mean\". It is the wrong shape for the several paragraphs some of\n * these surfaces genuinely need: a 300-character bubble anchored to an icon either overflows its\n * container or wraps into a column two words wide.\n *\n * Those paragraphs used to sit permanently on the page as banners. That is the actual problem: an\n * explanation everyone reads once and nobody reads again, charged to every visit forever. A `?`\n * costs one glyph in the header and gives the reader the whole thing when they want it.\n *\n * WHAT STAYS ON THE PAGE. State, not explanation. \"Docker did not answer\" is a banner because it is\n * true right now and changes what you can do; \"here is how Traefik resolves a container IP\" is help,\n * and belongs behind the `?`.\n *\n * Built on Reka's Dialog: focus trap, focus restore, scroll lock, Escape, and `aria-modal` wiring\n * are all behaviour with edge cases, and none of them are this product's problem.\n */\nimport { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger } from 'reka-ui';\n\ndefineProps<{\n /** The question the modal answers, e.g. \"How routing works\". Becomes the dialog's title. */\n title: string;\n /** Accessible name for the trigger — screen readers hear this instead of \"question mark\". */\n label?: string;\n}>();\n</script>\n\n<template>\n <DialogRoot>\n <DialogTrigger class=\"helpq\" :aria-label=\"label ?? title\">\n <svg viewBox=\"0 0 24 24\" width=\"13\" height=\"13\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\">\n <path d=\"M9.2 9a2.9 2.9 0 1 1 3.8 2.8c-.7.3-1 .9-1 1.6v.4\" />\n <circle cx=\"12\" cy=\"17.6\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n </DialogTrigger>\n\n <DialogPortal>\n <DialogOverlay class=\"scrim help-scrim\" />\n <DialogContent class=\"help-modal\">\n <div class=\"help-head\">\n <DialogTitle class=\"help-title\">{{ title }}</DialogTitle>\n <DialogClose class=\"ghost sm\" aria-label=\"Close\">Close</DialogClose>\n </div>\n <div class=\"help-body\">\n <slot />\n </div>\n </DialogContent>\n </DialogPortal>\n </DialogRoot>\n</template>\n"],"names":["injectDialogRootContext","provideDialogRootContext","createContext","DialogRoot_vue_vue_type_script_setup_true_lang_default","defineComponent","__props","__emit","props","open","useVModel","triggerElement","ref","contentElement","modal","toRefs","value","_ctx","_cache","renderSlot","unref","DialogRoot_default","DialogClose_vue_vue_type_script_setup_true_lang_default","useForwardExpose","rootContext","openBlock","createBlock","Primitive","mergeProps","$event","withCtx","DialogClose_default","DialogContentImpl_vue_vue_type_script_setup_true_lang_default","emits","forwardRef","useId","onMounted","getActiveElement","FocusScope_default","createVNode","DismissableLayer_default","getOpenState","DialogContentImpl_default","DialogContentModal_vue_vue_type_script_setup_true_lang_default","emitsAsProps","useEmitAsProps","currentElement","useHideOthers","event","_a","originalEvent","ctrlLeftClick","DialogContentModal_default","DialogContentNonModal_vue_vue_type_script_setup_true_lang_default","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","DialogContentNonModal_default","DialogContent_vue_vue_type_script_setup_true_lang_default","Presence_default","DialogContent_default","DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default","useBodyScrollLock","withModifiers","DialogOverlayImpl_default","DialogOverlay_vue_vue_type_script_setup_true_lang_default","createCommentVNode","DialogOverlay_default","DialogPortal_vue_vue_type_script_setup_true_lang_default","Teleport_default","normalizeProps","guardReactiveProps","DialogPortal_default","DialogTitle_vue_vue_type_script_setup_true_lang_default","DialogTitle_default","DialogTrigger_vue_vue_type_script_setup_true_lang_default","DialogTrigger_default","_createBlock","_unref","DialogRoot","_createVNode","DialogTrigger","_createElementVNode","DialogPortal","DialogOverlay","DialogContent","_hoisted_1","DialogTitle","DialogClose","_hoisted_2","_renderSlot"],"mappings":"qSAKA,KAAM,CAACA,EAAyBC,CAAwB,EAAkBC,EAAc,YAAY,EACpG,IAAIC,EAAyEC,EAAgB,CAC5F,aAAc,GACd,OAAQ,aACR,MAAO,CACN,KAAM,CACL,KAAM,QACN,SAAU,GACV,QAAS,MACZ,EACE,YAAa,CACZ,KAAM,QACN,SAAU,GACV,QAAS,EACZ,EACE,MAAO,CACN,KAAM,QACN,SAAU,GACV,QAAS,EACZ,CACA,EACC,MAAO,CAAC,aAAa,EACrB,MAAMC,EAAS,CAAE,KAAMC,CAAM,EAAI,CAChC,MAAMC,EAAQF,EAERG,EAAOC,EAAUF,EAAO,OADjBD,EAC+B,CAC3C,aAAcC,EAAM,YACpB,QAASA,EAAM,OAAS,MAC3B,CAAG,EACKG,EAAiBC,EAAG,EACpBC,EAAiBD,EAAG,EACpB,CAAE,MAAAE,CAAK,EAAKC,EAAOP,CAAK,EAC9B,OAAAN,EAAyB,CACxB,KAAAO,EACA,MAAAK,EACA,UAAW,IAAM,CAChBL,EAAK,MAAQ,EACd,EACA,aAAeO,GAAU,CACxBP,EAAK,MAAQO,CACd,EACA,aAAc,IAAM,CACnBP,EAAK,MAAQ,CAACA,EAAK,KACpB,EACA,UAAW,GACX,QAAS,GACT,cAAe,GACf,eAAAE,EACA,eAAAE,CACH,CAAG,EACM,CAACI,EAAMC,IACNC,EAAWF,EAAK,OAAQ,UAAW,CACzC,KAAMG,EAAMX,CAAI,EAChB,MAAO,IAAMA,EAAK,MAAQ,EAC9B,CAAI,CAEH,CACD,CAAC,EAIGY,EAAqBjB,EC5DrBkB,EAA0EjB,EAAgB,CAC7F,OAAQ,cACR,MAAO,CACN,QAAS,CACR,KAAM,QACN,SAAU,EACb,EACE,GAAI,CACH,KAAM,KACN,SAAU,GACV,QAAS,QACZ,CACA,EACC,MAAMC,EAAS,CACd,MAAME,EAAQF,EACdiB,EAAgB,EAChB,MAAMC,E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as O,r as f,C as E,A as R,j as W,B as P}from"./index-D8OAewba.js";import{a as Q,s as U,t as X}from"./useFormat-CKJxQp_i.js";import{_ as Y}from"./StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js";import{_ as Z}from"./ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js";function k(o){var i;return(i=o.message)!=null&&i.startsWith("unverifiable")?"unverifiable":o.ok?"ok":o.phase==="assert_gone"?"leaked":"failed"}function ee(o){return{ok:"✓",unverifiable:"?",leaked:"!",failed:"✗"}[k(o)]}function se(o){return o.message?o.message:o.skipped?"skipped":k(o)==="ok"?"ok":`exit ${o.code}`}function te(o){return o.filter(i=>i.phase==="assert_gone"&&!i.ok).map(i=>i.axis)}function ae(o){return o.filter(i=>k(i)==="unverifiable").length}const oe={class:"steps stagger"},ne={class:"who"},le={class:"dim",style:{"font-size":"var(--t-sm)"}},re=D({__name:"StepList",props:{steps:{}},setup(o){return(i,t)=>(n(),r("div",null,[e("ul",oe,[(n(!0),r(g,null,z(o.steps,(l,v)=>(n(),r("li",{key:`${l.phase}-${l.axis}-${v}`,class:"step",style:M({"--i":v})},[e("span",{class:_(["mark",`s-${p(k)(l)}`]),"aria-hidden":"true"},u(p(ee)(l)),3),e("span",null,[e("span",ne,u(l.axis),1),e("span",le," · "+u(l.phase),1),e("span",{class:_(["badge",p(k)(l)]),style:{"margin-left":"var(--s2)"}},u(p(k)(l)),3),e("div",{class:_(["msg",`s-${p(k)(l)}`])},u(p(se)(l)),3)])],4))),128))]),t[0]||(t[0]=J('<p class="hint"><span class="s-ok">✓ ok</span> · <span class="s-failed">✗ failed</span> · <span class="s-leaked">! leaked — survived teardown</span> · <span class="s-unverifiable">? unverifiable — nothing to check, not a pass</span>. A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is best-effort by design, so aborting halfway would leave more behind than continuing. </p>',1))]))}}),ue={class:"page-head"},ie={class:"sub"},de={key:1,class:"panel leaked-banner"},ce={key:2,class:"panel"},pe={class:"pre"},ve={class:"panel"},me={class:"phead"},fe={class:"row",style:{gap:"8px"}},ke={key:0,class:"mute pulse"},be={class:"row",style:{gap:"6px"}},ge={key:0,class:"mute"},he={key:1,class:"mute"},ye={class:"mute"},_e={key:3,class:"panel"},we={class:"phead"},xe={key:0,class:"mute"},Le=D({__name:"JobDetailView",props:{jobId:{}},setup(o){const i=o,t=f(null),l=f([]),v=f(""),w=f(!0),h=f(!1),x=f(!0),$=f(null);let m=null;const C=E(()=>{var a;return(a=t.value)!=null&&a.outcome?te(t.value.outcome.steps):[]}),S=E(()=>{var a;return(a=t.value)!=null&&a.outcome?ae(t.value.outcome.steps):0});async function j(){var s;const a=await R.get(`/api/jobs/${encodeURIComponent(i.jobId)}`);return w.value=!1,a.ok?(v.value="",t.value=a.body.job,(s=a.body.job.log)!=null&&s.length&&l.value.length===0&&(l.value=[...a.body.job.log]),a.body.job):(v.value=P(a,"load job"),null)}function y(){m==null||m.close(),m=null,h.value=!1}function L(){y(),m=new EventSource(R.url(`/api/jobs/${encodeURIComponent(i.jobId)}/stream`)),h.value=!0,m.onmessage=a=>{let s;try{s=JSON.parse(a.data)}catch{return}if(s.done){y(),j();return}l.value.push(s),x.value&&queueMicrotask(F)},m.onerror=()=>{y(),j()}}function F(){const a=$.value;a&&(a.scrollTop=a.scrollHeight)}return q(()=>i.jobId,async()=>{l.value=[],t.value=null,w.value=!0;const a=await j();a&&a.state==="running"&&L()},{immediate:!0}),H(y),(a,s)=>{var I,N,T;const A=W("RouterLink");return n(),r("div",null,[e("div",ue,[e("div",null,[e("h1",null,[V(A,{to:"/jobs",class:"mute"},{default:G(()=>[...s[1]||(s[1]=[d("Jobs",-1)])]),_:1}),s[2]||(s[2]=e("span",{class:"mute"}," / ",-1)),d(u(t.value?p(Q)(t.value.action):"…"),1)]),e("div",ie,[t.value?(n(),r(g,{key:0},[e("code",null,u(t.value.stack),1),d(" · started "+u(p(U)(t.value.startedAt))+" ",1),t.value.endedAt?(n(),r(g,{key:0},[d(" · took "+u(p(X)(t.value.startedAt,t.value.endedAt)),1)],64)):c("",!0)],64)):(n(),r(g,{key:1},[d(u(o.jobId),1)],64))])]),t.value?(n(),B(Y,{key:0,state:t.value.state},null,8,["state"])):c("",!0)]),v.value?(n(),B(Z,{key:0,text:v.value},null,8,["text"])):c("",!0),C.value.length?(n(),r("section",de,[s[3]||(s[3]=e("strong",null,"Leaked:",-1)),d(" "+u(C.value.join(", "))+" ",1),s[4]||(s[4]=e("div",{class:"mute"},[d(" These axes' "),e("code",null,"assert_gone"),d(" failed, so the resources are still present. They will not be retried — tear them down by hand, then re-run "),e("code",null,"verify"),d(". ")],-1))])):c("",!0),(I=t.value)!=null&&I.error?(n(),r("section",ce,[s[5]||(s[5]=e("strong",{class:"bad"},"The job crashed",-1)),e("pre",pe,u(t.value.error),1)])):c("",!0),e("section",ve,[e("div",me,[s[7]||(s[7]=e("h2",{class:"phead-title"},"Log",-1)),e("div",fe,[h.value?(n(),r("span",ke,"streaming…")):c("",!0),e("label",be,[K(e("input",{"onUpdate:modelValue":s[0]||(s[0]=b=>x.value=b),type:"checkbox"},null,512),[[O,x.value]]),s[6]||(s[6]=e("span",{class:"mute"},"Follow",-1))]),!h.value&&((N=t.value)==null?void 0:N.state)==="running"?(n(),r("button",{key:1,class:"btn",onClick:L}," Reconnect ")):c("",!0)])]),e("div",{ref_key:"logEl",ref:$,class:"logbox",role:"log","aria-live":"polite"},[w.value?(n(),r("div",ge,"Loading…")):l.value.length?c("",!0):(n(),r("div",he,"No output.")),(n(!0),r(g,null,z(l.value,b=>(n(),r("div",{key:b.seq,class:_(["logline",b.level])},[e("span",ye,u(p(U)(b.at)),1),d(" "+u(b.message),1)],2))),128))],512)]),(T=t.value)!=null&&T.outcome?(n(),r("section",_e,[e("div",we,[s[10]||(s[10]=e("h2",{class:"phead-title"},"Steps",-1)),S.value?(n(),r("span",xe,[d(u(S.value)+" unverifiable — no ",1),s[8]||(s[8]=e("code",null,"assert_gone",-1)),s[9]||(s[9]=d(", so nothing was checked ",-1))])):c("",!0)]),V(re,{steps:t.value.outcome.steps},null,8,["steps"])])):c("",!0)])}}});export{Le as default};
|
|
2
|
+
//# sourceMappingURL=JobDetailView-ow1_d8lc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobDetailView-C8y-1Gk0.js","sources":["../../src/composables/useSteps.ts","../../src/components/StepList.vue","../../src/views/JobDetailView.vue"],"sourcesContent":["/**\n * Step classification — the single most important logic in this app.\n *\n * A job's outcome has four states that MUST NOT blur into one another. The whole product is the\n * distinction between the middle two:\n *\n * ok passed. A `down` step is ALWAYS ok and may still carry a \"non-fatal:\" note —\n * teardown is best-effort by design, so the step really did pass.\n * unverifiable the axis defines no `assert_gone`, so `verify` had nothing to check. NOT a pass.\n * A green here would be exactly the false confidence this tool exists to remove.\n * leaked `assert_gone` FAILED — the resource survived teardown. Nothing else will clean\n * it up. This is the signal the whole tool exists for, and the CLI's exit code 2.\n * failed any other non-zero step.\n *\n * Order matters: `unverifiable` is matched on the message FIRST, exactly as the CLI's own report\n * does. `skipped` alone is not enough — a dry run also skips.\n */\n\nimport type { StepResult } from '../api/types';\n\nexport type StepState = 'ok' | 'unverifiable' | 'leaked' | 'failed';\n\nexport function stepState(s: StepResult): StepState {\n if (s.message?.startsWith('unverifiable')) return 'unverifiable';\n if (!s.ok) return s.phase === 'assert_gone' ? 'leaked' : 'failed';\n return 'ok';\n}\n\nexport function stepMark(s: StepResult): string {\n return { ok: '✓', unverifiable: '?', leaked: '!', failed: '✗' }[stepState(s)];\n}\n\nexport function stepText(s: StepResult): string {\n if (s.message) return s.message;\n if (s.skipped) return 'skipped';\n return stepState(s) === 'ok' ? 'ok' : `exit ${s.code}`;\n}\n\n/** Only a failed `assert_gone` is a leak. Every other non-zero step is a plain failure. */\nexport function leakedAxes(steps: StepResult[]): string[] {\n return steps.filter((s) => s.phase === 'assert_gone' && !s.ok).map((s) => s.axis);\n}\n\nexport function countUnverifiable(steps: StepResult[]): number {\n return steps.filter((s) => stepState(s) === 'unverifiable').length;\n}\n","<script setup lang=\"ts\">\n/**\n * A job's step results.\n *\n * The legend is part of the component because the four states only mean anything together:\n * `unverifiable` is not a pass, and `leaked` is not the same problem as `failed`.\n */\nimport type { StepResult } from '../api/types';\nimport { stepMark, stepState, stepText } from '../composables/useSteps';\n\ndefineProps<{ steps: StepResult[] }>();\n</script>\n\n<template>\n <div>\n <ul class=\"steps stagger\">\n <li\n v-for=\"(s, i) in steps\"\n :key=\"`${s.phase}-${s.axis}-${i}`\"\n class=\"step\"\n :style=\"{ '--i': i }\"\n >\n <span class=\"mark\" :class=\"`s-${stepState(s)}`\" aria-hidden=\"true\">{{ stepMark(s) }}</span>\n <span>\n <span class=\"who\">{{ s.axis }}</span>\n <span class=\"dim\" style=\"font-size: var(--t-sm)\"> · {{ s.phase }}</span>\n <span class=\"badge\" :class=\"stepState(s)\" style=\"margin-left: var(--s2)\">\n {{ stepState(s) }}\n </span>\n <div class=\"msg\" :class=\"`s-${stepState(s)}`\">{{ stepText(s) }}</div>\n </span>\n </li>\n </ul>\n\n <p class=\"hint\">\n <span class=\"s-ok\">✓ ok</span> ·\n <span class=\"s-failed\">✗ failed</span> ·\n <span class=\"s-leaked\">! leaked — survived teardown</span> ·\n <span class=\"s-unverifiable\">? unverifiable — nothing to check, not a pass</span>.\n A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is\n best-effort by design, so aborting halfway would leave more behind than continuing.\n </p>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * One job: its live log while it runs, then the step table that says what actually happened.\n *\n * The log streams over `EventSource`. The server replays the whole buffered history first and then\n * sends live events, so attaching late still shows the beginning — no polling, no gap to reconcile.\n * A final `{done:true,state}` ends the stream; we close the source then and fetch the job once more\n * to pick up `outcome`, which only exists after the job finishes.\n */\nimport { computed, onBeforeUnmount, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { Job, LogEvent } from '../api/types';\nimport { leakedAxes, countUnverifiable } from '../composables/useSteps';\nimport { actionLabel, stamp, took } from '../composables/useFormat';\nimport StepList from '../components/StepList.vue';\nimport StateBadge from '../components/StateBadge.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\n\nconst props = defineProps<{ jobId: string }>();\n\nconst job = ref<Job | null>(null);\nconst lines = ref<LogEvent[]>([]);\nconst error = ref('');\nconst loading = ref(true);\nconst streaming = ref(false);\nconst follow = ref(true);\nconst logEl = ref<HTMLElement | null>(null);\n\nlet source: EventSource | null = null;\n\nconst leaks = computed(() => (job.value?.outcome ? leakedAxes(job.value.outcome.steps) : []));\nconst unverifiable = computed(() =>\n job.value?.outcome ? countUnverifiable(job.value.outcome.steps) : 0,\n);\n\n/** Returns the job it loaded, so callers need not re-read the ref — see the note at the watcher. */\nasync function load(): Promise<Job | null> {\n const r = await api.get<{ job: Job }>(`/api/jobs/${encodeURIComponent(props.jobId)}`);\n loading.value = false;\n if (!r.ok) {\n error.value = problem(r, 'load job');\n return null;\n }\n error.value = '';\n job.value = r.body.job;\n // The job carries its buffered log too. Seed from it so a finished job renders instantly without\n // opening a stream that would only replay and close.\n if (r.body.job.log?.length && lines.value.length === 0) lines.value = [...r.body.job.log];\n return r.body.job;\n}\n\nfunction closeStream(): void {\n source?.close();\n source = null;\n streaming.value = false;\n}\n\nfunction stream(): void {\n closeStream();\n // No auth header: EventSource cannot send one. Reads are unauthenticated by design, which is\n // exactly why the log is a GET.\n source = new EventSource(api.url(`/api/jobs/${encodeURIComponent(props.jobId)}/stream`));\n streaming.value = true;\n\n source.onmessage = (ev) => {\n let payload: unknown;\n try {\n payload = JSON.parse(ev.data as string);\n } catch {\n return; // a frame we cannot parse is not worth tearing the stream down for\n }\n const done = payload as { done?: boolean };\n if (done.done) {\n closeStream();\n void load(); // `outcome` only exists once the job has ended\n return;\n }\n lines.value.push(payload as LogEvent);\n if (follow.value) queueMicrotask(scrollToEnd);\n };\n\n // An error here is usually the job having ended between the fetch and the connect, or the API\n // becoming unreachable. Either way stop rather than let the browser reconnect forever.\n source.onerror = () => {\n closeStream();\n void load();\n };\n}\n\nfunction scrollToEnd(): void {\n const el = logEl.value;\n if (el) el.scrollTop = el.scrollHeight;\n}\n\nwatch(\n () => props.jobId,\n async () => {\n lines.value = [];\n job.value = null;\n loading.value = true;\n // Use what `load` returned rather than re-reading the ref: control-flow analysis still has\n // `job.value` narrowed to the `null` assigned above, because it cannot see that an awaited\n // call reassigned it.\n const loaded = await load();\n if (loaded && loaded.state === 'running') stream();\n },\n { immediate: true },\n);\n\nonBeforeUnmount(closeStream);\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n <RouterLink to=\"/jobs\" class=\"mute\">Jobs</RouterLink>\n <span class=\"mute\"> / </span>{{ job ? actionLabel(job.action) : '…' }}\n </h1>\n <div class=\"sub\">\n <template v-if=\"job\">\n <code>{{ job.stack }}</code> · started {{ stamp(job.startedAt) }}\n <template v-if=\"job.endedAt\"> · took {{ took(job.startedAt, job.endedAt) }}</template>\n </template>\n <template v-else>{{ jobId }}</template>\n </div>\n </div>\n <StateBadge v-if=\"job\" :state=\"job.state\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" />\n\n <!--\n Leaked is called out above everything else. It means a resource survived teardown and nothing\n else is going to clean it up — the one outcome that needs a human.\n -->\n <section v-if=\"leaks.length\" class=\"panel leaked-banner\">\n <strong>Leaked:</strong> {{ leaks.join(', ') }}\n <div class=\"mute\">\n These axes' <code>assert_gone</code> failed, so the resources are still present. They will\n not be retried — tear them down by hand, then re-run <code>verify</code>.\n </div>\n </section>\n\n <section v-if=\"job?.error\" class=\"panel\">\n <strong class=\"bad\">The job crashed</strong>\n <pre class=\"pre\">{{ job.error }}</pre>\n </section>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Log</h2>\n <div class=\"row\" style=\"gap: 8px\">\n <span v-if=\"streaming\" class=\"mute pulse\">streaming…</span>\n <label class=\"row\" style=\"gap: 6px\">\n <input v-model=\"follow\" type=\"checkbox\" />\n <span class=\"mute\">Follow</span>\n </label>\n <button\n v-if=\"!streaming && job?.state === 'running'\"\n class=\"btn\"\n @click=\"stream\"\n >\n Reconnect\n </button>\n </div>\n </div>\n\n <div ref=\"logEl\" class=\"logbox\" role=\"log\" aria-live=\"polite\">\n <div v-if=\"loading\" class=\"mute\">Loading…</div>\n <div v-else-if=\"!lines.length\" class=\"mute\">No output.</div>\n <div v-for=\"l in lines\" :key=\"l.seq\" class=\"logline\" :class=\"l.level\">\n <span class=\"mute\">{{ stamp(l.at) }}</span> {{ l.message }}\n </div>\n </div>\n </section>\n\n <section v-if=\"job?.outcome\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Steps</h2>\n <span v-if=\"unverifiable\" class=\"mute\">\n {{ unverifiable }} unverifiable — no <code>assert_gone</code>, so nothing was checked\n </span>\n </div>\n <StepList :steps=\"job.outcome.steps\" />\n </section>\n </div>\n</template>\n"],"names":["stepState","s","_a","stepMark","stepText","leakedAxes","steps","countUnverifiable","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_Fragment","_renderList","__props","i","_normalizeClass","_unref","_toDisplayString","_hoisted_2","_hoisted_3","props","job","ref","lines","error","loading","streaming","follow","logEl","source","leaks","computed","unverifiable","load","r","api","problem","closeStream","stream","ev","payload","scrollToEnd","el","watch","loaded","onBeforeUnmount","_createVNode","_component_RouterLink","_cache","_createTextVNode","actionLabel","stamp","_createBlock","StateBadge","ErrorNote","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","$event","_b","_hoisted_11","_hoisted_12","l","_hoisted_13","_c","_hoisted_14","_hoisted_15","_hoisted_16","StepList"],"mappings":"2aAsBO,SAASA,EAAUC,EAA0B,OAClD,OAAIC,EAAAD,EAAE,UAAF,MAAAC,EAAW,WAAW,gBAAwB,eAC7CD,EAAE,GACA,KADWA,EAAE,QAAU,cAAgB,SAAW,QAE3D,CAEO,SAASE,GA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tB,EAAA,EAAAH,EAEO,OAFPgE,GAEO,CADFtB,EAAAhC,EAAAe,EAAA,KAAY,EAAG,sBAAmB,CAAA,EAAAgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAxC,EAAwB,YAAlB,cAAW,EAAA,iBAAO,4BAC/D,EAAA,EAAA,eAEFsC,EAAuC0B,GAAA,CAA5B,MAAOnD,EAAA,MAAI,QAAQ,KAAA"}
|
|
1
|
+
{"version":3,"file":"JobDetailView-ow1_d8lc.js","sources":["../../src/composables/useSteps.ts","../../src/components/StepList.vue","../../src/views/JobDetailView.vue"],"sourcesContent":["/**\n * Step classification — the single most important logic in this app.\n *\n * A job's outcome has four states that MUST NOT blur into one another. The whole product is the\n * distinction between the middle two:\n *\n * ok passed. A `down` step is ALWAYS ok and may still carry a \"non-fatal:\" note —\n * teardown is best-effort by design, so the step really did pass.\n * unverifiable the axis defines no `assert_gone`, so `verify` had nothing to check. NOT a pass.\n * A green here would be exactly the false confidence this tool exists to remove.\n * leaked `assert_gone` FAILED — the resource survived teardown. Nothing else will clean\n * it up. This is the signal the whole tool exists for, and the CLI's exit code 2.\n * failed any other non-zero step.\n *\n * Order matters: `unverifiable` is matched on the message FIRST, exactly as the CLI's own report\n * does. `skipped` alone is not enough — a dry run also skips.\n */\n\nimport type { StepResult } from '../api/types';\n\nexport type StepState = 'ok' | 'unverifiable' | 'leaked' | 'failed';\n\nexport function stepState(s: StepResult): StepState {\n if (s.message?.startsWith('unverifiable')) return 'unverifiable';\n if (!s.ok) return s.phase === 'assert_gone' ? 'leaked' : 'failed';\n return 'ok';\n}\n\nexport function stepMark(s: StepResult): string {\n return { ok: '✓', unverifiable: '?', leaked: '!', failed: '✗' }[stepState(s)];\n}\n\nexport function stepText(s: StepResult): string {\n if (s.message) return s.message;\n if (s.skipped) return 'skipped';\n return stepState(s) === 'ok' ? 'ok' : `exit ${s.code}`;\n}\n\n/** Only a failed `assert_gone` is a leak. Every other non-zero step is a plain failure. */\nexport function leakedAxes(steps: StepResult[]): string[] {\n return steps.filter((s) => s.phase === 'assert_gone' && !s.ok).map((s) => s.axis);\n}\n\nexport function countUnverifiable(steps: StepResult[]): number {\n return steps.filter((s) => stepState(s) === 'unverifiable').length;\n}\n","<script setup lang=\"ts\">\n/**\n * A job's step results.\n *\n * The legend is part of the component because the four states only mean anything together:\n * `unverifiable` is not a pass, and `leaked` is not the same problem as `failed`.\n */\nimport type { StepResult } from '../api/types';\nimport { stepMark, stepState, stepText } from '../composables/useSteps';\n\ndefineProps<{ steps: StepResult[] }>();\n</script>\n\n<template>\n <div>\n <ul class=\"steps stagger\">\n <li\n v-for=\"(s, i) in steps\"\n :key=\"`${s.phase}-${s.axis}-${i}`\"\n class=\"step\"\n :style=\"{ '--i': i }\"\n >\n <span class=\"mark\" :class=\"`s-${stepState(s)}`\" aria-hidden=\"true\">{{ stepMark(s) }}</span>\n <span>\n <span class=\"who\">{{ s.axis }}</span>\n <span class=\"dim\" style=\"font-size: var(--t-sm)\"> · {{ s.phase }}</span>\n <span class=\"badge\" :class=\"stepState(s)\" style=\"margin-left: var(--s2)\">\n {{ stepState(s) }}\n </span>\n <div class=\"msg\" :class=\"`s-${stepState(s)}`\">{{ stepText(s) }}</div>\n </span>\n </li>\n </ul>\n\n <p class=\"hint\">\n <span class=\"s-ok\">✓ ok</span> ·\n <span class=\"s-failed\">✗ failed</span> ·\n <span class=\"s-leaked\">! leaked — survived teardown</span> ·\n <span class=\"s-unverifiable\">? unverifiable — nothing to check, not a pass</span>.\n A <code>down</code> step marked ok may still carry a <code>non-fatal:</code> note: teardown is\n best-effort by design, so aborting halfway would leave more behind than continuing.\n </p>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * One job: its live log while it runs, then the step table that says what actually happened.\n *\n * The log streams over `EventSource`. The server replays the whole buffered history first and then\n * sends live events, so attaching late still shows the beginning — no polling, no gap to reconcile.\n * A final `{done:true,state}` ends the stream; we close the source then and fetch the job once more\n * to pick up `outcome`, which only exists after the job finishes.\n */\nimport { computed, onBeforeUnmount, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { Job, LogEvent } from '../api/types';\nimport { leakedAxes, countUnverifiable } from '../composables/useSteps';\nimport { actionLabel, stamp, took } from '../composables/useFormat';\nimport StepList from '../components/StepList.vue';\nimport StateBadge from '../components/StateBadge.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\n\nconst props = defineProps<{ jobId: string }>();\n\nconst job = ref<Job | null>(null);\nconst lines = ref<LogEvent[]>([]);\nconst error = ref('');\nconst loading = ref(true);\nconst streaming = ref(false);\nconst follow = ref(true);\nconst logEl = ref<HTMLElement | null>(null);\n\nlet source: EventSource | null = null;\n\nconst leaks = computed(() => (job.value?.outcome ? leakedAxes(job.value.outcome.steps) : []));\nconst unverifiable = computed(() =>\n job.value?.outcome ? countUnverifiable(job.value.outcome.steps) : 0,\n);\n\n/** Returns the job it loaded, so callers need not re-read the ref — see the note at the watcher. */\nasync function load(): Promise<Job | null> {\n const r = await api.get<{ job: Job }>(`/api/jobs/${encodeURIComponent(props.jobId)}`);\n loading.value = false;\n if (!r.ok) {\n error.value = problem(r, 'load job');\n return null;\n }\n error.value = '';\n job.value = r.body.job;\n // The job carries its buffered log too. Seed from it so a finished job renders instantly without\n // opening a stream that would only replay and close.\n if (r.body.job.log?.length && lines.value.length === 0) lines.value = [...r.body.job.log];\n return r.body.job;\n}\n\nfunction closeStream(): void {\n source?.close();\n source = null;\n streaming.value = false;\n}\n\nfunction stream(): void {\n closeStream();\n // No auth header: EventSource cannot send one. Reads are unauthenticated by design, which is\n // exactly why the log is a GET.\n source = new EventSource(api.url(`/api/jobs/${encodeURIComponent(props.jobId)}/stream`));\n streaming.value = true;\n\n source.onmessage = (ev) => {\n let payload: unknown;\n try {\n payload = JSON.parse(ev.data as string);\n } catch {\n return; // a frame we cannot parse is not worth tearing the stream down for\n }\n const done = payload as { done?: boolean };\n if (done.done) {\n closeStream();\n void load(); // `outcome` only exists once the job has ended\n return;\n }\n lines.value.push(payload as LogEvent);\n if (follow.value) queueMicrotask(scrollToEnd);\n };\n\n // An error here is usually the job having ended between the fetch and the connect, or the API\n // becoming unreachable. Either way stop rather than let the browser reconnect forever.\n source.onerror = () => {\n closeStream();\n void load();\n };\n}\n\nfunction scrollToEnd(): void {\n const el = logEl.value;\n if (el) el.scrollTop = el.scrollHeight;\n}\n\nwatch(\n () => props.jobId,\n async () => {\n lines.value = [];\n job.value = null;\n loading.value = true;\n // Use what `load` returned rather than re-reading the ref: control-flow analysis still has\n // `job.value` narrowed to the `null` assigned above, because it cannot see that an awaited\n // call reassigned it.\n const loaded = await load();\n if (loaded && loaded.state === 'running') stream();\n },\n { immediate: true },\n);\n\nonBeforeUnmount(closeStream);\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n <RouterLink to=\"/jobs\" class=\"mute\">Jobs</RouterLink>\n <span class=\"mute\"> / </span>{{ job ? actionLabel(job.action) : '…' }}\n </h1>\n <div class=\"sub\">\n <template v-if=\"job\">\n <code>{{ job.stack }}</code> · started {{ stamp(job.startedAt) }}\n <template v-if=\"job.endedAt\"> · took {{ took(job.startedAt, job.endedAt) }}</template>\n </template>\n <template v-else>{{ jobId }}</template>\n </div>\n </div>\n <StateBadge v-if=\"job\" :state=\"job.state\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" />\n\n <!--\n Leaked is called out above everything else. It means a resource survived teardown and nothing\n else is going to clean it up — the one outcome that needs a human.\n -->\n <section v-if=\"leaks.length\" class=\"panel leaked-banner\">\n <strong>Leaked:</strong> {{ leaks.join(', ') }}\n <div class=\"mute\">\n These axes' <code>assert_gone</code> failed, so the resources are still present. They will\n not be retried — tear them down by hand, then re-run <code>verify</code>.\n </div>\n </section>\n\n <section v-if=\"job?.error\" class=\"panel\">\n <strong class=\"bad\">The job crashed</strong>\n <pre class=\"pre\">{{ job.error }}</pre>\n </section>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Log</h2>\n <div class=\"row\" style=\"gap: 8px\">\n <span v-if=\"streaming\" class=\"mute pulse\">streaming…</span>\n <label class=\"row\" style=\"gap: 6px\">\n <input v-model=\"follow\" type=\"checkbox\" />\n <span class=\"mute\">Follow</span>\n </label>\n <button\n v-if=\"!streaming && job?.state === 'running'\"\n class=\"btn\"\n @click=\"stream\"\n >\n Reconnect\n </button>\n </div>\n </div>\n\n <div ref=\"logEl\" class=\"logbox\" role=\"log\" aria-live=\"polite\">\n <div v-if=\"loading\" class=\"mute\">Loading…</div>\n <div v-else-if=\"!lines.length\" class=\"mute\">No output.</div>\n <div v-for=\"l in lines\" :key=\"l.seq\" class=\"logline\" :class=\"l.level\">\n <span class=\"mute\">{{ stamp(l.at) }}</span> {{ l.message }}\n </div>\n </div>\n </section>\n\n <section v-if=\"job?.outcome\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"phead-title\">Steps</h2>\n <span v-if=\"unverifiable\" class=\"mute\">\n {{ unverifiable }} unverifiable — no <code>assert_gone</code>, so nothing was checked\n </span>\n </div>\n <StepList :steps=\"job.outcome.steps\" />\n </section>\n </div>\n</template>\n"],"names":["stepState","s","_a","stepMark","stepText","leakedAxes","steps","countUnverifiable","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_Fragment","_renderList","__props","i","_normalizeClass","_unref","_toDisplayString","_hoisted_2","_hoisted_3","props","job","ref","lines","error","loading","streaming","follow","logEl","source","leaks","computed","unverifiable","load","r","api","problem","closeStream","stream","ev","payload","scrollToEnd","el","watch","loaded","onBeforeUnmount","_createVNode","_component_RouterLink","_cache","_createTextVNode","actionLabel","stamp","_createBlock","StateBadge","ErrorNote","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","$event","_b","_hoisted_11","_hoisted_12","l","_hoisted_13","_c","_hoisted_14","_hoisted_15","_hoisted_16","StepList"],"mappings":"4aAsBO,SAASA,EAAUC,EAA0B,OAClD,OAAIC,EAAAD,EAAE,UAAF,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A,IAAAA,EAAA,EAAA,EAAAxC,EAAkC,KAAA,CAA9B,MAAM,aAAA,EAAc,QAAK,EAAA,GACjBwB,EAAA,OAAZtB,EAAA,EAAAH,EAEO,OAFPgE,GAEO,CADFtB,EAAAhC,EAAAe,EAAA,KAAY,EAAG,sBAAmB,CAAA,EAAAgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAxC,EAAwB,YAAlB,cAAW,EAAA,iBAAO,4BAC/D,EAAA,EAAA,eAEFsC,EAAuC0B,GAAA,CAA5B,MAAOnD,EAAA,MAAI,QAAQ,KAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as k,c as l,a as t,i as y,v as g,e as n,u as o,y as r,t as i,x as w,F as m,s as x,f as p,g as C,r as f,C as V,o as a,D as L,w as b,j as N}from"./index-D8OAewba.js";import{a as $,t as A}from"./useFormat-CKJxQp_i.js";import{_ as R}from"./StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js";import{_ as B}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js";import{_ as F}from"./RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js";import{_ as S}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./Teleport-0BmaJsBF.js";const U={class:"panel"},j={class:"phead"},q={class:"field",style:{flex:"1","min-width":"180px"}},z={class:"field"},D={key:0,class:"s-failed"},E={key:2,class:"cards"},T={class:"stagger"},I={"data-label":"state"},J={"data-label":"action"},M={class:"name","data-label":"stack"},H={class:"dim nowrap","data-label":"started"},O={class:"dim nowrap","data-label":"took"},G={class:"dim","data-label":"steps"},K={key:0},P={colspan:"6",class:"mute"},at=k({__name:"JobsView",setup(Q){const c=f(""),d=f("all"),_=V(()=>{const u=c.value.trim().toLowerCase();return r.jobs.filter(e=>d.value!=="all"&&e.state!==d.value?!1:u?e.stack.toLowerCase().includes(u)||e.action.includes(u):!0)});return(u,e)=>{const h=N("RouterLink");return a(),l("div",null,[e[6]||(e[6]=t("div",{class:"page-head"},[t("div",null,[t("h1",null,"Jobs"),t("div",{class:"sub"},"Most recent first, capped at the last 50.")])],-1)),t("section",U,[t("div",j,[t("div",q,[e[2]||(e[2]=t("label",{for:"jq",class:"mute",style:{"font-size":"var(--t-xs)"}},"Search — press /",-1)),y(t("input",{id:"jq","onUpdate:modelValue":e[0]||(e[0]=s=>c.value=s),"data-search":"",type:"search",placeholder:"stack or action",spellcheck:"false"},null,512),[[g,c.value]])]),t("div",z,[e[3]||(e[3]=t("label",{for:"js",class:"mute",style:{"font-size":"var(--t-xs)"}},"State",-1)),n(S,{modelValue:d.value,"onUpdate:modelValue":e[1]||(e[1]=s=>d.value=s),id:"js",label:"Filter jobs",options:[{value:"all",label:"All"},{value:"running",label:"Running"},{value:"ok",label:"Ok"},{value:"leaked",label:"Leaked"},{value:"failed",label:"Failed"}]},null,8,["modelValue"])])]),e[5]||(e[5]=t("p",{class:"hint",style:{margin:"0 0 var(--s3)"}}," Held in memory. A server restart clears the history — a job record is the transcript of an attempt, not the truth about what exists. That truth lives in docker and in each axis's own probe. ",-1)),o(r).jobsError?(a(),l("p",D,i(o(r).jobsError),1)):o(r).jobsLoaded?(a(),l("table",E,[e[4]||(e[4]=t("thead",null,[t("tr",null,[t("th",null,"state"),t("th",null,"action"),t("th",null,"stack"),t("th",null,"started"),t("th",null,"took"),t("th",null,"steps")])],-1)),t("tbody",T,[(a(!0),l(m,null,x(_.value,(s,v)=>(a(),l("tr",{key:s.id,style:L({"--i":v})},[t("td",I,[n(h,{to:`/jobs/${encodeURIComponent(s.id)}`},{default:b(()=>[n(R,{state:s.state},null,8,["state"])]),_:2},1032,["to"])]),t("td",J,i(o($)(s.action)),1),t("td",M,[n(h,{to:`/jobs/${encodeURIComponent(s.id)}`},{default:b(()=>[p(i(s.stack),1)]),_:2},1032,["to"])]),t("td",H,[n(F,{at:s.startedAt},null,8,["at"])]),t("td",O,i(o(A)(s.startedAt,s.endedAt)),1),t("td",G,i(s.outcome?s.outcome.steps.length:"—"),1)],4))),128)),_.value.length?C("",!0):(a(),l("tr",K,[t("td",P,[o(r).jobs.length?(a(),l(m,{key:0},[p("Nothing matches this filter.")],64)):(a(),l(m,{key:1},[p("No jobs recorded.")],64))])]))])])):(a(),w(B,{key:1,rows:5}))])])}}});export{at as default};
|
|
2
|
+
//# sourceMappingURL=JobsView-Boi9Cmdc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobsView-Boi9Cmdc.js","sources":["../../src/views/JobsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** Job history. Polled by the shell already, so this view only filters what is in memory. */\nimport { computed, ref } from 'vue';\nimport { state } from '../composables/useControlPlane';\nimport { actionLabel, took } from '../composables/useFormat';\nimport StateBadge from '../components/StateBadge.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\nimport type { JobState } from '../api/types';\n\nconst q = ref('');\nconst only = ref<'all' | JobState>('all');\n\nconst rows = computed(() => {\n const needle = q.value.trim().toLowerCase();\n return state.jobs.filter((j) => {\n if (only.value !== 'all' && j.state !== only.value) return false;\n if (!needle) return true;\n return j.stack.toLowerCase().includes(needle) || j.action.includes(needle);\n });\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Jobs</h1>\n <div class=\"sub\">Most recent first, capped at the last 50.</div>\n </div>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <div class=\"field\" style=\"flex: 1; min-width: 180px\">\n <label for=\"jq\" class=\"mute\" style=\"font-size: var(--t-xs)\">Search — press /</label>\n <input id=\"jq\" v-model=\"q\" data-search type=\"search\" placeholder=\"stack or action\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"js\" class=\"mute\" style=\"font-size: var(--t-xs)\">State</label>\n <SelectMenu v-model=\"only\" id=\"js\" label=\"Filter jobs\" :options=\"[{ value: 'all', label: 'All' }, { value: 'running', label: 'Running' }, { value: 'ok', label: 'Ok' }, { value: 'leaked', label: 'Leaked' }, { value: 'failed', label: 'Failed' }]\" />\n </div>\n </div>\n\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Held in memory. A server restart clears the history — a job record is the transcript of an\n attempt, not the truth about what exists. That truth lives in docker and in each axis's own\n probe.\n </p>\n\n <p v-if=\"state.jobsError\" class=\"s-failed\">{{ state.jobsError }}</p>\n <SkeletonList v-else-if=\"!state.jobsLoaded\" :rows=\"5\" />\n\n <table v-else class=\"cards\">\n <thead>\n <tr>\n <th>state</th>\n <th>action</th>\n <th>stack</th>\n <th>started</th>\n <th>took</th>\n <th>steps</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(j, i) in rows\" :key=\"j.id\" :style=\"{ '--i': i }\">\n <td data-label=\"state\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(j.id)}`\">\n <StateBadge :state=\"j.state\" />\n </RouterLink>\n </td>\n <td data-label=\"action\">{{ actionLabel(j.action) }}</td>\n <td class=\"name\" data-label=\"stack\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(j.id)}`\">{{ j.stack }}</RouterLink>\n </td>\n <td class=\"dim nowrap\" data-label=\"started\"><RelativeTime :at=\"j.startedAt\" /></td>\n <td class=\"dim nowrap\" data-label=\"took\">{{ took(j.startedAt, j.endedAt) }}</td>\n <td class=\"dim\" data-label=\"steps\">{{ j.outcome ? j.outcome.steps.length : '—' }}</td>\n </tr>\n <tr v-if=\"!rows.length\">\n <td colspan=\"6\" class=\"mute\">\n <template v-if=\"state.jobs.length\">Nothing matches this filter.</template>\n <template v-else>No jobs recorded.</template>\n </td>\n </tr>\n </tbody>\n </table>\n </section>\n </div>\n</template>\n"],"names":["q","ref","only","rows","computed","needle","state","j","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_hoisted_3","$event","_hoisted_4","_createVNode","SelectMenu","_unref","_openBlock","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_Fragment","_renderList","i","_hoisted_8","_component_RouterLink","StateBadge","_hoisted_9","_hoisted_10","_createTextVNode","_hoisted_11","RelativeTime","_hoisted_12","took","_hoisted_13","_hoisted_14","_hoisted_15","_createBlock","SkeletonList"],"mappings":"giCAWA,MAAMA,EAAIC,EAAI,EAAE,EACVC,EAAOD,EAAsB,KAAK,EAElCE,EAAOC,EAAS,IAAM,CAC1B,MAAMC,EAASL,EAAE,MAAM,KAAA,EAAO,YAAA,EAC9B,OAAOM,EAAM,KAAK,OAAQC,GACpBL,EAAK,QAAU,OAASK,EAAE,QAAUL,EAAK,MAAc,GACtDG,EACEE,EAAE,MAAM,YAAA,EAAc,SAASF,CAAM,GAAKE,EAAE,OAAO,SAASF,CAAM,EADrD,EAErB,CACH,CAAC,mDAICG,EAgEM,MAAA,KAAA,aA/DJC,EAKM,MAAA,CALD,MAAM,aAAW,CACpBA,EAGM,MAAA,KAAA,CAFJA,EAAa,UAAT,MAAI,EACRA,EAAgE,MAAA,CAA3D,MAAM,KAAA,EAAM,2CAAyC,CAAA,SAI9DA,EAuDU,UAvDVC,EAuDU,CAtDRD,EASM,MATNE,EASM,CARJF,EAGM,MAHNG,EAGM,aAFJH,EAAoF,QAAA,CAA7E,IAAI,KAAK,MAAM,OAAO,MAAA,CAAA,YAAA,aAAA,CAAA,EAA+B,mBAAgB,EAAA,KAC5EA,EAAwG,QAAA,CAAjG,GAAG,0CAAcT,EAAC,MAAAa,GAAE,cAAA,GAAY,KAAK,SAAS,YAAY,kBAAkB,WAAW,OAAA,gBAAtEb,EAAA,KAAC,CAAA,KAE3BS,EAGM,MAHNK,EAGM,aAFJL,EAAyE,QAAA,CAAlE,IAAI,KAAK,MAAM,OAAO,MAAA,CAAA,YAAA,aAAA,CAAA,EAA+B,QAAK,EAAA,GACjEM,EAAuPC,EAAA,YAAlOd,EAAA,2CAAAA,EAAI,MAAAW,GAAE,GAAG,KAAK,MAAM,cAAe,QAAS,CAAA,CAAA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K,EAAA,CAAA,CAAA,uBAElEE,EAAmF,KAAnFuB,EAAmF,CAAvCjB,EAAkCkB,EAAA,CAAnB,GAAI1B,EAAE,SAAA,mBACjEE,EAAgF,KAAhFyB,EAAgFd,EAApCH,EAAAkB,CAAA,EAAK5B,EAAE,UAAWA,EAAE,OAAO,CAAA,EAAA,CAAA,EACvEE,EAAsF,KAAtF2B,EAAsFhB,EAAhDb,EAAE,QAAUA,EAAE,QAAQ,MAAM,OAAM,GAAA,EAAA,CAAA,CAAA,aAE/DJ,EAAA,MAAK,qBAAhBK,EAKK,KAAA6B,EAAA,CAJH5B,EAGK,KAHL6B,EAGK,CAFarB,EAAAX,CAAA,EAAM,KAAK,YAA3BE,EAA0Ee,EAAA,CAAA,IAAA,CAAA,EAAA,GAAvC,8BAA4B,CAAA,YAC/Df,EAA6Ce,EAAA,CAAA,IAAA,GAAA,GAA5B,mBAAiB,CAAA,sBA/B1CgB,EAAwDC,EAAA,OAAX,KAAM,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as x,c as v,a as t,u as S,b as V,F as C,e as n,f as s,w as l,_ as g,g as h,h as q,i as w,v as y,t as b,r as u,j as N,k as T,l as U,o as f,m as L,n as R}from"./index-
|
|
2
|
-
//# sourceMappingURL=LoginView-
|
|
1
|
+
import{d as x,c as v,a as t,u as S,b as V,F as C,e as n,f as s,w as l,_ as g,g as h,h as q,i as w,v as y,t as b,r as u,j as N,k as T,l as U,o as f,m as L,n as R}from"./index-D8OAewba.js";import{_ as B}from"./ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js";import{E}from"./EquivalentCommand-w1nGowVi.js";import{_ as A}from"./_plugin-vue_export-helper-DlAUqK2U.js";const D={class:"login-wrap"},F={class:"login-card panel"},I={class:"banner plain",style:{"margin-top":"var(--s3)"}},M={class:"mute",style:{"margin-top":"var(--s3)"}},P={class:"field",style:{"margin-top":"var(--s4)"}},$={class:"field"},j={key:0,class:"banner failed",style:{"margin-top":"var(--s3)"}},z={class:"row",style:{"margin-top":"var(--s4)"}},O=x({__name:"LoginView",setup(W){const k=T(),d=U(),r=u(""),o=u(""),a=u(!1),i=u("");async function c(){a.value=!0,i.value="";const p=await L(r.value.trim(),o.value);if(a.value=!1,p){i.value=p,o.value="";return}await R();const e=typeof d.query.next=="string"&&d.query.next.startsWith("/")?d.query.next:"/";k.replace(e)}return(p,e)=>{const _=N("RouterLink");return f(),v("div",D,[t("div",F,[e[12]||(e[12]=t("h1",{style:{"font-size":"var(--t-xl)","margin-bottom":"var(--s2)"}},"Sign in",-1)),S(V).hasUsers===!1?(f(),v(C,{key:0},[e[6]||(e[6]=t("p",{class:"dim"}," No accounts exist on this server yet — create the first one, then sign in. ",-1)),t("div",I,[e[4]||(e[4]=t("b",null,"Create the first account",-1)),e[5]||(e[5]=t("p",null," This has to be done with the host token, from a terminal — a browser has no way to prove it is allowed to claim a fresh server. ",-1)),n(E,{what:"creating the first account",method:"POST",path:"/api/auth/bootstrap",body:{username:"you",password:"…"}}),t("p",M,[e[3]||(e[3]=s(" It can also be set up ahead of time when the host is first provisioned. ",-1)),n(g,{label:"how"},{default:l(()=>[...e[2]||(e[2]=[s(" Set the admin username and password in the environment before running the setup command on the host. They are honoured only while no account exists, so they cannot overwrite one later. ",-1)])]),_:1})])])],64)):h("",!0),t("form",{onSubmit:q(c,["prevent"])},[t("div",P,[e[7]||(e[7]=t("label",{for:"u"},"Username",-1)),w(t("input",{id:"u","onUpdate:modelValue":e[0]||(e[0]=m=>r.value=m),type:"text",autocomplete:"username",spellcheck:"false"},null,512),[[y,r.value]])]),t("div",$,[e[8]||(e[8]=t("label",{for:"p"},"Password",-1)),w(t("input",{id:"p","onUpdate:modelValue":e[1]||(e[1]=m=>o.value=m),type:"password",autocomplete:"current-password"},null,512),[[y,o.value]])]),i.value?(f(),v("div",j,[t("p",null,b(i.value),1)])):h("",!0),t("div",z,[n(B,{variant:"primary",pending:a.value,disabled:a.value||!r.value.trim()||!o.value,onClick:c},{default:l(()=>[s(b(a.value?"Signing in…":"Sign in"),1)]),_:1},8,["pending","disabled"]),e[11]||(e[11]=t("span",{class:"grow"},null,-1)),n(_,{to:"/settings",class:"mute"},{default:l(()=>[e[10]||(e[10]=s(" Use a token instead ",-1)),n(g,{label:"token access",align:"end"},{default:l(()=>[...e[9]||(e[9]=[s(" A bearer token in Settings — the machine token from ",-1),t("code",null,"pstack init",-1),s(", or a personal token from your account — authenticates every request without a session. ",-1)])]),_:1})]),_:1})])],32)])])}}}),Q=A(O,[["__scopeId","data-v-93108325"]]);export{Q as default};
|
|
2
|
+
//# sourceMappingURL=LoginView-1ZpxP8a9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginView-
|
|
1
|
+
{"version":3,"file":"LoginView-1ZpxP8a9.js","sources":["../../src/views/LoginView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Sign in — the one page reachable without a session.\n *\n * Two states it must distinguish, because they need opposite instructions:\n * - accounts exist → the form\n * - no accounts yet → bootstrap guidance. A dead login form with no way to create the\n * account it asks for is the worst version of this page.\n *\n * A bearer token in Settings also authenticates (CI-style access); the link stays visible for\n * operators who have the machine token and no account yet.\n */\nimport { ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\nimport { authState, checkAuth, login } from '../composables/useAuth';\nimport ActionButton from '../components/ActionButton.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport EquivalentCommand from '../components/EquivalentCommand.vue';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst username = ref('');\nconst password = ref('');\nconst pending = ref(false);\nconst error = ref('');\n\nasync function submit(): Promise<void> {\n pending.value = true;\n error.value = '';\n const failure = await login(username.value.trim(), password.value);\n pending.value = false;\n if (failure) {\n error.value = failure;\n password.value = '';\n return;\n }\n await checkAuth();\n // Back to wherever the guard bounced them from, or home.\n const dest = typeof route.query.next === 'string' && route.query.next.startsWith('/')\n ? route.query.next\n : '/';\n void router.replace(dest);\n}\n</script>\n\n<template>\n <div class=\"login-wrap\">\n <div class=\"login-card panel\">\n <h1 style=\"font-size: var(--t-xl); margin-bottom: var(--s2)\">Sign in</h1>\n\n <template v-if=\"authState.hasUsers === false\">\n <p class=\"dim\">\n No accounts exist on this server yet — create the first one, then sign in.\n </p>\n <!--\n A curl block used to sit here permanently, on the FIRST screen anyone sees. It is needed\n exactly once per host and by one person; behind the button it costs a click then and\n nothing on every later visit — and it is generated, so it cannot drift from the route.\n -->\n <div class=\"banner plain\" style=\"margin-top: var(--s3)\">\n <b>Create the first account</b>\n <p>\n This has to be done with the host token, from a terminal — a browser has no way to prove\n it is allowed to claim a fresh server.\n </p>\n <EquivalentCommand\n what=\"creating the first account\"\n method=\"POST\"\n path=\"/api/auth/bootstrap\"\n :body=\"{ username: 'you', password: '…' }\"\n />\n <p class=\"mute\" style=\"margin-top: var(--s3)\">\n It can also be set up ahead of time when the host is first provisioned.\n <InfoHint label=\"how\">\n Set the admin username and password in the environment before running the setup\n command on the host. They are honoured only while no account exists, so they cannot\n overwrite one later.\n </InfoHint>\n </p>\n </div>\n </template>\n\n <form @submit.prevent=\"submit\">\n <div class=\"field\" style=\"margin-top: var(--s4)\">\n <label for=\"u\">Username</label>\n <input id=\"u\" v-model=\"username\" type=\"text\" autocomplete=\"username\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"p\">Password</label>\n <input id=\"p\" v-model=\"password\" type=\"password\" autocomplete=\"current-password\" />\n </div>\n\n <div v-if=\"error\" class=\"banner failed\" style=\"margin-top: var(--s3)\">\n <p>{{ error }}</p>\n </div>\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton\n variant=\"primary\"\n :pending=\"pending\"\n :disabled=\"pending || !username.trim() || !password\"\n @click=\"submit\"\n >\n {{ pending ? 'Signing in…' : 'Sign in' }}\n </ActionButton>\n <span class=\"grow\" />\n <RouterLink to=\"/settings\" class=\"mute\">\n Use a token instead\n <InfoHint label=\"token access\" align=\"end\">\n A bearer token in Settings — the machine token from <code>pstack init</code>, or a\n personal token from your account — authenticates every request without a session.\n </InfoHint>\n </RouterLink>\n </div>\n </form>\n </div>\n </div>\n</template>\n\n<style scoped>\n/* The shell centres this now — see `.shell.no-rail .view`. A second centring context here would\n * fight it, and `min-height: 70vh` was what pinned the card toward the top of the window. */\n/* `100%`, not `92vw`: the shell already insets this by its own padding, so a viewport-relative\n * width added on top overflowed the right edge on a phone (measured 32px/0px at 390). */\n.login-wrap {\n width: min(420px, 100%);\n}\n.login-card {\n width: 100%;\n}\n</style>\n"],"names":["router","useRouter","route","useRoute","username","ref","password","pending","error","submit","failure","login","checkAuth","dest","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_unref","authState","_Fragment","_hoisted_3","_createVNode","EquivalentCommand","_hoisted_4","InfoHint","_hoisted_5","$event","_hoisted_6","_hoisted_7","_hoisted_8","ActionButton","_component_RouterLink"],"mappings":"uvBAmBA,MAAMA,EAASC,EAAA,EACTC,EAAQC,EAAA,EAERC,EAAWC,EAAI,EAAE,EACjBC,EAAWD,EAAI,EAAE,EACjBE,EAAUF,EAAI,EAAK,EACnBG,EAAQH,EAAI,EAAE,EAEpB,eAAeI,GAAwB,CACrCF,EAAQ,MAAQ,GAChBC,EAAM,MAAQ,GACd,MAAME,EAAU,MAAMC,EAAMP,EAAS,MAAM,KAAA,EAAQE,EAAS,KAAK,EAEjE,GADAC,EAAQ,MAAQ,GACZG,EAAS,CACXF,EAAM,MAAQE,EACdJ,EAAS,MAAQ,GACjB,MACF,CACA,MAAMM,EAAA,EAEN,MAAMC,EAAO,OAAOX,EAAM,MAAM,MAAS,UAAYA,EAAM,MAAM,KAAK,WAAW,GAAG,EAChFA,EAAM,MAAM,KACZ,IACCF,EAAO,QAAQa,CAAI,CAC1B,uCAIE,OAAAC,EAAA,EAAAC,EAsEM,MAtENC,EAsEM,CArEJC,EAoEM,MApENC,EAoEM,CAnEJC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAAy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a,kBAAA,gBAAvCvB,EAAA,KAAQ,CAAA,KAGtBE,EAAA,OAAXM,EAAA,EAAAC,EAEM,MAFNgB,EAEM,CADJd,EAAkB,WAAZT,EAAA,KAAK,EAAA,CAAA,CAAA,aAGbS,EAiBM,MAjBNe,EAiBM,CAhBJR,EAOeS,EAAA,CANb,QAAQ,UACP,QAAS1B,EAAA,MACT,SAAUA,EAAA,OAAO,CAAKH,QAAS,KAAA,IAAWE,EAAA,MAC1C,QAAOG,CAAA,aAER,IAAyC,KAAtCF,EAAA,MAAO,cAAA,SAAA,EAAA,CAAA,CAAA,gDAEZU,EAAqB,OAAA,CAAf,MAAM,MAAA,EAAM,KAAA,EAAA,GAClBO,EAMaU,EAAA,CAND,GAAG,YAAY,MAAM,MAAA,aAAO,IAEtC,iBAFsC,wBAEtC,EAAA,GAAAV,EAGWG,EAAA,CAHD,MAAM,eAAe,MAAM,KAAA,aAAM,IACW,CAAA,GAAAR,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GADX,wDACW,EAAA,EAAAF,EAAwB,YAAlB,cAAW,EAAA,IAAO,4FAE9E,EAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.login-wrap[data-v-93108325]{width:min(420px,100%)}.login-card[data-v-93108325]{width:100%}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{d as F,H as L,c as a,a as l,e as g,g as d,u as w,f as u,t as m,F as T,i as z,v as A,w as B,_ as R,r as v,C as k,A as x,J as _,B as I,o}from"./index-D8OAewba.js";import{d as r}from"./useDeployment-DplTFu7s.js";import{_ as C}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./useVars-VN9gYdR6.js";import"./Teleport-0BmaJsBF.js";const M={class:"panel"},j={class:"phead"},D={key:0,class:"field"},E={class:"field"},H=["disabled"],O={key:0,class:"progress","aria-hidden":"true"},q={key:0,class:"mute"},J={key:1,class:"mute"},P={key:0,class:"banner failed"},G={key:1,class:"banner warn"},K={key:2,class:"field",style:{"margin-top":"var(--s3)"}},Q={key:3,class:"hint",style:{"margin-top":"var(--s3)"}},W={key:4,class:"log"},X={key:5,class:"mute",style:{"margin-top":"var(--s3)"}},Y={key:6,class:"hint"},oe=F({__name:"LogsTab",setup(Z){const y=v(200),p=v(""),f=v([]);async function V(){const s=await x.get(`/api/deployments/${encodeURIComponent(r.id)}/runtime${_(r.vars)}`);s.ok&&(f.value=[...new Set(s.body.containers.map(e=>e.service).filter(e=>!!e))].sort())}const $=k(()=>[{value:"",label:"All services"},...f.value.map(s=>({value:s,label:s}))]),h=v(""),n=v(null),b=v(""),c=v(!1);L(()=>{var s;return[r.id,!!((s=r.detail)!=null&&s.compose)]},([s,e],t)=>{(!t||t[0]!==s)&&(f.value=[],p.value="",n.value=null),e&&f.value.length===0&&V()},{immediate:!0});async function N(){var i;if(!((i=r.detail)!=null&&i.compose))return;const s=r.id;c.value=!0,b.value="";const e=p.value,t=await x.get(`/api/deployments/${encodeURIComponent(s)}/logs${_(r.vars,{tail:y.value,...e?{service:e}:{}})}`);if(c.value=!1,r.id===s&&!(t.ok&&(t.body.service??"")!==e)){if(!t.ok){n.value=null,b.value=I(t,"load the logs");return}n.value={...t.body,ok:t.body.ok!==!1,text:t.body.text??""}}}const S=k(()=>{var i;const s=((i=n.value)==null?void 0:i.text)??"",e=h.value.trim().toLowerCase();if(!e)return s;const t=s.split(`
|
|
2
|
+
`).filter(U=>U.toLowerCase().includes(e));return t.length?t.join(`
|
|
3
|
+
`):`(no line matches "${h.value}")`});return(s,e)=>{var t;return o(),a("section",M,[l("div",j,[e[5]||(e[5]=l("h2",{class:"section"},"Compose logs",-1)),e[6]||(e[6]=l("span",{class:"grow"},null,-1)),f.value.length>1?(o(),a("div",D,[e[3]||(e[3]=l("label",{for:"svc",class:"mute",style:{"font-size":"var(--t-xs)"}},"service",-1)),g(C,{modelValue:p.value,"onUpdate:modelValue":e[0]||(e[0]=i=>p.value=i),id:"svc",label:"Service",options:$.value},null,8,["modelValue","options"])])):d("",!0),l("div",E,[e[4]||(e[4]=l("label",{for:"tail",class:"mute",style:{"font-size":"var(--t-xs)"}},"tail",-1)),g(C,{"model-value":String(y.value),label:"How many lines",options:[{value:"50",label:"50"},{value:"200",label:"200"},{value:"500",label:"500"},{value:"1000",label:"1000"},{value:"2000",label:"2000"}],"onUpdate:modelValue":e[1]||(e[1]=i=>y.value=Number(i))},null,8,["model-value"])]),l("button",{class:"primary",style:{"align-self":"end"},disabled:c.value||!((t=w(r).detail)!=null&&t.compose),onClick:N},[u(m(c.value?"reading…":"Fetch")+" ",1),c.value?(o(),a("span",O)):d("",!0)],8,H)]),w(r).detail?w(r).detail.compose?(o(),a(T,{key:2},[e[16]||(e[16]=l("p",{class:"hint",style:{margin:"0 0 var(--s3)"}}," Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the host. The server caps how many lines it will return. ",-1)),b.value?(o(),a("div",P,m(b.value),1)):n.value&&!n.value.ok?(o(),a("div",G,[...e[8]||(e[8]=[l("b",null,"compose exited non-zero.",-1),l("p",null," Most often the project does not exist yet (nothing has been brought up), or a profile is missing. Any output it did produce is below. ",-1)])])):d("",!0),n.value?(o(),a("div",K,[e[9]||(e[9]=l("label",{for:"lf",class:"mute",style:{"font-size":"var(--t-xs)"}},"Search in these lines",-1)),z(l("input",{id:"lf","onUpdate:modelValue":e[2]||(e[2]=i=>h.value=i),"data-search":"",type:"search",placeholder:"substring",spellcheck:"false"},null,512),[[A,h.value]])])):d("",!0),n.value&&n.value.service?(o(),a("div",Q,[e[11]||(e[11]=u(" Showing ",-1)),l("b",null,m(n.value.service),1),e[12]||(e[12]=u(" only. ",-1)),g(R,{label:"why narrowing helps"},{default:B(()=>[...e[10]||(e[10]=[u(" On a stack with a chatty sidecar the interleaved output is unreadable, and the lines you want are often already past the tail. Narrowing spends the whole tail on one service. ",-1)])]),_:1})])):d("",!0),n.value?(o(),a("pre",W,m(S.value||"(no output)"),1)):c.value?d("",!0):(o(),a("p",X,[e[13]||(e[13]=u(" Press ",-1)),e[14]||(e[14]=l("b",null,"Fetch",-1)),u(" to read the last "+m(y.value)+" lines"+m(p.value?` of ${p.value}`:"")+". ",1)])),n.value?(o(),a("p",Y,[...e[15]||(e[15]=[u(" Redacted on the host before sending: credentials inside URLs, ",-1),l("code",null,"NAME=value",-1),u(" pairs whose name reads as a secret, and this server's own token. ",-1)])])):d("",!0)],64)):(o(),a("p",J,[...e[7]||(e[7]=[u(" This spec has no ",-1),l("code",null,"compose:",-1),u(" section, so there are no compose logs to read. Its axes may still have created resources — check those at their own source. ",-1)])])):(o(),a("p",q,"Unavailable until the spec resolves."))])}}});export{oe as default};
|
|
4
|
+
//# sourceMappingURL=LogsTab-Bgev0F7g.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsTab-Bgev0F7g.js","sources":["../../src/views/tabs/LogsTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Compose logs, fetched ON DEMAND.\n *\n * Never polled: an auto-refresh against a chatty stack would hammer the host through\n * `docker compose logs` — the same host that is running everyone else's previews. The tail is\n * clamped to 1–2000 by the server for the same reason.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem, query } from '../../api/client';\nimport type { LogsResponse, RuntimeResponse } from '../../api/types';\nimport { dep } from '../../composables/useDeployment';\nimport InfoHint from '../../components/InfoHint.vue';\nimport SelectMenu from '../../components/SelectMenu.vue';\n\nconst tail = ref(200);\n/** '' means the whole stack. */\nconst service = ref('');\n/**\n * The services to choose from, taken from what is actually RUNNING rather than from the compose file.\n * A service the spec declares but never started has no logs, and offering it would produce an\n * empty pane that reads like a bug.\n */\nconst services = ref<string[]>([]);\n\nasync function loadServices(): Promise<void> {\n const r = await api.get<RuntimeResponse>(\n `/api/deployments/${encodeURIComponent(dep.id)}/runtime${query(dep.vars)}`,\n );\n if (!r.ok) return; // the picker is a convenience; without it the whole-stack read still works\n services.value = [\n ...new Set(r.body.containers.map((c) => c.service).filter((s): s is string => !!s)),\n ].sort();\n}\n\n/** Empty value = the whole stack, which is a real choice here rather than a placeholder. */\nconst serviceOptions = computed(() => [\n { value: '', label: 'All services' },\n ...services.value.map((s) => ({ value: s, label: s })),\n]);\n\nconst filter = ref('');\nconst logs = ref<LogsResponse | null>(null);\nconst error = ref('');\nconst loading = ref(false);\n\nwatch(\n () => [dep.id, !!dep.detail?.compose] as const,\n ([id, hasCompose], prev) => {\n if (!prev || prev[0] !== id) {\n services.value = [];\n service.value = '';\n logs.value = null;\n }\n // Gated on the RESOLVED spec, not just the id: this component mounts before the parent has\n // resolved the deployment, so an id-only watcher saw `dep.detail === undefined` and the service\n // picker never appeared.\n if (hasCompose && services.value.length === 0) void loadServices();\n },\n { immediate: true },\n);\n\nasync function fetchLogs(): Promise<void> {\n if (!dep.detail?.compose) return;\n const id = dep.id;\n loading.value = true;\n error.value = '';\n const chosen = service.value;\n const r = await api.get<LogsResponse>(\n `/api/deployments/${encodeURIComponent(id)}/logs${query(dep.vars, {\n tail: tail.value,\n ...(chosen ? { service: chosen } : {}),\n })}`,\n );\n loading.value = false;\n if (dep.id !== id) return; // navigated away mid-flight\n // A slow response for the previously-selected service must not land in a pane now labelled with a\n // different one.\n if (r.ok && (r.body.service ?? '') !== chosen) return;\n if (!r.ok) {\n logs.value = null;\n error.value = problem(r, 'load the logs');\n return;\n }\n logs.value = { ...r.body, ok: r.body.ok !== false, text: r.body.text ?? '' };\n}\n\n/** Search-in-logs: filter to matching lines rather than highlighting inside a wall of text. */\nconst shown = computed(() => {\n const text = logs.value?.text ?? '';\n const needle = filter.value.trim().toLowerCase();\n if (!needle) return text;\n const lines = text.split('\\n').filter((l) => l.toLowerCase().includes(needle));\n return lines.length ? lines.join('\\n') : `(no line matches \"${filter.value}\")`;\n});\n</script>\n\n<template>\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Compose logs</h2>\n <span class=\"grow\" />\n <div v-if=\"services.length > 1\" class=\"field\">\n <label for=\"svc\" class=\"mute\" style=\"font-size: var(--t-xs)\">service</label>\n <SelectMenu v-model=\"service\" id=\"svc\" label=\"Service\" :options=\"serviceOptions\" />\n </div>\n <div class=\"field\">\n <label for=\"tail\" class=\"mute\" style=\"font-size: var(--t-xs)\">tail</label>\n <SelectMenu :model-value=\"String(tail)\" label=\"How many lines\" :options=\"[{ value: '50', label: '50' }, { value: '200', label: '200' }, { value: '500', label: '500' }, { value: '1000', label: '1000' }, { value: '2000', label: '2000' }]\" @update:model-value=\"(v) => (tail = Number(v))\" />\n </div>\n <button\n class=\"primary\"\n style=\"align-self: end\"\n :disabled=\"loading || !dep.detail?.compose\"\n @click=\"fetchLogs\"\n >\n {{ loading ? 'reading…' : 'Fetch' }}\n <span v-if=\"loading\" class=\"progress\" aria-hidden=\"true\" />\n </button>\n </div>\n\n <p v-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n <!-- Guard on the field rather than calling and interpreting the failure after the fact. -->\n <p v-else-if=\"!dep.detail.compose\" class=\"mute\">\n This spec has no <code>compose:</code> section, so there are no compose logs to read. Its axes\n may still have created resources — check those at their own source.\n </p>\n\n <template v-else>\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Fetched on demand, never polled: an auto-refresh against a chatty stack would hammer the\n host. The server caps how many lines it will return.\n </p>\n\n <div v-if=\"error\" class=\"banner failed\">{{ error }}</div>\n\n <!--\n `ok: false` means compose exited non-zero. Usually \"no such project\" because the stack was\n never brought up — not a server fault, so it is a note rather than an error.\n -->\n <div v-else-if=\"logs && !logs.ok\" class=\"banner warn\">\n <b>compose exited non-zero.</b>\n <p>\n Most often the project does not exist yet (nothing has been brought up), or a profile is\n missing. Any output it did produce is below.\n </p>\n </div>\n\n <div v-if=\"logs\" class=\"field\" style=\"margin-top: var(--s3)\">\n <label for=\"lf\" class=\"mute\" style=\"font-size: var(--t-xs)\">Search in these lines</label>\n <input id=\"lf\" v-model=\"filter\" data-search type=\"search\" placeholder=\"substring\" spellcheck=\"false\" />\n </div>\n\n <div v-if=\"logs && logs.service\" class=\"hint\" style=\"margin-top: var(--s3)\">\n Showing <b>{{ logs.service }}</b> only.\n <InfoHint label=\"why narrowing helps\">\n On a stack with a chatty sidecar the interleaved output is unreadable, and the lines you want\n are often already past the tail. Narrowing spends the whole tail on one service.\n </InfoHint>\n </div>\n\n <pre v-if=\"logs\" class=\"log\">{{ shown || '(no output)' }}</pre>\n <p v-else-if=\"!loading\" class=\"mute\" style=\"margin-top: var(--s3)\">\n Press <b>Fetch</b> to read the last {{ tail }} lines{{ service ? ` of ${service}` : '' }}.\n </p>\n\n <p v-if=\"logs\" class=\"hint\">\n Redacted on the host before sending: credentials inside URLs, <code>NAME=value</code> pairs\n whose name reads as a secret, and this server's own token.\n </p>\n </template>\n </section>\n</template>\n"],"names":["tail","ref","service","services","loadServices","r","api","dep","query","c","s","serviceOptions","computed","filter","logs","error","loading","watch","_a","id","hasCompose","prev","fetchLogs","chosen","problem","shown","text","needle","lines","l","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_hoisted_3","_createVNode","SelectMenu","$event","_hoisted_4","v","_unref","_createTextVNode","_toDisplayString","_hoisted_6","_Fragment","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","InfoHint","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_8","_hoisted_7"],"mappings":"21BAeA,MAAMA,EAAOC,EAAI,GAAG,EAEdC,EAAUD,EAAI,EAAE,EAMhBE,EAAWF,EAAc,EAAE,EAEjC,eAAeG,GAA8B,CAC3C,MAAMC,EAAI,MAAMC,EAAI,IAClB,oBAAoB,mBAAmBC,EAAI,EAAE,CAAC,WAAWC,EAAMD,EAAI,IAAI,CAAC,EAAA,EAErEF,EAAE,KACPF,EAAS,MAAQ,CACf,GAAG,IAAI,IAAIE,EAAE,KAAK,WAAW,IAAKI,GAAMA,EAAE,OAAO,EAAE,OAAQC,GAAmB,CAAC,CAACA,CAAC,CAAC,CAAA,EAClF,KAAA,EACJ,CAGA,MAAMC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