@samyx/preview-stacks-ui 0.30.0 → 0.32.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-D8Xlp6c9.js +2 -0
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js.map → ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js.map} +1 -1
- package/dist/assets/{AxesTab-BJZ9B5js.js → AxesTab-BWzsbFAx.js} +2 -2
- package/dist/assets/{AxesTab-BJZ9B5js.js.map → AxesTab-BWzsbFAx.js.map} +1 -1
- package/dist/assets/ConfigTab-ucr87rD6.js +2 -0
- package/dist/assets/{ConfigTab-CKjpaZmg.js.map → ConfigTab-ucr87rD6.js.map} +1 -1
- package/dist/assets/ConfigView-BbRYGyvZ.js +2 -0
- package/dist/assets/ConfigView-BbRYGyvZ.js.map +1 -0
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js +2 -0
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js.map +1 -0
- package/dist/assets/DangerTab-BimKNJab.js +2 -0
- package/dist/assets/DangerTab-BimKNJab.js.map +1 -0
- package/dist/assets/DashboardView-DK0qDo-f.js +2 -0
- package/dist/assets/{DashboardView-DqIE-Aof.js.map → DashboardView-DK0qDo-f.js.map} +1 -1
- package/dist/assets/DeploymentDetailView-BcImKApM.js +2 -0
- package/dist/assets/{DeploymentDetailView-nFBQCzq0.js.map → DeploymentDetailView-BcImKApM.js.map} +1 -1
- package/dist/assets/DeploymentsView-Cx9BqQ8Q.js +2 -0
- package/dist/assets/DeploymentsView-Cx9BqQ8Q.js.map +1 -0
- package/dist/assets/DialogTrigger-nWkfUj3N.js +2 -0
- package/dist/assets/DialogTrigger-nWkfUj3N.js.map +1 -0
- package/dist/assets/{EquivalentCommand-BjlPIrt9.js → EquivalentCommand-D92xDU0_.js} +3 -3
- package/dist/assets/{EquivalentCommand-BjlPIrt9.js.map → EquivalentCommand-D92xDU0_.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js → ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js.map} +1 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js +2 -0
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js.map +1 -0
- package/dist/assets/JobDetailView-B1sXXVJ5.js +2 -0
- package/dist/assets/JobDetailView-B1sXXVJ5.js.map +1 -0
- package/dist/assets/JobsView-CC7lre3Q.css +1 -0
- package/dist/assets/JobsView-DjP5lXHk.js +2 -0
- package/dist/assets/JobsView-DjP5lXHk.js.map +1 -0
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js +3 -0
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-BNqCyGeQ.js.map → LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js.map} +1 -1
- package/dist/assets/LoginView-C90w1dZ2.css +1 -0
- package/dist/assets/LoginView-CIkI9Qm_.js +2 -0
- package/dist/assets/LoginView-CIkI9Qm_.js.map +1 -0
- package/dist/assets/LogsTab-D8zhR7Eb.js +6 -0
- package/dist/assets/{LogsTab-CKNkR_07.js.map → LogsTab-D8zhR7Eb.js.map} +1 -1
- package/dist/assets/{NotFoundView-B3377DMC.js → NotFoundView-aUtqh2Qi.js} +2 -2
- package/dist/assets/{NotFoundView-B3377DMC.js.map → NotFoundView-aUtqh2Qi.js.map} +1 -1
- package/dist/assets/NotifiersView-aRHInxVx.js +2 -0
- package/dist/assets/{NotifiersView-BrPpuf5o.js.map → NotifiersView-aRHInxVx.js.map} +1 -1
- package/dist/assets/OverviewTab-ChCj5LAj.js +2 -0
- package/dist/assets/{OverviewTab-DY-d5Ia3.js.map → OverviewTab-ChCj5LAj.js.map} +1 -1
- package/dist/assets/PublicLogsView-DIWJH7qL.js +4 -0
- package/dist/assets/{PublicLogsView-HBPDlV47.js.map → PublicLogsView-DIWJH7qL.js.map} +1 -1
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js → RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js} +2 -2
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js.map → RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js.map} +1 -1
- package/dist/assets/RegistriesView-D2aCsYIu.js +2 -0
- package/dist/assets/{RegistriesView-B0XRfL2L.js.map → RegistriesView-D2aCsYIu.js.map} +1 -1
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js +2 -0
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js.map +1 -0
- package/dist/assets/{RequiresTab-CwaFcz5T.js → RequiresTab-3BhU5BHd.js} +2 -2
- package/dist/assets/{RequiresTab-CwaFcz5T.js.map → RequiresTab-3BhU5BHd.js.map} +1 -1
- package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js +2 -0
- package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js.map +1 -0
- package/dist/assets/RoutingView-T9afX8_M.js +9 -0
- package/dist/assets/RoutingView-T9afX8_M.js.map +1 -0
- package/dist/assets/RoutingView-tn0RQdqM.css +0 -0
- package/dist/assets/RuntimeTab-Bh2gGuhj.js +2 -0
- package/dist/assets/RuntimeTab-Bh2gGuhj.js.map +1 -0
- package/dist/assets/RuntimeTab-By55qdsQ.css +1 -0
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js +2 -0
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js.map} +1 -1
- package/dist/assets/{SettingsView-cuiExi3-.js → SettingsView-DIKjdBdy.js} +2 -2
- package/dist/assets/{SettingsView-cuiExi3-.js.map → SettingsView-DIKjdBdy.js.map} +1 -1
- package/dist/assets/SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js +2 -0
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js.map} +1 -1
- package/dist/assets/SpecDetailView-Bd4Hx-bI.js +2 -0
- package/dist/assets/{SpecDetailView-Da_PDlft.js.map → SpecDetailView-Bd4Hx-bI.js.map} +1 -1
- package/dist/assets/SpecsView-B9qQPzkG.js +2 -0
- package/dist/assets/{SpecsView-CQHYfu01.js.map → SpecsView-B9qQPzkG.js.map} +1 -1
- package/dist/assets/SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js +2 -0
- package/dist/assets/SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js.map +1 -0
- package/dist/assets/SsoView-CltdTdwt.js +2 -0
- package/dist/assets/SsoView-CltdTdwt.js.map +1 -0
- package/dist/assets/SsoView-JmlPQGWM.css +1 -0
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js +2 -0
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js.map +1 -0
- package/dist/assets/{SubmitView-DsR4Rud8.js → SubmitView-D-jg5Wxy.js} +5 -5
- package/dist/assets/{SubmitView-DsR4Rud8.js.map → SubmitView-D-jg5Wxy.js.map} +1 -1
- package/dist/assets/SwarmView-CqFndUrV.js +2 -0
- package/dist/assets/{SwarmView-B-ESSXnj.js.map → SwarmView-CqFndUrV.js.map} +1 -1
- package/dist/assets/Teleport-I0XiM19H.js +4 -0
- package/dist/assets/{Teleport-DTF2H_ia.js.map → Teleport-I0XiM19H.js.map} +1 -1
- package/dist/assets/TerminalTab-Dleba0ru.js +3 -0
- package/dist/assets/{TerminalTab-BboWRxwq.js.map → TerminalTab-Dleba0ru.js.map} +1 -1
- package/dist/assets/UsersView-Bd8B9pLD.css +1 -0
- package/dist/assets/UsersView-BrZbuuOg.js +2 -0
- package/dist/assets/UsersView-BrZbuuOg.js.map +1 -0
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js +2 -0
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js.map +1 -0
- package/dist/assets/VarIO-BVE8A4Ur.css +1 -0
- package/dist/assets/VarIO-BldCQ6Xx.js +15 -0
- package/dist/assets/VarIO-BldCQ6Xx.js.map +1 -0
- package/dist/assets/VariablesView-CQp0T7Q6.js +3 -0
- package/dist/assets/VariablesView-CQp0T7Q6.js.map +1 -0
- package/dist/assets/VariablesView-Ck3IyRCN.css +1 -0
- package/dist/assets/index-B1ONXQzZ.css +1 -0
- package/dist/assets/index-Cqe_7QZw.js +154 -0
- package/dist/assets/index-Cqe_7QZw.js.map +1 -0
- package/dist/assets/useDeployment-BDbkdxpo.js +2 -0
- package/dist/assets/{useDeployment-BDHMCIYu.js.map → useDeployment-BDbkdxpo.js.map} +1 -1
- package/dist/assets/useJobQueue-D5JkRJNX.js +2 -0
- package/dist/assets/useJobQueue-D5JkRJNX.js.map +1 -0
- package/dist/index.html +2 -2
- package/package.json +2 -1
- package/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js +0 -2
- package/dist/assets/ConfigTab-CKjpaZmg.js +0 -2
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js +0 -2
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-cZYd7gRK.js.map +0 -1
- package/dist/assets/DangerTab-XshYLxAZ.js +0 -2
- package/dist/assets/DangerTab-XshYLxAZ.js.map +0 -1
- package/dist/assets/DashboardView-DqIE-Aof.js +0 -2
- package/dist/assets/DeploymentDetailView-nFBQCzq0.js +0 -2
- package/dist/assets/DeploymentsView-CalAGK0U.js +0 -2
- package/dist/assets/DeploymentsView-CalAGK0U.js.map +0 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js +0 -2
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js.map +0 -1
- package/dist/assets/JobDetailView-BExTkW8o.js +0 -2
- package/dist/assets/JobDetailView-BExTkW8o.js.map +0 -1
- package/dist/assets/JobsView-h0PuFN8o.js +0 -2
- package/dist/assets/JobsView-h0PuFN8o.js.map +0 -1
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-BNqCyGeQ.js +0 -3
- package/dist/assets/LoginView-CSY6YIsK.js +0 -2
- package/dist/assets/LoginView-CSY6YIsK.js.map +0 -1
- package/dist/assets/LoginView-Djedwklv.css +0 -1
- package/dist/assets/LogsTab-CKNkR_07.js +0 -6
- package/dist/assets/NotifiersView-BrPpuf5o.js +0 -2
- package/dist/assets/OverviewTab-DY-d5Ia3.js +0 -2
- package/dist/assets/PublicLogsView-HBPDlV47.js +0 -4
- package/dist/assets/RegistriesView-B0XRfL2L.js +0 -2
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-BoNYQAdk.js +0 -2
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-BoNYQAdk.js.map +0 -1
- package/dist/assets/RoutingView-D-qgRSDy.js +0 -9
- package/dist/assets/RoutingView-D-qgRSDy.js.map +0 -1
- package/dist/assets/RuntimeTab-7GuemvVX.js +0 -2
- package/dist/assets/RuntimeTab-7GuemvVX.js.map +0 -1
- package/dist/assets/RuntimeTab-RB6kjod2.css +0 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js +0 -2
- package/dist/assets/SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js +0 -2
- package/dist/assets/SpecDetailView-Da_PDlft.js +0 -2
- package/dist/assets/SpecsView-CQHYfu01.js +0 -2
- package/dist/assets/SsoView-5Kk12W1K.js +0 -2
- package/dist/assets/SsoView-5Kk12W1K.js.map +0 -1
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js +0 -2
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js.map +0 -1
- package/dist/assets/SwarmView-B-ESSXnj.js +0 -2
- package/dist/assets/Teleport-DTF2H_ia.js +0 -4
- package/dist/assets/TerminalTab-BboWRxwq.js +0 -3
- package/dist/assets/UsersView-BBn3F_YM.js +0 -2
- package/dist/assets/UsersView-BBn3F_YM.js.map +0 -1
- package/dist/assets/UsersView-Be77zCYE.css +0 -1
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-D7QFvEED.js +0 -2
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-D7QFvEED.js.map +0 -1
- package/dist/assets/VariablesView-BAajBPNO.js +0 -2
- package/dist/assets/VariablesView-BAajBPNO.js.map +0 -1
- package/dist/assets/VariablesView-ByeOvDGJ.css +0 -1
- package/dist/assets/index-BXPaPWhH.js +0 -149
- package/dist/assets/index-BXPaPWhH.js.map +0 -1
- package/dist/assets/index-B_k9b7xG.css +0 -1
- package/dist/assets/useDeployment-BDHMCIYu.js +0 -2
- package/dist/assets/useFormat-DIlTY5Dl.js +0 -2
- package/dist/assets/useFormat-DIlTY5Dl.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeTab-7GuemvVX.js","sources":["../../src/views/tabs/RuntimeTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * What is actually running, and what Traefik was actually told about it.\n *\n * THE QUESTION THIS ANSWERS. \"The hostname does not work.\" Nothing in this UI could answer it: the\n * registry shows what was *submitted*, the logs show what the container *says*, and the reason a\n * request 404s is in neither — it is in the container's Traefik labels, which pstack never writes.\n *\n * The routing table is the direct answer to \"which URL maps to which port\". Traefik does **not** dial\n * `service_name:port`: its docker provider resolves the container's IP on the ingress network and\n * dials that, on the port from the `loadbalancer.server.port` label. That is why a service must be\n * attached to `preview-ingress`, why the port is the *container-internal* one, and why publishing a\n * host port is unnecessary. The `target` column shows the address Traefik assembled, so a missing\n * half is visible rather than inferred.\n *\n * Findings come first because they are the reason anyone opened this tab.\n */\nimport { computed, ref, watch } from 'vue';\nimport { sentence } from '../../composables/useFormat';\nimport { api, problem } from '../../api/client';\nimport type { RuntimeContainer, RuntimeResponse } from '../../api/types';\nimport { dep, varsQuery } from '../../composables/useDeployment';\nimport { usePolling } from '../../composables/usePolling';\nimport SkeletonList from '../../components/SkeletonList.vue';\nimport ActionButton from '../../components/ActionButton.vue';\nimport ErrorNote from '../../components/ErrorNote.vue';\nimport InfoHint from '../../components/InfoHint.vue';\nimport { toast } from '../../composables/useToasts';\nimport RefreshButton from '../../components/RefreshButton.vue';\n\nconst rt = ref<RuntimeResponse | null>(null);\nconst error = ref('');\nconst loading = ref(true);\n\nasync function load(): Promise<void> {\n const r = await api.get<RuntimeResponse>(\n `/api/deployments/${encodeURIComponent(dep.id)}/runtime${varsQuery.value}`,\n );\n loading.value = false;\n if (!r.ok) {\n error.value = problem(r, 'inspect what is running');\n return;\n }\n error.value = '';\n rt.value = r.body;\n}\n\nwatch(() => dep.id, () => { loading.value = true; void load(); }, { immediate: true });\n// Containers change state during a deploy; the poll pauses itself when the tab is hidden.\nusePolling(() => void load(), 8000);\n\nconst errors = computed(() => rt.value?.findings.filter((f) => f.level === 'error') ?? []);\nconst warns = computed(() => rt.value?.findings.filter((f) => f.level === 'warn') ?? []);\nconst infos = computed(() => rt.value?.findings.filter((f) => f.level === 'info') ?? []);\nconst running = computed(() => rt.value?.containers.filter((c) => c.state === 'running').length ?? 0);\n\n/**\n * Whether the node column exists at all — compose has no nodes to name.\n *\n * Hoisted rather than asked twice: the header and the cell were computing this separately, which is\n * how a header can end up describing a column the body did not render in the same position.\n */\nconst hasNode = computed(() => rt.value?.containers.some((c) => c.node) ?? false);\n\n/**\n * The part of a container's name worth reading in a table cell.\n *\n * Compose names a container `<stack>-<service>-<n>`. Swarm names a TASK\n * `<stack>_<service>.<slot>.<task id>` — long, and its first half repeats the service already\n * printed on the line above, in a column that under swarm has to share the row with the node and\n * the row actions. The tail is the half that identifies which task this is: the slot and the id\n * `docker service ps` prints. Compose names hold no dots and come back untouched.\n *\n * The full name stays in the cell's `title` rather than in the text. Truncating the text would have\n * cut the id — the one part worth copying — and nothing here needs the whole name by hand anyway:\n * Logs, Shell and the container actions all carry it themselves.\n */\nfunction taskOf(name: string): string {\n const p = name.split('.');\n return p.length === 3 ? `${p[1]}.${p[2]}` : name;\n}\n\n/**\n * One container action in flight, as `action:name`.\n *\n * A single ref rather than a per-row flag: two `docker restart`s racing on the same stack is not\n * something to make easy, and the readiness watch each one starts would fight the other.\n */\nconst busy = ref('');\n\nasync function act(c: RuntimeContainer, action: 'start' | 'stop' | 'restart'): Promise<void> {\n busy.value = `${action}:${c.name}`;\n const r = await api.post<{ note?: string }>(\n `/api/deployments/${encodeURIComponent(dep.id)}/containers/${encodeURIComponent(c.name)}/${action}${varsQuery.value}`,\n );\n busy.value = '';\n if (!r.ok) {\n // Docker's own words. \"Already started\" and \"no such container\" are different problems and it\n // says both better than this layer could.\n toast('error', problem(r, `${action} ${c.name}`));\n return;\n }\n toast('ok', r.body.note ?? `${c.name}: ${action} done.`);\n // Read the table back rather than assuming the new state: a container that exits again immediately\n // is exactly the case worth seeing, and the 8s poll would show it a beat later anyway.\n void load();\n}\n\n/**\n * The hostname Traefik actually routes to this container, or null.\n *\n * Built from the ROUTES rather than guessed from the container: a router's rule is the only thing\n * that decides what URL reaches it, and a link assembled from a service name and a domain would be\n * a plausible-looking 404. Pattern hosts (`HostRegexp`) are skipped for the same reason — there is\n * no single address to send someone to.\n */\nfunction urlFor(c: RuntimeContainer): string | null {\n const host = rt.value?.routes\n // Under swarm the labels live on the service, so a route names `app` where the container is a\n // task called `pr-1_app.1.<id>`. Matching the name alone left every swarm row without a link to\n // a router that does point at it. Both tasks of one service share the URL — Traefik balances.\n .filter((r) => r.container === c.name || r.container === c.service)\n .flatMap((r) => r.hosts)\n .find((h) => !h.startsWith('(pattern)'));\n return host ? `https://${host}` : null;\n}\n</script>\n\n<template>\n <div>\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not inspect this deployment.\" />\n <SkeletonList v-if=\"loading && !rt\" :rows=\"5\" />\n\n <template v-else-if=\"rt\">\n <!--\n `reachable: false` is not \"nothing is running\". The stack may be perfectly healthy while this\n process cannot reach the Docker socket, and reporting that as empty is how a UI tells someone\n their live preview is gone.\n -->\n <div v-if=\"!rt.reachable\" class=\"banner warn\">\n <b>Docker did not answer.</b>\n <p>\n Nothing below could be determined — this is not the same as nothing running. Check the\n daemon and the socket mount, then refresh.\n </p>\n </div>\n\n <template v-else>\n <!-- Findings first: this tab exists because something is not working. -->\n <div v-for=\"(f, i) in errors\" :key=\"`e${i}`\" class=\"banner failed\">\n <b>Blocking</b>\n <p>{{ f.message }}</p>\n </div>\n <div v-for=\"(f, i) in warns\" :key=\"`w${i}`\" class=\"banner warn\">\n <b>Worth checking</b>\n <p>{{ f.message }}</p>\n </div>\n <div v-for=\"(f, i) in infos\" :key=\"`i${i}`\" class=\"banner plain\">\n <p>{{ f.message }}</p>\n </div>\n <div v-if=\"!rt.findings.length && rt.containers.length\" class=\"banner ok\">\n <b>Nothing looks wrong.</b>\n <p>\n Every container is attached to the ingress network and every router has a rule and a port.\n If a hostname still fails, the next suspects are DNS and the certificate.\n </p>\n </div>\n\n <!-- ============================ routing ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Routing</h2>\n <span class=\"grow\" />\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n TLS: {{ rt.challenge === 'unknown' ? 'unknown' : rt.challenge }}\n <InfoHint label=\"why the TLS mode matters here\" align=\"end\">\n Under HTTP-01 every per-PR router needs <code>tls.certresolver=le</code>, because each\n hostname resolves its own certificate. Under DNS-01 that inverts — one always-on router\n holds the wildcard, and a per-PR certresolver makes each PR order its own and burn the\n weekly limit. Read from the running Traefik's own flags, not configured here.\n </InfoHint>\n </span>\n </div>\n\n <table v-if=\"rt.routes.length\" class=\"cards\">\n <thead>\n <tr>\n <th>URL</th>\n <th>\n Forwards to\n <InfoHint label=\"how a URL reaches a port\">\n Traefik's docker provider resolves the container's IP on\n <code>preview-ingress</code> and dials it on the port from\n <code>loadbalancer.server.port</code> — it does <em>not</em> use\n <code>service:port</code> DNS. So the port here is the one inside the container,\n and publishing a host port is unnecessary.\n </InfoHint>\n </th>\n <th>Router</th>\n <th>TLS</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(r, i) in rt.routes\" :key=\"r.router\" :style=\"{ '--i': i }\">\n <td data-label=\"url\">\n <div v-for=\"h in r.hosts\" :key=\"h\">\n <a v-if=\"!h.startsWith('(pattern)')\" :href=\"`https://${h}`\" target=\"_blank\" rel=\"noreferrer\">\n {{ h }}\n </a>\n <span v-else class=\"mono mute\">{{ h }}</span>\n </div>\n <span v-if=\"!r.hosts.length\" class=\"mute\">no host in the rule</span>\n </td>\n <td data-label=\"forwards to\">\n <span v-if=\"r.target\" class=\"mono\">{{ r.target }}</span>\n <span v-else class=\"s-failed\">\n {{ r.port === null ? 'no port declared' : 'not on the ingress network' }}\n </span>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">{{ r.container }}</div>\n </td>\n <td data-label=\"router\">\n {{ r.router }}\n <div v-if=\"r.priority\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n priority {{ r.priority }}\n </div>\n </td>\n <td data-label=\"tls\">\n <span v-if=\"r.tls\" class=\"badge ok\">{{ r.certresolver || 'inherited' }}</span>\n <span v-else class=\"badge off\">off</span>\n </td>\n </tr>\n </tbody>\n </table>\n\n <!--\n The reported failure, stated where it will be looked for. pstack does not write these\n labels — the deployment's own compose file does — so the fix is in the user's file.\n -->\n <div v-else class=\"banner warn\">\n <b>No routes. Traefik has not been told about this deployment.</b>\n <p>\n Routes come from labels in <em>your</em> compose file, not from pstack and not from the\n <RouterLink to=\"/routing\">Routing</RouterLink> page (that is Traefik's file provider —\n middleware and TLS options, not per-PR routers). A reachable service needs four things:\n </p>\n <pre class=\"code\">labels:\n - traefik.enable=true # the host runs exposedbydefault=false\n - traefik.docker.network=preview-ingress # which network Traefik should dial\n - traefik.http.routers.<name>-${STACK}.rule=Host(`<name>-${STACK}.${PREVIEW_DOMAIN}`)\n - traefik.http.services.<name>-${STACK}.loadbalancer.server.port=80\nnetworks: [default, preview-ingress] # and preview-ingress: { external: true }</pre>\n <p class=\"mute\">\n Put <code>${STACK}</code> in the router and service names: Traefik's namespace is global\n across the host, so two deployments sharing a router name serve each other's containers.\n </p>\n </div>\n </section>\n\n <!-- ============================ containers ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Containers</h2>\n <span class=\"grow\" />\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n {{ running }} of {{ rt.containers.length }} running\n </span>\n <RefreshButton :run=\"load\" :busy=\"loading\" />\n </div>\n\n <table v-if=\"rt.containers.length\" class=\"cards\">\n <thead>\n <tr>\n <th>Service</th>\n <!-- Where, then how it is doing — the order the cells are in. They disagreed, so\n under swarm (the only time this column exists) every state read as a node. -->\n <th v-if=\"hasNode\">Node</th>\n <th>State</th>\n <th>Ports</th>\n <th>Networks</th>\n <th>Image</th>\n <th aria-label=\"Actions\" />\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(c, i) in rt.containers\" :key=\"c.id\" :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"service\">\n {{ c.service ?? c.name }}\n <div class=\"mute task\" :title=\"c.name\">{{ taskOf(c.name) }}</div>\n </td>\n <td v-if=\"hasNode\" data-label=\"node\">\n {{ c.node ?? '—' }}\n <!-- A task on another node: listed from the manager, out of reach of exec/stop. -->\n <span v-if=\"c.remote\" class=\"badge\" title=\"runs on another swarm node — logs reach it through the manager; a shell and stop/start do not\">remote</span>\n </td>\n <td data-label=\"state\">\n <span :class=\"c.state === 'running' ? 's-ok' : 's-failed'\">{{ sentence(c.state) }}</span>\n <!--\n Health is only reported while it is RUNNING. Docker keeps the last probe result on\n a stopped container, so an exited one rendered \"Exited / Healthy\" — a stale reading\n presented beside the fact that contradicts it.\n -->\n <div\n v-if=\"c.health && c.state === 'running'\"\n class=\"mute\"\n style=\"font-size: var(--t-sm)\"\n :class=\"c.health === 'healthy' ? 's-ok' : 's-failed'\"\n >\n {{ sentence(c.health) }}\n </div>\n </td>\n <td data-label=\"ports\">\n <div v-for=\"p in c.ports\" :key=\"`${p.containerPort}/${p.protocol}`\">\n <span class=\"mono\">{{ p.containerPort }}</span>\n <span v-if=\"p.hostPort\" class=\"mute\"> ← host {{ p.hostPort }}</span>\n </div>\n <span v-if=\"!c.ports.length\" class=\"mute\">none exposed</span>\n </td>\n <td data-label=\"networks\">\n <div v-for=\"n in c.networks\" :key=\"n\">\n <span :class=\"n === 'preview-ingress' ? 's-ok' : ''\">{{ n }}</span>\n </div>\n <div v-if=\"c.ingressIp\" class=\"mute mono\" style=\"font-size: var(--t-sm)\">\n {{ c.ingressIp }}\n </div>\n </td>\n <td class=\"dim\" data-label=\"image\">{{ c.image }}</td>\n <!--\n The three things anyone wants from a container row, without hunting for the tab\n that does it. Open goes to the URL Traefik actually assembled for THIS container\n (see `urlFor`), so it is absent rather than wrong when no router points here.\n -->\n <td class=\"row-actions\" data-label=\"\">\n <!--\n One container, not the service and not the stack. Start appears only when it is\n not running and Stop only when it is, so the control on screen is the one that\n would do something. Both destructive ones confirm in place.\n -->\n <!-- None of these reach a task on another node; docker's verbs are node-local. -->\n <span v-if=\"c.remote\" class=\"mute\" style=\"font-size: var(--t-sm)\" title=\"runs on another swarm node — redeploy the stack, or act on the worker itself\">\n on {{ c.node }}\n </span>\n <ActionButton\n v-else-if=\"c.state !== 'running'\"\n class=\"sm\"\n variant=\"ghost\"\n :pending=\"busy === `start:${c.name}`\"\n :disabled=\"!!busy\"\n confirm=\"Start it?\"\n @run=\"act(c, 'start')\"\n >\n Start\n </ActionButton>\n <ActionButton\n v-else\n class=\"sm\"\n variant=\"ghost\"\n :pending=\"busy === `stop:${c.name}`\"\n :disabled=\"!!busy\"\n confirm=\"Stop it?\"\n title=\"Stops this container only. It stays stopped until something starts it.\"\n @run=\"act(c, 'stop')\"\n >\n Stop\n </ActionButton>\n <ActionButton\n v-if=\"!c.remote\"\n class=\"sm\"\n variant=\"ghost\"\n :pending=\"busy === `restart:${c.name}`\"\n :disabled=\"!!busy\"\n confirm=\"Restart it?\"\n @run=\"act(c, 'restart')\"\n >\n Restart\n </ActionButton>\n <RouterLink\n class=\"btn sm ghost\"\n :to=\"`/deployments/${encodeURIComponent(dep.id)}/logs?container=${encodeURIComponent(c.name)}`\"\n >\n Logs\n </RouterLink>\n <RouterLink\n v-if=\"c.state === 'running' && !c.remote\"\n class=\"btn sm ghost\"\n :to=\"`/deployments/${encodeURIComponent(dep.id)}/terminal?container=${encodeURIComponent(c.name)}`\"\n >\n Shell\n </RouterLink>\n <!--\n Only while running: the router label survives a stopped container, so the URL\n still exists and answers 502. A link that is certain to fail is worse than no link.\n -->\n <a\n v-if=\"c.state === 'running' && urlFor(c)\"\n class=\"btn sm ghost\"\n :href=\"urlFor(c)!\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n Open\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <p v-else class=\"mute\">\n No containers for this stack. If you expected some, check that their profile is one the\n spec selects — a service behind a profile that is not enabled is never started.\n </p>\n </section>\n </template>\n </template>\n </div>\n</template>\n\n<style scoped>\n/*\n * The second line of the service cell: the task, under the service it belongs to.\n *\n * The cap is a declared ceiling on what this line may bid for in the auto table layout, not a fix\n * for an overflow — `td.name` already breaks. Under swarm this column shares the row with the node\n * column and the row actions: `taskOf` makes the line's length independent of the stack and service\n * names, and this bounds what is left of it. Past the ceiling it wraps rather than widening the\n * column.\n */\n.task {\n font-size: var(--t-sm);\n max-width: 30ch;\n}\n</style>\n"],"names":["rt","ref","error","loading","load","r","api","dep","varsQuery","problem","watch","usePolling","errors","computed","_a","f","warns","infos","running","c","hasNode","taskOf","name","p","busy","act","action","toast","urlFor","host","h","_createElementBlock","_createBlock","ErrorNote","SkeletonList","_Fragment","_openBlock","_renderList","i","_cache","_createElementVNode","_toDisplayString","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_createVNode","InfoHint","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_10","_hoisted_9","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_component_RouterLink","_hoisted_22","_hoisted_23","_hoisted_24","RefreshButton","_hoisted_25","_hoisted_27","_hoisted_28","_createTextVNode","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_normalizeClass","_unref","sentence","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","n","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","ActionButton","$event","_hoisted_42","_hoisted_43","_hoisted_1"],"mappings":"4pEA8BA,MAAMA,EAAKC,EAA4B,IAAI,EACrCC,EAAQD,EAAI,EAAE,EACdE,EAAUF,EAAI,EAAI,EAExB,eAAeG,GAAsB,CACnC,MAAMC,EAAI,MAAMC,EAAI,IAClB,oBAAoB,mBAAmBC,EAAI,EAAE,CAAC,WAAWC,EAAU,KAAK,EAAA,EAG1E,GADAL,EAAQ,MAAQ,GACZ,CAACE,EAAE,GAAI,CACTH,EAAM,MAAQO,EAAQJ,EAAG,yBAAyB,EAClD,MACF,CACAH,EAAM,MAAQ,GACdF,EAAG,MAAQK,EAAE,IACf,CAEAK,EAAM,IAAMH,EAAI,GAAI,IAAM,CAAEJ,EAAQ,MAAQ,GAAWC,EAAA,CAAQ,EAAG,CAAE,UAAW,GAAM,EAErFO,EAAW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,EAAA,OAJX,MAAM,eACL,GAAE,gBAAkB,mBAAmBc,EAAAvE,CAAA,EAAI,EAAE,CAAA,uBAAwB,mBAAmBY,EAAE,IAAI,CAAA,EAAA,aAChG,IAED,CAAA,GAAAoB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,UAED,EAAA,CAAA,8BAMQpB,EAAE,QAAK,WAAkBS,EAAOT,CAAC,OADzCY,EAQI,IAAA,OANF,MAAM,eACL,KAAMH,EAAOT,CAAC,EACf,OAAO,SACP,IAAI,YAAA,EACL,SAED,EAAAyE,EAAA,oCAKR7D,EAGI,IAHJ8D,GAAuB,2KAGvB,EAAA,UA7QJzD,EAAA,EAAAL,EAMM,MANN+D,EAMM,CAAA,GAAAvD,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CALJC,EAA6B,SAA1B,yBAAsB,EAAA,EACzBA,EAGI,SAHD,sIAGH,EAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.task[data-v-80cf98f3]{font-size:var(--t-sm);max-width:30ch}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var ht=e=>{throw TypeError(e)};var fn=(e,t,n)=>t.has(e)||ht("Cannot "+n);var Ae=(e,t,n)=>(fn(e,t,"read from private field"),n?n.call(e):t.get(e)),gt=(e,t,n)=>t.has(e)?ht("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{j as Mt,k as pn,l as Ve,e as mn,r as hn,g as Vt,S as vt,P as Y,c as Ce,a as me,m as gn,u as yt,n as wt,i as vn,f as yn,F as wn,D as xn,o as xt,p as bn,h as Sn,b as Lt,q as Cn,T as _n}from"./Teleport-DTF2H_ia.js";import{r as E,j as q,a8 as Le,a9 as An,aa as Pn,ab as On,ac as En,K as he,ad as qn,d as k,ae as bt,J as de,af as Rn,ag as Tn,o as $,z as L,w as R,$ as V,u as w,ah as Ft,ai as we,R as $n,aj as Bn,ak as kn,c as Z,e as N,a2 as ne,D as Nt,al as In,a1 as it,g as Ee,y as zt,F as lt,a as xe,h as Oe,N as Dn,a0 as Pe,a6 as Ht,a3 as Wt,a4 as jt,am as Mn,f as Kt,an as Vn,ao as Ln,t as Ge}from"./index-BXPaPWhH.js";function St(e){return typeof e=="string"?`'${e}'`:new Fn().serialize(e)}const Fn=(function(){var t;class e{constructor(){gt(this,t,new Map)}compare(o,r){const i=typeof o,l=typeof r;return i==="string"&&l==="string"?o.localeCompare(r):i==="number"&&l==="number"?o-r:String.prototype.localeCompare.call(this.serialize(o,!0),this.serialize(r,!0))}serialize(o,r){if(o===null)return"null";switch(typeof o){case"string":return r?o:`'${o}'`;case"bigint":return`${o}n`;case"object":return this.$object(o);case"function":return this.$function(o)}return String(o)}serializeObject(o){const r=Object.prototype.toString.call(o);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),o);const i=o.constructor,l=i===Object||i===void 0?"":i.name;if(l!==""&&globalThis[l]===i)return this.serializeBuiltInType(l,o);if(typeof o.toJSON=="function"){const a=o.toJSON();return l+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(l,Object.entries(o))}serializeBuiltInType(o,r){const i=this["$"+o];if(i)return i.call(this,r);if(typeof(r==null?void 0:r.entries)=="function")return this.serializeObjectEntries(o,r.entries());throw new Error(`Cannot serialize ${o}`)}serializeObjectEntries(o,r){const i=Array.from(r).sort((a,s)=>this.compare(a[0],s[0]));let l=`${o}{`;for(let a=0;a<i.length;a++){const[s,u]=i[a];l+=`${this.serialize(s,!0)}:${this.serialize(u)}`,a<i.length-1&&(l+=",")}return l+"}"}$object(o){let r=Ae(this,t).get(o);return r===void 0&&(Ae(this,t).set(o,`#${Ae(this,t).size}`),r=this.serializeObject(o),Ae(this,t).set(o,r)),r}$function(o){const r=Function.prototype.toString.call(o);return r.slice(-15)==="[native code] }"?`${o.name||""}()[native]`:`${o.name}(${o.length})${r.replace(/\s*\n\s*/g,"")}`}$Array(o){let r="[";for(let i=0;i<o.length;i++)r+=this.serialize(o[i]),i<o.length-1&&(r+=",");return r+"]"}$Date(o){try{return`Date(${o.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(o){return`ArrayBuffer[${new Uint8Array(o).join(",")}]`}$Set(o){return`Set${this.$Array(Array.from(o).sort((r,i)=>this.compare(r,i)))}`}$Map(o){return this.serializeObjectEntries("Map",o.entries())}}t=new WeakMap;for(const n of["Error","RegExp","URL"])e.prototype["$"+n]=function(o){return`${n}(${o})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+n]=function(o){return`${n}[${o.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])e.prototype["$"+n]=function(o){return`${n}[${o.join("n,")}${o.length>0?"n":""}]`};return e})();function Nn(e,t){return e===t||St(e)===St(t)}function Ct(e,t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(t,e))}function zn(e){const t=Mt({dir:E("ltr")});return q(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}let Je=0;function Hn(){Le(e=>{if(!pn)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??_t()),document.body.insertAdjacentElement("beforeend",t[1]??_t()),Je++,e(()=>{Je===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),Je--})})}function _t(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Wn(e){return q(()=>{var t;return An(e)?!!((t=Ve(e))!=null&&t.closest("form")):!0})}function at(e){const t=Pn(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((r,i)=>{const l=(t==null?void 0:t.type.props[i]).default;return l!==void 0&&(r[i]=l),r},{}),o=En(e);return q(()=>{const r={},i=(t==null?void 0:t.vnode.props)??{};return Object.keys(i).forEach(l=>{r[On(l)]=i[l]}),Object.keys({...n,...r}).reduce((l,a)=>(o.value[a]!==void 0&&(l[a]=o.value[a]),l),{})})}function jn(e,t){const n=at(e),o=t?mn(t):{};return q(()=>({...n.value,...o}))}function Kn(e){const t=E(),n=q(()=>{var r;return((r=t.value)==null?void 0:r.width)??0}),o=q(()=>{var r;return((r=t.value)==null?void 0:r.height)??0});return he(()=>{const r=Ve(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const a=l[0];let s,u;if("borderBoxSize"in a){const p=a.borderBoxSize,f=Array.isArray(p)?p[0]:p;s=f.inlineSize,u=f.blockSize}else s=r.offsetWidth,u=r.offsetHeight;t.value={width:s,height:u}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else t.value=void 0}),{width:n,height:o}}function Ut(e){const t=hn("",1e3);return{search:t,handleTypeaheadSearch:(r,i)=>{t.value=t.value+r;{const l=Vt(),a=i.map(d=>{var c,m;return{...d,textValue:((c=d.value)==null?void 0:c.textValue)??((m=d.ref.textContent)==null?void 0:m.trim())??""}}),s=a.find(d=>d.ref===l),u=a.map(d=>d.textValue),p=Yn(u,t.value,s==null?void 0:s.textValue),f=a.find(d=>d.textValue===p);return f&&f.ref.focus(),f==null?void 0:f.ref}},resetTypeahead:()=>{t.value=""}}}function Un(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Yn(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=Un(e,Math.max(i,0));r.length===1&&(l=l.filter(u=>u!==n));const s=l.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s:void 0}function At(){const e=E(),t=q(()=>{var n,o;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(o=e.value)==null?void 0:o.$el.nextElementSibling:Ve(e)});return{primitiveElement:e,currentElement:t}}const Pt="data-reka-collection-item";function Te(e={}){const{key:t="",isProvider:n=!1}=e,o=`${t}CollectionProvider`;let r;if(n){const p=E(new Map);r={collectionRef:E(),itemMap:p},Tn(o,r)}else r=qn(o);const i=(p=!1)=>{const f=r.collectionRef.value;if(!f)return[];const d=Array.from(f.querySelectorAll(`[${Pt}]`)),m=Array.from(r.itemMap.value.values()).sort((y,x)=>d.indexOf(y.ref)-d.indexOf(x.ref));return p?m:m.filter(y=>y.ref.dataset.disabled!=="")},l=k({name:"CollectionSlot",inheritAttrs:!1,setup(p,{slots:f,attrs:d}){const{primitiveElement:c,currentElement:m}=At();return de(m,()=>{r.collectionRef.value=m.value}),()=>bt(vt,{ref:c,...d},f)}}),a=k({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(p,{slots:f,attrs:d}){const{primitiveElement:c,currentElement:m}=At();return Le(y=>{if(m.value){const x=Rn(m.value);r.itemMap.value.set(x,{ref:m.value,value:p.value}),y(()=>r.itemMap.value.delete(x))}}),()=>bt(vt,{...d,[Pt]:"",ref:c},f)}}),s=q(()=>Array.from(r.itemMap.value.values())),u=q(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:u,CollectionSlot:l,CollectionItem:a}}var Xn=k({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,n)=>($(),L(w(Y),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:R(()=>[V(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Gn=Xn;const[Yt,Jn]=Ce("PopperRoot");var Zn=k({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=E();return Jn({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>V(n.$slots,"default")}}),Qn=Zn,eo=k({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=me(),r=Yt();return Ft(()=>{r.onAnchorChange(t.reference??o.value)}),(i,l)=>($(),L(w(Y),{ref:w(n),as:i.as,"as-child":i.asChild},{default:R(()=>[V(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),to=eo;function no(e){return e!==null}function oo(e){return{name:"transformOrigin",options:e,fn(t){var x,_,g;const{placement:n,rects:o,middlewareData:r}=t,l=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=l?0:e.arrowWidth,s=l?0:e.arrowHeight,[u,p]=et(n),f={start:"0%",center:"50%",end:"100%"}[p],d=(((_=r.arrow)==null?void 0:_.x)??0)+a/2,c=(((g=r.arrow)==null?void 0:g.y)??0)+s/2;let m="",y="";return u==="bottom"?(m=l?f:`${d}px`,y=`${-s}px`):u==="top"?(m=l?f:`${d}px`,y=`${o.floating.height+s}px`):u==="right"?(m=`${-s}px`,y=l?f:`${c}px`):u==="left"&&(m=`${o.floating.width+s}px`,y=l?f:`${c}px`),{data:{x:m,y}}}}}function et(e){const[t,n="center"]=e.split("-");return[t,n]}const ro=["top","right","bottom","left"],ie=Math.min,Q=Math.max,ke=Math.round,Be=Math.floor,ee=e=>({x:e,y:e}),io={left:"right",right:"left",bottom:"top",top:"bottom"};function Xt(e,t,n){return Q(e,ie(t,n))}function te(e,t){return typeof e=="function"?e(t):e}function le(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function st(e){return e==="x"?"y":"x"}function ut(e){return e==="y"?"height":"width"}function U(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ct(e){return st(U(e))}function lo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=ct(e),i=ut(r);let l=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Ie(l)),[l,Ie(l)]}function ao(e){const t=Ie(e);return[tt(e),t,tt(t)]}function tt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ot=["left","right"],Et=["right","left"],so=["top","bottom"],uo=["bottom","top"];function co(e,t,n){switch(e){case"top":case"bottom":return n?t?Et:Ot:t?Ot:Et;case"left":case"right":return t?so:uo;default:return[]}}function fo(e,t,n,o){const r=_e(e);let i=co(le(e),n==="start",o);return r&&(i=i.map(l=>l+"-"+r),t&&(i=i.concat(i.map(tt)))),i}function Ie(e){const t=le(e);return io[t]+e.slice(t.length)}function po(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function Gt(e){return typeof e!="number"?po(e):{top:e,right:e,bottom:e,left:e}}function De(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function qt(e,t,n){let{reference:o,floating:r}=e;const i=U(t),l=ct(t),a=ut(l),s=le(t),u=i==="y",p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let c;switch(s){case"top":c={x:p,y:o.y-r.height};break;case"bottom":c={x:p,y:o.y+o.height};break;case"right":c={x:o.x+o.width,y:f};break;case"left":c={x:o.x-r.width,y:f};break;default:c={x:o.x,y:o.y}}const m=_e(t);return m&&(c[l]+=d*(m==="end"?1:-1)*(n&&u?-1:1)),c}async function mo(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:c=0}=te(t,e),m=Gt(c),x=a[d?f==="floating"?"reference":"floating":f],_=De(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:p,strategy:s})),g=f==="floating"?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),h=await(i.isElement==null?void 0:i.isElement(C))&&await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1},S=De(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:C,strategy:s}):g);return{top:(_.top-S.top+m.top)/h.y,bottom:(S.bottom-_.bottom+m.bottom)/h.y,left:(_.left-S.left+m.left)/h.x,right:(S.right-_.right+m.right)/h.x}}const ho=50,go=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:mo},s=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:f}=qt(u,o,s),d=o,c=0;const m={};for(let y=0;y<i.length;y++){const x=i[y];if(!x)continue;const{name:_,fn:g}=x,{x:C,y:h,data:S,reset:v}=await g({x:p,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});p=C??p,f=h??f,m[_]={...m[_],...S},v&&c<ho&&(c++,typeof v=="object"&&(v.placement&&(d=v.placement),v.rects&&(u=v.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:r}):v.rects),{x:p,y:f}=qt(u,d,s)),y=-1)}return{x:p,y:f,placement:d,strategy:r,middlewareData:m}},vo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a,middlewareData:s}=t,{element:u,padding:p=0}=te(e,t)||{};if(u==null)return{};const f=Gt(p),d={x:n,y:o},c=ct(r),m=ut(c),y=await l.getDimensions(u),x=c==="y",_=x?"top":"left",g=x?"bottom":"right",C=x?"clientHeight":"clientWidth",h=i.reference[m]+i.reference[c]-d[c]-i.floating[m],S=d[c]-i.reference[c],v=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let b=v?v[C]:0;(!b||!await(l.isElement==null?void 0:l.isElement(v)))&&(b=a.floating[C]||i.floating[m]);const A=h/2-S/2,P=b/2-y[m]/2-1,O=ie(f[_],P),I=ie(f[g],P),T=b-y[m]-I,B=b/2-y[m]/2+A,D=Xt(O,B,T),z=!s.arrow&&_e(r)!=null&&B!==D&&i.reference[m]/2-(B<O?O:I)-y[m]/2<0,F=z?B<O?B-O:B-T:0;return{[c]:d[c]+F,data:{[c]:D,centerOffset:B-D-F,...z&&{alignmentOffset:F}},reset:z}}}),yo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:c="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=te(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const _=le(r),g=U(a),C=le(a)===a,h=await(s.isRTL==null?void 0:s.isRTL(u.floating)),S=d||(C||!y?[Ie(a)]:ao(a)),v=m!=="none";!d&&v&&S.push(...fo(a,y,m,h));const b=[a,...S],A=await s.detectOverflow(t,x),P=[];let O=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&P.push(A[_]),f){const D=lo(r,l,h);P.push(A[D[0]],A[D[1]])}if(O=[...O,{placement:r,overflows:P}],!P.every(D=>D<=0)){var I,T;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,z=b[D];if(z&&(!(f==="alignment"?g!==U(z):!1)||O.every(M=>U(M.placement)===g?M.overflows[0]>0:!0)))return{data:{index:D,overflows:O},reset:{placement:z}};let F=(T=O.filter(W=>W.overflows[0]<=0).sort((W,M)=>W.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!F)switch(c){case"bestFit":{var B;const W=(B=O.filter(M=>{if(v){const K=U(M.placement);return K===g||K==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(K=>K>0).reduce((K,ye)=>K+ye,0)]).sort((M,K)=>M[1]-K[1])[0])==null?void 0:B[0];W&&(F=W);break}case"initialPlacement":F=a;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function Rt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tt(e){return ro.some(t=>e[t]>=0)}const wo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=te(e,t);switch(r){case"referenceHidden":{const l=await o.detectOverflow(t,{...i,elementContext:"reference"}),a=Rt(l,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Tt(a)}}}case"escaped":{const l=await o.detectOverflow(t,{...i,altBoundary:!0}),a=Rt(l,n.floating);return{data:{escapedOffsets:a,escaped:Tt(a)}}}default:return{}}}}},Jt=new Set(["left","top"]);async function xo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),l=le(n),a=_e(n),s=U(n)==="y",u=Jt.has(l)?-1:1,p=i&&s?-1:1,f=te(t,e);let{mainAxis:d,crossAxis:c,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(c=a==="end"?m*-1:m),s?{x:c*p,y:d*u}:{x:d*u,y:c*p}}const bo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:a}=t,s=await xo(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},So=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:C,y:h}=g;return{x:C,y:h}}},...u}=te(e,t),p={x:n,y:o},f=await i.detectOverflow(t,u),d=U(r),c=st(d);let m=p[c],y=p[d];const x=(g,C)=>Xt(C+f[g==="y"?"top":"left"],C,C-f[g==="y"?"bottom":"right"]);l&&(m=x(c,m)),a&&(y=x(d,y));const _=s.fn({...t,[c]:m,[d]:y});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[c]:l,[d]:a}}}}}},Co=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:l,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:p=!0,crossAxis:f=!0}=te(e,t),d={x:r,y:i},c=U(l),m=st(c);let y=d[m],x=d[c];const _=te(u,t),g=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(o=_.crossAxis)!=null?o:0};if(p){const S=m==="y"?"height":"width",v=a.reference[m]-a.floating[S]+g.mainAxis,b=a.reference[m]+a.reference[S]-g.mainAxis;y<v?y=v:y>b&&(y=b)}if(f){var C,h;const S=m==="y"?"width":"height",v=Jt.has(le(l)),b=a.reference[c]-a.floating[S]+(v&&((C=s.offset)==null?void 0:C[c])||0)+(v?0:g.crossAxis),A=a.reference[c]+a.reference[S]+(v?0:((h=s.offset)==null?void 0:h[c])||0)-(v?g.crossAxis:0);x<b?x=b:x>A&&(x=A)}return{[m]:y,[c]:x}}}},_o=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:l=()=>{},...a}=te(e,t),s=await r.detectOverflow(t,a),u=le(n),p=_e(n),f=U(n)==="y",{width:d,height:c}=o.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=p===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,m=p==="end"?"top":"bottom");const x=c-s.top-s.bottom,_=d-s.left-s.right,g=ie(c-s[m],x),C=ie(d-s[y],_),h=t.middlewareData.shift,S=!h;let v=g,b=C;h!=null&&h.enabled.x&&(b=_),h!=null&&h.enabled.y&&(v=x),S&&!p&&(f?b=d-2*Q(s.left,s.right):v=c-2*Q(s.top,s.bottom)),await l({...t,availableWidth:b,availableHeight:v});const A=await r.getDimensions(i.floating);return d!==A.width||c!==A.height?{reset:{rects:!0}}:{}}}};function Fe(){return typeof window<"u"}function ge(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function oe(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return Fe()?e instanceof Node||e instanceof H(e).Node:!1}function X(e){return Fe()?e instanceof Element||e instanceof H(e).Element:!1}function ae(e){return Fe()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function $t(e){return!Fe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function Ne(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Ao(e){return/^(table|td|th)$/.test(ge(e))}function ze(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Po=/transform|translate|scale|rotate|perspective|filter/,Oo=/paint|layout|strict|content/,ce=e=>!!e&&e!=="none";let Ze;function ft(e){const t=X(e)?G(e):e;return ce(t.transform)||ce(t.translate)||ce(t.scale)||ce(t.rotate)||ce(t.perspective)||!pt()&&(ce(t.backdropFilter)||ce(t.filter))||Po.test(t.willChange||"")||Oo.test(t.contain||"")}function Eo(e){let t=fe(e);for(;ae(t)&&!qe(t);){if(ft(t))return t;if(ze(t))return null;t=fe(t)}return null}function pt(){return Ze==null&&(Ze=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ze}function qe(e){return/^(html|body|#document)$/.test(ge(e))}function G(e){return H(e).getComputedStyle(e)}function He(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(ge(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$t(e)&&e.host||oe(e);return $t(t)?t.host:t}function Zt(e){const t=fe(e);return qe(t)?(e.ownerDocument||e).body:ae(t)&&Ne(t)?t:Zt(t)}function Re(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Zt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=H(r);if(i){const a=nt(l);return t.concat(l,l.visualViewport||[],Ne(r)?r:[],a&&n?Re(a):[])}else return t.concat(r,Re(r,[],n))}function nt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qt(e){const t=G(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ae(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=ke(n)!==i||ke(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function mt(e){return X(e)?e:e.contextElement}function Se(e){const t=mt(e);if(!ae(t))return ee(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Qt(t);let l=(i?ke(n.width):n.width)/o,a=(i?ke(n.height):n.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const qo=ee(0);function en(e){const t=H(e);return!pt()||!t.visualViewport?qo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ro(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===H(e)}function pe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=mt(e);let l=ee(1);t&&(o?X(o)&&(l=Se(o)):l=Se(e));const a=Ro(i,n,o)?en(i):ee(0);let s=(r.left+a.x)/l.x,u=(r.top+a.y)/l.y,p=r.width/l.x,f=r.height/l.y;if(i&&o){const d=H(i),c=X(o)?H(o):o;let m=d,y=nt(m);for(;y&&c!==m;){const x=Se(y),_=y.getBoundingClientRect(),g=G(y),C=_.left+(y.clientLeft+parseFloat(g.paddingLeft))*x.x,h=_.top+(y.clientTop+parseFloat(g.paddingTop))*x.y;s*=x.x,u*=x.y,p*=x.x,f*=x.y,s+=C,u+=h,m=H(y),y=nt(m)}}return De({width:p,height:f,x:s,y:u})}function We(e,t){const n=He(e).scrollLeft;return t?t.left+n:pe(oe(e)).left+n}function tn(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-We(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function To(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",l=oe(o),a=t?ze(t.floating):!1;if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},u=ee(1);const p=ee(0),f=ae(o);if((f||!i)&&((ge(o)!=="body"||Ne(l))&&(s=He(o)),f)){const c=pe(o);u=Se(o),p.x=c.x+o.clientLeft,p.y=c.y+o.clientTop}const d=l&&!f&&!i?tn(l,s):ee(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+p.x+d.x,y:n.y*u.y-s.scrollTop*u.y+p.y+d.y}}function $o(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Bo(e){const t=He(e),n=e.ownerDocument.body,o=Q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+We(e);const l=-t.scrollTop;return G(n).direction==="rtl"&&(i+=Q(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:l}}const ko=25;function Io(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=H(e),i=oe(e),l=r.visualViewport;let a=i.clientWidth,s=i.clientHeight,u=0,p=0;if(l){const d=!pt()||t==="fixed";o?d||(u=-l.offsetLeft,p=-l.offsetTop):(a=l.width,s=l.height,d&&(u=l.offsetLeft,p=l.offsetTop))}if(We(i)<=0){const d=i.ownerDocument,c=d.body,m=getComputedStyle(c),y=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(i.clientWidth-c.clientWidth-y),_=getComputedStyle(i).scrollbarGutter==="stable both-edges"?x/2:x;_<=ko&&(a-=_)}return{width:a,height:s,x:u,y:p}}function Do(e,t){const n=pe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Se(e),l=e.clientWidth*i.x,a=e.clientHeight*i.y,s=r*i.x,u=o*i.y;return{width:l,height:a,x:s,y:u}}function Bt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Io(e,n,t);else if(t==="document")o=Bo(oe(e));else if(X(t))o=Do(t,n);else{const r=en(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return De(o)}function Mo(e,t){const n=t.get(e);if(n)return n;let o=Re(e,[],!1).filter(a=>X(a)&&ge(a)!=="body"),r=null;const i=G(e).position==="fixed";let l=i?fe(e):e;for(;X(l)&&!qe(l);){const a=G(l),s=ft(l),u=r?r.position:i?"fixed":"";!s&&(u==="fixed"||u==="absolute"&&a.position==="static")?o=o.filter(f=>f!==l):r=a,l=fe(l)}return t.set(e,o),o}function Vo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[...n==="clippingAncestors"?ze(t)?[]:Mo(t,this._c):[].concat(n),o],a=Bt(t,l[0],r);let s=a.top,u=a.right,p=a.bottom,f=a.left;for(let d=1;d<l.length;d++){const c=Bt(t,l[d],r);s=Q(c.top,s),u=ie(c.right,u),p=ie(c.bottom,p),f=Q(c.left,f)}return{width:u-f,height:p-s,x:f,y:s}}function Lo(e){const{width:t,height:n}=Qt(e);return{width:t,height:n}}function Fo(e,t,n){const o=ae(t),r=oe(t),i=n==="fixed",l=pe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=ee(0);if((o||!i)&&((ge(t)!=="body"||Ne(r))&&(a=He(t)),o)){const d=pe(t,!0,i,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}!o&&r&&(s.x=We(r));const u=r&&!o&&!i?tn(r,a):ee(0),p=l.left+a.scrollLeft-s.x-u.x,f=l.top+a.scrollTop-s.y-u.y;return{x:p,y:f,width:l.width,height:l.height}}function Qe(e){return G(e).position==="static"}function kt(e,t){if(!ae(e)||G(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function nn(e,t){const n=H(e);if(ze(e))return n;if(!ae(e)){let r=fe(e);for(;r&&!qe(r);){if(X(r)&&!Qe(r))return r;r=fe(r)}return n}let o=kt(e,t);for(;o&&Ao(o)&&Qe(o);)o=kt(o,t);return o&&qe(o)&&Qe(o)&&!ft(o)?n:o||Eo(e)||n}const No=async function(e){const t=this.getOffsetParent||nn,n=this.getDimensions,o=await n(e.floating);return{reference:Fo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zo(e){return G(e).direction==="rtl"}const Ho={convertOffsetParentRelativeRectToViewportRelativeRect:To,getDocumentElement:oe,getClippingRect:Vo,getOffsetParent:nn,getElementRects:No,getClientRects:$o,getDimensions:Lo,getScale:Se,isElement:X,isRTL:zo};function on(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wo(e,t,n){let o=null,r;const i=oe(e);function l(){var p;clearTimeout(r),(p=o)==null||p.disconnect(),o=null}function a(p,f){p===void 0&&(p=!1),f===void 0&&(f=1),l();const d=e.getBoundingClientRect(),{left:c,top:m,width:y,height:x}=d;if(p||t(),!y||!x)return;const _=Be(m),g=Be(i.clientWidth-(c+y)),C=Be(i.clientHeight-(m+x)),h=Be(c),v={rootMargin:-_+"px "+-g+"px "+-C+"px "+-h+"px",threshold:Q(0,ie(1,f))||1};let b=!0;function A(P){const O=P[0].intersectionRatio;if(!on(d,e.getBoundingClientRect()))return a();if(O!==f){if(!b)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{o=new IntersectionObserver(A,{...v,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,v)}o.observe(e)}const s=H(e),u=()=>a(n);return s.addEventListener("resize",u),a(!0),()=>{s.removeEventListener("resize",u),l()}}function jo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=o,u=mt(e),p=r||i?[...u?Re(u):[],...t?Re(t):[]]:[];p.forEach(_=>{r&&_.addEventListener("scroll",n),i&&_.addEventListener("resize",n)});const f=u&&a?Wo(u,n,i):null;let d=-1,c=null;l&&(c=new ResizeObserver(_=>{let[g]=_;g&&g.target===u&&c&&t&&(c.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=c)==null||C.observe(t)})),n()}),u&&!s&&c.observe(u),t&&c.observe(t));let m,y=s?pe(e):null;s&&x();function x(){const _=pe(e);y&&!on(y,_)&&n(),y=_,m=requestAnimationFrame(x)}return n(),()=>{var _;p.forEach(g=>{r&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),f==null||f(),(_=c)==null||_.disconnect(),c=null,s&&cancelAnimationFrame(m)}}const Ko=bo,Uo=So,It=yo,Yo=_o,Xo=wo,Go=vo,Jo=Co,Zo=(e,t,n)=>{const o=new Map,r=n??{},i={...Ho,...r.platform,_c:o};return go(e,t,{...r,platform:i})};function Qo(e){return e!=null&&typeof e=="object"&&"$el"in e}function ot(e){if(Qo(e)){const t=e.$el;return dt(t)&&ge(t)==="#comment"?null:t}return e}function be(e){return typeof e=="function"?e():w(e)}function er(e){return{name:"arrow",options:e,fn(t){const n=ot(be(e.element));return n==null?{}:Go({element:n,padding:e.padding}).fn(t)}}}function rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dt(e,t){const n=rn(e);return Math.round(t*n)/n}function tr(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,r=q(()=>{var b;return(b=be(n.open))!=null?b:!0}),i=q(()=>be(n.middleware)),l=q(()=>{var b;return(b=be(n.placement))!=null?b:"bottom"}),a=q(()=>{var b;return(b=be(n.strategy))!=null?b:"absolute"}),s=q(()=>{var b;return(b=be(n.transform))!=null?b:!0}),u=q(()=>ot(e.value)),p=q(()=>ot(t.value)),f=E(0),d=E(0),c=E(a.value),m=E(l.value),y=$n({}),x=E(!1),_=q(()=>{const b={position:c.value,left:"0",top:"0"};if(!p.value)return b;const A=Dt(p.value,f.value),P=Dt(p.value,d.value);return s.value?{...b,transform:"translate("+A+"px, "+P+"px)",...rn(p.value)>=1.5&&{willChange:"transform"}}:{position:c.value,left:A+"px",top:P+"px"}});let g;function C(){if(u.value==null||p.value==null)return;const b=r.value;Zo(u.value,p.value,{middleware:i.value,placement:l.value,strategy:a.value}).then(A=>{f.value=A.x,d.value=A.y,c.value=A.strategy,m.value=A.placement,y.value=A.middlewareData,x.value=b!==!1})}function h(){typeof g=="function"&&(g(),g=void 0)}function S(){if(h(),o===void 0){C();return}if(u.value!=null&&p.value!=null){g=o(u.value,p.value,C);return}}function v(){r.value||(x.value=!1)}return de([i,l,a,r],C,{flush:"sync"}),de([u,p],S,{flush:"sync"}),de(r,v,{flush:"sync"}),Bn()&&kn(h),{x:we(f),y:we(d),strategy:we(c),placement:we(m),middlewareData:we(y),isPositioned:we(x),floatingStyles:_,update:C}}const nr={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Yr,or]=Ce("PopperContent");var rr=k({inheritAttrs:!1,__name:"PopperContent",props:In({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...nr}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,r=Yt(),{forwardRef:i,currentElement:l}=me(),a=E(),s=E(),{width:u,height:p}=Kn(s),f=q(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),d=q(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),c=q(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=q(()=>({padding:d.value,boundary:c.value.filter(no),altBoundary:c.value.length>0})),y=q(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),x=gn(()=>[Ko({mainAxis:n.sideOffset+p.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&It({...m.value,...y.value}),n.avoidCollisions&&Uo({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?Jo():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&It({...m.value,...y.value}),Yo({...m.value,apply:({elements:T,rects:B,availableWidth:D,availableHeight:z})=>{const{width:F,height:W}=B.reference,M=T.floating.style;M.setProperty("--reka-popper-available-width",`${D}px`),M.setProperty("--reka-popper-available-height",`${z}px`),M.setProperty("--reka-popper-anchor-width",`${F}px`),M.setProperty("--reka-popper-anchor-height",`${W}px`)}}),s.value&&er({element:s.value,padding:n.arrowPadding}),oo({arrowWidth:u.value,arrowHeight:p.value}),n.hideWhenDetached&&Xo({strategy:"referenceHidden",...m.value})]),_=q(()=>n.reference??r.anchor.value),{floatingStyles:g,placement:C,isPositioned:h,middlewareData:S}=tr(_,a,{strategy:n.positionStrategy,placement:f,whileElementsMounted:(...T)=>jo(...T,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:x}),v=q(()=>et(C.value)[0]),b=q(()=>et(C.value)[1]);Ft(()=>{h.value&&o("placed")});const A=q(()=>{var B;const T=((B=S.value.arrow)==null?void 0:B.centerOffset)!==0;return n.hideShiftedArrow&&T}),P=E("");Le(()=>{l.value&&(P.value=window.getComputedStyle(l.value).zIndex)});const O=q(()=>{var T;return((T=S.value.arrow)==null?void 0:T.x)??0}),I=q(()=>{var T;return((T=S.value.arrow)==null?void 0:T.y)??0});return or({placedSide:v,onArrowChange:T=>s.value=T,arrowX:O,arrowY:I,shouldHideArrow:A}),(T,B)=>{var D,z,F;return $(),Z("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Nt({...w(g),transform:w(h)?w(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:P.value,"--reka-popper-transform-origin":[(D=w(S).transformOrigin)==null?void 0:D.x,(z=w(S).transformOrigin)==null?void 0:z.y].join(" "),...((F=w(S).hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[N(w(Y),ne({ref:w(i)},T.$attrs,{"as-child":n.asChild,as:T.as,"data-side":v.value,"data-align":b.value,style:{animation:w(h)?void 0:"none"}}),{default:R(()=>[V(T.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),ir=rr;function lr(e){const t=Mt({nonce:E()});return q(()=>{var n;return(e==null?void 0:e.value)||((n=t.nonce)==null?void 0:n.value)})}const ar=[" ","Enter","ArrowUp","ArrowDown"],sr=[" ","Enter"],j=10;function Me(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(o=>rt(o,t,n)):rt(e,t,n)}function rt(e,t,n){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof n=="function"?n(e,t):typeof n=="string"?(e==null?void 0:e[n])===(t==null?void 0:t[n]):Nn(e,t)}function ur(e){return e==null||e===""||Array.isArray(e)&&e.length===0}const cr={key:0,value:""},[ve,ln]=Ce("SelectRoot");var dr=k({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const n=e,o=t,{required:r,disabled:i,multiple:l,dir:a}=it(n),s=yt(n,"modelValue",o,{defaultValue:n.defaultValue??(l.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),u=yt(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0}),p=E(),f=E(),d=E({x:0,y:0}),c=q(()=>{var h;return l.value&&Array.isArray(s.value)?((h=s.value)==null?void 0:h.length)===0:wt(s.value)});Te({isProvider:!0});const m=zn(a),y=Wn(p),x=E(new Set),_=q(()=>Array.from(x.value).map(h=>h.value).join(";"));function g(h){if(l.value){const S=Array.isArray(s.value)?[...s.value]:[],v=S.findIndex(b=>rt(b,h,n.by));v===-1?S.push(h):S.splice(v,1),s.value=[...S]}else s.value=h}function C(h){return Array.from(x.value).find(S=>Me(h,S.value,n.by))}return ln({triggerElement:p,onTriggerChange:h=>{p.value=h},valueElement:f,onValueElementChange:h=>{f.value=h},contentId:"",modelValue:s,onValueChange:g,by:n.by,open:u,multiple:l,required:r,onOpenChange:h=>{u.value=h},dir:m,triggerPointerDownPosRef:d,disabled:i,isEmptyModelValue:c,optionsSet:x,onOptionAdd:h=>{const S=C(h.value);S&&x.value.delete(S),x.value.add(h)},onOptionRemove:h=>{const S=C(h.value);S&&x.value.delete(S)}}),(h,S)=>($(),L(w(Qn),null,{default:R(()=>[V(h.$slots,"default",{modelValue:w(s),open:w(u)}),w(y)&&h.name?($(),L(mr,{key:_.value,"aria-hidden":"true",tabindex:"-1",multiple:w(l),required:w(r),name:h.name,autocomplete:h.autocomplete,disabled:w(i),value:w(s)},{default:R(()=>[w(wt)(w(s))?($(),Z("option",cr)):Ee("v-if",!0),($(!0),Z(lt,null,zt(Array.from(x.value),v=>($(),Z("option",ne({key:v.value??""},{ref_for:!0},v),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Ee("v-if",!0)]),_:3}))}}),fr=dr,pr=k({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,n=E(),o=ve();de(()=>t.value,(i,l)=>{const a=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==l&&u&&n.value){const p=new Event("change",{bubbles:!0});u.call(n.value,i),n.value.dispatchEvent(p)}});function r(i){o.onValueChange(i.target.value)}return(i,l)=>($(),L(w(Gn),{"as-child":""},{default:R(()=>[xe("select",ne({ref_key:"selectElement",ref:n},t,{onInput:r}),[V(i.$slots,"default")],16)]),_:3}))}}),mr=pr,hr=k({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:j},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const n=at(e);return(o,r)=>($(),L(w(ir),ne(w(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:R(()=>[V(o.$slots,"default")]),_:3},16))}}),gr=hr;const vr={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[je,an]=Ce("SelectContent");var yr=k({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=ve();Hn(),vn(n.bodyLock);const{CollectionSlot:i,getItems:l}=Te(),a=E();yn(a);const{search:s,handleTypeaheadSearch:u}=Ut(),p=E(),f=E(),d=E(),c=E(!1),m=E(!1),y=E(!1);function x(){f.value&&a.value&&xt([f.value,a.value])}de(c,()=>{x()});const{onOpenChange:_,triggerPointerDownPosRef:g}=r;Le(v=>{if(!a.value)return;let b={x:0,y:0};const A=O=>{var I,T;b={x:Math.abs(Math.round(O.pageX)-(((I=g.value)==null?void 0:I.x)??0)),y:Math.abs(Math.round(O.pageY)-(((T=g.value)==null?void 0:T.y)??0))}},P=O=>{var I;O.pointerType!=="touch"&&(b.x<=10&&b.y<=10?O.preventDefault():(I=a.value)!=null&&I.contains(O.target)||_(!1),document.removeEventListener("pointermove",A),g.value=null)};g.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",P,{capture:!0,once:!0})),v(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",P,{capture:!0})})});function C(v){const b=v.ctrlKey||v.altKey||v.metaKey;if(v.key==="Tab"&&v.preventDefault(),!b&&v.key.length===1&&u(v.key,l()),["ArrowUp","ArrowDown","Home","End"].includes(v.key)){let P=[...l().map(O=>O.ref)];if(["ArrowUp","End"].includes(v.key)&&(P=P.slice().reverse()),["ArrowUp","ArrowDown"].includes(v.key)){const O=v.target,I=P.indexOf(O);P=P.slice(I+1)}setTimeout(()=>xt(P)),v.preventDefault()}}const h=q(()=>n.position==="popper"?n:{}),S=at(h.value);return an({content:a,viewport:p,onViewportChange:v=>{p.value=v},itemRefCallback:(v,b,A)=>{const P=!m.value&&!A,O=Me(r.modelValue.value,b,r.by);if(r.multiple.value){if(y.value)return;(O||P)&&(f.value=v,O&&(y.value=!0))}else(O||P)&&(f.value=v);P&&(m.value=!0)},selectedItem:f,selectedItemText:d,onItemLeave:()=>{var v;(v=a.value)==null||v.focus()},itemTextRefCallback:(v,b,A)=>{const P=!m.value&&!A;(Me(r.modelValue.value,b,r.by)||P)&&(d.value=v)},focusSelectedItem:x,position:n.position,isPositioned:c,searchRef:s}),(v,b)=>($(),L(w(i),null,{default:R(()=>[N(w(wn),{"as-child":"",onMountAutoFocus:b[6]||(b[6]=Oe(()=>{},["prevent"])),onUnmountAutoFocus:b[7]||(b[7]=A=>{var P;o("closeAutoFocus",A),!A.defaultPrevented&&((P=w(r).triggerElement.value)==null||P.focus({preventScroll:!0}),A.preventDefault())})},{default:R(()=>[N(w(xn),{"as-child":"","disable-outside-pointer-events":v.disableOutsidePointerEvents,onFocusOutside:b[2]||(b[2]=Oe(()=>{},["prevent"])),onDismiss:b[3]||(b[3]=A=>w(r).onOpenChange(!1)),onEscapeKeyDown:b[4]||(b[4]=A=>o("escapeKeyDown",A)),onPointerDownOutside:b[5]||(b[5]=A=>o("pointerDownOutside",A))},{default:R(()=>[($(),L(Dn(v.position==="popper"?gr:Cr),ne({...v.$attrs,...w(S)},{id:w(r).contentId,ref:A=>{if(!A)return;const P=w(Ve)(A);P!=null&&P.hasAttribute("data-reka-popper-content-wrapper")?a.value=P.firstElementChild:a.value=P},role:"listbox","data-state":w(r).open.value?"open":"closed",dir:w(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:b[0]||(b[0]=Oe(()=>{},["prevent"])),onPlaced:b[1]||(b[1]=A=>c.value=!0),onKeydown:C}),{default:R(()=>[V(v.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),wr=yr;const[xr,br]=Ce("SelectItemAlignedPosition");var Sr=k({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const n=e,o=t,{getItems:r}=Te(),i=ve(),l=je(),a=E(!1),s=E(!0),u=E(),{forwardRef:p,currentElement:f}=me(),{viewport:d,selectedItem:c,selectedItemText:m,focusSelectedItem:y}=l;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&f.value&&(d!=null&&d.value)&&(c!=null&&c.value)&&(m!=null&&m.value)){const C=i.triggerElement.value.getBoundingClientRect(),h=f.value.getBoundingClientRect(),S=i.valueElement.value.getBoundingClientRect(),v=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const J=v.left-h.left,re=S.left-J,se=C.left-re,ue=C.width+se,Ue=Math.max(ue,h.width),Ye=window.innerWidth-j,Xe=Ct(re,j,Math.max(j,Ye-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.left=`${Xe}px`}else{const J=h.right-v.right,re=window.innerWidth-S.right-J,se=window.innerWidth-C.right-re,ue=C.width+se,Ue=Math.max(ue,h.width),Ye=window.innerWidth-j,Xe=Ct(re,j,Math.max(j,Ye-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.right=`${Xe}px`}const b=r().map(J=>J.ref),A=window.innerHeight-j*2,P=d.value.scrollHeight,O=window.getComputedStyle(f.value),I=Number.parseInt(O.borderTopWidth,10),T=Number.parseInt(O.paddingTop,10),B=Number.parseInt(O.borderBottomWidth,10),D=Number.parseInt(O.paddingBottom,10),z=I+T+P+D+B,F=Math.min(c.value.offsetHeight*5,z),W=window.getComputedStyle(d.value),M=Number.parseInt(W.paddingTop,10),K=Number.parseInt(W.paddingBottom,10),ye=C.top+C.height/2-j,un=A-ye,Ke=c.value.offsetHeight/2,cn=c.value.offsetTop+Ke,$e=I+T+cn,dn=z-$e;if($e<=ye){const J=c.value===b.at(-1);u.value.style.bottom="0px";const re=f.value.clientHeight-d.value.offsetTop-d.value.offsetHeight,se=Math.max(un,Ke+(J?K:0)+re+B),ue=$e+se;u.value.style.height=`${ue}px`}else{const J=c.value===b[0];u.value.style.top="0px";const se=Math.max(ye,I+d.value.offsetTop+(J?M:0)+Ke)+dn;u.value.style.height=`${se}px`,d.value.scrollTop=$e-ye+d.value.offsetTop}u.value.style.margin=`${j}px 0`,u.value.style.minHeight=`${F}px`,u.value.style.maxHeight=`${A}px`,o("placed"),requestAnimationFrame(()=>a.value=!0)}}const _=E("");he(async()=>{await Pe(),x(),f.value&&(_.value=window.getComputedStyle(f.value).zIndex)});function g(C){C&&s.value===!0&&(x(),y==null||y(),s.value=!1)}return bn(i.triggerElement,()=>{x()}),br({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:g}),(C,h)=>($(),Z("div",{ref_key:"contentWrapperElement",ref:u,style:Nt({display:"flex",flexDirection:"column",position:"fixed",zIndex:_.value})},[N(w(Y),ne({ref:w(p),style:{boxSizing:"border-box",maxHeight:"100%"}},{...C.$attrs,...n}),{default:R(()=>[V(C.$slots,"default")]),_:3},16)],4))}}),Cr=Sr,_r=k({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return ln(e.context),an(vr),(n,o)=>V(n.$slots,"default")}}),Ar=_r;const Pr={key:1};var Or=k({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=jn(n,t),i=ve(),l=E();he(()=>{l.value=new DocumentFragment});const a=E(),s=q(()=>n.forceMount||i.open.value),u=E(s.value);let p;function f(){p&&(clearTimeout(p),p=void 0)}return de(s,(d,c,m)=>{f(),p=setTimeout(()=>{u.value=s.value,p=void 0}),m(f)}),Ht(f),(d,c)=>{var m;return s.value||u.value||(m=a.value)!=null&&m.present?($(),L(w(Sn),{key:0,ref_key:"presenceRef",ref:a,present:s.value},{default:R(()=>[N(wr,Wt(jt({...w(r),...d.$attrs})),{default:R(()=>[V(d.$slots,"default")]),_:3},16)]),_:3},8,["present"])):l.value?($(),Z("div",Pr,[($(),L(Mn,{to:l.value},[N(Ar,{context:w(i)},{default:R(()=>[V(d.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Ee("v-if",!0)}}}),Er=Or;const[sn,qr]=Ce("SelectItem");var Rr=k({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{disabled:r}=it(n),i=ve(),l=je(),{forwardRef:a,currentElement:s}=me(),{CollectionItem:u}=Te(),p=q(()=>{var h;return Me((h=i.modelValue)==null?void 0:h.value,n.value,i.by)}),f=E(!1),d=E(n.textValue??""),c=Lt(void 0,"reka-select-item-text"),m="select.select";async function y(h){if(h.defaultPrevented)return;const S={originalEvent:h,value:n.value};Cn(m,x,S)}async function x(h){await Pe(),o("select",h),!h.defaultPrevented&&(r.value||(i.onValueChange(n.value),i.multiple.value||i.onOpenChange(!1)))}async function _(h){var S,v;await Pe(),!h.defaultPrevented&&(r.value?(S=l.onItemLeave)==null||S.call(l):(v=h.currentTarget)==null||v.focus({preventScroll:!0}))}async function g(h){var S;await Pe(),!h.defaultPrevented&&h.currentTarget===Vt()&&((S=l.onItemLeave)==null||S.call(l))}async function C(h){var v;await Pe(),!(h.defaultPrevented||((v=l.searchRef)==null?void 0:v.value)!==""&&h.key===" ")&&(sr.includes(h.key)&&y(h),h.key===" "&&h.preventDefault())}if(n.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return he(()=>{s.value&&l.itemRefCallback(s.value,n.value,n.disabled)}),qr({value:n.value,disabled:r,textId:c,isSelected:p,onItemTextChange:h=>{d.value=((d.value||(h==null?void 0:h.textContent))??"").trim()}}),(h,S)=>($(),L(w(u),{value:{textValue:d.value}},{default:R(()=>[N(w(Y),{ref:w(a),role:"option","aria-labelledby":w(c),"data-highlighted":f.value?"":void 0,"aria-selected":p.value,"data-state":p.value?"checked":"unchecked","aria-disabled":w(r)||void 0,"data-disabled":w(r)?"":void 0,tabindex:w(r)?void 0:-1,as:h.as,"as-child":h.asChild,onFocus:S[0]||(S[0]=v=>f.value=!0),onBlur:S[1]||(S[1]=v=>f.value=!1),onPointerup:y,onPointerdown:S[2]||(S[2]=v=>{v.currentTarget.focus({preventScroll:!0})}),onTouchend:S[3]||(S[3]=Oe(()=>{},["prevent","stop"])),onPointermove:_,onPointerleave:g,onKeydown:C},{default:R(()=>[V(h.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),Tr=Rr,$r=k({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=sn();return(o,r)=>w(n).isSelected.value?($(),L(w(Y),ne({key:0,"aria-hidden":"true"},t),{default:R(()=>[V(o.$slots,"default")]),_:3},16)):Ee("v-if",!0)}}),Br=$r,kr=k({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=ve(),o=je(),r=sn(),{forwardRef:i,currentElement:l}=me(),a=q(()=>{var s,u;return{value:r.value,disabled:r.disabled.value,textContent:((s=l.value)==null?void 0:s.textContent)??((u=r.value)==null?void 0:u.toString())??""}});return he(()=>{l.value&&(r.onItemTextChange(l.value),o.itemTextRefCallback(l.value,r.value,r.disabled.value),n.onOptionAdd(a.value))}),Ht(()=>{n.onOptionRemove(a.value)}),(s,u)=>($(),L(w(Y),ne({id:w(r).textId,ref:w(i)},{...t,...s.$attrs}),{default:R(()=>[V(s.$slots,"default")]),_:3},16,["id"]))}}),Ir=kr,Dr=k({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,o)=>($(),L(w(_n),Wt(jt(t)),{default:R(()=>[V(n.$slots,"default")]),_:3},16))}}),Mr=Dr,Vr=k({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=ve(),{forwardRef:o,currentElement:r}=me(),i=q(()=>{var d;return((d=n.disabled)==null?void 0:d.value)||t.disabled});n.contentId||(n.contentId=Lt(void 0,"reka-select-content")),he(()=>{n.onTriggerChange(r.value)});const{getItems:l}=Te(),{search:a,handleTypeaheadSearch:s,resetTypeahead:u}=Ut();function p(){i.value||(n.onOpenChange(!0),u())}function f(d){p(),n.triggerPointerDownPosRef.value={x:Math.round(d.pageX),y:Math.round(d.pageY)}}return(d,c)=>($(),L(w(to),{"as-child":"",reference:d.reference},{default:R(()=>{var m,y,x,_;return[N(w(Y),{ref:w(o),role:"combobox",type:d.as==="button"?"button":void 0,"aria-controls":w(n).contentId,"aria-expanded":w(n).open.value||!1,"aria-required":(m=w(n).required)==null?void 0:m.value,"aria-autocomplete":"none",disabled:i.value,dir:(y=w(n))==null?void 0:y.dir.value,"data-state":(x=w(n))!=null&&x.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":w(ur)((_=w(n).modelValue)==null?void 0:_.value)?"":void 0,"as-child":d.asChild,as:d.as,onClick:c[0]||(c[0]=g=>{var C;(C=g==null?void 0:g.currentTarget)==null||C.focus()}),onPointerdown:c[1]||(c[1]=g=>{if(g.pointerType==="touch")return g.preventDefault();const C=g.target;C.hasPointerCapture(g.pointerId)&&C.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(f(g),g.preventDefault())}),onPointerup:c[2]||(c[2]=Oe(g=>{g.pointerType==="touch"&&f(g)},["prevent"])),onKeydown:c[3]||(c[3]=g=>{const C=w(a)!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&C&&g.key===" "||(w(s)(g.key,w(l)()),w(ar).includes(g.key)&&(p(),g.preventDefault()))})},{default:R(()=>[V(d.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),Lr=Vr,Fr=k({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:n}=it(t),o=lr(n),r=je(),i=r.position==="item-aligned"?xr():void 0,{forwardRef:l,currentElement:a}=me();he(()=>{r==null||r.onViewportChange(a.value)});const s=E(0);function u(p){const f=p.currentTarget,{shouldExpandOnScrollRef:d,contentWrapper:c}=i??{};if(d!=null&&d.value&&(c!=null&&c.value)){const m=Math.abs(s.value-f.scrollTop);if(m>0){const y=window.innerHeight-j*2,x=Number.parseFloat(c.value.style.minHeight),_=Number.parseFloat(c.value.style.height),g=Math.max(x,_);if(g<y){const C=g+m,h=Math.min(y,C),S=C-h;c.value.style.height=`${h}px`,c.value.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,c.value.style.justifyContent="flex-end")}}}s.value=f.scrollTop}return(p,f)=>($(),Z(lt,null,[N(w(Y),ne({ref:w(l),"data-reka-select-viewport":"",role:"presentation"},{...p.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:R(()=>[V(p.$slots,"default")]),_:3},16),N(w(Y),{as:"style",nonce:w(o)},{default:R(()=>f[0]||(f[0]=[Kt(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),Nr=Fr;const zr={class:"selm-value"},Hr={key:0,class:"selm-hint"},Xr=k({__name:"SelectMenu",props:Ln({options:{},label:{},disabled:{type:Boolean},placeholder:{},id:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Vn(e,"modelValue");return(n,o)=>($(),L(w(fr),{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=r=>t.value=r),disabled:e.disabled},{default:R(()=>[N(w(Lr),{id:e.id,class:"selm-trigger","aria-label":e.label},{default:R(()=>{var r;return[xe("span",zr,Ge(((r=e.options.find(i=>i.value===t.value))==null?void 0:r.label)??e.placeholder??"—"),1),o[1]||(o[1]=xe("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true",class:"selm-caret"},[xe("path",{d:"m6 9 6 6 6-6",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))]}),_:1},8,["id","aria-label"]),N(w(Mr),null,{default:R(()=>[N(w(Er),{class:"selm-list",position:"popper","side-offset":6},{default:R(()=>[N(w(Nr),null,{default:R(()=>[($(!0),Z(lt,null,zt(e.options,r=>($(),L(w(Tr),{key:r.value,value:r.value,class:"selm-opt"},{default:R(()=>[N(w(Ir),null,{default:R(()=>[Kt(Ge(r.label),1)]),_:2},1024),r.hint?($(),Z("span",Hr,Ge(r.hint),1)):Ee("",!0),N(w(Br),{class:"selm-tick"},{default:R(()=>[...o[2]||(o[2]=[xe("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},[xe("path",{d:"m5 13 4 4L19 7",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1})]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","disabled"]))}});export{Xr as _};
|
|
2
|
-
//# sourceMappingURL=SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as s,o as e,c as a,F as o,y as r,D as n,E as i}from"./index-BXPaPWhH.js";const c={role:"status","aria-live":"polite","aria-label":"loading"},p=s({__name:"SkeletonList",props:{rows:{default:3},tall:{type:Boolean,default:!1}},setup(l){return(d,u)=>(e(),a("div",c,[(e(!0),a(o,null,r(l.rows,t=>(e(),a("div",{key:t,class:i(["skel",{tall:l.tall}]),style:n({width:`${100-t*7}%`})},null,6))),128))]))}});export{p as _};
|
|
2
|
-
//# sourceMappingURL=SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as z,J as V,A,G as B,c as n,a as s,e as c,w as d,t as o,E as D,u as h,g as m,z as b,F as g,f as l,_ as N,y as I,r as v,j as L,k as R,o as t,V as U,n as E,C as S}from"./index-BXPaPWhH.js";import{s as j,c as $}from"./useFormat-DIlTY5Dl.js";import{_ as q}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";const T={class:"page-head"},G={class:"mute",style:{"font-size":"var(--t-sm)"}},H={style:{"font-size":"var(--t-xl)"}},J={class:"sub"},P={key:0},W={key:1},K={key:2},M={key:3,class:"mute"},O={key:1,class:"panel"},Q={class:"banner failed"},X={class:"panel"},Y={key:1,class:"kvlist"},Z={class:"k"},ee={class:"v"},se={key:0},te={key:1,class:"mute"},ne={class:"v"},ae={key:1,class:"mute"},oe={class:"v"},le={class:"v"},ie={key:0,class:"panel"},de={key:0,class:"banner plain"},re={key:1,class:"code"},ue={key:2,class:"mute"},ye=z({__name:"SpecDetailView",props:{name:{}},setup(y){const k=y,a=v(null),r=v(!0),u=v(""),p=v(!1);async function w(){r.value=!0,p.value=!1;const i=await E.getAuthed(`/api/specs/${encodeURIComponent(k.name)}`);if(r.value=!1,i.status===404){p.value=!0;return}if(!i.ok){u.value=S(i,"load this spec");return}u.value="",a.value=i.body}V(()=>k.name,w,{immediate:!0}),V(()=>U.token,w),A.deploymentsLoaded||B();const C=L(()=>A.deployments.filter(i=>i.specName===k.name));return(i,e)=>{var x;const f=R("RouterLink");return t(),n("div",null,[s("div",T,[s("div",null,[s("div",G,[c(f,{to:"/specs"},{default:d(()=>[...e[0]||(e[0]=[l("← specs",-1)])]),_:1})]),s("h1",H,o(y.name),1),s("div",J,[(x=a.value)!=null&&x.description?(t(),n("span",P,o(a.value.description),1)):p.value?(t(),n("span",W,"not found")):r.value?(t(),n("span",K,"loading…")):(t(),n("span",M,"no description"))])]),e[1]||(e[1]=s("span",{class:"grow"},null,-1)),a.value?(t(),n("span",{key:0,class:D(["badge",a.value.kind])},o(h(j)(a.value.kind)),3)):m("",!0)]),u.value?(t(),b(F,{key:0,text:u.value,title:"Could not load this spec."},null,8,["text"])):m("",!0),p.value?(t(),n("section",O,[s("div",Q,[s("b",null,"No spec named “"+o(y.name)+"”.",1),e[2]||(e[2]=s("p",null,"It may have been deleted, or this is an older link.",-1))])])):(t(),n(g,{key:2},[s("section",X,[r.value?(t(),b(q,{key:0,rows:4})):a.value?(t(),n("ul",Y,[s("li",null,[s("span",Z,[e[4]||(e[4]=l(" Needs ",-1)),c(N,{label:"what needs means"},{default:d(()=>[...e[3]||(e[3]=[l(" Variables the spec uses but does not set. Every deployment referencing it supplies these, which is how one spec serves many stacks — and a missing one is refused by name rather than filled in blank. ",-1)])]),_:1})]),s("span",ee,[a.value.requiredVars.length?(t(),n("b",se,o(a.value.requiredVars.join(", ")),1)):(t(),n("span",te,"nothing — every value is fixed by the spec"))])]),s("li",null,[e[6]||(e[6]=s("span",{class:"k"},"Used by",-1)),s("span",ne,[C.value.length?(t(),n(g,{key:0},[(t(!0),n(g,null,I(C.value,_=>(t(),b(f,{key:_.id,to:`/deployments/${encodeURIComponent(_.id)}`,style:{"margin-right":"10px"}},{default:d(()=>[l(o(_.id),1)]),_:2},1032,["to"]))),128)),c(N,{label:"why this matters"},{default:d(()=>[...e[5]||(e[5]=[l(" Deleting a spec while a deployment still references it is refused: that deployment could no longer be resolved, and one that cannot be resolved can never be torn down. ",-1)])]),_:1})],64)):(t(),n("span",ae,"no deployments reference it"))])]),s("li",null,[e[7]||(e[7]=s("span",{class:"k"},"Created",-1)),s("span",oe,o(h($)(a.value.createdAt)),1)]),s("li",null,[e[8]||(e[8]=s("span",{class:"k"},"Updated",-1)),s("span",le,o(h($)(a.value.updatedAt)),1)])])):m("",!0)]),a.value?(t(),n("section",ie,[e[13]||(e[13]=s("div",{class:"phead"},[s("h2",{class:"section"},"Source")],-1)),a.value.sourceWithheld?(t(),n("div",de,[e[12]||(e[12]=s("b",null,"Hidden without an access token.",-1)),s("p",null,[e[10]||(e[10]=l(" A spec's hooks are shell commands, and they often carry a password or an API token inline — so the server does not send the file to an unauthenticated reader. ",-1)),c(f,{to:"/settings"},{default:d(()=>[...e[9]||(e[9]=[l("Add your token",-1)])]),_:1}),e[11]||(e[11]=l(" to see it. ",-1))])])):a.value.source?(t(),n("pre",re,o(a.value.source),1)):(t(),n("p",ue,"The server returned no source for this spec."))])):m("",!0)],64))])}}});export{ye as default};
|
|
2
|
-
//# sourceMappingURL=SpecDetailView-Da_PDlft.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as q,A as k,G as L,c as a,a as t,f as l,e as i,w as y,_ as C,z as x,g as f,F as N,i as U,v as T,y as $,t as r,r as p,n as E,C as z,j as V,k as B,o as s,D,E as A,u as R}from"./index-BXPaPWhH.js";import{s as j}from"./useFormat-DIlTY5Dl.js";import{_ as F}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js";import{_ as I}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";import{_ as M}from"./RelativeTime.vue_vue_type_script_setup_true_lang-BoNYQAdk.js";import{E as P}from"./EquivalentCommand-BjlPIrt9.js";import{_ as G}from"./RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"page-head"},W={class:"sub"},H={key:1,class:"panel"},J={key:2,class:"panel"},O={class:"field",style:{"max-width":"320px","margin-bottom":"var(--s4)"}},Q={class:"cards","data-testid":"specs.list"},X={class:"stagger"},Y={class:"name","data-label":"name"},Z={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},ee={"data-label":"kind"},te={"data-label":"needs"},se={key:0},ne={key:1,class:"mute"},oe={"data-label":"used by"},ae={key:0},le={key:1,class:"mute"},ie={class:"dim nowrap","data-label":"updated"},re={key:0},de={colspan:"5",class:"mute"},pe={key:2,class:"banner plain"},we=q({__name:"SpecsView",setup(ue){const u=p([]),v=p(!1),m=p(""),h=p(!1),c=p("");async function b(){const o=await E.get("/api/specs");if(v.value=!0,o.status===404){h.value=!0;return}if(!o.ok){m.value=z(o,"load specs");return}m.value="",u.value=o.body.specs??[]}b(),k.deploymentsLoaded||L();const _=V(()=>{const o=new Map;for(const e of k.deployments){if(!e.specName)continue;const d=o.get(e.specName)??[];d.push(e.id),o.set(e.specName,d)}return o}),w=V(()=>{const o=c.value.trim().toLowerCase();return o?u.value.filter(e=>e.name.toLowerCase().includes(o)||(e.description??"").toLowerCase().includes(o)):u.value});return(o,e)=>{const d=B("RouterLink");return s(),a("div",null,[t("div",K,[t("div",null,[e[3]||(e[3]=t("h1",null,"Specs",-1)),t("div",W,[e[2]||(e[2]=l(" Stored once, used by any number of deployments ",-1)),i(C,{label:"why store a spec"},{default:y(()=>[...e[1]||(e[1]=[l(" Without this, every deployment carries its own copy — 50 open pull requests meant 50 identical files, and fixing a teardown step meant re-submitting it 50 times. ",-1)])]),_:1})])]),e[4]||(e[4]=t("span",{class:"grow"},null,-1)),i(G,{run:b})]),m.value?(s(),x(I,{key:0,text:m.value,title:"Could not load the specs."},null,8,["text"])):f("",!0),h.value?(s(),a("section",H,[...e[5]||(e[5]=[t("div",{class:"banner plain"},[t("b",null,"This server has no stored specs."),t("p",null," It is an older build of pstack — every deployment carries its own copy of its spec, which still works. Upgrade the host to store specs and reference them by name. ")],-1)])])):(s(),a("section",J,[v.value?u.value.length?(s(),a(N,{key:1},[t("div",O,[e[6]||(e[6]=t("label",{for:"q"},"Search",-1)),U(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=n=>c.value=n),type:"search",placeholder:"name or description"},null,512),[[T,c.value]])]),t("table",Q,[t("thead",null,[t("tr",null,[e[9]||(e[9]=t("th",null,"Name",-1)),e[10]||(e[10]=t("th",null,"Kind",-1)),t("th",null,[e[8]||(e[8]=l(" needs ",-1)),i(C,{label:"what needs means"},{default:y(()=>[...e[7]||(e[7]=[l(" Variables the spec uses but does not set. Every deployment referencing it must supply these, which is how one spec serves many stacks. ",-1)])]),_:1})]),e[11]||(e[11]=t("th",null,"Used by",-1)),e[12]||(e[12]=t("th",null,"Updated",-1))])]),t("tbody",X,[(s(!0),a(N,null,$(w.value,(n,S)=>{var g;return s(),a("tr",{key:n.name,style:D({"--i":S})},[t("td",Y,[i(d,{to:`/specs/${encodeURIComponent(n.name)}`},{default:y(()=>[l(r(n.name),1)]),_:2},1032,["to"]),n.description?(s(),a("div",Z,r(n.description),1)):f("",!0)]),t("td",ee,[t("span",{class:A(["badge",n.kind])},r(R(j)(n.kind)),3)]),t("td",te,[n.requiredVars.length?(s(),a("span",se,r(n.requiredVars.join(", ")),1)):(s(),a("span",ne,"nothing"))]),t("td",oe,[(g=_.value.get(n.name))!=null&&g.length?(s(),a("span",ae,r(_.value.get(n.name).length)+" deployment(s) ",1)):(s(),a("span",le,"nothing yet"))]),t("td",ie,[i(M,{at:n.updatedAt},null,8,["at"])])],4)}),128)),w.value.length?f("",!0):(s(),a("tr",re,[t("td",de,"No spec matches “"+r(c.value)+"”.",1)]))])])],64)):(s(),a("div",pe,[e[16]||(e[16]=t("b",null,"No specs stored yet.",-1)),t("p",null,[e[14]||(e[14]=l(" A deployment can carry its own spec inline — see ",-1)),i(d,{to:"/submit"},{default:y(()=>[...e[13]||(e[13]=[l("Submit",-1)])]),_:1}),e[15]||(e[15]=l(" — and that is all you need for a one-off. Storing one here pays off when several deployments share it. ",-1))]),e[17]||(e[17]=t("p",{class:"mute"},"This page cannot store one yet — the command below does.",-1)),i(P,{what:"storing a spec",method:"PUT",path:"/api/specs/my-spec",body:{spec:"…the contents of your preview.yml…"},cli:"pstack validate -f preview.yml # then PUT it with the curl above"})])):(s(),x(F,{key:0,rows:3}))]))])}}});export{we as default};
|
|
2
|
-
//# sourceMappingURL=SpecsView-CQHYfu01.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as W,c as u,a as s,f as l,e as h,w as g,_ as D,z as S,g as p,F as A,t as x,i as n,I as q,v as i,y as F,Z as P,r as d,n as O,C as L,O as k,j as Y,o as r}from"./index-BXPaPWhH.js";import{_ as G}from"./ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js";import{_ as K}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";import{_ as Z}from"./HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js";import{_ as N}from"./SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js";import{_ as J}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js";import"./Teleport-DTF2H_ia.js";const Q={class:"page-head"},X={class:"sub"},_={class:"panel"},ee={class:"row",style:{gap:"var(--s3)","align-items":"center"}},se={class:"code",style:{flex:"1","overflow-x":"auto","white-space":"nowrap"}},oe={class:"panel"},te={class:"phead"},le={class:"check"},ae={class:"row",style:{gap:"var(--s4)","flex-wrap":"wrap"}},ne={class:"field inline"},ie={key:0,class:"field inline"},re={class:"field inline"},de={key:0,class:"hint"},ue={key:1,class:"field"},pe={class:"field"},ve={class:"field"},me={class:"hint"},ce={class:"field"},he={class:"field"},fe={class:"field"},ye={class:"field"},be={class:"field"},ge={class:"field"},ke=["placeholder"],we={key:3},Ue={class:"section",style:{"margin-top":"var(--s4)"}},xe={class:"row",style:{"flex-wrap":"wrap",gap:"var(--s3)"}},Ce=["for"],Ie=["id","onUpdate:modelValue"],Ve={class:"panel"},Re={class:"field"},Se={class:"field"},Ae={class:"field"},Oe={class:"row",style:{gap:"var(--s3)"}},Le={key:0,class:"mute",style:{"font-size":"var(--t-sm)","margin-top":"var(--s3)"}},$e=W({__name:"SsoView",setup(Ee){const E={subject:"sub",username:"preferred_username",email:"email",name:"name",avatar:"picture"},C=()=>({mode:"oidc",enabled:!0,label:"",clientId:"",discoveryUrl:"",provider:"github",authorizeUrl:"",tokenUrl:"",userInfoUrl:"",emailsUrl:"",groupsUrl:"",scopes:"",claimMap:{...E},allowedEmailDomains:[],allowedUsernames:[],requiredGroups:[],defaultRole:"admin"}),o=d(C()),m=d(""),f=d(""),y=d(""),b=d(""),w=d([]),I=d(""),c=d(!1),j=d(!1),v=d(""),U=d(!1);async function V(){const a=await O.get("/api/sso/config");if(j.value=!0,!a.ok){v.value=L(a,"read the sign-on settings");return}v.value="",w.value=a.body.presets??[],I.value=a.body.callbackUrl,c.value=a.body.configured,a.body.config&&(o.value={...C(),...a.body.config},f.value=(a.body.config.allowedEmailDomains??[]).join(", "),y.value=(a.body.config.allowedUsernames??[]).join(", "),b.value=(a.body.config.requiredGroups??[]).join(", ")),m.value=a.body.clientSecret}V();function T(a){o.value.provider=a;const e=w.value.find(t=>t.key===a);if(!e){o.value.authorizeUrl="",o.value.tokenUrl="",o.value.userInfoUrl="",o.value.emailsUrl="",o.value.groupsUrl="",o.value.claimMap={...E};return}o.value.authorizeUrl=e.authorizeUrl,o.value.tokenUrl=e.tokenUrl,o.value.userInfoUrl=e.userInfoUrl??"",o.value.emailsUrl="",o.value.groupsUrl="",o.value.scopes=e.scopes,o.value.claimMap={...e.claimMap},(!o.value.label||w.value.some(t=>t.label===o.value.label))&&(o.value.label=e.label)}const R=a=>a.split(",").map(e=>e.trim()).filter(Boolean);async function z(){U.value=!0;const a={...o.value,clientSecret:m.value,allowedEmailDomains:R(f.value),allowedUsernames:R(y.value),requiredGroups:R(b.value)},e=await O.put("/api/sso/config",a);if(U.value=!1,!e.ok){v.value=L(e,"save the provider"),k("error","Not saved. The server said why, at the top of this page.");return}v.value="",k("ok","Saved. The provider answered, so the settings are known good."),V()}async function M(){const a=await O.del("/api/sso/config");if(!a.ok){v.value=L(a,"remove the provider");return}k("ok","Removed. Existing accounts keep working."),o.value=C(),m.value="",f.value="",y.value="",b.value="",c.value=!1,V()}async function $(){try{await navigator.clipboard.writeText(I.value),k("ok","Copied.")}catch{k("error","Could not reach the clipboard — select the text and copy it.")}}const B=Y(()=>!o.value.clientId.trim()||!m.value?!1:o.value.mode==="oidc"?!!o.value.discoveryUrl.trim():!!o.value.authorizeUrl.trim()&&!!o.value.tokenUrl.trim());return(a,e)=>(r(),u("div",null,[s("div",Q,[s("div",null,[s("h1",null,[e[17]||(e[17]=l(" Single sign-on ",-1)),h(Z,{title:"How single sign-on works here"},{default:g(()=>[...e[16]||(e[16]=[s("p",null,[s("b",null,"This service is the relying party and nothing more."),l(" You register an OAuth or OIDC application in your own organisation and paste its client id and secret here. Your directory stays yours — no accounts are copied, and nothing is synchronised. ")],-1),s("p",null,[s("b",null,"Anyone who authenticates gets an account"),l(", created on their first sign-in. That is deliberate: your provider already decides who may authenticate (Workspace restricts to internal users, a GitHub app can be org-approved), and duplicating that policy here would just be a second list to keep in step. Narrow it with the sign-in rules below if you need to. ")],-1),s("p",null,[s("b",null,"Identity is the provider's subject, not the email."),l(" Someone changing their address keeps their account, their history and their tokens. An address is only used to adopt an account that already exists here, and only when the provider says it is verified. ")],-1),s("p",null,[s("b",null,"Nothing about local accounts changes."),l(" The admin credential, manually created users and personal API tokens all keep working exactly as they do now. ")],-1)])]),_:1})]),s("div",X,[e[19]||(e[19]=l(" Let people sign in with the identity provider you already run ",-1)),h(D,{label:"what is stored"},{default:g(()=>[...e[18]||(e[18]=[l(" One row: the endpoints, the client id, and the client secret. The secret has no read path — this page is shown a mask, and leaving it alone keeps what is stored. ",-1)])]),_:1})])])]),v.value?(r(),S(K,{key:0,text:v.value,title:"Single sign-on."},null,8,["text"])):p("",!0),j.value?(r(),u(A,{key:2},[s("section",_,[e[20]||(e[20]=s("div",{class:"phead"},[s("h2",{class:"section"},"Register this callback URL")],-1)),e[21]||(e[21]=s("p",{class:"dim"}," Paste this into your provider's application as the redirect / callback URL. It has to match exactly, and it is the same for every provider — a mismatch is the single most common reason the exchange fails, and the provider's error rarely says so. ",-1)),s("div",ee,[s("code",se,x(I.value),1),s("button",{onClick:$},"Copy")])]),s("section",oe,[s("div",te,[e[23]||(e[23]=s("h2",{class:"section"},"Provider",-1)),e[24]||(e[24]=s("span",{class:"grow"},null,-1)),s("label",le,[n(s("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>o.value.enabled=t),type:"checkbox"},null,512),[[q,o.value.enabled]]),e[22]||(e[22]=l(" Enabled",-1))])]),s("div",ae,[s("div",ne,[e[25]||(e[25]=s("label",{for:"sso-mode"},"Kind",-1)),h(N,{id:"sso-mode","model-value":o.value.mode,label:"Which protocol",options:[{value:"oidc",label:"OpenID Connect"},{value:"oauth2",label:"OAuth 2.0"}],"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.mode=t)},null,8,["model-value"])]),o.value.mode==="oauth2"?(r(),u("div",ie,[e[26]||(e[26]=s("label",{for:"sso-preset"},"Provider",-1)),h(N,{id:"sso-preset","model-value":o.value.provider,label:"Which provider",options:[...w.value.map(t=>({value:t.key,label:t.label})),{value:"custom",label:"Custom"}],"onUpdate:modelValue":e[2]||(e[2]=t=>T(String(t)))},null,8,["model-value","options"])])):p("",!0),s("div",re,[e[27]||(e[27]=s("label",{for:"sso-label"},"Button text",-1)),n(s("input",{id:"sso-label","onUpdate:modelValue":e[3]||(e[3]=t=>o.value.label=t),type:"text",placeholder:"Acme SSO"},null,512),[[i,o.value.label]])])]),o.value.mode==="oidc"?(r(),u("p",de," Everything but the client id and secret is discovered from the issuer. GitHub is the one exception you may reach for and cannot use here: its OIDC document signs Actions job tokens, not user logins — use OAuth 2.0 for GitHub. ")):p("",!0),o.value.mode==="oidc"?(r(),u("div",ue,[e[28]||(e[28]=s("label",{for:"sso-issuer"},"Issuer",-1)),n(s("input",{id:"sso-issuer","onUpdate:modelValue":e[4]||(e[4]=t=>o.value.discoveryUrl=t),type:"text",spellcheck:"false",placeholder:"https://accounts.google.com"},null,512),[[i,o.value.discoveryUrl]]),e[29]||(e[29]=s("p",{class:"hint"},[l("Or the full "),s("code",null,"…/.well-known/openid-configuration"),l(" URL. It is fetched when you save, so a typo is refused here rather than at someone's first login.")],-1))])):p("",!0),s("div",pe,[e[30]||(e[30]=s("label",{for:"sso-client"},"Client id",-1)),n(s("input",{id:"sso-client","onUpdate:modelValue":e[5]||(e[5]=t=>o.value.clientId=t),type:"text",spellcheck:"false",autocomplete:"off"},null,512),[[i,o.value.clientId]])]),s("div",ve,[e[31]||(e[31]=s("label",{for:"sso-secret"},"Client secret",-1)),n(s("input",{id:"sso-secret","onUpdate:modelValue":e[6]||(e[6]=t=>m.value=t),type:"password",spellcheck:"false",autocomplete:"new-password"},null,512),[[i,m.value]]),s("p",me," Write-only. "+x(c.value?"A secret is stored — leave this as it is to keep it.":"Stored on save and never returned by any route."),1)]),o.value.mode==="oauth2"?(r(),u(A,{key:2},[s("div",ce,[e[32]||(e[32]=s("label",{for:"sso-auth"},"Authorize URL",-1)),n(s("input",{id:"sso-auth","onUpdate:modelValue":e[7]||(e[7]=t=>o.value.authorizeUrl=t),type:"text",spellcheck:"false"},null,512),[[i,o.value.authorizeUrl]])]),s("div",he,[e[33]||(e[33]=s("label",{for:"sso-token"},"Token URL",-1)),n(s("input",{id:"sso-token","onUpdate:modelValue":e[8]||(e[8]=t=>o.value.tokenUrl=t),type:"text",spellcheck:"false"},null,512),[[i,o.value.tokenUrl]])]),s("div",fe,[e[34]||(e[34]=s("label",{for:"sso-userinfo"},"User info URL",-1)),n(s("input",{id:"sso-userinfo","onUpdate:modelValue":e[9]||(e[9]=t=>o.value.userInfoUrl=t),type:"text",spellcheck:"false"},null,512),[[i,o.value.userInfoUrl]]),e[35]||(e[35]=s("p",{class:"hint"},"Leave empty to take the identity from the token response alone — a subject and nothing else.",-1))]),s("div",ye,[e[36]||(e[36]=s("label",{for:"sso-emails"},[l("Emails URL "),s("span",{class:"mute"},"(optional)")],-1)),n(s("input",{id:"sso-emails","onUpdate:modelValue":e[10]||(e[10]=t=>o.value.emailsUrl=t),type:"text",spellcheck:"false"},null,512),[[i,o.value.emailsUrl]]),e[37]||(e[37]=s("p",{class:"hint"}," Only consulted when the profile carries no address — which is GitHub's default. Filled in automatically for a preset, and needed only if you pointed the user info URL at your own host. ",-1))]),s("div",be,[e[38]||(e[38]=s("label",{for:"sso-groups-url"},[l("Groups URL "),s("span",{class:"mute"},"(optional)")],-1)),n(s("input",{id:"sso-groups-url","onUpdate:modelValue":e[11]||(e[11]=t=>o.value.groupsUrl=t),type:"text",spellcheck:"false"},null,512),[[i,o.value.groupsUrl]]),e[39]||(e[39]=s("p",{class:"hint"}," Where this host asks which groups someone is in. Only consulted when there is a group rule below. Filled in automatically for a preset — but only while the user info URL is still the preset's, because a self-hosted host's token must not be sent to the public one, so a self-hosted provider needs this typed. ",-1))])],64)):p("",!0),s("div",ge,[e[40]||(e[40]=s("label",{for:"sso-scopes"},"Scopes",-1)),n(s("input",{id:"sso-scopes","onUpdate:modelValue":e[12]||(e[12]=t=>o.value.scopes=t),type:"text",spellcheck:"false",placeholder:o.value.mode==="oidc"?"openid profile email":""},null,8,ke),[[i,o.value.scopes]])]),o.value.mode==="oauth2"?(r(),u("div",we,[s("h3",Ue,[e[42]||(e[42]=l(" Claim mapping ",-1)),h(D,{label:"what this is"},{default:g(()=>[...e[41]||(e[41]=[l(" Which key of the provider's user response holds each field. Flat lookups, not expressions. A preset fills these in; you only touch them for a provider nobody has written a preset for. ",-1)])]),_:1})]),s("div",xe,[(r(),u(A,null,F(["subject","username","email","name","avatar"],t=>s("div",{key:t,class:"field inline"},[s("label",{for:`cm-${t}`},x(t),9,Ce),n(s("input",{id:`cm-${t}`,"onUpdate:modelValue":H=>o.value.claimMap[t]=H,type:"text",spellcheck:"false",style:{width:"11rem"}},null,8,Ie),[[i,o.value.claimMap[t]]])])),64))])])):p("",!0)]),s("section",Ve,[e[49]||(e[49]=s("div",{class:"phead"},[s("h2",{class:"section"},"Who gets an account")],-1)),e[50]||(e[50]=s("p",{class:"dim"},[l(" By default, anyone your provider lets authenticate. It already owns that decision; this is only here for the case where the application you registered is broader than the people who should reach this control plane. "),s("b",null,"Any one entry in a list is enough to satisfy that list, and every list you fill in has to be satisfied"),l(" — fill all three in and a login needs a listed domain, a matching username, and one of the groups. A list left empty is not a rule at all: it lets everyone past that check, it does not lock everyone out. ")],-1)),s("div",Re,[e[43]||(e[43]=s("label",{for:"sso-domains"},"Allowed email domains",-1)),n(s("input",{id:"sso-domains","onUpdate:modelValue":e[13]||(e[13]=t=>f.value=t),type:"text",spellcheck:"false",placeholder:"example.com, corp.example"},null,512),[[i,f.value]]),e[44]||(e[44]=s("p",{class:"hint"},[l(" Comma-separated; subdomains count. Empty means no restriction. "),s("b",null,"Non-empty means a login with no email address at all is refused too"),l(" — a provider that hides the address (a private GitHub profile with no "),s("code",null,"user:email"),l(" scope) cannot be checked, so it is not waved through. ")],-1))]),s("div",Se,[e[45]||(e[45]=s("label",{for:"sso-usernames"},"Allowed usernames",-1)),n(s("input",{id:"sso-usernames","onUpdate:modelValue":e[14]||(e[14]=t=>y.value=t),type:"text",spellcheck:"false",placeholder:"octocat, qa-[0-9]*"},null,512),[[i,y.value]]),e[46]||(e[46]=P('<p class="hint"> Comma-separated patterns, case-insensitive: <code>*</code>, <code>?</code> and <code>[0-9]</code> classes. Empty means no restriction. <b>Non-empty means a login whose provider sends no username is refused too</b> — so this is a rule for a provider that actually has usernames (GitHub's <code>login</code>, GitLab's <code>username</code>). On an OpenID Connect issuer that sends no <code>preferred_username</code> it refuses everyone rather than nobody, so set it only where you know the provider sends one. </p>',1))]),s("div",Ae,[e[47]||(e[47]=s("label",{for:"sso-groups"},"Required groups",-1)),n(s("input",{id:"sso-groups","onUpdate:modelValue":e[15]||(e[15]=t=>b.value=t),type:"text",spellcheck:"false",placeholder:"acme, acme/backend"},null,512),[[i,b.value]]),e[48]||(e[48]=s("p",{class:"hint"},[l(" Comma-separated, and "),s("b",null,"exact names, not patterns"),l(" — an organisation login, or a group path like "),s("code",null,"acme/backend"),l(". Case-insensitive. Empty means no restriction. Non-empty makes every sign-in ask the provider for that person's groups, so it needs the OAuth scope that endpoint requires: "),s("b",null,"add it to Scopes above, or the save is refused"),l(" — and the refusal names the scope. It also needs a provider whose group list this host knows how to read, which a discovered OpenID Connect issuer never is; the save says so by name. If that call does not answer, the sign-in is refused rather than allowed. ")],-1))])]),s("div",Oe,[h(G,{variant:"primary",pending:U.value,disabled:U.value||!B.value,onClick:z},{default:g(()=>[l(x(c.value?"Save changes":"Enable single sign-on"),1)]),_:1},8,["pending","disabled"]),e[52]||(e[52]=s("span",{class:"grow"},null,-1)),c.value?(r(),S(G,{key:0,variant:"danger",confirm:`Remove ${o.value.label||"the provider"}?`,onRun:M},{default:g(()=>[...e[51]||(e[51]=[l(" Remove provider ",-1)])]),_:1},8,["confirm"])):p("",!0)]),c.value?(r(),u("p",Le," Removing the provider does not delete anyone. Those accounts keep their personal tokens, and pointing the same provider back at this host re-links them by subject. ")):p("",!0)],64)):(r(),S(J,{key:1,rows:5}))]))}});export{$e as default};
|
|
2
|
-
//# sourceMappingURL=SsoView-5Kk12W1K.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SsoView-5Kk12W1K.js","sources":["../../src/views/SsoView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Single sign-on: point this control plane at the identity provider the operator already runs.\n *\n * THE POINT OF THE PAGE is that nobody has to create accounts here any more. Whoever can\n * authenticate against the operator's directory can sign in, and the account appears on first\n * login. The provider keeps owning who is allowed — Google Workspace restricts to internal users,\n * a GitHub OAuth app can be org-approved — and this page deliberately does not rebuild that policy.\n *\n * TWO THINGS THIS FORM MUST NOT GET WRONG:\n *\n * 1. The callback URL is READ-ONLY and comes from the server. It has to match what is registered\n * on the provider's side byte for byte, and a value typed here (or derived from\n * `location.origin`) would drift from the one the flow actually sends the moment the UI is\n * reached by a second hostname.\n * 2. The client secret is write-only. The server answers with a mask; submitting the mask back\n * unchanged keeps the stored secret, so an operator editing the label cannot silently wipe it.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { ClaimMap, SsoConfig, SsoConfigResponse, SsoPreset } from '../api/types';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport HelpModal from '../components/HelpModal.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\n\nconst OIDC_CLAIMS: ClaimMap = { subject: 'sub', username: 'preferred_username', email: 'email', name: 'name', avatar: 'picture' };\n\nconst blank = (): SsoConfig => ({\n mode: 'oidc',\n enabled: true,\n label: '',\n clientId: '',\n discoveryUrl: '',\n provider: 'github',\n authorizeUrl: '',\n tokenUrl: '',\n userInfoUrl: '',\n emailsUrl: '',\n groupsUrl: '',\n scopes: '',\n claimMap: { ...OIDC_CLAIMS },\n allowedEmailDomains: [],\n allowedUsernames: [],\n requiredGroups: [],\n defaultRole: 'admin',\n});\n\nconst form = ref<SsoConfig>(blank());\nconst secret = ref('');\n// The three rule lists are edited as comma-separated text, split on save. A `string[]` bound to an\n// input cannot hold \"acme,\" while someone is still typing the second entry.\nconst domains = ref('');\nconst usernames = ref('');\nconst groups = ref('');\nconst presets = ref<SsoPreset[]>([]);\nconst callbackUrl = ref('');\nconst configured = ref(false);\nconst loaded = ref(false);\nconst error = ref('');\nconst saving = ref(false);\n\nasync function load(): Promise<void> {\n const r = await api.get<SsoConfigResponse>('/api/sso/config');\n loaded.value = true;\n if (!r.ok) {\n error.value = problem(r, 'read the sign-on settings');\n return;\n }\n error.value = '';\n presets.value = r.body.presets ?? [];\n callbackUrl.value = r.body.callbackUrl;\n configured.value = r.body.configured;\n if (r.body.config) {\n form.value = { ...blank(), ...r.body.config };\n domains.value = (r.body.config.allowedEmailDomains ?? []).join(', ');\n usernames.value = (r.body.config.allowedUsernames ?? []).join(', ');\n groups.value = (r.body.config.requiredGroups ?? []).join(', ');\n }\n // The mask, so leaving the field alone re-submits it and the server keeps what it has.\n secret.value = r.body.clientSecret;\n}\nvoid load();\n\n/** Picking a preset fills the endpoints in. Everything stays editable — a self-hosted GitLab is\n * this preset with three URLs replaced, not a `custom` provider with five fields typed by hand. */\nfunction applyPreset(key: string): void {\n form.value.provider = key;\n const p = presets.value.find((x) => x.key === key);\n if (!p) {\n form.value.authorizeUrl = '';\n form.value.tokenUrl = '';\n form.value.userInfoUrl = '';\n form.value.emailsUrl = '';\n form.value.groupsUrl = '';\n form.value.claimMap = { ...OIDC_CLAIMS };\n return;\n }\n form.value.authorizeUrl = p.authorizeUrl;\n form.value.tokenUrl = p.tokenUrl;\n form.value.userInfoUrl = p.userInfoUrl ?? '';\n // Left blank on purpose: the server fills the preset's own emails and groups endpoints back in,\n // and only while userInfoUrl is still the preset's.\n form.value.emailsUrl = '';\n form.value.groupsUrl = '';\n form.value.scopes = p.scopes;\n form.value.claimMap = { ...p.claimMap };\n if (!form.value.label || presets.value.some((x) => x.label === form.value.label)) form.value.label = p.label;\n}\n\nconst list = (s: string): string[] => s.split(',').map((v) => v.trim()).filter(Boolean);\n\nasync function save(): Promise<void> {\n saving.value = true;\n // Annotated, not inline: `api.put` takes `unknown`, so without a type here a mistyped key\n // (`allowedUsernams`) would compile, the server would see no such field, the rule would silently\n // restrict nobody, and the form would say \"Saved\".\n const body: SsoConfig & { clientSecret: string } = {\n ...form.value,\n clientSecret: secret.value,\n allowedEmailDomains: list(domains.value),\n allowedUsernames: list(usernames.value),\n requiredGroups: list(groups.value),\n };\n const r = await api.put<{ ok: boolean; callbackUrl: string }>('/api/sso/config', body);\n saving.value = false;\n if (!r.ok) {\n error.value = problem(r, 'save the provider');\n // The banner is above the panels and this button is at the bottom of a long form, so a refusal\n // — the \"requiredGroups needs the … scope\" one especially — otherwise lands off-screen and\n // reads as the button having done nothing.\n toast('error', 'Not saved. The server said why, at the top of this page.');\n return;\n }\n error.value = '';\n toast('ok', 'Saved. The provider answered, so the settings are known good.');\n void load();\n}\n\nasync function remove(): Promise<void> {\n const r = await api.del('/api/sso/config');\n if (!r.ok) {\n error.value = problem(r, 'remove the provider');\n return;\n }\n toast('ok', 'Removed. Existing accounts keep working.');\n form.value = blank();\n secret.value = '';\n domains.value = '';\n usernames.value = '';\n groups.value = '';\n configured.value = false;\n void load();\n}\n\nasync function copyCallback(): Promise<void> {\n try {\n await navigator.clipboard.writeText(callbackUrl.value);\n toast('ok', 'Copied.');\n } catch {\n toast('error', 'Could not reach the clipboard — select the text and copy it.');\n }\n}\n\nconst canSave = computed(() => {\n if (!form.value.clientId.trim() || !secret.value) return false;\n if (form.value.mode === 'oidc') return !!form.value.discoveryUrl.trim();\n return !!form.value.authorizeUrl.trim() && !!form.value.tokenUrl.trim();\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n Single sign-on\n <HelpModal title=\"How single sign-on works here\">\n <p>\n <b>This service is the relying party and nothing more.</b> You register an OAuth or\n OIDC application in your own organisation and paste its client id and secret here. Your\n directory stays yours — no accounts are copied, and nothing is synchronised.\n </p>\n <p>\n <b>Anyone who authenticates gets an account</b>, created on their first sign-in. That is\n deliberate: your provider already decides who may authenticate (Workspace restricts to\n internal users, a GitHub app can be org-approved), and duplicating that policy here\n would just be a second list to keep in step. Narrow it with the sign-in rules below if\n you need to.\n </p>\n <p>\n <b>Identity is the provider's subject, not the email.</b> Someone changing their\n address keeps their account, their history and their tokens. An address is only used to\n adopt an account that already exists here, and only when the provider says it is\n verified.\n </p>\n <p>\n <b>Nothing about local accounts changes.</b> The admin credential, manually created\n users and personal API tokens all keep working exactly as they do now.\n </p>\n </HelpModal>\n </h1>\n <div class=\"sub\">\n Let people sign in with the identity provider you already run\n <InfoHint label=\"what is stored\">\n One row: the endpoints, the client id, and the client secret. The secret has no read\n path — this page is shown a mask, and leaving it alone keeps what is stored.\n </InfoHint>\n </div>\n </div>\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Single sign-on.\" />\n <SkeletonList v-if=\"!loaded\" :rows=\"5\" />\n\n <template v-else>\n <!-- ============================ the callback URL ============================ -->\n <section class=\"panel\">\n <div class=\"phead\"><h2 class=\"section\">Register this callback URL</h2></div>\n <p class=\"dim\">\n Paste this into your provider's application as the redirect / callback URL. It has to match\n exactly, and it is the same for every provider — a mismatch is the single most common\n reason the exchange fails, and the provider's error rarely says so.\n </p>\n <div class=\"row\" style=\"gap: var(--s3); align-items: center\">\n <code class=\"code\" style=\"flex: 1; overflow-x: auto; white-space: nowrap\">{{ callbackUrl }}</code>\n <button @click=\"copyCallback\">Copy</button>\n </div>\n </section>\n\n <!-- ============================ the provider ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Provider</h2>\n <span class=\"grow\" />\n <label class=\"check\"><input v-model=\"form.enabled\" type=\"checkbox\" /> Enabled</label>\n </div>\n\n <div class=\"row\" style=\"gap: var(--s4); flex-wrap: wrap\">\n <div class=\"field inline\">\n <label for=\"sso-mode\">Kind</label>\n <SelectMenu\n id=\"sso-mode\"\n :model-value=\"form.mode\"\n label=\"Which protocol\"\n :options=\"[\n { value: 'oidc', label: 'OpenID Connect' },\n { value: 'oauth2', label: 'OAuth 2.0' },\n ]\"\n @update:model-value=\"(v) => (form.mode = v as 'oidc' | 'oauth2')\"\n />\n </div>\n <div v-if=\"form.mode === 'oauth2'\" class=\"field inline\">\n <label for=\"sso-preset\">Provider</label>\n <SelectMenu\n id=\"sso-preset\"\n :model-value=\"form.provider\"\n label=\"Which provider\"\n :options=\"[...presets.map((p) => ({ value: p.key, label: p.label })), { value: 'custom', label: 'Custom' }]\"\n @update:model-value=\"(v) => applyPreset(String(v))\"\n />\n </div>\n <div class=\"field inline\">\n <label for=\"sso-label\">Button text</label>\n <input id=\"sso-label\" v-model=\"form.label\" type=\"text\" placeholder=\"Acme SSO\" />\n </div>\n </div>\n\n <p v-if=\"form.mode === 'oidc'\" class=\"hint\">\n Everything but the client id and secret is discovered from the issuer. GitHub is the one\n exception you may reach for and cannot use here: its OIDC document signs Actions job\n tokens, not user logins — use OAuth 2.0 for GitHub.\n </p>\n\n <div v-if=\"form.mode === 'oidc'\" class=\"field\">\n <label for=\"sso-issuer\">Issuer</label>\n <input id=\"sso-issuer\" v-model=\"form.discoveryUrl\" type=\"text\" spellcheck=\"false\" placeholder=\"https://accounts.google.com\" />\n <p class=\"hint\">Or the full <code>…/.well-known/openid-configuration</code> URL. It is fetched when you save, so a typo is refused here rather than at someone's first login.</p>\n </div>\n\n <div class=\"field\">\n <label for=\"sso-client\">Client id</label>\n <input id=\"sso-client\" v-model=\"form.clientId\" type=\"text\" spellcheck=\"false\" autocomplete=\"off\" />\n </div>\n <div class=\"field\">\n <label for=\"sso-secret\">Client secret</label>\n <input id=\"sso-secret\" v-model=\"secret\" type=\"password\" spellcheck=\"false\" autocomplete=\"new-password\" />\n <p class=\"hint\">\n Write-only. {{ configured ? 'A secret is stored — leave this as it is to keep it.' : 'Stored on save and never returned by any route.' }}\n </p>\n </div>\n\n <template v-if=\"form.mode === 'oauth2'\">\n <div class=\"field\">\n <label for=\"sso-auth\">Authorize URL</label>\n <input id=\"sso-auth\" v-model=\"form.authorizeUrl\" type=\"text\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"sso-token\">Token URL</label>\n <input id=\"sso-token\" v-model=\"form.tokenUrl\" type=\"text\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"sso-userinfo\">User info URL</label>\n <input id=\"sso-userinfo\" v-model=\"form.userInfoUrl\" type=\"text\" spellcheck=\"false\" />\n <p class=\"hint\">Leave empty to take the identity from the token response alone — a subject and nothing else.</p>\n </div>\n <div class=\"field\">\n <label for=\"sso-emails\">Emails URL <span class=\"mute\">(optional)</span></label>\n <input id=\"sso-emails\" v-model=\"form.emailsUrl\" type=\"text\" spellcheck=\"false\" />\n <p class=\"hint\">\n Only consulted when the profile carries no address — which is GitHub's default. Filled\n in automatically for a preset, and needed only if you pointed the user info URL at your\n own host.\n </p>\n </div>\n <div class=\"field\">\n <label for=\"sso-groups-url\">Groups URL <span class=\"mute\">(optional)</span></label>\n <input id=\"sso-groups-url\" v-model=\"form.groupsUrl\" type=\"text\" spellcheck=\"false\" />\n <p class=\"hint\">\n Where this host asks which groups someone is in. Only consulted when there is a group\n rule below. Filled in automatically for a preset — but only while the user info URL is\n still the preset's, because a self-hosted host's token must not be sent to the public\n one, so a self-hosted provider needs this typed.\n </p>\n </div>\n </template>\n\n <div class=\"field\">\n <label for=\"sso-scopes\">Scopes</label>\n <input id=\"sso-scopes\" v-model=\"form.scopes\" type=\"text\" spellcheck=\"false\" :placeholder=\"form.mode === 'oidc' ? 'openid profile email' : ''\" />\n </div>\n\n <div v-if=\"form.mode === 'oauth2'\">\n <h3 class=\"section\" style=\"margin-top: var(--s4)\">\n Claim mapping\n <InfoHint label=\"what this is\">\n Which key of the provider's user response holds each field. Flat lookups, not\n expressions. A preset fills these in; you only touch them for a provider nobody has\n written a preset for.\n </InfoHint>\n </h3>\n <div class=\"row\" style=\"flex-wrap: wrap; gap: var(--s3)\">\n <div v-for=\"k in (['subject', 'username', 'email', 'name', 'avatar'] as const)\" :key=\"k\" class=\"field inline\">\n <label :for=\"`cm-${k}`\">{{ k }}</label>\n <input :id=\"`cm-${k}`\" v-model=\"form.claimMap[k]\" type=\"text\" spellcheck=\"false\" style=\"width: 11rem\" />\n </div>\n </div>\n </div>\n </section>\n\n <!-- ============================ who gets in ============================ -->\n <section class=\"panel\">\n <div class=\"phead\"><h2 class=\"section\">Who gets an account</h2></div>\n <p class=\"dim\">\n By default, anyone your provider lets authenticate. It already owns that decision; this is\n only here for the case where the application you registered is broader than the people who\n should reach this control plane. <b>Any one entry in a list is enough to satisfy that\n list, and every list you fill in has to be satisfied</b> — fill all three in and a login\n needs a listed domain, a matching username, and one of the groups. A list left empty is not\n a rule at all: it lets everyone past that check, it does not lock everyone out.\n </p>\n <div class=\"field\">\n <label for=\"sso-domains\">Allowed email domains</label>\n <input id=\"sso-domains\" v-model=\"domains\" type=\"text\" spellcheck=\"false\" placeholder=\"example.com, corp.example\" />\n <p class=\"hint\">\n Comma-separated; subdomains count. Empty means no restriction. <b>Non-empty means a login\n with no email address at all is refused too</b> — a provider that hides the address (a\n private GitHub profile with no <code>user:email</code> scope) cannot be checked, so it is\n not waved through.\n </p>\n </div>\n\n <div class=\"field\">\n <label for=\"sso-usernames\">Allowed usernames</label>\n <input id=\"sso-usernames\" v-model=\"usernames\" type=\"text\" spellcheck=\"false\" placeholder=\"octocat, qa-[0-9]*\" />\n <p class=\"hint\">\n Comma-separated patterns, case-insensitive: <code>*</code>, <code>?</code> and\n <code>[0-9]</code> classes. Empty means no restriction. <b>Non-empty means a login whose\n provider sends no username is refused too</b> — so this is a rule for a provider that\n actually has usernames (GitHub's <code>login</code>, GitLab's <code>username</code>). On\n an OpenID Connect issuer that sends no <code>preferred_username</code> it refuses\n everyone rather than nobody, so set it only where you know the provider sends one.\n </p>\n </div>\n\n <div class=\"field\">\n <label for=\"sso-groups\">Required groups</label>\n <input id=\"sso-groups\" v-model=\"groups\" type=\"text\" spellcheck=\"false\" placeholder=\"acme, acme/backend\" />\n <p class=\"hint\">\n Comma-separated, and <b>exact names, not patterns</b> — an organisation login, or a group\n path like <code>acme/backend</code>. Case-insensitive. Empty means no restriction.\n Non-empty makes every sign-in ask the provider for that person's groups, so it needs the\n OAuth scope that endpoint requires: <b>add it to Scopes above, or the save is refused</b>\n — and the refusal names the scope. It also needs a provider whose group list this host\n knows how to read, which a discovered OpenID Connect issuer never is; the save says so by\n name. If that call does not answer, the sign-in is refused rather than allowed.\n </p>\n </div>\n </section>\n\n <div class=\"row\" style=\"gap: var(--s3)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"saving || !canSave\" @click=\"save\">\n {{ configured ? 'Save changes' : 'Enable single sign-on' }}\n </ActionButton>\n <span class=\"grow\" />\n <ActionButton v-if=\"configured\" variant=\"danger\" :confirm=\"`Remove ${form.label || 'the provider'}?`\" @run=\"remove\">\n Remove provider\n </ActionButton>\n </div>\n <p v-if=\"configured\" class=\"mute\" style=\"font-size: var(--t-sm); margin-top: var(--s3)\">\n Removing the provider does not delete anyone. Those accounts keep their personal tokens, and\n pointing the same provider back at this host re-links them by subject.\n </p>\n </template>\n </div>\n</template>\n"],"names":["OIDC_CLAIMS","blank","form","ref","secret","domains","usernames","groups","presets","callbackUrl","configured","loaded","error","saving","load","r","api","problem","applyPreset","key","p","x","list","s","v","save","body","toast","remove","copyCallback","canSave","computed","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","_createBlock","ErrorNote","_Fragment","_hoisted_3","_hoisted_4","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_hoisted_8","$event","_vModelCheckbox","_hoisted_9","_hoisted_10","SelectMenu","_openBlock","_hoisted_11","_hoisted_12","_vModelText","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_25","_hoisted_26","_hoisted_27","_renderList","k","_hoisted_28","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","ActionButton","_hoisted_35","SkeletonList"],"mappings":"qoDA6BA,MAAMA,EAAwB,CAAE,QA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n("span",{class:o(["badge",e.state])},[a[0]||(a[0]=r("span",{class:"dot"},null,-1)),c(" "+l(m(s)(e.state)),1)],2))}});export{u as _};
|
|
2
|
-
//# sourceMappingURL=StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StateBadge.vue_vue_type_script_setup_true_lang-m8_cteEx.js","sources":["../../src/components/StateBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The job states, and only these. Kept in one component so the colour of `leaked` can never drift\n * from the colour of `failed` in one view and not another:\n *\n * ok green · failed red · leaked AMBER · running blue, pulsing · cancelled grey\n *\n * `cancelled` is deliberately quiet: someone meant to stop it, so it is not an alarm — but it is\n * not `ok` either, because whatever the job had already done was left exactly as it was.\n *\n * `leaked` must be unmistakably distinct from `failed`. They are different problems with different\n * owners — \"teardown errored\" versus \"teardown ran and something survived\" — which is why the CLI\n * gives leaked its own exit code, and why this app never renders them in the same colour.\n */\nimport type { JobState } from '../api/types';\nimport { sentence } from '../composables/useFormat';\n\ndefineProps<{ state: JobState }>();\n</script>\n\n<template>\n <span class=\"badge\" :class=\"state\">\n <span class=\"dot\" />\n {{ sentence(state) }}\n </span>\n</template>\n"],"names":["_createElementBlock","_normalizeClass","__props","_createElementVNode","_toDisplayString","_unref","sentence"],"mappings":"2MAqBEA,EAGO,OAAA,CAHD,MAAKC,EAAA,CAAC,QAAgBC,EAAA,KAAK,CAAA,CAAA,eAC/BC,EAAoB,OAAA,CAAd,MAAM,KAAA,EAAK,KAAA,EAAA,KAAG,IACpBC,EAAGC,EAAAC,CAAA,EAASJ,EAAA,KAAK,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as U,s as E,M as H,c as o,a as e,f as r,e as c,w as k,_ as F,z as w,g as i,t as l,F as y,y as N,r as u,O as S,o as s,D as I,E as D,u as g,n as V,C as P}from"./index-BXPaPWhH.js";import{s as _}from"./useFormat-DIlTY5Dl.js";import{_ as W}from"./ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js";import{_ as A}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";import{_ as M}from"./HelpModal.vue_vue_type_script_setup_true_lang-DWDQ-wIa.js";import{_ as q}from"./RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js";import{_ as z}from"./SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js";import{_ as G}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js";import"./Teleport-DTF2H_ia.js";const L={class:"page-head"},J={class:"sub"},K={key:2,class:"panel"},Q={class:"phead"},X={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Y={class:"mono"},Z={key:0,class:"banner warn"},ee={key:1,class:"banner plain"},te={key:0,class:"banner warn"},ae={class:"mono"},se={key:1,class:"cards"},oe={class:"stagger"},ne={class:"name","data-label":"hostname"},le={key:0,class:"badge info",title:"the node this control plane runs on"},re={"data-label":"role"},ie={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},de={"data-label":"status"},ue={"data-label":"availability"},me={"data-label":"engine",class:"mono"},ve={"data-label":"id",class:"mono mute"},he={key:2,class:"mute"},ce={key:3,class:"panel"},pe={class:"kvlist",style:{"margin-bottom":"var(--s4)"}},be={class:"k mono"},fe={class:"v mute"},ke={class:"row",style:{"flex-wrap":"wrap",gap:"var(--s3)","align-items":"flex-end"}},we={class:"field inline"},ye={key:0,class:"field inline"},ge={class:"mute",style:{"font-size":"var(--t-sm)"}},_e={key:1,class:"banner leaked",style:{"margin-top":"var(--s3)"}},xe={class:"code",style:{"white-space":"pre-wrap","word-break":"break-all","max-height":"50vh",overflow:"auto"}},je={class:"row"},Oe=U({__name:"SwarmView",setup(Te){const n=u(null),p=u(""),x=u(!1);async function j(){const d=await V.get("/api/swarm");if(x.value=!0,!d.ok){p.value=P(d,"read the swarm");return}p.value="",n.value={...d.body,nodes:d.body.nodes??[],ports:d.body.ports??[]}}E(j,1e4);const v=u("command"),f=u("ubuntu"),m=u(""),b=u(!1),h=u(""),T=[{value:"command",label:"docker swarm join …",blurb:"One line, for a machine that already runs Docker."},{value:"script",label:"Shell script",blurb:"Installs Docker if missing (get.docker.com), then joins."},{value:"cloud-config",label:"cloud-config",blurb:"User-data for a fresh cloud machine: Docker from the distro, then join."},{value:"token",label:"Token only",blurb:"The bare join token, for your own tooling."}];async function B(){b.value=!0,h.value="",m.value="";const d=`format=${v.value}${v.value==="cloud-config"?`&distro=${encodeURIComponent(f.value)}`:""}`,t=await V.getText(`/api/swarm/join?${d}`);if(b.value=!1,t.status===403){h.value="The join token is admin-only. Sign in as an admin, or use the machine token.";return}if(t.status===409){h.value="This host is not a swarm manager, so there is nothing to join. Nothing was revealed.";return}if(!t.ok){h.value=t.text||`HTTP ${t.status}`;return}m.value=t.text}async function O(){try{await navigator.clipboard.writeText(m.value),S("ok","Copied.")}catch{S("error","Could not reach the clipboard — select the text and copy it.")}}return H(()=>{m.value=""}),(d,t)=>{var C,$;return s(),o("div",null,[e("div",L,[e("div",null,[e("h1",null,[t[4]||(t[4]=r(" Swarm ",-1)),c(M,{title:"How swarm mode works"},{default:k(()=>[...t[3]||(t[3]=[e("p",null,[e("b",null,"This host is the manager."),r(" Previews deploy as swarm stacks — the compose file you submit is converted on every deploy (profiles resolved, "),e("code",null,"restart"),r(" and limits moved under "),e("code",null,"deploy"),r(", Traefik labels onto the service) — and their tasks run on whichever node has room. ")],-1),e("p",null,[e("b",null,"A worker is one command away."),r(" Open the ports below between the machines, run the join material on the new one, and it appears in this table. Nothing else on this host changes: the control plane stays here, the axes and the leak gate never cared which node a container landed on. ")],-1),e("p",null,[e("b",null,"What a worker cannot do."),r(" A shell and stop/start reach only tasks on this node (docker's verbs are node-local); logs reach every node through the manager. A volume a task creates on a worker stays there when the stack is torn down — use named volumes only for data you can lose, and an axis for data you cannot. ")],-1)])]),_:1})]),e("div",J,[t[6]||(t[6]=r(" The nodes previews run on, and how to add one ",-1)),c(F,{label:"where this comes from"},{default:k(()=>[...t[5]||(t[5]=[e("code",null,"docker node ls",-1),r(" on this host, every ten seconds. Nothing is stored — a node that leaves disappears from here the moment docker stops listing it. ",-1)])]),_:1})])]),t[7]||(t[7]=e("span",{class:"grow"},null,-1)),c(q,{run:j})]),p.value?(s(),w(A,{key:0,text:p.value,title:"Could not read the swarm."},null,8,["text"])):i("",!0),!x.value&&!p.value?(s(),w(G,{key:1,rows:4})):n.value?(s(),o("section",K,[e("div",Q,[t[9]||(t[9]=e("h2",{class:"section"},"Nodes",-1)),t[10]||(t[10]=e("span",{class:"grow"},null,-1)),n.value.active&&n.value.managerAddr?(s(),o("span",X,[t[8]||(t[8]=r(" manager ",-1)),e("span",Y,l(n.value.managerAddr),1)])):i("",!0)]),n.value.reachable?n.value.active?(s(),o(y,{key:2},[n.value.error?(s(),o("div",te,[t[13]||(t[13]=e("b",null,"Docker reported a problem.",-1)),e("p",ae,l(n.value.error),1)])):i("",!0),n.value.nodes.length?(s(),o("table",se,[t[14]||(t[14]=e("thead",null,[e("tr",null,[e("th",null,"Hostname"),e("th",null,"Role"),e("th",null,"Status"),e("th",null,"Availability"),e("th",null,"Engine"),e("th",null,"Id")])],-1)),e("tbody",oe,[(s(!0),o(y,null,N(n.value.nodes,(a,R)=>(s(),o("tr",{key:a.id,style:I({"--i":R})},[e("td",ne,[r(l(a.hostname||"—")+" ",1),a.self?(s(),o("span",le,"this node")):i("",!0)]),e("td",re,[e("span",{class:D(["badge",a.role==="manager"?"isolated":""])},l(g(_)(a.role)),3),a.managerStatus?(s(),o("span",ie,l(a.managerStatus),1)):i("",!0)]),e("td",de,[e("span",{class:D(a.status==="ready"?"s-ok":"s-failed")},l(g(_)(a.status)),3)]),e("td",ue,l(g(_)(a.availability||"unknown")),1),e("td",me,l(a.engineVersion||"—"),1),e("td",ve,l(a.id.slice(0,12)),1)],4))),128))])])):(s(),o("p",he,"Docker lists no nodes — on a manager that should at least be this one."))],64)):(s(),o("div",ee,[t[12]||(t[12]=e("b",null,"Not a swarm manager.",-1)),e("p",null,l(n.value.note),1)])):(s(),o("div",Z,[...t[11]||(t[11]=[e("b",null,"Docker did not answer.",-1),e("p",null,"Nothing about the swarm is known right now — which is not the same as there being no swarm.",-1)])]))])):i("",!0),(C=n.value)!=null&&C.active?(s(),o("section",ce,[t[20]||(t[20]=e("div",{class:"phead"},[e("h2",{class:"section"},"Add a worker")],-1)),t[21]||(t[21]=e("p",{class:"dim"}," Open these between the new machine and every other node first — a worker that cannot reach them joins and then never receives a task. ",-1)),e("ul",pe,[(s(!0),o(y,null,N(n.value.ports,a=>(s(),o("li",{key:a.port},[e("span",be,l(a.port),1),e("span",fe,l(a.why),1)]))),128))]),e("div",ke,[e("div",we,[t[15]||(t[15]=e("label",{for:"join-format"},"Give me",-1)),c(z,{id:"join-format","model-value":v.value,label:"What to reveal",options:T.map(a=>({value:a.value,label:a.label})),"onUpdate:modelValue":t[0]||(t[0]=a=>v.value=a)},null,8,["model-value","options"])]),v.value==="cloud-config"?(s(),o("div",ye,[t[16]||(t[16]=e("label",{for:"join-distro"},"Distro",-1)),c(z,{id:"join-distro",modelValue:f.value,"onUpdate:modelValue":t[1]||(t[1]=a=>f.value=a),label:"Which Docker install steps",options:["ubuntu","debian","fedora","suse","arch","alpine"].map(a=>({value:a,label:a}))},null,8,["modelValue","options"])])):i("",!0),c(W,{variant:"primary",pending:b.value,disabled:b.value,onClick:B},{default:k(()=>[...t[17]||(t[17]=[r(" Reveal ",-1)])]),_:1},8,["pending","disabled"]),e("span",ge,l(($=T.find(a=>a.value===v.value))==null?void 0:$.blurb),1)]),h.value?(s(),w(A,{key:0,text:h.value,title:"Nothing was revealed."},null,8,["text"])):i("",!0),m.value?(s(),o("div",_e,[t[18]||(t[18]=e("b",null,"This is a secret — whoever has it can add a node that runs any task here.",-1)),t[19]||(t[19]=e("p",null,[r(" Shown once; it is not stored in this page and is forgotten when you leave. Rotate it on the manager with "),e("code",null,"docker swarm join-token --rotate worker"),r(" if it leaks. ")],-1)),e("pre",xe,l(m.value),1),e("div",je,[e("button",{onClick:O},"Copy"),e("button",{onClick:t[2]||(t[2]=a=>m.value="")},"Hide")])])):i("",!0)])):i("",!0)])}}});export{Oe as default};
|
|
2
|
-
//# sourceMappingURL=SwarmView-B-ESSXnj.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ad as be,ag as Ee,ap as Oe,a9 as E,M as we,aq as re,aa as x,a8 as F,ar as Se,J as P,R as se,aj as Ae,ak as Pe,r as b,j as w,K as Ce,u as D,a0 as I,F as De,as as Te,ab as _e,at as Le,au as Ie,a6 as ie,av as Me,d as B,a1 as Fe,ae as $,aw as Ne,a2 as xe,ax as Be,o as Y,z as J,w as ae,$ as X,D as ke,W as ue,am as Re,g as je}from"./index-BXPaPWhH.js";function $e(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[u=>{const a=be(o,u);if(a||a===null)return a;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},u=>(Ee(o,u),u)]}function T(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function le(e,t,n){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(s)}function Ue(e){return e==null}function Tt(e,t){var n;const o=se();return F(()=>{o.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!==null&&n!==void 0?n:"sync"}),Se(o)}function Q(e,t){return Ae()?(Pe(e,t),!0):!1}function We(e){let t=!1,n;const o=re(!0);return((...s)=>(t||(n=o.run(()=>e(...s)),t=!0),n))}const _=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ke=e=>typeof e<"u",qe=Object.prototype.toString,ze=e=>qe.call(e)==="[object Object]",ee=He();function He(){var e,t,n;return _&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((n=window)===null||n===void 0?void 0:n.navigator.userAgent))}function K(e){return Array.isArray(e)?e:[e]}function Ve(e){return x()}function Ge(e){if(!_)return e;let t=0,n,o;const s=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return((...r)=>(t+=1,o||(o=re(!0),n=o.run(()=>e(...r))),Q(s),n))}function _t(e,t=1e4){return Oe((n,o)=>{let s=E(e),r;const u=()=>setTimeout(()=>{s=E(e),o()},E(t));return Q(()=>{clearTimeout(r)}),{get(){return n(),s},set(a){s=a,o(),clearTimeout(r),r=u()}}})}function Ye(e,t){Ve()&&we(e,t)}function Je(e,t,n){return P(e,t,{...n,immediate:!0})}const U=_?window:void 0;function N(e){var t;const n=E(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function ce(...e){const t=(o,s,r,u)=>(o.addEventListener(s,r,u),()=>o.removeEventListener(s,r,u)),n=w(()=>{const o=K(E(e[0])).filter(s=>s!=null);return o.every(s=>typeof s!="string")?o:void 0});return Je(()=>{var o,s;return[(o=(s=n.value)===null||s===void 0?void 0:s.map(r=>N(r)))!==null&&o!==void 0?o:[U].filter(r=>r!=null),K(E(n.value?e[1]:e[0])),K(D(n.value?e[2]:e[1])),E(n.value?e[3]:e[2])]},([o,s,r,u],a,f)=>{if(!(o!=null&&o.length)||!(s!=null&&s.length)||!(r!=null&&r.length))return;const v=ze(u)?{...u}:u,l=o.flatMap(i=>s.flatMap(c=>r.map(d=>t(i,c,d,v))));f(()=>{l.forEach(i=>i())})},{flush:"post"})}function de(){const e=se(!1),t=x();return t&&Ce(()=>{e.value=!0},t),e}function Xe(e){const t=de();return w(()=>(t.value,!!e()))}function Qe(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ze(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=U,eventName:r="keydown",passive:u=!1,dedupe:a=!1}=o,f=Qe(t);return ce(s,r,l=>{l.repeat&&E(a)||f(l)&&n(l)},u)}function et(e){return JSON.parse(JSON.stringify(e))}function Lt(e,t,n={}){const{window:o=U,...s}=n;let r;const u=Xe(()=>o&&"ResizeObserver"in o),a=()=>{r&&(r.disconnect(),r=void 0)},f=P(w(()=>{const l=E(e);return Array.isArray(l)?l.map(i=>N(i)):[N(l)]}),l=>{if(a(),u.value&&o){r=new ResizeObserver(t);for(const i of l)i&&r.observe(i,s)}},{immediate:!0,flush:"post"}),v=()=>{a(),f()};return Q(v),{isSupported:u,stop:v}}function It(e,t,n,o={}){var s,r;const{clone:u=!1,passive:a=!1,eventName:f,deep:v=!1,defaultValue:l,shouldEmit:i}=o,c=x(),d=n||(c==null?void 0:c.emit)||(c==null||(s=c.$emit)===null||s===void 0?void 0:s.bind(c))||(c==null||(r=c.proxy)===null||r===void 0||(r=r.$emit)===null||r===void 0?void 0:r.bind(c==null?void 0:c.proxy));let y=f;t||(t="modelValue"),y=y||`update:${t.toString()}`;const h=p=>u?typeof u=="function"?u(p):et(p):p,g=()=>Ke(e[t])?h(e[t]):l,m=p=>{i?i(p)&&d(y,p):d(y,p)};if(a){const p=b(g());let S=!1;return P(()=>e[t],A=>{S||(S=!0,p.value=h(A),I(()=>S=!1))}),P(p,A=>{!S&&(A!==e[t]||v)&&m(A)},{deep:v}),p}else return w({get(){return g()},set(p){m(p)}})}function Z(e){return e?e.flatMap(t=>t.type===De?Z(t.children):[t]):[]}const[fe]=$e("ConfigProvider");function q(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function G(e,t,n=".",o){if(!q(t))return G(e,{},n,o);const s={...t};for(const r of Object.keys(e)){if(r==="__proto__"||r==="constructor")continue;const u=e[r];u!=null&&(o&&o(s,r,u,n)||(Array.isArray(u)&&Array.isArray(s[r])?s[r]=[...u,...s[r]]:q(u)&&q(s[r])?s[r]=G(u,s[r],(n?`${n}.`:"")+r.toString(),o):s[r]=u))}return s}function tt(e){return(...t)=>t.reduce((n,o)=>G(n,o,"",e),{})}const nt=tt(),ot=Ge(()=>{const e=b(new Map),t=b(),n=w(()=>{for(const u of e.value.values())if(u)return!0;return!1}),o=fe({scrollBody:b(!0)});let s=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",ee&&(s==null||s()),t.value=void 0};return P(n,(u,a)=>{var i;if(!_)return;if(!u){a&&r();return}t.value===void 0&&(t.value=document.body.style.overflow);const f=window.innerWidth-document.documentElement.clientWidth,v={padding:f,margin:0},l=(i=o.scrollBody)!=null&&i.value?typeof o.scrollBody.value=="object"?nt({padding:o.scrollBody.value.padding===!0?f:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?f:o.scrollBody.value.margin},v):v:{padding:0,margin:0};f>0&&(document.body.style.paddingRight=typeof l.padding=="number"?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin=="number"?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty("--scrollbar-width",`${f}px`),document.body.style.overflow="hidden"),ee&&(s=ce(document,"touchmove",c=>rt(c),{passive:!1})),I(()=>{n.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),e});function Mt(e){const t=Math.random().toString(36).substring(2,7),n=ot();n.value.set(t,e??!1);const o=w({get:()=>n.value.get(t)??!1,set:s=>n.value.set(t,s)});return Ye(()=>{n.value.delete(t)}),o}function ve(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:ve(n)}}function rt(e){const t=e||window.event,n=t.target;return n instanceof Element&&ve(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Ft(e){const t=x(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(s=>{o[Te(_e(s))]=(...r)=>e(s,...r)}),o}function pe(){const e=x(),t=b(),n=w(()=>o());Le(()=>{n.value!==o()&&Ie(t)});function o(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:N(t)}const s=Object.assign({},e.exposed),r={};for(const a in e.props)Object.defineProperty(r,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(s).length>0)for(const a in s)Object.defineProperty(r,a,{enumerable:!0,configurable:!0,get:()=>s[a]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function u(a){if(t.value=a,!!a&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),!(a instanceof Element)&&!Object.hasOwn(a,"$el"))){const f=a.$.exposed,v=Object.assign({},r);for(const l in f)Object.defineProperty(v,l,{enumerable:!0,configurable:!0,get:()=>f[l]});e.exposed=v}}return{forwardRef:u,currentRef:t,currentElement:n}}var st=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},M=new WeakMap,k=new WeakMap,R={},z=0,me=function(e){return e&&(e.host||me(e.parentNode))},it=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=me(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},at=function(e,t,n,o){var s=it(t,Array.isArray(e)?e:[e]);R[n]||(R[n]=new WeakMap);var r=R[n],u=[],a=new Set,f=new Set(s),v=function(i){!i||a.has(i)||(a.add(i),v(i.parentNode))};s.forEach(v);var l=function(i){!i||f.has(i)||Array.prototype.forEach.call(i.children,function(c){if(a.has(c))l(c);else try{var d=c.getAttribute(o),y=d!==null&&d!=="false",h=(M.get(c)||0)+1,g=(r.get(c)||0)+1;M.set(c,h),r.set(c,g),u.push(c),h===1&&y&&k.set(c,!0),g===1&&c.setAttribute(n,"true"),y||c.setAttribute(o,"true")}catch(m){console.error("aria-hidden: cannot operate on ",c,m)}})};return l(t),a.clear(),z++,function(){u.forEach(function(i){var c=M.get(i)-1,d=r.get(i)-1;M.set(i,c),r.set(i,d),c||(k.has(i)||i.removeAttribute(o),k.delete(i)),d||i.removeAttribute(n)}),z--,z||(M=new WeakMap,M=new WeakMap,k=new WeakMap,R={})}},ut=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),s=st(e);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live], script"))),at(o,s,n,"aria-hidden")):function(){return null}};function Nt(e){let t;P(()=>N(e),n=>{let o=!1;try{o=!!(n!=null&&n.closest("[popover]:not(:popover-open)"))}catch{}n&&!o?t=ut(n):t&&t()}),ie(()=>{t&&t()})}function xt(e,t="reka"){var s;let n;const o=fe({useId:void 0});return o.useId?n=o.useId():n=(s=Me)==null?void 0:s(),t?`${t}-${n}`:n}function lt(e,t){const n=b(e);function o(r){return t[n.value][r]??n.value}return{state:n,dispatch:r=>{n.value=o(r)}}}function ct(e,t){var g;const n=b({}),o=b("none"),s=b(e),r=e.value?"mounted":"unmounted";let u;const a=((g=t.value)==null?void 0:g.ownerDocument.defaultView)??U,{state:f,dispatch:v}=lt(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),l=m=>{var p;if(_){const S=new CustomEvent(m,{bubbles:!1,cancelable:!1});(p=t.value)==null||p.dispatchEvent(S)}};P(e,async(m,p)=>{var A;const S=p!==m;if(await I(),S){const W=o.value,L=j(t.value);m?(v("MOUNT"),l("enter"),L==="none"&&l("after-enter")):L==="none"||L==="undefined"||((A=n.value)==null?void 0:A.display)==="none"?(v("UNMOUNT"),l("leave"),l("after-leave")):p&&W!==L?(v("ANIMATION_OUT"),l("leave")):(v("UNMOUNT"),l("after-leave"))}},{immediate:!0});const i=m=>{const p=j(t.value),S=p.includes(CSS.escape(m.animationName)),A=f.value==="mounted"?"enter":"leave";if(m.target===t.value&&S&&(l(`after-${A}`),v("ANIMATION_END"),!s.value)){const W=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",u=a==null?void 0:a.setTimeout(()=>{var L;((L=t.value)==null?void 0:L.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=W)})}m.target===t.value&&p==="none"&&v("ANIMATION_END")},c=m=>{m.target===t.value&&(o.value=j(t.value))},d=P(t,(m,p)=>{m?(n.value=getComputedStyle(m),m.addEventListener("animationstart",c),m.addEventListener("animationcancel",i),m.addEventListener("animationend",i)):(v("ANIMATION_END"),u!==void 0&&(a==null||a.clearTimeout(u)),p==null||p.removeEventListener("animationstart",c),p==null||p.removeEventListener("animationcancel",i),p==null||p.removeEventListener("animationend",i))},{immediate:!0}),y=P(f,()=>{const m=j(t.value);o.value=f.value==="mounted"?m:"none"});return ie(()=>{d(),y()}),{isPresent:w(()=>["mounted","unmountSuspended"].includes(f.value))}}function j(e){return e&&getComputedStyle(e).animationName||"none"}var Bt=B({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var v;const{present:o,forceMount:s}=Fe(e),r=b(),{isPresent:u}=ct(o,r);n({present:u});let a=t.default({present:u.value});a=Z(a||[]);const f=x();if(a&&(a==null?void 0:a.length)>1){const l=(v=f==null?void 0:f.parent)!=null&&v.type.name?`<${f.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${l}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(i=>` - ${i}`).join(`
|
|
2
|
-
`)].join(`
|
|
3
|
-
`))}return()=>s.value||o.value||u.value?$(t.default({present:u.value})[0],{ref:l=>{const i=N(l);return typeof(i==null?void 0:i.hasAttribute)>"u"||(i!=null&&i.hasAttribute("data-reka-popper-content-wrapper")?r.value=i.firstElementChild:r.value=i),i}}):null}});const dt=B({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var f;if(!n.default)return null;const o=Z(n.default()),s=o.findIndex(v=>v.type!==Ne);if(s===-1)return o;const r=o[s];(f=r.props)==null||delete f.ref;const u=r.props?xe(t,r.props):t,a=Be({...r,props:{}},u);return o.length===1?a:(o[s]=a,o)}}}),ft=["area","img","input"],ye=B({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&ft.includes(o)?()=>$(o,t):o!=="template"?()=>$(e.as,t,{default:n.default}):()=>$(dt,t,{default:n.default})}}),vt="dismissableLayer.pointerDownOutside",pt="dismissableLayer.focusOutside";function he(e,t){if(!(t instanceof Element))return!1;const n=t.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),s=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(o===n||s.indexOf(o)<s.indexOf(n)))}function mt(e,t,n=!0){var u;const o=((u=t==null?void 0:t.value)==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),s=b(!1),r=b(()=>{});return F(a=>{if(!_||!E(n))return;const f=async l=>{const i=l.target;if(!(!(t!=null&&t.value)||!i)){if(he(t.value,i)){s.value=!1;return}if(l.target&&!s.value){let d=function(){le(vt,e,c)};const c={originalEvent:l};l.pointerType==="touch"?(o.removeEventListener("click",r.value),r.value=d,o.addEventListener("click",r.value,{once:!0})):d()}else o.removeEventListener("click",r.value);s.value=!1}},v=window.setTimeout(()=>{o.addEventListener("pointerdown",f)},0);a(()=>{window.clearTimeout(v),o.removeEventListener("pointerdown",f),o.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>{E(n)&&(s.value=!0)}}}function yt(e,t,n=!0){var r;const o=((r=t==null?void 0:t.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),s=b(!1);return F(u=>{if(!_||!E(n))return;const a=async f=>{if(!(t!=null&&t.value))return;await I(),await I();const v=f.target;!t.value||!v||he(t.value,v)||f.target&&!s.value&&le(pt,e,{originalEvent:f})};o.addEventListener("focusin",a),u(()=>o.removeEventListener("focusin",a))}),{onFocusCapture:()=>{E(n)&&(s.value=!0)},onBlurCapture:()=>{E(n)&&(s.value=!1)}}}const O=ue({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var ht=B({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,o=t,{forwardRef:s,currentElement:r}=pe(),u=w(()=>{var d;return((d=r.value)==null?void 0:d.ownerDocument)??globalThis.document}),a=w(()=>O.layersRoot),f=w(()=>r.value?Array.from(a.value).indexOf(r.value):-1),v=w(()=>O.layersWithOutsidePointerEventsDisabled.size>0),l=w(()=>{const d=Array.from(a.value),[y]=[...O.layersWithOutsidePointerEventsDisabled].slice(-1),h=d.indexOf(y);return f.value>=h}),i=mt(async d=>{const y=[...O.branches].some(h=>h==null?void 0:h.contains(d.target));!l.value||y||(o("pointerDownOutside",d),o("interactOutside",d),await I(),d.defaultPrevented||o("dismiss"))},r),c=yt(d=>{[...O.branches].some(h=>h==null?void 0:h.contains(d.target))||(o("focusOutside",d),o("interactOutside",d),d.defaultPrevented||o("dismiss"))},r);return Ze("Escape",d=>{f.value===a.value.size-1&&(o("escapeKeyDown",d),d.defaultPrevented||o("dismiss"))}),P([r,()=>n.disableOutsidePointerEvents],([d,y],h,g)=>{d&&(y&&(O.layersWithOutsidePointerEventsDisabled.size===0&&(O.originalBodyPointerEvents=u.value.body.style.pointerEvents,u.value.body.style.pointerEvents="none"),O.layersWithOutsidePointerEventsDisabled.add(d),g(()=>{O.layersWithOutsidePointerEventsDisabled.delete(d),O.layersWithOutsidePointerEventsDisabled.size===0&&!Ue(O.originalBodyPointerEvents)&&(u.value.body.style.pointerEvents=O.originalBodyPointerEvents)})),a.value.add(d))},{immediate:!0}),F(d=>{d(()=>{r.value&&(a.value.delete(r.value),O.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(d,y)=>(Y(),J(D(ye),{ref:D(s),"as-child":d.asChild,as:d.as,"data-dismissable-layer":"",style:ke({pointerEvents:v.value?l.value?"auto":"none":void 0}),onFocusCapture:D(c).onFocusCapture,onBlurCapture:D(c).onBlurCapture,onPointerdownCapture:D(i).onPointerDownCapture},{default:ae(()=>[X(d.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),kt=ht;const gt=We(()=>b([]));function bt(){const e=gt();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=te(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=te(e.value,t),(n=e.value[0])==null||n.resume()}}}function te(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}const H="focusScope.autoFocusOnMount",V="focusScope.autoFocusOnUnmount",ne={bubbles:!1,cancelable:!0};function Et(e,{select:t=!1}={}){const n=T();for(const o of e)if(C(o,{select:t}),T()!==n)return!0}function Ot(e){const t=ge(e),n=oe(t,e),o=oe(t.reverse(),e);return[n,o]}function ge(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const s=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||s?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oe(e,t){for(const n of e)if(!wt(n,{upTo:t}))return n}function wt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function St(e){return e instanceof HTMLInputElement&&"select"in e}function C(e,{select:t=!1}={}){if(e&&e.focus){const n=T();e.focus({preventScroll:!0}),e!==n&&St(e)&&t&&e.select()}}var At=B({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,o=t,{currentRef:s,currentElement:r}=pe(),u=b(null),a=bt(),f=ue({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});F(l=>{if(!_)return;const i=r.value;if(!n.trapped)return;function c(g){if(f.paused||!i)return;const m=g.target;i.contains(m)?u.value=m:C(u.value,{select:!0})}function d(g){if(f.paused||!i)return;const m=g.relatedTarget;m!==null&&(i.contains(m)||C(u.value,{select:!0}))}function y(g){const m=u.value;if(m===null||!g.some(A=>A.removedNodes.length>0))return;i.contains(m)||C(i)}document.addEventListener("focusin",c),document.addEventListener("focusout",d);const h=new MutationObserver(y);i&&h.observe(i,{childList:!0,subtree:!0}),l(()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",d),h.disconnect()})}),F(async l=>{const i=r.value;if(await I(),!i)return;a.add(f);const c=T();if(!i.contains(c)){const y=new CustomEvent(H,ne);i.addEventListener(H,h=>o("mountAutoFocus",h)),i.dispatchEvent(y),y.defaultPrevented||(Et(ge(i),{select:!0}),T()===c&&C(i))}l(()=>{i.removeEventListener(H,g=>o("mountAutoFocus",g));const y=new CustomEvent(V,ne),h=g=>{o("unmountAutoFocus",g)};i.addEventListener(V,h),i.dispatchEvent(y),i.setAttribute("data-focus-scope-unmounting",""),setTimeout(()=>{y.defaultPrevented||C(c??document.body,{select:!0}),i.removeEventListener(V,h),a.remove(f),i.removeAttribute("data-focus-scope-unmounting")},0)})});function v(l){if(!n.loop&&!n.trapped||f.paused)return;const i=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,c=T();if(i&&c){const d=l.currentTarget,[y,h]=Ot(d);y&&h?!l.shiftKey&&c===h?(l.preventDefault(),n.loop&&C(y,{select:!0})):l.shiftKey&&c===y&&(l.preventDefault(),n.loop&&C(h,{select:!0})):c===d&&l.preventDefault()}}return(l,i)=>(Y(),J(D(ye),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":l.asChild,as:l.as,onKeydown:v},{default:ae(()=>[X(l.$slots,"default")]),_:3},8,["as-child","as"]))}}),Rt=At;function jt(e){return e?"open":"closed"}function $t(e){const t=T();for(const n of e)if(n===t||(n.focus(),T()!==t))return}var Pt=B({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=de();return(n,o)=>D(t)||n.forceMount?(Y(),J(Re,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[X(n.$slots,"default")],8,["to","disabled","defer"])):je("v-if",!0)}}),Ut=Pt;export{kt as D,Rt as F,ye as P,dt as S,Ut as T,pe as a,xt as b,$e as c,jt as d,Ft as e,Nt as f,T as g,Bt as h,Mt as i,fe as j,_ as k,N as l,Tt as m,Ue as n,$t as o,Lt as p,le as q,_t as r,It as u};
|
|
4
|
-
//# sourceMappingURL=Teleport-DTF2H_ia.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/xterm-D6Mng-DB.js","assets/_commonjsHelpers-CqkleIqs.js","assets/addon-fit-CevVMrUA.js","assets/xterm-DYP7pi_n.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{d as F,J as O,M as H,c as m,a as t,f as a,e as E,w as M,_ as W,z as j,g as _,t as P,r as c,j as V,n as J,C as Q,Q as S,m as Y,R,o as p}from"./index-BXPaPWhH.js";import{_ as G}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";import{_ as U}from"./SelectMenu.vue_vue_type_script_setup_true_lang-VAye0ofl.js";import{_ as K}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Teleport-DTF2H_ia.js";const X={class:"stack"},Z={class:"banner warn"},ee={class:"row wrap",style:{gap:"var(--s3)","align-items":"end"}},ne={class:"field"},oe={class:"field"},te=["disabled"],le={key:2,class:"badge ok"},se={key:1,class:"hint"},ae={key:2,class:"hint"},ie=["data-state"],re=F({__name:"TerminalTab",setup(ue){const k=Y(),C=V(()=>String(k.params.id)),B=["sh","bash","ash","zsh","fish"],$=c(null),f=c(""),u=c(""),y=c("sh"),n=c("idle"),h=c(""),v=c(null),w=R(null),I=R(null),b=R(null);let i=null;const D=V(()=>g.value.map(o=>({value:o.name,label:o.name,hint:o.service??void 0}))),g=V(()=>{var o;return((o=$.value)==null?void 0:o.containers.filter(e=>e.state==="running"))??[]});async function x(){var d;const o=await J.get(`/api/deployments/${encodeURIComponent(C.value)}/runtime`);if(!o.ok){f.value=Q(o,"list this deployment's containers");return}if(f.value="",$.value=o.body,u.value)return;const e=typeof k.query.container=="string"?k.query.container:"",l=g.value.find(T=>T.name===e);u.value=(l==null?void 0:l.name)??((d=g.value[0])==null?void 0:d.name)??""}x();async function q(){var N;if(n.value==="connecting"||n.value==="open")return;h.value="",n.value="connecting";const[{Terminal:o},{FitAddon:e}]=await Promise.all([S(()=>import("./xterm-D6Mng-DB.js").then(s=>s.x),__vite__mapDeps([0,1])),S(()=>import("./addon-fit-CevVMrUA.js").then(s=>s.a),__vite__mapDeps([2,1]))]);await S(()=>Promise.resolve({}),__vite__mapDeps([3])),(N=w.value)==null||N.dispose();const l=new o({convertEol:!0,fontSize:13,fontFamily:"var(--font-mono, ui-monospace, monospace)",cursorBlink:!0,theme:{background:"#0b0e14"}}),d=new e;l.loadAddon(d),v.value&&(v.value.innerHTML="",l.open(v.value),d.fit()),w.value=l,I.value=d,i==null||i.disconnect(),i=new ResizeObserver(()=>{try{d.fit()}catch{}}),v.value&&i.observe(v.value);const T=location.protocol==="https:"?"wss":"ws",z=new URLSearchParams({container:u.value,shell:y.value}),r=new WebSocket(`${T}://${location.host}/api/deployments/${encodeURIComponent(C.value)}/terminal?${z}`);r.binaryType="arraybuffer",b.value=r,r.onopen=()=>{n.value="open",l.focus()},r.onmessage=s=>l.write(typeof s.data=="string"?s.data:new Uint8Array(s.data)),r.onclose=s=>{n.value="closed",h.value=s.reason||(s.code===1006?"the connection dropped (the upgrade may have been refused)":`code ${s.code}`)},r.onerror=()=>{n.value==="connecting"&&(h.value="could not open the connection")},l.onData(s=>{r.readyState===WebSocket.OPEN&&r.send(s)})}function A(){var o;(o=b.value)==null||o.close(1e3,"closed by the operator")}function L(){var o,e;i==null||i.disconnect(),i=null,(o=b.value)==null||o.close(),b.value=null,(e=w.value)==null||e.dispose(),w.value=null}return O([u,y],()=>{(n.value==="open"||n.value==="connecting")&&A()}),O(C,()=>{L(),n.value="idle",x()}),H(L),(o,e)=>(p(),m("section",X,[t("div",Z,[e[3]||(e[3]=t("b",null,"No TTY.",-1)),e[4]||(e[4]=a(" The shell runs without a terminal device, so there is no prompt, no ",-1)),e[5]||(e[5]=t("code",null,"Ctrl-C",-1)),e[6]||(e[6]=a(", and no full-screen programs (",-1)),e[7]||(e[7]=t("code",null,"top",-1)),e[8]||(e[8]=a(", ",-1)),e[9]||(e[9]=t("code",null,"vim",-1)),e[10]||(e[10]=a("). Type a command and press Enter. ",-1)),E(W,{label:"why"},{default:M(()=>[...e[2]||(e[2]=[a(" A pseudo-terminal needs a wrapper (",-1),t("code",null,"script",-1),a(") whose flags differ across distributions, and it was never verified on a real host — so pstack ships the half it can stand behind. Everything an operator usually opens a shell for (",-1),t("code",null,"ls",-1),a(", ",-1),t("code",null,"cat",-1),a(", ",-1),t("code",null,"env",-1),a(", ",-1),t("code",null,"psql",-1),a(", a migration) works. ",-1)])]),_:1})]),f.value?(p(),j(G,{key:0,text:f.value,title:"Could not list this deployment's containers."},null,8,["text"])):_("",!0),t("div",ee,[t("label",ne,[e[11]||(e[11]=t("span",null,"Container",-1)),E(U,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=l=>u.value=l),label:"Container",disabled:n.value==="open"||n.value==="connecting",options:D.value},null,8,["modelValue","disabled","options"])]),t("label",oe,[e[12]||(e[12]=t("span",null,"Shell",-1)),E(U,{modelValue:y.value,"onUpdate:modelValue":e[1]||(e[1]=l=>y.value=l),label:"Shell",disabled:n.value==="open"||n.value==="connecting",options:B.map(l=>({value:l,label:l}))},null,8,["modelValue","disabled","options"])]),n.value!=="open"?(p(),m("button",{key:0,class:"primary",disabled:!u.value||n.value==="connecting",onClick:q},P(n.value==="connecting"?"Connecting…":"Open shell"),9,te)):(p(),m("button",{key:1,onClick:A},"Close shell")),e[14]||(e[14]=t("span",{class:"grow"},null,-1)),n.value==="open"?(p(),m("span",le,[...e[13]||(e[13]=[t("span",{class:"dot pulse"},null,-1),a("connected",-1)])])):_("",!0)]),!g.value.length&&!f.value?(p(),m("p",se," Nothing is running for this deployment, so there is nothing to open a shell in. ")):_("",!0),n.value==="closed"&&h.value?(p(),m("p",ae,"Session ended — "+P(h.value)+".",1)):_("",!0),t("div",{ref_key:"host",ref:v,class:"terminal-host","data-state":n.value},null,8,ie),e[15]||(e[15]=t("p",{class:"hint"}," Every session is recorded — who, which container, when — and the record is written when the shell opens, so a session that dies with the process still leaves one. ",-1))]))}}),fe=K(re,[["__scopeId","data-v-2d8bfa2e"]]);export{fe as default};
|
|
3
|
-
//# sourceMappingURL=TerminalTab-BboWRxwq.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as q,c as n,a as e,f as y,e as i,w as b,_ as S,z as C,g as _,t as d,F as R,y as I,h as P,i as U,v as A,u as T,b as g,T as G,r as u,j as H,n as h,C as f,o,O as x}from"./index-BXPaPWhH.js";import{_ as D}from"./ActionButton.vue_vue_type_script_setup_true_lang-CxT4O7XN.js";import{E as B}from"./EquivalentCommand-BjlPIrt9.js";import{_ as J}from"./ErrorNote.vue_vue_type_script_setup_true_lang-B5-EJpIO.js";import{_ as E}from"./RelativeTime.vue_vue_type_script_setup_true_lang-BoNYQAdk.js";import{_ as F}from"./SkeletonList.vue_vue_type_script_setup_true_lang-DMdwApyt.js";import{_ as K}from"./RefreshButton.vue_vue_type_script_setup_true_lang-C7qymrfD.js";import{_ as Q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useFormat-DIlTY5Dl.js";const X={class:"page-head"},Z={class:"sub"},ee={key:1,class:"banner ok"},se={class:"code"},te={class:"row"},ae={class:"grid-2"},oe={class:"panel"},ne={class:"phead"},le={class:"mute",style:{"font-size":"var(--t-xs)"}},re={key:1,class:"cards"},ie={class:"name","data-label":"user"},de={key:0,class:"badge info"},ue={class:"dim nowrap","data-label":"added"},pe={class:"right nowrap","data-label":""},ce=["onClick"],ve={key:2,class:"hint"},me={class:"row wrap two-up"},he={class:"field grow"},we={class:"field grow"},ke={class:"row"},fe=["disabled"],ye={class:"panel"},be={class:"phead"},_e={key:1,class:"cards"},ge={class:"name","data-label":"name"},$e={class:"dim nowrap","data-label":"last used"},Ce={key:1,class:"mute"},Ue={class:"right nowrap","data-label":""},Ae={key:2,class:"hint"},Te={class:"field"},xe={class:"row"},Ve=["disabled"],Ne={class:"sheet",role:"dialog","aria-modal":"true","aria-label":"Change password"},Pe={class:"hint"},Se={class:"field"},Re={class:"row"},Ie=["disabled"],De=q({__name:"UsersView",setup(Be){const $=u([]),V=u([]),N=u(!1),r=u(""),l=u({username:"",password:""}),c=u(""),p=u(null),w=u(""),k=u(null),O=H(()=>l.value.username.trim().length>0&&l.value.password.length>=8);async function v(){const[a,s]=await Promise.all([h.get("/api/users"),h.get("/api/tokens")]);if(N.value=!0,!a.ok){r.value=f(a,"load the accounts");return}r.value="",$.value=a.body.users??[],V.value=s.ok?s.body.tokens??[]:[]}v();async function j(){const a=await h.post("/api/users",{username:l.value.username.trim(),password:l.value.password});if(!a.ok){r.value=f(a,"create this account");return}x("ok",`Created ${a.body.user.username}.`),l.value={username:"",password:""},v()}async function z(a){const s=await h.del(`/api/users/${a.id}`);if(!s.ok){r.value=f(s,`delete ${a.username}`);return}x("ok",`Deleted ${a.username}.`),v()}async function L(){var t;const a=p.value;if(!a)return;const s=await h.put(`/api/users/${a.id}/password`,{password:w.value});if(!s.ok){r.value=f(s,`change the password for ${a.username}`);return}p.value=null,w.value="",x("ok",a.id===((t=g.user)==null?void 0:t.id)?"Password changed. You have been signed out everywhere — sign in again.":`Password changed. ${a.username} has been signed out everywhere.`),v()}async function M(){const a=await h.post("/api/tokens",{name:c.value.trim()});if(!a.ok){r.value=f(a,"create this token");return}k.value={what:`Personal token “${c.value.trim()}”`,value:a.body.token,note:"Send it as a bearer token. The server stores only a hash, so this is the only time it is shown."},c.value="",v()}async function W(a){const s=await h.del(`/api/tokens/${a.id}`);if(!s.ok){r.value=f(s,`revoke ${a.name}`);return}x("ok",`Revoked ${a.name}.`),v()}return(a,s)=>(o(),n("div",null,[e("div",X,[e("div",null,[s[9]||(s[9]=e("h1",null,"Users & access",-1)),e("div",Z,[s[8]||(s[8]=y(" Who can sign in, and the tokens they use from scripts ",-1)),i(S,{label:"how access works here"},{default:b(()=>[...s[7]||(s[7]=[y(" Three kinds of caller. The host token from the environment is the root credential CI holds. An account signs in with a password and gets a browser session. A personal token belongs to one account and is what a script uses — it can do anything that account can. ",-1)])]),_:1})])]),s[10]||(s[10]=e("span",{class:"grow"},null,-1)),i(K,{run:v})]),r.value?(o(),C(J,{key:0,text:r.value,title:"Something went wrong."},null,8,["text"])):_("",!0),k.value?(o(),n("div",ee,[e("b",null,d(k.value.what)+" — copy it now.",1),e("p",null,d(k.value.note),1),e("pre",se,d(k.value.value),1),e("div",te,[e("button",{onClick:s[0]||(s[0]=t=>k.value=null)},"I have stored it")])])):_("",!0),e("div",ae,[e("section",oe,[e("div",ne,[s[11]||(s[11]=e("h2",{class:"section"},"Accounts",-1)),s[12]||(s[12]=e("span",{class:"grow"},null,-1)),e("span",le,d($.value.length),1)]),N.value?$.value.length?(o(),n("table",re,[s[14]||(s[14]=e("thead",null,[e("tr",null,[e("th",null,"User"),e("th",null,"Added"),e("th",{"aria-label":"Actions"})])],-1)),e("tbody",null,[(o(!0),n(R,null,I($.value,t=>{var m;return o(),n("tr",{key:t.id},[e("td",ie,[e("b",null,d(t.username),1),t.id===((m=T(g).user)==null?void 0:m.id)?(o(),n("span",de,"you")):_("",!0)]),e("td",ue,[i(E,{at:t.createdAt},null,8,["at"])]),e("td",pe,[e("button",{class:"ghost sm",onClick:Y=>{p.value=t,w.value=""}},"Change password",8,ce),i(D,{class:"danger sm",confirm:`Delete ${t.username}?`,onRun:Y=>z(t)},{default:b(()=>[...s[13]||(s[13]=[y("Delete",-1)])]),_:1},8,["confirm","onRun"])])])}),128))])])):(o(),n("p",ve,"No accounts yet.")):(o(),C(F,{key:0,rows:3})),e("form",{class:"stack-form",onSubmit:P(j,["prevent"])},[s[18]||(s[18]=e("h3",null,"Add an account",-1)),e("div",me,[e("label",he,[s[15]||(s[15]=e("span",null,"Username",-1)),U(e("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>l.value.username=t),type:"text",autocomplete:"off"},null,512),[[A,l.value.username]])]),e("label",we,[s[16]||(s[16]=e("span",null,"Password",-1)),U(e("input",{"onUpdate:modelValue":s[2]||(s[2]=t=>l.value.password=t),type:"password",autocomplete:"new-password"},null,512),[[A,l.value.password]])])]),s[19]||(s[19]=e("p",{class:"hint"},"At least 8 characters.",-1)),e("div",ke,[e("button",{class:"primary",type:"submit",disabled:!O.value},"Add account",8,fe),s[17]||(s[17]=e("span",{class:"grow"},null,-1))]),i(B,{what:"this account creation",method:"POST",path:"/api/users",body:{username:l.value.username||"alice",password:"…"}},null,8,["body"])],32)]),e("section",ye,[e("div",be,[s[21]||(s[21]=e("h2",{class:"section"},"Your API tokens",-1)),i(S,{label:"when to use one"},{default:b(()=>[...s[20]||(s[20]=[y(" A script or a CI job signing in as you. It carries whatever you can do, so give each one a name you will recognise later and revoke the ones you stop using. ",-1)])]),_:1})]),N.value?V.value.length?(o(),n("table",_e,[s[23]||(s[23]=e("thead",null,[e("tr",null,[e("th",null,"Name"),e("th",null,"Last used"),e("th",{"aria-label":"Actions"})])],-1)),e("tbody",null,[(o(!0),n(R,null,I(V.value,t=>(o(),n("tr",{key:t.id},[e("td",ge,[e("b",null,d(t.name),1)]),e("td",$e,[t.lastUsedAt?(o(),C(E,{key:0,at:t.lastUsedAt},null,8,["at"])):(o(),n("span",Ce,"never"))]),e("td",Ue,[i(D,{class:"danger sm",confirm:`Revoke ${t.name}?`,onRun:m=>W(t)},{default:b(()=>[...s[22]||(s[22]=[y("Revoke",-1)])]),_:1},8,["confirm","onRun"])])]))),128))])])):(o(),n("p",Ae,d(T(g).root?"The host token is not an account, so it has no personal tokens.":"No tokens yet."),1)):(o(),C(F,{key:0,rows:2})),T(g).root?_("",!0):(o(),n("form",{key:3,class:"stack-form",onSubmit:P(M,["prevent"])},[s[25]||(s[25]=e("h3",null,"New token",-1)),e("label",Te,[s[24]||(s[24]=e("span",null,"What is it for",-1)),U(e("input",{"onUpdate:modelValue":s[3]||(s[3]=t=>c.value=t),type:"text",placeholder:"ci-deploy",autocomplete:"off"},null,512),[[A,c.value]])]),e("div",xe,[e("button",{class:"primary",type:"submit",disabled:!c.value.trim()},"Create token",8,Ve)]),i(B,{what:"this token creation",method:"POST",path:"/api/tokens",body:{name:c.value||"ci-deploy"}},null,8,["body"])],32))])]),i(G,{name:"fade"},{default:b(()=>{var t;return[p.value?(o(),n("div",{key:0,class:"scrim",onClick:s[6]||(s[6]=P(m=>p.value=null,["self"]))},[e("div",Ne,[e("h3",null,"Change password for "+d(p.value.username),1),e("p",Pe," This signs "+d(p.value.id===((t=T(g).user)==null?void 0:t.id)?"you":"them")+" out everywhere — every session and personal token is revoked. ",1),e("label",Se,[s[26]||(s[26]=e("span",null,"New password",-1)),U(e("input",{"onUpdate:modelValue":s[4]||(s[4]=m=>w.value=m),type:"password",autocomplete:"new-password"},null,512),[[A,w.value]])]),e("div",Re,[e("button",{class:"primary",disabled:w.value.length<8,onClick:L}," Change password ",8,Ie),e("button",{class:"ghost",onClick:s[5]||(s[5]=m=>p.value=null)},"Cancel")])])])):_("",!0)]}),_:1})]))}}),qe=Q(De,[["__scopeId","data-v-46dca32b"]]);export{qe as default};
|
|
2
|
-
//# sourceMappingURL=UsersView-BBn3F_YM.js.map
|